Skip to content

Instantly share code, notes, and snippets.

@wf34
wf34 / CMakeLists.txt
Created September 3, 2018 18:02
G2O 3D SLAM with calibration test
cmake_minimum_required(VERSION 3.0)
find_package(PCL 1.8 REQUIRED)
find_package(G2O REQUIRED)
find_package(Eigen3 REQUIRED)
include_directories(
${PCL_INCLUDE_DIRS}
${G2O_INCLUDE_DIR}
${EIGEN3_INCLUDE_DIR}
)
@wf34
wf34 / webscrape_with_puppeteer.js
Created May 12, 2018 17:16
Web Scraping with JS, Node and puppeteer
const puppeteer = require('puppeteer');
const cheerio = require('cheerio');
function get_browser() {
return puppeteer.launch();
}
function instantiate_page(browser) {
return browser.newPage();
}
class PageLoadError extends Error {
@wf34
wf34 / headless_chrome_lxml.py
Last active May 12, 2018 15:52
Web-Scraping with Headless Chrome
#!/usr/bin/env python3
import sys
import os
import subprocess
import lxml.html as html
import lxml.etree as etree
def get_page(url):
HEADLESS_GOOGLE_CMD = '''google-chrome-stable --headless \
@wf34
wf34 / python_requests_lxml.py
Last active May 12, 2018 14:55
Web Scraping Wikipedia
import requests
import lxml.html as html
def get_page(url):
return requests.get(url, timeout =1.).text
def parse_page(song_url):
page_source = get_page(song_url)
import argparse
import sys
import gc
from typing import Optional, Tuple
import numpy as np
from keras.models import Sequential
from keras.layers import Dense, TimeDistributed
from keras.layers import LSTM