Skip to content

Instantly share code, notes, and snippets.

View DNXie's full-sized avatar
👩‍💻
Coasting

Danning XIE DNXie

👩‍💻
Coasting
View GitHub Profile
@chuanconggao
chuanconggao / prefixspan.py
Last active January 22, 2024 06:00
The original minimal 15 lines implementation of PrefixSpan. Full library at https://github.com/chuanconggao/PrefixSpan-py.
from collections import defaultdict
def frequent_rec(patt, mdb):
results.append((len(mdb), patt))
occurs = defaultdict(list)
for (i, startpos) in mdb:
seq = db[i]
for j in range(startpos + 1, len(seq)):
l = occurs[seq[j]]
@saurabhshri
saurabhshri / pip.md
Last active September 24, 2023 11:07
Install and use pip in a local directory without root/sudo access.

Install and use pip in a local directory without root/sudo access.

Why?

Many users when are given server access, do not have root (or sudo) privileges and can not simply do sudo apt-get install python-pip . Here's an easy way you can install and use pip without root (or sudo) access in a local directory. Note : This works without easy_install too.

How?

@tsabat
tsabat / zsh.md
Last active December 25, 2023 19:16
Getting oh-my-zsh to work in Ubuntu