Skip to content

Instantly share code, notes, and snippets.

View suriyadeepan's full-sized avatar
❤️
Rediscovering the joy of solving problems and building applications

Suriyadeepan Ramamoorthy suriyadeepan

❤️
Rediscovering the joy of solving problems and building applications
View GitHub Profile
@suriyadeepan
suriyadeepan / scrape_hashtags.py
Created September 13, 2016 08:07
Selenium based Twitter Scrapper
from bs4 import BeautifulSoup
import requests
import time
import sys
import os
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": "html"}, {"id": "head"}, {"id": "meta"}, {"id": "meta_1"}, {"id": "meta_2"}, {"id": "title"}, {"id": "meta_3"}, {"id": "meta_4"}, {"id": "link"}, {"id": "link_1"}, {"id": "link_2"}, {"id": "link_3"}, {"id": "link_4"}, {"id": "link_5"}, {"id": "meta_5"}, {"id": "meta_6"}, {"id": "meta_7"}, {"id": "meta_8"}, {"id": "body"}, {"id": "nav"}, {"id": "div"}, {"id": "div_1"}, {"id": "button"}, {"id": "span"}, {"id": "span_1"}, {"id": "span_2"}, {"id": "span_3"}, {"id": "a"}, {"id": "div_2"}, {"id": "ul"}, {"id": "li"}, {"id": "a_1"}, {"id": "li_1"}, {"id": "a_2"}, {"id": "div_3"}, {"id": "a_3"}, {"id": "a_4"}, {"id": "a_5"}, {"id": "a_6"}, {"id": "a_7"}, {"id": "li_2"}, {"id": "a_8"}, {"id": "div_4"}, {"id": "div_5"}, {"id": "a_9"}, {"id": "img"}, {"id": "header"}, {"id": "div_6"}, {"id": "div_7"}, {"id": "div_8"}, {"id": "div_9"}, {"id": "div_10"}, {"id": "h1"}, {"id": "hr"}, {"id": "span_4"}, {"id": "div_11"}, {"id": "div_12"}, {"id": "div_13"},
@suriyadeepan
suriyadeepan / autobrowse.py
Last active July 28, 2020 07:07
Autonomous surfer for chrome
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
browser=webdriver.Chrome()
#first tab
browser.execute_script("window.open('about:blank', 'tab1');")
browser.switch_to_window("tab1")
{'b': {'args': (),
'fn': Normal(loc: 0.0, scale: 1.0),
'name': 'b',
'type': 'sample',
'value': tensor(-1.1897, grad_fn=<AddBackward0>)},
'b_loc': {'args': (tensor(0.), Real()),
'fn': <function param.<locals>.fn at 0x127388950>,
'name': 'b_loc',
'type': 'param',
'value': tensor(0., requires_grad=True)},
@suriyadeepan
suriyadeepan / ipython3_mac_install.sh
Last active May 7, 2019 14:12 — forked from rossov/ipython3_mavericks.sh
Install ipython3 on Mac OS X Mavericks
# Install ipython3 on Mac OS
# check if brew exists
brew
# install brew if necessary
# follow instructions in
# https://brew.sh/
# Update brew
brew update
def factorial(n):
if n == 0:
return 1
return factorial(n - 1) * n
def factorial_cps(k, n):
if n == 0:
@suriyadeepan
suriyadeepan / grid.js
Created January 4, 2017 03:04
"All work and no play makes Jack a dull boy" - Cellular Automata in p5.js
function Grid(cells, generation, cell_scale){
this.text = " all work and no play makes jack a dull boy ";
// cells
this.cells = cells;
this.generation = generation;
// scale
this.cell_scale = cell_scale;
// create next generation
this.next_gen = function(ruleset){
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python

Document Title

First sentence of document.

To create a line blank add a
and you will receive a line break!

underscore creates italics asterisks for bold

@suriyadeepan
suriyadeepan / 87_python_questions.txt
Last active October 15, 2018 05:26
90 Python Questions
[0]
Question:
With a given tuple (1,2,3,4,5,6,7,8,9,10), write a program to print the first half values in one line and the last half values in one line.
Hints:
Use [n1:n2] notation to get a slice from a tuple.
[1]