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
'use strict' | |
function fact(n) { | |
if (n > 1) return n * fact(n - 1) | |
else return 1 | |
} | |
function combination(n, m) { | |
/* C(n, m) = n * (n-1) * ... * (n-m+1) / m! */ | |
if (!(n >= m)) console.error(new Error("m must be smaller than n")) |
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 matplotlib.pyplot as plt | |
import numpy as np | |
from mpl_toolkits.mplot3d import Axes3D | |
SIZE = 10 # How big you'd like to draw | |
fig = plt.figure() | |
# OR USING `ax = fig.add_subplot(1, 1, 1, projection='3d')` | |
ax = Axes3D(fig) |
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
#!/usr/bin/python | |
from __future__ import print_function | |
print() | |
for i in range(0, 10): | |
print(i, end=' ') | |
print('\033[{}m'.format(i), end='') | |
print('AaBbCcDdEeFfGg', end='') | |
print('\033[0m') | |
print() |
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
#!/bin/bash | |
# all files (include dirs) under a dir | |
_allunder() { | |
local f; for f in $1/* $1/.*; do | |
case $f in | |
"$1/*" | "$1/.*" | "$1/." | "$1/..") ;; | |
*) printf "$f " ;; | |
esac | |
done |
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
# Should work on all Debian based distros with systemd; tested on Ubuntu 16.04+. | |
# This will by default install all plugins; you can customize this behavior on line 6. Selecting too many plugins can cause issues when downloading. | |
# Run as root (or sudo before every line) please. Note this is not designed to be run automatically; I recommend executing this line by line. | |
apt install curl | |
curl https://getcaddy.com | bash -s personal dns,docker,dyndns,hook.service,http.authz,http.awses,http.awslambda,http.cache,http.cgi,http.cors,http.datadog,http.expires,http.filemanager,http.filter,http.forwardproxy,http.geoip,http.git,http.gopkg,http.grpc,http.hugo,http.ipfilter,http.jekyll,http.jwt,http.locale,http.login,http.mailout,http.minify,http.nobots,http.prometheus,http.proxyprotocol,http.ratelimit,http.realip,http.reauth,http.restic,http.upload,http.webdav,net,tls.dns.auroradns,tls.dns.azure,tls.dns.cloudflare,tls.dns.cloudxns,tls.dns.digitalocean,tls.dns.dnsimple,tls.dns.dnsmadeeasy,tls.dns.dnspod,tls.dns.dyn,tls. |
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
MCU = atmega32 | |
F_CPU = 16000000 | |
PROGRAMMER = -c usbasp | |
AVRDUDE = avrdude $(PROGRAMMER) -p $(MCU) | |
CC = avr-gcc -Wall -Os -DF_CPU=$(F_CPU) -mmcu=$(MCU) | |
.PHONY: hex flash clean |
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
:root { | |
--background-1: #31363b; | |
--background-2: #232629; | |
--foreground-color: #eff0f1; | |
--border-color: #616569; | |
--highlight-color: #3daee9; | |
--highlight-contrast: #3daee9; | |
--sn-stylekit-info-color: #3daee9; | |
--sn-stylekit-info-contrast-color: #cccccc; | |
--sn-stylekit-neutral-color: #3daee9; |
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
--- | |
name: gemoji | |
version: "2020.4.28" | |
sort: by_weight | |
use_preset_vocabulary: true | |
... | |
😀 ugrinning | |
😃 usmiley |
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
inner_op = ['', '+', '-', '*', '//', '%', '^', '&', '|', | |
'*-', '//-', '%-', '+~', '-~', '+~-', '*~', '%~', | |
'^-', '&-', '|-', '//~', '^~', '&~', '|~', | |
'+(', '-(', '*(', '%(', '^(', '&(', '|(', ')', | |
# '+((', '-((', '*((', '//((', '%((', '^((', '&((', '|((', '))', | |
')+(', ')-(', ')*(', ')//(', ')%(', ')^(', ')&(', ')|('] | |
# leading_op = ['', '-', '~', '-(', '-((', '~(', '~((', '(', '(('] | |
leading_op = ['', '-', '~', '-(', '~(', '('] | |
# trailing_op = ['', ')', '))'] | |
trailing_op = ['', ')'] |
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
requests==2.28.1 | |
pycryptodome==3.15.0 |
OlderNewer