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
rvanlaar/easy-transifex
src/transifex/transifex/resources/tests/lib/mozilla_properties/__init__.py
1
5569
# -*- coding: utf-8 -*- import os, chardet import unittest from transifex.txcommon.tests.base import BaseTestCase from transifex.languages.models import Language from transifex.resources.models import * from transifex.resources.formats.mozillaproperties import MozillaPropertiesHandler from transifex.addons.suggestio...
bsd-2-clause
8,411,034,589,373,134,000
34.471338
93
0.619501
false
simonjbeaumont/sm
drivers/journaler.py
12
8585
#!/usr/bin/python # # Copyright (C) Citrix Systems Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; version 2.1 only. # # This program is distributed in the hope that it will be u...
lgpl-2.1
-3,109,208,338,753,168,400
34.622407
91
0.533372
false
ilya-klyuchnikov/buck
third-party/py/pex/pex/environment.py
52
7749
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, print_function import itertools import os import site import sys import uuid from pkg_resources import ( DistributionNotFound, Environment...
apache-2.0
6,010,280,806,904,277,000
38.535714
98
0.657117
false
bluevoda/BloggyBlog
lib/python3.4/site-packages/django/contrib/postgres/fields/array.py
59
9933
import json from django.contrib.postgres import lookups from django.contrib.postgres.forms import SimpleArrayField from django.contrib.postgres.validators import ArrayMaxLengthValidator from django.core import checks, exceptions from django.db.models import Field, IntegerField, Transform from django.db.models.lookups ...
gpl-3.0
6,251,158,218,669,771,000
33.251724
100
0.58804
false
xen0l/ansible
lib/ansible/plugins/lookup/flattened.py
101
2821
# (c) 2013, Serge van Ginderachter <serge@vanginderachter.be> # (c) 2017 Ansible Project # 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 DOCUMENTATION = """ lookup: flattened aut...
gpl-3.0
-6,200,351,115,287,979,000
32.583333
124
0.613612
false
jlcarmic/producthunt_simulator
venv/lib/python2.7/site-packages/numpy/lib/twodim_base.py
83
26903
""" Basic functions for manipulating 2d arrays """ from __future__ import division, absolute_import, print_function from numpy.core.numeric import ( asanyarray, arange, zeros, greater_equal, multiply, ones, asarray, where, int8, int16, int32, int64, empty, promote_types, diagonal, ) from numpy.core import...
mit
2,544,102,904,984,248,000
25.715988
78
0.537821
false
ms-iot/python
cpython/Lib/email/utils.py
3
14263
# Copyright (C) 2001-2010 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Miscellaneous utilities.""" __all__ = [ 'collapse_rfc2231_value', 'decode_params', 'decode_rfc2231', 'encode_rfc2231', 'formataddr', 'formatdate', 'format_datetime', 'getaddre...
bsd-3-clause
7,197,336,725,979,994,000
34.836683
80
0.625675
false
ComNets-Bremen/WUSN
wusnExampleServer/SimpleLogger/management/commands/SerialListener.py
1
3139
from django.core.management.base import BaseCommand, CommandError from SimpleLogger.models import SimpleWusnData import serial, traceback, re, datetime, pytz RE_STRING = r"^#\[(?P<p_number>\d+)\]\[(?P<node_id>\d+)\]\s+D(?P<y>\d+)\/(?P<m>\d+)\/(?P<d>\d+)\s+t(?P<hour>\d+)\:(?P<minute>\d+)\s+W(?P<water>\d+)\s+T(?P<temp>...
gpl-3.0
606,772,447,569,673,300
43.842857
238
0.518318
false
Avinash-Raj/appengine-django-skeleton
lib/_mysql_exceptions.py
99
2352
"""_mysql_exceptions: Exception classes for _mysql and MySQLdb. These classes are dictated by the DB API v2.0: http://www.python.org/topics/database/DatabaseAPI-2.0.html """ try: from exceptions import Exception, StandardError, Warning except ImportError: # Python 3 StandardError = Exception class ...
bsd-3-clause
1,312,538,862,962,890,800
26.034483
70
0.729592
false
hryamzik/ansible
lib/ansible/modules/remote_management/foreman/katello.py
7
20467
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, Eric D Helms <ericdhelms@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...
gpl-3.0
-3,488,074,340,242,303,500
32.279675
154
0.607612
false
Xeleste/namebench
nb_third_party/dns/rdtypes/ANY/HINFO.py
248
2659
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation 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 ...
apache-2.0
-3,827,239,490,219,742,000
31.036145
79
0.601354
false
liamgh/liamgreenhughes-sl4a-tf101
python/src/Lib/plat-linux2/IN.py
155
13030
# Generated by h2py from /usr/include/netinet/in.h _NETINET_IN_H = 1 # Included from features.h _FEATURES_H = 1 __USE_ANSI = 1 __FAVOR_BSD = 1 _ISOC99_SOURCE = 1 _POSIX_SOURCE = 1 _POSIX_C_SOURCE = 199506L _XOPEN_SOURCE = 600 _XOPEN_SOURCE_EXTENDED = 1 _LARGEFILE64_SOURCE = 1 _BSD_SOURCE = 1 _SVID_SOURCE = 1 _BSD_SOUR...
apache-2.0
-380,988,019,587,094,500
20.186992
82
0.68726
false
agualis/test-django-nonrel
django/conf/locale/__init__.py
157
9257
LANG_INFO = { 'ar': { 'bidi': True, 'code': 'ar', 'name': 'Arabic', 'name_local': u'\u0627\u0644\u0639\u0631\u0628\u064a\u0651\u0629', }, 'az': { 'bidi': True, 'code': 'az', 'name': 'Azerbaijani', 'name_local': u'az\u0259rbaycan dili', }, ...
bsd-3-clause
5,791,002,145,680,648,000
21.913366
86
0.40121
false
camomile-project/camomile-server
test/__init__.py
1
2276
from __future__ import unicode_literals import tempfile import subprocess import pymongo import shutil import time import sys from camomile import Camomile URL = 'http://localhost:3000' CLIENT = Camomile(URL, debug=False) MONGO_DIR = None MONGO_PROCESS = None NODE_PROCESS = None ROOT_USERNAME = 'root' ROOT_PASSWO...
mit
-3,954,832,089,414,003,700
22.463918
120
0.648067
false
kumarshubham/xhtml2pdf
xhtml2pdf/__init__.py
41
1566
# -*- coding: utf-8 -*- import logging # Copyright 2010 Dirk Holtwick, holtwick.it # # 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
-2,960,342,636,646,930,000
27.472727
75
0.659004
false
kumy/geokrety-api
tests/unittests/utils/responses/base.py
2
10902
# -*- coding: utf-8 -*- import pprint from datetime import datetime class BaseResponse(dict): class assertRaises: def __init__(self, expected, expected_regexp=None): self.expected = expected self.failureException = AssertionError self.expected_regexp = expected_regex...
gpl-3.0
2,727,475,860,315,641,000
39.377778
138
0.586314
false
Svolcano/python_exercise
WinLsLoad/lib/msg/Serialize.py
1
1404
import json import logging from ..cipher.Cipher import Cipher logger = logging.getLogger(__name__) class Serialize(): def __init__(self): pass def serialize(self, content_obj): ''' encode content_obj to string ,then encrypt the string. for example: content_obj = {'a'...
mit
7,177,079,656,791,521,000
22.4
84
0.522792
false
gibiansky/tensorflow
tensorflow/python/summary/event_multiplexer.py
24
13976
# 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
-5,495,998,842,702,561,000
33.339066
80
0.6748
false
UK992/servo
tests/wpt/web-platform-tests/tools/third_party/webencodings/webencodings/x_user_defined.py
171
4307
# coding: utf-8 """ webencodings.x_user_defined ~~~~~~~~~~~~~~~~~~~~~~~~~~~ An implementation of the x-user-defined encoding. :copyright: Copyright 2012 by Simon Sapin :license: BSD, see LICENSE for details. """ from __future__ import unicode_literals import codecs ### Codec APIs class Code...
mpl-2.0
2,584,012,636,421,011,500
12.252308
75
0.430462
false
slifty/audfprint
comp_file_lines.py
5
1392
#!/usr/bin/env python # comp_file_lines.py # # Python script to count number of exact matching lines between two files, no edit distance # 2014-09-07 Dan Ellis dpwe@ee.columbia.edu import sys verbose = False onefile = False if len(sys.argv) == 2: # Special case: if a single file, compare the first ws-separated...
mit
-7,792,382,783,825,630,000
25.264151
96
0.653736
false
trading-dev/trading-coin
contrib/linearize/linearize-hashes.py
1
3038
#!/usr/bin/python # # linearize-hashes.py: List blocks in a linear, no-fork version of the chain. # # Copyright (c) 2013-2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from __future__ import pr...
mit
-1,725,254,609,538,285,600
25.884956
90
0.663924
false
synicalsyntax/zulip
zerver/lib/storage.py
8
2688
# Useful reading is: # https://zulip.readthedocs.io/en/latest/subsystems/html-css.html#front-end-build-process import os from typing import Optional from django.conf import settings from django.contrib.staticfiles.storage import ManifestStaticFilesStorage if settings.DEBUG: from django.contrib.staticfiles.finder...
apache-2.0
5,104,496,170,709,330,000
45.344828
103
0.658482
false
datakid/tvet
tafe/migrations/0039_auto__add_field_subject_staff_member.py
1
21951
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Subject.staff_member' db.add_column('tafe_subject', 'staff_member', se...
gpl-3.0
863,377,210,651,315,000
87.160643
212
0.550818
false
certik/pyjamas
examples/infohierarchy/InfoDirectory.py
5
15139
import pyjd from pyjamas.ui.RootPanel import RootPanel from pyjamas.ui.HTML import HTML from pyjamas.ui.Label import Label from pyjamas.ui.Button import Button from pyjamas.ui.HorizontalPanel import HorizontalPanel from pyjamas.ui.AbsolutePanel import AbsolutePanel from pyjamas.ui.ScrollPanel import ScrollPanel from p...
apache-2.0
8,430,633,264,345,980,000
30.278926
123
0.586102
false
Belgabor/django
django/contrib/databrowse/plugins/calendars.py
247
4317
from django import http from django.db import models from django.contrib.databrowse.datastructures import EasyModel from django.contrib.databrowse.sites import DatabrowsePlugin from django.shortcuts import render_to_response from django.utils.text import capfirst from django.utils.encoding import force_unicode from dja...
bsd-3-clause
-3,401,296,134,335,350,000
49.197674
151
0.642344
false
achesnais/open-concordance
corpus.py
1
6801
#!/usr/bin/python3 """ Open Concordance by Antoine Chesnais. A simple corpus processing tool. Copyright (C) 2014 Antoine Chesnais 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
2,671,859,813,950,930,400
36.574586
167
0.511542
false
WorksApplications/cassandra
pylib/setup.py
78
1154
#!/usr/bin/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 # "Licens...
apache-2.0
6,338,737,690,067,112,000
32.941176
74
0.743501
false
xtmhm2000/scrapy-0.22
scrapy/tests/test_contrib_loader.py
24
22570
import unittest from functools import partial from scrapy.contrib.loader import ItemLoader from scrapy.contrib.loader.processor import Join, Identity, TakeFirst, \ Compose, MapCompose from scrapy.item import Item, Field from scrapy.selector import Selector from scrapy.http import HtmlResponse # test items class ...
bsd-3-clause
-8,647,012,930,963,594,000
37.713551
105
0.592734
false
soldag/home-assistant
tests/components/cover/test_intent.py
24
1584
"""The tests for the cover platform.""" from homeassistant.components.cover import ( SERVICE_CLOSE_COVER, SERVICE_OPEN_COVER, intent as cover_intent, ) from homeassistant.helpers import intent from tests.common import async_mock_service async def test_open_cover_intent(hass): """Test HassOpenCover i...
apache-2.0
1,308,223,215,065,442,000
30.68
74
0.66351
false
joshumax/CoLinux64
src/build.comake.py
1
4278
# This is not a standalone Python script, but a build declaration file # to be read by bin/make.py. Please run bin/make.py --help. import os from comake.settings import settings settings.arch = os.getenv('COLINUX_HOST_ARCH') if not settings.arch: settings.arch = 'i386' print "Target architecture not specifie...
gpl-2.0
7,270,239,003,229,045,000
34.355372
93
0.664797
false
ariegg/webiopi-drivers
buses/i2c/mcp2221/i2cmcpwindll.py
1
4154
# Copyright 2016 Andreas Riegg - t-h-i-n-x.net # # 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
8,363,922,769,588,947,000
37.82243
133
0.615311
false
xiaoyaozi5566/DiamondCache
src/arch/x86/isa/insts/simd128/floating_point/data_transfer/move_with_duplication.py
91
2495
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
bsd-3-clause
7,631,120,623,213,073,000
42.77193
72
0.775952
false
jimberlage/servo
tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/base.py
4
5534
import os import platform import socket from abc import ABCMeta, abstractmethod from copy import deepcopy from ..wptcommandline import require_arg # noqa: F401 here = os.path.split(__file__)[0] def inherit(super_module, child_globals, product_name): super_wptrunner = super_module.__wptrunner__ child_global...
mpl-2.0
385,203,899,744,413,760
28.752688
101
0.629382
false
rockaboxmedia/pexpect
tests/pexpectTest.py
3
1316
#!/usr/bin/env python import os, time, pexpect, sys def getProcessResults(cmd, timeLimit=20): """ executes 'cmd' as a child process and returns the child's output, the duration of execution, and the process exit status. Aborts if child process does not generate output for 'timeLimit' seconds. """ output =...
mit
2,428,929,132,747,223,600
26.416667
80
0.671733
false
SpamExperts/OrangeAssassin
oa/plugins/base.py
2
6639
"""Base for PAD plugins.""" from __future__ import absolute_import from builtins import tuple from builtins import object try: from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker except ImportError: create_engine = None sessionmaker = None from collections import defaultdict...
apache-2.0
3,274,231,640,726,919,700
32.361809
84
0.620877
false
goddino/libjingle
trunk/build/android/pylib/chrome_test_server_spawner.py
8
16822
# Copyright 2013 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. """A "Test Server Spawner" that handles killing/stopping per-test test servers. It's used to accept requests from the device to spawn and kill instances of ...
bsd-3-clause
3,494,448,318,376,769,500
37.849885
80
0.665854
false
nijinashok/sos
sos/plugins/activemq.py
1
1722
# Copyright (C) 2014 Red Hat, Inc., Bryn M. Reeves <bmr@redhat.com> # This file is part of the sos project: https://github.com/sosreport/sos # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # version 2 of the GNU General...
gpl-2.0
3,681,790,691,087,780,400
28.689655
74
0.601626
false
redhat-performance/tuned
tests/unit/monitors/test_base.py
1
2873
import unittest import tuned.monitors.base class MockMonitor(tuned.monitors.base.Monitor): @classmethod def _init_available_devices(cls): cls._available_devices = set(["a", "b"]) @classmethod def update(cls): for device in ["a", "b"]: cls._load.setdefault(device, 0) cls._load[device] += 1 class Monitor...
gpl-2.0
522,017,723,506,706,400
28.316327
69
0.703794
false
mscuthbert/abjad
abjad/tools/handlertools/RepeatedMarkupHandler.py
2
1215
# -*- encoding: utf-8 -*- from abjad.tools import markuptools from abjad.tools import scoretools from abjad.tools.handlertools.ArticulationHandler import ArticulationHandler class RepeatedMarkupHandler(ArticulationHandler): r'''Repeated markup handler. ''' ### CLASS ATTRIBUTES ### __slots__ = ( ...
gpl-3.0
4,117,635,795,197,033,500
24.333333
76
0.59177
false
dit/dit
tests/pid/test_imin.py
1
1262
""" Tests for dit.pid.imin. """ import pytest from dit.pid.measures.imin import PID_WB from dit.pid.distributions import bivariates, trivariates def test_pid_wb1(): """ Test imin on a generic distribution. """ d = bivariates['prob. 1'] pid = PID_WB(d, ((0,), (1,)), (2,)) assert pid[((0,), (1...
bsd-3-clause
5,652,619,485,980,837,000
25.291667
67
0.551506
false
pombredanne/scrapy
scrapy/commands/fetch.py
113
2063
from __future__ import print_function from w3lib.url import is_url from scrapy.commands import ScrapyCommand from scrapy.http import Request from scrapy.exceptions import UsageError from scrapy.utils.spider import spidercls_for_request, DefaultSpider class Command(ScrapyCommand): requires_project = False de...
bsd-3-clause
-2,173,422,586,705,672,200
35.192982
81
0.631604
false
MiLk/ansible
lib/ansible/modules/network/illumos/dladm_etherstub.py
70
4639
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Adam Števko <adam.stevko@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 L...
gpl-3.0
-4,358,628,971,996,177,400
24.478022
77
0.602976
false
rottenbytes/Sick-Beard
sickbeard/clients/requests/packages/charade/sjisprober.py
1182
3734
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
gpl-3.0
-5,953,730,529,196,430,000
40.032967
78
0.602571
false
mou4e/zirconium
tools/telemetry/telemetry/core/possible_browser.py
21
1405
# Copyright 2012 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. from telemetry.core import possible_app class PossibleBrowser(possible_app.PossibleApp): """A browser that can be controlled. Call Create() to launch ...
bsd-3-clause
5,354,376,775,722,207,000
25.018519
72
0.696797
false
ivansib/sib16
contrib/linearize/linearize-hashes.py
1
3037
#!/usr/bin/python # # linearize-hashes.py: List blocks in a linear, no-fork version of the chain. # # Copyright (c) 2013-2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from __future__ import pr...
mit
118,967,186,914,091,780
25.876106
90
0.663813
false
BryceARich/TransactionsMR
python/src/cloudstorage/rest_api.py
63
8753
# 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 required by applicable law or ag...
apache-2.0
-4,599,253,434,385,169,000
31.660448
80
0.667771
false
VitalPet/sale-workflow
sale_quotation_sourcing/tests/test_procurement_group.py
34
5432
# -*- coding: utf-8 -*- # # # Author: Yannick Vaucher # Copyright 2015 Camptocamp SA # # 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,...
agpl-3.0
4,577,677,950,535,401,500
37.253521
78
0.568115
false
ejpbruel/servo
components/script/dom/bindings/codegen/ply/ply/lex.py
344
40739
# ----------------------------------------------------------------------------- # ply: lex.py # # Copyright (C) 2001-2009, # David M. Beazley (Dabeaz LLC) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ar...
mpl-2.0
-5,937,687,493,658,400,000
37.505671
134
0.499963
false
google/grr
grr/server/grr_response_server/flows/cron/system_test.py
1
8396
#!/usr/bin/env python """System cron flows tests.""" from absl import app from grr_response_core import config from grr_response_core.lib import rdfvalue from grr_response_core.lib.rdfvalues import client_stats as rdf_client_stats from grr_response_core.lib.rdfvalues import stats as rdf_stats from grr_response_server...
apache-2.0
-2,011,496,484,336,878,000
35.034335
80
0.643759
false
viruxel/ansible-modules-extras
windows/win_regmerge.py
65
3759
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk> # # 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, eith...
gpl-3.0
6,269,510,814,295,384,000
42.206897
235
0.739558
false
tomchristie/django
tests/utils_tests/test_numberformat.py
30
4697
from decimal import Decimal from sys import float_info from unittest import TestCase from django.utils.numberformat import format as nformat class TestNumberFormat(TestCase): def test_format_number(self): self.assertEqual(nformat(1234, '.'), '1234') self.assertEqual(nformat(1234.2, '.'), '1234.2...
bsd-3-clause
-8,168,475,995,258,729,000
51.707865
116
0.619058
false
arpitn30/open-event-orga-server
app/api/events.py
1
15239
from flask import g from flask.ext.restplus import Namespace, reqparse, marshal from app.api.attendees import TICKET from app.api.microlocations import MICROLOCATION from app.api.sessions import SESSION from app.api.speakers import SPEAKER from app.api.sponsors import SPONSOR from app.api.tracks import TRACK from app....
gpl-3.0
-5,378,759,336,102,873,000
35.19715
112
0.649518
false
zpenoyre/illustris
illustris_python/groupcat.py
1
5294
""" Illustris Simulation: Public Data Release. groupcat.py: File I/O related to the FoF and Subfind group catalogs. """ from os.path import isfile import numpy as np import h5py def gcPath(basePath,snapNum,chunkNum=0): """ Return absolute path to a group catalog HDF5 file (modify as needed). """ gcPa...
mit
1,775,338,676,867,057,400
34.510345
91
0.59048
false
pim89/youtube-dl
youtube_dl/jsinterp.py
16
8904
from __future__ import unicode_literals import json import operator import re from .utils import ( ExtractorError, ) _OPERATORS = [ ('|', operator.or_), ('^', operator.xor), ('&', operator.and_), ('>>', operator.rshift), ('<<', operator.lshift), ('-', operator.sub), ('+', operator.add...
unlicense
6,140,699,588,124,628,000
33.511628
89
0.459569
false
HoracioAlvarado/fwd
venv/Lib/site-packages/setuptools/command/easy_install.py
18
86096
#!/usr/bin/env python """ Easy Install ------------ A tool for doing automatic download/extract/build of distutils-based Python packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. __ https://pythonhosted.org/setuptools/easy_install.html """ from...
mit
-3,159,540,233,201,265,000
36.927753
139
0.579156
false
RAtechntukan/Sick-Beard
sickbeard/clients/requests/exceptions.py
276
1246
# -*- coding: utf-8 -*- """ requests.exceptions ~~~~~~~~~~~~~~~~~~~ This module contains the set of Requests' exceptions. """ class RequestException(RuntimeError): """There was an ambiguous exception that occurred while handling your request.""" class HTTPError(RequestException): """An HTTP error occ...
gpl-3.0
8,505,740,749,467,611,000
21.654545
73
0.675762
false
trystack/python-django-horizon-facebook
openstack_dashboard/dashboards/settings/apipassword/tests.py
1
1220
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Centrin Data Systems Ltd. # # 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/LIC...
apache-2.0
-1,886,099,935,328,720,400
30.282051
78
0.72623
false
thinkle/gourmet
gourmet/prefsGui.py
1
11126
from gi.repository import Gtk import os.path from . import gglobals from .gtk_extras import optionTable from . import plugin_loader, plugin class PreferencesGui (plugin_loader.Pluggable): """The glue between our preferences dialog UI and our prefs modules. Instead of "connecting", as would be normal with pygt...
gpl-2.0
6,212,182,389,484,451,000
39.311594
94
0.545479
false
ddayguerrero/blogme
flask/lib/python3.4/site-packages/sqlalchemy/ext/serializer.py
81
5586
# ext/serializer.py # Copyright (C) 2005-2015 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 """Serializer/Deserializer objects for usage with SQLAlchemy query structures, all...
mit
-7,487,064,632,574,467,000
34.132075
79
0.642678
false
vj-ug/gcloud-python
gcloud/storage/batch.py
8
11360
# Copyright 2014 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
8,392,891,657,168,848,000
33.846626
79
0.609067
false
jezdez/kuma
vendor/packages/translate/convert/factory.py
25
7868
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 Zuza Software Foundation # # This file is part of the Translate Toolkit. # # 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...
mpl-2.0
-2,139,178,031,399,509,500
36.826923
97
0.648577
false
keyurpatel076/MissionPlannerGit
Lib/py_compile.py
111
5930
"""Routine to "compile" a .py file to a .pyc (or .pyo) file. This module has intimate knowledge of the format of .pyc files. """ import __builtin__ import imp import marshal import os import sys import traceback MAGIC = imp.get_magic() __all__ = ["compile", "main", "PyCompileError"] class PyCompileError(Exception...
gpl-3.0
8,792,144,231,321,348,000
33.882353
84
0.600506
false
karinemiras/evoman_framework
evoman/enemy7.py
1
12823
################################ # EvoMan FrameWork - V1.0 2016 # # Author: Karine Miras # # karine.smiras@gmail.com # ################################ import sys import numpy import random import Base from Base.SpriteConstants import * from Base.SpriteDefinition import * from sensors import Sensors til...
cc0-1.0
-8,542,283,730,167,444,000
33.194667
157
0.543555
false
hieupham007/Titanium_Mobile
support/iphone/tools.py
34
8313
import os, sys, codecs, shutil, filecmp, subprocess # the template_dir is the path where this file lives on disk template_dir = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename)) def ensure_dev_path(debug=True): rc = subprocess.call(["xcode-select", "-print-path"], stdout=open(os.devnull, 'w'), s...
apache-2.0
1,291,857,870,016,926,500
34.075949
114
0.694334
false
umitproject/openmonitor-desktop-agent
umit/icm/agent/gui/dashboard/timeline/TimeLineGraphBase.py
1
11533
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 S2S Network Consultoria e Tecnologia da Informacao LTDA # # Authors: Guilherme Polo <ggpolo@gmail.com> # Tianwei Liu <liutainweidlut@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of th...
gpl-2.0
1,382,985,846,486,790,100
33.222552
102
0.508888
false
mdsafwan/Deal-My-Stuff
Lib/site-packages/django/core/serializers/python.py
93
6585
""" A Python "serializer". Doesn't do much serializing per se -- just converts to and from basic Python data types (lists, dicts, strings, etc.). Useful as a basis for other serializers. """ from __future__ import unicode_literals from django.apps import apps from django.conf import settings from django.core.serialize...
apache-2.0
4,376,739,998,072,814,000
38.196429
119
0.570539
false
arnavd96/Cinemiezer
myvenv/lib/python3.4/site-packages/boto/cloudsearch2/optionstatus.py
153
8121
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # 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...
mit
8,285,681,703,567,880,000
33.854077
78
0.597094
false
cysnake4713/odoo
addons/sale/wizard/sale_make_invoice.py
344
3410
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
agpl-3.0
2,384,469,024,893,755,400
46.361111
136
0.607625
false
soulmachine/scikit-learn
sklearn/kernel_approximation.py
3
16954
""" The :mod:`sklearn.kernel_approximation` module implements several approximate kernel feature maps base on Fourier transforms. """ # Author: Andreas Mueller <amueller@ais.uni-bonn.de> # # License: BSD 3 clause import warnings import numpy as np import scipy.sparse as sp from scipy.linalg import svd from .base im...
bsd-3-clause
7,863,668,014,883,649,000
33.181452
79
0.597794
false
libAtoms/matscipy
matscipy/surface.py
1
8725
# ====================================================================== # matscipy - Python materials science tools # https://github.com/libAtoms/matscipy # # Copyright (2014) James Kermode, King's College London # Lars Pastewka, Karlsruhe Institute of Technology # # This program is free software: you...
gpl-2.0
7,538,149,525,595,154,000
30.049822
114
0.530201
false
krieger-od/nwjs_chromium.src
chrome/common/extensions/docs/server2/manifest_features.py
122
1683
# Copyright 2013 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. ''' Provides a Manifest Feature abstraction, similar to but more strict than the Feature schema (see feature_utility.py). Each Manifest Feature has a 'level...
bsd-3-clause
-8,106,574,594,353,711,000
37.25
80
0.71836
false
Anonymouslemming/ansible
lib/ansible/modules/monitoring/sensu_subscription.py
17
5330
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Anders Ingemann <aim@secoya.dk> # # 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 Licen...
gpl-3.0
-6,482,102,191,469,423,000
31.108434
98
0.623452
false
guewen/purchase-workflow
__unported__/purchase_group_orders/__openerp__.py
4
1626
# -*- coding: utf-8 -*- ############################################################################## # # Author: Alexandre Fayolle # Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
agpl-3.0
-5,774,997,668,039,715,000
36.813953
78
0.615621
false
jamesbdunlop/tk-jbd-submit-mayaplayblast
python/lib/cam_lib.py
1
3114
import maya.cmds as cmds from tank.platform.qt import QtCore, QtGui def _findShotCamera(): """ Shot camera setup. You can replace this entire func with your own code to return the correct cameraShape for the app to use. """ camera = [] for each in cmds.ls(type = 'camera'): getCamTransform =...
apache-2.0
-1,168,023,450,442,215,000
41.671233
128
0.61079
false
utecuy/edx-platform
common/lib/xmodule/xmodule/library_tools.py
154
7784
""" XBlock runtime services for LibraryContentModule """ from django.core.exceptions import PermissionDenied from opaque_keys.edx.locator import LibraryLocator, LibraryUsageLocator from search.search_engine_base import SearchEngine from xmodule.library_content_module import ANY_CAPA_TYPE_VALUE from xmodule.modulestore ...
agpl-3.0
261,526,068,582,076,540
42.244444
115
0.632451
false
gis-rpd/pipelines
custom/SG10K/mux_summary.py
1
9302
#!/usr/bin/env python3 # FIXME hardcoded python because we need for xlsxwriter """Creating summary table for SG10K batch """ import glob import os import csv import sys import yaml import xlsxwriter WRITE_CSV = False WRITE_XLS = True WRITE_CONSOLE = False SUMMARY_KEYS = ["raw total sequences:", #"rea...
mit
1,234,157,357,657,474,800
35.194553
124
0.530531
false
Venturi/oldcms
env/lib/python2.7/site-packages/django/contrib/gis/geoip/libgeoip.py
106
1081
import os from ctypes import CDLL from ctypes.util import find_library from django.conf import settings # Creating the settings dictionary with any settings, if needed. GEOIP_SETTINGS = {key: getattr(settings, key) for key in ('GEOIP_PATH', 'GEOIP_LIBRARY_PATH', 'GEOIP_COUNTRY', 'GEOIP_CITY') ...
apache-2.0
2,680,564,746,672,917,000
30.794118
96
0.670675
false
ChromiumWebApps/chromium
third_party/python_gflags/setup.py
376
1991
#!/usr/bin/env python # Copyright (c) 2007, 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 l...
bsd-3-clause
4,729,763,499,777,818,000
44.25
72
0.747363
false
Tesora-Release/tesora-trove
trove/guestagent/strategies/restore/couchdb_impl.py
1
1543
# Copyright 2016 IBM Corporation # # 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
-618,320,527,972,518,900
36.634146
78
0.66105
false
mfherbst/spack
var/spack/repos/builtin/packages/perl-task-weaken/package.py
5
1576
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
1,483,952,132,385,344,300
45.352941
90
0.678299
false
tredly/tredly
components/tredly-host/actions/move.py
2
2062
# Performs actions requested by the user import builtins from subprocess import Popen, PIPE import urllib.request import os.path import time import argparse from objects.tredly.tredlyhost import * from objects.tredly.container import * from includes.util import * from includes.defines import * from includes.output imp...
mit
-2,612,010,601,009,349,000
30.257576
130
0.596993
false
ombt/analytics
books/programming_in_python_3/book_examples/py31eg/untar.py
2
2170
#!/usr/bin/env python3 # Copyright (c) 2008-11 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 3 of the License, or # (at your option) an...
mit
-1,824,723,798,988,442,000
30.449275
74
0.645161
false
NeCTAR-RC/neutron
neutron/plugins/ml2/drivers/helpers.py
39
6245
# Copyright (c) 2014 Thales Services SAS # 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 r...
apache-2.0
-9,202,976,795,472,447,000
38.77707
78
0.536749
false
pandeyop/tempest
tempest/api/compute/servers/test_multiple_create_negative.py
11
2936
# Copyright 2013 IBM Corp # 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 appl...
apache-2.0
262,410,643,899,837,380
38.675676
78
0.661104
false
CEG-FYP-OpenStack/scheduler
nova/tests/functional/wsgi/test_flavor_manage.py
40
9071
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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 # # Unl...
apache-2.0
5,592,426,682,221,147,000
35.724696
78
0.592548
false
hainm/scikit-learn
examples/classification/plot_classifier_comparison.py
181
4699
#!/usr/bin/python # -*- coding: utf-8 -*- """ ===================== Classifier comparison ===================== A comparison of a several classifiers in scikit-learn on synthetic datasets. The point of this example is to illustrate the nature of decision boundaries of different classifiers. This should be taken with ...
bsd-3-clause
-7,516,039,378,207,749,000
34.583333
79
0.639983
false
crafty78/ansible
lib/ansible/plugins/callback/skippy.py
116
1317
# (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,450,891,251,053,368,000
32.769231
85
0.734244
false
h-hirokawa/ansible
test/integration/cleanup_rax.py
229
6516
#!/usr/bin/env python import os import re import yaml import argparse try: import pyrax HAS_PYRAX = True except ImportError: HAS_PYRAX = False def rax_list_iterator(svc, *args, **kwargs): method = kwargs.pop('method', 'list') items = getattr(svc, method)(*args, **kwargs) while items: ...
gpl-3.0
3,975,380,268,466,749,000
35.2
79
0.570595
false
mattt416/neutron
neutron/tests/unit/services/test_provider_configuration.py
8
8733
# Copyright 2013 VMware, 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 ap...
apache-2.0
4,471,102,463,202,192,000
41.6
78
0.569106
false
mateoqac/unqTip
language/vxgbs/lang/gbs_constructs.py
1
10125
# # Copyright (C) 2011, 2012 Pablo Barenbaum <foones@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. # # Th...
gpl-3.0
-6,580,716,379,444,877,000
27.931429
78
0.686914
false
yuanagain/seniorthesis
venv/lib/python2.7/site-packages/scipy/io/matlab/tests/test_byteordercodes.py
126
1044
''' Tests for byteorder module ''' from __future__ import division, print_function, absolute_import import sys from numpy.testing import assert_raises, assert_, run_module_suite import scipy.io.matlab.byteordercodes as sibc def test_native(): native_is_le = sys.byteorder == 'little' assert_(sibc.sys_is_le...
mit
2,942,563,450,940,134,400
30.636364
68
0.58908
false
incorrectusername/coala-bears
bears/c_languages/codeclone_detection/ClangCloneDetectionBear.py
23
1992
from bears.c_languages.ClangBear import clang_available, ClangBear from bears.c_languages.codeclone_detection.ClangFunctionDifferenceBear import ( ClangFunctionDifferenceBear) from coalib.bears.GlobalBear import GlobalBear from coalib.results.Result import Result from coalib.results.RESULT_SEVERITY import RESULT_SE...
agpl-3.0
1,191,495,558,672,753,400
41.382979
79
0.596386
false
alheinecke/tensorflow-xsmm
tensorflow/contrib/distributions/python/ops/bijectors/cholesky_outer_product.py
85
1182
# 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
-57,762,831,765,616,570
39.758621
95
0.72335
false
sontek/rethinkdb
external/v8_3.30.33.16/tools/v8heapconst.py
40
11667
# Copyright 2013 the V8 project authors. 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 conditi...
agpl-3.0
5,048,822,784,173,520,000
40.519573
72
0.707551
false
soarpenguin/ansible
lib/ansible/modules/cloud/centurylink/clc_publicip.py
8
12101
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # 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.0', 'status': ['previe...
gpl-3.0
8,463,435,260,145,309,000
32.520776
119
0.597637
false
4shadoww/hakkuframework
core/lib/dns/namedict.py
16
3677
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # Copyright (C) 2016 Coresec Systems AB # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in al...
mit
8,319,391,546,226,535,000
34.355769
72
0.644819
false
lamby/python-social-auth
social/backends/disqus.py
70
1811
""" Disqus OAuth2 backend, docs at: http://psa.matiasaguirre.net/docs/backends/disqus.html """ from social.backends.oauth import BaseOAuth2 class DisqusOAuth2(BaseOAuth2): name = 'disqus' AUTHORIZATION_URL = 'https://disqus.com/api/oauth/2.0/authorize/' ACCESS_TOKEN_URL = 'https://disqus.com/api/oauth...
bsd-3-clause
6,292,391,156,949,108,000
34.509804
77
0.54942
false
Kilhog/odoo
addons/crm_claim/crm_claim.py
333
10079
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
-4,618,820,480,226,594,000
47.690821
238
0.594603
false
toshywoshy/ansible
test/units/modules/network/dellos6/test_dellos6_command.py
68
4307
# (c) 2016 Red Hat Inc. # # 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 dis...
gpl-3.0
-6,661,058,274,267,614,000
38.87963
102
0.655445
false
caphrim007/ansible
lib/ansible/plugins/lookup/grafana_dashboard.py
20
6337
# (c) 2018 Ansible Project # 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', 'status': ['preview'], '...
gpl-3.0
2,933,746,484,420,963,000
34.601124
154
0.653622
false