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
# Lines configured by zsh-newuser-install | |
HISTFILE=~/.histfile | |
HISTSIZE=1000 | |
SAVEHIST=1000 | |
bindkey -e | |
# End of lines configured by zsh-newuser-install | |
# The following lines were added by compinstall | |
zstyle :compinstall filename '$HOME/.zshrc' | |
autoload -Uz compinit |
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
% Write a ring benchmark. Create N processes in a ring. Send a mes- sage round the | |
% ring M times so that a total of N * M messages get sent. Time how long this takes | |
% for different values of N and M. | |
-module(ring). | |
-author(hugo). | |
-export([create_ring/2, benchmark/2]). | |
benchmark(N, M) -> | |
statistics(runtime), |
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" | |
"reflect" | |
) | |
func 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
# coding: utf-8 | |
class A(list): | |
def __call__(self): | |
return "Good" | |
class B(object): |
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
from copy import deepcopy | |
def copy(entity): | |
return deepcopy(entity) | |
def get_start(l, n): | |
"""Get a root entity. |
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
# coding:utf-8 | |
import datetime | |
import os | |
from pymongo import MongoClient | |
def insert_node(post_to, name, code, level, parent, describe=""): | |
""" | |
post a node | |
:param post_to: collection |