repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
kobejean/tensorflow | refs/heads/master | tensorflow/contrib/boosted_trees/python/training/functions/gbdt_batch_test.py | 5 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
mjirayu/sit_academy | refs/heads/master | common/test/acceptance/tests/lms/test_lms_courseware_search.py | 36 | """
Test courseware search
"""
import json
from nose.plugins.attrib import attr
from ..helpers import UniqueCourseTest, remove_file
from ...pages.common.logout import LogoutPage
from ...pages.studio.utils import add_html_component, click_css, type_in_codemirror
from ...pages.studio.auto_auth import AutoAuthPage
from ... |
numenta/nupic.research | refs/heads/master | tests/unit/frameworks/dendrites/dendritric_layer_test.py | 2 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2020, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... |
abomyi/django | refs/heads/master | tests/generic_inline_admin/urls.py | 407 | from django.conf.urls import url
from . import admin
urlpatterns = [
url(r'^generic_inline_admin/admin/', admin.site.urls),
]
|
jarped/QGIS | refs/heads/master | python/plugins/processing/algs/qgis/SimplifyGeometries.py | 10 | # -*- coding: utf-8 -*-
"""
***************************************************************************
SimplifyGeometries.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
********************... |
benlangmuir/swift | refs/heads/master | utils/gyb_syntax_support/AvailabilityNodes.py | 12 | from Child import Child
from Node import Node # noqa: I201
AVAILABILITY_NODES = [
# availability-spec-list -> availability-entry availability-spec-list?
Node('AvailabilitySpecList', kind='SyntaxCollection',
element='AvailabilityArgument'),
# Wrapper for all the different entries that may occur i... |
akhilari7/pa-dude | refs/heads/master | lib/python2.7/site-packages/django/core/serializers/pyyaml.py | 439 | """
YAML serializer.
Requires PyYaml (http://pyyaml.org/), but that's checked for in __init__.
"""
import collections
import decimal
import sys
from io import StringIO
import yaml
from django.core.serializers.base import DeserializationError
from django.core.serializers.python import (
Deserializer as PythonDes... |
taylor-oconnell/PyFBA | refs/heads/working | PyFBA/metabolism/enzyme.py | 1 | """
The enzyme is responsible for running a reaction. It also connects our
reactions to a genome. We need to know which enzymes we have in the
genome we are investigating
"""
from . import Reaction
class Enzyme:
"""
The enzyme class has a few components:
* The subunit(s) that make up the enzyme
*... |
USGSDenverPychron/pychron | refs/heads/develop | pychron/options/iso_evo_views.py | 1 | # ===============================================================================
# Copyright 2015 Jake Ross
#
# 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... |
rajul/tardis | refs/heads/master | tardis/plasma/properties/plasma_input.py | 2 | import numpy as np
import pandas as pd
from tardis.plasma.properties.base import BasePlasmaProperty
__all__ = ['TRadiative', 'DilutionFactor', 'AtomicData', 'Abundance', 'Density',
'TimeExplosion', 'JBlues', 'LinkTRadTElectron', 'NLTESpecies',
'RadiationFieldCorrectionInput']
class Input(BasePla... |
SCOAP3/invenio | refs/heads/master | invenio/modules/deposit/testsuite/test_deposit_models.py | 12 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2014, 2015 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... |
GirlsCodePy/girlscode-coursebuilder | refs/heads/master | tests/functional/unit_header_footer.py | 4 | # Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... |
valentinmk/python-tarantool-benchmark-and-bootstrap | refs/heads/master | data_interface/postgres_driver.py | 1 | """Data interface class for PostgreSQL."""
import asyncpg
import logging
import random
import time
import ujson as json
class PostgresDriver:
"""Interface class to PostgreSQL database for stickers."""
def __init__(self, loop=None):
"""Initialize connection pool. Make sure that we run in same loop."""... |
holdlg/PythonScript | refs/heads/master | Python3/pymysql_db.py | 1 | import sys
import io
import pymysql
sys.stdout = io.TextIOWrapper(sys.stdout.detach(), encoding='utf-8')
sys.stdin = io.TextIOWrapper(sys.stdin.detach(), encoding='utf-8')
sys.stderr = io.TextIOWrapper(sys.stderr.detach(), encoding='utf-8')
connection = pymysql.connect(host='127.0.0.1', port=3306, user='root', password... |
rubo77/ffmap-backend | refs/heads/master | lib/nodelist.py | 8 | def export_nodelist(now, nodedb):
nodelist = list()
for node_id, node in nodedb["nodes"].items():
node_out = dict()
node_out["id"] = node_id
node_out["name"] = node["nodeinfo"]["hostname"]
if "location" in node["nodeinfo"]:
node_out["position"] = {"lat": node["nodei... |
chyeh727/django | refs/heads/master | tests/base/models.py | 430 | from __future__ import unicode_literals
from django.db import models
from django.utils import six
# The models definitions below used to crash. Generating models dynamically
# at runtime is a bad idea because it pollutes the app registry. This doesn't
# integrate well with the test suite but at least it prevents reg... |
MrNuggles/HeyBoet-Telegram-Bot | refs/heads/master | temboo/Library/Fitbit/Activities/LogActivity.py | 5 | # -*- coding: utf-8 -*-
###############################################################################
#
# LogActivity
# Log a new activity for a particular date.
#
# 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 thi... |
kfsone/tinker | refs/heads/master | python/humble.py | 1 | # Copyright (C) 2017 Oliver "kfsone" Smith <oliver@kfs.org>
# Provided under The MIT License -- see LICENSE.
from __future__ import absolute_import
from __future__ import with_statement
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
from restful import RE... |
amirouche/hivi.mx | refs/heads/master | hivimx/hivimx/urls.py | 1 | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^', include('front.urls')),
url(r'^admin/', include(admin.site.urls)... |
itslukej/thing | refs/heads/master | thingdb/encoder.py | 1 | try:
import cPickle as pickle
except ImportError:
import pickle
try:
from StringIO import StringIO as BytesIO
except ImportError:
from io import BytesIO
def enpickle(data):
f = BytesIO()
p = pickle.Pickler(f)
p.dump(data)
return f.getvalue()
def depickle(data):
f = BytesIO(data... |
czcorpus/kontext | refs/heads/master | lib/plugins/default_taghelper/loaders/positional.py | 1 | # Copyright (c) 2012 Charles University, Faculty of Arts,
# Institute of the Czech National Corpus
# Copyright (c) 2012 Tomas Machalek <tomas.machalek@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 publis... |
nirmeshk/oh-mainline | refs/heads/master | vendor/packages/sphinx/tests/util.py | 22 | # -*- coding: utf-8 -*-
"""
Sphinx test suite utilities
~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import sys
import StringIO
import tempfile
import shutil
import re
from codecs import open
try:
from fun... |
ardi69/pyload-0.4.10 | refs/heads/0.4.10 | lib/Python/Lib/PIL/TiffImagePlugin.py | 18 | #
# The Python Imaging Library.
# $Id$
#
# TIFF file handling
#
# TIFF is a flexible, if somewhat aged, image file format originally
# defined by Aldus. Although TIFF supports a wide variety of pixel
# layouts and compression methods, the name doesn't really stand for
# "thousands of incompatible file formats," it jus... |
bpradipt/rethinkdb | refs/heads/ppc64le | drivers/python/rethinkdb/_dump.py | 7 | #!/usr/bin/env python
'''`rethinkdb dump` creates an archive of data from a RethinkDB cluster'''
from __future__ import print_function
import datetime, optparse, os, platform, shutil, sys, tarfile, tempfile, time, traceback
from . import utils_common, net, _export
usage = "rethinkdb dump [-c HOST:PORT] [-p] [--pas... |
alqfahad/odoo | refs/heads/8.0 | addons/web_api/__openerp__.py | 384 | {
'name': 'OpenERP Web API',
'category': 'Hidden',
'description': """
Openerp Web API.
================
""",
'version': '2.0',
'depends': ['web'],
'installable': True,
'auto_install': False,
}
|
gonzafirewall/kivy | refs/heads/master | examples/canvas/texture.py | 40 | '''
Texture Wrapping and Coordinates Example
========================================
This example changes texture properties and the properties
of its containing rectangle. You should see some a multicolored
texture with sliders to the left and below and buttons at the
bottom of the screen. The image texture_example_... |
MartinHjelmare/home-assistant | refs/heads/dev | tests/components/luftdaten/__init__.py | 40 | """Define tests for the Luftdaten component."""
|
signalfuse/collectd-elasticsearch | refs/heads/master | tests/integration/sink.py | 1 | from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
import json
import signal
import threading
from time import time
# This module collects metrics from collectd and can echo them back out for
# making assertions on the collected metrics.
# Fake the /v1/collectd endpoint and just stick all of the metrics i... |
kirberich/djangae | refs/heads/master | djangae/contrib/contenttypes/migrations/0001_patch_contenttypes_migrations.py | 1 | # -*- coding: utf-8 -*-
import os
from importlib import import_module
from django.db import migrations
from django.db.migrations.loader import MigrationLoader
from django.db.migrations.operations.base import Operation
from djangae.contrib.contenttypes.models import SimulatedContentTypeManager
class PatchMigrationsOp... |
situx/tuxbot | refs/heads/master | horo.py | 1 | import urllib.request, urllib.error, urllib.parse
import sopel.module
import json
import time
germanmatch={"Wassermann":"aquarius","Fische":"pisces","Widder":"aries","Stier":"taurus","Zwillinge":"gemini","Krebs":"cancer","Loewe":"lion","Jungfrau":"virgin","Waage":"libra","Skorpion":"scorpio","Schuetze":"sagittarius","... |
Pirata-Repository/Pirata | refs/heads/master | plugin.video.movie25/resources/libs/documentaries/videodocumentaire.py | 3 | #-*- coding: utf-8 -*-
import urllib,urllib2,re,cookielib,string, urlparse,sys,os
import xbmc, xbmcgui, xbmcaddon, xbmcplugin,urlresolver
from resources.libs import main
#Mash Up - by Mash2k3 2012.
from t0mm0.common.addon import Addon
from resources.universal import playbackengine, watchhistory
addon_id = 'plugin.vi... |
fmfn/UnbalancedDataset | refs/heads/master | imblearn/pipeline.py | 1 | """
The :mod:`imblearn.pipeline` module implements utilities to build a
composite estimator, as a chain of transforms, samples and estimators.
"""
# Adapted from scikit-learn
# Author: Edouard Duchesnay
# Gael Varoquaux
# Virgile Fritsch
# Alexandre Gramfort
# Lars Buitinck
# C... |
mikewiebe-ansible/ansible | refs/heads/devel | lib/ansible/modules/cloud/ovirt/ovirt_affinity_label_info.py | 20 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (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
#... |
leppa/home-assistant | refs/heads/dev | homeassistant/components/onvif/__init__.py | 15 | """The onvif component."""
|
Trust-Code/connector-magento | refs/heads/8.0 | magentoerpconnect/unit/import_synchronizer.py | 8 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2013 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... |
dagwieers/ansible | refs/heads/devel | lib/ansible/modules/storage/purestorage/purefb_facts.py | 15 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2018, Simon Dodsley (simon@purestorage.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': '1.1... |
Evervolv/android_external_chromium_org | refs/heads/kitkat | build/linux/unbundle/replace_gyp_files.py | 31 | #!/usr/bin/env python
# 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.
"""
Replaces gyp files in tree with files from here that
make the build use system libraries.
"""
import optparse
import os.path
impo... |
rdio/sentry | refs/heads/rdio_sentry_6.4.4 | src/sentry/db/models/query.py | 1 | """
sentry.db.query
~~~~~~~~~~~~~~~
:copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.db import router, transaction, IntegrityError
from django.db.models.expressions import ExpressionNode
fro... |
RI-imaging/qpimage | refs/heads/master | examples/hologram_filters.py | 1 | """Hologram filter choice
There are several parameters that influence the quality of
phase and amplitude data retrieved from holograms. This example
demonstrates the advantages and disadvantages of a three
hologram filters in qpimage. For more information, please have
a look at :func:`qpimage.holo.get_field`.
Several... |
hackerbot/DjangoDev | refs/heads/master | tests/ordering/models.py | 66 | """
Specifying ordering
Specify default ordering for a model using the ``ordering`` attribute, which
should be a list or tuple of field names. This tells Django how to order
``QuerySet`` results.
If a field name in ``ordering`` starts with a hyphen, that field will be
ordered in descending order. Otherwise, it'll be ... |
xHeliotrope/injustice_dropper | refs/heads/master | env/lib/python3.4/site-packages/psycopg2/tests/test_bugX000.py | 81 | #!/usr/bin/env python
# bugX000.py - test for DateTime object allocation bug
#
# Copyright (C) 2007-2011 Federico Di Gregorio <fog@debian.org>
#
# psycopg2 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 Foundati... |
jjx02230808/project0223 | refs/heads/master | doc/sphinxext/numpy_ext/docscrape_sphinx.py | 408 | import re
import inspect
import textwrap
import pydoc
from .docscrape import NumpyDocString
from .docscrape import FunctionDoc
from .docscrape import ClassDoc
class SphinxDocString(NumpyDocString):
def __init__(self, docstring, config=None):
config = {} if config is None else config
self.use_plots... |
ToontownUprising/src | refs/heads/master | toontown/pets/PetshopGUI.py | 2 | from direct.directnotify import DirectNotifyGlobal
from direct.gui.DirectGui import *
from direct.showbase.DirectObject import DirectObject
from pandac.PandaModules import *
import random
import string
from toontown.fishing import FishSellGUI
from toontown.hood import ZoneUtil
from toontown.pets import Pet, PetConstan... |
holgerd77/django-dynamic-scraper | refs/heads/master | dynamic_scraper/south_migrations/0001_initial.py | 10 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'ScrapedObjClass'
db.create_table('dynamic_scraper_scrapedobjclass', (
('id', s... |
rnixx/kivy | refs/heads/master | kivy/core/window/window_sdl2.py | 1 | # found a way to include it more easily.
'''
SDL2 Window
===========
Windowing provider directly based on our own wrapped version of SDL.
TODO:
- fix keys
- support scrolling
- clean code
- manage correctly all sdl events
'''
__all__ = ('WindowSDL', )
from os.path import join
import sys
from typing... |
ynkjm/ryu | refs/heads/master | ryu/ofproto/inet.py | 38 | # This module is for backward compat
from ryu.lib.packet.in_proto import *
|
jianglu/mojo | refs/heads/master | mojo/devtools/common/android_gdb/remote_file_connection.py | 8 | # Copyright 2015 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 socket
import struct
class RemoteFileConnectionException(Exception):
def __init__(self, *args, **kwargs):
Exception.__init__(self, *args, **kw... |
cctaylor/googleads-python-lib | refs/heads/master | examples/dfp/v201502/placement_service/create_placements.py | 3 | #!/usr/bin/python
#
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... |
bpilania/SDNGini | refs/heads/master | frontend/src/gbuilder/Devices/Firewall.py | 5 | from Router import *
##
# Class: the firewall device. Not fully implemented yet
class Firewall(Router):
device_type="Firewall"
def __init__(self):
Device.__init__(self)
self.num_interface=0
self.interface=[]
self.con_int={}
self.next_interface_number=0
... |
FICTURE7/youtube-dl | refs/heads/master | youtube_dl/extractor/photobucket.py | 105 | from __future__ import unicode_literals
import json
import re
from .common import InfoExtractor
from ..compat import compat_urllib_parse_unquote
class PhotobucketIE(InfoExtractor):
_VALID_URL = r'http://(?:[a-z0-9]+\.)?photobucket\.com/.*(([\?\&]current=)|_)(?P<id>.*)\.(?P<ext>(flv)|(mp4))'
_TEST = {
... |
bartslinger/paparazzi | refs/heads/master | sw/tools/process_exif/process_exif.py | 84 | #!/usr/bin/python
#
# <message NAME="DC_SHOT" ID="110">
# <field TYPE="int16" NAME="photo_nr"/>
# <field UNIT="cm" TYPE="int32" NAME="utm_east"/>
# <field UNIT="cm" TYPE="int32" NAME="utm_north"/>
# <field UNIT="m" TYPE="float" NAME="z"/>
# <field TYPE="uint8" NAME="utm_zone"/>
... |
aperigault/ansible | refs/heads/devel | test/units/module_utils/net_tools/nios/test_api.py | 23 | # (c) 2018 Red Hat, Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import copy
from units.compat import unittest
from units.compat.mock import patch, MagicMock, Mock
from ansible.m... |
dulems/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/django/contrib/messages/tests/base.py | 104 | from django import http
from django.conf import settings, global_settings
from django.contrib.messages import constants, utils, get_level, set_level
from django.contrib.messages.api import MessageFailure
from django.contrib.messages.storage import default_storage, base
from django.contrib.messages.storage.base import M... |
aasoliz/Bitcoin-Statistics | refs/heads/master | venv/lib/python2.7/site-packages/migrate/tests/changeset/test_constraint.py | 46 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from sqlalchemy import *
from sqlalchemy.util import *
from sqlalchemy.exc import *
from migrate.changeset.util import fk_column_names
from migrate.exceptions import *
from migrate.changeset import *
from migrate.tests import fixture
class CommonTestConstraint(fixture.... |
Micronaet/micronaet-order | refs/heads/master | order_deliverable_line_fast/__openerp__.py | 1 | #!/usr/bin/python
# -*- coding: utf-8 -*-
###############################################################################
#
# ODOO (ex OpenERP)
# Open Source Management Solution
# Copyright (C) 2001-2015 Micronaet S.r.l. (<https://micronaet.com>)
# Developer: Nicola Riolini @thebrush (<https://it.linkedin.com/in/thebr... |
turbokongen/home-assistant | refs/heads/dev | homeassistant/components/blackbird/__init__.py | 36 | """The blackbird component."""
|
nagyistoce/geokey | refs/heads/master | geokey/projects/tests/test_manager.py | 1 | from django.test import TestCase
from django.contrib.auth.models import AnonymousUser
from django.core.exceptions import PermissionDenied
from geokey.users.tests.model_factories import UserF, UserGroupF
from .model_factories import ProjectF
from ..models import Project
class ProjectListTest(TestCase):
def setUp... |
doismellburning/edx-platform | refs/heads/master | common/lib/xmodule/xmodule/seq_module.py | 11 | """
xModule implementation of a learning sequence
"""
# pylint: disable=abstract-method
import json
import logging
import warnings
from lxml import etree
from xblock.core import XBlock
from xblock.fields import Integer, Scope, Boolean
from xblock.fragment import Fragment
from pkg_resources import resource_string
f... |
irvingprog/python-pilas-experimental | refs/heads/master | pilasengine/ejemplos/ejemplos_a_revisar/duplicar.py | 6 | import pilasengine
# Permite que este ejemplo funcion incluso si no has instalado pilas.
import sys
sys.path.insert(0, "..")
pilas = pilasengine.iniciar()
mono = pilas.actores.Mono()
otro = mono.duplicar(y=-150)
pilas.avisar("Duplicando actores.")
pilas.ejecutar()
|
DemocracyClub/EveryElection | refs/heads/master | every_election/apps/organisations/boundaries/management/commands/osni_import_lgd.py | 1 | from organisations.boundaries.management.base import BaseOsniCommand
from organisations.boundaries.osni import OsniLayer
from organisations.models import OrganisationGeography
class Command(BaseOsniCommand):
def handle(self, *args, **options):
url = "http://osni-spatial-ni.opendata.arcgis.com/datasets/a55... |
elba7r/lite-system | refs/heads/master | erpnext/utilities/doctype/address/address.py | 2 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import throw, _
from frappe.utils import cstr
from frappe.model.document import Document
from jinja2 import TemplateSyntaxEr... |
atassumer/fabric-bolt | refs/heads/master | src/fabric_bolt/projects/migrations/0007_auto__add_field_deployment_started.py | 18 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Deployment.started'
db.add_column(u'projects_deployment', 'started',
s... |
dsfsdgsbngfggb/odoo | refs/heads/8.0 | addons/payment/__openerp__.py | 315 | # -*- coding: utf-8 -*-
{
'name': 'Payment Acquirer',
'category': 'Hidden',
'summary': 'Payment Acquirer Base Module',
'version': '1.0',
'description': """Payment Acquirer Base Module""",
'author': 'OpenERP SA',
'depends': ['account'],
'data': [
'views/payment_acquirer.xml',
... |
J535D165/cbsodata | refs/heads/master | cbsodata/__main__.py | 1 | # Copyright (c) 2019 Jonathan de Bruin
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publ... |
Finntack/pootle | refs/heads/master | pootle/apps/pootle_store/migrations/0008_flush_django_cache.py | 10 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.management import call_command
from django.db import migrations
def flush_django_cache(apps, schema_editor):
call_command('flush_cache', '--django-cache')
class Migration(migrations.Migration):
dependencies = [
('poot... |
taotie12010/bigfour | refs/heads/master | common/djangoapps/xmodule_django/models.py | 89 | """
Useful django models for implementing XBlock infrastructure in django.
"""
import warnings
from django.db import models
from django.core.exceptions import ValidationError
from opaque_keys.edx.keys import CourseKey, UsageKey, BlockTypeKey
from south.modelsinspector import add_introspection_rules
class NoneToEmp... |
azon1272/War-for-cookies-v2 | refs/heads/master | autor.py | 1 | # -*- coding: utf-8 -*-
import pygame, os, lib
class autor():
def __init__(self):
pygame.init()
def background(self):
background = pygame.image.load('data/image/autors.png')#Фон!!!!!!!!!!!!!!!!!
self.screen=pygame.display.set_mode((1200,720))
self.screen.blit(background, (0,0))
... |
anryko/ansible | refs/heads/devel | lib/ansible/modules/network/fortios/fortios_system_replacemsg_sslvpn.py | 7 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... |
raxenak/borg | refs/heads/master | src/borg/testsuite/file_integrity.py | 6 |
import pytest
from ..crypto.file_integrity import IntegrityCheckedFile, DetachedIntegrityCheckedFile, FileIntegrityError
class TestReadIntegrityFile:
def test_no_integrity(self, tmpdir):
protected_file = tmpdir.join('file')
protected_file.write('1234')
assert DetachedIntegrityCheckedFile... |
GladeRom/android_external_chromium_org | refs/heads/gr-3.1 | third_party/google_appengine_cloudstorage/cloudstorage/test_utils.py | 248 | # Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... |
mancoast/CPythonPyc_test | refs/heads/master | fail/332_test_speedups.py | 60 | from test.json_tests import CTest
class TestSpeedups(CTest):
def test_scanstring(self):
self.assertEqual(self.json.decoder.scanstring.__module__, "_json")
self.assertIs(self.json.decoder.scanstring, self.json.decoder.c_scanstring)
def test_encode_basestring_ascii(self):
self.assertEqu... |
praneethkumarpidugu/matchmaking | refs/heads/master | lib/python2.7/site-packages/wheel/signatures/djbec.py | 566 | # Ed25519 digital signatures
# Based on http://ed25519.cr.yp.to/python/ed25519.py
# See also http://ed25519.cr.yp.to/software.html
# Adapted by Ron Garret
# Sped up considerably using coordinate transforms found on:
# http://www.hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html
# Specifically add-2008-hwcd-4 and d... |
code-google-com/cortex-vfx | refs/heads/master | test/IECoreHoudini/procedurals/meshRender/meshRender-1.py | 12 | #=====
#
# Copyright 2010 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios),
# its affiliates and/or its licensors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source cod... |
tody411/PyDriveEx | refs/heads/master | pydrive_ex/auth.py | 1 | # -*- coding: utf-8 -*-
## @package pydrive_ex.auth
#
# Simple extension of pydrive.auth utility package.
# @author tody
# @date 2016/03/15
import pydrive.auth
import os
## Simple extension of pydrive.auth.GoogleAuth.
#
# @param auth_dir directory to store client_secrets.json and credentials.json.... |
Ezhil-Language-Foundation/open-tamil | refs/heads/main | tests/keechu.py | 1 | # -*- coding: utf-8 -*-
# (C) 2015 Muthiah Annamalai
#
# This file is part of 'open-tamil' package tests
#
# setup the paths
from opentamiltests import *
# example keechu
from tamil.utf8 import get_letters
class Keechu(unittest.TestCase):
def test_words_to_letters(self):
k1 = u"இந்தக் குளிர்ல டெய்லி தலை... |
john2x/webassets | refs/heads/master | src/webassets/importlib.py | 23 | # From Python 2.7.
import sys
def _resolve_name(name, package, level):
"""Return the absolute name of the module to be imported."""
if not hasattr(package, 'rindex'):
raise ValueError("'package' not set to a string")
dot = len(package)
for x in range(level, 1, -1):
try:
dot... |
koorukuroo/networkx_for_unicode | refs/heads/master | build/lib/networkx/algorithms/centrality/eigenvector.py | 9 | """
Eigenvector centrality.
"""
# Copyright (C) 2004-2014 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
import networkx as nx
__author__ = "\n".join(['Aric Hagberg (aric.hagberg@gmail.com)',
... |
stonegithubs/odoo | refs/heads/8.0 | openerp/addons/test_limits/__init__.py | 2074 | # -*- coding: utf-8 -*-
import models
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
mattseymour/django | refs/heads/master | tests/migrations/test_migrations_squashed_extra/0001_initial.py | 408 | from django.db import migrations
class Migration(migrations.Migration):
pass
|
lchloride/query_whois_info | refs/heads/master | BaseThread.py | 1 | from time import ctime
import threading
from log import Log
class BaseThread(threading.Thread):
def __init__(self, func, args, name=''):
threading.Thread.__init__(self)
self.name = name
self.func = func
self.args = args
self.res = None
self.logger = Log.get_instance... |
log2timeline/plaso | refs/heads/main | tests/output/dynamic.py | 3 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests for the dynamic output module."""
import io
import os
import unittest
from plaso.lib import definitions
from plaso.output import dynamic
from tests.containers import test_lib as containers_test_lib
from tests.output import test_lib
class DynamicFieldFormattin... |
opcoder/zh_ptr | refs/heads/master | petrarch2/logger.py | 1 | #encoding:utf8
import logging
import logging.handlers
from logging import *
from datetime import *
logger = logging.getLogger('ptr')
logger.setLevel(logging.DEBUG)
# rht = logging.handlers.TimedRotatingFileHandler("reindex_out.log", 'D')
rht = logging.StreamHandler()
fmt = logging.Formatter("%(asctime)s %(filename)s:... |
rmk135/objects | refs/heads/master | tests/unit/providers/test_selector_py2_py3.py | 1 | """Dependency injector selector provider unit tests."""
import functools
import itertools
import sys
import unittest2 as unittest
from dependency_injector import providers, errors
class SelectorTests(unittest.TestCase):
selector = providers.Configuration()
def test_is_provider(self):
self.assertT... |
devendermishrajio/nova_test_latest | refs/heads/master | nova/tests/unit/compute/monitors/test_monitors.py | 18 | # Copyright 2013 Intel Corporation
# 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 require... |
debugger24/Instagram-Image-Downloader | refs/heads/master | main.py | 1 | import requests
from requests.auth import HTTPBasicAuth
from bs4 import BeautifulSoup
import re
import os
import json
import sqlite3
EMAIL = ""
PASSWORD = ""
with requests.Session() as r:
i = 0
deepSearch = False
def toggleDeepSearch(status):
global deepSearch
deepSearch = status
de... |
leth/nose2 | refs/heads/master | nose2/plugins/junitxml.py | 1 | """
Output test reports in junit-xml format.
This plugin implements :func:`startTest`, :func:`testOutcome` and
:func:`stopTestRun` to compile and then output a test report in
junit-xml format. By default, the report is written to a file called
``nose2-junit.xml`` in the current working directory. You can
configure the... |
hlzz/dotfiles | refs/heads/master | graphics/VTK-7.0.0/ThirdParty/Twisted/twisted/scripts/test/__init__.py | 2 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Test package for L{twisted.scripts}.
"""
|
jakereps/qiime-workshops | refs/heads/master | config/settings/__init__.py | 9 | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2018, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... |
PierreGUI/App | refs/heads/master | plugins/ti.alloy/plugin.py | 1729 | import os, sys, subprocess, hashlib
import subprocess
def check_output(*popenargs, **kwargs):
r"""Run command with arguments and return its output as a byte string.
Backported from Python 2.7 as it's implemented as pure python on stdlib.
>>> check_output(['/usr/bin/python', '--version'])
Python 2.6.... |
Antiun/yelizariev-addons | refs/heads/8.0 | product_tags/__openerp__.py | 17 | # -*- coding: utf-8 -*-
#################################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Julius Network Solutions SARL <contact@julius.fr>
# Copyright (C) 2015 credativ ltd. <info@credativ.co.uk>
#
# This program is free soft... |
yemahuang/OpenBird | refs/heads/master | cocos2d/tools/bindings-generator/clang/enumerations.py | 307 | #===- enumerations.py - Python Enumerations ------------------*- python -*--===#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===--------------------------------------------------------------... |
Azure/azure-sdk-for-python | refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline | sdk/storage/azure-storage-blob/samples/blob_samples_authentication_async.py | 1 | # coding: utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------... |
dawnpower/nova | refs/heads/master | nova/tests/unit/console/test_rpcapi.py | 58 | # Copyright 2012, 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 agr... |
xindus40223115/w16b_test | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/unittest/test/support.py | 770 | import unittest
class TestEquality(object):
"""Used as a mixin for TestCase"""
# Check for a valid __eq__ implementation
def test_eq(self):
for obj_1, obj_2 in self.eq_pairs:
self.assertEqual(obj_1, obj_2)
self.assertEqual(obj_2, obj_1)
# Check for a valid __ne__ impl... |
tobspr/panda3d | refs/heads/master | direct/src/particles/ParticleEffect.py | 8 |
from panda3d.core import *
# Leave these imports in, they may be used by ptf files.
from panda3d.physics import *
from . import Particles
from . import ForceGroup
from direct.directnotify import DirectNotifyGlobal
class ParticleEffect(NodePath):
notify = DirectNotifyGlobal.directNotify.newCategory('ParticleEffe... |
beck/django | refs/heads/master | django/db/backends/sqlite3/features.py | 151 | from __future__ import unicode_literals
from django.db import utils
from django.db.backends.base.features import BaseDatabaseFeatures
from django.utils import six
from django.utils.functional import cached_property
from .base import Database
try:
import pytz
except ImportError:
pytz = None
class DatabaseFe... |
admetricks/phantomjs | refs/heads/master | test/www/status.py | 101 | import cStringIO as StringIO
import urlparse
def handle_request(req):
url = urlparse.urlparse(req.path)
body = "<!doctype html><h1>Status: {}</h1>".format(url.query)
req.send_response(int(url.query))
req.send_header('Content-Type', 'text/html')
req.send_header('Content-Length', str(len(body)))
... |
chaffra/sympy | refs/heads/master | sympy/parsing/maxima.py | 105 | from __future__ import print_function, division
import re
from sympy import sympify, Sum, product, sin, cos
class MaximaHelpers:
def maxima_expand(expr):
return expr.expand()
def maxima_float(expr):
return expr.evalf()
def maxima_trigexpand(expr):
return expr.expand(trig=True)
... |
dnlm92/chokoretto | refs/heads/master | temp/venv/lib/python2.7/site-packages/werkzeug/security.py | 148 | # -*- coding: utf-8 -*-
"""
werkzeug.security
~~~~~~~~~~~~~~~~~
Security related helpers such as secure password hashing tools.
:copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import os
import hmac
import hashlib
import posi... |
schristiaens/raft | refs/heads/master | thirdparty/pyamf/pyamf/adapters/_django_contrib_auth_models.py | 39 | """
"""
from django.contrib.auth import models
import pyamf.adapters
models.User.__amf__ = {
'exclude': ('message_set', 'password'),
'readonly': ('username',)
}
# ensure that the adapter that we depend on is loaded ..
pyamf.adapters.get_adapter('django.db.models.base')
pyamf.register_package(models, model... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.