Skip to content

Instantly share code, notes, and snippets.

View lokeshsoni's full-sized avatar
🏠
Working from home

Lokesh Soni lokeshsoni

🏠
Working from home
View GitHub Profile
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active May 1, 2024 03:45
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@neggert
neggert / inception_v3.py
Created April 6, 2016 17:35
Inception-v3 implementation in Keras
from keras.models import Model
from keras.layers import (
Input,
Dense,
Flatten,
merge,
Lambda
)
from keras.layers.convolutional import (
Convolution2D,
@dirko
dirko / keras_bidirectional_tagger.py
Created August 11, 2016 05:32
Keras bidirectional LSTM NER tagger
# Keras==1.0.6
from keras.models import Sequential
import numpy as np
from keras.layers.recurrent import LSTM
from keras.layers.core import TimeDistributedDense, Activation
from keras.preprocessing.sequence import pad_sequences
from keras.layers.embeddings import Embedding
from sklearn.cross_validation import train_test_split
from keras.layers import Merge
from keras.backend import tf
@Bhavdip
Bhavdip / sketch-never-ending.md
Created October 6, 2016 15:53
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

@heiswayi
heiswayi / repo-reset.md
Created February 5, 2017 01:32
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
"""Downsized version of Xception, without residual connections.
"""
from __future__ import print_function
from __future__ import absolute_import
from keras.models import Model
from keras.layers import Dense
from keras.layers import Input
from keras.layers import BatchNormalization
from keras.layers import Activation
1) Read an image from file
2) Display an image that you read from file
3) Capture Video using your webcam and display the feed
4) Display back and white live stream from your webcam.
5) Have a slider to change brightness of the webcam live stream. Display.
6) Have a slider to change contrast of the webcam live stream. Display.
7) Capture a snapshot from your webcam. Then display difference between live video stream and this snapshot. (Background subtraction)
8) Display Canny edge image from your live webcam stream
9) Have a slider to change smoothness / sharpness of image from live webcam stream.
10) Display histogram of colors (RGB) from your live webcam stream
#
sudo su -
cd /usr/local/bin
mkdir ffmpeg
cd ffmpeg
wget https://www.johnvansickle.com/ffmpeg/old-releases/ffmpeg-4.2.1-amd64-static.tar.xz
tar xvf ffmpeg-4.2.1-amd64-static.tar.xz
@soumith
soumith / gist:01da3874bf014d8a8c53406c2b95d56b
Last active March 28, 2022 16:53
Install PillowSIMD+libjpeg-turbo on Conda
conda uninstall --force pillow -y
# install libjpeg-turbo to $HOME/turbojpeg
git clone https://github.com/libjpeg-turbo/libjpeg-turbo
pushd libjpeg-turbo
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=$HOME/turbojpeg
make
make install
@apolopena
apolopena / bash-set-and-unset-env-from-file.sh
Last active March 25, 2023 11:14
Set and unset environment variables from an .env file
# set environment vars from an .env file
export $(grep -v '^#' .myenvfile | xargs)
# unset environment vars from an .env file
unset $(grep -v '^#' .myenvfile | awk 'BEGIN { FS = "=" } ; { print $1 }')