repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
edilio/StreamingHttpResponse
refs/heads/master
StreamingHttpResponse/apps/stream/models.py
10644
from django.db import models # Create your models here.
dancingdan/tensorflow
refs/heads/master
tensorflow/contrib/distributions/__init__.py
16
# 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...
tasoc/photometry
refs/heads/devel
docs/conf.py
1
# -*- coding: utf-8 -*- import sys import os import shutil import warnings from datetime import datetime # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it ab...
sunu/oh-missions-oppia-beta
refs/heads/master
extensions/rules/tar_file_string.py
4
# coding: utf-8 # # 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 requi...
IlinArkady/IlinArkady
refs/heads/master
practice13/__init__.py
17
__author__ = 'student'
DJArmstrong/autovet
refs/heads/master
NGTS_pipeline/NGTS_infile_splitter.py
1
#quick code to split a multiloader input file infile = '/home/dja/Autovetting/Dataprep/multiloader_input_TEST18_v2.txt' indata = np.genfromtxt(infile, names=True, dtype=None) nsplits = 24 splitarrays = np.array_split(indata,nsplits) for s,savearray in enumerate(splitarrays): outfile = infile[:-4]+'_'+str(s)+'....
azumimuo/family-xbmc-addon
refs/heads/master
script.module.urlresolver/lib/urlresolver/plugins/ecostream.py
10
""" urlresolver XBMC Addon Copyright (C) 2011 t0mm0 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distribute...
nishworks/stormborn
refs/heads/master
flask_app/manage.py
2
import logging import os import sys # Following code is to fix few issues related to python imports # TODO: Remove this code with better solution current_dir = os.path.dirname(os.path.abspath(__file__)) top_level_dir = os.path.abspath(os.path.join(current_dir, os.pardir)) if top_level_dir not in sys.path: sys.pat...
dslomov/intellij-community
refs/heads/master
python/helpers/docutils/parsers/rst/languages/ja.py
57
# -*- coding: utf-8 -*- # $Id: ja.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two fi...
fspaolo/scikit-learn
refs/heads/master
examples/covariance/plot_robust_vs_empirical_covariance.py
8
""" ======================================= Robust vs Empirical covariance estimate ======================================= The usual covariance maximum likelihood estimate is very sensitive to the presence of outliers in the data set. In such a case, it would be better to use a robust estimator of covariance to guara...
uberamd/NGECore2
refs/heads/master
scripts/object/mobile/king_merek_harvester.py
85615
import sys def setup(core, object): return
havard024/prego
refs/heads/master
venv/lib/python2.7/site-packages/PIL/JpegPresets.py
18
""" JPEG quality settings equivalent to the Photoshop settings. More presets can be added to the presets dict if needed. Can be use when saving JPEG file. To apply the preset, specify:: quality="preset_name" To apply only the quantization table:: qtables="preset_name" To apply only the subsampling setting:: ...
pombredanne/stockpile
refs/heads/master
stockpile/utils/__init__.py
7
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals
iver56/trondheim.kodeklubben.no
refs/heads/master
backend/wsgi/usermanagement/serializers.py
2
from django.contrib.auth.models import User from rest_framework import serializers class UserSerializer(serializers.ModelSerializer): class Meta: model = User fields = ('password', 'first_name', 'last_name', 'email', 'username') write_only_fields = ('password',) def restore_object(...
auduny/home-assistant
refs/heads/dev
tests/components/mhz19/__init__.py
36
"""Tests for the mhz19 component."""
blademainer/intellij-community
refs/heads/master
python/testData/fillParagraph/emptyMultilineString_after.py
79
a = """ """
shaker/backup_oracle
refs/heads/master
backup.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Скрипт для запуска резервного копирования базы Oracle. Скрипт выполняет следующие действия: запускает резервное копирование с помощью RMAN, делает экспорт базы с помощью утилиты EXP, копирует резервные копии RMAN и файл экспорта в специально предназначенный для этого к...
takeflight/wagtailnews
refs/heads/master
wagtailnews/views/chooser.py
1
import json import logging from django.apps import apps from django.contrib.contenttypes.models import ContentType from django.core.exceptions import PermissionDenied from django.http import Http404 from django.shortcuts import get_object_or_404, redirect, render from django.urls import reverse from wagtail.admin.form...
joaduo/smoothtest
refs/heads/master
smoothtest/tests/example/smoke_test_example.py
1
# -*- coding: utf-8 -*- ''' Smoothtest Copyright (c) 2014 Juju. Inc Code Licensed under MIT License. See LICENSE file. ''' def smoke_test_module(): ''' Simple self-contained test for the module ''' import logging logging.info('Example smoke test') if __name__ == '__main__': smoke_test_module()
waseem18/oh-mainline
refs/heads/master
vendor/packages/gdata/src/gdata/books/__init__.py
124
#!/usr/bin/python """ Data Models for books.service All classes can be instantiated from an xml string using their FromString class method. Notes: * Book.title displays the first dc:title because the returned XML repeats that datum as atom:title. There is an undocumented gbs:ope...
stevehof/location-ninja
refs/heads/master
lib/werkzeug/contrib/iterio.py
147
# -*- coding: utf-8 -*- r""" werkzeug.contrib.iterio ~~~~~~~~~~~~~~~~~~~~~~~ This module implements a :class:`IterIO` that converts an iterator into a stream object and the other way round. Converting streams into iterators requires the `greenlet`_ module. To convert an iterator into a stream...
cwisecarver/osf.io
refs/heads/develop
admin/pre_reg/templatetags/prereg_extras.py
38
from django import template from admin.base.utils import reverse_qs register = template.Library() @register.simple_tag def reverse_list(*args, **kwargs): return reverse_qs('pre_reg:prereg', query_kwargs=kwargs)
TomHeatwole/osf.io
refs/heads/develop
website/addons/figshare/routes.py
54
from framework.routing import Rule, json_renderer from . import views settings_routes = { 'rules': [ # OAuth: Node Rule([ '/project/<pid>/figshare/oauth/', '/project/<pid>/node/<nid>/figshare/oauth', ], 'get', views.auth.figshare_oauth_start, json_renderer), ...
ebsaral/django-rest-framework
refs/heads/master
rest_framework/status.py
110
""" Descriptive HTTP status codes, for code readability. See RFC 2616 - http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html And RFC 6585 - http://tools.ietf.org/html/rfc6585 """ from __future__ import unicode_literals def is_informational(code): return code >= 100 and code <= 199 def is_success(code): r...
drayanaindra/shoop
refs/heads/master
shoop/admin/dashboard/__init__.py
7
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from .blocks import ( DashboardBlock, DashboardChartBlock, Dash...
matthiascy/panda3d
refs/heads/master
makepanda/expandimports.py
22
######################################################################## ## ## Win32 Usage: makepanda\expandimports.bat ## Linux Usage: makepanda/expandimports.py ## ######################################################################## import sys,os,re sys.path = ["direct/src/directscripts"] + sys.path import gendo...
highweb-project/highweb-webcl-html5spec
refs/heads/highweb-20160310
ppapi/generators/idl_lint.py
180
# 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. """ Lint for IDL """ import os import sys from idl_log import ErrOut, InfoOut, WarnOut from idl_node import IDLAttribute, IDLNode from idl_ast import I...
dudanogueira/microerp
refs/heads/master
microerp/cadastro/migrations/0005_cliente_id_referencia_criado.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('cadastro', '0004_auto_20140922_1533'), ] operations = [ migrations.AddField( model_name='cliente', n...
shanemcd/ansible
refs/heads/devel
lib/ansible/modules/storage/netapp/na_cdot_volume.py
28
#!/usr/bin/python # (c) 2017, NetApp, 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
KevZho/mallbot
refs/heads/master
kol/request/SearchPlayerRequest.py
4
from GenericRequest import GenericRequest from kol.manager import PatternManager STARTSWITH = 1 CONTAINS = 2 ENDSWITH = 3 class SearchPlayerRequest(GenericRequest): def __init__(self, session, queryString, queryType=STARTSWITH, pvpOnly=False, hardcoreOnly=None, searchLevel=None, searchRanking=None): super...
sjshank/spotEmployee
refs/heads/master
node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py
1841
#!/usr/bin/env python # Copyright 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for the input.py file.""" import gyp.input import unittest import sys class TestFindCycles(unittest.TestCase): def setUp(self...
jat255/hyperspy
refs/heads/RELEASE_next_minor
hyperspy/_components/skew_normal.py
4
# -*- coding: utf-8 -*- # Copyright 2007-2020 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at...
gentledevil/ansible
refs/heads/devel
lib/ansible/utils/module_docs_fragments/backup.py
427
# Copyright (c) 2015 Ansible, Inc # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansi...
jordankoschei/jordankoschei-dot-com
refs/heads/master
wp-content/themes/pleiades/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py
1363
# 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. import filecmp import gyp.common import gyp.xcodeproj_file import gyp.xcode_ninja import errno import os import sys import posixpath import re import shutil import...
FusionSP/android_external_chromium_org
refs/heads/lp5.1
tools/telemetry/telemetry/value/merge_values.py
54
# 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 telemetry.value import failure from telemetry.value import skip def MergeLikeValuesFromSamePage(all_values): """Merges values that measure the same ...
Eagles2F/sync-engine
refs/heads/master
tests/api_legacy/test_events.py
3
import json import pytest from inbox.sqlalchemy_ext.util import generate_public_id from inbox.models import Event from tests.util.base import db, calendar, add_fake_event from tests.api_legacy.base import api_client __all__ = ['api_client', 'calendar', 'db'] def test_create_event(db, api_client, calendar): e_da...
shsingh/ansible
refs/heads/devel
test/units/modules/network/nxos/test_nxos_banner.py
68
# This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that ...
socialsweethearts/django-allauth
refs/heads/master
allauth/socialaccount/providers/stackexchange/urls.py
76
from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns from .provider import StackExchangeProvider urlpatterns = default_urlpatterns(StackExchangeProvider)
Teamxrtc/webrtc-streaming-node
refs/heads/master
third_party/webrtc/src/chromium/src/tools/copyright_scanner/PRESUBMIT.py
55
# 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. def CheckChangeOnUpload(input_api, output_api): return _CommonChecks(input_api, output_api) def CheckChangeOnCommit(input_api, output_api): return _Comm...
ashutrix03/inteygrate_flaskapp-master
refs/heads/master
yowsup/layers/protocol_groups/protocolentities/iq_groups_participants_demote.py
61
from yowsup.structs import ProtocolEntity, ProtocolTreeNode from .iq_groups_participants import ParticipantsGroupsIqProtocolEntity class DemoteParticipantsIqProtocolEntity(ParticipantsGroupsIqProtocolEntity): ''' <iq type="set" id="{{id}}" xmlns="w:g2", to="{{group_jid}}"> <demote> <partic...
manashmndl/kivy
refs/heads/master
kivy/core/clipboard/_clipboard_ext.py
57
''' Clipboard ext: base class for external command clipboards ''' __all__ = ('ClipboardExternalBase', ) from kivy.core.clipboard import ClipboardBase class ClipboardExternalBase(ClipboardBase): @staticmethod def _clip(inout, selection): raise NotImplementedError('clip method not implemented') d...
swdream/neutron
refs/heads/master
neutron/tests/fullstack/resources/config.py
3
# Copyright 2015 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 agre...
wanghaosen/Rover2.0
refs/heads/master
soundReceive.py
2
#!/usr/bin/env python ''' soundReceive.py Receive sound from rover then play it. Copyright (C) 2014 Haosen Wang This program 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 the Lice...
liuzheng712/Misago
refs/heads/master
misago/threads/posting/recordedit.py
8
from django.db.models import F from misago.threads.posting import PostingMiddleware, EDIT class RecordEditMiddleware(PostingMiddleware): def __init__(self, **kwargs): super(RecordEditMiddleware, self).__init__(**kwargs) if self.mode == EDIT: self.original_title = self.thread.title ...
mitocw/edx-platform
refs/heads/master
openedx/core/djangoapps/credit/tests/factories.py
4
# pylint:disable=missing-docstring import datetime import json import uuid import factory from factory.fuzzy import FuzzyText import pytz from django.contrib.auth.models import User from openedx.core.djangoapps.credit.models import ( CreditCourse, CreditEligibility, CreditProvider, CreditRequest, ...
tswast/google-cloud-python
refs/heads/master
kms/google/cloud/kms.py
2
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
untitaker/beets
refs/heads/master
beetsplug/mbsync.py
23
# This file is part of beets. # Copyright 2015, Jakob Schnitzer. # # 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,...
antoinecarme/sklearn2sql_heroku
refs/heads/master
tests/regression/RandomReg_10/ws_RandomReg_10_LGBMRegressor_db2_code_gen.py
1
from sklearn2sql_heroku.tests.regression import generic as reg_gen reg_gen.test_model("LGBMRegressor" , "RandomReg_10" , "db2")
leprechaun/s3sshkeysyncer
refs/heads/master
tests/__init__.py
14224
# -*- coding: utf-8 -*-
alekseik1/python_mipt_study
refs/heads/master
1sem/from_list/9.py
2
import turtle as t t.shape('turtle') def draw_circle(r): a = 3 dx= r * 3.14/180*a for i in range(1000): t.forward(dx) r = r + 0.5 dx= r * 3.14/180*a t.left(a) draw_circle(50)
chrisfranzen/django
refs/heads/master
tests/regressiontests/admin_views/admin.py
2
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import tempfile import os from django import forms from django.contrib import admin from django.contrib.admin.views.main import ChangeList from django.core.files.storage import FileSystemStorage from django.core.mail import EmailMessage ...
unlimitedlabs/orchestra
refs/heads/dependabot-npm_and_yarn-lodash-4.17.21
orchestra/tests/helpers/fixtures.py
1
from datetime import timedelta from unittest.mock import patch import factory from dateutil.parser import parse from django.contrib.auth.models import User from django.test import Client from django.test import override_settings from django.utils import timezone from orchestra.communication.slack import create_projec...
CodaMais/CodaMais
refs/heads/master
CodaMais/theory/constants.py
1
# THEORY FIELDS. TITLE_FIELD_LENGHT = 70 # REDACTOR. MIN_REDACTOR_HEIGHT = 400 REDACTOR_PLACEHOLDER = 'Write here the content...' REQUEST_SUCCEEDED = 200 # 200 is return with success response.
jehutting/kivy
refs/heads/master
kivy/modules/recorder.py
44
''' Recorder module =============== .. versionadded:: 1.1.0 Create an instance of :class:`~kivy.input.recorder.Recorder`, attach to the class, and bind some keys to record / play sequences: - F6: play the last record in a loop - F7: read the latest recording - F8: record input events Configuration -----...
ecolitan/fatics
refs/heads/master
src/command/var_command.py
1
# -*- coding: utf-8 -*- # Copyright (C) 2010 Wil Mahan <wmahan+fatics@gmail.com> # # This file is part of FatICS. # # FatICS is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
cloudtools/troposphere
refs/heads/master
troposphere/codedeploy.py
1
# Copyright (c) 2015, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty from .validators import boolean, exactly_one, mutually_exclusive, positive_integer KEY_ONLY = "KEY_ONLY" VALUE_ONLY = "VALUE_ONLY" KEY_AND_VALUE = "KEY_AND_VALUE" class ...
kawamon/hue
refs/heads/master
desktop/core/ext-py/boto-2.46.1/tests/unit/swf/test_layer1_decisions.py
114
from tests.unit import unittest import boto.swf.layer1_decisions class TestDecisions(unittest.TestCase): def setUp(self): self.decisions = boto.swf.layer1_decisions.Layer1Decisions() def assert_data(self, *data): self.assertEquals(self.decisions._data, list(data)) def test_continue_as_...
fatrix/django-golive
refs/heads/master
project_examples/django_example/django_example/settings_testing.py
3
from settings import * DEBUG = True DATABASES['default']['HOST'] = 'xcoredb' print DATABASES
errx/django
refs/heads/master
tests/delete_regress/tests.py
19
from __future__ import unicode_literals import datetime from django.conf import settings from django.db import transaction, DEFAULT_DB_ALIAS, models from django.db.utils import ConnectionHandler from django.test import TestCase, TransactionTestCase, skipUnlessDBFeature from .models import (Book, Award, AwardNote, Pe...
playm2mboy/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/tests/test_randomize_module.py
56
import unittest from datetime import datetime, timedelta from django.utils.timezone import UTC from opaque_keys.edx.locator import BlockUsageLocator from xblock.fields import ScopeIds from xmodule.randomize_module import RandomizeModule from .test_course_module import DummySystem as DummyImportSystem ORG = 'test_or...
mozilla/FlightDeck
refs/heads/master
apps/repackage/views.py
1
""" repackage.views --------------- """ import commonware import simplejson from django.conf import settings from django.http import (HttpResponse, HttpResponseBadRequest, HttpResponseForbidden) from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST from djan...
dcroc16/skunk_works
refs/heads/master
google_appengine/lib/grizzled/grizzled/file/includer.py
19
#!/usr/bin/env python # NOTE: Documentation is intended to be processed by epydoc and contains # epydoc markup. ''' Introduction ============ The ``grizzled.file.includer`` module contains a class that can be used to process includes within a text file, returning a file-like object. It also contains some utility fun...
skoslowski/gnuradio
refs/heads/master
gr-fec/python/fec/polar/testbed.py
3
#!/usr/bin/env python # # Copyright 2015 Free Software Foundation, Inc. # # SPDX-License-Identifier: GPL-3.0-or-later # # from __future__ import print_function from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from .encoder import PolarEncoder from .decode...
DreamWFJ/Everyeye
refs/heads/master
app/core/common/user_mixin.py
1
# -*- coding: utf-8 -*- # =================================== # ScriptName : user_mixin.py # Author : WFJ # Email : wfj_sc@163.com # CreateTime : 2017-03-28 9:36 # =================================== import sys class UserMixin(object): ''' This provides default implementations for the methods that Fl...
ReachingOut/unisubs
refs/heads/staging
sitemaps.py
6
from django.contrib.sitemaps import Sitemap from videos.models import Video from django.core.urlresolvers import reverse from django.conf import settings from django.db.models import permalink from django.http import HttpResponse, Http404 from django.template import loader from django.utils.encoding import smart_str fr...
zwhinmedia/TextRank
refs/heads/master
textrank4zh/Segmentation.py
1
#-*- encoding:utf-8 -*- """ @author: Weihao Zhou @github: https://github.com/zwhinmedia/ """ from __future__ import (absolute_import, division, print_function, unicode_literals) import jieba.posseg as pseg import codecs import os from . import util def get_default_stop_words_file(): d...
0359xiaodong/viewfinder
refs/heads/master
marketing/tornado/test/process_test.py
23
#!/usr/bin/env python from __future__ import absolute_import, division, print_function, with_statement import logging import os import signal import subprocess import sys from tornado.httpclient import HTTPClient, HTTPError from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop from tornado.log i...
ojii/sandlib
refs/heads/master
lib/lib-python/2.7/test/test_multiprocessing.py
1
#!/usr/bin/env python # # Unit tests for the multiprocessing package # import unittest import Queue import time import sys import os import gc import signal import array import socket import random import logging import errno from test import test_support from StringIO import StringIO _multiprocessing = test_support....
paolopaolopaolo/django-rest-framework
refs/heads/master
runtests.py
63
#! /usr/bin/env python from __future__ import print_function import os import subprocess import sys import pytest PYTEST_ARGS = { 'default': ['tests', '--tb=short', '-s'], 'fast': ['tests', '--tb=short', '-q', '-s'], } FLAKE8_ARGS = ['rest_framework', 'tests', '--ignore=E501'] ISORT_ARGS = ['--recursive', ...
Orochimarufan/youtube-dl
refs/heads/master
youtube_dl/extractor/matchtv.py
64
# coding: utf-8 from __future__ import unicode_literals import random from .common import InfoExtractor from ..utils import xpath_text class MatchTVIE(InfoExtractor): _VALID_URL = r'https?://matchtv\.ru(?:/on-air|/?#live-player)' _TESTS = [{ 'url': 'http://matchtv.ru/#live-player', 'info_dic...
JetBrains/intellij-community
refs/heads/master
python/testData/psi/assignment/TupleMapped.py
83
<dst1>a, <dst2>b = <src1>1, <src2>2
geier/telescope
refs/heads/master
telescope/__init__.py
1
#!/usr/bin/env python3 """Telescope -- looking for the stars. Getting releases of starred github repos that occurred during the week. """ # Configuration USER = 'geier' # put your username here TOKEN = False # set this or create a file token.txt containing the access token DAYS = 8 # getting releases for th...
eaufavor/pyshark-ssl
refs/heads/master
src/pyshark/capture/capture.py
1
from __future__ import unicode_literals import os import logbook import sys import trollius as asyncio from trollius import From, subprocess, Return from trollius.executor import TimeoutError from trollius.py33_exceptions import ProcessLookupError from pyshark.tshark.tshark import get_tshark_path, get_tshark_display_...
liikGit/MissionPlanner
refs/heads/master
Lib/encodings/mac_centeuro.py
93
""" Python Character Mapping Codec mac_centeuro generated from 'MAPPINGS/VENDORS/APPLE/CENTEURO.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 de...
samuelchong/libcloud
refs/heads/trunk
libcloud/compute/__init__.py
65
""" Module for working with Cloud Servers """
casey-green/luigi
refs/heads/master
test/clone_test.py
12
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
kenshay/ImageScripter
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/OpenGL/raw/GLES2/OES/surfaceless_context.py
8
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GLES2 import _types as _cs # End users want this... from OpenGL.raw.GLES2._types import * from OpenGL.raw.GLES2 import _errors from OpenGL.constant import Constant as _C import...
EDRN/DMCCBackend
refs/heads/master
src/edrndmcc.appserver/edrndmcc/appserver/tests/test_setup.py
2
# encoding: utf-8 # Copyright 2008 California Institute of Technology. ALL RIGHTS # RESERVED. U.S. Government Sponsorship acknowledged. '''Tests for the setup of the site policy. ''' import unittest from Products.CMFCore.utils import getToolByName from edrndmcc.appserver.testing import EDRN_DMCC_APP_SERVER_FUNCTIONAL...
yan12125/youtube-dl
refs/heads/master
youtube_dl/extractor/godtube.py
64
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( parse_duration, parse_iso8601, ) class GodTubeIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?godtube\.com/watch/\?v=(?P<id>[\da-zA-Z]+)' _TESTS = [ { 'url': 'https://ww...
bryx-inc/boto
refs/heads/develop
boto/gs/bucketlistresultset.py
168
# Copyright 2012 Google Inc. # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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 ...
ianatpn/nupictest
refs/heads/master
examples/prediction/experiments/confidenceTest/base/permutations_firstOrder.py
54
#!/usr/bin/env python permutations = dict( dataSetPackage = ['firstOrder'], iterationCountTest = [1000], spNumActivePerInhArea = [1], tpNCellsPerCol = [1], tpInitialPerm = [0.11], tpPerma...
brettchien/PyBLEWrapper
refs/heads/master
pyble/const/service/blood_pressure.py
1
NAME="Blood Pressure" UUID=0x1810
BUKMAR/Mart24
refs/heads/master
assets/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py
2542
#!/usr/bin/env python # 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. """Unit tests for the common.py file.""" import gyp.common import unittest import sys class TestTopologicallySorted(unittest.TestCase): ...
xiangel/hue
refs/heads/master
desktop/core/ext-py/requests-2.6.0/requests/exceptions.py
894
# -*- coding: utf-8 -*- """ requests.exceptions ~~~~~~~~~~~~~~~~~~~ This module contains the set of Requests' exceptions. """ from .packages.urllib3.exceptions import HTTPError as BaseHTTPError class RequestException(IOError): """There was an ambiguous exception that occurred while handling your request.""...
viniciuschiele/flask-webapi
refs/heads/master
flask_webapi/utils/html.py
1
""" Helpers for dealing with HTML input. """ def is_html_input(dictionary): # MultiDict type datastructures are used to represent HTML form input, # which may have more than one value for each key. return hasattr(dictionary, 'getlist')
mateon1/servo
refs/heads/master
tests/wpt/css-tests/tools/py/doc/example/genhtmlcss.py
217
import py html = py.xml.html class my(html): "a custom style" class body(html.body): style = html.Style(font_size = "120%") class h2(html.h2): style = html.Style(background = "grey") class p(html.p): style = html.Style(font_weight="bold") doc = my.html( my.head(), my....
OpenSeizureDetector/ESP8266_SD
refs/heads/master
testing/pyApi/xlrd/info.py
14
__VERSION__ = "0.9.4"
moriyoshi/pyakb48
refs/heads/master
akb48/member/kitahara_rie.py
1
# encoding: utf-8 import datetime __all__ = [ 'info', ] def info(): return { 'birthday': datetime.date(1991, 6, 24), 'class': 5, 'family_name_en': u'kitahara', 'family_name_kana': u'きたはら', 'first_name_en': u'rie', 'first_name_kana': ...
mrquim/repository.mrquim
refs/heads/master
script.module.covenant/lib/resources/lib/sources/en/to_be_fixed/needsfixing/playbox.py
8
# -*- coding: utf-8 -*- ''' Covenant Add-on This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This prog...
Centre-Alt-Rendiment-Esportiu/att
refs/heads/master
src/python/test/classes/ball_detector/BallDetector.py
1
from collections import deque import cv2 import numpy as np from test.classes.ball_detector.BackgroundDetector import BackgroundDetector from test.classes.ball_detector.BlobDetector import BlobDetector from test.classes.ball_detector.Neighborhood import Neighborhood from test.classes.ball_detector.TableDetector impor...
DoubleNegativeVisualEffects/cortex
refs/heads/master
python/IECoreMaya/NumericParameterUI.py
12
########################################################################## # # Copyright (c) 2010, Image Engine Design 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: # # * Redistribu...
tirkarthi/guake
refs/heads/master
src/guake/tests/test_quit_edit.py
13
import guake import unittest class TestQuickEdit(unittest.TestCase): def testMatch(self): print guake if __name__ == '__main__': unittest.main()
udrg/kalibr
refs/heads/master
aslam_offline_calibration/kalibr/python/kalibr_rs_camera_calibration/RsCalibrator.py
3
#encoding:UTF-8 import sm import aslam_backend as aopt import aslam_cv_backend as acvb import aslam_cv as acv import aslam_splines as asp import incremental_calibration as inc import bsplines import numpy as np import multiprocessing import sys import gc import math from ReprojectionErrorKnotSequenceUpdateStrategy impo...
jzoldak/edx-platform
refs/heads/master
lms/djangoapps/course_api/tests/mixins.py
58
""" Common mixins for Course API Tests """ from datetime import datetime from student.tests.factories import UserFactory from xmodule.modulestore.tests.factories import ToyCourseFactory TEST_PASSWORD = u'edx' class CourseApiFactoryMixin(object): """ Mixin to allow creation of test courses and users. "...
kris-singh/pgmpy
refs/heads/dev
pgmpy/sampling/__init__.py
3
from .base import (BaseGradLogPDF, GradLogPDFGaussian, LeapFrog, ModifiedEuler, BaseSimulateHamiltonianDynamics) from .HMC import HamiltonianMC, HamiltonianMCDA from .NUTS import NoUTurnSampler, NoUTurnSamplerDA from .Sampling import GibbsSampling, BayesianModelSampling __all__ = ['Lea...
tkf/compapp
refs/heads/master
src/compapp/descriptors/tests/test_complex.py
1
from ...core import Parametric from .. import Or, Link, OfType class Pluggy(Parametric): fallback = Or(OfType(bool), Link('...pluggy.fallback'), default=False) class Nestable(Parametric): pluggy = Pluggy class Root(Nestable): class sub(Nestable): class sub(Nestable): class sub(Nest...
yk0242/incubation
refs/heads/master
incubation-python/appBone/top.py
1
# -*- coding: utf-8 -*- """ プロジェクトシステムのトップページ 通常はboot.pyからブート後、ここに来ます。 """ import os.path from kivy.lang import Builder from kivy.uix.screenmanager import Screen import logging logger = logging.getLogger(__name__) file_path = os.path.abspath(os.path.join(os.path.dirname(__file__), 'top.kv')) with open(file_path...
ycl2045/nova-master
refs/heads/master
nova/tests/test_wsgi.py
13
# Copyright 2011 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
MER-GROUP/intellij-community
refs/heads/master
python/testData/codeInsight/smartEnter/argumentsFirst.py
83
def foo(*a): pass foo<caret>(1, 2, 3
Bismarrck/tensorflow
refs/heads/master
tensorflow/python/debug/examples/debug_tflearn_iris.py
19
# 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...