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 externalPaymentAttributes(): | |
return { | |
'country': 'CH', | |
'email': self.host_emails[0] if self.host_emails else None, | |
'business_name': self.name, | |
#'business_tax_id_provided': False, | |
'tos_acceptance': { | |
'date': int(time.time()), | |
'ip': "185.90.38.128", | |
'user_agent': 'Cathedra Backend' |
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 random | |
summary = {"lose_inital":0, "win_initial":0, "lose":0, "win":0} | |
def game(switch=False): | |
fields = [False,False,False] | |
winField = random.randint(0,2) | |
fields[winField] = True | |
setField = random.randint(0,2) | |
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 math import radians, cos, sin, asin, sqrt, atan2, degrees | |
def _c(old): | |
direction = {'N':1, 'S':-1, 'E': 1, 'W':-1} | |
new = old | |
new = new.split() | |
new_dir = new.pop(0) | |
new.extend([0,0,0]) | |
x = (float(new[0])+float(new[1])/60.0+float(new[2])/3600.0) * direction[new_dir] | |
return x |
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 | |
namespace XXX\Tests\Document; | |
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | |
abstract class AbstractTest extends WebTestCase | |
{ | |
static $container; |
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 | |
# selenium - this script starts and stops the selenium grid | |
# | |
# chkconfig: - 85 15 | |
# description: Selenium Grid is a distributed testing platform for browser-based automation. | |
# processname: selenium | |
# pidfile: /etc/selenium/tmp/selenium.pid | |
# Source function library. | |
. /etc/rc.d/init.d/functions |
NewerOlder