The shortest connect:
from psycopg2 import connect
psql_conn = connect("dbname=XXX user=XXX password=XXX host=localhost sslmode=require")
psql_conn.close()
| export PS1="\[\e[1;34m\]\W\[\e[m\] \\$ " |
| #!/bin/bash | |
| # | |
| # Adds a jupyter kernel for a virtualenv | |
| # This makes the virtualenv available for use in a Jupyter notebook | |
| # Run this from the directory containing your virtualenv directory and | |
| # pass it the directory name for your virtualenv. | |
| # | |
| # Usage: | |
| # $ ./add_jupyter_kernel.sh myvenv | |
| # |
| saved_model_cli show --dir /path/to/saved/model/1521687978/ --all |
| word_df.to_csv("words.tsv", sep="\t", header=False, index=False, quoting=csv.QUOTE_NONE, quotechar="", escapechar="\\") | |
| vec_df.to_csv("vectors.tsv", sep="\t", header=False, index=False, quoting=csv.QUOTE_NONE, quotechar="", escapechar="\\") |
| import pandas as pd | |
| import pandas.io.sql as pdsql | |
| import psycopg2 | |
| # Database connection details | |
| creds = { | |
| "dbname": "mydb", | |
| "user": "jsmith", | |
| "password": "hello1234", |
| """Do not let the zen slip through your fingers.""" | |
| import this | |
| zen = "".join([this.d[x] if x.isalnum() else x for x in this.s]) |
| CUDA_LAUNCH_BLOCKING=1 | |
| CUDA_VISIBLE_DEVICES=0,1,2,3 |
| sudo apt install dconf-editor | |
| dconf-editor | |
| # Go to org > gnome > nautilus > preferences and check always-use-location-entry |
This is a collection of notes on how I’ve been approaching CNNs for pansharpening. It’s an edited version of an e-mail to a friend, who had asked about this tweet, and so it’s informal and somewhat silly; it is not as polished as, say, a blog post would be. Basically, what I’ve written up here is the advice I would give to an enthusiastic image processing hobbyist before they started working on pansharpening.
If you want a more serious brief review of the problem, try the first two pages of Learning deep multiresolution representations for pansharpening – most of the work I would recommend is mentioned there.
If you spot an error in the physics or math here, please mention it, but if you see a simplification or minor abuse of terminology, it’s on purpose; for textbook rigor, please refer to a textbook. The focus here is