repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
blaze225/zulip | refs/heads/master | zerver/webhooks/sentry/tests.py | 43 | # -*- coding: utf-8 -*-
from zerver.lib.test_classes import WebhookTestCase
class SentryHookTests(WebhookTestCase):
STREAM_NAME = 'sentry'
URL_TEMPLATE = "/api/v1/external/sentry?&api_key={api_key}"
FIXTURE_DIR_NAME = 'sentry'
def test_error_issue_message(self):
# type: () -> None
expe... |
ammarkhann/FinalSeniorCode | refs/heads/master | lib/python2.7/site-packages/cffi/setuptools_ext.py | 3 | import os
try:
basestring
except NameError:
# Python 3.x
basestring = str
def error(msg):
from distutils.errors import DistutilsSetupError
raise DistutilsSetupError(msg)
def execfile(filename, glob):
# We use execfile() (here rewritten for Python 3) instead of
# __import__() to load the ... |
leungmanhin/opencog | refs/heads/master | opencog/python/attic/freebase/quad_mapper.py | 34 | __author__ = 'keyvan&ramin'
from opencog.atomspace import AtomSpace, TruthValue
import quad_reader
DEFAULT_TV = TruthValue(1,1)
def map_from_path(quad_dump_path, atomspace):
quads = quad_reader.extract_quads(quad_dump_path)
for quad in quads:
try:
value = int(quad.value)
value... |
nectR-Tutoring/nectr | refs/heads/new_development | config/urls.py | 1 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from django.views import defaults as default_views
urlpat... |
vincentlooi/FCIS | refs/heads/master | lib/utils/symbol.py | 2 | # --------------------------------------------------------
# Fully Convolutional Instance-aware Semantic Segmentation
# Copyright (c) 2017 Microsoft
# Licensed under The Apache-2.0 License [see LICENSE for details]
# Written by Yuwen Xiong
# --------------------------------------------------------
import numpy as np
... |
prakashwaghwani/rails-vs-mean-stack | refs/heads/gh-pages | node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py | 1869 | # Copyright 2014 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.
"""A clone of the default copy.deepcopy that doesn't handle cyclic
structures or complex types except for dicts and lists. This is
because gyp copies so large structur... |
doheekim/chuizonetest | refs/heads/master | lib/wtforms/ext/sqlalchemy/validators.py | 40 | from __future__ import unicode_literals
import warnings
from wtforms import ValidationError
from sqlalchemy.orm.exc import NoResultFound
class Unique(object):
"""Checks field value unicity against specified table field.
:param get_session:
A function that return a SQAlchemy Session.
:param model:... |
ujenmr/ansible | refs/heads/devel | lib/ansible/module_utils/facts/hardware/netbsd.py | 223 | # 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 distributed in the hope that ... |
klmitch/nova | refs/heads/master | nova/tests/functional/notification_sample_tests/test_exception_notification.py | 4 | # 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
# d... |
rahul67/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/tests/fixtures_model_package/__init__.py | 45382 | |
Trixter69/BookMarka | refs/heads/master | lib/unidecode/x09e.py | 252 | data = (
'Shu ', # 0x00
'Luo ', # 0x01
'Qi ', # 0x02
'Yi ', # 0x03
'Ji ', # 0x04
'Zhe ', # 0x05
'Yu ', # 0x06
'Zhan ', # 0x07
'Ye ', # 0x08
'Yang ', # 0x09
'Pi ', # 0x0a
'Ning ', # 0x0b
'Huo ', # 0x0c
'Mi ', # 0x0d
'Ying ', # 0x0e
'Meng ', # 0x0f
'Di ', # 0x10
'Yue ', ... |
badock/nova | refs/heads/master | nova/tests/virt/test_driver.py | 26 | # Copyright (c) 2013 Citrix Systems, Inc.
# Copyright 2013 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... |
DataDog/kafka-python | refs/heads/master | kafka/protocol/group.py | 8 | from __future__ import absolute_import
from kafka.protocol.api import Request, Response
from kafka.protocol.struct import Struct
from kafka.protocol.types import Array, Bytes, Int16, Int32, Schema, String
class JoinGroupResponse_v0(Response):
API_KEY = 11
API_VERSION = 0
SCHEMA = Schema(
('error_... |
mhbu50/erpnext | refs/heads/develop | erpnext/non_profit/doctype/member/member_dashboard.py | 7 | from frappe import _
def get_data():
return {
'heatmap': True,
'heatmap_message': _('Member Activity'),
'fieldname': 'member',
'transactions': [
{
'label': _('Membership Details'),
'items': ['Membership']
}
]
} |
devs1991/test_edx_docmode | refs/heads/master | venv/lib/python2.7/site-packages/mako/parsetree.py | 39 | # mako/parsetree.py
# Copyright (C) 2006-2015 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""defines the parse tree components for Mako templates."""
from mako import exceptions, ast, u... |
opensanca/trilha-python | refs/heads/master | 03-django/ecommerce/ecom/carrinho/admin.py | 1 | from django.contrib import admin
from carrinho.models import Product
admin.site.register(Product)
|
yamahata/neutron | refs/heads/master | neutron/plugins/vmware/api_client/eventlet_client.py | 9 | # Copyright 2012 VMware, Inc.
#
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
PressLabs/cobalt | refs/heads/master | tests/unit/engine/test_engine.py | 1 | # Copyright 2016 Presslabs SRL
#
# 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,... |
ddy88958620/lib | refs/heads/master | Python/scrapy/bosch_russian_professional/__init__.py | 2 | ACCOUNT_NAME = 'Bosch Russian Professional'
|
justinsalamon/scaper | refs/heads/master | scaper/__init__.py | 1 | #!/usr/bin/env python
"""Top-level module for scaper"""
from .core import Scaper
from .core import generate_from_jams
from .core import trim
from .version import version as __version__
|
halberom/ansible | refs/heads/devel | test/units/modules/network/vyos/test_vyos_system.py | 113 | # (c) 2016 Red Hat Inc.
#
# 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 dis... |
nicememory/pie | refs/heads/master | pyglet/pyglet/window/key.py | 3 | # ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributi... |
wozio/home-system | refs/heads/dev | io-control/rules.py | 1 | #!/usr/bin/env python
import logging
import rule
import configuration
rules = {}
def init():
logging.debug("Rules init")
for r in configuration.rules:
rules[r["name"]] = rule.rule(r["name"], r["rule"], r["inputs"], r["outputs"])
def exit():
pass
|
ka2le/pepperflask-1485946909371 | refs/heads/master | naoqipythonlib/qi/path.py | 5 | from _qi import findBin, findLib, findConf, findData, listData, confPaths, \
dataPaths, binPaths, libPaths, setWritablePath, \
userWritableDataPath, userWritableConfPath, sdkPrefix
__all__ = [ "findBin",
"findLib",
"findConf",
"findData",
... |
bdh1011/wau | refs/heads/master | venv/lib/python2.7/site-packages/twisted/conch/ssh/agent.py | 10 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Implements the SSH v2 key agent protocol. This protocol is documented in the
SSH source code, in the file
U{PROTOCOL.agent<http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.agent>}.
Maintainer: Paul Swartz
"""
import struct
fr... |
mxamin/youtube-dl | refs/heads/master | youtube_dl/extractor/ministrygrid.py | 9 | from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
ExtractorError,
smuggle_url,
)
class MinistryGridIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?ministrygrid\.com/([^/?#]*/)*(?P<id>[^/#?]+)/?(?:$|[?#])'
_TEST = {
'url': 'http://www.ministr... |
lamastex/scalable-data-science | refs/heads/master | dbcArchives/2021/000_0-sds-3-x-projects/student-project-08_group-DistributedEnsemble/development/model_1.py | 1 | # Databricks notebook source
import torch
import torch.nn as nn
import torch.optim as optim
import random
#Feedforward network for classification
class MLP(nn.Module):
def __init__(self,shape):
#shape: number of neurons in each layer (including the input and output layers)
super(MLP,self).__init__()
... |
numpy/numpy | refs/heads/main | numpy/typing/tests/data/reveal/mod.py | 6 | from typing import Any
import numpy as np
f8 = np.float64()
i8 = np.int64()
u8 = np.uint64()
f4 = np.float32()
i4 = np.int32()
u4 = np.uint32()
td = np.timedelta64(0, "D")
b_ = np.bool_()
b = bool()
f = float()
i = int()
AR_b: np.ndarray[Any, np.dtype[np.bool_]]
AR_m: np.ndarray[Any, np.dtype[np.timedelta64]]
# T... |
richardotis/scipy | refs/heads/master | scipy/weave/examples/object.py | 100 | """ Attribute and method access on Python objects from C++.
Note: std::cout type operations currently crash python...
Not sure what is up with this...
"""
from __future__ import absolute_import, print_function
import scipy.weave as weave
#----------------------------------------------------------------... |
netroby/vitess | refs/heads/master | test/mysqlctl.py | 8 | #!/usr/bin/env python
import warnings
# Dropping a table inexplicably produces a warning despite
# the "IF EXISTS" clause. Squelch these warnings.
warnings.simplefilter("ignore")
import os
import logging
import unittest
import environment
import utils
import tablet
master_tablet = tablet.Tablet()
replica_tablet = t... |
inovtec-solutions/OpenERP | refs/heads/branch_openerp | openerp/addons/base_report_designer/wizard/__init__.py | 421 | # -*- 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... |
arrabito/DIRAC | refs/heads/integration | Resources/MessageQueue/MQCommunication.py | 3 | """ General Message Queue Interface to create Consumers and Producers
"""
__RCSID__ = "$Id$"
from DIRAC import gLogger, S_OK
from DIRAC.Resources.MessageQueue.MQProducer import MQProducer
from DIRAC.Resources.MessageQueue.MQConsumer import MQConsumer
from DIRAC.Resources.MessageQueue.MQConnectionManager import MQConn... |
krieger-od/nwjs_chromium.src | refs/heads/master | build/android/pylib/gtest/gtest_test_instance.py | 9 | # 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 logging
import os
import re
import shutil
import sys
from pylib import constants
from pylib.base import base_test_result
from pylib.base import test_... |
sassoftware/conary | refs/heads/master | conary/cmds/updatecmd.py | 1 | #
# Copyright (c) SAS Institute 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 w... |
HousekeepLtd/django | refs/heads/master | django/conf/locale/de_CH/formats.py | 504 | # -*- 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
from __future__ import unicode_literals
DATE_FORMAT = 'j. F Y'
TIME_FORMAT = 'H:i'
DATE... |
botswana-harvard/edc-map | refs/heads/develop | edc_map/admin_site.py | 1 | from django.contrib.admin import AdminSite
class EdcMapAdminSite(AdminSite):
site_title = 'Edc Map'
site_header = 'Edc Map'
index_title = 'Edc Map'
site_url = '/'
edc_map_admin = EdcMapAdminSite(name='edc_map_admin')
|
qilicun/python | refs/heads/master | python2/PyMOTW-1.132/PyMOTW/optparse/optparse_version.py | 1 | #!/usr/bin/env python
#
# Copyright 2007 Doug Hellmann.
"""Explicit usage message
"""
#end_pymotw_header
import optparse
parser = optparse.OptionParser(usage='%prog [options] <arg1> <arg2> [<arg3>...]',
version='1.0',
)
parser.parse_args()
|
sgerhart/ansible | refs/heads/maintenance_policy_module | contrib/inventory/openshift.py | 42 | #!/usr/bin/env python
# (c) 2013, Michael Scherer <misc@zarb.org>
#
# 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 o... |
rayantony/three.js | refs/heads/master | utils/converters/msgpack/msgpack/_version.py | 648 | version = (0, 4, 2)
|
cccfran/sympy | refs/heads/master | sympy/physics/optics/tests/test_utils.py | 15 | from __future__ import division
from sympy.physics.optics.utils import (refraction_angle, deviation,
lens_makers_formula, mirror_formula, lens_formula)
from sympy.physics.optics.medium import Medium
from sympy.physics.units import e0
from sympy import symbols, sqrt, Matrix, oo
from sympy.geometry.point3d import P... |
wzb56/Sparkngin | refs/heads/master | adapters/zmq2kafka-streamer/test/zmq-push.py | 2 | #!/usr/bin/python
import zmq
import time
if __name__ == "__main__":
context = zmq.Context()
push = context.socket(zmq.PUSH)
push.bind("tcp://0:5555")
for n in xrange(100):
msg = "Pushmsg %d" % n
push.send(msg)
#time.sleep(0.5)
time.sleep(1) # Time to flush
|
filias/django | refs/heads/master | tests/admin_changelist/urls.py | 810 | from django.conf.urls import url
from . import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
]
|
rickmendes/ansible-modules-extras | refs/heads/devel | cloud/openstack/os_port_facts.py | 31 | #!/usr/bin/python
# Copyright (c) 2016 IBM
#
# This module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This software is distri... |
e1ven/Waymoot | refs/heads/master | libs/tornado-2.2/build/lib/tornado/platform/posix.py | 11 | #!/usr/bin/env python
#
# Copyright 2011 Facebook
#
# 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... |
Chilledheart/chromium | refs/heads/master | tools/telemetry/third_party/gsutilz/third_party/oauth2client/oauth2client/old_run.py | 52 | # Copyright 2014 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 ... |
tonningp/spritewalker | refs/heads/master | assets/space/ch09/carVec.py | 1 | """ carVec.py
Use vector projection to create a smoothly-turning
car sprite.
"""
import pygame, math
pygame.init()
class Car(pygame.sprite.Sprite):
def __init__(self, screen):
pygame.sprite.Sprite.__init__(self)
self.screen = screen
self.imageMaster = pygame.image.load(... |
Frostman/eho-horizon | refs/heads/master | openstack_dashboard/dashboards/admin/instances/panel.py | 19 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... |
elkingtonmcb/django | refs/heads/master | tests/user_commands/management/commands/dance.py | 314 | from django.core.management.base import BaseCommand, CommandError
class Command(BaseCommand):
help = "Dance around like a madman."
args = ''
requires_system_checks = True
def add_arguments(self, parser):
parser.add_argument("-s", "--style", default="Rock'n'Roll")
parser.add_argument("... |
kuiwei/kuiwei | refs/heads/master | lms/djangoapps/instructor_analytics/tests/test_basic.py | 12 | """
Tests for instructor.basic
"""
from django.test import TestCase
from student.models import CourseEnrollment
from student.tests.factories import UserFactory
from opaque_keys.edx.locations import SlashSeparatedCourseKey
from shoppingcart.models import CourseRegistrationCode, RegistrationCodeRedemption, Order
from i... |
Lekanich/intellij-community | refs/heads/master | python/testData/mover/commentOut_afterDown.py | 83 | if True:
a = 1
else:
a = 2
#comment <caret>
|
kchodorow/bazel-1 | refs/heads/master | third_party/py/mock/tests/testsentinel.py | 111 | # Copyright (C) 2007-2012 Michael Foord & the mock team
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# http://www.voidspace.org.uk/python/mock/
from tests.support import unittest2
from mock import sentinel, DEFAULT
class SentinelTest(unittest2.TestCase):
def testSentinels(self):
self.assertEqual(sent... |
iamhuy/rumour-veracity-verification | refs/heads/master | settings.py | 1 | import os
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
DATA_RAW_ROOT = os.path.join(PROJECT_ROOT, 'data', 'raw')
DATA_INTERIM_ROOT = os.path.join(PROJECT_ROOT, 'data', 'interim')
DATA_PROCESSED_ROOT = os.path.join(PROJECT_ROOT, 'data', 'processed')
DATA_EXTERNAL_ROOT = os.path.join(PROJECT_ROOT, 'data', 'e... |
danny1173/TriCoin | refs/heads/master | share/qt/make_spinner.py | 4415 | #!/usr/bin/env python
# W.J. van der Laan, 2011
# Make spinning .mng animation from a .png
# Requires imagemagick 6.7+
from __future__ import division
from os import path
from PIL import Image
from subprocess import Popen
SRC='img/reload_scaled.png'
DST='../../src/qt/res/movies/update_spinner.mng'
TMPDIR='/tmp'
TMPNAM... |
diegoguimaraes/django | refs/heads/master | tests/admin_scripts/app_raising_warning/models.py | 391 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core import checks
from django.db import models
class ModelRaisingMessages(models.Model):
@classmethod
def check(self, **kwargs):
return [
checks.Warning(
'A warning',
hint=None,
... |
mmbtba/odoo | refs/heads/8.0 | addons/portal_project/__init__.py | 438 | # -*- 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... |
lino-framework/xl | refs/heads/master | lino_xl/lib/excerpts/__init__.py | 1 | # Copyright 2013-2019 Rumma & Ko Ltd
# License: GNU Affero General Public License v3 (see file COPYING for details)
"""
Provides a framework for configuring and generating printable
documents called "database excerpts".
See also :doc:`/specs/excerpts`.
.. autosummary::
:toctree:
roles
doctools
fixtures.... |
wyq200704/ardupilot | refs/heads/master | Tools/LogAnalyzer/tests/TestDualGyroDrift.py | 273 | from LogAnalyzer import Test,TestResult
import DataflashLog
# import scipy
# import pylab #### TEMP!!! only for dev
# from scipy import signal
class TestDualGyroDrift(Test):
'''test for gyro drift between dual IMU data'''
def __init__(self):
Test.__init__(self)
self.name = "Gyro Drift"
self.enable = Fals... |
devendermishrajio/nova_test_latest | refs/heads/master | nova/tests/unit/api/openstack/compute/contrib/test_image_size.py | 63 | # Copyright 2013 Rackspace Hosting
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... |
QinerTech/QinerApps | refs/heads/master | openerp/addons/website_forum_doc/controllers/__init__.py | 4497 | # -*- coding: utf-8 -*-
import main
|
zhangfangyan/devide | refs/heads/master | modules/viewers/SkeletonAUIViewerFrame.py | 7 | # Copyright (c) Charl P. Botha, TU Delft.
# All rights reserved.
# See COPYRIGHT for details.
import cStringIO
from vtk.wx.wxVTKRenderWindowInteractor import wxVTKRenderWindowInteractor
import wx
# wxPython 2.8.8.1 wx.aui bugs severely on GTK. See:
# http://trac.wxwidgets.org/ticket/9716
# Until this is fixed, use th... |
Djabbz/scikit-learn | refs/heads/master | examples/svm/plot_oneclass.py | 249 | """
==========================================
One-class SVM with non-linear kernel (RBF)
==========================================
An example using a one-class SVM for novelty detection.
:ref:`One-class SVM <svm_outlier_detection>` is an unsupervised
algorithm that learns a decision function for novelty detection:
... |
Rafeh01/data-science-toolbox | refs/heads/master | manager/dst/dst.py | 6 | #!/usr/bin/env python
"""usage: dst [--version] [--help]
<command> [<args>...]
options:
-v, --version Print the version and exit
-h, --help Print this help
Available commands:
add Add a bundle
info Print bundle information
list List all available bundles... |
Hateman31/wotreplays-RD | refs/heads/slides | spider.py | 2 | import os
import requests as r
from bs4 import BeautifulSoup as bs
class ConnectionError(r.exceptions.ConnectionError):
pass
class Site:
def __init__(self,url):
self.url = url
self.page = 1
self.max_page_number = 0
self.html = None
self.openPage()
def openPage(self):
#Если загрузка упала - вернуть ... |
BellScurry/gem5-fault-injection | refs/heads/master | src/arch/x86/isa/insts/simd64/integer/data_transfer/move_non_temporal.py | 88 | # 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... |
rysson/filmkodi | refs/heads/master | plugin.video.fanfilm/resources/lib/resolvers/promptfile.py | 2 | # -*- coding: utf-8 -*-
'''
FanFilm Add-on
Copyright (C) 2015 lambda
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any ... |
nugget/home-assistant | refs/heads/dev | homeassistant/components/google/calendar.py | 2 | """Support for Google Calendar Search binary sensors."""
import logging
from datetime import timedelta
from homeassistant.components.calendar import CalendarEventDevice
from homeassistant.components.google import (
CONF_CAL_ID, CONF_ENTITIES, CONF_TRACK, TOKEN_FILE,
CONF_IGNORE_AVAILABILITY, CONF_SEARCH,
G... |
Andrew-Katcha/storyteller | refs/heads/master | env/lib/python3.4/site-packages/pip/exceptions.py | 344 | """Exceptions used throughout package"""
from __future__ import absolute_import
from itertools import chain, groupby, repeat
from pip._vendor.six import iteritems
class PipError(Exception):
"""Base pip exception"""
class InstallationError(PipError):
"""General exception during installation"""
class Unin... |
DaniilLeksin/theblog | refs/heads/master | env/lib/python2.7/site-packages/django/utils/dates.py | 115 | "Commonly-used date structures"
from django.utils.translation import ugettext_lazy as _, pgettext_lazy
WEEKDAYS = {
0: _('Monday'), 1: _('Tuesday'), 2: _('Wednesday'), 3: _('Thursday'), 4: _('Friday'),
5: _('Saturday'), 6: _('Sunday')
}
WEEKDAYS_ABBR = {
0: _('Mon'), 1: _('Tue'), 2: _('Wed'), 3: _('Thu'),... |
tiborsimko/invenio-testing | refs/heads/master | docs/_ext/ultramock.py | 164 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015 CERN.
#
# Invenio 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... |
Harunx9/2DXngine | refs/heads/master | thirdparty/googletest/googlemock/scripts/gmock_doctor.py | 346 | #!/usr/bin/env python
#
# Copyright 2008, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... |
felipebetancur/metagoofil | refs/heads/master | hachoir_core/field/character.py | 74 | """
Character field class: a 8-bit character
"""
from hachoir_core.field import Bits
from hachoir_core.endian import BIG_ENDIAN
from hachoir_core.tools import makePrintable
class Character(Bits):
"""
A 8-bit character using ASCII charset for display attribute.
"""
static_size = 8
def __init__(sel... |
mhnatiuk/phd_sociology_of_religion | refs/heads/master | scrapper/build/Twisted/twisted/manhole/test/__init__.py | 52 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.manhole}.
"""
|
eleme/ruskit | refs/heads/master | ruskit/cmds/manage.py | 1 | # -*- coding: utf-8 -*-
import datetime
import redis
import pprint
from ruskit import cli
from ..cluster import Cluster, ClusterNode
from ..utils import echo
from ..distribute import print_cluster, gen_distribution
from ..utils import timeout_argument
from ..health import HealthCheckManager
@cli.command
@cli.argume... |
mozilla/verbatim | refs/heads/master | vendor/lib/python/translate/lang/hy.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2007-2008, 2011 Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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 ver... |
douggeiger/gnuradio | refs/heads/master | gr-blocks/python/blocks/qa_udp_source_sink.py | 40 | #!/usr/bin/env python
#
# Copyright 2008,2010,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your ... |
40223249-1/2015cd_midterm | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/http/__init__.py | 1383 | # This directory is a Python package.
|
crepererum/invenio | refs/heads/master | invenio/modules/indexer/tokenizers/BibIndexDOITokenizer.py | 12 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2013, 2015 CERN.
#
# Invenio 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... |
amunozf/legibilidad | refs/heads/master | legibilidad.py | 1 | # Legibilidad 2 (beta)
# Averigua la legibilidad de un texto
# Spanish readability calculations
# © 2016 Alejandro Muñoz Fernández
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 ... |
graik/biskit | refs/heads/master | biskit/core/scientificIO/__init__.py | 1 | """
This sub-package has been ripped out of the Scientific Python Package written
by Konrad Hinsen. Its sole purpose is low-level PDB parsing and writing. This
allows us to remove all dependencies on numpy-oldnumeric.
"""
|
sanguinariojoe/FreeCAD | refs/heads/master | src/Mod/Fem/femsolver/writerbase.py | 12 | # ***************************************************************************
# * Copyright (c) 2016 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
mrquim/repository.mrquim | refs/heads/master | repo/plugin.video.mrpiracy/resources/lib/js2py/legecy_translators/tokenize.py | 101 | from jsparser import *
from utils import *
# maybe I will try rewriting my parser in the future... Tokenizer makes things much easier and faster, unfortunately I
# did not know anything about parsers when I was starting this project so I invented my own.
|
jwren/intellij-community | refs/heads/master | python/testData/inspections/PyAbstractClassInspection/quickFix/SetImportedABCMetaAsMetaclassPy3/main.py | 17 | from abc import ABCMeta, abstractmethod
class A1(metaclass=ABCMeta):
@abstractmethod
def m1(self):
pass
class A<caret>2(A1):
pass |
microcosm-cc/microweb | refs/heads/master | fabfile.py | 1 | import os
from fabric.api import env
from fabric.api import sudo
from fabric.api import prefix
from fabric.contrib.project import rsync_project
from fabric.context_managers import settings
from contextlib import contextmanager
env.hosts = []
env.serve_root = '/srv/www/django'
env.project_name = 'microweb'
env.virt... |
DavidAndreev/indico | refs/heads/devel | indico/modules/attachments/api/hooks.py | 2 | # This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico 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... |
torquemad/pixelated-user-agent | refs/heads/master | service/pixelated/bitmask_libraries/certs.py | 8 | #
# Copyright (c) 2014 ThoughtWorks, Inc.
#
# Pixelated 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.
#
# Pixelated is distrib... |
jeremiahyan/odoo | refs/heads/master | addons/hr_expense/models/hr_department.py | 66 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class HrDepartment(models.Model):
_inherit = 'hr.department'
def _compute_expense_sheets_to_approve(self):
expense_sheet_data = self.env['hr.expense.sheet'].read_group([... |
docker-infra/ansible-modules-core | refs/heads/devel | system/sysctl.py | 105 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, David "DaviXX" CHANIAL <david.chanial@gmail.com>
# (c) 2014, James Tanner <tanner.jc@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 ... |
Caylo/easybuild-framework | refs/heads/master | test/framework/asyncprocess.py | 3 | ##
# Copyright 2012-2016 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... |
rcook/DesignLab | refs/heads/master | app/src/processing/app/i18n/python/requests/packages/__init__.py | 1849 | from __future__ import absolute_import
from . import urllib3
|
Yuriy-Leonov/nova | refs/heads/master | nova/virt/hyperv/vmutilsv2.py | 8 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 Cloudbase Solutions Srl
# 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.ap... |
alex/pinax | refs/heads/master | pinax/fixtures/generate/gen_auth.py | 4 | import random
from django.contrib.auth.models import User
names = """Jacob Emily Michael Emma Joshua Madison Ethan Isabella Matthew Ava
Daniel Abigail Christopher Olivia Andrew Hannah Anthony Sophia William
Samantha Joseph Elizabeth Alexander Ashley David Mia Ryan Alexis Noah
Sarah James Natalie Nicholas Grace Tyler C... |
bwrsandman/OpenUpgrade | refs/heads/8.0 | openerp/addons/test_new_api/tests/test_new_fields.py | 69 | #
# test cases for new-style fields
#
from datetime import date, datetime
from collections import defaultdict
from openerp.tests import common
from openerp.exceptions import except_orm
class TestNewFields(common.TransactionCase):
def test_00_basics(self):
""" test accessing new fields """
# find... |
acsone/connector | refs/heads/8.0 | connector/deprecate.py | 18 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... |
vivekanand1101/anitya | refs/heads/master | anitya/lib/backends/github.py | 2 | # -*- coding: utf-8 -*-
"""
(c) 2014 - Copyright Red Hat Inc
Authors:
Pierre-Yves Chibon <pingou@pingoured.fr>
"""
from anitya.lib.backends import BaseBackend, get_versions_by_regex
from anitya.lib.exceptions import AnityaPluginException
REGEX = b'class="tag-name">([^<]*)</span'
class GithubBackend(BaseBac... |
frankiecjunle/yunblog | refs/heads/master | venv/lib/python2.7/site-packages/werkzeug/contrib/wrappers.py | 77 | # -*- coding: utf-8 -*-
"""
werkzeug.contrib.wrappers
~~~~~~~~~~~~~~~~~~~~~~~~~
Extra wrappers or mixins contributed by the community. These wrappers can
be mixed in into request objects to add extra functionality.
Example::
from werkzeug.wrappers import Request as RequestBase
fr... |
hoh/reloadr | refs/heads/master | examples/03_function.py | 1 |
from time import sleep
from reloadr import reloadr
@reloadr
def move(car, dx=0, dy=0):
car.x += dx
car.y += dy
class Car:
x = 0
y = 0
def __init__(self, x=0, y=0):
self.x = x
self.y = y
def position(self):
return 'Car on {} {}'.format(self.x, self.y)
car = Car(10... |
edx/edx-analytics-data-api-client | refs/heads/master | analyticsclient/engagement_timeline.py | 1 | from urllib.parse import urlencode
from analyticsclient.base import PostableCourseIDsEndpoint
from analyticsclient.constants import data_formats
class EngagementTimeline(PostableCourseIDsEndpoint):
"""Engagement Timeline."""
def __init__(self, client, username, course_id):
"""
Initialize the... |
NetApp/cinder | refs/heads/master | cinder/api/views/manageable_volumes.py | 13 | # Copyright (c) 2016 Stratoscale, 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 applicable law or... |
prabodhprakash/problemsolving | refs/heads/master | spoj/MMAXPER.py | 1 | import math
import sys
sys.stdin = open('input.txt', 'r')
dp = {}
def calculate_maximum_area(index, old_width, old_height):
if index == 0:
return max(w[0], h[0])
width = w[index]
height = h[index]
key = str(index) + str(height) + str(width)
if dp.get(key) is not None:
return dp.get(key)
index -= 1
... |
toshywoshy/ansible | refs/heads/devel | test/units/modules/network/fortios/test_fortios_switch_controller_storm_control.py | 21 | # Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.