repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
Zhongqilong/mykbengineer
refs/heads/master
kbe/res/scripts/common/Lib/encodings/iso2022_jp_ext.py
816
# # iso2022_jp_ext.py: Python Unicode Codec for ISO2022_JP_EXT # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_iso2022, codecs import _multibytecodec as mbc codec = _codecs_iso2022.getcodec('iso2022_jp_ext') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class Incr...
amenonsen/ansible
refs/heads/devel
lib/ansible/plugins/doc_fragments/proxysql.py
44
# -*- coding: utf-8 -*- # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt class ModuleDocFragment(object): # Documentation fragment for ProxySQL connectivity CONNECTIVITY = r''' options: login_user: description: - T...
GhostofGoes/cgoes-cs404
refs/heads/master
euler/one.py
1
#!/usr/bin/env python3 count = 0 for i in range(0, 1000): if (i % 3) == 0 or (i % 5) == 0: count += i print(count)
diegocortassa/TACTIC
refs/heads/master
src/tactic/command/rsync.py
1
############################################################ # # Copyright (c) 2013, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way witho...
hchen1202/django-react
refs/heads/master
virtualenv/lib/python3.6/site-packages/django/contrib/gis/apps.py
590
from django.apps import AppConfig from django.core import serializers from django.utils.translation import ugettext_lazy as _ class GISConfig(AppConfig): name = 'django.contrib.gis' verbose_name = _("GIS") def ready(self): if 'geojson' not in serializers.BUILTIN_SERIALIZERS: serialize...
mglukhikh/intellij-community
refs/heads/master
python/testData/inspections/PyClassHasNoInitInspection/new.py
83
class Test(object): def __new__(cls, foo): # False positive self = super(Test, cls).__new__(cls) self.foo = foo return self def bar(self): return self.foo t = Test(42) print(t.bar())
PXke/invenio
refs/heads/dev-pu
invenio/modules/jsonalchemy/jsonext/functions/is_local_url.py
2
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2013, 2014 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your opt...
diegopettengill/multiuserblog
refs/heads/master
handlers/comment.py
1
from app import Handler from entities.post import Post from entities.comment import Comment from handlers.auth import Auth from webapp2_extras import json class CommentHandler(Handler): def get(self, comment_id): if not Auth.is_logged_in(self.request): # checks if user is logged in self.respo...
casselineau/Tracer
refs/heads/master
tests/test_triangular_face.py
2
# Unit tests for the tracer.triangular_face module. import unittest import numpy as np from tracer.triangular_face import TriangularFace from tracer.ray_bundle import RayBundle from tracer.spatial_geometry import translate, rotx class TestExclusion(unittest.TestCase): def setUp(self): x, y = np.mgrid[-1:...
zubair-arbi/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/tests/test_export.py
28
""" Tests of XML export """ import ddt import lxml.etree import mock import os import pytz import shutil import tarfile import unittest import uuid from datetime import datetime, timedelta, tzinfo from fs.osfs import OSFS from path import Path as path from tempfile import mkdtemp from textwrap import dedent from xbl...
lucafavatella/intellij-community
refs/heads/cli-wip
python/testData/inspections/PyUnboundLocalVariableInspection/UnboundNestedComprehension.py
83
def f(xs): # vs is unbound return [(k, v) for v in <warning descr="Local variable 'vs' might be referenced before assignment">vs</warning> for k, vs in xs.items()]
vicnet/weboob
refs/heads/master
modules/linebourse/api/pages.py
1
# -*- coding: utf-8 -*- # Copyright(C) 2018 Fong Ngo # # This file is part of a weboob module. # # This weboob module 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 Licens...
kerneltask/micropython
refs/heads/master
tests/cmdline/repl_inspect.py
10
# cmdline: -c print("test") -i # -c option combined with -i option results in REPL
xhair/TopOdoo_Addons
refs/heads/master
ToproERP_Wechat_Enterprises/wechat_sdk/context/framework/django/tests.py
25
# -*- coding: utf-8 -*- from datetime import timedelta from django.conf import settings from django.test import TestCase from django.utils import six from django.utils import timezone from wechat_sdk.context.framework.django.backends.db import ContextStore as DatabaseContext from wechat_sdk.context.framework.django....
SiderZhang/p2pns3
refs/heads/master
bindings/python/ns3modulegen-modular.py
56
import warnings import sys import os import pybindgen.settings from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers from pybindgen.module import MultiSectionFactory import ns3modulegen_core_customizations pybindgen.settings.wrapper_registry = pybindgen.settings.StdMapWrapperRegistry impor...
rellla/xbmca10
refs/heads/stage/Frodo
lib/gtest/test/gtest_xml_output_unittest.py
356
#!/usr/bin/env python # # Copyright 2006, 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...
OptimusGitEtna/RestSymf
refs/heads/master
Python-3.4.2/Tools/scripts/nm2def.py
97
#! /usr/bin/env python3 """nm2def.py Helpers to extract symbols from Unix libs and auto-generate Windows definition files from them. Depends on nm(1). Tested on Linux and Solaris only (-p option to nm is for Solaris only). By Marc-Andre Lemburg, Aug 1998. Additional notes: the output of nm is supposed to look like t...
EGI-FCTF/occi-os
refs/heads/master
occi_os_api/backends/__init__.py
4
# coding=utf-8 # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (c) 2012, Intel Performance Learning Solutions 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 copy of the License at # # ...
sshleifer/object_detection_kitti
refs/heads/master
object_detection/exporter_test.py
14
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
moreati/python-ipfs-api
refs/heads/master
setup.py
1
from setuptools import setup, find_packages setup( name='ipfs-api', # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # https://packaging.python.org/en/latest/single_source_version.html version='0.1.12', descrip...
viktorradnai/screenwarp
refs/heads/master
utils/create_chessboard.py
1
#!/usr/bin/python import cv2 import wand.image import wand.color import wand.drawing import sys import logging import argparse logger = logging.getLogger(__name__) def parse_cmdline(): parser = argparse.ArgumentParser(description=''' TODO: insert description.''' ) parser.add_argument('-v', '--ver...
Kurmaev/vobject
refs/heads/master
vobject/behavior.py
5
from . import base #------------------------ Abstract class for behavior -------------------------- class Behavior(object): """ Behavior (validation, encoding, and transformations) for vobjects. Abstract class to describe vobject options, requirements and encodings. Behaviors are used for root compon...
ldionne/nstl-lang
refs/heads/master
setup.py
1
#!/usr/bin/env python3 from distutils.core import setup setup( name = 'nstl', version = '0.1.0', url = 'https://github.com/ldionne/nstl-lang', author = 'Louis Dionne', author_email = 'louis.dionne92@gmail.com', description = "nstl: A compiler for creating templates in C.", license = 'BSD'...
bpowers/encircling
refs/heads/master
support/bin/pylib/gyp/__init__.py
81
#!/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...
Jonekee/chromium.src
refs/heads/nw12
build/android/gyp/util/build_device.py
50
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ A simple device interface for build steps. """ import logging import os import re import sys from util import build_utils BUILD_ANDROID_DIR = os.path...
unseenlaser/python-for-android
refs/heads/master
python3-alpha/python3-src/Tools/pybench/Setup.py
124
#!python # Setup file for pybench # # This file has to import all tests to be run; it is executed as # Python source file, so you can do all kinds of manipulations here # rather than having to edit the tests themselves. # # Note: Please keep this module compatible to Python 1.5.2. # # Tests may include features in lat...
dgladkov/django
refs/heads/master
tests/migrations/test_migrations_run_before/0002_second.py
282
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("migrations", "0001_initial"), ] operations = [ migrations.CreateModel( "Book", [ ("...
carljm/django
refs/heads/master
tests/migrations/test_migrations_squashed_extra/0002_second.py
25
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [("migrations", "0001_initial")]
MoritzS/django
refs/heads/master
django/contrib/auth/migrations/0003_alter_user_email_max_length.py
134
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auth', '0002_alter_permission_name_max_length'), ] operations = [ migrations.AlterField( model_name='user', name='email', field=models.EmailField(max_len...
mewtaylor/django
refs/heads/master
django/conf/locale/ko/formats.py
404
# -*- 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 = 'Y년 n월 j일' TIME_FORMAT = 'A g:i' D...
GoogleCloudPlatform/healthcare-deid
refs/heads/master
mae/remove_invalid_characters.py
1
# Copyright 2017 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 ...
barberscore/barberscore-api
refs/heads/master
project/apps/registration/migrations/0011_auto_20190910_0519.py
3
# Generated by Django 2.2.5 on 2019-09-10 12:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('registration', '0010_auto_20190909_1257'), ] operations = [ migrations.AlterField( model_name='entry', name='distric...
tersmitten/ansible
refs/heads/devel
test/integration/targets/module_utils/module_utils/yak/zebra/foo.py
298
data = 'yak'
QQuick/Transcrypt
refs/heads/master
transcrypt/development/automated_tests/transcrypt/modules/__init__.py
1
import modules.mod1.mod11.mod111 import modules.mod3 import modules.mod1.mod11.mod112 import modules.mod1 import modules.mod1.mod11 import modules.mod2 import modules.mod2.mod21 import modules.mod2.mod22 import modules.mod1.mod11.mod111 as aliasMod111 import modules.mod1 as aMod1 from modules.mod1.mod11 i...
sbathehwx/failhadoop
refs/heads/master
bin/restart_all_services.py
1
#!/usr/bin/env python # TODO: Add Support for multiple clusters in an Ambari instance. This works now # cause we assume Ambari manages only one cluster per instance # The change needs to go in ambari_helpers, we can just consume it here import argparse, failhadoop, sys, time parser = argparse.ArgumentParser() parser.a...
ewbankkit/cloud-custodian
refs/heads/master
c7n/resources/gamelift.py
5
# Copyright 2016-2017 Capital One Services, 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
siosio/intellij-community
refs/heads/master
python/testData/inspections/PyMethodOverridingInspection/RequiredParameterAndKwargs.py
74
class B: def foo(self): pass class C(B): def foo<warning descr="Signature of method 'C.foo()' does not match signature of base method in class 'B'">(self, p1, **kwargs)</warning>: #fail pass
myfluxi/xxICSKernel
refs/heads/master
tools/perf/scripts/python/check-perf-trace.py
11214
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
bioinformatics-ua/catalogue
refs/heads/dev
emif/developer/tasks.py
2
# -*- coding: utf-8 -*- # Copyright (C) 2014 Universidade de Aveiro, DETI/IEETA, Bioinformatics Group - http://bioinformatics.ua.pt/ # # 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 vers...
boundarydevices/android_external_chromium_org
refs/heads/cm-12.0
tools/telemetry/telemetry/page/page_test_unittest.py
10
# 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 unittest from telemetry.core import util from telemetry.page import page as page_module from telemetry.page import page_test class DoNothingPageTes...
pabloborrego93/edx-platform
refs/heads/master
common/djangoapps/util/tests/test_date_utils.py
24
# -*- coding: utf-8 -*- """ Tests for util.date_utils """ from datetime import datetime, timedelta, tzinfo import unittest import ddt from mock import patch from nose.tools import assert_equals, assert_false # pylint: disable=no-name-in-module from pytz import utc from util.date_utils import ( get_default_time_d...
burzumie/sip_softphone
refs/heads/master
lib/win32/pjsip/tests/pjsua/scripts-sendto/411_fmtp_amrnb_offer_band_eff.py
42
# $Id: 411_fmtp_amrnb_offer_band_eff.py 3664 2011-07-19 03:42:28Z nanang $ import inc_sip as sip import inc_sdp as sdp # Answer for codec AMR should not contain fmtp octet-align=1 sdp = \ """ v=0 o=- 3428650655 3428650655 IN IP4 192.168.1.9 s=pjmedia c=IN IP4 192.168.1.9 t=0 0 a=X-nat:0 m=audio 4000 RTP/AVP 99 101 a=...
agry/NGECore2
refs/heads/master
scripts/object/static/particle/particle_test_52.py
85615
import sys def setup(core, object): return
agry/NGECore2
refs/heads/master
scripts/object/tangible/wearables/earring/earring_s13.py
85615
import sys def setup(core, object): return
gmist/3dhero2
refs/heads/master
main/apps/pages/views.py
2
# coding: utf-8 import flask from core import util import config bp = flask.Blueprint( 'pages', __name__, template_folder='templates', ) ############################################################################### # Main page ########################################################################...
qpxu007/Flask-AppBuilder
refs/heads/master
bin/db_upgrade.py
66
#!flask/bin/python from migrate.versioning import api from config import SQLALCHEMY_DATABASE_URI from config import SQLALCHEMY_MIGRATE_REPO api.upgrade(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO) print 'Current database version: ' + str(api.db_version(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO))
shuggiefisher/potato
refs/heads/master
django/core/management/__init__.py
152
import os import sys from optparse import OptionParser, NO_DEFAULT import imp import django from django.core.management.base import BaseCommand, CommandError, handle_default_options from django.utils.importlib import import_module # For backwards compatibility: get_version() used to be in this module. get_version = d...
tanglei528/glance
refs/heads/master
glance/api/policy.py
1
# Copyright (c) 2011 OpenStack Foundation # Copyright 2013 IBM Corp. # 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...
lcharleux/abapy
refs/heads/master
doc/example_code/indentation/indentation-Step.py
1
from abapy.indentation import Step step = Step('mystep')
korzeniewskipl/python-mode
refs/heads/develop
pymode/libs/pylama/lint/pylama_pylint/pylint/checkers/design_analysis.py
17
# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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 2 of the License, o...
tedunderwood/biographies
refs/heads/master
eda/basic_character_eda.py
1
#!/usr/bin/env python3 # basic_character_eda.py # Adapted from jsontotable5.py, which actually unpacks the # data in book jsons produced by BookNLP. # This variant instead produces a table that reveals # the number of characters per book, and the distribution # of characters across possible sizes. import ujson, csv...
orekyuu/intellij-community
refs/heads/master
python/helpers/python-skeletons/behave.py
80
# coding=utf-8 """ Python Behave skeletons (https://pythonhosted.org/behave/) """ def given(pattern): """Decorates a function, so that it will become a new step definition. :param pattern pattern to match, may be regular expression or something else depends on step matcher """ pass def when(patte...
2141040025/Django-CRUD-v.1
refs/heads/master
relax_bro/wsgi.py
2
""" WSGI config for relax_bro project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SET...
everett-toews/metaslacker
refs/heads/master
api/api.py
2
import logging import os from flask import Flask, request from flask.ext.script import Manager from flask.ext.sqlalchemy import SQLAlchemy from werkzeug.security import generate_password_hash, check_password_hash logging.basicConfig( level=logging.DEBUG, format='%(levelname)s: %(message)s') logger = logging...
ruyang/ironic
refs/heads/master
ironic/drivers/modules/drac/job.py
2
# # 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...
revzim/interactive-tutorials
refs/heads/master
markdown/extensions/fenced_code.py
125
#!/usr/bin/env python """ Fenced Code Extension for Python Markdown ========================================= This extension adds Fenced Code Blocks to Python-Markdown. >>> import markdown >>> text = ''' ... A paragraph before a fenced code block: ... ... ~~~ ... Fenced code block ... ~~...
Thilas/xbmc-addon-watchdog
refs/heads/master
lib/watchdog/observers/read_directory_changes.py
3
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2011 Yesudeep Mangalapilly <yesudeep@gmail.com> # Copyright 2012 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 # # ...
xiangel/hue
refs/heads/master
desktop/core/ext-py/boto-2.38.0/boto/glacier/exceptions.py
185
# -*- coding: utf-8 -*- # Copyright (c) 2012 Thomas Parslow http://almostobsolete.net/ # # 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 th...
Mchakravartula/rockstor-core
refs/heads/master
src/rockstor/system/util.py
6
""" Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any la...
tunneln/CarnotKE
refs/heads/master
jyhton/lib-python/2.7/test/test_aifc.py
38
from test.test_support import findfile, run_unittest, TESTFN import unittest import os import io import aifc class AIFCTest(unittest.TestCase): def setUp(self): self.f = self.fout = None self.sndfilepath = findfile('Sine-1000Hz-300ms.aif') def tearDown(self): if self.f is not None: ...
rajanvenkataguru/exercises-in-programming-style
refs/heads/master
32-trinity/util.py
18
import sys, os # # getch in a platform-independent way # Credit: http://code.activestate.com/recipes/134892/ # class _Getch: """Gets a single character from standard input. Does not echo to the screen.""" def __init__(self): try: self.impl = _GetchWindows() except ImportError: ...
domoinc/domo-python-sdk
refs/heads/master
examples/stream.py
1
from pydomo.datasets import DataSetRequest, Schema, Column, ColumnType from pydomo.streams import UpdateMethod, CreateStreamRequest def streams(domo): '''Streams are useful for uploading massive data sources in chunks, in parallel. They are also useful with data sources that are constantly changing/growin...
noam09/deluge-telegramer
refs/heads/master
telegramer/include/future/backports/html/__init__.py
12
""" General functions for HTML manipulation, backported from Py3. Note that this uses Python 2.7 code with the corresponding Python 3 module names and locations. """ from __future__ import unicode_literals _escape_map = {ord('&'): '&amp;', ord('<'): '&lt;', ord('>'): '&gt;'} _escape_map_full = {ord('&'): '&amp;', o...
ghostkim-sc/SMG920T_profiling_enabled
refs/heads/master
tools/perf/scripts/python/check-perf-trace.py
11214
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
damiansoriano/odoo
refs/heads/master
setup/win32/setup.py
105
# -*- 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...
itai12312/workspaces
refs/heads/master
hellodjango/venv/lib/python2.7/site-packages/django/conf/locale/he/formats.py
237
# -*- 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 = 'j בF Y' TIME_FORMAT = 'H:i:s' DAT...
agry/NGECore2
refs/heads/master
scripts/object/static/structure/dantooine/dant_hide_tanning_s02.py
85615
import sys def setup(core, object): return
agry/NGECore2
refs/heads/master
scripts/object/draft_schematic/space/weapon/armor_effectiveness_intensifier_mk4.py
85615
import sys def setup(core, object): return
bitmovin/bitmovin-python
refs/heads/master
bitmovin/resources/models/encodings/drms/fairplay_drm.py
1
from .drm import DRM class FairPlayDRM(DRM): def __init__(self, key, iv=None, uri=None, outputs=None, id_=None, custom_data=None, name=None, description=None): super().__init__(id_=id_, custom_data=custom_data, outputs=outputs, name=name, description=description) self.key = key self.iv =...
mdaif/exscript
refs/heads/master
src/Exscript/emulators/VirtualDevice.py
7
# Copyright (C) 2007-2010 Samuel Abels. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2, as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANT...
AdaptiveApplications/carnegie
refs/heads/master
tarc_bus_locator_client/numpy-1.8.1/build/lib.linux-x86_64-2.7/numpy/oldnumeric/mlab.py
12
"""This module is for compatibility only. All functions are defined elsewhere. """ from __future__ import division, absolute_import, print_function __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'Li...
drawks/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/redshift_subnet_group.py
27
#!/usr/bin/python # Copyright 2014 Jens Carl, Hothead Games 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', 'stat...
RayMick/scikit-learn
refs/heads/master
sklearn/feature_extraction/tests/test_dict_vectorizer.py
276
# Authors: Lars Buitinck <L.J.Buitinck@uva.nl> # Dan Blanchard <dblanchard@ets.org> # License: BSD 3 clause from random import Random import numpy as np import scipy.sparse as sp from numpy.testing import assert_array_equal from sklearn.utils.testing import (assert_equal, assert_in, ...
MuhammedHasan/metabolitics
refs/heads/master
setup.py
1
from setuptools import setup, find_packages setup( name='metabolitics', version='0.0.12', packages=find_packages(), description='metabolitics', author="Muhammed Hasan Celik", author_email="hasancelik@std.sehir.edu.tr", url="https://github.com/MuhammedHasan/metabolitics", install_require...
arista-eosplus/ansible
refs/heads/devel
test/units/utils/test_helpers.py
197
# (c) 2015, Marius Gedminas <marius@gedmin.as> # # 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 vers...
michigraber/scikit-learn
refs/heads/master
sklearn/manifold/tests/test_locally_linear.py
232
from itertools import product from nose.tools import assert_true import numpy as np from numpy.testing import assert_almost_equal, assert_array_almost_equal from scipy import linalg from sklearn import neighbors, manifold from sklearn.manifold.locally_linear import barycenter_kneighbors_graph from sklearn.utils.testi...
maxsocl/django
refs/heads/master
tests/http_utils/tests.py
23
from __future__ import unicode_literals import gzip import io from django.http import ( HttpRequest, HttpResponse, HttpResponseRedirect, StreamingHttpResponse, ) from django.http.utils import conditional_content_removal, fix_location_header from django.test import TestCase # based on Python 3.3's gzip.compress ...
gwpy/gwpy.github.io
refs/heads/master
docs/0.14.2/table/plot-2.py
7
events = EventTable.read('H1-LDAS_STRAIN-968654552-10.xml.gz', tablename='sngl_burst', columns=['peak', 'central_freq', 'snr', 'duration', 'bandwidth']) plot = events.tile('peak', 'central_freq', 'duration', 'bandwidth', color='snr') ax = plot.gca() ax.set_epoch(968654552) ax.set_yscale('log') ax.set_ylabel('Frequency ...
lakewik/storj-gui-client
refs/heads/master
UI/utilities/account_manager.py
1
# -*- coding: utf-8 -*- import hashlib import logging import xml.etree.cElementTree as ET ACCOUNT_FILE = 'storj_account_conf.xml' class AccountManager: __logger = logging.getLogger('%s.AccountManager' % __name__) def __init__(self, login_email=None, password=None): self.login_email = login_email...
bpradipt/rethinkdb
refs/heads/ppc64le
test/common/http_support/jinja2/testsuite/bytecode_cache.py
404
# -*- coding: utf-8 -*- """ jinja2.testsuite.bytecode_cache ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test bytecode caching :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase, package_loader from jinja2 import...
Lekanich/intellij-community
refs/heads/master
python/testData/copyPaste/SelectionReverse2.after.py
332
if True: a = 1 b = 2 def f(): if True: a = 1 b = 2
leafclick/intellij-community
refs/heads/master
python/helpers/py2only/docutils/parsers/rst/directives/references.py
142
# $Id: references.py 7062 2011-06-30 22:14:29Z milde $ # Authors: David Goodger <goodger@python.org>; Dmitry Jemerov # Copyright: This module has been placed in the public domain. """ Directives for references and targets. """ __docformat__ = 'reStructuredText' from docutils import nodes from docutils.transforms imp...
ecreall/lagendacommun
refs/heads/master
lac/dateindex.py
1
# Copyright (c) 2016 by Ecreall under licence AGPL terms # available on http://www.gnu.org/licenses/agpl.html # licence: AGPL # author: Amen Souissi, Vincent fretin import calendar import pytz import datetime from itertools import dropwhile, takewhile from persistent import Persistent from BTrees.Length import Lengt...
rumz/pis-system
refs/heads/master
pis_system/pis_system/manage.py
2
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pis_system.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
undoware/neutron-drive
refs/heads/master
neutron-drive/django/contrib/localflavor/ca/forms.py
86
""" Canada-specific Form helpers """ from __future__ import absolute_import import re from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, CharField, Select from django.utils.encoding import smart_unicode from django.utils.translation import ...
chrismeyersfsu/ansible-modules-core
refs/heads/devel
cloud/openstack/os_router.py
43
#!/usr/bin/python # # This module 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 software is distributed in the hope that it ...
mttr/django
refs/heads/master
django/contrib/flatpages/apps.py
590
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class FlatPagesConfig(AppConfig): name = 'django.contrib.flatpages' verbose_name = _("Flat Pages")
stansonhealth/ansible-modules-core
refs/heads/devel
cloud/rackspace/rax_files.py
41
#!/usr/bin/python # (c) 2013, Paul Durivage <paul.durivage@rackspace.com> # # 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 # (a...
navycrow/Sick-Beard
refs/heads/development
sickbeard/name_parser/parser.py
6
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 t...
Klaudit/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/host_mock.py
122
# Copyright (C) 2011 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...
jank3/django
refs/heads/master
tests/model_fields/test_durationfield.py
296
import datetime import json from django import forms from django.core import exceptions, serializers from django.db import models from django.test import SimpleTestCase, TestCase from .models import DurationModel, NullDurationModel class TestSaveLoad(TestCase): def test_simple_roundtrip(self): duration...
pabulumm/neighbors
refs/heads/master
lib/python3.4/site-packages/django/db/backends/postgresql_psycopg2/features.py
465
from ..postgresql.features import * # NOQA
tkingless/webtesting
refs/heads/master
venvs/dev/lib/python2.7/site-packages/selenium/webdriver/edge/webdriver.py
43
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
ProfessorX/Config
refs/heads/master
.PyCharm30/system/python_stubs/-1247972723/PyQt4/QtCore/__init__/QUrl.py
2
# encoding: utf-8 # module PyQt4.QtCore # from /usr/lib/python2.7/dist-packages/PyQt4/QtCore.so # by generator 1.135 # no doc # imports import sip as __sip class QUrl(): # skipped bases: <type 'sip.simplewrapper'> """ QUrl() QUrl(QString) QUrl(QString, QUrl.ParsingMode) QUrl(QUrl) """ def...
ds-hwang/chromium-crosswalk
refs/heads/master
chrome/test/kasko/py/kasko/util.py
19
#!/usr/bin/env python # Copyright 2016 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. """Various utilities useful for performing Kasko integration tests.""" import logging import os import shutil import tempfile _LOGGE...
GinnyN/Team-Fortress-RPG-Generators
refs/heads/master
build/lib/django/core/mail/backends/filebased.py
394
"""Email backend that writes messages to a file.""" import datetime import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.mail.backends.console import EmailBackend as ConsoleEmailBackend class EmailBackend(ConsoleEmailBackend): def __init__(self, *arg...
gpostelnicu/fin_data
refs/heads/master
tests/io/test_sp500.py
1
import tempfile from datetime import datetime from fin_data.io import sp500 def test_sp500(): test_dir = tempfile.mkdtemp() sp500.store_snapshot(test_dir) df = sp500.load_latest(test_dir) out_cols = sorted(df.columns.tolist()) assert out_cols == ['date_first_added', 'sector', 'subindustry', 'ti...
mathemage/h2o-3
refs/heads/master
h2o-py/tests/testdir_demos/pyunit_glm_demo.py
6
import sys sys.path.insert(1, "../../") import h2o def demo_glm(): h2o.demo(funcname="glm", interactive=False, test=True) if __name__ == "__main__": from tests import pyunit_utils pyunit_utils.standalone_test(demo_glm) else: demo_glm()
iakovos-panourgias/fluidity
refs/heads/master
tests/Stokes_slab_detachment/probe_viscosities.py
4
#!/usr/bin/env python import vtktools, numpy def probe_visc(): # Files and probing resolution: vtufile = "Benchmark_Case_1a_1.pvtu" npoints = 500 # First probe viscosity at y = 550e3 # Setup Coordinates: colx = numpy.array([numpy.linspace(0,500e3,npoints)]).reshape(npoints,1) ...
south-coast-science/scs_core
refs/heads/develop
tests/sync/schedule_test.py
1
#!/usr/bin/env python3 """ Created on 29 Jun 2017 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) """ import json import sys from collections import OrderedDict from scs_core.data.json import JSONify from scs_core.sync.schedule import Schedule from scs_core.sync.schedule import ScheduleItem # --------...