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 |
|---|---|---|---|---|---|---|---|---|---|---|
apdjustino/DRCOG_Urbansim | src/opus_gui/results_manager/run/indicator_framework/visualizer/visualizers/matplotlib_lorenzcurve.py | 1 | 10890 | # Opus/UrbanSim urban simulation software.
# Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington
# See opus_core/LICENSE
import os, re, sys, time, traceback
from copy import copy
from opus_gui.results_manager.run.indicator_framework.visualizer.visualizers.abstract_visualizat... | agpl-3.0 | -796,952,061,882,075,500 | 40.724138 | 120 | 0.562075 | false |
dani-i/bachelor-project | file_experts/data_set/cifar10_data_set_preparations.py | 1 | 3240 | from file_experts.data_set.data_set_validator import DataSetValidator
from file_experts.data_set import data_set_creator
from time import sleep
import constants.create_data_set_constants as const
import file_experts.file_expert as fe
import urllib.request
import threading
import tarfile
class Cifar10DataSetPrepara... | apache-2.0 | 8,903,633,220,386,401,000 | 27.928571 | 77 | 0.52963 | false |
freemed/orthanc | Resources/Samples/Python/ChangesLoop.py | 1 | 2310 | #!/usr/bin/python
# Orthanc - A Lightweight, RESTful DICOM Store
# Copyright (C) 2012-2014 Medical Physics Department, CHU of Liege,
# Belgium
#
# 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, ... | gpl-3.0 | 8,063,557,085,211,736,000 | 25.860465 | 78 | 0.669697 | false |
MalloyDelacroix/DownloaderForReddit | DownloaderForReddit/gui/database_views/filter_input_widget.py | 1 | 5786 | from PyQt5.QtWidgets import QWidget, QLineEdit, QSpinBox, QComboBox, QDateTimeEdit, QSizePolicy
from PyQt5.QtCore import Qt, pyqtSignal
from sqlalchemy import Integer, String, DateTime, Enum, Boolean
from DownloaderForReddit.guiresources.database_views.filter_input_widget_auto import Ui_FilterInputWidget
from Download... | gpl-3.0 | 4,671,662,413,270,167,000 | 36.571429 | 119 | 0.612167 | false |
XYM1988/Algorithm | Chp8/8.1-General-Tree.py | 1 | 2720 | # Tree is an organizational relationship that is richer than the simple "before"
# and "after" relationships between objects in sequences.
# We define a tree T as a set of nodes storing elements such that the nodes have
# a parent-child relationship that satisfies the following properties:
# 1. If T is nonempty, it ha... | mit | -5,231,915,822,319,370,000 | 37.857143 | 86 | 0.649632 | false |
anthill-platform/anthill-social | anthill/social/model/social/facebook.py | 1 | 2400 |
import datetime
from anthill.common import to_int
from anthill.common.social import APIError
from anthill.common.social.apis import FacebookAPI
from .. social import SocialAPI, SocialAuthenticationRequired
from .. token import NoSuchToken
class FacebookSocialAPI(SocialAPI, FacebookAPI):
def __init__(self, appl... | mit | 5,517,608,928,784,957,000 | 29.379747 | 93 | 0.614167 | false |
NDKoehler/DataScienceBowl2017_7th_place | dsb3_networks/classification/resnet2D_0.7res_80/config_2Dfinal.py | 1 | 3207 | from collections import defaultdict
from datetime import datetime
import json
import tensorflow as tf
import os, sys
import pandas as pd
#config dic
H = defaultdict(lambda: None)
#All possible config options:
H['optimizer'] = 'MomentumOptimizer'#'RMSPropOptimizer'
H['learning_rate'] = 0.001
H['momentum'] = 0.9 #0.9... | mit | 1,141,336,467,683,056,600 | 35.033708 | 138 | 0.683505 | false |
hipnusleo/laserjet | resource/pypi/cryptography-1.7.1/tests/hazmat/primitives/test_pbkdf2hmac.py | 1 | 2440 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import pytest
from cryptography.exceptions import (
Already... | apache-2.0 | 3,596,000,000,704,236,500 | 35.538462 | 79 | 0.65123 | false |
duducosmos/pgs4a | private/lib/android/apk.py | 1 | 3947 | import os
import struct
import zipfile
import cStringIO
class SubFile(object):
def __init__(self, f, name, base, length):
self.f = f
self.base = base
self.offset = 0
self.length = length
self.name = name
self.f.seek(self.base)
def read(self, length=None):
... | lgpl-2.1 | 7,976,596,062,115,813,000 | 21.683908 | 87 | 0.478085 | false |
enthought/depsolver | depsolver/pool.py | 1 | 8318 | import collections
from .bundled.traitlets \
import \
HasTraits, Dict, Instance, List, Long, Unicode
from .errors \
import \
DepSolverError, MissingPackageInfoInPool
from .package \
import \
PackageInfo
from .repository \
import \
Repository
from .requirement \
impor... | bsd-3-clause | -270,076,686,273,748,060 | 33.658333 | 117 | 0.583914 | false |
pmoleri/memorize-accesible | speak/espeak_cmd.py | 1 | 2079 | # 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 later version.
#
# This program is distributed in the hope that it will be useful,
# bu... | gpl-2.0 | -3,199,728,626,601,833,000 | 31.484375 | 79 | 0.634921 | false |
lhellebr/GreenTea | apps/core/forms.py | 1 | 3210 | # Author: Pavel Studenik <pstudeni@redhat.com>
# Date: 24.9.2013
import difflib
import logging
from django import forms
import apps.core.views
from models import GroupTemplate, GroupTestTemplate, JobTemplate, Test
logger = logging.getLogger("main")
class HomepageForm(forms.Form):
ORDER_CHOICES = (
("r... | gpl-2.0 | 7,638,471,029,832,933,000 | 29.283019 | 83 | 0.597819 | false |
gfrances/model-based-social-simulations | experiments/all-agents-simple.py | 1 | 1661 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
# from experiments.src.exp import AggregateExperiment, MDPAgentConfiguration, SingleExperiment
from src.sequential_taskgen import SequentialTaskgen
from src.experiment import AggregateExperiment, MDPAgentConfiguration, SingleExperiment, LazyAgentConfigurat... | gpl-2.0 | -2,915,125,925,642,806,000 | 38.547619 | 114 | 0.718844 | false |
keithfancher/Blobulous | blobulous/enemy.py | 1 | 3919 | # Copyright 2011, 2012 Keith Fancher
#
# This file is part of Blobulous.
#
# Blobulous 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.
... | gpl-3.0 | 157,451,090,156,659,620 | 35.287037 | 79 | 0.628987 | false |
Beit-Hatfutsot/dbs-back | scripts/migrate.py | 1 | 16413 | # -*- coding: utf-8 -*-
import re
import os
import sys
import logging
from argparse import ArgumentParser
from decimal import Decimal
import datetime
import calendar
import time
from functools import partial
from pymongo import MongoClient
from pymongo.errors import BulkWriteError
from bson.code import Code
from gedc... | agpl-3.0 | -3,581,223,935,101,060,000 | 38.26555 | 230 | 0.570767 | false |
ppries/tensorflow | tensorflow/python/kernel_tests/large_concat_op_test.py | 1 | 1511 | # 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 | -2,734,721,287,931,328,500 | 37.74359 | 80 | 0.667108 | false |
mick-d/nipype | nipype/interfaces/bids_utils.py | 3 | 5108 | # -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
""" Set of interfaces that allow interaction with BIDS data. Currently
available interfaces are:
BIDSDataGrabber: Query data from BIDS dataset using pybids grabbids.
Change di... | bsd-3-clause | -78,829,929,764,361,940 | 33.748299 | 79 | 0.584573 | false |
bool-/btcbot | jsonrpc/authproxy.py | 1 | 3903 |
"""
Copyright 2011 Jeff Garzik
AuthServiceProxy has the following improvements over python-jsonrpc's
ServiceProxy class:
- HTTP connections persist for the life of the AuthServiceProxy object
(if server supports HTTP/1.1)
- sends protocol 'version', per JSON-RPC 1.1
- sends proper, incrementing 'id'
... | gpl-3.0 | 3,396,568,396,845,373,400 | 33.539823 | 94 | 0.607994 | false |
account-login/dnsagent | dnsagent/resolver/dual.py | 1 | 1713 | from typing import Mapping, Union, Sequence
from twisted.names.error import ResolverError
from twisted.python.failure import Failure
from dnsagent.resolver.cn import CnResolver
from dnsagent.resolver.parallel import PoliciedParallelResolver, BaseParalledResolverPolicy
__all__ = ('DualResolver',)
class PolicyError... | mit | -6,318,335,503,835,662,000 | 23.126761 | 91 | 0.582604 | false |
jzinner/utils | samples/python_samples/filewalk.py | 1 | 1158 | #/usr/bin/python
# import os for the os.walk() function
# os.walk returns a list of tuples: 3-tuple (dirpath, dirnames, filenames)
import os
import sys
def ParseArgs():
Error1 = """ # USAGE #
# filesystemWalk.py [directory]
# filesystemWalk.py /Users/mcohoon/Devel/PythonPractice """
if len(sys.arg... | mit | -6,329,629,763,930,400,000 | 28.692308 | 75 | 0.659758 | false |
ahaldane/numpy | numpy/lib/tests/test_recfunctions.py | 1 | 39118 | from __future__ import division, absolute_import, print_function
import pytest
import numpy as np
import numpy.ma as ma
from numpy.ma.mrecords import MaskedRecords
from numpy.ma.testutils import assert_equal
from numpy.testing import assert_, assert_raises
from numpy.lib.recfunctions import (
drop_fields, rename_... | bsd-3-clause | -8,832,885,361,606,307,000 | 41.335498 | 85 | 0.417557 | false |
sciencefreak500/Open_Intelligence | Python/Eyesight/camshift_test.py | 1 | 1347 | import numpy as np
import cv2
cap = cv2.VideoCapture(0)
# take first frame of the video
ret,frame = cap.read()
# setup initial location of window
r,h,c,w = 250,90,400,125 # simply hardcoded the values
track_window = (c,r,w,h)
# set up the ROI for tracking
roi = frame[r:r+h, c:c+w]
hsv_roi = cv2.cvtColor(roi, cv2.... | gpl-2.0 | -696,926,444,738,673,900 | 26.489796 | 80 | 0.620638 | false |
jdvelasq/cashflows | cashflows/inflation.py | 1 | 4674 | """
Constant dollar transformations
===============================================================================
Overview
-------------------------------------------------------------------------------
The function ``const2curr`` computes the equivalent generic cashflow in current
dollars from a generic cashflow ... | mit | -2,808,769,870,040,584,700 | 29.54902 | 101 | 0.613179 | false |
reingart/suscripciones | controllers/checkout.py | 1 | 1037 | # coding: utf8
# try something like
def index():
form = SQLFORM.factory(
Field("descripcion", "string", default="Barrilete multicolor"),
Field("cantidad", "integer", default=1),
Field("precio", "float", default=1.00),
)
if form.accepts(request.vars, session):
p... | agpl-3.0 | -8,104,248,428,180,297,000 | 27.027027 | 71 | 0.47541 | false |
larsbutler/oq-hazardlib | openquake/hazardlib/tests/calc/disagg_test.py | 1 | 23162 | # The Hazard Library
# Copyright (C) 2012-2014, GEM Foundation
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
... | agpl-3.0 | -8,118,343,141,972,529,000 | 40.286988 | 79 | 0.474311 | false |
0xffea/keystone | tests/test_versions.py | 1 | 5296 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC
#
# 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 requir... | apache-2.0 | -3,539,829,722,123,488,000 | 39.738462 | 74 | 0.375189 | false |
egabancho/invenio | invenio/modules/knowledge/api.py | 1 | 26116 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2009, 2010, 2011, 2013, 2014 CERN.
##
## Invenio 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
## Licens... | gpl-2.0 | -6,103,226,367,035,997,000 | 32.142132 | 79 | 0.607559 | false |
jlettvin/Unicode | py2/test/test_Array.py | 1 | 3301 | # -*- coding: utf8 -*-
__module__ = "test_Array.py"
__author__ = "Jonathan D. Lettvin"
__copyright__ = "\
Copyright(C) 2016 Jonathan D. Lettvin, All Rights Reserved"
__credits__ = [ "Jonathan D. Lettvin" ]
__license__ = "GPLv3"
__version__ = "0.0.1"
__maintainer__ = "Jonathan D. Lettvin"
__email__ ... | gpl-3.0 | 5,949,441,183,369,446,000 | 29.284404 | 62 | 0.515601 | false |
Azure/azure-documentdb-python | test/aggregate_tests.py | 1 | 10858 | # The MIT License (MIT)
# Copyright (c) 2017 Microsoft Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy... | mit | -9,061,135,112,470,184,000 | 41.916996 | 119 | 0.54172 | false |
jopohl/urh | src/urh/models/ProtocolTableModel.py | 1 | 2539 | from collections import defaultdict
from PyQt5.QtCore import pyqtSignal, QModelIndex, Qt
from urh import settings
from urh.models.TableModel import TableModel
from urh.signalprocessing.ProtocolAnalyzer import ProtocolAnalyzer
from urh.ui.actions.DeleteBitsAndPauses import DeleteBitsAndPauses
class ProtocolTableMode... | gpl-3.0 | 7,597,071,940,439,484,000 | 35.797101 | 114 | 0.634108 | false |
dsparrow27/vortex | src/ds/vortex/nodes/conversion/toArray.py | 1 | 1063 | from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class ToArray(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNode.initia... | mit | 5,942,302,473,169,311,000 | 29.371429 | 85 | 0.638758 | false |
mozilla/olympia | src/olympia/bandwagon/tests/test_admin.py | 1 | 14684 | from django.conf import settings
from django.urls import reverse
from pyquery import PyQuery as pq
from olympia import amo
from olympia.amo.tests import TestCase, addon_factory, formset, user_factory
from olympia.bandwagon.models import Collection, CollectionAddon
class TestCollectionAdmin(TestCase):
def setUp(... | bsd-3-clause | -8,593,084,798,155,228,000 | 41.810496 | 87 | 0.60869 | false |
cbertinato/pandas | pandas/tests/io/test_gcs.py | 1 | 2310 | from io import StringIO
import numpy as np
import pytest
from pandas import DataFrame, date_range, read_csv
from pandas.util import _test_decorators as td
from pandas.util.testing import assert_frame_equal
from pandas.io.common import is_gcs_url
def test_is_gcs_url():
assert is_gcs_url("gcs://pandas/somethinge... | bsd-3-clause | 3,071,893,179,517,933,000 | 31.083333 | 78 | 0.618615 | false |
kuldat/pyramid_oauthlib | pyramid_oauthlib/provider/oauth2/interfaces.py | 1 | 17421 | from zope.interface import Interface, Attribute
class IOAuth2Provider(Interface):
server = Attribute("""oauthlib.oauth2.Server instance""")
class IOAuth2DataProvider(Interface):
def get_client(client_id, *args, **kw):
"""Client getter function.
Accepts one parameter `client_id`, and retur... | mit | 2,059,025,845,611,090,400 | 38.41629 | 97 | 0.631824 | false |
nataddrho/DigiCue-USB | Python3/src/venv/Lib/site-packages/pip/_internal/commands/list.py | 1 | 11430 | import json
import logging
from pip._internal.cli import cmdoptions
from pip._internal.cli.req_command import IndexGroupCommand
from pip._internal.cli.status_codes import SUCCESS
from pip._internal.exceptions import CommandError
from pip._internal.index.collector import LinkCollector
from pip._internal.index.package_f... | mit | 2,567,889,296,724,694,000 | 34.386997 | 79 | 0.584164 | false |
SCM-NV/qmworks-namd | nanoqm/workflows/schemas.py | 1 | 9939 | """Schemas to valid user input.
Index
-----
.. currentmodule:: nanoqm.workflows.schemas
.. autosummary::
{autosummary}
API
---
{autodata}
"""
__all__ = [
'schema_cp2k_general_settings',
'schema_derivative_couplings',
'schema_single_points',
'schema_distribute_absorption_spectrum',
'schema_dis... | mit | 6,000,909,809,273,182,000 | 29.770898 | 105 | 0.683268 | false |
ray-project/ray | rllib/agents/marwil/marwil.py | 1 | 5753 | from typing import Optional, Type
from ray.rllib.agents.trainer import with_common_config
from ray.rllib.agents.trainer_template import build_trainer
from ray.rllib.agents.marwil.marwil_tf_policy import MARWILTFPolicy
from ray.rllib.execution.replay_ops import Replay, StoreToReplayBuffer
from ray.rllib.execution.repla... | apache-2.0 | -1,755,914,939,628,925,200 | 38.136054 | 76 | 0.690075 | false |
dekked/dynamodb-mock | tests/functional/pyramid/test_scan.py | 1 | 4232 | # -*- coding: utf-8 -*-
import unittest, json
TABLE_NAME1 = 'Table-1'
TABLE_RT = 45
TABLE_WT = 123
TABLE_NAME = 'Table-HR'
TABLE_RT = 45
TABLE_WT = 123
TABLE_RT2 = 10
TABLE_WT2 = 10
TABLE_HK_NAME = u'hash_key'
TABLE_HK_TYPE = u'N'
TABLE_RK_NAME = u'range_key'
TABLE_RK_TYPE = u'S'
HK_VALUE1 = u'123'
HK_VALUE2 = u'4... | lgpl-3.0 | -856,757,890,835,981,000 | 27.986301 | 98 | 0.559074 | false |
yancz1989/cancer | utilities.py | 1 | 4491 | import SimpleITK as sitk
import numpy as np
import csv
import os
import json
from PIL import Image
import matplotlib.pyplot as plt
import SimpleITK as sitk
from cv2 import imread, imwrite
def load_itk_image(filename):
itkimage = sitk.ReadImage(filename)
numpyImage = sitk.GetArrayFromImage(itkimage)
numpyOrigin =... | mit | 5,996,328,860,083,202,000 | 25.417647 | 83 | 0.643732 | false |
go-bears/Final-Project | weblogo-3.4_rd/corebio/secstruc/__init__.py | 1 | 1920 |
""" Protein secondary structure and associated tools and data.
Constants:
- secstruc_alphabet
-- Secondary structure alphabet: 'HGIEBbTSC _-L?X'
Contains a complete set of secondary structure codes generated by both
STRIDE and DSSP
- secstruc_ehl_alphabet
-- Standard 3 s... | mit | -110,092,327,526,944,400 | 32.684211 | 79 | 0.655729 | false |
hasgeek/funnel | migrations/versions/daeb6753652a_add_profile_protected_and_verified_flags.py | 1 | 1186 | """Add profile protected and verified flags.
Revision ID: daeb6753652a
Revises: 8b46a8a8ca17
Create Date: 2020-11-06 02:57:05.891627
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'daeb6753652a'
down_revision = '8b46a8a8ca17'
branch_labels = None
depends_on = ... | agpl-3.0 | -5,126,532,979,559,593,000 | 23.708333 | 80 | 0.607926 | false |
xen0l/ansible | lib/ansible/cli/__init__.py | 1 | 40009 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com>
#
# This file is part of Ansible
#
# Ansible 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, eithe... | gpl-3.0 | -3,480,482,311,501,332,000 | 46.972422 | 160 | 0.573721 | false |
3people/dropship_project | code/Dmok.py | 1 | 5356 | import os
class Board:
SIZE = 15
def __init__(self):
self.board = [['+' for _ in range(self.SIZE)] for _ in range(self.SIZE)]
self.player1 = input("player1의 이름을 입력하시오 : ")
self.player2 = input("player2의 이름을 입력하시오 : ")
self.startgame()
def printboard(self):
"""Prin... | mit | -7,690,093,707,582,379,000 | 34.013514 | 109 | 0.412582 | false |
eirmag/weboob | modules/ebonics/backend.py | 1 | 2047 | # -*- coding: utf-8 -*-
# Copyright(C) 2012 Romain Bignon
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your opt... | agpl-3.0 | 4,084,087,417,472,269,000 | 33.116667 | 107 | 0.686859 | false |
sserrot/champion_relationships | venv/Lib/site-packages/networkx/algorithms/shortest_paths/tests/test_unweighted.py | 1 | 4670 | #!/usr/bin/env python
import networkx as nx
def validate_grid_path(r, c, s, t, p):
assert isinstance(p, list)
assert p[0] == s
assert p[-1] == t
s = ((s - 1) // c, (s - 1) % c)
t = ((t - 1) // c, (t - 1) % c)
assert len(p) == abs(t[0] - s[0]) + abs(t[1] - s[1]) + 1
p = [((u - 1) // c, (u -... | mit | 7,503,324,317,036,150,000 | 38.576271 | 89 | 0.540685 | false |
jdereus/labman | labcontrol/gui/handlers/study.py | 1 | 2270 | # ----------------------------------------------------------------------------
# Copyright (c) 2017-, LabControl development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# -------------------------------------------------... | bsd-3-clause | -1,625,448,089,754,203,400 | 31.428571 | 78 | 0.586784 | false |
eBay/cronus-agent | agent/agent/lib/security/agentauth.py | 1 | 5600 | #pylint: disable=E1121,W0105
'''
Copyright 2014 eBay Software 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 applicabl... | apache-2.0 | -3,431,015,109,863,174,000 | 37.895833 | 124 | 0.601964 | false |
Andproject/tools_protobuf | python/google/protobuf/internal/reflection_test.py | 1 | 69911 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions o... | bsd-3-clause | 6,969,223,157,646,569,000 | 40.338261 | 80 | 0.715735 | false |
ctjacobs/pyqso | pyqso/log.py | 1 | 15133 | #!/usr/bin/env python3
# Copyright (C) 2013-2017 Christian Thomas Jacobs.
# This file is part of PyQSO.
# PyQSO 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... | gpl-3.0 | -7,163,945,879,374,536,000 | 44.308383 | 214 | 0.606489 | false |
kloper/pato | python/test/__init__.py | 1 | 2750 | # -*- python -*-
"""@file
@brief Common test stuff
Copyright (c) 2014-2015 Dimitry Kloper <kloper@users.sf.net>.
All rights reserved.
@page License
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of s... | bsd-2-clause | 4,933,677,889,533,100,000 | 32.536585 | 70 | 0.637455 | false |
jalr/privacyidea | privacyidea/lib/tokens/yubicotoken.py | 1 | 7718 | # -*- coding: utf-8 -*-
#
# privacyIDEA is a fork of LinOTP
# May 08, 2014 Cornelius Kölbel
# License: AGPLv3
# contact: http://www.privacyidea.org
#
# 2016-04-04 Cornelius Kölbel <cornelius@privacyidea.org>
# Use central yubico_api_signature function
# 2015-01-28 Rewrite during flask migration
# ... | agpl-3.0 | -2,784,637,375,835,404,300 | 36.818627 | 108 | 0.552301 | false |
jelly/calibre | src/calibre/utils/run_tests.py | 2 | 5027 | #!/usr/bin/env python2
# vim:fileencoding=utf-8
# License: GPLv3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>
from __future__ import (unicode_literals, division, absolute_import,
print_function)
import unittest, functools, os, importlib, zipfile
from calibre.utils.monotonic import mon... | gpl-3.0 | -3,584,374,407,453,739,000 | 32.738255 | 140 | 0.597573 | false |
cachance7/BattleQuip | battlequip/util.py | 1 | 2470 | import collections
import re
def namedtuple_with_defaults(typename, field_names, default_values=[]):
T = collections.namedtuple(typename, field_names)
T.__new__.__defaults__ = (None,) * len(T._fields)
if isinstance(default_values, collections.Mapping):
prototype = T(**default_values)
else:
... | mit | -7,643,095,019,502,245,000 | 33.305556 | 81 | 0.615385 | false |
m16Takahiro/kakeibo | kakeibo/settings.py | 1 | 3863 | """
Django settings for kakeibo project.
Generated by 'django-admin startproject' using Django 1.11.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os... | mit | -4,153,100,942,513,246,700 | 25.985816 | 91 | 0.684363 | false |
JulyKikuAkita/PythonPrac | cs15211/PermutationSequence.py | 1 | 9970 | __source__ = 'https://leetcode.com/problems/permutation-sequence/'
# https://github.com/kamyu104/LeetCode/blob/master/Python/permutation-sequence.py
# Time: O(n)
# Space: O(1)
# Math
#
# Description: Leetcode # 60. Permutation Sequence
#
# The set [1,2,3,...,n] contains a total of n! unique permutations.
#
# By listin... | apache-2.0 | 6,555,002,077,032,687,000 | 29.215152 | 121 | 0.559679 | false |
ltowarek/budget-supervisor | third_party/saltedge/swagger_client/models/removed_customer_response_data.py | 1 | 3772 | # coding: utf-8
"""
Salt Edge Account Information API
API Reference for services # noqa: E501
OpenAPI spec version: 5.0.0
Contact: support@saltedge.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class RemovedCustomerRe... | mit | -6,301,179,382,600,332,000 | 26.735294 | 86 | 0.552227 | false |
iofun/spider | spider/system/campaigns.py | 1 | 5125 | # -*- coding: utf-8 -*-
'''
Spider campaigns system logic.
'''
# This file is part of spider.
# Distributed under the terms of the last AGPL License.
# The full license is in the file LICENCE, distributed as part of this software.
__author__ = 'Team Machine'
import arrow
import motor
import uuid
import loggin... | agpl-3.0 | 1,334,203,877,906,721,300 | 24.758794 | 86 | 0.50478 | false |
dksr/graph_utils | weisfeiler_lehman_graph_isomorphism_test.py | 1 | 1864 | from igraph import Graph
def weisfeiler_lehman_graph_isomorphism_test(G1,G2):
""" Performs the Weisfeiler-Lehman test of Isomorphism:
Weisfeiler and Lehman: A reduction of a graph to a canonical form
and an algebra arising during this reduction,
Nauchno-Technicheskaya Informatsiya, Ser. 2, no. 9 (196... | mit | -2,112,818,726,911,263,500 | 37.854167 | 106 | 0.521459 | false |
jnewland/ha-config | custom_components/senseme/config_flow.py | 1 | 2995 | """Config flow for SenseME."""
import ipaddress
import voluptuous as vol
from aiosenseme import async_get_device_by_ip_address, discover_all
from homeassistant import config_entries
from homeassistant.const import CONF_HOST
from .const import CONF_HOST_MANUAL, CONF_INFO, DOMAIN
DISCOVER_TIMEOUT = 5
class SensemeFl... | mit | 3,527,471,452,215,158,000 | 32.277778 | 81 | 0.582638 | false |
ssls/beetle-agent | tests/modules/teams/resources/test_modifying_teams.py | 1 | 4600 | # encoding: utf-8
# pylint: disable=missing-docstring
import json
from app.modules.teams import models
def test_new_team_creation(flask_app_client, db, regular_user):
# pylint: disable=invalid-name
team_title = "Test Team Title"
with flask_app_client.login(regular_user, auth_scopes=('teams:write', )):
... | mit | 1,529,536,958,977,042,000 | 35.220472 | 100 | 0.61587 | false |
vgrem/Office365-REST-Python-Client | tests/sharepoint/test_site.py | 1 | 1652 | from office365.sharepoint.web_application.webApplication import WebApplication
from tests import test_site_url
from tests.sharepoint.sharepoint_case import SPTestCase
from office365.sharepoint.lists.list_template_type import ListTemplateType
from office365.sharepoint.sites.site import Site
class TestSite(SPTestCase)... | mit | 7,089,965,349,920,508,000 | 41.358974 | 108 | 0.70339 | false |
Nic30/hwtLib | hwtLib/amba/datapump/interconnect/rStrictOrder_test.py | 1 | 5032 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import unittest
from hwt.simulator.simTestCase import SimTestCase
from hwtLib.amba.datapump.interconnect.rStricOrder import RStrictOrderInterconnect
from hwtLib.amba.datapump.sim_ram import AxiDpSimRam
from pyMathBitPrecise.bit_utils import mask
from hwtSimApi.constants ... | mit | -4,935,728,629,517,168,000 | 32.105263 | 82 | 0.548092 | false |
spiside/pdb-tutorial | solutions/dicegame/runner.py | 1 | 1693 | from .die import Die
from .utils import i_just_throw_an_exception
class GameRunner:
def __init__(self):
self.dice = Die.create_dice(5)
self.reset()
def reset(self):
self.round = 1
self.wins = 0
self.loses = 0
@property
def answer(self):
... | mit | -5,400,822,887,541,992,000 | 26.216667 | 72 | 0.453042 | false |
joseandro/liToCNF | sValidator.py | 1 | 1230 | # This module validates inequations along with their solutions
# Author: Joseandro Luiz
def isValid(cnf, res):
"""
This function validates a CNF
@rtype: bool
"""
# Turn all variables from CNF positive (we have to compare them later)
andBoolClause = None
for i in cnf :
orBoolClaus... | gpl-3.0 | -8,536,422,730,506,171,000 | 25.76087 | 74 | 0.481301 | false |
manashmndl/LearningPyQt | pyqt/chap11/contactdlg.py | 1 | 5621 | #!/usr/bin/env python
# Copyright (c) 2008-14 Qtrac Ltd. All rights reserved.
# This program or module 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
# version 3 of the Lic... | mit | 7,333,913,285,468,876,000 | 38.584507 | 74 | 0.654688 | false |
nicolas-shupe/flavorgator | public/map_app/multiply.py | 1 | 1150 | from numpy import *
s = [[2407,1860]]
p =.25
def rekt ():
for n in range(0,len(s)):
for m in range (len(s[n])):
s[n][m] = round((s[n][m] * p),2)
return s
"""
[[343.35, 137.38, 342.74, 150.59, 222.25, 153.91, 222.25, 141.05],
[402.5, 0.88, 430.24, 1.14, 430.59, 42.61, ... | mit | 7,777,998,880,448,629,000 | 36.129032 | 104 | 0.531304 | false |
tylerclair/py3canvas | py3canvas/apis/user_observees.py | 1 | 5486 | """UserObservees API Version 1.0.
This API client was generated using a template. Make sure this code is valid before using it.
"""
import logging
from datetime import date, datetime
from .base import BaseCanvasAPI
class UserObserveesAPI(BaseCanvasAPI):
"""UserObservees API Version 1.0."""
def __init__(sel... | mit | -4,811,413,284,564,236,000 | 36.834483 | 174 | 0.603172 | false |
caoziyao/weibo | models/messageCopy.py | 1 | 1245 | import hashlib
import os
from . import ModelMixin
from . import db
from utils import timestamp
from utils import log
from utils import sh1hexdigest
class MessageCopy(db.Model, ModelMixin):
__tablename__ = 'messageCopys'
Cid = db.Column(db.Integer, primary_key=True) # 转发编号
# Ccontent = db.Column(db.Str... | mit | -8,593,585,503,986,119,000 | 35.03125 | 110 | 0.651344 | false |
ArcherSys/ArcherSys | node_modules/npm/node_modules/node-gyp/gyp/gyptest.py | 1 | 24104 | <<<<<<< HEAD
<<<<<<< HEAD
#!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
__doc__ = """
gyptest.py -- test runner for GYP tests.
"""
import os
import optparse
import subprocess
import sys... | mit | -4,964,498,452,634,644,000 | 28.111111 | 78 | 0.597826 | false |
google/graphicsfuzz | gfauto/gfauto/run_bin.py | 1 | 2346 | # -*- coding: utf-8 -*-
# Copyright 2019 The GraphicsFuzz Project Authors
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | apache-2.0 | 3,527,463,983,964,285,000 | 29.868421 | 83 | 0.684996 | false |
masayuko/nikola | nikola/post.py | 1 | 47243 | # -*- coding: utf-8 -*-
# Copyright © 2012-2015 Roberto Alsina and others.
# Permission is hereby granted, free of charge, to any
# person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the
# Software without restriction, including without limitation
# the rights t... | mit | 5,035,294,736,049,951,000 | 38.76431 | 159 | 0.582409 | false |
GETLIMS/LIMS-Backend | lims/inventory/migrations/0001_initial.py | 1 | 6145 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import mptt.fields
import gm2m.fields
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('con... | mit | 7,413,653,602,382,370,000 | 46.269231 | 142 | 0.559642 | false |
MKaptein/streamingbandit | app/handlers/adminhandlers.py | 1 | 19180 | # -* coding: utf-8 -*-
import tornado.escape
import tornado.ioloop
import tornado.web
import json
import random
import os
from handlers.basehandler import BaseHandler, ExceptionHandler
from core.experiment import Experiment
from db.database import Database
from db.mongolog import MongoLog
from db.users import Users
... | mit | 3,692,329,213,822,720,500 | 49.209424 | 151 | 0.4756 | false |
madhav-datt/spell-check | pdf_text/pdf2txt.py | 1 | 4620 | #
# pdf2txt.py from the FOSS python PDFMiner package
# http://euske.github.io/pdfminer/index.html#pdf2txt
# Extract text from PDF to text files
#
# Has to be run separately with python2.X (not compatible with python3.X)
#
import sys
from pdfminer.pdfdocument import PDFDocument
from pdfminer.pdfparser import PDFParser
... | gpl-2.0 | 2,343,243,574,910,225,400 | 30.643836 | 87 | 0.540693 | false |
cedadev/ndg_security_common | setup.py | 1 | 2632 | #!/usr/bin/env python
"""Distribution Utilities setup program for NDG Security Package
NERC Data Grid Project
"""
__author__ = "P J Kershaw"
__date__ = "24/04/06"
__copyright__ = "(C) 2009 Science and Technology Facilities Council"
__license__ = "BSD - see LICENSE file in top-level directory"
__contact__ = "Philip.Ke... | bsd-3-clause | 2,917,347,022,940,199,400 | 34.093333 | 79 | 0.628799 | false |
patrickdw123/ParanoiDF | html.py | 1 | 10764 | # ParanoiDF. A combination of several PDF analysis/manipulation tools to
# produce one of the most technically useful PDF analysis tools.
#
# Idea proposed by Julio Hernandez-Castro, University of Kent, UK.
# By Patrick Wragg
# University of Kent
# 21/07/2014
#
# With thanks to:
# Julio... | gpl-3.0 | 8,699,529,066,536,838,000 | 39.164179 | 84 | 0.464604 | false |
ByteInternet/libcloud | libcloud/compute/drivers/openstack.py | 1 | 143549 | # 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"); you may not use ... | apache-2.0 | -4,344,738,230,865,552,400 | 34.097555 | 120 | 0.538004 | false |
drtuxwang/system-config | bin/tocapital.py | 1 | 2244 | #!/usr/bin/env python3
"""
Print arguments with first letter in upper case (camel case).
"""
import argparse
import glob
import os
import signal
import sys
from typing import List
class Options:
"""
Options class
"""
def __init__(self) -> None:
self._args: argparse.Namespace = None
s... | gpl-2.0 | -7,888,770,518,914,146,000 | 21.44 | 79 | 0.499554 | false |
staugur/SwarmOps | src/config.py | 1 | 3033 | # -*- coding: utf-8 -*-
"""
SwarmOps.config
~~~~~~~~~~~~~~
The program configuration file, the preferred configuration item, reads the system environment variable first.
:copyright: (c) 2018 by staugur.
:license: MIT, see LICENSE for more details.
"""
from os import getenv
GLOBAL = {
"Proce... | bsd-3-clause | -8,325,207,699,234,633,000 | 25.178947 | 114 | 0.673904 | false |
richardingham/octopus | octopus/notifier/sms.py | 1 | 1629 | # Twisted Imports
from twisted.internet import reactor, protocol, defer
from twisted.web.client import Agent
from twisted.web.http_headers import Headers
from twisted.internet.ssl import ClientContextFactory
from twisted.python import log
# System Imports
try:
from urllib.parse import urlencode
except ImportError:
f... | mit | -5,075,994,737,181,868,000 | 21.943662 | 82 | 0.711479 | false |
OpenClovis/SAFplus-Availability-Scalability-Platform | doc/doclayout/jsclassindexpage.py | 1 | 1381 | """<module>
This module generates an html page that lists all classes
"""
import pdb
from PyHtmlGen.gen import *
from PyHtmlGen.document import *
from PyHtmlGen.htmldoc import *
from PyHtmlGen.bar import *
# from layoutstyle import *
from PyHtmlGen.layouttable import *
from PyHtmlGen.table import *
from PyHtmlGen.imag... | gpl-2.0 | 4,678,383,709,413,481,000 | 26.078431 | 128 | 0.737871 | false |
jcsp/manila | manila_tempest_tests/plugin.py | 1 | 1495 | # Copyright 2015 Deutsche Telekom AG
# 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 requi... | apache-2.0 | -4,885,370,306,299,647,000 | 35.463415 | 78 | 0.688294 | false |
jj4jj/sdv | ws_server.py | 1 | 2339 | #-*-coding:utf8-*-
from threading import Thread
import tornado.ioloop
import tornado.web
import tornado.websocket
import json
import log
import config
try:
# py2
from urllib.parse import urlparse
except ImportError:
# py3
from urlparse import urlparse
class WebSocketMsgHandler():
def __init__(sel... | mit | 4,949,130,193,569,616,000 | 24.703297 | 99 | 0.568619 | false |
dzolnierz/mysql-utilities | mysql/utilities/__init__.py | 1 | 2324 | #
# Copyright (c) 2010, 2015, Oracle and/or its affiliates. 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; version 2 of the License.
#
# This program is distributed in th... | gpl-2.0 | 2,112,526,006,098,551,300 | 31.277778 | 78 | 0.667384 | false |
delete/spymanager | tests/test_subscriptions.py | 1 | 1195 | import sys
sys.path.insert(0, '../spymanager')
sys.path.insert(0, '../')
from tests import create_database_collection
from src.subscriptions import SubscriptionsManager
# Database settings
DATABASE_NAME = 'spies_database'
COLLECTION_NAME = 'subscriptions'
subscriptions_collection = create_database_collection(DATABAS... | mit | -3,622,936,483,652,796,400 | 18.916667 | 85 | 0.697071 | false |
syagev/kaggle_dsb | luna16/src/deep/unet/unet.py | 1 | 7592 | import theano
import theano.tensor as T
import lasagne
from lasagne.layers import InputLayer, Conv2DLayer, MaxPool2DLayer, batch_norm, DropoutLayer, GaussianNoiseLayer
from lasagne.init import HeNormal
from lasagne import nonlinearities
from lasagne.layers import ConcatLayer, Upscale2DLayer
from lasagne.regularization ... | apache-2.0 | 8,048,763,956,391,622,000 | 40.037838 | 126 | 0.597208 | false |
CaliopeProject/CaliopeServer | src/cid/modules/siim2_forms/models/editable_models.py | 1 | 1346 | # -*- encoding: utf-8 -*-
"""
@authors: Andrés Felipe Calderón andres.calderon@correlibre.org
Sebastián Ortiz V. neoecos@gmail.com
@license: GNU AFFERO GENERAL PUBLIC LICENSE
SIIM2 Models are the data definition of SIIM2 Information System
Copyright (C) 2013 Infometrika Ltda.
This program is free soft... | agpl-3.0 | 160,416,028,745,061,100 | 36.333333 | 79 | 0.685034 | false |
kbsezginel/tee_mof | thermof/initialize/job.py | 1 | 2422 | # Date: September 2017
# Author: Kutay B. Sezginel
"""
Initializing job submission files for computing cluster
"""
import os
from thermof.sample import slurm_file, slurm_scratch_file, pbs_file
from . import read_lines, write_lines
def job_submission_file(simdir, parameters, verbose=True):
""" Generate job submiss... | mit | 3,736,780,771,206,809,600 | 45.576923 | 110 | 0.618084 | false |
mcroydon/django-tumbleweed | tumbleweed/views.py | 1 | 11972 | from django.shortcuts import render_to_response
from django.template.context import RequestContext
from django.core.paginator import Paginator
from django.http import Http404, HttpResponseServerError
from haystack.query import SearchQuerySet
from django.conf import settings
import datetime, time
RESULTS_PER_PAGE = get... | bsd-3-clause | 96,717,738,742,192,700 | 39.040134 | 139 | 0.635483 | false |
Southpaw-TACTIC/TACTIC | src/pyasm/prod/web/prod_wdg.py | 1 | 7380 | ###########################################################
#
# Copyright (c) 2005, Southpaw Technology
# All Rights Reserved
#
# PROPRIETARY INFORMATION. This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way without written permi... | epl-1.0 | -2,703,030,322,963,593,000 | 34.652174 | 93 | 0.595799 | false |
k0001/mediasancion | extras/importers/mscrap_import.py | 1 | 18027 | # coding: utf8
# MediaSanción, aplicación web para acceder a los datos públicos de la
# actividad legislativa en Argentina.
# Copyright (C) 2010,2011,2012 Renzo Carbonara <renzo @carbonara .com .ar>
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General ... | agpl-3.0 | 3,245,439,087,975,844,000 | 35.265594 | 104 | 0.563249 | false |
flisboac/uksat | wafbuild.py | 1 | 3974 | #!/usr/bin/env python
#from waflib.Configure import conf
#from waflib.TaskGen import feature
def options(ctx):
ctx.add_option('-B', '--build', action='store', default="release",
help='Specifies which build to run.')
ctx.add_option('--list-builds', action='store_true',
help='Lists all available builds and the... | mit | 3,694,323,395,176,270,000 | 23.231707 | 82 | 0.694766 | false |
joshuamorton/calc_three_proj | plot.py | 1 | 1969 | from matplotlib import pyplot as plt
import numpy as np
import iterative
import pascal
import power
plt.style.use('ggplot')
qr = []
lu = []
for i in range(2, 13):
q = pascal.solve_qr_b(pascal.pascal_matrix(i), pascal.harmonic_vector(i))
l = pascal.solve_lu_b(pascal.pascal_matrix(i), pascal.harmonic_vector(i))
... | mit | -2,766,495,094,339,962,000 | 25.621622 | 90 | 0.648045 | false |
berkmancenter/mediacloud | apps/extract-and-vector/tests/python/extract_and_vector/dbi/stories/stories/test_add_story.py | 1 | 1727 | from mediawords.dbi.stories.stories import add_story
from .setup_test_stories import TestStories
class TestAddStory(TestStories):
def test_add_story(self):
"""Test add_story()."""
media_id = self.test_medium['media_id']
feeds_id = self.test_feed['feeds_id']
# Basic story
... | agpl-3.0 | -8,725,383,054,378,140,000 | 34.244898 | 75 | 0.544876 | false |
RobinQuetin/CAIRIS-web | cairis/cairis/DocumentReferenceParameters.py | 1 | 1320 | # 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"); you may... | apache-2.0 | -8,654,469,905,426,422,000 | 40.25 | 63 | 0.768182 | false |
fonttools/skia-pathops | ci/download_libskia.py | 1 | 2713 | import argparse
import glob
import logging
import platform
import os
import shutil
import struct
import tempfile
__requires__ = ["github_release"]
import github_release
GITHUB_REPO = "fonttools/skia-builder"
ASSET_TEMPLATE = "libskia-{plat}-{arch}.zip"
DOWNLOAD_DIR = os.path.join("build", "download")
CPU_ARCH = "x6... | bsd-3-clause | 2,709,180,981,875,565,000 | 27.260417 | 87 | 0.596756 | false |
reinbach/django-machina | tests/integration/templatetags/test_forum_tags.py | 1 | 4090 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
from django.contrib.sessions.middleware import SessionMiddleware
from django.template import Context
from django.template.base import Template
from django.template.loader import render_to_string
from django.test.client import RequestFactory... | bsd-3-clause | -8,260,004,356,734,359,000 | 36.181818 | 99 | 0.662592 | false |
biothings/biothings_explorer | biothings_explorer/smartapi_kg/__init__.py | 1 | 1114 | import sys
from .dataload import load_specs
from .smartapi_parser import SmartAPIParser
from .filter import filterOps
import traceback
class MetaKG:
def __init__(self):
self.ops = []
self.parser = SmartAPIParser()
def populateOpsFromSpecs(self, specs, verbose=False):
"""Populate meta... | apache-2.0 | 8,065,000,017,719,369,000 | 31.764706 | 87 | 0.590664 | false |
dbcli/vcli | vcli/packages/sqlcompletion.py | 1 | 13865 | from __future__ import print_function
import sys
import sqlparse
from sqlparse.sql import Comparison, Identifier, Where
from .parseutils import last_word, extract_tables, find_prev_keyword
from .vspecial import parse_special_command
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3
if PY3:
string_type... | bsd-3-clause | -1,566,311,390,984,765,200 | 41.015152 | 82 | 0.560765 | false |
mezuro/kalibro_client_py | tests/processor/test_kalibro_module.py | 1 | 1104 | from unittest import TestCase
from nose.tools import assert_equal, assert_true
from tests.factories import KalibroModuleFactory
from tests.helpers import not_raises
class TestKalibroModule(TestCase):
def setUp(self):
self.subject = KalibroModuleFactory.build()
def test_properties_getters(self):
... | lgpl-3.0 | -215,531,830,724,538,370 | 29.666667 | 72 | 0.663043 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.