This is a plugin meant for Jekyll.
Example use:
Easily embed a YouTube video. Just drop this file in your _plugins
directory.
{% youtube oHg5SJYRHA0 %}
# Using a lambda function | |
print(list(map(lambda i: "Fizz"*(i%3==0)+"Buzz"*(i%5==0) or str(i), range(1,101)))) | |
# Using a for loop | |
for i in range(1, 101): print("Fizz"*(i%3==0)+"Buzz"*(i%5==0) or str(i)) |
This is a plugin meant for Jekyll.
Example use:
Easily embed a YouTube video. Just drop this file in your _plugins
directory.
{% youtube oHg5SJYRHA0 %}
# | |
# See how to use this script and what type of input to use at: | |
# https://steemit.com/trading/@jwyles/ema-ema-and-dema-how-to-calculate-using-python-and-spreadsheets | |
# | |
# This gist is an extension of this other gist: | |
# https://gist.github.com/jtwyles/517becb2deebf9e3b2874d8c26c4c99f | |
# | |
import csv | |
import re |
# 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. | |
# |
#!/bin/bash | |
set -euo pipefail | |
RELEASE="teleport-v4.2.3-linux-amd64-bin.tar.gz" | |
if [[ $EUID -ne 0 ]]; then | |
echo "--> Please run this script as root or sudo." | |
exit 1 | |
fi |
import urllib | |
import tarfile | |
import shutil | |
import console | |
import os | |
class Installer(object): | |
name = None | |
version = None | |
firstLetter = None |
# See blog post at http://vitobotta.com/sinatra-contact-form-jekyll/ | |
%w(rubygems sinatra liquid active_support/secure_random resolv open-uri pony haml).each{ |g| require g } | |
APP_ROOT = File.join(File.dirname(__FILE__), '..') | |
set :root, APP_ROOT | |
set :views, File.join(APP_ROOT, "_layouts") | |
not_found do |
""" | |
Basic client for Pythonista Script Index (https://github.com/ywangd/Pythonista-Script-Index) | |
See also: https://github.com/ywangd/psiclient | |
""" | |
import platform | |
import sys | |
import os | |
import urllib2 | |
import json |
# Example for sending an email with an attached image using smtplib | |
# | |
# IMPORTANT: You need to enter your email login in the main() function. | |
# The example is prepared for GMail, but other providers | |
# should be possible by changing the mail server. | |
import smtplib | |
from email.mime.base import MIMEBase | |
from email.mime.multipart import MIMEMultipart | |
from email import encoders |