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 |
|---|---|---|---|---|---|
malemburg/epcon | assopy/views.py | 2 | 24303 | # -*- coding: UTF-8 -*-
from django import forms
from django import http
from django.conf import settings as dsettings
from django.contrib import auth
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.contrib.admin.util import unquote
from django.core.urlresolvers... | bsd-2-clause |
lseyesl/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/performance_tests/perftest_unittest.py | 115 | 19639 | # Copyright (C) 2012 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 |
tzabian/fuego-pootle | strings.py | 5 | 1461 | # These are some strings that we need for successful extraction. They come from
# Django and is not included in our POT file otherwise. This file itself is not
# used for a running Pootle.
# Don't change any of these strings unless they changed in Django. The adding
# of extra comments to help translators is fine.
_(... | gpl-2.0 |
tuukka/sonata-svn-test | sonata/plugins/test.py | 1 | 2113 |
# this is the magic interpreted by Sonata, referring to on_enable etc. below:
### BEGIN PLUGIN INFO
# [plugin]
# plugin_format: 0, 0
# name: Test plugin
# version: 0, 0, 1
# description: A simple test plugin.
# author: Tuukka Hastrup
# author_email: Tuukka.Hastrup@iki.fi
# url: http://sonata.berlios.de
# license: GPL... | gpl-3.0 |
CyanogenMod/android_kernel_oneplus_msm8994 | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 12527 | 1935 | # Util.py - Python extension for perf script, miscellaneous utility code
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
import errno, os
FUTEX_WAIT = 0... | gpl-2.0 |
kybriainfotech/iSocioCRM | addons/pad/pad.py | 179 | 4311 | # -*- coding: utf-8 -*-
from openerp.osv import fields, osv
import random
import re
import string
import urllib2
import logging
from openerp import SUPERUSER_ID
from openerp.tools.translate import _
from openerp.tools import html2plaintext
from py_etherpad import EtherpadLiteClient
_logger = logging.getLogger(__name__... | agpl-3.0 |
atplanet/ansible-modules-extras | monitoring/zabbix_host.py | 21 | 21855 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013-2014, Epic Games, 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
# (... | gpl-3.0 |
sprintingkiwi/PYDOJO | example_KiwiBot_Pi.py | 2 | 3634 | from pydojo import *
from pyfirmata import *
# inizializzo
pygame.init()
width = 800
height = 600
SCREEN(width, height)
gobo = Actor('example_library/gobo.png')
gobo.goto(width/2, height/2)
os.system('sudo rfcomm bind /dev/rfcomm0 00:15:83:35:86:A2 1')
uno = Arduino('/dev/rfcomm0')
#uno = Arduino('COM6')
rightPwm ... | mit |
snowyu/libtorrent | tools/run_tests.py | 8 | 10523 |
#!/bin/python
# Copyright (c) 2013, Arvid Norberg
# 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 ... | bsd-3-clause |
titom1986/CouchPotatoServer | couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/freespeech.py | 165 | 1226 | from __future__ import unicode_literals
import re
import json
from .common import InfoExtractor
class FreespeechIE(InfoExtractor):
IE_NAME = 'freespeech.org'
_VALID_URL = r'https://www\.freespeech\.org/video/(?P<title>.+)'
_TEST = {
'add_ie': ['Youtube'],
'url': 'https://www.freespeech.o... | gpl-3.0 |
mikr/xcodeprojer | xcodeprojer.py | 2 | 65916 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Michael Krause ( http://krause-software.com/ ).
#
# You are free to use this code under the MIT license:
# http://opensource.org/licenses/MIT
# xcoderprojer.py is a script for converting project.pbxproj files
# that represent Xcode projects into one ... | mit |
olegnev/dx-toolkit | src/python/dxpy/templating/templates/python/parallelized/test/test.py | 12 | 1798 | #!/usr/bin/env python
# DX_APP_WIZARD_NAME DX_APP_WIZARD_VERSION test suite
# Generated by dx-app-wizard.
import json, os, time, unittest
import dxpy
import dxpy.app_builder
from dxpy.exceptions import DXAPIError
src_dir = os.path.join(os.path.dirname(__file__), "..")
test_resources_dir = os.path.join(src_dir, "tes... | apache-2.0 |
jlongever/RackHD | test/tests/api/redfish_1_0/managers_tests.py | 15 | 5327 | from config.redfish1_0_config import *
from modules.logger import Log
from on_http_redfish_1_0 import RedfishvApi as redfish
from on_http_redfish_1_0 import rest
from datetime import datetime
from proboscis.asserts import assert_equal
from proboscis.asserts import assert_false
from proboscis.asserts import assert_raise... | apache-2.0 |
mitar/django | tests/regressiontests/views/urls.py | 47 | 2157 | # coding: utf-8
from __future__ import absolute_import
from os import path
from django.conf.urls import patterns, url, include
from . import views
base_dir = path.dirname(path.abspath(__file__))
media_dir = path.join(base_dir, 'media')
locale_dir = path.join(base_dir, 'locale')
js_info_dict = {
'domain': 'dja... | bsd-3-clause |
Comunitea/OCB | addons/website_blog/wizard/__init__.py | 373 | 1077 | # -*- 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 |
simonwydooghe/ansible | lib/ansible/plugins/cliconf/nos.py | 31 | 3829 | #
# (c) 2018 Extreme Networks 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.
#
# Ans... | gpl-3.0 |
ngokevin/zamboni | mkt/api/tests/test_serializer.py | 2 | 3177 | # -*- coding: utf-8 -*-
from django.core.handlers.wsgi import WSGIRequest
from django.test import TestCase
import mock
from nose.tools import eq_, ok_
from rest_framework.serializers import Serializer, ValidationError
from test_utils import RequestFactory
from mkt.users.models import UserProfile
from mkt.api.serializ... | bsd-3-clause |
mw10178/ctplot_iw | ctplot/progressbar.py | 3 | 12734 | # -*- coding: iso-8859-1 -*-
#
# progressbar - Text progressbar library for python.
# Copyright (c) 2005 Nilton Volpato
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# versio... | gpl-3.0 |
tsdmgz/ansible | contrib/inventory/vagrant.py | 22 | 3973 | #!/usr/bin/env python
"""
Vagrant external inventory script. Automatically finds the IP of the booted vagrant vm(s), and
returns it under the host group 'vagrant'
Example Vagrant configuration using this script:
config.vm.provision :ansible do |ansible|
ansible.playbook = "./provision/your_playbook.yml"
... | gpl-3.0 |
abagh0703/RetailTrail | flask/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/constants.py | 3008 | 1335 | ######################## 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 |
dfalt974/SickRage | lib/pgi/foreign/_base.py | 19 | 1034 | # Copyright 2016 Christoph Reiter
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
class ForeignStruct(objec... | gpl-3.0 |
tonybaloney/st2contrib | packs/opsgenie/tests/test_action_disable_heartbeat.py | 4 | 2024 | # 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 |
openstack/keystone | keystone/tests/common/auth.py | 2 | 6580 | # 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... | apache-2.0 |
datacommonsorg/data | scripts/us_bjs/nps/preprocess_data.py | 1 | 19122 | import pandas as pd
from absl import flags
from absl import app
FLAGS = flags.FLAGS
flags.DEFINE_string('preprocess_file',
'NPS_1978-2018_Data.tsv',
'file path to tsv file with data to proess',
short_name='p')
def convert_nan_for_calculation(value):
if ... | apache-2.0 |
seecr/meresco-distributed | meresco/distributed/failover/_conditionmet.py | 1 | 2572 | ## begin license ##
#
# "Meresco Distributed" has components for group management based on "Meresco Components."
#
# Copyright (C) 2018, 2021 Seecr (Seek You Too B.V.) https://seecr.nl
# Copyright (C) 2021 Data Archiving and Network Services https://dans.knaw.nl
# Copyright (C) 2021 SURF https://www.surf.nl
# Copyright... | gpl-2.0 |
yize/grunt-tps | tasks/lib/python/Lib/python2.7/test/test_binop.py | 126 | 10743 | """Tests for binary operators on subtypes of built-in types."""
import unittest
from test import test_support
def gcd(a, b):
"""Greatest common divisor using Euclid's algorithm."""
while a:
a, b = b%a, a
return b
def isint(x):
"""Test whether an object is an instance of int or long."""
re... | mit |
MuhanadNabeel/WordPress-Android | tools/check-missing-drawables.py | 31 | 1123 | #!/usr/bin/env python
from collections import defaultdict
from pprint import pprint
import os
import sys
RESDIR="WordPress/src/main/res"
TO_CHECK = ["-hdpi", "-xhdpi", "-xxhdpi"]
def main():
if len(sys.argv) == 2:
check_drawables(sys.argv[1])
else:
check_drawables(RESDIR)
def check_drawables... | gpl-2.0 |
b-carter/numpy | numpy/core/arrayprint.py | 4 | 29254 | """Array printing function
$Id: arrayprint.py,v 1.9 2005/09/13 13:58:44 teoliphant Exp $
"""
from __future__ import division, absolute_import, print_function
__all__ = ["array2string", "set_printoptions", "get_printoptions"]
__docformat__ = 'restructuredtext'
#
# Written by Konrad Hinsen <hinsenk@ere.umontreal.ca>
... | bsd-3-clause |
bukepo/openthread | tests/scripts/thread-cert/test_service.py | 4 | 7922 | #!/usr/bin/env python3
#
# Copyright (c) 2017, 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
# ... | bsd-3-clause |
scotwk/cloud-custodian | tools/zerodark/zerodark/ipdb.py | 1 | 24394 | # Copyright 2017-2018 Capital One Services, 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 agreed ... | apache-2.0 |
aristanetworks/neutron | neutron/plugins/ml2/config.py | 23 | 3296 | # Copyright (c) 2013 OpenStack Foundation
# 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 ... | apache-2.0 |
code-sauce/tensorflow | tensorflow/compiler/tests/lstm.py | 132 | 6452 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
Metaswitch/calico-nova | nova/volume/encryptors/nop.py | 42 | 1361 | # 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 |
google-code/android-scripting | python/src/Doc/includes/mp_workers.py | 57 | 2061 | #
# Simple example which uses a pool of workers to carry out some tasks.
#
# Notice that the results will probably not come out of the output
# queue in the same in the same order as the corresponding tasks were
# put on the input queue. If it is important to get the results back
# in the original order then consider ... | apache-2.0 |
szlin/gitsome | tests/data/thread.py | 1 | 1319 | # -*- coding: utf-8 -*-
# Copyright 2015 Donne Martin. 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. A copy of
# the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "lice... | gpl-3.0 |
mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/eggs/bx_python-0.7.2-py2.7-linux-x86_64-ucs4.egg/bx/seq/nib_tests.py | 7 | 1782 | """
Tests for `bx.seq.nib`.
"""
import unittest
import sys
import os.path
import nib
test_nib = "test_data/seq_tests/test.nib"
# Same sequence data as stored in test.nib
valid_seq = "TGGAGGCATTTGTGATTCAATAGATGCAGAAAGAAACCTTCCTAGAGCTG" \
+ "GCGTTCTCTAACTAAAAGTGGAAAGTTCTGAGGAATGAGGACTGTTATAA" \
+ ... | gpl-3.0 |
chen0510566/MissionPlanner | Lib/site-packages/numpy/oldnumeric/ufuncs.py | 102 | 1231 | __all__ = ['less', 'cosh', 'arcsinh', 'add', 'ceil', 'arctan2', 'floor_divide',
'fmod', 'hypot', 'logical_and', 'power', 'sinh', 'remainder', 'cos',
'equal', 'arccos', 'less_equal', 'divide', 'bitwise_or',
'bitwise_and', 'logical_xor', 'log', 'subtract', 'invert',
'negative',... | gpl-3.0 |
abramhindle/UnnaturalCodeFork | python/testdata/launchpad/lib/lp/codehosting/tests/test_safe_open.py | 1 | 16078 | # Copyright 2009-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Tests for the safe branch open code."""
__metaclass__ = type
from bzrlib.branch import (
Branch,
BranchReferenceFormat,
BzrBranchFormat7,
)
from bzrlib.b... | agpl-3.0 |
andrewcmyers/tensorflow | tensorflow/contrib/bayesflow/python/ops/stochastic_variables.py | 103 | 6065 | # 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 |
liosha2007/temporary-groupdocs-python-sdk | groupdocs/models/DatasourceField.py | 2 | 1097 | #!/usr/bin/env python
"""
Copyright 2012 GroupDocs.
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 |
lanselin/pysal | pysal/spatial_dynamics/tests/test_rank.py | 15 | 2717 | import unittest
import pysal
from pysal.spatial_dynamics import rank
import numpy as np
class Theta_Tester(unittest.TestCase):
def setUp(self):
f = pysal.open(pysal.examples.get_path('mexico.csv'))
vnames = ["pcgdp%d" % dec for dec in range(1940, 2010, 10)]
self.y = np.transpose(np.array([... | bsd-3-clause |
jonparrott/google-cloud-python | iot/google/cloud/iot_v1/gapic/transports/device_manager_grpc_transport.py | 2 | 13287 | # -*- coding: utf-8 -*-
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 |
BT-astauder/odoo | addons/account/wizard/account_report_account_balance.py | 378 | 1741 | # -*- 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 |
jjdmol/LOFAR | LTA/LTAIngest/dav/webdav/acp/Acl.py | 1 | 10978 | # pylint: disable-msg=W0622
#
# Copyright 2008 German Aerospace Center (DLR)
#
# 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 requ... | gpl-3.0 |
anxdpanic/Twitch-on-Kodi | resources/lib/twitch_addon/routes/maintain.py | 3 | 1467 | # -*- coding: utf-8 -*-
"""
Copyright (C) 2012-2018 Twitch-on-Kodi
This file is part of Twitch-on-Kodi (plugin.video.twitch)
SPDX-License-Identifier: GPL-3.0-only
See LICENSES/GPL-3.0-only for more information.
"""
from ..addon.common import kodi
from ..addon.utils import i18n
def route(sub_mode, f... | gpl-3.0 |
thundernet8/WRGameVideos-API | venv/lib/python2.7/site-packages/flask_jsonpify.py | 1 | 2543 | from flask import current_app, json, request
def __pad(strdata):
""" Pads `strdata` with a Request's callback argument, if specified, or does
nothing.
"""
if request.args.get('callback'):
return "%s(%s);" % (request.args.get('callback'), strdata)
else:
return strdata
... | gpl-2.0 |
saxsir/hhlab2013s-js-a | docs/python/chapter5/dorm.py | 4 | 1559 | import random
import math
# The dorms, each of which has two available spaces
dorms=['Zeus','Athena','Hercules','Bacchus','Pluto']
# People, along with their first and second choices
prefs=[('Toby', ('Bacchus', 'Hercules')),
('Steve', ('Zeus', 'Pluto')),
('Karen', ('Athena', 'Zeus')),
(... | mit |
WillisXChen/django-oscar | oscar/lib/python2.7/site-packages/factory/utils.py | 5 | 4870 | # -*- coding: utf-8 -*-
# Copyright (c) 2010 Mark Sandstrom
# Copyright (c) 2011-2013 Raphaël Barrois
#
# 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 ... | bsd-3-clause |
etherkit/OpenBeacon2 | macos/venv/lib/python3.8/site-packages/pkg_resources/_vendor/six.py | 2715 | 30098 | """Utilities for writing code that runs on Python 2 and 3"""
# Copyright (c) 2010-2015 Benjamin Peterson
#
# 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... | gpl-3.0 |
etherkit/OpenBeacon2 | macos/venv/lib/python3.8/site-packages/pip/_vendor/packaging/tags.py | 30 | 24067 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import
import distutils.util
try:
from importlib.machinery import EXTENSION_SUFFIXES
except ImportErr... | gpl-3.0 |
Learningtribes/edx-platform | common/test/acceptance/pages/lms/login.py | 205 | 1412 | """
Login page for the LMS.
"""
from bok_choy.page_object import PageObject
from bok_choy.promise import EmptyPromise
from . import BASE_URL
from .dashboard import DashboardPage
class LoginPage(PageObject):
"""
Login page for the LMS.
"""
url = BASE_URL + "/login"
def is_browser_on_page(self):
... | agpl-3.0 |
spring-week-topos/nova-week | nova/tests/virt/xenapi/test_volumeops.py | 12 | 9020 | # Copyright (c) 2012 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 ... | apache-2.0 |
nanolearningllc/edx-platform-cypress-2 | common/djangoapps/course_modes/migrations/0008_auto__del_field_coursemodesarchive_description__add_field_coursemode_s.py | 102 | 3098 | # -*- 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):
# Adding field 'CourseMode.sku'
db.add_column('course_modes_coursemode', 'sku',
self.g... | agpl-3.0 |
halfcrazy/sqlalchemy | examples/vertical/dictlike.py | 30 | 5034 | """Mapping a vertical table as a dictionary.
This example illustrates accessing and modifying a "vertical" (or
"properties", or pivoted) table via a dict-like interface. These are tables
that store free-form object properties as rows instead of columns. For
example, instead of::
# A regular ("horizontal") table h... | mit |
matrixise/odoo | addons/event_sale/__openerp__.py | 306 | 2163 | # -*- 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 |
ulibuck/script.htsp.EPG | tvh/dvb_charset_tables.py | 7 | 17433 | conv_8859_table = [
[
0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
0x00C0, 0x00C1... | gpl-3.0 |
diors-t/shadowsocks | shadowsocks/local.py | 1015 | 2248 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2012-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 r... | apache-2.0 |
Supersuuu/python | illuz/0002/create_a_table_and_put_keys.py | 40 | 1311 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Author: illuz <iilluzen[at]gmail.com>
# File: create_a_table_and_put_keys.py
# Create Date: 2015-02-09 12:12:43
# Usage: create_a_table_and_put_keys.py
# Descripton: create a table in mysql and put keys into it
"""
第 0002 题:
将 0001 题生成的 200 个激活码(或者优惠券)保存到... | mit |
apache/incubator-mxnet | python/mxnet/numpy/random.py | 4 | 40839 | # 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 |
danieljaouen/ansible | lib/ansible/modules/network/aci/aci_interface_policy_mcp.py | 10 | 6090 | #!/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 |
aalmah/fuel | fuel/datasets/celeba.py | 8 | 1766 | from fuel.datasets import H5PYDataset
from fuel.transformers.defaults import uint8_pixels_to_floatX
from fuel.utils import find_in_data_path
class CelebA(H5PYDataset):
"""The CelebFaces Attributes Dataset (CelebA) dataset.
CelebA is a large-scale face
attributes dataset with more than 200K celebrity imag... | mit |
bird-house/pywps-proxy | docs/source/conf.py | 2 | 9577 | #
# twitcher documentation build configuration file, created by
# sphinx-quickstart on Fri Oct 23 10:58:16 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.
#
# All configuration values... | apache-2.0 |
DailyActie/Surrogate-Model | 01-codes/numpy-master/numpy/core/tests/test_records.py | 1 | 14928 | from __future__ import division, absolute_import, print_function
import collections
import pickle
import sys
from os import path
import numpy as np
from numpy.compat import asbytes
from numpy.testing import (
TestCase, run_module_suite, assert_, assert_equal, assert_array_equal,
assert_array_almost_equal, ass... | mit |
rajanandakumar/DIRAC | StorageManagementSystem/scripts/dirac-stager-monitor-file.py | 11 | 5430 | #! /usr/bin/env python
########################################################################
# $HeadURL$
# File : dirac-stager-monitor-file
# Author : Daniela Remenska
########################################################################
"""
-gives monitoring information regarding a staging file uniquely iden... | gpl-3.0 |
CiscoSystems/python-neutronclient | neutronclient/common/command.py | 6 | 1132 | # Copyright 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.org/licenses/LICENSE-2.0
#
# Unless required by... | apache-2.0 |
ammarkhann/FinalSeniorCode | lib/python2.7/site-packages/pandas/tests/frame/test_query_eval.py | 11 | 42389 | # -*- coding: utf-8 -*-
from __future__ import print_function
import operator
import pytest
from pandas.compat import (zip, range, lrange, StringIO)
from pandas import DataFrame, Series, Index, MultiIndex, date_range
import pandas as pd
import numpy as np
from numpy.random import randn
from pandas.util.testing imp... | mit |
taoliu/taolib | Scripts/ce_histone_matrix.py | 1 | 17749 | #!/usr/bin/env python
# Time-stamp: <2010-09-08 02:38:38 Tao Liu>
"""Module Description
Copyright (c) 2008 Tao Liu <taoliu@jimmy.harvard.edu>
This code is free software; you can redistribute it and/or modify it
under the terms of the BSD License (see the file COPYING included with
the distribution).
@status: exper... | bsd-3-clause |
antechrestos/cf-python-client | main/cloudfoundry_client/v2/service_brokers.py | 1 | 1120 | from cloudfoundry_client.v2.entities import EntityManager
class ServiceBrokerManager(EntityManager):
def __init__(self, target_endpoint, client):
super(ServiceBrokerManager, self).__init__(target_endpoint, client, '/v2/service_brokers')
def create(self, broker_url, broker_name, auth_username, auth_pa... | apache-2.0 |
tonybaloney/st2 | st2common/tests/unit/test_util_loader.py | 1 | 6525 | # 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 |
Comunitea/CMNT_004_15 | project-addons/custom_account/models/payment.py | 1 | 3019 | # Copyright 2019 Omar Castiñeira, Comunitea Servicios Tecnológicos S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields, api
class PaymentOrderLine(models.Model):
_inherit = 'account.payment.line'
_order = 'partner_name'
partner_name = fields.Char(relate... | agpl-3.0 |
jbrahy/capstone | bindings/python/capstone/x86.py | 8 | 1959 | # Capstone Python bindings, by Nguyen Anh Quynnh <aquynh@gmail.com>
import ctypes
from . import copy_ctypes_list
from .x86_const import *
# define the API
class X86OpMem(ctypes.Structure):
_fields_ = (
('segment', ctypes.c_uint),
('base', ctypes.c_uint),
('index', ctypes.c_uint),
(... | bsd-3-clause |
MichaelMraka/dnf | dnf/callback.py | 7 | 2863 | # callbacks.py
# Abstract interfaces to communicate progress on tasks.
#
# Copyright (C) 2014 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any l... | gpl-2.0 |
baldurk/renderdoc | util/test/tests/D3D11/D3D11_Feature_Level_9.py | 2 | 1317 | import renderdoc as rd
import rdtest
class D3D11_Feature_Level_9(rdtest.TestCase):
demos_test_name = 'D3D11_Feature_Level_9'
def check_capture(self):
last_action: rd.ActionDescription = self.get_last_action()
self.controller.SetFrameEvent(last_action.eventId, True)
self.check_triang... | mit |
vamsirajendra/nupic | external/linux32/lib/python2.6/site-packages/matplotlib/_pylab_helpers.py | 70 | 1572 | import sys, gc
def error_msg(msg):
print >>sys.stderr, msgs
class Gcf(object):
_activeQue = []
figs = {}
def get_fig_manager(num):
figManager = Gcf.figs.get(num, None)
if figManager is not None: Gcf.set_active(figManager)
return figManager
get_fig_manager = staticmethod(ge... | agpl-3.0 |
Designist/sympy | sympy/galgebra/ga.py | 50 | 77676 | # sympy/galgebra/ga.py
"""
ga.py implements the symbolic geometric algebra of an n-dimensional
vector space with constant metric (future versions will allow for a
metric that is a function of coordinates) with an arbitrary set of
basis vectors (whether they are orthogonal or not depends on the
metric the use inputs).
... | bsd-3-clause |
rmfitzpatrick/ansible | lib/ansible/modules/notification/office_365_connector_card.py | 50 | 9473 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Marc Sensenich <hello@marc-sensenich.com>
# Copyright (c) 2017 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__ = t... | gpl-3.0 |
airtrick/zxing | cpp/scons/scons-local-2.0.0.final.0/SCons/Scanner/IDL.py | 34 | 1858 | """SCons.Scanner.IDL
This module implements the depenency scanner for IDL (Interface
Definition Language) files.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software an... | apache-2.0 |
vermouthmjl/scikit-learn | sklearn/preprocessing/_function_transformer.py | 20 | 2657 | from ..base import BaseEstimator, TransformerMixin
from ..utils import check_array
def _identity(X):
"""The identity function.
"""
return X
class FunctionTransformer(BaseEstimator, TransformerMixin):
"""Constructs a transformer from an arbitrary callable.
A FunctionTransformer forwards its X (a... | bsd-3-clause |
tinkerthaler/odoo | addons/payment_paypal/models/res_company.py | 422 | 1752 | # -*- coding: utf-8 -*-
from openerp.osv import fields, osv
class ResCompany(osv.Model):
_inherit = "res.company"
def _get_paypal_account(self, cr, uid, ids, name, arg, context=None):
Acquirer = self.pool['payment.acquirer']
company_id = self.pool['res.users'].browse(cr, uid, uid, context=co... | agpl-3.0 |
jniediek/mne-python | examples/visualization/plot_evoked_topomap.py | 13 | 1606 | """
========================================
Plotting topographic maps of evoked data
========================================
Load evoked data and plot topomaps for selected time points.
"""
# Authors: Christian Brodbeck <christianbrodbeck@nyu.edu>
# Tal Linzen <linzen@nyu.edu>
# Denis A. Engeman <... | bsd-3-clause |
Andrey-Pavlov/robomongo | src/third-party/mongodb/buildscripts/buildlogger.py | 12 | 15562 | """
buildlogger.py
Wrap a command (specified on the command line invocation of buildlogger.py)
and send output in batches to the buildlogs web application via HTTP POST.
The script configures itself from environment variables:
required env vars:
MONGO_BUILDER_NAME (e.g. "Nightly Linux 64-bit")
MONGO_BUILD_... | gpl-3.0 |
project-owner/Peppy | ui/container.py | 1 | 6297 | # Copyright 2016-2021 Peppy Player peppy.player@gmail.com
#
# This file is part of Peppy Player.
#
# Peppy Player 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 |
40223133/w188 | static/Brython3.1.1-20150328-091302/Lib/xml/dom/minidom.py | 727 | 66854 | """Simple implementation of the Level 1 DOM.
Namespaces and other minor Level 2 features are also supported.
parse("foo.xml")
parseString("<foo><bar/></foo>")
Todo:
=====
* convenience methods for getting elements and text.
* more testing
* bring some of the writer and linearizer code into conformance with this
... | gpl-3.0 |
gilneidp/TADD | pox/lib/addresses.py | 40 | 22449 | # Copyright 2011,2012,2013 James McCauley
#
# 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 t... | apache-2.0 |
sperka/shogun | examples/undocumented/python_modular/graphical/regression_gaussian_process_modelselection.py | 26 | 2694 | #!/usr/bin/env python
from numpy import *
from pylab import plot, show, legend, fill_between, figure, subplot, title
def regression_gaussian_process_modelselection (n=100, n_test=100, \
x_range=5, x_range_test=10, noise_var=0.4):
from modshogun import RealFeatures, RegressionLabels
from modshogun import Gaussian... | gpl-3.0 |
elba7r/lite-system | erpnext/patches/v6_0/multi_currency.py | 79 | 2101 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
# Reload doctype
for dt in ("Account", "GL Entry", "Journal Entry",
"Journal Entry Account", "Sales Invoice", "Purc... | gpl-3.0 |
jnovinger/django | tests/flatpages_tests/test_templatetags.py | 309 | 7111 | from django.contrib.auth.models import AnonymousUser, User
from django.contrib.flatpages.models import FlatPage
from django.contrib.sites.models import Site
from django.template import Context, Template, TemplateSyntaxError
from django.test import TestCase, modify_settings, override_settings
from .settings import FLAT... | bsd-3-clause |
flh/odoo | addons/mail/res_users.py | 12 | 10105 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2009-Today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 |
liorvh/infernal-twin | build/pip/build/lib.linux-i686-2.7/pip/_vendor/html5lib/treewalkers/_base.py | 436 | 7014 | from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type, string_types
__all__ = ["DOCUMENT", "DOCTYPE", "TEXT", "ELEMENT", "COMMENT", "ENTITY", "UNKNOWN",
"TreeWalker", "NonRecursiveTreeWalker"]
from xml.dom import Node
DOCUMENT = Node.DOCUMENT_NODE
DOCTYPE... | gpl-3.0 |
openiitbombayx/edx-platform | common/djangoapps/student/migrations/0031_drop_student_anonymoususerid_temp_archive.py | 167 | 10193 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
"Write your forwards methods here."
# Note: Remember to use orm['appname.ModelName'] rather than "from appname.mo... | agpl-3.0 |
pdellaert/ansible | test/units/plugins/inventory/test_aws_ec2.py | 24 | 7345 | # -*- coding: utf-8 -*-
# Copyright 2017 Sloane Hertel <shertel@redhat.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
# (... | gpl-3.0 |
drptbl/splinter | tests/element.py | 8 | 1388 | # -*- coding: utf-8 -*-
# Copyright 2012 splinter authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
class ElementTest(object):
def test_element_has_class_when_element_has_the_class_as_first_class(self):
self.assertTrue(sel... | bsd-3-clause |
robertwb/incubator-beam | sdks/python/apache_beam/runners/worker/worker_id_interceptor_test.py | 5 | 2362 | #
# 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 us... | apache-2.0 |
brian-l/django-1.4.10 | django/contrib/localflavor/no/forms.py | 87 | 2855 | """
Norwegian-specific Form helpers
"""
from __future__ import absolute_import
import re
import datetime
from django.contrib.localflavor.no.no_municipalities import MUNICIPALITY_CHOICES
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Field, Reg... | bsd-3-clause |
vishnu2kmohan/dcos | release/storage/azure.py | 11 | 4083 | from typing import Optional
import azure.storage.blob
import requests
from retrying import retry
from release.storage import AbstractStorageProvider
class AzureBlockBlobStorageProvider(AbstractStorageProvider):
name = 'azure'
def __init__(self, account_name, account_key, container, download_url):
a... | apache-2.0 |
samueldotj/TeeRISC-Simulator | src/mem/slicc/symbols/StateMachine.py | 3 | 51350 | # Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
# Copyright (c) 2009 The Hewlett-Packard Development Company
# 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 co... | bsd-3-clause |
srsman/odoo | addons/email_template/__openerp__.py | 260 | 3068 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2009 Sharoon Thomas
# Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it ... | agpl-3.0 |
RPGOne/Skynet | 5230d93ccc9fa5329b0a02a351b02939-459eebff35e625675d2f6ff5633c7051c1d64a0e/gistfile1.py | 1 | 3974 | """
python speedup_kmeans.py --profile
python speedup_kmeans.py
git worktree add workdir_master master
rob sedr "\<sklearn\>" sklearn_master True
git mv sklearn sklearn_master
python setup develop
python -c "import sklearn_master; print(sklearn_master.__file__)"
python -c "import sklearn; print(sklearn.__file__)"
"""
... | bsd-3-clause |
sol/pygments | pygments/styles/__init__.py | 27 | 2553 | # -*- coding: utf-8 -*-
"""
pygments.styles
~~~~~~~~~~~~~~~
Contains built-in styles.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.plugin import find_plugin_styles
from pygments.util import ClassNotFound
#: Maps sty... | bsd-2-clause |
wkjeong/ITK | Wrapping/WrapITK/Languages/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/bsc/c_wrapper.py | 14 | 9492 | import os
import sys
import ctypes
import logging
from ctypes import *
from ctypes.wintypes import ULONG
from ctypes.wintypes import DWORD
from ctypes.wintypes import BOOL
from ctypes.wintypes import BYTE
from ctypes.wintypes import WORD
from ctypes.wintypes import UINT
from .. import config as msvc_cfg
from ... impo... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.