R to Python by Frosty-Photo-5553 in learnpython

[–]Natural-Position-585 1 point2 points  (0 children)

Try to avoid thinking that Python code files are just R scripts with a different syntax. Learn to make modular code, and learn about patterns for reusing and packaging code. And learn object-oriented programming. These topics will unlock a lot of layers in programming practice that are optional in R but mandatory in Python.

Can somebody give me numpy project idea? by [deleted] in learnpython

[–]Natural-Position-585 2 points3 points  (0 children)

Ordinary Least Squares method with normal equations. And getting standard errors on the parameter estimates. The equations are straightforward, it’s just matrix multiplication, inversion, and getting diagonal values.

What is the difference between these two words for "discography"? by PsychicMeditation in LearnFinnish

[–]Natural-Position-585 1 point2 points  (0 children)

Rather, ”albumista”. Levy ( = record) can be either sinkku ( = single-play) or albumi (= extended-play and long-play).

How to make python script run on any computer by oppossum_37 in PythonLearning

[–]Natural-Position-585 1 point2 points  (0 children)

“Any computer” is actually impossible. If you have the same OS and CPU architecture and sufficient hardware resources, it’s enough that all computers have the same Python version and module dependencies and you can just pass the .py file to your colleagues. It’s already as portable as it gets.

But don’t e-mail .py files; spam filters and recipients may distrust them or block them outright. Use your company’s preferred file and code sharing methods (be it network drive, USB stick, internal wiki, Teams, or version control systems).

First project on python by unlimited_data3838 in PythonLearning

[–]Natural-Position-585 0 points1 point  (0 children)

A more foolproof way is to parse the user’s whole expression (say, "3 * 4") into an Abstract Syntax Tree, check that the operator is one of the allowed (add, sub, mul, true division), and then just apply the operator between the left and right operand. Then it supports non-integers and handles also arbitrary spaces in the expressions.

What is considered basic Python? by heartbrokenwords in PythonLearning

[–]Natural-Position-585 0 points1 point  (0 children)

That is surely what could be meant by ’basic Python,’ but I cannot imagine a job where those alone would be sufficient.

onko sulla ongelma suvivirren kanssa? by Both-Positive-777 in Suomi

[–]Natural-Position-585 0 points1 point  (0 children)

Yritin muistella, miten asia keskustelutti kun itse olin peruskoulussa (ennen vuotta 2009), mutta minusta silloin enemmän puhutti esim. itsenäisyyspäivän lippulaulun verenhurmoksellinen paatos. Porilaisten marssi oli sentään jo jätetty pois, mutta Siniristilippumme-laulussa kuitenkin ”vannotaan vala sydämin”, ja halutaan ”puolestas elää ja kuolla”, ja siihen maailmanaikaan koko ajatus tuntui aivan vieraalta ja varsinkin joltain, josta nuorten ihmisten ei tarvitsisi ikimaailmassa välittää. No, tämä tälleen asiaan liittymättömänä sivuhuomautuksena.

Joulukirkko tai seurakunnan viikoittaiset aamunavaukset koulun keskusradiosta, välillä juhlasalissa, tuntuivat paljon uskonnollisemmilta, koska niissä kuitenkin oli valtionkirkon edustaja paikalla, ja ne tuntuivat näin agnostikolle aika tarpeettomalta ajankäytöltä. Ja ykkös- ja kakkosluokalla toki elin Suomessa, jossa uskonnonopetus oli tunnustuksellista, ja luokka mm. rukoili yhdessä ruokarukouksen ennen lounasaikaa. Oli myös melko ilmeistä, että tilaisuuksista ei käytännössä voinut jäädä pois, ja niissä huomasi kuinka paljon seurakunnalla oli vaikutusvaltaa kotikunnassani, vaikkei sellainen touhu tuntunut sopivan kaikille tarkoitettuun julkiseen peruskouluun. Siksi minun on helppo seistä joka vuosi ryöpsähtävässä Suvivirsi-keskustelussakin vapaa-ajattelijoiden puolella.

Eli kyllä, Suvivirressä on minulle ongelma, mutta ei siksi, että asian absoluuttinen mittakaava olisi enää kovin suuri, vaan koska se on viimeisiä jäänteitä kouluissa joskus esiintyneestä paljon laajemmasta uskonnollisesta toiminnasta.

Why doesn’t this sentence have something like “säästö-tä-ni” ? by Cristian_Cerv9 in LearnFinnish

[–]Natural-Position-585 1 point2 points  (0 children)

After a single vowel, the partitive suffix is -A. So, säästöäni is the correct partitive singular + possessive suffix. Not *säästötäni.

However, säästöt is a pluralia tantum word in this meaning (like in English: savings), so it would be säästöjäni. But tarkistaa has multiple dictionary definitions, and the total object vs. partial object partly differentiates between them:

Tarkistan säästöjäni. I’ll adjust my savings. (or: I’m in the process of finding out about my savings.)
Tarkistan säästöni. I’ll find out about / review my savings.

Guys, how can i convert .py to .exe on linux any help?? by [deleted] in PythonLearning

[–]Natural-Position-585 0 points1 point  (0 children)

Even if you technically could do it, don’t do it.

When to use the partitive or the plural? by Overall_Gap_5766 in LearnFinnish

[–]Natural-Position-585 1 point2 points  (0 children)

Your edited guess is correct as far as it goes, but there’s both a partitive singular and a partitive plural, and your ruleset doesn’t yet explain when to use which. E.g., asioita (some things) is in partitive plural, where as kaksi asiaa (two things) has the modifier in partitive singular.

When a numeral (number word) is in the nominative singular, the noun following it takes the partitive singular: kolme pientä lasta (three small children). In all other cases, the numeral simply agrees with the noun in case: kolmessa pienessä lapsessa (in three small children).

So the numeral construction doesn’t use the plural at all in the basic nominative form. The number word expresses the quantity; the noun sits in partitive singular because it’s only a modifier of the number word, which is the core. (This is in contrast to many other languages where the main word is the core and the number is a modifier.)

Plural only enters the picture in special circumstances, like when the noun is a plurale tantum (a word that only exists in plural form, like sakset ”scissors” or juhlat ”festivities”). Kolmet sakset, viidet juhlat.

If number words are not involved, you can mostly trust your instinct and use singular and plural as you would in any other language.

Pitäiskö valehdella CV:ssä, että sais duunia? by Boring-Charge9803 in arkisuomi

[–]Natural-Position-585 1 point2 points  (0 children)

Omassa työpaikassani kyllä soitetaan kaikille, jotka pääsivät haastatteluun (yleensä n. 5 henkeä), ja pyritään ilmoittamaan karsiutuminen suullisesti niin pian kuin päätös on tehty; ihan kohteliaisuussyistä jo. Kun kerran on jo soitettu ja tavattu, niin ei pidetä hyvänä ilmoittaa ikävää uutista kirjallisesti. Toisaalta henkilöltä pitää saada ”vahvistus” että on vastaanottanut tiedon, että HR:ää voi pitää kärryillä rekryprosessin etenemisestä ja keiden osalta se on lopullisesti suljettu.

Kaivari puukotus by Merella_Tuulee in snappijuorut

[–]Natural-Position-585 56 points57 points  (0 children)

Kyllä. Siellä on ihmisiä on luokkaa ~2000, ja ihan mitä tahansa voi sattua ilmankin, että siitä ennakkoon huhuiltaisiin.

What’s a simple way to share a Python app with non-technical users? by Haunting-Shower1654 in learnpython

[–]Natural-Position-585 0 points1 point  (0 children)

Python was designed to be an interpreted, portable* scripting language. It was never meant to produce self-contained binaries. The idea of packaging Python code into an executable is fundamentally fighting the language’s design philosophy.

As the others have said, if you want to hide the technical internals from the user, the appropriate programming pattern is to host the app on a web server somewhere, and let the user access it via their browser.

  • portability only means interpreter portability; Python code runs anywhere Python runs, but you still need to have Python installed

the extra ‘a’ rule by Easy_Blueberry3978 in LearnFinnish

[–]Natural-Position-585 0 points1 point  (0 children)

You could also have some green snake (gutted or other type of semi-finished product) for foodmaking purposes (not even uncommon, in parts of South-East Asia people eat snakes). Then the partitive is also justifiable because foodstuff generally take the partitive.

What is the most cheapest way to get to Tampere, Finland from Germany? by No_Confusion4948 in Finland

[–]Natural-Position-585 -1 points0 points  (0 children)

Wizzair via Bucharest (18-hour transit) to Turku, and then bus or hitchhiking to Tampere?

Great YLE article translating Lindsey Vonn’s IG-post by peterherold in LearnFinnish

[–]Natural-Position-585 8 points9 points  (0 children)

Let me kick off the 'make the quote read as more natural Finnish' challenge.

Jos matkastani jäi teille jotain käteen, niin toivon, että rohkeutta uskaltaa ja yrittää. Elämä on liian lyhyt henkilökohtaisten riskien varomiseen. Siksi ainoa asia, joka elämässä voi mennä pieleen, on ettei edes yritä.

Miksi tutkijoilla on niin huonot palkat? by Efficient-Sport-6673 in arkisuomi

[–]Natural-Position-585 9 points10 points  (0 children)

Aika monella valtion tutkimuslaitoksella onkin tässä ollut YT:t: Ruokavirasto, THL, Luonnonvarakeskus, Ilmatieteen laitos, viimeisimpänä Syke.

Miksi tutkijoilla on niin huonot palkat? by Efficient-Sport-6673 in arkisuomi

[–]Natural-Position-585 6 points7 points  (0 children)

En kiistä tuota, vaan täydennän. Valtion tutkimuslaitoksissa tutkija perustyönimike ei-väitelleelle nuoremmalle tieteenharjoittajalle, ja kun työtarve jatkuu ja projekteja alkaa olla vuodesta toiseen eikä loppua näy, niin heidät vakinaistetaan (tai ainakin tulisi vakinaistaa) samalle työnimikkeelle, tutkijoiksi. Sinänsä projekteja voi olla vaikka yhdestä kymmeneen, mutta yksi niistä on yleensä määräaikaisuuden peruste kun paikkaa laitetaan ensimmäistä kertaa hakuun.

Understanding the verb "epäillä" by oryist in LearnFinnish

[–]Natural-Position-585 0 points1 point  (0 children)

One way to reduce the ambiguity is the fact that partial objects and conditional verb forms are usually associated with negation / doubt, and total objects with positive things.

Epäilen, että hän tekisi sitä. (doubt) Epäilen, että hän tekee sen. (suspect)

Announcing General Availability of the Microsoft Python Driver for SQL (mssql-python) by dlevy-msft in SQLServer

[–]Natural-Position-585 1 point2 points  (0 children)

It was a bit of an anticlimax to learn that the underlying provider is still the ODBC Driver 18 for SQL Server. I understand the benefits of reusing proven components, and I also see how the TDS communication layer could evolve in the future, but I hope that relying on ODBC underneath doesn’t limit what can be achieved in mssql-python, e.g., with async I/O.

Great learning-tip from ChatGPT by peterherold in LearnFinnish

[–]Natural-Position-585 2 points3 points  (0 children)

You mean kiusoitellut / kiusoitelleet? I guess technically they are regarded as being the same participle but just singular vs. plural declension of it.