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 |
|---|---|---|---|---|---|
SmartCash/smartcash | contrib/seeds/generate-seeds.py | 1 | 4382 | #!/usr/bin/python
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Script to generate list of seed nodes for chainparams.cpp.
This script expects two text files in the directory tha... | mit |
Kamp9/scipy | scipy/weave/tests/test_scxx_dict.py | 61 | 8775 | """ Test refcounting and behavior of SCXX.
"""
from __future__ import absolute_import, print_function
import sys
from numpy.testing import TestCase, assert_, assert_raises, run_module_suite
from scipy.weave import inline_tools
from weave_test_utils import dec
class TestDictConstruct(TestCase):
#--------------... | bsd-3-clause |
ioanpocol/superdesk-core | superdesk/io/io_errors.py | 9 | 1848 | # -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
import loggi... | agpl-3.0 |
andresgz/django | tests/admin_custom_urls/tests.py | 276 | 6381 | from __future__ import unicode_literals
import datetime
from django.contrib.admin.utils import quote
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.template.response import TemplateResponse
from django.test import TestCase, override_settings
from .models import A... | bsd-3-clause |
mathandy/Classifiers2LearnWith | experiments/vgg16_pre-trained/vgg16_pre-trained.py | 1 | 9463 | """A pre-trained implimentation of VGG16 with weights trained on ImageNet."""
##########################################################################
# Special thanks to
# http://www.cs.toronto.edu/~frossard/post/vgg16/
# for converting the caffe VGG16 pre-trained weights to TensorFlow
# this file is essentially ju... | mit |
wagnerand/zamboni | services/utils.py | 5 | 5244 | from datetime import datetime, timedelta
import dictconfig
import logging
import os
# get the right settings module
settingmodule = os.environ.get('DJANGO_SETTINGS_MODULE', 'settings_local')
if settingmodule.startswith(('zamboni', # typical git clone destination
'workspace', # Jenkins
... | bsd-3-clause |
flh/odoo | openerp/addons/base/report/preview_report.py | 447 | 1457 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2011 OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of... | agpl-3.0 |
jimsimon/sky_engine | build/android/pylib/instrumentation/instrumentation_parser_test.py | 79 | 4061 | #!/usr/bin/env python
# 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.
"""Unit tests for instrumentation.InstrumentationParser."""
import unittest
from pylib.instrumentation import instrumentation_parser... | bsd-3-clause |
bigoldboy/repository.bigoldboy | plugin.video.VADER/unidecode/x0c6.py | 253 | 4490 | data = (
'yeoss', # 0x00
'yeong', # 0x01
'yeoj', # 0x02
'yeoc', # 0x03
'yeok', # 0x04
'yeot', # 0x05
'yeop', # 0x06
'yeoh', # 0x07
'ye', # 0x08
'yeg', # 0x09
'yegg', # 0x0a
'yegs', # 0x0b
'yen', # 0x0c
'yenj', # 0x0d
'yenh', # 0x0e
'yed', # 0x0f
'yel', # 0x10
'yelg', ... | gpl-3.0 |
burgerdev/volumina | volumina/utility/preferencesManager.py | 1 | 4045 | ###############################################################################
# volumina: volume slicing and editing library
#
# Copyright (C) 2011-2014, the ilastik developers
# <team@ilastik.org>
#
# This program is free software; you can redistribute it and/or
# modify it und... | lgpl-3.0 |
pydanny/dj-stripe | tests/test_source.py | 1 | 3473 | """
dj-stripe Card Model Tests.
"""
import sys
from copy import deepcopy
from unittest.mock import patch
from django.contrib.auth import get_user_model
from django.test import TestCase
from djstripe.models import Source
from . import (
FAKE_CUSTOMER_III,
FAKE_SOURCE,
FAKE_SOURCE_II,
AssertStripeFksMi... | bsd-3-clause |
MSusik/invenio | invenio/legacy/bibexport/templates.py | 4 | 29937 | # -*- coding: utf-8 -*-
## $Id: webmessage_templates.py,v 1.32 2008/03/26 23:26:23 tibor Exp $
##
## handles rendering of webmessage module
##
## This file is part of Invenio.
## Copyright (C) 2009, 2010, 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU G... | gpl-2.0 |
felipenaselva/felipe.repository | script.module.requests/lib/requests/__init__.py | 35 | 2197 | # -*- coding: utf-8 -*-
# __
# /__) _ _ _ _ _/ _
# / ( (- (/ (/ (- _) / _)
# /
"""
Requests HTTP library
~~~~~~~~~~~~~~~~~~~~~
Requests is an HTTP library, written in Python, for human beings. Basic GET
usage:
>>> import requests
>>> r = requests.get('https://www.python.org')
>>> ... | gpl-2.0 |
odoo-turkiye/odoo | openerp/addons/base/ir/ir_exports.py | 338 | 1672 | # -*- 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 |
fbradyirl/home-assistant | homeassistant/components/spc/__init__.py | 4 | 2160 | """Support for Vanderbilt (formerly Siemens) SPC alarm systems."""
import logging
import voluptuous as vol
from homeassistant.helpers import discovery, aiohttp_client
from homeassistant.helpers.dispatcher import async_dispatcher_send
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__... | apache-2.0 |
Mause/pyalp | pyalp/gs_interface/interface.py | 1 | 2747 | from os.path import join, dirname
HERE = dirname(__file__)
import logging
from apps.tournaments.models import Server, GameRequest
from .rpc_client import get_interface
import yaml
resource_load = lambda name: yaml.load(open(
join(HERE, 'resources', name)
))
game_ports = resource_load('game_ports.yaml')
game_nam... | mit |
dsnopek/anki-sync-server | AnkiServer/find.py | 2 | 1252 |
# AnkiServer - A personal Anki sync server
# Copyright (C) 2013 David Snopek
#
# 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 Software Foundation, either version 3 of the
# License, or (at your option) any... | agpl-3.0 |
rickyHong/Tensorflow_modi | tensorflow/python/training/learning_rate_decay_test.py | 5 | 2216 | """Functional test for learning rate decay."""
import tensorflow.python.platform
from tensorflow.python.framework import test_util
from tensorflow.python.framework import types
from tensorflow.python.ops import state_ops
from tensorflow.python.ops import variables
from tensorflow.python.platform import googletest
from... | apache-2.0 |
mapr/hue | desktop/core/ext-py/Django-1.6.10/django/db/models/query_utils.py | 112 | 7415 | """
Various data structures used in query construction.
Factored out from django.db.models.query to avoid making the main module very
large and/or so that they can be used by other modules without getting into
circular import difficulties.
"""
from __future__ import unicode_literals
from django.db.backends import uti... | apache-2.0 |
guziy/basemap | setup.py | 1 | 6013 | from __future__ import (absolute_import, division, print_function)
import glob
import io
import os
import sys
from setuptools.dist import Distribution
if sys.version_info < (2, 6):
raise SystemExit("""matplotlib and the basemap toolkit require Python 2.6 or later.""")
# Do not require numpy for just querying the... | gpl-2.0 |
luoyetx/mxnet | example/reinforcement-learning/parallel_actor_critic/envs.py | 52 | 1875 | # 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 |
alexandrul-ci/robotframework | src/robot/utils/normalizing.py | 1 | 3987 | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework 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
... | apache-2.0 |
joshishungry/artificial_intel | assignments/lab4/map_coloring_csp.py | 1 | 2656 | #!/usr/bin/env python
"""
Implementation of the Map coloring problem from 2006 Quiz 2
"""
import sys
from csp import CSP, Variable, BinaryConstraint, solve_csp_problem, \
basic_constraint_checker
def map_coloring_csp_problem():
constraints = []
variables = []
# order of the variables here is the order... | apache-2.0 |
cjhak/b2share | invenio/testsuite/test_utils_text.py | 17 | 30486 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2008, 2009, 2010, 2011, 2013, 2014 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,... | gpl-2.0 |
jalavik/invenio-deposit | tests/helpers.py | 7 | 5022 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2014 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... | gpl-2.0 |
benspaulding/django | tests/regressiontests/localflavor/ca/tests.py | 13 | 3883 | from __future__ import unicode_literals
import warnings
from django.contrib.localflavor.ca.forms import (CAPostalCodeField,
CAPhoneNumberField, CAProvinceField, CAProvinceSelect,
CASocialInsuranceNumberField)
from django.test import SimpleTestCase
class CALocalFlavorTests(SimpleTestCase):
def s... | bsd-3-clause |
aequitas/home-assistant | homeassistant/auth/permissions/merge.py | 12 | 1826 | """Merging of policies."""
from typing import ( # noqa: F401
cast, Dict, List, Set)
from .types import PolicyType, CategoryType
def merge_policies(policies: List[PolicyType]) -> PolicyType:
"""Merge policies."""
new_policy = {} # type: Dict[str, CategoryType]
seen = set() # type: Set[str]
for ... | apache-2.0 |
grnet/synnefo | snf-astakos-app/astakos/quotaholder_app/migrations/old/0008_reduce_bigint.py | 10 | 4585 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
MAX = 2**63 - 1
class Migration(DataMigration):
def forwards(self, orm):
orm.Provision.objects.filter(quantity__gt=MAX).update(quantity=MAX)
orm.Holding.objects.filter(u... | gpl-3.0 |
kenshay/ImageScripter | ProgramData/SystemFiles/Python/Lib/site-packages/skimage/graph/tests/test_flexible.py | 3 | 1697 | import numpy as np
import skimage.graph.mcp as mcp
from skimage._shared.testing import assert_array_equal
a = np.ones((8, 8), dtype=np.float32)
a[1::2] *= 2.0
class FlexibleMCP(mcp.MCP_Flexible):
""" Simple MCP subclass that allows the front to travel
a certain distance from the seed point, and uses a con... | gpl-3.0 |
LEXmono/q | docutils/languages/__init__.py | 170 | 1626 | # $Id: __init__.py 7648 2013-04-18 07:36:22Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
# Internationalization details are documented in
# <http://docutils.sf.net/docs/howto/i18n.html>.
"""
This package contains modules for language-dependent fe... | apache-2.0 |
ianrenton/playbulb-tools | weathercheck/weathercheck.py | 1 | 1370 | # Python script to set a Playbulb LED colour based on the current weather.
# Run me as a cron job for ambient weather information!
# by Ian Renton
# https://github.com/ianrenton/playbulb-tools
# Uses python OpenWeatherMap wrapper from https://github.com/csparpa/pyowm
import pyowm, re, subprocess
#### Config ####
# Y... | bsd-3-clause |
gogoair/foremast | src/foremast/securitygroup/create_securitygroup.py | 1 | 11172 | # Foremast - Pipeline Tooling
#
# Copyright 2018 Gogo, 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
#
# Unless required... | apache-2.0 |
YuepengGuo/zipline | zipline/history/history.py | 11 | 11707 | #
# Copyright 2014 Quantopian, 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 |
zahari/samba | python/samba/tests/samba_tool/group.py | 42 | 7464 | # Unix SMB/CIFS implementation.
# Copyright (C) Michael Adam 2012
#
# 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.
#
# ... | gpl-3.0 |
arokem/nipype | nipype/interfaces/spm/tests/test_auto_CreateWarped.py | 12 | 1298 | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.spm.preprocess import CreateWarped
def test_CreateWarped_inputs():
input_map = dict(flowfield_files=dict(copyfile=False,
field='crt_warped.flowfields',
mandatory=True,
),
ignore_exce... | bsd-3-clause |
Alpistinho/FreeCAD | src/Mod/Ship/shipCreateShip/__init__.py | 52 | 1825 | #***************************************************************************
#* *
#* Copyright (c) 2011, 2012 *
#* Jose Luis Cercos Pita <jlcercos@gmail.com> *
#* ... | lgpl-2.1 |
olituks/sentinella | frontend/library/tornado/tcpclient.py | 37 | 6668 | #!/usr/bin/env python
#
# Copyright 2014 Facebook
#
# 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... | lgpl-2.1 |
nsalomonis/AltAnalyze | stats_scripts/mpmath/functions/elliptic.py | 3 | 38394 | r"""
Elliptic functions historically comprise the elliptic integrals
and their inverses, and originate from the problem of computing the
arc length of an ellipse. From a more modern point of view,
an elliptic function is defined as a doubly periodic function, i.e.
a function which satisfies
.. math ::
f(z + 2 \om... | apache-2.0 |
brian-cleary/LatentStrainAnalysis | LSA/streaming_eigenhashes.py | 3 | 6347 | import numpy as np
from scipy.spatial import distance
from gensim import models
import logging
from collections import defaultdict
from multiprocessing import Pool
from operator import itemgetter
from LSA import LSA
from hyper_sequences import Hyper_Sequences
from hash_counting import Hash_Counting
class StreamingEige... | mit |
xkollar/spacewalk | rel-eng/zanata/poparser.py | 3 | 4837 | #!/usr/bin/python
#
# Copyright (c) 2016 Red Hat, Inc.
#
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should hav... | gpl-2.0 |
jhawkesworth/ansible | lib/ansible/modules/cloud/azure/azure_rm_devtestlabpolicy.py | 11 | 13526 | #!/usr/bin/python
#
# Copyright (c) 2019 Zim Kalinowski, (@zikalino)
#
# 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 |
chugunovyar/factoryForBuild | env/lib/python2.7/site-packages/matplotlib/sphinxext/mathmpl.py | 12 | 3822 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
import os
import sys
from hashlib import md5
from docutils import nodes
from docutils.parsers.rst import directives
import warnings
from matplotlib import rcParams
from matplotlib.mathtext import ... | gpl-3.0 |
ReactiveX/RxPY | rx/core/operators/merge.py | 1 | 4401 | from typing import Callable, Optional
import rx
from rx import from_future
from rx.core import Observable
from rx.disposable import CompositeDisposable, SingleAssignmentDisposable
from rx.internal.concurrency import synchronized
from rx.internal.utils import is_future
def _merge(*sources: Observable,
max_... | mit |
Nikoala/CouchPotatoServer | libs/pyutil/test/current/json_tests/test_pass1.py | 106 | 1814 | from unittest import TestCase
from pyutil import jsonutil as json
# from http://json.org/JSON_checker/test/pass1.json
JSON = r'''
[
"JSON Test Pattern pass1",
{"object with 1 member":["array with 1 element"]},
{},
[],
-42,
true,
false,
null,
{
"integer": 1234567890,
... | gpl-3.0 |
daviddupont69/CouchPotatoServer | couchpotato/core/media/movie/_base/main.py | 3 | 19699 | from couchpotato import get_session
from couchpotato.api import addApiView
from couchpotato.core.event import fireEvent, fireEventAsync, addEvent
from couchpotato.core.helpers.encoding import toUnicode
from couchpotato.core.helpers.variable import getImdb, splitString, tryInt, \
mergeDicts
from couchpotato.core.log... | gpl-3.0 |
denverdino/compose | tests/unit/cli/command_test.py | 5 | 2609 | from __future__ import absolute_import
from __future__ import unicode_literals
import os
import ssl
import pytest
from compose.cli.command import get_config_path_from_options
from compose.cli.command import get_tls_version
from compose.config.environment import Environment
from compose.const import IS_WINDOWS_PLATFO... | apache-2.0 |
andyliuliming/azure-linux-extensions | CustomScript/azure/storage/__init__.py | 46 | 26885 | #-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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.apac... | apache-2.0 |
BT-fgarbely/e-commerce | __unported__/sale_automatic_workflow_exception/__init__.py | 20 | 1043 | # -*- coding: utf-8 -*-
###############################################################################
#
# Module for OpenERP
# Copyright (C) 2014 Akretion (http://www.akretion.com).
# @author Sébastien BEAU <sebastien.beau@akretion.com>
#
# This program is free software: you can redistribute it and/or modify
... | agpl-3.0 |
chesterbarryang/odoo_ultrasteel | stock_ownership_availability_rules/__openerp__.py | 1 | 1316 | # -*- coding: utf-8 -*-
# Author: Leonardo Pistone
# Copyright 2014 Camptocamp SA
#
# 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 Software Foundation, either version 3 of the
# License, or... | lgpl-3.0 |
837468220/python-for-android | python3-alpha/python3-src/Lib/lib2to3/fixes/fix_raise.py | 203 | 2926 | """Fixer for 'raise E, V, T'
raise -> raise
raise E -> raise E
raise E, V -> raise E(V)
raise E, V, T -> raise E(V).with_traceback(T)
raise E, None, T -> raise E.with_traceback(T)
raise (((E, E'), E''), E'''), V -> raise E(V)
raise "foo", V, T -> warns about string exceptions
CAVEATS:... | apache-2.0 |
dlab-berkeley/collaboratool-archive | bsd2/vagrant-ansible/ansible/test/TestUtils.py | 2 | 15721 | # -*- coding: utf-8 -*-
import unittest
import os
import os.path
import tempfile
from nose.plugins.skip import SkipTest
import ansible.utils
import ansible.utils.template as template2
class TestUtils(unittest.TestCase):
#####################################
### varReplace function tests
def test_varRe... | apache-2.0 |
paplorinc/intellij-community | python/testData/inspections/PyStringFormatInspection/NewStyleStringRegularExpression.py | 38 | 1106 | class JustAClass:
def __init__(self):
# Non-mobile videos: for the old pages
self.nonMobileVideoItemRegex = 'src="(?<Image>[^"]+)"\W+>(?<Premium><div class="not-' \
'available-image-overlay">)?[\w\W]{0,500}?</a></div>\W*' \
... | apache-2.0 |
loco-odoo/localizacion_co | openerp/addons-extra/odoo-pruebas/odoo-server/addons/auth_crypt/__init__.py | 435 | 1050 | ##############################################################################
#
# 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 GNU Affero General Publ... | agpl-3.0 |
yd0str/infernal-twin | build/pip/build/lib.linux-i686-2.7/pip/_vendor/html5lib/ihatexml.py | 1727 | 16581 | from __future__ import absolute_import, division, unicode_literals
import re
import warnings
from .constants import DataLossWarning
baseChar = """
[#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] | [#x00D8-#x00F6] |
[#x00F8-#x00FF] | [#x0100-#x0131] | [#x0134-#x013E] | [#x0141-#x0148] |
[#x014A-#x017E] | [#x0180-... | gpl-3.0 |
ioam/paramtk | paramtk/odict.py | 1 | 46083 | from __future__ import generators
# odict.py
# An Ordered Dictionary object
# Copyright (C) 2005 Nicola Larosa, Michael Foord
# E-mail: nico AT tekNico DOT net, fuzzyman AT voidspace DOT org DOT uk
# This software is licensed under the terms of the BSD license.
# http://www.voidspace.org.uk/python/license.shtml
# Bas... | bsd-3-clause |
martynovp/edx-platform | lms/djangoapps/verify_student/tests/test_ssencrypt.py | 101 | 3623 | import base64
from nose.tools import assert_equals
from verify_student.ssencrypt import (
aes_decrypt, aes_encrypt, encrypt_and_encode, decode_and_decrypt,
rsa_decrypt, rsa_encrypt
)
def test_aes():
key_str = "32fe72aaf2abb44de9e161131b5435c8d37cbdb6f5df242ae860b283115f2dae"
key = key_str.decode("hex... | agpl-3.0 |
drichner/docklr | docklr_tests.py | 1 | 2273 | __author__ = 'drichner'
"""
docklr -- docklr_tests.py
Copyright (C) 2014 Dan Richner
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 v... | gpl-2.0 |
SPKian/Testing | erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py | 44 | 4811 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import flt
def execute(filters=None):
if not filters: filters = {}
columns = get_columns()
last... | agpl-3.0 |
murfz/Sick-Beard | sickbeard/name_cache.py | 44 | 2335 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard 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 t... | gpl-3.0 |
Rosebotics/pymata-aio | examples/sparkfun_redbot/sparkfun_experiments/Exp5_Bumpers.py | 1 | 2908 | #!/usr/bin/python
"""
Exp5_Bumpers -- RedBot Experiment 5
Now let's experiment with the whisker bumpers. These super-simple switches
let you detect a collision before it really happens- the whisker will
bump something before your robot crashes into it.
This sketch was written by SparkFun Electronics, with l... | gpl-3.0 |
juanwmedia/esattodolist | plugins/ti.alloy/plugin.py | 1729 | 5251 | import os, sys, subprocess, hashlib
import subprocess
def check_output(*popenargs, **kwargs):
r"""Run command with arguments and return its output as a byte string.
Backported from Python 2.7 as it's implemented as pure python on stdlib.
>>> check_output(['/usr/bin/python', '--version'])
Python 2.6.... | apache-2.0 |
pgr-me/metis_projects | 04-marijuana/library/utilities.py | 1 | 3623 | from nytimesarticle import articleAPI
import collections
import math
import datetime
import re
import pickle
# api keys
prasmuss = '7b4597b0dc6845688a8f90c00f3e60b6'
peter_gray_rasmussen = '67391c8a5c6c2d8926eb3d9c5d136c59:7:72273330'
proton = 'f8c34c7cda7848f997a9c273815d28a9'
api = articleAPI(proton)
def convert(d... | gpl-3.0 |
pylayers/pylayers | pylayers/antprop/examples/ex_signature.py | 3 | 3411 | #!/usr/bin/python
#-*- coding:Utf-8 -*-
import matplotlib.pyplot as plt
import numpy as np
import networkx as nx
from pylayers.gis.layout import *
from pylayers.antprop.signature import *
# load the layout graphs
def showr2(L,r2d,tx,rx,k,l):
col = ['r','b','g','c','m','k','y']
r = r2d[str(k)]
pts = r['pt'... | mit |
rafaelsierra/django-metadata | metadata/settings.py | 2 | 2924 | # Django settings for metadata project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'metada... | bsd-3-clause |
rwillmer/django | tests/file_storage/tests.py | 199 | 31638 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import errno
import os
import shutil
import sys
import tempfile
import threading
import time
import unittest
import warnings
from datetime import datetime, timedelta
from django.core.cache import cache
from django.core.exceptions import SuspiciousFileOpe... | bsd-3-clause |
traveloka/ansible | lib/ansible/playbook/task.py | 17 | 16666 | # (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 |
willworth/thermos | thermos/Lib/site-packages/pip/_vendor/requests/packages/chardet/cp949prober.py | 2801 | 1782 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | mit |
gmelenka/BraidedCompositeDesign | main.py | 1 | 49822 | from kivy.app import App
from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.gridlayout import GridLayout
from kivy.uix.floatlayout import FloatLayout
from kivy.properties import ObjectProperty
from kivy.uix.spinner import Spinner
from kivy.uix.listview import ListItemButton
from kivy.... | mit |
adw0rd/lettuce | tests/integration/lib/Django-1.3/django/test/utils.py | 185 | 3644 | import sys
import time
import os
import warnings
from django.conf import settings
from django.core import mail
from django.core.mail.backends import locmem
from django.test import signals
from django.template import Template
from django.utils.translation import deactivate
__all__ = ('Approximate', 'ContextList', 'setu... | gpl-3.0 |
aldian/tensorflow | tensorflow/python/estimator/inputs/queues/feeding_functions_test.py | 59 | 13552 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
Thoshh/wapad | lib/python2.7/site-packages/django/views/csrf.py | 437 | 5057 | from django.conf import settings
from django.http import HttpResponseForbidden
from django.template import Context, Engine
from django.utils.translation import ugettext as _
from django.utils.version import get_docs_version
# We include the template inline since we need to be able to reliably display
# this error mes... | mit |
40223119/2015w13-1 | static/Brython3.1.3-20150514-095342/Lib/fnmatch.py | 894 | 3163 | """Filename matching with shell patterns.
fnmatch(FILENAME, PATTERN) matches according to the local convention.
fnmatchcase(FILENAME, PATTERN) always takes case in account.
The functions operate by translating the pattern into a regular
expression. They cache the compiled regular expressions for speed.
The function... | gpl-3.0 |
CouchPotato/CouchPotatoServer | libs/suds/xsd/sxbasic.py | 197 | 22829 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser 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 hope that it will ... | gpl-3.0 |
ayumilove/shadowsocks | setup.py | 929 | 1321 | import codecs
from setuptools import setup
with codecs.open('README.rst', encoding='utf-8') as f:
long_description = f.read()
setup(
name="shadowsocks",
version="2.8.2",
license='http://www.apache.org/licenses/LICENSE-2.0',
description="A fast tunnel proxy that help you get through firewalls",
... | apache-2.0 |
marcoscaceres/bedrock | bedrock/events/models.py | 10 | 5046 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from datetime import datetime
from django.conf import settings
from django.db import models
from django.db.models.query... | mpl-2.0 |
sputnick-dev/weboob | weboob/tools/misc.py | 4 | 4199 | # -*- coding: utf-8 -*-
# Copyright(C) 2010-2014 Romain Bignon
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your... | agpl-3.0 |
indianajohn/ycmd | ycmd/tests/server_utils_test.py | 1 | 1633 | # Copyright (C) 2016 ycmd contributors
#
# This file is part of ycmd.
#
# ycmd 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.
#
# ycmd... | gpl-3.0 |
jendap/tensorflow | tensorflow/python/kernel_tests/random/multinomial_op_test.py | 36 | 10147 | # 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 |
dneg/gaffer | python/GafferSceneTest/SceneReadWriteTest.py | 4 | 11543 | ##########################################################################
#
# Copyright (c) 2013, Image Engine Design 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:
#
# * Red... | bsd-3-clause |
jiachenning/odoo | addons/purchase_requisition/wizard/purchase_requisition_partner.py | 373 | 2320 | # -*- 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 |
teto/i3pystatus | i3pystatus/exmo.py | 8 | 2892 | # -*- coding: utf-8 -*-
import requests
from i3pystatus import IntervalModule, formatp
from i3pystatus.core.util import internet, require, user_open
class Exmo(IntervalModule):
"""
This module fetching and displays exchange rates with EXMO.
Using API <https://exmo.me/en/api>.
.. rubric:: Available ... | mit |
KDBk/lan-sync-controller | lan_sync_controller/discovery.py | 2 | 4551 | from __future__ import absolute_import, division, print_function
import errno
import logging
import math
import socket
import scapy.config
import scapy.layers.l2
import scapy.route
from scapy.all import *
from lan_sync_controller.config_loader import SETTINGS
LOG = logging.getLogger(__name__)
def long2net(arg):
... | mit |
Rusk85/pyload | module/plugins/hooks/RealdebridCom.py | 3 | 1138 | # -*- coding: utf-8 -*-
from module.network.RequestFactory import getURL
from module.plugins.internal.MultiHoster import MultiHoster
class RealdebridCom(MultiHoster):
__name__ = "RealdebridCom"
__version__ = "0.43"
__type__ = "hook"
__config__ = [("activated", "bool", "Activated", "False"),
... | gpl-3.0 |
ArcherSys/ArcherSys | Lib/site-packages/win32comext/adsi/demos/scp.py | 6 | 19531 | """A re-implementation of the MS DirectoryService samples related to services.
* Adds and removes an ActiveDirectory "Service Connection Point",
including managing the security on the object.
* Creates and registers Service Principal Names.
* Changes the username for a domain user.
Some of these functions are likel... | mit |
softlayer/softlayer-python | SoftLayer/CLI/order/quote_detail.py | 3 | 1092 | """View a quote"""
# :license: MIT, see LICENSE for more details.
import click
from SoftLayer.CLI import environment
from SoftLayer.CLI import formatting
from SoftLayer.managers import ordering
from SoftLayer.utils import lookup
@click.command()
@click.argument('quote')
@environment.pass_env
def cli(env, quote):
... | mit |
chatcannon/numpy | numpy/core/info.py | 99 | 4692 | """Defines a multi-dimensional array and useful procedures for Numerical computation.
Functions
- array - NumPy Array construction
- zeros - Return an array of all zeros
- empty - Return an uninitialized array
- shape - Return... | bsd-3-clause |
SergeyPirogov/ghost | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/styles/trac.py | 364 | 1933 | # -*- coding: utf-8 -*-
"""
pygments.styles.trac
~~~~~~~~~~~~~~~~~~~~
Port of the default trac highlighter design.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.style import Style
from pygments.token import Keyword, Na... | mit |
rpetrenko/test-reporter | server/api/common.py | 1 | 1323 | # This source code is licensed under the Apache license found in the
# LICENSE file in the root directory of this project.
import logging
from flask_restplus import Api
from server import settings
from bson import json_util
import json
log = logging.getLogger(__name__)
api = Api(version='1.0',
title='Test... | apache-2.0 |
adamnew123456/lnsd | lns/daemon.py | 2 | 5266 | '''
***
Modified generic daemon class
***
Author: http://www.jejik.com/articles/2007/02/
a_simple_unix_linux_daemon_in_python/www.boxedice.com
License: http://creativecommons.org/licenses/by-sa/3.0/
Changes: 23rd Jan 2009 (David Mytton <david@boxedice.com>)
... | bsd-2-clause |
duanyp1991/purchase-workflow | purchase_requisition_multicurrency/__openerp__.py | 1 | 1212 | # -*- coding: utf-8 -*-
#
#
# Author: Yannick Vaucher
# Copyright 2014 Camptocamp SA
#
# 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 Software Foundation, either version 3 of the
# License,... | agpl-3.0 |
jjz/mezzanine | mezzanine/blog/management/commands/import_posterous.py | 36 | 4392 | from __future__ import unicode_literals
from datetime import datetime
import json
import time
from optparse import make_option
from django.core.management.base import CommandError
from mezzanine.blog.management.base import BaseImporterCommand
class Command(BaseImporterCommand):
"""
Import Tumblr blog posts... | bsd-2-clause |
bolkedebruin/airflow | airflow/hooks/docker_hook.py | 1 | 1156 | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | apache-2.0 |
sapiippo/git-repo | subcmds/abandon.py | 48 | 2034 | #
# Copyright (C) 2008 The Android Open Source Project
#
# 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 la... | apache-2.0 |
dequis/qtile | libqtile/layout/ratiotile.py | 3 | 13225 | # -*- coding:utf-8 -*-
# Copyright (c) 2011 Florian Mounier
# Copyright (c) 2012-2013, 2015 Tycho Andersen
# Copyright (c) 2013 Björn Lindström
# Copyright (c) 2013 Tao Sauvage
# Copyright (c) 2014 ramnes
# Copyright (c) 2014 Sean Vig
# Copyright (c) 2014 dmpayton
# Copyright (c) 2014 dequis
#
# Permission is hereby gr... | mit |
pplonski/keras2cpp | dump_to_simple_cpp.py | 1 | 3089 | import numpy as np
np.random.seed(1337)
from keras.models import Sequential, model_from_json
import json
import argparse
np.set_printoptions(threshold=np.inf)
parser = argparse.ArgumentParser(description='This is a simple script to dump Keras model into simple format suitable for porting into pure C++ model')
parser.... | mit |
MiLk/ansible | lib/ansible/module_utils/facts/system/local.py | 144 | 3138 | # 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 that ... | gpl-3.0 |
pomegranited/edx-platform | common/lib/xmodule/xmodule/mako_module.py | 135 | 1978 | """
Code to handle mako templating for XModules and XBlocks.
"""
from xblock.fragment import Fragment
from .x_module import XModuleDescriptor, DescriptorSystem, shim_xmodule_js
class MakoDescriptorSystem(DescriptorSystem):
def __init__(self, render_template, **kwargs):
super(MakoDescriptorSystem, self)._... | agpl-3.0 |
qinjian623/emacs-config | .python-environments/default/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/sbcsgroupprober.py | 2936 | 3291 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | gpl-3.0 |
batxes/4Cin | Six_zebra_models/Six_zebra_models_final_output_0.1_-0.1_13000/mtx1_models/Six_zebra_models45324.py | 4 | 13906 | import _surface
import chimera
try:
import chimera.runCommand
except:
pass
from VolumePath import markerset as ms
try:
from VolumePath import Marker_Set, Link
new_marker_set=Marker_Set
except:
from VolumePath import volume_path_dialog
d= volume_path_dialog(True)
new_marker_set= d.new_marker_set
marker_set... | gpl-3.0 |
aabbox/kbengine | kbe/res/scripts/common/Lib/test/test_hmac.py | 84 | 20691 | import functools
import hmac
import hashlib
import unittest
import warnings
from test import support
def ignore_warning(func):
@functools.wraps(func)
def wrapper(*args, **kwargs):
with warnings.catch_warnings():
warnings.filterwarnings("ignore",
category... | lgpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.