repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
jsynacek/systemd
refs/heads/master
tools/make-autosuspend-rules.py
13
#!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-2.1+ # Generate autosuspend rules for devices that have been whitelisted (IE tested) # by the Chromium OS team. Please keep this script in sync with: # https://chromium.googlesource.com/chromiumos/platform2/+/master/power_manager/udev/gen_autosuspend_rules.py imp...
pigeonflight/strider-plone
refs/heads/master
docker/appengine/lib/django-1.2/tests/regressiontests/syndication/tests.py
39
import datetime from django.contrib.syndication import feeds, views from django.core.exceptions import ImproperlyConfigured from django.test import TestCase from django.utils import tzinfo from django.utils.feedgenerator import rfc2822_date, rfc3339_date from models import Entry from xml.dom import minidom try: se...
ahartel/brick
refs/heads/master
source/waf/primetime.py
2
import os,re,subprocess from waflib import Task,Errors,TaskGen,Configure,Node,Logs from brick_general import ChattyBrickTask from TclParser import * def configure(conf): """This function gets called by waf upon loading of this module in a configure method""" conf.load('brick_general') if not conf.env.BRICK_LOGFIL...
d40223223/2015cdbg6team0622
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/urllib/parse.py
735
"""Parse (absolute and relative) URLs. urlparse module is based upon the following RFC specifications. RFC 3986 (STD66): "Uniform Resource Identifiers" by T. Berners-Lee, R. Fielding and L. Masinter, January 2005. RFC 2732 : "Format for Literal IPv6 Addresses in URL's by R.Hinden, B.Carpenter and L.Masinter, Decemb...
kozmikkick/KozmiKKernel-HTC-One
refs/heads/master
arch/ia64/scripts/unwcheck.py
13143
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
shaanlan/youtube-dl
refs/heads/master
youtube_dl/extractor/firstpost.py
124
from __future__ import unicode_literals from .common import InfoExtractor class FirstpostIE(InfoExtractor): _VALID_URL = r'http://(?:www\.)?firstpost\.com/[^/]+/.*-(?P<id>[0-9]+)\.html' _TEST = { 'url': 'http://www.firstpost.com/india/india-to-launch-indigenous-aircraft-carrier-monday-1025403.html',...
wdv4758h/ZipPy
refs/heads/master
edu.uci.python.benchmark/src/benchmarks/sympy/sympy/simplify/epathtools.py
25
"""Tools for manipulation of expressions using paths. """ from __future__ import print_function, division from sympy.core.compatibility import xrange from sympy.core import Basic class EPath(object): r""" Manipulate expressions using paths. EPath grammar in EBNF notation:: literal ::= /[A-Za...
nitzmahone/ansible
refs/heads/devel
test/sanity/code-smell/use-compat-six.py
68
#!/usr/bin/env python import os import re import sys def main(): skip = set([ 'test/sanity/code-smell/%s' % os.path.basename(__file__), # digital_ocean is checking for six because dopy doesn't specify the # requirement on six so it needs to try importing six to give the correct error mess...
damouse/pyparted
refs/heads/master
tests/test__ped_disktype.py
3
# # Copyright (C) 2009-2011 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 program is distributed in the hope that it wi...
xbezdick/tempest
refs/heads/master
tempest/api/compute/floating_ips/test_list_floating_ips.py
9
# Copyright 2012 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 requ...
XiaoJiang/linux-3.4.4
refs/heads/master
tools/perf/scripts/python/netdev-times.py
11271
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
jj0hns0n/geonode
refs/heads/master
geonode/contrib/mp/authorisation.py
17
# -*- 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 ...
miguelpalacio/python-for-android
refs/heads/master
python3-alpha/python-libs/pyxmpp2/roster.py
46
# # (C) Copyright 2003-2011 Jacek Konieczny <jajcus@jajcus.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License Version # 2.1 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be u...
jordotech/satchmofork
refs/heads/master
satchmo/apps/satchmo_store/shop/utils.py
14
from django.contrib.sites.models import SiteManager def is_multihost_enabled(): return getattr(SiteManager, 'MULTIHOST', False) def clean_field(form, field_name): return form.fields[field_name].clean(form.data.get(field_name))
dset0x/invenio
refs/heads/master
invenio/legacy/oairepository/admin.py
2
# This file is part of Invenio. # Copyright (C) 2009, 2010, 2011, 2012 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version...
florentx/OpenUpgrade
refs/heads/8.0
addons/hr_applicant_document/models/__init__.py
390
# -*- coding: utf-8 -*- import hr_applicant
meyerson/luigi
refs/heads/master
luigi/six.py
65
"""Utilities for writing code that runs on Python 2 and 3 In luigi, we hard-copy this file into the project itself, to ensure that all luigi users use the same version of six. """ # Copyright (c) 2010-2015 Benjamin Peterson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this so...
vlievin/VRAE-Tensorflow
refs/heads/master
batch.py
2
#!/usr/bin/env python """ An object to pad and generate batches of data for the VRAE model __author__ = "Valentin Lievin, DTU, Denmark" __copyright__ = "Copyright 2017, Valentin Lievin" __credits__ = ["Valentin Lievin"] __license__ = "GPL" __version__ = "1.0.1" __maintainer__ = "Valentin Lievin" __email__ = "valentin....
horuscentro/android_kernel_motorola_msm8226
refs/heads/lollipop
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
bzennn/blog_flask
refs/heads/master
python/lib/python3.5/site-packages/sqlalchemy/dialects/mysql/cymysql.py
33
# mysql/cymysql.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: mysql+cymysql :name: CyMySQL :dbapi: cymysql :connect...
akosel/servo
refs/heads/master
tests/wpt/run_wpt.py
58
# 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/. #!/usr/bin/env python import run paths = {"include_manifest": run.wpt_path("include.ini"), "config": run.wpt_...
cooncesean/remotestatus
refs/heads/master
remotestatus/conf.py
1
from django.conf import settings # Frequency with which checks will be made to the remote boxes (default is 10 min.) REMOTE_CHECK_FREQUENCY = getattr(settings, 'RS_REMOTE_CHECK_FREQUENCY', 10 * 60 * 60) DEFAULT_KEY_FILE = getattr(settings, 'RS_KEY_FILE', None) DEFAULT_KNOWN_HOSTS_FILE = getattr(settings, 'RS_KNOWN_HO...
verycumbersome/the-blue-alliance
refs/heads/master
helpers/insight_manipulator.py
12
from helpers.manipulator_base import ManipulatorBase class InsightManipulator(ManipulatorBase): """ Handle Insight database writes. """ @classmethod def updateMerge(self, new_insight, old_insight, auto_union=True): """ Given an "old" and a "new" Insight object, replace the fields ...
soncco/asistencia
refs/heads/master
xhtml2pdf/w3c/cssParser.py
23
#!/usr/bin/env python ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##~ Copyright (C) 2002-2004 TechGame Networks, LLC. ##~ ##~ This library is free software; you can redistribute it and/or ##~ modify it under the terms of the BSD style License as found in the ##~ LICENSE file included with this distribution....
ascott1/regulations-parser
refs/heads/master
tests/api_writer_tests.py
4
import json import os import shutil import tempfile from unittest import TestCase from mock import patch from regparser.api_writer import * from regparser.tree.struct import Node from regparser.notice.diff import Amendment, DesignateAmendment import settings class FSWriteContentTest(TestCase): def setUp(self): ...
linebp/pandas
refs/heads/master
pandas/tests/util/test_hashing.py
12
import pytest import datetime from warnings import catch_warnings import numpy as np import pandas as pd from pandas import DataFrame, Series, Index, MultiIndex from pandas.util import hash_array, hash_pandas_object from pandas.core.util.hashing import hash_tuples, hash_tuple, _hash_scalar import pandas.util.testing ...
lmazuel/azure-sdk-for-python
refs/heads/master
azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/__init__.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 ...
bbsan2k/nzbToMedia
refs/heads/nightly
libs/unidecode/x02f.py
252
data = ( '[?] ', # 0x00 '[?] ', # 0x01 '[?] ', # 0x02 '[?] ', # 0x03 '[?] ', # 0x04 '[?] ', # 0x05 '[?] ', # 0x06 '[?] ', # 0x07 '[?] ', # 0x08 '[?] ', # 0x09 '[?] ', # 0x0a '[?] ', # 0x0b '[?] ', # 0x0c '[?] ', # 0x0d '[?] ', # 0x0e '[?] ', # 0x0f '[?] ', # 0x10 '[?] ...
jdmonaco/grid-remapping-model
refs/heads/master
src/tools/images.py
1
#encoding: utf-8 """ tools.images -- Toolbox functions for creating image output Exported namespace: image_blast, array_to_rgba, array_to_image, diffmap Written by Joe Monaco Center for Theoretical Neuroscience Copyright (c) 2007-2008 Columbia Unversity. All Rights Reserved. """ import os as _os import numpy as _N...
pablorecio/djangae
refs/heads/master
setup.py
7
import os from setuptools import setup, find_packages NAME = 'djangae' PACKAGES = find_packages() DESCRIPTION = 'Django integration with Google App Engine' URL = "https://github.com/potatolondon/djangae" LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() AUTHOR = 'Potato London Ltd.'...
ahu-odoo/odoo
refs/heads/master
addons/hw_posbox_upgrade/controllers/main.py
172
# -*- 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...
knowsis/stanford-thrift
refs/heads/develop
scripts/coref_client.py
1
#!/usr/bin/env python from corenlp import StanfordCoreNLP from corenlp.ttypes import * from thrift import Thrift from thrift.transport import TSocket, TTransport from thrift.protocol import TBinaryProtocol #from bs4 import UnicodeDammit #import re import sys # get command line arguments args = sys.arg...
dgladkov/django
refs/heads/master
django/conf/urls/i18n.py
15
from django.conf import settings from django.conf.urls import url from django.urls import LocaleRegexURLResolver from django.views.i18n import set_language def i18n_patterns(*urls): """ Adds the language code prefix to every URL pattern within this function. This may only be used in the root URLconf, not ...
RealDolos/volaparrot
refs/heads/master
volaparrot/extracommands/upload.py
1
""" The MIT License (MIT) Copyright © 2015 RealDolos Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publi...
rmcgibbo/scipy
refs/heads/master
scipy/_lib/_util.py
36
from __future__ import division, print_function, absolute_import import functools import operator import sys import warnings import numbers import numpy as np def _aligned_zeros(shape, dtype=float, order="C", align=None): """Allocate a new ndarray with aligned memory. Primary use case for this currently is...
carloscadena/django-imager
refs/heads/master
imagersite/imagersite/urls.py
1
"""imagersite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class...
keithroe/vtkoptix
refs/heads/master
ThirdParty/Twisted/twisted/internet/error.py
23
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Exceptions and errors for use in twisted.internet modules. """ from __future__ import division, absolute_import import socket from twisted.python import deprecate from twisted.python.versions import Version class BindError(Exception): ...
codesters/codesters
refs/heads/master
registration/tests/__init__.py
66
from registration.tests.default_backend import * from registration.tests.forms import * from registration.tests.models import * from registration.tests.simple_backend import *
CORDEA/analysis_of_1000genomes-data
refs/heads/master
programs/machine_learning/create_cpssnps.py
1
#!/usr/bin/env python # encoding:utf-8 # # Copyright [2015] [Yoshihiro Tanaka] # 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 requir...
idaholab/civet
refs/heads/master
client/settings.py
1
# Copyright 2016 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
isyippee/nova
refs/heads/master
nova/api/openstack/compute/legacy_v2/contrib/extended_ips_mac.py
79
# Copyright 2013 IBM Corp. # # 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 w...
cyx1231st/nova
refs/heads/eventually-consistent-host-state-mitaka
nova/tests/unit/api/openstack/compute/test_extensions.py
27
# Copyright 2013 IBM Corp. # Copyright 2014 NEC Corporation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
alexthered/kienhoc-platform
refs/heads/master
common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py
12
""" Module for the dual-branch fall-back Draft->Published Versioning ModuleStore """ from xmodule.modulestore.split_mongo.split import SplitMongoModuleStore, EXCLUDE_ALL from xmodule.exceptions import InvalidVersionError from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.exceptions import Insuffi...
xcteki/limbo-android
refs/heads/master
jni/glib/gobject/gobject.py
85
import gdb import glib import gdb.backtrace import gdb.command.backtrace # This is not quite right, as local vars may override symname def read_global_var (symname): return gdb.selected_frame().read_var(symname) def g_type_to_name (gtype): def lookup_fundamental_type (typenode): if typenode == 0: ...
Adarnof/allianceauth
refs/heads/master
allianceauth/services/modules/phpbb3/migrations/0001_initial.py
6
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-12-12 03:28 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('auth',...
zscott/PanAndTilt
refs/heads/master
device/Adafruit_I2C.py
116
#!/usr/bin/python import re import smbus # =========================================================================== # Adafruit_I2C Class # =========================================================================== class Adafruit_I2C(object): @staticmethod def getPiRevision(): "Gets the version number of ...
brainwane/zulip
refs/heads/master
zerver/migrations/0278_remove_userprofile_alert_words.py
7
# Generated by Django 2.2.10 on 2020-03-23 20:08 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('zerver', '0277_migrate_alert_word'), ] operations = [ migrations.RemoveField( model_name='userprofile', name='alert_words',...
Ziemin/telepathy-gabble
refs/heads/untested-otr
tests/twisted/tubes/offer-private-dbus-tube.py
2
"""Test D-Bus private tube support""" import dbus from dbus.connection import Connection from dbus.lowlevel import SignalMessage from servicetest import call_async, EventPattern, unwrap, watch_tube_signals,\ assertContains, assertEquals from gabbletest import sync_stream, make_presence import constants as cs impo...
grani/grpc
refs/heads/UnityClient.1.2.0
src/python/grpcio_tests/tests/http2/negative_http2_client.py
9
# Copyright 2016, 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 f...
dimagol/trex-core
refs/heads/master
scripts/external_libs/scapy-2.3.1/python3/scapy/layers/tftp.py
17
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license """ TFTP (Trivial File Transfer Protocol). """ import os,random from scapy.packet import * from scapy.fields import * fr...
nzavagli/UnrealPy
refs/heads/master
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Lib/test/test_typechecks.py
137
"""Unit tests for __instancecheck__ and __subclasscheck__.""" import unittest from test import test_support class ABC(type): def __instancecheck__(cls, inst): """Implement isinstance(inst, cls).""" return any(cls.__subclasscheck__(c) for c in set([type(inst), inst.__class__]))...
Kazade/NeHe-Website
refs/heads/master
google_appengine/lib/django-1.4/django/core/files/storage.py
78
import os import errno import urlparse import itertools from datetime import datetime from django.conf import settings from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation from django.core.files import locks, File from django.core.files.move import file_move_safe from django.utils.encoding impo...
Francis-Liu/animated-broccoli
refs/heads/master
nova/virt/libvirt/volume/quobyte.py
18
# Copyright (c) 2015 Quobyte 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...
motion2015/a3
refs/heads/a3
common/test/acceptance/tests/lms/test_lms_acid_xblock.py
14
# -*- coding: utf-8 -*- """ End-to-end tests for the LMS. """ from unittest import expectedFailure, skip from ..helpers import UniqueCourseTest from ...pages.lms.auto_auth import AutoAuthPage from ...pages.lms.course_info import CourseInfoPage from ...pages.lms.tab_nav import TabNavPage from ...pages.xblock.acid impo...
ufaks/addons-yelizariev
refs/heads/8.0
currency_rate_update/__init__.py
26
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008 Camtocamp SA # @author JB Aubort, Nicolas Bessi, Joel Grand-Guillaume # European Central Bank and Polish National Bank invented by Grzegorz Grzelak # Banxico implemented by Agustin C...
lundjordan/services
refs/heads/master
src/codecoverage/crawler/settings.py
1
# -*- coding: utf-8 -*- # 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/. from __future__ import absolute_import import base64 import os import cli_common.taskcluster im...
RealTimeWeb/datasets
refs/heads/master
datasets/python/business_dynamics/setup.py
1
from setuptools import setup import os.path setup( name='Business Dynamics', version='1', py_modules=['business_dynamics'], data_files=[('', [ "./business_dynamics.db" ])] )
rickerc/ceilometer_audit
refs/heads/cis-havana-staging
ceilometer/tests/api.py
3
# -*- encoding: utf-8 -*- # # Copyright © 2012 New Dream Network, LLC (DreamHost) # # Author: Doug Hellmann <doug.hellmann@dreamhost.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 obtain # a copy of the License at # # ...
Anonymouslemming/ansible
refs/heads/devel
lib/ansible/executor/process/__init__.py
2520
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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) an...
alilotfi/django
refs/heads/master
django/contrib/messages/api.py
512
from django.contrib.messages import constants from django.contrib.messages.storage import default_storage from django.http import HttpRequest __all__ = ( 'add_message', 'get_messages', 'get_level', 'set_level', 'debug', 'info', 'success', 'warning', 'error', 'MessageFailure', ) class MessageFailure(E...
aimas/TuniErp-8.0
refs/heads/master
addons/website_instantclick/__openerp__.py
342
{ 'name': 'Website Instantclick', 'category': 'Website', 'summary': 'Preloads and speeds up website on public browsing of the website using Instantclick.', 'version': '1.0', 'description': """ Preloads data on anonymous mode of website ========================================== """, 'au...
technologiescollege/Blockly-rduino-communication
refs/heads/master
scripts_XP/Lib/test/test_contextlib.py
4
"""Unit tests for contextlib.py, and other context managers.""" import io import sys import tempfile import unittest from contextlib import * # Tests __all__ from test import support try: import threading except ImportError: threading = None class ContextManagerTestCase(unittest.TestCase): def test_con...
clan-wot/rewards
refs/heads/master
src/django_tables2/__init__.py
1
# coding: utf-8 # pylint: disable=W0611 from .tables import Table from .columns import (BooleanColumn, Column, CheckBoxColumn, DateColumn, DateTimeColumn, EmailColumn, FileColumn, LinkColumn, TemplateColumn, URLColumn, TimeColumn) from .config import RequestConfig from .uti...
web30s/odoo-9.0c-20160402
refs/heads/master
hello/templates/openerp/addons/hr_payroll/res_config.py
47
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp.osv import fields, osv class hr_payroll_configuration(osv.osv_memory): _name = 'hr.payroll.config.settings' _inherit = 'res.config.settings' _columns = { 'module_hr_payroll_account': fie...
Opentrons/labware
refs/heads/master
api/src/opentrons/tools/factory_test.py
3
import asyncio import atexit import functools import logging import os import subprocess from typing import Dict, TYPE_CHECKING from opentrons.config import infer_config_base_dir from opentrons.drivers import serial_communication if TYPE_CHECKING: from opentrons.drivers.smoothie_drivers.driver_3_0\ import ...
blademainer/intellij-community
refs/heads/master
python/testData/mover/lastComment_afterDown.py
166
def f(): if True: a = 1 else: a = 2 #comment <caret>
jj0hns0n/geonode
refs/heads/master
geonode/geoserver/context_processors.py
15
# -*- 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 ...
goodwinnk/intellij-community
refs/heads/master
python/testData/inspections/PyStringFormatInspection/PackedTupleInsideTuple.py
29
"{3}".format(*(1, 2, *(3, 4))) <warning descr="Too few arguments for format string">"{4}"</warning>.format(*(1, 2, *(3, 4)))
mouhb/cjdns
refs/heads/master
node_build/dependencies/libuv/build/gyp/test/hard_dependency/gyptest-exported-hard-dependency.py
350
#!/usr/bin/env python # Copyright (c) 2009 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. """ Verify that a hard_dependency that is exported is pulled in as a dependency for a target if the target is a static library and if the ge...
pheanex/xpython
refs/heads/master
exercises/largest-series-product/largest_series_product_test.py
1
"""Tests for the largest-series-product exercise Implementation note: In case of invalid inputs to the 'largest_product' function your program should raise a ValueError with a meaningful error message. Feel free to reuse your code from the 'series' exercise! """ import unittest from largest_series_product import lar...
pragalakis/100-python-projects
refs/heads/master
numbers/next-prime-number.py
1
import math def is_prime(): x = [2] for value in range(3,1000): if value % 2 == 0 and value > 2: continue if all(value % i for i in range(3, int(math.sqrt(value)) + 1, 2)): x.append(value) return x def msg(): x = is_prime() for value in range(len(x)): ...
stack-of-tasks/rbdlpy
refs/heads/master
tutorial/lib/python2.7/site-packages/OpenGLContext/resources/disk_icon_hi_png.py
2
# -*- coding: ISO-8859-1 -*- """Resource disk_icon_hi_png (from file disk_icon_hi.png)""" # written by resourcepackage: (1, 0, 1) source = 'disk_icon_hi.png' package = 'OpenGLContext.resources' data = "‰PNG\015\012\032\012\000\000\000\015IHDR\000\000\000@\000\000\000@\010\006\000\000\000ªiqÞ\000\000\000\006bKGD\000ÿ\00...
daenamkim/ansible
refs/heads/devel
test/integration/targets/module_utils/module_utils/spam1/ham/eggs/__init__.py
298
data = 'spam1'
gangadharkadam/verveerp
refs/heads/v5.0
erpnext/manufacturing/doctype/workstation_working_hour/workstation_working_hour.py
121
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class WorkstationWorkingHour(Document): pass
switchkiller/ProjDjanko
refs/heads/master
lib/python2.7/site-packages/wheel/util.py
219
"""Utility functions.""" import sys import os import base64 import json import hashlib __all__ = ['urlsafe_b64encode', 'urlsafe_b64decode', 'utf8', 'to_json', 'from_json', 'matches_requirement'] def urlsafe_b64encode(data): """urlsafe_b64encode without padding""" return base64.urlsafe_b64encode(da...
windelbouwman/ppci-mirror
refs/heads/master
test/format/test_srecord.py
1
import unittest from ppci.format.srecord import SRecord class SRecordTestCase(unittest.TestCase): def test_hdr_line(self): record = SRecord(0, 0, 'HDR'.encode('ascii')) self.assertEqual(record.to_line(), 'S00600004844521B') def test_wiki_record(self): record = SRecord(5, 3, bytes()) ...
zymtech/Scrapiders
refs/heads/master
jd_51job/jd_51job/spiders/jd.py
1
# -*- coding : uft-8 -*- import scrapy import urllib from jd_51job.items import Jd51JobItem from scrapy.http import Request from scrapy.exceptions import IgnoreRequest import os import datetime import re class Jd51JobSpider(scrapy.Spider): name = "jd_51job" allowed_domain = ["51job.com"] datafile = os....
sergeykolychev/mxnet
refs/heads/master
example/gluon/dcgan.py
30
# 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...
swannapa/erpnext
refs/heads/develop
erpnext/patches/v8_0/update_supplier_address_in_stock_entry.py
43
# Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): # copy supplier_address to address_display, and set supplier_address to blank stock_entries = frappe.db.sql(""" select name, purchase_order, s...
jianghaolu/AutoRest
refs/heads/master
src/generator/AutoRest.Python.Tests/Expected/AcceptanceTests/BodyDate/auto_rest_date_test_service/version.py
1003
# 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 ...
0k/OpenUpgrade
refs/heads/8.0
addons/base_vat/res_company.py
448
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
mycodeday/crm-platform
refs/heads/master
product/wizard/product_price.py
380
# -*- 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...
rezometz/django-paiji2-survey
refs/heads/master
paiji2_survey/models.py
1
from django.db import models from django.utils.translation import ugettext as _ from django.utils.timezone import now from django.utils.functional import cached_property # from HTMLParser import HTMLParser try: from django.contrib.auth import get_user_model User = get_user_model() except: from django.con...
aspidites/django
refs/heads/master
django/db/models/aggregates.py
161
""" Classes to represent the definitions of aggregate functions. """ from django.core.exceptions import FieldError from django.db.models.expressions import Func, Value from django.db.models.fields import FloatField, IntegerField __all__ = [ 'Aggregate', 'Avg', 'Count', 'Max', 'Min', 'StdDev', 'Sum', 'Variance', ] ...
bmihelac/django-cookie-consent
refs/heads/master
cookie_consent/templatetags/cookie_consent_tags.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import template try: from django.urls import reverse except ImportError: from django.core.urlresolvers import reverse from cookie_consent.util import ( get_accepted_cookies, get_cookie_string, get_cookie_value_from_request...
batmancn/MyLife
refs/heads/master
learn/demos/python_demo/core_python_programming_code/ch06/alt/NoneIndex.py
3
#!/usr/bin/python s = 'abcde' #for x,y in enumerate(s): # print s[x:], s[:x] #for i in range(len(s), -1, -1): #print s[i:], s[:i], s[i::-1], s[:i:-1] s = 'abcde' for i in [None] + range(-1, -len(s), -1): print s[:i] raw_input()
equitania/odoo-pentaho
refs/heads/8.0
modules/pentaho_reports/core_newapi.py
1
# -*- encoding: utf-8 -*- # As code is written in the new_api structure, it should go in here and be removed from core.py from openerp import models, fields, api, _ from openerp.exceptions import except_orm, AccessDenied from openerp import sql_db, SUPERUSER_ID SKIP_DATE = 'SKIP_DATE_RECORDING' import logging _log...
ironbee/ironbee
refs/heads/master
libs/libinjection/misc/mysql_implicit_tests.py
7
#!/usr/bin/python mysql_ops = ( 'AND', '&&', '=', '&', '|', '^', 'DIV', '/', '<=>', '>=', '>', '<<', '<=', '<', 'LIKE', '-', '%', 'MOD', '!=', '<>', 'NOT LIKE', 'NOT REGEXP', 'OR', '||', '+', 'REGEXP', '>>', ...
rubencabrera/odoo
refs/heads/8.0
addons/mail/static/scripts/openerp_mailgate.py
316
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-TODAY OpenERP S.A. (http://www.openerp.com) # # This program ...
scrapy-plugins/scrapy-splash
refs/heads/master
scrapy_splash/response.py
3
# -*- coding: utf-8 -*- from __future__ import absolute_import import json import base64 import re from scrapy.http import Response, TextResponse from scrapy import Selector from scrapy_splash.utils import headers_to_scrapy def get_splash_status(resp): return getattr(resp, 'splash_response_status', resp.status...
miurahr/translate
refs/heads/master
translate/search/segment.py
33
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2006 Zuza Software Foundation # # This file is part of translate. # # 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 o...
pylixm/sae-django-demo
refs/heads/master
django1.7-sae/site-packages/django/contrib/admin/__init__.py
72
# ACTION_CHECKBOX_NAME is unused, but should stay since its import from here # has been referenced in documentation. from django.contrib.admin.decorators import register from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME from django.contrib.admin.options import (HORIZONTAL, VERTICAL, ModelAdmin, StackedI...
mdaniel/intellij-community
refs/heads/master
python/testData/copyPaste/multiLine/IndentMulti11.src.py
332
class C: def foo(self): <selection>x = 1 y = 2</selection>
larrybradley/astropy
refs/heads/remote-tests
astropy/io/votable/validator/main.py
5
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Validates a large collection of web-accessible VOTable files, and generates a report as a directory tree of HTML files. """ # STDLIB import os # LOCAL from astropy.utils.data import get_pkg_data_filename from . import html from . import result __al...
ivan-fedorov/intellij-community
refs/heads/master
python/testData/quickFixes/PyWrapInExceptionQuickFixTest/inFunction.py
58
def foo(): raise <warning descr="Raising a string exception">"String"<caret> "String1"</warning>
Ziqi-Li/bknqgis
refs/heads/master
bokeh/examples/reference/models/Quadratic.py
8
import numpy as np from bokeh.models import ColumnDataSource, DataRange1d, Plot, LinearAxis, Grid from bokeh.models.glyphs import Quadratic from bokeh.io import curdoc, show N = 9 x = np.linspace(-2, 2, N) y = x**2 source = ColumnDataSource(dict( x=x, y=y, xp02=x+0.4, xp01=x+0.1, ...
lachtanek/pb138-address-visualisation
refs/heads/master
visualise.py
1
#!/usr/bin/python3 """ Runs logging and visualiserRegistry for available visualisers. """ import address_visualisation as AV from address_visualisation.visualisers import ProfaneStreetsVisualiser, BiggestTownsVisualiser, ExtremeStreetNamesVisualiser, LongestStreetsVisualiser, SquareCountVisualiser, TownWithMostStreetsV...
SlimRoms/kernel_motorola_msm8960dt-common
refs/heads/kk4.4
tools/perf/scripts/python/check-perf-trace.py
11214
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
miscaandrei/django-testapp
refs/heads/master
dbindexer/tests.py
16
from django.db import models from django.test import TestCase from .api import register_index from .lookups import StandardLookup from .resolver import resolver from djangotoolbox.fields import ListField from datetime import datetime import re class ForeignIndexed2(models.Model): name_fi2 = models.CharField(max_le...
anhstudios/swganh
refs/heads/develop
data/scripts/templates/object/tangible/furniture/city/shared_streetlamp_med_02.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 = Tangible() result.template = "object/tangible/furniture/city/shared_streetlamp_med_02.iff" result.attribute_templ...