code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='polls_index'), ]
topseer/django
dJangoAdmin/polls/urls.py
Python
mit
127
import logging import os import threading from math import ceil import mongoops import tempfile class RetrievalManager(): def __init__(self, db, client, vault_name): self.client = client self.db = db self.logger = logging.getLogger("cupobackup{0}.RetrievalManager".format(os.getpid())) ...
calmcl1/cupo-backup
cupocore/RetrievalManager.py
Python
mit
5,033
# coding: utf-8 """ Salt Edge Account Information API API Reference for services # noqa: E501 OpenAPI spec version: 5.0.0 Contact: support@saltedge.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import swagger_cl...
ltowarek/budget-supervisor
third_party/saltedge/test/test_insurance_account_extra.py
Python
mit
966
import io import json import logging import time from itertools import islice from django.apps import apps from django.db.models.fields.related import ForeignKey from sqlalchemy import or_ from sqlalchemy.dialects.postgresql import insert from sqlalchemy.exc import OperationalError from sqlalchemy.exc import SQLAlchem...
learningequality/kolibri
kolibri/core/content/utils/channel_import.py
Python
mit
46,557
# vim:ts=4:sts=4:sw=4:expandtab """A slave (satellite) event coordinator. """ import collections from _multiprocessing import Connection from satori.objects import Argument from .api import Manager from .client import CoroutineClient, Scheduler class FifoScheduler(Scheduler): """A simple FIFO Scheduler. "...
zielmicha/satori
satori.events/satori/events/slave.py
Python
mit
3,046
#!/usr/bin/env python # -*- coding: utf-8 -*- """ relative_dates.py: Getting a new relative date. """ from datetime import datetime from dateutil.relativedelta import relativedelta __author__ = "Breno RdV" __copyright__ = "Breno RdV @ raccoon.ninja" __contact__ = "http://raccoon.ninja" __license__ = "M...
brenordv/python-snippets
fun-with-dates/relative_dates.py
Python
mit
599
# -*- coding: utf-8 -*- '''Code adapted from the pattern.fr library. See the NOTICE file for license information. ''' #### PATTERN | FR ################################################################################## # -*- coding: utf-8 -*- # Copyright (c) 2013 University of Antwerp, Belgium # Copyright (c) 2013 St...
sloria/textblob-fr
textblob_fr/fr.py
Python
mit
8,019
#!/usr/bin/env python """ Copyright (C) 2014 Ivan Gregor 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 version. ...
CAMI-challenge/evaluation
binning/igregor/algbioi/eval/confusion_matrix.py
Python
mit
19,118
from flask import render_template, redirect, request, url_for, flash from flask_login import login_user, logout_user, login_required, \ current_user from . import classbp from .. import db from ..models import User, Student, Class, Permission from ..email import send_email from .forms import NewClassForm, EditProfi...
siwl/test_website
app/classbp/views.py
Python
mit
2,065
#!/usr/bin/python ##------------------------------------------------------------------- ## @copyright 2017 DennyZhang.com ## Licensed under MIT ## https://www.dennyzhang.com/wp-content/mit_license.txt ## ## File : git_pull_codedir.py ## Author : Denny <contact@dennyzhang.com> ## Description : ## Sample: ## p...
DennyZhang/devops_public
python/git_tool/git_pull_codedir.py
Python
mit
2,103
from distutils.core import setup import os.path README = os.path.join(os.path.dirname(__file__), 'README.rst') setup(name='pqdict', version='0.1', description='An indexed priority queue implementation with a dictionary interface', author='Nezar Abdennur', author_email='nabdennur@gmail.com', ...
saguila/AlgoritmoA
setup.py
Python
mit
1,058
# coding: utf8 from __future__ import print_function def main(): pass if __name__ == '__main__': pass
zoowii/pia-cloud
blobstore/server.py
Python
mit
113
#!/usr/local/bin/python3 import sys import xmlrpc.client proxy = xmlrpc.client.ServerProxy('http://transam.your.domain.com:1967/', allow_none=True) result = proxy.GetMany("", 'test_db', 'test_item', ['1001']) if '1001' in result and 'name' in result['1001']: print('Success: test_db item 1001 found') sys.exit(0) ...
ghowland/versionman
monitor.py
Python
mit
402
""" Sample Python File with No PEP8 Errors. Used for testing the pep8.Tool """ def does_something(thing): """Do a thing and then return.""" return thing.buzz()
markstory/lint-review
tests/fixtures/flake8/no_errors.py
Python
mit
171
import asyncio from typing import Any import aiohttp from run_test_service_helper import start_service def test_start_process_http_later_request(monkeypatch: Any, capsys: Any, loop: Any) -> None: func, future = start_service("tests/services/start_process_service_http_2.py", monkeypatch, wait=False) port = 5...
kalaspuff/tomodachi
tests/test_start_process_http_2.py
Python
mit
1,072
import os BASEDIR = os.path.abspath(os.path.dirname(__file__)) SEARCHDIRS = ['E:\\1080p', 'E:\\720p', 'E:\\3D', 'E:\\DvD.BRRip.R5', 'I:\\3D', 'T:\\720p', 'T:\\1080p Movies', 'W:\\', 'X:\\1080p', ...
LobsterBandit/Movie_List
config.py
Python
mit
1,594
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import copy import datetime import pytest import processors.ictrp.extractors as extractors class TestICTRPExtractors(object): @pytest.mark.p...
arthurSena/processors
tests/processors/ictrp/test_extractors.py
Python
mit
1,429
# -*- coding: utf-8 -*- """ Created on Mon Jun 23 14:11:22 2014 @author: mstreet """ import unittest import numpy as np import annexCeqns as ISO # import pdb class ISOtestSetUp(unittest.TestCase): def setUp(self): self.cases = np.array(xrange(1,4)) # transmission coefficients self.H_v = n...
MStreet3/STG_Modeling
simpleHourlyModel/tests/test_annexCeqns_01.py
Python
mit
12,053
# vim:fileencoding=utf-8 # Python 3.4+ import argparse import hashlib import sys from traceback import print_exc def hash_file (name, algo): h = hashlib.new(algo) with open(name, 'rb') as f: h.update(f.read()) return h.hexdigest() def create_arg_parser (**kwargs): p = argparse.ArgumentParser(...
sapphirecat/hashsum
hashsum.py
Python
mit
1,021
from discord.ext import commands import discord class revimage: """Reverse image search commands""" def __init__(self, bot): self.bot = bot @commands.command(pass_context=True) async def revimg(self, ctx, url=None): """Reverse Image Search using several popular reverse search services...
MadamJazzy/JazzyCogs
revimage/revimage.py
Python
mit
1,534
""" 14.43% """ class Solution(object): def singleNumber(self, nums): """ :type nums: List[int] :rtype: int """ result = {} for index, num in enumerate(nums): result[num] = result[num] + 1 if result.has_key(num) else 1 for key, value in result.item...
cnluocj/leetcode
136-single-number/single_number.py
Python
mit
422
# -*- coding: utf-8 -*- # code for console Encoding difference. Dont' mind on it import sys import imp imp.reload(sys) try: sys.setdefaultencoding('UTF8') except Exception as E: pass import testValue from popbill import StatementService, PopbillException statementService = StatementService(testValue.LinkID,...
linkhub-sdk/popbill.statement.example.py
sendEmail.py
Python
mit
1,404
import _plotly_utils.basevalidators class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="cauto", parent_name="scatterpolargl.marker.line", **kwargs ): super(CautoValidator, self).__init__( plotly_name=plotly_name, parent_...
plotly/plotly.py
packages/python/plotly/plotly/validators/scatterpolargl/marker/line/_cauto.py
Python
mit
483
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # i3assist documentation build configuration file, created by # sphinx-quickstart on Sat Nov 5 04:44:59 2016. # # 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 # a...
DustinMorado/i3assist
docs/conf.py
Python
mit
10,090
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # checkprgver.py file is part of spman # # spman - Slackware package manager # Home page: https://github.com/MyRequiem/spman # # Copyright (c) 2018 Vladimir MyRequiem Astrakhan, Russia # <mrvladislavovich@gmail.com> # All rights reserved # See LICENSE for details. """ ...
MyRequiem/spman
src/checkprgver.py
Python
mit
2,260
#!/usr/bin/env python # coding=utf-8 """ __created__ = '2/9/15' __author__ = 'deling.ma' """
madre/devops
xadmin/migrations/__init__.py
Python
mit
94
#!/usr/bin/env python import numpy as np from activation import sigmoid def forward(Theta, X, active): N = X.shape[0] # Add the bias column X_ = np.concatenate((np.ones((N, 1)), X), 1) # Multiply by the weights z = np.dot(X_, Theta.T) # Apply the activation function a = active(z) ...
bmtgoncalves/IFISC2017
forward.py
Python
mit
786
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "balu.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
DmitryRendov/balu-site
balu/manage.py
Python
mit
247
#!/usr/bin/env python3 import socket from socket import AF_INET, SOCK_STREAM import sys from ardei_utils import ardei_client_utils Utils = ardei_client_utils # SETTINGS PrintFile = False # Specify if recieved files are to be output to terminal or not. recvBuffSize = 1024 # How large each chunk of TCP data is that ge...
weleoka/ardeidae_py
tcpcli.py
Python
mit
2,877
from setuptools import find_packages, setup name = 'proppy' setup( name=name, version='0.1.0', url='https://github.com/WeAreWizards/proppy', license='MIT', description='A proposal generator', long_description='A proposal generator', author='We Are Wizards', author_email='vincent@weare...
WeAreWizards/proppy
setup.py
Python
mit
748
from django.conf import settings from django.contrib.sites.models import Site from django.core.urlresolvers import reverse, NoReverseMatch from requests_oauthlib import OAuth1 as OAuth1Auth import requests, shortuuid try: from urllib import urlencode from urlparse import parse_qs except ImportError: from...
caffeinehit/dendrite
dendrite/oauth1.py
Python
mit
3,232
#!/usr/bin/env python3 import io import tempfile import unittest from collections import namedtuple test_data = ''' this is not an important line. The version is listed below. [version] thing=3.1.12 node["thing"]["version"] = 3.1.12 my: thing: version: 3.1.12 thing2: version: 0.11.23 dev: version:...
jad-b/garden
garden/bumper_test.py
Python
mit
1,339
from abc import ABCMeta, abstractmethod import inspect import types # TODO this is not nice.... what does this represent..? class Distribution(metaclass=ABCMeta): def __init__(self, *, cond=None): if cond is None: cond = () xfactories = cond self.xfactories = xfactories ...
bigblindbais/pytk
src/pytk/factory/random/distribution.py
Python
mit
350
from pytest_factoryboy import register from .factories import OrderFactory, PaymentFactory, PaywallEntryFactory register(PaymentFactory) register(OrderFactory) register(PaywallEntryFactory)
cypreess/django-getpaid
tests/conftest.py
Python
mit
192
class Solution(object): def ispalindrome(self,strs): l,r=0,len(strs)-1 while l<r: if strs[l]!=strs[r]: return False l+=1 r-=1 return True def palindromePairs(self, words): """ :type words: List[str] ...
Tanych/CodeTracking
336-Palindrome-Pairs/solution.py
Python
mit
1,506
import json import logging from pyramid.httpexceptions import HTTPBadRequest, HTTPForbidden, HTTPNotFound from pyramid.response import Response from pyramid.view import view_config from community_csdt.src.models.login import * class LoginView(object): def __init__(self, context, request): self.context = ...
electricity345/community.csdt
src/community_csdt/community_csdt/src/views/login_view.py
Python
mit
4,053
"""Conway's Game Of Life, Author Anurag Kumar(mailto:anuragkumarak95@gmail.com) Requirements: - numpy - random - time - matplotlib Python: - 3.5 Usage: - $python3 game_o_life <canvas_size:int> Game-Of-Life Rules: 1. Any live cell with fewer than two live neighbours dies, as if caused by under-popula...
TheAlgorithms/Python
cellular_automata/game_of_life.py
Python
mit
3,199
# -*- coding:utf-8 -*- import unittest, sys, os, re, random, string, time, subprocess sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import socket, struct from datetime import datetime from saklient.util import Util from saklient.cloud.api import API from saklient.cloud.resources.swytch i...
hnakamur/saklient.python
tests/test_loadbalancer.py
Python
mit
10,963
# sudo apt-get install python-dev # python setup.py build_ext --inplace from distutils.core import setup, Extension setup(ext_modules=[Extension("_core_dump", ["python_binding.cpp", "list_build_ids.cpp"])])
leculver/dotnet-reliability
toolbox/list_build_ids/setup.py
Python
mit
209
# 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 ...
jvpoulos/Attention-OCR
src/model/seq2seq.py
Python
mit
51,453
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <markdowncell> # #Use CSW to find CMG_Portal data # <codecell> from owslib.csw import CatalogueServiceWeb from owslib import fes import numpy as np # <codecell> endpoint = 'http://geoport.whoi.edu/csw' csw = CatalogueServiceWeb(endpoint,timeout=60) print csw...
rsignell-usgs/notebook
CSW/pycsw-servicetype-issue.py
Python
mit
1,506
# -*- coding: utf-8 -*- # # tweeter documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a...
gwhigs/tweeter
docs/conf.py
Python
mit
7,866
import os from urllib.request import urlretrieve import pandas as pd FERMONT_URL = 'https://data.seattle.gov/api/views/65db-xm6k/rows.csv?accessType=DOWNLOAD' def get_fremont_data(filename='Fremont.csv', url=FERMONT_URL, force_download=False): """Download and cache the Fremont data Para...
antoinehirtz/jupyterWorkflow
jupyterworkflow/data.py
Python
mit
1,048
#coding=utf-8 import json import nltk import os import utils import traceback n_dict = {} adj_dict = {} adv_dict = {} inverse_dict = [] posdict = [] negdict = [] ################ read in all the files ################## # comment_list = getComments(jcontent) id_list = ['3133817'] comments = [] comments_dict = {} allr...
chuncaohenli/clp_project
sentiment analysis/sentiment_tfidf.py
Python
mit
7,086
nomes_list = [ "Aaren" , "Aarika" , "Abagael" , "Abagail" , "Abbe" , "Abbey" , "Abbi" , "Abbie" , "Abby" , "Abbye" , "Abigael" , "Abigail" , "Abigale" , "Abra" , "Ada" , "Adah" , "Adaline" , "Adan" , "Adara" , "Adda" , "Addi" , "Addia" , "Addie" , "Addy" , "Adel" , "Adela" , "Adelaida" , "Adelaide" , "Adele" , "Adelhei...
Pharaoh00/Pharaoh-Toolkit
0.0.6/modulos/listas/nomesLista.py
Python
mit
97,171
##!/usr/bin/env python ## -*- coding: cp1252 -*- from pylab import * import pylab as p import numpy #from scipy.interpolate import interp1d from scipy import interpolate Str_1 = loadtxt('SharpWeir.txt') x = Str_1[:,0] y = Str_1[:,1] NumCases=1 CaseCode = ['18_R4_INF2']#, '18_R5_INF1'] NumCol=15 NumProfiles=[6]#,8]...
erdc-cm/air-water-vv
2d/hydraulicStructures/sharp_crested_weir/deprecated/sharp_crested_weir_AV_V1/Profile_Comparison_Proteus.py
Python
mit
5,573
# -*- coding: utf-8 -*- # vim:se fenc=utf8 noet: from .base import Base from os.path import isdir class Filter(Base): def __init__(self, vim): super().__init__(vim) self.name = 'devicons_denite_converter' self.description = 'add devicons in front of candidates' def filter(self, context): for candidate in c...
lerrua/vim-devicons
rplugin/python3/denite/filter/devicons_denite_converter.py
Python
mit
1,074
# pylint: disable=line-too-long # pylint: disable=bad-whitespace # I just like to watch the world burn: # pylint: disable=mixed-indentation # pylint: disable=invalid-name """This should be a comprehensive testsuite for Pymarquise's functionality.""" import sys import os import pytest from marquise import Marquise # ...
anchor/pymarquise
test_pymarquise.py
Python
mit
9,871
import dataclasses from typing import List, Optional from pydantic import Field from pydantic.dataclasses import dataclass @dataclass class User: id: int name: str = 'John Doe' friends: List[int] = dataclasses.field(default_factory=lambda: [0]) age: Optional[int] = dataclasses.field( default=...
samuelcolvin/pydantic
docs/examples/dataclasses_default_schema.py
Python
mit
554
from azflow.Task import Task class BashOperator(Task): def __init__(self, task_id, dag, bash_command): Task.__init__(self, task_id, dag) self.bash_command = bash_command self.job_type = 'command' def render(self): rendered = Task.render(self) rendered += 'comma...
aslotnick/azflow
azflow/BashOperator.py
Python
mit
376
from lightning.types.base import Base from lightning.types.decorators import viztype from lightning.types.utils import array_to_lines, vecs_to_points, add_property @viztype class LineStreaming(Base): _name = 'line-streaming' _func = 'linestreaming' _local = False _options = dict(Base._options, **{ ...
peterkshultz/lightning-python
lightning/types/streaming.py
Python
mit
4,338
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import pkgutil from collections import defaultdict from collections import namedtuple from twitter.common.collections import OrderedSet from pants.backend.p...
toddgardner/pants-plugins
src/python/verst/pants/ensime/tasks/ensime.py
Python
mit
4,930
"""Basic tests suite for aiohttp app.""" from unittest.mock import patch from feature_api.app import build_application @patch('aiomysql.sa.create_engine') # temporarily mock DB connection async def test_app(test_client, loop): """Check availability of the feature flags collection endpoint.""" app = await b...
open-craft-guild/aio-feature-flags
tests/app_test.py
Python
mit
537
import datetime from apscheduler.schedulers.blocking import BlockingScheduler from .pushFeedJobs import pushFeedJobs from .pushLinkJobs import pushLinkJobs from .clusterDocsJob import clusterDocsJob from .archiveStaleDocs import archiveStaleDocs from .reprocessCurrentClusters import reprocessCurrentClusters from .not...
adityabansal/newsAroundMe
newsApp/clock.py
Python
mit
2,003
# SPDX-License-Identifier: MIT # Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2012-2014 Bastian Kleineidam # Copyright (C) 2015-2021 Tobias Gruetzmacher # Copyright (C) 2019-2020 Daniel Ring import json from re import compile, escape, IGNORECASE from ..helpers import indirectStarter fr...
webcomics/dosage
dosagelib/plugins/m.py
Python
mit
8,908
""" Plugins used by pi3bar. """ from pi3bar.plugins.base import Plugin from pi3bar.version import __version__ class Version(Plugin): """ Pi3Bar plugin to show the current pi3bar version. It is shown for a moment after starting i3bar. """ full_text = 'pi3bar version %s' % __version__ short_tex...
knoppo/pi3bar
pi3bar/plugins/utils.py
Python
mit
566
import fresh_tomatoes import media blind_side = media.Movie("The Blind Side", "The remarkable true story of all-American football star Michael Oher", "http://upload.wikimedia.org/wikipedia/en/thumb/6/60/Blind_side_poster.jpg/220px-Blind_side_poster.jpg", "https://...
clongmore/program-with-objects_1
entertainment_center.py
Python
mit
2,235
import numpy as np from chainer.backends import cuda from chainercv.links.model.faster_rcnn.utils.bbox2loc import bbox2loc from chainercv.utils.bbox.bbox_iou import bbox_iou class ProposalTargetCreator(object): """Assign ground truth bounding boxes to given RoIs. The :meth:`__call__` of this class generate...
yuyu2172/chainercv
chainercv/links/model/faster_rcnn/utils/proposal_target_creator.py
Python
mit
6,061
import _plotly_utils.basevalidators class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="icicle.hoverlabel", **kwargs ): super(AlignsrcValidator, self).__init__( plotly_name=plotly_name, parent_name...
plotly/plotly.py
packages/python/plotly/plotly/validators/icicle/hoverlabel/_alignsrc.py
Python
mit
420
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from setuptools import setup, find_packages from cmsplugin_reveal import __version__ try: from pypandoc import convert except ImportError: import io def convert(filename, fmt): with io.open(filename, encoding='ut...
jrief/djangocms-reveal
setup.py
Python
mit
1,570
# -*- coding: utf-8 -*- from PyQt5.QtWidgets import * from PyQt5.QtCore import * class ParameterWidget(QWidget): def __init__(self, parent=None): super(ParameterWidget, self).__init__(parent) self.formLayout = QFormLayout() self.widthLineEdit = QLineEdit() self.widthLineEdit.setT...
tatsy/bssrdf-estimate
bssrdf_estimate/interface/control_widget.py
Python
mit
2,883
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
lmazuel/azure-sdk-for-python
azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_document_py3.py
Python
mit
2,515
#!/usr/bin/env python from omics_pipe.parameters.default_parameters import default_parameters from omics_pipe.utils import * p = Bunch(default_parameters) def varscan2_segmentation(sample, varscan2_segmentation_flag): '''Runs DNAcopy from Bioconductor on Varscan2 copynumber output to apply circular binary segmen...
adammaikai/PipeMaster
modules/varscan2_segmentation.py
Python
mit
1,285
#!/usr/bin/env python3 # Copyright (c) 2017-2019 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 the listsincelast RPC.""" from test_framework.test_framework import BitcoinTestFramework from tes...
jtimon/bitcoin
test/functional/wallet_listsinceblock.py
Python
mit
10,341
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # gspread-dataframe documentation build configuration file, created by # sphinx-quickstart on Fri Mar 10 22:46:18 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in...
robin900/gspread-dataframe
docs/conf.py
Python
mit
5,130
# -*- coding: utf-8 -*- ''' Created on 10.10.2014 @author: Simon Gwerder ''' import goslate from utilities.retry import retry class GoogleTranslator: gs = goslate.Goslate() @retry(Exception, tries=3) def translateENtoDE(self, text): return self.gs.translate(text, 'de', 'en') @retry(Exceptio...
geometalab/OSMTagFinder
OSMTagFinder/utilities/GoogleTranslator.py
Python
mit
1,337
import numpy as np import pyroomacoustics as pra room = pra.ShoeBox([4, 6], fs=16000, max_order=1) # add sources in the room room.add_source([2, 1.5]) # nice source room.add_source([2, 4.5]) # interferer # add a circular beamforming array shape = pra.circular_2D_array([2.5, 3], 8, 0.0, 0.15) bf = pra.Beamformer(sh...
LCAV/pyroomacoustics
pyroomacoustics/tests/test_rake_filters.py
Python
mit
1,391
DEFAULT_UDP_PORT = 5001 LOCALHOST = '127.0.0.1' SIGNAL_QUEUE_LENGTH = 1024
PolyCortex/pyMuse
pymuse/inputstream/constants.py
Python
mit
75
# coding=utf8 """ imdb.py - Willie Movie Information Module Copyright © 2012-2013, Elad Alfassa, <elad@fedoraproject.org> Licensed under the Eiffel Forum License 2. This module relies on imdbapi.com """ from __future__ import unicode_literals import json import willie.web as web import willie.module from willie.logger...
freifunk-darmstadt/ffda-jarvis
willie/willie/modules/movie.py
Python
mit
1,800
# -*- coding: utf-8 -*- # MIT License # # Copyright (c) 2014-2020 Budget Insight # # 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 right...
budgetinsight/budgea-clients
budgea_api.py
Python
mit
9,548
from django.conf.urls import url, include from hordak.views import accounts, statement_csv_import from hordak.views import transactions app_name = "hordak" urlpatterns = [ url( r"^transactions/create/$", transactions.TransactionCreateView.as_view(), name="transactions_create", ), ...
waldocollective/django-hordak
hordak/urls.py
Python
mit
2,243
#-*- coding: utf-8 -*- import pygame import math from arme import Arme from lib.sprites import Sprites from projectiles.projectileDroitRouge import ProjectileDroitRouge ''' rotation @param {tuple} tup Le vecteur à faire tourner @param {number} angle L'angle en degrés @return {tuple} Rot...
PolySlug/polyslug
armes/fusilPompe.py
Python
mit
1,809
from django.test import override_settings class TempalteBackendBaseMixin(object): @override_settings(TEMPLATED_EMAIL_TEMPLATE_DIR='test_prefix') def test_uses_prefix_from_config(self): backend = self.template_backend_klass() self.assertEquals(backend.template_prefix, 'test_prefix') @over...
BradWhittington/django-templated-email
tests/backends/utils.py
Python
mit
922
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-09 19:40 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('blog', '0002_auto_20170206_210...
debasishbai/django_blog
blog/migrations/0003_comment.py
Python
mit
984
import bisect import bucket import cross_bundle_bucket import pairedread import copy import random import time class Alignments: ''' A set of reads aligned to a genome ''' def __init__(self, chromosomes, frag_len_cutoff=None, split_discordant=True): ''' Initialize a genome for alignments ...
jpritt/boiler
alignments.py
Python
mit
80,557
from . import TheInternetTestCase from helium.api import find_all, Text, click, S class TablesTest(TheInternetTestCase): def get_page(self): return "http://the-internet.herokuapp.com/tables" def test_table_sorting_example1(self): last_names = [ txt.value for txt in find_all(Text(below="Last Name", above="E...
bugfree-software/the-internet-solution-python
tests/test_tables.py
Python
mit
1,066
from office365.sharepoint.base_entity import BaseEntity from office365.sharepoint.internal.paths.entity_resource import EntityResourcePath class SiteProperties(BaseEntity): """Contains a property bag of information about a site.""" def __init__(self, context): super(SiteProperties, self).__init__(con...
vgrem/Office365-REST-Python-Client
office365/sharepoint/tenant/administration/site_properties.py
Python
mit
2,988
from django.contrib import admin from .models import (Chore, AssignedChores, Task) @admin.register(Chore) class ChoreAdmin(admin.ModelAdmin): list_display = ('name', 'frequency', 'value', 'active') list_editable = ('value', 'active') list_filter = ('frequency', 'active') ordering = ('name',) searc...
earnshaws/chorlie-bucket
chores/admin.py
Python
mit
559
import lldb import shlex from helpers.environment_checks import EnvironmentChecks from subprocess import call def accessibility_tree(debugger, command, result, internal_dict): """Prints a recursive tree of accessibility elements for a given object. Note: This command can only be run while VoiceOver is running. ...
mrhappyasthma/HappyDebugging
scripts/accessibility_tree.py
Python
mit
3,660
import subprocess import re import os import shlex import datetime def dpkg_check(packagename): """ Checks the installation status of packages that need to be checked via dpkg -s <packagename>. Returns True if installed, False if not. """ dpkg_success = "Status: install ok installed" compare_r...
jtakayama/makahiki-installation-python-scripts
install/ubuntu/dependency_ubuntu.py
Python
mit
44,911
""" web module. ========= Provides: 1. Asynchronous execution of Websockets How to use the documentation ---------------------------- Documentation is available in one form: docstrings provided with the code Copyright (c) 2016, Edgar A. Margffoy. MIT, see LICENSE for more details. """ import websockets.term_ws...
andfoy/spyder-terminal
spyder_terminal/server/websockets/__init__.py
Python
mit
344
# encoding: utf-8 from __future__ import absolute_import from __future__ import unicode_literals import os import shutil import stat from tempfile import NamedTemporaryFile try: import simplejson as json except ImportError: import json from nose.tools import assert_equal, assert_not_equal import json_store ...
brainsik/json-store-ci-demo
tests/test_json_store.py
Python
mit
4,661
#!/usr/bin/env python # coding=utf-8 import os from glob import glob import platform if os.environ.get('USE_SETUPTOOLS'): from setuptools import setup setup # workaround for pyflakes issue #13 setup_kwargs = dict(zip_safe=0) else: from distutils.core import setup setup_kwargs = dict() if os.name...
datafiniti/Diamond
setup.py
Python
mit
4,601
from django.db import models from django.contrib.auth.models import User from core.models import Patient class ResultsManager(models.Manager): """ Test Results Manager that helps create Test Results without too much code """ def create_test(self, name, notes, files, patient, doctor, date): re...
jimga150/HealthNet
HealthNet/testResults/models.py
Python
mit
1,114
class FailHook(Exception): pass
EliRibble/mothermayi
mothermayi/errors.py
Python
mit
37
import os from .base import * # noqa import os DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'mysql', 'USER': 'mysql', 'PASSWORD': 'mypass', 'HOST': 'localhost', 'PORT': '3306', } } CACHES = { 'default': { 'BACKEND': 'red...
wanghaven/readthedocs.org
readthedocs/settings/mysql.py
Python
mit
2,423
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ ZetCode PyQt5 tutorial This program creates a quit button. When we press the button, the application terminates. author: Jan Bodnar website: zetcode.com last edited: January 2015 """ import sys from PyQt5.QtWidgets import QWidget, QPushButton, QApplication from PyQ...
mskovacic/Projekti
raspberrypi/isprobavanje/pyqt5/Closing_a_window.py
Python
mit
954
#!/usr/bin/env python3 # sparseramsey.py # Glenn G. Chappell # Date: 26 Aug 2016 # Requires Python 3. """Compute k-sparse Ramsey numbers & related extremal graphs. Command-line usage: sparseramsey.py [OPTIONS] k a b Compute and print the generalized Ramsey number R_k(a, b), along with extremal graphs, using "DOT la...
ggchappell/GraphR
sparseramsey.py
Python
mit
10,016
import random from sqlalchemy import * from migrate import * import migrate.changeset # monkeypatches Column from sqlalchemy import orm from sqlalchemy.ext.declarative import declarative_base TableBase = declarative_base(bind=migrate_engine) class User(TableBase): __tablename__ = 'users' id = Column(Intege...
veekun/spline
splinext/users/migration/versions/002_Add_User_unique_identifier.py
Python
mit
904
import unittest from nhs import validate class test_validation(unittest.TestCase): def test_valid_numbers(self): """ Test to ensure validation works on a range of valid formats """ l = ['999 999 9468','999-999-9484', ' 999 999 9514 ', '9999999565'] for i in l: try: response = validate(i) self...
mattseymour/NhsNumberValidation
tests/test_validation.py
Python
mit
1,149
# -*- coding: utf-8 -*- import json import requests from django.http import HttpResponse from django.conf import settings from xml.dom.minidom import parseString def steam(request, username): # Make request to steamcommunity.com with the username to get the 64-bit Steam ID username_r = requests.get('http://s...
upstage/example-project
src/generators/syte/syte/views/steam.py
Python
mit
3,439
""" Implements a special view to visualize and stage pieces of a project's current diff. """ import os import re import bisect import sublime from sublime_plugin import WindowCommand, TextCommand, EventListener from ..git_command import GitCommand from ...common import util DIFF_TITLE = "DIFF: {}" DIFF_CACHED_TITL...
ypersyntelykos/GitSavvy
core/commands/diff.py
Python
mit
7,201
#!/usr/bin/python import sys import os import shlex import subprocess import argparse class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' app_name = 'secureproxy' parser = argparse.ArgumentParser(description='Manage %s container' ...
catatnight/docker-secureproxy
manage.py
Python
mit
2,456
""" Title: MsLpf - Micro-strip Low Pass Filter Author: Ricardo Alejos Date: 2016-09-20 Description: Generates and runs a Micro-strip structure using Sonet. Version: 1.0.0 Comments: - """ # Import Python's built-in modules import re as _re import math as _math import shutil as _shutil i...
ricardoalejos/RalejosMsrElcDsn
SmdAngPtnSnt/pkg/ObjectiveFunctions/MsLpf.py
Python
mit
13,880
#!/Users/tiffanyglenn-hall/djangogirls/myvenv/bin/python3 from django.core import management if __name__ == "__main__": management.execute_from_command_line()
ttglennhall/DjangoGirlsTutorial
myvenv/bin/django-admin.py
Python
mit
164
import os import re import json import base64 import logging import datetime import time import copy import decimal import cgi import itertools import StringIO import subprocess import gevent import gevent.pool import gevent.ssl import numpy import pymongo from geventhttpclient import HTTPClient from geventhttpclient....
patricklodder/dogeblockd
lib/util.py
Python
mit
20,902
from pwn import * import time, random, urllib2, urllib def f(req): time.sleep(random.random()) f = urllib2.urlopen('http://localhost/index.php', urllib.urlencode({'query' : req})) r = f.read() return r # index.php contains: # <?php # if ($mysql = mysql_connect("localhost", "root", "")) { # mysql_se...
Haabb/pwnfork
pwn/test/sqli.py
Python
mit
507
# -*- coding: utf-8 -*- from django.views.generic import View from django.http import JsonResponse from . import ACCEPTED_EVENTS from .services import PaymillWebhookService import logging logger = logging.getLogger('django.request') class PaymillView(JsonResponse, View): """ Handle the paymill callback ...
rosscdh/django-paymill-redux
dj_paymill/views.py
Python
mit
1,040
from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils import timezone from autoslug import AutoSlugField from filebrowser.fields import FileBrowseField from cms.common import mixins, utils from cms.common.fields import LanguageField, FilebrowserVersionField HEADERS_L...
HurtowniaPixeli/pixelcms-server
cms/content/models.py
Python
mit
16,168
# from __future__ import absolute_import from __future__ import print_function from __future__ import division from keras import backend as K from keras.models import Model, Sequential from keras.layers import Input, InputLayer from keras.layers.core import Dense, RepeatVector, Masking, Dropout from keras.layers.merge...
YerevaNN/R-NET-in-Keras
model.py
Python
mit
5,785