Skip to content

Instantly share code, notes, and snippets.

@gfrlv
gfrlv / reflect.py
Created August 20, 2019 05:41 — forked from huyng/reflect.py
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
@gfrlv
gfrlv / Install NVIDIA Driver and CUDA.md
Created March 24, 2019 10:07 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@gfrlv
gfrlv / gist:a0d6307976d4f5e969972d15e25682a3
Last active August 28, 2017 10:23 — forked from tiarno/gist:8a2995e70cee42f01e79
find PDF font info with PyPDF2, example code
from PyPDF2 import PdfFileReader
from pprint import pprint
def walk(obj, fnt, emb):
'''
If there is a key called 'BaseFont', that is a font that is used in the document.
If there is a key called 'FontName' and another key in the same dictionary object
that is called 'FontFilex' (where x is null, 2, or 3), then that fontname is
embedded.