This file contains 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
#! /bin/bash | |
# License: MIT; https://opensource.org/licenses/MIT | |
# Version: 0.0.1 | |
# Maintainer: https://gist.github.com/liquidgenius | |
# Given a script main.py on an ubuntu machine in /home/ubuntu/app/src directory with the interpreter | |
# in /home/ubuntu/app/.venv directory in project. This script, run.sh, would be placed in the | |
# /home/ubuntu/app directory. |
This file contains 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
#! /bin/bash | |
# License: MIT; https://opensource.org/licenses/MIT | |
# Version: 0.0.1 | |
# Maintainer: https://gist.github.com/liquidgenius | |
#******************************************************************************* | |
# Pycharmer; A Pycharm Python project creator | |
#******************************************************************************* |
This file contains 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
#! /bin/bash | |
# License: MIT; https://opensource.org/licenses/MIT | |
# Version: 0.0.1 | |
# Maintainer: https://gist.github.com/liquidgenius | |
# Gist: https://gist.github.com/liquidgenius/56167cfedc7270752d207377cf618fcf | |
#******************************************************************************* | |
# Masonite 3 Project Scaffolding |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
__license__ = "MIT" | |
__version__ = "0.1" | |
__py_version__ = "3.8.7" | |
__status__ = "Development" | |
import json | |
from pathlib import Path | |
from time import sleep |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# https://orm.masoniteproject.com/ | |
# app.helpers.columns.py | |
from config.database import DB | |
from masoniteorm.collection import Collection | |
def columns(model): |
This file contains 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
# Ensure we have the latest pip and pipenv | |
pip3 install --upgrade pip pipenv | |
# Setup new Python 3.8 project | |
pipenv --python 3.8 | |
# Install aws-lambda-powertools | |
pipenv install boto3 aws-lambda-powertools | |
# Install dev dependencies | |
pipenv install black pytest --dev --pre |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from random import choice | |
import httpx | |
import fake_useragent | |
def Proxymesh(url, proxy_choices=None, headers=None, country='US'): |
This file contains 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 dataclasses import dataclass, fields as datafields | |
from ujson import dumps, loads | |
# Note: ujson seamlessly serializes dataclasses, unlike stdlib's json | |
@dataclass | |
class Point: | |
x: float | |
y: float | |
# Shallow dataclass can be rebuilt from dict/json: |
This file contains 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
""" | |
* requires usaddress https://github.com/datamade/usaddress | |
* check out the website! https://parserator.datamade.us/usaddress | |
The usaddress package is pretty great for normalizing inconsistent address data, | |
especially when if you have a lot to process and can't rely on using a geocoding api. | |
The results are really granular, probably moreso than you'll need, and definitely | |
more than most CRM systems if integrating these addresses is your goal. | |
This is just a simple wrapper around the usaddress.tag() function that I feel will |
This file contains 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
-- Function: makegrid_epsg3857(text, text, text, numeric) | |
-- DROP FUNCTION makegrid_epsg3857(text, text, text, numeric); | |
CREATE OR REPLACE FUNCTION makegrid_epsg3857(schemaname text, boundingbox text, gridtable text, halfwidth numeric) | |
RETURNS text AS | |
$BODY$ | |
DECLARE | |
tbl_cnt int; | |
XMIN numeric; |
NewerOlder