Skip to content

Instantly share code, notes, and snippets.

from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from webdriver_manager.chrome import ChromeDriverManager
class Autotrader:
def __init__(self, url):
self.url = url
self.driver = None
self.page_num = None
self.xpath_dict = self.XPathDict()
@shan23
shan23 / calling_stubhub_api.py
Created May 27, 2018 08:34 — forked from ozzieliu/calling_stubhub_api.py
Proof of Concept task to get ticket prices and event info using StubHub's API with Python
# Quick intro to accessing Stubhub API with Python
# Ozzie Liu (ozzie@ozzieliu.com)
# Related blog post: http://ozzieliu.com/2016/06/21/scraping-ticket-data-with-stubhub-api/
# Updated 3/5/2017 for Python 3 and Stubhub's InventorySearchAPI - v2
import requests
import base64
import json
import pprint
import pandas as pd
@shan23
shan23 / voronoi-delaunay
Created April 9, 2018 20:34 — forked from mosser/voronoi-delaunay
Voronoi and delaunay triangulation in Scala using JTS
/**
* Island universe
*/
import eu.ace_design.island.{PointGenerator, RandomGrid, SquaredGrid}
val MAP_SIZE = 800
val generators: Map[String,PointGenerator] = Map(
"RANDOM" -> new RandomGrid(MAP_SIZE),
"SQUARE" -> new SquaredGrid(MAP_SIZE)
)
@shan23
shan23 / native-mem-tracking.md
Created April 4, 2018 19:54 — forked from prasanthj/native-mem-tracking.md
Native memory tracking in JVM

Enable native memory tracking in JVM by specifying the following flag

-XX:NativeMemoryTracking=detail

Known the <PID> of the java process

jps

To print ps based RSS

ps -p <PID> -o pcpu,rss,size,vsize

To print native memory tracking summary