A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
# File Transfer for Pythonista | |
# ============================ | |
# This script allows you to transfer Python files from | |
# and to Pythonista via local Wifi. | |
# It starts a basic HTTP server that you can access | |
# as a web page from your browser. | |
# When you upload a file that already exists, it is | |
# renamed automatically. | |
# From Pythonista's settings, you can add this script | |
# to the actions menu of the editor for quick access. |
import os, cmd, sys, re, glob, os.path, shutil, zipfile, tarfile, gzip | |
# Credits | |
# | |
# The python code here was written by pudquick@github | |
# | |
# License | |
# | |
# This code is released under a standard MIT license. | |
# |
import clipboard | |
import console | |
import requests | |
import json | |
import keychain | |
import webbrowser | |
from datetime import datetime | |
argument_index = 1 |
import urllib2, urlparse, sys, webbrowser | |
itags = {'45': 'webm_720p', | |
'44': 'webm_480p', | |
'43': 'webm_360p', | |
'38': 'mp4_3072p', | |
'37': 'mp4_1080p', | |
'36': 'phone_mp4_240p', | |
'35': 'flv_480p', | |
'34': 'flv_360p', |
########################################### | |
# IMPORTANT NOTE: | |
# | |
# As of asuswrt-merlin 380.67 Beta, you | |
# can now configure SSL certificates from | |
# the Webui, making these instructions | |
# unnecessary. | |
########################################### | |
<div class="check-container"><span id="check"></span></div> | |
{{#Question}} | |
<p>{{Question}}</p> | |
{{/Question}} | |
{{#Image}} | |
<p class="image">{{Image}}</p> | |
{{/Image}} |
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
# Markdown to PDF Conversion | |
# | |
# This script converts Markdown markup to PDF directly on your iOS device. | |
# | |
# Please see the "Requirements" section in the docstring below for required | |
# dependencies and the "Installation" section for instructions on how to | |
# install them. | |
# | |
# Run this script directly or put it into the Pythonista editor action menu | |
# with one of the following options as the first and sole argument: |
# Link: http://www.reddit.com/r/PowerShell/comments/1khn9o/a_fun_script_for_friday_make_your_friends/ | |
# A fun script for Friday - make your friend's computer start talking to him/her (self.PowerShell) | |
# submitted 1 year ago * by Sinisterly | |
# A co-worker of mine stumbled upon this nifty blog article on how to make a text-to-speech call using PowerShell. | |
# The article gives two examples: | |
# - Call the SAPI.SPVoice COM object | |
# - Load the reference to System.Speech | |
# Where can this come in fun? Well, if you throw PSRemoting in, of course! In my testing, if you use the second method (or the pared down script below) you can make your victim's computer start talking to him or her. Here's how you do it: | |
# 1. Provide a distraction so that your victim leaves their computer unlocked, and make yourself administrator on their workstation (only needed if you aren't already an admin!) | |
# 2. Enable PSRemoting on their workstation. A method for doing this would be using PSExec: |