Skip to content

Instantly share code, notes, and snippets.

Satwik Kansal satwikkansal

View GitHub Profile
satwikkansal /
Created Jun 19, 2018
Generative Adversarial Network implementation in Tensorflow for MNIST dataset: Generating handwritten digits using GANs
import tensorflow as tf
from PIL import Image
import numpy as np
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets('MNIST_data', one_hot=True)
model_dir = './model/'
model_name = 'gan_mnist'
satwikkansal / snippet.cs
Created May 2, 2018
Creating persistent menu and get started button in C# (useful for
View snippet.cs
// Snippet for persistent menu
var client = new RestClient("");
var request = new RestRequest(Method.POST);
request.AddHeader("postman-token", "2f9a47e2-2a8a-0a70-c4ce-cb72dbfd8e93");
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"setting_type\" : \"call_to_actions\",\n \"thread_state\" : \"existing_thread\",\n \"call_to_actions\":[\n {\n \"type\":\"postback\",\n \"title\":\"Help\",\n \"payload\":\"DEVELOPER_DEFINED_PAYLOAD_FOR_HELP\"\n },\n {\n \"type\":\"postback\",\n \"title\":\"Start a New Order\",\n \"payload\":\"DEVELOPER_DEFINED_PAYLOAD_FOR_START_ORDER\"\n },\n {\n \"type\":\"web_url\",\n \"title\":\"View Website\",\n \"url\":\"\"\n }\n ]\n }", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
satwikkansal /
Last active Jun 22, 2018
GSoC Discussion (intermediate)
satwikkansal /
Last active Sep 3, 2017
Work Report for Google Summer Of Code 2017
Orgainization [coala]
Project name Enhance coala-quickstart
Primary repository [coala-quickstart]
Project Mentors Adhityaa, Zatreanu Adrian-Gabriel
Project Page [Summer of Code Project Page]
Status Completed

Project Abstract

satwikkansal /
Last active Aug 11, 2017
Github README.rst and styles
satwikkansal / cheatsheet.cpp
Last active Mar 23, 2019
C++ STL cheatsheet for competitive progrmming
View cheatsheet.cpp
This a header file that includes every standard library.
You can use it to save time.
NOTE: This header file may not be recognized by compilers
other than gcc.
#include <bits/stdc++.h>
//Use this if the above header file doesn't work.
satwikkansal /
Created May 3, 2017
Quotefancy wallpapers scraper
import shutil
import os
import requests
from bs4 import BeautifulSoup
# USAGE: Add all the galleries that you want to be scraped in the list below
roots = ["",
View Simple Cricket API script
#importing the python requests library
import requests
def get_scores():
url = ""
#Creatin a GET request
response = requests.get(url)
import time
import random
import datetime
import telepot
After **inserting token** in the source code, run it:
$ python2.7
You can’t perform that action at this time.