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 |
|---|---|---|---|---|---|
konstin/mucmiete | settings/base.py | 2 | 3552 | """
Django settings for miete project.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
impo... | agpl-3.0 |
anastasiaguenova/radioactive-decay-simulator | electron/node_modules/accessibility-developer-tools/lib/closure-library/closure/bin/build/jscompiler_test.py | 27 | 3823 | #!/usr/bin/env python
#
# Copyright 2013 The Closure Library 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
... | mit |
UstadMobile/eXePUB | exe/engine/wikipediaidevice.py | 3 | 15520 | # -- coding: utf-8 --
# ===========================================================================
# eXe
# Copyright 2004-2006, University of Auckland
# Copyright 2006-2008 eXe Project, http://eXeLearning.org/
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Gen... | gpl-2.0 |
edxzw/edx-platform | cms/djangoapps/contentstore/views/tests/utils.py | 198 | 2922 | """
Utilities for view tests.
"""
import json
from contentstore.tests.utils import CourseTestCase
from contentstore.views.helpers import xblock_studio_url
from xmodule.modulestore.tests.factories import ItemFactory
class StudioPageTestCase(CourseTestCase):
"""
Base class for all tests of Studio pages.
"... | agpl-3.0 |
broferek/ansible | lib/ansible/plugins/become/enable.py | 43 | 1422 | # -*- coding: utf-8 -*-
# Copyright: (c) 2018, Ansible Project
# 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
DOCUMENTATION = """
become: enable
short_description: Switch to ele... | gpl-3.0 |
robbinfan/thirdparty | protobuf-2.6.1/python/google/protobuf/pyext/descriptor_cpp2_test.py | 73 | 2506 | #! /usr/bin/python
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
... | bsd-2-clause |
epssy/hue | apps/useradmin/src/useradmin/test_ldap_deprecated.py | 4 | 32107 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (... | apache-2.0 |
sanguinariojoe/FreeCAD | src/Mod/Part/BOPTools/JoinFeatures.py | 13 | 15669 | #/***************************************************************************
# * Copyright (c) 2016 Victor Titov (DeepSOIC) <vv.titov@gmail.com> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... | lgpl-2.1 |
xuweiliang/Codelibrary | openstack_dashboard/test/integration_tests/pages/loginpage.py | 18 | 3628 | # 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 writing, software
# d... | apache-2.0 |
zlsun/XX-Net | code/default/gae_proxy/server/lib/google/net/proto/ProtocolBuffer.py | 10 | 27352 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | bsd-2-clause |
nbborlongan/geonode | geonode/sitemap.py | 35 | 1218 | #########################################################################
#
# 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 version 3 of the License, or
#... | gpl-3.0 |
tensorflow/lucid | tests/recipes/activation_atlas.py | 1 | 1157 | import pytest
from lucid.modelzoo.aligned_activations import NUMBER_OF_AVAILABLE_SAMPLES
from lucid.modelzoo.vision_models import AlexNet, InceptionV1
from lucid.recipes.activation_atlas import activation_atlas, aligned_activation_atlas
from lucid.misc.io import save
# Run test with just 1/10th of available samples
s... | apache-2.0 |
JeanMarieMineau/ISN-s-Cube | Bouton.py | 1 | 5185 | '''
Created on 5 mai 2017
Copyright 2017 Jean-Marie Mineau, Maxime Keller
This file is part of "ISN's Cube".
"ISN's Cube" 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 Licen... | gpl-3.0 |
omprakasha/odoo | addons/l10n_do/__openerp__.py | 309 | 2992 | # -*- coding: utf-8 -*-
# #############################################################################
#
# First author: Jose Ernesto Mendez <tecnologia@obsdr.com> (Open Business Solutions SRL.)
# Copyright (c) 2012 -TODAY Open Business Solutions, SRL. (http://obsdr.com). All rights reserved.
#
# This is a fork to upg... | agpl-3.0 |
clay23/lab4 | lib/werkzeug/contrib/fixers.py | 464 | 9949 | # -*- coding: utf-8 -*-
"""
werkzeug.contrib.fixers
~~~~~~~~~~~~~~~~~~~~~~~
.. versionadded:: 0.5
This module includes various helpers that fix bugs in web servers. They may
be necessary for some versions of a buggy web server but not others. We try
to stay updated with the status of the bug... | apache-2.0 |
akashsinghal/Speech-Memorization-App | speech/Swift/Speech-gRPC-Streaming/env/lib/python3.6/site-packages/setuptools/command/egg_info.py | 50 | 25016 | """setuptools.command.egg_info
Create a distribution's .egg-info directory and contents"""
from distutils.filelist import FileList as _FileList
from distutils.errors import DistutilsInternalError
from distutils.util import convert_path
from distutils import log
import distutils.errors
import distutils.filelist
import... | apache-2.0 |
kcyu1993/ML_course_kyu | projects/project1/scripts/model.py | 1 | 19450 | from __future__ import absolute_import
from abc import ABCMeta, abstractmethod
import copy
from data_utils import build_k_indices
from learning_model import *
from regularizer import *
from helpers import save_numpy_array
import numpy as np
class Model(object):
"""
Author: Kaicheng Yu
Machine learning mo... | mit |
msimet/Stile | devel/make_simple_catalog.py | 1 | 1417 | import galsim
import numpy
use_noise = True
extent_degrees = 1. # Create galaxies within a box of this side length
n_galaxies_per_sq_arcmin = 20
z_min = 0.1
z_max = 2.0
z_powerlaw_slope = 2.0
z_lens = 0.2
def make_safe_shear(g):
if g[0]>1:
g[0] = 1
if g[1]>1:
g[1] = 1
mag = numpy.sqrt(g[0]... | bsd-3-clause |
kdart/pycopia | core/pycopia/inet/rfc2822.py | 1 | 15042 | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
... | apache-2.0 |
alehander42/hatlog | hatlog/prolog.py | 1 | 1202 | def generate_prolog(x, name, file):
header = '''\
:- initialization main.
:- use_module(pythonTypeSystem).
:- use_module(prettyTypes).
'''
fun = generate_fun(x, name)
m = '''main :-
open('%s.txt', write, Stream),
(
f(%s, Z0, Z1),
unvar(Z0, Z1, Z2, Z3, Z4), %% replace free vars wit... | apache-2.0 |
tmerrick1/spack | var/spack/repos/builtin/packages/r-whisker/package.py | 5 | 1636 | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 |
makson96/free-engineer | tools/steam.py | 2 | 8550 | #!/usr/bin/env python3
#-*- coding: utf-8 -*-
##This software is available to you under the terms of the GPL-3, see "/usr/share/common-licenses/GPL-3".
##Copyright:
##- Tomasz Makarewicz (makson96@gmail.com)
import os, tarfile, urllib.request, time, shutil
from subprocess import Popen, PIPE
recultis_dir = os.getenv(... | gpl-3.0 |
spl0k/supysonic | supysonic/cli.py | 1 | 15855 | # This file is part of Supysonic.
# Supysonic is a Python implementation of the Subsonic server API.
#
# Copyright (C) 2013-2021 Alban 'spl0k' Féron
#
# Distributed under terms of the GNU AGPLv3 license.
import argparse
import cmd
import getpass
import shlex
import sys
import time
from pony.orm import db_session, sel... | agpl-3.0 |
willingc/oh-mainline | vendor/packages/twisted/twisted/test/test_digestauth.py | 29 | 23460 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.cred._digest} and the associated bits in
L{twisted.cred.credentials}.
"""
from zope.interface.verify import verifyObject
from twisted.trial.unittest import TestCase
from twisted.python.hashlib import md5, sha1
from twisted... | agpl-3.0 |
kashyap32/scrapy | tests/test_webclient.py | 112 | 12875 | """
from twisted.internet import defer
Tests borrowed from the twisted.web.client tests.
"""
import os
from six.moves.urllib.parse import urlparse
from twisted.trial import unittest
from twisted.web import server, static, error, util
from twisted.internet import reactor, defer
from twisted.test.proto_helpers import St... | bsd-3-clause |
javierTerry/PyGithub | github/Legacy.py | 72 | 7248 | # -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
# #
# Copyright 2012 Steve English <steve.english@navetas.com> #
# Copyright 2012 Vincent Jacques <vincent@vincent-ja... | gpl-3.0 |
350dotorg/Django | django/contrib/redirects/middleware.py | 447 | 1105 | from django.contrib.redirects.models import Redirect
from django import http
from django.conf import settings
class RedirectFallbackMiddleware(object):
def process_response(self, request, response):
if response.status_code != 404:
return response # No need to check for a redirect for non-404 re... | bsd-3-clause |
quamilek/django-custard | custard/tests/settings.py | 3 | 1394 | # Django settings for testproject project.
import os
DIRNAME = os.path.dirname(__file__)
DEBUG = True
TEMPLATE_DEBUG = DEBUG
DEBUG_PROPAGATE_EXCEPTIONS = True
ADMINS = ()
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(DIRNAME, 'db.sqlite... | mit |
Xeralux/tensorflow | tensorflow/contrib/metrics/python/metrics/classification.py | 111 | 2647 | # 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 |
groschovskiy/personfinder | app/pytz/zoneinfo/America/Winnipeg.py | 9 | 8004 | '''tzinfo timezone information for America/Winnipeg.'''
from pytz.tzinfo import DstTzInfo
from pytz.tzinfo import memorized_datetime as d
from pytz.tzinfo import memorized_ttinfo as i
class Winnipeg(DstTzInfo):
'''America/Winnipeg timezone definition. See datetime.tzinfo for details'''
zone = 'America/Winnipe... | apache-2.0 |
laszlokiraly/OffenesParlament | offenesparlament/op_scraper/scraper/parlament/spiders/administrations.py | 2 | 6360 | # -*- coding: utf-8 -*-
import scrapy
from ansicolor import red
from ansicolor import cyan
from ansicolor import green
from ansicolor import blue
from django.db.models import Q
from urllib import urlencode
from parlament.settings import BASE_HOST
from parlament.spiders.persons import PersonsSpider
from parlament.re... | bsd-2-clause |
PriceElectronics/linux-imx | 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 |
Heufneutje/PyHeufyBot | heufybot/modules/util/urlfollow.py | 1 | 6495 | from twisted.plugin import IPlugin
from heufybot.channel import IRCChannel
from heufybot.moduleinterface import BotModule, IBotModule
from heufybot.utils.dummycontextmanager import DummyContextManager
from heufybot.utils.signaltimeout import TimeoutException
from zope.interface import implements
from bs4 import Beautif... | mit |
bygloam/yapf | yapf/yapflib/format_decision_state.py | 1 | 14929 | # Copyright 2015 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 |
openslack/openslack-wechat | examples/bae-echo-enterprise/wechatapp.py | 14 | 1661 | from __future__ import absolute_import, unicode_literals
from flask import Flask, request, abort
from wechatpy.enterprise.crypto import WeChatCrypto
from wechatpy.exceptions import InvalidSignatureException
from wechatpy.enterprise.exceptions import InvalidCorpIdException
from wechatpy.enterprise import parse_message, ... | apache-2.0 |
ncultra/qemu | scripts/vmstate-static-checker.py | 29 | 15449 | #!/usr/bin/python
#
# Compares vmstate information stored in JSON format, obtained from
# the -dump-vmstate QEMU command.
#
# Copyright 2014 Amit Shah <amit.shah@redhat.com>
# Copyright 2014 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Pu... | gpl-2.0 |
roandelyf/iTerm2 | tools/ply/ply-3.4/example/BASIC/basinterp.py | 166 | 17284 | # This file provides the runtime support for running a basic program
# Assumes the program has been parsed using basparse.py
import sys
import math
import random
class BasicInterpreter:
# Initialize the interpreter. prog is a dictionary
# containing (line,statement) mappings
def __init__(self,prog):
... | gpl-2.0 |
hectorip/PolymerBoilerplate | bp_includes/external/requests/packages/chardet/langbulgarianmodel.py | 2965 | 12784 | ######################## 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... | gpl-2.0 |
ptonner/GPy | GPy/inference/latent_function_inference/var_gauss.py | 15 | 2641 | # Copyright (c) 2015, James Hensman
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import numpy as np
from ...util.linalg import pdinv
from .posterior import Posterior
from . import LatentFunctionInference
log_2_pi = np.log(2*np.pi)
class VarGauss(LatentFunctionInference):
"""
The Variational Gaus... | bsd-3-clause |
ppanczyk/ansible | contrib/inventory/softlayer.py | 29 | 7171 | #!/usr/bin/env python
"""
SoftLayer external inventory script.
The SoftLayer Python API client is required. Use `pip install softlayer` to install it.
You have a few different options for configuring your username and api_key. You can pass
environment variables (SL_USERNAME and SL_API_KEY). You can also write INI file... | gpl-3.0 |
abergeron/DeepLearningTutorials | code/convolutional_mlp.py | 4 | 12722 | """This tutorial introduces the LeNet5 neural network architecture
using Theano. LeNet5 is a convolutional neural network, good for
classifying images. This tutorial shows how to build the architecture,
and comes with all the hyper-parameters you need to reproduce the
paper's MNIST results.
This implementation simpl... | bsd-3-clause |
simbha/mAngE-Gin | lib/django/contrib/formtools/wizard/storage/base.py | 79 | 4920 | from django.core.files.uploadedfile import UploadedFile
from django.utils.datastructures import MultiValueDict
from django.utils.functional import lazy_property
from django.utils import six
from django.contrib.formtools.wizard.storage.exceptions import NoFileStorageConfigured
class BaseStorage(object):
step_key ... | mit |
ma314smith/home-assistant | homeassistant/components/notify/command_line.py | 11 | 1562 | """
Support for command line notification services.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/notify.command_line/
"""
import logging
import subprocess
import voluptuous as vol
from homeassistant.const import (CONF_COMMAND, CONF_NAME)
from homeass... | mit |
seanmonstar/servo | src/components/script/dom/bindings/codegen/parser/tests/test_attr.py | 106 | 12541 | import WebIDL
def WebIDLTest(parser, harness):
testData = [("::TestAttr%s::b", "b", "Byte%s", False),
("::TestAttr%s::rb", "rb", "Byte%s", True),
("::TestAttr%s::o", "o", "Octet%s", False),
("::TestAttr%s::ro", "ro", "Octet%s", True),
("::TestAttr%s::... | mpl-2.0 |
azumimuo/family-xbmc-addon | script.module.t0mm0.common/lib/t0mm0/common/addon.py | 15 | 26656 | '''
common XBMC Module
Copyright (C) 2011 t0mm0
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.
Th... | gpl-2.0 |
sikmir/QGIS | tests/src/python/test_qgsdelimitedtextprovider.py | 2 | 30990 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsDelimitedTextProvider.
.. note:: 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 2 of the License, or
(at your option) any later versi... | gpl-2.0 |
alisaifee/djlimiter | djlimiter/middleware.py | 1 | 5065 | import importlib
import logging
from django.conf import settings
from django.core.urlresolvers import resolve
from limits.storage import storage_from_string
from limits.strategies import STRATEGIES
from limits.errors import ConfigurationError
from limits.util import parse_many
import six
from .decorators import DECOR... | mit |
vshtanko/scikit-learn | sklearn/utils/sparsefuncs.py | 220 | 11424 | # Authors: Manoj Kumar
# Thomas Unterthiner
# License: BSD 3 clause
import scipy.sparse as sp
import numpy as np
from .fixes import sparse_min_max, bincount
from .sparsefuncs_fast import csr_mean_variance_axis0 as _csr_mean_var_axis0
from .sparsefuncs_fast import csc_mean_variance_axis0 as _csc_mean_var_axis... | bsd-3-clause |
a40223217/2015cdb_g6team3 | static/Brython3.1.1-20150328-091302/Lib/importlib/__init__.py | 610 | 3472 | """A pure Python implementation of import."""
__all__ = ['__import__', 'import_module', 'invalidate_caches']
# Bootstrap help #####################################################
# Until bootstrapping is complete, DO NOT import any modules that attempt
# to import importlib._bootstrap (directly or indirectly). Since... | gpl-3.0 |
PROGRAM-IX/pystroke | event_engine.py | 1 | 1542 | import pygame
from pygame.locals import *
class EventEngine:
"""
Reads the event queue and passes events to other engines
@author: James Heslin (PROGRAM_IX)
"""
def __init__(self, i_e):
"""
Takes an InputEngine and passes all relevant events to it
@type i_... | mit |
yamaneko1212/webpay-python | webpay/model/charge.py | 1 | 1090 | from webpay.model.card import Card
from .model import Model
class Charge(Model):
def __init__(self, client, data):
Model.__init__(self, client, data)
def _instantiate_field(self, key, value):
if key == 'card':
return Card(self._client, value)
else:
return Mode... | mit |
andyzsf/edx | cms/djangoapps/contentstore/views/tests/test_import_export.py | 25 | 11737 | """
Unit tests for course import and export
"""
import copy
import json
import logging
import os
import shutil
import tarfile
import tempfile
from path import path
from uuid import uuid4
from django.test.utils import override_settings
from django.conf import settings
from contentstore.utils import reverse_course_url
... | agpl-3.0 |
broesamle/servo | tests/wpt/web-platform-tests/tools/pywebsocket/src/mod_pywebsocket/__init__.py | 552 | 8263 | # Copyright 2011, 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... | mpl-2.0 |
damdam-s/OpenUpgrade | addons/project_issue/migrations/8.0.1.0/pre-migration.py | 14 | 1454 | # -*- coding: utf-8 -*-
##############################################################################
#
# Odoo, a suite of business apps
# This module Copyright (C) 2014 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General... | agpl-3.0 |
miguelpalacio/python-for-android | python-build/python-libs/gdata/build/lib/gdata/tlslite/integration/HTTPTLSConnection.py | 271 | 6668 | """TLS Lite + httplib."""
import socket
import httplib
from gdata.tlslite.TLSConnection import TLSConnection
from gdata.tlslite.integration.ClientHelper import ClientHelper
class HTTPBaseTLSConnection(httplib.HTTPConnection):
"""This abstract class provides a framework for adding TLS support
to httplib."""
... | apache-2.0 |
FuzzyBearBTC/Peershares2 | contrib/pyminer/pyminer.py | 1257 | 6438 | #!/usr/bin/python
#
# Copyright (c) 2011 The Bitcoin developers
# Distributed under the MIT/X11 software license, see the accompanying
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
#
import time
import json
import pprint
import hashlib
import struct
import re
import base64
import httplib
im... | mit |
benwolfe/esp8266-Arduino | esp8266com/esp8266/tools/macosx/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/lib/libstdc++.a-gdb.py | 6 | 2433 | # -*- python -*-
# Copyright (C) 2009-2013 Free Software Foundation, 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 versio... | lgpl-2.1 |
jenalgit/django | tests/urlpatterns_reverse/tests.py | 154 | 50058 | # -*- coding: utf-8 -*-
"""
Unit tests for reverse URL lookups.
"""
from __future__ import unicode_literals
import sys
import unittest
from admin_scripts.tests import AdminScriptTestCase
from django.conf import settings
from django.conf.urls import include, url
from django.contrib.auth.models import User
from django... | bsd-3-clause |
nagisa/Feeds | gdist/gschemas.py | 1 | 2161 | import glob
import os
from distutils.dep_util import newer
from distutils.core import Command
from distutils.spawn import find_executable
from distutils.util import change_root
class build_gschemas(Command):
"""build message catalog files
Build message catalog (.mo) files from .po files using xgettext
... | gpl-2.0 |
Distrotech/samba | source4/scripting/python/samba/tests/dcerpc/registry.py | 20 | 1923 | #!/usr/bin/env python
# Unix SMB/CIFS implementation.
# Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2008
#
# 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 Licens... | gpl-3.0 |
geekboxzone/lollipop_external_chromium_org_third_party_WebKit | Tools/Scripts/webkitpy/style/main_unittest.py | 53 | 3459 | # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
#
# 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 above copyright
# notice, this list of conditions and... | bsd-3-clause |
dfalt974/SickRage | lib/sqlalchemy/testing/config.py | 76 | 2116 | # testing/config.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
import collections
requirements = None
db = None
db_url = None
db_opts = None
file_... | gpl-3.0 |
tobspr/LUI | Demos/B_BlockText.py | 1 | 2782 |
from DemoFramework import DemoFramework
from LUILabel import LUILabel
from LUIBlockText import LUIBlockText
from LUIScrollableRegion import LUIScrollableRegion
import random
f = DemoFramework()
f.prepare_demo("LUIBlockText")
# Constructor
f.add_constructor_parameter("text", "u'Label'")
f.add_constructor_parameter... | mit |
jmetzen/scikit-learn | sklearn/base.py | 22 | 18131 | """Base classes for all estimators."""
# Author: Gael Varoquaux <gael.varoquaux@normalesup.org>
# License: BSD 3 clause
import copy
import warnings
import numpy as np
from scipy import sparse
from .externals import six
from .utils.fixes import signature
from .utils.deprecation import deprecated
from .exceptions impor... | bsd-3-clause |
bioinformatics-ua/montra | emif/notifications/models.py | 2 | 1769 | # -*- coding: utf-8 -*-
# Copyright (C) 2014 Universidade de Aveiro, DETI/IEETA, Bioinformatics Group - http://bioinformatics.ua.pt/
#
# 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 vers... | gpl-3.0 |
weblyzard/ewrt | src/eWRT/ws/yahoo/__init__.py | 1 | 7712 | #!/usr/bin/env python
""" @package eWRT.ws.yahoo
support for the yahoo! search
@remarks
this module is based on yahoo's boss search service
"""
from __future__ import print_function
# (C)opyrights 2008-2010 by Albert Weichselbraun <albert@weichselbraun.net>
# Heinz Peter L... | gpl-3.0 |
numba/numba | numba/tests/test_svml.py | 3 | 17178 | import math
import numpy as np
import subprocess
import numbers
import importlib
import sys
import re
import traceback
import multiprocessing as mp
from itertools import chain, combinations
import numba
from numba.core import config, cpu
from numba import prange, njit
from numba.core.compiler import compile_isolated, ... | bsd-2-clause |
loco-odoo/localizacion_co | openerp/sql_db.py | 39 | 23723 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you ca... | agpl-3.0 |
haiwen/pyes | tests/test_rivers.py | 5 | 2907 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import unittest
from pyes.tests import ESTestCase
from pyes.rivers import CouchDBRiver, RabbitMQRiver, TwitterRiver
class RiversTestCase(ESTestCase):
def setUp(self):
super(RiversTestCase, self).setUp()
def testCreateCouchDBRiver(self):
... | bsd-3-clause |
htygithub/bokeh | bokeh/sampledata/gapminder.py | 41 | 2655 | from __future__ import absolute_import
import pandas as pd
from os.path import join
import sys
from . import _data_dir
'''
This module provides a pandas DataFrame instance of four
of the datasets from gapminder.org.
These are read in from csvs that have been downloaded from Bokeh's
sample data on S3. But the origina... | bsd-3-clause |
chirilo/remo | vendor-local/lib/python/unidecode/x0c2.py | 253 | 4710 | data = (
'syon', # 0x00
'syonj', # 0x01
'syonh', # 0x02
'syod', # 0x03
'syol', # 0x04
'syolg', # 0x05
'syolm', # 0x06
'syolb', # 0x07
'syols', # 0x08
'syolt', # 0x09
'syolp', # 0x0a
'syolh', # 0x0b
'syom', # 0x0c
'syob', # 0x0d
'syobs', # 0x0e
'syos', # 0x0f
'syoss', #... | bsd-3-clause |
Adenilson/servo | tests/wpt/web-platform-tests/html/tools/update_html5lib_tests.py | 125 | 5358 | import sys
import os
import hashlib
import urllib
import itertools
import re
import json
import glob
import shutil
try:
import genshi
from genshi.template import MarkupTemplate
from html5lib.tests import support
except ImportError:
print """This script requires the Genshi templating library and html5l... | mpl-2.0 |
crafty78/ansible | lib/ansible/modules/network/ios/ios_facts.py | 28 | 13900 | #!/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 |
Kazade/NeHe-Website | google_appengine/lib/django-1.4/tests/regressiontests/fixtures_regress/models.py | 33 | 5387 | from __future__ import absolute_import
from django.contrib.auth.models import User
from django.db import models
class Animal(models.Model):
name = models.CharField(max_length=150)
latin_name = models.CharField(max_length=150)
count = models.IntegerField()
weight = models.FloatField()
# use a non... | bsd-3-clause |
inveniosoftware/invenio-collections | invenio_collections/alembic/97faa437d867_create_collections_tables.py | 3 | 2576 | #
# This file is part of Invenio.
# Copyright (C) 2016 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 option) any later version.
#
# Invenio is... | gpl-2.0 |
eezee-it/project-service | service_desk_issue/__openerp__.py | 8 | 1526 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2012-2013 Daniel Reis
#
# This program 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 Sof... | agpl-3.0 |
sobomax/virtualbox_64bit_edd | src/libs/xpcom18a4/python/xpt.py | 26 | 17606 | # ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (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.mozilla.org/MPL/
#
# Softwa... | gpl-2.0 |
tuxfux-hlp-notes/python-batches | batch-67/12-modules/myenv/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/requirements.py | 454 | 4355 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import string
import re
from pkg_resources.extern.pyparsing import string... | gpl-3.0 |
yuruofeifei/mxnet | python/mxnet/gluon/model_zoo/vision/densenet.py | 10 | 7848 | # 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 u... | apache-2.0 |
maestrano/openerp | openerp/addons/account_payment/wizard/account_payment_populate_statement.py | 40 | 6057 | # -*- 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 |
ammaradil/fibonacci | Lib/site-packages/django/contrib/gis/db/models/aggregates.py | 414 | 2395 | from django.contrib.gis.db.models.fields import ExtentField
from django.db.models.aggregates import Aggregate
__all__ = ['Collect', 'Extent', 'Extent3D', 'MakeLine', 'Union']
class GeoAggregate(Aggregate):
function = None
is_extent = False
def as_sql(self, compiler, connection):
# this will be c... | mit |
lihui7115/ChromiumGStreamerBackend | tools/telemetry/telemetry/web_perf/metrics/blob_timeline_unittest.py | 14 | 5994 | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
from collections import namedtuple
from telemetry.internal.results import page_test_results
from telemetry.page import page
from telemetry.w... | bsd-3-clause |
huongttlan/bokeh | bokeh/compat/mplexporter/renderers/base.py | 44 | 14355 | import warnings
import itertools
from contextlib import contextmanager
import numpy as np
from matplotlib import transforms
from .. import utils
from .. import _py3k_compat as py3k
class Renderer(object):
@staticmethod
def ax_zoomable(ax):
return bool(ax and ax.get_navigate())
@staticmethod
... | bsd-3-clause |
edison7500/dugong | apps/images/migrations/0001_initial.py | 1 | 1994 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2018-12-25 06:14
from __future__ import unicode_literals
import apps.images.handlers
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependen... | gpl-3.0 |
bawaaaaah/Phoenix | tools/xml2sqlite.py | 1 | 4763 |
'''
This file is used to combine multiple no-intro xml files into one
sqlite file. This is used for checksum lookups to set up the artwork scraper.
'''
import xml.etree.ElementTree as ET
import sqlite3
import os
import sys
import getopt
UNKNOWN_VALUE = ""
TABLE_VALUE = "NOINTRO"
VERSION_FILE = "console_database_vers... | gpl-2.0 |
xiandiancloud/edx-platform | lms/djangoapps/certificates/migrations/0002_auto__add_field_generatedcertificate_download_url.py | 188 | 6807 | # -*- 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 'GeneratedCertificate.download_url'
db.add_column('certificates_generatedcertificate', 'downl... | agpl-3.0 |
chvrga/outdoor-explorer | java/play-1.4.4/python/Lib/xml/dom/minicompat.py | 7 | 3439 | """Python version compatibility support for minidom."""
# This module should only be imported using "import *".
#
# The following names are defined:
#
# NodeList -- lightest possible NodeList implementation
#
# EmptyNodeList -- lightest possible NodeList that is guarateed to
# rema... | mit |
crazcalm/AngelHack_python34 | myenv/Lib/site-packages/jinja2/_compat.py | 638 | 4042 | # -*- coding: utf-8 -*-
"""
jinja2._compat
~~~~~~~~~~~~~~
Some py2/py3 compatibility support based on a stripped down
version of six so we don't have to depend on a specific version
of it.
:copyright: Copyright 2013 by the Jinja team, see AUTHORS.
:license: BSD, see LICENSE for details.
""... | mit |
codelucas/shorten.tv | bg.py | 1 | 2146 | #!/usr/bin/env python2.7
"""
Here is shorten.tv's main background task to re-load
and cache popular youtube videos so users have less
wait time when using the webapp.
"""
import requests
import string
import backend
import urllib
letters = list(string.lowercase) # a, b, c ... z
popular = ["Rihanna", "Usher", "Katy P... | mit |
HiroIshikawa/21playground | voting/venv/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py | 252 | 106466 | """
Package resource API
--------------------
A resource is a logical file contained within a package, or a logical
subdirectory thereof. The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is. Do not use os.path operations to manipul... | mit |
knxd/PyKNyX | pyknyx/stack/multicastSocket.py | 2 | 5201 | # -*- coding: utf-8 -*-
""" Python KNX framework
License
=======
- B{PyKNyX} (U{https://github.com/knxd/pyknyx}) is Copyright:
- © 2016-2017 Matthias Urlichs
- PyKNyX is a fork of pKNyX
- © 2013-2015 Frédéric Mantegazza
This program is free software; you can redistribute it and/or modify
it under the terms ... | gpl-3.0 |
shingonoide/odoo | openerp/tools/import_email.py | 337 | 6376 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 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 |
google-research/language | language/xsp/data_preprocessing/compute_asql_coverage_spider.py | 1 | 3106 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | apache-2.0 |
io7m/jcalcium | io7m-jcalcium-blender/src/main/resources/__init__.py | 1 | 3191 | #
# Copyright © 2016 <code@io7m.com> http://io7m.com
#
# 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 AUTH... | isc |
rbarlow/pulp | client_lib/pulp/client/commands/repo/history.py | 17 | 7546 | """
Commands for showing a repository's sync and publish history
"""
from gettext import gettext as _
from pulp.client.commands.options import OPTION_REPO_ID
from pulp.client.extensions.extensions import PulpCliOption, PulpCliFlag, PulpCliCommand
from pulp.client import validators
# The default limit on the number ... | gpl-2.0 |
nathanaevitas/odoo | openerp/addons/hr_recruitment/res_config.py | 352 | 3627 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-Today OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | agpl-3.0 |
joelfrederico/SciSalt | scisalt/qt/mplwidget.py | 1 | 13557 | from PyQt4 import QtGui
from PyQt4 import QtCore
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as _FigureCanvas
from matplotlib.backends.backend_qt4 import NavigationToolbar2QT as _NavigationToolbar
import matplotlib as _mpl
import numpy as _np
from .Rectangle import Rectangle
import pdb
import tra... | mit |
wangyixiaohuihui/spark2-annotation | python/pyspark/streaming/flume.py | 1 | 6047 | #
# 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 n... | apache-2.0 |
Alwnikrotikz/hooke | mfp_igor_scripts/FMjoin.py | 1 | 1503 | #!/usr/bin/env python
'''
FMjoin.py
Copies all .ibw files contained in a folder and its subfolders into a single folder. Useful for force maps.
Usage:
python FMjoin.py origindir destdir
Alberto Gomez-Casado (c) 2010, University of Twente (The Netherlands)
This program is released under the GNU General Public Licen... | lgpl-3.0 |
Yong-Lee/django | django/core/management/commands/squashmigrations.py | 132 | 7265 | from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.db import DEFAULT_DB_ALIAS, connections, migrations
from django.db.migrations.loader import AmbiguityError, MigrationLoader
from django.db.migrations.migration import SwappableTuple
from django.db.migrations.o... | bsd-3-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.