repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
willvousden/emcee
refs/heads/master
tests/integration/test_stretch.py
1
# -*- coding: utf-8 -*- from __future__ import division, print_function from emcee import moves from .test_proposal import _test_normal, _test_uniform __all__ = ["test_normal_stretch", "test_uniform_stretch", "test_nsplits_stretch"] def test_normal_stretch(**kwargs): _test_normal(moves.StretchMove()...
sarchar/pyspv
refs/heads/master
pyspv/network.py
1
import collections import ipaddress import random import socket import struct import threading import time import traceback from . import socks from .block import Block, BlockHeader from .bloom import Bloom from .inv import Inv from .serialize import Serialize from .transaction import Transaction from...
spacecowboy/changelog-writer
refs/heads/master
tests/test_changelog.py
1
# -*- coding: utf-8 -*- from __future__ import print_function, division import pytest from changelog.changelog import (read_config, DEFAULT_CONFIG) class TestConfig(): def test_none(self): with pytest.raises(Exception): read_config(None) def test_default...
mcking49/apache-flask
refs/heads/master
Python/Lib/site-packages/requests/packages/chardet/universaldetector.py
1775
######################## 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...
keitaroyam/yamtbx
refs/heads/master
yamtbx/command_line/kamo_resolve_indexing_ambiguity.py
1
# LIBTBX_SET_DISPATCHER_NAME kamo.resolve_indexing_ambiguity """ (c) RIKEN 2015. All rights reserved. Author: Keitaro Yamashita This software is released under the new BSD License; see LICENSE. """ from yamtbx.dataproc.auto.multi_merging.resolve_reindex import ReferenceBased, BrehmDiederichs, KabschSelectiveBreeding...
alexweav/OpenAiGym-Solutions
refs/heads/master
classic_control/CartPole-v0.py
1
import gym import numpy as np import time from numerical_gradient import * #Displays numerical evidence that backprop gradients are correct #Slows down performance dramatically and doesnt affect outcome, so disabled by default check_gradient = False verbose = False render = False print_every = 100 #Some useful numeri...
kenlist/chromium_tools_gyp
refs/heads/master
test/win/gyptest-link-entrypointsymbol.py
342
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Make sure entrypointsymbol setting is extracted properly. """ import TestGyp import sys if sys.platform == 'win32': test = TestGyp....
maciekzdaleka/lab11
refs/heads/master
read-aws-queue.py
1
# This script created a queue # # Author - Paul Doyle Nov 2015 # # import boto.sqs import boto.sqs.queue from boto.sqs.message import Message from boto.sqs.connection import SQSConnection from boto.exception import SQSError import sys import urllib2 # Get the keys from a specific url and then use them to connect to A...
chdecultot/erpnext
refs/heads/develop
erpnext/healthcare/web_form/patient_appointments/patient_appointments.py
30
from __future__ import unicode_literals import frappe def get_context(context): context.read_only = 1 def get_list_context(context): context.row_template = "erpnext/templates/includes/healthcare/appointment_row_template.html" context.get_list = get_appointment_list def get_appointment_list(doctype, txt, filters,...
lokeshjindal15/pd-gem5
refs/heads/master
tests/configs/realview64-switcheroo-timing.py
33
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
rameshvs/nipype
refs/heads/master
nipype/interfaces/fsl/tests/test_auto_FSLCommand.py
5
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from nipype.testing import assert_equal from nipype.interfaces.fsl.base import FSLCommand def test_FSLCommand_inputs(): input_map = dict(args=dict(argstr='%s', ), environ=dict(nohash=True, usedefault=True, ), ignore_exception=dict(nohash=Tru...
tardyp/buildbot
refs/heads/master
master/buildbot/test/unit/data/test_patches.py
6
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
pozdnyakov/chromium-crosswalk
refs/heads/master
tools/telemetry/telemetry/page/__init__.py
461
# 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.
smartpm/smart
refs/heads/master
smart/commands/search.py
2
# # Copyright (c) 2004 Conectiva, Inc. # # Written by Gustavo Niemeyer <[email protected]> # # This file is part of Smart Package Manager. # # Smart Package Manager 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 Fou...
Tim55667757/FileRevision
refs/heads/master
FileRevision.py
1
# -*- coding: utf-8 -*- # # Author: Timur Gilmullin # (c) Positive Technologies, 2013 # This module realize work with revisions file. # Revisions looks like dictionary with key funcName and value is the tuple: hash + source: # {"funcName1": (funcName1_hash, funcName1_source), # "funcName2": (funcName2_hash, ...
fafaman/django
refs/heads/master
django/contrib/sites/__init__.py
808
default_app_config = 'django.contrib.sites.apps.SitesConfig'
fcracker79/pybitcointools
refs/heads/master
bitcoin/bci.py
4
#!/usr/bin/python import json, re import random import sys try: from urllib.request import build_opener except: from urllib2 import build_opener # Makes a request to a given URL (first arg) and optional params (second arg) def make_request(*args): opener = build_opener() opener.addheaders = [('User-ag...
rupran/ansible
refs/heads/devel
lib/ansible/modules/cloud/webfaction/webfaction_site.py
6
#!/usr/bin/python # # Create Webfaction website using Ansible and the Webfaction API # # ------------------------------------------ # # (c) Quentin Stafford-Fraser 2015 # # 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 Lic...
apache/incubator-airflow
refs/heads/master
airflow/contrib/hooks/ssh_hook.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...
EdgarSun/Django-Demo
refs/heads/master
django/contrib/localflavor/ch/ch_states.py
544
# -*- coding: utf-8 -* from django.utils.translation import ugettext_lazy as _ STATE_CHOICES = ( ('AG', _('Aargau')), ('AI', _('Appenzell Innerrhoden')), ('AR', _('Appenzell Ausserrhoden')), ('BS', _('Basel-Stadt')), ('BL', _('Basel-Land')), ('BE', _('Berne')), ('FR', _('Fribourg')), ('...
dhylands/micropython
refs/heads/master
tests/basics/dict_intern.py
117
# check that interned strings are compared against non-interned strings di = {"key1": "value"} # lookup interned string k = "key1" print(k in di) # lookup non-interned string k2 = "key" + "1" print(k == k2) print(k2 in di) # lookup non-interned string print("".join(['k', 'e', 'y', '1']) in di)
Captain-Coder/tribler
refs/heads/devel
Tribler/Core/RemoteTorrentHandler.py
1
""" Handles the case where the user did a remote query and now selected one of the returned torrents for download. Author(s): Niels Zeilemaker """ import logging import sys import urllib from abc import ABCMeta, abstractmethod from binascii import hexlify, unhexlify from collections import deque from decorator import ...
blzr/enigma2
refs/heads/develop
lib/python/Components/Sources/Clock.py
7
from Components.Element import cached from enigma import eTimer from time import time as getTime from Source import Source class Clock(Source): def __init__(self): Source.__init__(self) self.clock_timer = eTimer() self.clock_timer.callback.append(self.poll) self.clock_timer.start(1000) @cached def getClo...
mats116/gae-boilerplate
refs/heads/master
bp_includes/external/babel/messages/tests/catalog.py
30
# -*- coding: utf-8 -*- # # Copyright (C) 2007 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. # # This software consists of v...
MarcosCommunity/odoo
refs/heads/marcos-8.0
comunity_modules/website_facebook/__openerp__.py
1
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution, third party addon # Copyright (C) 2004-2015 Vertel AB (<http://vertel.se>). # # This program is free software: you can redistribute it and/or modify # it under...
storm-computers/odoo
refs/heads/9.0
addons/website_sale/controllers/website_mail.py
26
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import urlparse from openerp import SUPERUSER_ID from openerp import http from openerp.addons.web.http import request from openerp.addons.website_mail.controllers.main import WebsiteMail class WebsiteMailController(We...
DirtyUnicorns/android_external_chromium_org
refs/heads/lollipop
tools/telemetry/telemetry/core/platform/profiler/android_prebuilt_profiler_helper.py
32
# 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. """Android-specific, installs pre-built profilers.""" import logging import os from telemetry import decorators from telemetry.util import support_binaries...
ui/django-post_office
refs/heads/master
post_office/tasks.py
1
""" Only define the tasks and handler if we can import celery. This allows the module to be imported in environments without Celery, for example by other task queue systems such as Huey, which use the same pattern of auto-discovering tasks in "tasks" submodules. """ import datetime from django.utils.timezone import no...
ChristopherRabotin/bungiesearch
refs/heads/master
bungiesearch/logger.py
2
import logging logger = logging.getLogger('bungiesearch')
mozilla/addons-server
refs/heads/master
src/olympia/zadmin/views.py
4
from django.contrib import admin from django.core.files.storage import default_storage as storage from django.shortcuts import get_object_or_404 import olympia.core.logger from olympia.amo import messages from olympia.amo.decorators import json_view, post_required from olympia.files.models import File log = olympia...
razrichter/namebench
refs/heads/master
libnamebench/util.py
172
# 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 by applicable law or ...
project-lovelace/lovelace-engine
refs/heads/dependabot/pip/urllib3-1.26.5
tests/conftest.py
1
import base64 import json import os import time import pytest import requests @pytest.fixture(scope="session") def engine_uri(): uri = os.environ.get("LOVELACE_ENGINE_URI", "http://localhost:14714") err_msg = ( "Cannot connect to lovelace engine at {}. Is it running? " "Check if the env var L...
for811/Ubuntu_kernel_golfu
refs/heads/master
scripts/tracing/draw_functrace.py
14679
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <[email protected]> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
MagicSolutions/django-cms
refs/heads/develop
cms/tests/static_placeholder.py
6
# -*- coding: utf-8 -*- from __future__ import with_statement import json from cms.api import add_plugin from cms.constants import PLUGIN_MOVE_ACTION, PLUGIN_COPY_ACTION from cms.models import StaticPlaceholder, Placeholder, CMSPlugin from cms.tests.plugins import PluginsTestBaseCase from cms.utils.compat.dj import fo...
Jumpscale/web
refs/heads/master
pythonlib/gdata/apps/groups/service.py
94
#!/usr/bin/python # # Copyright (C) 2008 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...
benob/chainer
refs/heads/master
chainer/testing/condition.py
39
import functools import unittest import six class QuietTestRunner(object): def run(self, suite): result = unittest.TestResult() suite(result) return result def repeat_with_success_at_least(times, min_success): """Decorator for multiple trial of the test case. The decorated tes...
rghe/ansible
refs/heads/devel
lib/ansible/modules/network/slxos/slxos_interface.py
91
#!/usr/bin/python # # (c) 2018 Extreme Networks 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 late...
YuxuanLing/trunk
refs/heads/master
trunk/code/study/python/Fluent-Python-example-code/20-descriptor/bulkfood/model_v5.py
1
# BEGIN MODEL_V5 import abc class AutoStorage: # <1> __counter = 0 def __init__(self): cls = self.__class__ prefix = cls.__name__ index = cls.__counter self.storage_name = '_{}#{}'.format(prefix, index) cls.__counter += 1 def __get__(self, instance,...
greent2008/os_lab
refs/heads/master
related_info/lab7/ipc/pipe-ex1.py
48
#!/usr/bin/env python # -*- encoding: utf8 -*- import os, sys print "I'm going to fork now - the child will write something to a pipe, and the parent will read it back" r, w = os.pipe() # r,w是文件描述符, 不是文件对象 pid = os.fork() if pid: # 父进程 os.close(w) # 关闭一个文件描述符 r = os.fdopen(r) # 将r转化...
litong01/python-monasca
refs/heads/master
kiloeyes/openstack/common/strutils.py
1
# Copyright 2011 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 req...
aequitas/home-assistant
refs/heads/dev
homeassistant/components/unifi/const.py
1
"""Constants for the UniFi component.""" import logging LOGGER = logging.getLogger(__package__) DOMAIN = 'unifi' CONTROLLER_ID = '{host}-{site}' CONF_CONTROLLER = 'controller' CONF_POE_CONTROL = 'poe_control' CONF_SITE_ID = 'site'
meletakis/collato
refs/heads/master
lib/python2.7/site-packages/PIL/GbrImagePlugin.py
40
# # The Python Imaging Library # $Id$ # # load a GIMP brush file # # History: # 96-03-14 fl Created # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fredrik Lundh 1996. # # See the README file for information on usage and redistribution. # import Image, ImageFile def i32(c): return ord(c[3]) + (or...
entropy1337/infernal-twin
refs/heads/master
Modules/build/reportlab/build/lib.linux-i686-2.7/reportlab/lib/textsplit.py
32
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/lib/textsplit.py """Helpers for text wrapping, hyphenation, Asian text splitting and kinsoku shori. How to split a 'big word' depends on the language...
igord-daynix/virt-test
refs/heads/master
virttest/propcan_unittest.py
15
#!/usr/bin/python import unittest import logging import common import propcan class TestPropCanBase(unittest.TestCase): def test_empty_init(self): self.assertRaises(NotImplementedError, propcan.PropCanBase) def test_empty_params_init(self): self.assertRaises(NotImplementedError, ...
renatofilho/QtCreator
refs/heads/master
src/libs/3rdparty/botan/wrappers/boost-python/botan/__init__.py
14
from _botan import * # Initialize the library when the module is imported init = LibraryInitializer() class SymmetricKey(OctetString): pass class InitializationVector(OctetString): pass def Filter(name, key = None, iv = None, dir = None): if key != None and iv != None and dir != None: return mak...
johnkeepmoving/oss-ftp
refs/heads/master
python27/win32/Lib/email/errors.py
468
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: [email protected] """email package exception classes.""" class MessageError(Exception): """Base class for errors in the email package.""" class MessageParseError(MessageError): """Base class for message parsing erro...
ferabra/edx-platform
refs/heads/master
lms/djangoapps/shoppingcart/migrations/0019_auto__add_donationconfiguration.py
120
# -*- coding: 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 'DonationConfiguration' db.create_table('shoppingcart_donationconfiguration', ( (...
Samuel789/MediPi
refs/heads/master
MedManagementWeb/env/lib/python3.5/site-packages/django/contrib/auth/views.py
10
import functools import warnings from django.conf import settings # Avoid shadowing the login() and logout() views below. from django.contrib.auth import ( REDIRECT_FIELD_NAME, get_user_model, login as auth_login, logout as auth_logout, update_session_auth_hash, ) from django.contrib.auth.decorators import log...
antiagainst/shaderc
refs/heads/master
glslc/test/option_dash_E.py
8
# Copyright 2015 The Shaderc 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 applicable...
Eloston/YAMCL
refs/heads/master
yamcl/libraries.py
1
''' YAMCL 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. YAMCL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;...
newyork167/volatility
refs/heads/master
volatility/plugins/overlays/windows/xp_sp3_x86_vtypes.py
58
ntkrnlmp_types = { 'LIST_ENTRY64' : [ 0x10, { 'Flink' : [ 0x0, ['unsigned long long']], 'Blink' : [ 0x8, ['unsigned long long']], } ], 'LIST_ENTRY32' : [ 0x8, { 'Flink' : [ 0x0, ['unsigned long']], 'Blink' : [ 0x4, ['unsigned long']], } ], '_LIST_ENTRY' : [ 0x8, { 'Flink' : [ 0x0, ['pointer', ...
tpsatish95/Python-Workshop
refs/heads/master
Python Environment Setup/Alternate/1. Python/1. Installer/Python-3.4.0(Linux)/Lib/turtledemo/colormixer.py
65
# colormixer from turtle import Screen, Turtle, mainloop import sys sys.setrecursionlimit(20000) # overcomes, for now, an instability of Python 3.0 class ColorTurtle(Turtle): def __init__(self, x, y): Turtle.__init__(self) self.shape("turtle") self.resizemode("user") self.shapes...
haowu4682/gem5
refs/heads/master
src/arch/x86/isa/insts/simd128/floating_point/data_conversion/convert_floating_point_to_floating_point.py
90
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
Onirik79/aaritmud
refs/heads/master
data/proto_rooms/krablath/krablath_room_bocca-leone-02-w.py
10
# -*- coding: utf-8 -*- import_path = "data.proto_rooms.krablath.krablath_room_bocca-leone-02-e" krablath_room_module = __import__(import_path, globals(), locals(), [""]) after_move = krablath_room_module.after_move after_touch = krablath_room_module.after_touch
lunyang/pylearn2
refs/heads/master
pylearn2/utils/python26.py
49
""" .. todo:: WRITEME """ import functools import sys if sys.version_info[:2] < (2, 7): def cmp_to_key(mycmp): """Convert a cmp= function into a key= function""" class K(object): __slots__ = ['obj'] def __init__(self, obj, *args): self.obj = obj ...
kenshay/ImageScripter
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/pygments/lexers/oberon.py
31
# -*- coding: utf-8 -*- """ pygments.lexers.oberon ~~~~~~~~~~~~~~~~~~~~~~ Lexers for Oberon family languages. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, words from pygmen...
koparasy/gemfi
refs/heads/master
src/unittest/stattestmain.py
76
def main(): from m5.internal.stattest import stattest_init, stattest_run import m5.stats stattest_init() # Initialize the global statistics m5.stats.initSimStats() m5.stats.initText("cout") # We're done registering statistics. Enable the stats package now. m5.stats.enable() # Re...
Gchorba/Ask
refs/heads/master
lib/python2.7/site-packages/flask/json.py
428
# -*- coding: utf-8 -*- """ flask.jsonimpl ~~~~~~~~~~~~~~ Implementation helpers for the JSON support in Flask. :copyright: (c) 2012 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import io import uuid from datetime import datetime from .globals import current_app, request fro...
arunchaganty/presidential-debates
refs/heads/master
django/javanlp/migrations/0002_auto_20151105_2216.py
3
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('javanlp', '0001_initial'), ] operations = [ migrations.AddField( model_name='sentence', name='consti...
satishgoda/bokeh
refs/heads/master
sphinx/source/docs/user_guide/source_examples/plotting_arcs.py
50
from bokeh.plotting import figure, show p = figure(width=400, height=400) p.arc(x=[1, 2, 3], y=[1, 2, 3], radius=0.1, start_angle=0.4, end_angle=4.8, color="navy") show(p)
google-code/abc2esac
refs/heads/master
abcesac/__init__.py
1
""" ================================================================================ abc2esac - ABC to EsAC conversion Copyright (C) 2010, Marcus Weseloh 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 Fr...
proxysh/Safejumper-for-Desktop
refs/heads/master
buildmac/Resources/env/lib/python2.7/site-packages/pip/_vendor/html5lib/__init__.py
336
""" HTML parsing library based on the WHATWG "HTML5" specification. The parser is designed to be compatible with existing HTML found in the wild and implements well-defined error recovery that is largely compatible with modern desktop web browsers. Example usage: import html5lib f = open("my_document.html") tree = ht...
kstrauser/ansible
refs/heads/devel
plugins/inventory/vbox.py
111
#!/usr/bin/env 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 distr...
BorgERP/borg-erp-6of3
refs/heads/master
addons/event/res_partner.py
9
# -*- 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...
mglukhikh/intellij-community
refs/heads/master
python/helpers/py3only/docutils/parsers/rst/roles.py
46
# $Id: roles.py 7514 2012-09-14 14:27:12Z milde $ # Author: Edward Loper <[email protected]> # Copyright: This module has been placed in the public domain. """ This module defines standard interpreted text role functions, a registry for interpreted text roles, and an API for adding to and retrieving from ...
JB1tz/kernel-msm
refs/heads/master
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
# failed system call counts, by pid # (c) 2010, Tom Zanussi <[email protected]> # 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...
bmannix/selenium
refs/heads/master
py/selenium/webdriver/phantomjs/service.py
55
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
digidudeofdw/enigma2
refs/heads/master
lib/python/Components/ResourceManager.py
33
class ResourceManager: def __init__(self): self.resourceList = {} def addResource(self, name, resource): print "adding Resource", name self.resourceList[name] = resource print "resources:", self.resourceList def getResource(self, name): if not self.hasResource(name): return None return self.r...
iamjakob/lumiCalc
refs/heads/master
LumiDB/scripts/pixelLumiCalc.py
1
#!/usr/bin/env python ######################################################################## # Command to calculate luminosity from HF measurement stored in lumiDB # # # # Author: Zhen Xie # #####...
bcornwellmott/erpnext
refs/heads/develop
erpnext/patches/v5_0/update_frozen_accounts_permission_role.py
97
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import frappe def execute(): account_settings = frappe.get_doc("Accounts Settings") if not account_settings.frozen_accounts_modifier and account_settings.bde_auth_role: frappe.db.set_val...
mal/chef
refs/heads/master
lib/chef/provider/package/yum/yum-dump.py
29
# # Author:: Matthew Kent (<[email protected]>) # Copyright:: Copyright 2009-2016, Matthew Kent # License:: Apache License, Version 2.0 # # 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 # # ...
rackerlabs/horizon
refs/heads/master
horizon/tabs/views.py
3
from django import http from django.views import generic from horizon import exceptions from horizon import tables from horizon.tabs.base import TableTab class TabView(generic.TemplateView): """ A generic class-based view for displaying a :class:`horizon.tabs.TabGroup`. This view handles selecting speci...
tiberiucorbu/av-website
refs/heads/master
main/auth/__init__.py
1
# coding: utf-8 from .auth import * from .bitbucket import * from .dropbox import * from .facebook import * from .gae import * from .github import * from .google import * from .instagram import * from .linkedin import * from .microsoft import * from .reddit import * from .twitter import * from .vk import * from .yahoo...
rdo-management/ironic
refs/heads/mgt-master
ironic/drivers/modules/fake.py
3
# -*- encoding: utf-8 -*- # # Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 # # ...
aghozlane/masque
refs/heads/master
rename_otu/rename_otu.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This prog...
g-weatherill/catalogue_toolkit
refs/heads/master
eqcat/__init__.py
6
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # LICENSE # # Copyright (c) 2015 GEM Foundation # # The Catalogue Toolkit is free software: you can redistribute # it and/or modify it under the terms of the GNU Affero General Public # License as published by the Free Software Foundation, either ...
tequa/ammisoft
refs/heads/master
ammimain/WinPython-64bit-2.7.13.1Zero/python-2.7.13.amd64/Lib/site-packages/numpy/core/setup.py
13
from __future__ import division, print_function import os import sys import pickle import copy import sysconfig import warnings from os.path import join from numpy.distutils import log from distutils.dep_util import newer from distutils.sysconfig import get_config_var from numpy._build_utils.apple_accelerate import ( ...
Yubico/python-u2flib-server
refs/heads/master
u2flib_server/attestation/data.py
1
YUBICO = { "identifier": "2fb54029-7613-4f1d-94f1-fb876c14a6fe", "version": 4, "vendorInfo": { "url": "https://yubico.com", "imageUrl": "https://developers.yubico.com/U2F/Images/yubico.png", "name": "Yubico" }, "trustedCertificates": [ "-----BEGIN CERTIFICATE-----\nMI...
mlperf/inference_results_v0.7
refs/heads/master
closed/QCT/code/dlrm/tensorrt/infer.py
18
#! /usr/bin/env python3 # Copyright (c) 2020, NVIDIA 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-2.0 # # ...
gangadharkadam/johnerp
refs/heads/develop
erpnext/accounts/page/accounts_browser/accounts_browser.py
34
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import frappe.defaults from frappe.utils import flt from erpnext.accounts.utils import get_balance_on @frappe.whitelist() def get_comp...
qedsoftware/commcare-hq
refs/heads/master
corehq/apps/smsbillables/migrations/0013_auto_20160826_1531.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('smsbillables', '0012_remove_max_length'), ] operations = [ migrations.AlterField( model_name='smsbillable', ...
xueyumusic/pynacl
refs/heads/master
src/nacl/bindings/crypto_sign.py
17
# Copyright 2013 Donald Stufft and individual contributors # # 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...
sadatay/beets
refs/heads/master
beets/mediafile.py
9
# This file is part of beets. # Copyright 2015, Adrian Sampson. # # 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, ...
zneext/mtasa-blue
refs/heads/master
utils/src/build_gettext_catalog_nsi.py
10
############################################################################## # # PROJECT: Multi Theft Auto v1.0 # LICENSE: See LICENSE in the top level directory # FILE: utils/build_gettext_catalog_nsi.py # PURPOSE: Create a template .pot file from a .NSI script # DEVELOPERS: Dan Chowdhury <>...
Tomtomgo/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/zipfileset_mock.py
167
# Copyright (C) 2011 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...
huddlej/pnwmoths
refs/heads/master
django/pnwmoths/species/management/commands/bulkops.py
1
""" Bulk operations code written by Ole Laursen: http://ole-laursen.blogspot.com/2010/11/bulk-inserting-django-objects.html -- Bulk insert/update DB operations for the Django ORM. Useful when inserting/updating lots of objects where the bottleneck is overhead in talking to the database. Instead of doing this for x...
JuanMatSa/PyFME
refs/heads/master
src/pyfme/aircrafts/aircraft.py
2
""" Python Flight Mechanics Engine (PyFME). Copyright (c) AeroPython Development Team. Distributed under the terms of the MIT License. Generic Aircraft ---------------- """ from abc import abstractmethod from copy import deepcopy from warnings import warn import numpy as np from scipy.optimize import least_squares ...
BrotherPhil/django
refs/heads/master
django/db/backends/base/base.py
147
import time import warnings from collections import deque from contextlib import contextmanager from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import DEFAULT_DB_ALIAS from django.db.backends import utils from django.db.backends.signals import connection_created ...
cristiana214/cristianachavez214-cristianachavez
refs/heads/master
python/src/Lib/distutils/command/build_py.py
52
"""distutils.command.build_py Implements the Distutils 'build_py' command.""" # This module should be kept compatible with Python 2.1. __revision__ = "$Id: build_py.py 65742 2008-08-17 04:16:04Z brett.cannon $" import string, os from types import * from glob import glob from distutils.core import Command from dist...
readbeyond/aeneas
refs/heads/master
aeneas/tests/test_runtimeconfiguration.py
5
#!/usr/bin/env python # coding=utf-8 # aeneas is a Python/C library and a set of tools # to automagically synchronize audio and text (aka forced alignment) # # Copyright (C) 2012-2013, Alberto Pettarin (www.albertopettarin.it) # Copyright (C) 2013-2015, ReadBeyond Srl (www.readbeyond.it) # Copyright (C) 2015-2017, A...
mathom/kombu
refs/heads/master
kombu/messaging.py
1
""" kombu.messaging =============== Sending and receiving messages. """ from __future__ import absolute_import from itertools import count from .compression import compress from .connection import maybe_channel, is_connection from .entity import Exchange, Queue, DELIVERY_MODES from .five import int_types, text_t, v...
grammy3/rewards
refs/heads/master
share/qt/extract_strings_qt.py
1294
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob OUT_CPP="src/qt/bitcoinstrings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' format produced by xgettext. Ret...
allotria/intellij-community
refs/heads/master
python/testData/quickFixes/PyMoveAttributeToInitQuickFixTest/skipDocstring_after.py
79
__author__ = 'ktisha' class A: """ class docstring """ def __init__(self): self.b = 1 def foo(self): pass
hs29590/pi_electroplating
refs/heads/master
pydobot/message.py
1
class Message: def __init__(self, b=None): if b is None: self.header = bytes([0xAA, 0xAA]) self.len = 0x00 self.ctrl = 0x00 self.params = bytes([]) self.checksum = None else: self.header = b[0:2] self.len = b[2] ...
ilstreltsov/django-db-mailer
refs/heads/master
dbmail/migrations/0007_auto_20150708_2016.py
2
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('dbmail', '0006_auto_20150708_0714'), ] operations = [ migrations.AlterModelOptions( name='mailsubscription', ...
Maronato/aosalunos
refs/heads/master
misago/apps/usercp/signature/views.py
3
from django.core.urlresolvers import reverse from django.shortcuts import redirect from django.utils.translation import ugettext as _ from misago import messages from misago.apps.errors import error403, error404 from misago.decorators import block_guest from misago.markdown import signature_markdown from misago.message...
iphoting/healthchecks
refs/heads/heroku
hc/front/tests/test_details.py
2
from datetime import datetime, timedelta as td from unittest.mock import patch from django.utils import timezone from hc.api.models import Flip, Check, Ping from hc.test import BaseTestCase class DetailsTestCase(BaseTestCase): def setUp(self): super().setUp() self.check = Check.objects.create(pro...
skyfallen/Kaggle-Diabetic-Retinopathy-Detection
refs/heads/master
Code/traincaffe/kappa.py
1
import sys import numpy as np def main(args): # Read options unweighted = squared = linear = verbose = csv = False if "-u" in args or "--unweighted" in args: unweighted = True elif "-s" in args or "--squared" in args: squared = True else: linear = True if "-v" in args or "--verbose" in args: verbose = Tr...
howcouldyouforgetthisusername/aries-analyzer
refs/heads/master
build/main/setuptools-27.2.0-py2.7.egg/setuptools/archive_util.py
36
"""Utilities for extracting common archive formats""" import zipfile import tarfile import os import shutil import posixpath import contextlib from distutils.errors import DistutilsError from pkg_resources import ensure_directory, ContextualZipFile __all__ = [ "unpack_archive", "unpack_zipfile", "unpack_tarfile...
Beauhurst/django
refs/heads/master
tests/template_tests/templatetags/custom.py
36
import operator from django import template from django.template.defaultfilters import stringfilter from django.utils.html import escape, format_html register = template.Library() @register.filter @stringfilter def trim(value, num): return value[:num] @register.filter def noop(value, param=None): """A noo...