Skip to content

Instantly share code, notes, and snippets.


Akshit Arora aroraakshit

View GitHub Profile
VibhuJawa / xgboost_working_example.ipynb
Last active Feb 14, 2020
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 /
Created Oct 17, 2018
TF Model Optimization 5
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 /
Last active Mar 30, 2019
Vectorized softmax calculation using numpy
import numpy as np
def softmax(x):
""" Compute the softmax for each row of the input x
x -- A N dimensional veector or M X N dimensional numpy matrix.
x -- modified x in-place
danisfermi /
Created Dec 15, 2017
Setup gdb on Mac OS Sierra/High Sierra

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 /
Last active Jun 17, 2022
Example TensorFlow script for fine-tuning a VGG model (uses
Example TensorFlow script for finetuning a VGG model on your own data.
Uses module which is in release v1.2
Based on PyTorch example from Justin Johnson
Required packages: tensorflow (v1.2)
Download the weights trained on ImageNet for VGG:
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 /
Last active Jun 25, 2022
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
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 /
Last active Jun 5, 2022
Setup SSH keys for use with GitHub/GitLab/BitBucket etc

Create a new repository, or reuse an existing one.

Generate a new SSH key:

ssh-keygen -t rsa -C ""

Copy the contents of the file ~/.ssh/ to your SSH keys in your GitHub account settings (

Test SSH key:

sway / fontawesome.sty
Created Jul 12, 2012
FontAwesome mapping for XeLaTeX
View fontawesome.sty
% FontAwesome ( bindings for (Xe)LaTeX
% Author: Honza Ustohal <>
% 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: