Skip to content

Instantly share code, notes, and snippets.

/* Generated by Edge Impulse
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
# Load TensorFlow
import tensorflow as tf
# Set up the converter
converter = tf.lite.TFLiteConverter.from_saved_model(saved_model_dir)
converter.optimizations = [tf.lite.Optimize.OPTIMIZE_FOR_SIZE]
# Perform conversion and output file
tflite_quant_model = converter.convert()
output_dir.write_bytes(tflite_quant_model)
@dansitu
dansitu / readme.md
Created August 23, 2012 18:46 — forked from austintaylor/readme.md
An example of creating a UserVoice SSO token using cryptojs
@dansitu
dansitu / samples.rb
Created April 14, 2011 12:53
Some Ruby sample code
require 'uri'
require 'net/http'
require 'json'
# Here's my Ruby 'FizzBuzz'. I've searched far and wide and
# haven't found one I like better.
def fizzbuzz
1.upto(100) do |number|
message = "#{"Fizz" if number % 3 == 0}#{"Buzz" if number % 5 == 0}"
puts message.empty? ? number : message
#!/usr/bin/env ruby
# Command line util for acquiring a one-off Twitter OAuth access token
# Based on http://blog.beefyapps.com/2010/01/simple-ruby-oauth-with-twitter/
require 'rubygems'
require 'oauth'
puts <<EOS
Set up your application at https://twitter.com/apps/ (as a 'Client' app),