repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
xaviercobain88/framework-python | refs/heads/master | build/lib.linux-i686-2.7/openerp/addons/hr_evaluation/report/__init__.py | 441 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the G... |
Parrot-Developers/alchemy | refs/heads/master | scripts/findfiles.py | 1 | #!/usr/bin/env python3
import sys, os
import argparse
#===============================================================================
# Process a directory.
#===============================================================================
def processDir(resultList, topDir, fileName, options):
sys.stderr.write("Sc... |
lduarte1991/edx-platform | refs/heads/master | lms/djangoapps/discussion_api/render.py | 168 | """
Content rendering functionality
Note that this module is designed to imitate the front end behavior as
implemented in Markdown.Sanitizer.js.
"""
import re
import markdown
# These patterns could be more flexible about things like attributes and
# whitespace, but this is imitating Markdown.Sanitizer.js, so it uses... |
rmnl/htg | refs/heads/develop | htg/commands/config.py | 1 | # -*- coding: utf8 -*-
import click
from ..classes import Config
from ..classes import HTGConfigError
from ..utils import fatal_error
from ..utils.aliased_group import AliasedGroup
@click.group(
cls=AliasedGroup,
help="Create and check your config file",
epilog="Use \"htg config COMMAND --help\" for hel... |
vmendez/DIRAC | refs/heads/integration | AccountingSystem/private/Plotters/WMSHistoryPlotter.py | 19 |
from DIRAC import S_OK, S_ERROR
from DIRAC.AccountingSystem.Client.Types.WMSHistory import WMSHistory
from DIRAC.AccountingSystem.private.Plotters.BaseReporter import BaseReporter
class WMSHistoryPlotter( BaseReporter ):
_typeName = "WMSHistory"
_typeKeyFields = [ dF[0] for dF in WMSHistory().definitionKeyFields... |
Soya93/Extract-Refactoring | refs/heads/master | python/helpers/py3only/docutils/parsers/rst/directives/admonitions.py | 44 | # $Id: admonitions.py 7681 2013-07-12 07:52:27Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
Admonition directives.
"""
__docformat__ = 'reStructuredText'
from docutils import nodes
from docutils.parsers.rst import Directive
from docutils.par... |
martinbarnard/beebRecipeParser | refs/heads/master | languages/es.py | 80 | # -*- coding: utf-8 -*-
{
'!langcode!': 'es',
'!langname!': 'Español',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"actualice" es una expresión opcional como "campo1=\'nuevo_valor\'". No se puede actualizar o eliminar resultados de un JOIN',
'%(nr... |
durandj/mymcadmin | refs/heads/master | tests/utils/decorators.py | 1 | """
Utility decorators for tests
"""
import asyncio
import functools
import unittest.mock
def run_async(func):
"""
Allow a unit test to be run as a coroutine. Note that this expects to be
used with the EventLoopMixin
"""
if not asyncio.iscoroutinefunction(func):
raise RuntimeError('Test f... |
drweaver/py_garage_server | refs/heads/master | garage_config.py | 1 | import json
import logging
import threading
from os.path import dirname, join
logger = logging.getLogger('garage_config')
class GarageConfig():
door_switch_enabled='door_switch_enabled'
notify_enabled='notify_enabled'
port='port'
client_id='client_id'
authorised='authorised'
smtp_server='smtp_s... |
mrloam/informatic | refs/heads/master | informatic/sourcectl.py | 1 | #!/usr/bin/env python3
# coding: utf-8
# Copyright (c) 2015-2017 Dominic Delabruere
"""
The sourcectl module contains the SourceCtl widget for editing Inform 6
source files and associated code.
"""
from PyQt5.Qsci import QsciScintilla
import os.path
from .lexer import InformLexer
# These lists may come in handy whe... |
sadmansk/servo | refs/heads/master | tests/wpt/web-platform-tests/xhr/resources/access-control-basic-preflight-cache-timeout.py | 46 | def main(request, response):
def fail(message):
response.content = "FAIL " + request.method + ": " + str(message)
def getState(token):
server_state = request.server.stash.take(token)
if not server_state:
return "Uninitialized"
return server_state
def setState(st... |
baxeico/i18n-tools | refs/heads/master | tests/test_config.py | 1 | import os
from unittest import TestCase
from i18n import config
class TestConfiguration(TestCase):
"""
Tests functionality of i18n/config.py
"""
def test_config(self):
config_filename = os.path.normpath(os.path.join('tests', 'data', 'config.yaml'))
cfg = config.Configuration(config_f... |
0x0all/scikit-learn | refs/heads/master | examples/semi_supervised/plot_label_propagation_digits_active_learning.py | 294 | """
========================================
Label Propagation digits active learning
========================================
Demonstrates an active learning technique to learn handwritten digits
using label propagation.
We start by training a label propagation model with only 10 labeled points,
then we select the t... |
learningequality/ricecooker | refs/heads/master | ricecooker/__init__.py | 1 | # -*- coding: utf-8 -*-
__author__ = 'Learning Equality'
__email__ = 'jordan@learningequality.org'
__version__ = '0.6.46'
import sys
if sys.version_info < (3, 5, 0):
raise RuntimeError("Ricecooker only supports Python 3.5+")
|
uwafsl/MissionPlanner | refs/heads/master | Lib/lib2to3/fixes/fix_types.py | 57 | # Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Fixer for removing uses of the types module.
These work for only the known names in the types module. The forms above
can include types. or not. ie, It is assumed the module is imported either as:
imp... |
zooba/PTVS | refs/heads/master | Python/Product/Miniconda/Miniconda3-x64/Lib/distutils/command/sdist.py | 11 | """distutils.command.sdist
Implements the Distutils 'sdist' command (create a source distribution)."""
import os
import sys
from glob import glob
from warnings import warn
from distutils.core import Command
from distutils import dir_util
from distutils import file_util
from distutils import archive_util
from distuti... |
lumig242/Hue-Integration-with-CDAP | refs/heads/pull3 | desktop/core/ext-py/Django-1.6.10/django/contrib/gis/db/backends/postgis/operations.py | 108 | import re
from decimal import Decimal
from django.conf import settings
from django.contrib.gis.db.backends.base import BaseSpatialOperations
from django.contrib.gis.db.backends.util import SpatialOperation, SpatialFunction
from django.contrib.gis.db.backends.postgis.adapter import PostGISAdapter
from django.contrib.gi... |
agry/NGECore2 | refs/heads/master | scripts/object/tangible/collection/col_tatooine_vistas_marker_05.py | 85615 | import sys
def setup(core, object):
return |
Netflix/lemur | refs/heads/master | lemur/plugins/lemur_aws/sts.py | 1 | """
.. module: lemur.plugins.lemur_aws.sts
:platform: Unix
:copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
"""
from functools import wraps
import boto3
from botocore.config import Config
from ... |
SonamYeshe/AStarPathPlanning | refs/heads/master | vendor/googletest/googletest/scripts/upload.py | 2511 | #!/usr/bin/env python
#
# Copyright 2007 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 o... |
odoousers2014/addons-yelizariev | refs/heads/8.0 | ir_sequence_autoreset/__init__.py | 17 | # -*- coding: utf-8 -*-
##############################################################################
#
# Auto reset sequence by year,month,day
# Copyright 2013 wangbuke <wangbuke@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Gene... |
FunctionalX/FunctionalX.py | refs/heads/master | FunctionalX/tests/_dashed_line.py | 1 | def dashed_line(length: int, symbol: str="=") -> str:
"""Print out a dashed line
To be used as visual boundaries for tests.
Args:
length (int): number of charters
symbol (str): symbol to be used in the dashed line
default: "="
Returns:
a... |
kwailamchan/programming-languages | refs/heads/master | cpp/deeplearning/caffe/python/caffe/test/test_python_layer_with_param_str.py | 34 | import unittest
import tempfile
import os
import six
import caffe
class SimpleParamLayer(caffe.Layer):
"""A layer that just multiplies by the numeric value of its param string"""
def setup(self, bottom, top):
try:
self.value = float(self.param_str)
except ValueError:
... |
baylee-d/osf.io | refs/heads/develop | osf/migrations/0182_add_custom_file_versions_through.py | 9 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2019-04-07 23:20
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('osf', '0181_osfuser_contacted_deactivation'),
]
o... |
SteveHNH/ansible | refs/heads/devel | test/runner/lib/changes.py | 66 | """Detect changes in Ansible code."""
from __future__ import absolute_import, print_function
import re
import os
from lib.util import (
ApplicationError,
SubprocessError,
MissingEnvironmentVariable,
CommonConfig,
display,
)
from lib.http import (
HttpClient,
urlencode,
)
from lib.git im... |
jjmleiro/hue | refs/heads/master | apps/impala/src/impala/dbms.py | 6 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... |
rbailhac/AliPhysics | refs/heads/master | PWGJE/EMCALJetTasks/Tracks/analysis/base/struct/DataContainerFactory.py | 41 | #**************************************************************************
#* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
#* *
#* Author: The ALICE Off-line Project. *
#* Contributors ... |
MingdaZhou/gnuradio | refs/heads/master | grc/base/Port.py | 16 | """
Copyright 2008-2011 Free Software Foundation, Inc.
This file is part of GNU Radio
GNU Radio Companion 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 l... |
uberamd/NGECore2 | refs/heads/master | scripts/object/tangible/sign/streetsign_wall_style_01.py | 85615 | import sys
def setup(core, object):
return |
uberamd/NGECore2 | refs/heads/master | scripts/object/mobile/giant_peko_peko.py | 85615 | import sys
def setup(core, object):
return |
webostin/django-btc | refs/heads/master | tests/proxy_model_inheritance/app2/models.py | 736 | from django.db import models
class NiceModel(models.Model):
pass
|
openspending/spendb | refs/heads/master | spendb/migrate/env.py | 5 | from __future__ import with_statement
from alembic import context
from sqlalchemy import engine_from_config, pool
from flask import current_app
from spendb.core import db
from spendb.model import * # noqa
config = context.config
config.set_main_option('sqlalchemy.url',
current_app.config['SQLAL... |
alfasin/st2 | refs/heads/master | st2common/tests/unit/test_persistence.py | 4 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... |
Xeralux/tensorflow | refs/heads/master | tensorflow/contrib/labeled_tensor/__init__.py | 144 | # 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... |
shockwavefraz/CEM | refs/heads/master | trunk/External_Libraries/googletest/googletest/scripts/release_docs.py | 1167 | #!/usr/bin/env python
#
# Copyright 2013 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 of... |
pgodel/rdiff-backup | refs/heads/master | rdiff_backup/restore.py | 6 | # Copyright 2002, 2003, 2004, 2005 Ben Escoto
#
# This file is part of rdiff-backup.
#
# rdiff-backup is free software; you can redistribute it and/or modify
# 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 lat... |
ahoyosid/scikit-learn | refs/heads/master | doc/datasets/labeled_faces_fixture.py | 330 | """Fixture module to skip the datasets loading when offline
Doctests are skipped if the datasets have not already been dowloaded
and cached in the past.
"""
from os.path import exists
from os.path import join
from nose import SkipTest
from sklearn.datasets import get_data_home
def setup_module(module):
data_home... |
ridfrustum/lettuce | refs/heads/master | tests/integration/lib/Django-1.2.5/tests/regressiontests/urlpatterns_reverse/included_urls2.py | 109 | """
These URL patterns are included in two different ways in the main urls.py, with
an extra argument present in one case. Thus, there are two different ways for
each name to resolve and Django must distinguish the possibilities based on the
argument list.
"""
from django.conf.urls.defaults import *
from views import ... |
Evervolv/android_external_chromium_org | refs/heads/kitkat | tools/telemetry/telemetry/page/page_runner.py | 23 | # Copyright (c) 2012 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 collections
import glob
import logging
import os
import sys
import tempfile
import time
import traceback
import random
from telemetry.core import ... |
Random-Liu/kubernetes | refs/heads/master | third_party/htpasswd/htpasswd.py | 897 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008-2013 Edgewall Software
# Copyright (C) 2008 Eli Carter
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.edge... |
cloudbase/cinder | refs/heads/master | cinder/tests/unit/volume/drivers/test_sheepdog.py | 4 |
# Copyright (c) 2013 Zelin.io
# Copyright (C) 2015 Nippon Telegraph and Telephone Corporation.
# 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
#
# htt... |
Stlimp/gekko | refs/heads/master | vendor/imagine/imagine/docs/conf.py | 218 | # -*- coding: utf-8 -*-
#
# Imagine documentation build configuration file, created by
# sphinx-quickstart on Wed Apr 6 00:20:22 2011.
#
# 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.
#
# All... |
dimroc/tensorflow-mnist-tutorial | refs/heads/master | lib/python3.6/site-packages/numpy/testing/print_coercion_tables.py | 189 | #!/usr/bin/env python
"""Prints type-coercion tables for the built-in NumPy types
"""
from __future__ import division, absolute_import, print_function
import numpy as np
# Generic object that can be added, but doesn't do anything else
class GenericObject(object):
def __init__(self, v):
self.v = v
de... |
jelugbo/hebs_repo | refs/heads/master | common/test/acceptance/pages/lms/course_info.py | 205 | """
Course info page.
"""
from .course_page import CoursePage
class CourseInfoPage(CoursePage):
"""
Course info.
"""
url_path = "info"
def is_browser_on_page(self):
return self.q(css='section.updates').present
@property
def num_updates(self):
"""
Return the numb... |
DefyVentures/edx-platform | refs/heads/master | common/test/acceptance/pages/lms/peer_grade.py | 206 | """
Students grade peer submissions.
"""
from bok_choy.page_object import PageObject
from bok_choy.promise import Promise
from .rubric import RubricPage
class PeerGradePage(PageObject):
"""
Students grade peer submissions.
"""
url = None
def is_browser_on_page(self):
def _is_correct_pag... |
jrafidi/Dragon-Riding | refs/heads/master | myo/MyoModel.py | 1 | import myo
import math
class Pose():
def __init__(self, pose, time):
self.pose = pose
self.time = time
class MyoModel(myo.DeviceListener):
def __init__(self):
self.gyro = []
self.accel = []
self.orientation = []
self.lastPose = None
def on_connect(self, myo, timestamp):
... |
pradeepnazareth/NS-3-begining | refs/heads/master | src/topology-read/bindings/modulegen__gcc_LP64.py | 28 | 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))
... |
kotishe/temp | refs/heads/Atlantis-master | contrib/mmap/mmap_extract.py | 34 | #!/usr/bin/python
"""
Copyright (C) 2005-2012 MaNGOS <http://getmangos.com/>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later ... |
shaufi/odoo | refs/heads/8.0 | addons/auth_signup/res_config.py | 445 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... |
fidals/refarm-site | refs/heads/master | images/migrations/0005_auto_20170317_1457.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-03-17 14:57
from __future__ import unicode_literals
import sorl.thumbnail.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('images', '0004_auto_20170124_1444'),
]
operations = [
... |
weaselkeeper/ansible | refs/heads/devel | contrib/inventory/vbox.py | 108 | #!/usr/bin/env 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... |
chrisidefix/devide | refs/heads/master | modules/vtk_basic/vtkExtractVOI.py | 7 | # class generated by DeVIDE::createDeVIDEModuleFromVTKObject
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase
import vtk
class vtkExtractVOI(SimpleVTKClassModuleBase):
def __init__(self, module_manager):
SimpleVTKClassModuleBase.__init__(
self, module_manager,
vtk.vtk... |
fsantini/python-e3dc | refs/heads/master | e3dc/_e3dc.py | 1 | #!/usr/bin/env python
# Python class to connect to an E3/DC system through the internet portal
#
# Copyright 2017 Francesco Santini <francesco.santini@gmail.com>
# Licensed under a MIT license. See LICENSE for details
import requests
import hashlib
import time
import dateutil.parser
import datetime
import json
import ... |
kthordarson/CouchPotatoServer | refs/heads/master | couchpotato/core/media/_base/providers/info/base.py | 81 | from couchpotato.core.media._base.providers.base import Provider
class BaseInfoProvider(Provider):
type = 'unknown'
|
Monsho/D3D12Samples | refs/heads/master | resources/data/aces_1.0.3/python/aces_ocio/colorspaces/aces.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Implements support for *ACES* colorspaces conversions and transfer functions.
"""
from __future__ import division
import copy
import math
import numpy
import os
import pprint
import shutil
import PyOpenColorIO as ocio
from aces_ocio.generate_lut import (
genera... |
beheadedmyway/gity | refs/heads/master | python/fetchremotebranch.py | 2 | # Copyright Aaron Smith 2009
#
# This file is part of Gity.
#
# Gity 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.
#
# Gity is dis... |
aakso/smarthome | refs/heads/master | plugins/ebus/__init__.py | 12 | #!/usr/bin/env python3
# vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab
#
# Copyright 2012-2013 KNX-User-Forum e.V. http://knx-user-forum.de/
#
# This file is part of SmartHome.py. http://mknx.github.io/smarthome/
#
# SmartHome.py is free software: you can redistribute it and/or modif... |
vguerci/Deluge.app | refs/heads/1.3-stable | deluge/ui/console/colors.py | 3 | #
# colors.py
#
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
#
# Deluge is free software.
#
# You may 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 versio... |
duhzecca/cinder | refs/heads/master | cinder/api/views/scheduler_stats.py | 33 | # Copyright (C) 2014 eBay 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... |
qzhuyan/linux | refs/heads/master | Documentation/driver-api/pm/conf.py | 323 | # -*- coding: utf-8; mode: python -*-
project = "Device Power Management"
tags.add("subproject")
latex_documents = [
('index', 'pm.tex', project,
'The kernel development community', 'manual'),
]
|
jonnybazookatone/adsws | refs/heads/master | adsws/tests/api_base.py | 1 | import os
import logging
import json
from adsws.testsuite import FlaskAppTestCase
from flask import Flask, session, url_for, request, jsonify, abort
from adsws.core import user_manipulator, db
from adsws import api
from flask_login import current_user, login_user, logout_user
from flask_oauthlib.client import OAuth
fr... |
sabi0/intellij-community | refs/heads/master | python/testData/inspections/ChangeSignatureParametersDefaultValues_after.py | 27 | def func(i, foo='spam'):
pass
func(42, foo='spam')
func(42)
|
nirmeshk/oh-mainline | refs/heads/master | vendor/packages/Django/tests/regressiontests/conditional_processing/urls.py | 176 | from django.conf.urls import patterns
from . import views
urlpatterns = patterns('',
('^condition/$', views.index),
('^condition/last_modified/$', views.last_modified_view1),
('^condition/last_modified2/$', views.last_modified_view2),
('^condition/etag/$', views.etag_view1),
('^condition/etag2/$'... |
dulems/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/tests/urlpatterns_reverse/urlconf_outer.py | 150 | from __future__ import absolute_import
from django.conf.urls import patterns, url, include
from . import urlconf_inner
urlpatterns = patterns('',
url(r'^test/me/$', urlconf_inner.inner_view, name='outer'),
url(r'^inner_urlconf/', include(urlconf_inner.__name__))
) |
XXMrHyde/android_external_chromium_org | refs/heads/darkkat-4.4 | third_party/PRESUBMIT.py | 47 | # Copyright (c) 2011 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.
def _CheckThirdPartyReadmesUpdated(input_api, output_api):
"""
Checks to make sure that README.chromium files are properly updated
when dependancie... |
silverbulleters/vanessa-behavoir | refs/heads/develop | tools/Sikuli/OpenDialogConf.sikuli/Sikuli.py | 6 | click("1462546926131.png")
sleep(1)
type(Key.DOWN)
sleep(1)
type(Key.RIGHT)
sleep(1)
type(Key.DOWN)
sleep(1)
type(Key.ENTER)
sleep(1)
|
efortuna/AndroidSDKClone | refs/heads/master | ndk_experimental/toolchains/x86_64-4.8/prebuilt/linux-x86_64/share/gdb/python/gdb/types.py | 137 | # Type utilities.
# Copyright (C) 2010-2013 Free Software Foundation, 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 versi... |
junhuac/MQUIC | refs/heads/master | src/tools/auto_bisect/math_utils.py | 45 | # 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.
"""General statistical or mathematical functions."""
import math
def TruncatedMean(data_set, truncate_proportion):
"""Calculates the truncated mean of a... |
mollstam/UnrealPy | refs/heads/master | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Twisted-15.2.1/twisted/trial/__init__.py | 23 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
#
# Maintainer: Jonathan Lange
"""
Twisted Trial: Asynchronous unit testing framework.
Trial extends Python's builtin C{unittest} to provide support for asynchronous
tests.
Trial strives to be compatible with other Python xUnit testing framework... |
747823/epipta.com | refs/heads/master | node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py | 1812 | # Copyright (c) 2013 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.
"""Utility functions shared amongst the Windows generators."""
import copy
import os
# A dictionary mapping supported target types to extensions.
TARGET_TYPE_EX... |
camilonova/django | refs/heads/master | tests/migrations/test_migrations_no_ancestor/0002_conflicting_second.py | 133 | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.DeleteModel("Tribble"),
migrations.RemoveField("Author", "silly_field"),
migrations.AddField("Author", "rating", models.IntegerField(default=0)),
... |
openfun/edx-platform | refs/heads/master | pavelib/acceptance_test.py | 28 | """
Acceptance test tasks
"""
from paver.easy import task, cmdopts, needs
from pavelib.utils.test.suites import AcceptanceTestSuite
from optparse import make_option
try:
from pygments.console import colorize
except ImportError:
colorize = lambda color, text: text # pylint: disable-msg=invalid-name
__test__ =... |
umeckel/FS_coapy | refs/heads/master | coapy/options.py | 1 | # Copyright (c) 2010 People Power Co.
# All rights reserved.
#
# This open source code was developed with funding from People Power Company
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# - Redistributions of sour... |
BrandonBrowning/googletest | refs/heads/master | test/gtest_help_test.py | 2968 | #!/usr/bin/env python
#
# Copyright 2009, 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... |
gcodetogit/depot_tools | refs/heads/master | third_party/cq_client/test/validate_config_test.py | 12 | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Unit tests for tools/validate_config.py."""
import mock
import os
import unittest
from cq_client import cq_pb2
from cq_client import validate_config
T... |
isayme/smzdm | refs/heads/master | smzdm_daily.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import json
import sys
import requests
import re
SMZDM_USERNAME = os.getenv('SMZDM_DAILY_USERNAME') or '' # username or email
SMZDM_PASSWORD = os.getenv('SMZDM_DAILY_PASSWORD') or '' # password
class SMZDMDailyException(Exception):
def __init__(self, req):
... |
sunqb/oa_qian | refs/heads/master | flask/Lib/site-packages/unidecode/x007.py | 252 | data = (
'//', # 0x00
'/', # 0x01
',', # 0x02
'!', # 0x03
'!', # 0x04
'-', # 0x05
',', # 0x06
',', # 0x07
';', # 0x08
'?', # 0x09
'~', # 0x0a
'{', # 0x0b
'}', # 0x0c
'*', # 0x0d
'[?]', # 0x0e
'', # 0x0f
'\'', # 0x10
'', # 0x11
'b', # 0x12
'g', # 0x13
'g', #... |
ganeshnalawade/ansible | refs/heads/devel | lib/ansible/plugins/vars/__init__.py | 58 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2014, Serge van Ginderachter <serge@vanginderachter.be>
#
# 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 Foundat... |
teichopsia-/take_brake | refs/heads/master | lib/python2.7/site-packages/pip/_vendor/packaging/_compat.py | 901 | # Copyright 2014 Donald Stufft
#
# 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, so... |
zsjohny/jumpserver | refs/heads/master | apps/common/tree.py | 3 | # -*- coding: utf-8 -*-
#
from rest_framework import serializers
class TreeNode:
id = ""
name = ""
comment = ""
title = ""
isParent = False
pId = ""
open = False
iconSkin = ""
meta = {}
_tree = None
def __init__(self, **kwargs):
for k, v in kwargs.items():
... |
prospwro/odoo | refs/heads/8.0 | addons/payment_buckaroo/tests/__init__.py | 380 | # -*- coding: utf-8 -*-
from . import test_buckaroo
|
Shmuma/hadoop | refs/heads/master | src/contrib/cloud/src/test/py/testuserdata.py | 16 | # 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 ... |
alphagov/notifications-admin | refs/heads/master | tests/app/main/views/uploads/test_upload_contact_list.py | 1 | import uuid
from io import BytesIO
from unittest.mock import ANY
import pytest
from flask import url_for
from freezegun import freeze_time
from app.formatters import normalize_spaces
from tests.conftest import SERVICE_ONE_ID
def test_upload_contact_list_page(client_request):
page = client_request.get(
'... |
himemeizhi/HiMe-HvM | refs/heads/master | hackvm.py | 1 | #!/usr/bin/env python
### Imports
import sys,re
from functools import partial
### Constants
MAX_CYCLES=1000000
MIN_INT=-(1<<63)
MAX_INT=(1<<63)-1
### Globals
Memory = [0]*16384
CallStack = []
OperandStack = []
ProgramCounter = 0
CycleCounter = 0
### Functions
def Push(v):
if (v < MIN_INT or v > MAX_INT): raise... |
delph-in/pydelphin | refs/heads/develop | delphin/cli/compare.py | 1 |
"""
Compare MRS results in test and gold [incr tsdb()] testsuites.
Graph isomorphism is used to determine if two MRSs are equivalent and
the results show how many unique MRSs exist in the test and gold
testsuites and how many are shared.
"""
import argparse
from delphin.commands import compare
parser = argparse.A... |
ttm/oscEmRede | refs/heads/master | venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/sbcharsetprober.py | 2926 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... |
Centre-Alt-Rendiment-Esportiu/att | refs/heads/master | old_project/Python/win_libs/scipy/optimize/tests/test__differential_evolution.py | 11 | """
Unit tests for the differential global minimization algorithm.
"""
from scipy.optimize import _differentialevolution
from scipy.optimize._differentialevolution import DifferentialEvolutionSolver
from scipy.optimize import differential_evolution
import numpy as np
from scipy.optimize import rosen
from numpy.testing ... |
iostackproject/IO-Bandwidth-Differentiation | refs/heads/master | test/unit/common/test_splice.py | 14 | # Copyright (c) 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 or agreed to ... |
ryfeus/lambda-packs | refs/heads/master | pytorch/source/torch/nn/modules/container.py | 1 | import warnings
from collections import OrderedDict
from torch._six import container_abcs
from itertools import islice
import operator
import torch
from .module import Module
class Container(Module):
def __init__(self, **kwargs):
super(Container, self).__init__()
# DeprecationWarning is ignored ... |
dongweiming/wechat-admin | refs/heads/master | models/core.py | 1 | from sqlalchemy.ext.hybrid import hybrid_method, hybrid_property
from ext import db
from config import avatar_tmpl
from .mixin import BaseMixin
friendship = db.Table(
'friends',
db.Column('user_id', db.String(20), db.ForeignKey('users.id')),
db.Column('friend_id', db.String(20), db.ForeignKey('users.id')... |
Learningtribes/edx-platform | refs/heads/master | common/djangoapps/geoinfo/tests/test_middleware.py | 137 | """
Tests for CountryMiddleware.
"""
from mock import patch
import pygeoip
from django.contrib.sessions.middleware import SessionMiddleware
from django.test import TestCase
from django.test.client import RequestFactory
from geoinfo.middleware import CountryMiddleware
from student.tests.factories import UserFactory, A... |
israelcoin/Isracoin | refs/heads/develop | contrib/testgen/base58.py | 2139 | '''
Bitcoin base58 encoding and decoding.
Based on https://bitcointalk.org/index.php?topic=1026.0 (public domain)
'''
import hashlib
# for compatibility with following code...
class SHA256:
new = hashlib.sha256
if str != bytes:
# Python 3.x
def ord(c):
return c
def chr(n):
return byte... |
gptech/ansible | refs/heads/devel | lib/ansible/modules/network/vyos/vyos_system.py | 37 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# 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.
... |
jtraver/dev | refs/heads/master | python3/char/chr2.py | 1 | #!/usr/local/bin/python3.7
#!/usr/bin/env python3
#!/usr/bin/python3
for i1 in range(256):
str2 = "%s %d 0x%x '%c'" % (str(i1), i1, i1, i1)
print(("str2 = %s" % str2))
#for i1 in range(32, 127):
# c1 = chr(i1)
# print "%d %s" % (i1, c1)
|
nzavagli/UnrealPy | refs/heads/master | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/SQLAlchemy-1.0.6/lib/sqlalchemy/testing/entities.py | 81 | # testing/entities.py
# Copyright (C) 2005-2015 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import sqlalchemy as sa
from sqlalchemy import exc as sa_exc
_repr_stack = set(... |
repotvsupertuga/tvsupertuga.repository | refs/heads/master | plugin.video.TVsupertuga/resources/lib/plugins/unidecode/x02a.py | 148 | data = (
'', # 0x00
'', # 0x01
'', # 0x02
'', # 0x03
'', # 0x04
'', # 0x05
'', # 0x06
'', # 0x07
'', # 0x08
'', # 0x09
'', # 0x0a
'', # 0x0b
'', # 0x0c
'', # 0x0d
'', # 0x0e
'', # 0x0f
'', # 0x10
'', # 0x11
'', # 0x12
'', # 0x13
'', # 0x14
'', # 0x15
'',... |
obi-two/Rebelion | refs/heads/master | data/scripts/templates/object/mobile/shared_brackaset_hue.py | 2 | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Creature()
result.template = "object/mobile/shared_brackaset_hue.iff"
result.attribute_template_id = 9
result.st... |
raajitr/spot-fleet-request | refs/heads/master | instances_defs.py | 1 | types_of_instances = ['t1.micro', 't2.nano', 't2.micro', 't2.small', 't2.medium', 't2.large',
't2.xlarge', 't2.2xlarge', 'm1.small', 'm1.medium', 'm1.large', 'm1.xlarge',
'm3.medium', 'm3.large', 'm3.xlarge', 'm3.2xlarge', 'm4.large', 'm4.xlarge',
'm4... |
mainakibui/kobocat | refs/heads/master | onadata/apps/logger/migrations/0044_auto__del_field_xform_is_crowd_form.py | 11 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'XForm.is_crowd_form'
db.delete_column(u'logger_xform', ... |
albertgafic/l10n-spain | refs/heads/8.0 | l10n_es_aeat_mod347/models/account_invoice.py | 5 | # -*- coding: utf-8 -*-
##############################################################################
#
# 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
#... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.