repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
shuaiharry/QEMU
refs/heads/master
scripts/qapi-visit.py
13
# # QAPI visitor generator # # Copyright IBM, Corp. 2011 # # Authors: # Anthony Liguori <aliguori@us.ibm.com> # Michael Roth <mdroth@linux.vnet.ibm.com> # # This work is licensed under the terms of the GNU GPLv2. # See the COPYING.LIB file in the top-level directory. from ordereddict import OrderedDict from qapi ...
followyourheart/SFrame
refs/heads/master
oss_src/unity/python/sframe/toolkits/image_analysis/__init__.py
9
''' Copyright (C) 2015 Dato, Inc. All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. ''' __all__ = ['image_analysis'] import image_analysis
CVML/scikit-learn
refs/heads/master
examples/exercises/plot_iris_exercise.py
323
""" ================================ SVM Exercise ================================ A tutorial exercise for using different SVM kernels. This exercise is used in the :ref:`using_kernels_tut` part of the :ref:`supervised_learning_tut` section of the :ref:`stat_learn_tut_index`. """ print(__doc__) import numpy as np i...
rembo10/headphones
refs/heads/master
lib/unidecode/x074.py
252
data = ( 'Han ', # 0x00 'Xuan ', # 0x01 'Yan ', # 0x02 'Qiu ', # 0x03 'Quan ', # 0x04 'Lang ', # 0x05 'Li ', # 0x06 'Xiu ', # 0x07 'Fu ', # 0x08 'Liu ', # 0x09 'Ye ', # 0x0a 'Xi ', # 0x0b 'Ling ', # 0x0c 'Li ', # 0x0d 'Jin ', # 0x0e 'Lian ', # 0x0f 'Suo ', # 0x10 'Chii...
Jenselme/AutobahnPython
refs/heads/master
examples/twisted/websocket/wrapping/server.py
2
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 with...
deepak7mahto/Web_Scrapper_3010
refs/heads/master
Web_Scrapper_Generic/Web_Scrapper_Generic/examples/e2.py
1
#!/usr/bin/env python #-*- coding:utf-8 -*- from PyQt4 import QtCore, QtGui class MyDialog(QtGui.QDialog): def __init__(self, parent=None): super(MyDialog, self).__init__(parent) self.buttonBox = QtGui.QDialogButtonBox(self) self.buttonBox.setOrientation(QtCore.Qt.Horizontal) self...
ygenc/onlineLDA
refs/heads/master
onlineldavb_new/build/scipy/scipy/sparse/linalg/isolve/tests/demo_lgmres.py
10
import scipy.sparse.linalg as la import scipy.sparse as sp import scipy.io as io import numpy as np import sys #problem = "SPARSKIT/drivcav/e05r0100" problem = "SPARSKIT/drivcav/e05r0200" #problem = "Harwell-Boeing/sherman/sherman1" #problem = "misc/hamm/add32" mm = np.lib._datasource.Repository('ftp://math.nist.gov/...
jarvys/django-1.7-jdb
refs/heads/master
tests/get_earliest_or_latest/tests.py
41
from __future__ import unicode_literals from datetime import datetime from django.test import TestCase from .models import Article, Person class EarliestOrLatestTests(TestCase): """Tests for the earliest() and latest() objects methods""" def tearDown(self): """Makes sure Article has a get_latest_b...
manfer/LFP.bundle
refs/heads/master
Contents/Code/__init__.py
1
# -*- coding: utf-8 -*- TITLE = u'LFP' PREFIX = '/video/lfp' LFP_BASE_URL = 'http://www.laliga.es' LFP_MULTIMEDIA = '%s/multimedia' % LFP_BASE_URL LFP_ICON = 'lfp.png' ICON = 'default-icon.png' LFP_HL_ICON = 'highlights.png' LFP_VIDEO_ICON = 'video.png' LFP_PHOTO_ICON = 'photo...
douglas-larocca/turses
refs/heads/master
tests/test_core.py
2
# -*- coding: utf-8 -*- from sys import path path.append('../') import unittest from mock import Mock from . import create_status from turses.models import TimelineList from turses.api.helpers import ( is_home_timeline, is_user_timeline, is_own_timeline, is_mentions_timeline, is_messages_timeline...
TakashiSasaki/ns-3-nat
refs/heads/master
examples/udp/examples-to-run.py
199
#! /usr/bin/env python ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- # A list of C++ examples to run in order to ensure that they remain # buildable and runnable over time. Each tuple in the list contains # # (example_name, do_run, do_valgrind_run). # # See test.py for more i...
yunqu/PYNQ
refs/heads/master
pynq/lib/pmod/pmod_grove_imu.py
4
# Copyright (c) 2016, Xilinx, 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of ...
prometheanfire/portage
refs/heads/master
pym/_emerge/EbuildBuild.py
2
# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from _emerge.EbuildExecuter import EbuildExecuter from _emerge.EbuildPhase import EbuildPhase from _emerge.EbuildBinpkg import EbuildBinpkg from _emerge.EbuildFetcher import EbuildFetcher from _emerge.CompositeTa...
tadashi-aikawa/gemini
refs/heads/master
tests/addons/reqs2reqs/test_rename.py
1
#!/usr/bin/env python # -*- coding:utf-8 -*- import pytest from owlmixin.util import load_yaml from jumeaux.addons.reqs2reqs.rename import Executor from jumeaux.models import Reqs2ReqsAddOnPayload RENAME_WITH_CONDITION = ( "Rename requests with a condition", """ conditions: ...
pyecs/servo
refs/heads/master
tests/wpt/web-platform-tests/websockets/handlers/echo-query_v13_wsh.py
266
#!/usr/bin/python from mod_pywebsocket import msgutil, util def web_socket_do_extra_handshake(request): pass def web_socket_transfer_data(request): while True: msgutil.send_message(request, request.unparsed_uri.split('?')[1] or '') return
thibdct/bibliotheque-toulouse-python
refs/heads/master
bibliothequetoulouse/__init__.py
1
# -*- coding: utf-8 -*- r"""Les bibliothèques de Toulouse <http://www.bibliotheque.toulouse.fr/> proposent un très vaste choix de livres, DVD et autres créations. :mod:`bibliotheque-toulouse` facilite la récupération des informations du catalogue (exemplaires disponibles, emplacement...). Recherche des exemplaires disp...
nickgu/kvdict2
refs/heads/master
script/benchmark.py
1
#! /bin/env python # encoding=utf-8 # gusimiu@baidu.com # # 对kvdict进行性能测试 # import os import sys import time import random import kvdict2 def random_string(n): ret = ('%1d' % random.randint(0, 10)) * n return ret def test_file(d): d.load(file_name) tm_begin = time.time() for k in key_list: ...
vicnet/weboob
refs/heads/master
contrib/plugin.video.videoobmc/default_test.py
9
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function import sys import resources.lib.test.common_test as common_xbmc import resources.lib.constants as constants from resources.lib.actions import actions print(sys.argv) if len(sys.argv) < 2: actions[constants.DISPLAY_MENU]()._do() else:...
mschwager/CTFd
refs/heads/master
CTFd/admin/statistics.py
1
from flask import current_app as app, render_template, request, redirect, jsonify, url_for, Blueprint from CTFd.utils import admins_only, is_admin, unix_time, get_config, \ set_config, sendmail, rmdir, create_image, delete_image, run_image, container_status, container_ports, \ container_stop, container_start, g...
stephanie-wang/ray
refs/heads/master
python/ray/experimental/actor_pool.py
1
import ray class ActorPool: """Utility class to operate on a fixed pool of actors. Arguments: actors (list): List of Ray actor handles to use in this pool. Examples: >>> a1, a2 = Actor.remote(), Actor.remote() >>> pool = ActorPool([a1, a2]) >>> print(pool.map(lambda a, v:...
ivan-fedorov/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/gis/db/backends/mysql/base.py
308
from django.db.backends.mysql.base import * from django.db.backends.mysql.base import DatabaseWrapper as MySQLDatabaseWrapper from django.contrib.gis.db.backends.mysql.creation import MySQLCreation from django.contrib.gis.db.backends.mysql.introspection import MySQLIntrospection from django.contrib.gis.db.backends.mysq...
pombredanne/milk
refs/heads/master
milk/tests/test_multi_view.py
2
import milk.supervised.multi_view import numpy as np import milk.supervised.svm from milk.supervised.defaultclassifier import feature_selection_simple def test_multi_view(): from milksets.wine import load features, labels = load() features0 = features[::10] features1 = features[1::10] features2 = f...
AnimationMentor/pikatopic
refs/heads/master
setup.py
1
from setuptools import setup setup(name='pikatopic', version='1.0.4', description='A convenience layer atop Pika for use with RabbitMQ topic exchanges.', url='http://github.com/AnimationMentor/pikatopic', author='Reed Wade for Artella.com', author_email='reed@artella.com', license='...
unnikrishnankgs/va
refs/heads/master
venv/lib/python3.5/site-packages/sqlparse/exceptions.py
20
# -*- coding: utf-8 -*- # # Copyright (C) 2016 Andi Albrecht, albrecht.andi@gmail.com # # This module is part of python-sqlparse and is released under # the BSD License: https://opensource.org/licenses/BSD-3-Clause """Exceptions used in this package.""" class SQLParseError(Exception): """Base class for exception...
cybernet14/scikit-learn
refs/heads/master
doc/tutorial/text_analytics/data/movie_reviews/fetch_data.py
278
"""Script to download the movie review dataset""" import os import tarfile try: from urllib import urlopen except ImportError: from urllib.request import urlopen URL = ("http://www.cs.cornell.edu/people/pabo/" "movie-review-data/review_polarity.tar.gz") ARCHIVE_NAME = URL.rsplit('/', 1)[1] DATA_FOLDE...
i/thrift
refs/heads/master
test/py/TestServer.py
12
#!/usr/bin/env python # # 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 # "L...
mecolmg/OscarTweets
refs/heads/master
files/Tweeter.py
1
#Author: Colm Gallagher #Date: 3/11/2015 #Project: Oscar Tweets import csv import plotly.plotly as py from plotly.graph_objs import * from collections import defaultdict #Contains Tweet Data, accesed by (...).value class Tweet: def __init__(self, data): self.time, self.tweetid, self.text, self.rt, \ ...
tardyp/buildbot
refs/heads/master
master/buildbot/test/integration/test_log_finish.py
6
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
urwithajit9/androguard
refs/heads/master
androguard/core/api_specific_resources/api_permission_mappings/api_permission_mappings_api10.py
37
null
motion2015/edx-platform
refs/heads/master
common/test/acceptance/tests/lms/test_lms_course_discovery.py
69
""" Test course discovery. """ import datetime import json from bok_choy.web_app_test import WebAppTest from ..helpers import remove_file from ...pages.common.logout import LogoutPage from ...pages.studio.auto_auth import AutoAuthPage from ...pages.lms.discovery import CourseDiscoveryPage from ...fixtures.course impor...
ibressler/pyqtgraph
refs/heads/master
examples/GLScatterPlotItem.py
28
# -*- coding: utf-8 -*- """ Demonstrates use of GLScatterPlotItem with rapidly-updating plots. """ ## Add path to library (just for examples; you do not need this) import initExample from pyqtgraph.Qt import QtCore, QtGui import pyqtgraph.opengl as gl import numpy as np app = QtGui.QApplication([]) w = gl.GLViewWid...
adhish20/TwitterWithCassandra
refs/heads/master
twiss/lib/python2.7/site-packages/pip/_vendor/html5lib/trie/py.py
1323
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type from bisect import bisect_left from ._base import Trie as ABCTrie class Trie(ABCTrie): def __init__(self, data): if not all(isinstance(x, text_type) for x in data.keys()): raise TypeError...
opensourcechipspark/platform_external_chromium_org
refs/heads/master
tools/telemetry/telemetry/page/page_test_unittest.py
33
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import unittest from telemetry.page import page as page_module from telemetry.page import page_test from telemetry.page.actions import all_page...
cmoutard/mne-python
refs/heads/master
examples/time_frequency/plot_source_power_spectrum.py
19
""" ========================================================= Compute power spectrum densities of the sources with dSPM ========================================================= Returns an STC file containing the PSD (in dB) of each of the sources. """ # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-pariste...
ppwwyyxx/tensorflow
refs/heads/master
tensorflow/python/keras/optimizer_v2/adagrad.py
4
# Copyright 2018 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...
alhashash/odoo
refs/heads/master
addons/hw_escpos/escpos/constants.py
65
# -*- coding: utf-8 -*- """ ESC/POS Commands (Constants) """ # Feed control sequences CTL_LF = '\x0a' # Print and line feed CTL_FF = '\x0c' # Form feed CTL_CR = '\x0d' # Carriage return CTL_HT = '\x09' # Horizontal tab CTL_VT = '\x0b' # Vertic...
InfinitiveOS/external_skia
refs/heads/io-1.0
gm/rebaseline_server/download_actuals_test.py
66
#!/usr/bin/python """ Copyright 2014 Google Inc. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. Test download.py TODO(epoger): Create a command to update the expected results (in self._output_dir_expected) when appropriate. For now, you should: 1. examine the resu...
GovReady/readthedocs.org
refs/heads/master
readthedocs/vcs_support/backends/hg.py
34
from readthedocs.projects.exceptions import ProjectImportError from readthedocs.vcs_support.base import BaseVCS, VCSVersion class Backend(BaseVCS): supports_tags = True supports_branches = True fallback_branch = 'default' def update(self): super(Backend, self).update() retcode = self....
Ayub-Khan/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/modulestore/mixed.py
11
""" MixedModuleStore allows for aggregation between multiple modulestores. In this way, courses can be served up both - say - XMLModuleStore or MongoModuleStore """ import logging from contextlib import contextmanager import itertools import functools from contracts import contract, new_contract from opaque_keys im...
mmatyas/servo
refs/heads/master
tests/wpt/web-platform-tests/websockets/handlers/echo_close_data_wsh.py
258
#!/usr/bin/python from mod_pywebsocket import msgutil _GOODBYE_MESSAGE = u'Goodbye' def web_socket_do_extra_handshake(request): # This example handler accepts any request. See origin_check_wsh.py for how # to reject access from untrusted scripts based on origin value. pass # Always accept. def web_soc...
eleonrk/SickRage
refs/heads/master
lib/hachoir_parser/template.py
58
""" ====================== 8< ============================ This file is an Hachoir parser template. Make a copy of it, and adapt it to your needs. You have to replace all "TODO" with you code. ====================== 8< ============================ TODO parser. Author: TODO TODO Creation date: YYYY-mm-DD """ # TODO:...
zaffra/Donate
refs/heads/master
django/conf/locale/ru/formats.py
80
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = 'j F Y г.' TIME_FORMAT = 'G:i:s' DATETIME_FORMAT = 'j F Y г. G:i:s' YEAR_MONTH_FORMAT = 'F Y г.' MONTH_DAY_FORMAT = 'j F' SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATETIME_FORMAT = 'd.m.Y H:i' FIRST_DAY_O...
pombredanne/tahoe-lafs
refs/heads/master
misc/simulators/hashbasedsig.py
8
#!python # range of hash output lengths range_L_hash = [128] lg_M = 53 # lg(required number of signatures before losing security) limit_bytes = 480000 # limit on signature length limit_cost = 500 # limit on Mcycles_Sig + weight_ver*Mcycles_ver weight_ver = 1 # how imp...
ee08b397/LeetCode-4
refs/heads/master
281 Zigzag Iterator.py
1
""" Premium Question """ __author__ = 'Daniel' class ZigzagIterator(object): def __init__(self, v1, v2): """ Initialize your data structure here. :type v1: List[int] :type v2: List[int] """ self.mat = [v1, v2] self.maxa = max((c, r) for r, c in enumerate(map...
Minkov/site
refs/heads/telerikacademy
event_socket_server/__init__.py
3
from .base_server import BaseServer from .engines import * from .handler import Handler from .helpers import SizedPacketHandler, ZlibPacketHandler, ProxyProtocolMixin def get_preferred_engine(choices=('epoll', 'poll', 'select')): for choice in choices: if choice in engines: return engines[choi...
Novasoft-India/OperERP-AM-Motors
refs/heads/master
openerp/addons/l10n_lu/wizard/__init__.py
63
# -*- 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...
Mrs-X/Darknet
refs/heads/master
test/functional/rpc_users.py
4
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test multiple RPC users.""" from test_framework.test_framework import PivxTestFramework from test_fram...
pabloborrego93/edx-platform
refs/heads/master
common/djangoapps/terrain/stubs/tests/test_youtube_stub.py
172
""" Unit test for stub YouTube implementation. """ import unittest import requests from ..youtube import StubYouTubeService class StubYouTubeServiceTest(unittest.TestCase): def setUp(self): super(StubYouTubeServiceTest, self).setUp() self.server = StubYouTubeService() self.url = "http://...
zenodo/invenio
refs/heads/zenodo-master
invenio/legacy/bibingest/storage_engine_interface.py
13
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License,...
shainer/calamares
refs/heads/master
src/modules/plymouthcfg/main.py
3
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # === This file is part of Calamares - <http://github.com/calamares> === # # Copyright 2016, Artoo <artoo@manjaro.org> # Copyright 2017, Alf Gaida <agaida@siduction.org> # # Calamares is free software: you can redistribute it and/or modify # it under the terms of...
F-Secure/resource-api
refs/heads/dev
src/resource_api_http/__init__.py
12133432
praekelt/unique-code-service
refs/heads/develop
unique_code_service/tests/helpers.py
1
from uuid import uuid4 def populate_pool(pool, flavours, suffixes): return pool.import_unique_codes(str(uuid4()), 'md5', [ { 'flavour': flavour, 'unique_code': '%s%s' % (flavour, suffix), } for flavour in flavours for suffix in suffixes ]) def mk_audit...
MozillaSecurity/FuzzManager
refs/heads/master
TaskStatusReporter/__main__.py
1
# encoding: utf-8 ''' TaskStatusReporter -- Simple Task status reporting tool for TaskManager Provide process and class level interfaces to send simple textual status reports to TaskManager. @author: Jesse Schwartzentruber (:truber) @license: This Source Code Form is subject to the terms of the Mozilla Public L...
samuelhavron/heroku-buildpack-python
refs/heads/master
Python-3.4.3/Lib/test/test_threadedtempfile.py
171
""" Create and delete FILES_PER_THREAD temp files (via tempfile.TemporaryFile) in each of NUM_THREADS threads, recording the number of successes and failures. A failure is a bug in tempfile, and may be due to: + Trying to create more than one tempfile with the same name. + Trying to delete a tempfile that doesn't sti...
makinacorpus/django
refs/heads/master
django/contrib/gis/db/backends/oracle/compiler.py
120
from django.contrib.gis.db.models.sql.compiler import GeoSQLCompiler as BaseGeoSQLCompiler from django.db.backends.oracle import compiler SQLCompiler = compiler.SQLCompiler class GeoSQLCompiler(BaseGeoSQLCompiler, SQLCompiler): pass class SQLInsertCompiler(compiler.SQLInsertCompiler, GeoSQLCompiler): pass c...
CraigRhodes/fs_site
refs/heads/master
freesources/test_freesources/test_views.py
3
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.test import TestCase from django.test import Client from freesources import views import unittest # test for item addition class TestCase(TestCase): fixtures = ['test_data.json'] def setUp(self): self.user = User.objects.cre...
migueldiascosta/easybuild-framework
refs/heads/master
easybuild/toolchains/linalg/blacs.py
3
## # Copyright 2012-2017 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...
eayunstack/nova
refs/heads/develop
nova/compute/monitors/cpu_monitor.py
63
# Copyright 2013 Intel 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
infinity0/l33tutils
refs/heads/master
data/read/solyml.py
1
#!/usr/bin/python -uO """Converts between SOL (Adobe Flash savedata) and YAML.""" import pyamf.sol, yaml#, syck import sys, os, os.path, shutil, traceback pyamf.sol.decode_ = pyamf.sol.decode def decode_unstrict(str): return pyamf.sol.decode_(str, False) pyamf.sol.decode = decode_unstrict class FileRW(object): d...
alsrgv/tensorflow
refs/heads/master
tensorflow/contrib/seq2seq/python/kernel_tests/beam_search_ops_test.py
8
# 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...
michalkurka/h2o-3
refs/heads/master
h2o-py/tests/testdir_misc/pyunit_frame_as_list.py
8
import sys sys.path.insert(1,"../../") import h2o from tests import pyunit_utils def frame_as_list(): iris = h2o.import_file(path=pyunit_utils.locate("smalldata/iris/iris_wheader.csv")) prostate = h2o.import_file(path=pyunit_utils.locate("smalldata/prostate/prostate.csv.zip")) airlines = h2o.import_f...
fvpolpeta/devide
refs/heads/master
modules/vtk_basic/vtkExtractTemporalFieldData.py
7
# class generated by DeVIDE::createDeVIDEModuleFromVTKObject from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase import vtk class vtkExtractTemporalFieldData(SimpleVTKClassModuleBase): def __init__(self, module_manager): SimpleVTKClassModuleBase.__init__( self, module_manager, ...
psychok7/django-project-template-yadpt
refs/heads/master
setup.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path # https://packaging.python.org/distributing/#packaging-your-project # https://packaging.python.org/distributing/#uploading-your-project-to-pypi # https:/...
geraldoandradee/pytest
refs/heads/master
testing/test_assertinterpret.py
4
"PYTEST_DONT_REWRITE" import pytest, py from _pytest.assertion import util def exvalue(): return py.std.sys.exc_info()[1] def f(): return 2 def test_not_being_rewritten(): assert "@py_builtins" not in globals() def test_assert(): try: assert f() == 3 except AssertionError: e = e...
zzzeek/test
refs/heads/master
test/test_inheritance.py
4
from mako.template import Template from mako import lookup, util import unittest from util import flatten_result, result_lines class InheritanceTest(unittest.TestCase): def test_basic(self): collection = lookup.TemplateLookup() collection.put_string('main', """ <%inherit file="base"/> <%def name=...
hiptools/hiptools
refs/heads/master
write_utf.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- """модуль для записи информации в файл. Два первых аргумента - обязательны. Аргументы: 1 имя файла (куда писать), 2 список со строками, 3 параметр записи 4 кодировка """ class write_gen: def write_file(self, f_name, data, mode='w', enc='utf8'): utf = open(f_nam...
normtown/SickRage
refs/heads/master
autoProcessTV/lib/requests/packages/chardet/chardetect.py
1785
#!/usr/bin/env python """ Script which takes one or more file paths and reports on their detected encodings Example:: % chardetect somefile someotherfile somefile: windows-1252 with confidence 0.5 someotherfile: ascii with confidence 1.0 If no paths are provided, it takes its input from stdin. """ from...
imd8594/GroupMeReddit
refs/heads/master
groupmebot/user.py
1
""" Ian Dansereau GroupMeReddit user.py 7/30/16 """ class User(object): def __init__(self, user_id, role, nickname): self._user_id = user_id self._role = role self._nickname = nickname def getId(self): return self._user_id def getRole(self): retur...
salberin/libsigrokdecode
refs/heads/master
decoders/ds1307/pd.py
2
## ## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de> ## Copyright (C) 2013 Matt Ranostay <mranostay@gmail.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 ...
daavery/audacity
refs/heads/master
lib-src/lv2/lv2/plugins/eg-sampler.lv2/waflib/Tools/dbus.py
318
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file from waflib import Task,Errors from waflib.TaskGen import taskgen_method,before_method @taskgen_method def add_dbus_file(self,filename,prefix,mode): if not hasattr(self,'dbus...
eternalthinker/flask-server-rq-example
refs/heads/master
venv/lib/python2.7/site-packages/flask/signals.py
783
# -*- coding: utf-8 -*- """ flask.signals ~~~~~~~~~~~~~ Implements signals based on blinker if available, otherwise falls silently back to a noop :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ signals_available = False try: from blinker import Name...
mic4ael/indico
refs/heads/master
indico/modules/events/papers/controllers/paper.py
1
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals import os from collections import defaultdict from itertools impo...
sangeethah/validation-tests
refs/heads/master
tests/v2_validation/cattlevalidationtest/core/test_services.py
1
from common_fixtures import * # NOQA from cattle import ApiError from test_services_lb_balancer import create_environment_with_balancer_services TEST_SERVICE_OPT_IMAGE = 'ibuildthecloud/helloworld' TEST_SERVICE_OPT_IMAGE_LATEST = TEST_SERVICE_OPT_IMAGE + ':latest' TEST_SERVICE_OPT_IMAGE_UUID = 'docker:' + TEST_SERVI...
rhosqeauto/InfraRed
refs/heads/master
tests/__init__.py
12133432
nicolewhite/py2neo
refs/heads/release/2.0.8
test/core/__init__.py
12133432
maxsocl/django
refs/heads/master
tests/db_functions/__init__.py
12133432
disqus/django-old
refs/heads/master
django/conf/locale/sq/__init__.py
12133432
opennode/waldur-mastermind
refs/heads/develop
src/waldur_mastermind/support/tests/unittests/__init__.py
12133432
levigross/pyscanner
refs/heads/master
mytests/django/contrib/humanize/templatetags/__init__.py
12133432
tod31/pyload
refs/heads/stable
module/plugins/crypter/MegauploadComFolder.py
5
# -*- coding: utf-8 -*- from module.plugins.internal.DeadCrypter import DeadCrypter class MegauploadComFolder(DeadCrypter): __name__ = "MegauploadComFolder" __type__ = "crypter" __version__ = "0.07" __status__ = "stable" __pattern__ = r'http://(?:www\.)?megaupload\.com/(\?f|xml/folderfile...
utecuy/edx-platform
refs/heads/master
cms/envs/yaml_config.py
49
""" This is the default template for our main set of AWS servers. Before importing this settings file the following MUST be defined in the environment: * SERVICE_VARIANT - can be either "lms" or "cms" * CONFIG_ROOT - the directory where the application yaml config files are located """ #...
Omegaphora/external_chromium_org_tools_gyp
refs/heads/lp5.1
test/msvs/multiple_actions_error_handling/action_succeed.py
124
# Copyright (c) 2014 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys sys.exit(0)
iamshawnrice/htmlboilerplate
refs/heads/master
node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/MSVSProject.py
2736
# Copyright (c) 2012 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. """Visual Studio project reader/writer.""" import gyp.common import gyp.easy_xml as easy_xml #-------------------------------------------------------------------...
bliti/django-nonrel-1.5
refs/heads/nonrel-1.5
django/core/management/sql.py
104
from __future__ import unicode_literals import codecs import os import re from django.conf import settings from django.core.management.base import CommandError from django.db import models from django.db.models import get_models from django.utils._os import upath def sql_create(app, style, connection): "Returns...
hale36/SRTV
refs/heads/master
lib/subliminal/__init__.py
13
# -*- coding: utf-8 -*- __title__ = 'subliminal' __version__ = '1.1.0.dev0' __author__ = 'Antoine Bertin' __license__ = 'MIT' __copyright__ = 'Copyright 2015, Antoine Bertin' import logging from .api import (ProviderPool, check_video, provider_manager, download_best_subtitles, download_subtitles, li...
SamiHiltunen/invenio-accounts
refs/heads/master
tests/conftest.py
1
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015, 2016 CERN. # # Invenio is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any...
fgesora/odoo
refs/heads/8.0
addons/website_blog/tests/common.py
279
# -*- coding: utf-8 -*- from openerp.tests import common class TestWebsiteBlogCommon(common.TransactionCase): def setUp(self): super(TestWebsiteBlogCommon, self).setUp() Users = self.env['res.users'] group_blog_manager_id = self.ref('base.group_document_user') group_employee_id =...
pvlib/pvlib-python
refs/heads/master
pvlib/snow.py
3
""" The ``snow`` module contains functions that model module snow cover and the associated effects on PV module output """ import numpy as np import pandas as pd from pvlib.tools import sind def _time_delta_in_hours(times): delta = times.to_series().diff() return delta.dt.total_seconds().div(3600) def full...
chandler14362/antlr4
refs/heads/master
runtime/Python3/src/antlr4/atn/ParserATNSimulator.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. # # # The embodiment of the adaptive LL(*), ALL(*), parsing strategy. # # <p> # The basic complexity of the adaptive strategy m...
Kazade/NeHe-Website
refs/heads/master
google_appengine/lib/django-1.5/django/contrib/gis/db/backends/spatialite/introspection.py
221
from django.contrib.gis.gdal import OGRGeomType from django.db.backends.sqlite3.introspection import DatabaseIntrospection, FlexibleFieldLookupDict from django.utils import six class GeoFlexibleFieldLookupDict(FlexibleFieldLookupDict): """ Sublcass that includes updates the `base_data_types_reverse` dict f...
amosonn/distributed
refs/heads/master
distributed/diagnostics/progress_stream.py
1
from __future__ import print_function, division, absolute_import import logging from toolz import valmap, merge from tornado import gen from .progress import AllProgress from ..core import connect, write, coerce_to_address from ..scheduler import Scheduler from ..worker import dumps_function logger = logging.getL...
deepsrijit1105/edx-platform
refs/heads/master
lms/djangoapps/branding/tests/test_page.py
7
""" Tests for branding page """ import datetime from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.http import HttpResponseRedirect from django.test.utils import override_settings from django.test.client import RequestFactory from pytz import UTC from mock import patch,...
Dhivyap/ansible
refs/heads/devel
lib/ansible/modules/network/avi/avi_alertsyslogconfig.py
28
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ANSIB...
40223145c2g18/40223145
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/logging/__init__.py
733
# Copyright 2001-2013 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
sayan801/indivo_server
refs/heads/master
indivo/lib/query.py
3
""" Common Functionality for support of the Query API """ from indivo.lib.sharing_utils import carenet_facts_filter from indivo.lib.utils import render_template from indivo.lib.iso8601 import parse_utc_date from django.db.models import Avg, Count, Max, Min, Sum from django.db import connection from django.db.backends ...
Azure/azure-sdk-for-python
refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline
sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/version.py
15
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
yrizk/django-blog
refs/heads/master
blogvenv/lib/python3.4/site-packages/django/contrib/gis/db/backends/util.py
81
import warnings from django.utils.deprecation import RemovedInDjango19Warning warnings.warn( "The django.contrib.gis.db.backends.util module has been renamed. " "Use django.contrib.gis.db.backends.utils instead.", RemovedInDjango19Warning, stacklevel=2) from django.contrib.gis.db.backends.utils import * ...
3dfxsoftware/cbss-addons
refs/heads/master
sale_stock/company.py
7
# -*- 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...
renanalencar/hermes
refs/heads/master
feedinfo/tests.py
24123
from django.test import TestCase # Create your tests here.
jpalladino84/Python-Roguelike-Framework
refs/heads/master
areas/tile.py
2
class Tile(object): def __init__(self, x, y, is_blocked=False): self.x = x self.y = y self.is_blocked = is_blocked self.is_explored = False self.is_ground = False self.contains_object = None self.block_sight = is_blocked