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
Is `setup.py` preferred over `requirements.txt`? I guess setup.py is used for packaging/distributing/deploying the app but for "solo hack projects" requirements.txt is good enough?
2019-02-21T14:51:17.195300
Genaro
pythondev_help_Genaro_2019-02-21T14:51:17.195300
1,550,760,677.1953
9,921
pythondev
help
I believe `setup.py` is preferred
2019-02-21T14:55:34.195800
Ashley
pythondev_help_Ashley_2019-02-21T14:55:34.195800
1,550,760,934.1958
9,922
pythondev
help
<https://www.reddit.com/r/Python/comments/3uzl2a/setuppy_requirementstxt_or_a_combination/cxj4mdn/> is a good explanation of the differences.
2019-02-21T15:06:04.197200
Carmen
pythondev_help_Carmen_2019-02-21T15:06:04.197200
1,550,761,564.1972
9,923
pythondev
help
Basically, if you're expecting to `pip install` your project somewhere, and it has dependencies that also need to be installed, you want to put those dependencies in `setup.py`.
2019-02-21T15:06:36.198100
Carmen
pythondev_help_Carmen_2019-02-21T15:06:36.198100
1,550,761,596.1981
9,924
pythondev
help
If you're just listing out your dependencies for a project that people will fork and use, but not install via pip, general community expectations are `requirements.txt` as the de-facto standard for listing your dependencies.
2019-02-21T15:07:27.199300
Carmen
pythondev_help_Carmen_2019-02-21T15:07:27.199300
1,550,761,647.1993
9,925
pythondev
help
ahhhh, that makes perfect sense <@Carmen>! thank you! :pray:
2019-02-21T15:09:00.200600
Genaro
pythondev_help_Genaro_2019-02-21T15:09:00.200600
1,550,761,740.2006
9,926
pythondev
help
Hi, I am trying to `interp1d` from `scipy.interpolate` to fill NaNs on an array of numbers (oxygen concentration values over time) but from reading the documentation I am unsure how to do this. Can anyone help?
2019-02-21T15:12:23.202000
Ming
pythondev_help_Ming_2019-02-21T15:12:23.202000
1,550,761,943.202
9,927
pythondev
help
<@Sparkle> sorry for the delay, the expected outcome is that I have the word 'account_id' remaining with or without the colon
2019-02-21T15:15:02.202400
Granville
pythondev_help_Granville_2019-02-21T15:15:02.202400
1,550,762,102.2024
9,928
pythondev
help
<@Ming> maybe this helps: <http://physicalmodelingwithpython.blogspot.com/2015/06/interpolation.html>
2019-02-21T15:15:27.202800
Genaro
pythondev_help_Genaro_2019-02-21T15:15:27.202800
1,550,762,127.2028
9,929
pythondev
help
<@Deon> the list of HTML URI's have the ':' colons at different positions in the list so it's hard to use any specific markers to find them
2019-02-21T15:16:06.203100
Granville
pythondev_help_Granville_2019-02-21T15:16:06.203100
1,550,762,166.2031
9,930
pythondev
help
in the comments there's an example on how to do it for NaN
2019-02-21T15:16:43.203600
Genaro
pythondev_help_Genaro_2019-02-21T15:16:43.203600
1,550,762,203.2036
9,931
pythondev
help
oh that you can just use the regex: `:\b(\S+?)\b`
2019-02-21T15:17:00.203700
Sparkle
pythondev_help_Sparkle_2019-02-21T15:17:00.203700
1,550,762,220.2037
9,932
pythondev
help
Thanks! I will look into it :slightly_smiling_face:
2019-02-21T15:18:19.204100
Ming
pythondev_help_Ming_2019-02-21T15:18:19.204100
1,550,762,299.2041
9,933
pythondev
help
then it would be str.split('/')[-2].replace(':', '')
2019-02-21T15:20:37.204200
Deon
pythondev_help_Deon_2019-02-21T15:20:37.204200
1,550,762,437.2042
9,934
pythondev
help
or aurielle's way works ^
2019-02-21T15:20:44.204400
Deon
pythondev_help_Deon_2019-02-21T15:20:44.204400
1,550,762,444.2044
9,935
pythondev
help
I am trying this: y = np.array([float('nan'),2, float('nan'),4,float('nan'),5, float('nan'),float('nan'),11]) xnew = np.arange(len(y)) nan_idx = np.argwhere(np.isnan(y)) xold = np.delete(xnew,nan_idx) yold = np.delete(y, nan_idx) f = interp1d(xold,yold) ynew = f(xnew)
2019-02-21T17:23:05.205900
Ming
pythondev_help_Ming_2019-02-21T17:23:05.205900
1,550,769,785.2059
9,936
pythondev
help
And I get this error: ValueError: A value in x_new is below the interpolation range.
2019-02-21T17:23:39.206200
Ming
pythondev_help_Ming_2019-02-21T17:23:39.206200
1,550,769,819.2062
9,937
pythondev
help
I believe this is because the very 1st value is a nan. Anyone knows how can I get around this? My data has nans in the very beginning and I am happy to drop that part of the data.
2019-02-21T17:24:42.207400
Ming
pythondev_help_Ming_2019-02-21T17:24:42.207400
1,550,769,882.2074
9,938
pythondev
help
according to this SO article your solution may be with `fill_value='extrapolate' when initializing spi.interp1d`
2019-02-21T17:38:31.208500
Lawrence
pythondev_help_Lawrence_2019-02-21T17:38:31.208500
1,550,770,711.2085
9,939
pythondev
help
<https://stackoverflow.com/questions/45429831/valueerror-a-value-in-x-new-is-above-the-interpolation-range-what-other-re>
2019-02-21T17:38:37.208800
Lawrence
pythondev_help_Lawrence_2019-02-21T17:38:37.208800
1,550,770,717.2088
9,940
pythondev
help
perhaps ``` f = interp1d(xold,yold,fill_value="extrapolate")```
2019-02-21T17:39:47.209400
Lawrence
pythondev_help_Lawrence_2019-02-21T17:39:47.209400
1,550,770,787.2094
9,941
pythondev
help
Hey I am looking to create a static DNS entry in AD for a linux server with Python. Anyone know of a way to do this fairly easily?
2019-02-21T18:18:20.209700
Neomi
pythondev_help_Neomi_2019-02-21T18:18:20.209700
1,550,773,100.2097
9,942
pythondev
help
Thank you so much!! :smiley:
2019-02-21T18:35:43.209900
Ming
pythondev_help_Ming_2019-02-21T18:35:43.209900
1,550,774,143.2099
9,943
pythondev
help
I'm trying to print a csv file to terminal using pandas. The issue is that it only prints two of four columns like this: ```0 index ... time 1 1 ... 2019-02-20 11:38:56.800711 2 2 ... 2019-02-20 11:38:56.800711 3 3 ... 2019-02-20 11:38:56.800711``` This is my code: ```df = pd.read_csv('path/data.csv') print(df)```
2019-02-21T23:52:28.214200
Conchita
pythondev_help_Conchita_2019-02-21T23:52:28.214200
1,550,793,148.2142
9,944
pythondev
help
How can I print the missing column 2 and 3?
2019-02-21T23:53:11.215400
Conchita
pythondev_help_Conchita_2019-02-21T23:53:11.215400
1,550,793,191.2154
9,945
pythondev
help
What is the data in the missing columns?
2019-02-21T23:54:33.216200
Hiroko
pythondev_help_Hiroko_2019-02-21T23:54:33.216200
1,550,793,273.2162
9,946
pythondev
help
```index,company,powercut,time 1,lofotkraft,False,2019-02-20 11:38:56.800711 2,agderkraft,True,2019-02-20 11:38:56.800711 3,lyse,False,2019-02-20 11:38:56.800711```
2019-02-21T23:55:02.216800
Conchita
pythondev_help_Conchita_2019-02-21T23:55:02.216800
1,550,793,302.2168
9,947
pythondev
help
<@Neomi> you could probably just open a file in append mode, and add an entry that way. You can do `with open('path/to/somefile') as file:` then just do a `file.write = contents` where contents is equal to something like this: <https://www.linuxquestions.org/questions/linux-software-2/need-to-add-static-dns-record-223276/#post1148296>
2019-02-21T23:55:16.217000
Lilly
pythondev_help_Lilly_2019-02-21T23:55:16.217000
1,550,793,316.217
9,948
pythondev
help
<@Conchita> Maybe try `print(df.to_string())`? That function has a lot of extra options for what columns to output, etc.
2019-02-21T23:58:58.218000
Sasha
pythondev_help_Sasha_2019-02-21T23:58:58.218000
1,550,793,538.218
9,949
pythondev
help
<@Conchita> Perhaps this is what you're looking for? <https://stackoverflow.com/questions/25351968/how-to-display-full-non-truncated-dataframe-information-in-html-when-convertin>
2019-02-22T00:00:18.218400
Marth
pythondev_help_Marth_2019-02-22T00:00:18.218400
1,550,793,618.2184
9,950
pythondev
help
though now that I'm looking at that...it's talking more about html...hmmm...
2019-02-22T00:00:50.219000
Marth
pythondev_help_Marth_2019-02-22T00:00:50.219000
1,550,793,650.219
9,951
pythondev
help
might still work
2019-02-22T00:01:06.219300
Marth
pythondev_help_Marth_2019-02-22T00:01:06.219300
1,550,793,666.2193
9,952
pythondev
help
<@Sasha> that did the trick! Thank you
2019-02-22T00:01:18.219600
Conchita
pythondev_help_Conchita_2019-02-22T00:01:18.219600
1,550,793,678.2196
9,953
pythondev
help
Thanks for the link <@Marth>, I'll keep it open for my next pandas/csv issue in 3..2.. :slightly_smiling_face:
2019-02-22T00:02:15.220400
Conchita
pythondev_help_Conchita_2019-02-22T00:02:15.220400
1,550,793,735.2204
9,954
pythondev
help
ha! yeah...I've been playing with pandas a lot recently (still learning) but I was also curious about the truncated values
2019-02-22T00:03:34.221200
Marth
pythondev_help_Marth_2019-02-22T00:03:34.221200
1,550,793,814.2212
9,955
pythondev
help
i have a csv object that i loop through, each row with in the csv reader object is a list - what's the best way to convert that row object to a string? I basically have something like this: ``` for m_row in msft_data: m_symbol = 'MSFT' m_row.insert(0,m_symbol) line = str(m_row) print(type(line)) print(line) ``` output: ``` &lt;class 'str'&gt; ['MSFT', '2019-01-31 11:40:00', '103.9300', '104.1900', '103.9150', '104.1700', '444704'] ``` Guess I"m not sure why it's still contained within [ ] brackets like a list?
2019-02-22T00:35:17.223900
Stacy
pythondev_help_Stacy_2019-02-22T00:35:17.223900
1,550,795,717.2239
9,956
pythondev
help
It's because you're asking for the string form of a list object. If you just want the values as a comma-separated string, you'd use something like `','.join(str(x) for x in m_row)`.
2019-02-22T00:37:53.225300
Sasha
pythondev_help_Sasha_2019-02-22T00:37:53.225300
1,550,795,873.2253
9,957
pythondev
help
Or even `','.join(m_row)` since it looks like your numbers are strings to start with.
2019-02-22T00:38:33.225800
Sasha
pythondev_help_Sasha_2019-02-22T00:38:33.225800
1,550,795,913.2258
9,958
pythondev
help
great. Thank you <@Sasha> ! I was close earlier but had something like `s =",".join(str(m_row))` and it was joining each character of the list separated by a comma instead. ``` for m_row in msft_data: m_symbol = 'MSFT' m_row.insert(0,m_symbol) s = ",".join(m_row) print(s) ``` now getting output like this: `MSFT,2019-01-31 09:35:00,103.9200,104.4800,103.5800,104.4300,4252406` Just need to go through and appropriately quote the strings within the line.
2019-02-22T00:50:40.228100
Stacy
pythondev_help_Stacy_2019-02-22T00:50:40.228100
1,550,796,640.2281
9,959
pythondev
help
Cool. Yell if you run into trouble with that part.
2019-02-22T00:57:01.228800
Sasha
pythondev_help_Sasha_2019-02-22T00:57:01.228800
1,550,797,021.2288
9,960
pythondev
help
i did get the symbol quoted easily enough because i'm adding that part in as part of the process. i think the only other part is the date/time stamp which may a bit trickier ``` for m_row in msft_data: m_symbol = '"MSFT"' m_row.insert(0,m_symbol) s = ",".join(m_row) print(s) ``` `"MSFT",2019-01-31 09:35:00,103.9200,104.4800,103.5800,104.4300,4252406`
2019-02-22T00:58:22.229800
Stacy
pythondev_help_Stacy_2019-02-22T00:58:22.229800
1,550,797,102.2298
9,961
pythondev
help
i think i just need to disassemble the line with slicing and piece it back together
2019-02-22T00:59:58.230300
Stacy
pythondev_help_Stacy_2019-02-22T00:59:58.230300
1,550,797,198.2303
9,962
pythondev
help
Can you clarify what rule you would like to use for quoting values? If you can specify what type of thing should be quoted or not, you can filter on that characteristic in code.
2019-02-22T01:01:57.231300
Sasha
pythondev_help_Sasha_2019-02-22T01:01:57.231300
1,550,797,317.2313
9,963
pythondev
help
i think i just want the lines to look like this: `"MSFT","2019-01-31 09:35:00",103.9200,104.4800,103.5800,104.4300,4252406`
2019-02-22T01:04:09.231900
Stacy
pythondev_help_Stacy_2019-02-22T01:04:09.231900
1,550,797,449.2319
9,964
pythondev
help
so the symbol and date/timestamp being strings, the rest are integer/floats.
2019-02-22T01:04:31.232400
Stacy
pythondev_help_Stacy_2019-02-22T01:04:31.232400
1,550,797,471.2324
9,965
pythondev
help
so can probably do something with m_row[0] or m_row[1] (after adding the symbol) and quote that
2019-02-22T01:05:52.233500
Stacy
pythondev_help_Stacy_2019-02-22T01:05:52.233500
1,550,797,552.2335
9,966
pythondev
help
before converting to a string
2019-02-22T01:06:04.233700
Stacy
pythondev_help_Stacy_2019-02-22T01:06:04.233700
1,550,797,564.2337
9,967
pythondev
help
got it. now i can go to bed. thanks again <@Sasha>! ``` for m_row in msft_data: m_symbol = '"MSFT"' m_row[0] = '"{}"'.format(m_row[0]) m_row.insert(0,m_symbol) s = ",".join(m_row) print(s) ``` `"MSFT","2019-01-31 09:35:00",103.9200,104.4800,103.5800,104.4300,4252406`
2019-02-22T01:12:27.234400
Stacy
pythondev_help_Stacy_2019-02-22T01:12:27.234400
1,550,797,947.2344
9,968
pythondev
help
<https://stackoverflow.com/questions/54706728/git-keep-commits-done-by-a-specific-author>
2019-02-22T01:16:30.234900
Valeri
pythondev_help_Valeri_2019-02-22T01:16:30.234900
1,550,798,190.2349
9,969
pythondev
help
I'm still looking for an answer to this.
2019-02-22T01:16:50.235500
Valeri
pythondev_help_Valeri_2019-02-22T01:16:50.235500
1,550,798,210.2355
9,970
pythondev
help
Feel free to share it with me if anybody knows/has done something similar
2019-02-22T01:17:32.236400
Valeri
pythondev_help_Valeri_2019-02-22T01:17:32.236400
1,550,798,252.2364
9,971
pythondev
help
not sure if this accomplishes what you want or not: <https://github.com/git/git/blob/master/Documentation/howto/revert-a-faulty-merge.txt>
2019-02-22T01:24:26.237000
Stacy
pythondev_help_Stacy_2019-02-22T01:24:26.237000
1,550,798,666.237
9,972
pythondev
help
ah, no ideas as far as a username specific solution though, sounds like other work arounds had been suggested.
2019-02-22T01:32:15.237900
Stacy
pythondev_help_Stacy_2019-02-22T01:32:15.237900
1,550,799,135.2379
9,973
pythondev
help
I'm trying to see if a string exists in a dataframe and return its row index. This code does so successfully, but in this format where the row index is `2`: `Int64Index([2], dtype='int64')` Is it possible to clean the output to only `2` instead of the datatype stuff?
2019-02-22T02:12:00.238000
Conchita
pythondev_help_Conchita_2019-02-22T02:12:00.238000
1,550,801,520.238
9,974
pythondev
help
It looks like it's an array type containing only one element. Does `y[0]` work?
2019-02-22T02:15:30.238900
Sasha
pythondev_help_Sasha_2019-02-22T02:15:30.238900
1,550,801,730.2389
9,975
pythondev
help
Thanks! Here's a :taco: <@Sasha>
2019-02-22T02:17:09.239400
Conchita
pythondev_help_Conchita_2019-02-22T02:17:09.239400
1,550,801,829.2394
9,976
pythondev
help
<@Stacy> Thanks but that's not what I'm looking for
2019-02-22T02:22:33.240100
Valeri
pythondev_help_Valeri_2019-02-22T02:22:33.240100
1,550,802,153.2401
9,977
pythondev
help
Hello everyone, would like to ask a noob question. I am using UTC in `TIME_ZONE`, and `USE_TZ = False`.
2019-02-22T05:06:30.243300
Hassie
pythondev_help_Hassie_2019-02-22T05:06:30.243300
1,550,811,990.2433
9,978
pythondev
help
when I insert a `timezone.now()` in DB it stored as a local time in DB, but it keep showing UTC time in template.
2019-02-22T05:07:19.244300
Hassie
pythondev_help_Hassie_2019-02-22T05:07:19.244300
1,550,812,039.2443
9,979
pythondev
help
I am using django 1.11 by the way
2019-02-22T05:07:32.244800
Hassie
pythondev_help_Hassie_2019-02-22T05:07:32.244800
1,550,812,052.2448
9,980
pythondev
help
can someone lighten me up, please?
2019-02-22T05:07:49.245300
Hassie
pythondev_help_Hassie_2019-02-22T05:07:49.245300
1,550,812,069.2453
9,981
pythondev
help
<@Hassie> time zones are hard
2019-02-22T06:11:07.247000
Jewell
pythondev_help_Jewell_2019-02-22T06:11:07.247000
1,550,815,867.247
9,982
pythondev
help
It sounds like it is displaying in UTC because you've turned off timezone offsets in the db
2019-02-22T06:11:41.247400
Jewell
pythondev_help_Jewell_2019-02-22T06:11:41.247400
1,550,815,901.2474
9,983
pythondev
help
I'd like to try, how would I fix it? I am using postgresql and pgadmin4
2019-02-22T06:13:22.248800
Hassie
pythondev_help_Hassie_2019-02-22T06:13:22.248800
1,550,816,002.2488
9,984
pythondev
help
how are you managing your database? Are you making manual changes, or using migrations?
2019-02-22T06:14:53.249300
Jewell
pythondev_help_Jewell_2019-02-22T06:14:53.249300
1,550,816,093.2493
9,985
pythondev
help
migration
2019-02-22T06:15:08.249600
Hassie
pythondev_help_Hassie_2019-02-22T06:15:08.249600
1,550,816,108.2496
9,986
pythondev
help
Then a migration allowing the time zone offset should be what you need to fix the db
2019-02-22T06:16:19.250400
Jewell
pythondev_help_Jewell_2019-02-22T06:16:19.250400
1,550,816,179.2504
9,987
pythondev
help
Once that's done, you have to look for the appropriate time zone to use
2019-02-22T06:16:31.250700
Jewell
pythondev_help_Jewell_2019-02-22T06:16:31.250700
1,550,816,191.2507
9,988
pythondev
help
one second...I saved a link a few days ago
2019-02-22T06:16:37.251000
Jewell
pythondev_help_Jewell_2019-02-22T06:16:37.251000
1,550,816,197.251
9,989
pythondev
help
ugh I can't find it. I may have written it as a comment
2019-02-22T06:17:36.251300
Jewell
pythondev_help_Jewell_2019-02-22T06:17:36.251300
1,550,816,256.2513
9,990
pythondev
help
<https://ypoonawala.wordpress.com/2016/09/25/working-with-time-zones-in-python/>
2019-02-22T06:17:41.251500
Jewell
pythondev_help_Jewell_2019-02-22T06:17:41.251500
1,550,816,261.2515
9,991
pythondev
help
Thank you, I'll have a look and give another try :smiley:
2019-02-22T06:20:19.253100
Hassie
pythondev_help_Hassie_2019-02-22T06:20:19.253100
1,550,816,419.2531
9,992
pythondev
help
The high level approach is to look up your local time zone (i.e. `America/New_York`) and pass it to the time zone methods in python
2019-02-22T06:20:51.253500
Jewell
pythondev_help_Jewell_2019-02-22T06:20:51.253500
1,550,816,451.2535
9,993
pythondev
help
<https://gist.github.com/heyalexej/8bf688fd67d7199be4a1682b3eec7568>
2019-02-22T06:20:56.253700
Jewell
pythondev_help_Jewell_2019-02-22T06:20:56.253700
1,550,816,456.2537
9,994
pythondev
help
<https://stackoverflow.com/questions/1398674/display-the-time-in-a-different-time-zone>
2019-02-22T06:21:21.253900
Jewell
pythondev_help_Jewell_2019-02-22T06:21:21.253900
1,550,816,481.2539
9,995
pythondev
help
Huge thanks.. :star-struck:
2019-02-22T06:22:15.254600
Hassie
pythondev_help_Hassie_2019-02-22T06:22:15.254600
1,550,816,535.2546
9,996
pythondev
help
glad to help
2019-02-22T06:22:20.254800
Jewell
pythondev_help_Jewell_2019-02-22T06:22:20.254800
1,550,816,540.2548
9,997
pythondev
help
ah... I'd be a bit careful about some of the advice at those links - things like "Keep your local machine in the timezone of your server for local testing" seem like a recipe for disaster.
2019-02-22T06:26:30.255200
Karoline
pythondev_help_Karoline_2019-02-22T06:26:30.255200
1,550,816,790.2552
9,998
pythondev
help
keep everything in UTC, and only covert to local time as a presentation detail.
2019-02-22T06:26:42.255500
Karoline
pythondev_help_Karoline_2019-02-22T06:26:42.255500
1,550,816,802.2555
9,999
pythondev
help
Also the "keep things in a consistent format" seems dangerous too. We have ISO 8601, use that, or a epoch timestamp.
2019-02-22T06:27:44.256800
Karoline
pythondev_help_Karoline_2019-02-22T06:27:44.256800
1,550,816,864.2568
10,000
pythondev
help
There's no need for ad-hoc time formats
2019-02-22T06:28:00.257300
Karoline
pythondev_help_Karoline_2019-02-22T06:28:00.257300
1,550,816,880.2573
10,001
pythondev
help
Thanks <@Karoline>. Now I am trying to store with UTC, seems like problem is also related to DB, gonna need to spend a couple of hours.
2019-02-22T06:28:42.258100
Hassie
pythondev_help_Hassie_2019-02-22T06:28:42.258100
1,550,816,922.2581
10,002
pythondev
help
your existing data may be in some local time format, yeah - I'd go ahead and convert it if you don't have too much data/this isn't released yet
2019-02-22T06:29:18.258700
Karoline
pythondev_help_Karoline_2019-02-22T06:29:18.258700
1,550,816,958.2587
10,003
pythondev
help
but yeah I liken time very much to dealing with unicode in python 2 - encode/decode to/from a unicode object at the edges of your application and deal internally always with the standard unicode object.
2019-02-22T06:30:02.259600
Karoline
pythondev_help_Karoline_2019-02-22T06:30:02.259600
1,550,817,002.2596
10,004
pythondev
help
having these boundaries helps simplify everything else.
2019-02-22T06:30:10.259900
Karoline
pythondev_help_Karoline_2019-02-22T06:30:10.259900
1,550,817,010.2599
10,005
pythondev
help
We have a <#CEH13CZGS|git> channel, FYI
2019-02-22T06:33:22.260800
Hiroko
pythondev_help_Hiroko_2019-02-22T06:33:22.260800
1,550,817,202.2608
10,006
pythondev
help
Thanks
2019-02-22T07:07:33.261400
Valeri
pythondev_help_Valeri_2019-02-22T07:07:33.261400
1,550,819,253.2614
10,007
pythondev
help
please tell me how to run python script automatically for every 1 min
2019-02-22T09:03:20.265300
Viviana
pythondev_help_Viviana_2019-02-22T09:03:20.265300
1,550,826,200.2653
10,008
pythondev
help
The easiest way is to set up a `cron` job for it <@Viviana>
2019-02-22T09:08:21.266000
Clemmie
pythondev_help_Clemmie_2019-02-22T09:08:21.266000
1,550,826,501.266
10,009
pythondev
help
<@Viviana> <https://www.google.com/search?client=firefox-b-d&amp;q=run++python+script+automatically+for+every+1+min>
2019-02-22T09:39:11.267700
Jonas
pythondev_help_Jonas_2019-02-22T09:39:11.267700
1,550,828,351.2677
10,010
pythondev
help
definitly `cron` if the smallest increment is 1 minute or more, `sched` or `apscheduler` modules are good if you need smaller increments. I was just researching that the other day
2019-02-22T09:45:26.268900
Claudine
pythondev_help_Claudine_2019-02-22T09:45:26.268900
1,550,828,726.2689
10,011
pythondev
help
`sched` is quick and dirty, `apscheduler` is powerful but a little more complex to implement
2019-02-22T09:45:53.269400
Claudine
pythondev_help_Claudine_2019-02-22T09:45:53.269400
1,550,828,753.2694
10,012
pythondev
help
Hey, Anyone with experience using `firwin` can help me understand the `numtaps` parameter? <https://docs.scipy.org/doc/scipy-0.15.1/reference/generated/scipy.signal.firwin.html>
2019-02-22T10:01:27.274400
Ming
pythondev_help_Ming_2019-02-22T10:01:27.274400
1,550,829,687.2744
10,013
pythondev
help
Im using SQLalchemy, i was wondering if it is possible to constrain a pair of columns to be unique. We can do, ``` class SingleConstraintTable(db.Model): id = db.Column(db.Integer(), primary_key=True) foo = db.Column(db.Integer(), unique=True) bar = db.Column(db.Integer(), unique=True) # This works great ``` However Im looking for the combination of `foo` and `bar` to be unique. So that, ``` id foo bar 1 2 3 # 1st entry allowed 2 2 2 # 2nd entry allowed 3 2 3 # not allowed as id1 has the combination ```
2019-02-22T10:06:32.274900
Ted
pythondev_help_Ted_2019-02-22T10:06:32.274900
1,550,829,992.2749
10,014
pythondev
help
<https://docs.sqlalchemy.org/en/latest/core/constraints.html#unique-constraint>
2019-02-22T10:08:20.275800
Hiroko
pythondev_help_Hiroko_2019-02-22T10:08:20.275800
1,550,830,100.2758
10,015
pythondev
help
``` # explicit/composite unique constraint. 'name' is optional. UniqueConstraint('col2', 'col3', name='uix_1')```
2019-02-22T10:08:32.276200
Hiroko
pythondev_help_Hiroko_2019-02-22T10:08:32.276200
1,550,830,112.2762
10,016
pythondev
help
I am trying to install scrapy and Twisted as part of a requirements.txt file, and am getting `error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": <https://visualstudio.microsoft.com/downloads/>` even though I have build tools installed. This is one of those things I have run into before, but few and far enough in between to forget how I resolved it the last time...
2019-02-22T10:09:32.277200
Pilar
pythondev_help_Pilar_2019-02-22T10:09:32.277200
1,550,830,172.2772
10,017
pythondev
help
do you have the appropriate version?
2019-02-22T10:10:16.277500
Hiroko
pythondev_help_Hiroko_2019-02-22T10:10:16.277500
1,550,830,216.2775
10,018
pythondev
help
been a while since I’ve done anything python and windows, and got burned enough to not really want to try again
2019-02-22T10:10:36.278000
Hiroko
pythondev_help_Hiroko_2019-02-22T10:10:36.278000
1,550,830,236.278
10,019
pythondev
help
Yeah, only doing so now out of necessity. I'm an Ubuntu guy but my work machine is Windows 10. I have tried the 14.0 version specifically as well as the latest download
2019-02-22T10:11:51.279700
Pilar
pythondev_help_Pilar_2019-02-22T10:11:51.279700
1,550,830,311.2797
10,020