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 | Yep, that's usually what I see/hear around. Note that if you are doing I/O - probably best to use `ThreadPoolExecutor` since your bottlekneck isn't CPU and processes in python are expensive | 2017-07-19T01:02:08.249425 | Beula | pythondev_help_Beula_2017-07-19T01:02:08.249425 | 1,500,426,128.249425 | 86,203 |
pythondev | help | Especially resource sharing | 2017-07-19T01:02:15.250613 | Beula | pythondev_help_Beula_2017-07-19T01:02:15.250613 | 1,500,426,135.250613 | 86,204 |
pythondev | help | Thanks. Let me read more on the subject | 2017-07-19T01:02:38.254430 | Katheryn | pythondev_help_Katheryn_2017-07-19T01:02:38.254430 | 1,500,426,158.25443 | 86,205 |
pythondev | help | Hello guys | 2017-07-19T07:16:27.640936 | Hyman | pythondev_help_Hyman_2017-07-19T07:16:27.640936 | 1,500,448,587.640936 | 86,206 |
pythondev | help | I got a problem, I want to connect my self to an external site using python requests. | 2017-07-19T07:17:11.654032 | Hyman | pythondev_help_Hyman_2017-07-19T07:17:11.654032 | 1,500,448,631.654032 | 86,207 |
pythondev | help | What I aim to have at the end is a way by which I can connect myself to the site using python requests and when I open my browser, I should see myself already logged in | 2017-07-19T07:18:34.679435 | Hyman | pythondev_help_Hyman_2017-07-19T07:18:34.679435 | 1,500,448,714.679435 | 86,208 |
pythondev | help | But the problem is when I connect myself using python requests and I open thee browser I'm not logged in | 2017-07-19T07:19:38.699566 | Hyman | pythondev_help_Hyman_2017-07-19T07:19:38.699566 | 1,500,448,778.699566 | 86,209 |
pythondev | help | Here's my code | 2017-07-19T07:19:59.705803 | Hyman | pythondev_help_Hyman_2017-07-19T07:19:59.705803 | 1,500,448,799.705803 | 86,210 |
pythondev | help | Being logged in is stored in a cookie. Requests has one set of cookies, your browser has another set of cookies | 2017-07-19T07:20:15.710446 | Gabriele | pythondev_help_Gabriele_2017-07-19T07:20:15.710446 | 1,500,448,815.710446 | 86,211 |
pythondev | help | OK I see. And how can I make them communicate then | 2017-07-19T07:21:23.730238 | Hyman | pythondev_help_Hyman_2017-07-19T07:21:23.730238 | 1,500,448,883.730238 | 86,212 |
pythondev | help | and ne'er shall the twain ever meet | 2017-07-19T07:21:24.730632 | Meg | pythondev_help_Meg_2017-07-19T07:21:24.730632 | 1,500,448,884.730632 | 86,213 |
pythondev | help | You'd need to be able to inject the cookies into whatever the browser uses to manage them, which sounds difficult | 2017-07-19T07:22:28.749490 | Gabriele | pythondev_help_Gabriele_2017-07-19T07:22:28.749490 | 1,500,448,948.74949 | 86,214 |
pythondev | help | <https://stackoverflow.com/questions/35495416/importing-request-session-cookies-to-browser> | 2017-07-19T07:22:31.750496 | Meg | pythondev_help_Meg_2017-07-19T07:22:31.750496 | 1,500,448,951.750496 | 86,215 |
pythondev | help | I mean, seems possible using selenium | 2017-07-19T07:22:39.752680 | Meg | pythondev_help_Meg_2017-07-19T07:22:39.752680 | 1,500,448,959.75268 | 86,216 |
pythondev | help | if you wanted to go the other way | 2017-07-19T07:23:17.763887 | Meg | pythondev_help_Meg_2017-07-19T07:23:17.763887 | 1,500,448,997.763887 | 86,217 |
pythondev | help | <https://pypi.python.org/pypi/browser-cookie3/0.6.0> | 2017-07-19T07:23:17.764053 | Meg | pythondev_help_Meg_2017-07-19T07:23:17.764053 | 1,500,448,997.764053 | 86,218 |
pythondev | help | so, you have a number of problems | 2017-07-19T07:26:31.821398 | Meg | pythondev_help_Meg_2017-07-19T07:26:31.821398 | 1,500,449,191.821398 | 86,219 |
pythondev | help | <@Meg> selenium is it a python module or what ? | 2017-07-19T07:27:00.830285 | Hyman | pythondev_help_Hyman_2017-07-19T07:27:00.830285 | 1,500,449,220.830285 | 86,220 |
pythondev | help | <http://www.seleniumhq.org/>
* requests stores the cookies in a location. Is this configurable?
* Browser cookie storage location path varies by browser and OS. How will you handle all that? | 2017-07-19T07:28:13.851654 | Meg | pythondev_help_Meg_2017-07-19T07:28:13.851654 | 1,500,449,293.851654 | 86,221 |
pythondev | help | I'll rather try to import requests session cookies to the browser | 2017-07-19T07:31:56.919376 | Hyman | pythondev_help_Hyman_2017-07-19T07:31:56.919376 | 1,500,449,516.919376 | 86,222 |
pythondev | help | good luck | 2017-07-19T07:36:23.999820 | Meg | pythondev_help_Meg_2017-07-19T07:36:23.999820 | 1,500,449,783.99982 | 86,223 |
pythondev | help | what's the use case? | 2017-07-19T07:36:37.004168 | Meg | pythondev_help_Meg_2017-07-19T07:36:37.004168 | 1,500,449,797.004168 | 86,224 |
pythondev | help | <@Meg> use case ? | 2017-07-19T07:53:21.314103 | Hyman | pythondev_help_Hyman_2017-07-19T07:53:21.314103 | 1,500,450,801.314103 | 86,225 |
pythondev | help | what is the purpose behind this? | 2017-07-19T07:53:40.320390 | Meg | pythondev_help_Meg_2017-07-19T07:53:40.320390 | 1,500,450,820.32039 | 86,226 |
pythondev | help | how do you expect it to be useful? | 2017-07-19T07:53:47.322633 | Meg | pythondev_help_Meg_2017-07-19T07:53:47.322633 | 1,500,450,827.322633 | 86,227 |
pythondev | help | how do you see someone using this? | 2017-07-19T07:53:57.325706 | Meg | pythondev_help_Meg_2017-07-19T07:53:57.325706 | 1,500,450,837.325706 | 86,228 |
pythondev | help | <@Meg> I'm trying to implement a Single sign on system on a Wi-Fi and an external website. I want that every person connected on my Wi-Fi to be automatically logged in to that website | 2017-07-19T07:56:52.382338 | Hyman | pythondev_help_Hyman_2017-07-19T07:56:52.382338 | 1,500,451,012.382338 | 86,229 |
pythondev | help | I once mentioned it here | 2017-07-19T07:57:17.390813 | Hyman | pythondev_help_Hyman_2017-07-19T07:57:17.390813 | 1,500,451,037.390813 | 86,230 |
pythondev | help | so how is this supposed to work with that? | 2017-07-19T08:01:08.471128 | Meg | pythondev_help_Meg_2017-07-19T08:01:08.471128 | 1,500,451,268.471128 | 86,231 |
pythondev | help | <@Alvin> Thanks! I'll try that :smile: | 2017-07-19T09:19:04.417894 | Thomasina | pythondev_help_Thomasina_2017-07-19T09:19:04.417894 | 1,500,455,944.417894 | 86,232 |
pythondev | help | <@Hyman> I regularly use *mechanize* to access websites where you have to login etc... | 2017-07-19T09:19:06.418940 | Ruben | pythondev_help_Ruben_2017-07-19T09:19:06.418940 | 1,500,455,946.41894 | 86,233 |
pythondev | help | and fill out forms in general. *mechanize* emulates a webbrowser. | 2017-07-19T09:19:34.433287 | Ruben | pythondev_help_Ruben_2017-07-19T09:19:34.433287 | 1,500,455,974.433287 | 86,234 |
pythondev | help | If I have a question that isn't really about Python can I still ask it here? Or do I need to go to general or random? | 2017-07-19T09:32:18.847108 | Thomasina | pythondev_help_Thomasina_2017-07-19T09:32:18.847108 | 1,500,456,738.847108 | 86,235 |
pythondev | help | It is development related at least | 2017-07-19T09:32:24.850487 | Thomasina | pythondev_help_Thomasina_2017-07-19T09:32:24.850487 | 1,500,456,744.850487 | 86,236 |
pythondev | help | why not? | 2017-07-19T09:33:25.885286 | Meg | pythondev_help_Meg_2017-07-19T09:33:25.885286 | 1,500,456,805.885286 | 86,237 |
pythondev | help | if its not, we could probably point you in a direction | 2017-07-19T09:33:37.891705 | Meg | pythondev_help_Meg_2017-07-19T09:33:37.891705 | 1,500,456,817.891705 | 86,238 |
pythondev | help | I'm trying to implement a class that create a 2d array, but I'm running into some issues with `__getitem__` | 2017-07-19T09:42:40.203594 | Myong | pythondev_help_Myong_2017-07-19T09:42:40.203594 | 1,500,457,360.203594 | 86,239 |
pythondev | help | <@Myong>, are you using a dict? | 2017-07-19T09:44:04.253106 | Tish | pythondev_help_Tish_2017-07-19T09:44:04.253106 | 1,500,457,444.253106 | 86,240 |
pythondev | help | No, using a list. | 2017-07-19T09:44:10.257290 | Myong | pythondev_help_Myong_2017-07-19T09:44:10.257290 | 1,500,457,450.25729 | 86,241 |
pythondev | help | Basically just taking a 2d array of N x M | 2017-07-19T09:44:23.264694 | Myong | pythondev_help_Myong_2017-07-19T09:44:23.264694 | 1,500,457,463.264694 | 86,242 |
pythondev | help | and I have to sum all the values in the columns | 2017-07-19T09:44:36.272478 | Myong | pythondev_help_Myong_2017-07-19T09:44:36.272478 | 1,500,457,476.272478 | 86,243 |
pythondev | help | I'd argue that it's probably not worth trying to go overboard on the overloads | 2017-07-19T09:45:00.286550 | Gabriele | pythondev_help_Gabriele_2017-07-19T09:45:00.286550 | 1,500,457,500.28655 | 86,244 |
pythondev | help | Which is easy enough | 2017-07-19T09:46:04.324311 | Myong | pythondev_help_Myong_2017-07-19T09:46:04.324311 | 1,500,457,564.324311 | 86,245 |
pythondev | help | My trouble comes in here | 2017-07-19T09:46:13.329552 | Myong | pythondev_help_Myong_2017-07-19T09:46:13.329552 | 1,500,457,573.329552 | 86,246 |
pythondev | help | Basically saying that `__getitem__` is not defined for list | 2017-07-19T09:48:03.395293 | Myong | pythondev_help_Myong_2017-07-19T09:48:03.395293 | 1,500,457,683.395293 | 86,247 |
pythondev | help | but I've defined it in my class. And it works if my 2d list isn't an object instance | 2017-07-19T09:48:22.406974 | Myong | pythondev_help_Myong_2017-07-19T09:48:22.406974 | 1,500,457,702.406974 | 86,248 |
pythondev | help | of my class | 2017-07-19T09:48:25.408677 | Myong | pythondev_help_Myong_2017-07-19T09:48:25.408677 | 1,500,457,705.408677 | 86,249 |
pythondev | help | You're assuming it's saying the wrong thing about your class, but most likely you have given it a list when you think you've given it your class | 2017-07-19T09:49:23.444285 | Gabriele | pythondev_help_Gabriele_2017-07-19T09:49:23.444285 | 1,500,457,763.444285 | 86,250 |
pythondev | help | How should I initialize the list in my class then | 2017-07-19T09:49:59.465991 | Myong | pythondev_help_Myong_2017-07-19T09:49:59.465991 | 1,500,457,799.465991 | 86,251 |
pythondev | help | No idea, you're showing only tiny snippets of code and we've not seen the actual error or the actual structure yet | 2017-07-19T09:50:45.494229 | Gabriele | pythondev_help_Gabriele_2017-07-19T09:50:45.494229 | 1,500,457,845.494229 | 86,252 |
pythondev | help | Alright let me do this then one sec | 2017-07-19T09:51:02.504970 | Myong | pythondev_help_Myong_2017-07-19T09:51:02.504970 | 1,500,457,862.50497 | 86,253 |
pythondev | help | The error comes in line 4 with `self.xl_grid[i][j-1]` | 2017-07-19T09:53:01.577000 | Myong | pythondev_help_Myong_2017-07-19T09:53:01.577000 | 1,500,457,981.577 | 86,254 |
pythondev | help | okay, so obviously your __getitem__ function is irrelevant as you're not dealing with that type here, only lists | 2017-07-19T09:53:57.610304 | Gabriele | pythondev_help_Gabriele_2017-07-19T09:53:57.610304 | 1,500,458,037.610304 | 86,255 |
pythondev | help | Oh wait | 2017-07-19T09:54:33.633238 | Myong | pythondev_help_Myong_2017-07-19T09:54:33.633238 | 1,500,458,073.633238 | 86,256 |
pythondev | help | Personally I wouldn't be trying to implement that logic in a single hairy one-liner, either | 2017-07-19T09:55:49.680366 | Gabriele | pythondev_help_Gabriele_2017-07-19T09:55:49.680366 | 1,500,458,149.680366 | 86,257 |
pythondev | help | Yeah i think that's what's broken | 2017-07-19T09:56:04.689861 | Myong | pythondev_help_Myong_2017-07-19T09:56:04.689861 | 1,500,458,164.689861 | 86,258 |
pythondev | help | what is the _actual_ error? | 2017-07-19T09:56:29.705630 | Gabriele | pythondev_help_Gabriele_2017-07-19T09:56:29.705630 | 1,500,458,189.70563 | 86,259 |
pythondev | help | The error I had previously was due to attempting to subscript the list twice | 2017-07-19T09:57:02.726362 | Myong | pythondev_help_Myong_2017-07-19T09:57:02.726362 | 1,500,458,222.726362 | 86,260 |
pythondev | help | it was giving me a message about the list | 2017-07-19T09:57:14.733671 | Myong | pythondev_help_Myong_2017-07-19T09:57:14.733671 | 1,500,458,234.733671 | 86,261 |
pythondev | help | But not it's not making a 2d array, but that was my fault | 2017-07-19T09:57:24.739796 | Myong | pythondev_help_Myong_2017-07-19T09:57:24.739796 | 1,500,458,244.739796 | 86,262 |
pythondev | help | Works now | 2017-07-19T09:58:04.764609 | Myong | pythondev_help_Myong_2017-07-19T09:58:04.764609 | 1,500,458,284.764609 | 86,263 |
pythondev | help | I'm using Heroku and I want to add PostGIS to my Postgres database, however to do this I need to run in Windows command prompt:
```heroku pg:psql
create extension postgis;```
And that requires that Postgres be installed on my local machine. Is there any way around this? Do I _have to_ install Postgres on my computer? | 2017-07-19T10:12:17.300566 | Thomasina | pythondev_help_Thomasina_2017-07-19T10:12:17.300566 | 1,500,459,137.300566 | 86,264 |
pythondev | help | how are you working locally? | 2017-07-19T10:16:34.465784 | Meg | pythondev_help_Meg_2017-07-19T10:16:34.465784 | 1,500,459,394.465784 | 86,265 |
pythondev | help | eg, dev/staging/prod with their own specific env configurations | 2017-07-19T10:17:03.483743 | Meg | pythondev_help_Meg_2017-07-19T10:17:03.483743 | 1,500,459,423.483743 | 86,266 |
pythondev | help | I just run my code locally...um...I guess that's it. I have the Heroku toolbelt. When I run the command with the toolbet I'm informed that psql.exe could not be found. After a quick search it seems it's because Postgres needs to be installed. | 2017-07-19T10:23:44.743992 | Thomasina | pythondev_help_Thomasina_2017-07-19T10:23:44.743992 | 1,500,459,824.743992 | 86,267 |
pythondev | help | Sorry if I didn't understand your question correctly | 2017-07-19T10:23:54.750356 | Thomasina | pythondev_help_Thomasina_2017-07-19T10:23:54.750356 | 1,500,459,834.750356 | 86,268 |
pythondev | help | I run my app in its development configuration when running it locally. Not that it's that much different from the other modes. | 2017-07-19T10:24:23.769827 | Thomasina | pythondev_help_Thomasina_2017-07-19T10:24:23.769827 | 1,500,459,863.769827 | 86,269 |
pythondev | help | How can you be running locally if you use Postgres but don't have it installed? Are you accessing a Postgres instance remotely? | 2017-07-19T10:24:43.782580 | Gabriele | pythondev_help_Gabriele_2017-07-19T10:24:43.782580 | 1,500,459,883.78258 | 86,270 |
pythondev | help | I didn't think Heroku had a local option | 2017-07-19T10:25:19.805948 | Gabriele | pythondev_help_Gabriele_2017-07-19T10:25:19.805948 | 1,500,459,919.805948 | 86,271 |
pythondev | help | it does, but you really should have everything replicated locally that's on heroky | 2017-07-19T10:25:54.828852 | Meg | pythondev_help_Meg_2017-07-19T10:25:54.828852 | 1,500,459,954.828852 | 86,272 |
pythondev | help | as close to 1:1 as possible | 2017-07-19T10:26:03.834414 | Meg | pythondev_help_Meg_2017-07-19T10:26:03.834414 | 1,500,459,963.834414 | 86,273 |
pythondev | help | Aha. Still curious about how it handles the DB. | 2017-07-19T10:27:38.897290 | Gabriele | pythondev_help_Gabriele_2017-07-19T10:27:38.897290 | 1,500,460,058.89729 | 86,274 |
pythondev | help | Ya I have no idea. I just want to get PostGIS running on Heroku. But I guess I'll need Postgres anyway if I intend to test my app locally. Currently I just plug it into an SQLite DB to test it. | 2017-07-19T10:34:30.176660 | Thomasina | pythondev_help_Thomasina_2017-07-19T10:34:30.176660 | 1,500,460,470.17666 | 86,275 |
pythondev | help | yup, switch that out for postgres. | 2017-07-19T10:34:59.196099 | Gabriele | pythondev_help_Gabriele_2017-07-19T10:34:59.196099 | 1,500,460,499.196099 | 86,276 |
pythondev | help | I must say that I did enjoy the simplicity though, and especially when we have new developers coming in. I wish Postgres could be self-contained somehow to avoid having to set anything up. Oh well. | 2017-07-19T10:42:47.504552 | Thomasina | pythondev_help_Thomasina_2017-07-19T10:42:47.504552 | 1,500,460,967.504552 | 86,277 |
pythondev | help | That's the tradeoff though... SQLite basically has the whole database functionality built right into your application. That's only practical because the functionality it offers is quite minimal. | 2017-07-19T10:44:00.553419 | Gabriele | pythondev_help_Gabriele_2017-07-19T10:44:00.553419 | 1,500,461,040.553419 | 86,278 |
pythondev | help | If you're writing something for multiple developers to work on then everybody could share a Postgres installation on a central server | 2017-07-19T10:44:33.575367 | Gabriele | pythondev_help_Gabriele_2017-07-19T10:44:33.575367 | 1,500,461,073.575367 | 86,279 |
pythondev | help | That's true. I suppose I could have everyone connect to the database on the Heroku staging Dyno for the project though... | 2017-07-19T10:45:31.614085 | Thomasina | pythondev_help_Thomasina_2017-07-19T10:45:31.614085 | 1,500,461,131.614085 | 86,280 |
pythondev | help | Hello. Anyone with experience in django-filer and django-storage (i.e. s3) ? | 2017-07-19T11:15:56.864238 | Ayesha | pythondev_help_Ayesha_2017-07-19T11:15:56.864238 | 1,500,462,956.864238 | 86,281 |
pythondev | help | try <#C0LMFRMB5|django> | 2017-07-19T11:19:47.017512 | Simon | pythondev_help_Simon_2017-07-19T11:19:47.017512 | 1,500,463,187.017512 | 86,282 |
pythondev | help | <@Gabriele> what | 2017-07-19T13:00:48.840446 | Suellen | pythondev_help_Suellen_2017-07-19T13:00:48.840446 | 1,500,469,248.840446 | 86,283 |
pythondev | help | > That's only practical because the functionality it offers is quite minimal. | 2017-07-19T13:00:50.841745 | Suellen | pythondev_help_Suellen_2017-07-19T13:00:50.841745 | 1,500,469,250.841745 | 86,284 |
pythondev | help | SQLite's Full-text search was blazing fast before Postgres had a reasonable FTS at all. | 2017-07-19T13:01:15.857511 | Suellen | pythondev_help_Suellen_2017-07-19T13:01:15.857511 | 1,500,469,275.857511 | 86,285 |
pythondev | help | Docker! | 2017-07-19T13:02:17.895380 | Beula | pythondev_help_Beula_2017-07-19T13:02:17.895380 | 1,500,469,337.89538 | 86,286 |
pythondev | help | I put a `docker-compose.yml` in all my projects now so people can be up and running with it in a few minutes | 2017-07-19T13:02:42.911213 | Beula | pythondev_help_Beula_2017-07-19T13:02:42.911213 | 1,500,469,362.911213 | 86,287 |
pythondev | help | It won't solve all problems, but it's really nice for dev-prod parity, ish | 2017-07-19T13:03:41.945793 | Beula | pythondev_help_Beula_2017-07-19T13:03:41.945793 | 1,500,469,421.945793 | 86,288 |
pythondev | help | <@Suellen> I didn't say the functionality was slow or bad, just that there isn't so much of it | 2017-07-19T13:03:50.951151 | Gabriele | pythondev_help_Gabriele_2017-07-19T13:03:50.951151 | 1,500,469,430.951151 | 86,289 |
pythondev | help | true that | 2017-07-19T13:04:16.966828 | Suellen | pythondev_help_Suellen_2017-07-19T13:04:16.966828 | 1,500,469,456.966828 | 86,290 |
pythondev | help | but I'd guess the most useful stuff is already there | 2017-07-19T13:04:30.975069 | Suellen | pythondev_help_Suellen_2017-07-19T13:04:30.975069 | 1,500,469,470.975069 | 86,291 |
pythondev | help | Does anyone know if there is any possible way to figure out the proper URL for an API call? I have an issue with an API im trying to work with that basically one of the URL parameters can be changed server side and the guy who maintains the server might as well be AWOL. So basically is there any to see the endpoints available if I make a request to the parent endpoint of the endpoint I don't know?
Example - `<http://crucible.server.com/{unknown-endpoint-name}>`
I'd imagine if there is no WADL or some sort of blueprint for a given server than probably not | 2017-07-19T13:33:04.971012 | Myong | pythondev_help_Myong_2017-07-19T13:33:04.971012 | 1,500,471,184.971012 | 86,292 |
pythondev | help | anyone comfortable with marshmallow? ,trying to remove missing data after deserialization ,i don't want `{'first_field': <marshmallow.missing>, 'second_field': u'some value'}` | 2017-07-19T13:37:47.137111 | Rickey | pythondev_help_Rickey_2017-07-19T13:37:47.137111 | 1,500,471,467.137111 | 86,293 |
pythondev | help | hello, question related to something i asked yesterday.
i have a small web app that allows users to search instagram for two hashtags. on the first page they enter their hashtags, on the second page they get the results and a button to process more results. clicking this button send the user to a URL with the next page token and the hash tags (required for processing next results) stored in the url. like this `<http://10.51.50.10:42066/results/J0HWW-lwQAAAF0HWW-jjgAAAFoAKAA%253D%253D/%5B%27lol%27%2C%20%27dog%27%5D>?`
my problem is i keep getting this error and i'm not sure what it means
```
werkzeug.routing.BuildError: Could not build url for endpoint 'results' with values ['tags']. Did you forget to specify values ['token']?
10.51.50.1 - - [19/Jul/2017 18:36:54] "GET /results/J0HWW-lwQAAAF0HWW-jjgAAAFoAKAA%253D%253D/%5B%27lol%27%2C%20%27dog%27%5D? HTTP/1.1" 500 -
INFO:werkzeug:10.51.50.1 - - [19/Jul/2017 18:36:54] "GET /results/J0HWW-lwQAAAF0HWW-jjgAAAFoAKAA%253D%253D/%5B%27lol%27%2C%20%27dog%27%5D? HTTP/1.1" 500 -
```
this is the route
```
@app.route('/results/', methods=['GET', 'POST'], defaults={'token': None, 'tags': None})
@app.route('/results/<token>/<tags>', methods=['GET', 'POST'])
def results(token, tags):
if request.method == 'POST':
tags = request.form['text'].replace(' ', '').split(',')
data = fetch_data(tags=tags, next_page_token=token)
processed_data, token = process_data(data=data, tags=tags)
if request.method == 'GET':
<http://logging.info|logging.info>("TOKEN: {}".format(token))
<http://logging.info|logging.info>("TAGS: {}".format(tags))
data = fetch_data(tags=tags, next_page_token=token)
processed_data, token = process_data(data=data, tags=tags)
return render_template('results.html', data=processed_data[:1], token=token, tags=tags)
return render_template('results.html', data=processed_data[:1], token=token, tags=tags)
```
and this is the template
```
<!DOCTYPE html>
<html>
<body style="background-color:powderblue;">
<h1>{{ data }}</h1>
<form action="{{ url_for('next', token=token, tags=tags) }}">
<input type="submit" value="More results plz" />
</form>
</body>
</html>
``` | 2017-07-19T14:38:03.296819 | Liliana | pythondev_help_Liliana_2017-07-19T14:38:03.296819 | 1,500,475,083.296819 | 86,294 |
pythondev | help | any thoughts? | 2017-07-19T14:38:09.300286 | Liliana | pythondev_help_Liliana_2017-07-19T14:38:09.300286 | 1,500,475,089.300286 | 86,295 |
pythondev | help | ```
127.0.0.1 - - [19/Jul/2017 21:43:01] "GET /results/J0HWW-lwQAAAF0HWW-jjgAAAFoAKAA%253D%253D/%5B%27lol%27%2C%20%27dog%27%5D? HTTP/1.1" 200 -
``` | 2017-07-19T14:43:29.490097 | Suellen | pythondev_help_Suellen_2017-07-19T14:43:29.490097 | 1,500,475,409.490097 | 86,296 |
pythondev | help | ```
from flask import Flask
app = Flask('app')
app.config['DEBUG'] = True
@app.route('/results/', methods=['GET', 'POST'], defaults={'token': None, 'tags': None})
@app.route('/results/<token>/<tags>', methods=['GET', 'POST'])
def results(token, tags):
return 'OK'
``` | 2017-07-19T14:43:47.501312 | Suellen | pythondev_help_Suellen_2017-07-19T14:43:47.501312 | 1,500,475,427.501312 | 86,297 |
pythondev | help | Strange indeed. | 2017-07-19T14:44:30.526776 | Suellen | pythondev_help_Suellen_2017-07-19T14:44:30.526776 | 1,500,475,470.526776 | 86,298 |
pythondev | help | one thought i just had | 2017-07-19T14:46:30.598377 | Liliana | pythondev_help_Liliana_2017-07-19T14:46:30.598377 | 1,500,475,590.598377 | 86,299 |
pythondev | help | my token and tag vars come through as
```
INFO:root:TOKEN: J0HWW-lwQAAAF0HWW-jjgAAAFoAKAA%3D%3D
INFO:root:TAGS: ['lol', 'dog']
``` | 2017-07-19T14:46:48.609309 | Liliana | pythondev_help_Liliana_2017-07-19T14:46:48.609309 | 1,500,475,608.609309 | 86,300 |
pythondev | help | could the tags coming through as a python data structure as a string have somethign to do with it? | 2017-07-19T14:47:02.617738 | Liliana | pythondev_help_Liliana_2017-07-19T14:47:02.617738 | 1,500,475,622.617738 | 86,301 |
pythondev | help | i've been banging my head on this for hours. and you saying strange indeed gave me some validation that is helping me to not go crazy haha | 2017-07-19T14:47:50.646116 | Liliana | pythondev_help_Liliana_2017-07-19T14:47:50.646116 | 1,500,475,670.646116 | 86,302 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.