Skip to content

Instantly share code, notes, and snippets.

View ki-chi's full-sized avatar

Kiichi ki-chi

  • Tokyo, Japan
  • 20:04 (UTC +09:00)
View GitHub Profile
@naokton
naokton / build-emacs-aarch64.sh
Last active October 2, 2021 02:02
Build Emacs 27.1 (--with-ns / GUI) on Apple Silicon Mac (aarc64) with Homebrew
#!/bin/bash
if [ ! -f /opt/homebrew/bin/brew ]; then
echo "Install ARM homebrew to /opt/homebrew"
exit
fi
message() {
TIME=$(date "+%Y-%m-%dT%H:%M:%S")
MSG=$@
echo "$TIME | $MSG"
library(dplyr)
library(slider)
library(lubridate)
library(tsibbledata)
# Google, Apple, Facebook, Amazon stock
gafa_stock <- as_tibble(gafa_stock)
gafa_stock <- select(gafa_stock, Symbol, Date, Close, Volume)
head(gafa_stock, 2)
@mecab
mecab / osc52e.el
Last active December 20, 2023 14:10 — forked from AlexCharlton/osc52e.el
Copy text from emacs into xterm, hterm, trough screen and tmux, with support for graphical displays and multi-byte characters
;;;; This script can be loaded during emacs initialization to automatically
;;;; send `kill-region' and `kill-ring-save' regions to your system clipboard.
;;;; The OSC 52 terminal escape sequence is used to transfer the selection from
;;;; emacs to the host terminal.
;;;; It is based off of the osc52.el copyright the Chromium OS authors, but
;;;; was modified to add support for tmux, graphical displays, and
;;;; multi-byte strings.
;;;; It works in hterm, xterm, and other terminal emulators which support the
@yong27
yong27 / apply_df_by_multiprocessing.py
Last active April 12, 2023 04:35
pandas DataFrame apply multiprocessing
import multiprocessing
import pandas as pd
import numpy as np
def _apply_df(args):
df, func, kwargs = args
return df.apply(func, **kwargs)
def apply_by_multiprocessing(df, func, **kwargs):
workers = kwargs.pop('workers')