Skip to content

Instantly share code, notes, and snippets.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 20, 2024 15:48
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@giuseppebonaccorso
giuseppebonaccorso / twitter_sentiment_analysis_convnet.py
Last active March 16, 2020 19:26
Twitter Sentiment Analysis with Gensim Word2Vec and Keras Convolutional Networks
import keras.backend as K
import multiprocessing
import tensorflow as tf
from gensim.models.word2vec import Word2Vec
from keras.callbacks import EarlyStopping
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Flatten
from keras.layers.convolutional import Conv1D
@daveselinger
daveselinger / ubuntu_16_amd_rocm_theano
Last active March 7, 2019 11:50
Ubuntu 16.04 with proprietary AMD driver for OpenCL on Theano.
## Shout out to jarutis here https://gist.github.com/jarutis/ff28bca8cfb9ce0c8b1a
## install Catalyst proprietary
## sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.BAK
sudo apt update
sudo apt dist-upgrade
# on a clean install not needed but could be helpful
sudo apt-get remove --purge fglrx*
@qqpann
qqpann / get_tweet_replies.py
Last active December 7, 2020 15:45
[Get Tweet Replies] Get Tweet Replies with Twitter API #twitter #python #tweepy
# Author: Qiushi Pan (@qqhann)
# This is a code snippet with sample usage, to get replies to a specific tweet.
# =====
import tweepy
import time
import os
from collections import defaultdict
from dotenv import load_dotenv, find_dotenv
env = load_dotenv(find_dotenv(), override=True)

PyTorch C++ API Ubuntu Installation Guide

The best way to get a clean installation of PyTorch, is to install the pre-compiled binaries from the Anaconda distribution. Therefore, we need to setup Anaconda first.

Step 1: Install Anaconda

  • Go to the download section and download your desired Anaconda version for Linux

  • Run the downloaded shell script and follow the install instruction, do
@hsm207
hsm207 / einsum_with_pytorch.ipynb
Last active May 11, 2022 13:57
Code to accompany my blog post at https://bit.ly/2PmRjiC
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thirdratecyberpunk
thirdratecyberpunk / mal_to_letterboxd.py
Created September 27, 2021 23:20
MyAnimeList export file to Letterboxd format
"""
Takes in a given MAL export file and generates a list of movies
in .csv format supported by LetterBoxd
"""
import xmltodict
import json
import pandas as pd
allowed_types = ["Movie", "OVA"]