Code licensed under the MIT license. See LICENSE for details.
All other materials licensed under a
Creative Commons Attribution 4.0 International License.
| import subprocess | |
| import os | |
| import sys | |
| try: | |
| args = sys.argv[1:] | |
| except IndexError: | |
| args = [] | |
| atom_exe = "cmd.exe /mnt/c/Users/peteb/AppData/Local/atom/bin/atom.cmd" |
| function openfoam() { | |
| OF_VERSION=$1 | |
| # echo "Activating OpenFOAM-$OF_VERSION environment" | |
| source /home/pete/OpenFOAM/OpenFOAM-$OF_VERSION/etc/bashrc | |
| if [[ "$OF_VERSION" == "2"* ]] | |
| then | |
| export ParaView_DIR=/home/pete/OpenFOAM/ThirdParty-$OF_VERSION/platforms/linux64Gcc/ParaView-4.1.0 |
| function auth() { | |
| eval `ssh-agent` > /dev/null | |
| ssh-add | |
| } | |
| # Call this function from Git Bash after entering the project dir | |
| function dev() { | |
| atom . | |
| explorer . | |
| jupyter qtconsole --no-confirm-exit & |
| Previously compiled for OpenFOAM dev | |
| /home/pete/OpenFOAM/pete-dev/swak4foam-dev/privateRequirements/bin existing. Prepending to PATH-variable (private version of Bison) | |
| No file 'swakConfiguration'. Python etc won't work. See README for details | |
| Try 'ln -s swakConfiguration.automatic swakConfiguration' for automatic configuration. BEWARE: this does not work on some systems | |
| Checking swak4Foam-version and generating file | |
| Swak version is 0.4.0 | |
| Bison is version 2.7.12-4996 | |
| Flex is version 2.5.35 (Minor version: 35) |
| OLD_VERSION="2.4.x" | |
| NEW_VERSION="3.0.x" | |
| find . -type f -exec sed -i 's/$OLD_VERSION/$NEW_VERSION/g' {} + |
Code licensed under the MIT license. See LICENSE for details.
All other materials licensed under a
Creative Commons Attribution 4.0 International License.
| #!/usr/bin/env bash | |
| # From http://askubuntu.com/questions/589469/how-to-automatically-update-atom-editor | |
| wget https://github.com/atom/atom/releases/latest -O ~/Downloads/latest | |
| wget $(awk -F '[<>]' '/href=".*atom-amd64.deb/ {match($0,"href=\"(.*.deb)\"",a); print "https://github.com/" a[1]} ' ~/Downloads/latest) -O ~/Downloads/atom-amd64.deb | |
| sudo dpkg -i ~/Downloads/atom-amd64.deb |
| #!/usr/bin/env python | |
| from Adafruit_BBIO import GPIO | |
| pin = "P8_13" | |
| exit = False | |
| state = 1 | |
| GPIO.setup(pin, GPIO.OUT) |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Thu Aug 8 09:22:09 2013 | |
| @author: pete | |
| """ | |
| import matplotlib.pyplot as plt | |
| import re |