Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python
#coding: utf-8
import timeit
test1 = """
import itertools
def test1():
count = itertools.count()
for i in count:
package main
import (
"fmt"
)
func main() {
ch := make(chan string)
go func(ch chan string) {
<-ch
package main
import (
"flag"
"fmt"
"unicode/utf8"
)
func main() {
flag.Parse()
#coding:utf8
import pylab
import subprocess
import time
pylab.ion()
l = []
package main
import (
"fmt"
"math"
"time"
)
func sum(a []int) int {
s := 0
import System.IO
--constants
e0 :: Double
e0 = 6.0
v1 :: Double
v1 = 3.0
v2 :: Double
v2 = 3.0
v12 :: Double
--はーいふたり組作ってー
groupOf :: Int -> [a] -> [[a]]
groupOf 0 _ = undefined
groupOf n [] = []
groupOf n xs = take n xs : groupOf n (drop n xs)
main = print $ groupOf 2 [1..11]
#!/usr/bin/env python
import matplotlib
matplotlib.use("TkAgg")
import pylab
import time
pylab.figure(figsize = (4,3))
pylab.ion()
#!/usr/bin/env python
from scipy import optimize
import pylab
import numpy
num = 100000
import pylab
import time
pylab.ion()
l = [1,2,3]
axis = pylab.gca()
for i in range(4, 100):
l.append(i)