- 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
__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; |
import pandas as pd | |
from keras import Sequential | |
from keras.layers import LSTM, Dense, Dropout, Activation | |
import numpy as np | |
from matplotlib import pyplot | |
def get_data(): | |
data = pd.read_csv('eeg_data.csv') | |
return data[data.apply(lambda x: np.abs(x - x.median()) / x.std() < 4).all(axis=1)] |
#!/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 | |
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
from PIL import Image | |
mem = {} | |
cols = {0:(0, 0, 0),1:(128, 0, 0),2:(0, 128, 0),3:(128, 128, 0),4:(0, 0, 128),5:(128, 0, 128),6:(0, 128, 128),7:(192, 192, 192),8:(128, 128, 128), | |
9:(255, 0, 0),10:(0, 255, 0),11:(255, 255, 0),12:(0, 0, 255),13:(255, 0, 255),14:(0, 255, 255),15:(255, 255, 255),216:(0, 0, 0, 0),16:(0, 0, 0), | |
17:(0, 0, 95),18:(0, 0, 135),19:(0, 0, 175),20:(0, 0, 215),21:(0, 0, 255),22:(0, 95, 0),23:(0, 95, 95),24:(0, 95, 135),25:(0, 95, 175),26:(0, 95, 215), | |
27:(0, 95, 255),28:(0, 135, 0),29:(0, 135, 95),30:(0, 135, 135),31:(0, 135, 175),32:(0, 135, 215),33:(0, 135, 255),34:(0, 175, 0),35:(0, 175, 95), | |
36:(0, 175, 135),37:(0, 175, 175),38:(0, 175, 215),39:(0, 175, 255),40:(0, 215, 0),41:(0, 215, 95),42:(0, 215, 135),43:(0, 215, 175),44:(0, 215, 215), | |
45:(0, 215, 255),46:(0, 255, 0),47:(0, 255, 95),48:(0, 255, 135),49:(0, 255, 175),50:(0, 255, 215),51:(0, 255, 255),52:(95, 0, 0),53:(95, 0, 95), |
lamp/
app.py
static/
index.html
from pyramid.authentication import AuthTktAuthenticationPolicy | |
from pyramid.authorization import ACLAuthorizationPolicy | |
from pyramid.config import Configurator | |
from pyramid.csrf import CookieCSRFStoragePolicy | |
from pyramid.security import unauthenticated_userid | |
from urllib.parse import urlparse | |
from pymongo import MongoClient | |
from flex.mongo_toolbar import MongoToolbar, DebugMongo | |
def main(global_config, **settings): |
from pyramid.config import Configurator | |
def main(global_config, **settings): | |
config = Configurator(settings=settings) | |
config.add_static_view('static', 'static', cache_max_age=3600) | |
return config.make_wsgi_app() |
#!/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): |
# Subreddit to check | |
subreddit = 'subreddit' | |
# Mod flair name | |
mod_flair = 'Developer' | |
# Credentials, subreddit management required | |
user_agent = 'UserAgent' | |
client_id = 'ClientID' | |
client_secret = 'ClientSecret' | |
username = 'Username' |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
app:layout_behavior="@string/appbar_scrolling_view_behavior" | |
tools:context="com.jonathan.obd_bt.MainActivity" | |
tools:showIn="@layout/activity_main"> |