Skip to content

Instantly share code, notes, and snippets.

View emmanuelol's full-sized avatar

Emmanuel emmanuelol

View GitHub Profile
@qinyao-he
qinyao-he / tensorrt.py
Last active June 19, 2020 08:28
Optimize frozen tensorflow graph using TensorRT
import os
import tensorflow as tf
import tensorflow.contrib.tensorrt as trt
def get_frozen_graph(graph_file):
"""Read Frozen Graph file from disk."""
with tf.gfile.FastGFile(graph_file, "rb") as f:
graph_def = tf.GraphDef()
@asanakoy
asanakoy / alexnet_netspec.py
Last active July 24, 2018 15:29
Generate caffe netspec file for Alexnet model
# 23.03.16, Artsiom Sanakoyeu
import caffe
from caffe import layers as L, params as P
def alexnet(train_data_source, test_data_source, mean_file, train_batch_size=128, test_batch_size=50, database_backend=P.Data.LEVELDB):
"""
Generate the caffe's network specification train_val.prototxt file for Alexnet model,
described in the [AlexNet](http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks) publication.
"""
@floehopper
floehopper / install.md
Last active May 30, 2024 12:53
Install rtl-sdr on Raspian on Raspberry Pi
jamesmead@floehopper.local:~$ sudo dd bs=1m if=/Users/jamesmead/Downloads/2015-02-16-raspbian-wheezy.img of=/dev/disk2
pi@raspberrypi ~ $ sudo raspi-config
# Choose option 1 to "Expand Filesystem" - Ensures that all of the SD card storage is available to the OS
# Choose Finish & reboot

pi@raspberrypi ~ $ sudo apt-get update
@rxaviers
rxaviers / gist:7360908
Last active July 21, 2024 12:41
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@mgronhol
mgronhol / trie.py
Created May 13, 2012 16:10
Trie in Python
#!/usr/bin/env python
class Node( object ):
def __init__( self, end_node = False ):
self.end_node = end_node
self.prefix_count = 0
self.children = {}