repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
fhaoquan/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/encodings/cp861.py
272
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP861.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_map) def decode(self,input,errors='strict'): ...
andrei4ka/fuel-web-redhat
refs/heads/master
fuel_agent/fuel_agent/tests/test_image.py
6
# Copyright 2014 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
teslaji/homebase
refs/heads/master
venv/HomeBase/lib/python3.5/site-packages/django/core/signals.py
684
from django.dispatch import Signal request_started = Signal(providing_args=["environ"]) request_finished = Signal() got_request_exception = Signal(providing_args=["request"]) setting_changed = Signal(providing_args=["setting", "value", "enter"])
wroberts/wkr.py
refs/heads/master
tests/test_wkr.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `wkr.__init__` package.""" import itertools import json import random import string import timeit from functools import reduce import pytest import wkr def random_value(val_type): """ Create a random value of a given type. :param str val_type...
autowitch/moop
refs/heads/master
lib/visualizers/matplotlib.py
1
import matplotlib as mpl from mpl_toolkits.mplot3d import Axes3D import numpy as np import matplotlib.pyplot as plt class MatPlotLib(object): """docstring for MatPlotLib""" def __init__(self): super(MatPlotLib, self).__init__() mpl.rcParams['legend.fontsize'] = 10 self.fig = plt.figur...
sanand0/pydio-sync
refs/heads/master
src/pydio/utils/config_ports.py
4
# # Copyright 2007-2014 Charles du Jeu - Abstrium SAS <team (at) pyd.io> # This file is part of Pydio. # # Pydio 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 yo...
don-github/edx-platform
refs/heads/master
common/djangoapps/track/models.py
150
# pylint: disable=unused-import, missing-docstring from track.backends.django import TrackingLog
plotly/python-api
refs/heads/master
packages/python/plotly/plotly/validators/surface/hoverlabel/_namelengthsrc.py
1
import _plotly_utils.basevalidators class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="surface.hoverlabel", **kwargs ): super(NamelengthsrcValidator, self).__init__( plotly_name=plotly_name, ...
pranjalpatil/django-allauth
refs/heads/master
allauth/socialaccount/providers/github/models.py
4209
# Create your models here.
dend/yulyeong
refs/heads/master
node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/__init__.py
269
# -*- coding: utf-8 -*- """ Pygments ~~~~~~~~ Pygments is a syntax highlighting package written in Python. It is a generic syntax highlighter for general use in all kinds of software such as forum systems, wikis or other applications that need to prettify source code. Highlights are: * a ...
cjahangir/geodash
refs/heads/master
geonode/social/tests.py
20
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
catapult-project/catapult-csm
refs/heads/master
third_party/google-endpoints/apitools/base/py/buffered_stream_test.py
29
# # Copyright 2015 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
rdelval/aurora
refs/heads/master
src/main/python/apache/aurora/executor/common/resource_manager.py
13
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under ...
sidnarayanan/BAdNet
refs/heads/master
train/pf/train2.py
1
#!/usr/local/bin/python2.7 from sys import exit from os import environ environ['KERAS_BACKEND'] = 'tensorflow' import numpy as np import utils from keras.layers import Input, Dense, Dropout, Activation, concatenate, Conv2D, MaxPooling2D, Conv2DTranspose, LSTM, Convolution1D, MaxPooling1D, MaxPooling1D from keras.m...
saneyuki/servo
refs/heads/master
tests/wpt/web-platform-tests/websockets/handlers/echo-cookie_wsh.py
265
#!/usr/bin/python from mod_pywebsocket import msgutil def web_socket_do_extra_handshake(request): request.ws_cookie = request.headers_in.get('Cookie') def web_socket_transfer_data(request): if request.ws_cookie is not None: msgutil.send_message(request, request.ws_cookie) else: msgutil.se...
mtagle/airflow
refs/heads/master
airflow/migrations/versions/211e584da130_add_ti_state_index.py
7
# # 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...
imply/chuu
refs/heads/master
tools/deep_memory_profiler/subcommands/policies.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. import datetime import json import logging import sys from lib.bucket import BUCKET_ID, COMMITTED from lib.pageframe import PFNCounts from lib.policy import...
basicthinker/Sexain-MemController
refs/heads/master
gem5-stable/ext/ply/test/lex_hedit.py
174
# ----------------------------------------------------------------------------- # hedit.py # # Paring of Fortran H Edit descriptions (Contributed by Pearu Peterson) # # These tokens can't be easily tokenized because they are of the following # form: # # nHc1...cn # # where n is a positive integer and c1 ... cn are ch...
scotthartbti/android_external_chromium_org
refs/heads/kk44
tools/json_schema_compiler/idl_schema.py
23
#! /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. import itertools import json import os.path import re import sys from json_parse import OrderedDict # This file is a peer to jso...
MakerCollider/upm
refs/heads/master
examples/python/ldt0028.py
18
# Author: Sarah Knepper <sarah.knepper@intel.com> # Copyright (c) 2014 Intel Corporation. # # 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...
brylie/oppia
refs/heads/master
core/domain/rights_manager_test.py
29
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
armet/python-armet
refs/heads/master
armet/connectors/flask/resources.py
1
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals, division import collections import flask from werkzeug.routing import BaseConverter from . import http class RegexConverter(BaseConverter): """Regular expression URL converter for werkzeug / flask. """ def __init__(self, ur...
KylinUI/android_kernel_lge_msm8974
refs/heads/kitkat
tools/perf/scripts/python/netdev-times.py
11271
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
40123112/w17exam
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/this.py
948
s = """Gur Mra bs Clguba, ol Gvz Crgref Ornhgvshy vf orggre guna htyl. Rkcyvpvg vf orggre guna vzcyvpvg. Fvzcyr vf orggre guna pbzcyrk. Pbzcyrk vf orggre guna pbzcyvpngrq. Syng vf orggre guna arfgrq. Fcnefr vf orggre guna qrafr. Ernqnovyvgl pbhagf. Fcrpvny pnfrf nera'g fcrpvny rabhtu gb oernx gur ehyrf. Nygubhtu cenpg...
pauliacomi/pyGAPS
refs/heads/master
tests/core/test_adsorbate.py
1
"""Tests relating to the Adsorbate class.""" import warnings import pytest import pygaps import pygaps.utilities.exceptions as pgEx @pytest.mark.core class TestAdsorbate(): """Test the adsorbate class.""" def test_adsorbate_basic(self): """Basic creation tests.""" with pytest.raises(pgEx.Pa...
allotria/intellij-community
refs/heads/master
python/testData/refactoring/makeFunctionTopLevel/methodMultipleAttributesReadReferenceQualifier.py
44
class C: def __init__(self): self.foo = 42 self.bar = 'spam' def me<caret>thod(self, x): print(self.foo, self.bar) inst = C() inst.method(1)
alexandrucoman/vbox-neutron-agent
refs/heads/master
neutron/api/rpc/handlers/l3_rpc.py
2
# Copyright (c) 2012 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
huang4fstudio/django
refs/heads/master
tests/migrations2/models.py
560
# Required for migration detection (#22645)
florianholzapfel/home-assistant
refs/heads/dev
homeassistant/components/media_player/denonavr.py
1
""" Support for Denon AVR receivers using their HTTP interface. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.denon/ """ import logging import voluptuous as vol from homeassistant.components.media_player import ( SUPPORT_PAUSE, SUPPOR...
djgagne/scikit-learn
refs/heads/master
sklearn/linear_model/sag.py
6
"""Solvers for Ridge and LogisticRegression using SAG algorithm""" # Authors: Tom Dupre la Tour <tom.dupre-la-tour@m4x.org> # # Licence: BSD 3 clause import numpy as np import warnings from ..utils import ConvergenceWarning from ..utils import check_array from .base import make_dataset from .sgd_fast import Log, Squ...
crosswalk-project/chromium-crosswalk-efl
refs/heads/efl/crosswalk-10/39.0.2171.19
third_party/protobuf/python/google/protobuf/descriptor_database.py
230
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
txm/potato
refs/heads/master
django/core/management/commands/cleanup.py
350
import datetime from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): help = "Can be run as a cronjob or directly to clean out old data from the database (only expired sessions at the moment)." def handle_noargs(self, **options): from django.db import transaction ...
thinkerou/grpc
refs/heads/master
tools/run_tests/task_runner.py
16
#!/usr/bin/env python # Copyright 2016 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
jindongh/boto
refs/heads/develop
tests/integration/route53/test_zone.py
100
# Copyright (c) 2011 Blue Pines Technologies LLC, Brad Carleton # www.bluepines.org # Copyright (c) 2012 42 Lines Inc., Jim Browne # # 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 re...
milogert/ddnsc
refs/heads/master
query.py
1
import tkinter as tk import tkinter.font as tkFont import tkinter.ttk as ttk import pymysql.cursors connection = pymysql.connect( host='milogert.com', user='milo', passwd='locatetimefarduck', db='personal', charset='utf8mb4', cursorclass=pymysql.cursors.DictCursor ) def calculate(*args): tr...
2ndQuadrant/ansible
refs/heads/master
lib/ansible/modules/packaging/os/portage.py
30
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, William L Thomson Jr # (c) 2013, Yap Sok Ann # Written by Yap Sok Ann <sokann@gmail.com> # Modified by William L. Thomson Jr. <wlt@o-sinc.com> # Based on apt module written by Matthew Williams <matthew@flowroute.com> # # GNU General Public License v3.0+ (see COPYIN...
jonathanunderwood/numpy
refs/heads/master
tools/cythonize.py
86
#!/usr/bin/env python """ cythonize Cythonize pyx files into C files as needed. Usage: cythonize [root_dir] Default [root_dir] is 'numpy'. Checks pyx files to see if they have been changed relative to their corresponding C files. If they have, then runs cython on these files to recreate the C files. The script th...
Just-D/chromium-1
refs/heads/master
tools/telemetry/third_party/gsutilz/gslib/commands/defacl.py
12
# -*- coding: utf-8 -*- # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
theheros/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/urllib/robotparser.py
3
""" robotparser.py Copyright (C) 2000 Bastian Kleineidam You can choose between two licenses when using this package: 1) GNU GPLv2 2) PSF license for Python 2.2 The robots.txt Exclusion Protocol is implemented as specified in http://info.webcrawler.com/mak/projects/robots/norobots-r...
sivaprakashniet/push_pull
refs/heads/master
p2p/lib/python2.7/site-packages/djcelery/compat.py
8
from __future__ import absolute_import import os import sys from kombu.utils.encoding import bytes_to_str, str_to_bytes PY2 = sys.version_info[0] == 2 PY3 = sys.version_info[0] == 3 def python_2_unicode_compatible(cls): """Taken from Django project (django/utils/encoding.py) & modified a bit to always have...
gferreira/hTools2_extension
refs/heads/master
hTools2.roboFontExt/lib/hTools2/modules/fontstruct.py
1
# [h] hTools2.modules.fontstruct # imports from xml.sax.handler import ContentHandler from xml.sax import make_parser from robofab.world import NewFont from hTools2.modules.svg import svgImporter from hTools2.modules.encoding import unicode2psnames # objects class FontStructionHandler(ContentHandler): """FSM...
subajat1/thefuck
refs/heads/master
tests/rules/test_git_not_command.py
9
import pytest from thefuck.rules.git_not_command import match, get_new_command from tests.utils import Command @pytest.fixture def git_not_command(): return """git: 'brnch' is not a git command. See 'git --help'. Did you mean this? branch """ @pytest.fixture def git_not_command_one_of_this(): return """git...
mozilla/addons-server
refs/heads/master
src/olympia/bandwagon/migrations/0004_auto_20210511_1256.py
3
# Generated by Django 2.2.21 on 2021-05-11 12:56 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('bandwagon', '0003_auto_20210415_1620'), ] operations = [ migrations.RemoveIndex( model_name='collection', name='type_idx', ...
andreparrish/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/nntplib.py
45
"""An NNTP client class based on: - RFC 977: Network News Transfer Protocol - RFC 2980: Common NNTP Extensions - RFC 3977: Network News Transfer Protocol (version 2) Example: >>> from nntplib import NNTP >>> s = NNTP('news') >>> resp, count, first, last, name = s.group('comp.lang.python') >>> print('Group', name, 'ha...
michaelgallacher/intellij-community
refs/heads/master
python/testData/inspections/PyUnresolvedReferencesInspection/percentStringPositionalListArgument.py
8
"%s<warning descr="Unresolved reference '%s'">%s</warning>" % [1, 2, 3]
Ademan/NumPy-GSoC
refs/heads/master
numpy/distutils/fcompiler/nag.py
94
import sys from numpy.distutils.fcompiler import FCompiler compilers = ['NAGFCompiler'] class NAGFCompiler(FCompiler): compiler_type = 'nag' description = 'NAGWare Fortran 95 Compiler' version_pattern = r'NAGWare Fortran 95 compiler Release (?P<version>[^\s]*)' executables = { 'version_cmd'...
odetinin/Pretty-Code
refs/heads/master
libs/js-beautify/python/jsbeautifier/unpackers/tests/testpacker.py
111
# # written by Stefano Sanfilippo <a.little.coder@gmail.com> # """Tests for P.A.C.K.E.R. unpacker.""" import unittest from jsbeautifier.unpackers.packer import detect, unpack # pylint: disable=R0904 class TestPacker(unittest.TestCase): """P.A.C.K.E.R. testcase.""" def test_detect(self): """Test d...
ramusus/django-vkontakte-users
refs/heads/master
vkontakte_users/migrations/0001_initial.py
2
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.db.models.deletion import vkontakte_api.models class Migration(migrations.Migration): dependencies = [ ('vkontakte_places', '__first__'), ] operations = [ migrations.Cr...
helgefmi/ohno
refs/heads/master
ohno/dungeon/tile.py
1
import string from queryable import queryable from ohno.dungeon import monster from ohno.dungeon.feature import feature _tile_is_feature = lambda t: t.glyph in '.}{#_<>]^|-~ \\' _tile_is_item = lambda t: t.glyph in '`0*$[%)(/?!"=+' _tile_is_monster = lambda t: t.glyph in (string.ascii_letters + "12345@'&;:") #...
saradbowman/osf.io
refs/heads/develop
scripts/populate_new_and_noteworthy_projects.py
16
""" This will update node links on POPULAR_LINKS_NODE and NEW_AND_NOTEWORTHY_LINKS_NODE. """ import sys import logging import dateutil import django from django.utils import timezone from django.db import transaction from django.db.models import Q from website.app import init_app django.setup() from osf.models impor...
kod3r/deepdive
refs/heads/master
examples/tutorial_example/step2-generic-features/experiment-reports/v00001/code/udf/ext_people.py
161
#! /usr/bin/env python # Sample input data (piped into STDIN): ''' 118238@10 Sen.~^~Barack~^~Obama~^~and~^~his~^~wife~^~,~^~Michelle~^~Obama~^~,~^~have~^~released~^~eight~^~years~^~of~^~joint~^~returns~^~. O~^~PERSON~^~PERSON~^~O~^~O~^~O~^~O~^~PERSON~^~PERSON~^~O~^~O~^~O~^~DURATION~^~DURATION~^~O~^~O~^~O~^~O 118238@12...
christophevg/codecanvas
refs/heads/master
src/codecanvas/structure.py
1
# structure.py # Structure builders for CodeCanvas # author: Christophe VG from codecanvas.base import Canvas, Code class Unit(Canvas): """ Unit is a simple alias for Canvas """ pass class AutoTag(Code): """ AutoTag extends a simple Code with autotagging based on its data, which is considered a name. ...
jdrugo/dm
refs/heads/master
python/setup.py
1
from numpy.distutils.core import setup, Extension module1 = Extension('ddm', sources = ['ddmmodule.cpp', '../src/ddm_fpt_lib.cpp'], extra_compile_args = ['-Wno-write-strings -std=c++11']) setup (name = 'DDM', version = '1.0', description = 'Methods to compute the ...
CuonDeveloper/cuon
refs/heads/master
cuon_client/cuon/Finances/InvoiceBook/SingleListOfInvoice.py
3
# -*- coding: utf-8 -*- ##Copyright (C) [2005] [Jürgen Hamel, D-32584 Löhne] ##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 versio...
liberatorqjw/scikit-learn
refs/heads/master
sklearn/neighbors/tests/test_ball_tree.py
30
import numpy as np from numpy.testing import assert_array_almost_equal from sklearn.neighbors.ball_tree import (BallTree, NeighborsHeap, simultaneous_sort, kernel_norm, nodeheap_sort, DTYPE, ITYPE) from sklearn.neighbors.dist_metrics impo...
eduNEXT/edunext-ecommerce
refs/heads/master
ecommerce/extensions/catalogue/migrations/0029_auto_20180119_0903.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2018-01-19 09:03 from __future__ import absolute_import, unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('catalogue', '0028_donations_from_checkout_tests_product_type'), ] operatio...
fintech-circle/edx-platform
refs/heads/master
cms/djangoapps/contentstore/views/tests/test_textbooks.py
3
import json from unittest import TestCase from contentstore.tests.utils import CourseTestCase from contentstore.utils import reverse_course_url from contentstore.views.course import TextbookValidationError, validate_textbook_json, validate_textbooks_json class TextbookIndexTestCase(CourseTestCase): "Test cases f...
OptiPop/external_chromium_org
refs/heads/opti-5.1
tools/cygprofile/symbolize.py
43
#!/usr/bin/python # 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. """Symbolize log file produced by cypgofile instrumentation. Given a log file and the binary being profiled (e.g. executable, shared libra...
dmpiergiacomo/scion
refs/heads/master
python/lib/sciond_api/base.py
1
# Copyright 2017 ETH Zurich # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, sof...
elainenaomi/sciwonc-dataflow-examples
refs/heads/master
dissertation2017/Experiment 1A/instances/10_2_workflow_full_10files_secondary_wmj_3sh_3rs_with_annot_with_proj_3s_range/work/ubuntu/pegasus/example_workflow/20161107T143001+0000/ConfigDB_TaskEvent_2.py
10
HOST = "ip-172-31-29-102.us-west-2.compute.internal:27017,ip-172-31-29-103.us-west-2.compute.internal:27017,ip-172-31-29-104.us-west-2.compute.internal:27017,ip-172-31-29-105.us-west-2.compute.internal:27017,ip-172-31-29-101.us-west-2.compute.internal:27017,ip-172-31-29-106.us-west-2.compute.internal:27017,ip-172-31-29...
roadmapper/ansible
refs/heads/devel
lib/ansible/modules/storage/netapp/na_ontap_ipspace.py
30
#!/usr/bin/python """ this is ipspace module # (c) 2018, NTT Europe Ltd. # 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', 'stat...
antsmc2/mics
refs/heads/master
survey/tests/forms/test_investigator_form.py
2
from django.test import TestCase from rapidsms.contrib.locations.models import Location, LocationType from survey.forms.investigator import * from survey.models import EnumerationArea, Survey from survey.models.backend import Backend class InvestigatorFormTest(TestCase): def setUp(self): country = Locat...
CarlosCondor/pelisalacarta-xbmc-plus
refs/heads/master
pelisalacarta/channels/documaniatv.py
2
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Canal para documaniatv.com # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os,sys from co...
SymbiFlow/symbiflow-arch-defs
refs/heads/master
utils/print_graph.py
1
#!/usr/bin/env python3 import lib.rr_graph.graph as graph def print_block_types(g): '''Sequentially list block types''' bg = g.block_grid for type_id, bt in bg.block_types._ids.items(): print( "{:4} ".format(type_id), "{:40s}".format(bt.to_string()), bt.to_string(extra=T...
ROBOTIS-GIT/DynamixelSDK
refs/heads/master
python/tests/protocol2_0/factory_reset.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- #******************************************************************************* # Copyright 2017 ROBOTIS CO., LTD. # # 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 cop...
christi3k/zulip
refs/heads/master
zerver/tests/test_bots.py
1
from __future__ import absolute_import from __future__ import print_function import filecmp import os import ujson from django.core import mail from django.http import HttpResponse from django.test import override_settings from mock import patch from typing import Any, Dict, List from zerver.lib.actions import do_ch...
zofuthan/edx-platform
refs/heads/master
openedx/core/djangoapps/content/course_structures/tests.py
54
import json from xmodule_django.models import UsageKey from xmodule.modulestore.django import SignalHandler from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory from openedx.core.djangoapps.content.course_structures.models imp...
rfree2/cjdns
refs/heads/master
node_build/dependencies/libuv/build/gyp/test/win/idl-excluded/copy-file.py
600
#!/usr/bin/env python # Copyright (c) 2009 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 contents = open(sys.argv[1], 'r').read() open(sys.argv[2], 'wb').write(contents) sys.exit(0)
ajaali/django
refs/heads/master
django/db/models/fields/files.py
129
import datetime import os import warnings from django import forms from django.core import checks from django.core.files.base import File from django.core.files.images import ImageFile from django.core.files.storage import default_storage from django.db.models import signals from django.db.models.fields import Field f...
defance/edx-platform
refs/heads/master
common/djangoapps/microsite_configuration/backends/filebased.py
41
""" Microsite backend that reads the configuration from a file """ from microsite_configuration.backends.base import ( BaseMicrositeBackend, BaseMicrositeTemplateBackend, ) class FilebasedMicrositeBackend(BaseMicrositeBackend): """ Microsite backend that reads the microsites definitions from a d...
jgoclawski/django
refs/heads/master
tests/migrations/test_multidb.py
366
import unittest from django.db import connection, migrations, models from django.db.migrations.state import ProjectState from django.test import override_settings from .test_operations import OperationTestBase try: import sqlparse except ImportError: sqlparse = None class AgnosticRouter(object): """ ...
shinate/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/test/skip.py
174
# Copyright (C) 2010 Apple 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 conditions and the f...
AASHE/hub
refs/heads/master
hub/apps/metadata/migrations/0005_sustainabilitytopicfavorite.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone import model_utils.fields class Migration(migrations.Migration): dependencies = [ ('content', '0012_remove_contenttype_featured'), ('metadata', '0004_sustainabili...
bvamanan/ns3
refs/heads/master
src/lte/bindings/modulegen__gcc_LP64.py
4
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
ReccaStudio/ActiveStar
refs/heads/master
cocos2d/plugin/tools/toolsForGame/steps.py
255
import sys, string, os from Tkinter import * # define class step class step: stepFrame = None def initStep(self, root): return def checkStep(self): return None # define class step1 class step1(step): step_entry = None def initStep(self, root): self.stepFrame = Frame(root) ...
hanvo/MusicCloud
refs/heads/master
Crawler/Install Files/eyeD3-0.7.4/examples/plugins/echo.py
4
from __future__ import print_function import eyed3 from eyed3.plugins import Plugin from eyed3.utils import guessMimetype eyed3.require((0, 7)) class EchoPlugin(eyed3.plugins.Plugin): NAMES = ["echo"] SUMMARY = u"Displays each filename and mime-type passed to the plugin" def handleFile(self, f): ...
jdcc2/campussearch
refs/heads/master
venv/lib/python3.4/site-packages/pip/_vendor/colorama/winterm.py
442
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. from . import win32 # from wincon.h class WinColor(object): BLACK = 0 BLUE = 1 GREEN = 2 CYAN = 3 RED = 4 MAGENTA = 5 YELLOW = 6 GREY = 7 # from wincon.h class WinStyle(object): NORMAL ...
sureshthalamati/spark
refs/heads/master
examples/src/main/python/mllib/streaming_linear_regression_example.py
51
# # 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...
rbarrois/pydist
refs/heads/master
tests/test_locators.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # This code is distributed under the two-clause BSD license. # Copyright (c) 2013 Raphaël Barrois from __future__ import unicode_literals import os.path from pydist import locators from .compat import mock, make_io, unittest class ReaderTestCase(unittest.TestCase): ...
sumedh123/debatify
refs/heads/UI
venv/lib/python2.7/site-packages/werkzeug/filesystem.py
200
# -*- coding: utf-8 -*- """ werkzeug.filesystem ~~~~~~~~~~~~~~~~~~~ Various utilities for the local filesystem. :copyright: (c) 2015 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import codecs import sys import warnings # We do not trust tra...
Varriount/Colliberation
refs/heads/master
libs/twisted/test/myrebuilder1.py
162
class A: def a(self): return 'a' try: object except NameError: pass else: class B(object, A): def b(self): return 'b' class Inherit(A): def a(self): return 'c'
political-memory/django-representatives-votes
refs/heads/master
representatives_votes/migrations/0011_remove_fingerprints.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('representatives_votes', '0010_proposal_datetime_index'), ] operations = [ migrations.AlterUniqueTogether( name='...
XiaodunServerGroup/xiaodun-platform
refs/heads/master
lms/djangoapps/dashboard/views.py
22
from django.http import Http404 from edxmako.shortcuts import render_to_response from django.db import connection from student.models import CourseEnrollment from django.contrib.auth.models import User def dictfetchall(cursor): '''Returns a list of all rows from a cursor as a column: result dict. Borrowed fr...
bufferapp/buffer-django-nonrel
refs/heads/master
django/utils/unittest/util.py
751
"""Various utility functions.""" __unittest = True _MAX_LENGTH = 80 def safe_repr(obj, short=False): try: result = repr(obj) except Exception: result = object.__repr__(obj) if not short or len(result) < _MAX_LENGTH: return result return result[:_MAX_LENGTH] + ' [truncated]...'...
OCA/vertical-hotel
refs/heads/11.0
hotel_housekeeping/models/hotel_housekeeping_activity_type.py
1
# See LICENSE file for full copyright and licensing details. from odoo import api, fields, models from odoo.osv import expression class HotelHousekeepingActivityType(models.Model): _name = "hotel.housekeeping.activity.type" _description = "Activity Type" name = fields.Char("Name", required=True) act...
ldotlopez/eina
refs/heads/master
eina/lastfm/lastfmsubmitd/lastfm/client.py
1
import os import sys import logging import tempfile import lastfm.config import lastfm.marshaller SLEEP = 5 PID = lastfm.config.DefaultPath(lambda n: '/var/run/lastfm/%s.pid' % n, lambda n: '~/.%s/pid' % n) class Client: """Something that uses the lastfmsubmitd spool. Has a config...
Sorsly/subtle
refs/heads/master
google-cloud-sdk/lib/surface/auth/__init__.py
4
# Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
traverseda/python-client
refs/heads/master
test/test_vim.py
2
# -*- coding: utf-8 -*- import os, tempfile from nose.tools import with_setup, eq_ as eq, ok_ as ok from common import vim, cleanup def source(code): fd, fname = tempfile.mkstemp() with os.fdopen(fd,'w') as f: f.write(code) vim.command('source '+fname) os.unlink(fname) @with_setup(setup=clean...
bitcoinxt/bitcoinxt
refs/heads/master
qa/pull-tester/rpc-tests.py
1
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Run Regression Test Suite This module calls down into individual test cases via subprocess. It will ...
DCCouncil/dc-code-prototype-tools
refs/heads/master
parse_code_2012-12.py
3
# Convert the DC Code .docx file from West into XML. # # Usage: # python3 parse_code_doc.py path/to/dc_code_unofficial_2012-12-11/ > dc_code_unofficial_2012-12-11.xml import sys, io, glob, re, lxml.etree as etree, datetime, pprint from worddoc import open_docx ANNOTATION_HEADINGS = ("CREDIT(S)", "HISTORICAL AND STATU...
GuilhermeSa/coreclr
refs/heads/master
src/pal/automation/automation.py
154
import logging as log import sys import getopt import os import subprocess import shutil import compile import tests import util target = "" arch = "" platform = "" workspace = "" fullbuilddirpath = "" cleanUp = True def ParseArgs(argv): global target global platform global arch global cleanUp re...
keithhamilton/blackmaas
refs/heads/master
lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/mbcssm.py
982
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
zhumengyuan/kallithea
refs/heads/master
kallithea/config/middleware.py
2
# -*- coding: utf-8 -*- # 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 distributed in the hope that...
plotly/python-api
refs/heads/master
packages/python/plotly/plotly/validators/scattergl/_stream.py
2
import _plotly_utils.basevalidators class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="scattergl", **kwargs): super(StreamValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
drexly/openhgsenti
refs/heads/master
lib/django/contrib/sessions/backends/cached_db.py
231
""" Cached, database-backed sessions. """ import logging from django.conf import settings from django.contrib.sessions.backends.db import SessionStore as DBStore from django.core.cache import caches from django.core.exceptions import SuspiciousOperation from django.utils import timezone from django.utils.encoding imp...
hi2017teamB/ChatAppProject
refs/heads/master
websocket-client/bin/wsdump.py
10
#!/usr/bin/env python import argparse import code import sys import threading import time import six from six.moves.urllib.parse import urlparse import websocket try: import readline except ImportError: pass def get_encoding(): encoding = getattr(sys.stdin, "encoding", "") if not encoding: ...
wangkai2014/viro-pox
refs/heads/master
pox/proto/pong.py
46
# Copyright 2012 James McCauley # # 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 writi...
treycausey/scikit-learn
refs/heads/master
examples/plot_permutation_test_for_classification.py
8
""" ================================================================= Test with permutations the significance of a classification score ================================================================= In order to test if a classification score is significative a technique in repeating the classification procedure aft...
ivanlmj/Android-DNSSL
refs/heads/master
Flask/lib/python2.7/site-packages/pymongo/read_preferences.py
17
# Copyright 2012-2015 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License", # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
atul-bhouraskar/django
refs/heads/master
tests/admin_custom_urls/tests.py
276
from __future__ import unicode_literals import datetime from django.contrib.admin.utils import quote from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.template.response import TemplateResponse from django.test import TestCase, override_settings from .models import A...