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
import random | |
def _calc_one_layer(layer_in, layer_out, weights): | |
for i in xrange(len(layer_in)): | |
for j in xrange(len(layer_out)): | |
layer_out[j] += weights[i][j] * layer_in[i] | |
def calc(layers, weights): | |
for i in xrange(len(layers) - 1): |
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" | |
func combs(c chan []int, a1, a2 []int, depth int) { | |
depth += 1 | |
for i, _ := range a2 { | |
toa := make([]int, len(a1)) | |
copy(toa, a1) |
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
def combs(l1, l2): | |
if len(l2) == 0: | |
yield l1 | |
for i, x in enumerate(l2): | |
for v in combs(l1 + [x], l2[:i] + l2[i+1:]): | |
yield v | |
def main(): |
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
import time | |
from multiprocessing import Pool | |
def func(x): | |
time.sleep(1) | |
print x | |
return x | |
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
#include <stdio.h> | |
typedef struct HogeInterface { | |
int (*Func)(void); | |
} HogeInterface; | |
void CallModule(void* pInterface) { | |
HogeInterface* pHoge = (HogeInterface*)pInterface; |
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
#include <stdio.h> | |
void func1() { | |
printf("func1\n"); | |
} | |
void func2() { | |
printf("func2\n"); | |
} |
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
set nocompatible | |
set number | |
set smartindent | |
set autoindent | |
set tabstop=2 | |
set shiftwidth=2 | |
set softtabstop=2 | |
set expandtab | |
set hlsearch | |
set laststatus=2 |
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 ( | |
"bytes" | |
"fmt" | |
"log" | |
"os/exec" | |
"strconv" | |
) |
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" | |
"log" | |
"os/exec" | |
"sync" | |
) | |
func doit() { |
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" | |
"sort" | |
"strconv" | |
"strings" | |
) | |
type CodeInfo struct { |
OlderNewer