repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
xiandiancloud/edx-platform-Y | refs/heads/master | common/djangoapps/track/tests/test_util.py | 239 | from datetime import datetime
import json
from pytz import UTC
from django.test import TestCase
from track.utils import DateTimeJSONEncoder
class TestDateTimeJSONEncoder(TestCase):
def test_datetime_encoding(self):
a_naive_datetime = datetime(2012, 05, 01, 07, 27, 10, 20000)
a_tz_datetime = dat... |
amith01994/intellij-community | refs/heads/master | python/testData/resolve/SuperMetaClass.py | 83 | __metaclass__ = type
class A:
def foo(self):
print "foo"
class B(A):
def foo(self):
super(B, self).foo()
# <ref>
B().foo()
|
jimi-c/ansible | refs/heads/devel | lib/ansible/modules/network/avi/avi_trafficcloneprofile.py | 20 | #!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
ANSIB... |
thicklizard/jewel | refs/heads/master | scripts/rt-tester/rt-tester.py | 11005 | #!/usr/bin/python
#
# rt-mutex tester
#
# (C) 2006 Thomas Gleixner <tglx@linutronix.de>
#
# 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.
#
import os
import sys
import getopt
import sh... |
Tokyo-Buffalo/tokyosouth | refs/heads/master | env/lib/python3.6/site-packages/twisted/conch/test/test_insults.py | 13 | # -*- test-case-name: twisted.conch.test.test_insults -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
from twisted.python.reflect import namedAny
from twisted.trial import unittest
from twisted.test.proto_helpers import StringTransport
from twisted.conch.insults.insults import ServerProtoc... |
hypergig/jenkins-plugin-resolver | refs/heads/master | JenkinsPluginResolver/tests/tests.py | 1 | #from nose.plugins.skip import SkipTest
from nose.tools import assert_equal, raises
from mock import Mock, patch
from unittest import TestCase
from JenkinsPluginResolver.JenkinsPluginResolver import JenkinsPluginResolver
from os.path import dirname, realpath
class Test_JekinsPluginResolver(TestCase):
@patch('Jenk... |
brandonium21/snowflake | refs/heads/master | snowflakeEnv/lib/python2.7/site-packages/psycopg2/tests/dbapi20.py | 30 | #!/usr/bin/env python
''' Python DB API 2.0 driver compliance unit test suite.
This software is Public Domain and may be used without restrictions.
"Now we have booze and barflies entering the discussion, plus rumours of
DBAs on drugs... and I won't tell you what flashes through my mind each
time I read... |
geekaia/edx-platform | refs/heads/master | common/lib/xmodule/xmodule/modulestore/xml_importer.py | 2 | import logging
import os
import mimetypes
from path import path
import json
from .xml import XMLModuleStore, ImportSystem, ParentTracker
from xblock.runtime import KvsFieldData, DictKeyValueStore
from xmodule.x_module import XModuleDescriptor
from opaque_keys.edx.keys import UsageKey
from xblock.fields import Scope, R... |
tanmaykm/edx-platform | refs/heads/master | cms/djangoapps/xblock_config/__init__.py | 12133432 | |
openstack/smaug | refs/heads/master | karbor/tests/unit/common/__init__.py | 12133432 | |
wdsgyj/google-breakpad-mirror | refs/heads/master | src/tools/gyp/pylib/gyp/generator/eclipse.py | 62 | # 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.
"""GYP backend that generates Eclipse CDT settings files.
This backend DOES NOT generate Eclipse CDT projects. Instead, it generates XML
files that can be importe... |
akrherz/nwnserver | refs/heads/master | sandbox/new_client_fe.py | 1 | #
from twisted.application import service, internet
from twisted.cred import checkers, portal
from nwnserver import server, auth
from nwnserver.scripts import rainwise
from nwnserver import filewatcher
import receiver
application = service.Application("KIMT NWN Server")
serviceCollection = service.IServiceCollectio... |
omelkonian/cds | refs/heads/cdslabs_qa | cds/modules/previewer/views.py | 1 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2016, 2017 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any... |
codebrainz/geanypy | refs/heads/master | plugins/console.py | 1 | import os
from ConfigParser import SafeConfigParser
import geany
import geany.console
import gobject
import gtk
import gtk.gdk as gdk
import pango
WIDGET_STATES = [ gtk.STATE_NORMAL, gtk.STATE_ACTIVE, gtk.STATE_PRELIGHT,
gtk.STATE_SELECTED, gtk.STATE_INSENSITIVE ]
class ConsolePlugin(geany.Plugin):
__plugin_name... |
DataDog/integrations-core | refs/heads/master | php_fpm/tests/conftest.py | 1 | # (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import json
import os
from copy import deepcopy
import pytest
from datadog_checks.dev import docker_run, get_docker_hostname
from datadog_checks.php_fpm import PHPFPMCheck
HOST = get_docker_hostname()
H... |
mootshell/EasyAsPLY | refs/heads/master | ThirdParty/gyp/test/win/gyptest-link-pdb-no-output.py | 115 | #!/usr/bin/env python
# Copyright (c) 2014 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.
"""
Ensure that when debug information is not output, a pdb is not expected.
"""
import TestGyp
import os
import sys
if sys.platform == '... |
WillGuan105/django | refs/heads/master | django/contrib/admindocs/tests/test_fields.py | 638 | from __future__ import unicode_literals
import unittest
from django.contrib.admindocs import views
from django.db import models
from django.db.models import fields
from django.utils.translation import ugettext as _
class CustomField(models.Field):
description = "A custom field type"
class DescriptionLackingFi... |
ResearchSoftwareInstitute/MyHPOM | refs/heads/myhpom-develop | myhpom/tests/test_cloudfactory_response_view.py | 1 | import base64
import json
import os
from mock import patch
from django.core.urlresolvers import reverse
from django.test import TestCase, override_settings
from myhpom.models import CloudFactoryDocumentRun
from myhpom.tests.factories import CloudFactoryDocumentRunFactory
CF_PATH = os.path.join(os.path.dirname(__file__... |
mezz64/home-assistant | refs/heads/dev | homeassistant/components/lock/group.py | 12 | """Describe group states."""
from homeassistant.components.group import GroupIntegrationRegistry
from homeassistant.const import STATE_LOCKED, STATE_UNLOCKED
from homeassistant.core import callback
from homeassistant.helpers.typing import HomeAssistantType
@callback
def async_describe_on_off_states(
hass: HomeA... |
PXke/invenio | refs/heads/dev-pu | invenio/legacy/bibrank/scripts/bibrankgkb.py | 4 | #!@PYTHON@
## -*- mode: python; coding: utf-8; -*-
##
## This file is part of Invenio.
## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Founda... |
cgvarela/fabric | refs/heads/master | tests/support/implicit_fabfile.py | 46 | def foo():
pass
def bar():
pass
|
simongoffin/my_odoo_tutorial | refs/heads/master | openerp/addons/base/tests/test_orm.py | 24 | from collections import defaultdict
from openerp.tools import mute_logger
from openerp.tests import common
UID = common.ADMIN_USER_ID
DB = common.DB
class TestORM(common.TransactionCase):
""" test special behaviors of ORM CRUD functions
TODO: use real Exceptions types instead of Exception """
d... |
songmonit/CTTMSONLINE | refs/heads/master | addons/crm/res_config.py | 361 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-TODAY OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... |
laslabs/odoo | refs/heads/9.0 | addons/event_sale/models/sale_order.py | 26 | # -*- coding: utf-8 -*-
from openerp import api
from openerp.osv import fields, osv
class sale_order(osv.osv):
_inherit = "sale.order"
def action_confirm(self, cr, uid, ids, context=None):
res = super(sale_order, self).action_confirm(cr, uid, ids, context=context)
for order in self.browse(cr... |
SerCeMan/intellij-community | refs/heads/master | python/helpers/python-skeletons/itertools.py | 62 | """Skeleton for 'itertools' stdlib module."""
class islice(object):
def __init__(self, iterable, start, stop=None, step=None):
"""
:type iterable: collections.Iterable[T]
:type start: numbers.Integral
:type stop: numbers.Integral | None
:type step: numbers.Integral | None
... |
liosha2007/temporary-groupdocs-python3-sdk | refs/heads/master | groupdocs/models/Result.py | 2 | #!/usr/bin/env python
"""
Copyright 2012 GroupDocs.
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... |
jing-bao/pa-chromium | refs/heads/master | tools/telemetry/telemetry/page/page_set_archive_info.py | 7 | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import logging
import os
import re
import shutil
class PageSetArchiveInfo(object):
def __init__(self, archive_data_file_path, page_set_file... |
cmunk/protwis | refs/heads/master | interaction/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
rhelmer/socorro | refs/heads/master | webapp-django/crashstats/symbols/migrations/0001_initial.py | 2 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'SymbolsUpload'
db.create_table(u'symbols_symbolsupload', ... |
hopeall/odoo | refs/heads/8.0 | addons/mrp/company.py | 381 | # -*- 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... |
plotly/plotly.py | refs/heads/master | packages/python/plotly/plotly/validators/layout/transition/_duration.py | 1 | import _plotly_utils.basevalidators
class DurationValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="duration", parent_name="layout.transition", **kwargs
):
super(DurationValidator, self).__init__(
plotly_name=plotly_name,
parent_n... |
alexthered/kienhoc-platform | refs/heads/master | common/lib/xmodule/xmodule/tests/test_mako_module.py | 261 | """ Test mako_module.py """
from unittest import TestCase
from mock import Mock
from xmodule.mako_module import MakoModuleDescriptor
class MakoModuleTest(TestCase):
""" Test MakoModuleDescriptor """
def test_render_template_check(self):
mock_system = Mock()
mock_system.render_template = Non... |
Kazade/NeHe-Website | refs/heads/master | google_appengine/lib/django-1.2/django/contrib/gis/geos/tests/test_io.py | 321 | import binascii, ctypes, unittest
from django.contrib.gis.geos import GEOSGeometry, WKTReader, WKTWriter, WKBReader, WKBWriter, geos_version_info
class GEOSIOTest(unittest.TestCase):
def test01_wktreader(self):
# Creating a WKTReader instance
wkt_r = WKTReader()
wkt = 'POINT (5 23)'
... |
jonparrott/gcloud-python | refs/heads/master | language/google/cloud/language_v1/gapic/enums.py | 4 | # -*- coding: utf-8 -*-
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... |
paran0ids0ul/infernal-twin | refs/heads/master | build/reportlab/src/reportlab/graphics/samples/stacked_bar.py | 42 | #Autogenerated by ReportLab guiedit do not edit
from reportlab.graphics.charts.legends import Legend
from reportlab.graphics.charts.barcharts import HorizontalBarChart
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
from reportlab.graphics.charts.textlabels import Label
from reportlab.graphic... |
mttr/django | refs/heads/master | tests/utils_tests/test_module/__init__.py | 439 | class SiteMock(object):
_registry = {}
site = SiteMock()
|
andystopford/OSM_analyser | refs/heads/master | modules/analyseLogs.py | 1 | #!/usr/bin/python
import xml.etree.cElementTree as ET
import sys
import os.path
import shutil
import random
from math import pi
from gi.repository import Gtk
from gi.repository import Gdk
from gi.repository import GdkPixbuf
from gi.repository import GObject
from decimal import Decimal
from collections import namedtuple... |
diegosarmentero/ninja-ide | refs/heads/master | ninja_ide/gui/dialogs/preferences/preferences_shortcuts.py | 8 | # -*- coding: utf-8 -*-
#
# This file is part of NINJA-IDE (http://ninja-ide.org).
#
# NINJA-IDE 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
# any later version.
#
# NIN... |
Leits/openprocurement.relocation.api | refs/heads/master | openprocurement/relocation/api/views/complaint.py | 1 | # -*- coding: utf-8 -*-
from hashlib import sha512
from openprocurement.api.utils import (
json_view,
opresource,
APIResource,
save_tender,
ROUTE_PREFIX,
context_unpack
)
from openprocurement.relocation.api.utils import (
extract_transfer, update_ownership, save_transfer
)
from openprocureme... |
groovecoder/django-waffle | refs/heads/master | setup.py | 13 | from setuptools import setup, find_packages
setup(
name='django-waffle',
version='0.10.1',
description='A feature flipper for Django.',
long_description=open('README.rst').read(),
author='James Socol',
author_email='james.socol@gmail.com',
url='http://github.com/jsocol/django-waffle',
l... |
HiroIshikawa/21playground | refs/heads/master | microblog/flask/lib/python3.5/site-packages/sqlalchemy/dialects/postgresql/base.py | 10 | # postgresql/base.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
"""
.. dialect:: postgresql
:name: PostgreSQL
Sequences/SERIAL
------------... |
mikel-egana-aranguren/SADI-Galaxy-Docker | refs/heads/master | galaxy-dist/eggs/numpy-1.6.0-py2.7-linux-x86_64-ucs4.egg/numpy/oldnumeric/matrix.py | 88 | # This module is for compatibility only.
__all__ = ['UserArray', 'squeeze', 'Matrix', 'asarray', 'dot', 'k', 'Numeric', 'LinearAlgebra', 'identity', 'multiply', 'types', 'string']
import types
from user_array import UserArray, asarray
import numpy.oldnumeric as Numeric
from numpy.oldnumeric import dot, identity, mult... |
YelaSeamless/pyc2py | refs/heads/master | decompile/bloc.py | 2 | # pyc2py - The smart python decompiler.
# Copyright (C) 2012 Centre National de la Recherche Scientifique
#
# 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,... |
nttks/jenkins-test | refs/heads/gacco/birch | common/lib/xmodule/xmodule/modulestore/tests/utils.py | 7 | """
Helper classes and methods for running modulestore tests without Django.
"""
from importlib import import_module
from opaque_keys.edx.keys import UsageKey
from unittest import TestCase
from xblock.fields import XBlockMixin
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.draft_and_published ... |
britcey/ansible | refs/heads/devel | lib/ansible/plugins/shell/sh.py | 35 | # (c) 2014, Chris Church <chris@ninemoreminutes.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 lat... |
NemoNessuno/SecretSanta | refs/heads/master | admin.py | 1 | from flask import render_template, url_for, request
from flask_login import current_user
from werkzeug.utils import redirect
import helper.generic_helper as helper
from db_handler import db_session
from models import Round, Question, User, Participation, Description
def handle_admin():
rounds = db_session.query(... |
fangxingli/hue | refs/heads/master | desktop/core/ext-py/pycparser-2.14/pycparser/c_lexer.py | 42 | #------------------------------------------------------------------------------
# pycparser: c_lexer.py
#
# CLexer class: lexer for the C language
#
# Copyright (C) 2008-2015, Eli Bendersky
# License: BSD
#------------------------------------------------------------------------------
import re
import sys
from .ply imp... |
pyfirst/samplecode | refs/heads/master | 3_team/tests/unittest_sample_ng/tests.py | 4 | import unittest
class Test(unittest.TestCase):
def test_it(self):
import sample
value = sample.add(1, 1)
self.assertEqual(2, value)
|
nakagami/minitds | refs/heads/master | test_minitds.py | 1 | #!/usr/bin/env python3
##############################################################################
# The MIT License (MIT)
#
# Copyright (c) 2016-2020 Hajime Nakagami
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"... |
wemanuel/smry | refs/heads/master | smry/server-auth/ls/google-cloud-sdk/.install/.backup/lib/googlecloudsdk/core/util/version.py | 4 | # Copyright 2015 Google Inc. All Rights Reserved.
"""To determine the version of Python used."""
import sys
IS_ON_PYTHON26 = False
if sys.version_info[:2] < (2, 7):
IS_ON_PYTHON26 = True
|
LawrenceHan/thefuck | refs/heads/master | thefuck/utils.py | 11 | from difflib import get_close_matches
from functools import wraps
import shelve
from warnings import warn
from decorator import decorator
from contextlib import closing
import os
import pickle
import re
from inspect import getargspec
from pathlib import Path
import pkg_resources
import six
from .conf import settings
... |
technologiescollege/Blockly-rduino-communication | refs/heads/master | scripts_XP/Lib/site-packages/txaio/interfaces.py | 4 | ###############################################################################
#
# The MIT License (MIT)
#
# Copyright (c) Crossbar.io Technologies GmbH
#
# 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 ... |
munhanha/mtg-random | refs/heads/master | django/contrib/contenttypes/generic.py | 155 | """
Classes allowing "generic" relations through ContentType and object-id fields.
"""
from django.core.exceptions import ObjectDoesNotExist
from django.db import connection
from django.db.models import signals
from django.db import models, router, DEFAULT_DB_ALIAS
from django.db.models.fields.related import RelatedFi... |
acislab/HuMaIN_Microservices | refs/heads/master | OCRopyServices/SegmentationService/ocrolib/sl.py | 16 | ################################################################
### utilities for lists of slices, treating them like rectangles
################################################################
import numpy
from pylab import mean
### inquiry functions
def is_slices(u):
for s in u:
if type(s)!=slice: ret... |
web30s/odoo-9.0c-20160402 | refs/heads/master | hello/templates/openerp/addons/mail/tests/test_message_read.py | 45 | # -*- coding: utf-8 -*-
from .common import TestMail
from openerp.tools import mute_logger
class TestMessageRead(TestMail):
@mute_logger('openerp.addons.mail.models.mail_mail')
def setUp(self):
super(TestMessageRead, self).setUp()
self.user_employee.write({'notify_email': 'none'})
se... |
mpiplani/Online-Pharmacy | refs/heads/master | online_pharmacy/customer/models.py | 2 | from django.db import models
class customer(models.Model):
username = models.CharField(primary_key=True, max_length=20)
password = models.CharField(max_length=20)
fname=models.CharField(max_length=100)
lname = models.CharField(max_length=100)
age = models.IntegerField()
email = models.EmailFiel... |
brianjgeiger/osf.io | refs/heads/develop | api/institutions/__init__.py | 12133432 | |
larsks/ansible-modules-core | refs/heads/devel | cloud/__init__.py | 12133432 | |
uclouvain/osis | refs/heads/dev | program_management/ddd/service/__init__.py | 12133432 | |
opendatapress/open_data_press | refs/heads/master | lib/apiclient/__init__.py | 46 | __version__ = "1.1"
|
jruben/jruben.github.io | refs/heads/master | node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/formatters/_mapping.py | 263 | # -*- coding: utf-8 -*-
"""
pygments.formatters._mapping
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Formatter mapping defintions. This file is generated by itself. Everytime
you change something on a builtin formatter defintion, run this script from
the formatters folder to update it.
Do not alter the FORMA... |
sklam/numba | refs/heads/master | numba/cuda/__init__.py | 7 | from numba import runtests
from numba.core import config
if config.ENABLE_CUDASIM:
from .simulator_init import *
else:
from .device_init import *
from .device_init import _auto_device
from numba.cuda.compiler import compile_ptx, compile_ptx_for_current_device
def test(*args, **kwargs):
if not is_avai... |
Akrog/cinder | refs/heads/master | cinder/tests/test_hp_msa.py | 5 | # (c) Copyright 2014 Objectif Libre
#
# 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... |
thesuperzapper/tensorflow | refs/heads/master | tensorflow/contrib/learn/python/learn/learn_io/graph_io.py | 10 | # 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... |
xombiemp/CouchPotatoServer | refs/heads/master | libs/apscheduler/jobstores/ram_store.py | 117 | """
Stores jobs in an array in RAM. Provides no persistence support.
"""
from apscheduler.jobstores.base import JobStore
class RAMJobStore(JobStore):
def __init__(self):
self.jobs = []
def add_job(self, job):
self.jobs.append(job)
def update_job(self, job):
pass
def remove_... |
Lujeni/ansible | refs/heads/devel | lib/ansible/modules/windows/win_dsc.py | 16 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2015, Trond Hindenes <trond@hindenes.com>, and others
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'metadata_version': '1.1',
'statu... |
nanshihui/PocCollect | refs/heads/master | middileware/glassfish/glassfish_crackpass.py | 1 | #coding:utf-8
from t import T
import urllib2
class P(T):
def __init__(self):
T.__init__(self)
def verify(self,head='',context='',ip='',port='',productname={},keywords='',hackinfo=''):
timeout=3
target_url = 'http://'+ip+':'+port
result = {}
result['result']=False
... |
pymir3/pymir3 | refs/heads/master | mir3/data/score.py | 1 | import mir3.data.data_object as do
import mir3.data.metadata as md
import mir3.data.note as note
class Score(do.DataObject):
"""Set of notes from an instrument.
Any source of notes, either from the user or some algorithm, creates a score
so that evaluation algorithms can compare them freely. We have sets ... |
shepdelacreme/ansible | refs/heads/devel | test/units/modules/network/slxos/test_slxos_facts.py | 30 | #
# (c) 2018 Extreme Networks 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.
#
# Ans... |
cedriclaunay/gaffer | refs/heads/master | python/GafferCortexTest/OpHolderTest.py | 3 | ##########################################################################
#
# Copyright (c) 2011-2012, John Haddon. All rights reserved.
# Copyright (c) 2011, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided ... |
cnsoft/kbengine-cocos2dx | refs/heads/cocos2dx-cnsoft | demo/res/scripts/client/interfaces/__init__.py | 22 | # -*- coding: utf-8 -*-
#
"""
"""
from KBEDebug import *
|
skycucumber/xuemc | refs/heads/master | python/venv/lib/python2.7/site-packages/SOAPpy/__init__.py | 294 |
ident = '$Id: __init__.py 541 2004-01-31 04:20:06Z warnes $'
from version import __version__
from Client import *
from Config import *
from Errors import *
from NS import *
from Parser import *
from SOAPBuilder import *
from Server import *
from Types import *
from Utilities ... |
ojengwa/talk | refs/heads/master | venv/lib/python2.7/site-packages/django/conf/locale/ro/formats.py | 83 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y'
TIME_FORMAT = 'H:i:s'
DATE... |
htzy/bigfour | refs/heads/master | openedx/core/djangoapps/credit/tests/__init__.py | 12133432 | |
siliconsmiley/QGIS | refs/heads/master | python/plugins/processing/algs/saga/__init__.py | 12133432 | |
ArrenH/Securitas | refs/heads/master | symantec_package/lib/allServices/__init__.py | 12133432 | |
sachinkum/Bal-Aveksha | refs/heads/master | WebServer/BalAvekshaEnv/lib/python3.5/site-packages/django/contrib/gis/management/commands/ogrinspect.py | 48 | import argparse
from django.contrib.gis import gdal
from django.core.management.base import BaseCommand, CommandError
from django.utils.inspect import get_func_args
class LayerOptionAction(argparse.Action):
"""
Custom argparse action for the `ogrinspect` `layer_key` keyword option
which may be an integer... |
googleapis/googleapis-gen | refs/heads/master | google/cloud/bigquery/storage/v1/bigquery-storage-v1-py/google/cloud/bigquery_storage_v1/types/arrow.py | 1 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
plusplus7/KyrinBox | refs/heads/master | src/test/test_set_keyinfo.py | 1 | import test_sdk
import upload_chunk_file_pb2 as ucf
def main():
request = ucf.SetFileKeyInfo()
request.account = "plusplus7"
request.file_name = "sssogs"
request.file_hosts.append("2332323")
request.file_size = 233
request.merkle_sha1 = "sha1"
request.key_aes ... |
groschovskiy/keyczar | refs/heads/master | cpp/src/tools/scons/scons-local-1.2.0.d20090223/SCons/Memoize.py | 19 | #
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation
#
# 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 limitati... |
brunotougeiro/python | refs/heads/master | CPUWidgetMonitor/main.py | 2 | #!/usr/bin/env python3
from kivy.uix.stacklayout import StackLayout
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.progressbar import ProgressBar
from kivy.config import Config
Config.set('graphics', 'width', '350')
Config.set('graphics', 'height', '200')
Builder.load_string('''
''')
class ... |
zqiang/TeamTalk | refs/heads/master | win-client/3rdParty/src/json/scons-tools/srcdist.py | 264 | import os
import os.path
from fnmatch import fnmatch
import targz
##def DoxyfileParse(file_contents):
## """
## Parse a Doxygen source file and return a dictionary of all the values.
## Values will be strings and lists of strings.
## """
## data = {}
##
## import shlex
## lex = shlex.shlex(instream = fil... |
gajim/gajim | refs/heads/master | gajim/gtk/xml_console.py | 1 | # This file is part of Gajim.
#
# Gajim 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; version 3 only.
#
# Gajim is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the... |
rcgee/oq-hazardlib | refs/heads/master | openquake/hazardlib/gsim/cauzzi_2014.py | 2 | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2014-2016 GEM Foundation
#
# OpenQuake 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 Licen... |
mmauroy/SickRage | refs/heads/master | lib/sqlalchemy/orm/query.py | 75 | # orm/query.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
"""The Query class and support.
Defines the :class:`.Query` class, the central
construct... |
MSeifert04/numpy | refs/heads/master | tools/swig/test/testVector.py | 5 | #! /usr/bin/env python
from __future__ import division, absolute_import, print_function
# System imports
from distutils.util import get_platform
import os
import sys
import unittest
# Import NumPy
import numpy as np
major, minor = [ int(d) for d in np.__version__.split(".")[:2] ]
if major == 0: BadListError = TypeE... |
edcast-inc/edx-platform-edcast | refs/heads/master | common/djangoapps/student/helpers.py | 14 | """Helpers for the student app. """
import time
from datetime import datetime
import urllib
from pytz import UTC
from django.utils.http import cookie_date
from django.conf import settings
from django.core.urlresolvers import reverse, NoReverseMatch
import third_party_auth
from verify_student.models import SoftwareSe... |
txemi/ansible | refs/heads/devel | lib/ansible/modules/storage/netapp/netapp_e_hostgroup.py | 63 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, NetApp, 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 op... |
krisys/django | refs/heads/master | tests/template_tests/filter_tests/test_slice.py | 428 | from django.template.defaultfilters import slice_filter
from django.test import SimpleTestCase
from django.utils.safestring import mark_safe
from ..utils import setup
class SliceTests(SimpleTestCase):
@setup({'slice01': '{{ a|slice:"1:3" }} {{ b|slice:"1:3" }}'})
def test_slice01(self):
output = sel... |
Mystler/ShadowCraft-Engine | refs/heads/legion | shadowcraft/calcs/rogue/Aldriana/__init__.py | 1 | #import copy
import gettext
import __builtin__
import math
from operator import add
from copy import copy
__builtin__._ = gettext.gettext
from shadowcraft.calcs.rogue import RogueDamageCalculator
from shadowcraft.core import exceptions
from shadowcraft.objects import modifiers
from shadowcraft.objects import procs
fr... |
scavarda/mysql-dbcompare | refs/heads/master | mysql-utilities-1.6.0/mysql/utilities/common/lock.py | 4 | #
# Copyright (c) 2011, 2012, 2013, Oracle and/or its affiliates. All rights
# reserved.
#
# 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; version 2 of the License.
#
# This program is distribut... |
javierlgroba/Eventer-gapp | refs/heads/master | djangoappengine/models.py | 12133432 | |
jallohm/django | refs/heads/master | tests/migrations/migrations_test_apps/unmigrated_app/__init__.py | 12133432 | |
iseppi/zookeepr | refs/heads/master | zk/model/lib/__init__.py | 12133432 | |
hobarrera/django | refs/heads/master | django/conf/locale/ca/__init__.py | 12133432 | |
vismartltd/edx-platform | refs/heads/master | cms/djangoapps/contentstore/views/tests/__init__.py | 12133432 | |
iivic/BoiseStateX | refs/heads/master | common/lib/xmodule/xmodule/partitions/tests/test_partitions.py | 46 | """
Test the partitions and partitions service
"""
from unittest import TestCase
from mock import Mock
from opaque_keys.edx.locations import SlashSeparatedCourseKey
from stevedore.extension import Extension, ExtensionManager
from xmodule.partitions.partitions import (
Group, UserPartition, UserPartitionError, No... |
DonaldMcRonald/SketchRecognitionWithTensorFlow | refs/heads/master | src/main/python/test3.py | 1 | import uuid
from generated_proto import sketch_pb2 as Sketch
from gui import plotter
from proto_decoder import proto_handler
def make_point(stroke, x, y):
point1 = Sketch.SrlPoint()
point1.id = str(uuid.uuid1())
point1.x = x
point1.y = y
point1.time = 0
stroke.points.extend([point1])
templat... |
tawsifkhan/scikit-learn | refs/heads/master | sklearn/ensemble/tests/test_partial_dependence.py | 365 | """
Testing for the partial dependence module.
"""
import numpy as np
from numpy.testing import assert_array_equal
from sklearn.utils.testing import assert_raises
from sklearn.utils.testing import if_matplotlib
from sklearn.ensemble.partial_dependence import partial_dependence
from sklearn.ensemble.partial_dependence... |
rosswhitfield/mantid | refs/heads/master | qt/python/mantidqt/widgets/test/test_jupyterconsole.py | 3 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
# ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.