I hereby claim:
- I am gfranxman on github.
- I am glenn_at_sfu (https://keybase.io/glenn_at_sfu) on keybase.
- I have a public key whose fingerprint is 1402 5418 99F7 BAB7 CFDF A350 D69B 428B 0CC2 FCFA
To claim this, I am signing this object:
| def request_as_curl(request): | |
| """ | |
| construct a curl command from a (failed) request. | |
| """ | |
| url = request.url | |
| headers = request.headers | |
| data = request.body.decode("utf-8") | |
| method = request.method | |
| command = "curl -v -H {headers} {data} -X {method} {uri}" |
| def safepath_join(head, *tail): | |
| """ | |
| combines path parts like os.path.join, but ensures the resultant directory | |
| doesn't step outside of the path given as the root. | |
| """ | |
| root = os.path.abspath(head) | |
| p = os.path.normpath(os.path.join(head, *tail)) | |
| if not p.startswith(root + os.path.sep): | |
| raise ValueError(f"{p} steps outside {root}") | |
| return p |
| .PHONY: help | |
| # useage config | |
| TARGETLEN:=$(shell echo 16) | |
| # colors | |
| BLUE:=$(shell echo "\033[0;36m") | |
| GREEN:=$(shell echo "\033[0;32m") | |
| YELLOW:=$(shell echo "\033[0;33m") | |
| RED:=$(shell echo "\033[0;31m") |
| #include <opencv2/opencv.hpp> | |
| #include <pcl/common/common_headers.h> | |
| #include <pcl/io/pcd_io.h> | |
| #include <pcl/point_types.h> | |
| #include <pcl/point_cloud.h> | |
| #include <pcl/visualization/pcl_visualizer.h> | |
| #include <Eigen/Core> | |
| #include <Eigen/LU> |
| #!/usr/bin/env python | |
| """ | |
| Bundle the site-packages of the current python environment into a zip file | |
| If you have any wheels at `$(pwd)/wheels`, those will be used instead of | |
| of the locally installed packages. For instance, if my pwd looked like | |
| wheels/ | |
| |-- numpy-1.11.2-cp27-cp27mu-manylinux1_x86_64.whl |
I hereby claim:
To claim this, I am signing this object:
| import requests | |
| rip_url = 'https://www.guitartricks.com/blog/Goodbye-Glenn-Frey-a-Fallen-Eagle?utm_source=Guitar+Tricks+Newsletter&utm_campaign=bb3aded8a8-GT_NL_Prospects_1_29_2016&utm_medium=email&utm_term=0_832235591b-bb3aded8a8-95269893' | |
| c = requests.get( rip_url ).content | |
| c = c.replace('Frey', 'Franxman') | |
| c = c.replace('Lewis', '') | |
| c = c.replace('the Eagles', 'Scripps') | |
| c = c.replace('trouble', 'python') | |
| c = c.replace('music', 'APIs') |
| import logging | |
| import django | |
| from django.db import connection | |
| if django.VERSION[1] > 7: | |
| connection.force_debug_cursor=True | |
| else: | |
| connection.use_debug_cursor=True | |
| l = logging.getLogger('django.db.backends') |
| import pytz | |
| TIMEZONES = [ (t,t) for t in pytz.common_timezones if t.startswith("US/") ] | |
| TIMEZONES.sort( key=lambda t: pytz.timezone(t[0])._utcoffset.seconds/3600, reverse=True ) | |
| >>> TIMEZONES | |
| [('US/Eastern', 'US/Eastern'), ('US/Central', 'US/Central'), ('US/Mountain', 'US/Mountain'), ('US/Arizona', 'US/Arizona'), ('US/Pacific', 'US/Pacific'), ('US/Alaska', 'US/Alaska'), ('US/Hawaii', 'US/Hawaii')] | |
| >>> |