stack diff steps
- Checkout & pull latest master
git checkout master && git pull --rebase origin master
- Cut branch from master
arc branch stacked_feature_1
- Make changes, add commits
from concurrent.futures import ThreadPoolExecutor, as_completed | |
def do_things(i, dry_run): | |
print(i, dry_run) | |
return i * 2, i * 3 | |
def main(): | |
build_ids = [1, 2, 3, 4, 5, 6, 7, 8, 9] |
stack diff steps
git checkout master && git pull --rebase origin master
arc branch stacked_feature_1
javascript: (function () { | |
const vids = [ | |
...document.querySelectorAll('video'), | |
...document.querySelectorAll('audio'), | |
...[...document.querySelectorAll('iframe').values()].flatMap(el => { | |
try { | |
return [ | |
...el.querySelectorAll('video').values(), | |
...el.querySelectorAll('audio').values(), | |
]; |
import openai | |
class ChatGPT: | |
""" A very simple wrapper around OpenAI's ChatGPT API. Makes it easy to create custom messages & chat. """ | |
def __init__(self, model="gpt-3.5-turbo", completion_hparams=None): | |
self.model = model | |
self.completion_hparams = completion_hparams or {} | |
self.history = [] | |
self._messages = [] |
export const COLLAPSED = 'collapsed'; | |
export const EXPANDED = 'expanded'; | |
export const COLLAPSIBLE_AND_EXPANDED = 'collapsable_and_expanded'; | |
export enum SideFilterCollapsibleStates { | |
COLLAPSED = 'collapsed', | |
COLLAPSIBLE_AND_EXPANDED = 'collapsable_and_expanded', | |
EXPANDED = 'expanded', | |
} |
import fs from 'fs'; | |
import path from 'path'; | |
import execa from 'execa'; | |
import { runner } from 'hygen'; | |
import Logger from 'hygen/dist/logger'; | |
export type ArgsObject = { [key: string]: string | boolean }; | |
export const readFileString = (path: string) => fs.readFileSync(path, 'utf8'); |
const MetricTypeDefs = ` | |
# Primitive types for conveying geometric data | |
type Metric { | |
count: Int! | |
} | |
# The input for sendMetrics | |
input MetricInput { | |
name: String! | |
points: [Float!]! |
Meteor.startup(function() { | |
Template.fb_pic.pic = function() {// helper function to display the pic on the page | |
var userProfile; | |
userProfile = Meteor.user().profile; | |
if(userProfile) { // logic to handle logged out state | |
return userProfile.picture; | |
} | |
}; | |
}); |
// Run with jest | |
import knex from 'knex' | |
import knexPgUpsert from '../knexPgUpsert' | |
const db = knex({ client: 'pg' }) | |
const taps = [ | |
{ |
<body> | |
{{#constant}} | |
<div id="fb-root"></div> | |
{{/constant}} | |
<div> {{> fb_pic}} {{loginButtons}}</div> | |
<br /> | |
<div><h2>Click to post to your feed:</h2> {{> feed}} </div> | |
</body> |