Skip to content

Instantly share code, notes, and snippets.

View brandonrobertz's full-sized avatar

Brandon Roberts brandonrobertz

View GitHub Profile
@brandonrobertz
brandonrobertz / SQLAlchemy-Quickstart.py
Created October 26, 2022 21:16
SQLAlchemy Quickstart Annotated
from sqlalchemy import create_engine
from sqlalchemy import select
from sqlalchemy import Column
from sqlalchemy import ForeignKey
from sqlalchemy import Integer
from sqlalchemy import String
from sqlalchemy.orm import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy.orm import Session
@brandonrobertz
brandonrobertz / pypi-search.sh
Created January 11, 2022 00:16
Python Package Index (PyPI) command line search utility
#!/bin/bash
#
# pypi-search.sh
# Author: Brandon Roberts (bxroberts.org)
#
# This is a simple Python package search script. It uses
# Hext (https://hext.thomastrapp.com/) to extract results
# from a HTTP search request.
#
# Install Hext for this to work: pip install hext
@brandonrobertz
brandonrobertz / damerau_levenshtein_distance.py
Last active December 9, 2021 20:44 — forked from pombredanne/damlevdist-improved.py
Damerau-Levenshtein edit distance Python 3
# Damerau-Levenshtein edit distance implementation for Python 3
# Python 3 compatable, forked from: https://gist.github.com/pombredanne/0d83ad58f45986ddeb0917266e106be0
# Which was based on: https://gist.github.com/badocelot/5327427
# Which was based on pseudocode from Wikipedia: https://en.wikipedia.org/wiki/Damerau-Levenshtein_distance
# Possible improvement by treating 1 addition + 1 deletion = 1 substitution
# between transposed characters:
#
# Damerau-Levenshtein distance for "abcdef" and "abcfad" = 3:
# 1. substitute "d" for "f"
@brandonrobertz
brandonrobertz / manageengine_position.freq.dat
Created December 1, 2017 03:27
ManageEngine Weak Master Key Viz
# pos special_freq upper_freq lower_freq digit_freq
# gnuplot 5.2
Position Special Uppercase Lowercase Digits - - - - - - - - - - - - - - - - - - TOTAL
1 - - 4712 - - - - - - - - - - - - - - - - - - - 4712
2 - - - 4712 - - - - - - - - - - - - - - - - - - 4712
3 - 4712 - - - - - - - - - - - - - - - - - - - - 4712
4 1601 - 1579 1532 - - - - - - - - - - - - - - - - - - 4712
5 1619 261 1314 1518 - - - - - - - - - - - - - - - - - - 4712
6 1546 446 1152 1568 - - - - - - - - - - - - - - - - - - 4712
7 1511 533 1134 1534 - - - - - - - - - - - - - - - - - - 4712
@brandonrobertz
brandonrobertz / keras_fasttext_skipgram_embedding.py
Last active October 9, 2018 09:29
Keras Skipgram Embedding (using pretrained FastText vectors)
# coding: utf-8
from __future__ import print_function
import numpy as np
from keras.models import Sequential
from keras.layers import Embedding
window_size = 1
# using skipgram embeddings built using fasttext:
# fasttext skipgram -input dataset -output dataset.skipgram
@brandonrobertz
brandonrobertz / namecoin-core-qt-merge.patch
Created January 19, 2016 03:32
Namecoin Core QT Rebase/Merge
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 96123e4..eeaabeb 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -96,6 +96,8 @@ QT_FORMS_UI = \
qt/forms/debugwindow.ui \
qt/forms/sendcoinsdialog.ui \
qt/forms/sendcoinsentry.ui \
+ qt/forms/managenamespage.ui \
+ qt/forms/configurenamedialog.ui \