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
android-ia/platform_external_chromium_org_third_party_WebKit
Source/core/inspector/CodeGeneratorInstrumentation.py
9
18313
#!/usr/bin/env python # Copyright (c) 2013 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
-4,151,266,520,851,410,400
31.643494
113
0.612953
false
Beyond-Imagination/BlubBlub
RaspberryPI/django-env/lib/python3.4/site-packages/django/views/generic/detail.py
109
6720
from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured from django.db import models from django.http import Http404 from django.utils.translation import ugettext as _ from django.views.generic.base import ContextMixin, TemplateResponseMixin, View class SingleObjectMixin(Conte...
gpl-3.0
-5,247,393,303,635,481,000
36.541899
108
0.584226
false
sauloal/cufflinksviewer
venvwin/Lib/encodings/aliases.py
84
15375
""" Encoding Aliases Support This module is used by the encodings package search function to map encodings names to module names. Note that the search function normalizes the encoding names before doing the lookup, so the mapping will have to map normalized encoding names to module names. ...
mit
1,769,489,325,787,428,600
27.174573
83
0.405268
false
gilestrolab/ethoscope
prototypes/automask_and_tracking.py
1
1063
__author__ = 'quentin' from ethoscope.tracking.roi_builders import SleepDepROIBuilder from ethoscope.tracking.cameras import MovieVirtualCamera from ethoscope.tracking.monitor import Monitor from ethoscope.tracking.trackers import AdaptiveBGModel from ethoscope.tracking.interactors import SystemPlaySoundOnStop from ...
gpl-3.0
492,610,176,632,085,570
30.294118
95
0.798683
false
drkitty/cyder
cyder/cydhcp/range/utils.py
4
6674
from django.db.models import get_model, Q from cyder.cydhcp.utils import start_end_filter, two_to_one, one_to_two from django.http import HttpResponse from cyder.base.constants import STATIC, DYNAMIC import json import ipaddr def find_range(ip_str): Range = get_model('cyder', 'range') ip_upper, ip_lower ...
bsd-3-clause
-445,694,530,112,892,540
29.614679
79
0.589601
false
KevZho/buffbot
kol/request/ItemInformationRequest.py
4
2392
from ApiRequest import ApiRequest from kol.database import ItemDatabase class ItemInformationRequest(ApiRequest): "This class is used to get information about a particular item." def __init__(self, session, itemId): super(ItemInformationRequest, self).__init__(session) self.requestData["what"]...
mit
-2,630,512,743,971,929,000
42.490909
68
0.552258
false
FreeOpcUa/freeopcua
python/examples/event_client.py
9
2312
import sys import time sys.path.append(".") from IPython import embed import opcua class SubHandler(opcua.SubscriptionHandler): """ Client to subcsription. It will receive events from server """ def __init__(self, *args): opcua.SubscriptionHandler.__init__(self, *args) self.ev = Messa...
lgpl-3.0
-1,492,788,782,710,355,700
32.028571
77
0.618945
false
synergeticsedx/deployment-wipro
lms/djangoapps/django_comment_client/tests/test_models.py
17
2866
""" Tests for the django comment client integration models """ from django.test.testcases import TestCase from nose.plugins.attrib import attr from opaque_keys.edx.keys import CourseKey import django_comment_common.models as models from xmodule.modulestore.tests.django_utils import ( TEST_DATA_MIXED_MODULESTORE, M...
agpl-3.0
-4,851,221,628,281,354,000
41.776119
92
0.650035
false
SerialShadow/SickRage
lib/sqlalchemy/dialects/mssql/adodbapi.py
79
2509
# mssql/adodbapi.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 """ .. dialect:: mssql+adodbapi :name: adodbapi :dbapi: adodbapi :connec...
gpl-3.0
-5,152,378,056,458,566,000
30.759494
84
0.628936
false
cjellick/rancher
tests/validation/tests/v3_api/test_cluster_templates.py
1
34974
import copy import os import pytest import requests from rancher import ApiError from .common import * # NOQA from .test_monitoring import cluster_query_template from .test_monitoring import validate_cluster_graph from .test_rbac import create_user from .test_rke_cluster_provisioning import engine_install_url DO_AC...
apache-2.0
-7,440,640,329,495,640,000
38.033482
79
0.639332
false
vikramsunkara/PyME
pyme/lazy_dict.py
2
3974
""" Dictionary with lazy evaluation on access, via a supplied update function """ import itertools class LazyDict(dict): """ A dictionary type that lazily updates values when they are accessed. All the usual dictionary methods work as expected, with automatic lazy updates occuring behind the scen...
agpl-3.0
-8,226,222,191,779,112,000
32.394958
80
0.584801
false
ArthurGarnier/SickRage
lib/hachoir_core/field/static_field_set.py
93
1870
from hachoir_core.field import FieldSet, ParserError class StaticFieldSet(FieldSet): """ Static field set: format class attribute is a tuple of all fields in syntax like: format = ( (TYPE1, ARG1, ARG2, ...), (TYPE2, ARG1, ARG2, ..., {KEY1=VALUE1, ...}), ... ) ...
gpl-3.0
-8,920,127,128,030,223,000
33.62963
76
0.568984
false
overtherain/scriptfile
software/googleAppEngine/lib/django_1_2/django/contrib/messages/tests/base.py
44
16343
from django import http from django.test import TestCase from django.conf import settings from django.utils.translation import ugettext_lazy from django.contrib.messages import constants, utils, get_level, set_level from django.contrib.messages.api import MessageFailure from django.contrib.messages.storage import defau...
mit
3,374,658,017,454,886,000
39.353086
79
0.612495
false
Simran-B/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/win32/Demos/win32comport_demo.py
34
5761
# This is a simple serial port terminal demo. # # Its primary purpose is to demonstrate the native serial port access offered via # win32file. # It uses 3 threads: # - The main thread, which cranks up the other 2 threads, then simply waits for them to exit. # - The user-input thread - blocks waiting for a keyboard cha...
apache-2.0
-6,831,029,450,092,893,000
42.315789
106
0.569693
false
Dany3R9/ns-3-dev-ndnSIM
src/buildings/doc/source/conf.py
175
7083
# -*- coding: utf-8 -*- # # ns-3 documentation build configuration file, created by # sphinx-quickstart on Tue Dec 14 09:00:39 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All co...
gpl-2.0
2,609,430,112,001,636,000
31.791667
141
0.70761
false
JPJPJPOPOP/zulip
api/integrations/asana/zulip_asana_config.py
27
2139
# -*- coding: utf-8 -*- # # Copyright © 2014 Zulip, Inc. # # 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,...
apache-2.0
-8,759,568,675,126,368,000
37.178571
79
0.759121
false
getsentry/freight
tests/checks/test_cloudbuilder.py
1
9438
import json from textwrap import dedent import pytest import responses from freight import checks from freight.exceptions import CheckFailed, CheckPending from freight.testutils import TestCase class CloudbuilderCheckBase(TestCase): def setUp(self): self.check = checks.get("cloudbuilder") self.u...
apache-2.0
8,950,083,346,522,501,000
33.32
119
0.511973
false
Sealos/Sarcasm
Proyecto Final/prueba.py
1
2337
import numpy as np from sklearn import datasets, svm """ iris = datasets.load_iris() iris_X = iris.data iris_y = iris.target np.unique(iris_y) np.random.seed(0) indices = np.random.permutation(len(iris_X)) iris_X_train = iris_X[indices[:-10]] iris_y_train = iris_y[indices[:-10]] iris_X_test = iris_X[indices[-10:]] i...
gpl-2.0
-7,769,946,260,173,565,000
27.851852
74
0.626016
false
lunchpy/fspider
fspider/pipelines.py
1
1917
# -*- coding: utf-8 -*- import logging import pymysql from scrapy.conf import settings # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html class FspiderPipeline(object): def process_item(self, it...
gpl-3.0
4,942,429,763,637,722,000
28.015625
105
0.547119
false
GarySparrow/mFlaskWeb
venv/Lib/site-packages/pip/_vendor/requests/cookies.py
355
18208
# -*- coding: utf-8 -*- """ requests.cookies ~~~~~~~~~~~~~~~~ Compatibility code to be able to use `cookielib.CookieJar` with requests. requests.utils imports from here, so be careful with imports. """ import copy import time import calendar import collections from .compat import cookielib, urlparse, urlunparse, Mo...
mit
-8,439,381,494,071,966,000
32.718519
111
0.619618
false
camptocamp/c2c-rd-addons
c2c_account_payment_extension/payment_order.py
4
16221
# -*- coding: utf-8 -*- ############################################## # # Copyright (C) ChriCar Beteiligungs- und Beratungs- GmbH # all rights reserved # this work is based on # Copyright (c) 2008 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved. # Jordi Esteve <jesteve@zikzakm...
agpl-3.0
-2,844,597,294,181,091,000
50.170347
322
0.568276
false
thomasmoelhave/tpie
scripts/check_missing_ctests.py
1
1860
#!/usr/bin/env python3 # Copyright 2016, The TPIE development team # # This file is part of TPIE. # # TPIE 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, either version 3 of the License, or (at your #...
gpl-3.0
2,734,727,226,732,808,700
26.352941
74
0.690323
false
lociii/googleads-python-lib
examples/adspygoogle/dfp/v201302/creative_wrapper_service/update_creative_wrappers.py
3
2479
#!/usr/bin/python # # Copyright 2013 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 b...
apache-2.0
5,370,179,181,289,235,000
34.414286
80
0.692215
false
neonatura/crotalus
lib/libxml2/genUnicode.py
337
12985
#!/usr/bin/python -u # # Original script modified in November 2003 to take advantage of # the character-validation range routines, and updated to the # current Unicode information (Version 4.0.1) # # NOTE: there is an 'alias' facility for blocks which are not present in # the current release, but are needed for ABI com...
gpl-2.0
-9,042,752,518,489,082,000
26.165272
89
0.602695
false
erdincay/youtube-dl
youtube_dl/extractor/radiobremen.py
128
2471
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import parse_duration class RadioBremenIE(InfoExtractor): _VALID_URL = r'http?://(?:www\.)?radiobremen\.de/mediathek/(?:index\.html)?\?id=(?P<id>[0-9]+)' IE_NAME = 'radiobremen' _TE...
unlicense
-6,637,265,225,860,341,000
38.142857
262
0.537307
false
schwarz/youtube-dl
youtube_dl/extractor/facebook.py
74
7339
from __future__ import unicode_literals import json import re import socket from .common import InfoExtractor from ..compat import ( compat_http_client, compat_str, compat_urllib_error, compat_urllib_parse_unquote, compat_urllib_request, ) from ..utils import ( ExtractorError, int_or_none,...
unlicense
4,242,202,304,620,925,000
40.463277
156
0.539174
false
reviewboard/ReviewBot
bot/reviewbot/utils/process.py
1
5223
from __future__ import unicode_literals import logging import os import subprocess import sys def execute(command, env=None, split_lines=False, ignore_errors=False, extra_ignore_errors=(), translate_newlines=True, with_errors=True, r...
mit
-1,977,367,128,766,079,700
29.017241
78
0.56883
false
tychon/physics
physics/datacursors.py
1
6645
# This module offers two Cursors: # * DataCursor, # where you have to click the data point, and # * FollowDotCursor, # where the bubble is always on the point # nearest to your pointer. # # All the code was copied from # http://stackoverflow.com/a/13306887 # DataCursor Example # x=[1,2,3,4,5] # y=[...
mit
1,979,986,187,800,216,000
37.189655
84
0.576825
false
skycucumber/restful
python/venv/lib/python2.7/site-packages/sqlalchemy/dialects/sqlite/pysqlcipher.py
80
4129
# sqlite/pysqlcipher.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 """ .. dialect:: sqlite+pysqlcipher :name: pysqlcipher :dbapi: pysqlci...
gpl-2.0
8,377,432,706,993,403,000
34.594828
96
0.705982
false
cainmatt/django
tests/max_lengths/tests.py
380
1589
from __future__ import unicode_literals import unittest from .models import PersonWithCustomMaxLengths, PersonWithDefaultMaxLengths class MaxLengthArgumentsTests(unittest.TestCase): def verify_max_length(self, model, field, length): self.assertEqual(model._meta.get_field(field).max_length, length) ...
bsd-3-clause
8,519,609,087,570,524,000
38.725
100
0.668974
false
sharad/calibre
src/cherrypy/process/plugins.py
81
25628
"""Site services for use with a Web Site Process Bus.""" import os import re import signal as _signal import sys import time import threading from cherrypy._cpcompat import basestring, get_daemon, get_thread_ident, ntob, set # _module__file__base is used by Autoreload to make # absolute any filenames retrieved from ...
gpl-3.0
-6,461,480,036,250,095,000
36.522694
92
0.563719
false
reeshupatel/demo
keystone/openstack/common/threadgroup.py
6
4806
# Copyright 2012 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 agre...
apache-2.0
-3,065,767,857,050,966,500
31.693878
79
0.60154
false
jscott413/maidsinharlem
flask/lib/python2.7/site-packages/whoosh/highlight.py
22
33812
# Copyright 2008 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the...
bsd-3-clause
-6,101,707,226,942,686,000
34.442348
99
0.605051
false
fly19890211/edx-platform
lms/djangoapps/certificates/migrations/0002_auto__add_field_generatedcertificate_download_url.py
188
6807
# -*- 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 'GeneratedCertificate.download_url' db.add_column('certificates_generatedcertificate', 'downl...
agpl-3.0
376,977,679,523,280,500
73.802198
182
0.563684
false
matichorvat/pydelphin
mrs.py
1
2166
#!/usr/bin/env python3 import sys import argparse from delphin.mrs import simplemrs, mrx, dmrx, eds, simpledmrs from delphin.extra.latex import dmrs_tikz_dependency mrsformats = { 'simplemrs': simplemrs, 'mrx': mrx, 'dmrx': dmrx, 'eds': eds, 'simpledmrs': simpledmrs } extraformats = { 'dmrs-ti...
mit
-7,793,756,443,905,596,000
29.507042
77
0.650508
false
renyi533/tensorflow
tensorflow/python/keras/engine/base_layer_test.py
2
52630
# Copyright 2018 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,666,395,679,247,535,000
33.511475
106
0.643872
false
ZdenekM/ar-table-itable
art_projected_gui/tests/test_ui_core.py
6
4485
#!/usr/bin/env python import unittest import rostest import sys from art_projected_gui.gui import UICore from art_projected_gui.items import ObjectItem, PlaceItem from PyQt4.QtGui import QApplication from art_msgs.msg import ObjectType import rospy from shape_msgs.msg import SolidPrimitive from geometry_msgs.msg impor...
lgpl-2.1
7,340,563,600,658,333,000
41.311321
111
0.651728
false
MathieuR/ardupilot
Tools/LogAnalyzer/tests/TestVibration.py
261
3069
from LogAnalyzer import Test,TestResult import DataflashLog import numpy class TestVibration(Test): '''test for accelerometer vibration (accX/accY/accZ) within recommendations''' def __init__(self): Test.__init__(self) self.name = "Vibration" def run(self, logdata, verbose): se...
gpl-3.0
-5,287,316,121,677,136,000
44.80597
138
0.643858
false
havard024/prego
venv/lib/python2.7/site-packages/PIL/OleFileIO.py
4
88896
#!/usr/local/bin/python # -*- coding: latin-1 -*- """ OleFileIO_PL: Module to read Microsoft OLE2 files (also called Structured Storage or Microsoft Compound Document File Format), such as Microsoft Office documents, Image Composer and FlashPix files, Outlook messages, ... This version is compatible with Python 2.6+ an...
mit
-7,046,035,587,089,150,000
41.800193
115
0.584211
false
awangga/csvfromdbf
dbfread/field_parser.py
5
8156
""" Parser for DBF fields. """ import sys import datetime import struct from decimal import Decimal from .memo import BinaryMemo PY2 = sys.version_info[0] == 2 if PY2: decode_text = unicode else: decode_text = str class InvalidValue(bytes): def __repr__(self): text = bytes.__repr__(self) ...
agpl-3.0
-7,420,798,997,868,828,000
32.289796
79
0.557258
false
thenewguy/django-shop
shop/migrations/0003_auto__del_country__del_address__del_client.py
16
13300
# flake8: noqa # encoding: 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): # Deleting model 'Country' db.delete_table('shop_country') # Deleting model 'Address' ...
bsd-3-clause
-5,728,219,639,953,224,000
70.891892
193
0.554361
false
team-vigir/flexbe_behavior_engine
flexbe_core/src/flexbe_core/core/state.py
1
1722
#!/usr/bin/env python from flexbe_core.core.exceptions import StateError def _remove_duplicates(input_list): output_list = list() for entry in input_list: if entry not in output_list: output_list.append(entry) return output_list class State(object): def __init__(self, *args, **k...
bsd-3-clause
-7,417,538,787,869,500,000
23.6
87
0.590592
false
robovm/robovm-studio
python/lib/Lib/ConfigParser.py
105
23116
"""Configuration file parser. A setup file consists of sections, lead by a "[section]" header, and followed by "name: value" entries, with continuations and such in the style of RFC 822. The option values can contain format strings which refer to other values in the same section, or values in a special [DEFAULT] sect...
apache-2.0
-8,152,011,515,740,016,000
35.11875
80
0.549014
false
rhndg/openedx
common/lib/xmodule/xmodule/modulestore/__init__.py
6
54191
""" This module provides an abstraction for working with XModuleDescriptors that are stored in a database an accessible using their Location as an identifier """ import logging import re import json import datetime from uuid import uuid4 from pytz import UTC from collections import namedtuple, defaultdict import coll...
agpl-3.0
-6,115,213,489,471,377,000
37.680228
125
0.626026
false
reneploetz/mesos
src/python/cli_new/lib/cli/plugins/agent/main.py
9
2612
# 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 u...
apache-2.0
5,619,046,639,971,745,000
31.246914
78
0.601455
false
nflanders9/bach-in-a-box
midi_dicts.py
1
2721
__author__ = 'Nick Flanders' frequencies = dict(A_0 = 9, A_1 = 21, A_2 = 33, A_3 = 45, A_4 = 57, A_5 = 69, A_6 = 81, A_7 = 93, A_8 = 105, A_9 = 117, Ab_0 = 8, Ab_1 = 20, Ab_2 = 32, Ab_3 = 44, Ab_4 = 56, Ab_5 = 68, Ab_6 = 80, Ab_7 = 92, Ab_8 = 104,...
mit
-4,824,458,095,833,912,000
13.868852
28
0.330393
false
LittleEndu/Little-Discord-Selfbot
cogs/memes.py
1
19548
import asyncio import json import os import random import aiohttp import discord from discord.ext import commands class Memes: """ idk, it does meme stuff """ def __init__(self, bot): self.IMGUR_API_LINK = "https://api.imgur.com/3/image" self.bot = bot self.config = bot.confi...
mit
-9,111,658,615,996,610,000
40.503185
118
0.505218
false
golismero/golismero-devel
tools/sqlmap/lib/core/settings.py
7
25124
#!/usr/bin/env python """ Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import os import re import subprocess import string import sys from lib.core.enums import DBMS from lib.core.enums import DBMS_DIRECTORY_NAME from lib.core.enums import OS fr...
gpl-2.0
-5,669,945,394,751,406,000
40.873333
301
0.683291
false
Pulfer/clementine-vkservice
dist/cpplint.py
23
158902
#!/usr/bin/python # # Copyright (c) 2009 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 ...
gpl-3.0
3,562,616,366,977,584,000
38.488569
86
0.646927
false
xs2maverick/adhocracy3.mercator
src/adhocracy_spd/version.py
26
3208
# -*- coding: utf-8 -*- # Author: Douglas Creager <dcreager@dcreager.net> # This file is placed into the public domain. # Calculates the current version number. If possible, this is the # output of “git describe”, modified to conform to the versioning # scheme that setuptools uses. If “git describe” returns an error #...
agpl-3.0
-8,927,781,734,398,305,000
28.869159
70
0.651439
false
163gal/Time-Line
libs/wx/tools/Editra/src/profiler.py
2
18345
############################################################################### # Name: profiler.py # # Purpose: Editra's user profile services # # Author: Cody Precord <cprecord@editra.org> # ...
gpl-3.0
9,023,402,188,954,116,000
36.286585
79
0.538348
false
vstoykov/django-sticky-uploads
stickyuploads/views.py
1
1588
from __future__ import unicode_literals import json from django.core.files.storage import get_storage_class from django.http import HttpResponse, HttpResponseForbidden from django.views.generic import View from .forms import UploadForm class UploadView(View): """Base view class for accepting file uploads.""" ...
bsd-3-clause
1,844,675,108,150,211,600
32.808511
84
0.61335
false
timj/scons
test/option--C.py
1
3439
#!/usr/bin/env python # # __COPYRIGHT__ # # 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
-6,568,230,684,945,831,000
34.091837
78
0.621692
false
jhajek/euca2ools
euca2ools/commands/bundle/downloadandunbundle.py
3
6029
# Copyright 2009-2014 Eucalyptus Systems, Inc. # # Redistribution and use of this software 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 ...
bsd-2-clause
1,875,254,473,300,574,700
46.472441
78
0.651684
false
adazey/Muzez
libs/youtube_dl/extractor/comedycentral.py
3
5881
from __future__ import unicode_literals from .mtv import MTVServicesInfoExtractor from .common import InfoExtractor class ComedyCentralIE(MTVServicesInfoExtractor): _VALID_URL = r'''(?x)https?://(?:www\.)?cc\.com/ (video-clips|episodes|cc-studios|video-collections|shows(?=/[^/]+/(?!full-episodes))) ...
gpl-3.0
5,105,421,117,295,688,000
37.690789
199
0.571161
false
espadrine/opera
chromium/src/tools/deps2git/deps2submodules_unittest.py
10
2847
#!/usr/bin/env python # Copyright (c) 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. import unittest import deps2submodules class Deps2SubmodulesCollateDepsTest(unittest.TestCase): def testBasic(self): arg =...
bsd-3-clause
2,678,706,137,620,688,400
32.892857
76
0.584124
false
egenerat/flight-manager
django/contrib/auth/backends.py
9
4446
from django.db import connection from django.contrib.auth.models import User, Permission class ModelBackend(object): """ Authenticates against django.contrib.auth.models.User. """ supports_object_permissions = False supports_anonymous_user = True # TODO: Model, login attribute name...
mit
-7,839,726,872,940,688,000
35.361345
143
0.601889
false
yl565/statsmodels
statsmodels/tsa/vector_ar/dynamic.py
4
10037
# pylint: disable=W0201 from statsmodels.compat.python import iteritems, string_types, range import numpy as np from statsmodels.tools.decorators import cache_readonly import pandas as pd from . import var_model as _model from . import util from . import plotting FULL_SAMPLE = 0 ROLLING = 1 EXPANDING = 2 def _get_...
bsd-3-clause
-116,610,787,129,069,700
26.423497
84
0.567301
false
nvoron23/POSTMan-Chrome-Extension
tests/selenium/pmtests/postman_tests.py
98
3507
from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support.select import Select from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.keys import Keys from colorama import init from colorama import Fore, Back, Style im...
apache-2.0
7,260,912,287,760,315,000
35.53125
141
0.601369
false
tensorflow/models
research/attention_ocr/python/datasets/fsns_test.py
1
3450
# Copyright 2017 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 applicab...
apache-2.0
7,729,994,573,899,652,000
32.173077
80
0.666667
false
mikehankey/fireball_camera
read_frames_fast-mike.py
1
1368
#!/usr/bin/python3 import numpy as np from pathlib import Path import os import requests from collections import deque import multiprocessing from amscommon import read_config import datetime import cv2 import iproc import time import syslog import sys MORPH_KERNEL = np.ones((10, 10), np.uint8) def main(orig_video_fi...
gpl-3.0
5,393,210,762,691,943,000
22.586207
106
0.657895
false
pattisdr/osf.io
addons/box/tests/test_models.py
32
1889
import mock import unittest import pytest from addons.base.tests.models import OAuthAddonNodeSettingsTestSuiteMixin from addons.base.tests.models import OAuthAddonUserSettingTestSuiteMixin from addons.box.models import NodeSettings from addons.box.tests import factories pytestmark = pytest.mark.django_db class Te...
apache-2.0
-1,488,839,391,911,127,600
32.732143
104
0.731604
false
codecollision/Gamedex-Backend
boto/ec2/buyreservation.py
56
3813
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # 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, modi...
bsd-3-clause
-8,778,757,688,335,427,000
44.392857
124
0.644375
false
baruch/diskscan
libscsicmd/structs/ata_struct_2_h.py
1
2491
#!/usr/bin/env python import sys import yaml def emit_func_bit(name, field, params): bit_params = dict(name=name, field=field, word=int(params[0]), bit=int(params[1])) print("""static inline bool ata_get_%(name)s_%(field)s(const unsigned char *buf) { ata_word_t val = ata_get_word(buf, %(word)d); return val & (1 <...
gpl-3.0
8,712,251,086,658,302,000
28.654762
113
0.66118
false
ryfeus/lambda-packs
pytorch/source/caffe2/python/layers/blob_weighted_sum.py
1
2364
## @package BlobWeightedSum # Module caffe2.python.layers.blob_weighted_sum from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import schema from caffe2.python.layers.layers import ModelLayer class Bl...
mit
4,752,308,750,486,860,000
31.383562
86
0.575719
false
andmos/ansible
lib/ansible/modules/cloud/misc/helm.py
50
5389
#!/usr/bin/python # (c) 2016, Flavio Percoco <flavio@redhat.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', 'sta...
gpl-3.0
4,745,838,154,089,531,000
25.033816
92
0.608462
false
arenadata/ambari
contrib/nagios-alerts/plugins/ambari_alerts.py
5
1896
#!/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 "License"); yo...
apache-2.0
-5,299,378,053,349,217,000
32.857143
152
0.710443
false
m0sia/lightblue-0.4
src/mac/_obex.py
83
24385
# Copyright (c) 2009 Bea Lam. All rights reserved. # # This file is part of LightBlue. # # LightBlue 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 l...
gpl-3.0
5,709,651,053,605,711,000
40.330508
545
0.610826
false
Teagan42/home-assistant
homeassistant/components/insteon/const.py
2
2771
"""Constants used by insteon component.""" DOMAIN = "insteon" INSTEON_ENTITIES = "entities" CONF_IP_PORT = "ip_port" CONF_HUB_USERNAME = "username" CONF_HUB_PASSWORD = "password" CONF_HUB_VERSION = "hub_version" CONF_OVERRIDE = "device_override" CONF_PLM_HUB_MSG = "Must configure either a PLM port or a Hub host" CONF...
apache-2.0
5,178,036,439,374,568,000
25.141509
67
0.637676
false
Luthien123/aleph
aleph/processing/__init__.py
3
1728
import logging from archivekit.ingest import Ingestor from aleph.core import archive, celery from aleph.processing.pipeline import make_pipeline # noqa log = logging.getLogger(__name__) @celery.task() def ingest_url(collection_name, url, package_id=None, meta={}): collection = archive.get(collection_name) ...
mit
8,249,743,761,344,025,000
29.857143
66
0.676505
false
godfreyhe/flink
flink-python/pyflink/fn_execution/ResettableIO.py
10
2606
################################################################################ # 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...
apache-2.0
6,475,608,869,390,859,000
35.194444
96
0.600153
false
Commonists/Commons2Data
categories.py
1
2651
# -*- coding: utf-8 -*- import logging import json import sys import requests import pywikibot from pywikibot import page commons = pywikibot.Site('commons', 'commons') tree = {} nbCalls = 0 frequency = 50 # Logger logging on console and in debug LOG = logging.getLogger("categories") LOG_LEVEL = logging.DEBUG console...
mit
311,532,403,679,858,700
27.89011
80
0.627995
false
fishcorn/pylearn2
pylearn2/scripts/datasets/make_cifar100_patches_8x8.py
41
2282
""" This script makes a dataset of two million approximately whitened patches, extracted at random uniformly from the CIFAR-100 train dataset. This script is intended to reproduce the preprocessing used by Adam Coates et. al. in their work from the first half of 2011 on the CIFAR-10 and STL-10 datasets. """ from __fut...
bsd-3-clause
6,863,255,366,949,788,000
35.222222
78
0.786591
false
willthames/ansible
lib/ansible/modules/network/illumos/flowadm.py
50
15277
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, 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
-1,367,352,862,098,514,400
28.150763
126
0.54874
false
imaculate/scikit-learn
examples/applications/plot_species_distribution_modeling.py
55
7386
""" ============================= Species distribution modeling ============================= Modeling species' geographic distributions is an important problem in conservation biology. In this example we model the geographic distribution of two south american mammals given past observations and 14 environmental varia...
bsd-3-clause
-1,028,156,050,556,540,200
34.509615
78
0.599242
false
tildebyte/processing.py
examples.py/Fisica/buttons.py
5
2754
""" * Buttons and bodies * * by Ricard Marxer * * This example shows how to create bodies. * It also demonstrates the use of bodies as buttons. """ from fisica import Fisica, FWorld, FBox, FCircle, FPoly boxButton = None circleButton = None polyButton = None world = None buttonColor = color(0x15, 0x...
apache-2.0
1,927,877,390,297,824,800
27.391753
56
0.66594
false
jnerin/ansible
lib/ansible/plugins/lookup/passwordstore.py
16
10116
# (c) 2017, Patrick Deelman <patrick@patrickdeelman.nl> # (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: passwordstore vers...
gpl-3.0
-5,165,130,094,270,404,000
38.826772
135
0.599446
false
hkupty/python-mode
pymode/libs2/rope/contrib/codeassist.py
26
25440
import keyword import sys import warnings import rope.base.codeanalyze import rope.base.evaluate from rope.base import pyobjects, pyobjectsdef, pynames, builtins, exceptions, worder from rope.base.codeanalyze import SourceLinesAdapter from rope.contrib import fixsyntax from rope.refactor import functionutils def cod...
lgpl-3.0
3,636,531,544,739,188,700
38.319938
86
0.592531
false
prune998/ansible
test/units/playbook/role/test_role.py
82
9044
# (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
-9,119,842,857,330,769,000
31.649819
90
0.586134
false
csmengwan/autorest
AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDateTime/autorestdatetimetestservice/models/error.py
104
1285
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
3,506,760,421,634,595,000
28.204545
83
0.587549
false
NORMA-Company/Atear-Beta
module/fake_ap.py
3
22127
import os import threading from flask import Flask, request, render_template, redirect, url_for import json import re import network from multiprocessing import Process import datetime import socket import struct import IN from collections import defaultdict import time from execute import execute class DNSQuery: ...
apache-2.0
9,006,470,163,395,112,000
40.281716
131
0.549013
false
yhalk/vw_challenge_ECR
src/jetson/keras_frcnn/losses.py
6
2089
from keras import backend as K from keras.objectives import categorical_crossentropy if K.image_dim_ordering() == 'tf': import tensorflow as tf lambda_rpn_regr = 1.0 lambda_rpn_class = 1.0 lambda_cls_regr = 1.0 lambda_cls_class = 1.0 epsilon = 1e-4 def rpn_loss_regr(num_anchors): def rpn_loss_regr_fixed_num(y_t...
apache-2.0
7,909,940,393,180,989,000
36.981818
189
0.583054
false
comeonfox/Paddle
paddle/scripts/cluster_train/conf.py
1
1120
# Copyright (c) 2016 Baidu, 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 o...
apache-2.0
1,250,848,069,501,212,200
27
74
0.728571
false
t794104/ansible
lib/ansible/modules/cloud/vmware/vmware_guest_snapshot.py
13
17807
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project # This module is also sponsored by E.T.A.I. (www.etai.fr) # 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 ...
gpl-3.0
5,772,451,165,624,080,000
39.01573
139
0.592071
false
stevekuznetsov/ansible
lib/ansible/parsing/yaml/constructor.py
10
5927
# (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,458,563,512,884,055,000
36.27673
129
0.678083
false
the-black-eagle/script.radio.streaming.helper
resources/lib/utils.py
1
50411
#!/usr/bin/python # -*- coding: utf-8 -*- # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distr...
gpl-3.0
481,758,038,149,890,050
43.57206
198
0.58273
false
bboozzoo/jhbuild
jhbuild/modtypes/waf.py
5
6424
# jhbuild - a tool to ease building collections of source packages # Copyright (C) 2001-2006 James Henstridge # Copyright (C) 2007 Gustavo Carneiro # Copyright (C) 2008 Frederic Peters # # waf.py: waf module type definitions. # # This program is free software; you can redistribute it and/or modify # it under the t...
gpl-2.0
5,720,601,759,766,851,000
39.658228
86
0.643836
false
torch1/OpenParser
openparser/parse.py
1
8551
from bs4 import BeautifulSoup import bs4 import requests import re import sys import json from urlparse import urljoin, urlparse from Queue import Queue email_regex = re.compile(r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)") phone_regex = re.compile(r"(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8...
mit
8,953,858,115,395,689,000
38.045662
288
0.522395
false
sivu22/nltk-on-gae
GAE/nltk/stem/lancaster.py
5
11216
# Natural Language Toolkit: Stemmers # # Copyright (C) 2001-2012 NLTK Project # Author: Steven Tomcavage <stomcava@law.upenn.edu> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT """ A word stemmer based on the Lancaster stemming algorithm. Paice, Chris D. "Another Stemmer." ACM SIGIR Forum 24....
apache-2.0
-5,842,992,240,469,575,000
35.064309
98
0.420738
false
user-none/calibre
src/tinycss/token_data.py
19
13497
# coding: utf8 """ tinycss.token_data ------------------ Shared data for both implementations (Cython and Python) of the tokenizer. :copyright: (c) 2012 by Simon Sapin. :license: BSD, see LICENSE for more details. """ from __future__ import unicode_literals import re import sys import operator i...
gpl-3.0
6,703,889,182,329,104,000
28.964444
159
0.575719
false
yohei-washizaki/perlin
worley_noise.py
1
1680
#!/usr/bin/env python3 import math def calc_sqr_distance(a, b): vx = a[0] - b[0] vy = a[1] - b[1] return vx * vx + vy * vy def find_nearest_distance(uv, max_size, random_points): xf, xi = math.modf(uv[0]) yf, yi = math.modf(uv[1]) min_sqr_distance = float("inf") for y_offset in [-1...
mit
3,679,611,283,785,804,300
29.545455
93
0.569643
false
sondree/Master-thesis
Python EA/ea/fitness.py
1
7716
#!/usr/bin/python from config import GLOBAL_SECTION from utility import select_class, degToRad FITNESS_SECTION = 'Fitness' from math import pi,log, sqrt def parse_config(config): classes = [('HeurFitness', HeurFitness),('GPUFitness', GPUFitness),('ProjectFitness', ProjectFitness),('DummyFitness',DummyFitness)] ...
gpl-3.0
3,065,998,127,263,941,600
38.979275
179
0.603421
false
xiandiancloud/edx-platform
common/lib/calc/calc/calc.py
61
13558
""" Parser and evaluator for FormulaResponse and NumericalResponse Uses pyparsing to parse. Main function as of now is evaluator(). """ import math import operator import numbers import numpy import scipy.constants import functions from pyparsing import ( Word, Literal, CaselessLiteral, ZeroOrMore, MatchFirst, O...
agpl-3.0
5,806,268,756,468,296,000
31.435407
102
0.607464
false
izapolsk/integration_tests
cfme/services/requests.py
1
21136
from copy import copy import attr from navmazing import NavigateToAttribute from navmazing import NavigateToSibling from widgetastic.widget import Checkbox from widgetastic.widget import Table from widgetastic.widget import Text from widgetastic.widget import View from widgetastic_patternfly import BootstrapTreeview f...
gpl-2.0
6,026,878,987,354,996,000
35.694444
99
0.638626
false
hrayr-artunyan/shuup
shuup_tests/admin/test_contact_extensibility.py
2
3386
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. import pytest from bs4 import BeautifulSoup from django.utils.encoding impo...
agpl-3.0
-3,423,535,793,540,659,000
40.802469
105
0.728293
false
hoangt/core
core/waf/docs/register.py
3
4651
#!/usr/bin/python # -*- coding: utf-8 -*- import re import sys from collections import OrderedDict from error_handler import ReportError from doxycomment import ExtractCommentBlocks,\ IsCommentBlockStart, IsCommentBlockEnd,\ IsInCommentBlock, GetCommentBlock,\ SplitLine, BlockHandler def ProcessRegister(lineArr...
agpl-3.0
6,993,075,460,603,661,000
34.503817
140
0.553859
false
wenottingham/ansible
contrib/inventory/openvz.py
86
2692
#!/usr/bin/env python # -*- coding: utf-8 -*- # # openvz.py # # Copyright 2014 jordonr <jordon@beamsyn.net> # # 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 ...
gpl-3.0
3,193,427,350,464,448,500
33.961039
188
0.649331
false
kuiwei/edx-platform
lms/djangoapps/verify_student/ssencrypt.py
183
7000
""" NOTE: Anytime a `key` is passed into a function here, we assume it's a raw byte string. It should *not* be a string representation of a hex value. In other words, passing the `str` value of `"32fe72aaf2abb44de9e161131b5435c8d37cbdb6f5df242ae860b283115f2dae"` is bad. You want to pass in the result of calling .decode...
agpl-3.0
-7,446,731,489,022,624,000
32.816425
96
0.668857
false
umuzungu/zipline
zipline/data/us_equity_loader.py
3
11226
# Copyright 2016 Quantopian, 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 agreed to in writ...
apache-2.0
-8,303,959,415,738,509,000
33.121581
79
0.540442
false
akrzos/cfme_tests
sprout/appliances/admin.py
2
7301
# -*- coding: utf-8 -*- from functools import wraps from celery import chain from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.db.models.query import QuerySet from django_object_actions import DjangoObjectActions # Register your models here. from appliances.models import ( ...
gpl-2.0
5,529,588,760,223,256,000
33.933014
98
0.641693
false