text
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
231
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
score
float64
0
0.34
from aiohttp import ClientSession from aiowing import settings async def test_unauthenticated_records(test_app, test_client): cli = await test_client(test_app) resp = await cli.get(test_app.router['admin_records'].url(), allow_redirects=False) assert resp.headers.get('Location') ...
embali/aiowing
aiowing/apps/admin/tests/test_admin.py
Python
mit
2,851
0
#!/usr/bin/env python3 # Convert MMGen 'v2' transaction file (amounts as BTCAmt()) # to MMGen 'v3' (amounts as strings) # v3 tx files were introduced with MMGen version 0.9.7 import sys,os repo_root = os.path.split(os.path.abspath(os.path.dirname(sys.argv[0])))[0] sys.path = [repo_root] + sys.path from mmgen.common i...
mmgen/mmgen
scripts/tx-v2-to-v3.py
Python
gpl-3.0
962
0.015593
# vim: set fileencoding: utf-8 -*- # -*- coding: utf-8 -*- import visa from itertools import cycle, starmap, compress import pandas as pd import numpy as np from collections import OrderedDict from .force import * from .force import ( DCForce, StaircaseSweep, ...
wojcech/agilentpyvisa
agilentpyvisa/B1500/tester.py
Python
agpl-3.0
39,893
0.008623
# Copyright (C) 2013-2015 MetaMorph Software, Inc # Permission is hereby granted, free of charge, to any person obtaining a # copy of this data, including any software or models in source or binary # form, as well as any drawings, specifications, and documentation # (collectively "the Data"), to deal in the Data ...
pombredanne/metamorphosys-desktop
metamorphosys/META/src/Python27Packages/py_modelica/py_modelica/modelica_simulation_tools/tool_base.py
Python
mit
12,494
0.002401
# Copyright (C) 2012,2013 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms of the G...
espressopp/espressopp
src/interaction/StillingerWeberTripleTerm.py
Python
gpl-3.0
8,110
0.006289
import asyncio import logging import sys import re from abc import ABC, abstractmethod from typing import List, Optional, Union from discord.utils import find from errbot.backends.base import ( Person, Message, Room, RoomOccupant, Presence, ONLINE, OFFLINE, AWAY, DND, RoomError...
gbin/err-backend-discord
discordb.py
Python
gpl-3.0
24,430
0.00176
#!/usr/bin/env python import logging import unittest import os import environment import utils import tablet shard_0_master = tablet.Tablet() shard_0_replica1 = tablet.Tablet() shard_0_replica2 = tablet.Tablet() shard_0_rdonly = tablet.Tablet() shard_0_backup = tablet.Tablet() shard_1_master = tablet.Tablet() shard_...
SDHM/vitess
test/schema.py
Python
bsd-3-clause
9,880
0.008502
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/mission/quest_item/shared_slooni_jong_q1_needed.iff" result.attribu...
anhstudios/swganh
data/scripts/templates/object/tangible/mission/quest_item/shared_slooni_jong_q1_needed.py
Python
mit
477
0.046122
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Fri Mar 10 11:34:46 2017 @author: maryam """ import nltk import numpy as np import sys from nltk.corpus import stopwords from sklearn.decomposition import TruncatedSVD np.seterr(divide='ignore', invalid='ignore') #reload(sys) #sys.setdefaultencoding("utf-8...
openeventdata/Focus_Locality_Extraction
Focus_Locality/Sentence_Embedding_Approach/Testing/SIFpreprocessing_test.py
Python
mit
5,830
0.014923
__author__ = 'moskupols' __all__ = ['Statistics', 'BlackList', 'console_statistic'] from .statistics import * from . import console_statistic
hatbot-team/hatbot
statistics/__init__.py
Python
mit
144
0
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
blomquisg/heat
heat/common/utils.py
Python
apache-2.0
10,575
0.000851
from sys import stdout import argparse import json import logging from .phuey import Bridge, Light logger = logging.getLogger() def command_interpreter(command): python_dict = {} commands = command.split(',') for c in commands: k, v = c.split('=') if v.lower() == "true":...
pancho-villa/Phuey
phuey/light_cli.py
Python
mit
1,447
0.002764
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """ Unit tests for the :meth:`iris.experimental.ugrid.mesh.Mesh.from_coords`. """ # Import iris.tests first so that some thing...
SciTools/iris
lib/iris/tests/unit/experimental/ugrid/mesh/test_Mesh__from_coords.py
Python
lgpl-3.0
9,316
0.000107
import win32security,win32file,win32api,ntsecuritycon,win32con policy_handle = win32security.GetPolicyHandle('rupole',win32security.POLICY_ALL_ACCESS) ## mod_nbr, mod_time = win32security.LsaQueryInformationPolicy(policy_handle,win32security.PolicyModificationInformation) ## print mod_nbr, mod_time domain_name,dns_do...
JulienMcJay/eclock
windows/Python27/Lib/site-packages/pywin32-218-py2.7-win32.egg/Demos/security/get_policy_info.py
Python
gpl-2.0
1,166
0.023156
# -*- mode: Python; coding: utf-8 -*- """For the purposes of classification, a corpus is defined as a collection of labeled documents. Such documents might actually represent words, images, etc.; to the classifier they are merely instances with features.""" from abc import ABCMeta, abstractmethod from csv import read...
kahliloppenheimer/Naive-Bayes-Classifier
corpus.py
Python
mit
3,727
0.00161
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # 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 #...
MostlyOpen/odoo_addons
myo_summary/models/annotation.py
Python
agpl-3.0
1,419
0
"""Implementation of treadmill admin ldap CLI cell plugin. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import io import click from ldap3.core import exceptions as ldap_exceptions from treadmill import admin ...
bretttegart/treadmill
lib/python/treadmill/cli/admin/ldap/cell.py
Python
apache-2.0
6,420
0
#!/usr/bin/env python #coding: utf-8 # Definition for a binary tree node class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: # @param root, a tree node # @return a list of integers def postorderTraversal(self, root): p...
wh-acmer/minixalpha-acm
LeetCode/Python/binary_tree_postorder_traversal_iter.py
Python
mit
324
0.006173
''' VERIDIC - Towards a centralized access control system Copyright (C) 2011 Mikael Ates 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 version 3 of the Licen...
BryceLohr/authentic
authentic2/attribute_aggregator/user_profile.py
Python
agpl-3.0
4,952
0.002827
#!/usr/bin/env python import warnings as _warnings _warnings.resetwarnings() _warnings.filterwarnings('error') # BEGIN INCLUDE import tempfile from tdi import html file_1 = tempfile.NamedTemporaryFile() try: file_2 = tempfile.NamedTemporaryFile() try: file_1.write("""<html lang="en"><body tdi:overlay=...
ndparker/tdi
docs/examples/loading2.py
Python
apache-2.0
623
0.004815
# -*- coding: utf-8 -*- # YAFF is yet another force-field code. # Copyright (C) 2011 Toon Verstraelen <Toon.Verstraelen@UGent.be>, # Louis Vanduyfhuys <Louis.Vanduyfhuys@UGent.be>, Center for Molecular Modeling # (CMM), Ghent University, Ghent, Belgium; all rights reserved unless otherwise # stated. # # This file is pa...
molmod/yaff
yaff/sampling/test/test_harmonic.py
Python
gpl-3.0
4,266
0.000469
# Copyright (C) 2013 Matthew C. Zwier and Lillian T. Chong # # This file is part of WESTPA. # # WESTPA 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...
nrego/westpa
src/oldtools/aframe/data_reader.py
Python
gpl-3.0
22,795
0.011099
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
alistairlow/tensorflow
tensorflow/contrib/distributions/python/ops/bijectors/weibull_impl.py
Python
apache-2.0
5,615
0.003384
from test_HMM import *
becxer/pytrain
test_pytrain/test_HMM/__init__.py
Python
mit
23
0
from django.conf.urls.defaults import patterns, url, include from . import views urlpatterns = patterns( '', url(r'^browserid/mozilla/$', views.mozilla_browserid_verify, name='mozilla_browserid_verify'), url(r'^browserid/$', include('django_browserid.urls')), url(r'^logout/$', 'django.contrib.a...
AdrianGaudebert/socorro-crashstats
crashstats/auth/urls.py
Python
mpl-2.0
385
0
# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- from __future__ import absolute_import class UIException(Exception): pass class ServiceError(Exception): pass class NoRequestedProtocols(UIException): """ This excpetion is thrown when the service provides strea...
qnorsten/svtplay-dl
lib/svtplay_dl/error.py
Python
mit
1,137
0.002639
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. import pytest from shuup import configuration from shuup.api.admi...
suutari-ai/shoop
shuup_tests/api/test_admin.py
Python
agpl-3.0
1,366
0.000732
zhangyu
RobbieRain/he
test.py
Python
apache-2.0
7
0.142857
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import unittest from pants.option.option_value_container import OptionValueContainerBuilder from pants.option.ranked_value import Rank, RankedValue class OptionValueContainerTest(unitte...
benjyw/pants
src/python/pants/option/option_value_container_test.py
Python
apache-2.0
3,316
0.000905
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. from libmozdata import utils as lmdutils from auto_nag import utils from auto_nag.bzcleaner import BzCleaner from auto_...
mozilla/relman-auto-nag
auto_nag/scripts/workflow/p1_no_assignee.py
Python
bsd-3-clause
3,281
0.00061
# Copyright (c) 2010-2012 OpenStack, 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 ...
VictorLowther/swift
swift/common/direct_client.py
Python
apache-2.0
18,186
0.001045
#local urls.py file from django.conf.urls import url, include from . import views urlpatterns = [ #url(r'^', views.appView.postLocation, name = 'postLocation'), url(r'^volunteer/', views.appView.member, name = 'member'), #url(r'^(?P<member_id>[0-9]+)/$', views.appView.detail, name = 'd...
Fazer56/Assignment3
charitysite/volunteer/urls.py
Python
mit
352
0.028409
import agents as ag def HW2Agent() -> object: "An agent that keeps track of what locations are clean or dirty." oldPercepts = [('None', 'Clean')] oldActions = ['NoOp'] actionScores = [{ 'Right': 0, 'Left': 0, 'Up': -1, 'Down': -1, 'NoOp': -100, }] level ...
WhittKinley/aima-python
submissions/Sery/vacuum2.py
Python
mit
1,432
0.002095
import qhsm from qhsm import QSignals, QEvent # generated by PythonGenerator version 0.1 class TestSample1(qhsm.QHsm): def initialiseStateMachine(self): self.initialiseState(self.s_StateX) def s_StateX(self, ev): if ev.QSignal == QSignals.Entry: self.enterStateX() elif e...
poobalan-arumugam/stateproto
src/extensions/lang/python/qhsm/testsamplehsm1.py
Python
bsd-2-clause
1,506
0.003984
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2012 Google Inc. All Rights Reserved. """Basic rdfvalue tests.""" import time from grr.lib import rdfvalue from grr.lib.rdfvalues import test_base class RDFBytesTest(test_base.RDFValueTestCase): rdfvalue_class = rdfvalue.RDFBytes def GenerateSample(se...
spnow/grr
lib/rdfvalues/basic_test.py
Python
apache-2.0
6,320
0.005697
# Copyright 2019 Intel, 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 a...
openstack/nomad
cyborg/objects/attach_handle.py
Python
apache-2.0
3,799
0
# 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 import shu...
sameerparekh/pants
src/python/pants/util/fileutil.py
Python
apache-2.0
961
0.006243
# 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_06_01/aio/operations/_ddos_protection_plans_operations.py
Python
mit
30,431
0.005159
"""empty message Revision ID: 74af9cceeeaf Revises: 6e7b88dc4544 Create Date: 2017-07-30 20:47:07.982489 """ # revision identifiers, used by Alembic. revision = '74af9cceeeaf' down_revision = '6e7b88dc4544' from alembic import op import sqlalchemy as sa def upgrade(): # ### commands auto generated by Alembic ...
Tethik/faktura
migrations/versions/74af9cceeeaf_.py
Python
mit
634
0.004732
__author__ = "Christo Robison" import numpy as np from scipy import signal from scipy import misc import h5py from PIL import Image import os import collections import matplotlib.pyplot as plt import convertBsqMulti as bsq import png '''This program reads in BSQ datacubes into an HDF file''' def loadBSQ(path = '/ho...
Crobisaur/HyperSpec
Python/loadData2Hdf.py
Python
gpl-3.0
5,400
0.010741
import pygame import sys WINDOW_TITLE = "Game Of Life" # Define some colors BLACK = ( 0, 0, 0) PURPLE = ( 22, 20, 48) WHITE = (255, 255, 255) GREEN = ( 0, 255, 0) RED = (255, 0, 0) BLUE = ( 67, 66, 88) # This sets the width and height of each grid location width = 2...
adelinastanciu/game-of-life
game.py
Python
gpl-2.0
5,982
0.010532
# 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 ...
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2016_12_01/models/application_gateway_probe.py
Python
mit
3,438
0.000582
#!/usr/bin/env python """DB for Plant Detection. For Plant Detection. """ import os import json import base64 import requests import numpy as np from plant_detection import CeleryPy from plant_detection import ENV class DB(object): """Known and detected plant data for Plant Detection.""" def __init__(self):...
FBTUG/DevZone
ai/demoCamera/plant_detection/DB.py
Python
mit
16,293
0
from turtle import * mode('logo') shape('turtle') speed(5) color('red', 'blue') #draws rectangle for i in range (4): fd(200) rt(90) #draws roof penup() goto(0,200) pendown() rt(60) goto(100,300) rt(60) goto(200,200) penup() #resizes turtle and changes his fill colour shapesize(5,5) color('red', 'orange') go...
cmulliss/turtles-doing-things
stars_etc/turtleHouse.py
Python
cc0-1.0
351
0.025641
#! /usr/bin/python # -*- coding: utf-8 -*- # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following cond...
blazbratanic/protobuf
python/google/protobuf/internal/reflection_test.py
Python
bsd-3-clause
119,310
0.002984
#Embedded file name: scripts/client/WeatherManager.py import BigWorld import db.DBLogic from debug_utils import * def InitWeather(): arenaData = db.DBLogic.g_instance.getArenaData(BigWorld.player().arenaType) LOG_DEBUG("WeatherManager:InitWeather() '%s': %s, %s" % (arenaData.geometry, arenaData.weatherWindSpee...
Monstrofil/wowp_free_camera
install/scripts/client/WeatherManager.py
Python
apache-2.0
1,201
0.004163
""" Test for unwanted reference cycles """ import pyqtgraph as pg import numpy as np import gc, weakref import six import pytest app = pg.mkQApp() skipreason = ('unclear why test is failing on python 3. skipping until someone ' 'has time to fix it. Or pyside is being used. This test is ' '...
pbmanis/acq4
acq4/pyqtgraph/tests/test_ref_cycles.py
Python
mit
2,523
0.010305
# -*- coding: utf-8 -*- from PyQt4.QtCore import * from PyQt4.QtGui import * from Ui_load import Ui_Load class Loading(QDialog, Ui_Load): """ little loading screen """ def __init__(self, maximum, parent=None): """ Constructor """ QDialog.__init__(self, parent) s...
cedi4155476/musicmanager
music_manager/load.py
Python
mit
547
0.003656
#!/usr/bin/env python # # Curriculum Module Run Script # - Run once per run of the module by a user # - Run inside job submission. So in an allocation. # - onramp_run_params.cfg file is available in current working directory # import os import sys from subprocess import call from configobj import ConfigObj # # Read t...
koepked/onramp
modules/hpl/bin/onramp_run.py
Python
bsd-3-clause
653
0.003063
# Copyright 2021 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...
tensorflow/model-optimization
tensorflow_model_optimization/python/examples/clustering/keras/imdb/imdb_rnn.py
Python
apache-2.0
2,554
0.000392
"""Quick Assistant: Regex based proposals. This module combines AssistProposal, regexes and string formatting to provide a way of swiftly coding your own custom Quick Assistant proposals. These proposals are ready for instatiation and registering with assist_proposal.register_proposal(): AssignToAttributeOfSelf, As...
smkr/pyclipse
plugins/org.python.pydev.jython/jysrc/assist_regex_based_proposal.py
Python
epl-1.0
8,719
0.007455
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com timehome@corp.globo.com # Copyright (c) 2015 Wikimedia Foundation # EXIF optimizer, aims to r...
wikimedia/thumbor-exif-optimizer
wikimedia_thumbor_exif_optimizer/__init__.py
Python
mit
3,157
0
from distutils.core import setup import py2exe setup(console=[ '../src/mouseup.py', '../src/mousedown.py', '../src/mouseclick.py', '../src/mousemove.py', '../src/keyboarddown.py', '../src/keyboardkey.py', '../src/keyboardtype.py', '../src/keyboarddown.py', '../src/keyboardup.py', ])
nawarian/PHPBot
ext/pyautogui/bin/setup.py
Python
mit
320
0.003125
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging import six import sys from functools import wraps from twisted.internet import defer from twisted.trial import unittest log = lo...
Stibbons/Squirrel
backend/squirrel/common/unittest.py
Python
gpl-3.0
4,675
0.002781
################################################################## # Copyright 2018 Open Source Geospatial Foundation and others # # licensed under MIT, Please consult LICENSE.txt for details # ################################################################## from pywps import Process from pywps.inout import L...
bird-house/PyWPS
tests/processes/__init__.py
Python
mit
2,519
0.001191
# Copyright 2017, Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
googleapis/python-pubsub
google/cloud/pubsub_v1/subscriber/_protocol/leaser.py
Python
apache-2.0
9,379
0.001279
#!/usr/bin/python2.4 # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Visual Studio user preferences file writer.""" import common import os import re import socket # for gethostname import xml.dom import xm...
nawawi/wkhtmltopdf
webkit/Source/ThirdParty/gyp/pylib/gyp/MSVSUserFile.py
Python
lgpl-3.0
6,250
0.0056
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
google/jax
jax/experimental/jax2tf/examples/tf_js/quickdraw/quickdraw.py
Python
apache-2.0
6,160
0.011364
from autosar.base import splitRef from autosar.element import Element import sys class SystemSignal(Element): def __init__(self,name,dataTypeRef,initValueRef,length,desc=None,parent=None): super().__init__(name,parent) self.dataTypeRef=dataTypeRef self.initValueRef=initValueRef ...
cogu/autosar
autosar/signal.py
Python
mit
1,012
0.024704
import os from setuptools import setup # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... def read(fname): return open(os.path.join(os.path.di...
glenpp/OrviboS20
setup.py
Python
gpl-2.0
1,055
0.020853
from __future__ import unicode_literals import uuid from random import randint, random from moto.core import BaseBackend from moto.ec2 import ec2_backends from copy import copy class BaseObject(object): def camelCase(self, key): words = [] for i, word in enumerate(key.split('_')): if ...
silveregg/moto
moto/ecs/models.py
Python
apache-2.0
23,919
0.002843
""" The `~certbot_dns_nsone.dns_nsone` plugin automates the process of completing a ``dns-01`` challenge (`~acme.challenges.DNS01`) by creating, and subsequently removing, TXT records using the NS1 API. .. note:: The plugin is not installed by default. It can be installed by heading to `certbot.eff.org <https://...
letsencrypt/letsencrypt
certbot-dns-nsone/certbot_dns_nsone/__init__.py
Python
apache-2.0
3,339
0.000599
__author__ = 'anthony <>' from collections import OrderedDict from django import forms class FormOrderMixin(object): def order_fields(self, field_order): """ Rearranges the fields according to field_order. field_order is a list of field names specifying the order. Fields not inclu...
unicefuganda/uSurvey
survey/forms/form_helper.py
Python
bsd-3-clause
1,258
0.00159
""" vUSBf: A KVM/QEMU based USB-fuzzing framework. Copyright (C) 2015 Sergej Schumilo, OpenSource Security Ralf Spenneberg This file is part of vUSBf. See the file LICENSE for copying permission. """ __author__ = 'Sergej Schumilo' from scapy.all import * ##################################### #######...
schumilo/vUSBf
usbscapy.py
Python
gpl-2.0
17,727
0.011677
from django.db.models import Model, CharField, URLField from django.template.loader import get_template from django.utils.translation import ugettext as _ from wagtail.wagtailcore.models import Page from wagtail.wagtailcore import blocks from wagtail.wagtailembeds.blocks import EmbedBlock from wagtail.wagtailimages.blo...
jeremy-c/unusualbusiness
unusualbusiness/utils/models.py
Python
bsd-3-clause
7,002
0.003999
#!/usr/bin/env python # -*- coding: utf-8 -*- """ vivopump -- module of helper functions for the pump """ import sys import csv import string import random import logging __author__ = "Michael Conlon" __copyright__ = "Copyright (c) 2016 Michael Conlon" __license__ = "New BSD license" __version__ = "0.8.7" logger = l...
dofeldsc/vivo_uos
my_pump/pump/vivopump.py
Python
gpl-3.0
47,667
0.003168
class URLOpener(object): def __init__(self, x): self.x = x def urlopen(self): return file(self.x)
idea4bsd/idea4bsd
python/testData/refactoring/move/class/before/src/lib1.py
Python
apache-2.0
122
0.008197
import time import logging from typing import Callable, List, TypeVar, Text from psycopg2.extensions import cursor CursorObj = TypeVar('CursorObj', bound=cursor) from django.db import connection from zerver.models import UserProfile ''' NOTE! Be careful modifying this library, as it is used in a migration, and it...
amanharitsh123/zulip
zerver/lib/fix_unreads.py
Python
apache-2.0
6,949
0.000863
"""Test cli""" import asyncio import contextlib import io import json import sys import traceback from unittest import mock import pytest from egtaonline import __main__ as main from egtaonline import api from egtaonline import mockserver # TODO async fixtures may be possible with python 3.6, but it's not possible ...
egtaonline/egtaonline-api
test/test_eo.py
Python
apache-2.0
14,077
0.000142
def SimplenoteList(): if (float(vim.eval("a:0"))>=1): try: # check for valid date string datetime.datetime.strptime(vim.eval("a:1"), "%Y-%m-%d") interface.list_note_index_in_scratch_buffer(since=vim.eval("a:1")) except ValueError: interface.list_note_i...
mrtazz/simplenote.vim
autoload/SimplenoteList.py
Python
mit
651
0.004608
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup readme = open('README.rst').read() history = open('HISTORY.rst').read().replace('.. :changelog:', '') requirements = [ # TODO: put package requireme...
dangra/scrapy-sci
setup.py
Python
bsd-3-clause
1,322
0
# Copyright 2009-2010 10gen, 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,...
reedobrien/mongo-python-driver
pymongo/max_key.py
Python
apache-2.0
604
0
# -*- coding: utf-8 -*- # Generated by Django 1.11.10 on 2018-02-22 09:33 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('polls', '0013_auto_20180109_1302'), ] operations ...
stadtgestalten/stadtgestalten
grouprise/features/polls/migrations/0014_auto_20180222_1033.py
Python
agpl-3.0
1,195
0.001674
''' Created on 21 de oct. de 2015 @author: cgimenop ''' from xml.dom import minidom class TLCase: CODE = 0; TITLE = 1 SUMMARY = 2 IMPORTANCE = 3 PRECONDITIONS = 4 STEPS = 5 EXPECTED_RESULT = 6 EXTRA_DETAILS = 7 #UNUSED EXECUTION_TYPE = 8 E2E = 9 #UNUSED...
cgimenop/Excel2Testlink
ExcelParser/TLCase.py
Python
mit
6,315
0.012985
# -*- coding: utf-8 -*- # # diffoscope: in-depth comparison of files, archives, and directories # # Copyright © 2015 Jérémy Bobbio <lunar@debian.org> # # diffoscope 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 Foundati...
brettcs/diffoscope
tests/comparators/test_fonts.py
Python
gpl-3.0
1,851
0.002706
#!/usr/bin/env vpython3 # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Using colorama.Fore/Back/Style members # pylint: disable=no-member from __future__ import print_function import argparse import c...
ric2b/Vivaldi-browser
chromium/build/android/apk_operations.py
Python
bsd-3-clause
73,936
0.009157
__version__ = '20.0.0'
ofek/pypinfo
pypinfo/__init__.py
Python
mit
23
0
""" Test script for the Unicode implementation. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" import codecs import struct import sys import unittest import warnings from test import support, string_tests import _string # Error handling (b...
theheros/kbengine
kbe/res/scripts/common/Lib/test/test_unicode.py
Python
lgpl-3.0
71,973
0.00335
""" Course Group Configurations page. """ from .course_page import CoursePage class GroupConfigurationsPage(CoursePage): """ Course Group Configurations page. """ url_path = "group_configurations" def is_browser_on_page(self): return self.q(css='body.view-group-configurations').present ...
LICEF/edx-platform
common/test/acceptance/pages/studio/settings_group_configurations.py
Python
agpl-3.0
4,712
0.000849
# coding: utf-8 from datetime import datetime from decimal import Decimal from unittest import TestCase import httpretty from pyqiwi import QiwiError, Qiwi class QiwiErrorTestCase(TestCase): def test_error_code(self): error = QiwiError(143) self.assertEqual(error.code, 143) @httpretty.activate...
onrik/pyqiwi
tests/test_client.py
Python
mit
8,897
0.001351
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
flgiordano/netcash
+/google-cloud-sdk/lib/surface/source/repos/clone.py
Python
bsd-3-clause
3,580
0.002235
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-24 00:53 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('Menus', '0002_auto_20170824_0051'), ] operations =...
AlexHagerman/code_louisville_django
LouiePizza/Menus/migrations/0003_menuitem.py
Python
mpl-2.0
780
0.002564
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutIteration(Koan): def test_iterators_are_a_type(self): it = iter(range(1,6)) fib = 0 for num in it: fib += num self.assertEqual(__ , fib) def test_iter...
caalle/Python-koans
python 3/koans/about_iteration.py
Python
mit
4,469
0.010293
""" :created: 24.04.2018 by Jens Diemer :copyleft: 2018 by the django-cms-tools team, see AUTHORS for more details. :license: GNU GPL v3 or above, see LICENSE for more details. """ import os from django.core.management import call_command from cms.models import Page # https://github.com/jedie/django-to...
jedie/django-cms-tools
django_cms_tools_tests/test_command_list_page_by_plugin.py
Python
gpl-3.0
2,800
0.005357
#!/usr/bin/python3.3 import somnTCP import somnUDP import somnPkt import somnRouteTable from somnLib import * import struct import queue import threading import socket import time import random PING_TIMEOUT = 5 class somnData(): def __init__(self, ID, data): self.nodeID = ID self.data = data class somnMes...
squidpie/somn
src/somnMesh.py
Python
mit
23,564
0.018673
# -*- coding: utf-8 -*- import os from django.conf import settings from django.utils.encoding import smart_text from django.core.files import temp from django.core.files.base import File as DjangoFile from django.utils.http import urlquote from unittest import mock from pyquery import PyQuery from olympia import am...
psiinon/addons-server
src/olympia/versions/tests/test_views.py
Python
bsd-3-clause
19,783
0
#!/usr/bin/env python3 """ MIT License Copyright (c) 2016 Steven P. Crain, SUNY Plattsburgh 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 ...
scrain777/MassivelyUnreliableSystems
Voting/Utilities/check.py
Python
mit
2,156
0.009276
#! python from carousel.core.data_sources import DataSource, DataParameter from carousel.core.outputs import Output, OutputParameter from carousel.core.formulas import Formula, FormulaParameter from carousel.core.calculations import Calc, CalcParameter from carousel.core.simulations import Simulation, SimParameter fro...
mikofski/Carousel
examples/PythagoreanThm/pythagorean_thm.py
Python
bsd-3-clause
2,570
0
import os import xbmc import time os.system("sudo service HelgeInterface stop") time.sleep(1) xbmc.executebuiltin('XBMC.Powerdown') pass
harryberlin/BMW-RaspControl-Skin
skin.confluence-vertical/scripts/system_shutdown.py
Python
gpl-2.0
138
0
# Copyright 2013 django-htmlmin authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. from functools import wraps from htmlmin.minify import html_minify def minified_response(f): @wraps(f) def minify(*args, **kwargs): resp...
erikdejonge/django-htmlmin
htmlmin/decorators.py
Python
bsd-2-clause
837
0
__author__ = 'Chao' import numpy as np from sklearn import svm, cross_validation from sklearn.ensemble import RandomForestClassifier from sklearn.neighbors import KNeighborsClassifier activity_label = {'1': 'WALKING', '2': 'WALKING_UPSTAIRS', '3': 'WALKING_DOWNSTAIRS', ...
Sapphirine/Human-Activity-Monitoring-and-Prediction
analysis.py
Python
apache-2.0
6,718
0.004614
import sys if sys.version_info >= (3, 8): from functools import singledispatchmethod else: from functools import singledispatch, update_wrapper def singledispatchmethod(func): dispatcher = singledispatch(func) def wrapper(*args, **kw): return dispatcher.dispatch(args[1].__clas...
adamcharnock/lightbus
lightbus/utilities/singledispatch.py
Python
apache-2.0
447
0
#!/usr/bin/env python import functools import numpy as np import matplotlib.pyplot as plt import seaborn as sb import time import kmc2 from collections import namedtuple from scipy import stats from sklearn import cluster from sklearn.decomposition import TruncatedSVD from numba import jit from datasets import load_...
dblalock/dig
tests/exper_bits.py
Python
mit
34,782
0.000633
#! /usr/bin/env python # -*- coding: utf-8 -*- # Dictionary # Copyright 2008 Santhosh Thottingal <santhosh.thottingal@gmail.com> # http://www.smc.org.in # # This program 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 Softw...
santhoshtr/silpa
src/silpa/modules/dictionary/dictionary.py
Python
agpl-3.0
6,167
0.020593
""" """ # Created on 2016.08.09 # # Author: Giovanni Cannata # # Copyright 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 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 v...
Varbin/EEH
_vendor/ldap3/protocol/formatters/validators.py
Python
bsd-2-clause
5,077
0.001773
# -*- coding: utf-8 -*- """ DrQueue main module Copyright (C) 2011-2013 Andreas Schroeder This file is part of DrQueue. Licensed under GNU General Public License version 3. See LICENSE for details. """ import platform import os import sys import smtplib import json from email.mime.text import MIMEText from .client...
jedie/DrQueueIPython
DrQueue/__init__.py
Python
gpl-3.0
6,522
0.005213
#!/usr/bin/env python # -*- coding: utf-8 -*- class VM: def __init__(self, num_reg = 4): self.regs = [0 for _ in range(num_reg)] # registers self.pc = 0 # program counter self.prog = None self.reg1 = self.reg2 = self.reg3 = self.imm = None self.running = False def fetch...
NightlySide/nightlyside.github.io
cb7b5b05c87711611f4700ff52c23409/iss.py
Python
mit
3,088
0.006479
#!/usr/bin/env python # Copyright 2015 The Kubernetes Authors. # # 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 appli...
cncf/cross-cloud
validate-cluster/cluster/juju/layers/kubernetes-worker/reactive/kubernetes_worker.py
Python
apache-2.0
36,222
0.000055
from random import randint import re STARTTAG = "<start>" ENDTAG = "<end>" class MarkovChainBot: ''' A Markov Chain text generator data is a list of strings that it is trained on, ie a list of books. ''' def __init__(self, exclusion_list): ''' ''' self.data = [] self.probs = {STARTTAG: [ENDTAG]} self.trai...
lukejuusola/MarkovMimic
MarkovChainBot.py
Python
mit
1,445
0.039446
# -*- coding: utf-8 -*- import http_lazy_headers as hlh from . import utils class TransferEncodingTest(utils.FieldTestCase): field = hlh.TransferEncoding def test_raw_values(self): self.assertFieldRawEqual( ['gzip, chunked', 'foobar;bar=qux'], ((hlh.Encodings.gzip, hlh.Para...
nitely/http-lazy-headers
tests/tests_fields_/tests_transfer_encoding.py
Python
mit
2,131
0