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
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2015 FactorLibre (http://www.factorlibre.com) # Hugo Santos <hugo.santos@factorlibre.com> # # This program is free software: you can redistribute it and/o...
factorlibre/carrier-delivery
delivery_carrier_ups/model/delivery.py
Python
agpl-3.0
1,429
# Copyright 2017-2018 Onestein (<http://www.onestein.eu>) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { 'name': 'Directory Files Download', 'summary': 'Download all files of a directory on server', 'author': 'Onestein', 'website': 'http://www.onestein.eu', 'category': 'Tools', ...
onesteinbv/addons-onestein
base_directory_file_download/__manifest__.py
Python
agpl-3.0
584
# coding=utf-8 # 上面的程式內容編碼必須在程式的第一或者第二行才會有作用 ################# (1) 模組導入區 # 導入 cherrypy 模組, 為了在 OpenShift 平台上使用 cherrypy 模組, 必須透過 setup.py 安裝 import cherrypy # 導入 Python 內建的 os 模組, 因為 os 模組為 Python 內建, 所以無需透過 setup.py 安裝 import os # 導入 random 模組 import random import math from cherrypy.lib.static import serve_file # ...
40023255/2015cd_0505
wsgi.py
Python
agpl-3.0
29,993
from __future__ import unicode_literals import calendar import json import logging import os import pycountry import pytz import random import regex import stripe import traceback from datetime import datetime, timedelta from dateutil.relativedelta import relativedelta from decimal import Decimal from django.core.fil...
ewheeler/rapidpro
temba/orgs/models.py
Python
agpl-3.0
82,570
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Delivery Costs', 'version': '1.0', 'category': 'Sales Management', 'description': """ Allows you to add delivery methods in sale orders and picking. ===========================================...
mkieszek/odoo
addons/delivery/__openerp__.py
Python
agpl-3.0
1,023
# -*- coding: utf-8 -*- import APITaxi_models as models from . import manager from sqlalchemy import distinct from geoalchemy2 import shape from shapely import geometry, ops import json from operator import itemgetter from flask import current_app @manager.command def update_zupc(): insee_list = map(itemgetter(0),...
l-vincent-l/APITaxi
APITaxi/commands/load_zupc.py
Python
agpl-3.0
2,976
__copyright__ = "Copyright 2017 Birkbeck, University of London" __author__ = "Martin Paul Eve & Andy Byers" __license__ = "AGPL v3" __maintainer__ = "Birkbeck Centre for Technology and Publishing" from django.conf.urls import url from reports import views urlpatterns = [ # Editor URLs url(r'^$', views.ind...
BirkbeckCTP/janeway
src/reports/urls.py
Python
agpl-3.0
476
""" URLs for User Authentication """ from django.conf import settings from django.conf.urls import include, url from openedx.core.djangoapps.user_api.accounts import settings_views from lms.djangoapps.philu_overrides.views import login_and_registration_form from .views import login, deprecated urlpatterns = [ #...
philanthropy-u/edx-platform
openedx/core/djangoapps/user_authn/urls.py
Python
agpl-3.0
1,485
############################################################################## # # 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
base/tests/business/test_learning_unit_xls.py
Python
agpl-3.0
47,571
# -*- coding: utf-8 -*- # This file is part of Shuup BR. # # Copyright (c) 2016, Rockho Team. All rights reserved. # Author: Christian Hess # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from shuup.front.views.checkout import DefaultChec...
rockho-team/shoop-br
shuup_br/views.py
Python
agpl-3.0
1,376
# Generated by Django 2.2.13 on 2020-10-08 11:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("services", "0077_unit_soft_delete"), ] operations = [ migrations.CreateModel( name="Announcement", fields=[ ...
City-of-Helsinki/smbackend
services/migrations/0078_announcement_errormessage.py
Python
agpl-3.0
2,821
from django.forms.widgets import ChoiceInput, ChoiceFieldRenderer from django.utils.encoding import force_text from django.utils.html import format_html from C4CApplication.meta.visitor import Visitor from C4CApplication.meta.non_member import NonMember from C4CApplication.meta.member import Member from C4CApplication...
dsarkozi/care4care-sdp-grp4
Care4Care/C4CApplication/views/utils.py
Python
agpl-3.0
3,094
#!/usr/bin/env python """ Script to fix workflows with truncated course_ids from https://github.com/Stanford-Online/edx-ora2/pull/25. AIClassifierSet, AIGradingWorkflow and AITrainingWorkflow excluded as they are not used by Stanford. """ from itertools import chain import os import django from django.db.models.functio...
caesar2164/edx-platform
scripts/update_ora2_truncated_course_ids.py
Python
agpl-3.0
2,042
# Copyright 2021 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo.exceptions import ValidationError from odoo.tests.common import TransactionCase class TestExtMandate(TransactionCase): def setUp(self): super(TestExtMandate, self).setUp() self.committee_id = s...
mozaik-association/mozaik
mozaik_committee/tests/test_ext_mandate.py
Python
agpl-3.0
2,326
# sample script for auto registering users into open edx via csv file # tested on cypress and dogwood # # Instructions: # update the filename' to point to the correct csv file # inside of the appropriate edxapp server run: # cd /edx/app/edxapp/edx-platform # source ../edxapp_env # python manage.py lms --settings=aws...
appsembler/configuration
playbooks/appsemblerFiles/customUserImportCsv.py
Python
agpl-3.0
2,958
# The Hazard Library # Copyright (C) 2012-2017 GEM Foundation # # 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 # License, or (at your option) any later version. #...
gem/oq-hazardlib
openquake/hazardlib/tests/gsim/youngs_1997_test.py
Python
agpl-3.0
3,506
#!/usr/bin/env python3 # Copyright 2017 Christoph Reiter <reiter.christoph@gmail.com> # # 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 op...
pexip/pygobject
setup.py
Python
lgpl-2.1
38,639
#!/usr/bin/env python import numpy as np num_node = 11 time_step = 2 time = [0, 1] n = np.linspace(0, 1, num_node) x = n*0 y = n z = n*0 qc = 0.1*n ts = 300*n f = open('qc.dat', 'w') f.write(str(num_node)+ ' ' +str(time_step) +'\n') for t in range(0, time_step): for i in range(0, num_node): f.write(str(x[...
CARDCFEM/Roshan
qc.py
Python
lgpl-2.1
464
# Copyright 2015, Tresys Technology, LLC # # This file is part of SETools. # # SETools 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 ...
TresysTechnology/setools
setoolsgui/apol/__init__.py
Python
lgpl-2.1
763
from collections import Counter from nlp import nlp_utils from unittest import TestCase __author__ = 'fpena' empty_paragraph = "" paragraph1 =\ "Good morning Dr. Adams. The patient is waiting for you in room number 3." paragraph2 = "I'm going to my parent's place over the summer! I can't wait " \ ...
melqkiades/yelp
source/python/nlp/tests/test_nlp_utils.py
Python
lgpl-2.1
4,551
import unittest import mock import __builtin__ import cleanup import util class FakeXapi(object): def __init__(self): self.srRecord = { 'name_label': 'dummy' } def isPluggedHere(self): return True def isMaster(self): return True class AlwaysLockedLock(obje...
chandrikas/sm
tests/test_cleanup.py
Python
lgpl-2.1
14,345
# This file is part of the GOsa framework. # # http://gosa-project.org # # Copyright: # (C) 2016 GONICUS GmbH, Germany, http://www.gonicus.de # # See the LICENSE file in the project's top-level directory for details. import unittest from gosa.backend.plugins.samba.logonhours import * class SambaLogonHoursTestCase(u...
gonicus/gosa
backend/src/tests/backend/plugins/samba/test_logonhours.py
Python
lgpl-2.1
1,020
# Copyright 2015-2016, Tresys Technology, LLC # Copyright 2016, Chris PeBenito <pebenito@ieee.org> # # This file is part of SETools. # # SETools 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 ve...
TresysTechnology/setools
setools/diff/terules.py
Python
lgpl-2.1
16,624
############################################################################## # 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
var/spack/repos/builtin/packages/mpfr/package.py
Python
lgpl-2.1
1,938
#!/usr/bin/env python # # @file strFunctions.py # @brief functions atht adjust strings in some way # @author Frank Bergmann # @author Sarah Keating # # <!-------------------------------------------------------------------------- # # Copyright (c) 2013-2015 by the California Institute of Technology # (California,...
hovo1990/deviser
generator/util/strFunctions.py
Python
lgpl-2.1
12,236
# -*- coding: utf-8 -*- { '!langcode!': 'fr', '!langname!': 'Français', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression en option tels que "field1 = \'newvalue\'". Vous ne pouvez pas mettre à jour ou supprimer les résultats...
olituks/sentinella
frontend/library/web2py/applications/admin/languages/fr.py
Python
lgpl-2.1
18,832
# Copyright 2018, Bastian Germann # 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 Foundation; either version 2.1 of License, or # (at your option) any later...
silnrsi/graide
grcompiler/__init__.py
Python
lgpl-2.1
3,008
import json from uuid import uuid1 from sqlalchemy import func from sqlalchemy.exc import IntegrityError from flask import Blueprint, request, jsonify, make_response from bson.errors import InvalidId from mhn import db from mhn.api import errors from mhn.api.models import ( Sensor, Rule, DeployScript as Scrip...
joyhuang-hack/mhn
server/mhn/api/views.py
Python
lgpl-2.1
8,093
#*************************************************************************** #* * #* Copyright (c) 2015 - Victor Titov (DeepSOIC) * #* <vv.titov@gmail.com> * #* ...
DeepSOIC/Lattice
latticeResample.py
Python
lgpl-2.1
8,898
#! /usr/bin/env python # # GUI module generated by PAGE version 4.9 # In conjunction with Tcl version 8.6 # Dec 22, 2017 02:19:10 PM import sys from tkinter import messagebox try: from Tkinter import * except ImportError: from tkinter import * try: import ttk py3 = 0 except Import...
sergillam/Fucapi
simulador/binaria/binaria.py
Python
lgpl-3.0
3,776
# # @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/procrouting/mcscf/augmented_hessian.py
Python
lgpl-3.0
5,801
from superdesk.notification import push_notification from superdesk.resource import Resource from superdesk.services import BaseService from superdesk.utc import utcnow from liveblog.common import get_user, update_dates_for blogs_schema = { 'title': { 'type': 'string', 'required': True, }, ...
nistormihai/liveblog-server
liveblog/blogs/blogs.py
Python
lgpl-3.0
1,412
"""patchwatcher2 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Cla...
LuyaoHuang/patchwatcher
patchwatcher2/patchwatcher2/urls.py
Python
lgpl-3.0
1,683
from django.contrib import admin from .models import Customer, Document admin.site.register(Customer) admin.site.register(Document) # Register your models here.
justinwiley/bluecard
idimport/admin.py
Python
lgpl-3.0
165
#!/usr/bin/evn python # run failed cmd according to .dayu/failedcmd/ record import os import sys import commands import socket,fcntl,struct def getIpAddr(ifname): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) return socket.inet_ntoa(fcntl.ioctl( s.fileno(), 0x8915, # SIOC...
kk47/Scripts
runfailcmd.py
Python
lgpl-3.0
1,807
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Clément Schreiner # # This file is part of weboob. # # weboob 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 License, or # (at ...
laurentb/weboob
weboob/tools/newsfeed.py
Python
lgpl-3.0
2,710
from __future__ import with_statement from logging.config import fileConfig from alembic import context from sqlalchemy import engine_from_config, pool # this is the Alembic Config object, which provides # access to the values within the .ini file in use. from sqlalchemy.orm import configure_mappers config = context...
suryakencana/niimanga
migrations/env.py
Python
lgpl-3.0
2,152
#!/usr/bin/env python # encoding: utf-8 """ web2serial.py Proxy from web to serial and vice versa, to flash devices and other fun things. https://github.com/Metalab/web2serial Developed in cooperation of Hackerspaceshop (hackerspaceshop.com) Bits Working (bitsworking.com) Community at Metala...
Metalab/web2serial
software/web2serial-core/web2serial.py
Python
lgpl-3.0
11,200
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2015 Dana Christen # # This file is part of talking-sockets, a tool for connection routing. # # talking-sockets 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 Soft...
danac/talking-sockets
doc/generate_code_doc.py
Python
lgpl-3.0
2,817
from contracts import ContractsMeta from .constants import FIXED, VARIABLE, DEFINED_AT_RUNTIME from .exceptions import BlockWriterError, ModelWriterError class BlockConfig(object): def __init__(self, variable, has_default, default, desc, desc_rest, dtype, where=None): self.variable = var...
spillai/procgraph
src/procgraph/core/block_meta.py
Python
lgpl-3.0
9,792
import numpy import vigra from lazyflow.graph import Graph from lazyflow.operators.opFeatureMatrixCache import OpFeatureMatrixCache from lazyflow.operators.classifierOperators import OpTrainClassifierFromFeatureVectors from lazyflow.classifiers import ParallelVigraRfLazyflowClassifierFactory, ParallelVigraRfLazyflowCl...
jakirkham/lazyflow
tests/testOpTrainClassifierFromFeatureVectors.py
Python
lgpl-3.0
2,243
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2021 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 #...
ashutoshvt/psi4
psi4/driver/driver_nbody.py
Python
lgpl-3.0
34,436
import copy from typing import Set, Any from .node import Node from .fol.node_types import is_variable_declaration class Namer: def __init__(self): self._name_dict = {} self._first_name_candidates = ['x', 'y', 'z', 'w'] def _new_name(self, taken_names: Set[str]) -> str: def make_name(...
jadnohra/connect
proto_1/ddq/namer.py
Python
unlicense
2,953
""" Common functions for setup. Usage: from libtbngsetup import * Do not relocate to subfolder.Requires Python 3.x """ import sys,logging,os from pathlib import Path from string import Template import netifaces as ni current_dir = os.path.dirname(os.path.abspath(__file__)) project_dir = Path(current_dir).parent sys.p...
znoxx/tbng
setup/libtbngsetup.py
Python
unlicense
1,508
# -*- coding: utf-8 -*- from unicodedata import normalize from flask import Flask, render_template, request, abort, session, flash, redirect, url_for, Response, g from flaskext.markdown import Markdown from werkzeug.contrib.atom import AtomFeed from werkzeug import secure_filename from urlparse import urljoin from pymo...
aster1sk/tinyblog
__init__.py
Python
unlicense
9,109
#!/usr/bin/env python # -*- coding: utf-8 -*- """ A simple Python module for validating BagIt profiles. See https://github.com/bagit-profiles/bagit-profiles for more information. This module is intended for use with https://github.com/edsu/bagit but does not extend it. Usage: import bagit import bagit_profile # I...
ruebot/bagit-profiles-validator
bagit_profile.py
Python
unlicense
24,238
from __future__ import print_function, division import sys import os sys.path.append(os.path.abspath(".")) sys.dont_write_bytecode = True import random from utils.lib import O from genesis.gen_utils import Statement, Vocabulary, choice __author__ = "bigfatnoob" def sample(collection, size): size = min(size, len(co...
dr-bigfatnoob/quirk
genesis/oracle.py
Python
unlicense
1,842
from django.conf.urls import patterns, include, url urlpatterns = patterns('', url(r'^$', 'simplerest.api.views.home'), url(r'^list/', 'simplerest.api.views.api_list'), )
Bluegear/django-rest-heroku
simplerest/api/urls.py
Python
unlicense
181
# coding: utf-8 from __future__ import unicode_literals import random import time import re from .common import InfoExtractor from ..utils import ( strip_jsonp, unescapeHTML, clean_html, ) from ..compat import compat_urllib_request class QQMusicIE(InfoExtractor): IE_NAME = 'qqmusic' _VALID_URL =...
pridemusvaire/youtube-dl
youtube_dl/extractor/qqmusic.py
Python
unlicense
11,465
# coding: utf-8 # In[ ]: # Word Representations of Words embeddings = tf.Variable( tf.random_uniform([vocabulary_size, embedding_size], -1.0, 1.0)) nce_weights = tf.Variable( tf.truncated_normal([vocabulary_size, embedding_size], stddev=1.0 / math.sqrt(embedding_size))) nce_biases = t...
zlpmichelle/crackingtensorflow
crackingcode/day10/cc_tf_day10_1.py
Python
apache-2.0
1,238
""" Copyright (c) 2015 Michael Bright and Bamboo HR 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 agreed...
BambooHR/rapid
rapid/master/data/migrations/versions/30b4676b2f86_action_instance_slice.py
Python
apache-2.0
1,456
# # Copyright 2012 New Dream Network, LLC (DreamHost) # # 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...
Juniper/ceilometer
ceilometer/tests/storage/test_get_connection.py
Python
apache-2.0
5,056
# Copyright (c) 2015 Mirantis 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...
NetApp/manila
manila/tests/api/v2/test_shares.py
Python
apache-2.0
85,903
# Copyright 2015 Huawei Technologies Co., Ltd. # 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 # # Unl...
stackforge/tricircle
tricircle/common/httpclient.py
Python
apache-2.0
5,505
#!/usr/bin/env python2.5 # # Copyright 2009 the Melange 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 applic...
adviti/melange
app/soc/modules/gsoc/models/grading_record.py
Python
apache-2.0
7,310
from django.conf.urls.defaults import * from views import thumbnail_create, thumbnail_get, share_link_thumbnail_get, \ share_link_thumbnail_create urlpatterns = patterns('', url(r'^(?P<repo_id>[-0-9a-f]{36})/create/$', thumbnail_create, name='thumbnail_create'), url(r'^(?P<repo_id>[-0-9a-f]{36})/(?P<size>...
madflow/seahub
seahub/thumbnail/urls.py
Python
apache-2.0
624
""" Cisco_IOS_XR_ha_eem_cfg This module contains a collection of YANG definitions for Cisco IOS\-XR ha\-eem package configuration. This module contains definitions for the following management objects\: event\-manager\: Event manager configuration Copyright (c) 2013\-2015 by Cisco Systems, Inc. All rights reserve...
abhikeshav/ydk-py
cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_ha_eem_cfg.py
Python
apache-2.0
18,997
# 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 ...
Jc2k/libcloud
libcloud/compute/drivers/gandi.py
Python
apache-2.0
20,033
# # 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 # ...
redhat-openstack/heat
heat/engine/resources/neutron/loadbalancer.py
Python
apache-2.0
25,830
################################################################################ ## ## Verifying that Python can define features as categorical or continuous ## ################################################################################ import sys, os sys.path.insert(1, "../../") import h2o def continuous_or_cat...
ChristosChristofidis/h2o-3
h2o-py/tests/testdir_jira/pyunit_hexdev_29_categorical_continuous.py
Python
apache-2.0
1,318
import logging import pytest import sdk_auth import sdk_cmd import sdk_install import sdk_utils from security import transport_encryption from tests import auth from tests import client from tests import config log = logging.getLogger(__name__) pytestmark = pytest.mark.skipif( sdk_utils.is_open_dcos(), rea...
mesosphere/dcos-kafka-service
frameworks/kafka/tests/test_ssl_kerberos_auth.py
Python
apache-2.0
4,284
import json import random from datetime import date, datetime, time, timedelta import requests def get_config(config_category, config_name): with open('/algernon', 'r') as secret_file: json_string = secret_file.read() config_dict = json.loads(json_string) return config_dict[config_categor...
jkcubeta/algernon
src/overwatch/src/overwatch/alg_tasks/alg_utils.py
Python
apache-2.0
7,463
import numpy as np import rospy from std_msgs.msg import Float32 class FloatHandler(object): """ Handler for ROS topics of type: std_msgs/Float32 Args: topic_name: Name of ROS topic to be subscribed buffer_size: Variable buffer, depend on frame rate of topic, default: 500 queue_siz...
francisc0garcia/autonomous_bicycle
src/classes/handlers/FloatHandler.py
Python
apache-2.0
1,308
# 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...
openstack/python-ironicclient
ironicclient/tests/functional/osc/v1/test_baremetal_allocation.py
Python
apache-2.0
8,146
# Copyright 2014 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
mbrukman/cloud-launcher
src/vm_images.py
Python
apache-2.0
1,790
"""Represent a device to a worker.""" class DeviceRep: """Helper class to represent a device to a worker.""" HEARTBEAT_LIVES = 3 def __init__(self, device_id): """Create a DeviceRep object.""" self.device_id = device_id self.lives = self.HEARTBEAT_LIVES def heartbeat(self): ...
nstoik/farm_monitor
server/fm_server/device/device_representation.py
Python
apache-2.0
660
# -*- coding: utf-8 -*- """ Created on Tue Aug 23 11:51:41 2016 数据库基本操作,从配置文件中读取基本配置信息 @author: lywen """ import traceback from config import get_mongo_config ##database config class database(object): """ 数据库操作抽象类 """ def __init__(self,db,user,password,host,port): self.db = db## 数据库实例 ...
lywen52/quantproject
database/mongodb.py
Python
apache-2.0
2,759
# Copyright 2016 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
enigmampc/catalyst
catalyst/data/minute_bars.py
Python
apache-2.0
47,563
#!/usr/bin/python # -*- coding: utf-8 -*- from .__init__ import * from .object import Object from .control import Control class Curve(Object): """This class represents a curve""" __name__ = "Curve" def __init__(self): Object.__init__(self) #self.handler.line = True self.dash = lis...
jmouriz/sanaviron
sanaviron/objects/curve.py
Python
apache-2.0
1,728
#!/usr/bin/env python # Copyright (c) 2013. Mark E. Madsen <mark@madsenlab.org> # # This work is licensed under the terms of the Apache Software License, Version 2.0. See the file LICENSE for details. """ For a specific experiment name, we subsample raw data into a "full dataset". Given a collection of individual s...
mmadsen/CTPy
analytics/subsample_individual_samples.py
Python
apache-2.0
6,418
from __future__ import absolute_import from kvkit import ( ReferenceProperty, DateTimeProperty, ListProperty, BooleanProperty, DictProperty, StringProperty ) from ...models import BaseDocument, Content, Comment, CommentParentMixin, Project, User, rc from settings import DATABASES class Todo(CommentPare...
shuhaowu/projecto
projecto/apiv1/todos/models.py
Python
apache-2.0
1,135
"""Test the FireServiceRota config flow.""" from unittest.mock import patch from pyfireservicerota import InvalidAuthError from homeassistant import data_entry_flow from homeassistant.components.fireservicerota.const import DOMAIN from homeassistant.const import CONF_PASSWORD, CONF_URL, CONF_USERNAME from tests.comm...
w1ll1am23/home-assistant
tests/components/fireservicerota/test_config_flow.py
Python
apache-2.0
4,871
# 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 sys...
tejal29/pants
src/python/pants/backend/jvm/tasks/provides.py
Python
apache-2.0
5,050
import os import os.path from setuptools import setup, find_packages def get_package_data(): package_data = [] for root, dirnames, filenames in os.walk('./eva_cttv_pipeline/evidence_string_generation/resources'): root = root.replace("./eva_cttv_pipeline/", "") for filename in filenames: ...
EBIvariation/eva-cttv-pipeline
setup.py
Python
apache-2.0
928
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
google-research/language
language/canine/modeling_test.py
Python
apache-2.0
9,977
#!/usr/bin/env python # Copyright 2016 Daniel Nunes # # 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...
GandaG/fomod-designer
src/gui.py
Python
apache-2.0
106,062
# -*- 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...
googleads/google-ads-python
google/ads/googleads/v9/enums/types/campaign_experiment_type.py
Python
apache-2.0
1,239
""" SALTS XBMC Addon Copyright (C) 2014 tknorris 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. T...
aplicatii-romanesti/allinclusive-kodi-pi
.kodi/addons/plugin.video.salts/scrapers/moviestorm_scraper.py
Python
apache-2.0
4,745
# Copyright 2022 The Flax 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 law or agreed to in wri...
google/flax
examples/lm1b/configs/default.py
Python
apache-2.0
3,443
# -*- coding: utf-8 -*- # # Read the Docs Template documentation build configuration file, created by # sphinx-quickstart on Tue Aug 26 14:19:49 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenera...
tidyjiang8/esp-idf-zh
docs/conf.py
Python
apache-2.0
10,048
""" Copyright 2015 herd contributors 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 wr...
FINRAOS/herd
herd-code/herd-tools/herd-content-loader/setup.py
Python
apache-2.0
1,454
import os from kivy.properties import StringProperty, AliasProperty, NumericProperty, BooleanProperty from kivy.uix.boxlayout import BoxLayout from kivy.lang import Builder Builder.load_file('gui/expandselector.kv') class ExpandSelector(BoxLayout): """ExpandSelector is the superclass for all expanding selectors...
OptimalBPM/optimal_file_sync
gui/expandselector.py
Python
apache-2.0
4,077
# Copyright (C) 2014 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. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
ityaptin/ceilometer
ceilometer/tests/unit/test_neutronclient.py
Python
apache-2.0
7,903
# -*- coding: utf-8 -*- """ mygeotab.exceptions ~~~~~~~~~~~~~~~~~~~ Exceptions thrown by the MyGeotab API. """ class MyGeotabException(IOError): """There was an exception while handling your call.""" def __init__(self, full_error, *args, **kwargs): """Initialize MyGeotabException with the full erro...
Geotab/mygeotab-python
mygeotab/exceptions.py
Python
apache-2.0
2,410
from subprocess import check_output import pytest from django.conf import settings from django.contrib.auth.models import Group @pytest.mark.django_db def test_all_migration_files_have_been_created(): check_output( ["python", "manage.py", "makemigrations", "--dry-run", "--check"] ) @pytest.mark.dja...
comic/comic-django
app/tests/core_tests/test_migrations.py
Python
apache-2.0
563
import web_client_test
lukejharmon/tangelohub
test/__init__.py
Python
apache-2.0
23
#!/usr/bin/env python # # Copyright 2012 BloomReach, 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...
jephdo/s4cmd
setup.py
Python
apache-2.0
1,277
import io import tempfile import tarfile import os.path from requests.utils import urlparse from cnrclient.client import CnrClient import cnrclient.pack as packager class KubBase(object): media_type = NotImplementedError target = NotImplementedError kub_class = NotImplementedError manifest_file = []...
app-registry/appr-cli
cnrclient/formats/kub_base.py
Python
apache-2.0
2,636
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 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 requ...
cbrucks/keystone_ldap
tests/test_service.py
Python
apache-2.0
4,005
# Copyright (c) 2010-2012 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...
heemanshu/swift_juno
swift/proxy/controllers/container.py
Python
apache-2.0
9,982
# -*- coding:utf8 -*- # !/usr/bin/env python # Copyright 2017 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...
harshit1504/hs
app.py
Python
apache-2.0
7,265
# Copyright 2013 - Mirantis, Inc. # Copyright 2015 - StackStorm, 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 # # Unl...
StackStorm/mistral
mistral/tests/unit/api/v2/test_tasks.py
Python
apache-2.0
13,732
from config import DATABASE_URI from flask import Flask from flask.ext.bootstrap import Bootstrap from flask.ext.sqlalchemy import SQLAlchemy app = Flask(__name__) db = SQLAlchemy(app) app.config["SQLALCHEMY_DATABASE_URI"] = DATABASE_URI Bootstrap(app)
Mirantis/disk_perf_test_tool
web_app/app.py
Python
apache-2.0
254
# ---------------------------------------------------------------------------- # Copyright 2014 Nervana 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.o...
tambetm/neon
neon/models/mlp.py
Python
apache-2.0
9,880
# Copyright 2017 BrainPad 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...
BrainPad/FindYourCandy
robot-arm/dobot/errors.py
Python
apache-2.0
891
import logging from confluent_kafka import Consumer, KafkaError, KafkaException, TopicPartition from kafka_influxdb.encoder.errors import EncoderError from kafka_influxdb.reader.reader import ReaderAbstract class Reader(ReaderAbstract): """ A high-performance Kafka consumer based on confluent-kafka, which use...
mre/kafka-influxdb
kafka_influxdb/reader/confluent.py
Python
apache-2.0
3,278
# 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 the Li...
pypa/warehouse
warehouse/predicates.py
Python
apache-2.0
1,862
# Copyright 2020 The UniqueRandomizer 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 law or agre...
google-research/unique-randomizer
unique_randomizer/examples/expand_grammar_test.py
Python
apache-2.0
7,225
# Copyright (c) 2013 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 agreed to in writ...
tellesnobrega/storm_plugin
sahara/tests/unit/service/validation/edp/test_job_binary.py
Python
apache-2.0
2,640
# # Copyright 2016 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...
googlefonts/glyphsLib
tests/util_test.py
Python
apache-2.0
1,437