« first day (2695 days earlier)      last day (2268 days later) » 

12:47 AM
so many people seem to misunderstand who's the victim in plagiarism -- and the consequence of self-plagiarism.
 
 
7 hours later…
7:39 AM
cbg
too broad stackoverflow.com/questions/48773250/… (posting for the last time (3rd), won't repeat, sry)
 
 
2 hours later…
wim
9:16 AM
I'm not sure if I calculated it correctly, but I calculated 20 crossings
there is a crazy part from 23rd Sept until late October 2017 where it was virtually collinear the whole time, so it's pretty difficult to tell if that's correct (not enough resolution).
 
Are you two competing?
 
9:37 AM
No. We've just had very similar rep totals for quite a while.
 
@wim does the end look cleaner if you subtract 200/day?
 
 
2 hours later…
12:16 PM
I am a graduate, and have been teaching myself Python. I am now considering a certificate that is gonna help me land a Job. I would like to know accredited online institutions that offer Python Certificates..like PCAP. In the country I live there are no such things as Python certifying organizations
 
 
1 hour later…
1:16 PM
@JWizard Just Python? I am not sure of only Python ones (that I like / have experience with), but I can recommend Udacity or Coursera certifications
For landing a job, I'd suggest picking a domain specific course (data science / web development / AI / VR), and doing a course in that.
Not directly related, but current hottest job in the field is that of a blockchain developer. But that will be hard to find a course for, let alone land a job.
 
@wim I fiddled with your things a bit. My code take, rep graphs shifted by 88 rep/day, rep difference. The 20 crossings seem legit
though I'm having second thoughts about the shape of the shifted graph...
ah, no, it's fine
 
1:32 PM
There should be a clear-your-tabs day every month.
 
user4229770
2:15 PM
Has anyone had "RecursionError: maximum recursion depth exceeded" error, where do I exactly should put "resource.setrlimit(resource.RLIMIT_STACK, (resource.RLIM_INFINITY, resource.RLIM_INFINITY))", i mean in which file, method ?
 
What's resource?
 
user4229770
That's a good question, I have just seen the answer of the question... :) And I thought where that piece of code belongs to...
 
Ah, it's a module from the standard library
 
@Marius Whatever you need changed, should be put in the main executable I suppose
 
user4229770
Okay, did that, thanks! works! :)
 
2:38 PM
Just wondering, is using an "orm" when working with multiple programs accessing a database uncommon?
There's really little documentation/question about what happens if/when data in your local memory becomes stale due to another program updating the database while your client is also running.
(I ditched using an orm due to so many questions about behaviour like that)
 
2:49 PM
a = [i*2 if i%2==0 else print("ODD") for i in range(5)]
If I'll print a, I will get [0, None, 4, None, 8]. how can i format the list comprehension such that I won't get these None?
 
Ditch the list comprehension and use a for loop.
 
k thanks
 
a = [i*2 for i in range(5) if i % 2 == 0 or print('ODD')]
 
ohh nice. thanks
 
You should use a loop, still
 
2:52 PM
why?
 
1) it's more readable
2) it's more readable
3) it's more readable
 
4) readability
5) easier on eyes
 
k thanks
 
Related:
Nov 8 '17 at 17:58, by Rawing
Making a list comprehension with side effects is like baking a cake because you wanted to heat your oven, and then throwing the cake away.
 
Witty dude, he was. Wonder what happened to him.
 
3:01 PM
I think he got tired of hanging out with all the nerds here. Probably found himself some better company ;P
 
One can change his name here?
 
hmmm, come to think of it, it has been a while since my last witty comment. I'll need to rectify that ASAP once I'm over this sickness and my brain is back to normal (i.e. not hurting)
@paul23 Yep.
 
3:31 PM
Chat is idle, so I take it people are bored - if you are feel free to check out a problem I've been having (which should be easy but I can't find a documentative source)
0
Q: sqlalchemy how to generate (many-to-many) relationships with automap_base

paul23As a background: I'm creating an ORM based on a schema of an already existing database. - This due to the fact that the python application won't be the "owner" of said database. Now in this database there is a table called "task" and a table called "task_notBefore__task_relatedTasks" - this latt...

 
I'm currently writing code for an application which patches botnet malware (so excuse the 'bruteforce' code i assure you its only being tested on my virtual machines). So basically im trying to connect through Telnet, and it works (tested on my host terminal as well and it connects). However, since I would like this to be arbitrary, when I am checking the Telnet#read_until for the login and password, I noticed that the login (username) has to be like this:
username-VirtualBox login:
Is it because of the VM that I have to do it like this?
 
 
1 hour later…
4:46 PM
@madcrazydrumma possibly, VirtualBox is likely adding more to the stdout during the login, hence the double prompts (just the print, hopefully the input is required only once)
 
5:02 PM
@AshishNitinPatil I decided to just roll out with SSH for now and finish the primary functionality of my program before refactoring with Telnet. Thanks though!
Another question however.. How can I create a timestamp in python code to be then put into a timestamp field in a mysql database?
I've got the database code sorted, I just need the timestamp
 
from datetime import datetime
print(str(datetime.now()))
MySQL will ideally handle your datetime strings correctly
 
Okay thanks!
 
5:34 PM
Indentation-problem-cbg
 
Weekend cabbage
 
bored cabbage
 
Nope I really can't see my indentation problem.
@ByteCommander cbg
 
???? I pressed Undo and redo and somehow it has fixed
 
5:40 PM
I've installed XAMPP-VM for a local apache server and to use mysql. I'm trying to connect to the database using the mysql-connector-repackaged module installed using pip. The code and error are here: gist.github.com/ryankshah/33441f5ea48d881bef30f2ea80ab1e8d
I've tested with different port numbers to see if that was the issue but all of them (apart from the localhost running on :8080 throw the error: 2003: Can't connect to MySQL server on 'localhost:3306' (61 Connection refused)
 
6:30 PM
22 hours ago, by davidism
@madcrazydrumma unfortunately, chat is not the right place to get the help it seems you're looking for. We're not here to slowly help you debug your code and server setup when it doesn't seem like you have a clear understanding of what you want or what you're doing. Try some things for a while (more than a day) and come back if you have a specific Python question.
 
6:58 PM
cbg
 
cbg
 
anyone is familiar with pxssh and private keys?
@AndrasDeak how are you?
 
Thanks, busy with putting up two huge cupboards in the living room. I love power tools!
How are you?
 
@AndrasDeak not too bad. busy but well, aren't we all busy?
@AndrasDeak gl with the cupboards
 
Thanks, one's already up, other needs assembly
Hardest part was measuring everything precisely, then drilling and fastening the rail that will hold the cupboards
 
7:14 PM
@AndrasDeak lol went with my gf's son to a visit a uni. You could smell the booze and the weeds from here
 
:D
Nurturing environment
 
7:25 PM
@AndrasDeak lmaooo indeed
 
 
2 hours later…
9:15 PM
 
cbg, does anyone have any ideas as to plotting a circle in the complex plane with matplotlib?
 
the hard part is the complex plane, not the circle
 
Any ideas?
from math import e, pi
plt.plot(e**(45j))
plt.show()
 
If you're content with labelling x and y as Re z and Im z, respectively, you just need a regular circle
 
9:29 PM
Thanks, I've already taken a look at that.
The above code does this:
 
Damn ... I missed something in my python programming
 
Sometimes I just need some more space to stare at...
(courtesy of @vaultah :-p)
 
@3141 define "plotting in the complex plane"
matplotlib plots in 2d real space
So plot a real 2d circle
You can also use complexes and .real and .imag which will be the same assuming you do it right
 
Something like
a = e**(45j)
plt.plot(a.real, a.imag)
oops, forgot I needed to go full circle :-p
 
DSM
Aside: e**45j looks a little suspicious. There's nothing wrong with wanting to look at e**1.0177j in principle, but the 45 makes me worry that we're confusing degrees and radians.
And yeah, I'd make an array containing the complex numbers I want to plot on the plane and then do plt.plot(a.real, a.imag).
 
9:38 PM
don't know about you but I'm fine
 
DSM
@AndrasDeak: :-P
 
@vaultah Even the goat is giving you a +1
 
that's upgoat
 
9:44 PM
(missed opportunity :/ )
 
(currently downgoat)
 
Your code is taking ages to run on my computer for some reason, could you try it on yours?
import numpy as np
import matplotlib.pylab as plt
from math import e, pi

a = e**(45j)
plt.plot(a.real, a.imag)
plt.show()
 
if you have numpy you have np.exp(45j)
forget about pylab, import pyplot, that's what people call plt anyway
didn't you have a no-memory-nor-cpu problem with your computer?
 
10:01 PM
rb folks
time to zzz
 
rbrb
 
Yup, and a broken fan.
I was going to fix it as I said, but life got in the way.
 
classic life
 
Yes, and my code still isn't running...
 
DSM
It seems unlikely that code would take a long time to run.
 
10:04 PM
Anything takes a long time to run on my computer...
But yes, this is still unusual, even for my computer.
 
DSM
What makes you think it's still working?
 
Whenever I try and close the shell it asks me if I want to kill it.
 
DSM
Let me rephrase. What makes you think it isn't done?
 
Fair enough.
It comes up with a blank graph
 
is it blank really?
 
DSM
10:07 PM
Try adding marker="o" to the plot call.
 
and have you tried closing the plot window first?
 
oh
 
classic life :-p
 
it was not running
 
10:08 PM
 
XD
 
It's missing a big X on it, but you get the point :D
 
Sorry, typed it in a hurry
Or maybe my eyes are just really close together.
 
the (missing) fault in our eyes :)
 
Q: Why are faces complex?
 
10:12 PM
÷) would have been correct for having a "fault"
 
A: They are partially made up of i(s)
Sorry.
 
@3141 possibly to puzzle the new iPhone tech
ah, I was going for the "simple" joke
 
Or rather apple just trying to one-up android?
Do you think that apple facial recognition was actually necessary?
On a more serious note, my code just produces a dot now that I have added marker="o"
 
D:
and what did you expect and why did you expect that?
look at your code step by step and see what it does. A.k.a. debugging
 
While you are at it, really helps to read the documentation for the given function / module you are using
(even re-reading helps most of the times)
 
DSM
10:20 PM
Hooray! I was hoping to see a dot. \o/
 
Welp, I'm stupid.
 
.... --- --- .-. .- -.--
Huh, there's no code for exclamation!
 
I guess I would have to loop through various angles.
 
you guessed wrong
create an array of complexes on a circle, or create two arrays defining the x and y coordinates of a 2d real circle
you can feed those (or the real and imaginary parts of the former) in directly to plt.plot
This is all, you'll have to figure out the rest. The internet is chock full of resources for this.
 
The only problem is, I would quite like to dynamically create a circle in the complex plane as I am trying to visualise the Fourier transform.
But sure, I'll try.
 
DSM
10:29 PM
Afternoon is over, which means it's time to have supper and prepare for the evening. Rhubarb for all!
 
Anyway, if anyone has any ideas ping me. In the meantime rbrb.
 
rbrb
 
 
1 hour later…
11:51 PM
Is there a good canonical dupe for "determine who's importing me"? It keeps coming up.
 

« first day (2695 days earlier)      last day (2268 days later) »