repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
sexroute/commandergenius
project/jni/python/src/Tools/faqwiz/faqw.py
32
1089
#! /usr/local/bin/python """FAQ wizard bootstrap.""" # This is a longer version of the bootstrap script given at the end of # faqwin.py; it prints timing statistics at the end of the regular CGI # script's output (so you can monitor how it is doing). # This script should be placed in your cgi-bin directory and made ...
lgpl-2.1
Ophiuchus1312/enigma2-master
lib/python/Plugins/Extensions/Infopanel/QuickMenu.py
1
34917
from enigma import eListboxPythonMultiContent, gFont, eEnv from Components.ActionMap import ActionMap from Components.Label import Label from Components.Pixmap import Pixmap from Components.MenuList import MenuList from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmapAlphaTest from Compon...
gpl-2.0
Pajinek/spacewalk
client/rhel/rhn-client-tools/test/haltreetests.py
19
2901
# rhn-client-tools # # Copyright (C) 2006--2012 Red Hat, 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; version 2 of the License. # # This program is distributed in the hope th...
gpl-2.0
google/audio-to-tactile
extras/python/dsp.py
1
11542
# Copyright 2020-2021 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
kwlzn/pants
src/python/pants/fs/archive.py
6
6233
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from abc i...
apache-2.0
wbrefvem/heroku-buildpack-python
vendor/pip-pop/pip/_vendor/distlib/_backport/shutil.py
1002
25650
# -*- coding: utf-8 -*- # # Copyright (C) 2012 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """Utility functions for copying and archiving files and directory trees. XXX The functions here don't copy the resource fork or other metadata on Mac. """ import os import sys import stat from os...
mit
hale36/SRTV
lib/unidecode/x0ae.py
253
4875
data = ( 'geul', # 0x00 'geulg', # 0x01 'geulm', # 0x02 'geulb', # 0x03 'geuls', # 0x04 'geult', # 0x05 'geulp', # 0x06 'geulh', # 0x07 'geum', # 0x08 'geub', # 0x09 'geubs', # 0x0a 'geus', # 0x0b 'geuss', # 0x0c 'geung', # 0x0d 'geuj', # 0x0e 'geuc', # 0x0f 'geuk', # ...
gpl-3.0
shubhamchaudhary/gistit
gistit/creator.py
1
1855
import sys import time import json import requests if sys.version_info >= (3, ): import urllib.request as urllib2 import urllib.parse as urlparse import urllib.error as urlerror else: import urllib2 import urlparse class Creator: ''' Gist Creator class ''' def create(self, content, publi...
gpl-3.0
ess-dmsc/event-formation-unit
utils/efushell/SocketDriver.py
1
1215
import string import socket import sys import time import threading class SimpleSocket: def __init__(self, hostname="localhost", port=8888, timeout=2): self.access_semaphor = threading.Semaphore(1) try: self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) except socket...
bsd-2-clause
ThisIsMyNick/GPSLi
tokenrules.py
1
2028
#TODO: rename token names to be less generic. eg, MINUS rather than DASH. #TODO: use a literals[] list reserved = { 'print' : 'PRINT', 'if' : 'IF', 'else' : 'ELSE', 'while' : 'WHILE', 'for' : 'FOR', 'func' : 'FUNC', 'return' : 'RETURN', 'true' : 'TRUE', ...
mit
terbolous/cloudstack-ec2stack
ec2stack/providers/cloudstack/tags.py
3
4224
#!/usr/bin/env python # encoding: utf-8 # # 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 Licens...
apache-2.0
qqzwc/XX-Net
code/default/gae_proxy/server/lib/google/appengine/api/source_pb.py
10
5646
#!/usr/bin/env python # # Copyright 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 o...
bsd-2-clause
fw1121/bcbio-nextgen
bcbio/variation/split.py
16
1601
"""Utilities for manipulating VCF files. """ import os from bcbio.bam import ref from bcbio.utils import file_exists, replace_suffix, append_stem from bcbio.distributed.transaction import file_transaction from bcbio.pipeline import config_utils from bcbio.provenance import do from bcbio.variation import bamprep, vcfut...
mit
Becavalier/MachineLearning
TENSORFLOW/MNIST/mnist_deep.py
1
7459
# 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...
mit
openstenoproject/plover
plover/oslayer/log_plyer.py
2
1152
import os import logging from plyer import notification from plover import log, __name__ as __software_name__ from plover.oslayer.config import ASSETS_DIR, PLATFORM APPNAME = __software_name__.capitalize() if PLATFORM == 'win': APPICON = os.path.join(ASSETS_DIR, 'plover.ico') else: APPICON = os.path.join(A...
gpl-2.0
talha81/TACTIC-DEV
src/pyasm/deprecated/flash/flash_publish_cmd.py
6
7340
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
mglukhikh/intellij-community
python/testData/pyi/inspections/overloadsWithDifferentNumberOfParameters/OverloadsWithDifferentNumberOfParameters.py
14
1830
from m1 import f, g, h def test_different_number_of_parameters(): f(5) f(<warning descr="Expected type 'int', got 'str' instead">"a"</warning>) f(5, "a") f(<warning descr="Expected type 'int', got 'str' instead">"a"</warning>, "b") f(5, <warning descr="Expected type 'str', got 'int' instead">6</w...
apache-2.0
zhoulingjun/django
tests/migrations/test_base.py
292
4620
import os import shutil import tempfile from contextlib import contextmanager from importlib import import_module from django.apps import apps from django.db import connection from django.db.migrations.recorder import MigrationRecorder from django.test import TransactionTestCase from django.test.utils import extend_sy...
bsd-3-clause
sailthru/mongo-connector
mongo_connector/doc_managers/mongo_doc_manager.py
2
11650
# Copyright 2013-2014 MongoDB, 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 writin...
apache-2.0
liuluheng/codereading
leveldb/include/leveldb/.ycm_extra_conf.py
1
2637
import os import ycm_core from clang_helpers import PrepareClangFlags # Set this to the absolute path to the folder (NOT the file!) containing the # compile_commands.json file to use that instead of 'flags'. See here for # more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html # Most projects will NOT n...
mit
HugoKuo/keystone-essex3
keystone/frontends/legacy_token_auth.py
1
4999
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (c) 2010-2011 OpenStack, LLC. # # 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/lice...
apache-2.0
codinuum/cca
python/src/cca/ccautil/tp.py
1
10197
#!/usr/bin/env python3 ''' A naive implementation of task pool Copyright 2012-2020 Codinuum Software Lab <https://codinuum.com> 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 h...
apache-2.0
Perferom/android_external_chromium
testing/gtest/test/gtest_xml_outfiles_test.py
718
5312
#!/usr/bin/env python # # Copyright 2008, 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
garyjyao1/ansible
lib/ansible/utils/module_docs_fragments/openstack.py
118
4021
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # # 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...
gpl-3.0
sb98052/plyprotobuf
demo.py
1
1178
import plyxproto.parser as plyproto test1 = """package tutorial;""" test2 = """package tutorial; message Person { required string name = 1; required int32 id = 2; optional string email = 3; } """ test3 = """package tutorial; option java_outer_classname = "PushNotifications"; option optimize_for = SPEED; p...
apache-2.0
ahmadiga/min_edx
lms/djangoapps/verify_student/management/commands/tests/test_verify_student.py
101
2620
""" Tests for django admin commands in the verify_student module Lots of imports from verify_student's model tests, since they cover similar ground """ from nose.tools import assert_equals from mock import patch from django.test import TestCase from django.conf import settings from student.tests.factories import Use...
agpl-3.0
davidmontgom/pyvmomi-community-samples
samples/virtual_machine_device_info.py
10
10630
#!/usr/bin/env python # VMware vSphere Python SDK # Copyright (c) 2008-2014 VMware, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
apache-2.0
batxes/4Cin
SHH_WT_models/SHH_WT_models_final_output_0.1_-0.1_11000/SHH_WT_models40839.py
2
17582
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
sarahn/ganeti
doc/conf.py
12
7207
# -*- coding: utf-8 -*- # # Ganeti documentation build configuration file, created by # sphinx-quickstart on Tue Apr 14 13:23:20 2009. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All ...
gpl-2.0
tornadomeet/mxnet
example/image-classification/symbols/resnet-v1.py
69
10040
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
ak2166/ThinkStats2
code/mystery.py
68
1578
"""This file contains code used in "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function import random import numpy as np import scipy.stats def write_sample(sample, filena...
gpl-3.0
CheckiO-Missions/checkio-task-fizz-buzz
verification/tests.py
3
1566
""" TESTS is a dict with all you tests. Keys for this will be categories' names. Each test is dict with "input" -- input data for user function "answer" -- your right answer "explanation" -- not necessary key, it's using for additional info in animation. """ TESTS = { "Basics": [ { ...
gpl-2.0
henriquemiranda/yambo-py
tutorial/si/gw_si.py
5
1117
# # Author: Henrique Pereira Coutada Miranda # Run a GW calculation using Yambo # from __future__ import print_function from yambopy import * from qepy import * yambo = 'yambo' if not os.path.isdir('database'): os.mkdir('database') #check if the nscf cycle is present if os.path.isdir('nscf/si.save'): print(...
bsd-3-clause
RealVNC/android-kernel-omap
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
1927
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
gpl-2.0
sacharya/nova
nova/virt/disk/mount/loop.py
12
2314
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Red Hat, 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 ...
apache-2.0
Chunfang/defmod-swpc
example/F3Db/F3D_bd.py
1
19469
#!/usr/bin/env python import numpy as np import os, sys, netCDF4 fin = sys.argv[1] nc = netCDF4.Dataset(fin) # Define model type explicit = False implicit = False fault = True # One and only one of aboves must be True poro = True visc = False grad_BC = False dim = 3 if explicit: t = 7.5; dt = 0.001; nviz = 2...
mit
anryko/ansible
test/units/plugins/connection/test_winrm.py
21
15652
# -*- coding: utf-8 -*- # (c) 2018, Jordan Borean <jborean@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type import pytest from io import Strin...
gpl-3.0
sajeeshcs/nested_quota_final
nova/tests/unit/objects/test_fields.py
4
19532
# Copyright 2013 Red Hat, 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 a...
apache-2.0
HLFH/CouchPotatoServer
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/abc.py
89
1593
from __future__ import unicode_literals import re import json from .common import InfoExtractor class ABCIE(InfoExtractor): IE_NAME = 'abc.net.au' _VALID_URL = r'http://www\.abc\.net\.au/news/[^/]+/[^/]+/(?P<id>\d+)' _TEST = { 'url': 'http://www.abc.net.au/news/2014-11-05/australia-to-staff-ebo...
gpl-3.0
SurfasJones/icecream-info
icecream/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.py
187
5659
# urllib3/connection.py # Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import socket from socket import timeout as SocketTimeout try: # Python 3 from http.cli...
mit
taito/xhtml2pdf
xhtml2pdf/w3c/cssSpecial.py
37
14359
# -*- coding: utf-8 -*- # 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 ...
apache-2.0
theheros/kbengine
kbe/res/scripts/common/Lib/heapq.py
3
17502
"""Heap queue algorithm (a.k.a. priority queue). Heaps are arrays for which a[k] <= a[2*k+1] and a[k] <= a[2*k+2] for all k, counting elements from 0. For the sake of comparison, non-existing elements are considered to be infinite. The interesting property of a heap is that a[0] is always its smallest element. ...
lgpl-3.0
salaria/odoo
addons/hr_timesheet/__init__.py
410
1104
# -*- 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...
agpl-3.0
ARMmbed/yotta_osx_installer
workspace/lib/python2.7/site-packages/pip/_vendor/six.py
878
29664
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2015 Benjamin Peterson # # 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 with...
apache-2.0
chongtianfeiyu/kbengine
kbe/res/scripts/common/Lib/encodings/aliases.py
726
15414
""" Encoding Aliases Support This module is used by the encodings package search function to map encodings names to module names. Note that the search function normalizes the encoding names before doing the lookup, so the mapping will have to map normalized encoding names to module names. Con...
lgpl-3.0
GraemeFulton/job-search
docutils-0.12/build/lib/docutils/utils/urischemes.py
154
6275
# $Id: urischemes.py 7464 2012-06-25 13:16:03Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ `schemes` is a dictionary with lowercase URI addressing schemes as keys and descriptions as values. It was compiled from the index at http://www.iana.or...
gpl-2.0
piquadrat/django
tests/template_tests/syntax_tests/i18n/test_filters.py
133
2071
from django.test import SimpleTestCase from django.utils import translation from ...utils import setup class I18nFiltersTests(SimpleTestCase): libraries = { 'custom': 'template_tests.templatetags.custom', 'i18n': 'django.templatetags.i18n', } @setup({'i18n32': '{% load i18n %}{{ "hu"|lan...
bsd-3-clause
AlessandroCorsi/fibermodes
scripts/tof/tofoptim.py
2
2631
from fibermodes import Wavelength, FiberFactory from fibermodes.simulator import PSimulator from fibermodes.simulator import Simulator from scipy.optimize import minimize from itertools import product import numpy import time import logging import pickle from multiprocessing import TimeoutError from tofcommon import r1...
gpl-3.0
rbalda/neural_ocr
env/lib/python2.7/site-packages/mpl_toolkits/tests/test_axes_grid.py
7
1600
from matplotlib.testing.decorators import image_comparison from mpl_toolkits.axes_grid1 import ImageGrid import numpy as np import matplotlib.pyplot as plt @image_comparison(baseline_images=['imagegrid_cbar_mode'], extensions=['png'], remove_text=True) def test_imagegrid_cbar_mode...
mit
claytantor/grailo
feeds/atompub/atom.py
1
22483
# # django-atompub by James Tauber <http://jtauber.com/> # http://code.google.com/p/django-atompub/ # An implementation of the Atom format and protocol for Django # # For instructions on how to use this module to generate Atom feeds, # see http://code.google.com/p/django-atompub/wiki/UserGuide # # # Copyright (c) 2007...
lgpl-3.0
bcl/blivet
blivet/storage_log.py
12
2617
import inspect import logging import sys import traceback log = logging.getLogger("blivet") log.addHandler(logging.NullHandler()) def function_name_and_depth(): IGNORED_FUNCS = ["function_name_and_depth", "log_method_call", "log_method_return"] stack = inspect.stack()...
gpl-2.0
reinout/django
django/utils/numberformat.py
44
2476
from decimal import Decimal from django.conf import settings from django.utils.safestring import mark_safe def format(number, decimal_sep, decimal_pos=None, grouping=0, thousand_sep='', force_grouping=False): """ Get a number (as a number or string), and return it as a string, using formats de...
bsd-3-clause
cbrucks/Federated_Keystone
keystone/common/sql/migrate_repo/versions/018_add_trust_tables.py
5
2468
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # # 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
ROHOST/enableDNS
project/backend/views.py
1
1199
from django.http import HttpResponse from project.backend.decorators import basic_auth from project.backend.models import * import project.backend.dnsOperations as op import project.backend.functions as func def getIP(request): return HttpResponse(request.META['REMOTE_ADDR']) @basic_auth def update_ip(request):...
gpl-2.0
kmacinnis/sympy
sympy/mpmath/tests/test_diff.py
18
2173
from sympy.mpmath import * def test_diff(): mp.dps = 15 assert diff(log, 2.0, n=0).ae(log(2)) assert diff(cos, 1.0).ae(-sin(1)) assert diff(abs, 0.0) == 0 assert diff(abs, 0.0, direction=1) == 1 assert diff(abs, 0.0, direction=-1) == -1 assert diff(exp, 1.0).ae(e) assert diff(exp, 1.0, ...
bsd-3-clause
timelinelabs/python-librato
librato/metrics.py
1
3370
# Copyright (c) 2013. Librato, 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 a...
bsd-3-clause
Barmaley-exe/scikit-learn
sklearn/cluster/__init__.py
12
1331
""" The :mod:`sklearn.cluster` module gathers popular unsupervised clustering algorithms. """ from .spectral import spectral_clustering, SpectralClustering from .mean_shift_ import (mean_shift, MeanShift, estimate_bandwidth, get_bin_seeds) from .affinity_propagation_ import affinity_propagati...
bsd-3-clause
sahiljain/catapult
telemetry/third_party/modulegraph/modulegraph_tests/test_setuptools_nspkg.py
23
4473
""" Tests that deal with setuptools namespace packages, and in particular the installation flavour used by pip """ import os import shutil import sys import subprocess import unittest import textwrap from modulegraph import modulegraph gRootDir = os.path.dirname(os.path.abspath(__file__)) gSrcDir = os.path.join(gRoot...
bsd-3-clause
dati91/servo
tests/wpt/web-platform-tests/tools/third_party/pytest/src/_pytest/logging.py
32
19604
""" Access and control log capturing. """ from __future__ import absolute_import, division, print_function import logging from contextlib import closing, contextmanager import re import six from _pytest.config import create_terminal_writer import pytest import py DEFAULT_LOG_FORMAT = "%(filename)-25s %(lineno)4d %(...
mpl-2.0
js0701/chromium-crosswalk
chrome/common/extensions/PRESUBMIT.py
42
6715
# 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. """Presubmit script for changes affecting extensions. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about...
bsd-3-clause
SecretImbecile/McrRaspJam
008_senseHAT/snake.py
2
2863
#Libraries import random from time import sleep from copy import deepcopy # io import pygame from pygame.locals import * from sense_hat import SenseHat UH = SenseHat() hat = SenseHat() ######## Sense Hat Workshop ########## difficulty = 0.333 #seconds between turns, lower is harder def get_input(di...
cc0-1.0
chriskmanx/qmole
QMOLEDEV/pygtk-2.16.0/examples/pygtk-demo/demos/textscroll.py
1
4522
#!/usr/bin/env python """Text Widget/Automatic scrolling This example demonstrates how to use the gravity of GtkTextMarks to keep a text view scrolled to the bottom while appending text.""" import gobject import gtk class AutomaticScrollingDemo(gtk.Window): def __init__(self, parent=None): # Create the t...
gpl-3.0
TimothyVandenbrande/ansible-modules-extras
cloud/vmware/vmware_host.py
71
7599
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Joseph Callen <jcallen () csc.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 Li...
gpl-3.0
emedinaa/contentbox
main/templatetags/box_thumb.py
4
1161
# 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 ...
apache-2.0
StackStorm/st2contrib
archive/packs/github/actions/create_release.py
3
2656
import time import datetime from lib.base import BaseGithubAction class CreateReleaseAction(BaseGithubAction): def run(self, api_user, repository, name, body, github_type, target_commitish="master", version_increase="patch", draft=False, prerelease=False): enterprise = self._is_...
apache-2.0
mfriedenhagen/Diamond
src/collectors/ip/ip.py
27
3207
# coding=utf-8 """ The IPCollector class collects metrics on IP stats #### Dependencies * /proc/net/snmp #### Allowed Metric Names <table> <tr><th>Name</th></tr> <tr><th>InAddrErrors</th></tr> <tr><th>InDelivers</th></tr> <tr><th>InDiscards</th></tr> <tr><th>InHdrErrors</th></tr> <tr><th>InReceives</th></tr> <tr><...
mit
srikantbmandal/ansible
lib/ansible/modules/network/nxos/nxos_gir.py
56
12088
#!/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...
gpl-3.0
cloudera/hue
desktop/core/ext-py/Django-1.11.29/tests/bash_completion/tests.py
167
3898
""" A series of tests to establish that the command-line bash completion works. """ import os import sys import unittest from django.apps import apps from django.core.management import ManagementUtility from django.test.utils import captured_stdout class BashCompletionTests(unittest.TestCase): """ Testing th...
apache-2.0
ghostlines/ghostlines-robofont
Ghostlines.roboFontExt/lib/site-packages/requests/packages/urllib3/util/selectors.py
86
18836
# Backport of selectors.py from Python 3.5+ to support Python < 3.4 # Also has the behavior specified in PEP 475 which is to retry syscalls # in the case of an EINTR error. This module is required because selectors34 # does not follow this behavior and instead returns that no dile descriptor # events have occurred rath...
mit
seanli9jan/tensorflow
tensorflow/python/grappler/memory_optimizer_test.py
7
13762
# Copyright 2017 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
simonwydooghe/ansible
lib/ansible/modules/cloud/docker/docker_secret.py
16
9234
#!/usr/bin/python # # Copyright 2016 Red Hat | Ansible # 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', 'status': ['prev...
gpl-3.0
quanvm009/codev7
openerp/addons/sale_analytic_plans/__init__.py
443
1208
# -*- 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
tensorflow/estimator
tensorflow_estimator/python/estimator/canned/kmeans.py
1
20373
# 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...
apache-2.0
trozet/tacker
tacker/service.py
2
3283
# Copyright 2011 VMware, Inc # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
apache-2.0
sshleifer/object_detection_kitti
slim/nets/nets_factory.py
31
5146
# 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 applicable ...
apache-2.0
alateeq99/notepad-plus-plus
scintilla/test/MessageNumbers.py
59
1229
# List many windows message numbers msgs = { "WM_ACTIVATE":6, "WM_ACTIVATEAPP":28, "WM_CAPTURECHANGED":533, "WM_CHAR":258, "WM_CLOSE":16, "WM_CREATE":1, "WM_COMMAND":273, "WM_DESTROY":2, "WM_ENTERSIZEMOVE":561, "WM_ERASEBKGND":20, "WM_EXITSIZEMOVE":562, "WM_GETMINMAXINFO":36, "WM_GETTEXT":13, "WM_IME_S...
gpl-2.0
steventimberman/masterDebater
env/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py
354
3406
"""A collection of modules for building different kinds of tree from HTML documents. To create a treebuilder for a new type of tree, you need to do implement several things: 1) A set of classes for various types of elements: Document, Doctype, Comment, Element. These must implement the interface of _base.treebuilders...
mit
switchkiller/ProjDjanko
lib/python2.7/site-packages/django/core/management/commands/testserver.py
63
2075
from django.core.management import call_command from django.core.management.base import BaseCommand from django.db import connection class Command(BaseCommand): help = 'Runs a development server with data from the given fixture(s).' args = '[fixture ...]' requires_system_checks = False def add_argum...
gpl-2.0
ChrisGoedhart/Uforia
source/django/contrib/auth/tests/views.py
20
19548
from __future__ import with_statement import os import re import urllib from django.conf import settings from django.contrib.sites.models import Site, RequestSite from django.contrib.auth.models import User from django.core import mail from django.core.urlresolvers import reverse, NoReverseMatch from django.http impor...
gpl-2.0
abalkin/numpy
numpy/core/setup.py
1
42021
import os import sys import pickle import copy import warnings import platform import textwrap 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.compat import npy_load_module from setup_common import * # noqa: F403 ...
bsd-3-clause
akesandgren/easybuild-framework
easybuild/tools/repository/hgrepo.py
2
7479
# # # Copyright 2009-2021 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (...
gpl-2.0
jonahzheng/zperfmon
server/db_cron/daily_aggregate.py
3
6481
#!/usr/bin/python # # Copyright 2013 Zynga 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 applicabl...
apache-2.0
adeshr/qds-sdk-py
qds_sdk/commands.py
2
51594
""" The commands module contains the base definition for a generic Qubole command and the implementation of all the specific commands """ from qds_sdk.qubole import Qubole from qds_sdk.resource import Resource from qds_sdk.exception import ParseError from qds_sdk.account import Account from qds_sdk.util import GentleO...
apache-2.0
ksrajkumar/openerp-6.1
openerp/addons/point_of_sale/report/account_statement.py
9
1923
# -*- 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
oliverychen/oliverychen.github.io
vendor/cache/ruby/2.1.0/gems/pygments.rb-0.6.2/vendor/pygments-main/external/moin-parser.py
42
3600
# -*- coding: utf-8 -*- """ The Pygments MoinMoin Parser ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is a MoinMoin parser plugin that renders source code to HTML via Pygments; you need Pygments 0.7 or newer for this parser to work. To use it, set the options below to match your setup and put this file in ...
mit
Midrya/chromium
my_activity.py
16
25354
#!/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. """Get stats about your activity. Example: - my_activity.py for stats for the current week (last week on mondays). - my_activ...
bsd-3-clause
golismero/golismero-devel
golismero/api/data/vulnerability/information_disclosure/domain_disclosure.py
8
2288
#!/usr/bin/env python # -*- coding: utf-8 -*- __license__ = """ GoLismero 2.0 - The web knife - Copyright (C) 2011-2014 Golismero project site: https://github.com/golismero Golismero project mail: contact@golismero-project.com This program is free software; you can redistribute it and/or modify it under the terms of...
gpl-2.0
joshuamataaraya/AuctionSystem
pythonClient/main.py
2
16379
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import (Flask, render_template, request, flash, redirect, url_for) from flask_login import (LoginManager, login_user, logout_user, login_required, current_user) from user import User from sql import SQLConnection from...
mit
wen-bo-yang/Paddle
python/paddle/trainer_config_helpers/config_parser_utils.py
6
1416
# Copyright (c) 2016 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 applic...
apache-2.0
doggan/code-dump
ai_cmd/mycmd.py
1
8313
# Your AI for CTF must inherit from the base Commander class. See how this is # implemented by looking at the commander.py in the ./api/ folder. from api import Commander # The commander can send 'Commands' to individual bots. These are listed and # documented in commands.py from the ./api/ folder also. from a...
unlicense
loghaan/warmice
lib/python/pyx/reader.py
2
5244
# -*- encoding: utf-8 -*- # # # Copyright (C) 2007-2011 Jörg Lehmann <joergl@users.sourceforge.net> # Copyright (C) 2007-2011 André Wobst <wobsta@users.sourceforge.net> # # This file is part of PyX (http://pyx.sourceforge.net/). # # PyX is free software; you can redistribute it and/or modify # it under the terms of the...
gpl-3.0
Senseg/Py4A
python3-alpha/python3-src/Lib/_compat_pickle.py
78
3081
# This module is used to map the old Python 2 names to the new names used in # Python 3 for the pickle module. This needed to make pickle streams # generated with Python 2 loadable by Python 3. # This is a copy of lib2to3.fixes.fix_imports.MAPPING. We cannot import # lib2to3 and use the mapping defined there, becaus...
apache-2.0
zizhongwei/php-buildpack-master
lib/build_pack_utils/detecter.py
49
2523
import os import re import logging from itertools import chain class BaseFileSearch(object): def __init__(self): self._log = logging.getLogger('detecter') self.recursive = False self.fullPath = False def _match(self, term): return True def search(self, root): if s...
apache-2.0
lukas-hetzenecker/home-assistant
homeassistant/helpers/__init__.py
23
1417
"""Helper methods for components within Home Assistant.""" import re from typing import Any, Iterable, Tuple, Sequence, Dict from homeassistant.const import CONF_PLATFORM # Typing Imports and TypeAlias # pylint: disable=using-constant-test,unused-import,wrong-import-order if False: from logging import Logger # ...
mit
zhantyzgz/polaris
plugins/leagueoflegends.py
1
5307
from core.utils import * from bs4 import BeautifulSoup commands = [ ('/lol', ['summoner']), ('/br ', ['summoner']), ('/eune ', ['summoner']), ('/euw ', ['summoner']), ('/kr ', ['summoner']), ('/lan ', ['summoner']), ('/las ', ['summoner']), ('/na ', ['summoner']), ('/oce...
gpl-2.0
kamenim/samba-old
buildtools/wafsamba/symbols.py
24
22068
# a waf tool to extract symbols from object files or libraries # using nm, producing a set of exposed defined/undefined symbols import Utils, Build, subprocess, Logs, re from samba_wildcard import fake_build_environment from samba_utils import * # these are the data structures used in symbols.py: # # bld.env.symbol_m...
gpl-3.0
jjmleiro/hue
desktop/core/ext-py/Paste-2.0.1/tests/test_request_form.py
47
1183
import six from paste.request import * from paste.util.multidict import MultiDict def test_parse_querystring(): e = {'QUERY_STRING': 'a=1&b=2&c=3&b=4'} d = parse_querystring(e) assert d == [('a', '1'), ('b', '2'), ('c', '3'), ('b', '4')] assert e['paste.parsed_querystring'] == ( (d, e['QUERY_S...
apache-2.0
azumimuo/family-xbmc-addon
script.module.youtube.dl/lib/youtube_dl/extractor/go.py
29
8340
# coding: utf-8 from __future__ import unicode_literals import re from .adobepass import AdobePassIE from ..utils import ( int_or_none, determine_ext, parse_age_limit, urlencode_postdata, ExtractorError, ) class GoIE(AdobePassIE): _SITE_INFO = { 'abc': { 'brand': '001', ...
gpl-2.0
lukehuangch/fabric
bddtests/common/configuration_pb2.py
16
6177
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: common/configuration.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflect...
apache-2.0
xlcteam/pgu
pgu/gui/app.py
12
9624
"""Defines the top-level application widget""" import pygame import os from pygame.locals import * from . import pguglobals from . import container from .theme import Theme from .const import * class App(container.Container): """The top-level widget for an application. Example: import pygame ...
lgpl-2.1