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 requests | |
import subprocess | |
f = open("dolphin-list.txt", "r") | |
ALL_FILES = [l.strip() for l in f.readlines()] | |
SOURCE_URL = "https://dl.dolphin-emu.org/builds/" | |
len(ALL_FILES) |
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 csv | |
from StringIO import StringIO | |
def rec_getattr(obj, attr, default=None): | |
"""Get object's attribute. May use dot notation. | |
>>> class C(object): pass | |
>>> a = C() | |
>>> a.b = C() | |
>>> a.b.c = 4 |
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
#!/bin/bash | |
PERCENTAGE=0 | |
( | |
while [ $PERCENTAGE -le 100 ]; do | |
echo "$PERCENTAGE" | |
case $PERCENTAGE in | |
[1-9]) | |
;; |
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
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import Integer, Column | |
from postgresql_json import JSON | |
Base = declarative_base() | |
class Document(Base): | |
id = Column(Integer(), primary_key=True) | |
data = Column(JSON) | |
#do whatever other work |
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
from flask import Flask | |
from flask.ext.sqlalchemy import SQLAlchemy | |
from flask.ext.wtf import Form | |
from flask.ext.babel import gettext | |
from wtforms import SelectField, TelField, TextField, FormField, Fieldlist, SubmitField | |
from wtforms.validators import Optional, Required | |
app = Flask(__name__) | |
db = SQLAlchemy(app) |
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
#ifndef LINKEDLIST_H | |
#define LINKEDLIST_H | |
#include <iostream> | |
template <class T> | |
class linkedList { | |
struct node { | |
node* ptr; | |
T data; |
NewerOlder