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 |
|---|---|---|---|---|---|
# robotframework-scientificlibrary
#
# Copyright (C) 2014 Stefan Zimmermann <zimmermann.code@gmail.com>
#
# robotframework-scientificlibrary
# 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 vers... | userzimmermann/robotframework-scientificlibrary | ScientificLibrary/compute.py | Python | gpl-3.0 | 988 |
# -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Conector para letwatch
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os
from core impo... | conejoninja/pelisalacarta | python/main-classic/servers/letwatch.py | Python | gpl-3.0 | 2,996 |
# -*- coding: utf-8 -*-
# Copyright (C) 2015 ZetaOps Inc.
#
# This file is licensed under the GNU General Public License v3
# (GPLv3). See LICENSE.txt for details.
"""HITAP Nufus Guncelle
Hitap'a personelin Nufus bilgilerinin guncellenmesini yapar.
"""
from ulakbus.services.personel.hitap.hitap_service import Za... | zetaops/ulakbus | ulakbus/services/personel/hitap/hizmet_nufus_guncelle.py | Python | gpl-3.0 | 1,651 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
__author__ = 'sunset'
__date__ = '20141111'
import json
import random
import datetime
from pyramid.view import view_config
from pyramid.response import Response
from sqlalchemy import or_
from kotti import DBSession
from kotti.security import get_user
#from mba.resources... | toway/towaymeetups | mba/views/api.py | Python | gpl-3.0 | 4,237 |
"""
Author: RedFantom
License: GNU GPLv3
Copyright (c) 2017-2018 RedFantom
"""
import os
from tkinter import TkVersion
from setuptools import setup
if TkVersion <= 8.5:
message = "This version of ttkthemes does not support Tk 8.5 and earlier. Please install a later version."
raise RuntimeError(message)
def ... | SAOImageDS9/SAOImageDS9 | ttkthemes/setup.py | Python | gpl-3.0 | 1,699 |
import os
from xbmcswift2.logger import log
from xbmcswift2.mockxbmc import utils
def _get_env_setting(name):
return os.getenv('XBMCSWIFT2_%s' % name.upper())
class Addon(object):
def __init__(self, id=None):
# In CLI mode, xbmcswift2 must be run from the root of the addon
# directory, so w... | jbaiter/plugin.video.brmediathek | resources/lib/xbmcswift2/mockxbmc/xbmcaddon.py | Python | gpl-3.0 | 1,905 |
#!/usr/bin/python3
""" wemo_lrlt1.py:
"""
# Import Required Libraries (Standard, Third Party, Local) ************************************************************
import copy
import datetime
import logging
import multiprocessing
import time
from .device_wemo import DeviceWemo
# Authorship Info *********************... | csm0042/rpihome | rpihome/devices/device_wemo_lrlt1.py | Python | gpl-3.0 | 3,812 |
#
# This file is part of ROSbots Setup Tools.
#
# Copyright
#
# Copyright (C) 2017 Jack Pien <jack@rosbots.com>
#
# License
#
# 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 Foundatio... | ROSbots/rosbots_setup_tools | rpi_setup/fabfile.py | Python | gpl-3.0 | 34,336 |
from django import forms
from django.utils.translation import ugettext_lazy as _
class ExportSubmissionsForm(forms.Form):
round = forms.ModelChoiceField(
queryset=None,
required=False,
empty_label=_("All rounds"),
label=_("Choose round"),
)
only_final = forms.BooleanField(
... | sio2project/oioioi | oioioi/exportszu/forms.py | Python | gpl-3.0 | 584 |
import random
import pygame
import PyParticles
class UniverseScreen:
def __init__(self, width, height):
self.width = width
self.height = height
(self.dx, self.dy) = (0, 0)
(self.mx, self.my) = (0, 0)
self.magnification = 1.0
def scroll(self, dx=0, dy=0):
self.d... | manulera/ModellingCourse | Bounce/Main.py | Python | gpl-3.0 | 2,970 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Extract sequences from a fasta file if their name is not in a 'remove' file.
Remove file contains one sequence name per line.
Usage:
%program <input_file> <remove_file> <output_file>"""
# Importing modules
import gzip
import sys
# Defining classes
class Fasta(o... | enormandeau/Scripts | fasta_remove.py | Python | gpl-3.0 | 2,142 |
#!/usr/bin/env python3
from gi.repository import Gtk
from gi.repository import GLib
import dialogs
import information
import menu
import sonos
import toolbar
class Window(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self)
self.set_default_size(400, 250)
self.set_title('Alaska - %s... | steeleyuk/alaska | window.py | Python | gpl-3.0 | 7,483 |
# -*- coding: utf-8 -*-
#from __future__ import print_function, division, absolute_import, unicode_literals
#from gmusicapi.clients.webclient import Webclient
#from gmusicapi.clients.musicmanager import Musicmanager
from gmusicapi.clients.mobileclient import Mobileclient
#(Webclient, Musicmanager, Mobileclient) # no... | vially/googlemusic-xbmc | resources/Lib/gmusicapi/clients/__init__.py | Python | gpl-3.0 | 323 |
# -*- coding: utf-8 -*-
'''
*GSASIIstrMain: main structure routine*
---------------------------------------
'''
########### SVN repository information ###################
# $Date: 2018-07-13 22:44:01 +0300 (Fri, 13 Jul 2018) $
# $Author: toby $
# $Revision: 3471 $
# $URL: https://subversion.xray.aps.anl.gov/... | AntonGagin/GSAS_USE | patchSystErrors/modifiedOld/GSASIIstrMain.py | Python | gpl-3.0 | 85,029 |
#!/usr/bin/env python
from distutils.core import setup
setup(
name='cidr',
version='0.1',
description='CIDR ranges helper',
license='GPLv3',
author='deadc0de6',
url='https://github.com/deadc0de6/cidr',
py_modules=['cidr'],
scripts=['cidr.py'],
install_requires=['docopt', 'netaddr',... | deadc0de6/cidr | setup.py | Python | gpl-3.0 | 337 |
import array
import itertools
import logging
import multiprocessing
import numpy
import scipy.sparse
import sharedmem
import sppy
import time
from sandbox.misc.RandomisedSVD import RandomisedSVD
from sandbox.recommendation.AbstractRecommender import AbstractRecommender
from sandbox.recommendation.IterativeSoftImput... | charanpald/sandbox | sandbox/recommendation/MaxLocalAUC.py | Python | gpl-3.0 | 37,126 |
# -*- coding: utf-8 -*-
# Copyright 2012 Vincent Jacques
# vincent@vincent-jacques.net
# This file is part of PyGithub. http://vincent-jacques.net/PyGithub
# PyGithub 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 Softwar... | andresriancho/PyGithub | github/GistComment.py | Python | gpl-3.0 | 4,007 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2018-02-20 12:41
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0008_notificacao_user_origin'),
]
operations = [
migrations.AlterModelOptio... | cmjatai/cmj | cmj/core/migrations/0009_auto_20180220_0941.py | Python | gpl-3.0 | 578 |
import unittest
from collections import namedtuple
from io import BytesIO
import codecs
import sha2
import hmac
class TestSHA2(unittest.TestCase):
# test vectors from https://csrc.nist.gov/projects/cryptographic-standards-and-guidelines/example-values
TestVector = namedtuple('TestVector', ['digestcls', 'text'... | olbat/o1b4t | coding/crypto/test_hmac.py | Python | gpl-3.0 | 10,162 |
# Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of SickRage.
#
# SickRage 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,... | bcorbet/SickRage | sickbeard/classes.py | Python | gpl-3.0 | 7,984 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import logging
from .render import render_tablature
__all__ = ['render_tablature']
| pignacio/chorddb | chorddb/terminal/__init__.py | Python | gpl-3.0 | 190 |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Process (extract, filter, merge) Vossantos in an org mode file.
#
# Usage: Without any arguments, extracts all Vossanto canidates from
# the given org file.
#
# Author: rja
#
# Changes:
# 2019-12-18 (rja)
# - added field sourceImageLicense
# 2019-12-16 (rja)
# - added opt... | weltliteratur/vossanto | org.py | Python | gpl-3.0 | 20,210 |
# -*- coding: utf-8 -*-
import math
import os
from pyramid.view import view_config
from pyramid.renderers import render
from pyramid.httpexceptions import (
HTTPMovedPermanently,
HTTPFound,
HTTPNotFound,
)
import trady
here = os.path.dirname(__file__)
@view_config(route_name="stock-report", renderer... | cudos/trady | trady/views.py | Python | gpl-3.0 | 736 |
# -*- coding: UTF-8 -*-
#!/usr/bin/env python
# -----------------------------------------------------------------------------
# Name: UData Python Client
# Purpose: Abstraction class to manipulate data.gouv.fr API
#
# Author: Julien Moura (@geojulien)
#
# Python: 3.6+
# ------------------------... | Guts/ESIPE_IG3_2016 | 02_TP/qgis/_exercices/1_Python/1_udata_client_datagouvfr.py | Python | gpl-3.0 | 6,942 |
# 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... | vpodzime/lvm-dubstep | lvmdbus/automatedproperties.py | Python | gpl-3.0 | 6,035 |
from .utils import *
vep_and_snpeff_inputs = [(input_prefix + '.vcf.gz', False),
(input_prefix + '.snpeff.vcf.gz', True)]
def test_case_control():
for vcf, snpeff in vep_and_snpeff_inputs:
output = get_tmp_out()
test_args = dict(
input=vcf,
snpeff=... | gantzgraf/vape | test/test_sample_filters.py | Python | gpl-3.0 | 6,155 |
import jieba
# cmu = file('cmu.dic').readlines()
# cmu_dict = dict()
# for line in cmu:
# line = line.decode('utf-8')
# line = line[:len(line)-1]
# pos = line.find(u' ')
# keyword = line[:pos].lower()
# content = line[pos:].lower()
# cmu_dict[keyword] = content
chinese = file('zh_broadcastnews_utf8.dic').readli... | strin/yaotalk | yaoTalkSpeech/yaoTalkSpeech/lm/make_dic.py | Python | gpl-3.0 | 1,489 |
#!/usr/bin/env python
import sys
sys.path.append("..")
import sys
import getopt
from time import time
from simulannealing import SimulatedAnnealing as SimulAnn
import graph as Graph
from graph_utils import GraphGen
# Tamanho previsto para as instancias aleatorias.
instances = [10, 50, 100, 200, 500, 700, 1000, 1500]... | victormatheus/simulated_annealing | tests/test_random.py | Python | gpl-3.0 | 694 |
import unittest
import unitils
from io import StringIO
try:
from unittest import mock
except ImportError:
import mock
return_value = (
'that', 'that', 'that',
'the other', 'the other', 'the other',
'this', 'this', 'this'
)
column_test_return_value = (
"appveyor.yml",
... | iLoveTux/unitils | test/test_ls.py | Python | gpl-3.0 | 3,856 |
from oppy.vector import *
import numpy as np
# ported from osu-web
"""
gets a point on a line
p1, p2: the two points that define the line
t: how far into the line we are (0.0 would be p1 and 1.0 would be p2)
"""
def pt_on_line(p1, p2, t):
r = min(1.0, max(0.0, t))
l = (p2.subtract(p1)).length()
n = l - l... | altur13/osu-Assistant | oppy/curves.py | Python | gpl-3.0 | 4,911 |
# -*- coding: utf-8 -*-
##
##
## This file is part of Indico.
## Copyright (C) 2002 - 2014 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; eith... | pferreir/indico-backup | indico/MaKaC/common/MaKaCConfig.py | Python | gpl-3.0 | 1,407 |
#!/usr/bin/env python
# Copyright 2017.
# Michael A. DeJesus, Chaitra Ambadipudi, and Thomas R. Ioerger.
#
#
# This file is part of TRANSIT.
#
# TRANSIT 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 Foun... | mad-lab/transit | src/pytpp/tpp_gui.py | Python | gpl-3.0 | 25,744 |
from collections import namedtuple
import re
import logging
logger = logging.getLogger(__name__)
Line = namedtuple('Line', 'prefix command middle params trailing')
Prefix = namedtuple('Prefix', 'nick ident hostname')
def unpack_prefix(prefix):
match = re.match(
r'^(?P<nick>[^!@]+)'
r'(?:!(?P<ide... | knitori/shanghai-doll | shanghai/irc/parse.py | Python | gpl-3.0 | 2,638 |
# coding=utf-8
import unittest
"""669. Trim a Binary Search Tree
https://leetcode.com/problems/trim-a-binary-search-tree/description/
Given a binary search tree and the lowest and highest boundaries as `L` and
`R`, trim the tree so that all its elements lies in `[L, R]` (R >= L). You
might need to change the root of ... | openqt/algorithms | leetcode/python/lc669-trim-a-binary-search-tree.py | Python | gpl-3.0 | 1,292 |
#-*- coding: UTF-8 -*
############################################################################
############################################################################
#### Person responsible for this pure evil spaghetti code : ####
#### Paul Bonijol -> paul [.] bnjl ['AT'] gmail [.] com ####
#### Works... | paulbnjl/PySerSpec | PySerSpec/cuvette_position_check.py | Python | gpl-3.0 | 1,949 |
"""
mediatum - a multimedia content repository
Copyright (C) 2009 Arne Seifert <seiferta@in.tum.de>
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... | mediatum/mediatum | web/edit/modules/content.py | Python | gpl-3.0 | 5,793 |
# Copyright 2015 VPAC
#
# This file is part of Karaage.
#
# Karaage 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.
#
# Karaage is dist... | Karaage-Cluster/karaage-debian | karaage/plugins/kgapplications/views/common.py | Python | gpl-3.0 | 5,443 |
## @package shesha.constants
## @brief Numerical constants for shesha and config enumerations for safe-typing
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
# This file is part of COMPASS <https://anr-comp... | ANR-COMPASS/shesha | shesha/constants.py | Python | gpl-3.0 | 5,648 |
"""
Copyright (C) 2017 - The CocktailOverlord Authors
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 distribu... | florianfesti/CocktailOverlord | cocktailoverlord/db.py | Python | gpl-3.0 | 14,288 |
from arXivExtracter.extractTextFromTex import extractText, compileRegex, sortArgs
from xml.dom import minidom
import unittest
import os
class TestSortArgs(unittest.TestCase):
def testDefault(self):
self.assertEqual(sortArgs([]),
(False,[],["word","hword"],False,False,False,False),
... | rago1/arXiv-text-extracter | test_extractTextFromTex.py | Python | gpl-3.0 | 10,998 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-01 08:42
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('API', '0002_auto_20170201_0840'),
]
operations = [
migrations.AddField(
... | rearmlkp/Smart_Flash | API/migrations/0003_auto_20170201_0842.py | Python | gpl-3.0 | 917 |
from django.views.decorators.csrf import csrf_exempt
from django.shortcuts import get_object_or_404, render
from .models import Comment
from .forms import UpdateCommentForm
from django.http.response import JsonResponse
from django.views.decorators.http import require_http_methods
def update_comment(request, cid):
... | Resmin/Resmin | resmin/apps/comment/views.py | Python | gpl-3.0 | 1,460 |
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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, or
# (at your option) an... | blueboxgroup/ansible | lib/ansible/executor/playbook_executor.py | Python | gpl-3.0 | 11,134 |
from typing import TYPE_CHECKING
from kivy.factory import Factory
from kivy.lang import Builder
from kivy.core.clipboard import Clipboard
from kivy.app import App
from kivy.clock import Clock
from electrum_grs.gui.kivy.i18n import _
if TYPE_CHECKING:
from ...main_window import ElectrumWindow
Builder.load_strin... | GroestlCoin/electrum-grs | electrum_grs/gui/kivy/uix/dialogs/qr_dialog.py | Python | gpl-3.0 | 3,011 |
#!/usr/bin/python
import cv2
import numpy as np
import sys, getopt
import matplotlib
matplotlib.use('Agg') # Force matplotlib to not use any Xwindows backend.
from matplotlib import pyplot as plt
image_path = None
def printHelp():
print 'main.py\n' \
' -i <Image Path. Ex: /home/myImage.jpg > (Mandatory)\n' \... | gustavovaliati/ci724-ppginfufpr-2016 | exerc-3a/main.py | Python | gpl-3.0 | 930 |
#! /usr/bin/env python
import sys, os
sys.path.append('./include/python')
import proteomatic
import string
import re
class TransposeDna(proteomatic.ProteomaticScript):
def run(self):
# convert all characters to upper case
# Attention: parameters are Unicode because of the JSON parser
# us... | specht/proteomatic-scripts | transpose-dna.defunct.py | Python | gpl-3.0 | 911 |
from unittest import TestCase
import matplotlib.pyplot as plt
from wave_generator import WaveGenerator
class TestWaveGenerator(TestCase):
def test_sin(self):
length = 44100
sin1000 = WaveGenerator.sin(10000, 1000, 0, length)
self.assertEqual(0, sin1000[0])
self.assert... | pekimmoche/AudioExperiment | tests/test_wave_generator.py | Python | gpl-3.0 | 413 |
import importlib
from importlib.metadata import version as get_version
from DIRAC import S_OK
from DIRAC.Core.Utilities.Extensions import extensionsByPriority
def getCurrentVersion():
"""Get a string corresponding to the current version of the DIRAC package and all the installed
extension packages
"""
... | DIRACGrid/DIRAC | src/DIRAC/Core/Utilities/Version.py | Python | gpl-3.0 | 822 |
import os
import time
import numpy as np
import tensorflow as tf
import pickle
train_stats = (
'Training statistics: \n'
'\tLearning rate : {}\n'
'\tBatch size : {}\n'
'\tEpoch number : {}\n'
'\tBackup every : {}'
)
def _save_ckpt(self, step, loss_profile):
file = '{}-{}{}'
model = se... | mohamed-mamdouh95/pedestrainTracker | darkflow/net/flow.py | Python | gpl-3.0 | 4,587 |
from item import Item
class CarritoCompra(object):
def __init__(self, cliente):
self._cliente = cliente
self._items = []
self._subTotal = 0.00
self._iva = 0.00
self._total = 0.00
def agregarItem(self, cantidad, producto):
self._items.append(Item(cantidad, producto))
self.actualizarMontos()... | UAMJW/pythonoop-kairias97 | classes/carritocompra.py | Python | gpl-3.0 | 1,882 |
#emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
#ex: set sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See the COPYING file distributed along with the PTSA package for the
# copyright and license terms.
#
### ### ### ### ### ### ### #... | compmem/ptsa | ptsa/data/rawbinwrapper.py | Python | gpl-3.0 | 9,972 |
#!/usr/bin/env python3
import unittest
import argparse
from httpclient.httpclient import HttpRequest
class HttpRequstTest(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_parse_url(self):
host, port, resource = HttpRequest._parse_url('127.0.0.1')
... | mahyarap/httpclient | tests/test_httpclient.py | Python | gpl-3.0 | 1,500 |
# Copyright (c) 2011 The Hazelwire Team.
#
# This file is part of Hazelwire.
#
# Hazelwire 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... | Hazelwire/Hazelwire | src/Mainframe/ClientHandler/P2PSanityCheck.py | Python | gpl-3.0 | 3,894 |
import io
import os
class Selectel:
def __init__(self, core):
self.core = core
self.telegram = core.telegram.BOT
self.commands = {
'auth': self.storage_auth,
'containers': self.send_container_list,
'select_container': self.select_container,
... | VeryLonelyCocks/shiva | shiva/commands/telegram/selectel.py | Python | gpl-3.0 | 8,541 |
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# T... | Donkyhotay/MoonPy | zope/app/form/browser/tests/test_choicecollections.py | Python | gpl-3.0 | 3,109 |
#!/usr/bin/python
# encoding=utf-8
#!coding:utf-8
import re
import sys
import argparse
import commands
import os
import subprocess
import parse
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import openpyxl
class PerfPlotData :
plotName = "none name"
logfile = "none path"
... | gatieme/EnergyEfficient | script/plot/perflogplot.py | Python | gpl-3.0 | 8,694 |
#!/usr/bin/env python
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
### BEGIN LICENSE
# This file is in the public domain
### END LICENSE
###################### DO NOT TOUCH THIS (HEAD TO THE SECOND PART) ######################
import os
import sys
try:
import DistUtilsExtra.auto
exc... | jasbur/compensato | working_files/compensato-gui/setup.py | Python | gpl-3.0 | 5,194 |
#!/usr/bin/env python3
import json
import requests
def lookup(query):
data = json.loads(requests.get(
"http://jisho.org/api/v1/search/words?keyword=%s" % query).text)
results = {}
for result in range(len(data["data"])):
results[result] = {"readings": [], "words": [], "senses": {}}... | trohrt/python_jisho | jisho.py | Python | gpl-3.0 | 1,491 |
# UrbanFootprint v1.5
# Copyright (C) 2017 Calthorpe Analytics
#
# This file is part of UrbanFootprint version 1.5
#
# UrbanFootprint is distributed under the terms of the GNU General
# Public License version 3, as published by the Free Software Foundation. This
# code is distributed WITHOUT ANY WARRANTY, without impl... | CalthorpeAnalytics/urbanfootprint | footprint/main/management/commands/create_datadump.py | Python | gpl-3.0 | 4,014 |
import click
from oktawave.api import CloneType, DICT as OktawaveConstants
from oktawave.commands.context import NamedItemParam, pass_context, OktawaveCliGroup, positional_option
from oktawave.commands.oci import clone_type_param, template_id_param, oci_class_param, subregion_param
from oktawave.commands.util import sh... | gnosek/oktawave-cli | oktawave/commands/ordb.py | Python | gpl-3.0 | 7,032 |
#!/usr/bin/env python2
__license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
'''
Builtin recipes.
'''
import re, time, io
from calibre.web.feeds.news import (BasicNewsRecipe, CustomIndexRecipe,
AutomaticNewsRecipe, CalibrePeriodical)
from calibre.ebooks.BeautifulSoup import Beautif... | timpalpant/calibre | src/calibre/web/feeds/recipes/__init__.py | Python | gpl-3.0 | 1,816 |
#!/usr/bin/env python
#coding=utf-8
'''
Created on 06 Ιουν 2011
@author: tedlaz
'''
import functions as f
import decimal as decim
from datetime import datetime, date, time
class d():
def __init__(self,val=0, txt='',desc='',decimals=4):
self.decimals = decimals
self.val = f.dec(val,self.decimals)
... | tedlaz/pyted | misthodosia/pyMisthodosia/src/tst.py | Python | gpl-3.0 | 11,303 |
"""
CoCo config
================
:created: 2014 by Jens Diemer - www.jensdiemer.de
:copyleft: 2014-2015 by the DragonPy team, see AUTHORS for more details.
:license: GNU GPL v3 or above, see LICENSE for more details.
"""
import logging
from dragonlib.api import CoCoAPI
from dragonpy import cons... | jedie/DragonPy | dragonpy/CoCo/config.py | Python | gpl-3.0 | 3,796 |
# -*- coding: utf-8 -*-
"""
This module contains fake spectrometer.
Qudi 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.
Qudi is distribute... | tobiasgehring/qudi | hardware/spectrometer/spectrometer_dummy.py | Python | gpl-3.0 | 3,308 |
#!/usr/bin/python3
# encoding=utf-8
import reg_mailru_email
print (reg_mailru_email.reg_mailru_email())
| tech22info/registrator | regs/mailru_registrator.py | Python | gpl-3.0 | 106 |
# 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 +
import sys
from Muon.GUI.Common.muon_load_dat... | mganeva/mantid | scripts/test/Muon/frequency_domain_context_test.py | Python | gpl-3.0 | 2,194 |
#!/usr/bin/env python3
# vim: sw=4 ts=4 expandtab
# (c) 2021 Thomas BERNARD
# Python3 module to submit service to running MiniSSDPd
# MiniSSDPd: See http://miniupnp.free.fr/minissdpd.html
import socket, os
def codelength(s):
""" returns the given string/bytes as bytes, prepended with the 7-bit-encoded length """
... | mupen64plus-ae/mupen64plus-ae | ndkLibs/miniupnp/minissdpd/submit_to_minissdpd.py | Python | gpl-3.0 | 1,938 |
"""
Responsible for parsing IOIDS data engine policies and providing interfaces for checking against them.
Inter-Organisational Intrusion Detection System (IOIDS)
Check README in the IOIDS folder for more information.
@author: Michael Pilgermann
@contact: mailto:mpilgerm@glam.ac.uk
@license: GPL (General Public Lice... | kichkasch/ioids | ioids/policyengine.py | Python | gpl-3.0 | 11,565 |
#!/usr/bin/env python
# coding: utf-8
import os
import csv
from schedule_entry import EntryStatus
from machine import MachineStatus
def dump_stat(path, data, headers):
with open(path, 'w') as out:
csv_out = csv.writer(out)
csv_out.writerow(headers)
for row in data:
csv_out.wri... | rika/dynamic-provisioning | statistics.py | Python | gpl-3.0 | 3,837 |
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import unittest
import doctest
import trytond.tests.test_tryton
from trytond.tests.test_tryton import ModuleTestCase
from trytond.tests.test_tryton import doctest_setup, doctes... | kret0s/gnuhealth-live | tryton/server/trytond-3.8.3/trytond/modules/sale_promotion/tests/test_sale_promotion.py | Python | gpl-3.0 | 824 |
"""
Testing the utility functions.
"""
import gzip
import logging
import math
import os
import unittest
import gensim
from gensim.models import TfidfModel
import operator
from safire.data import VTextCorpus, FrequencyBasedTransformer
from safire.data.filters.positionaltagfilter import PositionalTagTokenFilter
from s... | hajicj/safire | test/test_utils.py | Python | gpl-3.0 | 6,745 |
import pygame
# This class creates the scene basic structure
class Scene(object):
def __init__(self, name="DEFAULT", ID=0):
self.name = name
self.ID = ID
def update(self, events):
pass
def load(self):
pass
def draw(self, screen, groups):
pass
| fgaTactics/tecprog2017.1 | gameEngine/Scene.py | Python | gpl-3.0 | 306 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Unix SMB/CIFS implementation.
# Copyright (C) Kamen Mazdrashki <kamenim@samba.org> 2011
# Copyright (C) Andrew Bartlett <abartlet@samba.org> 2016
# Copyright (C) Catalyst IT Ltd. 2016
#
# This program is free software; you can redistribute it and/or modify
# it under t... | kernevil/samba | source4/torture/drs/python/drs_base.py | Python | gpl-3.0 | 24,898 |
"""
Craft is a script to access the plugins which craft a gcode file.
The plugin buttons which are commonly used are bolded and the ones which are rarely used have normal font weight.
"""
from __future__ import absolute_import
#Init has to be imported first because it has code to workaround the python bug where rela... | tobykurien/MakerDroid | assetsrc/public.mp3/skeinforge/skeinforge_utilities/skeinforge_craft.py | Python | gpl-3.0 | 7,636 |
#
# Copyright Muis IT 2011 - 2016
#
# This file is part of AWS Freezer
#
# AWS Freezer 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.
... | muisit/freezer | gui/createvaultdialog.py | Python | gpl-3.0 | 1,774 |
# -*- coding: utf-8 -*-
import pygame.display
import pygame.image
import pygame.sprite
import engine
class Player(pygame.sprite.Sprite):
def __init__(self, image_path, x):
super(Player, self).__init__()
self._screen = pygame.display.get_surface()
self.image = pygame.image.load(image_pat... | sblondon/jumpjump | src/players.py | Python | gpl-3.0 | 2,947 |
# coding=utf-8
import unittest
"""295. Find Median from Data Stream
https://leetcode.com/problems/find-median-from-data-stream/description/
Median is the middle value in an ordered integer list. If the size of the list
is even, there is no middle value. So the median is the mean of the two middle
value.
For example,... | openqt/algorithms | leetcode/python/lc295-find-median-from-data-stream.py | Python | gpl-3.0 | 1,385 |
# -*- encoding: utf-8 -*-
# vim: ts=4 sw=4 expandtab ai
"""
Implements Template UI
"""
from robottelo.ui.base import Base, UINoSuchElementError
from robottelo.ui.locators import locators, common_locators, tab_locators
from robottelo.ui.navigator import Navigator
from selenium.webdriver.support.select import Select
fr... | oshtaier/robottelo | robottelo/ui/template.py | Python | gpl-3.0 | 5,867 |
import time
import random
from contextlib import contextmanager
from multiprocessing import Lock, BoundedSemaphore, Value
class RequestManager:
def __init__(self, max_workers):
self.max_workers = max_workers
self.lock = Lock()
self.sem = BoundedSemaphore(max_workers)
self.last_requ... | logicalhacking/ExtensionCrawler | ExtensionCrawler/request_manager.py | Python | gpl-3.0 | 1,347 |
from math import isnan
import warnings
import unittest
from unittest.mock import MagicMock
import numpy as np
from numpy.testing import assert_array_equal
from Orange.data import \
Instance, Domain, Unknown, Value, \
DiscreteVariable, ContinuousVariable, StringVariable
class TestInstance(unittest.TestCase):... | hugobuddel/orange3 | Orange/tests/test_instance.py | Python | gpl-3.0 | 14,298 |
# -*- coding: utf-8 -*-
"""
A Cell
A cell is a single input/output block. Worksheets are built out of
a list of cells.
"""
###########################################################################
# Copyright (C) 2006 William Stein <wstein@gmail.com>
#
# Distributed under the terms of the GNU General Public ... | bollu/sagenb | sagenb/notebook/cell.py | Python | gpl-3.0 | 82,188 |
import copy
from wpm.filelist import *
f = filelist()
f.load("/home/kman/bin/wpm")
f.get_list()
p = copy.copy(f)
p.sort()
f.randomize()
p.get_list()
f.get_list()
p.close()
f.close() | cristicalin/setwall | junk/test_copy.py | Python | gpl-3.0 | 181 |
from bs4 import BeautifulSoup
from collections import OrderedDict
from lxml import etree as et
import datetime as dt
import io
import os
import pikepdf
import unittest.mock
import subprocess
import itertools
from hashlib import md5
from unittest.mock import PropertyMock
from django.contrib.auth.models import Anonymou... | erudit/zenon | tests/functional/apps/public/journal/test_views.py | Python | gpl-3.0 | 135,649 |
#!/usr/bin/env python
from distutils.core import setup
setup(
name='targetd',
version='0.8.8',
description='Linux remote storage API daemon',
license='GPLv3',
maintainer='Andy Grover',
maintainer_email='agrover@redhat.com',
url='http://github.com/open-iscsi/targetd',
packages=['targetd... | agrover/targetd | setup.py | Python | gpl-3.0 | 358 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-03-19 03:00
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('products', '0003_auto_20160319_1021'),
... | karlind/ewu-v4 | products/migrations/0004_auto_20160319_1100.py | Python | gpl-3.0 | 566 |
# 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 +
#pylint: disable=invalid-name
""" Empty class... | mganeva/mantid | scripts/Inelastic/Direct/dgreduce.py | Python | gpl-3.0 | 15,191 |
# -*- coding: utf-8 -*-
"""Groupings needed on an energy system for it to work with solph.
If you want to use solph on an energy system, you need to create it with these
groupings specified like this:
.. code-block: python
from oemof.network import EnergySystem
import solph
energy_system = EnergySy... | oemof/oemof_base | src/oemof/solph/groupings.py | Python | gpl-3.0 | 2,875 |
"""Hello World API implemented using Google Cloud Endpoints.
Contains declarations of endpoint, endpoint methods,
as well as the ProtoRPC message class and container required
for endpoint method definition.
"""
import endpoints
from protorpc import messages
from protorpc import message_types
from protorpc import remot... | paul-jean/ud858 | Lesson_2/000_Hello_Endpoints/helloworld_api.py | Python | gpl-3.0 | 1,742 |
# Natural Language Toolkit: Corpus Readers
#
# Copyright (C) 2001-2010 NLTK Project
# Author: Edward Loper <edloper@gradient.cis.upenn.edu>
# URL: <http://www.nltk.org/>
# For license information, see LICENSE.TXT
# [xx] this docstring isnt' up-to-date!
"""
NLTK corpus readers. The modules in this package provide func... | markgw/jazzparser | lib/nltk/corpus/__init__.py | Python | gpl-3.0 | 10,492 |
# coding: utf-8
"""
weasyprint.document
-------------------
:copyright: Copyright 2011-2014 Simon Sapin and contributors, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import division, unicode_literals
import io
import math
import shutil
import functools
... | johnlb/strange_wp | strange_bak/document.py | Python | gpl-3.0 | 28,054 |
from .owldatarangevisitor import OWLDataRangeVisitor, OWLDataRangeVisitorEx
from .owldatavisitor import OWLDataVisitor, OWLDataVisitorEx
from .owlnarydatarange import OWLNaryDataRange
from .owlobjectvisitor import OWLObjectVisitor, OWLObjectVisitorEx
from owlapy.util import accept_default, accept_default_ex
class OWL... | patrickwestphal/owlapy | owlapy/model/owldataintersectionof.py | Python | gpl-3.0 | 1,028 |
import platform
import sys
if platform.system() == 'Darwin':
native_version = (2, 7, 10, 'final', 0)
cur_version = sys.version_info
if cur_version == native_version:
from pyreclab.libpyreclab_native_py import MostPopular, UserAvg, ItemAvg, SlopeOne, UserKnn, ItemKnn, SVD, IFAls, IFAlsConjugateGradient... | gasevi/pyreclab | pypackage/__init__.py | Python | gpl-3.0 | 881 |
_author_ = 'Srikrishna'
import ConfigParser
import sys
import logging
logger = logging.getLogger(__name__)
sections = 'Connection','Configuration','Testing'
class MyConfiguration(object):
def __init__(self, *file_names):
parser = ConfigParser.ConfigParser()
parser.optionxform = str # make opti... | srikrishna3118/Lora_GW | PythonFiles/Config.py | Python | gpl-3.0 | 632 |
import os
import sys
from Bio import SeqIO
with open(sys.argv[1], "rU") as handle, open(sys.argv[2], "r") as segments, open(sys.argv[3],"w") as out_handle:
"""
This function takes fasta file as first argument.
As second argument it takes tab delimited file containing
queryid and start and end po... | NIASC/VirusMeta | seq_corret_module/seg_trim.py | Python | gpl-3.0 | 963 |
import pdmt.api
import pdmt.config
import pdmt.utils.subproc
'''
This module handles publishing and unpublishing a deb package from an apt repository
Mark Veltzer <mark@veltzer.net>
'''
class Operation(object):
def __init__(self):
super().__init__(
'debinstaller',
'install th... | veltzer/pdmt | pdmt/plugins/nodes/operations/debinstaller.py | Python | gpl-3.0 | 1,546 |
#
# Copyright 2015 Free Software Foundation, Inc.
#
# This file is part of PyBOMBS
#
# PyBOMBS 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.
#
# PyB... | namccart/pybombs | pybombs/utils/sysutils.py | Python | gpl-3.0 | 4,522 |
from .commandtype import CommandType
from .commandlineerror import CommandLineError
class CommandLine():
"""アセンブラコマンドラインオブジェクト
"""
def __init__(self, line_no: int, raw_data: str):
"""コンストラクタ
Parameters
----------
line_no : int
行番号
raw_data : str
... | koba-z33/nand2tetris | projects/python/assembler/n2tassembler/commandline.py | Python | gpl-3.0 | 3,587 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# kate: space-indent on; indent-width 4; mixedindent off; indent-mode python;
dovecot = [
{'name':'common',
'mainpackage':True,
'shortdesc':'Installs the latest version of the Dovecot mail server',
'description':'',
'packages':['dovecot-core', 'dovecot-an... | aroth-arsoft/arsoft-meta-packages | grp_dovecot.py | Python | gpl-3.0 | 1,242 |
#!/usr/bin/env python2
# vim:fileencoding=utf-8
# License: GPLv3 Copyright: 2015, Kovid Goyal <kovid at kovidgoyal.net>
from __future__ import (unicode_literals, division, absolute_import,
print_function)
from collections import defaultdict
from threading import Thread
from PyQt5.Qt import (
... | jelly/calibre | src/calibre/gui2/tweak_book/check_links.py | Python | gpl-3.0 | 6,253 |
#Copyright Anoop Kunchukuttan 2015 - present
#
#This file is part of the IITB Unsupervised Transliterator
#
#IITB Unsupervised Transliterator 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... | anoopkunchukuttan/transliterator | src/cfilt/transliteration/analysis/analysis_commands.py | Python | gpl-3.0 | 3,540 |