See how a minor change to your commit message style can make a difference.
Tip
Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs
# Upsert function for pandas to_sql with postgres | |
# https://stackoverflow.com/questions/1109061/insert-on-duplicate-update-in-postgresql/8702291#8702291 | |
# https://www.postgresql.org/docs/devel/sql-insert.html#SQL-ON-CONFLICT | |
import pandas as pd | |
import sqlalchemy | |
import uuid | |
import os | |
def upsert_df(df: pd.DataFrame, table_name: str, engine: sqlalchemy.engine.Engine): |
import json | |
with open('filename.json', 'r') as f: | |
json_dict = json.load(f) | |
for key in json_dict: | |
print(key['attribute']) |
#!/bin/bash | |
SUDO='' | |
if (( $EUID != 0 )); then SUDO='sudo'; fi | |
echo "Basic auth for traefik >= v1.7" | |
read -p "User: " USER | |
read -p "Password: " PW | |
# Checks if htpasswd is available or install it otherwise |
See how a minor change to your commit message style can make a difference.
Tip
Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs
import genanki | |
my_model = genanki.Model( | |
1380120064, | |
'Example', | |
fields=[ | |
{'name': 'Object'}, | |
{'name': 'Image'}, | |
], | |
templates=[ |
Here are the steps to installing and setting up GDB on Mac OS Sierra/High Sierra.
Run brew install gdb
.
On starting gdb, you will get the following error:
Unable to find Mach task port for process-id 2133: (os/kern) failure (0x5).
(please check gdb is codesigned - see taskgated(8))
To fix this error, follow the following steps:
version: '3' | |
services: | |
nginx-proxy: | |
image: jwilder/nginx-proxy | |
labels: | |
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true" | |
container_name: nginx-proxy | |
restart: unless-stopped | |
ports: |
git describe --exact-match --tags 2> /dev/null || git rev-parse --short HEAD |
At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.
git commit --amend
This will open your $EDITOR
and let you change the message. Continue with your usual git push origin master
.
#poisson solver | |
#u_xx = b(x) | |
%matplotlib inline | |
from __future__ import division | |
import numpy as np | |
from numpy import cos, sin, zeros, pi | |
from numpy.linalg import solve, norm | |
import matplotlib.pyplot as plt | |
from matplotlib import rcParams | |