Interactive tool for creating directed graphs, created using d3.js.
Demo: http://bl.ocks.org/cjrd/6863459
Operation:
- drag/scroll to translate/zoom the graph
node { | |
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
echo 'No quotes, pipeline command in single quotes' | |
sh 'echo $BUILD_NUMBER' // 1 | |
echo 'Double quotes are silently dropped' | |
sh 'echo "$BUILD_NUMBER"' // 1 | |
echo 'Even escaped with a single backslash they are dropped' | |
sh 'echo \"$BUILD_NUMBER\"' // 1 | |
echo 'Using two backslashes, the quotes are preserved' | |
sh 'echo \\"$BUILD_NUMBER\\"' // "1" |
#!/usr/bin/env python | |
from __future__ import print_function, division | |
import argparse | |
import json | |
import sys | |
from gzip import GzipFile | |
def concat_claims(claims): | |
for rel_id, rel_claims in claims.iteritems(): |
#!/usr/bin/python3 | |
# By Steve Hanov, 2011. Released to the public domain. | |
# Please see http://stevehanov.ca/blog/index.php?id=115 for the accompanying article. | |
# | |
# Based on Daciuk, Jan, et al. "Incremental construction of minimal acyclic finite-state automata." | |
# Computational linguistics 26.1 (2000): 3-16. | |
# | |
# Updated 2014 to use DAWG as a mapping; see | |
# Kowaltowski, T.; CL. Lucchesi (1993), "Applications of finite automata representing large vocabularies", | |
# Software-Practice and Experience 1993 |
Interactive tool for creating directed graphs, created using d3.js.
Demo: http://bl.ocks.org/cjrd/6863459
Operation:
#!/usr/bin/python | |
# | |
# Counts Arabic words with 1-10 characters in a text file. | |
# Counts hapaxes. | |
# Shadda is assumed to be equal to (1) character. | |
# All other diacritics and punctuation are discarded. | |
# Assumes tokenized UTF-8 input. | |
import sys | |
import os.path |