code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Yannick Vaucher, Emanuel Cino # # The licence is in the file __openerp__.py # #...
emgirardin/compassion-modules
message_center_compassion/tests/base_test_onramp.py
Python
agpl-3.0
3,074
# -*- coding: utf-8 -*- # # Connectors documentation build configuration file, created by # sphinx-quickstart on Mon Feb 4 11:35:44 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. # ...
akretion/connector-magento
magentoerpconnect/doc/conf.py
Python
agpl-3.0
10,704
import matplotlib.pyplot as plt import numpy as np from ad3 import simple_grid, general_graph def example_binary(): # generate trivial data x = np.ones((10, 10)) x[:, 5:] = -1 x_noisy = x + np.random.normal(0, 0.8, size=x.shape) x_thresh = x_noisy > .0 # create unaries unaries = x_noisy ...
PhdDone/AD3
python/example.py
Python
lgpl-3.0
2,817
#!/usr/bin/env python # coding: utf-8 from __future__ import unicode_literals __license__ = 'Public Domain' import codecs import io import os import random import sys from .options import ( parseOpts, ) from .compat import ( compat_expanduser, compat_getpass, compat_shlex_split, workaround_optp...
jbuchbinder/youtube-dl
youtube_dl/__init__.py
Python
unlicense
18,757
#!/usr/bin/python # # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
caioserra/apiAdwords
examples/adspygoogle/dfp/v201306/get_team.py
Python
apache-2.0
1,511
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com> # # Author: Sylvain Afchain <sylvain.afchain@enovance.com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apach...
netscaler/neutron
neutron/services/metering/agents/metering_agent.py
Python
apache-2.0
11,158
# -*- coding: utf-8 -*- import sys import os # Import the common config file # Note that paths in the common config are interpreted as if they were # in the location of this file sys.path.insert(0, os.path.abspath('../../_common')) from common_conf import * # Override the common config html_short_title_toc = man...
chtyim/cdap
cdap-docs/faqs/source/conf.py
Python
apache-2.0
603
""" relu where each channel has a different leak rate """ import numpy as np import theano import theano.tensor as T import treeano import treeano.nodes as tn fX = theano.config.floatX @treeano.register_node("interval_relu") class IntervalReLUNode(treeano.NodeImpl): hyperparameter_names = ("leak_min", ...
diogo149/treeano
treeano/sandbox/nodes/interval_relu.py
Python
apache-2.0
1,043
#!/usr/bin/env python # Copyright 2011 Google Inc. All Rights Reserved. """Parser for IE index.dat files. Note that this is a very naive and incomplete implementation and should be replaced with a more intelligent one. Do not implement anything based on this code, it is a placeholder for something real. For anyone w...
ForensicTools/GRREAT-475_2141-Chaigon-Failey-Siebert
parsers/ie_history.py
Python
apache-2.0
5,573
"""Support Google Home units.""" import logging import asyncio import voluptuous as vol from homeassistant.const import CONF_DEVICES, CONF_HOST from homeassistant.helpers import discovery import homeassistant.helpers.config_validation as cv from homeassistant.helpers.aiohttp_client import async_get_clientsession _LOG...
jamespcole/home-assistant
homeassistant/components/googlehome/__init__.py
Python
apache-2.0
3,612
import sys import copy import time import asyncio import hashlib from unittest import mock import celery import pytest from waterbutler import tasks # noqa from waterbutler.core import remote_logging from waterbutler.core import utils as core_utils from waterbutler.core.path import WaterButlerPath import tests.util...
TomBaxter/waterbutler
tests/tasks/test_move.py
Python
apache-2.0
6,692
#!/usr/bin/env python """Tests for HTTP API.""" import json from grr.gui import api_aff4_object_renderers from grr.gui import api_call_renderers from grr.gui import http_api from grr.lib import flags from grr.lib import registry from grr.lib import test_lib from grr.lib import utils from grr.lib.rdfvalues import s...
pchaigno/grr
gui/http_api_test.py
Python
apache-2.0
6,014
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
sachinpro/sachinpro.github.io
tensorflow/python/ops/math_ops.py
Python
apache-2.0
58,305
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
kaiping/incubator-singa
examples/onnx/backend.py
Python
apache-2.0
1,642
# -*- coding: utf-8 -*- """ taiga_ncurses.ui.views.backlog ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ import urwid from taiga_ncurses.ui.widgets import generic, backlog from . import base class ProjectBacklogSubView(base.SubView): help_popup_title = "Backlog Help Info" help_popup_info = base.SubView.help_popup_in...
battlemidget/taiga-ncurses
taiga_ncurses/ui/views/backlog.py
Python
apache-2.0
3,880
# Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
SauloAislan/ironic
ironic/tests/unit/drivers/test_generic.py
Python
apache-2.0
4,019
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may #...
raildo/python-keystoneclient
python-keystoneclient-0.4.1.7.gdca1d42/keystoneclient/openstack/common/jsonutils.py
Python
apache-2.0
6,464
import os import sys import json from datetime import datetime from django.db import connection, transaction from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from fly_project import constants from api.mo...
Oinweb/py-fly
api/management/commands/evaluate_quiz.py
Python
bsd-2-clause
3,663
#!/usr/bin/env python # Copyright 2016 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. '''Tracing controller class. This class manages multiple tracing agents and collects data from all of them. It also manages the clock ...
catapult-project/catapult
systrace/systrace/tracing_controller.py
Python
bsd-3-clause
11,838
"""numerictypes: Define the numeric type objects This module is designed so 'from numerictypes import *' is safe. Exported symbols include: Dictionary with all registered number types (including aliases): typeDict Type objects (not all will be available, depends on platform): see variable sctypes for w...
efiring/numpy-work
numpy/core/numerictypes.py
Python
bsd-3-clause
20,785
from gpiozero import Button import pygame.mixer from pygame.mixer import Sound from signal import pause pygame.mixer.init() button_sounds = { Button(2): Sound("samples/drum_tom_mid_hard.wav"), Button(3): Sound("samples/drum_cymbal_open.wav"), } for button, sound in button_sounds.items(): button.when_pres...
waveform80/gpio-zero
docs/examples/music_box.py
Python
bsd-3-clause
346
# coding=utf-8 from django.db import models from main.models import BaseModel STAT_TYPES = ( ('user_count', 'User count'), ('host_count', 'Host count'), ('ip_update_count', 'IP update count'), ) class StatisticsEntry(BaseModel): class Meta: verbose_name_plural = 'Statistics Entries' sta...
fadenb/hopper.pw
hopperpw/stats/models.py
Python
bsd-3-clause
517
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import * import logging import emission.core.wrapper.wrapperbase as ecwb class Incide...
e-mission/e-mission-server
emission/core/wrapper/incident.py
Python
bsd-3-clause
925
#!/usr/bin/env python # FIXME -- eventually, we want more (all?) of these to work imagedir = parent + "/libtiffpic/depth" files = [ "flower-minisblack-02.tif", # 73x43 2-bit minisblack gray image "flower-minisblack-04.tif", # 73x43 4-bit minisblack gray image "flower-minisblack-06.tif", # 73x43 6...
YangYangTL/oiio
testsuite/tiff-depths/run.py
Python
bsd-3-clause
2,805
from __future__ import unicode_literals import codecs import logging import sys from io import BytesIO from threading import Lock import warnings from django import http from django.conf import settings from django.core import signals from django.core.handlers import base from django.core.urlresolvers import set_scri...
Beeblio/django
django/core/handlers/wsgi.py
Python
bsd-3-clause
9,989
from sympy import (Symbol, symbols, factorial, factorial2, binomial, rf, ff, gamma, polygamma, EulerGamma, O, pi, nan, oo, simplify, expand_func) from sympy.functions.combinatorial.factorials import subfactorial from sympy.utilities.pytest import XFAIL, raises def test_rf_eval_ap...
kmacinnis/sympy
sympy/functions/combinatorial/tests/test_comb_factorials.py
Python
bsd-3-clause
5,343
import re from django import forms from django.conf import settings from django.template.defaultfilters import slugify from tower import ugettext_lazy as _lazy from kitsune.products.models import Product, Topic from kitsune.sumo.form_fields import MultiUsernameField, StrippedCharField from kitsune.wiki.config import...
philipp-sumo/kitsune
kitsune/wiki/forms.py
Python
bsd-3-clause
12,054
#!/usr/bin/env python """FEM library Demonstrates some simple finite element definitions, and computes a mass matrix $ python fem.py [ 1/60, 0, -1/360, 0, -1/90, -1/360] [ 0, 4/45, 0, 2/45, 2/45, -1/90] [-1/360, 0, 1/60, -1/90, 0, -1/360] [ 0, 2/45, -1/90, 4/45, 2/45, 0] ...
flacjacket/sympy
examples/advanced/fem.py
Python
bsd-3-clause
5,414
########################################################################## # # Copyright (c) 2008-2015, Image Engine Design 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: # # * Redis...
goddardl/cortex
test/IECoreMaya/FnParameterisedHolderTest.py
Python
bsd-3-clause
35,854
#!/usr/bin/env python # encoding: utf-8 import unittest import os.path as p, sys; sys.path.append(p.join(p.dirname(__file__), "..")) from _diff import diff, guess_edit from geometry import Position def transform(a, cmds): buf = a.split("\n") for cmd in cmds: ctype, line, col, char = cmd if...
wholland/env
vim/runtime/bundle/ultisnips/plugin/UltiSnips/tests/test_diff.py
Python
mit
4,789
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import threading try: import urllib.parse as parse except ImportError: import urlparse as parse # type: ignore try: from typing import TYPE_CHECKING excep...
Azure/azure-sdk-for-python
sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/http_challenge_cache.py
Python
mit
2,520
# Time: O(n) # Space: O(1) # Suppose you have a long flowerbed in which some of the plots are planted and some are not. # However, flowers cannot be planted in adjacent plots - they would compete for water # and both would die. # # Given a flowerbed (represented as an array containing 0 and 1, # where 0 means empty a...
yiwen-luo/LeetCode
Python/can-place-flowers.py
Python
mit
1,263
from flask import render_template from . import auth @auth.route('/login') def login(): return render_template('auth/login.html')
baojiwei/flasky
app/auth/views.py
Python
mit
136
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # mediawiki-utilities documentation build configuration file, created by # sphinx-quickstart on Thu Apr 10 17:31:47 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present ...
mediawiki-utilities/python-mediawiki-utilities
doc/conf.py
Python
mit
8,467
## # 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/s/scipy.py
Python
gpl-2.0
3,046
"""distutils.file_util Utility functions for operating on single files. """ # This module should be kept compatible with Python 2.1. __revision__ = "$Id: file_util.py,v 1.17 2004/11/10 22:23:14 loewis Exp $" import os from distutils.errors import DistutilsFileError from distutils import log # for generating verbos...
trivoldus28/pulsarch-verilog
tools/local/bas-release/bas,3.9-SunOS-i386/lib/python/lib/python2.4/distutils/file_util.py
Python
gpl-2.0
8,320
"""Dirac notation for states.""" from __future__ import print_function, division from sympy import (cacheit, conjugate, Expr, Function, integrate, oo, sqrt, Tuple) from sympy.core.compatibility import range from sympy.printing.pretty.stringpict import stringPict from sympy.physics.quantum.qexpr imp...
wxgeo/geophar
wxgeometrie/sympy/physics/quantum/state.py
Python
gpl-2.0
29,157
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
tomhenderson/ns-3-dev-git
src/olsr/bindings/modulegen__gcc_LP64.py
Python
gpl-2.0
542,189
import uwsgi from os import path uwsgi.snmp_set_counter64(1, 0) # Number of requests uwsgi.snmp_set_counter64(2, 0) # Number of bytes def application(environ, start_response): size = path.getsize('logo_uWSGI.png') start_response('200 OK', [('Content-Type', 'image/png'), ('Content-Length', str(size))]) ...
blablacio/uwsgi
examples/staticfilesnmp.py
Python
gpl-2.0
470
# Copyright 2009 Google Inc. Released under the GPL v2 """This is a convenience module to import all available types of hosts. Implementation details: You should 'import hosts' instead of importing every available host module. """ from autotest_lib.client.common_lib import utils import base_classes Host = utils.imp...
clebergnu/autotest
client/common_lib/hosts/__init__.py
Python
gpl-2.0
435
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import flt, getdate, formatdate, cstr from erpnext.accounts.report.financial_statements import filter_accou...
chdecultot/erpnext
erpnext/accounts/report/profitability_analysis/profitability_analysis.py
Python
gpl-3.0
5,688
#!/usr/bin/env python ''' Loader for all 2009 Dorado missions written for Monique's notice of bad depths in Dorado389_2009_084_02_084_02_decim.nc. Mike McCann MBARI 15 January 2013 @var __date__: Date of last svn commit @undocumented: __doc__ parser @status: production @license: GPL ''' import os import sys import d...
duane-edgington/stoqs
stoqs/loaders/MolecularEcology/load_dorado2009.py
Python
gpl-3.0
4,550
############################################################################## # # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). # Copyright (C) 2011 credativ Ltd (<http://www.credativ.co.uk>). # All Rights Reserved # # This program is free software: you can redistribute it and/or modify # i...
rschnapka/bank-payment
account_banking_uk_hsbc/account_banking_uk_hsbc.py
Python
agpl-3.0
5,362
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pu...
sysadminmatmoz/ingadhoc
account_invoice_prices_update/__openerp__.py
Python
agpl-3.0
1,508
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
tmerrick1/spack
lib/spack/spack/test/svn_fetch.py
Python
lgpl-2.1
3,303
# # Copyright (c) 2001 - 2015 The SCons Foundation # # 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 Software without restriction, including # without limitation the rights to use, copy, modify, merge...
stefanklug/mapnik
scons/scons-local-2.3.6/SCons/Tool/MSCommon/sdk.py
Python
lgpl-2.1
14,900
"""SCons.Tool.aixc++ Tool-specific initialization for IBM xlC / Visual Age C++ compiler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to...
mapnik/mapnik
scons/scons-local-4.1.0/SCons/Tool/aixc++.py
Python
lgpl-2.1
1,578
""" Graphical user interface functionalities for the SampleResource Aggregate Manager. @date: Jun 12, 2013 @author: CarolinaFernandez """ from django.core.exceptions import ValidationError from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts imp...
dana-i2cat/felix
expedient/doc/plugins/samples/plugin/sample_resource/controller/GUIdispatcher.py
Python
apache-2.0
7,485
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack 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 requ...
cbrucks/Federated_Keystone
tests/test_backend_sql.py
Python
apache-2.0
11,834
# # 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 # ...
noironetworks/neutron
neutron/db/migration/alembic_migrations/versions/mitaka/expand/32e5974ada25_add_neutron_resources_table.py
Python
apache-2.0
1,390
#******************************************************************************* # Copyright (c) 2015 IBM Corp. # # 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/li...
snowch/spark-cloudant
test/helpers/dataload.py
Python
apache-2.0
3,656
# -*- coding: utf-8 -*- from rest_framework import status as http_status import itertools from flask import request from framework import status from framework.exceptions import HTTPError from framework.flask import redirect # VOL-aware redirect from framework.auth.decorators import must_be_signed from website.arc...
mfraezz/osf.io
website/project/views/register.py
Python
apache-2.0
10,365
# -*- coding: utf-8 -*- #------------------------------------------------------------------------- # drawElements Quality Program utilities # -------------------------------------- # # Copyright 2015 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use t...
maurossi/deqp
scripts/opengl/gen_es31_wrapper.py
Python
apache-2.0
1,342
"""A high-speed, production ready, thread pooled, generic HTTP server. Simplest example on how to use this module directly (without using CherryPy's application machinery):: from cherrypy import wsgiserver def my_crazy_app(environ, start_response): status = '200 OK' response_headers = [('Cont...
exiahuang/SalesforceXyTools
libs/cherrypy/wsgiserver/wsgiserver3.py
Python
apache-2.0
77,620
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
goldmedal/spark
python/pyspark/ml/stat.py
Python
apache-2.0
16,949
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
zouzhberk/ambaridemo
demo-server/src/main/resources/stacks/BIGTOP/0.8/services/HIVE/package/scripts/webhcat_server.py
Python
apache-2.0
1,523
#!/usr/bin/python # # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
krux/adspygoogle
scripts/adspygoogle/dfp/__init__.py
Python
apache-2.0
718
# Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
craigcitro/pydatalab
tests/bigquery/api_tests.py
Python
apache-2.0
15,440
# -*- coding: utf-8 -*- ############################################################################### # # Search # Returns current committees, subcommittees, and their membership. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # y...
jordanemedlock/psychtruths
temboo/core/Library/SunlightLabs/Congress/Legislator/Search.py
Python
apache-2.0
5,201
"""Support for Xiaomi Gateways.""" from datetime import timedelta import logging import voluptuous as vol from xiaomi_gateway import XiaomiGateway, XiaomiGatewayDiscovery from homeassistant import config_entries, core from homeassistant.const import ( ATTR_BATTERY_LEVEL, ATTR_DEVICE_ID, ATTR_VOLTAGE, ...
sander76/home-assistant
homeassistant/components/xiaomi_aqara/__init__.py
Python
apache-2.0
12,713
# 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...
jbedorf/tensorflow
tensorflow/python/ops/init_ops_v2.py
Python
apache-2.0
26,725
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
spektom/incubator-airflow
airflow/providers/google/cloud/operators/pubsub.py
Python
apache-2.0
28,015
from __future__ import absolute_import input_name = '../examples/dg/advection_2D.py' output_name = 'advection_sol.msh' from tests_basic import TestInput class Test( TestInput ): pass
vlukes/sfepy
tests/test_dg_input_advection.py
Python
bsd-3-clause
187
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('demo_models', '0003_auto_20150419_2110'), ] operations = [ migrations.AddField( model_name='waiter', ...
altanawealth/django-report-builder
report_builder_demo/demo_models/migrations/0004_waiter_days_worked.py
Python
bsd-3-clause
434
import shutil from io import BytesIO, TextIOWrapper import logging import os from os.path import expanduser, exists import struct from configobj import ConfigObj from Crypto.Cipher import AES logger = logging.getLogger(__name__) def load_config(usr_cfg, def_cfg=None): cfg = ConfigObj() cfg.merge(ConfigObj(def...
danieljwest/mycli
mycli/config.py
Python
bsd-3-clause
4,404
# encoding: 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 model 'ConservationFeature' db.create_table('seak_conservationfeature', ( ('name', se...
Ecotrust/cogs-priorities
priorities/seak/migrations/0001_initial.py
Python
bsd-3-clause
19,850
from __future__ import absolute_import, unicode_literals import unittest from django.test import TestCase from wagtail.tests.search import models from .test_backends import BackendTests class TestDBBackend(BackendTests, TestCase): backend_path = 'wagtail.wagtailsearch.backends.db' @unittest.expectedFailu...
chrxr/wagtail
wagtail/wagtailsearch/tests/test_db_backend.py
Python
bsd-3-clause
854
#!/usr/bin/python # ------------------------------------------------------------------------------ # Copyright (C) 2012, Robert Johansson <rob@raditex.nu>, Raditex Control AB # All rights reserved. # # This file is part of the rSCADA system. # # rSCADA # http://www.rSCADA.se # info@rscada.se # ------------------------...
luminize/libcanopen
python/examples/canopen-dump.py
Python
bsd-3-clause
649
# -*- coding: utf-8 -*- # # Anaconda documentation build configuration file, created by # sphinx-quickstart on Wed Sep 18 14:37:01 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. # # Al...
jkonecny12/anaconda
docs/conf.py
Python
gpl-2.0
11,653
""" Docstrings are another source of information for functions and classes. :mod:`jedi.evaluate.dynamic` tries to find all executions of functions, while the docstring parsing is much easier. There are three different types of docstrings that |jedi| understands: - `Sphinx <http://sphinx-doc.org/markup/desc.html#info-f...
technologiescollege/Blockly-rduino-communication
scripts_XP/Lib/site-packages/jedi/evaluate/docstrings.py
Python
gpl-3.0
10,503
# -*- coding: utf-8 -*- from module.plugins.internal.XFSAccount import XFSAccount class FilerioCom(XFSAccount): __name__ = "FilerioCom" __type__ = "account" __version__ = "0.07" __status__ = "testing" __description__ = """FileRio.in account plugin""" __license__ = "GPLv3" __au...
Guidobelix/pyload
module/plugins/accounts/FilerioCom.py
Python
gpl-3.0
407
# Albert Cardona 2014-11-20 # This file is meant to be run from within ./manage.py shell in the environment, like: # [1] load export_all_graphml.py # [2] project_id = 12 # [2] export(project_id, "all.graphml") # # Will generate a gzip'ed file like "all.graphml.gz" # # Includes all skeletons with more than 1 treenode; #...
catsop/CATMAID
scripts/export/export_all_graphml.py
Python
gpl-3.0
3,992
#!/usr/bin/python # coding: utf-8 -*- # (c) 2017, Wayne Witzel III <wayne@riotousliving.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1...
valentin-krasontovitsch/ansible
lib/ansible/modules/web_infrastructure/ansible_tower/tower_job_template.py
Python
gpl-3.0
10,716
# Copyright (c) 2011 Mattias Nissler <mattias.nissler@gmx.de> # # 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 # condition...
shutej/tapcfg
drivers/osx/tuntap/test/tuntap/tuntap_tests.py
Python
lgpl-2.1
4,009
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
EmreAtes/spack
var/spack/repos/builtin/packages/py-flask-socketio/package.py
Python
lgpl-2.1
2,117
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
EmreAtes/spack
var/spack/repos/builtin/packages/prodigal/package.py
Python
lgpl-2.1
1,761
# -*- coding: utf-8 -*- import os import robot from keywordgroup import KeywordGroup class _ScreenshotKeywords(KeywordGroup): def __init__(self): self._screenshot_index = 0 # Public def capture_page_screenshot(self, filename=None): """Takes a screenshot of the current page...
michaelmendoza42/robotframework-appiumlibrary
src/AppiumLibrary/keywords/_screenshot.py
Python
apache-2.0
1,938
# Import all metrics from django_prometheus.db.metrics import *
DingaGa/django-prometheus
django_prometheus/db/__init__.py
Python
apache-2.0
64
# Copyright 2016 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
gwh59/cloud-custodian
c7n/resources/sns.py
Python
apache-2.0
1,389
"""Test sensor of Brother integration.""" from datetime import datetime, timedelta import json from homeassistant.components.brother.const import UNIT_PAGES from homeassistant.const import ( ATTR_DEVICE_CLASS, ATTR_ENTITY_ID, ATTR_ICON, ATTR_UNIT_OF_MEASUREMENT, DEVICE_CLASS_TIMESTAMP, PERCENTA...
tchellomello/home-assistant
tests/components/brother/test_sensor.py
Python
apache-2.0
10,659
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import Permission from django.contrib.auth.forms import PasswordResetForm from .models import MyUser from forms import CustomUserRegistrationForm class PermissionAdmin(admin.ModelAdmin): search_fields ...
brandonPurvis/osf.io
admin/common_auth/admin.py
Python
apache-2.0
2,035
import binascii import glob import os import stat import struct import time from distutils.version import LooseVersion import pytest import logging from cassandra import WriteTimeout from cassandra.cluster import NoHostAvailable, OperationTimedOut from ccmlib.common import is_win from ccmlib.node import Node, TimeoutE...
stef1927/cassandra-dtest
commitlog_test.py
Python
apache-2.0
26,153
from typing import Any, Optional import sqlalchemy from django.db import connection from zerver.lib.db import TimeTrackingConnection # This is a Pool that doesn't close connections. Therefore it can be used with # existing Django database connections. class NonClosingPool(sqlalchemy.pool.NullPool): def status(...
timabbott/zulip
zerver/lib/sqlalchemy_utils.py
Python
apache-2.0
1,660
# Copyright 2012 Managed I.T. # # Author: Kiall Mac Innes <kiall@managedit.ie> # # 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 r...
cneill/designate-testing
designate/exceptions.py
Python
apache-2.0
8,130
from .utils import DslBase, BoolMixin, _make_dsl_class from .function import SF, ScoreFunction __all__ = [ 'Q', 'Bool', 'Boosting', 'Common', 'ConstantScore', 'DisMax', 'Filtered', 'FunctionScore', 'Fuzzy', 'FuzzyLikeThis', 'FuzzyLikeThisField', 'GeoShape', 'HasChild', 'HasParent', 'Ids', 'Indices', 'Match...
reflection/elasticsearch-dsl-py
elasticsearch_dsl/query.py
Python
apache-2.0
5,587
from __future__ import print_function import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class ScopedEnumType(TestBase): mydir = TestBase.compute_mydir(__file__) @skipIf(dwarf_version=['<', '4']) def test(self): self.bu...
llvm-mirror/lldb
packages/Python/lldbsuite/test/commands/expression/scoped_enums/TestScopedEnumType.py
Python
apache-2.0
1,570
# -*- 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-asset
google/cloud/asset_v1p5beta1/services/asset_service/transports/__init__.py
Python
apache-2.0
1,176
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
atheendra/access_keys
keystone/tests/test_url_middleware.py
Python
apache-2.0
2,020
"""Define constants for the Ambient PWS component.""" DOMAIN = "ambient_station" ATTR_LAST_DATA = "last_data" CONF_APP_KEY = "app_key" DATA_CLIENT = "data_client" TOPIC_UPDATE = "update" TYPE_BINARY_SENSOR = "binary_sensor" TYPE_SENSOR = "sensor"
leppa/home-assistant
homeassistant/components/ambient_station/const.py
Python
apache-2.0
252
#!/usr/bin/env python """ @package mi.dataset.parser.test.test_adcpt_acfgm @fid marine-integrations/mi/dataset/parser/test/test_adcpt_acfgm.py @author Ronald Ronquillo @brief Test code for a Adcpt_Acfgm_Dcl data parser """ from nose.plugins.attrib import attr import os from mi.core.log import get_logger from mi.data...
janeen666/mi-instrument
mi/dataset/parser/test/test_adcpt_acfgm_dcl_pd8.py
Python
bsd-2-clause
7,347
# -*- coding: utf-8 -*- """ logbook.ticketing ~~~~~~~~~~~~~~~~~ Implements long handlers that write to remote data stores and assign each logging message a ticket id. :copyright: (c) 2010 by Armin Ronacher, Georg Brandl. :license: BSD, see LICENSE for more details. """ from time import time im...
RazerM/logbook
logbook/ticketing.py
Python
bsd-3-clause
19,231
""" ML Estimation of Spatial Error Model """ __author__ = "Luc Anselin luc.anselin@asu.edu, Serge Rey srey@asu.edu" import numpy as np import numpy.linalg as la import pysal as ps from pysal.spreg.utils import RegressionPropsY, RegressionPropsVM import diagnostics as DIAG import user_output as USER import summary_out...
spreg-git/pysal
pysal/spreg/ml_error.py
Python
bsd-3-clause
18,341
#!/usr/bin/python from distutils.core import setup setup( name='snapboard', version='0.2.1', author='Bo Shi', maintainer='SNAPboard developers', maintainer_email='snapboard-discuss@googlegroups.com', url='http://code.google.com/p/snapboard/', description='Bulletin board application for Djang...
DuVale/snapboard
setup.py
Python
bsd-3-clause
2,058
"""Forest covertype dataset. A classic dataset for classification benchmarks, featuring categorical and real-valued features. The dataset page is available from UCI Machine Learning Repository https://archive.ics.uci.edu/ml/datasets/Covertype Courtesy of Jock A. Blackard and Colorado State University. """ # Au...
xuewei4d/scikit-learn
sklearn/datasets/_covtype.py
Python
bsd-3-clause
6,567
from BinPy.combinational.combinational import *
rajathkumarmp/BinPy
BinPy/combinational/__init__.py
Python
bsd-3-clause
48
import datetime from django.test import TestCase from django.utils import timezone from schedule.models import Event, Rule, Calendar, CalendarRelation class TestCalendar(TestCase): def setup(self): pass def __create_event(self, start, end): data = { 'title': 'Recent Event', ...
GrahamDigital/django-scheduler
tests/test_calendar.py
Python
bsd-3-clause
4,809
#!/usr/bin/env python ''' This program illustrates the use of findContours and drawContours. The original image is put up along with the image of drawn contours. Usage: contours.py A trackbar is put up which controls the contour level from -3 to 3 ''' # Python 2/3 compatibility from __future__ import print_funct...
makelove/OpenCV-Python-Tutorial
官方samples/contours.py
Python
mit
2,455
from toontown.coghq.SpecImports import * GlobalEntities = {1000: {'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', 'parentEntId': 0, 'cogLevel': 0, 'farPlaneDistance': 1500, 'modelFilename': 'phase_11/models/lawbotHQ/LB_Zone04a', 'wantDoors': 1}, 1001: {'ty...
Spiderlover/Toontown
toontown/coghq/LawbotOfficeLobby_Trap00.py
Python
mit
19,705
#!/usr/bin/env python import ibus import dbus bus = dbus.SessionBus() e = ibus.interface.IPanel() print e.Introspect("/", bus)
ibus/ibus-qt
src/interfaces/introspect_panel.py
Python
gpl-2.0
130
# # # Copyright 2012-2015 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://vscentrum.be/nl/en), # the Hercules foundation (ht...
valtandor/easybuild-framework
test/framework/variables.py
Python
gpl-2.0
3,243