Skip to content

Instantly share code, notes, and snippets.

View madhurgupta10's full-sized avatar
💭

Madhur Gupta madhurgupta10

💭
View GitHub Profile
@madhurgupta10
madhurgupta10 / lambda-function.py
Created February 25, 2018 07:39
lambda-function.py for Hackerster.io (Subject to Licence Agreement)
#!/usr/bin/python
# -*- coding: utf-8 -*-
# you need to install these libraries, firebase.py is included in the repo
import firebase
import requests
import json
##################################################################################
# Initialize this with your own firebase, url for example - "room-service-abc123"#
@madhurgupta10
madhurgupta10 / firebase-python-3.py
Last active February 25, 2018 04:15
Firebase for Python 3
# adapted from firebase/EventSource-Examples/python/chat.py by Shariq Hashme
from sseclient import SSEClient
import requests
from queue import Queue
import json
import threading
import socket
@madhurgupta10
madhurgupta10 / bitly_python_example.py
Last active April 14, 2019 00:02
Short Url using bitly with python
def shorturl():
import requests
import json
link = input("Enter url: ")
query_params = {'access_token': 'your key goes here, use generic key only',
'longUrl': link}
endpoint = 'https://api-ssl.bitly.com/v3/shorten'