How would I go about making a good hash function for lookup tables, or at least finding one. I search for it and I either get stuff for cryptography or just a bunch of cs class slides on "yeah uniform distribution is good"
nice right angle triangle user
Christian Nguyen
how to solve towers of hanoi?
Jason Richardson
non photoshoped picture
Zachary Edwards
>Katheryn Winnick thank you user.
Also wtf she's 40? I'm like 10 years younger but I look 10 years older than her.
Joseph Peterson
Be honest Sup Forums, do you write comments on every program you make?
Carson Parker
What's a good VPS host that lets me pay $10-15 a year for some decent hardware and 1 ipv4 address?
Gavin Phillips
...she still looks 100% semen demon, I can't tell the difference user.
Oliver Davis
furk
Hunter Baker
Recursion. Think about it this way. You have 3 discs. You move 1 to the target stack and the rest to a spare stack using the third tower to make the bigger on smaller switches. Then you have two discs left. You do the same thing till they're all on the target stack.
Angel Bennett
first time to this board, so i don't know shit
how do i get started to learn how to create my own 'sneaker bot'
Ethan Wilson
Does scripting in GameMaker with GML count as programming? Am I allowed in this thread?
Camden Reed
Why not just use SHA1 or similar? The risk of collisions is minimal.
Wyatt Peterson
[Python 3.5] Can someone help an user out?
Let's say I have a .txt file containing:
------------------------------------ textline1 textline2 textline3 = [PLACEHOLDER] textline4 ------------------------------------ (tha brackets are actually part of the file, not the placeholder
and a list of dicts : [ {"A1":1, "B1":2, "C1":3}, {"A1":4, "B1":5, "C1":6}, {"A1":7, "B1":8, "C1":9} ]
I'm no python expert but search the stream/buffer/string for [PLACEHOLDER] and replace the placeholder with your list. I'm certain the file io and string libs have examples similar to that. Then just write the entire stream/buffer/string to disk.
John Adams
who /amphetamine/ here?
Gabriel Lopez
...
Wyatt Thomas
is there a http python lib that also executes javascript
Chase Price
me
Adam Watson
amphetamine != methamphetamine
read a book.
Ethan Evans
>implying amphetamine isn't bad for you as well
Lucas Adams
who /cocaine/ here
Cameron Clark
Too slow for a hash table.
Henry Hughes
anything can be bad for you if abused, what are you trying to say? what is your argument? cot dam youre an idiot
Elijah Wilson
fuck off straight edge faggot
Ryder Williams
Is there a such thing as "no a such lib doesn't exist for python"?
Brody Rivera
Makeup.
Cooper Howard
>this butthurt enjoy your comedowns
Sebastian Cox
they aren't even that bad desu senpai
John Lee
I barely even notice them, straight edge pussy.
Oliver Phillips
So what you're saying is that you're incapable of focusing on your work without the use of drugs? Did you know that long term use of amphetamines significantly increases your chance of a heart attack? Honestly, maybe you should consider a different profession if that's the risk you're taking.
Sebastian Morris
does the hackerrank sample test give you points or anything? i completed it and i don't see any way to view my results
Liam Myers
5% of the population is willing to do whatever it takes to win, be that in school, at the job, or in the gym. i AM a 5%er
Aaron Wright
Tower of Hanoi in Python
def printMove(from, to): print ("move from {} to {}".format(fr, to))
def hanoi(n, from, to, spare): if n == 1: printMove(from, to) else: hanoi(n-1, from, spare, to) hanoi(1, from, to, spare) hanoi(n-1, spare, to, from)
hanoi(3, 'Mid', 'Target', 'Spare')
Wyatt Carter
>he needs drugs in order to "win" git gud fgt
Christian Cook
again, if youre not an idiot and use it responsibly you are fine. Look at caffeine addicts.... caffeine then no caffeine can cause really bad comedowns. You're basically saying "oh you drive a car?" enjoy filling it with gas every 2 weeks and cleaning it".
i was diagnosed with adhd when i was younger. I absolutely need it when learning new stuff, i was never a good reader either in terms of comprehension because i would also forget what i read.
Juan Flores
Can someone help me find a middle ground between these two algorithms? My algorithm was supposed to be in python 3, the second I believe was intended to be in python 2.
The idea is that it takes a string of numbers like "56 65 74 100 99 68 86 180 90", and returns them ordered by number weights: "100 180 90 56 65 74 68 86 99". It also sorts number weights that are equal as a string: 180 before 90.
I wrote an algorithm after looking at it, it seems quite redundant. def order_weight(s): x = s.split() y = [sum(int(digit) for digit in item) for item in x] z = list(zip(y, x)) zsort = sorted(z, key=lambda tup: (tup[0], str(tup[1]))) return " ".join([x[1] for x in zsort])
another person wrote a one-liner, and I'm not sure if it's any less redundant. def order_weight(_str): return ' '.join(sorted(sorted(_str.split(' ')), key=lambda x: sum(int(c) for c in x)))
They both sorted 57 random strings of 255 characters in ~200ms (on a server). Is one better than the other?
I'm still learning.
Samuel Nelson
youre the faggot because you cant understand people are born not only physically different but also genetically, chemically, etc
Tyler Reed
would you become a tech billionaire if in order to do it you had to sacrifice all of your friends for your 'dream'
Jason Foster
it's one thing to take amphetamine on a doctor's recommendation and another to use it illegally
Hunter Ross
>friends
Parker Russell
what friends
not i don't have "friends", but i don't give a flying fuck about them
Evan Bell
i used to take the now banned version of a preworkout called cannibal ferox multiple times a week and it turned out it was basically meth. the amount of focus it gave me was insane. i just stared a hole into the wall at the gym between sets. i realized when i got hooked on it and had to throw it away even though i only used half the container /blog
Benjamin Foster
What is the correct grammar for naming typedef functions?
Ryder Stewart
Actually, I can see why the second one is better now. The second one is essentially two steps, whereas the first is doing a lot more.
Jace Martin
Trying to further improve performance of my mbox parser.
Done some more profiling and the current bottleneck is the library I'm using to do case conversion for header keys.
Turns out it's pure shit, so I've been working on a very optimized one myself.
Currently beating the shit out of str::to_lowercase and str::to_uppercase in most cases, and on par with it on the worst case (which is always the worst case in libstd).
test unicode::bench::capitalized_borrowed ... bench: 17 ns/iter (+/- 1) test unicode::bench::capitalized_owned ... bench: 149 ns/iter (+/- 5) test unicode::bench::lower_borrow_long ... bench: 176 ns/iter (+/- 0) test unicode::bench::lower_borrow_short ... bench: 32 ns/iter (+/- 1) test unicode::bench::lower_owned_all ... bench: 4,197 ns/iter (+/- 303) test unicode::bench::lower_owned_early ... bench: 574 ns/iter (+/- 27) test unicode::bench::lower_owned_late ... bench: 281 ns/iter (+/- 14) test unicode::bench::lower_owned_std ... bench: 4,083 ns/iter (+/- 10) test unicode::bench::upper_borrow_long ... bench: 174 ns/iter (+/- 1) test unicode::bench::upper_borrow_short ... bench: 32 ns/iter (+/- 0) test unicode::bench::upper_owned_all ... bench: 4,202 ns/iter (+/- 78) test unicode::bench::upper_owned_early ... bench: 589 ns/iter (+/- 2) test unicode::bench::upper_owned_late ... bench: 281 ns/iter (+/- 5) test unicode::bench::upper_owned_std ... bench: 3,832 ns/iter (+/- 7)
Xavier Carter
>Adhd You just need to die to not pass your shit genes. I bet you're white too. Only whites have adhd.
Aaron Thompson
>mbox parser. ? what are you using to do those unicode tstes?
Justin Davis
The mbox file format is used by mutt and other mail clients/servers to store emails in; it's a retarded format but it's what's in use.
That's the output from running: cargo bench
Angel Campbell
say I made a program in python. Is there any way to hide the source code from others when distributing it. I know you can pack python with your program to a certain extent. But I really do want to give out the source.
Christian Reyes
I assume the ones in std are using the full unicode rules for upper/lower case. Is yours the same, or is ASCII enough for what you're doing?
Ian Sanchez
this desu, i was diagnosed with ADHD a while back and prescribed was Vyvanse. it doesn't really make me feel like i can do anything or like i hit the easy button like most people who got it without being diagnosed say.
Eli Thomas
why does the masterrace have adhd problems, user?
Gavin Perry
Mine uses unicode too, it's just the libstd one is the ultra naîve code, this is literally it:
Holy shit. I thought I remembered reading a PR adding an optimized implementation, but obviously that must have been some other function.
Landon Parker
>Only whites have adhd. Wew lad.
Kevin Wright
Keep in mind I'm also returning a Cow instead of a String, so my version couldn't be pushed upstream as-is (I do not allocate anything if the string doesn't change).
I could extract the code that always re-allocates and send it upstream tho, I'll check that out and see how performance fares in those cases.
Colton Ross
>only whites have adhd
Jose Perez
>tfw the ANSYS fluent API uses scheme Feels so fucking good man
Gavin Ortiz
I'm white and I have a legitimate diagnosis for autism. I fully intend to spread those autistic genes. You mad?
Josiah Moore
>implying you could get a gf
Brayden White
Working on a note taking system for books, just for shits and giggles. How's it looking so far? Suggestions?
Jackson Martin
like half of the autistic people i know have gfs. hambeasts, but gfs nonetheless.
Brandon Stewart
add some information when you hover the book or something
Isaiah Ramirez
as long as youre intelligent and have your shit together, you can be autistic and have gf
just dont become a cuck
Easton Thompson
wjhat language is this?
Wyatt Lopez
>Finishe Make that a checkbox instead of a text field.
William Sanders
>justifying degeneracy haha
Angel Reyes
>Master race
Corn syrup and diet as well as distractions. You're supposed to not give a fuck about civil wars and american colony at an age where you are noticing girls and have tons of energy. Also over diagnosis is capital for health care. You don't see those exchange students having trouble concentrating or needing a crutch. Half or almost all kids on the honor roll was on amphetamines.
Justin Bailey
I made it a checkbox instead of a text field originally, but Flask has a problem with accepting unchecked check boxes (it doesn't actually post anything if it's unchecked, which makes Flask throw a proxy error and shit itself). It's a temporary workaround.
It's also "Finishe" because the label positioning isn't quite right so the forms overlap the labels slightly when resized (it was "Finished" originally).
Jordan Morgan
Hell become a cuck. It's in the cards. He's likely to have stepchildren from some guy name Juan. But that's not a bad thing, whites are after all responsible to help raise children.
Lincoln Perry
Rust.
William Allen
> Work out 6 days a week > Diet is cleaner than a Barbie dolls taint > Drink a gallon of water a day > Perfect posture > 8hrs+ sleep every night I can guarantee I'm much healthier than you. My resting heart beat is 40bpm it only goes up to about 65 when I take vyvanse. >BTFO neck beard
Adam Sullivan
>Flask has a problem with accepting unchecked check boxes Freaky.
Josiah Allen
>
Andrew Miller
>program on amps >8hrs+ sleep Either you're NEET or lying.
Christian Taylor
I'm going to be honest with you, user. I'm not a virgin. I had a girlfriend for 3 1/2 years for part of high school and part of college. She left me, and now that I've had time to reflect on her, I'm a bit glad, actually, because she could be a real fucking bitch at times.
I'm working on a master's degree right now, user!
Grayson Ramirez
the internship i applied for requires us pass a hackerrank test, and i didn't know this until now but it pays $28/h so i'm certain it's going to be very hard and i want to be prepared. after cutting through the boilerplate, the things i can see they expect from me is experience programming in java (i have this), knowledge of SQL and databases (i don't have this), experience with linux (i kind of have this) and experience with web services (idk what this is)
i have until September 11th to finish the test and email them i've completed it. how do i best learn about sql, linux, and web services in that time frame?
Colton Martinez
>have to take Vyvanse You disgusting degenerate.
Landon Mitchell
>You're supposed to not give a fuck about civil wars and american colony at an age where you are noticing girls and have tons of energy
what are you suppose to be doing then? i agree the US education system is retarded tho
Justin Ortiz
> Wake up at 630am > Oats, banana and coffee > Gym or run at 700am > Get back at 730-815am > Pop vyvanse right then > First class isn't til 11 > Study between classes > Either program or study from 4-7pm > Watch movies or chill with friends > In bed at 10pm
>>> Fatty with no self control BTFO
Liam Thompson
...
Isaiah Watson
learning python
Luis Carter
so basically you live your life as if you were in prison
Lucas Myers
what does your day look like? pls greentext
Jose Richardson
>uses a drug to perform normal functions You're the one without no self control
Charles Harris
so even if you have a gym in your home you only work out for 25 minutes?