repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
wiki-ai/revscoring
refs/heads/master
examples/language_support.py
3
from revscoring.datasources.revision_oriented import revision from revscoring.dependencies import solve from revscoring.languages import english, spanish features = [english.informals.revision.matches, spanish.informals.revision.matches] values = solve(features, cache={revision.text: "I think it is stupid...
zhangziang/django-allauth
refs/heads/master
allauth/socialaccount/providers/spotify/views.py
66
from allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter, OAuth2LoginView, OAuth2CallbackView) import requests from .provider import SpotifyOAuth2Provider class SpotifyOAuth2Adapter(OAut...
google/google-ctf
refs/heads/master
third_party/edk2/AppPkg/Applications/Python/Python-2.7.10/Lib/encodings/cp500.py
93
""" Python Character Mapping Codec cp500 generated from 'MAPPINGS/VENDORS/MICSFT/EBCDIC/CP500.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def deco...
astooke/gtimer
refs/heads/master
docs/source/examples/loop_3.py
1
import gtimer as gt import time time.sleep(0.1) gt.stamp('first') loop = gt.timed_loop('named_loop') x = 0 while x < 3: next(loop) time.sleep(0.1) x += 1 gt.stamp('loop') loop.exit() time.sleep(0.1) gt.stamp('second') print gt.report(include_itrs=False)
phoebusliang/parallel-lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/tests/modeltests/defer/tests.py
92
from django.db.models.query_utils import DeferredAttribute from django.test import TestCase from models import Secondary, Primary, Child, BigChild class DeferTests(TestCase): def assert_delayed(self, obj, num): count = 0 for field in obj._meta.fields: if isinstance(obj.__class__.__dic...
40123142/finalexam
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/signal.py
743
"""This module provides mechanisms to use signal handlers in Python. Functions: alarm() -- cause SIGALRM after a specified time [Unix only] setitimer() -- cause a signal (described below) after a specified float time and the timer may restart then [Unix only] getitimer() -- get current value of timer [...
thomaxxl/safrs
refs/heads/master
expose_existing/sqlacodegen/setup.py
1
from setuptools import setup setup( use_scm_version={"version_scheme": "post-release", "local_scheme": "dirty-tag"}, setup_requires=["setuptools >= 36.2.7", "setuptools_scm >= 1.7.0"], )
robertding/vo
refs/heads/master
test/test_download.py
1
#!/usr/bin/env python # -*- coding:utf-8 -*- # # Author : RobertDing # E-mail : robertdingx@gmail.com # Date : 15/08/29 19:49:17 # Desc : 测试下载 # from __future__ import absolute_import, division, with_statement
zenodo/invenio
refs/heads/zenodo-master
invenio/modules/tickets/testsuite/__init__.py
12133432
NelleV/pyconfr-test
refs/heads/master
symposion/models.py
12133432
Reality9/spiderfoot
refs/heads/master
ext/metapdf/__init__.py
9
from metapdf import MetaPdfReader __all__ = ["metapdf"]
ofer43211/unisubs
refs/heads/staging
apps/webdriver_testing/check_videos/test_performance.py
5
import os from webdriver_testing.webdriver_base import WebdriverTestCase from webdriver_testing.pages.site_pages import video_language_page from webdriver_testing.pages.site_pages import editor_page from webdriver_testing import data_helpers from utils.factories import * class TestCaseEditUploaded(WebdriverTestCase)...
redglasses/android_kernel_lge_g3-V20f
refs/heads/cm-12.0
scripts/rt-tester/rt-tester.py
11005
#!/usr/bin/python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # import os import sys import getopt import sh...
Backspace-Dev/x920d-jp
refs/heads/master
scripts/rt-tester/rt-tester.py
11005
#!/usr/bin/python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # import os import sys import getopt import sh...
nens/nxt-box
refs/heads/master
nxt_box/views.py
1
# (c) Nelen & Schuurmans. GPL licensed, see LICENSE.rst. # -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import print_function from django.utils.translation import ugettext as _ # from django.core.urlresolvers import reverse # from lizard_map.views import MapView # from lizard_ui.views...
ntoll/p4p2p
refs/heads/master
setup.py
1
#!/usr/bin/env python from setuptools import setup, find_packages from p4p2p.version import get_version setup( name='p4p2p', version=get_version(), description='A platform for peer-to-peer application development.', long_description=open('README.rst').read(), author=open('AUTHORS').read(), auth...
sjev/trading-with-python
refs/heads/master
lib/cboe.py
1
# -*- coding: utf-8 -*- """ toolset working with cboe data @author: Jev Kuznetsov Licence: BSD """ from datetime import datetime, date import urllib.request, urllib.error, urllib.parse from pandas import DataFrame, Index from pandas.core import datetools import numpy as np import pandas as pd def monthCode(month): ...
CulturaEduca/portal
refs/heads/master
blog/models.py
1
# -*- coding: utf-8 -*- from django.db import models from django.template.defaultfilters import slugify from django.contrib import admin import datetime class Autor(models.Model): '''Classe de autores, apenas nome e descricao de cada autor''' nome = models.CharField('Nome Completo', max_length=200) email...
takahashiminoru/ryu
refs/heads/master
ryu/tests/unit/packet/test_igmp.py
23
# Copyright (C) 2013 Nippon Telegraph and Telephone 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 required by appli...
boooka/GeoPowerOff
refs/heads/master
venv/lib/python2.7/site-packages/django/contrib/sitemaps/tests/__init__.py
12133432
flupzor/newsdiffs
refs/heads/master
news/migrations/0005_auto_20160312_1641.py
2
# -*- coding: utf-8 -*- from django.db import models, migrations import news.models class Migration(migrations.Migration): dependencies = [ ('news', '0004_auto_20160301_2235'), ] operations = [ migrations.CreateModel( name='RequestLog', fields=[ ...
indevgr/django
refs/heads/master
tests/template_tests/test_unicode.py
347
# -*- coding: utf-8 -*- from __future__ import unicode_literals from unittest import TestCase from django.template import Context, Engine from django.template.base import TemplateEncodingError from django.utils import six from django.utils.safestring import SafeData class UnicodeTests(TestCase): def test_templa...
benvermaercke/pyqtgraph
refs/heads/develop
examples/ROItypes.py
24
#!/usr/bin/python -i # -*- coding: utf-8 -*- ## Add path to library (just for examples; you do not need this) import initExample from pyqtgraph.Qt import QtCore, QtGui import numpy as np import pyqtgraph as pg ## create GUI app = QtGui.QApplication([]) w = pg.GraphicsWindow(size=(800,800), border=True) v = w.addVi...
lexor90/node-compiler
refs/heads/master
node/deps/v8/tools/run-valgrind.py
23
#!/usr/bin/env python # # Copyright 2009 the V8 project authors. 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 # noti...
sitsbeyou/Django-facebook
refs/heads/master
docs/docs_env/Lib/encodings/mac_iceland.py
593
""" Python Character Mapping Codec mac_iceland generated from 'MAPPINGS/VENDORS/APPLE/ICELAND.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input...
VTREEM/IfcOpenShell
refs/heads/master
src/ifcblender/io_import_scene_ifc/__init__.py
4
############################################################################### # # # This file is part of IfcOpenShell. # # # ...
Changaco/oh-mainline
refs/heads/master
vendor/packages/celery/celery/execute/trace.py
18
# -*- coding: utf-8 -*- """ celery.execute.trace ~~~~~~~~~~~~~~~~~~~~ This module defines how the task execution is traced: errors are recorded, handlers are applied and so on. :copyright: (c) 2009 - 2011 by Ask Solem. :license: BSD, see LICENSE for more details. """ from __future__ import ab...
TNT-Samuel/Coding-Projects
refs/heads/master
DNS Server/Source/Lib/idlelib/idle_test/test_config.py
3
'''Test idlelib.config. Coverage: 96% (100% for IdleConfParser, IdleUserConfParser*, ConfigChanges). * Exception is OSError clause in Save method. Much of IdleConf is also exercised by ConfigDialog and test_configdialog. ''' import copy import sys import os import tempfile from test.support import captured_stderr, fin...
dingocuster/scikit-learn
refs/heads/master
examples/cluster/plot_color_quantization.py
297
# -*- coding: utf-8 -*- """ ================================== Color Quantization using K-Means ================================== Performs a pixel-wise Vector Quantization (VQ) of an image of the summer palace (China), reducing the number of colors required to show the image from 96,615 unique colors to 64, while pre...
ygenc/onlineLDA
refs/heads/master
onlineldavb_new/build/scipy/scipy/ndimage/interpolation.py
4
# Copyright (C) 2003-2005 Peter J. Verveer # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following d...
tsdmgz/ansible
refs/heads/devel
lib/ansible/modules/cloud/centurylink/clc_server_snapshot.py
56
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # 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': ['previe...
amitdeutsch/oppia
refs/heads/develop
scripts/experimental_deploy.py
1
# Copyright 2014 The Oppia 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 ...
twitter/pants
refs/heads/master
tests/python/pants_test/engine/legacy/test_build_ignore_integration.py
1
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import os import tempfile from builtins import open from pants_test.pants_run_integratio...
Maccimo/intellij-community
refs/heads/master
python/testData/inspections/PyTypeCheckerInspection/NewTypeAsParameter.py
19
from typing import NewType UserId = NewType("UserId", int) def get_user(user: UserId) -> str: pass get_user(UserId(5)) get_user(<warning descr="Expected type 'UserId', got 'str' instead">"John"</warning>) get_user(<warning descr="Expected type 'UserId', got 'int' instead">4</warning>)
zatchgordon/webGL
refs/heads/master
utils/exporters/blender/addons/io_three/exporter/api/object.py
124
import math import mathutils import bpy from bpy import data, context, types from bpy_extras.io_utils import axis_conversion from .. import constants, logger, utilities, exceptions from .constants import ( MESH, EMPTY, ARMATURE, LAMP, SPOT, SUN, POINT, HEMI, AREA, CAMERA, PER...
rhndg/openedx
refs/heads/master
common/djangoapps/student/admin.py
20
''' django admin pages for courseware model ''' from django import forms from config_models.admin import ConfigurationModelAdmin from django.contrib.auth.models import User from student.models import UserProfile, UserTestGroup, CourseEnrollmentAllowed, DashboardConfiguration from student.models import ( CourseEnro...
aricaldeira/pyxmlsec
refs/heads/master
examples/encrypt1.py
1
#!/usr/bin/env python # # $Id: encrypt1.py 363 2006-01-01 18:03:07Z valos $ # # PyXMLSec example: Encrypting data using a template file. # # Encrypts binary data using a template file and a DES key from a binary file # # Usage: # ./encrypt1.py <xml-tmpl> <des-key-file> # # Example: # ./encrypt1.py encrypt1-tmpl.xml d...
appsembler/edx-platform
refs/heads/appsembler/tahoe/master
openedx/core/djangolib/translation_utils.py
13
from django.utils.translation import ugettext as _, override from django.utils.formats import dateformat, get_format def translate_date(date, language, date_format='DATE_FORMAT'): """ Converts the provided date object into a string, while translating its value for the given language. Both the format of t...
bala4901/odoo
refs/heads/master
addons/portal_project/project.py
103
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-TODAY OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms...
xaviercobain88/framework-python
refs/heads/master
doc/_themes/flask_theme_support.py
2228
# flasky extensions. flasky pygments style based on tango style from pygments.style import Style from pygments.token import Keyword, Name, Comment, String, Error, \ Number, Operator, Generic, Whitespace, Punctuation, Other, Literal class FlaskyStyle(Style): background_color = "#f8f8f8" default_style = "...
davegoopot/parl_rube
refs/heads/master
scripts/twit.py
1
from twitter import Twitter import ConfigParser as configparser from twitter import OAuth from time import sleep import mcpi.minecraft as minecraft def auth(): config = configparser.ConfigParser() config.read("api.config") auth_details = OAuth(config.get("api","token"), config.get("api", "token_s...
hfp/tensorflow-xsmm
refs/heads/master
tensorflow/contrib/distributions/python/kernel_tests/conditional_transformed_distribution_test.py
25
# 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...
ovnicraft/server-tools
refs/heads/10.0
sequence_check_digit/tests/__init__.py
1
# -*- coding: utf-8 -*- # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). from . import test_check_digit
nck0405/ChennaiEden
refs/heads/master
modules/tests/helpers/report.py
28
# -*- coding: utf-8 -*- """ Tests for the report helper function in web2unittest. """ from gluon import current from tests.web2unittest import SeleniumUnitTest class ReportTestHelper(SeleniumUnitTest): # ------------------------------------------------------------------------- def test_report_test_helpe...
smmribeiro/intellij-community
refs/heads/master
python/testData/mover/multiCompound.py
80
for item in range(1, 3): b = 2<caret>
rackerlabs/silverberg
refs/heads/master
silverberg/cluster.py
1
# Copyright 2012 Rackspace Hosting, 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 ...
eljost/pysisyphus
refs/heads/master
deprecated/optimizers/ONIOMOpt.py
1
import logging import numpy as np from pysisyphus.constants import AU2KJPERMOL from pysisyphus.optimizers.Optimizer import Optimizer from pysisyphus.optimizers import poly_fit logger = logging.getLogger("optimizer") class ONIOMOpt(Optimizer): def __init__(self, geometry, *args, micro_cycles=None, **kwargs): ...
grpc/grpc
refs/heads/master
tools/run_tests/lb_interop_tests/gen_build_yaml.py
13
#!/usr/bin/env python2.7 # Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
jmanday/Herramientas-IV
refs/heads/master
CDE/tests/coreutils_pwd_test/testme.py
2
# Test to make sure the coreutils pwd program prints out the right thing # even when we move the CDE package to another directory # weird that pwd doesn't do the right thing when you move directories # ... it seems to truncate the buffer to near the ACTUAL pwd size # coreutils pwd doesn't actually use the getcwd sysc...
gylian/sickbeard
refs/heads/master
lib/subliminal/services/podnapisiweb.py
8
# -*- coding: utf-8 -*- # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # # This file is part of subliminal. # # subliminal is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 3 of...
akirse/MailService
refs/heads/master
helloworld.py
1
from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app class MainPage(webapp.RequestHandler): def get(self): self.response.headers['Content-Type'] = 'text/plain' self.response.out.write('Hello, webapp World!') self.response.out....
kobejean/tensorflow
refs/heads/master
tensorflow/contrib/metrics/python/ops/metric_ops.py
5
# 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...
GNOME/chronojump
refs/heads/master
dev-utils/monodevelop_fix_resources.py
1
#!/usr/bin/env python3 import xml.etree.ElementTree import re """ When developing ChronoJump if a new resource image is added it has to be added in the Makefiles (this is what it's used for compiling for the release, etc.). If a developer wants to use MonoDevelop: the file has to be added in MonoDevelop as well do...
111pontes/ydk-py
refs/heads/master
cisco-ios-xe/ydk/models/cisco_ios_xe/Cisco_IOS_XE_mpls_fwd_oper.py
1
""" Cisco_IOS_XE_mpls_fwd_oper This module contains a collection of YANG definitions for monitoring memory usage of processes in a Network Element.Copyright (c) 2016\-2017 by Cisco Systems, Inc.All rights reserved. """ import re import collections from enum import Enum from ydk.types import Empty, YList, YLeafLi...
3nids/QGIS
refs/heads/master
scripts/qgis_fixes/fix_nonzero.py
77
from lib2to3.fixes.fix_nonzero import FixNonzero
manishpatell/erpcustomizationssaiimpex123qwe
refs/heads/master
addons/fleet/fleet.py
266
# -*- 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...
mancoast/CPythonPyc_test
refs/heads/master
cpython/272_test_codecencodings_jp.py
150
#!/usr/bin/env python # # test_codecencodings_jp.py # Codec encoding tests for Japanese encodings. # from test import test_support from test import test_multibytecodec_support import unittest class Test_CP932(test_multibytecodec_support.TestBase, unittest.TestCase): encoding = 'cp932' tstring = test_multiby...
pekeler/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/testing/gmock/scripts/generator/cpp/__init__.py
12133432
havard024/prego
refs/heads/master
venv/lib/python2.7/site-packages/django/contrib/localflavor/de/__init__.py
12133432
xunil154/ExampleREST
refs/heads/master
example/notes/migrations/__init__.py
12133432
dex4er/django
refs/heads/1.6.x
tests/admin_scripts/management/commands/__init__.py
12133432
bkaradzic/SwiftShader
refs/heads/master
third_party/llvm-7.0/llvm/utils/lit/tests/shtest-output-printing.py
5
# Check the various features of the ShTest format. # # RUN: not %{lit} -j 1 -v %{inputs}/shtest-output-printing > %t.out # RUN: FileCheck --input-file %t.out %s # # END. # CHECK: -- Testing: # CHECK: FAIL: shtest-output-printing :: basic.txt # CHECK-NEXT: *** TEST 'shtest-output-printing :: basic.txt' FAILED *** # CH...
rahuldhote/odoo
refs/heads/8.0
addons/payment_adyen/models/adyen.py
165
# -*- coding: utf-'8' "-*-" import base64 try: import simplejson as json except ImportError: import json from hashlib import sha1 import hmac import logging import urlparse from openerp.addons.payment.models.payment_acquirer import ValidationError from openerp.addons.payment_adyen.controllers.main import Adye...
3dfxmadscientist/CBSS
refs/heads/master
addons/stock/wizard/__init__.py
73
# -*- 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...
damonkohler/sl4a
refs/heads/master
python/src/Lib/CGIHTTPServer.py
59
"""CGI-savvy HTTP Server. This module builds on SimpleHTTPServer by implementing GET and POST requests to cgi-bin scripts. If the os.fork() function is not present (e.g. on Windows), os.popen2() is used as a fallback, with slightly altered semantics; if that function is not present either (e.g. on Macintosh), only Py...
bryceguo/robotframework-selenium2library
refs/heads/master
src/Selenium2Library/locators/tableelementfinder.py
33
from selenium.common.exceptions import NoSuchElementException from Selenium2Library import utils from elementfinder import ElementFinder class TableElementFinder(object): def __init__(self, element_finder=None): if not element_finder: element_finder = ElementFinder() self._element_find...
eunchong/build
refs/heads/master
scripts/master/unittests/annotator_test.py
1
#!/usr/bin/env python # 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. """ Source file for annotated command testcases.""" import os import time import unittest import test_env # pylint: disable=W061...
gnieboer/gnuradio
refs/heads/android
gr-qtgui/apps/plot_time_base.py
47
#!/usr/bin/env python # # Copyright 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 option) # ...
aruizramon/alec_erpnext
refs/heads/master
erpnext/stock/doctype/serial_no/serial_no.py
6
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cint, cstr, flt, add_days, nowdate, getdate from frappe import _, ValidationError from erpnext.controllers.stoc...
roadmapper/ansible
refs/heads/devel
test/units/regex/test_invalid_var_names.py
83
# Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type from units.compat import unittest from ansible import constants as C test_cases = (('not-valid', ['-'], 'not_valid'), ('not!valid@either', ['!', '@'], 'not_valid_either'), ('1_nor_This', ['1'], '__...
adrienbrault/home-assistant
refs/heads/dev
tests/components/flo/test_binary_sensor.py
5
"""Test Flo by Moen binary sensor entities.""" from homeassistant.components.flo.const import DOMAIN as FLO_DOMAIN from homeassistant.const import ( ATTR_FRIENDLY_NAME, CONF_PASSWORD, CONF_USERNAME, STATE_OFF, STATE_ON, ) from homeassistant.setup import async_setup_component from .common import TES...
bolabola/PTVS
refs/heads/master
Python/Tests/TestData/DebugAttach/Simple.py
18
from threading import Thread, current_thread, Lock from time import sleep report_progress_now = [] progress_lock = Lock() def check_report_progress(me, id): global report_progress_now, progress_lock if report_progress_now[id]: progress_lock.acquire() print("{} [{}] is making progress...
Leoniela/nipype
refs/heads/master
examples/fmri_fsl_reuse.py
14
#!/usr/bin/env python # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ ========================= fMRI: FSL reuse workflows ========================= A workflow that uses fsl to perform a first level analysis on the nipype tutorial data set:: pyt...
yosshy/updraft
refs/heads/master
tests/test_subrecipe.py
1
# Copyright (c) 2013 Akira Yoshiyama <akirayoshiyama@gmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
pepetreshere/odoo
refs/heads/patch-2
addons/test_mail/tests/test_mail_gateway.py
1
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import socket from unittest.mock import DEFAULT from unittest.mock import patch from odoo import exceptions from odoo.addons.mail.tests.common import mail_new_test_user from odoo.addons.test_mail.data import test_mail_...
benreynwar/fpga-sdrlib
refs/heads/master
python/fpga_sdrlib/flter/qa_flter.py
1
# Copyright (c) 2012 Ben Reynwar # Released under MIT License (see LICENSE.txt) import os import random import unittest import logging import shutil from fpga_sdrlib.message import msg_utils from fpga_sdrlib.conversions import f_to_int from fpga_sdrlib.generate import logceil from fpga_sdrlib import config, b100, bui...
blaggacao/OpenUpgrade
refs/heads/8.0
addons/crm/wizard/crm_phonecall_to_meeting.py
381
# -*- 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...
t2abdulg/SALib
refs/heads/master
SALib/tests/test_morris.py
2
from __future__ import division from nose.tools import with_setup, raises from numpy.testing import assert_equal import numpy as np from ..sample.morris import sample, compute_optimised_trajectories from ..util import read_param_file def teardown(): pass def setup_param_file(): filename = "SALib/tests/te...
zzzirk/boto
refs/heads/master
tests/unit/ec2/test_spotinstance.py
114
from tests.unit import AWSMockServiceTestCase from boto.ec2.connection import EC2Connection class TestCancelSpotInstanceRequests(AWSMockServiceTestCase): connection_class = EC2Connection def default_body(self): return b""" <CancelSpotInstanceRequestsResponse xmlns="http://ec2.amazonaws....
le717/Shutdown-Timer
refs/heads/master
ShutdownTimer.py
1
#! /usr/bin/env python3 # -*- coding: utf-8 -*- """Shutdown Timer - Small Windows shutdown timer. Created 2013, 2015 Triangle717 <http://Triangle717.WordPress.com> Shutdown Timer 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 Soft...
spadae22/odoo
refs/heads/chris_master_8
addons/website/tests/test_ui.py
342
import openerp.tests class TestUi(openerp.tests.HttpCase): def test_01_public_homepage(self): self.phantom_js("/", "console.log('ok')", "openerp.website.snippet") def test_03_admin_homepage(self): self.phantom_js("/", "console.log('ok')", "openerp.website.editor", login='admin') def test...
loopCM/chromium
refs/heads/trunk
chrome/test/install_test/chrome.py
36
# 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. """Extended WebDriver interface that uses helper extension. This file is makeshift and should eventually be switched over to using the new ChromeDriver ...
dekadev/Deka-kernel-CM10.1-3.4
refs/heads/master
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py
12980
# SchedGui.py - Python extension for perf script, basic GUI code for # traces drawing and overview. # # Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com> # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. ...
sbalde/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/open_ended_grading_classes/grading_service_module.py
106
# This class gives a common interface for logging into the grading controller import logging import requests import dogstats_wrapper as dog_stats_api from lxml import etree from requests.exceptions import RequestException, ConnectionError, HTTPError from .combined_open_ended_rubric import CombinedOpenEndedRubric, Ru...
raghavs1108/DataPlotter
refs/heads/master
pyqtgraph/graphicsItems/ItemGroup.py
53
from ..Qt import QtGui, QtCore from .GraphicsObject import GraphicsObject __all__ = ['ItemGroup'] class ItemGroup(GraphicsObject): """ Replacement for QGraphicsItemGroup """ def __init__(self, *args): GraphicsObject.__init__(self, *args) if hasattr(self, "ItemHasNoContents"): ...
aifil/odoo
refs/heads/8.0
addons/website_hr/models/__init__.py
439
import hr
selwin/Django-facebook
refs/heads/master
facebook_example/manage.py
27
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault( "DJANGO_SETTINGS_MODULE", "facebook_example.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
monetizeio/django-pgmp
refs/heads/master
django_pgmp/db/fields/__init__.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # === django_pgmp.db.fields -----------------------------------------------=== # This file is part of django-pgpm. django-pgpm is copyright © 2012, RokuSigma # Inc. and contributors. See AUTHORS and LICENSE for more details. # # django-pgpm is free software: you can redist...
gaolichuang/neutron-fwaas
refs/heads/master
neutron_fwaas/db/cisco/__init__.py
12133432
alexgorban/models
refs/heads/master
official/vision/detection/dataloader/maskrcnn_parser.py
1
# Copyright 2019 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...
wilsonianb/nacl_contracts
refs/heads/master
pnacl/driver/artools.py
4
#!/usr/bin/python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # IMPORTANT NOTE: If you make local mods to this file, you must run: # % pnacl/build.sh driver # in order for them to take eff...
tonybaloney/st2
refs/heads/master
st2tests/st2tests/fixturesloader.py
5
# 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...
Oweoqi/metagoofil
refs/heads/master
hachoir_core/field/byte_field.py
95
""" Very basic field: raw content with a size in byte. Use this class for unknown content. """ from hachoir_core.field import Field, FieldError from hachoir_core.tools import makePrintable from hachoir_core.bits import str2hex from hachoir_core import config MAX_LENGTH = (2**64) class RawBytes(Field): """ By...
jgcaaprom/android_external_chromium_org
refs/heads/cm-12.1
tools/perf/metrics/loading.py
47
# 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. from metrics import Metric from telemetry.value import scalar class LoadingMetric(Metric): """A metric for page loading time based entirely on window.perf...
deisi/home-assistant
refs/heads/master
homeassistant/components/isy994.py
4
""" Support the ISY-994 controllers. For configuration details please visit the documentation for this component at https://home-assistant.io/components/isy994/ """ import logging from urllib.parse import urlparse from homeassistant.const import ( CONF_HOST, CONF_PASSWORD, CONF_USERNAME, EVENT_HOMEASSISTANT_S...
cobalys/django
refs/heads/master
tests/regressiontests/bug8245/admin.py
150
from __future__ import absolute_import from django.contrib import admin from .models import Story admin.site.register(Story) raise Exception("Bad admin module")
ericlink/adms-server
refs/heads/master
playframework-dist/play-1.1/python/Lib/UserDict.py
2
"""A more or less complete user-defined wrapper around dictionary objects.""" class UserDict: def __init__(self, dict=None, **kwargs): self.data = {} if dict is not None: self.update(dict) if len(kwargs): self.update(kwargs) def __repr__(self): return re...
flabe81/flask-admin
refs/heads/master
examples/sqla-custom-filter/app.py
13
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_admin.contrib import sqla from flask_admin import Admin # required for creating custom filters from flask_admin.contrib.sqla.filters import BaseSQLAFilter, FilterEqual # Create application app = Flask(__name__) # Create dummy secrey key so w...
supamii/libuv.qt
refs/heads/master
lib/gmock/gtest/test/gtest_test_utils.py
674
#!/usr/bin/env python # # Copyright 2006, 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...
CTSRD-SOAAP/chromium-42.0.2311.135
refs/heads/master
tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_websocket_unittest.py
11
# 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 unittest from telemetry.core.backends.chrome_inspector import inspector_websocket from telemetry.core.backends.chrome_inspector import websocket from...