- Linux system with
>=4GB
RAM and Docker installed. git clone https://github.com/ryankennedyio/deep-dream-generator.git
- `docker run -d -p 8888:8888 -e PASSWORD=foo -v /root/deep-dream-generator:/src ryankennedyio/deepdream
docker ps
-> copy container iddocker exec -it <container> bash
cd /src
rm input.jpg
wget -O input.jpg 'http://d817ypd61vbww.cloudfront.net/sites/default/files/styles/media_responsive_widest/public/tile/image/AbbeyRoad.jpg'
- open
https://<hostname>:8888/
, pass self-signed certificate warning, enter password - open the
dream.ipynb
IPython Notebook
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
// 10PRINT rosette Processing 3 code | |
// thanks to @shiffman ! | |
float r=20; | |
float s=10; | |
void setup() { | |
size(300, 300); | |
frameRate(1); | |
} |
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 | |
x = tf.Variable(2, name='x', dtype=tf.float32) | |
log_x = tf.log(x) | |
log_x_squared = tf.square(log_x) | |
optimizer = tf.train.GradientDescentOptimizer(0.5) | |
train = optimizer.minimize(log_x_squared) | |
init = tf.initialize_all_variables() |
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
var canvas = document.getElementById('canvas'); | |
var ctx = canvas.getContext('2d'); | |
var width = 700; | |
var height = 700; | |
var center = {x: width/2 , y: height/2}; | |
var circleStroke = function(radius, x, y, strokeColor) { | |
ctx.strokeStyle = strokeColor; | |
ctx.beginPath(); | |
ctx.arc(x, y, radius, 0, Math.PI * 2); |
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
var canvas = document.getElementById('canvas'); | |
var ctx = canvas.getContext('2d'); | |
var width = 700; | |
var height = 700; | |
var mainRadius = 200; | |
var center = {x: 0, y: height/2}; | |
var points = []; | |
//create distorted circle |
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
package main.scala | |
object GCD | |
{ | |
def gcd(a: Int,b: Int): Int = { | |
if(b ==0) a else gcd(b, a%b) | |
} | |
def main(args: Array[String]) { | |
println(gcd(25,15)) |