Skip to content

Instantly share code, notes, and snippets.

View michalliu's full-sized avatar

LYF michalliu

View GitHub Profile
@jlia0
jlia0 / agent loop
Last active June 4, 2025 20:15
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
@protrolium
protrolium / jupyter-not-finding-packages.md
Last active July 13, 2023 22:10
Troubleshooting why Jupyter notebook wasn't finding installed python packages

Tried creating and installing needed packages into a virtual python environment, but Jupyter notebook would still throw Module not found errors, even after pip, pip3 on base installation, as well as pip, pip3 install method into the virtual environment.

conda create -n my-conda-env         # creates new virtual env
source activate my-conda-env         # activate environment in terminal
conda install jupyter                # install jupyter + notebook
jupyter notebook                     # start server + kernel

To solve, in jupyter notebook, run:

@agnjunio
agnjunio / .block
Last active December 5, 2024 18:01
Dependency Graph using D3 + Vue.js (3/3)
license: apache-2.0
height: 600
border: no
@adambene
adambene / coroutines-and-generators.js
Last active August 5, 2024 23:45
Coroutines and generators in JavaScript
function* delays() {
let a = yield delay(800, "Hello, I'm an");
console.log(a);
let b = yield delay(400, "async coroutine!");
console.log(b);
}
const coroutine = nextValue => iterator => {
const { done, value } = iterator.next(nextValue);
@satyajitvg
satyajitvg / char-rnn.py
Created January 27, 2018 03:09
rnn based on karpathy's blg
"""
simple character rnn from Karpathy's blog
"""
import numpy as np
def random_init(num_rows, num_cols):
return np.random.rand(num_rows, num_cols)*0.01
def zero_init(num_rows, num_cols):
@jclosure
jclosure / install_dia_osx.md
Created August 6, 2017 00:20
How to install Dia on OSX (and have it run)
brew cask install dia

After his it won't run because DISPLAY=:0 env var is not set

vim /Applications/Dia.app/Contents/Resources/bin/dia
@Joris-van-der-Wel
Joris-van-der-Wel / build.sh
Last active March 3, 2023 14:47
GNU Solfege on OS X
# Download and extract from https://www.gnu.org/software/solfege/ for example "solfege-3.22.2.tar.gz"
brew install librsvg texinfo pygtk timidity
export PATH=`brew --prefix`/opt/gettext/bin:$PATH
export PKG_CONFIG_PATH=`brew --prefix`/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH
./configure
make
@Alpha59
Alpha59 / creditwherecreditisdue.sh
Last active February 3, 2023 07:56
A very very slow one-liner that goes through a git blame and sees how many lines were contributed by each author.
git ls-files -z | xargs -0n1 git blame -wfn | grep -v "test" | grep "\.(js|html)[^o]\s" | perl -n -e '/\((.*)\s[\d]{4}\-/ && print $1."\n"' | awk '{print $1" "$2" "$3}' | sort -f | uniq -c | sort -nr
# Lists the number of lines that an author has contributed to the code base.
# This also filters for !test and ==.js or .html (which was useful for this particular run)
# A Django version of the same thing:
git ls-files -z | xargs -0n1 git blame -wfn | grep -v "test" | grep -v "fixture" | grep -v "json" | grep -v "gpg" | grep -v ".md" | grep -v "initial_schema" | grep -v "fonts" | grep -v "min." | grep -v "migrations" | grep -v "images" | grep -v "/bootstrap" | grep -v "debug" | grep -v "/img" | grep -v "vendor" | perl -n -e '/\((.*)\s[\d]{4}\-/ && print $1."\n"' | awk '{print $1" "$2" "$3}' | sort -f | uniq -c | sort -nr
@welbornprod
welbornprod / Embedded Python in BASH
Created August 14, 2014 23:22
A little trick to embed python code in a BASH script.
#!/bin/bash
# Here are some embedded Python examples using Python3.
# They are put into functions for separation and clarity.
# Simple usage, only using python to print the date.
# This is not really a good example, because the `date`
# command works just as well.
function date_time {
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a