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 |
|---|---|---|---|---|---|
muraliselva10/designate | designate/central/__init__.py | 7 | 2152 | # Copyright 2012 Hewlett-Packard Development Company, L.P. All Rights Reserved.
#
# Author: Kiall Mac Innes <kiall@hp.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.... | apache-2.0 |
grap/OCB | addons/account_payment/account_move_line.py | 14 | 4587 | # -*- 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 |
else/mosquitto | lib/python/sub.py | 22 | 2612 | #!/usr/bin/python
# Copyright (c) 2010,2011 Roger Light <roger@atchoo.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright ... | bsd-3-clause |
xq262144/hue | apps/filebrowser/src/filebrowser/settings.py | 2 | 1030 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | apache-2.0 |
pekko/tg-stats | markov.py | 1 | 1850 | #!/usr/bin/env python3
# coding: utf-8
from analyze import get_msgs
from collections import defaultdict
import itertools
import random
import re
class TgMarkov(object):
START='\x01'
STOP='\x02'
def __init__(self, msgs):
self.table = {}
self.user_table = defaultdict(list)
prev = ... | mit |
segasai/astrolibpy | my_utils/from_hex.py | 3 | 1118 | # Copyright (C) 2009-2010 Sergey Koposov
# This file is part of astrolibpy
#
# astrolibpy 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 ... | gpl-3.0 |
philsch/ansible | lib/ansible/modules/network/asa/asa_config.py | 43 | 12077 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | gpl-3.0 |
af1rst/bite-project | deps/closure/closure-library/closure/bin/build/source.py | 97 | 3231 | # Copyright 2009 The Closure Library 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 a... | apache-2.0 |
lundjordan/mozharness | configs/releases/bouncer_firefox_beta.py | 5 | 4640 | # lint_ignore=E501
config = {
"shipped-locales-url": "https://hg.mozilla.org/%(repo)s/raw-file/%(revision)s/browser/locales/shipped-locales",
"products": {
"installer": {
"product-name": "Firefox-%(version)s",
"ssl-only": False,
"add-locales": True,
"paths... | mpl-2.0 |
affo/nova | nova/tests/unit/fake_pci_device_pools.py | 11 | 1378 | # Copyright 2014 IBM Corp.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | apache-2.0 |
nint8835/NintbotForDiscord | jigsaw_plugins/DiscordMarkov/__init__.py | 1 | 4369 | import asyncio
import datetime
import os
import traceback
import markovify
from NintbotForDiscord.Enums import EventTypes
from NintbotForDiscord.Events import MessageSentEvent
from NintbotForDiscord.Plugin import BasePlugin
class DiscordMarkov(BasePlugin):
def __init__(self, manifest, bot_instance):
sup... | mit |
ff94315/hiwifi-openwrt-HC5661-HC5761 | staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/ctypes/wintypes.py | 265 | 5349 | ######################################################################
# This file should be kept compatible with Python 2.3, see PEP 291. #
######################################################################
# The most useful windows datatypes
from ctypes import *
BYTE = c_byte
WORD = c_ushort
DWORD = c_ulong
W... | gpl-2.0 |
jlcarmic/producthunt_simulator | venv/lib/python2.7/site-packages/scipy/misc/pilutil.py | 12 | 16359 | """
A collection of image utilities using the Python Imaging Library (PIL).
Note that PIL is not a dependency of SciPy and this module is not
available on systems that don't have PIL installed.
"""
from __future__ import division, print_function, absolute_import
# Functions which need the PIL
import numpy
import te... | mit |
leoliujie/odoo | addons/website_crm_partner_assign/controllers/main.py | 271 | 7541 | # -*- coding: utf-8 -*-
import werkzeug
from openerp import SUPERUSER_ID
from openerp.addons.web import http
from openerp.addons.web.http import request
from openerp.addons.website.models.website import slug, unslug
from openerp.tools.translate import _
class WebsiteCrmPartnerAssign(http.Controller):
_references_... | agpl-3.0 |
kk7ds/luvs | unifi_ws_server.py | 1 | 19938 | import json
import logging
import os
import ssl
import time
import uuid
import yaml
import asyncio
import websockets
STATE = {
'messageId': 123,
}
def make_message(functionName, responseExpected=False,
payload=None, inResponseTo=0):
messageId = STATE['messageId']
STATE['messageId'] += ... | gpl-3.0 |
thnee/ansible | lib/ansible/modules/cloud/amazon/ec2_instance.py | 4 | 72573 | #!/usr/bin/python
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | gpl-3.0 |
resmo/ansible | lib/ansible/modules/remote_management/manageiq/manageiq_alerts.py | 10 | 12977 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Red Hat 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 |
sinuos/breakpad | src/third_party/protobuf/protobuf/gtest/scripts/gen_gtest_pred_impl.py | 294 | 21993 | #!/usr/bin/env python
#
# Copyright 2006, 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... | bsd-3-clause |
w1ll1am23/home-assistant | homeassistant/components/xiaomi_aqara/cover.py | 14 | 2572 | """Support for Xiaomi curtain."""
from homeassistant.components.cover import ATTR_POSITION, CoverEntity
from . import XiaomiDevice
from .const import DOMAIN, GATEWAYS_KEY
ATTR_CURTAIN_LEVEL = "curtain_level"
DATA_KEY_PROTO_V1 = "status"
DATA_KEY_PROTO_V2 = "curtain_status"
async def async_setup_entry(hass, config_... | apache-2.0 |
efiring/numpy-work | doc/sphinxext/tests/test_docscrape.py | 2 | 12732 | # -*- encoding:utf-8 -*-
import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from docscrape import NumpyDocString, FunctionDoc
from docscrape_sphinx import SphinxDocString
from nose.tools import *
doc_txt = '''\
numpy.multivariate_normal(mean, cov, shape=None)
Draw values from a multiv... | bsd-3-clause |
caphrim007/ansible | lib/ansible/modules/cloud/dimensiondata/dimensiondata_vlan.py | 50 | 19248 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Dimension Data
#
# 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 option) any later ... | gpl-3.0 |
penelopy/luigi | test/contrib/scalding_test.py | 68 | 2092 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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 |
walchko/pyxl320 | examples/complex.py | 1 | 2543 | #!/usr/bin/env python
from __future__ import division, print_function
from pyxl320 import ServoSerial
from pyxl320 import Packet
from pyxl320 import xl320
from pyxl320 import DummySerial
from time import sleep
# import sys
"""
This example rotates the servo back and forth while cycling through the different
colors of... | mit |
kvar/ansible | test/units/modules/network/fortios/test_fortios_dlp_settings.py | 21 | 6380 | # Copyright 2019 Fortinet, 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 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the... | gpl-3.0 |
mcltn/ansible | lib/ansible/module_utils/f5.py | 91 | 3434 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may as... | gpl-3.0 |
gaberger/pybvc | samples/sampleopenflow/demos/demo1.py | 1 | 4024 | #!/usr/bin/python
# Copyright (c) 2015, BROCADE COMMUNICATIONS SYSTEMS, 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:
# 1. Redistributions of source code must retain the above copyright n... | bsd-3-clause |
mlperf/training_results_v0.6 | Fujitsu/benchmarks/resnet/implementations/mxnet/example/gluon/style_transfer/dataset/download_dataset.py | 35 | 1312 | # 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 |
caldwell/servo | tests/wpt/web-platform-tests/tools/pywebsocket/src/test/test_stream_hixie75.py | 496 | 2285 | #!/usr/bin/env python
#
# Copyright 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... | mpl-2.0 |
RickoLacharity/EXIF-Sort-Photos--Burst-GeoJSON | erik_exif/mov_exif.py | 2 | 4402 | from struct import unpack
from datetime import datetime
class FLVReader(dict):
"""
Reads metadata from FLV files
"""
# Tag types
AUDIO = 8
VIDEO = 9
META = 18
UNDEFINED = 0
def __init__(self, filename):
"""
Pass the filename of an flv file and it will return a dict... | gpl-2.0 |
postmarketOS/pmbootstrap | pmb/chroot/binfmt.py | 1 | 2312 | """
Copyright 2018 Oliver Smith
This file is part of pmbootstrap.
pmbootstrap 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.
pmbootstrap ... | gpl-3.0 |
Chilledheart/chromium | chrome/browser/resources/chromeos/braille_ime/check_braille_ime.py | 54 | 1093 | #!/usr/bin/env 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.
'''Uses the closure compiler to check the braille ime.'''
import os
import sys
_SCRIPT_DIR = os.path.dirname(os.path.abspath(__file... | bsd-3-clause |
shlomif/PySolFC | pysollib/ui/tktile/tkhtml.py | 1 | 15620 | #!/usr/bin/env python
# -*- mode: python; coding: utf-8; -*-
# ---------------------------------------------------------------------------
#
# Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer
# Copyright (C) 2003 Mt. Hood Playing Card Co.
# Copyright (C) 2005-2009 Skomoroh
#
# This program is free software... | gpl-3.0 |
gaberosser/geo-network | utils.py | 1 | 35093 | __author__ = 'gabriel'
import numpy as np
from data.models import CartesianSpaceTimeData, NetworkData, CartesianData
import logging
from streetnet import NetPoint, Edge, NetPath
from collections import OrderedDict, defaultdict
import operator
uint_dtypes = [(t, np.iinfo(t)) for t in (
np.uint8,
np.uint16,
... | mit |
petrutlucian94/nova_dev | nova/tests/virt/libvirt/test_imagebackend.py | 3 | 26862 | # Copyright 2012 Grid Dynamics
# 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... | apache-2.0 |
koobonil/Boss2D | Boss2D/addon/tensorflow-1.2.1_for_boss/tensorflow/contrib/solvers/python/kernel_tests/least_squares_test.py | 129 | 3348 | # 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 |
parhelia/AutomateStuffWithPython | Chapter 12/readCensusExcel.py | 1 | 1340 | #! /usr/bin/env python3
# readCensusExcel.py - Tabulates population and number of census tracts for
# each county.
import openpyxl, pprint
print('Opening workbook...')
wb = openpyxl.load_workbook('/Users/brisance/Downloads/automate_online-materials/censuspopdata.xlsx')
sheet = wb.get_sheet_by_name('Population by Censu... | mit |
vberaudi/scipy | scipy/sparse/dok.py | 53 | 16995 | """Dictionary Of Keys based matrix"""
from __future__ import division, print_function, absolute_import
__docformat__ = "restructuredtext en"
__all__ = ['dok_matrix', 'isspmatrix_dok']
import functools
import operator
import numpy as np
from scipy._lib.six import zip as izip, xrange
from scipy._lib.six import iter... | bsd-3-clause |
DrPandemic/aigar.io | clients/python/game/models.py | 1 | 6257 | from planar import Vec2
from typing import List
class UnknownPlayerIdException(Exception):
def __init__(self, player_id):
super().__init__("Unknown Player ID %d" % player_id)
class Game:
RANKED_GAME_ID = -1
def __init__(self, id_: int, tick: int, time_left: float, player_id: int, players: List[... | mit |
tumbl3w33d/ansible | lib/ansible/modules/database/vertica/vertica_info.py | 21 | 9990 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 |
ryanjoneil/docker-image-construction | dicp/solvers/network_mosek.py | 1 | 6709 | from .most_common import MostCommonHeuristic
from .most_time import MostTimeHeuristic
from collections import defaultdict
from itertools import product
from mosek.fusion import Model, Domain, Expr, ObjectiveSense, AccSolutionStatus
import sys
class NetworkMosek(object):
'''Network binary integer program: full mode... | mit |
disruptek/boto | tests/unit/ec2/test_networkinterface.py | 112 | 12575 | #!/usr/bin/env python
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# 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 ... | mit |
gandreello/openthread | tools/harness-automation/cases/router_5_2_1.py | 16 | 1875 | #!/usr/bin/env python
#
# Copyright (c) 2016, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notic... | bsd-3-clause |
mysociety/yournextrepresentative | candidates/migrations/0008_membershipextra_organizationextra_personextra_postextra.py | 3 | 4579 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('images', '0001_initial'),
('popol... | agpl-3.0 |
pexip/os-django-celery | djcelery/utils.py | 3 | 3213 | # -- XXX This module must not use translation as that causes
# -- a recursive loader import!
from __future__ import absolute_import, unicode_literals
from datetime import datetime
from django.conf import settings
# Database-related exceptions.
from django.db import DatabaseError
try:
import MySQLdb as mysql
... | bsd-3-clause |
kellielu/q | lib/jinja2/parser.py | 336 | 35442 | # -*- coding: utf-8 -*-
"""
jinja2.parser
~~~~~~~~~~~~~
Implements the template parser.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
from jinja2 import nodes
from jinja2.exceptions import TemplateSyntaxError, TemplateAssertionError
from jinja2.lexer impo... | apache-2.0 |
rgs1/zktraffic | zktraffic/tests/test_packets.py | 2 | 5014 | # ==================================================================================================
# Copyright 2014 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | apache-2.0 |
JVillella/tensorflow | tensorflow/contrib/keras/python/keras/initializers.py | 10 | 6752 | # 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 |
martijnvermaat/rpclib | examples/multiple_protocols/protocol.py | 1 | 4933 | # encoding: utf8
#
# Copyright © Burak Arslan <burak at arskom dot com dot tr>,
# Arskom Ltd. http://www.arskom.com.tr
# 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. Redistr... | lgpl-2.1 |
appcelerator/portal | client/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py | 1789 | 10585 | # Copyright (c) 2014 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-ninja wrapper project file generator.
This updates the data structures passed to the Xcode gyp generator to build
with ninja instead. The Xcode project i... | apache-2.0 |
rbarrois/xelpaste | libpaste/forms.py | 1 | 6310 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
from django import forms
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from .conf import settings
from .models import Snippet
from .highlight import LEXER_LIST, LEXER_DEFAULT, LEXER_KEYS
cl... | mit |
ekoontz/hadoop-common | src/contrib/hod/hodlib/Common/descGenerator.py | 182 | 2306 | #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 thi... | apache-2.0 |
matthew-tucker/mne-python | mne/commands/mne_watershed_bem.py | 22 | 2147 | #!/usr/bin/env python
# Authors: Lorenzo De Santis
"""
Create BEM surfaces using the watershed algorithm included with
FreeSurfer
"""
from __future__ import print_function
import sys
from mne.bem import make_watershed_bem
def run():
from mne.commands.utils import get_optparser
parser = get_op... | bsd-3-clause |
GitHublong/hue | desktop/core/ext-py/Django-1.6.10/django/test/simple.py | 108 | 8698 | """
This module is pending deprecation as of Django 1.6 and will be removed in
version 1.8.
"""
import json
import re
import unittest as real_unittest
import warnings
from django.db.models import get_app, get_apps
from django.test import _doctest as doctest
from django.test import runner
from django.test.utils import... | apache-2.0 |
GhostThrone/django | django/db/migrations/loader.py | 89 | 17105 | from __future__ import unicode_literals
import os
import sys
from importlib import import_module
from django.apps import apps
from django.conf import settings
from django.db.migrations.graph import MigrationGraph
from django.db.migrations.recorder import MigrationRecorder
from django.utils import six
from .exception... | bsd-3-clause |
sunil07t/e-mission-server | emission/storage/decorations/useful_queries.py | 3 | 4203 | from __future__ import division
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import
# Standard imports
from future import standard_library
standard_library.install_aliases()
from builtins import *
from past.utils import old_div
from datetime import dateti... | bsd-3-clause |
aeneby/RIOT | dist/tools/mkconstfs/mkconstfs2.py | 33 | 4886 | #!/usr/bin/env python3
import os
import sys
import argparse
import pathlib
import posixpath
import io
import itertools
import mmap
import shutil
from binascii import hexlify
C_HEADER = """/* This file was automatically generated by mkconstfs2.
* !!!! DO NOT EDIT !!!!!
*/
#include <stdint.h>
#include "fs/constfs.h"... | lgpl-2.1 |
adwiputra/LUMENS-repo | processing/molusce/algorithms/models/crosstabs/model.py | 2 | 4829 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from PyQt4.QtCore import *
import numpy as np
from processing.molusce.algorithms.utils import masks_identity, sizes_equal, get_gradations
class CrossTabError(Exception):
'''Base class for exceptions in this module.'''
def __init__(self, msg):
self.msg = ... | gpl-2.0 |
CINPLA/expipe-dev | expipe-plugin-cinpla/utils/batch-analysis.py | 1 | 2291 | import subprocess
import expipe
import os
import os.path as op
import sys
import logging
sys.path.append(expipe.config.config_dir)
if not op.exists(op.join(expipe.config.config_dir, 'expipe_params.py')):
print('No config params file found, use "expipe' +
'copy-to-config expipe_params.py"')
else:
from ... | gpl-3.0 |
jctanner/ansible | lib/ansible/utils/hashing.py | 112 | 3173 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | gpl-3.0 |
nttks/edx-ora2 | openassessment/management/commands/upload_oa_data.py | 10 | 5427 | """
Generate CSV files for submission and assessment data, then upload to S3.
"""
import sys
import os
import os.path
import datetime
import shutil
import tempfile
import tarfile
import boto
from boto.s3.key import Key
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
fr... | agpl-3.0 |
arpith20/linux | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py | 12980 | 5411 | # SchedGui.py - Python extension for perf script, basic GUI code for
# traces drawing and overview.
#
# Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com>
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
... | gpl-2.0 |
sherazkasi/SabreSoftware | Lib/site-packages/scipy/signal/tests/test_ltisys.py | 59 | 7793 |
import warnings
import numpy as np
from numpy.testing import assert_almost_equal, assert_equal, run_module_suite
from scipy.signal.ltisys import ss2tf, lsim2, impulse2, step2, lti
from scipy.signal.filter_design import BadCoefficients
class TestSS2TF:
def tst_matrix_shapes(self, p, q, r):
ss2tf(np.zeros... | gpl-3.0 |
adedayo/intellij-community | python/lib/Lib/site-packages/django/contrib/gis/gdal/tests/test_envelope.py | 332 | 3742 | from django.contrib.gis.gdal import Envelope, OGRException
from django.utils import unittest
class TestPoint(object):
def __init__(self, x, y):
self.x = x
self.y = y
class EnvelopeTest(unittest.TestCase):
def setUp(self):
self.e = Envelope(0, 0, 5, 5)
def test01_init(self):
... | apache-2.0 |
NewpTone/stacklab-nova | debian/python-nova/usr/share/pyshared/nova/tests/api/openstack/compute/test_consoles.py | 8 | 11502 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010-2011 OpenStack LLC.
# Copyright 2011 Piston Cloud Computing, 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 o... | apache-2.0 |
spblightadv/rethinkdb | test/rql_test/connections/http_support/jinja2/nodes.py | 623 | 28875 | # -*- coding: utf-8 -*-
"""
jinja2.nodes
~~~~~~~~~~~~
This module implements additional nodes derived from the ast base node.
It also provides some node tree helper functions like `in_lineno` and
`get_nodes` used by the parser and translator in order to normalize
python and jinja nodes.
:... | agpl-3.0 |
erikriver/eduIntelligent-cynin | src/ubify.cyninv2theme/ubify/cyninv2theme/browser/selectdefaultwikipage.py | 5 | 2304 | ###############################################################################
#cyn.in is an open source Collaborative Knowledge Management Appliance that
#enables teams to seamlessly work together on files, documents and content in
#a secure central environment.
#
#cyn.in v2 an open source appliance is distrib... | gpl-3.0 |
buguelos/odoo | addons/base_vat/res_company.py | 448 | 1404 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2011 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 |
alheinecke/tensorflow-xsmm | tensorflow/python/framework/dtypes.py | 21 | 19265 | # 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 |
AnasGhrab/scikit-learn | sklearn/decomposition/pca.py | 192 | 23117 | """ Principal Component Analysis
"""
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Olivier Grisel <olivier.grisel@ensta.org>
# Mathieu Blondel <mathieu@mblondel.org>
# Denis A. Engemann <d.engemann@fz-juelich.de>
# Michael Eickenberg <michael.eickenberg@inria.fr>
#
# Lice... | bsd-3-clause |
NMGRL/pychron | pychron/dvc/meta_object.py | 1 | 8555 | # ===============================================================================
# Copyright 2018 ross
#
# 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/LICE... | apache-2.0 |
julen/translate | translate/storage/mozilla_lang.py | 2 | 3880 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2008, 2011 Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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-2.0 |
samliu/servo | tests/wpt/css-tests/tools/html5lib/html5lib/treewalkers/_base.py | 658 | 6907 | from __future__ import absolute_import, division, unicode_literals
from six import text_type, string_types
import gettext
_ = gettext.gettext
from xml.dom import Node
DOCUMENT = Node.DOCUMENT_NODE
DOCTYPE = Node.DOCUMENT_TYPE_NODE
TEXT = Node.TEXT_NODE
ELEMENT = Node.ELEMENT_NODE
COMMENT = Node.COMMENT_NODE
ENTITY =... | mpl-2.0 |
afandria/sky_engine | testing/scripts/nacl_integration.py | 75 | 1121 | #!/usr/bin/env 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 json
import os
import sys
import common
def main_run(args):
filter_tests = []
if args.filter_file:
filter_tests = js... | bsd-3-clause |
moondrop-entertainment/django-nonrel-drawp | django/contrib/auth/backends.py | 230 | 4582 | from django.db import connection
from django.contrib.auth.models import User, Permission
class ModelBackend(object):
"""
Authenticates against django.contrib.auth.models.User.
"""
supports_object_permissions = False
supports_anonymous_user = True
supports_inactive_user = True
# TODO: Mode... | bsd-3-clause |
Xion/callee | docs/conf.py | 1 | 12588 | # -*- coding: utf-8 -*-
#
# callee documentation build configuration file, created by
# sphinx-quickstart on Wed Oct 14 11:24:04 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | bsd-3-clause |
argeweb/start | argeweb/libs/wtforms/widgets/html5.py | 78 | 2440 | """
Widgets for various HTML5 input types.
"""
from .core import Input
__all__ = (
'ColorInput', 'DateInput', 'DateTimeInput', 'DateTimeLocalInput',
'EmailInput', 'MonthInput', 'NumberInput', 'RangeInput', 'SearchInput',
'TelInput', 'TimeInput', 'URLInput', 'WeekInput',
)
class SearchInput(Input):
"... | mit |
wang1986one/pyo | pyolib/midi.py | 6 | 36123 | """
Objects to retrieve Midi informations for a specific Midi port and channel.
Objects creates and returns audio streams from the value in their Midi input.
The audio streams of these objects are essentially intended to be
used as controls and can't be sent to the output soundcard.
"""
"""
Copyright 2009-2015 Oliv... | gpl-3.0 |
taoger/titanium_mobile | support/common/css/parsetab.py | 37 | 28246 |
# parsetab.py
# This file is automatically generated. Do not edit.
_tabversion = '3.2'
_lr_method = 'LALR'
_lr_signature = '\x10[\xb4\tX\xd3\xad\x04\x9c^\xfa\xd5R\xa8N\xa1'
_lr_action_items = {'ANGLE':([40,42,73,119,136,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,177,178,... | apache-2.0 |
babycaseny/audacity | lib-src/lv2/suil/waflib/Tools/gcc.py | 196 | 2738 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
from waflib.Tools import ccroot,ar
from waflib.Configure import conf
@conf
def find_gcc(conf):
cc=conf.find_program(['gcc','cc'],var='CC')
cc=conf.cmd_to_list(cc)
conf.get_... | gpl-2.0 |
PaulAYoung/f2014_iolab | pymongoProject/venv/lib/python2.7/site-packages/flask/testsuite/__init__.py | 564 | 7022 | # -*- coding: utf-8 -*-
"""
flask.testsuite
~~~~~~~~~~~~~~~
Tests Flask itself. The majority of Flask is already tested
as part of Werkzeug.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from __future__ import print_function
import os
import sys
im... | unlicense |
darjeeling/django | django/views/decorators/clickjacking.py | 125 | 1565 | from functools import wraps
def xframe_options_deny(view_func):
"""
Modify a view function so its response has the X-Frame-Options HTTP
header set to 'DENY' as long as the response doesn't already have that
header set. Usage:
@xframe_options_deny
def some_view(request):
...
"""
... | bsd-3-clause |
googleapis/python-trace | test_utils/test_utils/vpcsc_config.py | 10 | 4173 | # -*- coding: utf-8 -*-
#
# Copyright 2019 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 |
mitchcapper/mythbox | resources/lib/twisted/twisted/internet/serialport.py | 56 | 1908 | # Copyright (c) 2001-2010 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Serial Port Protocol
"""
# http://twistedmatrix.com/trac/ticket/3725#comment:24
# Apparently applications use these names even though they should
# be imported from pyserial
__all__ = ["serial", "PARITY_ODD", "PARITY_EVEN", "PARITY... | gpl-2.0 |
vipulkanade/EventbriteDjango | lib/python2.7/site-packages/django/db/backends/sqlite3/creation.py | 166 | 4846 | import os
import shutil
import sys
from django.core.exceptions import ImproperlyConfigured
from django.db.backends.base.creation import BaseDatabaseCreation
from django.utils.six.moves import input
class DatabaseCreation(BaseDatabaseCreation):
def _get_test_db_name(self):
test_database_name = self.conne... | mit |
freevo/freevo2 | src/core/plugin.py | 1 | 6511 | # -*- coding: iso-8859-1 -*-
# -----------------------------------------------------------------------------
# plugin.py - Plugin interface
# -----------------------------------------------------------------------------
# $Id$
#
# This file defines some special plugins known to Freevo.
#
# -----------------------------... | gpl-2.0 |
joakim-hove/django | django/contrib/sites/migrations/0001_initial.py | 276 | 1096 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import django.contrib.sites.models
from django.contrib.sites.models import _simple_domain_name_validator
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = []
operations = [
migrations.Create... | bsd-3-clause |
orbitfp7/horizon | openstack_dashboard/dashboards/identity/users/tests.py | 3 | 27263 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... | apache-2.0 |
yqian1991/Django | depot/depot/urls.py | 2 | 1421 | from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from depotapp.models import *
from depotapp import viewset
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
from depotapp.views import log... | apache-2.0 |
pomegranited/edx-platform | lms/djangoapps/mobile_api/course_info/tests.py | 76 | 5235 | """
Tests for course_info
"""
import ddt
from django.conf import settings
from xmodule.html_module import CourseInfoModule
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.xml_importer import import_course_from_xml
from ..testutils import (
... | agpl-3.0 |
katiecheng/Bombolone | env/lib/python2.7/site-packages/werkzeug/testsuite/serving.py | 74 | 2218 | # -*- coding: utf-8 -*-
"""
werkzeug.testsuite.serving
~~~~~~~~~~~~~~~~~~~~~~~~~~
Added serving tests.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import sys
import time
import urllib
import unittest
from functools import update_wrapper
from StringIO im... | bsd-3-clause |
bowlofstew/common | test/edition/processors/cpp_implementation_test.py | 3 | 9113 | from biicode.common.test import model_creator as mother, testfileutils
from biicode.common.edition.processors.cpp_implementation import CPPImplementationsProcessor
from biicode.common.model.cells import SimpleCell
from biicode.common.model.bii_type import BiiType, CPP
from nose_parameterized import parameterized
from b... | mit |
gptech/ansible | contrib/inventory/rax.py | 52 | 16426 | #!/usr/bin/env python
# (c) 2013, Jesse Keating <jesse.keating@rackspace.com,
# Paul Durivage <paul.durivage@rackspace.com>,
# Matt Martz <matt@sivel.net>
#
# 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 Pu... | gpl-3.0 |
xq262144/hue | desktop/libs/librdbms/src/librdbms/jdbc.py | 3 | 3794 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | apache-2.0 |
cea-sec/miasm | test/arch/mep/ir/test_bitmanipulation.py | 5 | 2051 | # Toshiba MeP-c4 - Bit manipulation instructions unit tests
# Guillaume Valadon <guillaume@valadon.net>
from ut_helpers_ir import exec_instruction
from miasm.expression.expression import ExprId, ExprInt, ExprMem
class TestBitManipulation(object):
def test_bsetm(self):
"""Test BSETM execution"""
... | gpl-2.0 |
rcharp/toyota-flask | venv/lib/python2.7/site-packages/jinja2/_stringdefs.py | 990 | 404291 | # -*- coding: utf-8 -*-
"""
jinja2._stringdefs
~~~~~~~~~~~~~~~~~~
Strings of all Unicode characters of a certain category.
Used for matching in Unicode-aware languages. Run to regenerate.
Inspired by chartypes_create.py from the MoinMoin project, original
implementation from Pygments.
:co... | apache-2.0 |
fitzgen/servo | tests/wpt/css-tests/tools/pywebsocket/src/test/test_stream_hixie75.py | 496 | 2285 | #!/usr/bin/env python
#
# Copyright 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... | mpl-2.0 |
rversteegen/commandergenius | project/jni/python/src/Lib/zipfile.py | 52 | 52856 | """
Read and write ZIP files.
"""
import struct, os, time, sys, shutil
import binascii, cStringIO, stat
try:
import zlib # We may need its compression method
crc32 = zlib.crc32
except ImportError:
zlib = None
crc32 = binascii.crc32
__all__ = ["BadZipfile", "error", "ZIP_STORED", "ZIP_DEFLATED", "is_zi... | lgpl-2.1 |
rdeheele/odoo | addons/portal_project_issue/tests/__init__.py | 167 | 1124 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2013-TODAY OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | agpl-3.0 |
msiebuhr/v8.go | v8/build/gyp/test/mac/gyptest-installname.py | 244 | 2512 | #!/usr/bin/env python
# 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.
"""
Verifies that LD_DYLIB_INSTALL_NAME and DYLIB_INSTALL_NAME_BASE are handled
correctly.
"""
import TestGyp
import re
import subprocess
... | mit |
kbrose/article-tagging | lib/tagnews/utils/load_data.py | 1 | 18109 | import pandas as pd
import numpy as np
import re
import json
import os
import warnings
import shutil
from pathlib import Path
import codecs
"""
Helper functions to load the article data. The main method to use
is load_data().
"""
# Caution! Modifying this in code will have no effect since the
# default arguments are ... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.