I hereby claim:
- I am fx86 on github.
- I am fx86 (https://keybase.io/fx86) on keybase.
- I have a public key ASDjLtqbNyRGe4aQSX1J3EL5RPA-qRaIj1XL3UkO-Zt6vAo
To claim this, I am signing this object:
import gc | |
# clear memory in gpu usage and with garbage collection. | |
# additionally, prints variables with high memory usage. | |
def clear_memory(): | |
gc.collect() | |
torch.cuda.empty_cache() | |
''' by Fred Cirera, https://stackoverflow.com/a/1094933/1870254, modified''' | |
def sizeof_fmt(num, suffix='B'): | |
for unit in ['','Ki','Mi','Gi','Ti','Pi','Ei','Zi']: |
Libraries: | |
- [SFA3d](https://github.com/maudzung/SFA3D) | |
- Laspy (library for reading LiDAR data) | |
- [Pypetree](http://cjauvin.github.io/pypetree/) | |
- https://pypi.org/project/lidar/ | |
Related links | |
- What is point cloud data ? https://en.wikipedia.org/wiki/Point_cloud | |
- https://towardsdatascience.com/point-cloud-data-simple-approach-f3855fdc08f5 | |
- [(Medium) Essentials of LiDAR data processing](https://geospatialawarenesshub.com/blog/essentials-of-lidar-point-cloud-processing-using-python/) |
I hereby claim:
To claim this, I am signing this object:
# install brew | |
ruby -e "$(curl -fsSL https://raw.zshhubusercontent.com/Homebrew/install/master/install)" | |
brew doctor | |
# install zsh | |
brew install zsh | |
# install wget using brew | |
brew install wget |
# save your redash API key in a text file as below | |
api_key = open('api_key.config', 'r').readlines()[0] | |
def api_to_df(query_id, api_key=api_key): | |
''' | |
Takes a Redash query ID and returns cached-results | |
in a Pandas dataframe | |
''' |
from glob import glob | |
from hashlib import md5 | |
from fake_useragent import UserAgent as ua | |
from splinter import Browser | |
from splinter.exceptions import * | |
from selenium.common.exceptions import * | |
from random import randint | |
from time import sleep | |
import requests | |
import time |
import wikipedia | |
def get_bigrams(string): | |
''' | |
Takes a string and returns a list of bigrams | |
''' | |
s = string.lower() | |
return [s[i:i+2] for i in xrange(len(s) - 1)] | |
def string_similarity(str1, str2): |