code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
################################################################################ # # This program is part of the WMIDataSource Zenpack for Zenoss. # Copyright (C) 2009, 2010 Egor Puzanov. # # This program can be used under the GNU General Public License version 2 # You can find full information here: http://www.zenoss....
epuzanov/ZenPacks.community.WMIDataSource
ZenPacks/community/WMIDataSource/info.py
Python
gpl-2.0
1,419
# coding: utf-8 l2p = [u'۰', u'۱', u'۲', u'۳', u'۴', u'۵', u'۶', u'۷', u'۸', u'۹'] p2l = [u'0', u'1', u'2', u'3', u'4', u'5', u'6', u'7', u'8', u'9'] def persian_num_to_english(persian_num): persian_num = str(persian_num) place = 0 for integer in l2p: persian_num = persian_num.replace(integer, p2...
itmard/pfont.ir
app/utilis/persian.py
Python
gpl-2.0
819
import sys,os # a simple wrapper that allows the client # in this directory (gxpbin) to import ifconfig # (in the gxp3 directory), without having it # in pythonpath. # this become necessary when it turned out # including many paths under home dir in # pythonpath makes things very slow in # EC2 environment (and some ...
eiennohito/gxpc
gxpbin/gxpm2.py
Python
gpl-2.0
525
from __future__ import absolute_import, division, print_function, unicode_literals from .. import cmds from .. import core from .. import gitcmds from .. import utils from ..i18n import N_ from ..git import STDOUT from ..interaction import Interaction class StashModel(object): def __init__(self, context): ...
davvid/git-cola
cola/models/stash.py
Python
gpl-2.0
6,562
#!/usr/bin/env python2 # -*- coding: utf-8 -*- ############################################################################### # conkyGuayadeque.py is a simple python script to gather # details of from Guayadeque for use in conky. # # Author: Kaivalagi # Created: 01/08/2010 from datetime import datetime from optpars...
cadavergeek/conkyconfig
scripts/scripts/conkyGuayadeque.py
Python
gpl-2.0
24,918
import time import datetime import socket import json from django.views import generic from django.http import HttpResponse from django.shortcuts import (render, render_to_response, redirect, get_object_or_404) from django.core.mail import (send_mail, BadHeaderError) from django.core.exceptions import ObjectDoesNotExi...
agusmakmun/Django-Blog-Python-Learning-v.2
blog/views.py
Python
gpl-2.0
12,137
# -*- coding: utf-8 -*- # # Copyright 2005, 2006 Zuza Software Foundation # # This file is part of translate. # # translate 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 #...
dwaynebailey/translate
translate/convert/prop2mozfunny.py
Python
gpl-2.0
6,288
# -*- coding: utf-8 -*- __copyright__ = """ Copyright (C) 2008, Karl Hasselström <kha@treskal.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 ...
terinjokes/stgit
stgit/commands/reset.py
Python
gpl-2.0
2,601
import unittest #from unittest import SkipTest import random import bob.learn.boosting import numpy class TestJesorskyLoss(unittest.TestCase): """ Test the loss function using multivariate data """ def test01_multivariate_dimensions(self): # Check the loss function values for multivariate targets loss...
bioidiap/bob.ip.facedetect
bob/learn/boosting/tests/test_loss_jes.py
Python
gpl-3.0
1,479
# pydhcplib # Copyright (C) 2008 Mathieu Ignacio -- mignacio@april.org # # This file is part of pydhcplib. # Pydhcplib 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 ...
dgvncsz0f/pydhcplib
pydhcplib/type_hwmac.py
Python
gpl-3.0
2,813
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2007, 2008 TÜBİTAK UEKAE # Licensed under the GNU General Public License, version 3. # See the file http://www.gnu.org/copyleft/gpl.txt. from django.contrib.auth.models import User from django.shortcuts import get_object_or_404 from django.db.models import Q fro...
MehmetNuri/ozgurlukicin
st/views.py
Python
gpl-3.0
9,934
# Copyright (C) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
geminy/aidear
oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/diff_parser_unittest.py
Python
gpl-3.0
8,071
# Copyright (C) 2014 Syed Haider Abidi, Nooruddin Ahmed and Christopher Dydula # # This file is part of traxis. # # traxis 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 # ...
nrootn/traxis
traxis/gui/__init__.py
Python
gpl-3.0
730
from freshen import * from freshen.checks import assert_equals from examples.docu.document import Document @Given('a document of (\d+) pages?') def create_doc(num_pages): scc.doc = Document(int(num_pages)) @Given('the page is (\d+)') def set_page_doc(page): scc.doc.set_page(int(page)) @When('I click ...
Vayana/freshen
examples/docu/features/step/page_steps.py
Python
gpl-3.0
740
# -*- coding: utf-8 -*- # Copyright(C) 2013 Julien Veyssier # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
blckshrk/Weboob
weboob/applications/qcineoob/minitorrent.py
Python
agpl-3.0
2,372
from myhdl import * def bug_28(dout, channel): @always_comb def comb(): dout.next = 0x8030 + (channel << 10) return comb dout = Signal(intbv(0)[16:0]) channel = Signal(intbv(0)[4:0]) def test_bug_28(): try: toVHDL(bug_28, dout, channel) except: raise
forrestv/myhdl
myhdl/test/bugs/test_bug_28.py
Python
lgpl-2.1
298
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class MirrorSourceforgeBroken(AutotoolsPackage, SourceforgePackage): """Simple sourceforge.net p...
iulian787/spack
var/spack/repos/builtin.mock/packages/mirror-sourceforge-broken/package.py
Python
lgpl-2.1
539
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyLigoSegments(PythonPackage): """Representations of semi-open intervals.""" homepage...
iulian787/spack
var/spack/repos/builtin/packages/py-ligo-segments/package.py
Python
lgpl-2.1
649
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
TheTimmy/spack
lib/spack/spack/cmd/uninstall.py
Python
lgpl-2.1
7,614
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
EmreAtes/spack
var/spack/repos/builtin/packages/r-qvalue/package.py
Python
lgpl-2.1
2,474
# -*- coding: utf-8 -*- from __future__ import print_function, absolute_import, division from __future__ import division import sys, unittest, re, os.path sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..')) from SpiffWorkflow import Task from SpiffWorkflow.specs import WorkflowSpec, Simple from Sp...
imoore76/SpiffWorkflow
tests/SpiffWorkflow/TaskTest.py
Python
lgpl-3.0
3,085
''' | From: "Digitalized Signatures and Public-Key Functions as Intractable as Factorization". | Published in: 1979 | Security Assumption: Integer Factorization * type: public-key encryption * setting: Integer :Authors: Christina Garman :Date: 09/2011 ''' from charm.core.math.integer impo...
lferr/charm
charm/schemes/pkenc/pkenc_rabin.py
Python
lgpl-3.0
8,299
import product import account_invoice import saas_portal import wizard
iledarn/odoo-saas-tools
saas_portal_sale/models/__init__.py
Python
lgpl-3.0
71
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2017 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is free software; you can redistribute it and/or modify #...
rmcgibbo/psi4public
psi4/share/psi4/databases/RGC10.py
Python
lgpl-3.0
81,940
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2017, 2018 Guenter Bartsch # # 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 # #...
gooofy/nlp
data-tools/csv/csv2py.py
Python
lgpl-3.0
5,124
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2016, 2017, 2018 Guenter Bartsch # # 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....
gooofy/voxforge
zamiaai/skills/psychology/psychology.py
Python
lgpl-3.0
46,686
# Copyright 2019 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...
frreiss/tensorflow-fred
tensorflow/lite/testing/op_tests/tensor_list_length.py
Python
apache-2.0
2,271
#!/usr/bin/python # # Copyright 2015 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...
haveal/googleads-dfa-reporting-samples
python/v2.2/create_placement_group.py
Python
apache-2.0
2,815
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
nathanielvarona/airflow
tests/providers/google/cloud/operators/test_bigtable_system.py
Python
apache-2.0
1,870
from __future__ import unicode_literals import collections import copy import datetime import decimal import inspect import json import re import uuid from collections import OrderedDict from django.conf import settings from django.core.exceptions import ValidationError as DjangoValidationError from django.core.excep...
OpenWinCon/OpenWinNet
web-gui/myvenv/lib/python3.4/site-packages/rest_framework/fields.py
Python
apache-2.0
64,061
from rest_framework import serializers as ser from api.base.serializers import ( JSONAPISerializer, RelationshipField, RestrictedDictSerializer, LinksField, is_anonymized, VersionedDateTimeField, HideIfNotNodePointerLog, HideIfNotRegistrationPointerLog, ) from osf.models import OSFUser...
mattclark/osf.io
api/logs/serializers.py
Python
apache-2.0
10,309
# coding: utf-8 # # Copyright 2018 The Oppia 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 requi...
brianrodri/oppia
core/domain/opportunity_domain_test.py
Python
apache-2.0
14,422
from django.apps import AppConfig class SurveysConfig(AppConfig): name = 'surveys'
luisen14/treatment-tracking-project
treatment_tracker/surveys/apps.py
Python
apache-2.0
89
from zerver.lib.test_classes import WebhookTestCase class AnsibletowerHookTests(WebhookTestCase): STREAM_NAME = 'ansibletower' URL_TEMPLATE = "/api/v1/external/ansibletower?api_key={api_key}&stream={stream}" FIXTURE_DIR_NAME = 'ansibletower' def test_ansibletower_project_update_successful_message(sel...
showell/zulip
zerver/webhooks/ansibletower/tests.py
Python
apache-2.0
6,839
#!/usr/bin/env python # # Copyright 2015 Cisco Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
CiscoCloud/kubernetes-ansible
plugins/inventory/terraform.py
Python
apache-2.0
8,135
#!/usr/bin/python # # Copyright 2010 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 ...
IevgenPr/gsa-admin-toolkit
connectormanager/sharepoint_connector.py
Python
apache-2.0
12,405
""" A library of validators that return None and raise ValidationError when the provided data isn't valid. Validators may be callable classes, and they may have an 'always_test' attribute. If an 'always_test' attribute exists (regardless of value), the validator will *always* be run, regardless of whether its associat...
jamslevy/gsoc
thirdparty/google_appengine/lib/django/django/core/validators.py
Python
apache-2.0
27,307
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of th...
tempbottle/ironpython3
Tests/dynamic_sanity/mock.py
Python
apache-2.0
948
# Copyright 2015 NEC Corporation. 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 ...
zsoltdudas/lis-tempest
tempest/lib/services/network/quotas_client.py
Python
apache-2.0
1,272
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Module for Snapshot object""" import collections from datetime import datetime from sqlalchemy.ext.declarative import declared_attr from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy impo...
plamut/ggrc-core
src/ggrc/models/snapshot.py
Python
apache-2.0
10,106
# -*- 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/integrationtest/python/should_exclude_optional_task_tests.py
Python
apache-2.0
1,556
"""Distance util functions.""" from __future__ import annotations from numbers import Number from typing import Callable from homeassistant.const import ( LENGTH, LENGTH_CENTIMETERS, LENGTH_FEET, LENGTH_INCHES, LENGTH_KILOMETERS, LENGTH_METERS, LENGTH_MILES, LENGTH_MILLIMETERS, LEN...
sander76/home-assistant
homeassistant/util/distance.py
Python
apache-2.0
2,106
import logging from iemit_plugin import IEmitter from utils.mtgraphite import MTGraphiteClient from formatters import write_in_graphite_format from utils.crawler_exceptions import EmitterUnsupportedFormat logger = logging.getLogger('crawlutils') class MtGraphiteEmitter(IEmitter): def get_emitter_protocol(self)...
canturkisci/agentless-system-crawler
crawler/plugins/emitters/mtgraphite_emitter.py
Python
apache-2.0
1,334
# -*- coding: utf-8 -*- # Copyright (C) 2015 David Caro <david@dcaro.es> # # Based on jenkins_jobs/modules/project_flow.py by # Copyright (C) 2013 eNovance SAS <licensing@enovance.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. ...
puppetlabs/jenkins-job-builder
jenkins_jobs/modules/project_workflow.py
Python
apache-2.0
2,660
"""Tests for the Hyperion integration.""" from __future__ import annotations import asyncio import base64 from collections.abc import Awaitable from typing import Callable from unittest.mock import AsyncMock, Mock, patch from aiohttp import web import pytest from homeassistant.components.camera import ( DEFAULT_...
home-assistant/home-assistant
tests/components/hyperion/test_camera.py
Python
apache-2.0
7,454
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License,...
sparkslabs/kamaelia
Sketches/MH/Timer/Timer.py
Python
apache-2.0
12,037
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License,...
bbc/kamaelia
Sketches/CL/Topology/src/RelationTopology/Util/RelationGenderParsing.py
Python
apache-2.0
5,025
# -*- coding: utf-8 -*- # # 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 in writing, soft...
sijie/bookkeeper
stream/clients/python/bookkeeper/admin/client.py
Python
apache-2.0
2,588
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
NeCTAR-RC/horizon
openstack_dashboard/test/integration_tests/tests/test_networks.py
Python
apache-2.0
2,187
# 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...
annarev/tensorflow
tensorflow/python/ops/linalg/linear_operator_block_diag.py
Python
apache-2.0
26,846
import time from inspect import isclass from flask import Blueprint, current_app, request from flask_login import current_user, login_required from flask_restful import Resource, abort from redash import settings from redash.authentication import current_org from redash.models import db from redash.tasks import recor...
denisov-vlad/redash
redash/handlers/base.py
Python
bsd-2-clause
4,321
# Standard Library import datetime import rest_framework_jwt # Third-Party from factory import Faker # post_generation, from factory import Iterator from factory import LazyAttribute from factory import PostGenerationMethodCall from factory import RelatedFactory from factory import Sequence from factory import SubF...
dbinetti/barberscore
project/apps/bhs/tests/factories.py
Python
bsd-2-clause
4,221
""" Drop-in replacement for ``django.conf.settings`` that provides a consistent access method for settings defined in applications, the project or Django itself. Settings can also be made editable via the admin. """ from functools import partial from importlib import import_module from warnings import warn from weakre...
stephenmcd/mezzanine
mezzanine/conf/__init__.py
Python
bsd-2-clause
10,256
# -*- coding: utf-8 -*- # # Copyright (C) 2008-2011 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. # # This software consists...
hoosteeno/fjord
vendor/packages/Babel-2.1.1/tests/messages/test_plurals.py
Python
bsd-3-clause
928
from nose.tools import assert_equal from bluesky.utils import snake_cyclers from cycler import cycler x = cycler('x', [1,2,3]) y = cycler('y', [1,2]) z = cycler('z', [1,2,3]) def test_snake_no_snaking(): actual = list(snake_cyclers([z, y, x], [False, False, False])) expected = [ {'x': 1, 'y': 1, 'z':...
sameera2004/bluesky
bluesky/tests/test_snaking.py
Python
bsd-3-clause
2,460
# -*- coding: utf-8 -*- from bson import ObjectId import eve import json from eve import Eve from eve.auth import BasicAuth, TokenAuth, HMACAuth from eve.tests import TestBase from eve.tests.test_settings import MONGO_DBNAME class ValidBasicAuth(BasicAuth): def __init__(self): self.request_auth_value = '...
eduardomb/eve
eve/tests/auth.py
Python
bsd-3-clause
28,902
from django.conf.urls.defaults import * from django_chat import settings urlpatterns = patterns('django_chat.chat.views', ('^$', 'main'), ('^a/message/new$', 'message_new'), ('^a/message/updates$', 'message_updates')) urlpatterns += patterns('django...
methane/minefield
example/django_chat/urls.py
Python
bsd-3-clause
488
''' Created on Aug 7, 2012 :author: Sana Development Team :version: 2.0 '''
SanaMobile/sana.mds
src/mds/api/emitters.py
Python
bsd-3-clause
77
#!/usr/bin/env python # Copyright (c) 2016 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. import io import os import unittest import six from py_utils import tempfile_ext from systrace import decorators from systrace im...
catapult-project/catapult
systrace/systrace/tracing_agents/atrace_from_file_agent_unittest.py
Python
bsd-3-clause
3,218
## Context-aware: An RDF store capable of storing statements within contexts is considered context-aware. ## Essentially, such a store is able to partition the RDF model it represents into individual, named, and addressable sub-graphs. ## Relevant Notation3 reference regarding formula's, quoted statements, and such: h...
robdennis/sideboard
tests/plugins/different_versions/rdflib3_0_0/env/lib/python2.7/site-packages/rdflib/store.py
Python
bsd-3-clause
10,466
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ This module contains the specification of 'hierarchical ROI' object, Which is used in spatial models of the library such as structural analysis The connection with other classes is not completely satis...
bthirion/nipy
nipy/labs/spatial_models/hroi.py
Python
bsd-3-clause
22,070
#!/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 # ...
mszczodrak/openthread
tests/scripts/thread-cert/Cert_5_2_03_LeaderReject2Hops.py
Python
bsd-3-clause
5,400
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This file defines the classes used to represent a 'coordinate', which includes axes, ticks, tick labels, and grid lines. """ import warnings import numpy as np from matplotlib.ticker import Formatter from matplotlib.transforms import Affine2D, Scal...
dhomeier/astropy
astropy/visualization/wcsaxes/coordinate_helpers.py
Python
bsd-3-clause
43,834
# -*- coding: utf-8 -*- import copy MONGO_HOST = 'localhost' MONGO_PORT = 27017 MONGO_USERNAME = MONGO1_USERNAME = 'test_user' MONGO_PASSWORD = MONGO1_PASSWORD = 'test_pw' MONGO_DBNAME, MONGO1_DBNAME = 'eve_test', 'eve_test1' ID_FIELD = '_id' RESOURCE_METHODS = ['GET', 'POST', 'DELETE'] ITEM_METHODS = ['GET', 'PATCH...
bcrochet/eve
eve/tests/test_settings.py
Python
bsd-3-clause
9,308
""" This is a VERSION file and should NOT be manually altered """ version = '0.1.9'
dingliumath/quant-econ
quantecon/version.py
Python
bsd-3-clause
83
# -*- coding: utf-8 -*- # # Copyright (C) 2016 Andi Albrecht, albrecht.andi@gmail.com # # This module is part of python-sqlparse and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php from sqlparse import sql, tokens as T from sqlparse.compat import text_type from sqlparse.utils im...
aasoliz/Bitcoin-Statistics
venv/lib/python2.7/site-packages/sqlparse/filters/reindent.py
Python
bsd-3-clause
6,026
""" Django settings for dj17_testproject project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR...
anentropic/django-exclusivebooleanfield
tests/py34-dj17_testproject/py34-dj17_testproject/settings.py
Python
mit
2,086
# -*- coding: utf-8 -*- from itertools import cycle from db import sqlrelay_cursor from db import sqlrelay_close from nosql import redis_monitor from util import from_utf8 from util import to_utf8 from util import escape from util import zero_or_one from util import encode_base64 from util import decode_base64 from...
zzragida/PythonExamples
MemberShip/web/push/app/models.py
Python
mit
3,234
import pytest from pip._internal.utils.distutils_args import parse_distutils_args def test_unknown_option_is_ok() -> None: result = parse_distutils_args(["--foo"]) assert not result def test_option_is_returned() -> None: result = parse_distutils_args(["--prefix=hello"]) assert result["prefix"] == "...
sbidoul/pip
tests/unit/test_utils_distutils_args.py
Python
mit
1,764
# coding: utf-8 import os import pytest from mock import patch from decouple import AutoConfig def test_autoconfig_env(): config = AutoConfig() path = os.path.join(os.path.dirname(__file__), 'autoconfig', 'env', 'project') with patch.object(config, '_caller_path', return_value=path): assert 'ENV' ...
henriquebastos/django-decouple
tests/test_autoconfig.py
Python
mit
1,154
"""The tests for the demo light component.""" # pylint: disable=protected-access import unittest from homeassistant.bootstrap import setup_component import homeassistant.components.light as light from tests.common import get_test_home_assistant ENTITY_LIGHT = 'light.bed_light' class TestDemoClimate(unittest.TestCa...
srcLurker/home-assistant
tests/components/light/test_demo.py
Python
mit
2,325
from __future__ import print_function import re from pygments.util import format_lines r_line = re.compile(r"^(syn keyword vimCommand contained|syn keyword vimOption " r"contained|syn keyword vimAutoEvent contained)\s+(.*)") r_item = re.compile(r"(\w+)(?:\[(\w+)\])?") HEADER = '''\ # -*- coding:...
hacksterio/pygments.rb
vendor/pygments-main/scripts/get_vimkw.py
Python
mit
2,189
## # Copyright 2012-2021 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
hpcugent/easybuild-framework
easybuild/toolchains/gmkl.py
Python
gpl-2.0
1,732
#!/usr/bin/python # Test a basic back to back FootprintLoad() of a single footprint, and FootprintEnumerate() # 1) Build target _pcbnew after enabling scripting in cmake. # $ make _pcbnew # 2) Changed dir to pcbnew # $ cd pcbnew # $ pwd # build/pcbnew # 3) Entered following command line, script takes to arguments: ...
johnbeard/kicad-git
scripts/test_plugin.py
Python
gpl-2.0
1,342
import fauxfactory import pytest from cfme.cloud.provider.openstack import OpenStackProvider from cfme.utils.update import update from cfme.utils.log import logger from cfme.utils.version import current_version pytestmark = [pytest.mark.provider([OpenStackProvider], scope='module')] @pytest.yield_fixture(scope='fun...
jkandasa/integration_tests
cfme/tests/cloud/test_tenant.py
Python
gpl-2.0
1,161
#! /usr/bin/env python # -*- mode: python; indent-tabs-mode: nil; -*- # vim:expandtab:shiftwidth=2:tabstop=2:smarttab: # # Copyright (C) 2011 Patrick Crews # # # 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 Softwar...
0xffea/drizzle
tests/qp_tests/xtrabackup_main/xb_part_range_test.py
Python
gpl-2.0
9,033
# -*- coding: utf-8 -*- # $Id$ """ VirtualBox Constants. See VBoxConstantWrappingHack for details. """ __copyright__ = \ """ Copyright (C) 2010-2014 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free software; you can redistri...
svn2github/vbox
src/VBox/ValidationKit/testdriver/vboxcon.py
Python
gpl-2.0
3,073
#!/usr/bin/env python # # 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 program is distributed in the hope that...
sacsant/avocado-misc-tests
perf/perf_script_bug.py
Python
gpl-2.0
2,642
# -*- 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): db.execute('DROP INDEX IF EXISTS treenode_parent_id_index') db.execute('DROP INDEX IF EXISTS connec...
AdaEne/CATMAID
django/applications/catmaid/migrations/0009_add_missing_indices.py
Python
gpl-3.0
42,511
#! /usr/bin/env python2 """ Very simple script to update headers and footers for the gregorio website. ./BuildSite.py replaces what is above <!-- header --> with the content of header.html, and what is below <!-- footer --> with the content of footer.html. """ import os from os.path import join, get...
rpspringuel/gregorio-project.github.io
BuildSite.py
Python
gpl-3.0
1,966
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
batxes/4Cin
Six_zebra_models/Six_zebra_models_final_output_0.1_-0.1_13000/mtx1_models/Six_zebra_models10552.py
Python
gpl-3.0
13,920
# -*- coding: utf-8 -*- # __init__.py --- # # Filename: __init__.py # Description: # Author: subha # Maintainer: # Created: Sun Apr 17 13:55:30 2016 (-0400) # Version: # Last-Updated: Sun Apr 17 14:59:06 2016 (-0400) # By: subha # Update #: 20 # URL: # Keywords: # Compatibility: # # # Commentary: # # # #...
dilawar/moose-core
python/moose/neuroml2/__init__.py
Python
gpl-3.0
1,662
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe.utils import cint, flt, cstr from frappe import _, msgprint...
ESS-LLP/erpnext-medical
erpnext/accounts/doctype/cashier_closing/cashier_closing.py
Python
gpl-3.0
1,108
import hack import mx.Tools.NewBuiltins k = range(10000) l = range(1,10001) loops = trange(100) def f(k=k,l=l,tuples=tuples,loops=loops): for i in loops: for a,b in tuples(k,l): pass def f1(k=k,l=l,lists=lists,loops=loops): for i in loops: for a,b in lists(k,l): pass ...
inovtec-solutions/OpenERP
openerp/addons/mx/Tools/mxTools/bench1.py
Python
agpl-3.0
952
# # Copyright 2010-2012 Fabric Engine Inc. All rights reserved. # import fabric client = fabric.createClient() cv = client.MR.createConstValue('String', 'Hello') vmo = client.KLC.createValueMapOperator("vm.kl", "operator vm( String input, io String output ) { output = input + ', world!'; }", "vm") vm = client.MR....
chbfiv/fabric-engine-old
Native/Test/Python/mr-value-map.py
Python
agpl-3.0
381
#*************************************************************************** #* * #* Copyright (c) 2013 - Juergen Riegel <FreeCAD@juergen-riegel.net> * #* * #* This pr...
yantrabuddhi/FreeCAD
src/Mod/Fem/MechanicalMaterial.py
Python
lgpl-2.1
11,193
# -*- coding: utf-8 -*- # Copyright (C) 2012 Quang-Cuong Pham <cuong.pham@normalesup.org> # # 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 # ...
vitan/openrave
sandbox/mintime/test-zmp.py
Python
lgpl-3.0
10,310
# 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...
pierreg/tensorflow
tensorflow/python/ops/functional_ops.py
Python
apache-2.0
22,987
#!/usr/bin/env python3 """ Utility for parsing HTML entity definitions available from: http://www.w3.org/ as e.g. http://www.w3.org/TR/REC-html40/HTMLlat1.ent Input is read from stdin, output is written to stdout in form of a Python snippet defining a dictionary "entitydefs" mapping literal en...
batermj/algorithm-challenger
code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Tools/scripts/parseentities.py
Python
apache-2.0
1,740
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ An example of reading a line at a time from standard input without blocking the reactor. """ from twisted.internet import stdio from twisted.protocols import basic class Echo(basic.LineReceiver): from os import linesep as del...
sorenh/cc
vendor/Twisted-10.0.0/doc/core/examples/stdin.py
Python
apache-2.0
646
# Copyright 2015 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apporc/cinder
cinder/objects/cgsnapshot.py
Python
apache-2.0
6,010
# # This file is part of pysnmp software. # # Copyright (c) 2005-2016, Ilya Etingof <ilya@glas.net> # License: http://pysnmp.sf.net/license.html # # This is a Python 2.6- version of the same file at level up # from pysnmp.hlapi.asyncore import ntforg __all__ = ['sendNotification', 'next'] def next(iter): return i...
filippog/pysnmp
pysnmp/hlapi/asyncore/sync/compat/ntforg.py
Python
bsd-3-clause
1,487
""" Helper functions for creating Form classes from Django models and database field objects. """ from __future__ import unicode_literals from collections import OrderedDict from django.core.exceptions import ( ImproperlyConfigured, ValidationError, NON_FIELD_ERRORS, FieldError) from django.forms.fields import F...
mbox/django
django/forms/models.py
Python
bsd-3-clause
52,398
#!/usr/bin/python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # IMPORTANT NOTE: If you make local mods to this file, you must run: # % pnacl/build.sh driver # in order for them to take eff...
cvsuser-chromium/native_client
pnacl/driver/shelltools.py
Python
bsd-3-clause
2,284
# General test module for win32api - please add some :) import sys, os import unittest from win32clipboard import * import win32gui, win32con import pywintypes import array from pywin32_testutil import str2bytes custom_format_name = "PythonClipboardTestFormat" class CrashingTestCase(unittest.TestCase): def test...
sserrot/champion_relationships
venv/Lib/site-packages/win32/test/test_clipboard.py
Python
mit
4,232
import abc from . import actions, exceptions LOG_TRUNCATE = 1024 class Message(object): __metaclass__ = abc.ABCMeta logattrs = [] def __init__(self, tokens): track = set([]) for i in tokens: if i.unique_name: if i.unique_name in track: rais...
ikoz/mitmproxy
pathod/language/message.py
Python
mit
2,852
# -*- coding: utf-8 -*- """ pygments.lexers.elm ~~~~~~~~~~~~~~~~~~~ Lexer for the Elm programming language. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, words, include from pygments.token impo...
lmregus/Portfolio
python/design_patterns/env/lib/python3.7/site-packages/pygments/lexers/elm.py
Python
mit
2,999
# -*- coding: utf-8 -*- """Define set of helper functions for the dataframe.""" import unittest import warnings import mock from influxdb.influxdb08 import SeriesHelper, InfluxDBClient from requests.exceptions import ConnectionError class TestSeriesHelper(unittest.TestCase): """Define the SeriesHelper for test....
influxdata/influxdb-python
influxdb/tests/influxdb08/helper_test.py
Python
mit
9,237
"""A class for downloading event data from Open Catalogs.""" import codecs import json import os import re import shutil import webbrowser from collections import OrderedDict from difflib import get_close_matches from astrocats.catalog.utils import is_number from six import string_types from mosfit.printer import Pri...
mnicholl/MOSFiT
mosfit/fetcher.py
Python
mit
10,425
#!/usr/bin/env python3 import sys from participantCollection import ParticipantCollection if __name__ == "__main__": names = sys.argv[1::] participants = ParticipantCollection() for name in names: if participants.hasParticipantNamed(name): participants.participantNamed(name).isStillIn ...
foobarbazblarg/stayclean
stayclean-2021/reinstate.py
Python
mit
488