Skip to content

Instantly share code, notes, and snippets.

View hsanchez's full-sized avatar
I may be slow to respond.

Huascar Sanchez hsanchez

I may be slow to respond.
View GitHub Profile
@hsanchez
hsanchez / Zenburn.itermcolors
Created March 28, 2024 18:49 — forked from fooforge/Zenburn.itermcolors
iterm2 - Zenburn theme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.30196079611778259</real>
<key>Green Component</key>
<real>0.30196079611778259</real>
@hsanchez
hsanchez / license-badges.md
Created March 14, 2023 15:52 — forked from lukas-h/license-badges.md
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hsanchez
hsanchez / all_but_the_top.py
Created February 22, 2022 23:46 — forked from lgalke/all_but_the_top.py
Word Embedding Postprocessing: All but the top
"""
All-but-the-Top: Simple and Effective Postprocessing for Word Representations
Paper: https://arxiv.org/abs/1702.01417
Last Updated: Fri 15 Nov 2019 11:47:00 AM CET
**Prior version had serious issues, please excuse any inconveniences.**
"""
import numpy as np
from sklearn.decomposition import PCA
@hsanchez
hsanchez / Download Google Drive files with WGET
Created September 16, 2021 16:31 — forked from iamtekeste/Download Google Drive files with WGET
Download Google Drive files with WGET
Download Google Drive files with WGET
Example Google Drive download link:
https://docs.google.com/open?id=[ID]
To download the file with WGET you need to use this link:
https://googledrive.com/host/[ID]
Example WGET command:
@hsanchez
hsanchez / WritingPseudocode.md
Created July 28, 2021 22:38 — forked from camilstaps/WritingPseudocode.md
How to write good pseudocode

How to write good Pseudocode

This is an unfinished list of remarks on how to write good pseudocode.

What is pseudocode?

Pseudocode is a loosely defined way of transmitting the concept of an algorithm from a writer to a reader. Central is the efficiency of this communication, not the interpretability of the code by an automated program (e.g., a parser).

@hsanchez
hsanchez / cycles.py
Created July 18, 2021 07:58 — forked from joe-jordan/cycles.py
Function to find all the cycles in a networkx graph. Health warning: this thing is an NP-complete depth-first search, work hard to make the graphs you put into it small.
def find_all_cycles(G, source=None, cycle_length_limit=None):
"""forked from networkx dfs_edges function. Assumes nodes are integers, or at least
types which work with min() and > ."""
if source is None:
# produce edges for all components
nodes=[i[0] for i in nx.connected_components(G)]
else:
# produce edges for components with source
nodes=[source]
# extra variables for cycle detection:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hsanchez
hsanchez / doom.txt
Created December 1, 2020 04:42 — forked from hjertnes/doom.txt
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch
@hsanchez
hsanchez / Bias and Variance.ipynb
Created July 6, 2020 14:40 — forked from fabgoos/Bias and Variance.ipynb
An IPython notebook about bias variance tradeoff in machine learning.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.