repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
IAPark/PITherm | refs/heads/master | src/services/TemperatureMonitor/TemperatureMonitor.py | 1 | import sys
from src.TemperatureMonitor import TemperatureMonitor
from src.temperature import TemperatureSensor
import argparse
parser = argparse.ArgumentParser(description='Broadcast temperatures to URLs')
parser.add_argument('observers', metavar='N', type=str, nargs='+',
help='the observers', def... |
mollyproject/mollyproject | refs/heads/master | molly/apps/feeds/providers/__init__.py | 1 | from molly.conf.provider import Provider
class BaseFeedsProvider(Provider):
pass
from rss import RSSFeedsProvider
from ical import ICalFeedsProvider
from talks_cam import TalksCamFeedsProvider
|
Azure/azure-sdk-for-python | refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_activity_logs_operations.py | 1 | # 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 may ... |
bealdav/OCB | refs/heads/patch-1 | addons/stock_account/wizard/stock_return_picking.py | 342 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... |
jk1/intellij-community | refs/heads/master | python/testData/intentions/PyAnnotateVariableTypeIntentionTest/conflictWithAnnotationFunctionTypeIntention_after.py | 19 | def func(x):
return 42
var: [int] = func('foo')
|
blackbliss/callme | refs/heads/master | flask/lib/python2.7/site-packages/jinja2/debug.py | 620 | # -*- coding: utf-8 -*-
"""
jinja2.debug
~~~~~~~~~~~~
Implements the debug interface for Jinja. This module does some pretty
ugly stuff with the Python traceback system in order to achieve tracebacks
with correct line numbers, locals and contents.
:copyright: (c) 2010 by the Jinja Team.
:... |
thaumos/ansible | refs/heads/devel | lib/ansible/modules/cloud/amazon/ec2_vpc_igw.py | 56 | #!/usr/bin/python
# Copyright: Ansible Project
# 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',
'status': ['stableinterf... |
Belxjander/Kirito | refs/heads/master | Python-3.5.0-main/Tools/scripts/analyze_dxp.py | 122 | """
Some helper functions to analyze the output of sys.getdxp() (which is
only available if Python was built with -DDYNAMIC_EXECUTION_PROFILE).
These will tell you which opcodes have been executed most frequently
in the current process, and, if Python was also built with -DDXPAIRS,
will tell you which instruction _pair... |
tinkerinestudio/Tinkerine-Suite | refs/heads/master | TinkerineSuite/pypy/lib-python/2.7/multiprocessing/queues.py | 25 | #
# Module implementing queues
#
# multiprocessing/queues.py
#
# Copyright (c) 2006-2008, R Oudkerk
# 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 ret... |
amarchandole/capprobe_mptcp | refs/heads/master | scripts/analyze_suspend.py | 1540 | #!/usr/bin/python
#
# Tool for analyzing suspend/resume timing
# Copyright (c) 2013, Intel Corporation.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This prog... |
ojengwa/oh-mainline | refs/heads/master | vendor/packages/scrapy/scrapy/contrib/closespider.py | 16 | """CloseSpider is an extension that forces spiders to be closed after certain
conditions are met.
See documentation in docs/topics/extensions.rst
"""
import warnings
from collections import defaultdict
from twisted.internet import reactor
from twisted.python import log as txlog
from scrapy.xlib.pydispatch import dis... |
gangadharkadam/saloon_frappe_install | refs/heads/master | frappe/desk/star.py | 38 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
"""Allow adding of stars to documents"""
import frappe, json
from frappe.model.db_schema import add_column
@frappe.whitelist()
def toggle_star(doctype, name, add=False):
"""Ad... |
spivachuk/sovrin-node | refs/heads/master | indy_client/cli/cli.py | 1 | import ast
import asyncio
import datetime
import importlib
import json
import os
import traceback
from collections import OrderedDict
from functools import partial
from hashlib import sha256
from operator import itemgetter
from typing import Dict, Any, Tuple, Callable, NamedTuple
import base58
from libnacl import rand... |
shingonoide/odoo | refs/heads/deverp_8.0 | addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/logreport.py | 386 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# ... |
badscimmia/Ronflex-Kernel | refs/heads/master | tools/perf/scripts/python/check-perf-trace.py | 11214 | # perf script event handlers, generated by perf script -g python
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# This script tests basic functionality such as flag and symbol
# strings, common_xxx() calls back into perf, begin, end, unhandled
# events, etc. ... |
mattesno1/Sick-Beard | refs/heads/master | lib/requests/packages/urllib3/request.py | 154 | # urllib3/request.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
try:
from urllib.parse import urlencode
except ImportError:
from urllib import urlencod... |
danielpalomino/gem5 | refs/heads/master | src/arch/x86/isa/insts/simd64/integer/save_and_restore_state.py | 91 | # Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implemen... |
skoppisetty/secret-bugfixes | refs/heads/master | lib/cherrypy/lib/http.py | 173 | import warnings
warnings.warn('cherrypy.lib.http has been deprecated and will be removed '
'in CherryPy 3.3 use cherrypy.lib.httputil instead.',
DeprecationWarning)
from cherrypy.lib.httputil import *
|
hugs/django | refs/heads/master | django/contrib/localflavor/au/forms.py | 35 | """
Australian-specific Form helpers
"""
from django.forms import ValidationError
from django.forms.fields import Field, RegexField, Select, EMPTY_VALUES
from django.forms.util import smart_unicode
from django.utils.translation import ugettext_lazy as _
import re
PHONE_DIGITS_RE = re.compile(r'^(\d{10})$')
class AUP... |
dufferzafar/critiquebrainz | refs/heads/master | critiquebrainz/frontend/login/__init__.py | 1 | """
Package login provides authentication functionality for CritiqueBrainz.
It is based on OAuth2 protocol. MusicBrainz is the only supported provider.
"""
from flask import redirect, url_for
from flask_login import LoginManager, current_user
from flask_babel import gettext
from critiquebrainz.data.model.user import U... |
francisar/rds_manager | refs/heads/master | aliyun/api/rest/Ecs20140526DescribeEipMonitorDataRequest.py | 1 | '''
Created by auto_sdk on 2015.06.23
'''
from aliyun.api.base import RestApi
class Ecs20140526DescribeEipMonitorDataRequest(RestApi):
def __init__(self,domain='ecs.aliyuncs.com',port=80):
RestApi.__init__(self,domain, port)
self.AllocationId = None
self.EndTime = None
self.Period = None
self.StartTime = Non... |
kevin1024/vcrpy | refs/heads/master | tests/integration/test_boto.py | 1 | import pytest
boto = pytest.importorskip("boto")
import boto # NOQA
import boto.iam # NOQA
from boto.s3.connection import S3Connection # NOQA
from boto.s3.key import Key # NOQA
from configparser import DuplicateSectionError # NOQA
import vcr # NOQA
def test_boto_stubs(tmpdir):
with vcr.use_cassette(str(tm... |
tmilicic/networkx | refs/heads/master | networkx/algorithms/approximation/tests/test_matching.py | 96 | from nose.tools import *
import networkx as nx
import networkx.algorithms.approximation as a
def test_min_maximal_matching():
# smoke test
G = nx.Graph()
assert_equal(len(a.min_maximal_matching(G)),0)
|
lfz/Guided-Denoise | refs/heads/master | Attackset/fgsm_inresv2_random/nets/nets_factory.py | 31 | # Copyright 2016 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 applicable ... |
vladir/mezzanine | refs/heads/master | mezzanine/project_template/project_name/wsgi.py | 44 | """
WSGI config for {{ project_name }} project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
from mezza... |
OrkoHunter/networkx | refs/heads/master | examples/drawing/sampson.py | 4 | #!/usr/bin/env python
"""
Sampson's monastery data.
Shows how to read data from a zip file and plot multiple frames.
"""
__author__ = """Aric Hagberg (hagberg@lanl.gov)"""
# Copyright (C) 2010 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# Al... |
beh9540/cookbook | refs/heads/master | recipes/admin.py | 1 | '''
Created on Mar 12, 2013
@author: bhowell
'''
from django.contrib import admin
from mptt.admin import MPTTModelAdmin
from recipes.models import Category, Unit
admin.site.register(Unit)
admin.site.register(Category,MPTTModelAdmin) |
RENCI/xDCIShare | refs/heads/xdci-develop | hs_core/tests/api/views/test_share_resource.py | 2 | import json
from django.test import TestCase, RequestFactory
from django.contrib.auth.models import Group
from django.core.urlresolvers import reverse
from rest_framework import status
from rest_framework.exceptions import PermissionDenied
from hs_core import hydroshare
from hs_core.views import share_resource_with_... |
cberry777/dd-agent | refs/heads/master | tests/checks/integration/test_iis.py | 8 | # 3p
from nose.plugins.attrib import attr
# project
from tests.checks.common import AgentCheckTest
MINIMAL_INSTANCE = {
'host': '.',
}
INSTANCE = {
'host': '.',
'sites': ['Default Web Site', 'Test-Website-1', 'Non Existing Website'],
}
INVALID_HOST_INSTANCE = {
'host': 'nonexistinghost'
}
@attr('w... |
MostafaGazar/tensorflow | refs/heads/master | tensorflow/examples/tutorials/mnist/mnist.py | 17 | # 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... |
eviljeff/olympia | refs/heads/master | src/olympia/hero/migrations/0011_auto_20200624_1809.py | 6 | # Generated by Django 2.2.12 on 2020-06-24 18:09
from django.db import migrations, models
import django.utils.timezone
import olympia.hero.models
class Migration(migrations.Migration):
dependencies = [
('hero', '0010_auto_20200623_1949'),
]
operations = [
migrations.AlterModelOptions(
... |
nolanliou/tensorflow | refs/heads/master | tensorflow/contrib/distributions/python/kernel_tests/bijectors/sigmoid_centered_test.py | 76 | # Copyright 2016 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... |
SebDieBln/QGIS | refs/heads/master | python/plugins/processing/algs/gdal/retile.py | 6 | # -*- coding: utf-8 -*-
"""
***************************************************************************
retile.py
---------------------
Date : January 2016
Copyright : (C) 2016 by Médéric Ribreux
Email : mederic dot ribreux at medspx dot fr
****************... |
bbenko/shinkicker | refs/heads/master | django/conf/locale/bs/formats.py | 433 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. N Y.'
TIME_FORMAT = 'G:i'
DATETIME_FORMAT = 'j. N. Y. G:i T'
YEAR_MONT... |
aixiwang/audio_feature_sender | refs/heads/master | main_train.py | 1 | # -*- coding: utf-8 -*-
#------------------------------------------------------------------------------------
# audio_feature_sender -- main
# extract audio features and send features to backend server for training or predict
#
# aixi.wang@hotmail.com
#-------------------------------------------------------------------... |
DmitryRendov/mob-site | refs/heads/master | mob/loginsys/admin.py | 2 | from django import forms
from django.contrib import admin
from django.contrib.auth.models import Group
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from loginsys.models import User
from django.contrib.auth import get_user_model
User = get_user_model()
... |
meco-group/omg-tools | refs/heads/master | examples/GCode_examples/gcodeproblem_anchor.py | 1 | # This file is part of OMG-tools.
#
# OMG-tools -- Optimal Motion Generation-tools
# Copyright (C) 2016 Ruben Van Parys & Tim Mercy, KU Leuven.
# All rights reserved.
#
# OMG-tools 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... |
aayushidwivedi01/spark-tk | refs/heads/master | regression-tests/sparktkregtests/lib/config.py | 5 | # vim: set encoding=utf-8
# Copyright (c) 2016 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... |
neumerance/cloudloon2 | refs/heads/master | .venv/lib/python2.7/site-packages/jinja2/lexer.py | 635 | # -*- coding: utf-8 -*-
"""
jinja2.lexer
~~~~~~~~~~~~
This module implements a Jinja / Python combination lexer. The
`Lexer` class provided by this module is used to do some preprocessing
for Jinja.
On the one hand it filters out invalid operators like the bitshift
operators we don't allow... |
israfilkara/key-mon | refs/heads/master | src/keymon/shaped_window.py | 15 | #!/usr/bin/python
#
# Copyright 2010 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 a... |
minrk/sympy | refs/heads/master | sympy/core/benchmarks/bench_assumptions.py | 15 | from sympy.core import Symbol, Integer
x = Symbol('x')
i3= Integer(3)
def timeit_x_is_integer():
x.is_integer
def timeit_Integer_is_irrational():
i3.is_irrational
|
noironetworks/group-based-policy | refs/heads/master | gbpservice/neutron/db/migration/alembic_migrations/versions/5a24894af57c_gp_classifier_protocol_string.py | 2 | # Copyright 2014 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 ... |
GitAngel/django | refs/heads/master | django/core/files/move.py | 554 | """
Move a file in the safest way possible::
>>> from django.core.files.move import file_move_safe
>>> file_move_safe("/tmp/old_file", "/tmp/new_file")
"""
import os
from shutil import copystat
from django.core.files import locks
__all__ = ['file_move_safe']
def _samefile(src, dst):
# Macintosh, Unix.... |
opennode/waldur-mastermind | refs/heads/develop | src/waldur_digitalocean/tasks.py | 1 | import logging
from celery import shared_task
from waldur_core.core import utils
from waldur_core.core.tasks import Task
from . import log
logger = logging.getLogger(__name__)
@shared_task(bind=True, max_retries=300, default_retry_delay=5)
def wait_for_action_complete(self, action_id, serialized_droplet):
dro... |
theirc/ServiceInfo | refs/heads/develop | service_info_cms/context_processors.py | 1 | from django.conf import settings
def captcha_key(request):
return {'CAPTCHA_SITEKEY': settings.CAPTCHA_SITEKEY}
|
bmanojlovic/ansible | refs/heads/devel | lib/ansible/modules/network/nxos/nxos_gir.py | 8 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible 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.
#
# Ansible is distribut... |
siddhartha100/Kernel | refs/heads/master | arch/ia64/scripts/unwcheck.py | 13143 | #!/usr/bin/python
#
# Usage: unwcheck.py FILE
#
# This script checks the unwind info of each function in file FILE
# and verifies that the sum of the region-lengths matches the total
# length of the function.
#
# Based on a shell/awk script originally written by Harish Patil,
# which was converted to Perl by Matthew Ch... |
lqch14102/lantern | refs/heads/devel | copys3file.py | 2 | #!/usr/bin/env python
import sys
import boto
from boto.s3.key import Key
if len(sys.argv) < 2:
print "Need file name and base name of generic latest installer, as in 'copys3file.py lantern-1.4.4-6dfa980.dmg lantern-installer'"
sys.exit(1)
# DRY: deployBinaries.bash
BUCKET = 'lantern'
key = str(sys.argv[1])... |
andfoy/margffoy-tuay-server | refs/heads/master | env/lib/python2.7/site-packages/Mezzanine-3.1.10-py2.7.egg/mezzanine/conf/admin.py | 2 | from __future__ import unicode_literals
from copy import copy
from django.contrib import admin
from django.contrib.messages import info
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext_lazy as _
from django.utils.encoding import force_text
from mezzanine.core.admin import Ba... |
aristanetworks/neutron | refs/heads/master | neutron/plugins/ml2/config.py | 23 | # Copyright (c) 2013 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 ... |
naslanidis/ansible | refs/heads/devel | lib/ansible/modules/inventory/add_host.py | 50 | # -*- mode: python -*-
# This file is part of Ansible
#
# Ansible 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.
#
# Ansible is distr... |
FireElementalNE/windfarm | refs/heads/master | Prototype 4/order.py | 1 | import sys,os,re
try:
directory = sys.argv[1]
except IndexError:
print 'Usage: python ' + sys.argv[0] + ' <directory>'
sys.exit(0)
files = []
for root, dirnames, filenames in os.walk(directory):
for filename in filenames:
nameRe = '^\d{4}\.\d{2}\.\d{2}\-\d{2}\.\d{2}.\d{2}$'
m = re.match(nameRe,filename)
if... |
perrette/myref | refs/heads/master | papers/_version.py | 1 |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... |
jminuscula/dixit-online | refs/heads/master | server/src/dixit/game/test/game.py | 1 |
from django.test import TestCase
from django.contrib.auth.models import User
from dixit import settings
from dixit.game.models.game import Game, GameStatus
from dixit.game.models.round import Play
from dixit.game.models.card import Card
from dixit.game.exceptions import GameDeckExhausted, GameRoundIncomplete
class ... |
codepython/CollectorCity-Market-Place | refs/heads/master | stores/apps/users/admin.py | 2 | from models import *
from django.contrib import admin
admin.site.register(Profile)
admin.site.register(EmailVerify)
|
RCHG/blog_backup | refs/heads/master | _vendor/bundle/ruby/2.1.0/gems/pygments.rb-0.6.0/vendor/pygments-main/pygments/lexers/_clbuiltins.py | 57 | # -*- coding: utf-8 -*-
"""
pygments.lexers._clbuiltins
~~~~~~~~~~~~~~~~~~~~~~~~~~~
ANSI Common Lisp builtins.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
BUILTIN_FUNCTIONS = set([ # 638 functions
'<', '<=', '=', '>', '>=', '-... |
magic282/shadowsocks | refs/heads/master | shadowsocks/asyncdns.py | 5 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2014-2015 clowwindy
#
# 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... |
cernvm/cernvm-appliance-agent | refs/heads/master | api-tests/xml_poster.py | 1 | #!/usr/bin/python
import xml.etree.ElementTree as ET
import os
import urllib
import urllib2
if 'MY_HOME' not in os.environ:
os.environ['MY_HOME']='/usr/libexec/cernvm-appliance-agent'
def prepare():
transaction=ET.Element('cernvm-api', {'version':'1.0'})
username=ET.Element('username')
username.text='... |
mezz64/home-assistant | refs/heads/dev | tests/components/ring/test_binary_sensor.py | 13 | """The tests for the Ring binary sensor platform."""
from time import time
from .common import setup_platform
from tests.async_mock import patch
async def test_binary_sensor(hass, requests_mock):
"""Test the Ring binary sensors."""
with patch(
"ring_doorbell.Ring.active_alerts",
return_value... |
benfinke/ns_python | refs/heads/master | nssrc/com/citrix/netscaler/nitro/resource/config/network/fis.py | 3 | #
# Copyright (c) 2008-2015 Citrix Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... |
TeslaProject/external_chromium_org | refs/heads/lp5.1 | tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper_unittest.py | 26 | # Copyright 2014 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.
import os
import pickle
import re
import shutil
import tempfile
import unittest
from telemetry import benchmark
from telemetry.core import util
from telemet... |
tchellomello/home-assistant | refs/heads/dev | homeassistant/components/satel_integra/__init__.py | 10 | """Support for Satel Integra devices."""
import collections
import logging
from satel_integra.satel_integra import AsyncSatel
import voluptuous as vol
from homeassistant.const import CONF_HOST, CONF_PORT, EVENT_HOMEASSISTANT_STOP
from homeassistant.core import callback
from homeassistant.helpers import config_validat... |
abdielfloresz/HackPyAppRep | refs/heads/master | hackpyapp_project/hackpyapp/admin.py | 1 | from django.contrib import admin
# Register your models here.
from .models import BodyPart
admin.site.register(BodyPart) |
madj4ck/ansible | refs/heads/devel | plugins/inventory/docker.py | 132 | #!/usr/bin/env python
# (c) 2013, Paul Durivage <paul.durivage@gmail.com>
#
# This file is part of Ansible.
#
# Ansible 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
# (a... |
OpenSoccerManager/opensoccermanager-editor | refs/heads/master | structures/clubs.py | 1 | #!/usr/bin/env python3
# This file is part of OpenSoccerManager-Editor.
#
# OpenSoccerManager 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 la... |
lthurlow/Network-Grapher | refs/heads/master | proj/external/numpy-1.7.0/build/lib.linux-i686-2.7/numpy/polynomial/__init__.py | 11 | """
A sub-package for efficiently dealing with polynomials.
Within the documentation for this sub-package, a "finite power series,"
i.e., a polynomial (also referred to simply as a "series") is represented
by a 1-D numpy array of the polynomial's coefficients, ordered from lowest
order term to highest. For example, a... |
mmulazzani/HoneyConnector | refs/heads/master | server/pyftpdlib/filesystems.py | 5 | #!/usr/bin/env python
# $Id: filesystems.py 1171 2013-02-19 10:13:09Z g.rodola $
# ======================================================================
# Copyright (C) 2007-2013 Giampaolo Rodola' <g.rodola@gmail.com>
#
# All Rights Reserved
#
# Permission is hereby granted, free of charge, ... |
ZeitOnline/zeit.edit | refs/heads/master | src/zeit/edit/container.py | 1 | import UserDict
import grokcore.component as grok
import logging
import lxml.etree
import uuid
import zeit.edit.block
import zeit.edit.interfaces
import zope.container.contained
import zope.interface
import zope.location.interfaces
import zope.proxy
import zope.security.proxy
log = logging.getLogger(__name__)
class... |
OCA/account-financial-tools | refs/heads/13.0 | account_check_deposit/models/res_config_settings.py | 1 | # Copyright 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# Copyright 2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
check_... |
laurentb/weboob | refs/heads/master | modules/mailinator/module.py | 1 | # -*- coding: utf-8 -*-
# Copyright(C) 2013 Vincent A
#
# 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 Affero General Public License as published by
# the Free Software Foundation, either version 3 of the Licen... |
GeoffEvans/aol_model | refs/heads/master | aol_model/xu_stroud_model.py | 1 | """The heart of the model is the acousto-optic interaction solution described in Xu and Stroud.
The xu_stroud_model module contains the functions to diffract an optic ray accordiong to the
Xu and Stroud theory."""
from numpy import dot, sin, sqrt, array, power, outer, abs, all, isnan
from scipy.constants import c, pi
... |
naveentata/coala-bears | refs/heads/master | tests/c_languages/CPPCleanBearTest.py | 18 | from bears.c_languages.CPPCleanBear import CPPCleanBear
from coalib.testing.LocalBearTestHelper import verify_local_bear
good_file = """
int main() {
return 0;
}
"""
bad_file = """
int global_var = 3;
int main() {
return 0;
}
"""
CPPCleanBearTest = verify_local_bear(CPPCleanBear,
... |
antoinecarme/sklearn2sql_heroku | refs/heads/master | tests/classification/FourClass_10/ws_FourClass_10_DummyClassifier_db2_code_gen.py | 1 | from sklearn2sql_heroku.tests.classification import generic as class_gen
class_gen.test_model("DummyClassifier" , "FourClass_10" , "db2")
|
craigderington/Beacon | refs/heads/master | radio/views.py | 6445 | from django.shortcuts import render
# Create your views here.
|
acsone/account-financial-reporting | refs/heads/8.0 | account_financial_report/model/__init__.py | 35 | #!/usr/bin/python
# -*- encoding: utf-8 -*-
###########################################################################
# Module Writen to OpenERP, Open Source Management Solution
# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
# All Rights Reserved
# Credits#######################################... |
kuiwei/edx-platform | refs/heads/master | lms/djangoapps/instructor/tests/test_legacy_forum_admin.py | 6 | """
Unit tests for instructor dashboard forum administration
"""
from django.test.utils import override_settings
# Need access to internal func to put users in the right group
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django_comment_common.models import Role, FORU... |
uberamd/NGECore2 | refs/heads/master | scripts/object/tangible/food/crafted/dessert_citros_snow_cake.py | 85615 | import sys
def setup(core, object):
return |
abingagl/Algorithm | refs/heads/master | 542.01Matrix.py | 1 | class Solution(object):
def updateMatrix(self, matrix):
"""
:type matrix: List[List[int]]
:rtype: List[List[int]]
"""
if not matrix:
return []
m, n = len(matrix), len(matrix[0])
queue = []
for i in range(m):
for j in range(n):
... |
nopjmp/SickRage | refs/heads/master | lib/chardet/hebrewprober.py | 53 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Shy Shalom
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#... |
cthecheese/Playground | refs/heads/master | customslider/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py | 2698 | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Unit tests for the easy_xml.py file. """
import gyp.easy_xml as easy_xml
import unittest
import StringIO
class TestSequenceFunctions(... |
VoiDeD/Sick-Beard | refs/heads/development | sickbeard/notifiers/growl.py | 16 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard 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 Lice... |
navrasio/mxnet | refs/heads/master | python/mxnet/visualization.py | 8 | # 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 u... |
zstackio/zstack-woodpecker | refs/heads/master | integrationtest/vm/mini/multiclusters/paths/multi_path164.py | 1 | import zstackwoodpecker.test_state as ts_header
import os
TestAction = ts_header.TestAction
def path():
return dict(initial_formation="template5", checking_point=1, faild_point=100000, path_list=[
[TestAction.create_mini_vm, 'vm1', 'data_volume=true', 'cluster=cluster2'],
[TestAction.create_volume, 'volume2', ... |
GladeRom/android_external_chromium_org | refs/heads/gr-3.1 | tools/telemetry/telemetry/core/backends/chrome/inspector_network.py | 43 | # Copyright 2013 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.
import logging
from telemetry.core import util
from telemetry.core.backends.chrome import timeline_recorder
from telemetry.timeline import inspector_timeline... |
VoiDeD/Sick-Beard | refs/heads/development | sickbeard/databases/__init__.py | 14 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard 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 t... |
scrapinghub/python-hubstorage | refs/heads/master | hubstorage/collectionsrt.py | 1 | import re
from requests.exceptions import HTTPError
from .resourcetype import DownloadableResource
from .serialization import MSGPACK_AVAILABLE
from .utils import urlpathjoin
COLLECTIONS_MSGPACK_REGEX = re.compile(
r"""(v?c?s) # collection type
/\w+ # collection name
(
/? ... |
jhaus/pinax | refs/heads/master | pinax/apps/signup_codes/tests/test_invite_user.py | 5 | import datetime
import os
from django.conf import settings
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.utils.hashcompat import sha_constructor
import signup_codes
from signup_codes.models import SignupCode
class InviteUserTes... |
apeyser/nest-simulator | refs/heads/master | pynest/nest/tests/test_stdp_triplet_synapse.py | 17 | # -*- coding: utf-8 -*-
#
# test_stdp_triplet_synapse.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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 t... |
berrange/nova | refs/heads/master | nova/tests/keymgr/fake.py | 110 | # Copyright 2011 Justin Santa Barbara
# Copyright 2012 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/l... |
tedder/ansible | refs/heads/devel | lib/ansible/modules/cloud/amazon/iam_managed_policy.py | 26 | #!/usr/bin/python
# Copyright: Ansible Project
# 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',
'status': ['stableinterf... |
vignanl/Plinth | refs/heads/master | plinth/modules/monkeysphere/views.py | 8 | #
# This file is part of Plinth.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distribute... |
robjohnson189/home-assistant | refs/heads/dev | homeassistant/components/notify/simplepush.py | 11 | """
Simplepush notification service.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/notify.simplepush/
"""
import logging
import requests
import voluptuous as vol
from homeassistant.components.notify import (
ATTR_TITLE, ATTR_TITLE_DEFAULT, PLATFOR... |
sjthespian/ISYlib-python | refs/heads/master | bin/isy_showevents.py | 2 | #!/usr/bin/env python
__author__ = "Peter Shipley"
import os
from ISY.IsyEvent import ISYEvent
def main() :
server = ISYEvent()
# you can subscribe to multiple devices
# server.subscribe('10.1.1.25')
server.subscribe(
addr=os.getenv('ISY_ADDR', '10.1.1.36'),
userl=os.getenv('ISY_... |
flysonic10/cloudbrain | refs/heads/master | src/cloudbrain/run.py | 1 | import json
import logging
import time
from argparse import ArgumentParser
from cloudbrain.modules.runner import ModuleRunner
class _CommandLineArgError(Exception):
""" Error parsing command-line options """
pass
class _Options(object):
"""Options returned by _parseArgs"""
def __init__(self, m... |
ubic135/odoo-design | refs/heads/master | addons/account_voucher/report/__init__.py | 378 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... |
philanthropy-u/edx-platform | refs/heads/master | common/djangoapps/student/management/commands/change_enterprise_user_username.py | 19 | # -*- coding: utf-8 -*-
"""
Django management command for changing an enterprise user's username.
"""
from __future__ import absolute_import, unicode_literals
import logging
from django.contrib.auth.models import User
from django.core.management import BaseCommand
from enterprise.models import EnterpriseCustomerUser... |
svagionitis/youtube-dl | refs/heads/master | youtube_dl/extractor/metacritic.py | 16 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
fix_xml_ampersands,
)
class MetacriticIE(InfoExtractor):
_VALID_URL = r'https?://www\.metacritic\.com/.+?/trailers/(?P<id>\d+)'
_TEST = {
'url': 'http://www.metacritic.com/game/playstation-... |
svn2github/django | refs/heads/master | django/contrib/gis/tests/test_spatialrefsys.py | 88 | from django.db import connection
from django.contrib.gis.gdal import GDAL_VERSION
from django.contrib.gis.tests.utils import no_mysql, oracle, postgis, spatialite
from django.utils import unittest
test_srs = ({'srid' : 4326,
'auth_name' : ('EPSG', True),
'auth_srid' : 4326,
'srt... |
trafi/gyp | refs/heads/master | test/win/precompiled/gyptest-all.py | 344 | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that precompiled headers can be specified.
"""
import TestGyp
import sys
if sys.platform == 'win32':
test = TestGyp.Test... |
mschmidt87/nest-simulator | refs/heads/master | pynest/examples/brunel_alpha_nest.py | 13 | # -*- coding: utf-8 -*-
#
# brunel_alpha_nest.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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 Licen... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.