A short 16-bit story scene animated purely with CSS3.
Forked from Will Boyd's Pen Super Toast Story: Final Scene.
A Pen by ryaninhust on CodePen.
set print pretty on | |
set print object on | |
set print static-members on | |
set print vtbl on | |
set print demangle on | |
set demangle-style gnu-v3 | |
set print sevenbit-strings off | |
python | |
import sys | |
sys.path.insert(0, '/home/ryanhust/ryanlib/python') |
在macbook pro 4核上的测试结果,python自带的map表现比起ipython 的map,list comprehensions都要好。但是有优化的multi_mcpi还是不错。 | |
$ ipcluster start --n=4 | |
print mcpi(100000000) | |
#print multi_mcpi_by_map(dview, 100000000) # 传递太耗时 | |
#print multi_mcpi_by_list_comp(dview, 100000000) | |
#print multi_mcpi(dview, 100000000) | |
$ time py multi_mcpi.py | |
importing random from random on engine(s) |
set mouse=a | |
set nu | |
runtime! debian.vim | |
syntax on | |
set background=dark | |
set cursorcolumn | |
set cursorline | |
filetype plugin indent on | |
filetype off | |
" format and user interface |
#!/usr/bin/python | |
import usb.core | |
import usb.util | |
import usb.backend.libusb10 | |
import sys, getopt | |
opts = getopt.getopt(sys.argv[1:],'',['off']) | |
off = 'off' in opts[1] |
/* strtok example */ | |
#include <stdio.h> | |
#include <cstring> | |
#include <string> | |
#include <vector> | |
using namespace std; | |
int main () | |
{ | |
char str[] ="1 1:1 2:2 3:3"; | |
char * pch; |
def merge_array(l_array, r_array): | |
merged_array = [] | |
i, j = 0, 0 | |
local_count = 0 | |
while(i < len(l_array) and j < len(r_array)): | |
if l_array[i] > r_array[j]: | |
merged_array.append(r_array[j]) | |
local_count += len(l_array) - i | |
j += 1 | |
else: |
>>> class Case(object): | |
... a = [] | |
... def show_attribute(self): | |
... print self.a | |
>>> Case.a | |
[] | |
>>> case = Case() | |
>>> case.a | |
[] |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<style> | |
.config{width:250px;margin: 40px auto;} | |
.grid{display:none;border-collapse:collapse; margin:30px auto 0 auto;} | |
.grid td{width:50px; height:50px; text-align:center; vertical-align:middle;} | |
.choice{display:inline-block;width:100px;} |
from copy import deepcopy | |
RED = 1 # max | |
BLACK = 2 # min | |
class Board(object): | |
def __init__(self, width=5, height=4, win_len=4, depth=2): | |
self.width = width |
A short 16-bit story scene animated purely with CSS3.
Forked from Will Boyd's Pen Super Toast Story: Final Scene.
A Pen by ryaninhust on CodePen.