Skip to content

Instantly share code, notes, and snippets.

ritiek /
Last active Sep 8, 2020
Scan devices on LAN to get their IP, MAC and vendor name
#!/usr/bin/env python
import logging
import urllib2 as urllib
import nmap
from scapy.all import *
def scanNetwork(network):
ritiek /
Last active Dec 22, 2017
Scrape links from google search
#!/usr/bin/env python
import requests
from bs4 import BeautifulSoup
search_term = 'hello'
0 = page 1
10 = page 2
ritiek /
Last active Dec 21, 2020
Keras predicting on all images in a directory
from keras.models import load_model
from keras.preprocessing import image
import numpy as np
import os
# image folder
folder_path = '/path/to/folder/'
# path to model
model_path = '/path/to/saved/model.h5'
# dimensions of images
ritiek /
Last active Feb 20, 2019
Aww yiss! Rick n' Roll Android Apps

Keybase proof

I hereby claim:

  • I am ritiek on github.
  • I am ritiek ( on keybase.
  • I have a public key ASA1qFuAESdfigezYxV8q4XPEY6hqSk8UHvogWNRJCsKJwo

To claim this, I am signing this object:


If you have no idea what this is about. See

Dragonborn Comes


Kataware Doki

(qu) u u (nu) trre(ct)m e

ritiek / hosts
Last active Jan 22, 2021
hosts file to block all GameRanger advertisements
View hosts
# Copyright (c) 1993-2009 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
ritiek /
Last active Jan 27, 2018
Setup rust-lang local development environment
# git clone
# cd rust
# <make changes to source if any>
# full build (1st time)
./ install
rustup toolchain link develop build/x86_64-unknown-linux-gnu/stage2
rustup default develop
rustc -V
ritiek /
Last active Dec 19, 2018
Count number of lines of code in a project
find . -name "*.py" -type f -exec grep . {} \; | wc -l
ritiek /
Last active Apr 28, 2019
Fetch information from wolfram and wikipedia using Flask API
import wolframalpha
import wikipedia
from wikipedia.exceptions import DisambiguationError
from flask import Flask
app = Flask(__name__)
client = wolframalpha.Client('T27H46-H3TH6GL545')
def wolframit(query):