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
#!/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
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
#!/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
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
--- | |
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
: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
inner_op = ['', '+', '-', '*', '//', '%', '^', '&', '|', | |
'*-', '//-', '%-', '+~', '-~', '+~-', '*~', '%~', | |
'^-', '&-', '|-', '//~', '^~', '&~', '|~', | |
'+(', '-(', '*(', '%(', '^(', '&(', '|(', ')', | |
# '+((', '-((', '*((', '//((', '%((', '^((', '&((', '|((', '))', | |
')+(', ')-(', ')*(', ')//(', ')%(', ')^(', ')&(', ')|('] | |
# leading_op = ['', '-', '~', '-(', '-((', '~(', '~((', '(', '(('] | |
leading_op = ['', '-', '~', '-(', '~(', '('] | |
# trailing_op = ['', ')', '))'] | |
trailing_op = ['', ')'] |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
{ | |
services.xserver.enable = true; | |
services.xserver.videoDrivers = [ ]; | |
services.xserver.displayManager.gdm.enable = true; | |
services.xserver.desktopManager.gnome.enable = true; | |
nixpkgs.overlays = [ | |
(final: prev: { | |
gnome = prev.gnome // rec { | |
mutter = prev.gnome.mutter.overrideAttrs (super: rec { | |
version = "0ab630277d225cd0b5a15eac44e31ee16cec6676"; # mobile-shell |
OlderNewer