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
{ | |
"Afghanistan": { | |
"alpha_3": "AFG", | |
"alpha_2": "AF", | |
"numeric_code": "93", | |
"international_perfix": "0", | |
"national_prefix": "0", | |
"national_significant_number": "9 digits", | |
"nsn_array": [ | |
9 |
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
[ | |
{ | |
"country_name": "Afghanistan", | |
"alpha_3": "AFG", | |
"alpha_2": "AF", | |
"numeric_code": "93", | |
"international_perfix": "0", | |
"national_prefix": "0", | |
"national_significant_number": "9 digits", | |
"nsn_array": [ |
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 fs | |
const fs = require('fs'); | |
function importFiles(x,y) { | |
fs.readdir(x, (err, files) => { | |
files.forEach(file => { | |
var doc = file | |
var char = /.+(?=\.\w+)/.exec(file); | |
if (char !== null) { |
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
from collections import OrderedDict | |
from markdown_to_json.markdown_to_json import Renderer, CMarkASTNester | |
from markdown_to_json.vendor import CommonMark | |
def od_to_d(od): | |
if type(od) == OrderedDict: | |
od = dict(od.items()) | |
for k, v in od.items(): | |
od[k] = od_to_d(v) |
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
# any line that does not start with '“' and ends with '”' is ignored. | |
“Add Amir to Sales.” | |
“Add Sally to Engineering” | |
“And the rest” | |
“Blue” | |
“Foundations of C++” | |
“Hello, world!” | |
“Hola” | |
“If this condition is met, run this block of code. If the condition is not met, do not run this block of code.” | |
“Ignored” |
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
#!/bin/bash | |
# https://sourcefoundry.org/hack/ | |
cdn_uri="https://cdn.jsdelivr.net/npm/[email protected]/build/web/hack.css" | |
font_name="Hack" | |
function powerlineify(){ | |
# https://github.com/chmln/sd | |
# brew install rustup-init && cargo install sd | |
sd -i \ | |
"(<style type=\"text/css\".+>)" \ | |
"\${1}@import url(\"$cdn_uri\");" "$1" |
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
package main | |
import ( | |
"fmt" | |
) | |
type Place struct { | |
name string | |
location [2]float64 | |
} |
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
#!/usr/bin/env bash | |
# https://github.com/ggreer/the_silver_searcher/wiki/Advanced-Usage#ignore | |
# git diff master -- $(diffignore.sh) | |
DIFFI='' | |
test -f ".diffignore" || cp ./scripts/.diffignore.base ./.diffignore || exit 1 | |
while read -r ignore;do |
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 sys | |
import requests | |
search_param=sys.argv[1] | |
if search_param == "--help": | |
print("USAGE:\n\t item_fetcher.py <item>") | |
else: | |
print(search_param) | |
item_id_r = requests.get(f"https://api.nexushub.co/wow-classic/v1/search?query={search_param}") | |
item_id=item_id_r.json()[0]["itemId"] |
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
package main | |
import ( | |
"errors" | |
"sync" | |
) | |
type QueueEntry struct { | |
id string | |
complete bool |
OlderNewer