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
# platform library extension adder for Python or something | |
import os | |
import sys | |
__PLATFORM_LIBRARY_EXTENSIONS = { | |
'windows': 'dll', | |
'darwin': 'dylib', | |
'linux': 'so', | |
} |
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 | |
# Test IRC Client | |
# Based on http://hawkee.com/snippet/9725/ | |
import os | |
import socket | |
import traceback | |
# settings | |
nick = 'bython' |
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
/************************************************************************ | |
* IRC - Internet Relay Chat, | |
* Copyright (C) 2001 Hybrid Development Team | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 1, or (at your option) | |
* any later version. | |
* | |
* This program is distributed in the hope that it will be useful, |
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
# Archiver options object proposal | |
""" might only need to be an Archiver constructor now? | |
not sure, how do you mean exactly? | |
as I see it, the main reason to make the Options class is to simplify things internally | |
like passing options between the Archiver and the SiteArchivers (or whatever we do to support 4chan/Fuuka/etc) | |
I can certainly see doing it like that, but even then I think we'd be creating an Options object internally. Definitely different files, but subclassing from a standard BaseSiteArchiver or something similar, so those objects have the same API to the controlling Archiver object (and can be used as a simple list to iterate over, below in add_thread and download_threads) | |
well, that make sense. True, that would really help to have a unified GUI. | |
I might start playing about with refactoring the repo | |
probably want to create a brand new repo, since we wrote from scratch anyway, name it BASC_Archiver | |
sure, I'll be reusing lots of code from BA-4chan-thread-archiver as |
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 | |
# written by Daniel Oaks <daniel@danieloaks.net> | |
# generate ssl key/cert in the same dir as this script with the following commands: | |
# openssl genrsa -out privkey.pem 2048 | |
# openssl req -new -x509 -days 365 -key privkey.pem -out cert.pem | |
import os | |
import bottle | |
import traceback |
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
# Numeric String Parser | |
# See license text in pyparsing.py | |
# Modifications by Daniel Oaks, same license | |
# | |
# Comply more strictly with PEP8, traditional Python style. | |
# Add PI and E constants. | |
# Add sin, cos, etc functions. | |
# Add power ops, ^ and ** | |
# Split out multMap, compMap, etc for better extensibility. |
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
def nodelist(network): | |
"""Returns a drawable nodelist (for the concentric circle-based drawing functions of networkx).""" | |
# first off, find most largestly connected (hub) server for the center | |
center = nx.center(network) | |
center = center[0] # returns a list of centers, and we don't want that | |
# and create the layers off that | |
added_nodes = [center,] |
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 | |
# Given an ePub file from FicSave, generates LaTeX files | |
# Written by Daniel Oaks, released under the ISC license | |
__doc__ = """Make-LaTeX. | |
Given an ePub file from FicSave, generates LaTeX files. | |
Usage: | |
make-latex <name> [options] | |
make-latex -h | --help |
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
// Basically, dynamically selects between BabelExt and Greasemonkey methods, | |
// depending on what is avalaible at runtime | |
// | |
// Simply put this at the top of your userscript, and use BE_set/getValue | |
// exactly as you would BabelExt.storage.set/get | |
// | |
// However, there is also another argument passed to getValue, def, as in the | |
// default value if none can be retrieved (as in Greasemonkey's GM_getValue) | |
function BE_setValue(key, val, callback) { |
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 | |
# ircd git generation from archive files | |
# like irc2.1.1.tar.Z | |
# code | |
import os | |
import shutil | |
import gitapi | |
import tarfile | |
from version import LooseVersion |
OlderNewer