Re: [Tutor] airflow dag

2017-05-27 Thread Cameron Simpson

On 25May2017 18:02, Alan Gauld  wrote:

On 25/05/17 13:15, shubham goyal wrote:

I want to ask that can we pass the parameters as commandline arguments in
airflow when we are triggering the dag and access them inside the dag's
python script/file.


I've no idea what a dag is.


It's a directed acyclic graph, a very standard computer science term.

Determining that that is what AirFlow means when it says "DAG" was surprisingly 
hard, but here we are:


 http://airflow.apache.org/

(So the hardness comes from a web search not dropping me on their front page:-)

Looks like a tool for data driven computation using a graph of data pipelines.  
By restricting it to a DAG on can be certain the computation will finish and 
the termination condition is trivially satisfied. No feedback loops.


Cheers,
Cameron Simpson 
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] How to deploy seamless script updates to your "clients"?

2017-05-27 Thread M Hashmi
That's where Git or other version control systems come in. You can edit or
upgrade creating a branch and when a branch tested at your side. You can
push it with new tag like "some module changed". I guess this is how it
works for everyone. All your team will get replicated code once you merge
branch. Its simple and its reliable.all your resource only may need to
work around a dozen shell commands.



Hope that help.

On Wed, May 24, 2017 at 3:10 PM, Juan C.  wrote:

> I have some Python 3.6.0 scripts that my co-workers use for some small
> and medium tasks. Whenever I have time I fix some bugs and add some
> features to said scripts to make their lives (and mine :D) easier, but
> there's a problem: I need to send a new script via email/chat/whatever
> and they have to replace it wherever they use it, such a hassle.
>
> How would I go to put a "update module" inside my script? I was
> thinking about using Git, because those scripts are already in
> personal repositories so that I can keep track of changes. Will I have
> to setup any special permissions so that the scripts can pull requests
> from my private repositories?
>
> I was thinking of something like "check for update before start", if
> an update is found the script would replace itself with the newer
> version and restart, is that possible? For example, 'cool-tool.py'
> v0.2 starts and find that version v0.3 is out, so it downloads and
> replace 'cool-tool.py' code with newer code and restart as v0.3.
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] Problem with if statements and else statements

2017-05-27 Thread Jalen Barr
In this code it always changes the PlaceHolder to 0 no matter what Month is
set to

Month ="September"

if Month == "January" or "1":
PlaceHolder = 0
else:
print("Information Error")
print(PlaceHolder)
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Problem with if statements and else statements

2017-05-27 Thread Jalen Barr
I am in Python version 3.6.1

On Sat, May 27, 2017 at 4:19 PM, Jalen Barr  wrote:

> In this code it always changes the PlaceHolder to 0 no matter what Month
> is set to
>
> Month ="September"
>
> if Month == "January" or "1":
> PlaceHolder = 0
> else:
> print("Information Error")
> print(PlaceHolder)
>
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Problem with if statements and else statements

2017-05-27 Thread boB Stepp
Hello Jalen!

On Sat, May 27, 2017 at 4:19 PM, Jalen Barr  wrote:
>
> In this code it always changes the PlaceHolder to 0 no matter what Month is
> set to
>
> Month ="September"
>
> if Month == "January" or "1":
> PlaceHolder = 0

This must be written as:

if Month == "January" or Month == "1":
PlaceHolder = 0

The way you wrote it is interpreted as:

if (Month == "January") or ("1"):
PlaceHolder = 0

Hopefully you will see why you got the result you obtained.



-- 
boB
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor