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
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-04-21 07:08 from __future__ import unicode_literals import django.contrib.gis.db.models.fields from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True ...
geoenvo/opendims
opendims/automaticweathersystem/migrations/0001_initial.py
Python
gpl-3.0
2,669
0.005995
# -*- coding: utf-8 -*- import xbmc import xbmcgui import xbmcaddon from utilities import xbmcJsonRequest, Debug, notification, chunks, get_bool_setting __setting__ = xbmcaddon.Addon('script.myshows').getSetting __getstring__ = xbmcaddon.Addon('script.myshows').getLocalizedString add_episodes_to_myshows = get_bool...
DiMartinoX/plugin.video.kinopoisk.ru
script.myshows/episode_sync.py
Python
gpl-3.0
16,581
0.024365
from setuptools import setup, find_packages version = "6.3.0" with open("requirements.txt", "r") as f: install_requires = f.readlines() setup( name='frappe', version=version, description='Metadata driven, full-stack web framework', author='Frappe Technologies', author_email='info@frappe.io', ...
indictranstech/omnitech-frappe
setup.py
Python
mit
438
0.004566
from django.shortcuts import render, redirect from django.http import Http404 from events.forms import Event from django.views.generic import View from events.services import PlacesService from events.forms import ImageUploadForm from django.contrib import messages import uuid class ChooseImageView(View): templat...
thiagoferreiraw/mixapp
events/views/choose_image_view.py
Python
mit
1,771
0.003953
import player import pygame import menu import settings as s pygame.init() pygame.mixer.init() class Game: def __init__(self, numplayers=2, doublebull='ON', mpcalc='ROUND'): #GAME INFO self.mpcalc = mpcalc self.doublebull = doublebull self.numplayers = numplayers self.mainLoop = True self.cl...
DrewMcCarthy/dartboard
game.py
Python
apache-2.0
3,208
0.037406
# Copyright (c) 2011 - Rui Batista <ruiandrebatista@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 Software Foundation, either version 3 of the License, or # (at your option) any later vers...
ragb/sudoaudio
sudoaudio/core.py
Python
gpl-3.0
2,629
0.002282
import os import sys import imp import multiprocessing from setuptools import setup, find_packages version = imp.load_source('version', os.path.join('flask_appbuilder', 'version.py')) def fpath(name): return os.path.join(os.path.dirname(__file__), name) def read(fname): return open(fpath(fname)).read() def...
rpiotti/Flask-AppBuilder
setup.py
Python
bsd-3-clause
1,758
0.003413
from .test_antivirus import AbstractTests import modules.antivirus.avg.avg as module import modules.antivirus.base as base from mock import patch from pathlib import Path class TestAvg(AbstractTests.TestAntivirus): name = "AVG AntiVirus Free (Linux)" scan_path = Path("/usr/bin/avgscan") scan_args = ('--he...
quarkslab/irma
probe/tests/modules/antivirus/test_avg.py
Python
apache-2.0
4,618
0
#----------------------------------------------------------------------------- # Copyright (c) 2014, HFTools Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #--------------------------------------------------...
hftools/hftools
hftools/networks/tests/test_spar_functions.py
Python
bsd-3-clause
3,696
0.000812
#-*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocols...
dasbruns/netzob
src/netzob/Common/Utils/NetzobRegex.py
Python
gpl-3.0
15,254
0.004132
#!/usr/bin/env python # Author : Pierre Schnizer """ This module describes routines for computing Chebyshev approximations to univariate functions. A Chebyshev approximation is a truncation of the series \M{f(x) = S{sum} c_n T_n(x)}, where the Chebyshev polynomials \M{T_n(x) = cos(n \arccos x)} provide an orthogonal ...
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/chebyshev.py
Python
apache-2.0
6,561
0.00381
import re from django.core.management import call_command from django_webtest import WebTest from .auth import TestUserMixin from .settings import SettingsMixin from popolo.models import Person from .uk_examples import UK2015ExamplesMixin class TestSearchView(TestUserMixin, SettingsMixin, UK2015ExamplesMixin, WebT...
mysociety/yournextrepresentative
candidates/tests/test_search.py
Python
agpl-3.0
4,466
0.000672
from collections import OrderedDict from src.models import FlashscoreMatch from src.settings import match_cache, Colors @match_cache def is_available(match: FlashscoreMatch) -> bool: return ( match.ah_0_1_current_odds is not None and match.ah_0_2_current_odds is not None and match.home_dr...
vapkarian/soccer-analyzer
src/versions/f4.py
Python
mit
3,131
0.000639
from datetime import datetime as dt import os from enum import IntEnum import logging from typing import Optional from netCDF4 import Dataset, num2date from hyo2.soundspeed.base.geodesy import Geodesy from hyo2.soundspeed.profile.dicts import Dicts from hyo2.soundspeed.profile.profile import Profile from hyo2.soundspe...
hydroffice/hyo_soundspeed
hyo2/soundspeed/atlas/regofsoffline.py
Python
lgpl-2.1
8,583
0.001748
""" Task description (in Estonian): 3. Maatriksi vähendamine (6p) Kirjuta funktsioon vähenda, mis võtab argumendiks arvumaatriksi, milles ridu ja veerge on paarisarv, ning tagastab uue maatriksi, milles on kaks korda vähem ridu ja kaks korda vähem veerge, ja kus iga element on esialgse maatriksi nelja elemendi keskmin...
macobo/python-grader
tasks/MTAT.03.100/2013/Midterm_1_resit/KT2_J1_vahenda_tester.py
Python
mit
1,967
0.028659
self.description = "Upgrade a package that provides one of two imaginary packages" lp1 = pmpkg("pkg1") lp1.depends = ["imaginary", "imaginary2"] self.addpkg2db("local", lp1) lp2 = pmpkg("pkg2") lp2.provides = ["imaginary"] self.addpkg2db("local", lp2) lp3 = pmpkg("pkg3") lp3.provides = ["imaginary2"] self.addpkg2db(...
kylon/pacman-fakeroot
test/pacman/tests/upgrade055.py
Python
gpl-2.0
618
0.001618
from app import db from sqlalchemy import Column, String, Integer, ForeignKey class VotingVariant(db.Model): __tablename__ = 'voting_variants' id = Column(Integer, primary_key=True) voting_id = Column(Integer, ForeignKey('votings.id')) title = Column(String(255)) description = Column(String(1000)...
sokil/VotingEngine
models/voting_variant.py
Python
mit
361
0.00277
from django.contrib import admin # Register your models here. from .models import Author, Genre, Book, BookInstance, Language """ # Minimal registration of Models. admin.site.register(Book) admin.site.register(Author) admin.site.register(BookInstance) admin.site.register(Genre) admin.site.register(Language) """ adm...
DarknessSwitch/django-tutorial
catalog/admin.py
Python
cc0-1.0
2,208
0.005888
#!/usr/bin/env python # 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. """ This script runs swarming_xcode_install on the bots. It should be run when we need to upgrade all the swarming testers. It: 1) ...
endlessm/chromium-browser
build/run_swarming_xcode_install.py
Python
bsd-3-clause
3,039
0.005923
# -*- coding: utf-8 -*- """ *************************************************************************** VariableDistanceBuffer.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ****************...
sebastic/QGIS
python/plugins/processing/algs/qgis/VariableDistanceBuffer.py
Python
gpl-2.0
3,079
0.001299
""" """ import sys import re import keyword import logging import traceback from functools import partial from PySide import QtCore from PySide.QtCore import QObject from maya import cmds from mampy.pyside.utils import get_qt_object from mamprefs import config from mamprefs.base import BaseManager,...
arubertoson/maya-mamprefs
mamprefs/markingmenus.py
Python
mit
11,879
0.000253
''' test for changing unexisted user password @author: SyZhao ''' import apibinding.inventory as inventory import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.test_state as test_state import zstackwoodpecker.operations.vm_operations as vm_ops im...
zstackio/zstack-woodpecker
integrationtest/vm/vm_password/test_chg_unexist_usr_passwd_u14.py
Python
apache-2.0
2,941
0.011561
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2013 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
dantebarba/docker-media-server
plex/Subliminal.bundle/Contents/Libraries/Shared/guessit/transfo/split_on_dash.py
Python
gpl-3.0
1,659
0.000603
from filtering.morphology import ssm from rivuletpy.utils.io import * import matplotlib.pyplot as plt import skfmm ITER = 30 img = loadimg('/home/siqi/ncidata/rivuletpy/tests/data/test-crop.tif') bimg = (img > 0).astype('int') dt = skfmm.distance(bimg, dx=1) sdt = ssm(dt, anisotropic=True, iterations=ITER) try: ...
RivuletStudio/rivuletpy
tests/testssm.py
Python
bsd-3-clause
624
0.001603
""" This module is to support *bbox_inches* option in savefig command. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six import warnings from matplotlib.transforms import Bbox, TransformedBbox, Affine2D def adjust_bbox(fig, bbox_inches, fixe...
yavalvas/yav_com
build/matplotlib/lib/matplotlib/tight_bbox.py
Python
mit
2,604
0
#!/usr/bin/env python """stack.py: Stack implementation""" __author__ = 'Rohit Sinha' class Stack: def __init__(self): self.items = [] def isEmpty(self): return self.items == [] def push(self, item): self.items.append(item) def pop(self): return self.items.pop() ...
rohitsinha54/Learning-Python
algorithms/stack.py
Python
mit
716
0
#!/usr/bin/env python3 import sys from Bio import SeqIO from argparse import ArgumentParser, RawDescriptionHelpFormatter usage = "Chromosome surgery: Splice something into and/or out of a chromosome." # Main Parsers parser = ArgumentParser(description=usage, formatter_class=RawDescriptionHelpFormatter) parser.add_arg...
fruce-ki/utility_scripts
chromosome_surgery.py
Python
mit
3,387
0.006791
""" Copyright 2013 Steven Diamond 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...
SteveDiamond/cvxpy
examples/extensions/sudoku_admm.py
Python
gpl-3.0
2,414
0.018641
# encoding: utf-8 from ..docker import docker_exec from ..utils import filter_column, python_requirements_compare from ..test_common import skipifdev # @skipifdev def test_update_tyr_config_file(distributed_undeployed): platform, fabric = distributed_undeployed # create empty directory for task under test ...
Hoshiyo/fabric_navitia
integration_tests/test_tyr/test_setup.py
Python
agpl-3.0
5,824
0.00206
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Pexego Sistemas Informáticos All Rights Reserved # $Jesús Ventosinos Mayor <jesus@pexego.es>$ # # This program is free software: you can redistribute it and/or modify # it under the ...
jgmanzanas/CMNT_004_15
project-addons/purchase_picking/purchase.py
Python
agpl-3.0
5,513
0.000908
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information. __all__ = ["ClrClass", "ClrInterface", "accepts", "returns", "attribute", "propagate_attributes"] import clr c...
slozier/ironpython2
Src/StdLib/Lib/clrtype.py
Python
apache-2.0
27,760
0.006484
from collections import Counter from pprint import pprint count = Counter() posts = graph.get_object('me', fields=['posts.limit(100)'])['posts']['data'] for i, p in enumerate(posts): likes = get_all_data(graph, p['id']+"/likes") print(i, p['id'], len(likes)) for x in likes: name = x['name'] ...
tjwei/HackNTU_Data_2017
Week09/q_posts_friends.py
Python
mit
367
0.00545
# Copyright (c) 2014 Rackspace, 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 wr...
obulpathi/cdn1
cdn/transport/pecan/controllers/__init__.py
Python
apache-2.0
879
0
# Copyright 2013 IBM Corp. # 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 app...
citrix-openstack-build/tempest
tempest/services/compute/xml/interfaces_client.py
Python
apache-2.0
4,377
0
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
googleads/google-ads-python
google/ads/googleads/v9/services/services/product_bidding_category_constant_service/transports/__init__.py
Python
apache-2.0
1,165
0.000858
import json import os import sys from jupyter_client.kernelspec import install_kernel_spec from IPython.utils.tempdir import TemporaryDirectory kernel_json = { "display_name": "Gauche", "language": "gauche", "argv": [sys.executable, "-m", "jupyter_gauche", "-f", "{connection_file}"], "codemirror_mode"...
ara-ta3/jupyter-gauche
jupyter_gauche/install.py
Python
mit
1,024
0.006836
from couchpotato.core.event import addEvent from couchpotato.core.helpers.variable import tryFloat from couchpotato.core.logger import CPLog from couchpotato.core.plugins.base import Plugin from couchpotato.environment import Env from urlparse import urlparse import re import time log = CPLog(__name__) class Provid...
darren-rogan/CouchPotatoServer
couchpotato/core/providers/base.py
Python
gpl-3.0
2,933
0.004773
#! usr/bin/env python # coding: utf8 from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals """metalex is general tool for lexicographic and metalexicographic activities Copyright (C) 2017 by Elvis MBONING This program is free software: you can redistri...
Levis0045/MetaLex
metalex/xmlised/makeBalise.py
Python
agpl-3.0
26,115
0.01425
../../../../../../share/pyshared/twisted/internet/iocpreactor/tcp.py
Alberto-Beralix/Beralix
i386-squashfs-root/usr/lib/python2.7/dist-packages/twisted/internet/iocpreactor/tcp.py
Python
gpl-3.0
68
0.014706
''' Copyright 2013 Cosnita Radu Viorel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribu...
rcosnita/fantastico
fantastico/middleware/tests/test_routing_middleware.py
Python
mit
4,545
0.011441
import numpy as np import pandas as pd import pandas.util.testing as tm import dask.dataframe as dd from dask.dataframe.utils import (shard_df_on_index, meta_nonempty, make_meta, raise_on_meta_error) import pytest def test_shard_df_on_index(): df = pd.DataFrame({'x': [1, 2, 3, 4...
jeffery-do/Vizdoombot
doom/lib/python3.5/site-packages/dask/dataframe/tests/test_utils_dataframe.py
Python
mit
7,032
0
# Copyright (c) 2010-2011 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 ...
houseurmusic/my-swift
swift/obj/updater.py
Python
apache-2.0
9,252
0.001405
from __future__ import absolute_import from __future__ import unicode_literals import os.path import random import py import pytest from docker.errors import APIError from docker.errors import NotFound from .. import mock from ..helpers import build_config as load_config from ..helpers import create_host_file from ....
shakamunyi/fig
tests/integration/project_test.py
Python
apache-2.0
55,924
0.00059
USER_ID_LEN = 64; NR_WAVELEN_POL_COEF = 5; NR_NONLIN_POL_COEF = 8; NR_DEFECTIVE_PIXELS = 30; MAX_NR_PIXELS = 4096; MEAS_DEAD_PIX = 13;# 18 MEAS_PIXELS = 3648; SIZE_PREFIX = 6; NR_TEMP_POL_COEF = 5; MAX_TEMP_SENSORS = 3; ROOT_NAME_LEN ...
smarrazzo/pyava
consts.py
Python
mit
1,919
0.039083
import re useless_words = ['Inc', 'Corporation', 'Company', 'Corp', 'Co', 'Energy', '&', 'The', '.com', "Inc.", "Corp.", "Co.", "of", "Ltd.", "Ltd"] with open('companies.txt', 'r') as f: companies = f.readlines() new_companies = [] for company in companies: company = company[:-1] company_words = company....
maxdrib/Trump-Twitter
keywords/parse_companies.py
Python
mit
633
0.004739
from flask import Flask, request, json import RPi.GPIO as GPIO import threading import time import socket import ast import Adafruit_DHT GPIO.setmode(GPIO.BCM) USE_TEST_TEMPERATURES = False app = Flask(__name__) class sensorReader(threading.Thread): def __init__(self): threading.Thread.__init__(self) ...
mpascu/SmartThermostatServer
server.py
Python
mit
6,963
0.012638
# Copyright (c) 2018 PaddlePaddle 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 applicabl...
Canpio/Paddle
python/paddle/fluid/tests/unittests/test_im2sequence_op.py
Python
apache-2.0
5,232
0.004014
__author__ = 'nicolas' # coding=utf-8 from os.path import expanduser from ordereddict import OrderedDict from Bio import SwissProt import time import MySQLdb as mdb """ Fuck! from ordereddict import OrderedDict import MySQLdb as mdb dicc = {} dictdebug_empty = OrderedDict() dictdebug = dictdebug_empty dictdebug['hol...
naikymen/QB9
uniprot_parser/uniprot_parser_v01.py
Python
gpl-3.0
14,072
0.004417
"""JSON implementations of relationship searches.""" # pylint: disable=no-init # Numerous classes don't require __init__. # pylint: disable=too-many-public-methods,too-few-public-methods # Number of methods are defined in specification # pylint: disable=protected-access # Access to protected methods allowe...
mitsei/dlkit
dlkit/json_/relationship/searches.py
Python
mit
11,651
0.001717
"""Generic entry point script.""" import sys from tensorflow.python.platform import flags def run(): f = flags.FLAGS f._parse_flags() main = sys.modules['__main__'].main sys.exit(main(sys.argv))
liyu1990/tensorflow
tensorflow/python/platform/default/_app.py
Python
apache-2.0
214
0
from allauth.socialaccount.forms import SignupForm as BaseSignupForm from django import forms from django.core import validators from django.utils.translation import gettext_lazy as _ USERNAME_REQUIRED = _("Username is required.") USERNAME_SHORT = _( "Username is too short (%(show_value)s characters). " "It m...
Elchi3/kuma
kuma/users/signup.py
Python
mpl-2.0
1,747
0.001145
# Time: O(logn) # Space: O(1) # # Follow up for "Search in Rotated Sorted Array": # What if duplicates are allowed? # # Would this affect the run-time complexity? How and why? # # Write a function to determine if a given target is in the array. # class Solution(object): def search(self, nums, target): "...
yiwen-luo/LeetCode
Python/search-in-rotated-sorted-array-ii.py
Python
mit
1,138
0.006151
from time import sleep import boto.ec2 import sys import subprocess import argparse import os # specify AWS keys auth = {"aws_access_key_id": "<aws key>", "aws_secret_access_key": "<value>"} # create the connection object conn = boto.ec2.connect_to_region("us-east-1", **auth) # status of vms instancefree={} # statu...
ProgramRepair/experiments-infrastructure
awsscripts-defects4j/fullrepairtesting.py
Python
gpl-2.0
8,390
0.019547
#!/usr/bin/env python2 import time import random class Battle: def __init__(self, user1, user2): self.user1 = user1 self.user2 = user2 self.turn = user1 self.notTurn = user2 self.accepted = False self.finished = False self.auto = False self.turnCount...
AlexMog/IRCPokemonBot
commands/classes/Battle.py
Python
mit
1,766
0.003964
# Python3 from solution1 import urlSimilarity as f qa = [ ('https://codesignal.com/home/test?param1=42&param3=testing&login=admin', 'https://codesignal.com/home/secret/test?param3=fish&param1=42&password=admin', 19), ('https://codesignal.com/home/test?param1=42&param3=testing&login=admin', 'htt...
RevansChen/online-judge
Codefights/arcade/python-arcade/level-13/90.Url-Similarity/Python/test.py
Python
mit
1,205
0.00249
# This code is so you can run the samples without installing the package import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) # testinfo = "s, t 3, s, t 6.1, s, q" tags = "MoveBy" import cocos from cocos.director import director from cocos.actions import MoveBy from cocos.sprite imp...
eevee/cocos2d-mirror
test/test_moveby.py
Python
bsd-3-clause
867
0.026528
# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals from frappe.model.document import Document class CashFlowMapper(Document): pass
ovresko/erpnext
erpnext/accounts/doctype/cash_flow_mapper/cash_flow_mapper.py
Python
gpl-3.0
267
0.003745
import os, importlib, inspect import api.plugin, util.logger_factory class Loader(): def __init__(self, scheduler, bot, sql_conn): filenames = os.listdir(os.path.abspath(__file__+'/../../ext')) self.ext_names = [x[:-3] for x in filenames if x[-3:] == '.py' and x != '__init__.py'] self.scheduler = scheduler ...
deltaburnt/LameBot
api/loader.py
Python
gpl-2.0
1,994
0.037111
# -*- coding: utf-8 -*- import os from setuptools import setup, find_packages root = os.path.abspath(os.path.dirname(__file__)) try: with open(os.path.join(root, 'README.rst')) as f: README = f.read() with open(os.path.join(root, 'CHANGES.rst')) as f: CHANGES = f.read() except IOError: REA...
Gab-km/papylon
setup.py
Python
mit
1,466
0
# -*- coding: utf-8 -*- # Copyright 2013 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 require...
catapult-project/catapult
third_party/gsutil/gslib/tests/test_notification.py
Python
bsd-3-clause
4,981
0.002409
# -*- encoding: utf-8 -*- """API Tests for foreman discovery feature""" from robottelo.common.decorators import stubbed from robottelo.test import APITestCase class Discovery(APITestCase): """Implements tests for foreman discovery feature""" @stubbed() def test_list_all_discovered_host(self): """...
apagac/robottelo
tests/foreman/api/test_discovery.py
Python
gpl-3.0
7,489
0
# 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 a...
google/citest
tests/json_contract/observation_verifier_test.py
Python
apache-2.0
14,132
0.004033
# -*- mode: python; coding: utf-8 -*- # Copyright 2016-2017 Peter Williams <peter@newton.cx> and collaborators # Licensed under the MIT License """Various helpers for X-ray analysis that rely on CIAO tools. """ from __future__ import absolute_import, division, print_function, unicode_literals __all__ = str(''' get_r...
pkgw/pwkit
pwkit/environments/ciao/analysis.py
Python
mit
6,635
0.008747
__author__ = 'bromix' from ... import kodion def append_more_for_video(context_menu, provider, context, video_id, is_logged_in=False, refresh_container=False): _is_logged_in = '0' if is_logged_in: _is_logged_in = '1' _refresh_container = '0' if refresh_container: _refresh_container =...
Etharr/plugin.video.youtube
resources/lib/youtube_plugin/youtube/helper/yt_context_menu.py
Python
gpl-2.0
9,739
0.009241
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import flt from erpnext.accounts.report.financial_statements import (get_period_list, get_columns, ...
mbauskar/helpdesk-erpnext
erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py
Python
agpl-3.0
1,352
0.022189
import unittest from rx import Observable from rx.testing import TestScheduler, ReactiveTest, is_prime, MockDisposable from rx.disposables import Disposable, SerialDisposable on_next = ReactiveTest.on_next on_completed = ReactiveTest.on_completed on_error = ReactiveTest.on_error subscribe = ReactiveTest.subscribe sub...
dbrattli/RxPY
tests/test_observable/test_forin.py
Python
apache-2.0
1,468
0.004768
""" ElementInspectorAgent This agent inspect Resources (or maybe Nodes), and evaluates policies that apply. The following options can be set for the ElementInspectorAgent. .. literalinclude:: ../ConfigTemplate.cfg :start-after: ##BEGIN ElementInspectorAgent :end-before: ##END :dedent: 2 :caption: ElementI...
yujikato/DIRAC
src/DIRAC/ResourceStatusSystem/Agent/ElementInspectorAgent.py
Python
gpl-3.0
9,113
0.008449
#!/usr/bin/env python ''' access satellite map tile database some functions are based on code from mapUtils.py in gmapcatcher Andrew Tridgell May 2012 released under GNU GPL v3 or later ''' import math, cv, sys, os, mp_util, httplib2, threading, time, collections, string, hashlib, errno, tempfile class...
kd0aij/matrixpilot_old
Tools/MAVLink/MAVProxy/modules/lib/mp_tile.py
Python
gpl-3.0
18,202
0.028843
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
napalm-automation/napalm-yang
napalm_yang/models/openconfig/interfaces/interface/subinterfaces/subinterface/ipv4/addresses/address/__init__.py
Python
apache-2.0
15,915
0.00132
# 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 agreed ...
supriyagarg/pydatalab
datalab/bigquery/_view.py
Python
apache-2.0
11,620
0.007831
# -*- coding: utf-8 -*- # Baruwa - Web 2.0 MailScanner front-end. # Copyright (C) 2010-2015 Andrew Colin Kissa <andrew@topdog.za.net> # vim: ai ts=4 sts=4 et sw=4 "status tasks" import os import datetime import psutil from StringIO import StringIO from pylons import config from celery.task import task from sqlalc...
akissa/baruwa2
baruwa/tasks/status.py
Python
gpl-3.0
13,729
0.003933
import numpy as np from robotarium import Robotarium, transformations, controllers # Get Robotarium object used to communicate with the robots/simulator. r = Robotarium() # Get the number of available agents from the Robotarium. We don't need a # specific value from this algorithm. n = r.get_available_agents() # Nu...
robotarium/robotarium-python-simulator
examples/barrierCertificates.py
Python
mit
2,240
0
from pixelated.adapter.mailstore.searchable_mailstore import SearchableMailStore from pixelated.adapter.services.mail_service import MailService from pixelated.adapter.model.mail import InputMail from pixelated.adapter.services.mail_sender import MailSender from pixelated.adapter.search import SearchEngine from pixelat...
rdoh/pixelated-user-agent
service/pixelated/config/services.py
Python
agpl-3.0
2,909
0.002063
""" Create movie from MEG inverse solution ======================================= Data were computed using mne-python (http://martinos.org/mne) """ import os import numpy as np from surfer import Brain from surfer.io import read_stc print(__doc__) """ create Brain object for visualization """ brain = Brain('fsav...
diego0020/PySurfer
examples/save_movie.py
Python
bsd-3-clause
1,110
0
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Janice Cheng # ex17_inFile.txt # ex17_outFile.txt from sys import argv from os.path import exists script,from_file,to_file = argv print("Copying from {} to {}".format(from_file,to_file)) # we could do these two on one line too, how? in_file = open(from_file) ...
jcchoiling/learningPython
books/learn-python-the-hard-way/ex17_More_Files.py
Python
gpl-3.0
645
0.009302
#!/bin/python # The purpose of this script is to take the *machine-readable* output of UMLS # MetaMap and convert it to something that looks like a sentence of UMLS CUIs, # if possible. Ideally there would be an option in MetaMap to do this, assuming # it is sensible. import re import sys #INTERACTIVE = True INTERA...
corcra/UMLS
parse_metamap.py
Python
mit
8,989
0.00534
# -*- coding: utf-8 -*- try: import re2 as re except ImportError: import re from lib.cuckoo.common.abstracts import Signature class Silverlight_JS(Signature): name = "silverlight_js" description = "执行伪装过的包含一个Silverlight对象的JavaScript,可能被用于漏洞攻击尝试" weight = 3 severity = 3 categories = ["explo...
lixiangning888/whole_project
modules/signatures_merge_tmp/ek_silverlight.py
Python
lgpl-3.0
1,071
0.009794
#### 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/lair/base/shared_poi_all_lair_insecthill_large_fog_gray.iff" result...
anhstudios/swganh
data/scripts/templates/object/tangible/lair/base/shared_poi_all_lair_insecthill_large_fog_gray.py
Python
mit
469
0.046908
async def ev_mention(ev, message): def_stat_data = { 'event': 'mention', 'count': 0 } collection = 'EventStats' database = ev.bot.cfg.db.database check = ev.db[database][collection].find_one({"event": 'mention'}) if not check: ev.db[database][collection].insert_one(def_st...
lu-ci/apex-sigma-plugins
core_functions/stats/ev_mention.py
Python
gpl-3.0
572
0
#!/usr/bin/python # Copyright (C) Vladimir Prus 2006. # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) # Regression test: if a library had no explicit sources, but only <source> # properties, it was built as if it ...
nawawi/poedit
deps/boost/tools/build/test/lib_source_property.py
Python
mit
917
0
"""A Python module for interacting with Slack's RTM API.""" import inspect import json import logging import time from concurrent.futures.thread import ThreadPoolExecutor from logging import Logger from queue import Queue, Empty from ssl import SSLContext from threading import Lock, Event from typing import Optional, C...
slackhq/python-slackclient
slack_sdk/rtm_v2/__init__.py
Python
mit
16,519
0.001574
# Copyright (c) 2014 Red Hat, 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 require...
noironetworks/neutron
neutron/tests/functional/agent/linux/helpers.py
Python
apache-2.0
2,881
0
# Django from django.apps import AppConfig class BhsConfig(AppConfig): name = 'apps.bhs' verbose_name = 'Base' def ready(self): import algoliasearch_django as algoliasearch from .indexes import AwardIndex Award = self.get_model('award') algoliasearch.register(Award, Awar...
dbinetti/barberscore-django
project/apps/bhs/config.py
Python
bsd-2-clause
898
0
import unittest from circular_buffer import ( CircularBuffer, BufferFullException, BufferEmptyException ) class CircularBufferTest(unittest.TestCase): def test_read_empty_buffer(self): buf = CircularBuffer(1) with self.assertRaises(BufferEmptyException): buf.read() de...
mweb/python
exercises/circular-buffer/circular_buffer_test.py
Python
mit
3,083
0
# 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 agreed to in...
varunarya10/ironic
ironic/api/config.py
Python
apache-2.0
1,302
0
from molpher.algorithms.functions import find_path from molpher.core import ExplorationTree as ETree class BasicPathfinder: """ :param settings: settings to use in the search :type settings: `Settings` A very basic pathfinder class that can be used to run exploration with any combination of opera...
lich-uct/molpher-lib
src/python/molpher/algorithms/pathfinders.py
Python
gpl-3.0
1,908
0.003145
""" Models for code snippets and related data. Most of these models also have custom managers defined which add convenient shortcuts for repetitive or common bits of logic; see ``managers.py`` in this directory. """ import datetime, re from django.db import connection, models from django.template.defaultfilters impo...
girasquid/cab
cab/models.py
Python
bsd-3-clause
7,952
0.006916
""" End-to-end tests for the simulator configuration. Sets up a server with the backend, sends some basic queries to that server and verifies results are as expected. """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals import unittest import ga4gh.frontend...
shajoezhu/server
tests/unit/test_simulated_stack.py
Python
apache-2.0
6,031
0
# Copyright 2015 Michael Broxton # # 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 writi...
samklr/spark-gce
setup.py
Python
apache-2.0
1,354
0.00517
# from bigcommerce.connection import Connection, OAuthConnection, HttpException, ClientRequestException, \ # EmptyResponseWarning, RedirectionException, ServerException import bigcommerce.resources import bigcommerce.api
hockeybuggy/bigcommerce-api-python
bigcommerce/__init__.py
Python
mit
225
0.004444
import re import abc import warnings import collections from functools import partial from bridgy.error import MissingBastionHost with warnings.catch_warnings(): # Thiw warns about using the slow implementation of SequenceMatcher # instead of the python-Levenshtein module, which requires compilation. # I'...
wagoodman/bridgy
bridgy/inventory/source.py
Python
mit
6,467
0.003402
salario = 1000 ano = 1996 while ano <= 2020: salario *= 1.015 ano += 1 print("{0:.2f}".format(salario, 2)) #https://pt.stackoverflow.com/q/432854/101
bigown/SOpt
Python/Algorithm/Payroll.py
Python
mit
159
0.006289
## @package work_queue_futures # Python Work Queue bindings. # # This is a library on top of work_queue which replaces q.wait with the concept # of futures. # # This is experimental. # # - @ref work_queue_futures::WorkQueue # - @ref work_queue::Task import work_queue import multiprocessing import os import subprocess ...
nkremerh/cctools
work_queue/src/bindings/python2/work_queue_futures.py
Python
gpl-2.0
15,412
0.003634
# coding: utf-8 from flask import Flask, session, redirect, url_for, request,abort import config config = config.rec() def on_finish(): None def currentUserGet(): if 'user' in session: user = session['user'] return user['username'] else: return None def currentUserSet(username):...
maxis1314/pyutils
web/views/base.py
Python
apache-2.0
1,087
0.014719
#!/usr/bin/env python3 # Copyright (c) 2014-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test node disconnect and ban behavior""" import time from test_framework.test_framework import GuldenT...
nlgcoin/guldencoin-official
test/functional/p2p_disconnect_ban.py
Python
mit
5,333
0.003375
""" WSGI config for coursing_field project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJAN...
PNNutkung/Coursing-Field
coursing_field/wsgi.py
Python
apache-2.0
406
0
# Copyright 2009-2011 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). __metaclass__ = type import doctest import unittest from lp.testing.layers import DatabaseFunctionalLayer def test_suite(): suite = unittest.TestSuite() suite.laye...
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/app/widgets/tests/test_widget_doctests.py
Python
agpl-3.0
498
0
import forecastio class ForecastAPI: _API_KEY = "8eefab4d187a39b993ca9c875fef6159" _LAZY = False _LAT = 0 _LNG = 0 _forecast = () def __init__(self,key,lat,lng,lazy=False): self._LAT = lat self._LNG = lng self._API_KEY = key self._LAZY = lazy self._for...
GreatLakesEnergy/sesh-dash-beta
seshdash/api/forecast.py
Python
mit
1,952
0.019467
# Copyright 2014-2016 The Meson development team # 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 agree...
becm/meson
mesonbuild/mconf.py
Python
apache-2.0
12,095
0.002232
from scipy import * from pylab import * num_detectors = 100 x = 0.5+0.25*arange(0,float(num_detectors))/float(num_detectors) y = zeros(num_detectors) + 0.5 t = 0. n_cycles = 1 dt = 0.1/n_cycles tmax = 8 def vel(x,y): return [-(y-0.5),x-0.5] while(t<tmax): t = t + dt [k1_x,k1_y] = vel(x,y) [k2_x,k2_y]...
FluidityStokes/fluidity
tests/lagrangian_detectors_3d_1e2/get_RK_traj.py
Python
lgpl-2.1
640
0.029688