repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
saulario/pruebas
refs/heads/master
python/pyPruebas1/setup.py
1
from setuptools import setup, find_packages setup ( name='pyPruebas1', version='0.1', packages=find_packages(), # Declare your packages' dependencies here, for eg: install_requires=['foo>=3'], # Fill in these to make your Egg ready for upload to # PyPI author='...
ddico/odoomrp-wip
refs/heads/8.0
machine_manager/models/res_users.py
13
# -*- coding: utf-8 -*- # (c) 2015 Daniel Campos - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import models, fields class ResUsers(models.Model): _inherit = 'res.users' machines = fields.Many2many('machinery', 'machine_user_rel', 'user_id', ...
yograterol/django
refs/heads/master
django/contrib/admindocs/middleware.py
477
from django import http from django.conf import settings class XViewMiddleware(object): """ Adds an X-View header to internal HEAD requests -- used by the documentation system. """ def process_view(self, request, view_func, view_args, view_kwargs): """ If the request method is HEAD and...
sarbi127/inviwo
refs/heads/master
modules/assimp/ext/assimp/port/PyAssimp/pyassimp/core.py
9
#-*- coding: UTF-8 -*- """ PyAssimp This is the main-module of PyAssimp. """ import sys if sys.version_info < (2,6): raise 'pyassimp: need python 2.6 or newer' import ctypes import os import numpy import logging; logger = logging.getLogger("pyassimp") # Attach a default, null handler, to the logger. # applic...
asedunov/intellij-community
refs/heads/master
python/educational-python/Edu-Python/resources/com/jetbrains/python/edu/user_tester.py
18
import imp import os import subprocess import sys USER_TESTS = "userTests" TEST_FAILED = "FAILED" TEST_PASSED = "PASSED" INPUT = "input" OUTPUT = "output" def get_index(logical_name, full_name): logical_name_len = len(logical_name) if full_name[:logical_name_len] == logical_name: return int(full_n...
Pedram26/Humans-vs-Aliens
refs/heads/master
HumansAliens.app/Contents/Resources/lib/python2.7/pygame/tests/freetype_tags.py
21
__tags__ = ['development'] exclude = False try: import pygame.freetype except ImportError: exclude = True if exclude: __tags__.extend(['ignore', 'subprocess_ignore'])
Nexenta/cinder
refs/heads/master
cinder/api/v3/volume_manage.py
5
# Copyright (c) 2016 Stratoscale, Ltd. # # 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 ...
chiamingyen/PythonCAD_py3
refs/heads/master
Interface/CmdIntf/cmdlinedock.py
1
# This is only needed for Python v2 but is harmless for Python v3. #import sip #sip.setapi('QString', 2) from PyQt5 import QtCore, QtGui, QtWidgets from Interface.CmdIntf.functionhandler import FunctionHandler from Kernel.pycadevent import PyCadEvent class CmdLineDock(QtWidgets.QDockWidget): ''' A docka...
peteut/ramda.py
refs/heads/master
test/test_list.py
1
import types import inspect import collections import itertools import pytest import ramda as R from ramda.shared import eq from .common import list_xf, get_arity, _is_transformer try: from collections.abc import Callable, Iterable except ImportError: from collections import Callable, Iterable @pytest.fixture...
cjayb/mne-python
refs/heads/master
mne/datasets/hf_sef/__init__.py
21
"""HF-SEF dataset.""" from .hf_sef import data_path
aperigault/ansible
refs/heads/devel
lib/ansible/modules/network/fortimanager/fmgr_fwpol_ipv4.py
18
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
tomduijf/home-assistant
refs/heads/master
homeassistant/components/notify/telegram.py
3
""" homeassistant.components.notify.telegram ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Telegram platform for notify component. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.telegram.html """ import logging import urllib from homeassistant.helpers...
jasonwee/asus-rt-n14uhp-mrtg
refs/heads/master
tmp/ve_asus-rt-n14uhp-mrtg/lib/python3.4/site-packages/django/conf/locale/es_NI/formats.py
504
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals DATE_FORMAT = r'j \d\e F \d\e Y' TIME_FORMAT = 'H:i' DATETIME_FORMAT = r'j \d\e F \d\e Y \a \l\a\s H:i' YEAR_MONTH_FORMAT = r'F \d\e Y' MONTH_DAY_FORMAT = r'j \d\e F' SHORT_DATE_...
adamncasey/servo
refs/heads/master
tests/wpt/harness/wptrunner/wptmanifest/tests/test_tokenizer.py
195
# 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/. import sys import os import unittest sys.path.insert(0, os.path.abspath("..")) from cStringIO import StringIO from .. ...
fernandog/Medusa
refs/heads/optimized
ext/sqlalchemy/orm/strategies.py
1
# orm/strategies.py # Copyright (C) 2005-2018 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 """sqlalchemy.orm.interfaces.LoaderStrategy implementations, and related Mapper...
all-of-us/raw-data-repository
refs/heads/devel
rdr_service/lib_fhir/fhirclient_4_0_0/models/researchelementdefinition.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/ResearchElementDefinition) on 2019-05-07. # 2019, SMART Health IT. from . import domainresource class ResearchElementDefinition(domainresource.DomainResource): """ A population, inter...
peiyuwang/pants
refs/heads/master
tests/python/pants_test/backend/jvm/tasks/test_jar_dependency_management_setup.py
4
# coding=utf-8 # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.backend.j...
inventree/InvenTree
refs/heads/master
InvenTree/InvenTree/settings.py
2
""" Django settings for InvenTree project. In practice the settings in this file should not be adjusted, instead settings can be configured in the config.yaml file located in the top level project directory. This allows implementation configuration to be hidden from source control, as well as separate configuration p...
edx/i18n-tools
refs/heads/master
tests/test_dummy.py
1
"""Tests of i18n/dummy.py""" import ddt from polib import POEntry from i18n import dummy from . import I18nToolTestCase,MOCK_APPLICATION_DIR @ddt.ddt class TestDummy(I18nToolTestCase): """ Tests functionality of i18n/dummy.py """ def setUp(self): super().setUp() self.converter = du...
vahtras/amy
refs/heads/master
workshops/templatetags/tags.py
1
from django import template # from django.template.defaultfilters import stringfilter from django.utils.safestring import mark_safe register = template.Library() # @register.filter(is_safe=True, needs_autoescape=True) # @stringfilter @register.simple_tag def bootstrap_tag(name): """Wrap <span> around a tag so th...
rubencabrera/odoo
refs/heads/8.0
addons/hr_timesheet_invoice/__init__.py
442
# -*- 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...
GeyerA/android_external_chromium_org
refs/heads/master
third_party/tlslite/tlslite/utils/ASN1Parser.py
80
"""Class for parsing ASN.1""" from compat import * from codec import * #Takes a byte array which has a DER TLV field at its head class ASN1Parser: def __init__(self, bytes): p = Parser(bytes) p.get(1) #skip Type #Get Length self.length = self._getASN1Length(p) #Get Value ...
40223139/2015cdaa5-12
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/_imp.py
625
"""(Extremely) low-level import machinery bits as used by importlib and imp.""" class __loader__(object):pass def _fix_co_filename(*args,**kw): raise NotImplementedError("%s:not implemented" % ('_imp.py:_fix_co_filename')) def acquire_lock(*args,**kw): """acquire_lock() -> None Acquires the interpreter's...
lordB8r/polls
refs/heads/master
ENV/lib/python2.7/site-packages/django/contrib/gis/gdal/tests/test_envelope.py
114
from django.contrib.gis.gdal import Envelope, OGRException from django.utils import unittest class TestPoint(object): def __init__(self, x, y): self.x = x self.y = y class EnvelopeTest(unittest.TestCase): def setUp(self): self.e = Envelope(0, 0, 5, 5) def test01_init(self): ...
shivam1111/odoo
refs/heads/8.0
addons/website_event/tests/__init__.py
413
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 20123TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
oliverhr/odoo
refs/heads/8.0-pos-pademobile-payment
addons/hr_holidays/__openerp__.py
260
# -*- 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...
cchurch/ansible
refs/heads/devel
lib/ansible/modules/network/avi/avi_cloud.py
24
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses...
NeCTAR-RC/nova
refs/heads/nectar/mitaka
nova/tests/functional/api_sample_tests/test_security_groups.py
8
# Copyright 2012 Nebula, Inc. # 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...
tysonholub/twilio-python
refs/heads/master
twilio/base/list_resource.py
4
class ListResource(object): def __init__(self, version): """ :param Version version: """ self._version = version """ :type: Version """
ArthurGarnier/SickRage
refs/heads/master
lib/concurrent/futures/_base.py
16
# Copyright 2009 Brian Quinlan. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. import collections import logging import threading import itertools import time import types __author__ = 'Brian Quinlan (brian@sweetapp.com)' FIRST_COMPLETED = 'FIRST_COMPLETED' FIRST_EXCEPTION = 'FIRST_EXCEPTION' ...
nishworks/bcs
refs/heads/master
bcs_server/server_logger.py
2
#!usr/bin/env python # -*-coding:utf8-*- import sys import logging from logging import handlers from config import LOG_FILENAME, MAX_SIZE_IN_KB, NUMBER_OF_FILES __doc__ = """ Logging reference: https://pymotw.com/2/logging/ Level Value ------------- CRITICAL 50 ERROR 40 WARNING ...
ohinai/mimpy
refs/heads/master
mimpy/__init__.py
1
__all__ = ["mesh", "mfd", "models"] __version__ = "0.1.0"
ObsessiveOrange/cryptocurrency_arbitrage
refs/heads/master
bterapi/__init__.py
3
# Copyright (c) 2013 Alan McIntyre from public import getDepth, getTradeHistory from trade import TradeAPI from keyhandler import KeyHandler from common import all_currencies, all_pairs, max_digits, formatCurrency, fees, formatCurrencyDigits, \ truncateAmount, truncateAmountDigits, BTERConnection
BigRoy/pyblish-rpc
refs/heads/master
tests/test_blackbox.py
1
"""Assume behaviour on part of the core Pyblish library""" import sys import pyblish_rpc.client import pyblish_rpc.server import pyblish.api import pyblish.lib import pyblish.logic from nose.tools import ( with_setup, assert_equals, assert_false, assert_true ) server = None thread = None process = ...
davinwang/caffe2
refs/heads/master
caffe2/python/toy_regression_test.py
4
# Copyright (c) 2016-present, Facebook, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
odoousers2014/LibrERP
refs/heads/master
dt_avanzosc_product_category_ext/__openerp__.py
2
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (http://tiny.be). All Rights Reserved # # # This program is free software: you can redistribute it and/or modify # ...
ct-23/home-assistant
refs/heads/dev
homeassistant/helpers/entity.py
4
"""An abstract class for entities.""" import asyncio import logging import functools as ft from timeit import default_timer as timer from typing import Optional, List from homeassistant.const import ( ATTR_ASSUMED_STATE, ATTR_FRIENDLY_NAME, ATTR_HIDDEN, ATTR_ICON, ATTR_UNIT_OF_MEASUREMENT, DEVICE_DEFAULT_NAME...
wemanuel/smry
refs/heads/master
server-auth/ls/google-cloud-sdk/platform/gsutil/third_party/protorpc/protorpc/test_util.py
24
#!/usr/bin/env python # # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ylm/volatility
refs/heads/master
volatility/plugins/linux/tty_check.py
44
# Volatility # # This file is part of Volatility. # # Volatility 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. # # Volatility is dist...
gEt-rIgHt-jR/voc
refs/heads/master
tests/structures/test_decorators.py
7
from ..utils import TranspileTestCase class DecoratorTests(TranspileTestCase): def test_simple_decorator(self): self.assertCodeExecution(""" def thing(fn): def _dec(value): print("Start decoration.") result = fn(value) ...
afeique/at
refs/heads/master
vendor/doctrine/orm/docs/en/conf.py
2448
# -*- coding: utf-8 -*- # # Doctrine 2 ORM documentation build configuration file, created by # sphinx-quickstart on Fri Dec 3 18:10:24 2010. # # 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. ...
dlareau/puzzlehunt_server
refs/heads/master
huntserver/migrations/0025_puzzle_is_meta.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-10-21 19:39 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('huntserver', '0024_auto_20181021_0015'), ] operations = [ migrations.AddFi...
ramineni/my_congress
refs/heads/master
congress/tests/datalog/test_materialized.py
2
# Copyright (c) 2014 VMware, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
tectronics/mavrec
refs/heads/master
smra/smra_portal/migrations/0016_auto__add_subquery.py
2
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Subquery' db.create_table('smra_portal_subquery', ( ('id', self.gf('django.db....
sloanyang/aquantic
refs/heads/master
Tools/Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py
122
# Copyright (C) 2012 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 ...
xupeng/redis-sa
refs/heads/master
redis_sa/sniffer.py
1
#!/usr/bin/env python """ A redis query sniffer """ import re import sys import socket import argparse from collections import defaultdict import pcap import dpkt re_args = re.compile('\*\d+') re_lens = re.compile('\$\d+') def sniff(interface, port=6379, src_ip=None, dst_ip=None): """Sniff Redis queries and re...
qiyuangong/leetcode
refs/heads/master
python/463_Island_Perimeter.py
2
class Solution(object): def islandPerimeter(self, grid): """ :type grid: List[List[int]] :rtype: int """ # https://leetcode.com/problems/island-perimeter/discuss/95001/clear-and-easy-java-solution row_num = len(grid) if row_num == 0 || len(grid[0]) == 0: ...
hojel/calibre
refs/heads/master
src/html5lib/filters/optionaltags.py
1727
from __future__ import absolute_import, division, unicode_literals from . import _base class Filter(_base.Filter): def slider(self): previous1 = previous2 = None for token in self.source: if previous1 is not None: yield previous2, previous1, token previous2...
ict-felix/stack
refs/heads/master
ofreg/registration/templatetags/form_helper.py
4
from django import template from django.utils.safestring import * register = template.Library() @register.simple_tag def field_row(form, field_name, after_html=""): field = form[field_name] errors = field.errors.as_text() if errors: errors = "<span class=\"error\">%s</span>" % errors res = "<div>%(label)s %(fie...
meteorcloudy/tensorflow
refs/heads/master
tensorflow/examples/adding_an_op/zero_out_grad_2.py
183
# 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...
kenwang815/KodiPlugins
refs/heads/master
script.module.oceanktv/lib/youtube_dl/extractor/__init__.py
89
from __future__ import unicode_literals try: from .lazy_extractors import * from .lazy_extractors import _ALL_CLASSES _LAZY_LOADER = True except ImportError: _LAZY_LOADER = False from .extractors import * _ALL_CLASSES = [ klass for name, klass in globals().items() if na...
tdicola/SmartRemoteControl
refs/heads/master
SmartRemoteControl/www/config.py
2
import os import xml.etree.ElementTree as et # Change to directory of script so relative file references work. os.chdir(os.path.dirname(os.path.abspath(__file__))) # Name of configuration file. FILE_NAME = 'activities.xml' def get_activities(): # Open the config XML file and parse all the activities. config = [] ...
dou800/php-buildpack-legacy
refs/heads/master
builds/runtimes/python-2.7.6/lib/python2.7/multiprocessing/synchronize.py
68
# # Module implementing synchronization primitives # # multiprocessing/synchronize.py # # Copyright (c) 2006-2008, R Oudkerk # 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. Redistribution...
commaai/panda
refs/heads/master
tests/gmbitbang/recv.py
1
#!/usr/bin/env python3 from panda import Panda p = Panda() p.set_safety_mode(Panda.SAFETY_ALLOUTPUT) p.set_gmlan(bus=2) #p.can_send(0xaaa, b"\x00\x00", bus=3) last_add = None while 1: ret = p.can_recv() if len(ret) > 0: add = ret[0][0] if last_add is not None and add != last_add + 1: print("MISS: ", ...
RelicOfTesla/ssdb
refs/heads/ssdb-server-windows
deps/cpy/antlr3/dottreegen.py
105
""" @package antlr3.dottreegenerator @brief ANTLR3 runtime package, tree module This module contains all support classes for AST construction and tree parsers. """ # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # All rights reserved. # # Redistribution and use in source and binary fo...
msingh172/pylearn2
refs/heads/master
pylearn2/utils/common_strings.py
49
environment_variable_essay = """ Platform-specific instructions for setting environment variables: Linux ===== On most linux setups, you can define your environment variable by adding this line to your ~/.bashrc file: export PYLEARN2_VIEWER_COMMAND="eog --new-instance" *** YOU MUST INCLUDE THE WORD "export". DO NOT ...
hastexo/edx-platform
refs/heads/master
lms/djangoapps/grades/constants.py
20
""" Constants and Enums used by Grading. """ class ScoreDatabaseTableEnum(object): """ The various database tables that store scores. """ courseware_student_module = 'csm' submissions = 'submissions' overrides = 'overrides'
stphivos/django-angular2-fullstack-devops
refs/heads/master
backend/api/migrations/0001_initial.py
2
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-05-09 12:57 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 = [ migration...
xuxiao19910803/edx
refs/heads/master
common/djangoapps/student/tests/test_credit.py
5
""" Tests for credit courses on the student dashboard. """ import unittest import datetime from mock import patch import pytz from django.conf import settings from django.core.urlresolvers import reverse from django.test.utils import override_settings from xmodule.modulestore.tests.django_utils import ModuleStoreTes...
vnsofthe/odoo-dev
refs/heads/master
addons/hr_recruitment/hr_recruitment.py
202
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
EliasTouil/simpleBlog
refs/heads/master
simpleBlog/Lib/site-packages/pip/_vendor/requests/packages/chardet/mbcsgroupprober.py
2768
######################## 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. All R...
vfalico/hydra-rpmsg
refs/heads/reversed_rx_vring_v2
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
1891
# Core.py - Python extension for perf script, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def aut...
pgonda/servo
refs/heads/master
tests/wpt/css-tests/tools/manifest/manifest.py
144
import json import os from collections import defaultdict from item import item_types, ManualTest, WebdriverSpecTest, Stub, RefTest, TestharnessTest from log import get_logger from sourcefile import SourceFile CURRENT_VERSION = 2 class ManifestError(Exception): pass class ManifestVersionMismatch(ManifestErro...
adelina-t/nova
refs/heads/master
nova/scheduler/client/__init__.py
17
# Copyright (c) 2014 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ActiveState/code
refs/heads/master
recipes/Python/576581_Check_uptime_versiwhith/recipe-576581.py
1
#!/usr/bin/python # Check which version and uptime on the clients import os import sys import ftplib hosts = ["192.168.15.101", "172.16.104.19", "192.168.1.111", "192.168.1.112", "172.16.104.21", "192.168.1.113", "192.168.1.114", "192.168.15.100", ...
Salat-Cx65/python-for-android
refs/heads/master
python-modules/twisted/twisted/test/test_persisted.py
60
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. # System Imports import sys from twisted.trial import unittest try: import cPickle as pickle except ImportError: import pickle try: import cStringIO as StringIO except ImportError: import StringIO # Twisted Imports ...
blabla1337/skf-flask
refs/heads/main
skf/database/lab_items.py
1
from skf.database import db class LabItem(db.Model): __tablename__ = 'lab_items' id = db.Column(db.Integer, primary_key=True) title = db.Column(db.Text, nullable=False) link = db.Column(db.Text, nullable=False) level = db.Column(db.Integer, nullable=False) image_tag = db.Column(db.Text, nul...
pysal/pysal
refs/heads/master
pysal/explore/segregation/__init__.py
4
from segregation import aspatial from segregation import spatial from segregation import inference from segregation import decomposition from segregation import util from segregation import network from segregation import local from segregation import compute_all
JoelMarcey/buck
refs/heads/master
third-party/py/pex/pex/common.py
21
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import print_function import atexit import contextlib import errno import os import shutil import stat import sys import tempfile import threading import zipfile from coll...
jgrosseo/AliRoot
refs/heads/master
HLT/BASE/util/ZMQmonitor.py
2
#!/usr/bin/python import zmq,sys import signal import re import time def Exit_gracefully(signal, frame): context.destroy() print(" signal caught, exiting") sys.exit(0) signal.signal(signal.SIGINT, Exit_gracefully) endpoint="SUB>tcp://localhost:60202" theMessage=[] if len(sys.argv)==1: print "A simple debug...
openhatch/oh-mainline
refs/heads/master
vendor/packages/Django/tests/regressiontests/test_utils/models.py
142
from django.db import models class Person(models.Model): name = models.CharField(max_length=100)
stuarteberg/numpy
refs/heads/master
tools/swig/test/testArray.py
121
#! /usr/bin/env python from __future__ import division, absolute_import, print_function # System imports from distutils.util import get_platform import os import sys import unittest # Import NumPy import numpy as np major, minor = [ int(d) for d in np.__version__.split(".")[:2] ] if major == 0: BadListError = T...
rizvve/pmip6ns3.13new
refs/heads/master
src/netanim/bindings/modulegen__gcc_ILP32.py
28
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)) ...
bitprophet/ssh
refs/heads/master
ssh/sftp_server.py
1
# Copyright (C) 2011 Jeff Forcier <jeff@bitprophet.org> # # This file is part of ssh. # # 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # ...
BigBrother1984/android_external_chromium_org
refs/heads/kitkat
build/win/setup_cygwin_mount.py
92
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys def main(): if len(sys.argv) != 2 or sys.argv[1] != '--win-only': return 1 if sys.platform in ('win32', 'cygwin'): self...
cgrates/cgradmin
refs/heads/master
contrib/django/editor/json_client.py
1
import json, socket, itertools from threading import Lock class JSONClient(object): socket = None def __init__(self, addr): self.socket = socket.create_connection(addr) self.id_counter = itertools.count() def __del__(self): if self.socket is not None: self.socket.close()...
seann1/portfolio5
refs/heads/master
.meteor/dev_bundle/python/Lib/lib2to3/fixes/fix_renames.py
326
"""Fix incompatible renames Fixes: * sys.maxint -> sys.maxsize """ # Author: Christian Heimes # based on Collin Winter's fix_import # Local imports from .. import fixer_base from ..fixer_util import Name, attr_chain MAPPING = {"sys": {"maxint" : "maxsize"}, } LOOKUP = {} def alternates(members): re...
rizar/attention-lvcsr
refs/heads/master
tests/test_expressions.py
2
import numpy from numpy.testing import assert_allclose from theano import tensor from lvsr.expressions import pad_to_a_multiple def test_pad_to_a_multiple(): a = numpy.array([[1, 2], [3, 4], [5, 6]]) b = numpy.vstack([a, [[0, 0]]]) assert_allclose( pad_to_a_multiple(tensor.as_tensor_variable(a), 2...
kevalds51/sympy
refs/heads/master
sympy/physics/vector/dyadic.py
54
from sympy import sympify, Add, ImmutableMatrix as Matrix from sympy.core.compatibility import u, unicode from .printing import (VectorLatexPrinter, VectorPrettyPrinter, VectorStrPrinter) __all__ = ['Dyadic'] class Dyadic(object): """A Dyadic object. See: http://en.wikipedia.org/w...
Condla/dr-tools
refs/heads/master
rangercli/mirror-policies.py
1
import logging from client import RangerClient from env import (RANGER_HOST, RANGER_HOST2, RANGER_USER, RANGER_USER2, RANGER_PASSWORD, RANGER_PASSWORD2, RANGER_PORT, RANGER_PORT2, CLUSTER_NAME, CLUSTER_NAME2, RANGER_SECURE) logging.b...
gundalow/ansible
refs/heads/devel
test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/cache/notjsonfile.py
15
# (c) 2020 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' cache: notjsonfile short_description: JSON formatte...
cyyber/QRL
refs/heads/master
src/qrl/core/misc/logger_twisted.py
4
# coding=utf-8 # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. from twisted.logger import LogLevel, globalLogPublisher from qrl.core.misc import logger twisted_logger_mapping = { LogLevel.critical: logger.fatal, LogLevel....
SantosDevelopers/sborganicos
refs/heads/master
venv/lib/python3.5/site-packages/django/contrib/sites/migrations/0001_initial.py
378
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.contrib.sites.models from django.contrib.sites.models import _simple_domain_name_validator from django.db import migrations, models class Migration(migrations.Migration): dependencies = [] operations = [ migrations.Create...
oceanobservatories/mi-dataset
refs/heads/master
mi/dataset/driver/cg_cpm_eng/cpm/__init__.py
40
__author__ = 'mworden'
BT-fgarbely/odoo
refs/heads/8.0
openerp/tools/amount_to_text.py
393
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
chennan47/osf.io
refs/heads/develop
osf/migrations/0014_merge.py
28
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-04-18 14:25 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('osf', '0013_auto_20170417_1437'), ('osf', '0013_auto_20170412_0957'), ] operations = [...
akashsinghal/Speech-Memorization-App
refs/heads/master
speech/Swift/Speech-gRPC-Streaming/env/lib/python3.6/site-packages/pip/_vendor/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...
crypta-io/android_kernel_samsung_prevail2spr-stock-galaxy-rush
refs/heads/networkless
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
# failed 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 failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
lowitty/server
refs/heads/master
libsLinux/zope/interface/verify.py
53
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
ordinary-developer/lin_education
refs/heads/master
books/techno/python/programming_python_4_ed_m_lutz/code/chapter_3/06_standard_streams/main.py
1
import sys if __name__ == '__main__': for f in (sys.stdin, sys.stdout, sys.stderr): print(f) print('hello stdout world') sys.stdout.write('hello stdout world' + '\n') input('hello stdin world>') print('hello stdin world>') sys.stdin.readline()[:-1]
cleydson/scrapy
refs/heads/master
scrapy/log.py
149
""" This module is kept to provide a helpful warning about its removal. """ import logging import warnings from twisted.python.failure import Failure from scrapy.exceptions import ScrapyDeprecationWarning from scrapy.utils.log import failure_to_exc_info logger = logging.getLogger(__name__) warnings.warn("Module `sc...
jordanwimb/kbpython
refs/heads/master
class4/ex7.py
1
#!/usr/bin/env python from __future__ import print_function from netmiko import ConnectHandler import getpass import time pynet_rtr2 = { 'device_type':'cisco_ios', 'ip':'50.76.53.27', 'username':'pyclass', 'password':getpass.getpass(), 'port':8022 } def config_mode(device): #Enter config mode ...
benmoran56/FightstickDisplay
refs/heads/master
pyglet/input/gamecontrollerdb.py
1
from pyglet import compat_platform # This file is automatically generated by 'pyglet/tools/gen_controller_db.py' if compat_platform.startswith("linux"): mapping_list = [ "03000000c82d00000190000011010000,8Bitdo NES30 Pro 8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoul...
vFense/vFense
refs/heads/current
tp/src/plugins/patching/operations/patching_results.py
2
import re import logging import logging.config from vFense import VFENSE_LOGGING_CONFIG from json import loads from vFense.core._constants import CommonKeys from vFense.core.decorators import results_message from vFense.core.agent import AgentKey from vFense.core.agent.agents import update_agent_field from vFense.err...
lsingal/leetcode
refs/heads/master
python/dynamic_programming/RegularExpressionMatching.py
2
#I don't think it is possible to come up the bug free solution without any debugging class Solution: # @return a boolean def isMatch(self, s, p): opt = [[False for i in xrange(len(p)+1)] for i in xrange(len(s)+1)] opt[0][0] = True stack = [] if len(p) == 0: r...
Mistobaan/tensorflow
refs/heads/master
tensorflow/tools/docker/simple_console.py
603
# 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...
luhanhan/horizon
refs/heads/master
openstack_dashboard/dashboards/project/data_processing/job_executions/panel.py
48
# 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 # distributed under the...
sakim/Gollum-Press
refs/heads/master
gollum_press.py
1
# -*- coding: utf-8 -*- import sys import os import urllib import shutil from dateutil import parser from flask import Flask, request, redirect, url_for, abort from flask.templating import render_template from werkzeug.contrib.atom import AtomFeed current_dir = os.path.dirname(os.path.realpath(__file__)) sys.path.appe...
balloob/home-assistant
refs/heads/dev
tests/components/onboarding/__init__.py
28
"""Tests for the onboarding component.""" from homeassistant.components import onboarding def mock_storage(hass_storage, data): """Mock the onboarding storage.""" hass_storage[onboarding.STORAGE_KEY] = { "version": onboarding.STORAGE_VERSION, "data": data, }
Kamik423/uni_plan
refs/heads/master
plan/plan/lib/python3.4/collections/abc.py
274
from _collections_abc import * from _collections_abc import __all__