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 is_negative(number): | |
return number < 0 | |
def pos_neg(a, b, negative): | |
if negative: | |
return a < 0 and b < 0 | |
return len(set(map(is_negative, [a, b]))) > 1 |
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
var _ = require('lodash'); // gotta use lodash for everything | |
var bill = require('buffalo'); | |
var events = bill.events; | |
var conditions; | |
var victim; | |
/** | |
* TODO -- stop mixing promises and events, this API is really messed up. | |
*/ | |
describe('suit construction', 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
from itertools import chain, starmap | |
import pydash | |
import pytest | |
@pytest.fixture | |
def response(test_request): | |
""" | |
Use after calling the `test_request` fixture. Provides the resulting api request response object(s). | |
""" |
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 fs from 'fs'; | |
import path from 'path'; | |
import {parseAsync} from './yieldable-json'; | |
(async () => { | |
const jsonFileLocation: string = process.argv.slice(-1)[0] as string; | |
const jsonFilePath = path.resolve(process.cwd(), jsonFileLocation); | |
let result; | |
for await (const fragment of parseAsync(await fs.promises.readFile(jsonFilePath))) { |