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
sed -i 's/\s\+$//' `find CE3D -name "*.cpp";find CE3D -name "*.h"` |
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 re | |
# Just a forwarding method for re.split(), that splits unescaped. | |
# NOTE: If max_split it a number above 0, unescaped_split() appends the | |
# remaining unprocessed string to the result list! | |
def unescaped_split(pattern, | |
string, | |
max_split = 0, | |
remove_empty_matches = False): | |
match = re.split(pattern, string, max_split) |
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 multiprocessing import Process, Queue | |
from time import sleep | |
import ctypes | |
# WINDOWS ONLY!!! | |
def interrupt_process(pid): | |
CTRL_C_EVENT = 0x0 | |
ctypes.windll.kernel32.GenerateConsoleCtrlEvent(CTRL_C_EVENT, pid) | |
# DON'T USE THIS!!! THIS WON'T WORK AND GENERATES A COMPLETELY DIFFERENT |
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 multiprocessing import Process, Queue | |
from time import sleep | |
import os | |
import ctypes | |
import sys | |
import platform | |
# WINDOWS ONLY!!! | |
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
#!/bin/bash | |
set -e | |
# The test invocation. | |
function test_step { | |
echo "Updating setup.cfg..." | |
sed -i -e "s/ --cov//g" setup.cfg | |
py.test -k core | |
git reset --hard | |
} |
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
#!/usr/bin/env python | |
# liuw | |
# Nasty hack to raise exception for other threads | |
import ctypes # Calm down, this has become standard library since 2.5 | |
import threading | |
import time | |
NULL = 0 |
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
mak@localhost:~/dev/coala (sils/printcol) +1 ~0 -0 $ ./run_tests.py | |
1/81 | ApplyPatchActionTest | |
2/81 | BearRunningTest | |
3/81 | BearTest | |
4/81 | BuildDbusServiceTest | |
5/81 | BuildManPageTest | |
6/81 | ClangASTPrintBearTest | |
7/81 | ClangCloneDetectionBearTest | |
8/81 | ClangCountingConditionsTest | |
9/81 | ClangCountVectorCreatorTest |
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
^Cmak@localhost:~/dev/gitmate-satellizer (master)$ ./runserver.sh | |
* Running on http://127.0.0.1:3000/ | |
* Restarting with reloader | |
127.0.0.1 - - [05/Oct/2015 17:36:48] "GET / HTTP/1.1" 200 - | |
127.0.0.1 - - [05/Oct/2015 17:36:48] "GET /stylesheets/angular-toastr.css HTTP/1.1" 304 - | |
127.0.0.1 - - [05/Oct/2015 17:36:48] "GET /stylesheets/styles.css HTTP/1.1" 304 - | |
127.0.0.1 - - [05/Oct/2015 17:36:48] "GET /vendor/angular.js HTTP/1.1" 304 - | |
127.0.0.1 - - [05/Oct/2015 17:36:48] "GET /vendor/angular-animate.js HTTP/1.1" 304 - | |
127.0.0.1 - - [05/Oct/2015 17:36:48] "GET /vendor/angular-messages.js HTTP/1.1" 304 - | |
127.0.0.1 - - [05/Oct/2015 17:36:48] "GET /vendor/angular-resource.js HTTP/1.1" 304 - |
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
# Prototype for an InterruptableProcess. | |
# 8.10.2015 --> Makman2 | |
import ctypes | |
import multiprocessing | |
import threading | |
def _wait_for_single(*events): | |
""" | |
Waits for at least one event being set. |
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 unittest | |
from multiprocessing import Event | |
from InterruptableProcess import InterruptableProcess | |
class InterruptableProcessTest(unittest.TestCase): | |
def test_normal_run(self): | |
def worker(e1, e2, e3): | |
e1.wait() |
OlderNewer