This file contains hidden or 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
#!/usr/bin/env python2 | |
import sys, os, shutil, argparse, string, readline | |
from fuzzywuzzy import process | |
parser = argparse.ArgumentParser() | |
parser.add_argument('directory', type=str) | |
parser.add_argument('namelist', type=argparse.FileType(mode='r')) | |
# TODO: option to include extension in renaming? | |
args = parser.parse_args() |
This file contains hidden or 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
#!/usr/bin/env python2 | |
margin = 0.375 | |
lineheight = (8.5 - 2*margin)/25 | |
linewidth = 11 - 2*margin | |
midgutter = 11.0/2 | |
ypts = [(margin, midgutter-(margin/2)), (midgutter+(margin/2), 11.0 - margin)] | |
color = '#A4DDED' | |
thickness = 1.0/64 |
This file contains hidden or 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
#!/usr/bin/env python2 | |
import sys, os, re | |
conversions = [ | |
('<gtest/gtest.h>', '<doctest.h>'), | |
(r'TEST\(([a-zA-Z0-9]+), ([a-zA-Z0-9]+)\)', r'TEST_CASE("\1_\2")') | |
] | |
severity_map = {'ASSERT': 'REQUIRE', 'EXPECT': 'CHECK'} |
This file contains hidden or 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
/* | |
* Copyright (c) 2015 Jeffrey Bosboom | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |
This file contains hidden or 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
/*** | |
* Copyright (c) 2015 Jeffrey Bosboom | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: | |
* 1. Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. | |
* 2. Redistributions in binary form must reproduce the above copyright |
This file contains hidden or 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
package com.jeffreybosboom.stringbuilderbench; | |
import org.openjdk.jmh.annotations.Benchmark; | |
import org.openjdk.jmh.annotations.Scope; | |
import org.openjdk.jmh.annotations.State; | |
@State(Scope.Thread) | |
public class StringBuilderBench { | |
//promote to non-final fields to inhibit constant folding (see JMHSample_10_ConstantFold.java) | |
private String really = "really ", long_string = "long string.", re = "re", al = "al", ly = "ly "; |
NewerOlder