Skip to content

Instantly share code, notes, and snippets.

Avatar

Pratik Khadloya tispratik

View GitHub Profile
@david-macleod
david-macleod / tf-anchor-box-visualize.py
Last active Aug 19, 2020
TensorFlow Object Detection Anchor Box Visualizer
View tf-anchor-box-visualize.py
import tensorflow as tf
from object_detection.anchor_generators.multiple_grid_anchor_generator import create_ssd_anchors
from object_detection.models.ssd_mobilenet_v2_feature_extractor_test import SsdMobilenetV2FeatureExtractorTest
import matplotlib.pyplot as plt
from matplotlib import patches
import numpy as np
def get_feature_map_shapes(image_height, image_width):
"""
@Prasad9
Prasad9 / annotation.xml
Created Nov 6, 2017
A sample XML annotation file based on Pascal VOC format.
View annotation.xml
<annotation>
<folder>GeneratedData_Train</folder>
<filename>000001.png</filename>
<path>/my/path/GeneratedData_Train/000001.png</path>
<source>
<database>Unknown</database>
</source>
<size>
<width>224</width>
<height>224</height>
@venik
venik / build_tf.sh
Last active Jul 30, 2020
Bash script for local building TensorFlow on Mac/Linux with all CPU optimizations (default pip package has only SSE)
View build_tf.sh
#!/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
@iconara
iconara / queries.sql
Last active Oct 6, 2020
Low level Redshift cheat sheet
View queries.sql
-- Table information like sortkeys, unsorted percentage
-- see http://docs.aws.amazon.com/redshift/latest/dg/r_SVV_TABLE_INFO.html
SELECT * FROM svv_table_info;
-- Table sizes in GB
SELECT t.name, COUNT(tbl) / 1000.0 AS gb
FROM (
SELECT DISTINCT datname, id, name
FROM stv_tbl_perm
JOIN pg_database ON pg_database.oid = db_id
@jkreps
jkreps / benchmark-commands.txt
Last active Oct 20, 2020
Kafka Benchmark Commands
View benchmark-commands.txt
Producer
Setup
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196
@bkimble
bkimble / gist:1365005
Last active Oct 5, 2020
List local memcached keys using Ruby
View gist:1365005
#!/usr/bin/env ruby
# List all keys stored in memcache.
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place.
require 'net/telnet'
headings = %w(id expires bytes cache_key)
rows = []
You can’t perform that action at this time.