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 logging | |
import os | |
import sys | |
import time | |
from auger.api.dataset import DataSet | |
from auger.api.model import Model | |
from auger.api.project import Project | |
from auger.api.experiment import Experiment, AugerExperimentSessionApi | |
from auger.api.utils.context import Context |
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 unittest | |
class PolandTestCase(unittest.TestCase): | |
def test_basic(self): | |
self.assertEqual(poland_eval('2 4 + 2 *'), 12) | |
def test_space_agnostic(self): | |
res1 = poland_eval('2 4+2*') | |
res2 = poland_eval('2 4 + 2*') |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import SocketServer | |
import SimpleHTTPServer | |
import urllib | |
import socket | |
import argparse | |
import webbrowser | |
import re |
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
""" | |
A number is called a circular prime if all of its rotations (rotations of their digits) are primes themselves. | |
For example the prime number 197 has two rotations: 971, and 719. Both of them are prime, so all of them are circular primes. | |
There are thirteen such primes below 100: 2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79, and 97. | |
How many circular primes are there below N if 1 <= N <= 1000000? | |
""" | |
from math import sqrt |
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 socket | |
from xml.etree import ElementTree as ET | |
import logging | |
from django.conf import settings | |
from .exceptions import TransactionError | |
if settings.PREMIERE_LOG_TO_DB: | |
from ..models import RequestLog |