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 |
|---|---|---|---|---|---|
# -*- coding: utf-8 -*-
"""Test suite for the TG app's models"""
from nose.tools import eq_
from remysmoke import model
from remysmoke.tests.models import ModelTest
class TestGroup(ModelTest):
"""Unit test case for the ``Group`` model."""
klass = model.Group
attrs = dict(
group_name = u"test_group... | Qalthos/remysmoke | remysmoke/tests/models/test_auth.py | Python | agpl-3.0 | 1,498 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.11 on 2017-01-06 15:42
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('organization_network', '0079_auto_2017... | Ircam-Web/mezzanine-organization | organization/network/migrations/0080_auto_20170106_1642.py | Python | agpl-3.0 | 849 |
import io
from queue import Queue
import requests
import requests_mock
import unittest
import unittest.mock
from bears.general.InvalidLinkBear import InvalidLinkBear
from coalib.settings.Section import Section
def custom_matcher(request):
"""
Mock the status codes for every request by taking the last three c... | vijeth-aradhya/coala-bears | tests/general/InvalidLinkBearTest.py | Python | agpl-3.0 | 9,579 |
from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need
# fine tuning.
buildOptions = dict(packages = ["pyglet", "polytanks", "codecs", "encodings", "selectors"],
excludes = ["tkinter", "PyQt5", "PIL", "setuptools"]
, include_files="assets")
import sys
base = 'Win3... | dotoscat/Polytank-ASIR | client_setup.py | Python | agpl-3.0 | 626 |
# !/usr/bin/python
# -*- coding: utf-8 -*-
#
##################################################################################
#
# This program is part of OSRFramework. You can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, ... | i3visio/osrframework | osrframework/domains/other_subdomains.py | Python | agpl-3.0 | 17,273 |
# -*- coding: utf-8 -*-
# Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ExternalSyncTemplate(models.Model):
_description = 'External Sync Template'
_name = 'clv.external_sync.template'
_ord... | CLVsol/clvsol_odoo_addons | clv_external_sync/models/external_sync_template.py | Python | agpl-3.0 | 2,540 |
"""
Provide tests for sysadmin dashboard feature in sysadmin.py
"""
from __future__ import absolute_import
import glob
import os
import re
import shutil
import unittest
from datetime import datetime
from uuid import uuid4
import mongoengine
from django.conf import settings
from django.test.client import Client
from d... | ESOedX/edx-platform | lms/djangoapps/dashboard/tests/test_sysadmin.py | Python | agpl-3.0 | 12,287 |
"""Tests for account activation"""
import unittest
from uuid import uuid4
from django.conf import settings
from django.core.urlresolvers import reverse
from django.test import TestCase, override_settings
from mock import patch
from edxmako.shortcuts import render_to_string
from openedx.core.djangoapps.site_configurat... | procangroup/edx-platform | common/djangoapps/student/tests/test_activate_account.py | Python | agpl-3.0 | 8,881 |
# -*- coding: utf-8 -*-
# Copyright 2015 Juca Crispim <juca@poraodojuca.net>
# This file is part of toxicbuild.
# toxicbuild 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 Li... | jucacrispim/toxicbuild | toxicbuild/master/signals.py | Python | agpl-3.0 | 1,360 |
# -*- encoding: utf-8 -*-
from . import test_example_model
checks = [test_example_model]
| savoirfairelinux/Odoo-loading-dependency-bug | b_module/tests/__init__.py | Python | agpl-3.0 | 91 |
#!/usr/bin/python
# -*- encoding: utf-8 -*-
###########################################################################
# Module Written to OpenERP, Open Source Management Solution
# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
# All Rights Reserved
###############Credits#########################... | thinkasoft/ProyectoRD-dev | l10n_ve_withholding_islr/__init__.py | Python | agpl-3.0 | 1,587 |
# -*- coding: utf-8 -*-
# (c) 2015 Antiun Ingeniería S.L. - Pedro M. Baeza
# (c) 2015 AvanzOSC - Ainara Galdona
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0
{
"name": "AEAT - Prorrata de IVA",
"version": "8.0.2.0.0",
"license": "AGPL-3",
"author": "AvanzOSC, "
"Antiun Ingen... | Endika/l10n-spain | l10n_es_aeat_vat_prorrate/__openerp__.py | Python | agpl-3.0 | 812 |
# Copyright 2019 Akretion - Renato Lima <renato.lima@akretion.com.br>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from datetime import timedelta
from odoo import fields
from odoo.exceptions import ValidationError
from odoo.tests import common
from odoo.tools.misc import format_date
from ..tools ... | OCA/l10n-brazil | l10n_br_fiscal/tests/test_certificate.py | Python | agpl-3.0 | 4,074 |
from . import product_template
from . import product_category
from . import account_product_fiscal_classification_template
from . import account_product_fiscal_classification
from . import account_chart_template
| OCA/account-fiscal-rule | account_product_fiscal_classification/models/__init__.py | Python | agpl-3.0 | 212 |
{
"name" : "Purchase Price on Input Material",
"version" : "0.1",
"description" : """Include facilities to enter purchase price in pickings of incomming products.""",
"author" : "NaN Projectes de Programari Lliure, S.L.",
"website" : "http://www.NaN-tic.com",
"depends" : [
'stock',
'purchase_discount',
],
... | avanzosc/avanzosc6.1 | nan_stock_purchase_price/__openerp__.py | Python | agpl-3.0 | 486 |
# pylint: disable=missing-docstring
"""
Module for checking permissions with the comment_client backend
"""
import logging
import six
from edx_django_utils.cache import DEFAULT_REQUEST_CACHE
from opaque_keys.edx.keys import CourseKey
from lms.djangoapps.teams.models import CourseTeam
from openedx.core.djangoapps.dj... | cpennington/edx-platform | lms/djangoapps/discussion/django_comment_client/permissions.py | Python | agpl-3.0 | 10,094 |
# Copyright 2013-15 Agile Business Group sagl (<http://www.agilebg.com>)
# Copyright 2015-2016 AvanzOSC
# Copyright 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com>
# Copyright 2017 Jacques-Etienne Baudoux <je@bcim.be>
# Copyright 2020 Manuel Calero - Tecnativa
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0... | OCA/stock-logistics-workflow | stock_picking_invoice_link/models/account_move.py | Python | agpl-3.0 | 2,159 |
# This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, ... | Gorbeh/sf | src/WindowManager.py | Python | agpl-3.0 | 16,966 |
##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... | uclouvain/osis | attribution/views/manage_my_courses/my_teaching_material.py | Python | agpl-3.0 | 1,622 |
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2019 Compassion CH (http://www.compassion.ch)
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py
#
#################################################... | ecino/compassion-switzerland | mobile_app_switzerland/controllers/__init__.py | Python | agpl-3.0 | 389 |
# -*- coding: utf-8 -*-
from django.shortcuts import render, get_object_or_404
from django.contrib.auth.decorators import login_required
from django.utils.translation import ugettext as _
from inviMarket.models import User
@login_required
def del_partner(request, partner_id):
"""
Delete the :model:`auth.User`... | moiseshiraldo/inviMarket | inviMarket/views/del_partner.py | Python | agpl-3.0 | 1,187 |
import scipy.stats as estad
from tikon.ecs.aprioris import APrioriDist
from tikon.ecs.árb_mód import Parám
from tikon.móds.rae.orgs.ecs.repr._plntll_ec import EcuaciónReprCoh
class N(Parám):
nombre = 'n'
líms = (0, None)
unids = None
apriori = APrioriDist(estad.expon(scale=500))
class A(Parám):
... | julienmalard/Tikon | tikon/móds/rae/orgs/ecs/repr/triang.py | Python | agpl-3.0 | 857 |
# coding: utf8
"""Contains the class representing a “missing” leaf."""
from .abstractnode import register, AbstractNode
@register
class Missing(AbstractNode):
"""Represents a “missing” node.
https://github.com/ProjetPP/Documentation/blob/master/data-model.md#missing
"""
__slots__ = ()
_type = 'mi... | ProjetPP/PPP-datamodel-Python | ppp_datamodel/nodes/missing.py | Python | agpl-3.0 | 366 |
# Copyright 2021 ForgeFlow S.L. <https://www.forgeflow.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade
_xmlid_renames = [
(
"sale.access_product_product_attribute_custom_value",
"sale.access_product_product_attribute_custom_value_sal... | OCA/OpenUpgrade | openupgrade_scripts/scripts/sale/14.0.1.1/pre-migration.py | Python | agpl-3.0 | 1,334 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-11-02 10:04
from __future__ import unicode_literals
from django.db import migrations
def update_version_queues(apps, schema_editor):
VersionQueue = apps.get_model('repository', 'VersionQueue')
for queue in VersionQueue.objects.all():
queu... | BirkbeckCTP/janeway | src/repository/migrations/0020_vq_title_abstracts.py | Python | agpl-3.0 | 693 |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from collections import defaultdict
from datetime import datetime
from itertools import groupby
from operator import itemgetter
from re import findall as regex_findall
from re import split as regex_split
from dateutil i... | ygol/odoo | addons/stock/models/stock_move.py | Python | agpl-3.0 | 92,248 |
import sys
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.conf.urls.static import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
admin.autodiscover()
urlpatterns = patterns('',
url(r'^', include('cand... | mhl/yournextmp-popit | mysite/urls.py | Python | agpl-3.0 | 673 |
# Generated by Django 2.2.11 on 2020-03-12 11:17
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("documents", "0003_auto_20200122_1624"),
]
operations = [
migrations.RemoveField(
model_name="document",
name="flattr_disabl... | studentenportal/web | apps/documents/migrations/0004_remove_document_flattr_disabled.py | Python | agpl-3.0 | 342 |
#!/usr/bin/env python2.4
#
# Copyright 2007 Google Inc. All Rights Reserved.
import BaseHTTPServer
import SimpleHTTPServer
import urllib
import random
import sys
import datetime
class MyHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def do_GET(self):
form = {}
now = datetime.datetime.now()
lognam... | maligulzar/Rstudio-instrumented | logserver/server.py | Python | agpl-3.0 | 793 |
from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = 'Exiern'
language = 'en'
url = 'http://www.exiern.com/'
start_date = '2005-09-06'
rights = 'Dan Standing'
class Crawler(CrawlerBase):
histor... | datagutten/comics | comics/comics/exiern.py | Python | agpl-3.0 | 784 |
# -*- coding: utf-8 -*-
# © 2016 Oihane Crucelaegui - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import api, fields, models
from openerp.addons import decimal_precision as dp
class MrpProductionWorkcenterLine(models.Model):
_inherit = 'mrp.production.workcenter.line'
... | esthermm/odoo-addons | mrp_routing_cost/models/mrp_workcenter.py | Python | agpl-3.0 | 6,237 |
"""
.. py:module:: fnl.stat.textclass
:synopsis: Tools for developing a text classifier.
.. moduleauthor:: Florian Leitner <florian.leitner@gmail.com>
.. License: GNU Affero GPL v3 (http://www.gnu.org/licenses/agpl.html)
"""
from collections import defaultdict, namedtuple, Counter
from itertools import chain
from ... | fnl/libfnl | src/fnl/stat/textclass.py | Python | agpl-3.0 | 15,148 |
from pypdl.wrapper.schema.io_value import IOValue
from pypdl.util import DotAccessDict, intersect_dicts
class IOList(object):
def __init__(self, value=None):
value = value or []
if isinstance(value, basestring):
value = [value]
self._values = [IOValue(v) for v in value or []]
... | ntijanic/pdl | pypdl/wrapper/schema/io_list.py | Python | agpl-3.0 | 1,376 |
# -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django.template.loader import ... | akx/shoop | shoop/xtheme/plugins/_base.py | Python | agpl-3.0 | 7,820 |
from django import forms
from django.contrib.auth.decorators import login_required
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth import login, authenticate
from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts impo... | stephenbez/memizr | spacedRepetition/flashcards/views.py | Python | agpl-3.0 | 7,218 |
from django.forms import widgets
from rest_framework import serializers
from restless.models import Employee, Document, EmployeeDocument, LANGUAGE_CHOICES, STYLE_CHOICES
from restless.models import DEPARTMENTS, EMPLOYEETYPES, FAITHS, MARITALSTATUSES, GENDERS, DEGREES
from django.contrib.auth.models import User
import ... | AsianHope/ahem | rest/ahem_REST/restless/serializers.py | Python | agpl-3.0 | 2,007 |
# __init__.py - collection of Swedish numbers
# coding: utf-8
#
# Copyright (C) 2012 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, ... | arthurdejong/python-stdnum | stdnum/se/__init__.py | Python | lgpl-2.1 | 1,012 |
#!/usr/bin/env python
#
# @file ExtensionFunctions.py
# @brief class to create functions specific to the extension class
# @author Frank Bergmann
# @author Sarah Keating
#
# <!--------------------------------------------------------------------------
#
# Copyright (c) 2013-2015 by the California Institute of Tec... | hovo1990/deviser | generator/code_files/cpp_functions/ExtensionFunctions.py | Python | lgpl-2.1 | 22,330 |
"""
:Author: Engelbert Gruber
:Contact: grubert@users.sourceforge.net
:Revision: $Revision: 21817 $
:Date: $Date: 2005-07-21 13:39:57 -0700 (Thu, 21 Jul 2005) $
:Copyright: This module has been placed in the public domain.
LaTeX2e document tree Writer.
"""
__docformat__ = 'reStructuredText'
# code contributions from... | garinh/cs | docs/support/docutils/writers/latex2e.py | Python | lgpl-2.1 | 75,964 |
# 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)
import sys
import os
import llnl.util.tty as tty
import spack.config
import spack.cmd
import spack.cmd.common.arguments ... | rspavel/spack | lib/spack/spack/cmd/dev_build.py | Python | lgpl-2.1 | 3,928 |
#!/usr/bin/python
"""This script lists classes and optionally attributes from UML model created
with Gaphor."""
import optparse
import sys
from gaphor import UML
from gaphor.application import Session
# Setup command line options.
usage = "usage: %prog [options] file.gaphor"
def main():
parser = optparse.Opti... | amolenaar/gaphor | examples/list_classes.py | Python | lgpl-2.1 | 1,239 |
#!/usr/bin/env python
#
# @file createCMakeFiles.py
# @brief create the CMake files
# @author Frank Bergmann
# @author Sarah Keating
#
# <!--------------------------------------------------------------------------
#
# Copyright (c) 2013-2014 by the California Institute of Technology
# (California, USA), the Euro... | hovo1990/deviser | generator/legacy/createCMakeFiles.py | Python | lgpl-2.1 | 16,329 |
##############################################################################
# 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... | skosukhin/spack | lib/spack/llnl/util/tty/color.py | Python | lgpl-2.1 | 9,290 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# ####################################################################
# Copyright (C) 2005-2019 by the FIFE team
# http://www.fifengine.net
# This file is part of FIFE.
#
# FIFE is free software; you can redistribute it and/or
# modify it under the terms of the GNU L... | fifengine/fifengine | tests/swig_tests/action_tests.py | Python | lgpl-2.1 | 4,655 |
#-------------------------------------------------------------------------------
# Copyright (c) 2011 Anton Golubkov.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the GNU Lesser Public License v2.1
# which accompanies this distribution, and is available at
#... | anton-golubkov/Garland | src/test/test_splitblock.py | Python | lgpl-2.1 | 4,345 |
from assembly2.core import *
import time, traceback
from FreeCAD import Base
moduleVars = {}
class CheckAssemblyCommand:
def Activated(self):
debugPrint(2, 'Conducting Assembly Part Overlap Check for: %s' % FreeCAD.ActiveDocument.Label)
objects = [obj for obj in FreeCAD.ActiveDocument.Objects if h... | hamish2014/FreeCAD_assembly2 | assembly2/utils/checkAssembly.py | Python | lgpl-2.1 | 4,299 |
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesse... | FedoraScientific/salome-smesh | src/SMESH_SWIG/PAL_MESH_041_mesh.py | Python | lgpl-2.1 | 2,975 |
# Written by Arno Bakker
# see LICENSE.txt for license information
# TODO: let one hit to SIMPLE+METADATA be P2PURL
import unittest
import os
import sys
import time
import tempfile
import shutil
from Tribler.Core.Utilities.Crypto import sha
from types import StringType, DictType, IntType
from M2Crypto impo... | egbertbouman/tribler-g | Tribler/Test/test_channelcast.py | Python | lgpl-2.1 | 15,423 |
##############################################################################
# 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... | skosukhin/spack | lib/spack/spack/cmd/debug.py | Python | lgpl-2.1 | 3,522 |
# Orca
#
# Copyright 2018 Igalia, S.L.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is di... | GNOME/orca | src/orca/scripts/apps/smuxi-frontend-gnome/__init__.py | Python | lgpl-2.1 | 795 |
#####################################################################
# s02f17.py
#
# (c) Copyright 2021, Benjamin Parzella. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Fou... | bparzella/secsgem | secsgem/secs/functions/s02f17.py | Python | lgpl-2.1 | 1,406 |
# -*- coding: utf8 -*-
#***************************************************************************
#* *
#* Copyright (c) 2011 *
#* Yorik van Havre <yorik@uncreated.net> ... | chrisjaquet/FreeCAD | src/Mod/Arch/ArchSite.py | Python | lgpl-2.1 | 5,788 |
# Author: Yang Long <longyang_123@yeah.net>
#
# License: LGPL-2.1
import numpy as np
# Selection function will select parents for next generation based on fitness data
def Tournament(fitness,nParents,args):
'''
Choose best individual based on the Tournament (Default)
'''
tournamentsize = 3
if 'to... | longyangking/Husky | Husky/GA/Selection.py | Python | lgpl-2.1 | 2,845 |
#!/bin/python
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import line_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self... | chrys87/fenrir | src/fenrirscreenreader/commands/commands/review_curr_line.py | Python | lgpl-3.0 | 1,171 |
from pygp.connection.pcsc.scard import *
| GPContributors/PyGP | pygp/connection/pcsc/__init__.py | Python | lgpl-3.0 | 41 |
from py4j.java_gateway import JavaGateway, GatewayParameters
gateway = JavaGateway(gateway_parameters=GatewayParameters(port=25333))
doc1 = gateway.jvm.gate.Factory.newDocument("initial text")
print(doc1.getContent().toString())
doc2 = gateway.jvm.gate.plugin.python.PythonSlave.loadDocument("docs/doc... | GateNLP/gateplugin-python | examples/pythonSlaveMaster.py | Python | lgpl-3.0 | 469 |
import os
import operator
import sys
from collections import defaultdict
import matplotlib.pyplot as pp
import CommonConf
BASE = 'ksp'
algs = ['mcf', 'raeke', 'edksp', 'vlb', 'ksp', 'ecmp']
def setupMPPDefaults():
pp.rcParams['font.size'] = 66
pp.rcParams['mathtext.default'] = 'regular'
pp.rcParams['ytick... | merlin-lang/kulfi | simulate/viz/LatencyDiffPoints.py | Python | lgpl-3.0 | 5,142 |
from pycp2k.inputsection import InputSection
from ._each396 import _each396
class _restart13(InputSection):
def __init__(self):
InputSection.__init__(self)
self.Section_parameters = None
self.Add_last = None
self.Common_iteration_levels = None
self.Filename = None
s... | SINGROUP/pycp2k | pycp2k/classes/_restart13.py | Python | lgpl-3.0 | 733 |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2018 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
#... | amjames/psi4 | psi4/driver/qcdb/molecule.py | Python | lgpl-3.0 | 87,073 |
import nuke
import pyblish.api
class ExtractSceneSave(pyblish.api.Extractor):
"""
"""
hosts = ['nuke']
order = pyblish.api.Extractor.order - 0.45
families = ['scene']
label = 'Scene Save'
def process(self, instance):
self.log.info('saving scene')
nuke.scriptSave()
| mkolar/pyblish-kredenc | pyblish_kredenc/plugins/nuke/extract_scene_save.py | Python | lgpl-3.0 | 313 |
# -*- coding: utf-8 -*-
#
# This file is part of Glances.
#
# Copyright (C) 2015 Nicolargo <nicolas@nicolargo.com>
#
# Glances is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... | desbma/glances | glances/plugins/glances_mem.py | Python | lgpl-3.0 | 11,139 |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2022 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
#... | psi4/psi4 | psi4/driver/molutil.py | Python | lgpl-3.0 | 9,885 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
############################ Copyrights and license ############################
# #
# Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2014 Thialfihar <t... | allevin/PyGithub | scripts/add_attribute.py | Python | lgpl-3.0 | 6,009 |
import unittest
from plow.ldapadaptor import LdapAdaptor
class FakeLA(LdapAdaptor):
def bind(self, *args):
""" Nothing to see here move along """
initialize = bind
class Test_Ldap_DN_Compare(unittest.TestCase):
def setUp(self):
self.ldap_case_i = FakeLA("uri", "base", case_insensitive_dn... | veloutin/plow | plow/tests/test_dn_compare.py | Python | lgpl-3.0 | 1,458 |
#!/usr/bin/python
""" Validators of phone numbers.
"""
from db_utils.validators.exceptions import ValidationError
from db_utils.validators.phone_codes import COUNTRIES_PHONE_CODES_BY_CODE
from db_utils.validators.phone_codes import COUNTRIES_PHONE_CODES
from db_utils.decorators.unicode import UnicodeArguments
def... | vakaras/db-utils | src/db_utils/validators/phone_number.py | Python | lgpl-3.0 | 5,663 |
import copy
import os
from PyQt5.QtCore import pyqtSlot, Qt, QPoint, QUrl
from PyQt5.QtGui import QDesktopServices
from PyQt5.QtWidgets import QWidget, QAbstractItemView, QMenu, QWidgetAction, QLabel
from mdt.gui.maps_visualizer.actions import SetDimension, SetSliceIndex, SetVolumeIndex, SetColormap, SetRotate, \
... | cbclab/MDT | mdt/gui/maps_visualizer/config_tabs/tab_general.py | Python | lgpl-3.0 | 18,294 |
#!/usr/bin/env python
'''Utilities to deal with PBS torque qstat'''
from vsc.utils import walltime2seconds
from vsc.pbs.job import PbsJob
class QstatParser(object):
'''Parser for full PBS torque qstat output'''
def __init__(self, config):
'''constructor'''
self._config = config
self._... | gjbex/vsc-tools-lib | vsc/pbs/qstat.py | Python | lgpl-3.0 | 4,075 |
# -*- coding: utf-8 -*-
"""
Transmission.
You could say, this is the application layer of the ZVT Protocol
Transmission regulates the packetflow and the rules where the packets go.
It uses a Transport (SerialTransport) to send its data, and you feed
it with a packet through the transm... | mathiasfrey/ecrterm | transmission/__init__.py | Python | lgpl-3.0 | 574 |
#!/usr/bin/env python
"""Driver which checks that celma is properly running."""
import os, sys
# If we add to sys.path, then it must be an absolute path
commonDir = os.path.abspath("./../common")
# Sys path is a list of system paths
sys.path.append(commonDir)
from CELMAPy.scanDriver import ScanDriver
from bout_runne... | CELMA-project/CELMA | celma/testScan.py | Python | lgpl-3.0 | 1,495 |
from transactions import Resources
from utils import i, e, d, l
class AbstractPlayer(object):
def __init__(self, player_id, players_ids, starting_resources, password, interface):
"""
:param player_id: int The id of the currently being created player
:param players_ids: [int] The ids of the ... | tdubourg/downsizing-game | player.py | Python | lgpl-3.0 | 5,097 |
"""
Django settings for satlife project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
im... | andyfangdz/My-SAT-Life | satlife/settings.py | Python | unlicense | 2,253 |
def populate(template, values):
# template is a string containing tags. the tags get replaced with the entries from the values dictionary.
# example:
# > template = "hello there <<your name>>!"
# > values = {"your name": "bukaroo banzai"}
# > populateTemplate( template, values)
# "hello ... | nomel/beaglebone | pru-gpio/templates.py | Python | unlicense | 3,354 |
from datetime import datetime
from sqlalchemy import (
Column,
ForeignKey,
Integer,
Text,
Unicode,
)
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import (
scoped_session,
sessionmaker,
relationship
)
from zope.sqlalchemy import ZopeTransactionExtension
DBSession = scoped_ses... | DataMonster/Python | web/MyShop/myshop/models.py | Python | unlicense | 2,927 |
try:
import _pygeapi
except ImportError as e:
e.msg += ' (this module can be imported only from greenev)'
raise
from .evloop import event_loop
| ateska/striga2-pocs | greenev/pyge/__init__.py | Python | unlicense | 147 |
__author__ = 'Dominic Miglar <dominic.miglar@bitmovin.net>'
import unittest
from bitcodin import get_input
from bitcodin.exceptions import BitcodinNotFoundError
from bitcodin.test.bitcodin_test_case import BitcodinTestCase
class GetNonExistentInputTestCase(BitcodinTestCase):
def setUp(self):
super(GetNon... | bitmovin/bitcodin-python | bitcodin/test/input/testcase_get_non_existent_input.py | Python | unlicense | 614 |
#!/usr/bin/python -tt
# -*- coding: utf-8 -*-
'''
Copyright 2014-2015 Teppo Perä
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
Un... | Debith/py2traits | src/pytraits/__init__.py | Python | apache-2.0 | 818 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
import json
import os
import unittest
import logging
from emelem import app, cli, db, appbuilder, security, sm
logging.basicConfig(format='%(asctime)s:%(... | jpoullet2000/emelem | tests/base_tests.py | Python | apache-2.0 | 2,524 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: meta.py
# Author: Yuxin Wu <ppwwyyxxc@gmail.com>
from .base import ImageAugmentor
__all__ = ['RandomChooseAug', 'MapImage', 'Identity', 'RandomApplyAug',
'RandomOrderAug']
class Identity(ImageAugmentor):
""" A no-op augmentor """
def _augment... | haamoon/tensorpack | tensorpack/dataflow/imgaug/meta.py | Python | apache-2.0 | 4,607 |
# Generated by Django 2.1.3 on 2018-11-05 07:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("peering", "0019_router_netbox_device_id")]
operations = [
migrations.AddField(
model_name="directpeeringsession",
name="last_esta... | respawner/peering-manager | peering/migrations/0020_auto_20181105_0850.py | Python | apache-2.0 | 619 |
import socket
target_host=""
target_port=
client=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
client.connect((target_host,target_port))
client.send("GET / HTTP/1.1\r\nHost: google.com\r\n\r\n")
response=client.recv(4096)
print response | eykomm/ctf_prep | scripts/tcp_client.py | Python | apache-2.0 | 246 |
# 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 u... | xhochy/arrow | python/pyarrow/tests/test_ipc.py | Python | apache-2.0 | 27,938 |
import os
import sys
from subprocess import check_output
class pin_power:
async = 'disabled'
control = 'auto'
runtime_enabled = 'disabled'
runtime_status = 'Unsupported'
runtime_active_kids = 0
runtime_active_time = 0
runtime_suspended_time = 0
runtime_usage = 0
def __str__(self):... | swimmadude66/RestEasy | python/get_pin.py | Python | apache-2.0 | 3,367 |
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^index$', views.index, name='index'),
url(r'^signup/$', views.signup, name = 'signup'),
url(r'^map/$', views.map, name = 'map'),
url(r'^qrtest/$', views.qrtest, name = 'qrtest'),
u... | cliffpanos/True-Pass-iOS | CheckIn/pages/urls.py | Python | apache-2.0 | 403 |
a_str1 = "Craig McBean"
a_str2 = "Sheree-Annm Lewis-McBean"
a_str3 = 'Sheyenne Lewis'
a_str4 = raw_input("Enter fourth Name: ")
print "{:>30}".format(a_str1)
print "{:>30}".format(a_str2)
print "{:>30}".format(a_str3)
print "{:>30}".format(a_str4)
| cmcbean/pynet_test | my-str-ex1.py | Python | apache-2.0 | 251 |
# coding=utf-8
# Copyright 2021 The SLOE Logistic 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | google-research/sloe-logistic | sloe_experiments/est_gamma.py | Python | apache-2.0 | 3,474 |
"""
fixtures and setup for testing the sim_setup subpackage
"""
import pytest
@pytest.fixture(scope='function') # the created directories should be unique
def molecule(path_test_data, tmp_path):
from paratemp import cd
from paratemp.sim_setup import Molecule
path_gro = path_test_data / 'water.mol2'
... | theavey/ParaTemp | tests/test_sim_setup/conftest.py | Python | apache-2.0 | 584 |
from pdf2txt import pdfTotxt1, pdfTotxt2
import os
def AllPdftoTxt(stock_dir, dir, root_txt_path):
'''
function: translate all pdf file to txt file in stock_dir directory
stock_dir:the stock number list
dir: the root directory of all reports
root_txt_path: the target directory where the result txt... | FinancialSentimentAnalysis-team/Finanical-annual-reports-analysis-code | luowang/Data_Processing/AllPdfToTxt.py | Python | apache-2.0 | 2,612 |
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | googleapis/python-dialogflow-cx | samples/generated_samples/dialogflow_v3_generated_flows_validate_flow_sync.py | Python | apache-2.0 | 1,436 |
import pytest
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.by import By
@pytest.fixture
def driver(request):
wd = webdriver.Chrome()
request.addfinalizer(wd.quit)
return wd
def is_element_present(driver, *args):
try:
... | byakatat/selenium-training | test_going_through_all_admin_sections.py | Python | apache-2.0 | 1,705 |
from collections import *
from config import main
import heapq
class UserPreference:
def __init__(self):
self.results = []
self.list1 = []
self.list2 = []
self.list3 = []
self.list4 = []
self.categories = []
self.sold_average = []
self.bought_averag... | adarshdec23/Market | core/preference/main.py | Python | apache-2.0 | 3,319 |
"""
A simple example script to get all posts on a user's timeline.
Originally created by Mitchell Stewart.
<https://gist.github.com/mylsb/10294040>
"""
import facebook
import requests
def some_action(post):
"""Here you might want to do something with each post. E.g. grab the
post's message (post['message']) o... | mobolic/facebook-sdk | examples/get_posts.py | Python | apache-2.0 | 1,391 |
import Live
from _Framework.ModeSelectorComponent import ModeSelectorComponent
from _Framework.ButtonElement import ButtonElement
#from consts import * #see below (not used)
#MANUFACTURER_ID = 71
#ABLETON_MODE = 65
#NOTE_MODE = 65 #67 = APC20 Note Mode; 65 = APC40 Ableton Mode 1
class ShiftableSelectorComponent(ModeS... | jim-cooley/abletonremotescripts | remote-scripts/samples/APC40_20/ShiftableSelectorComponent.py | Python | apache-2.0 | 9,563 |
#
# 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 u... | theopolis/thrift | lib/py/src/transport/sslcompat.py | Python | apache-2.0 | 2,834 |
# python3
# Copyright 2018 DeepMind Technologies Limited. 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 re... | deepmind/acme | examples/open_spiel/run_dqn.py | Python | apache-2.0 | 2,566 |
import math
class segment_tree():
def __init__(self,a):
self.a = a
self.root = self.build(0,len(a)-1)
def build(self,left,right):
if left == right:
node = {}
node['value'] = self.a[left]
node['left'] = None
node['right'] = None
... | saisankargochhayat/algo_quest | hackerearth/segment_tree_problem.py | Python | apache-2.0 | 1,757 |
# Copyright 2015 Red Hat, 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 a... | gooddata/openstack-nova | nova/objects/request_spec.py | Python | apache-2.0 | 37,886 |
# coding=utf-8
# Copyright 2022 The TensorFlow Datasets 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | tensorflow/datasets | tensorflow_datasets/scripts/documentation/doc_utils_test.py | Python | apache-2.0 | 5,983 |
#!/usr/bin/env python
# To run:
# python example-riaks.py deploy
# solar changes stage
# solar changes process
# solar orch run-once last
# python example-riaks.py add_haproxies
# solar changes stage
# solar changes process
# solar orch run-once last
import click
import sys
from solar.core import resource
from sola... | loles/solar | examples/riak/riaks.py | Python | apache-2.0 | 9,183 |
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | googleapis/python-aiplatform | samples/generated_samples/aiplatform_generated_aiplatform_v1beta1_metadata_service_purge_executions_async.py | Python | apache-2.0 | 1,664 |
from django.core.management.base import BaseCommand, CommandError
from django.core.management import call_command
from django.conf import settings
from django.db import connection
from django.db.models import Q, F
from contactnetwork.distances import *
from protein.models import ProteinFamily
import time
import scipy
... | protwis/protwis | contactnetwork/management/commands/build_distance_representative.py | Python | apache-2.0 | 2,958 |