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 |
|---|---|---|---|---|---|
nowls/gnuradio | docs/doxygen/doxyxml/generated/indexsuper.py | 348 | 19286 | #!/usr/bin/env python
#
# Generated Thu Jun 11 18:43:54 2009 by generateDS.py.
#
import sys
import getopt
from string import lower as str_lower
from xml.dom import minidom
from xml.dom import Node
#
# User methods
#
# Calls to the methods in these classes are generated by generateDS.py.
# You can replace these metho... | gpl-3.0 |
cjayb/mne-python | doc/sphinxext/sphinx_bootstrap_divs/__init__.py | 6 | 6079 | """A .. collapse:: directive for sphinx-bootstrap-theme."""
import os.path as op
from docutils import nodes
from docutils.parsers.rst.directives import flag, class_option
from docutils.parsers.rst.roles import set_classes
from docutils.statemachine import StringList
from sphinx.locale import _
from sphinx.util.docuti... | bsd-3-clause |
tinkerinestudio/Tinkerine-Suite | TinkerineSuite/python/Lib/encodings/ptcp154.py | 647 | 8950 | """ Python Character Mapping Codec generated from 'PTCP154.txt' with gencodec.py.
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
(c) Copyright 2000 Guido van Rossum.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,err... | agpl-3.0 |
WSDC-NITWarangal/flask | flask/__init__.py | 142 | 1676 | # -*- coding: utf-8 -*-
"""
flask
~~~~~
A microframework based on Werkzeug. It's extensively documented
and follows best practice patterns.
:copyright: (c) 2015 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
__version__ = '0.11.dev0'
# utilities we import from Werkzeug ... | bsd-3-clause |
mythmon/kitsune | kitsune/notifications/tests/test_api.py | 6 | 7064 | from datetime import datetime
from django.contrib.contenttypes.models import ContentType
from actstream.actions import follow
from actstream.signals import action
from actstream.models import Action, Follow
from mock import Mock, patch
from nose.tools import eq_, ok_
from rest_framework.test import APIClient
from ki... | bsd-3-clause |
roadmapper/ansible | lib/ansible/plugins/action/net_banner.py | 756 | 1058 | # (c) 2017, Ansible 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 di... | gpl-3.0 |
SpreadBand/SpreadBand | apps/gigbargain/urls.py | 1 | 4283 | from django.conf.urls.defaults import url, patterns
from django.conf import settings
import views.band
import views.venue
import views.dashboard
urlpatterns = patterns('',
# Bargain
url(r'^(?P<gigbargain_uuid>[\w\d-]+)$', views.gigbargain_detail, name='gigbargain-detail'),
# Dashboards
url(r'^band/da... | agpl-3.0 |
alexcuellar/odoo | addons/hr_holidays/report/__init__.py | 442 | 1129 | # -*- 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 |
mildass/tlsfuzzer | scripts/test-tls13-rsapss-signatures.py | 1 | 11660 | # Author: Robert Kolcun, (c) 2018
# Released under Gnu GPL v2.0, see LICENSE file for details
from __future__ import print_function
import traceback
import sys
import getopt
from itertools import chain, islice
from tlsfuzzer.runner import Runner
from tlsfuzzer.messages import Connect, ClientHelloGenerator, \
... | gpl-2.0 |
snuggles08/csvkit | csvkit/utilities/csvsort.py | 19 | 2397 | #!/usr/bin/env python
import os
from csvkit import CSVKitWriter
from csvkit import table
from csvkit.cli import CSVKitUtility, parse_column_identifiers
class CSVSort(CSVKitUtility):
description = 'Sort CSV files. Like unix "sort" command, but for tabular data.'
def add_arguments(self):
self.... | mit |
ZdrowyGosciu/kernel_lge_g2_msm8974 | Documentation/target/tcm_mod_builder.py | 4981 | 41422 | #!/usr/bin/python
# The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD
#
# Copyright (c) 2010 Rising Tide Systems
# Copyright (c) 2010 Linux-iSCSI.org
#
# Author: nab@kernel.org
#
import os, sys
import subprocess as sub
import string
import re
import optparse
tcm_dir = ""
fabric_ops... | gpl-2.0 |
tungvx/deploy | .google_appengine/lib/django_1_2/django/core/mail/backends/base.py | 660 | 1164 | """Base email backend class."""
class BaseEmailBackend(object):
"""
Base class for email backend implementations.
Subclasses must at least overwrite send_messages().
"""
def __init__(self, fail_silently=False, **kwargs):
self.fail_silently = fail_silently
def open(self):
"""Op... | apache-2.0 |
release-monitoring/anitya | anitya/api_v2.py | 1 | 18271 | # -*- coding: utf-8 -*-
"""
This is the version 2 HTTP API.
It uses OpenID Connect for endpoints that require authentication.
"""
from gettext import gettext as _
import logging
import flask_login
from flask import jsonify
from flask_restful import Resource, reqparse
from sqlalchemy import func
from sqlalchemy.exc i... | gpl-2.0 |
tchernomax/ansible | lib/ansible/utils/module_docs_fragments/aws_credentials.py | 65 | 1061 | # (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# inventory cache
DOCUMENTATION = """
options:
aws_profile:
description: The AWS profile
aliases: ['boto_profile']
env:
- name: AWS_PROF... | gpl-3.0 |
ocadotechnology/boto | boto/directconnect/layer1.py | 148 | 23592 | # Copyright (c) 2013 Amazon.com, Inc. or its affiliates. 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 rights ... | mit |
jbking/demo-appengine-django-golang | myproject/django/utils/regex_helper.py | 229 | 12685 | """
Functions for reversing a regular expression (used in reverse URL resolving).
Used internally by Django and not intended for external use.
This is not, and is not intended to be, a complete reg-exp decompiler. It
should be good enough for a large class of URLS, however.
"""
from __future__ import unicode_literals
... | mit |
alejandro-mc/trees | randSPRWalks.py | 1 | 4062 | #randSPRwalk.py
#writes random SPR walks to files
#calls GTP on each SPR random walk file to get
#the ditances between each tree and the first tree of the sequence
#the results are written to csv files with lines delimited by \t
import tree_utils as tu
import w_tree_utils as wtu
import os
import sys
import numpy as np
... | mit |
omega-roms/I9505_Omega_Kernel_LL | 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 |
mbox/django | django/core/exceptions.py | 20 | 5043 | """
Global Django exception and warning classes.
"""
from functools import reduce
import operator
from django.utils import six
from django.utils.encoding import force_text
class DjangoRuntimeWarning(RuntimeWarning):
pass
class ObjectDoesNotExist(Exception):
"""The requested object does not exist"""
sil... | bsd-3-clause |
bvamanan/ns3 | src/dsdv/bindings/modulegen__gcc_ILP32.py | 24 | 441018 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... | gpl-2.0 |
sudosurootdev/external_chromium_org | third_party/markdown/postprocessors.py | 109 | 5137 | # markdown is released under the BSD license
# Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later)
# Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b)
# Copyright 2004 Manfred Stienstra (the original version)
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or... | bsd-3-clause |
jason-weirather/IDP-fusion-release-1 | bin/generate_isoforms_fusion_FDR.py | 1 | 5611 | #!/usr/bin/python
import sys
import re
import string
#from constants import *
import re
### Store fusion gene information from MLE input file
#########
def get_fusion_genomes(input_filename, isoforms_name_filename):
MLE_input_dict = dict()
isoforms_names_ls = []
isoforms_single_names_ls = []
... | apache-2.0 |
sagiss/sardana | src/sardana/spock/colors.py | 1 | 1229 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
##############################################################################
##
## This file is part of Sardana
##
## http://www.sardana-controls.org/
##
## Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
## Sardana is free software: you can redistribute ... | lgpl-3.0 |
HaebinShin/tensorflow | tensorflow/python/util/protobuf/compare_test.py | 31 | 19552 | # 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 |
inspirehep/inspire-next | tests/unit/records/serializers/literature/common/test_reference_item.py | 1 | 9321 | # -*- coding: utf-8 -*-
#
# This file is part of INSPIRE.
# Copyright (C) 2014-2018 CERN.
#
# INSPIRE is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any ... | gpl-3.0 |
SEC-i/ecoControl | server/forecasting/simulation/devices/consumers.py | 1 | 11612 | import os
from time import gmtime
from datetime import datetime
from django.utils.timezone import utc
from server.devices.consumers import ThermalConsumer, ElectricalConsumer
from server.forecasting.simulation.demodata.old_demands import warm_water_demand_workday, warm_water_demand_weekend
from server.forecasting.wea... | mit |
datawire/ambassador | python/ambassador/envoy/v2/v2config.py | 1 | 4418 | # Copyright 2018 Datawire. 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 agr... | apache-2.0 |
maoy/zknova | nova/tests/test_policy.py | 15 | 7765 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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://ww... | apache-2.0 |
mhostetter/gnuradio | gr-digital/python/digital/qam.py | 58 | 13846 | #
# Copyright 2005,2006,2011,2013 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 l... | gpl-3.0 |
atumanov/ray | python/benchmarks/benchmark_task.py | 1 | 1392 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import ray
def setup():
if not hasattr(setup, "is_initialized"):
ray.init(num_cpus=10, resources={"foo": 1})
setup.is_initialized = True
def square(x):
return x * x
class TaskSuite... | apache-2.0 |
Onirik79/aaritmud | src/controllers/contact_us.py | 1 | 3576 | # -*- coding: utf-8 -*-
"""
Modulo per la gestione della pagina che serve ad inviare delle note agli admin.
"""
#= IMPORT ======================================================================
import pprint
import string
import urllib
from src.config import config
from src.log import log
from src.m... | gpl-2.0 |
stonier/ecto | python/ecto/sphinx/programoutput.py | 4 | 8709 | # -*- coding: utf-8 -*-
# Copyright (c) 2010, 2011, Sebastian Wiesner <lunaryorn@googlemail.com>
# All rights reserved.
# 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... | bsd-3-clause |
abbeymiles/aima-python | submissions/VanderKallen/vaccuum.py | 18 | 6505 | import agents as ag
import envgui as gui
import random
# ______________________________________________________________________________
loc_A, loc_B = (1, 1), (2, 1) # The two locations for the Vacuum world
def RandomVacuumAgent():
"Randomly choose one of the actions from the vacuum environment."
p = ag.Ra... | mit |
johngian/remo | remo/base/views.py | 3 | 8356 | from django import http
from django_browserid.http import JSONResponse
from django_browserid.views import Verify
from django.db.models import Q
from django.conf import settings
from django.contrib import messages
from django.contrib.auth.models import User
from django.http import Http404
from django.shortcuts import re... | bsd-3-clause |
reissmann/PyTgen | configs/ubuntu1.py | 1 | 6152 | '''
Copyright (c) 2012 Sven Reissmann <sven@0x80.io>
This file is part of the PyTgen traffic generator.
PyTgen is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option... | gpl-3.0 |
nikhiljindal/kubernetes | examples/job/work-queue-2/rediswq.py | 132 | 6169 | #!/usr/bin/env python
# Copyright 2015 The Kubernetes 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
#
# Unle... | apache-2.0 |
azmainamin/cats_v_dogs_neural_networks | logistic_sigmoid.py | 1 | 17212 | """
This tutorial introduces logistic regression using Theano and stochastic
gradient descent.
Logistic regression is a probabilistic, linear classifier. It is parametrized
by a weight matrix :math:`W` and a bias vector :math:`b`. Classification is
done by projecting data points onto a set of hyperplanes, the distance... | gpl-3.0 |
klunk386/CatalogueTool-Lite | OQCatk/MagRules.py | 2 | 5388 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010-2017 GEM Foundation
#
# The OQ-CATK (Lite) is free software: you can redistribute
# it and/or modify it under the terms of the GNU Affero General Public
# License as published by the Free Software Foundation, either version
# 3 of the License, or (at ... | agpl-3.0 |
cdunn2001/chug | pysample/chug.py | 1 | 1331 | """Using the Python inspect module.
This will import 'api.py' and print some stuff about its contents.
It is difficult to enforce the use of annotations for all arguments,
but possible.
It is even hard to discern which methods are staticmethods.
http://stackoverflow.com/questions/949259/how-do-i-infer-the-class-to-... | mit |
hwroitzsch/BikersLifeSaver | lib/python3.5/site-packages/numpy/distutils/fcompiler/intel.py | 30 | 6572 | # http://developer.intel.com/software/products/compilers/flin/
from __future__ import division, absolute_import, print_function
import sys
from numpy.distutils.ccompiler import simple_version_match
from numpy.distutils.fcompiler import FCompiler, dummy_fortran_file
compilers = ['IntelFCompiler', 'IntelVisualFCompile... | mit |
ThiefMaster/jinja2 | jinja2/loaders.py | 222 | 17382 | # -*- coding: utf-8 -*-
"""
jinja2.loaders
~~~~~~~~~~~~~~
Jinja loader classes.
:copyright: (c) 2017 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import os
import sys
import weakref
from types import ModuleType
from os import path
from hashlib import sha1
from jinja2.excepti... | bsd-3-clause |
pdellaert/ansible | test/units/modules/network/f5/test_bigip_node.py | 22 | 7482 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2017 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 |
aYukiSekiguchi/ACCESS-Chromium | media/tools/bug_hunter/bug_hunter_test.py | 1 | 3321 | #!/usr/bin/env python
# Copyright (c) 2011 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.
"""Integration tests for bug hunter."""
import csv
from optparse import Values
import os
import unittest
from bug_hunter import B... | bsd-3-clause |
kenmcc/mypywws | src/pywws/version.py | 2 | 2719 | # pywws - Python software for USB Wireless Weather Stations
# http://github.com/jim-easterbrook/pywws
# Copyright (C) 2008-14 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 published by the F... | gpl-2.0 |
shub0/algorithm-data-structure | python/flatten_BST.py | 1 | 1118 | #! /usr/bin/python
'''
Given a binary tree, flatten it to a linked list in-place.
For example,
Given
1
/ \
2 5
/ \ \
3 4 6
The flattened tree should look like:
1
\
2
\
3
\
4
\
5
\
6
'''
f... | bsd-3-clause |
google/grumpy | third_party/stdlib/optparse.py | 7 | 62717 | """A powerful, extensible, and easy-to-use option parser.
By Greg Ward <gward@python.net>
Originally distributed as Optik.
For support, use the optik-users@lists.sourceforge.net mailing list
(http://lists.sourceforge.net/lists/listinfo/optik-users).
Simple usage example:
from optparse import OptionParser
pa... | apache-2.0 |
HiroIshikawa/21playground | microblog/flask/lib/python3.5/site-packages/openid/yadis/xrires.py | 12 | 4280 | # -*- test-case-name: openid.test.test_xrires -*-
"""XRI resolution.
"""
from urllib.parse import urlencode
from openid import fetchers
from openid.yadis import etxrd
from openid.yadis.xri import toURINormal
from openid.yadis.services import iterServices
DEFAULT_PROXY = 'http://proxy.xri.net/'
class ProxyResolver(ob... | mit |
whitewater-gis/reach-processing-utilities | whitewater_analysis/utilities/requests/packages/chardet/universaldetector.py | 1776 | 6840 | ######################## 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... | apache-2.0 |
ByteInternet/drf-oidc-auth | tests/test_authentication.py | 1 | 9631 | import sys
from authlib.jose.errors import BadSignatureError, DecodeError
from django.conf.urls import url
from django.http import HttpResponse
from django.test import TestCase
from rest_framework.exceptions import AuthenticationFailed
from rest_framework.permissions import IsAuthenticated
from rest_framework.views im... | mit |
ueliem/verbose-happiness | placement-prototype/netlist.py | 1 | 1522 | import math
class DirectedGraph():
def __init__(self, nodes=[], edges=[]):
self.nodes = nodes
self.edges = edges
def addNode(self, node):
self.nodes.append(node)
def removeNode(self, nodeid):
if nodeid in self.nodes:
del self.nodes[nodeid]
def getNode(self, nodeid):
if nodeid in self.nodes:
return ... | gpl-3.0 |
Lukyth/django-test | django-polls/polls/views.py | 1 | 1665 | from django.shortcuts import get_object_or_404, render
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.views import generic
from django.utils import timezone
from .models import Choice, Question
class IndexView(generic.ListView):
template_name = 'polls/index.ht... | bsd-3-clause |
dagwieers/ansible | lib/ansible/modules/network/voss/voss_command.py | 63 | 7891 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | gpl-3.0 |
mc-coal/mc-coal | lib/requests/packages/charade/jisfreq.py | 3131 | 47315 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client 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 R... | agpl-3.0 |
CJ-Wright/scikit-beam | skbeam/io/avizo_io.py | 7 | 10337 | from __future__ import absolute_import, division, print_function
import numpy as np
import os
import logging
def _read_amira(src_file):
"""
Reads all information contained within standard AmiraMesh data sets.
Separate the header information from the image/volume, data.
Parameters
----------
s... | bsd-3-clause |
Allow2CEO/browser-ios | brave/node_modules/bloom-filter-cpp/vendor/depot_tools/third_party/logilab/common/cache.py | 117 | 3621 | # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
#
# logilab-common is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as publ... | mpl-2.0 |
SUSE/azure-sdk-for-python | azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_topic.py | 2 | 6787 | # 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 |
pasqualguerrero/django | tests/gis_tests/tests.py | 281 | 3127 | import sys
import unittest
from django.core.exceptions import ImproperlyConfigured
from django.db import ProgrammingError
from django.utils import six
try:
from django.contrib.gis.db.backends.postgis.operations import PostGISOperations
HAS_POSTGRES = True
except ImportError:
HAS_POSTGRES = False
except Im... | bsd-3-clause |
dstrockis/outlook-autocategories | lib/werkzeug/test.py | 183 | 34152 | # -*- coding: utf-8 -*-
"""
werkzeug.test
~~~~~~~~~~~~~
This module implements a client to WSGI applications for testing.
:copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import sys
import mimetypes
from time import time
from... | apache-2.0 |
nplanel/capstone | bindings/python/setup.py | 15 | 6318 | #!/usr/bin/env python
import glob
import os
import platform
import shutil
import stat
import sys
from distutils import log
from distutils import dir_util
from distutils.command.build_clib import build_clib
from distutils.command.sdist import sdist
from distutils.core import setup
from distutils.sysconfig import get_py... | bsd-3-clause |
tpaszkowski/quantum | quantum/rootwrap/wrapper.py | 4 | 3099 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2012 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-2.0 |
Fokko/incubator-airflow | tests/providers/google/cloud/operators/test_sftp_to_gcs_system.py | 1 | 1880 | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | apache-2.0 |
GehenHe/Recognize-Face-on-Android | tensorflow/contrib/tensor_forest/python/kernel_tests/best_splits_op_test.py | 80 | 4532 | # 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 |
simonwydooghe/ansible | lib/ansible/modules/cloud/vmware/vmware_guest_register_operation.py | 16 | 9243 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, sky-joker
# 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',
'statu... | gpl-3.0 |
lovetianya/pygame-development | els/run-this.py | 1 | 8534 | #!/usr/local/bin/python3
import pygame
import random
import os
pygame.init()
GRID_WIDTH = 20
GRID_NUM_WIDTH = 15
GRID_NUM_HEIGHT = 25
WIDTH, HEIGHT = GRID_WIDTH * GRID_NUM_WIDTH, GRID_WIDTH * GRID_NUM_HEIGHT
SIDE_WIDTH = 200
SCREEN_WIDTH = WIDTH + SIDE_WIDTH
WHITE = (0xff, 0xff, 0xff)
BLACK = (0, 0, 0)
LINE_COLOR = ... | mit |
GoinsWithTheWind/drm-prime-sync | tools/perf/scripts/python/compaction-times.py | 958 | 7950 | # report time spent in compaction
# Licensed under the terms of the GNU GPL License version 2
# testing:
# 'echo 1 > /proc/sys/vm/compact_memory' to force compaction of all zones
import os
import sys
import re
import signal
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
usage = "usage: perf script report compaction-... | gpl-2.0 |
rowemoore/odoo | addons/website_certification/controllers/main.py | 373 | 2149 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-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 |
Centre-Alt-Rendiment-Esportiu/att | old_project/Python/win_libs/scipy/weave/examples/functional.py | 100 | 2878 | # C:\home\eric\wrk\scipy\weave\examples>python functional.py
# desired: [2, 3, 4]
# actual: [2, 3, 4]
# actual2: [2, 3, 4]
# python speed: 0.039999961853
# SCXX speed: 0.0599999427795
# speed up: 0.666666666667
# c speed: 0.0200001001358
# speed up: 1.99998807913
fr... | gpl-3.0 |
tanmaykm/edx-platform | lms/djangoapps/courseware/tabs.py | 23 | 10108 | """
This module is essentially a broker to xmodule/tabs.py -- it was originally introduced to
perform some LMS-specific tab display gymnastics for the Entrance Exams feature
"""
from django.conf import settings
from django.utils.translation import ugettext as _, ugettext_noop
from courseware.access import has_access
f... | agpl-3.0 |
p0psicles/SickRage | lib/profilehooks.py | 143 | 24752 | """
Profiling hooks
This module contains a couple of decorators (`profile` and `coverage`) that
can be used to wrap functions and/or methods to produce profiles and line
coverage reports. There's a third convenient decorator (`timecall`) that
measures the duration of function execution without the extra profiling
ove... | gpl-3.0 |
maftieu/CouchPotatoServer | libs/requests/packages/charade/gb2312prober.py | 2994 | 1681 | ######################## 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 |
ilayn/scipy | scipy/linalg/_expm_frechet.py | 12 | 12424 | """Frechet derivative of the matrix exponential."""
import numpy as np
import scipy.linalg
__all__ = ['expm_frechet', 'expm_cond']
def expm_frechet(A, E, method=None, compute_expm=True, check_finite=True):
"""
Frechet derivative of the matrix exponential of A in the direction E.
Parameters
---------... | bsd-3-clause |
Piasy/proxy-searcher | site-packages/django/contrib/gis/management/commands/inspectdb.py | 315 | 1466 | from django.core.management.commands.inspectdb import Command as InspectDBCommand
class Command(InspectDBCommand):
db_module = 'django.contrib.gis.db'
gis_tables = {}
def get_field_type(self, connection, table_name, row):
field_type, field_params, field_notes = super(Command, self).get_field_type(... | mit |
srcLurker/home-assistant | homeassistant/components/frontend/__init__.py | 4 | 8775 | """Handle the frontend for Home Assistant."""
import asyncio
import hashlib
import json
import logging
import os
from aiohttp import web
from homeassistant.core import callback
from homeassistant.const import EVENT_HOMEASSISTANT_START, HTTP_NOT_FOUND
from homeassistant.components import api, group
from homeassistant.... | mit |
cysnake4713/odoo | addons/l10n_in_hr_payroll/wizard/__init__.py | 430 | 1110 | # -*- 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 |
ami-GS/pyMQTT | frame.py | 1 | 11645 | from settings import *
from binascii import hexlify, unhexlify
from util import upackHex, packHex, utfEncode, utfDecode
from settings import TYPE
from settings import ConnectReturn as CR
class Frame(object):
def __init__(self):
self.idx = 0
def getIncrement(self, payload):
data, idx = utfDecod... | mit |
360youlun/django-remote-forms | django_remote_forms/widgets.py | 1 | 7783 | import datetime
from django.utils.dates import MONTHS
from collections import OrderedDict
class RemoteWidget(object):
def __init__(self, widget, field_name=None):
self.field_name = field_name
self.widget = widget
def as_dict(self):
widget_dict = OrderedDict()
widget_dict['tit... | mit |
sein-tao/StockAnalysis | parse_tdx_trades.py | 1 | 1664 | # -*- coding: utf-8 -*-
"""
Created on Sun Jan 25 20:23:32 2015
@author: Sein Tao
@email: sein.tao@gmail.com
"""
import io
from datetime import datetime as dt
import security
from record import TradeRecord
import collections
import sys
file_encode = 'gb2312'
codec = 'utf8'
#证券名称,成交日期,成交时间,买卖标志,成交价格,成交数量,成交金额,
#成... | gpl-2.0 |
jastec/node-gyp | legacy/tools/gyp/pylib/gyp/mac_tool.py | 38 | 6861 | #!/usr/bin/env python
# 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.
"""Utility functions to perform Xcode-style build steps.
These functions are executed via gyp-mac-tool when using the Makefile generator.
""... | mit |
DARKPOP/external_chromium_org | android_webview/buildbot/deps_whitelist.py | 27 | 9036 | #!/usr/bin/env python
# Copyright (c) 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.
#
"""Logic to generate lists of DEPS used by various parts of
the android_webview continuous integration (buildbot) infrastructure.
... | bsd-3-clause |
wshallum/ansible | lib/ansible/modules/cloud/amazon/ec2_asg_facts.py | 11 | 11706 | #!/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 |
ZhangXinNan/tensorflow | tensorflow/python/platform/resource_loader.py | 23 | 4143 | # 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 |
avinashkunuje/phantomjs | src/qt/qtbase/src/3rdparty/freetype/src/tools/docmaker/docmaker.py | 463 | 2766 | #!/usr/bin/env python
#
# DocMaker (c) 2002, 2004, 2008 David Turner <david@freetype.org>
#
# This program is a re-write of the original DocMaker took used
# to generate the API Reference of the FreeType font engine
# by converting in-source comments into structured HTML.
#
# This new version is capable of outputting ... | bsd-3-clause |
rbarlow/pulp | client_lib/test/unit/test_client_framework_core.py | 9 | 8571 | import unittest
from okaara.prompt import Recorder
from pulp.client.extensions import core
class RenderTests(unittest.TestCase):
"""
These tests don't verify the visual output of the render functions; for
now while we're playing with what they look like it's just too much of a
pain. These tests at l... | gpl-2.0 |
facebookresearch/ParlAI | parlai/scripts/profile_train.py | 1 | 2526 | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Run the python or pytorch profiler and prints the results.
## Examples
To make sure that bAbI task 1 (1k exs) loads... | mit |
aloisiojr/bluez-kernel | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py | 12980 | 5411 | # SchedGui.py - Python extension for perf script, basic GUI code for
# traces drawing and overview.
#
# Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com>
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
... | gpl-2.0 |
RackSec/ansible | lib/ansible/modules/cloud/amazon/sts_session_token.py | 71 | 5483 | #!/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 |
x111ong/odoo | addons/calendar/__init__.py | 391 | 1038 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... | agpl-3.0 |
ACS-Community/ACS | LGPL/CommonSoftware/acssim/src/Acssim/Corba/DynamicImplementation.py | 3 | 10508 | # @(#) $Id: DynamicImplementation.py,v 1.11 2010/10/01 17:20:48 javarias Exp $
#
# Copyright (C) 2001
# Associated Universities, Inc. Washington DC, USA.
#
# Produced for the ALMA project
#
# This library is free software; you can redistribute it and/or modify it under
# the terms of the GNU Library General Public Lice... | lgpl-2.1 |
jriegel/FreeCAD | src/Mod/Ship/shipOutlineDraw/TaskPanel.py | 17 | 19339 | #***************************************************************************
#* *
#* Copyright (c) 2011, 2012 *
#* Jose Luis Cercos Pita <jlcercos@gmail.com> *
#* ... | lgpl-2.1 |
liberorbis/libernext | env/lib/python2.7/site-packages/IPython/qt/console/styles.py | 26 | 4224 | """ Style utilities, templates, and defaults for syntax highlighting widgets.
"""
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
from colorsys import rgb_to_hls
from pygments.styles import get_style... | gpl-2.0 |
DONIKAN/django | tests/sitemaps_tests/test_https.py | 205 | 3608 | from __future__ import unicode_literals
from datetime import date
from django.test import ignore_warnings, override_settings
from django.utils.deprecation import RemovedInDjango110Warning
from .base import SitemapTestsBase
@override_settings(ROOT_URLCONF='sitemaps_tests.urls.https')
class HTTPSSitemapTests(Sitemap... | bsd-3-clause |
petrutlucian94/cinder | cinder/tests/unit/scheduler/test_volume_number_weigher.py | 17 | 3932 | # 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 |
willharris/django | django/core/serializers/json.py | 86 | 3698 | """
Serialize data to/from JSON
"""
# Avoid shadowing the standard library json module
from __future__ import absolute_import, unicode_literals
import datetime
import decimal
import json
import sys
from django.core.serializers.base import DeserializationError
from django.core.serializers.python import (
Deserial... | bsd-3-clause |
WilJoey/magic-lantern | icons/make-icons.py | 2 | 1571 | from PIL import Image
import os
W = 46
H = 42
# do not encode outer pixels, to save some RAM
Xpad = 3
Ypad = 4
Hpadded = H - Ypad*2
Wpadded = W - Xpad*2
icons = [
'audio.png',
'expo.png',
'overlay.png',
'movie.png',
'shoot.png',
'focus.png',
'display.png',
'prefs.png',
'debug.png'... | gpl-2.0 |
Secheron/compassion-modules | __unported__/child_automatic_update/__openerp__.py | 5 | 1852 | # -*- encoding: utf-8 -*-
##############################################################################
#
# ______ Releasing children from poverty _
# / ____/___ ____ ___ ____ ____ ___________(_)___ ____
# / / / __ \/ __ `__ \/ __ \/ __ `/ ___/ ___/ / __ \/ __ \
# / /___/ /_/ / / / /... | agpl-3.0 |
bq/web2board | res/common/Scons/sconsFiles/SCons/Tool/pdftex.py | 5 | 3742 | """SCons.Tool.pdftex
Tool-specific initialization for pdftex.
Generates .pdf files from .tex files
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001 - 2015 The SCons Foundation
#
# Permi... | lgpl-3.0 |
rpallai/geany | tests/ctags/py_constructor_arglist.py | 26 | 1168 | """
Test arglist parsing of a class' __init__ method:
the __init__() method's argument list should be assigned to the class' argument list.
This is somewhat special to Python and the Python parses uses tm_source_file_set_tag_arglist()
to do this and tm_source_file_set_tag_arglist() uses tm_tags_find() which by default... | gpl-2.0 |
qgis/QGIS | python/utils.py | 12 | 28251 | # -*- coding: utf-8 -*-
"""
***************************************************************************
utils.py
---------------------
Date : November 2009
Copyright : (C) 2009 by Martin Dobias
Email : wonder dot sk at gmail dot com
************************... | gpl-2.0 |
AnishShah/tensorflow | tensorflow/python/kernel_tests/gather_op_test.py | 15 | 10979 | # 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 |
acuriel/Nixtla | nixtla/rulesets/hands_2d_only/located_in.py | 1 | 1256 | # -*- coding: utf-8 -*-
'''
Created on Nov 16, 2014
Articulator located in some place of articulation
@author: Arturo CURIEL
'''
import sys
from nixtla.core.tools.model.rules import BaseRule, UndefinedInDomainError
from nixtla.core.tools.pdlsl import Atom
from nixtla.core.tools.spacedata import RegionTree
class... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.