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
import sys | |
import socket | |
def write_to_log(car): | |
try: | |
with open('solver.txt', 'a+') as f: | |
f.write("-----------\n") | |
f.write("Moves: %s\n" % car.total_moves) | |
f.write(car.all_data_received) | |
f.write("-----------\n") |
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
import sys | |
import socket | |
sample_map = """ | |
|-----| | |
| T | | |
| P | | |
| | | |
| c| | |
|~ Z| |
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
import random | |
words = [ "best practices", "industry standard", "data retention", "common carrier", | |
"national security", "due diligence", "cyber-space", "Awareness", | |
"abuse of human rights", "lawful intercept", "censorship", | |
"ecosystem", "Digital Human Rights", "APT", "Transparency", "Open Data", | |
"Security Language", "Militarization of Cyberspace", "Big Data", | |
"E-Democracy", "Cyber Security", "Terrorism", "Anonymity", "Cyber Espionage", | |
"Hacktivism", "The Cloud", "Internet of Things", "Internet Policy", "Trolling", | |
"Cyber War", "Cyber Weapon", "Rule of Law", "Internet kill switch", | |
"Digital Divide", "Third World", "Internet Freedom", "Cyber 9/11", |
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
import sys | |
import requests | |
import lxml.html | |
ip = sys.argv[1] | |
r = requests.get("http://lg.ring.nlnog.net/traceroute/lg01/ipv4?q=" + ip) | |
root = lxml.html.fromstring(r.text) | |
result = root.cssselect("pre")[0] | |
print lxml.html.fromstring(lxml.html.tostring(result).replace("<br>", "\n")).text_content() |
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
import os | |
from zope.interface import implements | |
from twisted.internet import abstract, interfaces, reactor, fdesc | |
class NamedPipeReader(abstract.FileDescriptor): | |
def __init__(self, file_name, reactor=None): | |
abstract.FileDescriptor.__init__(self, reactor=reactor) | |
self.file_name = file_name |
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
it("should fail if an attribute is missing inside the provided Context (POST, 406)", function(done){ | |
var test = clone(dummyContext), | |
idx = 0, | |
doneRequest = function() { | |
if (idx == args.length) done() | |
}; | |
args.forEach(function (arg) { | |
idx += 1; |
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
httpo://4caair3hubdudppc.onion |
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
# To delete all the currently stored files | |
sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'delete from LSQuarantineEvent where LSQuarantineEventIdentifier like "%%";' | |
# To never store such information you can sym link it to dev null | |
ln -s /dev/null ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2 |
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
from twisted.trial import unittest | |
from twisted.internet import defer | |
from storm.twisted.transact import transact, Transactor | |
from storm.twisted.testing import FakeThreadPool | |
class Antani(object): | |
@transact | |
def antani(self): |
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
from twisted.trial import unittest | |
from storm.twisted.transact import transact, Transactor | |
from storm.twisted.testing import FakeThreadPool | |
class Antani(object): | |
@transact | |
def antani(self): | |
return "foobar" |