code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-03 20:48 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations...
aodarc/flowers_room
apps/gallary/migrations/0001_initial.py
Python
mit
1,751
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Copyright (c) 2011-2020, wradlib developers. # Distributed under the MIT License. See LICENSE.txt for more info. """ Satellite Functions ^^^^^^^^^^^^^^^^^^^ .. autosummary:: :nosignatures: :toctree: generated/ {} """ __all__ = ["correct_parallax", "dist_from_o...
wradlib/wradlib
wradlib/georef/satellite.py
Python
mit
3,810
# 2014-01 Jason Roebuck # Product of work for GEOG 590 @ Portland State University # May be used for whatever! # github.com/jtroe/GEOG-590 - Fork me on github! def main(): # Declare a good, old fashioned greeting. greeting = 'Hello, Portland!' print greeting # print a separator print '======' ...
jtroe/GEOG-590
Assignment1/helloworld.py
Python
unlicense
1,136
from django.conf.urls import patterns, url from web import views urlpatterns = patterns('', url(r'^$', views.index, name='index'), url(r'^login', views.cosergate_login, name='login'), url(r'^logout', views.cosergate_logout, name='logout'), url(r'^signup', views.cosergate_signup, name='signup'), url(r'^home', ...
tapionx/cosergate
web/urls.py
Python
agpl-3.0
397
import unittest import numpy import six import chainer from chainer.backends import cuda from chainer import links from chainer import testing from chainer.testing import attr from chainer.testing import condition def _batch_renormalization(expander, gamma, beta, x, mean, var, eps, test, ...
rezoo/chainer
tests/chainer_tests/links_tests/normalization_tests/test_batch_renormalization.py
Python
mit
6,996
# IDLEX EXTENSION from __future__ import print_function ## """ ## Copyright(C) 2011-2012 The Board of Trustees of the University of Illinois. ## All rights reserved. ## ## Developed by: Roger D. Serwy ## University of Illinois ## ## Permission is hereby granted, free of charge, to an...
technologiescollege/Blockly-rduino-communication
scripts_XP/Lib/site-packages/idlexlib/extensions/idlexManager.py
Python
gpl-3.0
13,899
#!/usr/bin/env python #-*- coding: utf-8 -*- from Tkinter import FLAT from ttk import Style ######################################################################## class TkStyles(object): #---------------------------------------------------------------------- @classmethod def create_styles(self): ...
PinguinoIDE/pinguino-ide-tk
tkgui/ide/styles.py
Python
gpl-2.0
582
""" The minimum needed to take a response and render a response - url mapper utility - wsgiwrapper """ import json from werkzeug.wrappers import Response def add_ressource_uri(response, obj): obj["ressource_uri"] = "/{0}/{1}/".format( response.ressource_name, obj[response.model.pk_field.name]) ...
boblefrag/python-rest-api-framework
rest_api_framework/views.py
Python
mit
2,433
# coding: utf-8 from setuptools import setup, find_packages setup( name='tc_librato', version="0.0.1", description='Thumbor Librato extensions', author='Peter Schröder, Sebastian Eichner', author_email='peter.schroeder@jimdo.com, sebastian.eichner@jimdo.com', zip_safe=False, include_packag...
thumbor-community/librato
setup.py
Python
mit
441
"""Chatroom game.""" import logging from dallinger import networks from dallinger.compat import unicode from dallinger.config import get_config from dallinger.experiment import Experiment from dallinger.nodes import Agent try: from .bots import Bot Bot = Bot # Make name "Bot" importable without triggering s...
Dallinger/Dallinger
demos/dlgr/demos/chatroom/experiment.py
Python
mit
1,854
from __future__ import print_function, absolute_import, division import re import copy import operator import itertools import warnings import mmap from distutils.version import LooseVersion import sys import pytest import astropy from astropy import stats from astropy.io import fits from astropy import units as u f...
keflavich/spectral-cube
spectral_cube/tests/test_spectral_cube.py
Python
bsd-3-clause
96,662
"""The gearbest component."""
jnewland/home-assistant
homeassistant/components/gearbest/__init__.py
Python
apache-2.0
30
#!/usr/bin/env python # # VM Backup extension # # Copyright 2015 Microsoft Corporation # # 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 # # U...
thomas1206/azure-linux-extensions
VMEncryption/main/EncryptionConfig.py
Python
apache-2.0
2,233
# -*- coding: utf-8 -*- """ Pearson Correlation model: Inferring a correlation coefficient. Chapter 5.1, Bayesian Cognitive Modeling. Created Aug/2015 by Johannes Keyser <j.keyser@donders.ru.nl> TODO: Not running yet, because of matrix manipulation mysteries in PyMC3/Theano. """ import pymc3 as pm import numpy as np...
JoKeyser/BCMinPyMC3
ch5-1_Correlation1.py
Python
gpl-3.0
2,683
#! /usr/bin/env python # do nothing as NMRPipe goes into inf loop.
google-code-export/nmrglue
tests/pipe_proc_tests/dev.py
Python
bsd-3-clause
68
from __future__ import division, print_function import matplotlib.pyplot as plt import numpy as np from numpy.random import rand from time import time """ INPUT: quantized mains fdiff OUTPUT: appliance fdiff Code taken from Lasagne and nolearn! """ SEQ_LENGTH = 400 N_HIDDEN = 5 N_SEQ_PER_BATCH = 30 # Number of seque...
JackKelly/neuralnilm_prototype
scripts/experiment033.py
Python
mit
8,485
''' Created on Jul 7, 2017 @author: alvarna ''' from __future__ import print_function import codecs import os import inspect from sanskrit_parser.lexical_analyzer.sandhi import Sandhi from sanskrit_parser.base.sanskrit_base import SanskritObject, SLP1 import logging import re import six import json logger = logging.g...
kmadathil/sanskrit_parser
tests/generate_sandhi_pass_fail.py
Python
mit
6,680
from django.apps import AppConfig class LauncherConfig(AppConfig): name = 'launcher'
hikelee/launcher
launcher/apps.py
Python
mit
91
from opencog.atomspace import types, TruthValue, get_type_name import formulas from pln.rule import Rule ''' Some Rules evaluate various kinds of logical links based explicitly on set membership. A set = a ConceptNode. Other Rules calculate them heuristically, based on set probabilities and logical links. ''' # Todo:...
printedheart/opencog
opencog/python/pln_old/rules/inheritance_rules.py
Python
agpl-3.0
11,834
import pytest from pygeoid.constants.solar_system_gm import get_body_gm, gm_moon def test_get_body_gm(): with pytest.raises(ValueError): body = get_body_gm('no_name_body') body_gm = get_body_gm('moon') assert gm_moon == body_gm
ioshchepkov/pygeoid
pygeoid/constants/test/test_solar_system_gm.py
Python
mit
253
#!/usr/bin/env python import pika connection = pika.BlockingConnection(pika.ConnectionParameters('localhost')) channel = connection.channel() channel.queue_declare(queue='hello') channel.basic_publish(exchange='', routing_key='hello', body='Hello World!') print("[x] Sent...
peter-wangxu/python_play
rabbitmq_test/hello_world/send.py
Python
apache-2.0
358
from z3 import BitVecVal, BV2Int, If, LShR, UDiv, ULT, UGT, URem def ADD(x, y): return x + y def MUL(x, y): return x * y def SUB(x, y): return x - y def DIV(x, y): return If(y == 0, 0, UDiv(x, y)) def SDIV(x, y): return If(y == 0, 0, x / y) def MOD(x, y): return If(y == 0, 0, URem(x, y)) def SMOD(x, y): r...
ethereum/solidity
test/formal/opcodes.py
Python
gpl-3.0
1,395
""" Parser for silme-compatible translation formats. """ import codecs import silme from collections import OrderedDict from copy import copy from silme.format.dtd import FormatParser as DTDParser from silme.format.ini import FormatParser as IniParser from silme.format.inc import FormatParser as IncParser from silme....
mathjazz/pontoon
pontoon/sync/formats/silme.py
Python
bsd-3-clause
8,834
from __future__ import absolute_import, unicode_literals from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module HIPCHAT_BACKEND = getattr(settings, 'HIPCHAT_BACKEND', 'djhipchat.backends.locmem.HipChatBackend...
paulcwatts/djhipchat2
djhipchat/__init__.py
Python
bsd-3-clause
1,669
from PyQt5.QtCore import pyqtSlot, pyqtSignal, Qt from PyQt5.QtWidgets import QDialog from urh.signalprocessing.Filter import Filter, FilterType from urh.ui.ui_filter_dialog import Ui_FilterDialog class FilterDialog(QDialog): filter_accepted = pyqtSignal(Filter) def __init__(self, dsp_filter: Filter, parent...
jopohl/urh
src/urh/controller/dialogs/FilterDialog.py
Python
gpl-3.0
4,227
# -*- coding: utf-8 -*- import sys import time import random import operator from openpyxl import Workbook from openpyxl import load_workbook from openpyxl.styles import Font, Alignment from datetime import datetime from collections import OrderedDict date_format = "%d.%m.%Y" #Muotoillaan päivämäärän esitysmu...
oskarijarvelin/exsec
exsec.py
Python
gpl-3.0
16,163
import csv import copy as cp from sklearn.preprocessing import normalize from sklearn.preprocessing import scale from sklearn.decomposition import PCA Data=[] with open('WineDataSet.csv') as csvfile: readCSV = csv.reader(csvfile, delimiter=',') hold=[] count=0 count1=0 for row in readCSV: ...
WmHHooper/aima-python
submissions/Colburn/myKMeans.py
Python
mit
4,864
# Author: Bichen Wu (bichen@berkeley.edu) 08/25/2016 """Model configuration for pascal dataset""" import numpy as np from config.config import base_model_config def kitti_squeezeDet_config(): """Specify the parameters to tune below.""" mc = base_model_config('PASCAL_VOC')#base_model_config...
Walter1218/self_driving_car_ND
squeezeDet/src/config/kitti_squeezeDet_config.py
Python
mit
2,066
# -*- coding: utf-8 -*- # Copyright (C) 2010 by RoboLab - University of Extremadura # # This file is part of RoboComp # # RoboComp 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...
robocomp/robocomp
tools/rcreplay/rgbd.py
Python
gpl-3.0
2,317
# -*- coding: utf-8 -*- # coding: UTF-8 # # Copyright 2010-2015 The pygit2 contributors # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2, # as published by the Free Software Foundation. # # In addition to the permissions in the GNU G...
Sheeo/pygit2
setup.py
Python
gpl-2.0
6,812
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 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 ...
ganeti-github-testing/ganeti-test-1
lib/config.py
Python
bsd-2-clause
117,521
import torch from termcolor import cprint, colored as c def num_flat_features(x): size = x.size()[1:] # all dimensions except the batch dimension num_features = 1 for s in size: num_features *= s return num_features def forward_tracer(self, input, output): cprint(c("--> " + self.__class...
kinshuk4/MoocX
misc/deep_learning_notes/pytorch_playground/utils.py
Python
mit
1,898
# -*- coding: utf-8 -*- # from django.urls import path from rest_framework.routers import DefaultRouter from .. import api app_name = 'orgs' router = DefaultRouter() # 将会删除 router.register(r'org/(?P<org_id>[0-9a-zA-Z\-]{36})/membership/admins', api.OrgMembershipAdminsViewSet, 'membership-admins') ro...
liuzheng712/jumpserver
apps/orgs/urls/api_urls.py
Python
gpl-2.0
866
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
oakeyc/azure-cli-shell
azclishell/telemetry.py
Python
mit
2,206
#!/usr/bin/env python # Copyright JS Foundation and other contributors, http://js.foundation # # 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....
robertsipka/jerryscript
tools/run-tests.py
Python
apache-2.0
20,729
#!/usr/bin/env python3 import os import io import sys import re import xml.etree.ElementTree as ET # on msys, use crlf output nl = None if sys.platform == 'msys': nl = "\r\n" # Get the file, relative to this script's location (same directory) # that way we're not sensitive to CWD pathname = os.path.abspath(os.pa...
TurtleRockStudios/renderdoc_public
renderdoc/driver/vulkan/gen_dispatch_table.py
Python
mit
6,772
# -*- coding: utf-8 -*- # # Copyright (c) 2016 NORDUnet A/S # 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 # ...
SUNET/eduid-webapp
src/eduid_webapp/signup/run.py
Python
bsd-3-clause
1,792
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): from sentry.utils.models import update for project in orm['sentry.Project'].objects.all(): orm['sentry.Pro...
simmetria/sentry
src/sentry/migrations/0049_create_default_project_keys.py
Python
bsd-3-clause
20,194
from datetime import date from django.test.utils import override_settings from .base import SitemapTestsBase class HTTPSSitemapTests(SitemapTestsBase): protocol = 'https' urls = 'django.contrib.sitemaps.tests.urls.https' def test_secure_sitemap_index(self): "A secure sitemap index can be rendere...
vsajip/django
django/contrib/sitemaps/tests/https.py
Python
bsd-3-clause
2,330
from enum import Enum, EnumFactory __all__ = ["Enum", "EnumFactory"]
mkaluza/python-enum
enum/__init__.py
Python
gpl-3.0
70
#-------------------------------------------------------------------- # Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas # Copyright: (C) 2001 Centro de Pesquisas Renato Archer # Homepage: http://www.softwarepublico.gov.br # Contact: invesalius@cti.gov.br # License: GNU - GPL ...
paulojamorim/invesalius3
invesalius/gui/project_properties.py
Python
gpl-2.0
4,085
#!/usr/bin/env python # -*- coding: utf-8 -*- # # These tests run only under Linux and Python 2.x + # This is the Travis CI environment. # from pycompat import python as py from pycompat import system import sys import unittest class TestPyCompat(unittest.TestCase): def test_python_is_64bits(self): se...
alexandrevicenzi/pycompat
tests/test.py
Python
mit
2,225
# # For information about atomic writes, see # -> http://stupidpythonideas.blogspot.com/2014/07/getting-atomic-writes-right.html # # Basically, if you're using Python 3.3+, good to go. Otherwise # we'll try our best, but no guarantees. # import os if hasattr(os, 'replace'): # Python 3.3+ file_replace = os.r...
virtuald/git-source-track
git_source_track/compat.py
Python
apache-2.0
594
# Copyright (C) 2008-2009 Open Society Institute # Thomas Moroz: tmoroz.org # 2010-2011 Large Blue # Fergus Doyle: fergus.doyle@largeblue.com # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License Version ...
amarandon/opencore
opencore/views/tests/test_search.py
Python
gpl-2.0
17,417
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
google-research/google-research
spin_spherical_cnns/input_pipeline_test.py
Python
apache-2.0
2,021
""" Handles setting up voters so an election can be called """ import logging import socket import threading import time import SocketServer from .config import Config from .fle import FastLeaderElection from .serialization import read_string, write_string from .state import State from .vote import Vote class Voter...
rgs1/pyzab
pyzab/voter.py
Python
apache-2.0
6,612
""" Interface for Cobbler's XMLRPC API(s). there are two: a read-only API that koan uses a read-write API that requires logins Copyright 2007-2008, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public ...
javiplx/cobbler-debian
cobbler/remote.py
Python
gpl-2.0
82,406
#!/usr/bin/python3 # -*- coding: UTF-8 -*- """ 本模块用于ADC的读值 ================== 修改时间:2017-3-23 19:09:31 作者:YaHei(zk) 联系方式:929391459@qq.com """ from .pinmap import PinMap pins = PinMap('/proc', 'adc', 6) def analog_read(channel): """ 返回模拟口的ADC读值, A0、A1为6位ADC,返回值范围为0-63; A2、A3、A4、A5为12位ADC,返回值范围为0-4095 ...
wangxuxin/SmartHome
SmartHomeServer/SmartHome/pcduino/adc.py
Python
gpl-3.0
540
""" Pipeline Preprocessing algorithms for Quicklook """ import numpy as np import os,sys import astropy import astropy.io.fits as fits from desispec import io from desispec.io import read_raw,read_image from desispec.io.meta import findfile from desispec.io.fluxcalibration import read_average_flux_calibration from de...
desihub/desispec
py/desispec/quicklook/procalgs.py
Python
bsd-3-clause
51,722
# -*- coding: utf-8 -*- # Copyright 2011 Jiří Janoušek <janousek.jiri@gmail.com> # Copyright 2014 Jaap Karssenberg <jaap.karssenberg@gmail.com> import logging logger = logging.getLogger("zim.objectmanager") from zim.signals import SignalEmitter, SIGNAL_AFTER from zim.utils import WeakSet from zim.config.dicts impo...
Osndok/zim-desktop-wiki
zim/objectmanager.py
Python
gpl-2.0
6,232
from cssselect import HTMLTranslator from lxml import etree import re from capybara.utils import inner_content class HTML(object): def __init__(self, source): if not source: source = "<html/>" parser = etree.HTMLParser(encoding="utf-8") tree = etree.HTML(source, parser=parser...
elliterate/capybara.py
capybara/html.py
Python
mit
780
# -*- coding: utf-8 -*- # Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com> # Copyright © 2017 Dylan Baker # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file from __future__ import absolute_import from __future__ import division from dat...
fnurl/alot
alot/helper.py
Python
gpl-3.0
20,813
from pytest import raises from pyglet.window.key import SPACE, RETURN from pyglet_pages.controls import Button class Works(Exception): pass class CustomButton(Button): def activate(self, symbol, modifiers): raise Works() def test_default_button(): b = Button('Test') ...
chrisnorman7/pyglet-pages
tests/button_test.py
Python
mpl-2.0
505
# domahes a = [1, -20, 38, 0, 44] b = [88, -20, 48, 4, 33, 2] if len(a) > len(b): x = a else: x = b x1 = int(len(x)) x0 = [] for i in x1: if a[i-1] < b[i-1]: x0.add(a[i-1]) if a[i-1] > b[i-1]: x0.add(b[i-1]) print(x0)
domahes88/domahes
dop - 2 - n1.py
Python
apache-2.0
250
# # (c) 2017 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...
fxfitz/ansible
lib/ansible/plugins/netconf/junos.py
Python
gpl-3.0
5,514
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import remove_end class CharlieRoseIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?charlierose\.com/(?:video|episode)(?:s|/player)/(?P<id>\d+)' _TESTS = [{ 'url': 'https://charlierose.com/videos/27996', 'md5': 'fda41d49...
valmynd/MediaFetcher
src/plugins/youtube_dl/youtube_dl/extractor/charlierose.py
Python
gpl-3.0
1,554
# -*- coding: utf-8 -*- # # Copyright 2012 - 2013 Brian R. D'Urso # # This file is part of Python Instrument Control System, also known as Pythics. # # Pythics 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...
dursobr/Pythics
pythics/examples/logistic_map.py
Python
gpl-3.0
4,362
#!/usr/bin/python # 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 distributed...
garyjyao1/ansible
lib/ansible/modules/core/cloud/amazon/ec2_eip.py
Python
gpl-3.0
14,390
from django_tex.environment import environment def hhmm_format(value): total_seconds = value.total_seconds() hours, remainder = divmod(total_seconds, 3600) minutes, seconds = divmod(remainder, 60) return "{:n}:{:02n}".format(hours, minutes) def test_environment(**options): env = environment(**op...
weinbusch/django-tex
tests/environment.py
Python
mit
395
""" Vanilla RNN Parallelizes scan over sequences by using mini-batches. @author Graham Taylor """ import numpy as np import theano import theano.tensor as T from sklearn.base import BaseEstimator import logging import time import os import datetime import cPickle as pickle import random logger = logging.getLogger(__n...
ebuchman/theano-rnn
rnn_minibatch.py
Python
bsd-3-clause
44,781
#python import k3d import testing import copy source_file = "papagayo_example.dat" setup = testing.setup_scalar_source_test("PapagayoLipsyncReader") setup.source.frame_rate = 30 setup.source.interpolate = True setup.source.interpolation_time = 0.2 setup.source.papagayo_file = k3d.filesystem.generic_path(testing.so...
barche/k3d
tests/double/source.PapagayoLipsyncReader.py
Python
gpl-2.0
1,134
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Wordcount exercise Google's Python class The main() below is already defined and comp...
ssarber/google-python-exercises
basic/wordcount.py
Python
apache-2.0
2,205
# -*- coding: utf-8 -*- class OAuthUser: def __init__(self, access_token, user_id): self.user_id = user_id self.access_token = access_token self.email = None self.title = None self.name = None self.avatar_url = None self.description = None def __str_...
lcgong/alchemy
busiserv/login/user.py
Python
gpl-3.0
439
import sys import json from os import path from argparse import ArgumentParser sys.path.append(path.dirname(path.dirname(path.abspath(__file__))) + '/utils/') from algorithm_utils import set_algorithms_output_data from health_check_lib import HealthCheckLocalDT def main(args): # Parse arguments s...
madgik/exareme
Exareme-Docker/src/mip-algorithms/HEALTH_CHECK/global.py
Python
mit
808
import re filename = 'baladhuri_futuh.txt' text = open(filename, mode='r', encoding='utf-8').read() def index_generator(word, text): juz = 'الجزء:' safha = 'الصفحة:' page_regex = juz + r' \d+ ¦ ' + safha + r' \d+' search_regex = word + r'.+?(' + page_regex + ')' pagination = re.findall(search_rege...
jedlitools/find-for-me
ex12_index_generator.py
Python
mit
453
# # 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...
wooga/airflow
tests/operators/test_branch_operator.py
Python
apache-2.0
6,484
class StreamlinkError(Exception): """Any error caused by Streamlink will be caught with this exception.""" class PluginError(StreamlinkError): """Plugin related error.""" class FatalPluginError(PluginError): """ Plugin related error that cannot be recovered from Plugin's should use this ...
chhe/streamlink
src/streamlink/exceptions.py
Python
bsd-2-clause
928
from .iotd_service import IotdService
astrobin/astrobin
astrobin_apps_iotd/services/__init__.py
Python
agpl-3.0
38
#! /usr/bin/env python3 """ Cruft checker and hole filler for overrides @contact: Debian FTPMaster <ftpmaster@debian.org> @copyright: 2000, 2001, 2002, 2004, 2006 James Troup <james@nocrew.org> @opyright: 2005 Jeroen van Wolffelaar <jeroen@wolffelaar.nl> @copyright: 2011 Joerg Jaspert <joerg@debian.org> @license: ...
Debian/dak
dak/check_overrides.py
Python
gpl-2.0
19,666
#!/usr/bin/env python3 import time import pyclamster import logging import numpy as np import os import pickle logging.basicConfig(level=logging.DEBUG) start_time = time.time() # read an image img = pyclamster.image.Image(os.path.join("examples/images/wolf/", "Image_20160527_144000_UTCp1_3.jpg")) # convert to gra...
LEX2016WoKaGru/pyClamster
examples/fisheye/fisheye-wolf.py
Python
gpl-3.0
3,571
# -*- coding: utf-8 -*- from django.conf import settings import requests ERRORS = { 'missing-input-secret': 'reCAPTCHA: O campo chave está vazio', 'invalid-input-secret': 'reCAPTCHA: O campo chave está errado ou inválido', 'missing-input-response': 'reCAPTCHA: O campo de resposta está vazio', 'invalid...
labhackercd/colab-edemocracia-plugin
src/colab_edemocracia/captcha.py
Python
gpl-3.0
890
# -*- coding: utf-8 -*- # # IoC documentation build configuration file, created by # sphinx-quickstart on Fri Mar 29 01:43:00 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All con...
kinkinweb/lhvb
vendor/sonata-project/news-bundle/Resources/doc/conf.py
Python
mit
7,892
#! /usr/bin/env python3 """ This file is part of Pybakalib. Pybakalib 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. Pybakalib is distrib...
vakabus/pybakalib
pybakalib/modules/marks.py
Python
gpl-2.0
3,802
""" Implementation of Burger's equation with nonlinear solve in each timestep """ import sys from dolfin import * from dolfin_adjoint import * n = 30 mesh = UnitIntervalMesh(n) V = FunctionSpace(mesh, "CG", 2) def Dt(u, u_, timestep): return (u - u_)/timestep def main(ic, nu, annotate=False): u_ = Functio...
pf4d/dolfin-adjoint
tests_dolfin/list_parameter/list_parameter.py
Python
lgpl-3.0
1,607
# Generated by Django 2.2.5 on 2019-09-16 15:50 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('registration', '0016_auto_20190914_0836'), ] operations = [ migrations.AddField( model_name='entry', name='source_id...
dbinetti/barberscore
project/apps/registration/migrations/0017_entry_source_id.py
Python
bsd-2-clause
443
#!/usr/bin/env vpython # # Copyright 2020 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. # # Runs WebLayer instrumentation tests against arbitrary versions of tests, the # client, and the implementation. # # Example usage,...
nwjs/chromium.src
weblayer/browser/android/javatests/weblayer_instrumentation_test_versions.py
Python
bsd-3-clause
8,101
# coding: utf8 # Author: Rodrigo Bistolfi # Date: 03/2013 """ Test cases for Nikola ReST extensions. A base class ReSTExtensionTestCase provides the tests basic behaivor. Subclasses must override the "sample" class attribute with the ReST markup. The sample will be rendered as HTML using publish_parts() by setUp(). O...
servalproject/nikola
tests/test_rst_extensions.py
Python
mit
8,282
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2015 OpenMarket Ltd # # 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 req...
illicitonion/synapse
scripts/port_from_sqlite_to_postgres.py
Python
apache-2.0
22,586
import unittest import wradlib as wrl import numpy as np import zlib import tempfile import os import datetime import io # import StringIO from collections import OrderedDict class IOTest(unittest.TestCase): # testing functions related to readDX def test__getTimestampFromFilename(self): ...
jjhelmus/wradlib
wradlib/tests/test_io.py
Python
mit
16,073
# # deluge/ui/web/server.py # # Copyright (C) 2009-2010 Damien Churchill <damoxc@gmail.com> # # Deluge is free software. # # You may 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) ...
inaz2/deluge-hack
deluge/ui/web/server.py
Python
gpl-3.0
24,897
"""Support for PlayStation 4 consoles.""" import logging import asyncio import pyps4_2ndscreen.ps4 as pyps4 from pyps4_2ndscreen.errors import NotReady from homeassistant.core import callback from homeassistant.components.media_player import ENTITY_IMAGE_URL, MediaPlayerDevice from homeassistant.components.media_play...
joopert/home-assistant
homeassistant/components/ps4/media_player.py
Python
apache-2.0
16,283
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2011, 2012, 2013, 2014, 2015 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (a...
chokribr/invenio
invenio/modules/collections/models.py
Python
gpl-2.0
28,007
class Linearizer (): def __init__ (self, header='', separator='', footer='', graph=None): self.graph = graph self.separator = separator self.header = header self.footer = footer def linearize (self): nodes = self.get_root_nodes() nodes = self.expand_node_list(no...
agarsev/grafeno
grafeno/linearizers/base.py
Python
agpl-3.0
2,009
# 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...
ghchinoy/tensorflow
tensorflow/python/ops/signal/fft_ops.py
Python
apache-2.0
16,184
# -*- coding: utf-8 -*- """ Manual Steps ~~~~~~~~~~~~ Requirements: * **koji** package * package with a koji profile (if needed) Inputs: * **profile** - koji instance in which the change will be made * **owner** - package owner * **tag** - release (a.k.a. main) koji tag name for a release * **package** - name of pa...
release-engineering/releng-sop
releng_sop/koji_create_package_in_release.py
Python
mit
6,911
""" This module defines various utilities for dealing with the network. """ from asyncio import iscoroutinefunction, iscoroutine def combine_action_handlers(*handlers): """ This function combines the given action handlers into a single function which will call all of them. """ # make su...
aaivazis/nautilus
nautilus/network/events/util.py
Python
mit
910
import os import redis redis_url = os.getenv("REDIS_URL", "redis://127.0.0.1:6379") redis_conn = redis.from_url(redis_url)
tmpapageorgiou/spitter
spitter/connection.py
Python
mit
125
# -*- coding:utf-8 -*- from flask import Flask from flask_bootstrap import Bootstrap from admin import create_admin from models import db, Post, User from views import blog from flaskext.markdown import Markdown from flask_login import LoginManager def creatApp(): app = Flask(__name__) Bootstrap(app) app.config.fr...
DoubleHYH/my_Blog
app/__init__.py
Python
mit
1,366
"""Store functional test data parameters here. (This makes it easier to ensure your private data does not leak out in your source code.) Rename this file as params.py so the tests can locate it.""" valid_mdn = '' #For tests requiring a valid MDN optin_mdn = '' #For account tests requiring an MDN invalid_mdn = '1234' #...
ericem/sprintkit
tests/functional/sample_params.py
Python
mit
427
# -*- coding: utf-8 -*- """ Started on mon, apr 23rd, 2018 @author: carlos.arana """ # Librerias utilizadas import pandas as pd import sys module_path = r'D:\PCCS\01_Dmine\Scripts' if module_path not in sys.path: sys.path.append(module_path) from VarInt.VarInt import VarInt from classes.Meta import Meta from Com...
Caranarq/01_Dmine
04_Edificaciones/P0406/P0406.py
Python
gpl-3.0
2,794
# Audio backend used by pyo # http://ajaxsoundstudio.com/pyodoc/api/classes/server.html BACKEND = 'portaudio' # multiplatform #BACKEND = 'jack' # Linux and Mac, if you know what you are doing #BACKEND = 'coreaudio' # Mac only, untested # OSC adresses OSC_EYE = ('localhost', 1420) OSC_EAR = ('localhost', 1422...
ff-/pineal
config.py
Python
agpl-3.0
380
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import AppConfig class FarmFieldConfig(AppConfig): name = 'farm_field'
jknaresh/farmer
farm_field/apps.py
Python
mit
159
__version__ = '0.5.0.dev0+git'
bjodah/pycompilation
pycompilation/_release.py
Python
bsd-2-clause
31
"""Support for Dyson Pure Cool Link devices.""" import logging import voluptuous as vol from homeassistant.const import ( CONF_DEVICES, CONF_PASSWORD, CONF_TIMEOUT, CONF_USERNAME) from homeassistant.helpers import discovery import homeassistant.helpers.config_validation as cv REQUIREMENTS = ['libpurecoollink==0....
HydrelioxGitHub/home-assistant
homeassistant/components/dyson/__init__.py
Python
apache-2.0
3,817
# This file is a part of MediaDrop (http://www.mediadrop.net), # Copyright 2009-2015 MediaDrop contributors # For the exact contribution history, see the git revision log. # The source code contained in this file is licensed under the GPLv3 or # (at your option) any later version. # See LICENSE.txt in the main project ...
jobsafran/mediadrop
mediadrop/model/settings.py
Python
gpl-3.0
4,208
# 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...
jwlawson/tensorflow
tensorflow/python/feature_column/feature_column.py
Python
apache-2.0
116,403
#! /usr/bin/env python # # Load a FITS cube , extract the spectrum at a (or reference) pixel # and operate and plot some and then more.... # # # 22-jun-2017 PJT summer project - cloned off cubespectrum.py # july-2017 Thomas/Peter various improvements # # @todo # - have optional RESTFRQ or RE...
astroumd/n253lines
cubespectrum2.py
Python
mit
4,302
#!/usr/bin/env python3 import json import os import unittest import requests AGNOS_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__))) MANIFEST = os.path.join(AGNOS_DIR, "agnos.json") class TestAgnosUpdater(unittest.TestCase): def test_manifest(self): with open(MANIFEST) as f: m = json.load(f...
commaai/openpilot
selfdrive/hardware/tici/test_agnos_updater.py
Python
mit
595
""" This is used to make star field backgrounds. """ import sys, random, pygame, glob, fnmatch from pygame.locals import * # star colors # spectral type R G B SPECTRA = { 'O': (225,225,255), \ 'B': (225,255,255), \ 'A': (255,255,255), \ 'F': (255,255,225), \ 'G': (255,255,200), \ 'K': (25...
bobgeis/LookOutSpacePirates
starMaker.py
Python
bsd-3-clause
1,541
#!/usr/bin/env python # 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 unittest import pyauto_functional # Must be imported before pyauto import pyauto import pyauto_errors class PyAutoTest(p...
keishi/chromium
chrome/test/functional/test_pyauto.py
Python
bsd-3-clause
1,808