Skip to content

Instantly share code, notes, and snippets.

@sertdfyguhi
sertdfyguhi / fizzbuzz.py
Created June 5, 2021 05:34
fizzbuzz.py
import base64 as dEHJWhoidsuSA;exec(eval("dEHJWhoidsuSA.b64decode('ZGVmIGRXc2Fq^25uTkRT^HVrKCk6cmV0dXJuIGdldGF0dHIoX19idWlsdGluc19fLCAnZXhlYycp'.replace(chr(94),eval(\"exec('chr(83)')\".replace('xec','val'))).encode('ascii'))").decode('ascii'));dWsajKnnNDSHuk()(''.join([chr(int(hgDWQjsah)) for hgDWQjsah in '83*@#%6@%#!&86*@#%6@%#!&81*@#%6@%#!&74*@#%6@%#!&97*@#%6@%#!&115*@#%6@%#!&103*@#%6@%#!&117*@#%6@%#!&83*@#%6@%#!&65*@#%6@%#!&86*@#%6@%#!&103*@#%6@%#!&97*@#%6@%#!&115*@#%6@%#!&83*@#%6@%#!&74*@#%6@%#!&65*@#%6@%#!&61*@#%6@%#!&39*@#%6@%#!&53*@#%6@%#!&48*@#%6@%#!&49*@#%6@%#!&38*@#%6@%#!&38*@#%6@%#!&35*@#%6@%#!&35*@#%6@%#!&64*@#%6@%#!&64*@#%6@%#!&53*@#%6@%#!&49*@#%6@%#!&49*@#%6@%#!&38*@#%6@%#!&38*@#%6@%#!&35*@#%6@%#!&35*@#%6@%#!&64*@#%6@%#!&64*@#%6@%#!&55*@#%6@%#!&57*@#%6@%#!&38*@#%6@%#!&38*@#%6@%#!&35*@#%6@%#!&35*@#%6@%#!&64*@#%6@%#!&64*@#%6@%#!&53*@#%6@%#!&48*@#%6@%#!&49*@#%6@%#!&38*@#%6@%#!&38*@#%6@%#!&35*@#%6@%#!&35*@#%6@%#!&64*@#%6@%#!&64*@#%6@%#!&52*@#%6@%#!&55*@#%6@%#!&38*@#%6@%#!&38*@#%6@%#!&35*@#%6@%#!&35
@sertdfyguhi
sertdfyguhi / camelCase.py
Created March 10, 2021 13:43
programToCamelCaseAPieceOfText
path = input('File path: ')
with open(path, 'r') as f:
contents = f.read()
contents_list = contents.split(' ')
for index, word in enumerate(contents_list):
if index == 0:
contents_list[index] = word.lower()
continue
@sertdfyguhi
sertdfyguhi / connect4.py
Last active February 18, 2021 10:24
connect4 in python (bad code)
board = [[0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0]]
turn = 1
temp = False
def ask():
@sertdfyguhi
sertdfyguhi / News.js
Created December 13, 2020 07:46
News scriptable widget
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-brown; icon-glyph: newspaper;
// Get a apiKey from newsapi.org and paste it in to apiKey variable
// You can also change the country by changing the country variable
let widget = new ListWidget()
let apiKey = "INSERT APIKEY HERE"
let country = "INSERT COUNTRY HERE"
let url = "http://newsapi.org/v2/top-headlines?country=" + country + "&apiKey=" + apiKey
let req = new Request(url)
@sertdfyguhi
sertdfyguhi / earth.js
Created November 11, 2020 10:42
Scriptable widget that gets images r/earthporn
let list = new ListWidget()
let req = new Request("https://reddit.com/r/earthporn/random.json")
let res = await req.loadJSON()
list.backgroundImage = await getImage()
list.url = res[0].data.children[0].data.url_overridden_by_dest
list.presentMedium()
Script.setWidget(list)
Script.complete()
async function getImage() {
@sertdfyguhi
sertdfyguhi / japan.js
Created November 11, 2020 10:41
Scriptable widget that gets images from r/japanpics
let list = new ListWidget()
let req = new Request("https://reddit.com/r/japanpics/random.json")
let res = await req.loadJSON()
list.backgroundImage = await getImage()
list.url = res[0].data.children[0].data.url_overridden_by_dest
list.presentMedium()
Script.setWidget(list)
Script.complete()
async function getImage() {
@sertdfyguhi
sertdfyguhi / shibes.js
Last active April 21, 2023 16:32
Scriptable app widget to get shibas from shine.online
let widget = new ListWidget()
let req = new Request("https://shibe.online/api/shibes")
let res = await req.loadJSON()
let imgreq = new Request(res[0])
let img = await imgreq.loadImage()
widget.addText("Shibes in their natural habitat.").centerAlignText()
widget.addImage(img).centerAlignImage()
widget.presentLarge()
@sertdfyguhi
sertdfyguhi / neko.js
Created November 10, 2020 12:04
Scriptable app script to get neko from nekos.life
let widget = new ListWidget()
let req = new Request("https://nekos.life/api/v2/img/neko")
let json = await req.loadJSON()
let imgreq = new Request(json.url)
let img = await imgreq.loadImage()
widget.addImage(img).centerAlignImage()
widget.presentLarge()