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
ingadhoc/openerp-travel
travel/tests/test_travel.py
2
7477
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2013 Savoir-faire Linux # (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or m...
agpl-3.0
5,107,808,570,240,683,000
40.309392
78
0.566537
false
DougFirErickson/neon
examples/babi/util.py
4
3310
# ---------------------------------------------------------------------------- # Copyright 2015 Nervana 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.o...
apache-2.0
-5,692,681,496,997,404,000
33.479167
92
0.645015
false
MakarenaLabs/Orator-Google-App-Engine
orator/dbal/sqlite_schema_manager.py
1
2801
# -*- coding: utf-8 -*- import re from .schema_manager import SchemaManager from .platforms.sqlite_platform import SQLitePlatform from .column import Column class SQLiteSchemaManager(SchemaManager): def _get_portable_table_column_definition(self, table_column): parts = table_column['type'].split('(') ...
mit
4,539,920,076,825,593,300
29.11828
101
0.546233
false
tjsavage/djangononrel-starter
django/db/backends/oracle/base.py
12
28766
""" Oracle database backend for Django. Requires cx_Oracle: http://cx-oracle.sourceforge.net/ """ import datetime import os import sys import time from decimal import Decimal # Oracle takes client-side character set encoding from the environment. os.environ['NLS_LANG'] = '.UTF8' # This prevents unicode from getting...
bsd-3-clause
-2,027,966,672,640,528,000
39.802837
126
0.593826
false
daviswr/ZenPacks.daviswr.ZFS
ZenPacks/daviswr/ZFS/__init__.py
1
2528
import re import sys from ZenPacks.zenoss.ZenPackLib import zenpacklib # https://www.skills-1st.co.uk/papers/jane/zpdevguide/ZenPack_DevGuide_V1.0.1_publish1_20161013.pdf # noqa # https://github.com/cluther/ZenPacks.example.EvaluatedCommandModeler from Products.ZenUtils.Utils import monkeypatch from Products.ZenUtils...
mit
-3,321,025,650,586,362,000
36.731343
107
0.620253
false
pizzathief/scipy
scipy/odr/tests/test_odr.py
2
17853
# SciPy imports. import numpy as np from numpy import pi from numpy.testing import (assert_array_almost_equal, assert_equal, assert_warns) from pytest import raises as assert_raises from scipy.odr import (Data, Model, ODR, RealData, OdrStop, OdrWarning, multilinear, exp...
bsd-3-clause
-4,048,994,963,251,669,000
36.664557
98
0.522545
false
openstack/watcher-dashboard
watcher_dashboard/content/audit_templates/views.py
1
4844
# Copyright (c) 2016 b<>com # # 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, softw...
apache-2.0
-4,823,441,813,257,277,000
35.149254
76
0.651941
false
Robpol86/general
tests/convert_music/test_find_empty_dirs.py
1
2409
from convert_music import find_empty_dirs def test_no_dirs(tmpdir): """Test when mp3 dir has nothing at all in it.""" mp3_dir = tmpdir.mkdir('mp3') expected = [] actual = find_empty_dirs(str(mp3_dir.realpath())) assert expected == actual def test_files_only(tmpdir): """Test when mp3 dir just...
mit
-5,558,701,239,900,072,000
38.491803
113
0.651723
false
neubot/neubot-client
neubot/negotiate/server_speedtest.py
2
3664
# neubot/negotiate/server_speedtest.py # # Copyright (c) 2011 Simone Basso <bassosimone@gmail.com>, # NEXA Center for Internet & Society at Politecnico di Torino # # This file is part of Neubot <http://www.neubot.org/>. # # Neubot is free software: you can redistribute it and/or modify # it under the terms of the GNU...
gpl-3.0
7,397,734,455,039,038,000
36.010101
75
0.644378
false
takaakiaoki/PyFoam
PyFoam/Applications/APoMaFoXiiQt.py
3
10853
""" Application-class that implements pyFoamAPoMaFoX.py (A Poor Man's FoamX) """ from os import path import sys from PyFoam.Applications.PyFoamApplication import PyFoamApplication from PyFoam.Applications.CaseBuilderBackend import CaseBuilderFile,CaseBuilderDescriptionList from PyFoam.Applications.CommonCaseBuilder im...
gpl-2.0
7,947,026,444,969,829,000
32.915625
109
0.592186
false
KanoComputing/make-snake
snake-editor/stage.py
1
1596
#!/usr/bin/env python # stage.py # # Copyright (C) 2014 Kano Computing Ltd. # License: http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2 # import console import math import time import os from gtk import gdk from kano.window import _get_window_by_child_pid, gdk_window_settings def init(): g...
gpl-2.0
-1,772,000,586,387,063,000
25.6
80
0.631579
false
ABaldwinHunter/django-clone-classic
django/contrib/gis/geos/libgeos.py
6
6956
""" This module houses the ctypes initialization procedures, as well as the notice and error handler function callbacks (get called when an error occurs in GEOS). This module also houses GEOS Pointer utilities, including get_pointer_arr(), and GEOM_PTR. """ import logging import os import re import threading from...
bsd-3-clause
3,881,259,770,439,313,000
30.762557
94
0.655549
false
chrislit/abydos
abydos/phonetic/_phonex.py
1
5895
# Copyright 2014-2020 by Christopher C. Little. # This file is part of Abydos. # # Abydos 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 versio...
gpl-3.0
6,297,073,751,688,029,000
27.205742
78
0.472943
false
billiob/papyon
papyon/gnet/io/sock.py
2
3728
# -*- coding: utf-8 -*- # # Copyright (C) 2005 Ole André Vadla Ravnås <oleavr@gmail.com> # Copyright (C) 2006-2007 Ali Sabil <ali.sabil@gmail.com> # Copyright (C) 2007 Johann Prieur <johann.prieur@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Gene...
gpl-2.0
8,719,866,632,957,982,000
34.150943
77
0.584004
false
lixiangning888/whole_project
modules/signatures/antivm_vmware_keys.py
3
1147
# -*- coding: utf-8 -*- # Copyright (C) 2014 Accuvant, Inc. (bspengler@accuvant.com) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any ...
lgpl-3.0
-5,280,191,833,947,633,000
37.862069
94
0.693878
false
cyberark-bizdev/ansible
lib/ansible/modules/network/ios/ios_vrf.py
13
16264
#!/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 distribut...
gpl-3.0
5,526,029,364,138,630,000
31.015748
109
0.606062
false
oVirt/ovirt-node
src/ovirt/node/setup/core/ping.py
2
4719
#!/usr/bin/python # -*- coding: utf-8 -*- # # ping_page.py - Copyright (C) 2012 Red Hat, Inc. # Written by Fabian Deutsch <fabiand@redhat.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; v...
gpl-2.0
80,697,676,256,242,960
32.468085
79
0.57046
false
spencerpomme/coconuts-on-fire
intSet.py
1
1398
class intSet(object): """An intSet is a set of integers The value is represented by a list of ints, self.vals. Each int in the set occurs in self.vals exactly once.""" def __init__(self): """Create an empty set of integers""" self.vals = [] def insert(self, e): """Assumes e...
apache-2.0
1,552,189,489,668,418,600
30.772727
86
0.565808
false
lidavidm/sympy
sympy/functions/elementary/tests/test_trigonometric.py
2
31879
from sympy import (symbols, Symbol, nan, oo, zoo, I, sinh, sin, acot, pi, atan, acos, Rational, sqrt, asin, acot, cot, coth, E, S, tan, tanh, cos, cosh, atan2, exp, log, asinh, acoth, atanh, O, cancel, Matrix, re, im, Float, Pow, gcd, sec, csc, cot, diff, simplify, Heaviside, arg, conjugate) fr...
bsd-3-clause
-4,128,740,282,095,562,000
31.69641
105
0.517896
false
neopenx/Dragon
Dragon/python/dragon/memonger.py
1
1374
# -------------------------------------------------------- # Dragon # Copyright(c) 2017 SeetaTech # Written by Ting Pan # -------------------------------------------------------- def ShareGrads(enabled=True): """Enable gradients sharing globally. Parameters ---------- enabled : boolean Whether...
bsd-2-clause
7,309,461,154,045,384,000
22.706897
93
0.529112
false
sanyi/awsutils
awsutils/sqs/message.py
1
1549
# awsutils/sqs/message.py # Copyright 2013 Sandor Attila Gerendi (Sanyi) # # This module is part of awsutils and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import time from awsutils.exceptions.aws import UserInputException class SQSMessage: def __init__(self, messageB...
mit
-1,632,423,533,953,449,500
35.880952
110
0.699161
false
pygeek/django
tests/regressiontests/localflavor/de/tests.py
14
1885
from __future__ import unicode_literals from django.contrib.localflavor.de.forms import (DEZipCodeField, DEStateSelect, DEIdentityCardNumberField) from django.test import SimpleTestCase class DELocalFlavorTests(SimpleTestCase): def test_DEStateSelect(self): f = DEStateSelect() out = '''<sele...
bsd-3-clause
-552,282,568,406,641,340
35.960784
109
0.679576
false
davidsanchez/CTAtools
Simulations/simulation.py
1
4640
# ------ Imports --------------- # from ebltable.tau_from_model import OptDepth as OD import os,sys,numpy from os.path import join import ctools from ctoolsAnalysis.config import get_config,get_default_config from ctoolsAnalysis.LikeFit import CTA_ctools_analyser from Script.Common_Functions import * from Script.Utils ...
gpl-3.0
3,105,693,044,302,928,000
31
189
0.646767
false
jtk54/spinnaker
dev/validate_bom__config.py
1
39074
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
1,387,266,455,685,102,300
37.763889
95
0.656088
false
crobby/sahara
sahara/utils/remote.py
10
5045
# Copyright (c) 2013 Mirantis Inc. # Copyright (c) 2013 Hortonworks, 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...
apache-2.0
-1,376,785,825,670,762,200
31.548387
79
0.647374
false
ipdcode/skydns
kdns/dpdk-17.02/usertools/cpu_layout.py
5
3591
#!/usr/bin/env python # # BSD LICENSE # # Copyright(c) 2010-2014 Intel Corporation. All rights reserved. # 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...
mit
-1,481,177,172,915,420,400
35.642857
76
0.642718
false
cedadev/cis
cis/test/unit/test_hyperpoint.py
3
9132
""" Module to test the collocation routines """ from cis.data_io.hyperpoint import HyperPoint from nose.tools import assert_almost_equal, istest, eq_ @istest def test_same_point_in_space_and_time_with_points_with_different_values(): assert (HyperPoint(lat=10.0, lon=50.0, val=14.4).same_point_in_space_and_time( ...
lgpl-3.0
8,069,184,961,615,374,000
38.704348
115
0.681669
false
Acidburn0zzz/readthedocs.org
readthedocs/urls.py
2
5810
from django.conf.urls.defaults import url, patterns, include from django.contrib import admin from django.conf import settings from django.views.generic.simple import direct_to_template from tastypie.api import Api from api.base import (ProjectResource, UserResource, BuildResource, VersionResour...
mit
-6,009,901,939,163,871,000
41.101449
144
0.624441
false
soarpenguin/ansible
lib/ansible/modules/network/netvisor/pn_vlag.py
59
10765
#!/usr/bin/python """ PN CLI vlag-create/vlag-delete/vlag-modify """ # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your...
gpl-3.0
-5,425,393,068,046,331,000
30.023055
80
0.613562
false
django-leonardo/django-leonardo
leonardo/module/devel/widget/clientinfo/models.py
2
1628
# -#- coding: utf-8 -#- from django.template import RequestContext from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from leonardo import messages from leonardo.forms import MultiSelectField from leonardo.module.web.models import Widget from .utils import add_...
bsd-3-clause
5,043,508,662,671,122,000
30.921569
93
0.603808
false
jessrosenfield/pants
src/python/pants/goal/task_registrar.py
5
2751
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import sys import tr...
apache-2.0
-7,935,429,179,296,964,000
40.681818
99
0.653581
false
openstack/neutron
neutron/tests/unit/plugins/ml2/drivers/test_type_vxlan.py
2
3496
# 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
8,049,927,088,233,817,000
39.651163
78
0.673341
false
Antonio-Team/enigma2
lib/python/Screens/ServiceStopScreen.py
6
1493
from Screens.MessageBox import MessageBox class ServiceStopScreen: def __init__(self): try: self.session except: print "[ServiceStopScreen] ERROR: no self.session set" self.oldref = None self.onClose.append(self.__onClose) def pipAvailable(self): # pip isn't available in every state of e2 try: ...
gpl-2.0
-9,218,145,415,870,601,000
26.648148
97
0.712659
false
killerstorm/ngcccbase
ngcccbase/deterministic.py
4
9293
import hashlib import hmac import os from pycoin.ecdsa.secp256k1 import generator_secp256k1 as BasePoint from pycoin.encoding import from_bytes_32, public_pair_to_bitcoin_address from address import AddressRecord, LooseAddressRecord from asset import AssetDefinition from coloredcoinlib import ColorSet class Determi...
mit
-5,803,803,244,992,301,000
38.88412
75
0.599914
false
fly19890211/edx-platform
common/lib/capa/capa/inputtypes.py
11
64641
# # File: courseware/capa/inputtypes.py # """ Module containing the problem elements which render into input objects - textline - textbox (aka codeinput) - schematic - choicegroup (aka radiogroup, checkboxgroup) - javascriptinput - imageinput (for clickable image) - optioninput (for option list) - filesubmission (...
agpl-3.0
-1,700,529,865,447,046,400
34.400329
136
0.56178
false
sho-h/ruby_env
devkit/mingw/bin/lib/json/__init__.py
3
14173
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. :mod:`json` exposes an API familiar to users of the standard library :mod:`marshal` and :mod:`pickle` modules. It is the externally maintained version of ...
mit
-3,087,991,006,439,876,000
39.80826
82
0.630142
false
bohdon/maya-quickmenus
src/quickmenus/scripts/quickmenus/qmenus/menus.py
1
16772
import logging import pymel.core as pm try: import resetter except: resetter = None import quickmenus __all__ = [ 'CameraQuickSwitchMenu', 'ComponentSelectionMaskingMenu', 'DisplayMaskingMenu', 'ResetterMenu', 'SelectionMaskingMenu', ] LOG = logging.getLogger('quickmenus') class ...
mit
4,980,898,991,851,953,000
43.136842
243
0.598974
false
drogenlied/qudi
hardware/awg/tektronix_awg5002c.py
1
57135
# -*- coding: utf-8 -*- """ This file contains the Qudi hardware module for AWG5000 Series. Qudi 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 ver...
gpl-3.0
6,518,244,005,501,435,000
41.103906
121
0.545165
false
quantmind/lux
tests/core/test_cache.py
1
3489
from unittest import skipUnless try: from redis import StrictRedis except ImportError: # pragma nocover StrictRedis = None from pulsar.api import ImproperlyConfigured from pulsar.apps.test import check_server from pulsar.utils.string import random_string from pulsar.apps.data.redis.client import RedisC...
bsd-3-clause
-5,759,654,982,690,471,000
30.432432
77
0.639438
false
aperigault/ansible
lib/ansible/modules/source_control/bitbucket/bitbucket_access_key.py
18
8916
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Evgeniy Krysanov <evgeniy.krysanov@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'm...
gpl-3.0
-6,451,170,308,698,137,000
30.284211
127
0.599372
false
eckardm/archivematica
src/dashboard/src/components/ingest/views_as.py
1
8870
import ast from functools import wraps import json import sys from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseRedirect, HttpResponseServerError from components import advanced_search from main import models sys.path.append("/usr/lib/archivematica...
agpl-3.0
-3,347,778,996,672,821,000
41.644231
203
0.664713
false
swartn/sam-vs-jet-paper
analysis_plotting/plot_seas_trends_1951_2011.py
1
19262
""" Plots seasonal trends over 1951 to 2011 of SAM and jet properties for various reanalyses and CMIP5. Outputs: -------- This script produces plots: 1. Trends in the above variables over 1951-2011. 2. The relationship between SAM and strength trends. 3. The relationship between SAM and trends in the other variable...
gpl-2.0
8,451,271,451,699,709,000
42.190583
88
0.533589
false
marbu/pylatest
tests/xsphinx/conftest.py
1
8986
# -*- coding: utf-8 -*- """ Sphinx conftest.py module for pytest, copied without modifications (with exception of this docstring and copying notice) from ``tests/conftest.py`` file of Sphinx project, commit 139e09d12023a255b206c1158487d215217be920. Done as a workaround for: https://github.com/sphinx-doc/sphinx/issues/...
gpl-3.0
4,330,400,934,318,240,300
30.41958
80
0.651013
false
wwchun123/sumatrapdf
scripts/update_auto_update_ver.py
19
4749
#!/usr/bin/env python import SquareTree import sys import urllib2 from util import load_config import s3 def getch_unix(): import sys, tty, termios fd = sys.stdin.fileno() old_settings = termios.tcgetattr(fd) try: tty.setraw(sys.stdin.fileno()) ch = sys.stdin.read(1) ...
gpl-3.0
-931,593,761,548,807,300
26.437126
131
0.58686
false
vorburger/mcedit2
src/mcedit2/rendering/scenegraph/depth_test.py
1
1496
""" depth_test """ from __future__ import absolute_import, division, print_function, unicode_literals import logging from OpenGL import GL from mcedit2.rendering.scenegraph.rendernode import RenderstateRenderNode from mcedit2.rendering.scenegraph.scenenode import Node log = logging.getLogger(__name__) class Dept...
bsd-3-clause
-6,395,307,032,541,451,000
24.355932
82
0.705882
false
lakshayg/tensorflow
tensorflow/contrib/distributions/python/ops/inverse_gamma.py
14
10451
# 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
3,149,243,629,071,600,000
34.07047
80
0.654961
false
roidayan/rtslib
rtslib/root.py
2
4998
''' Implements the RTSRoot class. This file is part of LIO(tm). Copyright (c) 2011-2014 by Datera, 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....
apache-2.0
-9,142,912,052,505,027,000
31.454545
78
0.590636
false
IDSIA/sacred
sacred/config/config_files.py
1
1710
#!/usr/bin/env python # coding=utf-8 import os import pickle import json import sacred.optional as opt from sacred.serializer import flatten, restore __all__ = ("load_config_file", "save_config_file") class Handler: def __init__(self, load, dump, mode): self.load = load self.dump = dump ...
mit
-2,056,052,895,043,427,600
24.147059
78
0.624561
false
allenta/varnish-bans-manager
varnish_bans_manager/core/tasks/bans.py
1
4654
# -*- coding: utf-8 -*- ''' :copyright: (c) 2012 by Allenta Consulting, see AUTHORS.txt for more details. :license: GPL, see LICENSE.txt for more details. ''' from __future__ import absolute_import from django.conf import settings from django.utils import timezone from templated_email import send_templated_mail from ...
gpl-3.0
-1,156,311,358,076,189,200
37.139344
86
0.562218
false
sorenk/ansible
contrib/inventory/rudder.py
46
10663
#!/usr/bin/env python # Copyright (c) 2015, Normation SAS # # Inspired by the EC2 inventory plugin: # https://github.com/ansible/ansible/blob/devel/contrib/inventory/ec2.py # # 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 Publ...
gpl-3.0
663,702,047,180,933,600
34.781879
131
0.610522
false
randynobx/ansible
lib/ansible/modules/windows/win_file.py
20
2875
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, eith...
gpl-3.0
3,467,949,795,511,355,400
32.430233
87
0.684174
false
CiuffysHub/MITMf
mitmflib-0.18.4/build/lib.linux-i686-2.7/mitmflib/argh/decorators.py
2
5296
# coding: utf-8 # # Copyright © 2010—2014 Andrey Mikhaylenko and contributors # # This file is part of Argh. # # Argh is free software under terms of the GNU Lesser # General Public License version 3 (LGPLv3) as published by the Free # Software Foundation. See the file README.rst for copying conditions. # """ Comm...
gpl-3.0
-5,380,725,655,337,717,000
29.245714
82
0.612507
false
kartikm/yokadi
yokadi/ycli/textlistrenderer.py
1
9034
# -*- coding: UTF-8 -*- """ Text rendering of t_list output @author: Aurélien Gâteau <mail@agateau.com> @author: Sébastien Renard <Sebastien.Renard@digitalfox.org> @license: GPL v3 or later """ from datetime import datetime, timedelta from sqlalchemy.sql import func import yokadi.ycli.colors as C from yokadi.core imp...
gpl-3.0
-3,334,397,768,262,249,500
33.338403
121
0.592958
false
redmoo-info/proddict
ru/clothing_accessories.py
1
13968
# -*- coding: utf-8 -*- """'Clothing, accessories' part of product categories dictionary. Must hold subcategories of 'Clothing, accessories' category in the form of python dictionary data type. """ kids_sizes = { ('86 cm', '86 см'): {}, ('92 cm', '92 см'): {}, ('98 cm', '98 см'): {}, ('104 cm', '104 ...
mit
1,447,159,099,828,185,600
37.935275
74
0.446596
false
openstack/neutron-lib
neutron_lib/exceptions/qos.py
1
4177
# Copyright 2011 VMware, Inc # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
apache-2.0
3,458,554,079,653,858,300
34.398305
78
0.65717
false
suyashphadtare/sajil-final-erp
erpnext/accounts/report/balance_sheet/balance_sheet.py
39
1666
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import flt from erpnext.accounts.report.financial_statements import (get_period_list, get_column...
agpl-3.0
3,698,225,509,537,346,600
31.038462
97
0.726891
false
PRIMEDesigner15/PRIMEDesigner15
dependencies/Lib/test/unittests/test_hashlib.py
23
16135
# Test hashlib module # # $Id$ # # Copyright (C) 2005-2010 Gregory P. Smith (greg@krypto.org) # Licensed to PSF under a Contributor Agreement. # import array import hashlib import itertools import os import sys try: import threading except ImportError: threading = None import unittest import warnings from ...
bsd-3-clause
-4,712,899,883,000,602,000
36.964706
85
0.617973
false
carlgao/lenga
images/lenny64-peon/usr/share/python-support/mercurial-common/hgext/purge.py
1
5682
# Copyright (C) 2006 - Marco Barisione <marco@barisione.org> # # This is a small extension for Mercurial (http://www.selenic.com/mercurial) # that removes files not known to mercurial # # This program was inspired by the "cvspurge" script contained in CVS utilities # (http://www.red-bean.com/cvsutils/). # # To enable t...
mit
3,707,048,103,799,443,500
36.381579
83
0.622492
false
stephane-martin/salt-debian-packaging
salt-2016.3.2/tests/eventlisten.py
2
3652
# -*- coding: utf-8 -*- ''' Use this script to dump the event data out to the terminal. It needs to know what the sock_dir is. This script is a generic tool to test event output ''' # Import Python libs from __future__ import absolute_import, print_function import optparse import pprint import time import os # Impo...
apache-2.0
-4,836,599,035,430,854,000
25.085714
124
0.531216
false
EmreAtes/spack
var/spack/repos/builtin/packages/py-cpuinfo/package.py
5
1584
############################################################################## # 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
-5,139,975,135,684,637,000
43
85
0.672348
false
nitzmahone/ansible
lib/ansible/modules/network/cloudengine/ce_aaa_server.py
7
70237
#!/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 distribut...
gpl-3.0
6,941,948,130,217,425,000
31.367281
112
0.568034
false
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/OpenGL/GL/EXT/provoking_vertex.py
9
2070
'''OpenGL extension EXT.provoking_vertex This module customises the behaviour of the OpenGL.raw.GL.EXT.provoking_vertex to provide a more Python-friendly API Overview (from the spec) This extension provides an alternative provoking vertex convention for rendering lines, triangles, and (optionally depending on t...
gpl-3.0
8,362,022,892,857,040,000
38.826923
71
0.795652
false
mfazekas/safaridriver
py_test.py
3
2257
#!/usr/bin/env python # Copyright 2008-2009 WebDriver committers # Copyright 2008-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/LICE...
apache-2.0
684,375,463,691,647,200
35.403226
103
0.613646
false
thaim/ansible
lib/ansible/modules/network/fortios/fortios_router_multicast6.py
14
12199
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 Lic...
mit
7,574,012,992,704,808,000
31.793011
109
0.539307
false
edespino/gpdb
src/test/tinc/tincrepo/mpp/gpdb/tests/catalog/udf_exception_handling/test_udf_exception_handling.py
9
11911
""" Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the 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....
apache-2.0
1,709,474,834,917,103,000
67.062857
169
0.653849
false
django-pci/django-axes
axes/backends.py
2
2807
from django.contrib.auth.backends import ModelBackend from axes.exceptions import ( AxesBackendPermissionDenied, AxesBackendRequestParameterRequired, ) from axes.handlers.proxy import AxesProxyHandler from axes.helpers import get_credentials, get_lockout_message, toggleable class AxesBackend(ModelBackend): ...
mit
3,371,056,431,732,445,000
44.274194
117
0.710367
false
StefanRijnhart/account-financial-reporting
__unported__/account_journal_report_xls/__openerp__.py
6
1737
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2014 Noviat nv/sa (www.noviat.com). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under...
agpl-3.0
-3,413,281,182,335,184,400
31.166667
78
0.605066
false
aleksandra-tarkowska/django
django/db/models/fields/__init__.py
2
81786
# -*- coding: utf-8 -*- from __future__ import unicode_literals import collections import copy import datetime import decimal import math import warnings from base64 import b64decode, b64encode from itertools import tee from django.apps import apps from django.db import connection from django.db.models.lookups import...
bsd-3-clause
5,217,430,932,472,338,000
36.12483
107
0.569755
false
hulu/uwsgi
tests/websockets_chat.py
21
2748
#!./uwsgi --http-socket :9090 --gevent 100 --module tests.websockets_chat --gevent-monkey-patch import uwsgi import time import gevent.select import redis def application(env, sr): ws_scheme = 'ws' if 'HTTPS' in env or env['wsgi.url_scheme'] == 'https': ws_scheme = 'wss' if env['PATH_INFO'] == '...
gpl-2.0
3,579,560,876,276,562,400
32.925926
133
0.491266
false
rahuldan/sympy
sympy/core/tests/test_expr.py
2
57428
from __future__ import division from sympy import (Add, Basic, S, Symbol, Wild, Float, Integer, Rational, I, sin, cos, tan, exp, log, nan, oo, sqrt, symbols, Integral, sympify, WildFunction, Poly, Function, Derivative, Number, pi, NumberSymbol, zoo, Piecewise, Mul, Pow, nsimplify, ratsimp, trigsimp, radsim...
bsd-3-clause
-4,765,008,874,888,499,000
32.233796
92
0.540573
false
hugomarin/artBO
montana/helpers/fckeditor/_samples/py/sampleposteddata.py
14
1896
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gn...
mit
4,190,585,792,407,657,000
20.545455
71
0.648207
false
Ecogenomics/CheckM
scripts/runGenomeSigDist.py
3
3522
#!/usr/bin/env python ############################################################################### # # runGenomeSigDist.py - calculate distribution of tetranucleotide # distances for all reference genomes # ############################################################################### #...
gpl-3.0
3,675,980,111,422,748,000
47.246575
147
0.515616
false
lavizhao/Tyrion
dump_category.py
1
1852
#coding: utf-8 ''' category查起来太慢了,重新dump一下 ''' from multiprocessing import Process,Queue from util.db import mydb from data import one_tran,get_conf import time import cPickle as pickle #任务queue tqueue = Queue(100000) #结果的queue gqueue = Queue(100000) cf = get_conf() def get_mydb(): host = cf["host"] user ...
mit
-7,742,521,274,288,671,000
19.790698
77
0.535794
false
siemens/django-dingos-authoring
dingos_authoring/views.py
1
26278
# Copyright (c) Siemens AG, 2014 # # This file is part of MANTIS. MANTIS 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 progr...
gpl-2.0
-1,879,485,312,123,893,000
37.362044
178
0.564997
false
matthiaskrgr/cppcheck
tools/daca2-getpackages.py
1
3915
#!/usr/bin/env python # # 1. Create a folder daca2 in your HOME folder # 2. Put cppcheck-head in daca2. It should be built with all optimisations. # 3. Optional: Put a file called "suppressions.txt" in the daca2 folder. # 4. Optional: tweak FTPSERVER and FTPPATH in this script below. # 5. Run the daca2 script: python ...
gpl-3.0
-7,311,189,876,327,974,000
38.545455
90
0.618135
false
golismero/golismero
thirdparty_libs/nltk/parse/pchart.py
12
18640
# Natural Language Toolkit: Probabilistic Chart Parsers # # Copyright (C) 2001-2012 NLTK Project # Author: Edward Loper <edloper@gradient.cis.upenn.edu> # Steven Bird <sb@csse.unimelb.edu.au> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT """ Classes and interfaces for associating pro...
gpl-2.0
4,272,996,025,214,943,000
37.512397
97
0.600536
false
encbladexp/ansible
lib/ansible/module_utils/facts/hardware/linux.py
11
34498
# This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that ...
gpl-3.0
-7,721,708,395,090,663,000
39.020882
128
0.513537
false
TakeshiTseng/ryu
ryu/services/protocols/bgp/application.py
2
8351
# Copyright (C) 2014 Nippon Telegraph and Telephone Corporation. # # 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
-6,652,366,837,627,358,000
36.28125
78
0.651179
false
jjlee9/openthread
tools/harness-automation/cases/leader_9_2_11.py
16
1877
#!/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
839,902,037,799,989,900
42.651163
77
0.76292
false
Azure/azure-sdk-for-python
sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/_configuration.py
1
3209
# 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 may ...
mit
-6,422,053,421,144,741,000
46.895522
134
0.681209
false
antlarr/picard
picard/ui/options/genres.py
2
3074
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # Copyright (C) 2008 Lukáš Lalinský # # 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...
gpl-2.0
5,159,729,941,301,588,000
40.5
92
0.688049
false
VincentVW/OIPA
OIPA/iati/updater.py
3
3879
from iati.models import Sector, BudgetType, DescriptionType import ujson import os import os.path class SectorUpdater(): def update_unesco_sectors(self): base = os.path.dirname(os.path.abspath(__file__)) location = base + "/data_backup/unesco_sectors.json" json_data = ope...
agpl-3.0
-2,873,489,906,242,336,000
31.596639
106
0.472544
false
paxapy/zulip
analytics/management/commands/analyze_mit.py
4
3812
from __future__ import absolute_import from __future__ import print_function from typing import Any from optparse import make_option from django.core.management.base import BaseCommand, CommandParser from zerver.models import Recipient, Message from zerver.lib.timestamp import timestamp_to_datetime import datetime im...
apache-2.0
6,711,362,981,282,459,000
42.816092
99
0.590766
false
tszym/ansible
lib/ansible/modules/network/ordnance/ordnance_config.py
8
12513
#!/usr/bin/python # # Copyright: 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.0', 'status': ['preview'],...
gpl-3.0
5,724,727,704,387,658,000
32.637097
92
0.640294
false
github-borat/cinder
cinder/api/middleware/fault.py
1
3078
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
apache-2.0
-8,071,283,626,662,000,000
38.461538
78
0.659194
false
Hybrid-Cloud/badam
patches_tool/aws_patch/aws_deps/libcloud/test/compute/test_vcl.py
1
4978
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not ...
apache-2.0
-6,919,046,569,781,226,000
37.19685
76
0.652873
false
markwash/hoke
hoke/commands/show_new.py
1
1378
from .. import display from .. import models from .. import states def get_command(): return Command() class Command(object): name = 'new' help = ('List new blueprints') def add_arguments(self, parser): pass def execute(self, hoke_db, args): bps = self.get_new_bps(hoke_db) ...
bsd-2-clause
-8,687,910,759,248,600,000
27.122449
60
0.524673
false
opencord/voltha
common/utils/id_generation.py
1
4021
# # Copyright 2017 the original author or 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 applicable law or...
apache-2.0
-7,519,366,933,427,644,000
33.663793
78
0.667993
false
wagavulin/arrow
cpp/build-support/cpplint.py
6
249597
#!/usr/bin/env 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...
apache-2.0
-861,955,295,882,756,000
37.547799
97
0.639988
false
uclouvain/osis
attribution/views/charge_repartition/update.py
1
2133
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
agpl-3.0
-7,869,994,393,758,727,000
48.581395
105
0.677298
false
pieleric/odemis
src/odemis/acq/align/test/autofocus_test.py
2
26024
# -*- coding: utf-8 -*- ''' Created on 25 April 2014 @author: Kimon Tsitsikas Copyright © 2013-2014 Kimon Tsitsikas, Delmic This file is part of Odemis. Odemis is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software F...
gpl-2.0
8,850,355,308,528,776,000
37.045322
116
0.628444
false
balanced/status.balancedpayments.com
venv/lib/python2.7/site-packages/distribute-0.6.34-py2.7.egg/setuptools/tests/test_resources.py
23
25002
#!/usr/bin/python # -*- coding: utf-8 -*- # NOTE: the shebang and encoding lines are for ScriptHeaderTests; do not remove from unittest import TestCase, makeSuite; from pkg_resources import * from setuptools.command.easy_install import get_script_header, is_sh import os, pkg_resources, sys, StringIO, tempfile, shutil t...
mit
-722,911,614,495,337,900
36.937785
94
0.553258
false
absperf/wagtailapproval
wagtailapproval/wagtail_hooks.py
1
1367
from __future__ import (absolute_import, division, print_function, unicode_literals) from django.conf.urls import include, url from wagtail.wagtailcore import hooks from wagtail.wagtailcore.models import Page from . import urls from .menu import ApprovalAdminMenuItem, ApprovalMenuItem from .mo...
bsd-2-clause
-6,330,125,383,709,285,000
34.051282
79
0.719093
false
marble/Toolchain_RenderDocumentation
12-Get-ready-for-the-project/run_05-Acquire-lock.py
1
4882
#!/usr/bin/env python from __future__ import print_function from __future__ import absolute_import import tct import time import os import sys params = tct.readjson(sys.argv[1]) facts = tct.readjson(params['factsfile']) milestones = tct.readjson(params['milestonesfile']) reason = '' resultfile = params['resultfile'] ...
mit
-407,474,331,921,038,700
30.294872
114
0.569439
false
gooddata/openstack-nova
nova/tests/unit/api/openstack/compute/test_networks.py
2
32459
# Copyright 2011 Grid Dynamics # 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...
apache-2.0
9,182,814,938,588,251,000
41.319426
79
0.59512
false
wang1352083/pythontool
python-2.7.12-lib/test/test_dictviews.py
6
9607
import copy import pickle import unittest import collections from test import test_support class DictSetTest(unittest.TestCase): def test_constructors_not_callable(self): kt = type({}.viewkeys()) self.assertRaises(TypeError, kt, {}) self.assertRaises(TypeError, kt) it = type({}.vie...
mit
-857,247,219,054,991,100
43.476852
79
0.539294
false
mattstruble/crusty
crusty/util/enum.py
1
8791
#!/usr/bin/env python # Copyright (c) 2016 Matt Struble. All Rights Reserved. # # Use is subject to license terms. # # Author: Matt Struble # Date: Oct. 15 2016 import inspect class EnumError(AttributeError): pass class _meta_enum(type): def __init__(cls, cls_name, cls_bases, cls_dict): """ Automaticall...
mit
-7,099,585,610,388,234,000
28.8
134
0.538847
false
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.1/Lib/plat-irix5/panel.py
6
6727
# Module 'panel' # # Support for the Panel library. # Uses built-in module 'pnl'. # Applications should use 'panel.function' instead of 'pnl.function'; # most 'pnl' functions are transparently exported by 'panel', # but dopanel() is overridden and you have to use this version # if you want to use callbacks. import pn...
mit
8,022,840,077,382,427,000
22.939502
71
0.658689
false
amoretti86/auxiliary-particle-filter
apf_fhn.py
1
6209
''' An implementation of the Fully Adapted Auxiliary Particle Filter as described by Whiteley and Johansen Chapter 3 Algorithm 2 on page 5 of Recent Developments in Auxiliary Particle Filtering: http://www.maths.bris.ac.uk/~manpw/apf_chapter.pdf The algorithm is taylored to perform inference in nonlinear dynamical sys...
mit
-2,725,166,112,573,761,500
38.050314
120
0.598003
false
Dark-Bob/mro
mro/routine.py
1
5006
import mro.connection import mro.helpers import collections class RoutineParameter: def __init__(self, name, data_type, mode): self.name = name self.data_type = data_type self.mode = mode def __repr__(self): return f"RoutineParameter({self.name}, {self.data_type}, {self.mode}...
mit
-7,127,849,894,131,664,000
41.07563
262
0.655813
false