I hereby claim:
- I am nuno-andre on github.
- I am nunoandre (https://keybase.io/nunoandre) on keybase.
- I have a public key ASBIskuCwqylesTbmSO0LQw7_SEE34onVHbpQGoCMzV9uAo
To claim this, I am signing this object:
import requests | |
from json import dumps, loads | |
from msgpack import packb, unpackb | |
data = {'say': 'hello, world!'} | |
headers_msgpack = {'Content-Type': 'application/msgpack'} | |
headers_json = {'Content-Type': 'application/json'} | |
r = requests.post('http://localhost:8000/', data=packb(data), headers=headers_msgpack) | |
print(unpackb(r.content)) |
using System; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
public static class IdentifierExtensions | |
{ | |
// definition of a valid C# identifier: http://msdn.microsoft.com/en-us/library/aa664670(v=vs.71).aspx | |
private const string FORMATTING_CHARACTER = @"\p{Cf}"; | |
private const string CONNECTING_CHARACTER = @"\p{Pc}"; | |
private const string DECIMAL_DIGIT_CHARACTER = @"\p{Nd}"; |
I hereby claim:
To claim this, I am signing this object:
""" | |
Extract block and inline comments, docstrings and | |
no-op'd string literals from Python code. | |
""" | |
from tokenize import tok_name, tokenize, TokenInfo | |
import itertools | |
import ast | |
TokenInfo.is_type = lambda t, tok_type: tok_name[t.type] == tok_type |
# export applications | |
scoop export | sls '([A-Za-z0-9\-\_]+)' |% { | |
$_.matches.groups[1].value } > apps.txt | |
# export used buckets | |
$buckets = scoop export | sls '\[([A-Za-z0-9\-\_]+)\]' |% { | |
$_.matches.groups[1].value } | select -unique | |
<# or all installed buckets | |
$buckets = scoop bucket list |
def heidi_decode(enc): | |
enc, shift = enc[:-1], int(enc[-1]) | |
return ''.join(chr(int(enc[i:i+2], 16) - shift) | |
for i in range(0, len(enc), 2)) |
#!/usr/bin/env python3 | |
""" | |
.code-workspace generator | |
https://github.com/microsoft/vscode/issues/45177#issuecomment-528254048 | |
""" | |
from pathlib import Path | |
import json | |
import os | |
# not project dirs, they only belong to the metarepo |
""" | |
Retrieve a URL's eTLD (effective top-level domain) and its operator | |
from the Public Suffix List | |
https://wiki.mozilla.org/Public_Suffix_List | |
""" | |
from functools import cached_property | |
from urllib.parse import urlparse | |
from typing import Optional | |
from io import StringIO |
term | [IPA][I] | [respelling][r] | notes |
---|---|---|---|
[ASIC][asic] | /ˈeɪsɪk/ | [source][asic] | |
[Bash][B] | /bæʃ/ | bash | [source][B-1] |
[CAPTCHA][cap] | /kæp.tʃə/ | kap-TCHA | [source][cap] |
[cout][c] | see-out | [✓ source][c-1] | |
[char][ch] | /tʃɑr/ | tchar | [source][ch-1] |
[deque][dq] | /:dek/ | deck | |
[etcd][e] | /ˈɛtsiːdiː/ | ET-see-dee | [✓ source][e-1] |
[fsck][f] | fisk | [✓ source][f-1], [alt][f-2] |