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
/** | |
Copyright 2018 Google LLC. | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
https://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
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
// Compile with: gcc prog.c -lpthread | |
#include <pthread.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
const int NUM_THREADS = 5; | |
// typically you'd set this to whatever your real work is | |
const int num_digits = 10; | |
const int digits[num_digits] = {1,2,3,4,5,6,7,8,9,10}; |
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 python3 | |
'''redact.py | |
A very dumb redaction script that will remove basic versions of the following: | |
- Email addresses | |
- Links | |
- US city/state/zip combinations | |
- US phone numbers | |
- pure www.blah.com version sites |
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/python | |
import SimpleHTTPServer | |
import SocketServer | |
import logging | |
import cgi | |
import sys | |
# we choose where the server will listen, in this case http://localhost:8001 |