I hereby claim:
- I am tommyip on github.
- I am thomasip (https://keybase.io/thomasip) on keybase.
- I have a public key ASBZzsI9Q7hdaY-EEmOmEDOkeXulP23Zdmz0RdFz4sOT4wo
To claim this, I am signing this object:
import time | |
from functools import wraps | |
from math import ceil | |
from typing import Callable | |
import lightgbm as lgb | |
import numpy as np | |
import polars as pl | |
from tqdm.notebook import tqdm |
# Pass in stash message as the first argument | |
function git-stash-unstaged --description "Only stash unstaged changes" | |
git commit -m "git-stash-unstaged" | |
git stash push -u -m $argv[1] | |
git reset --soft HEAD^ | |
end |
I hereby claim:
To claim this, I am signing this object:
# Based on https://gist.github.com/bastibe/c0950e463ffdfdfada7adf149ae77c6f | |
# Changes: | |
# * Instead of overriding cd, we detect directory change. This allows the script to work | |
# for other means of cd, such as z. | |
# * Update syntax to work with new versions of fish. | |
# * Handle virtualenvs that are not located in the root of a git directory. | |
function __auto_source_venv --on-variable PWD --description "Activate/Deactivate virtualenv on directory change" | |
status --is-command-substitution; and return |
#content { | |
margin-left: 0; | |
} | |
#mw-panel { | |
display: none; | |
} | |
#bodyContent { | |
font-size: 18px; |
⍝ Credit: @jayfoad (https://github.com/jayfoad/aoc2020apl/blob/main/p13.dyalog) | |
⎕IO←0 | |
a←⍎⊃p←⊃⎕NGET'p13.txt'1 | |
d←⍎¨b⌷⍨⊂c←⍸(,'x')∘≢¨b←'\w+'⎕S'&'⊃⌽p | |
{(⊃⍋⍵)⊃d×⍵}d|-a ⍝ part 1 | |
⎕PP←17 ⋄ ⎕FR←1287 | |
gcd←{⍵=0:⍺ 1 0 ⋄ g s t←⍵∇⍵|⍺ ⋄ g t(s-t×⌊⍺÷⍵)} | |
crt←{z←⍵÷⍨m←×/⍵ ⋄ m|+/⍺×z×1⊃¨z gcd¨⍵} | |
(-c)crt d ⍝ part 2 |
#!/usr/bin/env ruby | |
# Usage | |
# ~~~~~ | |
# | |
# Run from the root of ETS | |
# | |
# $ chmod +x migrate_address | |
# $ ./migrate_address.rb <address csv file> |
This summer I worked on improving the developer-friendliness of the frontend toolchain as well as fixing other miscellaneous issues. It has been a rewarding experience to work with Zulip and learn from this awesome community. Huge thanks to @tabbott and @andersk for their help and reviews on my work.
Below is a list of work I did during the summer:
#!/usr/bin/env python3 | |
""" | |
1. Convert CommonJS to typescript module | |
1.1 Remove IIFE wrapping | |
1.2 Use ES6 style import | |
1.3 Use ES6 style export | |
1.4 Import from other modules | |
1.5 Remove from .eslintrc | |
1.6 Remove from js_typings | |
1.7 Remove from app.js bundle |
#include <iostream> | |
#include <iostream> | |
#include <cstdlib> // for srand() and rand() | |
#include <ctime> // for time() | |
using namespace std; | |
void fillCubeRandomly(int cube[][3][3]) { | |
srand(time(nullptr)); | |
for (int x = 0; x < 3; ++x) { | |
for (int y = 0; y < 3; ++y) { |