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
def recurse(li, depth = 3, result =[]): | |
if depth == 0: | |
return result | |
if not result: | |
return recurse(li, depth -1, zip(li) if depth > 1 else li) | |
else: | |
nr = [ (x,) + y for x in li for y in result] | |
return recurse(li, depth -1, nr) | |
recurse([0,1]) |
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 | |
use PhpAmqpLib\Connection\AMQPConnection; | |
use PhpAmqpLib\Message\AMQPMessage; | |
class RabbitMQ{ | |
private $AMQPConnection; | |
private $Channel; | |
private $queue_name; | |
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 selenium import webdriver | |
class PhantomJS(object): | |
""" | |
Starting PhantomJS and hooking with Selenium | |
Instantiate: | |
with PhantomJS() as phantomjs: | |
""" | |
def __init__(self, ssl= True, url = None): |