Skip to content

Instantly share code, notes, and snippets.

@ColeMundus
ColeMundus / output.txt
Last active December 30, 2021 04:44
Scrape question prompts from https://www.storyworth.com/questions.
Are you a regular at any of your local restaurants or cafes? What is that relationship like?
Why did you decide to get a graduate degree?
Which people have had the biggest influence on your life? What lessons did you learn?
Which fads did you embrace while growing up?
What simple pleasures of life do you truly enjoy?
What are some good and bad choices you've made with respect to your health?
What early memories do you have of your sibling(s)?
If you could have dinner with anyone in the world, living or dead, who would it be?
Did you have any ongoing disagreements with your sibling as a child? What were they?
Do you have a go-to board game?
import subprocess, argparse, time, os, math
from datetime import date, datetime
from mcrcon import MCRcon
parser = argparse.ArgumentParser()
parser.add_argument('--target', help='Path to target backup directory', required=True)
parser.add_argument('--server', help='Server IP address', required=True)
parser.add_argument('--port', help='Server port', default=25575, required=False)
parser.add_argument('--password', help='Server rcon password', required=True)
parser.add_argument('--output', help='Path to backups output directory', required=True)
import subprocess, argparse, time, os, math
from datetime import date, datetime
from mcrcon import MCRcon
parser = argparse.ArgumentParser()
parser.add_argument('--target', help='Path to target backup directory', required=True)
parser.add_argument('--server', help='Server IP address', required=True)
parser.add_argument('--password', help='Server rcon password', required=True)
parser.add_argument('--output', help='Path to backups output directory', required=True)
parser.add_argument('--command_logging', help='Flag to control command logging', default=True)
worlds["Survival"] = "1.15.2/world"
#worlds["Creative"] = "1.15.2-Creative/world"
renders["Survival - Overworld Day"] = {
"world": "Survival",
"title": "Survival - Overworld Day",
"rendermode": smooth_lighting
}
renders["Survival - Overwold Rot"] = {
"world": "Survival",
curl -X POST -H "Content-Type: application/json" \
-H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \
https://automl.googleapis.com/v1beta1/projects/905505838894/locations/us-central1/models/ICN618229000019378176:predict \
-d @request.json
0011111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000000000000000000011000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111001111111111111111010000000000000000000000000000000000000000000000000000000000000000000000000000000001110000000000000000000000000000000000000000100100000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000001001000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000000000000000000000110000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000101000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000001
@ColeMundus
ColeMundus / app.py
Last active July 22, 2018 23:20
Acme remote DNS api thingy
from flask import Flask, request, abort, g
from functools import wraps
from uuid import uuid4
import json
import db
app = Flask(__name__)
def require_appkey(view_function):
@wraps(view_function)
@ColeMundus
ColeMundus / app.py
Created July 19, 2018 06:17
Acme remote DNS api thingy
from flask import Flask, request, abort, g
from functools import wraps
from uuid import uuid4
import json
import db
app = Flask(__name__)
def require_appkey(view_function):
@wraps(view_function)
@ColeMundus
ColeMundus / .shit
Last active November 19, 2017 18:25
ids = requests.get('https://api.pushshift.io/reddit/submission/comment_ids/' + postID).json()['data']
c = []
for x in chunks(ids, 500):
c += requests.get('https://api.pushshift.io/reddit/search/comment/?ids=' + ','.join(x)).json()['data']
import requests
from pprint import pprint
postID = '7dn55x'
c=requests.get('https://api.pushshift.io/reddit/search/comment/?ids=' + ','.join(requests.get('https://api.pushshift.io/reddit/submission/comment_ids/' + postID).json()['data'])).json()['data']
post = {'post':[]}
for b in c:
if b['parent_id'][3:] == postID:
post['post'].append(b['id'])
for i, b in enumerate(post['post']):
temp = {b:[]}