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 | |
WINDOWS_ROOT=$1 | |
cd $WINDOWS_ROOT/Windows/System32/config | |
# Get MAC address of Bluetooth module | |
for mac in /var/lib/bluetooth/??:??:??:??:??:??; do | |
btmacwin=$(basename ${mac} | sed 's/://g' | awk '{print tolower($0)}') | |
btdir=${mac} |
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
"""Simple Gaussian process classification example (Laplacian approximation)""" | |
import numpy as np | |
import scipy.special | |
import matplotlib.pyplot as plt | |
class ProbitLikelihood: | |
""" |
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
"""Simple Gaussian process regression example""" | |
import numpy as np | |
import matplotlib.pyplot as plt | |
def kernel(x1, x2, length_scale=1, signal_variance=1): | |
return signal_variance*np.exp(-(x1-x2)**2 / (2*length_scale**2)) |
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
sudo wget -qO /etc/yum.repos.d/enpass-yum.repo https://yum.enpass.io/enpass-yum.repo | |
sudo wget -qO /etc/yum.repos.d/softmaker.repo https://shop.softmaker.com/repo/softmaker.repo | |
sudo rpm -v --import https://packages.microsoft.com/keys/microsoft.asc | |
sudo rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg | |
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo' | |
sudo dnf install -y dnf-plugin-config-manager dnf-plugins-core fedora-workstation-repositories | |
sudo dnf config-manager --set-enabled google-chrome | |
sudo dnf config-manager addrepo --from-repofile=https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo |
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
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files | |
# (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, | |
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do | |
# so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE | |
# FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
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 glob | |
import os | |
from ase.io import NetCDFTrajectory, read | |
fns = glob.glob('/work/ws/nemo/fr_rj1011-18.07.03-GAP_low_density-0/18.10.15-aC_GAP-quasistatic-bond_breaking_B/quasistatic-2.7_B_*.lammps') | |
nc = NetCDFTrajectory('quasistatic_2.7.nc', 'w') | |
fns = sorted(fns, key=lambda x: int(os.path.basename(x).replace('quasistatic-2.7_B_', '').replace('.lammps', ''))) | |
for fn in fns: |
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
/* | |
Copyright (c) 2017 Lars Pastewka | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files | |
(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, | |
publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do | |
so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
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
ffmpeg -r 60 -f image2 -i vacancy_diffusion%04d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p test.mp4 |
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
/* | |
Copyright (c) 2017 Lars Pastewka | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files | |
(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, | |
publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do | |
so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
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/sh | |
cat log.lammps | sed -n "/Step/,/Loop time/p" | head -n-1 > thermo.out |
NewerOlder