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 | |
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" |
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
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) |
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
;;;; 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 |
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 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') |