Skip to content

Instantly share code, notes, and snippets.

View frankV's full-sized avatar
🦑
Work Hard. Cuttlesoft.

Frank Valcarcel frankV

🦑
Work Hard. Cuttlesoft.
View GitHub Profile
@frankV
frankV / HTML
Last active August 6, 2019 22:10
PyColorado - 1 Month Newsletter
<h1>One Month and Counting!</h1>
<p>We're just a few short weeks from the inaugural PyColorado - a celebration of community, code, and the beauty of the American West.</p>
<p>PyColorado is September 6, 7, and 8 in Denver, CO at <a href="https://www.google.com/maps/place/The+Studio+Loft+at+Ellie+Caulkins+Opera+House">The Studio Loft</a></p>
<p><span>🎟 <a href="https://ti.to/pycolorado/pycolorado-2019">Tickets still available - we'd love to see you there.</a> 🎟</span></p>
<h2>2 Workshops Available</h2>
<p><span><span>In addition to our 2 days of conference talks, we have 2 workshops scheduled for Friday.  This is an opportunity to get hands-on attention and dive a little deeper with two excellent Python developers. These workshops are <strong>sold separately</strong> from the main conference, so make sure to grab a ticket if you want to attend.</span></span></p>
<ol>
<li><span><a href="https://ti.to/pycolorado/pycolorado-2019/with/lxkvhwrpxmc">Full Stack Data Science: Building Your First Smart Application</a><
@frankV
frankV / JuniorBackendPython.py
Created February 20, 2017 00:36
Junior Backend Python Interview Questions
def extendList(val, list=[]):
list.append(val)
return list
list1 = extendList(10)
list2 = extendList(123,[])
list3 = extendList('a')
print "list1 = %s" % list1
print "list2 = %s" % list2
@frankV
frankV / app.py
Last active February 14, 2019 07:10 — forked from mmautner/app.py
Example of caching API results w/ Flask-Restless and Flask-Cache
import json
import hashlib
from flask import Flask, request
import flask.ext.sqlalchemy
import flask.ext.cache
import flask.ext.restless
from flask.ext.restless import ProcessingException
app = Flask(__name__)
app.config['DEBUG'] = True
@frankV
frankV / methods.py
Created February 6, 2016 15:55
python method tutorial for HackFSU
def greeting():
print 'hello'
userInput = raw_input('> ')
print userInput
if userInput == 'foo':
foo()
elif userInput == 'bar':
bar()
@frankV
frankV / .dockerignore
Created December 22, 2015 06:06
Dockerfile for an Ionic Framework Project
Dockerfile
config.xml
.sass-cache
.editorconfig
.io-config.json
.dockerignore
hooks/
platforms/
node_modules/
$cordovaOauth.twitter(appConfig.TW_CLIENT_ID, appConfig.TW_SECRET).then(function(result) {
// $localStorage.twitterToken = result.access_token;
console.log(result);
$location.path("/profile");
}, function(error) {
alert("There was a problem signing in! See the console for logs");
console.log(error);
});
@frankV
frankV / gist:17beb6ef1aab48429197
Created May 1, 2015 15:56
flask.upstart.conf
description "flask example"
author "admin@example.com"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
script
cd /<your-application-path>/
@frankV
frankV / gist:85b0e40ecb86f000a540
Last active August 29, 2015 14:18
a collection of Flask app examples from the #TeachMeFlask Open Workspace at Pycon 2015

A list of Python Flask example project repositories

  1. mattupstate/overholt

Example Flask application illustrating some of [Matt's] common practices blog post

  1. frankV/manekineko

Manekineko is a Flask template/bootstrap/boilerplate application.

  1. miguelgrinberg/microblog

A microblogging web application written in Python and Flask that [Miguel] developed as part of [his] Flask Mega-Tutorial series.blog post

from flask import Flask, render_template, jsonify, request
from threading import Timer, Thread
from time import sleep
app = Flask(__name__)
@app.route("/api/<method>")
def api(method):
data = {