How to get data like this...
| Name | Age | Street Address | City | State | Zip |
|---|---|---|---|---|---|
| Tami | 23 | 123 Main St | Anytown | Anystate | 11111 |
| John | 54 | 456 Second Ave | Anytown | Anystate | 22222 |
| Troy | 39 | 789 Last Cir | Anytown | Anystate | 99999 |
| /* | |
| You can run this in Chrome by: | |
| 1. going to View > Developer > Developer Tools | |
| 2. find the "Console" tab | |
| 3. copy all the stuff below in one chunk, and paste into the console | |
| 4. hit <Enter> | |
| After that you can modify a line by copying it and pasting onto new a line and hitting <Enter> to re-run that line | |
| */ |
OMG, I was feeling so low about an hour ago:
And I was about to email you this message:
So, here's my analysis of what's going on...
This shit is so far over my head!
| #!/bin/bash | |
| grep 'INSTANT CH4' *.PRT | \ # scan all files (*.PRT) and filter each file by the text "INSTANT CH4" | |
| awk ' NR % 2 == 1 { print; } ' | \ # there are two different datasets per file with your variables, this takes the | |
| # 'INSTANT CH4' line from the first dataset | |
| cut -c 1-7,67-76 | \ # cut out everything *but* the filename/year (first 7 characters) and the column | |
| # for the data point you care about (characters 67 to 76) | |
| sed -E 's/ +/,/' \ # `cut` takes year and data columns and joins them with a space, `sed` replaces | |
| # the space with a comma for CSV | |
| > INSTANT_CH4.csv # save the output to a CSV file |
| // | |
| // ContentView.swift | |
| // Dice2 | |
| // | |
| // Created by Zach Young on 8/17/20. | |
| // Copyright © 2020 Zach Young. All rights reserved. | |
| // | |
| import SwiftUI |
| "#!/bin/zsh", | |
| "BASE_URL=https://pivotaltracker.com", | |
| (. [] | | |
| .id as $sid | ( | |
| "\nmkdir \($sid)", | |
| ( | |
| .comments[].file_attachments[] | | |
| "curl --location -s -H \"X-TrackerToken: $TOKEN\" \"$BASE_URL\(.download_url)\" > \($sid)/\(.id)_\(.filename)" | |
| ) | |
| ) |
| #!/usr/bin/env python | |
| """ | |
| Permute the characters of an encoding space. | |
| """ | |
| import math | |
| import sys | |
| def permute_arbitrary(chars, _len, arr, s): | |
| """Permutes an arbitrary encoding space, each permutation being a string of chars of length _len""" |
| """ | |
| I got really interested in how many edits 'Once Upon a Time in Hollywood' got after | |
| reading about the contentious issue of whether or not the Plot section should include | |
| information deemed to be a spoiler, and the kinda-heated debate on the Talk page. | |
| This gist also serves as my own documentation for using the WikiMedia query/revisions API. | |
| """ | |
| import json | |
| import pickle | |
| import pprint |
| #!/bin/bash | |
| bin/godoc -http "localhost:6060" -index -index_files bin/idx -v > godoc.log 2>&1 & | |
| open "http://localhost:6060/" | |
| bin/tour > tour.log 2>&1 & | |
| docPid=$(ps | grep godoc | grep -v grep | awk '{print $1}') | |
| tourPid=$(ps | grep tour | grep -v grep | awk '{print $1}') | |
| echo "#!/bin/bash" > kill-learn.sh |
| def permute(n, chars='01', limit=128, start=0): | |
| appended = 0 | |
| counter = 0 | |
| def f(s, a): | |
| nonlocal appended | |
| nonlocal counter | |
| if appended == limit: | |
| return a | |
| if len(s) == n: |