This file contains hidden or 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
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() { |
This file contains hidden or 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
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() { |
This file contains hidden or 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
// 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) |
This file contains hidden or 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
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(): |
This file contains hidden or 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
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 |
This file contains hidden or 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 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 |
This file contains hidden or 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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"log" | |
"os" | |
) | |
const boardTemplate = ` |
This file contains hidden or 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 re | |
def generate(name: str): | |
return (name[0] + re.sub( | |
'[aeiou ]', | |
'', | |
name[1:-1], | |
flags=re.I | |
) + name[-1]).upper() |
This file contains hidden or 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
regex = @regex::new('[aeiouAEIOU ]') | |
generate = (name: @string) { | |
return (name[0] + regex.replace( | |
name.substr( | |
1, | |
name.length - 1 | |
), | |
'' | |
) + name[name.length - 1]).uppercase() |
This file contains hidden or 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
let DGYIShidSAAYFTIsgdvy=[];dwjkGUIYVUyagjsadgVAvftugyvi=(aksjasd){dsajDSYGAkjasd=aksjasd*(DGYIShidSAAYFTIsgdvy.length/DGYIShidSAAYFTIsgdvy.length);duhwsadda=[DGYIShidSAAYFTIsgdvy.length*DGYIShidSAAYFTIsgdvy.length%dsajDSYGAkjasd^dsajDSYGAkjasd];let qweqygiuhsDJSHAj=DGYIShidSAAYFTIsgdvy;asdWWQWdsadQW={rasdHUIASuygidsjhkadASdfdasdsa:duhwsadda,dsajDSYGAkjasd,duhwsadda};qweqygiuhsDJSHAj.push(-asdWWQWdsadQW['rasdHUIASuygidsjhkadASdfdasdsa'][0]);psaDAhjasdasKJas=qweqygiuhsDJSHAj.pop();return DGYIShidSAAYFTIsgdvy[asdWWQWdsadQW['dsajDSYGAkjasd']-(asdWWQWdsadQW['rasdHUIASuygidsjhkadASdfdasdsa'][0]+(psaDAhjasdasKJas+asdWWQWdsadQW['rasdHUIASuygidsjhkadASdfdasdsa'][0]))+asdWWQWdsadQW['rasdHUIASuygidsjhkadASdfdasdsa'][0]]};tuyTQYIWTtryutWERIuyREQIwu=(ywgDYvgtDSAGgydahkva){yyyyDYSAydyasydaydadvasHDTAV=ywgDYvgtDSAGgydahkva as@group;djkhshavygdASdaasdas=DGYIShidSAAYFTIsgdvy as@array;wewqwewWEWRWerWMhvRWEmvMRWEb=[yyyyDYSAydyasydaydadvasHDTAV as@number*ywgDYvgtDSAGgydahkva,djkhshavygdASdaasdas,ywgDYvgtDSAGgydahkva as@number,] |
OlderNewer