@MartinBüttner Sweet! This one basically says that cracks initially form in a rectilinear pattern, and over time, through repeated cycles of wetting and drying, the vertices of T-junctions shift so that instead of cracks intersecting at 90 and 180-degree angles, they move towards at intersecting at 120-degree angles.
> Your search - mud crack generator - did not match any documents.
Create a program that prints the entirety of the FitnessGram Pacer Test copypasta.
Rules are the same as the original:
Must output the lyrics exactly as they appear in the above pastebin. Here's the raw dump: http://pastebin.com/knuvEDyA
Cannot rely on any external resources - all lyrics...
seriously though, it would probably be quite popular, but I'd like to see us try come up with new ways to do interesting image processing/generation challenges.
As in coming up with a new/improved "goodness" criteria?
Maybe we could do a Turing-test-esque comparison. Have users try to pick which mud crack pattern is real and which is fake. Probably too involved for PPCG, but still... :P
>>> help(numpy.random.randint)
Help on built-in function randint:
randint(...) method of mtrand.RandomState instance
# <snip>
Parameters
----------
low : int
Lowest (signed) integer to be drawn from the distribution (unless
``high=None``, in which case this parameter is the *highest* such
integer).
Background
Actually (the successor to Seriously) is a stack-based imperative golfing language I created in November of 2015. Like many other golfing languages, it has one-byte commands that perform different functions based on the contents of the stack. One of its specialties is mathematics - it...
Steiner Chains are a set of N circles where each circle is tangent to 2 other non-intersecting circles as well as the the previous and next circles of the chain, as seen in the below images:
In this challenge, you will write a program/function that draws Steiner chains recursively, that is, ...
@QPaysTaxes What do you mean "in place"? Like the side effect of it changing is necessary (worried about potential XY problem...)? If that is what you want a bad way to do it would be to call pop several times...
$ time python -c 'x = range(10); del x[-3:]'
real 0m0.066s
user 0m0.020s
sys 0m0.022s
$ time python -c 'x = range(10); x[-3:] = []'
real 0m0.066s
user 0m0.023s
sys 0m0.023s
import time
n=100000000
x = list(range(n))
t = time.time()
del x[-1000:]
s = time.time()
print(s-t)
x = list(range(n))
t = time.time()
x[-1000:]=[]
s = time.time()
print(s-t)
But I still think I should get at least some microseconds.
Python 3's range is Python 2's xrange, which I started using instead of Python 2's range because I had problems when I wanted too large of a range.
The most common use-case of range(n) is looping through it, and in that case, however large n is, there's no difference in memory usage, which is a very beneficial thing.
Yeah those aren't, but is there a reason you would really want to do that? Like in this case you can clearly just apply that to the range before doing a bunch of wasted operations :P
I started making a game. In about 1.5 hours, I got to the point, where I have a black screen, with a red rectangle on it (wich by the way, should be a square). Gotta love OpenGL
Thanks for bringing this up!
Thanks in large part to the efforts of canon and his MIT licensed virtual console library for Stack Snippets, we now have a virtual console!
Normally I'd do screenshots, but with Stack Snippets I can just give you a live demo instead. Check it out!
console.log(...
Okay, this is a silly question, but how to I make sure my keyboard shortcuts get to my guest machine, not the host? I'm using I3wm, and I want to press super+l but windows sees win+l and locks my machine.