repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
thaim/ansible
lib/ansible/modules/network/fortios/fortios_system_auto_script.py
13
10269
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 Lic...
mit
BT-astauder/odoo
addons/hr/res_config.py
377
3452
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
Godiyos/python-for-android
python3-alpha/python3-src/Lib/lib2to3/fixes/fix_execfile.py
175
1990
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer for execfile. This converts usages of the execfile function into calls to the built-in exec() function. """ from .. import fixer_base from ..fixer_util import (Comma, Name, Call, LParen, RParen, Dot, Node, ...
apache-2.0
PyCQA/astroid
astroid/__pkginfo__.py
1
1535
# Copyright (c) 2006-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2014-2020 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2014 Google, Inc. # Copyright (c) 2015-2017 Ceridwen <ceridwenv@gmail.com> # Copyright (c) 2015 Florian Bruhin <me@the-compiler.org> # Copyright (c) 2015 Radosław Ga...
lgpl-2.1
KSchopmeyer/smipyping
smicli/__init__.py
1
1459
# (C) Copyright 2017 Inova Development 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 appl...
mit
buhe/judge
pywinjob.py
2
7035
from ctypes.wintypes import * from ctypes import * import ctypes _kernel32 = ctypes.windll.kernel32 _ole32 = ctypes.windll.ole32 _oleaut32 = ctypes.windll.oleaut32 _netapi32 = ctypes.windll.netapi32 _advapi32 = ctypes.windll.advapi32 CreateJobObject = _kernel32.CreateJobObjectW CreateProcess = _kernel32.CreateProcess...
agpl-3.0
MarcosCommunity/odoo
marcos_addons/marcos_stock/__openerp__.py
3
2134
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2013-2015 Marcos Organizador de Negocios SRL http://marcos.do # Write by Eneldo Serrata (eneldo@marcos.do) # # This program is free software: you can redistribute it and/or modify # it un...
agpl-3.0
xindus40223115/w16b_test
static/Brython3.1.1-20150328-091302/Lib/token.py
743
3034
"""Token constants (from "token.h").""" __all__ = ['tok_name', 'ISTERMINAL', 'ISNONTERMINAL', 'ISEOF'] # This file is automatically generated; please don't muck it up! # # To update the symbols in this file, 'cd' to the top directory of # the python source tree after building the interpreter and run: # # ./pyth...
gpl-3.0
batxes/4Cin
SHH_WT_models/SHH_WT_models_final_output_0.1_-0.1_11000/mtx1_models/SHH_WT_models17169.py
4
17578
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
gpl-3.0
Jgarcia-IAS/SAT
openerp/addons-extra/odoo-pruebas/odoo-server/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Change.py
293
4692
######################################################################### # # Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com # Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Gene...
agpl-3.0
PierreF/docker-py
docker/auth/auth.py
16
6640
# Copyright 2013 dotCloud 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 t...
apache-2.0
vortec/pykafka
pykafka/utils/compat.py
6
3887
import sys __all__ = ['PY3', 'Semaphore'] PY3 = sys.version_info[0] >= 3 if PY3: from threading import Semaphore else: from threading import Condition, Lock # could use monotonic.monotonic() backport as well here... from time import time as _time # -- begin unmodified backport of threading.Sema...
apache-2.0
yangleo/cloud-github
openstack_dashboard/api/cinder.py
4
28730
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 OpenStack Foundation # Copyright 2012 Nebula, Inc. # Copyright (c) 2012 X.commerce, a business unit of eBay Inc. # # Licensed under the Apach...
apache-2.0
rustyhowell/raytracer_py
hitable.py
1
2340
from collections import namedtuple from vector3 import Vec3, dot from math import sqrt from ray import Ray HitRecord = namedtuple("HitRecord", ['t', 'p', 'normal', 'material']) class Hitable: def hit(self, ray_, t_min, t_max): """ Determine if the ray will hit the object :param ray_: ...
mit
ivanlmj/Android-DNSSL
Flask/lib/python2.7/site-packages/setuptools/command/bdist_egg.py
286
18718
"""setuptools.command.bdist_egg Build .egg distributions""" # This module should be kept compatible with Python 2.3 import sys, os, marshal from setuptools import Command from distutils.dir_util import remove_tree, mkpath try: # Python 2.7 or >=3.2 from sysconfig import get_path, get_python_version def _g...
gpl-2.0
squilter/mavlink
pymavlink/generator/lib/minixsv/xsvalXmlIf.py
79
4607
# # minixsv, Release 0.9.0 # file: xsvalXmlIf.py # # XML interface classes (derived wrapper classes) # # history: # 2007-07-04 rl created # # Copyright (c) 2004-2008 by Roland Leuthe. All rights reserved. # # -------------------------------------------------------------------- # The minixsv XML schema va...
lgpl-3.0
frostidaho/qtile
test/layouts/test_max.py
3
3431
# Copyright (c) 2011 Florian Mounier # Copyright (c) 2012, 2014-2015 Tycho Andersen # Copyright (c) 2013 Mattias Svala # Copyright (c) 2013 Craig Barnes # Copyright (c) 2014 ramnes # Copyright (c) 2014 Sean Vig # Copyright (c) 2014 Adi Sieker # Copyright (c) 2014 Chris Wesseling # # Permission is hereby granted, free o...
mit
qskycolor/viewfinder
backend/base/counters.py
13
12201
# Copyright 2012 Viewfinder Inc. All Rights Reserved. """ Module to support custom performance counters in python modules. """ __author__ = 'matt@emailscrubbed.com (Matt Tracy)' import time from dotdict import DotDict from collections import deque class _CounterManager(DotDict): """A CounterManager object is use...
apache-2.0
heracek/django-nonrel
tests/regressiontests/file_uploads/tests.py
1
11960
#! -*- coding: utf-8 -*- import errno import os import shutil from StringIO import StringIO from django.core.files import temp as tempfile from django.core.files.uploadedfile import SimpleUploadedFile from django.http.multipartparser import MultiPartParser from django.test import TestCase, client from django.utils imp...
bsd-3-clause
sestrella/ansible
test/units/plugins/connection/test_connection.py
45
11811
# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later...
gpl-3.0
sdpython/cvxpy
examples/penalty_comp_cvx.py
12
2035
from __future__ import division import sys import cvxopt import numpy as np from pylab import * import math from cvxpy import * # Taken from CVX website http://cvxr.com/cvx/examples/ # Figure 6.2: Penalty function approximation # Ported from cvx matlab to cvxpy by Misrab Faizullah-Khan # Original comments below # S...
gpl-3.0
bcelary/rbtools
rbtools/tests.py
5
6153
import unittest import urllib2 try: from cStringIO import StringIO except ImportError: from StringIO import StringIO try: import json except ImportError: import simplejson as json from rbtools import postreview from rbtools.api.errors import APIError from rbtools.clients import RepositoryInfo from rb...
mit
2014c2g23/w16b_test
static/Brython3.1.1-20150328-091302/Lib/base64.py
733
13975
#! /usr/bin/env python3 """RFC 3548: Base16, Base32, Base64 Data Encodings""" # Modified 04-Oct-1995 by Jack Jansen to use binascii module # Modified 30-Dec-2003 by Barry Warsaw to add full RFC 3548 support # Modified 22-May-2007 by Guido van Rossum to use bytes everywhere import re import struct import binascii _...
agpl-3.0
PaddlePaddle/models
PaddleRec/dssm/infer.py
1
1407
import paddle.fluid as fluid import numpy as np import sys import args import logging logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s') logger = logging.getLogger("fluid") logger.setLevel(logging.INFO) def infer(args): place = fluid.CUDAPlace(0) if args.use_gpu else fluid.CPUPlace() exe ...
apache-2.0
yencarnacion/jaikuengine
.google_appengine/lib/django-1.3/django/contrib/auth/forms.py
53
8947
from django.contrib.auth.models import User from django.contrib.auth import authenticate from django.contrib.auth.tokens import default_token_generator from django.contrib.sites.models import get_current_site from django.template import Context, loader from django import forms from django.utils.translation import ugett...
apache-2.0
rajvishah/TheiaSfM
libraries/gtest/test/gtest_test_utils.py
397
10437
#!/usr/bin/env python # # Copyright 2006, 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...
bsd-3-clause
Ragowit/hearthbreaker
tests/agents/trade/play_tests.py
9
4964
import unittest from hearthbreaker.cards import ArgentSquire, DireWolfAlpha, HarvestGolem, BloodfenRaptor, MagmaRager, Wisp, Ysera from hearthbreaker.cards.spells.neutral import TheCoin from tests.agents.trade.test_helpers import TestHelpers from hearthbreaker.agents.trade.possible_play import PossiblePlays from tests....
mit
grlee77/scipy
scipy/integrate/_ivp/tests/test_ivp.py
17
32797
from itertools import product from numpy.testing import (assert_, assert_allclose, assert_equal, assert_no_warnings, suppress_warnings) import pytest from pytest import raises as assert_raises import numpy as np from scipy.optimize._numdiff import group_columns from scipy.integrate import sol...
bsd-3-clause
omnirom/android_external_chromium-org
tools/isolate_driver.py
25
10477
#!/usr/bin/env python # 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. """Adaptor script called through build/isolate.gypi. Creates a wrapping .isolate which 'includes' the original one, that can be consum...
bsd-3-clause
svanschalkwyk/datafari
debian7/elk/kibana/node/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py
240
99242
# Copyright (c) 2013 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. import collections import copy import hashlib import json import multiprocessing import os.path import re import signal import subprocess import sys import gyp imp...
apache-2.0
gdementen/PyTables
c-blosc/bench/plot-speeds.py
11
6852
"""Script for plotting the results of the 'suite' benchmark. Invoke without parameters for usage hints. :Author: Francesc Alted :Date: 2010-06-01 """ import matplotlib as mpl from pylab import * KB_ = 1024 MB_ = 1024*KB_ GB_ = 1024*MB_ NCHUNKS = 128 # keep in sync with bench.c linewidth=2 #markers= ['+', ',', 'o...
bsd-3-clause
gunan/tensorflow
tensorflow/examples/saved_model/integration_tests/deploy_mnist_cnn.py
10
4252
# Copyright 2019 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...
apache-2.0
andres-liiver/IAPB13_suvendatud
Kodutoo_16/Kodutoo_16_Andres.py
1
2985
''' Kodutoo 16 14.11.2014 Andres Liiver ''' import time from matplotlib import pyplot as plt from Tund16gen import * def timeFunc(func, *args): start = time.clock() func(*args) return time.clock() - start def linear_search(lst, num): for item in lst: if item == num: return True ...
mit
akash1808/nova
nova/network/model.py
8
17055
# 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 requ...
apache-2.0
MiltosD/CEFELRC
lib/python2.7/site-packages/django/contrib/admin/templatetags/log.py
310
2270
from django import template from django.contrib.admin.models import LogEntry register = template.Library() class AdminLogNode(template.Node): def __init__(self, limit, varname, user): self.limit, self.varname, self.user = limit, varname, user def __repr__(self): return "<GetAdminLog Node>" ...
bsd-3-clause
tangrams/geojson-vt-cpp
deps/gyp/pylib/gyp/generator/make.py
6
89738
# Copyright (c) 2013 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. # Notes: # # This is all roughly based on the Makefile system used by the Linux # kernel, but is a non-recursive make -- we put the entire dependency # graph in fr...
isc
highweb-project/highweb-webcl-html5spec
native_client_sdk/src/build_tools/sdk_tools/config.py
131
2128
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import logging import urlparse from sdk_update_common import Error SOURCE_WHITELIST = [ 'http://localhost/', # For testing. 'https://st...
bsd-3-clause
queria/my-tempest
tempest/api/orchestration/stacks/test_non_empty_stack.py
2
7228
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
lewiskan/heron
heron/common/src/python/network/socket_options.py
8
2027
# Copyright 2016 Twitter. 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 agree...
apache-2.0
mesosphere/marathon-python
marathon/models/deployment.py
8
3119
from .base import MarathonObject, MarathonResource class MarathonDeployment(MarathonResource): """Marathon Application resource. See: https://mesosphere.github.io/marathon/docs/rest-api.html#deployments :param list[str] affected_apps: list of affected app ids :param current_actions: current actions ...
mit
zturchan/CMPUT410-Lab6
v1/lib/python2.7/site-packages/django/core/mail/backends/base.py
67
1236
"""Base email backend class.""" class BaseEmailBackend(object): """ Base class for email backend implementations. Subclasses must at least overwrite send_messages(). """ def __init__(self, fail_silently=False, **kwargs): self.fail_silently = fail_silently def open(self): """O...
apache-2.0
shouya/thinking-dumps
automata/homework/project2/CYK.py
1
4714
''' CYK algorithm for Context Free Language Author: Chenguang Zhu CS154, Stanford University ''' import sys,traceback import os import string maxProductionNum = 100 #max number of productions VarNum = 4 production = [[0] * 3 for i in range(maxProductionNum+1)] '''Prouductions in Chomsky Normal Form (C...
mit
AlphaSmartDog/DeepLearningNotes
Note-1 RNN-DNC择时/Note-1-1 DNCore L2正则化示例/sonnet/util/migrate_checkpoint.py
7
2809
# Copyright 2017 The Sonnet 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 l...
mit
byterom/android_external_chromium_org
tools/telemetry/telemetry/core/backends/chrome/cros_browser_backend.py
25
9015
# 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. import logging import os from telemetry import decorators from telemetry.core import exceptions from telemetry.core import forwarders from telemetry.core im...
bsd-3-clause
nexusriot/cinder
cinder/volume/drivers/remotefs.py
1
57137
# Copyright (c) 2012 NetApp, Inc. # Copyright (c) 2014 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses...
apache-2.0
Connexions/openstax-cms
news/models.py
1
15456
from bs4 import BeautifulSoup from django.db import models from django import forms from wagtail.core.models import Page, Orderable from wagtail.core.fields import RichTextField, StreamField from wagtail.admin.edit_handlers import FieldPanel, StreamFieldPanel, InlinePanel from wagtail.images.edit_handlers import Imag...
agpl-3.0
trishnaguha/ansible
lib/ansible/modules/network/netscaler/netscaler_cs_policy.py
124
9505
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 Citrix Systems # 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', ...
gpl-3.0
BT-rmartin/odoo
addons/fetchmail/fetchmail.py
167
15870
# -*- 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...
agpl-3.0
jerome-jacob/selenium
py/test/selenium/webdriver/common/select_class_tests.py
51
15528
# 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...
apache-2.0
gonicus/gosa
common/src/gosa/common/components/mqtt_proxy.py
1
3896
# This file is part of the GOsa framework. # # http://gosa-project.org # # Copyright: # (C) 2016 GONICUS GmbH, Germany, http://www.gonicus.de # # See the LICENSE file in the project's top-level directory for details. import uuid from tornado import gen from gosa.common import Environment from gosa.common.components...
lgpl-2.1
XtremeTeam/Lucy-bot
brain/plugins/delirium.py
1
13549
#===islucyplugin=== # -*- coding: utf-8 -*- # lucy plugin # delirium.py # Initial Copyright © 2007 Als <Als@exploit.in> # Modifications Copyright © 2014 x-team <x-team@muc.xtreme.im> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
gpl-2.0
direvus/ansible
lib/ansible/utils/module_docs_fragments/ipa.py
30
3121
# Copyright (c) 2017-18, Ansible Project # Copyright (c) 2017-18, Abhijeet Kasurde (akasurde@redhat.com) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Parameters for FreeIPA/IPA modules DOCUMENTATION = ''' options: ipa_port: ...
gpl-3.0
robert0714/vagrant-db-toolkit-v1
ansible/plugins/human_log.py
7
2381
# 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 program is distributed in the hope that it will be useful, # bu...
mit
optima-ict/odoo
addons/mass_mailing/models/mass_mailing_report.py
364
2244
# -*- coding: utf-8 -*- from openerp.osv import fields, osv from openerp import tools class MassMailingReport(osv.Model): _name = 'mail.statistics.report' _auto = False _description = 'Mass Mailing Statistics' _columns = { 'scheduled_date': fields.datetime('Scheduled Date', readonly=True), ...
agpl-3.0
evanscottgray/ryu
ryu/tests/integrated/vrrp_common.py
11
8658
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2013 Isaku Yamahata <yamahata at valinux co jp> # # 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://...
apache-2.0
sleshepic/G920T_OI1_kernel
tools/perf/python/twatch.py
7370
1334
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License...
gpl-2.0
fusionbox/mezzanine
mezzanine/accounts/admin.py
6
2307
from __future__ import unicode_literals from django.contrib import admin from mezzanine.accounts import get_profile_model, ProfileNotConfigured from mezzanine.core.admin import SitePermissionUserAdmin from mezzanine.conf import settings from mezzanine.utils.email import send_approved_mail, send_verification_mail from...
bsd-2-clause
zstackio/zstack-woodpecker
integrationtest/vm/vpc/test_vpc_two_eip_two_vm_connection.py
2
3269
''' @author: FangSun ''' import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.test_state as test_state import os import time from itertools import izip VLAN1_NAME, VLAN2_NAME = ['l3VlanNetworkName1', "l3VlanNetwork2"] VXLAN1_NAME, VXLAN2_NAME = ["l3VxlanN...
apache-2.0
takeshineshiro/glance
glance/common/crypt.py
8
2645
#!/usr/bin/env python # 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...
apache-2.0
ojengwa/talk
venv/lib/python2.7/site-packages/django/utils/lru_cache.py
270
7647
try: from functools import lru_cache except ImportError: # backport of Python's 3.3 lru_cache, written by Raymond Hettinger and # licensed under MIT license, from: # <http://code.activestate.com/recipes/578078-py26-and-py30-backport-of-python-33s-lru-cache/> # Should be removed when Django only sup...
mit
mfriedenhagen/Diamond
src/collectors/gridengine/gridengine.py
31
4889
# coding=utf-8 """ The GridEngineCollector parses qstat statistics from Sun Grid Engine, Univa Grid Engine and Open Grid Scheduler. #### Dependencies * Grid Engine qstat """ import os import re import subprocess import sys import xml.dom.minidom import diamond.collector class GridEngineCollector(diamond.collec...
mit
godfreyy/scrapy
tests/test_downloadermiddleware_retry.py
108
3750
import unittest from twisted.internet import defer from twisted.internet.error import TimeoutError, DNSLookupError, \ ConnectionRefusedError, ConnectionDone, ConnectError, \ ConnectionLost, TCPTimedOutError from scrapy import optional_features from scrapy.downloadermiddlewares.retry import RetryMiddlew...
bsd-3-clause
leiferikb/bitpop
src/third_party/webdriver/pylib/selenium/webdriver/common/touch_actions.py
38
4701
"""" Touch Actions implementation """ from selenium.webdriver.remote.command import Command class TouchActions(object): """ Generate touch actions. Works like ActionChains; actions are stored in the TouchActions object and are fired with perform(). """ def __init__(self, driver): """ ...
gpl-3.0
CristianoRC/CristianoRC.Github.io
node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py
1835
12124
# 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. """New implementation of Visual Studio project generation.""" import os import random import gyp.common # hashlib is supplied as of Python 2.5 as the replacemen...
mit
adedayo/intellij-community
python/testData/inspections/PyAssignmentToLoopOrWithParameterInspection/bad.py
71
2685
i = [] for i[0] in xrange(5): for <weak_warning descr="Variable 'i[0]' already declared in 'for' loop or 'with' statement above">i[0]</weak_warning> in xrange(20, 25): print("Inner", i) for <weak_warning descr="Variable 'i' already declared in 'for' loop or 'with' statement above">i</weak_warning> i...
apache-2.0
vmindru/ansible
lib/ansible/module_utils/crypto.py
11
6729
# -*- coding: utf-8 -*- # # (c) 2016, Yanis Guenane <yanis+ansible@guenane.org> # # 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 vers...
gpl-3.0
josesanch/django-timepiece
timepiece/contracts/urls.py
3
1405
from django.conf.urls import patterns, url from timepiece.contracts import views urlpatterns = patterns('', # Contracts url(r'^contract/$', views.ContractList.as_view(), name='list_contracts'), url(r'^contract/(?P<contract_id>\d+)/$', views.ContractDetail.as_view(), name='...
mit
Sightline-Networks/email_bar
email_bar.py
1
1124
#!/bin/python3 from argparse import ArgumentParser from configparser import ConfigParser from os.path import expanduser from mailbox import MaildirMessage, Maildir config = ConfigParser() config_mailboxes = {} config.read(expanduser('~/.config/email_bar.cfg')) parser = ArgumentParser() parser.add_argument('--on...
gpl-2.0
affo/nova
nova/db/sqlalchemy/migrate_repo/versions/276_vcpu_model.py
8
1400
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
Kubuxu/cjdns
node_build/dependencies/libuv/gyp_uv.py
42
3106
#!/usr/bin/env python import glob import platform import os import subprocess import sys CC = os.environ.get('CC', 'cc') script_dir = os.path.dirname(__file__) uv_root = os.path.normpath(script_dir) output_dir = os.path.join(os.path.abspath(uv_root), 'out') sys.path.insert(0, os.path.join(uv_root, 'build', 'gyp', 'p...
gpl-3.0
absoludity/servo
tests/wpt/css-tests/css-fonts-3_dev/xhtml1/reference/support/fonts/makegsubfonts.py
1616
14125
import os import textwrap from xml.etree import ElementTree from fontTools.ttLib import TTFont, newTable from fontTools.misc.psCharStrings import T2CharString from fontTools.ttLib.tables.otTables import GSUB,\ ScriptList, ScriptRecord, Script, DefaultLangSys,\ FeatureList, FeatureRecord, Feature,\ LookupLi...
mpl-2.0
louisLouL/pair_trading
capstone_env/lib/python3.6/site-packages/kafka/protocol/admin.py
1
7824
from __future__ import absolute_import from .api import Request, Response from .types import Array, Boolean, Bytes, Int16, Int32, Schema, String class ApiVersionResponse_v0(Response): API_KEY = 18 API_VERSION = 0 SCHEMA = Schema( ('error_code', Int16), ('api_versions', Array( ...
mit
kylef/bluepaste
bluepaste/models.py
1
2381
import datetime import json from hashlib import sha1 import requests import peewee from rivr_peewee import Database from pygments import highlight from pygments.formatters import HtmlFormatter from pygments.lexers import JsonLexer from bluepaste.lexer import BlueprintLexer from bluepaste.config import BLUEPRINT_PARSER...
mit
ovnicraft/server-tools
auth_brute_force/tests/test_brute_force.py
1
14413
# -*- coding: utf-8 -*- # Copyright 2017 Tecnativa - Jairo Llopis # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from threading import current_thread from urllib import urlencode from decorator import decorator from mock import patch from werkzeug.utils import redirect from odoo import http from od...
agpl-3.0
openchange/openchange
mapiproxy/services/ocsmanager/ocsmanager/model/AuthenticateModel.py
13
2301
from pylons import config from lxml import etree import re from base64 import urlsafe_b64encode as encode from base64 import urlsafe_b64decode as decode from ocsmanager.model.auth import SingleAuthenticateModel as single from ocsmanager.lib.utils import validateDocXML #from ocsmanager.model.auth import LDAPAuthentica...
gpl-3.0
jacquerie/inspire-dojson
inspire_dojson/hep/rules/bd0xx.py
1
12752
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014-2017 CERN. # # INSPIRE 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 ...
gpl-3.0
MattFaus/CrowdTube-Connector
lib/gdata-2.0.18/samples/apps/marketplace_sample/gdata/calendar/data.py
121
9852
#!/usr/bin/python # # Copyright (C) 2009 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 ...
mit
shipci/sympy
sympy/mpmath/ctx_fp.py
41
6572
from .ctx_base import StandardBaseContext import math import cmath from . import math2 from . import function_docs from .libmp import mpf_bernoulli, to_float, int_types from . import libmp class FPContext(StandardBaseContext): """ Context for fast low-precision arithmetic (53-bit precision, giving at most ...
bsd-3-clause
jpshort/odoo
addons/hr_timesheet/__openerp__.py
257
2310
# -*- 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...
agpl-3.0
lavish205/olympia
src/olympia/landfill/tests/test_collections.py
3
1644
# -*- coding: utf-8 -*- from olympia import amo from olympia.addons.models import Addon from olympia.amo.tests import TestCase from olympia.bandwagon.models import ( Collection, CollectionAddon, FeaturedCollection) from olympia.constants.applications import APPS from olympia.landfill.collection import generate_coll...
bsd-3-clause
iamjbecker/jeremybecker-ca
node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/styles/friendly.py
364
2515
# -*- coding: utf-8 -*- """ pygments.styles.friendly ~~~~~~~~~~~~~~~~~~~~~~~~ A modern style based on the VIM pyte theme. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keyw...
mit
pynocchio/pynocchio
pynocchio/comic_file_loader_dir.py
3
2074
import glob import logging from .comic import Page from .comic_file_loader import ComicLoader from .exception import NoDataFindException from .utility import IMAGE_FILE_FORMATS, get_file_extension, join_path, is_dir logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) def is_directory(dirname): ""...
gpl-3.0
scopenco/netblock-tools
netnull.py
1
3572
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Author: Andrey Skopenko <andrey@scopenco.net> '''A tool create ip route rules that blackhole networks by country code (ex: RU CN etc.) For the correct execution of script need to download geip database and country codes.''' import csv import sys import optparse import os...
bsd-3-clause
fnugrahendi/saleor
docs/conf.py
16
9190
# -*- coding: utf-8 -*- # # saleor documentation build configuration file, created by # sphinx-quickstart on Tue Jan 5 11:54:57 2016. # # 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. # # Al...
bsd-3-clause
bcorbet/SickRage
lib/guessit/matcher.py
21
6721
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2012 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free...
gpl-3.0
Kamik423/uni_plan
plan/plan/lib/python3.4/encodings/euc_jis_2004.py
816
1051
# # euc_jis_2004.py: Python Unicode Codec for EUC_JIS_2004 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('euc_jis_2004') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(m...
apache-2.0
otadmor/Open-Knesset
mks/managers.py
8
3787
import difflib from django.core.cache import cache from django.db import models, connection class KnessetManager(models.Manager): """This is a manager for Knesset class""" def __init__(self): super(KnessetManager, self).__init__() self._current_knesset = None def current_knesset(self)...
bsd-3-clause
trolldbois/ctypeslib
setup.py
1
1432
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup setup( name="ctypeslib2", version="2.3.2", description="ctypeslib2 - FFI toolkit, relies on clang", long_description=open("README.md").read(), long_description_content_type="text/markdown", author="Loic Jaquemet", a...
mit
gavares/bazel
tools/android/stubify_manifest_test.py
26
3618
# Copyright 2015 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 ag...
apache-2.0
dodaro/preasp
tests/asp/gringo/modelchecker.041.test.py
4
4151
input = """ p6|p9|p6|not_p22:-p19,p23. p2|p24|p15:-not p23. p1|p12|p2|not_p16:-not p23,not p3. p3|p20|p18:-p1,not p22. p3|not_p20|p18:-p13,not p22,not p14. p15|p4|p3|p1:-p12,p5. p3|p20|p18|p3:-p1,not p22. not_p2|not_p24|p9:-p1,p12,not p11. p15|p11|p24|p3. not_p4:-not p4. not_p23|p7|p21|p5:-p13,not p3. p1|p15...
apache-2.0
jicruz/heroku-bot
lib/youtube_dl/extractor/soundcloud.py
6
22537
# coding: utf-8 from __future__ import unicode_literals import itertools import re from .common import ( InfoExtractor, SearchInfoExtractor ) from ..compat import ( compat_str, compat_urlparse, compat_urllib_parse_urlencode, ) from ..utils import ( ExtractorError, int_or_none, unified_...
gpl-3.0
camelpunch/ctags
Test/simple.py
85
1037
"""A long string literal """ from bsddb import btopen # Public global constants VERSION = '1.2.0' # Flags for list() and children() ALL = 0xff KEY = 0x01 TREEID = 0x02 INDENT = 0x04 DATA = 0x08 # Used by dbtreedata class one: x = lambda x: x y = 0 def __init__(self, filename, pathsep='', treegap...
gpl-2.0
ju1ius/clisnips
clisnips/tui/widgets/progress/process.py
1
2218
import multiprocessing import os import signal from clisnips.tui.logging import logger from .message_queue import MessageQueue class Process(multiprocessing.Process): def __init__(self, message_queue: MessageQueue, target, args=(), kwargs=None): super().__init__(target=target, args=args, kwargs=kwargs o...
gpl-3.0
sanyaade-mobiledev/renderer-service-upnp
test/rendererconsole.py
1
5827
# -*- coding: utf-8 -*- # renderer-console # # Copyright (C) 2012 Intel Corporation. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU Lesser General Public License, # version 2.1, as published by the Free Software Foundation. #...
lgpl-2.1
XXMrHyde/android_external_chromium_org
third_party/protobuf/protobuf_lite_java_parse_pom.py
88
1834
#!/usr/bin/env python # 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. """Parses the Maven pom.xml file for which files to include in a lite build. Usage: protobuf_lite_java_parse_pom.py {path to p...
bsd-3-clause
SnappleCap/oh-mainline
vendor/packages/celery/celery/worker/__init__.py
18
12962
# -*- coding: utf-8 -*- """ celery.worker ~~~~~~~~~~~~~ The worker. :copyright: (c) 2009 - 2011 by Ask Solem. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import atexit import logging import socket import sys import threading import traceback from komb...
agpl-3.0
isabellaleehs/isabellaleehs.github.io
projects/webapp1/flask/lib/python2.7/site-packages/pip/utils/hashes.py
517
2866
from __future__ import absolute_import import hashlib from pip.exceptions import HashMismatch, HashMissing, InstallationError from pip.utils import read_chunks from pip._vendor.six import iteritems, iterkeys, itervalues # The recommended hash algo of the moment. Change this whenever the state of # the art changes; ...
mit
fresskarma/tinyos-1.x
tools/python/pytos/util/RoutingMessages.py
1
7725
# "Copyright (c) 2000-2003 The Regents of the University of California. # All rights reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose, without fee, and without written agreement # is hereby granted, provided that the above copyright notice, the follow...
bsd-3-clause
anirudhSK/chromium
net/tools/quic/benchmark/run_client.py
165
6744
#!/usr/bin/env python # 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. import csv import datetime import json import os import shlex import subprocess import sys from optparse import OptionParser """Start...
bsd-3-clause
avian2/unidecode
unidecode/x1d4.py
1
3863
data = ( 'A', # 0x00 'B', # 0x01 'C', # 0x02 'D', # 0x03 'E', # 0x04 'F', # 0x05 'G', # 0x06 'H', # 0x07 'I', # 0x08 'J', # 0x09 'K', # 0x0a 'L', # 0x0b 'M', # 0x0c 'N', # 0x0d 'O', # 0x0e 'P', # 0x0f 'Q', # 0x10 'R', # 0x11 'S', # 0x12 'T', # 0x13 'U', # 0...
gpl-2.0