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 kivy.graphics import PushMatrix
from kivy.graphics import PopMatrix
from kivy.graphics import Rotate
from kivy.graphics import Translate
from kivy.graphics import Rectangle
from kivy.graphics import Scale
from kivy.graphics import Color
from kivy.uix.widget import Widget
from kivy.uix.boxlayout import BoxLayout
... | expertmm/kivy_spinning_bunnies | spritewidget.py | Python | gpl-2.0 | 5,173 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute of Technology (KIT) <wunsch.felix@googlemail.com>.
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publis... | Whisper-Cao/802.15.4-revision | python/qa_access_code_removal_b.py | Python | gpl-3.0 | 3,280 |
import unittest
import jupyter_kernel_test as jkt
class ErlangKernelTests(jkt.KernelTests):
kernel_name = "erlang_test"
language_name = "erlang"
file_extension = ".erl"
code_hello_world = 'io:format("hello, world~n").'
completion_samples = [
{"text": "lists:su", "matches": {"sublist", ... | filmor/ierl | python-tests/test_erlang_kernel.py | Python | gpl-3.0 | 899 |
import json
import requests
base_url = 'https://galtay.pythonanywhere.com/hcc_risk_models/api/v1.0/models'
url = base_url
print('url: ', url)
result_models = requests.get(url)
print('result_models: ', json.dumps(result_models.json(), indent=2))
print()
model = 'V2217_79_O1'
url = '{}/{}'.format(base_url, model)
prin... | galtay/hcc_risk_models | hcc_risk_models/examples_requests.py | Python | gpl-3.0 | 1,313 |
#!/usr/bin/env python
"""
Analyzer of B0d -> K*0 Ds+ Ds- events
| | |-> tau- nu
| | |-> pi- pi- pi+ nu
| |-> pi+ pi+ pi- K0L
|-> K+ pi-
Note: it is supposed to be used within heppy_fcc framework
"""
... | semkiv/heppy_fcc | analyzers/BackgroundBs2DsDsKWithDs2PiPiPiKAndDs2TauNuAnalyzer.py | Python | gpl-3.0 | 23,947 |
# Changes made to integrate with CapTipper in lines: 31-47,57-60,88-94,108-112, 129-135, 148-150,188-189
# coding=utf-8
from __future__ import unicode_literals, print_function, division
from io import StringIO
import sys
import CTCore
from pcapparser.config import OutputLevel
# print http req/resp
from pcapparser imp... | akamajoris/CapTipper | pcapparser/printer.py | Python | gpl-3.0 | 7,770 |
from datetime import datetime
from . import db
class ImportJob(db.Model):
"""Import Jobs model class"""
__tablename__ = 'import_jobs'
id = db.Column(db.Integer, primary_key=True)
task = db.Column(db.String, nullable=False)
start_time = db.Column(db.DateTime)
user_id = db.Column(db.Integer, d... | gaeun/open-event-orga-server | app/models/import_jobs.py | Python | gpl-3.0 | 965 |
# 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.
#
# This program is distributed in the hope that it will be useful,
# bu... | agrover/targetd | targetd/utils.py | Python | gpl-3.0 | 2,112 |
import cv2, sys, os
import numpy as np
from DescriptorComputer import DescriptorComputer
class ColorLayoutComputer(DescriptorComputer):
def __init__(self):
self.rows = 8
self.cols = 8
self.prefix = "CLD"
def compute(self, img):
averages = np.zeros((self.rows,self.cols,3))
imgH, imgW, _ = img.shape
f... | scferrada/imgpedia | IMGdescriptors/Python/ColorLayoutComputer.py | Python | gpl-3.0 | 1,716 |
# ../gungame/core/menus/rank.py
"""Rank menu functionality."""
# =============================================================================
# >> IMPORTS
# =============================================================================
# Source.Python
from players.entity import Player
# GunGame
from ._rankings impor... | GunGame-Dev-Team/GunGame-SP | addons/source-python/plugins/gungame/core/menus/rank.py | Python | gpl-3.0 | 1,356 |
# -*- coding: utf-8 -*-
#TODO: Create Example Protocol --FaUl
from warnings import warn as warning
from itertools import izip_longest
from tasty import state, cost_results
from tasty.exc import InternalError
import time
__all__ = ["Protocol", ]
def get_realcost(name):
if state.precompute:
costs = cost_res... | tastyproject/tasty | tasty/protocols/protocol.py | Python | gpl-3.0 | 12,409 |
"""Test f8a_worker.storages.s3_gocveartifact.py."""
from f8a_worker.storages.s3_gocveartifact import S3IssuesPRs
def test_bucket_name():
"""Test that bucket name is all in lower case."""
storage = S3IssuesPRs(
aws_access_key_id='x', aws_secret_access_key='y', bucket_name='STAGE-abc'
)
assert ... | fabric8-analytics/fabric8-analytics-worker | tests/storages/test_s3_gocveartifact.py | Python | gpl-3.0 | 355 |
#!/usr/bin/env python
##############################################################################################
#
#
# CMIP6_hybrid_regrid_emissions_N96e.py
#
#
# Requirements:
# Iris 1.10, time, cf_units, numpy
#
#
# This Python script has been written by N.L. Abraham as part of the UKCA Tutorials:
# http://... | acsis-project/emissions | emissions/python/CMIP6_hybrid/CMIP6_hybrid_regrid_nC4H10_emissions_n96e_360d.py | Python | gpl-3.0 | 17,243 |
import re
import sys
import time
import datetime
import traceback
from decimal import Decimal
import electrum
from electrum import WalletStorage, Wallet
from electrum.i18n import _, set_language
from electrum.contacts import Contacts
from electrum.util import profiler
from electrum.plugins import run_hook
from kivy.a... | shivaenigma/electrum | gui/kivy/main_window.py | Python | gpl-3.0 | 26,205 |
from __future__ import division
import storm
class RunningAverageBolt(storm.BasicBolt):
running_averages = {}
def process(self, tup):
sensor_id, temperature = tup.values
new_ave = temperature
count = 1
# recompute running average
if sensor_id in self.running_averages... | philipsdoctor/storm-demo-talk | multilang/resources/running_average.py | Python | gpl-3.0 | 770 |
# naga.py
###########
# Imports #
###########
import random
import fsm
#############
# Constants #
#############
###########
# Classes #
###########
class NagaFSM(fsm.StateMachine):
crawlSpeed = 110
turnAroundDist = 110
########
# Idle #
########
@fsm.state
def idle_state():
... | tectronics/fallenspire | game/creatures/naga.py | Python | gpl-3.0 | 3,568 |
from __future__ import division
from gnr.customizers.customizer import Customizer
from PyQt4.QtGui import QTableWidgetItem
from twisted.internet.defer import inlineCallbacks
from ethereum.utils import denoms
class PaymentsDialogCustomizer(Customizer):
@inlineCallbacks
def load_data(self):
payments =... | imapp-pl/golem | gnr/customizers/paymentsdialogcustomizer.py | Python | gpl-3.0 | 3,190 |
# Copyright (C) 2016 Red Hat, Inc
#
# 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.
#
# This program is distributed in ... | projectatomic/commissaire-http | test/test_util_wsgi.py | Python | gpl-3.0 | 2,230 |
import unittest
from onedrivee.api.errors import OneDriveError
from onedrivee.api.items import OneDriveItem
from onedrivee.common.tasks.delete_task import DeleteItemTask
from tests import get_data
from tests import mock
from tests.factory.tasks_factory import get_sample_task_base
class TestDeleteItemTask(unittest.Te... | tobecontinued/onedrive-e | tests/common/test_tasks/test_delete_task.py | Python | gpl-3.0 | 1,275 |
#!/usr/bin/env python3
'''
expire_backups.py - this file is part of S3QL (http://s3ql.googlecode.com)
Copyright © 2008 Nikolaus Rath <Nikolaus@rath.org>
This program can be distributed under the terms of the GNU GPLv3.
'''
import sys
import os
import re
import textwrap
import shutil
import pickle
from datetime impor... | krnflake/s3ql | contrib/expire_backups.py | Python | gpl-3.0 | 9,364 |
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2017, 2018 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in... | elopio/snapcraft | snapcraft/extractors/appstream.py | Python | gpl-3.0 | 3,009 |
import os
from mock import patch, Mock
from requests import ConnectionError
from golem.network.hyperdrive.daemon_manager import HyperdriveDaemonManager
from golem.testutils import TempDirFixture
class TestHyperdriveDaemonManager(TempDirFixture):
@patch('golem.core.processmonitor.ProcessMonitor.start')
@pat... | Radagast-red/golem | tests/golem/network/hyperdrive/test_hyperdrive_daemon_manager.py | Python | gpl-3.0 | 2,640 |
from django import template
# from ..models import Authenta
# from ..forms import Login
# register = template.Library()
# @register.inclusion_tag('Authenta/loginform.html', takes_context=True)
# def loginform(context):
# request = context['request']
# form = Login(request.POST) if request.method == 'POST' else... | hicinformatic/DJANGO-APP_Authenta | templatetags/authenta_extras.py | Python | gpl-3.0 | 375 |
from flask import Blueprint, render_template, abort, request, redirect, url_for, Response, current_app
from jinja2 import TemplateNotFound
from functools import wraps
import hashlib
from bson.objectid import ObjectId
admin = Blueprint('admin', __name__, template_folder='templates')
import auth
from wtforms import Fo... | zhehaowang/openmhealth-cert | www/admin.py | Python | gpl-3.0 | 3,231 |
# Licensed under GPL version 3 - see LICENSE.rst
import numpy as np
from transforms3d.axangles import axangle2mat
from .base import FlatOpticalElement
from ..math.utils import h2e, e2h, distance_point_point, norm_vector
from ..math.polarization import parallel_transport
class PerfectLens(FlatOpticalElement):
''... | Chandra-MARX/marxs | marxs/optics/mirror.py | Python | gpl-3.0 | 4,502 |
import os
def get_passwords():
"""Return dict with passwords from secret file."""
file = os.path.expanduser("~/.ssh/passwords")
d = {}
try:
with open(file, 'r') as fd:
for line in fd:
line = line.split(sep="#", maxsplit=1)[0]
line = line.strip()
... | GeoMop/GeoMop | testing/JobPanel/mock/passwords.py | Python | gpl-3.0 | 637 |
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
import app.parser.getData as importArticles
import app.parser.articleRetrieval.getArticles as getContent
import app.parser.sentences as sent
import app.parser.getChunks as gc
import app.analytics.tag as tag
import app.parser.articleRetrieval.wikipediaParse as wp
im... | JFriel/honours_project | perceptron.py | Python | gpl-3.0 | 2,448 |
import sqlite3
from datetime import date
import sys
import os.path
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import classes.items
class BathItems:
def __init__(self, name, last_replace_date, replace_period, room_number):
self.last_replace_date = last_replace_date
... | esevlogiev/FrontDesk-System | classes/bath_items.py | Python | gpl-3.0 | 2,082 |
"""reST directive for syntax-highlighting ipython interactive sessions.
XXX - See what improvements can be made based on the new (as of Sept 2009)
'pycon' lexer for the python console. At the very least it will give better
highlighted tracebacks.
"""
#-----------------------------------------------------------------... | jat255/hyperspyUI | doc/sphinxext/ipython_console_highlighting.py | Python | gpl-3.0 | 4,184 |
# -*- coding: utf-8 -*-
"""Main module of WikiDAT
Currently, it reads configuration options from either a file or command-line
input arguments (merging them appropriately). Then, it calls individual tools
if their corresponding optional sections are present in the config file.
Command-line arguments always have highe... | glimmerphoenix/WikiDAT | wikidat/main.py | Python | gpl-3.0 | 17,558 |
#!/usr/bin/env python
# This file is part of nexdatas - Tango Server for NeXus data writer
#
# Copyright (C) 2012-2017 DESY, Jan Kotanski <jkotan@mail.desy.de>
#
# nexdatas is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the ... | nexdatas/writer | test/TangoSource_test.py | Python | gpl-3.0 | 160,252 |
# -*- coding: utf-8 -*-
"""
"""
from . import Container
#import curses
import logging
log = logging.getLogger('npyscreen2.containers.smartcontainer')
__all__ = ['SmartContainer']
class SmartContainer(Container):
"""
The SmartContainer will have the ability to use various rectangle packing
algorithms ... | SavinaRoja/npyscreen2 | npyscreen2/containers/smartcontainer.py | Python | gpl-3.0 | 4,772 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2014 GNS3 Technologies Inc.
#
# 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.
... | noplay/gns3-gui | gns3/modules/dynamips/nodes/router.py | Python | gpl-3.0 | 39,564 |
import os
import pandas as pd
import phos.algo.logistic_regression as clf
import phos.util.mapping as mapping
def predict_functional_sites(exp, scores, db, _functional_features = ['num_sites'], **kwargs):
num_sites = get_sites_per_geneid(db['uniprot_mapping'],
**db['phosphosite'])
predicted_funct... | jdrudolph/photon | phos/algo/functional_sites.py | Python | gpl-3.0 | 3,499 |
#!/usr/bin/python
import matplotlib.pyplot as plt # plot
import matplotlib.cm as cm
import argparse as ap # parser for arguments
import CPBUtils as ut
from test_argparse import test_arg_parser
import numpy as np
intra_observer_colour = 'orange'
inter_observer_colour = 'magenta'
intra_obs... | CPBridge/fetal_heart_analysis | scripts/analysis/particles_graphs.py | Python | gpl-3.0 | 9,909 |
#!/usr/bin/env python
# encoding: utf-8
from __future__ import print_function
from waflib import Build, Logs, Options, Utils
from waflib.Configure import conf
from waflib.TaskGen import before_method, feature
import os.path, os
from collections import OrderedDict
import ap_persistent
SOURCE_EXTS = [
'*.S',
'... | mw46d/ardupilot | Tools/ardupilotwaf/ardupilotwaf.py | Python | gpl-3.0 | 11,021 |
# crpyt: toy cryptographic python library
# Copyright (C) 2014 Quentin SANTOS
#
# 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 v... | qsantos/crpyt | digests/md4.py | Python | gpl-3.0 | 1,676 |
import os
import click
from . import util
CHANNELS = list(range(11, 27))
channel = click.option(
'-c', '--channel',
type=click.IntRange(11, 26),
required=True,
default=15,
)
channels = click.option(
'-C', '--channels',
type=util.CSVParamType(11, 26),
metavar='CHANNELS',
default=','.... | rcloran/bellows | bellows/cli/opts.py | Python | gpl-3.0 | 1,470 |
# This file is part of MAUS: http://micewww.pp.rl.ac.uk:8080/projects/maus
#
# MAUS 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... | mice-software/maus | third_party/install/bin/library_finder.py | Python | gpl-3.0 | 4,650 |
'''
DIGIT COUNT OF A NUMBER
The task is to count the number of digits present in the given
number.
'''
def getDigits(n):
ans = 0
while (n):
ans = ans + 1
n = n // 10
return ans
n = int(input("Enter N: "))
print("Number of digits is :", getDigits(n))
'''
INPUT : n = 6534
OUTPUT: Number of... | jainaman224/Algo_Ds_Notes | Digit_Count/Digit_Count.py | Python | gpl-3.0 | 339 |
import PluginLoader
import datetime
class MysqlOutput(PluginLoader.Plugin):
"""Stores the data from the inverter logger into a mysql database"""
def process_message(self, msg):
"""Store the information from the inverter in a mysql database.
Args:
msg (InverterMsg.InverterMsg): Me... | XtheOne/Inverter-Data-Logger | outputs/MysqlOutput.py | Python | gpl-3.0 | 1,831 |
"""
Functions for creating tables of contents.
"""
import markdown
from os import path, listdir, walk
from markdownship import config, afile, convert
toc_name = "toc"
def create(
root_path,
url=None,
is_local=True,
level=0,
prepend_path="",
debug=False ):
"""Return... | automateship/markdownship | markdownship/toc.py | Python | gpl-3.0 | 3,274 |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Folder Color 0.0.11
# Copyright (C) 2012-2014 Marcos Alvarez Costales https://launchpad.net/~costales
#
# Folder Color 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 Foundatio... | linuxmint/folder-color-switcher | usr/share/caja-python/extensions/caja-folder-color-switcher.py | Python | gpl-3.0 | 14,733 |
import math
class Vector(object):
def __init__(self, x, y=None):
self._x, self._y = 0, 0
if y is None:
self.x, self.y = x
else:
self.x, self.y = x, y
def x(self):
return self._x
def setX(self, x):
self._x = int(x)
x = property(x, setX)... | MrP01/HardestGame | gamelib/vector.py | Python | gpl-3.0 | 1,615 |
from random import choice, randint
import matplotlib
matplotlib.use('svg')
import matplotlib.pyplot as plt
from pprint import pprint
import networkx as nx
A = True
B = False
nodes = 100
# agentes se inicializan con behaviours
agentes = range(nodes)
agent_behavior = [choice([A,B]) for n in range(nodes)]
agent... | CA-Lab/moral-exchange | simulations/hebb/hebbian_agents.py | Python | gpl-3.0 | 4,256 |
# -*- coding: utf-8 -*-
# Copyright (c) 2010 - 2014 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Module implementing a dialog to show a list of tags or branches.
"""
from __future__ import unicode_literals
try:
str = unicode
except NameError:
pass
import os
from PyQt5.QtCore import pyqtSlot, QProcess,... | davy39/eric | Plugins/VcsPlugins/vcsMercurial/HgTagBranchListDialog.py | Python | gpl-3.0 | 11,553 |
import discord
from discord.ext import commands
from __main__ import send_cmd_help
from cogs.utils.dataIO import dataIO
# Requires checks utility from:
# https://github.com/Rapptz/RoboDanny/tree/master/cogs/utils
from .utils import checks
import os #Used to create folder at first load.
#Global variables
... | sedruk/Red-DiscordBot | cogs/welcome.py | Python | gpl-3.0 | 14,724 |
########################################################################
# File : SiteDirector.py
# Author : A.T., F.S.
########################################################################
""" The Site Director is an agent performing pilot job submission to particular sites/Computing Elements.
.. literalincl... | yujikato/DIRAC | src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py | Python | gpl-3.0 | 60,603 |
#############################################################################
## ##
## This file is part of Owade : www.owade.org ##
## Offline Windows Analyzer and Data Extractor ##
## ... | CarlosLannister/OwadeReborn | owade/log.py | Python | gpl-3.0 | 3,195 |
"""Twython, simple graphical Python Twitter client.
Copyright (C) 2017 Quentin ANDRIEUX and Gabriel DUGNY
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 you... | SoFolichon/ISN-Twitter | src/main_app.py | Python | gpl-3.0 | 30,420 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui_blueprint_calculator.ui'
#
# Created: Sat Mar 19 14:47:54 2011
# by: pyside-uic 0.2.7 running on PySide 1.0.0~rc1
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
class Ui_BlueprintCalculato... | Iconik/eve-suite | src/view/blueprintcalculator/ui_blueprint_calculator.py | Python | gpl-3.0 | 4,383 |
# Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
from __future__ import (absolute_import, divi... | mganeva/mantid | scripts/Interface/reduction_gui/instruments/hfir_interface_dev.py | Python | gpl-3.0 | 2,799 |
from random import choice
from pygame import Rect
from core import color
from core import config
from core import settings
from game.gameobject import GameObject
### Constants ##################################################################
BALL_STATES = ('IDLE', 'APPEARING', 'MOV... | CorundumGames/Invasodado | game/balloflight.py | Python | gpl-3.0 | 4,741 |
#!/usr/bin/env python
# ============================================================================
# Project Name : iTrade
# Module Name : itrade_indicators.py
#
# Description: INDICATORS
#
# The Original Code is iTrade code (http://itrade.sourceforge.net).
#
# The Initial Developer of the Original Code is ... | eternallyBaffled/itrade | itrade_indicators.py | Python | gpl-3.0 | 2,118 |
#!/usr/bin/python
"""Run a command in the background and display a message on stderr
periodically"""
# Metashell - Interactive C++ template metaprogramming shell
# Copyright (C) 2018, Abel Sinkovics (abel@sinkovics.hu)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | r0mai/metashell | tools/still_working.py | Python | gpl-3.0 | 3,021 |
#-*- coding: utf-8 -*
import robot
r = robot.rmap()
r.lm('task1-1')
def task():
pass
#------- пишите код здесь -----
r.right()
r.right()
r.d()
#------- пишите код здесь -----
r.start(task)
#Отступ слева (tab) сохранять!
#r.help() - Список команд и краткие примеры
#r.demo() - показать решение эт... | MihaiDibani/KPK-Python2016 | Робот/task.py | Python | gpl-3.0 | 1,292 |
# -*- coding: utf-8 -*-
# SASSIE: Copyright (C) 2011 Joseph E. Curtis, Ph.D.
#
# 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 opti... | madscatt/zazzie | src/sassie/contrast/multi_component_analysis/multi_component_analysis.py | Python | gpl-3.0 | 10,791 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-07-29 21:09
from __future__ import unicode_literals
import ISS.models.registration_code
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migrati... | RyanJenkins/ISS | ISS/migrations/0039_registrationcode.py | Python | gpl-3.0 | 1,307 |
# -*- coding: utf-8 -*-
# * Authors:
# * TJEBBES Gaston <g.t@majerti.fr>
# * Arezki Feth <f.a@majerti.fr>;
# * Miotte Julien <j.m@majerti.fr>;
from autonomie_base.models.base import DBSESSION
class FindCompanyService(object):
"""
Tools used to retrieve company informations like :
em... | CroissanceCommune/autonomie | autonomie/models/services/find_company.py | Python | gpl-3.0 | 1,269 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Guarderia',
fields=[
('id', models.AutoField(pr... | annavicente/teste | mysite/servicos/migrations/0001_initial.py | Python | gpl-3.0 | 879 |
#!/usr/bin/env python
from calculations.pp_calculation import pp_calc
from calculations.mods import Mods
from calculations.oppai_wrapper import BeatmapInfo, calculate_info
from calculations.beatmap_metadata import BeatmapMetadata
from database.database_wrapper import DatabaseWrapper
from database.sqlite_database impor... | altur13/osu-Assistant | tests.py | Python | gpl-3.0 | 945 |
#!/usr/bin/python
# -*- coding: latin-1 -*-
# PyQtRibbon: a ribbon library for PyQt
# Copyright (C) 2014 RoadrunnerWMC
# This file is part of PyQtRibbon.
# PyQtRibbon 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 Fou... | RoadrunnerWMC/PyQtRibbon | FileMenu.py | Python | gpl-3.0 | 14,037 |
#!/usr/bin/env python
from __future__ import print_function
import sys
import time
import random
import logging
import argparse
import webbrowser
from contextlib import closing
from argparse import RawTextHelpFormatter
from pypot.server.snap import find_local_ip
from pypot.creatures import installed_poppy_creatures... | sonelu/pypot | pypot/creatures/services_launcher.py | Python | gpl-3.0 | 6,996 |
# gLifestream Copyright (C) 2009, 2010, 2013, 2014, 2015 Wojciech Polak
#
# 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 ve... | wojciechpolak/glifestream | glifestream/stream/media.py | Python | gpl-3.0 | 5,994 |
from .config import *
from .menus import TopMenuItem
from .directory import Directory
class EditingChoice:
LOCK_SHAPE_MOVEMENT = False
LOCK_XY_GLOBAL = True
LOCK_XY_MOVEMENT = None
LOCK_GUIDES = False
HIDE_GUIDES = False
HIDE_CONTROL_POINTS = False
HIDE_AXIS = True
SHOW_ALL_TIME_LINES =... | sujoykroy/motion-picture | editor/MotionPicture/settings/__init__.py | Python | gpl-3.0 | 582 |
#CAOS EFU Model Parameter File
#timing and files
wd='.' #working_directory
precf='irr_specht.dat' #top_boundary_flux_precip
etf='etp.dat' #top_boundary_flux_etp
inimf='05moist.dat' #initial_moisture
outdir='out' #output_directory [not used while testing]
t_end=8640... | cojacoo/testcases_echoRD | mcini_gen2a.py | Python | gpl-3.0 | 2,230 |
from twisted.internet import reactor
from . import acl, behaviours, core, db, misc
| lucassm/pade-sem-gui | pade/__init__.py | Python | gpl-3.0 | 84 |
#!/usr/bin/env python
import glob
import json
import os
import yaml
from tests.utils.componentmocks import BotMockManager
from tests.utils.componentmocks import get_custom_timestamp
from ansibullbot.triagers.ansible import AnsibleTriage
class TestSuperShipit:
def test_supershipit(self, *args, **kwargs):
... | jctanner/ansibullbot | tests/component/test_supershipit.py | Python | gpl-3.0 | 3,751 |
# -*- coding: utf-8 -*-
"""
Éditeur de Spyder
Portagee de la detection de tige de Olivier (en matlab) vers python
Regroupe les differentes fonctions pour le traitements des images de la manip
du gravitron.
Version: 2.0.2
Date: 14/12/2015
Modif
-----
15/12/2015 Hugo: Changement du seuil de l'auto detection de 0.1 à... | hchauvet/RootStemExtractor | Mac_Rootstemextractor.app/Contents/Resources/libgravimacro.py | Python | gpl-3.0 | 66,476 |
from django.db import models
from encrypted_model_fields.fields import EncryptedMixin
from bitpoll.base.models import BitpollUser
class EncryptedURLField(EncryptedMixin, models.URLField):
pass
class DavCalendar(models.Model):
user = models.ForeignKey(BitpollUser, on_delete=models.CASCADE)
url = Encrypt... | fsinfuhh/Bitpoll | bitpoll/caldav/models.py | Python | gpl-3.0 | 467 |
# -*- coding: utf-8 -*-
from ..internal.SimpleCrypter import SimpleCrypter
class FshareVnFolder(SimpleCrypter):
__name__ = "FshareVnFolder"
__type__ = "crypter"
__version__ = "0.07"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?fshare\.vn/folder/.+'
__config__ = [("activated", "boo... | thispc/download-manager | module/plugins/crypter/FshareVnFolder.py | Python | gpl-3.0 | 869 |
#!/usr/bin/python
# -*- coding: latin-1 -*-
# 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, or (at your option) any later
# version.
#
# This program is distributed in the hope... | reingart/pyafipws | wsaa.py | Python | gpl-3.0 | 21,389 |
async def entry_to_code(bot, entries):
width = max(map(lambda t: len(t[0]), entries))
output = ['```']
fmt = '{0:<{width}}: {1}'
for name, entry in entries:
output.append(fmt.format(name, entry, width=width))
output.append('```')
await bot.say('\n'.join(output))
import datetime
async d... | metalun4/lunabot | cogs/utils/formats.py | Python | gpl-3.0 | 2,512 |
import kidlearn_lib as k_lib
from supervisor import Supervisor
class ZPDESSupervisor(Supervisor):
def __init__(self, config, environment, alpha_reward=0.5, activate_succ_th=0.5, deactivate_succ_th=0.8, progress_window_size=20, supervisor_config={}):
Supervisor.__init__(self, config, environment,... | sebastien-forestier/explaupoppydiva | explaupoppydiva/agent/zpdes_sup.py | Python | gpl-3.0 | 5,317 |
# coding=utf8
# Simon's attempts to make a single feature selection pipeline
from __future__ import print_function
# from Queue import PriorityQueue
import numpy as np
import sys, os
import re
import json
# sys.path.append('/Users/simon/git/efcompute')
# from ef_assigner import ef_assigner
# from formula import Formula... | sdrogers/lda | code/ms2lda_feature_extraction.py | Python | gpl-3.0 | 94,199 |
from gnuradio import gr
from gnuradio import blocks
import eme_swig as eme
class top_block(gr.top_block):
def __init__(self):
gr.top_block.__init__(self)
#src = eme.packet_no_rs_source((0x61, 0x37, 0x30, 0x28, 0x09, 0x27, 0x61, 0x58, 0x26, 0x3, 0x49, 0x16), True)
src = eme.packet_no_rs_source((... | trdean/grEME | gr-eme/python/ungray.py | Python | gpl-3.0 | 764 |
# -*- coding: utf-8 -*-
# This file is part of X2R.
#
# X2R 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.
#
# X2R i... | FengPu/x2r-me | x2r-me/x2r.py | Python | gpl-3.0 | 5,059 |
# Copyright (c) 2017-2021 Fumito Hamamura <fumito.ham@gmail.com>
# This library is free software: you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation version 3.
#
# This library is distributed in the hope that it will be use... | fumitoh/modelx | modelx/serialize/serializer_4.py | Python | gpl-3.0 | 55,335 |
# -*- coding: utf-8; Mode: Python; indent-tabs-mode: nil; tab-width: 4 -*-
#
# wireless.py
#
# Copyright (C) 2010 Canonical Ltd.
# Written by Evan Dandrea <evan.dandrea@canonical.com>
#
# Copyright © 2013-2018 Antergos
#
# This program is free software; you can redistribute it and/or modify
# it under the terms o... | Antergos/Cnchi | src/pages/wireless.py | Python | gpl-3.0 | 6,006 |
#!/usr/bin/python
# Put gene symbol from annotation GTF into exon level results
from __future__ import print_function
import sys
import re
gspat = re.compile('gene_name "([^"]+)";')
genesymbol = dict()
gtf = open(sys.argv[1])
for i in gtf:
fields = i.rstrip().split("\t")
m = gspat.search(i)
if m:
value = m.gro... | TravisCG/SI_scripts | putgeneidexon.py | Python | gpl-3.0 | 606 |
# This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... | 2ndQuadrant/ansible | lib/ansible/module_utils/netapp.py | Python | gpl-3.0 | 30,733 |
import sys
from __future__ import print_function # Error on this line
| pyta-uoft/pyta | examples/pylint/w0410_misplaced_future.py | Python | gpl-3.0 | 72 |
import re
from datetime import date
from subprocess import PIPE, call
import pkg_resources
import reversion
import yaml
from django.apps import apps
from django.apps.config import AppConfig
from django.contrib.auth import get_user_model
from django.contrib.contenttypes.models import ContentType
from django.core.except... | LeandroRoberto/sapl | sapl/legacy/migration.py | Python | gpl-3.0 | 31,988 |
from gnuradio import gr
import fec
from fec.threaded_encoder import threaded_encoder
from fec.bitflip import read_bitlist
from fec.capillary_threaded_encoder import capillary_threaded_encoder
class extended_encoder_interface(gr.hier_block2):
def __init__(self, encoder_obj_list, threading, puncpat=None):
g... | kkarrancsu/fecapi | python/extended_encoder_interface.py | Python | gpl-3.0 | 1,418 |
from ase.visualize import view
from ase.constraints import FixAtoms
from ase.optimize import QuasiNewton
from ase.lattice.surface import fcc100, add_adsorbate
from gpaw import GPAW, PW
# Initial state:
# 2x2-Al(001) surface with 1 layer and an
# Au atom adsorbed in a hollow site:
slab = fcc100('Al', size=(2, 2, 2))
sl... | robwarm/gpaw-symm | doc/exercises/diffusion/initial.py | Python | gpl-3.0 | 1,045 |
#! /usr/bin/python3
# -*- coding: utf-8 -*-
import json
import os
import unittest
from configparser import ConfigParser
from io import BytesIO
from magic import Magic
#from PIL import Image
from ..config import Config
from ..connector import MastodonConnector, TootStatus, TwitterConnector
from ..status_text import S... | vocalodon/dontwi | dontwi/tests/test_connector.py | Python | gpl-3.0 | 7,809 |
"""
RequestType
"""
import logging
from galaxy.model import RequestType
from sample import sample_state_factory
RENAME_DATASET_OPTIONS = dict( [ ( f_type.lower(), f_descript ) for f_type, f_descript in RequestType.rename_dataset_options.items() ] )
class RequestTypeFactory( object ):
def __init__( self, sample_st... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/sample_tracking/request_types.py | Python | gpl-3.0 | 1,562 |
from embroider.process import *
| ArmstrongJ/embroider | embroider/__init__.py | Python | gpl-3.0 | 32 |
#!/usr/bin/env python
import os
__all__ = ['core', 'xmlutils']
__version__ = "0.5dev"
def get_git_hash():
"""Get the git hash for this build, if available"""
try:
folder = os.path.dirname(os.path.abspath(__file__))
path = os.path.join(folder, "GIT_VERSION.txt")
with open(path, "r") a... | Batch21/pywr | pywr/__init__.py | Python | gpl-3.0 | 459 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Tommy Winther
# http://tommy.winther.nu
#
# Modified for FTV Guide (09/2014 onwards)
# by Thomas Geppert [bluezed] - bluezed.apps@gmail.com
#
# Modified for TV Guide Fullscreen (2016)
# by primaeval - primaeval.dev@gmail.com
#
# This Program ... | bigoldboy/repository.bigoldboy | script.tvguide.fullscreen/source.py | Python | gpl-3.0 | 155,209 |
from django.contrib.contenttypes.models import ContentType
from django.db.models import Q
from rest_framework import status
from rest_framework.generics import (
CreateAPIView,
ListAPIView,
RetrieveAPIView,
)
from rest_framework.mixins import DestroyModelMixin, UpdateModelMixin
from rest... | michel-rodrigues/forum | source/comments/views.py | Python | gpl-3.0 | 1,880 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of zero-ears.
#
# zero-ears 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 ... | aurelienmaury/galaxie | sandbox_mo/zero-ears/zero-ears.py | Python | gpl-3.0 | 1,457 |
from __future__ import with_statement
import os, sys, subprocess, threading, cherrypy, webbrowser, sqlite3
import datetime
from lib.configobj import ConfigObj
from lib.apscheduler.scheduler import Scheduler
import threading
from lazylibrarian import logger, postprocess, searchnzb
FULL_PATH = None
PROG_DIR = None
... | theguardian/LazyLibrarian_Old | lazylibrarian/__init__.py | Python | gpl-3.0 | 17,792 |
# -*- coding: UTF-8 -*-
#
# _/_/_/ _/_/_/ _/_/ _/ _/ _/_/_/ _/
# _/ _/ _/ _/ _/ _/_/ _/ _/ _/ _/
# _/ _/_/_/ _/_/_/_/ _/ _/ _/ _/_/_/ _/
# _/ _/ _/ ... | michalb1981/ibanpl | iban.py | Python | gpl-3.0 | 9,388 |
from setuptools import setup
version = '1.0.1.dev0'
long_description = '\n\n'.join([
open('README.rst').read(),
open('CREDITS.rst').read(),
open('CHANGES.rst').read(),
])
install_requires = [
'redis>=2.10.5',
],
tests_require = ["flake8", "ipdb", "ipython", "pytest", "pytest-cov"]
setup(nam... | nens/turn | setup.py | Python | gpl-3.0 | 1,473 |
# =============================================================================
# Copyright [2013] [Kevin Carter]
# License Information :
# This software has no warranty, it is provided 'as is'. It is your
# responsibility to validate the behavior of the routines and its accuracy
# using the code provided. Consult the ... | cloudnull/tribble-api | tribble/__init__.py | Python | gpl-3.0 | 1,994 |
"""Dosh project view utilities."""
| danielward/dosh | dosh/utilities/views.py | Python | gpl-3.0 | 35 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# post_install.py
#
# Copyright © 2013-2018 Antergos
#
# This file is part of Cnchi.
#
# Cnchi 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 o... | Antergos/Cnchi | src/installation/post_install.py | Python | gpl-3.0 | 36,048 |
from __future__ import unicode_literals
import frappe
def execute():
for d in frappe.get_all("Employee"):
employee = frappe.get_doc("Employee", d.name)
if employee.company_email:
employee.prefered_contact_email = "Company Email"
employee.prefered_email = employee.company_email
elif employee.personal_email... | indautgrp/erpnext | erpnext/patches/v7_1/set_prefered_contact_email.py | Python | gpl-3.0 | 572 |
import numpy as np
import pytest
from reaktoro import (
ChemicalEditor,
ChemicalState,
ChemicalSystem,
CubicEOSParams,
Database,
EquilibriumOptions,
EquilibriumProblem,
EquilibriumSolver,
GibbsHessian,
PhaseIdentificationMethod,
StepMode,
)
"""
All the tests tries to ensure... | Reaktoro/Reaktoro | tests/regression/test_equilibrium_liq_gas_aq.py | Python | gpl-3.0 | 3,872 |