Skip to content

Instantly share code, notes, and snippets.

@felipemoraes
felipemoraes / 0.useful.md
Last active March 10, 2024 19:55
Machine Learning Interview Questions

PyTorch to MXNet

This cheatsheet serves as a quick reference for PyTorch users who are interested in trying MXNet, and vice versa.

Pytorch is a deep learning framework provides imperative tensor manipulation and neural network training. MXNet provides similar imperative tensor manipulation through the ndarray package and neural network training through gluon. This cheatsheet maps functions one-by-one between these two frameworks.

Note that MXNet has a symbolic interface similar to Keras and Tensorflow that may provide better performance and portability. This cheatsheet mainly focus on MXNet's imperative interface.

Installation

@nebil
nebil / README.md
Last active January 21, 2020 14:05
🚀 Algunos lenguajes del nuevo milenio 🚀

Lenguajes del tercer milenio

Aquí dejaré una tabla con lenguajes de programación que aparecieron después del año 2001.
Durante los últimos años, todos ellos han alcanzado un grado significativo de notoriedad.
Podría ser interesante analizar qué novedades ofrecen con respecto a sus antecesores.

Nombre Año de aparición GitHub :octocat: Sitio web oficial
[Ceylon] 2011 [@eclipse/ceylon] https://ceylon-lang.org
# coding: utf-8
import logging
import re
from collections import Counter
import numpy as np
import torch
from sklearn.datasets import fetch_20newsgroups
from torch.autograd import Variable
@thomas-a-neil
thomas-a-neil / test_s3_download.py
Created August 22, 2016 20:59
Sample DAG to download from S3, sleep, and reupload
from airflow import DAG
from airflow.operators.bash_operator import BashOperator
from airflow.operators.python_operator import PythonOperator
from datetime import datetime, timedelta
# default arguments for each task
default_args = {
'owner': 'nthomas',
@jseabold
jseabold / tufte.py
Last active February 19, 2019 12:44
Recreation of Tufte graphic in Python based on an Rstats blog post and gist http://asbcllc.com/blog/2015/January/gotham_2014_weather/ https://gist.github.com/abresler/46c36c1a88c849b94b07
import os
import calendar
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.ticker import FixedLocator, FixedFormatter
import pandas as pd
import seaborn as sns
to_colors = lambda x : x/255.
@staltz
staltz / introrx.md
Last active May 18, 2024 05:17
The introduction to Reactive Programming you've been missing
@dashed
dashed / github-pandoc.css
Created September 26, 2013 13:42
GitHub-like CSS for pandoc standalone HTML files (perfect for HTML5 output). Based on Marked.app's GitHub CSS. Added normalize.css (v2.1.3) in the prior to GitHub css.
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/
@killercup
killercup / pandoc.css
Created July 3, 2013 11:31
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
@cosimo
cosimo / parse-options.sh
Created September 21, 2012 09:31
Example of how to parse options with bash/getopt
#!/bin/bash
#
# Example of how to parse short/long options with 'getopt'
#
OPTS=`getopt -o vhns: --long verbose,dry-run,help,stack-size: -n 'parse-options' -- "$@"`
if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi
echo "$OPTS"