git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
import time | |
from datetime import timedelta | |
class ProgressList: | |
def __init__(self, data, step=1, description=None, eta=True): | |
self.data = data | |
self.total = len(data) | |
self.current_index = 0 | |
self.step = step # Step interval for printing progress | |
self.start_time = None |
const fs = require("fs") | |
const puppeteer = require("puppeteer") | |
// First level config | |
const project = "atelier/05" | |
const count = 50 | |
// Second level config | |
const folder = `screenshots/${project}/` |
function doubleiter(nums: number[], target: number): number[] { | |
for(let i = 0; i<nums.length; i++){ | |
for(let j = i+1; j<nums.length; j++){ | |
} | |
} | |
}; |
# ^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^- | |
# SETUP | |
# ^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^- | |
.PHONY: help activate install flake8 isort black check virtualenv-path runserver runserver_plus migrations migrate shell shell_plus makemessages compilemessages collectstatic createsuperuser reset_db startapp clear_cache services | |
YELLOW := "\e[1;33m" | |
NC := "\e[0m" | |
INFO := @bash -c 'printf $(YELLOW); echo "=> $$1"; printf $(NC)' MESSAGE |
def calc_allocations(self, date, quantity, cap): | |
"""Figure out ideal allocations for a given date""" | |
# { | |
# coin_name: (percent_allocation, data) | |
# } | |
top_market = self.get_top_market(date, quantity) | |
total_cap = sum([coin.market_cap for coin in top_market]) | |
allocations = [{ |
npm init -y | |
npm install \ | |
tslint \ | |
eslint \ | |
ts-node \ | |
nodemon \ | |
prettier \ | |
typescript \ | |
eslint-config-prettier \ | |
eslint-plugin-prettier \ |
// node diff.js f1.json f2.json | |
const _ = require('lodash'); | |
const path = require('path'); | |
if (process.argv.length != 4) { | |
throw new Error('node script.js file1.json file2.json'); | |
} | |
const f1 = process.argv[2]; |
const toType = obj => ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase(); |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
javascript: (function()%7Bvar t%3D%7Beval:%27"Date.prototype.yyyymmdd%3Dfunction()%7Bvar t%3Dthis.getMonth()%2B1,e%3Dthis.getDate()%3Breturn%5Bthis.getFullYear(),%5C%5C"-%5C%5C",(t>9%3F%5C%5C"%5C%5C":%5C%5C"0%5C%5C")%2Bt,%5C%5C"-%5C%5C",(e>9%3F%5C%5C"%5C%5C":%5C%5C"0%5C%5C")%2Be%5D.join(%5C%5C"%5C%5C")%7D%3Bvar search%3Dprompt(%5C%5C"Recent search on github%3F%5C%5C"),diffDays%3Dprompt(%5C%5C"Since how many days%3F%5C%5C"),today%3Dnew Date,priorDate%3D(new Date).setDate(today.getDate()-parseInt(diffDays)),d%3Dnew Date(priorDate).yyyymmdd()%3Bwindow.location%3D%5C%5C"https://github.com/search%3Futf8%3D✓%26q%3D%5C%5C"%2BencodeURIComponent(search%2B%5C%5C" pushed:>%5C%5C"%2Bd)%2B%5C%5C"%26type%3DRepositories%5C%5C"%3B"%27%7D,e%3D!0%3Bif("object"%3D%3Dtypeof this.artoo%26%26(artoo.settings.reload%7C%7C(artoo.log.verbose("artoo already exists within this page. No need to inject him again."),artoo.loadSettings(t),artoo.exec(),e%3D!1)),e)%7Bvar o%3Ddocument.getElementsByTagName("body")%5B0%5D%3Bo%7C%7C(o%3Ddocument. |