Skip to content

Instantly share code, notes, and snippets.

View aroman's full-sized avatar
👋
hiring!

Avi Romanoff aroman

👋
hiring!
View GitHub Profile
const API_BASE_URL = 'https://api.promptlayer.com';
interface OpenAICompletionKwargs {
functionName: 'openai.Completion.create';
engine: string;
prompt: string | string[];
}
interface OpenAIChatCompletionKwargs {
functionName: 'openai.ChatCompletion.create';
using System;
using MessagePack;
namespace Simulation.Features.Buildings
{
[Serializable]
[MessagePackObject]
public readonly struct Cell : IEquatable<Cell>, IComparable<Cell>
{
[Key(0)] public readonly int x;
void setup() {
Serial.begin(9600);
pinMode(7, OUTPUT);
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
if (Serial.available() > 0) {
void mxnet_detect(const cv::Mat& mat) {
PyObject *pRunnerModule, *pRunnerFunc, *pRunnerResult;
Py_SetProgramName("mtcnn-bridge");
Py_Initialize();
PyEval_InitThreads();
import_array();
Py_BEGIN_ALLOW_THREADS

How to build & run Sensei on Ubuntu/NUC

Install Ubuntu 16.10 (64 bit)

Just go to ubuntu.com and download the ISO. I recommend using etcher to burn the ISO to a USB drive.

Install depdendencies

openFrameworks

11.04.16 16:00:54 [-0400] Downloading application 'registry.resin.io/charactercreatorkiosk/99f9e0c8cfab6608dfecf044b74df5e00ef94adb'
11.04.16 17:00:25 [-0400] Failed to download application 'registry.resin.io/charactercreatorkiosk/99f9e0c8cfab6608dfecf044b74df5e00ef94adb' due to 'Invalid configuration: undefined'
11.04.16 17:00:26 [-0400] Downloading application 'registry.resin.io/charactercreatorkiosk/99f9e0c8cfab6608dfecf044b74df5e00ef94adb'
11.04.16 17:01:06 [-0400] Failed to download application 'registry.resin.io/charactercreatorkiosk/99f9e0c8cfab6608dfecf044b74df5e00ef94adb' due to 'Got 504 when requesting image from delta server.'
11.04.16 17:01:09 [-0400] Downloading application 'registry.resin.io/charactercreatorkiosk/99f9e0c8cfab6608dfecf044b74df5e00ef94adb'
11.04.16 17:01:22 [-0400] Failed to download application 'registry.resin.io/charactercreatorkiosk/99f9e0c8cfab6608dfecf044b74df5e00ef94adb' due to 'Got 504 when requesting image from delta server.'
11.04.16 17:01:23 [-0400] Downloading applicati
const meetingName = t =>
t == MeetingType.EBoard ? 'Executive Board' : 'Brotherhood'
const brothersName = bs => {
const none = (bs.length > 0 ? '*none' : '')
return bs ? '* ' + bs.map(b => b.name).join('\n* ') : none
}
const present = bs => bs.filter(b => b.isPresent)
const absent = bs => bs.filter(b => !b.isPresent && (isEBoard ? b.rank : true))
@aroman
aroman / The Technical Interview Cheat Sheet.md
Created October 7, 2015 22:32 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.

Hello all. We must choose an extraction library for our new Goliath system to provide default values when no rules have been set. The choice has been narrowed down to Boilerpipe and Goose. They both have sub-par documenation (Boilerpipe, Goose), so I've dug around in the code to find the exact process by which they pull out data. Here I will compare them so we can choose one.

#Boilerpipe

This bad mamba jamba was developed by a Ph.D-having guy who, along with some other folks, wrote a big fat academic paper around the algorithm it uses, which you can find in our Dropbox if you really want to read it. Basically, they use link density, text density, and number of words on a block-by-block basis to distinguish boilerplate blocks from content blocks. A block is simply a contiguous piece of text terminated by the start

let Promise = require('bluebird');
function showReposWithSomeFile() {
gh.request('GET /user/repos')
.map(repo => {
let someFileContents = gh.request('GET /repos/:owner/:repo/contents/:path', {
owner: repo.owner.login,
repo: repo.name,
path: 'someFile',
});