« first day (2145 days earlier)      last day (2804 days later) » 

12:35 AM
oops...199 rep yesterday. and that -1 was from a downvote >_>; then again, I should really be downvoting things I think are bad, even at the cost of rep (and progress towards legendary I guess)
 
I don't know how this happened but I somehow gave a downvote to an answer and I don't remember actually doing that. I don't get it......
 
do you use mobile? I did that when just trying to scroll once
awesome thing number 1002 of Jupyter Notebooks: magic command %%latex for cells is just cool :)
 
1:11 AM
@JGreenwell I was actually on mobile when that came up....that makes sense
 
yeah, I felt bad cause I didn't really wanted to downvote and person never editted it so I couldn't remove it either
 
and we can't cheat the system by editing ourselves right?
 
I have less than 2k so never tried (assuming it needed an edit)
if it is a really low rep user or your afraid deletion, you could custom mod flag asking for downvote to be removed
 
1:28 AM
^^ yeah I was thinking about that actually
ugh....*this* is the kind of stereotyping I can't stand
Please don't feed the coders https://t.co/LtRMPHEBRu
LOL FEEDZ ME PIZZAS AND THE PEPSIS
I WRITEZ 1337 COD3Z
 
I like pizza, "NO PEPSI...COKE!", and popcorn is better than potato chips/crisps....great, now I want pub food. Jerk ;P
 
One of my favourite pub dishes is a roast beef dip
with sweet potato fries
 
^ that is my wife's absolute fav
 
so good! :)
I like pizza too...but it's been ordered sooooooo much that I'm kinda sick of it
Man...once it would be awesome to show up and like...HEY COOL! CHEESEBURGERS!!!!
:P
:D
 
my favorite pub food is bangers if done correctly (beer braised and extra bread in the sausage mixture - that's why they are bangers after all) and meat pies most of the time cause the first is hard to find
heh...I have finally convince another data guy to learn Python cause I showed him how to run R in Jupyter and even push variables back and forth between the languages (so use the best of both) :) :D
 
1:42 AM
yaaay
yeah...I might have overreacted over that tweet I posted. :P I should go blow off some steam
I'm gonna go for a run.
 
have fun @idjaw
 
o/
 
2:32 AM
Yup. Feel better :D
 
DSM
Brief evening cabbage.
 
heyo DSM
 
DSM
Hey, did you ever track down what was going on with your inheritance issues a few weeks ago?
(One problem with dropping in and out of this room is that you hear the start of stories but not always the end. :-)
 
no :( My alternative design was accepted
so I moved on to more critical items
 
DSM
Life is full of mysteries!
 
2:45 AM
I do have a feeling that there is a bug somewhere that I would love to find. I have an issue open for it to get to it eventually .
 
mysteries are the spice of life
 
DSM
Also shichimi tōgarashi. But mysteries too!
 
hmm. I wonder what the criteria is for a valid app to use this API: runkeeper.com/partner/applications/register
 
chilies are yummy
 
looking up stats in the default UI is really annoying. I want to see if I can interface with the API to get better data
but I need to register an app to get the proper credentials to use the API
oh. but they let you download your data....even better. No pesky registration
:D
 
DSM
3:03 AM
If it's your data, that seems only fair..
 
they export it in to separate gpx files....
wow....they REALLY want to make it hard for you to do any of the data analysis yourself
but hey...they are trying to make money off their app...which is allowed :)
 
all data collection sites make it hard to do analysis yourself - unless it is really, really simple analysis like a boolean or just bi-value field - otherwise they would get no real money
 
3:18 AM
well. Time to call it a night
rbrb o/
 
rbrb idjaw, I'm off too so rbrb all as well
 
is that possible to pull codes from GAE server?
codes means server files.
I have access to the staging environment.
 
4:38 AM
cbg
 
4:54 AM
@JGreenwell ... those doc updates...
 
cbg!
this pains me in so many ways...stackoverflow.com/questions/39218862/…
 
cbg @Karin
that is like "scusi"?
"explain the output of this Python script"
 
the accepted answer...
 
as in: "explain Hell yeah,I'm genius"
well, I can't explain that
 
was posted after a bunch of us tried to patiently tell the OP about what "or" means X_X
 
I'm already that first vote haha
 
well that much I could guess
 
anyway, how are you Antti?=]
 
sleepy, just woke up :D
 
it's 1am, night's just begun >:D
 
5:06 AM
"what to do before drinking the first cup of coffee"
yeah it is the time at which serious programmers wake up :D
aight :?
 
I got 199 rep yesterday and thought of you and your advice to try to not fall short of 200 if I'm close >_>
I'm sorry sensei
 
I did upvote you once when I noticed this
but I guess you got a downvote :D
 
no, I downvoted something bahahaha
 
lol.
I am trying to push everyone past 10k. or 20k
 
it was earlier in the day though! before I thought I was close XD. but even then, I shouldn't let rep affect what I downvote right right?
 
5:08 AM
it is true
 
I was just being true to myself
 
but... you could "subtly whine for upvotes here" :D
just make sure that @NinjaPuppy doesn't notice it
anyhow, repwise the 3k, 10k and 20k milestones are important
 
I'm still at the newbie phase where I'm too scared to ask for anything here=] well more like, I didn't realize I was that close until the next day haha
 
3k you get cv, 10k can delete old posts and 20k can instadelete.
 
I guess if I keep going at the rate I am I'll be 10k in a month. but that's a big if
 
5:11 AM
yeah, don't let life interfere with Stack Overflow!
I am pretty good at it
 
those things are different? O_O
 
actually I don't know, I have no life :D
 
at least you cannot kill that which has no life...
 
I am a zombie
@Karin anyway, what keeps me coming back to stackoverflow is this chat :D
and in this chat, the discussions that are off-topic
or just tangentially on-topic
 
seems like a pretty awesome group of people =]
 
5:20 AM
for example 1 week ago corvid linked a blog article written by a questionable Indian online training institution...
... whose HQ is in Bengaluru, so we've activated our sleeper agent @BhargavRao in Bengaluru and he will go on site to investigate that business on site. :D
 
oh dear o_o
is this a fairly international group?
 
the wording is questionable...
 
well, origin countries of the room regulars: US, UK, Australia, Canada, India, The Netherlands, Russia, Finland, Hungary, Germany, Armenia; occasionally someone from Sweden, Nepal, Serbia, France, Tunisia and so forth
 
...I guess that's diverse enough
 
5:32 AM
there was one guy who frequented the room, who spoke Q'eqchi'...
 
@AnttiHaapala :-)
 
@AnttiHaapala I've been idly thinking about introducing dismiss reasons for improvement requests, but I'm not sold on that being anything other than "too complicated for its own good". We're also exploring some ideas for improving discussion around topics (nothing solid enough to present yet), and keeping improvement requests in mind for that as well. — Adam Lear ♦ 19 mins ago
oh well.
@AvinashRaj :P
 
@AnttiHaapala did you know about GAE server?
 
no sorry
 
cool..
 
5:37 AM
@Karin anyway, everyone is always welcome here, until the moment davidism kicks them :D
 
\o/
 
more often than not because of the diversity here we enjoy talking about food and drinks and such
 
hm almost 2am...guess I should head home. rbrb!
 
home? :D
I thought you were at home :D
nightshift?
admin on duty?
 
6:14 AM
@AnttiHaapala which one is best for concurrent sqlite db read.. multiprocessing module or threading module?
 
none, use another db
 
another db? why?
 
if you use multiprocessing, make sure that you open the db only after forking
because sqlite and concurrency don't really mix
 
@AnttiHaapala ok, which db is best for this case?
 
depends. What is your exact use case?
 
6:16 AM
I want that db to be included in a python package..
 
hmmm
yes, sqlite works for that but how big is that data?
 
42k records exists..
 
so why do you keep it in the database if it is read-only
just read it in once.
problem solved
 
but someone told me like, reading from db is faster than reading from csv
 
yes.
so you read it from db once.
not reading from db is faster than reading from db.
 
6:20 AM
what my issue is I have a special function which accepts a param.. Based on that param, it has to do the db lookup and fetch the corresponding record. Likewise I have many params_list.
So I have done like]
def parse_names(name):
	d = cursor.execute("SELECT * FROM mcnames m where m.name REGEXP ?", [r'(?i)\b' + name + r'\b'])
	data=d.fetchall()
	for i in data:
		print i

pool = Pool(processes=4)
pool.map_async(parse_names, names)
pool.close()
pool.join()
 
...
so why'd you use parallelism for that :?
 
To increase the performance..
 
you're just decreasing the performance.
just read the db into memory once
then scan it using python
with one regular expression
 
"just read the db into memory once", how?
My sample program looks like,
import sqlite3
import re
import os
from multiprocessing import Pool

def regexp(expr, item):
    reg = re.compile(expr)
    return reg.search(item) is not None

part = 'lamar'
dir_name, x = os.path.split(os.path.abspath(__file__))
file_path = os.path.join(dir_name, 'names.db')
conn = sqlite3.connect(file_path)
conn.create_function("REGEXP", 2, regexp)
cursor = conn.cursor()
names = ['benjamin Bentley', 'lamar', 'William Few', 'Ralph Izard']

def parse_names(name):
	d = cursor.execute("SELECT * FROM mcnames m where m.name REGEXP ?", [r'(?i)\b' + name + r'\b'])
 
you're creating a python function to match regular expressions
you're compiling the regular expression for each pass... (though it is cached)
wouldn't it be easier just to read the mcnames into memory, as a list of dictionaries
then write one function that runs in python looping over them
it will be faster.
 
6:26 AM
so each record as dict, right?
does python stores 42k dicts in a single list?
And for each query operation, I have to iterate over the list. does it decrease the performance?
 
you are iterating over your database for each single term...
there is nothing changing.
except you'd be not reading from an sqlite3 db all the time.
and yes, python will store 42k dicts in a single list if told to
it will take some memory though
>>> [{}] * 42000
a list with 42k dicts.
 
so you mean this approach is much more faster than db read for ever query?
and also we may execute parallel processing there, right?
 
yes yes yes and yes
you might even consider putting the thing back to a CSV...
or use msgpack
 
may I use the same multiprocessing.Pool class?
@AnttiHaapala csv? I have stored the data to db from csv itself.
 
that is your mistake, not mine :D
 
6:34 AM
:-)
 
you should organize your task so that you go through each record once
not that you go through each record once for each searched keyword.
 
so my search function would be like,
def search(query):
	for dict_ in records_list:
		if re.search(r'\b' + query + r'\b', dict_.get('name')):
			return dict_
			break
 
no
your search function would search for all queries at once.
for record in records_list:
    for regex in regexen:
         if regex.search(record.get('name', '')):
though it wouldn't return, just yield...
if you want all the results
 
ok
@AnttiHaapala one more doubt, does this approach suitable for an python package?
 
7:10 AM
Too Broad Finding patterns in data - Anchika Agarwal‎ - 2016-08-29 06:49:08Z
Unclear Union of tuples in python - Hexkcd‎ - 2016-08-30 06:56:41Z
Not useful Deobfuscate Python code - Sean Johaness‎ - 2016-08-30 06:55:09Z
 
I got this traceback from multiprocessing module
python testdb.py
Traceback (most recent call last):
  File "testdb.py", line 25, in <module>
    print pool.map(search,names)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 251, in map
    return self.map_async(func, iterable, chunksize).get()
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 558, in get
    raise self._value
NameError: global name 'records_list' is not defined
And my sample code looks like,
 
@AvinashRaj well, is records_list defined
 
7:25 AM
ahhhh .,
what happened to me..
@AnttiHaapala I hope multiprocessing.Pool is a right tool for this task.
 
7:51 AM
Cabbage
 
8:02 AM
@BhargavRao cbg, Bhargav our Bengaluru sleeper agent :P
 
Morning guys
 
Lol :D
@cardycakes morning!
 
I've a quick question to see what you guys think. Cleanest way to pull info from myfxbook.com/community/outlook with Python?
To elaborate, by 'info' I mean the text displayed when hovering over one of the rows in the table
 
@cardycakes look up "web scraping" and possibly "selenium" if you need data that is accessed through user interaction.
 
morning
 
8:08 AM
Okay thanks @Ffisegydd
 
gotta love sqlalchemy <3
class SafeHTML(types.TypeDecorator):
    impl = types.Unicode
    def process_bind_param(self, value, dialect):
        return clean_html(value)
...
description = Column(SafeHTML)
 
8:37 AM
and cbg @Ffisegydd
 
@AnttiHaapala nice
 
@IljaEverilä to which? safehtml?
 
DAMN YOU MUTABLE DATA STRUCTURES!
Screw this noise, I'm going back to Scala.
 
@Ffisegydd yeah scala is known for immutable data structures, oh no wait.
 
8:51 AM
Uh, well, it is?
I mean, you can have mutable if you want, but the paradigm is to use immutable?
 
you're free to do that in Python too.
hmm
an immutable map would be nice:P
 
Oh God why am I awake cabbage for all.
 
Cabbage
@AnttiHaapala There is a frozendict, but it's 3rd party.
 
user6568562
Hi, PM [ :
 
Hi, random.
 
8:56 AM
Hi @PM2Ring
 
@AnttiHaapala That was my actual issue :P I had a list of dicts that I want to keep constant (my "raw" data that was expensive to get) and then I wanted to put it into a new list with modifications, forgot about mutability and ended up modifying my raw as well.
I'm now using copy.deepcopy but still a pain
 
So, less a Python issue, and more a gin overflow error?
 
also there should be frozen_list and modifiable tuple!!!
but no one seems to agree :D
 
Isn't a mutable tuple just a list?
 
@AnttiHaapala With an extra loop in there you can convert your Fermat test for primality to Miller-Rabin. Not only does it give you far fewer false possible primes, you can make it deterministic for a big range with a fairly small set of "witness" primes. Eg math.stackexchange.com/a/1638487/207316
 
9:01 AM
@PM2Ring I am sure of it, this is the only thing that I remembered...
upvoted :D
 
@MorganThrapp Not really
 
Why not?
 
@MorganThrapp Well yes. But the purists will argue that lists should be used for homogenous data & tuples for heterogenous.
 
Lists and tuples are different things, for starters a tuple can be heterogeneous whilst lists should really be homogeneous
From a pure point of view :P
 
@AnttiHaapala Thanks!
 
9:02 AM
lol I am chatting with intellipaat.com @BhargavRao
 
Huh. I've never heard that before. I can see the appeal.
 
Clearly, Fizzy is a CS purist. :)
 
they're offering 10 % discount on the self-paced python course if I enrol right now.
 
I do like my bigeneous data structures though.
 
@MorganThrapp tuples are the individual elements of cartesian products over sets
 
9:04 AM
They have different use cases.
 
Eg, if it doesn't make sense to sort the collection then it should be a tuple not a list. So (latitude, longitude, altitude) should be a tuple, not a list, because the order of the items is significant.
 
@AnttiHaapala Do share the transcript with us later :P
 
Let's just make everything a dictionary. That'll solve everything.
 
Dictionary with integer keys, easy.
 
"and along with the course we also offer Lifetime access Lifetime support free upgrades job assiatnce in depth knoweldge / course inline with respective certification"... mmkay...
"We have a tie up with 80+ corporate companies. So, once your done with the course we will market your resume with those 80+ companies depending on the requirement they will contact you directly"
"Intellipaat thus stand today ahead of to her players and is a trusted name among major IT taboos" Wat?!?
"Kristy: check this linke"
I like the fact that they first pay for a newspaper to make an article on them, then they will write an article on wikipedia citing those newspaper articles <3
that's so clever
 
9:18 AM
Maybe post an ambiguous comment like: "If you receive IT training from Intellipaat you will be very lucky".
 
user6568562
@PM2Ring I like that
 
Someone should enroll as Hrundi V. Bakshi.
 
intermittent cbg
 
I see that fine company is still on the menu:D
 
9:28 AM
@AnttiHaapala It's easy to come up with simple, reasonable conjectures about primes that nobody knows how to prove. :)
Hey @AndrasDeak If you feel like a laugh, check out the quote in the OP of this question:
Wow. Every single sentence in that quoted passage is either false or "not even wrong". I wish I had a pet gerbil so that I could say "My pet gerbil understands relativity better than that guy". :) — PM 2Ring yesterday
rbrb
 
@PM2Ring well, not going to defend that quote, but that's what most people thought about the theory of relativity :p
 
9:50 AM
I got an error while push the codes to heroku.
The error is something like this :- ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/monsoon-season.git'
please help me to solve this
 
@Andrea "something like" is not good enough
you should copy the full verbatim error instead.
there are many questions such as stackoverflow.com/questions/9542665/…
they seem to contain an error message from heroku itself
 
10:18 AM
@PM2Ring oh that's delightful:D Thank you.
 
It's not quite timecube quality, but it's getting close.
 
BTW Pauli must've been a great guy, another story I heard about him says that he listened to a presentation by a young colleague, who concluded with something along the lines of "... with the correct sign, therefore the result is correct.". At which point Pauli stood up and said "We can only be certain that you made an even number of sign errors."
 
@PM2Ring there was a nice con artist in my hometown, making a new theory of everything called "Utele - Universal Theory of the Energies in Life on the Earth"...
 
> Someone posted this to my question on QUORA.
what were they expecting?
 
he formed a business around it, selling shares in the Utele Inc, and licensing the theories first to the investors <3
 
10:22 AM
My favourite Pauli story is the Pauli Effect
 
LOL:D Just like my mother.
Pauli Effect a.k.a. confirmation bias
 
"An incident occurred in the physics laboratory at the University of Göttingen. An expensive measuring device, for no apparent reason, suddenly stopped working, although Pauli was in fact absent."
"James Franck, the director of the institute, reported the incident to his colleague Pauli in Zürich with the humorous remark that at least this time Pauli was innocent. However, it turned out that Pauli on a railway journey to Copenhagen switched trains in Göttingen rail station about the time of failure."
 
I like this one: "R. Peierls describes a case when at one reception this effect was to be parodied by deliberately crashing a chandelier upon Pauli's entrance. The chandelier was suspended on a rope to be released, but it stuck instead, thus becoming a real example of the Pauli effect."
 
:P
lol
apple must pay 13 billion eur more taxes to EU
 
Ireland are going to appeal it :P
 
10:28 AM
to ireland :D
yes :D
that's like the biggest joke
"we don't want them to pay us"
lol if this star wars 8 leak about Snoke is true: view spoiler
 
sigh
As I said above, Area 51 doesn't salt the hash generated from the e-mail. — Andras Deak 2 mins ago
Marc is in hot pursuit of the issue...
 
@Karin "Anything or True will evaluate to True" Kind of. It will certainly result in a true-ish value no matter what Anything evaluates to, so if Anything or True: will always execute the stuff in the if block. But if the Anything expression itself is true-ish then Anything or True evaluates to whatever Anything evaluates to.
I assume you're aware of this, but your statement might be misinterpreted to mean that the value of Anything or True is exactly the boolean value True.
 
If you test for logicals properly, it shouldn't matter, right?
the problem of truthy-instead-of-True only matters if you try to use something like var==True
 
10:49 AM
@AndrasDeak Sure. Personally, I love the way and / or expressions work in Python, but I can sympathise with people coming from other languages who find it a bit bewildering that such expressions don't produce pure boolean results. Sometimes people will wrap and / or expressions with a bool() call but that's only necessary if you want to store the boolean in some data structure.
 
yeah it's a bit confusing (I testify, having learned about this only last week:D)
 
user6568562
@PM2Ring What's different in Python compared to other languages when it comes to boolean operators ? Personally, I like the short-circuit nature of and and or
 
decent languages short-cut
but
>>> False or "asdf"
'asdf'
 
user6568562
Yeah, because non-empty strings evaluate to True
 
yes, but obj1 (logical op) obj2 is not boolean
unles the objects are boolean
(broadly speaking)
you would probably expect False or "asdf" to give you True, which it doesn't
 
user6568562
10:59 AM
Yeah, I understand. Maybe that's the nuance. data types in Python can evaluate to True or False under certain conditions because, maybe, it would help in boolean expressions and conditions
 

« first day (2145 days earlier)      last day (2804 days later) »