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
# ============================================================================== # Copyright (C) 2011 Diego Duclos # Copyright (C) 2011-2018 Anton Vorobyov # # This file is part of Eos. # # Eos is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as publi...
pyfa-org/eos
eos/item/mixin/effect_stats/neut.py
Python
lgpl-3.0
1,376
# -*- coding: utf-8 -*- # * Copyright (C) 2012-2016 Croissance Commune # * Authors: # * TJEBBES Gaston <g.t@majerti.fr> # * Arezki Feth <f.a@majerti.fr>; # * Miotte Julien <j.m@majerti.fr>; # # This file is part of Autonomie : Progiciel de gestion de CAE. # # Autonomie is free software: you can red...
CroissanceCommune/autonomie
autonomie/views/admin/sale/forms.py
Python
gpl-3.0
2,019
normal_num = set() source_num = [] for i in range(int(input())): number = input() source_num.append(number) if number.find('??') == -1: if number in normal_num: print("NO") exit(0) else: normal_num.add(number) for k in range(len(source_num)): if sour...
dluschan/olymp
itmo/2016-17/final/auto_number.py
Python
mit
853
# coding=utf-8 """This module contains the abstract class of the MinimumNeeds. The storage logic is omitted here.""" __author__ = 'Christian Christelis <christian@kartoza.com>' __date__ = '05/10/2014' __copyright__ = ('Copyright 2014, Australia Indonesia Facility for ' 'Disaster Reduction') from coll...
Jannes123/inasafe
safe/common/minimum_needs.py
Python
gpl-3.0
8,353
# This file is used to configure the behavior of pytest when using the Astropy # test infrastructure. import zmq import functools import threading import warnings import struct import numpy as np import pytest from astropy.version import version as astropy_version if astropy_version < "3.0": # With older versio...
alexrudy/Zeeko
zeeko/conftest.py
Python
bsd-3-clause
10,760
from __future__ import absolute_import import json import responses from freight import notifiers from freight.notifiers import NotifierEvent from freight.models import TaskStatus from freight.testutils import TestCase class SentryNotifierBase(TestCase): def setUp(self): self.notifier = notifiers.get('s...
rshk/freight
tests/notifiers/test_sentry.py
Python
apache-2.0
1,670
"""Interval module: contains the Interval class""" __all__ = ['Interval'] from direct.directnotify.DirectNotifyGlobal import directNotify from direct.showbase.DirectObject import DirectObject from direct.task.Task import Task, TaskManager from direct.task.TaskManagerGlobal import taskMgr from panda3d.core import * fr...
brakhane/panda3d
direct/src/interval/Interval.py
Python
bsd-3-clause
17,815
/// <reference path="./testBlocks/enums.ts" /> enum EnumWithStart { Q = 3, R = 4, S } let userDefinedTest5 = EnumWithStart.R
switch-education/pxt
tests/pydecompile-test/baselines/enum_user_defined_start_value.py
Python
mit
138
#!/usr/bin/env python # # @license Apache-2.0 # # Copyright (c) 2018 The Stdlib 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 # # ...
stdlib-js/stdlib
lib/node_modules/@stdlib/stats/base/dists/logistic/stdev/test/fixtures/python/runner.py
Python
apache-2.0
1,903
############################################################################## # # Copyright (C) 2014 Pexego Sistemas Informáticos All Rights Reserved # $Omar Castiñeira Saavedra <omar@pexego.es>$ # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero...
Comunitea/CMNT_004_15
project-addons/sale_point_programme/__manifest__.py
Python
agpl-3.0
1,729
# -*- coding: utf-8 -*- from django.db import migrations, models class Migration(migrations.Migration): dependencies = [('events', '0002_auto_20150623_1452')] operations = [migrations.AddField( model_name='link', name='title', field=models.CharField(default='', max_length=100), ...
tjcsl/ion
intranet/apps/events/migrations/0003_link_title.py
Python
gpl-2.0
355
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-01-26 18:43 from __future__ import unicode_literals import datetime from django.conf import settings from django.db import migrations, models import django.db.models.deletion import easy_thumbnails.fields import velo.results.models class Migration(migratio...
eeriks/velo.lv
velo/results/migrations/0001_initial.py
Python
gpl-3.0
16,745
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Agreement' db.create_table('staticpages_agreement', ( ('id', self.gf('django.db....
ttreeagency/PootleTypo3Org
pootle/apps/staticpages/migrations/0010_auto__add_agreement__add_unique_agreement_user_document__add_field_sta.py
Python
gpl-2.0
7,533
from log import LOG from os.path import abspath from fingerprint import FingerEngine import utility import re import pkgutil import state def detectFileType(inFile): #Check to see if file is of type gnmap firstLine = inFile.readline() secondLine = inFile.readline() thirdLine = inFile.readline() #Be polite and re...
GHubgenius/clusterd
src/module/discovery.py
Python
mit
4,151
# # This file is part of Plinth. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
freedomboxtwh/Plinth
plinth/modules/help/help.py
Python
agpl-3.0
2,917
#!/usr/bin/env python from time import * from numpy import * import sys if len(sys.argv) < 1: print 'Usage:' print ' ./copyMatrix.py dim' print 'Please specify matrix dimensions' sys.exit() dim = int(sys.argv[1]) # Copy with loop # ---------------- A = random.rand(dim, dim, 3) start = clock()...
scienceopen/numba-examples
NASA_JulesKouatchou/Problem1/copyMatrix.py
Python
mit
779
# -*- coding: utf-8 -*- import urllib, json import unicodecsv as csv import sys import metautils from dbsettings import settings if sys.argv[1] == 'bremen': city = 'bremen' portalname = 'daten.bremen.de' jsonurl = 'http://daten.bremen.de/sixcms/detail.php?template=export_daten_json_d' jsonurl = urlli...
okfde/odm-datenerfassung
readdatacatalogs/bremen-sixcms-moers-json.py
Python
mit
4,843
# -*- coding: UTF-8 -*- # @author: xuyong # @file: 103_CGI_1.1.py # @time: 2017/9/7 下午4:08 # @desc: CGI(Common Gateway Interface),通用网关接口,它是一段程序,运行在服务器上如:HTTP服务器,提供同客户端HTML页面的接口。 print "Content-type:text/html" print # 空行,告诉服务器结束头部 print '<html>' print '<head>' print '<meta charset="utf-8">' print '<title>Hello Wor...
xiaoyong0312/Python-dev
Python2.x/Python2.x-1-high/103_CGI_1.1.py
Python
mit
557
# -*- encoding: utf-8 -*- import unittest import sys import os sys.path.append('C:/Users/math/AppData/Roaming/Sublime Text 3/Packages/FileManager') from pathhelper import * sys.path.pop() class PathHelperTest(unittest.TestCase): def test_computer_friendly(self): home = os.path.expanduser('~') tes...
ameistad/FileManager
tests/test_path_helper.py
Python
mit
1,571
# intelidomo.com import time import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) class StepperMotor: def __init__(self, pin1, pin2, pin3, pin4, mode=2, delay=0.005, stepsbyspin=512): self.p1 = pin1 self.p2 = pin2 self.p3 = pin3 self.p4 = pin4 self.modo = mode self.delay = delay self.lap = 512 GPIO.setup(...
intelidomo/rpi_snippets
stepper_motor/stepper_motor.py
Python
mit
5,959
# This file is a part of the "SuMPF" package # Copyright (C) 2018-2021 Jonas Schulte-Coerne # # 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, either version 3 of the License, or (at your ...
JonasSC/SuMPF
sumpf/_data/_filters/_base/_terms/_primitive.py
Python
lgpl-3.0
28,851
# postgresql/__init__.py # Copyright (C) 2005-2020 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from . import base from . import pg8000 # noqa from . import psycopg2 # noq...
graingert/sqlalchemy
lib/sqlalchemy/dialects/postgresql/__init__.py
Python
mit
2,432
# -*- coding: utf-8 -*- from nose.tools import * import os.path import ipe import fs def test_create_some_files(): d = fs.mkdir('hello/world') f = fs.mkfile('hello/world/again.txt') def test_load_empty_dir(): d = fs.mkdir('empty') t = ipe.load_tree(d) eq_(t.name, 'empty') eq_(t.path, '') ...
andref/ipe
tests/load_test.py
Python
mit
1,394
import sys import re def main(): try: filename = sys.argv[1] shift = float(sys.argv[2]) except (IndexError, ValueError): print("usage: srt-shift filename shift") return out = '' with open(filename, 'r') as file: i = 0 for line in file: line...
alonbl/srt-shift
srt_shift.py
Python
bsd-3-clause
2,073
#!/usr/bin/env python # # Basic VAPIX PTZ node, based on documentation here: # http://www.axis.com/global/en/support/developer-support/vapix import threading import rospy from axis_camera.msg import Axis from std_msgs.msg import Bool from dynamic_reconfigure.server import Server from axis_camera.cfg import PTZConfi...
tradr-project/axis_camera
nodes/axis_ptz.py
Python
bsd-3-clause
13,696
n = 1000000 sieve = [0] * n primes = [] for p in xrange(2, n): if sieve[p] == 0: primes.append(p) for pk in xrange(p*2, n, p): sieve[pk] = 1 primes = set(primes) S = 0 count = 0 for p in primes: p_str = str(p) truncations = [] for i in xrange(1,len(p_str)): truncations.append( p_str[:i] ) ...
brandonpelfrey/project-euler
p37.py
Python
mit
542
import os import re import ast import sys try: from distutils.util import get_platform is_windows = get_platform().startswith("win") except ImportError: # Don't break install if distuils is incompatible in some way # probably overly defensive. is_windows = False try: from setuptools import setu...
natefoo/pulsar
setup.py
Python
apache-2.0
4,805
# -*- coding: utf-8 -*- """ Support for calculating D spacing for powder diffraction lines as as function of pressure and temperature, given symmetry, zero-pressure lattice constants and equation of state parameters. Author: Mark Rivers Created: Sept. 10, 2002 from older IDL version Modifications: Sept. 26,...
erangre/Dioptas
dioptas/model/util/jcpds.py
Python
gpl-3.0
36,565
# -*- coding: utf-8 -*- # Copyright(C) 2015 Vincent A # # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the Licen...
laurentb/weboob
modules/funmooc/module.py
Python
lgpl-3.0
3,529
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8 # # MDAnalysis --- https://www.mdanalysis.org # Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) #...
MDAnalysis/mdanalysis
testsuite/MDAnalysisTests/coordinates/test_pdb.py
Python
gpl-2.0
46,473
''' Simple program to provide list of options for creating a Taylor diagram. Used for package development. Explicitly accesses the latest method rather than the one distributed in the package. Author: Peter A. Rochford Symplectic, LLC www.thesymplectic.com Created on Apr 22, 2017 @author: prochford@...
PeterRochford/SkillMetrics
Examples/taylor_options.py
Python
gpl-3.0
599
import datetime import json import urllib.parse from collections import defaultdict from unittest import mock import ddt import pytest import pytz from django.urls import reverse from course_discovery.apps.api.v1.tests.test_views.mixins import ( APITestCase, LoginMixin, SerializationMixin, SynonymTestMixin ) from...
edx/course-discovery
course_discovery/apps/edx_catalog_extensions/api/v1/tests/test_views.py
Python
agpl-3.0
20,639
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-17 19:19 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): dependencies = [ migrations.swappable_depende...
samitnuk/online_shop
apps/orders/migrations/0002_auto_20170317_2119.py
Python
mit
1,976
# Disable warning Missing docstring # pylint: disable=C0111 # Disable warning Invalid variable name # pylint: disable=C0103 # Suppress pylint warning about access to protected member # pylint: disable=W0212 # Suppress no-member: Twisted's reactor methods are not easily discoverable # pylint: disable=E1101 """twiste...
vitaly-krugl/pika
tests/acceptance/twisted_adapter_tests.py
Python
bsd-3-clause
35,287
## www.pubnub.com - PubNub Real-time push service in the cloud. # coding=utf8 ## PubNub Real-time Push APIs and Notifications Framework ## Copyright (c) 2010 Stephen Blum ## http://www.pubnub.com/ ## ----------------------------------- ## PubNub 3.1 Real-time Push Cloud API ## ----------------------------------- im...
DeepeshC/pubnub
python-twisted/examples/uuid-example.py
Python
mit
843
# Copyright 2015 Internap. # # 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, so...
mlecours/fake-switches
fake_switches/netconf/netconf_protocol.py
Python
apache-2.0
4,337
#!/usr/bin/python2.7 from time import sleep import simplejson as json from pyrcron import pyrcron from lib.helper import hashString r = pyrcron() test_rsa = """ -----BEGIN RSA PRIVATE KEY----- MIICXAIBAAKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUp wmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkV...
jontaimanglo/pyrcron
test_pyrcron.py
Python
gpl-2.0
2,599
import functools from ometa.grammar import OMeta from ometa.runtime import ParseError, EOFError, OMetaBase from terml.parser import parseTerm as term from terml.quasiterm import quasiterm __version__ = '1.2' def wrapGrammar(g, tracefunc=None): def makeParser(input): """ Creates a parser for the ...
danShumway/python_math
source/PythonMath.activity/libraries/parsley/parsley.py
Python
mit
4,962
from __future__ import division import numpy as np import pylab as plt from matplotlib import rc from matplotlib.ticker import MultipleLocator, FormatStrFormatter, FixedLocator rc('font', family='Consolas') ESR=87.52 Deg=85.39 Im=ESR*np.tan(np.pi*Deg/180.) #plt.figure(figsize=(6,6)) plt.title(u"""Wykres wskazowy - ...
Monika319/EWEF-1
Sprawko3/Wykrescewkanapiecia.py
Python
gpl-2.0
812
# Test for VfsLittle using a RAM device try: import uos uos.VfsLfs1 uos.VfsLfs2 except (ImportError, AttributeError): print("SKIP") raise SystemExit class RAMBlockDevice: ERASE_BLOCK_SIZE = 1024 def __init__(self, blocks): self.data = bytearray(blocks * self.ERASE_BLOCK_SIZE) ...
hoihu/micropython
tests/extmod/vfs_lfs.py
Python
mit
2,485
from django.test import TestCase from django.contrib.auth.models import User, Group from projector.forms import DashboardAddMemberForm class DashboardAddMemberFormTest(TestCase): def setUp(self): self.group = Group.objects.create(name='admins') self.user = User.objects.create(username='admin') ...
lukaszb/django-projector
projector/tests/test_teams.py
Python
bsd-3-clause
1,503
from setuptools import find_packages, setup from channels import __version__ setup( name='channels', version=__version__, url='http://github.com/django/channels', author='Django Software Foundation', author_email='foundation@djangoproject.com', description="Brings async, event-driven capabiliti...
django/channels
setup.py
Python
bsd-3-clause
1,412
# Copyright 2016 Hewlett Packard Enterprise Development Company LP. # Copyright 2016 IBM Corp # 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...
openstack/ironic
ironic/drivers/modules/storage/cinder.py
Python
apache-2.0
20,389
from django.contrib import admin from account.models import ( Account, AccountDeletion, EmailAddress, PasswordExpiry, PasswordHistory, SignupCode, ) class SignupCodeAdmin(admin.ModelAdmin): list_display = ["code", "max_uses", "use_count", "expiry", "created"] search_fields = ["code",...
FreedomCoop/valuenetwork
account/admin.py
Python
agpl-3.0
1,314
#!/usr/bin/env python # -*- coding: utf-8 -*- from datetime import datetime from django import forms from django.utils.translation import ugettext_lazy as _ from .models import Wallet, get_uuid4, expiry_date_to_datetime from .processor import PaylineProcessor class WalletCreationError(Exception): pass def va...
magopian/django-payline
payline/forms.py
Python
bsd-3-clause
3,522
from subprocess import Popen from chimera.util.sextractor import SExtractor from chimera.core.exceptions import ChimeraException from chimera.util.image import Image import os import shutil import logging import chimera.core.log log = logging.getLogger(__name__) from pyraf import iraf class AstrometryNet: ...
wschoenell/chimera_imported_googlecode
src/chimera/util/astrometrynet.py
Python
gpl-2.0
45,436
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
belokop/indico_bare
indico/util/mimetypes_test.py
Python
gpl-3.0
9,721
#!/usr/bin/env python import logging import logging.handlers from Singleton import Singleton import os LOGPATH = '/tmp' class LoggerManager(Singleton): def __init__(self): self.loggers = {} formatter = logging.Formatter('%(asctime)s:%(levelname)-8s:%(name)-10s:%(lineno)4s: %(mes...
dksr/REMIND
python/base/utils/LoggerManager.py
Python
mit
3,182
# Copyright 2016 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...
HaebinShin/tensorflow
tensorflow/contrib/learn/python/learn/estimators/svm_test.py
Python
apache-2.0
10,014
#!/usr/bin/env python from distutils.core import setup setup(name='beeswithmachineguns', version='0.1.4', description='A utility for arming (creating) many bees (micro EC2 instances) to attack (load test) targets (web applications).', author='Christopher Groskopf', author_email='cgroskopf@trib...
stephan-dowding/beeswithmachineguns
setup.py
Python
mit
1,024
# coding: utf-8 """ Copyright 2015 SmartBear Software 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...
eshijia/magnum
magnum/common/pythonk8sclient/swagger_client/models/v1_container_port.py
Python
apache-2.0
5,613
#!/usr/bin/env python # Copyright 2013 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. # Counts a resident set size (RSS) of multiple processes without double-counts. # If they share the same page frame, the page frame is ...
7kbird/chrome
tools/multi_process_rss.py
Python
bsd-3-clause
3,646
#!/usr/bin/env python3 import matplotlib import math import argparse def main(): def coords(s): try: x, y = map(float, s.split(',')) return x, y except: raise argparse.ArgumentTypeError("Please specify lat,lon") parser = argparse.ArgumentParser( pr...
FluidityStokes/fluidity
tests/sigma_layer_sphere_parallel/project_point.py
Python
lgpl-2.1
1,116
""" Testing decorators module """ import numpy as np from numpy.testing import (assert_almost_equal, assert_array_equal) from nose.tools import (assert_true, assert_false, assert_raises, assert_equal, assert_not_equal) from ..decorators import doctest_skip_parser ...
maurozucchelli/dipy
dipy/testing/tests/test_decorators.py
Python
bsd-3-clause
1,352
from __future__ import unicode_literals import os import signal import sys import threading from wcwidth import wcwidth __all__ = ( 'Callback', 'DummyContext', 'get_cwidth', 'suspend_to_background_supported', 'is_conemu_ansi', 'is_windows', 'in_main_thread', ) class Callback(object): ...
amjith/python-prompt-toolkit
prompt_toolkit/utils.py
Python
bsd-3-clause
3,426
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( float_or_none, smuggle_url, ) class TVAIE(InfoExtractor): _VALID_URL = r'https?://videos?\.tva\.ca/details/_(?P<id>\d+)' _TESTS = [{ 'url': 'https://videos.tva.ca/details/_559681147...
remitamine/youtube-dl
youtube_dl/extractor/tva.py
Python
unlicense
2,000
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. # # Maintainer: Jonathan Lange # Author: Robert Collins from __future__ import absolute_import, division import os import pdb import sys from zope.interface import implementer from zope.interface.verify import verifyObject from twisted.trial.it...
bdh1011/wau
venv/lib/python2.7/site-packages/twisted/trial/test/test_runner.py
Python
mit
33,296
""" Finite Difference Check ----------------------- This module provides functions to automatically check correctness of amici computed sensitivities using finite difference approximations """ from . import ( runAmiciSimulation, SensitivityOrder, AMICI_SUCCESS, SensitivityMethod, Model, Solver, ExpData, Return...
AMICI-developer/AMICI
python/amici/gradient_check.py
Python
bsd-2-clause
8,814
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Dag Wieers <dag@wieers.com> # # 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, ...
e-gob/plataforma-kioscos-autoatencion
scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/modules/windows/win_wakeonlan.py
Python
bsd-3-clause
2,191
""" Least Angle Regression algorithm. See the documentation on the Generalized Linear Model for a complete discussion. """ from __future__ import print_function # Author: Fabian Pedregosa <fabian.pedregosa@inria.fr> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Gael Varoquaux # # License: BSD St...
maxlikely/scikit-learn
sklearn/linear_model/least_angle.py
Python
bsd-3-clause
43,381
# Copyright 2013 OpenStack 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.0 # # Unless required by applicable law or agreed to in...
rushiagr/keystone
keystone/auth/controllers.py
Python
apache-2.0
27,269
from unittest.mock import patch, call from datetime import date from scripts.generate_human_tissue_report import GenerateHumanTissueReport from tests.test_common import TestEPP, FakeEntitiesMaker, NamedMock class TestGenerateHumanTissueReport(TestEPP): # today's date required for file name and email todays_d...
EdinburghGenomics/clarity_scripts
tests/test_generate_human_tissue_report.py
Python
mit
4,059
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Bottle is a fast and simple micro-framework for small web applications. It offers request dispatching (Routes) with URL parameter support, templates, a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and template engines - all in a single file an...
brycesub/silvia-pi
bottle.py
Python
mit
169,035
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
google-research/DBAP-algorithm
third_party/rlkit_library/rlkit/core/batch_rl_algorithm.py
Python
apache-2.0
5,904
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wizard_builder', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='formquestion', ...
scattermagic/django-wizard-builder
wizard_builder/migrations/0002_remove_formquestion_example.py
Python
bsd-3-clause
355
import sys import http, urllib import os as alias_for_os from ast import parse from functools import partial, reduce as accumulate
kunev/py3names
py3names/tests/imports.py
Python
gpl-2.0
131
# Copyright (c) 2015, Palo Alto Networks # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS...
PaloAltoNetworks-BD/SplunkforPaloAltoNetworks
SplunkforPaloAltoNetworks/bin/panUserUpdate.py
Python
isc
7,764
import datetime import os.path import contextlib import logging import random import urllib.parse import common.database import Misc.txt_to_img import WebMirror.Engine # import WebMirror.runtime_engines from common.Exceptions import DownloadException, getErrorDiv from flask import g from app import app from app import...
fake-name/ReadableWebProxy
WebMirror/API.py
Python
bsd-3-clause
8,907
from django.contrib.auth.models import User from rest_framework import serializers from T.tings.models.models_users import TUserProfile from T.tings.serializers.serializers_collections import TCollectionSerializer class TUserProfileSerializer(serializers.ModelSerializer): class Meta: model = TUserProfile...
allynt/tings
T/tings/serializers/serializers_users.py
Python
mit
755
#!/usr/bin/env python # ========================================================================================== # $ Descrition - / # # TACTIV DEV CONVERTER ARQUIVOS # # Converter arquivos, usando um modulo da cortex. # A saida dos arquivos tem que ser de preferencia jpg, por ser uma arquivo leve. # Recebe...
ernandedante/tactic
converte_jpg.py
Python
gpl-2.0
1,765
import random import PlayingCardGlobals from toontown.minigame.PlayingCard import PlayingCardBase class PlayingCardDeck: def __init__(self): self.shuffle() def shuffle(self): self.cards = range(0, PlayingCardGlobals.MaxSuit * PlayingCardGlobals.MaxRank) random.shuffle(self.cards) ...
ToonTownInfiniteRepo/ToontownInfinite
toontown/minigame/PlayingCardDeck.py
Python
mit
1,226
# topologically sort a graph # elements with higher precedence(lesser indegrees) will come first from collections import defaultdict class TopologicalSort: def __init__(self): self.graph = defaultdict(list) # directed graph def addEdges(self, edges): for edge in edges: self.gra...
sayak1711/coding_solutions
coding-practice/Graph/topological_sort.py
Python
mit
999
team_abbr_lookup = { "Toronto Raptors": "TOR", "Brooklyn Nets": "BRK", "New York Knicks": "NYK", "Boston Celtics": "BOS", "Philadelphia 76ers": "PHI", "Indiana Pacers": "IND", "Chicago Bulls": "CHI", "Cleveland Cavaliers": "CLE", "Detroit Pistons": "DET", "Milwaukee Bucks": "MIL...
mattdhart/GBling
nba/model/utils.py
Python
apache-2.0
4,028
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy import time import pypot.primitive class CrossHandsBehave(pypot.primitive.Primitive): def run(self): poppy = self.robot poppy.r_shoulder_x.goto_position(-10, 4, wait=False) poppy.r_shoulder_y.goto_position(-20, 4, wait=Fa...
jerome-guichard/primitiveWS
old/src/behavior/crossHands.py
Python
gpl-3.0
724
# -*- coding: utf-8 -*- # Copyright 2013-2015 eNovance <licensing@enovance.com> # # 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 ...
ityaptin/ceilometer
ceilometer/messaging.py
Python
apache-2.0
3,104
# test_db.py from models import User, Blog, Comment from transwarp import db db.create_engine(user='www-data', password='www-data', database='awesome') u = User(name='Test', email='test@example.com', password='1234567890', image='about:blank') u.insert() print 'new user id:', u.id u1 = User.find_first('where ema...
arvinls/webapp
www/test_db.py
Python
gpl-2.0
384
#!/usr/bin/env python2.7 """ This file is a basic script used by the CLI to help bash auto-completion, it bypass click and most of the aeriscloud lib for achieving decent speed """ import os import re import sys from aeriscloud.config import projects_path, aeriscloud_path,\ data_dir, config_dir from aeriscloud.an...
AerisCloud/AerisCloud
aeriscloud/cli/complete.py
Python
mit
5,579
if __name__ == "__main__": import gizeh import moviepy.editor as mpy from vectortween.TimeConversion import TimeConversion from vectortween.PointAnimation import PointAnimation from vectortween.ColorAnimation import ColorAnimation W, H = 250, 250 # width, height, in pixels duration = 10 ...
shimpe/pyvectortween
examples/example_pointandcoloranimation.py
Python
mit
3,258
from bluepy.btle import * import time import serial from pyqtgraph.Qt import QtGui, QtCore import pyqtgraph as pg start_time = time.time() data = [] data2 = [] data3 = [] data4 = [] angles = [] pg.setConfigOption('background', 'w') pg.setConfigOption('foreground', 'k') pen = pg.mkPen('k', width=8) app = QtGui.QAppl...
ac769/continuum_technologies
software/ble_live_read_graphical.py
Python
mit
2,073
# -*- coding: utf-8 -*- from luckydonaldUtils.encoding import unicode_type, to_unicode as u from luckydonaldUtils.exceptions import assert_type_or_raise from . import Sendable __author__ = 'luckydonald' __all__ = [ 'PassportElementError', 'PassportElementErrorDataField', 'PassportElementErrorFrontSide', ...
luckydonald/pytgbot
pytgbot/api_types/sendable/passport.py
Python
mit
47,971
import os.path # `load()` appends to the filterMaps: we need them to be empty, so that # only the specified filter mappings are used. config.photometryRefObjLoader.filterMap = {} filterMapFile = os.path.join(os.path.dirname(__file__), "filterMap.py") config.photometryRefObjLoader.load(filterMapFile) # We have PS1 colo...
lsst/obs_decam
config/jointcal.py
Python
gpl-3.0
438
""" Tests for the bok-choy paver commands themselves. Run just this test with: paver test_lib -t pavelib/paver_tests/test_paver_bok_choy_cmds.py """ import os import unittest from test.support import EnvironmentVarGuard from pavelib.utils.test.suites import BokChoyTestSuite REPO_DIR = os.getcwd() class TestPaver...
msegado/edx-platform
pavelib/paver_tests/test_paver_bok_choy_cmds.py
Python
agpl-3.0
6,100
import collections A = collections.deque([int(i) for i in input()]) B = collections.deque([int(i) for i in input()]) C = collections.deque([int(i) for i in input()]) D = collections.deque([int(i) for i in input()]) k = int(input()) W = [] T = [] for _ in range(k) : w, t = list(map(int, input().split())) W.appen...
kjihee/lab_study_group
2018/CodingInterview/3주차/deque.py
Python
mit
1,264
#Copyright ReportLab Europe Ltd. 2000-2004 #see license.txt for license details """ This does a test drawing with lots of things in it, running with and without attribute checking. """ __version__ = '''$Id: test_graphics_speed.py 3288 2008-09-15 11:03:17Z rgbecker $''' from reportlab.lib.testutils import setOutDir,make...
jhurt/ReportLab
tests/test_graphics_speed.py
Python
bsd-3-clause
2,688
from lxml import etree from datetime import datetime, timedelta import urllib import re import email import random from django.conf import settings from molly.conf.provider import task from molly.apps.podcasts.providers import BasePodcastsProvider from molly.apps.podcasts.models import Podcast, PodcastItem, PodcastCa...
mollyproject/mollyproject
molly/apps/podcasts/providers/pp.py
Python
apache-2.0
2,080
# Generated by Django 2.0.6 on 2018-07-24 20:04 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('clowder_server', '0009_auto_20170927_2121'), ] operations = [ migrations.AddField( model_name='alert', name='send_em...
keithhackbarth/clowder_server
clowder_server/migrations/0010_alert_send_email.py
Python
agpl-3.0
397
from a10sdk.common.A10BaseClass import A10BaseClass class WebCategory(A10BaseClass): """ :param database: {"default": 0, "optional": true, "type": "number", "description": "Delete web-category database", "format": "flag"} :param DeviceProxy: The device proxy for REST operations and session handling. R...
amwelch/a10sdk-python
a10sdk/core/delete/delete_web_category.py
Python
apache-2.0
992
# Copyright The IETF Trust 2007, All Rights Reserved # Portion Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the fo...
mcr/ietfdb
ietf/iesg/models.py
Python
bsd-3-clause
8,457
#jiggle.v.01 #Body_movement #This frame contains words for motions or actions an Agent p #erforms using some part of his/her body. A number of word #s in this frame occur as blends with Communication, in whic #h the action has an Addressee. For example, 'Pat nodded #at Kim.' These examples differ from Communicat...
GAIA-GMU/PAR
actions/Gesticulate.py
Python
apache-2.0
1,860
#Software to encode binary information to DNA nucleotides import binascii import re class DNAEncoder: def __init__(self): self.binaryArray = [] self.nucleotideArray = [] #This section of code is used for the express purpose of encoding binary information #Creates a demilited binary array ...
koolventure/replicator
dnaEncoder.py
Python
mit
1,184
# Copyright 2014 Cisco Systems, 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 requi...
CiscoSystems/fabric_enabler
setup_enabler.py
Python
apache-2.0
36,241
#! /usr/bin/env python # # example4_mpl.py -- Load a fits file into a Ginga widget with a # matplotlib backend. # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. ...
eteq/ginga
ginga/examples/matplotlib/example4_mpl.py
Python
bsd-3-clause
3,316
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from urbansim.configs.estimation_config_for_model_members import model_member_configuration from urbansim_parcel.configs.controller_config import config from urbansim.estimation.estimator import...
christianurich/VIBe2UrbanSim
3rdparty/opus/src/urbansim_parcel/estimation/bldglcm_estimation_config.py
Python
gpl-2.0
3,118
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
jmesteve/openerpseda
openerp/modules/registry.py
Python
agpl-3.0
13,630
print("file_{:03d} : {:8.2f}, {:1.0e}".format(2, 123.4567, 10000)) def print_first_three(nums): '''print first three numbers of a tuple in formatted string''' print("the first 3 numbers are: {:d}, {:d}, {:d}".format(*nums)) print(print_first_three(3, 4, 2, 3, 1, 10))
UWPCE-PythonCert/IntroPython2016
students/cowhey/session03/strings.py
Python
unlicense
279
#!/usr/bin/env python """Spyse sax demo""" from xml.sax import make_parser from xml.sax.handler import ContentHandler class BookHandler(ContentHandler): book = {} inside_tag = 0 data = "" def startDocument(self): print "<html>" def endDocument(self): prin...
davidko/evolspyse
demo/trash/sax.py
Python
lgpl-2.1
1,539
#!/usr/bin/python # This is a mockup of the dales program. from mpi4py import MPI from daleslib import init_dales init_dales(MPI.COMM_WORLD,1)
goord/Dales-IFS-ProtoType
dales/dales.py
Python
apache-2.0
146
# # 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...
spektom/incubator-airflow
airflow/providers/google/suite/hooks/drive.py
Python
apache-2.0
5,262
''' A stable hash function for strings. The built-in hash function in Python is not guaranteed to produce the same results over different versions of Python. We use the hash function to generate file paths, so we need a version which is stable across versions of Python. ''' import hashlib def stable_string_hash(strin...
bjpop/annokey
annokey/hash.py
Python
bsd-3-clause
603
import mexbtcapi from mexbtcapi.concepts.currencies import USD,BTC from mexbtcapi.concepts.currency import Amount import matplotlib.pyplot as plt from decimal import Decimal for api in mexbtcapi.apis: try: from mexbtcapi.util.comp import comp, dcomp depth = api.market(USD).getDepth() for...
dkronst/mexbtcapi
demo/bitcoin_depth.py
Python
cc0-1.0
1,057