code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
import pytest import httpretty import logging class callcounted(object): """Decorator to determine number of calls for a method""" def __init__(self,method): self.method=method self.counter=0 def __call__(self,*args,**kwargs): self.counter+=1 return self.method(*args,**kwa...
icgc-dcc/egasub
tests/conftest.py
Python
gpl-3.0
9,299
############################################################################## # # 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/i18n/browser/translate.py
Python
gpl-3.0
4,221
# -*- coding: utf-8 -*- # Zeobuilder is an extensible GUI-toolkit for molecular model construction. # Copyright (C) 2007 - 2012 Toon Verstraelen <Toon.Verstraelen@UGent.be>, Center # for Molecular Modeling (CMM), Ghent University, Ghent, Belgium; all rights # reserved unless otherwise stated. # # This file is part of Z...
molmod/zeobuilder
zeobuilder/gui/fields/__init__.py
Python
gpl-3.0
1,515
from numpy.distutils.core import setup, Extension #from setuptools import setup, Extension setup( name = "Infer", version = "1.0", description='Python version of MCMC, plus other inference codes under development', author='Neale Gibson', author_email='ngibson@eso.org', packages=['Infer'], package_dir={'...
nealegibson/Infer
setup.py
Python
gpl-3.0
518
# -*- coding: utf-8 -*- from __future__ import absolute_import import re class RegexLib(object): """ A class containing all regular expressions used throughout the DataHound application. """ # Class Members # Potentially better email regex # "([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{...
lavalamp-/ws-backend-community
lib/wsregex.py
Python
gpl-3.0
3,414
# # Honeybee: A Plugin for Environmental Analysis (GPL) started by Mostapha Sadeghipour Roudsari # # This file is part of Honeybee. # # Copyright (c) 2013-2015, Mostapha Sadeghipour Roudsari <Sadeghipour@gmail.com> # Honeybee is free software; you can redistribute it and/or modify # it under the terms of the GNU Ge...
samuto/Honeybee
src/Honeybee_Set EnergyPlus Zone Schedules.py
Python
gpl-3.0
11,139
# 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...
Nitaco/ansible
lib/ansible/module_utils/network/ios/ios.py
Python
gpl-3.0
5,949
''' Created on 26/09/2014 @author: javgar119 ''' cluster_list =([Cluster(set([]), 0, 0, 1, 0), Cluster(set([]), 1, 0, 1, 0)]) cluster_list2 = ([Cluster(set([]), 0, 0, 1, 0), Cluster(set([]), 1, 0, 1, 0), Cluster(set([]), 2, 0, 1, 0...
JavierGarciaD/Algorithmic_Thinking
src/project_3_test_data.py
Python
gpl-3.0
2,503
from .util.deb import deb from .util.nrange import nrange from .cell import Cell #F,e,Cursor from .grid import spoint CURSOR_POS=None def gcp(): #get cursor position global CURSOR_POS deb('gcp',CURSOR_POS) return CURSOR_POS def scp(x,y): deb('scp',gcp(),x,y) cxc=0 #todo, normalize in cursor... global CURSOR_P...
e7dal/hexy
hexy/cursor.py
Python
gpl-3.0
1,100
# This Python file uses the following encoding: utf-8 """ Copyright 2013 Giacomo Antolini <giacomo.antolini@gmail.com>. This file is part of flocca_dot_com. flocca_dot_com is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ...
flocca/flocca_dot_com
fabfile.py
Python
gpl-3.0
4,507
""" Program do gry w Blackjack (a.k.a. Oczko) w języku Python przy użyciu biblioteki PyGame Projekt zaliczeniowy - Języki Skryptowe, Informatyka i Ekonometria, rok 1, WZ, AGH Autorzy: Joanna Jeziorek, Mateusz Koziestański, Katarzyna Maciocha III 2016 """ import random as rd import os import sys import pygame from pygam...
Kotzyk/Projekt-Blackjack
blackjack.py
Python
gpl-3.0
25,701
from chiplotle.geometry.core.path import Path from chiplotle.geometry.core.coordinate import Coordinate from chiplotle.core import errors from py.test import raises def test_path_add_01( ): '''A Path and an int cannot be added.''' assert raises(TypeError, 'Path([(1, 2), (3, 4)]) + 3') def test_path_add_02( )...
drepetto/chiplotle
chiplotle/geometry/core/test/test_path_add.py
Python
gpl-3.0
1,814
__author__ = 'hkar' import Vault.Crypto import Vault.Key from test_helpers import * import os def test_aes(tmpdir): # make tmp text files f = create_test_file(tmpdir) text = str(f.read()) # define file names file_in = str(f) file_out = file_in + ".enc" # generate random secret secr...
hkar/get-vault
tests/test_crypto.py
Python
gpl-3.0
1,236
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # 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...
shanew/electrum
gui/gtk.py
Python
gpl-3.0
49,880
from PIL import Image class Channel: def __init__(self, channelLabel, size): self.channelLabel = channelLabel self.channel = Image.new("CMYK", (size[0], size[1]), "black") self.pixelMap = self.channel.load() def save(self, filename): self.channel.save(filename)
ChristianAnthony46/PomegranateCMYK
Channel.py
Python
gpl-3.0
314
# -*- Mode: python; coding: utf-8; tab-width: 4; indent-tabs-mode: nil; -*- # # Copyright (C) 2012 - fossfreedom # Copyright (C) 2012 - Agustin Carrasco # # 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 Fou...
fossfreedom/coverart-browser
coverart_listview.py
Python
gpl-3.0
2,367
#!/usr/bin/env python # Copyright 2012-2014 Keith Fancher # # 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 p...
keithfancher/Todo-Indicator
todotxt/test_list.py
Python
gpl-3.0
11,017
def sort_by_length(arr): return sorted(arr, key=len)
VladKha/CodeWars
7 kyu/Sort array by string length/solve.py
Python
gpl-3.0
57
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-08-11 11:15 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('article', '0006_article_owner'), ] operations = [ migrations.RenameField( ...
zhangvs1988/zhangyl-Djangodemo
article/migrations/0007_auto_20160811_1915.py
Python
gpl-3.0
419
#!/usr/bin/python import time from tentacle_pi.AM2315 import AM2315 am = AM2315(0x5c, "/dev/i2c-1") for x in range(10): temperature, humidity, crc_check = am.sense() print "Temperature: %s" % temperature print "Humidity: %s" % humidity print "CRC: %s" % crc_check time.sleep(2)
Cabalist/Mycodo
3.5/cgi-bin/Test-Sensor-HT-AM2315.py
Python
gpl-3.0
302
# 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/modules/events/layout/controllers/layout.py
Python
gpl-3.0
7,996
# PyParticles : Particles simulation in python # Copyright (C) 2012 Simone Riva # # 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 late...
simon-r/PyParticles
pyparticles/pset/rebound_boundary.py
Python
gpl-3.0
2,289
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import frappe, os, json from frappe.utils import cstr from unidecode import unidecode from six import iteritems def create_charts(company, chart_template=None, existing_company=None): chart...
manassolanki/erpnext
erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py
Python
gpl-3.0
6,558
import datetime from collections import namedtuple import os import tempfile import time import uuid import random import stat from textwrap import dedent import pytest from GangaCore.Utility.logging import getLogger from GangaDirac.Lib.Utilities.DiracUtilities import execute from GangaCore.testlib.mark import ex...
ganga-devs/ganga
ganga/GangaLHCb/test/Unit/DiracAPI/TestDiracCommands.py
Python
gpl-3.0
16,423
from __future__ import absolute_import import datetime from django.db import models from django.db.models import get_model from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User from django.conf import settings from django.u...
tymofij/adofex
transifex/actionlog/models.py
Python
gpl-3.0
10,045
#!/usr/bin/python #coding: UTF-8 #COPIRIGHT: Patrick Roncagliolo #LICENCE: GNU GPL 3 import cgi, json argsDict = cgi.FieldStorage() EMPTY_DICT = {} def getState (init = False): dataDict = getDataDict () if dataDict is None \ and init is True: (key, uri) = generateTOTP () generateQR (k...
roncapat/RWOL
rwol-web-src/utilities.py
Python
gpl-3.0
3,772
from common import common_global from common import common_pagination_bootstrap from sanic import Blueprint blueprint_user_metadata_game_system = Blueprint('name_blueprint_user_metadata_game_system', url_prefix='/user') @blueprint_user_metadata_game_system.route('/user...
MediaKraken/MediaKraken_Deployment
source/web_app_sanic/blueprint/user/bp_user_metadata_game_system.py
Python
gpl-3.0
3,005
# -*- coding: utf-8 -*- # # eofs documentation build configuration file, created by # sphinx-quickstart on Thu Jul 5 15:47:55 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All co...
ajdawson/eofs
doc/conf.py
Python
gpl-3.0
9,234
from vsg.token import primary_unit_declaration as token from vsg.vhdlFile import utils def detect(iToken, lObjects): ''' primary_unit_declaration ::= identifier; ''' return classify(iToken, lObjects) def classify(iToken, lObjects): iCurrent = iToken while not utils.is_next_token(';', iCur...
jeremiah-c-leary/vhdl-style-guide
vsg/vhdlFile/classify/primary_unit_declaration.py
Python
gpl-3.0
510
#!/usr/bin/env python # -*- encoding: utf-8 -*- import urlparse def uc2utf8(input): ## argh! this feels wrong, but seems to be needed. if type(input) == unicode: return input.encode('utf-8') else: return input class URL: """ This class is for wrapping URLs into objects. It's use...
wasw100/pycaldav
pycaldav/lib/url.py
Python
gpl-3.0
5,906
"""Test class for Subscriptions :Requirement: Subscription :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: CLI :TestType: Functional :CaseImportance: High :Upstream: No """ import tempfile import csv import os from robottelo import manifests from robottelo.cli.activationkey import ActivationKe...
sghai/robottelo
tests/foreman/cli/test_subscription.py
Python
gpl-3.0
28,458
import logging from time import strftime def closed(): logging.info('Headlights process stopped') def criterr(errortext): logging.critical('A fatal error occured :: ' + errortext) exit() def err(errortext): logging.error('An error occured :: ' + errortext) def warn(errortext): logging.warning(er...
mashedkeyboard/Headlights
handlers.py
Python
gpl-3.0
429
#!/usr/bin/python3 # This file is part of Epoptes, http://epoptes.org # Copyright 2012-2018 the Epoptes team, see AUTHORS. # SPDX-License-Identifier: GPL-3.0-or-later """ Display a simple window with a message. """ import os import sys from _common import gettext as _ from gi.repository import Gtk class MessageWindo...
Epoptes/epoptes
epoptes-client/message.py
Python
gpl-3.0
2,401
############################################################################## # # Copyright (c) 2004 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. # THIS SO...
Donkyhotay/MoonPy
zope/security/tests/test_adapter.py
Python
gpl-3.0
948
########## recombination.py parameters class Recombination_Parameters(object): # Change these two values to the folders you prefer - use an absolute path e.g. /Users/Harry/fastq-data and # /Users/Harry/csv-data or a path relative to the tools directory. # You may use the same folder for input and output. ...
addgene/research
toolkit/parameters.py
Python
gpl-3.0
2,405
# # Copyright (C) 2013,2014,2015,2016 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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)...
tbereau/espresso
testsuite/python/magnetostaticInteractions.py
Python
gpl-3.0
2,692
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, copy import os import json from frappe.utils import cstr, flt, getdate from frappe import _ from frappe.utils.file_manager import save_f...
bpshetty/erpnext
erpnext/setup/setup_wizard/setup_wizard.py
Python
gpl-3.0
18,648
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Dane Summers <dsummers@pinedesk.biz> # Copyright: (c) 2013, Mike Grozak <mike.grozak@gmail.com> # Copyright: (c) 2013, Patrick Callahan <pmc@patrickcallahan.com> # Copyright: (c) 2015, Evan Kaufman <evan@digitalflophouse.com> # Copyright: (c) 2015, Luca...
Jorge-Rodriguez/ansible
lib/ansible/modules/system/cron.py
Python
gpl-3.0
24,897
#!/usr/bin/env python # # Unit Tests for temp module # # See __usage__ for an explanation of runtime arguments. # # -Christopher Blunck # import unittest from ..temp import * __author__ = 'Christopher Blunck' __email__ = 'chris@wxnet.org' __revision__ = '$Revision: 1.6 $' __doc__ = ''' Unit tests the temp module...
cmcginty/PyWeather
weather/units/tests/test_temp.py
Python
gpl-3.0
8,293
from enum import Enum from Adafruit_MotorHAT import Adafruit_MotorHAT, Adafruit_DCMotor import time import atexit Direction = Enum('Forward','Reverse','Spin','Left','Right','None') class Wheels: def __init__(self): self.lc = 100 #Loop count self.ld = .02 #Loop delay self.mh = Adafruit_Mot...
twallace27603/robot_army
wheels.py
Python
gpl-3.0
3,797
""" project and subproject adding # @@ needs tests """ from Acquisition import aq_inner from Products.CMFCore.utils import getToolByName from Products.Five.browser.pagetemplatefile import ZopeTwoPageTemplateFile from opencore.browser.formhandler import OctopoLite, action from opencore.i18n import _ from opencore.inter...
socialplanning/opencore
opencore/project/browser/add.py
Python
gpl-3.0
7,853
#!/usr/bin/env python # coding: utf-8 import os import sys from distutils.core import setup from distutils.command.install import install VERSION_NUMBER = "1.6.3" class CustomInstall(install): def run(self): install.run(self) for script in self.distribution.scripts: script_path = os...
j0hn/guicavane
setup.py
Python
gpl-3.0
5,235
import Adafruit_BBIO.PWM as PWM class Servo: def __init__(self, pin): self.servo_pin = pin self.duty_min = 3 self.duty_max = 14.5 self.duty_span = self.duty_max - self.duty_min def StartServo(self): print("Starting servo") print(self.servo_pin) PWM.start(self.servo_pin, (100 - self.duty_min), 60.0...
sahdman/Plane
Servo.py
Python
gpl-3.0
804
# -*- encoding: utf-8 -*- """A utility that tries saved genetic tests and removes those failing""" import asyncio import yaml from pathlib import Path from logzero import logger from rizza import entity_tester from rizza import genetic_tester def genetic_prune(conf, entity='All'): """Check all saved genetic_teste...
JacobCallahan/rizza
rizza/helpers/prune.py
Python
gpl-3.0
2,971
DD_SAVE_DIR = 'home/pi/' DD_TIME_FORMAT = '%H:%S-%d-%m-%Y' MOUNT_DIR = '/mnt' FC_SAVE_DIR = '/home/pi/' FC_TIME_FORMAT = '%S:%H-%d-%m-%Y' POP_INDEX = 1 DEBUG = 0 PLANT_LOAD_DIR = '/home/pi/pruebas/' PLANT_SAVE_DIR = '/'
Daklon/autocopy
settings.py
Python
gpl-3.0
220
from setuptools import setup setup( name='geovalidation.server', version='0.5', long_description="Flask-based server to validate GIS datasets (with prepair and val3dity).", packages=['geovalidation'], include_package_data=True, zip_safe=False, install_requires=[ 'Flask>=1.1' ,'Jinja2>...
tudelft3d/geovalidation.server
setup.py
Python
gpl-3.0
590
#!/usr/bin/python import os import sys import urllib from gi.repository import Clutter, ClutterX11, Mx, Lomo, GObject, GLib class Cover(Clutter.Box): __gtype_name__ = 'GlosseCover' # # Member, setter and getter for the 'lomo' property # def _get_lomo_player_prop(self): return self._lomo_player_prop def _set...
ldotlopez/eina
toys/clutter-ui.py
Python
gpl-3.0
9,266
#!/usr/bin/env python """ DragonPy - base memory info ~~~~~~~~~~~~~~~~~~~~~~~~~~~ :created: 2013 by Jens Diemer - www.jensdiemer.de :copyleft: 2013 by the MC6809 team, see AUTHORS for more details. :license: GNU GPL v3 or above, see LICENSE for more details. """ import sys class BaseMemoryInfo...
6809/MC6809
MC6809/core/memory_info.py
Python
gpl-3.0
1,835
# -*- encoding: utf-8 -*- # vim: ts=4 sw=4 expandtab ai """Test class for Medium CLI""" from ddt import ddt from fauxfactory import gen_string, gen_alphanumeric from robottelo.cli.factory import CLIFactoryError from robottelo.test import CLITestCase from robottelo.common.decorators import data, run_only_on from robot...
oshtaier/robottelo
tests/foreman/cli/test_medium.py
Python
gpl-3.0
6,174
import os import json import re from BeautifulSoup import BeautifulSoup from psrd.rules import write_rules from psrd.files import char_replace from psrd.universal import parse_universal, print_struct from psrd.sections import ability_pass, is_anonymous_section, has_subsections, entity_pass, quote_pass def core_structu...
devonjones/PSRD-Parser
src/psrd/spell_lists.py
Python
gpl-3.0
5,140
# Plotting performance of string_subst_.py scripts # bar chart of relative comparison with variances as error bars import numpy as np import matplotlib.pyplot as plt performance = [10.3882388499416,1,10.3212281215746] variance = [0.790435196936213,0,0.827207394592818] scripts = ['string_subst_1.py', 'string_subst_2.p...
pswaminathan/python_efficiency_tweaks
plots/plot_string_subst_bar.py
Python
gpl-3.0
686
############################################################################## # # Copyright (c) 2006 Zope Foundation 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. # THIS SOF...
kamal-gade/rockstor-core
bootstrap.py
Python
gpl-3.0
10,120
from __future__ import absolute_import from django.utils.translation import ugettext_lazy as _ from documents.permissions import PERMISSION_DOCUMENT_TYPE_EDIT from .permissions import (PERMISSION_METADATA_DOCUMENT_EDIT, PERMISSION_METADATA_DOCUMENT_ADD, PERMISSION_METADATA_DOCUMENT_REMOVE, PERMISSION_METADAT...
rosarior/mayan
apps/metadata/links.py
Python
gpl-3.0
3,605
r""" ================================================== Feature computation for univariate time series ================================================== This sub-module provides routines for computing features on univariate time series. Many functions are improved version of PyEEG [PYEEG]_ functions. Be careful, som...
gilestrolab/pyrem
src/pyrem/univariate.py
Python
gpl-3.0
18,418
# -*- coding: utf-8 -*- """ pytest fixtures """ import pytest from django.contrib.auth.models import User from orb.models import Category, Tag, UserProfile from orb.peers.models import Peer from orb.resources.tests.factory import resource_factory pytestmark = pytest.mark.django_db @pytest.fixture def testing_user...
mPowering/django-orb
orb/fixtures/__init__.py
Python
gpl-3.0
2,306
# Name: Examples for using conditioning number finders for curves and surfaces # Description: Contains some examples with descriptions of how to use the functions # Created: 2016-08-18 # Author: Janis Lazovskis # Navigate to the conditioning directory # Run Python 2 # Example (curve) execfile('curves.py') x = variety...
jlazovskis/conditioning
examples/examples-curves-surfaces.py
Python
gpl-3.0
1,355
# -*- encoding: utf-8 -*- """ leap/email/imap/tests/__init__.py ---------------------------------- Module intialization file for leap.mx.tests, a module containing unittesting code, using twisted.trial, for testing leap_mx. @authors: Kali Kaneko, <kali@leap.se> @license: GPLv3, see included LICENSE file @copyright: © ...
andrejb/leap_mail
src/leap/mail/imap/tests/__init__.py
Python
gpl-3.0
13,000
class Solution(object): def distributeCandies(self, candies): """ :type candies: List[int] :rtype: int """ result = 0 kind = list(set(candies)) if len(kind) > len(candies)/2: result = len(candies)/2 else: result = len(kind) ...
sadad111/leetcodebox
Distribute Candies.py
Python
gpl-3.0
338
"""Utility modules used throughout the rest of the codebase. Note that these modules should in general not depend (at compile time) on any other modules, to avoid cyclic dependencies. They could be imported (at the top level) into any other module so should not have any top-level imports from other modules. """
markgw/jazzparser
src/jazzparser/utils/__init__.py
Python
gpl-3.0
318
############################################################################ # # Copyright (C) 2016 The Qt Company Ltd. # Contact: https://www.qt.io/licensing/ # # This file is part of Qt Creator. # # Commercial License Usage # Licensees holding valid commercial Qt licenses may use this file in # accordance with the co...
pivonroll/Qt_Creator
tests/system/shared/classes.py
Python
gpl-3.0
7,863
class Information: def __init__(self, objectid, cvid, information_type_id, description): self.objectid = objectid self.cvid = cvid self.information_type_id = information_type_id self.description = description self.deleted = 0
itucsdb1611/itucsdb1611
classes/information.py
Python
gpl-3.0
270
#! /usr/bin/env python import argparse import sys from soma import aims import highres_cortex.cortex_topo def fix_cortex_topology_files(input_filename, output_filename, filling_size, fclosing): """Call highres_cortex.cortex_topo.fix_cortex_topology on files.""" input_volume = ...
domanova/highres-cortex
python/highres_cortex/scripts/fix_cortex_topology.py
Python
gpl-3.0
2,374
# mhkutil - A utility for dealing with Mohawk archives # # mhkutil is the legal property of its developers, whose names # can be found in the AUTHORS file distributed with this source # distribution. # # mhkutil is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public Licen...
clone2727/mhkutil
stream.py
Python
gpl-3.0
3,692
#!/usr/bin/env python """ ================================================= Draw a Quantile-Quantile Plot and Confidence Band ================================================= This is an example of drawing a quantile-quantile plot with a confidence level (CL) band. """ print __doc__ import ROOT from rootpy.interactive...
qbuat/rootpy
examples/stats/plot_quantiles.py
Python
gpl-3.0
1,944
############################################################################ # This file is part of LImA, a Library for Image Acquisition # # Copyright (C) : 2009-2011 # European Synchrotron Radiation Facility # BP 220, Grenoble 38043 # FRANCE # # This is free software; you can redistribute it and/or modify # it under ...
gjover/Lima_subtree
python/__init__.py
Python
gpl-3.0
2,173
#!/usr/bin/env python # coding=utf-8 """54. Poker hands https://projecteuler.net/problem=54 In the card game poker, a hand consists of five cards and are ranked, from lowest to highest, in the following way: * **High Card** : Highest value card. * **One Pair** : Two cards of the same value. * **Two Pairs** : T...
openqt/algorithms
projecteuler/pe054-poker-hands.py
Python
gpl-3.0
2,408
# /* UVa problem: 10407 # * Simple Division # * Topic: Number Theory # * # * Level: challenging # * # * Brief problem description: # * Given a list of numbers, a1, a2, a3.... an compute a number m such that # * ai mod m = x for some arbitrary x for all ai. # * In other words, find a congruence class mod...
tristan-hunt/UVaProblems
AcceptedUVa/uva_challenging/uva_10407.py
Python
gpl-3.0
1,675
#!/usr/bin/env python3 # Copyright 2013 Iain Peddie inr314159@hotmail.com # # This file is part of WellBehavedPython # # WellBehavedPython 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 v...
iain-peddie/well-behaved-python
tests/WellBehavedPythonTests/Discovery/ModuleExaminerTests.py
Python
gpl-3.0
3,114
# -*- coding: Latin-1 -*- """ @file VelocityOverTime.py @author Sascha Krieg @author Daniel Krajzewicz @author Michael Behrisch @date 2008-05-29 Shows the velocityCurve of the chosen taxi for all available sources, thereby the time duration per Edge is apparent. SUMO, Simulation of Urban MObility; see http:/...
rudhir-upretee/Sumo17_With_Netsim
tools/projects/TaxiFCD_Krieg/src/analysis/VelocityOverTime.py
Python
gpl-3.0
5,635
import abc from typing import Optional, Callable from math import fabs import itertools from copy import copy import numbers from array import array from .space2d import Point2D, Segment2D from ...orientations.orientations import * from ...mathematics.statistics import * from ...mathematics.quaternions import * ...
mauroalberti/gsf
pygsf/geometries/shapes/space3d.py
Python
gpl-3.0
95,789
#! /usr/bin/ python # -*- coding: utf-8 -*- # Copyright (C) 2013 Deepin, Inc. # 2013 Hailong Qiu # # Author: Hailong Qiu <356752238@qq.com> # Maintainer: Hailong Qiu <356752238@qq.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Pub...
hailongqiu/new-deepin-media-player
src/widget/notebook.py
Python
gpl-3.0
8,517
# # This file is part of the LibreOffice project. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # This file incorporates work covered by the following license noti...
beppec56/core
wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
Python
gpl-3.0
14,293
# Copyright 2007-2012 University Of Southern California # # 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 ...
elainenaomi/sciwonc-dataflow-examples
sbbd2016/experiments/1-postgres/3_workflow_full_10files_primary_nosh_nors_annot_with_proj_3s/pegasus.bDkvI/pegasus-4.6.0/lib/python2.7/dist-packages/Pegasus/service/dashboard/dashboard.py
Python
gpl-3.0
20,107
# -*- coding: utf-8 -*- #------------------------------------------------------------ #------------------------------------------------------------ import selenium from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities import time import urlparse,urllib2,urllib,re,...
Reat0ide/plugin.video.pelisalacarta
pelisalacarta/channels/itastreaming.py
Python
gpl-3.0
11,292
#!/usr/bin/env python # -*- mode: python; coding: utf-8; -*- # (c) Con Radchenko mailto:lankier@gmail.com # # $Id: fb2desc.py,v 1.10 2008/09/15 04:18:45 con Exp con $ # import sys, os import locale import getopt import codecs import zipfile from cStringIO import StringIO import xml.sax import shutil import traceback ...
vasnake/fb2tools
fb2tools/fb2desc.py
Python
gpl-3.0
24,174
''' Created on 01.12.2016 @author: michael ''' from alex_test_utils import MODE_SIMPLE from alexandriabase import baseinjectorkeys from alexandriabase.domain import Event, AlexDateRange, AlexDate, Document, \ DocumentType from alexpresenters.MessageBroker import REQ_SAVE_CURRENT_EVENT, \ REQ_SAVE_CURRENT_DOCUM...
archivsozialebewegungen/AlexandriaGui
tests/integration/components/references/basereferenceintegrationtest.py
Python
gpl-3.0
1,748
from django import template import sys register = template.Library() @register.filter def get(dictionary, key): return dictionary.get(key) @register.filter def pertinent_values(dictionary, key): limit = '10' if ',' in key: key, limit = key.split(',') keys = dictionary.keys() total = red...
Puyb/sixhdp
inscriptions/templatetags/stats.py
Python
gpl-3.0
1,467
class LazyProxy(object): def __init__(self, original_module, original_class, init_args): self._original_module = original_module self._original_class = original_class self._original_init_args = init_args self._instance = None def __getattr__(self, name): if self._instanc...
wackerl91/luna
resources/lib/di/lazyproxy.py
Python
gpl-3.0
1,231
# JointBox - Your DIY smart home. Simplified. # Copyright (C) 2017 Dmitry Berezovsky # # JointBox 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...
JointBox/jointbox
src/common/validators.py
Python
gpl-3.0
913
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Patrik Lundin <patrik@sigterm.se> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
DazWorrall/ansible
lib/ansible/modules/packaging/os/openbsd_pkg.py
Python
gpl-3.0
26,447
from scrapelib import HTTPError from openstates.utils import LXMLMixin from pupa.scrape import Person, Scraper class UTPersonScraper(Scraper, LXMLMixin): def scrape(self): PARTIES = {"R": "Republican", "D": "Democratic"} representative_url = "http://house.utah.gov/rep/{}" senator_url = "ht...
openstates/openstates
openstates/ut/people.py
Python
gpl-3.0
3,136
from django.conf.urls import url from . import views urlpatterns = [ # Captures special abbreviations and redirects to UOS websites url(r"^(?P<site>bb|udc|ms|uos)/?$", views.redirect_to_uos), # All website related requests link to views.layout # as the layout loads other dependencies as per request ...
UOSHUB/BackEnd
Website/urls.py
Python
gpl-3.0
347
from NfaBuilder import NfaBuilder def enum(**enums): return type('Enum', (), enums) nodeTypes = enum(CHARACTER = 1, STAR = 2, QUESTION = 3, ALTER = 4, CONCAT = 5, PLUS = 6) specialTransitions = enum(EPSILON = -1) class ParseError( Exception ): pass class ParseNode(): """ Represents a node in the result...
induktio/LamaTrainer
falib/RegexParser.py
Python
gpl-3.0
6,711
#!/usr/bin/python2.7 # cuon_server install import os, sys, platform import subprocess, shlex, shutil import commands import locale import pwd, grp from gi.repository import Gtk import ConfigParser class cssi(): def __init__(self, user=None): self.user = user self.win = None ...
CuonDeveloper/cuon
Distributionen/CuonServer/cuon-simple-server-install.py
Python
gpl-3.0
21,083
# -*- coding: utf-8 -*- """ # Plugins Plugins allow flexible modification and execution of OpenNFT without touching the core codebase. Plugins can access data, process them in a specific way, and they can be switched on and off according to the user's need. Each plugin has to be a subclass of *Process class specified...
OpenNFT/OpenNFT
opennft/plugins/onp_roiswglm.py
Python
gpl-3.0
3,813
#!/usr/bin/env python # # Copyright 2014 Philipp Winter <phw@nymity.ch> # # This file is part of atlas tools. # # atlas tools 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...
NullHypothesis/atlas_tools
rest_api/query_issuer.py
Python
gpl-3.0
1,569
# -*- coding: utf-8; -*- # Copyright (C) 2015 - 2019 Lionel Ott # # 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. # # T...
WhiteMagic/JoystickGremlin
container_plugins/double_tap/__init__.py
Python
gpl-3.0
13,349
# -*- mode: python; tab-width: 4; indent-tabs-mode: nil -*- from gi.repository import Gtk import os import shutil import gettext from cloudsn.core import config, provider, account, indicator, keyring from cloudsn import logger import cloudsn.core.utils as coreutils STOP_RESPONSE = 1 class MainWindow: __default =...
chuchiperriman/cloud-services-notifications
src/cloudsn/ui/window.py
Python
gpl-3.0
17,147
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This progam (as part of SHEAR) searches adapter sequences and generates an adapter file for use with SHEAR/Scythe. """ import sys import os import argparse import re import gzip _LICENSE = """ SHEAR: Simple Handler for Error and Adapter Removal James B. Pease http://...
jbpease/shear
adapt.py
Python
gpl-3.0
13,208
""" Set-up script to install PyFAST locally """ from setuptools import setup setup(name='pyfast', version='0.1', description='Tools for working with wind turbine simulator FAST', url='https://github.com/jennirinker/PyFAST.git', author='Jenni Rinker', author_email='jennifer.m.rinker@gmail....
jennirinker/PyFAST
setup.py
Python
gpl-3.0
395
""" 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, but WITHOU...
numericalalgorithmsgroup/pybobyqa
pybobyqa/tests/test_hessian.py
Python
gpl-3.0
7,948
# coding=utf-8 import unittest """993. Cousins in Binary Tree https://leetcode.com/problems/cousins-in-binary-tree/description/ In a binary tree, the root node is at depth `0`, and children of each depth `k` node are at depth `k+1`. Two nodes of a binary tree are _cousins_ if they have the same depth, but have **dif...
openqt/algorithms
leetcode/python/lc993-cousins-in-binary-tree.py
Python
gpl-3.0
1,692
from setuptools import setup with open("README.rst") as readme_file: long_description = readme_file.read() setup(name="Presser", version="0.1.8", packages=["presser",], license="GNU GPL v3.0", description="Extracts data from vine, in lieu of an API", author="Gemma Hentsch", author_email="...
ladyrassilon/presser
setup.py
Python
gpl-3.0
1,357
# -*- coding: utf-8 -*- """ 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...
estaban/pyload
module/plugins/hooks/XMPPInterface.py
Python
gpl-3.0
8,389
# from .. import Workflow, Stage, Task, TaskFile # # from flask.ext import admin # from flask.ext.admin.contrib import sqla # # # def add_cosmos_admin(flask_app, session): # adm = admin.Admin(flask_app, 'Flask Admin', base_template="admin_layout.html") # for m in [Workflow, Stage, Task, TaskFile]: # adm...
vamst/COSMOS2
cosmos/web/admin.py
Python
gpl-3.0
358
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Rodrigo Silva (MestreLion) <linux@rodrigosilva.com> # # 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, ...
MestreLion/pyrogue
pyrogue/player.py
Python
gpl-3.0
6,092
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2020 Citrix Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation the # ...
citrix/netscaler-ansible-modules
ansible-collections/adc/plugins/modules/citrix_adc_appfw_settings.py
Python
gpl-3.0
12,977
""" OwO whats this? """ __author__ = ('Smurphicus') COMMAND = 'owo' from random import choice substitutions = {'r':'w','R':'W','l':'w','L':'W','na':'nya','NA':'NYA','qu':'qw','QU':'QW'} faces = [' OwO', ' owo', ' UwU', ' uwu', ' :3', ' :33', ' :333', ''] def owoify(message): for key in substitutions.keys(): ...
sentriz/steely
steely/plugins/owo.py
Python
gpl-3.0
679
# Copyright (c) 2014-2015 Cedric Bellegarde <cedric.bellegarde@adishatz.org> # 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 vers...
gigitux/lollypop
src/widgets_radio.py
Python
gpl-3.0
4,766
#!/usr/bin/env python3 import gettext import locale from obozrenie.global_settings import * current_locale, encoding = locale.getdefaultlocale() t = gettext.translation(APPLICATION_ID, localedir=LOCALE_DIR, languages=[ current_locale], codeset=encoding, fallback=True) _ = t.gettext
obozrenie/obozrenie
obozrenie/i18n.py
Python
gpl-3.0
311