This file contains hidden or 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 | |
| import ( | |
| "net" | |
| "bufio" | |
| "fmt" | |
| "strings" | |
| "reus/utils" | |
| "net/http" | |
| "io/ioutil" |
This file contains hidden or 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 | |
| import ( | |
| "bufio" | |
| "flag" | |
| "fmt" | |
| "io/ioutil" | |
| "net" | |
| "net/http" | |
| "reus/utils" |
This file contains hidden or 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 oo | |
| import ( | |
| "testing" | |
| "strings" | |
| ) | |
| const n = 1024 * 1 | |
| func BenchmarkPassByCopy(b *testing.B) { |
This file contains hidden or 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
| use task::spawn; | |
| use pipes::{Chan, Port, stream}; | |
| fn main() { | |
| let mut n = 100; | |
| let m = 1000000; | |
| let mut (firstChan, leftPort): (Chan<int>, Port<int>) = stream(); | |
| firstChan.send(m); | |
| let mut (rightChan, rightPort): (Chan<int>, Port<int>) = stream(); |
This file contains hidden or 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 random | |
| def foo(): | |
| n = random.randint(0, 2) | |
| if n == 0: | |
| return 1 | |
| elif n == 1: | |
| return "foo" | |
| elif n == 2: | |
| return {} |
This file contains hidden or 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 | |
| import ( | |
| "github.com/reusee/golua/lua" | |
| "fmt" | |
| "time" | |
| ) | |
| func main() { | |
| for n := int64(0); n < int64(1024); n++ { |
This file contains hidden or 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
| from gi.repository import GLib | |
| main_loop = GLib.MainLoop() | |
| class Counter: | |
| def __init__(self): | |
| self.c = 0 | |
| def count(self): | |
| print self.c | |
| self.c += 1 |
This file contains hidden or 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
| # coding: utf8 | |
| def p(o, level = 0): | |
| if hasattr(o, '__iter__'): | |
| if level > 0: print ' ' * level, | |
| par = { | |
| list: ('[', ']'), | |
| tuple: ('(', ')'), | |
| dict: ('{', '}'), | |
| }[type(o)] |
This file contains hidden or 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 | |
| import ( | |
| "encoding/xml" | |
| "log" | |
| "os" | |
| "io" | |
| "fmt" | |
| "time" | |
| "strings" |
This file contains hidden or 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 | |
| import ( | |
| "math" | |
| "math/rand" | |
| "fmt" | |
| "sync" | |
| ) | |
| func main() { |