repo_name stringlengths 5 100 | path stringlengths 4 375 | copies stringclasses 991
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
dennybaa/st2 | st2actions/st2actions/runners/windows_script_runner.py | 3 | 13949 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | apache-2.0 |
ClearCorp-dev/odoo | addons/account/wizard/account_unreconcile.py | 385 | 2086 | # -*- 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 |
Ruide/angr-dev | exercises/slide_111/overflow3.py | 1 | 3653 | import angr
import claripy
# load the binary
project = angr.Project("overflow3-simplified", load_options={ 'auto_load_libs': False })
# This time, we will need access to symbols (to figure out where the "shell" function is, for example).
# Let's generate a CFG to fill in the knowledgebase.
pass
# Make a simple secur... | bsd-2-clause |
tmuic/mlat-server | mlat/server/config.py | 1 | 1991 | # -*- mode: python; indent-tabs-mode: nil -*-
# Part of mlat-server: a Mode S multilateration server
# Copyright (C) 2015 Oliver Jowett <oliver@mutability.co.uk>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the ... | agpl-3.0 |
miloszz/DIRAC | ResourceStatusSystem/Policy/test/Test_RSS_Policy_Configurations.py | 8 | 1205 | # $HeadURL: $
''' Test_RSS_Policy_Configurations
'''
import unittest
import DIRAC.ResourceStatusSystem.Policy.Configurations as moduleTested
__RCSID__ = '$Id: $'
################################################################################
class Configurations_TestCase( unittest.TestCase ):
def setUp( se... | gpl-3.0 |
pdpdds/scummvm | devtools/tasmrecover/tasm/op.py | 61 | 9469 | # ScummVM - Graphic Adventure Engine
#
# ScummVM is the legal property of its developers, whose names
# are too numerous to list here. Please refer to the COPYRIGHT
# file distributed with this source distribution.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU ... | gpl-2.0 |
jagg81/translate-toolkit | translate/convert/test_po2txt.py | 4 | 2690 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from translate.convert import po2txt
from translate.convert import test_convert
from translate.misc import wStringIO
class TestPO2Txt:
def po2txt(self, posource, txttemplate=None):
"""helper that converts po source to txt source without requiring files"""
... | gpl-2.0 |
luzheqi1987/nova-annotation | nova/tests/unit/keymgr/test_key.py | 93 | 1908 | # Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory
# 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/... | apache-2.0 |
bodi000/odoo | addons/l10n_hr/__openerp__.py | 430 | 2728 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Module: l10n_hr
# Author: Goran Kliska
# mail: goran.kliska(AT)slobodni-programi.hr
# Copyright: Slobodni programi d.o.o., Zagreb
# Contributions:
#... | agpl-3.0 |
protonn/Electrum-Cash | plugins/virtualkeyboard/qt.py | 1 | 1694 | from PyQt4.QtGui import *
from electrum_dgb.plugins import BasePlugin, hook
from electrum_dgb.i18n import _
import random
class Plugin(BasePlugin):
vkb = None
vkb_index = 0
@hook
def password_dialog(self, pw, grid, pos):
vkb_button = QPushButton(_("+"))
vkb_button.setFixedWidth(20)
... | mit |
crioux/SpeedDemon-Profiler | wxscintilla/src/scintilla/include/Face.py | 45 | 3253 | # Module for reading and parsing Scintilla.iface file
import string
def sanitiseLine(line):
if line[-1:] == '\n': line = line[:-1]
if string.find(line, "##") != -1:
line = line[:string.find(line, "##")]
line = string.strip(line)
return line
def decodeFunction(featureVal):
retType, rest = string.split(featureV... | gpl-2.0 |
jjjake/internetarchive | setup.py | 1 | 1586 | import re
from ast import literal_eval
from codecs import open
from setuptools import setup
_version_re = re.compile(r'__version__\s+=\s+(.*)')
with open('internetarchive/__init__.py', 'rb') as f:
version = str(literal_eval(_version_re.search(
f.read().decode('utf-8')).group(1)))
with open('README.rst',... | agpl-3.0 |
FlyCamel/enjarify | enjarify/jvm/writeir.py | 1 | 24543 | # Copyright 2015 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 a... | apache-2.0 |
caseymorris87/pynet_test | devices.py | 1 | 1285 | #!/usr/bin/env python
cisco_dev1 = {'device_type': 'cisco_ios',
'ip': '184.105.247.70',
'username': 'pyclass',
'password': '88newclass'}
cisco_dev2 = {'device_type': 'cisco_ios',
'ip': '184.105.247.71',
'username': 'pyclass',
'passwor... | apache-2.0 |
mexeniz/django-oscar | tests/unit/voucher/model_tests.py | 44 | 3639 | import datetime
from decimal import Decimal as D
from django.test import TestCase
from django.core import exceptions
from django.utils.timezone import utc
from oscar.apps.voucher.models import Voucher
from oscar.core.compat import get_user_model
from oscar.test.factories import OrderFactory, UserFactory, VoucherFacto... | bsd-3-clause |
openfun/edx-platform | lms/djangoapps/mobile_api/users/tests.py | 23 | 11532 | """
Tests for users API
"""
import datetime
from django.utils import timezone
from xmodule.modulestore.tests.factories import ItemFactory, CourseFactory
from student.models import CourseEnrollment
from certificates.models import CertificateStatuses
from certificates.tests.factories import GeneratedCertificateFactory
... | agpl-3.0 |
smartforceplus/SmartForceplus | openerp/addons/tag_disable_openerp_online/model/__init__.py | 61 | 1027 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | agpl-3.0 |
jakapoor/AMRUPT | Software/Angle of Arrival/gr-xcorr/python/qa_full_capon_ccf.py | 2 | 2437 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2017 <+YOU OR YOUR COMPANY+>.
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#... | gpl-3.0 |
isandlaTech/cohorte-demos | led/dump/led-demo-raspberry/cohorte/dist/cohorte-1.0.0-20141209.234423-41-python-distribution/repo/cohorte/forker/state_updater.py | 4 | 5535 | #!/usr/bin/env python
# -- Content-Encoding: UTF-8 --
"""
Updates the isolate state directory
:author: Thomas Calmant
:license: Apache Software License 2.0
..
Copyright 2014 isandlaTech
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with th... | apache-2.0 |
MechCoder/scikit-learn | examples/cluster/plot_dict_face_patches.py | 337 | 2747 | """
Online learning of a dictionary of parts of faces
==================================================
This example uses a large dataset of faces to learn a set of 20 x 20
images patches that constitute faces.
From the programming standpoint, it is interesting because it shows how
to use the online API of the sciki... | bsd-3-clause |
DavidTingley/ephys-processing-pipeline | installation/klustaviewa-0.3.0/klustaviewa/views/tests/test_traceview.py | 2 | 1336 | """Unit tests for raw data waveform visualisation view."""
# -----------------------------------------------------------------------------
# Imports
# -----------------------------------------------------------------------------
import os
import numpy as np
import numpy.random as rnd
import pandas as pd
f... | gpl-3.0 |
zorojean/scrapy | tests/test_crawler.py | 127 | 5138 | import warnings
import unittest
import scrapy
from scrapy.crawler import Crawler, CrawlerRunner, CrawlerProcess
from scrapy.settings import Settings, default_settings
from scrapy.spiderloader import SpiderLoader
from scrapy.utils.spider import DefaultSpider
from scrapy.utils.misc import load_object
from scrapy.extensi... | bsd-3-clause |
SOKP/external_chromium_org | chrome/test/chromedriver/client/webelement.py | 43 | 1509 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from command_executor import Command
class WebElement(object):
"""Represents an HTML element."""
def __init__(self, chromedriver, id_):
self._chrom... | bsd-3-clause |
ApachePointObservatory/Totoro | Totoro/bin/loadMangaPlates.py | 2 | 4232 | #!/usr/bin/env python
# encoding: utf-8
"""
loadMangaPlates.py
Created by José Sánchez-Gallego on 6 Mar 2015.
Licensed under a 3-clause BSD license.
Revision history:
6 Mar 2015 J. Sánchez-Gallego
Initial version
"""
from __future__ import division
from __future__ import print_function
from Totoro import ... | apache-2.0 |
laosiaudi/tensorflow | tensorflow/contrib/framework/python/ops/ops_test.py | 31 | 2374 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
zzeleznick/zDjango | venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/sbcsgroupprober.py | 2936 | 3291 | ######################## 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... | mit |
mcfletch/AutobahnPython | examples/asyncio/wamp/wamplet/wamplet1/wamplet1/component1.py | 1 | 3053 | ###############################################################################
##
## Copyright (C) 2014 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
##
## http:/... | apache-2.0 |
vijayendrabvs/hap | neutron/openstack/common/service.py | 9 | 15044 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance wi... | apache-2.0 |
Just-D/chromium-1 | tools/telemetry/third_party/typ/typ/fakes/tests/test_result_server_fake_test.py | 81 | 1298 | # Copyright 2014 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 ag... | bsd-3-clause |
Dfred/concept-robot | HRI/vision/pyvision_0.9.0/src/pyvision/analysis/FaceAnalysis/FaceRecognitionTest.py | 1 | 5528 | # PyVision License
#
# Copyright (c) 2006-2008 David S. Bolme
# 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
# notice, thi... | gpl-3.0 |
indictranstech/phr-frappe | frappe/website/permissions.py | 28 | 2434 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
def remove_empty_permissions():
permissions_cache_to_be_cleared = frappe.db.sql_list("""select distinct user
from `tabWebsite Route Permission`
where ifnull... | mit |
Yannig/ansible | lib/ansible/modules/cloud/lxd/lxd_profile.py | 19 | 11749 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Hiroaki Nakamura <hnakamur@gmail.com>
# 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 |
brenca/electron | script/verify-ffmpeg.py | 1 | 2242 | #!/usr/bin/env python
import os
import shutil
import subprocess
import sys
from lib.util import electron_gyp, rm_rf
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
FFMPEG_LIBCC_PATH = os.path.join(SOURCE_ROOT, 'vendor', 'brightray', 'vendor',
'download', 'l... | mit |
tiggerlee/exercises | SICP/cp1/exercise1_15.py | 1 | 1043 | '''
sine(12.15)
p(sine(12.15/3.0))
p(sine(4.05))
p(p(sine(4.05/3.0)))
p(p(sine(1.349999999)))
p(p(p(1.349999999/3.0)))
p(p(p(sine(1.349999999/3.0))))
p(p(p(sine(0.449999999))))
p(p(p(p(sine(0.449999999/3.0)))))
p(p(p(p(sine(0.149999999)))))
p(p(p(p(p(sine(0.149999999/3.0))))))
p(p(p(p(p(sine(0.049999999))))))
根据上面的替换模型... | mit |
nathanaevitas/odoo | openerp/addons/account/tests/test_account_move_closed_period.py | 136 | 1615 | from datetime import date
from openerp.tests.common import TransactionCase
from openerp.osv.orm import except_orm
class TestPeriodState(TransactionCase):
"""
Forbid creation of Journal Entries for a closed period.
"""
def setUp(self):
super(TestPeriodState, self).setUp()
cr, uid = sel... | agpl-3.0 |
oguzhanunlu/uSSync | sync/fs_sync.py | 1 | 1118 | # This file is part of uSSync.
#
# 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 i... | gpl-3.0 |
canaltinova/servo | tests/wpt/mozilla/tests/webgl/conformance-2.0.0/deqp/functional/gles3/uniformapi/uniformapi_test_generator.py | 51 | 3134 | #!/usr/bin/env python
# Copyright (c) 2016 The Khronos Group Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and/or associated documentation files (the
# "Materials"), to deal in the Materials without restriction, including
# without limitation the rights to use... | mpl-2.0 |
liorvh/grab | test/spider_stat.py | 12 | 1676 | import six
from grab.spider import Spider, Task
from tempfile import mkstemp
import os
from six import StringIO
import mock
import sys
from test.util import TMP_DIR
from test.util import BaseGrabTestCase, build_spider
class BasicSpiderTestCase(BaseGrabTestCase):
def setUp(self):
self.server.reset()
... | mit |
alanmcintyre/btce-api | samples/watch.py | 2 | 2256 | #!/usr/bin/env python
import sys
import matplotlib
import wx
matplotlib.use("WXAgg")
matplotlib.rcParams['toolbar'] = 'None'
import matplotlib.pyplot as plt
import pylab
import btceapi
class Chart(object):
def __init__(self, symbol):
self.symbol = symbol
self.base = symbol.split("_")[0].upper(... | mit |
meteoswiss-mdr/monti-pytroll | scripts/input_coalition2_h5.py | 1 | 20014 | from __future__ import division
from __future__ import print_function
def input(in_msg):
import getpass
import inspect
in_msg.input_file = inspect.getfile(inspect.currentframe())
print("*** read input from ", in_msg.input_file)
#in_msg.sat = "meteosat" # default "meteosat"
in_msg.sat = "Met... | lgpl-3.0 |
dreikanter/wp2md | setup.py | 1 | 1195 | #!/usr/bin/env python
# coding: utf-8
from setuptools import setup, find_packages
import sys
import wp2md.authoring
from wp2md.version import get_version
setup(
name='wp2md',
description='A script to convert Wordpress XML dumps to plain text/markdown files.',
version=get_version(),
license=wp2md.autho... | gpl-3.0 |
SarahPythonista/acmpy | spgl/io/tokenscanner.py | 1 | 10303 | # TODO: rewrite the functinos in this module to be more Pythonic
import enum as _enum
from spgl.system.error import error
@_enum.unique
class TokenType(_enum.IntEnum):
"""The enumerated values of the <code>get_token_type</code> method."""
SEPARATOR = 0
WORD = 1
NUMBER = 2
STRING = 3
OPERATOR ... | mit |
tpaszkowski/quantum | quantum/db/migration/alembic_migrations/versions/54c2c487e913_lbaas.py | 7 | 6691 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# 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... | apache-2.0 |
shibaniahegde/OpenStak_swift | test/probe/test_account_get_fake_responses_match.py | 11 | 3791 | #!/usr/bin/python -u
# Copyright (c) 2010-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 ap... | apache-2.0 |
zadgroup/edx-platform | lms/djangoapps/django_comment_client/base/urls.py | 102 | 2770 | from django.conf.urls.defaults import url, patterns
urlpatterns = patterns(
'django_comment_client.base.views',
url(r'upload$', 'upload', name='upload'),
url(r'threads/(?P<thread_id>[\w\-]+)/update$', 'update_thread', name='update_thread'),
url(r'threads/(?P<thread_id>[\w\-]+)/reply$', 'create_comment... | agpl-3.0 |
Krist14n/guiadestinosapp | node_modules/ionic/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py | 2767 | 2174 | # 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.
"""Applies a fix to CR LF TAB handling in xml.dom.
Fixes this: http://code.google.com/p/chromium/issues/detail?id=76293
Working around this: http://bugs.python.or... | apache-2.0 |
matteoicardi/mpltools | mpltools/special/errorfill.py | 2 | 2963 | import warnings
import numpy as np
import matplotlib.pyplot as plt
__all__ = ['errorfill']
def errorfill(x, y, yerr=None, xerr=None, color=None, ls=None, lw=None,
alpha=1, alpha_fill=0.3, label='', label_fill='', ax=None, marker=None):
"""Plot data with errors marked by a filled region.
Para... | bsd-3-clause |
ThePletch/ansible | lib/ansible/modules/web_infrastructure/deploy_helper.py | 21 | 20327 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Jasper N. Brouwer <jasper@nerdsweide.nl>
# (c) 2014, Ramon de la Fuente <ramon@delafuente.nl>
#
# 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... | gpl-3.0 |
dkm2110/veyor | dev/update_website.py | 2 | 5470 | # 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 |
stormi/tsunami | src/secondaires/navigation/vent.py | 1 | 4203 | # -*-coding:Utf-8 -*
# Copyright (c) 2010 LE GOFF Vincent
# 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
# l... | bsd-3-clause |
pschmitt/home-assistant | homeassistant/components/xiaomi_miio/fan.py | 3 | 40207 | """Support for Xiaomi Mi Air Purifier and Xiaomi Mi Air Humidifier."""
import asyncio
from enum import Enum
from functools import partial
import logging
from miio import ( # pylint: disable=import-error
AirFresh,
AirHumidifier,
AirPurifier,
AirPurifierMiot,
Device,
DeviceException,
)
from miio... | apache-2.0 |
OpenPymeMx/OCB | addons/account_followup/tests/test_account_followup.py | 14 | 10412 |
import datetime
from openerp import tools
from openerp.tests.common import TransactionCase
from openerp import netsvc
from openerp.osv import fields
class TestAccountFollowup(TransactionCase):
def setUp(self):
""" setUp ***"""
super(TestAccountFollowup, self).setUp()
cr, uid = self.cr, ... | agpl-3.0 |
Netrix/foreign-gtest | gtest/test/gtest_xml_output_unittest.py | 397 | 11279 | #!/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 |
abdullah2891/remo | vendor-local/lib/python/chardet/chardistribution.py | 215 | 8602 | ######################## 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 ... | bsd-3-clause |
airbnb/airflow | tests/ti_deps/deps/test_prev_dagrun_dep.py | 7 | 5246 | #
# 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 |
browning/compose | tests/unit/log_printer_test.py | 57 | 1759 | from __future__ import unicode_literals
from __future__ import absolute_import
import os
from compose.cli.log_printer import LogPrinter
from .. import unittest
class LogPrinterTest(unittest.TestCase):
def get_default_output(self, monochrome=False):
def reader(*args, **kwargs):
yield "hello\nw... | apache-2.0 |
googleapis/googleapis-gen | google/cloud/videointelligence/v1p1beta1/videointelligence-v1p1beta1-py/setup.py | 5 | 1803 | # -*- coding: utf-8 -*-
# Copyright 2020 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 |
edf-hpc/hpcstats | HPCStats/Tests/Mocks/MockLdap.py | 1 | 5564 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011-2015 EDF SA
# Contact:
# CCN - HPC <dsp-cspit-ccn-hpc@edf.fr>
# 1, Avenue du General de Gaulle
# 92140 Clamart
#
# Authors: CCN - HPC <dsp-cspit-ccn-hpc@edf.fr>
#
# This file is part of HPCStats.
#
# HPCStats is free software: you ca... | gpl-2.0 |
ongair/yowsup | yowsup/layers/axolotl/store/sqlite/litesignedprekeystore.py | 39 | 2191 | from axolotl.state.signedprekeystore import SignedPreKeyStore
from axolotl.state.signedprekeyrecord import SignedPreKeyRecord
from axolotl.invalidkeyidexception import InvalidKeyIdException
class LiteSignedPreKeyStore(SignedPreKeyStore):
def __init__(self, dbConn):
"""
:type dbConn: Connection
... | mit |
phenoxim/cinder | cinder/tests/unit/backup/test_backup.py | 1 | 97634 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
# 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/LICEN... | apache-2.0 |
sametmax/Django--an-app-at-a-time | ignore_this_directory/django/core/cache/backends/base.py | 28 | 10102 | "Base Cache class."
import time
import warnings
from django.core.exceptions import ImproperlyConfigured
from django.utils.module_loading import import_string
class InvalidCacheBackendError(ImproperlyConfigured):
pass
class CacheKeyWarning(RuntimeWarning):
pass
# Stub class to ensure not passing in a `tim... | mit |
pombredanne/frappe | frappe/desk/doctype/todo/todo.py | 25 | 2937 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import json
from frappe.model.document import Document
from frappe.utils import get_fullname
subject_field = "description"
sender_field = "sender"
class ToDo(Docu... | mit |
cslosiu/TweetList | oauthlib/oauth2/rfc6749/utils.py | 51 | 2492 | # -*- coding: utf-8 -*-
"""
oauthlib.utils
~~~~~~~~~~~~~~
This module contains utility methods used by various parts of the OAuth 2 spec.
"""
from __future__ import absolute_import, unicode_literals
import os
import datetime
try:
from urllib import quote
except ImportError:
from urllib.parse import quote
try:... | apache-2.0 |
SaschaMester/delicium | third_party/cython/src/Cython/Compiler/ParseTreeTransforms.py | 86 | 115877 | import cython
cython.declare(PyrexTypes=object, Naming=object, ExprNodes=object, Nodes=object,
Options=object, UtilNodes=object, LetNode=object,
LetRefNode=object, TreeFragment=object, EncodedString=object,
error=object, warning=object, copy=object)
import PyrexTypes
import... | bsd-3-clause |
sagar30051991/ozsmart-erp | erpnext/config/support.py | 6 | 1345 | from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"label": _("Issues"),
"items": [
{
"type": "doctype",
"name": "Issue",
"description": _("Support queries from customers."),
},
{
"type": "doctype",
"name": "Communication",
"descri... | agpl-3.0 |
nathanial/mongoengine | tests/document/json_serialisation.py | 28 | 4247 | import sys
sys.path[0:0] = [""]
import unittest
import uuid
from nose.plugins.skip import SkipTest
from datetime import datetime
from bson import ObjectId
import pymongo
from mongoengine import *
__all__ = ("TestJson",)
class TestJson(unittest.TestCase):
def setUp(self):
connect(db='mongoenginetest'... | mit |
gypogypo/plugin.video.sneek | tv5.py | 10 | 7155 |
import base64
import zlib, urllib,urllib2,re
key=base64.b64decode("ZXQgb3VhaSBtZWMh")
def getUrl(url, cookieJar=None,post=None, timeout=20, headers=None):
cookie_handler = urllib2.HTTPCookieProcessor(cookieJar)
opener = urllib2.build_opener(cookie_handler, urllib2.HTTPBasicAuthHandler(), urllib2.HTTPHa... | gpl-3.0 |
khushboo9293/mailman | src/mailman/handlers/tests/test_to_digest.py | 7 | 1949 | # Copyright (C) 2014-2015 by the Free Software Foundation, Inc.
#
# This file is part of GNU Mailman.
#
# GNU Mailman is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at you... | gpl-3.0 |
EUDAT-B2SHARE/invenio-old | modules/oairepository/lib/oai_repository_server.py | 6 | 35683 | ## This file is part of Invenio.
## Copyright (C) 2009, 2010, 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later versio... | gpl-2.0 |
sogelink/ansible | lib/ansible/modules/network/nxos/nxos_igmp.py | 23 | 5057 | #!/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 |
hzlf/django-cms-redirects | testsettings.py | 3 | 1998 | """Django settings file for testing."""
import os
PROJECT_PATH = os.path.dirname(__file__)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
},
}
INSTALLED_APPS = (
'django',
'django.contrib.sites',
'django.contrib.auth',
'django.contrib.co... | bsd-3-clause |
rahushen/ansible | lib/ansible/modules/remote_management/ucs/ucs_vnic_template.py | 28 | 15038 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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 |
tpodowd/boto | boto/beanstalk/wrapper.py | 153 | 1078 | """Wraps layer1 api methods and converts layer1 dict responses to objects."""
from boto.beanstalk.layer1 import Layer1
import boto.beanstalk.response
from boto.exception import BotoServerError
import boto.beanstalk.exception as exception
def beanstalk_wrapper(func, name):
def _wrapped_low_level_api(*args, **kwarg... | mit |
mbkumar/pymatgen | pymatgen/symmetry/tests/test_settings.py | 3 | 5956 | #!/usr/bin/env python
import unittest
import numpy as np
from pymatgen.symmetry.settings import *
__author__ = "Matthew Horton"
__copyright__ = "Copyright 2017, The Materials Project"
__version__ = "0.1"
__maintainer__ = "Matthew Horton"
__email__ = "mkhorton@lbl.gov"
__status__ = "Development"
__date__ = "Apr 2017"... | mit |
centowen/pybaduk | unidecode/x096.py | 252 | 4610 | data = (
'Fa ', # 0x00
'Ge ', # 0x01
'He ', # 0x02
'Kun ', # 0x03
'Jiu ', # 0x04
'Yue ', # 0x05
'Lang ', # 0x06
'Du ', # 0x07
'Yu ', # 0x08
'Yan ', # 0x09
'Chang ', # 0x0a
'Xi ', # 0x0b
'Wen ', # 0x0c
'Hun ', # 0x0d
'Yan ', # 0x0e
'E ', # 0x0f
'Chan ', # 0x10
'Lan ', ... | gpl-3.0 |
trbngr/beets | beets/util/enumeration.py | 22 | 6092 | # This file is part of beets.
# Copyright 2013, Adrian Sampson.
#
# 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 use, copy, ... | mit |
taknevski/tensorflow-xsmm | tensorflow/python/debug/cli/debugger_cli_common_test.py | 101 | 45452 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
watonyweng/nova | nova/tests/unit/api/openstack/compute/contrib/test_extended_rescue_with_image.py | 29 | 2393 | # Copyright 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 a... | apache-2.0 |
CloudWareChile/OpenChile | openerp/addons/profile_tools/__init__.py | 27 | 1046 | # -*- 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 GNU... | agpl-3.0 |
BlackjackDNS/unbound | pythonmod/ubmodule-tst.py | 25 | 6142 | # -*- coding: utf-8 -*-
'''
ubmodule-tst.py:
Authors: Zdenek Vasicek (vasicek AT fit.vutbr.cz)
Marek Vavrusa (xvavru00 AT stud.fit.vutbr.cz)
Copyright (c) 2008. All rights reserved.
This software is open source.
Redistribution and use in source and binary forms, with or without
modification, are... | bsd-3-clause |
ikcam/django-skeleton | core/migrations/0001_initial.py | 1 | 40736 | # Generated by Django 2.2 on 2019-05-27 17:36
import core.models.company
import core.models.user
import core.validators
from django.conf import settings
import django.contrib.auth.validators
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.time... | bsd-3-clause |
django-nonrel/django | tests/null_fk/models.py | 115 | 1316 | """
Regression tests for proper working of ForeignKey(null=True).
"""
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
class SystemDetails(models.Model):
details = models.TextField()
class SystemInfo(models.Model):
system_details = models.ForeignKey(SystemDetails)
... | bsd-3-clause |
savi-dev/nova | nova/notifications.py | 6 | 11935 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2012 OpenStack, LLC.
# 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... | apache-2.0 |
sinch/python-backend-sample | backend-example.py | 2 | 4889 | #!/usr/bin/env python
"""
Licensed under the MIT Licence, Copyright (c) 2014 Sinch AB
This demonstrates a basic partner backend for generating authentication tokens.
In this example the user database is not persistent: Only for demonstrational purpose!
See rows ~100-120 for code on generating a Sinch compatible authe... | mit |
3dfxsoftware/cbss-addons | connector/producer.py | 5 | 2866 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2013 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... | gpl-2.0 |
davidyezsetz/kuma | vendor/packages/ipython/IPython/frontend/tests/test_process.py | 7 | 1785 | # encoding: utf-8
"""
Test process execution and IO redirection.
"""
__docformat__ = "restructuredtext en"
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2009 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is
#... | mpl-2.0 |
JackLivio/sdl_core | tools/InterfaceGenerator/test/generator/parsers/test_SDLRPCV2.py | 14 | 17475 | """SDLRPCV2 XML parser unit test."""
import os
import unittest
import generator.Model
import generator.parsers.SDLRPCV2
class TestSDLRPCV2Parser(unittest.TestCase):
"""Test for SDLRPCV2 xml parser."""
class _Issue:
def __init__(self, creator, value):
self.creator = creator
s... | bsd-3-clause |
willxiang/shadowsocks | shadowsocks/daemon.py | 694 | 5602 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2014-2015 clowwindy
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | apache-2.0 |
ramyfarid922/Quiz-Program | vendor/bundle/ruby/2.2.0/gems/libv8-3.16.14.7/vendor/v8/tools/testrunner/local/verbose.py | 19 | 3680 | # Copyright 2012 the V8 project 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:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditi... | cc0-1.0 |
hkariti/ansible | lib/ansible/modules/network/vyos/vyos_l3_interface.py | 28 | 8510 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Ansible by Red Hat, inc
#
# This file is part of Ansible by Red Hat
#
# 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 Li... | gpl-3.0 |
kaedroho/django | django/contrib/gis/db/backends/postgis/pgraster.py | 2 | 4548 | import struct
from django.forms import ValidationError
from .const import (
BANDTYPE_FLAG_HASNODATA, BANDTYPE_PIXTYPE_MASK, GDAL_TO_POSTGIS,
GDAL_TO_STRUCT, POSTGIS_HEADER_STRUCTURE, POSTGIS_TO_GDAL, STRUCT_SIZE,
)
def pack(structure, data):
"""
Pack data into hex string with little endian format.
... | bsd-3-clause |
CLOUGH/info3180-lab4 | lib/jinja2/__init__.py | 130 | 2270 | # -*- coding: utf-8 -*-
"""
jinja2
~~~~~~
Jinja2 is a template engine written in pure Python. It provides a
Django inspired non-XML syntax but supports inline expressions and
an optional sandboxed environment.
Nutshell
--------
Here a small example of a Jinja2 template::
{% ... | apache-2.0 |
vahtras/amy | workshops/migrations/0126_auto_20170325_0406.py | 3 | 1506 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.12 on 2017-03-25 09:06
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('workshops', '0125_trainingrequest_notes'),
]
operatio... | mit |
denisekgosnell/denisekgosnell.github.io | meetups/utk_march_2017/node_modules/node-gyp/gyp/buildbot/buildbot_run.py | 1467 | 4228 | #!/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.
"""Argument-less script to select what to run on the buildbots."""
import os
import shutil
import subprocess
import sys
BUILDBOT_DIR = os.... | mit |
jarn0ld/gnuradio | gr-qtgui/apps/uhd_display.py | 58 | 10470 | #!/usr/bin/env python
#
# Copyright 2009,2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your optio... | gpl-3.0 |
jeromewiley/supermag | node_modules/node-gyp/gyp/pylib/gyp/input_test.py | 1841 | 3207 | #!/usr/bin/env python
# Copyright 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.
"""Unit tests for the input.py file."""
import gyp.input
import unittest
import sys
class TestFindCycles(unittest.TestCase):
def setUp(self... | gpl-2.0 |
steynovich/ansible-modules-extras | notification/osx_say.py | 161 | 2108 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Michael DeHaan <michael@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 3 of the ... | gpl-3.0 |
prakxys/flask | Work/Trivia - Module 5/env/Lib/site-packages/setuptools/command/build_py.py | 207 | 8440 | import os
import sys
import fnmatch
import textwrap
from distutils.command.build_py import build_py as _build_py
from distutils.util import convert_path
from glob import glob
try:
from setuptools.lib2to3_ex import Mixin2to3
except ImportError:
class Mixin2to3:
def run_2to3(self, files, doctests=True):
... | apache-2.0 |
cyrixhero/scrapy | scrapy/pipelines/media.py | 122 | 4947 | from __future__ import print_function
import logging
from collections import defaultdict
from twisted.internet.defer import Deferred, DeferredList
from twisted.python.failure import Failure
from scrapy.utils.defer import mustbe_deferred, defer_result
from scrapy.utils.request import request_fingerprint
from scrapy.ut... | bsd-3-clause |
zcbenz/cefode-chromium | ui/surface/compile_hlsl.py | 61 | 6350 | # 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.
import optparse
import os.path
import re
import subprocess
import sys
def ConvertToCamelCase(input):
"""Converts the input string from 'unix_hacker' ... | bsd-3-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.