code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
mitya57/debian-buildbot
buildbot/process/builder.py
Python
gpl-2.0
25,892
#! /usr/bin/env python # # test_errors.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 ...
gewaltig/cython-neuron
pynest/nest/tests/test_errors.py
Python
gpl-2.0
3,727
''' Crawl the running Docker site and verify all links give a 200 OK ''' import unittest import subprocess # Placeholder for future python based codi/TURFF class BasicTests(unittest.TestCase): ''' Base class for testing ''' def setUp(self): ''' Define some unique data for validation ''' pas...
todorez/crops
tests/unit/test_basic.py
Python
gpl-2.0
397
# encoding: utf-8 # Author: Zhang Huangbin <zhb@iredmail.org> import os import glob import web langmaps = { 'en_US': u'English (US)', 'sq_AL': u'Albanian', 'ar_SA': u'Arabic', 'hy_AM': u'Armenian', 'az_AZ': u'Azerbaijani', 'bs_BA': u'Bosnian (Serbian Latin)', 'bg_BG': u'Bulgarian', 'ca...
villaverde/iredadmin
libs/languages.py
Python
gpl-2.0
3,515
# Copyright (C) 2009, 2010 Canonical Ltd # # 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 distribut...
Distrotech/bzr
bzrlib/send.py
Python
gpl-2.0
8,490
from tasks import func func.delay(1, 2)
emanuelvianna/microcelery
tests/client.py
Python
gpl-2.0
41
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 CERN. # # Invenio 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 ver...
mvesper/invenio
modules/websearch/lib/search_engine_unit_tests.py
Python
gpl-2.0
12,575
# -*- coding: iso-8859-1 -*- # (c) 2006 Stephan Reichholf # This Software is Free, use it where you want, when you want for whatever you want and modify it if you want but don't remove my copyright! from Screens.Screen import Screen from Screens.Standby import TryQuitMainloop from Screens.MessageBox import MessageBox f...
kajgan/e2
lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py
Python
gpl-2.0
4,208
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : Dockable MirrorMap Description : Creates a dockable map canvas Date : February 1, 2011 copyright : (C) 2011 by Giuseppe Sucameli (Faunalia) email ...
alfanugraha/LUMENS-repo
processing/DockableMirrorMap/dockableMirrorMapPlugin.py
Python
gpl-2.0
8,306
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='StaticPage', fields=[ ('id', models.AutoField(s...
null-none/OpenGain
default_set/staticpages/migrations/0001_initial.py
Python
gpl-2.0
1,523
from django.db import models from django.utils import timezone class Hcmeta(models.Model): hcver = models.IntegerField(blank=True, null=True) org_id = models.CharField(max_length=50, blank=True, null=True) details = models.TextField(blank=True, null=True) class Meta: managed = False d...
AevumDecessus/fragforce.org
ffsfdc/models.py
Python
gpl-2.0
15,743
# OeQ autogenerated correlation for 'Window/Wall Ratio South in Correlation to the Building Age' import math import numpy as np from . import oeqCorrelation as oeq def get(*xin): # OeQ autogenerated correlation for 'Window to Wall Ratio in Southern Direction' A_WIN_S_BY_AW= oeq.correlation( const= 20818.6...
UdK-VPT/Open_eQuarter
mole3/stat_corr/window_wall_ratio_south_MFH_by_building_age_correlation.py
Python
gpl-2.0
521
# Copyright (C) 2008 Canonical Ltd # # 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 ...
Distrotech/bzr
bzrlib/smart/message.py
Python
gpl-2.0
13,276
from __future__ import absolute_import from Plugins.Plugin import PluginDescriptor from Components.PluginComponent import plugins from enigma import eDBoxLCD from .qpip import QuadPipScreen, setDecoderMode def main(session, **kwargs): session.open(QuadPipScreen) def autoStart(reason, **kwargs): if reason == 0: ...
openatv/enigma2
lib/python/Plugins/Extensions/QuadPip/plugin.py
Python
gpl-2.0
682
import wx from service.fit import Fit import gui.mainFrame from gui import globalEvents as GE from .calc.fitRemoveImplant import FitRemoveImplantCommand from .calc.fitAddImplant import FitAddImplantCommand from .calc.fitRemoveBooster import FitRemoveBoosterCommand from .calc.fitAddBooster import FitAddBoosterCommand f...
blitzmann/Pyfa
gui/fitCommands/guiMetaSwap.py
Python
gpl-3.0
2,845
import logging from atracker.models import Event from atracker.util import create_event from django.conf.urls import url from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from tastypie.authentication import ( MultiAuthentication, Authentication, Sessi...
hzlf/openbroadcast.org
website/apps/atracker/api/event.py
Python
gpl-3.0
4,386
# -*- coding: UTF-8 -*- ''' virtualbox_const_support.py Constants for VirtualBox. ''' __author__ = "Karol Będkowski <karol.bedkowski@gmail.com>" __version__ = '0.3' # virtual machine states VM_STATE_POWEROFF = 0 VM_STATE_POWERON = 1 VM_STATE_PAUSED = 2 # virtual machine actions VM_START_NORMAL = 1 VM_START_HEADLESS ...
cjparsons74/Kupfer-cjparsons74
kupfer/plugin/virtualbox/constants.py
Python
gpl-3.0
417
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # 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) an...
wenottingham/ansible
lib/ansible/executor/task_executor.py
Python
gpl-3.0
35,230
# vi: ts=4 expandtab # # Copyright (C) 2011 Canonical Ltd. # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # # Author: Scott Moser <scott.moser@canonical.com> # Author: Juerg Haefliger <juerg.haefliger@hp.com> # # This program is free software: you can redistribute it and/or modify # it...
prometheanfire/cloud-init
cloudinit/config/cc_keys_to_console.py
Python
gpl-3.0
2,179
# shipVelocityBonusMI # # Used by: # Variations of ship: Mammoth (2 of 2) # Ship: Hoarder # Ship: Prowler type = "passive" def handler(fit, ship, context): fit.ship.boostItemAttr("maxVelocity", ship.getModifiedItemAttr("shipBonusMI"), skill="Minmatar Industrial")
Ebag333/Pyfa
eos/effects/shipvelocitybonusmi.py
Python
gpl-3.0
270
# -*- 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): # Deleting field 'Group.is_open' db.delete_column('askbot_group', 'is_open') def backwards(self, orm): ...
maxwward/SCOPEBak
askbot/migrations/0141_auto__del_field_group_is_open.py
Python
gpl-3.0
32,000
# -*- coding: utf-8 -*- from __future__ import with_statement import os import sys import traceback # monkey patch bug in python 2.6 and lower # http://bugs.python.org/issue6122 , http://bugs.python.org/issue1236 , http://bugs.python.org/issue1731717 if sys.version_info < (2, 7) and os.name != "nt": import errno...
benbox69/pyload
module/plugins/hooks/ExtractArchive.py
Python
gpl-3.0
21,976
"""CLI tests for Insights part of RH Cloud - Inventory plugin. :Requirement: RH Cloud - Inventory :CaseAutomation: Automated :CaseLevel: System :CaseComponent: RHCloud-Inventory :Assignee: jpathan :TestType: Functional :CaseImportance: High :Upstream: No """ import pytest from broker.broker import VMBroker fro...
lpramuk/robottelo
tests/foreman/cli/test_rhcloud_insights.py
Python
gpl-3.0
1,546
import li_boost_shared_ptr import gc debug = False # simple shared_ptr usage - created in C++ class li_boost_shared_ptr_runme: def main(self): if (debug): print "Started" li_boost_shared_ptr.cvar.debug_shared = debug # Change loop count to run for a long time to monitor memory loopCount = 1 ...
jrversteegh/softsailor
deps/swig-2.0.4/Examples/test-suite/python/li_boost_shared_ptr_runme.py
Python
gpl-3.0
18,306
""" The basic module about log readers """ import os import re from ..utils.gzip2 import GzipFile __author__ = 'chenxm' __all__ = ["FileReader"] class FileReader(object): @staticmethod def open_file(filename, mode='rb'): """ open plain or compressed file @return file handler """ parts = os.path.basename(f...
pombreda/omnipy
omnipy/reader/_reader.py
Python
gpl-3.0
1,755
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_...
lmprice/ansible
lib/ansible/modules/network/aci/aci_access_port_to_interface_policy_leaf_profile.py
Python
gpl-3.0
11,226
import locale import sys from matplotlib import pylab as plt from scipy.interpolate import interp1d import numpy def parse_pRDF(f): pRDFs={} count=0 for line in open(f).readlines(): words=line.split() if words[0]=="dstep": dstep=locale.atof(words[1]) continue elif words[0]=="nstep": nstep=locale.atof...
madscatt/zazzie
src_2.7/sassie/calculate/old_sascalc/hypred_library/run_sassie/plot.py
Python
gpl-3.0
1,043
"""Tests for Lib/fractions.py.""" from decimal import Decimal from test.support import run_unittest import math import numbers import operator import fractions import unittest from copy import copy, deepcopy from pickle import dumps, loads F = fractions.Fraction gcd = fractions.gcd class DummyFloat(object): """Du...
mancoast/CPythonPyc_test
fail/312_test_fractions.py
Python
gpl-3.0
22,695
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
SHH_WT_models/SHH_WT_models_final_output_0.1_-0.1_11000/SHH_WT_models12702.py
Python
gpl-3.0
17,583
"""User preferences for KlustaViewa.""" # ----------------------------------------------------------------------------- # Imports # ----------------------------------------------------------------------------- import logging import numpy as np # --------------------------------------------------------------...
DavidTingley/ephys-processing-pipeline
installation/klustaviewa-0.3.0/kwiklib/utils/preferences_default.py
Python
gpl-3.0
3,402
# -*- coding: utf-8 -*- import re import lxml.html from billy.scrape.committees import CommitteeScraper, Committee from openstates.utils import LXMLMixin class NYCommitteeScraper(CommitteeScraper, LXMLMixin): jurisdiction = "ny" latest_only = True def _parse_name(self, name): """ Split a ...
cliftonmcintosh/openstates
openstates/ny/committees.py
Python
gpl-3.0
8,055
# coding=utf-8 HOSTNAME = 'localhost' DATABASE = 'r' USERNAME = 'web' PASSWORD = 'web' DB_URI = 'mysql://{}:{}@{}/{}'.format( USERNAME, PASSWORD, HOSTNAME, DATABASE)
dongweiming/web_develop
chapter3/section4/consts.py
Python
gpl-3.0
170
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- ########################################################################### # # # ESPResSo++ Benchmark Python script for a polymer melt # # ...
acfogarty/espressopp
bench/polymer_melt/espressopp/espressopp_polymer_melt.py
Python
gpl-3.0
5,227
""" Tests for serial.py. """ import cPickle from cStringIO import StringIO import gzip import shutil import tempfile import unittest from rdkit import Chem from rdkit.Chem import AllChem from vs_utils.utils.rdkit_utils import conformers, serial class TestMolIO(unittest.TestCase): """ Base test class for mol...
rbharath/vs-utils
vs_utils/utils/rdkit_utils/tests/test_serial.py
Python
gpl-3.0
25,593
#!/usr/bin/env python # -*- coding: UTF8 -*- # # Provides access to portaudio. # Copyright (C) 2010 Josiah Gordon <josiahg@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 ve...
zepto/musio
musio/portaudio/__init__.py
Python
gpl-3.0
830
../../../../../../share/pyshared/ubuntu-sso-client/ubuntu_sso/xdg_base_directory/windows.py
Alberto-Beralix/Beralix
i386-squashfs-root/usr/lib/python2.7/dist-packages/ubuntu-sso-client/ubuntu_sso/xdg_base_directory/windows.py
Python
gpl-3.0
91
from __future__ import absolute_import import requests from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.simplejson import dumps, loads from common.models import Singleton from lock_manager import Lock, LockError from .literals import FORM_SUBMIT_URL, FORM_KEY, F...
appsembler/mayan_appsembler
apps/registration/models.py
Python
gpl-3.0
2,647
from six import BytesIO from pathod.language import actions, parse_pathoc, parse_pathod, serve def parse_request(s): return next(parse_pathoc(s)) def test_unique_name(): assert not actions.PauseAt(0, "f").unique_name assert actions.DisconnectAt(0).unique_name class TestDisconnects: ...
x2Ident/x2Ident_test
mitmproxy/test/pathod/test_language_actions.py
Python
gpl-3.0
3,653
"""Beautiful Soup Elixir and Tonic "The Screen-Scraper's Friend" http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup uses a pluggable XML or HTML parser to parse a (possibly invalid) document into a tree representation. Beautiful Soup provides provides methods and Pythonic idioms that make it easy to navigate...
heldergg/dre
lib/bs4/__init__.py
Python
gpl-3.0
12,881
#!/usr/bin/env python3 # encoding: utf-8 from nose import with_setup from tests.utils import * @with_setup(usual_setup_func, usual_teardown_func) def test_negative(): create_file('xxx', 'b.png') create_file('xxx', 'a.png') create_file('xxx', 'a') head, *data, footer = run_rmlint('-i') assert footer...
SeeSpotRun/rmlint
tests/test_options/test_match_without_extension.py
Python
gpl-3.0
718
# -*- coding: utf-8 -*- """Copyright (c) 2009 Sergio Gabriel Teves All rights reserved. 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...
dahool/vertaal
djangoapp/templatetags/bbcodetag.py
Python
gpl-3.0
2,634
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickGear. # # SickGear 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,...
SickGear/SickGear
sickbeard/metadata/generic.py
Python
gpl-3.0
53,307
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """External Python Shell widget: execute Python script in a separate process""" import sys import os import os.path as osp import socket from spyderlib.qt.QtGui imp...
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/spyderlib/widgets/externalshell/pythonshell.py
Python
gpl-3.0
27,927
# encoding: utf-8 # # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Contact: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import, divis...
klahnakoski/ActiveData
vendor/mo_logs/startup.py
Python
mpl-2.0
6,384
# -*- encoding: utf-8 -*- ############################################################################## # # This program 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...
StefanRijnhart/odoomrp-wip
procurement_sale_forecast/__openerp__.py
Python
agpl-3.0
1,597
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # License: GNU General Public License v3. See license.txt import webnotes def execute(): webnotes.conn.sql("""drop table if exists `tabDocType Mapper`""") webnotes.conn.sql("""drop table if exists `tabTable Mapper Detail`""") webnotes.conn.sql("""drop table if ...
gangadhar-kadam/sapphire_app
patches/july_2013/p01_remove_doctype_mappers.py
Python
agpl-3.0
516
from .base_executor import ScriptExecutor from judgeenv import env class RubyExecutor(ScriptExecutor): ext = '.rb' name = 'RUBY' address_grace = 65536 fs = ['.*\.(?:so|rb$)', '/etc/localtime$', '/dev/urandom$', '/proc/self', '/usr/lib/ruby/gems/'] test_program = 'puts gets' @classmethod d...
buhe/judge
executors/ruby.py
Python
agpl-3.0
393
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
passiweinberger/nupic
tests/swarming/nupic/swarming/swarming_test.py
Python
agpl-3.0
101,562
# -*- coding: utf-8 -*- from __future__ import print_function import logging import os import signal import socket import time import traceback from datetime import datetime from multiprocessing import Process from os.path import abspath from os.path import dirname from os.path import expanduser from os.path import j...
ehartsuyker/securedrop
securedrop/tests/functional/functional_test.py
Python
agpl-3.0
11,846
# -*- encoding: utf-8 -*- from openerp.osv import osv, fields class LeadToChangeRequestWizard(osv.TransientModel): """ wizard to convert a Lead into a Change Request and move the Mail Thread """ _name = "crm.lead2cr.wizard" _inherit = 'crm.partner.binding' _columns = { "lead_id": fiel...
mohamedhagag/community-addons
crm_change_request/models/change_request.py
Python
agpl-3.0
3,485
# -*- coding: utf-8 -*- { 'name': "website_register_b2b", 'summary': """ Registration form for site purchases """, 'description': """ Registration form for site purchases """, 'author': "Alexsandro Haag <alex@hgsoft.com.br>, HGSOFT", 'website': "http://www.hgsoft.com.br", ...
alexsandrohaag/odoo-website-addons
website_register_b2b/__manifest__.py
Python
agpl-3.0
514
""" Backfill opportunity ids for Enterprise Coupons, Enterprise Offers and Manual Order Offers. """ import csv import logging from collections import Counter, defaultdict from time import sleep from uuid import UUID from django.core.management import BaseCommand from ecommerce.core.constants import COUPON_PRODUCT_C...
edx/ecommerce
ecommerce/enterprise/management/commands/backfill_opportunity_ids.py
Python
agpl-3.0
9,523
import copy from django.db.models.fields.related import ForeignKey, OneToOneField from rest_framework import mixins from rest_framework.generics import ( GenericAPIView, ListAPIView, ListCreateAPIView, RetrieveAPIView, RetrieveUpdateDestroyAPIView ) from api.generics.serializers import ( DynamicFieldsMode...
openaid-IATI/OIPA
OIPA/api/generics/views.py
Python
agpl-3.0
6,974
# # Copyright (c) 2015 ThoughtWorks, Inc. # # Pixelated 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. # # Pixelated is distrib...
pixelated-project/pixelated-user-agent
service/pixelated/resources/mails_resource.py
Python
agpl-3.0
8,824
# -*- coding: utf-8 -*- from openerp import fields, models, api, _ class account_account_interest(models.Model): _name = "account.account.interest" _description = 'Account Account Interest' account_id = fields.Many2one( 'account.account', 'Account', required=True, ondelete...
syci/ingadhoc-odoo-addons
account_interests/interest.py
Python
agpl-3.0
1,803
# Generated by Django 2.1.7 on 2019-05-12 16:08 from django.db import migrations, models class Migration(migrations.Migration): atomic = False dependencies = [ ('publishers', '0007_publisher_romeo_parent_id'), ] operations = [ migrations.AlterField( model_name='journal',...
wetneb/dissemin
publishers/migrations/0008_fix_name_indices.py
Python
agpl-3.0
1,178
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'UserFeeds' db.create_table(u'core_userfeeds', ( ...
1flow/1flow
oneflow/core/migrations/0036_auto__add_userfeeds__add_usersubscriptions.py
Python
agpl-3.0
37,603
from nxdrive.tests.common_unit_test import UnitTestCase from nxdrive.client import RemoteDocumentClient from nxdrive.client import LocalClient class TestSharedFolders(UnitTestCase): def test_move_sync_root_child_to_user_workspace(self): """See https://jira.nuxeo.com/browse/NXP-14870""" admin_rem...
loopingz/nuxeo-drive
nuxeo-drive-client/nxdrive/tests/test_shared_folders.py
Python
lgpl-2.1
3,409
# 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 Kcov(CMakePackage): """Code coverage tool for compiled programs, Python and Bash which use...
iulian787/spack
var/spack/repos/builtin/packages/kcov/package.py
Python
lgpl-2.1
1,192
#!/usr/bin/python2 # -*- coding: utf-8 -*- # # The Qubes OS Project, http://www.qubes-os.org # # Copyright (C) 2016 Marek Marczykowski-Górecki # <marmarek@invisiblethingslab.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the ...
woju/qubes-core-admin
tests/hardware.py
Python
lgpl-2.1
2,564
############################################################################## # 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...
krafczyk/spack
var/spack/repos/builtin/packages/lammps/package.py
Python
lgpl-2.1
5,249
# 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 Iwyu(CMakePackage): """include-what-you-use: A tool for use with clang to analyze #include...
iulian787/spack
var/spack/repos/builtin/packages/iwyu/package.py
Python
lgpl-2.1
1,882
import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate() mobi...
agry/NGECore2
scripts/mobiles/naboo/rabid_mott.py
Python
lgpl-3.0
1,588
# -*- coding: utf-8 -*- # Copyright(C) 2017 Phyks (Lucas Verney) # # This file is part of a weboob module. # # This weboob module 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 o...
vicnet/weboob
modules/ratp/test.py
Python
lgpl-3.0
1,363
import sys from services.equipment import BonusSetTemplate from java.util import Vector def addBonusSet(core): bonusSet = BonusSetTemplate("set_bonus_smuggler_utility_b") bonusSet.addRequiredItem("item_band_set_smuggler_utility_b_01_01") bonusSet.addRequiredItem("item_ring_set_smuggler_utility_b_01_01") bonusSet...
agry/NGECore2
scripts/equipment/bonus_sets/set_bonus_smuggler_utility_b.py
Python
lgpl-3.0
1,539
# Copyright (C) 2015 Kevin Ross # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from lib.cuckoo.common.abstracts import Signature class DisablesWER(Signature): name = "disables_wer" description = "Attempts to disable Windows Error Repo...
lixiangning888/whole_project
modules/signatures_orignal/disables_wer.py
Python
lgpl-3.0
645
# -*- coding: utf-8 -*- import unittest import warnings from tcdb import adb class TestADBSimple(unittest.TestCase): def setUp(self): self.adb = adb.ADBSimple() self.adb.open('*') def tearDown(self): self.adb.close() self.adb = None def test_setgetitem(self): se...
aplanas/py-tcdb
test/test-adb.py
Python
lgpl-3.0
15,634
from sys import argv from xml.dom import minidom import csv stem = argv[1][:-4] if argv[1].endswith('.xml') else argv[1] xmldoc = minidom.parse('%s.xml'%stem) labellist = xmldoc.getElementsByTagName('label') labels = [l.attributes['name'].value for l in labellist] labelset = set(labels) for split in 'train','test': ...
pmineiro/randembed
mulan/xmlcsv2xy.py
Python
unlicense
829
# 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 model 'ProductType' db.create_table('inventory_producttype', ( ('id', self.gf('django...
codepython/CollectorCity-Market-Place
stores/apps/inventory/migrations/0001_initial.py
Python
apache-2.0
13,952
import json from decimal import Decimal class CustomEncoder(json.JSONEncoder): def default(self, object): if isinstance(object, set): return list(object) if isinstance(object, Decimal): if object % 1 > 0: return float(object) else: ...
apoclyps/pyrestful
pyrestful/encoders.py
Python
apache-2.0
399
from copy import copy import pytest from plenum.common.stacks import nodeStackClass from plenum.common.util import randomString from stp_core.loop.eventually import eventually from stp_core.network.auth_mode import AuthMode from stp_core.network.port_dispenser import genHa from stp_core.test.helper import Printer, pr...
evernym/zeno
stp_zmq/test/test_node_to_node_quota.py
Python
apache-2.0
3,525
# Copyright 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
magic0704/oslo.messaging
oslo_messaging/_drivers/zmq_driver/client/publishers/zmq_req_publisher.py
Python
apache-2.0
3,103
# Copyright 2014 PerfKitBenchmarker 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 appli...
syed/PerfKitBenchmarker
perfkitbenchmarker/static_virtual_machine.py
Python
apache-2.0
10,858
# Copyright 2012 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 requ...
priya-pp/Tacker
tacker/tests/unit/test_auth.py
Python
apache-2.0
4,418
# 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...
alsrgv/tensorflow
tensorflow/python/compiler/tensorrt/test/int32_test.py
Python
apache-2.0
2,529
# 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 use ...
phrocker/accumulo
test/system/auto/sleep.py
Python
apache-2.0
856
# Copyright 2014 - Rackspace Hosting. # # 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...
eshijia/magnum
magnum/common/clients.py
Python
apache-2.0
8,321
# 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 os import tex...
scode/pants
src/python/pants/backend/jvm/tasks/jvm_compile/scala/zinc_compile.py
Python
apache-2.0
12,212
""" FormWizard class -- implements a multi-page form, validating between each step and storing the form's state as HTML hidden fields so that no state is stored on the server side. """ import cPickle as pickle from django import forms from django.conf import settings from django.http import Http404 from django.shortc...
sanjuro/RCJK
vendor/django/contrib/formtools/wizard.py
Python
apache-2.0
10,209
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 import json from .common import BaseTest, functional from c7n.resources.aws import shape_validate from c7n.utils import yaml_load class TestSNS(BaseTest): @functional def test_sns_remove_matched(self): session_factory = s...
thisisshi/cloud-custodian
tests/test_sns.py
Python
apache-2.0
26,225
# Copyright (c) 2014 Red Hat, 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 require...
pnavarro/neutron
neutron/tests/functional/agent/test_l3_agent.py
Python
apache-2.0
53,684
# =============================================================================== # Copyright 2011 Jake Ross # # 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...
USGSDenverPychron/pychron
pychron/database/core/database_adapter.py
Python
apache-2.0
27,114
from .forms import SetupForm from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.shortcuts import redirect from splunkdj.decorators.render import render_to from splunkdj.setup import create_setup_view_context @login_required def home(request): # Redire...
dakiri/splunk-app-twitter
twitter2/django/twitter2/views.py
Python
apache-2.0
944
#!/usr/bin/env python # Copyright 2014 The Swarming Authors. All rights reserved. # Use of this source code is governed by the Apache v2.0 license that can be # found in the LICENSE file. import datetime import sys import unittest import test_env test_env.setup_test_env() # From components/third_party/ import webtes...
madecoste/swarming
appengine/isolate/tests/stats_test.py
Python
apache-2.0
3,366
# Copyright 2015 The Meson development 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/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to ...
rhd/meson
mesonbuild/modules/qt4.py
Python
apache-2.0
7,453
# Copyright (c) 2010-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 law or agree...
smerritt/swift
swift/common/ring/utils.py
Python
apache-2.0
26,082
# Copyright 2014 Xinyu, He <legendmohe@foxmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
fangjing828/LEHome
util/log.py
Python
apache-2.0
2,186
# Copyright 2011 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 requ...
silenceli/nova
nova/api/openstack/compute/limits.py
Python
apache-2.0
15,344
#!/usr/bin/env python """HTTP API logic that ties API call renderers with HTTP routes.""" import json from django import http from werkzeug import exceptions as werkzeug_exceptions from werkzeug import routing import logging from grr.gui import api_call_renderers from grr.lib import access_control from grr.lib i...
ksmaheshkumar/grr
gui/http_api.py
Python
apache-2.0
9,614
from cloudify.workflows import ctx, parameters ctx.logger.info(parameters.node_id) instance = [n for n in ctx.node_instances if n.node_id == parameters.node_id][0] for relationship in instance.relationships: relationship.execute_source_operation('custom_lifecycle.custom_operation')
cloudify-cosmo/cloudify-manager
tests/integration_tests/resources/dsl/deployment_update/modify_relationship_operation/modification/custom_workflow.py
Python
apache-2.0
304
# 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 a...
lucemia/gcloud-python
gcloud/datastore/test_query.py
Python
apache-2.0
25,434
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
CiscoSystems/avos
openstack_dashboard/dashboards/identity/projects/tables.py
Python
apache-2.0
8,769
# Copyright (c) 2012-2016 Seafile Ltd. import logging from rest_framework.authentication import SessionAuthentication from rest_framework.permissions import IsAdminUser from rest_framework.response import Response from rest_framework.views import APIView from rest_framework import status from django.template.defaultfi...
miurahr/seahub
seahub/api2/endpoints/admin/libraries.py
Python
apache-2.0
20,715
from scrapy.spider import BaseSpider from scrapy.selector import HtmlXPathSelector from scrapy.http import Request, HtmlResponse from scrapy.utils.response import get_base_url from scrapy.utils.url import urljoin_rfc from product_spiders.items import Product, ProductLoader class TigerChefSpider(BaseSpider): name...
0--key/lib
portfolio/Python/scrapy/tigerchef/tigerchefspider.py
Python
apache-2.0
2,126
import unittest from lib.data_structures.trees.parse_tree import ParseTree class TestParseTree(unittest.TestCase): def evaluate(self, expression, result): parser = ParseTree() parse_tree = parser.build_parse_tree(expression) self.assertEqual(parser.evaluate(parse_tree), result) pr...
anthonynsimon/python-data-structures-algorithms
tests/test_parse_tree.py
Python
apache-2.0
686
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information. from iptest.assert_util import * add_clr_assemblies("loadorder_3") # namespace First { # public clas...
slozier/ironpython2
Tests/interop/net/loadorder/t3g1.py
Python
apache-2.0
833
from __future__ import absolute_import import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "api.api.settings") import copy import logging import django from api.webview.models import HarvesterResponse, Document, Version from scrapi import events from scrapi.util import json_without_bytes from scrapi.linter i...
erinspace/scrapi
scrapi/processing/postgres.py
Python
apache-2.0
6,903
from module import *
Skaper/RMCStudio
images/emotion/eyes/type1/ico/__init__.py
Python
apache-2.0
21
"""Provide common test tools for Z-Wave JS.""" AIR_TEMPERATURE_SENSOR = "sensor.multisensor_6_air_temperature" HUMIDITY_SENSOR = "sensor.multisensor_6_humidity" ENERGY_SENSOR = "sensor.smart_plug_with_two_usb_ports_value_electric_consumed_2" POWER_SENSOR = "sensor.smart_plug_with_two_usb_ports_value_electric_consumed" ...
w1ll1am23/home-assistant
tests/components/zwave_js/common.py
Python
apache-2.0
1,508
# Copyright (c) 2014 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
keedio/sahara
sahara/service/edp/spark/engine.py
Python
apache-2.0
8,343