Skip to content

Instantly share code, notes, and snippets.

View madhavajay's full-sized avatar

Madhava Jay madhavajay

View GitHub Profile
@zlapp
zlapp / fastai-active-learning.ipynb
Created July 25, 2019 18:11
Fastai Active Learning.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/**
* Anchors
*
* SSD Anchor boxes for SSD/Mobilenet architectures
* num_layers = 6
* min_scale = 0.2
* max_scale = 0.95
* aspect_ratios = [1.0, 2.0, 0.5, 3.0, 0.3333]
*
* See: https://github.com/tensorflow/models/blob/master/research/object_detection/anchor_generators/multiple_grid_anchor_generator.py#L248
@venik
venik / build_tf.sh
Last active February 22, 2024 06:12
Bash script for local building TensorFlow on Mac/Linux with all CPU optimizations (default pip package has only SSE)
#!/usr/bin/env bash
# Author: Sasha Nikiforov
# source of inspiration
# https://stackoverflow.com/questions/41293077/how-to-compile-tensorflow-with-sse4-2-and-avx-instructions
# Detect platform
if [ "$(uname)" == "Darwin" ]; then
# MacOS
@halgari
halgari / gist:f431b2d1094e4ec1e933969969489854
Last active May 11, 2024 02:23
What I want from a Type System
The question was asked why I (as a programmer who prefers dynamic languages) don't consider static types "worth it". Here
is a short list of what I would need from a type system for it to be truely useful to me:
1) Full type inference. I would really prefer to be able to write:
(defn concat-names [person]
(assoc person :full-name (str (:first-name person)
(:second-name person))))
And have the compiler know that whatever type required and produced from this function was acceptible as long as the
@joemasilotti
joemasilotti / Testing View Controllers in Swift 3.0
Last active September 10, 2017 22:39
Testing View Controllers in Swift 3.0
.
@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active May 17, 2024 09:02
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@shreyaskarnik
shreyaskarnik / Instructions.md
Last active March 24, 2023 15:35
Route Docker Logs to ELK Stack
  • With Docker 1.8.0 shipped new log-driver for GELF via UDP, this means that the logs from Docker Container(s) can be shipped directly to the ELK stack for further analysis.
  • This tutorial will illustrate how to use the GELF log-driver with Docker engine.
  • Step 1: Setup ELK Stack:
    • docker run -d --name es elasticsearch
    • docker run -d --name logstash --link es:elasticsearch logstash -v /tmp/logstash.conf:/config-dir/logstash.conf logstash logstash -f /config-dir/logstash.conf
    • Note the config for Logstash can be found at this link
    • docker run --link es:elasticsearch -d kibana
  • Once the ELK stack is up now let's fire up our nginx container which ships its logs to ELK stack.
  • LOGSTASH_ADDRESS=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' logstash)
  • `docker run -d --net=host --log-driver=gelf --log-opt gelf-address=u
@neuro-sys
neuro-sys / fix.md
Last active April 14, 2018 19:35
How to Fix PhantomJS to work with GhostDriver

Copy paste the line below to your terminal:

https://gist.githubusercontent.com/neuro-sys/3bf00b6cf28a93e07e44/raw/e8976da93a55e5ef7c5e8dc99c00772fffb06f6c/replacestring.c
gcc replacestring.c -oreplacestring
./replacestring "$(strings /usr/bin/phantomjs | grep "platform: ghostdriver")" " " < /usr/bin/phantomjs > phantomjs && chmod a+x phantomjs
sudo cp phantomjs /usr/bin/phantomjs

Alright, there's a bug in a recent version of PhantomJS which renders it unable to run with GhostDriver. The error is like this:

@jaredsinclair
jaredsinclair / set-build-number.sh
Last active January 1, 2020 15:41
Git-friendly run script for automated build numbering in Xcode
# Set the build number to the current git commit count.
#
# Permanent home:
# https://gist.github.com/jaredsinclair/af6898f93674ee5923f3
#
# Based on: http://w3facility.info/question/how-do-i-force-xcode-to-rebuild-the-info-plist-file-in-my-project-every-time-i-build-the-project/
# Updated with dSYM handling from http://yellowfeather.co.uk/blog/auto-incrementing-build-number-in-xcode-revisited/
git=`sh /etc/profile; which git`
appBuild=`"$git" rev-list HEAD --count`