This is an overview over the inner workings of Detexify. Extended knowlege in pattern recognition or machine learning is not necessary as I will explain some basics but understanding of linear algebra will definitely help. I have to note that I am not an expert, either. I more or less stumbled into this because of this project. Experts in this field may safely skip the first section.
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
This file contains hidden or 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
| #!/usr/bin/python | |
| ############################################################################### | |
| # | |
| # file: gmail-count | |
| # | |
| # Purpose: generates a string value representing the Gmail unread email count. | |
| # | |
| # Usage: pipe the i3status with this script (see i3status manpage) | |
| # or use conky. | |
| # |
This file contains hidden or 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
| class ConnectPythonLoggingToROS(logging.Handler): | |
| MAP = { | |
| logging.DEBUG:rospy.logdebug, | |
| logging.INFO:rospy.loginfo, | |
| logging.WARNING:rospy.logwarn, | |
| logging.ERROR:rospy.logerr, | |
| logging.CRITICAL:rospy.logfatal | |
| } |
This file contains hidden or 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 | |
| # Gitolite [https://github.com/sitaramc/gitolite] | |
| # Jenkins Git Plugin [https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin] | |
| # GL_REPO will contain the short relative path of the repository being pushed to, e.g. "projects/component-1", so transform it into the Git URL format that your Jenkins build jobs follow: | |
| [email protected]:$GL_REPO | |
| # Jenkins Git plugin notification URL -- update host as appropriate: | |
| TRIGGER_URL=http://jenkins.example.com:8080/git/notifyCommit?url=$REPOSITORY_URL |
This file contains hidden or 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
| # Heavily depends on: | |
| # libqrencode (fukuchi.org/works/qrencode/) | |
| # paperkey (jabberwocky.com/software/paperkey/) | |
| # zbar (zbar.sourceforge.net) | |
| # Producing the QR codes: | |
| # Split over 4 codes to ensure the data per image is not too large. | |
| gpg --export-secret-key KEYIDGOESHERE | paperkey --output-type raw | base64 > temp | |
| split temp -n 4 IMG | |
| for f in IMG*; do cat $f | qrencode -o $f.png; done |
This file contains hidden or 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
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |
For stateful applications, there are 5 different ways of managing the history of state:
- No History - Living in the moment. - Examples: Any stateful application that doesn't discards all previous states upon mutation.
- Ad Hoc Snapshotting - Allows restoration to manually saved snapshots. - Examples: Memento Pattern.
- Singleton - Only remembers the previous snapshot, where undoing the undo is just another undo. - Examples: Xerox PARC Bravo.
- 1 Stack - Allows linear undo. - Examples: AtariWriter.
- 2 Stack - Allows linear undo and redo. - Examples: Browser History, Microsoft Word, Adobe Photoshop.
This file contains hidden or 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
| git describe --exact-match --tags 2> /dev/null || git rev-parse --short HEAD |
OlderNewer