Skip to content

Instantly share code, notes, and snippets.

View abelsonlive's full-sized avatar
🕳️
[ o o ]

Brian Abelson abelsonlive

🕳️
[ o o ]
View GitHub Profile
@abelsonlive
abelsonlive / dot-cat.sh
Last active May 11, 2018 08:03
dot-cat.sh
#!/bin/sh
curl http://cat.www.$1.com.meowbify.com/ > index.html
s3cmd put index.html s3://$1.cat/
1 50 Diamond St. Brooklyn NY
2 442 George Road, New York, NY
@abelsonlive
abelsonlive / cachelib.py
Last active August 29, 2015 14:13
Abstract Cache With Class
import hashlib
import s3plz
import os
import requests
class Cache(object):
"""
An Abstract class for caching
urls.
"""
@abelsonlive
abelsonlive / wait_browser.py
Last active June 18, 2019 16:12
Waiting For responses in selenium
from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
class WaitBrowser(object):
def __init__(self, **kw):
self.browser = webdriver.PhantomJS()
def readystate_complete(self):
from suds.xsd.doctor import ImportDoctor, Import
from suds.client import Client
def connect_to_soap_service():
url = 'https://cgmix.uscg.mil/xml/PSIXData.asmx?WSDL'
imp = Import('http://www.w3.org/2001/XMLSchema', location='http://www.w3.org/2001/XMLSchema.xsd')
imp.filter.add('http://cgmix.uscg.mil')
doctor = ImportDoctor(imp)
return Client(url, doctor=doctor)
@abelsonlive
abelsonlive / demands.py
Created September 16, 2014 21:38
decorator for catching uncaught request errors.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from functools import wraps
import requests
from requests import Session, ConnectionError
from requests.exceptions import MissingSchema
from requests.packages.urllib3.exceptions import ProtocolError, LocationParseError
from socket import error as SocketError
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from functools import wraps
import requests
from requests import Session, ConnectionError
from requests.exceptions import MissingSchema
from requests.packages.urllib3.exceptions import ProtocolError, LocationParseError
from socket import error as SocketError

Performance of Flask, Tornado, GEvent, and their combinations

Wensheng Wang, 10/1/11

Source: http://blog.wensheng.org/2011/10/performance-of-flask-tornado-gevent-and.html

When choosing a web framework, I pretty much have eyes set on Tornado. But I heard good things about Flask and Gevent. So I tested the performance of each and combinations of the three. I chose something just a little more advanced than a "Hello World" program to write - one that use templates. Here are the codes:

1, Pure Flask (pure_flask.py)

Thanks for stopping on our website and dropping your request. I am <name>, your point of contact to help turn your idea to a Mobile App.
I would like to share that our team has develop a Demo app that is a combination of Yo/SnapChat in iOS 8 to test the features/functionality. Following is the video for reference: https://www.dropbox.com/s/fowvyi8a48ur0cz/YoME.MOV
As I see that you would like to develop an app that is similar to Yo! with some additional feature, to provide you a ball-park an app similar to Yo! would roughly cost between $3500 - $5000 USD for iPhone and it would take approx 4 - 6 weeks.
Above estimation includes.
-- Development of UI/UX design for iOS app
-- Development of iOS application.
@abelsonlive
abelsonlive / srccon-word-counts.json
Created July 31, 2014 17:32
Word counts from SRCCON transcripts.
[
{
"word": "people",
"count": 999
},
{
"word": "data",
"count": 749
},
{