I hereby claim:
- I am isccarrasco on github.
- I am isccarrasco (https://keybase.io/isccarrasco) on keybase.
- I have a public key ASDnry8snDgvMSlrqP8-TgRFhlS_mzkx2_dknPedO-_cdAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Ansible playbook to setup HTTPS using Let's encrypt on nginx. | |
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS. | |
The server pass A rating on [SSL Labs](https://www.ssllabs.com/). | |
To use: | |
1. Install [Ansible](https://www.ansible.com/) | |
2. Setup an Ubuntu 16.04 server accessible over ssh | |
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain | |
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder) |
import sqlalchemy | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import Column, Integer, String, ForeignKey | |
from sqlalchemy.orm import sessionmaker, relationship, backref | |
from sqlalchemy.ext.associationproxy import association_proxy | |
import uuid | |
engine = sqlalchemy.create_engine('sqlite:///:memory:') | |
Base = declarative_base() | |
from flask import Flask | |
from flask_sqlalchemy import SQLAlchemy | |
def create_app(config: str=None): | |
app = Flask(__name__, instance_relative_config=True) | |
if config is None: | |
app.config.from_pyfile('dev.py') | |
else: | |
logger.debug('Using %s as configuration', config) | |
app.config.from_pyfile(config) |
# To install the plugin manager, run this: | |
# Neovim (~/.local/share/nvim/site/autoload) | |
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \ | |
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
# Then configure the init.vim file | |
:set number | |
:set relativenumber | |
:set autoindent |
import geopandas as gpd | |
df = gpd.read_file('municipalities.shp') | |
df["adjacents"] = None | |
for index, municipality in df.iterrows(): | |
# get 'not disjoint' countries | |
# CVE_ENT is the ID of the Municipality | |
adjacents = df[~df.geometry.disjoint(municipality.geometry)].CVE_ENT.tolist() |
Download SchemaSpy jar http://schemaspy.sourceforge.net/
Download PostgreSQL JDBC Driver https://jdbc.postgresql.org/download.html
Install the GraphViz library brew install graphviz
Run the command
select * from ( | |
SELECT id, | |
ROW_NUMBER() OVER(PARTITION BY merchant_Id, url ORDER BY id asc) AS Row | |
FROM Photos | |
) dups | |
where | |
dups.Row > 1 |