- Make a folder for the app
- Put app.py in the folder
- Make a static folder and put index.html in it
- Should look like:
lamp/
app.py
static/
index.html
/** | |
* Created by mack0242 on 6/04/17. | |
*/ | |
var TrieNode = function (parent, value) { | |
this.parent = parent; | |
this.children = new Array(26); | |
this.isWord = false; | |
if (parent !== undefined) { | |
parent.children[value.charCodeAt(0) - 97] = this; | |
} |
import re | |
import praw | |
import prawcore.exceptions | |
from collections import defaultdict | |
from itertools import product | |
from tqdm import tqdm | |
from pymongo import MongoClient | |
client = praw.Reddit(client_id='client id', client_secret='client secret', user_agent='gender scraper') | |
subs = 'askmen','askwomen' |
#!/usr/bin/env python | |
import curses | |
import subprocess | |
import sys | |
from datetime import datetime | |
AUTHOR = "Jonathan Mackenzie" | |
NAME = "pqstat" | |
def get_qstat(args): | |
return subprocess.Popen(['qstat']+args,stdout=subprocess.PIPE).communicate()[0] | |
def main(scr): |
#!/usr/bin/env python | |
""" | |
pip install -U pygame numpy tensorflow keras opencv-python | |
""" | |
from datetime import datetime | |
import pygame | |
import os | |
import sys | |
import cv2 |
from pydotplus import graphviz as pydot | |
class TrieNode: | |
__slots__ = ('text', 'children', 'is_end') | |
def __init__(self, letter, is_end=False): | |
self.text = letter | |
self.children = {} | |
self.is_end = is_end |
Rows: 11, cols=1 44 Bytes | |
CL Took: 0:00:00.003606 | |
NP Took: 0:00:00.000021 | |
Rows: 10, cols=3 120 Bytes | |
CL Took: 0:00:00.000312 | |
NP Took: 0:00:00.000012 | |
Rows: 10000, cols=1000 40.0 MB | |
CL Took: 0:00:00.005533 | |
NP Took: 0:00:00.017710 | |
Rows: 50000, cols=1200 240.0 MB |
__kernel void shuffle_data( | |
const __global float* data, // array to be shuffled | |
const __global uint2* swaps // array of swaps to perform | |
) { | |
const int gid = get_global_id(0); | |
const int field = get_global_id(1); | |
const int num_fields = get_global_size(1); | |
// swap row r1 with r2 from swaps[gid] | |
uint2 swap = swaps[gid]; | |
const int r1 = num_fields* swap.x + field; |
#!/usr/bin/env python | |
import os | |
import json | |
import time | |
import pandas as pd | |
import requests | |
from mlxtend.preprocessing import TransactionEncoder | |
from mlxtend.frequent_patterns import apriori | |
lamp/
app.py
static/
index.html