« first day (2952 days earlier)      last day (2221 days later) » 

wim
wim
02:14
@Anthony that is already O(n) so what more do you want?
 
2 hours later…
03:44
@wim is there no way to get two lists of output without comparing the the sets more than once?
wim
wim
03:58
symmetric difference iterates each set object once. making two differences also iterates each set object once. how would you propose to solve it without iterating each set at least once? seems impossible to me.
 
2 hours later…
05:38
cbg all
 
2 hours later…
07:49
morning cbg
 
2 hours later…
09:43
Cbg
10:01
morning all
Anyone worked with creating connections to existing neo4j database before using py2neo?
10:22
Voted "no mcve" first, but then noticed it's a dupe.
11:09
@IljaEverilä Hammered with the 1st target.
@PM2Ring Appreciated. I'll add the one with an answer from zzzeek there as well.
No worries. I didn't add the others since it's a bit painful doing it on the phone.
11:44
Hi all,
what's a common way to expose all models in a Django application via REST APIs generically, i.e. not having to add more code when adding another model
Looking for something like api/ressources/model1 CRUD for a model that is called Model1 where partial updates as well as Create read and delete are supported plus some query parameter driven filtering and nesting
Something like eve but with django and DRF
12:07
I have several expressions such as x = x0 + sum(sin(n*y)*cosh(n*w)) for n = 1..4. What would the most pythonic way of doing this be? x0, y, w are known constants.
12:22
Not sure how to string that together but have a look at Python Math library and Numpy those plus a few others are what we are using in Applied Maths module at the moment in my masters program
@StewieGriffin Does this do what you want? x = x0 + sum(sin(n*y)*cosh(n*w) for n in range(1,5))
That's exactly what I ended up with actually. I believe it should work fine :)
Would you use math or numpy for stuff like this? @PM2Ring
12:39
Hello
@StewieGriffin Numpy is good when you have a lot of numbers to process, and you can organize your work to use arrays, so that Numpy can loop over the array elements at C speed. Using Numpy on an array of length 4 is overkill.
Hello @NasrinShirali! I was wondering what happened to you. Have you been busy with a new job?
@StewieGriffin Other math libs worth investigating are gmpy and mpmath. mpmath can do arbitrary precision arithmetic, and supports a large collection of functions. It can also do integrals, solve equations, and estimate limits of infinite series, assuming they converge.
13:30
cbg
13:51
@PM2Ring Hi, yes. It's my third week and I love it here :-)))) Thanks for asking :-)
Thats great to hear, Nasrin.
Thanks :-)
14:07
Interesting. I have tests that run fine from the terminal in Pycharm, run fine on Travis, run fine on Appveyor, but when running in Pycharm's run pytest functionality, I need to put this code into one of the tests:
import os, sys
os.chdir(sys.path[0])
14:22
@toonarmycaptain I don't use Pycharm, but take a look at what os.getcwd() returns in those environments.
14:34
@PM2Ring Yup, it's running the test with cwd as the test_suite, which is a subdirectory in my project directory, and so I guess it's not finding my app_main.py in the project directory (which is what sys.path[0] returns). Yet...it runs fine on the terminal inside Pycharm, in my commandline, and on Travis...
14:45
Ah. Apparently...even though I could just right run the test by right clicking the folder, scripts etc, I had to set up a configuration with the working directory to be the project home instead of the test directory...not sure why PyCharm wouldn't assume the project home, but there you are.
Hey people
This is seemingly strange behaviour. Why does slicing work if you overshoot array bounds to a positive index but fail with a negative index?
hi guys, do you know how to remove a conda environment that has no name?
@Ishwar works for me:
I specified a path using prefix when I created it
@Ishwar It doesn't fail. Negative indices in Python count from the end of the list, tuple, or array, so a[-1] is the last element in a, a[-2] is the second-last, etc.
14:57
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32
listy = [7, 3, 7, 8, 'a', 'c', 3, 6, 8, 9]
listy[3:-1]
[8, 'a', 'c', 3, 6, 8]
listy[3:-19]
15:10
s="Hello"
print(s[-1:3])
Wait, this probably isn't doing what I think it's doing nvm
@toonarmycaptain @PM2Ring Thank you for entertaining me
15:54
I need someone to mentor me.I started learning Python 2 years.I will love to learn more .
16:12
Just develop something you find interesting.
And use Google, Python docs, existing SO questions, etc. when you encounter any obstacles. In 90% of all cases that should be enough to overcome then
16:54
I need to dynamically create charts/graphs with images as points. Time to learn some matplotlib!
@rarevessell What projects are you working on right now?
17:12
I am currently learning GUI development with PyQt.@ toonarmycaptain
@ThiefMaster yea,I have been doing that
wim
wim
GUI development with PyQt sounds like the worst way to learn Python, tbh
17:31
I agree, but then I'm still learning myself. I see spinning up a webapp as probably simpler than PyQt, plus you learn about a webapp framework, which you can extent to host your app beyond your local machine if you want to go there.
I want to learn and put my knowledge to test.I have delve a little into web framework-flask.That's why am requesting for anyone to guide me.
17:58
Morning cabbage
18:08
cbg
18:42
Hey, not sure what the expectations are in this case. I answered a question for a new user and was deemed helpful. When the OP got his code working with my answer, he posted his working code in the answer. Should I comment saying that really should be updated in the question or should it be an answer? stackoverflow.com/questions/53196063/…
Working code typically goes in an answer, although it's unusual for the OP to mark a post other than his own as accepted
Typically, either 1) he fixes it himself and accepts his own self-answer, or 2) someone else's answer solves the problem and he doesn't need to post working code
Thats how I felt. Like my answer helped get him there. but then he did that.
This behavior seems mostly harmless
Oh well I got the rep for it so Im happy about that. I was just looking to tidy the question up. But Ill just move on along.
18:57
lunch time cabbage
19:16
how are you zack?
Things are good, chugging along and trying to stay warm. How are things on your end?
19:30
relaxing for my lunch break
been a stressful week. Can't wait for the weekend.
and I'm definitely ready for next weekend already. We only work 3 days next week.
Ah yes gotta love the holidays for the break. Yeah this week has kind of drug on for the most part.
the last two weeks have seemed slow to me. We started a new project and I'm still wrapping up the previous one. So juggling the two is definitely stressful.
wim
wim
20:14
what is the point of making a post release? e.g. pypi.org/project/redis/#history
what is the significance of 3.0.0.post1 vs 3.0.0 ?
 
1 hour later…
21:24
@wim Messed up project description while posting to pypi I guess pypi.org/project/redis/3.0.0
21:44
recbg
wim
wim
21:59
oh, looks like they didn't specify the content type for the metadata. but still, just a 3.0.1 would fix that, I don't understand the point of the "post" tag for minor screwups
Hello guys,
I have a short question.
How can I print arabic text using python?
When i print simple arabic sentence i get a mess of alphabets
@AhmyOhlin python 3?
22:14
Yes please Andras
@AndrasDeak
no need to ping me, my message is right there above yours
>>> print('لسلام عليكم')
لسلام عليكم
that may be missing a character but I guess that's beside the point
Hmmm you are right.I have just tried it on my mac and it works.
That means the problem is on the editor which I'm using in raspberry pi
depending on what "mess of alphabets" means it's likely some kind of encoding issue
I tried many ways to encode it right but it was not succesfull
i need to send a picture to show you how the mess looks like
if it's python 3 and it's text (string) you don't have to encode it
the data is probably broken to begin with
22:26
i tried that as well u'string'
it was successfull
I'm using Python3
on python 3 u'' is the same as ''
we can go on not going anywhere for hours if you wish
I will print the same text on Raspbian and show you the output
print("لسلام عليكم")
لسلام عليكم
I don't understand that. It look good when i print it here on the chat explorer using raspbian but not on the python editor
I think because i need to install arabic package of raspbian
i had the same problem on windows and i fix it with installing AR package
22:41
OK
22:58
Sublime has the same problem like thonny editor on Raspberry pi.
the editor start reading the string from links to right.
In this video you can see "mess of alphabets" which i meant
https://www.youtube.com/watch?v=BDq6i5KKj3o
23:27
@KevinMGranger Update tweet -> source with details. It's great, too bad I don't understand un word of it
23:45
brief cbg
@jpp bloomin' heck you're going to get to 100k before I will at this rate! :(

« first day (2952 days earlier)      last day (2221 days later) »