repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
char-lie/data_mining | refs/heads/master | lab3/stoplist.py | 1 | # -*- coding: utf-8 -*-
stop_list={ "и":0.995050,
"название":0.995050,
"книги":0.990099,
"библиотека":0.985149,
"электронная":0.980198,
"litruru":0.980198,
"жанр":0.980198,
"авторы":0.980198,
"адрес":0.980198,
"в":0.980198,
"httpwwwlitrurubookdescription":0.980198,
"не":0.975248,
"на":0.965347,
"а":0.960396,
"с":0.955... |
ramirocf/gem5-pipe | refs/heads/master | util/stats/flags.py | 90 | # Copyright (c) 2004 The Regents of The University of Michigan
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copyright
# notice, this list ... |
Symmetry-Innovations-Pty-Ltd/Python-2.7-for-QNX6.5.0-x86 | refs/heads/master | usr/pkg/lib/python2.7/xmlrpclib.py | 76 | #
# XML-RPC CLIENT LIBRARY
# $Id$
#
# an XML-RPC client interface for Python.
#
# the marshalling and response parser code can also be used to
# implement XML-RPC servers.
#
# Notes:
# this version is designed to work with Python 2.1 or newer.
#
# History:
# 1999-01-14 fl Created
# 1999-01-15 fl Changed dateTime to u... |
Vatsinator/VatsinatorDatabase | refs/heads/master | vatsinatordatabase/settings/20-logging.conf.py | 1 | """
20-logging.conf.py
"""
# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error when DEBUG=False.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging confi... |
xbmc/atv2 | refs/heads/atv2 | xbmc/lib/libPython/Python/Demo/scripts/find-uname.py | 38 | #!/usr/bin/env python
"""
For each argument on the command line, look for it in the set of all Unicode
names. Arguments are treated as case-insensitive regular expressions, e.g.:
% find-uname 'small letter a$' 'horizontal line'
*** small letter a$ matches ***
LATIN SMALL LETTER A (97)
COMBINING LATIN... |
kurikaesu/arsenalsuite | refs/heads/master | cpp/lib/PyQt4/examples/tutorial/t10.py | 11 | #!/usr/bin/env python
# PyQt tutorial 10
import sys
from PyQt4 import QtCore, QtGui
class LCDRange(QtGui.QWidget):
valueChanged = QtCore.pyqtSignal(int)
def __init__(self, parent=None):
super(LCDRange, self).__init__(parent)
lcd = QtGui.QLCDNumber(2)
lcd.setSegmentStyle(QtGui.Q... |
ruiliLaMeilleure/11ad-backhaul | refs/heads/master | src/netanim/bindings/modulegen__gcc_ILP32.py | 354 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... |
ToonTownInfiniteRepo/ToontownInfinite | refs/heads/master | toontown/coghq/DistributedStageRoomAI.py | 4 | from direct.directnotify import DirectNotifyGlobal
from direct.task import Task
from otp.level import DistributedLevelAI, LevelSpec
from otp.level import LevelSpec
from toontown.coghq import DistributedStageBattleAI
from toontown.coghq import FactoryEntityCreatorAI, StageRoomSpecs
from toontown.coghq import StageRoomBa... |
heiden-deng/anaconda | refs/heads/master | tests/regex_tests/repo_name_test.py | 6 | #!/usr/bin/python2
# vim:set fileencoding=utf-8
#
# Copyright (C) 2014 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This pr... |
MyersGer/django-advanced-comments | refs/heads/master | advanced_comments/akismet.py | 8 | # Version 0.2.0
# 2009/06/18
# Copyright Michael Foord 2005-2009
# akismet.py
# Python interface to the akismet API
# E-mail fuzzyman@voidspace.org.uk
# http://www.voidspace.org.uk/python/modules.shtml
# http://akismet.com
# Released subject to the BSD License
# See http://www.voidspace.org.uk/python/license.shtml
... |
amaurywalbert/twitter | refs/heads/master | graphs/n1/n5_co_follow_creating_network_with_ego_v1.3.py | 2 | # -*- coding: latin1 -*-
################################################################################################
#
#
import datetime, sys, time, json, os, os.path, shutil, time, struct, random
import networkx as nx
import matplotlib.pyplot as plt
from math import*
reload(sys)
sys.setdefaultencoding('utf-8')
... |
DirtyUnicorns/android_external_chromium-org | refs/heads/kitkat | chrome/browser/ui/libgtk2ui/PRESUBMIT.py | 67 | #!/usr/bin/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.
"""Chromium presubmit script for src/chrome/browser/externsions.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-... |
niphlod/w2p_tvseries | refs/heads/master | modules/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py | 2057 | try:
# Python 3.2+
from ssl import CertificateError, match_hostname
except ImportError:
try:
# Backport of the function from a pypi module
from backports.ssl_match_hostname import CertificateError, match_hostname
except ImportError:
# Our vendored copy
from ._implementati... |
tianzhihen/python-mode | refs/heads/develop | pymode/libs3/rope/base/stdmods.py | 32 | import os
import sys
from rope.base import utils
def _stdlib_path():
import inspect
return os.path.dirname(inspect.getsourcefile(inspect))
@utils.cached(1)
def standard_modules():
return python_modules() | dynload_modules()
@utils.cached(1)
def python_modules():
result = set()
lib_path = _stdli... |
cychenyin/windmill | refs/heads/master | examples/executors/processpool.py | 3 | """
Demonstrates how to schedule a job to be run in a process pool on 3 second intervals.
"""
from datetime import datetime
import os
from apscheduler.schedulers.blocking import BlockingScheduler
def tick():
print('Tick! The time is: %s' % datetime.now())
if __name__ == '__main__':
scheduler = BlockingSch... |
tmuelle2/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/commands/bugfortest.py | 124 | # Copyright (c) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... |
vinc456/coala | refs/heads/master | coalib/misc/ContextManagers.py | 16 | import builtins
import os
import platform
import signal
import sys
import tempfile
import threading
from contextlib import closing, contextmanager
from io import StringIO
from coalib.misc.MutableValue import MutableValue
@contextmanager
def subprocess_timeout(sub_process, seconds, kill_pg=False):
"""
Kill su... |
iulian787/spack | refs/heads/develop | var/spack/repos/builtin/packages/py-sphinxcontrib-mermaid/package.py | 3 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PySphinxcontribMermaid(PythonPackage):
"""This extension allows you to embed
`Mermaid ... |
mapr/impala | refs/heads/v1.4.1-mapr | thirdparty/hive-0.12.0-cdh5.1.2/lib/py/fb303/constants.py | 305 | #
# Autogenerated by Thrift
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
from thrift.Thrift import *
from ttypes import *
|
jolyonb/edx-platform | refs/heads/master | lms/djangoapps/courseware/tests/test_discussion_xblock.py | 1 | """
Tests for the discussion xblock.
Most of the tests are in common/xblock/xblock_discussion, here are only
tests for functionalities that require django API, and lms specific
functionalities.
"""
import json
import uuid
import ddt
import mock
from django.urls import reverse
from web_fragments.fragment import Fragm... |
manastech/de-bee | refs/heads/master | gdata/tlslite/integration/TLSSocketServerMixIn.py | 320 | """TLS Lite + SocketServer."""
from gdata.tlslite.TLSConnection import TLSConnection
class TLSSocketServerMixIn:
"""
This class can be mixed in with any L{SocketServer.TCPServer} to
add TLS support.
To use this class, define a new class that inherits from it and
some L{SocketServer.TCPServer} (wi... |
sYnfo/samba-1 | refs/heads/master | third_party/waf/wafadmin/Tools/tex.py | 32 | #!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2006 (ita)
"TeX/LaTeX/PDFLaTeX support"
import os, re
import Utils, TaskGen, Task, Runner, Build
from TaskGen import feature, before
from Logs import error, warn, debug
re_tex = re.compile(r'\\(?P<type>include|input|import|bringin|lstinputlisting){(?P<file>[^{}]... |
mkieszek/odoo | refs/heads/master | addons/mail/tests/__init__.py | 49 | # -*- coding: utf-8 -*-
import test_mail_followers
import test_mail_message
import test_mail_features
import test_mail_channel
import test_mail_gateway
import test_message_read
import test_message_track
import test_mail_template
import test_invite
import test_ir_actions
|
neumerance/cloudloon2 | refs/heads/master | .venv/lib/python2.7/site-packages/django/db/backends/util.py | 108 | from __future__ import unicode_literals
import datetime
import decimal
import hashlib
import logging
from time import time
from django.conf import settings
from django.utils.encoding import force_bytes
from django.utils.timezone import utc
logger = logging.getLogger('django.db.backends')
class CursorWrapper(objec... |
dvinazza/encuesta-distribuida | refs/heads/master | prueba.py | 1 | #!/usr/bin/python
import base64 #para encodear la subida de surveys
from libreria import *
mykey=get_session_key()
if mykey is not None:
print "Obtuve",mykey
#prueba import_survey
"""Creamos una nueva encuesta a partir de un archivo"""
with open('./limesurvey_survey_465943.lss', 'rb') as f:
... |
lucywyman/slides-ii | refs/heads/master | v/lib/python2.7/site-packages/setuptools/tests/test_packageindex.py | 132 | import sys
import distutils.errors
from setuptools.compat import httplib, HTTPError, unicode, pathname2url
import pkg_resources
import setuptools.package_index
from setuptools.tests.server import IndexServer
class TestPackageIndex:
def test_bad_url_bad_port(self):
index = setuptools.package_index.Packa... |
thakkarparth007/mailer | refs/heads/master | deltamail/envelopes_mod/conn.py | 8 | # -*- coding: utf-8 -*-
# Copyright (c) 2013 Tomasz Wójcik <tomek@bthlabs.pl>
#
# 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
# ... |
ylatuya/cerbero | refs/heads/master | cerbero/packages/package.py | 1 | # cerbero - a multi-platform build system for Open Source software
# Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; eit... |
AnishShah/tensorflow | refs/heads/master | tensorflow/contrib/tensor_forest/python/ops/stats_ops.py | 68 | # 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... |
leafclick/intellij-community | refs/heads/master | python/testData/completion/implicitImportsInsidePackagePy2/pkg1/__init__.py | 36 | from .m1 import foo
from pkg1.pkg2 import bar
from .pkg3 import foo2 |
nathanial/lettuce | refs/heads/master | tests/integration/lib/Django-1.2.5/django/utils/dateformat.py | 80 | """
PHP date() style date formatting
See http://www.php.net/date for format strings
Usage:
>>> import datetime
>>> d = datetime.datetime.now()
>>> df = DateFormat(d)
>>> print df.format('jS F Y H:i')
7th October 2003 11:39
>>>
"""
import re
import time
import calendar
from django.utils.dates import MONTHS, MONTHS_3, ... |
cchurch/ansible | refs/heads/devel | lib/ansible/modules/cloud/azure/azure_rm_routetable.py | 24 | #!/usr/bin/python
#
# Copyright (c) 2018 Yuwei Zhou, <yuwzho@microsoft.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',
... |
cubieboard/openbox_external_chromium | refs/heads/openbox | testing/gtest/scripts/fuse_gtest_files.py | 2577 | #!/usr/bin/env python
#
# Copyright 2009, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... |
kenshay/ImageScript | refs/heads/master | ProgramData/SystemFiles/Python/Lib/site-packages/scipy/signal/setup.py | 15 | from __future__ import division, print_function, absolute_import
from scipy._build_utils import numpy_nodepr_api
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('signal', parent_package, top_path)
config.add_data_dir('tests... |
KirstieJane/BrainsForPublication | refs/heads/master | NotYetCurated/roscha_helpers/plot_brain.py | 3 | #!/usr/bin/env python2.7
def plotZslices_alloption(niftipath,mnipath='',ortho='z',cut_coords='',Nraw=1,smoothing=0,LR=False,outdir='',colorpos='r',colorneg='b',Zannotate=False,thresholdpos='def',Zannotates='def',thresholdneg=False,alphamap=1,alphabrain=1):
"niftipath: path to the nifti file, can be a 3D - if activa... |
zak-k/iris | refs/heads/master | docs/iris/example_code/General/__init__.py | 21 | """
General visualisation examples
==============================
"""
|
isaac-philip/loolu | refs/heads/master | common/django/db/models/sql/where.py | 7 | """
Code to manage the creation and SQL rendering of 'where' constraints.
"""
import datetime
from django.utils import tree
from django.db import connection
from django.db.models.fields import Field
from django.db.models.query_utils import QueryWrapper
from datastructures import EmptyResultSet, FullResultSet
# Connec... |
tpodowd/boto | refs/heads/master | tests/integration/awslambda/__init__.py | 586 | # Copyright (c) 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# 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 ... |
tectronics/hop | refs/heads/master | src/contrib/hod/hodlib/Hod/nodePool.py | 182 | #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 use thi... |
cosailer/caeproject | refs/heads/master | project3_harm_coat.py | 1 | # -*- coding: utf-8 -*-
"""
-------------------------------------
N A C S P Y T H O N S C R I P T
-------------------------------------
NACS version: 2.0.2745 - pre3
NACS architecture: CENTOS 5.11 (X86_64)
File generated at Tue Jan 20 19:18:16 2015
On host 'lse86' by 'cae42'
"""
from __future__ import division ... |
anhdiepmmk/yowsup | refs/heads/master | yowsup/layers/protocol_notifications/layer.py | 62 | from yowsup.layers import YowLayer, YowLayerEvent, YowProtocolLayer
from .protocolentities import *
from yowsup.layers.protocol_acks.protocolentities import OutgoingAckProtocolEntity
class YowNotificationsProtocolLayer(YowProtocolLayer):
def __init__(self):
handleMap = {
"notification": (self.r... |
slabanja/dynsf | refs/heads/master | dsf/trajectory_reader/xtc_trajectory_reader.py | 1 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
... |
archesproject/arches | refs/heads/master | arches/app/utils/flatten_dict.py | 1 | """
ARCHES - a program developed to inventory and manage immovable cultural heritage.
Copyright (C) 2013 J. Paul Getty Trust and World Monuments Fund
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Founda... |
JioCloud/heat | refs/heads/master | heat/tests/test_instance.py | 3 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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... |
ilogue/niprov | refs/heads/master | niprov/mediumfactory.py | 1 | from niprov.dependencies import Dependencies
from niprov.mediumstdout import StandardOutputMedium
from niprov.mediumdirect import DirectMedium
from niprov.mediumfile import FileMedium
from niprov.mediumviewer import ViewerMedium
class MediumFactory(object):
def __init__(self, dependencies=Dependencies()):
... |
michaelgallacher/intellij-community | refs/heads/master | python/testData/create_tests/create_tst.expected.py | 39 | from unittest import TestCase
class Spam(TestCase):
def eggs(self):
self.fail()
def eggs_and_ham(self):
self.fail()
|
dmsimard/ansible | refs/heads/devel | test/sanity/code-smell/ansible-requirements.py | 18 | #!/usr/bin/env python
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import re
import sys
def read_file(path):
try:
with open(path, 'r') as f:
return f.read()
except Exception as ex: # pylint: disable=broad-except
print('%s:%d:%d: unable t... |
mikewiebe-ansible/ansible | refs/heads/devel | lib/ansible/modules/storage/netapp/na_ontap_lun_copy.py | 10 | #!/usr/bin/python
# (c) 2019, NetApp, 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... |
ahtn/keyplus | refs/heads/master | host-software/uniflash/crc16.py | 2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2017 jem@seethis.link
# Licensed under the MIT license (http://opensource.org/licenses/MIT)
def u16(x):
return x & 0xffff
def crc16_step(crc, byte):
crc_poly = 0x1021
for n in range(7, -1, -1):
crc_carry = crc >> 15 # bit that is shifted o... |
lmazuel/azure-sdk-for-python | refs/heads/master | azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/virtual_machine_extension_py3.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 ... |
scrollback/kuma | refs/heads/master | vendor/packages/translate-toolkit/translate/lang/test_el.py | 7 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from translate.lang import factory
def test_punctranslate():
"""Tests that we can translate punctuation."""
language = factory.getlanguage('el')
assert language.punctranslate(u"") == u""
assert language.punctranslate(u"abc efg") == u"abc efg"
assert la... |
openstack/tempest | refs/heads/master | tempest/api/identity/v3/test_catalog.py | 2 | # 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, software
# d... |
TimBuckley/effective_django | refs/heads/master | django/contrib/admindocs/views.py | 7 | from importlib import import_module
import inspect
import os
import re
import warnings
from django import template
from django.apps import apps
from django.conf import settings
from django.contrib import admin
from django.contrib.admin.views.decorators import staff_member_required
from django.db import models
from dja... |
georgmichel/openEMS | refs/heads/master | python/Tutorials/Helical_Antenna.py | 2 | # -*- coding: utf-8 -*-
"""
Helical Antenna Tutorial
Tested with
- python 3.4
- openEMS v0.0.33+
(C) 2015-2016 Thorsten Liebig <thorsten.liebig@gmx.de>
"""
### Import Libraries
import os, tempfile
from pylab import *
from CSXCAD import CSXCAD
from openEMS import openEMS
from openEMS.physical_constants impo... |
kkdd/arangodb | refs/heads/devel | 3rdParty/V8-4.3.61/third_party/python_26/Lib/idlelib/ScriptBinding.py | 52 | """Extension to execute code outside the Python shell window.
This adds the following commands:
- Check module does a full syntax check of the current module.
It also runs the tabnanny to catch any inconsistent tabs.
- Run module executes the module's code in the __main__ namespace. The window
must have been sa... |
jackkiej/SickRage | refs/heads/master | lib/sqlalchemy/dialects/sybase/__init__.py | 79 | # sybase/__init__.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from sqlalchemy.dialects.sybase import base, pysybase, pyodbc
# default dialect
ba... |
ccmbioinfo/mugqic_pipelines | refs/heads/master | bfx/bvatools.py | 1 | #!/usr/bin/env python
################################################################################
# Copyright (C) 2014, 2015 GenAP, McGill University and Genome Quebec Innovation Centre
#
# This file is part of MUGQIC Pipelines.
#
# MUGQIC Pipelines is free software: you can redistribute it and/or modify
# it und... |
jjf28/Chkdraft | refs/heads/master | GoogleTestLib/googletest/googletest/scripts/upload_gtest.py | 1963 | #!/usr/bin/env python
#
# Copyright 2009, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... |
shuqin/pystudy | refs/heads/master | pystudy/basic/func.py | 1 | def factorial(n):
''' computing n*(n-1)*(n-2)*...*3*2*1 '''
if n==0 or n==1 :
return 1;
return n* factorial(n-1);
if __name__ == "__main__":
print __name__;
for i in range(10) :
print i,"! = " , factorial(i);
|
danielbair/aeneas | refs/heads/master | aeneas/tests/long_test_task_misc.py | 5 | #!/usr/bin/env python
# coding=utf-8
# aeneas is a Python/C library and a set of tools
# to automagically synchronize audio and text (aka forced alignment)
#
# Copyright (C) 2012-2013, Alberto Pettarin (www.albertopettarin.it)
# Copyright (C) 2013-2015, ReadBeyond Srl (www.readbeyond.it)
# Copyright (C) 2015-2017, A... |
zhangyage/Python-oldboy | refs/heads/master | day14/BBS/BBS/settings.py | 1 | # -*- coding:utf-8 -*-
"""
Django settings for BBS project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.joi... |
jrief/django-cms | refs/heads/master | cms/tests/staticfiles.py | 18 | from __future__ import with_statement
from django.core import management
from django.test import TestCase
from cms.test_utils.util.context_managers import SettingsOverride
from cms.test_utils.util.context_managers import StdoutOverride
from cms.test_utils.util.context_managers import TemporaryDirectory
class Static... |
emmuchira/kps_erp | refs/heads/develop | erpnext/healthcare/doctype/medical_code/medical_code.py | 30 | # -*- coding: utf-8 -*-
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
from frappe.model.document import Document
class MedicalCode(Document):
def autoname(self):
self.name = self.medical_code_standard+"... |
guewen/odoo | refs/heads/master | addons/product_expiry/__openerp__.py | 61 | ##############################################################################
#
# 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 Affero General Public L... |
lizardsystem/lizard-api | refs/heads/master | lizard_api/urls.py | 1 | # (c) Nelen & Schuurmans. GPL licensed, see LICENSE.txt.
from django.conf.urls.defaults import include
from django.conf.urls.defaults import patterns
from django.conf.urls.defaults import url
from django.contrib import admin
from lizard_api.views import RootView
admin.autodiscover()
urlpatterns = patterns(
'',
... |
pyfisch/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/third_party/pytest/bench/skip.py | 32 | from six.moves import range
import pytest
SKIP = True
@pytest.mark.parametrize("x", range(5000))
def test_foo(x):
if SKIP:
pytest.skip("heh")
|
yd0str/infernal-twin | refs/heads/master | build/pillow/build/lib.linux-i686-2.7/PIL/SunImagePlugin.py | 26 | #
# The Python Imaging Library.
# $Id$
#
# Sun image file handling
#
# History:
# 1995-09-10 fl Created
# 1996-05-28 fl Fixed 32-bit alignment
# 1998-12-29 fl Import ImagePalette module
# 2001-12-18 fl Fixed palette loading (from Jean-Claude Rimbault)
#
# Copyright (c) 1997-2001 by Secret Labs AB
# Copyright (c... |
dekked/dynamodb-mock | refs/heads/master | ddbmock/operations/batch_write_item.py | 3 | # -*- coding: utf-8 -*-
from ddbmock.database import dynamodb
def batch_write_item(post):
#TODO: limit to 25/batch
#TODO: unprocessed keys
return {
"Responses": dynamodb.write_batch(post[u'RequestItems']),
}
|
cfg2015/EPT-2015-2 | refs/heads/master | addons/anonymization/anonymization.py | 77 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# ... |
kiyoto/statsmodels | refs/heads/master | docs/source/conf.py | 27 | # -*- coding: utf-8 -*-
#
# statsmodels documentation build configuration file, created by
# sphinx-quickstart on Sat Jan 22 11:17:58 2011.
#
# 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.
#
#... |
guardicore/monkey | refs/heads/develop | monkey/infection_monkey/exploit/zerologon_utils/wmiexec.py | 1 | # Copyright (c) 2000 SecureAuth Corporation. All rights
# reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of condit... |
fneuorg/fneuproject | refs/heads/master | codeclib/fillib/util/settings.py | 1 | """
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 program is distributed in the hope that it will be useful,
but WITHOUT... |
victorbriz/mpv | refs/heads/master | waftools/detections/compiler.py | 1 | from waflib import Utils
def __get_cc_env_vars__(cc):
cmd = cc + ['-dM', '-E', '-']
try:
p = Utils.subprocess.Popen(cmd, stdin=Utils.subprocess.PIPE,
stdout=Utils.subprocess.PIPE,
stderr=Utils.subprocess.PIPE)
p.std... |
mitsuse/salada | refs/heads/master | salada/__init__.py | 27 | #!/usr/bin/env python
# coding: utf-8
|
rseubert/scikit-learn | refs/heads/master | examples/linear_model/plot_ransac.py | 250 | """
===========================================
Robust linear model estimation using RANSAC
===========================================
In this example we see how to robustly fit a linear model to faulty data using
the RANSAC algorithm.
"""
import numpy as np
from matplotlib import pyplot as plt
from sklearn import ... |
eahneahn/free | refs/heads/master | lib/python2.7/site-packages/PIL/ImageShow.py | 7 | #
# The Python Imaging Library.
# $Id$
#
# im.show() drivers
#
# History:
# 2008-04-06 fl Created
#
# Copyright (c) Secret Labs AB 2008.
#
# See the README file for information on usage and redistribution.
#
from __future__ import print_function
from PIL import Image
import os, sys
if(sys.version_info >= (3, 3)):
... |
yarikoptic/pystatsmodels | refs/heads/master | statsmodels/regression/tests/test_glsar_gretl.py | 3 | # -*- coding: utf-8 -*-
"""Tests of GLSAR and diagnostics against Gretl
Created on Thu Feb 02 21:15:47 2012
Author: Josef Perktold
License: BSD-3
"""
import os
import numpy as np
from numpy.testing import (assert_almost_equal, assert_equal,
assert_approx_equal, assert_array_less)
from s... |
40223246/0622cdb-Final-TEST2-1 | refs/heads/master | static/Brython3.1.3-20150514-095342/Lib/pydoc_data/topics.py | 694 | # -*- coding: utf-8 -*-
# Autogenerated by Sphinx on Sat Mar 23 15:42:31 2013
topics = {'assert': '\nThe ``assert`` statement\n************************\n\nAssert statements are a convenient way to insert debugging assertions\ninto a program:\n\n assert_stmt ::= "assert" expression ["," expression]\n\nThe simple form,... |
joachimwolff/bioconda-recipes | refs/heads/master | recipes/goslimmer/goslimmer.py | 33 | #!/usr/bin/env python
#
# Wrapper script for Java Conda packages that ensures that the java runtime is invoked with the right options.
# Adapted from the peptide shaker python wrapper.
#
# Program Parameters
#
import os
import subprocess
import sys
import shutil
from os import access
from os import getenv
from os imp... |
jdsika/TUM_HOly | refs/heads/master | openrave/sympy/polys/domains/groundtypes.py | 6 | """Ground types for various mathematical domains in SymPy. """
from sympy.external import import_module
HAS_GMPY = True
# Versions of gmpy prior to 1.03 do not work correctly with int(largempz)
# For example, int(gmpy.mpz(2**256)) would raise OverflowError.
# See issue 1881.
gmpy = import_module('gmpy', min_module_... |
kalxas/geonode | refs/heads/master | geonode/services/forms.py | 13 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2017 OSGeo
#
# 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 ... |
msebire/intellij-community | refs/heads/master | python/helpers/pydev/tests_pydevd_python/_debugger_case7.py | 98 | def Call():
variable_for_test_1 = 10
variable_for_test_2 = 20
variable_for_test_3 = 30
if __name__ == '__main__':
Call()
print('TEST SUCEEDED!')
|
Yuriy-Leonov/nova | refs/heads/master | nova/virt/driver.py | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Justin Santa Barbara
# 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.apach... |
gdgellatly/OCB1 | refs/heads/7.0 | addons/auth_openid/utils.py | 428 | ##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General P... |
xfournet/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/contrib/admin/actions.py | 83 | """
Built-in, globally-available admin actions.
"""
from django import template
from django.core.exceptions import PermissionDenied
from django.contrib.admin import helpers
from django.contrib.admin.util import get_deleted_objects, model_ngettext
from django.db import router
from django.shortcuts import render_to_resp... |
Jorge-Rodriguez/ansible | refs/heads/devel | lib/ansible/modules/network/cnos/cnos_l3_interface.py | 9 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
#
# Copyright (C) 2019 Lenovo, Inc.
# (c) 2019, Ansible by Red Hat, inc
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the term... |
soap-DEIM/qemu-linaro | refs/heads/master | QMP/qmp.py | 65 | # QEMU Monitor Protocol Python class
#
# Copyright (C) 2009, 2010 Red Hat Inc.
#
# Authors:
# Luiz Capitulino <lcapitulino@redhat.com>
#
# This work is licensed under the terms of the GNU GPL, version 2. See
# the COPYING file in the top-level directory.
import json
import errno
import socket
class QMPError(Except... |
davidalger/magento-malware-scanner | refs/heads/master | mwscan/tests/test_mwscan.py | 1 | import os
import time
from unittest import TestCase
from mwscan import scan, settings
from mwscan.ruleset import Files
from collections import namedtuple
try:
from unittest import mock
except ImportError:
import mock
class TestWebMalwareScanner(TestCase):
def _load_file_rules(self, path):
args =... |
dfang/odoo | refs/heads/10.0 | addons/hr_timesheet/report/__init__.py | 24 | import project_report
|
kalxas/geonode | refs/heads/master | geonode/catalogue/backends/pycsw_http.py | 32 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# 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 ... |
kaichogami/sympy | refs/heads/master | sympy/matrices/expressions/tests/test_matmul.py | 16 | from sympy.core import I, symbols, Basic
from sympy.functions import adjoint, transpose
from sympy.matrices import (Identity, Inverse, Matrix, MatrixSymbol, ZeroMatrix,
eye, ImmutableMatrix)
from sympy.matrices.expressions import Adjoint, Transpose, det, MatPow
from sympy.matrices.expressions.matmul import (fac... |
ccomb/OpenUpgrade | refs/heads/master | addons/hw_posbox_upgrade/controllers/main.py | 45 | # -*- coding: utf-8 -*-
import logging
import os
import time
import openerp
import openerp.addons.hw_proxy.controllers.main as hw_proxy
import threading
from openerp import http
from openerp.http import request
from openerp.tools.translate import _
_logger = logging.getLogger(__name__)
upgrade_template = """
<!DOCTY... |
zstackio/zstack-woodpecker | refs/heads/master | integrationtest/vm/virtualrouter/vip/test_multi_lbs_with_vip.py | 2 | '''
Test load balance.
Test step:
1. Create 2 VM with load balance l3 network service.
2. Create a LB with 2 VMs' nic
3. Check the LB
4. Destroy VMs
@author: czhou25
'''
import os
import zstackwoodpecker.test_util as test_util
import zstackwoodpecker.test_lib as test_lib
import zst... |
google-code/android-scripting | refs/heads/master | python/src/Lib/encodings/mac_greek.py | 593 | """ Python Character Mapping Codec mac_greek generated from 'MAPPINGS/VENDORS/APPLE/GREEK.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,input,err... |
biolab/orange | refs/heads/master | Orange/OrangeCanvas/gui/tests/test_dock.py | 16 | """
Tests for the DockWidget.
"""
from PyQt4.QtGui import QWidget, QMainWindow, QListView, QTextEdit, \
QToolButton, QStringListModel, QHBoxLayout, QLabel
from PyQt4.QtCore import Qt
from .. import test
from ..dock import CollapsibleDockWidget
class TestDock(test.QAppTestCase):
def tes... |
radlws/AWS-ElasticBeanstalk-CLI | refs/heads/master | eb/linux/python3/lib/aws/requests/packages/charade/mbcsgroupprober.py | 8 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer.... |
emiliojsf/sogo | refs/heads/master | Tests/Integration/test-config.py | 6 | #!/usr/bin/python
from config import hostname, port, username, password, mailserver, subscriber_username, attendee1, attendee1_delegate
import sogotests
import unittest
import time
class CalDAVITIPDelegationTest(unittest.TestCase):
def testConfigPY(self):
""" config.py validation """
try:
... |
SylvainDe/morse-talk | refs/heads/master | morse_talk/decoding.py | 1 | """
Functions to decode messages
"""
# Copyright (C) 2015 by
# Himanshu Mishra <himanshu2014iit@gmail.com>
# All rights reserved.
# GNU license.
from . import encoding
__all__ = ['decode']
def decode(code, encoding_type='default'):
"""Converts a string of morse code into English message
The enc... |
anpingli/openshift-ansible | refs/heads/master | roles/lib_openshift/src/test/unit/test_oc_adm_registry.py | 45 | #!/usr/bin/env python
'''
Unit tests for oc adm registry
'''
import os
import six
import sys
import unittest
import mock
# Removing invalid variable names for tests so that I can
# keep them brief
# pylint: disable=invalid-name,no-name-in-module
# Disable import-error b/c our libraries aren't loaded in jenkins
# pyl... |
myerpengine/odoo | refs/heads/master | openerp/addons/base/module/module.py | 29 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2013 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.