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
mfeldheim/phormium
docs/_exts/sensio/sphinx/configurationblock.py
16
2555
# -*- coding: utf-8 -*- """ :copyright: (c) 2010-2012 Fabien Potencier :license: MIT, see LICENSE for more details. """ from docutils.parsers.rst import Directive, directives from docutils import nodes from string import upper class configurationblock(nodes.General, nodes.Element): pass class Configurati...
mit
upgoingstar/datasploit
username/username_gitemails.py
2
2214
#!/usr/bin/env python import base import vault import sys import requests import json from termcolor import colored from collections import Counter # Control whether the module is enabled or not ENABLED = True WRITE_TEXT_FILE = True MODULE_NAME = "Git_Emails" GITHUB_BASE = "https://api.github.com" ac...
gpl-3.0
ncliam/serverpos
openerp/addons/base/module/module.py
83
37402
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2014 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
AustinRoy7/Pomodoro-timer
venv/Lib/site-packages/pip/_vendor/requests/api.py
150
5795
# -*- coding: utf-8 -*- """ requests.api ~~~~~~~~~~~~ This module implements the Requests API. :copyright: (c) 2012 by Kenneth Reitz. :license: Apache2, see LICENSE for more details. """ from . import sessions def request(method, url, **kwargs): """Constructs and sends a :class:`Request <Request>`. :par...
mit
peterhinch/micropython-tft-gui
tft/widgets/checkbox.py
1
1802
# checkbox.py For TFT driver. # Adapted for (and requires) uasyncio V3 # Released under the MIT License (MIT). See LICENSE. # Copyright (c) 2016-2020 Peter Hinch from tft.driver.ugui import Touchable, dolittle from tft.driver.constants import * class Checkbox(Touchable): def __init__(self, location, *, height=30...
mit
jounex/hue
desktop/libs/libopenid/src/libopenid/backend.py
26
3320
#!/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
mindbaffle/ATF
Test/FunctionalTests/FsmEditorTestScripts/CopyPaste.py
10
2398
#Copyright (c) 2014 Sony Computer Entertainment America LLC. See License.txt. import sys sys.path.append("./CommonTestScripts") import Test import FsmUtil atfDocService.OpenNewDocument(editor) print "Copy and paste one state" state1 = FsmUtil.AddNewStateAndVerify(editingContext, 100, 100, "copyMe-state", 70) atfEdi...
apache-2.0
4shadoww/usploit
core/lib/whois/whois.py
2
10375
""" Whois client for python transliteration of: http://www.opensource.apple.com/source/adv_cmds/adv_cmds-138.1/whois/whois.c Copyright (c) 2010 Chris Wolf 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 ...
mit
greatmazinger/or-tools
examples/python/pyflow_example.py
32
2986
# Copyright 2010-2014 Google # 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, so...
apache-2.0
abantos/bolt
bolt/api.py
1
3408
""" This module contains classes that can be used for the implementation of bolt tasks. """ import logging class Task(object): """ """ def __call__(self, **kwargs): self.config = kwargs.get('config') self._configure() self._execute() def _configure(self): """ ...
mit
kartikluke/cron
lib/werkzeug/posixemulation.py
148
3483
# -*- coding: utf-8 -*- r""" werkzeug.posixemulation ~~~~~~~~~~~~~~~~~~~~~~~ Provides a POSIX emulation for some features that are relevant to web applications. The main purpose is to simplify support for systems such as Windows NT that are not 100% POSIX compatible. Currently this only imple...
apache-2.0
PolicyStat/django
django/test/signals.py
2
4930
import os import time import threading import warnings from django.conf import settings from django.db import connections from django.dispatch import receiver, Signal from django.utils import timezone from django.utils.functional import empty template_rendered = Signal(providing_args=["template", "context"]) setting...
bsd-3-clause
smartdevice475/sdl_core_346_wince
src/3rd_party-static/gmock-1.7.0/gtest/scripts/pump.py
2471
23673
#!/usr/bin/env python # # Copyright 2008, 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
eayunstack/rally
tests/unit/common/plugin/test_info.py
6
2871
# Copyright 2015: Mirantis 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 b...
apache-2.0
ikaee/bfr-attendant
facerecognitionlibrary/jni-build/jni/include/tensorflow/contrib/session_bundle/exporter.py
49
12341
# 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
achang97/YouTunes
lib/python2.7/site-packages/rsa/_compat.py
81
3890
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # Un...
mit
civisanalytics/ansible
contrib/inventory/serf.py
395
3032
#!/usr/bin/env python # (c) 2015, Marc Abramowitz <marca@surveymonkey.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
adminradio/RenderManForBlender
rfb_utils/texture_utils.py
2
11417
from . import string_utils from . import filepath_utils from . import scene_utils #from . import object_utils from .prefs_utils import get_pref from ..rfb_logger import rfb_log from rman_utils import txmanager from rman_utils.txmanager import core as txcore from rman_utils.txmanager import txparams as txparams from .co...
mit
harisbal/pandas
pandas/tests/indexes/interval/test_interval.py
1
47407
from __future__ import division import re from itertools import permutations import numpy as np import pytest import pandas as pd import pandas.core.common as com import pandas.util.testing as tm from pandas import ( Index, Interval, IntervalIndex, Timedelta, Timestamp, date_range, interval_range, isna, notn...
bsd-3-clause
yize/grunt-tps
tasks/lib/python/Lib/python2.7/test/test_zipfile.py
36
61036
# We can test part of the module without zlib. try: import zlib except ImportError: zlib = None import os import io import sys import time import shutil import struct import zipfile import unittest from StringIO import StringIO from tempfile import TemporaryFile from random import randint, random from unittes...
mit
kzvyahin/cfme_tests
cfme/intelligence/chargeback.py
1
14094
# -*- coding: utf-8 -*- from collections import Mapping from copy import copy from functools import partial from selenium.webdriver.common.by import By from navmazing import NavigateToSibling, NavigateToAttribute import cfme.web_ui.accordion as accordion import cfme.web_ui.toolbar as tb import cfme.fixtures.pytest_sel...
gpl-2.0
umitproject/openmonitor-aggregator
django/core/files/locks.py
420
1791
""" Portable file locking utilities. Based partially on example by Jonathan Feignberg <jdf@pobox.com> in the Python Cookbook, licensed under the Python Software License. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65203 Example Usage:: >>> from django.core.files import locks >>> f = open('./...
agpl-3.0
jscottcronin/PinkSlipper
webapp/app.py
1
4047
from flask import Flask, request, redirect, url_for import flask from flask.ext.paginate import Pagination import pandas as pd import numpy as np from collections import defaultdict import pymongo import re DF = None DF_SUBSET = None PAGES = None app = Flask(__name__) app.config.from_object(__name__) def get_positi...
gpl-2.0
ymilord/OctoPrint-MrBeam
src/octoprint/util/comm.py
1
49358
from __future__ import absolute_import # coding=utf-8 __author__ = "Gina Häußge <osd@foosel.net> based on work by David Braam" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License" import os...
agpl-3.0
marcelocure/django
tests/settings_tests/tests.py
129
18827
import os import sys import unittest import warnings from types import ModuleType from django.conf import LazySettings, Settings, settings from django.core.exceptions import ImproperlyConfigured from django.http import HttpRequest from django.test import ( SimpleTestCase, TestCase, TransactionTestCase, modify_sett...
bsd-3-clause
TAMU-CPT/galaxy-tools
tools/gff3/gbk_to_gff3.py
1
9694
#!/usr/bin/env python import argparse import sys from Bio import SeqIO from Bio.SeqRecord import SeqRecord from cpt_gffParser import gffSeqFeature, gffWrite bottomFeatTypes = ["exon", "RBS", "CDS"] def makeGffFeat(inFeat, num, recName): if "codon_start" in inFeat.qualifiers.keys(): shift = int(inFeat.qual...
gpl-3.0
InternationalAirlinesGroup/stubo-app
stubo/model/stub.py
2
7104
""" :copyright: (c) 2015 by OpenCredo. :license: GPLv3, see LICENSE for more details. """ import logging import json from stubo.model.stub_parser import ( JSONStubParser, LegacyStubParser ) from stubo.utils import compute_hash log = logging.getLogger(__name__) def response_hash(response_body, stub): ...
gpl-3.0
spbguru/repo1
nupic/swarming/__init__.py
16
1105
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
gpl-3.0
abhiii5459/sympy
sympy/stats/__init__.py
56
2363
""" SymPy statistics module Introduces a random variable type into the SymPy language. Random variables may be declared using prebuilt functions such as Normal, Exponential, Coin, Die, etc... or built with functions like FiniteRV. Queries on random expressions can be made using the functions ======================...
bsd-3-clause
SnappleCap/oh-mainline
vendor/packages/Jinja2/ext/djangojinja2.py
55
2996
# -*- coding: utf-8 -*- """ djangojinja2 ~~~~~~~~~~~~ Adds support for Jinja2 to Django. Configuration variables: ======================= ============================================= Key Description ======================= =============================================...
agpl-3.0
noslenfa/tdjangorest
uw/lib/python2.7/site-packages/IPython/lib/tests/test_display.py
2
5574
"""Tests for IPython.lib.display. """ #----------------------------------------------------------------------------- # Copyright (c) 2012, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------...
apache-2.0
skihyy/GT-Spring-2017-CS6262
crawl_good_softwares/crawl_good_softwares/spiders/scrapy_software_spider.py
1
2351
# -*- coding: utf-8 -*- import scrapy import urllib import os from scrapy.http import Request from scrapy.selector import Selector from crawl_good_softwares.items import CrawlGoodSoftwaresItem class TestSpiderSpider(scrapy.Spider): name = "scrapy_software_spider" start_urls = ['http://download.cnet.com/s/soft...
mit
tsvstar/vk_downloader
requests/packages/chardet/cp949prober.py
2801
1782
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
mit
dunkhong/grr
travis/upload_build_results_to_gcs_test.py
2
2699
#!/usr/bin/env python # python3 import os import subprocess from absl.testing import absltest import mock import requests from grr.travis import upload_build_results_to_gcs class FakeError(Exception): """Fake exception for testing purposes.""" @mock.patch.dict( os.environ, { upload_build_results_to_...
apache-2.0
craynot/django
django/contrib/admindocs/utils.py
411
4187
"Misc. utility functions/classes for admin documentation generator." import re from email.errors import HeaderParseError from email.parser import HeaderParser from django.core.urlresolvers import reverse from django.utils.encoding import force_bytes from django.utils.safestring import mark_safe try: import docut...
bsd-3-clause
hamzehd/edx-platform
lms/djangoapps/courseware/tests/test_user_state_client.py
57
2077
""" Black-box tests of the DjangoUserStateClient against the semantics defined in edx_user_state_client. """ from collections import defaultdict from unittest import skip from django.test import TestCase from edx_user_state_client.tests import UserStateClientTestBase from courseware.user_state_client import DjangoXB...
agpl-3.0
VladimirFilonov/django-yandex-kassa
demo/app/views.py
2
1253
# -*- coding: utf-8 -*- from random import randint from django.http import Http404 from django.views.generic import DetailView from django.views.generic import TemplateView from yandex_kassa.forms import PaymentForm from .models import Item from .models import Order from yandex_kassa.models import Payment class Home...
mit
freemanjackal/bolsonarocoin
qa/rpc-tests/signrawtransactions.py
64
4615
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * class ...
mit
Mitali-Sodhi/CodeLingo
Dataset/python/test_livejournal.py
11
3659
# import json import datetime from httpretty import HTTPretty from social.p3 import urlencode from social.exceptions import AuthMissingParameter from social.tests.backends.open_id import OpenIdTest JANRAIN_NONCE = datetime.datetime.now().strftime('%Y-%m-%dT%H:%M:%SZ') class LiveJournalOpenIdTest(OpenIdTest): ...
mit
sfanous/Pyecobee
pyecobee/objects/remote_sensor_capability.py
1
2144
""" This module is home to the RemoteSensorCapability class """ from pyecobee.ecobee_object import EcobeeObject class RemoteSensorCapability(EcobeeObject): """ This class has been auto generated by scraping https://www.ecobee.com/home/developer/api/documentation/v1/objects/RemoteSensorCapability.shtml ...
mit
gioman/QGIS
python/plugins/processing/core/parameters.py
1
56988
# -*- coding: utf-8 -*- """ *************************************************************************** Parameters.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ****************************...
gpl-2.0
zenn1989/scoria-interlude
L2Jscoria-Game/data/scripts/quests/504_CompetitionfortheBanditStronghold/__init__.py
1
2601
import sys from com.l2scoria.gameserver.model.entity.siege import BanditStrongholdSiege from com.l2scoria.gameserver.model.quest import State from com.l2scoria.gameserver.model.quest import QuestState from com.l2scoria.gameserver.model.quest.jython import QuestJython as JQuest qn = "504_CompetitionForTheBanditStrongho...
gpl-3.0
vipulkanade/EventbriteDjango
lib/python2.7/encodings/utf_8_sig.py
412
3685
""" Python 'utf-8-sig' Codec This work similar to UTF-8 with the following changes: * On encoding/writing a UTF-8 encoded BOM will be prepended/written as the first three bytes. * On decoding/reading if the first three bytes are a UTF-8 encoded BOM, these bytes will be skipped. """ import codecs ### Codec APIs ...
mit
jk1/intellij-community
python/helpers/pydev/pydevd_attach_to_process/winappdbg/__init__.py
102
7917
#!~/.wine/drive_c/Python25/python.exe # -*- coding: utf-8 -*- # Copyright (c) 2009-2014, Mario Vilas # 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 ...
apache-2.0
googleinterns/betel
betel/classifier_sequence.py
1
3582
import pathlib import math from typing import Dict, Tuple, List import numpy as np from tensorflow import keras from PIL import Image, ImageOps class ClassifierSequence(keras.utils.Sequence): """A class for sequencing the classifier's input data.""" def __init__(self, input_dir: pathlib.Path, batch_size: int...
apache-2.0
JingJunYin/tensorflow
tensorflow/examples/adding_an_op/cuda_op.py
192
1062
# 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
CS-SI/QGIS
tests/src/python/test_qgsserver_plugins.py
19
7092
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsServer plugins and filters. From build dir, run: ctest -R PyQgsServerPlugins -V .. note:: 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 ve...
gpl-2.0
miguelinux/vbox
src/libs/libxml2-2.9.2/python/drv_libxml2.py
15
15160
# -*- coding: iso-8859-1 -*- """ A SAX2 driver for libxml2, on top of it's XmlReader API USAGE # put this file (drv_libxml2.py) in PYTHONPATH import xml.sax reader = xml.sax.make_parser(["drv_libxml2"]) # ...and the rest is standard python sax. CAVEATS - Lexical handlers are supported, except for ...
gpl-2.0
sYnfo/samba
third_party/waf/wafadmin/Tools/dmd.py
32
1580
#!/usr/bin/env python # encoding: utf-8 # Carlos Rafael Giani, 2007 (dv) # Thomas Nagy, 2008 (ita) import sys import Utils, ar from Configure import conftest @conftest def find_dmd(conf): conf.find_program(['dmd', 'ldc'], var='D_COMPILER', mandatory=True) @conftest def common_flags_ldc(conf): v = conf.env v['DFLA...
gpl-3.0
nicholasserra/sentry
src/sentry/api/base.py
2
7469
from __future__ import absolute_import __all__ = ['DocSection', 'Endpoint', 'StatsMixin'] import time from datetime import datetime, timedelta from django.conf import settings from django.utils.http import urlquote from django.views.decorators.csrf import csrf_exempt from enum import Enum from pytz import utc from r...
bsd-3-clause
yanheven/keystone
keystone/contrib/simple_cert/routers.py
23
1460
# 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
Midnighter/pymetabolism
pymetabolism/miscellaneous.py
1
1955
#!/usr/bin/env python # -*- coding: utf-8 -*- """ =================== Library Miscellanea =================== :Authors: Moritz Emanuel Beber :Date: 2011-07-01 :Copyright: Copyright(c) 2011 Jacobs University of Bremen. All rights reserved. :File: miscellaneous.py """ __all__ = ["OptionsManager"] i...
bsd-3-clause
vikomall/pyrax
setup.py
8
3075
#!/usr/bin/env python from setuptools import setup from setuptools.command.sdist import sdist as _sdist import re import sys import time import codecs import subprocess if sys.version < "2.2.3": from distutils.dist import DistributionMetadata DistributionMetadata.classifiers = None DistributionMetadata.dow...
apache-2.0
VinGarcia/kivy
kivy/vector.py
44
10228
'''Vector ====== The :class:`Vector` represents a 2D vector (x, y). Our implementation is built on top of a Python list. An example of constructing a Vector:: >>> # Construct a point at 82,34 >>> v = Vector(82, 34) >>> v[0] 82 >>> v.x 82 >>> v[1] 34 >>> v.y 34 >>> # Cons...
mit
j831/zulip
zproject/dev_urls.py
6
1358
from django.conf.urls import url from django.conf import settings import os.path from django.views.static import serve import zerver.views.registration import zerver.views.auth # These URLs are available only in the development environment use_prod_static = getattr(settings, 'PIPELINE_ENABLED', False) static_root = o...
apache-2.0
jribbens/voting
voting/management/commands/fetchvotingnews.py
1
2202
"""Import voting statements, cfvs and results from the NNTP server.""" import nntplib import os from django.core.management.base import BaseCommand from ...models import Election, Statement from ... import nntp class Command(BaseCommand): """Import voting statements, cfvs and results from the NNTP server.""" ...
mit
AutorestCI/azure-sdk-for-python
azure-keyvault/azure/keyvault/models/contact.py
5
1121
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
lguduy/Data-Structure-and-Algorithms-in-Python
Code/linkedlist/linkedlist1.py
1
3058
# -*- coding: utf-8 -*- """ Created on 2017/03/02 10:52 @author: lguduy # Data Structure and Algorithms in Python ## Chapter 3 ### Linked List 链表 单链表的简单变形 引入表尾指针,感觉并没有带来便利 """ from linkedlist import LNode from linkedlist import LinkedListUnderflow from linkedlist import LList class LList1(LList): """单链表简单变形 ...
mit
FireWRT/OpenWrt-Firefly-Libraries
staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python3.4/test/test_sundry.py
84
2221
"""Do a minimal test of all the modules that aren't otherwise tested.""" import importlib import sys from test import support import unittest class TestUntestedModules(unittest.TestCase): def test_untested_modules_can_be_imported(self): untested = ('bdb', 'encodings', 'formatter', 'ntur...
gpl-2.0
googleads/google-ads-python
google/ads/googleads/v6/errors/types/ad_group_error.py
1
1713
# -*- 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 o...
apache-2.0
baberthal/CouchPotatoServer
libs/suds/bindings/multiref.py
209
4181
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
gpl-3.0
bootandy/sqlalchemy
lib/sqlalchemy/sql/dml.py
40
31506
# sql/dml.py # Copyright (C) 2009-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ Provide :class:`.Insert`, :class:`.Update` and :class:`.Delete`. """ from .base impo...
mit
tfroehlich82/erpnext
erpnext/restaurant/doctype/restaurant_menu/test_restaurant_menu.py
7
1930
# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest test_records = [ dict(doctype='Item', item_code='Food Item 1', item_group='Products', is_stock_item=0), dict(doctype='Item', item_cod...
gpl-3.0
EPDCenter/android_kernel_bq_dc_v1
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
rwl/PyCIM
CIM14/IEC61970/Dynamics/MetaBlockReference.py
1
10614
# Copyright (C) 2010-2011 Richard Lincoln # # 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, modify, merge, publish...
mit
dudonwai/dudonsblog
Lib/site-packages/setuptools/tests/test_egg_info.py
148
2744
import os import stat import pytest from . import environment from .textwrap import DALS from . import contexts class TestEggInfo: setup_script = DALS(""" from setuptools import setup setup( name='foo', py_modules=['hello'], entry_points={'console_scripts': ...
mit
opsdisk/pyrax
samples/cloudfiles/create_container.py
13
1308
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c)2012 Rackspace US, 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.ap...
apache-2.0
sinhrks/scikit-learn
examples/svm/plot_svm_nonlinear.py
268
1091
""" ============== Non-linear SVM ============== Perform binary classification using non-linear SVC with RBF kernel. The target to predict is a XOR of the inputs. The color map illustrates the decision function learned by the SVC. """ print(__doc__) import numpy as np import matplotlib.pyplot as plt from sklearn imp...
bsd-3-clause
rakeshkurakula/deeppy
examples/convnet_cifar.py
5
2995
#!/usr/bin/env python """ Convnets for image classification (2) ===================================== """ import numpy as np import matplotlib import matplotlib.pyplot as plt import deeppy as dp # Fetch CIFAR10 data dataset = dp.dataset.CIFAR10() x_train, y_train, x_test, y_test = dataset.data(dp_dtypes=True) # N...
mit
a301-teaching/a301_code
notebooks/python/ground_track.py
1
7770
# coding: utf-8 # ## Plotting the cloudsat groundtrack on a modis raster # # # This notebook is my solution to Assignment 16, satellite groundtrack assigned on Day 26 # # Environment requires: # # h5py, matplotlib, pyresample, requests, basemap # # In[1]: from a301utils.a301_readfile import download from a301l...
mit
jeremydane/Info3180Lab4-
server/lib/werkzeug/contrib/jsrouting.py
318
8534
# -*- coding: utf-8 -*- """ werkzeug.contrib.jsrouting ~~~~~~~~~~~~~~~~~~~~~~~~~~ Addon module that allows to create a JavaScript function from a map that generates rules. :copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ ...
apache-2.0
Metrological/qtwebkit
Tools/TestResultServer/model/jsonresults.py
121
14752
# Copyright (C) 2010 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 ...
lgpl-3.0
iocoop/beancount
src/python/beancount/ops/prices_test.py
1
12441
__author__ = "Martin Blais <blais@furius.ca>" import unittest import datetime import re from beancount.core.number import D from beancount.core.amount import A from beancount.core import inventory from beancount.ops import prices from beancount.parser import cmptest from beancount import loader class TestPriceEntri...
gpl-2.0
mrcslws/htmresearch
projects/sdr_paper/theoretical_effect_of_n.py
12
11199
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2016, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
hbhdytf/mac
test/functional/test_object.py
16
47739
#!/usr/bin/python # Copyright (c) 2010-2012 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 appl...
apache-2.0
tigelane/web2aci
www/cgi-bin/aci-show-filter-entries.py
1
3067
#!/usr/bin/env python # Copyright (c) 2014 Cisco Systems # 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...
gpl-2.0
jiajiax/crosswalk-test-suite
webapi/tct-application-tizen-tests/inst.wgt.py
4
6818
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess import string from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PKG_NAME = os.path.basename(SCRIPT_DIR) PARAMETERS = None #XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=...
bsd-3-clause
koomik/CouchPotatoServer
libs/enzyme/riff.py
179
20109
# -*- coding: utf-8 -*- # enzyme - Video metadata parser # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # Copyright 2003-2006 Thomas Schueppel <stain@acm.org> # Copyright 2003-2006 Dirk Meyer <dischi@freevo.org> # # This file is part of enzyme. # # enzyme is free software; you can redistribute it and/or mod...
gpl-3.0
XeCycle/indico
indico/MaKaC/webinterface/rh/errors.py
2
3163
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
gpl-3.0
Jet-Streaming/framework
deps/googletest/googletest/test/gtest_color_test.py
3259
4911
#!/usr/bin/env python # # Copyright 2008, 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
Alex-van-der-Peet/bitcoin
contrib/devtools/symbol-check.py
172
4344
#!/usr/bin/python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' A script to check that the (Linux) executables produced by gitian only contain allowed gcc, glibc and libstdc++ ver...
mit
proxysh/Safejumper-for-Desktop
buildlinux/env64/lib/python2.7/site-packages/twisted/conch/error.py
16
2716
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ An error to represent bad things happening in Conch. Maintainer: Paul Swartz """ from __future__ import absolute_import, division from twisted.cred.error import UnauthorizedLogin class ConchError(Exception): def __init__(self, value, ...
gpl-2.0
ahmadRagheb/goldenHR
erpnext/hr/doctype/expense_claim/expense_claim.py
10
8767
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import get_fullname, flt, cstr from frappe.model.document import Document from erpnext.hr.utils imp...
gpl-3.0
micahfay/quiz_app
quiz/dev_settings.py
1
3186
""" Django settings for DjangoTutorial project. Generated by 'django-admin startproject' using Django 1.8.5. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Bui...
gpl-3.0
Theb-1/home-assistant
homeassistant/components/light/zwave.py
2
3527
""" homeassistant.components.light.zwave ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support for Z-Wave lights. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.zwave/ """ # Because we do not compile openzwave on CI # pylint: disable=import-error from thread...
mit
wesm/ibis
ibis/sql/sqlite/tests/test_functions.py
1
14619
# Copyright 2015 Cloudera Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
apache-2.0
lizardsystem/controlnext
controlnext/migrations/0002_auto__chg_field_growerinfo_max_outflow_per_timeunit.py
1
2668
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'GrowerInfo.max_outflow_per_timeunit' db.alter_column('controlnext_growerinfo', 'max_outf...
gpl-3.0
Eddy0402/rt-thread
tools/iar.py
52
4038
# # File : iar.py # This file is part of RT-Thread RTOS # COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the ...
gpl-2.0
clemsos/junkware
tests/test_nlg.py
2
2050
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import os from _helpers import TestHelpers helpers=TestHelpers() helpers.add_relative_path() from lib.generator import ObjectGenerator from lib.corpus import PatentCorpus test_corpus_path = os.path.join(os.getcwd(),'tests/test_corpus') patent_db = os.pa...
mit
xxsergzzxx/python-for-android
python3-alpha/python3-src/Lib/test/test_multibytecodec_support.py
54
14720
#!/usr/bin/env python3 # # test_multibytecodec_support.py # Common Unittest Routines for CJK codecs # import codecs import os import re import sys import unittest from http.client import HTTPException from test import support from io import BytesIO class TestBase: encoding = '' # codec name codec ...
apache-2.0
JioCloud/neutron
neutron/plugins/nec/db/models.py
28
4423
# Copyright 2012 NEC Corporation. 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 ...
apache-2.0
khertan/KhtNotes
khtnotes/docutils/writers/pep_html/__init__.py
58
3583
# $Id: __init__.py 6328 2010-05-23 21:20:29Z gbrandl $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ PEP HTML Writer. """ __docformat__ = 'reStructuredText' import sys import os import os.path import codecs import docutils from docutils import fronte...
gpl-3.0
lig/asq
asq/test/test_default_if_empty.py
5
1127
import unittest from asq.queryables import Queryable from asq.test.test_queryable import infinite, TracingGenerator __author__ = "Robert Smallshire" class TestDefaultIfEmpty(unittest.TestCase): def test_default_if_empty_empty(self): b = Queryable([]).default_if_empty(5).to_list() self.assertEqual...
mit
mrabbah/snmpccgx
flask/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/jisfreq.py
3131
47315
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
gpl-3.0
infoxchange/lettuce
tests/integration/lib/Django-1.3/tests/regressiontests/defaultfilters/tests.py
49
24500
# -*- coding: utf-8 -*- import datetime from django.utils import unittest from django.template.defaultfilters import * class DefaultFiltersTests(unittest.TestCase): def test_floatformat(self): self.assertEqual(floatformat(7.7), u'7.7') self.assertEqual(floatformat(7.0), u'7') self.assertE...
gpl-3.0
ronfe/shadowsocks
shadowsocks/crypto/openssl.py
1038
5414
#!/usr/bin/env python # # Copyright 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 required by applicable law or ...
apache-2.0
ujenmr/ansible
lib/ansible/modules/system/at.py
50
5749
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2014, Richard Isaacson <richard.c.isaacson@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 = {'meta...
gpl-3.0
tkolhar/robottelo
tests/foreman/rhai/test_rhai_client.py
1
2990
"""Tests for Red Hat Access Insights Client rpm""" from fauxfactory import gen_string from nailgun import entities from robottelo import manifests from robottelo.api.utils import upload_manifest from robottelo.constants import DEFAULT_SUBSCRIPTION_NAME from robottelo.decorators import skip_if_not_set from robottelo.te...
gpl-3.0
ianunruh/hvac
hvac/api/system_backend/init.py
1
4849
from hvac.api.system_backend.system_backend_mixin import SystemBackendMixin from hvac.exceptions import ParamValidationError class Init(SystemBackendMixin): def read_init_status(self): """Read the initialization status of Vault. Supported methods: GET: /sys/init. Produces: 200 applic...
apache-2.0
nlsdfnbch/bitex-crawler
bitex/api/WSS/hitbtc.py
2
3941
#import Built-Ins import logging from threading import Thread from queue import Queue, Empty import json import time import hmac import hashlib # Import Third-Party from websocket import create_connection, WebSocketTimeoutException # Import Homebrew from bitex.api.WSS.base import WSSAPI # Init Logging Facilities log ...
mit