This re-styles your sublime text sidebar to be dark, it fits default Monokai theme.
Save the Default.sublime-theme file into packages/Theme - Default, make a backup of your original if you want to be able to go back easily.
Based on:
| """Genetic Algorithmn Implementation | |
| see: | |
| http://www.obitko.com/tutorials/genetic-algorithms/ga-basic-description.php | |
| """ | |
| import random | |
| class GeneticAlgorithm(object): | |
| def __init__(self, genetics): | |
| self.genetics = genetics | |
| pass |
| """ | |
| Match two sets of on-sky coordinates to each other. | |
| I.e., find nearest neighbor of one that's in the other. | |
| Similar in purpose to IDL's spherematch, but totally different implementation. | |
| Requires numpy and scipy. | |
| """ | |
| from __future__ import division | |
| import numpy as np |
This re-styles your sublime text sidebar to be dark, it fits default Monokai theme.
Save the Default.sublime-theme file into packages/Theme - Default, make a backup of your original if you want to be able to go back easily.
Based on:
| from astropy.coordinates import ICRS, Distance, Angle | |
| from astropy import units as u | |
| import numpy as np | |
| def correct_rgc(coord, glx_ctr=ICRS('00h42m44.33s +41d16m07.5s'), | |
| glx_PA=Angle('37d42m54s'), | |
| glx_incl=Angle('77.5d'), | |
| glx_dist=Distance(783, unit=u.kpc)): | |
| """Computes deprojected galactocentric distance. |
| #!/bin/bash | |
| echo | |
| echo "This script sets the pantheon terminal to the Solarized theme." | |
| echo | |
| until [[ $scheme -eq 1 ]] || [[ $scheme -eq 2 ]] || [[ $scheme -eq 3 ]]; do | |
| echo "Choose one:" | |
| echo "1) Light" | |
| echo "2) Dark" |
| sudo sed -i -r 's/(\[.+\])$/\1\nStartupWMClass=Google-chrome-stable/g' /usr/share/applications/google-chrome.desktop |
import itertools as IT
def scale_polygon(path,offset):
center = centroid_of_polygon(path)
for i in path:
if i[0] > center[0]:
i[0] += offset
else:
i[0] -= offset
if i[1] > center[1]: Python version of the MATLAB code in this Stack Overflow post: https://stackoverflow.com/a/18648210/97160
The example shows how to determine the best-fit plane/surface (1st or higher order polynomial) over a set of three-dimensional points.
Implemented in Python + NumPy + SciPy + matplotlib.