text
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
231
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
score
float64
0
0.34
#!/usr/bin/env python import random, os.path #import basic pygame modules import pygame from pygame.locals import * #see if we can load more than standard BMP if not pygame.image.get_extended(): raise SystemExit("Sorry, extended image module required") #game constants MAX_SHOTS = 2 #mos...
varogami/c4rdz
c4rdz-gui.py
Python
gpl-3.0
9,876
0.006683
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Andrey Klychkov (@Andersson007) <aaklychkov@mail.ru> # 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 = {...
SergeyCherepanov/ansible
ansible/ansible/modules/database/postgresql/postgresql_idx.py
Python
mit
17,072
0.002284
#!/usr/bin/env python import os from skimage._build import cython base_path = os.path.abspath(os.path.dirname(__file__)) def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs config = Configuration('morphology', parent_package, top_...
chintak/scikit-image
skimage/morphology/setup.py
Python
bsd-3-clause
2,125
0.000471
#!/usr/bin/env python #coding:utf-8 # Author: mozman --<mozman@gmx.at> # Purpose: test svg element # Created: 25.09.2010 # Copyright (C) 2010, Manfred Moitzi # License: MIT License import sys import unittest from svgwrite.container import SVG, Symbol class TestSVG(unittest.TestCase): def test_constructor(self):...
MindPass/Code
Interface_graphique/mindmap/svgwrite-1.1.6/tests/test_svg.py
Python
gpl-3.0
802
0.009975
from __future__ import absolute_import from .dev import Dev # noqa try: from .production import Production # noqa except ImportError: pass
DanielGabris/radius_restserver
src/settings/__init__.py
Python
mit
149
0.020134
#!/usr/bin/env python # -*- coding: utf-8 -*- from .randomproxy import ProxyDownloaderMiddleware
Alexoner/web-crawlers
scripts/rails.ctrip.com/ctripRails/middlewares/__init__.py
Python
gpl-2.0
98
0
from flask import Flask import config from db import db_from_config from address_deduper.views import init_views from address_normalizer.deduping.near_duplicates import * def create_app(env, **kw): app = Flask(__name__) specified_config = kw.get('config') if specified_config: __import__('address_...
openvenues/address_deduper
address_deduper/__init__.py
Python
mit
765
0.006536
import base64 import pathlib import pickle import textwrap from docutils.nodes import FixedTextElement, General, SkipNode from uqbar.book.extensions import Extension from uqbar.strings import normalize from supriya.ext import websafe_audio from supriya.io import Player class RenderExtension(Extension): template...
Pulgama/supriya
supriya/ext/book.py
Python
mit
2,339
0.000855
__doc__ = """Random number array generators for numarray. This package was ported to numarray from Numeric's RandomArray and provides functions to generate numarray of random numbers. """ from RandomArray2 import *
fxia22/ASM_xf
PythonD/site_python/numarray/random_array/__init__.py
Python
gpl-2.0
218
0.004587
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2019-01-29 16:08 from __future__ import unicode_literals import django.contrib.postgres.fields from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('dashboard', '0013_auto_...
linea-it/qlf
backend/framework/qlf/dashboard/migrations/0014_product.py
Python
gpl-3.0
995
0.00402
#20140125 Cui.Yingyun #Convert C style code to Char style import sys file = sys.stdin if len(sys.argv) > 1: file = open(sys.argv[1]) else: print "Input argument which specify shader program" sys.exit(0); lines = file.readlines() print '\"\\' for line in lines[:-1]: print line.rstrip() + '\\n\\' print lin...
yingyun/RendererEvaluator
utils/Shader2Char.py
Python
gpl-2.0
360
0.013889
#************************************************************************ # Codelet Tuning Infrastructure # Copyright (C) 2010-2015 Intel Corporation, CEA, GENCI, and UVSQ # # 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 # th...
franck-talbart/codelet_tuning_infrastructure
ctr-common/plugins/34f27d92-f558-4121-b862-85216c54e18f/main.py
Python
gpl-3.0
2,154
0.010678
response.title = settings.title response.subtitle = settings.subtitle response.meta.author = '%(author)s <%(author_email)s>' % settings response.meta.keywords = settings.keywords response.meta.description = settings.description response.menu = [ (T('Index'),URL('default','index')==URL(),URL('default','index'),[]), ...
sloe/analyseapp
models/menu.py
Python
apache-2.0
523
0.026769
def vault(args): parser = argparse.ArgumentParser() subparsers = parser.add_subparsers() if __name__ == "__main__": vault(sys.argv)
thatguystone/vault
vault/cmd.py
Python
mit
136
0.029412
# -*- coding: utf-8 -*- # # phaxio-python documentation build configuration file, created by # sphinx-quickstart on Sun Jan 8 20:17:15 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file....
anpolsky/phaxio-python
docs/source/conf.py
Python
apache-2.0
5,715
0.001225
# Copyright 2013 dotCloud 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 t...
kpavel/docker-py
docker/auth/auth.py
Python
apache-2.0
6,366
0
def foo(a, b=None): pass foo("a", "b") foo("a") foo("a", b="b") foo("a", None)
siosio/intellij-community
python/testData/refactoring/changeSignature/newParameterWithSignatureDefaultMakesSubsequentExistingParametersUseKeywordArguments.before.py
Python
apache-2.0
82
0.02439
# -*- coding: utf-8 -*- import re import unittest import django from django.conf import settings from django.db import models, connection from django.test import TestCase from django.utils import timezone from .fields import ( EncryptedCharField, EncryptedTextField, EncryptedDateTimeField, EncryptedI...
plentific/django-encrypted-fields
encrypted_fields/tests.py
Python
mit
9,124
0.001316
# -*- coding: UTF-8 -*- ''' series9 scraper for Exodus forks. Nov 9 2018 - Checked Updated and refactored by someone. Originally created by others. ''' import re,traceback,urllib,urlparse from resources.lib.modules import cleantitle from resources.lib.modules import client from resources.lib.modules i...
RuiNascimento/krepo
script.module.lambdascrapers/lib/lambdascrapers/sources_ lambdascrapers/en/series9.py
Python
gpl-2.0
7,221
0.008725
#!/usr/bin/env python # # Copyright (c) 2011, Willow Garage, 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 # n...
stonier/ecto
test/benchmark/metrics.py
Python
bsd-3-clause
4,501
0.004888
# -*- coding: utf-8 -*- # This file is a part of MediaDrop (http://www.mediadrop.net), # Copyright 2009-2014 MediaDrop contributors # For the exact contribution history, see the git revision log. # The source code in this file is dual licensed under the MIT license or # the GPLv3 or (at your option) any later version. ...
kgao/MediaDrop
mediadrop/lib/auth/tests/static_query_test.py
Python
gpl-3.0
1,790
0.006145
#!/usr/bin/python35 def add(x, y): return x + y def dec(x, y): return x - y def div(x, y): if y == 0: return 0 return x / y def mult(x, y): return x * y if __name__ == '__main__': print('Module: Calc')
JShadowMan/package
python/module/calc/calc.py
Python
mit
239
0.016736
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-11-01 20:02 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('phone_numbers', '0001_initial'), ...
RobSpectre/garfield
garfield/phone_numbers/migrations/0002_phonenumber_related_sim.py
Python
mit
626
0.001597
# -*- coding: utf-8 -*- """ ********** Exceptions ********** Base exceptions and errors for NetworkX. """ __author__ = """Aric Hagberg (hagberg@lanl.gov)\nPieter Swart (swart@lanl.gov)\nDan Schult(dschult@colgate.edu)\nLoïc Séguin-C. <loicseguin@gmail.com>""" # Copyright (C) 2004-2016 by # Aric Hagberg <hagberg...
SanketDG/networkx
networkx/exception.py
Python
bsd-3-clause
1,828
0.005476
name = "hello_world" version = "1.0.0" authors = [ "ajohns" ] description = \ """ Python-based hello world example package. """ tools = [ "hello" ] requires = [ "python" ] uuid = "examples.hello_world_py" build_command = 'python {root}/build.py {install}' def commands(): env.PYTHONPA...
nerdvegas/rez
example_packages/hello_world/package.py
Python
apache-2.0
381
0.002625
from netfields import InetAddressField, CidrAddressField from django.db import models from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from django.conf import settings from nodeshot.core.base.models import BaseAccessLevel from ..managers import NetAccessLevelM...
sephiroth6/nodeshot
nodeshot/networking/net/models/ip.py
Python
gpl-3.0
2,430
0.002881
def ternary(cond1, result1, result2): if cond1: return result1 else: return result2
ferdhika31/smarttraffic
hmmtagger/java2python_runtime.py
Python
gpl-3.0
108
0
from itertools import tee, chain, combinations from collections import defaultdict from pgmpy.factors import Factor from pgmpy.factors.Factor import factor_product from pgmpy.inference import Inference, BeliefPropagation class DBNInference(Inference): def __init__(self, model): """ Class for perf...
anaviltripathi/pgmpy
pgmpy/inference/dbn_inference.py
Python
mit
18,559
0.00167
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
punalpatel/st2
st2common/st2common/validators/api/reactor.py
Python
apache-2.0
3,644
0.003293
#!/usr/bin/env python """ Extract minor planet orbital elements and discovery dates to json. Orbital elements are extracted from the file MPCORB.DAT: https://minorplanetcenter.net/iau/MPCORB/MPCORB.DAT Discovery dates are extracted from the file NumberedMPs.txt: https://minorplanetcenter.net/iau/lists/NumberedMPs.txt ...
sn3p/Orrery
data/data_to_json.py
Python
mit
4,117
0.005101
# -*-coding:Utf-8 -* # Copyright (c) 2013 LE GOFF Vincent # 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 # lis...
stormi/tsunami
src/secondaires/navigation/equipage/volontes/relacher_gouvernail.py
Python
bsd-3-clause
3,566
0.000563
from trifle.server.views.frontend import frontend from trifle.server.views.api import api from trifle.server.views.monitor import monitor from trifle.server.views.configure import configure
gloaec/trifle
src/trifle/server/views/__init__.py
Python
gpl-3.0
200
0.02
""" Mail.ru OAuth2 backend, docs at: http://psa.matiasaguirre.net/docs/backends/mailru.html """ from hashlib import md5 from social.p3 import unquote from social.backends.oauth import BaseOAuth2 class MailruOAuth2(BaseOAuth2): """Mail.ru authentication backend""" name = 'mailru-oauth2' ID_KEY = 'uid'...
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/social/backends/mailru.py
Python
agpl-3.0
1,693
0
# Halley provider definition # Mandatory imports from .Provider import Provider from rfeed import * # Optional imports import requests, mimetypes, logging logging.basicConfig(level=logging.INFO) from bs4 import BeautifulSoup as bs # Halley provider class inherit from the Provider one defined in providers/Provider.py...
RicostruzioneTrasparente/rt-scrapers
providers/Halley.py
Python
gpl-3.0
6,427
0.012916
# coding: utf-8 """ Copyright 2015 SmartBear Software 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...
eshijia/magnum
magnum/common/pythonk8sclient/swagger_client/models/v1_persistent_volume_claim_list.py
Python
apache-2.0
5,511
0.001633
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import os os.environ['DJANGO_SETTINGS_MODUL...
ta2-1/pootle
pootle/apps/pootle_app/management/commands/set_filetype.py
Python
gpl-3.0
2,012
0.001988
#!/usr/bin/env python """ MaTiSSe.py, Markdown To Impressive Scientific Slides """ from __future__ import print_function import argparse import os import sys from matisse_config import MatisseConfig from presentation import Presentation __appname__ = "MaTiSSe.py" __description__ = "MaTiSSe.py, Markdown To Impressive S...
szaghi/MaTiSSe
release/MaTiSSe-1.2.0/matisse/matisse.py
Python
gpl-3.0
4,821
0.010786
# quick_info/models.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- # Diagrams here: https://docs.google.com/drawings/d/1fEs_f2-4Du9knJ8FXn6PQ2BcmXL4zSkMYh-cp75EeLE/edit from ballot.models import OFFICE, CANDIDATE, POLITICIAN, MEASURE, KIND_OF_BALLOT_ITEM_CHOICES from django.db import models from exce...
wevote/WeVoteServer
quick_info/models.py
Python
mit
40,696
0.002408
# -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2020 PyBuilder Team # # 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/l...
pybuilder/pybuilder
src/unittest/python/graph_utils_tests.py
Python
apache-2.0
2,592
0.003472
#!/usr/bin/env python from __future__ import division import math import optparse import sys #------------------------------------------------------------------------------- # Illumicone simulator, based on code from: https://github.com/zestyping/openpixelcontrol NUM_STRINGS = 48 PIXELS_PER_STRING = 100 SCALE = 7 ...
skipzone/Illumicone
simulator/coneLayouts/cone.py
Python
gpl-3.0
1,276
0.007053
# coding=utf-8 from __future__ import unicode_literals from collections import OrderedDict from .. import BaseProvider localized = True class Provider(BaseProvider): all_colors = OrderedDict(( ("AliceBlue", "#F0F8FF"), ("AntiqueWhite", "#FAEBD7"), ("Aqua", "#00FFFF"), ("Aquamarin...
deanishe/alfred-fakeum
src/libs/faker/providers/color/__init__.py
Python
mit
5,864
0
#-*- coding: utf-8 -*- import traceback from libcommon import utils from libcommon import commonlib from libcommon.logger import stsdebug #---------------------------------- # 获取san服务是否运行 #---------------------------------- def get_san_status(): san_status = False try: retcode,proc = utils.cust_popen(...
liangtianyou/ST
stserver/libcommon/san/stssan.py
Python
gpl-3.0
644
0.019169
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F def norm_col_init(weights, std=1.0): x = torch.randn(weights.size()) x *= std / torch.sqrt((x**2).sum(1, keepdim=True)) return x def weights_init(m): classname = m.__class__.__name__ if classname.find('Conv') !=...
Nasdin/ReinforcementLearning-AtariGame
A3CModel.py
Python
bsd-3-clause
2,624
0.001143
from core.himesis import Himesis, HimesisPreConditionPatternLHS import uuid class HAssignmentInstance_CompleteLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the AToM3 model HAssignmentInstance_CompleteLHS. """ ...
levilucio/SyVOLT
mbeddr2C_MM/Contracts/HAssignmentInstance_CompleteLHS.py
Python
mit
94,636
0.01379
# # 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...
fedora-conary/conary
config/components/invariant/test.py
Python
apache-2.0
625
0
from django.conf import settings from django.conf.urls import include, url from django.views.generic import TemplateView from django.contrib import admin admin.autodiscover() from booth.views import HomepageView urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^accounts/', include('allauth.ur...
uucastine/soundbooth
soundbooth/urls.py
Python
bsd-3-clause
658
0.00304
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2017 Malcolm Ramsay <malramsay64@gmail.com> # # Distributed under terms of the MIT license. """Test function from the generation of figures.""" import math import gsd.hoomd from hypothesis import given from hypothesis.strategies import f...
malramsay64/MD-Molecules-Hoomd
test/figures_test.py
Python
mit
1,269
0.003155
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Dummy migration pass def backwards(self, orm): # Dummy migration pass models = { ...
mpetyx/palmdrop
venv/lib/python2.7/site-packages/cms/migrations/0036_auto__add_field_cmsplugin_changed_date.py
Python
apache-2.0
19,523
0.003739
#!/usr/bin/env python # -*- coding: utf8 -*- ### # Copyright (c) 2011, Valentin Lorentz # 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 abov...
kg-bot/SupyBot
plugins/GUI/frontend/frontend.py
Python
gpl-3.0
9,802
0.00153
""" # Pytess Pure Python tessellation of points into polygons, including Delauney/Thiessin, and Voronoi polygons. Built as a convenient user interface for Bill Simons/Carson Farmer python port of Steven Fortune C++ version of a Delauney triangulator. ## Platforms Tested on Python version 2.x. ## Dependencies Pu...
maxalbert/Pytess
pytess/__init__.py
Python
mit
1,265
0.003162
def load_text_file(text_file: str) -> str: with open(text_file, 'r') as f: return f.read()
kyuridenamida/atcoder-tools
atcodertools/fileutils/load_text_file.py
Python
mit
103
0
# -*- coding: utf-8 -*- from qiniu import config from qiniu import http class PersistentFop(object): """持久化处理类 该类用于主动触发异步持久化操作,具体规格参考: http://developer.qiniu.com/docs/v6/api/reference/fop/pfop/pfop.html Attributes: auth: 账号管理密钥对,Auth对象 bucket: 操作资源所在空间 pipeline: ...
hotpoor-for-Liwei/hj_hackathon_201607
vendor/qiniu/services/processing/pfop.py
Python
mit
1,697
0.001394
################################################################################ # 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...
hequn8128/flink
flink-python/pyflink/ml/tests/test_params.py
Python
apache-2.0
6,487
0.001233
# Copyright 2021 The Google Earth Engine Community 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
google/earthengine-community
samples/python/apidocs/ee_dictionary_aside.py
Python
apache-2.0
1,056
0.002841
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
hjanime/VisTrails
vistrails/core/vistrail/port_spec.py
Python
bsd-3-clause
20,455
0.002982
# ============================================================================= # Copyright (C) 2010 Diego Duclos # # This file is part of pyfa. # # pyfa 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 ...
DarkFenX/Pyfa
gui/builtinStatsViews/resistancesViewFull.py
Python
gpl-3.0
9,855
0.003146
""" Benchmark functions for fftpack.pseudo_diffs module """ from numpy import arange, sin, cos, pi, exp, tanh, sign from .common import Benchmark, safe_import with safe_import(): from scipy.fftpack import diff, fft, ifft, tilbert, hilbert, shift, fftfreq def direct_diff(x, k=1, period=None): fx = fft(x) ...
WarrenWeckesser/scipy
benchmarks/benchmarks/fftpack_pseudo_diffs.py
Python
bsd-3-clause
2,237
0
import unittest from src.data_structures.mockdata import MockData class TestMockData (unittest.TestCase): def setUp(self): self.data = MockData() def test_random_data(self): data = MockData() a_set = data.get_random_elements(10) self.assertTrue(len(a_set) == 10, "the data sh...
alcemirsantos/algorithms-py
tests/data_stuctures/test_mockdata.py
Python
mit
400
0.0025
#%% # Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
fx2003/tensorflow-study
TensorFlow实战/《TensorFlow实战》代码/3_2_HelloWorld.py
Python
mit
1,784
0.001682
try: import openeye # These can only be imported if openeye tools are available from smarty.atomtyper import * from smarty.sampler import * from smarty.utils import * from smarty.sampler_smirky import * except Exception as e: print(e) print('Warning: Cannot import openeye toolkit; not a...
open-forcefield-group/smarty
smarty/__init__.py
Python
mit
392
0.002551
##################################################################### # # core.py # # Copyright (c) 2015, Eran Egozy # # Released under the MIT License (http://opensource.org/licenses/MIT) # ##################################################################### import kivy from kivy.app import App from kivy.core.window...
eflynch/pygamelan
pygamelan/core.py
Python
gpl-2.0
2,581
0.019372
# -*- coding: utf-8 -*- import logging if __name__ == '__main__': logging.basicConfig() _log = logging.getLogger(__name__) import pyxb.binding.generate import pyxb.binding.datatypes as xsd import pyxb.utils.domutils from xml.dom import Node import os.path schema_path = os.path.abspath(os.path.join(os.path.dirname(...
pabigot/pyxb
tests/drivers/test-ctd-simple.py
Python
apache-2.0
1,997
0.007511
#!/usr/bin/python # Copyright 2017-present Open Networking 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 ap...
opencord/maas
library/maas_item.py
Python
apache-2.0
6,217
0.006434
from .utils import do, do_ex, trace from .version import meta from os.path import abspath, realpath FILES_COMMAND = 'git ls-files' DEFAULT_DESCRIBE = 'git describe --dirty --tags --long --match *.*' def parse(root, describe_command=DEFAULT_DESCRIBE): real_root, _, ret = do_ex('git rev-parse --show-toplevel', ro...
esben/setuptools_scm
setuptools_scm/git.py
Python
mit
1,196
0
# -*- coding: utf-8 -*- # pylint: disable=locally-disabled, star-args """ WebDAV upload method for dput. Install to "/usr/share/dput/webdav.py". """ from __future__ import with_statement import re import os import sys import cgi import netrc import socket import fnmatch import getpass import httplib import urllib...
1and1/artifactory-debian
dput-webdav/webdav.py
Python
apache-2.0
17,864
0.004646
#-*- coding: utf-8 -*- # This file based on MIT licensed code at: https://github.com/imwilsonxu/fbone from functools import wraps from flask import abort from flask.ext.login import current_user def admin_required(f): @wraps(f) def decorated_function(*args, **kwargs): if not current_user.is_admin()...
achanda/refstack
refstack/decorators.py
Python
apache-2.0
409
0.002445
# coding=utf-8 # Copyright (C) Duncan Macleod (2015) # # This file is part of the GW DetChar python package. # # GW DetChar 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 #...
lscsoft/gwdetchar
gwdetchar/omega/__init__.py
Python
gpl-3.0
1,099
0
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'DESCRIPTION.md'), encoding='utf-8') as f: long_description = f.read() setup( name='jestocke-mangopaysdk', version='3.0.6', description='A clie...
chocopoche/mangopay2-python-sdk
setup.py
Python
mit
1,575
0.001905
#!/usr/bin/env python from __future__ import print_function import os import subprocess syst_names = ['nominal','lightdown','lightup','ckv','calibneg','calibpos','calibshape'] flists = [syst_name+'.txt' for syst_name in syst_names] def process_dataset(ds_idx): flist = flists[ds_idx] fns = [] with open(...
kaikai581/NOvA
xsec-2019/check_light_syst/check_entries/file_lists/pull_common_files.py
Python
gpl-2.0
1,096
0.014599
# -*- coding: utf-8 -*- # # HnTool rules - php # Copyright (C) 2009-2010 Candido Vieira <cvieira.br@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 Foundation; either version 2 of the Lic...
hdoria/HnTool
HnTool/modules/php.py
Python
gpl-2.0
4,760
0.005252
#!/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 DOCUMENTATION = ''' --- module: git autho...
dmsimard/ansible
lib/ansible/modules/git.py
Python
gpl-3.0
53,677
0.002459
#!/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 # "...
grs/amqp_subscriptions
d.py
Python
apache-2.0
2,628
0.003044
# 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 pants.build_gra...
dturner-tw/pants
src/python/pants/backend/graph_info/tasks/sorttargets.py
Python
apache-2.0
1,081
0.007401
import numpy as np from pyraf import iraf from pyraf.iraf import kepler ''' Useful functions for Kepler light curve processing Use this with the program 'makelc.py' Originally by Jean McKeever Edited and improved by Meredith Rawls ''' # calculate orbital phase # times must be a list of observation times in the same un...
mrawls/kepler-makelc
lc_functions.py
Python
mit
5,357
0.022961
"""Implementation of __array_function__ overrides from NEP-18.""" import collections import functools import os import textwrap from numpy.core._multiarray_umath import ( add_docstring, implement_array_function, _get_implementing_args) from numpy.compat._inspect import getargspec ARRAY_FUNCTION_ENABLED = bool( ...
grlee77/numpy
numpy/core/overrides.py
Python
bsd-3-clause
8,273
0.000363
""" Support to interact with a Music Player Daemon. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.mpd/ """ import logging import socket import voluptuous as vol from homeassistant.components.media_player import ( MEDIA_TYPE_MUSIC, SUP...
srcLurker/home-assistant
homeassistant/components/media_player/mpd.py
Python
mit
7,141
0
import threading import socket from urllib3.contrib import socks from urllib3.exceptions import ConnectTimeoutError, NewConnectionError from dummyserver.server import DEFAULT_CERTS from dummyserver.testcase import IPV4SocketDummyServerTestCase from nose.plugins.skip import SkipTest try: import ssl from urll...
Lukasa/urllib3
test/contrib/test_socks.py
Python
mit
21,538
0
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals from six import iteritems, string_types """build query for doclistview and return results""" import frappe, json, copy, re import frappe.defaults import frappe.share import fra...
tundebabzy/frappe
frappe/model/db_query.py
Python
mit
21,717
0.027766
########################################################################### # # This program is part of Zenoss Core, an open source monitoring platform. # Copyright (C) 2008, Zenoss Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License versi...
anksp21/Community-Zenpacks
ZenPacks.community.powerware/setup.py
Python
gpl-2.0
3,281
0.009448
# -*- coding: utf-8 -*- from tests import base from app import pivocram class PivocramConnetcTest(base.TestCase): def setUp(self): self.connect = pivocram.Connect('PIVOTAL_TEST_TOKEN') def test_should_have_the_pivotal_api_url(self): self.connect.PIVOTAL_URL.should.be.equal('https://www.pivota...
Maethorin/pivocram
tests/unit/test_pivocram.py
Python
mit
8,498
0.00353
""" Functions and classes dealing with commands. """
robobrobro/coffer
coffer/command/commands/__init__.py
Python
mit
53
0
# THIS FILE IS AUTO-GENERATED. DO NOT EDIT from verta._swagger.base_type import BaseType class ModeldbFindHydratedProjectsByTeam(BaseType): def __init__(self, find_projects=None, org_id=None, name=None, id=None): required = { "find_projects": False, "org_id": False, "name": False, "id": F...
mitdbg/modeldb
client/verta/verta/_swagger/_public/modeldb/model/ModeldbFindHydratedProjectsByTeam.py
Python
mit
1,079
0.012048
# -*- coding: utf-8 -*- # darwinvpnlauncher.py # Copyright (C) 2013 LEAP # # 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 later versio...
laborautonomo/bitmask_client
src/leap/bitmask/services/eip/darwinvpnlauncher.py
Python
gpl-3.0
6,729
0
# coding: utf-8 """ MINDBODY Public API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import impo...
mindbody/API-Examples
SDKs/Python/test/test_client_api.py
Python
bsd-2-clause
5,280
0
import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_corellia_house_large_style_02_deed.iff", "object/building/player/shared_player_house_generic_large_style_02.iff", 5...
agry/NGECore2
scripts/houses/player_house_corellia_large_style_02.py
Python
lgpl-3.0
706
0.022663
#!/usr/bin/python # This was originally created to target inclusion in soumith's benchmarks as # https://github.com/soumith/convnet-benchmarks # extending this to handle also a couple of clarke and storkey type layers # and some plausible mnist layers from __future__ import print_function import os import sys import ...
MiniLight/DeepCL
python/benchmarking/deepcl_benchmark2.py
Python
mpl-2.0
11,420
0.009632
# -*- coding: utf-8 -*- u""" .. module:: organizations """ from django.contrib import messages from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.shortcuts import get_object_or_404 from django.shortcuts import redirect from django.shortcuts import render...
stxnext-csr/volontulo
apps/volontulo/views/organizations.py
Python
mit
6,645
0
class Post(object): def __init__(self, **kwargs): self.__dict__.update(kwargs) def __iter__(self): return iter(self.__dict__)
emitrom/integra-openstack-ui
workflows/post/post.py
Python
apache-2.0
151
0
from flask.ext.restplus import Namespace from app.api.tickets import ORDER, TICKET from app.helpers.ticketing import TicketingManager from app.api.helpers.helpers import ( requires_auth, can_access, replace_event_id) from app.api.helpers.utils import POST_RESPONSES from app.api.helpers.utils import Resource f...
SaptakS/open-event-orga-server
app/api/attendees.py
Python
gpl-3.0
2,552
0.002351
#!/usr/bin/env python ''' Component to handle data storage and search of all commands run ''' from framework.dependency_management.dependency_resolver import BaseComponent from framework.dependency_management.interfaces import CommandRegisterInterface from framework.lib.general import cprint from framework.db import m...
DePierre/owtf
framework/db/command_register.py
Python
bsd-3-clause
2,347
0.001704
import numpy as np import keras from keras.datasets import mnist from keras.models import Model, Sequential from keras.layers import Input, Dense, Conv2D, MaxPooling2D, UpSampling2D from keras.layers import Flatten, Reshape from keras import regularizers from plotly import offline as py import plotly.graph_objs as go ...
Christoph/tag-connect
keyvis_add/ml.py
Python
mit
2,394
0.002924
# OCF 1.0 doesn't define unique groups, they are defined since OCF 1.1. Pcs # transforms OCF 1.0 agents to OCF 1.1 structure and therefore needs to create # a group name for OCF 1.0 unique attrs. The name is: {this_prefix}{attr_name} DEFAULT_UNIQUE_GROUP_PREFIX = "_pcs_unique_group_"
tomjelinek/pcs
pcs/common/resource_agent/const.py
Python
gpl-2.0
285
0
# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the ...
kayhayen/Nuitka
tests/programs/absolute_import/foobar/foobar.py
Python
apache-2.0
1,043
0
#!/usr/bin/python2 import threading from systemd import journal from threading import Thread import smtplib import email.utils from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText class Mailer(threading.Thread): """ Mailer :desc: Class that sends an email Extends Thread ...
gkarakou/systemd-denotify
denotify/mailer.py
Python
gpl-3.0
8,509
0.007051
from ert_gui.ide.keywords.definitions import ProperNameFormatArgument from ecl.test import ExtendedTestCase class ProperNameFormatArgumentTest(ExtendedTestCase): def test_proper_name_format_argument(self): argument = ProperNameFormatArgument() self.assertTrue(argument.validate("NAME%d")) ...
pgdr/ert
python/tests/gui/ide/test_proper_name_format_argument.py
Python
gpl-3.0
595
0.001681
import pytest from vcf_parser.utils import split_variants, format_variant from vcf_parser import HeaderParser def get_header(header_lines = None): """Initiate a HeaderParser and return it""" header_parser = HeaderParser() if not header_lines: header_lines = [ '##fileformat=VCFv4.2'...
moonso/vcf_parser
tests/test_split_variants.py
Python
mit
9,713
0.014414
import urwid from mitmproxy import http from mitmproxy.tools.console import common, searchable from mitmproxy.utils import human from mitmproxy.utils import strutils def maybe_timestamp(base, attr): if base is not None and getattr(base, attr): return human.format_timestamp_with_milli(getattr(base, attr))...
zlorb/mitmproxy
mitmproxy/tools/console/flowdetailview.py
Python
mit
5,591
0.000358
import numpy as np from get_params import get_params import os import pickle """ Returns mAP for each query. """ def relnotrel( fileGT, id_q, rankingShots ): '''Takes ground truth file (fileGT), query name (id_q) and ranking (rankingShots) in order to create a vector of 1's and 0's to compute Average Pre...
imatge-upc/trecvid-2015
scripts/python/evaluate.py
Python
mit
4,066
0.021397
# 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 ...
Azure/azure-sdk-for-python
sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_form_recognizer_client.py
Python
mit
5,812
0.002753
#!/usr/bin/env python # BEGIN_COPYRIGHT # # Copyright 2009-2018 CRS4. # # 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 ap...
elzaggo/pydoop
examples/pydoop_submit/mr/map_only_python_writer.py
Python
apache-2.0
1,895
0.001583