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
/* GRE Trainer 2.2 | |
* Bookmarklet to help with GRE Vocab | |
* | |
* Grab the bookmarklet from https://bookmarkify.it/15582 | |
* | |
* Instructions: | |
* 1. Go to https://www.memrise.com/course/1150347/magoosh-gre-vocabulary-in-20-levelsfull-sound/1/ | |
* 2. Click bookmarklet | |
* 3. Select the decks you want to practice and click "Load Selected Decks" | |
* 4. Use `tab/shift+tab` to navigate through the words |
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
window.error_regex = /(\w*):.*\s*<\/pre>/igm; | |
function init() { | |
var a = $('.content:first .row:first').clone(); | |
a.find('.alert').replaceWith("<h4>Summary <span id='rownumspan'></span></h4><pre id='hack'></pre>"); | |
$('.content:last').append(a); | |
a = $('.content:first .row:first').clone(); | |
a.empty(); | |
a.append("<div class='col-xs-6 col-sm-6 col-md-6 col-lg-6'><h4>Errors</h4><pre id='errlog'></pre></div><div class='col-xs-6 col-sm-6 col-md-6 col-lg-6'><h4>Error Summary</h4><pre id='errsum' style='white-space: pre-wrap;'>No runtime errors</pre></div>"); | |
$('.content:last').append(a); |
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
# Author: P. R. Vaidyanathan | |
# Examples at the end of document | |
class Permutation(list): | |
""" | |
Represents a permutation and supports inverse, composition, | |
multiplication using * operator, action on set (through calling), | |
cycle decomposition and cycle to cycle conversion | |
""" |
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 cubetools | |
# https://gist.github.com/aditya95sriram/8d1fccbb91dae93c4edf31cd6a22510f | |
# read_cube function reads in cube file as (numpy array, metadata) tuple | |
data, meta = cubetools.read_cube('demo.cube') | |
# volumetric data | |
print data.shape | |
# (8L, 8L, 8L) |
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 | |
#------------------------------------------------------------------------------ | |
# Shell script: allband.sh | |
#------------------------------------------------------------------------------ | |
# | |
# Description: | |
# Extracts wavefunction for multiple bands using pp.x from Quantum Espresso. | |
# | |
#------------------------------------------------------------------------------ | |
# |
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
#------------------------------------------------------------------------------ | |
# Function: setlocq | |
#------------------------------------------------------------------------------ | |
# | |
# Description: | |
# Port of Quantum Espresso's 'setlocq' routine (PHonon/PH/setlocq.f90) | |
# | |
#------------------------------------------------------------------------------ | |
# | |
# What does it do: |
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
#------------------------------------------------------------------------------ | |
# Module: cubetools | |
#------------------------------------------------------------------------------ | |
# | |
# Description: | |
# Module to work with Gaussian cube format files | |
# (see http://paulbourke.net/dataformats/cube/) | |
# | |
#------------------------------------------------------------------------------ | |
# |
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
# Script to convert binary data in .dat files to .xml files | |
# using Quantum Espresso Input Output Toolkit (iotk) | |
# ========================================================= | |
# | |
# NOTE: Set IOTK directory on line 24 before using | |
# e.g. <espresso>/bin/iotk, where <espresso> is the path to Quantum Espresso | |
# | |
# Recommended Usage: | |
# - Place script in home directory (optional) | |
# - navigate to *.save directory generated by Espresso |
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
function sep() {console.log("");} // separator for console output | |
/* Obsolete function, retained for explanatory purposes */ | |
function check(a, b, c) { // checks if any two of a,b or c is true | |
return ( (a||b) && (b||c) && (a||c) ); | |
} | |
/* individual row scraper, gather all information about a course and return as object */ | |
function indi(t) { | |
t = $(t); |