Skip to content

Instantly share code, notes, and snippets.

{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"color_scheme": "Packages/ayu/ayu-mirage.tmTheme",
"draw_minimap_border": true,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": false,
"font_options":
[
import requests
import math
from threading import Thread
THREAD_LIMIT = 8
PAGE_SIZE = 10
def main():
req = requests.Session()
import requests
def main():
req = requests.Session()
req.headers.update({
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36',
'Cookie': 'ASP.NET_SessionId=qelk5t3y0lcdzjdak3f1ujr5',
'Host': 'egcap.bluespringsgov.com',
'Origin': 'http://egcap.bluespringsgov.com',
a = '12.5%WW|-US CA'.split('|')
general = []
for b in a:
c = {
'type': 'include',
'ratio': 100
}

Python Flask Project Structure

Introduction

A boilerplate for REST APIs implement using python flask and pymysql. This project uses python3 and follows the (company's Python conventions)(https://github.com/anyTV/Python-conventions).

Running the application

  1. Download zip
@jvmsangkal
jvmsangkal / .jshintrc
Last active November 27, 2016 17:51
Sublime User Settings and rc files
{
"browser": true,
"jquery": true,
"node": true,
"esversion": 6,
"camelcase": true,
"eqeqeq": true,
"indent": 2,
"latedef": true,
"maxlen": 120,
@jvmsangkal
jvmsangkal / connection-pool.py
Created October 21, 2015 03:36
Connection Pool PyMySQL
class ConnectionPool():
"""
Usage:
conn_pool = nmi_mysql.ConnectionPool(config)
db = conn_pool.get_connection()
db.query('SELECT 1', [])
conn_pool.return_connection(db)
conn_pool.close()
@jvmsangkal
jvmsangkal / .vimrc
Last active October 19, 2015 08:22
Vim configuration
execute pathogen#infect('~/.vim/bundle/{}')
filetype plugin indent on
syntax on
set background=dark
colorscheme jellybeans
set ruler
set number
set mouse=a
set colorcolumn=80,100,120
@jvmsangkal
jvmsangkal / go-notes.md
Last active December 28, 2016 09:31
Go syntax notes

Go Notes

Running Go

$ go run <filename>.go

Or