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 |
|---|---|---|---|---|---|
vitmod/enigma2-1 | lib/python/Components/config.py | 1 | 53976 | from enigma import getPrevAsciiCode
from Tools.NumericalTextInput import NumericalTextInput
from Tools.Directories import resolveFilename, SCOPE_CONFIG, fileExists
from Components.Harddisk import harddiskmanager
from copy import copy as copy_copy
from os import path as os_path
from time import localtime, strftime
# Co... | gpl-2.0 |
ZachGoldberg/django-oscar-paypal | docs/conf.py | 9 | 8265 | # -*- coding: utf-8 -*-
#
# django-oscar-paypal documentation build configuration file, created by
# sphinx-quickstart on Wed Aug 22 20:12:56 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated f... | bsd-3-clause |
untitaker/vdirsyncer | vdirsyncer/sync/__init__.py | 1 | 11708 | # -*- coding: utf-8 -*-
'''
The `sync` function in `vdirsyncer.sync` can be called on two instances of
`Storage` to synchronize them. Apart from the defined errors, this is the only
public API of this module.
The algorithm is based on the blogpost "How OfflineIMAP works" by Edward Z.
Yang: http://blog.ezyang.com/2012/... | mit |
ravindrapanda/tensorflow | tensorflow/python/profiler/tfprof_logger_test.py | 52 | 2982 | # 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 |
YOTOV-LIMITED/kuma | vendor/packages/pygments/lexers/c_cpp.py | 72 | 9415 | # -*- coding: utf-8 -*-
"""
pygments.lexers.c_cpp
~~~~~~~~~~~~~~~~~~~~~
Lexers for C/C++ languages.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, include, bygroups, using, \
this... | mpl-2.0 |
automl/SpySMAC | cave/analyzer/base_analyzer.py | 1 | 5492 | import logging
from collections import OrderedDict
from typing import Tuple
from bokeh.io import output_notebook
from bokeh.plotting import show
from cave.html.html_builder import HTMLBuilder
from cave.reader.runs_container import RunsContainer
from cave.utils.exceptions import Deactivated
class BaseAnalyzer(object... | bsd-3-clause |
lizardsystem/lizard5-apps | lizard_rainapp/views.py | 1 | 5811 | # (c) Nelen & Schuurmans. GPL licensed, see LICENSE.rst.
# -*- coding: utf-8 -*-
"""Views for the RainApp, mostly a page to upload new region shapefiles."""
# Python 3 is coming
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import
from __future__ import... | lgpl-3.0 |
mrshelly/openerp71313 | openerp/modules/loading.py | 1 | 19716 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you ca... | agpl-3.0 |
negativo/magic-wormhole | src/wormhole/wordlist.py | 5 | 9117 |
# The PGP Word List, which maps bytes to phonetically-distinct words. There
# are two lists, even and odd, and encodings should alternate between then to
# detect dropped words. https://en.wikipedia.org/wiki/PGP_Words
# Thanks to Warren Guy for transcribing them:
# https://github.com/warrenguy/javascript-pgp-word-lis... | mit |
jamesbdunlop/Nucleolus | nebula_ui/nMayaui_core/colorSelector.py | 2 | 4394 | import logging, sys
from PySide2.QtGui import *
from PySide2.QtCore import *
from PySide2.QtWidgets import *
from PySide2.QtCore import Signal
from functools import partial
logging.basicConfig()
logger = logging.getLogger(__name__)
class ColorSelector(QWidget):
mayaColorIndex = Signal(int)
def __init__(self... | apache-2.0 |
xigt/freki | freki/text2freki.py | 1 | 6059 | from freki.serialize import FrekiDoc, FrekiBlock, FrekiLine
import codecs
import re
import chardet
import logging
import argparse
def run(args):
frek = read_and_convert(args.infile, args.igtfile, args.encoding, args.detect)
out = open(args.outfile, 'w', encoding='utf8')
out.write(str(frek))
def convert_... | mit |
matthiasdiener/spack | lib/spack/external/py/_code/code.py | 23 | 27441 | import py
import sys
from inspect import CO_VARARGS, CO_VARKEYWORDS
builtin_repr = repr
reprlib = py.builtin._tryimport('repr', 'reprlib')
if sys.version_info[0] >= 3:
from traceback import format_exception_only
else:
from py._code._py2traceback import format_exception_only
class Code(object):
""" wrapp... | lgpl-2.1 |
litecoinxt/litecoinxt | qa/rpc-tests/txn_doublespend.py | 152 | 4968 | #!/usr/bin/env python2
# Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test proper accounting with malleable transactions
#
from test_framework import BitcoinTestFramework
from... | mit |
rldhont/Quantum-GIS | tests/src/python/test_qgssymbollayer_readsld.py | 30 | 17835 | # -*- coding: utf-8 -*-
"""
***************************************************************************
test_qgssymbollayer_readsld.py
---------------------
Date : January 2017
Copyright : (C) 2017, Jorge Gustavo Rocha
Email : jgr at di dot uminho dot pt
**... | gpl-2.0 |
guorendong/iridium-browser-ubuntu | third_party/chromite/scripts/cros_generate_local_binhosts.py | 2 | 2585 | # Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Script for calculating compatible binhosts.
Generates a file that sets the specified board's binhosts to include all of the
other compatible board... | bsd-3-clause |
deadc0de6/pyircbot | libirc.py | 1 | 18336 | # author: deadc0de6
# contact: https://github.com/deadc0de6
#
# python IRC library
#
# Copyright (C) 2015 deadc0de6
# 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 Lice... | gpl-2.0 |
druuu/django | django/db/backends/sqlite3/introspection.py | 204 | 11332 | import re
from collections import namedtuple
from django.db.backends.base.introspection import (
BaseDatabaseIntrospection, FieldInfo, TableInfo,
)
field_size_re = re.compile(r'^\s*(?:var)?char\s*\(\s*(\d+)\s*\)\s*$')
FieldInfo = namedtuple('FieldInfo', FieldInfo._fields + ('default',))
def get_field_size(name)... | bsd-3-clause |
KaranToor/MA450 | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/api_lib/error_reporting/util.py | 2 | 2798 | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | apache-2.0 |
gclenaghan/scikit-learn | sklearn/decomposition/tests/test_truncated_svd.py | 73 | 6086 | """Test truncated SVD transformer."""
import numpy as np
import scipy.sparse as sp
from sklearn.decomposition import TruncatedSVD
from sklearn.utils import check_random_state
from sklearn.utils.testing import (assert_array_almost_equal, assert_equal,
assert_raises, assert_greater,
... | bsd-3-clause |
chirilo/mozillians | vendor-local/lib/python/rest_framework/six.py | 33 | 11056 | """Utilities for writing code that runs on Python 2 and 3"""
import operator
import sys
import types
__author__ = "Benjamin Peterson <benjamin@python.org>"
__version__ = "1.2.0"
# True if we are running on Python 3.
PY3 = sys.version_info[0] == 3
if PY3:
string_types = str,
integer_types = int,
class_t... | bsd-3-clause |
j-carpentier/nova | nova/objects/instance_mapping.py | 29 | 4924 | # 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 |
lochiiconnectivity/boto | boto/core/__init__.py | 68 | 1179 | # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
# All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without... | mit |
OpenAcademy-OpenStack/nova-scheduler | nova/api/openstack/compute/contrib/security_groups.py | 4 | 26752 | # Copyright 2011 OpenStack Foundation
# Copyright 2012 Justin Santa Barbara
# 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/l... | apache-2.0 |
endlessm/chromium-browser | third_party/catapult/telemetry/telemetry/timeline/thread.py | 1 | 9786 | # Copyright 2014 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 telemetry.timeline.async_slice as async_slice_module
import telemetry.timeline.event_container as event_container
import telemetry.timeline.flow_event ... | bsd-3-clause |
yuanzhao/gpdb | gpMgmt/bin/gppylib/test/unit/__init__.py | 20 | 1321 | # Make sure Python loads the modules of this package via absolute paths.
from os.path import abspath as _abspath
__path__[0] = _abspath(__path__[0])
from gppylib.gparray import GpArray, GpDB
def setup_fake_gparray():
master = GpDB.initFromString("1|-1|p|p|s|u|mdw|mdw|5432|None|/data/master||/data/master/base/1089... | apache-2.0 |
Domatix/stock-logistics-workflow | stock_batch_picking/wizard/batch_picking_creator.py | 2 | 6683 | # Copyright 2012-2016 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import json
from odoo import _, api, fields, models
from odoo.exceptions import UserError
class StockBatchPickingCreator(models.TransientModel):
"""Create a stock.batch.picking from stock.picking
"""
_nam... | agpl-3.0 |
unnikrishnankgs/va | venv/lib/python3.5/site-packages/numpy/distutils/command/__init__.py | 264 | 1098 | """distutils.command
Package containing implementation of all the standard Distutils
commands.
"""
from __future__ import division, absolute_import, print_function
def test_na_writable_attributes_deletion():
a = np.NA(2)
attr = ['payload', 'dtype']
for s in attr:
assert_raises(AttributeError, de... | bsd-2-clause |
kevin8909/xjerp | openerp/addons/l10n_in/__init__.py | 702 | 1046 | # -*- 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 |
tiagochiavericosta/edx-platform | common/test/acceptance/pages/lms/dashboard_search.py | 138 | 1130 | """
Dashboard search
"""
from bok_choy.page_object import PageObject
from . import BASE_URL
class DashboardSearchPage(PageObject):
"""
Dashboard page featuring a search form
"""
search_bar_selector = '#dashboard-search-bar'
url = "{base}/dashboard".format(base=BASE_URL)
@property
def se... | agpl-3.0 |
jonnor/FreeCAD | src/Mod/Import/App/SCL/Rules.py | 56 | 1771 | # Copyright (c) 2011-2012, Thomas Paviot (tpaviot@gmail.com)
# All rights reserved.
# This file is part of the StepClassLibrary (SCL).
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source cod... | lgpl-2.1 |
cgstudiomap/cgstudiomap | main/parts/odoo/addons/account/wizard/account_invoice_refund.py | 214 | 13008 | # -*- 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 |
saguas/jasper_erpnext_report | jasper_erpnext_report/utils/jasper_iter_hooks.py | 1 | 1437 | from __future__ import unicode_literals
__author__ = 'luissaguas'
import frappe
from frappe import _
"""
HOOKS:
jasper_after_sendmail(data, url, file_name, file_path); jasper_before_sendmail(data, file_name, output, url, **kargs);
jasper_after_get_report(file_name, file_output, url, filepath); jasper_before_get_... | mit |
ulissesf/soletta | data/scripts/sol-flow-node-type-stub-gen.py | 3 | 16441 | #!/usr/bin/env python3
# This file is part of the Soletta Project
#
# Copyright (C) 2015 Intel Corporation. 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 ... | bsd-3-clause |
MySmile/sfchat | apps/csp/tests/test_view.py | 1 | 2904 | import unittest
import json
from django.test.client import Client
class CSPReportTest(unittest.TestCase):
def setUp(self):
self.client = Client()
self.csp_report_valid = {"csp-report":
{"blocked-uri":"self",
"document-uri":... | bsd-3-clause |
tbtraltaa/medianshape | medianshape/simplicial/surfgen.py | 1 | 10038 | # encoding: utf-8
'''
2D surface embedded in 3D
-------------------------
'''
from __future__ import absolute_import
import importlib
import os
import numpy as np
from medianshape.simplicial import pointgen3d, mesh, utils
from medianshape.simplicial.meshgen import meshgen2d
import matplotlib.pyplot as plt
from mpl_t... | gpl-3.0 |
broadinstitute/PyGithub | github/GitAuthor.py | 74 | 3048 | # -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... | gpl-3.0 |
rbharath/pande-gas | vs_utils/utils/dragon_utils.py | 3 | 5800 | """
Dragon utilities.
"""
__author__ = "Steven Kearnes"
__copyright__ = "Copyright 2014, Stanford University"
__license__ = "BSD 3-clause"
from cStringIO import StringIO
import numpy as np
import os
import pandas as pd
import subprocess
import tempfile
from vs_utils.utils import SmilesGenerator
class Dragon(object... | bsd-3-clause |
alex/kombu-fernet-serializers | setup.py | 1 | 1648 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import kombu_fernet
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
packages = [
'kombu_fernet',
'kombu... | mit |
elingg/tensorflow | tensorflow/python/ops/check_ops.py | 16 | 29893 | # 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 |
drchrono/salesforce-python-toolkit | sforce/enterprise.py | 19 | 3596 | # 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 ... | lgpl-3.0 |
fhaoquan/kbengine | kbe/src/lib/python/Lib/test/test_zlib.py | 84 | 26766 | import unittest
from test import support
import binascii
import random
import sys
from test.support import bigmemtest, _1G, _4G
zlib = support.import_module('zlib')
requires_Compress_copy = unittest.skipUnless(
hasattr(zlib.compressobj(), "copy"),
'requires Compress.copy()')
requires_Decompress_copy =... | lgpl-3.0 |
J861449197/edx-platform | common/djangoapps/cors_csrf/tests/test_views.py | 150 | 2397 | """Tests for cross-domain request views. """
import json
from django.test import TestCase
from django.core.urlresolvers import reverse, NoReverseMatch
import ddt
from config_models.models import cache
from cors_csrf.models import XDomainProxyConfiguration
@ddt.ddt
class XDomainProxyTest(TestCase):
"""Tests for... | agpl-3.0 |
artdent/mingus-python3 | mingus/core/__init__.py | 5 | 1124 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
================================================================================
Mingus - Music theory Python module, core package
Copyright (C) 2008-2009, Bart Spaans
This program is free software: you can redistribute it and/or modify
it under the terms... | gpl-3.0 |
piotroxp/scibibscan | scib/lib/python3.5/site-packages/astropy/extern/ply/cpp.py | 192 | 33040 | # -----------------------------------------------------------------------------
# cpp.py
#
# Author: David Beazley (http://www.dabeaz.com)
# Copyright (C) 2007
# All rights reserved
#
# This module implements an ANSI-C style lexical preprocessor for PLY.
# -------------------------------------------------------------... | mit |
edevil/django | django/conf/locale/ml/formats.py | 394 | 1815 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'N j, Y'
TIME_FORMAT = 'P'
DATETIM... | bsd-3-clause |
egnyte/python-egnyte | egnyte/events.py | 1 | 4981 | from __future__ import unicode_literals
import time
from egnyte import base, exc, resources
class Event(base.Resource):
"""
Event data.
Attributes:
* id - event id
* timestamp - date of event in iso8061 format
* action_source - event source: WebUI, SyncEngine, Mobile or PublicAPI
* ac... | mit |
wuga214/Django-Wuga | env/lib/python2.7/site-packages/pip/_vendor/lockfile/symlinklockfile.py | 536 | 2616 | from __future__ import absolute_import
import os
import time
from . import (LockBase, NotLocked, NotMyLock, LockTimeout,
AlreadyLocked)
class SymlinkLockFile(LockBase):
"""Lock access to a file using symlink(2)."""
def __init__(self, path, threaded=True, timeout=None):
# super(Symlin... | apache-2.0 |
hsaito/linux | scripts/gdb/linux/cpus.py | 997 | 3560 | #
# gdb helper commands and functions for Linux kernel debugging
#
# per-cpu tools
#
# Copyright (c) Siemens AG, 2011-2013
#
# Authors:
# Jan Kiszka <jan.kiszka@siemens.com>
#
# This work is licensed under the terms of the GNU GPL version 2.
#
import gdb
from linux import tasks, utils
MAX_CPUS = 4096
def get_cu... | gpl-2.0 |
slank/ansible | lib/ansible/modules/network/f5/bigip_ssl_certificate.py | 32 | 16292 | #!/usr/bin/python
#
# (c) 2016, Kevin Coming (@waffie1)
#
# 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 l... | gpl-3.0 |
tensorport/mnist | mnist.py | 1 | 11743 | # MIT License, see LICENSE
# Copyright (c) 2018 Clusterone Inc.
# Author: Adrian Yi, adrian@clusterone.com
from __future__ import print_function
import json
import os
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
import tensorflow as tf
from clusterone import get_data_path, get_logs_path
from u... | mit |
canerbasaran/onionshare | test/onionshare_helpers_test.py | 2 | 1034 | """
OnionShare | https://onionshare.org/
Copyright (C) 2015 Micah Lee <micah@micahflee.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 l... | gpl-3.0 |
globaltoken/globaltoken | test/functional/rpc_rawtransaction.py | 1 | 18199 | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the rawtransaction RPCs.
Test the following RPCs:
- createrawtransaction
- signrawtransacti... | mit |
ddepaoli3/fuel-main-dev | fuelweb_ui_test/pageobjects/node_interfaces_settings.py | 4 | 1360 | from pageobjects.base import PageObject
from pageobjects.settings import SettingsFooter
from selenium.webdriver.support.select import Select
class InterfacesSettings(PageObject, SettingsFooter):
@property
def interfaces(self):
elements = self.parent.\
find_elements_by_css_selector('.physi... | apache-2.0 |
L337hium/dhquery | dhquery.py | 1 | 7156 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fileencoding=utf-8
# vim:tabstop=2
from random import Random
from optparse import OptionParser
from pydhcplib.dhcp_packet import DhcpPacket
from pydhcplib.dhcp_network import DhcpClient
from pydhcplib.type_hw_addr import hwmac
from pydhcplib.type_ipv4 import ipv4
imp... | gpl-2.0 |
AdrianHuang/rt-thread | bsp/stm32f40x/rtconfig.py | 9 | 3663 | import os
# toolchains options
ARCH='arm'
CPU='cortex-m4'
CROSS_TOOL='keil'
if os.getenv('RTT_CC'):
CROSS_TOOL = os.getenv('RTT_CC')
# cross_tool provides the cross compiler
# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR
if CROSS_TOOL == 'gcc':
PLATFORM = 'gcc'
EXEC_... | gpl-2.0 |
HackFisher/depot_tools | tests/gclient_utils_test.py | 44 | 7351 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import StringIO
import sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from testing... | bsd-3-clause |
ojengwa/oh-mainline | vendor/packages/gdata/src/gdata/service.py | 78 | 69609 | #!/usr/bin/python
#
# Copyright (C) 2006,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... | agpl-3.0 |
thica/ORCA-Remote | src/ORCA/utils/Platform/generic/generic_CheckPermissions.py | 1 | 1299 | # -*- coding: utf-8 -*-
"""
ORCA Open Remote Control Application
Copyright (C) 2013-2020 Carsten Thielepape
Please contact me by : http://www.orca-remote.org/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as publi... | gpl-3.0 |
deveninfotech/deven-frappe | frappe/exceptions.py | 31 | 1658 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
# BEWARE don't put anything in this file except exceptions
from werkzeug.exceptions import NotFound
from MySQLdb import ProgrammingError as SQLError
class ValidationError(Ex... | mit |
chrisbarber/dask | dask/tests/test_threaded.py | 3 | 2157 | from multiprocessing.pool import ThreadPool
import threading
from threading import Thread
from time import time, sleep
import pytest
from dask.context import set_options
from dask.threaded import get
from dask.utils_test import inc, add
def test_get():
dsk = {'x': 1, 'y': 2, 'z': (inc, 'x'), 'w': (add, 'z', 'y'... | bsd-3-clause |
ThiagoGarciaAlves/intellij-community | plugins/hg4idea/testData/bin/mercurial/localrepo.py | 90 | 102052 | # localrepo.py - read/write repository class for mercurial
#
# Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from node import hex, nullid, short
from i18n import _
import peer, c... | apache-2.0 |
AHJenin/acm-type-problems | Timus/AC/1197-Lonesome_Knight.py | 1 | 1209 | #!/usr/bin/env python3
#
# FILE: 1197-Lonesome_Knight.py
#
# @author: Arafat Hasan Jenin <opendoor.arafat[at]gmail[dot]com>
#
# LINK:
#
# DATE CREATED: 15-06-18 15:40:41 (+06)
# LAST MODIFIED: 15-06-18 17:29:41 (+06)
#
# VERDICT: Accepted
#
# DEVELOPMENT HISTORY:
# Date Version Description
# ---------------... | mit |
nikofil/invenio-search-ui | invenio_search_ui/views.py | 1 | 2169 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015, 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... | gpl-2.0 |
birdonwheels5/p2pool-myrGroestl | p2pool/util/deferral.py | 233 | 8790 | from __future__ import division
import itertools
import random
import sys
from twisted.internet import defer, reactor
from twisted.python import failure, log
def sleep(t):
d = defer.Deferred(canceller=lambda d_: dc.cancel())
dc = reactor.callLater(t, d.callback, None)
return d
def run_repeatedly(f, *arg... | gpl-3.0 |
dmilith/SublimeText3-dmilith | Packages/pyte/all/pyte/screens.py | 1 | 46773 | # -*- coding: utf-8 -*-
"""
pyte.screens
~~~~~~~~~~~~
This module provides classes for terminal screens, currently
it contains three screens with different features:
* :class:`~pyte.screens.Screen` -- base screen implementation,
which handles all the core escape sequences, recognized by
... | mit |
zgchizi/oppia-uc | core/counters.py | 12 | 3320 | # coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | apache-2.0 |
suraj-jayakumar/lstm-rnn-ad | src/testdata/random_data_time_series/generate_data.py | 1 | 1042 | # -*- coding: utf-8 -*-
"""
Created on Tue Feb 23 11:15:12 2016
@author: suraj
"""
import random
import numpy as np
import pickle
import matplotlib.pyplot as plt
attachRateList = []
for i in range(3360):
attachRateList.append(random.uniform(4,6))
attachRateList = np.array(attachRateList)
encoded_attach_rate... | apache-2.0 |
brentdax/swift | utils/gyb_syntax_support/ExprNodes.py | 5 | 19659 | from Child import Child
from Node import Node # noqa: I201
EXPR_NODES = [
# An inout expression.
# &x
Node('InOutExpr', kind='Expr',
children=[
Child('Ampersand', kind='PrefixAmpersandToken'),
Child('Expression', kind='Expr'),
]),
# A #column expression.
... | apache-2.0 |
mythsmith/veusz | veusz/document/svg_export.py | 4 | 21041 | # Copyright (C) 2010 Jeremy S. Sanders
# Email: Jeremy Sanders <jeremy@jeremysanders.net>
#
# 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
# ... | gpl-2.0 |
alianmohammad/pd-gem5 | util/on-chip-network-power-area.py | 49 | 8472 | # Copyright (c) 2014 Mark D. Hill and David A. Wood
# 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 conditio... | bsd-3-clause |
keyurpatel076/MissionPlannerGit | Lib/tarfile.py | 40 | 88997 | #!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
#-------------------------------------------------------------------
# tarfile.py
#-------------------------------------------------------------------
# Copyright (C) 2002 Lars Gustäbel <lars@gustaebel.de>
# All rights reserved.
#
# Permission is hereby granted, fre... | gpl-3.0 |
nychitman1/android_kernel_lge_hammerhead | tools/perf/scripts/python/sctop.py | 11180 | 1924 | # system call top
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Periodically displays system-wide system call totals, broken down by
# syscall. If a [comm] arg is specified, only syscalls called by
# [comm] are displayed. If an [interval] arg is specified,... | gpl-2.0 |
joequery/django | django/contrib/admin/templatetags/admin_list.py | 173 | 17480 | from __future__ import unicode_literals
import datetime
import warnings
from django.contrib.admin.templatetags.admin_static import static
from django.contrib.admin.templatetags.admin_urls import add_preserved_filters
from django.contrib.admin.utils import (
display_for_field, display_for_value, label_for_field, l... | bsd-3-clause |
kalyptorisk/daversy | src/daversy/difflib_ext.py | 1 | 8527 | import re, difflib
def merge_group(list, func, start=True, end=True):
l, r, s = list[0]
first = ['',' class="first"'][start]
last = ['',' class="last"'][end]
if len(list) == 1:
if start and end:
return LINE_FORMAT % func(' class="first last"', l, r)
else:
retur... | gpl-2.0 |
sugarlabs/sugar-toolkit-gtk3 | src/sugar3/graphics/radiotoolbutton.py | 1 | 7756 | # Copyright (C) 2007, Red Hat, Inc.
# Copyright (C) 2007-2008, One Laptop Per Child
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option... | lgpl-2.1 |
JCBarahona/edX | common/lib/xmodule/xmodule/tests/test_poll.py | 227 | 1133 | # -*- coding: utf-8 -*-
"""Test for Poll Xmodule functional logic."""
from xmodule.poll_module import PollDescriptor
from . import LogicTest
class PollModuleTest(LogicTest):
"""Logic tests for Poll Xmodule."""
descriptor_class = PollDescriptor
raw_field_data = {
'poll_answers': {'Yes': 1, 'Dont_kn... | agpl-3.0 |
hackthemarket/pystrat | sim.py | 1 | 10697 | # simple trading strategy simulator
import pandas as pd
from pandas.tools.plotting import autocorrelation_plot
from pandas.tools.plotting import scatter_matrix
import numpy as np
from scipy import stats
import sklearn
from sklearn import preprocessing as pp
import matplotlib as mpl
import matplotlib.pyplot as plt
f... | gpl-3.0 |
tarzan0820/odoo | addons/account_bank_statement_extensions/report/__init__.py | 415 | 1128 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
#
# Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# i... | agpl-3.0 |
redhat-openstack/sahara | sahara/service/api.py | 4 | 7744 | # Copyright (c) 2013 Mirantis 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 writ... | apache-2.0 |
codecollision/DropboxToFlickr | django/contrib/gis/geos/libgeos.py | 154 | 5541 | """
This module houses the ctypes initialization procedures, as well
as the notice and error handler function callbacks (get called
when an error occurs in GEOS).
This module also houses GEOS Pointer utilities, including
get_pointer_arr(), and GEOM_PTR.
"""
import os, re, sys
from ctypes import c_char_p, Structur... | bsd-3-clause |
OpusVL/odoo | addons/website_customer/__openerp__.py | 313 | 1571 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-Today OpenERP S.A. (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the term... | agpl-3.0 |
mvanotti/mig | tools/delete_unused_queues.py | 18 | 1797 | #!/usr/bin/env python
# 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/.
#
# Contributor: Julien Vehent jvehent@mozilla.com [:ulfr]
# This script connects to the manageme... | mpl-2.0 |
douglaskastle/bootswatch | convert_bootswatch_mutara.py | 1 | 7972 | import re
import os
values = {
# 'uc': 'Grissom',
'lc': 'mutara',
'header': 'Michroma',
'body': 'Play',
'website': 'mavek_org',
# 'cl': '#116BB7',
}
def main():
src = 'cyborg'
cmd = 'cp -r {0}/* {1}'.format(src, values['lc'])
os.system(cmd)
infile = "{0}/bootsw... | mit |
resmo/ansible | lib/ansible/modules/network/meraki/meraki_admin.py | 19 | 17464 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
... | gpl-3.0 |
francbartoli/geonode | geonode/apps.py | 10 | 1313 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2018 OSGeo
#
# 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 ver... | gpl-3.0 |
TRUFIL/erpnext | erpnext/templates/pages/projects.py | 39 | 3258 | # 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
import json
def get_context(context):
project_user = frappe.db.get_value("Project User", {"parent": frappe.form_dict.project, "user": fr... | gpl-3.0 |
sony/nnabla | python/src/nnabla/models/imagenet/densenet.py | 1 | 2722 | # Copyright 2019,2020,2021 Sony Corporation.
#
# 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... | apache-2.0 |
facebookexperimental/eden | eden/scm/tests/test-convert-authormap-t.py | 2 | 1653 | # Copyright (c) Facebook, Inc. and its affiliates.
# Copyright (c) Mercurial Contributors.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from __future__ import absolute_import
from testutil.dott import feature, sh, testtmp # n... | gpl-2.0 |
SheffieldML/GPy | GPy/kern/src/todo/spline.py | 19 | 1797 | # Copyright (c) 2012, GPy authors (see AUTHORS.txt).
# Licensed under the BSD 3-clause license (see LICENSE.txt)
from kernpart import Kernpart
import numpy as np
from ...core.parameterization import Param
def theta(x):
"""Heaviside step function"""
return np.where(x>=0.,1.,0.)
class Spline(Kernpart):
""... | bsd-3-clause |
KokareIITP/django | django/core/management/commands/startapp.py | 513 | 1040 | from importlib import import_module
from django.core.management.base import CommandError
from django.core.management.templates import TemplateCommand
class Command(TemplateCommand):
help = ("Creates a Django app directory structure for the given app "
"name in the current directory or optionally in t... | bsd-3-clause |
Micronaet/micronaet-accounting | l10n_it_duelist_report_aeroo/__init__.py | 2 | 1215 | #!/usr/bin/python
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2010-2012 Associazione OpenERP Italia
# (<http://www.openerp-italia.org>).
# Copyright(c)2008-2010 SIA "KN dati".(http://kndati.lv) All Rights Reserved.
# ... | agpl-3.0 |
Mariusz1970/enigma2 | lib/python/Components/DiskInfo.py | 18 | 1058 | from GUIComponent import GUIComponent
from VariableText import VariableText
from os import statvfs
from enigma import eLabel
# TODO: Harddisk.py has similiar functions, but only similiar.
# fix this to use same code
class DiskInfo(VariableText, GUIComponent):
FREE = 0
USED = 1
SIZE = 2
def __init__(self, path, ... | gpl-2.0 |
huikyole/climate | test_smoke.py | 2 | 4433 | # 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 |
PopCap/GameIdea | Engine/Source/ThirdParty/HTML5/emsdk/Win64/python/2.7.5.3_64bit/Lib/encodings/iso2022_jp.py | 816 | 1053 | #
# iso2022_jp.py: Python Unicode Codec for ISO2022_JP
#
# Written by Hye-Shik Chang <perky@FreeBSD.org>
#
import _codecs_iso2022, codecs
import _multibytecodec as mbc
codec = _codecs_iso2022.getcodec('iso2022_jp')
class Codec(codecs.Codec):
encode = codec.encode
decode = codec.decode
class IncrementalEncod... | bsd-2-clause |
robertostling/efselab | scripts/conll2tab.py | 1 | 1221 | # Script to convert CoNLL files with tag+morphology into the simple two-column
# format assumed by efselab.
#
# If only the tag is required, conversion can more easily be done like this:
#
# cut -f 2,4 file.conll >file.tab
"""
cat /home/corpora/SUC3.0/corpus/conll/blogs.conll /home/corpora/SUC3.0/corpus/conll/suc-trai... | gpl-3.0 |
procangroup/edx-platform | lms/djangoapps/django_comment_client/tests/test_utils.py | 3 | 80319 | # -*- coding: utf-8 -*-
import datetime
import json
import ddt
import mock
import pytest
from django.core.urlresolvers import reverse
from django.test import RequestFactory, TestCase
from mock import Mock, patch
from nose.plugins.attrib import attr
from pytz import UTC
from six import text_type
import django_comment... | agpl-3.0 |
pjs7678/eve | eve/tests/utils.py | 16 | 14091 | # -*- coding: utf-8 -*-
import copy
import hashlib
from bson.json_util import dumps
from datetime import datetime, timedelta
from eve.tests import TestBase
from eve.utils import parse_request, str_to_date, config, weak_date, \
date_to_str, querydef, document_etag, extract_key_values, \
debug_error_message, val... | bsd-3-clause |
sdlBasic/sdlbrt | win32/mingw/opt/lib/python2.7/encodings/utf_16_le.py | 860 | 1037 | """ Python 'utf-16-le' Codec
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""
import codecs
### Codec APIs
encode = codecs.utf_16_le_encode
def decode(input, errors='strict'):
return codecs.utf_16_le_decode(input, errors, True)
class IncrementalEncod... | lgpl-2.1 |
alexeyum/scikit-learn | sklearn/datasets/mlcomp.py | 289 | 3855 | # Copyright (c) 2010 Olivier Grisel <olivier.grisel@ensta.org>
# License: BSD 3 clause
"""Glue code to load http://mlcomp.org data as a scikit.learn dataset"""
import os
import numbers
from sklearn.datasets.base import load_files
def _load_document_classification(dataset_path, metadata, set_=None, **kwargs):
if ... | bsd-3-clause |
keen99/SickRage | lib/ndg/httpsclient/test/__init__.py | 93 | 1077 | """Unit tests package for ndg_httpsclient
PyOpenSSL utility to make a httplib-like interface suitable for use with
urllib2
"""
__author__ = "P J Kershaw (STFC)"
__date__ = "05/01/12"
__copyright__ = "(C) 2012 Science and Technology Facilities Council"
__license__ = "BSD - see LICENSE file in top-level directory"
__co... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.