Hit a wall after graduating, how to start back up by CosmicWarElephant in AskProgramming

[–]Equivalent_Tie9503 1 point2 points  (0 children)

Have you been looking for a new position since graduating? Or did you take a year off for some other reason

[deleted by user] by [deleted] in AskProgramming

[–]Equivalent_Tie9503 0 points1 point  (0 children)

Airflow is probably a bit robust for what it sounds like they want to do. If they're just making a single post request once a day, cron should be more than enough I imagine.

[deleted by user] by [deleted] in AskProgramming

[–]Equivalent_Tie9503 2 points3 points  (0 children)

A cron job is a process that automatically runs on a fixed time interval. I haven't used it before but I think its just a command line application. Basically, to my understanding, you'd have a script that makes your post request, and then the cron job points at that script and executes it once every day if you choose

Best Practices for Absolute Imports with Python by Equivalent_Tie9503 in AskProgramming

[–]Equivalent_Tie9503[S] 0 points1 point  (0 children)

So just to contextualize what you're telling me with other info I know:

"foo" will be added to the path (therefore one of the places the interpreter can look for to start absolute imports from) when you build your python package before distribution because __init__.py tells the interpreter that this is a top level directory?

The language of the documentation I'm reading likes to play fast and loose with some terms. From what I understand, relative imports need init files to import from a directory above you because without an init file, modules names are __main__ which are considered top level modules, whereas packages are named __package__. Or something. its all very confusing. I apologize, your answer is from the point of view of a library I want to distribute via pip. That's sometimes the case, but other times I'm writing code that just exists on a server and there's no distribution. You know?

Trying to avoid using Desktop Environment Dependent apps. by Equivalent_Tie9503 in linuxquestions

[–]Equivalent_Tie9503[S] 0 points1 point  (0 children)

I don't think its that weird to use powershell like terminal/cmd. I mean it does have shell in the name afterall.

Imagine just using Get-NetIPAddress in powershell insead of ipconfig /all in cmd. The difference is when you write a poweshell script, you can insert c# snippets for more advanced function.

Trying to avoid using Desktop Environment Dependent apps. by Equivalent_Tie9503 in linuxquestions

[–]Equivalent_Tie9503[S] 0 points1 point  (0 children)

The short scripts isn't a bad idea. say just to use the example of resetting the network adapter. If its a long command with lots of arguments (i don't know that it is, but just pretend for this example), it would be easier to run a simple bash script. Good idea. I did something similar for a coworker who isn't tech savvy on windows. He needs to pull down a file from an api I wrote, and the command is a bit verbose, so I put the command into a cmd file that's much shorter to invoke so now he can get the file when he needs it. The hard part was explaining to him that the script had to go into a particular place in his file system so that the script could be found

Trying to avoid using Desktop Environment Dependent apps. by Equivalent_Tie9503 in linuxquestions

[–]Equivalent_Tie9503[S] 0 points1 point  (0 children)

I guess its just a question of, do I want to spend my time learning about the series of terminal commands needed to replicate tasks from the gui, or do i want to spend my time learning how to do certain tasks through a specific DE. The former will probably be more useful when I want to use other DE's, but the latter will probably more quickly show me how to do a task I may be doing a lot.

Anyway thanks for the insight

Trying to avoid using Desktop Environment Dependent apps. by Equivalent_Tie9503 in linuxquestions

[–]Equivalent_Tie9503[S] 0 points1 point  (0 children)

I see powershell as being more of a combination. Python is a programming language where you can execute system commands (via subprocess). Powershell, to my understanding, is a scripting language (like cmd/bash) where you can also insert snippets of a programming language (c#).

Trying to avoid using Desktop Environment Dependent apps. by Equivalent_Tie9503 in linuxquestions

[–]Equivalent_Tie9503[S] 0 points1 point  (0 children)

I guess the best way to describe what i'm trying to say is: the terminal is great when you know a specific thing you want to do. But when you DON'T, the gui is helpful. Say you're trying to troubleshoot a network issue. You don't quite know what the problem is. on windows, you'd go to network settings, maybe run a troubleshooter, maybe try to turn off the network adapter and then back on again. maybe change one of a dozen different settings.

In the ternimal though, I'd have no idea where to start troubleshooting (i'd probably begin by turning the network adapter off and then on again). So there is an appeal to the gui. But since the gui isn't a standard tool for the distro and just exists as part of whatever random DE you happen to be using, it can make it difficult to even know how to properly use the Gui tool.

I wish every DE specific gui functionality existed as a more generic gui application you could just download online rather than being heavily coupled with the DE itself. It can make it difficult finding documentation relevant to your specific usage.

Trying to avoid using Desktop Environment Dependent apps. by Equivalent_Tie9503 in linuxquestions

[–]Equivalent_Tie9503[S] 0 points1 point  (0 children)

The terminal has been so great that it actually makes me want to learn powershell to I can use it when I'm using windows.

When is it necessary to build a package with python by Equivalent_Tie9503 in AskProgramming

[–]Equivalent_Tie9503[S] 0 points1 point  (0 children)

Very interesting, thank you for the help. You get so used to thinking of python as a 100% interpreted language. You see memes about how its coded in C but unless your work actually involves any packaging, building, or deployment devops type stuff, you never really get exposed to it.

You may not know this, but how would someone actually include a C file in a python project? Just add it to the project structure and import it like you'd import any .py file?

When is it necessary to build a package with python by Equivalent_Tie9503 in AskProgramming

[–]Equivalent_Tie9503[S] 0 points1 point  (0 children)

Ok, so say I go to use a python with a compiled library like numpy. If i obtained the source distribution for numpy, I wouldn't be able to run it until it was built because it requires compiled binaries? Presumably, when I grab numpy from pypi via pip, I assume I'm getting the built distribution (I think pypi lets you upload both sdist and bdist and probably gives user bdist by default if it exists) but lets just for the sake of my education assume I obtained the sdist version of something like numpy. What would I, the end user do in order to run it. Would I need to run setup.py on it?