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
briceparent/py_vosfactures
vosfactures/utils.py
1
1529
import json import requests from vosfactures import settings class HttpError(Exception): pass def get(**kwargs): return query(method="GET", **kwargs) def delete(**kwargs): return query(method="DELETE", **kwargs) def post(**kwargs): return query(method="POST", **kwargs) def put(**kwargs): ...
gpl-3.0
-5,627,060,479,928,397,000
25.362069
95
0.620013
false
django-bmf/django-bmf
djangobmf/tasks/document.py
2
1289
#!/usr/bin/python # ex:set fileencoding=utf-8: from __future__ import unicode_literals from django.utils import six from djangobmf.decorators import optional_celery import hashlib import mimetypes if six.PY2: class FileNotFoundError(OSError): pass @optional_celery def generate_sha1(pk): from dja...
bsd-3-clause
5,599,808,207,140,588,000
20.483333
82
0.591932
false
skolome/son-sp-infrabstract
wim-adaptor/vtn-api/newim.py
2
3742
# # Copyright (c) 2015 SONATA-NFV, UCL, NOKIA, NCSR Demokritos # 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 ...
apache-2.0
5,734,090,108,605,875,000
35.330097
159
0.694816
false
marcoantoniooliveira/labweb
oscar/core/context_processors.py
1
2200
import oscar import re import platform import django from six.moves.urllib import parse from django.conf import settings from django.utils.safestring import mark_safe def strip_language_code(request): """ When using Django's i18n_patterns, we need a language-neutral variant of the current URL to be able t...
bsd-3-clause
7,059,000,760,504,418,000
37.596491
78
0.655909
false
danyaqp/gr-baz
python/baudline.py
3
5680
#!/usr/bin/env python # -*- coding: utf-8 -*- # # baudline.py # # Copyright 2013 Balint Seeber <balint@crawfish> # # 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 th...
gpl-3.0
-7,117,699,006,643,680,000
27.979592
141
0.629401
false
flurischt/jedi
jedi/evaluate/__init__.py
25
16430
""" Evaluation of Python code in |jedi| is based on three assumptions: * The code uses as least side effects as possible. Jedi understands certain list/tuple/set modifications, but there's no guarantee that Jedi detects everything (list.append in different modules for example). * No magic is being used: - metac...
mit
1,380,526,699,612,606,700
42.350923
121
0.591905
false
dirtshell/smashonline
smashonline.py
1
4573
import web from web import form import model from captcha import getCaptcha # List of valid time zones olsonDB = [ 'Pacific/Majuro', 'Pacific/Pago_Pago', 'America/Adak', 'Pacific/Honolulu', 'Pacific/Marquesas', 'Pacific/Gambier', 'America/Anchorage', 'America/Los_Angeles', 'Pacific/...
mit
3,073,423,190,335,068,700
30.763889
161
0.629346
false
fedora-conary/conary
conary_test/clienttest/resolvetest.py
1
25181
# # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
apache-2.0
3,038,407,383,393,122,300
43.885918
110
0.541202
false
awatts/boto
boto/s3/connection.py
16
26349
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation file...
mit
-2,118,226,682,433,625,900
38.38565
111
0.597973
false
JPJPJPOPOP/zulip
zerver/webhooks/gitlab/view.py
10
13038
from __future__ import absolute_import from functools import partial from zerver.lib.actions import check_send_message from zerver.lib.response import json_success from zerver.decorator import api_key_only_webhook_view, REQ, has_request_variables from zerver.lib.webhooks.git import get_push_commits_event_message, EMPTY...
apache-2.0
2,735,772,732,093,666,000
35.116343
97
0.616812
false
mvcsantos/QGIS
python/plugins/processing/gui/AlgorithmDialogBase.py
1
4883
# -*- coding: utf-8 -*- """ *************************************************************************** AlgorithmDialogBase.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *******************...
gpl-2.0
-650,460,406,269,059,600
30.707792
77
0.562154
false
krkeegan/insteon-manager
insteon_mngr/sequences/modem.py
3
3757
from insteon_mngr.trigger import PLMTrigger from insteon_mngr.sequences.common import WriteALDBRecord class WriteALDBRecordModem(WriteALDBRecord): def _perform_write(self): super()._perform_write() if self.in_use is True: self.data1 = self._linked_group.device.dev_cat ...
gpl-2.0
2,785,511,654,145,972,000
38.397849
76
0.538195
false
scaphilo/koalixcrm
koalixcrm/crm/migrations/0052_auto_20181014_2304.py
2
2741
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2018-10-12 20:56 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion def reverse_func(apps, schema_editor): return 1 def restore_from_backup(apps, schema_editor...
bsd-3-clause
-5,343,144,506,403,943,000
45.457627
108
0.599051
false
popgengui/negui
agestrucne/pginputneestimator.py
1
2282
''' Description Object manages input data to be used by the pgopneestimator object. ''' from builtins import object __filename__ = "pginputneestimator.py" __date__ = "20160502" __author__ = "Ted Cosart<ted.cosart@umontana.edu>" import copy class PGInputNeEstimator (object): ''' CLass to provide class PGOpNeEstimato...
agpl-3.0
6,959,040,335,069,520,000
26.166667
80
0.702454
false
whitehorse-io/encarnia
pyenv/lib/python2.7/site-packages/attr/_make.py
2
35624
from __future__ import absolute_import, division, print_function import hashlib import linecache from operator import itemgetter from . import _config from ._compat import PY2, iteritems, isclass, iterkeys, metadata_proxy from .exceptions import ( DefaultAlreadySetError, FrozenInstanceError, NotAnAttrsCl...
mit
-3,406,400,153,928,851,000
32.639282
79
0.56316
false
KaranToor/MA450
google-cloud-sdk/platform/gsutil/gslib/__main__.py
3
30144
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
apache-2.0
4,820,458,504,548,332,000
41.337079
91
0.677581
false
MotionFunProject/MotionFunProject
blender_files/autoload.py
1
1325
import bpy import os from math import radians import time print("Items in scene: " + str(len(bpy.context.scene.objects))); bpy.ops.mesh.primitive_monkey_add(radius=1, view_align=False, enter_editmode=False, location=(0, 0, 0), layers=( True, False, False, False, False, False, False, False, False, False, False, False, ...
gpl-3.0
343,122,350,106,372,900
27.826087
117
0.682264
false
manderson23/NewsBlur
vendor/feedvalidator/demo/src/demo.py
16
1786
#!/usr/bin/python """$Id: demo.py 699 2006-09-25 02:01:18Z rubys $""" __author__ = "Sam Ruby <http://intertwingly.net/> and Mark Pilgrim <http://diveintomark.org/>" __version__ = "$Revision: 699 $" __date__ = "$Date: 2006-09-25 02:01:18 +0000 (Mon, 25 Sep 2006) $" __copyright__ = "Copyright (c) 2002 Sam Ruby and Mark...
mit
-1,737,553,560,961,960,200
32.698113
163
0.68757
false
Anaethelion/Geotrek
geotrek/trekking/serializers.py
1
21245
import copy import datetime import json import gpxpy.gpx from django.conf import settings from django.core.urlresolvers import reverse from django.utils import translation from django.utils.translation import get_language, ugettext_lazy as _ from django.utils.timezone import utc, make_aware from django.utils.xmlutils ...
bsd-2-clause
2,639,157,288,231,134,000
40.413255
145
0.640056
false
toddheitmann/PetroPy
petropy/datasets.py
1
1116
# -*- coding: utf-8 -*- """ Datasets is a way to retrieve included logs with petropy. It currently supports reading a sample log from the Permain Basin in Reagan County. """ import os from .log import Log def log_data(source): """ retrieves log data for a formation Parameters --------...
mit
-5,022,807,454,048,327,000
18.666667
70
0.551075
false
mahim97/zulip
zerver/lib/actions.py
2
190670
from typing import ( AbstractSet, Any, AnyStr, Callable, Dict, Iterable, List, Mapping, MutableMapping, Optional, Sequence, Set, Text, Tuple, TypeVar, Union, cast ) from mypy_extensions import TypedDict import django.db.utils from django.contrib.contenttypes.models import ContentType from django.utils.html imp...
apache-2.0
7,379,102,020,731,750,000
42.5618
265
0.623375
false
gitaarik/adyengo
adyengo/constants.py
1
7207
# Session Types SESSION_TYPE_HPP_REGULAR = 'hpp_regular' SESSION_TYPE_HPP_RECURRING = 'hpp_recurring' SESSION_TYPE_API_RECURRING = 'api_recurring' SESSION_TYPES_HPP = { SESSION_TYPE_HPP_REGULAR: "HPP Regular", SESSION_TYPE_HPP_RECURRING: "HPP Recurring", } SESSION_TYPES_API = { SESSION_TYPE_API_RECURRING...
lgpl-3.0
3,119,429,773,629,368,300
29.029167
85
0.712085
false
kidaa30/spacewalk
client/debian/packages-already-in-debian/rhnlib/test/23-digest-auth.py
36
2399
#!/usr/bin/python # # Test case for digest authentication # # # USAGE: (echo -n) | $0 PORT # # Few notes about what is done here: # - thread AUTH sends authentication digest # - thread NC uses netcat and grep to see results # - Little hack with (echo -n) is much more easier to use, # than some settrace machin...
gpl-2.0
3,679,093,189,985,728,500
23.731959
122
0.596082
false
bank-netforce/netforce
netforce_general/netforce_general/models/language.py
4
2606
# Copyright (c) 2012-2015 Netforce Co. Ltd. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
mit
630,789,722,860,901,400
37.895522
111
0.675365
false
spandanb/horizon
openstack_dashboard/dashboards/router/nexus1000v/views.py
5
4922
# 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
7,971,148,248,862,334,000
34.157143
78
0.678586
false
fvincenzo/mbed-os
tools/libraries.py
8
4627
""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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 wr...
apache-2.0
-2,152,962,828,375,320,300
30.910345
78
0.608386
false
geometalab/OSMDeepOD
src/data/orthofoto/other/multi_loader.py
2
1892
import logging import time from io import BytesIO from multiprocessing.dummy import Pool as ThreadPool import requests from PIL import Image from src.data.orthofoto.other.user_agent import UserAgent class MultiLoader: def __init__(self, urls, auth=None): self.urls = urls self.results = [] ...
mit
5,747,310,598,972,678,000
30.533333
100
0.576638
false
kubeflow/examples
github_issue_summarization/notebooks/trainer.py
1
10766
import json import logging import os import sys import numpy as np import dill as dpickle import pandas as pd import tensorflow as tf # TODO(https://github.com/kubeflow/examples/issues/280) # TODO(https://github.com/kubeflow/examples/issues/196) # We'd like to switch to importing keras from TensorFlow in order to supp...
apache-2.0
-4,417,197,483,078,284,000
38.874074
186
0.653632
false
tedi3231/openerp
openerp/addons/sale_crm/__init__.py
69
1090
# -*- 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,223,733,581,149,686,000
40.923077
78
0.620183
false
ElliotJH/sidereal
interface/mainview.py
1
7475
"""The main view should be considered the default view, the one with all of the spaceships and stuff around. TODO this doc is clearly incomplete.""" # stdlib import collections import random import math # third party import panda3d.core import direct.task # internal # One thing I'm wondering about, is whether we ...
gpl-3.0
-274,156,180,474,640,580
34.259434
94
0.641204
false
AlexanderWillner/BibLatex-Check
biblatex_check.py
1
19201
#!/usr/bin/env python """ BibLaTeX check on missing fields and consistent name conventions, especially developed for requirements in Computer Science. """ __author__ = "Pez Cuckow" __version__ = "0.1.3" __credits__ = ["Pez Cuckow", "BibTex Check 0.2.0 by Fabian Beck"] __license__ = "MIT" __email__ = "email<...
agpl-3.0
-8,564,810,408,672,849,000
30.993127
204
0.514869
false
pajlada/pajbot
pajbot/tests/test_url_parser.py
1
2264
def test_is_subdomain(): from pajbot.modules.linkchecker import is_subdomain assert is_subdomain("pajlada.se", "pajlada.se") assert is_subdomain("test.pajlada.se", "pajlada.se") assert not is_subdomain("test.pajlada.se", "pajlada.com") assert not is_subdomain("kastaren.com", "roleplayer.se") a...
mit
-2,901,317,349,210,714,000
37.372881
107
0.644876
false
mike820324/microProxy
microproxy/test/layer/test_manager.py
1
7691
import unittest import sys from mock import Mock from tornado import gen, iostream from microproxy.context import LayerContext, ServerContext from microproxy.exception import ( DestStreamClosedError, SrcStreamClosedError, DestNotConnectedError ) from microproxy.layer import manager as layer_manager from microproxy...
mit
1,768,103,212,269,279,700
41.258242
95
0.681966
false
DavidCain/mitoc-trips
ws/utils/perms.py
1
3312
import functools from django.contrib.auth.models import Group, User from ws import enums # This is technically only accurate when starting the web server, # but that's okay (new groups are created extremely rarely) # This allows us to avoid repeatedly querying groups. @functools.lru_cache(maxsize=None) def all_grou...
gpl-3.0
7,713,661,299,016,247,000
32.12
84
0.697464
false
ryancoleman/autodock-vina
boost_1_54_0/tools/build/v2/build/alias.py
45
2207
# Copyright 2003, 2004, 2006 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # Status: ported (danielw) # Base revision: 56043 # This module defines the 'alias' rule and associated class. # # Alias is jus...
apache-2.0
-1,870,042,807,218,909,000
34.031746
86
0.698233
false
Gamebasis/3DGamebasisServer
GameData/blender-2.71-windows64/2.71/python/lib/site-packages/numpy/distutils/fcompiler/intel.py
15
6536
# http://developer.intel.com/software/products/compilers/flin/ from __future__ import division, absolute_import, print_function import sys from numpy.distutils.ccompiler import simple_version_match from numpy.distutils.fcompiler import FCompiler, dummy_fortran_file compilers = ['IntelFCompiler', 'IntelVisualFCompile...
gpl-3.0
4,380,250,213,658,595,300
30.882927
100
0.561812
false
TansyArron/pants
tests/python/pants_test/base/test_extension_loader.py
4
10853
# 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 ty...
apache-2.0
-4,638,824,095,656,135,000
36.815331
97
0.699622
false
arthur-e/OpenClimateGIS
src/openclimategis/util/ncconv/experimental/OLD_experimental/in_memory.py
7
12826
import os from netCDF4 import Dataset import itertools from shapely.geometry.multipoint import MultiPoint import numpy as np import matplotlib.pyplot as plt from shapely.geometry.polygon import Polygon from shapely.geometry.multipolygon import MultiPolygon import copy import datetime from netcdftime.netcdftime import n...
bsd-3-clause
6,097,657,104,443,060,000
35.753582
502
0.576797
false
nicolasnoble/grpc
src/re2/gen_build_yaml.py
8
1331
#!/usr/bin/env python2.7 # Copyright 2015 gRPC 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 l...
apache-2.0
8,217,073,239,722,683,000
26.729167
98
0.628099
false
ywcui1990/nupic.research
tests/algorithms/column_pooler_test.py
3
46533
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2016, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
1,099,693,485,113,873,500
31.025465
80
0.664926
false
spaam/svtplay-dl
lib/svtplay_dl/service/eurosport.py
1
5081
import json import re from urllib.parse import quote from urllib.parse import urlparse from svtplay_dl.error import ServiceError from svtplay_dl.fetcher.hls import hlsparse from svtplay_dl.service import Service class Eurosport(Service): supported_domains_re = [r"^([^.]+\.)*eurosportplayer.com"] def get(sel...
mit
2,435,905,693,891,856,000
42.42735
143
0.582169
false
Stederr/ESCOM
Análisis de Algoritmos/ref/algoritmos/modulo_cinco.py
1
2206
# coding=utf-8 ''' === Instituto Politécnico Nacional === Escuela Superior de Cómputo *** Análisis de Algoritmos - 2CM3 >>> ww ww ww (@ww) <<< www.ww.com/algoritmos Nota: el código de esta licencia se distribuye bajo la especificada en el repositorio de github.com/ww/ESCOM ''' def crearTabla(mat): tam = len(...
apache-2.0
-6,570,103,270,355,356,000
27.61039
90
0.587648
false
mahak/neutron
neutron/objects/port/extensions/port_device_profile.py
2
1201
# Copyright (c) 2020 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
5,032,134,734,344,929,000
32.361111
78
0.714405
false
kdheepak89/pypdevs
test/testGVT.py
1
5077
# Copyright 2014 Modelling, Simulation and Design Lab (MSDL) at # McGill University and the University of Antwerp (http://msdl.cs.mcgill.ca/) # # 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...
apache-2.0
-4,365,174,655,635,157,500
35.52518
117
0.569628
false
frodrigo/osmose-backend
analysers/analyser_merge_recycling_FR_nm_glass.py
4
3578
#!/usr/bin/env python #-*- coding: utf-8 -*- ########################################################################### ## ## ## Copyrights Thomas O. 2016 ## ## ...
gpl-3.0
-2,546,495,715,946,034,700
58.583333
169
0.478881
false
joemicro/Manufacturing
ui_forms/ui_batchform.py
1
27806
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'batchform.ui' # # Created: Sun Jul 07 15:53:38 2013 # by: PyQt4 UI code generator 4.9.6 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attri...
mit
-4,558,092,067,687,230,000
54.170635
109
0.682515
false
isralopez/geonode
geonode/catalogue/views.py
14
1811
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2012 OpenPlans # # 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 versio...
gpl-3.0
-2,713,650,765,973,121,000
36.729167
91
0.674213
false
riga/law
law/contrib/root/formatter.py
1
3388
# coding: utf-8 """ ROOT target formatters. """ __all__ = [ "GuardedTFile", "ROOTFormatter", "ROOTNumpyFormatter", "ROOTPandasFormatter", "UprootFormatter", ] from law.target.formatter import Formatter from law.target.file import get_path from law.contrib.root.util import import_ROOT class GuardedTFile(objec...
bsd-3-clause
1,715,753,316,678,142,200
24.473684
100
0.603896
false
larsks/blivet
tests/devices_test/partition_test.py
6
6832
# vim:set fileencoding=utf-8 import os import unittest from blivet.devices import DiskFile from blivet.devices import PartitionDevice from blivet.formats import getFormat from blivet.size import Size from blivet.util import sparsetmpfile class PartitionDeviceTestCase(unittest.TestCase): def testTargetSize(self)...
gpl-2.0
-2,977,701,306,439,629,300
42.794872
80
0.588407
false
mmmatthew/raycast
code/rasterclipper.py
1
5145
from osgeo import gdal, gdalnumeric, ogr from PIL import Image, ImageDraw import os import numpy as np def clip_raster(rast, features_path, gt=None, nodata=-9999): ''' Copyright: http://karthur.org/2015/clipping-rasters-in-python.html Clips a raster (given as either a gdal.Dataset or as a numpy.array ...
apache-2.0
3,801,077,543,901,111,000
33.07947
103
0.612828
false
mikechan0731/RaspBerryPi_MPU9250_data_read
IMU_GUI.py
2
34305
<<<<<<< HEAD #!/usr/bin/python # -*- coding: UTF-8 -*- # Author : MikeChan # Email : m7807031@gmail.com # Date : 06/21/2016 import time, sys, os, datetime, threading from PyQt4.QtCore import * from PyQt4.QtGui import * #===== Global Varibles ===== now = datetime.datetime.now() today = str( str(now).split(" ")[0].s...
mit
8,342,836,070,605,105,000
30.246948
129
0.563008
false
MihaiMoldovanu/ansible
lib/ansible/modules/cloud/cloudstack/cs_host.py
26
18433
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2016, René Moser <mail@renemoser.net> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
gpl-3.0
1,734,906,756,448,105,500
28.442492
151
0.619825
false
awhite40/pymks
pymks/bases/gsh.py
1
6022
import numpy as np import gsh_hex_tri_L0_16 as gsh_hex import gsh_cub_tri_L0_16 as gsh_cub import gsh_tri_tri_L0_13 as gsh_tri from .abstract import _AbstractMicrostructureBasis class GSHBasis(_AbstractMicrostructureBasis): r""" Discretize a continuous field into continuous local states using a Generaliz...
mit
-3,618,581,478,012,761,600
36.403727
81
0.566921
false
maxikov/nyaafs
nyaafs/trunk/nyafs.py
1
5443
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: # # Copyright (C) 2009 Vladimir Badaev # # This file is part of NyaaFS # # 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 # ...
gpl-3.0
-5,718,833,874,135,542,000
20.886878
106
0.523878
false
sephalon/python-ivi
ivi/agilent/agilent8596E.py
6
1556
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2013-2014 Alex Forencich 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...
mit
-4,970,438,373,828,452,000
36.047619
77
0.74036
false
franek/weboob
modules/gdcvault/test.py
5
1595
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Romain Bignon # Copyright(C) 2012 François Revol # # This file is part of weboob. # # weboob 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 vers...
agpl-3.0
7,942,737,984,229,299,000
36.952381
116
0.666248
false
gedare/gem5
src/python/m5/simulate.py
5
13132
# 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
-3,885,045,055,174,306,300
34.301075
84
0.668672
false
Kjwon15/libearth
libearth/parser/autodiscovery.py
2
6439
""":mod:`libearth.parser.autodiscovery` --- Autodiscovery ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module provides functions to autodiscovery feed url in document. """ try: import HTMLParser except ImportError: import html.parser as HTMLParser import collections import logging import re ...
gpl-2.0
3,931,579,882,290,926,000
33.068783
80
0.608324
false
huntxu/fuel-web
nailgun/nailgun/test/unit/test_task.py
2
29158
# -*- coding: utf-8 -*- # Copyright 2013 Mirantis, 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 requir...
apache-2.0
936,353,081,573,012,200
37.365789
79
0.607964
false
drphilmarshall/SpaceWarps
analysis/SWAP.py
2
29808
#!/usr/bin/env python # ====================================================================== import swap import sys,getopt,datetime,os,subprocess import numpy as np import cPickle # ====================================================================== def SWAP(argv): """ NAME SWAP.py PURPOSE...
mit
8,545,231,875,970,111,000
40.924051
194
0.59994
false
vecnet/vnetsource
ts_om/tests/execution_util_tests.py
2
2978
import mock import sys from django.test import TestCase from vecnet.simulation import sim_model from .data import EMPTY_SCENARIO from ts_om.submit import add_simulation from data_services.models import DimUser, Simulation, SimulationGroup class AddSimulationTests(TestCase): """ Tests for the add_simulation ...
mpl-2.0
-820,474,965,824,943,400
36.225
118
0.649429
false
jalexvig/tensorflow
tensorflow/contrib/model_pruning/python/pruning_test.py
11
9125
# 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
-3,094,381,627,248,387,000
41.24537
80
0.653041
false
impmihai/coala
tests/results/result_actions/ShowPatchActionTest.py
16
6464
import unittest from os.path import join from coala_utils.ContextManagers import retrieve_stdout from coalib.results.Diff import Diff from coalib.results.Result import Result from coalib.results.result_actions.ShowPatchAction import ShowPatchAction from coalib.settings.Section import Section, Setting class ShowPatch...
agpl-3.0
3,208,941,245,466,998,300
44.521127
76
0.376856
false
NLnetLabs/unbound
pythonmod/examples/log.py
25
4345
import os ''' calc.py: Response packet logger Copyright (c) 2009, Zdenek Vasicek (vasicek AT fit.vutbr.cz) Marek Vavrusa (xvavru00 AT stud.fit.vutbr.cz) This software is open source. Redistribution and use in source and binary forms, with or without modification, are permitted provided th...
bsd-3-clause
-2,534,265,965,040,965,000
35.512605
128
0.624396
false
krinart/AutobahnPython
examples/twisted/wamp/beginner/client.py
7
2729
############################################################################### ## ## Copyright (C) 2014 Tavendo GmbH ## ## 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:/...
apache-2.0
4,921,761,950,285,915,000
30.367816
79
0.616343
false
dqnykamp/sympy
sympy/physics/mechanics/kane.py
13
35025
from __future__ import print_function, division __all__ = ['KanesMethod'] from sympy import zeros, Matrix, diff, solve_linear_system_LU, eye from sympy.utilities import default_sort_key from sympy.physics.vector import (ReferenceFrame, dynamicsymbols, partial_velocity) from sympy.physics.mechanics.particle im...
bsd-3-clause
3,973,334,214,438,429,700
42.347772
85
0.567709
false
mpenkov/smart_open
smart_open/tests/test_bytebuffer.py
1
5334
# -*- coding: utf-8 -*- # # Copyright (C) 2019 Radim Rehurek <me@radimrehurek.com> # # This code is distributed under the terms and conditions # from the MIT License (MIT). # import random import unittest import six import smart_open.bytebuffer CHUNK_SIZE = 1024 def random_byte_string(length=CHUNK_SIZE): rand...
mit
6,110,070,565,927,979,000
33.636364
78
0.652793
false
t-artistik/browserscope
models/result_ranker_storage.py
9
3914
#!/usr/bin/python2.5 # # Copyright 2008 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 law or ...
apache-2.0
2,059,538,155,266,419,000
30.312
74
0.661472
false
erikdejonge/newsrivr
daemons/python2/stats.py
1
1984
from __future__ import print_function from builtins import str #!/usr/bin/env python import os import time import pymongo import datetime from pymongo import ASCENDING, DESCENDING if "Darwin" in os.popen("uname").read(): MONGOSERVER = 'localhost' else: MONGOSERVER = '192.168.167.192' MONGOPORT = 27017 def getDB()...
gpl-2.0
-3,438,365,905,066,072,600
21.556818
104
0.620968
false
silentfuzzle/calibre
src/tinycss/tests/media3.py
16
3065
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>' from tinycss.media3 import CSSMedia3Parser, MediaQuery as MQ from tinycss.te...
gpl-3.0
6,072,671,689,688,287,000
45.439394
123
0.48385
false
boundary/pulse-api-cli
tests/unit/boundary/measurement_create_test.py
4
1463
#!/usr/bin/env python # # Copyright 2015 BMC Software, 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 applicab...
apache-2.0
-3,944,174,863,018,193,400
29.479167
74
0.632946
false
authman/Python201609
Wright_Will/Assignments/login_and_registration_pylot/Pylot/app/config/database.py
1
1049
""" Database Specific Configuration File """ """ Put Generic Database Configurations here """ import os class DBConfig(object): """ DB_ON must be True to use the DB! """ DB_ON = True DB_DRIVER = 'mysql' DB_ORM = False """ Put Development Specific Configurations here """ class DevelopmentDBConfig(D...
mit
1,118,535,375,860,781,600
27.351351
98
0.64919
false
wscullin/spack
var/spack/repos/builtin/packages/python/package.py
2
26410
############################################################################## # Copyright (c) 2013-2017, 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,751,054,935,770,177,000
40.201248
79
0.580083
false
veger/ansible
lib/ansible/modules/network/fortios/fortios_firewall_vipgrp64.py
3
8717
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2018 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...
gpl-3.0
-11,581,835,324,222,444
28.750853
138
0.585637
false
Woile/commitizen
commitizen/config/yaml_config.py
1
1337
from pathlib import Path from typing import Union import yaml from .base_config import BaseConfig class YAMLConfig(BaseConfig): def __init__(self, *, data: Union[bytes, str], path: Union[Path, str]): super(YAMLConfig, self).__init__() self.is_empty_config = False self._parse_setting(data...
mit
-6,270,069,536,542,927,000
27.446809
75
0.5819
false
mtndesign/myVim
myvim/bundle/ropevim/ftplugin/python/libs/ropemode/decorators.py
24
2479
import traceback from rope.base import exceptions class Logger(object): message = None only_short = False def __call__(self, message, short=None): if short is None or not self.only_short: self._show(message) if short is not None: self._show(short) def _show(...
mit
-1,750,259,612,598,305,500
24.295918
68
0.564744
false
Yannig/ansible
lib/ansible/modules/source_control/git.py
2
44955
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '...
gpl-3.0
6,742,812,333,051,799,000
37.097458
133
0.592059
false
tectronics/cortex-vfx
test/IECore/ThreadingTest.py
5
10410
########################################################################## # # Copyright (c) 2010-2013, Image Engine Design 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: # # * Redis...
bsd-3-clause
-3,644,985,725,074,588,700
30.737805
143
0.658405
false
ngnrsaa/qflex
qflexcirq/qflex_cirq_example.py
1
4364
# The interface between Cirq and the Python interface to the C++ QFlex import sys, os sys.path.insert( 1, os.path.realpath(os.path.dirname(os.path.realpath(__file__)) + '/../')) import qflexcirq.interface.qflex_simulator as qsim import qflexcirq.interface.qflex_virtual_device as qdevice import qflexcirq.interface.q...
apache-2.0
5,580,065,536,052,286,000
34.193548
83
0.695921
false
areitz/pants
src/python/pants/goal/workspace.py
17
1878
# 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) from abc import abst...
apache-2.0
470,163,342,238,584,450
34.433962
94
0.678914
false
takeshineshiro/heat
heat/engine/resources/openstack/heat/software_deployment.py
1
25832
# # 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 # ...
apache-2.0
-1,331,330,780,396,496,400
37.100295
79
0.590121
false
spirrello/spirrello-pynet-work
applied_python/lib/python2.7/site-packages/ansible/modules/extras/packaging/os/homebrew_cask.py
4
16000
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Daniel Jaouen <dcj24@cornell.edu> # # 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) a...
gpl-3.0
8,235,355,458,988,184,000
29.947776
82
0.496375
false
promptworks/horizon
openstack_dashboard/dashboards/admin/volumes/volume_types/extras/views.py
36
4685
# 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 t...
apache-2.0
-666,318,647,534,431,900
38.70339
76
0.619851
false
jromang/retina-old
distinclude/spyderlib/widgets/shell.py
1
46139
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Shell widgets: base, python and terminal""" # pylint: disable=C0103 # pylint: disable=R0903 # pylint: disable=R0911 # pylint: disable=R0201 import o...
gpl-3.0
-2,504,595,074,585,314,300
36.902192
80
0.522541
false
gribozavr/swift
utils/lldb/lldbToolBox.py
2
4787
""" LLDB Helpers for working with the swift compiler. Load into LLDB with 'command script import /path/to/lldbToolBox.py' This will also import LLVM data formatters as well, assuming that llvm is next to the swift checkout. """ import argparse import os import shlex import subprocess import sys import tempfile impo...
apache-2.0
6,903,050,177,763,743,000
36.398438
82
0.646961
false
Azure/azure-sdk-for-python
sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_firewall_rules_operations.py
1
21913
# 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
1,473,500,773,960,985,900
48.915718
219
0.635513
false
danxshap/django-rest-surveys
rest_surveys/views.py
1
2197
from __future__ import unicode_literals from django.conf import settings from rest_framework import mixins, viewsets from django_filters.rest_framework import DjangoFilterBackend from rest_surveys.serializers import SurveySerializer from rest_surveys.utils import get_field_names, to_class import swapper Survey = swa...
mit
-5,330,597,751,584,385,000
38.945455
97
0.689577
false
Cue/eventlet
eventlet/hubs/__init__.py
7
4048
import sys import os from eventlet.support import greenlets as greenlet from eventlet import patcher __all__ = ["use_hub", "get_hub", "get_default_hub", "trampoline"] threading = patcher.original('threading') _threadlocal = threading.local() def get_default_hub(): """Select the default hub implementation based o...
mit
-4,491,102,245,266,735,000
31.126984
90
0.623518
false
yeokm1/bus-number-reader
arduino/libraries/ble-sdk-arduino-master/Build/BuildBLE.py
5
1287
import os import commands print "Building all BLE examples" Our_dir = os.getcwd() # get current directory if "ARDUINO_DIR" in os.environ: #Find out a way to use the variable ARDUINO_DIR, as it is set now #Right now it has to be relative in order for the makefile to work #BLE_DIR = os.environ.get('ARDUIN...
mit
683,465,716,063,125,900
33.810811
81
0.640249
false
zestrada/nova-cs498cc
nova/tests/conf_fixture.py
8
3244
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 compli...
apache-2.0
5,529,820,310,094,195,000
41.684211
78
0.67201
false
lazybios/v2ex
avatar.py
16
1714
#!/usr/bin/env python # coding=utf-8 from google.appengine.ext import webapp from google.appengine.api import memcache from google.appengine.ext import db from google.appengine.ext.webapp import util from v2ex.babel import Avatar from v2ex.babel.security import * from v2ex.babel.da import * class AvatarHand...
bsd-3-clause
2,484,973,681,558,934,000
36.26087
94
0.615519
false
SmartInfrastructures/dreamer
tools/test/topos/tower.py
39
1460
#!/usr/bin/env python from mininet.topo import Topo from mininet.cli import CLI from mininet.net import Mininet from mininet.node import RemoteController, OVSKernelSwitch from mininet.log import setLogLevel class TowerTopo( Topo ): """Create a tower topology""" def build( self, k=4, h=6 ): spines = ...
apache-2.0
-785,527,125,628,379,600
25.545455
80
0.560959
false
mindw/numpy
numpy/core/getlimits.py
12
9474
"""Machine limits for Float32 and Float64 and (long double) if available... """ from __future__ import division, absolute_import, print_function __all__ = ['finfo', 'iinfo'] from .machar import MachAr from . import numeric from . import numerictypes as ntypes from .numeric import array def _frz(a): """fix rank-...
bsd-3-clause
6,760,943,881,196,687,000
29.960784
78
0.540954
false
anhaidgroup/py_stringsimjoin
py_stringsimjoin/join/cosine_join.py
1
8912
# cosine join def cosine_join(ltable, rtable, l_key_attr, r_key_attr, l_join_attr, r_join_attr, tokenizer, threshold, comp_op='>=', allow_empty=True, allow_missing=False, l_out_attrs=None, r_out_attrs=None, l_out_prefix='l_...
bsd-3-clause
5,833,514,857,801,300,000
73.266667
127
0.386782
false
cisco-openstack/tempest
tempest/api/compute/admin/test_networks.py
2
2940
# Copyright 2014 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
apache-2.0
2,261,651,658,045,614,800
42.235294
79
0.642177
false
badock/nova
nova/virt/vmwareapi/constants.py
3
1383
# Copyright (c) 2014 VMware, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
659,830,939,234,525,400
31.928571
79
0.741142
false
greeness/yahtzee-optimal-strategy
parse_optimal.py
1
2451
from scoring import Category from array import array log = open('./data/small_T') idx = -1 optimal = [] def to_id(name): return Category.CATEGORY_NAME_TO_ID[name] kept_option = array('B') id_to_state = {} highest_bit = 0 nbits = 0 action_option = array("B") n = 0 for line in log: if line[0] == '$': ...
mit
-6,284,049,645,558,799,000
25.652174
85
0.453284
false
hughsaunders/python-openstackclient
doc/source/conf.py
1
8206
# -*- coding: utf-8 -*- # # OpenStack Command Line Client documentation build configuration file, created # by sphinx-quickstart on Wed May 16 12:05:58 2012. # # 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 # aut...
apache-2.0
-5,045,885,596,383,731,000
30.929961
79
0.704972
false
mhl/yournextmp-popit
mysite/settings.py
1
7006
""" Django settings for mysite project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) fro...
agpl-3.0
-7,302,497,677,890,623,000
28.812766
77
0.668142
false
yanchen036/pylearning
pylearning/linear_model/tests/test_linear_regression.py
1
1504
import unittest import numpy as np from pylearning.linear_model.linear_regression import LinearRegression class LinearRegressionTestCase(unittest.TestCase): def setUp(self): # y = 2x-1 x = np.matrix('1;0;2') y = np.matrix('1;-1;3') self.model = LinearRegression(x, y, 0.1, 120) ...
mit
8,103,180,439,647,034,000
30.333333
70
0.629654
false