This file contains 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
-- General settings | |
vim.opt.clipboard = 'unnamedplus' -- Use system clipboard | |
vim.opt.completeopt = {'menu', 'menuone', 'noselect'} -- Completion options | |
vim.opt.mouse = 'a' -- Enable mouse support in all modes | |
vim.opt.tabstop = 4 -- Number of visual spaces per TAB | |
vim.opt.softtabstop = 4 -- Number of spaces in tab when editing | |
vim.opt.shiftwidth = 4 -- Number of spaces for each indentation level | |
vim.opt.expandtab = true -- Convert tabs to spaces | |
-- Spelling |
This file contains 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 numpy as np | |
from scipy import stats | |
import csv | |
from dateutil import parser | |
val = [] | |
ctrl = [] | |
cond = parser.parse("2021-11-29T00:00:00Z") | |
with open('./cta.csv') as file: |
This file contains 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
type Unpromisify<T> = T extends Promise<infer R> ? R : T; | |
const withNullCheck = <T extends ((...args: any[]) => any)>(fn: T) => { | |
return async (...args: Parameters<T>) => { | |
const result = await fn(...args); | |
if (result === null) { | |
throw new Error("Object should not be null."); | |
} | |
return result as NonNullable<Unpromisify<ReturnType<T>>>; | |
} |
This file contains 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
// Prolog | |
prolog | |
xmldecl | |
versioninfo | |
eq | |
versionnum | |
misc | |
// Document Type Definition | |
doctypedecl |
This file contains 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
{ | |
... | |
"author": "minamorl", | |
"license": "MIT", | |
"dependencies": { | |
"@types/bcrypt": "^1.0.0", | |
"@types/body-parser": "0.0.33", | |
"@types/bookshelf": "^0.8.34", | |
"@types/cookie-parser": "^1.3.30", | |
"@types/cors": "^2.8.0", |
This file contains 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 staccato | |
import time | |
# must be replaced | |
consumer_key = "YOURS" | |
consumer_secret = "YOURS" | |
access_token_key = "YOURS" | |
access_token_secret = "YOURS" | |
TARGET = "username" | |
SLEEP_TIME = 5 |
This file contains 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 os | |
context = list() | |
def run(arg): | |
context[-1].run(arg) | |
class Context: |
This file contains 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 staccato | |
import os | |
import configparser | |
import csv | |
import redis | |
import sys | |
def import_configurations(path="~/.staccato.conf"): | |
"""Import oauth1 settings via configparser.""" |
This file contains 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
class MetaData(type): | |
def __new__(mcs, name, bases, attrs): | |
for a in attrs: | |
# Ignore magic names | |
if a.startswith("_"): | |
continue | |
print(a) | |
return super().__new__(mcs, name, bases, attrs) |
This file contains 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
index { | |
print("function `index` is called") | |
} | |
main { | |
print("function `main` is called") | |
} | |
# =========> | |
# Same as: |
NewerOlder