Skip to content

Instantly share code, notes, and snippets.

View delijati's full-sized avatar

Josip Delić delijati

  • Potsdam (Berlin)
View GitHub Profile
@delijati
delijati / git_pull.py
Created October 31, 2014 12:46
Git pull with auth is slow with PIPE
import tempfile
import subprocess
import timeit
class GitWorkerPipe(object):
def start(self):
cmd = subprocess.Popen(["git", "pull"], stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="aosp"
fetch="https://android.googlesource.com"
review="android-review.googlesource.com" />
<remote name="github"
fetch=".."
review="review.androidarmv6.org" />
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="androidarmv6/android_device_lge_p500" path="device/lge/p500" remote="github" />
<project name="androidarmv6/android_kernel_lge_msm7x27-3.0.x" path="kernel/lge/msm7x27-3.0.x" remote="github" />
<project name="androidarmv6/android_device_qcom_msm7x27" path="device/qcom/msm7x27" remote="github" />
<project name="androidarmv6/android_device_lge_msm7x27-common" path="device/lge/msm7x27-common" remote="github" />
<project name="androidarmv6/android_vendor_lge" path="vendor/lge" remote="github" />
<project name="androidarmv6/android_vendor_qcom_msm7x27" path="vendor/qcom/msm7x27" remote="github" />
</manifest>
@delijati
delijati / doc-watch-selenium.py
Created January 27, 2012 19:13
with selenium
#!/usr/bin/env python
import os
import subprocess
import sys
from urllib import pathname2url
import selenium.webdriver
def run():
watch_command = 'inotifywait -rq -e close_write --exclude \'"*.html"\' .'.split()
make_command = 'make html'.split()
@delijati
delijati / sphinx-reload.py
Created January 27, 2012 19:12
watchdog example
# Run:
# $ virtualenv env
# $ cd env
# $ env/bin/pip install watchdog
# $ env/bin/pip install selenium
# $ env/bin/python sphinx-reload.py
import logging
import os
import selenium.webdriver
@delijati
delijati / gist:1629405
Created January 17, 2012 22:28
python idastar vs astar
import sys
import copy
import time
import math
import heapq
import argparse
FINFINITY = 5000
USAGE = "python puzzle8.py [bfs|idfs|astar|idastar]"