In your command-line run the following commands:
brew doctor
brew update
In your command-line run the following commands:
brew doctor
brew update
When many different people are working on a project simultaneously, pull requests can go stale quickly. A "stale" pull request is one that is no longer up to date with the main line of development, and it needs to be updated before it can be merged into the project. The most common reason why pull requests go stale is due to conflicts: if two pull requests both modify similar lines in the same file, and one pull request gets merged, the unmerged pull request will now have a conflict. Sometimes, a pull request can go stale without conflicts: perhaps changes in a different file in the codebase require corresponding changes in your pull request to conform to the new architecture, or perhaps the branch was created when someone had accidentally merged failing unit tests to the master branch. Regardless of the reason, if your pull request has gone stale, you will need to rebase your branch onto the latest version of the master branch before it can be merged.
FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and it’s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you don’t have to worry about including and installing all the right dependencies and codecs you will be using.
Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:
ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4
Basically, we’re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.
''' | |
A python script which starts celery worker and auto reload it when any code change happens. | |
I did this because Celery worker's "--autoreload" option seems not working for a lot of people. | |
''' | |
import time | |
from watchdog.observers import Observer ##pip install watchdog | |
from watchdog.events import PatternMatchingEventHandler | |
import psutil ##pip install psutil | |
import os |
def nearby_spots_old(request, lat, lng, radius=5000, limit=50): | |
""" | |
WITHOUT use of any external library, using raw MySQL and Haversine Formula | |
http://en.wikipedia.org/wiki/Haversine_formula | |
""" | |
radius = float(radius) / 1000.0 | |
query = """SELECT id, (6367*acos(cos(radians(%2f)) | |
*cos(radians(latitude))*cos(radians(longitude)-radians(%2f)) | |
+sin(radians(%2f))*sin(radians(latitude)))) |
import os | |
def walk(storage, top='/', topdown=False, onerror=None): | |
"""An implementation of os.walk() which uses the Django storage for | |
listing directories.""" | |
try: | |
dirs, nondirs = storage.listdir(top) | |
except os.error, err: | |
if onerror is not None: |