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
# INSTALL DEPENDENCIES BEFORE RUNNING: pandas, sqlite3, sqlalchemy, requests | |
# There is one thing you have to do though: gnucash needs to know the price's currency and it needs a guid (unique identifier) | |
# for this. This guid is unique for each installation, so you need to find yours and assign it to CURRENCY_GUID. | |
# OR: you can just leave it, and the script will fetch the currency from the last price added | |
import pandas as pd | |
import sqlite3 | |
import sqlalchemy | |
from sqlalchemy import create_engine | |
import time |
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
Sub PasswordBreaker() | |
'Breaks worksheet password protection. | |
Dim i As Integer, j As Integer, k As Integer | |
Dim l As Integer, m As Integer, n As Integer | |
Dim i1 As Integer, i2 As Integer, i3 As Integer | |
Dim i4 As Integer, i5 As Integer, i6 As Integer | |
On Error Resume Next | |
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66 | |
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66 | |
For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66 |
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 | |
[ -z "${DEBUG}" ] || set -x | |
ZPOOL=${ZPOOL:-zroot} | |
JAIL_ROOT=${JAIL_ROOT:-/jail} | |
JAIL_RELEASE=${JAIL_RELEASE:-$(sysctl -n kern.osrelease | sed -e 's/-p[0-9]*$//')} | |
JAIL_ARCH=${JAIL_ARCH:-$(sysctl -n hw.machine_arch)} | |
JAIL_DIST=${JAIL_ROOT}/dist/${JAIL_RELEASE} | |
JAIL_TEMPLATE=${JAIL_ROOT}/template/${JAIL_RELEASE}/root |
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
#List unique values in a DataFrame column | |
pd.unique(df.column_name.ravel()) | |
#Convert Series datatype to numeric, getting rid of any non-numeric values | |
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True) | |
#Grab DataFrame rows where column has certain values | |
valuelist = ['value1', 'value2', 'value3'] | |
df = df[df.column.isin(value_list)] |
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
# How to use: | |
# | |
# Just place a lock.png in your home folder to overlay whatever you want | |
#!/bin/bash | |
scrot -e 'convert -blur 0x3 $f ~/lockbg.png' | |
convert -gravity center -composite ~/lockbg.png ~/lock.png ~/lockfinal.png | |
i3lock -u -i ~/lockfinal.png | |
rm ~/lockfinal.png ~/lockbg.png |