repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
flavour/cert
refs/heads/master
modules/s3/pyvttbl/dictset.py
4
# Copyright (c) 2011, Roger Lew [see LICENSE.txt] # This software is funded in part by NIH Grant P20 RR016454. """This module contains the DictSet class""" # Python 2 to 3 workarounds import sys if sys.version_info[0] == 2: _xrange = xrange elif sys.version_info[0] == 3: from functools import reduce _xrang...
Belgabor/django
refs/heads/master
django/contrib/gis/db/backends/spatialite/models.py
403
""" The GeometryColumns and SpatialRefSys models for the SpatiaLite backend. """ from django.db import models from django.contrib.gis.db.backends.base import SpatialRefSysMixin class GeometryColumns(models.Model): """ The 'geometry_columns' table from SpatiaLite. """ f_table_name = models.CharField(ma...
daspecster/google-cloud-python
refs/heads/master
language/unit_tests/test_entity.py
1
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Laurawly/tvm-1
refs/heads/master
tests/python/contrib/test_rpc_tracker.py
4
# 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...
Frozenball/alembic
refs/heads/master
alembic/command.py
9
import os from .script import ScriptDirectory from .environment import EnvironmentContext from . import util, autogenerate as autogen def list_templates(config): """List available templates""" config.print_stdout("Available templates:\n") for tempname in os.listdir(config.get_template_directory()): ...
usmschuck/canvas
refs/heads/custom
vendor/bundle/ruby/1.9.1/gems/pygments.rb-0.5.2/vendor/simplejson/scripts/make_docs.py
44
#!/usr/bin/env python import os import subprocess import shutil SPHINX_BUILD = 'sphinx-build' DOCTREES_DIR = 'build/doctrees' HTML_DIR = 'docs' for dirname in DOCTREES_DIR, HTML_DIR: if not os.path.exists(dirname): os.makedirs(dirname) open(os.path.join(HTML_DIR, '.nojekyll'), 'w').close() res = subproce...
stuntman723/rap-analyzer
refs/heads/master
rap_analyzer/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/schema.py
30
import psycopg2 from django.db.backends.base.schema import BaseDatabaseSchemaEditor class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): sql_create_sequence = "CREATE SEQUENCE %(sequence)s" sql_delete_sequence = "DROP SEQUENCE IF EXISTS %(sequence)s CASCADE" sql_set_sequence_max = "SELECT setval('%(seq...
tictakk/servo
refs/heads/ticbranch
tests/wpt/web-platform-tests/tools/pywebsocket/src/example/cookie_wsh.py
451
# Copyright 2014 Google Inc. All rights reserved. # # Use of this source code is governed by a BSD-style # license that can be found in the COPYING file or at # https://developers.google.com/open-source/licenses/bsd import urlparse def _add_set_cookie(request, value): request.extra_headers.append(('Set-Cookie',...
mmcdermo/helpinghand
refs/heads/master
server/venv/lib/python2.7/site-packages/django/core/files/utils.py
901
class FileProxyMixin(object): """ A mixin class used to forward file methods to an underlaying file object. The internal file object has to be called "file":: class FileProxy(FileProxyMixin): def __init__(self, file): self.file = file """ encoding = property(la...
akrherz/dep
refs/heads/main
scripts/util/convergance.py
2
import matplotlib.pyplot as plt import random import numpy as np (fig, ax) = plt.subplots(1, 1) x = [] y = [] cnts = [] data = [] for i in range(250): x.append(i) data.append(random.randint(0, 100)) std = np.std(data) avg = np.average(data) y.append(avg) cnt = np.sum(np.where(data > (avg + std...
KagamiChan/shadowsocks
refs/heads/master
shadowsocks/local.py
10
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2014 clowwindy # # 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 # ...
calfonso/ansible
refs/heads/devel
lib/ansible/modules/network/system/net_logging.py
57
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, 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', ...
foss-transportationmodeling/rettina-server
refs/heads/master
.env/local/lib/python2.7/encodings/mac_greek.py
593
""" Python Character Mapping Codec mac_greek generated from 'MAPPINGS/VENDORS/APPLE/GREEK.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,err...
sureshthalamati/spark
refs/heads/master
examples/src/main/python/ml/feature_hasher_example.py
67
# # 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...
corbinmunce/domoticz
refs/heads/development
plugins/examples/Pinger.py
14
# ICMP Plugin # # Author: Dnpwwo, 2017 - 2018 # """ <plugin key="ICMP" name="Pinger (ICMP)" author="dnpwwo" version="3.1.1"> <description> ICMP Pinger Plugin.<br/><br/> Specify comma delimted addresses (IP or DNS names) of devices that are to be pinged.<br/> When remote devices are found a m...
fnouama/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/localflavor/se/forms.py
311
# -*- coding: utf-8 -*- """ Swedish specific Form helpers """ import re from django import forms from django.utils.translation import ugettext_lazy as _ from django.core.validators import EMPTY_VALUES from django.contrib.localflavor.se.utils import (id_number_checksum, validate_id_birthday, format_personal_id_numbe...
ezcall-net-tw/EZCall
refs/heads/master
jni/pjsip/sources/tests/pjsua/scripts-media-playrec/100_resample_lf_11_8.py
59
# $Id: 100_resample_lf_11_8.py 2052 2008-06-25 18:18:32Z nanang $ # from inc_cfg import * # simple test test_param = TestParam( "Resample (large filter) 11 KHZ to 8 KHZ", [ InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 8000 --play-file wavs/input.11.wav --rec-file wavs/tmp.8.wav") ] )
4eek/edx-platform
refs/heads/master
lms/djangoapps/commerce/tests/test_views.py
85
""" Tests for commerce views. """ import json from uuid import uuid4 from nose.plugins.attrib import attr import ddt from django.conf import settings from django.core.urlresolvers import reverse from django.test import TestCase import mock from student.tests.factories import UserFactory class UserMixin(object): ...
0xddaa/pwndbg
refs/heads/stable
pwndbg/elftypes.py
5
#!/usr/bin/env python # -*- coding: utf-8 -*- # # mayhem/datatypes/elf.py # # 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 lis...
rjschwei/azure-sdk-for-python
refs/heads/master
azure-batch/azure/batch/models/file_delete_from_task_options.py
3
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
UrLab/beta402
refs/heads/master
telepathy/templatetags/__init__.py
107
# -*- coding: utf-8 -*- from __future__ import unicode_literals
kymbert/behave
refs/heads/master
more.features/steps/tutorial_steps.py
15
# -*- coding: utf-8 -*- """Step implementations for tutorial example.""" from behave import * @given('we have behave installed') def step_impl(context): pass @when('we implement a test') def step_impl(context): assert True is not False @then('behave will test it for us!') def step_impl(context): assert ...
digitvaran/digitvaran
refs/heads/master
resources/views.py
1
from django.shortcuts import render from resources import models def home(request): "Homepage for requests" data={} template='resources/home.html' return render(request,template,data) def search(request): "Searching for resources" data={} template='resources/search.html' if request.meth...
aftabnaveed/virtual-work-monitor
refs/heads/master
MainGui.py
1
from PyQt4 import QtCore, QtGui import time class SaveScreenshotThread(QtCore.QThread): capture = QtCore.pyqtSignal(object) gui = None def __init__(self, gui): QtCore.QThread.__init__(self) self.gui = gui def run(self): print "Saving " + self.gui.fileName self.gu...
abdullah2891/remo
refs/heads/master
remo/profiles/migrations/0048_rename_remobot.py
3
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): """Rename the display name of Remo bot.""" # Note: Don't use "from appname.models import ModelName". # Us...
rosmo/ansible
refs/heads/devel
lib/ansible/modules/storage/netapp/na_elementsw_account.py
16
#!/usr/bin/python # (c) 2018, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Element Software Account Manager """ from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
laosiaudi/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/random_gamma_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...
entpy/eb-django
refs/heads/master
essere_benessere/essere_benessere/urls.py
1
from django.conf.urls import patterns, include, url from django.conf import settings from django.conf.urls.static import static from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # frontend URLs url(r'^$', 'website.views.index', name='index'), url(r'^chi-siamo/', 'website.views.about_...
gareging/SDN_Framework
refs/heads/master
ryu/tests/unit/lib/test_mod/ddd/__init__.py
26
# Copyright (C) 2016 Nippon Telegraph and Telephone Corporation. # # 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 appli...
gsingh93/rust
refs/heads/master
src/etc/regex-match-tests.py
58
#!/usr/bin/env python2 # Copyright 2014 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license #...
BTCLITE/BitcoinLITE-BTCL
refs/heads/master
share/qt/make_spinner.py
4415
#!/usr/bin/env python # W.J. van der Laan, 2011 # Make spinning .mng animation from a .png # Requires imagemagick 6.7+ from __future__ import division from os import path from PIL import Image from subprocess import Popen SRC='img/reload_scaled.png' DST='../../src/qt/res/movies/update_spinner.mng' TMPDIR='/tmp' TMPNAM...
vlachoudis/sl4a
refs/heads/master
python/src/Doc/includes/sqlite3/executescript.py
140
import sqlite3 con = sqlite3.connect(":memory:") cur = con.cursor() cur.executescript(""" create table person( firstname, lastname, age ); create table book( title, author, published ); insert into book(title, author, published) values ( ...
Azure/azure-sdk-for-python
refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline
sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/_record_sets_operations.py
1
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
abought/osf.io
refs/heads/develop
website/notifications/constants.py
4
NODE_SUBSCRIPTIONS_AVAILABLE = { 'comments': 'Comments added', 'file_updated': 'Files updated' } # Note: if the subscription starts with 'global_', it will be treated like a default # subscription. If no notification type has been assigned, the user subscription # will default to 'email_transactional'. USER_SU...
adsabs/kibtools
refs/heads/master
kibtools/tests/stub_data.py
2
import json all_dashboards = { "_shards": { "failed": 0, "successful": 1, "total": 1 }, "hits": { "hits": [ { "_id": "GETDash", "_index": ".kibana", "_score": 1.0, "_source": { "d...
PaddlePaddle/models
refs/heads/develop
PaddleCV/video/models/nonlocal_model/nonlocal_helper.py
1
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve. # #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...
navotsil/Open-Knesset
refs/heads/master
notify/management/commands/notify.py
8
from __future__ import absolute_import from django.core.management.base import NoArgsCommand from django.contrib.auth.models import User,Group from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.utils.translation import ugettext as _ from django.utils impo...
shepdelacreme/ansible
refs/heads/devel
lib/ansible/plugins/lookup/cartesian.py
141
# (c) 2013, Bradley Young <young.bradley@gmail.com> # (c) 2017 Ansible Project # 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 DOCUMENTATION = """ lookup: cartesian version_added...
bitifirefly/edx-platform
refs/heads/master
lms/djangoapps/bulk_email/migrations/0009_force_unique_course_ids.py
114
# -*- 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): # Adding unique constraint on 'CourseAuthorization', fields ['course_id'] db.create_unique('bulk_email_cours...
majintao0131/yaml-cpp.core
refs/heads/master
test/gmock-1.7.0/gtest/test/gtest_break_on_failure_unittest.py
2140
#!/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...
rosmo/aurora
refs/heads/master
src/main/python/apache/thermos/monitoring/__init__.py
296
# # 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 ...
jigpu/input
refs/heads/master
scripts/gdb/linux/dmesg.py
249
# # gdb helper commands and functions for Linux kernel debugging # # kernel log buffer dump # # Copyright (c) Siemens AG, 2011, 2012 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb from linux import utils class LxDmesg(gdb.Command...
kakwa/dnscherry
refs/heads/master
dnscherry/auth/modNone.py
1
# -*- coding: utf-8 -*- # vim:set expandtab tabstop=4 shiftwidth=4: # The MIT License (MIT) # DnsCherry # Copyright (c) 2014 Carpentier Pierre-Francois import cherrypy import dnscherry.auth class Auth(dnscherry.auth.Auth): def __init__(self, config, logger=None): # no need for a logout button se...
GustavoHennig/ansible
refs/heads/devel
lib/ansible/modules/network/nxos/nxos_vpc.py
19
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
Intel-Corporation/tensorflow
refs/heads/master
tensorflow/contrib/mpi_collectives/python/ops/mpi_ops.py
46
# 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...
jormaral/aifh
refs/heads/master
vol1/python-examples/examples/example_nm_xor.py
6
#!/usr/bin/env python """ Artificial Intelligence for Humans Volume 1: Fundamental Algorithms Python Version http://www.aifh.org http://www.jeffheaton.com Code repository: https://github.com/jeffheaton/aifh Copyright 2013 by Jeff Heaton Licensed under the Apache License, Version 2...
mattjjohnson007/ChromeWebLab
refs/heads/master
Sketchbots/sw/labqueue/lask/server/http/misc_handlers.py
7
# Copyright 2013 Google Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
cdsteinkuehler/MachineKit
refs/heads/MachineKit-ubc
lib/python/gladevcp/hal_graph.py
39
# vim: sts=4 sw=4 et # GladeVcp Widgets # # Copyright (c) 2010 Pavel Shramov <shramov@mexmat.net> # # 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, or # (at you...
gnowxilef/youtube-dl
refs/heads/master
youtube_dl/extractor/firstpost.py
60
from __future__ import unicode_literals from .common import InfoExtractor class FirstpostIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?firstpost\.com/[^/]+/.*-(?P<id>[0-9]+)\.html' _TEST = { 'url': 'http://www.firstpost.com/india/india-to-launch-indigenous-aircraft-carrier-monday-1025403.html...
derekjchow/models
refs/heads/master
research/lfads/lfads.py
3
# 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 a...
andela-ooladayo/django
refs/heads/master
django/db/backends/base/validation.py
393
class BaseDatabaseValidation(object): """ This class encapsulates all backend-specific model validation. """ def __init__(self, connection): self.connection = connection def check_field(self, field, **kwargs): return []
briancline/pyruse
refs/heads/master
setup.py
1
from setuptools import setup from pyruse.version import version_str setup( name='pyruse', version=version_str, author='Brian Cline', author_email='brian.cline@gmail.com', description=('Peruse metadata about Python releases (namely version ' 'information).'), long_description=op...
dbckz/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/ec2_elb_lb.py
28
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
roscoeZA/GeoGigSync
refs/heads/master
pycharm-debug.egg_FILES/third_party/pep8/lib2to3/lib2to3/pgen2/pgen.py
321
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. # Pgen imports from . import grammar, token, tokenize class PgenGrammar(grammar.Grammar): pass class ParserGenerator(object): def __init__(self, filename, stream=None): close_stream =...
izawaryu/venture
refs/heads/master
venture.py
1
# Ryu Izawa # Written 2017-10-15 # Last updated 2017-10-31 import csv import math import json import string import random import os.path import numpy as np import pandas as pd import urllib, urllib2 start_latitude = 40.433183 start_longitude = -74.199800 # Google Maps API Keys key = "&key...
uliss/quneiform
refs/heads/master
tests/py/lpod/frame.py
1
# -*- coding: UTF-8 -*- # # Copyright (c) 2009 Ars Aperta, Itaapy, Pierlis, Talend. # # Authors: David Versmisse <david.versmisse@itaapy.com> # Hervé Cauwelier <herve@itaapy.com> # # This file is part of Lpod (see: http://lpod-project.org). # Lpod is free software; you can redistribute it and/or modify it unde...
kuiwei/kuiwei
refs/heads/master
common/lib/xmodule/xmodule/tests/test_progress.py
54
"""Module progress tests""" import unittest from mock import Mock from xblock.field_data import DictFieldData from xmodule.progress import Progress from xmodule import x_module from . import get_test_system class ProgressTest(unittest.TestCase): ''' Test that basic Progress objects work. A Progress represent...
sanguinariojoe/FreeCAD
refs/heads/master
src/Mod/Fem/femviewprovider/view_element_geometry2D.py
12
# *************************************************************************** # * Copyright (c) 2015 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
vertigo235/Sick-Beard-XEM
refs/heads/master
lib/html5lib/treewalkers/__init__.py
133
"""A collection of modules for iterating through different kinds of tree, generating tokens identical to those produced by the tokenizer module. To create a tree walker for a new type of tree, you need to do implement a tree walker object (called TreeWalker by convention) that implements a 'serialize' method taking a ...
dneg/cortex
refs/heads/master
test/IECoreRI/MotionTest.py
7
########################################################################## # # Copyright (c) 2009-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redis...
draugiskisprendimai/odoo
refs/heads/8.0
openerp/addons/base/__init__.py
379
# -*- 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...
rosmo/ansible
refs/heads/devel
lib/ansible/modules/network/fortios/fortios_firewall_vipgrp64.py
24
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2018 Fortinet, Inc. # # 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 Lic...
edx/edx-enterprise
refs/heads/master
integrated_channels/moodle/migrations/0003_auto_20201006_1706.py
1
# Generated by Django 2.2.16 on 2020-10-06 17:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('moodle', '0002_moodlelearnerdatatransmissionaudit'), ] operations = [ migrations.AlterField( model_name='historicalmoodleenterp...
sometallgit/AutoUploader
refs/heads/master
Python27/Lib/site-packages/pip/req/__init__.py
806
from __future__ import absolute_import from .req_install import InstallRequirement from .req_set import RequirementSet, Requirements from .req_file import parse_requirements __all__ = [ "RequirementSet", "Requirements", "InstallRequirement", "parse_requirements", ]
rimbalinux/MSISDNArea
refs/heads/master
djangoappengine/build/lib/djangoappengine/tests/not_return_sets.py
5
from .testmodels import FieldsWithOptionsModel, OrderedModel, SelfReferenceModel import datetime from django.test import TestCase from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned class NonReturnSetsTest(TestCase): floats = [5.3, 2.6, 9.1, 1.58, 2.4] emails = ['app-engine@...
claudejrogers/RNASEQR
refs/heads/master
interval_tree.py
1
''' This code is copied from package bpbio -- simple bioinformatics scripts http://code.google.com/p/bpbio/ (Oct 03, 2009) Some code for inmporting psyco was removed, since RNASEQR runs on the 64bits system, and psyco is for the 32 bits systems. Some minor modifications. ''' import operator class IntervalTree...
mbernasocchi/QGIS
refs/heads/master
python/plugins/processing/algs/gdal/rasterize_over.py
14
# -*- coding: utf-8 -*- """ *************************************************************************** rasterize_over.py --------------------- Date : September 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander dot bruy at gmail dot com ********...
JLJTECH/TutorialTesting
refs/heads/master
CodeWars/2016/SillyCase-7k.py
1
#Create a function that takes a string and returns that string with the first half lowercased and the last half uppercased. def sillycase(silly): mid = (len(silly)+1) // 2 #add 1 to make divisible midpoint return silly[:mid].lower() + silly[mid:].upper()
salguarnieri/intellij-community
refs/heads/master
python/testData/quickFixes/PyUpdatePropertySignatureQuickFixTest/setterLessParam.py
80
class A(Aa): @property def <warning descr="Getter signature should be (self)">x</warning>(self, r): return r @x.setter def <warning descr="Setter signature should be (self, value)">x<caret></warning>(): self._x = ""
RudoCris/horizon
refs/heads/master
horizon/test/tests/views.py
69
# Copyright 2015 Cisco Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
sgerhart/ansible
refs/heads/maintenance_policy_module
lib/ansible/utils/module_docs_fragments/eos.py
58
# # (c) 2015, Peter Sprygada <psprygada@ansible.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 late...
jank3/django
refs/heads/master
tests/version/tests.py
352
from unittest import TestCase from django import get_version from django.utils import six class VersionTests(TestCase): def test_development(self): ver_tuple = (1, 4, 0, 'alpha', 0) # This will return a different result when it's run within or outside # of a git clone: 1.4.devYYYYMMDDHHM...
taxigps/xbmc-addons-chinese
refs/heads/master
plugin.video.bdyun/resources/modules/get_auth.py
3
#!/usr/bin/python # -*- coding: utf-8 -*- import xbmc, xbmcgui, xbmcaddon, xbmcvfs import os, sys, re, json from resources.modules import auth dialog = xbmcgui.Dialog() class VcodeWindow(xbmcgui.WindowDialog): def __init__(self, cookie, tokens, vcodetype, codeString, vcode_path): self.cookie = cookie ...
johan--/python_koans
refs/heads/master
python2/koans/local_module_with_all_defined.py
127
#!/usr/bin/env python # -*- coding: utf-8 -*- __all__ = ( 'Goat', '_Velociraptor' ) class Goat(object): @property def name(self): return "George" class _Velociraptor(object): @property def name(self): return "Cuddles" class SecretDuck(object): @property def name(se...
akaihola/django
refs/heads/master
django/contrib/formtools/tests/wizard/namedwizardtests/urls.py
320
from django.conf.urls import patterns, url from django.contrib.formtools.tests.wizard.namedwizardtests.forms import ( SessionContactWizard, CookieContactWizard, Page1, Page2, Page3, Page4) def get_named_session_wizard(): return SessionContactWizard.as_view( [('form1', Page1), ('form2', Page2), ('form3'...
Vassyli/biofragmentor
refs/heads/master
gui/mainwindow.py
1
import sys from PyQt5.QtWidgets import QApplication, QMainWindow from PyQt5 import uic class MainWindow(QMainWindow): app = None def __init__(self): self.app = QApplication(sys.argv) super().__init__() self.ui = uic.loadUi("gui/main.ui") self.ui.show() self.app.exec_()
scanny/python-pptx
refs/heads/master
pptx/oxml/shapes/shared.py
1
# encoding: utf-8 """Common shape-related oxml objects.""" from __future__ import absolute_import, division, print_function, unicode_literals from pptx.dml.fill import CT_GradientFillProperties from pptx.enum.shapes import PP_PLACEHOLDER from pptx.oxml.ns import qn from pptx.oxml.simpletypes import ( ST_Angle, ...
D4wN/brickv
refs/heads/master
src/build_data/windows/OpenGL/raw/GL/EXT/separate_shader_objects.py
3
'''OpenGL extension EXT.separate_shader_objects Automatically generated by the get_gl_extensions script, do not edit! ''' from OpenGL import platform, constants, constant, arrays from OpenGL import extensions from OpenGL.GL import glget import ctypes EXTENSION_NAME = 'GL_EXT_separate_shader_objects' _DEPRECATED = Fals...
kmoocdev2/edx-platform
refs/heads/real_2019
lms/djangoapps/discussion_api/pagination.py
16
""" Discussion API pagination support """ from rest_framework.utils.urls import replace_query_param from edx_rest_framework_extensions.paginators import NamespacedPageNumberPagination class _Page(object): """ Implements just enough of the django.core.paginator.Page interface to allow PaginationSerializer...
thisispuneet/potato-blog
refs/heads/master
django/contrib/gis/db/backends/spatialite/introspection.py
401
from django.contrib.gis.gdal import OGRGeomType from django.db.backends.sqlite3.introspection import DatabaseIntrospection, FlexibleFieldLookupDict class GeoFlexibleFieldLookupDict(FlexibleFieldLookupDict): """ Sublcass that includes updates the `base_data_types_reverse` dict for geometry field types. ...
rfosterslo/wagtailplus
refs/heads/master
wagtailplus/wagtaillinks/tests/test_views.py
2
""" Contains view unit tests. """ from django.core.urlresolvers import reverse from wagtailplus.tests import views from ..models import Link class TestLinkIndexView(views.BaseTestIndexView): url_namespace = 'wagtaillinks' template_dir = 'wagtaillinks/links' def _create_sequential_instance(self, ind...
doheekim/chuizonetest
refs/heads/master
lib/sqlalchemy/dialects/postgresql/pg8000.py
10
# postgresql/pg8000.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS # file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: postgresql+pg8000 :name: pg8000 :dbapi: pg8000 :co...
wskplho/sl4a
refs/heads/master
python-build/python-libs/gdata/src/gdata/Crypto/Hash/__init__.py
271
"""Hashing algorithms Hash functions take arbitrary strings as input, and produce an output of fixed size that is dependent on the input; it should never be possible to derive the input data given only the hash function's output. Hash functions can be used simply as a checksum, or, in association with a public-key al...
pandeydivesh15/Farmers-Portal
refs/heads/master
crop/migrations/0002_auto_20171031_1011.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-31 10:11 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('crop', '0001_initial'), ] operations = [ migrations.RenameField( model_...
fengbaicanhe/intellij-community
refs/heads/master
python/testData/formatter/lambdaColon.py
83
lambda o:o.fullName()
codeaudit/pattern-1
refs/heads/master
pattern/web/cache/__init__.py
21
#### PATTERN | CACHE ############################################################################### # Copyright (c) 2010 University of Antwerp, Belgium # Author: Tom De Smedt <tom@organisms.be> # License: BSD (see LICENSE.txt for details). # http://www.clips.ua.ac.be/pages/pattern try: import hashlib; md5=hashlib...
msphair/django_echo_bridge
refs/heads/master
Device.py
1
import json class Device: def __init__(self, name, deviceType, offUrl, onUrl, httpVerb, contentType, contentBody): self.name = name self.deviceType = deviceType self.offUrl = offUrl self.onUrl = onUrl self.httpVerb = httpVerb self.contentBody = contentBody se...
dstiert/Wox
refs/heads/master
PythonHome/Lib/site-packages/pip/_vendor/requests/certs.py
961
#!/usr/bin/env python # -*- coding: utf-8 -*- """ certs.py ~~~~~~~~ This module returns the preferred default CA certificate bundle. If you are packaging Requests, e.g., for a Linux distribution or a managed environment, you can change the definition of where() to return a separately packaged CA bundle. """ import ...
youprofit/NewsBlur
refs/heads/master
apps/search/views.py
6027
# Create your views here.
tienfuc/gdcmdtools
refs/heads/master
gdmount.py
45
#!/usr/bin/env python # -*- coding: utf-8 -*-
JioCloud/keystone
refs/heads/master
keystone/common/sql/migrate_repo/versions/041_add_remaining_uses_count_to_trusts.py
14
# Copyright (c) 2014 Matthieu Huin <mhu@enovance.com> # # 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...
mattuuh7/incubator-airflow
refs/heads/master
tests/ti_deps/deps/test_not_in_retry_period_dep.py
31
# -*- coding: utf-8 -*- # # 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 ...
intgr/django
refs/heads/master
tests/m2m_signals/tests.py
84
""" Testing signals emitted on changing m2m relations. """ from django.db import models from django.test import TestCase from .models import Car, Part, Person, SportsCar class ManyToManySignalsTest(TestCase): def m2m_changed_signal_receiver(self, signal, sender, **kwargs): message = { 'insta...
ymero/learn-python3
refs/heads/master
samples/packages/pil/use_pil_resize.py
20
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from PIL import Image # 打开一个jpg图像文件,注意是当前路径: im = Image.open('test.jpg') # 获得图像尺寸: w, h = im.size print('Original image size: %sx%s' % (w, h)) # 缩放到50%: im.thumbnail((w//2, h//2)) print('Resize image to: %sx%s' % (w//2, h//2)) # 把缩放后的图像用jpeg格式保存: im.save('thumbnail.jpg',...
gwq5210/litlib
refs/heads/master
thirdparty/sources/boost_1_60_0/tools/build/src/tools/types/exe.py
75
# Copyright David Abrahams 2004. Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) from b2.build import type def register (): type.register_type ('EXE', ['exe'], None, ['NT', 'CYGWIN']) type.register_type ('EX...
markeTIC/OCB
refs/heads/8.0
openerp/modules/loading.py
7
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
tgsmith61591/pyramid
refs/heads/master
pmdarima/arima/tests/test_context.py
1
# -*- coding: utf-8 -*- from pmdarima.arima.auto import StepwiseContext, auto_arima from pmdarima.arima._context import ContextStore, ContextType from pmdarima.arima import _context as context_lib from pmdarima.datasets import load_lynx, load_wineind from unittest import mock import threading import collections impor...
mollstam/UnrealPy
refs/heads/master
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/cffi-1.1.2/testing/support.py
5
import sys if sys.version_info < (3,): __all__ = ['u'] class U(object): def __add__(self, other): return eval('u'+repr(other).replace(r'\\u', r'\u') .replace(r'\\U', r'\U')) u = U() assert u+'a\x00b' == eval(r"u'a\x00b'") assert u+'a\u1234...
bukepo/openthread
refs/heads/master
tests/toranj/test-603-channel-manager-announce-recovery.py
7
#!/usr/bin/env python3 # # Copyright (c) 2018, The OpenThread Authors. # 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 # ...
tntnatbry/tensorflow
refs/heads/master
tensorflow/contrib/learn/python/learn/estimators/__init__.py
5
# 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...