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/bash | |
index=$1 | |
HOST=127.0.0.1 | |
PR_PORT=$(expr 7000 + $index) | |
MY_PORT=$(expr 4000 + $index) | |
if [ $index -gt 1 ] | |
then | |
PEERS="-peers " | |
for i in $(seq 2 $index) | |
do |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
$ brew tap phinze/homebrew-cask | |
$ brew install brew-cask | |
$ brew cask install kobito |
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
$ sudo apt-get install update-manager-core | |
$ sudo do-release-upgrade -d |
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
class Client | |
constructor: (name, ready)-> | |
setTimeout => | |
@name = name | |
ready() | |
, 1000 | |
exports.Client = Client |
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
package main | |
import "fmt" | |
const SIZE = 3 | |
// | |
// CalcCell | |
// | |
type CalcCell struct { | |
ain, bin, aout, bout, cout chan int |
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
<type 'instance'> __main__.A True True | |
<class '__main__.B'> <class '__main__.B'> True True | |
<type 'int'> <type 'int'> False False | |
<type 'tuple'> <type 'tuple'> False False | |
<type 'list'> <type 'list'> False False | |
<type 'dict'> <type 'dict'> False False | |
<class '__main__.DD'> <class '__main__.DD'> True True | |
<type 'bool'> <type 'bool'> False False |
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(systolic_simulator3). | |
-export([run/0, pipe/3, terminator/0, cell/2, cell/4, input/3]). | |
input(AB, Next, [])-> | |
Next ! {AB, stop}; | |
input(AB, Next, Seq)-> | |
[Head | Rest] = Seq, | |
Next ! {AB, Head}, | |
input(AB, Next, Rest). |
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(systolic_simulator2). | |
-export([run/0, cell/6, input/3, terminator/0]). | |
input(AB, Next, [])-> | |
Next ! {AB, stop}; | |
input(AB, Next, Seq)-> | |
[Head | Rest] = Seq, | |
Next ! {AB, Head}, | |
input(AB, Next, Rest). |
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
events = require 'events' | |
initiator = new events.EventEmitter | |
class Pipe extends events.EventEmitter | |
constructor: (@name)-> | |
@queue = [] | |
recv: (event, value) => | |
@queue.push(value) |