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 | |
def chunk_text_by_regex(text, pattern, nr_matches): | |
prev = 0 | |
chunks = [] | |
for i, match in enumerate(re.finditer(pattern, text), start=1): | |
if i % nr_matches == 0: | |
chunks.append(text[prev:match.start()].strip()) | |
prev = match.start() | |
if prev < len(text): |
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 threading import Thread | |
import socket | |
def scan(ip, port): | |
try: | |
con = socket.socket() | |
result = con.connect_ex((ip,port)) | |
if result == 0: | |
print '[+] Port %d open' %port |
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
{ | |
"description": "The ultimate toolbox of developer!", | |
"support": { | |
"basic_usage": "http://getcomposer.org/doc/01-basic-usage.md", | |
"packagist": "https://packagist.org/", | |
"phpqatools": "http://phpqatools.org/", | |
"helper": "http://composer.json.jolicode.com/" | |
}, | |
"author": { | |
"name": "NerOcrO", |
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 sklearn.cross_validation import KFold | |
from sklearn import linear_model | |
from sklearn import ensemble | |
from sklearn.metrics import mean_squared_error | |
xpca = PCA(100).fit_transform(df_cars_maxabs); | |
kf = KFold(len(df), n_folds=10, shuffle=True) |
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/lua | |
--[[ | |
AIVD Cyber challenge (https://www.aivd.nl/@3269/ga-cyberchallenge/) | |
bas@laptop:/var/www$ lua solve.lua | |
[*] --------------------------------- | |
[*] --- AIVD Cyber challenge 2015 --- | |
[*] --------------------------------- | |
[+] Start inverting number: 4241186467 |
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
<?php | |
// download @ http://sourceforge.net/projects/simplehtmldom/ | |
require_once('simple_html_dom.php'); | |
$cities = array( | |
'almere','amsterdam','rotterdam' | |
); | |
$total = 0; | |
foreach($cities as $city) | |
{ |
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 | |
# find-password.py | |
# Find the admin password of your Huawei DSL modem | |
# | |
# Author: Bas van Dorst | |
import optparse | |
import urllib2 | |
import re |
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
<?php | |
/** | |
* Zend Framework | |
* | |
* LICENSE | |
* | |
* This source file is subject to the new BSD license that is bundled | |
* with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://framework.zend.com/license/new-bsd |
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
<?php | |
class BolController extends Zend_Controller_Action { | |
private function getSignature($date, $httpMethod, $url, $contentType, $queryParams) { | |
$signature = $httpMethod . "\n\n"; | |
$signature .= $contentType . "\n"; | |
$signature .= $date."\n"; | |
$signature .= "x-openapi-date:" . $date . "\n"; | |
$signature .= $url."\n"; |
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
<?php | |
class RegisterController extends Zend_Controller_Action { | |
public function init () | |
{ | |
$this->view->title = 'Register'; | |
$this->view->menu = 'home'; | |
} | |
public function indexAction() { |
NewerOlder