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 random | |
GEORGI_TEXT = """ | |
GEORGI IS HERE!!!! | |
Maybe you should [C]all for help. | |
""" | |
class Scene(object): |
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
# -*- coding: utf-8 -*- | |
""" | |
markov_generator_pipeline | |
~~~~~~~~~~~~~~~~~~~~~~~~~ | |
An example markov generator that reads corpus one line at a time | |
and uses numpy for storing / drawing word likelihoods | |
Example source text: | |
http://www.gutenberg.org/cache/epub/28339/pg28339.txt |
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, jsonify | |
from flask_sqlalchemy import SQLAlchemy | |
app = Flask(__name__) | |
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://test@localhost/test' | |
db = SQLAlchemy(app) | |
db.init_app(app) | |
class User(db.Model): |
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
""" | |
Simple worker showing different worker ids sharing/incrementing the same memory region | |
uwsgi --http :9090 --wsgi-file foobar.py --master --processes 4 --threads 2 --stats 127.0.0.1:9191 --sharedarea 2 | |
Then just keep refreshing localhost:9090 | |
""" | |
import uwsgi | |
INT_ORDS = {48, 49, 50, 51, 52, 53, 54, 55, 56, 57} |
NewerOlder