repo_name
stringlengths
5
100
path
stringlengths
4
299
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1.03M
license
stringclasses
15 values
hash
int64
-9,223,351,895,964,839,000
9,223,297,778B
line_mean
float64
3.17
100
line_max
int64
7
1k
alpha_frac
float64
0.25
0.98
autogenerated
bool
1 class
pilou-/ansible
lib/ansible/modules/cloud/xenserver/xenserver_guest.py
7
97662
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, Bojan Vitnik <bvitnik@mainstream.rs> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_versi...
gpl-3.0
7,389,772,228,995,172,000
49.680851
158
0.50169
false
clarkperkins/stackdio
stackdio/api/cloud/utils.py
2
2418
# -*- coding: utf-8 -*- # Copyright 2017, Digital Reasoning # # 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
3,608,501,492,056,877,600
28.13253
89
0.664599
false
CiscoSystems/nova
nova/tests/api/openstack/compute/contrib/test_extended_server_attributes.py
31
4912
# 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 requ...
apache-2.0
-1,250,139,382,363,879,700
36.212121
78
0.629682
false
ngageoint/geoq
geoq/proxy/tests.py
1
6015
from django.test import TestCase,Client from httmock import urlmatch, response, HTTMock import os from django.contrib.auth.models import User from django.template.defaultfilters import slugify from .models import * def register_valid_proxy(name,url,refresh=100): p = SourceDocument.objects.create(Name=name,Source...
mit
-1,567,299,680,008,759,300
44.568182
159
0.61862
false
bokeh/bokeh
tests/integration/widgets/test_toggle.py
1
4531
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2021, Anaconda, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
bsd-3-clause
-6,577,584,198,115,750,000
32.072993
111
0.522181
false
CapOM/ChromiumGStreamerBackend
tools/telemetry/third_party/gsutilz/third_party/boto/tests/integration/s3/test_bucket.py
88
12516
# -*- coding: utf-8 -*- # Copyright (c) 2011 Mitch Garnaat http://garnaat.org/ # All rights reserved. # # 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 # witho...
bsd-3-clause
6,793,581,756,970,989,000
40.538206
85
0.619451
false
Ballz0fSteel/Umeko
lib/youtube_dl/extractor/ted.py
16
11976
from __future__ import unicode_literals import json import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( int_or_none, try_get, ) class TEDIE(InfoExtractor): IE_NAME = 'ted' _VALID_URL = r'''(?x) (?P<proto>https?://) (?P<type>www|embed(?:-...
gpl-3.0
4,865,771,499,831,663,000
36.425
117
0.483968
false
cbrewster/servo
tests/wpt/web-platform-tests/tools/pywebsocket/mod_pywebsocket/util.py
23
14116
# Copyright 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
mpl-2.0
5,943,935,005,135,710,000
32.292453
79
0.632545
false
sachdevs/rmc
models/rating.py
8
3818
import json import logging import mongoengine as me import rmc.shared.util as util class AggregateRating(me.EmbeddedDocument): rating = me.FloatField(min_value=0.0, max_value=1.0, default=0.0) count = me.IntField(min_value=0, default=0) sorting_score_positive = me.FloatField( min_value=0.0, max_...
mit
8,650,051,165,622,778,000
31.355932
79
0.58879
false
stevenmizuno/QGIS
python/plugins/processing/tests/GdalAlgorithmsTest.py
9
5256
# -*- coding: utf-8 -*- """ *************************************************************************** GdalAlgorithmTests.py --------------------- Date : January 2016 Copyright : (C) 2016 by Matthias Kuhn Email : matthias@opengis.ch ***********************...
gpl-2.0
-9,066,875,606,486,929,000
33.12987
142
0.580479
false
axilleas/ansible
lib/ansible/plugins/callback/mail.py
114
4572
# -*- coding: utf-8 -*- # Copyright 2012 Dag Wieers <dag@wieers.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, either version 3 of the License, or # (at your ...
gpl-3.0
7,918,595,190,212,266,000
37.420168
129
0.59252
false
racitup/django-currencies
example/settings.py
2
2709
""" Django settings for example project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) im...
bsd-3-clause
5,694,972,170,673,474,000
23.627273
71
0.711333
false
gameduell/duell
bin/win/python2.7.9/Lib/site-packages/pip/_vendor/requests/models.py
277
26436
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import collections import datetime from io import BytesIO, UnsupportedOperation from .hooks import default_hooks from .structures import CaseInsensitiveDict from .auth import HTTPBasicAuth ...
bsd-2-clause
5,847,116,123,971,238,000
31.921544
114
0.565857
false
rwl/PyCIM
CIM15/IEC61970/Core/BasePower.py
1
1832
# Copyright (C) 2010-2011 Richard Lincoln # # 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, modify, merge, publish...
mit
-7,089,260,728,300,321,000
41.604651
161
0.721616
false
Sofcom/treeio
treeio/finance/api/urls.py
3
3231
# encoding: utf-8 # Copyright 2011 Tree.io Limited # This file is part of Treeio. # License www.tree.io/license # -*- coding: utf-8 -*- import handlers from treeio.core.api.auth import auth_engine from treeio.core.api.doc import documentation_view from treeio.core.api.resource import CsrfExemptResource from django.c...
mit
7,804,919,125,094,325,000
50.285714
81
0.553389
false
CongBaoBao/bcloud
bcloud/PropertiesDialog.py
10
4825
# Copyright (C) 2014-2015 LiuLang <gsushzhsosgsu@gmail.com> # Use of this source code is governed by GPLv3 license that can be found # in http://www.gnu.org/licenses/gpl-3.0.html import os import time from gi.repository import Gtk from bcloud import Config _ = Config._ from bcloud import util from bcloud.Widgets im...
gpl-3.0
-6,341,817,197,452,482,000
34.218978
80
0.56601
false
nicobustillos/odoo
addons/payment_ogone/controllers/main.py
389
1179
# -*- coding: utf-8 -*- import logging import pprint import werkzeug from openerp import http, SUPERUSER_ID from openerp.http import request _logger = logging.getLogger(__name__) class OgoneController(http.Controller): _accept_url = '/payment/ogone/test/accept' _decline_url = '/payment/ogone/test/decline' ...
agpl-3.0
-3,440,930,928,491,942,000
39.655172
102
0.670908
false
manojhirway/ExistingImagesOnNFS
cinder/volume/drivers/eqlx.py
15
23543
# Copyright (c) 2013 Dell Inc. # Copyright 2013 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 # # Unle...
apache-2.0
1,405,562,940,059,441,700
39.873264
79
0.543898
false
shikhardb/scikit-learn
sklearn/covariance/__init__.py
389
1157
""" The :mod:`sklearn.covariance` module includes methods and algorithms to robustly estimate the covariance of features given a set of points. The precision matrix defined as the inverse of the covariance is also estimated. Covariance estimation is closely related to the theory of Gaussian Graphical Models. """ from ...
bsd-3-clause
3,775,881,959,496,661,000
33.029412
79
0.663786
false
MaT1g3R/YasenBaka
core/weeb_core.py
1
12442
import re from datetime import datetime from html import unescape from pathlib import Path from random import choice, random from typing import List, Tuple, Union from aiohttp_wrapper import SessionManager from discord import Embed, File from minoshiro import Medium, Site from bot.anime_searcher import AnimeSearcher ...
apache-2.0
8,146,474,353,584,592,000
27.800926
77
0.613888
false
lmr/autotest
tko/parsers/test/new_scenario.py
4
3716
#!/usr/bin/python """Create new scenario test instance from an existing results directory. This automates creation of regression tests for the results parsers. There are 2 primary use cases for this. 1) Bug fixing: Parser broke on some input in the field and we want to start with a test that operates on that input an...
gpl-2.0
-5,166,504,483,850,857,000
30.760684
79
0.70183
false
mtagle/airflow
tests/providers/amazon/aws/operators/test_sagemaker_transform.py
4
4422
# # 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...
apache-2.0
2,331,741,496,044,163,600
33.818898
97
0.621212
false
aidanlister/django
django/contrib/gis/db/backends/spatialite/schema.py
518
6882
from django.db.backends.sqlite3.schema import DatabaseSchemaEditor from django.db.utils import DatabaseError class SpatialiteSchemaEditor(DatabaseSchemaEditor): sql_add_geometry_column = ( "SELECT AddGeometryColumn(%(table)s, %(column)s, %(srid)s, " "%(geom_type)s, %(dim)s, %(null)s)" ) sq...
bsd-3-clause
1,256,238,944,224,622,000
41.481481
96
0.56379
false
ArabellaTech/django-page-cms
pages/widgets.py
1
13014
# -*- coding: utf-8 -*- """Django CMS come with a set of ready to use widgets that you can enable in the admin via a placeholder tag in your template.""" from pages.settings import PAGES_MEDIA_URL, PAGE_TAGGING from pages.settings import PAGE_TINYMCE, PAGE_LANGUAGES from pages.models import Page from pages.widgets_reg...
bsd-3-clause
704,359,040,994,003,200
32.890625
77
0.572537
false
vathpela/anaconda
pyanaconda/ui/tui/spokes/warnings_spoke.py
1
2587
# Ask vnc text spoke # # Copyright (C) 2013 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the...
gpl-2.0
7,156,291,706,919,628,000
35.43662
82
0.677619
false
jmighion/ansible
lib/ansible/modules/cloud/amazon/redshift_subnet_group.py
24
5940
#!/usr/bin/python # Copyright 2014 Jens Carl, Hothead Games Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'stat...
gpl-3.0
7,691,942,296,058,210,000
32.184358
122
0.630303
false
ahaldane/IvoGPU
utils/getSeqEnergies.py
1
2110
#!/usr/bin/env python2 # #Copyright 2016 Allan Haldane. #This file is part of IvoGPU. #IvoGPU 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 3 of the License. #IvoGPU is distributed in the hope that ...
gpl-3.0
1,367,004,495,877,434,000
29.142857
80
0.649289
false
matuu/simpleai
tests/machine_learning/test_metrics.py
4
2290
#!/usr/bin/env python # coding: utf-8 """ Tests for metrics module in machine learning. """ import unittest from simpleai.machine_learning.metrics import Counter, OnlineEntropy, \ OnlineLogProbability, \ OnlineInformationGain ...
mit
-7,100,092,211,988,470,000
30.805556
71
0.599563
false
eerwitt/tensorflow
tensorflow/python/platform/app.py
35
1691
# Copyright 2015 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
6,297,203,371,925,682,000
30.90566
80
0.693081
false
b-cuts/airflow
airflow/hooks/S3_hook.py
28
12831
from future import standard_library standard_library.install_aliases() import logging import json import re import fnmatch import configparser from urllib.parse import urlparse import boto from boto.s3.connection import S3Connection from boto.sts import STSConnection boto.set_stream_logger('boto') logging.getLogger("b...
apache-2.0
-7,858,040,844,244,873,000
37.64759
79
0.576261
false
derDavidT/sympy
sympy/sets/sets.py
17
57589
from __future__ import print_function, division from itertools import product from sympy.core.sympify import _sympify, sympify from sympy.core.basic import Basic from sympy.core.singleton import Singleton, S from sympy.core.evalf import EvalfMixin from sympy.core.numbers import Float from sympy.core.compatibility imp...
bsd-3-clause
3,218,167,639,633,148,000
27.722693
106
0.544357
false
tum-pbs/PhiFlow
phi/math/backend/_backend.py
1
44839
from collections import namedtuple from contextlib import contextmanager from threading import Barrier from typing import List, Callable import numpy from ._dtype import DType, combine_types SolveResult = namedtuple('SolveResult', [ 'method', 'x', 'residual', 'iterations', 'function_evaluations', 'converged', '...
mit
-2,784,862,675,511,536,000
36.708999
216
0.616179
false
lnls-fac/sirius
pymodels/TB_V03_02/lattice.py
1
9745
"""Lattice module. In this module the lattice of the corresponding accelerator is defined. """ import math as _math from pyaccel import lattice as _pyacc_lat, elements as _pyacc_ele, \ accelerator as _pyacc_acc, optics as _pyacc_opt from . import segmented_models as _segmented_models energy = 0.150e9 # [eV] def...
mit
7,018,905,494,914,259,000
32.146259
78
0.548179
false
mrquim/repository.mrquim
plugin.video.mrpiracy/resources/lib/js2py/es6/__init__.py
27
1270
INITIALISED = False babel = None babelPresetEs2015 = None def js6_to_js5(code): global INITIALISED, babel, babelPresetEs2015 if not INITIALISED: import signal, warnings, time warnings.warn('\nImporting babel.py for the first time - this can take some time. \nPlease note that currently Javascrip...
gpl-2.0
-387,959,809,374,441,300
38.71875
191
0.627559
false
natanovia/Anki-Android
tools/manage-crowdin.py
20
5581
#!/usr/bin/python # Copyright (c) 2010 norbert.nagold@gmail.com # # 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. # # T...
gpl-3.0
-7,926,630,329,264,523,000
36.206667
216
0.604014
false
spaghetti-/rosdep
src/rosdep2/sources_list.py
1
24825
# Copyright (c) 2012, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright # notice, this list of cond...
bsd-3-clause
706,193,362,580,082,700
35.941964
121
0.644632
false
badock/nova
nova/objects/flavor.py
6
10781
# Copyright 2013 Red Hat, 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 applicable law or ag...
apache-2.0
1,388,317,981,248,626,400
38.92963
78
0.572025
false
zjuchenyuan/BioWeb
Lib/Bio/SwissProt/__init__.py
1
22555
# Copyright 2007 by Michiel de Hoon. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Code to work with the sprotXX.dat file from SwissProt. http://www.expasy.ch/sprot/sprot-t...
mit
1,913,186,127,371,190,500
36.404643
98
0.56697
false
programmer10110/instavpn
util.py
2
5006
import platform, os, logging_subprocess, random, string, logging, sys, json, urllib2, fileinput logger = logging.getLogger() string_pool = string.ascii_letters + string.digits gen_random_text = lambda s: ''.join(map(lambda _: random.choice(string_pool), range(s))) def run_command(cmd): return not (logging_subpro...
apache-2.0
7,130,548,158,920,767,000
29.901235
124
0.622853
false
sertac/django
tests/template_tests/filter_tests/test_truncatewords_html.py
386
1607
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.template.defaultfilters import truncatewords_html from django.test import SimpleTestCase class FunctionTests(SimpleTestCase): def test_truncate_zero(self): self.assertEqual(truncatewords_html('<p>one <a href="#">two - three <br>...
bsd-3-clause
6,794,931,790,073,381,000
35.522727
107
0.555694
false
psychobaka/PatchCorral
src/engine/file.py
3
2758
#################################################################################################### # Copyright 2013 John Crawford # # This file is part of PatchCorral. # # PatchCorral is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by ...
gpl-3.0
-8,352,095,456,644,056,000
32.049383
100
0.616751
false
kemalakyol48/python-for-android
python3-alpha/extra_modules/gdata/urlfetch.py
47
9308
#!/usr/bin/python # # Copyright (C) 2008 Google 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 applicable law ...
apache-2.0
-5,397,352,535,760,641,000
36.684211
79
0.691878
false
ddrown/irssiconnectbot-protobuf
gtest/test/gtest_xml_outfiles_test.py
718
5312
#!/usr/bin/env python # # Copyright 2008, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
bsd-3-clause
-5,281,076,184,684,413,000
39.242424
140
0.699925
false
vmfarms/django-rest-swagger
tests/cigar_example/cigar_example/wsgi.py
18
1148
""" WSGI config for cigar_example 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_APPLICAT...
bsd-2-clause
223,203,459,558,364,380
40
79
0.800523
false
glwu/python-for-android
python3-alpha/python3-src/Lib/ctypes/test/test_pointers.py
53
6273
import unittest, sys from ctypes import * import _ctypes_test ctype_types = [c_byte, c_ubyte, c_short, c_ushort, c_int, c_uint, c_long, c_ulong, c_longlong, c_ulonglong, c_double, c_float] python_types = [int, int, int, int, int, int, int, int, int, int, float, float] class PointersT...
apache-2.0
-8,955,999,783,600,438,000
31.671875
92
0.54631
false
chrisdunelm/google-api-dotnet-client
ClientGenerator/src/googleapis/codegen/targets.py
6
10444
#!/usr/bin/python2.7 # Copyright 2011 Google Inc. All Rights Reserved. """Targets class describes which languages/platforms we support.""" __author__ = 'wclarkso@google.com (Will Clarkson)' import logging import os from googleapis.codegen.filesys import files from googleapis.codegen.utilities import json_expander ...
apache-2.0
2,495,858,284,310,484,000
32.909091
80
0.669763
false
Maikflow/django_test
lib/python2.7/site-packages/setuptools/__init__.py
158
5195
"""Extensions to the 'distutils' for large or complex distributions""" import os import sys import distutils.core import distutils.filelist from distutils.core import Command as _Command from distutils.util import convert_path from fnmatch import fnmatchcase import setuptools.version from setuptools.extension import ...
gpl-2.0
9,113,684,457,920,407,000
32.733766
79
0.643118
false
feer56/Kitsune1
kitsune/questions/tasks.py
1
6470
import logging import traceback from datetime import date from django.conf import settings from django.contrib.sites.models import Site from django.db import connection, transaction # NOTE: This import is just so _fire_task gets registered with celery. import tidings.events # noqa from celery import task from multid...
bsd-3-clause
-5,057,971,360,786,031,000
31.676768
76
0.646368
false
richard-willowit/odoo
addons/payment_stripe/models/payment.py
3
10420
# coding: utf-8 import logging import requests from odoo import api, fields, models, _ from odoo.addons.payment.models.payment_acquirer import ValidationError from odoo.exceptions import UserError from odoo.tools.safe_eval import safe_eval _logger = logging.getLogger(__name__) # Force the API version to avoid break...
gpl-3.0
1,138,100,766,478,482,700
39.23166
131
0.563148
false
szeged/servo
tests/wpt/web-platform-tests/tools/third_party/hyper/hyper/packages/hyperframe/flags.py
41
1028
# -*- coding: utf-8 -*- """ hyperframe/flags ~~~~~~~~~~~~~~~~ Defines basic Flag and Flags data structures. """ import collections Flag = collections.namedtuple("Flag", ["name", "bit"]) class Flags(collections.MutableSet): """ A simple MutableSet implementation that will only accept known flags as elements...
mpl-2.0
-3,295,095,865,065,525,000
24.7
92
0.610895
false
derrod/livestreamer
src/livestreamer/plugins/azubutv.py
15
6049
import re from io import BytesIO from time import sleep from livestreamer.exceptions import PluginError from livestreamer.packages.flashmedia import AMFPacket, AMFMessage from livestreamer.packages.flashmedia.types import AMF3ObjectBase from livestreamer.plugin import Plugin from livestreamer.plugin.api import http, ...
bsd-2-clause
1,600,710,230,266,024,200
32.054645
85
0.574144
false
loseblue/vim-ycm-windows-64
third_party/ycmd/third_party/waitress/waitress/tests/test_regression.py
40
4059
############################################################################## # # Copyright (c) 2005 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
gpl-3.0
2,775,847,563,361,845,000
27.1875
78
0.618625
false
yitian134/chromium
tools/code_coverage/coverage_posix_unittest.py
54
4782
#!/usr/bin/env python # Copyright (c) 2010 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for coverage_posix.py. Run a single test with a command such as: ./coverage_posix_unittest.py CoveragePosixTest.te...
bsd-3-clause
-862,730,220,981,577,100
32.676056
79
0.628607
false
lyw07/kolibri
kolibri/core/exams/models.py
1
6100
from django.db import models from jsonfield import JSONField from .permissions import UserCanReadExamAssignmentData from .permissions import UserCanReadExamData from kolibri.core.auth.constants import role_kinds from kolibri.core.auth.models import AbstractFacilityDataModel from kolibri.core.auth.models import Collect...
mit
-7,012,715,160,879,537,000
34.672515
103
0.654262
false
andip71/boeffla-kernel-samsung-n8000
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
1935
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
gpl-2.0
6,205,065,191,760,019,000
21.5
72
0.667183
false
Serag8/Bachelor
google_appengine/lib/django-1.4/django/utils/timezone.py
81
8011
"""Timezone helper functions. This module uses pytz when it's available and fallbacks when it isn't. """ from datetime import datetime, timedelta, tzinfo from threading import local import time as _time try: import pytz except ImportError: pytz = None from django.conf import settings __all__ = [ 'utc',...
mit
9,090,184,471,638,654,000
27.407801
81
0.642616
false
zhuyongyong/crosswalk-test-suite
cordova/cordova-sampleapp-android-tests/sampleapp/privateNotes_close.py
15
2239
#!/usr/bin/env python # # Copyright (c) 2015 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of conditions and t...
bsd-3-clause
-2,951,104,607,400,155,600
42.057692
101
0.724431
false
prarthitm/edxplatform
common/lib/capa/capa/tests/test_correctmap.py
107
7116
""" Tests to verify that CorrectMap behaves correctly """ import unittest from capa.correctmap import CorrectMap import datetime class CorrectMapTest(unittest.TestCase): """ Tests to verify that CorrectMap behaves correctly """ def setUp(self): super(CorrectMapTest, self).setUp() sel...
agpl-3.0
-2,497,503,349,873,010,700
31.792627
81
0.568016
false
eul-721/The-Perfect-Pokemon-Team-Balancer
libs/env/Lib/site-packages/whoosh/lang/snowball/dutch.py
96
6194
from .bases import _StandardStemmer from whoosh.compat import u class DutchStemmer(_StandardStemmer): """ The Dutch Snowball stemmer. :cvar __vowels: The Dutch vowels. :type __vowels: unicode :cvar __step1_suffixes: Suffixes to be deleted in step 1 of the algorithm. :type __step1_suffixes: t...
gpl-2.0
3,293,219,560,937,721,300
34.803468
80
0.415886
false
tejonbiker/Adafruit_Python_MPR121
Adafruit_MPR121/MPR121.py
11
8262
# Copyright (c) 2014 Adafruit Industries # Author: Tony DiCola # # 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, m...
mit
-6,006,464,784,987,713,000
42.946809
109
0.64137
false
linebp/pandas
doc/make.py
8
12640
#!/usr/bin/env python """ Python script for building documentation. To build the docs you must have all optional dependencies for pandas installed. See the installation instructions for a list of these. <del>Note: currently latex builds do not work because of table formats that are not supported in the latex generat...
bsd-3-clause
-8,735,844,811,641,713,000
27.858447
95
0.582991
false
urandu/rethinkdb
external/v8_3.30.33.16/build/gyp/tools/pretty_sln.py
806
5092
#!/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. """Prints the information in a sln file in a diffable way. It first outputs each projects in alphabetical order with their dependenci...
agpl-3.0
-117,906,438,856,939,490
29.309524
80
0.569717
false
jolevq/odoopub
addons/website_mail/models/mail_thread.py
338
1454
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
7,625,428,154,479,396,000
37.263158
78
0.575653
false
ericlink/adms-server
playframework-dist/play-1.1/python/Lib/subprocess.py
2
45310
# subprocess - Subprocesses with accessible I/O streams # # For more information about this module, see PEP 324. # # This module should remain compatible with Python 2.2, see PEP 291. # # Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se> # # Licensed to PSF under a Contributor Agreement. # See ...
mit
-8,167,670,807,610,235,000
34.017488
128
0.549305
false
mongmong/python-sweety
src/sweety/loader.py
1
1184
#!/usr/bin/env python ''' sweety.loader This module contains the functions for loading modules. @author: Chris Chou <m2chrischou AT gmail.com> @description: ''' import os import sys import traceback from sweety.log import get_logger def load_file(filename): ''' load_file(filename) -> module Loads...
bsd-2-clause
5,655,514,452,603,742,000
18.733333
55
0.603041
false
blueboxgroup/ansible
lib/ansible/module_utils/vca.py
5
10930
# # 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, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope tha...
gpl-3.0
1,363,206,694,171,736,600
32.734568
89
0.606221
false
hhsprings/cython
Cython/Compiler/TypeInference.py
13
21051
from __future__ import absolute_import from .Errors import error, message from . import ExprNodes from . import Nodes from . import Builtin from . import PyrexTypes from .. import Utils from .PyrexTypes import py_object_type, unspecified_type from .Visitor import CythonTransform, EnvTransform try: reduce except N...
apache-2.0
2,212,766,573,687,447,000
36.524064
95
0.567146
false
gangadharkadam/vlinkerp
erpnext/config/crm.py
16
2937
from frappe import _ def get_data(): return [ { "label": _("Documents"), "icon": "icon-star", "items": [ { "type": "doctype", "name": "Lead", "description": _("Database of potential customers."), }, { "type": "doctype", "name": "Customer", "description": _("Custome...
agpl-3.0
-1,340,473,570,891,689,200
19.829787
62
0.483146
false
brianyu2010/Mini-Metagenomic_Analyses
Snakefile_combined_analysis.py
1
7049
############################################### # Snakemake rules associated with combined # analysis of each biosample from subsample resutls # this file must be included into another # Snakemake file ############################################### # rename each contig with subsample information # this rule is no lo...
gpl-3.0
-835,447,864,730,813,000
44.477419
218
0.640375
false
yangjiandong/djangosnippets
cab/views/popular.py
1
1362
import datetime from django.contrib.auth.models import User from django.shortcuts import render_to_response from django.template.context import RequestContext from django.views.generic.list_detail import object_list from taggit.models import Tag from cab.models import Snippet, Language, Bookmark from cab.utils impor...
bsd-3-clause
-5,742,447,194,425,680,000
24.222222
56
0.668135
false
50wu/gpdb
gpMgmt/bin/gppylib/gpMgmttest/__init__.py
29
2244
import unittest import time class GpMgmtTestRunner(unittest.TextTestRunner): def _makeResult(self): return GpMgmtTextTestResult(self.stream, self.descriptions, self.verbosity) class GpMgmtTextTestResult(unittest.TextTestResult): def __init__(self, stream, descriptions, verbosity): super(GpMgm...
apache-2.0
-5,969,435,742,392,830,000
36.4
128
0.63057
false
procangroup/edx-platform
lms/djangoapps/instructor_task/migrations/0002_gradereportsetting.py
25
1167
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('instruct...
agpl-3.0
-3,656,651,798,719,279,000
36.645161
178
0.602399
false
dcramer/django-compositepks
django/contrib/gis/admin/widgets.py
6
3727
from django.contrib.gis.gdal import OGRException from django.contrib.gis.geos import GEOSGeometry, GEOSException from django.forms.widgets import Textarea from django.template.loader import render_to_string class OpenLayersWidget(Textarea): """ Renders an OpenLayers map using the WKT of the geometry. """ ...
bsd-3-clause
5,866,231,798,301,732,000
39.51087
74
0.552455
false
janpascal/denyhosts
DenyHosts/purgecounter.py
1
1894
import logging import os from . import constants from .counter import Counter, CounterRecord error = logging.getLogger("purgecounter").error info = logging.getLogger("purgecounter").info class PurgeCounter(object): def __init__(self, prefs): self.filename = os.path.join(prefs['WORK_DIR'], ...
gpl-2.0
-77,918,251,938,563,620
24.253333
67
0.515312
false
jvarho/rencfs
aes.py
1
2540
#!/usr/bin/python3 # Copyright (c) 2017-2020, Jan Varho # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE ...
isc
999,948,682,936,665,900
33.324324
74
0.714173
false
ageron/tensorflow
tensorflow/contrib/training/python/training/evaluation_test.py
25
18065
# 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 applicable ...
apache-2.0
3,265,417,175,553,067,500
34.631164
80
0.6801
false
Weasyl/weasyl
weasyl/report.py
1
9411
import arrow from sqlalchemy.dialects.postgresql import ARRAY from sqlalchemy.orm import aliased, contains_eager, joinedload import sqlalchemy as sa import web from libweasyl.models.content import Report, ReportComment from libweasyl.models.users import Login from libweasyl import constants, staff from weasyl.error im...
apache-2.0
-3,824,364,035,865,131,500
34.115672
104
0.639889
false
duhzecca/cinder
cinder/tests/unit/scheduler/test_host_manager.py
7
27242
# Copyright (c) 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 ...
apache-2.0
-7,739,582,416,772,611,000
43.805921
79
0.558549
false
heenbo/mosquitto-heenbo
test/mosq_test.py
7
13413
import errno import os import socket import subprocess import struct import time def start_broker(filename, cmd=None, port=1888): delay = 0.1 if cmd is None: cmd = ['../../src/mosquitto', '-v', '-c', filename.replace('.py', '.conf')] if os.environ.get('MOSQ_USE_VALGRIND') is not None: cmd =...
gpl-3.0
-5,645,407,650,333,233,000
34.204724
169
0.549318
false
justinslee/Wai-Not-Makahiki
makahiki/apps/widgets/notifications/tests.py
7
5066
"""Notification testing.""" from django.test import TransactionTestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from apps.managers.challenge_mgr import challenge_mgr from apps.utils import test_utils from apps.widgets.notifications import get_unread_notifications from ...
mit
3,791,493,151,515,724,300
41.571429
99
0.66364
false
neuroidss/htmengine-traffic-tutorial
python-engine/consume_realtime_results.py
11
5688
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have purchased from # Numenta, Inc. a separate commercial license for this software code, the # following terms and conditio...
gpl-3.0
-4,774,042,185,256,086,000
33.26506
79
0.69128
false
lscheinkman/nupic
tests/unit/nupic/encoders/logenc_test.py
10
10536
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
5,842,225,114,962,640,000
31.518519
76
0.633257
false
davidbz/trafficserver
tests/gold_tests/pluginTest/multiplexer/multiplexer.test.py
2
2128
''' ''' # 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,482,773,943,674,797,600
39.923077
148
0.738252
false
wehkamp/ansible
lib/ansible/playbook/role/__init__.py
15
14784
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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, either version 3 of the License, or # (at your option) an...
gpl-3.0
7,133,974,722,278,067,000
36.333333
174
0.599026
false
saiwing-yeung/scikit-learn
sklearn/neural_network/_stochastic_optimizers.py
93
8873
"""Stochastic optimization methods for MLP """ # Authors: Jiyuan Qian <jq401@nyu.edu> # License: BSD 3 clause import numpy as np class BaseOptimizer(object): """Base (Stochastic) gradient descent optimizer Parameters ---------- params : list, length = len(coefs_) + len(intercepts_) The con...
bsd-3-clause
-3,335,869,347,061,843,500
32.357143
79
0.588076
false
HopeFOAM/HopeFOAM
ThirdParty-0.1/ParaView-5.0.1/VTK/ThirdParty/Twisted/twisted/conch/test/test_tap.py
32
6164
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.conch.tap}. """ try: import Crypto.Cipher.DES3 except: Crypto = None try: import pyasn1 except ImportError: pyasn1 = None try: from twisted.conch import unix except ImportError: unix = None if Cr...
gpl-3.0
-540,310,456,152,638,200
32.68306
79
0.641629
false
quinot/ansible
lib/ansible/modules/network/illumos/ipadm_addrprop.py
61
7148
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Adam Števko <adam.stevko@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
5,081,859,442,747,857,000
26.590734
92
0.558494
false
leiferikb/bitpop
src/third_party/scons-2.0.1/engine/SCons/Tool/tlib.py
61
1884
"""SCons.Tool.tlib XXX """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # 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 restr...
gpl-3.0
352,941,697,377,537,150
34.54717
95
0.721868
false
blazek/QGIS
python/plugins/processing/algs/qgis/SelectByExpression.py
15
3786
# -*- coding: utf-8 -*- """ *************************************************************************** SelectByExpression.py --------------------- Date : July 2014 Copyright : (C) 2014 by Michael Douchin ***********************************************************************...
gpl-2.0
-997,381,572,583,215,400
38.852632
130
0.549128
false
GoogleCloudPlatform/cloud-foundation-toolkit
dm/templates/interconnect/interconnect.py
1
2261
# Copyright 2018 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 required by applicable law or a...
apache-2.0
3,848,690,436,779,972,600
30.402778
79
0.560814
false
Define-break-continue/raspoznavayka
src/lib/rtaudio-4.1.2/contrib/python/pyrtaudio/setup.py
8
1601
#!/bin/env python import os from distutils.core import setup, Extension if hasattr(os, 'uname'): OSNAME = os.uname()[0] else: OSNAME = 'Windows' define_macros = [] libraries = [] extra_link_args = [] extra_compile_args = ['-I../../../'] sources = ['rtaudiomodule.cpp', '../../../RtAudio.cpp'] if OSNAME == ...
gpl-3.0
8,364,879,456,257,611,000
26.603448
64
0.518426
false
TheBraveWarrior/pyload
module/plugins/accounts/QuickshareCz.py
8
1274
# -*- coding: utf-8 -*- import re from ..internal.Account import Account class QuickshareCz(Account): __name__ = "QuickshareCz" __type__ = "account" __version__ = "0.11" __status__ = "testing" __description__ = """Quickshare.cz account plugin""" __license__ = "GPLv3" __authors__ = [("zo...
gpl-3.0
4,411,305,939,339,684,000
30.7
82
0.554416
false
glynjackson/ec2-deploy
ec2_deploy/ec2/api.py
1
1965
import time import boto import boto.ec2 from fabric.api import task, settings, sudo, execute, env, run, cd, local, put, abort, get, hosts from fabric.operations import prompt from ec2_deploy.connections import AWS from ec2_deploy.notifications import Notification def create_instance(instance_type='web', address=No...
mit
-3,967,451,818,571,063,000
34.727273
142
0.678372
false
grant-olson/pyasm
makeStructs.py
1
7808
# Copyright 2004-2010 Grant T. Olson. # See license.txt for terms. import re, sys, glob, os, time #These files are in the 'include' directory, but are modules. #They won't get built properly skipFiles = ('datetime.h','py_curses.h','structseq.h','symtable.h') def emitFileHeader(): print """/* Copyright 2004-2006...
bsd-3-clause
1,840,819,514,430,691,300
30.483871
108
0.519083
false
aptrishu/coala
coalib/misc/Caching.py
10
5435
import logging import time import os from coala_utils.decorators import enforce_signature from coalib.misc.CachingUtilities import ( pickle_load, pickle_dump, delete_files) class FileCache: """ This object is a file cache that helps in collecting only the changed and new files since the last run. Exa...
agpl-3.0
-4,251,664,043,201,579,500
30.057143
80
0.580497
false
semkiv/heppy_fcc
background_Bs2DsDsK_with_Ds2PiPiPiPi_analysis_cfg.py
1
3669
#!/usr/bin/env python """ Configuration script for the analyzer of B0s -> K*0 Ds+ Ds- background events | | |-> pi- pi- pi+ pi0 | |-> pi+ pi+ pi- pi0 ...
gpl-3.0
571,574,815,957,426,200
40.693182
153
0.487054
false
zr4x/pythonTests
fixture/group.py
1
3582
from model.group import Group class GroupHelper: def __init__(self, app): self.app = app def open_groups_page(self): wd = self.app.wd if not (wd.current_url.endswith("/group.php") and len(wd.find_elements_by_name("new")) > 0): wd.find_element_by_link_text("groups").click()...
apache-2.0
2,976,077,634,855,927,300
32.476636
100
0.589615
false
SerialShadow/SickRage
lib/sqlalchemy/util/langhelpers.py
75
37513
# util/langhelpers.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Routines to help with the creation, loading and introspection of modules, class...
gpl-3.0
-8,910,968,798,898,428,000
29.473599
85
0.569909
false
bzero/networkx
networkx/algorithms/bipartite/spectral.py
76
2538
# -*- coding: utf-8 -*- """ Spectral bipartivity measure. """ import networkx as nx __author__ = """Aric Hagberg (hagberg@lanl.gov)""" # Copyright (C) 2011 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. __a...
bsd-3-clause
1,779,719,764,401,748,000
27.818182
76
0.606073
false
chrippa/xmms2
waftools/gittools.py
5
1944
import os try: from hashlib import sha1 as sha except ImportError: from sha import sha def gitsha(path): h = sha() data = file(path, 'rb').read() h.update("blob %d\0" % len(data)) h.update(data) return h.hexdigest() def git_info(): commithash = os.popen('git rev-parse --verify HEAD 2>/dev/null...
lgpl-2.1
-5,659,197,145,269,755,000
26
83
0.56893
false