repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
rghe/ansible
lib/ansible/modules/network/avi/avi_certificatemanagementprofile.py
20
3783
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses...
gpl-3.0
YtoTech/latex-on-http
latexonhttp/latexrun.py
1
77338
#!/usr/bin/env python3 # Copyright (c) 2013, 2014 Austin Clements # 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...
agpl-3.0
longaccess/bigstash-python
setup.py
1
2160
import os import versioneer versioneer.VCS = 'git' versioneer.versionfile_source = 'BigStash/version.py' versioneer.versionfile_build = 'BigStash/version.py' versioneer.tag_prefix = '' versioneer.parentdir_prefix = 'bigstash-' from setuptools import setup, find_packages def pep386adapt(version): if version is no...
apache-2.0
iCHAIT/whats-fresh-api
whats_fresh/whats_fresh_api/views/vendor.py
2
3915
from django.http import (HttpResponse, HttpResponseNotFound) from django.contrib.gis.measure import D from whats_fresh.whats_fresh_api.models import Vendor from whats_fresh.whats_fresh_api.functions import get_lat_long_prox import json from .serializer import FreshSerializer def vendor_list(...
apache-2.0
eusi/MissionPlanerHM
Lib/site-packages/numpy/oldnumeric/mlab.py
77
3459
# This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'RandomArray', 'prod', 'std', 'hamming', 'flipud', ...
gpl-3.0
chrsrds/scikit-learn
doc/tutorial/text_analytics/data/languages/fetch_data.py
33
3758
# simple python script to collect text paragraphs from various languages on the # same topic namely the Wikipedia encyclopedia itself import os from urllib.request import Request, build_opener import lxml.html from lxml.etree import ElementTree import numpy as np import codecs pages = { 'ar': 'http://ar.wikipe...
bsd-3-clause
tysonholub/twilio-python
twilio/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.py
1
12851
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import serialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import...
mit
phire/fifoci
frontend/fifoci/models.py
1
1895
# This file is part of the FifoCI project. # Copyright (c) 2014 Pierre Bourdon <delroth@dolphin-emu.org> # Licensing information: see $REPO_ROOT/LICENSE from django.db import models class FifoTest(models.Model): file = models.FileField(upload_to="dff/", max_length=256) name = models.CharField(max_length=128)...
bsd-2-clause
Gateworks/platform-external-chromium_org
tools/deep_memory_profiler/lib/dump.py
23
15351
# 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 copy import datetime import logging import os import re import time from lib.bucket import BUCKET_ID from lib.exceptions import EmptyDumpException, I...
bsd-3-clause
lmorchard/whuru
vendor-local/src/south/south/db/generic.py
1
44434
import re import sys from django.core.management.color import no_style from django.db import transaction, models from django.db.utils import DatabaseError from django.db.backends.util import truncate_name from django.db.backends.creation import BaseDatabaseCreation from django.db.models.fields import NOT_PROVIDED from...
bsd-3-clause
jacquesd/indico
indico/modules/rb/controllers/admin/rooms.py
2
7437
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
gpl-3.0
akx-repo/akx.repositorio
plugin.video.filmesonlinegratis2/xmltosrt.py
22
2242
#!/usr/bin/python # -*- encoding:utf-8 -*- import re, sys def cleanHtml(dirty): clean = re.sub('&quot;', '\"', dirty) clean = re.sub('&#039;', '\'', clean) clean = re.sub('&#215;', 'x', clean) clean = re.sub('&#038;', '&', clean) clean = re.sub('&#8216;', '\'', clean) clean = re.sub('&#8217;'...
gpl-2.0
nvoron23/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_abc.py
58
7268
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Unit tests for abc.py.""" import unittest from test import test_support import abc from inspect import isabstract class TestABC(unittest.TestCase): def test_abstractmethod_basics(self): @abc.abstract...
apache-2.0
jhawkesworth/ansible
lib/ansible/modules/storage/netapp/na_ontap_motd.py
14
5114
#!/usr/bin/python # (c) 2018 Piotr Olczak <piotr.olczak@redhat.com> # 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', 'st...
gpl-3.0
fogbow/fogbow-dashboard
openstack_dashboard/test/api_tests/network_tests.py
2
24835
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 NEC Corporation # # 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
0/SpanishAcquisition
spacq/devices/oxford/ips120_10.py
2
5674
import logging log = logging.getLogger(__name__) from collections import namedtuple from time import sleep from spacq.interface.resources import Resource from spacq.tool.box import Synchronized from ..abstract_device import AbstractDevice from ..tools import str_to_bool, quantity_wrapped, quantity_unwrapped """ Oxf...
bsd-2-clause
e-democracy/edemsignups
lib/gdata/docs/__init__.py
263
8993
#!/usr/bin/python # # Copyright 2009 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
gpl-3.0
Alex-Diez/python-tdd-katas
old-katas/string-compress-kata/day-9.py
1
1370
# -*- codeing: utf-8 -*- class Compressor(object): def compress(self, toCompress): if toCompress is None: return "" else: result = [] index = 0 length = len (toCompress) while index < length: counter = 1 in...
mit
JelleZijlstra/cython
Cython/Compiler/Naming.py
12
5730
# # C naming conventions # # # Prefixes for generating C names. # Collected here to facilitate ensuring uniqueness. # pyrex_prefix = "__pyx_" codewriter_temp_prefix = pyrex_prefix + "t_" temp_prefix = u"__cyt_" builtin_prefix = pyrex_prefix + "builtin_" arg_prefix = pyrex_prefix + "arg_" f...
apache-2.0
chadversary/deqp
modules/gles3/scripts/gen-invalid-texture-funcs.py
3
7163
# -*- coding: utf-8 -*- #------------------------------------------------------------------------- # drawElements Quality Program utilities # -------------------------------------- # # Copyright 2015 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use t...
apache-2.0
wking/swc-amy
workshops/migrations/0040_add_country_to_online_events.py
3
1070
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def add_country_to_online_events(apps, schema_editor): """Add an 'Online' country to all events tagged with 'online' tag.""" Event = apps.get_model('workshops', 'Event') Tag = apps.get_model('worksho...
mit
stevenewey/django
django/contrib/admin/helpers.py
12
14304
from __future__ import unicode_literals import warnings from django import forms from django.conf import settings from django.contrib.admin.templatetags.admin_static import static from django.contrib.admin.utils import ( display_for_field, flatten_fieldsets, help_text_for_field, label_for_field, lookup_field,...
bsd-3-clause
NSLS-II/channelarchiver
tests/test_archiver.py
1
11262
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest from channelarchiver import Archiver, codes, utils, exceptions from channelarchiver.models import ChannelData, ArchiveProperties from tests.mock_archiver import MockArchiver import datetime import pytest utc = utils.UTC() local_tz = utils.local_tz class...
mit
maxpumperla/elephas
tests/utils/test_model_utils.py
1
1051
import pytest from elephas.utils.model_utils import ModelType, LossModelTypeMapper @pytest.mark.parametrize('loss, model_type', [('binary_crossentropy', ModelType.CLASSIFICATION), ('mean_squared_error', ModelType.REGRESSION), ...
mit
pythonchelle/opencomparison
apps/package/templatetags/package_tags.py
3
2014
from datetime import datetime, timedelta from django import template from package.models import Commit from package.context_processors import used_packages_list register = template.Library() from django.core.cache import cache class ParticipantURLNode(template.Node): def __init__(self, repo, participant): ...
mit
SunguckLee/MariaDB
storage/tokudb/mysql-test/tokudb/t/change_column_int_key.py
56
1671
#!/usr/bin/env python import sys def gen_test(types): for a in range(len(types)): for b in range(len(types)): if a < b: print print "CREATE TABLE t (a %s, PRIMARY KEY(a));" % (types[a]) print "--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/" ...
gpl-2.0
windyuuy/opera
chromium/src/chrome/common/extensions/docs/server2/persistent_object_store_test.py
117
1737
#!/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. from persistent_object_store import PersistentObjectStore import unittest class PersistentObjectStoreTest(unittest.TestCase): '''Tes...
bsd-3-clause
quasipedia/swaggery
swaggery/checker.py
1
9830
#! /usr/bin/env python3 '''A code linter/checker for user-defined APIs. This module will try to detect common errors that might be done while coding an API, such as forgetting to define a path, or defining optional path parameters, or... Usage: checker.py <API-DIRECTORY> ... It is possible to perform the checks ...
agpl-3.0
Kazade/NeHe-Website
google_appengine/lib/django-1.2/tests/regressiontests/forms/localflavor/cl.py
86
2290
from django.contrib.localflavor.cl.forms import CLRutField, CLRegionSelect from django.core.exceptions import ValidationError from utils import LocalFlavorTestCase class CLLocalFlavorTests(LocalFlavorTestCase): def test_CLRegionSelect(self): f = CLRegionSelect() out = u'''<select name="foo"> <opt...
bsd-3-clause
isidorn/test2
test/old_regression/issue_197.py
6
1562
#!/usr/bin/python # Copyright 2010-2012 RethinkDB, all rights reserved. import os, sys, time sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common'))) from test_common import * sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.par...
agpl-3.0
AnotherIvan/calibre
src/calibre/utils/pyconsole/__init__.py
14
1290
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai __license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import sys, os from calibre import prints as prints_, preferred_encoding, isbytestring from calibre.utils.config import C...
gpl-3.0
thomascarterx/kosmosfs
scripts.solaris/metalogprune.py
11
2353
#!/usr/bin/env python # # $Id$ # # Copyright 2008 Quantcast Corp. # # This file is part of Kosmos File System (KFS). # # 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/...
apache-2.0
cgmckeever/contests
2012-mebipenny/finals/bj/territory.py
7
9538
from __future__ import division from httplib import * import sys import argparse import json import os import time import collections import itertools class GameServer: def __init__(self, host, port): self.conn = HTTPConnection(host, port) self.path = '' def create_game(self, rows, cols, seats=2, delay=None,...
mit
100star/h2o
py/testdir_single_jvm/test_GLM2_poisson_rand2.py
9
2123
import unittest, random, sys, time sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_glm, h2o_import as h2i def define_params(): paramDict = { 'standardize': [None, 0, 1], 'beta_epsilon': [None, 0.0001], 'family': ['poisson'], 'n_folds': [2, 3, 4], 'lambda': ...
apache-2.0
joopert/home-assistant
homeassistant/components/xiaomi_aqara/binary_sensor.py
7
17805
"""Support for Xiaomi aqara binary sensors.""" import logging from homeassistant.components.binary_sensor import BinarySensorDevice from homeassistant.core import callback from homeassistant.helpers.event import async_call_later from . import PY_XIAOMI_GATEWAY, XiaomiDevice _LOGGER = logging.getLogger(__name__) NO_...
apache-2.0
ammarkhann/FinalSeniorCode
lib/python2.7/site-packages/google/protobuf/internal/well_known_types.py
52
26624
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
mit
adlius/osf.io
api_tests/wb/views/test_wb_hooks.py
1
39325
from __future__ import unicode_literals import pytest from addons.osfstorage.models import OsfStorageFolder from framework.auth import signing from api.caching.tasks import update_storage_usage_cache from osf_tests.factories import ( AuthUserFactory, ProjectFactory, PreprintFactory ) from api_tests.util...
apache-2.0
iamroot12a/kernel
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
4653
3596
# EventClass.py # # This is a library defining some events types classes, which could # be used by other scripts to analyzing the perf samples. # # Currently there are just a few classes defined for examples, # PerfEvent is the base class for all perf event sample, PebsEvent # is a HW base Intel x86 PEBS event, and use...
gpl-2.0
DREAM-ODA-OS/tools
imgproc/clip_to_mask.py
1
4966
#!/usr/bin/env python #------------------------------------------------------------------------------ # # This tool clips data to mask. Based on the mask value, the code # performs following pixel operations: # mask no-data value (0x00) -> sets pixel to a given no-data value # mask data value (0xFF) ...
mit
RaoUmer/django
tests/regressiontests/forms/tests/util.py
111
3318
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.core.exceptions import ValidationError from django.forms.util import flatatt, ErrorDict, ErrorList from django.test import TestCase from django.utils.safestring import mark_safe from django.utils import six from django.utils.translation import...
bsd-3-clause
gregsaun/neversleepeyes
doc/python-gphoto2/examples/set-capture-target.py
1
2316
#!/usr/bin/env python # python-gphoto2 - Python interface to libgphoto2 # http://github.com/jim-easterbrook/python-gphoto2 # Copyright (C) 2015 Jim Easterbrook jim@jim-easterbrook.me.uk # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as ...
gpl-3.0
hwstar/chargectrlr-python-buspirate
chargerctrl/LoadEnableDialog.py
1
2349
__author__ = 'srodgers' from .Dialog import * """ This file is part of chargectrl-python-buspirate. chargectrl-python-buspirate 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
HybridF5/nova
nova/scheduler/weights/affinity.py
10
3243
# Copyright (c) 2015 Ericsson AB # 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 ...
apache-2.0
Shaswat27/sympy
examples/intermediate/partial_differential_eqs.py
115
1985
#!/usr/bin/env python """Partial Differential Equations example Demonstrates various ways to solve partial differential equations """ from sympy import symbols, Eq, Function, pde_separate, pprint, sin, cos, latex from sympy import Derivative as D def main(): r, phi, theta = symbols("r,phi,theta") Xi = Func...
bsd-3-clause
chromium2014/src
remoting/tools/build/remoting_copy_locales.py
142
5150
#!/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. """Helper script to repack paks for a list of locales. Gyp doesn't have any built-in looping capability, so this just provides a way t...
bsd-3-clause
Tehsmash/nova
nova/objects/pci_device.py
16
8982
# Copyright 2013 Intel Corporation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
apache-2.0
p0cisk/Quantum-GIS
python/plugins/processing/tests/Grass7AlgorithmsRasterTest.py
7
1779
# -*- coding: utf-8 -*- """ *************************************************************************** Grass7AlgorithmsRasterTest.py ----------------------------- Date : May 2016 Copyright : (C) 2016 by Médéric Ribreux Email : mederic dot ribreux at medspx...
gpl-2.0
llooker/python_sdk
lookerapi/models/integration.py
1
16072
# coding: utf-8 """ Looker API 3.0 Reference ### Authorization The Looker API uses Looker **API3** credentials for authorization and access control. Looker admins can create API3 credentials on Looker's **Admin/Users** page. Pass API3 credentials to the **/login** endpoint to obtain a temporary access_token....
mit
anthraxx/diffoscope
diffoscope/comparators/rpm_fallback.py
2
1199
# -*- coding: utf-8 -*- # # diffoscope: in-depth comparison of files, archives, and directories # # Copyright © 2015 Jérémy Bobbio <lunar@debian.org> # # diffoscope 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 Foundati...
gpl-3.0
madjelan/scikit-learn
sklearn/utils/stats.py
299
1692
import numpy as np from scipy.stats import rankdata as _sp_rankdata from .fixes import bincount # To remove when we support scipy 0.13 def _rankdata(a, method="average"): """Assign ranks to data, dealing with ties appropriately. Ranks begin at 1. The method argument controls how ranks are assigned to equ...
bsd-3-clause
linuxium/ubuntu-yakkety
arch/ia64/scripts/unwcheck.py
13143
1714
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
gpl-2.0
Mirdrack/4chanscrapper
lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/pulldom.py
1729
2302
from __future__ import absolute_import, division, unicode_literals from xml.dom.pulldom import START_ELEMENT, END_ELEMENT, \ COMMENT, IGNORABLE_WHITESPACE, CHARACTERS from . import _base from ..constants import voidElements class TreeWalker(_base.TreeWalker): def __iter__(self): ignore_until = None...
mit
Beyond-Imagination/BlubBlub
ChatbotServer/ChatbotEnv/Lib/site-packages/numpy/add_newdocs.py
12
228205
""" This is only meant to add docs to objects defined in C-extension modules. The purpose is to allow easier editing of the docstrings without requiring a re-compile. NOTE: Many of the methods of ndarray have corresponding functions. If you update these docstrings, please keep also the ones in core/fromnum...
gpl-3.0
angr/angr
angr/analyses/identifier/functions/strcmp.py
3
3509
import random from ..func import Func, TestData def rand_str(length, byte_list=None): if byte_list is None: return "".join(chr(random.randint(0, 255)) for _ in range(length)) return "".join(random.choice(byte_list) for _ in range(length)) class strcmp(Func): non_null = [chr(i) for i in range(1...
bsd-2-clause
rgeleta/odoo
addons/portal_project/project.py
285
1809
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-TODAY OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms...
agpl-3.0
nicobustillos/odoo
addons/base_report_designer/openerp_sxw2rml/__init__.py
423
1091
# -*- 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
simongoffin/website_version
openerp/service/report.py
49
5025
# -*- coding: utf-8 -*- import base64 import logging import sys import threading import openerp import openerp.report from openerp import tools import security _logger = logging.getLogger(__name__) # TODO: set a maximum report number per user to avoid DOS attacks # # Report state: # False -> True self_reports...
agpl-3.0
openprocurement/openprocurement.auction.insider
openprocurement/auction/insider/tests/unit/conftest.py
1
6502
# -*- coding: utf-8 -*- import datetime import logging import os import pytest import yaml import couchdb import json from dateutil.tz import tzlocal from flask import redirect from mock import MagicMock from pytz import timezone as tz from StringIO import StringIO from mock import patch from openprocurement.auction....
apache-2.0
Workday/OpenFrame
ppapi/native_client/tools/browser_tester/browsertester/browserlauncher.py
81
11818
#!/usr/bin/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. import os.path import re import shutil import sys import tempfile import time import urlparse import browserprocess class LaunchFailu...
bsd-3-clause
alexis-82/suiteAV
init/lang/en/lib/ansi.py
527
1039
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. ''' This module generates ANSI character codes to printing colors to terminals. See: http://en.wikipedia.org/wiki/ANSI_escape_code ''' CSI = '\033[' def code_to_chars(code): return CSI + str(code) + 'm' class AnsiCodes(object): def __...
gpl-2.0
JianyuWang/neutron
neutron/tests/unit/notifiers/test_nova.py
18
14302
# Copyright 2014 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
Plain-Andy-legacy/android_external_chromium_org
chrome/common/extensions/docs/server2/test_data/api_data_source/canned_master_fs.py
78
5828
# 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 json CANNED_MASTER_FS_DATA = { 'api': { '_api_features.json': json.dumps({ 'add_rules_tester': { 'dependencies': ['permission:add_rules_...
bsd-3-clause
rspavel/spack
var/spack/repos/builtin/packages/r-kegggraph/package.py
5
1444
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RKegggraph(RPackage): """KEGGgraph: A graph approach to KEGG PATHWAY in R and Bioconductor...
lgpl-2.1
timtim17/IntroToGameProg
Experiments/Splash Screen.py
1
3389
# Austin Jenchi # 2/5/2015 # 8th Period # Splash Screen import pygame from pygame import QUIT from pygame import KEYDOWN from Tkinter import Tk as getScreen pygame.init() # COLORS BG_COLOR = [255, 152, 0] FG_COLOR = [0, 0, 0] # IMAGES CHROME = pygame.image.load("chrome.png") chromeAngle = 0 chromeAngleInterval = 0....
gpl-2.0
c-amr/camr
stanfordnlp/pexpect/FSM.py
73
13419
#!/usr/bin/env python '''This module implements a Finite State Machine (FSM). In addition to state this FSM also maintains a user defined "memory". So this FSM can be used as a Push-down Automata (PDA) since a PDA is a FSM + memory. The following describes how the FSM works, but you will probably also need to see the...
gpl-2.0
congthuc/androguard-2.0-custom
androguard/decompiler/dad/ast.py
20
23793
# This file is part of Androguard. # # Copyright (C) 2014 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 ...
apache-2.0
ychen820/microblog
y/google-cloud-sdk/.install/.backup/platform/gsutil/gslib/command_argument.py
31
3698
# -*- coding: utf-8 -*- # Copyright 2014 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 require...
bsd-3-clause
jinnykoo/wuyisj
src/oscar/apps/dashboard/promotions/forms.py
6
2749
from django import forms from django.conf import settings from django.forms.models import inlineformset_factory from django.utils.translation import ugettext_lazy as _ from oscar.apps.promotions.conf import PROMOTION_CLASSES from oscar.forms.fields import ExtendedURLField from oscar.core.loading import get_classes, ge...
bsd-3-clause
rbaindourov/v8-inspector
Source/chrome/tools/cr/cr/commands/install.py
113
1206
# 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. """A module for the install command.""" import cr class InstallCommand(cr.Command): """The implementation of the install command. This first uses Bui...
bsd-3-clause
13-1-kae/solar_project
solar_objects.py
9
1827
# coding: utf-8 # license: GPLv3 class Star: """Тип данных, описывающий звезду. Содержит массу, координаты, скорость звезды, а также визуальный радиус звезды в пикселах и её цвет. """ type = "star" """Признак объекта звезды""" m = 0 """Масса звезды""" x = 0 """Координата по ...
gpl-3.0
carvalhomb/tsmells
guess/guess-src/Lib/xml/sax/drivers2/drv_xmlproc.py
2
12993
""" A SAX 2.0 driver for xmlproc. $Id: drv_xmlproc.py,v 1.1 2005/10/05 20:19:38 eytanadar Exp $ """ import types, string from xml.parsers.xmlproc import xmlproc, xmlval, xmlapp from xml.sax import saxlib from xml.sax.xmlreader import AttributesImpl, AttributesNSImpl from xml.sax.saxutils import ContentGen...
gpl-2.0
golismero/golismero-devel
thirdparty_libs/django/utils/formats.py
104
7799
import decimal import datetime from django.conf import settings from django.utils import dateformat, numberformat, datetime_safe from django.utils.importlib import import_module from django.utils.encoding import force_str from django.utils.functional import lazy from django.utils.safestring import mark_safe from djang...
gpl-2.0
dongjoon-hyun/tensorflow
tensorflow/contrib/specs/python/specs_test.py
23
8218
# 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
lmazuel/azure-sdk-for-python
azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_usage.py
2
1943
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
Jorge-Rodriguez/ansible
test/units/module_utils/basic/test_safe_eval.py
134
2333
# -*- coding: utf-8 -*- # (c) 2015-2017, Toshio Kuratomi <tkuratomi@ansible.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) __metaclass__ = type from itertools import chain import pytest...
gpl-3.0
chacoroot/planetary
addons/auth_oauth/res_users.py
157
4897
import logging import werkzeug.urls import urlparse import urllib2 import simplejson import openerp from openerp.addons.auth_signup.res_users import SignupError from openerp.osv import osv, fields from openerp import SUPERUSER_ID _logger = logging.getLogger(__name__) class res_users(osv.Model): _inherit = 'res....
agpl-3.0
adlius/osf.io
osf/models/banner.py
16
1944
from django.db import models from datetime import datetime from osf.utils.storage import BannerImageStorage from osf.exceptions import ValidationValueError from osf.utils.fields import NonNaiveDateTimeField def validate_banner_dates(banner_id, start_date, end_date): if start_date > end_date: raise Valid...
apache-2.0
rjeschmi/easybuild-framework
test/framework/easyconfigparser.py
5
7251
# # # Copyright 2013-2015 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://vscentrum.be/nl/en), # the Hercules foundation (ht...
gpl-2.0
danking/hail
hail/python/hail/utils/deduplicate.py
2
1428
from typing import List, Tuple, Optional, Set def deduplicate( ids: List[str], *, max_attempts: Optional[int] = None, already_used: Set[int] = None ) -> Tuple[List[Tuple[str, str]], List[str]]: """Deduplicate the strings in `ids`. Example ------- >>> deduplicate(['a',...
mit
akopytov/percona-xtrabackup
storage/innobase/xtrabackup/test/python/testtools/testcase.py
42
25812
# Copyright (c) 2008-2011 testtools developers. See LICENSE for details. """Test case related stuff.""" __metaclass__ = type __all__ = [ 'clone_test_with_new_id', 'ExpectedException', 'run_test_with', 'skip', 'skipIf', 'skipUnless', 'TestCase', ] import copy import itertools import re...
gpl-2.0
nvoron23/node-gyp
gyp/pylib/gyp/generator/android.py
446
43487
# 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. # Notes: # # This generates makefiles suitable for inclusion into the Android build system # via an Android.mk file. It is based on make.py, the standard makefile ...
mit
stevenmizuno/QGIS
python/plugins/processing/algs/grass7/ext/i_pca.py
21
1257
# -*- coding: utf-8 -*- """ *************************************************************************** i_pca.py -------- Date : March 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr *********************************************...
gpl-2.0
RalphBariz/RalphsDotNet
Old/RalphsDotNet.Apps.OptimizationStudio/Resources/PyLib/scipy/integrate/info.py
55
1259
""" Integration routines ==================== Methods for Integrating Functions given function object. quad -- General purpose integration. dblquad -- General purpose double integration. tplquad -- General purpose triple integration. fixed_quad -- Integrate func(x) using Gaussian ...
gpl-3.0
susilehtola/psi4
tests/pytests/test_aaa_profiling.py
12
1796
import time import pytest import numpy as np import multiprocessing import psi4 # Test below is fine on its own but erratic through pytest. Most likely # to succeed as first test collected, so here it lies. @pytest.mark.xfail(True, reason='threading treatment suspect', run=True) def disabled_test_threaded_blas(): ...
lgpl-3.0
bodylabs/lace
lace/test_stl.py
1
1608
import unittest import numpy as np from bltest import attr from lace.cache import sc from lace.serialization import stl @attr('missing_assets') class TestSTL(unittest.TestCase): def setUp(self): import tempfile self.tmp_dir = tempfile.mkdtemp('bodylabs-test') self.truth = { 'box...
bsd-2-clause
mcking49/apache-flask
Python/Lib/unittest/case.py
35
42686
"""Test case implementation""" import collections import sys import functools import difflib import pprint import re import types import warnings from . import result from .util import ( strclass, safe_repr, unorderable_list_difference, _count_diff_all_purpose, _count_diff_hashable ) __unittest = True DIF...
mit
alrusdi/lettuce
tests/integration/lib/Django-1.2.5/django/contrib/gis/geometry/test_data.py
364
2994
""" This module has the mock object definitions used to hold reference geometry for the GEOS and GDAL tests. """ import gzip import os from django.contrib import gis from django.utils import simplejson # This global used to store reference geometry data. GEOMETRIES = None # Path where reference test data is located...
gpl-3.0
resmo/ansible
test/units/modules/network/fortimanager/test_fmgr_device_config.py
38
7073
# Copyright 2018 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 License, or # (at your option) any later version. # # This program is distributed in the...
gpl-3.0
anthonysandrin/kafka-utils
tests/util/metadata_test.py
1
4235
# -*- coding: utf-8 -*- # Copyright 2016 Yelp 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 ...
apache-2.0
teozkr/Flask-Pushrod
docs/conf.py
1
8412
# -*- coding: utf-8 -*- # # Flask-Pushrod documentation build configuration file, created by # sphinx-quickstart on Wed Oct 03 21:54:06 2012. # # 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. #...
mit
spiderbit/canta-ng
event/observers/main_cube_observer.py
1
2664
#! /usr/bin/python -O # -*- coding: utf-8 -*- # # CANTA - A free entertaining educational software for singing # Copyright (C) 2007 S. Huchler, A. Kattner, F. Lopez # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published b...
gpl-3.0
elin-moco/bedrock
bedrock/facebookapps/tests/__init__.py
25
3381
# -*- coding: utf-8 -*- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import cgi import hashlib import hmac import json from base64 import urlsafe_b64encode from tim...
mpl-2.0
pcreech/pulp_openstack
plugins/test/unit/plugins/distributors/test_configuration.py
3
3870
import os import shutil import tempfile import unittest from mock import Mock from pulp.devel.unit.server.util import assert_validation_exception from pulp.plugins.config import PluginCallConfiguration from pulp_openstack.common import constants, error_codes from pulp_openstack.plugins.distributors import configurat...
gpl-2.0
compas-dev/compas
src/compas_rhino/forms/etoforms/text.py
1
1568
from __future__ import print_function from __future__ import absolute_import from __future__ import division import clr clr.AddReference("Eto") clr.AddReference("Rhino.UI") import Rhino # noqa: E402 import Rhino.UI # noqa: E402 import Eto.Drawing # noqa: E402 import Eto.Forms # noqa: E402 __all__ = ['TextForm']...
mit
w1ll1am23/home-assistant
homeassistant/components/tellduslive/config_flow.py
3
5338
"""Config flow for Tellduslive.""" import asyncio import logging import os import async_timeout from tellduslive import Session, supports_local_api import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_HOST from homeassistant.util.json import load_json from .const imp...
apache-2.0
Suwmlee/XX-Net
gae_proxy/server/lib/google/appengine/ext/builtins/__init__.py
8
3483
#!/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
benpatterson/edx-platform
common/djangoapps/student/migrations/0037_auto__add_courseregistrationcode.py
114
14263
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'CourseRegistrationCode' db.create_table('student_courseregistrationcode', ( ('id...
agpl-3.0
JioCloud/nova_test_latest
nova/api/openstack/compute/plugins/v3/servers.py
17
51453
# Copyright 2010 OpenStack Foundation # Copyright 2011 Piston Cloud Computing, 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.apach...
apache-2.0
jithinbp/SEELablet-apps
seel_res/GUI/B_ELECTRONICS/B_Diodes/D_ZenerIV.py
1
3205
#!/usr/bin/python ''' Study Current Voltage characteristics of PN junctions. ''' from __future__ import print_function import os from SEEL_Apps.utilitiesClass import utilitiesClass from PyQt4 import QtCore, QtGui import time,sys from .templates import ui_diodeIV as diodeIV import sys import pyqtgraph as pg import ...
gpl-3.0
gaqzi/ansible-modules-extras
notification/slack.py
8
7666
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Ramon de la Fuente <ramon@delafuente.nl> # # 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