This file contains hidden or 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 types import FunctionType | |
__author__ = 'Daniel Lytkin' | |
def parameters(paramsList, naming = None): | |
"""Generates test method for every param in paramsList. | |
If 'naming' argument provided, new methods are named as naming(param). | |
Wrapped method must have one argument param | |
Usage: |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import codecs | |
DVORAK = ur"§[]',.pyfgcrl/=aoeuidhtns-\`;qjkxbmwvz" ur'±!@#$%^&*(){}"<>PYFGCRL?+AOEUIDHTNS_|~:QJKXBMWVZ' | |
RUSSIAN = ur"ё-=йцукенгшщзхъфывапролджэ\]ячсмитьбю." ur'Ё!"№;%:?*()_+ЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭ/[ЯЧСМИТЬБЮ,' | |
LAYOUTS = (DVORAK, RUSSIAN) |
This file contains hidden or 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 gulp from 'gulp'; | |
gulp.task('defalut', () => { | |
// ... | |
}); |
This file contains hidden or 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 {capitalize} from 'lodash'; | |
export function hello(name:string) { | |
return `Hello, ${capitalize(name)}`; | |
} |
This file contains hidden or 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 gulp from 'gulp'; | |
import ts from 'gulp-typescript'; | |
import babel from 'gulp-babel'; | |
gulp.task('build', () => { | |
return gulp.src(['typings/tsd.d.ts', 'src/**/*.ts']) | |
.pipe(ts({ | |
target: 'ES6', | |
outDir: 'build' | |
})) |
This file contains hidden or 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 {hello} from '../src/hello'; | |
import * as assert from 'assert'; | |
describe('hello', () => { | |
it('should capitalize the name', () => { | |
assert.equal("Goodbye, John", hello('john')); | |
}); | |
}); |
This file contains hidden or 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 gulp from 'gulp'; | |
import ts from 'gulp-typescript'; | |
import babel from 'gulp-babel'; | |
import mocha from 'gulp-spawn-mocha'; | |
gulp.task('build', () => { | |
return gulp.src(['typings/tsd.d.ts', 'src/**/*.ts', 'test/**/*.ts']) | |
.pipe(ts({ | |
target: 'ES6', | |
outDir: 'build' |
This file contains hidden or 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
// Type definitions for react-redux 2.1.2 | |
// Project: https://github.com/rackt/react-redux | |
// Definitions by: Qubo <https://github.com/tkqubo> | |
// Definitions: https://github.com/borisyankov/DefinitelyTyped | |
/// <reference path="../react/react.d.ts" /> | |
/// <reference path="../redux/redux.d.ts" /> | |
declare module "react-redux" { | |
import { Component, ComponentClass, StatelessComponent } from 'react'; |
This file contains hidden or 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 signal | |
import sys | |
import os | |
import subprocess | |
import Ice | |
class Forwarder(Ice.BlobjectAsync): | |
""" | |
Forwards incoming requests to Node.js server |
This file contains hidden or 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 * as fdb from 'foundationdb'; | |
require('segfault-handler').registerHandler(); | |
fdb.setAPIVersion(600); | |
main().catch(err => console.error(err)); | |
async function main() { | |
const db = (await fdb.open()).withKeyEncoding(fdb.encoders.tuple); |