Skip to content

Instantly share code, notes, and snippets.

View wcmckee's full-sized avatar
💭
#lca2019

William Mckee wcmckee

💭
#lca2019
View GitHub Profile
@wcmckee
wcmckee / brum.py
Last active October 28, 2018 14:29
from flask import Flask, request, jsonify
import json
import getpass
myusr = getpass.getuser()
homepath = '/home/{}'.format(myusr)
app = Flask(__name__)
with open('{}/truckscycroad.json'.format(homepath), 'r') as r:
#print(r.read())
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route('/search')
def search():
texttosearch = request.args.get('texttosearch')
subtext = request.args.get('subtext')
somelist = dict()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<html>
<head><meta charset="utf-8" />
<title>taxtheft</title><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<style type="text/css">
/*!
*
* Twitter Bootstrap
@wcmckee
wcmckee / app.py
Created July 16, 2018 01:19
slapmeme
from flask import Flask, request #import main Flask class and request object
import requests
import shutil
import os
import getpass
from urllib.parse import urlparse
import PIL
import json
from PIL import ImageDraw, ImageFont
from PIL import Image
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from flask import Flask
from flask_restful import Api, Resource, reqparse
import requests
import getpass
import os
app = Flask(__name__)
api = Api(app)