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 | The problem is a little bit unclear. Is there an ordering to events? Like, what happens if A[0] eats A[1] before A[1] would normally eat A[2] and A[3]? | 2019-02-24T13:53:54.439600 | Sasha | pythondev_help_Sasha_2019-02-24T13:53:54.439600 | 1,551,016,434.4396 | 10,221 |
pythondev | help | its going always "down the river". as the fish A[1] is the first going into the other direction, it is supposed to catch first the [2] and [3] and then hitting the [4] and then from beginning [0] and so on. also, each size of every which is unique. so there will be never 2 fishes with the same size. | 2019-02-24T13:56:10.441500 | Reggie | pythondev_help_Reggie_2019-02-24T13:56:10.441500 | 1,551,016,570.4415 | 10,222 |
pythondev | help | Ah, so the index indicates the relative position in the river, which is preserved until they meet? | 2019-02-24T13:58:17.442300 | Sasha | pythondev_help_Sasha_2019-02-24T13:58:17.442300 | 1,551,016,697.4423 | 10,223 |
pythondev | help | exactly :slightly_smiling_face: and the river is supposed to be kind of a circle, so sooner or later they gonna "meet" | 2019-02-24T13:59:17.443300 | Reggie | pythondev_help_Reggie_2019-02-24T13:59:17.443300 | 1,551,016,757.4433 | 10,224 |
pythondev | help | Gotcha. Yeah, a single `for` loop probably won't do it. I'd be thinking in terms of a dynamic data structure where you remove eaten fish from the list and then re-evaluate the situation repeatedly. | 2019-02-24T14:07:18.444900 | Sasha | pythondev_help_Sasha_2019-02-24T14:07:18.444900 | 1,551,017,238.4449 | 10,225 |
pythondev | help | but at the point you get to the end of the list, you would need to get back to the beginning. in sense of, if the fish at position [2] is going to eat all the rest to the end of the line but the fish at position [0] or [1] would eat fish [2]... how would you work that out? i was thinking of restructuring the array, so fish[2] would move to position [0] and "eat up" until it hits a bigger fish which then gets to position [0]? it seems to be very complex | 2019-02-24T14:11:22.448200 | Reggie | pythondev_help_Reggie_2019-02-24T14:11:22.448200 | 1,551,017,482.4482 | 10,226 |
pythondev | help | For the wrap-around, you could use a modulus operator. Like, to evaluate fish `n` versus fish `n+1`, you'd actually check against `(n+1) % len`. | 2019-02-24T14:18:44.449700 | Sasha | pythondev_help_Sasha_2019-02-24T14:18:44.449700 | 1,551,017,924.4497 | 10,227 |
pythondev | help | Iam xoring each pixel sequentially with random number from a sequence with a seed. To mask actual photo and upload as a photo to Google drive. Because google drive only gives free storage for HD .jpeg (photo) format. While AES might give some other format different than photo format | 2019-02-24T14:41:53.454000 | China | pythondev_help_China_2019-02-24T14:41:53.454000 | 1,551,019,313.454 | 10,228 |
pythondev | help | Does xoring each pixel with different random number is that can be cracked easily? | 2019-02-24T14:46:20.455200 | China | pythondev_help_China_2019-02-24T14:46:20.455200 | 1,551,019,580.4552 | 10,229 |
pythondev | help | I think a bigger problem is that JPEG is not lossless compression, especially on photos that look like random noise, so you're going to get back different pixels than you started with. | 2019-02-24T14:52:16.455400 | Sasha | pythondev_help_Sasha_2019-02-24T14:52:16.455400 | 1,551,019,936.4554 | 10,230 |
pythondev | help | sorry i didnt get a notification about your response. yea you are right, thats one option to validate if the fish is bigger :slightly_smiling_face: for the loop, i decided to go this way `while B.count(B[0]) != len(B):`. so it goes through the list until all fishes are swimming in the same direction :slightly_smiling_face: | 2019-02-24T15:06:56.457000 | Reggie | pythondev_help_Reggie_2019-02-24T15:06:56.457000 | 1,551,020,816.457 | 10,231 |
pythondev | help | I'm confused with a systemd service... I have my python program print to stderr but if I put a priority of 1..6 it still doesn't show anything on `journalctl -p 1..6` | 2019-02-24T16:10:33.458000 | Linnie | pythondev_help_Linnie_2019-02-24T16:10:33.458000 | 1,551,024,633.458 | 10,232 |
pythondev | help | it only is shown at level 7 (info), so when I do `1..7` | 2019-02-24T16:10:58.458400 | Linnie | pythondev_help_Linnie_2019-02-24T16:10:58.458400 | 1,551,024,658.4584 | 10,233 |
pythondev | help | I tried `logging.critical` and `logging.error` | 2019-02-24T16:11:14.458700 | Linnie | pythondev_help_Linnie_2019-02-24T16:11:14.458700 | 1,551,024,674.4587 | 10,234 |
pythondev | help | Could django be used as a gui? | 2019-02-24T17:06:14.459600 | Priscilla | pythondev_help_Priscilla_2019-02-24T17:06:14.459600 | 1,551,027,974.4596 | 10,235 |
pythondev | help | or am I confused about its useage | 2019-02-24T17:06:29.460000 | Priscilla | pythondev_help_Priscilla_2019-02-24T17:06:29.460000 | 1,551,027,989.46 | 10,236 |
pythondev | help | It sounds like you are confused <@Priscilla>. Django is a framework for building web apps. The gui element is HTML and command line interfaces to the Django app. | 2019-02-24T17:14:52.462700 | Clemmie | pythondev_help_Clemmie_2019-02-24T17:14:52.462700 | 1,551,028,492.4627 | 10,237 |
pythondev | help | Can you elaborate on what you are trying to achieve? | 2019-02-24T17:15:12.463400 | Clemmie | pythondev_help_Clemmie_2019-02-24T17:15:12.463400 | 1,551,028,512.4634 | 10,238 |
pythondev | help | OH! i see | 2019-02-24T17:15:18.463600 | Priscilla | pythondev_help_Priscilla_2019-02-24T17:15:18.463600 | 1,551,028,518.4636 | 10,239 |
pythondev | help | well i just need a simple gui for a script i am writting | 2019-02-24T17:15:36.464000 | Priscilla | pythondev_help_Priscilla_2019-02-24T17:15:36.464000 | 1,551,028,536.464 | 10,240 |
pythondev | help | just needs to visually confirm a command being sent/recieved by a terminal | 2019-02-24T17:16:16.465100 | Priscilla | pythondev_help_Priscilla_2019-02-24T17:16:16.465100 | 1,551,028,576.4651 | 10,241 |
pythondev | help | thats mostly taken care of. its the gui I am looking at, kivy came up in my searches | 2019-02-24T17:16:57.466900 | Priscilla | pythondev_help_Priscilla_2019-02-24T17:16:57.466900 | 1,551,028,617.4669 | 10,242 |
pythondev | help | It is a bit outside my realm of expertiese, but I would take a look at `pyqt` I think.
| 2019-02-24T17:17:02.467000 | Clemmie | pythondev_help_Clemmie_2019-02-24T17:17:02.467000 | 1,551,028,622.467 | 10,243 |
pythondev | help | <@China> yes, using xor as encryption algorithm is not secure. | 2019-02-24T17:17:04.467100 | Edythe | pythondev_help_Edythe_2019-02-24T17:17:04.467100 | 1,551,028,624.4671 | 10,244 |
pythondev | help | appreciate it thanks! | 2019-02-24T17:17:50.467900 | Priscilla | pythondev_help_Priscilla_2019-02-24T17:17:50.467900 | 1,551,028,670.4679 | 10,245 |
pythondev | help | :thumbsup: | 2019-02-24T17:18:04.468200 | Clemmie | pythondev_help_Clemmie_2019-02-24T17:18:04.468200 | 1,551,028,684.4682 | 10,246 |
pythondev | help | `invalid syntax (<unknown>, line 5)`
keep getting this error in vscode but there is nothing there to delete. anyone seen this before? | 2019-02-24T19:00:38.469800 | Priscilla | pythondev_help_Priscilla_2019-02-24T19:00:38.469800 | 1,551,034,838.4698 | 10,247 |
pythondev | help | Anything suspicious on the previous line, where it wouldn't be expecting a line-break in the middle of an expression or something? | 2019-02-24T19:05:23.470800 | Sasha | pythondev_help_Sasha_2019-02-24T19:05:23.470800 | 1,551,035,123.4708 | 10,248 |
pythondev | help | litterally nothing | 2019-02-24T19:05:57.471100 | Priscilla | pythondev_help_Priscilla_2019-02-24T19:05:57.471100 | 1,551,035,157.4711 | 10,249 |
pythondev | help | one sec, ill take screenshot | 2019-02-24T19:06:21.471800 | Priscilla | pythondev_help_Priscilla_2019-02-24T19:06:21.471800 | 1,551,035,181.4718 | 10,250 |
pythondev | help | i've ran into weird syntax bugs like that which cleared up by restarting vs code | 2019-02-24T19:06:31.472100 | Stacy | pythondev_help_Stacy_2019-02-24T19:06:31.472100 | 1,551,035,191.4721 | 10,251 |
pythondev | help | None | 2019-02-24T19:07:32.472200 | Priscilla | pythondev_help_Priscilla_2019-02-24T19:07:32.472200 | 1,551,035,252.4722 | 10,252 |
pythondev | help | ok i cant send a pic | 2019-02-24T19:09:56.472600 | Priscilla | pythondev_help_Priscilla_2019-02-24T19:09:56.472600 | 1,551,035,396.4726 | 10,253 |
pythondev | help | but its an empty file now with an error | 2019-02-24T19:10:07.472900 | Priscilla | pythondev_help_Priscilla_2019-02-24T19:10:07.472900 | 1,551,035,407.4729 | 10,254 |
pythondev | help | no dice on restart, but thank you for the input :slightly_smiling_face: | 2019-02-24T19:11:44.473300 | Priscilla | pythondev_help_Priscilla_2019-02-24T19:11:44.473300 | 1,551,035,504.4733 | 10,255 |
pythondev | help | does it go away if you write some valid code and re-save the file | 2019-02-24T19:13:45.473600 | Stacy | pythondev_help_Stacy_2019-02-24T19:13:45.473600 | 1,551,035,625.4736 | 10,256 |
pythondev | help | no | 2019-02-24T19:19:20.473800 | Priscilla | pythondev_help_Priscilla_2019-02-24T19:19:20.473800 | 1,551,035,960.4738 | 10,257 |
pythondev | help | had to delete the file and create a new one, this is the second time | 2019-02-24T19:19:34.474200 | Priscilla | pythondev_help_Priscilla_2019-02-24T19:19:34.474200 | 1,551,035,974.4742 | 10,258 |
pythondev | help | ive disabled most of my extentions except the Python extention | 2019-02-24T19:19:56.474600 | Priscilla | pythondev_help_Priscilla_2019-02-24T19:19:56.474600 | 1,551,035,996.4746 | 10,259 |
pythondev | help | it comes up everytime i try to write a `for` statement hmmmm... | 2019-02-24T19:26:29.475300 | Priscilla | pythondev_help_Priscilla_2019-02-24T19:26:29.475300 | 1,551,036,389.4753 | 10,260 |
pythondev | help | im stupid i forgot the : | 2019-02-24T19:27:09.475600 | Priscilla | pythondev_help_Priscilla_2019-02-24T19:27:09.475600 | 1,551,036,429.4756 | 10,261 |
pythondev | help | I have a function that creates a variable for me, how can refrence that variable outside of the function? | 2019-02-24T20:59:53.476800 | Priscilla | pythondev_help_Priscilla_2019-02-24T20:59:53.476800 | 1,551,041,993.4768 | 10,262 |
pythondev | help | I have a function that takes in a list of dictionaries as an argument. How would I type hint this?
i.e
```
def foo(bar: List[Dict])
pass
``` | 2019-02-24T21:06:51.479400 | Rosalind | pythondev_help_Rosalind_2019-02-24T21:06:51.479400 | 1,551,042,411.4794 | 10,263 |
pythondev | help | <@Priscilla> return the variable when the function exits, or pass it as a param | 2019-02-24T21:14:05.480300 | Hiroko | pythondev_help_Hiroko_2019-02-24T21:14:05.480300 | 1,551,042,845.4803 | 10,264 |
pythondev | help | eg
```some_dict = {}
def some_func_1(some_dict):
# execute operation and store in some_dict
```
OR
```
def some_func_2():
some_dict = {}
# execute operation and store result in some_dict
return some_dict
``` | 2019-02-24T21:15:31.482000 | Hiroko | pythondev_help_Hiroko_2019-02-24T21:15:31.482000 | 1,551,042,931.482 | 10,265 |
pythondev | help | thanks dd82 | 2019-02-24T21:22:36.482200 | Priscilla | pythondev_help_Priscilla_2019-02-24T21:22:36.482200 | 1,551,043,356.4822 | 10,266 |
pythondev | help | <@Sasha> am getting an error saying can only concatenate list (not "range") to list | 2019-02-24T21:59:42.482500 | Hai | pythondev_help_Hai_2019-02-24T21:59:42.482500 | 1,551,045,582.4825 | 10,267 |
pythondev | help | Sorry about that. In Py2, `range` is a list, but in Py3 it's an interator, so you can do `[0].extend(range(...))` instead, or `[0] + list(range(...))`. | 2019-02-24T22:02:02.482700 | Sasha | pythondev_help_Sasha_2019-02-24T22:02:02.482700 | 1,551,045,722.4827 | 10,268 |
pythondev | help | it says data must be pandas dataframe not <class list> | 2019-02-24T22:05:47.482900 | Hai | pythondev_help_Hai_2019-02-24T22:05:47.482900 | 1,551,045,947.4829 | 10,269 |
pythondev | help | after that i did plot = sns.pairplot(columns, hue='target'), size=2.5) # 'target' is the column name which is the '0' which we are adding in the code | 2019-02-24T22:06:57.483100 | Hai | pythondev_help_Hai_2019-02-24T22:06:57.483100 | 1,551,046,017.4831 | 10,270 |
pythondev | help | Yeah, that's not going to work. The `columns` is just a parameter to pass to `iloc()` to select which columns you want, it's not the data itself to be plotted. | 2019-02-24T22:08:03.483300 | Sasha | pythondev_help_Sasha_2019-02-24T22:08:03.483300 | 1,551,046,083.4833 | 10,271 |
pythondev | help | then after that how would i make the pieces of data to dataframe ? | 2019-02-24T22:09:45.483600 | Hai | pythondev_help_Hai_2019-02-24T22:09:45.483600 | 1,551,046,185.4836 | 10,272 |
pythondev | help | so "columns" has pieces of columns out of 200 right?? so how would i make that pieces of data to pandas dataframe so that i can do sns.pairplot if i have the data in dataframe | 2019-02-24T22:10:51.483800 | Hai | pythondev_help_Hai_2019-02-24T22:10:51.483800 | 1,551,046,251.4838 | 10,273 |
pythondev | help | In your original code, you were selecting columns to plot by using `0:10`, right? The `columns` variable is a replacement for that specification... it's an explicit list saying you want columns 0, 11, 12, etc. instead of "0 through 10", that's all. | 2019-02-24T22:13:48.484000 | Sasha | pythondev_help_Sasha_2019-02-24T22:13:48.484000 | 1,551,046,428.484 | 10,274 |
pythondev | help | so it will be like ?
data_slicing = data.iloc[:, columns] ? | 2019-02-24T22:18:49.484400 | Hai | pythondev_help_Hai_2019-02-24T22:18:49.484400 | 1,551,046,729.4844 | 10,275 |
pythondev | help | Yep | 2019-02-24T22:20:01.484600 | Sasha | pythondev_help_Sasha_2019-02-24T22:20:01.484600 | 1,551,046,801.4846 | 10,276 |
pythondev | help | afte that i did this sns.pairplot(data_slicing, hue=''target", size=2.5) i got the error # could not broadcast input array from shape(20000, 2) into shape (20000) | 2019-02-24T22:21:35.484800 | Hai | pythondev_help_Hai_2019-02-24T22:21:35.484800 | 1,551,046,895.4848 | 10,277 |
pythondev | help | You'll have to ask someone else about that... I don't know anything about `sns`, I'm afraid. | 2019-02-24T22:22:43.485000 | Sasha | pythondev_help_Sasha_2019-02-24T22:22:43.485000 | 1,551,046,963.485 | 10,278 |
pythondev | help | seaborn pair plot this generally accepts dataframe in the dataframe we should give some target column whch we want to determine in the graph. in my case i have 200columns and am splitting into pieces with adding the first 0th column as target to all the pieces so i basically need a for loop of pieces with the target. so can i assume the "columns" varibale is one a piece? then can i convert it into dataframe and do sns.pairplot? | 2019-02-24T22:25:33.485200 | Hai | pythondev_help_Hai_2019-02-24T22:25:33.485200 | 1,551,047,133.4852 | 10,279 |
pythondev | help | Does the pairplot work if you use your original `0:10` column specification? | 2019-02-24T22:30:02.485500 | Sasha | pythondev_help_Sasha_2019-02-24T22:30:02.485500 | 1,551,047,402.4855 | 10,280 |
pythondev | help | yes it works for the first 10columns 0:10 because it has the target in the 0th colum itself so it works, when it comes to 11:20 it doesnt have any target because target is at 0th column so it fails so basically i need to target to each piece i tried pandas merge,join,concat nothing worked | 2019-02-24T22:31:31.485700 | Hai | pythondev_help_Hai_2019-02-24T22:31:31.485700 | 1,551,047,491.4857 | 10,281 |
pythondev | help | Maybe print `data_slicing` to see if you can spot any weirdness in it? | 2019-02-24T22:33:22.485900 | Sasha | pythondev_help_Sasha_2019-02-24T22:33:22.485900 | 1,551,047,602.4859 | 10,282 |
pythondev | help | i think it worked. so i did like this after data_slicing pd.DataFrame(data_slicing) then it made it into dataframe and then worked. Thank you so much <@Sasha> appreciate it | 2019-02-24T22:40:41.486600 | Hai | pythondev_help_Hai_2019-02-24T22:40:41.486600 | 1,551,048,041.4866 | 10,283 |
pythondev | help | Cool | 2019-02-24T22:41:26.486800 | Sasha | pythondev_help_Sasha_2019-02-24T22:41:26.486800 | 1,551,048,086.4868 | 10,284 |
pythondev | help | 90% of all my scripts are for myself (automation). I'm working on a project that I'm going to provide to friends. Internally I'm managing pandas dataframes...but I'm not sure how to present that to the end user. I'm looking to put filters at the top of whatever interface and the dataframe info below (which then updates as the filters are changed). The last step, once filtered as the user wants is to hit "go" (or whatever button). I'm not sure if this can/should be done in Tkinter? django? Other? (even just suggesting probably shows how little I know :slightly_smiling_face: ) What should I start looking into/learning? | 2019-02-24T23:01:12.491000 | Marth | pythondev_help_Marth_2019-02-24T23:01:12.491000 | 1,551,049,272.491 | 10,285 |
pythondev | help | what are some awesome VSC extensions to have for python? orrrr what’s a better text editor to use for python? | 2019-02-24T23:46:15.492000 | Karly | pythondev_help_Karly_2019-02-24T23:46:15.492000 | 1,551,051,975.492 | 10,286 |
pythondev | help | hey folks, ```something = OrderedDict({
"Credentials": {
"Credential Name": "Abhishek",
"Username": "Looper",
"Secret Type": "Password",
"Password": "blah_blah_blah_bla_h_h"
},
"VM_Config": {
"Host": "10.46.33.173",
"Template": "Centos7.2_0",
"vCPUs": 2,
"Cores per vCPU": 1,
"Memory (GiB)": 2
},
"Connection": {
"Check log-in upon create": "",
"Credential": "Abhishek",
"Connection Type": "SSH",
"Connection Port": 22,
"Delay (in seconds)": 100,
"Retries": 2
}
})```
This is my dict, still dict does not remember the order, am i missing something ? | 2019-02-25T00:45:52.493100 | Nena | pythondev_help_Nena_2019-02-25T00:45:52.493100 | 1,551,055,552.4931 | 10,287 |
pythondev | help | You're initializing it from a regular dict, which doesn't preserve order. You should pass in like a list of tuples or something. | 2019-02-25T00:55:48.493800 | Sasha | pythondev_help_Sasha_2019-02-25T00:55:48.493800 | 1,551,056,148.4938 | 10,288 |
pythondev | help | (Though actually regular dicts should preserve order too in recent Py3 versions.) | 2019-02-25T01:00:13.494800 | Sasha | pythondev_help_Sasha_2019-02-25T01:00:13.494800 | 1,551,056,413.4948 | 10,289 |
pythondev | help | if this will ever be public facing then obligatory - use SSH keys over password also | 2019-02-25T01:17:32.495200 | Paz | pythondev_help_Paz_2019-02-25T01:17:32.495200 | 1,551,057,452.4952 | 10,290 |
pythondev | help | ```is_default_agent_name = request.param['is_default_agent_name'] if \
hasattr(request, 'param') and 'is_default_agent_name' in request.param else False```
Hey guy does this meet pep8 guide or is there a more pythonic way to do it? I feel like its not very pythonic | 2019-02-25T01:28:25.496300 | Adolfo | pythondev_help_Adolfo_2019-02-25T01:28:25.496300 | 1,551,058,105.4963 | 10,291 |
pythondev | help | I'd consider a `try` block there, catching `AttributeError` and `KeyError`, mainly because the repetition annoys me. But it's a question of style. | 2019-02-25T01:34:35.497900 | Sasha | pythondev_help_Sasha_2019-02-25T01:34:35.497900 | 1,551,058,475.4979 | 10,292 |
pythondev | help | Personally, I would try to at least guarantee that `param` exists earlier in the code, creating an empty dict if it doesn't, since object attributes normally are an API invariant. Then you could use `get('is_default_agent_name', False)` in cases like this as a one-liner, for the leftover uncertainty. | 2019-02-25T01:37:14.500300 | Sasha | pythondev_help_Sasha_2019-02-25T01:37:14.500300 | 1,551,058,634.5003 | 10,293 |
pythondev | help | i like that idea. Thats much safer and readable | 2019-02-25T01:38:05.500600 | Adolfo | pythondev_help_Adolfo_2019-02-25T01:38:05.500600 | 1,551,058,685.5006 | 10,294 |
pythondev | help | what i am doing wrong here ```
# -*- coding: UTF-8 -*-
from selenium import webdriver
import time
def home_page():
driver = webdriver.Chrome()
driver.get('mylink')
time.sleep(1)
for i in range(301, 309):
time.sleep(1)
imgBase64 = driver.find_element_by_xpath("//*[@id='cp_Captcha_ctl01_iTask']").get_attribute('src')
f = open('images/data/' + i + '.txt', 'w+')
print(imgBase64)
f.write(imgBase64)
f.close()
def main():
home_page()
user_choice = input('Please click ENTER button to close application')
if not user_choice:
pass
if __name__ == '__main__':
main()```
getting this error
```Exception in thread Thread-1:
Traceback (most recent call last):
File "/Users/alif/anaconda3/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/Users/alif/anaconda3/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
TypeError: home_page() takes 0 positional arguments but 1 was given
Please click ENTER button to close application``` | 2019-02-25T02:39:55.501500 | Gianna | pythondev_help_Gianna_2019-02-25T02:39:55.501500 | 1,551,062,395.5015 | 10,295 |
pythondev | help | i like to reload page every 1s then copy image src | 2019-02-25T02:41:07.502100 | Gianna | pythondev_help_Gianna_2019-02-25T02:41:07.502100 | 1,551,062,467.5021 | 10,296 |
pythondev | help | It appears the error is coming from a different version of the code than what you are showing here, where `home_page()` is being run as a separate thread instead of just called from `main()`. | 2019-02-25T02:48:39.503300 | Sasha | pythondev_help_Sasha_2019-02-25T02:48:39.503300 | 1,551,062,919.5033 | 10,297 |
pythondev | help | same error | 2019-02-25T03:01:34.503600 | Gianna | pythondev_help_Gianna_2019-02-25T03:01:34.503600 | 1,551,063,694.5036 | 10,298 |
pythondev | help | ```
# -*- coding: UTF-8 -*-
from selenium import webdriver
import time
def main():
driver = webdriver.Chrome()
driver.get('<https://secure.e-konsulat.gov.pl/Uslugi/RejestracjaTerminu.aspx?IDUSLUGI=1&IDPlacowki=148>')
time.sleep(1)
for i in range(301, 309):
time.sleep(1)
imgBase64 = driver.find_element_by_xpath("//*[@id='cp_Captcha_ctl01_iTask']").get_attribute('src')
f = open('images/data/' + i + '.txt', 'w+')
print(imgBase64)
f.write(imgBase64)
f.close()
user_choice = input('Please click ENTER button to close application')
if not user_choice:
pass
if __name__ == '__main__':
main()
``` | 2019-02-25T03:01:56.503800 | Gianna | pythondev_help_Gianna_2019-02-25T03:01:56.503800 | 1,551,063,716.5038 | 10,299 |
pythondev | help | What is the error now? | 2019-02-25T03:02:56.504000 | Sasha | pythondev_help_Sasha_2019-02-25T03:02:56.504000 | 1,551,063,776.504 | 10,300 |
pythondev | help | ```python main.py
Exception in thread Thread-1:
Traceback (most recent call last):
File "/Users/alif/anaconda3/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/Users/alif/anaconda3/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
TypeError: home_page() takes 0 positional arguments but 1 was given
Please click ENTER button to close application``` | 2019-02-25T03:03:25.504200 | Gianna | pythondev_help_Gianna_2019-02-25T03:03:25.504200 | 1,551,063,805.5042 | 10,301 |
pythondev | help | You don't even have a `home_page()` function any more in the code you pasted. Your coding environment seems screwed up... running different code than what you're editing. | 2019-02-25T03:04:19.504400 | Sasha | pythondev_help_Sasha_2019-02-25T03:04:19.504400 | 1,551,063,859.5044 | 10,302 |
pythondev | help | sorry i fixed and i run other file | 2019-02-25T03:05:02.504600 | Gianna | pythondev_help_Gianna_2019-02-25T03:05:02.504600 | 1,551,063,902.5046 | 10,303 |
pythondev | help | but code dont give me error and does not have work | 2019-02-25T03:05:20.504800 | Gianna | pythondev_help_Gianna_2019-02-25T03:05:20.504800 | 1,551,063,920.5048 | 10,304 |
pythondev | help | Does it take 10 or more seconds to run? Does it create any image files? | 2019-02-25T03:06:57.505000 | Sasha | pythondev_help_Sasha_2019-02-25T03:06:57.505000 | 1,551,064,017.505 | 10,305 |
pythondev | help | <http://prntscr.com/mpppt5> | 2019-02-25T03:08:06.505200 | Gianna | pythondev_help_Gianna_2019-02-25T03:08:06.505200 | 1,551,064,086.5052 | 10,306 |
pythondev | help | i need reload page too every time becz for new images | 2019-02-25T03:08:45.505500 | Gianna | pythondev_help_Gianna_2019-02-25T03:08:45.505500 | 1,551,064,125.5055 | 10,307 |
pythondev | help | You just said it doesn't give an error, but it's throwing a TypeError on line 16... | 2019-02-25T03:09:05.505700 | Sasha | pythondev_help_Sasha_2019-02-25T03:09:05.505700 | 1,551,064,145.5057 | 10,308 |
pythondev | help | f = open(‘images/data/’ + i + ‘.txt’, ‘w+’) | 2019-02-25T03:09:57.505900 | Gianna | pythondev_help_Gianna_2019-02-25T03:09:57.505900 | 1,551,064,197.5059 | 10,309 |
pythondev | help | can you run this code on ur com | 2019-02-25T03:10:19.506100 | Gianna | pythondev_help_Gianna_2019-02-25T03:10:19.506100 | 1,551,064,219.5061 | 10,310 |
pythondev | help | ```from selenium import webdriver
import time
def home_page():
driver = webdriver.Chrome()
driver.get('<https://secure.e-konsulat.gov.pl/Uslugi/RejestracjaTerminu.aspx?IDUSLUGI=1&IDPlacowki=148>')
time.sleep(5)
for i in range(301, 309):
time.sleep(1)
imgBase64 = driver.find_element_by_xpath("//*[@id='cp_Captcha_ctl01_iTask']").get_attribute('src')
f = open('images/data/' + i + '.txt', 'w+')
print(imgBase64)
f.write(imgBase64)
f.close()
def main():
home_page()
user_choice = input('Please click ENTER button to close application')
if not user_choice:
pass
if __name__ == '__main__':
main()``` | 2019-02-25T03:10:21.506300 | Gianna | pythondev_help_Gianna_2019-02-25T03:10:21.506300 | 1,551,064,221.5063 | 10,311 |
pythondev | help | Yes, you need `str(i)` instead of `i`, or use a string format call. | 2019-02-25T03:10:30.506500 | Sasha | pythondev_help_Sasha_2019-02-25T03:10:30.506500 | 1,551,064,230.5065 | 10,312 |
pythondev | help | this code not load page | 2019-02-25T03:10:54.506700 | Gianna | pythondev_help_Gianna_2019-02-25T03:10:54.506700 | 1,551,064,254.5067 | 10,313 |
pythondev | help | inside range | 2019-02-25T03:10:59.506900 | Gianna | pythondev_help_Gianna_2019-02-25T03:10:59.506900 | 1,551,064,259.5069 | 10,314 |
pythondev | help | That's because it's throwing an exception, terminating the program. | 2019-02-25T03:11:24.507100 | Sasha | pythondev_help_Sasha_2019-02-25T03:11:24.507100 | 1,551,064,284.5071 | 10,315 |
pythondev | help | how i can do it | 2019-02-25T03:11:37.507300 | Gianna | pythondev_help_Gianna_2019-02-25T03:11:37.507300 | 1,551,064,297.5073 | 10,316 |
pythondev | help | Fix the error, first. | 2019-02-25T03:11:46.507500 | Sasha | pythondev_help_Sasha_2019-02-25T03:11:46.507500 | 1,551,064,306.5075 | 10,317 |
pythondev | help | so after load page it will take image then reload page take src string | 2019-02-25T03:12:10.507700 | Gianna | pythondev_help_Gianna_2019-02-25T03:12:10.507700 | 1,551,064,330.5077 | 10,318 |
pythondev | help | done | 2019-02-25T03:12:13.507900 | Gianna | pythondev_help_Gianna_2019-02-25T03:12:13.507900 | 1,551,064,333.5079 | 10,319 |
pythondev | help | aleady | 2019-02-25T03:12:17.508100 | Gianna | pythondev_help_Gianna_2019-02-25T03:12:17.508100 | 1,551,064,337.5081 | 10,320 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.