Add the following line to .vimrc:
:color desert
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <ead audience="external" xmlns="urn:isbn:1-931666-22-9" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:isbn:1-931666-22-9 http://www.loc.gov/ead/ead.xsd"> | |
| <eadheader countryencoding="iso3166-1" dateencoding="iso8601" findaidstatus="unverified-full-draft" langencoding="iso639-2b" repositoryencoding="iso15511" scriptencoding="iso15924"> | |
| <eadid countrycode="NL" mainagencycode="NL-AhGldA">0416</eadid> | |
| <filedesc> | |
| <titlestmt> | |
| <titleproper>Havezate Mensinck</titleproper> | |
| <author>Rijksarchief in Gelderland</author> | |
| </titlestmt> | |
| <publicationstmt> |
This file contains hidden or 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
| # Combines several solutions found on the internet | |
| class ImplicitFTP_TLS(ftplib.FTP_TLS): | |
| """FTP_TLS subclass to support implicit FTPS.""" | |
| """Constructor takes a boolean parameter ignore_PASV_host whether o ignore the hostname""" | |
| """in the PASV response, and use the hostname from the session instead""" | |
| def __init__(self, *args, **kwargs): | |
| self.ignore_PASV_host = kwargs.get('ignore_PASV_host') == True | |
| super().__init__(*args, {k: v for k, v in kwargs.items() if not k == 'ignore_PASV_host'}) | |
| self._sock = None |
This file contains hidden or 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
| Cell 1: | |
| !conda install -y graphviz | |
| Cell 2: | |
| %load_ext graphviz | |
| Cell 3 (example use): |
This file contains hidden or 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
| import pyproj | |
| def RD_to_wgs(x, y): | |
| rd_projection = pyproj.Proj("+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.237,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812 +units=m +no_defs") | |
| wgs84_projection = pyproj.Proj(proj='latlong',datum='WGS84') | |
| lat, lon, _ = pyproj.transform(rd_projection, wgs84_projection, x, y, 0.0) | |
| return [lat, lon] |
This file contains hidden or 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
| import keras | |
| keras.utils.generic_utils.get_custom_objects().update({'swish': keras.layers.Activation(lambda x: keras.backend.sigmoid(x) * x)}) |
This file contains hidden or 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 | |
| # For Fedora/Centos/RHEL | |
| # Install go, add to path, install gophernotes | |
| GO_VERSION = 1.9.3 | |
| cd ~ | |
| wget https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz | |
| tar -xvzf go${GO_VERSION}.linux-amd64.tar.gz | |
| sudo mv go /usr/local/ |
This file contains hidden or 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 | |
| iptables -F | |
| iptables -X | |
| iptables -t nat -F | |
| iptables -t nat -X | |
| iptables -t mangle -F | |
| iptables -t mangle -X | |
| iptables -t raw -F | |
| iptables -t raw -X | |
| iptables -P INPUT ACCEPT |
This file contains hidden or 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 | |
| # Script to backup a folder to a Blu-ray medium | |
| # 1) Change /dev/sr1 (if /dev/sr1 is not [the device name of] your bluray burning device) | |
| # 2) Change ~/folder_to_backup into you choice of folder to backup (be aware of BR capacity, typically max 25 GiB) | |
| # 3) Prior to running the script, installation of 'xorriso' is required and probably available in your distro packages | |
| # Credit goes to Thomas Schmitt for providing a helpful explanation of xorriso. |
This file contains hidden or 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
| import sympy as sp | |
| def Mtrix(matrix_def): | |
| ''' | |
| Constructs a Sympy Matrix from the string matrix_def that has a Matlab-like syntax: | |
| E.g.: Mtrix("a b c; d e f; g h i") creates a 3x3 matrix where [a b c], [d e f], [g h i] are the rows. | |
| Example: Mtrix("0 1/2 7; 3 -4 8; 17/3 4 87") | |