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
andrejb/leap_mail
src/leap/mail/_version.py
2
16747
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
gpl-3.0
1,537,646,256,841,092,400
33.60124
79
0.58088
false
demarle/VTK
ThirdParty/Twisted/twisted/internet/_pollingfile.py
32
8894
# -*- test-case-name: twisted.internet.test.test_pollingfile -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Implements a simple polling interface for file descriptors that don't work with select() - this is pretty much only useful on Windows. """ from zope.interface import implements ...
bsd-3-clause
1,723,091,219,259,580,000
28.646667
83
0.571846
false
chouseknecht/ansible
lib/ansible/modules/cloud/google/gcp_sql_user_info.py
5
5031
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
gpl-3.0
-918,162,677,156,400,000
31.882353
117
0.575035
false
40223136/2015cdag1man
static/Brython3.1.3-20150514-095342/Lib/site-packages/pygame/surface.py
603
3844
from browser import document, html, window from javascript import console, JSConstructor from .rect import Rect #import pygame.rect canvas_ID=1 _canvas_id=None class Surface: def __init__(self, dim=[], depth=16, surf=None): if surf is None: self._depth=depth self._canvas=html.CANVAS(width=...
gpl-3.0
4,981,571,111,672,184,000
29.03125
85
0.608741
false
sunqm/pyscf
pyscf/pbc/tdscf/test/test_rhf_slow.py
2
3697
from pyscf.pbc.gto import Cell from pyscf.pbc.scf import RHF from pyscf.pbc.tdscf import TDHF from pyscf.pbc.tdscf.rhf_slow import PhysERI, PhysERI4, PhysERI8, TDRHF from pyscf.tdscf.common_slow import eig from test_common import retrieve_m, retrieve_m_hf, assert_vectors_close import unittest from numpy import testin...
apache-2.0
-7,016,331,844,512,718,000
32.609091
86
0.580741
false
alexandrujuncu/sos
sos/plugins/kimchi.py
14
1619
# Copyright IBM, Corp. 2014, Christy Perez <christy@linux.vnet.ibm.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 2 of the License, or # (at your option) any later version....
gpl-2.0
9,194,812,573,667,425,000
39.475
72
0.65596
false
sztanko/hadoop-common
src/contrib/hod/testing/testModule.py
182
2187
#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
-6,950,601,090,397,625,000
23.852273
73
0.717878
false
adelton/origin
cmd/service-catalog/go/src/github.com/kubernetes-incubator/service-catalog/vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-worker/lib/charms/kubernetes/flagmanager.py
182
4599
#!/usr/bin/env python # Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
-2,287,587,296,029,262,000
33.066667
77
0.5586
false
aleju/imgaug
checks/check_visually.py
2
8145
""" Tests to visually inspect the results of the library's functionality. Run checks via python check_visually.py """ from __future__ import print_function, division import argparse import numpy as np from skimage import data import imgaug as ia from imgaug import augmenters as iaa def main(): parser = arg...
mit
8,702,366,416,917,235,000
38.926471
126
0.552855
false
andrewmoses/ssquiz
flask/lib/python2.7/site-packages/coverage/html.py
159
13097
"""HTML reporting for Coverage.""" import os, re, shutil, sys import coverage from coverage.backward import pickle from coverage.misc import CoverageException, Hasher from coverage.phystokens import source_token_lines, source_encoding from coverage.report import Reporter from coverage.results import Numbers from cove...
bsd-3-clause
3,265,709,086,144,888,000
32.073232
79
0.543178
false
Philippe12/external_chromium_org
tools/telemetry/telemetry/core/platform/__init__.py
23
6350
# 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 sys from telemetry.core.platform import linux_platform_backend from telemetry.core.platform import mac_platform_backend from telemetry.core.platf...
bsd-3-clause
-7,825,986,455,210,747,000
36.134503
80
0.736693
false
MarineLasbleis/GrowYourIC
notebooks/WD11.py
1
2954
# import statements import numpy as np import matplotlib.pyplot as plt #for figures from mpl_toolkits.basemap import Basemap #to render maps import math import json #to write dict with parameters from GrowYourIC import positions, geodyn, geodyn_trg, geodyn_static, plot_data, data plt.rcParams['figure.figsize'] = (8.0...
mit
2,933,183,096,276,615,000
30.774194
159
0.667231
false
luotao1/Paddle
python/paddle/dataset/movielens.py
1
9031
# Copyright (c) 2016 PaddlePaddle 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 applic...
apache-2.0
6,732,083,810,091,463,000
29.103333
80
0.589414
false
vecnet/vnetsource
djorm-ext-pgbytea/djorm_pgbytea/lobject.py
4
2813
# -*- coding: utf-8 -*- import types import sys import six from django.db import models, connections from psycopg2.extensions import lobject as lobject_class class LargeObjectFile(object): """ Proxy class over psycopg2 large object file instance. """ def __init__(self, oid=0, field=None, instance=No...
mpl-2.0
7,621,196,334,949,807,000
26.851485
78
0.6246
false
abarthakur/voice_assistant
src/movieModule.py
1
1920
from os import system import pyttsx #Setting up the speaker def onStart(name): print "" def onWord(name, location, length): print "" def onEnd(name, completed): print "" engine = pyttsx.init() rate = engine.getProperty('rate') engine.setProperty('rate', rate-50) engine.connect('started-utterance', onStart) e...
gpl-3.0
736,859,427,133,157,600
28.106061
80
0.689583
false
aliyun/oss-ftp
python27/win32/Lib/test/test_htmllib.py
133
1978
import formatter import unittest from test import test_support htmllib = test_support.import_module('htmllib', deprecated=True) class AnchorCollector(htmllib.HTMLParser): def __init__(self, *args, **kw): self.__anchors = [] htmllib.HTMLParser.__init__(self, *args, **kw) def get_anchor_info(s...
mit
8,948,454,710,125,524,000
27.666667
70
0.509606
false
Creworker/FreeCAD
src/Tools/MakeNewBuildNbr.py
16
2546
# FreeCAD MakeNewBuildNbr script # (c) 2002 Jürgen Riegel # # Increase the Build Number in Version.h #*************************************************************************** #* (c) Jürgen Riegel (juergen.riegel@web.de) 2002 * #* ...
lgpl-2.1
-5,374,699,415,258,208,000
57.209302
178
0.463865
false
gc3-uzh-ch/ganglia
gmetad-python/Gmetad/gmetad_element.py
15
5497
#/******************************************************************************* #* Portions Copyright (C) 2008 Novell, 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: #* #* - Redistributi...
bsd-3-clause
-9,153,162,619,047,968,000
37.985816
103
0.583955
false
Tony-Wang/YaYaNLP
test/test_organization_recognition.py
1
2674
# coding=utf-8 __author__ = 'tony' from unittest import TestCase from yaya.config import Config from yaya.recognition import person_recognition from yaya.recognition import place_recognition from yaya.recognition import organization_recognition from yaya.seg.viterbi import viterbi from yaya.seg.wordnet import WordNet,...
apache-2.0
4,715,141,710,715,009,000
45.641509
101
0.708333
false
codervince/flashingredlight
env/lib/python2.7/site-packages/gunicorn/six.py
320
27344
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2014 Benjamin Peterson # # 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 with...
mit
6,564,533,873,878,306,000
34.884514
98
0.632717
false
lihui7115/ChromiumGStreamerBackend
infra/scripts/legacy/site_config/config_default.py
6
7736
# 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. """Seeds a number of variables defined in chromium_config.py. The recommended way is to fork this file and use a custom DEPS forked from config/XXX/DEPS wit...
bsd-3-clause
3,178,088,885,403,347,500
32.634783
80
0.679679
false
ivan-fedorov/intellij-community
python/lib/Lib/pawt/colors.py
112
4500
from java.awt import Color aliceblue = Color(240, 248, 255) antiquewhite = Color(250, 235, 215) aqua = Color(0, 255, 255) aquamarine = Color(127, 255, 212) azure = Color(240, 255, 255) beige = Color(245, 245, 220) bisque = Color(255, 228, 196) black = Color(0, 0, 0) blanchedalmond = Color(255, 235, 205) blue = Color(0...
apache-2.0
-1,078,364,788,167,769,900
30.25
43
0.686889
false
kynikos/outspline
src/outspline/conf/plugins/wxdbsearch.py
1
1334
# Outspline - A highly modular and extensible outliner. # Copyright (C) 2011 Dario Giovannetti <dev@dariogiovannetti.net> # # This file is part of Outspline. # # Outspline 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 F...
gpl-3.0
2,054,185,608,419,393,000
28.644444
70
0.565217
false
t794104/ansible
lib/ansible/modules/network/dellos6/dellos6_facts.py
50
15435
#!/usr/bin/python # # (c) 2015 Peter Sprygada, <psprygada@ansible.com> # Copyright (c) 2016 Dell 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_versio...
gpl-3.0
-7,941,043,181,624,259,000
30.694045
132
0.553158
false
lunafeng/django
django/contrib/admin/templatetags/admin_modify.py
342
2505
from django import template register = template.Library() @register.inclusion_tag('admin/prepopulated_fields_js.html', takes_context=True) def prepopulated_fields_js(context): """ Creates a list of prepopulated_fields that should render Javascript for the prepopulated fields for both the admin form and i...
bsd-3-clause
4,596,948,393,944,978,000
35.838235
111
0.639521
false
nanolearningllc/edx-platform-cypress-2
cms/djangoapps/contentstore/features/course-export.py
58
2706
# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name # pylint: disable=unused-argument from lettuce import world, step from component_settings_editor_helpers import enter_xml_in_advanced_problem from nose.tools import assert_true, assert_equal from contentstore.utils import reverse_usage_url @s...
agpl-3.0
-6,982,439,782,401,000,000
38.217391
124
0.668514
false
ebonymarieb/django-calaccess-raw-data
example/toolbox/management/commands/createfielddocissues.py
29
5833
import os import time import calculate from github import Github from django.conf import settings from calaccess_raw import get_model_list from calaccess_raw.management.commands import CalAccessCommand from django.contrib.humanize.templatetags.humanize import intcomma class Command(CalAccessCommand): help = 'Crea...
mit
-6,981,763,795,344,254,000
34.567073
248
0.628664
false
rustychris/stompy
docs/conf.py
1
5704
# -*- coding: utf-8 -*- # # stompy documentation build configuration file, created by # sphinx-quickstart on Mon Jun 19 14:24:20 2017. # # 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. # # Al...
mit
-7,781,187,665,886,865,000
29.021053
79
0.646564
false
jandebleser/django-wiki
tests/plugins/attachments/test_views.py
1
5144
from __future__ import print_function, unicode_literals from io import BytesIO from django.core.files.uploadedfile import InMemoryUploadedFile from django.core.urlresolvers import reverse from ...base import ArticleWebTestBase class AttachmentTests(ArticleWebTestBase): def setUp(self): super(Attachmen...
gpl-3.0
-6,666,807,190,074,797,000
38.267176
105
0.613142
false
nashve/mythbox
resources/test/mythboxtest/test_util.py
7
20061
# # MythBox for XBMC - http://mythbox.googlecode.com # Copyright (C) 2011 analogue@yahoo.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 2 # of the License, or (at you...
gpl-2.0
-3,710,604,490,268,070,400
33.647668
111
0.592742
false
GuillaumeArruda/INF8601
inf8601-lab1-2.1.0/preprocess.py
1
1847
#!/usr/bin/python # # Utilitaire pour pre-traiter les resultats # import os # variables out_dir = "results" base = "time_dragonizer" suffix = ".data" def get_or_create(data, key): if (data.has_key(key) == False): data[key] = {} return data[key] def get_or_create_path(data, path_elem): if (len(path_elem) == 0):...
bsd-3-clause
8,409,487,106,045,258,000
20
95
0.583649
false
Nikea/VisTrails
vistrails/packages/spreadsheet/identifiers.py
2
2038
############################################################################### ## ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary for...
bsd-3-clause
-1,406,114,170,187,111,400
51.25641
79
0.694308
false
ximion/dak-dep11
dak/dakdb/__init__.py
10
1046
""" Database update scripts for usage with B{dak update-db} @contact: Debian FTP Master <ftpmaster@debian.org> @copyright: 2008 Michael Casadevall <mcasadevall@debian.org> @license: GNU General Public License version 2 or later Update scripts have to C{import psycopg2} and C{from daklib.dak_exceptions import DBUpdat...
gpl-2.0
-2,345,485,469,892,615,700
30.69697
103
0.724665
false
eHealthAfrica/kivy
doc/sources/sphinxext/kivy_pygments_theme.py
76
4901
# kivy pygments style based on flask/tango style from pygments.style import Style from pygments.token import Keyword, Name, Comment, String, Error, \ Number, Operator, Generic, Whitespace, Punctuation, Other, Literal class KivyStyle(Style): # The background color is set in kivystyle.sty background_color ...
mit
-4,367,947,800,891,669,000
55.333333
83
0.43685
false
pasiegel/SickGear
lib/httplib2/iri2uri.py
885
3850
""" iri2uri Converts an IRI to a URI. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright 2006, Joe Gregorio" __contributors__ = [] __version__ = "1.0.0" __license__ = "MIT" __history__ = """ """ import urlparse # Convert an IRI to a URI following the rules in RFC 3987 # # The characte...
gpl-3.0
-3,257,524,625,244,531,000
34
143
0.577403
false
mattdm/dnf
tests/cli/commands/test_repolist.py
13
1450
# Copyright (C) 2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that it will be u...
gpl-2.0
4,768,809,572,409,078,000
45.774194
77
0.737931
false
liqi328/rjrepaircompany
django/views/debug.py
152
33304
import datetime import os import re import sys import types from django.conf import settings from django.http import HttpResponse, HttpResponseServerError, HttpResponseNotFound from django.template import (Template, Context, TemplateDoesNotExist, TemplateSyntaxError) from django.template.defaultfilters import forc...
bsd-3-clause
7,366,467,150,473,565,000
36.252796
251
0.567529
false
chrsrds/scikit-learn
sklearn/utils/tests/test_murmurhash.py
21
2637
# Author: Olivier Grisel <olivier.grisel@ensta.org> # # License: BSD 3 clause import numpy as np from sklearn.utils.murmurhash import murmurhash3_32 from numpy.testing import assert_array_almost_equal from numpy.testing import assert_array_equal def test_mmhash3_int(): assert murmurhash3_32(3) == 847579505 a...
bsd-3-clause
2,422,765,077,143,993,000
32.807692
73
0.649602
false
hasteur/pywikibot_minimal
userinterfaces/wxpython_interface.py
5
1983
# -*- coding: utf-8 -*- __version__ = '$Id: 139dc689ef6baf1ed224d300766f7b7ea658cb0f $' import sys; sys.path.append('..') import re import terminal_interface import wx app = wx.App() class UI(terminal_interface.UI): def __init__(self): pass def input(self, question, password = False): """...
gpl-3.0
1,778,477,801,946,137,600
29.507692
85
0.539586
false
nagyistoce/photivo
scons-local-2.2.0/SCons/Sig.py
14
2392
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 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 ...
gpl-3.0
6,336,382,951,117,591,000
36.968254
107
0.747492
false
nortikin/sverchok
old_nodes/formula3.py
2
6928
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
gpl-3.0
-510,673,312,216,223,700
33.29703
108
0.597142
false
lebabouin/CouchPotatoServer-develop
libs/apscheduler/events.py
144
2529
__all__ = ('EVENT_SCHEDULER_START', 'EVENT_SCHEDULER_SHUTDOWN', 'EVENT_JOBSTORE_ADDED', 'EVENT_JOBSTORE_REMOVED', 'EVENT_JOBSTORE_JOB_ADDED', 'EVENT_JOBSTORE_JOB_REMOVED', 'EVENT_JOB_EXECUTED', 'EVENT_JOB_ERROR', 'EVENT_JOB_MISSED', 'EVENT_ALL', 'SchedulerEvent', 'JobStoreEve...
gpl-3.0
5,887,494,801,201,595,000
38.515625
77
0.651246
false
gandelman-a/neutron-lbaas
neutron_lbaas/db/migration/alembic_migrations/versions/lbaasv2_tls.py
2
1818
# Copyright 2014 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 ...
apache-2.0
-6,743,117,577,527,176,000
32.666667
79
0.656766
false
BlueLens/bl-magi
tensorflow/object_detection/core/data_decoder.py
23
1349
# 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
7,267,388,480,411,811,000
31.902439
80
0.691623
false
CPFDSoftware-Tony/gmv
utils/Mesa/Mesa-7.8.2/src/mesa/glapi/gen/glX_proto_common.py
46
3187
#!/usr/bin/env python # (C) Copyright IBM Corporation 2004, 2005 # All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # ...
gpl-3.0
8,913,654,087,662,473,000
32.547368
119
0.700031
false
jjlee3/openthread
tools/harness-automation/cases/sed_6_2_1.py
16
1869
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread 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: # 1. Redistributions of source code must retain the above copyright # notic...
bsd-3-clause
7,710,960,796,185,131,000
42.465116
77
0.761905
false
pombreda/pydbgr
test/unit/test-lib-pp.py
2
1146
#!/usr/bin/env python 'Unit test for trepan.lib.pp' import sys, unittest from import_relative import import_relative Mpp = import_relative('lib.pp', '...trepan') class TestLibPrint(unittest.TestCase): def setUp(self): self.msgs = [] return def msg_nocr(self, msg): if len(self.msgs) >...
gpl-3.0
-6,388,232,659,384,870,000
25.651163
77
0.486038
false
wbc2010/django1.2.5
django/contrib/gis/tests/relatedapp/models.py
274
1686
from django.contrib.gis.db import models from django.contrib.localflavor.us.models import USStateField class Location(models.Model): point = models.PointField() objects = models.GeoManager() def __unicode__(self): return self.point.wkt class City(models.Model): name = models.CharField(max_length=50) ...
bsd-3-clause
-8,259,624,150,393,543,000
33.408163
71
0.718861
false
ffsdmad/flask
flask/sessions.py
142
14369
# -*- coding: utf-8 -*- """ flask.sessions ~~~~~~~~~~~~~~ Implements cookie based sessions based on itsdangerous. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import uuid import hashlib from base64 import b64encode, b64decode from datetime import dateti...
bsd-3-clause
-1,368,299,697,797,057,500
38.367123
78
0.633934
false
sergiohgz/incubator-airflow
airflow/contrib/operators/file_to_gcs.py
11
2717
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
2,023,192,556,342,664,000
35.226667
81
0.659551
false
ccastell/Transfer-System
Website/env/lib/python3.5/site-packages/setuptools/config.py
41
16088
from __future__ import absolute_import, unicode_literals import io import os import sys from collections import defaultdict from functools import partial from distutils.errors import DistutilsOptionError, DistutilsFileError from setuptools.py26compat import import_module from six import string_types def read_configu...
apache-2.0
4,815,054,866,127,711,000
28.357664
79
0.58901
false
alvarolopez/nova
nova/tests/functional/v3/test_personality.py
27
1690
# Copyright 2014 NEC 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 required ...
apache-2.0
4,473,753,454,628,555,000
39.238095
78
0.631361
false
bmedx/modulestore
xmodule/modulestore/xml.py
1
41091
import hashlib import itertools import json import logging import os import re import sys import glob from collections import defaultdict from cStringIO import StringIO from fs.osfs import OSFS from importlib import import_module from lxml import etree from path import Path as path from contextlib import contextmanage...
apache-2.0
-8,191,310,183,252,698,000
41.758585
116
0.5738
false
oliverlee/sympy
sympy/simplify/tests/test_radsimp.py
54
15672
from sympy import ( sqrt, Derivative, symbols, collect, Function, factor, Wild, S, collect_const, log, fraction, I, cos, Add, O,sin, rcollect, Mul, radsimp, diff, root, Symbol, Rational, exp) from sympy.core.mul import _unevaluated_Mul as umul from sympy.simplify.radsimp import _unevaluated_Add, collect_sq...
bsd-3-clause
9,051,167,112,974,182,000
37.506143
103
0.483474
false
beacloudgenius/edx-platform
common/lib/xmodule/xmodule/modulestore/split_mongo/split.py
4
146687
""" Provides full versioning CRUD and representation for collections of xblocks (e.g., courses, modules, etc). Representation: * course_index: a dictionary: ** '_id': a unique id which cannot change, ** 'org': the org's id. Only used for searching not identity, ** 'course': the course's catalog number ...
agpl-3.0
6,737,075,030,125,442,000
46.030138
148
0.619278
false
jlspyaozhongkai/Uter
third_party_backup/Python-2.7.9/Lib/distutils/util.py
64
18037
"""distutils.util Miscellaneous utility functions -- anything that doesn't fit into one of the other *util.py modules. """ __revision__ = "$Id$" import sys, os, string, re from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer from distutils.spawn import spawn from distutils import ...
gpl-3.0
3,959,175,467,869,095,400
36.813417
78
0.593835
false
ukanga/SickRage
lib/unidecode/x053.py
252
4616
data = ( 'Yun ', # 0x00 'Mwun ', # 0x01 'Nay ', # 0x02 'Gai ', # 0x03 'Gai ', # 0x04 'Bao ', # 0x05 'Cong ', # 0x06 '[?] ', # 0x07 'Xiong ', # 0x08 'Peng ', # 0x09 'Ju ', # 0x0a 'Tao ', # 0x0b 'Ge ', # 0x0c 'Pu ', # 0x0d 'An ', # 0x0e 'Pao ', # 0x0f 'Fu ', # 0x10 'Gong...
gpl-3.0
4,043,379,063,715,317,000
16.891473
20
0.385832
false
harryface/__1255548754516tftffvvgcgvgvg
blog/models.py
1
1433
from django.db import models from django.core.urlresolvers import reverse from django.template.defaultfilters import slugify # Create your models here. class Post (models.Model): title = models.CharField(max_length=40) post_image = models.ImageField(upload_to='static/blog', blank=True) post_body = models.TextField...
gpl-3.0
6,466,841,042,400,070,000
28.854167
68
0.702024
false
EmreAtes/spack
var/spack/repos/builtin/packages/py-numpydoc/package.py
5
1666
############################################################################## # 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
3,121,282,381,666,192,000
42.842105
81
0.668067
false
ovnicraft/openerp-restaurant
account_analytic_analysis/__openerp__.py
5
2322
# -*- 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
6,465,169,549,217,939,000
42.811321
167
0.607666
false
parasite-genomics/Pipelines
HDR.py
1
5656
#! /usr/bin/env python # input parameters header = raw_input('\nhdr: header (1=Yes, 0=No) ?\n') pos_diff = raw_input('hdr: distance (clustering condition) ?\n') cl_size = raw_input('hdr: min cluster size ?\n') collapse_size = raw_input('hdr: min distance to collapse clusters ?\n\n') infile = raw_input('hdr: data filen...
apache-2.0
2,826,194,213,626,824,700
30.775281
168
0.588402
false
BrianVermeire/PyFR
pyfr/backends/mic/base.py
1
2224
# -*- coding: utf-8 -*- import numpy as np from pyfr.backends.base import BaseBackend from pyfr.mpiutil import get_local_rank class MICBackend(BaseBackend): name = 'mic' def __init__(self, cfg): super().__init__(cfg) import pymic as mic # Get the device ID to use devid = c...
bsd-3-clause
9,032,759,632,791,448,000
29.054054
73
0.605216
false
nikoonia/gem5v
src/mem/cache/BaseCache.py
2
4044
# Copyright (c) 2012 ARM Limited # 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 implementation of the functionality ...
bsd-3-clause
5,254,601,891,568,060,000
50.846154
95
0.748269
false
tomaaron/raiden
raiden/tests/integration/test_endpointregistry.py
1
1619
# -*- coding: utf-8 -*- import pytest from raiden.utils import make_address, get_contract_path, privatekey_to_address from raiden.network.discovery import ContractDiscovery @pytest.mark.timeout(60) @pytest.mark.parametrize('number_of_nodes', [1]) @pytest.mark.parametrize('poll_timeout', [80]) def test_endpointregist...
mit
5,253,662,074,478,240,000
34.977778
85
0.717727
false
naufraghi/python-xlib
examples/childwin.py
3
3884
#!/usr/bin/python # # examples/childwin.py -- demonstrate child windows. # # Copyright (C) 2008 David Bronke <whitelynx@gmail.com> # Copyright (C) 2002 Peter Liljenberg <petli@ctrl-c.liu.se> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
gpl-2.0
5,014,648,783,476,027,000
25.60274
75
0.685891
false
btat/Booktype
lib/booktype/apps/edit/views.py
1
8544
# -*- coding: utf-8 -*- import datetime from django.shortcuts import render from django.http import HttpResponse from django.views.generic.base import TemplateView from django.views.generic.edit import FormView from django.contrib.auth.decorators import login_required from django.db import transaction from django.c...
agpl-3.0
-8,694,282,274,470,353,000
31.486692
117
0.537102
false
isyippee/nova
nova/api/openstack/compute/legacy_v2/contrib/flavorextradata.py
79
2440
# Copyright 2012 OpenStack Foundation # Copyright 2011 Canonical Ltd. # 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/license...
apache-2.0
-1,295,964,825,014,951,700
32.888889
79
0.672951
false
levkar/odoo
addons/hr_gamification/models/gamification.py
53
1560
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ from odoo.exceptions import ValidationError class GamificationBadgeUser(models.Model): """User having received a badge""" _inherit = 'gamification.badge.user' employ...
agpl-3.0
1,783,225,624,214,515,500
34.454545
107
0.61859
false
oliciv/youtube-dl
youtube_dl/extractor/niconico.py
34
10884
# encoding: utf-8 from __future__ import unicode_literals import re import json import datetime from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, compat_urlparse, ) from ..utils import ( encode_dict, ExtractorError, int_or_none, parse_dura...
unlicense
7,321,571,327,455,925,000
36.54386
107
0.536916
false
sheepray/volatility
volatility/debug.py
54
2718
# Volatility # # Authors: # Michael Cohen <scudette@users.sourceforge.net> # # This file is part of Volatility. # # Volatility 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, o...
gpl-2.0
-4,050,821,007,880,072,000
27.3125
83
0.66078
false
fran-penedo/dreal
benchmarks/network/water/water-triple-sat.py
11
6919
from gen import * ########## # shared # ########## flow_var[0] = """ (declare-fun tau () Real) (declare-fun x1 () Real) (declare-fun x2 () Real) (declare-fun x3 () Real) """ flow_dec[0] = """ (define-ode flow_1 ((= d/dt[x1] (/ (- 5 (* (* 0.5 (^ (* 2 9.80665) 0.5)) (^ x1 0.5))) 2)) (= d/dt[x2] (...
gpl-3.0
-4,044,990,345,191,179,300
46.068027
105
0.378523
false
qrkourier/ansible
test/runner/lib/cloud/vcenter.py
32
4693
"""VMware vCenter plugin for integration tests.""" from __future__ import absolute_import, print_function import os from lib.cloud import ( CloudProvider, CloudEnvironment, ) from lib.util import ( find_executable, display, ) from lib.docker_util import ( docker_run, docker_rm, docker_in...
gpl-3.0
7,281,832,709,858,727
29.875
103
0.597912
false
userbz/DeMix
deprecated/Version_0/post1_psmMzmlExtend.py
1
1529
# Bo.Zhang@ki.se # extending PSM list from second-pass Morpheus search for rescoring import sys import pymzml import numpy import pandas def nearest(target, arr): try: return arr[numpy.abs(arr - target).argmin()] except: return 0 def peak_pair(target, arr): match = [nearest(p, arr) for ...
mit
-8,807,728,232,289,719,000
27.314815
82
0.581426
false
jamessergeant/pylearn2
pylearn2/models/mnd.py
49
4148
__authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2010-2012, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" __email__ = "pylearn-dev@googlegroups" from pylearn2.models.model import Model from pylearn2.utils import sharedX import numpy as np impo...
bsd-3-clause
1,736,454,755,651,706,400
23.544379
108
0.543877
false
alexandrujuncu/sos
sos/plugins/openstack_cinder.py
7
3713
# Copyright (C) 2009 Red Hat, Inc., Joey Boggs <jboggs@redhat.com> # Copyright (C) 2012 Rackspace US, Inc., # Justin Shepherd <jshepher@rackspace.com> # Copyright (C) 2013 Red Hat, Inc., Flavio Percoco <fpercoco@redhat.com> # Copyright (C) 2013 Red Hat, Inc., Jeremy Agee <jagee@redhat.com> # This pr...
gpl-2.0
-1,731,386,573,558,909,000
34.701923
78
0.615675
false
thnee/ansible
test/units/modules/network/onyx/test_onyx_config.py
52
4615
# # (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 d...
gpl-3.0
2,875,707,111,714,440,700
39.840708
95
0.668039
false
thaim/ansible
lib/ansible/modules/network/cli/cli_config.py
12
15208
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2018, Ansible by Red Hat, 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', ...
mit
5,749,796,634,679,694,000
37.02
102
0.640452
false
Hao-Liu/avocado
selftests/unit/test_test.py
1
3380
import os import shutil import sys import tempfile if sys.version_info[:2] == (2, 6): import unittest2 as unittest else: import unittest from avocado.core import test from avocado.utils import script PASS_SCRIPT_CONTENTS = """#!/bin/sh true """ FAIL_SCRIPT_CONTENTS = """#!/bin/sh false """ class TestClass...
gpl-2.0
-4,183,118,659,968,977,000
29.178571
78
0.647633
false
kenshay/ImageScript
Script_Runner/PYTHON/Lib/asyncio/__init__.py
11
1169
"""The asyncio package, tracking PEP 3156.""" # flake8: noqa import sys # This relies on each of the submodules having an __all__ variable. from .base_events import * from .coroutines import * from .events import * from .futures import * from .locks import * from .protocols import * from .runners import * from .queu...
gpl-3.0
-6,933,559,168,201,933,000
26.186047
67
0.597092
false
Immortalin/python-for-android
python-modules/twisted/twisted/internet/test/test_sigchld.py
57
6405
# Copyright (c) 2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.internet._sigchld}, an alternate, superior SIGCHLD monitoring API. """ import os, signal, errno from twisted.python.log import msg from twisted.trial.unittest import TestCase from twisted.internet.fdesc import setNon...
apache-2.0
7,060,507,171,541,949,000
32.015464
86
0.673224
false
bill307/shadowsocks
shadowsocks/udprelay.py
924
11154
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # 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
1,048,021,492,007,610,000
36.42953
79
0.522234
false
h3biomed/luigi
test/task_bulk_complete_test.py
23
2415
# -*- coding: utf-8 -*- # # Copyright 2012-2016 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
5,908,627,239,619,803,000
32.082192
77
0.626915
false
skipmodea1/plugin.video.xbmctorrent
resources/site-packages/xbmcswift2/constants.py
34
1517
''' xbmcswift2.constants -------------------- This module contains some helpful constants which ease interaction with XBMC. :copyright: (c) 2012 by Jonathan Beluch :license: GPLv3, see LICENSE for more details. ''' from xbmcswift2 import xbmcplugin class SortMethod(object): '''Static cla...
gpl-3.0
813,392,352,394,320,100
26.581818
78
0.626236
false
rembish/homebank-wui
setup.py
1
1175
#!/usr/bin/env python try: from debian.changelog import Changelog except ImportError: class Changelog(object): def __init__(self, _): pass def get_version(self): return '0.0.0' from os import environ from os.path import abspath, dirname, join from setuptools import setu...
bsd-3-clause
-3,587,321,774,359,501,000
26.97619
67
0.680851
false
retomerz/intellij-community
python/helpers/pydev/pydevd_attach_to_process/winappdbg/plugins/do_exchain.py
100
2307
#!~/.wine/drive_c/Python25/python.exe # -*- coding: utf-8 -*- # Command line debugger using WinAppDbg # Show exception handlers list # Copyright (c) 2009-2014, Mario Vilas # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the follo...
apache-2.0
4,470,851,515,370,550,300
44.235294
78
0.723884
false
SDSG-Invenio/invenio
invenio/legacy/websubmit/functions/Create_Cplx_Approval.py
13
2580
# This file is part of Invenio. # Copyright (C) 2007, 2008, 2010, 2011 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version...
gpl-2.0
-8,389,924,635,247,771,000
39.952381
208
0.637209
false
jendap/tensorflow
tensorflow/contrib/constrained_optimization/__init__.py
39
1769
# 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
2,363,229,631,372,063,000
42.146341
97
0.755794
false
polimediaupv/edx-platform
lms/djangoapps/mobile_api/social_facebook/friends/views.py
85
2439
""" Views for friends info API """ from rest_framework import generics, status from rest_framework.response import Response from opaque_keys.edx.keys import CourseKey from student.models import CourseEnrollment from ...utils import mobile_view from ..utils import get_friends_from_facebook, get_linked_edx_accounts,...
agpl-3.0
6,118,930,369,995,769,000
33.352113
99
0.619926
false
kalxas/QGIS
tests/src/python/test_qgslayout.py
30
25611
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsLayout .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. """ __author...
gpl-2.0
8,026,214,443,893,001,000
42.630324
120
0.63051
false
ajayuranakar/django-blog
lib/python2.7/site-packages/django/contrib/gis/db/backends/oracle/schema.py
608
4050
from django.contrib.gis.db.models.fields import GeometryField from django.db.backends.oracle.schema import DatabaseSchemaEditor from django.db.backends.utils import truncate_name class OracleGISSchemaEditor(DatabaseSchemaEditor): sql_add_geometry_metadata = (""" INSERT INTO USER_SDO_GEOM_METADATA ...
gpl-3.0
-2,177,810,938,389,110,300
42.085106
110
0.574074
false
Spoken-tutorial/spoken-website
spoken/forms.py
1
13015
# Third Party Stuff from builtins import str from builtins import object from django import forms from django.db.models import Count, Q from django.core.exceptions import ValidationError # Spoken Tutorial Stuff from creation.models import TutorialResource, FossCategory from events.models import Testimonials, Induction...
gpl-3.0
2,821,970,917,344,296,400
40.983871
195
0.612678
false
kingvuplus/ops
lib/python/Plugins/SystemPlugins/PositionerSetup/rotor_calc.py
103
3251
import math f = 1.00 / 298.257 # Earth flattning factor r_sat = 42164.57 # Distance from earth centre to satellite r_eq = 6378.14 # Earth radius def calcElevation(SatLon, SiteLat, SiteLon, Height_over_ocean = 0): a0 = 0.58804392 a1 = -0.17941557 a2 = 0.29906946E-1 a3 = -0.25187400E-2 a4 = 0.82622101E-4 sin...
gpl-2.0
-4,139,710,512,510,913,000
30.872549
139
0.6761
false
sosguns2002/interactive-mining
interactive-mining-3rdparty-madis/madis/src/lib/pyparsing.py
16
148777
# module pyparsing.py # # Copyright (c) 2003-2009 Paul T. McGuire # # 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, cop...
gpl-3.0
-1,239,853,966,849,515,300
39.134071
196
0.579491
false
t-abe/chainer
cupy/statistics/order.py
5
1527
def amin(a, axis=None, out=None, keepdims=False, dtype=None): """Returns the minimum of an array or the minimum along an axis. Args: a (cupy.ndarray): Array to take the minimum. axis (int): Along which axis to take the minimum. The flattened array is used by default. out (cu...
mit
7,753,610,196,416,544,000
28.365385
78
0.641126
false
jayceyxc/hue
desktop/core/ext-py/markdown/markdown/extensions/meta.py
131
2607
#!usr/bin/python """ Meta Data Extension for Python-Markdown ======================================= This extension adds Meta Data handling to markdown. Basic Usage: >>> import markdown >>> text = '''Title: A Test Doc. ... Author: Waylan Limberg ... John Doe ... Blank_Data: ... ....
apache-2.0
6,585,165,450,887,962,000
27.966667
99
0.550058
false
feliperfranca/FelipeRFranca_site
django/utils/regex_helper.py
361
12079
""" Functions for reversing a regular expression (used in reverse URL resolving). Used internally by Django and not intended for external use. This is not, and is not intended to be, a complete reg-exp decompiler. It should be good enough for a large class of URLS, however. """ # Mapping of an escape character to a r...
bsd-3-clause
-1,002,015,803,856,431,100
35.82622
92
0.529597
false
EvanK/ansible
lib/ansible/plugins/action/win_updates.py
29
11371
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import json from ansible.errors import AnsibleError from ansible.module_utils._text import to_text from ansible.module_utils.parsing.convert_bool import boolean from ansible.parsing.yaml.objects import AnsibleUnicode from ansible....
gpl-3.0
1,373,571,826,655,175,000
43.767717
84
0.538299
false
sgraham/nope
third_party/WebKit/Tools/Scripts/webkitpy/common/config/irc.py
69
1467
# 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 of conditions and the ...
bsd-3-clause
-1,400,397,587,322,919,700
44.84375
72
0.776414
false
liuyxpp/blohg
blohg/ext.py
2
5784
# -*- coding: utf-8 -*- """ blohg.ext ~~~~~~~~~ Blohg support for 3rd-party extensions. :copyright: (c) 2010-2013 by Rafael Goncalves Martins :license: GPL-2, see LICENSE for more details. """ from flask import Blueprint from flask.ctx import _app_ctx_stack from flask.globals import current_app f...
gpl-2.0
1,652,727,090,836,489,500
34.484663
80
0.585235
false
Valloric/ycmd
ycmd/tests/clang/include_cache_test.py
5
6642
# Copyright (C) 2017 Davit Samvelyan davitsamvelyan@gmail.com # Synopsys. # # This file is part of ycmd. # # ycmd 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 Lice...
gpl-3.0
1,417,040,507,530,320,400
40.5125
76
0.45935
false