Skip to content

Instantly share code, notes, and snippets.

View Kenny2github's full-sized avatar
🏫
University

AbyxDev Kenny2github

🏫
University
View GitHub Profile
@Kenny2github
Kenny2github / vortex.py
Last active June 5, 2019 13:03
Vortex Sort - swirl elements into sorted order!
def vortex_sort(arr):
"""Swirl the array into order.
Guaranteed to only use < for comparison, so use any objects you like.
"""
arlen = len(arr)
rs = []
mult = 1
last = 0
while last < arlen:
number = mult * 4
@apple502j
apple502j / cleansandbox.py
Created March 11, 2018 10:20
Clean Your Sandbox (MW bot) need kenny2github/mw-api-client
# This code is in the public domain.
import mw_api_client as mw
from getpass import getpass
API_PATH="" # API URL like https://en.wikipedia.org/w/api.php
USERAGENT="Sandbox Cleaner with mw_api_client" # User-Agent
USERNAME="" # User name
SANDBOXPATH="" # Sandbox path
DEFAULT_SANDBOX="" # Default Sandbox contents