Skip to content

Instantly share code, notes, and snippets.

View singhabhinav's full-sized avatar

Abhinav Singh singhabhinav

  • Bangalore, India
View GitHub Profile
@singhabhinav
singhabhinav / gist:132b8196abac026b43fa
Last active November 4, 2024 18:20
Install SSL certificate in Nginx (Using .crt & .ca-bundle certificate files)
Step 1 - Create .crt file
cat domainname.crt domainname.ca-bundle > domainname-ssl-bundle.crt
Step 2-
Add lines for ssl_certificate in nginx configuration
server {
listen 80 default_server;
@singhabhinav
singhabhinav / ambari_server_backup.sh
Last active May 18, 2016 11:55
Take Ambari server backup and move to S3
# This script will take backup of ambari server and move to S3
# Make sure you have s3cmd installed and configured https://github.com/s3tools/s3cmd
# Customize it according to your need
#!/bin/bash
USERNAME=$1
export PGPASSWORD=$2
DB=ambari
@singhabhinav
singhabhinav / kafka_hands_on.sh
Last active February 19, 2021 11:49
Kafka hands-on on CloudxLab
# Include Kafka binaries in the path
export PATH=$PATH:/usr/hdp/current/kafka-broker/bin
# Create the topic
# Replace localhost with the hostname of node where zookeeper server is running.
# Replace test with your topic name
kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test
# Check if topic is created
kafka-topics.sh --list --zookeeper localhost:2181
# Clone CloudxLab BigData repository
git clone https://github.com/cloudxlab/bigdata.git
# If already cloned then update the repository
cd ~/bigdata && git pull origin master
# Code is inside spark/examples/streaming/word_count_kafka
from tensorflow.contrib.slim.nets import inception
import tensorflow.contrib.slim as slim
X = tf.placeholder(tf.float32, shape=[None, 299, 299, 3])
with slim.arg_scope(inception.inception_v3_arg_scope()):
logits, end_points = inception.inception_v3(
X, num_classes=1001, is_training=False
)
predictions = end_points["Predictions"]
saver = tf.train.Saver()