Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:

Akshit Arora aroraakshit

:octocat:
View GitHub Profile
@VibhuJawa
VibhuJawa / xgboost_working_example.ipynb
Last active Feb 14, 2020
xgboost_working_example.ipynb
View xgboost_working_example.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lukmanr
lukmanr / inference_tfserving.py
Created Oct 17, 2018
TF Model Optimization 5
View inference_tfserving.py
def inference_tfserving(eval_data, batch=BATCH_SIZE,
repeat=1000, signature='predict'):
url = 'http://localhost:8501/v1/models/mnist_classifier:predict'
instances = [[float(i) for i in list(eval_data[img])] for img in range(batch)]
request_data = {'signature_name': signature,
'instances': instances}
time_start = datetime.utcnow()
for i in range(repeat):
@Hasil-Sharma
Hasil-Sharma / softmax.py
Last active Mar 30, 2019
Vectorized softmax calculation using numpy
View softmax.py
import numpy as np
def softmax(x):
""" Compute the softmax for each row of the input x
Arguments:
x -- A N dimensional veector or M X N dimensional numpy matrix.
Return:
x -- modified x in-place
"""
@danisfermi
danisfermi / setupdb.md
Created Dec 15, 2017
Setup gdb on Mac OS Sierra/High Sierra
View setupdb.md

Here are the steps to installing and setting up GDB on Mac OS Sierra/High Sierra. Run brew install gdb. On starting gdb, you will get the following error:

Unable to find Mach task port for process-id 2133: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))

To fix this error, follow the following steps:

@omoindrot
omoindrot / tensorflow_finetune.py
Last active Jun 17, 2022
Example TensorFlow script for fine-tuning a VGG model (uses tf.contrib.data)
View tensorflow_finetune.py
"""
Example TensorFlow script for finetuning a VGG model on your own data.
Uses tf.contrib.data module which is in release v1.2
Based on PyTorch example from Justin Johnson
(https://gist.github.com/jcjohnson/6e41e8512c17eae5da50aebef3378a4c)
Required packages: tensorflow (v1.2)
Download the weights trained on ImageNet for VGG:
```
wget http://download.tensorflow.org/models/vgg_16_2016_08_28.tar.gz
View dask-xgboost-airlines.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@karpathy
karpathy / min-char-rnn.py
Last active Jun 25, 2022
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
View min-char-rnn.py
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@developius
developius / README.md
Last active Jun 5, 2022
Setup SSH keys for use with GitHub/GitLab/BitBucket etc
View README.md

Create a new repository, or reuse an existing one.

Generate a new SSH key:

ssh-keygen -t rsa -C "your_email@example.com"

Copy the contents of the file ~/.ssh/id_rsa.pub to your SSH keys in your GitHub account settings (https://github.com/settings/keys).

Test SSH key:

@sway
sway / fontawesome.sty
Created Jul 12, 2012
FontAwesome mapping for XeLaTeX
View fontawesome.sty
% FontAwesome (http://fortawesome.github.com/Font-Awesome/) bindings for (Xe)LaTeX
% Author: Honza Ustohal <honza@egoistic.biz>
%
% Translation of FontAwesome's private range characters into XeTeX symbols. All icons are camel-cased and prefixed with 'fa', i.e. what was .icon-align-center the CSS version of FontAwesome becomes \faAlignCenter
% This might be reworked into a full blown package in the near future
%
% Prerequisite:
% XeLaTeX, FontAwesome installed as a system font accessible by XeLaTeX
%
% Usage: