I hereby claim:
- I am fnl on github.
- I am fnl (https://keybase.io/fnl) on keybase.
- I have a public key ASAtviduoVKtS7prYUGXxnvmv4gd-WpeiGq50miTcprB_go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| import java.util.*; | |
| public class test{ | |
| // Conclusion | |
| // use HashSet... | |
| // ...unless you have few accesses and mostly only build them, in which case LinkedHashSet is faster | |
| // ...and only use TreeSet when you need the order | |
| final static int size = 500; | |
| final static int accesses = 10; |
| package spark.example | |
| import org.apache.spark.SparkContext | |
| import org.apache.spark.SparkConf | |
| object SparkGrep { | |
| def main(args: Array[String]) { | |
| if (args.length < 3) { | |
| System.err.println("Usage: SparkGrep <host> <input_file> <match_term>") | |
| System.exit(1) |
| #!/usr/bin/env python3 | |
| """ | |
| Description | |
| """ | |
| from argparse import ArgumentParser | |
| import logging | |
| import os | |
| import sys | |
| from somewhere import main |
| #!/usr/bin/env python | |
| """ | |
| An example for part-of-speech tagging. | |
| Copyright 2010,2011 Naoaki Okazaki. | |
| """ | |
| import crfutils | |
| # Separator of field values. |
| var data = $(element).data('annotator'); | |
| // expand the viewer to show the annotated text (quote) | |
| data.viewer.fields[0].load = function (field, annotation) { | |
| return annotation.text | |
| ? $(field).html(annotation.quote + "<br/><i>" + escape(annotation.text) + "</i>") | |
| : $(field).html(annotation.quote), | |
| data.publish("annotationViewerTextField", [field, annotation]); | |
| } |
| # backup from HFS drive to FAT32 (NB: file owner and extended metadata are not synced): | |
| time rsync --recursive --update --delete --links --hard-links --safe-links --perms --times --modify-window=1 --stats --exclude '.DS_Store' --exclude '._*' ~/dir/ /Volumes/FAT32 | |
| # restore from FAT32 to HFS (NB: "--delete" removes files in "dir" not in "FAT32"): | |
| time rsync --recursive --update --delete --links --hard-links --safe-links --perms --times --modify-window=1 --stats --exclude '.DS_Store' --exclude '.Spotlight-V100' --exclude '.fseventsd' --exclude '.Trashes' /Volumes/FAT32/ ~/dir |