code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
#!/usr/bin/env python # encoding: utf-8 """ Ring modulators used as exciter of a waveguide bank. """ from pyo import * import random s = Server().boot() tab_m = HarmTable([1, 0, 0, 0, 0, 0.3, 0, 0, 0, 0, 0, 0.2, 0, 0, 0, 0, 0, 0.1, 0, 0, 0, 0, 0.05]).normalize() tab_p = HarmTable([1, 0, 0.33, 0, 0.2, 0, 0.143, 0, 0....
belangeo/pyo
pyo/examples/synthesis/05_ring_mod_class.py
Python
lgpl-3.0
980
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import account_analytic from . import hr_holidays from . import res_config_settings from . import res_company
Aravinthu/odoo
addons/project_timesheet_holidays/models/__init__.py
Python
agpl-3.0
217
# -*- coding: utf-8 -*- # Copyright (c) 2017, thumbor-community # Use of this source code is governed by the MIT license that can be # found in the LICENSE file. from thumbor.utils import logger from thumbor.importer import Importer as ThumborImporter class Importer(object): _community_modules = [] @class...
thumbor-community/core
tc_core/importer.py
Python
mit
1,276
from pysubs2 import SSAStyle from pysubs2.substation import parse_tags def test_no_tags(): text = "Hello, world!" assert parse_tags(text) == [(text, SSAStyle())] def test_i_tag(): text = "Hello, {\\i1}world{\\i0}!" assert parse_tags(text) == [("Hello, ", SSAStyle()), ("...
tkarabela/pysubs2
tests/test_parse_tags.py
Python
mit
1,695
# -*- coding: utf-8 -*- from fabric.api import run, abort, env, put, local, sudo from fabric.decorators import runs_once from fabric.context_managers import lcd, settings from fabric.contrib.console import confirm import os war_file = "astrocats-0.1.0-SNAPSHOT-standalone.war" def astrocats(): env.environment ...
clojurecup2014/astrocats
fabfile.py
Python
apache-2.0
1,546
# This code is taken from Python's _parseaddr module which in turn was taken # from its rfc822 module. We lift it here because the parsing we need isn't # exposed in the public API and is subject to change or removal. # # There are no changes to the AddrlistClass used here. # # Copyright (C) 2001-2014 Python Software F...
mitchellrj/python-pgp
pgp/user_id.py
Python
gpl-3.0
10,796
''' This module will cache connections for the code. It essentially functions as a singleton and a global connection cache. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Created on Nov 24, 2014 @author: dfleck ''' from twisted.internet import defer, re...
danfleck/Class-Chord
network-client/src/gmu/chord/ConnectionCache.py
Python
apache-2.0
4,268
# Meran - MERAN UNLP is a ILS (Integrated Library System) wich provides Catalog, # Circulation and User's Management. It's written in Perl, and uses Apache2 # Web-Server, MySQL database and Sphinx 2 indexing. # Copyright (C) 2009-2013 Grupo de desarrollo de Meran CeSPI-UNLP # # This file is part of Meran. # # Meran is...
Desarrollo-CeSPI/meran
dev-plugins/node64/lib/node/wafadmin/ansiterm.py
Python
gpl-3.0
8,364
#!/usr/bin/env python try: from setuptools import setup except: from distutils.core import setup config = { 'description': 'Time-off budgeter and tracker.', 'author': 'Michael Jezierny', 'url': 'https://github.com/alsophian/pterotrack', 'author_email': 'michael@alsophian.net', 'version': '...
alsophian/pterotrack
setup.py
Python
apache-2.0
455
import re from fishbowl.core import ToJson """ Convert string from camelCase to snake_case """ def camel_to_snake(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower() """ Write data to a file """ def write_to_file(file_path, data): file = ope...
gchq/gaffer-tools
fish-bowl/fishbowl/util.py
Python
apache-2.0
946
# encoding: utf-8 """A fancy version of Python's builtin :func:`dir` function. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import inspect from .py3compat import string_types def safe_hasattr(obj, attr): """In recent versions of Python, hasattr() only ...
vicky2135/lucious
oscar/lib/python2.7/site-packages/IPython/utils/dir2.py
Python
bsd-3-clause
2,123
#@+leo-ver=5-thin #@+node:2014fall.20141212095015.1775: * @file wsgi.py # coding=utf-8 # 上面的程式內容編碼必須在程式的第一或者第二行才會有作用 ################# (1) 模組導入區 # 導入 cherrypy 模組, 為了在 OpenShift 平台上使用 cherrypy 模組, 必須透過 setup.py 安裝 #@@language python #@@tabwidth -4 #@+<<declarations>> #@+node:2014fall.20141212095015.1776: ** <<declar...
40223209/2015cdbg5_0420
wsgi.py
Python
gpl-3.0
28,433
""" All supporting Proctoring backends """ from django.apps import apps def get_backend_provider(exam=None, name=None): """ Returns an instance of the configured backend provider Passing in an exam will return the backend for that exam Passing in a name will return the named backend """ if ex...
edx/edx-proctoring
edx_proctoring/backends/__init__.py
Python
agpl-3.0
594
from django.contrib.gis.geos import fromstr, Point, LineString, LinearRing, Polygon from django.utils.functional import total_ordering from django.utils.safestring import mark_safe from django.utils import six from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class GEvent(obje...
ericholscher/django
django/contrib/gis/maps/google/overlays.py
Python
bsd-3-clause
11,886
# Copyright 2009, 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com> # # This file is part of Pleft. # # Pleft 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 optio...
jconsolini/blim
plapp/views.py
Python
gpl-3.0
16,261
# 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...
npuichigo/ttsflow
third_party/tensorflow/tensorflow/contrib/data/python/kernel_tests/concatenate_dataset_op_test.py
Python
apache-2.0
5,568
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2018-2020) # # This file is part of GWpy. # # GWpy 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)...
areeda/gwpy
gwpy/plot/units.py
Python
gpl-3.0
1,345
## # Copyright 2009-2021 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
hpcuantwerpen/easybuild-easyblocks
easybuild/easyblocks/l/lapack.py
Python
gpl-2.0
9,198
""" Canon CR2 raw image data, version 2.0 image metadata extractor. Authors: Fernando Crespo Creation date: 21 february 2017 """ from hachoir_py3.metadata.metadata import (registerExtractor, RootMetadata) from hachoir_py3.parser.image import CR2File from hachoir_py3.metadata.safe import fault_tolerant class CR2Meta...
SickGear/SickGear
lib/hachoir_py3/metadata/cr2.py
Python
gpl-3.0
1,873
import logging log = logging.getLogger(__name__) name = 'Tektronix' from . import awg5014b, dpo7104 models = [awg5014b, dpo7104] log.debug('Found models for "{0}": {1}'.format(name, ''.join(str(x) for x in models))) from .mock import mock_awg5014b, mock_dpo7104 mock_models = [mock_awg5014b, mock_dpo7104] log.debug(...
ghwatson/SpanishAcquisitionIQC
spacq/devices/tektronix/__init__.py
Python
bsd-2-clause
407
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute...
sysadminmatmoz/odoo-clearcorp
hr_payroll_extended/structure.py
Python
agpl-3.0
1,181
# -*- coding: utf-8 -*- """ Sahana Eden Person Registry Model @copyright: 2009-2015 (c) Sahana Software Foundation @license: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Softwa...
schlos/eden
modules/s3db/pr.py
Python
mit
295,666
#!/usr/bin/python # -*- coding: utf-8 -*- import networkx as nx import json import os import re data = [] dataCleaned = [] # reLowerUpper = re.compile("([a-z])([A-Z])") with open('../Data/GOT/Game of Thrones/data/charactersNormalize.json', 'r') as jsonfile: data = json.load(jsonfile) for d in data: if d['alias...
mmewen/UTSEUS-DataScience
Course_04/01_clean_aliases.py
Python
mit
2,533
import tornado.web import tornado.gen from tornado.concurrent import run_on_executor from concurrent.futures import ThreadPoolExecutor from tools.dbcore import ConnPool from tools.encode import UTF8StrToBase64Str, Base64StrToUTF8Str from UIModule.MsgModule import renderMSG from Crawler.BnuVJCrawler.BnuVJCrawler impo...
CKboss/VirtualJudgePY
Handlers/ProblemHandler.py
Python
gpl-2.0
4,706
def array(p_object, dtype=None, copy=True, order=None, subok=False, ndmin=0): # real signature unknown; restored from __doc__ """ array(object, dtype=None, copy=True, order=None, subok=False, ndmin=0) Create an array. Parameters ---------- object : array_like An arr...
allotria/intellij-community
python/testData/inspections/PyUnresolvedReferencesInspection/PrefixExpressionOnClassHavingSkeletons/numpy/core/multiarray.py
Python
apache-2.0
8,049
import os import traceback import py from flaky import flaky from tox.session.commands.run import sequential @flaky(max_runs=3) def test_tox_parallel_build_safe(initproj, cmd, mock_venv, monkeypatch): initproj( "env_var_test", filedefs={ "tox.ini": """ [tox] ...
gaborbernat/tox
tests/unit/package/test_package_parallel.py
Python
mit
4,272
from applications.terms_of_service.models import TermsOfService from django.contrib import admin admin.site.register(TermsOfService)
awwong1/apollo
applications/terms_of_service/admin.py
Python
mit
133
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
vulcansteel/autorest
AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/RequiredOptional/auto_rest_required_optional_test_service/models/string_optional_wrapper.py
Python
mit
860
# -*- test-case-name: twisted.python.test_threadable -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ A module to provide some very basic threading primitives, such as synchronization. """ from __future__ import division, absolute_import from functools import wraps class DummyLock(obj...
normanmaurer/autobahntestsuite-maven-plugin
src/main/resources/twisted/python/threadable.py
Python
apache-2.0
3,253
# -*- coding: utf-8 -*- """ test_generate_files ------------------- Tests formerly known from a unittest residing in test_generate.py named TestGenerateFiles.test_generate_files_nontemplated_exception TestGenerateFiles.test_generate_files TestGenerateFiles.test_generate_files_with_trailing_newline TestGenerateFiles.t...
dajose/cookiecutter
tests/test_generate_files.py
Python
bsd-3-clause
11,704
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
sjsucohort6/openstack
python/venv/lib/python2.7/site-packages/novaclient/tests/unit/fixture_data/availability_zones.py
Python
mit
3,264
#!/usr/bin/env python3 """ :author Wang Weiwei <email>weiwei02@vip.qq.com / weiwei.wang@100credit.com</email> :sine 2017/9/18 :version 1.0 """ import requests URL = "http://ubuntu:9200/" SEARCH = "_search" class ESRequest: def __init__(self, url="", index="", i_type=""): self.__url = url ...
weiwei02/Technical--Documentation
python/src/elastic_learning/rest/ESConfigue.py
Python
apache-2.0
1,889
#!/usr/bin/env pythonw # -*- coding: UTF-8 -*- # # gnrhtml.py # # Created by Giovanni Porcari on 2007-03-24. # Copyright (c) 2007 Softwell. All rights reserved. from gnr.core.gnrbag import Bag from gnr.core.gnrstring import splitAndStrip from gnr.core.gnrstructures import GnrStructData from gnr.core.gnrsys import e...
poppogbr/genropy
gnrpy/gnr/core/gnrhtml.py
Python
lgpl-2.1
31,991
import os from copy import deepcopy from stat import S_ISDIR from math import ceil from time import ctime, time from textwrap import fill from os.path import join try: import matplotlib if not os.environ.get('DISPLAY'): # Use non-interactive Agg backend matplotlib.use('Agg') import matplotl...
terrycojones/dark-matter
dark/civ/graphics.py
Python
mit
22,462
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2012 Cubic ERP - Teradata SAC. (http://cubicerp.com). # # WARNING: This program as such is intended to be used by professional # programmers who take t...
Jgarcia-IAS/SAT
openerp/addons-extra/account_invoice_taxes/account_invoice.py
Python
agpl-3.0
1,605
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributi...
bitcraft/pyglet
pyglet/graphics/allocation.py
Python
bsd-3-clause
14,197
from django.db import models from django.utils.translation import ugettext_lazy as _ from django.contrib.gis.db import models as gismodels from extended_choices import Choices from mapentity.models import MapEntityMixin from geotrek.common.utils import classproperty from geotrek.core.models import Topology, Path from...
camillemonchicourt/Geotrek
geotrek/infrastructure/models.py
Python
bsd-2-clause
5,701
"""SCons.Scanner.Fortran This module implements the dependency scanner for Fortran code. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentati...
faarwa/EngSocP5
zxing/cpp/scons/scons-local-2.0.0.final.0/SCons/Scanner/Fortran.py
Python
gpl-3.0
14,360
#!/usr/bin/env python # pylint: disable=W0622,E0611 # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2022 # 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 Pu...
tzpBingo/github-trending
codespace/python/telegram/files/inputfile.py
Python
mit
4,251
from social.apps.django_app.middleware import SocialAuthExceptionMiddleware from social.exceptions import SocialAuthBaseException from django.conf import settings from django.contrib.messages.api import MessageFailure from django.contrib import messages from django.shortcuts import redirect from django.utils.http...
janezkranjc/tweetset
tweetset/collect/middleware.py
Python
mit
1,034
#!/usr/bin/env python # -*- coding: utf-8 -*- class MasterException(Exception): pass class PathException(Exception): pass class CommunicableException(Exception): pass class LiveActivityException(Exception): pass class StatusableException(Exception): pass class ActivityException(Exception): ...
wzin/interactivespaces-python-api
interactivespaces/exception.py
Python
apache-2.0
373
from __future__ import unicode_literals import copy import inspect import warnings from itertools import chain from django.apps import apps from django.conf import settings from django.core import checks from django.core.exceptions import ( NON_FIELD_ERRORS, FieldDoesNotExist, FieldError, MultipleObjectsReturned,...
kelseyoo14/Wander
venv_2_7/lib/python2.7/site-packages/Django-1.9-py2.7.egg/django/db/models/base.py
Python
artistic-2.0
71,097
#!/usr/bin/env python from .HTMLElement import HTMLElement from .attr_property import attr_property from .bool_property import bool_property class HTMLOListElement(HTMLElement): compact = bool_property("compact") start = attr_property("start", int) type = attr_property("type") def __init__(self...
buffer/thug
thug/DOM/W3C/HTML/HTMLOListElement.py
Python
gpl-2.0
378
from email.headerregistry import Address from typing import Dict from mailbits import email2dict from daemail.message import USER_AGENT, DraftMessage TEXT = "àéîøü\n" def addr2dict(addr: Address) -> Dict[str, str]: return { "display_name": addr.display_name, "address": addr.addr_spec, } def...
jwodder/daemail
test/test_message.py
Python
mit
8,455
# # Copyright (c) 2014, Arista Networks, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # Redistributions of source code must retain the above copyright notice, # this list of condit...
mith1979/ansible_automation
applied_python/applied_python/lib/python2.7/site-packages/pyeapi/api/acl.py
Python
apache-2.0
5,639
#!/usr/bin/python3 """ Module outil pour transformer la lecture d'une socket en lecture de tableau. """ class SocketReader(): """ La socket devient une liste. Stocke toutes les données lues. @warn A ne pas utiliser dans la déclaration d'une boucle. reader = SocketReader(socket) #lecture de ...
Koala-Kaolin/pyweb
src/mapper.py
Python
gpl-3.0
1,013
import bpy settings = bpy.context.edit_movieclip.tracking.settings settings.default_pattern_size = 31 settings.default_search_size = 151 settings.default_motion_model = 'LocRot' settings.use_default_brute = True settings.use_default_normalization = True settings.use_default_mask = False settings.default_frames_limit ...
cschenck/blender_sim
fluid_sim_deps/blender-2.69/2.69/scripts/presets/tracking_settings/fast_motion.py
Python
gpl-3.0
560
from http import HTTPStatus from flask import jsonify from flask_restful import abort from logging import Logger from pbench.server import PbenchServerConfig, JSON from pbench.server.api.resources import Schema, Parameter, ParamType from pbench.server.api.resources.query_apis import ( CONTEXT, ElasticBase, ...
distributed-system-analysis/pbench
lib/pbench/server/api/resources/query_apis/datasets_detail.py
Python
gpl-3.0
6,242
import json import struct import zlib class Packet(object): # Packet type specifications loaded from the JSON file. # The specifications are cached between packets. _specifications = None def __init__(self): """ Initialize the packet with an empty contents key-value store. All ...
timvandermeij/drone-tomography
zigbee/Packet.py
Python
gpl-3.0
10,719
from sanic import Sanic from sanic.views import CompositionView from sanic.views import HTTPMethodView from sanic.views import stream as stream_decorator from sanic.blueprints import Blueprint from sanic.response import stream, text bp = Blueprint('blueprint_request_stream') app = Sanic('request_stream') class Simpl...
yunstanford/sanic
examples/request_stream/server.py
Python
mit
1,683
""" Module where admin tools dashboard classes are defined. """ from django.template.defaultfilters import slugify from django.utils.importlib import import_module from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse from django.contrib.contenttypes.models import Content...
edisonlz/fruit
web_project/base/site-packages/grappelli/dashboard/dashboards.py
Python
apache-2.0
6,499
import os from django.core.management import ManagementUtility from .initconfig import initconfig def execute_from_command_line(argv=None): """ A simple method that runs a ManagementUtility. """ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "colab.settings") utility = ManagementUtility(argv)...
rafamanzo/colab
colab/management/__init__.py
Python
gpl-2.0
395
# # CORE # Copyright (c)2012-2013 the Boeing Company. # See the LICENSE file included in this distribution. # # author: Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com> # ''' sdt.py: Scripted Display Tool (SDT3D) helper ''' from core.constants import * from core.api import coreapi from .coreobj import PyCoreNet, PyCore...
Benocs/core
src/daemon/core/sdt.py
Python
bsd-3-clause
13,204
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Dummy conftest.py for ddpuk. If you don't know what this is for, just leave it empty. Read more about conftest.py under: https://pytest.org/latest/plugins.html """ from __future__ import print_function, absolute_import, division import pytest
kynan/DDPy
tests/conftest.py
Python
mit
311
# Copyright (c) 2014, The MITRE Corporation. All rights reserved. # For license information, see the LICENSE.txt file from __future__ import absolute_import import libtaxii as t from libtaxii.common import generate_message_id from libtaxii.constants import * import libtaxii.messages_10 as tm10 import libtaxii.message...
TAXIIProject/django-taxii-services
taxii_services/exceptions.py
Python
bsd-3-clause
3,111
# # Copyright 2015-2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed ...
EdDev/vdsm
lib/vdsm/common/eventfd.py
Python
gpl-2.0
4,361
# Copyright (c) OpenMMLab. All rights reserved. import torch import torch.nn as nn import torch.nn.functional as F from mmcv.runner import BaseModule, auto_fp16, force_fp32 from torch.nn.modules.utils import _pair from mmdet.core import build_bbox_coder, multi_apply, multiclass_nms from mmdet.models.builder import HEA...
open-mmlab/mmdetection
mmdet/models/roi_heads/bbox_heads/bbox_head.py
Python
apache-2.0
25,657
# Copyright (c) David Wilson 2015 # Icarus 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. # Icarus is distributed in the hope that it...
jeroanan/GameCollection
Tests/Interactors/Game/TestAddGameInteractor.py
Python
gpl-3.0
3,393
# Copyright 2009 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, ...
tallstreet/jaikuenginepatch
urls.py
Python
apache-2.0
6,175
# coding=utf-8 # Copyright 2015 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 multiprocessi...
fkorotkov/pants
src/python/pants/util/process_handler.py
Python
apache-2.0
3,299
import numpy as np from menpo.base import MenpoMissingDependencyError try: from cyffld2 import train_model except ImportError: raise MenpoMissingDependencyError('cyffld2') from menpodetect.detect import menpo_image_to_uint8 from .conversion import ensure_channel_axis def train_ffld2_detector(positive_image...
jabooth/menpodetect
menpodetect/ffld2/train.py
Python
bsd-3-clause
3,610
""" Checks that an obsolete PortableServer::RefCountServantBase is not used """ from _types import header_files type_list = header_files from sys import stderr import re regex = re.compile ("RefCountServantBase") error_message = ": error: reference to deprecated PortableServer::RefCountServantBase\n" from _generic...
binghuo365/BaseLab
3rd/ACE-5.7.0/ACE_wrappers/bin/PythonACE/fuzz/refcountservantbase.py
Python
mit
496
# -*- coding: utf-8 -*- __author__ = 'romus' HOST = "localhost" PORT = 27017 USR = "statistic" PWD = "statistic" DB = "statistic" FC_N = "files" FC_DN = "files_data" MDN = "test_merge_dict"
romus/statistic4text
statistic4text/test/connection_configs.py
Python
gpl-3.0
194
class DefaultConfig(object): SQLALCHEMY_TRACK_MODIFICATIONS = True SQLALCHEMY_DATABASE_URI = 'sqlite:///orgsms.db' VAPID_EMAIL = "orgsms@octothorpe.club" VAPID_KEY = "orgsms/vapid.pem"
thefinn93/orgsms
orgsms/config.py
Python
gpl-3.0
201
from Screens.InfoBar import InfoBar from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Components.ActionMap import ActionMap from Components.ConfigList import ConfigListScreen from Components.Label import Label from Components.Sources.StaticText import StaticText from Components.config imp...
openNSS/enigma2
lib/python/Screens/SleepTimerEdit.py
Python
gpl-2.0
10,279
from jsonschema import FormatChecker from jsonschema.exceptions import ValidationError import copy def is_modelname(ontology): names = [ model["name"] for model in ontology ] def ontology_has_name(name): return name in names return ontology_has_name def checker(ontology): modelname_checker = ...
carlvlewis/detective.io
app/detective/parser/schema.py
Python
lgpl-3.0
3,696
# Copyright (c) 2014-2015, Doug Kelly # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and...
vangdfang/conspace-register
tests.py
Python
bsd-2-clause
1,726
# Copyright 2021 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openupgradelib.openupgrade import rename_xmlids def migrate(cr, version): rename_xmlids( cr, [ ( "report_layout_config.external_layout_images", "r...
OCA/reporting-engine
report_layout_config/migrations/14.0.1.0.0/pre-migrate.py
Python
agpl-3.0
414
# encoding: utf-8 from bs4 import BeautifulSoup from okscraper.base import BaseScraper from okscraper.sources import UrlSource, ScraperSource from okscraper.storages import ListStorage, DictStorage from lobbyists.models import LobbyistHistory, Lobbyist, LobbyistData, LobbyistRepresent, LobbyistRepresentData from perso...
otadmor/Open-Knesset
lobbyists/scrapers/lobbyist.py
Python
bsd-3-clause
5,096
#!/usr/bin/env python import image,pickle crush = [0,1,1,1] outpostfix = ".x.list" print "Loading..." infile = "source.mhd" tleimg = image.image(infile) tleimg.save1dlist(outpostfix, crush) infile = "source-tlevar.mhd" tlevarimg = image.image(infile) tlevarimg.save1dlist(outpostfix, crush) infile = "analog.mhd" an...
brenthuisman/phd_tools
box.prep.py
Python
lgpl-3.0
767
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (t...
KarimAllah/nova
nova/db/sqlalchemy/api.py
Python
apache-2.0
146,565
from frappe import _ data = { "Accounts": { "color": "#3498db", "icon": "icon-money", "type": "module" }, "Activity": { "color": "#e67e22", "icon": "icon-play", "label": _("Activity"), "link": "activity", "type": "page" }, "Buying": { "color": "#c0392b", "icon": "icon-shopping-cart", ...
mbauskar/internal-hr
erpnext/config/desktop.py
Python
agpl-3.0
1,053
# workers.py - Worker objects who become members of a worker pool # Copyright (c) 2008 Andrey Petrov # # This module is part of workerpool and is released under # the MIT license: http://www.opensource.org/licenses/mit-license.php from threading import Thread from workerpool.exceptions import TerminationNotice __all...
oubiwann/workerpool
workerpool/workers.py
Python
mit
2,183
from django.conf.urls import patterns, include, url from rest_framework import routers from django.contrib.auth.decorators import login_required from layers import views from django.contrib import admin admin.autodiscover() router = routers.DefaultRouter() router.register(r'layeradmin', views.LayerAdmin) urlpatter...
trailbehind/EasyTileServer
webApp/easyTileServer/urls.py
Python
bsd-3-clause
1,257
# This file is part of Scapy # Scapy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # any later version. # # Scapy is distributed in the hope that it will be useful, # but ...
smainand/scapy
scapy/contrib/bgp.py
Python
gpl-2.0
70,966
# Copyright (c) 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import print_function import argparse import json import os import sys import urlparse from hooks import install from paste import fil...
endlessm/chromium-browser
third_party/catapult/catapult_build/dev_server.py
Python
bsd-3-clause
10,863
import re RIGHTASS = ['AND', 'OR'] LEFTASS = ['NOT'] MODIFIERS = ['AND', 'OR', 'NOT'] PRECEDENCE = dict(zip(MODIFIERS,[2,1,3])) RESERVE = ['(', ')'] + MODIFIERS class ParseTree: '''container for parse trees for AND/OR/NOT''' def __init__(self, mod, children=None): self.children = children self....
capdevc/reverse-indexer
parsetree.py
Python
mit
3,304
# # Copyright 2001 - 2006 Ludek Smid [http://www.ospace.net/] # # This file is part of Pygame.UI. # # Pygame.UI 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 Software Foundation; either version 2.1 of the License, or...
OuterDeepSpace/OuterDeepSpace
libs/client/pygameui/OSTheme.py
Python
gpl-2.0
16,317
from numpy.lib import add_newdoc add_newdoc('scipy.sparse.linalg.dsolve._superlu', 'SuperLU', """ LU factorization of a sparse matrix. Factorization is represented as:: Pr * A * Pc = L * U To construct these `SuperLU` objects, call the `splu` and `spilu` functions. Attributes --...
pizzathief/scipy
scipy/sparse/linalg/dsolve/_add_newdocs.py
Python
bsd-3-clause
3,787
# coding=UTF-8 import nltk from nltk.corpus import brown # This is a fast and simple noun phrase extractor (based on NLTK) # Feel free to use it, just keep a link back to this post # http://thetokenizer.com/2013/05/09/efficient-way-to-extract-the-main-topics-of-a-sentence/ # Create by Shlomi Babluki # May, 2013 # Th...
XiaopeiZhang/user-timeline-tools
np_extractor.py
Python
mit
3,522
from __future__ import unicode_literals import spotifyconnect from spotifyconnect import ffi, lib, serialized, utils __all__ = [ 'ImageSize', 'Metadata' ] class Metadata(object): """A Spotify track. """ def __init__(self, sp_metadata): self._sp_metadata = sp_metadata self.pla...
chukysoria/pyspotify-connect
spotifyconnect/metadata.py
Python
apache-2.0
1,798
import _plotly_utils.basevalidators class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="bar.marker", **kwargs): super(CmaxValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit...
plotly/plotly.py
packages/python/plotly/plotly/validators/bar/marker/_cmax.py
Python
mit
463
from piston.handler import BaseHandler from piston.resource import Resource from piston.utils import rc, throttle from parliament.core.models import Politician from parliament.hansards.models import Document from django.core import urlresolvers class HansardHandler(BaseHandler): allowed_methods = ('GET',) ...
michaelsmit/openparliament
parliament/api/handlers.py
Python
agpl-3.0
1,736
# This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2019 DataONE # # Licensed under the Apache License, Version 2.0 (the "License"); # you ma...
DataONEorg/d1_python
gmn/src/d1_gmn/app/management/commands/whitelist-remove.py
Python
apache-2.0
1,989
# -*- coding: utf-8 -*- # @Author: Gillett Hernandez # @Date: 2017-11-27 01:27:19 # @Last Modified by: Gillett Hernandez # @Last Modified time: 2017-11-27 01:29:26 from math import log from euler_funcs import timed @timed def main(): fd=open('../p099_base_exp.txt','r') lines=fd.readlines() lines=[lin...
gillett-hernandez/project-euler
Python/problem_99.py
Python
mit
771
# 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...
snnn/tensorflow
tensorflow/python/data/kernel_tests/map_dataset_op_test.py
Python
apache-2.0
32,482
#!/usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2012, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code...
WangRobo/rosbridge_suite
rosapi/src/rosapi/objectutils.py
Python
bsd-3-clause
7,890
# -*- coding: utf-8 -*- """ Created on Tue Nov 10 18:01:44 2015 @author: Han Changyo """ import numpy as np import matplotlib.pyplot as plt from scipy.io.wavfile import write import os # sampling rate Fs = 44100.0 # Hz # play length tlen = 1 # s Ts = 1/Fs # sampling interval t = np.arange(0, tlen, Ts) # time arr...
picosanta/python_sp
Audio play.py
Python
mit
816
#-*- coding: utf-8 -*- from django.contrib import admin from filer import settings from filer.admin.clipboardadmin import ClipboardAdmin from filer.admin.fileadmin import FileAdmin from filer.admin.folderadmin import FolderAdmin from filer.admin.imageadmin import ImageAdmin from filer.admin.audioadmin import AudioAdmin...
hzlf/openbroadcast
website/__filer/admin/__init__.py
Python
gpl-3.0
759
import os from setuptools import setup from twtxtcli import __version__, __project_name__, __project_link__ def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name=__project_name__, version=__version__, author='Myles Braithwaite', author_email='me@mylesbr...
myles/twtxt-cli
setup.py
Python
mit
850
"""Auth models.""" from datetime import datetime, timedelta from typing import Dict, List, NamedTuple, Optional # noqa: F401 import uuid import attr from homeassistant.util import dt as dt_util from . import permissions as perm_mdl from .const import GROUP_ID_ADMIN from .util import generate_secret TOKEN_TYPE_NORM...
fbradyirl/home-assistant
homeassistant/auth/models.py
Python
apache-2.0
3,914
ipc = Portafolio() ipc.anio_validez = 2014 ipc.composicion = [ {'emisora': 'AC', 'peso': 1.12}, {'emisora': 'ALFA', 'peso': 5.72}, {'emisora': 'ALPEK', 'peso': 0.40}, {'emisora': 'ALSEA', 'peso': 0.81}, {'emisora': 'AMX', 'peso': 16.44}, {'emisora': 'ASUR', 'peso': 1.25}, {'emisora': 'BIMBO'...
mandroslabs/tradinglab-mexico
tradinglabmx/indices-mercado.py
Python
apache-2.0
1,476
from cobra.model.l3ext import Out, RsEctx from cobra.model.bgp import ExtP as bgpExtP from cobra.model.ospf import ExtP as ospfExtP from cobra.model.tag import Inst from createMo import * DEFAULT_NONE = '' DEFAULT_NO = 'no' DEFAULT_OSPF_AREA_ID = 'None' CHOICES = [] def input_key_args(msg='\nPlease Specify Routed...
FibercorpLabs/FibercorpDevops
cisco/aci/createRoutedOutside.py
Python
gpl-3.0
3,646
# This pyang plugin generates a random XML instance document adhering # to a YANG module. from pyang import plugin from pyang import types from pyang import statements import sys from random import randint, random def pyang_plugin_init(): plugin.register_plugin(YANGXMLPlugin()) class YANGXMLPlugin(plugin.PyangPl...
krvinay123/test
test/plugins/yangxml.py
Python
isc
5,292
""" Models and managers for generic tagging. """ # Python 2.3 compatibility try: set except NameError: from sets import Set as set from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.db import connection, models from django.db.models.query impo...
nathaliaspatricio/febracev
tagging/models.py
Python
gpl-2.0
19,549
#!/usr/bin/env python # # Copyright 2017 Phedorabot # # 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...
Phedorabot/phedorabot-python-sdk
phedorabot/test/test_sms_message.py
Python
apache-2.0
1,818
from gevent import monkey monkey.patch_all() import unittest from emailpie import utils from emailpie.spelling import correct from emailpie.throttle import should_be_throttled, reset_throttle class TestParse(unittest.TestCase): def test_good_email(self): validator = utils.EmailChecker('bryan@bryanhelmig....
miksago/emailpie
tests.py
Python
bsd-3-clause
1,852
"""Definitions for the `RProcess` class.""" from math import isnan import numpy as np from astrocats.catalog.source import SOURCE from mosfit.constants import C_CGS, DAY_CGS, IPI, KM_CGS, M_SUN_CGS from mosfit.modules.engines.engine import Engine from scipy.interpolate import RegularGridInterpolator # Important: Onl...
guillochon/FriendlyFit
mosfit/modules/engines/rprocess.py
Python
mit
3,010
import time def setup(): size(10, 10) n = 0 def func1(): global n n += 1 def func2(): global n n += 4 def draw(): noLoop() thread("func1") while n < 1: time.sleep(0.02) thread(func2) while n < 5: time.sleep(0.02) print('OK') exit()
jdf/processing.py
testing/resources/test_thread.py
Python
apache-2.0
253
import xml.etree.ElementTree as ElementTree import os.path import sys # # is there a xmp sidecar file? # def get_xmp_filename(filename): xmpfilename = False # some xmp sidecar filenames are based on the original filename without extensions like .jpg or .jpeg filenamewithoutextension = '.' . join(filena...
opensemanticsearch/open-semantic-etl
src/opensemanticetl/enhance_xmp.py
Python
gpl-3.0
4,568