Skip to content

Instantly share code, notes, and snippets.

View mehditlili's full-sized avatar

Mehdi Tlili mehditlili

  • CloudNC
  • London
  • 22:44 (UTC +01:00)
View GitHub Profile
@mehditlili
mehditlili / spDYN_update.sh
Created June 7, 2019 08:09 — forked from harald-aigner/spDYN_update.sh
Script for updating spDYN dynamic DNS entries (https://spdyn.de)
#!/bin/sh
#
# Script for updating spDYN dynamic DNS entries (https://spdyn.de)
#
# Usage:
# - Save this script as $HOME/bin/spDYN_update.sh
# - Make it executable: chmod u+x $HOME/bin/spDYN_update.sh
# - Create a cron entry (crontab -e) and supply <HOST_NAME> and <UPDATE_TOKEN>
# according to your spDYN settings. Example for running every 10 minutes:
# */10 * * * * $HOME/bin/spDYN_update.sh <HOST_NAME> <UPDATE_TOKEN> > /dev/null
import cv2
import numpy as np
import matplotlib.pyplot as plt
from sklearn.neighbors import NearestNeighbors
#from scipy.optimize import leastsq
from scipy.optimize import fmin_bfgs
from scipy.optimize import minimize
from scipy.optimize import approx_fprime
def res(p,src,dst):