repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
fevxie/odoo | refs/heads/8.0 | addons/mrp/tests/test_multicompany.py | 374 | # -*- 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 ... |
harveybia/face-hack | refs/heads/master | venv/face/lib/python2.7/site-packages/PIL/features.py | 58 | from PIL import Image
modules = {
"pil": "PIL._imaging",
"tkinter": "PIL._imagingtk",
"freetype2": "PIL._imagingft",
"littlecms2": "PIL._imagingcms",
"webp": "PIL._webp",
"transp_webp": ("WEBP", "WebPDecoderBuggyAlpha")
}
def check_module(feature):
if feature not in modules:
raise... |
mycodeday/crm-platform | refs/heads/master | account_test/report/__init__.py | 433 | import account_test_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
razvanphp/arangodb | refs/heads/devel | 3rdParty/V8-3.31.74.1/third_party/python_26/Lib/test/test_socketserver.py | 56 | """
Test suite for SocketServer.py.
"""
import contextlib
import errno
import imp
import os
import select
import signal
import socket
import tempfile
import threading
import time
import unittest
import SocketServer
import test.test_support
from test.test_support import reap_children, verbose, TestSkipped
from test.te... |
eahneahn/free | refs/heads/master | lib/python2.7/site-packages/django/utils/timezone.py | 16 | """
Timezone-related classes and functions.
This module uses pytz when it's available and fallbacks when it isn't.
"""
from datetime import datetime, timedelta, tzinfo
from threading import local
import sys
import time as _time
try:
import pytz
except ImportError:
pytz = None
from django.conf import setting... |
matmutant/sl4a | refs/heads/master | python/src/Lib/distutils/command/build_clib.py | 138 | """distutils.command.build_clib
Implements the Distutils 'build_clib' command, to build a C/C++ library
that is included in the module distribution and needed by an extension
module."""
# This module should be kept compatible with Python 2.1.
__revision__ = "$Id: build_clib.py 37828 2004-11-10 22:23:15Z loewis $"
... |
sesuncedu/bitcurator | refs/heads/master | tools/py3fpdf/tutorial/bookmark.py | 21 | from FPDF.Bookmark import *
pdf=Bookmark()
pdf.Open()
pdf.SetFont('Arial','',15)
#Page 1
pdf.AddPage()
pdf.Bookmark('Page 1')
pdf.Bookmark('Paragraph 1',1,-1)
pdf.Cell(0,6,'Paragraph 1')
pdf.Ln(50)
pdf.Bookmark('Paragraph 2',1,-1)
pdf.Cell(0,6,'Paragraph 2')
#Page 2
pdf.AddPage()
pdf.Bookmark('Page 2')
pdf.Bookmark('P... |
sbmlteam/deviser | refs/heads/sk_fix_issues | generator/bindings_files/DowncastExtensionFile.py | 1 | #!/usr/bin/env python
#
# @file DowncastExtensionFile.py
# @brief class for generating downcast extension file
# @author Frank Bergmann
# @author Sarah Keating
#
# <!--------------------------------------------------------------------------
#
# Copyright (c) 2013-2018 by the California Institute of Technology
# ... |
e0ne/cinder | refs/heads/master | cinder/tests/test_api_urlmap.py | 27 | # Copyright (c) 2013 OpenStack Foundation
# 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 applicab... |
teeple/pns_server | refs/heads/master | work/install/Python-2.7.4/Lib/distutils/tests/test_build_clib.py | 73 | """Tests for distutils.command.build_clib."""
import unittest
import os
import sys
from test.test_support import run_unittest
from distutils.command.build_clib import build_clib
from distutils.errors import DistutilsSetupError
from distutils.tests import support
from distutils.spawn import find_executable
class Buil... |
yigitguler/django | refs/heads/master | django/contrib/gis/geos/mutable_list.py | 105 | # Copyright (c) 2008-2009 Aryeh Leib Taurog, all rights reserved.
# Released under the New BSD license.
"""
This module contains a base type which provides list-style mutations
without specific data storage methods.
See also http://www.aryehleib.com/MutableLists.html
Author: Aryeh Leib Taurog.
"""
from django.utils.f... |
nitzmahone/ansible-modules-extras | refs/heads/devel | windows/win_iis_webapplication.py | 153 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Henrik Wallström <henrik@wallstroms.nu>
#
# 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 t... |
spnow/grr | refs/heads/master | tools/demo.py | 3 | #!/usr/bin/env python
"""This is a single binary demo program."""
import threading
# pylint: disable=unused-import,g-bad-import-order
from grr.lib import server_plugins
from grr.gui import admin_ui
# pylint: enable=unused-import,g-bad-import-order
from grr.client import client
from grr.gui import runtests
from grr... |
waheedahmed/edx-platform | refs/heads/master | lms/djangoapps/course_structure_api/__init__.py | 175 | """ Course structure API """
|
manassolanki/frappe | refs/heads/develop | frappe/patches/v8_0/set_doctype_values_in_custom_role.py | 19 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doctype('Custom Role')
# set ref doctype in custom role for reports
frappe.db.sql(""" update `tabCus... |
imbasimba/astroquery | refs/heads/obs-id-download | astroquery/oac/tests/__init__.py | 12133432 | |
SIFTeam/enigma2 | refs/heads/master | lib/python/Plugins/Extensions/DVDBurn/Process.py | 14 | from Components.Task import Task, Job, DiskspacePrecondition, Condition, ToolExistsPrecondition
from Components.Harddisk import harddiskmanager
from Screens.MessageBox import MessageBox
import os
class png2yuvTask(Task):
def __init__(self, job, inputfile, outputfile):
Task.__init__(self, job, "Creating menu video")... |
rabipanda/tensorflow | refs/heads/master | tensorflow/contrib/quantize/python/quantize_graph_test.py | 4 | # 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... |
Azure/azure-sdk-for-python | refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_monitor_management_client.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 may ... |
ennoborg/gramps | refs/heads/master | gramps/gui/display.py | 1 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2006 Donald N. Allingham
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at you... |
rsalmaso/huey | refs/heads/master | huey/serializer.py | 2 | try:
import gzip
except ImportError:
gzip = None
try:
import zlib
except ImportError:
zlib = None
import hashlib
import hmac
import logging
import pickle
import sys
from huey.exceptions import ConfigurationError
from huey.utils import encode
logger = logging.getLogger('huey.serializer')
if gzip is ... |
Telthor/bad-boids | refs/heads/master | setup.py | 1 | from setuptools import setup, find_packages
setup(
name = 'Boids',
version = '0.0.1',
packages = find_packages(),
install_requires = ['matplotlib','numpy','nose'],
license = 'MIT',
author = 'David Wise',
author_email = 'd.wise.15@ucl.ac.uk',
scripts = ['s... |
proger/offlineimap | refs/heads/master | offlineimap/repository/LocalStatus.py | 4 | # Local status cache repository support
# Copyright (C) 2002 John Goerzen
# <jgoerzen@complete.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or... |
wangxuan007/flasky | refs/heads/master | venv/lib/python2.7/site-packages/sqlalchemy/testing/suite/test_results.py | 155 | from .. import fixtures, config
from ..config import requirements
from .. import exclusions
from ..assertions import eq_
from .. import engines
from sqlalchemy import Integer, String, select, util, sql, DateTime
import datetime
from ..schema import Table, Column
class RowFetchTest(fixtures.TablesTest):
__backend... |
NeovaHealth/odoo | refs/heads/8.0 | addons/portal_project_issue/__init__.py | 493 | # -*- 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... |
kchodorow/tensorflow | refs/heads/master | tensorflow/python/kernel_tests/conv2d_backprop_filter_grad_test.py | 101 | # Copyright 2015 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... |
nushio3/chainer | refs/heads/master | docs/source/conf.py | 2 | # -*- coding: utf-8 -*-
#
# Chainer documentation build configuration file, created by
# sphinx-quickstart on Sun May 10 12:22:10 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# A... |
procoder317/scikit-learn | refs/heads/master | sklearn/covariance/shrunk_covariance_.py | 209 | """
Covariance estimators using shrinkage.
Shrinkage corresponds to regularising `cov` using a convex combination:
shrunk_cov = (1-shrinkage)*cov + shrinkage*structured_estimate.
"""
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Gael Varoquaux <gael.varoquaux@normalesup.org>
# Virgile ... |
arrayexpress/ae_auto | refs/heads/master | ae_web/maintenance/migrations/__init__.py | 12133432 | |
sopier/django | refs/heads/master | tests/template_backends/apps/importerror/__init__.py | 12133432 | |
resmo/ansible | refs/heads/devel | test/units/modules/source_control/__init__.py | 12133432 | |
philsch/ansible | refs/heads/devel | test/units/plugins/callback/__init__.py | 12133432 | |
RackSec/ansible | refs/heads/devel | test/integration/targets/module_utils/module_utils/baz1/__init__.py | 12133432 | |
njoubert/ardupilot | refs/heads/master | mk/PX4/Tools/genmsg/test/test_genmsg_command_line.py | 216 | # Software License Agreement (BSD License)
#
# Copyright (c) 2011, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above... |
TomTranter/OpenPNM | refs/heads/master | tests/unit/phases/mixtures/HumidAirTest.py | 1 | import openpnm as op
from openpnm.phases import mixtures
class HumidAirTest:
def setup_class(self):
ws = op.Workspace()
ws.clear()
self.net = op.network.Cubic(shape=[10, 10, 10])
def test_init(self):
ha = mixtures.GenericMixture(network=self.net)
assert isinstance(ha, ... |
jhunufa/ArduWatchRaspSerial | refs/heads/master | virtualenv/lib/python3.4/site-packages/pip/_vendor/lockfile/pidlockfile.py | 536 | # -*- coding: utf-8 -*-
# pidlockfile.py
#
# Copyright © 2008–2009 Ben Finney <ben+python@benfinney.id.au>
#
# This is free software: you may copy, modify, and/or distribute this work
# under the terms of the Python Software Foundation License, version 2 or
# later as published by the Python Software Foundation.
# No ... |
candy7393/VTK | refs/heads/master | ThirdParty/Twisted/twisted/words/test/test_jabbererror.py | 40 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.words.protocols.jabber.error}.
"""
from twisted.trial import unittest
from twisted.words.protocols.jabber import error
from twisted.words.xish import domish
NS_XML = 'http://www.w3.org/XML/1998/namespace'
NS_STREAMS = 'h... |
yeyanchao/calibre | refs/heads/master | src/calibre/ebooks/conversion/plugins/pml_input.py | 2 | # -*- coding: utf-8 -*-
__license__ = 'GPL v3'
__copyright__ = '2009, John Schember <john@nachtimwald.com>'
__docformat__ = 'restructuredtext en'
import glob
import os
import shutil
from calibre.customize.conversion import InputFormatPlugin
from calibre.ptempfile import TemporaryDirectory
from calibre.utils.zipfil... |
cysnake4713/server-tools | refs/heads/8.0 | auditlog/tests/test_auditlog.py | 28 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2015 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... |
hwjworld/xiaodun-platform | refs/heads/master | common/djangoapps/util/tests/test_date_utils.py | 52 | # -*- coding: utf-8 -*-
"""
Tests for util.date_utils
"""
from datetime import datetime, timedelta, tzinfo
import unittest
import ddt
from mock import patch
from nose.tools import assert_equals, assert_false # pylint: disable=E0611
from pytz import UTC
from util.date_utils import (
get_default_time_display, get... |
extremewaysback/django | refs/heads/master | tests/defer/tests.py | 338 | from __future__ import unicode_literals
from django.db.models.query_utils import DeferredAttribute, InvalidQuery
from django.test import TestCase
from .models import (
BigChild, Child, ChildProxy, Primary, RefreshPrimaryProxy, Secondary,
)
class AssertionMixin(object):
def assert_delayed(self, obj, num):
... |
ovnicraft/evex-configuration | refs/heads/master | util/jenkins/stage_release.py | 2 | """
Take in a YAML file with the basic data of all the things we could
deploy and command line hashes for the repos that we want to deploy
right now.
Example Config YAML file:
---
DOC_STORE_CONFIG:
hosts: [ list, of, mongo, hosts]
port: #
db: 'db'
user: 'jenkins'
password: 'password'
configuration... |
ldolberg/mam | refs/heads/master | maggregator/Treedistance.py | 2 | import sys
import os
import re
import glob,commands
import numpy,math
from optparse import OptionParser
import copy
import time
import pickle
#sys.path.append('/home/lautaro/workspace')
#import tree
from hungarian import maxWeightMatching
from multiAggregator import main_aggregator,build_aggregate_tree,build_aggregat... |
mjbommar/wellsettled-research | refs/heads/master | scratch/py/find_district_ws_phrase.py | 1 | # Standard imports
import codecs
import csv
import os
import re
from pprint import pprint
# WSR imports
from wsr.data.district import District, read_xml_document, read_xml_opinion
from wsr.config import SCRATCH_PATH, DISTRICT_FILE_NAME_LIST
from wsr.process.tokenize import sentence_tokenizer
from wsr.process.stem impo... |
compsoc-ssc/compsocssc | refs/heads/master | general/migrations/0009_auto_20150828_2348.py | 1 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('general', '0008_auto_20150628_1417'),
]
operations = [
migrations.DeleteModel(
name='SiteVisit',
),
... |
Jannes123/inasafe | refs/heads/develop | safe/impact_reports/report_mixin_base.py | 3 | # coding=utf-8
"""
InaSAFE Disaster risk assessment tool developed by AusAid -
**Impact Function Report Mixin Base Class**
Contact : ole.moller.nielsen@gmail.com
.. note:: 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
... |
jpaasen/cos | refs/heads/master | framework/linalg/tests/testMatrixOperations.py | 1 | '''
Created on 29. aug. 2011
@author: jpaasen
'''
import unittest
import framework.mynumpy as np
class TestMatrixOperations(unittest.TestCase):
def setUp(self):
self.n = 3
self.A = np.array([[2.0, -1.0, 0.0], [-1.0, 2.0, -1.0], [0.0, -1.0, 2.0]],dtype=complex)
self.A2 = np.array([... |
glennlive/gnuradio-wg-grc | refs/heads/master | gnuradio-runtime/python/gnuradio/ctrlport/RPCConnectionThrift.py | 25 | #!/usr/bin/env python
#
# Copyright 2015 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# ... |
veger/ansible | refs/heads/devel | lib/ansible/utils/listify.py | 100 | # (c) 2014 Michael DeHaan, <michael@ansible.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 later ve... |
nzlosh/st2 | refs/heads/master | st2api/st2api/controllers/v1/rbac.py | 3 | # Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, 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 ... |
gaddman/ansible | refs/heads/devel | lib/ansible/executor/task_result.py | 40 | # Copyright: (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible import constants as C
from ansible.parsing.dataloader... |
wintoncode/winton-kafka-streams | refs/heads/master | examples/binning/source.py | 1 | """Provides a wrapper to randomise whether underlying prices are generated"""
from random import Random as _Random
class Source(object):
"""\
Provides iterable class wrapping a price source and randomly produces a
price or not.
"""
def __init__(self, prob, prices, seed=123):
self.prob = ... |
undoware/neutron-drive | refs/heads/master | google_appengine/lib/django_1_3/tests/modeltests/reverse_lookup/__init__.py | 12133432 | |
savi-dev/quantum | refs/heads/master | quantum/plugins/nicira/__init__.py | 12133432 | |
machinaut/gym | refs/heads/master | gym/envs/tests/__init__.py | 12133432 | |
libracore/erpnext | refs/heads/v12 | erpnext/accounts/report/bank_clearance_summary/__init__.py | 12133432 | |
j0057/ansible-1 | refs/heads/fix-powershell-shebang-not-found | plugins/inventory/openshift.py | 132 | #!/usr/bin/env python
# (c) 2013, Michael Scherer <misc@zarb.org>
#
# 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 o... |
dbergan/AutobahnPython | refs/heads/master | examples/twisted/websocket/echo_httpheaders/client.py | 18 | ###############################################################################
##
## Copyright (C) 2013 Tavendo GmbH
##
## 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:/... |
MissionCriticalCloud/marvin | refs/heads/master | marvin/cloudstackAPI/createInstanceGroup.py | 1 | """Creates a vm group"""
from baseCmd import *
from baseResponse import *
class createInstanceGroupCmd (baseCmd):
typeInfo = {}
def __init__(self):
self.isAsync = "false"
"""the name of the instance group"""
"""Required"""
self.name = None
self.typeInfo['name'] = 'stri... |
shangvven/Wox | refs/heads/master | PythonHome/Lib/site-packages/pip/_vendor/html5lib/filters/sanitizer.py | 1734 | from __future__ import absolute_import, division, unicode_literals
from . import _base
from ..sanitizer import HTMLSanitizerMixin
class Filter(_base.Filter, HTMLSanitizerMixin):
def __iter__(self):
for token in _base.Filter.__iter__(self):
token = self.sanitize_token(token)
if tok... |
yxl/emscripten-calligra-mobile | refs/heads/calligra/2.8 | 3rdparty/google-breakpad/src/tools/gyp/test/generator-output/gyptest-subdir2-deep.py | 74 | #!/usr/bin/env python
# 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.
"""
Verifies building a target from a .gyp file a few subdirectories
deep when the --generator-output= option is used to put the build
confi... |
LokiCoder/Sick-Beard | refs/heads/torrent_1080_subtitles | sickbeard/naming.py | 4 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard 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 t... |
tashaxe/Red-DiscordBot | refs/heads/develop | lib/pip/_vendor/requests/packages/chardet/chardetect.py | 1785 | #!/usr/bin/env python
"""
Script which takes one or more file paths and reports on their detected
encodings
Example::
% chardetect somefile someotherfile
somefile: windows-1252 with confidence 0.5
someotherfile: ascii with confidence 1.0
If no paths are provided, it takes its input from stdin.
"""
from... |
shortlab/mamba | refs/heads/master | problems/Miaomiao/MultiApp_2Phase_chem/InterpolationTransfer/parametric_chimneydensity_typicalPWR/MyScript_vaporheight.py | 12 | #!/usr/bin/env python
import csv, sys
from collections import defaultdict
from numpy import *
#GOAL: based on vapor_height value from sub_5th_noTransfer.csv, we would change the vapor part dimension and corresponding
thickness=0.025 #crud thicknesss
columns1 = defaultdict(list) # each value in each column is appende... |
pinkavaj/gnuradio | refs/heads/master | gr-digital/examples/ofdm/benchmark_rx.py | 54 | #!/usr/bin/env python
#
# Copyright 2006,2007,2011,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (a... |
lindycoder/netman | refs/heads/master | tests/adapters/switches/__init__.py | 12133432 | |
elkingtonmcb/h2o-2 | refs/heads/master | h2o-docs-theme/demo_docs/source/test_py_module/__init__.py | 12133432 | |
chrishas35/django-travis-ci | refs/heads/master | tests/regressiontests/generic_views/__init__.py | 12133432 | |
tkaitchuck/nupic | refs/heads/master | external/linux64/lib/python2.6/site-packages/PIL/ImageDraw.py | 13 | #
# The Python Imaging Library
# $Id: ImageDraw.py 2817 2006-10-07 15:34:03Z fredrik $
#
# drawing interface operations
#
# History:
# 1996-04-13 fl Created (experimental)
# 1996-08-07 fl Filled polygons, ellipses.
# 1996-08-13 fl Added text support
# 1998-06-28 fl Handle I and F images
# 1998-12-29 fl Added ... |
alvin319/CarnotKE | refs/heads/master | jyhton/lib-python/2.7/weakref.py | 187 | """Weak reference support for Python.
This module is an implementation of PEP 205:
http://www.python.org/dev/peps/pep-0205/
"""
# Naming convention: Variables named "wr" are weak reference objects;
# they are called this instead of "ref" to avoid name collisions with
# the module-global ref() function imported from ... |
yongju-hong/thrift | refs/heads/master | test/crossrunner/util.py | 17 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
IanLewis/podhmo_loader | refs/heads/master | example/manage.py | 480 | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
|
vmlaker/mpipe | refs/heads/master | test/count_nullops.py | 1 | from datetime import datetime
from builtins import range
def get_num_null_ops(duration, max_sample=1.0):
"""Return number of do-nothing loop iterations."""
for amount in [2**x for x in range(100)]: # 1,2,4,8,...
begin = datetime.now()
for ii in range(amount):
pass
elapsed ... |
JorgeCoock/django | refs/heads/master | tests/proxy_model_inheritance/app2/__init__.py | 12133432 | |
uTest/Androguard | refs/heads/master | androguard/__init__.py | 12133432 | |
jazcollins/models | refs/heads/master | object_detection/utils/__init__.py | 12133432 | |
ampax/edx-platform-backup | refs/heads/live | cms/djangoapps/xblock_config/__init__.py | 12133432 | |
chongtianfeiyu/kbengine | refs/heads/master | kbe/src/lib/python/Lib/asyncio/futures.py | 63 | """A Future class similar to the one in PEP 3148."""
__all__ = ['CancelledError', 'TimeoutError',
'InvalidStateError',
'Future', 'wrap_future',
]
import concurrent.futures._base
import logging
import reprlib
import sys
import traceback
from . import events
# States for Future.
_PEND... |
graingert/pip | refs/heads/develop | pip/_vendor/requests/packages/urllib3/exceptions.py | 156 |
## Base Exceptions
class HTTPError(Exception):
"Base exception used by this module."
pass
class HTTPWarning(Warning):
"Base warning used by this module."
pass
class PoolError(HTTPError):
"Base exception for errors caused within a pool."
def __init__(self, pool, message):
self.pool ... |
tm1249wk/WASHLIGGGHTS-2.3.7 | refs/heads/master | tools/python/dump2cfg.py | 9 | #!/usr/local/bin/python
# Script: dump2cfg.py
# Purpose: convert a LAMMPS dump file to CFG format
# Syntax: dump2cfg.py dumpfile Nid Ntype Nx Ny Nz cfgfile
# dumpfile = LAMMPS dump file in native LAMMPS format
# Nid,Ntype,Nx,Ny,Nz = columns #s for ID,type,x,y,z
# (usua... |
fabianp/scikit-learn | refs/heads/master | sklearn/linear_model/tests/test_logistic.py | 105 | import numpy as np
import scipy.sparse as sp
from scipy import linalg, optimize, sparse
from sklearn.utils.testing import assert_almost_equal
from sklearn.utils.testing import assert_array_equal
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.testing import assert_equal
from sklearn.util... |
OpenDroneMap/WebODM | refs/heads/master | coreplugins/contours/__init__.py | 29 | from .plugin import *
|
seppi91/CouchPotatoServer | refs/heads/develop | libs/bs4/builder/__init__.py | 447 | from collections import defaultdict
import itertools
import sys
from bs4.element import (
CharsetMetaAttributeValue,
ContentMetaAttributeValue,
whitespace_re
)
__all__ = [
'HTMLTreeBuilder',
'SAXTreeBuilder',
'TreeBuilder',
'TreeBuilderRegistry',
]
# Some useful features for a Tree... |
darioizzo/pykep | refs/heads/master | pykep/planet/__init__.py | 2 | # -*- coding: iso-8859-1 -*-
"""
This module contains all the classes that allow to construct efficiently
low-thrust tajectories using our own flavour of the Sims-Flanagan model: a trajectory
transcription method that forms the basis for MALTO, the software in use in JPL
for preliminary interplanetary trajectory design... |
mrquim/repository.mrquim | refs/heads/master | script.module.covenant/lib/resources/lib/modules/debrid.py | 6 | # -*- coding: utf-8 -*-
"""
Covenant Add-on
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This prog... |
kmod/icbd | refs/heads/master | stdlib/python2.5/curses/panel.py | 77 | """curses.panel
Module for using panels with curses.
"""
__revision__ = "$Id: panel.py 36560 2004-07-18 06:16:08Z tim_one $"
from _curses_panel import *
|
huoxudong125/dlr | refs/heads/master | Samples/Hosting/Scenarios/merlin_web_page_code_behind.py | 3 | def OnLoad():
print "page loaded"
def Render():
return "query page elements: " + element1 + " " + element2
|
camilonova/django | refs/heads/master | django/contrib/gis/db/backends/base/operations.py | 7 | class BaseSpatialOperations:
truncate_params = {}
# Quick booleans for the type of this spatial backend, and
# an attribute for the spatial database version tuple (if applicable)
postgis = False
spatialite = False
mysql = False
oracle = False
spatial_version = None
# How the geomet... |
bhupennewalkar1337/erpnext | refs/heads/develop | erpnext/hr/doctype/employee_leave_approver/__init__.py | 12133432 | |
benjaminrigaud/django | refs/heads/master | tests/test_discovery_sample/__init__.py | 12133432 | |
myfreecomm/python-passaporte-web | refs/heads/master | passaporte_web/__init__.py | 12133432 | |
wkfwkf/statsmodels | refs/heads/master | docs/fix_longtable.py | 43 | #!/usr/bin/env python
import sys
import os
BUILDDIR = sys.argv[-1]
read_file_path = os.path.join(BUILDDIR,'latex','statsmodels.tex')
write_file_path = os.path.join(BUILDDIR, 'latex','statsmodels_tmp.tex')
read_file = open(read_file_path,'r')
write_file = open(write_file_path, 'w')
for line in read_file:
if 'lon... |
vortex-ape/scikit-learn | refs/heads/master | examples/linear_model/plot_sgd_comparison.py | 29 | """
==================================
Comparing various online solvers
==================================
An example showing how different online solvers perform
on the hand-written digits dataset.
"""
# Author: Rob Zinkov <rob at zinkov dot com>
# License: BSD 3 clause
import numpy as np
import matplotlib.pyplot a... |
msebire/intellij-community | refs/heads/master | python/testData/refactoring/move/function/before/src/a.py | 83 | from lib1 import urlopen
def f(url):
'''Return the representation available at the URL.
'''
return urlopen(url).read()
def f_usage():
return f(14)
class C(object):
def g(self, x):
return x
class D(C):
def g(self, x, y):
return super(D, self).f(x) + y
class E(object):
... |
anbangleo/NlsdeWeb | refs/heads/master | api/achievements/hackolantern/hackolantern.py | 11 | import datetime
def process(api, data):
date = datetime.datetime.now() + datetime.timedelta(hours=-5)
return date.day == 31 and date.month == 10, {}
|
TheGentlemanOctopus/thegentlemanoctopus | refs/heads/master | octopus_code/core/octopus/__init__.py | 12133432 | |
damdam-s/OCB | refs/heads/8.0 | addons/web_kanban/__openerp__.py | 423 | {
'name': 'Base Kanban',
'category': 'Hidden',
'description': """
OpenERP Web kanban view.
========================
""",
'version': '2.0',
'depends': ['web'],
'data' : [
'views/web_kanban.xml',
],
'qweb' : [
'static/src/xml/*.xml',
],
'auto_install': True
}
|
open-synergy/opnsynid-hr | refs/heads/8.0 | hr_employee_training_allowance/models/hr_training_category.py | 1 | # -*- coding: utf-8 -*-
# Copyright 2018 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import models, fields
class HrTrainingCategory(models.Model):
_inherit = "hr.training_category"
allowance_pricelist_id = fields.Many2one(
string="Training Allow... |
wrxtasy/xbmc | refs/heads/master | tools/EventClients/lib/python/ps3/sixwatch.py | 44 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import pyudev
import sixpair
import threading
vendor = 0x054c
product = 0x0268
def main(mac):
context = pyudev.Context()
monitor = pyudev.Monitor.from_netlink(context)
monitor.filter_by(subsystem="usb")
for action, device in monitor:
if 'ID_VENDOR_I... |
20tab/pybulletphysics | refs/heads/master | tests/__init__.py | 12133432 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.