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
I’m sure. What the script does is it iterates through a folder of PDFs, printing each one out, and deleting it, and there was 1 PDF there lastnight, and it was still there now, this morning, and when I run the script manually it works correctly
2019-02-23T12:30:04.359300
Kristine
pythondev_help_Kristine_2019-02-23T12:30:04.359300
1,550,925,004.3593
10,121
pythondev
help
and it’s whatever “crontab -e” is, I admit I don’t actually know, I presume my user crontab. But like I said, I have a bunch of other entries there that are working.
2019-02-23T12:30:43.360000
Kristine
pythondev_help_Kristine_2019-02-23T12:30:43.360000
1,550,925,043.36
10,122
pythondev
help
That is your user crontab.
2019-02-23T12:30:54.360200
Carmen
pythondev_help_Carmen_2019-02-23T12:30:54.360200
1,550,925,054.3602
10,123
pythondev
help
Cool
2019-02-23T12:31:27.360500
Kristine
pythondev_help_Kristine_2019-02-23T12:31:27.360500
1,550,925,087.3605
10,124
pythondev
help
Do you have access to the system crontab log?
2019-02-23T12:31:31.360700
Carmen
pythondev_help_Carmen_2019-02-23T12:31:31.360700
1,550,925,091.3607
10,125
pythondev
help
Normally you need to have root access for that.
2019-02-23T12:31:49.361300
Carmen
pythondev_help_Carmen_2019-02-23T12:31:49.361300
1,550,925,109.3613
10,126
pythondev
help
Yeah, this is completely my own system that I administer.
2019-02-23T12:31:52.361400
Kristine
pythondev_help_Kristine_2019-02-23T12:31:52.361400
1,550,925,112.3614
10,127
pythondev
help
It’s Ubuntu Server 18
2019-02-23T12:32:03.361800
Kristine
pythondev_help_Kristine_2019-02-23T12:32:03.361800
1,550,925,123.3618
10,128
pythondev
help
LTS
2019-02-23T12:32:05.362000
Kristine
pythondev_help_Kristine_2019-02-23T12:32:05.362000
1,550,925,125.362
10,129
pythondev
help
I'd take a look in there to see what errors it might be encountering.
2019-02-23T12:32:21.362400
Carmen
pythondev_help_Carmen_2019-02-23T12:32:21.362400
1,550,925,141.3624
10,130
pythondev
help
My first assumption is that there's a path issue coming up for some reason.
2019-02-23T12:32:34.362700
Carmen
pythondev_help_Carmen_2019-02-23T12:32:34.362700
1,550,925,154.3627
10,131
pythondev
help
You should also add some stderr redirection into a logfile to your entry, so you can more easily see when it encounters an error of some kind.
2019-02-23T12:33:13.363500
Carmen
pythondev_help_Carmen_2019-02-23T12:33:13.363500
1,550,925,193.3635
10,132
pythondev
help
And if you're doing that, stdout redirection is a good idea as well. `0 0 * * * /usr/bin/python3 /home/fileserver/printletters.py > printletters-output.log 2>printletters-errors.log`
2019-02-23T12:34:43.364300
Carmen
pythondev_help_Carmen_2019-02-23T12:34:43.364300
1,550,925,283.3643
10,133
pythondev
help
And lastly, I'd set up a temporary crontab entry that runs it 2 minutes in the future, so you can get immediate feedback on what's happening.
2019-02-23T12:35:29.365400
Carmen
pythondev_help_Carmen_2019-02-23T12:35:29.365400
1,550,925,329.3654
10,134
pythondev
help
Okay I’m not sure how this is possible… The last few entries in syslog are showing `Feb 23 17:33:XX` but date shows `Sat Feb 23 09:34:39 PST 2019`
2019-02-23T12:35:46.365700
Kristine
pythondev_help_Kristine_2019-02-23T12:35:46.365700
1,550,925,346.3657
10,135
pythondev
help
Does syslog go by GMT or something?
2019-02-23T12:36:02.366200
Kristine
pythondev_help_Kristine_2019-02-23T12:36:02.366200
1,550,925,362.3662
10,136
pythondev
help
Syslog is probably using UTC for some reason.
2019-02-23T12:36:09.366400
Carmen
pythondev_help_Carmen_2019-02-23T12:36:09.366400
1,550,925,369.3664
10,137
pythondev
help
aah
2019-02-23T12:36:12.366600
Kristine
pythondev_help_Kristine_2019-02-23T12:36:12.366600
1,550,925,372.3666
10,138
pythondev
help
also I did try adding a log output lastnight to my crontab entry, I just omitted it a moment ago, and the log was empty
2019-02-23T12:36:55.367600
Kristine
pythondev_help_Kristine_2019-02-23T12:36:55.367600
1,550,925,415.3676
10,139
pythondev
help
Did you log stderr, or just stdout?
2019-02-23T12:37:09.367900
Carmen
pythondev_help_Carmen_2019-02-23T12:37:09.367900
1,550,925,429.3679
10,140
pythondev
help
Oh I just noticed a typo I made on it
2019-02-23T12:37:34.368200
Kristine
pythondev_help_Kristine_2019-02-23T12:37:34.368200
1,550,925,454.3682
10,141
pythondev
help
I meant to do `2>&1` but I have `2&1`
2019-02-23T12:37:51.368600
Kristine
pythondev_help_Kristine_2019-02-23T12:37:51.368600
1,550,925,471.3686
10,142
pythondev
help
The other fun one I often encounter is `2>1`.
2019-02-23T12:38:27.369100
Carmen
pythondev_help_Carmen_2019-02-23T12:38:27.369100
1,550,925,507.3691
10,143
pythondev
help
heh
2019-02-23T12:38:32.369400
Kristine
pythondev_help_Kristine_2019-02-23T12:38:32.369400
1,550,925,512.3694
10,144
pythondev
help
Then you get to look for the file `1`.
2019-02-23T12:38:39.369700
Carmen
pythondev_help_Carmen_2019-02-23T12:38:39.369700
1,550,925,519.3697
10,145
pythondev
help
`0 0 * * * /usr/bin/python3 /home/fileserver/printletters.py >> /home/fileserver/printscript.log 2>&1` <Hopefully that extra > will let it run.
2019-02-23T12:39:25.370100
Kristine
pythondev_help_Kristine_2019-02-23T12:39:25.370100
1,550,925,565.3701
10,146
pythondev
help
:+1:
2019-02-23T12:41:31.370400
Carmen
pythondev_help_Carmen_2019-02-23T12:41:31.370400
1,550,925,691.3704
10,147
pythondev
help
If not, you’ll see me back here tomorrow :stuck_out_tongue:
2019-02-23T12:43:04.370700
Kristine
pythondev_help_Kristine_2019-02-23T12:43:04.370700
1,550,925,784.3707
10,148
pythondev
help
Hey, quick question, I understand placeholders for numbers in a string I would use %d, for a string %s, but what would I use for a potential null value placeholder? My string is a SQL statement where a field could be null in some instances. “insert statement example values(%d, %s, %d, null)”
2019-02-23T14:41:35.373000
Rosie
pythondev_help_Rosie_2019-02-23T14:41:35.373000
1,550,932,895.373
10,149
pythondev
help
Can anyone please help me, how to fix this
2019-02-23T14:47:33.373100
Leonor
pythondev_help_Leonor_2019-02-23T14:47:33.373100
1,550,933,253.3731
10,150
pythondev
help
never mind. one condition was not handled properly. @b.setter def b(self, b): if b is None: self.__b = ‘Im None’ elif b > 100: self.__b = ‘APL’ elif b < -1: self.__b = ‘BPL’ else: self.__b = b
2019-02-23T14:58:21.373400
Leonor
pythondev_help_Leonor_2019-02-23T14:58:21.373400
1,550,933,901.3734
10,151
pythondev
help
<@Rosie> use `.format` instead, like this `"insert statement example values({}, '{}', {}, {})".format(a, b, c, d or "null")`
2019-02-23T15:47:06.374300
Ashley
pythondev_help_Ashley_2019-02-23T15:47:06.374300
1,550,936,826.3743
10,152
pythondev
help
Anyone here working with pyMongo? Trying to iterate over a large MongoDB collection in batches with the find_raw_batches() method, but it looks like it still pulls the full collection in memory and creates an iterator with the batch sizes. This makes my memory usage explode. Would be great to figure out a way to actually only pull in one batch at a time, handle the batch, lose the batch out of memory and then go back to the server for a new batch :thinking_face: You can find the documentation here: <http://api.mongodb.com/python/current/api/pymongo/collection.html#pymongo.collection.Collection.find_raw_batches>. If we take this code, the count_documents already output all documents (more than the set batch_size), which tells me everything is already in memory before the loop. Any ideas? ``` &gt;&gt;&gt; import bson &gt;&gt;&gt; cursor = db.test.find_raw_batches() &gt;&gt;&gt; print(cursor.count_documents) &gt;&gt;&gt; for batch in cursor: ... print(bson.decode_all(batch)) ```
2019-02-23T15:50:28.374700
Dawn
pythondev_help_Dawn_2019-02-23T15:50:28.374700
1,550,937,028.3747
10,153
pythondev
help
maybe it functions like a generator, and by printing `cursor.count_documents`, you're forcing it to resolve and load everything into memory?
2019-02-23T16:01:44.375700
Ashley
pythondev_help_Ashley_2019-02-23T16:01:44.375700
1,550,937,704.3757
10,154
pythondev
help
I'm not familiar with mongodb, but that's just my guess
2019-02-23T16:02:09.376200
Ashley
pythondev_help_Ashley_2019-02-23T16:02:09.376200
1,550,937,729.3762
10,155
pythondev
help
Hm that's possible. But how would you check that :stuck_out_tongue:
2019-02-23T16:06:10.376600
Dawn
pythondev_help_Dawn_2019-02-23T16:06:10.376600
1,550,937,970.3766
10,156
pythondev
help
by not printing it and monitoring your memory usage
2019-02-23T16:07:07.377600
Ashley
pythondev_help_Ashley_2019-02-23T16:07:07.377600
1,550,938,027.3776
10,157
pythondev
help
Although if i count the documents in the for loop, the batches have the set batch size. I'm just wondering if everything is already in memory at that point
2019-02-23T16:07:14.377900
Dawn
pythondev_help_Dawn_2019-02-23T16:07:14.377900
1,550,938,034.3779
10,158
pythondev
help
maybe put a break point in so you can slow it down and give yourself time to check
2019-02-23T16:07:26.378200
Ashley
pythondev_help_Ashley_2019-02-23T16:07:26.378200
1,550,938,046.3782
10,159
pythondev
help
¯\_(ツ)_/¯
2019-02-23T16:07:48.378300
Ashley
pythondev_help_Ashley_2019-02-23T16:07:48.378300
1,550,938,068.3783
10,160
pythondev
help
Well the generator reasoning makes sense. I'll try to monitor my memory
2019-02-23T16:08:45.378900
Dawn
pythondev_help_Dawn_2019-02-23T16:08:45.378900
1,550,938,125.3789
10,161
pythondev
help
Thanks!
2019-02-23T16:08:48.379100
Dawn
pythondev_help_Dawn_2019-02-23T16:08:48.379100
1,550,938,128.3791
10,162
pythondev
help
np!
2019-02-23T16:09:08.379300
Ashley
pythondev_help_Ashley_2019-02-23T16:09:08.379300
1,550,938,148.3793
10,163
pythondev
help
Hi. I'm experiencing a strange issue with imports. I have two packages: `raven` and `youtube_dl` and I want to import both of them ```In [1]: import youtube_dl In [2]: ``` works fine, but ```In [1]: import raven In [2]: import youtube_dl ``` is throwing `TypeError: Struct() argument 1 must be string, not unicode` exception. It might be related to the fact that I'm using Python 2.7.5 (can't upgrade at the moment), but it works for me locally with Python 2.7.15. Do you have any ideas how to debug this?
2019-02-23T16:38:12.382100
Rosina
pythondev_help_Rosina_2019-02-23T16:38:12.382100
1,550,939,892.3821
10,164
pythondev
help
can you show the full stack trace?
2019-02-23T16:47:56.382600
Ashley
pythondev_help_Ashley_2019-02-23T16:47:56.382600
1,550,940,476.3826
10,165
pythondev
help
and have you tried importing them in the opposite order?
2019-02-23T16:48:19.382900
Ashley
pythondev_help_Ashley_2019-02-23T16:48:19.382900
1,550,940,499.3829
10,166
pythondev
help
thanks very much!
2019-02-23T16:58:55.383000
Rosie
pythondev_help_Rosie_2019-02-23T16:58:55.383000
1,550,941,135.383
10,167
pythondev
help
Yes, import in the opposite order works fine. Here's the stacktrace ```TypeError Traceback (most recent call last) &lt;ipython-input-2-be68cadeacc2&gt; in &lt;module&gt;() ----&gt; 1 import youtube_dl .../env/lib/python2.7/site-packages/youtube_dl/__init__.py in &lt;module&gt;() 13 14 ---&gt; 15 from .options import ( 16 parseOpts, 17 ) .../env/lib/python2.7/site-packages/youtube_dl/options.py in &lt;module&gt;() 6 import sys 7 ----&gt; 8 from .downloader.external import list_external_downloaders 9 from .compat import ( 10 compat_expanduser, .../env/lib/python2.7/site-packages/youtube_dl/downloader/__init__.py in &lt;module&gt;() 1 from __future__ import unicode_literals 2 ----&gt; 3 from .common import FileDownloader 4 from .f4m import F4mFD 5 from .hls import HlsFD .../env/lib/python2.7/site-packages/youtube_dl/downloader/common.py in &lt;module&gt;() 8 9 from ..compat import compat_os_name ---&gt; 10 from ..utils import ( 11 decodeArgument, 12 encodeFilename, .../env/lib/python2.7/site-packages/youtube_dl/utils.py in &lt;module&gt;() 64 ) 65 ---&gt; 66 from .socks import ( 67 ProxyType, 68 sockssocket, .../env/lib/python2.7/site-packages/youtube_dl/socks.py in &lt;module&gt;() 27 # IP address, it should set the first three bytes of DSTIP to NULL and the last 28 # byte to a non-zero value. ---&gt; 29 SOCKS4_DEFAULT_DSTIP = compat_struct_pack('!BBBB', 0, 0, 0, 0xFF) 30 31 SOCKS5_VERSION = 5 TypeError: Struct() argument 1 must be string, not unicode ```
2019-02-23T17:28:54.383900
Rosina
pythondev_help_Rosina_2019-02-23T17:28:54.383900
1,550,942,934.3839
10,168
pythondev
help
<@Ashley>
2019-02-23T17:29:09.384100
Rosina
pythondev_help_Rosina_2019-02-23T17:29:09.384100
1,550,942,949.3841
10,169
pythondev
help
That `from __future__ import unicode literals` line looks pretty suspicious.
2019-02-23T17:39:12.384900
Sasha
pythondev_help_Sasha_2019-02-23T17:39:12.384900
1,550,943,552.3849
10,170
pythondev
help
That was my first guess, but on the other hand, it works fine if I try to import only this package :thinking_face:
2019-02-23T17:48:33.385900
Rosina
pythondev_help_Rosina_2019-02-23T17:48:33.385900
1,550,944,113.3859
10,171
pythondev
help
Do you know where the `Struct` class is coming from? Maybe something in `raven` is overriding that definition.
2019-02-23T17:57:16.386700
Sasha
pythondev_help_Sasha_2019-02-23T17:57:16.386700
1,550,944,636.3867
10,172
pythondev
help
None
2019-02-23T21:33:09.387000
Hai
pythondev_help_Hai_2019-02-23T21:33:09.387000
1,550,957,589.387
10,173
pythondev
help
<@Sasha>
2019-02-23T21:44:28.387800
Hai
pythondev_help_Hai_2019-02-23T21:44:28.387800
1,550,958,268.3878
10,174
pythondev
help
It looks like `iloc` allows a list of columns instead of slices, so you could pass in `[0, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]` and the like to pick up batches of 10 along with column 0.
2019-02-23T21:48:38.389300
Sasha
pythondev_help_Sasha_2019-02-23T21:48:38.389300
1,550,958,518.3893
10,175
pythondev
help
I don't know anything about `sns.pairplot` though.
2019-02-23T21:49:09.389700
Sasha
pythondev_help_Sasha_2019-02-23T21:49:09.389700
1,550,958,549.3897
10,176
pythondev
help
is there any way rather then writint numbers can i use any for loop or while?
2019-02-23T22:21:19.390300
Hai
pythondev_help_Hai_2019-02-23T22:21:19.390300
1,550,960,479.3903
10,177
pythondev
help
sns.pairplot shows the grap of target and the regular data
2019-02-23T22:21:39.390800
Hai
pythondev_help_Hai_2019-02-23T22:21:39.390800
1,550,960,499.3908
10,178
pythondev
help
Sure, you can construct that list in a loop and pass it in as a variable... it doesn't need to be hard-coded.
2019-02-23T22:26:24.391700
Sasha
pythondev_help_Sasha_2019-02-23T22:26:24.391700
1,550,960,784.3917
10,179
pythondev
help
This makes your code vulnerable to SQL injection attacks, you should be using prepared statements instead
2019-02-23T22:43:14.392000
Edythe
pythondev_help_Edythe_2019-02-23T22:43:14.392000
1,550,961,794.392
10,180
pythondev
help
<https://stackoverflow.com/questions/41256648/select-multiple-ranges-of-columns-in-pandas-dataframe>
2019-02-23T22:58:16.392300
Raguel
pythondev_help_Raguel_2019-02-23T22:58:16.392300
1,550,962,696.3923
10,181
pythondev
help
Maybe this is what you are looking for?
2019-02-23T22:58:23.392600
Raguel
pythondev_help_Raguel_2019-02-23T22:58:23.392600
1,550,962,703.3926
10,182
pythondev
help
Anyone doing the practice round of Google kickstart 2019 ?
2019-02-23T23:49:21.393400
Sade
pythondev_help_Sade_2019-02-23T23:49:21.393400
1,550,965,761.3934
10,183
pythondev
help
<@Sasha> how would i make it as list?i mean how would i make 200columns as list?
2019-02-23T23:51:21.394100
Hai
pythondev_help_Hai_2019-02-23T23:51:21.394100
1,550,965,881.3941
10,184
pythondev
help
Something like this, I mean:
2019-02-23T23:54:31.394200
Sasha
pythondev_help_Sasha_2019-02-23T23:54:31.394200
1,550,966,071.3942
10,185
pythondev
help
How can I sort a list such that the corresponding elements of a second list are also swapped?
2019-02-24T00:45:27.395800
Olympia
pythondev_help_Olympia_2019-02-24T00:45:27.395800
1,550,969,127.3958
10,186
pythondev
help
You could `zip()` the two lists together, sort them as tuples, and then pull the values apart again.
2019-02-24T00:53:06.396300
Sasha
pythondev_help_Sasha_2019-02-24T00:53:06.396300
1,550,969,586.3963
10,187
pythondev
help
What is the optimal browser to use for simple Selenium scraping (with Javascript enabled), in regards to speed? Have been using Chromedriver so far
2019-02-24T01:22:57.398000
Conchita
pythondev_help_Conchita_2019-02-24T01:22:57.398000
1,550,971,377.398
10,188
pythondev
help
How can I speed up my python program ?
2019-02-24T04:40:19.399100
Sade
pythondev_help_Sade_2019-02-24T04:40:19.399100
1,550,983,219.3991
10,189
pythondev
help
1. find the slowest part
2019-02-24T04:50:13.401000
Jettie
pythondev_help_Jettie_2019-02-24T04:50:13.401000
1,550,983,813.401
10,190
pythondev
help
2. make it faster :)) It depends greatly on what you're doing
2019-02-24T04:50:46.401700
Jettie
pythondev_help_Jettie_2019-02-24T04:50:46.401700
1,550,983,846.4017
10,191
pythondev
help
maybe it's an inefficient algorithm, or maybe it's huge amount of numeric computations
2019-02-24T04:51:23.402400
Jettie
pythondev_help_Jettie_2019-02-24T04:51:23.402400
1,550,983,883.4024
10,192
pythondev
help
I use chrome personally.
2019-02-24T07:39:14.403800
Karoline
pythondev_help_Karoline_2019-02-24T07:39:14.403800
1,550,993,954.4038
10,193
pythondev
help
With python you will get slower programs that with languages that are "closer to the metal". Usually the way to optimize for speed is finding the slowest part (as <@Jettie> has mentioned) and if after making sure your algorithm is optimal you still need faster software, then you should consider writing that part as an independent library on C, and use python bindings to integrate it with your python code.
2019-02-24T08:45:11.404000
Louella
pythondev_help_Louella_2019-02-24T08:45:11.404000
1,550,997,911.404
10,194
pythondev
help
I want to run a small python script for ever, is there something like free python code cloud hosting . I want to get remainder to mail when currency drops below certain usd value in a day
2019-02-24T09:38:01.408700
China
pythondev_help_China_2019-02-24T09:38:01.408700
1,551,001,081.4087
10,195
pythondev
help
AWS lambda offers 1 million requests and 400,000 GB Seconds of execution for free every month indefinitely. You can schedule a lambda function run at a custom rate. This seems to suit your purpose.
2019-02-24T09:41:05.408800
Meridith
pythondev_help_Meridith_2019-02-24T09:41:05.408800
1,551,001,265.4088
10,196
pythondev
help
<@Sade> as the others mentioned, find the slowest part, and try to speed it up. Consider things like algorithm time/size complexity (big O notation) to see if you're setting yourself up for problems. You can also explore things like multi-threading/parallelization.
2019-02-24T10:06:46.411700
Ashley
pythondev_help_Ashley_2019-02-24T10:06:46.411700
1,551,002,806.4117
10,197
pythondev
help
Can I do rerouting of packets using python? if yes, can someone give some idea
2019-02-24T11:19:22.412900
Elisha
pythondev_help_Elisha_2019-02-24T11:19:22.412900
1,551,007,162.4129
10,198
pythondev
help
<@Elisha> you mean like a proxy?
2019-02-24T11:26:41.413800
Ashley
pythondev_help_Ashley_2019-02-24T11:26:41.413800
1,551,007,601.4138
10,199
pythondev
help
<@Ashley> no, I am sending packets from a generator to a particular port and from that port, I want to reroute to another port.
2019-02-24T11:31:17.415500
Elisha
pythondev_help_Elisha_2019-02-24T11:31:17.415500
1,551,007,877.4155
10,200
pythondev
help
That sounds like a proxy
2019-02-24T11:32:43.415800
Ashley
pythondev_help_Ashley_2019-02-24T11:32:43.415800
1,551,007,963.4158
10,201
pythondev
help
You can have a server listening on that port, and then forwarding everything to another port
2019-02-24T11:33:18.416600
Ashley
pythondev_help_Ashley_2019-02-24T11:33:18.416600
1,551,007,998.4166
10,202
pythondev
help
None
2019-02-24T11:33:54.416800
Elisha
pythondev_help_Elisha_2019-02-24T11:33:54.416800
1,551,008,034.4168
10,203
pythondev
help
say from port 1 I want to reroute to port 2
2019-02-24T11:34:18.417500
Elisha
pythondev_help_Elisha_2019-02-24T11:34:18.417500
1,551,008,058.4175
10,204
pythondev
help
Yep that is what a proxy does
2019-02-24T11:34:50.417800
Ashley
pythondev_help_Ashley_2019-02-24T11:34:50.417800
1,551,008,090.4178
10,205
pythondev
help
can you give some idea how to code it?
2019-02-24T11:35:18.418200
Elisha
pythondev_help_Elisha_2019-02-24T11:35:18.418200
1,551,008,118.4182
10,206
pythondev
help
some link or some reference will be good?
2019-02-24T11:36:00.419500
Elisha
pythondev_help_Elisha_2019-02-24T11:36:00.419500
1,551,008,160.4195
10,207
pythondev
help
You can probably find some good tutorials by just doing a Google search for python proxy
2019-02-24T11:36:02.419600
Ashley
pythondev_help_Ashley_2019-02-24T11:36:02.419600
1,551,008,162.4196
10,208
pythondev
help
ok
2019-02-24T11:36:12.419900
Elisha
pythondev_help_Elisha_2019-02-24T11:36:12.419900
1,551,008,172.4199
10,209
pythondev
help
There's a ton of guides out there already
2019-02-24T11:36:21.420300
Ashley
pythondev_help_Ashley_2019-02-24T11:36:21.420300
1,551,008,181.4203
10,210
pythondev
help
ok
2019-02-24T11:36:36.420500
Elisha
pythondev_help_Elisha_2019-02-24T11:36:36.420500
1,551,008,196.4205
10,211
pythondev
help
And now you know the proper terms to look up, which should make finding relevant sources much easier
2019-02-24T11:37:40.421900
Hiroko
pythondev_help_Hiroko_2019-02-24T11:37:40.421900
1,551,008,260.4219
10,212
pythondev
help
sure thanks a lot
2019-02-24T11:38:35.422400
Elisha
pythondev_help_Elisha_2019-02-24T11:38:35.422400
1,551,008,315.4224
10,213
pythondev
help
I think there is a headless chrome which should be faster as it's just the rendering engine
2019-02-24T12:36:42.422500
Edythe
pythondev_help_Edythe_2019-02-24T12:36:42.422500
1,551,011,802.4225
10,214
pythondev
help
Cool. Ty. There is also <http://Scrapinghub.com|Scrapinghub.com>
2019-02-24T12:50:21.423600
China
pythondev_help_China_2019-02-24T12:50:21.423600
1,551,012,621.4236
10,215
pythondev
help
Is it guaranteed that python numpy random number generator gives same sequence every time with same seed. I using that sequence to encode data, it would be impossible to decode back in future if numpy generate different sequence with seed
2019-02-24T12:55:48.429300
China
pythondev_help_China_2019-02-24T12:55:48.429300
1,551,012,948.4293
10,216
pythondev
help
The `RandomState` docs have this guarantee: "_Compatibility Guarantee_ A fixed seed and a fixed series of calls to ‘RandomState’ methods using the same parameters will always produce the same results up to roundoff error except when the values were incorrect. Incorrect values will be fixed and the NumPy version in which the fix was made will be noted in the relevant docstring. Extension of existing parameter ranges and the addition of new parameters is allowed as long the previous behavior remains unchanged."
2019-02-24T13:34:09.430000
Sasha
pythondev_help_Sasha_2019-02-24T13:34:09.430000
1,551,015,249.43
10,217
pythondev
help
That said, if you're using this for encryption, I'd recommend an actual cryptography algorithm, since the pseudo-random sequence might not be very secure against decoding attempts.
2019-02-24T13:35:30.431200
Sasha
pythondev_help_Sasha_2019-02-24T13:35:30.431200
1,551,015,330.4312
10,218
pythondev
help
The seed is only 32-bit, too, so that's very vulnerable to brute force.
2019-02-24T13:36:54.431800
Sasha
pythondev_help_Sasha_2019-02-24T13:36:54.431800
1,551,015,414.4318
10,219
pythondev
help
hi guys, somehow i have the feeling that i am totally overthinking a solution for a problem. i'm doing some exercises and there is one about 2 arrays. the first array is representing the size of a fish and the second array represents their direction (it can be just 0 or 1). if the fishes are swimming the same direction, they will never meet and therefore never eat each other. the bigger fish is always eating the smaller fish and so on and so on. for example, given those arrays: ``` A[0] = 4 B[0] = 0 A[1] = 3 B[1] = 1 A[2] = 2 B[2] = 0 A[3] = 1 B[3] = 0 A[4] = 5 B[4] = 0``` you have to find out how many fish will survive. there is just one fish swimming in the opposite direction, which is fish A[1]. this fish will eat fish A[2] and A[3] but will be eaten by fish A[4]. therefore only 2 fish (A[0] and A[4]) will survive as they are swimming in the same direction and will never collide. i was thinking of a for loop in the very beginning..but if i do that and for example fish A[1] would eat the A[4]..i would never hit the fish A[0] again. i started thinking of a while loop and so on... does someone has an idea? i hope its more or less clear - otherwise please feel free to ask :man-shrugging::pray: thanks!
2019-02-24T13:46:38.438500
Reggie
pythondev_help_Reggie_2019-02-24T13:46:38.438500
1,551,015,998.4385
10,220