Skip to content

Instantly share code, notes, and snippets.

View akg003's full-sized avatar

Amit Garg akg003

  • India
View GitHub Profile
@bluet
bluet / Database Naming Convention and Data Warehouse Design Principles.md
Last active November 13, 2023 13:12
Database Naming Convention and Data Warehouse Design Principles
@bradtraversy
bradtraversy / webdev_online_resources.md
Last active May 3, 2024 12:56
Online Resources For Web Developers (No Downloading)

TensorFlow Serving in 10 minutes!

TensorFlow SERVING is Googles' recommended way to deploy TensorFlow models. Without proper computer engineering background, it can be quite intimidating, even for people who feel comfortable with TensorFlow itself. Few things that I've found particularly hard were:

  • Tutorial examples have C++ code (which I don't know)
  • Tutorials have Kubernetes, gRPG, Bezel (some of which I saw for the first time)
  • It needs to be compiled. That process takes forever!

After all, it worked just fine. Here I present an easiest possible way to deploy your models with TensorFlow Serving. You will have your self-built model running inside TF-Serving by the end of this tutorial. It will be scalable, and you will be able to query it via REST.

@garystafford
garystafford / helpful-git-commands.sh
Last active May 17, 2023 00:34
Helpful git commands
###############################################################################
# Helpful Git/GitHub commands and code snippets
###############################################################################
#### Remove/Squash All History on Master - CAUTION! ####
# https://stackoverflow.com/a/26000395/580268
git checkout --orphan latest_branch \
&& git add -A \\
&& git commit -am "Remove/squash all project history" \
&& git branch -D master \
@garystafford
garystafford / helpful-docker-commands.sh
Last active October 12, 2023 16:51
My list of helpful docker commands
###############################################################################
# Helpful Docker commands and code snippets
###############################################################################
### CONTAINERS ###
docker stop $(docker ps -a -q) #stop ALL containers
docker rm -f $(docker ps -a -q) # remove ALL containers
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter
# exec into container
@Kartones
Kartones / postgres-cheatsheet.md
Last active May 3, 2024 20:51
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@backpackerhh
backpackerhh / core-set.sql
Last active March 17, 2024 05:03
SQL - Movie-Rating Query Exercises
-- 1. Find the titles of all movies directed by Steven Spielberg.
SELECT title
FROM Movie
WHERE director = 'Steven Spielberg';
-- 2. Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order.
SELECT DISTINCT year
@airawat
airawat / 00-SecondarySortJavaMapReduce
Last active April 29, 2021 01:35
Secondary sort in mapreduce - Includes code for a simple program that sorts employee information by department ascending and employee name desc.
Secondary sort in Mapreduce
With mapreduce framework, the keys are sorted but the values associated with each key
are not. In order for the values to be sorted, we need to write code to perform what is
referred to a secondary sort. The sample code in this gist demonstrates such a sort.
The input to the program is a bunch of employee attributes.
The output required is department number (deptNo) in ascending order, and the employee last name,
first name and employee ID in descending order.