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 numpy import * from colorsys import * import Tkinter as tk import ttk import PIL.Image, PIL.ImageTk #----------------------------------------------------------------------------------------- # HSV picker # Three horizontal scales for Hue, Sat, Val class HSV_Picker: panel_size = 290, 32 hue, sat, val = ...
fablab-bayreuth/fablight
Fablight-Gui/hsv_picker.py
Python
mit
16,281
0.021559
from graphics.widgets.single_line_output_f import SingleLineOutputF from utils.test_sess_overall_results import TestSessOverallResults import constants.output_constants as const import tkinter as tk class TestSessOverallResultsOutputF(tk.Frame): """ - Use to display overall results for a test session. ""...
dani-i/bachelor-project
graphics/output/test_sess/test_sess_overall_results_output_f.py
Python
apache-2.0
5,036
0.000397
# 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 ...
AutorestCI/azure-sdk-for-python
azure-servicefabric/azure/servicefabric/models/restart_deployed_code_package_description.py
Python
mit
1,899
0.002106
# Copyright 2013. Amazon Web Services, 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 ...
SimyungYang/py-flask-signup
application.py
Python
apache-2.0
4,769
0.00692
# coding: utf-8 """payu.experiment =============== Basic file system operations for Payu :copyright: Copyright 2011 Marshall Ward, see AUTHORS for details. :license: Apache License, Version 2.0, see LICENSE for details. """ # Standard library import errno import sys, os import subprocess import shlex # ...
aidanheerdegen/payu
payu/fsops.py
Python
apache-2.0
4,890
0.003067
# Copyright (c) 2014 Cloudbase Solutions Srl # # 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 applicab...
adelina-t/compute-hyperv
hyperv/nova/__init__.py
Python
apache-2.0
687
0
# Django settings for controller project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ('Tim Spriggs', 'tims@arizona.edu'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': '/home/apw...
imoverclocked/ServoBot
apwm_home/controller/controller/settings.py
Python
mit
5,602
0.001428
#!/usr/bin/env python3 #------------------------------------------------------ # # This is a program for JoystickPS2 Module. # # This program depend on PCF8591 ADC chip. Follow # the instruction book to connect the module and # ADC0832 to your Raspberry Pi. # #------------------------------------------------------ ...
sunfounder/SunFounder_SensorKit_for_RPi2
Python/15_joystick_PS2.py
Python
gpl-2.0
1,235
0.045344
# Copyright 2020 by Kurt Rathjen. All Rights Reserved. # # 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 3 of the License, or # (at your option) any later version. This ...
krathjen/studiolibrary
src/mutils/tests/test_attribute.py
Python
lgpl-3.0
5,307
0.002638
from django.contrib.sites.models import Site from django.utils._os import safe_join from django.views.generic import TemplateView from skin.conf import settings from skin.template.loaders.util import get_site_skin class TemplateSkinView(TemplateView): """ A view that extends Djangos base TemplateView to allo...
dwatkinsweb/django-skin
skin/views/views.py
Python
mit
1,288
0.001553
# 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 app...
PaddlePaddle/Paddle
python/paddle/fluid/nets.py
Python
apache-2.0
27,095
0.004687
#!/usr/bin/env python # -*- coding: utf-8 -*- """ JWT tokens (for web interface, mostly, as all peer operations function on public key cryptography) JWT tokens can be one of: * Good * Expired * Invalid And granting them should not take database access. They are meant to figure out if a user is auth'd without using t...
Thetoxicarcade/ac
congredi/auth/test/test_token.py
Python
gpl-3.0
1,288
0.000776
# -*- coding: utf-8 -*- from module.plugins.internal.DeadHoster import DeadHoster class OronCom(DeadHoster): __name__ = "OronCom" __type__ = "hoster" __version__ = "0.18" __status__ = "stable" __pattern__ = r'https?://(?:www\.)?oron\.com/\w{12}' __config__ = [] # @TODO: Remove in 0.4.10 ...
rlindner81/pyload
module/plugins/hoster/OronCom.py
Python
gpl-3.0
493
0
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2014 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # 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, eithe...
paour/weblate
weblate/trans/migrations/0027_auto__chg_field_subproject_template.py
Python
gpl-3.0
15,556
0.007716
# @brief helper function to turn pkgconfig files into ASKAP package.info # # @copyright (c) 2006 CSIRO # Australia Telescope National Facility (ATNF) # Commonwealth Scientific and Industrial Research Organisation (CSIRO) # PO Box 76, Epping NSW 1710, Australia # atnf-enquiries@csiro.au # # This file is part of the ASKA...
ATNF/askapsdp
Tools/Dev/rbuild/askapdev/rbuild/utils/pkginfo.py
Python
gpl-2.0
3,666
0.004364
# -*- coding: utf-8 -*- # 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 Apach...
heiths/allura
Allura/allura/lib/helpers.py
Python
apache-2.0
42,752
0.000678
# Python3 from solution1 import multiplicationTable as f qa = [ (5, [[1, 2, 3, 4, 5], [2, 4, 6, 8, 10], [3, 6, 9, 12, 15], [4, 8, 12, 16, 20], [5, 10, 15, 20, 25]]), (2, [[1, 2], [2, 4]]), (4, [[1, 2, 3, 4], [2, 4, 6, 8], [3, 6, 9, 12...
RevansChen/online-judge
Codefights/arcade/python-arcade/level-5/34.Multiplication-Table/Python/test.py
Python
mit
2,320
0.007759
#!/usr/bin/env python # Cloudeebus # # Copyright (C) 2012 Intel Corporation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICEN...
01org/cloudeebus
setup.py
Python
apache-2.0
1,949
0.040021
from __future__ import absolute_import from django.conf import settings from django.contrib import messages from django.http import HttpResponseRedirect, HttpResponse from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from sentry import constants from sentry.models i...
Kryz/sentry
src/sentry/web/frontend/project_notifications.py
Python
bsd-3-clause
3,802
0.000263
########################################################################## # # Copyright (c) 2016, Image Engine Design 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: # # * Redistrib...
chippey/gaffer
python/GafferArnoldUITest/ArnoldShaderUITest.py
Python
bsd-3-clause
4,413
0.027646
# 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/tensorflow
tensorflow/python/training/tracking/base_delegate.py
Python
apache-2.0
5,796
0.008282
#! /usr/bin/env python3 from abc import ABCMeta, abstractmethod import csv import os import re import subprocess import sys import plaid2text.config_manager as cm from plaid2text.interact import separator_completer, prompt class Entry: """ This represents one entry (transaction) from Plaid. """ def...
madhat2r/plaid2text
src/python/plaid2text/renderers.py
Python
gpl-3.0
15,244
0.00105
# Download the Python helper library from twilio.com/docs/python/install import os from twilio.rest import Client # Your Account Sid and Auth Token from twilio.com/user/account # To set up environmental variables, see http://twil.io/secure account = os.environ['TWILIO_ACCOUNT_SID'] token = os.environ['TWILIO_AUTH_TOKE...
TwilioDevEd/api-snippets
ip-messaging/rest/services/update-service/update-service.6.x.py
Python
mit
504
0
#!/usr/bin/python """ Resources: http://code.google.com/p/pybluez/ http://lightblue.sourceforge.net/ http://code.google.com/p/python-bluetooth-scanner """ from __future__ import with_statement import select import logging import bluetooth import gobject import util.misc as misc_utils _moduleLogger = logging.getL...
epage/telepathy-bluewire
src/protocol/backend.py
Python
lgpl-2.1
13,051
0.022067
# coding: utf-8 # Copyright 2014-2015 Álvaro Justen <https://github.com/turicas/rows/> # # 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 yo...
tilacog/rows
tests/tests_plugin_txt.py
Python
gpl-3.0
2,876
0.000696
from django.conf.urls import include, url from django.contrib import admin from django.conf import settings from django.conf.urls.static import static import profiles.urls import accounts.urls from . import views urlpatterns = [ url(r'^$', views.HomePage.as_view(), name='home'), url(r'^users/', include(profile...
Zedmor/powerball
src/powerball/urls.py
Python
mit
852
0
#!/usr/bin/python # # Copyright (C) 2009, 2011 Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright notice, # this l...
apyrgio/snf-ganeti
test/py/ganeti.mcpu_unittest.py
Python
bsd-2-clause
9,694
0.006911
#!/usr/bin/env python import time makefile = ''' { "rules": [ { "inputs": [ "source1" ], "outputs": [ "output" ], "cmd": "cat source1 > output && cat source2 >> output && echo 'output: source1 source2' > deps", "depfile": "deps" } ] } ''' def set_version_1(test): test.writ...
falcon-org/Falcon
test/TestCache.py
Python
bsd-3-clause
2,048
0.025879
#!/usr/bin/env python #coding:utf-8 # Author: --<qingfengkuyu> # Purpose: MongoDB的使用 # Created: 2014/4/14 #32位的版本最多只能存储2.5GB的数据(NoSQLFan:最大文件尺寸为2G,生产环境推荐64位) import pymongo import datetime import random #创建连接 conn = pymongo.MongoClient('localhost',27017) #连接数据库 db = conn.study #db = conn['study'] #打印所有聚集名称,连接聚集...
valley3405/testMongo01
test02.py
Python
gpl-2.0
2,298
0.046386
import datetime import io import logging import logging.handlers import os import sys from collections import deque from time import perf_counter import colorlog class LogHelper: FORMATTER_COLOR = colorlog.ColoredFormatter('{log_color}{asctime} {name}: {levelname} {message}', style='{') FORMATTER = logging.F...
wolf1986/log_utils
log_utils/helper.py
Python
lgpl-3.0
4,265
0.001407
# Copyright (C) 2011 Lukas Lalinsky # Distributed under the MIT license, see the LICENSE file for details. import re import syslog from logging import Handler from logging.handlers import SysLogHandler class LocalSysLogHandler(Handler): """ Logging handler that logs to the local syslog using the syslog modul...
lalinsky/mb2freedb
mb2freedb/utils.py
Python
mit
2,120
0.000472
#! /usr/local/bin/stackless2.6 # by pts@fazekas.hu at Fri Jun 17 14:08:07 CEST 2011 """Demo for hosting a gevent application with Stackless, without Syncless.""" __author__ = 'pts@fazekas.hu (Peter Szabo)' import sys # Import best_greenlet before gevent to add greenlet emulation for Stackless # if necessary. import...
HanWenfang/syncless
examples/demo_gevent_only.py
Python
apache-2.0
4,479
0.016522
import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name = "pysymemu", version = "0.0.1-alpha", author = "Felipe Andres Manzano", author_email = "feliam@binamuse.com", description = ("A tool for symbolic execution of...
feliam/pysymemu
setup.py
Python
bsd-3-clause
1,306
0.022971
#!/usr/bin/env python ## \file configure.py # \brief An extended configuration script. # \author T. Albring # \version 6.2.0 "Falcon" # # The current SU2 release has been coordinated by the # SU2 International Developers Society <www.su2devsociety.org> # with selected contributions from the open-source community. #...
srange/SU2
preconfigure.py
Python
lgpl-2.1
28,082
0.012143
# Copyright 2009-2010 Doug Orleans. Distributed under the GNU Affero # General Public License v3. See COPYING for details. from google.appengine.api import urlfetch import urllib from xml.dom import minidom import time mbns = 'http://musicbrainz.org/ns/mmd-1.0#' extns = 'http://musicbrainz.org/ns/ext-1.0#' # Since...
dougo/chugchanga-poll
musicbrainz.py
Python
agpl-3.0
3,581
0.004747
import os import aiohttp import random import string import asyncio import shutil import re from threading import Thread from io import BytesIO from zipfile import ZipFile from discord.ext import commands from core import BotError DEFAULT_MAJOR = "512" DEFAULT_MINOR = "1416" class WindowsProcessThread(Thread): ...
Aurorastation/BOREALISbot2
cogs/dm_eval.py
Python
agpl-3.0
13,511
0.003553
"""Test driver interface :copyright: Copyright 2019 Marshall Ward, see AUTHORS for details :license: Apache License, Version 2.0, see LICENSE for details """ import os import shlex import shutil import subprocess from payu.models.model import Model config_files = [ 'data', 'diag', ...
marshallward/payu
payu/models/test.py
Python
apache-2.0
649
0
# # uchroma - Copyright (C) 2021 Stefanie Kondik # # 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 Software Foundation, version 3. # # This program is distributed in the hope that it will be useful, but # WIT...
cyanogen/uchroma
uchroma/client/dbus_client.py
Python
lgpl-3.0
2,107
0.002373
# -*- coding: utf-8 -*- from lutefiskdemo.settings import * DEBUG = True TEMPLATE_DEBUG = DEBUG SITE_ID = 1 MAINTENANCE_MODE = 'DEVELOPMENT' EMAIL_PORT = 1025 INSTALLED_APPS += ( 'debug_toolbar', ) MIDDLEWARE_CLASSES += ( 'debug_toolbar.middleware.DebugToolbarMiddleware', ) INTERNAL_IPS = ( ...
rentalita/django-lutefiskdemo
src/python/lutefiskdemo/development.py
Python
mit
475
0
import string import numpy import six import cupy from cupy import carray from cupy import cuda from cupy import util six_range = six.moves.range six_zip = six.moves.zip def _get_simple_elementwise_kernel( params, operation, name, preamble, loop_prep='', after_loop='', options=()): module_code...
sou81821/chainer
cupy/elementwise.py
Python
mit
22,222
0
""" Tests for the module that encompasses fourth species counterpoint. """ import unittest from foox.species.fourth import (Genome, create_population, is_parallel, make_fitness_function, make_generate_function, make_halt_function, MAX_REWARD, REWARD_SUSPENSION) from foox.species.utils import is_suspension # T...
LoganRickert/foox
test/species/test_fourth.py
Python
mit
6,328
0.000474
from __future__ import print_function import numpy as np import matplotlib.pyplot as plt from astropy.io import fits from astropy.io import ascii import astropy.coordinates as coord import astropy.units as u from astropy.time import Time from astropy.time import TimeDelta import os ''' Read in 1m observation metadata t...
mrawls/APO-1m-phot
imginventory.py
Python
mit
9,017
0.007541
"""Support for RFXtrx devices.""" import binascii from collections import OrderedDict import logging import RFXtrx as rfxtrxmod import voluptuous as vol from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_NAME, ATTR_STATE, CONF_DEVICE, CONF_DEVICES, CONF_HOST, CONF_PORT, EVENT_HOMEA...
nkgilley/home-assistant
homeassistant/components/rfxtrx/__init__.py
Python
apache-2.0
13,930
0.000431
class Where: string = ''
pannellr/3132GroupProject
modules/database/where.py
Python
unlicense
34
0.029412
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
timsnyder/bokeh
bokeh/sampledata/us_cities.py
Python
bsd-3-clause
1,884
0.010085
"""Provide functionality to interact with Cast devices on the network.""" from __future__ import annotations import asyncio from contextlib import suppress from datetime import datetime, timedelta import functools as ft import json import logging from urllib.parse import quote import pychromecast from pychromecast.co...
lukas-hetzenecker/home-assistant
homeassistant/components/cast/media_player.py
Python
apache-2.0
31,771
0.000913
# -*- coding: utf-8 -*- """ this script is crap but I don't feel like fixing it. """ import shutil import os import sys import time import tempfile from bencode import * base_dir = tempfile.gettempdir() + "\\ut-itunes-import" item_list = [] file_count = 0 file_types = ['.mp3',] if "--help" in str(sys.argv[1]).low...
smithbr/ut-itunes-import
import.py
Python
mit
5,276
0.005497
from .named import NamedExtensionManager class DriverManager(NamedExtensionManager): """Load a single plugin with a given name from the namespace. :param namespace: The namespace for the entry points. :type namespace: str :param name: The name of the driver to load. :type name: str :param inv...
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/stevedore/driver.py
Python
agpl-3.0
5,248
0
import webbrowser import os import re # Styles and scripting for the page main_page_head = ''' <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Fresh Tomatoes!</title> <!-- Bootstrap 3 --> <link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap....
nathandh/udacity-fullstack-MovieTrailerWebsite
fresh_tomatoes.py
Python
mit
6,106
0.003767
# -*- coding: utf-8 -*- from setuptools import setup, find_packages import os import glob import sys #VERSION="2.1dev4" VERSION="2.6dev5" # Taken from kennethreitz/requests/setup.py package_directory = os.path.realpath(os.path.dirname(__file__)) def get_file_contents(file_path): """Get the context of the file u...
woddx/privacyidea
setup.py
Python
agpl-3.0
5,648
0.001593
# coding: utf-8 """ Environmental Exposures API API for environmental exposure models for NIH Data Translator program OpenAPI spec version: 1.0.0 Contact: stealey@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git Licensed under the Apache License, Version 2.0 (the "L...
mjstealey/exposures-api
python-client/exposures_api/models/date_range.py
Python
mit
4,058
0.000246
""" Python Character Mapping Codec cp437 generated from 'VENDORS/MICSFT/PC/CP437.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict...
Microvellum/Fluid-Designer
win64-vc/2.78/python/lib/encodings/cp437.py
Python
gpl-3.0
34,564
0.019355
import pytest import ray from ray import tune pytest.importorskip("horovod") try: from ray.tune.integration.horovod import ( DistributedTrainableCreator, _train_simple, _train_validate_session) except ImportError: pass # This shouldn't be reached - the test should be skipped. @pytest.fixture def r...
pcmoritz/ray-1
python/ray/tune/tests/test_horovod.py
Python
apache-2.0
3,092
0
#QLinearGradient myGradient; #QPen myPen; #QPolygonF myPolygon; #QPainterPath myPath; #myPath.addPolygon(myPolygon); #QPainter painter(this); #painter.setBrush(myGradient); #painter.setPen(myPen); #painter.drawPath(myPath); import math from PyQt5 import QtCore, QtGui, QtWidgets class ArrowItem(QtWidgets....
chiamingyen/PythonCAD_py3
Interface/Entity/arrowitem.py
Python
gpl-2.0
1,388
0.029539
#coding:utf-8 from nadmin.sites import site from nadmin.views import BaseAdminPlugin, CommAdminView class MobilePlugin(BaseAdminPlugin): def _test_mobile(self): try: return self.request.META['HTTP_USER_AGENT'].find('Android') >= 0 or \ self.request.META['HTTP_USER_AGENT'].find...
A425/django-nadmin
nadmin/plugins/mobile.py
Python
mit
904
0.004425
import biopsy import bifa_server import base64, threading , os, socket from sslUserCheck import CheckUserEngine from soaplib.wsgi_soap import WSGISoapApp from soaplib.wsgi_soap import SoapServiceBase from soaplib.service import soapmethod from soaplib.client import make_service_client from soaplib.serializers.primitiv...
JohnReid/biopsy
Python/bio_server/main_server.py
Python
mit
11,092
0.014245
import pytest def test_pack_unpack(): header = ('json', 301) from gpopup.ipc import _pack_header, _unpack_header header_bytes = _pack_header(*header) header_out = _unpack_header(header_bytes) assert header == header_out assert header[0] == header_out.type assert header[1] == header_out.leng...
frostidaho/python-gpopup
tests/test_ipc2.py
Python
bsd-2-clause
2,655
0.008286
import bpy camera = bpy.context.edit_movieclip.tracking.camera camera.sensor_width = 23.6 camera.units = 'MILLIMETERS' camera.pixel_aspect = 1 camera.k1 = 0.0 camera.k2 = 0.0 camera.k3 = 0.0
Microvellum/Fluid-Designer
win64-vc/2.78/scripts/presets/tracking_camera/Nikon_DX.py
Python
gpl-3.0
192
0
#!/usr/bin/env python import logging import boto.ec2 import config class EC2Client: def __init__(self): self.conn = boto.ec2.connect_to_region(config.ec2_region) def stop(self): if self.get_status() in ['running', 'pending']: logging.info('Stopping server...') self....
felixbade/minecraft-proxy
app/server_manager/ec2.py
Python
artistic-2.0
902
0.001109
#!/usr/bin/env python3 # # Tests if the stochastic degradation (toy) model works. # # This file is part of PINTS (https://github.com/pints-team/pints/) which is # released under the BSD 3-clause license. See accompanying LICENSE.md for # copyright notice and full license details. # import unittest import numpy as np im...
martinjrobins/hobo
pints/tests/test_toy_stochastic_degradation_model.py
Python
bsd-3-clause
4,627
0
# for backwards compatibility with earlier python versions unit_test_module = None def get_unit_test_module(): try: import unittest unit_test_module = unittest except ImportError: import unittest2 unit_test_module = unittest2 return unit_test_module
parallel-fs-utils/fs-drift
unit_test_module.py
Python
apache-2.0
295
0.00339
# -*- coding: utf-8 -*- # # Copyright 2017 David García Goñi # # This file is part of Phatty. # # Phatty 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) a...
dagargo/phatty
tests/test_connector.py
Python
gpl-3.0
11,804
0.001779
# Licensed to the StackStorm, Inc ('StackStorm') 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 not use th...
punalpatel/st2
contrib/runners/action_chain_runner/tests/unit/test_actionchain.py
Python
apache-2.0
40,041
0.002273
# Various functions for printing various specific values # in human-readable format import sys import time import pprint # pretty print object pp = pprint.PrettyPrinter(indent=4) def pretty_print(value): pp.pprint(value) # print timedelta, provided in seconds, # in human-readable format def print_elapsed_tim...
budnyjj/vkstat
utils/print.py
Python
mit
1,418
0.000705
# Generated by Django 2.0.10 on 2019-03-12 17:51 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('erudit', '0110_auto_20181123_1558'), ] operations = [ migrations.AlterField( model_name='issue', name='is_published...
erudit/zenon
eruditorg/erudit/migrations/0111_auto_20190312_1251.py
Python
gpl-3.0
422
0.002375
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Manage modules """ import sys, os import time import grp #from subprocess import Popen, PIPE from pathlib import Path import shutil from getpass import getpass __appname__ = "manager" __licence__ = "none" __version__ = "0.1" __author__ = "Benoit Guibert <benoit.guib...
hetica/bentools
modules/manager/manager.py
Python
gpl-3.0
9,426
0.006265
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> import urllib from copy import deepcopy from datetime import date from logging import getLogger from urlparse import urljoin from sqlalchemy import and_ from ggrc import db from ggrc import utils from ggr...
plamut/ggrc-core
src/ggrc_workflows/notification/data_handler.py
Python
apache-2.0
14,000
0.007143
# Copyright 2020 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...
karllessard/tensorflow
tensorflow/lite/tools/flatbuffer_utils_test.py
Python
apache-2.0
8,309
0.003972
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; eit...
sdroege/cerbero
cerbero/utils/git.py
Python
lgpl-2.1
8,593
0.00128
# -*- coding: utf-8 -*- """ *************************************************************************** OTBUtils.py --------------------- Date : 11-12-13 Copyright : (C) 2013 by CS Systemes d'information (CS SI) Email : otb at c-s dot fr (CS SI) Contrib...
carolinux/QGIS
python/plugins/processing/algs/otb/OTBSpecific_XMLLoading.py
Python
gpl-2.0
12,848
0.001946
from pyramid.exceptions import ConfigurationError from pyramid.interfaces import ISessionFactory from .settings import parse_settings def includeme(config): """ Set up standard configurator registrations. Use via: .. code-block:: python config = Configurator() config.include('pyramid_keystone...
bertjwregeer/pyramid_keystone
pyramid_keystone/__init__.py
Python
isc
1,415
0.003534
#!/usr/bin/env python # -*- coding: UTF-8 -*- from xbmctorrent import plugin from xbmctorrent.scrapers import scraper from xbmctorrent.ga import tracked from xbmctorrent.caching import cached_route from xbmctorrent.utils import ensure_fanart from xbmctorrent.library import library_context BASE_URL = plugin.get_setti...
skipmodea1/plugin.video.xbmctorrent
resources/site-packages/xbmctorrent/scrapers/btdigg.py
Python
gpl-3.0
2,061
0.001456
# 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/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_operations.py
Python
mit
3,780
0.004233
# Program to print raw data of the accelerometer device import sys sys.path.append ("../../../lib") import accel import time import numpy import os A = accel.Init () while(1): time.sleep(0.25) os.system ("clear") print "\n\n\n\n" (status, x) = accel.get_x (A) (status, y) = accel.get_y (A) (s...
Daniel-Brosnan-Blazquez/DIT-100
examples/IMU/acc/raw_data.py
Python
gpl-3.0
461
0.023861
"""Provides functionality to interact with image processing services.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.const import ATTR_ENTITY_ID, ATTR_NAME, CONF_ENTITY_ID, CONF_NAME from homeassistant.core import callback from homeassistant.exceptions impo...
tboyce021/home-assistant
homeassistant/components/image_processing/__init__.py
Python
apache-2.0
6,082
0.000658
import json import logging import traceback from lxml import etree from xmodule.timeinfo import TimeInfo from xmodule.capa_module import ComplexEncoder from xmodule.progress import Progress from xmodule.stringify import stringify_children from xmodule.open_ended_grading_classes import self_assessment_module from xmod...
TangXT/GreatCatMOOC
common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py
Python
agpl-3.0
49,426
0.00346
# -*- coding:utf-8 -*- from torcms.core import tools from torcms.model.entity_model import MEntity class TestMEntity(): def setup(self): print('setup 方法执行于本类中每条用例之前') self.uid = tools.get_uuid() self.path = '/static/123123' def test_create_entity(self): uid = self.uid ...
bukun/TorCMS
tester/test_model/test_entity.py
Python
mit
2,865
0.002115
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2012 Jérémie DECOCK (http://www.jdhp.org) # 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 witho...
jeremiedecock/snippets
python/pyqt/pyqt4/fullscreen.py
Python
mit
2,472
0.004049
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-01-18 20:25 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('products', '0056_auto_20160118_2012'), ] operations = [ migrations.AddField(...
n2o/guhema
products/migrations/0057_auto_20160118_2025.py
Python
mit
2,432
0.004527
__author__ = 'croxis' from flask import Blueprint user = Blueprint('user', __name__) from . import views
croxis/kmr
app/user/__init__.py
Python
mit
107
0.018692
"""Service layer (domain model) of practice app """
effa/flocs
practice/services/__init__.py
Python
gpl-2.0
53
0.018868
''' run where the files are ''' import json import os final_file = "tipo,nombre,nombre_alt\n" for root, subFolders, files in os.walk(os.getcwd()): for filename in files: filePath = os.path.join(root, filename) if not filePath.endswith(".json") or filename.startswith("_"): continue print (" processi...
eikiu/tdf-actividades
_admin-scripts/jsontocsv(activities-name).py
Python
cc0-1.0
814
0.045455
from tkinter import * # from tkinter.font import * import math CW = 800 CH = 600 SENT_H = 50 Y_OFF = 10 X_OFF = 20 DIM_GAP = 10 DIM_OFF = 70 class Multigraph(Canvas): """Canvas for displaying the multigraph for a sentence.""" node_rad = 3 def __init__(self, parent, width=CW, height=CH, nnodes=9, ...
LowResourceLanguages/hltdi-l3
l3xdg/graphics.py
Python
gpl-3.0
10,943
0.004132
#!/usr/bin/env python3 from socket import * import _thread import sys def enviardatos(sock): data = input() enviar = data.encode() sock.sendto(enviar,('localhost',23456)) if data == "bye": print("Closing Client\n") sock.close() return 0 _thread.start_new_thread(recibird...
CarlosCebrian/RedesII_Ejercicios
Practica2_RedesII/chatudp.py
Python
gpl-2.0
1,117
0.014324
__version__ = '0.1.4' import requests import re import json from bs4 import BeautifulSoup # TODO: def see_also() => makes a whole set of related thhings to the topic # chosen # TODO: # def chossy() => parse disambiguation pages can be called # when the page reached durign climb or # any given method in the clas...
TheSighing/climber
climber/__init__.py
Python
mit
7,197
0.000973
# Copyright (c) 2006-2009 The Trustees of Indiana University. # All rights reserved. # # Redistribution and use in source and binary forms, with or without ...
matthiaskramm/corepy
examples/spu_interspu.py
Python
bsd-3-clause
5,421
0.009592
# Copyright (c) 2012 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. import os import sys from telemetry.page import block_page_measurement_results from telemetry.page import buildbot_page_measurement_results from telemetr...
pozdnyakov/chromium-crosswalk
tools/telemetry/telemetry/page/page_measurement.py
Python
bsd-3-clause
5,239
0.004772
# AUTHOR: Kale Miller # DESCRIPTION: Contains the core classes for the program. # 50726f6772616d6d696e6720697320627265616b696e67206f66206f6e652062696720696d706f737369626c65207461736b20696e746f20736576 # 6572616c207665727920736d616c6c20706f737369626c65207461736b732e # DEVELOPMENT LOG: # 05/12/16: Initialized...
kmiller96/Shipping-Containers-Software
lib/containers.py
Python
mit
14,805
0.002972
#1strand Bushing Tool #Standalone program for minimized cruft import math print "This program is for printing the best possible circular bushings" print "Printer config values are hardcoded for ease of use (for me)" xpath = [] #These are initialized and default values ypath = [] zpath = [] step = [] epath = [] xstart...
kanethemediocre/1strand
1strandbushinga002.py
Python
gpl-2.0
6,978
0.019633
#!/usr/bin/env python import paho.mqtt.client as mqtt # The callback for when the client receives a CONNACK response from the server. def on_connect(client, userdata, flags, rc): print("Connected with result code "+str(rc)) # Subscribing in on_connect() means that if we lose the connection and # reconnect...
frink182/pi_temps
mqtt_listener.py
Python
gpl-2.0
882
0.003401
class BTree: def __init__(self, b_tree_list=list()): self.b_tree_list = b_tree_list self.levels = len(b_tree_list) def visualise(self): for index, level in enumerate(self.b_tree_list): spacing = 2 ** (self.levels - index) - 1 print(((spacing-1)//2)*' ', end='') ...
DakRomo/2017Challenges
challenge_4/python/ning/challenge_4.py
Python
mit
790
0
# # 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 not...
dhuang/incubator-airflow
airflow/providers/amazon/aws/hooks/glue.py
Python
apache-2.0
7,995
0.002126
#!/usr/bin/env python import numpy as np import vtk def main(): named_colors = vtk.vtkNamedColors() # Make a 32 x 32 grid. size = 32 # Define z values for the topography. # Comment out the following line if you want a different random # distribution each time the script is run. np.rand...
lorensen/VTKExamples
src/Python/DataManipulation/LineOnMesh.py
Python
apache-2.0
5,546
0
#!/usr/bin/env python3 '''Test for no resigning if the zone is properly signed.''' from dnstest.utils import set_err from dnstest.test import Test import subprocess def patch_zone(t, server, zone, script): """ Update zone file on a master server. """ zone = zone[0] zonefile = "%s/master/%s" % (se...
jkadlec/knot-dns-zoneapi
tests-extra/tests/dnssec/case_sensitivity/test.py
Python
gpl-3.0
1,244
0.001608
""" WSGI config for WebAppPublic project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATI...
wesley1001/WeVoteServer
config/wsgi.py
Python
bsd-3-clause
1,622
0
# https://oj.leetcode.com/problems/count-and-say/ # 10:56 - 11:11 class Solution: # @return a string def countAndSay(self, n): result = "1" # n == 1, result == '1', not when n == 0 for i in xrange(1, n): last, count, nextResult = result[0], 1, "" for j in xrange(1, len(result)): cu...
yaoxuanw007/forfun
leetcode/python/countAndSay.py
Python
mit
720
0.0125
# Ramdomly generates data import json, random, copy data = { 'tweets': {}, 'events': {}, 'tweetsHeat': [], 'eventsHeat': [] } tweetGeo = { "type": "FeatureCollection", "features": [], "id": "tweetsyoulike.c22ab257" } tfeature = { "geometry": { "type": "Point", "coordin...
spatial-computing/geotweets
data/tool/test/jsongener.py
Python
mit
2,441
0.003277
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under th...
bndl/bndl
bndl/__init__.py
Python
apache-2.0
1,142
0.000876
# -*- coding: utf-8 -*- import pymongo from config import MONGO_STRING client = pymongo.MongoClient(MONGO_STRING, tz_aware=True) db = client['yo-water']
YoApp/yo-water-tracker
db.py
Python
mit
154
0.006494
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
photoninger/ansible
test/units/modules/network/onyx/test_onyx_lldp.py
Python
gpl-3.0
2,404
0