Skip to content

Instantly share code, notes, and snippets.

@tinkerbotfoo
tinkerbotfoo / get_ec2_instance_secur_info.py
Last active October 3, 2021 11:13
Get decrypted EC2 Windows instance Administrator password using python boto
###requirements.txt
#pycrypto
#pyopenssl
## Creds
AWS_EC2_ACCESS_ID='AKIA**********'
AWS_EC2_SECRET_KEY = 'mh83**************'
PEM_FILE = os.path.expanduser('D:\\abc\\scripts\\s\\test.pem')
### Get Windows Admin password of the newly created AWS instance
@tinkerbotfoo
tinkerbotfoo / dropbox_fetch_all_file_list.py
Last active December 25, 2015 09:49
Fetch the list of all files in your dropbox account. This might be useful if you wanted to do something with the data. Recently only of my dropbox client that i installed on a virtual machine went wacky and started truncating files already stored in dropbox. I disabled the rogue client. However it has already done some damage. However dropbox st…
#!pip install dropbox pandas
# Register for dropbox developer account for this to work and get the auth access code as explained in the get_dropbox_auth_access_code.py
# Include the Dropbox SDK
import dropbox
import pandas as pd
# get the access token from the get_dropbox_auth_access_code.py - below code is fake
access_token = "9TskpJ1jKCwAAAAAAAAAAVTAzOoY1VWDMGjKCwAAAg-Wu3uoYfd39ZZDvBkc179"
@tinkerbotfoo
tinkerbotfoo / pandas_dbms.py
Last active December 22, 2015 00:39 — forked from brandonwillard/pandas_dbms.py
PYTHON PANDAS - Work with Database script - postgres, mysql, oracle, sqllite3
"""
example use of pandas with oracle mysql postgresql sqlite
lightly tested.
to do:
save/restore index (how to check table existence? just do select count(*)?),
finish odbc,
add booleans?,
sql_server?
"""
@tinkerbotfoo
tinkerbotfoo / 0_ubuntu_install_dropbbox.sh
Last active December 21, 2015 22:18
Install & configure Dropbox on Ubuntu 12.04 precise
mkdir ~/installs
cd ~/installs
wget -O dropbox.tar.gz "http://www.dropbox.com/download/?plat=lnx.x86_64"
tar -xvzf dropbox.tar.gz
mv .dropbox-dist ~/.dropbox-dist
~/.dropbox-dist/dropboxd
#Go to the URL provided by the above command.
#It will ask for your dropbox username and password to authorize the newly install dropbox client on the ubuntu server.
@tinkerbotfoo
tinkerbotfoo / ipython-notebook.conf
Created August 27, 2013 01:27
ipython upstart script - Ubuntu 12.04 Precise. Put this file in the /etc/init folder to start ipython upon system booting
# IPython Notebook Launcher
# Adopted from the Rstudio upstart script
#
#
# upstart docs: http://upstart.ubuntu.com/getting-started.html
# http://manpages.ubuntu.com/manpages/karmic/man5/init.5.html
#
# (note that embedding a script and pre-start and post-start actions are supported)
#