repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
kingmotley/SickRage
sickbeard/providers/newpct.py
1
8726
# coding=utf-8 # Author: CristianBB # Greetings to Mr. Pine-apple # URL: https://sickrage.github.io # # This file is part of SickRage. # # SickRage 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
netvigator/myPyPacks
Utils/Log.py
2
4056
#!/usr/bin/pythonTest # -*- coding: utf-8 -*- # # log utils # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This p...
gpl-2.0
armab/st2
st2common/tests/unit/test_misc_utils.py
6
2280
# 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...
apache-2.0
skoenig/urubu
urubu/processors.py
1
8061
# Copyright 2014 Jan Decaluwe # # This file is part of Urubu. # # Urubu 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 version 3 of the License, or # (at your option) any later version. # # Urub...
agpl-3.0
p4datasystems/CarnotKE
jyhton/lib-python/2.7/encodings/cp865.py
593
34874
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP865.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
apache-2.0
zlsun/XX-Net
code/default/gae_proxy/server/lib/oauth2client/file.py
63
3160
# 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 by applicable law or ...
bsd-2-clause
hitrust/simDHT
simDHT.py
1
6508
#!/usr/bin/env python # encoding: utf-8 import socket from hashlib import sha1 from random import randint from struct import unpack from socket import inet_ntoa from threading import Timer, Thread from time import sleep from collections import deque from bencode import bencode, bdecode BOOTSTRAP_NODES = ( ("rout...
gpl-2.0
raildo/nova
nova/virt/hyperv/imagecache.py
15
5514
# Copyright 2013 Cloudbase Solutions Srl # 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 r...
apache-2.0
agjohnson/readthedocs.org
readthedocs/builds/migrations/0004_auto__add_field_build_version.py
5
8325
# encoding: 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): # Adding field 'Build.version' db.add_column('builds_build', 'version', self.gf('django.db.models.fields.related.O...
mit
CityGenerator/Megacosm-Generator
fixtures/planet.py
1
1686
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Include this to load these fixtures. """ def import_fixtures(self): """ Create simple fixture entries...""" self.redis.lpush('planetname_fullname_template', '{{params.title}} {{params.pre}}{{params.root}}{{params.post}} {{params.trailer}}'...
gpl-2.0
itkvideo/ITK
Wrapping/WrapITK/Languages/SwigInterface/pygccxml-1.0.0/pygccxml/parser/scanner.py
13
20760
# Copyright 2004-2008 Roman Yakovenko. # 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 os import types import pprint import xml.sax import warnings import xml.sax.handler from pygccxml.declarations import * ...
apache-2.0
unlessbamboo/grocery-shop
language/python/src/email/mail-image.py
1
1162
#!/usr/bin/python #coding:utf-8 #Import smtplib for the actual sending function import os import smtplib # Here are the email package modules we'll need from email.mime.image import MIMEImage from email.mime.multipart import MIMEMultipart me = "a297413@163.com" family = ["unlessbamboo@gmail.com"] COMMASPACE = ',' #...
gpl-3.0
SamYaple/neutron
neutron/extensions/multiprovidernet.py
29
4210
# Copyright (c) 2013 OpenStack Foundation. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
apache-2.0
agitter/OmicsIntegrator
src/chipsequtil/Fasta.py
4
8023
''' Fasta.py -- Very efficient code for loading biological sequences in Fasta format python dictionaries. Copyright (2005) Whitehead Institute for Biomedical Research (except as noted below) All Rights Reserved Author: David Benjamin Gordon ''' import sys, re, os, random from gzip import GzipFile def ...
bsd-2-clause
dmillington/ansible-modules-core
network/nxos/nxos_vpc_interface.py
10
18470
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
sebdelsol/pyload
module/common/packagetools.py
41
4869
#!/usr/bin/env python # JDownloader/src/jd/controlling/LinkGrabberPackager.java import re from urlparse import urlparse def matchFirst(string, *args): """ matches against list of regexp and returns first match""" for patternlist in args: for pattern in patternlist: r = pattern.search(stri...
gpl-3.0
Luxoft/SDLP2
SDL_Core/src/thirdPartyLibs/gmock-1.6.0/gtest/test/gtest_xml_outfiles_test.py
718
5312
#!/usr/bin/env python # # Copyright 2008, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
lgpl-2.1
d2emon/newspaperizer
src/newspaper/migrations/0007_auto_20160912_1900.py
1
2616
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-09-12 19:00 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('newspaper', '0006_auto_20160905_0324'), ] operations...
gpl-3.0
Esri/military-tools-geoprocessing-toolbox
utils/test/conversion_tests/ConversionUtilitiesTestCase.py
1
2103
# coding: utf-8 ''' ----------------------------------------------------------------------------- Copyright 2016 Esri Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses...
apache-2.0
aninternetof/bremen
bremenenv/lib/python3.5/site-packages/pip/_vendor/requests/cookies.py
355
18208
# -*- coding: utf-8 -*- """ requests.cookies ~~~~~~~~~~~~~~~~ Compatibility code to be able to use `cookielib.CookieJar` with requests. requests.utils imports from here, so be careful with imports. """ import copy import time import calendar import collections from .compat import cookielib, urlparse, urlunparse, Mo...
mit
safchain/contrail-sandesh
library/python/pysandesh/sandesh_http.py
3
9931
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # Sandesh Http # import pkgutil import importlib import sys # # Prevent: # Exception KeyError: KeyError(40918224,) in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored # as per # http://stackoverflow.com/questions/8774958/keye...
apache-2.0
ChillarAnand/junction
junction/schedule/migrations/0001_initial.py
1
2065
# -*- coding: utf-8 -*- from __future__ import unicode_literals # Third Party Stuff from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('conferences', '0010_a...
mit
rafaeltomesouza/frontend-class1
aula2/a9/linkedin/client/.gradle/yarn/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py
2710
5094
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Visual Studio user preferences file writer.""" import os import re import socket # for gethostname import gyp.common import gyp.easy_xml as easy_xml #------...
mit
slyphon/pants
src/python/pants/util/strutil.py
10
1881
# 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 re import shl...
apache-2.0
barbour-em/osf.io
tests/framework_tests/test_sentry.py
7
1988
#!/usr/bin/env python # encoding: utf-8 import mock from tests.base import OsfTestCase from tests.factories import UserFactory import functools from framework import sentry from framework.sessions import Session, set_session from website import settings def set_sentry(status): def wrapper(func): @fun...
apache-2.0
Alignak-monitoring/alignak
alignak/objects/hostescalation.py
1
4722
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2018: Alignak team, see AUTHORS.txt file for contributors # # This file is part of Alignak. # # Alignak 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, ei...
agpl-3.0
coxmediagroup/googleads-python-lib
examples/dfp/v201408/custom_targeting_service/create_custom_targeting_keys_and_values.py
4
4200
#!/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
klunwebale/odoo
openerp/addons/test_impex/tests/test_export.py
211
19105
# -*- coding: utf-8 -*- import itertools import openerp.modules.registry import openerp from openerp.tests import common class CreatorCase(common.TransactionCase): model_name = False def __init__(self, *args, **kwargs): super(CreatorCase, self).__init__(*args, **kwargs) self.model = None ...
agpl-3.0
nathanial/lettuce
tests/integration/lib/Django-1.3/django/middleware/cache.py
241
9078
""" Cache middleware. If enabled, each Django-powered page will be cached based on URL. The canonical way to enable cache middleware is to set ``UpdateCacheMiddleware`` as your first piece of middleware, and ``FetchFromCacheMiddleware`` as the last:: MIDDLEWARE_CLASSES = [ 'django.middleware.cache.UpdateCa...
gpl-3.0
mcella/django
tests/template_tests/test_loaders.py
263
14253
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os.path import sys import tempfile import types import unittest from contextlib import contextmanager from django.template import Context, TemplateDoesNotExist from django.template.engine import Engine from django.test import SimpleTestCase, ignor...
bsd-3-clause
aman-iitj/scipy
scipy/sparse/linalg/isolve/tests/test_lgmres.py
83
2378
#!/usr/bin/env python """Tests for the linalg.isolve.lgmres module """ from __future__ import division, print_function, absolute_import from numpy.testing import TestCase, assert_, run_module_suite from numpy import zeros, array, allclose from scipy.linalg import norm from scipy.sparse import csr_matrix from scipy....
bsd-3-clause
clumsy/intellij-community
python/helpers/pydev/pydevd_breakpoints.py
4
5286
from pydevd_constants import * import pydevd_tracing import sys import pydev_log import pydevd_import_class _original_excepthook = None _handle_exceptions = None import _pydev_threading as threading threadingCurrentThread = threading.currentThread from pydevd_comm import GetGlobalDebugger class ExceptionBreakpoin...
apache-2.0
hellarafa/ART405-REPFINDER-Project2
node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py
2736
1804
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Visual Studio project reader/writer.""" import gyp.common import gyp.easy_xml as easy_xml class Writer(object): """Visual Studio XML tool file writer.""" ...
mit
CSGreater-Developers/HMC-Grader
app/userViews/common/euroBook.py
2
4910
# coding=utf-8 ''' This module handles rendering the gradebook and its associated functions such as download and handling rendering rows of the table ''' #Import the app from app import app #Import needed flask functions from flask import g, render_template, redirect, url_for, flash, jsonify, abort from flask import...
mit
skycucumber/restful
python/venv/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py
65
33693
# -*- coding: utf-8 -*- """ flaskext.sqlalchemy ~~~~~~~~~~~~~~~~~~~ Adds basic SQLAlchemy support to your application. :copyright: (c) 2014 by Armin Ronacher, Daniel Neuhäuser. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement, absolute_import import os import ...
gpl-2.0
RamZallan/conditional
migrations/versions/983d69afb7f8_.py
2
1254
"""Remove Unused Housing Evals Table Revision ID: 983d69afb7f8 Revises: 218de3b34a6f Create Date: 2016-10-18 22:36:45.102164 """ # revision identifiers, used by Alembic. revision = '983d69afb7f8' down_revision = '218de3b34a6f' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto gen...
mit
neurodata/ndgrutedb
MR-OCP/MROCPdjango/pipeline/procs/scale_convert.py
2
3323
# Copyright 2014 Open Connectome Project (http://openconnecto.me) # # 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...
apache-2.0
wubenqi/zutils
zutils/testing/xvfb.py
9
3155
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Runs the test with xvfb on linux. Runs the test normally on other platforms. For simplicity in gyp targets, this script just ru...
apache-2.0
AniruddhaSAtre/dd-agent
checks.d/mongo.py
6
10440
# stdlib import time import types # 3p import pymongo # project from checks import AgentCheck from util import get_hostname DEFAULT_TIMEOUT = 10 class MongoDb(AgentCheck): SERVICE_CHECK_NAME = 'mongodb.can_connect' SOURCE_TYPE_NAME = 'mongodb' GAUGES = [ "indexCounters.btree.missRatio", ...
bsd-3-clause
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.2/Lib/test/test_defaultdict.py
49
5996
"""Unit tests for collections.defaultdict.""" import os import copy import pickle import tempfile import unittest from test import support from collections import defaultdict def foobar(): return list class TestDefaultDict(unittest.TestCase): def test_basic(self): d1 = defaultdict() self.as...
mit
tensorflow/graphics
tensorflow_graphics/geometry/representation/triangle.py
1
4716
# Copyright 2020 The TensorFlow 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 law or agreed to i...
apache-2.0
MOOOWOOO/Q400K
app/auth/models.py
1
2141
# coding: utf-8 from app import db from app.user.models import User from flask.ext.wtf import Form from wtforms import StringField, SubmitField, PasswordField, ValidationError, BooleanField from wtforms.validators import DataRequired, Email, EqualTo, Length __author__ = 'Jux.Liu' class Role(db.Model): __tablenam...
gpl-3.0
goodwinnk/intellij-community
python/helpers/py2only/docutils/parsers/__init__.py
126
1657
# $Id: __init__.py 7646 2013-04-17 14:17:37Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ This package contains Docutils parser modules. """ __docformat__ = 'reStructuredText' import sys from docutils import Component if sys.version_info < (2...
apache-2.0
pauloschilling/sentry
src/sentry/api/views/help_base.py
10
4602
from __future__ import absolute_import import re import textwrap from django.utils.importlib import import_module from django.utils.text import slugify from sentry.api.base import Endpoint from sentry.constants import HTTP_METHODS from sentry.web.frontend.base import BaseView optional_group_matcher = re.compile(r'\...
bsd-3-clause
spennihana/h2o-3
h2o-py/tests/testdir_parser/pyunit_NOFEATURE_orc_parser_import_folder.py
6
1467
from __future__ import print_function import sys sys.path.insert(1,"../../") import h2o from tests import pyunit_utils # test that h2o.import_file works on a directory of files! def import_folder(): tol_time = 200 # comparing in ms or ns tol_numeric = 1e-5 # tolerance for comparing other num...
apache-2.0
toddm92/flask-vpc-create
app/test_vpc.py
1
2542
from aws import Aws import boto3 from moto import mock_ec2 region = 'us-east-1' cidr = '10.10.10.0/23' sub = '10.10.10.0/25' name = 'testing' env = 'dev' azs = '2' @mock_ec2 def test_create_vpc(): session = boto3.Session(region_name = region) ec2 = session.client('ec2') # Test... aws = Aws(region) aws.c...
mit
mkitti/bioformats
components/xsd-fu/python/configobj.py
10
85768
# configobj.py # A config file reader/writer that supports nested sections in config files. # Copyright (C) 2005-2009 Michael Foord, Nicola Larosa # E-mail: fuzzyman AT voidspace DOT org DOT uk # nico AT tekNico DOT net # ConfigObj 4 # http://www.voidspace.org.uk/python/configobj.html # Released subject to th...
gpl-2.0
opennode/waldur-mastermind
src/waldur_rancher/executors.py
1
7558
from celery import chain from waldur_core.core import executors as core_executors from waldur_core.core import tasks as core_tasks from waldur_core.core import utils as core_utils from waldur_core.core.models import StateMixin from . import models, tasks class ClusterCreateExecutor(core_executors.CreateExecutor): ...
mit
pjdufour/geonode
geonode/catalogue/backends/pycsw_local_mappings.py
16
3543
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
gpl-3.0
JonnyWong16/plexpy
lib/apscheduler/executors/base.py
3
5336
from abc import ABCMeta, abstractmethod from collections import defaultdict from datetime import datetime, timedelta from traceback import format_tb import logging import sys from pytz import utc import six from apscheduler.events import ( JobExecutionEvent, EVENT_JOB_MISSED, EVENT_JOB_ERROR, EVENT_JOB_EXECUTED) ...
gpl-3.0
garbear/EventGhost
eg/WinApi/Clipboard.py
1
2646
# -*- coding: utf-8 -*- # # This file is part of EventGhost. # Copyright (C) 2005-2009 Lars-Peter Voss <bitmonster@eventghost.org> # # EventGhost 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...
gpl-2.0
StoicLoofah/foodmarks
foodmarks/fm/migrations/0002_auto_20170212_1231.py
1
1716
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-12 12:31 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('fm', '0001_initial'), ] operations = [ migrations.AlterField( m...
mit
tmm1/home-assistant
tests/helpers/test_event.py
21
4401
""" tests.helpers.event_test ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests event helpers. """ # pylint: disable=protected-access,too-many-public-methods # pylint: disable=too-few-public-methods import unittest from datetime import datetime import homeassistant.core as ha from homeassistant.helpers.event import * class TestEven...
mit
WillieMaddox/scipy
scipy/fftpack/__init__.py
58
3145
""" ================================================== Discrete Fourier transforms (:mod:`scipy.fftpack`) ================================================== Fast Fourier Transforms (FFTs) ============================== .. autosummary:: :toctree: generated/ fft - Fast (discrete) Fourier Transform (FFT) ifft ...
bsd-3-clause
Eksmo/calibre
src/calibre/ebooks/markdown/blockprocessors.py
5
17702
""" CORE MARKDOWN BLOCKPARSER ============================================================================= This parser handles basic parsing of Markdown blocks. It doesn't concern itself with inline elements such as **bold** or *italics*, but rather just catches blocks, lists, quotes, etc. The BlockParser is made u...
gpl-3.0
openjck/kuma
kuma/core/tests/test_templates.py
1
2612
import os from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.template.backends.jinja2 import Jinja2 from django.template.loader import render_to_string from django.test import RequestFactory from django.utils import translation from nose.tools import eq_ from pyquery impo...
mpl-2.0
GJL/flink
flink-python/pyflink/__init__.py
7
1459
################################################################################ # 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...
apache-2.0
fedral/ITK
Examples/Visualization/CannyEdgeDetectionImageFilterConnectVTKITK.py
28
3833
#========================================================================== # # Copyright Insight Software Consortium # # 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
apple/llvm-project
cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexLimitSteps.py
4
1565
# DExTer : Debugging Experience Tester # ~~~~~~ ~ ~~ ~ ~~ # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception """A Command that enables test writers to ...
apache-2.0
40223220/2015_cdb_g7_40223220
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/sprite.py
603
55779
## pygame - Python Game Library ## Copyright (C) 2000-2003, 2007 Pete Shinners ## (C) 2004 Joe Wreschnig ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; e...
gpl-3.0
blooparksystems/odoo
addons/website_event_sale/models/sale_order.py
15
5138
# -*- coding: utf-8 -*- from openerp import SUPERUSER_ID from openerp.osv import osv from openerp.tools.translate import _ from openerp.exceptions import UserError class sale_order(osv.Model): _inherit = "sale.order" def _cart_find_product_line(self, cr, uid, ids, product_id=None, line_id=None, context=None,...
gpl-3.0
camont1/epidemics_pibic
exemplos/ising_2D/montecarlo.py
3
4114
#/usr/bin/python3 # -*- coding: utf-8 -*- import numpy as np import networkx as nx #============================================== def cria_rede_barabasi_albert(N=9,m=1): """ Retorna a matriz de adjacência e a rede tipo barabasi-albert de N vertices e parametro m. """ g = nx.barabasi_albert_g...
mit
wiltonlazary/arangodb
3rdParty/V8/V8-5.0.71.39/build/gyp/test/mac/gyptest-rebuild.py
34
1344
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that app bundles are rebuilt correctly. """ import TestGyp import sys if sys.platform == 'darwin': print "This test is cur...
apache-2.0
snnn/tensorflow
tensorflow/python/estimator/util_test.py
6
3572
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
thomasfire/agent_smith
sendtovk.py
1
4537
#!/usr/bin/python3 # this is bot "Agent Smith". He chats in vk with other people """ Developer and Author: Thomas Fire https://github.com/thomasfire (Telegram: @Thomas_Fire) ### Main manager: Uliy Bee """ from logging import exception from random import choice ################## SEND FUN GIFS, PICS, CITES AND ET...
gpl-3.0
diagramsoftware/account-financial-tools
account_constraints/tests/__init__.py
39
1269
# -*- coding: utf-8 -*- # # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # All Rights Reserved # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsibility of assessing all potential # consequences result...
agpl-3.0
Thortoise/Super-Snake
Blender/animation_nodes-master/nodes/geometry/intersect_sphere_plane.py
1
1572
import bpy from ... base_types.node import AnimationNode class IntersectSpherePlaneNode(bpy.types.Node, AnimationNode): bl_idname = "an_IntersectSpherePlaneNode" bl_label = "Intersect Sphere Plane" bl_width_default = 160 def create(self): self.newInput("Vector", "Sphere Center", "sphereCenter"...
gpl-3.0
ryfeus/lambda-packs
Keras_tensorflow_nightly/source2.7/tensorflow/contrib/layers/python/layers/summaries.py
164
5415
# 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 applica...
mit
laiqiqi886/kbengine
kbe/res/scripts/common/Lib/encodings/cp857.py
272
33908
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP857.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
lgpl-3.0
lumig242/Hue-Integration-with-CDAP
desktop/core/ext-py/Django-1.6.10/django/contrib/sites/models.py
114
3549
from __future__ import unicode_literals import string from django.db import models from django.db.models.signals import pre_save, pre_delete from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible from django.core.exceptions import ValidationError SITE_C...
apache-2.0
pilou-/ansible
test/units/modules/network/f5/test_bigip_device_traffic_group.py
16
4946
# -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import pytest import sys if sys.version_info < (2, ...
gpl-3.0
waliens/sldc
sldc/workflow.py
1
20831
# -*- coding: utf-8 -*- import os from abc import abstractmethod import numpy as np from joblib import delayed, Parallel from .errors import TileExtractionException from .image import Image, TileBuilder, DefaultTileBuilder, SkipBordersTileTopology, FixedSizeTileTopology from .information import WorkflowInformation fr...
mit
shail2810/nova
nova/tests/unit/objects/test_instance_group.py
9
12966
# Copyright (c) 2013 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 ...
apache-2.0
svpcom/pyopenssl-pypy
setup.py
1
8234
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) AB Strakt 2001, All rights reserved # Copyright (C) Jean-Paul Calderone 2008-2010, All rights reserved # """ Installation script for the OpenSSL module """ import sys, os from distutils.core import Extension, setup from distutils.errors import DistutilsF...
apache-2.0
aurelijusb/arangodb
3rdParty/V8-4.3.61/tools/testrunner/local/perfdata.py
100
4212
# Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditi...
apache-2.0
ClovisIRex/Snake-django
env/lib/python3.6/site-packages/pip/vcs/bazaar.py
514
3803
from __future__ import absolute_import import logging import os import tempfile # TODO: Get this into six.moves.urllib.parse try: from urllib import parse as urllib_parse except ImportError: import urlparse as urllib_parse from pip.utils import rmtree, display_path from pip.vcs import vcs, VersionControl fro...
mit
edmundgentle/schoolscript
SchoolScript/bin/Debug/pythonlib/Lib/trace.py
3
32268
#!/usr/bin/env python3 # portions copyright 2001, Autonomous Zones Industries, Inc., all rights... # err... reserved and offered to the public under the terms of the # Python 2.2 license. # Author: Zooko O'Whielacronx # http://zooko.com/ # mailto:zooko@zooko.com # # Copyright 2000, Mojam Media, Inc., all rig...
gpl-2.0
coingraham/lena
lambda/requests/packages/urllib3/filepost.py
713
2320
from __future__ import absolute_import import codecs from uuid import uuid4 from io import BytesIO from .packages import six from .packages.six import b from .fields import RequestField writer = codecs.lookup('utf-8')[3] def choose_boundary(): """ Our embarassingly-simple replacement for mimetools.choose_b...
mit
seecr/meresco-components
test/drilldown/translatedrilldownfieldnamestest.py
1
12815
## begin license ## # # "Meresco Components" are components to build searchengines, repositories # and archives, based on "Meresco Core". # # Copyright (C) 2012, 2020 SURF https://www.surf.nl # Copyright (C) 2012-2014, 2017, 2020 Seecr (Seek You Too B.V.) https://seecr.nl # Copyright (C) 2012, 2014 Stichting Bibliothee...
gpl-2.0
gandreello/openthread
tests/scripts/thread-cert/network_layer.py
10
8233
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
bsd-3-clause
MiLk/ansible
contrib/inventory/freeipa.py
38
2491
#!/usr/bin/env python import argparse from ipalib import api import json def initialize(): ''' This function initializes the FreeIPA/IPA API. This function requires no arguments. A kerberos key must be present in the users keyring in order for this to work. ''' api.bootstrap(context='cli') ...
gpl-3.0
minhphung171093/GreenERP_V7
openerp/addons/base/module/wizard/base_language_install.py
447
2738
# -*- 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
yetilinux/yetiweb
main/migrations/0004_add_pkgname_index.py
2
14546
from south.db import db from django.db import models from main.models import * class Migration: def forwards(self, orm): # Changing field 'Package.maintainer' # (to signature: django.db.models.fields.related.ForeignKey(blank=True, null=True, to=orm['auth.User'])) db.alter_col...
gpl-2.0
viralpandey/kivy
examples/tutorials/pong/steps/step4/main.py
57
1208
from kivy.app import App from kivy.uix.widget import Widget from kivy.properties import NumericProperty, ReferenceListProperty,\ ObjectProperty from kivy.vector import Vector from kivy.clock import Clock from random import randint class PongBall(Widget): velocity_x = NumericProperty(0) velocity_y = Numeri...
mit
lbernau/smarthome
lib/scheduler.py
2
31402
#!/usr/bin/env python3 # vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab ######################################################################### # Copyright 2011-2014 Marcus Popp marcus@popp.mx # Copyright 2016- Christian Straßburg # Copyright 2017 Bernd Meiners ...
gpl-3.0
Hybrid-Cloud/badam
engineering/common/engineering_logging.py
1
1355
import logging from common import config logging.basicConfig(filename=config.CONF.log_file, level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', ) def log_for_func_of_class(logger_name): def _log_wrapper(func): def __log_wrapper(class_self): logger = logging.getL...
apache-2.0
ovnicraft/openerp-restaurant
poi_x_hph/wizard/server_closing.py
3
3015
# -*- 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
a-doumoulakis/tensorflow
tensorflow/user_ops/duplicate_op_test.py
146
1303
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
serxoz/django-rest-auth
rest_auth/tests.py
28
18071
import json from django.conf import settings from django.core.urlresolvers import reverse from django.test.client import Client, MULTIPART_CONTENT from django.test import TestCase from django.contrib.auth import get_user_model from django.core import mail from django.test.utils import override_settings from django.con...
mit
ppizarror/Fake-Arkanoid
lib/threads/Py25Queue.py
1
7975
"""A multi-producer, multi-consumer queue.""" from collections import deque from time import time as _time __all__ = ['Empty', 'Full', 'Queue'] class Empty(Exception): "Exception raised by Queue.get(block=0)/get_nowait()." pass class Full(Exception): "Exception raised by Queue.put(block=0)...
gpl-2.0
ryfeus/lambda-packs
Tensorflow_LightGBM_Scipy_nightly/source/scipy/optimize/nnls.py
23
1424
from __future__ import division, print_function, absolute_import from . import _nnls from numpy import asarray_chkfinite, zeros, double __all__ = ['nnls'] def nnls(A, b): """ Solve ``argmin_x || Ax - b ||_2`` for ``x>=0``. This is a wrapper for a FORTRAN non-negative least squares solver. Parameter...
mit
markomilutin/kompressor
test_AREncoder.py
1
44957
__author__ = 'mmilutinovic' import unittest from AREncoder import AREncoder from array import array class TestAREncoder(unittest.TestCase): def test_instantiate_Arencoder_invalid_parameters(self): # Purpose: Instantiate object with invalid word size parameter # Expectation: An exception should be...
gpl-2.0
yunojuno/django-s3-upload
tests/test_widgets.py
1
9602
import json from base64 import b64decode from urllib.parse import parse_qs, urlparse from django.conf import settings from django.contrib.auth.models import User from django.core.exceptions import ImproperlyConfigured from django.test import TestCase from django.test.utils import override_settings from django.urls imp...
mit
mandeepdhami/nova
nova/tests/unit/api/openstack/compute/contrib/test_quotas.py
9
31410
# Copyright 2011 OpenStack Foundation # Copyright 2013 IBM Corp. # 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/LIC...
apache-2.0
jamdin/jdiner-mobile-byte3
lib/numpy/distutils/conv_template.py
43
9621
#!/usr/bin/python """ takes templated file .xxx.src and produces .xxx file where .xxx is .i or .c or .h, using the following template rules /**begin repeat -- on a line by itself marks the start of a repeated code segment /**end repeat**/ -- on a line by itself marks it's end After the /**begin ...
apache-2.0
chshu/openthread
tools/harness-automation/cases/__init__.py
36
1580
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # notic...
bsd-3-clause
cwoodall/doppler-gestures-py
pydoppler/ambiguity.py
2
3333
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # ryanvolz's Ambiguity Function](https://gist.github.com/ryanvolz/8b0d9f3e48ec8ddcef4d import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation def ambiguity(code, nfreq=1): """Calculate the ambiguity function of code for nfreq ...
mit
bq/bitbloq-offline
app/res/web2board/win32/res/Scons/sconsFiles/SCons/Tool/MSCommon/common.py
6
9214
# # Copyright (c) 2001 - 2015 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge...
gpl-3.0
thisispuneet/potato-blog
django/contrib/gis/db/backends/oracle/introspection.py
388
1777
import cx_Oracle from django.db.backends.oracle.introspection import DatabaseIntrospection class OracleIntrospection(DatabaseIntrospection): # Associating any OBJECTVAR instances with GeometryField. Of course, # this won't work right on Oracle objects that aren't MDSYS.SDO_GEOMETRY, # but it is the only o...
bsd-3-clause
sogelink/ansible
lib/ansible/modules/identity/ipa/ipa_sudorule.py
27
14617
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0