Skip to content

Instantly share code, notes, and snippets.

View xhimanshuz's full-sized avatar
🎯
Focusing

Himanshu Rastogi xhimanshuz

🎯
Focusing
View GitHub Profile
@xhimanshuz
xhimanshuz / scheduling.cpp
Last active September 19, 2020 08:54
Scheduling in C++
/* This program is to explain how to schedule tasks in C++
*
*/
#include <iostream>
#include <string>
#include <time.h>
#include <iomanip>
#include <chrono>
#include <thread>
#include <unistd.h>
@xhimanshuz
xhimanshuz / get_public_ip.py
Created April 5, 2018 00:54 — forked from anhldbk/get_public_ip.py
Get public IP with Python & Requests
import requests
r = requests.get(r'http://jsonip.com')
ip= r.json()['ip']
print 'Your IP is', ip