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
// Created by Lawrence PC Dol. Released into the public domain. | |
// http://tech.dolhub.com | |
// | |
// Contributions by Carlos Gómez of Asturias, Spain, in the area of unary operators | |
// and right-to-left evaluations proved invaluable to implementing these features. | |
// Thanks Carlos! | |
// | |
// Source is licensed for any use, provided this copyright notice is retained. | |
// No warranty for any purpose whatsoever is implied or expressed. The author | |
// is not liable for any losses of any kind, direct or indirect, which result |
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
from __future__ import print_function | |
from collections import namedtuple | |
from mistune import Markdown | |
text = """" | |
# Sample using mistune to parse images from Markdown pages. | |
* This is a sample image:  |
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
"""Copy photos from my Android phone's SD card. Skip files that already exist locally. | |
""" | |
from __future__ import print_function | |
import subprocess | |
import csv | |
import os | |
photos_dirs = ['/storage/external_SD/DCIM/Camera', '/sdcard/DCIM/Camera'] |
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
[ | |
{ | |
"description": "All fine", | |
"code": 0, | |
"name": "CURLE_OK", | |
"long_description": "All fine. Proceed as usual.\n" | |
}, | |
{ | |
"description": "The URL you passed to libcurl used a protocol that this libcurl does not support", | |
"code": 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
import logging | |
import requests | |
logging.captureWarnings(True) | |
SERVER = 'my-jenkins' | |
JOB_FILTER = 'test' | |
API_TOKEN = '<my-jenkins-api-token>' | |
USER = 'glombard' |
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 logging | |
import datetime | |
import time | |
from dateutil import tz | |
import matplotlib.pyplot as plt | |
import pytz | |
import requests | |
logging.captureWarnings(True) |
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
# Experimenting with one easy way to query a JSON document using a text query | |
# similar to how XPath works for XML docs. | |
# Jinja2 has a powerful expression syntax for evalulating/querying a Python dict. | |
# In this case, we want to query Maven Central to determine if the latest | |
# version of Robolectric is 3.0 ... | |
import requests | |
from jinja2 import Environment |
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
/** | |
* Module that includes this will be configured to use offline dependencies for Robolectric | |
* This downloads robolectric dependencies once into the root project | |
*/ | |
def robolectricDependenciesFolder = rootProject.buildDir.path + "/robolectric-dependencies" | |
// configuration that resolves Robolectric runtime dependencies | |
configurations.create('robolectricRuntime') |
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
job('my-generated-job') { | |
description('This job was automatically generated by a Job-DSL seed job') | |
steps { | |
shell('echo Testing Job-DSL and log-parser') | |
} | |
wrappers { | |
colorizeOutput('xterm') | |
} | |
// Use configure to add the 'publishers' XML node in the generated config.xml | |
configure { project -> |
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
find /var/folders -name '*robolectric*' | xargs rm -Rf | |
rm -Rf ~/.m2 | |
rm -Rf ~/.gradle/caches |
NewerOlder