This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
# We’ll use NumPy matrices in TensorFlow | |
import numpy as np | |
# Define a 2x2 matrix in 3 different ways | |
m1 = [[1.0, 2.0], | |
[3.0, 4.0]] | |
m2 = np.array([[1.0, 2.0], | |
[3.0, 4.0]], dtype=np.float32) | |
m3 = tf.constant([[1.0, 2.0], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
revenue = np.dot(prices, amounts) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
revenue = 0 | |
for price, amount in zip(prices, amounts): | |
revenue += price * amount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A breakthrough in artificial intelligence will tell us a lot about ourselves-- | |
what it means to be human, and what it means to think or whether thought is observable, | |
and if so, can it be traced it to an inspiration. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# download the code | |
wget https://gist.github.com/BinRoot/8157165/raw/9109a51173b76c4e233fd00165fb25e62b249aa5/spell.hs | |
# download big.txt | |
wget http://norvig.com/big.txt | |
# run the code | |
runhaskell spell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The | |
real number system | |
is that | |
unique | |
algebraic structure | |
represented by | |
all | |
Dedekind-complete ordered fields. | |
- Eric Schechter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# zshot allows you to easily change the filename and destination of each screenshot | |
# Dependencies: scrot, zenity | |
cd ~ | |
if [ ! -d "Pictures" ] | |
then mkdir ~/Pictures | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clean :: String -> String | |
clean = foldr (.) id $ map (flip replace "") ["!", "\"", "#", "$", "%", "(", ")", ".", ",", "?"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ars longa, vita brevis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Airplanes don’t flap their wings; why should computers think? | |