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 |
|---|---|---|---|---|---|
trondhindenes/ansible-modules-extras | packaging/os/slackpkg.py | 131 | 6382 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Kim Nørgaard
# Written by Kim Nørgaard <jasen@jasen.dk>
# Based on pkgng module written by bleader <bleader@ratonland.org>
# that was based on pkgin module written by Shaun Zinck <shaun.zinck at gmail.com>
# that was based on pacman module written by Afterburn <htt... | gpl-3.0 |
aldryn/heroku-buildpack-python | vendor/setuptools-1.1/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 |
Dhivyap/ansible | test/units/modules/network/nxos/test_nxos_interface_ospf.py | 25 | 7234 | # (c) 2016 Red Hat Inc.
#
# 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 dis... | gpl-3.0 |
crazyyoung01/vv | vn.archive/vn.strategy/strategydemo/ctp_data_type.py | 129 | 257031 | # encoding: UTF-8
defineDict = {}
typedefDict = {}
#//////////////////////////////////////////////////////////////////////
#@system 新一代交易所系统
#@company 上海期货信息技术有限公司
#@file ThostFtdcUserApiDataType.h
#@brief 定义了客户端接口使用的业务数据类型
#@history
#20060106 赵鸿昊 创建该文件
#/////////////////////////////////////////////////////////////... | mit |
treveradams/connector-telephony | crm_phone/wizard/__init__.py | 13 | 1035 | # -*- coding: utf-8 -*-
##############################################################################
#
# CRM Phone module for OpenERP
# Copyright (C) 2014 Alexis de Lattre <alexis@via.ecp.fr>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Ge... | agpl-3.0 |
benfinke/ns_python | build/lib/nssrc/com/citrix/netscaler/nitro/resource/config/cs/csvserver_auditnslogpolicy_binding.py | 3 | 14931 | #
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | apache-2.0 |
longde123/MultiversePlatform | server/src/multiverse/simpleclient/testclientgroups/group12.py | 1 | 1820 | #
# The Multiverse Platform is made available under the MIT License.
#
# Copyright (c) 2012 The Multiverse Foundation
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without restrict... | mit |
co-alliance/adr | sites/all/libraries/bookreader/BookReaderIA/datanode/BookReaderGetText.py | 14 | 7045 | #!/usr/bin/python
# Copyright(c)2008-2010 Internet Archive. Software license AGPL version 3.
#
# This file is part of BookReader.
#
# BookReader 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 Founda... | gpl-2.0 |
spawnedc/MeCanBlog | django/contrib/comments/moderation.py | 246 | 13528 | """
A generic comment-moderation system which allows configuration of
moderation options on a per-model basis.
To use, do two things:
1. Create or import a subclass of ``CommentModerator`` defining the
options you want.
2. Import ``moderator`` from this module and register one or more
models, passing the model... | bsd-3-clause |
escattone/kuma | kuma/api/v1/tests/test_plus.py | 1 | 4264 | import json
import pytest
from kuma.core.urlresolvers import reverse
from kuma.plus.models import LandingPageSurvey
@pytest.mark.django_db
def test_ping_landing_page_survey_happy_path(client, settings):
# This sets the needed session cookie
variant_url = reverse("api.v1.plus.landing_page_variant")
respo... | mpl-2.0 |
keishi/chromium | build/mac/tweak_info_plist.py | 11 | 10590 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Xcode supports build variable substitutions and CPP; sadly, that doesn't work
# because:
#
# 1. Xcode wants to do the Info.pli... | bsd-3-clause |
jalexvig/tensorflow | tensorflow/python/framework/sparse_tensor.py | 12 | 9826 | # 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 |
drxaero/calibre | src/calibre/ebooks/chm/metadata.py | 14 | 5612 | #!/usr/bin/env python2
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import with_statement
__license__ = 'GPL v3'
__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import re, codecs
from calibre.ebooks.BeautifulSoup import BeautifulSoup
from calib... | gpl-3.0 |
rvykydal/anaconda | pyanaconda/modules/common/structures/kickstart.py | 5 | 3975 | #
# DBus structures for kickstart.
#
# Copyright (C) 2019 Red Hat, Inc. All rights reserved.
#
# 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 op... | gpl-2.0 |
Krossom/python-for-android | python-modules/twisted/twisted/conch/client/agent.py | 60 | 1740 | # -*- test-case-name: twisted.conch.test.test_default -*-
# Copyright (c) 2001-2009 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 protoc... | apache-2.0 |
atvcaptain/enigma2 | lib/python/Plugins/Extensions/DVDBurn/Title.py | 1 | 6455 | from __future__ import absolute_import
from Components.config import ConfigSubsection, ConfigSubList, ConfigInteger, ConfigText, ConfigSelection
from . import TitleCutter
class ConfigFixedText(ConfigText):
def __init__(self, text, visible_width=60):
ConfigText.__init__(self, default = text, fixed_size = True, visib... | gpl-2.0 |
shsingh/ansible | lib/ansible/module_utils/network/ios/facts/lag_interfaces/lag_interfaces.py | 21 | 4252 | #
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
The ios lag_interfaces fact class
It is in this file the configuration is collected from the device
for a given resource, parsed, and the facts tree is populated
based on... | gpl-3.0 |
40223112/2015cd_midterm | static/Brython3.1.0-20150301-090019/Lib/tarfile.py | 728 | 88474 | #!/usr/bin/env python3
#-------------------------------------------------------------------
# tarfile.py
#-------------------------------------------------------------------
# Copyright (C) 2002 Lars Gustaebel <lars@gustaebel.de>
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any pers... | gpl-3.0 |
ryfeus/lambda-packs | Tensorflow_OpenCV_Nightly/source/tensorflow/contrib/learn/python/learn/estimators/tensor_signature.py | 134 | 6730 | # 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... | mit |
AmrnotAmr/zato | code/zato-server/test/zato/server/service/test_service.py | 6 | 19235 | # -*- coding: utf-8 -*-
"""
Copyright (C) 2013 Dariusz Suchojad <dsuch at zato.io>
Licensed under LGPLv3, see LICENSE.txt for terms and conditions.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
# stdlib
import ast
from json import loads
from logging import getLogger, INFO
fr... | gpl-3.0 |
TheTypoMaster/my-vim-set-mac | .vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/extra_conf_store.py | 20 | 7323 | #!/usr/bin/env python
#
# Copyright (C) 2011, 2012 Google Inc.
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe 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
# (... | gpl-2.0 |
vponomaryov/manila | manila/share/drivers/dell_emc/plugins/vmax/constants.py | 1 | 1753 | # Copyright (c) 2016 Dell Inc. or its subsidiaries.
# 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 |
rs2/bokeh | examples/custom/gears/gear.py | 14 | 1873 | from __future__ import absolute_import
from bokeh.models import Glyph
from bokeh.core.properties import NumberSpec, AngleSpec, Include
from bokeh.core.property_mixins import LineProps, FillProps
class Gear(Glyph):
""" Render gears.
The details and nomenclature concerning gear construction can
be quite in... | bsd-3-clause |
avagin/p.haul | p_haul_ovz.py | 1 | 4646 | #
# OpenVZ containers hauler module
#
import os
import shutil
import p_haul_cgroup
import p_haul_netifapi as netif
import p_haul_fsapi as fsapi
import p_haul_netapi as netapi
import fs_haul_shared
import fs_haul_subtree
name = "ovz"
vzpid_dir = "/var/lib/vzctl/vepid/"
vz_dir = "/vz"
vzpriv_dir = "%s/private" % vz_dir... | lgpl-2.1 |
vertigo235/Sick-Beard-XEM | lib/unidecode/x09a.py | 253 | 4623 | data = (
'E ', # 0x00
'Cheng ', # 0x01
'Xin ', # 0x02
'Ai ', # 0x03
'Lu ', # 0x04
'Zhui ', # 0x05
'Zhou ', # 0x06
'She ', # 0x07
'Pian ', # 0x08
'Kun ', # 0x09
'Tao ', # 0x0a
'Lai ', # 0x0b
'Zong ', # 0x0c
'Ke ', # 0x0d
'Qi ', # 0x0e
'Qi ', # 0x0f
'Yan ', # 0x10
'Fei '... | gpl-3.0 |
jima80525/pyres | pyres/filemanager.py | 1 | 4287 | """
manages the files on the mp3 player
"""
import os
import re
import logging
import shutil
import pyres.utils as utils
def _double_digit_name(name):
""" Makes all numbers two digit numbers by adding a leading 0 where
necessary. Three digit or longer numbers are unaffected. """
# do a little clean up to... | mit |
derekhe/huawei-g330d-u8825d-kernel | scripts/gcc-wrapper.py | 33 | 4591 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2011-2012, Code Aurora Forum. 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 a... | gpl-2.0 |
rchakra3/mase | python101/code/Subject.py | 14 | 2318 | """Example of the Observer pattern using Pyro.
Copyright 2010 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
from copy import copy
# this import has to be here in case we get a Pyro error from an RMI
import Pyro.errors
from remote_object import RemoteObject, NameServer
class Subject(R... | unlicense |
mrrrgn/AutobahnPython | examples/twisted/websocket/streaming/frame_based_client.py | 18 | 3407 | ###############################################################################
##
## Copyright (C) 2011-2013 Tavendo GmbH
##
## 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
##
#... | apache-2.0 |
M4sse/chromium.src | tools/memory_inspector/memory_inspector/classification/rules.py | 109 | 5039 | # 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.
"""This module defines the core structure of the classification rules.
This module does NOT specify how the rules filter the data: this responsibility
is of... | bsd-3-clause |
junmin-kim/TizenRT | external/gmock/gtest/scripts/fuse_gtest_files.py | 2577 | 8813 | #!/usr/bin/env python
#
# Copyright 2009, 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... | apache-2.0 |
p0psicles/SickGear | sickbeard/traktChecker.py | 3 | 9633 | # Author: Frank Fenton
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of SickGear.
#
# SickGear 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 ... | gpl-3.0 |
hastexo/edx-platform | cms/djangoapps/contentstore/views/tests/test_gating.py | 11 | 5318 | """
Unit tests for the gating feature in Studio
"""
import json
from mock import patch
from contentstore.tests.utils import CourseTestCase
from contentstore.utils import reverse_usage_url
from contentstore.views.item import VisibilityState
from openedx.core.lib.gating.api import GATING_NAMESPACE_QUALIFIER
from xmodul... | agpl-3.0 |
ashutrix03/inteygrate_flaskapp-master | yowsup/common/optionalmodules.py | 13 | 1739 | import importlib
import logging
logger = logging.getLogger(__name__)
from contextlib import contextmanager
class OptionalModule(object):
def __init__(self, modulename, failMessage = None, require = False):
self.modulename = modulename
self.require = require
self.failMessage = failMessage
... | gpl-3.0 |
ingenioustechie/zamboni | mkt/extensions/serializers.py | 6 | 4329 | from rest_framework.fields import CharField, ListField, SerializerMethodField
from rest_framework.serializers import ModelSerializer
from mkt.api.fields import ReverseChoiceField, TranslationSerializerField
from mkt.constants.base import (STATUS_CHOICES_API_v2,
STATUS_FILE_CHOICES_API_v... | bsd-3-clause |
davidjb/sqlalchemy | lib/sqlalchemy/testing/plugin/noseplugin.py | 58 | 2847 | # plugin/noseplugin.py
# Copyright (C) 2005-2015 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Enhance nose with extra options and behaviors for running SQLAlchemy tests.
... | mit |
anna-ka/nlptools-ru | nlptools2/pickling.py | 4 | 5306 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from collections import defaultdict
import pickle
# Функции-обертки для загрузки/выгрузки многоуровневых словарей с помощью модуля cPickle (Python 2.7)
def inner_lambda_float():
"""
Обертка для lambda (одноуровневая, float)
"""
return defaultdict(... | mit |
ClovisIRex/Snake-django | env/lib/python3.6/site-packages/django/contrib/messages/storage/fallback.py | 704 | 2172 | from django.contrib.messages.storage.base import BaseStorage
from django.contrib.messages.storage.cookie import CookieStorage
from django.contrib.messages.storage.session import SessionStorage
class FallbackStorage(BaseStorage):
"""
Tries to store all messages in the first backend, storing any unstored
me... | mit |
sammerry/ansible | lib/ansible/parsing/vault/__init__.py | 40 | 20086 | # (c) 2014, James Tanner <tanner.jc@gmail.com>
#
# 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 distributed i... | gpl-3.0 |
ferranti/watchdog | vendor/pyExcelerator-0.6.3a/pyExcelerator/BIFFRecords.py | 11 | 88369 | #!/usr/bin/env python
# -*- coding: windows-1251 -*-
# Copyright (C) 2005 Roman V. Kiseliov
# 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 reta... | agpl-3.0 |
realsaiko/odoo | openerp/report/render/html2html/html2html.py | 443 | 4238 | # -*- 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 |
bmars/sisko | sisko/app.py | 1 | 4908 | # Copyright (C) 2014 Brian Marshall
#
# 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.
#
# This program is distributed in... | gpl-3.0 |
shsingh/ansible | lib/ansible/modules/network/netvisor/pn_prefix_list_network.py | 35 | 5247 | #!/usr/bin/python
# Copyright: (c) 2018, Pluribus Networks
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['p... | gpl-3.0 |
android-ia/platform_external_chromium_org_third_party_libyuv | gyp_libyuv.py | 179 | 1124 | #!/usr/bin/env python
#
# Copyright 2014 The LibYuv Project Authors. All rights reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All cont... | bsd-3-clause |
loehnertj/bsbgateway | bsbgateway/util/jos_parser.py | 1 | 15340 |
##############################################################################
#
# Copyright (C) Johannes Loehnert, 2013-2015
#
# 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 Fou... | gpl-3.0 |
beiko-lab/gengis | bin/Lib/site-packages/scipy/sparse/csgraph/_validation.py | 1 | 2475 | from __future__ import division, print_function, absolute_import
import numpy as np
from scipy.sparse import csr_matrix, isspmatrix, isspmatrix_csc, isspmatrix_csr
from ._tools import csgraph_to_dense, csgraph_from_dense,\
csgraph_masked_from_dense, csgraph_from_masked
DTYPE = np.float64
def validate_... | gpl-3.0 |
liangjiaxing/sympy | examples/galgebra/products_latex.py | 72 | 2650 | #!/usr/bin/env python
from __future__ import print_function
from sympy import symbols
from sympy.galgebra import MV, Format
from sympy.galgebra import xdvi
def main():
Format()
coords = (x, y, z) = symbols('x y z')
(ex, ey, ez, grad) = MV.setup('e*x|y|z', '[1,1,1]', coords=coords)
s = MV('s', 'sca... | bsd-3-clause |
LordDamionDevil/Lony | lib/discord/embeds.py | 17 | 13379 | # -*- coding: utf-8 -*-
"""
The MIT License (MIT)
Copyright (c) 2015-2016 Rapptz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to u... | gpl-3.0 |
MikkCZ/kitsune | kitsune/wiki/views.py | 2 | 62318 | import json
import logging
import time
import re
from datetime import datetime
from functools import wraps
from django.conf import settings
from django.contrib import messages
from django.contrib.auth.models import User
from django.core.cache import cache
from django.core.exceptions import PermissionDenied
from django... | bsd-3-clause |
inmomentsoftware/pledgeservice | lib/mailchimp/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py | 2360 | 3778 | """The match_hostname() function from Python 3.3.3, essential when using SSL."""
# Note: This file is under the PSF license as the code comes from the python
# stdlib. http://docs.python.org/3/license.html
import re
__version__ = '3.4.0.2'
class CertificateError(ValueError):
pass
def _dnsname_match(dn, host... | agpl-3.0 |
perezg/infoxchange | BASE/lib/python2.7/site-packages/django/contrib/sites/models.py | 103 | 2979 | from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils.encoding import python_2_unicode_compatible
SITE_CACHE = {}
class SiteManager(models.Manager):
def get_current(self):
"""
Returns the current ``Site`` based on the SITE_ID in the
proje... | apache-2.0 |
MobSF/Mobile-Security-Framework-MobSF | mobsf/StaticAnalyzer/views/ios/db_interaction.py | 1 | 7363 | """Module holding the functions for the db."""
import logging
from django.conf import settings
from mobsf.MobSF.utils import python_dict, python_list
from mobsf.StaticAnalyzer.models import StaticAnalyzerIOS
from mobsf.StaticAnalyzer.models import RecentScansDB
logger = logging.getLogger(__name__)
def get_context_... | gpl-3.0 |
ms-iot/samples | AllJoyn/Samples/OICAdapter/iotivity-1.0.0/build_common/iotivityconfig/compiler/default_configuration.py | 64 | 2636 | # ------------------------------------------------------------------------
# Copyright 2015 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | mit |
pas256/ansible | lib/ansible/template/safe_eval.py | 31 | 4391 | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... | gpl-3.0 |
BeiLuoShiMen/nupic | tests/integration/nupic/algorithms/knn_classifier_test/categories_test.py | 35 | 3887 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2014, Numenta, Inc. Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software code, the
# following terms and conditio... | agpl-3.0 |
jerryblakley/libcloud | libcloud/test/compute/test_voxel.py | 46 | 6165 | # 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 use ... | apache-2.0 |
Shatki/PyIMU | test/magnetosphere.py | 1 | 1580 | from mpl_toolkits.mplot3d import axes3d
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
from socket import *
import time
# Объявляем все глобальные переменные
HOST = '192.168.0.76'
PORT = 21566
BUFSIZ = 512
ADDR = (HOST, PORT)
bad_packet = 0
good_packet = 0
# fig, ax... | gpl-3.0 |
embray/astropy_helpers | setup.py | 1 | 2069 | #!/usr/bin/env python
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import ah_bootstrap
import pkg_resources
from setuptools import setup
from astropy_helpers.setup_helpers import register_commands, get_package_info
from astropy_helpers.version_helpers import generate_version_py
NAME = 'astropy_help... | bsd-3-clause |
sfairhur/pycbc | pycbc/noise/gaussian.py | 6 | 5087 | # Copyright (C) 2012 Alex Nitz
#
#
# 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.
#
# This program is distributed in t... | gpl-3.0 |
sidartaoliveira/ansible | lib/ansible/modules/web_infrastructure/ansible_tower/tower_host.py | 36 | 5901 | #!/usr/bin/python
# coding: utf-8 -*-
# (c) 2017, Wayne Witzel III <wayne@riotousliving.com>
#
# This module 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 opti... | gpl-3.0 |
toontownfunserver/Panda3D-1.9.0 | direct/p3d/HostInfo.py | 2 | 28703 | from pandac.PandaModules import HashVal, Filename, PandaSystem, DocumentSpec, Ramfile
from pandac.PandaModules import HTTPChannel
from pandac import PandaModules
from libpandaexpress import ConfigVariableInt
from direct.p3d.PackageInfo import PackageInfo
from direct.p3d.FileSpec import FileSpec
from direct.directnotify... | bsd-3-clause |
kirca/OpenUpgrade | addons/portal_gamification/__openerp__.py | 381 | 1571 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 OpenERP SA (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 |
emilianobilli/stog | stog.py | 2 | 3129 | import httplib
import json
import urllib
import socket
import getpass
class stogError(Exception):
def __init__(self, value, critical=False):
self.value = value
self.critical = critical
def __str__(self):
return str(self.value)
def __repr__(self):
return self.value
class stogClient(object):
d... | gpl-2.0 |
Peddle/hue | desktop/core/ext-py/cx_Oracle-5.1.2/test/uNumberVar.py | 34 | 10867 | """Module for testing number variables."""
import cx_Oracle
import decimal
class TestNumberVar(BaseTestCase):
def setUp(self):
BaseTestCase.setUp(self)
self.rawData = []
self.dataByKey = {}
for i in range(1, 11):
numberCol = i + i * 0.25
floatCol = i + i * 0.75
... | apache-2.0 |
sammuelyee/validator | build/build.py | 2 | 51748 | #!/usr/bin/env python2.7
# Copyright (c) 2007 Henri Sivonen
# Copyright (c) 2008-2015 Mozilla Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including with... | mit |
andyzsf/django-cms | cms/models/pluginmodel.py | 7 | 20106 | # -*- coding: utf-8 -*-
from datetime import date
import json
from operator import itemgetter
import os
import warnings
from django.conf import settings
from django.core.urlresolvers import NoReverseMatch
from django.core.exceptions import ValidationError, ObjectDoesNotExist
from django.db import models
from django.db... | bsd-3-clause |
nuuuboo/odoo | openerp/addons/base/tests/test_qweb.py | 289 | 4814 | # -*- coding: utf-8 -*-
import cgi
import json
import os.path
import glob
import re
import collections
from lxml import etree
import openerp.addons.base.ir.ir_qweb
import openerp.modules
from openerp.tests import common
from openerp.addons.base.ir import ir_qweb
class TestQWebTField(common.TransactionCase):
def ... | agpl-3.0 |
krbaker/Diamond | src/diamond/handler/rabbitmq_pubsub.py | 21 | 6661 | # coding=utf-8
"""
Output the collected values to RabitMQ pub/sub channel
"""
from Handler import Handler
import time
try:
import pika
except ImportError:
pika = None
class rmqHandler (Handler):
"""
Implements the abstract Handler class
Sending data to a RabbitMQ pub/sub channel
"""
... | mit |
openhatch/oh-mainline | vendor/packages/twisted/twisted/test/test_jelly.py | 18 | 19479 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Test cases for L{jelly} object serialization.
"""
import datetime
try:
import decimal
except ImportError:
decimal = None
from twisted.spread import jelly, pb
from twisted.python.compat import set, frozenset
from twisted.trial import... | agpl-3.0 |
chipaca/snapcraft | tests/os_release.py | 2 | 1612 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2018 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 |
TW314/tw314Web | persistence/EmpresaPersistence.py | 2 | 4143 | from pip._vendor import requests
from form.EmpresaForm import EmpresaForm
def cadastra(empresa):
form = EmpresaForm(empresa)
if form.is_valid():
ramo_atividade = form.cleaned_data['ramo_atividade']
numero_cnpj = form.cleaned_data["numero_cnpj"]
nome_fantasia = form.cleaned_data['nome... | gpl-3.0 |
dirn/ansible | contrib/inventory/ovirt.py | 65 | 9521 | #!/usr/bin/env python
# Copyright 2015 IIX Inc.
#
# 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 ver... | gpl-3.0 |
DoubleNegativeVisualEffects/cortex | contrib/for_review/MayaOp/publishCamera-1.py | 12 | 2773 | import os
import subprocess
import IECore
class MayaOp( IECore.Op ) :
def __init__( self, description ) :
IECore.Op.__init__( self, description, IECore.IntParameter( "result", "The return status.", 0 ) )
if self.mayaModule() is None :
self.parameters().addParameters(
[
IECore.File... | bsd-3-clause |
debugger06/MiroX | tv/lib/frontends/widgets/removefeeds.py | 3 | 5512 | # Miro - an RSS based video player application
# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
# Participatory Culture Foundation
#
# 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; eithe... | gpl-2.0 |
elventear/txamqp | src/txamqp/test/test_queue.py | 4 | 11353 | #
# 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 |
chessco/cursus | modules/data_source_providers/synchronous_providers.py | 7 | 20506 | # 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 |
cesarmarinhorj/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/watchlist/watchlistrule.py | 132 | 2153 | # 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 |
0xGiddi/pymbr | pymbr/bootcode.py | 1 | 1582 | """
pymbr
A python module to manipulate and create MBRs.
:copyright: (c) 2017 by Gideon S. (0xGiddi)
:license: GPLv3, see LICENSE file for more details.
"""
__all__ = ['Bootcode']
class Bootcode:
""" Common bootcodes used by various OSes """
ZERO = [0x00]
ZOIDBERG = [0xB8, 0xC0, 0x07, 0x05,... | gpl-3.0 |
royc1/gpdb | gpMgmt/bin/gppylib/commands/unix.py | 20 | 31774 | #!/usr/bin/env python
#
# Copyright (c) Greenplum Inc 2008. All Rights Reserved.
#
"""
Set of Classes for executing unix commands.
"""
import os
import psutil
import platform
import socket
import sys
import signal
from gppylib.gplog import *
from gppylib.commands.base import *
logger = gplog.get_default_logger()
... | apache-2.0 |
GoodgameStudios/crossbar | crossbar/twisted/endpoint.py | 1 | 12193 | #####################################################################################
#
# Copyright (C) Tavendo GmbH
#
# Unless a separate license agreement exists between you and Tavendo GmbH (e.g. you
# have purchased a commercial license), the license terms below apply.
#
# Should you enter into a separate licen... | agpl-3.0 |
alexthered/kienhoc-platform | lms/djangoapps/courseware/migrations/0009_add_field_default.py | 114 | 9698 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'XModuleContentField.value'
db.alter_column('courseware_xmodulecontentfield', 'value', sel... | agpl-3.0 |
ChinaMassClouds/copenstack-server | openstack/src/ceilometer-2014.2.2/ceilometer/tests/storage/test_pymongo_base.py | 5 | 8903 | # 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 t... | gpl-2.0 |
harikishen/addons-server | src/olympia/api/parsers.py | 16 | 1191 | from rest_framework.parsers import DataAndFiles, MultiPartParser
class MultiPartParser(MultiPartParser):
"""
Parser for multipart form data, which may include file data.
Lifted from https://github.com/tomchristie/django-rest-framework/pull/4026/
to work around request.data being empty when multipart/... | bsd-3-clause |
annegentle/magnum | magnum/objects/bay.py | 8 | 8241 | # coding=utf-8
#
#
# 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 |
yanheven/keystone | keystone/auth/plugins/external.py | 6 | 6451 | # Copyright 2013 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 agreed to in... | apache-2.0 |
lainegates/DDA | loadDataTools.py | 1 | 41566 | # coding=gbk
#***************************************************************************
#* *
#* Copyright (c) 2009, 2010 *
#* Xiaolong Cheng <lainegates@163.com> ... | lgpl-2.1 |
Tatsh-ansible/ansible | test/units/parsing/vault/test_vault_editor.py | 5 | 20845 | # (c) 2014, James Tanner <tanner.jc@gmail.com>
# (c) 2014, James Cammarata, <jcammarata@ansible.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 ... | gpl-3.0 |
jss-emr/openerp-7-src | openerp/addons/hr_holidays/__openerp__.py | 52 | 3207 | # -*- 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 |
8l/bokken | lib/backend.py | 4 | 1370 | # -*- coding: utf-8 -*-
"""
Bokken Disassembler Framework
Copyright (c) 2015 David Martínez Moreno <ender@debian.org>
I am providing code in this repository to you under an open source license.
Because this is a personal repository, the license you receive to my code
is from me and not my employer (Facebook).
This pr... | gpl-2.0 |
engine95/navel-855 | tools/perf/scripts/python/net_dropmonitor.py | 4235 | 1554 | # 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 |
DamCB/tyssue | tyssue/draw/ipv_draw.py | 2 | 8114 | """3D visualisation inside the notebook.
"""
import warnings
import numpy as np
import pandas as pd
from matplotlib import cm
from ipywidgets import interact
from ..config.draw import sheet_spec
from ..utils.utils import spec_updater, get_sub_eptm
try:
import ipyvolume as ipv
except ImportError:
print(
... | gpl-3.0 |
IndonesiaX/edx-platform | cms/djangoapps/contentstore/tests/test_request_event.py | 234 | 1654 | """Tests for CMS's requests to logs"""
import mock
from django.test import TestCase
from django.core.urlresolvers import reverse
from contentstore.views.helpers import event as cms_user_track
class CMSLogTest(TestCase):
"""
Tests that request to logs from CMS return 204s
"""
def test_post_answers_to... | agpl-3.0 |
Kagee/youtube-dl | youtube_dl/extractor/vh1.py | 199 | 9798 | from __future__ import unicode_literals
from .mtv import MTVIE
import re
from ..utils import fix_xml_ampersands
class VH1IE(MTVIE):
IE_NAME = 'vh1.com'
_FEED_URL = 'http://www.vh1.com/player/embed/AS3/fullepisode/rss/'
_TESTS = [{
'url': 'http://www.vh1.com/video/metal-evolution/full-episodes/pr... | unlicense |
eXcomm/cjdns | node_build/dependencies/libuv/build/gyp/test/rules/gyptest-all.py | 221 | 1753 | #!/usr/bin/env python
# Copyright (c) 2011 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 simple rules when using an explicit build target of 'all'.
"""
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp('no_acti... | gpl-3.0 |
Triv90/Heat | heat/tests/test_parameters.py | 1 | 12606 | # 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 |
fiji-flo/servo | tests/wpt/web-platform-tests/conformance-checkers/tools/ins-del-datetime.py | 107 | 8420 | # -*- coding: utf-8 -*-
import os
ccdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
template = """<!DOCTYPE html>
<meta charset=utf-8>
"""
errors = {
"date-year-0000": "0000-12-09",
"date-month-00": "2002-00-15",
"date-month-13": "2002-13-15",
"date-0005-02-29": "0005-02-29",
"date... | mpl-2.0 |
ZLLab-Mooc/edx-platform | openedx/core/lib/api/permissions.py | 19 | 3809 | """
API library for Django REST Framework permissions-oriented workflows
"""
from django.conf import settings
from django.http import Http404
from rest_framework import permissions
from student.roles import CourseStaffRole
class ApiKeyHeaderPermission(permissions.BasePermission):
"""
Django REST Framework p... | agpl-3.0 |
JeyZeta/Dangerous | Dangerous/Golismero/tools/sqlmap/thirdparty/chardet/jisfreq.py | 323 | 47307 | ######################## 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 |
baylee-d/osf.io | api/nodes/urls.py | 5 | 6124 | from django.conf.urls import url
from api.nodes import views
app_name = 'osf'
urlpatterns = [
# Examples:
# url(r'^$', 'api.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^$', views.NodeList.as_view(), name=views.NodeList.view_name),
url(r'^(?P<node_id>\w+)/$', views.Nod... | apache-2.0 |
dsolimando/Hot | hot-jython-modules/src/main/resources/email/test/test_email_renamed.py | 134 | 118811 | # Copyright (C) 2001-2007 Python Software Foundation
# Contact: email-sig@python.org
# email package unit tests
import os
import sys
import time
import base64
import difflib
import unittest
import warnings
from cStringIO import StringIO
import email
from email.charset import Charset
from email.header import Header, ... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.