repo_name stringlengths 6 100 | path stringlengths 4 294 | copies stringlengths 1 5 | size stringlengths 4 6 | content stringlengths 606 896k | license stringclasses 15
values |
|---|---|---|---|---|---|
numenta/nupic.vision | src/nupic/vision/regions/ImageSensorExplorers/RandomJump.py | 2 | 7908 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | agpl-3.0 |
SKIRT/PTS | do/core/convert.py | 1 | 4941 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | agpl-3.0 |
FarnazH/horton | data/examples/hamiltonian/load_internal_ao.py | 4 | 7954 | #!/usr/bin/env python
from horton import * # pylint: disable=wildcard-import,unused-wildcard-import
# Load the integrals from the file
data = IOData.from_file('hamiltonian_ao.h5')
# Access some attributes. In more realistic cases, some code follows that does a
# useful calculation.
print data.kin[0, 0]
# CODE BE... | gpl-3.0 |
romain-dartigues/ansible | lib/ansible/modules/system/ohai.py | 103 | 1375 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.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': '... | gpl-3.0 |
m4tx/techswarm-server | tsserver/model.py | 1 | 1346 | from tsserver import db
from tsserver.strutils import to_camel_case
class Model(db.Model):
"""
Base class for all models. What differs it from default Model class is
serializable method, which is used to convert objects to JSON (or any other
representation) more easily.
"""
__abstract__ = Tru... | mit |
localwiki/localwiki-backend-server | localwiki/tags/views.py | 2 | 17227 | import copy
from dateutil.parser import parse as dateparser
from localwiki.utils.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseRedirect, Http404, HttpResponseNotFound
from django.utils.translation import ugettext as _
from django.template.context import RequestContext
from django.templa... | gpl-2.0 |
baylee-d/osf.io | api_tests/crossref/views/test_crossref_email_response.py | 2 | 9337 | import mock
import pytest
import hmac
import hashlib
import lxml.etree
from django.utils import timezone
from osf_tests import factories
from website import settings
@pytest.mark.django_db
class TestCrossRefEmailResponse:
def make_mailgun_payload(self, crossref_response):
mailgun_payload = {
... | apache-2.0 |
gemelkelabs/timing_system_software | server_py_files/core/xstatus.py | 1 | 1031 | # -*- coding: utf-8 -*-
"""
Created on Sat Apr 05 21:30:07 2014
@author: Nate
"""
from xml.sax import saxutils
class xstatus_ready():
"""
Inheritance class to add a status output in xml-format to any object
"""
def xstatus(self):
"""
returns status of the listener as xml, and follows-... | mit |
cheery/essence | essence/selection.py | 1 | 12706 | # This file is part of Essential Editor Research Project (EERP)
#
# EERP 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.
#
# EERP is di... | gpl-3.0 |
gnieboer/tensorflow | tensorflow/python/ops/spectral_ops.py | 38 | 4414 | # 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 |
opticron/asterisk-testsuite-temporary | lib/python/asterisk/confbridge.py | 2 | 9320 | #!/usr/bin/env python
# vim: sw=3 et:
"""Module that provides classes to track a ConfBridge test.
This module has been superceded by the apptest module.
Copyright (C) 2011, Digium, Inc.
Matt Jordan <mjordan@digium.com>
This program is free software, distributed under the terms of
the GNU General Public License Versi... | gpl-2.0 |
doyoubi/ShadowsocksFork | shadowsocks/crypto/sodium.py | 1032 | 3778 | #!/usr/bin/env python
#
# Copyright 2015 clowwindy
#
# 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 |
google/material-design-icons | update/venv/lib/python3.9/site-packages/fontTools/pens/basePen.py | 3 | 13126 | """fontTools.pens.basePen.py -- Tools and base classes to build pen objects.
The Pen Protocol
A Pen is a kind of object that standardizes the way how to "draw" outlines:
it is a middle man between an outline and a drawing. In other words:
it is an abstraction for drawing outlines, making sure that outline objects
don... | apache-2.0 |
OwaJawa/kaggle_diabetic | nn.py | 4 | 10967 | from __future__ import print_function
from time import time
import lasagne
import lasagne.layers
from lasagne.updates import nesterov_momentum
from lasagne.objectives import Objective
from lasagne.layers import get_all_layers, get_output, InputLayer
from nolearn.lasagne import NeuralNet
from nolearn.lasagne.handlers i... | mit |
almarklein/bokeh | bokeh/server/views/data.py | 1 | 2797 |
import json
from flask import jsonify, request
from six import iteritems
from bokeh import protocol
from bokeh.models import Range1d
from .backbone import init_bokeh
from ..app import bokeh_app
from ..crossdomain import crossdomain
from ..serverbb import prune
from ..views import make_json
@bokeh_app.route("/bokeh... | bsd-3-clause |
eayunstack/nova | nova/tests/fake_processutils.py | 17 | 3495 | # Copyright (c) 2011 Citrix 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.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | apache-2.0 |
irap-omp/deconv3d | web/vendor/markdown/serializers.py | 18 | 9630 | # markdown/searializers.py
#
# Add x/html serialization to Elementree
# Taken from ElementTree 1.3 preview with slight modifications
#
# Copyright (c) 1999-2007 by Fredrik Lundh. All rights reserved.
#
# fredrik@pythonware.com
# http://www.pythonware.com
#
# ------------------------------------------------------------... | mit |
lgscofield/odoo | addons/project_issue/project_issue.py | 217 | 29319 | #-*- 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 |
dpinney/omf | omf/scratch/MPUPV/solarAdd.py | 1 | 1552 | from omf import feeder
import omf.solvers.gridlabd
feed = feeder.parse('GC-12.47-1.glm')
maxKey = feeder.getMaxKey(feed)
print(feed[1])
feed[maxKey + 1] = {
'object': 'node', 'name': 'test_solar_node', 'phases': 'ABCN',
'nominal_voltage': '7200'
}
feed[maxKey + 2] = {
'object': 'underground_line', 'name': 'test_s... | gpl-2.0 |
belmiromoreira/nova | nova/tests/unit/api/openstack/compute/extensions/foxinsocks.py | 103 | 2948 | # Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 |
JPFrancoia/scikit-learn | sklearn/mixture/tests/test_dpgmm.py | 84 | 7866 | # Important note for the deprecation cleaning of 0.20 :
# All the function and classes of this file have been deprecated in 0.18.
# When you remove this file please also remove the related files
# - 'sklearn/mixture/dpgmm.py'
# - 'sklearn/mixture/gmm.py'
# - 'sklearn/mixture/test_gmm.py'
import unittest
import sys
imp... | bsd-3-clause |
gVallverdu/pymatgen | pymatgen/analysis/chemenv/utils/tests/test_chemenv_config.py | 4 | 2142 | #!/usr/bin/env python
__author__ = 'waroquiers'
import unittest
import os
import shutil
from pymatgen.analysis.chemenv.utils.chemenv_config import ChemEnvConfig
from pymatgen import SETTINGS
from monty.tempfile import ScratchDir
config_file_dir = os.path.join(os.path.dirname(__file__), "..", "..", "..", "..", "..",... | mit |
harshilasu/GraphicMelon | y/google-cloud-sdk/lib/requests/packages/chardet/escsm.py | 2930 | 7839 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | gpl-3.0 |
douggeiger/gnuradio | gr-wxgui/python/wxgui/fftsink2.py | 92 | 1429 | #
# Copyright 2008,2009 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your option)
# any later version... | gpl-3.0 |
chase2534/gtab47.freekern | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 12527 | 1935 | # Util.py - Python extension for perf script, miscellaneous utility code
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
import errno, os
FUTEX_WAIT = 0... | gpl-2.0 |
popazerty/zde-e2 | lib/python/Components/GUIComponent.py | 57 | 2512 | import skin
from enigma import ePoint, eSize
class GUIComponent(object):
""" GUI component """
def __init__(self):
self.instance = None
self.onVisibilityChange = [ ]
self.__visible = 0
self.visible = 1
self.skinAttributes = None
self.deprecationInfo = None
def execBegin(self):
pass
def execEnd(se... | gpl-2.0 |
sjsucohort6/openstack | python/venv/lib/python2.7/site-packages/prettytable.py | 66 | 54204 | #!/usr/bin/env python
#
# Copyright (c) 2009-2013, Luke Maurits <luke@maurits.id.au>
# All rights reserved.
# With contributions from:
# * Chris Clark
# * Klein Stephane
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:... | mit |
neuroidss/nupic | tests/unit/nupic/encoders/adaptivescalar_test.py | 10 | 10008 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | agpl-3.0 |
Dunkas12/BeepBoopBot | lib/youtube_dl/extractor/sixplay.py | 35 | 3813 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
determine_ext,
int_or_none,
try_get,
qualities,
)
class SixPlayIE(InfoExtractor):
IE_NAME = '6play'
_VALID_URL = r'(?:6play:|https?://(?:w... | gpl-3.0 |
mricharleon/HatosGanaderos | userena/urls.py | 1 | 4539 | from django.conf.urls import *
from django.contrib.auth import views as auth_views
from userena import views as userena_views
from userena import settings as userena_settings
from userena.compat import auth_views_compat_quirks, password_reset_uid_kwarg
def merged_dict(dict_a, dict_b):
"""Merges two dicts and ret... | gpl-2.0 |
Teamxrtc/webrtc-streaming-node | third_party/webrtc/src/chromium/src/build/android/pylib/results/json_results_test.py | 20 | 5133 | #!/usr/bin/env python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
from pylib.base import base_test_result
from pylib.results import json_results
class JsonResultsTest(unittest.TestCa... | mit |
umkcdcrg01/ryu_openflow | ryu/services/protocols/bgp/signals/emit.py | 47 | 2649 | from ryu.services.protocols.bgp.signals import SignalBus
class BgpSignalBus(SignalBus):
BGP_ERROR = ('error', 'bgp')
BGP_DEST_CHANGED = ('core', 'dest', 'changed')
BGP_VRF_REMOVED = ('core', 'vrf', 'removed')
BGP_VRF_ADDED = ('core', 'vrf', 'added')
BGP_NOTIFICATION_RECEIVED = ('bgp', 'notificatio... | apache-2.0 |
campbe13/openhatch | vendor/packages/Django/tests/regressiontests/m2m_through_regress/models.py | 111 | 2634 | from __future__ import unicode_literals
from django.contrib.auth.models import User
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
# Forward declared intermediate model
@python_2_unicode_compatible
class Membership(models.Model):
person = models.ForeignKey('Person')
... | agpl-3.0 |
PikkonX/T989_ICS_KERNEL- | 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 |
dga4654dan/UTM-Demo | V_1_0_1/UtmDemo_Sfs_2.9.0/UtmDemo_Sfs_2.9.0_Server/lib/Lib/test/pydocfodder.py | 43 | 6191 | """Something just to look at via pydoc."""
class A_classic:
"A classic class."
def A_method(self):
"Method defined in A."
def AB_method(self):
"Method defined in A and B."
def AC_method(self):
"Method defined in A and C."
def AD_method(self):
"Method defined in A and... | gpl-2.0 |
ucrawler/cp-uc | libs/oauth2/clients/smtp.py | 884 | 1680 | """
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
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 ... | gpl-3.0 |
sho-h/ruby_env | devkit/mingw/bin/lib/lib2to3/btm_matcher.py | 61 | 7002 | """A bottom-up tree matching algorithm implementation meant to speed
up 2to3's matching process. After the tree patterns are reduced to
their rarest linear path, a linear Aho-Corasick automaton is
created. The linear automaton traverses the linear paths from the
leaves to the root of the AST and returns a set of no... | mit |
pyKy/kivy-doc-ja | kivy/app.py | 8 | 36505 | '''
Application
===========
The :class:`App` class is the base for creating Kivy applications.
Think of it as your main entry point into the Kivy run loop. In most
cases, you subclass this class and make your own app. You create an
instance of your specific app class and then, when you are ready to
start the applicati... | mit |
qma/pants | src/python/pants/backend/jvm/tasks/prepare_services.py | 18 | 2382 | # coding=utf-8
# Copyright 2015 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 pant... | apache-2.0 |
tianhao64/vsphere-automation-sdk-python | samples/vsphere/vcenter/vm/main.py | 1 | 5800 | """
* *******************************************************
* Copyright (c) VMware, Inc. 2016-2018. All Rights Reserved.
* SPDX-License-Identifier: MIT
* *******************************************************
*
* DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, WHET... | mit |
Morijarti/dota-2-heatmap | heroes.py | 1 | 15331 | __author__ = 'yanbo'
HEROES = [{'dt_name': 'DT_DOTA_Unit_Hero_AntiMage',
'id': 2,
'localized_name': 'Anti-Mage',
'name': 'npc_dota_hero_antimage'},
{'dt_name': 'DT_DOTA_Unit_Hero_Axe',
'id': 3,
'localized_name': 'Axe',
'name': 'npc_dota_hero_axe'},
{'dt_name': 'DT_DOTA_Unit... | mit |
thica/ORCA-Remote | src/ORCA/settings/setttingtypes/SettingActions.py | 1 | 4810 | # -*- coding: utf-8 -*-
"""
ORCA Open Remote Control Application
Copyright (C) 2013-2020 Carsten Thielepape
Please contact me by : http://www.orca-remote.org/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as publish... | gpl-3.0 |
GoodgameStudios/crossbar | crossbar/adapter/rest/test/test_common.py | 1 | 9136 | #####################################################################################
#
# Copyright (C) Tavendo GmbH
#
# Unless a separate license agreement exists between you and Tavendo GmbH (e.g. you
# have purchased a commercial license), the license terms below apply.
#
# Should you enter into a separate licen... | agpl-3.0 |
whiteclover/Choco | test/test_inheritance.py | 1 | 10179 | from choco import lookup, compat
import unittest
from test.util import result_lines
class InheritanceTest(unittest.TestCase):
def test_basic(self):
collection = lookup.TemplateLookup()
collection.put_string('main', """
<%inherit file="base"/>
<%def name="header()">
main header.
</%def>
this ... | mit |
lyft/incubator-airflow | airflow/contrib/operators/adls_list_operator.py | 5 | 1202 | #
# 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... | apache-2.0 |
census-instrumentation/opencensus-python | contrib/opencensus-ext-zipkin/opencensus/ext/zipkin/trace_exporter/__init__.py | 1 | 6920 | # Copyright 2017, OpenCensus Authors
#
# 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 w... | apache-2.0 |
davidzchen/tensorflow | tensorflow/python/ops/signal/fft_ops.py | 8 | 18369 | # 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 |
SaganBolliger/nupic | src/nupic/data/file_record_stream.py | 15 | 24593 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013-15, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This pro... | agpl-3.0 |
atul-bhouraskar/django | django/conf/locale/fi/formats.py | 504 | 1390 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. E Y'
TIME_FORMAT = 'G.i'
DATET... | bsd-3-clause |
Scriptkiddi/Ankipubsub-Client | pubsub/requests/packages/chardet/mbcsgroupprober.py | 2769 | 1967 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | gpl-3.0 |
LiuKeHua/vrjuggler | modules/vrjuggler/samples/OSG/simple/osgNav/remotenav/Server/tweekfacadefactory.py | 7 | 4669 | #!/usr/bin/env python
import os
import sys
from omniORB import CORBA
import CosNaming
import tweek
import tweekfacade
def main():
app_subj_mgr = None
# Start the local ORB.
orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
try:
# Get the root POA. We need to activate it.
poa = orb.resolve_in... | lgpl-2.1 |
StephenWeber/ansible | lib/ansible/modules/packaging/os/pulp_repo.py | 21 | 23737 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Joe Adams <@sysadmind>
#
# 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
# ... | gpl-3.0 |
pihito/myHomeBox | devAsset/python/main.py | 1 | 1055 | from flask import Flask,render_template,request
from flask.ext.script import Manager
#déclare le serveur flask
app = Flask(__name__)
#déclare le plug-in flask-script
manager = Manager(app)
#crée la route web de la racine du site
#et la lie à la fonction index
@app.route("/")
def index():
return render_templa... | apache-2.0 |
shaistaansari/django | django/contrib/flatpages/models.py | 318 | 1556 | from __future__ import unicode_literals
from django.contrib.sites.models import Site
from django.core.urlresolvers import get_script_prefix
from django.db import models
from django.utils.encoding import iri_to_uri, python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
@python_2_unicode_... | bsd-3-clause |
alliance-genome/agr | indexer/src/mods/sgd.py | 3 | 2270 | from loaders.gene_loader import GeneLoader
from loaders.disease_loader import DiseaseLoader
import gzip
import csv
from files import *
from mod import MOD
class SGD(MOD):
species = "Saccharomyces cerevisiae"
@staticmethod
def gene_href(gene_id):
return "http://www.yeastgenome.org/locus/" + gene_i... | mit |
thanatoskira/AndroGuard | build/scripts-2.7/androapkinfo.py | 1 | 3821 | #!/usr/bin/python
# This file is part of Androguard.
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Androguard is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, eit... | lgpl-3.0 |
splunk/splunk-webframework | contrib/django/django/contrib/messages/storage/__init__.py | 116 | 1185 | from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.importlib import import_module
def get_storage(import_path):
"""
Imports the message storage class described by import_path, where
import_path is the full Python path to the class.
"""
try:
... | apache-2.0 |
frenchfrywpepper/ansible-modules-extras | notification/pushbullet.py | 61 | 6051 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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.
#... | gpl-3.0 |
ecederstrand/django | tests/template_tests/filter_tests/test_floatformat.py | 345 | 4480 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from decimal import Decimal, localcontext
from unittest import expectedFailure
from django.template.defaultfilters import floatformat
from django.test import SimpleTestCase
from django.utils import six
from django.utils.safestring import mark_safe
from ... | bsd-3-clause |
GoogleCloudPlatform/training-data-analyst | courses/machine_learning/deepdive2/end_to_end_ml/labs/serving/application/lib/pyasn1_modules/rfc2511.py | 12 | 10350 | #
# This file is part of pyasn1-modules software.
#
# Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com>
# License: http://snmplabs.com/pyasn1/license.html
#
# X.509 certificate Request Message Format (CRMF) syntax
#
# ASN.1 source from:
# http://tools.ietf.org/html/rfc2511
#
# Sample captures could be obtained ... | apache-2.0 |
lexus24/w16b_test | static/Brython3.1.1-20150328-091302/Lib/string.py | 734 | 9410 | """A collection of string constants.
Public module variables:
whitespace -- a string containing all ASCII whitespace
ascii_lowercase -- a string containing all ASCII lowercase letters
ascii_uppercase -- a string containing all ASCII uppercase letters
ascii_letters -- a string containing all ASCII letters
digits -- a ... | agpl-3.0 |
CapOM/ChromiumGStreamerBackend | tools/protoc_wrapper/protoc_wrapper.py | 109 | 4695 | #!/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.
"""
A simple wrapper for protoc.
- Adds includes in generated headers.
- Handles building with system protobuf as an option.
"""
... | bsd-3-clause |
andy-culshaw/POSTMan-Chrome-Extension | tests/selenium/pmtests/postman_tests_broadcasts.py | 100 | 1734 | from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.select import Select
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
import selenium.webdriver.chrome.service as service
import inspect
... | apache-2.0 |
MRigal/django | django/contrib/gis/gdal/prototypes/errcheck.py | 586 | 4229 | """
This module houses the error-checking routines used by the GDAL
ctypes prototypes.
"""
from ctypes import c_void_p, string_at
from django.contrib.gis.gdal.error import (
GDALException, SRSException, check_err,
)
from django.contrib.gis.gdal.libgdal import lgdal
from django.utils import six
# Helper routine... | bsd-3-clause |
ray-project/ray | python/ray/autoscaler/_private/azure/node_provider.py | 1 | 12092 | import json
import logging
from pathlib import Path
from threading import RLock
from uuid import uuid4
from azure.common.client_factory import get_client_from_cli_profile
from msrestazure.azure_active_directory import MSIAuthentication
from azure.mgmt.compute import ComputeManagementClient
from azure.mgmt.network impo... | apache-2.0 |
roadmapper/ansible | test/units/modules/network/f5/test_bigip_asm_policy_import.py | 22 | 3798 | # -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import json
import pytest
import sys
if sys.version_info < (2... | gpl-3.0 |
ctlajoie/ansible-modules-core | database/postgresql/postgresql_privs.py | 8 | 23609 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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.
#... | gpl-3.0 |
bmotlaghFLT/FLT_PhantomJS | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/outputcapture.py | 124 | 5478 | # Copyright (c) 2009, Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the... | bsd-3-clause |
avoinsystems/odoo | addons/account/__init__.py | 418 | 1423 | # -*- 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 |
lyw07/kolibri | kolibri/core/auth/test/test_deprovisioning.py | 2 | 2801 | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import uuid
import mock
from django.core.management import call_command
from django.test import TestCase
from mock import patch
from .. import models as auth_models
from ..management.commands import d... | mit |
Adnn/django | tests/gis_tests/geoadmin/tests.py | 304 | 3157 | from __future__ import unicode_literals
from django.contrib.gis import admin
from django.contrib.gis.geos import Point
from django.test import TestCase, override_settings, skipUnlessDBFeature
from .admin import UnmodifiableAdmin
from .models import City, site
@skipUnlessDBFeature("gis_enabled")
@override_settings(R... | bsd-3-clause |
laurent-george/bokeh | examples/plotting/server/markers.py | 42 | 1618 | # The plot server must be running
# Go to http://localhost:5006/bokeh to view this plot
from numpy.random import random
from bokeh.plotting import figure, show, output_server
def mscatter(p, x, y, typestr):
p.scatter(x, y, marker=typestr,
line_color="#6666ee", fill_color="#ee6666", fill_alpha=0.5, si... | bsd-3-clause |
seanli9jan/tensorflow | tensorflow/python/ops/boosted_trees_ops.py | 9 | 8018 | # Copyright 2018 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 |
menardorama/ReadyNAS-Add-ons | headphones-1.0.0/files/apps/headphones/lib/unidecode/x066.py | 252 | 4677 | data = (
'Yun ', # 0x00
'Bei ', # 0x01
'Ang ', # 0x02
'Ze ', # 0x03
'Ban ', # 0x04
'Jie ', # 0x05
'Kun ', # 0x06
'Sheng ', # 0x07
'Hu ', # 0x08
'Fang ', # 0x09
'Hao ', # 0x0a
'Gui ', # 0x0b
'Chang ', # 0x0c
'Xuan ', # 0x0d
'Ming ', # 0x0e
'Hun ', # 0x0f
'Fen ', # 0x10
... | gpl-2.0 |
rosmo/ansible | test/units/modules/network/ios/test_ios_vrf.py | 59 | 12799 | #
# (c) 2016 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 d... | gpl-3.0 |
JioEducation/edx-platform | lms/djangoapps/notifier_api/views.py | 78 | 1576 | from django.contrib.auth.models import User
from rest_framework.viewsets import ReadOnlyModelViewSet
from rest_framework.response import Response
from rest_framework import pagination
from notification_prefs import NOTIFICATION_PREF_KEY
from notifier_api.serializers import NotifierUserSerializer
from openedx.core.lib.... | agpl-3.0 |
donckers/ansible | hacking/dump_playbook_attributes.py | 26 | 1670 | #!/usr/bin/env python2
import optparse
from jinja2 import Environment, FileSystemLoader
from ansible.playbook import Play
from ansible.playbook.block import Block
from ansible.playbook.role import Role
from ansible.playbook.task import Task
template_file = 'playbooks_directives.rst.j2'
oblist = {}
clist = []
cla... | gpl-3.0 |
alexlo03/ansible | lib/ansible/plugins/connection/__init__.py | 14 | 15940 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2015 Toshio Kuratomi <tkuratomi@ansible.com>
# (c) 2017, Peter Sprygada <psprygad@redhat.com>
# (c) 2017 Ansible Project
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import fcntl
import gettext
import os
import ... | gpl-3.0 |
arokem/nipype | nipype/interfaces/mrtrix/tests/test_auto_DWI2Tensor.py | 9 | 1486 | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.mrtrix.preprocess import DWI2Tensor
def test_DWI2Tensor_inputs():
input_map = dict(args=dict(argstr='%s',
),
debug=dict(argstr='-debug',
position=1,
),
encoding_file=dict(argstr=... | bsd-3-clause |
shreyans800755/coala | coalib/core/Core.py | 4 | 14007 | import asyncio
import concurrent.futures
import functools
import logging
from coalib.core.DependencyTracker import DependencyTracker
from coalib.core.Graphs import traverse_graph
def group(iterable, key=lambda x: x):
"""
Groups elements (out-of-order) together in the given iterable.
Supports non-hashabl... | agpl-3.0 |
orchidinfosys/odoo | addons/warning/warning.py | 7 | 9564 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from openerp import api
from openerp.osv import fields,osv
from openerp.tools.translate import _
WARNING_MESSAGE = [
('no-message','No Message'),
('warning','Warning'),
... | gpl-3.0 |
campbe13/openhatch | vendor/packages/scrapy/scrapy/middleware.py | 19 | 2619 | from collections import defaultdict
from scrapy import log
from scrapy.exceptions import NotConfigured
from scrapy.utils.misc import load_object
from scrapy.utils.defer import process_parallel, process_chain, process_chain_both
class MiddlewareManager(object):
"""Base class for implementing middleware managers"""... | agpl-3.0 |
replicatorg/ReplicatorG | skein_engines/skeinforge-50/fabmetheus_utilities/miscellaneous/fabricate/snap.py | 23 | 8873 | """
pyRepRap is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
pyRepRap is distributed in the hope that it will be useful,... | gpl-2.0 |
thedrow/cython | Cython/Compiler/CmdLine.py | 7 | 8221 | #
# Cython - Command Line Parsing
#
from __future__ import absolute_import
import os
import sys
from . import Options
usage = """\
Cython (http://cython.org) is a compiler for code written in the
Cython language. Cython is based on Pyrex by Greg Ewing.
Usage: cython [options] sourcefile.{pyx,py} ...
Options:
... | apache-2.0 |
bogdan-kulynych/cloudlectures | wtforms/ext/django/fields.py | 15 | 3417 | """
Useful form fields for use with the Django ORM.
"""
import operator
from wtforms import widgets
from wtforms.fields import SelectFieldBase
from wtforms.validators import ValidationError
__all__ = (
'ModelSelectField', 'QuerySetSelectField',
)
class QuerySetSelectField(SelectFieldBase):
"""
Given a ... | mit |
narry/odenos | src/test/python/org/o3project/odenos/core/util/__init__.py | 233 | 1026 | # -*- coding:utf-8 -*-
# Copyright 2015 NEC Corporation. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License... | apache-2.0 |
pawl/flask-security | flask_security/forms.py | 12 | 9330 | # -*- coding: utf-8 -*-
"""
flask_security.forms
~~~~~~~~~~~~~~~~~~~~
Flask-Security forms module
:copyright: (c) 2012 by Matt Wright.
:license: MIT, see LICENSE for more details.
"""
import inspect
from flask import request, current_app, flash
from flask_wtf import Form as BaseForm
from wtforms... | mit |
tacaswell/scikit-beam | skbeam/core/correlation.py | 2 | 43204 | # coding=utf-8
# ######################################################################
# Developed at the NSLS-II, Brookhaven National Laboratory #
# Developed by Sameera K. Abeykoon, February 2014 #
# #
# Copyright (... | bsd-3-clause |
jrtomps/root | build/unix/git_coreteam.py | 30 | 7379 | #!/usr/bin/python
#Author: Timur Pocheptsov, 17/03/2014.
#A script to generate rootcoreteam.h from git stats.
from urllib import urlopen
from HTMLParser import HTMLParser
header1 = r"""#ifndef ROOT_ROOTCoreTeam
#define ROOT_ROOTCoreTeam
namespace ROOT {
namespace ROOTX {
//This file is automatically generated with... | lgpl-2.1 |
cdondrup/strands_qsr_lib | qsr_lib/src/qsrlib_ros/qsrlib_ros_client.py | 5 | 1938 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, division
try:
import cPickle as pickle
except:
import pickle
import rospy
from qsr_lib.srv import *
class QSRlib_ROS_Client(object):
"""ROS client of QSRlib."""
def __init__(self, service_node_name="qsr_lib"):
... | mit |
MatthewWilkes/mw4068-packaging | src/melange/src/soc/logic/models/club_admin.py | 2 | 1906 | #!/usr/bin/env python2.5
#
# Copyright 2009 the Melange authors.
#
# 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 |
fevangelista/psi4 | psi4/driver/qcdb/orca.py | 7 | 13036 | #
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2021 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | lgpl-3.0 |
StSchulze/pymzML | example_scripts/extreme_values.py | 2 | 1081 | #!/usr/bin/env python
import pymzml
from collections import defaultdict as ddict
import os
def main():
"""
Testscript to fetch the extreme m/z values from each spectrum
of an example file.
Usage:
./extreme_values.py
Parses the file '../tests/data/example.mzML' and extracts the smallest... | mit |
bilgili/Voreen | modules/python/ext/python27/modules/sunaudio.py | 286 | 1399 | """Interpret sun audio headers."""
from warnings import warnpy3k
warnpy3k("the sunaudio module has been removed in Python 3.0; "
"use the sunau module instead", stacklevel=2)
del warnpy3k
MAGIC = '.snd'
class error(Exception):
pass
def get_long_be(s):
"""Convert a 4-char value to integer."""
r... | gpl-2.0 |
darjus-amzn/boto | tests/integration/rds/test_db_subnet_group.py | 130 | 3838 | # Copyright (c) 2013 Franc Carter franc.carter@gmail.com
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the right... | mit |
GUBotDev/mavlink | pymavlink/generator/lib/genxmlif/xmlifODict.py | 82 | 1506 | from types import DictType
from UserDict import UserDict
class odict(UserDict):
def __init__(self, dictOrTuple = None):
self._keys = []
UserDict.__init__(self, dictOrTuple)
def __delitem__(self, key):
UserDict.__delitem__(self, key)
self._keys.remove(key)
de... | lgpl-3.0 |
lhaze/dharma | pca/data/dao/abstract.py | 1 | 7281 | import typing as t
from abc import abstractmethod
from functools import reduce
from operator import and_
from pca.data.errors import QueryErrors
from pca.data.predicate import Predicate
from pca.interfaces.dao import (
BatchOfDto,
Dto,
Id,
IDao,
Ids,
IQueryChain,
Kwargs,
)
from pca.utils.d... | mit |
avedaee/DIRAC | WorkloadManagementSystem/Agent/JobCleaningAgent.py | 1 | 8926 | ########################################################################
# $HeadURL$
# File : JobCleaningAgent.py
# Author : A.T.
########################################################################
"""
The Job Cleaning Agent controls removing jobs from the WMS in the end of their life cycle.
"""
from DIRAC ... | gpl-3.0 |
mcameron/ansible-modules-extras | system/zfs.py | 10 | 14190 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Johan Wiren <johan.wiren.se@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 th... | gpl-3.0 |
NightscoutFoundation/dataxfer | oh_data_source/celery.py | 1 | 1415 | """
Celery set up, as recommended by celery
http://celery.readthedocs.org/en/latest/django/first-steps-with-django.html
Celery will automatically discover and use methods within INSTALLED_APPs that
have the @shared_task decorator.
"""
# absolute_import prevents conflicts between project celery.py file
# and the celery... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.