• 5ffd57393a85553ab55b
• 5cd28e2a812e5c65c9f7320e0726da18
• b6a6676a84b51c8200d0673a5b4a87c5
The quotes on this page come from this deleted question on Stackoverflow:
| I was drawn to programming, science, technology and science fiction | |
| ever since I was a little kid. I can't say it's because I wanted to | |
| make the world a better place. Not really. I was simply drawn to it | |
| because I was drawn to it. Writing programs was fun. Figuring out how | |
| nature works was fascinating. Science fiction felt like a grand | |
| adventure. | |
| Then I started a software company and poured every ounce of energy | |
| into it. It failed. That hurt, but that part is ok. I made a lot of | |
| mistakes and learned from them. This experience made me much, much |
The quotes on this page come from this deleted question on Stackoverflow:
sed -E -f solver.sed input where input is a file containing the maze.
For best results, resize your terminal to match the height of the maze. To disable animations, delete the lines containing p.
The solver assumes the following:
# \nSES) and end (E)All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |
| [ | |
| { "name": "Shanghai", "lat": 31.22222, "lng": 121.45806 }, | |
| { "name": "Buenos Aires", "lat": -34.61315, "lng": -58.37723 }, | |
| { "name": "Mumbai", "lat": 19.07283, "lng": 72.88261 }, | |
| { "name": "Mexico City", "lat": 19.42847, "lng": -99.12766 }, | |
| { "name": "Beijing", "lat": 39.9075, "lng": 116.39723 }, | |
| { "name": "Karachi", "lat": 24.9056, "lng": 67.0822 }, | |
| { "name": "Istanbul", "lat": 41.01384, "lng": 28.94966 }, | |
| { "name": "Tianjin", "lat": 39.14222, "lng": 117.17667 }, | |
| { "name": "Guangzhou", "lat": 23.11667, "lng": 113.25 }, |
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |