Skip to content

Instantly share code, notes, and snippets.

😆
What should I write here?

Philippe Rémy philipperemy

😆
What should I write here?
Block or report user

Report or block philipperemy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View get_tinder_token.py
import json
import requests
CODE_REQUEST_URL = "https://graph.accountkit.com/v1.2/start_login?access_token=AA%7C464891386855067%7Cd1891abb4b0bcdfa0580d9b839f4a522&credentials_type=phone_number&fb_app_events_enabled=1&fields=privacy_policy%2Cterms_of_service&locale=fr_FR&phone_number=#placeholder&response_type=token&sdk=ios"
CODE_VALIDATE_URL = "https://graph.accountkit.com/v1.2/confirm_login?access_token=AA%7C464891386855067%7Cd1891abb4b0bcdfa0580d9b839f4a522&confirmation_code=#confirmation_code&credentials_type=phone_number&fb_app_events_enabled=1&fields=privacy_policy%2Cterms_of_service&locale=fr_FR&login_request_code=#request_code&phone_number=#phone_number&response_type=token&sdk=ios"
TOKEN_URL = "https://api.gotinder.com/v2/auth/login/accountkit"
HEADERS = {
@philipperemy
philipperemy / r-deps.sh
Created Oct 15, 2019
R package manager (kind of) - Find and install all dependencies of your R project.
View r-deps.sh
set -e
PACKAGES="$(find . -type f -iname "*.R" -exec cat {} + | grep "^library" | sed 's/library(//g' | cut -d ')' -f 1 | sed -e 's/^"//' -e 's/"$//' | sort -u | xargs)"
for package in $PACKAGES;
do
echo "Installing package: ${package}..."
rscript -e "install.packages('${package}', repos='https://cran.rstudio.com')"
done
@philipperemy
philipperemy / extract.sh
Last active Jun 22, 2018
Mac OS - extract handshakes from CAP files of airport command
View extract.sh
# On Mac OSX
# Will run AIRODUMP scan of all BSSIDs
# sudo airport -s
# Will run AIRODUMP sniff on channel 11
# sudo airport en0 sniff 11
# Atm, I can't find how to sniff on all channels at the same time.
if [ $# -eq 0 ]
View cpu-burner.py
#!/usr/bin/env python
"""
Produces load on all available CPU cores
"""
from multiprocessing import Pool
from multiprocessing import cpu_count
def f(x):
while True:
@philipperemy
philipperemy / install.sh
Created Dec 23, 2017
Install Neural Style Transfer
View install.sh
# Ubuntu:14.04 - 64 bits
# MINIMUM IS 8GB OF RAM.
curl -sk https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash
git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch; ./install.sh
. ~/.bashrc # or: . ~/.zshrc
luarocks install nn
luarocks install nngraph
View count_stars.js
var https = require('https'),
user = process.argv[2],
opts = parseOpts(process.argv.slice(3))
request('/users/' + user, function (res) {
if (!res.public_repos) {
console.log(res.message)
return
}
var pages = Math.ceil(res.public_repos / 100),
@philipperemy
philipperemy / keras_var_length.py
Created Mar 15, 2017
Keras variable length LSTM
View keras_var_length.py
from __future__ import print_function
import numpy as np
from keras.layers import Dense
from keras.layers import LSTM
from keras.models import Sequential
from numpy.random import choice
USE_SEQUENCES = False
USE_STATELESS_MODEL = False
@philipperemy
philipperemy / pickle_view.py
Created Mar 14, 2017
Pickle viewer in command line! Put it here /usr/bin/pickle_view.py
View pickle_view.py
#!/usr/bin/env python
import pickle
import sys
if __name__ == '__main__':
argv = sys.argv
if len(argv) <= 1:
print 'Specify pickle file as parameter.'
@philipperemy
philipperemy / lstm-keras-stateful-variable-length.py
Created Jan 16, 2017
LSTM Keras Stateful for variable length inputs
View lstm-keras-stateful-variable-length.py
from __future__ import print_function
import numpy as np
from keras.layers import Dense
from keras.layers import LSTM
from keras.models import Sequential
from numpy.random import choice
USE_SEQUENCES = False
USE_STATELESS_MODEL = False
View auto-encoder-example-1.py
from __future__ import print_function
import os
import numpy as np
from keras.layers import RepeatVector
from keras.layers.core import Dropout
from keras.layers.recurrent import LSTM
from keras.models import Sequential
from keras.models import load_model
You can’t perform that action at this time.