A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
| # Author: Pieter Noordhuis | |
| # Description: Simple demo to showcase Redis PubSub with EventMachine | |
| # | |
| # Update 7 Oct 2010: | |
| # - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
| # the WebSocket protocol implementation in the cramp gem does not work | |
| # well with Chrome's (newer) WebSocket implementation. | |
| # | |
| # Requirements: | |
| # - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
| from random import randint | |
| def inPlaceQuickSort(A,start,end): | |
| if start<end: | |
| pivot=randint(start,end) | |
| temp=A[end] | |
| A[end]=A[pivot] | |
| A[pivot]=temp | |
| p=inPlacePartition(A,start,end) |
| /** | |
| * Module dependencies | |
| */ | |
| var express = require('express'); | |
| var fs = require('fs'); | |
| var mongoose = require('mongoose'); | |
| var Schema = mongoose.Schema; | |
| // img path |
| import javax.net.ssl.SSLParameters; | |
| import javax.net.ssl.SSLSocket; | |
| import javax.net.ssl.SSLSocketFactory; | |
| import java.io.*; | |
| /** Establish a SSL connection to a host and port, writes a byte and | |
| * prints the response. See | |
| * http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services | |
| */ | |
| public class SSLPoke { |
Located in alphabetical order (not prefer)
Cab), also designed as a more modern replacement, written in Cgolang)| sepal.length | sepal.width | petal.length | petal.width | variety | |
|---|---|---|---|---|---|
| 5.1 | 3.5 | 1.4 | .2 | Setosa | |
| 4.9 | 3 | 1.4 | .2 | Setosa | |
| 4.7 | 3.2 | 1.3 | .2 | Setosa | |
| 4.6 | 3.1 | 1.5 | .2 | Setosa | |
| 5 | 3.6 | 1.4 | .2 | Setosa | |
| 5.4 | 3.9 | 1.7 | .4 | Setosa | |
| 4.6 | 3.4 | 1.4 | .3 | Setosa | |
| 5 | 3.4 | 1.5 | .2 | Setosa | |
| 4.4 | 2.9 | 1.4 | .2 | Setosa |
| 1. Install Linux updates, set time zones, followed by GCC and Make | |
| sudo yum -y update | |
| sudo ln -sf /usr/share/zoneinfo/America/Indianapolis \ | |
| /etc/localtime | |
| sudo yum -y install gcc make | |
| 2. Download, Untar and Make Redis 2.8 (check here http://redis.io/download) |
| package demo; | |
| import java.util.concurrent.TimeUnit; | |
| import org.springframework.aop.TargetSource; | |
| import org.springframework.aop.framework.ProxyFactory; | |
| import org.springframework.aop.support.DelegatingIntroductionInterceptor; | |
| import org.springframework.beans.factory.BeanFactory; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; |
| # Author: Kyle Kastner | |
| # License: BSD 3-Clause | |
| # Implementing http://mnemstudio.org/path-finding-q-learning-tutorial.htm | |
| # Q-learning formula from http://sarvagyavaish.github.io/FlappyBirdRL/ | |
| # Visualization based on code from Gael Varoquaux gael.varoquaux@normalesup.org | |
| # http://scikit-learn.org/stable/auto_examples/applications/plot_stock_market.html | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from matplotlib.collections import LineCollection |