Skip to content

Instantly share code, notes, and snippets.

View shashfrankenstien's full-sized avatar
🎧
Focusing

Shashank Gopikrishna shashfrankenstien

🎧
Focusing
View GitHub Profile
@shashfrankenstien
shashfrankenstien / flask_production_monitor.py
Last active December 4, 2021 18:33
Example usage of flask_production task scheduler and monitor - https://github.com/shashfrankenstien/Flask_Production
'''
Example ussage of https://github.com/shashfrankenstien/Flask_Production
'''
from flask import Flask
from flask_production import CherryFlask, TaskScheduler
from flask_production.plugins import TaskMonitor
import time
import random
{
"workbench.colorTheme": "Monokai",
"editor.fontSize": 12,
"[python]": {},
"diffEditor.renderSideBySide": true,
"window.zoomLevel": 0,
"editor.renderWhitespace": "boundary",
"editor.renderControlCharacters": false,
"breadcrumbs.enabled": false,
"editor.insertSpaces": false,
@echo off
echo %1
set make=%~dpnx0
set EXE=AppName.exe
if [%1]==[build] goto :BUILD
if [%1]==[install] goto :INSTALL
if [%1]==[uninstall] goto :UNINSTALL
@shashfrankenstien
shashfrankenstien / startup_ascii_art.py
Created January 20, 2020 21:32
Compilation of ASCII cartoon characters
SHOWMEWHATYOUGOT=r'''
_________________________
| SHOW ME WHAT YOU GOT! |
|_________________ ______|
___ |/
. - `--,
/# =========`-_
/# (--====___====\
/# .- --. . --.|
/## | * ) ( * ),
@shashfrankenstien
shashfrankenstien / AWS_certification.md
Created January 2, 2020 16:32 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@shashfrankenstien
shashfrankenstien / pd_insert.py
Created September 17, 2019 20:16
Pandas DataFrame to MySQL using pymysql
import pymysql
import pandas as pd
HOST = ''
USER = ''
PASSWORD = ''
PORT = 3306
def insert_pandas(df, table, duplicates='update'):
conn = pymysql.connect(
host=HOST,
@shashfrankenstien
shashfrankenstien / service-checklist.md
Created December 3, 2018 21:26 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@shashfrankenstien
shashfrankenstien / trie.py
Last active October 18, 2018 04:14
Trying trie data structures
class TrieNode(object):
def __init__(self, c):
self.c = c
self.children = {}
self.suffix = 0
def add(self, child):
if not child:
self.suffix +=1
return
@shashfrankenstien
shashfrankenstien / flask_server.py
Last active December 23, 2019 04:31
Python Flask common server file to use Cherrypy server and fallback to development server
from app import app
from flask import request
from datetime import datetime as dt
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-d","--debug", help="Start on port 8080 and debug database", action="store_true")
parser.add_argument("-c","--cherry", help="Start using Cherrypy server", action="store_true")
args = parser.parse_args()
@shashfrankenstien
shashfrankenstien / arc-guage.js
Last active November 1, 2020 22:10
A simple arc style progress guage
function radians(degree) {
return (180+degree)*(Math.PI/180)
}
class ProgressArc {
constructor(parentSelector, size, title, maxVal){
this.parent = parentSelector
this.w = size *3
this.h = size *3