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
>>> cond = True | |
>>> pause = Pause(lambda: cond) | |
>>> def p1(): | |
... print 'before pause' | |
... pause.wait() | |
... print 'after pause' | |
... | |
>>> def p2(): | |
... global cond, pause | |
... time.sleep(0.5) |
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
>>> worker1 = Worker('Hello, world') | |
>>> worker2 = Worker('Hello, world') | |
>>> spawn(worker1.run) | |
>>> spawn(worker2.run) | |
>>> remote_obj = customer.reflect([worker1, worker2]) | |
>>> remote_obj | |
<Remote 'Hello, world'> | |
>>> remote_obj + '!' | |
'Hello, world!' | |
>>> remote_obj.startswith('Hell') |
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
version=0.8.0 | |
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | |
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 0 1 2 3 4 5 6 7 8 9 10 | |
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |
version=0.9 | |
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | |
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | |
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
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 time | |
import msgpack | |
from person_pb2 import Person | |
TIMES = 100000 |
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 multiprocessing | |
from _pytest import runner | |
def pytest_runtest_protocol(item): | |
if 'boxed' in item.keywords: | |
reports = boxed_run_report(item) | |
for rep in reports: |
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
# 틱택토 게임 로직 | |
# 2013. 10. | |
import nt | |
def newBoard(): | |
return [[0,0,0], | |
[0,0,0],[0,0,0],] | |
count = 0 |
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
Usage: ack-grep [OPTION]... PATTERN [FILE] | |
Search for PATTERN in each source file in the tree from cwd on down. | |
If [FILES] is specified, then only those files/directories are checked. | |
ack-grep may also search STDIN, but only if STDIN is a | |
pipe instead of a terminal. | |
Default switches may be specified in ACK_OPTIONS environment variable or | |
an .ackrc file. If you want no dependency on the environment, turn it | |
off with --noenv. |
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> | |
#include "zmq.h" | |
int main(int argc, char const *argv[]) { | |
printf("%d.%d.%d", ZMQ_VERSION_MAJOR, ZMQ_VERSION_MINOR, ZMQ_VERSION_PATCH); | |
return 0; | |
} |
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
0: 278ms | |
1: 293ms | |
2: 279ms | |
3: 273ms | |
4: 280ms | |
5: 272ms | |
6: 278ms | |
7: 280ms | |
8: 275ms | |
9: 275ms |
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
using UnityEngine; | |
using System; | |
using System.Text; | |
public class UTF8SourceCode : MonoBehaviour { | |
void Start () { | |
/* string sa = "사"; error CS1010: Newline in constant */ | |
string sa = "사 | |
"; /* EC-82-AC-0A */ | |
string sasa = "사사"; /* EC-82-AC-EC-82-AC */ |