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 |
|---|---|---|---|---|---|
riklaunim/django-custom-multisite | django/db/models/fields/subclassing.py | 104 | 1819 | """
Convenience routines for creating non-trivial Field subclasses, as well as
backwards compatibility utilities.
Add SubfieldBase as the __metaclass__ for your Field subclass, implement
to_python() and the other necessary methods and everything will work seamlessly.
"""
class SubfieldBase(type):
"""
A metacl... | bsd-3-clause |
camilonova/django | tests/forms_tests/field_tests/test_durationfield.py | 42 | 1455 | import datetime
from django.forms import DurationField
from django.test import SimpleTestCase
from django.utils.duration import duration_string
from . import FormFieldAssertionsMixin
class DurationFieldTest(FormFieldAssertionsMixin, SimpleTestCase):
def test_durationfield_clean(self):
f = DurationField... | bsd-3-clause |
Nitaco/ansible | lib/ansible/modules/network/panos/panos_cert_gen_ssh.py | 61 | 6225 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Ansible module to manage PaloAltoNetworks Firewall
# (c) 2016, techbizdev <techbizdev@paloaltonetworks.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 publish... | gpl-3.0 |
40223151/2014c2g9 | exts/sphinx.search.py | 38 | 8840 | # -*- coding: utf-8 -*-
"""
sphinx.search
~~~~~~~~~~~~~
Create a search index for offline search.
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
採用結巴套件 for Python3 進行中文繁體內容的分詞
https://github.com/fxsjy/jieba
"""
imp... | gpl-2.0 |
tomas-edwardsson/tommi-func | func/commonconfig.py | 2 | 1555 |
"""
func
Copyright 2007, Red Hat, Inc
see AUTHORS
This software may be freely redistributed under the terms of the GNU
general public license.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 0... | gpl-2.0 |
iulian787/spack | var/spack/repos/builtin/packages/athena/package.py | 5 | 9787 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Athena(AutotoolsPackage):
"""Athena is a grid-based code for astrophysical magnetohydrodyn... | lgpl-2.1 |
iemejia/beam | sdks/python/apache_beam/testing/benchmarks/nexmark/models/nexmark_model.py | 5 | 7717 | #
# 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 us... | apache-2.0 |
wgcv/SWW-Crashphone | lib/python2.7/site-packages/django/contrib/sessions/backends/db.py | 113 | 2930 | import logging
from django.contrib.sessions.backends.base import SessionBase, CreateError
from django.core.exceptions import SuspiciousOperation
from django.db import IntegrityError, transaction, router
from django.utils import timezone
from django.utils.encoding import force_text
class SessionStore(SessionBase):
... | apache-2.0 |
Amber-MD/ambertools-conda-build | conda_tools/test/test_fix_conda_gfortran_linking_osx.py | 1 | 1041 | # pytest -vs .
import os
import sys
from mock import patch
import shutil
sys.path.insert(0, '..')
from fix_conda_gfortran_linking_osx import repack_conda_package, main
this_dir = os.path.dirname(__file__)
PACK_SCRIPT = os.path.join(this_dir, '..',
'pack_binary_without_conda_install.py')
FA... | mit |
z-jun/rrdtool-1.x | bindings/python/setup.py | 3 | 2030 | #! /usr/bin/env python
#
# setup.py
#
# py-rrdtool distutil setup
#
# Author : Hye-Shik Chang <perky@fallin.lv>
# Date : $Date: 2003/02/14 02:38:16 $
# Created : 24 May 2002
#
# $Revision: 1.7 $
#
# ==========================================================================
# This file is part of py-rrdtool.
#
# ... | gpl-2.0 |
jaimeMF/youtube-dl | youtube_dl/extractor/radiode.py | 150 | 1819 | from __future__ import unicode_literals
from .common import InfoExtractor
class RadioDeIE(InfoExtractor):
IE_NAME = 'radio.de'
_VALID_URL = r'https?://(?P<id>.+?)\.(?:radio\.(?:de|at|fr|pt|es|pl|it)|rad\.io)'
_TEST = {
'url': 'http://ndr2.radio.de/',
'info_dict': {
'id': 'ndr2... | unlicense |
sircharleswatson/electron | script/upload.py | 118 | 7288 | #!/usr/bin/env python
import argparse
import errno
import os
import subprocess
import sys
import tempfile
from lib.config import PLATFORM, get_target_arch, get_chromedriver_version
from lib.util import atom_gyp, execute, get_atom_shell_version, parse_version, \
scoped_cwd
from lib.github import G... | mit |
aptivate/econsensus | django/econsensus/test_runner.py | 4 | 3345 | from django.core.exceptions import ImproperlyConfigured
from django.test.simple import DjangoTestSuiteRunner, \
reorder_suite, build_suite
from django.test.testcases import TestCase
from django.db.models import get_apps
from django.utils.importlib import import_module
try:
from django.utils import unittest
exc... | gpl-3.0 |
brightiup/brightiup | brightiup/compiler/bt_lexer.py | 1 | 1391 | import ply.lex as lex
class BTLexerException(Exception):
def __init__(self, message):
self.message = message
def __str__(self):
return self.message
class BTLexer(object):
"""BT lexer"""
keywords = [
# "import",
"state",
]
tokens = [keyword.upper() for keyword ... | gpl-2.0 |
minhphung171093/GreenERP_V8 | openerp/addons/l10n_br/account.py | 340 | 10565 | # -*- encoding: utf-8 -*-
#################################################################################
# #
# Copyright (C) 2009 Renato Lima - Akretion #
# ... | agpl-3.0 |
oinopion/django | tests/custom_managers/tests.py | 53 | 22317 | from __future__ import unicode_literals
from django.db import models
from django.test import TestCase
from django.utils import six
from .models import (
Book, Car, CustomManager, CustomQuerySet, DeconstructibleCustomManager,
FunPerson, OneToOneRestrictedModel, Person, PersonManager,
PublishedBookManager, ... | bsd-3-clause |
technologiescollege/s2a_fr | s2a/Python/Lib/test/test_getargs2.py | 88 | 12211 | import unittest
from test import test_support
from _testcapi import getargs_keywords
import warnings
"""
> How about the following counterproposal. This also changes some of
> the other format codes to be a little more regular.
>
> Code C type Range check
>
> b unsigned char 0..UCHAR_MAX
> h signed short SHRT_MIN..SHR... | gpl-3.0 |
holzman/glideinwms-old | lib/condorMonitor.py | 1 | 24800 | #
# Project:
# glideinWMS
#
# File Version:
#
# Description:
# This module implements classes to query the condor daemons
# and manipulate the results
# Please notice that it also converts \" into "
#
# Author:
# Igor Sfiligoi (Aug 30th 2006)
#
import condorExe
import condorSecurity
import os
import string
... | bsd-3-clause |
Digenis/scrapy | scrapy/xlib/tx/client.py | 164 | 38658 | # -*- test-case-name: twisted.web.test.test_webclient,twisted.web.test.test_agent -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
HTTP client.
"""
from __future__ import division, absolute_import
import os
try:
from urlparse import urlunparse
from urllib import splithost, spl... | bsd-3-clause |
vinu76jsr/django_profiler | docs/conf.py | 1 | 8147 | # -*- coding: utf-8 -*-
#
# complexity documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | bsd-3-clause |
jgrocha/QGIS | python/plugins/processing/gui/PointMapTool.py | 30 | 1470 | # -*- coding: utf-8 -*-
"""
***************************************************************************
PointMapTool.py
---------------------
Date : February 2016
Copyright : (C) 2016 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
***********... | gpl-2.0 |
wchan/tensorflow | tensorflow/contrib/ctc/ctc_decoder_ops_test.py | 14 | 7567 | # 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 a... | apache-2.0 |
juhalindfors/bazel-patches | third_party/protobuf/3.2.0/python/google/protobuf/internal/json_format_test.py | 42 | 34561 | #! /usr/bin/env 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 ... | apache-2.0 |
Emercoin/emercoin | qa/rpc-tests/preciousblock.py | 42 | 5059 | #!/usr/bin/env python3
# Copyright (c) 2015-2016 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 PreciousBlock code
#
from test_framework.test_framework import BitcoinTestFramework
from test_f... | gpl-3.0 |
dkalashnik/tempest | tempest/services/compute/json/tenant_networks_client.py | 8 | 1382 | # Copyright 2015 NEC Corporation. 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 b... | apache-2.0 |
rakeshmi/tempest | tempest/api/data_processing/test_cluster_templates.py | 9 | 5129 | # Copyright (c) 2014 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 ... | apache-2.0 |
tadebayo/myedge | myvenv/Lib/site-packages/django/test/signals.py | 41 | 5724 | import os
import threading
import time
import warnings
from django.apps import apps
from django.core.signals import setting_changed
from django.db import connections, router
from django.db.utils import ConnectionRouter
from django.dispatch import Signal, receiver
from django.utils import timezone
from django.utils.fun... | mit |
bradchristensen/cherrymusic | cherrymusicserver/test/test_cherrymodel.py | 7 | 7416 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# CherryMusic - a standalone music server
# Copyright (c) 2012 - 2014 Tom Wallroth & Tilman Boerner
#
# Project page:
# http://fomori.org/cherrymusic/
# Sources on github:
# http://github.com/devsnd/cherrymusic/
#
# CherryMusic is based on
# jPlayer (GPL/MIT licens... | gpl-3.0 |
nvoron23/netmiko | tests/test_cisco_ios.py | 1 | 2115 | #!/usr/bin/env python
import pytest
import netmiko
import time
from DEVICE_CREDS import *
def setup_module(module):
module.EXPECTED_RESPONSES = {
'base_prompt' : 'pynet-rtr1',
'interface_ip' : '10.220.88.20'
}
show_ver_command = 'show version'
module.basic_command = 'show ip i... | mit |
cvsuser-chromium/chromium | native_client_sdk/src/build_tools/buildbot_run.py | 26 | 2661 | #!/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.
"""Main entry point for the NaCl SDK buildbot.
The entry point used to be build_sdk.py itself, but we want
to be able to simplify ... | bsd-3-clause |
niavlys/kivy | examples/canvas/circle.py | 16 | 1791 | # this is for testing angle_stop/angle_start
from kivy.app import App
from kivy.lang import Builder
kv = '''
BoxLayout:
orientation: 'vertical'
BoxLayout:
size_hint_y: None
height: sp(100)
BoxLayout:
orientation: 'vertical'
Slider:
id: e1
... | mit |
chienlieu2017/it_management | odoo/addons/portal/wizard/portal_wizard.py | 5 | 8809 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
from odoo.tools.translate import _
from odoo.tools import email_split
from odoo.exceptions import UserError
from odoo import api, fields, models
_logger = logging.getLogger(__name__)
# welcome email s... | gpl-3.0 |
apuigsech/emv-framework | iso7816.py | 1 | 5968 | #!/usr/bin/python
#
# Python ISO7816 (as part of EMV Framework)
# Copyrigh 2012 Albert Puigsech Galicia <albert@puigsech.com>
#
# This code 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; eithe... | gpl-3.0 |
sgerhart/ansible | lib/ansible/modules/cloud/google/gce_img.py | 43 | 5969 | #!/usr/bin/python
# Copyright 2015 Google Inc. All Rights Reserved.
# 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
"""An Ansible module to utilize GCE image resources."""
ANSIBLE_METAD... | mit |
guymakam/Kodi-Israel | plugin.video.israelive/resources/lib/chardet/utf8prober.py | 2919 | 2652 | ######################## 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... | gpl-2.0 |
JioCloud/nova | nova/api/openstack/compute/contrib/shelve.py | 69 | 3988 | # Copyright 2013 Rackspace Hosting
#
# 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 agre... | apache-2.0 |
narasimhan-v/avocado-misc-tests-1 | fs/pjdfstest.py | 4 | 2291 | #!/usr/bin/env python
#
# 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 version.
#
# This program is distributed in the hope that... | gpl-2.0 |
PGer/incubator-hawq | tools/bin/gppylib/operations/__init__.py | 9 | 2797 | # Make sure Python loads the modules of this package via absolute paths.
from os.path import abspath as _abspath
from gppylib import gplog
__path__[0] = _abspath(__path__[0])
logger = gplog.get_default_logger()
class Operation(object):
"""
An Operation (abstract class) is one atomic unit of work.
An i... | apache-2.0 |
2014c2g14/2014c2 | exts/w2/static/Brython2.0.0-20140209-164925/Lib/atexit.py | 743 | 1049 | """allow programmer to define multiple exit functions to be executedupon normal program termination.
Two public functions, register and unregister, are defined.
"""
class __loader__(object):
pass
def _clear(*args,**kw):
"""_clear() -> None
Clear the list of previously registered exit functions."""
... | gpl-2.0 |
guegue/forocacao | forocacao/users/views.py | 1 | 3882 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import base64
from PIL import Image, ImageDraw, ImageFont
from django.core.urlresolvers import reverse
from django.http import HttpResponse
from django.views.generic import DetailView, ListView, RedirectView, UpdateView
from braces.view... | bsd-3-clause |
kuiwei/kuiwei | common/lib/xmodule/xmodule/tests/test_graders.py | 102 | 12238 | """Grading tests"""
import unittest
from xmodule import graders
from xmodule.graders import Score, aggregate_scores
class GradesheetTest(unittest.TestCase):
'''Tests the aggregate_scores method'''
def test_weighted_grading(self):
scores = []
Score.__sub__ = lambda me, other: (me.earned - oth... | agpl-3.0 |
Edraak/edraak-platform | openedx/features/course_experience/tests/views/test_course_outline.py | 9 | 27047 | """
Tests for the Course Outline view and supporting views.
"""
import datetime
import json
import re
from completion import waffle
from completion.models import BlockCompletion
from completion.test_utils import CompletionWaffleTestMixin
from django.contrib.sites.models import Site
from django.urls import reverse
from... | agpl-3.0 |
kailIII/geraldo | site/newsite/site-geraldo/django/contrib/localflavor/ar/forms.py | 35 | 3869 | # -*- coding: utf-8 -*-
"""
AR-specific Form helpers.
"""
from django.forms import ValidationError
from django.forms.fields import RegexField, CharField, Select, EMPTY_VALUES
from django.utils.encoding import smart_unicode
from django.utils.translation import ugettext_lazy as _
class ARProvinceSelect(Select):
"""... | lgpl-3.0 |
gylian/sickrage | lib/sqlalchemy/dialects/firebird/base.py | 78 | 28412 | # firebird/base.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: firebird
:name: Firebird
Firebird Dialects
-----------------
... | gpl-3.0 |
woltage/ansible | test/units/executor/test_task_executor.py | 20 | 9785 | # (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 |
bbbenja/SickRage | lib/unidecode/x059.py | 252 | 4644 | data = (
'Shou ', # 0x00
'Yi ', # 0x01
'Zhi ', # 0x02
'Gu ', # 0x03
'Chu ', # 0x04
'Jiang ', # 0x05
'Feng ', # 0x06
'Bei ', # 0x07
'Cay ', # 0x08
'Bian ', # 0x09
'Sui ', # 0x0a
'Qun ', # 0x0b
'Ling ', # 0x0c
'Fu ', # 0x0d
'Zuo ', # 0x0e
'Xia ', # 0x0f
'Xiong ', # 0x10
... | gpl-3.0 |
icgood/pymap | pymap/parsing/specials/options.py | 1 | 5476 |
from __future__ import annotations
import re
from collections.abc import Iterable, Mapping
from typing import Optional
from . import AString, SequenceSet
from .. import Params, Parseable
from ..exceptions import NotParseable
from ..primitives import Number, List
from ...bytes import BytesFormat, rev
__all__ = ['Ext... | mit |
bohlian/erpnext | erpnext/patches/v4_0/update_user_properties.py | 119 | 1879 | # 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 frappe.permissions
import frappe.defaults
def execute():
frappe.reload_doc("core", "doctype", "docfield")
frappe.reload_doc("hr"... | gpl-3.0 |
kmolab/kmolab.github.io | data/Brython-3.3.4/Lib/concurrent/futures/process.py | 93 | 17574 | # Copyright 2009 Brian Quinlan. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Implements ProcessPoolExecutor.
The follow diagram and text describe the data-flow through the system:
|======================= In-process =====================|== Out-of-process ==|
+----------+ +----------... | agpl-3.0 |
MarcosPividori/atomspace | tests/cython/bindlink/bindlink.py | 11 | 3077 | from unittest import TestCase
import os
from opencog.atomspace import AtomSpace, TruthValue, Atom, Handle, types
from opencog.bindlink import stub_bindlink, bindlink, single_bindlink,\
af_bindlink, execute_atom, evaluate_atom
from opencog.utilities import initialize_opencog, finalize... | agpl-3.0 |
codeaudit/phrasal | ptm/scripts/tsv_to_targettxt_csv.py | 5 | 2466 | #!/usr/bin/env python
#
# Convert a tsv file to a csv file suitable for
# the tm_targettxt table.
#
# Output table format matches tmapp.tm.models.TargetTxt:
#
#CREATE TABLE "tm_targettxt" (
# "id" serial NOT NULL PRIMARY KEY,
# "src_id" integer NOT NULL REFERENCES "tm_sourcetxt" ("id") DEFERRABLE INITIALLY DEFER... | gpl-3.0 |
macks22/scikit-learn | sklearn/decomposition/online_lda.py | 62 | 25339 | """
=============================================================
Online Latent Dirichlet Allocation with variational inference
=============================================================
This implementation is modified from Matthew D. Hoffman's onlineldavb code
Link: http://www.cs.princeton.edu/~mdhoffma/code/onli... | bsd-3-clause |
PhilLidar-DAD/geonode | geonode/services/enumerations.py | 35 | 1552 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2012 OpenPlans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either versio... | gpl-3.0 |
mollstam/UnrealPy | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/pywin32-219/Pythonwin/pywin/mfc/activex.py | 17 | 2541 | """Support for ActiveX control hosting in Pythonwin.
"""
import win32ui, win32uiole
import window
# XXX - we are still "classic style" classes in py2x, so we need can't yet
# use 'type()' everywhere - revisit soon, as py2x will move to new-style too...
try:
from types import ClassType as new_type
except ImportError:
... | mit |
etashjian/ECE757-final | src/arch/x86/isa/insts/x87/arithmetic/square_root.py | 91 | 2150 | # Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implemen... | bsd-3-clause |
GbalsaC/bitnamiP | pyfs/fs/expose/dokan/libdokan.py | 26 | 6634 | # Copyright (c) 2009-2010, Cloud Matrix Pty. Ltd.
# All rights reserved; available under the terms of the MIT License.
"""
fs.expose.dokan.libdokan: low-level ctypes interface to Dokan
"""
from ctypes import *
try:
DokanMain = windll.Dokan.DokanMain
DokanVersion = windll.Dokan.DokanVersion
except Attri... | agpl-3.0 |
axinging/chromium-crosswalk | native_client_sdk/src/build_tools/buildbot_run.py | 23 | 4286 | #!/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.
"""Main entry point for the NaCl SDK buildbot.
The entry point used to be build_sdk.py itself, but we want
to be able to simplify ... | bsd-3-clause |
gsmartway/odoo | addons/hr_timesheet_invoice/wizard/__init__.py | 433 | 1159 | # -*- 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 |
MihaiMoldovanu/ansible | lib/ansible/modules/notification/grove.py | 29 | 3235 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 |
Antiun/c2c-rd-addons | purchase_order_reopen/__openerp__.py | 4 | 1732 | # -*- 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 |
iAmMrinal0/CouchPotatoServer | libs/CodernityDB/lfu_cache.py | 82 | 4799 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2011-2013 Codernity (http://codernity.com)
#
# 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/L... | gpl-3.0 |
pyq881120/rpyc | tests/test_splitbrain.py | 9 | 3553 | from __future__ import with_statement
import subprocess
import sys
import os
import rpyc
import unittest
import tempfile
import shutil
import traceback
from rpyc.experimental.splitbrain import splitbrain, localbrain, enable_splitbrain, disable_splitbrain
if not hasattr(unittest.TestCase, "assertIn"):
unittest.Tes... | mit |
immenz/pyload | module/plugins/accounts/MegasharesCom.py | 3 | 1528 | # -*- coding: utf-8 -*-
import re
from time import mktime, strptime
from module.plugins.Account import Account
class MegasharesCom(Account):
__name__ = "MegasharesCom"
__type__ = "account"
__version__ = "0.03"
__description__ = """Megashares.com account plugin"""
__license__ = "GPLv3"... | gpl-3.0 |
laurenrevere/osf.io | scripts/analytics/preprint_summary.py | 7 | 2853 | import pytz
import logging
import requests
from dateutil.parser import parse
from datetime import datetime, timedelta
from django.utils import timezone
from website.app import init_app
from scripts.analytics.base import SummaryAnalytics
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
LO... | apache-2.0 |
squirrelo/qiita | qiita_ware/dispatchable.py | 1 | 8731 | # -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | bsd-3-clause |
ntiufalara/openerp7 | openerp/addons/crm_partner_assign/wizard/crm_forward_to_partner.py | 48 | 5934 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# ... | mit |
stacywsmith/ansible | lib/ansible/modules/cloud/vmware/vmware_vm_facts.py | 27 | 3209 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Joseph Callen <jcallen () csc.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 Li... | gpl-3.0 |
glwu/python-for-android | python-modules/twisted/twisted/words/im/tocsupport.py | 55 | 8020 | # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
"""TOC (i.e. AIM) support for Instance Messenger."""
# System Imports
import string, re
from zope.interface import implements
# Twisted Imports
from twisted.words.protocols import toc
from twisted.words.im.locals import ONLINE, OFFLIN... | apache-2.0 |
krintoxi/NoobSec-Toolkit | NoobSecToolkit - MAC OSX/tools/inject/thirdparty/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-2.0 |
bepatient-fr/itools | itools/pkg/build_gulp.py | 1 | 4272 | # -*- coding: UTF-8 -*-
# Copyright (C) 2016 Sylvain Taverne <taverne.sylvain@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) ... | gpl-3.0 |
ryfeus/lambda-packs | LightGBM_sklearn_scipy_numpy/source/scipy/signal/tests/test_savitzky_golay.py | 20 | 9843 | from __future__ import division, print_function, absolute_import
import numpy as np
from numpy.testing import (assert_allclose, assert_equal,
assert_almost_equal, assert_array_equal,
assert_array_almost_equal)
from scipy.ndimage import convolve1d
from scipy.signa... | mit |
cntnboys/410Lab6 | build/django/build/lib.linux-x86_64-2.7/django/conf/locale/it/formats.py | 82 | 2094 | # -*- 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 = 'd F Y' # 25 Ottobre 2006
TIME_FO... | apache-2.0 |
pulkitsinghal/selenium | py/selenium/webdriver/__init__.py | 8 | 1334 | #!/usr/bin/python
#
# Copyright 2008-2013 Software Freedom Conservancy
#
# 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 b... | apache-2.0 |
MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-3.3.0/Lib/test/test_imaplib.py | 3 | 11949 | from test import support
# If we end up with a significant number of tests that don't require
# threading, this test module should be split. Right now we skip
# them all if we don't have threading.
threading = support.import_module('threading')
from contextlib import contextmanager
import imaplib
import os.path
impor... | mit |
borysiasty/QGIS | cmake/FindPyQt5.py | 19 | 3965 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2007, Simon Edwards <simon@simonzone.com>
# 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... | gpl-2.0 |
FarnazH/horton | horton/meanfield/libxc.py | 2 | 24375 | # -*- coding: utf-8 -*-
# HORTON: Helpful Open-source Research TOol for N-fermion systems.
# Copyright (C) 2011-2017 The HORTON Development Team
#
# This file is part of HORTON.
#
# HORTON is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by th... | gpl-3.0 |
plotly/plotly.py | packages/python/plotly/plotly/graph_objs/ohlc/_stream.py | 2 | 4111 | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Stream(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "ohlc"
_path_str = "ohlc.stream"
_valid_props = {"maxpoints", "token"}
# maxpoints
#... | mit |
doganov/edx-platform | common/djangoapps/student/tests/test_admin_views.py | 112 | 5276 | """
Tests student admin.py
"""
from django.core.urlresolvers import reverse
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory
from student.tests.factories import UserFactory
class AdminCourseRolesPageTest(ModuleStoreTestCase):
"""... | agpl-3.0 |
blrm/robottelo | tests/foreman/ui/test_activationkey.py | 2 | 44514 | # -*- encoding: utf-8 -*-
"""Test class for Activation key UI"""
import random
from fauxfactory import gen_string
from nailgun import entities
from robottelo import manifests
from robottelo.api.utils import (
enable_rhrepo_and_fetchid,
promote,
upload_manifest,
)
from robottelo.constants import (
DEFAU... | gpl-3.0 |
lnls-fac/sirius | pymodels/TS_V03_03/lattice.py | 1 | 10721 | """Lattice module.
In this module the lattice of the corresponding accelerator is defined.
"""
import math as _math
import numpy as _np
from pyaccel import lattice as _pyacc_lat, elements as _pyacc_ele, \
accelerator as _pyacc_acc, optics as _pyacc_opt
energy = 0.15e9 # [eV]
default_optics_mode = 'M1'
class ... | mit |
domob1812/gnucash | src/optional/python-bindings/example_scripts/rest-api/gnucash_simple.py | 8 | 12598 | '''
gnucash_simple.py -- A helper file to convert Gnucash objects into
dictionaries for easier conversion to JSON
Copyright (C) 2013 Tom Lofts <dev@loftx.co.uk>
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 ... | gpl-2.0 |
anistark/mozillians | vendor-local/lib/python/south/orm.py | 119 | 15142 | """
South's fake ORM; lets you not have to write SQL inside migrations.
Roughly emulates the real Django ORM, to a point.
"""
from __future__ import print_function
import inspect
from django.db import models
from django.db.models.loading import cache
from django.core.exceptions import ImproperlyConfigured
from sout... | bsd-3-clause |
ZenStein/GoogleAppsBackEnd | vendor/mockery/mockery/docs/conf.py | 468 | 8442 | # -*- coding: utf-8 -*-
#
# Mockery Docs documentation build configuration file, created by
# sphinx-quickstart on Mon Mar 3 14:04:26 2014.
#
# 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 file.
... | mit |
mkacik/bcc | tools/bashreadline.py | 3 | 1528 | #!/usr/bin/python
#
# bashreadline Print entered bash commands from all running shells.
# For Linux, uses BCC, eBPF. Embedded C.
#
# This works by tracing the readline() function using a uretprobe (uprobes).
#
# Copyright 2016 Netflix, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")... | apache-2.0 |
SivilTaram/edx-platform | lms/djangoapps/instructor/views/instructor_task_helpers.py | 133 | 5257 | """
A collection of helper utility functions for working with instructor
tasks.
"""
import json
import logging
from util.date_utils import get_default_time_display
from bulk_email.models import CourseEmail
from django.utils.translation import ugettext as _
from django.utils.translation import ungettext
from instructor_... | agpl-3.0 |
toshka/torrt | torrt/notifiers/telegram.py | 1 | 1820 | import logging
import requests
from requests import RequestException
from torrt.base_notifier import BaseNotifier
from torrt.utils import NotifierClassesRegistry
LOGGER = logging.getLogger(__name__)
class TelegramNotifier(BaseNotifier):
"""Telegram bot notifier. See instructions how to create bot at https://cor... | bsd-3-clause |
johankaito/fufuka | microblog/flask/venv/lib/python2.7/site-packages/scipy/io/matlab/mio.py | 64 | 8782 | """
Module for reading and writing matlab (TM) .mat files
"""
# Authors: Travis Oliphant, Matthew Brett
from __future__ import division, print_function, absolute_import
import numpy as np
from scipy._lib.six import string_types
from .miobase import get_matfile_version, docfiller
from .mio4 import MatFile4Reader, Ma... | apache-2.0 |
shinglyu/ns3-h264-svc | src/applications/.waf-1.5.16-e6d03192b5ddfa5ef2c8d65308e48e42/wafadmin/Options.py | 6 | 5870 | #! /usr/bin/env python
# encoding: utf-8
import os,sys,imp,types,tempfile,optparse
import Logs,Utils
from Constants import*
cmds='distclean configure build install clean uninstall check dist distcheck'.split()
commands={}
is_install=False
options={}
arg_line=[]
launch_dir=''
tooldir=''
lockfile=os.environ.get('WAFLOCK... | gpl-2.0 |
direvus/ansible | lib/ansible/modules/network/onyx/onyx_command.py | 107 | 6715 | #!/usr/bin/python
#
# Copyright: 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | gpl-3.0 |
oasiswork/odoo | addons/point_of_sale/report/pos_invoice.py | 317 | 2393 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | agpl-3.0 |
ryanmockabee/golfr | flask/lib/python3.6/site-packages/migrate/versioning/genmodel.py | 78 | 11356 | """
Code to generate a Python model from a database or differences
between a model and database.
Some of this is borrowed heavily from the AutoCode project at:
http://code.google.com/p/sqlautocode/
"""
import sys
import logging
import six
import sqlalchemy
import migrate
import migrate.changeset
log = logging.get... | mit |
Hasimir/pyjs | pyjswidgets/pyjamas/ui/TreeItem.py | 7 | 12321 | # Copyright 2006 James Tauber and contributors
# Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
# Copyright (C) 2011-2012 Vsevolod Fedorov <vsevolod.fedorov@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
... | apache-2.0 |
dancingdan/tensorflow | tensorflow/contrib/learn/python/learn/estimators/dnn.py | 26 | 38241 | # 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 |
jideobs/twilioAngular | venv/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py | 762 | 3532 | import hashlib
import os
from pip._vendor.lockfile import LockFile
from pip._vendor.lockfile.mkdirlockfile import MkdirLockFile
from ..cache import BaseCache
from ..controller import CacheController
def _secure_open_write(filename, fmode):
# We only want to write to this file, so open it in write only mode
... | mit |
alpine9000/amiga_examples | tools/external/amitools/amitools/fs/validate/DirScan.py | 1 | 6864 | from BlockScan import BlockScan
from amitools.fs.FSString import FSString
from amitools.fs.FileName import FileName
from amitools.fs.validate.Log import Log
import amitools.fs.DosType as DosType
class DirChainEntry:
"""entry of the hash chain"""
def __init__(self, blk_info):
self.blk_info = blk_info
self.p... | bsd-2-clause |
storm-computers/odoo | addons/account/models/account_bank_statement.py | 2 | 52932 | # -*- coding: utf-8 -*-
from openerp import api, fields, models, _
from openerp.osv import expression
from openerp.tools import float_is_zero
from openerp.tools import float_compare, float_round
from openerp.tools.misc import formatLang
from openerp.exceptions import UserError, ValidationError
import time
import math... | agpl-3.0 |
oaubert/advene | setup.py | 1 | 6968 | #! /usr/bin/env python3
import logging
logger = logging.getLogger(__name__)
import os
from setuptools import setup, find_packages
import sys
# We define the main script name here (file in bin), since we have to change it for MacOS X
SCRIPTNAME='advene'
def check_changelog(maindir, version):
"""Check that the ch... | gpl-2.0 |
edcast-inc/edx-platform-edcast | lms/djangoapps/bulk_email/admin.py | 71 | 3138 | """
Django admin page for bulk email models
"""
from django.contrib import admin
from bulk_email.models import CourseEmail, Optout, CourseEmailTemplate, CourseAuthorization
from bulk_email.forms import CourseEmailTemplateForm, CourseAuthorizationAdminForm
class CourseEmailAdmin(admin.ModelAdmin):
"""Admin for co... | agpl-3.0 |
vitalogy/script.xbmc.kodisp | kodisplay.py | 2 | 6480 | import os
import sys
import stat
import time
import threading
import io
import xbmc
import xbmcaddon
import xbmcgui # for window id
__addon__ = xbmcaddon.Addon()
__addonversion__ = __addon__.getAddonInfo('version')
__addonid__ = __addon__.getAddonInfo('id')
__addonname__ = __addon__.getAddonInfo('... | gpl-3.0 |
frugalware/melkotesting | t/s/installsize.py | 11 | 1492 | #!/usr/bin/env python
try:
import pacman
except ImportError:
import alpm
pacman = alpm
import os, tempfile, shutil, sys, re
archlist = None
limit = 630
if len(sys.argv) > 1:
if sys.argv[1] == "--help":
print "check if the default install fits on a single CD"
sys.exit(0)
else:
archlist = ["frugalware-%s" %... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.