repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
brandonPurvis/osf.io
refs/heads/develop
tests/test_project_decorators.py
6
"""Tests related to project decorators""" from nose.tools import * # noqa from website.project.decorators import must_be_valid_project from website.project.model import Sanction from tests.base import OsfTestCase from tests.factories import ProjectFactory, NodeFactory, RetractionFactory from framework.exceptions ...
rloomans/measure-mate
refs/heads/master
measure_mate/migrations/0023_auto_20160330_0145.py
2
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-30 01:45 from __future__ import unicode_literals import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('measure_mate', '0022_measurement_action...
jehomez/pymeadmin
refs/heads/master
articulos_por_proveedor.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # proveedor.py # # Copyright 2010 Jesús Hómez <jesus@jesus-laptop> # # 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;...
nerdyblonde/N80XX_Kernel
refs/heads/n80xx
tools/perf/scripts/python/check-perf-trace.py
11214
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
JeyZeta/Dangerous
refs/heads/master
Dangerous/Golismero/tools/theHarvester/discovery/DNS/Type.py
24
# -*- encoding: utf-8 -*- """ $Id: Type.py,v 1.6.2.1 2007/05/22 20:20:39 customdesigned Exp $ This file is part of the pydns project. Homepage: http://pydns.sourceforge.net This code is covered by the standard Python License. TYPE values (section 3.2.2) """ A = 1 # a host address NS = 2 # an...
markYoungH/chromium.src
refs/heads/nw12
tools/check_grd_for_unused_strings.py
35
#!/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. """Without any args, this simply loads the IDs out of a bunch of the Chrome GRD files, and then checks the subset of the code that ...
martinwicke/tensorflow
refs/heads/master
tensorflow/contrib/learn/python/learn/preprocessing/categorical_vocabulary.py
94
# 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...
taknevski/tensorflow-xsmm
refs/heads/master
tensorflow/examples/learn/random_forest_mnist.py
73
# 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 appl...
duducosmos/pgs4a
refs/heads/master
python-install/lib/python2.7/encodings/koi8_u.py
593
""" Python Character Mapping Codec koi8_u generated from 'python-mappings/KOI8-U.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,errors='stri...
theheros/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_glob.py
3
import unittest from test.support import run_unittest, TESTFN, skip_unless_symlink, can_symlink import glob import os import shutil class GlobTests(unittest.TestCase): def norm(self, *parts): return os.path.normpath(os.path.join(self.tempdir, *parts)) def mktemp(self, *parts): fil...
vinodkc/spark
refs/heads/master
examples/src/main/python/ml/robust_scaler_example.py
27
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
hperala/kontuwikibot
refs/heads/master
mwparserfromhell/definitions.py
3
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2016 Ben Kurtovic <ben.kurtovic@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation ...
kosgroup/odoo
refs/heads/10.0
addons/stock/tests/common.py
1
# -*- coding: utf-8 -*- from odoo.tests import common class TestStockCommon(common.TransactionCase): def setUp(self): super(TestStockCommon, self).setUp() self.ProductObj = self.env['product.product'] self.UomObj = self.env['product.uom'] self.PartnerObj = self.env['res.partner'...
polypmer/scrape
refs/heads/master
craigslists/mappify.py
2
########################################################################### # Copyright (C) 2015 Fenimore Love # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT....
zhenv5/scikit-learn
refs/heads/master
sklearn/decomposition/setup.py
116
import os import numpy from numpy.distutils.misc_util import Configuration def configuration(parent_package="", top_path=None): config = Configuration("decomposition", parent_package, top_path) libraries = [] if os.name == 'posix': libraries.append('m') config.add_extension("_online_lda", ...
gnuhub/intellij-community
refs/heads/master
python/testData/quickFixes/PyRemoveArgumentQuickFixTest/postKwArg.py
26
def foo(a, **args): pass b = {} foo(**b, <error descr="Cannot appear past keyword arguments or *arg or **kwarg">a<caret>=1</error>)
antoinecarme/pyaf
refs/heads/master
tests/artificial/transf_Logit/trend_MovingAverage/cycle_30/ar_/test_artificial_128_Logit_MovingAverage_30__0.py
1
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "MovingAverage", cycle_length = 30, transform = "Logit", sigma = 0.0, exog_count = 0, ar_order = 0);
solintegra/addons
refs/heads/master
base_gengo/controller/gengo_callback.py
362
# -*- coding: utf-8 -*- import openerp from openerp import SUPERUSER_ID from openerp.addons.web import http from openerp.addons.web.http import request from werkzeug.wrappers import BaseResponse as Response import json class website_gengo(http.Controller): def get_gengo_key(self, cr): icp = request.re...
rolando-contrib/scrapy
refs/heads/master
tests/test_command_version.py
11
import sys from twisted.trial import unittest from twisted.internet import defer import scrapy from scrapy.utils.testproc import ProcessTest class VersionTest(ProcessTest, unittest.TestCase): command = 'version' @defer.inlineCallbacks def test_output(self): encoding = getattr(sys.stdout, 'encod...
phil-lopreiato/the-blue-alliance
refs/heads/master
models/notifications/event_level.py
2
import calendar import datetime from models.notifications.notification import Notification class EventLevelNotification(Notification): def __init__(self, match): self.match = match self.event = match.event.get() @classmethod def _type(cls): from consts.notification_type import N...
j-griffith/cinder
refs/heads/master
cinder/scheduler/weights/volume_number.py
6
# Copyright (c) 2014 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
2014c2g12/c2g12
refs/heads/master
c2wp/exts/w2/static/Brython2.0.0-20140209-164925/Lib/copyreg.py
749
"""Helper to provide extensibility for pickle. This is only useful to add pickle support for extension types defined in C, not for instances of user-defined classes. """ __all__ = ["pickle", "constructor", "add_extension", "remove_extension", "clear_extension_cache"] dispatch_table = {} def pickle(ob_typ...
dbo/selenium
refs/heads/master
py/selenium/webdriver/common/proxy.py
5
#!/usr/bin/python # # Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "Li...
timoschwarzer/blendworks
refs/heads/master
BlendWorks Server/python/Lib/site-packages/pip/_vendor/requests/packages/chardet/latin1prober.py
950
######################## 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...
hsuchie4/TACTIC
refs/heads/master
src/client/examples/checkin_shot.py
9
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
abhilashnta/edx-platform
refs/heads/master
lms/djangoapps/discussion_api/models.py
1644
""" A models.py is required to make this an app (until we move to Django 1.7) """
kmarius/qutebrowser
refs/heads/master
qutebrowser/browser/webkit/http.py
5
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
JanzTam/zulip
refs/heads/master
zilencer/management/commands/profile_request.py
118
from __future__ import absolute_import from optparse import make_option from django.core.management.base import BaseCommand from zerver.models import get_user_profile_by_email, UserMessage from zerver.views.old_messages import get_old_messages_backend import cProfile import logging from zerver.middleware import LogReq...
huonw/servo
refs/heads/master
tests/wpt/harness/wptrunner/update/state.py
196
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import os import cPickle as pickle here = os.path.abspath(os.path.split(__file__)[0]) class State(object): filenam...
puuu/micropython
refs/heads/master
tests/basics/int_bytes.py
5
print((10).to_bytes(1, "little")) print((111111).to_bytes(4, "little")) print((100).to_bytes(10, "little")) print(int.from_bytes(b"\x00\x01\0\0\0\0\0\0", "little")) print(int.from_bytes(b"\x01\0\0\0\0\0\0\0", "little")) print(int.from_bytes(b"\x00\x01\0\0\0\0\0\0", "little")) # check that extra zero bytes don't change...
markYoungH/chromium.src
refs/heads/nw12
tools/cr/cr/commands/info.py
59
# 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. """A module for the info implementation of Command.""" import cr class InfoCommand(cr.Command): """The cr info command implementation.""" def __init_...
incredible-vision/show-and-tell
refs/heads/master
pycocoevalcap/meteor/meteor.py
1
#!/usr/bin/env python # Python wrapper for METEOR implementation, by Xinlei Chen # Acknowledge Michael Denkowski for the generous discussion and help import os import sys import subprocess import threading # Assumes meteor-1.5.jar is in the same directory as meteor.py. Change as needed. METEOR_JAR = 'meteor-1.5.ja...
razorpay/razorpay-python
refs/heads/master
tests/test_client_refund.py
1
import responses import json from .helpers import mock_file, ClientTestCase class TestClientRefund(ClientTestCase): def setUp(self): super(TestClientRefund, self).setUp() self.base_url = '{}/refunds'.format(self.base_url) @responses.activate def test_refund_all(self): result = m...
talhajaved/nyuadmarket
refs/heads/master
flask/lib/python2.7/site-packages/babel/localtime/__init__.py
153
# -*- coding: utf-8 -*- """ babel.localtime ~~~~~~~~~~~~~~~ Babel specific fork of tzlocal to determine the local timezone of the system. :copyright: (c) 2013 by the Babel Team. :license: BSD, see LICENSE for more details. """ import sys import pytz import time from datetime import timedelta,...
heladio/my-blog
refs/heads/master
pelica-env/lib/python2.7/codecs.py
4
/usr/lib/python2.7/codecs.py
ecreager/pocket
refs/heads/master
gray/write_gray_code_1d.py
1
import gray_code import os def write_gray_code_1d(n=7, m=7, filename='gray_lookup_1d.txt'): """write a 1-D Gray code to disk in a Max/MSP-friendly way""" string = 'table ' code = gray_code.single_1d_gray_code(n=n, m=m, do_print=True) for value in code.values(): string += '%i ' % value if ...
ChromiumWebApps/chromium
refs/heads/master
ppapi/generators/idl_gen_wrapper.py
1
# 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. """Base class for generating wrapper functions for PPAPI methods. """ from datetime import datetime import os import sys from idl_c_proto import CGen f...
Cl3MM/metagoofil
refs/heads/master
hachoir_parser/misc/word_2.py
74
""" Documents: * "Microsoft Word for Windows 2.0 Binary Format" http://www.wotsit.org/download.asp?f=word2&sc=275927573 """ from hachoir_core.field import (FieldSet, Enum, Bit, Bits, UInt8, Int16, UInt16, UInt32, Int32, NullBytes, Bytes, RawBytes, PascalString16, DateTimeMSDOS32, TimeDateMSDOS32) f...
jorik041/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/port/http_lock_unittest.py
124
# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above co...
mhvk/numpy
refs/heads/placeholder
numpy/core/tests/test_unicode.py
17
import numpy as np from numpy.testing import assert_, assert_equal, assert_array_equal def buffer_length(arr): if isinstance(arr, str): if not arr: charmax = 0 else: charmax = max([ord(c) for c in arr]) if charmax < 256: size = 1 elif charmax < 65...
hojel/calibre
refs/heads/master
src/calibre/ebooks/conversion/preprocess.py
11
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import functools, re, json from calibre import entity_to_unicode, as_unicode XMLDECL_RE = re.compile(r'^\s*<[?]xml.*?...
hurricup/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/core/management/commands/sqlsequencereset.py
312
from optparse import make_option from django.core.management.base import AppCommand from django.db import connections, models, DEFAULT_DB_ALIAS class Command(AppCommand): help = 'Prints the SQL statements for resetting sequences for the given app name(s).' option_list = AppCommand.option_list + ( mak...
trebuh/online-server-watcher
refs/heads/master
online_watcher/core.py
1
#! /usr/bin/env python3 # coding: utf-8 import sys import time import logging import smtplib from email.mime.text import MIMEText try: import bs4 import requests except ImportError as e: requests = None bs4 = None print("Import error: %s" % str(e)) sys.exit(129) from .config import log_params,...
Touchtyper/Time-Dilation
refs/heads/master
TimeDilation.py
1
c = 8.9875518e+16 # Speed of light squared t = int(input("Please enter the time interval for the observer (s):")) v = int(input("Enter the velocity of moving object relative to you(m/s):")) vf = v*v half = (1-vf/c)**(0.5) result = t/half print result
romain-dartigues/ansible
refs/heads/devel
lib/ansible/utils/module_docs_fragments/enos.py
58
# (C) 2017 Red Hat Inc. # Copyright (C) 2017 Lenovo. # # GNU General Public License v3.0+ # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for ...
rpotpogo/PokemonGo-Map
refs/heads/develop
docs/conf.py
29
# -*- coding: utf-8 -*- # # RocketMap documentation build configuration file, created by # sphinx-quickstart on Tue Aug 2 02:20:19 2016. # # 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. # #...
sve-odoo/odoo
refs/heads/master
addons/website_google_map/__openerp__.py
354
{ 'name': 'Website Google Map', 'category': 'Hidden', 'summary': '', 'version': '1.0', 'description': """ OpenERP Website Google Map ========================== """, 'author': 'OpenERP SA', 'depends': ['base_geolocalize', 'website_partner', 'crm_partner_assign'], 'data': [ ...
JoseTomasTocino/SiteUp
refs/heads/master
web/manage.py
1
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "siteup.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
leeseuljeong/leeseulstack_neutron
refs/heads/master
neutron/tests/unit/agent/linux/test_process_monitor.py
14
# Copyright 2014 Red Hat Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
atilaromero/finance
refs/heads/master
finance/daily.py
1
#!/usr/bin/python def percentvar(prices): return (prices[1:]-prices[:-1])/prices[1:] def var(prices): return (prices[1:]-prices[:-1])
forpster/dotfiles
refs/heads/master
home/.emacs.d/.python-environments/default/lib/python2.7/site-packages/pip/_vendor/retrying.py
934
## Copyright 2013-2014 Ray Holder ## ## 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 ...
ECP-CANDLE/Database
refs/heads/master
plots/json2csv.py
1
# JSON TO CSV # NOTE: Run this with './json2table csv params.txt root_dir out.csv' # (shell script wrapper) # where: # params.txt is the list of parameter names you want # root_dir is the data directory # out.csv is the output CSV file # The parameter names will be on line 1 of the CSV # C...
collective/cyn.in
refs/heads/master
products/WebServerAuth/tests/test_challenge.py
4
"""Unit tests for challenge plugin""" import re from Products.PloneTestCase import PloneTestCase from Products.WebServerAuth.plugin import useCustomRedirectionKey, challengePatternKey, challengeReplacementKey from Products.WebServerAuth.tests.base import MockRequestTestCase PloneTestCase.installProduct('WebServerAuth...
gram526/VTK
refs/heads/master
ThirdParty/Twisted/twisted/python/filepath.py
33
# -*- test-case-name: twisted.test.test_paths -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Object-oriented filesystem path representation. """ from __future__ import division, absolute_import import os import errno import base64 from hashlib import sha1 from os.path import isabs, ...
prutseltje/ansible
refs/heads/devel
lib/ansible/modules/commands/shell.py
22
# Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # # There is no actual shell module source, when you use 'shell' in ansible, # it runs the 'command' module with special arguments and it behaves differently. # See the command source and the comme...
poppogbr/genropy
refs/heads/master
tutorial/projects/invoices/packages/invc/main.py
1
#!/usr/bin/env python # encoding: utf-8 from gnr.app.gnrdbo import GnrDboTable, GnrDboPackage from gnr.app.gnrdbo import Table_counter # auto build the table counter from gnr.app.gnrdbo import Table_userobject # auto build the table userobject class Package(GnrDboPackage): def config_attributes(self): ...
droidroidz/Manta_kernel
refs/heads/master
tools/perf/scripts/python/check-perf-trace.py
11214
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
huguesfontenelle/cnvScan
refs/heads/dev
src/filt_cnvs.py
3
#!/usr/bin/env python import re import pybedtools import vcf import numpy as np from scipy.stats import mannwhitneyu import pysam def read_cnvRes(cnv_res_file, cnv_anno): cnvs_ordered = [] with open(cnv_res_file, 'r') as f: #next(f) for line in f: l = line.rstrip("\n").split("...
knipknap/exscript
refs/heads/master
Exscript/interpreter/execute.py
3
# # Copyright (C) 2010-2017 Samuel Abels # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy,...
uberamd/NGECore2
refs/heads/master
scripts/object/tangible/lair/structure/exterior/lair_cave_medium_exterior_hanadak.py
85615
import sys def setup(core, object): return
uberamd/NGECore2
refs/heads/master
scripts/object/mobile/coa_aclo_soldier_hum_f_01.py
85615
import sys def setup(core, object): return
agry/NGECore2
refs/heads/master
scripts/object/tangible/painting/painting_twilek_f_sm_s01.py
85615
import sys def setup(core, object): return
jkandasa/integration_tests
refs/heads/master
fixtures/ssh_client.py
5
import pytest import diaper from fixtures.pytest_store import store from cfme.utils.log import logger from cfme.utils import ssh @pytest.mark.hookwrapper def pytest_sessionfinish(session, exitstatus): """Loop through the appliance stack and close ssh connections""" for ssh_client in store.ssh_clients_to_clo...
sebalix/OpenUpgrade
refs/heads/8.0
addons/base_geolocalize/models/__init__.py
1273
import res_partner
SujaySKumar/django
refs/heads/master
django/contrib/flatpages/apps.py
590
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class FlatPagesConfig(AppConfig): name = 'django.contrib.flatpages' verbose_name = _("Flat Pages")
Pursuit92/antlr4
refs/heads/master
runtime/Python3/src/antlr4/tree/TokenTagToken.py
4
# # Copyright (c) 2012-2016 The ANTLR Project. All rights reserved. # Use of this file is governed by the BSD 3-clause license that # can be found in the LICENSE.txt file in the project root. # # # A {@link Token} object representing a token of a particular type; e.g., # {@code <ID>}. These tokens are created for {@li...
shiquanwang/numba
refs/heads/master
numba/support/numpy_support/slicing.py
1
# -*- coding: utf-8 -*- """ Module that deals with NumPy array slicing. - normalize ellipses - recognize newaxes - track how contiguity is affected (C or Fortran) """ from __future__ import print_function, division, absolute_import import ast from numba import * from numba import nodes, typesystem from n...
goodwinnk/intellij-community
refs/heads/master
python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_1/_pkg0_1_0/_pkg0_1_0_1/_pkg0_1_0_1_0/_mod0_1_0_1_0_2.py
30
name0_1_0_1_0_2_0 = None name0_1_0_1_0_2_1 = None name0_1_0_1_0_2_2 = None name0_1_0_1_0_2_3 = None name0_1_0_1_0_2_4 = None
hpcleuven/easybuild-framework
refs/heads/master
easybuild/toolchains/compiler/__init__.py
1
## # 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...
mhugo/QGIS
refs/heads/master
python/plugins/processing/gui/ContextAction.py
15
# -*- coding: utf-8 -*- """ *************************************************************************** ContextAction.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *************************...
martbhell/wasthereannhlgamelastnight
refs/heads/master
src/lib/requests_oauthlib/compliance_fixes/plentymarkets.py
6
from json import dumps, loads import re from oauthlib.common import to_unicode def plentymarkets_compliance_fix(session): def _to_snake_case(n): return re.sub('(.)([A-Z][a-z]+)', r'\1_\2', n).lower() def _compliance_fix(r): # Plenty returns the Token in CamelCase instead of _ if 'ap...
stefanw/froide
refs/heads/master
froide/foirequest/management/commands/add_jurisdiction.py
7
from django.core.management.base import BaseCommand from django.utils import translation from django.conf import settings class Command(BaseCommand): help = "Add correct jurisdiction to requests, publicbodies etc." def handle(self, *args, **options): translation.activate(settings.LANGUAGE_CODE) ...
chmanchester/firefox-ui-tests
refs/heads/master
firefox_puppeteer/ui/toolbars.py
1
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. from marionette import Wait, By from ..api.keys import Keys from ..api.l10n import L10n from ..base import BaseLib from...
britcey/ansible
refs/heads/devel
test/integration/targets/module_utils/library/test_failure.py
263
#!/usr/bin/python results = {} # Test that we are rooted correctly # Following files: # module_utils/yak/zebra/foo.py try: from ansible.module_utils.zebra import foo results['zebra'] = foo.data except ImportError: results['zebra'] = 'Failed in module as expected but incorrectly did not fail in AnsiballZ ...
jiadaizhao/LeetCode
refs/heads/master
1301-1400/1323-Maximum 69 Number/1323-Maximum 69 Number.py
1
class Solution: def maximum69Number (self, num: int) -> int: return int(str(num).replace('6', '9', 1))
SatoshiMabuchi/CrystalGraphics
refs/heads/master
ThirdParty/gtest-1.7.0/test/gtest_catch_exceptions_test.py
2139
#!/usr/bin/env python # # Copyright 2010 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 o...
BT-fgarbely/bank-statement-reconcile
refs/heads/8.0
__unported__/account_advanced_reconcile/advanced_reconciliation.py
15
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2012 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...
ThirdProject/android_external_chromium_org
refs/heads/cm-11.0
tools/telemetry/telemetry/core/backends/chrome/android_browser_finder.py
23
# 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. """Finds android browsers that can be controlled by telemetry.""" import os import logging as real_logging import re import subprocess import sys from tele...
bixuehujin/mdeditor
refs/heads/master
mdeditor/ui/widget.py
1
''' Created on 2013-7-21 @author: hujin ''' from PySide.QtCore import * from PySide.QtGui import * class MarkdownEdit(QPlainTextEdit): pass
torodavit/libyuv
refs/heads/master
gyp_libyuv.py
179
#!/usr/bin/env python # # Copyright 2014 The LibYuv Project Authors. All rights reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All cont...
wakatime/sketch-wakatime
refs/heads/master
WakaTime.sketchplugin/Contents/Resources/wakatime/packages/pygments/lexers/basic.py
27
# -*- coding: utf-8 -*- """ pygments.lexers.basic ~~~~~~~~~~~~~~~~~~~~~ Lexers for BASIC like languages (other than VB.net). :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, bygroups, d...
Aula13/poloniex
refs/heads/master
tests/test_poloniex_public.py
1
from poloniex import PoloniexPublic import responses import requests @responses.activate def test_returnTicker(): responses.add(responses.GET, 'https://poloniex.com/public', body=('{"BTC_LTC":{"last":"0.0251", "lowestAsk":"0.02589999", "highestBid":"0.0251",' ' "percentChange":"0.023...
moreati/uwsgi
refs/heads/master
t/python/spooler_priority/spooler_priority_constants.py
21
#! /usr/bin/env python2 # coding = utf-8 tasks = [ (101, "101"), (101, "101Bis"), (2, "2"), (1, "1"), (0, "0"), (None, "NoPriority") ] ordered_tasks = [ "0", "1", "2", "101", "101Bis", "NoPriority" ] LOGFILE = "/tmp/spoolerlog"
asedunov/intellij-community
refs/heads/master
python/helpers/pydev/tests_pydevd_python/_debugger_case4.py
91
import time if __name__ == '__main__': for i in range(10): print('here %s' % i) time.sleep(1) print('TEST SUCEEDED')
tisspage/ucar
refs/heads/master
api-server/api_v0/admin.py
1
#!/usr/bin/env python # encoding: utf-8 """ admin.py Created by Christophe VAN FRACKEM / Bastien ARNETTE on 2014/04/21/. Copyright (c) 2014 Tiss'Page. MIT Licence. UCAR admin models. """ __author__ = 'Christophe VAN FRACKEM <contact@tisspage.fr> / Bastien ARNETTE <bastien@rnette.fr>' __version__= '0.0.1' __copyrigh...
snnn/bazel
refs/heads/master
src/test/py/bazel/bazel_external_repository_test.py
3
# pylint: disable=g-bad-file-header # Copyright 2017 The Bazel 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 ...
sunils34/buffer-django-nonrel
refs/heads/master
django/conf/locale/ta/formats.py
434
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F, Y' TIME_FORMAT = 'g:i:s A' # DATETIME_FORMAT = # YEAR_MONTH_FORMAT ...
seanli9jan/tensorflow
refs/heads/master
tensorflow/contrib/framework/python/ops/critical_section_test.py
27
# Copyright 2017 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...
dennisguse/pjsip
refs/heads/master
tests/pjsua/scripts-recvfrom/209a_reg_handle_423_ok.py
41
# $Id$ import inc_sip as sip import inc_sdp as sdp pjsua = "--null-audio --id=sip:CLIENT --registrar sip:127.0.0.1:$PORT " + \ "--realm=python --user=username --password=password " + \ "--auto-update-nat=0" # 423 Response without Min-Expires header req1 = sip.RecvfromTransaction("Initial request", 423, include=...
pilou-/ansible
refs/heads/devel
test/units/modules/network/f5/test_bigip_gtm_topology_region.py
16
# -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # 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 import os import json import pytest import sys if sys.version_info < (2...
pinballwizard/locomotive
refs/heads/master
main/models.py
1
from django.db import models from django.core.validators import MinValueValidator, MaxValueValidator class Branch(models.Model): name = models.CharField('Название', max_length=50, unique=True) class Meta: db_table = 'branch' verbose_name = 'Филиал' verbose_name_plural = 'Филиалы' ...
MSOpenTech/edx-platform
refs/heads/master
cms/djangoapps/contentstore/features/course_import.py
176
# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name # pylint: disable=unused-argument import os from lettuce import world, step from django.conf import settings def import_file(filename): world.browser.execute_script("$('input.file-input').css('display', 'block')") path = os.path.join(...
jaggerkyne/PyKids
refs/heads/master
Part_02/Chapter_17/stick_game.py
1
# Another code written by Jagger Kyne # Copyright 2006 - 2013 Jagger Kyne <jagger.kyne@gmail.com> __author__ = 'Jagger Kyne' from tkinter import * import random import time class Game: def __init__(self): self.tk = Tk() self.tk.title("Mr. Stick Man Race for the Exit") self.tk.resizable(0,...
leosongwei/mutagen
refs/heads/master
tests/test_oggspeex.py
4
import os import shutil from mutagen._compat import cBytesIO from mutagen.ogg import OggPage from mutagen.oggspeex import OggSpeex, OggSpeexInfo, delete from tests import TestCase from tests.test_ogg import TOggFileTypeMixin from tempfile import mkstemp class TOggSpeex(TestCase, TOggFileTypeMixin): Kind = OggSpe...
wnduan/IntroToComSci
refs/heads/master
test.py
2
# - coding: utf-8 - #def putchar(s): # index = len(s) - 1 # while index >= 0: # print s[index] # index -= 1 # #fruit = "abcdef" #putchar(fruit) ##prefixes = "JKLMNOPQ" ##suffix_1 = "ack" ##suffix_2 = "uack" ## ##for letter in prefixes: ## if letter in "OQ": ## print letter + suffix_2 ## ...
linz/QGIS-AIMS-Plugin
refs/heads/master
AimsUI/AimsLogging.py
2
################################################################################ # # Copyright 2016 Crown copyright (c) # Land Information New Zealand and the New Zealand Government. # All rights reserved # # This program is released under the terms of the 3 clause BSD license. See the # LICENSE file for more informat...
CTPUG/wafer
refs/heads/master
wafer/pages/serializers.py
1
from django.contrib.auth import get_user_model from rest_framework import serializers from reversion import revisions from wafer.pages.models import Page class PageSerializer(serializers.ModelSerializer): people = serializers.PrimaryKeyRelatedField( many=True, allow_null=True, queryset=get_user...
imarqs/ardupilot
refs/heads/master
Tools/scripts/frame_sizes.py
351
#!/usr/bin/env python import re, sys, operator, os code_line = re.compile("^\s*\d+:/") frame_line = re.compile("^\s*\d+\s+/\* frame size = (\d+) \*/") class frame(object): def __init__(self, code, frame_size): self.code = code self.frame_size = int(frame_size) frames = [] def process_lst(filena...
LMSlay/wiper
refs/heads/master
viper/common/colors.py
2
# This file is part of Viper - https://github.com/botherder/viper # See the file 'LICENSE' for copying permission. import os import sys def color(text, color_code, readline=False): """Colorize text. @param text: text. @param color_code: color. @return: colorized text. """ # $TERM under Windows...
jmartinezchaine/OpenERP
refs/heads/master
openerp/addons/account_sequence/account_sequence_installer.py
9
# -*- 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...