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
| from __future__ import print_function | |
| import glob | |
| from os import path | |
| import numpy as np | |
| import pandas as pd | |
| from matplotlib import pyplot as plt | |
| from astropy import units as u | |
| from astropy import constants as c | |
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
| #!/usr/bin/env python3 | |
| import argparse | |
| import difflib | |
| import subprocess | |
| EMOJI_UNICODE = { | |
| '+1': '\U0001F44D', | |
| '-1': '\U0001F44E', |
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
| # Here we import the numpy module to use arrays, and matplotlib for plotting. | |
| # Pyplot is a sub-module of matplotlib designed to be a good interface for | |
| # interactive plotting, matplotlib in general contains many sub-modules defining | |
| # all sorts of behavior, from colors, fonts, to how tickmarks are rendered. We | |
| # use the "as" keyword to give the modules an alias, so we don't import literally | |
| # thousands of function names into the scope of the program (in IPython just type | |
| # "np.<tab>" to see how many symbols are defined. | |
| import numpy as np | |
| import pandas as pd | |
| from matplotlib import pyplot as plt |
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
| # Ripple Tank Demos | |
| Website available at: http://www.falstad.com/ripple/ . Copy and paste the following entries | |
| by going under "File -> Import From Text...", beginning from the "$" until the blank line. | |
| One can use the two check-boxes on the right to stop the simulation and visualize the | |
| amplitdues in 3D. The sliders on the right can be used to adjust the rate/speed of the | |
| simulation and wavelength/frequency of the wave (under "Source Frequency"). | |
| Single point source. Point source limits to plane wave. | |
| $ 1 512 64 10 0 668 0.048828125 | |
| s 2 257 45 0 0.466666 0 10 100 1 0 |
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
| #!/usr/bin/env python3 | |
| import itertools | |
| import numpy as np | |
| from matplotlib import patches | |
| from matplotlib import pyplot as plt | |
| from astropy import units as u |
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
| #!/usr/bin/env python | |
| """ | |
| Execute tests to reproduce memory leaks from `ia.getregion`. See the functions | |
| under the "Tests" banner near the bottom of the module for the tests to run. | |
| Images with diameters in pixels greater than or equal to 3500 appear to cause | |
| memory leaks. By default 50 calls are made to `ia.getregion`. The call itself | |
| selects a bounding box encompassing the full image and selects one channel (the | |
| second channel). | |
| This file is meant to be run using `execfile` under CASA v5 and Python v2.7. |
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
| # By Eric Koch | |
| def half_table(table1_name, table2_name, | |
| reverse1=False, reverse2=False, | |
| pivot=0.5): | |
| """ | |
| Splice together two matplotlib color tables. | |
| """ | |
| n_col = 256 | |
| cmap1 = cm.get_cmap(table1_name, n_col) |
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
| [hopperrace] | |
| maxRank = 8 | |
| maxFile = 8 | |
| gold = g | |
| silver = s | |
| queen = f # flag piece used for mandatory promotion | |
| customPiece1 = l:mfFmfWmgQ # non-capturing hopper | |
| customPiece2 = p:fFmfW # breakthrough pawn | |
| startFen = 1slggls1/8/1pppppp1/8/8/1PPPPPP1/8/1SLGGLS1 w - - 0 1 | |
| extinctionValue = loss |
This file has been truncated, but you can view the full file.
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
| 1slggls1/8/1pppppp1/8/8/1PPPPPP1/8/1SLGGLS1 w - - 0 1 | |
| 1slggls1/8/1pppppp1/8/5P2/1PPPPP2/8/1SLGGLS1 b - - 1 1 | |
| 2lggls1/2s5/1pppppp1/8/5P2/1PPPPP2/8/1SLGGLS1 w - - 2 2 | |
| 2lggls1/2s5/1pppppp1/8/5P2/1PPPPP2/2S5/2LGGLS1 b - - 3 2 | |
| 2l1gls1/2s1g3/1pppppp1/8/5P2/1PPPPP2/2S5/2LGGLS1 w - - 4 3 | |
| 2lggls1/2s5/1pp1ppp1/3p4/5P2/1PPPPP2/2S5/2LGGLS1 w - - 4 3 | |
| 2lggls1/2s5/1ppp1pp1/4p3/5P2/1PPPPP2/2S5/2LGGLS1 w - - 4 3 | |
| 2lggls1/2s5/1pppppp1/8/5P2/1PPPPP2/5S2/1SLGGL2 b - - 3 2 | |
| 2lggl2/2s2s2/1pppppp1/8/5P2/1PPPPP2/5S2/1SLGGL2 w - - 4 3 |
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 | |
| for input_file in *.svg | |
| do | |
| stem="${input_file%%.*}" | |
| outname="${stem}_r" | |
| inkscape --actions "select-all;transform-rotate:180;export-filename:${outname}.svg;export-do" $input_file | |
| done |