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
uni-peter-zheng/tp-qemu
qemu/tests/client_guest_shutdown.py
7
2069
import time from autotest.client.shared import error from virttest import utils_misc @error.context_aware def run(test, params, env): """ KVM shutdown test: For a test with two VMs: client & guest 1) Log into the VMS(guests) that represent the client &guest 2) Send a shutdown command to the guest,...
gpl-2.0
-6,428,035,714,968,650,000
39.568627
76
0.602223
false
kareemallen/beets
test/test_mediafile.py
2
30785
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2015, Adrian Sampson. # # 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 t...
mit
3,339,995,142,290,756,000
31.034339
79
0.608673
false
ironsmile/tank4eta
locals.py
1
1245
#!/usr/bin/env python #-*- coding: utf8 -*- import enum import os FRAMES = 120 MOVE_SPEED = 6 ENEMY_MOVE_SPEED = 3.5 BULLET_SPEED = 18 DIRECTION_NONE = -1 DIRECTION_DOWN = 1 DIRECTION_LEFT = 2 DIRECTION_UP = 4 DIRECTION_RIGHT = 8 AXIS_X = 0 AXIS_Y = 1 BACKGROUND_COLOUR = (46, 52, 54) BLACK = (0, 0, 0) WHITE = (255...
mit
-5,874,394,132,995,078,000
18.153846
87
0.640964
false
gem/oq-hazardlib
openquake/hmtk/tests/faults/mfd/test_anderson_luco_area_mmax.py
1
10582
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # LICENSE # # Copyright (c) 2010-2017, GEM Foundation, G. Weatherill, M. Pagani, # D. Monelli. # # The Hazard Modeller's Toolkit is free software: you can redistribute # it and/or modify it under the terms of the GNU Affero Gen...
agpl-3.0
-3,235,939,884,575,549,400
36.928315
84
0.591571
false
wetneb/dissemin
papers/search_indexes.py
2
2586
from haystack import indexes from papers.utils import remove_diacritics from .models import Paper # from https://github.com/django-haystack/django-haystack/issues/204#issuecomment-544579 class IntegerMultiValueField(indexes.MultiValueField): field_type = 'integer' class PaperIndex(indexes.SearchIndex, indexes.In...
agpl-3.0
-1,451,157,736,661,003,000
31.325
88
0.670147
false
gavinfish/leetcode-share
python/068 Text Justification.py
1
2353
''' Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified. You should pack your words in a greedy approach; that is, pack as many words as you can in each line. Pad extra spaces ' ' when necessary so that each line has exactly L cha...
mit
9,116,631,088,883,721,000
39.586207
227
0.58946
false
vrsys/avangong
examples/billboard/billboard.py
6
3837
# -*- Mode:Python -*- ########################################################################## # # # This file is part of AVANGO. # # ...
lgpl-3.0
-1,461,746,403,414,869,200
42.602273
82
0.507167
false
Menooker/gem5_pcm
configs/example/memtest.py
9
8083
# Copyright (c) 2006-2007 The Regents of The University of Michigan # 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 ...
bsd-3-clause
7,269,950,286,770,779,000
36.595349
78
0.650254
false
HealthCatalystSLC/healthcareai-py
healthcareai/datasets/base.py
3
11739
from os.path import dirname from os.path import join import pandas as pd def load_data(data_file_name): """Loads data from module_path/data/data_file_name Args: data_file_name (str) : Name of csv file to be loaded from module_path/data/data_file_name. Example: 'diabetes.csv' Returns: ...
mit
4,831,914,556,192,065,000
38.26087
97
0.651333
false
Quikling/gpdb
src/test/tinc/tincrepo/mpp/lib/regress/regress_gpfilespace.py
9
2937
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. 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 ...
apache-2.0
7,208,309,053,970,767,000
39.232877
158
0.685734
false
godotgildor/freebayes
python/allelebayes.py
2
17483
# calculates data likelihoods for sets of alleles import multiset import sys import cjson import phred import json import math import operator from logsumexp import logsumexp from dirichlet import dirichlet_maximum_likelihood_ratio, dirichlet, multinomial, multinomialln from factorialln import factorialln """ This mo...
mit
-3,796,656,571,261,696,000
45.871314
154
0.66293
false
kaixinjxq/crosswalk-test-suite
tools/build/varshop.py
21
1935
#!/usr/bin/env python # # Copyright (c) 2015 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of conditions and t...
bsd-3-clause
8,230,647,700,913,999,000
38.489796
80
0.750904
false
google/ftc-object-detection
training/camera_cv.py
1
6053
#!/usr/bin/env python3 # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
-2,610,202,393,842,050,600
35.908537
110
0.651743
false
ww9rivers/splunk-sdk-python
splunklib/modularinput/event_writer.py
3
2790
# Copyright 2011-2015 Splunk, 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 wri...
apache-2.0
-1,290,993,148,854,081,300
31.823529
100
0.646237
false
sovietspy2/uzletiProject
python/Lib/doctest.py
3
102700
# Module doctest. # Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org). # Major enhancements and refactoring by: # Jim Fulton # Edward Loper # Provided as-is; use at your own risk; no warranty; no promises; enjoy! r"""Module doctest -- a framework for running examples in docstri...
gpl-3.0
6,232,259,507,086,020,000
36.435629
81
0.555706
false
ofayans/freeipa
ipaclient/remote_plugins/2_164/hostgroup.py
16
20373
# # Copyright (C) 2016 FreeIPA Contributors see COPYING for license # # pylint: disable=unused-import import six from . import Command, Method, Object from ipalib import api, parameters, output from ipalib.parameters import DefaultFrom from ipalib.plugable import Registry from ipalib.text import _ from ipapython.dn ...
gpl-3.0
8,230,526,775,095,126,000
27.734838
162
0.490846
false
Pikecillo/genna
external/PyXML-0.8.4/test/dom/html/test.py
1
1659
fileList = ['Collection', 'Element', 'HTML', 'HEAD', 'LINK', 'TITLE', 'META', 'BASE', 'ISINDEX', 'STYLE', 'BODY', 'FORM', 'SELECT', 'OPTGROUP', ...
gpl-2.0
-6,646,811,134,404,993,000
20.828947
87
0.295359
false
mvasilkov/kivy-2014
rockivy/util.py
2
1225
from __future__ import division from collections import namedtuple import json from os.path import join as path_join, realpath, dirname from kivy.core.image import Image PATH = realpath(path_join(dirname(__file__), '..', 'media')) Quad = namedtuple('Quad', 'x y size tex') def blending_is_broken(): # https://g...
mit
1,914,641,888,001,158,400
24.520833
62
0.590204
false
apark263/tensorflow
tensorflow/contrib/distributions/python/ops/negative_binomial.py
34
7811
# 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,202,898,354,091,818,000
38.055
80
0.664192
false
twosigma/marbles
marbles/mixins/setup.py
1
2571
# # Copyright (c) 2018 Two Sigma Open Source, LLC # # 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, m...
mit
4,601,538,994,261,230,600
31.544304
79
0.666667
false
eevee/floof
migration/versions/025_Add_remark_to_Artwork.py
1
1530
from sqlalchemy import * from migrate import * import migrate.changeset # monkeypatches Column from floof.model import now from floof.model.types import TZDateTime from sqlalchemy.ext.declarative import declarative_base TableBase = declarative_base() # Modified tables class Artwork(TableBase): __tablename__ = '...
isc
-7,214,060,915,947,126,000
40.351351
111
0.731373
false
ryancoleman/autodock-vina
boost_1_54_0/tools/build/v2/test/indirect_conditional.py
44
2692
#!/usr/bin/python # Copyright (C) 2006. Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import BoostBuild def test_basic(): t = BoostBuild.Tester(use_test_config=False) t.write("jamroot.jam...
apache-2.0
9,192,750,638,607,795,000
24.638095
79
0.635215
false
tundebabzy/frappe
frappe/patches/v8_0/setup_email_inbox.py
16
1282
import frappe, json from frappe.core.doctype.user.user import ask_pass_update, setup_user_email_inbox def execute(): """ depricate email inbox page if exists remove desktop icon for email inbox page if exists patch to remove Custom DocPerm for communication """ if frappe.db.exists("Page", "email_inbox"): ...
mit
-5,010,783,102,921,261,000
32.763158
100
0.710608
false
davzhang/helix-python-binding
org/apache/helix/messaging/AsyncCallback.py
1
4472
# package org.apache.helix.messaging #from org.apache.helix.messaging import * #from java.util import ArrayList #from java.util import Date #from java.util import List #from java.util import Timer #from java.util import TimerTask #from org.apache.log4j import Logger import time from org.apache.helix.model.Message impor...
apache-2.0
2,761,119,437,093,431,300
19.420091
87
0.522361
false
dT9r/Neo
tests/shrooms_test/shrooms.py
2
3077
import random import numpy as np import matplotlib.pyplot as plt from lib.layers.linear import Linear from lib.layers.softmax import SoftmaxCrossEntropyLayer from lib.layers.tanh import Tanh from lib.loss_functions.cross_entropy import SoftmaxCrossEntropyLoss from lib.loss_functions.mse import MSELoss from lib.models.s...
mit
-8,628,914,272,379,935,000
26.720721
68
0.650309
false
mlperf/training_results_v0.7
NVIDIA/benchmarks/maskrcnn/implementations/pytorch/maskrcnn_benchmark/data/samplers/iteration_based_batch_sampler.py
4
1574
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # Copyright (c) 2018-2019 NVIDIA CORPORATION. All rights reserved. from torch.utils.data.sampler import BatchSampler class IterationBasedBatchSampler(BatchSampler): """ Wraps a BatchSampler, resampling from it until a specified number...
apache-2.0
7,547,716,869,282,416,000
41.540541
98
0.626429
false
robbi/pyload
module/plugins/accounts/RapideoPl.py
8
2553
# -*- coding: utf-8 -*- import datetime import hashlib import time from ..internal.misc import json from ..internal.MultiAccount import MultiAccount class RapideoPl(MultiAccount): __name__ = "RapideoPl" __type__ = "account" __version__ = "0.10" __status__ = "testing" __config__ = [("mh_mode", "...
gpl-3.0
631,308,957,204,029,600
28.686047
85
0.534273
false
davicustodio/geonode
geonode/base/admin.py
12
3893
from django.contrib import admin from django.conf import settings import autocomplete_light from autocomplete_light.contrib.taggit_field import TaggitField, TaggitWidget from modeltranslation.admin import TranslationAdmin from geonode.base.models import (TopicCategory, SpatialRepresentationType, Region, RestrictionC...
gpl-3.0
-3,501,797,586,066,749,400
33.451327
103
0.692525
false
arthurdk/gk-analysis
GKFetcher.py
1
6220
from bs4 import BeautifulSoup import urllib2 import urllib from GKReview import * import pickle import os.path import re import sys from PIL import Image import numpy as np from os import path db_file = "gk-list.db" db_file2 = "gk-full.db" def represents_int(s): try: int(s) return True except...
mit
17,952,096,803,976,520
32.085106
107
0.557235
false
MaximKsh/web_1sem
repository/askkashirin/askservice/migrations/0001_initial.py
1
4667
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-11-15 15:14 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migratio...
unlicense
2,540,442,368,261,894,000
40.915888
190
0.550279
false
lpantano/bcbio-nextgen
bcbio/bam/coverage.py
7
6031
""" calculate coverage across a list of regions """ import os import six import matplotlib as mpl mpl.use('Agg', force=True) import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages import matplotlib import seaborn as sns import pandas as pd import pybedtools from bcbio.utils import rbind,...
mit
-3,364,233,992,817,136,000
40.881944
107
0.613
false
WimPessemier/uaf
examples/pyuaf/client/how_to_create_a_client.py
3
3439
# examples/pyuaf/client/how_to_create_a_client.py """ EXAMPLE: how to create a client ==================================================================================================== The Client constructor signature looks like this: pyuaf.client.Client.__init__(settings=None, loggingCallback=None) with: - '...
lgpl-3.0
8,404,964,052,538,288,000
44.263158
109
0.633324
false
umitproject/packet-manipulator
umit/pm/backend/scapy/context/sequence.py
2
12945
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2008, 2009 Adriano Monteiro Marques # # Author: Francesco Piccinno <stack.box@gmail.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 Found...
gpl-2.0
-7,979,146,477,143,538,000
35.36236
80
0.455388
false
adamrvfisher/TechnicalAnalysisLibrary
OptimizedShortVol.py
1
2647
# -*- coding: utf-8 -*- """ Created on Tue Feb 28 23:23:57 2017 @author: AmatVictoriaCuramIII """ import numpy as np from pandas_datareader import data import random as rand import pandas as pd import time as t empty = [] asone = pd.DataFrame() start = t.time() iterations = range(0,1000) s = data.DataReader('^VIX', 'y...
apache-2.0
-4,576,178,473,117,482,500
34.783784
78
0.585946
false
kimhungGCZ/combinedAL
nab/detectors/relative_entropy/relative_entropy_detector.py
1
7088
# ---------------------------------------------------------------------- # 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 program is free software: you can redistribute it and/or mo...
agpl-3.0
-3,531,688,756,232,306,000
37.945055
80
0.670147
false
MediaKraken/mkarchive
subprogram_reactor.py
1
6621
''' Copyright (C) 2015 Quinn D Granfor <spootdev@gmail.com> This program 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 Foundation. This program is distributed in the hope that it will be useful, but ...
gpl-2.0
8,269,457,984,934,147,000
43.736486
116
0.632533
false
vbshah1992/microblog
flask/lib/python2.7/site-packages/whoosh/lang/snowball/spanish.py
74
10978
from .bases import _StandardStemmer from whoosh.compat import u class SpanishStemmer(_StandardStemmer): """ The Spanish Snowball stemmer. :cvar __vowels: The Spanish vowels. :type __vowels: unicode :cvar __step0_suffixes: Suffixes to be deleted in step 0 of the algorithm. :type __step0_suff...
bsd-3-clause
-8,039,430,257,987,905,000
43.266129
80
0.363181
false
ghislainv/deforestprob
forestatrisk/data.py
1
8624
#!/usr/bin/env python # -*- coding: utf-8 -*- # ============================================================================== # author :Ghislain Vieilledent # email :ghislain.vieilledent@cirad.fr, ghislainv@gmail.com # web :https://ecology.ghislainv.fr # python_version :>=2.7 # license...
gpl-3.0
-6,452,142,456,088,238,000
35.854701
90
0.577342
false
kumauta/cf-php-build-pack
scripts/detect.py
5
1194
#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Lice...
apache-2.0
-7,230,200,000,013,928,000
35.181818
74
0.675879
false
ktbyers/netmiko
examples/send_command_prompting_expect.py
1
1176
#!/usr/bin/env python from netmiko import ConnectHandler from getpass import getpass cisco1 = { "device_type": "cisco_ios", "host": "cisco1.lasthop.io", "username": "pyclass", "password": getpass(), } command = "del flash:/test4.txt" net_connect = ConnectHandler(**cisco1) # CLI Interaction is as foll...
mit
-5,958,477,509,598,286,000
25.133333
83
0.708333
false
hairychris/aiohttp-sse
examples/simple.py
1
1538
import asyncio from aiohttp.web import Application, Response from aiohttp_sse import EventSourceResponse @asyncio.coroutine def hello(request): resp = EventSourceResponse() resp.start(request) for i in range(0, 100): print('foo') yield from asyncio.sleep(1, loop=loop) resp.send('fo...
apache-2.0
-3,035,414,821,445,613,000
24.213115
68
0.596229
false
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/vpn_client_parameters.py
1
2529
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-7,360,390,994,237,454,000
49.58
96
0.680111
false
KyleKing/My-Programming-Sketchbook
Assorted_Snippets/python/cli_prototyping/proto_04.py
1
3705
"""Experimenting with cmd2 modular command sets.""" import argparse from functools import partial from typing import List from cmd2 import Cmd, Cmd2ArgumentParser, CommandSet, Statement, with_argparser, with_category, with_default_category from cmd2.table_creator import BorderedTable, Column @with_default_category(...
mit
-302,727,635,497,535,600
30.666667
117
0.59973
false
tubaman/django-macaddress
macaddress/fields.py
2
3696
import django from django.core.exceptions import ValidationError from django.db import models from netaddr import EUI, AddrFormatError from .formfields import MACAddressField as MACAddressFormField from . import default_dialect, format_mac, mac_linux import warnings class MACAddressField(models.Field): descrip...
bsd-3-clause
-8,154,796,764,681,193,000
35.235294
124
0.612554
false
mrrrgn/AutobahnPython
examples/asyncio/wamp/basic/pubsub/unsubscribe/backend.py
5
1251
############################################################################### ## ## 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
-3,403,887,023,717,759,000
29.512195
79
0.610711
false
FRC-RS/FRS
api/views.py
1
1518
import json from django.core.serializers import serialize from django.apps import apps import django.http as dhttp from django.http import JsonResponse, HttpResponseBadRequest from annoying.decorators import ajax_request from TBAW.models import Team, Event from util.viewutils import ajax_success, ajax_failure, requi...
mit
3,201,671,841,173,588,500
25.172414
109
0.711462
false
tacaswell/scikit-xray
skbeam/core/fitting/tests/test_lineshapes.py
5
13164
# ###################################################################### # Copyright (c) 2014, Brookhaven Science Associates, Brookhaven # # National Laboratory. All rights reserved. # # # # @author: Li Li (lili@bnl.g...
bsd-3-clause
-2,416,997,508,392,550,400
36.08169
79
0.557353
false
SSJohns/osf.io
api_tests/users/views/test_user_list.py
3
11797
# -*- coding: utf-8 -*- import itsdangerous import mock from nose.tools import * # flake8: noqa import unittest import urlparse from modularodm import Q from tests.base import ApiTestCase from tests.factories import AuthUserFactory from api.base.settings.defaults import API_BASE from framework.auth.cas import CasR...
apache-2.0
6,450,712,556,851,597,000
37.552288
145
0.598372
false
ucsdlib/python-novice-inflammation
tools/test_check.py
14
20651
#! /usr/bin/env python """ Unit and functional tests for markdown lesson template validator. Some of these tests require looking for example files, which exist only on the gh-pages branch. Some tests may therefore fail on branch "core". """ import logging import os import unittest import check # Make log message...
cc0-1.0
7,094,286,710,470,991,000
34.790295
112
0.674786
false
andredalton/imecare
imecare/models.py
1
3418
#!/usr/bin/python # -*- coding: UTF8 -*- import re from django.db import models from django.contrib.auth.models import User def verifica_cpf(cpf): m = re.search("([0-9]{3})\.([0-9]{3})\.([0-9]{3})-([0-9]{2})", cpf) corpo = map(int, list(m.group(1) + m.group(2) + m.group(3))) digito = map(int, list(m.grou...
mit
-3,920,703,166,612,884,000
32.470588
106
0.650264
false
ContinuumIO/flask-kerberos-login
flask_kerberos_login/manager.py
1
4189
''' Provides a pluggable login manager that uses Kerberos for authentication ''' from __future__ import absolute_import, print_function, unicode_literals import logging import socket from flask import _request_ctx_stack as stack from flask import abort from flask import request import kerberos log = logging.getLogg...
bsd-2-clause
-2,819,058,152,270,959,000
29.355072
93
0.613512
false
hirofumi0810/tensorflow_end2end_speech_recognition
models/test/test_joint_ctc_attention.py
1
9620
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import sys import time import tensorflow as tf # from tensorflow.python import debug as tf_debug sys.path.append(os.path.abspath('../../')) from models...
mit
-4,821,190,604,367,840,000
43.537037
107
0.440644
false
hammerlab/avm
normalizer.py
1
1407
class Normalizer(object): """ Subtract mean and divide features by standard deviation before fitting/predicting """ def __init__(self, model, Xm=None, Xs=None): self.model = model self.Xm = Xm self.Xs = Xs # only provide `predict_proba` method to normalized model ...
apache-2.0
4,569,969,514,949,997,600
28.93617
66
0.552239
false
automl/ChaLearn_Automatic_Machine_Learning_Challenge_2015
004_evita.py
1
16535
import argparse import os from joblib import Parallel, delayed import numpy as np import autosklearn import autosklearn.data import autosklearn.data.competition_data_manager from autosklearn.pipeline.classification import SimpleClassificationPipeline parser = argparse.ArgumentParser() parser.add_argument('input') pa...
bsd-2-clause
-1,401,804,744,981,788,000
49.258359
87
0.640762
false
hmen89/odoo
addons/l10n_be_coda/__openerp__.py
12
3885
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...
agpl-3.0
-2,042,074,365,572,776,400
44.705882
104
0.683398
false
yyuu/botornado
boto/__init__.py
2
24502
# Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010-2011, Eucalyptus Systems, Inc. # Copyright (c) 2011, Nexenta Systems Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # ...
mit
617,761,813,169,589,000
36.464832
89
0.662354
false
steveb/heat
heat/tests/openstack/cinder/test_volume_type_encryption.py
1
4307
# # 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
3,891,123,585,374,962,000
39.632075
78
0.612956
false
veridiam/Madcow-Waaltz
build/lib/madcow/include/twisted/python/compat.py
10
5694
# -*- test-case-name: twisted.test.test_compat -*- # # Copyright (c) 2001-2007 Twisted Matrix Laboratories. # See LICENSE for details. """ Compatibility module to provide backwards compatibility for useful Python features. This is mainly for use of internal Twisted code. We encourage you to use the latest version of...
gpl-3.0
6,915,360,839,763,245,000
32.892857
75
0.556551
false
naototty/pyflag
src/plugins/DiskForensics/FileHandlers/Partitions.py
5
4057
""" This module handles automatic loading of partition tables. """ import pyflag.Scanner as Scanner import pyflag.DB as DB import pyflag.FileSystem as FileSystem import pyflag.pyflaglog as pyflaglog import pyflag.CacheManager as CacheManager import pdb import sk import pyflag.Magic as Magic import pyflag.FlagFramework...
gpl-2.0
6,980,197,623,057,290,000
31.456
90
0.54104
false
invesalius/invesalius3
invesalius/data/volume.py
4
32869
#-------------------------------------------------------------------------- # Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas # Copyright: (C) 2001 Centro de Pesquisas Renato Archer # Homepage: http://www.softwarepublico.gov.br # Contact: invesalius@cti.gov.br # License: GNU ...
gpl-2.0
-6,795,009,479,111,238,000
35.480577
125
0.574645
false
ntt-pf-lab/horizon
django-openstack/django_openstack/tests/broken/instance_tests.py
21
2479
# 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
2,569,180,666,064,712,000
34.927536
78
0.676886
false
jtraver/dev
python/prime/range2.py
1
1564
#!/usr/bin/python limit = 100000 primes = [] dprimes = {} def is_prime(pc): if pc in dprimes: return True if pc < 0: return False prime = True if pc < 1: return prime for idiv in xrange(1, len(primes)): div = primes[idiv] if div * div > pc: break...
mit
8,616,596,997,687,647,000
25.965517
103
0.480179
false
Johnzero/erp
openerp/addons/project_issue/project_issue.py
3
23891
#-*- 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
9,199,328,082,149,382,000
46.102564
272
0.546753
false
dddsjz/autograding-for-csmoodle
Main.py
1
8380
# -*- coding: UTF-8 -*- # !/usr/bin/env python _author_ = 'dddsjz' import ssl import urllib import urllib2 import cookielib import json import re from Tkinter import * import os # Reference: http://cuiqingcai.com/1052.html # 2017.11.1: logic should like this use re to get sesskey, student_id, and st...
mit
-617,679,762,815,400,600
36.796296
177
0.604415
false
SlicerRt/SlicerDebuggingTools
PyDevRemoteDebug/ptvsd-4.1.3/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_io.py
1
3488
from _pydevd_bundle import pydevd_constants IS_PY3K = pydevd_constants.IS_PY3K class IORedirector: ''' This class works to wrap a stream (stdout/stderr) with an additional redirect. ''' def __init__(self, original, new_redirect, wrap_buffer=False): ''' :param stream origina...
bsd-3-clause
2,334,412,119,029,055,000
27.811966
86
0.561067
false
teamosceola/bitbake
lib/bb/ui/crumbs/hoblistmodel.py
1
27825
# # BitBake Graphical GTK User Interface # # Copyright (C) 2011 Intel Corporation # # Authored by Joshua Lock <josh@linux.intel.com> # Authored by Dongxiao Xu <dongxiao.xu@intel.com> # Authored by Shane Wang <shane.wang@intel.com> # # This program is free software; you can redistribute it and/or modify # it unde...
gpl-2.0
-4,024,867,894,714,148,400
36.5
125
0.534304
false
nearlyfreeapps/python-googleadwords
tests/adspygoogle/adwords/v201206/remarketing_unittest.py
1
1751
#!/usr/bin/python # # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
6,638,489,876,345,648,000
29.719298
83
0.741291
false
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.2/Lib/distutils/command/bdist.py
1
4916
"""distutils.command.bdist Implements the Distutils 'bdist' command (create a built [binary] distribution).""" # created 2000/03/29, Greg Ward __revision__ = "$Id: bdist.py,v 1.21 2001/12/06 20:57:12 fdrake Exp $" import os, string from types import * from distutils.core import Command from distutils.errors import ...
mit
6,128,645,822,881,754,000
34.366906
77
0.543938
false
Yannig/ansible-modules-core
cloud/openstack/keystone_user.py
9
12566
#!/usr/bin/python # -*- coding: utf-8 -*- # Based on Jimmy Tang's implementation DOCUMENTATION = ''' --- module: keystone_user version_added: "1.2" short_description: Manage OpenStack Identity (keystone) users, tenants and roles description: - Manage users,tenants, roles from OpenStack. options: login_user: ...
gpl-3.0
3,295,743,497,863,464,000
30.493734
91
0.607274
false
maxamillion/atomic-reactor
tests/plugins/test_flatpak_create_dockerfile.py
1
3526
""" Copyright (c) 2017 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from flexmock import flexmock import json from modulemd import ModuleMetadata import responses import os from atomic_reactor.inner import D...
bsd-3-clause
271,557,634,577,478,270
29.66087
94
0.648894
false
xiejianying/pjsip_trunk
pjsip-apps/src/python/samples/registration.py
43
1995
# $Id$ # # SIP account and registration sample. In this sample, the program # will block to wait until registration is complete # # Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
gpl-2.0
262,688,797,470,756,380
27.5
77
0.67619
false
Azure/azure-sdk-for-python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/operations/_shared_gallery_images_operations.py
1
9136
# 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
-5,635,014,531,640,726,000
46.832461
188
0.6412
false
asteca/ASteCA
packages/synth_clust/synthClustPrep.py
1
2333
import numpy as np from . import synth_cluster from . add_errors import getSigmas def main(clp, pd): """ """ if pd['best_fit_algor'] != 'n': # Use the selected solution values for all the parameters. model = clp['isoch_fit_params'][pd['D3_sol'] + '_sol'] # Pack common args. ...
gpl-3.0
995,902,836,460,400,800
36.629032
79
0.582083
false
aviarypl/mozilla-l10n-addons-server
src/olympia/ratings/admin.py
2
3004
from django.contrib import admin from django.utils.html import format_html from django.utils.translation import ugettext_lazy as _ from django.urls import reverse from olympia.translations.utils import truncate_text from olympia.zadmin.admin import related_single_content_link from .models import Rating class Rating...
bsd-3-clause
3,857,850,833,888,143,000
34.341176
77
0.619507
false
vojtechtrefny/blivet-gui
blivetgui/blivetgui.py
1
22432
# -*- coding: utf-8 -*- # list_partitions.py # Main blivet-gui class for GUI # # 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...
gpl-2.0
-7,924,271,281,297,831,000
35.122383
116
0.584121
false
bkjones/bevis
bevis/bevis_server.py
1
7943
#!/usr/bin/env python """ A syslog receiver that queues messages to an AMQP broker. """ import errno import json import socket import logging import pika from tornado import ioloop, httpserver from loggerglue.rfc5424 import SyslogEntry class Bevis(httpserver.HTTPServer): """ bevis = bevis_server.Bevis(config...
bsd-3-clause
-9,159,939,354,227,504,000
30.772
79
0.528516
false
thnee/ansible
test/lib/ansible_test/_internal/util.py
13
26012
"""Miscellaneous utility functions and classes.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import contextlib import errno import fcntl import inspect import os import pkgutil import random import re import shutil import socket import stat import string import subprocess ...
gpl-3.0
9,083,042,423,914,896,000
26.790598
138
0.601607
false
gopchandani/ryu
ryu/tests/unit/ofproto/test_ofproto.py
2
3001
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2013 Isaku Yamahata <yamahata at private email ne jp> # # 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 # # h...
apache-2.0
-3,789,969,255,951,991,300
39.554054
79
0.581806
false
jdilallo/jdilallo-test
examples/dfp/v201311/custom_field_service/update_custom_fields.py
1
2345
#!/usr/bin/python # # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
7,011,441,882,691,880,000
30.689189
74
0.689552
false
onursumer/cbioportal
core/src/main/scripts/updateClinicalAttributesTable.py
1
16595
#! /usr/bin/env python # ------------------------------------------------------------------------------ # Script which updates clinical_attribute table within the cBioPortal database. # The following properties must be specified in portal.properties: # # db.portal_db_name # db.user # db.password # db.host # google.id ...
agpl-3.0
8,564,231,414,605,613,000
40.4875
160
0.639892
false
proxysh/Safejumper-for-Mac
buildmac/Resources/env/lib/python2.7/site-packages/obfsproxy/network/buffer.py
19
1998
class Buffer(object): """ A Buffer is a simple FIFO buffer. You write() stuff to it, and you read() them back. You can also peek() or drain() data. """ def __init__(self, data=''): """ Initialize a buffer with 'data'. """ self.buffer = bytes(data) def read(self,...
gpl-2.0
-3,339,923,523,502,183,000
25.64
70
0.521021
false
kivy/kivy
kivy/geometry.py
4
3792
''' Geometry utilities ================== This module contains some helper functions for geometric calculations. ''' __all__ = ('circumcircle', 'minimum_bounding_circle') from kivy.vector import Vector def circumcircle(a, b, c): ''' Computes the circumcircle of a triangle defined by a, b, c. See: http:...
mit
-4,329,429,996,711,527,000
30.338843
76
0.548787
false
msg/g2ools
nord/convert/filter.py
1
11049
# # filter.py - Filter tab conversion objects # # Copyright (c) 2006,2007 Matt Gerassimoff # # This file is part of g2ools. # # g2ools 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 Li...
gpl-2.0
-8,236,602,028,368,334,000
33.313665
80
0.663408
false
MSPARP/newparp
newparp/views/characters.py
1
4091
import json from flask import g, jsonify, redirect, request, render_template, url_for from sqlalchemy.orm import joinedload from newparp.helpers import alt_formats from newparp.helpers.auth import activation_required from newparp.helpers.characters import character_query, save_character_from_form, validate_character_...
agpl-3.0
6,142,355,101,788,195,000
28.861314
110
0.681496
false
wda-hb/test
registration/tests/forms.py
27
5663
from __future__ import unicode_literals from distutils.version import StrictVersion from django import get_version from django.test import TestCase from registration import forms from registration.users import UserModel DJANGO_VERSION = StrictVersion(get_version()) class RegistrationFormTests(TestCase): """ ...
bsd-3-clause
8,009,391,814,884,395,000
42.229008
129
0.492848
false
enoex/django-shop
shop/util/login_mixin.py
20
2133
""" A mixin class that provides view securing functionality to class based views similar to the @login_required() decorator. """ from django.conf import settings from django.contrib.auth import logout from django.contrib.auth.decorators import user_passes_test from django.http import HttpResponseRedirect class LoginM...
bsd-3-clause
472,386,506,311,975,360
31.318182
76
0.639944
false
orione7/plugin.video.streamondemand-pureita
lib/sambatools/nmb/utils.py
10
1510
import re import string def encode_name(name, type, scope = None): """ Perform first and second level encoding of name as specified in RFC 1001 (Section 4) """ if name == '*': name = name + '\0' * 15 elif len(name) > 15: name = name[:15] + chr(type) else: name = string....
gpl-3.0
-1,968,895,061,272,961,500
29.2
88
0.538411
false
benbest86/watsancomm
watsancomm.py
1
2202
import os, logging, datetime os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' from google.appengine.dist import use_library use_library('django', '1.2') try: from settings import CUTOFF_DAY, REMINDER_DAY except ImportError: CUTOFF_DAY = 6 REMINDER_DAY = 4 from google.appengine.ext import webapp from google...
bsd-3-clause
-5,441,149,783,211,365,000
36.322034
93
0.611262
false
NeCTAR-RC/nova
nova/api/openstack/compute/legacy_v2/contrib/availability_zone.py
1
6020
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
-9,053,240,428,898,729,000
39.952381
79
0.590698
false
crmccreary/openerp_server
openerp/addons/account_multistep_income_statement/__init__.py
1
1088
# -*- 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,846,309,633,315,130,000
42.52
78
0.621324
false
reviewboard/rbintegrations
docs/releasenotes/_ext/extralinks.py
2
1536
"""Sphinx plugins for special links in the Release Notes.""" from __future__ import unicode_literals from docutils import nodes, utils def setup(app): app.add_config_value('bugtracker_url', '', True) app.add_role('bug', bug_role) app.add_role('cve', cve_role) def bug_role(role, rawtext, text, linenum,...
mit
-262,050,317,709,809,540
31.680851
76
0.59375
false
sajuptpm/magnum
magnum/opts.py
3
2082
# Copyright 2014 # The Cloudscaling Group, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
apache-2.0
-7,473,204,428,388,660,000
39.823529
77
0.696446
false
kgeorgy/django-rest-framework
tests/test_prefetch_related.py
10
2016
from django.contrib.auth.models import Group, User from django.test import TestCase from rest_framework import generics, serializers from rest_framework.test import APIRequestFactory factory = APIRequestFactory() class UserSerializer(serializers.ModelSerializer): class Meta: model = User fields ...
bsd-2-clause
-2,665,319,804,283,417,000
33.758621
97
0.610615
false
jwmcglynn/videosync
server/room_controller.py
1
14611
import models.room as room_model import video_resolver import vote_controller import itertools import unicodedata from services.common import UrlError from services.youtube import VideoError active_rooms = dict() NoSuchRoomException = room_model.NoSuchRoomException def filter_non_printable(s): # Strip ...
isc
-637,770,963,327,679,900
28.695378
103
0.657381
false
BackupGGCode/python-for-android
python3-alpha/python3-src/Doc/includes/mp_webserver.py
48
2056
# # Example where a pool of http servers share a single listening socket # # On Windows this module depends on the ability to pickle a socket # object so that the worker processes can inherit a copy of the server # object. (We import `multiprocessing.reduction` to enable this pickling.) # # Not sure if we should synch...
apache-2.0
8,410,578,707,310,270,000
28.371429
77
0.691634
false
awsdit/awsdit
aws_audit/local_helpers/ec2_helper.py
2
20391
""" ec2 helper calls. """ import boto3 import re import time import datetime import dateutil.parser from local_helpers import misc def date_to_days(time_stamp): if time_stamp: today = datetime.datetime.now() create_date = datetime.datetime.strptime(time_stamp, "%Y-%m-%dT%H:%M:%S.%fZ") ret...
gpl-2.0
-2,497,022,850,391,803,400
39.060904
91
0.487127
false
cwlseu/recipes
PythonApp/cocoanalysis/src/plot.py
2
2163
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm from matplotlib.ticker import LinearLocator, FormatStrFormatter def draw_histmap(z, x, y, filename): fig = plt.figure() ax = Axes3D(fig) #ax = fig.gca(projection='3d') ax.plot(x, y, z, l...
gpl-3.0
-4,325,561,795,716,307,000
30.823529
99
0.627369
false
tunetosuraj/spectrum
recommenders/keyword_api.py
1
8701
import requests, os, nltk, math from items.models import Key # from people.models import UserProfile from recommenders.models import KeyToKeyLink, KeyToUserLink class BigHugeThesaurus: def __init__(self, key=None): self.url = "http://words.bighugelabs.com/api/2/" self.key = key def request(se...
agpl-3.0
4,338,635,809,597,963,000
31.588015
163
0.557292
false
CIGNo-project/CIGNo
cigno/metadata/forms.py
1
3488
# -*- coding: utf-8 -*- from django import forms import json import os import tempfile from models import * supported_format = (".shp", ".tif", ".tiff", ".geotif", ".geotiff") class JSONField(forms.CharField): def clean(self, text): text = super(JSONField, self).clean(text) try: return...
gpl-3.0
-7,000,093,021,048,509,000
46.135135
592
0.679759
false
gazeti/aleph
aleph/views/leads_api.py
3
1652
from flask import Blueprint, request from apikit import obj_or_404, jsonify, request_data from werkzeug.exceptions import BadRequest from aleph.model import Collection, EntityIdentity from aleph.search import QueryState from aleph.search.leads import leads_query from aleph.logic import update_entity, update_lead from ...
mit
1,808,863,678,686,182,700
38.333333
72
0.72155
false