repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
chimkentec/KodiMODo_rep
refs/heads/master
plugin.video.youtube/resources/lib/kodion/impl/mock/__init__.py
88
__author__ = 'bromix' __all__ = []
broferek/ansible
refs/heads/devel
lib/ansible/modules/network/f5/bigip_snat_pool.py
21
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2016, F5 Networks 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', ...
marcoantoniooliveira/labweb
refs/heads/master
oscar/lib/python2.7/site-packages/django/core/cache/utils.py
114
from __future__ import absolute_import, unicode_literals import hashlib from django.utils.encoding import force_bytes from django.utils.http import urlquote TEMPLATE_FRAGMENT_KEY_TEMPLATE = 'template.cache.%s.%s' def make_template_fragment_key(fragment_name, vary_on=None): if vary_on is None: vary_on = ...
chiragjogi/odoo
refs/heads/8.0
openerp/addons/test_impex/__init__.py
2148
import models
miguelinux/coccinelle
refs/heads/master
python/coccilib/elems.py
2
class Location: def __init__(self, file, current_element, line, column, line_end, column_end): self.file = file self.current_element = current_element self.line = line self.column = column self.line_end = line_end self.column_end = column_end class ElemBase: def __init__(self): pass # class Expression...
defzzd/UserDataBase-Heroku
refs/heads/master
venv/Lib/site-packages/pip/_vendor/html5lib/trie/py.py
1323
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type from bisect import bisect_left from ._base import Trie as ABCTrie class Trie(ABCTrie): def __init__(self, data): if not all(isinstance(x, text_type) for x in data.keys()): raise TypeError...
nthiep/global-ssh-server
refs/heads/master
lib/python2.7/site-packages/django/contrib/formtools/tests/__init__.py
95
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import os import pickle import re import warnings from django import http from django.conf import settings from django.contrib.formtools import preview, utils from django.contrib.formtools.wizard import FormWizard from django.test import ...
chrislyon/dj_ds1
refs/heads/master
static/Brython3.2.0-20150701-214155/Lib/test/unittests/test_macurl2path.py
178
import macurl2path import unittest class MacUrl2PathTestCase(unittest.TestCase): def test_url2pathname(self): self.assertEqual(":index.html", macurl2path.url2pathname("index.html")) self.assertEqual(":bar:index.html", macurl2path.url2pathname("bar/index.html")) self.assertEqual("foo:bar:ind...
MetSystem/PTVS
refs/heads/master
Python/Tests/TestData/DebuggerProject/BreakpointTest.py
18
print('hello')
papouso/odoo
refs/heads/8.0
addons/website_quote/__openerp__.py
303
{ 'name': 'Online Proposals', 'category': 'Website', 'summary': 'Send Professional Quotations', 'website': 'https://www.odoo.com/page/quote-builder', 'version': '1.0', 'description': """ OpenERP Sale Quote Roller ========================= """, 'author': 'OpenERP SA', 'depends': ...
hampelm/Detroit-Boundaryservice
refs/heads/master
boundaries/configs/production/manage.py
14
#!/usr/bin/env python import os import sys from django.core.management import execute_manager # we want a few paths on the python path # first up we add the root above the application so # we can have absolute paths everywhere python_path = os.path.join( os.path.realpath(os.path.dirname(__file__)), '../../../' )...
fcelda/tuned
refs/heads/master
tuned/utils/commands.py
2
import tuned.logs import copy import os import tuned.consts as consts from configobj import ConfigObj import re from subprocess import * __all__ = ["write_to_file", "read_file", "execute"] log = tuned.logs.get() def write_to_file(f, data): log.debug("Writing to file: %s < %s" % (f, data)) try: fd = open(f, "w") ...
rfguri/vimfiles
refs/heads/master
bundle/ycm/third_party/ycmd/third_party/requests/test_requests.py
11
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for Requests.""" from __future__ import division import json import os import pickle import unittest import collections import contextlib import io import requests import pytest from requests.adapters import HTTPAdapter from requests.auth import HTTPDigestAuth, ...
mbareta/edx-platform-ft
refs/heads/open-release/eucalyptus.master
common/lib/xmodule/xmodule/modulestore/tests/factories.py
24
""" Factories for use in tests of XBlocks. """ import datetime import functools import pymongo.message import pytz import threading import traceback from collections import defaultdict from contextlib import contextmanager from uuid import uuid4 from factory import Factory, Sequence, lazy_attribute_sequence, lazy_att...
jfhumann/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/py/py/_process/forkedfunc.py
271
""" ForkedFunc provides a way to run a function in a forked process and get at its return value, stdout and stderr output as well as signals and exitstatusus. """ import py import os import sys import marshal def get_unbuffered_io(fd, filename): f = open(str(filename), "w") if fd != f.fileno(): ...
jodosh/EQ-Tools
refs/heads/master
WardHarvest/makeSignup.py
1
import csv startHTML00 = "<html>\n<head>\n<meta charset=\"UTF-8\">\n<title>Ward Harvest Signup</title>\n<style type=text/css>\ntable.gridtable {\nfont-family: verdana,arial,sans-serif;\nfont-size:16px;\ncolor:#333333;\nborder-width: 1px;\n" startHTML01 = "border-color: #666666;\nborder-collapse: collapse;\nwidth:95%;\...
rcbops/quantum-buildpackage
refs/heads/master
quantum/wsgi.py
2
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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/...
drewandersonnz/openshift-tools
refs/heads/prod
openshift/installer/vendored/openshift-ansible-3.9.14-1/roles/lib_openshift/src/ansible/oc_serviceaccount.py
86
# pylint: skip-file # flake8: noqa def main(): ''' ansible oc module for service accounts ''' module = AnsibleModule( argument_spec=dict( kubeconfig=dict(default='/etc/origin/master/admin.kubeconfig', type='str'), state=dict(default='present', type='str', ...
pixelgremlins/ztruck
refs/heads/master
dj/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/big5prober.py
2930
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
aethaniel/micropython
refs/heads/master
tests/basics/closure1.py
119
# closures def f(x): y = 2 * x def g(z): return y + z return g print(f(1)(1)) x = f(2) y = f(3) print(x(1), x(2), x(3)) print(y(1), y(2), y(3)) print(x(1), x(2), x(3)) print(y(1), y(2), y(3))
ABaldwinHunter/flask-clone-classic
refs/heads/master
docs/conf.py
140
# -*- coding: utf-8 -*- # # Flask documentation build configuration file, created by # sphinx-quickstart on Tue Apr 6 15:24:58 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. # # All c...
ehashman/oh-mainline
refs/heads/master
vendor/packages/scrapy/scrapy/xlib/pydispatch/saferef.py
25
"""Refactored "safe reference" from dispatcher.py""" import weakref, traceback def safeRef(target, onDelete = None): """Return a *safe* weak reference to a callable target target -- the object to be weakly referenced, if it's a bound method reference, will create a BoundMethodWeakref, otherwise creates a simple...
m-kuhn/QGIS
refs/heads/master
tests/src/python/test_qgsproject.py
3
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsProject. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. """ from b...
2015fallproject/2015fallcase2
refs/heads/master
static/Brython3.2.0-20150701-214155/Lib/calendar.py
828
"""Calendar printing functions Note when comparing these calendars to the ones printed by cal(1): By default, these calendars have Monday as the first day of the week, and Sunday as the last (the European convention). Use setfirstweekday() to set the first day of the week (0=Monday, 6=Sunday).""" import sys import da...
sigma-random/asuswrt-merlin
refs/heads/master
release/src/router/samba36/lib/testtools/testtools/runtest.py
20
# Copyright (c) 2009-2010 Jonathan M. Lange. See LICENSE for details. """Individual test case execution.""" __all__ = [ 'MultipleExceptions', 'RunTest', ] import sys from testtools.testresult import ExtendedToOriginalDecorator class MultipleExceptions(Exception): """Represents many exceptions rais...
chauhanhardik/populo_2
refs/heads/master
lms/djangoapps/instructor/management/tests/test_openended_commands.py
106
"""Test the openended_post management command.""" from datetime import datetime import json from mock import patch from pytz import UTC from django.conf import settings from opaque_keys.edx.locations import Location import capa.xqueue_interface as xqueue_interface from courseware.courses import get_course_with_acces...
xsynergy510x/android_external_chromium_org
refs/heads/cm-12.1
tools/cr/cr/loader.py
64
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Module scan and load system. The main interface to this module is the Scan function, which triggers a recursive scan of all packages and modules below cr...
chiefdome/asterisk
refs/heads/master
res/pjproject/tests/pjsua/scripts-media-playrec/100_resample_lf_11_48.py
3
# $Id: 100_resample_lf_11_48.py 369517 2012-07-01 17:28:57Z file $ # from inc_cfg import * # simple test test_param = TestParam( "Resample (large filter) 11 KHZ to 48 KHZ", [ InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 48000 --play-file wavs/input.11.wav --rec-file wavs/tmp.48.wav") ] )
MobinRanjbar/hue
refs/heads/master
desktop/core/ext-py/pycrypto-2.6.1/setup.py
34
#! /usr/bin/env python # # setup.py : Distutils setup script # # Part of the Python Cryptography Toolkit # # =================================================================== # Portions Copyright (c) 2001, 2002, 2003 Python Software Foundation; # All Rights Reserved # # This file contains code from the Python 2.2 s...
mohamedhagag/community-addons
refs/heads/8.0
change_management_own_project/models/__init__.py
1
# -*- coding: utf-8 -*- # © 2015 Eficent Business and IT Consulting Services S.L. <contact@eficent.com> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from . import change_management
dare0021/KerasBasedSpeechClassifier
refs/heads/master
fuzzyHelper.py
1
# works with nb_classes <= 10 because lazy # TODO: resolve pathological indecision nb_classes = 0 ignoreThresh = 3 currentState = None; lastSolidState = None; solidSuffix = "solid" fluidSuffix = "fluid" timeSameInputs = 0 # kept just in case I figure out what to do with pathological indecision timeSinceSolidPush = 0 ...
dronefly/dronefly.github.io
refs/heads/master
flask/lib/python2.7/site-packages/jinja2/environment.py
332
# -*- coding: utf-8 -*- """ jinja2.environment ~~~~~~~~~~~~~~~~~~ Provides a class that holds runtime and parsing time options. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import os import sys from jinja2 import nodes from jinja2.defaults import BLOCK_S...
masterdon/Veil-Evasion
refs/heads/master
tools/pyherion.py
12
#!/usr/bin/python """ PyHerion 1.0 By: @harmj0y Python 'crypter' that builds an dynamic AES/base64 encoded launcher (with a random key) that's decoded/decrypted in memory and then executed. Standalone version of the same functionality integrated into Veil, in ./modules/common/encryption.py """ from Crypto.Cipher...
evildmp/django-cms
refs/heads/master
cms/test_utils/project/extensionapp/cms_toolbars.py
5
# -*- coding: utf-8 -*- from cms.api import get_page_draft from cms.test_utils.project.extensionapp.models import MyTitleExtension, MyPageExtension from cms.utils.page_permissions import user_can_change_page from cms.utils.urlutils import admin_reverse from django.core.urlresolvers import NoReverseMatch from django.uti...
molebot/brython
refs/heads/master
www/src/Lib/unittest/test/test_break.py
785
import gc import io import os import sys import signal import weakref import unittest @unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill") @unittest.skipIf(sys.platform =="win32", "Test cannot run on Windows") @unittest.skipIf(sys.platform == 'freebsd6', "Test kills regrtest on freebsd6 " "if threa...
niphlod/w2p_tvseries
refs/heads/master
modules/requests/packages/chardet/cp949prober.py
2800
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
google/contentbox
refs/heads/master
third_party/requests/packages/chardet/cp949prober.py
2800
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
Karl-Marka/data-mining
refs/heads/master
scleroderma-prediction/Predict_PAH.py
1
from pandas import DataFrame, read_csv from sklearn.cross_validation import train_test_split from sklearn.feature_selection import f_classif import matplotlib.pyplot as plt from numpy import mean, array from sklearn import linear_model from pylab import figure, xlim, ylim, ylabel, xlabel, title, tick_params, axvspan, g...
alebcay/namebench
refs/heads/master
libnamebench/config_test.py
173
#!/usr/bin/env python # Copyright 2009 Google 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...
oihane/odoo
refs/heads/8.0
addons/marketing_crm/models/__init__.py
378
# -*- coding: utf-8 -*- import res_config
xuru/pyvisdk
refs/heads/master
pyvisdk/do/profile_execute_result.py
1
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def ProfileExecuteResult(vim, *args, **kwargs): '''The ProfileExecuteResult data object c...
rosmo/ansible
refs/heads/devel
test/units/modules/network/edgeos/edgeos_module.py
52
# (c) 2018 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dis...
SmartInfrastructures/fuel-web-dev
refs/heads/master
nailgun/nailgun/test/unit/test_assignment_validator.py
6
# Copyright 2014 Mirantis, 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 ...
caiomartini/SonarCommitAnalyzer
refs/heads/master
utils.py
1
import sys import http.client import os import shutil import subprocess import json def print_(text): """ Function to print and flush console. """ print(text) sys.stdout.flush() def verify_sonar_response(url): """ Function to verify SonarQube is running on server. """ print_(">> Veri...
krazybean/randomaas
refs/heads/master
tests/maintest.py
1
#!/usr/bin/env python import sys import os import unittest import urllib2 sys.path.insert(0,os.path.abspath(__file__+"/../..")) from app import main class TestMain(unittest.TestCase): def setUp(self): pass def test_randnum(self): m = main.randnum(6, 'num') self.assertTrue(bool(len(m)...
torrents-com/content
refs/heads/master
scrapy/torrents/remote/__init__.py
12133432
brittanystoroz/kitsune
refs/heads/master
kitsune/karma/templatetags/__init__.py
12133432
Kassaidre/python-training
refs/heads/master
generator/__init__.py
12133432
PXke/invenio
refs/heads/dev-pu
invenio/legacy/websearch/web/__init__.py
12133432
cuongthai/cuongthai-s-blog
refs/heads/master
django/conf/locale/mk/__init__.py
12133432
sublime1809/django
refs/heads/master
tests/custom_managers/__init__.py
12133432
erkrishna9/odoo
refs/heads/master
addons/hw_proxy/controllers/main.py
71
# -*- coding: utf-8 -*- import logging import commands import simplejson import os import os.path import openerp import time import random import subprocess import simplejson import werkzeug import werkzeug.wrappers _logger = logging.getLogger(__name__) from openerp import http from openerp.http import request # dr...
pombredanne/http-repo.gem5.org-gem5-
refs/heads/master
tests/quick/se/50.memtest/test.py
90
# Copyright (c) 2006-2007 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 ...
mistercrunch/airflow
refs/heads/master
airflow/operators/sqlite_operator.py
7
# # 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...
epssy/hue
refs/heads/master
desktop/core/ext-py/thrift-0.9.1/src/transport/THttpClient.py
157
# # 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...
infinigrove/SR700-Artisan-PDServer
refs/heads/master
cmds/Roaster_Set_Temp.py
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # SR700-Artisan-PDServer, released under GPLv3 # Roaster Set Temperature import Pyro4 import sys new_roaster_temperature = sys.argv[1] roast_control = Pyro4.Proxy("PYRONAME:roaster.sr700") if int(new_roaster_temperature) > -1 and int(new_roaster_temperature) <551: r...
nrwahl2/ansible
refs/heads/devel
lib/ansible/module_utils/redhat.py
26
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
BigRoy/pyblish-magenta
refs/heads/master
run_testsuite.py
3
import os import sys import logging import nose # Expose Pyblish Magenta to PYTHONPATH path = os.path.dirname(__file__) sys.path.insert(0, path) # Plug-ins produce a lot of messages, # mute these during tests. logging.disable(logging.CRITICAL) if "maya" in sys.executable.lower(): __import__("pyblish_maya").setu...
kailIII/geraldo
refs/heads/master
testproject/urls.py
11
from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', # Example: # (r'^testproject/', include('testproject.foo.urls')), # Uncomment the admin/doc line below and add 'django.contrib.a...
ukch/refugeedata
refs/heads/master
refugeedata/migrations/0007_auto_20150921_1725.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import uuidfield.fields import refugeedata.models class Migration(migrations.Migration): dependencies = [ ('refugeedata', '0006_auto_20150919_1917'), ] operations = [ migrations.AddF...
HalCanary/skia-hc
refs/heads/master
tools/skp/page_sets/skia_slashdot_mobile.py
8
# Copyright 2019 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. # pylint: disable=W0401,W0614 from telemetry import story from telemetry.page import page as page_module from telemetry.page import shared_page_state clas...
jeroanan/Nes2
refs/heads/master
Tests/Test6502.py
1
import unittest from unittest.mock import Mock from Chip import OpCodeDefinitions from Chip.Chip6502 import Chip6502 from Chip.OpCodeFactory import OpCodeFactory from Chip.OpCodes.OraCommand import OraCommand class Test6502(unittest.TestCase): def test_execute_command_executes_opcode_factory_get_command(self): ...
ake-koomsin/mapnik_nvpr
refs/heads/master
utils/pgsql2sqlite/build.py
2
# # This file is part of Mapnik (c++ mapping toolkit) # # Copyright (C) 2009 Artem Pavlenko, Dane Springmeyer # # Mapnik 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 Licen...
vikatory/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_curses.py
67
# # Test script for the curses module # # This script doesn't actually display anything very coherent. but it # does call every method and function. # # Functions not tested: {def,reset}_{shell,prog}_mode, getch(), getstr(), # init_color() # Only called, not tested: getmouse(), ungetmouse() # import sys, tempfile, os ...
adoosii/edx-platform
refs/heads/master
lms/djangoapps/instructor/tests/test_api.py
13
# -*- coding: utf-8 -*- """ Unit tests for instructor.api methods. """ import datetime import ddt import functools import random import pytz import io import json import requests import shutil import tempfile from urllib import quote from django.conf import settings from django.contrib.auth.models import User from dja...
mstriemer/addons-server
refs/heads/master
src/olympia/translations/__init__.py
18
from django.conf import settings from django.utils.translation import trans_real from jinja2.filters import do_dictsort LOCALES = [(trans_real.to_locale(k).replace('_', '-'), v) for k, v in do_dictsort(settings.LANGUAGES)]
lip6-mptcp/wireshark-mptcp
refs/heads/mptcp_final
help/faq.py
5
#!/usr/bin/env python # # faq.py # # Routines to assemble a FAQ list for the Wireshark web site. # Questions and answer content can be found below. Section and # question numbers will be automatically generated. # # Wireshark - Network traffic analyzer # By Gerald Combs <gerald@wireshark.org> # Copyright 1998 Gerald Co...
utkbansal/kuma
refs/heads/master
vendor/packages/translate/storage/properties.py
24
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2004-2014 Zuza Software Foundation # # This file is part of translate. # # translate 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...
CantemoInternal/pyxb
refs/heads/next
pyxb/bundles/wssplat/xenc.py
6
from pyxb.bundles.wssplat.raw.xenc import *
jeffwidman/ansible-modules-core
refs/heads/devel
cloud/openstack/os_ironic_node.py
68
#!/usr/bin/python # coding: utf-8 -*- # (c) 2015, Hewlett-Packard Development Company, L.P. # # This module 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 optio...
cnsoft/kbengine-cocos2dx
refs/heads/cocos2dx-cnsoft
kbe/res/scripts/common/Lib/test/test_reprlib.py
56
""" Test cases for the repr module Nick Mathewson """ import sys import os import shutil import unittest from test.support import run_unittest from reprlib import repr as r # Don't shadow builtin repr from reprlib import Repr from reprlib import recursive_repr def nestedTuple(nesting): t = () for i in r...
DataDog/integrations-core
refs/heads/master
win32_event_log/datadog_checks/win32_event_log/check.py
1
# (C) Datadog, Inc. 2020-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import re import pywintypes import win32con import win32event import win32evtlog import win32security from six import PY2 from datadog_checks.base import AgentCheck, ConfigurationError, is_affirmative fr...
kmonsoor/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/test/encoded_modules/__init__.py
179
# -*- encoding: utf-8 -*- # This is a package that contains a number of modules that are used to # test import from the source files that have different encodings. # This file (the __init__ module of the package), is encoded in utf-8 # and contains a list of strings from various unicode planes that are # encoded diffe...
xeddmc/PyBitmessage
refs/heads/master
src/class_singleCleaner.py
9
import threading import shared import time import sys import os import pickle import tr#anslate from helper_sql import * from debug import logger """ The singleCleaner class is a timer-driven thread that cleans data structures to free memory, resends messages when a remote node doesn't respond, and sends pong messa...
yamila-moreno/nikola
refs/heads/master
nikola/data/themes/base/messages/messages_bg.py
6
# -*- encoding:utf-8 -*- from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "", "(active)": "", "Also available in:": "Също достъпно в:", "Archive": "Архив", "Categories": "Категории", "Comments": "", "LANGUAGE": "Български", "Languages:": "", "More pos...
thdtjsdn/FreeCAD
refs/heads/master
src/Tools/MakeApp.py
38
#! python # -*- coding: utf-8 -*- # (c) 2003 Werner Mayer LGPL # Create a new application module import os,sys,string import FCFileTools import MakeAppTools if(len(sys.argv) != 2): sys.stdout.write("Please enter a name for your application.\n") sys.exit() Application = sys.argv[1] # create direct...
kenorb/BitTorrent
refs/heads/master
osx/hacking.py
2
from AppKit import * from time import time from gettext import gettext from khashmir.krpc import KRPC from khashmir.util import * from khashmir.khash import * from BitTorrent.bencode import bencode, bdecode from BitTorrent.Rerequester import DHTRerequester from copy import copy from BitTorrent import NewVersion import...
pmarks-net/grpc
refs/heads/master
tools/run_tests/sanity/check_version.py
11
#!/usr/bin/env python2.7 # 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 li...
maraujop/django-crispy-forms
refs/heads/main
crispy_forms/tests/test_layout.py
1
import pytest from django import forms from django.forms.models import formset_factory, modelformset_factory from django.middleware.csrf import _get_new_csrf_string from django.shortcuts import render from django.template import Context, Template from django.urls import reverse from django.utils.translation import get...
stamhe/p2pool-blackcoin
refs/heads/master
wstools/tests/test_t1.py
308
############################################################################ # Joshua R. Boverhof, David W. Robertson, LBNL # See LBNLCopyright for copyright notice! ########################################################################### import unittest import test_wsdl import utils def makeTestSuite(): suite ...
FrankBian/kuma
refs/heads/master
vendor/packages/ipython/IPython/testing/plugin/dtexample.py
7
"""Simple example using doctests. This file just contains doctests both using plain python and IPython prompts. All tests should be loaded by nose. """ def pyfunc(): """Some pure python tests... >>> pyfunc() 'pyfunc' >>> import os >>> 2+3 5 >>> for i in range(3): ... print i, ...
suyashphadtare/sajil-shopping
refs/heads/develop
shopping_cart/shopping_cart/doctype/shopping_cart_shipping_rule/__init__.py
12133432
PubuduSaneth/cnvScan
refs/heads/master
src/__init__.py
12133432
Kitware/girder
refs/heads/master
test/test_api_key.py
3
# -*- coding: utf-8 -*- import datetime import json import pytest from girder.constants import TokenScope from girder.exceptions import ValidationException from girder.models.api_key import ApiKey from girder.models.setting import Setting from girder.models.token import Token from girder.settings import SettingKey fro...
Darkyler/Piscine
refs/heads/master
softwareUI.py
1
# -*- coding: utf-8 -*- from Tkinter import * # MEMO: pour qu'un widget apparaisse il faut qu'il prenne en parametre du constructeur la fenetre principale # Les widgets: fenetre, label, boutons, champ de saisie, #creation d'une fenetre de base root_window = Tk() #creation d'un label contenant du texte label_field = La...
thaskell1/volatility
refs/heads/master
volatility/plugins/linux/kernel_opened_files.py
6
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # 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 Version 2 as # published by the Free Software Foundation. You may not use, modify or # distribu...
Omegaphora/external_chromium_org
refs/heads/lp5.1
tools/python/google/gethash_timer.py
182
#!/usr/bin/env python # Copyright (c) 2011 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. """Issue a series of GetHash requests to the SafeBrowsing servers and measure the response times. Usage: $ ./gethash_timer.py -...
drnextgis/QGIS
refs/heads/master
python/plugins/processing/algs/grass7/nviz7.py
5
# -*- coding: utf-8 -*- """ *************************************************************************** nviz7.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *********************************...
HoliestCow/ece692_deeplearning
refs/heads/master
project5/gru/gruDET.py
1
import tensorflow as tf import numpy as np import time import h5py import matplotlib.pyplot as plt # from sklearn.metrics import confusion_matrix # import itertools # from copy import deepcopy # import os # import os.path from collections import OrderedDict import pickle # import cPickle as pickle # from tensorflow....
Vaidyanath/tempest
refs/heads/master
tempest/api/compute/images/__init__.py
12133432
astagi/taiga-back
refs/heads/master
taiga/locale/__init__.py
12133432
gnu-user/dtella
refs/heads/master
tests/test_common_ipv4.py
4
#!/usr/bin/env python # Tests for dtella/common/ipv4.py import fix_path import unittest from dtella.common.ipv4 import CidrNumToMask from dtella.common.ipv4 import CidrStringToIPMask from dtella.common.ipv4 import IsSubsetOf from dtella.common.ipv4 import MaskToCidrNum from dtella.common.ipv4 import SubnetMatcher cl...
oduwa/Wheat-Count
refs/heads/master
PicNumero/spectral_roi.py
2
from skimage import data, io, segmentation, color from skimage.future import graph from matplotlib import pyplot as plt from scipy import misc from skimage.color import rgb2gray import numpy as np import Helper import Display def spectral_cluster(filename, compactness_val=30, n=6): ''' Apply spectral clusteri...
Jeff-Wang93/vent
refs/heads/master
vent/core/file_drop/file_drop.py
1
import json import os import sys import time import uuid import pika from redis import Redis from redis import StrictRedis from rq import Queue from watchdog.events import PatternMatchingEventHandler from watchdog.observers import Observer class GZHandler(PatternMatchingEventHandler): """ Handles when an eve...
fiddlerwoaroof/yinjar
refs/heads/master
main.py
1
import os.path import yaml import textwrap import math import libtcodpy as libtcod import glob libtcod.console_set_keyboard_repeat(500, 50) for fil in glob.glob('./data/namegen/*.cfg'): libtcod.namegen_parse(fil) help = ''' 'i': Inventory 'd': Drop 'g': Get item (Pick up) '?': Help Alt+Escape: Exit Arrow Keys ...
alvaroaleman/ansible
refs/heads/devel
lib/ansible/modules/cloud/misc/virt_net.py
23
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Maciej Delmanowski <drybjed@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 th...
tedi3231/openerp
refs/heads/master
build/lib/openerp/addons/point_of_sale/wizard/pos_box.py
5
#!/usr/bin/env python from openerp.osv import osv, fields from openerp.tools.translate import _ from openerp.addons.account.wizard.pos_box import CashBox class PosBox(CashBox): _register = False def run(self, cr, uid, ids, context=None): if not context: context = dict() active_m...
r0h4n/commons
refs/heads/master
tendrl/commons/flows/authorize_ssh_key/__init__.py
3
from tendrl.commons import flows from tendrl.commons.flows.exceptions import FlowExecutionFailedError from tendrl.commons.utils.ssh import authorize_key class AuthorizeSshKey(flows.BaseFlow): internal = True def __init__(self, *args, **kwargs): self._defs = { "help": "Authorize SSH Key", ...
jdreaver/vispy
refs/heads/master
vispy/gloo/tests/test_globject.py
19
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2014, Nicolas P. Rougier. All rights reserved. # Distributed under the terms of the new BSD License. # ----------------------------------------------------------------------------- from vispy.testing...
groove-x/gxredis
refs/heads/master
gxredis/dao.py
1
from .pubsub import RedisChannel from .types import RedisType class RedisDao(object): """ base class for Redis DAO """ def __init__(self, redis_client, key_params=None): self._key_params = key_params or {} self._redis_client = redis_client self._set_instance_attributes() def __re...