repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
alpha-beta-soup/errorgeopy | tests/test_geocoders.py | 1 | 6649 | import os
import encodings.idna
import pytest
import yaml
import geopy
import shapely
import errorgeopy.geocoders
@pytest.fixture
def addresses():
return (
'66 Great North Road, Grey Lynn, Auckland, 1021, New Zealand',
'Grey Lynn, Auckland, 1021, New Zealand',
'High Street, Lower Hutt, N... | mit | 523,301,348,730,464,060 | 34.747312 | 99 | 0.638893 | false |
onshape-public/onshape-clients | python/onshape_client/oas/models/card.py | 1 | 9994 | # coding: utf-8
"""
Onshape REST API
The Onshape REST API consumed by all clients. # noqa: E501
The version of the OpenAPI document: 1.113
Contact: api-support@onshape.zendesk.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
im... | mit | 5,214,020,824,491,918,000 | 38.976 | 82 | 0.537823 | false |
Wajihulhassan/SelfContainedPrevirt | tools/occam/occam/targets/ld.py | 1 | 7705 | # ------------------------------------------------------------------------------
# OCCAM
#
# Copyright © 2011-2012, SRI International
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redis... | bsd-3-clause | 6,475,538,266,495,347,000 | 46.850932 | 84 | 0.579439 | false |
HiroyukiAbe/pimouse_ros | scripts/lightsensors.py | 1 | 1406 | #!/usr/bin/env python
#encoding: utf8
import sys, rospy
from pimouse_ros.msg import LightSensorValues
def get_freq():
f = rospy.get_param('lightsensors_freq',10)
try:
if f <= 0.0:
raise Exception()
except:
rospy.logerr("value error: lightsensors_freq")
sys.exit(1)
return f
if __name__ == '__main__':
... | bsd-3-clause | -61,620,430,447,069,090 | 29.565217 | 78 | 0.45377 | false |
shadsbot/AutoCrop | CropImage.py | 1 | 4681 | from PIL import Image, ImageTk, ImageDraw
class Crop:
"""Object that contains the tools to manipulate a spritesheet"""
def __init__(self, file="example.png", cropSize=[64,64], padding=0, offset=[0,0], direction="Both", numberCrops=0, useUserCrops=False):
self.direction = direction
self.offset = {"x" : offset[0]... | mit | -8,013,426,775,849,068,000 | 33.681481 | 136 | 0.660543 | false |
wdv4758h/flake8 | flake8/engine.py | 1 | 11434 | # -*- coding: utf-8 -*-
import errno
import io
import platform
import re
import sys
import warnings
import pep8
from flake8 import __version__
from flake8 import callbacks
from flake8.reporter import (multiprocessing, BaseQReport, FileQReport,
QueueReport)
from flake8 import util
_flake8... | mit | 5,101,505,648,745,265,000 | 35.298413 | 79 | 0.620255 | false |
hughsaunders/keystone | keystone/common/ldap/core.py | 1 | 71345 | # Copyright 2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | apache-2.0 | -522,299,333,275,910 | 38.969188 | 79 | 0.571266 | false |
rphillips/bitbake | lib/bb/__init__.py | 1 | 4327 | # ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
#
# BitBake Build System Python Library
#
# Copyright (C) 2003 Holger Schurig
# Copyright (C) 2003, 2004 Chris Larson
#
# Based on Gentoo's portage.py.
#
# This program is free software; you can redistribute it and/or modify
# it... | gpl-2.0 | 6,545,991,354,082,631,000 | 30.816176 | 94 | 0.645251 | false |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/application_gateway_backend_health_py3.py | 1 | 1134 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -8,204,238,813,715,144,000 | 38.103448 | 113 | 0.631393 | false |
akaariai/django-reverse-unique | reverse_unique_tests/models.py | 1 | 3974 | from __future__ import unicode_literals
from datetime import date
from django.db import models
from django.db.models import Q, F
from django.utils.translation import get_language
from reverse_unique import ReverseUnique
def filter_lang():
return Q(lang=get_language())
class Article(models.Model):
pub_date... | bsd-3-clause | -8,017,831,775,881,084,000 | 26.79021 | 91 | 0.693256 | false |
kobotoolbox/kpi | kpi/management/commands/remove_duplicate_assetversions.py | 1 | 9498 | # coding: utf-8
import json
from collections import defaultdict
from hashlib import md5
from django.core.management.base import BaseCommand
from django.db import transaction
from ...models import Asset, AssetVersion
ROUGH_BATCH_MEM_LIMIT_MB = 100
MAX_BATCH_SIZE = 100
def find_original_and_duplicate_versions(versio... | agpl-3.0 | 5,937,014,375,773,076,000 | 39.589744 | 81 | 0.540114 | false |
mihaelacr/pydeeplearn | code/lib/trainingoptions.py | 1 | 1144 | """ Defines a training options class as a holder for options that can be passed
for training a neural network.
"""
__author__ = "Mihaela Rosca"
__contact__ = "mihaela.c.rosca@gmail.com"
import numpy as np
# TODO: move from common here
import common
class TrainingOptions(object):
def __init__(self, miniBatchSize,
... | bsd-3-clause | -2,303,735,449,736,076,000 | 32.647059 | 79 | 0.733392 | false |
Goldmund-Wyldebeast-Wunderliebe/raven-python | raven/contrib/django/client.py | 1 | 6779 | """
raven.contrib.django.client
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import logging
from django.conf import settings
from django.core.exceptions import Suspicio... | bsd-3-clause | 4,290,953,358,476,939,000 | 34.678947 | 129 | 0.569258 | false |
dallingham/regenerate | regenerate/writers/c_defines.py | 1 | 3670 | #
# Manage registers in a hardware design
#
# Copyright (C) 2008 Donald N. Allingham
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any... | gpl-2.0 | -6,252,778,430,328,302,000 | 32.981481 | 79 | 0.53188 | false |
sh-chris110/chris | python/cube.py | 1 | 5099 | import sys
from OpenGL.GL import *
from OpenGL.GLUT import *
from OpenGL.GLU import *
from PIL import Image
class MyPyOpenGLTest:
def __init__(self,
width=640,
height=480,
title='MyPyOpenGLTest'.encode()):
glutInit(sys.argv)
glutInitDisplayMode(GLU... | gpl-2.0 | -7,546,414,518,466,473,000 | 30.670807 | 68 | 0.513434 | false |
m1093782566/openstack_org_ceilometer | ceilometer/openstack/common/fileutils.py | 1 | 4033 | # Copyright 2011 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | apache-2.0 | 1,907,550,172,417,568,500 | 26.435374 | 78 | 0.661294 | false |
khughitt/cats | test/formatters/test_fasta.py | 1 | 1635 | """
FASTAFormatter tests.
"""
import cats
import io
import os
import pytest
class TestFASTAFormatter:
@pytest.mark.parametrize('filename', [
'dna.fasta',
'dna_grep.fasta',
'dna.txt',
'dna_grep.txt',
'dna_zgrep.txt',
'rna.txt',
'rna_grep.txt',
'protein... | bsd-2-clause | 1,545,673,285,899,150,600 | 28.196429 | 78 | 0.529052 | false |
USDA-ARS-NWRC/AWSF | awsm/interface/smrf_ipysnobal.py | 1 | 12538 | """
Functions for running PySnobal as well as SMRF and Pysnobal
threaded together
20170731 Micah Sandusky
"""
from datetime import datetime
import numpy as np
import pandas as pd
import pytz
import smrf.framework
from topocalc.shade import shade
from smrf.envphys import sunang
from smrf.utils import queue
from awsm... | gpl-3.0 | -4,230,425,102,818,562,600 | 30.822335 | 86 | 0.544664 | false |
XianliangJ/collections | DCTCPTest/plot_queue.py | 1 | 2255 | '''
Plot queue occupancy over time
'''
from helper import *
import plot_defaults
from matplotlib.ticker import MaxNLocator
from pylab import figure
parser = argparse.ArgumentParser()
parser.add_argument('--files', '-f',
help="Queue timeseries output to one plot",
required=True... | gpl-3.0 | 1,796,765,571,080,518,000 | 26.839506 | 114 | 0.534812 | false |
diggcoin/diggcoin | qa/rpc-tests/p2p-acceptblock.py | 1 | 12336 | #!/usr/bin/env python2
#
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
import time
from... | mit | -6,203,074,944,724,320,000 | 41.537931 | 107 | 0.634484 | false |
hunter-87/binocular-dense-stereo | sfm_templeRing.py | 1 | 4749 | import cv2
import numpy as np
import scipy.spatial
#!/usr/bin/env python
#coding: utf8
import os
from matplotlib.pyplot import subplot
import matplotlib.pyplot as plt
# figsize(12,8)
T1 = cv2.imread('../dataset_templeRing/templeR0034.png', cv2.IMREAD_GRAYSCALE)
sift = cv2.SIFT(nfeatures=5000)
kpts1, D_i = sift.detec... | gpl-2.0 | -5,787,413,777,145,128,000 | 25.836158 | 84 | 0.562855 | false |
jeffpiazza/derbynet | extras/scripts/lib/read_barcode.py | 1 | 2226 | #!/usr/bin/env python
import struct
import sys
scanner_device = sys.argv[1]
# Values taken from include/uapi/linux/input-event-codes.h
keys = {
2: '1', 3: '2', 4: '3', 5: '4', 6: '5', 7: '6', 8: '7', 9: '8', 10: '9', 11: '0', \
12: '-', 13: '=', \
16: 'q', 17: 'w', 18: 'e', 19: 'r', 20: 't', 21: 'y', 22: 'u', 23: 'i... | mit | -1,319,456,822,116,887,600 | 29.081081 | 91 | 0.469901 | false |
jbloom/mapmuts | tests/test_pyPdf.py | 1 | 1037 | """Tests for availability of ``pyPdf``.
Written by Jesse Bloom, 2013.
"""
import sys
import unittest
import mapmuts.weblogo
class TestPyPdfAvailable(unittest.TestCase):
"""Tests for availability of ``pyPdf``."""
def test_Import(self):
"""Is ``pyPdf`` available?
"""
sys.stderr.write(... | gpl-3.0 | -3,047,990,469,092,769,000 | 30.424242 | 82 | 0.613308 | false |
rwth-ti/gr-ofdm | python/ofdm/qa_midamble_insert.py | 1 | 1229 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2014 <+YOU OR YOUR COMPANY+>.
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#... | gpl-3.0 | 670,335,775,076,355,300 | 28.97561 | 70 | 0.692433 | false |
kubeflow/kfserving | docs/samples/v1beta1/triton/torchscript/image_transformer_v2/image_transformer_v2.py | 1 | 1981 | # Copyright 2019 kubeflow.org.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | apache-2.0 | -6,574,397,262,375,359,000 | 31.47541 | 90 | 0.647148 | false |
ipselium/cpyvke | cpyvke/objects/panel.py | 1 | 28277 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright © 2016-2018 Cyril Desjouy <ipselium@free.fr>
#
# This file is part of cpyvke
#
# cpyvke is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either vers... | gpl-3.0 | -6,112,869,070,022,161,000 | 30.439377 | 115 | 0.539096 | false |
pdl30/pynoncode | pynoncode/fasta_parsers.py | 1 | 3648 | #!/usr/bin/python
########################################################################
# 28 Apr 2014
# Patrick Lombard, Centre for Stem Stem Research
# Core Bioinformatics Group
# University of Cambridge
# All right reserved.
########################################################################
import argparse... | gpl-2.0 | 8,414,638,851,961,033,000 | 25.064286 | 72 | 0.584704 | false |
eklinkhammer/gym-ctf | gym_ctf/state/flag.py | 1 | 3158 | import numpy as np
import random
import math
class Flag():
""" A flag is target that agents use to score in capture the flag.
Once captured, it is marked as taken and stores the scoring team.
"""
def __init__(self, pos, scoring_radius):
assert scoring_radius >= 0
self.... | mit | 6,347,739,872,781,049,000 | 33.703297 | 80 | 0.578214 | false |
gajim/python-nbxmpp | nbxmpp/modules/register/util.py | 1 | 4233 | # Copyright (C) 2018 Philipp Hörist <philipp AT hoerist.com>
#
# This file is part of nbxmpp.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your opt... | gpl-3.0 | 3,761,805,763,904,235,000 | 31.305344 | 75 | 0.661153 | false |
nvbn/coviolations_web | nodes/tests/test_create_images.py | 1 | 1789 | import sure
from mock import MagicMock
from django.core.management import call_command
from django.test import TestCase
from ..management.commands import create_images
class CreateImagesCase(TestCase):
"""Create images case"""
def setUp(self):
self._mock_connect_to_node()
self._mock_logger()
... | mit | 1,887,358,779,549,905,700 | 34.078431 | 75 | 0.643376 | false |
thomasmoelhave/TerraNNI | data-generator.py | 1 | 2762 | #!/usr/bin/env python
# encoding: utf-8
import sys
import os
import math
import random
from optparse import OptionParser
# Simple function to write out results in a (which contains three arrays) to file fn
def writeArray(fn, a):
if fn:
f = open(fn, 'w')
for i in range(0,len(a)):
f.write("%f %f %f %d\n" % (a[i... | gpl-3.0 | -3,000,724,322,534,402,000 | 25.815534 | 118 | 0.60391 | false |
lym/allura-git | Allura/allura/lib/utils.py | 1 | 20481 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (t... | apache-2.0 | 4,468,536,068,037,648,400 | 30.953198 | 92 | 0.609541 | false |
jbalm/ActuarialCashFlowModel | liability/liability_data/Liabilities_data.py | 1 | 3997 | ## Progam packages
from ..Model_Point import Model_Point
## Python packages
import datetime as dt
from xlrd import open_workbook
import xlrd
import numpy as np
import xlwings as xw
class Liabilities_data(object):
"""
Objective:
==========
This class is meant to build up the policyholders d... | gpl-3.0 | -3,551,808,631,612,540,000 | 41.084211 | 193 | 0.470603 | false |
fwenzel/millimeter | apps/shortener/tests.py | 1 | 4985 | import random
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.test import client, TestCase
from lib import base62
from .models import AutoSlug, Link
class ShortenerTestCase(TestCase):
"""Base TestCase for all Shortener tests"""
def setUp(self):
... | bsd-3-clause | -1,856,158,805,643,254,500 | 33.143836 | 83 | 0.584353 | false |
insolite/alarme | tests/test_core/test_action.py | 1 | 1420 | from unittest.mock import MagicMock
from asynctest import CoroutineMock
from alarme import Action
from tests.common import BaseTest
class ActionTest(BaseTest):
def setUp(self):
super().setUp()
self.app = MagicMock()
self.id = MagicMock()
self.action = Action(self.app, self.id)
... | mit | -6,345,220,306,105,214,000 | 27.4 | 85 | 0.659859 | false |
jcsp/manila | manila/tests/share/drivers/netapp/dataontap/client/test_client_cmode.py | 1 | 129099 | # Copyright (c) 2014 Alex Meade. All rights reserved.
# Copyright (c) 2015 Clinton Knight. All rights reserved.
# Copyright (c) 2015 Tom Barron. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may ob... | apache-2.0 | -2,452,308,389,529,523,000 | 36.012328 | 79 | 0.547084 | false |
jmoss2020/moss-advprog | Shapes.py | 1 | 3209 | class Circle():
def __init__(self, r):
self.r = r
def area(self):
return (self.r ** 2) * 3.14
def perimeter(self):
return self.r * 6.28
def __str__(self):
return "Circle has a radius of %.2f, an area of %.2f, and a perimeter of %.2f." % (self.r, self.area, self.perimet... | gpl-3.0 | 700,869,985,878,508,000 | 27.651786 | 196 | 0.569959 | false |
alexryndin/ambari | ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py | 1 | 20188 | #!/usr/bin/env python
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License")... | apache-2.0 | -1,059,206,473,547,598,500 | 46.952494 | 160 | 0.553101 | false |
chancecoin/chancecoin | lib/blocks.py | 1 | 25711 | """
Initialise database.
Sieve blockchain for Chancecoin transactions, and add them to the database.
"""
import os
import time
import binascii
import struct
import decimal
D = decimal.Decimal
import logging
from . import (config, exceptions, util, bitcoin)
from . import (send, order, btcpay, bet, burn, cancel)
def ... | mit | -4,809,523,319,590,503,000 | 42.271044 | 139 | 0.484846 | false |
petroniocandido/pyFTS | pyFTS/benchmarks/Tests.py | 1 | 4575 |
import numpy as np
import pandas as pd
from pyFTS.benchmarks.Measures import acf
def BoxPierceStatistic(data, h):
"""
Q Statistic for Box-Pierce test
:param data:
:param h:
:return:
"""
n = len(data)
s = 0
for k in np.arange(1, h + 1):
r = acf(data, k)
s += r ** ... | gpl-3.0 | -8,407,978,959,963,033,000 | 26.383234 | 105 | 0.56265 | false |
jonathanhowells/sentimentCSV | sentimentCSV.py | 1 | 4119 | import os
import subprocess
import sys
import timeit
import csv
import pandas as pd
import re
import string
import numpy as np
import shutil
directory = os.getcwd()
os.chdir(directory)
stanford_directory = raw_input("Enter path to Stanford CoreNLP: ")
input_filename = raw_input("Enter input csv filename: ")
output_... | gpl-2.0 | 6,229,005,747,004,761,000 | 26.278146 | 112 | 0.62151 | false |
MalmoUniversity-DA366A/calvin-base | calvin/runtime/north/calvincontrol.py | 1 | 20945 | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | apache-2.0 | -3,372,114,627,838,210,600 | 32.836834 | 195 | 0.575651 | false |
lyzardiar/RETools | PublicTools/bin/tools/packLuaJit.py | 1 | 1726 | #coding=utf-8
import os
import os.path
import shutil
import sys
import getopt
import string
import fnmatch
import md5
import hashlib
import zipfile
import time
import threading
import struct
from pprint import pprint
from struct import *
projectdir = os.path.dirname(os.path.realpath(__file__))
compileBin = os.pa... | mit | 5,455,863,543,919,101,000 | 26.854839 | 81 | 0.598494 | false |
CIGIHub/greyjay | greyjay/themes/models.py | 1 | 4991 | from __future__ import absolute_import, division, unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from modelcluster.fields import ParentalKey
from modelcluster.models import ClusterableModel
from wagtail.wagtailadmin.edit_handlers import (
FieldPanel,
... | mit | -7,877,395,620,834,723,000 | 23.707921 | 106 | 0.651773 | false |
devilry/devilry-django | devilry/devilry_frontpage/cradminextensions/listbuilder/listbuilder_role.py | 1 | 5167 | from django.contrib.auth import get_user_model
from django.urls import reverse
from django.utils.translation import pgettext_lazy
from cradmin_legacy import crapp
from cradmin_legacy.crinstance import reverse_cradmin_url
from cradmin_legacy.viewhelpers import listbuilder
from devilry.devilry_cradmin import devilry_lis... | bsd-3-clause | 8,373,252,969,505,380,000 | 30.315152 | 99 | 0.660538 | false |
serkansokmen/qn | qn/wsgi.py | 1 | 2213 | """
WSGI config for qn project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`` setti... | bsd-3-clause | 1,427,026,455,742,831,900 | 34.126984 | 79 | 0.729327 | false |
chiara-paci/costruttoridimondi | costruttoridimondi/functional_tests/test_sharing.py | 1 | 1528 | from selenium import webdriver
from . import pages,base
class SharingTest(base.MultiuserFunctionalTest):
def test_logged_in_users_stories_are_saved_as_my_stories(self):
# Edith is a logged-in user
self.set_browser('edith@example.com',size=(700,900),position=(0,0))
# Her friend Oniciferous... | gpl-3.0 | 7,599,141,757,490,930,000 | 36.268293 | 120 | 0.644634 | false |
jpancoast/aws-py-tools | checkSGForOutboundAll.py | 1 | 1424 | #!/usr/bin/env python
import sys
import signal
import boto.ec2
import operator
import getopt
from lib.AWSPyTools import ParseOptions
from lib.AWSPyTools import AWSPyTools
def main(argv):
signal.signal(signal.SIGINT, signal_handler)
po = ParseOptions(sys.argv)
(env, region, vpc_id) = po.getAwsOptions()
... | gpl-2.0 | -3,898,750,051,795,106,300 | 26.921569 | 200 | 0.605337 | false |
tkerola/chainer | tests/chainerx_tests/unit_tests/routines_tests/test_math.py | 1 | 72049 | import chainer
import numpy
import pytest
import chainerx
import chainerx.testing
from chainerx_tests import array_utils
from chainerx_tests import dtype_utils
from chainerx_tests import math_utils
from chainerx_tests import op_utils
_in_out_dtypes_arithmetic_invalid = [
(('bool_', 'bool_'), 'bool_'),
(('bo... | mit | 5,094,575,712,246,725,000 | 31.929159 | 79 | 0.548557 | false |
barentsen/dave | diffimg/fastpsffit.py | 1 | 4310 | # -*- coding: utf-8 -*-
"""
Created on Mon Nov 19 16:39:13 2018
A much faster PRF fitter, with the caveat that the psf model is hardcoded.
psffit.py can fit an arbitrary PSF model to an image. The cost of this flexibility
is that it must perform numerical intergration to calculate the flux in each pixel.
This is slo... | mit | 5,773,724,286,923,327,000 | 24.502959 | 93 | 0.639675 | false |
caedesvvv/b2rex | scripts/b2rexpkg/charexporter.py | 1 | 8874 | """
RealXtend character exporter
"""
import os
import b2rexpkg
from b2rexpkg.siminfo import GridInfo
from b2rexpkg.simconnection import SimConnection
from b2rexpkg.ogre_exporter import OgreExporter
from b2rexpkg.hooks import reset_uuids
from ogrepkg.base import indent
from ogrepkg.armatureexport import GetArmatureObj... | lgpl-3.0 | -3,429,808,671,769,813,000 | 37.751092 | 102 | 0.564683 | false |
ARM-software/bob-build | tests/source_encapsulation/gen_fun3.py | 1 | 2535 | #!/usr/bin/env python
# Copyright 2020 Arm Limited.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#... | apache-2.0 | -6,791,542,741,674,078,000 | 32.355263 | 98 | 0.589349 | false |
hugollm/lie2me | tests/test_form.py | 1 | 6803 | from unittest import TestCase
from lie2me import Form, fields
from lie2me.exceptions import BadValidation
class FormTestCase(TestCase):
def test_form_without_fields_is_always_valid(self):
form = Form({'foo': 'bar'})
form.submit()
self.assertEqual(form.errors, {})
def test_before_sub... | mit | -5,037,487,307,387,595,000 | 28.969163 | 92 | 0.5208 | false |
zenn1989/scoria-interlude | L2Jscoria-Game/data/scripts/quests/125_IntheNameofEvilPart1/__init__.py | 1 | 6260 | import sys
from com.l2scoria.gameserver.datatables import SkillTable
from com.l2scoria.gameserver.model.quest import State
from com.l2scoria.gameserver.model.quest import QuestState
from com.l2scoria.gameserver.model.quest.jython import QuestJython as JQuest
qn = "125_IntheNameofEvilPart1"
# NPCs
MUSHIKA = 32114
... | gpl-3.0 | 3,013,677,245,302,723,600 | 29.691176 | 118 | 0.652236 | false |
wannabeCitizen/projectsystem | lib/verify.py | 1 | 2667 | """
For handling permission and verification requests
"""
import json
import datetime
from lib.model import User, Organization, MiniOrganization, IdeaMeta, Project
#Checks if someone is an owner of an organization they are trying to modify
def is_owner(org_id, user_id):
my_org = Organization.objects.get(unique=or... | mit | 8,657,110,029,647,846,000 | 29.306818 | 84 | 0.665542 | false |
credativ/pulp | server/test/unit/server/webservices/views/test_consumers.py | 1 | 76384 | import json
import unittest
import mock
from django.http import HttpResponseBadRequest
from base import assert_auth_CREATE, assert_auth_DELETE, assert_auth_READ, assert_auth_UPDATE
from pulp.server.exceptions import (InvalidValue, MissingResource, MissingValue,
OperationPostponed, ... | gpl-2.0 | -1,395,906,513,170,108,400 | 46.414029 | 100 | 0.639558 | false |
pmghalvorsen/gramps_branch | gramps/gui/filters/sidebar/_sidebarfilter.py | 1 | 9432 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2006 Donald N. Allingham
# Copyright (C) 2010 Nick Hall
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either v... | gpl-2.0 | 512,867,680,985,231,900 | 33.423358 | 95 | 0.586514 | false |
Bioto/Huuey-python | huuey/hue/lights/light.py | 1 | 2617 | from huuey.hue.state import State
from huuey.paths import Paths
class Light:
"""
Description:
Holds data for a single Light from the hues API
Attrs:
state: Holds instance of State()
name: Name of the group
modelid: Type of Light
swversion: Software Version
... | mit | -8,591,549,799,090,077,000 | 24.163462 | 71 | 0.504776 | false |
eviljeff/olympia | src/olympia/files/tests/test_admin.py | 1 | 3053 | from django.utils.encoding import force_text
from olympia.amo.tests import TestCase, addon_factory, user_factory
from olympia.amo.urlresolvers import reverse
class TestFileAdmin(TestCase):
def setUp(self):
self.list_url = reverse('admin:files_file_changelist')
def test_can_list_files_with_admin_adva... | bsd-3-clause | 1,612,477,954,414,876,000 | 38.649351 | 71 | 0.63151 | false |
sergesyrota/Splunk-license-watchdog | splunk-license-watchdog.py | 1 | 11265 | #!/usr/bin/env python
##################
#
# DEPENDENCIES
#
# Python 2.6+
# Python packages: sys, getopt, requests, time
# Splunk: 4.2+
#
##################
from __future__ import print_function
#
# CONFIGURATION
#
# Authentication information for your Splunk setup
_splunkUser = "user"
_splunkPass = "pass"
# host ... | mit | -5,825,861,814,609,172,000 | 44.06 | 370 | 0.653262 | false |
calico/basenji | bin/basenji_fetch_app2.py | 1 | 10874 | #!/usr/bin/env python
from optparse import OptionParser
import collections
import functools
import os
import pdb
import sys
import numpy as np
import pandas as pd
import h5py
from google.cloud import bigquery
import dash
import dash_table as dt
import dash.dependencies as dd
import dash_core_components as dcc
import... | apache-2.0 | 4,630,189,006,834,960,000 | 30.068571 | 86 | 0.469101 | false |
OpenTTD-Ladder/ladder-web | ladder/matchmaking/admin.py | 1 | 1149 | from django.contrib import admin
from translations.admin import TranslationInline
from .models import Ladder, LadderTranslation
class LadderTranslationAdmin(TranslationInline):
model = LadderTranslation
class LadderAdmin(admin.ModelAdmin):
inlines = [LadderTranslationAdmin]
fieldsets = (
(None,... | gpl-2.0 | -7,043,679,489,068,449,000 | 31.857143 | 74 | 0.575283 | false |
JshWright/home-assistant | homeassistant/components/notify/telegram.py | 2 | 6078 | """
Telegram platform for notify component.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/notify.telegram/
"""
import io
import logging
import urllib
import requests
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from ho... | apache-2.0 | -8,644,028,738,815,384,000 | 31.15873 | 78 | 0.607108 | false |
wangjeaf/CSSCheckStyle | setup.py | 1 | 2417 | #!/usr/bin/env python
#
# Copyright 2012 The CSSCheckStyle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... | bsd-3-clause | -7,363,632,864,279,290,000 | 31.226667 | 85 | 0.65784 | false |
joshmoore/zeroc-ice | java/test/Freeze/fileLock/run.py | 1 | 1622 | #!/usr/bin/env python
# **********************************************************************
#
# Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# *************************************... | gpl-2.0 | -2,917,443,800,651,901,400 | 31.44 | 103 | 0.634402 | false |
ibackus/diskpy | diskpy/ICgen/sigma_profile.py | 1 | 9111 | # -*- coding: utf-8 -*-
"""
Created on Mon Jun 23 10:17:53 2014
@author: ibackus
"""
# External modules
import numpy as np
import pynbody
SimArray = pynbody.array.SimArray
# diskpy modules
from diskpy.pdmath import smoothstep
from diskpy.utils import match_units
def make_profile(ICobj):
"""
A wrapper for g... | mit | -394,328,247,553,542,200 | 25.955621 | 89 | 0.584897 | false |
TheArtling/django-active-users-stats | active_users/tests/test_settings.py | 1 | 1637 | """Settings that need to be set in order to run the tests."""
import os
DEBUG = True
SITE_ID = 1
APP_ROOT = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..'))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
ROOT_URLCONF = 'active_... | mit | 5,655,990,248,203,060,000 | 23.432836 | 65 | 0.654856 | false |
erigones/esdc-ce | api/dc/template/api_views.py | 1 | 3081 | from django.utils.translation import ugettext_noop as _
from api import status
from api.api_views import APIView
from api.exceptions import PreconditionRequired, ObjectAlreadyExists
from api.task.response import SuccessTaskResponse
from api.utils.db import get_object
from api.dc.utils import remove_dc_binding_virt_obj... | apache-2.0 | 5,641,864,116,140,040,000 | 37.037037 | 119 | 0.586173 | false |
isralopez/geonode | setup.py | 1 | 5140 | #########################################################################
#
# Copyright (C) 2012 OpenPlans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
#... | gpl-3.0 | -7,154,889,025,022,198,000 | 35.197183 | 104 | 0.609728 | false |
hradec/cortex | test/IECoreHoudini/FromHoudiniPointsConverter.py | 1 | 49213 | ##########################################################################
#
# Copyright 2010 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios),
# its affiliates and/or its licensors.
#
# Copyright (c) 2010-2015, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary ... | bsd-3-clause | 3,866,630,561,449,466,000 | 46.919182 | 155 | 0.708268 | false |
SimpleGeometry/bisv-ml | kaggle-titanic/model.py | 1 | 3219 | import pandas as pd
from sklearn.tree import DecisionTreeClassifier #not Regressor
from sklearn.linear_model import LogisticRegression
from sklearn.neural_network import MLPClassifier
from sklearn.gaussian_process import GaussianProcessClassifier
from sklearn.svm import SVC
from sklearn.gaussian_process.kernels import ... | mit | 4,619,664,483,775,947,000 | 29.367925 | 123 | 0.706431 | false |
bung87/django-moe-auth | setup.py | 1 | 1126 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# import codecs
# import os
from distutils.core import setup
from setuptools import find_packages
# version_tuple = __import__('django_js_reverse').VERSION
# version = '.'.join([str(v) for v in version_tuple])
setup(
name='django-moe-auth',
version='0.0.1',
cl... | mit | -3,784,006,114,095,165,400 | 29.432432 | 73 | 0.618117 | false |
revdotcom/babelsubs | babelsubs/utils.py | 2 | 7601 | import re
import bleach
import htmllib
import htmlentitydefs
import formatter
from itertools import chain
from xmlconst import *
DEFAULT_ALLOWED_TAGS = ['i', 'b', 'u']
MULTIPLE_SPACES = re.compile('\s{2,}')
BLANK_CHARS = re.compile('[\n\t\r]*')
# We support unsyced subs, meaning there is not timing data for them
# in... | bsd-3-clause | 4,482,841,142,669,328,000 | 33.393665 | 129 | 0.616629 | false |
markfasheh/ocfs2-tools | ocfs2console/ocfs2interface/mount.py | 1 | 5115 | # OCFS2Console - GUI frontend for OCFS2 management and debugging
# Copyright (C) 2002, 2005 Oracle. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of th... | gpl-2.0 | 519,026,439,820,794,300 | 27.416667 | 76 | 0.608798 | false |
ProjectQ-Framework/FermiLib | src/fermilib/utils/_trotter_error_test.py | 1 | 6490 | # Copyright 2017 ProjectQ-Framework (www.projectq.ch)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | apache-2.0 | 837,469,697,044,621,600 | 38.333333 | 79 | 0.642527 | false |
tadamic/sokoenginepy | src/sokoenginepy/tessellation/hexoban_tessellation/hexoban_tessellation.py | 1 | 3295 | from ...utilities import COLUMN, ROW, index_1d, inverted, is_on_board_2d
from ..direction import Direction, UnknownDirectionError
from ..tessellation_base import TessellationBase, TessellationBaseInheritableDocstrings
class HexobanTessellation(
TessellationBase, metaclass=TessellationBaseInheritableDocstrings
):
... | gpl-3.0 | -4,547,235,167,960,441,300 | 34.053191 | 87 | 0.598786 | false |
tolteck/stripe_mock_server | localstripe/errors.py | 1 | 1326 | # -*- coding: utf-8 -*-
# Copyright 2017 Adrien Vergé
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program... | gpl-3.0 | 9,209,162,390,930,675,000 | 32.974359 | 71 | 0.678491 | false |
lanhel/pyzombie | setup/lib/distutils_local/build_docutils.py | 1 | 4094 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#-------------------------------------------------------------------------------
"""test
Implements a Distutils 'test' command."""
__author__ = ('Lance Finn Helsten',)
__version__ = '1.0.1'
__copyright__ = """Copyright 2009 Lance Finn Helsten (helsten@acm.org)"""
__license... | apache-2.0 | -7,969,874,219,492,791,000 | 37.990476 | 148 | 0.586957 | false |
yxdong/ybk | ybk/lighttrade/sysframe/client.py | 1 | 7588 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
import random
import logging
from concurrent.futures import ThreadPoolExecutor
import requests
from requests.packages.urllib3.util import is_connection_dropped
import xmltodict
from .protocol import (UserProtocol, TradeProtocol,
MoneyP... | mit | 2,448,941,336,220,080,600 | 32.707763 | 77 | 0.518288 | false |
tensorflow/tpu | models/experimental/show_and_tell/show_and_tell_model.py | 1 | 13116 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 4,280,079,833,549,058,000 | 34.448649 | 80 | 0.658432 | false |
mganeva/mantid | scripts/HFIR_4Circle_Reduction/optimizelatticewindow.py | 1 | 3900 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
#pylint: disable=C0103
from __future__ import... | gpl-3.0 | -8,642,162,336,785,655,000 | 27.057554 | 101 | 0.554103 | false |
alexandregz/simian | src/simian/util/compile_js.py | 1 | 1961 | #!/usr/bin/env python
#
# Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | apache-2.0 | 2,229,931,755,863,811,600 | 31.147541 | 92 | 0.721061 | false |
gonicus/gosa | doc/sphinx-cindex/setup.py | 1 | 1188 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
long_desc = '''
This package contains the cindex Sphinx extension.
Allows declaring cindex specs wherever in the documentation (for instance,
in docstrings of UnitTest.test_* methods) and displaying them as a single
list.
'''
... | lgpl-2.1 | -4,032,579,850,245,826,600 | 27.285714 | 74 | 0.648148 | false |
npawelek/rpc-maas | playbooks/files/rax-maas/plugins/neutron_api_local_check.py | 1 | 3562 | #!/usr/bin/env python
# Copyright 2014, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | apache-2.0 | -165,083,766,257,173,760 | 36.104167 | 74 | 0.623526 | false |
billzorn/msp-pymodel | lib/msp_assem.py | 1 | 7687 | import msp_fr5969_model as model
from msp_isa import isa
# low level wrappers for isa methods
def _as(fmt, name, smode, dmode, fields):
ins = isa.modes_to_instr(fmt, name, smode, dmode)
#print('{:s} {:s} {:s} {:s}'.format(name, smode, dmode, repr(fields)))
words = isa.inhabitant(ins, fields)
return wo... | mit | 1,911,821,831,308,556,000 | 33.164444 | 89 | 0.525433 | false |
myfavouritekk/TPN | tools/propagate/sequence_roi_propagation.py | 1 | 6286 | #!/usr/bin/env python
# --------------------------------------------------------
# Test regression propagation on ImageNet VID video
# Modified by Kai KANG (myfavouritekk@gmail.com)
# --------------------------------------------------------
"""Test a Fast R-CNN network on an image database."""
import argparse
import... | mit | 6,455,828,710,421,682,000 | 37.802469 | 92 | 0.592587 | false |
skoolkid/pyskool | pyskool/game.py | 1 | 20282 | # -*- coding: utf-8 -*-
# Copyright 2008, 2010, 2012-2015 Richard Dymond (rjdymond@gmail.com)
#
# This file is part of Pyskool.
#
# Pyskool is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of t... | gpl-3.0 | -2,794,995,661,869,815,300 | 36.769088 | 131 | 0.580613 | false |
TomasTomecek/osbs | osbs/exceptions.py | 1 | 1766 | """
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
Exceptions raised by OSBS
"""
from traceback import format_tb
class OsbsException(Exception):
def __init__(self, message=None, cause=None... | bsd-3-clause | -7,734,197,998,496,036,000 | 29.982456 | 78 | 0.61778 | false |
baderj/domain_generation_algorithms | proslikefan/dga.py | 1 | 1425 | import argparse
from ctypes import c_int
from datetime import datetime
def dga(date, magic, tlds):
# tlds = ["eu", "biz", "se", "info", "com", "net", "org", "ru", "in",
# "name"]
for i in range(10):
for tld in tlds:
seed_string = '.'.join([str(s) for s in
[ma... | gpl-2.0 | -7,406,160,187,670,002,000 | 32.139535 | 85 | 0.490526 | false |
fujicoin/fujicoin | test/functional/wallet_listreceivedby.py | 1 | 8103 | #!/usr/bin/env python3
# Copyright (c) 2014-2019 The Fujicoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the listreceivedbyaddress RPC."""
from decimal import Decimal
from test_framework.test_framework... | mit | -8,886,061,812,897,744,000 | 46.385965 | 197 | 0.623473 | false |
maoy/zknova | nova/api/openstack/compute/contrib/security_groups.py | 1 | 21752 | # Copyright 2011 OpenStack LLC.
# Copyright 2012 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/license... | apache-2.0 | 8,453,430,313,926,961,000 | 36.37457 | 79 | 0.594796 | false |
vaidap/zulip | zerver/views/home.py | 1 | 11809 | from __future__ import absolute_import
from typing import Any, List, Dict, Optional, Text
from django.conf import settings
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, HttpResponse, HttpRequest
from django.shortcuts import redirect, render
from django.utils import translat... | apache-2.0 | -5,072,437,405,447,221,000 | 43.394737 | 109 | 0.65594 | false |
abhishekraok/GraphMap | graphmap/tree_viewer.py | 1 | 3451 | import imagetree
import serializer
from utilities import quadkey_to_xyz, xyz_to_quadkey, is_valid_quadkey
from serializer import create_tree_from_jpg_url
import commander
import constants
import sys
valid_commands = ['+', '-', 'l', 'r', 'u', 'd', 's']
def tree_viewer_valid_input(input_command):
return input_comm... | apache-2.0 | -6,180,173,991,250,044,000 | 37.775281 | 118 | 0.578093 | false |
Denvi/FlatCAM | FlatCAMWorker.py | 1 | 1587 | from PyQt4 import QtCore
class Worker(QtCore.QObject):
"""
Implements a queue of tasks to be carried out in order
in a single independent thread.
"""
# avoid multiple tests for debug availability
pydevd_failed = False
task_completed = QtCore.pyqtSignal(str)
def __init__(self, app, n... | mit | 5,585,728,055,401,166,000 | 25.898305 | 78 | 0.559546 | false |
beobal/cassandra-dtest | upgrade_tests/upgrade_through_versions_test.py | 1 | 37299 | import operator
import os
import pprint
import random
import signal
import time
import uuid
import logging
import pytest
import psutil
from collections import defaultdict, namedtuple
from multiprocessing import Process, Queue
from queue import Empty, Full
from cassandra import ConsistencyLevel, WriteTimeout
from cass... | apache-2.0 | 3,305,505,099,905,590,300 | 42.726846 | 168 | 0.627014 | false |
jlevy/ghizmo | ghizmo/main.py | 1 | 5270 | #!/usr/bin/env python
"""
If commands require input, it must be line-delimited JSON (e.g. quoted strings).
For further documentation, see: https://github.com/jlevy/ghizmo
"""
import logging as log
import sys
import os
import argparse
from ghizmo.commands.lib import to_bool
__author__ = 'jlevy'
NAME = "ghizmo"
VERSI... | apache-2.0 | 2,092,159,499,555,018,800 | 30.746988 | 112 | 0.659013 | false |
charleskorn/batect | wrapper/unix/test/tests.py | 1 | 7224 | #! /usr/bin/env python3
import http.server
import os
import shutil
import socket
import subprocess
import tempfile
import threading
import unittest
class WrapperScriptTests(unittest.TestCase):
http_port = 8080
default_download_url = "http://localhost:" + str(http_port) + "/test/testapp.jar"
def setUp(se... | apache-2.0 | 5,619,094,956,247,502,000 | 39.58427 | 140 | 0.643411 | false |
engeens/pangolin | routes.py | 1 | 1523 | # -*- coding: utf-8 -*-
# This is an app-specific example router
#
# This simple router is used for setting languages from app/languages directory
# as a part of the application path: app/<lang>/controller/function
# Language from default.py or 'en' (if the file is not found) is used as
# a default_language
#
# ... | gpl-3.0 | -6,541,904,693,397,986,000 | 39.078947 | 87 | 0.676297 | false |
demin-dmitriy/almost-haskell | src/AHLexerTest.py | 1 | 10390 | from unittest import TestCase
from AHLexer import *
# Tests and helper methods that are common for PreLexer and AHLexer
class CommonLexerTestCase:
class BasicErrorListener:
def syntaxError(self, recogn, sym, line, column, msg, exc):
raise LexerError("some error %s" % msg, line, column, None)
... | mit | 3,729,728,006,217,532,000 | 31.28125 | 80 | 0.488771 | false |
gizmachi/ct_tools | gaol/gaol_lib.py | 1 | 1947 | import json
import urllib
import urllib2
import ssl
import base64
from lib import *
class sslparameters:
sslcontext = None
def get_opener():
try:
opener = urllib2.build_opener(urllib2.HTTPSHandler(context=sslparameters.sslcontext))
except TypeError:
opener = urllib2.build_opener(urllib2.H... | bsd-3-clause | 5,098,226,471,701,478,000 | 28.515152 | 93 | 0.608115 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.