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 |
|---|---|---|---|---|---|
bkirui/odoo | addons/base_report_designer/plugin/openerp_report_designer/bin/script/Change.py | 293 | 4692 | #########################################################################
#
# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
# Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>).
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser Gene... | agpl-3.0 |
p0psicles/SickRage | lib/chardet/mbcsgroupprober.py | 343 | 2012 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | gpl-3.0 |
wdv4758h/ZipPy | edu.uci.python.benchmark/src/benchmarks/sympy/sympy/logic/tests/test_boolalg.py | 4 | 17882 | from sympy import (symbols, sympify, Dummy, simplify, Equality, S, Interval,
oo, EmptySet)
from sympy.logic.boolalg import (
And, Boolean, Equivalent, ITE, Implies, Nand, Nor, Not, Or, POSform,
SOPform, Xor, conjuncts, disjuncts, distribute_or_over_and,
distribute_and_over_or, eliminate_i... | bsd-3-clause |
CreamyCookie/pgu | examples/gui14.py | 13 | 2300 | """an example of add, remove for several container types"""
#this example contains a bit of a HACK
#when something is added/removed, chsize() may need to be called
#to ensure proper refresh of the screen, etc
#this may be fixed in the future, but for now, chsize must be called
#by hand
import pygame
from pygame.local... | lgpl-2.1 |
kspviswa/personfinder | app/model.py | 2 | 42319 | #!/usr/bin/python2.7
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 |
linebp/pandas | pandas/tests/series/test_indexing.py | 1 | 88099 | # coding=utf-8
# pylint: disable-msg=E1101,W0612
import pytest
from datetime import datetime, timedelta
from numpy import nan
import numpy as np
import pandas as pd
import pandas._libs.index as _index
from pandas.core.dtypes.common import is_integer, is_scalar
from pandas import (Index, Series, DataFrame, isnull,
... | bsd-3-clause |
googlefonts/noto-emoji | materialize_emoji_images.py | 1 | 4076 | #!/usr/bin/env python3
#
# 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 requir... | apache-2.0 |
petalyaa/htc-evo3d-shooteru | scripts/tracing/draw_functrace.py | 14676 | 3560 | #!/usr/bin/python
"""
Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
Licensed under the terms of the GNU GPL License version 2
This script parses a trace provided by the function tracer in
kernel/trace/trace_functions.c
The resulted trace is processed into a tree to produce a more human
view of the call ... | gpl-2.0 |
pkali/piradio-mini | rss_class.py | 2 | 4664 | #!/usr/bin/python
# -*- coding: latin-1 -*-
#
# $Id: rss_class.py,v 1.25 2017/04/26 08:18:25 bob Exp $
# Raspberry Pi RSS feed class
#
# Author : Bob Rathbone
# Site : http://www.bobrathbone.com
#
# License: GNU V3, See https://www.gnu.org/copyleft/gpl.html
#
# Disclaimer: Software is provided as is and absolutly no ... | gpl-3.0 |
V11/volcano | server/sqlmap/tamper/space2dash.py | 10 | 1235 | #!/usr/bin/env python
"""
Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
import random
import string
from lib.core.enums import PRIORITY
__priority__ = PRIORITY.LOW
def tamper(payload, **kwargs):
"""
Replaces space character (' ') with a... | mit |
arahuja/scikit-learn | benchmarks/bench_20newsgroups.py | 377 | 3555 | from __future__ import print_function, division
from time import time
import argparse
import numpy as np
from sklearn.dummy import DummyClassifier
from sklearn.datasets import fetch_20newsgroups_vectorized
from sklearn.metrics import accuracy_score
from sklearn.utils.validation import check_array
from sklearn.ensemb... | bsd-3-clause |
esacosta/u-mooc | common/schema_fields.py | 1 | 5958 | # Copyright 2012 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 ... | apache-2.0 |
hongliang5623/sentry | src/sentry/migrations/0156_auto__add_apikey.py | 35 | 34329 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'ApiKey'
db.create_table('sentry_apikey', (
('... | bsd-3-clause |
rue89-tech/edx-platform | common/djangoapps/util/json_request.py | 110 | 2635 | from functools import wraps
import json
from django.core.serializers import serialize
from django.core.serializers.json import DjangoJSONEncoder
from django.db.models.query import QuerySet
from django.http import HttpResponse, HttpResponseBadRequest
def expect_json(view_function):
"""
View decorator for simpl... | agpl-3.0 |
oppo-source/Find7-4.3-kernel-source | scripts/gcc-wrapper.py | 1276 | 3382 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2011-2012, The Linux Foundation. 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 th... | gpl-2.0 |
olapaola/olapaola-android-scripting | python/src/Mac/Modules/help/helpscan.py | 34 | 1968 | # Scan an Apple header file, generating a Python file of generator calls.
import sys
from bgenlocations import TOOLBOXDIR, BGENDIR
sys.path.append(BGENDIR)
from scantools import Scanner
LONG = "MacHelp"
SHORT = "help"
OBJECT = "NOTUSED"
def main():
input = LONG + ".h"
output = SHORT + "gen.py"
defsoutput... | apache-2.0 |
TNosredna/CouchPotatoServer | libs/requests/packages/urllib3/poolmanager.py | 60 | 6453 | # urllib3/poolmanager.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import logging
from ._collections import RecentlyUsedContainer
from .connectionpool import... | gpl-3.0 |
philipbl/home-assistant | homeassistant/components/binary_sensor/ecobee.py | 18 | 2219 | """
Support for Ecobee sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.ecobee/
"""
from homeassistant.components import ecobee
from homeassistant.components.binary_sensor import BinarySensorDevice
DEPENDENCIES = ['ecobee']
ECOBEE_... | mit |
mhvk/astropy | astropy/nddata/tests/test_flag_collection.py | 12 | 1485 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import pytest
import numpy as np
from astropy.nddata import FlagCollection
def test_init():
FlagCollection(shape=(1, 2, 3))
def test_init_noshape():
with pytest.raises(Exception) as exc:
FlagCollection()
assert exc.value.args[0] ... | bsd-3-clause |
fedora-infra/the-new-hotness | hotness/exceptions/http_exception.py | 1 | 1465 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2021 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This ... | lgpl-2.1 |
kerstin/moviepy | moviepy/video/fx/accel_decel.py | 16 | 1224 | def f_accel_decel(t, old_d, new_d, abruptness=1, soonness=1.0):
"""
abruptness
negative abruptness (>-1): speed up down up
zero abruptness : no effect
positive abruptness: speed down up down
soonness
for positive abruptness, determines how soon the
speedup occurs (0<soon... | mit |
airbnb/airflow | tests/providers/sendgrid/utils/test_emailer.py | 7 | 5032 | #
# 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... | apache-2.0 |
trevor/mailman3 | src/mailman/runners/tests/test_outgoing.py | 2 | 21846 | # Copyright (C) 2011-2014 by the Free Software Foundation, Inc.
#
# This file is part of GNU Mailman.
#
# GNU Mailman 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 you... | gpl-3.0 |
google/llvm-propeller | lldb/test/API/functionalities/type_completion/TestTypeCompletion.py | 8 | 5931 | """
Check that types only get completed when necessary.
"""
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class TypeCompletionTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@expectedFailureAll(
compiler=... | apache-2.0 |
LEPT-Development/android_kernel_lge_msm8916 | tools/perf/tests/attr.py | 3174 | 9441 | #! /usr/bin/python
import os
import sys
import glob
import optparse
import tempfile
import logging
import shutil
import ConfigParser
class Fail(Exception):
def __init__(self, test, msg):
self.msg = msg
self.test = test
def getMsg(self):
return '\'%s\' - %s' % (self.test.path, self.msg)... | gpl-2.0 |
tangyiyong/odoo | openerp/addons/base/ir/ir_ui_menu.py | 316 | 20548 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2012 OpenERP SA (<http://openerp.com>).
#
# This program is free software: you can ... | agpl-3.0 |
ladarat/python_koans | python2/koans/about_none.py | 16 | 1610 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Based on AboutNil in the Ruby Koans
#
from runner.koan import *
class AboutNone(Koan):
def test_none_is_an_object(self):
"Unlike NULL in a lot of languages"
self.assertEqual(True, isinstance(None, object))
def test_none_is_universal(self):
... | mit |
LCBRU/reporter | reporter/uhl_reports/fast/data_quality/screening_clinic_redcap_dq.py | 1 | 3307 | #!/usr/bin/env python3
from reporter.core import Schedule
from reporter.connections import RedcapInstance
from reporter.emailing import (
RECIPIENT_FAST_MANAGER,
RECIPIENT_FAST_ADMIN,
)
from reporter.application_abstract_reports.redcap.data_quality import (
RedcapMissingDataWhen,
RedcapMissin... | mit |
dholbach/snapcraft | snapcraft/_options.py | 1 | 4962 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2016 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the h... | gpl-3.0 |
ekaakurniawan/Bioinformatics-Tools | DnC_LocalAlignment/DnC_LocalAlignment.py | 1 | 6963 | # Copyright (C) 2012 by Eka A. Kurniawan
# eka.a.kurniawan(ta)gmail(tod)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; version 2 of the License.
#
# This program is distributed in the hop... | gpl-2.0 |
asgard-lab/neutron | neutron/db/migration/alembic_migrations/versions/liberty/expand/8675309a5c4f_rbac_network.py | 39 | 1649 | # Copyright 2015 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | apache-2.0 |
academicpages/academicpages.github.io | markdown_generator/publications.py | 197 | 3887 |
# coding: utf-8
# # Publications markdown generator for academicpages
#
# Takes a TSV of publications with metadata and converts them for use with [academicpages.github.io](academicpages.github.io). This is an interactive Jupyter notebook, with the core python code in publications.py. Run either from the `markdown_g... | mit |
harmy/kbengine | kbe/src/lib/python/Lib/test/test_xml_etree_c.py | 49 | 1980 | # xml.etree test for cElementTree
from test import support
from test.support import precisionbigmemtest, _2G
import unittest
cET = support.import_module('xml.etree.cElementTree')
# cElementTree specific tests
def sanity():
r"""
Import sanity.
>>> from xml.etree import cElementTree
Issue #6697.
... | lgpl-3.0 |
charman2/rsas | examples/unsteady.py | 1 | 5254 | # -*- coding: utf-8 -*-
"""Storage selection (SAS) functions: example with multiple fluxes out at steady state
Runs the rSAS model for a synthetic dataset with one flux in and
multiple fluxes out and steady state flow
Theory is presented in:
Harman, C. J. (2014), Time-variable transit time distributions and transport... | mit |
liorvh/infernal-twin | build/pip/pip/_vendor/html5lib/treebuilders/__init__.py | 1730 | 3405 | """A collection of modules for building different kinds of tree from
HTML documents.
To create a treebuilder for a new type of tree, you need to do
implement several things:
1) A set of classes for various types of elements: Document, Doctype,
Comment, Element. These must implement the interface of
_base.treebuilders... | gpl-3.0 |
Galarzaa90/NabBot | cogs/tracking.py | 1 | 83628 | # Copyright 2019 Allan Galarza
#
# 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 writi... | apache-2.0 |
infobloxopen/infoblox-netmri | infoblox_netmri/api/broker/v3_4_0/system_health_summary_broker.py | 8 | 52173 | from ..broker import Broker
class SystemHealthSummaryBroker(Broker):
controller = "system_health_summaries"
def show(self, **kwargs):
"""Shows the details for the specified system health summary.
**Inputs**
| ``api version min:`` None
| ``api version max:`` Non... | apache-2.0 |
escapewindow/scriptworker | src/scriptworker/ed25519.py | 2 | 5846 | #!/usr/bin/env python
"""ed25519 support for scriptworker.
Attributes:
log (logging.Logger): the log object for the module
"""
import argparse
import base64
import functools
import logging
import sys
from binascii import Error as Base64Error
from cryptography.exceptions import InvalidSignature, UnsupportedAlgori... | mpl-2.0 |
Fiona/AreWeAlone | __main__.py | 1 | 4157 | ##########
# LD 22
# The theme is alone
# it's a dumb theme
# fiona wrote this
##########
# System and Python lib imports
import sys
sys.path += ['.']
# Game engine imports
from myrmidon.myrmidon import MyrmidonGame, MyrmidonProcess
from myrmidon.consts import *
from pygame.locals import *
# Game imp... | mit |
TangHao1987/intellij-community | plugins/hg4idea/testData/bin/mercurial/fancyopts.py | 92 | 3562 | # fancyopts.py - better command line parsing
#
# Copyright 2005-2009 Matt Mackall <mpm@selenic.com> and others
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
import getopt, util
from i18n import _
def gnugetopt(args, options, l... | apache-2.0 |
ChristosChristofidis/bokeh | sphinx/source/docs/tutorials/solutions/olympics.py | 23 | 3239 | import numpy as np
from bokeh.plotting import figure, output_file, show, VBox
from bokeh.sampledata.olympics2014 import data
data = { d['abbr']: d['medals'] for d in data['data'] if d['medals']['total'] > 0}
# pull out just the data we care about
countries = sorted(
data.keys(),
key=lambda x: ... | bsd-3-clause |
kenshay/ImageScripter | ProgramData/SystemFiles/Python/Lib/site-packages/numpy/distutils/tests/test_system_info.py | 30 | 7361 | from __future__ import division, print_function
import os
import shutil
from tempfile import mkstemp, mkdtemp
from subprocess import Popen, PIPE
from distutils.errors import DistutilsError
from numpy.distutils import ccompiler
from numpy.testing import TestCase, run_module_suite, assert_, assert_equal
from numpy.test... | gpl-3.0 |
marbindrakon/eve-wspace | evewspace/evewspace/settings.py | 2 | 9516 |
DEBUG = True
TEMPLATE_DEBUG = DEBUG
MULTI_TENANT = True
AUTH_USER_MODEL = 'account.EWSUser'
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
# import Celery config
import djcelery
djcelery.setup_loader()
BROKER_URL = 'amqp://guest:guest@localhost:5672/'
ALLOWED_HOSTS = ['*',]
from datetime import time... | apache-2.0 |
Amechi101/concepteur-market-app | venv/lib/python2.7/site-packages/pip/vcs/mercurial.py | 392 | 5820 | import os
import tempfile
import re
import sys
from pip.util import call_subprocess
from pip.util import display_path, rmtree
from pip.log import logger
from pip.vcs import vcs, VersionControl
from pip.download import path_to_url
from pip.backwardcompat import ConfigParser
class Mercurial(VersionControl):
name = ... | mit |
manageyp/xhtml2pdf | xhtml2pdf/tables.py | 90 | 11278 | # -*- coding: utf-8 -*-
from reportlab.platypus.tables import TableStyle
from xhtml2pdf.util import getSize, getBorderStyle, getAlign
from xhtml2pdf.tags import pisaTag
from xhtml2pdf.xhtml2pdf_reportlab import PmlTable, PmlKeepInFrame
import copy
import logging
# Copyright 2010 Dirk Holtwick, holtwick.it
#
# Licensed... | apache-2.0 |
BatedUrGonnaDie/salty_bot | modules/helpers/yt_video_link.py | 1 | 1246 | #! /usr/bin/env python3.7
import re
import isodate
import modules.extensions.regexes as regexes
import modules.commands.helpers.time_formatter as time_formatter
ON_ACTION = "PRIVMSG"
def call(salty_inst, c_msg, balancer, **kwargs):
video_ids = re.findall(regexes.YOUTUBE_URL, c_msg["message"])
if not video... | mit |
imcsk8/packstack | packstack/installer/setup_controller.py | 3 | 5333 | # 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
# distributed under the... | apache-2.0 |
hbrunn/OCB | addons/account_followup/tests/test_account_followup.py | 247 | 10222 | import datetime
from openerp import tools
from openerp.tests.common import TransactionCase
from openerp.osv import fields
class TestAccountFollowup(TransactionCase):
def setUp(self):
""" setUp ***"""
super(TestAccountFollowup, self).setUp()
cr, uid = self.cr, self.uid
self... | agpl-3.0 |
MQQiang/kbengine | kbe/res/scripts/common/Lib/ctypes/test/test_cast.py | 86 | 3188 | from ctypes import *
from ctypes.test import need_symbol
import unittest
import sys
class Test(unittest.TestCase):
def test_array2pointer(self):
array = (c_int * 3)(42, 17, 2)
# casting an array to a pointer works.
ptr = cast(array, POINTER(c_int))
self.assertEqual([ptr[i] for i i... | lgpl-3.0 |
slowfranklin/samba | third_party/waf/wafadmin/Tools/compiler_cxx.py | 32 | 1925 | #!/usr/bin/env python
# encoding: utf-8
# Matthias Jahn jahn dôt matthias ât freenet dôt de 2007 (pmarat)
import os, sys, imp, types, ccroot
import optparse
import Utils, Configure, Options
from Logs import debug
cxx_compiler = {
'win32': ['msvc', 'g++'],
'cygwin': ['g++'],
'darwin': ['g++'],
'aix': ['xlc++', 'g+... | gpl-3.0 |
google/tf_mesh_renderer | mesh_renderer/rasterize_triangles_test.py | 1 | 7681 | # Copyright 2017 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 |
keflavich/pyspeckit | docs/conf.py | 4 | 12272 | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
#
# Astropy documentation build configuration file.
#
# 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 file.
#
# All configurati... | mit |
puremourning/ycmd-1 | ycmd/tests/cs/debug_info_test.py | 4 | 8476 | # Copyright (C) 2016-2020 ycmd contributors
#
# This file is part of ycmd.
#
# ycmd is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
#... | gpl-3.0 |
weimingtom/python-for-android | python3-alpha/python3-src/Lib/ctypes/test/test_stringptr.py | 50 | 2484 | import unittest
from ctypes import *
import _ctypes_test
lib = CDLL(_ctypes_test.__file__)
class StringPtrTestCase(unittest.TestCase):
def test__POINTER_c_char(self):
class X(Structure):
_fields_ = [("str", POINTER(c_char))]
x = X()
# NULL pointer access
self.assertR... | apache-2.0 |
membase/ep-engine | management/tap.py | 10 | 4240 | #!/usr/bin/env python
"""
TAP protocol client library.
Copyright (c) 2010 Dustin Sallings <dustin@spy.net>
"""
import socket
import string
import random
import struct
import asyncore
import mc_bin_server
import mc_bin_client
from memcacheConstants import REQ_MAGIC_BYTE, RES_MAGIC_BYTE
from memcacheConstants import... | apache-2.0 |
NCUT-MMALab/Mocha | CaffeToolsLib/caffe/python/caffe/draw.py | 6 | 7604 | """
Caffe network visualization: draw the NetParameter protobuffer.
.. note::
This requires pydot>=1.0.2, which is not included in requirements.txt since
it requires graphviz and other prerequisites outside the scope of the
Caffe.
"""
from caffe.proto import caffe_pb2
"""
pydot is not supported under p... | gpl-3.0 |
savoirfairelinux/OpenUpgrade | openerp/addons/base/res/res_bank.py | 33 | 10377 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | agpl-3.0 |
TeamExodus/external_chromium_org | tools/perf/page_sets/mse_cases.py | 34 | 1969 | # 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.
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class MseCasesPage(page_module.Page):
def __init__(... | bsd-3-clause |
nucked/git-repo | error.py | 48 | 2844 | #
# Copyright (C) 2008 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 |
townbull/keystone-dtrust | keystone/contrib/s3/core.py | 8 | 2557 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unle... | apache-2.0 |
pierotofy/WebODM | app/migrations/0012_public_task_uuids.py | 2 | 1681 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-11-30 15:41
from __future__ import unicode_literals
from django.db import migrations, models
import uuid, os, pickle, tempfile
from webodm import settings
tasks = []
imageuploads = []
task_ids = {} # map old task IDs --> new task IDs
def dump(apps, schema... | mpl-2.0 |
gnuhub/intellij-community | python/lib/Lib/site-packages/django/template/response.py | 71 | 4252 | from django.http import HttpResponse
from django.template import loader, Context, RequestContext
class ContentNotRenderedError(Exception):
pass
class SimpleTemplateResponse(HttpResponse):
def __init__(self, template, context=None, mimetype=None, status=None,
content_type=None):
# It would... | apache-2.0 |
pwoodworth/intellij-community | plugins/hg4idea/testData/bin/mercurial/obsolete.py | 91 | 30114 | # obsolete.py - obsolete markers handling
#
# Copyright 2012 Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Logilab SA <contact@logilab.fr>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
"""Obsolete ma... | apache-2.0 |
aperigault/ansible | test/units/modules/network/f5/test_bigip_vlan.py | 22 | 10605 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2017 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
import os
import json
import pytest
import sys
if sys.version_info < (2, ... | gpl-3.0 |
mycodeday/crm-platform | purchase/__openerp__.py | 259 | 3787 | # -*- 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... | gpl-3.0 |
droodle/kansha | tests/test_validators.py | 4 | 1072 | # -*- coding:utf-8 -*-
#--
# Copyright (c) 2012-2014 Net-ng.
# All rights reserved.
#
# This software is licensed under the BSD License, as described in
# the file LICENSE.txt, which you should have received as part of
# this distribution.
#--
import unittest
from kansha import validator
class ValidatorTest(unittes... | bsd-3-clause |
neilpelow/wmap-django | venv/lib/python3.5/site-packages/django/core/validators.py | 33 | 16316 | from __future__ import unicode_literals
import re
from django.core.exceptions import ValidationError
from django.utils import six
from django.utils.deconstruct import deconstructible
from django.utils.encoding import force_text
from django.utils.functional import SimpleLazyObject
from django.utils.ipv6 import is_vali... | gpl-3.0 |
BeZazz/lamebench | nb_third_party/jinja2/utils.py | 189 | 26319 | # -*- coding: utf-8 -*-
"""
jinja2.utils
~~~~~~~~~~~~
Utility functions.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import re
import sys
import errno
try:
from thread import allocate_lock
except ImportError:
from dummy_thread import allocate_lo... | apache-2.0 |
crask/redisproxy | test/memcache/memcache.py | 1 | 15420 | # Copyright 2012 Mixpanel, 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 writin... | apache-2.0 |
ramadhane/odoo | addons/l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth.py | 374 | 2830 | #-*- coding:utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 OpenERP SA (<http://openerp.com>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... | agpl-3.0 |
Josok/avplayer | libtorrent/set_version.py | 20 | 1596 | #! /usr/bin/env python
import os
import sys
import glob
version = (int(sys.argv[1]), int(sys.argv[2]), int(sys.argv[3]), int(sys.argv[4]))
def substitute_file(name):
subst = ''
f = open(name)
for l in f:
if '#define LIBTORRENT_VERSION_MAJOR' in l and name.endswith('.hpp'):
l = '#define LIBTORRENT_VERSION_MAJO... | gpl-3.0 |
retomerz/intellij-community | python/lib/Lib/tarfile.py | 80 | 74279 | #!/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... | apache-2.0 |
bagnz0r/GT-I8160_Kernel | tools/perf/scripts/python/syscall-counts-by-pid.py | 11180 | 1927 | # system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os, sys
sys.path.append(os.env... | gpl-2.0 |
devs1991/test_edx_docmode | venv/lib/python2.7/site-packages/newrelic-2.46.0.37/newrelic/console.py | 2 | 17410 | from __future__ import print_function
import atexit
import cmd
import code
import functools
import glob
import inspect
import optparse
import os
import shlex
import socket
import sys
import threading
import traceback
import os
import time
try:
import ConfigParser
except ImportError:
import configparser as Con... | agpl-3.0 |
sterlingbaldwin/acme_workbench | workbench-backend/index/tests.py | 1 | 3781 | import json
from django.test import TestCase
from django.test import Client
class IndexViewTests(TestCase):
fixtures = ['seed.json']
"""
Tests for the Index app views
"""
def test_get_index(self):
"""
Test that the index page returns success
"""
client = Client()
... | bsd-2-clause |
xbuf/blender_io_xbuf | modules/xbuf/meshes_pb2.py | 1 | 19259 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: xbuf/meshes.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _r... | gpl-3.0 |
lfcnassif/MultiContentViewer | release/modules/ext/libreoffice/program/python-core-3.3.0/lib/email/mime/text.py | 4 | 1413 | # Copyright (C) 2001-2006 Python Software Foundation
# Author: Barry Warsaw
# Contact: email-sig@python.org
"""Class representing text/* type MIME documents."""
__all__ = ['MIMEText']
from email.encoders import encode_7or8bit
from email.mime.nonmultipart import MIMENonMultipart
class MIMEText(MIMENonMultipart):
... | lgpl-3.0 |
c0defreak/python-for-android | python3-alpha/python3-src/Lib/copyreg.py | 48 | 6633 | """Helper to provide extensibility for pickle.
This is only useful to add pickle support for extension types defined in
C, not for instances of user-defined classes.
"""
__all__ = ["pickle", "constructor",
"add_extension", "remove_extension", "clear_extension_cache"]
dispatch_table = {}
def pickle(ob_typ... | apache-2.0 |
Samuel789/MediPi | MedManagementWeb/env/lib/python3.5/site-packages/chardet/euctwfreq.py | 290 | 31621 | ######################## 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... | apache-2.0 |
lixiangning888/whole_project | lib/cuckoo/common/demux.py | 1 | 7192 | # Copyright (C) 2015 Accuvant, Inc. (bspengler@accuvant.com)
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.
import os
import tempfile
from zipfile import ZipFile
try:
from rarfile import RarFile
HAS_RARFILE = True
except ImportError:
... | lgpl-3.0 |
Tiam0202/django-crm | crm/tests.py | 15 | 16075 | # -*- coding: utf-8 -*-
# ----------------------------------------------------------------------------
# $Id: tests.py 429 2009-07-14 03:48:49Z tobias $
# ----------------------------------------------------------------------------
#
# Copyright (C) 2008-2009 Caktus Consulting Group, LLC
#
# This file is part of ... | bsd-3-clause |
chaffra/sympy | sympy/solvers/tests/test_ode.py | 9 | 137884 | from __future__ import division
from sympy import (acos, acosh, asinh, atan, cos, Derivative, diff, dsolve,
Dummy, Eq, erf, erfi, exp, Function, I, Integral, LambertW, log, O, pi,
Rational, rootof, S, simplify, sin, sqrt, Symbol, tan, asin, sinh,
Piecewise, symbols, Poly)
from sympy.solvers.ode import (_u... | bsd-3-clause |
mohammed-alfatih/servo | python/mach/mach/test/test_config.py | 126 | 6460 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import unicode_literals
import sys
import unittest
from mozfile.mozfile import NamedTemporaryFile
from... | mpl-2.0 |
Edu-Glez/Bank_sentiment_analysis | env/lib/python3.6/site-packages/numpy/core/machar.py | 141 | 10790 | """
Machine arithmetics - determine the parameters of the
floating-point arithmetic system
Author: Pearu Peterson, September 2003
"""
from __future__ import division, absolute_import, print_function
__all__ = ['MachAr']
from numpy.core.fromnumeric import any
from numpy.core.numeric import errstate
# Need to speed ... | apache-2.0 |
Maximilian-Reuter/SickRage-1 | lib/unidecode/x0f9.py | 253 | 4567 | data = (
'Kay ', # 0x00
'Kayng ', # 0x01
'Ke ', # 0x02
'Ko ', # 0x03
'Kol ', # 0x04
'Koc ', # 0x05
'Kwi ', # 0x06
'Kwi ', # 0x07
'Kyun ', # 0x08
'Kul ', # 0x09
'Kum ', # 0x0a
'Na ', # 0x0b
'Na ', # 0x0c
'Na ', # 0x0d
'La ', # 0x0e
'Na ', # 0x0f
'Na ', # 0x10
'Na ', ... | gpl-3.0 |
Knotis/djangotoolbox | djangotoolbox/test.py | 6 | 3926 | from django.test import TestCase
from django.utils.unittest import TextTestResult, TextTestRunner
try:
from django.test.runner import DiscoverRunner as TestRunner
except ImportError:
from django.test.simple import DjangoTestSuiteRunner as TestRunner
from .utils import object_list_to_table
import re
class M... | bsd-3-clause |
mattseymour/django | django/contrib/gis/geoip2/base.py | 3 | 8991 | import os
import socket
import geoip2.database
from django.conf import settings
from django.core.validators import ipv4_re
from django.utils.ipv6 import is_valid_ipv6_address
from .resources import City, Country
# Creating the settings dictionary with any settings, if needed.
GEOIP_SETTINGS = {
'GEOIP_PATH': ge... | bsd-3-clause |
aagm/gfw-api | lib/ee/imagecollection.py | 4 | 3430 | """Representation for an Earth Engine ImageCollection."""
# Using lowercase function naming to match the JavaScript names.
# pylint: disable=g-bad-name
import apifunction
import collection
import computedobject
import ee_exception
import ee_types
import image
class ImageCollection(collection.Collection):
"""Rep... | gpl-2.0 |
jeromecc/doctoctocbot | src/customer/forms.py | 1 | 3367 | from django import forms
from django.utils.translation import ugettext_lazy as _
from django_countries.fields import CountryField
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from customer.models import Customer
from bootstrap_modal_forms.forms import BSModalForm, BSModalModelForm... | mpl-2.0 |
rv816/wagtail | wagtail/project_template/project_name/settings/base.py | 21 | 3597 | """
Django settings for {{ project_name }} project.
Generated by 'django-admin startproject' using Django {{ django_version }}.
For more information on this file, see
https://docs.djangoproject.com/en/{{ docs_version }}/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.c... | bsd-3-clause |
mikebenfield/scipy | scipy/optimize/_spectral.py | 133 | 7986 | """
Spectral Algorithm for Nonlinear Equations
"""
from __future__ import division, absolute_import, print_function
import collections
import numpy as np
from scipy.optimize import OptimizeResult
from scipy.optimize.optimize import _check_unknown_options
from .linesearch import _nonmonotone_line_search_cruz, _nonmono... | bsd-3-clause |
tyb0807/angr | angr/procedures/msvcr/_initterm.py | 2 | 1627 | import logging
import angr
from angr.sim_type import SimTypeInt
l = logging.getLogger("angr.procedures.msvcr._initterm")
######################################
# __initterm
######################################
class _initterm(angr.SimProcedure):
local_vars = ('callbacks',)
callbacks = []
#pylint:disa... | bsd-2-clause |
alexcuellar/odoo | addons/auth_oauth/res_config.py | 23 | 3436 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2012-Today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 |
KureFM/Xenon | src/packages/requests/packages/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... | mit |
silly-wacky-3-town-toon/SOURCE-COD | Panda3D-1.10.0/python/Lib/idlelib/Percolator.py | 91 | 2616 | from idlelib.WidgetRedirector import WidgetRedirector
from idlelib.Delegator import Delegator
class Percolator:
def __init__(self, text):
# XXX would be nice to inherit from Delegator
self.text = text
self.redir = WidgetRedirector(text)
self.top = self.bottom = Delegator(text)
... | apache-2.0 |
MER-GROUP/intellij-community | python/lib/Lib/symbol.py | 91 | 2031 | #! /usr/bin/env python
"""Non-terminal symbols of Python grammar (from "graminit.h")."""
# This file is automatically generated; please don't muck it up!
#
# To update the symbols in this file, 'cd' to the top directory of
# the python source tree after building the interpreter and run:
#
# python Lib/symbol.py... | apache-2.0 |
edx-solutions/edx-platform | openedx/core/djangoapps/heartbeat/views.py | 4 | 1073 | """
Views for verifying the health (heartbeat) of the app.
"""
import logging
import six
from util.json_request import JsonResponse
from .runchecks import runchecks
log = logging.getLogger(__name__)
def heartbeat(request):
"""
Simple view that a loadbalancer can check to verify that the app is up. Retur... | agpl-3.0 |
rain87/pc-health | create_graph.py | 1 | 6855 | #!/usr/bin/python
# coding=utf8
import rrd_config as C
import os
import subprocess
from collections import namedtuple
import gzip
import sys
import itertools
from smart_attributes import names as smart_names
DataSource = namedtuple('DataSource', 'db_fname field legend is_area color stack')
DataSource.__new__.__defau... | mit |
cauchycui/scikit-learn | examples/linear_model/plot_ols_ridge_variance.py | 387 | 2060 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
=========================================================
Ordinary Least Squares and Ridge Regression Variance
=========================================================
Due to the few points in each dimension and the straight
line that linear regression uses to follow thes... | bsd-3-clause |
steveb/heat | heat/api/cfn/v1/__init__.py | 10 | 2969 | #
# 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
# ... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.