Skip to content

Instantly share code, notes, and snippets.

Mark Grandi mgrandi

  • Arizona, USA
Block or report user

Report or block mgrandi

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
@mgrandi
mgrandi / setup.py bdist_wheel install removal
Created Dec 12, 2019
duplicity normal install vs bdist_wheel
View setup.py bdist_wheel install removal
mgrandi@Alcidae:~/duplicity_stuff/duplicity_trunk/duplicity/dist$ pip3 uninstall duplicity
Uninstalling duplicity-0.8.7.1:
/home/mgrandi/.local/bin/duplicity
/home/mgrandi/.local/bin/rdiffdir
/home/mgrandi/.local/lib/python3.6/site-packages/duplicity-0.8.7.1.dist-info/DESCRIPTION.rst
/home/mgrandi/.local/lib/python3.6/site-packages/duplicity-0.8.7.1.dist-info/INSTALLER
/home/mgrandi/.local/lib/python3.6/site-packages/duplicity-0.8.7.1.dist-info/METADATA
/home/mgrandi/.local/lib/python3.6/site-packages/duplicity-0.8.7.1.dist-info/RECORD
/home/mgrandi/.local/lib/python3.6/site-packages/duplicity-0.8.7.1.dist-info/WHEEL
/home/mgrandi/.local/lib/python3.6/site-packages/duplicity-0.8.7.1.dist-info/metadata.json
@mgrandi
mgrandi / config.py
Last active Mar 11, 2020
Example Windows Service, written using asyncio and frozen using cx_Freeze
View config.py
# for NAME and DISPLAY_NAME, the '%s' is replaced whatever you pass to <service.exe> --install NAMEHERE, so you can
# register the same exe multiple times with different names and configuration files
NAME = 'cx_FreezeSampleService%s' # what the name of the service is, used in command line things like "sc"
DISPLAY_NAME = 'cx_Freeze Sample Service - %s' # display name of the service, this is what you see in the "Services" window
MODULE_NAME = 'service' # python file containing the actual service code
CLASS_NAME = 'Handler' # class name of the service, since it doesn't extend anything, all it needs are certain methods
DESCRIPTION = 'Sample service description' # description of the service, seen in the Service Properties window
AUTO_START = False # does the service auto start?
# does the service respond to session changes? Setting this to True and implemnting SessionChanged(sessionId, eventType)
@mgrandi
mgrandi / ratchet_and_clank_nexus_rename_soundfiles.py
Last active Aug 29, 2015
ratchet_and_clank_nexus_rename_soundfiles.py
View ratchet_and_clank_nexus_rename_soundfiles.py
#
# script to name audio files from 'ratchet and clank into the nexus' to human readable names
#
# aka resident_sound.dat -> cha_clank_voc_tossspecialb_mdc.dat
#
# Jun 23, 2014 Mark Grandi
#
import argparse, sys, re, os.path, os, shutil
@mgrandi
mgrandi / rename-file-to-parent-folder.py
Last active Jun 14, 2017
rename a file based on the name of the parent directory
View rename-file-to-parent-folder.py
#
# script to rename files to the same name as the parent folder
#
# so
#
# 3a -|
# - 3a1c603a -|
# - resident_sound.dat (gets renamed to be 3a1c603a_resident_sound.dat)
#
#
@mgrandi
mgrandi / parse_and_convert_rws_file.py
Created May 21, 2014
parse_and_convert_rws_file.py - parses a rws audio file (xbox 360) and converts it to pcm, then runs it through sox to produce a WAV
View parse_and_convert_rws_file.py
#!/usr/bin/env python3
#
# parse rws file format and extract it, then run it through sox to produce a wav
#
#
# written by Mark Grandi - May 9th 2014
#
import argparse, sys, traceback, os, os.path, subprocess, tempfile, shutil
View gist:11025212
#!/usr/bin/env python3
#
# script to convert csv from the Mileage Log wp7 app's email export format to json
# so the app can load it from OneDrive/SkyDrive
#
# written by Mark Grandi - Apr 16, 2014
#
import csv, json, argparse, sys, io, uuid, datetime
You can’t perform that action at this time.