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
void InitParaAndVar(int CensoringPara, int tauPara, int JPara, int MPara, double dPara[], | |
double pPara[], double piPara[], double pdfPara[]) | |
{ | |
int i, j, u; | |
Censoring = CensoringPara; | |
tau = tauPara; | |
J = JPara; | |
M = MPara; |
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 io | |
>>> f = io.open("./article_categories_en.nt") | |
>>> f = io.TextIOWrapper(f) | |
>>> next(f) | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "/usr/lib64/python2.6/io.py", line 1782, in next | |
line = self.readline() | |
File "/usr/lib64/python2.6/io.py", line 1858, in readline | |
while self._read_chunk(): |
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
/** | |
* ChromHMM - automating chromatin state discovery and characterization | |
* Copyright (C) 2008-2012 Massachusetts Institute of Technology | |
* | |
* This program is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU General Public License | |
* as published by the Free Software Foundation; either version 2 | |
* of the License, or (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, |
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 g(): | |
... yield 42 | |
... | |
>>> gen = g() | |
>>> next(gen) | |
42 | |
>>> gen.throw(RuntimeError) | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "<stdin>", line 2, in g |
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
struct chromNameCallbackContext | |
/* Some stuff that the bPlusTree traverser needs for context. */ | |
{ | |
struct bbiChromInfo *list; /* The list we are building. */ | |
boolean isSwapped; /* Need to byte-swap things? */ | |
}; | |
static void chromNameCallback(void *context, void *key, int keySize, void *val, int valSize) | |
/* Callback that captures chromInfo from bPlusTree. */ | |
{ |
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 -*- | |
""" | |
Incomplete RFC 2617 implementation for Tornado web server [1], originally | |
implemeted as `curtain` by Brian K. Jones [2]. | |
[1] http://tornadoweb.org | |
[2] http://github.com/bkjones/curtain | |
""" |
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
coffee> f = ([x, y]) -> x + y | |
[Function] | |
coffee> f([1, 2]) | |
3 | |
coffee> f = ({x, y}) -> x + y | |
[Function] | |
coffee> f({x: 1, y: 2}) | |
3 |
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
>>> map(lambda (x, y): x + y, ([1, 2], [3, 4])) | |
[3, 7] | |
>>> map(lambda (x, y): x + y, [xrange(2)]) | |
[1] | |
>>> def g(): | |
... yield 1 | |
... yield 2 | |
... | |
>>> map(lambda (x, y): x + y, [g()]) | |
[3] |
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
#use "topfind" | |
#require "oasis.base" | |
open OASISTypes | |
open OASISVersion | |
let (|>) x f = f x | |
let find_all_depends = | |
let rec inner acc = function |
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
# PyPy | |
>>>> 0 is 0 | |
True | |
>>>> x = 0 | |
>>>> x is 0 | |
False | |
# CPython | |
>>> 0 is 0 | |
True |
OlderNewer