Skip to content

Instantly share code, notes, and snippets.

View wangxiaoying's full-sized avatar
🪄
Lumos!

Xiaoying Wang wangxiaoying

🪄
Lumos!
View GitHub Profile
@Lzok
Lzok / pyenv-management.md
Last active April 29, 2024 18:17
Commands to manage Python Virtual Environments with Pyenv

Install pyenv (Arch Linux) and add the paths to $PATH variable

sudo pacman -S pyenv

echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc && 
echo 'eval "$(pyenv init -)"' >> ~/.bashrc && 
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc &&
echo 'PATH=$(pyenv root)/shims:$PATH' >> ~/.bashrc
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@emrev12
emrev12 / cd_nse_ml_ref.txt
Created March 22, 2018 14:37
A collection of references for concept drift detection and machine learning in non-stationary environments.
[LFR] : Wang, H., Abraham, Z., 2015. Concept drift detection for stream- ing data. In: International Joint Conference on Neural Networks (IJCNN). IEEE, pp. 1–9.
[DDM] : Gama, J., Medas, P., Castillo, G., Rodrigues, P., 2004. Learning with drift detection. In: Advances in artificial intelligence–SBIA 2004. Springer, pp. 286–295.
[EDDM] : Baena-Garcıa, M., del Campo-A ́vila, J., Fidalgo, R., Bifet, A., Gavalda, R., Morales-Bueno, R., 2006. Early drift detection method. In: Fourth international workshop on knowledge discov- ery from data streams. Vol. 6. pp. 77–86.
[ADWIN] : Bifet, A., Gavalda, R., 2007. Learning from time-changing data with adaptive windowing. In: SDM. Vol. 7. SIAM
[Resampling] : Harel, M., Mannor, S., El-Yaniv, R., Crammer, K., 2014. Concept drift detection through resampling. In: Proceedings of the 31st Inter- national Conference on Machine Learning (ICML-14). pp. 1009– 1017.
[OLINDDA] : Spinosa, E. J., de Leon F de Carvalho, A. P., Gama, J., 2007. Olindda: A cluster-based approach for detec
@GaelVaroquaux
GaelVaroquaux / mutual_info.py
Last active June 18, 2023 12:25
Estimating entropy and mutual information with scikit-learn: visit https://github.com/mutualinfo/mutual_info
'''
Non-parametric computation of entropy and mutual-information
Adapted by G Varoquaux for code created by R Brette, itself
from several papers (see in the code).
This code is maintained at https://github.com/mutualinfo/mutual_info
Please download the latest code there, to have improvements and
bug fixes.
@justecorruptio
justecorruptio / 2048.c
Created April 4, 2014 03:49
Tiny 2048 in C!
M[16],X=16,W,k;main(){T(system("stty cbreak")
);puts(W&1?"WIN":"LOSE");}K[]={2,3,1};s(f,d,i
,j,l,P){for(i=4;i--;)for(j=k=l=0;k<4;)j<4?P=M
[w(d,i,j++)],W|=P>>11,l*P&&(f?M[w(d,i,k)]=l<<
(l==P):0,k++),l=l?P?l-P?P:0:l:P:(f?M[w(d,i,k)
]=l:0,++k,W|=2*!l,l=0);}w(d,i,j){return d?w(d
-1,j,3-i):4*i+j;}T(i){for(i=X+rand()%X;M[i%X]
*i;i--);i?M[i%X]=2<<rand()%2:0;for(W=i=0;i<4;
)s(0,i++);for(i=X,puts("\e[2J\e[H");i--;i%4||
puts(""))printf(M[i]?"%4d|":" |",M[i]);W-2
@ashrithr
ashrithr / kafka.md
Last active March 14, 2024 21:16
kafka introduction

Introduction to Kafka

Kafka acts as a kind of write-ahead log (WAL) that records messages to a persistent store (disk) and allows subscribers to read and apply these changes to their own stores in a system appropriate time-frame.

Terminology:

  • Producers send messages to brokers
  • Consumers read messages from brokers
  • Messages are sent to a topic