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
> mysql
2017-08-24T11:19:08.000436
Suellen
pythondev_help_Suellen_2017-08-24T11:19:08.000436
1,503,573,548.000436
90,803
pythondev
help
:rage::rage::rage:
2017-08-24T11:19:16.000426
Suellen
pythondev_help_Suellen_2017-08-24T11:19:16.000426
1,503,573,556.000426
90,804
pythondev
help
I inherited the DB from a previous dev!
2017-08-24T11:26:12.000257
Winnifred
pythondev_help_Winnifred_2017-08-24T11:26:12.000257
1,503,573,972.000257
90,805
pythondev
help
mysql is to <@Suellen> as mongo is to <@Patty>
2017-08-24T11:32:31.000104
Meg
pythondev_help_Meg_2017-08-24T11:32:31.000104
1,503,574,351.000104
90,806
pythondev
help
Postgres for lyfe
2017-08-24T11:32:54.000517
Beula
pythondev_help_Beula_2017-08-24T11:32:54.000517
1,503,574,374.000517
90,807
pythondev
help
it's funny that postgres is more efficient with non-relational data than mongodb...
2017-08-24T11:33:26.000674
Suellen
pythondev_help_Suellen_2017-08-24T11:33:26.000674
1,503,574,406.000674
90,808
pythondev
help
a cruel joke almost
2017-08-24T11:33:35.000101
Suellen
pythondev_help_Suellen_2017-08-24T11:33:35.000101
1,503,574,415.000101
90,809
pythondev
help
The answer to most questions which contain the word "data" in them is "postgres"
2017-08-24T11:35:05.000614
Vada
pythondev_help_Vada_2017-08-24T11:35:05.000614
1,503,574,505.000614
90,810
pythondev
help
how much less efficient is it to query records where a field is in a json type, compared to say a standard varchar field (assuming both are indexed)
2017-08-24T11:44:17.000406
Bruno
pythondev_help_Bruno_2017-08-24T11:44:17.000406
1,503,575,057.000406
90,811
pythondev
help
Not that I can answer the Q
2017-08-24T11:44:55.000814
Vada
pythondev_help_Vada_2017-08-24T11:44:55.000814
1,503,575,095.000814
90,812
pythondev
help
but it will depend on JSON vs JSONB right?
2017-08-24T11:45:03.000716
Vada
pythondev_help_Vada_2017-08-24T11:45:03.000716
1,503,575,103.000716
90,813
pythondev
help
not that much I think
2017-08-24T11:45:11.000762
Ciera
pythondev_help_Ciera_2017-08-24T11:45:11.000762
1,503,575,111.000762
90,814
pythondev
help
probably. i havent researched much of the difference between json/jsonb in postgres yet.
2017-08-24T11:45:43.000475
Bruno
pythondev_help_Bruno_2017-08-24T11:45:43.000475
1,503,575,143.000475
90,815
pythondev
help
`jsonb data is stored in a decomposed binary format that makes it slightly slower to input due to added conversion overhead, but significantly faster to process, since no reparsing is needed. jsonb also supports indexing, which can be a significant advantage.`
2017-08-24T11:45:51.000220
Vada
pythondev_help_Vada_2017-08-24T11:45:51.000220
1,503,575,151.00022
90,816
pythondev
help
from the docs
2017-08-24T11:45:54.000238
Vada
pythondev_help_Vada_2017-08-24T11:45:54.000238
1,503,575,154.000238
90,817
pythondev
help
yea. but what if theres 10k records. or 100k
2017-08-24T11:45:56.000518
Bruno
pythondev_help_Bruno_2017-08-24T11:45:56.000518
1,503,575,156.000518
90,818
pythondev
help
with indexing it could make a huge difference
2017-08-24T11:46:00.000271
Vada
pythondev_help_Vada_2017-08-24T11:46:00.000271
1,503,575,160.000271
90,819
pythondev
help
ah sounds like i would prefer jsonb then.
2017-08-24T11:46:29.000767
Bruno
pythondev_help_Bruno_2017-08-24T11:46:29.000767
1,503,575,189.000767
90,820
pythondev
help
100k is not very big in the db world <@Bruno>
2017-08-24T11:46:37.000266
Vada
pythondev_help_Vada_2017-08-24T11:46:37.000266
1,503,575,197.000266
90,821
pythondev
help
xD
2017-08-24T11:46:41.000069
Vada
pythondev_help_Vada_2017-08-24T11:46:41.000069
1,503,575,201.000069
90,822
pythondev
help
<https://blog.2ndquadrant.com/jsonb-type-performance-postgresql-9-4/>
2017-08-24T11:46:58.000358
Ciera
pythondev_help_Ciera_2017-08-24T11:46:58.000358
1,503,575,218.000358
90,823
pythondev
help
oh i know. but if im already filtering by user...
2017-08-24T11:47:04.000066
Bruno
pythondev_help_Bruno_2017-08-24T11:47:04.000066
1,503,575,224.000066
90,824
pythondev
help
but i suppose there could be 1m after a lot of time. its for personal budgeting. so the the largest table would be all the bank transactions that come in.
2017-08-24T11:47:59.000180
Bruno
pythondev_help_Bruno_2017-08-24T11:47:59.000180
1,503,575,279.00018
90,825
pythondev
help
which could get big very quickly
2017-08-24T11:48:34.000411
Vada
pythondev_help_Vada_2017-08-24T11:48:34.000411
1,503,575,314.000411
90,826
pythondev
help
yea.
2017-08-24T11:49:34.000699
Bruno
pythondev_help_Bruno_2017-08-24T11:49:34.000699
1,503,575,374.000699
90,827
pythondev
help
granted, it will be a while before i get there and can come up with a plan later on. but yea.
2017-08-24T11:49:59.000176
Bruno
pythondev_help_Bruno_2017-08-24T11:49:59.000176
1,503,575,399.000176
90,828
pythondev
help
so, this is what the transaction data coming in would look like <https://plaid.com/docs/api/#transactions>
2017-08-24T11:51:08.000179
Bruno
pythondev_help_Bruno_2017-08-24T11:51:08.000179
1,503,575,468.000179
90,829
pythondev
help
couldn’t `EXPLAIN` help you here ?
2017-08-24T11:52:19.000171
Winnifred
pythondev_help_Winnifred_2017-08-24T11:52:19.000171
1,503,575,539.000171
90,830
pythondev
help
only post-factum, when you already have data and indexes
2017-08-24T11:53:24.000184
Suellen
pythondev_help_Suellen_2017-08-24T11:53:24.000184
1,503,575,604.000184
90,831
pythondev
help
yea.
2017-08-24T11:53:35.000319
Bruno
pythondev_help_Bruno_2017-08-24T11:53:35.000319
1,503,575,615.000319
90,832
pythondev
help
because pg can change a strategy for a query depending on quite a few factors
2017-08-24T11:53:49.000163
Suellen
pythondev_help_Suellen_2017-08-24T11:53:49.000163
1,503,575,629.000163
90,833
pythondev
help
and i plan on doing that. but im no DBA. so still asking for input and advice.
2017-08-24T11:53:59.000012
Bruno
pythondev_help_Bruno_2017-08-24T11:53:59.000012
1,503,575,639.000012
90,834
pythondev
help
we will help you :heart:
2017-08-24T11:54:18.000502
Suellen
pythondev_help_Suellen_2017-08-24T11:54:18.000502
1,503,575,658.000502
90,835
pythondev
help
im trying to get that transactions endpoint working by this evening.
2017-08-24T11:54:55.000613
Bruno
pythondev_help_Bruno_2017-08-24T11:54:55.000613
1,503,575,695.000613
90,836
pythondev
help
chances are, i will probably be ok storing it in jsonb and just taking a few fields in the json and duping them as normal fields to make it easier to do some math operations.
2017-08-24T11:55:43.000185
Bruno
pythondev_help_Bruno_2017-08-24T11:55:43.000185
1,503,575,743.000185
90,837
pythondev
help
you should use the first one everywhere, even in tests
2017-08-24T15:33:34.000025
Suellen
pythondev_help_Suellen_2017-08-24T15:33:34.000025
1,503,588,814.000025
90,838
pythondev
help
i.e. absolute import
2017-08-24T15:33:45.000453
Suellen
pythondev_help_Suellen_2017-08-24T15:33:45.000453
1,503,588,825.000453
90,839
pythondev
help
what's your directory layout? are tests outside your package?
2017-08-24T15:34:01.000223
Suellen
pythondev_help_Suellen_2017-08-24T15:34:01.000223
1,503,588,841.000223
90,840
pythondev
help
the tests are in a directory along side the ClassUnderTest.py
2017-08-24T15:46:22.000164
Lester
pythondev_help_Lester_2017-08-24T15:46:22.000164
1,503,589,582.000164
90,841
pythondev
help
<@Signe> i may use waspy. its simple enough. also, when i ran the docker container with composer, it had an error related to rabbitmq
2017-08-24T15:47:33.000189
Bruno
pythondev_help_Bruno_2017-08-24T15:47:33.000189
1,503,589,653.000189
90,842
pythondev
help
bleh
2017-08-24T15:47:41.000048
Bruno
pythondev_help_Bruno_2017-08-24T15:47:41.000048
1,503,589,661.000048
90,843
pythondev
help
wrong channel anyways... <#C07G5276F|async>
2017-08-24T15:48:06.000309
Bruno
pythondev_help_Bruno_2017-08-24T15:48:06.000309
1,503,589,686.000309
90,844
pythondev
help
ProjectName/ is root folder and contains an __init__.py, TextTools.py and ClassUnderTest.py, and a test/ folder with my unit tests
2017-08-24T15:48:33.000071
Lester
pythondev_help_Lester_2017-08-24T15:48:33.000071
1,503,589,713.000071
90,845
pythondev
help
this is my first time creating my own modules so I maybe be doing something wrong, it's been working fine in my notebooks but ModuleNotFoundError's on ProjectName in tests
2017-08-24T15:50:35.000068
Lester
pythondev_help_Lester_2017-08-24T15:50:35.000068
1,503,589,835.000068
90,846
pythondev
help
so, generally the easiest layout is like this:
2017-08-24T15:52:24.000142
Suellen
pythondev_help_Suellen_2017-08-24T15:52:24.000142
1,503,589,944.000142
90,847
pythondev
help
``` tacticsiege β”œβ”€β”€ ProjectName β”‚ β”œβ”€β”€ stuff.py β”‚ └── textutils.py └── tests β”œβ”€β”€ test_stuff.py └── test_textutils.py 2 directories, 4 files ```
2017-08-24T15:52:27.000100
Suellen
pythondev_help_Suellen_2017-08-24T15:52:27.000100
1,503,589,947.0001
90,848
pythondev
help
(forgot `__init__.py`, but you get an idea)
2017-08-24T15:52:48.000025
Suellen
pythondev_help_Suellen_2017-08-24T15:52:48.000025
1,503,589,968.000025
90,849
pythondev
help
ok got it, my tests are too deep
2017-08-24T15:53:07.000533
Lester
pythondev_help_Lester_2017-08-24T15:53:07.000533
1,503,589,987.000533
90,850
pythondev
help
this way you only ever use `from ProjectName.x import y`
2017-08-24T15:53:35.000127
Suellen
pythondev_help_Suellen_2017-08-24T15:53:35.000127
1,503,590,015.000127
90,851
pythondev
help
thanks <@Suellen> that did the trick
2017-08-24T16:01:29.000266
Lester
pythondev_help_Lester_2017-08-24T16:01:29.000266
1,503,590,489.000266
90,852
pythondev
help
`__init__.py` goes inside of `ProjectName`, right? What is `tactisiege` in your example <@Suellen> ?
2017-08-24T16:14:50.000195
Deedee
pythondev_help_Deedee_2017-08-24T16:14:50.000195
1,503,591,290.000195
90,853
pythondev
help
author_name?
2017-08-24T16:15:04.000040
Deedee
pythondev_help_Deedee_2017-08-24T16:15:04.000040
1,503,591,304.00004
90,854
pythondev
help
root project name, but yeah
2017-08-24T16:15:25.000354
Suellen
pythondev_help_Suellen_2017-08-24T16:15:25.000354
1,503,591,325.000354
90,855
pythondev
help
`ProjectName` is a module so to speak
2017-08-24T16:15:44.000457
Suellen
pythondev_help_Suellen_2017-08-24T16:15:44.000457
1,503,591,344.000457
90,856
pythondev
help
__init__.py has to be in a folder in order for the python interpreter to be able to see into that dir and load files from it as modules
2017-08-24T16:15:46.000016
Bruno
pythondev_help_Bruno_2017-08-24T16:15:46.000016
1,503,591,346.000016
90,857
pythondev
help
that makes sense. thx
2017-08-24T16:16:38.000124
Deedee
pythondev_help_Deedee_2017-08-24T16:16:38.000124
1,503,591,398.000124
90,858
pythondev
help
fwiw, I was also able to leave tests where they were (under ProjectName/) by adding .. to my env's search path
2017-08-24T16:21:39.000228
Lester
pythondev_help_Lester_2017-08-24T16:21:39.000228
1,503,591,699.000228
90,859
pythondev
help
that's... not great
2017-08-24T16:22:21.000512
Suellen
pythondev_help_Suellen_2017-08-24T16:22:21.000512
1,503,591,741.000512
90,860
pythondev
help
oh yea? I was afraid you'd say that cause I like it better :-X
2017-08-24T16:22:45.000336
Lester
pythondev_help_Lester_2017-08-24T16:22:45.000336
1,503,591,765.000336
90,861
pythondev
help
changing system path isn't really a nice solution, only temporarily
2017-08-24T16:22:50.000352
Suellen
pythondev_help_Suellen_2017-08-24T16:22:50.000352
1,503,591,770.000352
90,862
pythondev
help
if I understand it correctly, I only changed it in my virtualenv that the unit tests run in not system level, still not the greatest?
2017-08-24T16:24:25.000415
Lester
pythondev_help_Lester_2017-08-24T16:24:25.000415
1,503,591,865.000415
90,863
pythondev
help
what if you distribute this package to users?
2017-08-24T16:25:25.000024
Suellen
pythondev_help_Suellen_2017-08-24T16:25:25.000024
1,503,591,925.000024
90,864
pythondev
help
I have to cd into the tacticsiege/ directory in my notebooks before I import but that's fine
2017-08-24T16:25:29.000229
Lester
pythondev_help_Lester_2017-08-24T16:25:29.000229
1,503,591,929.000229
90,865
pythondev
help
you can't really expect them to modify their paths
2017-08-24T16:25:33.000167
Suellen
pythondev_help_Suellen_2017-08-24T16:25:33.000167
1,503,591,933.000167
90,866
pythondev
help
yes, understood, bummer... had a bad smell to it but saves me a project in my larger solution file
2017-08-24T16:26:11.000155
Lester
pythondev_help_Lester_2017-08-24T16:26:11.000155
1,503,591,971.000155
90,867
pythondev
help
Can someone please tell me why I am getting these results? ``` # prints: hey πŸ™‚ print email.body # asserts true self.assertIn(u'hey \U0001f642', email.body) # outputs: u"hey \U0001f642" (pdb) email.body ```
2017-08-24T16:32:32.000213
Ashly
pythondev_help_Ashly_2017-08-24T16:32:32.000213
1,503,592,352.000213
90,868
pythondev
help
python2 + unicode :slightly_smiling_face:
2017-08-24T16:33:40.000484
Suellen
pythondev_help_Suellen_2017-08-24T16:33:40.000484
1,503,592,420.000484
90,869
pythondev
help
why is it printing out the unicode character successfully in my development console fine, but shows up as some other encoding in my test assertion and in my pdb console?
2017-08-24T16:33:42.000370
Ashly
pythondev_help_Ashly_2017-08-24T16:33:42.000370
1,503,592,422.00037
90,870
pythondev
help
yeah, it's a nightmare.
2017-08-24T16:33:53.000300
Ashly
pythondev_help_Ashly_2017-08-24T16:33:53.000300
1,503,592,433.0003
90,871
pythondev
help
``` python 1.py hey πŸ™‚ --Return-- &gt; /home/leovp/1.py(3)&lt;module&gt;()-&gt;None -&gt; import pdb; pdb.set_trace() (Pdb) x 'hey πŸ™‚' ```
2017-08-24T16:34:52.000126
Suellen
pythondev_help_Suellen_2017-08-24T16:34:52.000126
1,503,592,492.000126
90,872
pythondev
help
you're doing this? ``` (Pdb) 'hey πŸ™‚' 'hey \xf0\x9f\x99\x82' (Pdb) ```
2017-08-24T16:36:11.000060
Ashly
pythondev_help_Ashly_2017-08-24T16:36:11.000060
1,503,592,571.00006
90,873
pythondev
help
and not getting what i'm getting?
2017-08-24T16:36:21.000237
Ashly
pythondev_help_Ashly_2017-08-24T16:36:21.000237
1,503,592,581.000237
90,874
pythondev
help
In Python 3 I get a smiley
2017-08-24T16:36:45.000217
Suellen
pythondev_help_Suellen_2017-08-24T16:36:45.000217
1,503,592,605.000217
90,875
pythondev
help
In Python 2 exactly what you get
2017-08-24T16:36:51.000055
Suellen
pythondev_help_Suellen_2017-08-24T16:36:51.000055
1,503,592,611.000055
90,876
pythondev
help
i'm trying to work out a bug where that smiley shows up as 4 question marks in an email. which is probably because it gets translated to those four hex values
2017-08-24T16:37:56.000051
Ashly
pythondev_help_Ashly_2017-08-24T16:37:56.000051
1,503,592,676.000051
90,877
pythondev
help
any pointers?
2017-08-24T16:38:02.000279
Ashly
pythondev_help_Ashly_2017-08-24T16:38:02.000279
1,503,592,682.000279
90,878
pythondev
help
python2 only?
2017-08-24T16:38:18.000179
Suellen
pythondev_help_Suellen_2017-08-24T16:38:18.000179
1,503,592,698.000179
90,879
pythondev
help
yep
2017-08-24T16:38:21.000325
Ashly
pythondev_help_Ashly_2017-08-24T16:38:21.000325
1,503,592,701.000325
90,880
pythondev
help
you need to make sure you treat text as unicode when you get it from user, for example, but as soon as you need to send it, it should be properly encoded to bytes
2017-08-24T16:39:12.000114
Suellen
pythondev_help_Suellen_2017-08-24T16:39:12.000114
1,503,592,752.000114
90,881
pythondev
help
emails are bytes, AFAIK
2017-08-24T16:39:30.000309
Suellen
pythondev_help_Suellen_2017-08-24T16:39:30.000309
1,503,592,770.000309
90,882
pythondev
help
``` &gt;&gt;&gt; email_body = 'hey πŸ™‚' &gt;&gt;&gt; email_body 'hey \xf0\x9f\x99\x82' &gt;&gt;&gt; # but: &gt;&gt;&gt; email_body = unicode('hey πŸ™‚', encoding='utf8') &gt;&gt;&gt; email_body u'hey \U0001f642' &gt;&gt;&gt; print(email_body) hey πŸ™‚ &gt;&gt;&gt; ```
2017-08-24T16:40:59.000350
Suellen
pythondev_help_Suellen_2017-08-24T16:40:59.000350
1,503,592,859.00035
90,883
pythondev
help
this works: ``` (Pdb) print 'hey πŸ™‚' hey πŸ™‚ ```
2017-08-24T16:42:20.000242
Ashly
pythondev_help_Ashly_2017-08-24T16:42:20.000242
1,503,592,940.000242
90,884
pythondev
help
there is no such thing as converting a string to bytes in python2.7 no?
2017-08-24T16:42:33.000469
Ashly
pythondev_help_Ashly_2017-08-24T16:42:33.000469
1,503,592,953.000469
90,885
pythondev
help
<@Johana> I see. This is an out of the box VM that runs Jupyter for me.
2017-08-24T16:42:43.000553
Chester
pythondev_help_Chester_2017-08-24T16:42:43.000553
1,503,592,963.000553
90,886
pythondev
help
I’m kind of tempted to update conda as root?
2017-08-24T16:43:04.000125
Chester
pythondev_help_Chester_2017-08-24T16:43:04.000125
1,503,592,984.000125
90,887
pythondev
help
<@Ashly> there is no such thing, correct, and that's why all the mess
2017-08-24T16:43:20.000059
Suellen
pythondev_help_Suellen_2017-08-24T16:43:20.000059
1,503,593,000.000059
90,888
pythondev
help
strings are bytes and bytes are strings by default
2017-08-24T16:43:34.000235
Suellen
pythondev_help_Suellen_2017-08-24T16:43:34.000235
1,503,593,014.000235
90,889
pythondev
help
the only sane way is convert them as soon as they cross a boundary in your system
2017-08-24T16:44:00.000289
Suellen
pythondev_help_Suellen_2017-08-24T16:44:00.000289
1,503,593,040.000289
90,890
pythondev
help
as for "this works", here let me show you an example
2017-08-24T16:44:53.000387
Suellen
pythondev_help_Suellen_2017-08-24T16:44:53.000387
1,503,593,093.000387
90,891
pythondev
help
``` &gt;&gt;&gt; print 'hey πŸ™‚' hey πŸ™‚ &gt;&gt;&gt; print 'hey πŸ™‚'[-1] οΏ½ &gt;&gt;&gt; print 'hey πŸ™‚'[-2] οΏ½ &gt;&gt;&gt; print 'hey πŸ™‚'[-3] οΏ½ &gt;&gt;&gt; print 'hey πŸ™‚'[-4] οΏ½ &gt;&gt;&gt; # four "?" :) ```
2017-08-24T16:46:20.000582
Suellen
pythondev_help_Suellen_2017-08-24T16:46:20.000582
1,503,593,180.000582
90,892
pythondev
help
``` &gt;&gt;&gt; proper = unicode('hey πŸ™‚', encoding='utf8') &gt;&gt;&gt; print proper hey πŸ™‚ &gt;&gt;&gt; print proper[-1] πŸ™‚ &gt;&gt;&gt; print proper[-2] &gt;&gt;&gt; print proper[-3] y &gt;&gt;&gt; print proper[-4] e &gt;&gt;&gt; print proper[-5] h &gt;&gt;&gt; ```
2017-08-24T16:46:58.000202
Suellen
pythondev_help_Suellen_2017-08-24T16:46:58.000202
1,503,593,218.000202
90,893
pythondev
help
ok but encoding it in unicode won't work as `email.body` is already unicode. i get `TypeError: decoding Unicode is not supported`
2017-08-24T16:51:49.000129
Ashly
pythondev_help_Ashly_2017-08-24T16:51:49.000129
1,503,593,509.000129
90,894
pythondev
help
oh :smile:
2017-08-24T16:52:20.000434
Suellen
pythondev_help_Suellen_2017-08-24T16:52:20.000434
1,503,593,540.000434
90,895
pythondev
help
so, how do you send it?
2017-08-24T16:53:02.000137
Suellen
pythondev_help_Suellen_2017-08-24T16:53:02.000137
1,503,593,582.000137
90,896
pythondev
help
the last steps..
2017-08-24T16:53:08.000202
Suellen
pythondev_help_Suellen_2017-08-24T16:53:08.000202
1,503,593,588.000202
90,897
pythondev
help
well there are two problems no? it should not show up like `u'hey \U0001f642'` in my test assertion right?
2017-08-24T16:53:29.000284
Ashly
pythondev_help_Ashly_2017-08-24T16:53:29.000284
1,503,593,609.000284
90,898
pythondev
help
when i fetch it from the db it shows up like that too
2017-08-24T16:55:22.000087
Ashly
pythondev_help_Ashly_2017-08-24T16:55:22.000087
1,503,593,722.000087
90,899
pythondev
help
no, it's OK
2017-08-24T16:55:39.000663
Suellen
pythondev_help_Suellen_2017-08-24T16:55:39.000663
1,503,593,739.000663
90,900
pythondev
help
``` &gt;&gt;&gt; s u'hey \U0001f642' &gt;&gt;&gt; print(s) hey πŸ™‚ &gt;&gt;&gt; ```
2017-08-24T16:55:43.000051
Suellen
pythondev_help_Suellen_2017-08-24T16:55:43.000051
1,503,593,743.000051
90,901
pythondev
help
repr shows a more readable representation
2017-08-24T16:55:55.000040
Suellen
pythondev_help_Suellen_2017-08-24T16:55:55.000040
1,503,593,755.00004
90,902