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
shankar1093/Graphics
mrdoob-three.js-1f968fe/utils/converters/obj/split_obj.py
369
12687
"""Split single OBJ model into mutliple OBJ files by materials ------------------------------------- How to use ------------------------------------- python split_obj.py -i infile.obj -o outfile Will generate: outfile_000.obj outfile_001.obj ... outfile_XXX.obj ------------------------------------- Parser based ...
mit
-7,948,594,125,332,201,000
24.172619
108
0.408528
false
xin3liang/platform_external_chromium_org_third_party_WebKit
Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/util.py
497
13858
# 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...
bsd-3-clause
1,166,489,828,591,238,400
32.3125
79
0.634146
false
ludo237/euler-problems
Problems/Problem 32/Python/problem_32.py
1
1427
''' Problem 32 from Project Euler We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once; for example, the 5-digit number, 15234, is 1 through 5 pandigital. The product 7254 is unusual, as the identity, 39 * 186 = 7254, containing multiplicand, multiplier, and product i...
gpl-2.0
4,828,197,051,601,528,000
32.186047
171
0.69096
false
multikatt/CouchPotatoServer
libs/tornado/iostream.py
63
60393
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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...
gpl-3.0
2,989,221,180,878,954,000
41.056407
97
0.58828
false
wemanuel/smry
server-auth/ls/google-cloud-sdk/lib/googlecloudsdk/gcloud/sdktools/components/__init__.py
4
4163
# Copyright 2013 Google Inc. All Rights Reserved. """The super-group for the update manager.""" import argparse import os import textwrap from googlecloudsdk.core.util import platforms from googlecloudsdk.calliope import base from googlecloudsdk.calliope import exceptions from googlecloudsdk.core import config from...
apache-2.0
-2,395,924,285,288,853,500
43.763441
79
0.705741
false
freedomsponsors/www.freedomsponsors.org
djangoproject/bitcoin_frespo/models.py
4
1943
from django.db import models from django.utils import timezone class ReceiveAddress(models.Model): address = models.CharField(max_length=128, blank=True) available = models.BooleanField(default=True) @classmethod def newAddress(cls, address): receive_address = cls() receive_address.add...
agpl-3.0
3,000,543,818,541,624,000
30.354839
77
0.657746
false
Mistobaan/tensorflow
tensorflow/python/data/ops/readers.py
8
6071
# 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 applica...
apache-2.0
4,626,337,659,571,602,000
35.136905
80
0.677483
false
deepsrijit1105/edx-platform
lms/djangoapps/courseware/tests/test_user_state_client.py
33
2125
""" Black-box tests of the DjangoUserStateClient against the semantics defined in edx_user_state_client. """ from collections import defaultdict from unittest import skip from django.test import TestCase from edx_user_state_client.tests import UserStateClientTestBase from courseware.user_state_client import DjangoXB...
agpl-3.0
9,215,521,597,455,839,000
29.797101
85
0.716706
false
koven2049/hdfs-cloudera-cdh3u3-production
contrib/hod/testing/testHod.py
182
14428
#Licensed to the Apache Software Foundation (ASF) under one #or more contributor license agreements. See the NOTICE file #distributed with this work for additional information #regarding copyright ownership. The ASF licenses this file #to you under the Apache License, Version 2.0 (the #"License"); you may not use thi...
apache-2.0
4,397,623,850,763,735,600
45.541935
190
0.669046
false
yashodhank/frappe
frappe/utils/response.py
8
5467
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import json import datetime import mimetypes import os import frappe from frappe import _ import frappe.model.document import frappe.utils import frappe.sessions import werkzeug.u...
mit
4,171,578,607,805,399,600
31.158824
142
0.723249
false
double12gzh/nova
nova/tests/unit/scheduler/filters/test_affinity_filters.py
56
8801
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
4,716,086,763,175,975,000
41.931707
78
0.607431
false
dpgeorge/micropython
tests/basics/memoryview1.py
12
1687
# test memoryview try: memoryview except: print("SKIP") raise SystemExit try: import uarray as array except ImportError: try: import array except ImportError: print("SKIP") raise SystemExit # test reading from bytes b = b'1234' m = memoryview(b) print(len(m)) print(m[0],...
mit
5,554,080,701,507,038,000
20.35443
67
0.642561
false
rcharp/toyota-flask
numpy/numpy/fft/info.py
68
6882
""" Discrete Fourier Transform (:mod:`numpy.fft`) ============================================= .. currentmodule:: numpy.fft Standard FFTs ------------- .. autosummary:: :toctree: generated/ fft Discrete Fourier transform. ifft Inverse discrete Fourier transform. fft2 Discrete Fourier tr...
apache-2.0
3,646,536,565,643,866,600
37.446927
84
0.710113
false
LiaoPan/scikit-learn
examples/exercises/plot_iris_exercise.py
323
1602
""" ================================ SVM Exercise ================================ A tutorial exercise for using different SVM kernels. This exercise is used in the :ref:`using_kernels_tut` part of the :ref:`supervised_learning_tut` section of the :ref:`stat_learn_tut_index`. """ print(__doc__) import numpy as np i...
bsd-3-clause
942,594,834,759,366,500
23.646154
80
0.568664
false
CryptoManiac/eloipool-scrypt
gmp-proxy.py
18
3584
#!/usr/bin/python3 import logging logging.basicConfig(level=logging.DEBUG) from binascii import b2a_hex import bitcoin.txn import bitcoin.varlen import jsonrpc import jsonrpcserver import jsonrpc_getwork import merkletree import socket from struct import pack import sys import threading from time import time from uti...
agpl-3.0
-1,803,008,609,602,357,500
25.746269
88
0.719308
false
gangadhar-kadam/mic-erpnext
selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.py
3
5527
# ERPNext - web based ERP (http://erpnext.com) # Copyright (C) 2012 Web Notes Technologies Pvt Ltd # # 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 yo...
agpl-3.0
1,216,647,604,684,469,200
37.657343
93
0.691514
false
rkashapov/buildbot
master/buildbot/test/unit/test_scripts_base.py
9
15290
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
4,346,289,001,273,740,000
35.232227
93
0.632636
false
spnow/grr
client/client_actions/plist_test.py
5
4349
#!/usr/bin/env python # -*- mode: python; encoding: utf-8 -*- # Copyright 2010 Google Inc. All Rights Reserved. """Tests for grr.client.client_actions.plist.""" import os # pylint: disable=unused-import from grr.client import client_plugins # pylint: enable=unused-import from grr.client import vfs from grr.lib ...
apache-2.0
3,321,141,199,052,042,000
29.201389
73
0.601058
false
naoyat/latin
lda_demo.py
1
7117
#!/usr/bin/env python # -*- coding: utf-8 -*- from gensim import corpora, models, similarities #, ldamodel import sys import re import latin.ansi_color as ansi_color import latin.textutil as textutil import latin.latin_char as char import latin.latindic as latindic import latin.util as util from latin.LatinObject im...
mit
4,517,692,024,779,054,600
26.378906
110
0.591811
false
toontownfunserver/Panda3D-1.9.0
python/Lib/binhex.py
216
14476
"""Macintosh binhex compression/decompression. easy interface: binhex(inputfilename, outputfilename) hexbin(inputfilename, outputfilename) """ # # Jack Jansen, CWI, August 1995. # # The module is supposed to be as compatible as possible. Especially the # easy interface should work "as expected" on any platform. # XXX...
bsd-3-clause
1,975,777,556,101,679,600
27.496063
79
0.527977
false
thumbimigwe/golber
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/lexers/shell.py
287
15340
# -*- coding: utf-8 -*- """ pygments.lexers.shell ~~~~~~~~~~~~~~~~~~~~~ Lexers for various shells. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer, RegexLexer, do_insertions, bygroups, inclu...
mit
-13,445,487,514,675,444
35.179245
84
0.470404
false
tiagochiavericosta/edx-platform
lms/djangoapps/dashboard/tests/test_sysadmin.py
83
23866
""" Provide tests for sysadmin dashboard feature in sysadmin.py """ import glob import os import re import shutil import unittest from util.date_utils import get_time_display, DEFAULT_DATE_TIME_FORMAT from nose.plugins.attrib import attr from django.conf import settings from django.contrib.auth.hashers import check_pa...
agpl-3.0
3,902,562,238,944,975,400
35.160606
94
0.578983
false
factorlibre/OCB
openerp/modules/loading.py
7
21284
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
agpl-3.0
-6,421,127,646,631,441,000
44.772043
147
0.58551
false
Houzz/luigi
luigi/contrib/scalding.py
26
10702
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
-528,602,744,886,710,300
33.522581
100
0.595496
false
seppi91/CouchPotatoServer
libs/suds/plugin.py
196
7228
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser 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 distributed in the hope that it will ...
gpl-3.0
2,750,828,656,515,724,000
27.124514
76
0.600028
false
eharney/nova
nova/virt/xenapi/network_utils.py
5
1951
# Copyright (c) 2010 Citrix Systems, 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 ...
apache-2.0
6,238,005,303,862,787,000
36.519231
78
0.668375
false
onyxfish/stovetop
atom/data.py
19
8122
#!/usr/bin/env python # # Copyright (C) 2009 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 ...
mit
146,057,136,382,484,580
22.888235
79
0.679512
false
oliverhr/odoo
addons/sale_service/__openerp__.py
260
2447
# -*- coding: utf-8 -*- ############################################################################## # # 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...
agpl-3.0
-591,227,167,837,945,700
41.189655
80
0.653862
false
erjohnso/ansible
lib/ansible/modules/packaging/os/package.py
26
1892
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, 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', ...
gpl-3.0
8,763,187,153,121,818,000
30.533333
135
0.680761
false
eloquence/unisubs
apps/videos/migrations/0071_auto.py
5
17079
# 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): # Adding M2M table for field followers on 'SubtitleLanguage' db.create_table('videos_subtitlelanguage_...
agpl-3.0
4,268,796,596,370,697,700
79.183099
196
0.558639
false
sergeScherbakov/bgfx
3rdparty/scintilla/scripts/ScintillaData.py
69
8599
# ScintillaData.py - implemented 2013 by Neil Hodgson neilh@scintilla.org # Released to the public domain. # Common code used by Scintilla and SciTE for source file regeneration. # The ScintillaData object exposes information about Scintilla as properties: # Version properties # version # versionDotted # v...
bsd-2-clause
-6,910,561,828,073,154,000
37.217778
95
0.545063
false
soarpenguin/ansible
lib/ansible/modules/cloud/openstack/os_nova_host_aggregate.py
72
6745
#!/usr/bin/python # Copyright 2016 Jakub Jursa <jakub.jursa1@gmail.com> # # This 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) any later version....
gpl-3.0
8,864,595,861,561,156,000
32.391089
133
0.606227
false
johnnovak/twyg
twyg/tests/css3colors_test.py
1
4379
import os, sys, unittest sys.path.append(os.path.join('..')) from twyg.css3colors import color_to_rgba, rgba_to_color class TestCSS3Colors(unittest.TestCase): def test_valid(self): r, g, b, a = color_to_rgba('aquamarine') c = rgba_to_color(r, g, b, a, format='rgb') self.as...
mit
8,068,762,431,036,657,000
35.110169
89
0.489838
false
js0701/chromium-crosswalk
tools/generate_library_loader/generate_library_loader.py
79
7149
#!/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. """ Creates a library loader (a header and implementation file), which is a wrapper for dlopen or direct linking with given library...
bsd-3-clause
7,886,219,806,364,450,000
27.710843
79
0.677997
false
Learningtribes/edx-platform
cms/djangoapps/contentstore/management/commands/cleanup_assets.py
204
1226
""" Script for removing all redundant Mac OS metadata files (with filename ".DS_Store" or with filename which starts with "._") for all courses """ import logging from django.core.management.base import BaseCommand from xmodule.contentstore.django import contentstore log = logging.getLogger(__name__) class Command...
agpl-3.0
3,550,125,784,219,364,000
29.65
91
0.623165
false
LaetitiaPapaxanthos/UnionCom
train.py
1
4021
import numpy as np import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import random import sys from PrimeDual import * from utils import save_model import torch.backends.cudnn as cudnn cudnn.benchmark = True def train(Project, params, dataset, dist, P_joint...
mit
-8,121,456,492,795,143,000
26.51773
112
0.639144
false
arpitparmar5739/youtube-dl
youtube_dl/extractor/vine.py
95
4636
from __future__ import unicode_literals import re import itertools from .common import InfoExtractor from ..utils import unified_strdate class VineIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?vine\.co/(?:v|oembed)/(?P<id>\w+)' _TESTS = [{ 'url': 'https://vine.co/v/b9KOOWX7HUx', 'md5'...
unlicense
5,504,657,035,513,956,000
34.121212
111
0.506471
false
gitenberg-dev/pg-epubmaker
epubmaker/mydocutils/gutenberg/writers/nroff.py
1
6333
# -*- coding: utf-8 -*- # $Id: manpage.py 6270 2010-03-18 22:32:09Z milde $ # Author: Engelbert Gruber <grubert@users.sourceforge.net> # Copyright: This module is put into the public domain. # Rewritten almost completely # by Marcello Perathoner <marcello@perathoner.de> """ Nroff writer for reStructuredText. Tweaked ...
gpl-3.0
1,406,335,643,626,183,700
29.301435
95
0.547608
false
rajadhva/servo
tests/wpt/web-platform-tests/tools/pywebsocket/src/example/abort_handshake_wsh.py
465
1781
# Copyright 2012, 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
-3,191,554,817,353,480,000
40.418605
72
0.774846
false
windyuuy/opera
chromium/src/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/abstractsequencedcommand.py
4
2380
# Copyright (C) 2010 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...
bsd-3-clause
-6,713,023,332,224,642,000
43.074074
75
0.74958
false
qutip/qutip-benchmark
continuous-benchmark/benchmarks/mesolve_8spin.py
1
2364
# # qutip benchmark: mesolve 8 spin chain # import time try: from numpy import * from qutip import * except: print("nan") import sys sys.exit(1) def benchmark(runs=1): """ mesolver evolution of 8-spin chain """ test_name='8-spin ME [256]' N = 8# number of spins # uniform pa...
bsd-3-clause
717,367,654,201,637,400
24.419355
72
0.516074
false
LudditeLabs/query-reform
data/samples/Python/2.py
1
9902
#!/usr/bin/env python # encoding: utf-8 # The benchmark is distributed under the Creative Commons, # Attribution-NonCommercial-NoDerivatives. This license includes the benchmark database # and its derivatives. For attribution, please cite this page, and our publications below. # This data is provided free of charge fo...
apache-2.0
-6,911,723,717,206,545,000
28.649701
108
0.616542
false
kaostao/sx
src/obelisk/client.py
2
6958
import struct from decimal import Decimal from twisted.internet import reactor from zmqbase import ClientBase import bitcoin import models import serialize import error_code def unpack_error(data): value = struct.unpack_from('<I', data, 0)[0] return error_code.error_code.name_from_id(value) def pack_block_...
agpl-3.0
7,204,595,429,724,622,000
34.865979
111
0.612101
false
a-doumoulakis/tensorflow
tensorflow/contrib/rnn/python/ops/core_rnn_cell.py
39
8591
# 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
3,411,685,015,140,416,500
36.352174
93
0.678384
false
RachaelT/UTDchess-RospyXbee
src/scripts/cmd_vel_listener.py
1
4756
#!/usr/bin/env python import sys import rospy import serial import struct import binascii import time from teleop_twist_keyboard.msg import Command from xbee import ZigBee xbee = None XBEE_ADDR_LONG = '\x00\x13\xA2\x00\x40\x86\x96\x4F' XBEE_ADDR_SHORT = '\xFF\xFE' DEVICE = '/dev/tty.usbserial-A603HA9K' #Each bot will...
mit
4,628,218,883,451,186,000
25.276243
106
0.598192
false
jokimies/django-pj-portfolio
portfolio/forms.py
1
1749
from django import forms from portfolio.models import Security, Transaction, Account from currency_history.models import Currency class BuyForm(forms.ModelForm): #def __init__(self, *pa, **ka): #super(BuyForm, self).__init__(*pa, **ka) #self.fields['security'].queryset = Security.objects.all() ...
bsd-3-clause
-7,940,730,006,546,489,000
29.155172
107
0.614637
false
ojake/django
django/contrib/gis/gdal/__init__.py
327
2635
""" This module houses ctypes interfaces for GDAL objects. The following GDAL objects are supported: CoordTransform: Used for coordinate transformations from one spatial reference system to another. Driver: Wraps an OGR data source driver. DataSource: Wrapper for the OGR data source object, supports OGR-su...
bsd-3-clause
-3,277,495,403,842,761,000
37.75
101
0.741556
false
edisonlz/fruit
web_project/base/site-packages/django_extensions/db/fields/__init__.py
39
14535
""" Django Extensions additional model fields """ import re import six import warnings try: import uuid HAS_UUID = True except ImportError: HAS_UUID = False try: import shortuuid HAS_SHORT_UUID = True except ImportError: HAS_SHORT_UUID = False from django.core.exceptions import ImproperlyConf...
apache-2.0
4,761,849,834,766,801,000
36.269231
153
0.627176
false
stefanfoulis/django-multilingual
multilingual/admin.py
2
8098
from django.contrib import admin from django.forms.models import BaseInlineFormSet from django.forms.fields import BooleanField from django.forms.formsets import DELETION_FIELD_NAME from django.forms.util import ErrorDict from django.utils.translation import ugettext as _ from multilingual.languages import * from mult...
mit
8,737,392,859,593,761,000
37.379147
88
0.621141
false
t794104/ansible
test/units/modules/network/f5/test_bigip_data_group.py
16
16352
# -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks 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 import os import json import pytest import sys if sys.version_info < (2...
gpl-3.0
-1,081,437,743,901,888,900
32.577002
125
0.579134
false
FreeAgent/djangoappengine-starter
django/contrib/admindocs/urls.py
336
1089
from django.conf.urls.defaults import * from django.contrib.admindocs import views urlpatterns = patterns('', url('^$', views.doc_index, name='django-admindocs-docroot' ), url('^bookmarklets/$', views.bookmarklets, name='django-admindocs-bookmarklets' ), url('^tags/$...
bsd-3-clause
-5,760,896,323,378,675,000
25.560976
65
0.560147
false
hguemar/cinder
cinder/tests/test_ibmnas.py
1
18917
# Copyright 2013 IBM Corp. # # 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 t...
apache-2.0
-8,491,298,313,839,911,000
37.371197
79
0.581276
false
CanonicalLtd/subiquity
subiquitycore/ui/actionmenu.py
1
4904
# Copyright 2018 Canonical, Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
agpl-3.0
-5,970,046,023,235,273,000
28.902439
79
0.574429
false
inspirehep/json-merger
json_merger/version.py
1
1199
# -*- coding: utf-8 -*- # # This file is part of Inspirehep. # Copyright (C) 2016, 2017, 2018 CERN. # # Inspirehep is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your...
gpl-2.0
69,991,706,556,696,280
35.333333
76
0.742285
false
rbardak/espresso
samples/python/debye_hueckel.py
2
7857
# # Copyright (C) 2013,2014 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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...
gpl-3.0
-1,512,337,493,761,595,400
29.335907
106
0.593738
false
piffey/ansible
lib/ansible/modules/cloud/ovirt/ovirt_mac_pools.py
73
5430
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (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 #...
gpl-3.0
439,199,905,862,687,300
28.835165
120
0.61418
false
seanli9jan/tensorflow
tensorflow/python/kernel_tests/sparse_cross_op_test.py
8
16655
# 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
6,647,563,785,646,393,000
40.952141
80
0.602762
false
aerickson/xbmc
lib/gtest/test/gtest_filter_unittest.py
2826
21261
#!/usr/bin/env python # # Copyright 2005 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-2.0
3,626,937,858,016,643,600
32.587678
80
0.663468
false
yfried/ansible
lib/ansible/modules/storage/netapp/na_ontap_net_ifgrp.py
9
11332
#!/usr/bin/python # (c) 2018, NetApp, 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', 'status': ['preview'], ...
gpl-3.0
8,232,303,018,840,748,000
34.083591
112
0.563184
false
pandeyadarsh/sympy
sympy/liealgebras/cartan_type.py
80
1775
from __future__ import print_function, division from sympy.core import Basic class CartanType_generator(Basic): """ Constructor for actually creating things """ def __call__(self, *args): c = args[0] c = list(c) letter, n = c[0], int(c[1]) if n < 0: raise ...
bsd-3-clause
-5,026,317,286,163,275,000
22.666667
67
0.454085
false
Kazade/NeHe-Website
google_appengine/lib/django_1_2/django/templatetags/i18n.py
60
9958
import re from django.template import Node, Variable, VariableNode, _render_value_in_context from django.template import TemplateSyntaxError, TokenParser, Library from django.template import TOKEN_TEXT, TOKEN_VAR from django.utils import translation from django.utils.encoding import force_unicode register = Library()...
bsd-3-clause
3,811,033,430,578,658,300
35.343066
124
0.608154
false
rlugojr/rekall
rekall-agent/rekall_agent/ui/interactive.py
1
6116
# Rekall Memory Forensics # # Copyright 2016 Google Inc. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or (at # your option) any later v...
gpl-2.0
-4,928,993,064,057,047,000
34.976471
76
0.593362
false
brainelectronics/towerdefense
pyglet/image/codecs/bmp.py
25
12418
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
bsd-3-clause
-247,357,212,594,063,420
33.590529
78
0.574489
false
SLongofono/448_Project4
Documentation/Prototype/Compare_Songs.py
1
5320
## @file Compare_Songs.py # Compare Songs # @brief Functions associated with the collection of tracks to compare against # @details This file describes the methods by which we collect songs to process # against our user profile. import sys import spotipy import spotipy.util as util import Assemble_Profile...
mit
1,701,775,615,937,686,000
34.231788
179
0.705263
false
vveerava/Openstack
neutron/plugins/ml2/rpc.py
7
9218
# Copyright (c) 2013 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
-5,742,888,210,216,042,000
42.895238
78
0.547407
false
curtisblack/R2D2
BluetoothSerial.py
1
1624
import os import logging import serial from RPi.GPIO import * class BluetoothSerial: def __init__(self, usb, pin): self.usb = usb self.pin = pin self.port = None self.buffer = "" setmode(BCM) setup(self.pin, IN) self.Connected = False self.JustConnect...
mit
2,993,901,909,841,272,300
30.843137
108
0.491379
false
theyaa/Impala
thirdparty/thrift-0.9.0/test/py/TestSocket.py
99
2888
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "L...
apache-2.0
-374,561,504,642,651,970
31.449438
84
0.65374
false
michigraber/scikit-learn
examples/linear_model/plot_bayesian_ridge.py
248
2588
""" ========================= Bayesian Ridge Regression ========================= Computes a Bayesian Ridge Regression on a synthetic dataset. See :ref:`bayesian_ridge_regression` for more information on the regressor. Compared to the OLS (ordinary least squares) estimator, the coefficient weights are slightly shift...
bsd-3-clause
-8,691,988,650,485,040,000
32.179487
79
0.656105
false
agancsos/misc
crawler.py
1
2905
#!/bin/python import os import sys import re import urllib2 import random import datetime dbfile=""; def getSQLiteRows(sql): key=str(random.randint(0,9999)); os.system("sqlite3 \""+dbfile+"\" \""+sql+"\" > db_file_"+key); all_content=""; if(os.path.exists("db_file_"+key)): all_content=open("db_file_"+key,"r").re...
mit
8,816,615,251,395,560,000
31.277778
160
0.600344
false
Jionglun/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/draw.py
603
6456
from javascript import console from browser import timer import math class Queue: def __init__(self): self._list=[] def empty(self): return len(self._list) == 0 def put(self, element): self._list.append(element) def get(self): if len(self._list) == 0: raise BaseError ...
gpl-3.0
4,288,755,407,849,155,000
29.889952
96
0.532063
false
oneminot/audacity
lib-src/lv2/sord/waflib/Tools/dbus.py
318
1142
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file from waflib import Task,Errors from waflib.TaskGen import taskgen_method,before_method @taskgen_method def add_dbus_file(self,filename,prefix,mode): if not hasattr(self,'dbus...
gpl-2.0
-6,612,690,221,675,248
38.37931
124
0.7338
false
promptworks/keystone
keystone/policy/core.py
5
4225
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
apache-2.0
-8,961,305,487,589,424,000
30.296296
77
0.673609
false
nandhp/youtube-dl
youtube_dl/extractor/pornovoisines.py
15
3390
# coding: utf-8 from __future__ import unicode_literals import re import random from .common import InfoExtractor from ..utils import ( int_or_none, float_or_none, unified_strdate, ) class PornoVoisinesIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?pornovoisines\.com/showvideo/(?P<id>\d+)/(?P<...
unlicense
8,051,875,231,945,665,000
34.270833
101
0.552274
false
patchew-project/patchew
tests/test_ansi2html.py
2
22373
# Test conversion of ANSI sequences into HTML # # Copyright (C) 2018 Red Hat, Inc. # # Author: Paolo Bonzini <pbonzini@redhat.com> import unittest from patchew.logviewer import ansi2html, ansi2text, ANSI2TextConverter class ANSI2HTMLTest(unittest.TestCase): def assertAnsi(self, test, expected, **kwargs): ...
mit
3,059,164,968,108,941,000
50.31422
88
0.57842
false
gicking/STM8_templates
Projects/General_Examples/I2C_read/build_upload.py
16
3419
#!/usr/bin/python ''' Script for building and uploading a STM8 project with dependency auto-detection ''' # set general options UPLOAD = 'BSL' # select 'BSL' or 'SWIM' TERMINAL = True # set True to open terminal after upload RESET = 1 # STM8 reset: 0=skip, 1=manual, 2=DTR line (RS232),...
apache-2.0
-2,886,398,104,428,103,700
33.19
137
0.673589
false
nuagenetworks/vspk-python
vspk/v6/nusapegressqosprofile.py
1
14126
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
bsd-3-clause
-8,735,170,402,238,838,000
29.380645
296
0.582614
false
openstack/ceilometer
ceilometer/tests/unit/test_event_pipeline.py
1
14208
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under...
apache-2.0
-5,910,649,052,242,056,000
38.910112
77
0.616976
false
saeki-masaki/glance
glance/db/sqlalchemy/migrate_repo/versions/002_add_image_properties_table.py
9
3450
# 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
-3,187,389,505,215,370,000
39.588235
78
0.534783
false
MichalMaM/ella-galleries
ella_galleries/south_migrations/0008_auto__add_field_galleryitem_slug.py
2
11553
# -*- 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 'GalleryItem.slug' db.add_column('ella_galleries_galleryitem', 'slug', ...
bsd-3-clause
-2,527,299,136,151,364,000
75.013158
182
0.544447
false
weimingtom/python-for-android
python-modules/twisted/twisted/internet/tksupport.py
61
1716
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ This module integrates Tkinter with twisted.internet's mainloop. Maintainer: Itamar Shtull-Trauring To use, do:: | tksupport.install(rootWidget) and then run your reactor as usual - do *not* call Tk's mainloop(), use Twisted...
apache-2.0
-2,299,826,155,828,744,200
24.235294
97
0.685315
false
deadmau6/Prog5
network.py
1
9349
''' Created on Oct 12, 2016 @author: mwitt_000 ''' import queue import threading ## wrapper class for a queue of packets class Interface: ## @param maxsize - the maximum size of the queue storing packets # @param cost - of the interface used in routing # @param capacity - the capacity of the link in bp...
gpl-3.0
-315,479,999,225,291,840
38.957265
138
0.584127
false
xzh86/scikit-learn
sklearn/manifold/tests/test_mds.py
324
1862
import numpy as np from numpy.testing import assert_array_almost_equal from nose.tools import assert_raises from sklearn.manifold import mds def test_smacof(): # test metric smacof using the data of "Modern Multidimensional Scaling", # Borg & Groenen, p 154 sim = np.array([[0, 5, 3, 4], ...
bsd-3-clause
1,819,847,776,009,116,200
29.52459
77
0.429646
false
mosbasik/buzhug
javasrc/lib/Jython/Lib/test/test_pkg_jy.py
5
3082
# Test packages (dotted-name import) # XXX: This test is borrowed from CPython 2.7 as it tickles # http://bugs.jython.org/issue1871 so it should be removed in Jython 2.7 import sys import os import tempfile import textwrap import unittest from test import test_support # Helpers to create and destroy hierarchies. de...
bsd-3-clause
-8,874,851,719,359,814,000
28.634615
72
0.504218
false
bo01ean/Stino
stino/pyarduino/base/pyserial/serialposix.py
18
24318
#!/usr/bin/env python # # Python Serial Port Extension for Win32, Linux, BSD, Jython # module for serial IO for POSIX compatible systems, like Linux # see __init__.py # # (C) 2001-2010 Chris Liechti <cliechti@gmx.net> # this is distributed under a free software license, see license.txt # # parts based on code from Gran...
mit
-4,850,893,585,403,789,000
36.354839
117
0.591373
false
gaddman/ansible
test/units/modules/network/nxos/test_nxos_vxlan_vtep.py
63
2534
# (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
-5,934,329,500,627,422,000
39.222222
125
0.712313
false
raycarnes/account-financial-tools
account_check_deposit/__openerp__.py
18
2364
# -*- coding: utf-8 -*- ############################################################################### # # account_check_deposit for Odoo/OpenERP # Copyright (C) 2012-2015 Akretion (http://www.akretion.com/) # @author: Benoît GUILLOT <benoit.guillot@akretion.com> # @author: Chafique DELLI <chafique.delli@akret...
agpl-3.0
8,510,042,072,171,674,000
37.112903
79
0.633517
false
uclapi/uclapi
backend/uclapi/timetable/migrations/0003_auto_20171007_1558.py
1
26087
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-10-07 15:58 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('timetable', '0002_caching'), ] operations = [ migrations.AlterField( ...
mit
-8,989,471,490,442,158,000
33.100654
70
0.542224
false
uni-peter-zheng/autotest
client/shared/profiler_manager_unittest.py
4
2880
#!/usr/bin/python import unittest try: import autotest.common as common except ImportError: import common from autotest.client.shared import profiler_manager # simple job stub for using in tests class stub_job(object): tmpdir = "/home/autotest/tmp" autodir = "/home/autotest" # simple profiler stub ...
gpl-2.0
-5,917,933,020,249,977,000
25.422018
72
0.60625
false
preo/dnspython
dns/node.py
49
6028
# Copyright (C) 2001-2007, 2009-2011 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 "...
isc
4,626,233,218,718,265,000
33.445714
76
0.623922
false
jwvhewitt/dmeternal
old_game/monsters/misc.py
1
23825
from . import base from .. import stats from .. import items from .. import dialogue from .. import context from .. import spells from .. import invocations from .. import effects from .. import animobs from .. import targetarea from .. import aibrain from . import animals from . import treasuretype from . import abili...
gpl-2.0
4,871,808,304,682,508,000
39.587734
136
0.598447
false
hurricup/intellij-community
python/helpers/py2only/docutils/utils/__init__.py
113
27412
# coding: utf-8 # $Id: __init__.py 7668 2013-06-04 12:46:30Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Miscellaneous utilities for the documentation utilities. """ __docformat__ = 'reStructuredText' import sys import os import os.path impo...
apache-2.0
8,849,615,855,095,762,000
35.59012
84
0.608115
false
cloudera/hue
desktop/core/ext-py/docutils-0.14/docutils/parsers/rst/languages/ca.py
128
4467
# $Id: ca.py 7119 2011-09-02 13:00:23Z milde $ # Author: Ivan Vilata i Balaguer <ivan@selidor.net> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # trans...
apache-2.0
-4,847,848,440,151,557,000
34.736
83
0.623909
false
MiltosD/CEF-ELRC
misc/tools/generateDS-2.7a/tests/simpletype_memberspecs1_sup.py
7
22813
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated by generateDS.py. # import sys import getopt import re as re_ etree_ = None Verbose_import_ = False ( XMLParser_import_none, XMLParser_import_lxml, XMLParser_import_elementtree ) = range(3) XMLParser_import_library = None try: # lxml fro...
bsd-3-clause
-1,116,947,377,779,926,100
36.832504
168
0.595713
false
rhyolight/nupic
external/linux32/lib/python2.6/site-packages/matplotlib/type1font.py
69
6406
""" A class representing a Type 1 font. This version merely reads pfa and pfb files and splits them for embedding in pdf files. There is no support yet for subsetting or anything like that. Usage (subject to change): font = Type1Font(filename) clear_part, encrypted_part, finale = font.parts Source: Adobe Tech...
agpl-3.0
-1,313,401,873,411,712,800
33.815217
93
0.468935
false
zhengzhihust/tablib
tablib/packages/odf/math.py
100
1066
# -*- coding: utf-8 -*- # Copyright (C) 2006-2007 Søren Roug, European Environment Agency # # This library 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 2.1 of the License, or (at you...
mit
7,477,693,783,043,790,000
34.5
80
0.750235
false
pando85/gourmet
gourmet/plugins/import_export/pdf_plugin/page_drawer.py
7
3491
import gtk class PageDrawer (gtk.DrawingArea): def __init__(self, page_width=None, page_height=None, sub_areas=[],xalign=0.5,yalign=0.5 ): """Draw a page based on page areas given to us. The areas can be given in any scale they like. sub_areas are each (...
gpl-2.0
4,568,851,167,413,608,000
38.670455
91
0.519622
false
sbranson/online_crowdsourcing
crowdsourcing/util/multibox/loss.py
1
5401
import numpy as np from scipy.optimize import linear_sum_assignment import tensorflow as tf import tensorflow.contrib.slim as slim SMALL_EPSILON = 1e-10 def compute_assignments(locations, confidences, gt_bboxes, num_gt_bboxes, batch_size, alpha): """ locations: [batch_size * num_predictions, 4] confidences: [ba...
mit
2,087,904,347,026,176,800
45.17094
226
0.685984
false
dynamicapp/dynamicapp
lib/iOS/dependencies/cpp/scons/scons-local-2.0.0.final.0/SCons/Warnings.py
34
6804
# # 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 restriction, including # without li...
apache-2.0
3,059,839,277,038,271,500
26.658537
95
0.71458
false
tbeckham/eutester
eucaops/asops.py
5
21084
# Software License Agreement (BSD License) # # Copyright (c) 2009-2014, Eucalyptus Systems, Inc. # All rights reserved. # # 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 ...
bsd-2-clause
-3,980,222,542,592,403,000
44.636364
131
0.585325
false
lorin/ansible-modules-core
cloud/ec2_ami.py
29
8707
#!/usr/bin/python # 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...
gpl-3.0
-2,664,539,879,469,771,300
30.893773
266
0.660962
false