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
<@Stefan> any success in your coin-source filtering?
2018-01-30T14:09:23.000684
Barney
pythondev_help_Barney_2018-01-30T14:09:23.000684
1,517,321,363.000684
32,124
pythondev
help
<@Barney> I focused on different problems (user table)
2018-01-30T14:24:28.000168
Stefan
pythondev_help_Stefan_2018-01-30T14:24:28.000168
1,517,322,268.000168
32,125
pythondev
help
and on graphs as evidence
2018-01-30T14:25:07.000128
Stefan
pythondev_help_Stefan_2018-01-30T14:25:07.000128
1,517,322,307.000128
32,126
pythondev
help
I experimented a bit
2018-01-30T14:25:59.000034
Barney
pythondev_help_Barney_2018-01-30T14:25:59.000034
1,517,322,359.000034
32,127
pythondev
help
if you're interested
2018-01-30T14:26:02.000212
Barney
pythondev_help_Barney_2018-01-30T14:26:02.000212
1,517,322,362.000212
32,128
pythondev
help
<@Barney> surely I'm interested! what was your conclusion?
2018-01-30T14:41:47.000863
Stefan
pythondev_help_Stefan_2018-01-30T14:41:47.000863
1,517,323,307.000863
32,129
pythondev
help
I'm trying to store a text version of a code snippet while maintaining formatting. I've tried things from shell but no joy. I've tried searching but "storing code snippet text" but it's very noisy. I'd like to have some function ```def foo(): ... ``` or maybe canonical flatten or sample code snippet and be able to...
2018-01-30T14:46:45.000062
Monroe
pythondev_help_Monroe_2018-01-30T14:46:45.000062
1,517,323,605.000062
32,130
pythondev
help
assuming you're getting data with new lines, you should be able to store that as a "string"
2018-01-30T14:47:49.000410
Garrett
pythondev_help_Garrett_2018-01-30T14:47:49.000410
1,517,323,669.00041
32,131
pythondev
help
So the query is something like: ``` User.query.join(User.interested_in).join(User.excluded_sources).filter(or_(Coin.id == 'BCH', Source.id == 2)) ```
2018-01-30T14:50:23.000495
Barney
pythondev_help_Barney_2018-01-30T14:50:23.000495
1,517,323,823.000495
32,132
pythondev
help
which is quite simple
2018-01-30T14:50:29.000254
Barney
pythondev_help_Barney_2018-01-30T14:50:29.000254
1,517,323,829.000254
32,133
pythondev
help
and it's really fast
2018-01-30T14:51:17.000809
Barney
pythondev_help_Barney_2018-01-30T14:51:17.000809
1,517,323,877.000809
32,134
pythondev
help
errr....
2018-01-30T14:51:23.000152
Monroe
pythondev_help_Monroe_2018-01-30T14:51:23.000152
1,517,323,883.000152
32,135
pythondev
help
I'll upload a snippet
2018-01-30T14:51:27.000810
Barney
pythondev_help_Barney_2018-01-30T14:51:27.000810
1,517,323,887.00081
32,136
pythondev
help
are you suggesting that I store it like a txt file or a blob or ? the new line barfs on shell, I can't str(func) and get a str represenation afaik
2018-01-30T14:51:59.000151
Monroe
pythondev_help_Monroe_2018-01-30T14:51:59.000151
1,517,323,919.000151
32,137
pythondev
help
```&gt;&gt;&gt; a = str("def foo(): SyntaxError: EOL while scanning string literal```
2018-01-30T14:52:43.000347
Monroe
pythondev_help_Monroe_2018-01-30T14:52:43.000347
1,517,323,963.000347
32,138
pythondev
help
sure, single quoted strings can't have literal newlines in them
2018-01-30T14:53:02.000849
Garrett
pythondev_help_Garrett_2018-01-30T14:53:02.000849
1,517,323,982.000849
32,139
pythondev
help
but `a = str("def foo():\n")` work work fine
2018-01-30T14:53:12.000903
Garrett
pythondev_help_Garrett_2018-01-30T14:53:12.000903
1,517,323,992.000903
32,140
pythondev
help
<https://pastebin.com/4JwNUM23>
2018-01-30T14:53:19.000290
Barney
pythondev_help_Barney_2018-01-30T14:53:19.000290
1,517,323,999.00029
32,141
pythondev
help
or `a = """def foo(): whatever """`
2018-01-30T14:53:28.000764
Garrett
pythondev_help_Garrett_2018-01-30T14:53:28.000764
1,517,324,008.000764
32,142
pythondev
help
the latter is a multi-line string or docstring (depending on use)
2018-01-30T14:54:28.000752
Garrett
pythondev_help_Garrett_2018-01-30T14:54:28.000752
1,517,324,068.000752
32,143
pythondev
help
hmmm.... ```&gt;&gt;&gt; a = """def foo(): pass """ &gt;&gt;&gt; a 'def foo():\n pass\n ' ``` so now I'm thinking maybe rst or MD might be way then...
2018-01-30T14:56:45.000371
Monroe
pythondev_help_Monroe_2018-01-30T14:56:45.000371
1,517,324,205.000371
32,144
pythondev
help
and then, yeah, you'd want to store that in the db as a blob
2018-01-30T14:56:48.000048
Garrett
pythondev_help_Garrett_2018-01-30T14:56:48.000048
1,517,324,208.000048
32,145
pythondev
help
I wonder how it would format on the "way out"
2018-01-30T14:57:44.000145
Monroe
pythondev_help_Monroe_2018-01-30T14:57:44.000145
1,517,324,264.000145
32,146
pythondev
help
depends on where it's going
2018-01-30T14:57:54.000028
Garrett
pythondev_help_Garrett_2018-01-30T14:57:54.000028
1,517,324,274.000028
32,147
pythondev
help
if you have github-flavored markdown (markdown that supports code fences), you could parse it with your markdown renderer. otherwise you could stick it inside some `&lt;pre&gt;` tags if it's just HTML
2018-01-30T14:58:35.000164
Garrett
pythondev_help_Garrett_2018-01-30T14:58:35.000164
1,517,324,315.000164
32,148
pythondev
help
I'm liking that solution, thanks
2018-01-30T15:03:01.000285
Monroe
pythondev_help_Monroe_2018-01-30T15:03:01.000285
1,517,324,581.000285
32,149
pythondev
help
you'd do the same thing if you were, say, storing markdown-formatted blog posts
2018-01-30T15:05:48.000745
Garrett
pythondev_help_Garrett_2018-01-30T15:05:48.000745
1,517,324,748.000745
32,150
pythondev
help
Running into an `InterfaceError: connection already closed` error when writing functional tests that work with Celery. It seems like the root of the problem lies in the relationship between PostgreSQL / threads in tests / transactions. Having difficulty isolating the issue. Anyone have experience with transactions / mu...
2018-01-30T15:27:47.000407
Emerald
pythondev_help_Emerald_2018-01-30T15:27:47.000407
1,517,326,067.000407
32,151
pythondev
help
Using the Celery worker fixture and overriding the basic settings with typical project-specific config
2018-01-30T15:28:12.000579
Emerald
pythondev_help_Emerald_2018-01-30T15:28:12.000579
1,517,326,092.000579
32,152
pythondev
help
However it seems like when the fixture is being created for a test, the test fails because the connections have already been closed by the celery fixture.
2018-01-30T15:28:47.000183
Emerald
pythondev_help_Emerald_2018-01-30T15:28:47.000183
1,517,326,127.000183
32,153
pythondev
help
Where do you typically store third party API keys needed to run a script?
2018-01-30T15:50:30.000402
Nohemi
pythondev_help_Nohemi_2018-01-30T15:50:30.000402
1,517,327,430.000402
32,154
pythondev
help
often in environment variables
2018-01-30T15:58:50.000614
Leanora
pythondev_help_Leanora_2018-01-30T15:58:50.000614
1,517,327,930.000614
32,155
pythondev
help
and _never ever_ in version control
2018-01-30T16:18:42.000167
Brande
pythondev_help_Brande_2018-01-30T16:18:42.000167
1,517,329,122.000167
32,156
pythondev
help
:point_up:
2018-01-30T16:24:19.000620
Floy
pythondev_help_Floy_2018-01-30T16:24:19.000620
1,517,329,459.00062
32,157
pythondev
help
especially if you don’t want your AWS keys scraped off github
2018-01-30T16:24:31.000225
Floy
pythondev_help_Floy_2018-01-30T16:24:31.000225
1,517,329,471.000225
32,158
pythondev
help
<https://www.vaultproject.io/>
2018-01-30T16:26:05.000230
Dorinda
pythondev_help_Dorinda_2018-01-30T16:26:05.000230
1,517,329,565.00023
32,159
pythondev
help
Vault does add complexity though, depending on the situation env vars may suffice
2018-01-30T16:28:13.000543
Dorinda
pythondev_help_Dorinda_2018-01-30T16:28:13.000543
1,517,329,693.000543
32,160
pythondev
help
Curious to understand the risks (if any) of hard-coding an API key into your application (Providing it's kept out of version control etc)
2018-01-30T16:28:59.000389
Porsha
pythondev_help_Porsha_2018-01-30T16:28:59.000389
1,517,329,739.000389
32,161
pythondev
help
One risk maybe that someone later on may not realize the API keys are hard coded and put the code into source control
2018-01-30T16:30:40.000578
Dorinda
pythondev_help_Dorinda_2018-01-30T16:30:40.000578
1,517,329,840.000578
32,162
pythondev
help
But for small projects the general consensus is that it's fine?
2018-01-30T16:31:40.000298
Porsha
pythondev_help_Porsha_2018-01-30T16:31:40.000298
1,517,329,900.000298
32,163
pythondev
help
I tend to keep even small projects in source control so I'd personally still refrain from hard coding API keys
2018-01-30T16:33:05.000470
Dorinda
pythondev_help_Dorinda_2018-01-30T16:33:05.000470
1,517,329,985.00047
32,164
pythondev
help
Another approach (even if I prefer the Vault one) could be to rely on config files and deploy your app via ansible, so you won't have credentials in you app repo (just sample files) and all your deploy/credentials can be managed via ansible templates in a single repo with restricted access
2018-01-30T16:33:49.000620
Nancy
pythondev_help_Nancy_2018-01-30T16:33:49.000620
1,517,330,029.00062
32,165
pythondev
help
but every organization has different levels of scrutiny and risk assessments
2018-01-30T16:34:07.000790
Dorinda
pythondev_help_Dorinda_2018-01-30T16:34:07.000790
1,517,330,047.00079
32,166
pythondev
help
the end goal remains the same: no credentials in code repo
2018-01-30T16:34:43.000802
Nancy
pythondev_help_Nancy_2018-01-30T16:34:43.000802
1,517,330,083.000802
32,167
pythondev
help
but still, if you are paying for an external API, I would probably try to keep the API keys secure.
2018-01-30T16:34:59.000139
Dorinda
pythondev_help_Dorinda_2018-01-30T16:34:59.000139
1,517,330,099.000139
32,168
pythondev
help
Even a private repo?
2018-01-30T16:35:05.000538
Porsha
pythondev_help_Porsha_2018-01-30T16:35:05.000538
1,517,330,105.000538
32,169
pythondev
help
I hard coded in Facebook Ads credentials into a script and handing off that script turns into a tricky situation.
2018-01-30T16:35:10.000484
Nohemi
pythondev_help_Nohemi_2018-01-30T16:35:10.000484
1,517,330,110.000484
32,170
pythondev
help
even private
2018-01-30T16:35:14.000115
Dorinda
pythondev_help_Dorinda_2018-01-30T16:35:14.000115
1,517,330,114.000115
32,171
pythondev
help
it’s also simply good practice - it makes it easy to change the keys for example
2018-01-30T16:38:35.000328
Zack
pythondev_help_Zack_2018-01-30T16:38:35.000328
1,517,330,315.000328
32,172
pythondev
help
<https://gist.github.com/raghubetina/0ab2baa497e1a97cdc3cde947c426251>
2018-01-30T16:38:54.000221
Dorinda
pythondev_help_Dorinda_2018-01-30T16:38:54.000221
1,517,330,334.000221
32,173
pythondev
help
I suppose you could grep for a key across a code base, but then some guy split it into multiple lines to satisfy pylint and you missed one. :slightly_smiling_face:
2018-01-30T16:39:08.000803
Zack
pythondev_help_Zack_2018-01-30T16:39:08.000803
1,517,330,348.000803
32,174
pythondev
help
<https://medium.freecodecamp.org/how-to-securely-store-api-keys-4ff3ea19ebda>
2018-01-30T16:40:24.000542
Dorinda
pythondev_help_Dorinda_2018-01-30T16:40:24.000542
1,517,330,424.000542
32,175
pythondev
help
also, if there’s ever a chance anybody else could be working on the project, it allows you to provide them with code to hack on without giving them access to everything
2018-01-30T16:40:25.000414
Zack
pythondev_help_Zack_2018-01-30T16:40:25.000414
1,517,330,425.000414
32,176
pythondev
help
simplifies testing across environments as well
2018-01-30T16:40:48.000494
Zack
pythondev_help_Zack_2018-01-30T16:40:48.000494
1,517,330,448.000494
32,177
pythondev
help
If you search around, I can't find the article I was looking for, but developers have reported that their API keys have been compromised even from private repos.
2018-01-30T16:41:22.000135
Dorinda
pythondev_help_Dorinda_2018-01-30T16:41:22.000135
1,517,330,482.000135
32,178
pythondev
help
wow
2018-01-30T16:41:36.000049
Porsha
pythondev_help_Porsha_2018-01-30T16:41:36.000049
1,517,330,496.000049
32,179
pythondev
help
I think for the mean time i'll just add my config file to my .gitignore file
2018-01-30T16:42:45.000802
Porsha
pythondev_help_Porsha_2018-01-30T16:42:45.000802
1,517,330,565.000802
32,180
pythondev
help
or maybe also, just add these things to a .env file which is ignored, and have your config load from the environment variables
2018-01-30T16:44:03.000739
Zack
pythondev_help_Zack_2018-01-30T16:44:03.000739
1,517,330,643.000739
32,181
pythondev
help
allows it to munge things/provide defaults as needed
2018-01-30T16:44:18.000491
Zack
pythondev_help_Zack_2018-01-30T16:44:18.000491
1,517,330,658.000491
32,182
pythondev
help
yeah that's a good shout
2018-01-30T16:44:21.000225
Porsha
pythondev_help_Porsha_2018-01-30T16:44:21.000225
1,517,330,661.000225
32,183
pythondev
help
very awesome! thanks :slightly_smiling_face: I see some code I can learn from!
2018-01-30T16:45:04.000468
Stefan
pythondev_help_Stefan_2018-01-30T16:45:04.000468
1,517,330,704.000468
32,184
pythondev
help
I know it probably seems like a pain, but I’ve seen so many projects that just started out as things people were hacking on and surprise, there’s configuration sprinkled through, so it’s just better to start it right from the beginning. :slightly_smiling_face:
2018-01-30T16:45:18.000412
Zack
pythondev_help_Zack_2018-01-30T16:45:18.000412
1,517,330,718.000412
32,185
pythondev
help
i'm new to sqla so its very interesting
2018-01-30T16:45:31.000796
Stefan
pythondev_help_Stefan_2018-01-30T16:45:31.000796
1,517,330,731.000796
32,186
pythondev
help
<@Zack> I once made this: <https://github.com/kootenpv/gittyleaks> so you can check what mistakes you've made :stuck_out_tongue:
2018-01-30T16:53:45.000229
Stefan
pythondev_help_Stefan_2018-01-30T16:53:45.000229
1,517,331,225.000229
32,187
pythondev
help
i've wanted to scan the whole github and let people know who have mistakes and have an email listed, but that's against github's rules
2018-01-30T16:55:18.000052
Stefan
pythondev_help_Stefan_2018-01-30T16:55:18.000052
1,517,331,318.000052
32,188
pythondev
help
ah neat
2018-01-30T16:56:03.000009
Zack
pythondev_help_Zack_2018-01-30T16:56:03.000009
1,517,331,363.000009
32,189
pythondev
help
<@Stefan> :taco:
2018-01-30T16:56:09.000084
Zack
pythondev_help_Zack_2018-01-30T16:56:09.000084
1,517,331,369.000084
32,190
pythondev
help
very good example <@Barney>
2018-01-30T16:59:36.000570
Stefan
pythondev_help_Stefan_2018-01-30T16:59:36.000570
1,517,331,576.00057
32,191
pythondev
help
I'm sure it happend to a lot of us to leak some API key by mistake on github
2018-01-30T17:00:40.000871
Micki
pythondev_help_Micki_2018-01-30T17:00:40.000871
1,517,331,640.000871
32,192
pythondev
help
im wondering how to use `runserver`, it seems like REST
2018-01-30T17:01:12.000251
Stefan
pythondev_help_Stefan_2018-01-30T17:01:12.000251
1,517,331,672.000251
32,193
pythondev
help
yea indeed, I've learned a lot from those times
2018-01-30T17:01:35.000403
Stefan
pythondev_help_Stefan_2018-01-30T17:01:35.000403
1,517,331,695.000403
32,194
pythondev
help
once you know the pattern of AWS info you can just plainly search for that on github and you won't be disappointed.... or actually you will
2018-01-30T17:01:58.000400
Stefan
pythondev_help_Stefan_2018-01-30T17:01:58.000400
1,517,331,718.0004
32,195
pythondev
help
yeah they now email you when they detect a secret
2018-01-30T17:03:10.000309
Micki
pythondev_help_Micki_2018-01-30T17:03:10.000309
1,517,331,790.000309
32,196
pythondev
help
but only for some service with particular API key I suppose
2018-01-30T17:03:25.000137
Micki
pythondev_help_Micki_2018-01-30T17:03:25.000137
1,517,331,805.000137
32,197
pythondev
help
oh really, so they've done it themselves, nice :slightly_smiling_face:
2018-01-30T17:03:55.000571
Stefan
pythondev_help_Stefan_2018-01-30T17:03:55.000571
1,517,331,835.000571
32,198
pythondev
help
I have some emails with them over it
2018-01-30T17:04:13.000322
Stefan
pythondev_help_Stefan_2018-01-30T17:04:13.000322
1,517,331,853.000322
32,199
pythondev
help
not giving myself the illusion that i've inspired them lol, im very sure its not a new idea
2018-01-30T17:04:32.000510
Stefan
pythondev_help_Stefan_2018-01-30T17:04:32.000510
1,517,331,872.00051
32,200
pythondev
help
also wondering how it relates to: <https://blog.miguelgrinberg.com/post/migrating-from-flask-script-to-the-new-flask-cli>
2018-01-30T17:09:07.000538
Stefan
pythondev_help_Stefan_2018-01-30T17:09:07.000538
1,517,332,147.000538
32,201
pythondev
help
they’ve gotten pretty good about proactive security stuff
2018-01-30T17:09:16.000459
Zack
pythondev_help_Zack_2018-01-30T17:09:16.000459
1,517,332,156.000459
32,202
pythondev
help
i had a similar project <@Stefan> I called it morking. that’s a mix between google dorking and my name, hehe. I used a custom google search and splunk to do a very similar thing. I would often find stuff stashed into github.
2018-01-30T17:09:55.000394
Davina
pythondev_help_Davina_2018-01-30T17:09:55.000394
1,517,332,195.000394
32,203
pythondev
help
sounds like a real fun project mike :slightly_smiling_face: can't believe I haven't heard of splunk
2018-01-30T17:10:46.000204
Stefan
pythondev_help_Stefan_2018-01-30T17:10:46.000204
1,517,332,246.000204
32,204
pythondev
help
i really like google search and i'm sad they don't have an api for what I would want (use GSE results but not display them on a page)
2018-01-30T17:11:29.000488
Stefan
pythondev_help_Stefan_2018-01-30T17:11:29.000488
1,517,332,289.000488
32,205
pythondev
help
you can create your own custom search engine and use their api.
2018-01-30T17:12:01.000362
Davina
pythondev_help_Davina_2018-01-30T17:12:01.000362
1,517,332,321.000362
32,206
pythondev
help
that’s what i did.
2018-01-30T17:12:11.000029
Davina
pythondev_help_Davina_2018-01-30T17:12:11.000029
1,517,332,331.000029
32,207
pythondev
help
yea I did that too, but that's not the intended use
2018-01-30T17:12:39.000272
Stefan
pythondev_help_Stefan_2018-01-30T17:12:39.000272
1,517,332,359.000272
32,208
pythondev
help
TOS state you can only embed the results as is on a website - any other usage is not allowed
2018-01-30T17:12:55.000638
Stefan
pythondev_help_Stefan_2018-01-30T17:12:55.000638
1,517,332,375.000638
32,209
pythondev
help
:disappointed:
2018-01-30T17:13:11.000455
Stefan
pythondev_help_Stefan_2018-01-30T17:13:11.000455
1,517,332,391.000455
32,210
pythondev
help
ah, oops.
2018-01-30T17:13:19.000561
Davina
pythondev_help_Davina_2018-01-30T17:13:19.000561
1,517,332,399.000561
32,211
pythondev
help
they went right into splunk.
2018-01-30T17:13:24.000422
Davina
pythondev_help_Davina_2018-01-30T17:13:24.000422
1,517,332,404.000422
32,212
pythondev
help
lol
2018-01-30T17:13:27.000034
Davina
pythondev_help_Davina_2018-01-30T17:13:27.000034
1,517,332,407.000034
32,213
pythondev
help
i think bing is more lenient
2018-01-30T17:14:00.000248
Stefan
pythondev_help_Stefan_2018-01-30T17:14:00.000248
1,517,332,440.000248
32,214
pythondev
help
like who uses bing.... well... scrapers lol
2018-01-30T17:14:10.000326
Stefan
pythondev_help_Stefan_2018-01-30T17:14:10.000326
1,517,332,450.000326
32,215
pythondev
help
either way, i only cared about operating systems my services were running on. I wanted to catch any vulns there were posted to the Google hacking DB before they were practiced on my servers.
2018-01-30T17:14:22.000309
Davina
pythondev_help_Davina_2018-01-30T17:14:22.000309
1,517,332,462.000309
32,216
pythondev
help
wow, you'd be the first to know :stuck_out_tongue:
2018-01-30T17:14:38.000327
Stefan
pythondev_help_Stefan_2018-01-30T17:14:38.000327
1,517,332,478.000327
32,217
pythondev
help
I also wanted to make sure my servers didn’t show up.
2018-01-30T17:14:44.000308
Davina
pythondev_help_Davina_2018-01-30T17:14:44.000308
1,517,332,484.000308
32,218
pythondev
help
it was a cool project. one of my first ones in python.
2018-01-30T17:15:00.000516
Davina
pythondev_help_Davina_2018-01-30T17:15:00.000516
1,517,332,500.000516
32,219
pythondev
help
really nice first one
2018-01-30T17:15:33.000443
Stefan
pythondev_help_Stefan_2018-01-30T17:15:33.000443
1,517,332,533.000443
32,220
pythondev
help
i’d hate to take a look at the code nowadays.
2018-01-30T17:16:01.000128
Davina
pythondev_help_Davina_2018-01-30T17:16:01.000128
1,517,332,561.000128
32,221
pythondev
help
lol
2018-01-30T17:16:06.000215
Davina
pythondev_help_Davina_2018-01-30T17:16:06.000215
1,517,332,566.000215
32,222
pythondev
help
How to shard a large tree data structure in memory or sync on disk using PyTorch?
2018-01-30T17:41:06.000175
Jessie
pythondev_help_Jessie_2018-01-30T17:41:06.000175
1,517,334,066.000175
32,223