repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
crazy-cat/incubator-mxnet
refs/heads/master
example/speech_recognition/stt_bucketing_module.py
52
# 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 u...
whiteclover/solo
refs/heads/master
benchmark/flaskb.py
1
from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == '__main__': from gevent.wsgi import WSGIServer http_server = WSGIServer(('', 8080), app, log=None) http_server.serve_forever()
jstammers/EDMSuite
refs/heads/atom-mega-mix
NavPython/IronPython/Lib/token.py
178
#! /usr/bin/env python """Token constants (from "token.h").""" # This file is automatically generated; please don't muck it up! # # To update the symbols in this file, 'cd' to the top directory of # the python source tree after building the interpreter and run: # # python Lib/token.py #--start constants-- ENDM...
pdc/dozup
refs/heads/master
tests/test_poster.py
1
# -*- coding: UTF-8 -*- from __future__ import unicode_literals import io import json import shutil import tempfile import unittest import httpretty from dozup import DozupPoster, DozupError class PosterTestMixin(unittest.TestCase): status_code = 202 endpoint_uri = 'http://example.com/drop/' content_ty...
chand3040/cloud_that
refs/heads/named-release/cypress.rc
lms/djangoapps/bulk_email/tasks.py
29
# -*- coding: utf-8 -*- """ This module contains celery task functions for handling the sending of bulk email to a course. """ import re import random import json from time import sleep from collections import Counter import logging import dogstats_wrapper as dog_stats_api from smtplib import SMTPServerDisconnected, S...
aaltinisik/OCBAltinkaya
refs/heads/8.0
addons/account_analytic_analysis/account_analytic_analysis.py
38
# -*- 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...
awkspace/ansible
refs/heads/devel
lib/ansible/modules/storage/netapp/na_ontap_snapmirror.py
5
#!/usr/bin/python # (c) 2018-2019, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
cvlab-epfl/multicam-gt
refs/heads/master
gtm_hit/tests.py
24123
from django.test import TestCase # Create your tests here.
simonmonk/prog_pi_ed2
refs/heads/master
08_pygame.py
1
import pygame import sys pygame.init() screen = pygame.display.set_mode((256, 256)) pygame.display.set_caption('Caption') ball_tile = pygame.image.load('ball.jpg').convert() graph_rect = ball_tile.get_rect() rows = int(256 / graph_rect.height) + 1 columns = int(256 / graph_rect.width) + 1 for y in xrange(rows): ...
vmindru/ansible
refs/heads/devel
lib/ansible/plugins/action/assert.py
26
# Copyright 2012, Dag Wieers <dag@wieers.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 # (at your option) any later versi...
cuducos/whiskyton
refs/heads/master
migrations/versions/8a208be6362_basic_structure.py
1
"""Basic structure Revision ID: 8a208be6362 Revises: ee26b6a2a19 Create Date: 2014-12-19 18:29:15.863743 """ # revision identifiers, used by Alembic. revision = '8a208be6362' down_revision = 'ee26b6a2a19' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - pl...
ky822/scikit-learn
refs/heads/master
sklearn/preprocessing/label.py
137
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Olivier Grisel <olivier.grisel@ensta.org> # Andreas Mueller <amueller@ais.uni-bonn.de> # Joel Nothman <joel.nothman@gmail.com> # Hamzeh Alsalhi <ha258@cornell.edu> # Licens...
eduNEXT/edx-platform
refs/heads/master
openedx/core/lib/tests/test_command_utils.py
5
""" Tests of management command utility code """ from unittest import TestCase import ddt import pytest from django.core.management import CommandError from .. import command_utils @ddt.ddt class MutuallyExclusiveRequiredOptionsTestCase(TestCase): """ Test that mutually exclusive required options allow one ...
anryko/ansible
refs/heads/devel
test/lib/ansible_test/_data/sanity/code-smell/no-basestring.py
68
#!/usr/bin/env python from __future__ import (absolute_import, division, print_function) __metaclass__ = type import re import sys def main(): for path in sys.argv[1:] or sys.stdin.read().splitlines(): with open(path, 'r') as path_fd: for line, text in enumerate(path_fd.readlines()): ...
betoesquivel/fil2014
refs/heads/master
filenv/lib/python2.7/site-packages/whoosh/automata/nfa.py
95
# Copyright 2012 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...
apixandru/intellij-community
refs/heads/master
python/testData/refactoring/introduceVariable/substringInStatement.after.py
83
a = 'foo' x = '%sbar' % a
cubicova17/annet
refs/heads/master
venv/lib/python2.7/site-packages/django/bin/daily_cleanup.py
113
#!/usr/bin/env python """ Daily cleanup job. Can be run as a cronjob to clean out old data from the database (only expired sessions at the moment). """ import warnings from django.core import management if __name__ == "__main__": warnings.warn( "The `daily_cleanup` script has been deprecated " ...
tashaxe/Red-DiscordBot
refs/heads/develop
lib/youtube_dl/extractor/drtv.py
10
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( ExtractorError, int_or_none, float_or_none, mimetype2ext, parse_iso8601, remove_end, update_url_query, ) class DRTVIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?dr\.d...
obiben/pokemongo-api
refs/heads/master
pogo/POGOProtos/Data/Battle/BattleAction_pb2.py
4
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Data/Battle/BattleAction.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf...
cpollard1001/FreeCAD_sf_master
refs/heads/master
src/Mod/Material/Init.py
29
#*************************************************************************** #* * #* Copyright (c) 2013 - Juergen Riegel <FreeCAD@juergen-riegel.net> * #* * #* This ...
pixelgremlins/ztruck
refs/heads/master
dj/lib/python2.7/fnmatch.py
4
/usr/lib/python2.7/fnmatch.py
fintech-circle/edx-platform
refs/heads/master
lms/djangoapps/instructor/tests/test_services.py
10
""" Tests for the InstructorService """ import json from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory from courseware.models import StudentModule from lms.djangoapps.instructor.access import allow_access from lms.djangoapps.instru...
vektorlab/multivac
refs/heads/master
multivac/util.py
2
from datetime import datetime def unix_time(dt): epoch = datetime.utcfromtimestamp(0) delta = dt - epoch return int(round(delta.total_seconds())) def format_time(unix_time): if isinstance(unix_time, str): unix_time = int(unix_time) return datetime.fromtimestamp(unix_time).strftime('%Y-%m-%...
linsomniac/luigi
refs/heads/master
luigi/notifications.py
3
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
itomg/node-gyp
refs/heads/master
gyp/pylib/gyp/MSVSToolFile.py
2736
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Visual Studio project reader/writer.""" import gyp.common import gyp.easy_xml as easy_xml class Writer(object): """Visual Studio XML tool file writer.""" ...
LaoZhongGu/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/distutils/tests/test_config.py
53
"""Tests for distutils.pypirc.pypirc.""" import sys import os import unittest import tempfile from distutils.core import PyPIRCCommand from distutils.core import Distribution from distutils.log import set_threshold from distutils.log import WARN from distutils.tests import support from test.support import run_unittes...
zincumyx/Mammoth
refs/heads/master
mammoth-src/src/contrib/hod/hodlib/HodRing/hodRing.py
118
#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 use thi...
jianlirong/incubator-hawq
refs/heads/master
tools/bin/pythonSrc/pychecker-0.8.18/test_input/test3.py
11
"Shouldn't be any warnings/errors" import string def describeSyntax(syntax): return string.join(['<%s>' % x.Description]) from UserDict import UserDict class jj(UserDict) : def __init__(self): UserDict.__init__(self)
losywee/rethinkdb
refs/heads/next
packaging/osx/mac_alias/__init__.py
50
from .alias import * __all__ = [ 'ALIAS_KIND_FILE', 'ALIAS_KIND_FOLDER', 'ALIAS_HFS_VOLUME_SIGNATURE', 'ALIAS_FIXED_DISK', 'ALIAS_NETWORK_DISK', 'ALIAS_400KB_FLOPPY_DISK', 'ALIAS_800KB_FLOPPY_DISK', 'ALIAS_1_44MB_FLOPPY_DISK', 'ALIAS_EJECTABLE_DISK', 'ALIAS_N...
smart-classic/smart_server
refs/heads/master
django_concurrent_test_server/management/commands/runconcurrentserver.py
4
from django.core.management.base import BaseCommand, CommandError from optparse import make_option import os import sys class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--noreload', action='store_false', dest='use_reloader', default=True, help='Tells Django to ...
lhongskie/yt-samples-python
refs/heads/master
channel_bulletin.py
1
#!/usr/bin/python import httplib2 import os import sys from apiclient.discovery import build from oauth2client.file import Storage from oauth2client.client import flow_from_clientsecrets from oauth2client.tools import run from optparse import OptionParser # CLIENT_SECRETS_FILE, name of a file containing the OAuth 2...
aio-libs/aiohttp-debugtoolbar
refs/heads/master
tests/test_server_push.py
1
import json from aiohttp_debugtoolbar import APP_KEY async def test_sse(create_server, aiohttp_client): async def handler(request): raise NotImplementedError app = await create_server() app.router.add_route('GET', '/', handler) client = await aiohttp_client(app) # make sure that exceptio...
thejdeep/CoAPthon
refs/heads/master
coapthon/client/coap.py
2
import logging.config import random import socket import threading import time from coapthon import defines from coapthon.layers.blocklayer import BlockLayer from coapthon.layers.messagelayer import MessageLayer from coapthon.layers.observelayer import ObserveLayer from coapthon.layers.requestlayer import Re...
openstack/cinder
refs/heads/master
cinder/volume/drivers/hpe/hpe_3par_base.py
2
# (c) Copyright 2013-2015 Hewlett Packard Enterprise Development LP # All Rights Reserved. # # Copyright 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 Licen...
savoirfairelinux/OpenUpgrade
refs/heads/master
openerp/tools/pdf_utils.py
456
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
opoplawski/StarCluster
refs/heads/develop
starcluster/commands/terminate.py
19
# Copyright 2009-2014 Justin Riley # # This file is part of StarCluster. # # StarCluster 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 License, or (at your option) any # later ...
ol-loginov/intellij-community
refs/heads/master
python/testData/stubs/DunderAll.py
83
__all__ = ['foo', 'bar']
carlosp420/bold
refs/heads/master
tests/test_bold_api.py
1
# -*- coding: utf-8 -*- import unittest import warnings from Bio import BiopythonWarning from Bio._py3k import HTTPError from Bio import MissingExternalDependencyError import bold from bold import api class TestApi(unittest.TestCase): def setUp(self): warnings.simplefilter('ignore', BiopythonWarning) ...
Shaswat27/sympy
refs/heads/master
sympy/combinatorics/tests/test_group_constructs.py
129
from sympy.combinatorics.group_constructs import DirectProduct from sympy.combinatorics.named_groups import CyclicGroup, DihedralGroup def test_direct_product_n(): C = CyclicGroup(4) D = DihedralGroup(4) G = DirectProduct(C, C, C) assert G.order() == 64 assert G.degree == 12 assert len(G.orbit...
ibc/MediaSoup
refs/heads/v3
worker/deps/gyp/test/mac/gyptest-unicode-settings.py
246
#!/usr/bin/env python # Copyright 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that unicode strings in 'xcode_settings' work. Also checks that ASCII control characters are escaped properly. """ import TestGyp ...
barbuza/django
refs/heads/master
tests/gis_tests/geoapp/sitemaps.py
452
from django.contrib.gis.sitemaps import KMLSitemap, KMZSitemap from .models import City, Country sitemaps = {'kml': KMLSitemap([City, Country]), 'kmz': KMZSitemap([City, Country]), }
LeaWolf2/Lea
refs/heads/master
py/openage/convert/fix_data.py
46
# data fixing script # # as you can imagine, the data entries may contain some semi-correct # values, which we need to adapt. this is done in this file. def fix_data(data): """ updates given input with modifications. input: empiresdat object, vanilla, fully read. output: empiresdat object, fixed. ...
adeepkit01/networks
refs/heads/master
utils/python-unit-tests.py
155
import unittest from ns.core import Simulator, Seconds, Config, int64x64_t import ns.core import ns.network import ns.internet import ns.mobility import ns.csma import ns.applications class TestSimulator(unittest.TestCase): def testScheduleNow(self): def callback(args): self._args_received = ...
commtrack/commtrack-core
refs/heads/master
utilities/data_migration/reporter_upgrade.py
5
None #!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import os from django.utils import simplejson def run(): print "starting" from hq.models import ExtUser, ReporterProfile from reporters.models import Reporter, PersistantBackend, PersistantConnection all_users = ExtUser.objects.a...
bowenliu16/deepchem
refs/heads/master
examples/gdb7/gdb7_tf.py
1
""" Script that trains Tensorflow singletask models on GDB7 dataset. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals import os import deepchem as dc import numpy as np import shutil from sklearn.kernel_ridge import KernelRidge np.random.seed(123) base...
t-hey/QGIS-Original
refs/heads/master
python/plugins/MetaSearch/dialogs/newconnectiondialog.py
28
# -*- coding: utf-8 -*- ############################################################################### # # CSW Client # --------------------------------------------------------- # QGIS Catalog Service client. # # Copyright (C) 2010 NextGIS (http://nextgis.org), # Alexander Bruy (alexander.bruy@gmail...
plamut/ggrc-core
refs/heads/develop
src/ggrc/models/notification.py
6
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """GGRC notification SQLAlchemy layer data model extensions.""" from sqlalchemy.orm import backref from ggrc import db from ggrc.models.mixins import Base from ggrc.models import utils class Notification...
WQuanfeng/bootcamp
refs/heads/master
bootcamp/activities/tests.py
24123
from django.test import TestCase # Create your tests here.
mkrupcale/ansible
refs/heads/devel
lib/ansible/modules/utilities/helper/_fireball.py
12
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.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...
plastboks/Pulpy
refs/heads/develop
pulpy/views/__init__.py
1
# views from pulpy.views.main import MainViews from pulpy.views.auth import AuthViews from pulpy.views.account import AccountViews from pulpy.views.note import NoteViews
sungpil/bigshow
refs/heads/master
com/sundaytoz/bigshow/schedule.py
1
import logging from daemonize import Daemonize import time from com.sundaytoz import bigshow import pymysql.cursors from pymysql.converters import conversions, through from pymysql.constants import FIELD_TYPE from datetime import datetime pid = "/tmp/com.sundaytoz.schedule.pid" formatter = logging.Formatter(fmt='%(asc...
omwomotieno/tunza_v3
refs/heads/work_branch
register/admin.py
1
from django.contrib import admin from .models import Patient, Discharge from .forms import PatientForm, DischargeForm # WeightForm, BPForm, NoteForm, WeekForm, SignUpForm class PatientAdmin(admin.ModelAdmin): list_display = ('anc_number', 'patient_name', 'last_menstrual_date', 'patient_contact',) list_displ...
BioInfoTools/BSVF
refs/heads/master
bin/BSseeker2/bs_align/bs_single_end.py
1
import fileinput, os, time, random, math from bs_utils.utils import * from bs_align_utils import * import gzip #---------------------------------------------------------------- # Read from the mapped results, return lists of unique / multiple-hit reads # The function suppose at most 2 hits will be reported in single f...
iambernie/hdf5handler
refs/heads/master
hdf5handler/handler.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- """ TODO: Write this missing docstring """ import h5py import numpy class HDF5Handler(object): """ The idea is that the HDF5Handler mimics the behaviour of 'open' used as a context manager using the 'with' statement: >>> with open('myfile.txt','w') as fil...
ajinabraham/Mobile-Security-Framework-MobSF
refs/heads/master
scripts/mobsfy_AVD.py
1
#!/usr/bin/env python # -*- coding: utf_8 -*- import os import platform import subprocess import sys import getpass import shutil import io import string import re import logging logger = logging.getLogger(__name__) BASE_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "../") def get_windows_drive(): ...
spasovski/zamboni
refs/heads/master
apps/applications/management/commands/addnewversion.py
6
from django.core.management.base import BaseCommand, CommandError from django.db import IntegrityError import commonware.log import amo.models from applications.models import AppVersion class Command(BaseCommand): help = ('Add a new version to a Application. Syntax: \n' ' ./manage.py addnewversio...
yfried/ansible
refs/heads/devel
lib/ansible/modules/network/f5/bigip_software_update.py
11
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks 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', ...
marrocamp/V-u-Evasion-
refs/heads/master
modules/payloads/go/meterpreter/rev_https.py
8
""" Custom-written pure go meterpreter/reverse_https stager. Module built by @b00stfr3ak44 """ from modules.common import helpers from random import randint class Payload: def __init__(self): # required options self.description = "pure windows/meterpreter/reverse_https stager, no shellcode" ...
UDST/pandana
refs/heads/pyproject.toml
docs/source/conf.py
1
# -*- coding: utf-8 -*- # # pandana documentation build configuration file, created by # sphinx-quickstart on Mon Aug 18 15:50:17 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
christoph-buente/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/QueueStatusServer/model/queues_unittest.py
123
# 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 ...
AMDmi3/repology
refs/heads/master
repology/fetchers/fetchers/aur.py
2
# Copyright (C) 2016-2019 Dmitry Marakasov <amdmi3@amdmi3.ru> # # This file is part of repology # # repology 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 optio...
mrry/tensorflow
refs/heads/windows
tensorflow/python/kernel_tests/matrix_band_part_op_test.py
21
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
j00bar/ansible
refs/heads/devel
lib/ansible/modules/network/panos/panos_mgtconfig.py
78
#!/usr/bin/python # -*- coding: utf-8 -*- # # Ansible module to manage PaloAltoNetworks Firewall # (c) 2016, techbizdev <techbizdev@paloaltonetworks.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 publish...
simbha/mAngE-Gin
refs/heads/master
lib/Django 1.7/django/contrib/auth/tests/test_templates.py
29
from django.contrib.auth import authenticate from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.auth.tokens import PasswordResetTokenGenerator from django.contrib.auth.views import ( password_reset, password_reset_done, password_reset_confirm...
palaniyappanBala/thug
refs/heads/master
src/ThugAPI/ThugOpts.py
4
#!/usr/bin/env python # # ThugOpts.py # # 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 WARRANTY; ...
taolei87/sru
refs/heads/master
sru/cuda_functional.py
1
import os import torch from torch.autograd import Function from torch.utils.cpp_extension import load sources = [ os.path.join(os.path.dirname(__file__), "sru_cuda_impl.cpp"), os.path.join(os.path.dirname(__file__), "sru_cuda_kernel.cu"), ] sru_cuda_lib = load( name="sru_cuda_impl", sources=sources, ...
nurmd2/nurmd
refs/heads/master
openerp/addons/test_new_api/tests/test_field_conversions.py
47
# -*- coding: utf-8 -*- from openerp import fields from openerp.tests import common class TestFieldToColumn(common.TransactionCase): def test_char(self): # create a field, initialize its attributes, and convert it to a column field = fields.Char(string="test string", required=True) field.s...
niknow/scipy
refs/heads/master
scipy/io/harwell_boeing/_fortran_format_parser.py
127
""" Preliminary module to handle fortran formats for IO. Does not use this outside scipy.sparse io for now, until the API is deemed reasonable. The *Format classes handle conversion between fortran and python format, and FortranFormatParser can create *Format instances from raw fortran format strings (e.g. '(3I4)', '(...
Dhivyap/ansible
refs/heads/devel
lib/ansible/modules/cloud/vmware/vmware_host_feature_info.py
21
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@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_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_...
mglukhikh/intellij-community
refs/heads/master
python/lib/Lib/email/mime/multipart.py
93
# Copyright (C) 2002-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Base class for MIME multipart/* type messages.""" __all__ = ['MIMEMultipart'] from email.mime.base import MIMEBase class MIMEMultipart(MIMEBase): """Base class for MIME multipart/* type messages."""...
sabi0/intellij-community
refs/heads/master
python/testData/optimizeImports/importStar.py
83
from sys import * from re import * compile
epage/dialcentral-gtk
refs/heads/master
src/util/concurrent.py
4
#!/usr/bin/env python from __future__ import with_statement import os import errno import time import functools import contextlib def synchronized(lock): """ Synchronization decorator. >>> import misc >>> misc.validate_decorator(synchronized(object())) """ def wrap(f): @functools.wraps(f) def newFuncti...
dehein/pypigpio
refs/heads/master
pin13.py
1
import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setup(13, GPIO.OUT) GPIO.output(13, GPIO.HIGH) time.sleep(1/5.0) GPIO.output(13, GPIO.LOW) time.sleep(1) print('PIN13 an und ausgeschaltet') exit()
devs1991/test_edx_docmode
refs/heads/master
venv/lib/python2.7/site-packages/provider/tests/test_utils.py
3
""" Test cases for functionality provided by the provider.utils module """ from datetime import datetime, date from django.db import models from django.test import TestCase from provider import utils class UtilsTestCase(TestCase): def test_serialization(self): class SomeModel(models.Model): ...
trnewman/VT-USRP-daughterboard-drivers_python
refs/heads/master
gnuradio-core/src/python/gnuradio/blks2impl/am_demod.py
18
# # Copyright 2006,2007 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later versi...
huyphan/pyyawhois
refs/heads/master
test/record/parser/test_response_whois_nic_bo_status_available.py
1
# This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # # spec/fixtures/responses/whois.nic.bo/status_available # # and regenerate the tests with the following script # # $ scripts/generate_tests.py # from nose.tools import * from dateutil.parser import parse a...
wwj718/murp-edx
refs/heads/master
lms/djangoapps/certificates/migrations/0011_auto__del_field_generatedcertificate_certificate_id__add_field_generat.py
188
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'GeneratedCertificate.certificate_id' db.delete_column('certificates_generatedcertificate',...
we3x/organizator
refs/heads/master
projects/backend/organizator/wsgi.py
1
""" WSGI config for organizator 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.11/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_...
seshin/namebench
refs/heads/master
nb_third_party/dns/ttl.py
248
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
cortedeltimo/SickRage
refs/heads/master
lib/rtorrent/err.py
182
# Copyright (c) 2013 Chris Lucas, <chris@chrisjlucas.com> # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, ...
temmp/android-quill
refs/heads/master
jni/libhpdf-2.3.0RC2/if/python/hpdf_consts.py
32
### ## * << Haru Free PDF Library 2.0.8 >> -- hpdf_consts.h ## * ## * URL http://libharu.org/ ## * ## * Copyright (c) 1999-2006 Takeshi Kanno ## * ## * Permission to use, copy, modify, distribute and sell this software ## * and its documentation for any purpose is hereby granted without fee, ## * provided that...
qnub/django-cms
refs/heads/develop
cms/forms/fields.py
35
# -*- coding: utf-8 -*- import six from django import forms from django.contrib.admin.widgets import RelatedFieldWidgetWrapper from django.forms.fields import EMPTY_VALUES from django.utils.translation import ugettext_lazy as _ from cms.forms.utils import get_site_choices, get_page_choices from cms.forms.widgets impo...
iosonofabio/singlet
refs/heads/master
test/counts_table/test_initialize.py
1
#!/usr/bin/env python # vim: fdm=indent ''' author: Fabio Zanini date: 15/08/17 content: Test CountsTable class. ''' def test_initialize(): from singlet.counts_table import CountsTable ct = CountsTable.from_tablename('example_table_tsv') def test_initialize_fromdataset(): from singlet.counts_...
iabdalkader/micropython
refs/heads/master
tests/basics/getattr.py
18
# test __getattr__ class A: def __init__(self, d): self.d = d def __getattr__(self, attr): return self.d[attr] a = A({'a':1, 'b':2}) print(a.a, a.b) # test that any exception raised in __getattr__ propagates out class A: def __getattr__(self, attr): if attr == "value": ...
siosio/intellij-community
refs/heads/master
python/testData/inspections/PyFinalInspection/SubclassingFinalClass/a.py
12
from b import A class <warning descr="'A' is marked as '@final' and should not be subclassed">B</warning>(A): pass
evadeflow/gmock
refs/heads/master
scripts/gmock_doctor.py
163
#!/usr/bin/env python # # Copyright 2008, 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...
caot/intellij-community
refs/heads/master
python/testData/quickFixes/PyMakeFunctionFromMethodQuickFixTest/usageSelf_after.py
75
def method2(): print 1 class A(): def method(self): method2()
1tush/sentry
refs/heads/master
src/sentry/migrations/0042_auto__add_projectcountbyminute__add_unique_projectcountbyminute_projec.py
36
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'ProjectCountByMinute' db.create_table('sentry_projectcountbyminute', ( ('id', self.gf(...
tersmitten/ansible
refs/heads/devel
lib/ansible/plugins/doc_fragments/aruba.py
44
# -*- coding: utf-8 -*- # Copyright: (c) 2017, James Mighion <@jmighion> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment DOCUMENTATION = r''' options: provider: description: - A ...
royalharsh/grpc
refs/heads/master
src/python/grpcio_tests/tests/qps/benchmark_server.py
23
# Copyright 2016, 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...
cocos2d/cocos2d-x-samples
refs/heads/v3
samples/SwiftTetris/cocos2d/plugin/tools/android-build.py
240
#!/usr/bin/python # android-build.py # Build android samples import sys import os, os.path import shutil from optparse import OptionParser CPP_SAMPLES = ["HelloPlugins"] ALL_SAMPLES = CPP_SAMPLES def check_environment_variables(): ''' Checking the environment NDK_ROOT, which will be used for building ''' ...
softak/webfaction_demo
refs/heads/master
vendor-local/lib/python/django/contrib/localflavor/sk/sk_districts.py
543
""" Slovak districts according to http://sk.wikipedia.org/wiki/Administrat%C3%ADvne_%C4%8Dlenenie_Slovenska """ from django.utils.translation import ugettext_lazy as _ DISTRICT_CHOICES = ( ('BB', _('Banska Bystrica')), ('BS', _('Banska Stiavnica')), ('BJ', _('Bardejov')), ('BN', _('Banovce nad Bebravo...
lepture/pythondotorg
refs/heads/master
downloads/models.py
6
from django.core.urlresolvers import reverse from django.conf import settings from django.db import models from django.db.models.signals import post_save from django.dispatch import receiver from django.template.loader import render_to_string from django.utils import timezone from markupfield.fields import MarkupField...
mdiener21/python-geospatial-analysis-cookbook
refs/heads/master
ch08/code/alpha_shape.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- ############### # # Code source modified from # http://blog.thehumangeo.com/2014/05/12/drawing-boundaries-in-python/ # ############### from shapely import geometry from shapely.ops import cascaded_union, polygonize from scipy.spatial import Delaunay import numpy as np im...
singingwolfboy/invoke
refs/heads/master
tests/_support/simple_ns_list.py
5
from invoke import task, Collection @task def z_toplevel(): pass @task def subtask(): pass ns = Collection(z_toplevel, Collection('a', Collection('b', subtask)))
gurneyalex/odoo
refs/heads/13.0-improve_sale_coupon_perf
addons/website_event_sale/__init__.py
1315
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import controllers from . import models
safwanrahman/linuxdesh
refs/heads/master
kitsune/sumo/tests/test_tests.py
23
"""Tests for the TestCase base class and any other utils that come along.""" from django.core.cache import cache from nose.tools import eq_ from kitsune.sumo.tests import TestCase CACHE_KEY = 'sumo_cache_flushing_test' class CacheFlushingTests(TestCase): """Tests that make sure SUMO's base TestCase flushes m...
sakisbl/OpenSesameOnline
refs/heads/master
webapp/os_online/experimenter/managers.py
1
# -*- coding: ascii -*- """ #============================================================================== #title :view.py #description :This module implements managers for the Experiment Tokens. ActiveTokenManager will fetch the tokens that are not yet invalidated. (B...
tonybaloney/st2contrib
refs/heads/master
packs/orion/actions/start_discovery.py
3
# 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...
Caylo/easybuild-framework
refs/heads/master
easybuild/tools/job/pbs_python.py
2
## # Copyright 2012-2016 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...