Skip to content

Instantly share code, notes, and snippets.

@ritiek
ritiek / google_scraper.py
Last active December 22, 2017 07:01
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
ritiek / devenv.sh
Last active January 27, 2018 07:01
Setup rust-lang local development environment
# git clone https://github.com/rust-lang/rust
# cd rust
# <make changes to source if any>
# full build (1st time)
./x.py install
rustup toolchain link develop build/x86_64-unknown-linux-gnu/stage2
rustup default develop
rustc -V
@ritiek
ritiek / forker.py
Created June 6, 2018 17:37
Fork all your starred repositories to an organization you own
from github import Github
TOKEN =
ORGANIZATION =
g = Github(TOKEN)
organ = g.get_organization(ORGANIZATION)
user = g.get_user()
for repo in user.get_starred():
@ritiek
ritiek / GSoC18_FinalReport.md
Created August 11, 2018 15:14
Google Summer of Code 2018 Final Report

Google Summer of Code 2018 Final Report

My original project - to create a factory based implementation for unifying handling of different types of Plasmas, was completed sooner than expected. Here are the link to related pull requests I made during the summer.

PR Status Description
#501 Merged Raise more fitting NotImplementedError for functions that are yet to be implemented in our Plasma metaclass
#489 Merged Ind
@ritiek
ritiek / bot.au3
Created November 3, 2018 05:35
chrome t-rex game bot
HotKeySet("{F10}", "Exitter")
While 1
$color = PixelGetColor(545,229)
If $color = 5460819 Then
Send("{DOWN UP}")
Send("{UP DOWN}")
Sleep(150)
Send("{UP UP}")
Sleep(300)
@ritiek
ritiek / count.sh
Last active December 19, 2018 13:37
Count number of lines of code in a project
find . -name "*.py" -type f -exec grep . {} \; | wc -l
@ritiek
ritiek / README.md
Last active February 20, 2019 13:46
Aww yiss! Rick n' Roll Android Apps
@ritiek
ritiek / PlasmaPy.md
Last active March 25, 2019 13:19
My OpenAstronomy GSoC 2018 Application
@ritiek
ritiek / wolfpedia.py
Last active April 28, 2019 09:01
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):
@ritiek
ritiek / how_to.md
Last active May 7, 2019 12:12
Compiling source with static and shared library
// bin_hello.cpp

#include "lib_hello.h"

int main() {
    hello_world();
}