Skip to content

Instantly share code, notes, and snippets.

View mtesseracted's full-sized avatar

mtesseracted

  • Duke University
  • USA
View GitHub Profile
@mtesseracted
mtesseracted / numpyrotate.py
Last active March 10, 2019 12:40
NumPy logo in rotating voxels
'''
matplotlib must be developer release for voxel support
install instructions:
https://matplotlib.org/devdocs/users/installing.html
'''
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.animation as manimation
@mtesseracted
mtesseracted / pyplotRotate.py
Last active March 2, 2018 20:04
PYPLOT logo in rotating voxels
'''
=====================================
Rotating 3D voxel animation of PYPLOT
=====================================
1. Demonstrates using ``ax.voxels`` with uneven coordinates
2. Demonstrates rotating a 3D plot
3. Uses a MovieWriter directly to grab individual frames and
write them to a file
'''
@mtesseracted
mtesseracted / pythonRotate.py
Last active May 28, 2020 12:29
PYTHON in rotating voxels
'''
=====================================
Rotating 3D voxel animation
=====================================
Demonstrates using ``ax.voxels`` with uneven coordinates
'''
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
@mtesseracted
mtesseracted / numpyRot.py
Created March 2, 2018 19:14
Rotating NumPy logo in voxels
'''
=====================================
Rotating 3D voxel animation of PYTHON
=====================================
Demonstrates using ``ax.voxels`` with uneven coordinates
'''
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
@mtesseracted
mtesseracted / gnome-terminal-profiles.adoc
Created March 6, 2018 15:39
Export / Import Gnome Terminal Profiles

Export Gnome Terminal Profile

List profiles

dconf dump /org/gnome/terminal/legacy/profiles:/

Determine the terminal profile string for the profile you will need. This is the terminal profile that I will export:

@mtesseracted
mtesseracted / myconfig.sh
Last active July 20, 2018 21:03
Configuration for quantum espresso
#!/bin/bash
THISDIR=$(pwd)
if [ -z "$1" ]; then
mode='s' #serial
else
mode='p' #parallel
fi
@mtesseracted
mtesseracted / timed.f90
Last active August 3, 2018 18:54
timing array unformatted writing
module kinds
save
integer, parameter :: dp = selected_real_kind(15, 307)
end module kinds
program am_timed
use kinds, only : dp
# ~/.bashrc: executed by bash(1) for non-login shells.
# ______________________________________________________________________
# / \
# ( Ubuntu defaults )
# \______________________________________________________________________/
#
# If not running interactively, don't do anything
case $- in *i*);; *) return;; esac
@mtesseracted
mtesseracted / x1ps1.sh
Last active April 14, 2022 11:25
bash PS1 setting script
# PS1 setting script, features:
# Regular use: (opt1/opt2 means opt1 has precedence)
## user@host|cmd_time/clock|pwd$exit_code/''>
## print in color (if available)
## first print user@host (green):
## host color is bold if SSH session.
## cmd_time (green|yellow|red) || clock (green):
## clock time or cmd_time (if cmd_time > 20s).
@mtesseracted
mtesseracted / dgesvx_tester.f90
Last active July 28, 2020 13:36
test program for dgesvx
! Test program for dgesvx
! compile command used:
!ifort dgesvx_tester.f90 -L/opt/intel/composer2018/mkl/lib/intel64 -lmkl_core -lmkl_intel_lp64 -lmkl_sequential -lpthread
program main
implicit none
external :: dgemv
external :: dgesv
external :: dgesvx
integer, parameter :: dp = selected_real_kind(15,300)