This file contains 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/env python | |
print(""" | |
This example shows you a feature of the LCD hardware used | |
by the Dot HAT. You should see some text dance! | |
Press CTRL+C to exit. | |
""") | |
import dothat.backlight as backlight | |
import dothat.lcd as lcd |
This file contains 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/env python | |
print(""" | |
This example shows you a feature of the Dot HAT. | |
You should see colors step across the screen! | |
Press CTRL+C to exit. | |
""") | |
import dothat.backlight as backlight | |
import dothat.lcd as lcd |
This file contains 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/env python | |
print(""" | |
This example shows you a feature of the LCD hardware used | |
by the Dot HAT. You should see double-height text! | |
Press CTRL+C to exit. | |
""") | |
import dothat.backlight as backlight | |
import dothat.lcd as lcd |
This file contains 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
import math | |
import os | |
from os.path import join, getsize, isfile, isdir | |
def as_blocks(val): | |
return math.ceil(val/2048.0) # dvd block size | |
def getKey(item): | |
return item[1] |
This file contains 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
import os, sys | |
# NOTE: assuming 'clean' files: level/tag/etc separated by spaces | |
# NOTE: assuming 'normal' ids: e.g. Ixxx, where xxx is a number | |
dict = {} | |
file2_ids = {} | |
def file1_ids(line): | |
# track largest id values |
This file contains 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
# Massages a Chrome bookmarks file into an HTML file. | |
# | |
# Features: | |
# - Folders are ordered alphabetically | |
# - Bookmarks are ordered alphabetically (by description) | |
# - Bookmarks are shown first, followed by folders | |
# - Folders can be expanded or collapsed. Initially collapsed. | |
# - Folders are indented nicely | |
# - A button is provided to expand/collapse all folders | |
# |
This file contains 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
#define _CRT_SECURE_NO_WARNINGS | |
#include <string> | |
#include <windows.h> | |
#include <fileapi.h> // GetFileAttributes | |
#include <chrono> | |
#define FL_PATH_MAX 2048 | |
unsigned fl_utf8decode(const char* p, const char* end, int* len) |
This file contains 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
/* | |
1. modify the const BASE to the drive letter you want to test on. | |
1a. To build, the additional option "/utf-8" needs to be added to the compiler options. | |
See project settings, compiler, "command line". | |
2. execute the following commands in a console window at the root of said drive | |
chcp 65001 | |
mkdir isdirtest | |
cd isdirtest | |
mkdir testǼ |
This file contains 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
||2egg+meat|omelette|Eggs Bene|Total| | |
|-|-|-|-|-| | |
|Steve's|10|9|11|30| | |
|Country View|9|10|11|30| | |
|Roundabout|7|11|13|31| | |
|Kasha's Kitchen|13|12|?|~36| | |
|Sunrise Grill|9+|7|8+|25| | |
|Herbert's|8|10|10|28| | |
|IHop Newington|11|11|?|~33| |