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 |
|---|---|---|---|---|---|
jgorgulho/installs | workstationInstall.py | 1 | 8596 | #!/bin/env python
import os
import sys
import shlex
import subprocess
import shutil
#
# Constants
#
WELCOME_STRING = """
########################################################
# Running Installation Script for Workstation #
########################################################\n\n\n
"""
RAN_SCRIP_ST... | gpl-3.0 |
achang97/YouTunes | lib/python2.7/site-packages/pip/index.py | 336 | 39950 | """Routines related to PyPI, indexes"""
from __future__ import absolute_import
import logging
import cgi
from collections import namedtuple
import itertools
import sys
import os
import re
import mimetypes
import posixpath
import warnings
from pip._vendor.six.moves.urllib import parse as urllib_parse
from pip._vendor.... | mit |
justinvforvendetta/electrum-rby | gui/qt/qrcodewidget.py | 1 | 3721 | from PyQt4.QtGui import *
from PyQt4.QtCore import *
import PyQt4.QtCore as QtCore
import PyQt4.QtGui as QtGui
import os
import qrcode
import electrum_rby
from electrum_rby import bmp
from electrum_rby.i18n import _
class QRCodeWidget(QWidget):
def __init__(self, data = None, fixedSize=False):
QWidget.... | gpl-3.0 |
remotesyssupport/cobbler-1 | scripts/debuginator.py | 15 | 1436 | #!/usr/bin/python
"""
Quick test script to read the cobbler configurations and touch and mkdir -p any files
neccessary to trivially debug another user's configuration even if the distros don't exist yet
Intended for basic support questions only. Not for production use.
Copyright 2008-2009, Red Hat, Inc
Michael DeHaan... | gpl-2.0 |
panmari/tensorflow | tensorflow/examples/skflow/boston.py | 1 | 1485 | # Copyright 2015-present Scikit Flow 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... | apache-2.0 |
aliaksandrb/anydo_api | docs/conf.py | 1 | 8486 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# anydo_api documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# a... | mit |
josenavas/mustached-octo-ironman | moi/job.py | 2 | 7636 | # -----------------------------------------------------------------------------
# Copyright (c) 2014--, The qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | bsd-3-clause |
Jorge-Rodriguez/ansible | lib/ansible/modules/network/avi/avi_wafpolicy.py | 31 | 5690 | #!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
#
# 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.txt)
#
ANSIB... | gpl-3.0 |
embeddedarm/android_external_chromium_org | tools/telemetry/telemetry/page/actions/wait.py | 23 | 3155 | # 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 re
import time
from telemetry.core import util
from telemetry.page.actions import page_action
class WaitAction(page_action.PageAction):
def __... | bsd-3-clause |
feroda/odoo | addons/mail/res_partner.py | 379 | 2454 | # -*- 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 |
Khan/git-bigfile | vendor/boto/dynamodb/layer1.py | 153 | 24057 | # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 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 ... | mit |
mxOBS/deb-pkg_trusty_chromium-browser | tools/telemetry/telemetry/unittest_util/run_tests.py | 11 | 6847 | # Copyright 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 sys
from telemetry import decorators
from telemetry.core import browser_finder
from telemetry.core import browser_finder_exceptions
from telemetry.cor... | bsd-3-clause |
viaregio/mezzanine | mezzanine/generic/models.py | 38 | 5089 | from __future__ import unicode_literals
from future.builtins import map, str
from django.contrib.contenttypes.fields import GenericForeignKey
from django.db import models
from django.template.defaultfilters import truncatewords_html
from django.utils.translation import ugettext, ugettext_lazy as _
from django.utils.en... | bsd-2-clause |
chand3040/sree_odoo | openerp/addons/stock_account/wizard/__init__.py | 351 | 1105 | # -*- 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 |
Mj258/weiboapi | srapyDemo/envs/Lib/site-packages/pip/commands/install.py | 187 | 14659 | from __future__ import absolute_import
import logging
import operator
import os
import tempfile
import shutil
import warnings
try:
import wheel
except ImportError:
wheel = None
from pip.req import RequirementSet
from pip.basecommand import RequirementCommand
from pip.locations import virtualenv_no_global, dis... | mit |
jakirkham/ilastik | ilastik/applets/objectClassification/objectClassificationSerializer.py | 4 | 2910 | ###############################################################################
# ilastik: interactive learning and segmentation toolkit
#
# Copyright (C) 2011-2014, the ilastik developers
# <team@ilastik.org>
#
# This program is free software; you can redistribute it and/or
# mod... | gpl-3.0 |
jmrozanec/white-bkg-classification | scripts/preprocessing.py | 1 | 1441 | #https://github.com/tflearn/tflearn/issues/180
from __future__ import division, print_function, absolute_import
import tflearn
from tflearn.data_utils import shuffle, to_categorical
from tflearn.layers.core import input_data, dropout, fully_connected
from tflearn.layers.conv import conv_2d, max_pool_2d
from tflearn.la... | apache-2.0 |
barnsnake351/neutron | neutron/db/migration/alembic_migrations/versions/juno_initial.py | 32 | 2925 | # Copyright 2014 OpenStack Foundation
#
# 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 ... | apache-2.0 |
karban/agros2d | data/scripts/test/test_current_planar.py | 2 | 1590 | # model
newdocument("Feeder", "planar", "current", 3, 5)
# boundaries
addboundary("Neumann", "current_inward_current_flow", 0)
addboundary("Zero", "current_potential", 0)
addboundary("Voltage", "current_potential", 1)
# materials
addmaterial("mat 1", 1e7)
addmaterial("mat 2", 1e5)
addmaterial("mat 3", 1e3)
# edges
a... | gpl-2.0 |
omni360/avatar | icloth/bower_components/bootstrap/node_modules/npm-shrinkwrap/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py | 2637 | 9586 | #!/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.
"""Make the format of a vcproj really pretty.
This script normalize and sort an xml. It also fetches all the properties
inside linked... | apache-2.0 |
kubeflow/pipelines | manifests/kustomize/base/installs/multi-user/pipelines-profile-controller/test_sync.py | 2 | 10679 | import os
from unittest import mock
import threading
from sync import get_settings_from_env, server_factory
import json
import pytest
import requests
# Data sets passed to server
DATA_INCORRECT_CHILDREN = {
"parent": {
"metadata": {
"labels": {
"pipelines.kubeflow.org/enabled":... | apache-2.0 |
kubeflow/pipelines | backend/api/python_http_client/test/test_api_resource_key.py | 2 | 1464 | # coding: utf-8
"""
Kubeflow Pipelines API
This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition.
Contact: kubeflow-pipelines@google.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import ... | apache-2.0 |
JingGe/incubator-eagle | eagle-external/hadoop_jmx_collector/lib/kafka-python/kafka/producer/base.py | 18 | 7821 | from __future__ import absolute_import
import logging
import time
try:
from queue import Empty
except ImportError:
from Queue import Empty
from collections import defaultdict
from multiprocessing import Queue, Process
import six
from kafka.common import (
ProduceRequest, TopicAndPartition, UnsupportedCo... | apache-2.0 |
shsingh/ansible | test/units/modules/network/fortios/test_fortios_web_proxy_profile.py | 20 | 11217 | # Copyright 2019 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 |
HelsinkiHacklab/asylum | project/access/migrations/0002_auto_20151206_1842.py | 4 | 2456 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import django_markdown.models
from django.db import migrations, models
import asylum.mixins
class Migration(migrations.Migration):
dependencies = [
('access', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | mit |
dimonaks/siman | siman/functions.py | 1 | 29689 |
from __future__ import division, unicode_literals, absolute_import
import os, tempfile, copy, math, itertools, sys
import numpy as np
from operator import itemgetter
from itertools import product
try:
import scipy
except:
print('functions.py: no scipy, smoother() will not work()')
from siman import header
... | gpl-2.0 |
Rav3nPL/p2pool-myriadcoin | p2pool/util/jsonrpc.py | 261 | 6082 | from __future__ import division
import json
import weakref
from twisted.internet import defer
from twisted.protocols import basic
from twisted.python import failure, log
from twisted.web import client, error
from p2pool.util import deferral, deferred_resource, memoize
class Error(Exception):
def __init__(self, ... | gpl-3.0 |
TanguyPatte/phantomjs-packaging | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/net/failuremap_unittest.py | 124 | 3843 | # Copyright (c) 2010 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 |
Cinntax/home-assistant | homeassistant/components/mopar/sensor.py | 2 | 2710 | """Support for the Mopar vehicle sensor platform."""
from homeassistant.components.mopar import (
DOMAIN as MOPAR_DOMAIN,
DATA_UPDATED,
ATTR_VEHICLE_INDEX,
)
from homeassistant.const import ATTR_ATTRIBUTION, LENGTH_KILOMETERS
from homeassistant.core import callback
from homeassistant.helpers.dispatcher impo... | apache-2.0 |
gstiebler/odemis | src/odemis/driver/test/andorcam3_test.py | 2 | 2993 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Created on 12 Mar 2012
@author: Éric Piel
Testing class for driver.andorcam3 .
Copyright © 2012 Éric Piel, Delmic
This file is part of Odemis.
Odemis is free software: you can redistribute it and/or modify it under the terms
of the GNU General Public License versio... | gpl-2.0 |
bhargav2408/python-for-android | python3-alpha/python3-src/Lib/distutils/tests/__init__.py | 165 | 1060 | """Test suite for distutils.
This test suite consists of a collection of test modules in the
distutils.tests package. Each test module has a name starting with
'test' and contains a function test_suite(). The function is expected
to return an initialized unittest.TestSuite instance.
Tests for the command classes in... | apache-2.0 |
lukecampbell/compliance-checker | compliance_checker/tests/test_ioos_sos.py | 1 | 2367 | import unittest
from compliance_checker.suite import CheckSuite
from compliance_checker.runner import ComplianceChecker
import os
import httpretty
# TODO: Use inheritance to eliminate redundant code in test setup, etc
class TestIOOSSOSGetCapabilities(unittest.TestCase):
def setUp(self):
with open(os.path... | apache-2.0 |
pshen/ansible | lib/ansible/modules/files/archive.py | 33 | 14904 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Ben Doherty <bendohmv@gmail.com>
# Sponsored by Oomph, Inc. http://www.oomphinc.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 Fre... | gpl-3.0 |
tusuzu/tmtp | standalone/tmtpl/curves.py | 2 | 7623 | #!/usr/bin/python
#
# This file is part of the tmtp (Tau Meta Tau Physica) project.
# For more information, see http://www.sew-brilliant.org/
#
# Copyright (C) 2010, 2011, 2012 Susan Spencer and Steve Conklin
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Genera... | gpl-3.0 |
andris210296/andris-projeto | backend/venv/lib/python2.7/site-packages/unidecode/x01f.py | 252 | 3899 | data = (
'a', # 0x00
'a', # 0x01
'a', # 0x02
'a', # 0x03
'a', # 0x04
'a', # 0x05
'a', # 0x06
'a', # 0x07
'A', # 0x08
'A', # 0x09
'A', # 0x0a
'A', # 0x0b
'A', # 0x0c
'A', # 0x0d
'A', # 0x0e
'A', # 0x0f
'e', # 0x10
'e', # 0x11
'e', # 0x12
'e', # 0x13
'e', # 0... | mit |
sanjeevtripurari/hue | desktop/core/ext-py/tablib-0.10.0/tablib/packages/odf/load.py | 67 | 3959 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2007-2008 Søren Roug, European Environment Agency
#
# This library 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; either
# version 2.1 of the L... | apache-2.0 |
hainm/statsmodels | statsmodels/examples/ex_shrink_pickle.py | 34 | 2364 | # -*- coding: utf-8 -*-
"""
Created on Fri Mar 09 16:00:27 2012
Author: Josef Perktold
"""
from statsmodels.compat.python import StringIO
import numpy as np
import statsmodels.api as sm
nobs = 10000
np.random.seed(987689)
x = np.random.randn(nobs, 3)
x = sm.add_constant(x)
y = x.sum(1) + np.random.randn(nobs)
xf ... | bsd-3-clause |
steabert/molpy | molpy/molden.py | 1 | 5280 | # molden.py -- Molden format
# Implements the Molden file format, specification can be found here:
# http://www.cmbi.ru.nl/molden/molden_format.html
#
# Copyright (c) 2016 Steven Vancoillie
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License a... | gpl-2.0 |
trondhindenes/ansible | lib/ansible/modules/cloud/misc/cloud_init_data_facts.py | 33 | 3393 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2018, René Moser <mail@renemoser.net>
# 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',
... | gpl-3.0 |
ZobairAlijan/osf.io | scripts/migrate_cloudfiles_container.py | 54 | 4081 | #!/usr/bin/env python
# encoding: utf-8
"""Migrate files to correct container.
Note: Must use Rackspace credentials with access to both test and production
containers.
Note: Must have pyrax installed to run.
Run dry run: python -m scripts.migrate_cloudfiles_container dry
Run migration: python -m scripts.migrate_cloudf... | apache-2.0 |
SMALLplayer/smallplayer-image-creator | storage/.xbmc/addons/script.cu.lrclyrics/resources/lib/culrcscrapers/alsong/lyricsScraper.py | 1 | 3106 | # -*- Mode: python; coding: utf-8; tab-width: 8; indent-tabs-mode: t; -*-
"""
Scraper for http://lyrics.alsong.co.kr/
edge
"""
import sys
import socket
import hashlib
import urllib2
import xml.dom.minidom as xml
from utilities import *
from audiofile import AudioFile
__title__ = "Alsong"
__priority__ = '115'
__lrc_... | gpl-2.0 |
manisandro/QGIS | python/plugins/processing/gui/menus.py | 4 | 13593 | # -*- coding: utf-8 -*-
"""
***************************************************************************
menus.py
---------------------
Date : February 2016
Copyright : (C) 2016 by Victor Olaya
Email : volayaf at gmail dot com
*******************************... | gpl-2.0 |
svenstaro/ansible | lib/ansible/modules/cloud/openstack/os_server_group.py | 27 | 5339 | #!/usr/bin/python
# Copyright (c) 2016 Catalyst IT Limited
#
# This module 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 so... | gpl-3.0 |
ASCrookes/django | django/contrib/gis/utils/wkt.py | 589 | 1923 | """
Utilities for manipulating Geometry WKT.
"""
from django.utils import six
def precision_wkt(geom, prec):
"""
Returns WKT text of the geometry according to the given precision (an
integer or a string). If the precision is an integer, then the decimal
places of coordinates WKT will be truncated t... | bsd-3-clause |
cecep-edu/edx-platform | cms/djangoapps/contentstore/tests/test_import.py | 14 | 11987 | # -*- coding: utf-8 -*-
# pylint: disable=protected-access
"""
Tests for import_course_from_xml using the mongo modulestore.
"""
from django.test.client import Client
from django.test.utils import override_settings
from django.conf import settings
import ddt
import copy
from openedx.core.djangoapps.content.course_str... | agpl-3.0 |
gsehub/edx-platform | common/lib/xmodule/xmodule/annotatable_module.py | 13 | 7026 | import logging
import textwrap
from lxml import etree
from pkg_resources import resource_string
from xblock.fields import Scope, String
from xmodule.raw_module import RawDescriptor
from xmodule.x_module import XModule
log = logging.getLogger(__name__)
# Make '_' a no-op so we can scrape strings. Using lambda instea... | agpl-3.0 |
dimdung/boto | boto/dynamodb/layer2.py | 135 | 33814 | # Copyright (c) 2011 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2011 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 ... | mit |
dderevjanik/agescx | agescx/scenario.py | 1 | 3376 | from .models import *
from .controller import *
from .utilities import *
# utilities
from .decompress import *
from .compress import *
class Scenario:
""" Scenario class """
def __init__(self, filename=None, ver=1.21):
"""create scenario with defaults values,
check default.txt for more i... | mit |
lupyuen/RaspberryPiImage | home/pi/GrovePi/Software/Python/others/temboo/Library/Google/Contacts/__init__.py | 5 | 1118 | from temboo.Library.Google.Contacts.CreateContact import CreateContact, CreateContactInputSet, CreateContactResultSet, CreateContactChoreographyExecution
from temboo.Library.Google.Contacts.DeleteContact import DeleteContact, DeleteContactInputSet, DeleteContactResultSet, DeleteContactChoreographyExecution
from temboo.... | apache-2.0 |
vietpn/ghost_nodejs | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/lexers/_scilab_builtins.py | 364 | 31261 | # -*- coding: utf-8 -*-
"""
pygments.lexers._scilab_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Builtin list for the ScilabLexer.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
# These lists are generated automatically.
# Run the follo... | mit |
postlund/home-assistant | homeassistant/components/notion/config_flow.py | 3 | 2040 | """Config flow to configure the Notion integration."""
from aionotion import async_get_client
from aionotion.errors import NotionError
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from homeassistant.core import callback
from homeassistan... | apache-2.0 |
RPI-OPENEDX/edx-platform | common/lib/symmath/symmath/test_symmath_check.py | 166 | 2648 | from unittest import TestCase
from .symmath_check import symmath_check
class SymmathCheckTest(TestCase):
def test_symmath_check_integers(self):
number_list = [i for i in range(-100, 100)]
self._symmath_check_numbers(number_list)
def test_symmath_check_floats(self):
number_list = [i + ... | agpl-3.0 |
bodi000/odoo | addons/l10n_be/wizard/__init__.py | 438 | 1145 | # -*- 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 |
aperigault/ansible | lib/ansible/module_utils/facts/system/selinux.py | 162 | 3207 | # Collect facts related to selinux
#
# 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.
#
# Ans... | gpl-3.0 |
deanishe/alfred-packal-search | src/workflow/workflow.py | 1 | 98456 | # encoding: utf-8
#
# Copyright (c) 2014 Dean Jackson <deanishe@deanishe.net>
#
# MIT Licence. See http://opensource.org/licenses/MIT
#
# Created on 2014-02-15
#
"""The :class:`Workflow` object is the main interface to this library.
:class:`Workflow` is targeted at Alfred 2. Use
:class:`~workflow.Workflow3` if you wa... | mit |
GistdaDev/geonode | geonode/proxy/views.py | 28 | 3660 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2012 OpenPlans
#
# 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 versio... | gpl-3.0 |
mariusbaumann/pyload | module/plugins/hoster/YourfilesTo.py | 2 | 2049 | # -*- coding: utf-8 -*-
import re
from urllib import unquote
from module.plugins.Hoster import Hoster
class YourfilesTo(Hoster):
__name__ = "YourfilesTo"
__type__ = "hoster"
__version__ = "0.21"
__pattern__ = r'(http://)?(?:www\.)?yourfiles\.(to|biz)/\?d=\w+'
__description__ = """Youfil... | gpl-3.0 |
InUrSys/PescArt2.0 | src/srcPlus/GenericPesquisas.py | 1 | 10030 | '''
Created on 13/12/2017
@author: chernomirdinmacuvele
'''
from PyQt5.Qt import QDialog, QModelIndex, QStandardItemModel, QStandardItem,\
QGroupBox
import mixedModel
import QT_tblViewUtility
import rscForm
import frmPesquisa_Sort
class GenericPesquisas(QDialog):
def configCombox(self):
'''
... | gpl-3.0 |
willemneal/Docky | lib/flask/logging.py | 838 | 1398 | # -*- coding: utf-8 -*-
"""
flask.logging
~~~~~~~~~~~~~
Implements the logging support for Flask.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from logging import getLogger, StreamHandler, Formatter, getLoggerClas... | mit |
yuvrajsingh86/DeepLearning_Udacity | weight-initialization/helper.py | 153 | 3649 | import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
def hist_dist(title, distribution_tensor, hist_range=(-4, 4)):
"""
Display histogram of a TF distribution
"""
with tf.Session() as sess:
values = sess.run(distribution_tensor)
plt.title(title)
plt.hist(values, ... | mit |
clemenshage/grslra | smmprod/__init__.py | 1 | 1426 | # # -*- coding: utf-8 -*-
import numpy as np
from . import _smmprod
def smmprod_c(A, B, Omega):
# out wird hier preallocated, kann in Schleifen dann wiederverwendet werden
out = np.zeros(Omega[0].shape[0])
_smmprod.smmprod(A, B, Omega, out)
return out
# def smmprod(A, B, Omega):
# A_rows = A[Omeg... | mit |
jmighion/ansible | lib/ansible/modules/web_infrastructure/ansible_tower/tower_job_cancel.py | 34 | 2725 | #!/usr/bin/python
# coding: utf-8 -*-
# (c) 2017, Wayne Witzel III <wayne@riotousliving.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... | gpl-3.0 |
thejens/luigi | luigi/worker.py | 1 | 33476 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... | apache-2.0 |
krount/sslyze | sslyze/plugins/heartbleed_plugin.py | 1 | 6967 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
import socket
import types
from xml.etree.ElementTree import Element
from nassl._nassl import WantReadError
from sslyze.plugins import plugin_base
from sslyze.plugins.plugin_base import PluginScanResult, PluginScan... | gpl-2.0 |
kingmotley/SickRage | lib/sqlalchemy/dialects/mssql/pymssql.py | 76 | 2980 | # mssql/pymssql.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: mssql+pymssql
:name: pymssql
:dbapi: pymssql
:connectstr... | gpl-3.0 |
ltilve/ChromiumGStreamerBackend | tools/telemetry/third_party/gsutilz/gslib/addlhelp/naming.py | 34 | 8930 | # -*- coding: utf-8 -*-
# Copyright 2012 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 |
keseldude/brobot | brobot/plugins/users.py | 1 | 1217 | #===============================================================================
# brobot
# Copyright (C) 2010 Michael Keselman
#
# 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... | gpl-3.0 |
KaranToor/MA450 | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/third_party/appengine/tools/value_mixin.py | 7 | 1607 | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | apache-2.0 |
amstart/demo | vote/polls/forms.py | 1 | 1604 | from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from crispy_forms.layout import Layout, Div, Submit, HTML, Button, Row, Field
from crispy_forms.bootstrap import AppendedText, PrependedText, FormActions
class PremiseForm(forms.Form):
radio_buttons = form... | mit |
crepererum/invenio | invenio/ext/sqlalchemy/expressions.py | 17 | 1194 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2011, 2012, 2013 CERN.
#
# Invenio 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 optio... | gpl-2.0 |
simplyguru-dot/ansible-modules-core | cloud/openstack/os_object.py | 130 | 4074 | #!/usr/bin/python
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2013, Benno Joy <benno@ansible.com>
#
# This module 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 vers... | gpl-3.0 |
joyxu/autotest | frontend/afe/views.py | 4 | 2452 | import httplib2
import sys
import traceback
import cgi
from django.http import HttpResponse, HttpResponsePermanentRedirect
from django.http import HttpResponseServerError
from django.template import Context, loader
from autotest.client.shared import utils
from autotest.frontend import views_common
from autotest.fronte... | gpl-2.0 |
wujuguang/sentry | src/sentry/migrations/0078_auto__add_field_affecteduserbygroup_tuser.py | 36 | 21866 | # -*- 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 field 'AffectedUserByGroup.tuser'
db.add_column('sentry_affecteduserbygroup', 'tuser',
... | bsd-3-clause |
40023154/0628 | static/Brython3.1.1-20150328-091302/Lib/VFS_import.py | 738 | 3059 | import os
from browser import doc
#_scripts=doc.createElement('script')
#_scripts.src="/src/py_VFS.js"
#_scripts.type="text/javascript"
#doc.get(tag='head')[0].appendChild(_scripts)
VFS=dict(JSObject(__BRYTHON__.py_VFS))
class VFSModuleFinder:
def __init__(self, path_entry):
print("in VFSModuleFinder")
... | gpl-3.0 |
nicfitzgerald/pyrogue-game | map_utils.py | 1 | 4764 | from tdl.map import Map
from random import randint
from components.ai import BasicMonster
from components.fighter import Fighter
from entity import Entity
class GameMap(Map):
def __init__(self, width, height):
super().__init__(width, height)
self.explored = [[False for y in range(height)] for x in ... | gpl-3.0 |
proudlygeek/proudlygeek-blog | pygments/plugin.py | 74 | 1862 | # -*- coding: utf-8 -*-
"""
pygments.plugin
~~~~~~~~~~~~~~~
Pygments setuptools plugin interface. The methods defined
here also work if setuptools isn't installed but they just
return nothing.
lexer plugins::
[pygments.lexers]
yourlexer = yourmodule:YourLexer
formatter pl... | mit |
ATIX-AG/ansible | lib/ansible/modules/network/junos/junos_scp.py | 76 | 5091 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2018, Ansible by Red Hat, inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 |
sgiavasis/nipype | nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmImageCalculator.py | 12 | 1450 | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ....testing import assert_equal
from ..developer import MedicAlgorithmImageCalculator
def test_MedicAlgorithmImageCalculator_inputs():
input_map = dict(args=dict(argstr='%s',
),
environ=dict(nohash=True,
usedefault=True,
),
ignore_exce... | bsd-3-clause |
Pirionfr/pyPhoenix | pyphoenix/responses_pb2.py | 1 | 35351 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pyphoenix/responses.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflecti... | apache-2.0 |
open-synergy/opnsynid-l10n-indonesia | l10n_id_taxform_faktur_pajak_common/models/faktur_pajak_common.py | 1 | 24141 | # -*- coding: utf-8 -*-
# Copyright 2017 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import models, fields, api
import openerp.addons.decimal_precision as dp
from datetime import datetime
import re
class FakturPajakCommon(models.AbstractModel):
... | agpl-3.0 |
SantosDevelopers/sborganicos | venv/lib/python3.5/site-packages/django/contrib/postgres/lookups.py | 106 | 1648 | from django.db.models import Lookup, Transform
from django.utils.encoding import force_text
from .search import SearchVector, SearchVectorExact, SearchVectorField
class PostgresSimpleLookup(Lookup):
def as_sql(self, qn, connection):
lhs, lhs_params = self.process_lhs(qn, connection)
rhs, rhs_para... | mit |
kije/PySpyX | pyspy/migrations/0004_auto_20150515_1104.py | 1 | 1390 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('pyspy', '0003_surveillancevideos'),
]
operations = [
migrations.CreateModel(
name='SurveillanceVideo',
... | gpl-3.0 |
ShaolongHu/Nitrate | tcms/xmlrpc/utils.py | 1 | 7751 | # -*- coding: utf-8 -*-
import re
from django.db.models import Count, FieldDoesNotExist
from tcms.management.models import Product
COUNT_DISTINCT = 0
QUERY_DISTINCT = 1
ACCEPTABLE_BOOL_VALUES = ('0', '1', 0, 1, True, False)
def parse_bool_value(value):
if value in ACCEPTABLE_BOOL_VALUES:
if value is ... | gpl-2.0 |
misabelcarde/kivy-mobile-computing | src/BoardPlay.py | 1 | 3832 | from kivy.uix.gridlayout import GridLayout
from kivy.uix.button import Button
from kivy.uix.label import Label
from Singleton import *
from Instructions import Instructions
from OwnBoard import BaseOwnBoard
from BoardFunctions import *
from SendPackage import *
from kivy.lang import Builder
Builder.load_string('''
<B... | mit |
sashakames/COG | filebrowser/tests/settings.py | 7 | 2733 | # coding: utf-8
# PYTHON IMPORTS
import os
# DJANGO IMPORTS
from django.test import TestCase
from django.contrib.auth.models import User
# FILEBROWSER IMPORTS
from filebrowser.settings import *
class SettingsTests(TestCase):
def setUp(self):
pass
def test_media_root(self):
"""
... | bsd-3-clause |
shft117/SteckerApp | erpnext/patches/v5_0/fix_taxes_and_totals_in_party_currency.py | 102 | 2496 |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import frappe
from frappe.model.meta import get_field_precision
def execute():
if not frappe.db.sql("""select name from `tabPatch Log`
where patch = 'erpnext.patches.v5_0.taxes_and_total... | agpl-3.0 |
CyanideDevices/android_kernel_samsung_smdk4412 | tools/perf/scripts/python/futex-contention.py | 11261 | 1486 | # futex contention
# (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Translation of:
#
# http://sourceware.org/systemtap/wiki/WSFutexContention
#
# to perf python scripting.
#
# Measures futex contention
import os, sys
sys.path.append(os.environ['PER... | gpl-2.0 |
vladikoff/loop-server | loadtests/loadtest.py | 1 | 5543 | from gevent import monkey
monkey.patch_all()
import json
import gevent
from requests_hawk import HawkAuth
from loads.case import TestCase
class TestLoop(TestCase):
def setUp(self):
self.wss = []
def tearDown(self):
for ws in self.wss:
ws.close()
# XXX this is miss... | mpl-2.0 |
benchisell/photostream-bc | flask/lib/python2.7/site-packages/openid/message.py | 146 | 21562 | """Extension argument processing code
"""
__all__ = ['Message', 'NamespaceMap', 'no_default', 'registerNamespaceAlias',
'OPENID_NS', 'BARE_NS', 'OPENID1_NS', 'OPENID2_NS', 'SREG_URI',
'IDENTIFIER_SELECT']
import copy
import warnings
import urllib
from openid import oidutil
from openid import kvf... | bsd-3-clause |
schen119/caffe-windows-cudnn | python/caffe/test/test_python_layer.py | 12 | 1969 | import unittest
import tempfile
import os
import caffe
class SimpleLayer(caffe.Layer):
"""A layer that just multiplies by ten"""
def setup(self, bottom, top):
pass
def reshape(self, bottom, top):
top[0].reshape(*bottom[0].data.shape)
def forward(self, bottom, top):
top[0].da... | bsd-2-clause |
0x46616c6b/ansible | lib/ansible/modules/cloud/lxd/lxd_profile.py | 19 | 12218 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Hiroaki Nakamura <hnakamur@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the... | gpl-3.0 |
CubicERP/odoo | addons/website_forum/__openerp__.py | 321 | 1905 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | agpl-3.0 |
ravenshooter/BA_Analysis | Preprocess.py | 1 | 5604 |
import numpy
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
import scipy
import mdp
import csv
from thread import start_new_thread
import DataSet
from DataAnalysis import plot
from Main import getProjectPath
def readFileToNumpy(fileName):
reader=csv.reader(open(fileName,"rb"),delimiter=... | mit |
cneill/barbican | barbican/tests/api/middleware/test_context.py | 2 | 1970 | # Copyright (c) 2015 Rackspace, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | apache-2.0 |
OSSESAC/odoopubarquiluz | addons/membership/report/report_membership.py | 52 | 6137 | # -*- 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 |
0k/OpenUpgrade | addons/product_margin/__init__.py | 444 | 1092 | # -*- 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 |
JosmanPS/scikit-learn | sklearn/linear_model/least_angle.py | 37 | 53448 | """
Least Angle Regression algorithm. See the documentation on the
Generalized Linear Model for a complete discussion.
"""
from __future__ import print_function
# Author: Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Gael Varoquaux
#
# License: BSD 3 ... | bsd-3-clause |
juliengdt/juliengdt-resources | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/token.py | 365 | 5662 | # -*- coding: utf-8 -*-
"""
pygments.token
~~~~~~~~~~~~~~
Basic token types and the standard tokens.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
class _TokenType(tuple):
parent = None
def split(self):
buf = []
... | mit |
igel-kun/pyload | module/plugins/hoster/JWPlayerBased.py | 1 | 3736 | # -*- coding: utf-8 -*-
import re
from module.network.CookieJar import CookieJar
from module.network.PhantomRequest import PhantomRequest
from module.plugins.internal.misc import eval_js_script, get_domain, make_oneline
from module.plugins.internal.XFSHoster import XFSHoster
class JWPlayerBased(XFSHoster):
__n... | gpl-3.0 |
tempbottle/grpc | src/python/grpcio_test/grpc_test/_cython/adapter_low_test.py | 7 | 8187 | # Copyright 2015, 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 f... | bsd-3-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.