repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
openclimatedata/pymagicc
refs/heads/master
scripts/test_install.py
1
"""Test that all of our modules can be imported Thanks https://stackoverflow.com/a/25562415/10473080 """ import importlib import pkgutil import pymagicc def import_submodules(package_name): package = importlib.import_module(package_name) for loader, name, is_pkg in pkgutil.walk_packages(package.__path__):...
cboling/SDNdbg
refs/heads/master
docs/old-stuff/pydzcvr/doc/neutron/services/loadbalancer/drivers/embrane/db.py
7
# Copyright 2014 Embrane, 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...
dut3062796s/PTVS
refs/heads/master
Python/Tests/TestData/Grammar/MixedWhitespace3.py
18
import wpf from System.Windows import Application, Window from System.Windows import Annotations import array class MyWindow(Window): def __init__(self): wpf.LoadComponent(self, 'WpfApplication45.xaml') if __name__ == '__main__': print('hello') Application().Run(MyWindow()) ...
1013553207/django
refs/heads/master
django/utils/ipv6.py
208
# This code was mostly based on ipaddr-py # Copyright 2007 Google Inc. https://github.com/google/ipaddr-py # Licensed under the Apache License, Version 2.0 (the "License"). from django.core.exceptions import ValidationError from django.utils.six.moves import range from django.utils.translation import ugettext_lazy as _...
OpenGov/og-python-utils
refs/heads/master
tests/text_regex_test.py
1
# This import fixes sys.path issues from .parentpath import * import unittest import re from ogutils.text import regex class TextRegexTest(unittest.TestCase): def test_bad_input_chained_regex(self): with self.assertRaises(ValueError): regex.chain_sub_regexes('', '.') with se...
ilendl2/wagtail-cookiecutter-foundation
refs/heads/master
{{cookiecutter.project_slug}}/people/migrations/0005_personindexpage_feed_image.py
3
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-10-09 18:19 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0019_delete_filter'), ('people', '...
jjas0nn/solvem
refs/heads/master
tensorflow/lib/python2.7/site-packages/numpy/distutils/npy_pkg_config.py
66
from __future__ import division, absolute_import, print_function import sys import re import os if sys.version_info[0] < 3: from ConfigParser import RawConfigParser, NoOptionError else: from configparser import RawConfigParser, NoOptionError __all__ = ['FormatError', 'PkgNotFound', 'LibraryInfo', 'VariableSe...
pxmkuruc/usd-qt
refs/heads/master
pxr/usdQt/testenv/testUsdQtOpinionModel.py
1
#!/pxrpythonsubst # # Copyright 2016 Pixar # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced with: # ...
amiramix/serna-free
refs/heads/master
serna/dist/plugins/dita-examples/open_topicref.py
5
## ## Copyright(c) 2009 Syntext, Inc. All Rights Reserved. ## Contact: info@syntext.com, http://www.syntext.com ## ## This file is part of Syntext Serna XML Editor. ## ## COMMERCIAL USAGE ## Licensees holding valid Syntext Serna commercial licenses may use this file ## in accordance with the Syntext Serna Commercial...
petecummings/django-cms
refs/heads/develop
cms/test_utils/project/pluginapp/plugins/manytomany_rel/migrations/0001_initial.py
66
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('cms', '0001_initial'), ] operations = [ migrations.CreateModel( name='Article', fields=[ ...
albertoconnor/website
refs/heads/master
newsletter/templatetags/paths.py
1
# import re from django import template register = template.Library() @register.filter def paragraph_markup(text): # new_text = re.sub(r'<p[^>]*>', '<p style=\"-webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; margin: 5px 0; font-family: \'Droid Serif\', Georgia, serif; font-size: 16px; line-height: 1...
woltage/ansible-modules-core
refs/heads/devel
commands/command.py
25
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>, and others # # 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 ...
pedro2d10/SickRage-FR
refs/heads/develop
lib/sqlalchemy/event/__init__.py
79
# event/__init__.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 from .api import CANCEL, NO_RETVAL, listen, listens_for, remove, contains from .base...
victorbriz/rethinkdb
refs/heads/next
external/v8_3.30.33.16/build/gyp/test/win/gyptest-link-force-symbol-reference.py
237
#!/usr/bin/env python # Copyright (c) 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. """ Make sure ForceSymbolReference is translated properly. """ import TestGyp import sys if sys.platform == 'win32': test = TestGyp.Tes...
HarborYuan/cashier
refs/heads/master
env/Lib/site-packages/pip/_vendor/requests/utils.py
319
# -*- coding: utf-8 -*- """ requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. """ import cgi import codecs import collections import io import os import re import socket import struct import warnings from . import __vers...
Morphux/installer
refs/heads/master
pkgs/tar_p1/__init__.py
12133432
mintoo/NetDim
refs/heads/master
pyNMS/graph_generation/__init__.py
12133432
lmorchard/django
refs/heads/master
tests/get_earliest_or_latest/__init__.py
12133432
pasqualguerrero/django
refs/heads/master
tests/select_for_update/__init__.py
12133432
disqus/django-old
refs/heads/master
django/conf/locale/nl/__init__.py
12133432
lz1988/django-web2015
refs/heads/master
django/contrib/sitemaps/management/commands/__init__.py
12133432
akrherz/pyWWA
refs/heads/main
parsers/ffg_parser.py
1
""" FFG """ # Local from pywwa.workflows.ffg_parser import main if __name__ == "__main__": main()
jniediek/combinato
refs/heads/master
combinato/cluster/plot_temp.py
1
# JN 2015-01-13 from __future__ import absolute_import, print_function, division import matplotlib.pyplot as mpl from .. import options def plot_temperatures(tree, used_points): """ show which clusters were selected in temperature plot """ upto_line = options['MaxClustersPerTemp'] + 5 fig = mpl.f...
Observer-Wu/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/hybi.py
139
# Copyright 2012, 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...
Simran-B/arangodb
refs/heads/docs_3.0
3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_new.py
58
import unittest from test import test_support import sys new = test_support.import_module('new', deprecated=True) class NewTest(unittest.TestCase): def test_spam(self): class Eggs: def get_yolks(self): return self.yolks m = new.module('Spam') m.Eggs = Eggs ...
ravenac95/virtstrap
refs/heads/develop
virtstrap-core/virtstrap/packages/simpleyaml/emitter.py
388
# Emitter expects events obeying the following grammar: # stream ::= STREAM-START document* STREAM-END # document ::= DOCUMENT-START node DOCUMENT-END # node ::= SCALAR | sequence | mapping # sequence ::= SEQUENCE-START node* SEQUENCE-END # mapping ::= MAPPING-START (node node)* MAPPING-END __all__ = ['Emitter', 'Emi...
frankvdp/django
refs/heads/master
tests/max_lengths/models.py
142
from django.db import models class PersonWithDefaultMaxLengths(models.Model): email = models.EmailField() vcard = models.FileField() homepage = models.URLField() avatar = models.FilePathField() class PersonWithCustomMaxLengths(models.Model): email = models.EmailField(max_length=250) vcard = ...
showerst/openstates
refs/heads/master
openstates/ct/__init__.py
1
import datetime import lxml.html from .bills import CTBillScraper from .legislators import CTLegislatorScraper from .events import CTEventScraper settings = { 'SCRAPELIB_RPM': 20 } metadata = { 'name': 'Connecticut', 'abbreviation': 'ct', 'legislature_name': 'Connecticut General Assembly', 'legisl...
dream1986/you-get
refs/heads/develop
src/you_get/extractors/qq.py
3
#!/usr/bin/env python __all__ = ['qq_download'] from ..common import * import uuid #QQMUSIC #SINGLE #1. http://y.qq.com/#type=song&mid=000A9lMb0iEqwN #2. http://y.qq.com/#type=song&id=4754713 #3. http://s.plcloud.music.qq.com/fcgi-bin/fcg_yqq_song_detail_info.fcg?songmid=002NqCeX3owQIw #4. http://s.plcloud.music.qq.c...
fredrhae/rotas
refs/heads/master
Rotas/GoogleTest/gtest-1.7.0/test/gtest_test_utils.py
408
#!/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...
stinos/micropython
refs/heads/master
tests/basics/array1.py
9
try: import uarray as array except ImportError: try: import array except ImportError: print("SKIP") raise SystemExit a = array.array('B', [1, 2, 3]) print(a, len(a)) i = array.array('I', [1, 2, 3]) print(i, len(i)) print(a[0]) print(i[-1]) a = array.array('l', [-1]) print(len(a), a[...
notriddle/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/third_party/py/testing/root/__init__.py
9480
#
onceuponatimeforever/oh-mainline
refs/heads/master
mysite/customs/migrations/0009_add_cia_model.py
17
# This file is part of OpenHatch. # Copyright (C) 2010 OpenHatch, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
StefanRijnhart/odoo
refs/heads/master
openerp/addons/base/module/wizard/base_export_language.py
178
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2004-2012 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
zarlant/ansible_core
refs/heads/vmware_add_disk
packaging/os/yum.py
3
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # (c) 2012, Red Hat, Inc # Written by Seth Vidal <skvidal at fedoraproject.org> # (c) 2014, Epic Games, Inc. # # 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 publi...
operepo/ope
refs/heads/master
libs/paramiko/kex_gex.py
36
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko 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 2.1 of the License, or (a...
nzavagli/UnrealPy
refs/heads/master
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Twisted-15.2.1/twisted/conch/client/agent.py
69
# -*- test-case-name: twisted.conch.test.test_default -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Accesses the key agent for user authentication. Maintainer: Paul Swartz """ import os from twisted.conch.ssh import agent, channel, keys from twisted.internet import protocol, reacto...
dhirajt/dtc_bus_routes
refs/heads/master
dtc_bus_routes/__init__.py
12133432
ase1/421_521_final_project
refs/heads/master
GUI/text_to_image_test/text_to_image.py
12133432
jank3/django
refs/heads/master
tests/view_tests/app4/__init__.py
12133432
shiney-wh/phpsploit
refs/heads/master
src/utils/__init__.py
1
"""Miscelaneous utils for phpsploit internals """ # path related utils from . import path from . import ascii from . import time
tudennis/LeetCode---kamyu104-11-24-2015
refs/heads/master
Python/search-in-rotated-sorted-array-ii.py
2
from __future__ import print_function # Time: O(logn) # Space: O(1) # # Follow up for "Search in Rotated Sorted Array": # What if duplicates are allowed? # # Would this affect the run-time complexity? How and why? # # Write a function to determine if a given target is in the array. # class Solution(object): def s...
elijah513/django
refs/heads/master
django/contrib/admin/decorators.py
558
def register(*models, **kwargs): """ Registers the given model(s) classes and wrapped ModelAdmin class with admin site: @register(Author) class AuthorAdmin(admin.ModelAdmin): pass A kwarg of `site` can be passed as the admin site, otherwise the default admin site will be used. ...
victordion/YouCompleteMe
refs/heads/master
python/ycm/youcompleteme.py
15
#!/usr/bin/env python # # Copyright (C) 2011, 2012 Google Inc. # # This file is part of YouCompleteMe. # # YouCompleteMe 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 # (...
tlevine/be
refs/heads/master
libbe/command/diff.py
5
# Copyright (C) 2005-2012 Aaron Bentley <abentley@panoramicfeedback.com> # Chris Ball <cjb@laptop.org> # Gianluca Montecchi <gian@grys.it> # W. Trevor King <wking@tremily.us> # # This file is part of Bugs Everywhere. # # Bugs Everywhere is free sof...
poo12138/gem5-stable
refs/heads/master
src/arch/x86/X86TLB.py
61
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
yuewko/neutron
refs/heads/master
neutron/agent/l3/keepalived_state_change.py
46
# Copyright (c) 2015 Red Hat 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 a...
Bysmyyr/chromium-crosswalk
refs/heads/master
tools/cr/cr/auto/client/__init__.py
138
# 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 package to hold the modules auto loaded from the client directory."""
Ialong/shogun
refs/heads/develop
applications/tapkee/samples/dm.py
26
import modshogun as sg import data import numpy as np # load data feature_matrix = data.swissroll() # create features instance features = sg.RealFeatures(feature_matrix) # create Diffusion Maps converter instance converter = sg.DiffusionMaps() # set target dimensionality converter.set_target_dim(2) # set number of t...
shivam1111/odoo
refs/heads/8.0
addons/website_gengo/controllers/__init__.py
7372
import main
syphar/django
refs/heads/master
tests/gis_tests/geogapp/models.py
336
from django.utils.encoding import python_2_unicode_compatible from ..models import models @python_2_unicode_compatible class NamedModel(models.Model): name = models.CharField(max_length=30) objects = models.GeoManager() class Meta: abstract = True required_db_features = ['gis_enabled'] ...
AnasGhrab/scikit-learn
refs/heads/master
examples/cluster/plot_agglomerative_clustering.py
343
""" Agglomerative clustering with and without structure =================================================== This example shows the effect of imposing a connectivity graph to capture local structure in the data. The graph is simply the graph of 20 nearest neighbors. Two consequences of imposing a connectivity can be s...
rdblue/Impala
refs/heads/cdh5-trunk
thirdparty/hive-1.1.0-cdh5.5.0-SNAPSHOT/lib/py/thrift/protocol/__init__.py
83
# # 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...
molebot/vnpy
refs/heads/master
vn.archive/vn.lts_old/pyscript/l2/generate_data_type.py
70
# encoding: UTF-8 __author__ = 'CHENXY' # C++和python类型的映射字典 type_dict = { 'int': 'int', 'char': 'string', 'double': 'float', 'short': 'int' } def process_line(line): """处理每行""" if '///' in line: # 注释 py_line = process_comment(line) elif 'typedef' in line: # 类型申明 ...
nathantypanski/zombierl
refs/heads/master
status.py
1
from libtcod import libtcodpy as libtcod import console as cons #import player as P import map_vars as M # Create the game status console. status = '' status_console = libtcod.console_new(M.SCREEN_WIDTH, (M.SCREEN_HEIGHT - M.MAP_HEIGHT)) libtcod.console_set_alignment(status_console, libtcod.LEFT) def add_status (new_...
hainn8x/gnuradio
refs/heads/master
gr-audio/examples/python/audio_fft.py
68
#!/usr/bin/env python # # Copyright 2004,2005,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 ...
blockstack/secret-sharing
refs/heads/master
unit_tests.py
3
# -*- coding: utf-8 -*- """ Secret Sharing ~~~~~ :copyright: (c) 2014 by Halfmoon Labs :license: MIT, see LICENSE for more details. """ import random import unittest from test import test_support from utilitybelt import base64_chars from secretsharing import secret_int_to_points, points_to_secret_int,...
markliederbach/blog-backend
refs/heads/master
blog_backend/users/tests/test_admin.py
117
from test_plus.test import TestCase from ..admin import MyUserCreationForm class TestMyUserCreationForm(TestCase): def setUp(self): self.user = self.make_user('notalamode', 'notalamodespassword') def test_clean_username_success(self): # Instantiate the form with a new username form ...
bitcraft/pyglet
refs/heads/master
tests/interactive/font/wrap_invariant.py
1
"""Test that text will not wrap when its width is set to its calculated width. You should be able to clearly see "TEST TEST" on a single line (not two) and "SPAM SPAM SPAM" over two lines, not three. """ import unittest from . import base_text from pyglet import font class TEST_WRAP_INVARIANT(base_text.TextTestBas...
SUSE/azure-sdk-for-python
refs/heads/master
azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vmilr_registration_request.py
4
# 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 ...
nosun/pyspider
refs/heads/master
pyspider/libs/sample_handler.py
67
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Created on __DATE__ # Project: __PROJECT_NAME__ from pyspider.libs.base_handler import * class Handler(BaseHandler): crawl_config = { } @every(minutes=24 * 60) def on_start(self): self.crawl('__START_URL__', callback=self.index_page) @co...
tiagormk/gem5-hmp
refs/heads/master
tests/configs/tgen-simple-dram.py
4
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
depboy/myriad
refs/heads/master
contrib/spendfrom/setup.py
2104
from distutils.core import setup setup(name='btcspendfrom', version='1.0', description='Command-line utility for bitcoin "coin control"', author='Gavin Andresen', author_email='gavin@bitcoinfoundation.org', requires=['jsonrpc'], scripts=['spendfrom.py'], )
onurmatik/django-timeline
refs/heads/master
timeline/__init__.py
12133432
torquemad/pixelated-user-agent
refs/heads/master
service/test/unit/fixtures/__init__.py
12133432
ryangallen/django
refs/heads/master
django/db/backends/base/__init__.py
12133432
boa19861105/android_LP5.0.2_kernel_htc_dlxub1
refs/heads/master
tools/perf/scripts/python/sched-migration.py
11215
#!/usr/bin/python # # Cpu task migration overview toy # # Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com> # # perf script event handlers have been generated by perf script -g python # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Fre...
ekonstantinidis/django-rest-framework-docs
refs/heads/master
rest_framework_docs/api_endpoint.py
2
import json import inspect from django.contrib.admindocs.views import simplify_regex from django.utils.encoding import force_str from rest_framework.viewsets import ModelViewSet from rest_framework.serializers import BaseSerializer VIEWSET_METHODS = { 'List': ['get', 'post'], 'Instance': ['get', 'put', 'patc...
DamnWidget/txorm
refs/heads/master
txorm/_compat/txorm_python3.py
1
# -*- test-case-name: txorm.test.test_property -*- # Copyright (c) 2014 Oscar Campos <oscar.campos@member.fsf.org> # See LICENSE for details from ..property import PropertyRegisterMeta class TxORM(object, metaclass=PropertyRegisterMeta): """Causes subclasses to be associated with a TxORM PropertyRegister Th...
helfertool/helfertool
refs/heads/dev
src/registration/urls.py
1
from django.conf.urls import url from django.views.generic import TemplateView from . import views from .feeds import HelperFeed urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^all/$', views.index_all_events, name='index_all_events'), # about url(r'^about/$', TemplateView.as_vi...
timsnyder/bokeh
refs/heads/master
bokeh/command/subcommands/tests/test_json.py
2
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
gavioto/tapiriik
refs/heads/master
tapiriik/web/views/account.py
16
from tapiriik.sync import Sync from django.http import HttpResponse from django.views.decorators.http import require_POST from django.shortcuts import redirect from tapiriik.auth import User import json import dateutil.parser @require_POST def account_setemail(req): if not req.user: return HttpResponse(st...
syaiful6/django
refs/heads/master
tests/many_to_one/__init__.py
12133432
zedr/django
refs/heads/master
tests/null_fk/__init__.py
12133432
jamielennox/tempest
refs/heads/master
tempest/thirdparty/__init__.py
12133432
weolar/miniblink49
refs/heads/master
third_party/skia/tools/__init__.py
12133432
luotao1/Paddle
refs/heads/develop
python/paddle/fluid/tests/unittests/test_fleet_lars_meta_optimizer.py
2
# Copyright (c) 2020 PaddlePaddle 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 appli...
di0spyr0s/pants
refs/heads/master
src/python/pants/backend/codegen/targets/jaxb_library.py
15
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.backend.j...
nicky-ji/edx-nicky
refs/heads/master
lms/djangoapps/course_wiki/plugins/__init__.py
12133432
VigTech/Vigtech-Services
refs/heads/master
env/lib/python2.7/site-packages/django/conf/locale/fi/__init__.py
12133432
acourtney2015/boto
refs/heads/develop
tests/integration/elastictranscoder/test_layer1.py
114
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
Argon-Zhou/django
refs/heads/master
django/db/backends/mysql/validation.py
368
from django.core import checks from django.db.backends.base.validation import BaseDatabaseValidation class DatabaseValidation(BaseDatabaseValidation): def check_field(self, field, **kwargs): """ MySQL has the following field length restriction: No character (varchar) fields can have a leng...
kiszk/spark
refs/heads/master
examples/src/main/python/ml/decision_tree_regression_example.py
128
# # 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...
EdisonAlgorithms/LeetCode
refs/heads/master
vol6/expression-add-operators/expression-add-operators.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: Zeyuan Shang # @Date: 2015-11-24 02:03:32 # @Last Modified by: Zeyuan Shang # @Last Modified time: 2015-11-24 02:03:44 class Solution(object): def addOperators(self, num, target): """ :type num: str :type target: int :rtype...
boltnev/iktomi
refs/heads/master
iktomi/forms/form.py
3
# -*- coding: utf-8 -*- from webob.multidict import MultiDict import six from . import convs from .perms import DEFAULT_PERMISSIONS from .fields import FieldBlock class FormValidationMetaClass(type): ''' Metaclass to assert that some obsolete methods are not used. can be removed from iktomi after all exi...
areitz/pants
refs/heads/master
tests/python/pants_test/tasks/false.py
26
#!/usr/bin/python # coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) im...
notapresent/rbm2m
refs/heads/master
rbm2m/action/scan_manager.py
1
# -*- coding: utf-8 -*- import datetime import logging from sqlalchemy import and_, func from base_manager import BaseManager from ..models import Scan, scan_records, Genre # All scans with no activity for this long are considered stalled INACTIVITY_PERIOD = datetime.timedelta(seconds=600) # Update interval UPDATE_...
devs1991/test_edx_docmode
refs/heads/master
venv/lib/python2.7/site-packages/shapely/speedups/__init__.py
4
import warnings from shapely.geometry import linestring, polygon from shapely import coords try: from shapely.speedups import _speedups available = True import_error_msg = None except ImportError: import sys available = False import_error_msg = tuple(sys.exc_info()[1]) __all__ = ['available',...
huangbop/today
refs/heads/master
products/migrations/0003_auto_20150819_1654.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('products', '0002_auto_20150819_0258'), ] operations = [ migrations.AlterField( model_name='product', ...
ketjow4/NOV
refs/heads/master
Lib/encodings/cp1006.py
593
""" Python Character Mapping Codec cp1006 generated from 'MAPPINGS/VENDORS/MISC/CP1006.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,errors...
bradh/samba
refs/heads/master
python/samba/netcmd/vampire.py
40
# Vampire # # Copyright Jelmer Vernooij 2010 <jelmer@samba.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # Th...
pranavtbhat/EE219
refs/heads/master
project3/part5.py
1
import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.cross_validation import KFold import part1 def load_dataset(): df = pd.read_csv( 'ml-100k/u.data', delimiter='\t', names = ['user_id', 'item_id', 'rating', 'timestamp'], header=0 ) R = df.pi...
ravibhure/ansible
refs/heads/devel
lib/ansible/modules/system/pam_limits.py
30
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Sebastien Rohaut <sebastien.rohaut@gmail.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_version...
fire-rs-laas/fire-rs-saop
refs/heads/master
python/fire_rs/monitoring/__init__.py
1
# Copyright (c) 2018, CNRS-LAAS # 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...
hpsilva/profitpy
refs/heads/master
profit/models/executions.py
18
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2007 Troy Melhase <troy@gci.net> # Distributed under the terms of the GNU General Public License v2 from time import strftime, strptime from PyQt4.QtCore import Qt, QModelIndex, QVariant, QString from profit.lib import valueAlign from profit.models import Bas...
biddyweb/androguard
refs/heads/master
androxgmml.py
38
#!/usr/bin/env python # This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard 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,...
Zhaominxin/MyProject
refs/heads/master
鱼CPython精英挑战赛S2E1.py
1
#Python精英挑战赛第二季第1期:本期题目:字符串格式化输出“两端对齐” #给定一组字符串,字符串均由标准英语单词、空格及常用英语标点符号组成, #要求编写函数,根据给定宽度,按照“两端对齐”的格式化输出。 #“两端对齐”格式要求: #1. 每行必须以字母或标点符号开头,但表示结束的标点符号,如逗号、句号、问好、感叹号等不允许出现在每行开头。每行必须以字母或标点符号结尾,空格不允许出现在每行的开头和结尾。 #2. 若某一行只容得下一个单词,则该行按照左对齐格式输出,行尾同样不需要用空格填充。 #3. 参数width肯定会大于字符串中最长单词的长度,不需要考虑单词长度超过width的情况。 #4. 用空格填充时,应当遵循“空格...
daq-tools/kotori
refs/heads/amo/packaging
kotori/vendor/hydro2motion/database/sql.py
1
# -*- coding: utf-8 -*- # (c) 2015 Andreas Motl, Elmyra UG <andreas.motl@elmyra.de> from sqlalchemy.engine import create_engine from sqlalchemy.sql.ddl import CreateTable from sqlalchemy.sql.schema import MetaData, Column, Table from sqlalchemy.sql.sqltypes import Integer, String, Numeric from alchimia.strategy import ...
esthermm/odoo-addons
refs/heads/8.0
project_task_ending/__openerp__.py
3
# -*- encoding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the...
agogear/python-1
refs/heads/master
Matafight/0006/importantdiary.py
76
#_*_ encoding: utf-8 _*_ import re class countWord: def __init__(self): self.dic={}; self.word=""; def count(self,filename): self.dic={}; fopen=file(filename,'r'); for lines in fopen.readlines(): words=re.findall(r"\w+",lines); for items in word...