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 |
|---|---|---|---|---|---|
gameduell/duell | bin/win/python2.7.9/Lib/site-packages/pip/_vendor/requests/models.py | 277 | 26436 | # -*- coding: utf-8 -*-
"""
requests.models
~~~~~~~~~~~~~~~
This module contains the primary objects that power Requests.
"""
import collections
import datetime
from io import BytesIO, UnsupportedOperation
from .hooks import default_hooks
from .structures import CaseInsensitiveDict
from .auth import HTTPBasicAuth
... | bsd-2-clause |
rwl/PyCIM | CIM15/IEC61970/Core/BasePower.py | 1 | 1832 | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | mit |
Sofcom/treeio | treeio/finance/api/urls.py | 3 | 3231 | # encoding: utf-8
# Copyright 2011 Tree.io Limited
# This file is part of Treeio.
# License www.tree.io/license
# -*- coding: utf-8 -*-
import handlers
from treeio.core.api.auth import auth_engine
from treeio.core.api.doc import documentation_view
from treeio.core.api.resource import CsrfExemptResource
from django.c... | mit |
CongBaoBao/bcloud | bcloud/PropertiesDialog.py | 10 | 4825 |
# Copyright (C) 2014-2015 LiuLang <gsushzhsosgsu@gmail.com>
# Use of this source code is governed by GPLv3 license that can be found
# in http://www.gnu.org/licenses/gpl-3.0.html
import os
import time
from gi.repository import Gtk
from bcloud import Config
_ = Config._
from bcloud import util
from bcloud.Widgets im... | gpl-3.0 |
nicobustillos/odoo | addons/payment_ogone/controllers/main.py | 389 | 1179 | # -*- coding: utf-8 -*-
import logging
import pprint
import werkzeug
from openerp import http, SUPERUSER_ID
from openerp.http import request
_logger = logging.getLogger(__name__)
class OgoneController(http.Controller):
_accept_url = '/payment/ogone/test/accept'
_decline_url = '/payment/ogone/test/decline'
... | agpl-3.0 |
manojhirway/ExistingImagesOnNFS | cinder/volume/drivers/eqlx.py | 15 | 23543 | # Copyright (c) 2013 Dell Inc.
# Copyright 2013 OpenStack LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unle... | apache-2.0 |
shikhardb/scikit-learn | sklearn/covariance/__init__.py | 389 | 1157 | """
The :mod:`sklearn.covariance` module includes methods and algorithms to
robustly estimate the covariance of features given a set of points. The
precision matrix defined as the inverse of the covariance is also estimated.
Covariance estimation is closely related to the theory of Gaussian Graphical
Models.
"""
from ... | bsd-3-clause |
MaT1g3R/YasenBaka | core/weeb_core.py | 1 | 12442 | import re
from datetime import datetime
from html import unescape
from pathlib import Path
from random import choice, random
from typing import List, Tuple, Union
from aiohttp_wrapper import SessionManager
from discord import Embed, File
from minoshiro import Medium, Site
from bot.anime_searcher import AnimeSearcher
... | apache-2.0 |
lmr/autotest | tko/parsers/test/new_scenario.py | 4 | 3716 | #!/usr/bin/python
"""Create new scenario test instance from an existing results directory.
This automates creation of regression tests for the results parsers.
There are 2 primary use cases for this.
1) Bug fixing: Parser broke on some input in the field and we want
to start with a test that operates on that input an... | gpl-2.0 |
mtagle/airflow | tests/providers/amazon/aws/operators/test_sagemaker_transform.py | 4 | 4422 | #
# 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 |
aidanlister/django | django/contrib/gis/db/backends/spatialite/schema.py | 518 | 6882 | from django.db.backends.sqlite3.schema import DatabaseSchemaEditor
from django.db.utils import DatabaseError
class SpatialiteSchemaEditor(DatabaseSchemaEditor):
sql_add_geometry_column = (
"SELECT AddGeometryColumn(%(table)s, %(column)s, %(srid)s, "
"%(geom_type)s, %(dim)s, %(null)s)"
)
sq... | bsd-3-clause |
ArabellaTech/django-page-cms | pages/widgets.py | 1 | 13014 | # -*- coding: utf-8 -*-
"""Django CMS come with a set of ready to use widgets that you can enable
in the admin via a placeholder tag in your template."""
from pages.settings import PAGES_MEDIA_URL, PAGE_TAGGING
from pages.settings import PAGE_TINYMCE, PAGE_LANGUAGES
from pages.models import Page
from pages.widgets_reg... | bsd-3-clause |
vathpela/anaconda | pyanaconda/ui/tui/spokes/warnings_spoke.py | 1 | 2587 | # Ask vnc text spoke
#
# Copyright (C) 2013 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is distributed in the... | gpl-2.0 |
jmighion/ansible | lib/ansible/modules/cloud/amazon/redshift_subnet_group.py | 24 | 5940 | #!/usr/bin/python
# Copyright 2014 Jens Carl, Hothead Games 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',
'stat... | gpl-3.0 |
ahaldane/IvoGPU | utils/getSeqEnergies.py | 1 | 2110 | #!/usr/bin/env python2
#
#Copyright 2016 Allan Haldane.
#This file is part of IvoGPU.
#IvoGPU 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, version 3 of the License.
#IvoGPU is distributed in the hope that ... | gpl-3.0 |
matuu/simpleai | tests/machine_learning/test_metrics.py | 4 | 2290 | #!/usr/bin/env python
# coding: utf-8
"""
Tests for metrics module in machine learning.
"""
import unittest
from simpleai.machine_learning.metrics import Counter, OnlineEntropy, \
OnlineLogProbability, \
OnlineInformationGain
... | mit |
eerwitt/tensorflow | tensorflow/python/platform/app.py | 35 | 1691 | # 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 |
b-cuts/airflow | airflow/hooks/S3_hook.py | 28 | 12831 | from future import standard_library
standard_library.install_aliases()
import logging
import json
import re
import fnmatch
import configparser
from urllib.parse import urlparse
import boto
from boto.s3.connection import S3Connection
from boto.sts import STSConnection
boto.set_stream_logger('boto')
logging.getLogger("b... | apache-2.0 |
derDavidT/sympy | sympy/sets/sets.py | 17 | 57589 | from __future__ import print_function, division
from itertools import product
from sympy.core.sympify import _sympify, sympify
from sympy.core.basic import Basic
from sympy.core.singleton import Singleton, S
from sympy.core.evalf import EvalfMixin
from sympy.core.numbers import Float
from sympy.core.compatibility imp... | bsd-3-clause |
tum-pbs/PhiFlow | phi/math/backend/_backend.py | 1 | 44839 | from collections import namedtuple
from contextlib import contextmanager
from threading import Barrier
from typing import List, Callable
import numpy
from ._dtype import DType, combine_types
SolveResult = namedtuple('SolveResult', [
'method', 'x', 'residual', 'iterations', 'function_evaluations', 'converged', '... | mit |
lnls-fac/sirius | pymodels/TB_V03_02/lattice.py | 1 | 9745 | """Lattice module.
In this module the lattice of the corresponding accelerator is defined.
"""
import math as _math
from pyaccel import lattice as _pyacc_lat, elements as _pyacc_ele, \
accelerator as _pyacc_acc, optics as _pyacc_opt
from . import segmented_models as _segmented_models
energy = 0.150e9 # [eV]
def... | mit |
mrquim/repository.mrquim | plugin.video.mrpiracy/resources/lib/js2py/es6/__init__.py | 27 | 1270 | INITIALISED = False
babel = None
babelPresetEs2015 = None
def js6_to_js5(code):
global INITIALISED, babel, babelPresetEs2015
if not INITIALISED:
import signal, warnings, time
warnings.warn('\nImporting babel.py for the first time - this can take some time. \nPlease note that currently Javascrip... | gpl-2.0 |
sivasankariit/linux-rl | scripts/rt-tester/rt-tester.py | 11005 | 5307 | #!/usr/bin/python
#
# rt-mutex tester
#
# (C) 2006 Thomas Gleixner <tglx@linutronix.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
import os
import sys
import getopt
import sh... | gpl-2.0 |
natanovia/Anki-Android | tools/manage-crowdin.py | 20 | 5581 | #!/usr/bin/python
# Copyright (c) 2010 norbert.nagold@gmail.com
#
# 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.
#
# T... | gpl-3.0 |
spaghetti-/rosdep | src/rosdep2/sources_list.py | 1 | 24825 | # Copyright (c) 2012, Willow Garage, 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 cond... | bsd-3-clause |
badock/nova | nova/objects/flavor.py | 6 | 10781 | # Copyright 2013 Red Hat, 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 ag... | apache-2.0 |
boype/kernel_tuna_kk44 | tools/perf/scripts/python/failed-syscalls-by-pid.py | 11180 | 2058 | # failed 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 failed system call totals, broken down by pid.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os
import sys
sys.pa... | gpl-2.0 |
zjuchenyuan/BioWeb | Lib/Bio/SwissProt/__init__.py | 1 | 22555 | # Copyright 2007 by Michiel de Hoon. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Code to work with the sprotXX.dat file from SwissProt.
http://www.expasy.ch/sprot/sprot-t... | mit |
programmer10110/instavpn | util.py | 2 | 5006 | import platform, os, logging_subprocess, random, string, logging, sys, json, urllib2, fileinput
logger = logging.getLogger()
string_pool = string.ascii_letters + string.digits
gen_random_text = lambda s: ''.join(map(lambda _: random.choice(string_pool), range(s)))
def run_command(cmd):
return not (logging_subpro... | apache-2.0 |
sertac/django | tests/template_tests/filter_tests/test_truncatewords_html.py | 386 | 1607 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.template.defaultfilters import truncatewords_html
from django.test import SimpleTestCase
class FunctionTests(SimpleTestCase):
def test_truncate_zero(self):
self.assertEqual(truncatewords_html('<p>one <a href="#">two - three <br>... | bsd-3-clause |
psychobaka/PatchCorral | src/engine/file.py | 3 | 2758 | ####################################################################################################
# Copyright 2013 John Crawford
#
# This file is part of PatchCorral.
#
# PatchCorral is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
... | gpl-3.0 |
kemalakyol48/python-for-android | python3-alpha/extra_modules/gdata/urlfetch.py | 47 | 9308 | #!/usr/bin/python
#
# Copyright (C) 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | apache-2.0 |
ddrown/irssiconnectbot-protobuf | gtest/test/gtest_xml_outfiles_test.py | 718 | 5312 | #!/usr/bin/env python
#
# Copyright 2008, 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... | bsd-3-clause |
vmfarms/django-rest-swagger | tests/cigar_example/cigar_example/wsgi.py | 18 | 1148 | """
WSGI config for cigar_example project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICAT... | bsd-2-clause |
glwu/python-for-android | python3-alpha/python3-src/Lib/ctypes/test/test_pointers.py | 53 | 6273 | import unittest, sys
from ctypes import *
import _ctypes_test
ctype_types = [c_byte, c_ubyte, c_short, c_ushort, c_int, c_uint,
c_long, c_ulong, c_longlong, c_ulonglong, c_double, c_float]
python_types = [int, int, int, int, int, int,
int, int, int, int, float, float]
class PointersT... | apache-2.0 |
chrisdunelm/google-api-dotnet-client | ClientGenerator/src/googleapis/codegen/targets.py | 6 | 10444 | #!/usr/bin/python2.7
# Copyright 2011 Google Inc. All Rights Reserved.
"""Targets class describes which languages/platforms we support."""
__author__ = 'wclarkso@google.com (Will Clarkson)'
import logging
import os
from googleapis.codegen.filesys import files
from googleapis.codegen.utilities import json_expander
... | apache-2.0 |
Maikflow/django_test | lib/python2.7/site-packages/setuptools/__init__.py | 158 | 5195 | """Extensions to the 'distutils' for large or complex distributions"""
import os
import sys
import distutils.core
import distutils.filelist
from distutils.core import Command as _Command
from distutils.util import convert_path
from fnmatch import fnmatchcase
import setuptools.version
from setuptools.extension import ... | gpl-2.0 |
feer56/Kitsune1 | kitsune/questions/tasks.py | 1 | 6470 | import logging
import traceback
from datetime import date
from django.conf import settings
from django.contrib.sites.models import Site
from django.db import connection, transaction
# NOTE: This import is just so _fire_task gets registered with celery.
import tidings.events # noqa
from celery import task
from multid... | bsd-3-clause |
richard-willowit/odoo | addons/payment_stripe/models/payment.py | 3 | 10420 | # coding: utf-8
import logging
import requests
from odoo import api, fields, models, _
from odoo.addons.payment.models.payment_acquirer import ValidationError
from odoo.exceptions import UserError
from odoo.tools.safe_eval import safe_eval
_logger = logging.getLogger(__name__)
# Force the API version to avoid break... | gpl-3.0 |
szeged/servo | tests/wpt/web-platform-tests/tools/third_party/hyper/hyper/packages/hyperframe/flags.py | 41 | 1028 | # -*- coding: utf-8 -*-
"""
hyperframe/flags
~~~~~~~~~~~~~~~~
Defines basic Flag and Flags data structures.
"""
import collections
Flag = collections.namedtuple("Flag", ["name", "bit"])
class Flags(collections.MutableSet):
"""
A simple MutableSet implementation that will only accept known flags as elements... | mpl-2.0 |
derrod/livestreamer | src/livestreamer/plugins/azubutv.py | 15 | 6049 | import re
from io import BytesIO
from time import sleep
from livestreamer.exceptions import PluginError
from livestreamer.packages.flashmedia import AMFPacket, AMFMessage
from livestreamer.packages.flashmedia.types import AMF3ObjectBase
from livestreamer.plugin import Plugin
from livestreamer.plugin.api import http, ... | bsd-2-clause |
loseblue/vim-ycm-windows-64 | third_party/ycmd/third_party/waitress/waitress/tests/test_regression.py | 40 | 4059 | ##############################################################################
#
# Copyright (c) 2005 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | gpl-3.0 |
yitian134/chromium | tools/code_coverage/coverage_posix_unittest.py | 54 | 4782 | #!/usr/bin/env python
# Copyright (c) 2010 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.
"""Unit tests for coverage_posix.py.
Run a single test with a command such as:
./coverage_posix_unittest.py CoveragePosixTest.te... | bsd-3-clause |
lyw07/kolibri | kolibri/core/exams/models.py | 1 | 6100 | from django.db import models
from jsonfield import JSONField
from .permissions import UserCanReadExamAssignmentData
from .permissions import UserCanReadExamData
from kolibri.core.auth.constants import role_kinds
from kolibri.core.auth.models import AbstractFacilityDataModel
from kolibri.core.auth.models import Collect... | mit |
andip71/boeffla-kernel-samsung-n8000 | 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 |
Serag8/Bachelor | google_appengine/lib/django-1.4/django/utils/timezone.py | 81 | 8011 | """Timezone helper functions.
This module uses pytz when it's available and fallbacks when it isn't.
"""
from datetime import datetime, timedelta, tzinfo
from threading import local
import time as _time
try:
import pytz
except ImportError:
pytz = None
from django.conf import settings
__all__ = [
'utc',... | mit |
zhuyongyong/crosswalk-test-suite | cordova/cordova-sampleapp-android-tests/sampleapp/privateNotes_close.py | 15 | 2239 | #!/usr/bin/env python
#
# Copyright (c) 2015 Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original copyright notice, this
# list of conditions and t... | bsd-3-clause |
prarthitm/edxplatform | common/lib/capa/capa/tests/test_correctmap.py | 107 | 7116 | """
Tests to verify that CorrectMap behaves correctly
"""
import unittest
from capa.correctmap import CorrectMap
import datetime
class CorrectMapTest(unittest.TestCase):
"""
Tests to verify that CorrectMap behaves correctly
"""
def setUp(self):
super(CorrectMapTest, self).setUp()
sel... | agpl-3.0 |
eul-721/The-Perfect-Pokemon-Team-Balancer | libs/env/Lib/site-packages/whoosh/lang/snowball/dutch.py | 96 | 6194 | from .bases import _StandardStemmer
from whoosh.compat import u
class DutchStemmer(_StandardStemmer):
"""
The Dutch Snowball stemmer.
:cvar __vowels: The Dutch vowels.
:type __vowels: unicode
:cvar __step1_suffixes: Suffixes to be deleted in step 1 of the algorithm.
:type __step1_suffixes: t... | gpl-2.0 |
tejonbiker/Adafruit_Python_MPR121 | Adafruit_MPR121/MPR121.py | 11 | 8262 | # Copyright (c) 2014 Adafruit Industries
# Author: Tony DiCola
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, m... | mit |
linebp/pandas | doc/make.py | 8 | 12640 | #!/usr/bin/env python
"""
Python script for building documentation.
To build the docs you must have all optional dependencies for pandas
installed. See the installation instructions for a list of these.
<del>Note: currently latex builds do not work because of table formats that are not
supported in the latex generat... | bsd-3-clause |
urandu/rethinkdb | external/v8_3.30.33.16/build/gyp/tools/pretty_sln.py | 806 | 5092 | #!/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.
"""Prints the information in a sln file in a diffable way.
It first outputs each projects in alphabetical order with their
dependenci... | agpl-3.0 |
jolevq/odoopub | addons/website_mail/models/mail_thread.py | 338 | 1454 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-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 |
ericlink/adms-server | playframework-dist/play-1.1/python/Lib/subprocess.py | 2 | 45310 | # subprocess - Subprocesses with accessible I/O streams
#
# For more information about this module, see PEP 324.
#
# This module should remain compatible with Python 2.2, see PEP 291.
#
# Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se>
#
# Licensed to PSF under a Contributor Agreement.
# See ... | mit |
AdamHull/namebench | nb_third_party/jinja2/filters.py | 199 | 22056 | # -*- coding: utf-8 -*-
"""
jinja2.filters
~~~~~~~~~~~~~~
Bundled jinja filters.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import re
import math
from random import choice
from operator import itemgetter
from itertools import imap, groupby
from jinja2.... | apache-2.0 |
mongmong/python-sweety | src/sweety/loader.py | 1 | 1184 | #!/usr/bin/env python
'''
sweety.loader
This module contains the functions for loading modules.
@author: Chris Chou <m2chrischou AT gmail.com>
@description:
'''
import os
import sys
import traceback
from sweety.log import get_logger
def load_file(filename):
'''
load_file(filename) -> module
Loads... | bsd-2-clause |
blueboxgroup/ansible | lib/ansible/module_utils/vca.py | 5 | 10930 | #
# 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 in the hope tha... | gpl-3.0 |
hhsprings/cython | Cython/Compiler/TypeInference.py | 13 | 21051 | from __future__ import absolute_import
from .Errors import error, message
from . import ExprNodes
from . import Nodes
from . import Builtin
from . import PyrexTypes
from .. import Utils
from .PyrexTypes import py_object_type, unspecified_type
from .Visitor import CythonTransform, EnvTransform
try:
reduce
except N... | apache-2.0 |
gangadharkadam/vlinkerp | erpnext/config/crm.py | 16 | 2937 | from frappe import _
def get_data():
return [
{
"label": _("Documents"),
"icon": "icon-star",
"items": [
{
"type": "doctype",
"name": "Lead",
"description": _("Database of potential customers."),
},
{
"type": "doctype",
"name": "Customer",
"description": _("Custome... | agpl-3.0 |
brianyu2010/Mini-Metagenomic_Analyses | Snakefile_combined_analysis.py | 1 | 7049 | ###############################################
# Snakemake rules associated with combined
# analysis of each biosample from subsample resutls
# this file must be included into another
# Snakemake file
###############################################
# rename each contig with subsample information
# this rule is no lo... | gpl-3.0 |
yangjiandong/djangosnippets | cab/views/popular.py | 1 | 1362 | import datetime
from django.contrib.auth.models import User
from django.shortcuts import render_to_response
from django.template.context import RequestContext
from django.views.generic.list_detail import object_list
from taggit.models import Tag
from cab.models import Snippet, Language, Bookmark
from cab.utils impor... | bsd-3-clause |
50wu/gpdb | gpMgmt/bin/gppylib/gpMgmttest/__init__.py | 29 | 2244 | import unittest
import time
class GpMgmtTestRunner(unittest.TextTestRunner):
def _makeResult(self):
return GpMgmtTextTestResult(self.stream, self.descriptions, self.verbosity)
class GpMgmtTextTestResult(unittest.TextTestResult):
def __init__(self, stream, descriptions, verbosity):
super(GpMgm... | apache-2.0 |
procangroup/edx-platform | lms/djangoapps/instructor_task/migrations/0002_gradereportsetting.py | 25 | 1167 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('instruct... | agpl-3.0 |
dcramer/django-compositepks | django/contrib/gis/admin/widgets.py | 6 | 3727 | from django.contrib.gis.gdal import OGRException
from django.contrib.gis.geos import GEOSGeometry, GEOSException
from django.forms.widgets import Textarea
from django.template.loader import render_to_string
class OpenLayersWidget(Textarea):
"""
Renders an OpenLayers map using the WKT of the geometry.
"""
... | bsd-3-clause |
40123148/40123148 | static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_break.py | 785 | 8138 | import gc
import io
import os
import sys
import signal
import weakref
import unittest
@unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill")
@unittest.skipIf(sys.platform =="win32", "Test cannot run on Windows")
@unittest.skipIf(sys.platform == 'freebsd6', "Test kills regrtest on freebsd6 "
"if threa... | lgpl-3.0 |
janpascal/denyhosts | DenyHosts/purgecounter.py | 1 | 1894 | import logging
import os
from . import constants
from .counter import Counter, CounterRecord
error = logging.getLogger("purgecounter").error
info = logging.getLogger("purgecounter").info
class PurgeCounter(object):
def __init__(self, prefs):
self.filename = os.path.join(prefs['WORK_DIR'],
... | gpl-2.0 |
jvarho/rencfs | aes.py | 1 | 2540 | #!/usr/bin/python3
# Copyright (c) 2017-2020, Jan Varho
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE ... | isc |
ageron/tensorflow | tensorflow/contrib/training/python/training/evaluation_test.py | 25 | 18065 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | apache-2.0 |
Weasyl/weasyl | weasyl/report.py | 1 | 9411 | import arrow
from sqlalchemy.dialects.postgresql import ARRAY
from sqlalchemy.orm import aliased, contains_eager, joinedload
import sqlalchemy as sa
import web
from libweasyl.models.content import Report, ReportComment
from libweasyl.models.users import Login
from libweasyl import constants, staff
from weasyl.error im... | apache-2.0 |
duhzecca/cinder | cinder/tests/unit/scheduler/test_host_manager.py | 7 | 27242 | # Copyright (c) 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 ... | apache-2.0 |
heenbo/mosquitto-heenbo | test/mosq_test.py | 7 | 13413 | import errno
import os
import socket
import subprocess
import struct
import time
def start_broker(filename, cmd=None, port=1888):
delay = 0.1
if cmd is None:
cmd = ['../../src/mosquitto', '-v', '-c', filename.replace('.py', '.conf')]
if os.environ.get('MOSQ_USE_VALGRIND') is not None:
cmd =... | gpl-3.0 |
justinslee/Wai-Not-Makahiki | makahiki/apps/widgets/notifications/tests.py | 7 | 5066 | """Notification testing."""
from django.test import TransactionTestCase
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from apps.managers.challenge_mgr import challenge_mgr
from apps.utils import test_utils
from apps.widgets.notifications import get_unread_notifications
from ... | mit |
neuroidss/htmengine-traffic-tutorial | python-engine/consume_realtime_results.py | 11 | 5688 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2015, Numenta, Inc. Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software code, the
# following terms and conditio... | gpl-3.0 |
lscheinkman/nupic | tests/unit/nupic/encoders/logenc_test.py | 10 | 10536 | # ----------------------------------------------------------------------
# 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 |
davidbz/trafficserver | tests/gold_tests/pluginTest/multiplexer/multiplexer.test.py | 2 | 2128 | '''
'''
# 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");... | apache-2.0 |
wehkamp/ansible | lib/ansible/playbook/role/__init__.py | 15 | 14784 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | gpl-3.0 |
saiwing-yeung/scikit-learn | sklearn/neural_network/_stochastic_optimizers.py | 93 | 8873 | """Stochastic optimization methods for MLP
"""
# Authors: Jiyuan Qian <jq401@nyu.edu>
# License: BSD 3 clause
import numpy as np
class BaseOptimizer(object):
"""Base (Stochastic) gradient descent optimizer
Parameters
----------
params : list, length = len(coefs_) + len(intercepts_)
The con... | bsd-3-clause |
HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/VTK/ThirdParty/Twisted/twisted/conch/test/test_tap.py | 32 | 6164 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.conch.tap}.
"""
try:
import Crypto.Cipher.DES3
except:
Crypto = None
try:
import pyasn1
except ImportError:
pyasn1 = None
try:
from twisted.conch import unix
except ImportError:
unix = None
if Cr... | gpl-3.0 |
quinot/ansible | lib/ansible/modules/network/illumos/ipadm_addrprop.py | 61 | 7148 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Adam Števko <adam.stevko@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': '1.1',
... | gpl-3.0 |
leiferikb/bitpop | src/third_party/scons-2.0.1/engine/SCons/Tool/tlib.py | 61 | 1884 | """SCons.Tool.tlib
XXX
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
#
# 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 restr... | gpl-3.0 |
blazek/QGIS | python/plugins/processing/algs/qgis/SelectByExpression.py | 15 | 3786 | # -*- coding: utf-8 -*-
"""
***************************************************************************
SelectByExpression.py
---------------------
Date : July 2014
Copyright : (C) 2014 by Michael Douchin
***********************************************************************... | gpl-2.0 |
GoogleCloudPlatform/cloud-foundation-toolkit | dm/templates/interconnect/interconnect.py | 1 | 2261 | # Copyright 2018 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 a... | apache-2.0 |
Define-break-continue/raspoznavayka | src/lib/rtaudio-4.1.2/contrib/python/pyrtaudio/setup.py | 8 | 1601 | #!/bin/env python
import os
from distutils.core import setup, Extension
if hasattr(os, 'uname'):
OSNAME = os.uname()[0]
else:
OSNAME = 'Windows'
define_macros = []
libraries = []
extra_link_args = []
extra_compile_args = ['-I../../../']
sources = ['rtaudiomodule.cpp', '../../../RtAudio.cpp']
if OSNAME == ... | gpl-3.0 |
jjmleiro/hue | desktop/core/ext-py/boto-2.38.0/boto/sdb/db/__init__.py | 189 | 1108 | # Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy,... | apache-2.0 |
BT-fgarbely/odoo | addons/purchase/report/purchase_report.py | 137 | 7689 | # -*- 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 |
TheBraveWarrior/pyload | module/plugins/accounts/QuickshareCz.py | 8 | 1274 | # -*- coding: utf-8 -*-
import re
from ..internal.Account import Account
class QuickshareCz(Account):
__name__ = "QuickshareCz"
__type__ = "account"
__version__ = "0.11"
__status__ = "testing"
__description__ = """Quickshare.cz account plugin"""
__license__ = "GPLv3"
__authors__ = [("zo... | gpl-3.0 |
glynjackson/ec2-deploy | ec2_deploy/ec2/api.py | 1 | 1965 | import time
import boto
import boto.ec2
from fabric.api import task, settings, sudo, execute, env, run, cd, local, put, abort, get, hosts
from fabric.operations import prompt
from ec2_deploy.connections import AWS
from ec2_deploy.notifications import Notification
def create_instance(instance_type='web', address=No... | mit |
grant-olson/pyasm | makeStructs.py | 1 | 7808 | # Copyright 2004-2010 Grant T. Olson.
# See license.txt for terms.
import re, sys, glob, os, time
#These files are in the 'include' directory, but are modules.
#They won't get built properly
skipFiles = ('datetime.h','py_curses.h','structseq.h','symtable.h')
def emitFileHeader():
print """/* Copyright 2004-2006... | bsd-3-clause |
aptrishu/coala | coalib/misc/Caching.py | 10 | 5435 | import logging
import time
import os
from coala_utils.decorators import enforce_signature
from coalib.misc.CachingUtilities import (
pickle_load, pickle_dump, delete_files)
class FileCache:
"""
This object is a file cache that helps in collecting only the changed
and new files since the last run. Exa... | agpl-3.0 |
semkiv/heppy_fcc | background_Bs2DsDsK_with_Ds2PiPiPiPi_analysis_cfg.py | 1 | 3669 | #!/usr/bin/env python
"""
Configuration script for the analyzer of B0s -> K*0 Ds+ Ds- background events
| | |-> pi- pi- pi+ pi0
| |-> pi+ pi+ pi- pi0
... | gpl-3.0 |
zr4x/pythonTests | fixture/group.py | 1 | 3582 | from model.group import Group
class GroupHelper:
def __init__(self, app):
self.app = app
def open_groups_page(self):
wd = self.app.wd
if not (wd.current_url.endswith("/group.php") and len(wd.find_elements_by_name("new")) > 0):
wd.find_element_by_link_text("groups").click()... | apache-2.0 |
SerialShadow/SickRage | lib/sqlalchemy/util/langhelpers.py | 75 | 37513 | # util/langhelpers.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
"""Routines to help with the creation, loading and introspection of
modules, class... | gpl-3.0 |
mitchelljkotler/django | django/contrib/syndication/views.py | 192 | 8680 | from __future__ import unicode_literals
from calendar import timegm
from django.conf import settings
from django.contrib.sites.shortcuts import get_current_site
from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist
from django.http import Http404, HttpResponse
from django.template import Templat... | bsd-3-clause |
bzero/networkx | networkx/algorithms/bipartite/spectral.py | 76 | 2538 | # -*- coding: utf-8 -*-
"""
Spectral bipartivity measure.
"""
import networkx as nx
__author__ = """Aric Hagberg (hagberg@lanl.gov)"""
# Copyright (C) 2011 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
__a... | bsd-3-clause |
chrippa/xmms2 | waftools/gittools.py | 5 | 1944 | import os
try: from hashlib import sha1 as sha
except ImportError: from sha import sha
def gitsha(path):
h = sha()
data = file(path, 'rb').read()
h.update("blob %d\0" % len(data))
h.update(data)
return h.hexdigest()
def git_info():
commithash = os.popen('git rev-parse --verify HEAD 2>/dev/null... | lgpl-2.1 |
amarmaduke/ankipac | ffs/parser.py | 2 | 7836 | import os
def split_path(path):
folders = []
while True:
path, folder = os.path.split(path)
if folder != "":
folders.append(folder)
else:
if path != "":
folders.append(path)
break
folders.reverse()
return folders
def lex_file(... | mit |
google-code-export/pyglet | contrib/layout/examples/xhtml_replaced.py | 29 | 4059 | #!/usr/bin/env python
'''Example of a custom replaced element for XHTML layout.
'''
__docformat__ = 'restructuredtext'
__version__ = '$Id: xml_css.py 322 2006-12-26 12:53:18Z Alex.Holkner $'
from ctypes import *
from pyglet.gl import *
from pyglet.window import Window
from pyglet import clock
from layout import *
... | bsd-3-clause |
nataddrho/DigiCue-USB | Python3/src/venv/Lib/site-packages/pip/_internal/utils/pkg_resources.py | 1 | 1238 | from pip._vendor.pkg_resources import yield_lines
from pip._vendor.six import ensure_str
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
if MYPY_CHECK_RUNNING:
from typing import Dict, Iterable, List
class DictMetadata:
"""IMetadataProvider that reads metadata files from a dictionary.
"""
... | mit |
lip6-mptcp/ns3mptcp | src/flow-monitor/examples/wifi-olsr-flowmon.py | 108 | 7439 | # -*- Mode: Python; -*-
# Copyright (c) 2009 INESC Porto
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation;
#
# This program is distributed in the hope that it will be useful,
#... | gpl-2.0 |
wujuguang/motor | motor/motor_asyncio.py | 1 | 1907 | # Copyright 2011-2015 MongoDB, 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 writin... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.