Skip to content

Instantly share code, notes, and snippets.

View BaksiLi's full-sized avatar
✍️
Wired-in ∨ Studying

Baksi BaksiLi

✍️
Wired-in ∨ Studying
View GitHub Profile
@BaksiLi
BaksiLi / WordsOfLen3.txt
Last active November 16, 2021 04:22
Number of words of length-3 in English (by Mathematica)
IN: DictionaryLookup[Repeated[_, {3}]]
OUT: {"aah", "ABC", "Abe", "abs", "ABS", "ace", "act", "Ada", "add", \
"ado", "ads", "adz", "aft", "age", "ago", "aha", "aid", "ail", "aim", \
"air", "aka", "alb", "ale", "Ali", "all", "alp", "amp", "Amy", "Ana", \
"and", "Ann", "ans", "ant", "any", "AOL", "ape", "apt", "arc", "are", \
"ark", "arm", "art", "Art", "ash", "ask", "asp", "ass", "ate", "ATP", \
"auk", "Ava", "Ave", "awe", "awl", "awn", "axe", "aye", "AZT", "baa", \
"bad", "bag", "bah", "ban", "bap", "bar", "Bar", "bat", "bay", "BBC", \
"bed", "bee", "beg", "Ben", "bet", "bey", "bib", "Bic", "bid", "big", \
@BaksiLi
BaksiLi / analysis.py
Last active June 6, 2019 09:30
Plot Activity Log from OctoMouse data
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import os
import shutil
import matplotlib.pyplot as plt
import pandas as pd
from matplotlib.offsetbox import AnchoredText
@BaksiLi
BaksiLi / eodict.py
Last active June 16, 2019 11:18
Esperanto-English-Japanese-Etymology Dictionary
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# version: 0.1
import requests
from bs4 import BeautifulSoup
import pandas as pd
def download_from_web(url: str) -> str:
'''
@BaksiLi
BaksiLi / minerExploiter.sh
Created November 8, 2019 17:40
Mine for an hour with interval to avoid Server CPU limitation alert
#!/bin/bash
time_run=2940 # 49 mins in secs
time_rest=60
func="minergate-cli --user <your.email@server.suffix> --<target-currency>"
#Loop and record
while true; do
start_time=`date +%Y/%m/%d\ %H:%m:%s`
timeout $time_run $func
@BaksiLi
BaksiLi / cda.zsh
Created January 2, 2020 15:34
Shell function cd for macOS alias
# Function for macOS alias
cda () {
thePath=`osascript <<EOD
set toPath to ""
tell application "Finder"
set toPath to (POSIX file "$1") as alias
set theKind to kind of toPath
if theKind is "Alias" then
set toPath to ((original item of toPath) as alias)
end if
@BaksiLi
BaksiLi / keymap.json
Last active April 22, 2022 03:39
Vim-style Joplin Keymap
[
{ "keys": [":"], "type": "function", "command": "enter_command_line_mode" },
{ "keys": ["TAB","l"], "type": "function", "command": "focus_next" },
{ "keys": ["SHIFT_TAB","h"], "type": "function", "command": "focus_previous" },
{ "keys": ["UP","k"], "type": "function", "command": "move_up" },
{ "keys": ["DOWN","j"], "type": "function", "command": "move_down" },
{ "keys": ["PAGE_UP","{"], "type": "function", "command": "page_up" },
{ "keys": ["PAGE_DOWN","}"], "type": "function", "command": "page_down" },
{ "keys": ["ENTER"], "type": "function", "command": "activate" },
{ "keys": ["DELETE", "BACKSPACE"], "type": "function", "command": "delete" },
@BaksiLi
BaksiLi / analyse.py
Created May 18, 2020 00:22
Visualize WakaTime statistics data in a decent way
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser
from time import localtime
import plotly.graph_objects as go
def read_from(fpath):
### Keybase proof
I hereby claim:
* I am baksili on github.
* I am baksili (https://keybase.io/baksili) on keybase.
* I have a public key ASBzhPwXC8Y5FhkW0IvqobXELg2eQEMdMxp2x8XqHmE5qAo
To claim this, I am signing this object:
@BaksiLi
BaksiLi / calfunc.py
Last active May 27, 2020 22:21
Calculating with functions by Functional Programming with Python @ Codewars
# Calculating with Functions
# https://www.codewars.com/kata/525f3eda17c7cd9f9e000b39
import operator as op
op_curried = lambda f: lambda y: lambda x: f(x, y)
plus = op_curried(op.add)
minus = op_curried(op.sub)
times = op_curried(op.mul)
divided_by = op_curried(op.floordiv)
@BaksiLi
BaksiLi / preamble.txt
Created June 3, 2020 13:41
Communist Manifesto Preamble
Preamble
A spectre is haunting Europe—the spectre of Communism.
All the Powers of old Europe have entered into a holy alliance to exorcise this spectre: Pope and Czar, Metternich and Guizot, French Radicals and German police-spies.
--------
Where is the party in opposition that has not been decried as Communistic by its opponents in power? Where is the Opposition that has not hurled back the branding reproach of Communism, against the more advanced opposition parties, as well as against its reactionary adversaries?
--------
Two things result from this fact.
1. Communism is already acknowledged by all European Powers to be itself a Power.
2. It is high time that Communists should openly, in the face of the whole world, publish their views, their aims, their tendencies, and meet this nursery tale of
--------