This article was moved to https://zhiyzuo.github.io/installation-rattle/ !
This file contains 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 numpy as np | |
def find_runs(x): | |
"""Find runs of consecutive items in an array.""" | |
# ensure array | |
x = np.asanyarray(x) | |
if x.ndim != 1: | |
raise ValueError('only 1D array supported') |
Ref: https://gist.github.com/vertexclique/9839383
Please use built-in Terminal.app (of Mac OS X) to type and rune the command, do not use another tool (like iTerm2).
Common step after enter run the patch command:
- After run the commands, start new Sublime Text app, go to Main Menu > Help > Enter License. On the popup type in any text (example "a") and click Use Licence .
This file contains 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
## CRONTAB HINTS AND TIPS | |
## | |
## | |
## Entry Description Equivalent To | |
## @yearly (or @annually) Run once a year at midnight in the morning of January 1 0 0 1 1 * | |
## @monthly Run once a month at midnight in the morning of the first of the month 0 0 1 * * | |
## @weekly Run once a week at midnight in the morning of Sunday 0 0 * * 0 | |
## @daily Run once a day at midnight 0 0 * * * | |
## @hourly Run once an hour at the beginning of the hour 0 * * * * | |
## @reboot Run at startup @reboot |
This file contains 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
# Enter your code here. Read input from STDIN. Print output to STDOUT | |
class Node: | |
def __init__(self,value,point): | |
self.value = value | |
self.point = point | |
self.parent = None | |
self.H = 0 | |
self.G = 0 | |
def move_cost(self,other): | |
return 0 if self.value == '.' else 1 |
This file contains 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 | |
# | |
# Copy data from a Time Machine volume mounted on a Linux box. | |
# | |
# Usage: copy-from-time-machine.sh <source> <target> | |
# | |
# source: the source directory inside a time machine backup | |
# target: the target directory in which to copy the reconstructed | |
# directory trees. Created if it does not exists. | |
# |