This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
df = pd.DataFrame(np.fromfile(r"raceboxmini.dump.bin", dtype=np.dtype([ | |
('Header', np.uint16), | |
('Message Class and ID', np.uint16), | |
('Payload Length', np.uint16), | |
('iTOW', np.uint32), | |
('Year', np.uint16), | |
('Month', np.int8), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import pandas as pd | |
import wget | |
from google.cloud import bigquery | |
print('Upload geojson-path-finder network demo to Bigquery') | |
url = 'https://francois-baptiste.github.io/geojson-path-finder/network.json' | |
wget.download(url, 'network.json') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import sqlite3 | |
import zipfile | |
import pandas as pd | |
import plpygis | |
import wget | |
from google.cloud import bigquery | |
def mylambda(x): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"/> | |
<title>Kepler.gl embedded map</title> | |
<!--Uber Font--> | |
<link rel="stylesheet" href="https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/uber-fonts/4.0.0/superfine.css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With T0 AS( | |
SELECT population, libjs4us.h3.ST_H3(ST_GEOGPOINT(longitude_centroid, latitude_centroid), 10) key FROM `bigquery-public-data.worldpop.population_grid_1km` WHERE last_updated = "2017-01-01" | |
), | |
T1 AS ( | |
SELECT sum(population) population, key | |
from T0 | |
group by key), | |
T2 AS (SELECT | |
array (SELECT | |
struct(libjs4us.h3.h3ToParent(key,len) as key, population) mystruct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
from skvideo import io | |
vreader = io.vreader('input.mp4') | |
vwriter = io.FFmpegWriter('output.mp4') | |
for counter, frame in enumerate(vreader): | |
frame = cv2.cvtColor(frame, cv2.COLOR_RGB2BGR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
cookies = {} | |
headers = {} | |
mylist=[ | |
(195,55), | |
(205,55), | |
(215,55), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from random import randint | |
import tornado.concurrent | |
import tornado.platform.asyncio | |
import tornado.web | |
from aiopg.sa import create_engine as aiopg_create_engine | |
import asyncio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This hook is run after a new virtualenv is activated. | |
# ~/.virtualenvs/postmkvirtualenv | |
libs=( PyQt4 sip.so ) | |
python_version=python$(python -c "import sys; print (str(sys.version_info[0])+'.'+str(sys.version_info[1]))") | |
var=( $(which -a $python_version) ) | |
get_python_lib_cmd="from distutils.sysconfig import get_python_lib; print (get_python_lib())" |