Skip to content

Instantly share code, notes, and snippets.

@shiyuangu
shiyuangu / trulens_internal_record
Last active April 7, 2024 22:26
trulens internal records
‎‎​
@shiyuangu
shiyuangu / lightgbm_multiclass.ipynb
Last active April 5, 2023 01:48
lightgbm_multiclass.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shiyuangu
shiyuangu / index.pug
Created July 14, 2022 02:03
React - Inbox
div.wrapper
div#inbox
div.footer.
Built with React and powered by ES6.
@shiyuangu
shiyuangu / default-company-backends.el
Created June 7, 2021 23:40 — forked from kaz-yos/default-company-backends.el
Default emacs company-mode backends
(defcustom company-backends `(;; Emacs Lisp
;; In newer versions of Emacs, company-capf is used instead.
,@(unless (version< "24.3.51" emacs-version)
(list 'company-elisp))
;; BBDB https://www.emacswiki.org/emacs/CategoryBbdb
company-bbdb
;; nxml-mode
;; In Emacs >= 26, company-capf is used instead.
,@(unless (version<= "26" emacs-version)
(list 'company-nxml))
@shiyuangu
shiyuangu / init.el
Created June 3, 2021 01:46 — forked from Lukewh/init.el
20210215 - Emacs config for typescript and CRA
(eval-and-compile
(customize-set-variable
'package-archives '(("org" . "https://orgmode.org/elpa/")
("melpa" . "https://melpa.org/packages/")
("gnu" . "https://elpa.gnu.org/packages/")))
(package-initialize)
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package)))
@shiyuangu
shiyuangu / sas_notes.md
Last active November 10, 2017 18:27
SAS Notes

exploratory analysis

find a column in a dataset

data _null_; 
dsid=open('outpath.test'); 
check=varnum(dsid,'col_name'); 
if check=0 then put 'Variable does not exist'else put 'Variable is located in column ' check +(_1) '.';
run;
@shiyuangu
shiyuangu / data_profile.py
Last active May 30, 2017 21:16
data profile
import os,sys
import pandas as pd
import numpy as np
if len(sys.argv)<2:
print "Usage: python profile.py csv_file"
os.exit(0)
fname = sys.argv[1]
df = pd.read_csv(fname)
cols = df.columns
@shiyuangu
shiyuangu / gist:7998508
Created December 17, 2013 01:43
Java syntax
Function<String, Integer> lengthFunction = new Function<String, Integer>() {
public Integer apply(String string) {
return string.length();
}
};