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
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or mo...
kawula-openerp-indonesia/koi_base
koi_product_manager/object_other/product.py
Python
agpl-3.0
2,419
# -*- coding: utf-8 -*- MAPIT_BASE_URL = 'http://argentina.mapit.staging.mysociety.org/' SITE_OWNER = 'YoQuieroSaber' COPYRIGHT_HOLDER = 'YoQuieroSaber'
datamade/yournextmp-popit
elections/ar_elections_2015/settings.py
Python
agpl-3.0
155
############################################################################## # # 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-Louvain
ddd/logic/learning_unit/dtos.py
Python
agpl-3.0
4,929
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # Thibault Cohen, thibault.cohen@savoirfairelinux.com # Francois Mikus,...
staute/shinken_package
shinken/objects/schedulingitem.py
Python
agpl-3.0
74,396
from cornflake import fields, serializers from cornflake.exceptions import ValidationError from cornflake.validators import min_length, not_empty, not_in_future, upper from radar.api.serializers.common import GroupField, IntegerLookupField from radar.api.serializers.demographics import EthnicityField, NationalityField...
renalreg/radar
radar/api/serializers/recruit_patient.py
Python
agpl-3.0
4,158
from config import hostname, port, username, password import webdavlib import urllib import base64 import simplejson import sogoLogin # must be kept in sync with SoObjects/SOGo/SOGoDefaults.plist # this should probably be fetched magically... SOGoSupportedLanguages = [ "Arabic", "Catalan", "Czech", "Dutch", "Danish...
Distrotech/sogo
Tests/Integration/preferences.py
Python
lgpl-2.1
3,670
import etcd from tendrl.commons import objects from tendrl.commons.utils import log_utils as logger class SetClusterUnmanaged(objects.BaseAtom): def __init__(self, *args, **kwargs): super(SetClusterUnmanaged, self).__init__(*args, **kwargs) def run(self): integration_id = self.parameters['Te...
r0h4n/commons
tendrl/commons/objects/cluster/atoms/set_cluster_unmanaged/__init__.py
Python
lgpl-2.1
1,043
"""RRDD Plugin Protocol V2 Backend module """ from struct import calcsize from ctypes import c_char, c_int32, c_int64, c_double HEADER = 'DATASOURCES' PLUGIN_PATH = '/dev/shm/metrics/' FLOAT = 'float' INT64 = 'int64' # All of the format strings are Big-Endian FMT_BE_INT32 = '>i' FMT_BE_INT64 = '>q' FMT_BE_DOUBLE = ...
stefanopanella/xapi-storage-plugins
libs/rrddlib/backend.py
Python
lgpl-2.1
8,042
#!/usr/bin/python from zerocm import ZCM import sys, os blddir= os.path.dirname(os.path.realpath(__file__)) + '/../../build/examples/examples/' sys.path.insert(0, blddir + "types/") from example_t import example_t from encoded_t import encoded_t import time success = "Failure" def handler(channel, msg): global su...
ZeroCM/zcm
examples/python/encoded_fields.py
Python
lgpl-2.1
774
# -*- coding: utf-8 -*- # # PySPED - Python libraries to deal with Brazil's SPED Project # # Copyright (C) 2010-2012 # Copyright (C) Aristides Caldeira <aristides.caldeira at tauga.com.br> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Library General Public Lic...
aricaldeira/PySPED
pysped/xml_sped/certificado.py
Python
lgpl-2.1
18,949
from __future__ import print_function import saliweb.backend import tarfile import glob import re import os class NoLogError(Exception): pass class AssertionError(Exception): pass class IncompleteJobError(Exception): pass class _Model(object): def get_outputs(self): return glob.glob("loo...
salilab/modloop
backend/modloop/__init__.py
Python
lgpl-2.1
8,128
#!/usr/bin/env python #coding:utf-8 # Purpose: table const # Created: 01.02.2011 # Copyright (C) 2011, Manfred Moitzi # License: MIT license from __future__ import unicode_literals, print_function, division __author__ = "mozman <mozman@gmx.at>" from .xmlns import CN OFFICE_FORMS = [CN("office:forms")] TABLE_TRACKED_...
chalbersma/btcaddrtocsv
ezodf/nodestructuretags.py
Python
lgpl-2.1
2,841
############################################################################# ## ## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ## Contact: http://www.qt-project.org/legal ## ## This file is part of Qt Creator. ## ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this f...
richardmg/qtcreator
tests/system/shared/utils.py
Python
lgpl-2.1
33,903
import genomic_mappings from database import db from database.migrate import basic_auto_migrate_relational_db, mysql_extract_definitions, mysql_columns_to_update from database_testing import DatabaseTest from models import Model, ScalarSet def test_make_snv_key(): test_data = ( # chrom, pos, ref, alt ...
reimandlab/ActiveDriverDB
website/tests/test_database.py
Python
lgpl-2.1
4,220
from enigma import getDesktop, eTimer from Components.Label import Label from Components.Sources.StaticText import StaticText from Components.Pixmap import Pixmap from Components.ProgressBar import ProgressBar from Components.ActionMap import NumberActionMap from Components.config import config from Screens.Screen im...
tension9000/e2openplugin-CrossEPG
src/enigma2/python/crossepg_importer.py
Python
lgpl-2.1
4,866
import truetypetracer as ttt # https://github.com/aewallin/truetype-tracer import openvoronoi as ovd # https://github.com/aewallin/openvoronoi #import ovdvtk import time #import vtk import random import string import sys def translate(segs,x,y): out = [] for seg in segs: seg2 = [] ...
aewallin/openvoronoi
src/test/pytest_ttt_random_chars/ttt_random_chars.py
Python
lgpl-2.1
5,444
import sys from pathlib import Path from typing import Iterable, List, Optional import typer from loguru import logger from rich.live import Live from rich.table import Table from creat.models.files import File from . import get_console, setup_logger from .builds import build_index from .indexes import Index app = ...
hevi9/mknew
creat/__main__.py
Python
lgpl-2.1
6,517
# -*- coding: utf-8 -*- # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope tha...
jeremycline/fmn
tests/test_style.py
Python
lgpl-2.1
1,489
#!/usr/bin/env python from basetest import BaseTest, StringIO, BytesIO import sys, os, tempfile, subprocess, shlex import unittest sys.path.insert(0, '..') from zeroinstall import cmd, support from zeroinstall.injector import model, qdom, handler, gpg, config mydir = os.path.dirname(__file__) class Reply: def __ini...
afb/0install
tests/testinstall.py
Python
lgpl-2.1
7,470
# # (C) Copyright 2005-2010 Jacek Konieczny <jajcus@jajcus.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License Version # 2.1 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be u...
Jajcus/pyxmpp2
pyxmpp2/ext/dataforms.py
Python
lgpl-2.1
25,955
#! /usr/local/bin/python # NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is # intentionally NOT "/usr/bin/env python". On many systems # (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI # scripts, and /usr/local/bin is the default directory where Python is # installed, so /usr/bin...
prefetchnta/questlab
bin/x64bin/python/37/Lib/cgi.py
Python
lgpl-2.1
35,738
################################################################################### ## MODULE : spell.lang.helpers.exechelper ## DATE : Mar 18, 2011 ## PROJECT : SPELL ## DESCRIPTION: Helpers for execution functions ## -------------------------------------------------------------------------------- ## ## ...
Spacecraft-Code/SPELL
src/spell/spell/lang/helpers/exechelper.py
Python
lgpl-3.0
13,614
# # This file is part of Dragonfly. # (c) Copyright 2007, 2008 by Christo Butcher # Licensed under the LGPL. # # Dragonfly 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...
tylercal/dragonfly
dragonfly/engines/base/__init__.py
Python
lgpl-3.0
1,069
''' Created on Jan 25, 2012 @author: MRomero2 ''' import urllib2 import httplib class httpClient(object): ''' classdocs ''' def __init__(self): ''' Constructor ''' def _launchRequest(self, request): try: response = urllib2.urlopen(request) ...
mjromper/pm-ps
PSHttpClient.py
Python
lgpl-3.0
2,031
# # MRChem, a numerical real-space code for molecular electronic structure # calculations within the self-consistent field (SCF) approximations of quantum # chemistry (Hartree-Fock and Density Functional Theory). # Copyright (C) 2021 Stig Rune Jensen, Luca Frediani, Peter Wind and contributors. # # This file is part of...
MRChemSoft/mrchem
python/mrchem/__init__.py
Python
lgpl-3.0
1,471
class HelpCommand(): def __init__(self, sublime_command): self.caller = sublime_command def run( self, namespace="" ): helpCommand = namespace + " help" self.caller.executeCommand( helpCommand.strip() ) def install( self ): self.run( "install" ) def create( self ): ...
jclausen/sublime-commandbox
Lib/Commands/Help.py
Python
lgpl-3.0
463
files = ["wr_fabric_pkg.vhd", "xwb_fabric_sink.vhd", "xwb_fabric_source.vhd"]
lerwys/bpm-sw-old-backup
hdl/modules/fabric/Manifest.py
Python
lgpl-3.0
77
r""" Python 2.7/Sage code. Herein a *graph coloring* is an assignment of valid Sage color strings to the vertices of a graph. So it is not a graph coloring in the standard graph theoretic sense of the term (``<https://en.wikipedia.org/wiki/Graph_coloring>``_), that is, our colorings do not require adjacent vert...
araichev/graph_dynamics
graph_dynamics.py
Python
lgpl-3.0
21,590
def add(x, y): """""" return x + y
vijayendra-g/sensor_outlier_detector
sensor_outlier_detector/add.py
Python
lgpl-3.0
45
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('memoryoracle', '0003_auto_20150402_2000'), ] operations = [ migrations.AlterField( model_name='commit', ...
daniel-noland/MemoryOracle
memoryoracle/memoryoracle/migrations/0004_auto_20150402_2000.py
Python
lgpl-3.0
2,135
# Copyright (c) 2017 Aleph Objects, Inc. # Copyright (c) 2020 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import Optional, Union, List, TYPE_CHECKING from UM.FileHandler.FileReader import FileReader from UM.Mesh.MeshReader import MeshReader from UM.i18n import i18nCatalog fr...
Ultimaker/Cura
plugins/GCodeReader/GCodeReader.py
Python
lgpl-3.0
3,086
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Module : polygon_new.py # Author : bssthu # Project : L5MapEditor # Creation date : 2015-09-28 # Description : # from PyQt5.QtCore import QRectF, QPointF from PyQt5.QtGui import QColor, QPolygonF, QPen from editor.polygon_base import PolygonBase ...
bssthu/L5MapEditor
editor/polygon_new.py
Python
lgpl-3.0
2,160
# Copyright (C) 2014 Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. try: import re2 as re except ImportError: import re import struct from lib.cuckoo.common.abstracts import Signature class Handl...
lixiangning888/whole_project
modules/signatures_orginal_20151110/mimics_filetime.py
Python
lgpl-3.0
5,069
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Author: sansna # Date : 2020 Aug 01 17:32:31 import os import sys sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) import time import yagmail as yg from lib3.decorator.safe_run import safe_run_wrap now = int(time.time()) today = int(now+...
sansna/PythonWidgets.py
lib3/send.py
Python
lgpl-3.0
1,323
from .version import * from .lib import ( show, setup, teardown, log, echo, register_dispatch_wrapper, register_python_executable, registered_python_executable, )
pyblish/pyblish-integration
pyblish_integration/__init__.py
Python
lgpl-3.0
195
# -*- coding: utf-8 -*- # Copyright(C) 2020 Ludovic LANGE # # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the L...
laurentb/weboob
modules/cesu/module.py
Python
lgpl-3.0
3,144
class Solution: # log(n) time, no bitwise operators directly invoked def hasAlternatingBits(self, n): """ :type n: int :rtype: bool """ s = bin(n)[2:] # appears as e.g. 0b01001 before truncation for i in range(1, len(s)): if s[i] == s[i-1]: # assuming ...
SelvorWhim/competitive
LeetCode/BinaryNumberWithAlternatingBits.py
Python
unlicense
439
# -*- coding: utf-8 -*- from haystack import indexes from .models import NewsItem class NewsItemIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.CharField(document=True, use_template=True) title = indexes.CharField(model_attr='title', null=True) url = indexes.CharField(model_attr='get_absolut...
kohout/djangocms-getaweb-products
djangocms_product/search_indexes.py
Python
unlicense
635
from flask import Flask, render_template, url_for, request, redirect, abort from taskmap import Taskmap import os app = Flask(__name__) @app.route('/') @app.route('/<user>') def index(user=None): return render_template("index.html", user=user) @app.route('/tasks') def tasks(): task_list = ["Handle my bills."] re...
whitgroves/taskmap
main.py
Python
unlicense
916
""" Returns the array of probability mass function values for the Binomial probability distribution using the given arrays for the abscissa or template values and each of the parameters values. """ import numpy import pyferret import pyferret.stats DISTRIB_NAME = "Binomial" FUNC_NAME = "pmf" def ferret_init(id): ...
NOAA-PMEL/PyFerret
pyfermod/stats/stats_binom_pmf.py
Python
unlicense
725
#!/usr/bin/env python from datetime import datetime import sys print(datetime.fromtimestamp(float(sys.argv[1])).time().strftime('%H:%M:%S.%f')[:-3])
andsild/dotfiles
Bash/microToStamp.py
Python
unlicense
150
# coding: utf-8 from __future__ import unicode_literals import itertools import json import os.path import re import time import traceback from .common import InfoExtractor, SearchInfoExtractor from ..jsinterp import JSInterpreter from ..swfinterp import SWFInterpreter from ..compat import ( compat_chr, com...
pkappesser/youtube-dl
youtube_dl/extractor/youtube.py
Python
unlicense
92,949
# -*- coding: utf-8 -*- import os, sys import socket # env sys.path.append('/usr/lib/python2.7/dist-packages/') sys.path.append('/usr/lib/python2.7/') sys.path.append('/usr/local/lib/python2.7/dist-packages/') from utils import sendmail from local import EMAIL_FROM, EMAIL_TO_LIST, PARTITION_LIST import argparse # s...
carthagecollege/archer
core/read_write.py
Python
unlicense
1,849
import errno import os import sys import types class BossfileLoadingError(Exception): """An exception occurred when loading the Bossfile.""" exc_type = property(lambda self: self.args[0]) exc_value = property(lambda self: self.args[1]) exc_traceback = property(lambda self: self.args[2]) class Bossf...
zacharyvoase/bossy
lib/bossy/loader.py
Python
unlicense
1,594
# Zawgyi<>Unicode converter python module # Based on rules from Parabaik Myanmar Text Converter # Copyright (C) 2014 Ngwe Tun (Solveware Solution) # Copyright (C) 2014 Thura Hlaing # This file is part of Paytan. # Paytan is free software: you can redistribute it and/or modify # it under the terms of the GNU General P...
trhura/jalaybe
converter.py
Python
apache-2.0
18,681
import json from typing import Any, Dict, cast from unittest import mock import requests from zerver.lib.avatar import get_gravatar_url from zerver.lib.message import MessageDict from zerver.lib.outgoing_webhook import get_service_interface_class, process_success_response from zerver.lib.test_classes import ZulipTest...
brainwane/zulip
zerver/tests/test_outgoing_webhook_interfaces.py
Python
apache-2.0
8,287
import anyci.docker import ci_addons import os import py_compile import pytest import shutil import subprocess import sys try: from lxml import etree except ImportError: pass from . import captured_lines, format_args_for_display def test_home(): expected_home = os.path.abspath(os.path.dirname(__file__)...
scikit-build/scikit-ci-addons
_tests/test_scikit_ci_addons.py
Python
apache-2.0
11,089
from dateutil import parser from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from django.views.generic.list import ListView from django.views.generic.detail import DetailView from django.shortcuts import render from .models import Question from .search import QASearch from .forms import Search...
HonzaKral/es-django-example
qa/views.py
Python
apache-2.0
1,334
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
our-city-app/oca-backend
src/solutions/common/handlers/loyalty.py
Python
apache-2.0
12,956
# -*- coding: utf-8 -*- #!/usr/bin/env python # # Copyright 2015 BigML # # 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 b...
xaowoodenfish/python-1
bigml/tests/world.py
Python
apache-2.0
5,645
# 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...
tensorflow/ngraph-bridge
test/resnet_unit_test.py
Python
apache-2.0
31,735
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
googleads/html5-to-dfp
env.py
Python
apache-2.0
1,828
import logging import traceback from datetime import datetime from dino import utils from flask_restful import Resource from dino.db.manager import UserManager logger = logging.getLogger(__name__) class BaseResource(Resource): def __init__(self, cache_clear_interval=2): self.cache_clear_interval = cach...
thenetcircle/dino
dino/rest/resources/base.py
Python
apache-2.0
4,487
"""The tests for the Event automation.""" import pytest import homeassistant.components.automation as automation from homeassistant.core import Context from homeassistant.setup import async_setup_component from tests.common import async_mock_service, mock_component from tests.components.automation import common @py...
leppa/home-assistant
tests/components/automation/test_event.py
Python
apache-2.0
4,938
#free people from bs4 import BeautifulSoup import urllib2 import sys #import lxml sys.path.append("/Users/fcolombo/Documents/gilt"); import defaultparser import crawler #import html5lib class FpCrawler: def getProductParser(self): def findBrand(soup): return "Nasty Gal" def findPrice(soup): priceTag = s...
gilt/GWC-Summer-2014
scraper/freePeople.py
Python
apache-2.0
1,953
# Copyright 2018 The TensorFlow Probability 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 o...
tensorflow/probability
tensorflow_probability/python/sts/components/semilocal_linear_trend.py
Python
apache-2.0
19,985
# # Copyright 2020 GoPro Inc. # # 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 ...
gopro/gopro-lib-node.gl
tests/texture.py
Python
apache-2.0
11,082
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os.path sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))) from TwitterEngine.secrets import google_client_id, google_client_secret # Create AppEngine application # Enter Google APIs Console -> API Access # Create ...
biancini/TwitterAnalyzer
AnalysisTools/analysis/googletoken.py
Python
apache-2.0
2,185
################################################################# # Fortiguard station for QRadio # # ~ Tune In # # Tuned to: # # http://www.fortiguard.com/iprep/index.php ...
QTek/QRadio
stations/fortiguard/station.py
Python
apache-2.0
2,415
# -*- 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-gke-connect-gateway
samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_patch_resource_sync.py
Python
apache-2.0
1,466
#!/usr/bin/env python #coding: utf-8 # Demo of application in WSGI HELLO_WORLD = b"Hello world!\n" # callable function def application(environ, start_response): status = '200 OK' response_headers = [('Content-type', 'text/plain')] start_response(status, response_headers) return [HELLO_WORLD] # ca...
minixalpha/SourceLearning
wsgiref-0.1.2/wsgi_demo/app.py
Python
apache-2.0
585
# -*- coding: utf-8 -*- # Copyright 2013 UNED # # 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...
GeographicaGS/moocng
moocng/profile/models.py
Python
apache-2.0
6,431
# =============================================================================== # Copyright 2013 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licens...
UManPychron/pychron
pychron/pipeline/plot/plotter/dashboard_series.py
Python
apache-2.0
4,347
from django.contrib.syndication.views import Feed from django.utils.feedgenerator import Atom1Feed from .models import BlogIndexPage, BlogPage, BlogCategory from django.shortcuts import get_object_or_404 from django.conf import settings def tag_view(request, tag): index = BlogIndexPage.objects.first() return ...
thelabnyc/wagtail_blog
blog/views.py
Python
apache-2.0
2,186
import logging import os import threading from fsspec.asyn import fsspec_loop from fsspec.utils import infer_storage_options from funcy import cached_property, memoize, wrap_prop from dvc.exceptions import DvcException from dvc.scheme import Schemes from dvc.utils import format_link from .fsspec_wrapper import Callb...
efiop/dvc
dvc/fs/azure.py
Python
apache-2.0
5,712
#! /usr/bin/python ''' Provides enumerated variable types to the Pi ''' # STANDARD PYTHON IMPORTS # PYTHON LIBRARIES # USER LIBRARIES # GLOBAL VARIABLES # CLASSES # FUNCTIONS def enum(*sequential, **named): ''' Enables the use of enumerated types in python. Returns an Enum() type, the lookup of which returns e...
plus44/hcr-2016
src/pi/enum.py
Python
apache-2.0
828
# Licensed to the StackStorm, Inc ('StackStorm') 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 th...
grengojbo/st2
st2actions/st2actions/bootstrap/actionsregistrar.py
Python
apache-2.0
6,232
# coding: utf-8 # Copyright 2017 video++ Project, SJTU MediaLab # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
ArthurChiao/videoplusplus
vpp/job/context.py
Python
apache-2.0
2,070
# -*- coding: utf-8 -*- #!/usr/bin/env python # # Copyright 2015-2020 BigML # # 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 requi...
jaor/bigmler
bigmler/tests/test_12_basic_cluster.py
Python
apache-2.0
16,281
#!/usr/bin/env python # -*- coding: utf-8 -*- """ dever-manage tools name:install.py author:rabin dmphp 目前仅有一个指令: dmphp install redis """ from main import * Main.init('php')
shemic/dm
src/dp.py
Python
apache-2.0
197
# 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...
dstufft/warehouse
tests/common/db/packaging.py
Python
apache-2.0
3,484
"""Config flow for Environment Canada integration.""" from functools import partial import logging import xml.etree.ElementTree as et import aiohttp from env_canada import ECData import voluptuous as vol from homeassistant import config_entries, exceptions from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE...
lukas-hetzenecker/home-assistant
homeassistant/components/environment_canada/config_flow.py
Python
apache-2.0
3,870
__author__ = 'Tony Beltramelli www.tonybeltramelli.com - 29/08/2015' from math import * from pandas import Series import numpy as np class UMath: @staticmethod def normalize(range_min, range_max, x, x_min, x_max): return range_min + (((x - x_min) * (range_max - range_min)) * (1 / (x_max - x_min))) ...
tonybeltramelli/Deep-Spying
server/analytics/modules/utils/UMath.py
Python
apache-2.0
1,804
#!/usr/bin/env python # coding: utf-8 """ Copyright 2015 SYSTRAN Software, 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/licen...
SYSTRAN/geographic-api-python-client
systran_geographic_api/models/description.py
Python
apache-2.0
1,778
#! /usr/bin/env python # Copyright (c) 2008,2010,2011,2012,2013,2014,2015 Alexander Belchenko # 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 # ...
ARMmbed/yotta_osx_installer
workspace/bin/hex2dump.py
Python
apache-2.0
4,126
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the CLI argument helper manager.""" import argparse import unittest from plaso.cli.helpers import interface from plaso.cli.helpers import manager from plaso.lib import errors from tests.cli.helpers import test_lib class AnotherTestHelper(interface.ArgumentsHel...
dc3-plaso/plaso
tests/cli/helpers/manager.py
Python
apache-2.0
3,290
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-01-21 21:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('polls', '0011_wishes_pub_date'), ] operations = [ migrations.AddField( ...
y73isc00l/WishGift
myproject/polls/migrations/0012_wishes_showwish.py
Python
apache-2.0
448
# Copyright 2019 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, ...
firebase/firebase-admin-python
firebase_admin/exceptions.py
Python
apache-2.0
8,503
# Copyright 2012 Hewlett-Packard Development Company, L.P. # Copyright 2012 Varnish Software AS # Copyright 2013-2014 Antoine "hashar" Musso # Copyright 2013-2014 Wikimedia Foundation Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Licen...
therootcause/jenkins-job-builder
jenkins_jobs/modules/publishers.py
Python
apache-2.0
171,860
# Remove all produced images and cubes, reset header, history and flags back # to backed up files. # # Author James Dempsey # Date 9 Jul 2016 import sys import os import shutil # ### Script starts here ### # Read day parameter if len(sys.argv) != 2: print("Incorrect number of parameters.") print("Usage: pyt...
jd-au/magmo-HI
clean-data.py
Python
apache-2.0
1,538
# -*- 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-compute
google/cloud/compute_v1/services/disk_types/transports/rest.py
Python
apache-2.0
21,990
"""Utility functions for filtering.""" import numpy as np from scipy.signal import freqz, sosfreqz from neurodsp.utils.decorators import multidim from neurodsp.filt.checks import check_filter_definition ################################################################################################### ##############...
voytekresearch/neurodsp
neurodsp/filt/utils.py
Python
apache-2.0
8,041
# Copyright (C) 2016 Iwase Yusuke <iwase yusuke0 at gmail 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 applica...
iwaseyusuke/python-ovs-vsctl
tests/test_api.py
Python
apache-2.0
4,599
from __future__ import absolute_import from __future__ import print_function from contextlib import contextmanager from typing import (cast, Any, Callable, Dict, Iterable, Iterator, List, Mapping, Optional, Sized, Tuple, Union, Text) from django.core.urlresolvers import resolve from django.conf imp...
christi3k/zulip
zerver/lib/test_classes.py
Python
apache-2.0
24,716
"""Persistence classes for the REST endpoint.""" from django.db import models from jsonfield import JSONField class Recording(models.Model): """Model for recorded files.""" date = models.DateTimeField(auto_now=True) clip = models.FileField(null=True) categories = models.CharField(max_length=1000, def...
equilibrium-catalyst/yadayada-rest-api
restapi/endpoint/models.py
Python
apache-2.0
788
SUBJECT_EXTENSION = '.subject' TEXT_EXTENSION = '.text' HTML_EXTENSION = '.html' CSS_EXTENSION = '.css' SOURCE_EXTENSION = '.xml' SUBJECT_PLACEHOLDER = 'subject' GLOBALS_EMAIL_NAME = 'global' GLOBALS_PLACEHOLDER_PREFIX = 'global_' REPO_SRC_PATH = 'src' PLACEHOLDERS_FILENAME = 'placeholders_config.json' INLINE_TEXT_PA...
KeepSafe/ks-email-parser
email_parser/const.py
Python
apache-2.0
616
#!/usr/bin/env python # -*- coding: utf8 -*- # Power by viekie2017-07-26 11:03:48 from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf tf.app.flags.DEFINE_string('log_dir', '/home/viekie', '''folder for log''') tf.app.flags.DEFINE_integ...
viekie/tensorflow-tutorial
chap06/flag_log.py
Python
apache-2.0
633
''' MAP Client Plugin ''' __version__ = '0.1.0' __author__ = 'Hugh Sorby' __stepname__ = 'Hoof Measurement' __location__ = 'https://github.com/mapclient-plugins/hoofmeasurement/archive/v' + __version__ + '.zip' # import class that derives itself from the step mountpoint. from mapclientplugins.hoofmeasurementstep impo...
mapclient-plugins/hoofmeasurement
mapclientplugins/hoofmeasurementstep/__init__.py
Python
apache-2.0
461
from bmcodelab.wsgi import application # App Engine by default looks for a main.py file at the root of the app # directory with a WSGI-compatible object called app. # This file imports the WSGI-compatible object of your Django app, # application from bmcodelab/wsgi.py and renames it app so it is discoverable by # App ...
google-business-communications/bm-bonjour-meal-django-starter-code
bonjourmeal-codelab/full-sample/main.py
Python
apache-2.0
500
from celery.decorators import task from service.quota import set_provider_quota as spq from threepio import celery_logger @task(name="set_provider_quota", default_retry_delay=5, time_limit=30 * 60, # 30minute hard-set time limit. max_retries=3) def set_provider_quota(identity_uuid): try: ...
CCI-MOC/GUI-Backend
service/tasks/admin.py
Python
apache-2.0
588
# -*- coding: utf-8 -*- """Parser for MacOS keychain database files.""" import codecs import collections from dfdatetime import time_elements as dfdatetime_time_elements from dtfabric.runtime import data_maps as dtfabric_data_maps from plaso.containers import events from plaso.containers import time_events from pla...
kiddinn/plaso
plaso/parsers/mac_keychain.py
Python
apache-2.0
32,033
import gzip import json import os import pathlib import tarfile import pytest from anchore_engine.clients import skopeo_wrapper oci_manifest_digest = "2a8ca7db7332bc6c3b825a4540c33b47ad588947aa130f07b7493a863daa3ba3" # fake urlretrieve class class FakeUrlRetrieve: """ >>> fake = FakeUlrRetrieve(raises=Typ...
anchore/anchore-engine
tests/unit/anchore_engine/clients/test_skopeo_wrapper.py
Python
apache-2.0
10,058
# -*- coding: utf-8 -*- # Copyright 2013 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
stevelle/glance
glance/tests/unit/v2/test_registry_api.py
Python
apache-2.0
59,323
# Copyright 2015 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...
dhalleine/tensorflow
tensorflow/python/training/coordinator_test.py
Python
apache-2.0
6,312
from __future__ import unicode_literals from django.conf import settings from django.core.paginator import Paginator, Page class EnhancedPaginator(Paginator): def __init__(self, object_list, per_page, **kwargs): if not isinstance(per_page, int) or per_page < 1: per_page = getattr(settings, '...
snazy2000/netbox
netbox/utilities/paginator.py
Python
apache-2.0
1,244
# Copyright 2018 The Kubeflow 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...
kubeflow/pipelines
components/gcp/container/component_sdk/python/tests/google/dataproc/test__submit_pyspark_job.py
Python
apache-2.0
1,755
# coding=utf-8 import unittest from py_sys.ping import ping_icmp class Test(unittest.TestCase): def test_ping(self): p = ping_icmp.PingICMP() result = p.ping('127.0.0.1', 1, 5) for item in result: self.assertEqual(item.get('result'), 'success') de...
interhui/py-sys
py_sys_test/ping_test/ping_icmp_test.py
Python
apache-2.0
565
# 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...
sridevikoushik31/nova
nova/tests/scheduler/test_filter_scheduler.py
Python
apache-2.0
29,216
# Copyright (c) 2015 Huawei Technologies Co.,LTD. # # 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 app...
eayunstack/neutron
neutron/db/address_scope_db.py
Python
apache-2.0
6,237
from __future__ import absolute_import import httplib from nightson.handlers.auth import AuthHandler from tornado import gen import ujson from nightson.managers.logout_manager import LogoutManager class LogoutHandler(AuthHandler): @gen.coroutine def post(self): ''' Updates and Returns an event ''' ...
vswamy/nightson
nightson/handlers/logout.py
Python
apache-2.0
513