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 csv | |
import random | |
# Represents a founder. this makes the simplified assumption of one founder per startup | |
class Founder: | |
def __init__(self, gender): | |
self.gender = gender | |
self.round = 'Seed' | |
self.funding = 0 | |
self.amountRaised = 0 |
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
private var audioFiles: Array<String> | |
private var audioEngine: AVAudioEngine = AVAudioEngine() | |
private var mixer: AVAudioMixerNode = AVAudioMixerNode() | |
func Play() { | |
// do work in a background thread | |
DispatchQueue.global(qos: .background).async { | |
self.audioEngine.attach(self.mixer) | |
self.audioEngine.connect(self.mixer, to: self.audioEngine.outputNode, format: nil) | |
// !important - start the engine *before* setting up the player nodes |
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
const NodeRSA = require('node-rsa'); | |
const fs = require('fs'); | |
export const decrypt = () => { | |
// Read in your private key from wherever you store it | |
const file = fs.readFileSync('/keys/private.pem', 'utf8'); | |
const key = new NodeRSA(); | |
key.importKey(file, 'pkcs1-pem'); | |
const encrypted = fs.readFileSync(__dirname + '/encrypted-config', 'utf8'); |
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
const NodeRSA = require('node-rsa'); | |
const fs = require('fs'); | |
const argv = require('minimist')(process.argv.slice(2)); | |
const file = fs.readFileSync('data/' + argv.file, 'utf8'); | |
const key = new NodeRSA().generateKeyPair(); | |
const publicKey = key.exportKey('pkcs8-public-pem'); | |
const privateKey = key.exportKey('pkcs1-pem'); |
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
Show hidden characters
{ | |
"presets": [ | |
[ | |
"env", | |
{ | |
"targets": { | |
"browsers": [ | |
"> 2% in US" | |
] | |
}, |