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
import rhwl_hr import rhwl_holidays import controllers
vnsofthe/odoo-dev
addons/rhwl_hr/__init__.py
Python
agpl-3.0
55
#!/usr/bin/env python #coding:utf-8 import sys,os from toughportal.common import utils import shutil import time import random import ConfigParser def gen_secret(clen=32): rg = random.SystemRandom() r = list('1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') return ''.join([rg.choice(r) for ...
talkincode/ToughPORTAL
toughportal/common/secret.py
Python
agpl-3.0
344
from django.contrib import admin from django.contrib import messages from django.core.mail import EmailMultiAlternatives from django.conf import settings from .models import Email from users.models import User @admin.register(Email) class EmailAdmin(admin.ModelAdmin): list_display = ('subject', 'sent', 'created'...
UrLab/incubator
manmail/admin.py
Python
agpl-3.0
3,491
# coding: utf-8 # Copyright (c) 2001-2018, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public transport: # a non ending quest to...
xlqian/navitia
source/tyr/tests/integration/autocomplete_test.py
Python
agpl-3.0
9,528
# -*- 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): # Adding field 'Map.bucket' db.add_column(u'scout_map', 'bucket', self.gf('django.db.m...
CommonsDev/dataserver
scout/migrations/0003_auto__add_field_map_bucket.py
Python
agpl-3.0
8,430
# -*- coding: utf-8 -*- # Copyright 2015-2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo.addons.connector_carepoint.unit import mapper from .common import SetUpCarepointBase class TestCarepointImporterMapper(SetUpCarepointBase): def setUp(self): super(Te...
laslabs/odoo-connector-carepoint
connector_carepoint/tests/test_carepoint_import_mapper.py
Python
agpl-3.0
1,081
# -*- coding: utf-8 -*- # # Progdupeupl documentation build configuration file, created by # sphinx-quickstart on Sat Dec 07 17:25:18 2013. # # 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 # autogenerated file. # #...
progdupeupl/pdp_website
doc/conf.py
Python
agpl-3.0
7,983
from tastypie import fields from tastypie.bundle import Bundle from tastypie.resources import ModelResource, ALL, ALL_WITH_RELATIONS from api.authorization import DateaBaseAuthorization from api.authentication import ApiKeyPlusWebAuthentication from api.base_resources import JSONDefaultMixin from api.serializers import...
lafactura/datea-api
datea_api/apps/comment/resources.py
Python
agpl-3.0
3,337
# -*- coding: utf-8 -*- import datetime from openerp import http from openerp.http import request from openerp.addons.website_portal.controllers.main import website_account class website_account(website_account): @http.route(['/my/home'], type='http', auth="user", website=True) def account(self, **kw): ...
stephen144/odoo
addons/website_portal_sale/controllers/main.py
Python
agpl-3.0
1,940
""" create_org_data_czar_policy.py Creates an IAM group for an edX org and applies an S3 policy to that group that allows for read-only access to the group. """ import argparse import boto3 from botocore.exceptions import ClientError from string import Template import sys template = Template("""{ "Version":"2012-1...
edx/configuration
util/create_data_czar/create_org_data_czar_policy.py
Python
agpl-3.0
2,563
import zmq import sys import ConfigParser import os.path import proto_objs.venue_configuration_pb2 import daemon import signal import lockfile from optparse import OptionParser import datetime full_config = proto_objs.venue_configuration_pb2.configuration() bind_addr="tcp://127.0.0.1:11111" def parse(filename): ...
capitalk/system_k
configuration_server/configuration_server.py
Python
agpl-3.0
4,240
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
OpusVL/odoo
addons/account/wizard/account_change_currency.py
Python
agpl-3.0
3,683
# -*- coding: utf-8 -*- # Copyright (c) 2015 Conwet Lab., Universidad Politécnica de Madrid # This file is part of Wirecloud. # Wirecloud 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 versio...
jpajuelo/wirecloud
src/wirecloud/platform/core/models.py
Python
agpl-3.0
3,337
# -*- 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): # Adding field 'Grader.is_calibration' db.add_column('controller_grader', 'is_calibration', self....
edx/edx-ora
controller/migrations/0011_auto__add_field_grader_is_calibration.py
Python
agpl-3.0
3,932
# Copyright 2015, Oliver Nagy <olitheolix@gmail.com> # # This file is part of Azrael (https://github.com/olitheolix/azrael) # # Azrael 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...
daviddeng/azrael
azrael/test/test.py
Python
agpl-3.0
6,059
# -*- coding: utf-8 -*- # Copyright 2015 AvanzOsc (http://www.avanzosc.es) # Copyright 2015-2016 - Pedro M. Baeza <pedro.baeza@tecnativa.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) from odoo import api, models class PurchaseOrder(models.Model): _inherit = 'purchase.order' @api.model ...
Eficent/purchase-workflow
procurement_purchase_no_grouping/models/purchase_order.py
Python
agpl-3.0
1,521
import os import logging from superdesk import get_resource_service from jinja2.loaders import FileSystemLoader, ModuleLoader, ChoiceLoader, DictLoader, PrefixLoader from liveblog.mongo_util import decode as mongodecode __all__ = ['ThemeTemplateLoader', 'CompiledThemeTemplateLoader'] logger = logging.getLogger('supe...
hlmnrmr/liveblog
server/liveblog/themes/template/loaders.py
Python
agpl-3.0
3,378
# GUI object/properties browser. # Copyright (C) 2011 Matiychuk D. # # 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 ve...
moden-py/SWAPY-deleting
proxy.py
Python
lgpl-2.1
26,563
#!/usr/bin/python # Author: Ben Wing <ben@666.com> # Date: April 2006 ############################################################################# # # # ccg_editor.ply # # ...
OpenCCG/openccg
src/ccg2xml/ccg_editor.py
Python
lgpl-2.1
52,260
#!/usr/bin/env python #pylint: disable=missing-docstring #################################################################################################### # DO NOT MODIFY THIS HEADER # # MOOSE - Multiphysics Object Oriented Simu...
liuwenf/moose
python/MooseDocs/tests/template/test_template.py
Python
lgpl-2.1
4,058
import os import sys import shutil import errno import time import hashlib from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions if "TRAVIS_BUILD_NUMBER" in os.environ: if "SAUCE_...
agrajaghh/duplicati
guiTests/guiTest.py
Python
lgpl-2.1
8,072
#!/usr/bin/env python # Copyright (C) 2010 Red Hat, Inc. # # This 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 so...
colloquium/rhevm-api
python/pool-test.py
Python
lgpl-2.1
1,969
############################################################################## # adaptiveMD: A Python Framework to Run Adaptive Molecular Dynamics (MD) # Simulations on HPC Resources # Copyright 2017 FU Berlin and the Authors # # Authors: Jan-Hendrik Prinz # Contributors: # # `adaptiveMD` is free software: ...
thempel/adaptivemd
adaptivemd/mongodb/base.py
Python
lgpl-2.1
9,063
# -*- coding: UTF-8 -*- # thermo.py # Created by Francesco Porcari on 2010-09-03. # Copyright (c) 2010 Softwell. All rights reserved. # # import os from gnr.core.gnrbag import Bag import random import time cli_max = 12 invoice_max = 20 row_max = 100 sleep_time = 0.05 class GnrCustomWebPage(object): dojo_versio...
poppogbr/genropy
packages/test15/webpages/components/thermo.py
Python
lgpl-2.1
6,614
from mdt import CompartmentTemplate from mdt.lib.post_processing import DTIMeasures __author__ = 'Robbert Harms' __date__ = '2017-08-03' __maintainer__ = 'Robbert Harms' __email__ = 'robbert@xkls.nl' __licence__ = 'LGPL v3' class SSFP_Ball(CompartmentTemplate): parameters = ('d', 'delta', 'G', 'TR', 'flip_angle...
cbclab/MDT
mdt/data/components/standard/compartment_models/SSFP.py
Python
lgpl-3.0
2,008
# coding=utf-8 ##################################### # Imports ##################################### # Python native imports from PyQt5 import QtCore, QtWidgets, QtGui import logging ##################################### # Global Variables ##################################### UI_LOGO = "logo_small.jpg" ############...
SARL-Engineering/ZScan_Processor
Framework/TrayNotifier/TrayNotifierCore.py
Python
lgpl-3.0
3,597
import sys from typing import Dict, Union, List, TYPE_CHECKING import dcs.countries as countries from dcs.mapping import Point import dcs.unitgroup as unitgroup import dcs.planes as planes import dcs.helicopters as helicopters import dcs.ships as ships from dcs.unit import Vehicle, Static, Ship, FARP, SingleHeliPad fro...
pydcs/dcs
dcs/coalition.py
Python
lgpl-3.0
14,260
from base import Entidade from pynfe.utils.flags import CODIGO_BRASIL class Emitente(Entidade): # Dados do Emitente # - Nome/Razao Social (obrigatorio) razao_social = str() # - Nome Fantasia nome_fantasia = str() # - CNPJ (obrigatorio) cnpj = str() # - Inscricao Estadual (obrigatorio...
YACOWS/PyNFe
pynfe/entidades/emitente.py
Python
lgpl-3.0
1,321
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2018 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
d-qoi/TelegramBots
RoseAssassins/cust_handlers/conversationhandler.py
Python
lgpl-3.0
15,351
# Copyright (C) 2015 Will Metcalf william.metcalf@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 version 3 of the License, or # (at your option) any later version. # # This...
lixiangning888/whole_project
modules/signatures_orginal_20151110/browser_scanbox.py
Python
lgpl-3.0
1,730
import sys from unittest import TestCase, expectedFailure, skipIf import pygame from pgzero.loaders import sounds, set_root, UnsupportedFormat pygame.init() class SoundFormatsTest(TestCase): """Test that sound formats we cannot open show an appropriate message.""" @classmethod def setUpClass(s...
RPi-Distro/pgzero
test/test_sound_formats.py
Python
lgpl-3.0
2,385
import sys PYVERSION = 2 if sys.version_info > (3,): PYVERSION = 3
csirtgadgets/csirtg-mail-py
csirtg_mail/constants.py
Python
lgpl-3.0
72
#!/usr/bin/env python ############################################################################## ## ## This file is part of Sardana ## ## http://www.sardana-controls.org/ ## ## Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## ## Sardana is free software: you can redistribute it and/or modify ## it und...
sagiss/sardana
src/sardana/taurus/qt/qtgui/extra_macroexecutor/sequenceeditor/model.py
Python
lgpl-3.0
14,281
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('programacao', '0004_auto_20141221_1952'), ] operations = [ migrations.AddField( model_name='tarefadeprogramacao'...
dudanogueira/microerp
microerp/programacao/migrations/0005_auto_20141221_2023.py
Python
lgpl-3.0
721
""" WSGI config for django_webapp project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_webapp.settings") from d...
koehlma/pygrooveshark
examples/django_webapp/django_webapp/wsgi.py
Python
lgpl-3.0
401
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2013 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
nvbn/guessit
guessit/transfo/split_path_components.py
Python
lgpl-3.0
1,367
#!/usr/bin/python3 import logging import os import sys import click import click_log import colorama from typing import Optional from rxncon.input.excel_book.excel_book import ExcelBook from rxncon.simulation.boolean.boolean_model import SmoothingStrategy, KnockoutStrategy, OverexpressionStrategy from rxncon.simulat...
rxncon/rxncon
rxncon2boolnet.py
Python
lgpl-3.0
7,704
#!/usr/bin/python3 # -*- encoding: utf-8 -*- import unittest from model import * from example_data import expenses, payments, participations, persons, events kasse = Gruppenkasse.create_new() kasse.fill_with(expenses, payments, participations) class TestGruppenkasse(unittest.TestCase): def setUp(self): ....
RincewindWizzard/gruppenkasse-gtk
src/tests/test_model.py
Python
lgpl-3.0
1,143
#!/usr/bin/env python # This file should be compatible with both Python 2 and 3. # If it is not, please file a bug report. """ Contains code that prepairs a subuser's image to be run. """ #external imports import os #internal imports from subuserlib.classes.userOwnedObject import UserOwnedObject class RunReadyImage(...
ruipgpinheiro/subuser
logic/subuserlib/classes/subuserSubmodules/run/runReadyImage.py
Python
lgpl-3.0
2,881
import logging import asyncio logger = logging.getLogger(__name__) class InfluxLineProtocol(asyncio.DatagramProtocol): def __init__(self, loop): self.loop = loop self.transport = None def connection_made(self, transport): self.transport = transport @staticmethod def fmt(meas...
jordens/sensortag
influx_udp.py
Python
lgpl-3.0
2,082
#! /usr/bin/env python from openturns import * TESTPREAMBLE() RandomGenerator().SetSeed(0) try : mu = NumericalPoint(4, 0.0) sigma = NumericalPoint(4, 1.0) a = NumericalPoint(4) b = NumericalPoint(4) a[0] = -4.0 b[0] = 4.0 a[1] = -1.0 b[1] = 4.0 a[2] = 1.0 b[2] = 2.0 a[3] ...
dbarbier/privot
python/test/t_TruncatedNormalFactory_std.py
Python
lgpl-3.0
1,645
# Copyright (c) 2016 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from typing import Union, List, cast import numpy from copy import deepcopy def immutableNDArray(nda: Union[List, numpy.ndarray]) -> numpy.ndarray: """Creates an immutable copy of the given narray If the array...
Ultimaker/Uranium
UM/Math/NumPyUtil.py
Python
lgpl-3.0
830
# -*- coding: utf-8 -*- """ DO NOT EDIT THIS FILE! It is automatically generated from opcfoundation.org schemas. """ from opcua import ua from opcua.ua import NodeId, QualifiedName, NumericNodeId, StringNodeId, GuidNodeId from opcua.ua import NodeClass, LocalizedText def create_standard_address_space_Part11(server)...
iirob/python-opcua
opcua/server/standard_address_space/standard_address_space_part11.py
Python
lgpl-3.0
125,106
from datetime import datetime as dt from functools import reduce import transmissionrpc from config import config TRANSMISSION_ENABLED = config['TRANSMISSION_ENABLED'] TRANS_HOST = config['TRANS_HOST'] TRANS_PORT = config['TRANS_PORT'] TRANS_USER = config['TRANS_USER'] TRANS_PASS = config['TRANS_PASS'] TRANS_PUBLIC_...
sgtsquiggs/PlexThrottle
TransmissionCleanUp.py
Python
unlicense
3,486
import pytz priorities = ('US/Pacific', 'US/Mountain', 'US/Central', 'US/Eastern', 'Brazil/East', 'UTC') all_tz = pytz.all_timezones_set.copy() for priority in priorities: all_tz.remove(priority) all_tz = sorted(list(all_tz)) all_tz[:0] = priorities # prepends list to list # tuples for selection...
mixmastamyk/flask-skeleton
src/timezones.py
Python
unlicense
371
# Note: you must have `flac` and `metaflac` available in your path from silly_beatport_scraper import * import os import subprocess import urllib all_files = os.listdir(".") all_files = [f_name for f_name in all_files if "wav" in f_name] my_scraper = SillyBeatportScraper() print("{} file(s) to scrape".format(len(al...
j-n-f/silly-beatport-scraper
example_scraper.py
Python
unlicense
2,771
# -*- coding: utf-8 -*- import os SECRET_KEY = os.environ["SECRET_KEY"] LANGUAGES = {"en": "English", "es": "Español"} BABEL_TRANSLATION_DIRECTORIES = "translations" HASHEDASSETS_CATALOG = "/srv/www/hashedassets.yml" HASHEDASSETS_SRC_DIR = "static/build" HASHEDASSETS_OUT_DIR = "/srv/www/site/static" HASHEDASSETS_...
carrete/docker-flask-starterkit-mirror
flask-app/starterkit/settings/common.py
Python
unlicense
810
VERSION = "0.1" from trello.api import *
onnodb/CloudBackups
trello/__init__.py
Python
unlicense
43
# coding: utf-8 from __future__ import unicode_literals import re import base64 from .common import InfoExtractor from ..compat import ( compat_urlparse, compat_parse_qs, ) from ..utils import ( clean_html, ExtractorError, int_or_none, unsmuggle_url, smuggle_url, ) class KalturaIE(InfoEx...
hakatashi/youtube-dl
youtube_dl/extractor/kaltura.py
Python
unlicense
15,137
#!/usr/bin/env python """tvnamer - Automagical TV episode renamer Uses data from www.thetvdb.com (via tvdb_api) to rename TV episode files from "some.show.name.s01e01.blah.avi" to "Some Show Name - [01x01] - The First.avi" """ __version__ = "3.0.0" __author__ = "dbr/Ben"
lahwaacz/tvnamer
tvnamer/__init__.py
Python
unlicense
275
import primes # same logic as p120 # I was hoping since these were primes that # maybe Fermat's Little Theorem would show up # ... but it didn't. def check(p,n,target): return 2*p*n > target def main(): ps = primes.primes(250000) i = 0 while not check(ps[i],i+1,10**10): i += 2 print i+1 #...
kbrose/project_euler
p120-129/p123.py
Python
unlicense
347
#!/usr/bin/env python3 #------------------------------------------------------------------------------- # Solution # Find critical points, store in a max heap using min heap properties (-height) #------------------------------------------------------------------------------- import heapq class Solution: def getSk...
kyle8998/Practice-Coding-Questions
leetcode/218-Hard-The-Skyline-Problem/answer.py
Python
unlicense
2,601
from logging.handlers import BaseRotatingHandler import string import time import datetime import os class TimePatternRotatingHandler(BaseRotatingHandler): def __init__(self, filename, when, encoding=None, delay=0): self.when = string.upper(when) self.fname_pat = filename self.mock_dt = N...
vls/python_utils
log_handlers.py
Python
unlicense
1,677
#Problem 2 Project Euler FiboNumSum = 0 first, second, end = 0, 1, 4000000 while second < end: if second % 2 == 0: FiboNumSum += second first, second = second, first + second print FiboNumSum
kingmak/Project_Euler_Solutions
Euler_002.py
Python
unlicense
200
#!/usr/bin/env python # -*- coding:utf-8 -*- import pika import time connection = pika.BlockingConnection(pika.ConnectionParameters( host='localhost')) channel = connection.channel() channel.queue_declare(queue='rpc_queue') def fib(n): if n == 0: return 0 elif n == 1: return 1 else:...
dianshen/python_day
s12day10/rabbitMQ_rpc_serverl.py
Python
apache-2.0
951
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # # 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...
openstack/glance
glance/api/v2/metadef_namespaces.py
Python
apache-2.0
38,490
"""Support for monitoring OctoPrint 3D printers.""" from datetime import timedelta import logging from typing import cast from pyoctoprintapi import ApiError, OctoprintClient, PrinterOffline import voluptuous as vol from yarl import URL from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry from homeassi...
mezz64/home-assistant
homeassistant/components/octoprint/__init__.py
Python
apache-2.0
7,884
from . import font from .indicator import Indicator, IndicatorOptions from .airspeed import AirspeedIndicator from .altitude import AltitudeIndicator from .attitude import AttitudeIndicator from .compass import CompassIndicator from .pfd import PFD from .joystick import Joystick from . import base_test
rbmj/pyflightcontrol
pyflightcontrol/base/__init__.py
Python
apache-2.0
305
# Copyright 2016 Yanis Guenane <yguenane@redhat.com> # Author: Yanis Guenane <yguenane@redhat.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...
Spredzy/lecm
setup.py
Python
apache-2.0
2,374
#!/usr/bin/env python3 # Copyright 2010-2021 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 ...
google/or-tools
examples/tests/issue46.py
Python
apache-2.0
3,057
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwa...
openstack/murano
api-ref/source/conf.py
Python
apache-2.0
6,670
# -*- coding: utf-8 -*- ############################################################################### # # GetNewsletterScheduleTime # Get the scheduled delivery time of a specified Newsletter. # # Python version 2.6 # ############################################################################### from temboo.core.c...
egetzel/wecrow
truehand2014/temboo/Library/SendGrid/NewsletterAPI/Schedule/GetNewsletterScheduleTime.py
Python
apache-2.0
3,356
# -*- encoding: utf-8 -*- ''' :maintainer: HubbleStack :maturity: 2016.7.0 :platform: Windows :requires: SaltStack ''' from __future__ import absolute_import import copy import fnmatch import logging import salt.utils import salt.utils.platform from salt.exceptions import CommandExecutionError from distutils.version...
hubblestack/hubble-salt
hubblestack_nova/win_pkg.py
Python
apache-2.0
8,165
# 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 law or agreed ...
google-research/sloe-logistic
setup.py
Python
apache-2.0
1,690
# coding=utf-8 # Copyright 2020 The TF-Agents Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
tensorflow/agents
tf_agents/bandits/policies/boltzmann_reward_prediction_policy.py
Python
apache-2.0
13,821
#!/usr/bin/env python # -*- coding: utf-8 -*- # Minio Python Library for Amazon S3 Compatible Cloud Storage, # (C) 2015, 2016, 2017, 2018 Minio, 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 Lice...
NitishT/minio-py
tests/functional/tests.py
Python
apache-2.0
79,042
# Copyright 2022 Google LLC. 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 o...
GoogleCloudPlatform/declarative-resource-client-library
python/services/identitytoolkit/beta/tenant.py
Python
apache-2.0
10,862
from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render from django.utils.html import escape from django.views.decorators.csrf import ensure_csrf_cookie from django.contrib.auth import authenticate, login, logout import json # Create your views here. @ensure_csrf_cookie def index...
saigkrish/finance
PY/views.py
Python
apache-2.0
3,119
# -*- coding: utf-8 -*- """ This module implements a console output writer. """ import tensorflow as tf from niftynet.engine.application_variables import CONSOLE from niftynet.engine.signal import ITER_STARTED, ITER_FINISHED class ConsoleLogger(object): """ This class handles iteration events to print outpu...
NifTK/NiftyNet
niftynet/engine/handler_console.py
Python
apache-2.0
1,161
default_app_config = 'providers.edu.iowaresearch.apps.AppConfig' """ Example Record <record> <header> <identifier>oai:ir.uiowa.edu:iwp_archive-1227</identifier> <datestamp>2016-07-05T19:23:14Z</datestamp> <setSpec>publication:iwp</setSpec> <setSpec>publication:grad</setSpec> ...
zamattiac/SHARE
providers/edu/iowaresearch/__init__.py
Python
apache-2.0
1,863
import Queue class Graph: def __init__(self, number_of_vertices): self.number_of_vertices = number_of_vertices self.vertex_details = {} self.visited = {} def add_edge(self, vertex_label, edge): if self.vertex_details.has_key(vertex_label): self.vertex_details[vertex_label].append(edge) else: self....
rdppathak/DataStructuresPython
BinaryTree/TreeTraversal.py
Python
apache-2.0
1,537
print ("I'm not a function") def my_function(): print("Hey I'm a function!") def brett(val): for i in range(val): print("I'm a function with args!") my_function() brett(5)
CiscoDevNet/coding-skills-sample-code
coding202-parsing-json/call-functions.py
Python
apache-2.0
217
# # Copyright (c) 2017 Sugimoto Takaaki # # 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 i...
sugimotokun/VirtualCurrencySplunk
bin/scripts/vc_usd_nt.py
Python
apache-2.0
1,321
# Copyright 2017 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...
kevin-coder/tensorflow-fork
tensorflow/python/autograph/impl/conversion_test.py
Python
apache-2.0
6,484
import os import shutil from android_build_system.pre_checks.base import BaseCheck from android_build_system.config import AAPT, ZIPALIGN class EnvCheck(BaseCheck): def __init__(self): super().__init__("Env check") def _check(self): return os.environ.get("ANDROID_HOME", None) is not None c...
letter113/android-build-system
android_build_system/pre_checks/env_check.py
Python
apache-2.0
851
# noinspection PyProtectedMember,PyUnresolvedReferences class CompoundMutableDict(dict): """ Resource used for mutable compound dictionaries. """ # noinspection PyMissingConstructor def __init__(self, **kwargs): self._parent = kwargs.pop('_parent') self._api = kwargs.pop('api') ...
sbg/sevenbridges-python
sevenbridges/meta/comp_mutable_dict.py
Python
apache-2.0
1,715
""" Configurations -------------- Various setups for different app instances """ class Config: """Default config""" DEBUG = False TESTING = False SESSION_STORE = 'session' MONGODB_DB = 'default' SECRET_KEY = 'flask+braiiin=<3' LIVE = ['v1'] STATIC_PATH = 'static' HASHING_ROUNDS...
Braiiin/outline-logic
outline_logic/config.py
Python
apache-2.0
729
# -*- coding: utf-8 -*- """ watcher test cases """ from .shell_test_case import ShellTestCase from zk_shell.watcher import ChildWatcher class WatcherTestCase(ShellTestCase): """ test watcher """ def test_add_update(self): watcher = ChildWatcher(self.client, print_func=self.shell.show_output) ...
rgs1/zk_shell
zk_shell/tests/test_watcher.py
Python
apache-2.0
633
# Django settings for mcjsms project. import os DEBUG = False TEMPLATE_DEBUG = DEBUG SITE_ROOT = os.path.realpath(os.path.dirname(__file__)) ADMINS = [] MANAGERS = ADMINS if DEBUG: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql',...
sayar/mcj2011
sms/settings.py
Python
apache-2.0
5,993
# 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...
alex/warehouse
warehouse/migrations/versions/a65114e48d6f_set_user_last_login_automatically_in_.py
Python
apache-2.0
1,008
# coding: utf-8 # Copyright 2018 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
prasanna08/oppia
core/controllers/voice_artist.py
Python
apache-2.0
5,564
from JumpScale import j base = j.tools.cuisine._getBaseClass() # TODO: *4 unfinished but ok for now class CuisineHadoop(base): def _install(self): if self._cuisine.core.isUbuntu: C = """\ apt-get install -y apt-get install openjdk-7-jre cd $tmpDir wget -...
Jumpscale/jumpscale_core8
lib/JumpScale/tools/cuisine/apps/CuisineHadoop.py
Python
apache-2.0
1,061
# -*- 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-certificate-manager
google/cloud/certificate_manager_v1/services/certificate_manager/pagers.py
Python
apache-2.0
22,524
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2017-03-07 02:03 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('medgointranet', '0012_motivoanulacion'), ] operations = [ migrations.AddFie...
ElitosGon/medgoproject
medgointranet/migrations/0013_atencion_formulario.py
Python
apache-2.0
507
from __future__ import print_function from __future__ import division import sys sys.path.insert(1, "../../../") import h2o from tests import pyunit_utils from h2o.estimators.model_selection import H2OModelSelectionEstimator as modelSelection # test modelselection algorithm for regression only. Make sure the result f...
h2oai/h2o-3
h2o-py/tests/testdir_algos/modelselection/pyunit_PUBDEV_8346_modelselection_result_frame.py
Python
apache-2.0
3,191
""" Django settings for sample project. Generated by 'django-admin startproject' using Django 1.10.1. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os ...
pablotcarreira/django-arangodb
sample_project/settings.py
Python
apache-2.0
4,023
#!/usr/bin/env python # Copyright 2021 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 require...
googleapis/python-analytics-data
samples/snippets/run_report_with_property_quota.py
Python
apache-2.0
3,462
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 OpenStack LLC. # 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/...
rcbops/python-keystoneclient-buildpackage
keystoneclient/generic/client.py
Python
apache-2.0
8,106
# -*- coding: utf-8 -*- ''' Manage nspawn containers .. versionadded:: 2015.8.0 `systemd-nspawn(1)`__ is a tool used to manage lightweight namespace containers. This execution module provides several functions to help manage these containers. .. __: http://www.freedesktop.org/software/systemd/man/systemd-nspawn.html...
smallyear/linuxLearn
salt/salt/modules/nspawn.py
Python
apache-2.0
42,749
"""Test the Waze Travel Time config flow.""" from homeassistant import config_entries, data_entry_flow from homeassistant.components.waze_travel_time.const import ( CONF_AVOID_FERRIES, CONF_AVOID_SUBSCRIPTION_ROADS, CONF_AVOID_TOLL_ROADS, CONF_DESTINATION, CONF_EXCL_FILTER, CONF_INCL_FILTER, ...
w1ll1am23/home-assistant
tests/components/waze_travel_time/test_config_flow.py
Python
apache-2.0
6,588
vowels = ['a','e','i','o','u'] s = 'sudeep' count = 0 for i in s: for q in vowels: if s[i] == vowels[q]: print 'vowel found' count = count + 1 print "number of vowels:",str(count)
sudeep-melekar/google-pthon-excercises
sudicustom/vowel.py
Python
apache-2.0
193
# 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...
cp16net/trove
trove/extensions/mgmt/instances/service.py
Python
apache-2.0
8,014
from players.models import Player from rest_framework import serializers from teams.models import Team class PlayerTeamSerializer(serializers.ModelSerializer): """Serializer for nesting a Team object inside a Player""" url = serializers.HyperlinkedIdentityField(view_name='team-detail') captain = serialize...
prattl/teamfinder
api/players/api/serializers.py
Python
apache-2.0
3,600
""" Support for Wink fans. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/fan.wink/ """ import logging from homeassistant.components.fan import ( SPEED_HIGH, SPEED_LOW, SPEED_MEDIUM, SUPPORT_DIRECTION, SUPPORT_SET_SPEED, FanEntity) from homeassi...
PetePriority/home-assistant
homeassistant/components/wink/fan.py
Python
apache-2.0
3,231
import zmq import random import time import zmq_ports as ports import zmq_topics as topic from websocket import create_connection RCV_DELAY=0.01 WSPORT = 9000 ########### WEBSOCKET EVENTS ########### WEBSOCKET EVENTS if __name__ == '__main__': #print("Starting comm") # IPC context = zmq.Context() # ...
jeryfast/piflyer
piflyer/zmq_comm.py
Python
apache-2.0
2,795
# Copyright 2012 VMware, 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 a...
eayunstack/neutron
neutron/db/securitygroups_db.py
Python
apache-2.0
39,022
#! /usr/bin/env python """ Copyright [1999-2018] EMBL-European Bioinformatics Institute 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 requir...
Ensembl/cttv024
lib/postgap/Utils.py
Python
apache-2.0
4,340
#!/usr/bin/env python # # Copyright 2015 Airbus # Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA) # # 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 # # ...
ipa-led/airbus_coop
airbus_docgen/src/airbus_docgen/digraph/spline.py
Python
apache-2.0
717
# -*- coding:utf-8 -*- from models.base import SqlBaseModel class Model(SqlBaseModel): def __init__(self): super(Model, self).__init__(db_name='blog') Base = Model().Base
wecatch/app-turbo
demos/models/blog/base.py
Python
apache-2.0
188
from builtins import object import abc class Event(object): @abc.abstractmethod def trigger(self, *args, **kwargs): pass
HelioGuilherme66/robotframework-selenium2library
src/Selenium2Library/utils/events/event.py
Python
apache-2.0
140