repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
qqqmr/digitalwurlitzer
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py
1835
# 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. """New implementation of Visual Studio project generation.""" import os import random import gyp.common # hashlib is supplied as of Python 2.5 as the replacemen...
Gorgel/khd_projects
refs/heads/master
khd_projects/projects/templatetags/__init__.py
3
__author__ = 'gorgel'
murder77/electrum
refs/heads/master
plugins/exchange_rate.py
1
from PyQt4.QtGui import * from PyQt4.QtCore import * from datetime import datetime import inspect import requests import sys from threading import Thread import time import traceback from decimal import Decimal from functools import partial from electrum.bitcoin import COIN from electrum.plugins import BasePlugin, ho...
jpulec/hardt
refs/heads/master
hardt/apps/playlists/__init__.py
12133432
wdurhamh/statsmodels
refs/heads/master
statsmodels/tsa/tests/__init__.py
12133432
amaozhao/basecms
refs/heads/master
classytags/exceptions.py
14
from django.template import TemplateSyntaxError __all__ = ['ArgumentRequiredError', 'InvalidFlag', 'BreakpointExpected', 'TooManyArguments'] class BaseError(TemplateSyntaxError): template = '' def __str__(self): # pragma: no cover return self.template % self.__dict__ class ArgumentRequ...
hugs/selenium
refs/heads/master
selenium/src/py/lib/docutils/languages/it.py
5
# Author: Nicola Larosa # Contact: docutils@tekNico.net # Revision: $Revision: 2944 $ # Date: $Date: 2005-01-20 13:11:50 +0100 (Thu, 20 Jan 2005) $ # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils....
indykish/servo
refs/heads/master
tests/wpt/web-platform-tests/XMLHttpRequest/resources/content.py
227
def main(request, response): response_ctype = '' if "response_charset_label" in request.GET: response_ctype = ";charset=" + request.GET.first("response_charset_label") headers = [("Content-type", "text/plain" + response_ctype), ("X-Request-Method", request.method), ("X-...
mancoast/CPythonPyc_test
refs/heads/master
cpython/270_test_userlist.py
137
# Check every path through every method of UserList from UserList import UserList from test import test_support, list_tests class UserListTest(list_tests.CommonTest): type2test = UserList def test_getslice(self): super(UserListTest, self).test_getslice() l = [0, 1, 2, 3, 4] u = self.t...
mathemage/h2o-3
refs/heads/master
h2o-py/h2o/cross_validation.py
6
# -*- encoding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from h2o.utils.compatibility import * # NOQA class H2OPartitionIterator(object): def __init__(self, n): if abs(n - int(n)) >= 1e-15: raise ValueError("n must be an integer") self.n = int(n...
iver333/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/haslanded_unittest.py
124
# Copyright (C) 2009 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...
jaxkodex/odoo
refs/heads/8.0
addons/auth_oauth/controllers/main.py
205
import functools import logging import simplejson import urlparse import werkzeug.utils from werkzeug.exceptions import BadRequest import openerp from openerp import SUPERUSER_ID from openerp import http from openerp.http import request from openerp.addons.web.controllers.main import db_monodb, ensure_db, set_cookie_...
zlsun/XX-Net
refs/heads/master
code/default/python27/1.0/lib/Cookie.py
24
#### # Copyright 2000 by Timothy O'Malley <timo@alum.mit.edu> # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software # and its documentation for any purpose and without fee is hereby # granted, provided that the above copyright notice appear in all # copies and that bot...
alacritythief/django-rest-framework
refs/heads/master
rest_framework/templatetags/rest_framework.py
49
from __future__ import absolute_import, unicode_literals import re from django import template from django.core.urlresolvers import NoReverseMatch, reverse from django.template import Context, loader from django.utils import six from django.utils.encoding import force_text, iri_to_uri from django.utils.html import es...
MrNuggles/HeyBoet-Telegram-Bot
refs/heads/master
temboo/Library/Dropbox/FileOperations/CreateFolder.py
5
# -*- coding: utf-8 -*- ############################################################################### # # CreateFolder # Creates a Dropbox folder. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except i...
Stanford-Online/edx-platform
refs/heads/master
openedx/core/djangoapps/api_admin/api/v1/tests/test_views.py
18
""" Tests for the `api_admin` api module. """ import json from rest_framework.reverse import reverse from django.contrib.auth.models import User from django.test import TestCase from openedx.core.djangoapps.api_admin.tests import factories from openedx.core.djangolib.testing.utils import skip_unless_lms from student...
depjs/dep
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py
8
# This file comes from # https://github.com/martine/ninja/blob/master/misc/ninja_syntax.py # Do not edit! Edit the upstream one instead. """Python module for generating .ninja files. Note that this is emphatically not a required piece of Ninja; it's just a helpful utility for build-file-generation systems that alr...
TimYi/django
refs/heads/master
tests/migrations/test_deprecated_fields.py
504
from django.core.management import call_command from django.test import override_settings from .test_base import MigrationTestBase class Tests(MigrationTestBase): """ Deprecated model fields should still be usable in historic migrations. """ @override_settings(MIGRATION_MODULES={"migrations": "migrat...
chrisndodge/edx-platform
refs/heads/master
common/djangoapps/microsite_configuration/tests/backends/test_base.py
38
""" Test Microsite base backends. """ import logging from mock import patch from django.conf import settings from django.test import TestCase from microsite_configuration import microsite from microsite_configuration.backends.base import ( AbstractBaseMicrositeBackend, BaseMicrositeBackend ) log = logging.ge...
Moriadry/tensorflow
refs/heads/master
tensorflow/contrib/specs/python/summaries_test.py
112
# 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 applicable ...
Rheinhart/Firefly
refs/heads/master
firefly/distributed/child.py
8
#coding:utf8 ''' Created on 2013-8-14 @author: lan (www.9miao.com) ''' class Child(object): '''子节点对象''' def __init__(self,cid,name): '''初始化子节点对象 ''' self._id = cid self._name = name self._transport = None def getName(self): '''获取子节点的名称''' ...
sailingchannels/crawler
refs/heads/master
crawler.py
1
import requests import json import config import calendar import sys import time import math import xmltodict import logging import arrow import os from pymongo import MongoClient, DESCENDING from datetime import datetime, date, timedelta import detectlanguage from Queue import Queue from twython import Twython from ap...
naousse/odoo
refs/heads/8.0
addons/survey_crm/__openerp__.py
312
# -*- 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...
jeezybrick/django
refs/heads/master
django/db/models/fields/files.py
96
import datetime import os import warnings from django import forms from django.core import checks from django.core.files.base import File from django.core.files.images import ImageFile from django.core.files.storage import default_storage from django.db.models import signals from django.db.models.fields import Field f...
beagles/neutron_hacking
refs/heads/neutron_oslo_messaging
neutron/plugins/vmware/nsxlib/lsn.py
7
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 VMware, 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/lic...
thaumos/ansible
refs/heads/devel
lib/ansible/module_utils/database.py
50
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
AwesomeTurtle/personfinder
refs/heads/master
tools/merge_messages.py
17
#!/usr/bin/env python # Copyright 2010 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 ...
tectronics/lastfmtagextractor
refs/heads/master
lastfmtagextractor/__init__.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' lastfmtagextractor/__init__.py 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 ...
PLNech/thefuck
refs/heads/master
thefuck/rules/git_push_pull.py
3
from thefuck.shells import shell from thefuck.utils import replace_argument from thefuck.specific.git import git_support @git_support def match(command): return ('push' in command.script and '! [rejected]' in command.stderr and 'failed to push some refs to' in command.stderr an...
ChatAI/dumbots
refs/heads/master
bots/TriviaBot/lib/file_parser.py
1
import numpy as np import hickle as hkl from os import walk def file2list ( category ) : prefix = "data/" category = prefix + category file = open( category ) listofcontents = [] choicelist = [] contents ={} linenumber=0 for line in file: if line.startswith('#'): c...
ravindrasingh22/ansible
refs/heads/devel
test/units/parsing/yaml/__init__.py
12133432
marratj/ansible
refs/heads/devel
test/units/modules/cloud/amazon/__init__.py
12133432
jeffjose/whartonapi
refs/heads/master
gsr.py
1
#!/usr/bin/python # # Jeffrey Jose | November 16, 2015 # # Wharton Group Study Rooms (GSR) API import sys, os import requests import getpass import simplejson as json import datetime import auth API = 'https://webapps.wharton.upenn.edu/whartonm/index.cfm/api/v1/' # Wrapper around request.<httpmethod> def req(method...
Charleo85/SIS-Rebuild
refs/heads/master
webv2/web/urls.py
1
"""web URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based v...
ghandiosm/Test
refs/heads/master
addons/website_mail_channel/models/mail_mail.py
46
# -*- coding: utf-8 -*- from openerp.osv import osv from openerp import tools from openerp.tools.translate import _ from openerp.addons.website.models.website import slug class MailMail(osv.Model): _inherit = 'mail.mail' def send_get_mail_body(self, cr, uid, ids, partner=None, context=None): """ Sho...
epam-mooc/edx-platform
refs/heads/master
common/test/acceptance/tests/helpers.py
9
""" Test helper functions and base classes. """ import json import unittest import functools import requests from path import path from bok_choy.web_app_test import WebAppTest def skip_if_browser(browser): """ Method decorator that skips a test if browser is `browser` Args: browser (str): name of...
abide/django-windows-tools
refs/heads/master
django_windows_tools/management/commands/winservice_install.py
1
# encoding: utf-8 # Django command installing a Windows Service that runs Django commands # # Copyright (c) 2012 Openance # 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...
dimid/ansible-modules-extras
refs/heads/devel
cloud/amazon/ec2_snapshot_facts.py
15
#!/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...
samuroi/SamuROI
refs/heads/develop
samuroi/util/mask_generator/manual_correction.py
1
__author__ = 'stephenlenzi' import numpy as np import matplotlib.pyplot as plt import matplotlib from . import create_masks class ComCorrector(object): def __init__(self, mask_generator, raw_image, image_2=None, image_3=None): """ :param mask_generator: uses mask_generator instance to plot graph...
foss-transportationmodeling/rettina-server
refs/heads/master
.env/local/lib/python2.7/site-packages/wtforms/ext/django/templatetags/__init__.py
12133432
openhatch/oh-missions-oppia-beta
refs/heads/master
core/controllers/pages_test.py
2
# Copyright 2014 The Oppia 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 applicable ...
SerCeMan/intellij-community
refs/heads/master
python/lib/Lib/email/mime/image.py
573
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Class representing image/* type MIME documents.""" __all__ = ['MIMEImage'] import imghdr from email import encoders from email.mime.nonmultipart import MIMENonMultipart class MIMEImage(MIMENonMultipart...
scemama/Bench_MRCC
refs/heads/master
bin/plot.py
1
#!/usr/bin/env python import os, sys if len(sys.argv) > 1: column= int(sys.argv[1]) else: column=1 datafiles = filter(lambda x: x.startswith('data_'), os.listdir(os.getcwd())) # Read data files data = {} for file in datafiles: try: _, method, basis = file.split('_') except: pass else: with ope...
conlini/django_dynamic_formset
refs/heads/master
dynamic_formset/__init__.py
1
from widget import * from fields import * from formsets import *
evanma92/routeh
refs/heads/master
flask/lib/python2.7/site-packages/flask/testsuite/ext.py
563
# -*- coding: utf-8 -*- """ flask.testsuite.ext ~~~~~~~~~~~~~~~~~~~ Tests the extension import thing. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import sys import unittest try: from imp import reload as reload_module except ImportError: reload...
alex4108/scLikesDownloader
refs/heads/master
fudge/tests/support/_for_patch.py
6
class some_object: class inner: pass
redshodan/cairn
refs/heads/master
src/python/cairn/sysdefs/templates/unix/archive/readmeta/__init__.py
1
"""templates.unix.archive.readmeta Module""" import cairn from cairn import Options def getSubModuleString(sysdef): str = "ExtractMeta; ReadMeta; VerifyMeta; VerifyArchive; " return str
fredcollet/Sylius
refs/heads/master
docs/_themes/sylius_rtd_theme/__init__.py
1504
"""Sphinx ReadTheDocs theme. From https://github.com/ryan-roemer/sphinx-bootstrap-theme. """ import os VERSION = (0, 1, 5) __version__ = ".".join(str(v) for v in VERSION) __version_full__ = __version__ def get_html_theme_path(): """Return list of HTML theme paths.""" cur_dir = os.path.abspath(os.path.dirn...
zhuango/python
refs/heads/master
pytorchLearning/pytroch-with-deep-learning/chapter2_startup/run_a_cv_model.py
1
from torchvision import models print(dir(models)) alexnet = models.AlexNet() renet = models.resnet101(pretrained=True) from PIL import Image img = Image.open("./dog.PNG") print(img) img.show() img_t = preprocess(img) import torch # add batch dimension. batch_t = torch.unsequence(img_t, 0) resnet.eval(...
alexandrucoman/vbox-neutron-agent
refs/heads/master
neutron/extensions/portsecurity.py
22
# Copyright 2013 VMware, 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 a...
kirbyfan64/hy
refs/heads/master
tests/importer/test_importer.py
15
from hy.importer import import_file_to_module, import_buffer_to_ast, MetaLoader from hy.errors import HyTypeError import os import ast def test_basics(): "Make sure the basics of the importer work" import_file_to_module("basic", "tests/resources/importer/basic.hy") def test_stringe...
grahamhayes/designate
refs/heads/master
designate/api/admin/controllers/extensions/__init__.py
12133432
d6e/coala
refs/heads/master
coalib/processes/communication/__init__.py
12133432
google-research/google-research
refs/heads/master
constrained_language_typology/compute_associations_main.py
1
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
bluewitch/Code-Blue-Python
refs/heads/master
fizzbuzz_aking.py
1
class fizzbuzzPlayer(): def __init__(self, playernum): self.playernum = playernum def think(self, input): if not divmod(input,3)[1] and not divmod(input,5)[1]: return 'fizzbuzz' elif not divmod(input,3): return 'fizz' elif not divmod(input,5): return 'buzz' else: return str(input) def play(sel...
michaeljohn32/odoomrp-wip
refs/heads/8.0
machine_manager_preventive/__openerp__.py
12
# -*- 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 th...
loco-odoo/localizacion_co
refs/heads/master
openerp/addons-extra/report_move_voucher/report/__init__.py
7
#!/usr/bin/python # -*- encoding: utf-8 -*- ########################################################################### # Module Writen to OpenERP, Open Source Management Solution # Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). # All Rights Reserved ###############Credits##########################...
anksp21/Community-Zenpacks
refs/heads/master
ZenPacks.AndreaConsadori.Alvarion/ZenPacks/AndreaConsadori/Alvarion/modeler/plugins/AlvarionDeviceMap.py
2
# # This program is part of Zenoss Core, an open source monitoring platform. # Copyright (C) 2007, Zenoss Inc. # # 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. # # For complete inform...
JDShu/SCOPE
refs/heads/master
askbot/migrations/0025_transfer_flagged_items_to_activity.py
2
# encoding: utf-8 #from south.db import db from south.v2 import DataMigration from askbot.migrations_api.version1 import API from askbot import const OFFENSIVE = const.TYPE_ACTIVITY_MARK_OFFENSIVE class Migration(DataMigration): def forwards(self, orm): """find all FlaggedItems and the corresponding ...
mikesname/ehri-collections
refs/heads/master
ehriportal/suggestions/models.py
1
"""Suggestions model.""" import datetime from django.db import models import jsonfield GRAB_META = [ "HTTP_USER_AGENT", "HTTP_HOST", "REMOTE_HOST", "HTTP_ACCEPT", "HTTP_REFERER", "REMOTE_ADDR", "CONTEXT_TYPE", "HTTP_ACCEPT_LANGUAGE", "QUERY_STRI...
2014cdag10/2014cdaGG
refs/heads/master
wsgi/programs/cdag14/__init__.py
9
import cherrypy # 這是 CDAG14 類別的定義 class CDAG14(object): # 各組利用 index 引導隨後的程式執行 @cherrypy.expose def index(self, *args, **kwargs): outstring = ''' 這是 2014CDA 協同專案下的 cdag14 分組程式開發網頁, 以下為 W12 的任務執行內容.<br /> <!-- 這裡採用相對連結, 而非網址的絕對連結 (這一段為 html 註解) --> <a href="cube1">cdag14 正方體參數繪圖</a>(尺寸變數 a, b, c)<br...
LokiCoder/Sick-Beard
refs/heads/torrent_1080_subtitles
lib/tvdb_api/setup.py
50
from setuptools import setup setup( name = 'tvdb_api', version='1.9', author='dbr/Ben', description='Interface to thetvdb.com', url='http://github.com/dbr/tvdb_api/tree/master', license='unlicense', long_description="""\ An easy to use API interface to TheTVDB.com Basic usage is: >>> import tvdb_api >>> t = tvdb_api...
tushar-rishav/coala
refs/heads/master
tests/output/dbus/dbus_test_files/LocalTestBear.py
26
from coalib.bears.LocalBear import LocalBear from coalib.results.HiddenResult import HiddenResult from coalib.results.Result import Result class LocalTestBear(LocalBear): # pragma: no cover def run(self, filename, file): return [Result("LocalTestBear", "test msg"), HiddenResult("LocalTes...
tdickers/mitmproxy
refs/heads/master
test/mitmproxy/script/test_script.py
1
from mitmproxy.script import Script from mitmproxy.exceptions import ScriptException from test.mitmproxy import tutils class TestParseCommand: def test_empty_command(self): with tutils.raises(ScriptException): Script.parse_command("") with tutils.raises(ScriptException): S...
Taceor/EggZlist
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py
1355
# 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. """cmake output module This module is under development and should be considered experimental. This module produces cmake (2.8.8+) input as its output. One CMake...
aps-sids/zulip
refs/heads/master
confirmation/migrations/__init__.py
12133432
lwiecek/django
refs/heads/master
tests/raw_query/__init__.py
12133432
nextgis/nextgisweb
refs/heads/updates
nextgisweb/postgis/view.py
1
# -*- coding: utf-8 -*- from __future__ import division, unicode_literals, print_function, absolute_import from ..resource import Widget from .model import PostgisConnection, PostgisLayer class PostgisConnectionWidget(Widget): resource = PostgisConnection operation = ('create', 'update') amdmod = 'ngw-pos...
chauhanhardik/populo
refs/heads/master
lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py
37
""" Unit tests for instructor_dashboard.py. """ import ddt from mock import patch from django.conf import settings from django.core.urlresolvers import reverse from django.test.client import RequestFactory from django.test.utils import override_settings from courseware.tabs import get_course_tab_list from courseware....
hramrach/osc
refs/heads/master
osc/babysitter.py
2
# Copyright (C) 2008 Novell Inc. All rights reserved. # This program is free software; it may be used, copied, modified # and distributed under the terms of the GNU General Public Licence, # either version 2, or (at your option) any later version. from __future__ import print_function import errno import os.path imp...
village-people/flying-pig
refs/heads/master
ai_challenge/evaluator.py
1
# Village People, 2017 import torch import torch.multiprocessing as mp from models import get_model from termcolor import colored as clr from time import sleep class Evaluator(mp.Process): def __init__(self, shared_objects, config): super(Evaluator, self).__init__() self.shared_objects = shared_ob...
chauhanhardik/populo
refs/heads/master
common/lib/xmodule/xmodule/open_ended_grading_classes/grading_service_module.py
106
# This class gives a common interface for logging into the grading controller import logging import requests import dogstats_wrapper as dog_stats_api from lxml import etree from requests.exceptions import RequestException, ConnectionError, HTTPError from .combined_open_ended_rubric import CombinedOpenEndedRubric, Ru...
tareqalayan/ansible
refs/heads/devel
test/units/modules/network/nxos/test_nxos_bgp.py
18
# (c) 2016 Red Hat 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 published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dis...
xfournet/intellij-community
refs/heads/master
plugins/hg4idea/testData/bin/hgext/bugzilla.py
93
# bugzilla.py - bugzilla integration for mercurial # # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com> # Copyright 2011-2 Jim Hague <jim.hague@acm.org> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. '''hooks for integrating ...
selste/micropython
refs/heads/master
tests/basics/class_use_other.py
106
# check that we can use an instance of B in a method of A class A: def store(a, b): a.value = b class B: pass b = B() A.store(b, 1) print(b.value)
Wuguanping/Server_Manage_Plugin
refs/heads/master
Openstack_Plugin/ironic-plugin-pike/ironic/tests/unit/api/base.py
4
# -*- encoding: utf-8 -*- # # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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.a...
mattrobenolt/django
refs/heads/master
django/utils/itercompat.py
712
""" Providing iterator functions that are not in all version of Python we support. Where possible, we try to use the system-native version and only fall back to these implementations if necessary. """ def is_iterable(x): "A implementation independent way of checking for iterables" try: iter(x) exc...
blaze33/django
refs/heads/ticket_19456
tests/regressiontests/syndication/urls.py
47
from __future__ import absolute_import from django.conf.urls import patterns from . import feeds urlpatterns = patterns('django.contrib.syndication.views', (r'^syndication/complex/(?P<foo>.*)/$', feeds.ComplexFeed()), (r'^syndication/rss2/$', feeds.TestRss2Feed()), (r'^syndication/rss091/$', feeds.TestR...
jperon/musite
refs/heads/master
static/js/brython/Lib/long_int1/__init__.py
503
from browser import html, document, window import javascript #memorize/cache? def _get_value(other): if isinstance(other, LongInt): return other.value return other class BigInt: def __init__(self): pass def __abs__(self): return LongInt(self.value.abs()) def __add__(self, other): ...
t-mertz/slurmCompanion
refs/heads/master
django-web/sshcomm/tests.py
1
from django.test import TestCase from .models import RemoteServer from .security import create_key, create_string_key, encode_key, decode_key, crop_key, encrypt_Crypto, decrypt_Crypto import datetime # Create your tests here. class RemoteServerTests(TestCase): """Tests for RemoteServer model""" def test...
imruahmed/microblog
refs/heads/master
flask/lib/python2.7/site-packages/sqlalchemy/engine/default.py
55
# engine/default.py # Copyright (C) 2005-2015 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 """Default implementations of per-dialect sqlalchemy.engine classes. These are se...
jerryjiahaha/rts2
refs/heads/master
scripts/rts2saf/rts2saf/log.py
5
#!/usr/bin/python # (C) 2013, Markus Wildi, markus.wildi@bluewin.ch # # 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, or (at your option) # any later version. # # Thi...
gilbertpilz/solum
refs/heads/camp/item-1
solum/api/handlers/__init__.py
12133432
adamtegen/node-gyp
refs/heads/master
legacy/tools/gyp/setup.py
282
#!/usr/bin/env python # Copyright (c) 2009 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. from distutils.core import setup from distutils.command.install import install from distutils.command.install_lib import install_lib from di...
domesticduck/MenuConciergeServer
refs/heads/master
vendor/bundle/ruby/2.0.0/gems/libv8-3.16.14.3/vendor/gyp/setup.py
282
#!/usr/bin/env python # Copyright (c) 2009 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. from distutils.core import setup from distutils.command.install import install from distutils.command.install_lib import install_lib from di...
s-knibbs/py-web-player
refs/heads/master
pywebplayer/__init__.py
12133432
fe11x/pythondotorg
refs/heads/master
peps/management/__init__.py
12133432
havid0707/flasky
refs/heads/master
tests/__init__.py
12133432
vladmm/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/localflavor/ca/__init__.py
12133432
rishabh96b/Simple-Coding-Solutions
refs/heads/master
reverseString.py
1
#Python program to reverse a string #taking input from user string1 = list(input()) #converting the string to a list of characters. #initializing the starting index i=0 #initializing end index j= len(string1)-1 while(i<j): string1[i],string1[j] = string1[j],string1[i] #python way of swapping 2 elements i+=1 ...
guoxiaolongzte/spark
refs/heads/master
examples/src/main/python/ml/pca_example.py
123
# # 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...
openstack/neutron
refs/heads/master
neutron/agent/linux/pd.py
2
# Copyright 2015 Cisco Systems # 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...
relrix/hydropower
refs/heads/master
test_black_screen.py
1
"""hydropower. Copyright (C) 2016 - Shishir Pokharel shishir.pokharel@gmail.com 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 your option) any later version...
vsajip/django
refs/heads/django3
tests/regressiontests/model_permalink/__init__.py
12133432
ritzk/ansible-modules-core
refs/heads/devel
utilities/logic/__init__.py
12133432
petewarden/tensorflow
refs/heads/master
third_party/__init__.py
12133432
weijia/djangoautoconf
refs/heads/master
djangoautoconf/auto_conf_admin_tools/admin_features/__init__.py
12133432
DarkFenX/Pyfa
refs/heads/master
gui/fitCommands/gui/commandFit/__init__.py
12133432
spreeker/democracygame
refs/heads/master
external_apps/south/tests/circular_a/migrations/__init__.py
12133432
b-cube/thredds_catalog_crawler
refs/heads/master
tests/__init__.py
12133432