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
# coding: utf-8 """ MINDBODY Public API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 impor...
mindbody/API-Examples
SDKs/Python/swagger_client/models/get_client_visits_response.py
Python
bsd-2-clause
4,569
from __future__ import print_function import time import sys, os d = os.path.dirname(__file__) sys.path.append(os.path.join(d, '../../util')) from numpy import empty, uint16, ascontiguousarray, concatenate, newaxis from acq4.pyqtgraph import graphicsWindows as gw from acq4.util import Qt from .QImagingDriver import *...
pbmanis/acq4
acq4/drivers/QImaging/qi_test.py
Python
mit
2,836
# -*- coding: utf-8 -*- from __future__ import absolute_import from lib import BaseWsException class SslCertificateRetrievalFailedError(BaseWsException): """ An exception for denoting that attempting to retrieve an SSL certificate failed. """ _message = "SSL certificate retrieval failed."
lavalamp-/ws-backend-community
lib/inspection/exception.py
Python
gpl-3.0
310
import sqlite3 import logging import argparse import os import collections import itertools from helper_functions import (grab_vector, grab_all, grab_scalar, load_graph_database, load_options) desc = "Runs initial queries over the databases" parser = argparse.ArgumentParser(description=desc...
thoppe/Encyclopedia-of-Finite-Graphs
src/build_sequence.py
Python
gpl-2.0
9,931
from __future__ import absolute_import, division, print_function import tempfile from .. import data def test_check_hashes(): #tf = tempfile.NamedTemporaryFile(delete=False) #fname = tf.name with tempfile.NamedTemporaryFile() as temp: temp.write(b'Some data') temp.flush() fname =...
imranyousuf/project-kappa
data/tests/test_data.py
Python
bsd-3-clause
519
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014-2017 Vincent Noel (vincent.noel@butantan.gov.br) # # This file is part of libSigNetSim. # # libSigNetSim 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 Fou...
vincent-noel/libSigNetSim
libsignetsim/data/tests/test_readwrite_data.py
Python
gpl-3.0
4,976
# 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...
RobinQuetin/CAIRIS-web
cairis/cairis/ObstacleDialog.py
Python
apache-2.0
4,277
"""add thread index Revision ID: 4011b943a24d Revises: 5709063bff01 Create Date: 2014-10-14 06:09:07.279954 """ # revision identifiers, used by Alembic. revision = '4011b943a24d' down_revision = '5709063bff01' from alembic import op def upgrade(): op.create_index('ix_thread_namespace_id_recentdate_deleted_at'...
nylas/sync-engine
migrations/versions/110_add_thread_index.py
Python
agpl-3.0
536
import time from goose import Goose def load_jezebel(): with open('resources/additional_html/jezebel1.txt') as f: data = f.read() return data def bench(iterations=100): data = load_jezebel() goose = Goose() times = [] for _ in xrange(iterations): t1 = time.time() goose....
scivey/goosepp
scripts/benchmark_python_goose.py
Python
mit
648
# 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 may ...
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_02_01/aio/operations/_web_application_firewall_policies_operations.py
Python
mit
20,690
#-*- coding: utf-8 -*- from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth import authenticate, login from colleur.forms import ColleurConnexionForm, ProgrammeForm, SemaineForm, EleveForm, MatiereECTSForm, SelectEleveForm, NoteEleveForm, NoteEleveFormSet, ECTSForm, SelectEleveNoteF...
stephanekirsch/e-colle
colleur/views.py
Python
agpl-3.0
57,130
from django.core.cache import cache from django.utils.encoding import smart_str import inspect # Check if the cache backend supports min_compress_len. If so, add it. try: if 'min_compress_len' in inspect.getargspec(cache._cache.add)[0] and \ 'min_compress_len' in inspect.getargspec(cache._cache.set)[0]: ...
boar/boar
boar/cacher/cache.py
Python
bsd-3-clause
1,184
from __future__ import annotations from enum import Enum, auto class RunState(Enum): starting = auto() started = auto() stopping = auto() stopped = auto() class JobOutcome(Enum): success = auto() error = auto() missed_start_deadline = auto() cancelled = auto() expired = auto() ...
agronholm/apscheduler
src/apscheduler/enums.py
Python
mit
818
''' Created by auto_sdk on 2016.03.24 ''' from top.api.base import RestApi class HttpdnsGetRequest(RestApi): def __init__(self,domain='gw.api.taobao.com',port=80): RestApi.__init__(self,domain, port) def getapiname(self): return 'taobao.httpdns.get'
arcsecw/query_order
api/top/api/rest/HttpdnsGetRequest.py
Python
mit
267
from django.contrib import admin from example.sampleapp.models import Picture, Category from cms.admin.placeholderadmin import PlaceholderAdmin class PictureInline(admin.StackedInline): model = Picture class CategoryAdmin(PlaceholderAdmin): inlines = [PictureInline] admin.site.register(Category, CategoryAdmi...
jalaziz/django-cms-grappelli-old
example/sampleapp/admin.py
Python
bsd-3-clause
322
""" Test that the debugger handles loops in std::list (which can appear as a result of e.g. memory corruption). """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class LibcxxListDataFormatterTestCase(TestBase): mydir = TestBase.co...
endlessm/chromium-browser
third_party/llvm/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py
Python
bsd-3-clause
2,446
# 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...
keras-team/keras
keras/distribute/saved_model_mixed_api_test.py
Python
apache-2.0
3,699
""" Python module for interacting with Gravatar. """ __author__ = 'Eric Seidel' __version__ = '0.0.5' __email__ = 'gridaphobe@gmail.com' from urllib import urlencode from urllib2 import urlopen from hashlib import md5 try: import json except ImportError: try: import simplejson as json except Im...
gilsondev/web2py-cms
modules/pygravatar/gravatar.py
Python
lgpl-3.0
6,527
import django from django.db.transaction import atomic from django.db.models import OneToOneField try: from django.db.models.fields.related_descriptors import ( ReverseOneToOneDescriptor, ) except ImportError: from django.db.models.fields.related import SingleRelatedObjectDescriptor as ReverseOneToO...
samuelclay/NewsBlur
utils/fields.py
Python
mit
2,090
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
adviti/melange
thirdparty/google_appengine/google/appengine/ext/admin/__init__.py
Python
apache-2.0
63,419
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, absolute_import import sys, traceback from pyparsing import * HEADER = """ #EXECUTION: python code_example.py config from __future__ import print_function, absolute_import import sys, os, time, traceback sys.path.insert(0, os.path.jo...
ibarbech/learnbot
learnbot_dsl/learnbotCode/Parser.py
Python
gpl-3.0
21,447
# Copyright 2018 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/data/experimental/benchmarks/autotune_benchmark.py
Python
apache-2.0
11,770
""" Weld: A Gmail XMPP Gateway Copyright (C) 2010 Lance Stout This file is part of Weld. See the file LICENSE for copying permission. """ import logging import sleekxmpp from sleekxmpp.componentxmpp import ComponentXMPP from sleekxmpp.xmlstream import XMLStream from weld import GmailClient log = l...
legastero/Weld
weld/transport.py
Python
mit
4,570
import bpy from ... base_types.node import AnimationNode class IntersectLineLineNode(bpy.types.Node, AnimationNode): bl_idname = "an_IntersectLineLineNode" bl_label = "Intersect Line Line" bl_width_default = 160 searchTags = ["Closest Points on 2 Lines"] def create(self): self.newInput("Ve...
Thortoise/Super-Snake
Blender/animation_nodes-master/nodes/geometry/intersect_line_line.py
Python
gpl-3.0
1,545
from django import template from django.conf import settings from django.shortcuts import get_object_or_404, render_to_response from django.contrib.auth.decorators import login_required, permission_required from utils import next_redirect, confirmation_view from django.core.paginator import Paginator, InvalidPage from ...
sanjuro/RCJK
vendor/django/contrib/comments/views/moderation.py
Python
apache-2.0
6,664
# Copyright (C) 2010-2014 CEA/DEN, EDF R&D # # 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. # # This library ...
FedoraScientific/salome-paravis
test/VisuPrs/ScalarMap/F9.py
Python
lgpl-2.1
1,530
""" Support for monitoring OctoPrint sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.octoprint/ """ import logging import requests import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.co...
ewandor/home-assistant
homeassistant/components/sensor/octoprint.py
Python
apache-2.0
4,808
"""This test case provides support for checking forking and wait behavior. To test different wait behavior, override the wait_impl method. We want fork1() semantics -- only the forking thread survives in the child after a fork(). On some systems (e.g. Solaris without posix threads) we find that all active threads su...
firmlyjin/brython
www/tests/unittests/test/fork_wait.py
Python
bsd-3-clause
2,152
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
davidcusatis/horizon
openstack_dashboard/dashboards/admin/flavors/views.py
Python
apache-2.0
3,395
import quex.engine.state_machine.algorithm.nfa_to_dfa as nfa_to_dfa import quex.engine.state_machine.algorithm.hopcroft_minimization as hopcroft def do(SM): result = nfa_to_dfa.do(SM) hopcroft.do(result, CreateNewStateMachineF=False) return result
coderjames/pascal
quex-0.63.1/quex/engine/state_machine/algorithm/beautifier.py
Python
bsd-2-clause
272
# test asynchat -- requires threading import thread # If this fails, we can't test this module import asyncore, asynchat, socket, threading, time import unittest import sys from test import test_support HOST = test_support.HOST SERVER_QUIT = 'QUIT\n' class echo_server(threading.Thread): # parameter to determine ...
leighpauls/k2cro4
third_party/python_26/Lib/test/test_asynchat.py
Python
bsd-3-clause
8,226
# Copyright 2014 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
jonparrott/google-cloud-python
core/tests/unit/test_exceptions.py
Python
apache-2.0
4,012
from twisted.trial.unittest import TestCase from txjsonrpc.jsonrpclib import ( Fault, VERSION_PRE1, VERSION_1, VERSION_2, dumps, loads) class DumpTestCase(TestCase): def test_noVersion(self): object = {"some": "data"} result = dumps(object) self.assertEquals(result, '{"some": "data"}...
grwl/sslcaudit
test/old/txjsonrpc/txjsonrpc/test/test_jsonrpclib.py
Python
gpl-3.0
2,473
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('carts', '0006_auto_20150930_1739'), ('carts', '0005_auto_20151022_2158'), ] operations = [ ]
abhijitbangera/ecommerce
src/carts/migrations/0007_merge.py
Python
mit
293
#import libraries import picamera from time import sleep from PIL import Image #set up the camera camera = picamera.PiCamera() try: #capture at maximum resolution (~5MP) camera.resolution = (1280, 720) camera.framerate = 60 camera.vflip = True camera.hflip = True camera.start_preview() #allow camera to AWB ...
SecretImbecile/McrRaspJam
004_Picamera_Pythonimaging/3-gradients/2_vertical.py
Python
cc0-1.0
940
class baseklass(object): @staticmethod def sayhello(): print "baseklass says hello" class klass(baseklass): pass if __name__ == '__main__': k = klass() k.sayhello() klass.sayhello() baseklass.sayhello()
buchuki/pyjaco
tests/modules/modules/klasses.py
Python
mit
246
import asynctest import bot # noqa: F401 from datetime import datetime from asynctest.mock import MagicMock, Mock, patch import tests.unittest.asynctest_fix # noqa: F401 from bot.data import Channel from bot.twitchmessage import IrcMessageTags from lib.cache import CacheStore from lib.data import ChatCommandArgs ...
MeGotsThis/BotGotsThis
tests/unittest/base_channel.py
Python
gpl-3.0
2,081
# -*- coding: utf-8 -*- # # Financial Independence Application documentation build configuration file, created by # sphinx-quickstart. # # 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 ...
omomo/financial-independence-app
docs/conf.py
Python
bsd-3-clause
7,918
# -*- coding: utf-8 -*- """ The certitude public API. This module exposes only the platform-specific parts of certitude. """ from .api import validate_cert_chain __all__ = ['validate_cert_chain']
python-hyper/certitude
src/certitude/__init__.py
Python
mit
198
# Copyright 2018 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...
jart/tensorflow
tensorflow/contrib/tensorrt/test/biasadd_matmul_test.py
Python
apache-2.0
4,393
# Generated by Django 2.2.13 on 2021-03-06 00:49 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('suncreative', '0007_postrecord_state'), ] operations = [ migrations.CreateModel( name='MediaFo...
ZhangDubhe/Tropical-Cyclone-Information-System
TyphoonApi/suncreative/migrations/0008_auto_20210306_0049.py
Python
mit
891
""" Defines serializers used by the Team API. """ from copy import deepcopy from django.conf import settings from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django_countries import countries from rest_framework import serializers from lms.djangoapps.teams.api imp...
edx/edx-platform
lms/djangoapps/teams/serializers.py
Python
agpl-3.0
8,054
def install(job): """Configure recurring actions""" service = job.service snapshot_action = service.model.actions['snapshot'] snapshot_action.period = j.data.types.duration.convertToSeconds(service.model.data.snapshotInterval) snapshot_action.log = True snapshot_action.lastRun = 0 snapsho...
Jumpscale/ays_jumpscale8
templates/ovc/autosnapshotting/actions.py
Python
apache-2.0
2,796
#/bin/python # -*- coding: utf-8 -*- __author__ = 'Gerrit Giehl <gerrit.giehl@email-versand.net>' __contact__ = 'gerrit.giehl@email-versand.net' __date__ = '09 Mai 2015' from db import SAEnginePlugin, SATool from controllers.basehandler import BaseHandler from controllers.drinks import Drinks from controlle...
r4mp/mete_python_cherrypy_jinja2
mete/app.py
Python
agpl-3.0
2,257
import os import json import csv import shutil from subprocess import call import pandas import operator import re import sys from dartqc.DartModules import RedundancyModule from dartqc.DartUtils import stamp class DartFileValidator: """ Class for validating data in the input files before pre-processing bu...
esteinig/dartQC
dartqc/DartFileValidation.py
Python
gpl-3.0
11,221
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-06-07 13:13 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('dictionary', '0021_auto_20180328_1407'), ] operation...
Signbank/NGT-signbank
signbank/dictionary/migrations/0022_auto_20180607_1513.py
Python
bsd-3-clause
1,374
import goatd driver = goatd.Driver() driver.some_hardware = {} @driver.heading def heading(): some invalid syntax return 2.43
goatd/goatd
goatd/tests/bad_driver.py
Python
lgpl-3.0
136
#!/usr/bin/env python # Copyright Contributors to the Open Shading Language project. # SPDX-License-Identifier: BSD-3-Clause # https://github.com/AcademySoftwareFoundation/OpenShadingLanguage command = oslc("../common/shaders/testpnoise.osl") command += testshade("-g 512 512 -od uint8 -o Cout out.tif -param noisename...
imageworks/OpenShadingLanguage
testsuite/pnoise-perlin/run.py
Python
bsd-3-clause
521
#!/usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, 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...
MangoMangoDevelopment/neptune
lib/ros_comm-1.12.0/test/test_rosbag/bag_migration_tests/scripts/generate_data_1.py
Python
bsd-3-clause
3,888
from re import match from cambouis.irc import IRC from cambouis.twitter import firehose from spool import coroutine, select CHANNEL = '#channel' @coroutine def irc(irc): chan = coroutine.self() for event in irc.stream(): chan.put(event) @coroutine def twitter(): chan = coroutine.self() for tw...
tOkeshu/cambouis
cambouis/bot.py
Python
gpl-3.0
1,775
import sys import json import pprint import argparse from flask import Flask, make_response, render_template, jsonify, send_from_directory from flask.ext.sqlalchemy import SQLAlchemy from birdy.twitter import AppClient from models import Source, Mention, Base from twitter import get_twitter_mentions app = Flask(__na...
TobiasMR/donna-alert
DonnaAlert.py
Python
mit
1,529
# -*- coding: utf-8 -*- from test_ella.cases import RedisTestCase as TestCase from nose import tools from django import template from django.template import Context from test_ella.test_core import create_basic_categories from ella.core.models import Category from ella.positions.models import Position from ella.pos...
WhiskeyMedia/ella
test_ella/test_positions/test_templatetags.py
Python
bsd-3-clause
7,162
from foam.sfa.util.xrn import urn_to_hrn from foam.sfa.util.method import Method from foam.sfa.util.foam.sfa.ablesRuntime import run_foam.sfa.ables from foam.sfa.trust.credential import Credential from foam.sfa.util.parameter import Parameter, Mixed class GetTicket(Method): """ Retrieve a ticket. This operat...
dana-i2cat/felix
ofam/src/src/foam/sfa/methods/GetTicket.py
Python
apache-2.0
2,287
""" Django settings for corponovo project. Generated by 'django-admin startproject' using Django 1.11.5. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import ...
hhalmeida/corponovo
corponovo/settings.py
Python
mit
3,847
from django.http import HttpResponseNotFound, HttpResponseServerError def test_404(request, *args, **kwargs): return HttpResponseNotFound() def test_500(request, *args, **kwargs): return HttpResponseServerError()
mlavin/django-selectable
selectable/tests/views.py
Python
bsd-2-clause
225
"""Test parameters description""" import pytest from ocelot import * """lattice elements description""" # drifts d_13 = Drift(l=0.182428, eid='D_13') d_14 = Drift(l=5.1e-05, eid='D_14') cbl_73_i1 = Drift(l=0.0, eid='CBL.73.I1') d_15 = Drift(l=0.135, eid='D_15') d_16 = Drift(l=0.239432, eid='D_16') d_17 = Drift(l=...
ocelot-collab/ocelot
unit_tests/ebeam_test/linac_orb_correct/linac_orb_correct_conf.py
Python
gpl-3.0
8,770
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "debug_server.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
bungoume/debug-server
debug_server/manage.py
Python
mit
255
from setuptools import setup, find_packages setup( name = 'ScheduleManager', packages = find_packages(), )
ilovepi/NCD
scripts/setup.py
Python
mit
118
# -*- coding: utf-8 -*- """Tenant module.""" from cloudify_graphql.loader import Loader class TenantLoader(Loader): """Tenant loader.""" ENDPOINT = 'tenants' @property def model_cls(self): from cloudify_graphql.model.tenant import Tenant return Tenant
jcollado/cloudify-graphql
cloudify_graphql/loader/tenant.py
Python
mit
291
# Copyright 2012, Nachi Ueno, NTT MCL, 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 # # Unles...
barnsnake351/neutron
neutron/tests/unit/agent/linux/test_iptables_firewall.py
Python
apache-2.0
79,962
def extractChauffeurTranslations(item): """ 'Chauffeur Translations' """ vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol or frag) or 'preview' in item['title'].lower(): return None tagmap = { 'Hyaku ma no Shu' : 'Hyaku ma no Shu'...
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractChauffeurTranslations.py
Python
bsd-3-clause
475
import ipywidgets as widgets from traitlets import Unicode @widgets.register class HelloWorld(widgets.DOMWidget): """An example widget.""" _view_name = Unicode('HelloView').tag(sync=True) _model_name = Unicode('HelloModel').tag(sync=True) _view_module = Unicode('jupyter_scisheets_widget').tag(sync=True...
ScienceStacks/jupyter_scisheets_widget
jupyter_scisheets_widget/example.py
Python
bsd-3-clause
565
#!/usr/bin/env python # Loops all js includes in index.html except for jquery and the bundle # itself and combine all files into bundle.js. # # No minify etc. just plain merging into a single file. import os import re bundle = open('www/js/bundle.js', 'w') for index_line in open('www/index.html'): src = re.search(...
Leffe108/Intelligent-Homes
build_js_bundle.py
Python
gpl-2.0
676
from datetime import datetime, timedelta, date import os from lxml import html from dateutil.rrule import DAILY, rrule from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from se...
Andr3iC/juriscraper
opinions/united_states_backscrapers/federal_appellate/ca5.py
Python
bsd-2-clause
8,448
#!/usr/bin/env python # encoding: utf-8 import cPickle as pkl import hickle as hkl import numpy as np from sklearn.cross_validation import StratifiedKFold POS_OP = './data/ubiquitous_positive.op' NEG_OP = './data/ubiquitous_negative.op' POS_PKL = './data/ubiquitous_positive.pkl' NEG_PKL = './data/ubiquitous_negative....
minxueric/DeepEnhancer
refine.py
Python
gpl-3.0
2,510
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() readme = open('README.rst').read() history = open('HISTORY.rst...
onjin/ejpiaj
setup.py
Python
bsd-3-clause
1,413
# -*- coding: utf-8 -*- from django import forms class SearchForm(forms.Form): query = forms.CharField(required=False)
estebistec/django-get-forms
examples/demo/demo/forms.py
Python
bsd-3-clause
127
#!/usr/bin/env python """ Run all mininet.examples tests -v : verbose output -quick : skip tests that take more than ~30 seconds """ import unittest import os import sys from mininet.util import ensureRoot from mininet.clean import cleanup class MininetTestResult( unittest.TextTestResult ): def addFailure( sel...
nwiizo/workspace_2017
environmental/mininet/examples/runner.py
Python
mit
1,325
# -*- coding: utf-8 -*- ################################################################################################## import urllib from ntpath import dirname from datetime import datetime import xbmc import xbmcgui import xbmcvfs import api import artwork import clientinfo import downloadutils ...
sloshedpuppie/LetsGoRetro
addons/plugin.video.emby-master/resources/lib/itemtypes.py
Python
gpl-2.0
95,407
from particle.ParticleFactory import ParticleFactory from config.Config import config from data.DataLoader import DataLoader import time import bisect # get sample data loader = DataLoader() data = loader.read(config.data['datafile']['test'][1]) # init particle factory pFactory = ParticleFactory(100, [config.data[...
icymorn/magnetic-info-process
testParticle.py
Python
mit
830
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsCheckableComboBox .. 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 version 2 of the License, or (at your option) any later version. "...
PeterPetrik/QGIS
tests/src/python/test_qgscheckablecombobox.py
Python
gpl-2.0
1,824
# -*- coding: utf-8 -*- ############################################################################### # # RefundTransaction # Issue a refund to a PayPal buyer by specifying a transaction ID. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "Lic...
jordanemedlock/psychtruths
temboo/core/Library/PayPal/Merchant/RefundTransaction.py
Python
apache-2.0
5,862
# 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 # d...
srajag/nova
nova/tests/conductor/tasks/test_live_migrate.py
Python
apache-2.0
17,526
from picraftzero.log import logger import os.path import threading # Pytohn 2 / 3 HTTP and Socket compatibility try: from SimpleHTTPServer import SimpleHTTPRequestHandler # Python 2 except ImportError: from http.server import SimpleHTTPRequestHandler # Python 3 try: from SocketServer import TCPServer # Py...
WayneKeenan/picraftzero
picraftzero/servers.py
Python
mit
5,804
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 from rapidsms.conf import settings from rapidsms.contrib.handlers.handlers.keyword import KeywordHandler class LanguageHandler(KeywordHandler): """ Allow remote users to set their preferred language, by updating the ``language`` field of the Contact ass...
ehealthafrica-ci/rapidsms
rapidsms/contrib/registration/handlers/language.py
Python
bsd-3-clause
1,222
#!/usr/bin/python # -*- coding: utf-8 -*- # -*- encoding: utf-8 -*- # ###################################################################### # # odoo-italia-bot: #odoo-it IRC BOT # # Copyright 2014 Francesco OpenCode Apruzzese <cescoap@gmail.com> # # This program is free software; you can redistribute it and/or modi...
OpenCode/odoo-italia-bot-irc
lib/__init__.py
Python
gpl-3.0
1,090
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def flatten(self, root): """ :type root: TreeNode :rtype: void Do not return anything, modify roo...
tedye/leetcode
Python/leetcode.114.flatten-binary-tree-to-linked-list.py
Python
mit
899
import argparse import os import sys import cdblib class CDBMaker(object): def __init__(self, parsed_args, **kwargs): # Read binary data from stdin and write errors to stderr (by default) self.stdin = kwargs.get('stdin', sys.stdin.buffer) self.stderr = kwargs.get('stderr', sys.stderr) ...
pombredanne/python-pure-cdb
cdblib/cdbmake.py
Python
mit
4,000
from Quartz import * import Utilities import UIHandling import Images import ImageMasking import BitmapContext import EPSPrinting import CoordinateSystem import PathDrawing import ColorAndGState import QuartzTextDrawing import PatternDrawing import ShadowsAndTransparencyLayers import Shadings import DrawingBasics # ...
albertz/music-player
mac/pyobjc-framework-Quartz/Examples/Programming with Quartz/BasicDrawing/AppDrawing.py
Python
bsd-2-clause
12,769
#!/usr/bin/env python import re def munge_field(arg): """ Take a naming field and remove extra white spaces. """ if arg: res = re.sub(r'\s+', r' ', arg).strip() else: res = '' return res def remove_duplicates(l): my_set = set() res = [] for e in l: if e n...
vtrubets/orcid_author_list
src/utilities.py
Python
mit
451
from __future__ import print_function,division from builtins import range from six import iteritems from .klampt.glprogram import GLProgram from .klampt import vectorops,so2,gldraw from .spaces import metric from .planners import allplanners from .planners.kinodynamicplanner import EST from .planners.optimiza...
krishauser/pyOptimalMotionPlanning
pomp/visualizer.py
Python
apache-2.0
7,997
# -*- coding: utf-8 -*- from webservices_flags import * METODO_WS = { WS_NFE_ENVIO_LOTE: { u'webservice': u'NfeRecepcao2', u'metodo' : u'nfeRecepcaoLote2', }, WS_NFE_CONSULTA_RECIBO: { u'webservice': u'NfeRetRecepcao2', u'metodo' : u'nfeRetRecepcao2', }, WS_N...
annacarol/Recursos-NFE-em-Python
nfe/pysped/nfe/webservices_2.py
Python
lgpl-2.1
32,467
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "boot.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that the ...
micbuz/project2
boot/manage.py
Python
apache-2.0
802
#!/usr/bin/python3 # import concurrent.futures import os # produce an imp file def calcuImp(mods, edges, index): # med results filedir = './{}_{}/'.format(mods, edges) filename = 'workflow_{}_{}_{}.txt'.format(mods, edges, index) filename = os.path.join(filedir,filename) results = open(filename, '...
lxylinki/medCC
src/main/resources/output/evalresults2014/calcuImp.py
Python
gpl-3.0
1,644
# -*- coding:utf-8 -*- from odoo.exceptions import UserError from odoo.addons.account.tests.common import AccountTestInvoicingCommon class TestSwissQRCode(AccountTestInvoicingCommon): """ Tests the generation of Swiss QR-codes on invoices """ @classmethod def setUpClass(cls, chart_template_ref='l10n...
ddico/odoo
addons/l10n_ch/tests/test_ch_qr_code.py
Python
agpl-3.0
3,332
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
scheib/chromium
third_party/protobuf/python/google/protobuf/internal/python_message.py
Python
bsd-3-clause
58,404
from blitzdb.queryset import QuerySet as BaseQuerySet from functools import wraps class QuerySet(BaseQuerySet): """ """ def __init__(self, backend, cls, cursor, raw=False, only=None): super(QuerySet, self).__init__(backend, cls) self._cursor = cursor self._raw = raw self....
programmdesign/blitzdb
blitzdb/backends/mongo/queryset.py
Python
mit
3,293
#SRTmerge Copyright 2013 (c) Ariel Nemtzov #pysrt Copyright (c) Jean Boussier #This program is free software: you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation, either version 3 of the License, or #(at your option) any later versi...
RELnemtzov/SRTmerge
srtmerge.py
Python
gpl-3.0
6,122
import sys import __builtin__ def print_doc(out, obj, meth): if meth == '__doc__': doc = getattr(obj, meth) bdname = '%s_doc' % obj.__name__ else: if meth == '__abstractmethods__': # getattr(type,'__abstractmethods__') would fail doc = "" else: ...
alvin319/CarnotKE
jyhton/Misc/make_pydocs.py
Python
apache-2.0
1,594
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [] test_r...
mariocesar/django-tricks
setup.py
Python
isc
1,367
#!/usr/bin/python # # 3/4/08 TARP # Attempting to disintegrate archival process from builder.py # # 3/7/08 # Completed disintegration of archive and archive index page, using # pickle to store archive data between runs. Pulling out result.py from # this as well as in builder.py # # import os import sys import shutil ...
bigswitch/snac-nox
src/scripts/buildtest/archive.py
Python
gpl-3.0
9,088
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'acq4/modules/MultiPatch/pipetteTemplate.ui' # # Created by: PyQt5 UI code generator 5.8.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_PipetteControl(object): def setupUi(...
pbmanis/acq4
acq4/modules/MultiPatch/pipetteTemplate_pyqt5.py
Python
mit
6,472
"""moviealert URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
iAmMrinal0/django_moviealert
moviealert/urls.py
Python
mit
1,192
#!/usr/bin/env python """ generate synthetic ACFs for turbulent plasma scenarios """ from numpy import exp, arange, pi, sqrt from matplotlib.pyplot import figure, show f0 = [-5, 5] f = arange(-10, 10, 0.1) def gaussian(x, x0=0, mu=0, sig=1): return 1 / (sig * sqrt(2 * pi)) * exp(-(((x - x0) - mu) ** 2.0) / (2 *...
scienceopen/isrutils
FakeACF.py
Python
gpl-3.0
600
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015 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/editor/bundles.py
Python
gpl-2.0
1,559
""" This file contains celery tasks for contentstore views """ from celery.task import task from django.contrib.auth.models import User from xmodule.modulestore.django import modulestore from course_action_state.models import CourseRerunState from contentstore.utils import initialize_permissions @task() def rerun_co...
TangXT/edx-platform
cms/djangoapps/contentstore/views/tasks.py
Python
agpl-3.0
1,213
"""LibShelf URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-b...
p4telj/LibShelf
LibShelf/urls.py
Python
gpl-3.0
973
# 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...
drpngx/tensorflow
tensorflow/python/keras/initializers_test.py
Python
apache-2.0
6,104
import pandas as pd import numpy as np import matplotlib.pyplot as plt from scipy.optimize import curve_fit def poly_fit(x,y,deg): #POLYNOMIAL FIT # calculate polynomial z = np.polyfit(x, y, deg) f = np.poly1d(z) # calculate new x's and y's x_new = np.linspace(np.amin(x), np.amax(x), 50) y...
sujithvm/internationality-journals
src/RIP_SNIP_curve.py
Python
mit
3,153
"""Farcy class test file.""" from __future__ import print_function from collections import namedtuple from datetime import datetime from farcy import (Config, FARCY_COMMENT_START, Farcy, FarcyException, UTC, main, no_handler_debug_factory) from mock import MagicMock, call, patch from github3.excepti...
appfolio/farcy
test/test_farcy.py
Python
bsd-2-clause
24,069