Skip to content

Instantly share code, notes, and snippets.

View Poincare's full-sized avatar

Dhaivat Pandya Poincare

View GitHub Profile
require 'eventmachine'
EM.run do
spawned_process = EM.spawn do |did_what|
puts "I just " + did_what
end
EM.add_periodic_timer(1) do
spawned_process.notify "ate"
end
class Chromosome
...
def self.set_roulette(chrs)
@@roulette = []
chrs.each do |f|
i = 0
while i < f.fitness
@@roulette.push(f)
i += 1
syntax on
set tabstop=2
set expandtab
set ai
appdirs==1.4.3
appnope==0.1.0
asn1crypto==0.24.0
attrs==18.1.0
backports-abc==0.5
backports.functools-lru-cache==1.5
backports.shutil-get-terminal-size==1.0.0
bleach==2.1.3
bokeh==0.13.0
brewer2mpl==1.4.1
class Chromosome
...
def self.produce_new(chrs)
roulette(chrs)
newchrs = []
chrs.each do |c|
newchrs.push(roulette(chrs))
end
fitnesses(newchrs)
package main
import (
"github.com/hoisie/web"
"fmt"
)
func logName(ctx *web.Context, val string) {
name := ctx.Params["name"]
package main
import (
"github.com/hoisie/web"
"net/http"
"strconv"
"time"
)
func hello(ctx *web.Context, num string) {
\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
\title{Mathematics Work Sample (Stanford OHSx)}
\author{Dhaivat Pandya}
\maketitle
\textbf{Problem: } Let $\theta$ be a real number. Prove that the following two matrices are similar over the field of complex numbers:
\begin{equation}
package main
import (
"github.com/hoisie/web"
)
func hello(ctx *web.Context, val string) {
ctx.WriteString("hello " + val)
}
package main
import (
"github.com/hoisie/web"
)
func hello(val string) string {
return "hello " + val
}