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 |
|---|---|---|---|---|---|
gurneyalex/odoo | addons/mass_mailing/models/mailing_contact.py | 5 | 5454 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
from odoo.osv import expression
class MassMailingContactListRel(models.Model):
""" Intermediate model between mass mailing list and mass mailing contact
Indicates if a c... | agpl-3.0 |
programadorjc/django | django/utils/deprecation.py | 199 | 2627 | from __future__ import absolute_import
import inspect
import warnings
class RemovedInDjango20Warning(PendingDeprecationWarning):
pass
class RemovedInDjango110Warning(DeprecationWarning):
pass
RemovedInNextVersionWarning = RemovedInDjango110Warning
class warn_about_renamed_method(object):
def __init... | bsd-3-clause |
trnewman/VT-USRP-daughterboard-drivers_python | gnuradio-core/src/python/gnuradio/blks2impl/filterbank.py | 18 | 5981 | #
# Copyright 2005,2007 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your option)
# any later versi... | gpl-3.0 |
matthewAURA/MRR-Website | mrr_website/commands.py | 23 | 4250 | # -*- coding: utf-8 -*-
"""Click commands."""
import os
from glob import glob
from subprocess import call
import click
from flask import current_app
from flask.cli import with_appcontext
from werkzeug.exceptions import MethodNotAllowed, NotFound
HERE = os.path.abspath(os.path.dirname(__file__))
PROJECT_ROOT = os.path... | bsd-3-clause |
luciferz2012/ShadowsocksFork | shadowsocks/encrypt.py | 990 | 5180 | #!/usr/bin/env python
#
# Copyright 2012-2015 clowwindy
#
# 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 |
dannywxh/mypy | spider/avso.py | 1 | 5739 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, re, time, sys
from bs4 import BeautifulSoup
import common
import requests
reload(sys)
#print sys.getdefaultencoding()
sys.setdefaultencoding('utf-8')
print sys.getdefaultencoding()
def download_html(url):
headers = {'Accept': 'text/html,application/... | apache-2.0 |
roadmapper/ansible | test/units/modules/network/onyx/test_onyx_ntp_servers_peers.py | 9 | 5679 | #
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.onyx impor... | gpl-3.0 |
valexandersaulys/airbnb_kaggle_contest | venv/lib/python3.4/site-packages/scipy/optimize/tests/test_zeros.py | 59 | 1963 | #!/usr/bin/env python
from __future__ import division, print_function, absolute_import
from math import sqrt, exp, sin, cos
from numpy.testing import (TestCase, assert_almost_equal, assert_warns,
assert_, run_module_suite, assert_allclose)
from scipy.optimize import zeros as cc
from scipy.... | gpl-2.0 |
damchilly/tweepy | tweepy/models.py | 56 | 14021 | # Tweepy
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
from __future__ import absolute_import, print_function
from tweepy.utils import parse_datetime, parse_html_value, parse_a_href
class ResultSet(list):
"""A list like object that holds results from a Twitter API query."""
def __init__(... | mit |
psychopy/psychopy | psychopy/experiment/py2js.py | 1 | 7669 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
"""Converting code parameters and components from python (PsychoPy)
to JS (ES6/PsychoJS)
"... | gpl-3.0 |
tonybaloney/st2contrib | packs/github/actions/lib/base.py | 3 | 4377 | from github import Github
import requests
from bs4 import BeautifulSoup
import json
from st2actions.runners.pythonrunner import Action
__all__ = [
'BaseGithubAction'
]
# Default Github web URL (used by tasks which directly scrape data from HTML)
# pages
DEFAULT_WEB_URL = 'https://github.com'
# Default Github AP... | apache-2.0 |
Matt-Deacalion/django | django/conf/locale/id/formats.py | 504 | 2135 | # -*- 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 = 'j N Y'
DATETIME_FORMAT = "j N Y, ... | bsd-3-clause |
exp-publishing/cloudbot-plugins | plugins/gaming.py | 1 | 4430 | """
gaming.py
Dice, coins, and random generation for gaming.
Modified By:
- Luke Rogers <https://github.com/lukeroge>
- Josh Elsasser <https://github.com/jaelsasser>
License:
GPL v3
"""
import asyncio
import random
import re
from cloudbot import hook
whitespace_re = re.compile(r'\s+')
valid_diceroll ... | gpl-3.0 |
ivmech/iviny-scope | lib/xlsxwriter/test/comparison/test_outline04.py | 1 | 2728 | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013, John McNamara, jmcnamara@cpan.org
#
import unittest
import os
from ...workbook import Workbook
from ..helperfunctions import _compare_xlsx_files
class TestCompareXLSXFiles(unittest.TestC... | gpl-3.0 |
defionscode/ansible-modules-core | utilities/logic/debug.py | 66 | 2141 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2012 Dag Wieers <dag@wieers.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 Lice... | gpl-3.0 |
prabhjyotsingh/incubator-zeppelin | flink/interpreter/src/main/resources/python/zeppelin_pyflink.py | 10 | 2806 | #
# 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 |
kbdick/RecycleTracker | recyclecollector/scrap/gdata-2.0.18/src/gdata/Crypto/PublicKey/qNEW.py | 228 | 5545 | #
# qNEW.py : The q-NEW signature algorithm.
#
# Part of the Python Cryptography Toolkit
#
# Distribute and use freely; there are no restrictions on further
# dissemination and usage except those imposed by the laws of your
# country of residence. This software is provided "as is" without
# warranty of fitness fo... | gpl-3.0 |
clstl/servo | tests/wpt/css-tests/tools/html5lib/doc/conf.py | 436 | 9028 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# html5lib documentation build configuration file, created by
# sphinx-quickstart on Wed May 8 00:04:49 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
# aut... | mpl-2.0 |
MatthewWilkes/django | tests/schema/fields.py | 141 | 2818 | from django.db import models
from django.db.models.fields.related import (
RECURSIVE_RELATIONSHIP_CONSTANT, ManyToManyDescriptor, ManyToManyField,
ManyToManyRel, RelatedField, create_many_to_many_intermediary_model,
)
from django.utils.functional import curry
class CustomManyToManyField(RelatedField):
"""... | bsd-3-clause |
simbha/mAngE-Gin | lib/Django 1.7/django/core/exceptions.py | 40 | 5079 | """
Global Django exception and warning classes.
"""
from functools import reduce
import operator
from django.utils import six
from django.utils.encoding import force_text
class DjangoRuntimeWarning(RuntimeWarning):
pass
class AppRegistryNotReady(Exception):
"""The django.apps registry is not populated yet... | mit |
nash-x/hws | nova/api/openstack/compute/limits.py | 6 | 16528 | # Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 |
prasunroypr/digit-recognizer | source/defs.py | 1 | 6607 | ################################################################################
"""
Functions for Digit Recognition
Created on Wed Jun 01 00:00:00 2016
@author: Prasun Roy
@e-mail: prasunroy.pr@gmail.com
"""
################################################################################
# import modules
import ma... | gpl-3.0 |
UAlbanyArchives/asInventory | archives_tools/migrateCMS.py | 3 | 5481 | import aspace as AS
import datetime
from openpyxl import load_workbook
import os
if os.name == "nt":
#Windows Directory Names
#Collection and Subject spreadsheets directory
spreadDir = "\\\\romeo\\Collect\spe\\Tools\\CollectionList"
cmsDir = "\\\\romeo\\Collect\\spe\\Greg\\CMSdata"
else:
#Unix directory names
... | unlicense |
endolith/scikit-image | skimage/feature/tests/test_util.py | 35 | 2818 | import numpy as np
try:
import matplotlib.pyplot as plt
except ImportError:
plt = None
from numpy.testing import assert_equal, assert_raises
from skimage.feature.util import (FeatureDetector, DescriptorExtractor,
_prepare_grayscale_input_2D,
_mask... | bsd-3-clause |
alexsavio/scikit-learn | examples/model_selection/plot_roc_crossval.py | 21 | 3477 | """
=============================================================
Receiver Operating Characteristic (ROC) with cross validation
=============================================================
Example of Receiver Operating Characteristic (ROC) metric to evaluate
classifier output quality using cross-validation.
ROC curv... | bsd-3-clause |
partofthething/home-assistant | homeassistant/components/pushsafer/notify.py | 1 | 6128 | """Pushsafer platform for notify component."""
import base64
import logging
import mimetypes
import requests
from requests.auth import HTTPBasicAuth
import voluptuous as vol
from homeassistant.components.notify import (
ATTR_DATA,
ATTR_TARGET,
ATTR_TITLE,
ATTR_TITLE_DEFAULT,
PLATFORM_SCHEMA,
B... | mit |
themadinventor/gerbmerge | gerbmerge/specs.py | 8 | 10158 | #!/usr/bin/env python
"""
Regular expression, SimpleParse, ane message constants.
Requires:
- SimpleParse 2.1 or higher
http://simpleparse.sourceforge.net
--------------------------------------------------------------------
This program is licensed under the GNU General ... | gpl-3.0 |
jmesteve/saas3 | openerp/addons/mrp_operations/report/mrp_code_barcode.py | 381 | 1511 | # -*- 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... | agpl-3.0 |
rui-castro/Sick-Beard | lib/cherrypy/_cpthreadinglocal.py | 68 | 6619 | # This is a backport of Python-2.4's threading.local() implementation
"""Thread-local objects
(Note that this module provides a Python version of thread
threading.local class. Depending on the version of Python you're
using, there may be a faster one available. You should always import
the local class from threa... | gpl-3.0 |
maryklayne/Funcao | sympy/physics/quantum/density.py | 10 | 9893 | from __future__ import print_function, division
from itertools import product
from sympy import Tuple, Add, Mul, Matrix, log, expand, sqrt, Rational
from sympy.core.trace import Tr
from sympy.core.compatibility import u
from sympy.printing.pretty.stringpict import prettyForm
from sympy.physics.quantum.dagger import D... | bsd-3-clause |
thandang/TComponent | TComponents/cpp/scons/scons-local-2.0.0.final.0/SCons/Tool/jar.py | 34 | 3877 | """SCons.Tool.jar
Tool-specific initialization for jar.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
#
# P... | apache-2.0 |
ammarkhann/FinalSeniorCode | lib/python2.7/site-packages/dateutil/zoneinfo/__init__.py | 48 | 6810 | # -*- coding: utf-8 -*-
import logging
import os
import warnings
import tempfile
import shutil
import json
from tarfile import TarFile
from pkgutil import get_data
from io import BytesIO
from contextlib import closing
from dateutil.tz import tzfile
__all__ = ["get_zonefile_instance", "gettz", "gettz_db_metadata", "r... | mit |
eamuntz/Django-Tut | env/lib/python2.7/site-packages/setuptools/command/alias.py | 285 | 2486 | import distutils, os
from setuptools import Command
from distutils.util import convert_path
from distutils import log
from distutils.errors import *
from setuptools.command.setopt import edit_config, option_base, config_file
def shquote(arg):
"""Quote an argument for later parsing by shlex.split()"""
for c in ... | mit |
thaumos/ansible | lib/ansible/modules/network/f5/bigip_management_route.py | 38 | 13077 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 |
TNT-Samuel/Coding-Projects | DNS Server/Source/Lib/site-packages/ptpython/validator.py | 3 | 1664 | from __future__ import unicode_literals
from prompt_toolkit.validation import Validator, ValidationError
__all__ = (
'PythonValidator',
)
class PythonValidator(Validator):
"""
Validation of Python input.
:param get_compiler_flags: Callable that returns the currently
active compiler flags.
... | gpl-3.0 |
omprakasha/odoo | addons/fleet/__openerp__.py | 267 | 2245 | # -*- 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 |
GeoODK/onadata | onadata/libs/serializers/share_xform_serializer.py | 10 | 1537 | from django.core.validators import ValidationError
from django.contrib.auth.models import User
from django.utils.translation import ugettext as _
from rest_framework import serializers
from onadata.libs.models.share_xform import ShareXForm
from onadata.libs.permissions import ROLES
from onadata.libs.serializers.fields... | bsd-2-clause |
MLAB-project/gerbmerge3 | gerbmerge/drillcluster.py | 2 | 5506 | #!/usr/bin/env python
"""
Drill clustering routines to reduce total number of drills and remap
drilling commands to the new reduced drill set.
--------------------------------------------------------------------
This program is licensed under the GNU General Public License (GPL)
Version 3. See http://www.fsf.org fo... | gpl-3.0 |
icloudrnd/automation_tools | openstack_dashboard/dashboards/project/overview/tests.py | 9 | 13372 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... | apache-2.0 |
stosdev/zebra-supervisor | judge/migrations/0002_initial_data.py | 2 | 1109 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from django.core import serializers
from django.conf import settings
import os
FIXTURE_DIR = getattr(settings, 'FIXTURE_DIR', os.path.dirname(__file__))
def get_fixture_file_paths():
fixture_file_paths = []
fo... | gpl-3.0 |
gitgitcode/myflask | venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.py | 1777 | 19348 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | mit |
Peddle/hue | desktop/core/ext-py/lxml-3.3.6/src/lxml/tests/test_elementtree.py | 11 | 129094 | # -*- coding: utf-8 -*-
"""
Tests for the ElementTree API
Only test cases that apply equally well to etree and ElementTree
belong here. Note that there is a second test module called test_io.py
for IO related test cases.
"""
import unittest
import os, re, tempfile, copy, operator, gc, sys
this_dir = os.path.dirname... | apache-2.0 |
isnnn/Sick-Beard-TPB | lib/hachoir_parser/file_system/fat.py | 90 | 16185 | from lib.hachoir_core.compatibility import sorted
from lib.hachoir_parser import Parser
from lib.hachoir_core.field import (FieldSet, StaticFieldSet,
RawBytes, PaddingBytes, createPaddingField, Link, Fragment,
Bit, Bits, UInt8, UInt16, UInt32,
String, Bytes, NullBytes)
from lib.hachoir_core.field.integer im... | gpl-3.0 |
narantech/linux-rpi | tools/perf/scripts/python/net_dropmonitor.py | 2669 | 1738 | # Monitor the system for dropped packets and proudce a report of drop locations and counts
import os
import sys
sys.path.append(os.environ['PERF_EXEC_PATH'] + \
'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
from perf_trace_context import *
from Core import *
from Util import *
drop_log = {}
kallsyms = []
def... | gpl-2.0 |
blaggacao/odoo | addons/gamification/models/res_users.py | 386 | 4010 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the ... | agpl-3.0 |
slowfranklin/samba | source3/selftest/tests.py | 6 | 31988 | #!/usr/bin/python
# This script generates a list of testsuites that should be run as part of
# the Samba 3 test suite.
# The output of this script is parsed by selftest.pl, which then decides
# which of the tests to actually run. It will, for example, skip all tests
# listed in selftest/skip or only run a subset durin... | gpl-3.0 |
teemulehtinen/a-plus | exercise/cache/hierarchy.py | 3 | 10105 | from course.models import CourseModule, LearningObjectCategory
from ..models import LearningObject
class NoSuchContent(Exception):
pass
class HierarchyIterator(object):
def __init__(self, children, idx=None, tree=None, visited=False, enclosed=True):
if idx is None:
self._default_start(c... | gpl-3.0 |
thortex/rpi3-webiopi | webiopi_0.7.1/python/webiopi/devices/onewire.py | 1 | 2571 | # Copyright 2012-2013 Eric Ptak - trouch.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/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 |
jkandasa/integration_tests | cfme/utils/soft_get.py | 10 | 3289 | import collections
from difflib import SequenceMatcher
class MultipleResultsException(Exception):
pass
def soft_get(obj,
field_base_name,
dict_=False,
case_sensitive=False,
best_match=True,
dont_include=None):
"""
This function used for ca... | gpl-2.0 |
Jollytown/Garuda | server/garuda/lib/python2.7/site-packages/django/db/models/aggregates.py | 89 | 2785 | """
Classes to represent the definitions of aggregate functions.
"""
from django.db.models.constants import LOOKUP_SEP
__all__ = [
'Aggregate', 'Avg', 'Count', 'Max', 'Min', 'StdDev', 'Sum', 'Variance',
]
def refs_aggregate(lookup_parts, aggregates):
"""
A little helper method to check if the lookup_part... | mit |
madjam/mxnet | example/warpctc/lstm_model.py | 28 | 2886 | # 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 |
nhicher/ansible | lib/ansible/modules/network/fortimanager/fmgr_sys_proxy.py | 16 | 5657 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | gpl-3.0 |
pymedusa/Medusa | ext/oauthlib/oauth1/rfc5849/parameters.py | 6 | 4969 | # -*- coding: utf-8 -*-
"""
oauthlib.parameters
~~~~~~~~~~~~~~~~~~~
This module contains methods related to `section 3.5`_ of the OAuth 1.0a spec.
.. _`section 3.5`: https://tools.ietf.org/html/rfc5849#section-3.5
"""
from __future__ import absolute_import, unicode_literals
from oauthlib.common import extract_params... | gpl-3.0 |
erja-gp/openthread | tools/harness-automation/cases/router_7_1_2.py | 16 | 1875 | #!/usr/bin/env python
#
# Copyright (c) 2016, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notic... | bsd-3-clause |
zhangjunlei26/servo | python/servo/build_commands.py | 2 | 12033 | # Copyright 2013 The Servo Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
#... | mpl-2.0 |
NumCosmo/NumCosmo | examples/example_ode_spline.py | 1 | 1165 | #!/usr/bin/env python
try:
import gi
gi.require_version('NumCosmo', '1.0')
gi.require_version('NumCosmoMath', '1.0')
except:
pass
import ctypes
from math import *
from gi.repository import NumCosmoMath as Ncm
from gi.repository import NumCosmo as Nc
from gi.repository import GObject
#
# Initializing the lib... | gpl-3.0 |
neilhan/tensorflow | tensorflow/python/training/slot_creator.py | 27 | 4034 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
Geodan/natuurbandmodel | server-wps/wildfire_makelcp.py | 1 | 1431 | from geoserver.wps import process
from com.ziclix.python.sql import zxJDBC
jdbc_url = "jdbc:postgresql://192.168.40.5:3389/research"
username = "modeluser"
password = "modeluser"
driver = "org.postgresql.Driver"
cgi_url = "http://model.geodan.nl/main/gmi/cgi-bin/"
@process(
title='MakeLcp',
description='... | mit |
mindnervestech/mnrp | addons/hr/hr.py | 141 | 20357 | # -*- 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 |
TimYi/django | django/views/decorators/clickjacking.py | 335 | 1744 | from functools import wraps
from django.utils.decorators import available_attrs
def xframe_options_deny(view_func):
"""
Modifies a view function so its response has the X-Frame-Options HTTP
header set to 'DENY' as long as the response doesn't already have that
header set.
e.g.
@xframe_optio... | bsd-3-clause |
grengojbo/st2 | st2api/st2api/controllers/v1/runnertypes.py | 7 | 2642 | # Licensed to the StackStorm, Inc ('StackStorm') 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 use th... | apache-2.0 |
odoo-turkiye/odoo | addons/account_sequence/__init__.py | 433 | 1104 | # -*- 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 |
openhatch/oh-mainline | vendor/packages/twisted/twisted/conch/client/agent.py | 69 | 1730 | # -*- test-case-name: twisted.conch.test.test_default -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Accesses the key agent for user authentication.
Maintainer: Paul Swartz
"""
import os
from twisted.conch.ssh import agent, channel, keys
from twisted.internet import protocol, reacto... | agpl-3.0 |
frederica07/Dragon_Programming_Process | PyOpenGL-3.0.2/OpenGL/GL/EXT/cmyka.py | 1 | 1439 | '''OpenGL extension EXT.cmyka
This module customises the behaviour of the
OpenGL.raw.GL.EXT.cmyka to provide a more
Python-friendly API
Overview (from the spec)
This extension provides a simple method for OpenGL to read and store
images whose pixels have CMYK or CMYKA formats. The algorithms used to
convert t... | bsd-2-clause |
RobertoMalatesta/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/watchlist/changedlinepattern_unittest.py | 124 | 3268 | # Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | bsd-3-clause |
neerja28/Tempest | tempest/api/object_storage/test_account_services.py | 4 | 14435 | # Copyright 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 |
andymckay/olympia | src/olympia/stats/tasks.py | 4 | 13311 | import datetime
import httplib2
import itertools
from django.conf import settings
from django.db import connection
from django.db.models import Sum, Max
import commonware.log
from apiclient.discovery import build
from elasticsearch.helpers import bulk_index
from oauth2client.client import OAuth2Credentials
from olym... | bsd-3-clause |
chokribr/invenio | invenio/legacy/bibknowledge/admin.py | 13 | 31360 | # This file is part of Invenio.
# Copyright (C) 2009, 2010, 2011, 2012, 2013 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 v... | gpl-2.0 |
leggitta/mne-python | mne/realtime/mockclient.py | 15 | 6139 | # Authors: Mainak Jas <mainak@neuro.hut.fi>
# Denis Engemann <denis.engemann@gmail.com>
# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
#
# License: BSD (3-clause)
import copy
import numpy as np
from ..event import find_events
class MockRtClient(object):
"""Mock Realtime Client
... | bsd-3-clause |
Celedhrim/persomov | libs/tornado/platform/select.py | 79 | 2633 | #!/usr/bin/env python
#
# Copyright 2012 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... | gpl-3.0 |
chaowu2009/stereo-vo | tools/capture_TwoCameras_saveImagesOnly.py | 1 | 2289 | import numpy as np
import cv2
import time
import matplotlib.pylab as plt
"""
Make sure that you hold the checkerboard horizontally (more checkers horizontally than vertically).
In order to get a good calibration you will need to move the checkerboard around in the camera frame such that:
the checkerboard is det... | mit |
dnikulin/jula | scripts/make_classes.py | 1 | 3287 | # Copyright (C) 2011 Dmitri Nikulin
#
# 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 |
biboc/RIOT | tests/struct_tm_utility/tests/01-run.py | 32 | 4017 | #!/usr/bin/env python3
# Copyright (C) 2017 Inria
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import sys
import calendar
import datetime
from testrunner import run
def _check_help(child):
... | lgpl-2.1 |
huntxu/python-neutronclient | neutronclient/neutron/v2_0/rbac.py | 3 | 3975 | # Copyright 2015 Huawei Technologies India Pvt Ltd.
# 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
#
# ... | apache-2.0 |
yask123/django | django/utils/timezone.py | 338 | 11027 | """
Timezone-related classes and functions.
This module uses pytz when it's available and fallbacks when it isn't.
"""
import sys
import time as _time
from datetime import datetime, timedelta, tzinfo
from threading import local
from django.conf import settings
from django.utils import lru_cache, six
from django.util... | bsd-3-clause |
Canpio/Paddle | python/paddle/trainer_config_helpers/tests/configs/test_rnn_group.py | 7 | 2072 | # Copyright (c) 2018 PaddlePaddle 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 app... | apache-2.0 |
MarkusHackspacher/unknown-horizons | horizons/ai/aiplayer/building/firestation.py | 1 | 3179 | # ###################################################
# Copyright (C) 2008-2017 The Unknown Horizons Team
# team@unknown-horizons.org
# This file is part of Unknown Horizons.
#
# Unknown Horizons is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published ... | gpl-2.0 |
nvoron23/arangodb | 3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_augassign.py | 75 | 7968 | # Augmented assignment test.
from test.test_support import run_unittest
import unittest
class AugAssignTest(unittest.TestCase):
def testBasic(self):
x = 2
x += 1
x *= 2
x **= 2
x -= 8
x //= 5
x %= 3
x &= 2
x |= 5
x ^= 1
x /= ... | apache-2.0 |
EDUlib/eTracesX | Scripts/ExtractCours.py | 1 | 2359 | #!/usr/bin/python
import sys
import getopt
import re
import random
def main(argv):
inputfile = ''
outputfile = ''
try:
opts, args = getopt.getopt(argv,"hi:o:",["ifile=","ofile="])
except getopt.GetoptError:
print 'test.py -i <inputfile> -o <outputfile>'
sys.exit(2)
for opt,... | agpl-3.0 |
imsplitbit/nova | nova/api/openstack/compute/contrib/cells.py | 1 | 15576 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011-2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.... | apache-2.0 |
Triv90/Heat | heat/tests/test_parser.py | 1 | 49333 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | apache-2.0 |
mrquim/mrquimrepo | plugin.video.playlistLoader/resources/lib/chardet/langthaimodel.py | 2930 | 11275 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | gpl-2.0 |
burnash/skype4py | Skype4Py/lang/no.py | 23 | 6713 | apiAttachAvailable = u'API tilgjengelig'
apiAttachNotAvailable = u'Ikke tilgjengelig'
apiAttachPendingAuthorization = u'Venter p\xe5 \xe5 bli godkjent'
apiAttachRefused = u'Avsl\xe5tt'
apiAttachSuccess = u'Vellykket'
apiAttachUnknown = u'Ukjent'
budDeletedFriend = u'Slettet fra kontaktlisten'
budFriend = u'Venn'
budNev... | bsd-3-clause |
inflatus/Python | Weather/weather_email.py | 1 | 2252 | # using JSON and the WeatherUnderground API
# parsing data and emailing it to myself
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import urllib.request
import json
from API_KEYS import EMAIL_ADDRESS, EMAIL_PASSWORD
from API_KEYS import WEATHER_UNDERGROUND_KEY
# g... | mit |
dennybaa/st2 | st2reactor/st2reactor/rules/filter.py | 2 | 7444 | # Licensed to the StackStorm, Inc ('StackStorm') 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 use th... | apache-2.0 |
t-wissmann/qutebrowser | qutebrowser/mainwindow/tabbedbrowser.py | 1 | 40900 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser 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 S... | gpl-3.0 |
csachs/openmicroscopy | components/tools/OmeroWeb/omeroweb/urls.py | 7 | 3131 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#
#
# Copyright (c) 2008-2014 University of Dundee.
#
# 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... | gpl-2.0 |
nthien/pulp | server/test/unit/server/webservices/views/test_permissions.py | 14 | 10904 | import json
import unittest
import mock
from base import assert_auth_EXECUTE, assert_auth_READ
from pulp.server.exceptions import MissingValue
from pulp.server.webservices.views.permissions import (GrantToRoleView, GrantToUserView,
PermissionView, RevokeFromRoleV... | gpl-2.0 |
academic-colab/maslo-server | FTS.py | 1 | 5261 | #!/usr/bin/env python
'''
/******************************************************************************
* FTS.py
*
* Copyright (c) 2011-2012, Academic ADL Co-Lab, University of Wisconsin-Extension
* http://www.academiccolab.org/
*
* This library is free software; you can redistribute it and/or
* modify it under the ... | gpl-3.0 |
zakuro9715/lettuce | tests/integration/lib/Django-1.2.5/django/core/cache/backends/locmem.py | 46 | 4062 | "Thread-safe in-memory cache backend."
import time
try:
import cPickle as pickle
except ImportError:
import pickle
from django.core.cache.backends.base import BaseCache
from django.utils.synch import RWLock
class CacheClass(BaseCache):
def __init__(self, _, params):
BaseCache.__init__(self, param... | gpl-3.0 |
madformuse/server | server/natpacketserver.py | 1 | 1848 | import socket
from server.subscribable import Subscribable
from .decorators import with_logger
@with_logger
class NatPacketServer(Subscribable):
def __init__(self, loop, port):
super().__init__()
self.loop = loop
self.port = port
self._logger.debug("{id} Listening on {port}".forma... | gpl-3.0 |
spinellic/Mission-Planner | Lib/distutils/cygwinccompiler.py | 54 | 17719 | """distutils.cygwinccompiler
Provides the CygwinCCompiler class, a subclass of UnixCCompiler that
handles the Cygwin port of the GNU C compiler to Windows. It also contains
the Mingw32CCompiler class which handles the mingw32 port of GCC (same as
cygwin in no-cygwin mode).
"""
# problems:
#
# * if you use ... | gpl-3.0 |
bagel/mongo-web-shell | webapps/lib/db.py | 3 | 1457 | # Copyright 2013 10gen 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... | apache-2.0 |
SandPox/android_kernel_samsung_kyleproxx | tools/perf/python/twatch.py | 7370 | 1334 | #! /usr/bin/python
# -*- python -*-
# -*- coding: utf-8 -*-
# twatch - Experimental use of the perf python interface
# Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com>
#
# This application is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License... | gpl-2.0 |
belmiromoreira/nova | nova/filters.py | 30 | 3113 | # Copyright (c) 2011-2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | apache-2.0 |
tdliu/hoop-picks | lib/requests/sessions.py | 115 | 26216 | # -*- coding: utf-8 -*-
"""
requests.session
~~~~~~~~~~~~~~~~
This module provides a Session object to manage and persist settings across
requests (cookies, auth, proxies).
"""
import os
from collections import Mapping
from datetime import datetime
from .auth import _basic_auth_str
from .compat import cookielib, Ord... | apache-2.0 |
PierreRaybaut/PythonQwt | doc/symbol_path_example.py | 1 | 1089 | from qtpy import QtWidgets as QW
from qtpy import QtGui as QG
from qtpy import QtCore as QC
import qwt
import numpy as np
import os.path as osp
app = QW.QApplication([])
# --- Construct custom symbol ---
path = QG.QPainterPath()
path.moveTo(0, 8)
path.lineTo(0, 5)
path.lineTo(-3, 5)
path.lineTo(0, 0)
path.lineTo(3, ... | lgpl-2.1 |
ecederstrand/django | django/test/client.py | 132 | 26745 | from __future__ import unicode_literals
import json
import mimetypes
import os
import re
import sys
from copy import copy
from importlib import import_module
from io import BytesIO
from django.apps import apps
from django.conf import settings
from django.core import urlresolvers
from django.core.handlers.base import ... | bsd-3-clause |
sayakbiswas/CloudLang | CloudLangNeuralNets/NER/utils.py | 2 | 8718 | import os
import re
import codecs
import numpy as np
import theano
models_path = "./models"
eval_path = "./evaluation"
eval_temp = os.path.join(eval_path, "temp")
eval_script = os.path.join(eval_path, "conlleval")
def get_name(parameters):
"""
Generate a model name from its parameters.
"""
l = []
... | mit |
martinwicke/tensorflow | tensorflow/python/kernel_tests/sparse_tensor_dense_matmul_grad_test.py | 20 | 2885 | # 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.