repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
hwu25/AppPkg
refs/heads/trunk
Applications/Python/Python-2.7.2/Lib/test/test_buffer.py
9
"""Unit tests for buffer objects. For now, tests just new or changed functionality. """ import unittest from test import test_support class BufferTests(unittest.TestCase): def test_extended_getslice(self): # Test extended slicing by comparing with list slicing. s = "".join(chr(c) f...
yawnosnorous/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/test/test_atexit.py
62
import sys import unittest import io import atexit from test import support ### helpers def h1(): print("h1") def h2(): print("h2") def h3(): print("h3") def h4(*args, **kwargs): print("h4", args, kwargs) def raise1(): raise TypeError def raise2(): raise SystemError class TestCase(unittes...
chanceraine/nupic
refs/heads/master
tests/unit/nupic/encoders/coordinate_test.py
7
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
tntnatbry/tensorflow
refs/heads/master
tensorflow/python/layers/utils.py
33
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
44px/redash
refs/heads/master
old_migrations/0014_add_alert_rearm_seconds.py
4
from __future__ import print_function import peewee from playhouse.migrate import PostgresqlMigrator, migrate from redash.models import db from redash import models if __name__ == '__main__': db.connect_db() migrator = PostgresqlMigrator(db.database) cursor = db.database.execute_sql("SELECT column_name F...
josesanch/django-oscar
refs/heads/master
src/oscar/apps/checkout/session.py
9
from decimal import Decimal as D from django.contrib import messages from django import http from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from oscar.core.loading import get_model, get_class from . import ex...
jensenbox/ansible
refs/heads/devel
test/inventory_api.py
37
#!/usr/bin/env python import json import sys from optparse import OptionParser parser = OptionParser() parser.add_option('-l', '--list', default=False, dest="list_hosts", action="store_true") parser.add_option('-H', '--host', default=None, dest="host") parser.add_option('-e', '--extra-vars', default=None, dest="extr...
kishikawakatsumi/Mozc-for-iOS
refs/heads/master
src/third_party/gyp/test/win/gyptest-macros-containing-gyp.py
344
#!/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. """ Handle VS macro expansion containing gyp variables. """ import TestGyp import sys if sys.platform == 'win32': test = TestGyp.TestGy...
digideskio/namecoin
refs/heads/namecoin_merged
client/DNS/Opcode.py
65
""" $Id: Opcode.py,v 1.6 2002/04/23 10:51:43 anthonybaxter Exp $ This file is part of the pydns project. Homepage: http://pydns.sourceforge.net This code is covered by the standard Python License. Opcode values in message header. RFC 1035, 1996, 2136. """ QUERY = 0 IQUERY = 1 STATUS = 2 NOTIFY = 4 UPDATE = 5...
anjel-ershova/python_training
refs/heads/master
fixture/session.py
1
class SessionHelper: def __init__(self, app): self.app = app def login(self, login, password): wd = self.app.wd wd.get(self.app.baseurl) wd.find_element_by_name("user").click() wd.find_element_by_name("user").clear() wd.find_element_by_name("user").send_keys(log...
iago1460/django-radio
refs/heads/master
radioco/__init__.py
1
# Radioco - Broadcasting Radio Recording Scheduling system. # Copyright (C) 2014 Iago Veloso Abalo # # 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 yo...
devGregA/code
refs/heads/master
build/lib.linux-x86_64-2.7/scrapy/contrib/webservice/stats.py
24
from scrapy.webservice import JsonRpcResource class StatsResource(JsonRpcResource): ws_name = 'stats' def __init__(self, crawler): JsonRpcResource.__init__(self, crawler, crawler.stats)
cglewis/bowl
refs/heads/master
setup.py
1
from setuptools import setup, find_packages from setuptools.command.install import install import fnmatch import os class MyInstall(install): def run(self): install.run(self) print "Installing man page..." os.system('sudo /usr/local/bin/build.sh') def files(): base = ['LICENSE', 'REA...
kmunve/processgpr
refs/heads/master
test/__init__.py
1
__author__ = 'kmu' """ Module for testing new features """
rekhajoshm/spark
refs/heads/master
dev/sparktestsupport/modules.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 us...
vasyarv/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/tests/rendering/core.py
208
""" This module is indended to provide a pluggable way to add assertions about the rendered content of XBlocks. For each view on the XBlock, this module defines a @singledispatch function that can be used to test the contents of the rendered html. The functions are of the form: @singledispatch def assert_stu...
Natim/sentry
refs/heads/master
tests/sentry/options/test_manager.py
27
# -*- coding: utf-8 -*- from __future__ import absolute_import from exam import fixture from mock import patch from sentry.models import Option from sentry.options.manager import OptionsManager from sentry.testutils import TestCase class OptionsManagerTest(TestCase): @fixture def manager(self): ret...
10clouds/edx-platform
refs/heads/dev
openedx/core/djangoapps/site_configuration/__init__.py
63
""" This app is used for creating/updating site's configuration. This app encapsulate configuration related logic for sites and provides a way for sites to override default/system behavioural or presentation logic. Models: SiteConfiguration (models.Model): This model contains configuration for a site and c...
boneyao/sentry
refs/heads/master
src/sentry/models/file.py
23
""" sentry.models.file ~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2015 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from django.conf import settings from django.core.files.storage import get_storage_class from django.db import ...
editrobot/new_editrobot
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py
377
#!/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. """Utility functions to perform Xcode-style build steps. These functions are executed via gyp-mac-tool when using the Makefile generator. ""...
Pablo126/SSBW
refs/heads/master
Entrega1/lib/python3.5/site-packages/django/conf/locale/eu/formats.py
611
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'Yeko M\re\n d\a' TIME_FORMAT = '...
bartromgens/nsmaps
refs/heads/master
bin/create_station_data.py
1
#!/usr/bin/env python3 import sys import os parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(parentdir) import nsmaps DATA_DIR = './website/nsmaps-data' def main(): stations = nsmaps.station.Stations(DATA_DIR) stations.update_station_data('stations.json') if __nam...
zvovov/totext
refs/heads/master
extra/__init__.py
12133432
abusse/cinder
refs/heads/master
cinder/tests/backup/__init__.py
12133432
jhavstad/model_runner
refs/heads/master
src/ModelRunnerGraphGUI.py
1
''' GraphGUI.py ''' from ttk import Frame from ttk import Checkbutton from ttk import Button from ttk import PanedWindow from ttk import Label import tkFileDialog import Tkinter from Tkinter import IntVar from Tkinter import Toplevel from MyPmwScrolledFrame import ScrolledFrame from matplotlib.backends.backend_t...
SerryJohns/RandomRoomAllocator
refs/heads/master
tests/test_allocate_room.py
1
import unittest from dojo_classes.Dojo import Dojo import os class TestAllocateRoom(unittest.TestCase): def setUp(self): self.dojo = Dojo() def test_allocate_person_staff(self): office_list = self.dojo.create_room("office", "Blue", "Black") staff = self.dojo.add_person("Neil Armstrong...
jayvdb/pywikibot-core
refs/heads/master
scripts/coordinate_import.py
3
#!/usr/bin/python # -*- coding: utf-8 -*- r""" Coordinate importing script. Usage: python pwb.py coordinate_import -lang:en -family:wikipedia \ -cat:Category:Coordinates_not_on_Wikidata This will work on all pages in the category "coordinates not on Wikidata" and will import the coordinates on these page...
nijel/weblate
refs/heads/main
weblate/lang/views.py
1
# # Copyright © 2012 - 2021 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.org/> # # 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 Lice...
sopier/django
refs/heads/master
tests/user_commands/models.py
542
""" User-registered management commands The ``manage.py`` utility provides a number of useful commands for managing a Django project. If you want to add a utility command of your own, you can. The user-defined command ``dance`` is defined in the management/commands subdirectory of this test application. It is a simpl...
Weil0ng/gem5
refs/heads/master
src/mem/slicc/ast/FormalParamAST.py
53
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood # Copyright (c) 2009 The Hewlett-Packard Development Company # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source co...
knehez/edx-platform
refs/heads/memooc
common/djangoapps/third_party_auth/tests/test_views.py
24
""" Test the views served by third_party_auth. """ # pylint: disable=no-member import ddt from lxml import etree import unittest from .testutil import AUTH_FEATURE_ENABLED, SAMLTestCase # Define some XML namespaces: from third_party_auth.tasks import SAML_XML_NS XMLDSIG_XML_NS = 'http://www.w3.org/2000/09/xmldsig#' ...
rafaeltomesouza/frontend-class1
refs/heads/master
aula2/a15/linkedin/client/.gradle/yarn/node_modules/node-gyp/gyp/pylib/gyp/__init__.py
1524
#!/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. import copy import gyp.input import optparse import os.path import re import shlex import sys import traceback from gyp.common import GypErr...
Anonymous-X6/django
refs/heads/master
django/conf/locale/hu/__init__.py
12133432
voriux/Flexget
refs/heads/develop
flexget/ui/__init__.py
12133432
Bourneer/ssbc
refs/heads/master
workers/__init__.py
12133432
dwightgunning/django
refs/heads/master
tests/syndication_tests/__init__.py
12133432
cliburn/flow
refs/heads/master
src/plugins/visual/ThreeDFrame/Main.py
1
"""Need type, Plot() and ModelUpdate().""" import wx import vtk import numpy import os # from vtk.wx.wxVTKRenderWindowInteractor import wxVTKRenderWindowInteractor # use Enthought version copied from svn/enthought/src/lib/enthought/pyface/tvtk/wxVTKRenderWindowInteractor.py # which fixes bug crashing wxVTKRenderWindow...
mammique/django
refs/heads/tp_alpha
django/contrib/messages/utils.py
1333
from django.conf import settings from django.contrib.messages import constants def get_level_tags(): """ Returns the message level tags. """ level_tags = constants.DEFAULT_TAGS.copy() level_tags.update(getattr(settings, 'MESSAGE_TAGS', {})) return level_tags
ric2b/Vivaldi-browser
refs/heads/master
chromium/components/cronet/tools/__init__.py
12133432
grundgruen/zipline
refs/heads/master
tests/pipeline/__init__.py
12133432
dturner-tw/pants
refs/heads/master
contrib/spindle/src/python/pants/contrib/spindle/targets/__init__.py
12133432
direvus/ansible
refs/heads/devel
test/units/module_utils/facts/__init__.py
12133432
cslzchen/osf.io
refs/heads/develop
api_tests/tokens/views/__init__.py
12133432
azlanismail/prismgames
refs/heads/master
examples/games/car/networkx/algorithms/assortativity/correlation.py
1
#-*- coding: utf-8 -*- """Node assortativity coefficients and correlation measures. """ import networkx as nx from networkx.algorithms.assortativity.mixing import degree_mixing_matrix, \ attribute_mixing_matrix, numeric_mixing_matrix from networkx.algorithms.assortativity.pairs import node_degree_xy, \ n...
leiferikb/bitpop
refs/heads/master
src/third_party/WebKit/Tools/Scripts/webkitpy/tool/servers/rebaselineserver.py
12
# Copyright (c) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
DerekK88/PICwriter
refs/heads/master
picwriter/__init__.py
1
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from .toolkit import ( add, get_angle, get_exact_angle, dist, get_direction, flip_direction, translate_point, get_turn, ) from .toolkit import get_keys, get_trace_length """ =====...
luckylavish/zamboni
refs/heads/master
mkt/site/tests/test_helpers.py
11
# -*- coding: utf-8 -*- from django.conf import settings import fudge import mock from datetime import datetime, timedelta from jingo import env from nose.tools import eq_ from urlparse import urljoin import mkt.site.tests from mkt.site.helpers import absolutify, css, js, product_as_dict, timesince from mkt.site.fixt...
ChrisTimperley/roshammer
refs/heads/master
roshammer/bag.py
1
# -*- coding: utf-8 -*- """ This module provides functionality for fuzzing ROS bags. """ __all__ = ('Bag', 'BagInjector') from typing import Sequence, Iterator, Any, Optional, List, Iterable, Tuple import os import time import bisect import random import tempfile import logging import threading import attr from roswi...
grap/OpenUpgrade
refs/heads/8.0
addons/mail/mail_message_subtype.py
387
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
Nepherhotep/django
refs/heads/master
tests/gis_tests/gis_migrations/test_operations.py
284
from __future__ import unicode_literals from django.contrib.gis.db.models import fields from django.core.exceptions import ImproperlyConfigured from django.db import connection, migrations, models from django.db.migrations.migration import Migration from django.db.migrations.state import ProjectState from django.test ...
hogarthj/ansible
refs/heads/devel
docs/docsite/_themes/srtd/__init__.py
1504
"""Sphinx ReadTheDocs theme. From https://github.com/ryan-roemer/sphinx-bootstrap-theme. """ import os VERSION = (0, 1, 5) __version__ = ".".join(str(v) for v in VERSION) __version_full__ = __version__ def get_html_theme_path(): """Return list of HTML theme paths.""" cur_dir = os.path.abspath(os.path.dirn...
Precis/Diamond
refs/heads/master
src/collectors/example/test/testexample.py
31
#!/usr/bin/python # coding=utf-8 ########################################################################## from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import patch from diamond.collector import Collector from example import ExampleCollector ##########...
pinterb/st2
refs/heads/master
st2common/st2common/models/db/liveaction.py
2
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
gvb/odoo
refs/heads/8.0
addons/l10n_tr/__init__.py
429
# -*- 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...
ahu-odoo/odoo
refs/heads/master
openerp/addons/base/ir/ir_sequence.py
83
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms o...
kenshay/ImageScripter
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/pylint/test/functional/iterable_context_py3.py
12
""" Checks that iterable metaclasses are recognized by pylint. """ # pylint: disable=missing-docstring,too-few-public-methods,no-init,no-self-use,unused-argument,bad-mcs-method-argument # metaclasses as iterables class Meta(type): def __iter__(self): return iter((1, 2, 3)) class SomeClass(metaclass=Meta):...
cherrygirl/micronaet-purchase
refs/heads/master
purchase_product_label/wizard/report_wizard.py
2
#|/usr/bin/python # -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute i...
zhujzhuo/openstack-trove
refs/heads/master
trove/tests/examples/client.py
4
# Copyright 2014 Rackspace # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
internap/fake-switches
refs/heads/master
fake_switches/arista/command_processor/__init__.py
4
# Copyright 2018 Inap. # # 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, softwa...
gibtang/CCNSCoding
refs/heads/master
external/emscripten/third_party/ply/test/lex_rule3.py
174
# lex_rule3.py # # Rule function with incorrect number of arguments import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.lex as lex tokens = [ "PLUS", "MINUS", "NUMBER", ] t_PLUS = r'\+' t_MINUS = r'-' def t_NUMBER(t,s): r'\d+' return t def t_error(t): pass lex.lex() ...
linktlh/Toontown-journey
refs/heads/master
toontown/rpc/AwardManager.py
6
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal class AwardManager(DistributedObjectGlobal): pass
bssrdf/leetcode-7
refs/heads/master
solutions/234.Palindrome_Linked_List/AC_simulation_n.py
5
#!/usr/local/bin/python # -*- coding: utf-8 -*- # Author: illuz <iilluzen[at]gmail.com> # File: AC_simulation_n.py # Create Date: 2015-07-29 13:39:17 # Usage: AC_simulation_n.py # Descripton: # Definition for singly-linked list. class ListNode: def __init__(self, x): self.val = x ...
baberthal/CouchPotatoServer
refs/heads/master
libs/pyutil/zlibutil.py
106
# Copyright (c) 2002-2010 Zooko Wilcox-O'Hearn # This file is part of pyutil; see README.rst for licensing terms. """ Making your zlib experience that much nicer! Most importantly, this offers protection from "zlib bomb" attacks, where the original data was maximally compressable, and a naive use of zlib would cons...
matrixise/odoo
refs/heads/8.0
addons/account/project/report/quantity_cost_ledger.py
358
# -*- 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...
stormltf/docker-registry
refs/heads/master
tests/lib/test_cache.py
35
import mock from docker_registry.lib import cache from tests.base import TestCase class TestCache(TestCase): def setUp(self): self.cache = mock.MagicMock( host='localhost', port=1234, db=0, password='pass') def tearDown(self): cache.redis_conn = None cache.cache_prefix =...
xifle/home-assistant
refs/heads/dev
homeassistant/components/emoncms_history.py
22
""" A component which allows you to send data to Emoncms. For more details about this component, please refer to the documentation at https://home-assistant.io/components/emoncms_history/ """ import logging from datetime import timedelta import voluptuous as vol import requests from homeassistant.const import ( ...
tokyo-jesus/oosmos
refs/heads/master
Examples/Sockets/Linux/bld.py
2
#!/usr/bin/env python oosmos_dir = r'../../..' import sys sys.path.append(oosmos_dir) import oosmos import os sock_c = oosmos_dir+r'/Classes/sock.c' oosmos_c = oosmos_dir+r'/Source/oosmos.c' client_c = oosmos_dir+r'/Classes/Tests/Sockets/client.c' server_c = oosmos_dir+r'/Classes/Tests/Sockets/server.c' li...
DefyVentures/edx-platform
refs/heads/master
common/djangoapps/session_inactivity_timeout/__init__.py
12133432
jonnary/keystone
refs/heads/master
keystone/contrib/endpoint_policy/backends/__init__.py
12133432
jnns/wagtail
refs/heads/master
wagtail/wagtailimages/migrations/__init__.py
12133432
openstack/keystone
refs/heads/master
keystone/tests/common/__init__.py
12133432
Just-D/chromium-1
refs/heads/master
tools/perf/benchmarks/media.py
12
# 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. from core import perf_benchmark from telemetry import benchmark from telemetry.page import page_test from telemetry.value import list_of_scalar_values from ...
NeCTAR-RC/karaage-terms
refs/heads/master
kgterms/__init__.py
3
VERSION = (0, 0, 1, 'alpha', 0) def get_version(): """ Return the current version""" version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: if VERSION[3] !...
fengsp/tornado
refs/heads/master
tornado/queues.py
78
# Copyright 2015 The Tornado 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 or agreed to in w...
TOCyna/tabelinha
refs/heads/master
flask/lib/python2.7/site-packages/whoosh/util/numeric.py
96
# Copyright 2010 Matt Chaput. 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...
don-github/edx-platform
refs/heads/master
lms/djangoapps/courseware/features/courseware_common.py
160
# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name # pylint: disable=unused-argument from lettuce import world, step @step('I click on View Courseware') def i_click_on_view_courseware(step): world.css_click('a.enter-course') @step('I click on the "([^"]*)" tab$') def i_click_on_the_tab(...
chyeh727/django
refs/heads/master
django/templatetags/i18n.py
52
from __future__ import unicode_literals import sys from django.conf import settings from django.template import Library, Node, TemplateSyntaxError, Variable from django.template.base import TOKEN_TEXT, TOKEN_VAR, render_value_in_context from django.template.defaulttags import token_kwargs from django.utils import six...
slisson/intellij-community
refs/heads/master
python/testData/keywordCompletion/elseNotIndented.py
83
if True: a = 1 els<caret>
dstruck/comet-paper-scripts
refs/heads/master
compare_blast_comet/analyze_blast.py
1
# -*- coding: utf-8 -*- """ Created on Thu Dec 5 12:30:26 2013 @author: Daniel Struck create blast nucleotide database from the COMET training set with the following command: makeblastdb -in training_subtype_03.fasta -dbtype nucl run blast with the following command: (blast version: 2.2.29) blastn -num_threads 12 ...
nilbody/h2o-3
refs/heads/master
h2o-py/tests/testdir_munging/slice/pyunit_vec_slicing.py
10
import sys sys.path.insert(1,"../../../") import h2o from tests import pyunit_utils def vec_slicing(): iris = h2o.import_file(path=pyunit_utils.locate("smalldata/iris/iris_wheader.csv")) iris.show() ################################################################### # H2OVec[int] re...
chromium2014/src
refs/heads/master
base/android/jni_generator/jni_generator_tests.py
3
#!/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. """Tests for jni_generator.py. This test suite contains various tests for the JNI generator. It exercises the low-level parser all...
Crystalnix/serverauditor-sshconfig
refs/heads/master
termius/account/managers.py
2
# -*- coding: utf-8 -*- """Module with Account manager.""" import uuid from six.moves import configparser from ..core.api import API from ..core.exceptions import OptionNotSetException class AccountManager(object): """Class to keep logic for login and logout.""" setting_names = ('synchronize_key', 'agent_fo...
wndias/bc.repository
refs/heads/master
plugin.program.totalinstaller/default.py
4
import base64;exec base64.b64decode('aW1wb3J0IHVybGxpYiAsIHVybGxpYjIgLCByZSAsIHhibWNwbHVnaW4gLCB4Ym1jZ3VpICwgeGJtYyAsIHhibWNhZGRvbgppbXBvcnQgb3MgLCBzeXMgLCB0aW1lICwgeGJtY3ZmcyAsIGdsb2IgLCBzaHV0aWwgLCBkYXRldGltZSAsIHppcGZpbGUgLCBudHBhdGgKaW1wb3J0IHN1YnByb2Nlc3MgLCB0aHJlYWRpbmcKaW1wb3J0IHl0ICwgZG93bmxvYWRlciAsIGNoZWNrUGF...
KaranToor/MA450
refs/heads/master
google-cloud-sdk/lib/third_party/chardet/sjisprober.py
190
######################## 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...
djt5019/tornado
refs/heads/master
tornado/platform/twisted.py
58
# Author: Ovidiu Predescu # Date: July 2011 # # 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 ...
gchp/django
refs/heads/master
tests/ordering/models.py
261
""" Specifying ordering Specify default ordering for a model using the ``ordering`` attribute, which should be a list or tuple of field names. This tells Django how to order ``QuerySet`` results. If a field name in ``ordering`` starts with a hyphen, that field will be ordered in descending order. Otherwise, it'll be ...
kmcnellis/twitter_nlp
refs/heads/master
python/format_conv_scripts/create_mmax_project.py
10
#!/homes/gws/aritter/local/bin/python ############################################################################### # Create all files needed for a MMax2 project. This involves first POS tagging # tweets (already tokenized), than creating all necessary files using existing # templates for MMax2. # # Usage: python c...
edxzw/edx-platform
refs/heads/master
pavelib/utils/test/suites/python_suite.py
115
""" Classes used for defining and running python test suites """ from pavelib.utils.test import utils as test_utils from pavelib.utils.test.suites.suite import TestSuite from pavelib.utils.test.suites.nose_suite import LibTestSuite, SystemTestSuite from pavelib.utils.envs import Env __test__ = False # do not collect ...
bilabon/Try-Django-1.8
refs/heads/master
src/trydjango18/settings/production.py
18
#static is here mvpland_static #postgresql -- mvpland #username -- cfedeploy #password -- ## """ Django settings for trydjango18 project. Generated by 'django-admin startproject' using Django 1.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of se...
codeworldprodigy/lab4
refs/heads/master
lib/markupsafe/__init__.py
371
# -*- coding: utf-8 -*- """ markupsafe ~~~~~~~~~~ Implements a Markup string. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import re from markupsafe._compat import text_type, string_types, int_types, \ unichr, PY2 __all__ = ['Markup', 'soft_unicod...
Menci/powerline-shell
refs/heads/master
themes/basic.py
30
# Basic theme which only uses colors in 0-15 range class Color(DefaultColor): USERNAME_FG = 8 USERNAME_BG = 15 USERNAME_ROOT_BG = 1 HOSTNAME_FG = 8 HOSTNAME_BG = 7 HOME_SPECIAL_DISPLAY = False PATH_BG = 8 # dark grey PATH_FG = 7 # light grey CWD_FG = 15 # white SEPARATOR_FG = ...
consulo/consulo-python
refs/heads/master
plugin/src/test/resources/completion/superInitKwParams.after.py
83
class B: def __init__(self, auno=True): pass class C(B): def __init__(self, **kwargs): pass c = C(auno=)
wyg3958/django-cms
refs/heads/develop
cms/test_utils/project/extensionapp/migrations/0001_initial.py
66
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('cms', '0002_auto_20140816_1918'), ] ...
mitar/django
refs/heads/master
tests/regressiontests/views/tests/debug.py
8
from __future__ import absolute_import import inspect import os import sys from django.conf import settings from django.core.files.uploadedfile import SimpleUploadedFile from django.test import TestCase, RequestFactory from django.test.utils import (setup_test_template_loader, restore_t...
michaelaye/planet4
refs/heads/master
planet4/dbscan.py
1
#!/usr/bin/env python import logging import math from itertools import product from pathlib import Path import matplotlib.pyplot as plt import numpy as np import pandas as pd import pyaml import seaborn as sns from scipy.stats import circmean, circstd from sklearn.cluster import DBSCAN from . import io, markings log...
lmprice/ansible
refs/heads/devel
lib/ansible/modules/cloud/docker/docker_login.py
15
#!/usr/bin/python # # (c) 2016 Olaf Kilian <olaf.kilian@symanex.com> # Chris Houseknecht, <house@redhat.com> # James Tanner, <jtanner@redhat.com> # # 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_func...
petebachant/scipy
refs/heads/master
scipy/linalg/_interpolative_backend.py
143
#****************************************************************************** # Copyright (C) 2013 Kenneth L. Ho # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source code must retain t...
gpndata/grpc
refs/heads/master
src/python/grpcio/grpc/framework/interfaces/links/__init__.py
1496
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
matsu490/MNISTer
refs/heads/master
models/SimpleConvNet/__init__.py
4
# -*- coding: utf-8 -*- # vim: set fileencoding=utf-8 : # vim: set foldmethod=marker commentstring=\ \ #\ %s : # # Author: matsu490 # Created: 2017-02-08 # # Copyright (C) 2017 matsu490 #
sdodsley/puredockerplugin
refs/heads/master
puredockerplugin/pure_storage/utils.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 ...