workspace
stringclasses
1 value
channel
stringclasses
1 value
sentences
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
sentence_id
stringlengths
44
53
timestamp
float64
1.5B
1.56B
__index_level_0__
int64
0
106k
pythondev
help
if, for some reason, you need to run it all on the same machine, then either use virtual environments for each "app", or containerize them with docker so that each app gets its own container with its own environment
2019-06-05T12:34:59.142700
Ashley
pythondev_help_Ashley_2019-06-05T12:34:59.142700
1,559,738,099.1427
26,821
pythondev
help
if you think that everything needs to be in the same environment, but could somehow still have conflicts, then you have some hyper-coupled systems that you need to break apart anyway, which renders the need for a singular environment moot
2019-06-05T12:36:20.144000
Ashley
pythondev_help_Ashley_2019-06-05T12:36:20.144000
1,559,738,180.144
26,822
pythondev
help
personally, I recommend docker instead of virtual envs, because that scales up much better and is easier to manage
2019-06-05T12:37:33.144600
Ashley
pythondev_help_Ashley_2019-06-05T12:37:33.144600
1,559,738,253.1446
26,823
pythondev
help
virtual envs are better for local development though, because they take much less time to set up
2019-06-05T12:37:55.145100
Ashley
pythondev_help_Ashley_2019-06-05T12:37:55.145100
1,559,738,275.1451
26,824
pythondev
help
having said that, many people just develop in the containers themselves
2019-06-05T12:38:34.145500
Ashley
pythondev_help_Ashley_2019-06-05T12:38:34.145500
1,559,738,314.1455
26,825
pythondev
help
i.e. they write the code locally, and then use their normal docker file to make a container whenever they want to run the code or run tests against it
2019-06-05T12:39:15.146200
Ashley
pythondev_help_Ashley_2019-06-05T12:39:15.146200
1,559,738,355.1462
26,826
pythondev
help
hey <@Ashley> thanks for the write-up
2019-06-05T13:08:56.146700
Catherina
pythondev_help_Catherina_2019-06-05T13:08:56.146700
1,559,740,136.1467
26,827
pythondev
help
My intent is not that “complex” to be honest. We are not software developers, but network engineers trying to write scripts
2019-06-05T13:09:22.147300
Catherina
pythondev_help_Catherina_2019-06-05T13:09:22.147300
1,559,740,162.1473
26,828
pythondev
help
If we go the virtual environments route, how exactly would someone sshing into a box know to, for example, enable the virtual environment before using that particular script?
2019-06-05T13:10:07.148200
Catherina
pythondev_help_Catherina_2019-06-05T13:10:07.148200
1,559,740,207.1482
26,829
pythondev
help
also how do you automatically put it in the user’s path so he can just call the script without knowing the full path?
2019-06-05T13:10:32.148700
Catherina
pythondev_help_Catherina_2019-06-05T13:10:32.148700
1,559,740,232.1487
26,830
pythondev
help
I could use some help from anyone familiar with `boto3` and AWS
2019-06-05T13:11:03.149000
Deana
pythondev_help_Deana_2019-06-05T13:11:03.149000
1,559,740,263.149
26,831
pythondev
help
If you have a question, please just ask it. Please do not ask for topic experts; do not DM or ping random users. We cannot begin to answer a question until we actually get a question. <http://sol.gfxile.net/dontask.html|*Asking Questions*>
2019-06-05T13:11:12.149100
Leana
pythondev_help_Leana_2019-06-05T13:11:12.149100
1,559,740,272.1491
26,832
pythondev
help
good bot
2019-06-05T13:11:31.149200
Deana
pythondev_help_Deana_2019-06-05T13:11:31.149200
1,559,740,291.1492
26,833
pythondev
help
I have a function with a line that includes `org_client = boto3.client('organizations')` which is supposed to crawl through my Orgs AWS Accounts and list them. How can I target just one account install of having it start from top level Org. In theory/my brain tells me `org_client = boto3.client('AWS_Account_ID###')`
2019-06-05T13:12:37.150500
Deana
pythondev_help_Deana_2019-06-05T13:12:37.150500
1,559,740,357.1505
26,834
pythondev
help
This might get you a little closer
2019-06-05T13:14:17.150700
Clemmie
pythondev_help_Clemmie_2019-06-05T13:14:17.150700
1,559,740,457.1507
26,835
pythondev
help
sorry about the formatting
2019-06-05T13:14:26.151200
Clemmie
pythondev_help_Clemmie_2019-06-05T13:14:26.151200
1,559,740,466.1512
26,836
pythondev
help
you can see here in the docs that client can actually take a fairly large number of kwargs <https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html#boto3.session.Session.client>
2019-06-05T13:15:13.151800
Clemmie
pythondev_help_Clemmie_2019-06-05T13:15:13.151800
1,559,740,513.1518
26,837
pythondev
help
so by specifying the access_key_id and secret_access_key it will point to that specific account vs my entire org?
2019-06-05T13:16:21.152400
Deana
pythondev_help_Deana_2019-06-05T13:16:21.152400
1,559,740,581.1524
26,838
pythondev
help
I believe so, yes
2019-06-05T13:16:34.153000
Clemmie
pythondev_help_Clemmie_2019-06-05T13:16:34.153000
1,559,740,594.153
26,839
pythondev
help
got it, I’ll do some testing, thanks for the pointer
2019-06-05T13:17:11.153800
Deana
pythondev_help_Deana_2019-06-05T13:17:11.153800
1,559,740,631.1538
26,840
pythondev
help
yeah it def should
2019-06-05T13:36:27.154100
Holly
pythondev_help_Holly_2019-06-05T13:36:27.154100
1,559,741,787.1541
26,841
pythondev
help
<@Catherina> what will these "scripts" be doing?
2019-06-05T14:05:42.154800
Ashley
pythondev_help_Ashley_2019-06-05T14:05:42.154800
1,559,743,542.1548
26,842
pythondev
help
access network devices, running commands on them
2019-06-05T14:06:14.155400
Catherina
pythondev_help_Catherina_2019-06-05T14:06:14.155400
1,559,743,574.1554
26,843
pythondev
help
returning text-based results
2019-06-05T14:06:27.155800
Catherina
pythondev_help_Catherina_2019-06-05T14:06:27.155800
1,559,743,587.1558
26,844
pythondev
help
I'm finding it odd that someone would SSH into a box just to run a script, let alone SSH into a box to run a script that SSH's into a box to run scripts
2019-06-05T14:06:38.156100
Ashley
pythondev_help_Ashley_2019-06-05T14:06:38.156100
1,559,743,598.1561
26,845
pythondev
help
that sounds like a recipe for disaster
2019-06-05T14:07:15.156400
Ashley
pythondev_help_Ashley_2019-06-05T14:07:15.156400
1,559,743,635.1564
26,846
pythondev
help
what is the desired behavior?
2019-06-05T14:07:30.156600
Ashley
pythondev_help_Ashley_2019-06-05T14:07:30.156600
1,559,743,650.1566
26,847
pythondev
help
there may already be something that does what you want so you don't have to re-invent the wheel
2019-06-05T14:08:44.157400
Ashley
pythondev_help_Ashley_2019-06-05T14:08:44.157400
1,559,743,724.1574
26,848
pythondev
help
for example, I could SSH into a box for the purpose of setting up a tunnel to another system and spinning up a privately hosted service there so that I run a test suite against it in an isolated environment
2019-06-05T14:10:50.158800
Ashley
pythondev_help_Ashley_2019-06-05T14:10:50.158800
1,559,743,850.1588
26,849
pythondev
help
or I could just use a proper CI/CD pipeline
2019-06-05T14:10:58.159100
Ashley
pythondev_help_Ashley_2019-06-05T14:10:58.159100
1,559,743,858.1591
26,850
pythondev
help
well these are simple python scripts
2019-06-05T14:15:00.159500
Catherina
pythondev_help_Catherina_2019-06-05T14:15:00.159500
1,559,744,100.1595
26,851
pythondev
help
Example: <https://github.com/napalm-automation/napalm>
2019-06-05T14:15:25.159900
Catherina
pythondev_help_Catherina_2019-06-05T14:15:25.159900
1,559,744,125.1599
26,852
pythondev
help
NAPALM allows you to interact with network devices to do jinja2-based configurations (as an example)
2019-06-05T14:16:04.160500
Catherina
pythondev_help_Catherina_2019-06-05T14:16:04.160500
1,559,744,164.1605
26,853
pythondev
help
My concern is what happens when I need both app X and Y, yet they have different library dependencies
2019-06-05T14:16:35.161200
Catherina
pythondev_help_Catherina_2019-06-05T14:16:35.161200
1,559,744,195.1612
26,854
pythondev
help
e.g on needs lxml&gt;=1 and the other lxml&lt;=0.2
2019-06-05T14:16:49.161700
Catherina
pythondev_help_Catherina_2019-06-05T14:16:49.161700
1,559,744,209.1617
26,855
pythondev
help
How do you handle the conflict?
2019-06-05T14:17:05.162300
Catherina
pythondev_help_Catherina_2019-06-05T14:17:05.162300
1,559,744,225.1623
26,856
pythondev
help
if there are dependencies on anything besides the standard lib they are not simple scripts
2019-06-05T14:17:09.162400
Clemmie
pythondev_help_Clemmie_2019-06-05T14:17:09.162400
1,559,744,229.1624
26,857
pythondev
help
V I already answered your question
2019-06-05T14:17:10.162500
Jesusa
pythondev_help_Jesusa_2019-06-05T14:17:10.162500
1,559,744,230.1625
26,858
pythondev
help
None
2019-06-05T14:17:38.162800
Jesusa
pythondev_help_Jesusa_2019-06-05T14:17:38.162800
1,559,744,258.1628
26,859
pythondev
help
the answer is virtualenvironments and everyone will tell you the same thing
2019-06-05T14:18:09.163300
Jesusa
pythondev_help_Jesusa_2019-06-05T14:18:09.163300
1,559,744,289.1633
26,860
pythondev
help
if you need to insulate your users from the virtual environment stuff, then you need to provide these tool as a service, not “log onto the machine via ssh and run”
2019-06-05T14:18:47.164300
Clemmie
pythondev_help_Clemmie_2019-06-05T14:18:47.164300
1,559,744,327.1643
26,861
pythondev
help
no, his question is regarding devs working at his company
2019-06-05T14:19:25.165500
Jesusa
pythondev_help_Jesusa_2019-06-05T14:19:25.165500
1,559,744,365.1655
26,862
pythondev
help
it is not
2019-06-05T14:19:45.166400
Clemmie
pythondev_help_Clemmie_2019-06-05T14:19:45.166400
1,559,744,385.1664
26,863
pythondev
help
&gt;My intent is not that “complex” to be honest. We are not software developers, but network engineers trying to write scripts &gt;If we go the virtual environments route, how exactly would someone sshing into a box know to, for example, enable the virtual environment before using that particular script? &gt;also how do you automatically put it in the user’s path so he can just call the script without knowing the full path?
2019-06-05T14:20:01.166800
Clemmie
pythondev_help_Clemmie_2019-06-05T14:20:01.166800
1,559,744,401.1668
26,864
pythondev
help
it is.
2019-06-05T14:20:24.167900
Jesusa
pythondev_help_Jesusa_2019-06-05T14:20:24.167900
1,559,744,424.1679
26,865
pythondev
help
even though it is internal, these are for internal “users”
2019-06-05T14:20:25.168100
Clemmie
pythondev_help_Clemmie_2019-06-05T14:20:25.168100
1,559,744,425.1681
26,866
pythondev
help
devs / network engineers, doesn’t matter
2019-06-05T14:20:40.169000
Jesusa
pythondev_help_Jesusa_2019-06-05T14:20:40.169000
1,559,744,440.169
26,867
pythondev
help
who want to be insulated from the need to do anything besides `$ run_script`
2019-06-05T14:20:51.169600
Clemmie
pythondev_help_Clemmie_2019-06-05T14:20:51.169600
1,559,744,451.1696
26,868
pythondev
help
None
2019-06-05T14:21:01.170100
Jesusa
pythondev_help_Jesusa_2019-06-05T14:21:01.170100
1,559,744,461.1701
26,869
pythondev
help
I guarantee you there is no easier way of doing this
2019-06-05T14:21:22.171200
Jesusa
pythondev_help_Jesusa_2019-06-05T14:21:22.171200
1,559,744,482.1712
26,870
pythondev
help
that is a fine answer and I agree with that
2019-06-05T14:21:32.171900
Clemmie
pythondev_help_Clemmie_2019-06-05T14:21:32.171900
1,559,744,492.1719
26,871
pythondev
help
we have tooling where I work written completely in Python that installs via brew or apt that creates a virtual env, but doesn't require the user to have any idea that it uses virtual env or even Python
2019-06-05T14:21:55.172900
Romaine
pythondev_help_Romaine_2019-06-05T14:21:55.172900
1,559,744,515.1729
26,872
pythondev
help
just creating aliases or wrapper scripts to run the script with python within the virtual environment, put in $PATH would work too
2019-06-05T14:22:52.174700
Carlo
pythondev_help_Carlo_2019-06-05T14:22:52.174700
1,559,744,572.1747
26,873
pythondev
help
ultimately <@Catherina> you have your answer here, in many forms. None of it might be what you want to hear, but all correct and complete
2019-06-05T14:23:43.176700
Clemmie
pythondev_help_Clemmie_2019-06-05T14:23:43.176700
1,559,744,623.1767
26,874
pythondev
help
mind you, the tooling is also for network security at the hosting provider I work at, and the majority of the scripts its made of was written almost entirely by Network Security Engineers writing Python
2019-06-05T14:24:10.177500
Romaine
pythondev_help_Romaine_2019-06-05T14:24:10.177500
1,559,744,650.1775
26,875
pythondev
help
Agreed. my biggest sticking point on this whole thing is the requirement that Network Engineers not need to understand how to spin up and run a venv
2019-06-05T14:24:59.178700
Clemmie
pythondev_help_Clemmie_2019-06-05T14:24:59.178700
1,559,744,699.1787
26,876
pythondev
help
I would be hiring a new network team if that excuse was given
2019-06-05T14:25:35.180000
Clemmie
pythondev_help_Clemmie_2019-06-05T14:25:35.180000
1,559,744,735.18
26,877
pythondev
help
&gt; who want to be insulated from the need to do anything besides `$ run_script`
2019-06-05T14:25:38.180300
Catherina
pythondev_help_Catherina_2019-06-05T14:25:38.180300
1,559,744,738.1803
26,878
pythondev
help
network engineers should be able to handle that pretty easily
2019-06-05T14:25:43.180700
Ashley
pythondev_help_Ashley_2019-06-05T14:25:43.180700
1,559,744,743.1807
26,879
pythondev
help
essentially this ^
2019-06-05T14:25:43.180800
Catherina
pythondev_help_Catherina_2019-06-05T14:25:43.180800
1,559,744,743.1808
26,880
pythondev
help
yup! not every Network Engineer wants to learn code, but I am an incredible advocate for the ability to code to be a major part of a Network Engineers profile
2019-06-05T14:26:08.182000
Romaine
pythondev_help_Romaine_2019-06-05T14:26:08.182000
1,559,744,768.182
26,881
pythondev
help
<@Catherina> then you should make a service that they send requests to
2019-06-05T14:26:09.182100
Ashley
pythondev_help_Ashley_2019-06-05T14:26:09.182100
1,559,744,769.1821
26,882
pythondev
help
^ if they can’t be trusted to run python correctly
2019-06-05T14:26:28.183000
Clemmie
pythondev_help_Clemmie_2019-06-05T14:26:28.183000
1,559,744,788.183
26,883
pythondev
help
actually, network engineers still need to learn scripting and understand shell environments very well in order to do their job
2019-06-05T14:26:41.183500
Ashley
pythondev_help_Ashley_2019-06-05T14:26:41.183500
1,559,744,801.1835
26,884
pythondev
help
not always <@Ashley>
2019-06-05T14:26:56.183900
Romaine
pythondev_help_Romaine_2019-06-05T14:26:56.183900
1,559,744,816.1839
26,885
pythondev
help
Anyway I see what you guys mean. Now it’s just a matter of figuring out how to apply this. I’ve worked in Amazon where we had these boxes were all our tools would get deployed to, everything would be in your path once you ssh into the box.
2019-06-05T14:27:07.184600
Catherina
pythondev_help_Catherina_2019-06-05T14:27:07.184600
1,559,744,827.1846
26,886
pythondev
help
but the most successful Network Engineers should know code
2019-06-05T14:27:10.184800
Romaine
pythondev_help_Romaine_2019-06-05T14:27:10.184800
1,559,744,830.1848
26,887
pythondev
help
With no knowledge of virtual envs etc
2019-06-05T14:27:15.185000
Catherina
pythondev_help_Catherina_2019-06-05T14:27:15.185000
1,559,744,835.185
26,888
pythondev
help
just want to replicate that, but unsure how they set it up
2019-06-05T14:27:28.185600
Catherina
pythondev_help_Catherina_2019-06-05T14:27:28.185600
1,559,744,848.1856
26,889
pythondev
help
if they're newbies, I would not expect them to have that level of knowledge, but virtual environments literally just manipulate the $PATH variable, and if they didn't understand how that worked, that would raise several red flags
2019-06-05T14:28:08.186600
Ashley
pythondev_help_Ashley_2019-06-05T14:28:08.186600
1,559,744,888.1866
26,890
pythondev
help
they probably did exactly what I told you to do
2019-06-05T14:28:13.186800
Jesusa
pythondev_help_Jesusa_2019-06-05T14:28:13.186800
1,559,744,893.1868
26,891
pythondev
help
virtualenvs do not just manipulate $PATH
2019-06-05T14:28:27.187100
Jesusa
pythondev_help_Jesusa_2019-06-05T14:28:27.187100
1,559,744,907.1871
26,892
pythondev
help
there’s a ton of stuff going on
2019-06-05T14:28:39.187400
Jesusa
pythondev_help_Jesusa_2019-06-05T14:28:39.187400
1,559,744,919.1874
26,893
pythondev
help
kind of. they make a duplicate install of python, and then manipulate the $PATH to point to that install
2019-06-05T14:29:04.188200
Ashley
pythondev_help_Ashley_2019-06-05T14:29:04.188200
1,559,744,944.1882
26,894
pythondev
help
as a shorthand, yes that is what they do
2019-06-05T14:29:09.188400
Clemmie
pythondev_help_Clemmie_2019-06-05T14:29:09.188400
1,559,744,949.1884
26,895
pythondev
help
technically, it doesn't even have to be an install of python
2019-06-05T14:29:24.188800
Ashley
pythondev_help_Ashley_2019-06-05T14:29:24.188800
1,559,744,964.1888
26,896
pythondev
help
thanks <@Jesusa>
2019-06-05T14:29:45.189600
Catherina
pythondev_help_Catherina_2019-06-05T14:29:45.189600
1,559,744,985.1896
26,897
pythondev
help
and others
2019-06-05T14:29:47.189800
Catherina
pythondev_help_Catherina_2019-06-05T14:29:47.189800
1,559,744,987.1898
26,898
pythondev
help
I’ll try to figure out how to make this work in practice
2019-06-05T14:29:59.190200
Catherina
pythondev_help_Catherina_2019-06-05T14:29:59.190200
1,559,744,999.1902
26,899
pythondev
help
it's just an alternate bin, include, and lib folder
2019-06-05T14:30:03.190300
Ashley
pythondev_help_Ashley_2019-06-05T14:30:03.190300
1,559,745,003.1903
26,900
pythondev
help
symlinks, not copies
2019-06-05T14:30:23.190700
Jesusa
pythondev_help_Jesusa_2019-06-05T14:30:23.190700
1,559,745,023.1907
26,901
pythondev
help
nah, it's a copy
2019-06-05T14:31:01.191300
Ashley
pythondev_help_Ashley_2019-06-05T14:31:01.191300
1,559,745,061.1913
26,902
pythondev
help
I’ve never heard of it being a symlink
2019-06-05T14:31:09.191600
Clemmie
pythondev_help_Clemmie_2019-06-05T14:31:09.191600
1,559,745,069.1916
26,903
pythondev
help
it is a copy
2019-06-05T14:31:11.191800
Clemmie
pythondev_help_Clemmie_2019-06-05T14:31:11.191800
1,559,745,071.1918
26,904
pythondev
help
there's symlinks in there, but they just point back to the copy of python
2019-06-05T14:31:27.192400
Ashley
pythondev_help_Ashley_2019-06-05T14:31:27.192400
1,559,745,087.1924
26,905
pythondev
help
i.e.
2019-06-05T14:31:39.192700
Ashley
pythondev_help_Ashley_2019-06-05T14:31:39.192700
1,559,745,099.1927
26,906
pythondev
help
``` lrwxrwxrwx 1 nejame nejame 9 Mar 14 12:07 python -&gt; python3.7 lrwxrwxrwx 1 nejame nejame 9 Mar 14 12:07 python3 -&gt; python3.7 -rwxr-xr-x 1 nejame nejame 4857312 Mar 14 12:07 python3.7 ```
2019-06-05T14:31:44.192900
Ashley
pythondev_help_Ashley_2019-06-05T14:31:44.192900
1,559,745,104.1929
26,907
pythondev
help
we have CCIEs where I work that do not know code, and it makes me lose respect for them, even with the power that cert holds
2019-06-05T14:32:44.194100
Romaine
pythondev_help_Romaine_2019-06-05T14:32:44.194100
1,559,745,164.1941
26,908
pythondev
help
CCIE != coding
2019-06-05T14:33:38.195600
Catherina
pythondev_help_Catherina_2019-06-05T14:33:38.195600
1,559,745,218.1956
26,909
pythondev
help
at that point in a Network Engineers career, they should be talking about forward progress, and networks configured mostly by hand in any scope is a liability
2019-06-05T14:33:40.195700
Romaine
pythondev_help_Romaine_2019-06-05T14:33:40.195700
1,559,745,220.1957
26,910
pythondev
help
I am a CCIE but coding is different.
2019-06-05T14:33:56.196100
Catherina
pythondev_help_Catherina_2019-06-05T14:33:56.196100
1,559,745,236.1961
26,911
pythondev
help
that blows my mind
2019-06-05T14:34:35.197300
Ashley
pythondev_help_Ashley_2019-06-05T14:34:35.197300
1,559,745,275.1973
26,912
pythondev
help
<@Catherina> do you know how the `$PATH` variable works?
2019-06-05T14:34:46.197700
Ashley
pythondev_help_Ashley_2019-06-05T14:34:46.197700
1,559,745,286.1977
26,913
pythondev
help
I do.
2019-06-05T14:35:27.198400
Catherina
pythondev_help_Catherina_2019-06-05T14:35:27.198400
1,559,745,327.1984
26,914
pythondev
help
ok
2019-06-05T14:35:29.198700
Ashley
pythondev_help_Ashley_2019-06-05T14:35:29.198700
1,559,745,329.1987
26,915
pythondev
help
then you're fine
2019-06-05T14:35:36.199000
Ashley
pythondev_help_Ashley_2019-06-05T14:35:36.199000
1,559,745,336.199
26,916
pythondev
help
congrats on that, and I respect you immensely for that cert, but if you are not doing anything to further the future of Network Engineering, then all I can say is that you would be worth even more with more knowledge in Code/Automation
2019-06-05T14:35:38.199200
Romaine
pythondev_help_Romaine_2019-06-05T14:35:38.199200
1,559,745,338.1992
26,917
pythondev
help
I would be amazed if you didn't
2019-06-05T14:35:54.199800
Ashley
pythondev_help_Ashley_2019-06-05T14:35:54.199800
1,559,745,354.1998
26,918
pythondev
help
me too
2019-06-05T14:35:57.200000
Romaine
pythondev_help_Romaine_2019-06-05T14:35:57.200000
1,559,745,357.2
26,919
pythondev
help
None
2019-06-05T14:36:11.200700
Jesusa
pythondev_help_Jesusa_2019-06-05T14:36:11.200700
1,559,745,371.2007
26,920