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
Korkki/django
tests/shortcuts/views.py
252
3531
import os.path from django.shortcuts import render, render_to_response from django.template import Context, RequestContext from django.utils._os import upath dirs = (os.path.join(os.path.dirname(upath(__file__)), 'other_templates'),) def render_to_response_view(request): return render_to_response('shortcuts/ren...
bsd-3-clause
was4444/chromium.src
third_party/WebKit/Tools/Scripts/webkitpy/style/filter.py
6
11786
# Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com) # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions...
bsd-3-clause
Jorge-Rodriguez/ansible
test/units/parsing/vault/test_vault_editor.py
47
19513
# (c) 2014, James Tanner <tanner.jc@gmail.com> # (c) 2014, James Cammarata, <jcammarata@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 ...
gpl-3.0
stackforge/tacker
tacker/tests/unit/vnfm/infra_drivers/openstack/test_openstack.py
1
25894
# Copyright 2015 Brocade Communications System, 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 # # ...
apache-2.0
centowen/pybaduk
unidecode/x007.py
252
4122
data = ( '//', # 0x00 '/', # 0x01 ',', # 0x02 '!', # 0x03 '!', # 0x04 '-', # 0x05 ',', # 0x06 ',', # 0x07 ';', # 0x08 '?', # 0x09 '~', # 0x0a '{', # 0x0b '}', # 0x0c '*', # 0x0d '[?]', # 0x0e '', # 0x0f '\'', # 0x10 '', # 0x11 'b', # 0x12 'g', # 0x13 'g', #...
gpl-3.0
marioli/qemu
scripts/qapi/types.py
4
7242
""" QAPI types generator Copyright IBM, Corp. 2011 Copyright (c) 2013-2018 Red Hat Inc. Authors: Anthony Liguori <aliguori@us.ibm.com> Michael Roth <mdroth@linux.vnet.ibm.com> Markus Armbruster <armbru@redhat.com> This work is licensed under the terms of the GNU GPL, version 2. # See the COPYING file in the top-l...
gpl-2.0
Bismarrck/tensorflow
tensorflow/compiler/tests/binary_ops_test.py
3
56381
# 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
guyrixon/VAMDC-tutorials
source/conf.py
2
7987
# -*- coding: utf-8 -*- # # VAMDC-tutorials documentation build configuration file, created by # sphinx-quickstart on Sat Jul 20 17:48:51 2013. # # 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....
bsd-2-clause
EDUlib/edx-platform
lms/djangoapps/certificates/migrations/0019_allowlistgenerationconfiguration.py
5
1336
# Generated by Django 2.2.18 on 2021-02-16 20:16 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('certificates', '0018_hi...
agpl-3.0
hpcugent/easybuild-framework
test/framework/parallelbuild.py
1
15501
# # # Copyright 2014-2019 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
areteix/powerline
powerline/lint/context.py
37
2046
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import itertools from powerline.lib.unicode import unicode from powerline.lint.markedjson.markedvalue import MarkedUnicode from powerline.lint.selfcheck import havemarks class JStr(unicode): def join(...
mit
DrOctogon/Satchmo
satchmo/apps/tax/modules/us_sst/processor.py
4
9908
try: from decimal import Decimal except: from django.utils._decimal import Decimal from django.core.exceptions import ImproperlyConfigured from django.db.models import Q from livesettings import config_value from satchmo_store.contact.models import Contact from l10n.models import AdminArea, Country from satchm...
bsd-3-clause
michal-stuglik/django-blastplus
blastplus/utils.py
1
3450
"""Module with utility functions for blastplus app. """ import os import tempfile from Bio.Application import ApplicationError from blastplus.features.record import Alignment, BlastRecord, Hsp def get_sample_data(sample_file): """Read and returns sample data to fill form with default sample sequence. """ ...
mit
john-wang-metro/metro-openerp
metro_warranty/__openerp__.py
2
1700
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>) # Copyright (C) 2011-2013 Serpent Consulting Services Pvt. Ltd. (<http://www.serpentcs.com>). ...
agpl-3.0
ice9js/servo
tests/wpt/web-platform-tests/tools/pywebsocket/src/test/test_mock.py
496
5168
#!/usr/bin/env python # # Copyright 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
mpl-2.0
acil-bwh/SlicerCIP
Scripted/attic/PicasaSnap/gdata/contacts/__init__.py
119
28208
#!/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 requir...
bsd-3-clause
jendap/tensorflow
tensorflow/python/ops/data_flow_grad.py
82
3179
# 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...
apache-2.0
opencivicdata/scrapers-ca
ca_qc_quebec/people.py
1
1704
# coding: utf-8 from utils import CanadianScraper, CanadianPerson as Person import re COUNCIL_PAGE = 'https://www.ville.quebec.qc.ca/apropos/gouvernance/conseil-municipal/membres.aspx' class QuebecPersonScraper(CanadianScraper): def scrape(self): page = self.lxmlize(COUNCIL_PAGE) sections = pag...
mit
listamilton/supermilton.repository
plugin.video.quasar/resources/site-packages/bjsonrpc/varsync/__init__.py
11
1674
# encoding: UTF-8 """ Variables Syncronized over json-rpc at both ends. This package has several datatypes to ease variable-sharing across peers. Proposed Utils: * FIFOBuffer: streams lists of bytes/numbers/etc over network. Proposed Types: * FloatSync: floating point number synced over ...
gpl-2.0
krummas/cassandra-dtest
bootstrap_test.py
2
27883
import os import random import re import shutil import tempfile import threading import time from cassandra import ConsistencyLevel from cassandra.concurrent import execute_concurrent_with_args from ccmlib.node import NodeError from dtest import DISABLE_VNODES, Tester, debug, create_ks, create_cf from tools.assertion...
apache-2.0
pombredanne/SourceForge-Allura
ForgeActivity/forgeactivity/main.py
2
3430
import logging import pylons pylons.c = pylons.tmpl_context pylons.g = pylons.app_globals from pylons import c, g, request from tg import expose, validate, config from tg.decorators import with_trailing_slash from paste.deploy.converters import asbool from webob import exc from allura.app import Application from allu...
apache-2.0
rusticata/suricata
qa/coccinelle/struct-flags.py
20
1286
#!/usr/bin/env python import re from os import listdir SRC_DIR="../../src/" class Structure: def __init__(self, string): (self.struct, self.flags, self.values) = string.split(":") cmd = "grep -h coccinelle ../../src/*[ch] | sed -e 's/.*coccinelle: \(.*\) \*\//\1/'" struct_list = [] dirList = listdir(SR...
gpl-2.0
aaronsw/watchdog
vendor/rdflib-2.4.0/rdflib/sparql/sparqlGraph.py
3
3863
from rdflib.Graph import Graph class SPARQLGraph(Graph): """ A subclass of Graph with a few extra SPARQL bits. """ def __init__(self, graph, graphVariable = None): self.graphVariable = graphVariable self.graph = graph # TODO store = graph.store identifier = graph.identi...
agpl-3.0
Vagab0nd/SiCKRAGE
lib3/sqlalchemy/sql/sqltypes.py
1
101293
# sql/sqltypes.py # Copyright (C) 2005-2020 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """SQL specific types. """ import codecs import datetime as dt import decimal impo...
gpl-3.0
jegger/kivy
examples/canvas/mesh_manipulation.py
21
3123
''' Mesh Manipulation Example ========================= This demonstrates creating a mesh and using it to deform the texture (the kivy log). You should see the kivy logo with a five sliders to right. The sliders change the mesh points' x and y offsets, radius, and a 'wobble' deformation's magnitude and speed. This ex...
mit
47lining/ansible
v2/test/parsing/yaml/test_data_loader.py
11
2224
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
Chilledheart/chromium
tools/telemetry/third_party/gsutilz/third_party/rsa/rsa/key.py
78
18177
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # Unl...
bsd-3-clause
diegopettengill/multiuserblog
main.py
1
1455
import webapp2 from handlers.comment import CommentHandler from handlers.deletecomment import DeleteCommentHandler from handlers.deletepost import DeletePostHandler from handlers.editpost import EditPostHandler from handlers.like import LikeHandler from handlers.login import LoginHandler from handlers.logout import Lo...
mit
mfherbst/spack
var/spack/repos/builtin/packages/r-deseq/package.py
2
2110
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
jorik041/scikit-learn
sklearn/preprocessing/data.py
113
56747
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Olivier Grisel <olivier.grisel@ensta.org> # Andreas Mueller <amueller@ais.uni-bonn.de> # Eric Martin <eric@ericmart.in> # License: BSD 3 clause from itertools import chain, combina...
bsd-3-clause
jennyzhang0215/incubator-mxnet
example/rnn/old/lstm.py
52
7972
# 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
MathYourLife/running
index.py
1
3290
import tornado.httpserver from tornado.ioloop import IOLoop from tornado.web import RequestHandler, Application, url import numpy as np from io import BytesIO import matplotlib.pyplot as plt from matplotlib.ticker import NullFormatter from matplotlib.figure import Figure from matplotlib.backends.backend_agg import Fig...
mit
banana-framework/banana-framework
setup.py
1
1747
# -*- encoding: utf-8 -*- from __future__ import absolute_import from setuptools import find_packages, setup import banana version = banana.__version__ entry_points = { 'console_scripts': [ 'banana = banana.commands.manage:execute_from_command_line', ], } install_requires = [ 'pluggy>=0.1.0,<1...
mit
tensorflow/model-optimization
tensorflow_model_optimization/python/core/quantization/keras/default_8bit/default_8bit_quantizers.py
1
2395
# 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
uzh/s3it-docker-image-jupyter-with-spark
playbooks/files/pyspark-setup.py
1
1299
# Configure the necessary Spark environment # # Originally from: http://ramhiser.com/2015/02/01/configuring-ipython-notebook-support-for-pyspark/ # import os import sys join = os.path.join if 'SPARK_HOME' not in os.environ: os.environ['SPARK_HOME'] = '/usr/lib/spark' spark_home = os.environ['SPARK_HOME'] # # by ...
gpl-3.0
xslonikx/electrick
electrick_dummy_client.py
1
2212
#!/usr/bin/env python3 import os import sys import argparse import socket import ipaddress import time from time import gmtime, strftime import el_worker from el_worker import IPMcastWorker import el_argparsing from el_argparsing import argv_parse import el_netfmt from el_netfmt import SupportedAFs as afs cmd_ar...
gpl-3.0
trishnaguha/ansible
lib/ansible/modules/cloud/docker/docker_swarm.py
7
18868
#!/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': ['previe...
gpl-3.0
arjunbhagoji/ml_defense
l2_attack.py
1
8819
# l2_attack.py -- attack a network optimizing for l_2 distance ## # Copyright (C) 2016, Nicholas Carlini <nicholas@carlini.com>. ## # This program is licenced under the BSD 2-Clause licence, # contained in the LICENCE file in this directory. import sys import tensorflow as tf import numpy as np BINARY_SEARCH_STEPS = ...
mit
saurabhjn76/sympy
sympy/core/exprtools.py
28
48362
"""Tools for manipulating of large commutative expressions. """ from __future__ import print_function, division from sympy.core.add import Add from sympy.core.compatibility import iterable, is_sequence, SYMPY_INTS, range from sympy.core.mul import Mul, _keep_coeff from sympy.core.power import Pow from sympy.core.basi...
bsd-3-clause
emersonsoftware/ansiblefork
lib/ansible/module_utils/gcp.py
10
16679
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
hroncok/devassistant
devassistant/bin.py
8
2407
from devassistant import argument from devassistant import assistant_base from devassistant import settings from devassistant import yaml_assistant_loader class ExecutableAssistant(assistant_base.AssistantBase): aliases = [] args = [argument.Argument('deps_only', settings.DEPS_ON...
gpl-2.0
vindeka/gate
gate/common/utils.py
1
50964
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2013 Vindeka, 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 requi...
apache-2.0
frohoff/Empire
lib/modules/python/collection/linux/pillage_user.py
12
5008
class Module: def __init__(self, mainMenu, params=[]): # metadata info about the module, not modified during runtime self.info = { # name for the module that will appear in module menus 'Name': 'Linux PillageUser', # list of one or more authors for the module ...
bsd-3-clause
ianmiell/OLD-shutitdist
glib_config/glib_config.py
1
1614
"""ShutIt module. See http://shutit.tk """ from shutit_module import ShutItModule class glib_config(ShutItModule): def is_installed(self, shutit): return shutit.file_exists('/root/shutit_build/module_record/' + self.module_id + '/built') def build(self, shutit): shutit.send('mkdir -p /tmp/build/glib_config'...
gpl-2.0
rackergs/ansible-modules-extras
system/ohai.py
86
1695
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of...
gpl-3.0
Dexhub/MTX
src/arch/x86/isa/insts/simd64/floating_point/arithmetic/addition.py
91
2150
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
bsd-3-clause
bsmrstu-warriors/Moytri--The-Drone-Aider
Lib/email/encoders.py
263
2015
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Encodings and related functions.""" __all__ = [ 'encode_7or8bit', 'encode_base64', 'encode_noop', 'encode_quopri', ] import base64 from quopri import encodestring as _encodestring d...
gpl-3.0
dellysunnymtech/bitbake
lib/bb/fetch2/local.py
1
4394
# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- """ BitBake 'Fetch' implementations Classes for obtaining upstream sources for the BitBake build tools. """ # Copyright (C) 2003, 2004 Chris Larson # # This program is free software; you can redistribute it and/or modify # it u...
gpl-2.0
tchernomax/ansible
lib/ansible/modules/cloud/cloudstack/cs_domain.py
32
7150
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.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 3 of the Lice...
gpl-3.0
williamh/pybugz
bugz/cli.py
1
24762
""" Python Bugzilla Interface Simple command-line interface to bugzilla to allow: - searching - getting bug info - saving attachments Requirements ------------ - Python 3.3 or later - setuptools Classes ------- - BugzillaProxy - Server proxy for communication with Bugzilla """ import getpass import os import r...
gpl-2.0
alexanderturner/ansible
lib/ansible/modules/cloud/rackspace/rax_scaling_group.py
50
14670
#!/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...
gpl-3.0
daniponi/django
tests/middleware_exceptions/tests.py
18
44385
import sys from django.conf import settings from django.core.exceptions import MiddlewareNotUsed from django.core.signals import got_request_exception from django.http import HttpResponse from django.template import engines from django.template.response import TemplateResponse from django.test import RequestFactory, S...
bsd-3-clause
hynnet/openwrt-mt7620
staging_dir/host/lib/scons-2.1.0/SCons/Variables/EnumVariable.py
21
3844
"""engine.SCons.Variables.EnumVariable This file defines the option type for SCons allowing only specified input-values. Usage example: opts = Variables() opts.Add(EnumVariable('debug', 'debug output and symbols', 'no', allowed_values=('yes', 'no', 'full'), map={}, ign...
gpl-2.0
O-C-R/intotheokavango
tools/taxifix.py
3
1688
#!/usr/bin/env python3 import sys, requests, json from housepy import strings, util, log from mongo import db def get_taxonomy(name): taxonomies = [] try: print("Getting taxonomy from GBIF...") response = requests.get("http://api.gbif.org/v1/species/search?q=" + name + "&rank=species") ...
mit
GaryKriebel/osf.io
website/project/views/node.py
3
39205
# -*- coding: utf-8 -*- import logging import httplib as http import math from itertools import islice from flask import request from modularodm import Q from modularodm.exceptions import ModularOdmException, ValidationValueError from framework import status from framework.utils import iso8601format from framework.mo...
apache-2.0
prospero78/pyPC
main.py
1
1038
# -*- coding: utf8 -*- """ Главный запускающий файл для всего pyPC. """ import sys import os from time import sleep __version__ = 5 def main(): """ Импортирует главные классы, и запускает приложение. 1. ClsPC 3. ClsCPU 2. ClsVideo """ arg = sys.argv from pak_pc import ClsPC ...
lgpl-3.0
nutnut/p2pool
p2pool/node.py
42
16199
import random import sys import time from twisted.internet import defer, reactor from twisted.python import log from p2pool import data as p2pool_data, p2p from p2pool.bitcoin import data as bitcoin_data, helper, height_tracker from p2pool.util import deferral, variable class P2PNode(p2p.Node): def __init__(sel...
gpl-3.0
j-carl/ansible
test/support/network-integration/collections/ansible_collections/vyos/vyos/plugins/modules/vyos_facts.py
47
5078
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ The module file for vyos_facts """ ANSIBLE_METADATA = { "metadata_version": "1.1", "status": [u"preview"], "supported_by": "network", } DO...
gpl-3.0
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/test/test_defaultdict.py
107
5827
"""Unit tests for collections.defaultdict.""" import os import copy import tempfile import unittest from test import test_support from collections import defaultdict def foobar(): return list class TestDefaultDict(unittest.TestCase): def test_basic(self): d1 = defaultdict() self.assertEqual...
gpl-3.0
maroux/django-extensions
django_extensions/mongodb/fields/__init__.py
65
8837
""" MongoDB model fields emulating Django Extensions' additional model fields These fields are essentially identical to existing Extensions fields, but South hooks have been removed (since mongo requires no schema migration) """ import re import six import datetime from django import forms from django.template.defau...
mit
LoHChina/nova
nova/scheduler/filters/utils.py
41
3282
# 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 agreed to in...
apache-2.0
rafiqsaleh/VERCE
verce-hpc-pe/src/test/hpc/forwardsim/Whiten_INGV.py
2
1732
from admire.verce import * import sys import random class Whiten_INGV(SeismoPreprocessingActivity): def compute(self): def whiten(tr,flo,fhi): # data = data vector # nsamp = sampling frequency [samples per sec] # flo = lower frequency in Hz # fhi = higher frequency i...
mit
endorphinl/horizon
openstack_dashboard/dashboards/project/images/snapshots/forms.py
81
2147
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
apache-2.0
jscott413/maidsinharlem
flask/lib/python2.7/site-packages/wheel/signatures/keys.py
92
3316
"""Store and retrieve wheel signing / verifying keys. Given a scope (a package name, + meaning "all packages", or - meaning "no packages"), return a list of verifying keys that are trusted for that scope. Given a package name, return a list of (scope, key) suggested keys to sign that package (only the verifying key...
bsd-3-clause
snakeego/pyactors
pyactors/green.py
1
3799
#!/usr/bin/env python # -*- coding: utf8 -*- import gevent from multiprocessing import Event from multiprocessing import Process from .base import Actor, BaseActor, AF_GREENLET, AF_PROCESS from .inbox import DequeInbox, ProcessInbox class GreenletActor(Actor): ''' Greenlet Actor ''' def __init__(self, n...
bsd-2-clause
mandeepdhami/horizon
openstack_dashboard/dashboards/admin/routers/urls.py
66
1108
# Copyright 2012, Nachi Ueno, NTT MCL, 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 applic...
apache-2.0
leki75/ansible
lib/ansible/modules/windows/win_share.py
22
3686
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2015, Hans-Joachim Kliemeck <git@kliemeck.de> # # 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 ...
gpl-3.0
dongjiaqiang/hadoop-common
src/contrib/hod/hodlib/Hod/nodePool.py
182
3753
#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 use thi...
apache-2.0
filias/django
django/contrib/contenttypes/fields.py
1
26398
from __future__ import unicode_literals from collections import defaultdict from django.contrib.contenttypes.models import ContentType from django.core import checks from django.core.exceptions import FieldDoesNotExist, ObjectDoesNotExist from django.db import DEFAULT_DB_ALIAS, models, router, transaction from django...
bsd-3-clause
cakeboss893/volatility
volatility/plugins/overlays/windows/win7_sp0_x64_vtypes.py
58
502855
ntkrnlmp_types = { '_ARBITER_INTERFACE' : [ 0x30, { 'Size' : [ 0x0, ['unsigned short']], 'Version' : [ 0x2, ['unsigned short']], 'Context' : [ 0x8, ['pointer64', ['void']]], 'InterfaceReference' : [ 0x10, ['pointer64', ['void']]], 'InterfaceDereference' : [ 0x18, ['pointer64', ['void']]], 'Arb...
gpl-2.0
2014c2g14/2014c2
exts/wsgi/static/Brython2.1.0-20140419-113919/Lib/_struct.py
726
13787
# # This module is a pure Python version of pypy.module.struct. # It is only imported if the vastly faster pypy.module.struct is not # compiled in. For now we keep this version for reference and # because pypy.module.struct is not ootype-backend-friendly yet. # # this module 'borrowed' from # https://bitbucket.org/p...
gpl-2.0
yagince/text_ux
vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/xlcxx.py
14
1252
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file from waflib.Tools import ccroot,ar from waflib.Configure import conf def find_xlcxx(conf): cxx=conf.find_program(['xlc++_r','xlc++'],var='CXX') cxx=conf.cmd_to_list(cxx) co...
mit
jnerin/ansible
test/units/modules/network/junos/test_junos_facts.py
56
5990
# (c) 2017 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dis...
gpl-3.0
sudheerchintala/LearnEraPlatForm
lms/djangoapps/instructor/offline_gradecalc.py
29
3278
""" ======== Offline calculation of grades ============================================================= Computing grades of a large number of students can take a long time. These routines allow grades to be computed offline, by a batch process (eg cronjob). The grades are stored in the OfflineComputedGrade table of...
agpl-3.0
fitermay/intellij-community
python/helpers/pycharm/django_manage_commands_provider/_parser/parser.py
15
3736
# coding=utf-8 """ Exports data from optparse or argparse based manage.py commands and reports it to _xml.XmlDumper. This module encapsulates Django semi-public API knowledge, and not very stable because of it. Optional env var ``_PYCHARM_DJANGO_DEFAULT_TIMEOUT`` sets timeout (in seconds) to wait for each command to be...
apache-2.0
vipulroxx/kivy
kivy/uix/settings.py
7
41322
''' Settings ======== .. versionadded:: 1.0.7 This module is a complete and extensible framework for adding a Settings interface to your application. By default, the interface uses a :class:`SettingsWithSpinner`, which consists of a :class:`~kivy.uix.spinner.Spinner` (top) to switch between individual settings panels...
mit
binnisb/spotipy
spotipy/client.py
1
16957
# coding: utf-8 from __future__ import print_function import sys import base64 import requests import json ''' A simple and thin Python library for the Spotify Web API ''' class SpotifyException(Exception): def __init__(self, http_status, code, msg): self.http_status = http_status self.code = co...
mit
blmousee/pyctp
example/pyctp2/common/reader.py
7
6486
#-*- coding: utf-8 -*- import os.path as path import logging from .base import (BaseObject, DATA_PATH, EPSL, CN_TRADE_SECTION, TICK, ) from ..common import base from .utils import fcustom,next_trading_day def check_valid_minu...
mit
CentOS-PaaS-SIG/linchpin
linchpin/tests/__init__.py
3
1126
# This directory contains all of the unit tests for linchpin. The file # tree within here is idential to that of the linchpin package. Each # file has a corresponding test_<filename>_pass and test_<filename>_fail # file. So linchpin/cli/__init__.py is tested via tests/cli/test_init_pass.py # and tests/cli/test_init_...
gpl-3.0
jjmleiro/hue
desktop/core/ext-py/pyformance-0.3.2/pyformance/registry.py
15
11377
import functools import re import time import sys from .meters import Counter, Histogram, Meter, Timer, Gauge, CallbackGauge, SimpleGauge class MetricsRegistry(object): """ A single interface used to gather metrics on a service. It keeps track of all the relevant Counters, Meters, Histograms, and Timers....
apache-2.0
jjmleiro/hue
desktop/core/ext-py/Django-1.6.10/django/contrib/auth/tests/test_views.py
73
34209
import itertools import os import re from django.conf import global_settings, settings from django.contrib.sites.models import Site, RequestSite from django.contrib.admin.models import LogEntry from django.contrib.auth.models import User from django.core import mail from django.core.urlresolvers import reverse, NoReve...
apache-2.0
TeslaProject/external_chromium_org
tools/telemetry/telemetry/core/browser_info.py
55
1147
# 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. _check_webgl_supported_script = """ (function () { var c = document.createElement('canvas'); var gl = c.getContext('webgl'); if (gl == null) { gl =...
bsd-3-clause
mikewiebe-ansible/ansible
test/units/modules/network/check_point/test_cp_mgmt_threat_layer.py
19
3780
# Ansible module to manage CheckPoint Firewall (c) 2019 # # 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 dist...
gpl-3.0
Senseg/Py4A
python3-alpha/python3-src/Tools/unicode/makeunicodedata.py
47
40714
# # (re)generate unicode property and type databases # # this script converts a unicode 3.2 database file to # Modules/unicodedata_db.h, Modules/unicodename_db.h, # and Objects/unicodetype_db.h # # history: # 2000-09-24 fl created (based on bits and pieces from unidb) # 2000-09-25 fl merged tim's splitbin fixes, se...
apache-2.0
konstruktoid/ansible-upstream
lib/ansible/modules/system/vdo.py
16
36731
#!/usr/bin/python # # Copyright (c) 2018 Red Hat, Inc. # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['preview'],...
gpl-3.0
kangxu/crosswalk-test-suite
cordova/cordova-webapp-android-tests/webapp/webapp_install.py
18
1900
#!/usr/bin/env python # # Copyright (c) 2015 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of conditions and t...
bsd-3-clause
par2/lamana-test
lamana/utils/references.py
1
5777
#------------------------------------------------------------------------------ class Reference(object): '''A nonfunctional class containing urls for supporting code.''' # ----- --------- ------------- # (001) imp.relaod http://stackoverflow.com/questions...
bsd-3-clause
mollstam/UnrealPy
UnrealPyEmbed/Source/Python/Lib/python27/plat-mac/Carbon/LaunchServices.py
81
2520
# Generated from 'LaunchServices.h' def FOUR_CHAR_CODE(x): return x from Carbon.Files import * kLSRequestAllInfo = -1 kLSRolesAll = -1 kLSUnknownType = FOUR_CHAR_CODE('\0\0\0\0') kLSUnknownCreator = FOUR_CHAR_CODE('\0\0\0\0') kLSInvalidExtensionIndex = -1 kLSUnknownErr = -10810 kLSNotAnApplicationErr = -10811 kLSNotIn...
mit
sycurfriend00/ghost
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/styles/fruity.py
364
1298
# -*- coding: utf-8 -*- """ pygments.styles.fruity ~~~~~~~~~~~~~~~~~~~~~~ pygments version of my "fruity" vim 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 Token, Co...
mit
asen6/amartyasenguptadotcom
django/contrib/localflavor/jp/jp_prefectures.py
543
2089
from django.utils.translation import ugettext_lazy JP_PREFECTURES = ( ('hokkaido', ugettext_lazy('Hokkaido'),), ('aomori', ugettext_lazy('Aomori'),), ('iwate', ugettext_lazy('Iwate'),), ('miyagi', ugettext_lazy('Miyagi'),), ('akita', ugettext_lazy('Akita'),), ('yamagata', ugettext_lazy('Yamagat...
bsd-3-clause
thresholdsoftware/asylum
openerp/addons/hr_expense/__init__.py
436
1079
# -*- 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
taknevski/tensorflow-xsmm
tensorflow/contrib/learn/python/learn/tests/dataframe/estimator_utils_test.py
53
7733
# 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
ypkang/neon
neon/util/defaults.py
11
1416
# ---------------------------------------------------------------------------- # Copyright 2015 Nervana Systems 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.o...
apache-2.0
Fat-Zer/FreeCAD_sf_master
src/Mod/Arch/ArchIFC.py
11
19652
#*************************************************************************** #* Copyright (c) 2019 Dion Moult <dion@thinkmoult.com> * #* Copyright (c) 2019 Yorik van Havre <yorik@uncreated.net> * #* Copyright (c) 2020 FreeCAD Developers * #* ...
lgpl-2.1
pashakiz/DonCoin
contrib/pyminer/pyminer.py
1257
6438
#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file license.txt or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib im...
mit
lamby/dak
tests/dbtest_cruft.py
10
2916
#!/usr/bin/env python from db_test import DBDakTestCase from daklib.dbconn import * from daklib.cruft import * import unittest class CruftTestCase(DBDakTestCase): """ This class checks various functions of cruft-report. """ def setUp(self): super(CruftTestCase, self).setUp() self.in...
gpl-2.0
mavenlin/tensorflow
tensorflow/contrib/learn/python/learn/graph_actions.py
76
28682
# 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
DemocracyClub/yournextrepresentative
ynr/apps/candidates/tests/test_update_view.py
1
9280
from unittest import skip from urllib.parse import urlsplit from django_webtest import WebTest from webtest.forms import Text from people.models import Person from people.tests.factories import PersonFactory from popolo.models import Membership from .auth import TestUserMixin from .factories import MembershipFactory...
agpl-3.0
tpwrules/FunBot
FunBot/games/uno.py
1
12350
__gamename__ = "uno" #Copyright (c) 2010 Thomas Watson #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge...
mit
stuartbfox/Diamond
src/collectors/userscripts/userscripts.py
51
3524
# coding=utf-8 """ Runs third party scripts and collects their output. Scripts need to be +x and should output metrics in the form of ``` metric.path.a 1 metric.path.b 2 metric.path.c 3 ``` They are not passed any arguments and if they return an error code, no metrics are collected. #### Dependencies * [subproce...
mit