Skip to content

Instantly share code, notes, and snippets.

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):
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)
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():
import time
from multiprocessing import Pool
def func(x):
time.sleep(1)
print x
return x
#include <stdio.h>
typedef struct HogeInterface {
int (*Func)(void);
} HogeInterface;
void CallModule(void* pInterface) {
HogeInterface* pHoge = (HogeInterface*)pInterface;
#include <stdio.h>
void func1() {
printf("func1\n");
}
void func2() {
printf("func2\n");
}
set nocompatible
set number
set smartindent
set autoindent
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
set hlsearch
set laststatus=2
@y-abe
y-abe / killatom.go
Last active August 29, 2015 14:03
package main
import (
"bytes"
"fmt"
"log"
"os/exec"
"strconv"
)
package main
import (
"fmt"
"log"
"os/exec"
"sync"
)
func doit() {
package main
import (
"fmt"
"sort"
"strconv"
"strings"
)
type CodeInfo struct {