View ocv.py
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 | |
# -*- coding: utf-8 -*- | |
""" | |
ocv domain, a modified copy of sphinx.domains.cpp + shpinx.domains.python. | |
The original copyright is below | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
The OpenCV C/C++/Python/Java/... language domain. | |
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. |
View tweets.py
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 python3 | |
# -*- coding: utf-8 -*- | |
"""A simple script to preview the text of tweets in tweet.js from a Twitter | |
dump. | |
Accepts Zip files fresh from Twitter or extracted tweet.js files as input. | |
""" | |
# Prevent Python 2.x PyLint from complaining if run on this | |
from __future__ import (absolute_import, division, print_function, |
View camelcase.rs
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
//! Routines for parsing camelcase strings | |
//! | |
use std::mem::replace; | |
use unicode_categories::UnicodeCategories; | |
use unicode_segmentation::{GraphemeIndices, UnicodeSegmentation}; | |
// --== Enums ==-- | |
// TODO: Refresh my memory of which other traits I'm advised to derive on this. |
View audit_python2.py
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 python3 | |
# -*- coding: utf-8 -*- | |
"""A simple helper to search for Python scripts which still don't declare | |
python3 in their shebang lines as a proxy for finding un-migrated scripts. | |
""" | |
__author__ = "Stephan Sokolow (deitarion/SSokolow)" | |
__appname__ = "Python 2.x Auditor" | |
__version__ = "0.1" | |
__license__ = "MIT" |
View escape_non_utf8_paths.rs
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
/* | |
Copyright 2018-2020, Stephan Sokolow | |
This code is released under your choice of the MIT or Apache-2.0 licenses. | |
https://opensource.org/licenses/MIT | |
https://opensource.org/licenses/Apache-2.0 | |
*/ | |
use std::borrow::Cow; | |
use std::ffi::{OsStr, OsString}; |
View python_boilerplate.py
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 python3 | |
# -*- coding: utf-8 -*- | |
"""[application description here]""" | |
# Prevent Python 2.x PyLint from complaining if run on this | |
from __future__ import (absolute_import, division, print_function, | |
with_statement, unicode_literals) | |
__author__ = "Stephan Sokolow (deitarion/SSokolow)" | |
__appname__ = "[application name here]" |
View mass_diff.py
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 python3 | |
# -*- coding: utf-8 -*- | |
"""Simple tool to identify bad bits in a cartridge by comparing many dumps | |
--snip-- | |
Requires numpy. | |
""" |
View gist:5b59998d2245325758ac9bbf462605c2
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
#!/bin/sh | |
# NOTE: Despite this script using KDE commands like ark and kdialog, Firefox | |
# doesn't obey KDE's file associations, so you'll need to use a non-KDE | |
# file manager like PCManFM to edit the file associations. | |
open_zip() { | |
exec ark "$@" | |
} | |
offer_comix() { |
View dump_cart.py
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 python3 | |
# -*- coding: utf-8 -*- | |
"""Streamlined Wizard for dumping games with the INL Retro cartridge dumper""" | |
__author__ = "Stephan Sokolow (deitarion/SSokolow)" | |
__appname__ = "INL Retro Dumping Helper" | |
__version__ = "0.1" | |
__license__ = "MIT" | |
# pylint: disable=bad-builtin |
View image_widget.py
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 python3 | |
# -*- coding: utf-8 -*- | |
"""Example code for a PyQt image-display widget which Just Works™ | |
TODO: Split this into a loader wrapper and a widget wrapper so it can be used | |
in designs which maintain a preloaded queue of upcoming images to improve | |
the perception of quick load times. | |
""" | |
from __future__ import (absolute_import, division, print_function, |