Skip to content

Instantly share code, notes, and snippets.

View violetguos's full-sized avatar

Violet Guo violetguos

View GitHub Profile
@violetguos
violetguos / PDF-Pages.sh
Last active December 12, 2017 19:45
PrintQuota
#linux?
REM PDF-Pages.cmd
@echo off
del output.txt
for /r %1 %%f in (*.pdf) do pdfinfo.exe -meta "%%f" >out.txt & echo "%%f", | tr.exe -d "\r\n" >>output.txt & find "Pages:" out.txt | tr.exe -d "\r\n\055\056\072[:alpha:][:space:]" >>output.txt & echo , | tr.exe -d "\r\n" >>output.txt & find "File size:" out.txt | tr.exe -d "\055\056\072[:space:][:alpha:]" >>output.txt & echo. >>output.txt
del out.txt
#!/bin/bash
lyx --export latex master.lyx
lyx --export latex intro.lyx
lyx --export latex appendix.lyx
bibtex main
pdflatex main.tex
# diff
latexdiff --exclude-textcmd="section,subsection" master_submitted.tex master.tex > master_diff.tex
@violetguos
violetguos / NLP.md
Last active June 1, 2018 20:06
lec

lect 3 GLoVe

1/2 sum f(Pij)(ui * vj - log Pij)

  • mangnitude of ui vj: eventually capture log count
  • skip gram: capture co-ocurances one window at a time
  • glove: capture the cont of the overall statistics of how often these words appear [45:00]

lec 4 Softmax, intro NN

d/df -log softmax(f_y) = [y - t] = δ slide 25

@violetguos
violetguos / algo.tex
Created December 28, 2018 21:25
good pseudo code template in latex
\documentclass{article}
\usepackage{algorithm} % algorithm
\usepackage[noend]{algpseudocode} % algorithm
\usepackage{bm} % bold in math
\usepackage{array} % thick column hline
\makeatletter
\def\BState{\State\hskip-\ALG@thistlm}
@violetguos
violetguos / a.md
Created January 7, 2020 15:59
how to remove files from GIT LFS
  • apply the --no-blob-protection for all files tracked under .gitattibutes
  • apply --no-blob-protection fot .gitattributes itself
@violetguos
violetguos / arxiv_id_to_name.py
Created April 21, 2020 21:31 — forked from lebrice/arxiv_id_to_name.py
A simple tool to add the name of downloaded paper pdf's in front of the id. Also removes duplicate downloads of the same arxiv paper.
"""A simple tool to add the name of downloaded paper pdf's in front of the id.
(Written by [email protected])
If there are multiple downloads of same paper, replaces the original with the
latest download. This can be useful in a downloads folder filled with copies.
For instance:
"""
import glob
@violetguos
violetguos / main.rb
Created June 4, 2020 14:27
TOP's ruby project
def caesar_cipher(msg, offset)
msg_arr = []
msg.chars.each do |m_char|
if m_char.match(/[A-Z]/)
# wraps around 26 alphabets, mod 26
msg_arr.push((m_char.ord + offset - 'A'.ord) % 26 + 'A'.ord)
elsif m_char.match(/[a-z]/)
msg_arr.push((m_char.ord + offset - 'a'.ord) % 26 + 'a'.ord)
else