Skip to content

Instantly share code, notes, and snippets.

View thoo's full-sized avatar

Thein Oo thoo

  • University of Pittsburgh Medical Center
  • Pittsburgh, PA
View GitHub Profile
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 10, 2024 10:36
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@rahulkumar-aws
rahulkumar-aws / minikube.md
Last active March 22, 2024 14:57
Install/Uninstall Minikube from Mac
minikube stop; minikube delete
docker stop $(docker ps -aq)
rm -r ~/.kube ~/.minikube
sudo rm /usr/local/bin/localkube /usr/local/bin/minikube
systemctl stop '*kubelet*.mount'
sudo rm -rf /etc/kubernetes/
docker system prune -af --volumes
" Vim integration with IPython 0.11+
"
" A two-way integration between Vim and IPython.
"
" Using this plugin, you can send lines or whole files for IPython to execute,
" and also get back object introspection and word completions in Vim, like
" what you get with: object?<enter> object.<tab> in IPython
"
" -----------------
" Quickstart Guide:
#!/bin/bash
gfortran -o $2 -fno-underscoring $1 libhgraph.a libg2c.so -L/usr/X11R6/lib64 -lX11
@samuelcolvin
samuelcolvin / compile_fortran.sh
Last active August 25, 2021 15:46
Vortex Performance comparison if Julia (Julia-lang), Fortran and Python
#!/bin/bash
gfortran -o $2 -fno-underscoring $1 libhgraph.a libg2c.so -L/usr/X11R6/lib64 -lX11
@gizmaa
gizmaa / Plot_Examples.md
Last active May 8, 2024 13:38
Various Julia plotting examples using PyPlot
@jasonrudolph
jasonrudolph / 00-about-search-api-examples.md
Last active April 30, 2024 19:21
5 entertaining things you can find with the GitHub Search API
@ldx
ldx / dropbox_api_key_decode.py
Created February 21, 2013 15:36
This one decodes a Dropbox encoded API key obtained here: https://dl-web.dropbox.com/spa/pjlfdak1tmznswp/api_keys.js/public/index.html It was written after studying dropbox-js/src/prod.coffee.
from base64 import b64encode, b64decode
def decode_key(key):
key, secret = key.split('|')
key = b64decode(key)
key = [ord(x) for x in key]
secret = b64decode(secret)
s = range(256)
@sixtenbe
sixtenbe / analytic_wfm.py
Last active May 1, 2024 02:29 — forked from endolith/peakdet.m
Peak detection in Python
#!/usr/bin/python2
# Copyright (C) 2016 Sixten Bergman
# License WTFPL
#
# This program is free software. It comes without any warranty, to the extent
# permitted by applicable law.
# You can redistribute it and/or modify it under the terms of the Do What The
# Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See
@endolith
endolith / peakdet.m
Last active February 14, 2024 21:27
Peak detection in Python [Eli Billauer]
function [maxtab, mintab]=peakdet(v, delta, x)
%PEAKDET Detect peaks in a vector
% [MAXTAB, MINTAB] = PEAKDET(V, DELTA) finds the local
% maxima and minima ("peaks") in the vector V.
% MAXTAB and MINTAB consists of two columns. Column 1
% contains indices in V, and column 2 the found values.
%
% With [MAXTAB, MINTAB] = PEAKDET(V, DELTA, X) the indices
% in MAXTAB and MINTAB are replaced with the corresponding
% X-values.