repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
ddico/odoo | refs/heads/master | setup/odoo-wsgi.example.py | 28 | # WSGI Handler sample configuration file.
#
# Change the appropriate settings below, in order to provide the parameters
# that would normally be passed in the command-line.
# (at least conf['addons_path'])
#
# For generic wsgi handlers a global application is defined.
# For uwsgi this should work:
# $ uwsgi_python --... |
arnaud-morvan/QGIS | refs/heads/master | python/plugins/processing/algs/qgis/PostGISExecuteAndLoadSQL.py | 10 | # -*- coding: utf-8 -*-
"""
***************************************************************************
PostGISExecuteAndLoadSQL.py
---------------------
Date : May 2018
Copyright : (C) 2018 by Anita Graser
Email : anitagraser at gmx dot at
------------... |
yedidiaklein/moodle-local_video_directory | refs/heads/master | classes/task/googleSpeech/google/protobuf/python/compatibility_tests/v2.5.0/tests/__init__.py | 401 | try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
|
jjs0sbw/CSPLN | refs/heads/master | apps/scaffolding/win/web2py/gluon/contrib/login_methods/oauth20_account.py | 22 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Written by Michele Comitini <mcm@glisco.it>
License: LGPL v3
Adds support for OAuth 2.0 authentication to web2py.
OAuth 2.0 spec: http://tools.ietf.org/html/rfc6749
"""
import time
import cgi
import urllib2
from urllib import urlencode
from gluon import current, ... |
Teagan42/home-assistant | refs/heads/dev | homeassistant/components/vultr/switch.py | 7 | """Support for interacting with Vultr subscriptions."""
import logging
import voluptuous as vol
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchDevice
from homeassistant.const import CONF_NAME
import homeassistant.helpers.config_validation as cv
from . import (
ATTR_ALLOWED_BANDWIDTH,
ATTR... |
Maximilian-Reuter/SickRage | refs/heads/master | lib/unidecode/x018.py | 252 | data = (
' @ ', # 0x00
' ... ', # 0x01
', ', # 0x02
'. ', # 0x03
': ', # 0x04
' // ', # 0x05
'', # 0x06
'-', # 0x07
', ', # 0x08
'. ', # 0x09
'', # 0x0a
'', # 0x0b
'', # 0x0c
'', # 0x0d
'', # 0x0e
'[?]', # 0x0f
'0', # 0x10
'1', # 0x11
'2', # 0x12
'3', # 0x13
'... |
axbaretto/beam | refs/heads/master | sdks/python/.tox/docs/lib/python2.7/site-packages/google/protobuf/internal/encoder.py | 90 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redi... |
anhstudios/swganh | refs/heads/develop | data/scripts/templates/object/building/poi/shared_creature_lair_forest_sacrifice_beast.py | 2 | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Building()
result.template = "object/building/poi/shared_creature_lair_forest_sacrifice_beast.iff"
result.attribu... |
akosel/incubator-airflow | refs/heads/master | airflow/hooks/S3_hook.py | 2 | # -*- coding: utf-8 -*-
#
# 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
#... |
lair-framework/drone-whois | refs/heads/master | drone-whois/__init__.py | 21 | __author__ = 'tom'
|
szymex/xbmc-finnish-tv | refs/heads/master | plugin.video.ruutu/html5lib/filters/optionaltags.py | 1727 | from __future__ import absolute_import, division, unicode_literals
from . import _base
class Filter(_base.Filter):
def slider(self):
previous1 = previous2 = None
for token in self.source:
if previous1 is not None:
yield previous2, previous1, token
previous2... |
bdoner/SickRage | refs/heads/master | sickbeard/clients/rtorrent_client.py | 15 | # Author: jkaberg <joel.kaberg@gmail.com>, based on fuzemans work (https://github.com/RuudBurger/CouchPotatoServer/blob/develop/couchpotato/core/downloaders/rtorrent/main.py)
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of SickRage.
#
# SickRage is free software: you can redistribute it and/or modif... |
bcornwellmott/erpnext | refs/heads/develop | erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.py | 56 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class PaymentEntryReference(Document):
pass
|
guijomatos/SickRage | refs/heads/master | lib/pyasn1/codec/ber/eoo.py | 407 | from pyasn1.type import base, tag
class EndOfOctets(base.AbstractSimpleAsn1Item):
defaultValue = 0
tagSet = tag.initTagSet(
tag.Tag(tag.tagClassUniversal, tag.tagFormatSimple, 0x00)
)
endOfOctets = EndOfOctets()
|
snowch/todo-ng-pouchdb | refs/heads/master | node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/MSVSUserFile.py | 2710 | # 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.
"""Visual Studio user preferences file writer."""
import os
import re
import socket # for gethostname
import gyp.common
import gyp.easy_xml as easy_xml
#------... |
facebookexperimental/eden | refs/heads/master | eden/hg-server/edenscm/mercurial/winutil.py | 2 | # Portions Copyright (c) Facebook, Inc. and its affiliates.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2.
# Copyright (c) Mercurial Contributors.
# This software may be used and distributed according to the terms of the
# GNU General Public License ... |
davidt/reviewboard | refs/heads/master | reviewboard/reviews/markdown_utils.py | 2 | from __future__ import unicode_literals
import warnings
from django.core.exceptions import ObjectDoesNotExist
from django.db.models import Model
from django.utils.html import escape
from djblets import markdown as djblets_markdown
from djblets.siteconfig.models import SiteConfiguration
from markdown import markdown
... |
sololuz/cibb-web | refs/heads/master | app/core/utils/date.py | 1 | from datetime import datetime, timedelta
from django.utils.timezone import utc
def now():
""" returns the current date and time in UTC format (datetime object) """
return datetime.utcnow().replace(tzinfo=utc)
def now_after(**kwargs):
""" returns the current date and time plus the time (seconds, minutes,... |
lmazuel/azure-sdk-for-python | refs/heads/master | azure-mgmt-datafactory/azure/mgmt/datafactory/models/odbc_linked_service.py | 1 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... |
gdgellatly/OCB1 | refs/heads/7.0 | openerp/workflow/instance.py | 61 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... |
shodoco/bcc | refs/heads/master | examples/tracing/strlen_hist.py | 4 | #!/usr/bin/python
#
# strlen_hist.py Histogram of system-wide strlen return values
#
# A basic example of using uprobes along with a histogram to show
# distributions.
#
# Runs until ctrl-c is pressed.
#
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
#
# Example outp... |
eunchong/build | refs/heads/master | scripts/common/archive_utils_unittest.py | 2 | #!/usr/bin/env python
# Copyright (c) 2012 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 optparse
import os
import shutil
import sys
import tempfile
import unittest
import zipfile
BASE_DIR = os.path.join(
os.... |
gioman/QGIS | refs/heads/master | python/plugins/processing/algs/qgis/ExtentFromLayer.py | 1 | # -*- coding: utf-8 -*-
"""
***************************************************************************
ExtentFromLayer.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
***********************... |
drakuna/odoo | refs/heads/master | addons/purchase/migrations/9.0.1.2/pre-create-properties.py | 101 | # -*- coding: utf-8 -*-
def convert_field(cr, model, field, target_model):
table = model.replace('.', '_')
cr.execute("""SELECT 1
FROM information_schema.columns
WHERE table_name = %s
AND column_name = %s
""", (table, field))
if no... |
xq262144/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/django/contrib/gis/tests/geo3d/tests.py | 109 | from __future__ import absolute_import, unicode_literals
import os
import re
from django.contrib.gis.gdal import HAS_GDAL
from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.tests.utils import postgis
from django.test import TestCase
from django.utils._os import upath
from django.utils.unittest impor... |
chiefspace/udemy-rest-api | refs/heads/master | udemy_rest_api_section6/env/lib/python3.4/site-packages/setuptools/script template.py | 486 | # EASY-INSTALL-SCRIPT: %(spec)r,%(script_name)r
__requires__ = """%(spec)r"""
import pkg_resources
pkg_resources.run_script("""%(spec)r""", """%(script_name)r""")
|
rubyinhell/brython | refs/heads/master | www/src/Lib/test/double_const.py | 203 | from test.support import TestFailed
# A test for SF bug 422177: manifest float constants varied way too much in
# precision depending on whether Python was loading a module for the first
# time, or reloading it from a precompiled .pyc. The "expected" failure
# mode is that when test_import imports this after all .py... |
richardcs/ansible | refs/heads/devel | lib/ansible/modules/cloud/cloudstack/cs_portforward.py | 73 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, René Moser <mail@renemoser.net>
# 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',
... |
essanpupil/cashflow | refs/heads/master | cash/urls.py | 1 | from django.conf.urls import url
from . import views
app_name = 'cash'
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^new_activity$', views.NewActivity.as_view(), name='new_activity'),
url(r'^activity_list$', views.ActivityList.as_view(), name='activity_list'),
]
|
hurricup/intellij-community | refs/heads/master | python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicateKWArg_after.py | 80 |
def foo(**args):
pass
a = {}
b = {}
foo(**a)
|
savi-dev/horizon | refs/heads/master | horizon/conf/panel_template/urls.py | 46 | from django.conf.urls.defaults import patterns, url
from .views import IndexView
urlpatterns = patterns('',
url(r'^$', IndexView.as_view(), name='index'),
)
|
sbidoul/odoo | refs/heads/8.0 | addons/crm/wizard/crm_phonecall_to_phonecall.py | 337 | # -*- 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... |
zchq88/DLminiProject | refs/heads/master | sentiment_network/Sentiment Classification.py | 1 | # 定义如何显示评论
def pretty_print_review_and_label(i):
print(labels[i] + "\t:\t" + reviews[i][:80] + "...")
# What we know!获取评论数据
g = open('reviews.txt', 'r')
reviews = list(map(lambda x: x[:-1], g.readlines()))
g.close()
# What we WANT to know!获取评价数据
g = open('labels.txt', 'r')
labels = list(map(lambda x: x[:-1].upper... |
dario61081/koalixcrm | refs/heads/master | koalixcrm/crm/factories/factory_purchase_order.py | 2 | # -*- coding: utf-8 -*-
import factory
from koalixcrm.crm.models import PurchaseOrder
from koalixcrm.crm.factories.factory_supplier import StandardSupplierFactory
from koalixcrm.crm.factories.factory_sales_document import StandardSalesDocumentFactory
class StandardPurchaseOrderFactory(StandardSalesDocumentFactory):
... |
rushiagr/keystone | refs/heads/master | keystone/contrib/ec2/routers.py | 22 | # Copyright 2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... |
LouTheBrew/troposphere | refs/heads/master | troposphere/redshift.py | 20 | # Copyright (c) 2014, Guillem Anguera <ganguera@gmail.com>
# All rights reserved.
#
# See LICENSE file for full license.
from . import AWSObject, AWSProperty
from .validators import boolean, integer
class Cluster(AWSObject):
resource_type = "AWS::Redshift::Cluster"
props = {
'AllowVersionUpgrade': (... |
Arcanfel/whatToPlay | refs/heads/master | settings.py | 1 | # Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
carloscrespog/HookTemperature | refs/heads/master | node_modules/hook.io/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/generator/gypd.py | 912 | # Copyright (c) 2011 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.
"""gypd output module
This module produces gyp input as its output. Output files are given the
.gypd extension to avoid overwriting the .gyp files that they are ... |
curtisstpierre/django | refs/heads/master | tests/i18n/patterns/urls/disabled.py | 499 | from django.conf.urls import url
from django.conf.urls.i18n import i18n_patterns
from django.views.generic import TemplateView
view = TemplateView.as_view(template_name='dummy.html')
urlpatterns = i18n_patterns(
url(r'^prefixed/$', view, name='prefixed'),
)
|
akurtakov/Pydev | refs/heads/master | plugins/org.python.pydev.refactoring/tests/python/codegenerator/constructorfield/testConstructorField2.py | 8 | class A:
try:
print "foo"
finally:
print "done."
attribute = "hello"
def my_method(self):
print self.attribute
a = A()
a.my_method()
##c
'''
<config>
<classSelection>0</classSelection>
<attributeSelection>
<int>0</int>
</attributeSelection>
<offs... |
0000-bigtree/construct | refs/heads/master | construct/protocols/layer3/icmpv4.py | 9 | """
Internet Control Message Protocol for IPv4 (TCP/IP protocol stack)
"""
from construct import *
from ipv4 import IpAddress
from binascii import unhexlify
import six
echo_payload = Struct("echo_payload",
UBInt16("identifier"),
UBInt16("sequence"),
Bytes("data", 32), # length is implementation dependent.... |
krafczyk/spack | refs/heads/develop | lib/spack/spack/util/log_parse.py | 4 | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... |
sicekit/sicekit | refs/heads/master | robots/login.py | 1 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Script to log the robot in to a wiki account.
Suggestion is to make a special account to use for robot use only. Make
sure this robot account is well known on your home wikipedia before using.
Parameters:
-all Try to log in on all sites where a username is d... |
utecuy/edx-platform | refs/heads/master | common/lib/xmodule/xmodule/tests/test_bulk_assertions.py | 173 | import ddt
import itertools
from xmodule.tests import BulkAssertionTest, BulkAssertionError
STATIC_PASSING_ASSERTIONS = (
('assertTrue', True),
('assertFalse', False),
('assertIs', 1, 1),
('assertEqual', 1, 1),
('assertEquals', 1, 1),
('assertIsNot', 1, 2),
('assertIsNone', None),
('as... |
xiaoyongaa/ALL | refs/heads/master | 网络编程第四周/cash.py | 1 | import os
stat=os.stat("G:\疾风之刃").st_size
print(stat)
|
shakamunyi/nova | refs/heads/master | nova/virt/xenapi/host.py | 2 | # Copyright (c) 2012 Citrix Systems, Inc.
# Copyright 2010 OpenStack Foundation
#
# 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... |
shinyvince/augmented-traffic-control | refs/heads/master | atc/django-atc-demo-ui/atc_demo_ui/views.py | 18 | #
# Copyright (c) 2014, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
#
#
from atc_demo_ui.setti... |
SanketDG/coala | refs/heads/master | coalib/bearlib/aspects/Smell.py | 4 | from coalib.bearlib.aspects import Taste, Root
@Root.subaspect
class Smell:
"""
Symptom in a piece of code that possibly indicates a deeper problem.
`Smells` are certain structures in a code that indicate violation of
fundamental design principles. They are usually not bugs; they are not
technica... |
google-research/dreamer | refs/heads/master | dreamer/control/random_episodes.py | 1 | # Copyright 2019 The Dreamer 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 applicabl... |
lmazuel/azure-sdk-for-python | refs/heads/master | azure-mgmt-monitor/setup.py | 1 | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... |
santidediego/LearningDjango | refs/heads/master | lib/python3.5/site-packages/django/core/cache/backends/filebased.py | 428 | "File-based cache backend"
import errno
import glob
import hashlib
import io
import os
import random
import tempfile
import time
import zlib
from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache
from django.core.files.move import file_move_safe
from django.utils.encoding import force_bytes
try:
f... |
dmitry-sobolev/ansible | refs/heads/devel | lib/ansible/plugins/cache/memcached.py | 79 | # (c) 2014, Brian Coca, Josh Drake, et al
#
# 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.
... |
castroflavio/ryu | refs/heads/master | ryu/tests/mininet/l3/icmp/test_icmp.py | 63 | # Copyright (C) 2012 Nippon Telegraph and Telephone Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
vornne/pw_module_system | refs/heads/pw | header_debug.py | 3 | from header_common import reg
from header_operations import *
import header_lazy_evaluation as lazy
####################################################################################################################
# Short helper functions to generate operations for displaying debugging output.
#####################... |
ratnania/caid | refs/heads/master | caid/boxsplines/mesh.py | 1 | import numpy as np
from numpy import array, asarray, pi, sin, cos
import matplotlib.pyplot as plt
from scipy.spatial import Delaunay
nm = 2
ni = 6
radius = 1.
angle = pi / 3.
center = array([0,0])
centers = [center]
points = []
def create_points(X, pts):
for m in range(1, nm):
for i in range(0, ni):
... |
bacaldwell/ironic | refs/heads/master | ironic/objects/fields.py | 7 | # Copyright 2015 Red Hat, 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... |
ansible/ansible-modules-core | refs/heads/devel | cloud/rackspace/rax_cbs.py | 25 | #!/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... |
jerrylei98/Dailydos | refs/heads/master | venv/lib/python2.7/site-packages/wheel/__init__.py | 219 | # __variables__ with double-quoted values will be available in setup.py:
__version__ = "0.24.0"
|
CouchPotato/CouchPotatoV1 | refs/heads/master | cherrypy/process/win32.py | 93 | """Windows service. Requires pywin32."""
import os
import win32api
import win32con
import win32event
import win32service
import win32serviceutil
from cherrypy.process import wspbus, plugins
class ConsoleCtrlHandler(plugins.SimplePlugin):
"""A WSPBus plugin for handling Win32 console events (like Ctrl-C)."""
... |
HoracioAlvarado/fwd | refs/heads/master | venv/Lib/site-packages/alembic/templates/generic/env.py | 76 | from __future__ import with_statement
from alembic import context
from sqlalchemy import engine_from_config, pool
from logging.config import fileConfig
# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config
# Interpret the config file for Python... |
aospx-kitkat/platform_external_chromium_org | refs/heads/kitkat | tools/telemetry/telemetry/test_runner.py | 23 | # 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.
"""Parses the command line, discovers the appropriate tests, and runs them.
Handles test configuration, but all the logic for
actually running the test ... |
Outernet-Project/bottle-utils | refs/heads/master | bottle_utils/form/__init__.py | 1 | """
.. module:: bottle_utils.form
:synopsis: Form processing and validation library
.. moduleauthor:: Outernet Inc <hello@outernet.is>
"""
from .exceptions import ValidationError
from .fields import (DormantField,
Field,
StringField,
PasswordField,
... |
SiLab-Bonn/pyBAR_fei4_interpreter | refs/heads/master | examples/example.py | 1 | ''' Example how to interpret raw data and how to histogram the hits.
'''
import numpy as np
from pybar_fei4_interpreter.data_interpreter import PyDataInterpreter
from pybar_fei4_interpreter.data_histograming import PyDataHistograming
# Initialize interpretation modules
interpreter = PyDataInterpreter()
histograming ... |
yhoshino11/pytest_example | refs/heads/master | .tox/flake8/lib/python2.7/site-packages/pip/_vendor/colorama/__init__.py | 445 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
from .initialise import init, deinit, reinit
from .ansi import Fore, Back, Style, Cursor
from .ansitowin32 import AnsiToWin32
__version__ = '0.3.3'
|
CCI-MOC/nova | refs/heads/k2k-liberty | nova/tests/unit/virt/ironic/test_driver.py | 2 | # Copyright 2015 Red Hat, Inc.
# Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# 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/L... |
suncycheng/intellij-community | refs/heads/master | python/testData/refactoring/invertBoolean/my_file.py | 83 | BOOL = True |
tmerrick1/spack | refs/heads/develop | var/spack/repos/builtin/packages/r-partykit/package.py | 5 | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... |
Flaburgan/the-federation.info | refs/heads/master | manage.py | 4 | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.local")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
|
dushu1203/chromium.src | refs/heads/nw12 | third_party/cython/src/Cython/Build/Cythonize.py | 90 | #!/usr/bin/env python
import os
import shutil
import tempfile
from distutils.core import setup
from Cython.Build.Dependencies import cythonize, extended_iglob
from Cython.Utils import is_package_dir
from Cython.Compiler import Options
try:
import multiprocessing
parallel_compiles = int(multiprocessing.cpu_co... |
DimensionDataCBUSydney/libcloud | refs/heads/trunk | docs/examples/compute/cloudstack/instantiate_driver_url.py | 63 | from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
apikey = 'your api key'
secretkey = 'your secret key'
url = 'http://example.com/path/to/api'
Driver = get_driver(Provider.CLOUDSTACK)
conn = Driver(key=apikey, secret=secretkey, url=url)
|
ComNets-Bremen/TWIN | refs/heads/master | Sprinkler/global_variables.py | 1 | #!/usr/bin/python3
# TWIN node - A Flexible Testbed for Wireless Sensor Networks
# Copyright (C) 2016, Communication Networks, University of Bremen, Germany
#
# 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 Softwar... |
Maximilian-Reuter/SickRage-1 | refs/heads/master | lib/hachoir_core/tools.py | 58 | # -*- coding: utf-8 -*-
"""
Various utilities.
"""
from hachoir_core.i18n import _, ngettext
import re
import stat
from datetime import datetime, timedelta, MAXYEAR
from warnings import warn
def deprecated(comment=None):
"""
This is a decorator which can be used to mark functions
as deprecated. It will r... |
impedimentToProgress/Ratchet | refs/heads/master | llvm/utils/lit/tests/shell-parsing.py | 131 | # Just run the ShUtil unit tests.
#
# RUN: %{python} -m lit.ShUtil
|
caterinaurban/Typpete | refs/heads/master | typpete/unittests/inference/except_clause.py | 1 | class MyException(Exception):
def __init__(self):
self.val = 15
try:
a = 23
except MyException as e:
b = e.val
a = b + 2
# a := int
# b := int |
kdarnell/hydrateflash | refs/heads/master | flashalgorithm.py | 1 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Algorithm for determining phase stability given P, T, and composition
The algorithmic framework presented here constitutes a hydrate
flash algorithm, such that the amount and presence of hydrate can
be predicted given simple input. It follows the general procedure
of C... |
harisibrahimkv/django | refs/heads/master | django/conf/locale/pt/formats.py | 65 | # This file is distributed under the same license as the Django package.
#
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'j \d\e F \d\e Y'
TIME_FORMAT = 'H:i'
DATETIME_FORMAT = r'j \d\e F \d\e Y à\s H:i'
YEAR_MONTH_FORMAT... |
bt3gl/Project-Euler | refs/heads/master | 016-power_digit_sum.py | 2 | #!/usr/bin/python3
# mari von steinkirch @2013
# steinkirch at gmail
def power_digit_sum(n):
number = str(2**n)
sum_res = 0
for i in number:
sum_res += int(i)
return sum_res
def test_():
assert(power_digit_sum(15) == 26)
print(power_digit_sum(1000))
print('Tests Pa... |
campbe13/openhatch | refs/heads/master | vendor/packages/zope.interface/src/zope/interface/common/interfaces.py | 22 | ##############################################################################
#
# Copyright (c) 2003 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... |
adammenges/statsmodels | refs/heads/master | statsmodels/sandbox/tsa/diffusion.py | 31 | '''getting started with diffusions, continuous time stochastic processes
Author: josef-pktd
License: BSD
References
----------
An Algorithmic Introduction to Numerical Simulation of Stochastic Differential
Equations
Author(s): Desmond J. Higham
Source: SIAM Review, Vol. 43, No. 3 (Sep., 2001), pp. 525-546
Published... |
Kunalpod/codewars | refs/heads/master | build_a_pile_of_cubes.py | 1 | #Kunal Gautam
#Codewars : @Kunalpod
#Problem name: Build a pile of Cubes
#Problem level: 6 kyu
def find_nb(m):
i = int((2*(m**0.5))**0.5)
if ((i**2)*((i+1)**2))//4 == m:
return i
return -1
|
hastalafiesta/Samsung_STE_Kernel | refs/heads/master | scripts/tracing/draw_functrace.py | 14679 | #!/usr/bin/python
"""
Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
Licensed under the terms of the GNU GPL License version 2
This script parses a trace provided by the function tracer in
kernel/trace/trace_functions.c
The resulted trace is processed into a tree to produce a more human
view of the call ... |
xzturn/tensorflow | refs/heads/master | tensorflow/python/eager/device_placement_test.py | 3 | # Copyright 2019 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... |
zentralopensource/zentral | refs/heads/main | zentral/core/actions/backends/base.py | 1 | from django import forms
from zentral.conf import contact_groups
class BaseActionForm(forms.Form):
def __init__(self, *args, **kwargs):
self.config_d = kwargs.pop("config_d")
super(BaseActionForm, self).__init__(*args, **kwargs)
def get_action_config_d(self):
return {k: v for k, v in ... |
blackPantherOS/packagemanagement | refs/heads/master | smartpm/smart/interfaces/qt4/mirrors.py | 1 | #-*- coding: utf-8 -*-
#
# Copyright (c) 2004 Conectiva, Inc.
#
# Written by Anders F Bjorklund <afb@users.sourceforge.net>
#
# This file is part of Smart Package Manager.
#
# Smart Package Manager is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as publishe... |
googleapis/python-talent | refs/heads/master | samples/snippets/job_search_create_tenant.py | 1 | # 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
bluevoda/BloggyBlog | refs/heads/master | lib/python3.4/site-packages/django/contrib/gis/db/backends/mysql/base.py | 444 | from django.db.backends.mysql.base import \
DatabaseWrapper as MySQLDatabaseWrapper
from .features import DatabaseFeatures
from .introspection import MySQLIntrospection
from .operations import MySQLOperations
from .schema import MySQLGISSchemaEditor
class DatabaseWrapper(MySQLDatabaseWrapper):
SchemaEditorCl... |
japeto/Vigtech-Services | refs/heads/master | env/lib/python2.7/site-packages/django/contrib/contenttypes/management.py | 476 | from django.apps import apps
from django.db import DEFAULT_DB_ALIAS, router
from django.utils import six
from django.utils.six.moves import input
def update_contenttypes(app_config, verbosity=2, interactive=True, using=DEFAULT_DB_ALIAS, **kwargs):
"""
Creates content types for models in the given app, removin... |
Matt-Deacalion/django | refs/heads/master | django/conf/locale/el/formats.py | 446 | # -*- 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 = 'd/m/Y'
TIME_FORMAT = 'P'
DATETIME... |
romain-dartigues/ansible | refs/heads/devel | test/units/modules/network/nxos/test_nxos_feature.py | 68 | # (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... |
fabiobatalha/processing | refs/heads/master | export/kbart.py | 1 | # coding: utf-8
"""
Este processamento gera uma tabulação de periódicos seguindo o formato Kbart.
Formato de saída:
"Título do Periódico","ISSN impresso","ISSN online","Data do primeiro número","volume","número","Data do último número publicado","volume","número","url issues","ID SciELO"
"""
import argparse
import log... |
jimsize/PySolFC | refs/heads/master | pysollib/winsystems/__init__.py | 2 | #!/usr/bin/env python
# -*- mode: python; coding: utf-8; -*-
# ---------------------------------------------------------------------------##
#
# Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer
# Copyright (C) 2003 Mt. Hood Playing Card Co.
# Copyright (C) 2005-2009 Skomoroh
#
# This program is free softwa... |
ualikhansars/Gwent | refs/heads/master | lib/python2.7/site-packages/pip/req/req_set.py | 338 | from __future__ import absolute_import
from collections import defaultdict
from itertools import chain
import logging
import os
from pip._vendor import pkg_resources
from pip._vendor import requests
from pip.compat import expanduser
from pip.download import (is_file_url, is_dir_url, is_vcs_url, url_to_path,
... |
nzavagli/UnrealPy | refs/heads/master | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Pillow-2.9.0/Tests/test_image_rotate.py | 12 | from helper import unittest, PillowTestCase, hopper
class TestImageRotate(PillowTestCase):
def test_rotate(self):
def rotate(mode):
im = hopper(mode)
out = im.rotate(45)
self.assertEqual(out.mode, mode)
self.assertEqual(out.size, im.size) # default rotate ... |
novafloss/django-json-dbindex | refs/heads/master | json_dbindex/pgcommands.py | 1 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Rodolphe Quiédeville <rodolphe@quiedeville.org>
#
# 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,... |
minghuascode/pyj | refs/heads/master | library/pyjamas/ui/MenuBar.py | 1 | # Copyright 2006 James Tauber and contributors
# Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
# Copyright (C) 2009 Pavel Mironchyk <p.mironchyk@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may o... |
dulems/hue | refs/heads/master | desktop/core/ext-py/python-ldap-2.3.13/Demo/rename.py | 40 | import ldap
from getpass import getpass
# Create LDAPObject instance
l = ldap.initialize('ldap://localhost:1389',trace_level=1)
print 'Password:'
cred = getpass()
try:
# Set LDAP protocol version used
l.set_option(ldap.OPT_PROTOCOL_VERSION,3)
# Try a bind to provoke failure if protocol version is not support... |
masci/toodo | refs/heads/master | toodo/appengine_config.py | 1 | import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), 'lib'))
|
hardikk/newfies-dialer | refs/heads/master | newfies/api/api_playgrounds/survey_playground.py | 4 | #
# Newfies-Dialer License
# http://www.newfies-dialer.org
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (C) 2011-2013 Star2Billing S.L.
#
# The Initia... |
miconof/headphones | refs/heads/master | lib/unidecode/x05e.py | 250 | data = (
'Za ', # 0x00
'Bi ', # 0x01
'Shi ', # 0x02
'Bu ', # 0x03
'Ding ', # 0x04
'Shuai ', # 0x05
'Fan ', # 0x06
'Nie ', # 0x07
'Shi ', # 0x08
'Fen ', # 0x09
'Pa ', # 0x0a
'Zhi ', # 0x0b
'Xi ', # 0x0c
'Hu ', # 0x0d
'Dan ', # 0x0e
'Wei ', # 0x0f
'Zhang ', # 0x10
'Tang ... |
nishad-jobsglobal/odoo-marriot | refs/heads/master | addons/mail/tests/common.py | 56 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.