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 | |
python3 bot.py |
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 gmpy, time, random, math | |
def genprime(bits): | |
p=1 | |
while(gmpy.is_prime(p)==0): | |
p = random.randrange(math.pow(2,bits-1),math.pow(2,bits)) | |
return p | |
BITS=20 | |
found=False |
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
openssl req -nodes -x509 -newkey rsa:2048 -keyout server.pem -out server.pem -days 1 && openssl s_server -tls1 -www -accept 1337 |
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 sleekxmpp | |
class Jabber(sleekxmpp.ClientXMPP): | |
def __init__(self, username, password, instance_name=None): | |
jid = "%s/%s" % (username, instance_name) if instance_name else username | |
super(Jabber, self).__init__(jid, password) | |
self.instance_name = instance_name | |
self.add_event_handler('session_start', self.start, threaded=False, disposable=True) | |
self.add_event_handler('message', self.receive, threaded=True, disposable=False) |
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
<div class="col-xs-12 col-sm-8 col-md-4 col-sm-offset-2 col-md-offset-4"> | |
<form role="form"> | |
<div class="row"> | |
<div class="col-xs-4 col-sm-4 col-md-4"> | |
<div class="form-group"> | |
<select name="" id="" class="form-control input-sm"> | |
<option value="mr">Mr.</option> | |
<option value="mrs">Mrs.</option> | |
<option value="miss">Miss</option> | |
<option value="ms">Ms.</option> |
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
#include <windows.h> | |
#if define UNICODE | |
#define RegOpenKeyEx RegOpenKeyExW | |
#define RegCreateKeyEx RegCreateKeyExW | |
#define RegDeleteKey RegDeleteKeyW | |
#else | |
#define RegOpenKeyEx RegOpenKeyExA | |
#define RegCreateKeyEx RegCreateKeyExA | |
#define RegDeleteKey RegDeleteKeyA |
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
""" | |
http://en.wikipedia.org/wiki/ID3_algorithm | |
http://www.cise.ufl.edu/~ddd/cap6635/Fall-97/Short-papers/2.htm | |
""" | |
from collections import namedtuple, Counter, defaultdict | |
from math import log2 |
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
//we are planning to use filter concatenation on three input videos | |
var filterchain = Filterchain.FilterTo<VideoStream>(new Concat()); | |
//we want our output to be encoded using the following settings: | |
// -c:v libx264 | |
// -b:v 3000k | |
// -s 852x480 | |
// -y | |
var settings = SettingsCollection.ForOutput( | |
new CodecVideo("libx264"), |
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 | |
from __future__ import print_function | |
# Try to import via python2 imports, if not possible them import Python3 | |
# versions of modules. | |
try: | |
from HTMLParser import HTMLParser | |
from urllib2 import urlopen | |
from urlparse import urljoin | |
except ImportError as e: | |
from html.parser import HTMLParser |
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 | |
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04 | |
# Inspired from https://gist.github.com/faleev/3435377 | |
# Remove any existing packages: | |
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev | |
# Get the dependencies (Ubuntu Server or headless users): | |
sudo apt-get update |
NewerOlder