This file contains 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
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
" Neil's .vimrc file. | |
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
set nocompatible " NEVER change this! Use Vim mode, not vi mode. | |
filetype plugin indent on " Enable automatic settings based on file type | |
syntax on " Enable colour syntax highlighting | |
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
" Options |
This file contains 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 logging | |
import sqlparse | |
class SQLFileHandler(logging.FileHandler): | |
def emit(self, record): | |
try: | |
record.msg = sqlparse.format(record.msg, reindent=True, keyword_case='upper') | |
except Exception: | |
pass |
This file contains 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
/* | |
* Arduino library for the ATSHA204 authentication chip. | |
* | |
* The ATSHA204 is a tiny and low-power authentication chip. This library | |
* implements a simple interface to access most of the chip functionality from | |
* an Arduino. | |
* | |
* Note that only the Single-Wire Interface (SWI) is currently supported. | |
* | |
* FEATURES: |
This file contains 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
$7zInstallationFolder = 'C:\Program Files\7-Zip' | |
$reg = [Microsoft.Win32.RegistryKey]::OpenBaseKey([Microsoft.Win32.RegistryHive]::ClassesRoot, [Microsoft.Win32.RegistryView]::Default) | |
$subKeys = $reg.GetSubKeyNames() | where { $_ -match '7-Zip.' } | |
foreach ($keyName in $subKeys) { | |
$key = $reg.OpenSubKey($keyName + '\shell\open\command', $true) | |
$key.SetValue('', '"' + $7zInstallationFolder + '\7zG.exe" x "%1" -o*') | |
} |
This file contains 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
sudo apt-get remove account-plugin-aim account-plugin-facebook account-plugin-flickr account-plugin-jabber account-plugin-salut account-plugin-twitter account-plugin-windows-live account-plugin-yahoo aisleriot brltty colord deja-dup deja-dup-backend-gvfs duplicity empathy empathy-common evolution-data-server-online-accounts example-content firefox gnome-accessibility-themes gnome-contacts gnome-mahjongg gnome-mines gnome-orca gnome-screensaver gnome-sudoku gnome-video-effects gnomine landscape-common libreoffice-avmedia-backend-gstreamer libreoffice-base-core libreoffice-calc libreoffice-common libreoffice-core libreoffice-draw libreoffice-gnome libreoffice-gtk libreoffice-impress libreoffice-math libreoffice-ogltrans libreoffice-pdfimport libreoffice-presentation-minimizer libreoffice-style-galaxy libreoffice-style-human libreoffice-writer libsane libsane-common mcp-account-manager-uoa python3-uno rhythmbox rhythmbox-plugins rhythmbox-plugin-zeitgeist sane-utils shotwell shotwell-common telepathy-gabble tele |
This file contains 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 | |
cd ~/ | |
### CUDA | |
echo "\n\nChecking for CUDA and installing." | |
if ! dpkg-query -W cuda; then | |
curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb | |
sudo dpkg -i ./cuda-repo-ubuntu1604_8.0.61-1_amd64.deb | |
sudo apt-get update | |
sudo apt-get install cuda -y |
This file contains 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
# ensure system is updated and has basic build tools | |
sudo apt-get update | |
sudo apt-get --assume-yes upgrade | |
sudo apt-get --assume-yes install tmux build-essential gcc g++ make binutils | |
sudo apt-get --assume-yes install software-properties-common | |
# download and install GPU drivers | |
# see https://cloud.google.com/compute/docs/gpus/add-gpus#install-gpu-driver | |
echo "Checking for CUDA and installing." |
This file contains 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
$theme | |
List of 58 | |
$ line :List of 6 | |
..$ colour : chr "#6e6e6e" | |
..$ size : num 0.5 | |
..$ linetype : num 1 | |
..$ lineend : chr "butt" | |
..$ arrow : logi FALSE | |
..$ inherit.blank: logi TRUE | |
..- attr(*, "class")= chr [1:2] "element_line" "element" |
This file contains 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
================================================== | |
Getting Started With Matplotlib's OO Class Library | |
================================================== | |
Introduction | |
------------ | |
For those people coming to Matplotlib without any prior experience | |
of MatLab and who are familiar with the basic concepts of | |
programming API's and classes, learning to use Matplotlib via the |
This file contains 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
# Neil Panchal's Server .bashrc file | |
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; |
NewerOlder