docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
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
vidcap = cv2.VideoCapture('test_video.mp4') | |
vidcap.set(cv2.CAP_PROP_POS_MSEC,38000) # just cue to 38 sec. position | |
success, image = vidcap.read() | |
if success: | |
cv2.imwrite("capture.jpg", image) # save frame as JPEG file | |
cv2.imshow("final_frame",image) | |
cv2.waitKey() | |
The problem with the other two answers is that the new master doesn't have the old master as an ancestor, so when you push it, everyone else will get messed up. This is what you want to do:
git checkout better_branch
git merge --strategy=ours master # keep the content of this branch, but record a merge
git checkout master
git merge better_branch # fast-forward master up to the merge
If you want your history to be a little clearer, I'd recommend adding some information to the merge commit message to make it clear what you've done. Change the second line to:
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
set nocompatible | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set hlsearch | |
set incsearch | |
set guioptions-=e |
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
# Show host IP address on your bash prompt. | |
# | |
# Example of prompt: | |
# | |
# moogs@192.168.1.100 : ~/Dropbox/workspace | |
# $ | |
# | |
export PS1="\n\n\[\033[0;36m\]\u@$(ifconfig | grep "inet " | grep -v 127.0.0. | awk '{print $2}')\[\033[00m\]\[\033[0;32m\] : \w\[\033[00m\]\n\[\033[00;32m\]\$\[\033[00m\] " | |
export PS2="\[\033[0;32m\]>\[\033[00m\] " |
- Install needed libraries
sudo apt-get install libatlas-base-dev python-dev gfortran pkg-config libfreetype6-dev cython
pt-get install libhdf5-serial-dev
- Create python virtual_env
- chenage to virtaul env
- Install table -- crashes during zipline install
export HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/serial/
ssh-keygen -y -f key.pem > key.pub
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
# Automated AMI Backups | |
# | |
# @author Bobby Kozora | |
# | |
# This script will search for all instances having a tag with the name "backup" | |
# and value "Backup" on it. As soon as we have the instances list, we loop | |
# through each instance | |
# and create an AMI of it. Also, it will look for a "Retention" tag key which | |
# will be used as a retention policy number in days. If there is no tag with | |
# that name, it will use a 7 days default value for each AMI. |
I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).
Use ssh keys and define host aliases in ssh config file (each alias for an account).