« first day (2245 days earlier)      last day (2719 days later) » 

wim
10:00 PM
anyway, the workaround is ok just a bit tedious
 
yup
you can always post to the sandbox if that's less clicks...
 
DSM
@idjaw: maybe extend your test cases when there's an ABBA inside the brackets?
 
@idjaw what do you return on this view spoiler?
 
@DSM there is
 
DSM
.. there is what?
 
10:04 PM
@DSM ABBA in brackets from idjaw's spoiler testing code
 
@WayneWerner false
which is what it should return
 
DSM
Yeah, hence "extend", not "create for the first time". I can think of a few cases his code isn't testing.
 
Okay, well that's good, yeah
 
@DSM oooh, sorry, I got language barriered
 
I'll take test cases as generous offers to my cause
because if I can get something to fail in my code it will greatly help
 
10:05 PM
I'm sure if I saw your code I could give you the test case that should fail ;)
 
I could show the code....but I feel like I've given up if I do that
 
wim
you guys are still polishing day 7? man, that's so yesterday ..... flips hair
 
snicker
 
s/you guys are/idjaw is/
 
 elif qubits >= 2:
        commands = {}
        for i in range(1,x+1):
            commands[i] = []
            print(commands)
        while done2 == "n":
            fstgat = input("what gate would you like to use for 1st qubit? Use the list of single qubits at the top, plus control or target")
            commands[1].append(fstgat)
            done2 = input("Done with your 1st qubit? y or n: ")
        scndgat = input("what gate would you like to use for 2nd qubit? Use the list of single qubits at the top, plus control or target")
I have no clue what I'm doing^ =/
 
10:08 PM
That makes two of us ;)
Might just be that quantum mechanics is hard
 
nah, I'm thinking its because I'm not very good at programming =P
ooh, just saw a problem (::goes to fix::)
there we go, updated code, starts at highlighted line: github.com/physicsnerd/Quantum-Computer-Simulator/blob/TwoQubit/…
 
@wim at least you have hair!!!! stomps away
 
Does someone know which types of variable should I use for a chat in Tkinter? One is Entry for where I enter the text to be sent. What should I use for the chat box where all the messages are shown?
 
mmm, unforeseen problem
curses
let's say I have a variable x=some number, how could I define x separate variables?
and then print all of those x dependent variables?
 
@PichiWuana textbox, probably
I think that's what it's called
@heather When you want to have a bunch of different named variables, you want a dictionary
 
10:19 PM
okay
how could i automatically set one up?
based off of x?
 
@heather example?
 
DSM
@AndrasDeak: aww, I just reimplemented day 7 from scratch (my code's at home) and there you have a nice collection of test cases. :-)
 
Dicts increase dynamically.
 
DSM
.. isn't that what
    commands = {}
    for i in range(1,x+1):
        commands[i] = []
^ is already doing?
 
10:21 PM
@WayneWerner Do you mean LabelFrame? Tkinter Widgets
 
@DSM actually, most of those are "fail because no palindrome whatsoever" :/
 
nice <3
my operator is now blocking everything except 443, 80?
un-fscking-believable
 
try async
What's 443,80? Ports?
 
@WayneWerner, well, in my case, i might have qubits = 1 in which case i want to create one variable called qstat and carry on. in another case, i might have qubits = 7 in which case I want to create seven variables called qstat1, qstat2, qstat3,...,qstat7.
 
no, don't do exactly that
 
10:24 PM
well actually...wait.
i might not need to do that...
 
that's called dynamic variable names, and they lead to the use of exec/eval, and they're bad
make use of qstat[i] for i in range(qubits)
qstat[0] alone in the qubits==1 case, qstat[0], qstat[1], ... in general
and depending on what you need, you can do this both with a dict and with a list
also, see DSM's message ^
 
@DSM, that code is creating the lists for the user inputs for each qubit
 
DSM
Sure. You started with an empty dictionary, and then set commands[1] = [], commands[2] = [], etc., up to x. That's exactly the same as qstat1, qstat2, .., etc, except you type qstat[1] instead of qstat1.
@idjaw: still up for test cases?
 
@JRichardSnape I noticed you have a fork of my Shanty repo. I stripped the commits in order to fix my email in some of them, so you'll need to delete and re-fork to get a valid copy.
 
@DSM always 😀
 
10:31 PM
On the bright side, I started working on the repo again.
 
@AndrasDeak Thank you! btw...just to be 100% sure, "pass" means it is valid right
 
yup
 
I'm so happy right now...because I found a failing case
 
and I'm 95% certain that those results are correct:D
 
that means I can effectively troubleshoot
<3 Andras
 
DSM
10:32 PM
!@#$!@#$
Always too slow. :-(
 
@DSM please provide
 
@idjaw can you see the problem on the line?
it can also by my 5% margin of error;)
 
I will take as much as I can...because I'm going to re-write my solution
so I want to make sure I have solid cases
 
DSM
No, just so I can wallow in entirely pointless self-pity first, find your bug, and then we'll see if my test cases would have revealed it too. :-)
 
haha
 
10:32 PM
haha:D
sorry, DSM, here, take half of idjaw's </3
 
DSM
If they wouldn't have I might find myself away from the keyboard until the subject is forgotten..
 
@idjaw make sure that the test case really results in what I wrote there...
 
I never thought I'd be so happy to find a failing test case in my code
 
if you post it here, I'll gladly take a look
 
@AndrasDeak I sent it to my co-worker and it passes for him
 
wim
10:35 PM
Let's have a poll. Which are you most excited about:
1) [17 sleeps till Christmas](https://santatracker.google.com/village.html)
2) [8 sleeps till Python 3.6](https://www.python.org/dev/peps/pep-0494/#schedule)
3) [0 sleeps till AoC puzzle 9](http://adventofcode.com/2016/day/9)
10
 
(I'd hate to send you on a wild goose chase)
 
just to make sure
 
@wim 2.33333333331
 
Air
Cabbage, all. My poll vote is that I am excited whenever I get sleeps.
 
Hey everyone I'm new to Python and I'm having some issues. I'm trying to use "from sklearn import tree" however it's spitting out a module not found error. I've gone back and made sure to check the installations and everything seems in place. What do you all suggest?
 
10:36 PM
@HarrisR everything is probably not in place
 
Did you install sklearn?
 
I did
 
and what does python -c 'import sklearn' output?
 
Air
How did you install Python and how did you install sklearn though
 
and, python -c 'from sklearn import tree'?
 
wim
10:37 PM
how funny, the pinned message markup worked
the actual chat markup doesn't
 
"funny"
I find it depressing as yam
 
DSM
Cool, 3.6 comes out the day before I go home!
 
@wim there are at least three different markup parsers running just on chat messages.
 
@DSM you sure have long workdays
 
Air
I took an assessment on Pluralsight of my Python skill... it severely overrates me
 
10:38 PM
Then there's the post, comment, and docs parsers, which all have differences too.
 
oh, are you in Other Large City?
 
@AndrasDeak, this line of code gave an error (Syntax Error: Invalid Syntax) when I tried to run my program; I'm guessing all my uses of the global keyword are incorrect. I'm not sure what I did wrong, would you mind taking a look?
 
DSM
@AndrasDeak: even after all this time away, "home" for me is a small town out west, far from LargeCanadianCity.
 
@heather You have to declare the global on a different line.
 
@heather that ^
 
10:40 PM
global thing
thing = 2
 
When I do "pip show scikit-learn" it displays:

Name: scikit-learn
Version: 0.18.1
Summary: A set of python modules for machine learning and data mining
Home-page: http://scikit-learn.org
Author: Andreas Mueller
Author-email: amueller@ais.uni-bonn.de
License: new BSD
Location: c:\users\harris\anaconda3\lib\site-packages
Requires:

however

python -c "import sklearn" doesn't output anything
 
And what does python -m pip show scikit-learn say?
 
and are you using python 3?
 
I am using python 3
 
DSM
@davidism: hey, that's a nice trick. Not sure I knew that one.
 
10:41 PM
@davidism, oh, I see, thank you.
 
that command outputs the same
 
@DSM I see, thanks:)
 
Air
@HarrisR Is Anaconda the only way you have Python installed, or have you perhaps got more than one install?
 
I had 2.5 and 3.6 installed, realized the two installations might mess something up. Uninstalled both, reinstalled 3.5 and then anaconda
what would be a good way to get a clean slate?
 
Air
burn everything
 
10:43 PM
rm -rf /
 
First of all, they won't mess with each other, and second, if you were concerned about that, why did you go install two Pythons again?
 
Air
IIRC Anaconda has its own Python because it's portable
 
I didn't realize Anaconda was a separate python installation
 
Air
When you used pip you would have installed the module for one or the other environment, but not both
 
Now I do though
 
10:45 PM
anyway, rhubarb all, going to play some Last Guardian.
 
rhubarb, davidism
 
rhubarb @davidism, thanks for the help
 
Air
googles Last Guardian from the various splash screens, I'm guessing this is Neverending Story Ferret Parkour Skyrim
 
Should I keep anaconda or default python
 
Air
@HarrisR Yes.
Feel free to keep both.
 
DSM
10:47 PM
Anaconda's a fine distribution, nothing wrong with it.
 
I've done a clean instal and I can't seem to instal scipy correctly
(Not anaconda)
install*
 
11:05 PM
@HarrisR sudo apt-get install python-scipy...?
 
On windows and I've figured it out, just did the .whl installation
 
oh
nvm then, sorry
 
Thanks though
 
I FIXED MAH BUGUUGUGUGUGUGUGUGUG
regex owned my arse
@DSM I'll take those test cases if you want send them over 😀
also, interesting, answers for this seem to be different for some users too. awesome
 
@idjaw, yay!!! awesome!!! this needs more explanation points!!!!!!!!!!!!!!!!!!!!!!!!
 
11:13 PM
@idjaw ?
answers are different by default
 
I thought some might have been the same
 
I made a mistake in one of my answers, and the system told me something along the lines of "interestingly, this is the correct answer for somebody else. Either you're cheating, you need to refresh something, or blind luck"
also: why isn't the owned arse the one that is starred?
fixedit
 
I can't believe my problem was that stupid ugh
greedy vs. non greedy regex...and I just didn't pay attention to it. However
 
if you're stuck after more than half an hour, it's usually that stupid
 
I want to refactor the crap out of this, because it is probably the worst code I have written for any solution I did so far
and in general...yuck
on that note...I have to go
I'm going to get in trouble
 
11:16 PM
good night:)
I'll be off too in a short dog walk's time
 
@idjaw, rhbrb
 
Ooops, regex FTWwweelll something
idjaw thought he would solve the day 7 problem with regex. n̲̯̼o͎͈̗̣͉w̖̦̺͢ ͕̱͙ẖe͙̤̰ ̙͇͞h̕a̢s̭̺̳̝̮ ̧͇̲͓̠tw̶o̤̳͉͕̣͈ͅ ҉̳̳̩ͅp̪͚̣͝r̺̻o̤̖b̬̪ḷ̵͎̟̬͖e͈̳m̴̯̣̜̗s
 
@WayneWerner how do you make the text all messed up like that?
 
4426
A: RegEx match open tags except XHTML self-contained tags

bobinceYou can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool th...

 
11:28 PM
there are other zalgo generators too, I occasionally make use of lunicode.com that can also flip text
but yes, bobince's answer linked by Marcus is a rare gem of SO mythology:) --------------------------------------------^
 
there's a python zalogtext but it makes the messages way too long
 
I totally owned myself hard with that regex. @WayneWerner I'm going to think of anther way to do it.
The worst part was that the usage of regex was for a hacky workaround that I decided to just stick with
 
that's karma, my friend
 
Totally
 
I used regex, but I used re.findall
and I believe I was nongreedy because that has bit the heck out of me before
and now you'll never be bit by it again ;)
 
11:40 PM
EVER!!!!!!
 
I'll remind you next week
 
thanks buddy
You always got my back
 
DSM
11:52 PM
I didn't use regex, just groupby. #antiregex
 
you always seem like a huge fan of groupby to me:)
 

« first day (2245 days earlier)      last day (2719 days later) »