repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
TheTypoMaster/chromium-crosswalk
refs/heads/master
tools/telemetry/telemetry/internal/story_runner_unittest.py
4
# Copyright 2014 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 StringIO import sys import unittest from catapult_base import cloud_storage from telemetry import benchmark from telemetry.core import exce...
adwiputra/LUMENS-repo
refs/heads/master
processing/algs/VectorLayerHistogram.py
6
# -*- coding: utf-8 -*- """ *************************************************************************** EquivalentNumField.py --------------------- Date : January 2013 Copyright : (C) 2013 by Victor Olaya Email : volayaf at gmail dot com *******************...
vmendez/DIRAC
refs/heads/integration
RequestManagementSystem/Client/ReqClient.py
1
""" :mod: ReqClient .. module: ReqClient :synopsis: implementation of client for RequestDB using DISET framework """ import os import time import random import json # # from DIRAC from DIRAC import gLogger, S_OK, S_ERROR from DIRAC.Core.DISET.RPCClient import RPCClient from DIRAC.Core.Utilities.List import ran...
anhstudios/swganh
refs/heads/develop
data/scripts/templates/object/tangible/mission/quest_item/shared_ayn_eckener_q3_needed.py
2
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/mission/quest_item/shared_ayn_eckener_q3_needed.iff" result.attribu...
olsonse/linuxcnc
refs/heads/master
scripts/torture.py
5
#!/usr/bin/env python # Copyright (C) 2012 Jeff Epler <jepler@unpythonic.net> # # 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 opti...
sss/calibre-at-bzr
refs/heads/upstream/master
src/calibre/ebooks/conversion/plugins/recipe_input.py
3
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import os from calibre.customize.conversion import InputFormatPlugin, OptionRecommen...
suto/infernal-twin
refs/heads/master
build/pip/build/lib.linux-i686-2.7/pip/_vendor/requests/packages/urllib3/__init__.py
482
""" urllib3 - Thread-safe connection pooling and re-using. """ __author__ = 'Andrey Petrov (andrey.petrov@shazow.net)' __license__ = 'MIT' __version__ = '1.10.4' from .connectionpool import ( HTTPConnectionPool, HTTPSConnectionPool, connection_from_url ) from . import exceptions from .filepost import en...
o5k/openerp-oemedical-v0.1
refs/heads/master
openerp/netsvc.py
22
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2014 OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of...
Isvan/csss-minion
refs/heads/master
translate.py
4
import discord from discord.ext import commands import json import requests import urllib.parse class Translate: def __init__(self, bot): self.bot = bot # https://www.youtube.com/watch?v=T3EIEOSN3EA self.codes = json.load(open("lang.json")) def sneakpastgooglesecurity(...
YuepengGuo/zipline
refs/heads/master
tests/test_blotter.py
10
# # Copyright 2014 Quantopian, 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 to in wr...
Nicop06/ansible
refs/heads/devel
lib/ansible/modules/network/avi/avi_applicationprofile.py
27
#!/usr/bin/python # # Created on Aug 25, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the te...
kayhayen/Nuitka
refs/heads/develop
nuitka/nodes/AssignNodes.py
1
# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
luca76/QGIS
refs/heads/master
python/pyplugin_installer/qgsplugininstallerpluginerrordialog.py
9
# -*- coding:utf-8 -*- """ /*************************************************************************** qgsplugininstallerpluginerrordialog.py Plugin Installer module ------------------- Date : June 2013 Copyright...
arnavd96/Cinemiezer
refs/heads/master
myvenv/lib/python3.4/site-packages/boto/cognito/sync/layer1.py
135
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights ...
soad241/django-notification
refs/heads/master
notification/management/commands/emit_notices.py
30
import logging from django.core.management.base import NoArgsCommand from notification.engine import send_all class Command(NoArgsCommand): help = "Emit queued notices." def handle_noargs(self, **options): logging.basicConfig(level=logging.DEBUG, format="%(message)s") logging.info("-" *...
4c656554/xhtml2pdf
refs/heads/master
test/visualdiff.py
154
# Copyright 2010 Dirk Holtwick, holtwick.it # # 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 ...
tcard/typeschema
refs/heads/master
tests/properties/network_test.py
2
import doctest import unittest import typeschema.properties.network class TestCase(unittest.TestCase): def test_properties_location_doc(self): fails, tested = doctest.testmod(typeschema.properties.network) if fails > 0: self.fail('Doctest failed!')
darkleons/BE
refs/heads/master
addons/point_of_sale/report/pos_lines.py
150
# -*- 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...
sourcepole/qgis-wps-client
refs/heads/master
apicompat/sipv1/decorators.py
1
# -*- coding: utf-8 -*- """ /*************************************************************************** ApiCompat A QGIS plugin API compatibility layer ------------------- begin : 2013-07-02 copyright : (C) 2013 ...
jmhsi/justin_tinker
refs/heads/master
lib/python3.6/site-packages/pip/_vendor/requests/packages/chardet/__init__.py
1777
######################## BEGIN LICENSE BLOCK ######################## # This library 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) any later ve...
dongjoon-hyun/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/functional_ops_test.py
3
# 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...
TRESCLOUD/odoopub
refs/heads/master
addons/account/report/account_partner_balance.py
95
# -*- 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...
kenshay/ImageScripter
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/jsonschema/cli.py
65
from __future__ import absolute_import import argparse import json import sys from jsonschema._reflect import namedAny from jsonschema.validators import validator_for def _namedAnyWithDefault(name): if "." not in name: name = "jsonschema." + name return namedAny(name) def _json_file(path): with...
FabianHahn/shoveler-spatialos
refs/heads/master
shoveler/thirdparty/googletest/googletest/test/gtest_help_test.py
2968
#!/usr/bin/env python # # Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
AloneRoad/Inforlearn
refs/heads/1.0-rc3
common/templatetags/actor.py
1
#! coding: utf-8 """django template tags for contact display logic """ __author__ = 'mikie@google.com (Mika Raento)' import urllib from django import template from django.utils.html import escape from common.util import create_nonce register = template.Library() def is_not_contact(user, view, actor): if not user ...
calvinchengx/O-Kay-Blog-wih-Kay-0.10.0
refs/heads/master
kay/tests/gaema_testapp/urls.py
10
# -*- coding: utf-8 -*- """ Kay gaema test urls. :Copyright: (c) 2009 Takashi Matsuo <tmatsuo@candit.jp> All rights reserved. :license: BSD, see LICENSE for more details. """ from kay.routing import ( ViewGroup, Rule ) view_groups = [ ViewGroup( Rule('/', endpoint='index', view='kay.tests.gaema_testapp.view...
Kaggle/docker-python
refs/heads/rm-custom-cudatoolkit-install
tests/test_datatable.py
1
import unittest import datatable as dt from datatable.internal import frame_integrity_check from datatable import ltype class TestDatatable(unittest.TestCase): def test_fread(self): d0 = dt.fread( "L,T,U,D\n" "true,True,TRUE,1\n" "false,False,FALSE,0\n" "...
owlsn/h_crawl
refs/heads/master
display/display/connections/mysql_connection.py
1
# -*- coding: utf-8 -*- from display.config import MYSQL import pymysql import traceback # twisted adbapi连接 class MysqlConnection(object): def __init__(self): self.config = MYSQL def get_instance(self, *args, **kwargs): keys = kwargs.keys() if not hasattr(self, 'conn') or not self.con...
schlueter/ansible
refs/heads/devel
lib/ansible/modules/windows/win_file.py
47
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk> # # 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, eith...
jmehnle/ansible
refs/heads/devel
lib/ansible/modules/web_infrastructure/letsencrypt.py
18
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016 Michael Gruener <michael.gruener@chaosmoon.net> # # 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...
cyberdelia/perlinpinpin
refs/heads/master
setup.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- from distutils.core import setup, Command from unittest import TextTestRunner, TestLoader import perlinpinpin class TestCommand(Command): description = "run unit tests" user_options = [] def initialize_options(self): pass def finalize_options(se...
ar7z1/ansible
refs/heads/devel
lib/ansible/modules/network/cloudengine/ce_ospf.py
43
#!/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...
paweljasinski/ironpython3
refs/heads/master
Tests/interop/net/loadorder/t1d.py
3
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of t...
Jeff-Lewis/namebench
refs/heads/master
setup.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...
xdevc/xgenerationcoin
refs/heads/master
contrib/wallettools/walletchangepass.py
2299
from jsonrpc import ServiceProxy access = ServiceProxy("http://127.0.0.1:8332") pwd = raw_input("Enter old wallet passphrase: ") pwd2 = raw_input("Enter new wallet passphrase: ") access.walletpassphrasechange(pwd, pwd2)
nave91/dbt
refs/heads/development
test/integration/018_adapter_ddl_tests/test_adapter_ddl.py
1
from nose.plugins.attrib import attr from test.integration.base import DBTIntegrationTest class TestAdapterDDL(DBTIntegrationTest): def setUp(self): DBTIntegrationTest.setUp(self) self.run_sql_file("test/integration/018_adapter_ddl_tests/seed.sql") @property def schema(self): ret...
kishikawakatsumi/Mozc-for-iOS
refs/heads/master
src/third_party/gyp/test/configurations/target_platform/gyptest-target_platform.py
351
#!/usr/bin/env python # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Tests the msvs specific msvs_target_platform option. """ import TestGyp import TestCommon def RunX64(exe, stdout): try: test.ru...
Dziolas/invenio
refs/heads/scoap3
modules/websearch/lib/websearch_external_collections_searcher.py
26
# -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## Li...
Letractively/rdflib
refs/heads/master
test/test_issue200.py
1
#!/usr/bin/env python import os, sys, time, random import rdflib import unittest try: from hashlib import md5 except ImportError: from md5 import md5 import platform if platform.system() == 'Java': from nose import SkipTest raise SkipTest('No os.pipe() in Jython, skipping') # Adapted from http://ico...
MichaelNedzelsky/intellij-community
refs/heads/master
python/testData/refactoring/move/module/before/src/a.py
166
from p1.p2 import m1 from p1.p2.m1 import foo import p1.p2.m1 import p1 p1.p2.m1.foo m1.bar m1 foo
timothymschier/geotrellis-ec2-cluster
refs/heads/develop
deployment/cfn/leader.py
3
from troposphere import ( Parameter, Ref, GetAtt, Tags, Base64, ec2) import template_utils as utils import troposphere.route53 as r53 class MesosLeader(utils.GTStackNode): """Leader stack""" INPUTS = { 'NameSpace': ['global:NameSpace'], 'Tags': ['global:Tags'], ...
lorin/shelllogger
refs/heads/master
sl/states.py
1
""" State machine states """ import codecs import os import re import time import util # regex for matching the prompt # this is used to identify the data directory re_prompt = re.compile(r'(.*)^\[SL (.*)\]\$ $', re.MULTILINE | re.DOTALL | re.IGNORECASE) mac_prompt = re.compile(re.compile(r'(?:.*)\[SL (.*)\](.*)(\$...
ifduyue/django
refs/heads/master
django/core/checks/model_checks.py
72
import inspect import types from itertools import chain from django.apps import apps from django.core.checks import Error, Tags, register @register(Tags.models) def check_all_models(app_configs=None, **kwargs): errors = [] if app_configs is None: models = apps.get_models() else: models = ...
amandolo/ansible-modules-core
refs/heads/devel
cloud/amazon/ec2_asg.py
8
#!/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 distributed...
raiet/spider-mvc
refs/heads/master
www/wsgiapp.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Michael Liao' ''' A WSGI application entry. ''' import logging; logging.basicConfig(level=logging.INFO) import os, time from datetime import datetime from transwarp import db from transwarp.web import WSGIApplication, Jinja2TemplateEngine from config imp...
FederatedAI/FATE
refs/heads/master
examples/pipeline/hetero_fast_sbt/pipeline-hetero-sbt-layered-binary.py
1
# # Copyright 2019 The FATE 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 appli...
jiadaizhao/LeetCode
refs/heads/master
0401-0500/0500-Keyboard Row/0500-Keyboard Row.py
1
class Solution: def findWords(self, words: List[str]) -> List[str]: first = set('qwertyuiop') second = set('asdfghjkl') third = set('zxcvbnm') result = [] for word in words: curr = set(word.lower()) if curr.issubset(first) or curr.issubset(second) or c...
yashodhank/erpnext
refs/heads/develop
erpnext/selling/doctype/sms_center/__init__.py
37694
from __future__ import unicode_literals
daira/zcash
refs/heads/master
qa/rpc-tests/invalidateblock.py
3
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or https://www.opensource.org/licenses/mit-license.php . # # Test InvalidateBlock code # from test_framework.test_framework import BitcoinTestFramework from te...
freaxmind/miage-m1
refs/heads/master
csi/FreeMAP/manage.py
963
#!/usr/bin/env python from django.core.management import execute_manager import imp try: imp.find_module('settings') # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized t...
haripradhan/MissionPlanner
refs/heads/master
Lib/pstats.py
50
"""Class for printing reports on profiled python code.""" # Class for printing reports on profiled python code. rev 1.0 4/1/94 # # Based on prior profile module by Sjoerd Mullender... # which was hacked somewhat by: Guido van Rossum # # see profile.py for more info. # Copyright 1994, by InfoSeek Corporati...
Eric89GXL/mne-python
refs/heads/master
mne/externals/decorator.py
18
# ######################### LICENSE ############################ # # Copyright (c) 2005-2018, Michele Simionato # 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 so...
freifeld/of
refs/heads/master
gpu/resample/resample3d.py
1
#!/usr/bin/env python """ Created on Sun Dec 7 15:09:45 2014 Author: Oren Freifeld Email: freifeld@csail.mit.edu """ import numpy as np from pycuda.compiler import SourceModule from pycuda.driver import Context from pycuda import gpuarray from of.utils import ipshell _kernel=""" __global__ void resampler( double*...
adamjmcgrath/glancydesign
refs/heads/master
src/django-nonrel/django/conf/locale/mn/formats.py
433
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'd F Y' TIME_FORMAT = 'g:i:s A' # DATETIME_FORMAT = # YEAR_MONTH_FORMAT = ...
h4wkmoon/shinken
refs/heads/master
shinken/objects/discoveryrule.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you can redis...
QiJune/Paddle
refs/heads/master
python/paddle/fluid/tests/book/high-level-api/understand_sentiment/test_understand_sentiment_dynamic_rnn.py
1
# Copyright (c) 2018 PaddlePaddle 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 appli...
ericzolf/ansible
refs/heads/devel
test/lib/ansible_test/_internal/util.py
3
"""Miscellaneous utility functions and classes.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import contextlib import errno import fcntl import hashlib import inspect import os import pkgutil import random import re import shutil import socket import stat import string imp...
shwinpiocess/fire
refs/heads/master
job/migrations/0001_initial.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import jsonfield.fields class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Script', fields=[ ('id'...
tiberiucorbu/av-website
refs/heads/master
main/config.py
2
# coding: utf-8 import os PRODUCTION = os.environ.get('SERVER_SOFTWARE', '').startswith('Google App Eng') DEBUG = DEVELOPMENT = not PRODUCTION try: # This part is surrounded in try/except because the config.py file is # also used in the run.py script which is used to compile/minify the client # side files (*....
jrobhoward/SCADAbase
refs/heads/SCADAbase
contrib/unbound/libunbound/python/examples/dnssec-valid.py
2
#!/usr/bin/python ''' dnssec-valid.py: DNSSEC validation Authors: Zdenek Vasicek (vasicek AT fit.vutbr.cz) Marek Vavrusa (xvavru00 AT stud.fit.vutbr.cz) Copyright (c) 2008. All rights reserved. This software is open source. Redistribution and use in source and binary forms, with or without modifi...
lovesoft/gae-init
refs/heads/master
main/config.py
9
# coding: utf-8 import os PRODUCTION = os.environ.get('SERVER_SOFTWARE', '').startswith('Google App Eng') DEBUG = DEVELOPMENT = not PRODUCTION try: # This part is surrounded in try/except because the config.py file is # also used in the run.py script which is used to compile/minify the client # side files (*....
sawenzel/root
refs/heads/master
main/python/cmdLineUtils.py
4
#!/usr/bin/env @python@ # ROOT command line tools module: cmdLineUtils # Author: Julien Ripoche # Mail: julien.ripoche@u-psud.fr # Date: 20/08/15 """Contain utils for ROOT command line tools""" ########## # Stream redirect functions # The original code of the these functions can be found here : # http://stackoverflo...
hejuna/bite-project
refs/heads/master
deps/gdata-python-client/samples/blogger/BloggerExampleV1.py
133
#!/usr/bin/python # # Copyright (C) 2007 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 ...
JustinWingChungHui/okKindred
refs/heads/master
facial_recognition/migrations/0001_initial.py
2
# Generated by Django 2.2.6 on 2019-10-11 16:19 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('family_tree', '0014_auto_20191004_1022'), ] operations = [ migrations.CreateModel( ...
cyberark-bizdev/ansible
refs/heads/devel
lib/ansible/plugins/action/unarchive.py
19
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2013, Dylan Martin <dmartin@seattlecentral.edu> # # 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 v...
Cryptoo/kernel
refs/heads/cryptoo-4.0
arch/ia64/scripts/unwcheck.py
13143
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
kashifmin/BLU_LIFE_ONE
refs/heads/master
arch/ia64/scripts/unwcheck.py
13143
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
xeddmc/ZIB-Trojan
refs/heads/master
compileZIB.py
6
import sys, random, string, os, urllib, time, base64, zlib import base64 import hashlib from Crypto import Random from Crypto.Cipher import AES os.chdir("\\python27\\scripts\\") os.system("copy lel.exe chp.exe") #print "python "+sys.argv[0]+" BotMainProcess.exe DaemonProcess.exe #IRCchannel ChannelPassword RegKeyName I...
kevinlondon/youtube-dl
refs/heads/master
youtube_dl/extractor/minhateca.py
127
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, ) from ..utils import ( int_or_none, parse_duration, parse_filesize, ) class MinhatecaIE(InfoExtractor): _VALID_URL = r'https?://minhate...
JonathanSwaim/Tjagonaj_Translator
refs/heads/master
en/parser/nltk_lite/draw/dispersion.py
9
# Natural Language Toolkit: Dispersion Plots # # Copyright (C) 2001-2006 University of Pennsylvania # Author: Steven Bird <sb@csse.unimelb.edu.au> # URL: <http://nltk.sf.net> # For license information, see LICENSE.TXT """ A utility for displaying lexical dispersion. """ from Tkinter import Canvas def plot(text, word...
dmckinney5/SlackOff
refs/heads/master
slackoff/lib/python2.7/site-packages/pip/status_codes.py
1002
from __future__ import absolute_import SUCCESS = 0 ERROR = 1 UNKNOWN_ERROR = 2 VIRTUALENV_NOT_FOUND = 3 PREVIOUS_BUILD_DIR_ERROR = 4 NO_MATCHES_FOUND = 23
OpenDA-Association/OpenDA
refs/heads/master
model_bmi/python/resources/openda/thrift_generated_code/openda/bmi/thrift/ttypes.py
1
# # Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py:new_style # from thrift.Thrift import TType, TMessageType, TException, TApplicationException from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol, TP...
remenska/rootpy
refs/heads/master
rootpy/extern/argparse.py
490
# Author: Steven J. Bethard <steven.bethard@gmail.com>. """Command-line parsing library This module is an optparse-inspired command-line parsing library that: - handles both optional and positional arguments - produces highly informative usage messages - supports parsers that dispatch to sub-parsers The...
Soya93/Extract-Refactoring
refs/heads/master
python/testData/formatter/alignInGenerators_after.py
83
def supprice(): if True: if True: agdrn = sum(VARS[drn + price] * md.c[drn][1] * md.c[drn][3] * exp(md.c[drn][2] * VARS['SEEPAGE'] - md.c[drn][3] * pmp) for drn in md.agdrn_nodes if drn in md.c)
beni55/flask
refs/heads/master
flask/helpers.py
5
# -*- coding: utf-8 -*- """ flask.helpers ~~~~~~~~~~~~~ Implements various helpers. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import sys import pkgutil import posixpath import mimetypes from time import time from zlib import adler32 from th...
jfrazee/nifi
refs/heads/master
nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/test/resources/jython/test_invalid.py
38
#! /usr/bin/python # # 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 # "Lic...
rklabs/IKEv2
refs/heads/master
src/ps_mem.py
3
#!/usr/bin/env python # Try to determine how much RAM is currently being used per program. # Note per _program_, not per process. So for example this script # will report RAM used by all httpd process together. In detail it reports: # sum(private RAM for program processes) + sum(Shared RAM for program processes) # The...
JohnReid/biopsy
refs/heads/master
Python/site_dpm/test_scipy_beta.py
1
import scipy.stats as S, numpy as N from rpy2.robjects import r alpha, beta = 0.0710, 0.4222 for i in xrange(20): x_from_scipy = S.beta.rvs(alpha, beta) x_from_R = r.rbeta(1, alpha, beta) print 'Alpha=%.2e; Beta=%.2e; scipy.stats.beta.rvs=%.2e; R.rbeta=%.2e' % (alpha, beta, x_from_scipy, x_from_R[0]) a...
Ritiek/Scribd-Downloader
refs/heads/master
scribdl/content/test/test_book.py
1
from .. import book import pytest @pytest.fixture(scope="module") def scribd_book(): return book.ScribdBook( "https://www.scribd.com/read/189087235/Confessions-of-a-Casting-Director-Help-Actors-Land-Any-Role-with-Secrets-from-Inside-the-Audition-Room") class TestScribdBook: def test_title(self, scr...
Neurosim-lab/netpyne
refs/heads/development
netpyne/tutorials/saving_loading_tut/saving_normal_cfg.py
1
from netpyne import specs cfg = specs.SimConfig() # Saving parameters cfg.simLabel = 'saving_normal' cfg.saveFolder = cfg.simLabel + '_data' cfg.savePickle = True cfg.saveDataInclude = ['simData', 'simConfig', 'netParams', 'net'] # Simulation parameters cfg.duration = 10000 cfg.dt = 0.025 cfg.recordStep = 0.1 # Ana...
cosmorogers/PiTank
refs/heads/master
Tank_Controller.py
1
from Adafruit_PWM_Servo_Driver import PWM import time import RPi.GPIO as io import time class TankController: right_en = 0 right_a = 1 right_b = 2 left_en = 4 left_a = 5 left_b = 6 turt_en = 8 turt_a = 9 turt_b = 10 pwm = PWM(0x40, debug=False) pwmMax = 4095 pwmMin = ...
402231466/2015cd_midterm
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/test/__init__.py
2547
# Dummy file to make this directory a package.
zzzombat/lucid-python-django
refs/heads/master
django/contrib/messages/storage/base.py
399
from django.conf import settings from django.utils.encoding import force_unicode, StrAndUnicode from django.contrib.messages import constants, utils LEVEL_TAGS = utils.get_level_tags() class Message(StrAndUnicode): """ Represents an actual message that can be stored in any of the supported storage class...
wpjesus/codematch
refs/heads/dev
ietf/group/colors.py
2
# # colours should be taken from the group as a list of "Areas" # but for now, just return a dict of areas and colours. # fg_group_colors = dict() fg_group_colors['APP']="#008" fg_group_colors['ART']="#808" fg_group_colors['GEN']="#080" fg_group_colors['INT']="#088" fg_group_colors['OPS']="#800" fg_group_colors['RAI']...
catapult-project/catapult
refs/heads/master
third_party/gsutil/third_party/argcomplete/argcomplete/my_argparse.py
8
# Copyright 2012-2013, Andrey Kislyuk and argcomplete contributors. # Licensed under the Apache License. See https://github.com/kislyuk/argcomplete for more info. from argparse import ArgumentParser, ArgumentError, SUPPRESS, _SubParsersAction from argparse import OPTIONAL, ZERO_OR_MORE, ONE_OR_MORE, REMAINDER, PARSER ...
jolyonb/edx-platform
refs/heads/master
common/djangoapps/student/roles.py
2
""" Classes used to model the roles used in the courseware. Each role is responsible for checking membership, adding users, removing users, and listing members """ from __future__ import absolute_import import logging from abc import ABCMeta, abstractmethod from collections import defaultdict import six from django....
lsqtongxin/django
refs/heads/master
tests/contenttypes_tests/models.py
70
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.http import urlquote @python_2_unicode_compatible class Author(models.Model): name = models.CharField(max_length=100) def __str__(self): return self.na...
eerwitt/tensorflow
refs/heads/master
tensorflow/python/debug/cli/analyzer_cli_test.py
6
# Copyright 2016 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...
paplorinc/intellij-community
refs/heads/master
python/testData/quickFixes/PyTypeHintsQuickFixTest/instanceCheckOnCallable_after.py
18
from typing import Callable class A: pass assert isinstance(A(), Callable)
Omegaphora/external_chromium_org
refs/heads/lp5.1
third_party/cython/src/Cython/Compiler/StringEncoding.py
97
# # Cython -- encoding related tools # import re import sys if sys.version_info[0] >= 3: _unicode, _str, _bytes = str, str, bytes IS_PYTHON3 = True else: _unicode, _str, _bytes = unicode, str, str IS_PYTHON3 = False empty_bytes = _bytes() empty_unicode = _unicode() join_bytes = empty_bytes.join c...
circleback/sensu-community-plugins
refs/heads/master
plugins/openstack/nova/nova-server-state-metrics.py
47
#!/usr/bin/env python # #RED from argparse import ArgumentParser import socket import time from novaclient.v3 import Client DEFAULT_SCHEME = '{}.nova.states'.format(socket.gethostname()) def output_metric(name, value): print '{}\t{}\t{}'.format(name, value, int(time.time())) def main(): parser = ArgumentPa...
harveybia/face-hack
refs/heads/master
venv/face/lib/python2.7/site-packages/setuptools/lib2to3_ex.py
907
""" Customized Mixin2to3 support: - adds support for converting doctests This module raises an ImportError on Python 2. """ from distutils.util import Mixin2to3 as _Mixin2to3 from distutils import log from lib2to3.refactor import RefactoringTool, get_fixers_from_package import setuptools class DistutilsRefactorin...
cwu2011/scikit-learn
refs/heads/master
sklearn/linear_model/tests/test_randomized_l1.py
214
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # License: BSD 3 clause import numpy as np from scipy import sparse from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_raises from sklearn.linear_model.randomized_l1 i...
gaddman/ansible
refs/heads/devel
test/units/modules/network/slxos/slxos_module.py
46
# (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 later version. # # Ansib...
LordDamionDevil/Lony
refs/heads/master
lib/requests/packages/chardet/charsetgroupprober.py
2928
######################## 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 ...
luotao1/Paddle
refs/heads/develop
python/paddle/fluid/tests/unittests/npu/test_logical_op_npu.py
2
# Copyright (c) 2021 PaddlePaddle 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 appli...
jrowan/zulip
refs/heads/master
zerver/worker/queue_processors.py
1
# Documented in http://zulip.readthedocs.io/en/latest/queuing.html from __future__ import absolute_import from typing import Any, Callable, Dict, List, Mapping, Optional, cast import signal import sys import os sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../api'))) ...
hamzy/OpenBMC
refs/heads/master
openbmc/__init__.py
1305
#!/usr/bin/env python
hilaskis/UAV_MissionPlanner
refs/heads/master
Lib/site-packages/scipy/fftpack/setupscons.py
51
#!"C:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\bin\Debug\ipy.exe" # Created by Pearu Peterson, August 2002 from os.path import join def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration from numpy.distutils.system_info import...
onitake/ansible
refs/heads/devel
test/units/modules/network/f5/test_bigip_wait.py
21
# -*- coding: utf-8 -*- # # Copyright (c) 2017 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 import os import json import pytest import sys if sys.version_info < (2, ...