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 |
|---|---|---|---|---|---|
qqzwc/XX-Net | code/default/gae_proxy/server/lib/google/appengine/tools/adaptive_thread_pool.py | 13 | 14122 | #!/usr/bin/env python
#
# Copyright 2007 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 o... | bsd-2-clause |
OmniLayer/omnicore | test/functional/p2p_invalid_locator.py | 25 | 1957 | #!/usr/bin/env python3
# Copyright (c) 2015-2018 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 node responses to invalid locators.
"""
from test_framework.messages import msg_getheaders, msg_g... | mit |
yaojingwu1992/XlsxWriter | xlsxwriter/test/comparison/test_textbox12.py | 8 | 1108 | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | bsd-2-clause |
vic-nation/android_kernel_samsung_d2_nofork | tools/perf/scripts/python/sched-migration.py | 11215 | 11670 | #!/usr/bin/python
#
# Cpu task migration overview toy
#
# Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com>
#
# perf script event handlers have been generated by perf script -g python
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Fre... | gpl-2.0 |
javierTerry/odoo | addons/product/partner.py | 385 | 1696 | # -*- 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 |
uclouvain/OSIS-Louvain | program_management/forms/tree/detach.py | 1 | 2024 | ##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... | agpl-3.0 |
chirpradio/chirpradio-volunteers | site-packages/sqlalchemy/orm/attributes.py | 1 | 46309 | # attributes.py - manages object attributes
# Copyright (C) 2005, 2006, 2007, 2008 Michael Bayer mike_mp@zzzcomputing.com
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import operator, weakref
from itertools import chain
import UserDic... | mit |
oxo42/FpTest | samples/test_GPONLink_Terminate.py | 1 | 2504 | """
Test the Terminate/GPONLink Product Order
The product order takes a serial number, calls LST-ONTDETAIL to get the details of the ONT then DEL-ONT to remove it.
This test case ensures that the right commands happen in the right order
"""
import fptest
class TerminateGponLinkTest(fptest.FpTest):
def test_work... | apache-2.0 |
Paul-Ezell/cinder-1 | cinder/volume/drivers/san/hp/hpmsa_fc.py | 9 | 1245 | # Copyright 2014 Objectif Libre
# Copyright 2015 DotHill Systems
#
# 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
#
# U... | apache-2.0 |
mjbrewer/testindex | magnum/hacking/checks.py | 15 | 2048 | # Copyright (c) 2015 Intel, 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 l... | apache-2.0 |
ionelmc/cookiecutter | tests/test_output_folder.py | 6 | 1411 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_output_folder
------------------
Test formerly known from a unittest residing in test_generate.py named
TestOutputFolder.test_output_folder
"""
from __future__ import unicode_literals
import os
import pytest
from cookiecutter import generate
from cookiecutter i... | bsd-3-clause |
zhjunlang/kbengine | kbe/src/lib/python/Lib/encodings/cp875.py | 272 | 12854 | """ Python Character Mapping Codec cp875 generated from 'MAPPINGS/VENDORS/MICSFT/EBCDIC/CP875.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,input... | lgpl-3.0 |
poiesisconsulting/openerp-restaurant | poi_pos_table_designer/report/daily_report.py | 2 | 5292 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Poiesis Consulting, OpenERP Partner
# Copyright (C) 2012 Poiesis Consulting (<http://www.poiesisconsulting.com>). All Rights Reserved.
# Autor: Nicolas Bustillos
#
# This program is free software: yo... | agpl-3.0 |
dnanexus/rseqc | rseqc/lib/bx/interval_index_file.py | 3 | 19465 | """
Classes for index files that map genomic intervals to values.
:Authors: James Taylor (james@bx.psu.edu), Bob Harris (rsharris@bx.psu.edu)
An interval index file maps genomic intervals to values.
This implementation writes version 1 file format, and reads versions 0 and 1.
Index File Format
-----------------
Al... | gpl-3.0 |
tschaume/pymatgen | pymatgen/vis/tests/test_plotters.py | 2 | 1641 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import os
import unittest
import json
from monty.json import MontyDecoder
import numpy as np
from pymatgen.util.testing import PymatgenTest
from pymatgen.analysis.xas.spectrum import XANES
from pymatgen.vis.p... | mit |
mcgachey/edx-platform | lms/djangoapps/support/tests/test_refund.py | 52 | 4760 | """
Tests for refunds on the support dashboard
DEPRECATION WARNING:
This test suite is deliberately separate from the other view tests
so we can easily deprecate it once the transition from shoppingcart
to the E-Commerce service is complete.
"""
import datetime
from django.test.client import Client
from course_mode... | agpl-3.0 |
aronsky/home-assistant | homeassistant/components/notify/lannouncer.py | 26 | 2596 | """
Lannouncer platform for notify component.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/notify.lannouncer/
"""
import logging
from urllib.parse import urlencode
import socket
import voluptuous as vol
from homeassistant.components.notify import (
... | apache-2.0 |
ksmit799/Toontown-Source | toontown/effects/SkullBurst.py | 6 | 2065 | from pandac.PandaModules import *
from direct.showbase.DirectObject import *
from direct.interval.IntervalGlobal import *
from PooledEffect import PooledEffect
from EffectController import EffectController
class SkullBurst(PooledEffect, EffectController):
def __init__(self):
PooledEffect.__init__(self)
... | mit |
fhaoquan/kbengine | kbe/src/lib/python/Lib/email/__init__.py | 98 | 1789 | # Copyright (C) 2001-2007 Python Software Foundation
# Author: Barry Warsaw
# Contact: email-sig@python.org
"""A package for parsing, handling, and generating email messages."""
__version__ = '5.1.0'
__all__ = [
'base64mime',
'charset',
'encoders',
'errors',
'feedparser',
'generator',
'he... | lgpl-3.0 |
thomaserlang/storitch | storitch/logger.py | 1 | 1031 | import logging, logging.handlers, os
from storitch import config
class logger(object):
@classmethod
def set_logger(cls, filename, to_sentry=False, fmt='[%(levelname)s %(asctime)s.%(msecs)d %(module)s:%(lineno)d]: %(message)s'):
logger = logging.getLogger()
logger.setLevel(getattr(logging, conf... | mit |
reAsOn2010/kafka-python | kafka/consumer/base.py | 15 | 7200 | from __future__ import absolute_import
import atexit
import logging
import numbers
from threading import Lock
import kafka.common
from kafka.common import (
OffsetRequest, OffsetCommitRequest, OffsetFetchRequest,
UnknownTopicOrPartitionError, check_error, KafkaError
)
from kafka.util import kafka_bytestring,... | apache-2.0 |
nedlowe/amaas-core-sdk-python | amaascore/tools/generate_transaction.py | 1 | 6700 | from __future__ import absolute_import, division, print_function, unicode_literals
from amaasutils.random_utils import random_string
import datetime
from decimal import Decimal
import random
from amaascore.core.comment import Comment
from amaascore.core.reference import Reference
from amaascore.transactions.cash_tran... | apache-2.0 |
40223142/CDA0629 | static/Brython3.1.0-20150301-090019/Lib/errno.py | 624 | 4096 | """
This module makes available standard errno system symbols.
The value of each symbol is the corresponding integer value,
e.g., on most systems, errno.ENOENT equals the integer 2.
The dictionary errno.errorcode maps numeric codes to symbol names,
e.g., errno.errorcode[2] could be the string 'ENOENT'.
Symbols that ar... | gpl-3.0 |
TeachAtTUM/edx-platform | openedx/core/djangoapps/performance/tests/test_logs.py | 22 | 6534 | # pylint: disable=no-member
"""
Tests that performance data is successfully logged.
"""
import datetime
import dateutil
import json
import logging
from StringIO import StringIO
from django.test import TestCase
from django.test.client import RequestFactory
from openedx.core.djangoapps.performance.views import performa... | agpl-3.0 |
elit3ge/SickRage | lib/requests/packages/chardet/latin1prober.py | 1778 | 5232 | ######################## 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 |
syershov/omim | tools/python/recalculate_geom_index.py | 16 | 2311 | """
recalculate_geom_index.py <data_path> <generator_tool> [<designer_tool> <designer_param>]
Calculates geometry index for all mwms found inside the resource and the writable directories.
Uses generator_tool for index calculation. After all it runs designer_tool if has one.
"""
import os
import subprocess
import sys... | apache-2.0 |
mancoast/CPythonPyc_test | cpython/244_test_winreg.py | 20 | 5773 | # Test the windows specific win32reg module.
# Only win32reg functions not hit here: FlushKey, LoadKey and SaveKey
from _winreg import *
import os, sys
from test.test_support import verify, have_unicode
test_key_name = "SOFTWARE\\Python Registry Test Key - Delete Me"
test_data = [
("Int Value", 45, ... | gpl-3.0 |
firerszd/kbengine | kbe/res/scripts/common/Lib/site-packages/pip/_vendor/requests/status_codes.py | 695 | 3136 | # -*- coding: utf-8 -*-
from .structures import LookupDict
_codes = {
# Informational.
100: ('continue',),
101: ('switching_protocols',),
102: ('processing',),
103: ('checkpoint',),
122: ('uri_too_long', 'request_uri_too_long'),
200: ('ok', 'okay', 'all_ok', 'all_okay', 'all_good', '\\o/'... | lgpl-3.0 |
hn8841182/2015cd_0505 | static/Brython3.1.1-20150328-091302/Lib/xml/sax/__init__.py | 637 | 3505 | """Simple API for XML (SAX) implementation for Python.
This module provides an implementation of the SAX 2 interface;
information about the Java version of the interface can be found at
http://www.megginson.com/SAX/. The Python version of the interface is
documented at <...>.
This package contains the following modu... | agpl-3.0 |
tseaver/gcloud-python | bigtable/google/cloud/bigtable_admin_v2/__init__.py | 3 | 1418 | # -*- coding: utf-8 -*-
#
# Copyright 2018 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... | apache-2.0 |
RyanHope/AutobahnPython | autobahn/twisted/test/test_rawsocket.py | 4 | 2791 | ###############################################################################
#
# The MIT License (MIT)
#
# Copyright (c) Tavendo GmbH
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software with... | mit |
AntoDev96/GuidaSky | controller/channel_controller.py | 1 | 1075 | import codecs
import json
import urllib.request
from constants import constants, command_name_list
from telepot.namedtuple import KeyboardButton, ReplyKeyboardMarkup
from model.repositories import channel_repository
from bot import bot
from decorators.command import command
@command(command_name_list["listacanali"])
d... | gpl-3.0 |
HLFH/CouchPotatoServer | libs/chardet/cp949prober.py | 2801 | 1782 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | gpl-3.0 |
PaddlePaddle/models | PaddleCV/3d_vision/PointRCNN/tools/kitti_eval.py | 1 | 2220 | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.
#
# 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 applic... | apache-2.0 |
supersven/intellij-community | python/lib/Lib/site-packages/django/contrib/contenttypes/tests.py | 87 | 2781 | from django import db
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.contrib.sites.models import Site
from django.contrib.contenttypes.views import shortcut
from django.core.exceptions import ObjectDoesNotExist
from django.http import HttpRequest
from django.test... | apache-2.0 |
twz915/django | django/db/models/fields/related.py | 2 | 68345 | import functools
import inspect
from functools import partial
from django import forms
from django.apps import apps
from django.core import checks, exceptions
from django.db import connection, router
from django.db.backends import utils
from django.db.models import Q
from django.db.models.constants import LOOKUP_SEP
f... | bsd-3-clause |
afrase/kodiswift | kodiswift/__init__.py | 3 | 2851 | # -*- coding: utf-8 -*-
"""
kodiswift
----------
A micro framework to enable rapid development of Kodi plugins.
:copyright: (c) 2012 by Jonathan Beluch
:license: GPLv3, see LICENSE for more details.
"""
from __future__ import absolute_import
from types import ModuleType
try:
import xbmc
import xbmcgui
i... | gpl-3.0 |
ceisendle/llcp-over-nci | tools/perf/scripts/python/sctop.py | 11180 | 1924 | # system call top
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Periodically displays system-wide system call totals, broken down by
# syscall. If a [comm] arg is specified, only syscalls called by
# [comm] are displayed. If an [interval] arg is specified,... | gpl-2.0 |
kevin-coder/tensorflow-fork | tensorflow/python/grappler/constant_folding_test.py | 16 | 2166 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
kslundberg/pants | tests/python/pants_test/backend/python/tasks/checkstyle/test_import_order.py | 7 | 4820 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import ast
import te... | apache-2.0 |
daviddanielarch/bap | 2.0/parse_tester.py | 1 | 4417 | from parser.parse_stmt import *
var_tmem = {u'typ': {u'tmem': {u'index_type': {u'reg': 32}}}, u'name': u'mem', u'id': 56}
var_reg = {u'typ': {u'reg': 32}, u'name': u'R_EBP', u'id': 0}
label_stmt_name = {u'label_stmt': {u'attributes': [], u'label': {u'name': u'pc_0x804840d'}}}
label_stmt_addr = {u'label_stmt': {u'... | gpl-2.0 |
xuraylei/floodlight | example/packetStreamerClientExample.py | 148 | 3893 | #!/usr/bin/python
import urllib2
import json
import re
import sys
from optparse import OptionParser
sys.path.append('~/floodlight/target/gen-py')
sys.path.append('~/floodlight/thrift/lib/py')
from packetstreamer import PacketStreamer
from packetstreamer.ttypes import *
from thrift import Thrift
from thrift.transpo... | apache-2.0 |
fernandezcuesta/ansible | lib/ansible/modules/network/avi/avi_serviceenginegroup.py | 7 | 29165 | #!/usr/bin/python
#
# Created on Aug 25, 2016
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the te... | gpl-3.0 |
Micronaet/micronaet-mx8 | mexal_mail_invoice_default/__init__.py | 1 | 1042 | # -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... | agpl-3.0 |
klmitch/tendril | tendril/__init__.py | 1 | 12025 | ## Copyright (C) 2012 by Kevin L. Mitchell <klmitch@mit.edu>
##
## This program is free software: you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation, either version 3 of the
## License, or (at your option) any later version.
##
#... | gpl-3.0 |
zenoss/Community-Zenpacks | ZenPacks.AndreaConsadori.UbiquitiNanostation/ZenPacks/AndreaConsadori/UbiquitiNanostation/modeler/plugins/UbiquitiDeviceMap.py | 2 | 1334 | ###########################################################################
#
# This program is part of Zenoss Core, an open source monitoring platform.
# Copyright (C) 2007, Zenoss Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License versi... | gpl-2.0 |
kvar/ansible | test/units/modules/network/icx/icx_module.py | 23 | 2630 | # Copyright: (c) 2019, 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
import os
import json
from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTest... | gpl-3.0 |
Qalthos/ansible | lib/ansible/modules/network/f5/bigip_monitor_gateway_icmp.py | 38 | 26253 | #!/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 |
40223141/2015cd_midterm | static/Brython3.1.1-20150328-091302/Lib/pydoc.py | 637 | 102017 | #!/usr/bin/env python3
"""Generate Python documentation in HTML or text for interactive use.
In the Python interpreter, do "from pydoc import help" to provide
help. Calling help(thing) on a Python object documents the object.
Or, at the shell command line outside of Python:
Run "pydoc <name>" to show documentation ... | gpl-3.0 |
deeplook/bokeh | bokeh/charts/builder/line_builder.py | 43 | 5360 | """This is the Bokeh charts interface. It gives you a high level API to build
complex plot is a simple way.
This is the Line class which lets you build your Line charts just
passing the arguments to the Chart class and calling the proper functions.
"""
#-----------------------------------------------------------------... | bsd-3-clause |
BioXiao/chimerascan | chimerascan/deprecated/chimerascan_run_v1.py | 6 | 41259 | #!/usr/bin/env python
'''
Created on Jan 5, 2011
@author: mkiyer
chimerascan: chimeric transcript discovery using RNA-seq
Copyright (C) 2011 Matthew Iyer
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 Founda... | gpl-3.0 |
anbasile/flask_sample | flask/lib/python2.7/site-packages/OpenSSL/rand.py | 29 | 4528 | """
PRNG management routines, thin wrappers.
See the file RATIONALE for a short explanation of why this module was written.
"""
from functools import partial
from six import integer_types as _integer_types
from OpenSSL._util import (
ffi as _ffi,
lib as _lib,
exception_from_error_queue as _exception_fro... | mit |
Seedstars/suds | suds/servicedefinition.py | 9 | 8208 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will b... | lgpl-3.0 |
nevil/edash-packager | packager/third_party/protobuf/python/google/protobuf/internal/reflection_cpp_generated_test.py | 215 | 4054 | #! /usr/bin/python
# -*- coding: utf-8 -*-
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following cond... | bsd-3-clause |
mSenyor/sl4a | python/src/Lib/plat-mac/bgenlocations.py | 71 | 2090 | #
# Local customizations for generating the Carbon interface modules.
# Edit this file to reflect where things should be on your system.
# Note that pathnames are unix-style for OSX MachoPython/unix-Python,
# but mac-style for MacPython, whether running on OS9 or OSX.
#
import os
from warnings import warnpy3k
warnpy3... | apache-2.0 |
Weuxel/cjdns | node_build/dependencies/libuv/build/gyp/test/prune_targets/gyptest-prune-targets.py | 47 | 2301 | #!/usr/bin/env python
# Copyright (c) 2013 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies --root-target removes the unnecessary targets.
"""
import TestGyp
test = TestGyp.TestGyp()
# The xcode-ninja generator has it... | gpl-3.0 |
persandstrom/home-assistant | homeassistant/components/media_player/channels.py | 4 | 9552 | """
Support for interfacing with an instance of Channels (https://getchannels.com).
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/media_player.channels/
"""
import logging
import voluptuous as vol
from homeassistant.components.media_player import (
... | apache-2.0 |
xxsergzzxx/python-for-android | python3-alpha/python3-src/Lib/idlelib/IOBinding.py | 46 | 19385 | import os
import types
import sys
import codecs
import tempfile
import tkinter.filedialog as tkFileDialog
import tkinter.messagebox as tkMessageBox
import re
from tkinter import *
from tkinter.simpledialog import askstring
from idlelib.configHandler import idleConf
from codecs import BOM_UTF8
# Try setting the local... | apache-2.0 |
saradbowman/osf.io | website/archiver/utils.py | 8 | 10456 | import functools
from framework.auth import Auth
from website.archiver import (
StatResult, AggregateStatResult,
ARCHIVER_NETWORK_ERROR,
ARCHIVER_SIZE_EXCEEDED,
ARCHIVER_FILE_NOT_FOUND,
ARCHIVER_FORCED_FAILURE,
)
from website import (
mails,
settings
)
from osf.utils.sanitize import unesc... | apache-2.0 |
linkinwong/word2vec | src/crf-paper-script/preprocessor10_refine_lbfgs_l2sgd.py | 1 | 10310 | # coding: utf-8
__author__ = 'linlin'
import os
import logging
import re
import pdb
logger = logging.getLogger(__name__)
################################################################
root_dir = '/home/linlin/time/0903_classify_false_start/1003_raw_features/'
separator = '\t\t'
#####################################... | apache-2.0 |
youprofit/webserver | admin/Certs.py | 5 | 1945 | # -*- coding: utf-8 -*-
#
# Cherokee-admin
#
# Authors:
# Alvaro Lopez Ortega <alvaro@alobbs.com>
#
# Copyright (C) 2001-2014 Alvaro Lopez Ortega
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License as published by the Free S... | gpl-2.0 |
Fafou/Sick-Beard | lib/hachoir_parser/container/ogg.py | 90 | 11888 | #
# Ogg parser
# Author Julien Muchembled <jm AT jm10.no-ip.com>
# Created: 10 june 2006
#
from lib.hachoir_parser import Parser
from lib.hachoir_core.field import (Field, FieldSet, createOrphanField,
NullBits, Bit, Bits, Enum, Fragment, MissingField, ParserError,
UInt8, UInt16, UInt24, UInt32, UInt64,
Raw... | gpl-3.0 |
MonicaHsu/truvaluation | venv/lib/python2.7/encodings/cp875.py | 593 | 13110 | """ Python Character Mapping Codec cp875 generated from 'MAPPINGS/VENDORS/MICSFT/EBCDIC/CP875.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,input... | mit |
prasannav7/ggrc-core | src/ggrc/models/context.py | 5 | 3536 | # Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: david@reciprocitylabs.com
# Maintained By: david@reciprocitylabs.com
import datetime
from sqlalchemy.ext.declarative import declared_attr
from ggrc... | apache-2.0 |
chrismbarnes/ndnSIM | src/netanim/bindings/modulegen__gcc_ILP32.py | 354 | 264513 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... | gpl-2.0 |
maurofaccenda/ansible | lib/ansible/modules/network/avi/avi_network.py | 49 | 4780 | #!/usr/bin/python
#
# Created on Aug 25, 2016
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the te... | gpl-3.0 |
djkonro/client-python | kubernetes/client/models/v1_component_status_list.py | 2 | 6402 | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.7.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | apache-2.0 |
okolisny/integration_tests | cfme/middleware/server.py | 1 | 17554 | import re
from navmazing import NavigateToSibling, NavigateToAttribute
from selenium.common.exceptions import NoSuchElementException
from wrapanapi.hawkular import CanonicalPath
from cfme.common import Taggable, UtilizationMixin
from cfme.exceptions import MiddlewareServerNotFound, \
MiddlewareServerGroupNotFound... | gpl-2.0 |
phihag/youtube-dl | youtube_dl/extractor/voxmedia.py | 16 | 8125 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from .once import OnceIE
from ..compat import compat_urllib_parse_unquote
from ..utils import ExtractorError
class VoxMediaVolumeIE(OnceIE):
_VALID_URL = r'https?://volume\.vox-cdn\.com/embed/(?P<id>[0-9a-f]{9})'
def _... | unlicense |
sammyboy45467/Portfolio | wp-content/themes/themer/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py | 426 | 120645 | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Xcode project file generator.
This module is both an Xcode project file generator and a documentation of the
Xcode project file format. Knowledge of the proje... | gpl-2.0 |
stackforge/swift3 | swift3/controllers/base.py | 4 | 2814 | # Copyright (c) 2010-2014 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 or agre... | apache-2.0 |
hnakamur/django | tests/foreign_object/tests.py | 157 | 17137 | import datetime
from operator import attrgetter
from django.core.exceptions import FieldError
from django.test import TestCase, skipUnlessDBFeature
from django.utils import translation
from .models import (
Article, ArticleIdea, ArticleTag, ArticleTranslation, Country, Friendship,
Group, Membership, NewsArtic... | bsd-3-clause |
sysbot/CouchPotatoServer | libs/requests/packages/charade/mbcsgroupprober.py | 2769 | 1967 | ######################## 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 |
rahul003/mxnet | example/rcnn/symnet/symbol_resnet.py | 11 | 11977 | # 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 |
ojengwa/odoo | addons/procurement_jit/procurement_jit.py | 244 | 1543 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2013 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 |
cdrttn/samba-regedit | buildtools/wafsamba/samba_headers.py | 33 | 6562 | # specialist handling of header files for Samba
import Build, re, Task, TaskGen, shutil, sys, Logs
from samba_utils import *
def header_install_path(header, header_path):
'''find the installation path for a header, given a header_path option'''
if not header_path:
return ''
if not isinstance(head... | gpl-3.0 |
ESOedX/edx-platform | lms/djangoapps/verify_student/models.py | 1 | 42981 | # -*- coding: utf-8 -*-
"""
Models for Student Identity Verification
This is where we put any models relating to establishing the real-life identity
of a student over a period of time. Right now, the only models are the abstract
`PhotoVerification`, and its one concrete implementation
`SoftwareSecurePhotoVerification`... | agpl-3.0 |
codexns/sublime-coverage | st2_windows_x64/coverage/plugin.py | 44 | 13418 | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""Plugin interfaces for coverage.py"""
from coverage import files
from coverage.misc import contract, _needs_to_implement
class CoveragePlugin(object):
"""B... | apache-2.0 |
heeraj123/oh-mainline | vendor/packages/gdata/src/gdata/core.py | 103 | 8239 | #!/usr/bin/env python
#
# Copyright (C) 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... | agpl-3.0 |
theoryno3/scikit-learn | sklearn/linear_model/base.py | 89 | 14608 | """
Generalized Linear models.
"""
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Olivier Grisel <olivier.grisel@ensta.org>
# Vincent Michel <vincent.michel@inria.fr>
# Peter Prettenhofer <peter.prettenhofer@gmail.com>
# ... | bsd-3-clause |
kartikdhar/djangotest | virt1/lib/python2.7/site-packages/django/views/decorators/debug.py | 712 | 2627 | import functools
from django.http import HttpRequest
def sensitive_variables(*variables):
"""
Indicates which variables used in the decorated function are sensitive, so
that those variables can later be treated in a special way, for example
by hiding them when logging unhandled exceptions.
Two f... | mit |
tynn/lunchdate.bot | setup.py | 1 | 2335 | #!/usr/bin/env python
# vim: expandtab tabstop=4 shiftwidth=4
#
# Copyright (c) 2016 Christian Schmitz <tynn.dev@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either ve... | lgpl-3.0 |
jayme-github/CouchPotatoServer | libs/suds/transport/options.py | 200 | 2211 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | gpl-3.0 |
verifiedpixel/verifiedpixel | server/vpp/verifiedpixel/tineye_test.py | 3 | 2044 | from unittest import TestCase
from .tineye import get_tineye_results
from .exceptions import APIGracefulException
from .vpp_mock import activate_tineye_mock
from .vpp_test import VPPTestCase, setup
from pprint import pprint # noqa @TODO: debug
class TinEyeTest(TestCase, VPPTestCase):
@classmethod
def set... | agpl-3.0 |
7kbird/chrome | remoting/tools/jscompile.py | 102 | 1396 | #!/usr/bin/python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import argparse
import subprocess
import sys
import os
DESCRIPTION = '''Run the given JavaScript files through jscompile.'''
FILES_HELP = ... | bsd-3-clause |
ff94315/hiwifi-openwrt-HC5661-HC5761 | staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/idlelib/AutoExpand.py | 227 | 2483 | import string
import re
###$ event <<expand-word>>
###$ win <Alt-slash>
###$ unix <Alt-slash>
class AutoExpand:
menudefs = [
('edit', [
('E_xpand Word', '<<expand-word>>'),
]),
]
wordchars = string.ascii_letters + string.digits + "_"
def __init__(self, editwin):
... | gpl-2.0 |
geometryzen/geometryzen | vendor/js-beautify/python/jsbeautifier/unpackers/tests/testjavascriptobfuscator.py | 111 | 1540 | #
# written by Stefano Sanfilippo <a.little.coder@gmail.com>
#
"""Tests for JavaScriptObfuscator unpacker."""
import unittest
from jsbeautifier.unpackers.javascriptobfuscator import (
unpack, detect, smartsplit)
# pylint: disable=R0904
class TestJavascriptObfuscator(unittest.TestCase):
"""JavascriptObfus... | mit |
RafaelTorrealba/odoo | openerp/addons/base/ir/ir_config_parameter.py | 311 | 4463 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 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 |
miipl-naveen/optibizz | addons/portal_sale/portal_sale.py | 288 | 8177 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2012 OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... | agpl-3.0 |
quentinsf/ansible | lib/ansible/plugins/lookup/inventory_hostnames.py | 69 | 1496 | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2013, Steven Dossett <sdossett@panath.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 versio... | gpl-3.0 |
Ravenm/2143-OOP-NASH | python3env/Lib/site-packages/setuptools/py31compat.py | 121 | 1636 | import sys
import unittest
__all__ = ['get_config_vars', 'get_path']
try:
# Python 2.7 or >=3.2
from sysconfig import get_config_vars, get_path
except ImportError:
from distutils.sysconfig import get_config_vars, get_python_lib
def get_path(name):
if name not in ('platlib', 'purelib'):
... | cc0-1.0 |
remitamine/youtube-dl | youtube_dl/extractor/freespeech.py | 20 | 1057 | from __future__ import unicode_literals
from .common import InfoExtractor
from .youtube import YoutubeIE
class FreespeechIE(InfoExtractor):
IE_NAME = 'freespeech.org'
_VALID_URL = r'https?://(?:www\.)?freespeech\.org/stories/(?P<id>.+)'
_TEST = {
'add_ie': ['Youtube'],
'url': 'http://www.... | unlicense |
iAmMrinal0/CouchPotatoServer | libs/oauthlib/oauth2/draft25/utils.py | 112 | 3876 | """
oauthlib.utils
~~~~~~~~~~~~~~
This module contains utility methods used by various parts of the OAuth 2 spec.
"""
import random
import string
import time
import urllib
from urlparse import urlparse, urlunparse, parse_qsl
UNICODE_ASCII_CHARACTER_SET = (string.ascii_letters.decode('ascii') +
string.digits.deco... | gpl-3.0 |
dipakvwarade/pychef | chef/auth.py | 5 | 2443 | import six.moves
import base64
import datetime
import hashlib
import re
def _ruby_b64encode(value):
"""The Ruby function Base64.encode64 automatically breaks things up
into 60-character chunks.
"""
b64 = base64.b64encode(value)
for i in six.moves.range(0, len(b64), 60):
yield b64[i:i + 60].... | apache-2.0 |
uglyboxer/linear_neuron | net-p3/lib/python3.5/site-packages/sklearn/cluster/dbscan_.py | 7 | 10968 | # -*- coding: utf-8 -*-
"""
DBSCAN: Density-Based Spatial Clustering of Applications with Noise
"""
# Author: Robert Layton <robertlayton@gmail.com>
# Joel Nothman <joel.nothman@gmail.com>
# Lars Buitinck
#
# License: BSD 3 clause
import warnings
import numpy as np
from ..base import BaseEstimator, ... | mit |
hoangt/tpzsimul.gem5 | src/arch/x86/isa/insts/simd128/integer/save_and_restore_state/save_and_restore_state.py | 20 | 6635 | # Copyright (c) 2013 Andreas Sandberg
# 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 fol... | bsd-3-clause |
mhbu50/frappe | frappe/website/doctype/help_article/help_article.py | 12 | 2994 | # Copyright (c) 2013, Frappe and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.website.website_generator import WebsiteGenerator
from frappe.utils import is_markdown, markdown
from frappe.website.utils import get_comment_list
from frapp... | mit |
erikr/django | tests/foreign_object/models/article.py | 51 | 3473 | from django.db import models
from django.db.models.fields.related import ForwardManyToOneDescriptor
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import get_language
class ArticleTranslationDescriptor(ForwardManyToOneDescriptor):
"""
The set of articletranslation ... | bsd-3-clause |
mrgloom/essentia | src/examples/python/streaming_extractor/postprocess.py | 10 | 2673 | #!/usr/bin/env python
# Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Essentia
#
# Essentia 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 (FSF), e... | agpl-3.0 |
N3MIS15/maraschino-webcam | lib/jinja2/testsuite/utils.py | 90 | 2237 | # -*- coding: utf-8 -*-
"""
jinja2.testsuite.utils
~~~~~~~~~~~~~~~~~~~~~~
Tests utilities jinja uses.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import gc
import unittest
import pickle
from jinja2.testsuite import JinjaTestCase
from jinja2.utils imp... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.