Skip to content

Instantly share code, notes, and snippets.

Dan Nguyen dannguyen

Block or report user

Report or block dannguyen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dannguyen /
Last active Dec 1, 2019
cbg - a bash function (using AppleScript) to change the theme or background color of MacOS Terminal
# Helpful resources:
local OCMD=""
local RED=0; local GRN=0; local BLU=0;
local THEMES="pro basic grass homebrew ocean" ## preset themes
local HELPMSG; read -r -d '' HELPMSG <<EOF
dannguyen /
Last active Nov 30, 2019
hello.txt and world.txt, for dan's pydataproject-template to remotely collect
<!doctype html><title>PRODUCTION READY CODE MOTHAF KER!</title>
<link rel="stylesheet" href="">
<script src=""></script>
import matplotlib.pyplot as plt
from PyQt5 import QtCore
import numpy as np
import time
import math
class VisualiseFrequency(QtCore.QThread):
def __init__(self, song, canvas, player):
dannguyen /
Last active Nov 3, 2019
Example use of spleeter (Python+Tensorflow audio-extraction library and ffmpeg
dannguyen /
Last active Oct 25, 2019
ni hao world (testing unicode in Excel)

Does Excel correctly open utf8-encoded CSV files?

(using Office for Mac 16.16.15)

printf "hello,world\nNǐ hǎo,shìjiè\n你好,世界\n" > nihao.csv
# or:
# curl -o nihao.csv
open -a 'Microsoft Excel' nihao.csv
dannguyen /
Last active Aug 7, 2019
Modern command-line utility replacements
dannguyen / bashfoo.yaml
Last active Jul 25, 2019
bashfoo.yaml : Dan nguyen's personally curated list of bash/command-line commands that are useful but that he keeps forgetting
View bashfoo.yaml
Dan Nguyen's personally curated list of bash/command-line commands and snippets
that are useful but yet he keeps forgetting
# gist:
dannguyen /
Last active Jul 19, 2019
A gist of AWS Textract sample/demo data for easy reference and preview, in case you're curious how well Amazon does when it comes to pdf-to-csv

AWS Textract -- sample document image and data from the offical demo

AWS Textract is now out of closed beta. You can read the features page here, and you can also read about its limits here (e.g. no handwriting). Basically, if you've ever had to deal with the hell of getting structured data out of a PDF (scanned image or not), Textract is aiming for your business:


This short gist contains some of my brief observations about Textract and its demo, as well as direct links to the most relevant and important files, such as the Textract demo sample image and the resulting data files from Textract's API. If you have an AWS account, I h

You can’t perform that action at this time.