This page is now deprecated! You can get the latest information about First Wednesdays from our new Meetup group: http://bit.ly/cville-fw
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
//Funny code segment I hacked together | |
private void TransportationPanel_Tap(object sender, System.Windows.Input.GestureEventArgs e) | |
{ | |
settings["transportationMode"] = transportationOptions[(transportationOptions.IndexOf((string)settings["transportationMode"]) + 1) % 3]; | |
switch ((string)settings["transportationMode"]) | |
{ | |
case "bike": | |
TransportationOption.Source = new BitmapImage(new Uri("Images/Icons/bike_icon_white.png", UriKind.Relative)); | |
break; | |
case "car": |
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
private void RadiusPanel_Tap(object sender, System.Windows.Input.GestureEventArgs e) | |
{ | |
settings["radius"] = ((int)settings["radius"] % 10) + 1; | |
radiusText.Text = (int)settings["radius"] + ((int)settings["radius"] != 1 ? " miles" : " mile"); | |
} |
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
<html> | |
<title>rtb</title> | |
<head> | |
<meta http-equiv="refresh" content="5; url=http://twitter.com/r00tth3b0x"> | |
</head> | |
<body bgcolor="black"> | |
<pre><center><font color="white"> | |
d8888b. .d88b. .d88b. d888888b d888888b db db d88888b d8888b. .d88b. db db | |
88 `8D .8P Y8. .8P Y8. `~~88~~' `~~88~~' 88 88 88' 88 `8D .8P Y8. `8b d8' |
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 input_data | |
import tensorflow as tf | |
# http://www.tensorflow.org/tutorials/mnist/beginners/index.html | |
print '\033[93m' + 'Tutorial1 from:\nhttp://www.tensorflow.org/tutorials/mnist/beginners/index.html' + '\033[0m' | |
print 'MNIST INPUT DATA' | |
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) | |
'PLACE HOLDERS' | |
# Make a placeholder / value to input on run |
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
extern mod extra; | |
use std::{int,io,result}; | |
use extra::{net,net_tcp,uv}; | |
fn main() { | |
let (accept_port, accept_chan) = stream(); | |
let (finish_port, finish_chan) = stream(); | |
let addr = extra::net_ip::v4::parse_addr("127.0.0.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
#!/bin/sh | |
echo "installing fonts at $PWD to ~/.fonts/" | |
mkdir -p ~/.fonts/adobe-fonts/source-code-pro | |
git clone https://github.com/adobe-fonts/source-code-pro.git ~/.fonts/adobe-fonts/source-code-pro | |
# find ~/.fonts/ -iname '*.ttf' -exec echo \{\} \; | |
fc-cache -f -v ~/.fonts/adobe-fonts/source-code-pro | |
echo "finished installing" |
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
module Example () where | |
import Network.HTTP | |
-- Non HTTPS | |
-- 1. Perform a basic HTTP get request and return the body | |
get :: String -> IO String | |
get url = simpleHTTP (getRequest url) >>= getResponseBody |
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
--Haskell Quine | |
--Implementation 1 | |
import Control.Monad | |
import Control.Monad.Instances | |
main = (putStr . ap (++) show) | |
"--Haskell Quine\n--Implementation 1\nimport Control.Monad\nimport Control.Monad.Instances\nmain = (putStr . ap (++) show) " | |
--Implementation 2 | |
--main = putStrLn (s ++ show s) where s = | |
-- "--Haskell Quine\n--Implementation 2\nmain = putStrLn (s ++ show s) where s =" |
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
# Implementation of a simple MLP network with one hidden layer. Tested on the iris data set. | |
# Requires: numpy, sklearn>=0.18.1, tensorflow>=1.0 | |
# NOTE: In order to make the code simple, we rewrite x * W_1 + b_1 = x' * W_1' | |
# where x' = [x | 1] and W_1' is the matrix W_1 appended with a new row with elements b_1's. | |
# Similarly, for h * W_2 + b_2 | |
import tensorflow as tf | |
import numpy as np | |
from sklearn import datasets | |
from sklearn.model_selection import train_test_split |
OlderNewer