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
# -*- coding: utf-8 -*- """ :copyright: Copyright 2013-2014 by Łukasz Mierzwa :contact: l.mierzwa@gmail.com """ class InvalidConfiguration(Exception): """ Raised if upaas-builder configuration is invalid. """ pass class BuildError(Exception): """ General class for catching any build ...
prymitive/upaas-common
upaas/builder/exceptions.py
Python
gpl-3.0
890
# """test_debug - Test debug support""" # Copyright © 2014-2020 James Rowe <jnrowe@gmail.com> # # SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of jnrbase. # # jnrbase is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Fr...
JNRowe/jnrbase
tests/test_debug.py
Python
gpl-3.0
2,975
# Copyright (C) 2011 Statoil ASA, Norway. # # The file 'stat.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT 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 ...
iLoop2/ResInsight
ThirdParty/Ert/devel/python/python/ert/util/stat.py
Python
gpl-3.0
1,169
# coding: utf-8 # Copyright (C) 2017 Open Path View, Maison Du Libre # 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. # ...
OpenPathView/batchPanoMaker
opv_import/helpers/bit_utils.py
Python
gpl-3.0
1,156
import unittest import MachineSettingsFromXMLBuilder as MSFXMLB import MachineSettings as MS class TestMachineSettingsFromXMLBuilder(unittest.TestCase): """ Tests for the class MachineSettingsFromXMLBuilder .. moduleauthor:: Albert Heinle <albert.heinle@uwaterloo.ca> """ def setUp(self): ...
symbolicdata/code
src/sdeval/classes/MachineSettingsFromXMLBuilder_test.py
Python
gpl-3.0
3,258
"""Package Index Tests """ # More would be better! import sys import os, shutil, tempfile, unittest, urllib2 import pkg_resources import setuptools.package_index from server import IndexServer class TestPackageIndex(unittest.TestCase): def test_bad_urls(self): index = setuptools.package_index.PackageIndex...
jokajak/itweb
data/env/lib/python2.6/site-packages/distribute-0.6.14-py2.6.egg/setuptools/tests/test_packageindex.py
Python
gpl-3.0
3,722
#!/usr/bin/python # -*- coding: utf-8 -*- # 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', 'status': ['preview'], ...
photoninger/ansible
lib/ansible/modules/network/aci/aci_contract_subject_to_filter.py
Python
gpl-3.0
5,651
"""semiotweet URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class...
jjerphan/semiotweet
semiotweet/urls.py
Python
gpl-3.0
857
""" Object module for pypass This module contains the objects from and to which the json is generated/read. """ #-*- coding: utf-8 -*- # Copyright (c) 2011 Pierre-Yves Chibon <pingou AT pingoured DOT fr> # Copyright (c) 2011 Johan Cwiklinski <johan AT x-tnd DOT be> # # This file is part of pypass. # # pypass is free s...
pypingou/pypass
pypass/pypobj.py
Python
gpl-3.0
4,872
''' Created on Sep 10, 2017 @author: mmullero ''' from stjoernscrapper.core import Core, autolog, errorlog from stjoernscrapper.webcrawler import WebCrawler import re from selenium.common.exceptions import NoSuchElementException from pymongo.errors import DuplicateKeyError from time import sleep from asyncio.log impor...
stjoern/stjoernscrapper
stjoernscrapper/rohlik.py
Python
gpl-3.0
8,598
### # Copyright (c) 2005, Ali Afshar # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditions, a...
kg-bot/SupyBot
plugins/Dcc/plugin.py
Python
gpl-3.0
7,407
#!/usr/bin/python3 import sys import os # this script allows the loading of palettes from files # when invoked you must specify a palette # google-blue.hex # google-light-blue.hex # old-blue.rgb # # each palette must contain 10 colours for the graduations between 0 and 100 % # and an 11th colour for ...
mkfifo/open-source-stats
scripts/gen_colour_palette.py
Python
gpl-3.0
6,213
#!/usr/bin/env python # -*- coding: utf-8 -*- #Copyright (c) 2013 Miguel Moreto <http://sites.google.com/site/miguelmoreto/> #This file is part of pyComtrade. # # pyComtrade is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Fre...
ldemattos/openComtradeViewer
src/pyComtrade.py
Python
gpl-3.0
15,076
#!/usr/bin/python # -*- coding: utf-8 -*- from PySide2.QtCore import * from PySide2.QtGui import * from PySide2.QtWidgets import * class FDragRowsTableWidget(QTableWidget): def __init__(self, rows=0, cloumns=2, parent=None): super(FDragRowsTableWidget, self).__init__(rows, cloumns, parent) self....
dragondjf/PFramer
qframer/ftablewidget.py
Python
gpl-3.0
7,960
#!/usr/bin/env python3 """Play the immortal game using push_san() from chess.Board().""" import chess import timeit def play_immortal_game() -> None: board = chess.Board() # 1. e4 e5 board.push_san("e4") board.push_san("e5") # 2. f4 exf4 board.push_san("f4") board.push_san("exf4") ...
niklasf/python-chess
examples/push_san.py
Python
gpl-3.0
1,996
from functools import wraps from flask import Flask, request, jsonify, g import base64 import libs.db_connector as dbconn import libs.db_query as dao import libs.json_keys as jkey import libs.json_builder as jparse import config.api_config as apiconf # region constants DEBUG = True LOCAL_NETWORK = "0.0.0.0" V = apicon...
Python3Development/KodiAPI
api.py
Python
gpl-3.0
3,710
from datetime import datetime path= str(datetime.now().date()) per= datetime.now() per_h= str(per.hour) per_m= str(per.minute) timeit= str("%s:%s"%(per_h,per_m)) def Final(file_name): NPfile= str("%s-%s"%(file_name,timeit)) A_Dump= "airodump-ng wlan0 -w " ADFN= A_Dump+NPfile return ADFN
TheTrueH4cks0r/YeagerBomb
FiLe_AD.py
Python
gpl-3.0
315
"""Helper functions """ import numpy as np import datetime as dt def bstr2seconds(data): """ Converts a byte string to a timedelta object Parameters ---------- data : bytestring Contains a bytestring representing a timedelta Returns ------- dt.timedelta timedelta object ...
mattihappy/mtibattery
mtibattery/helper.py
Python
gpl-3.0
1,265
import os.path import pygame from pygame.locals import * from tecles import * pygame.init() class Joc (object): WIDTH = 600 HEIGHT = 400 screen = pygame.display.set_mode((WIDTH, HEIGHT), 0, 32) background = pygame.image.load(os.path.join("Imatges","fons.jpg")) clock = pygame.time.Clock() dt = 0.05 pun...
heepaz/rePong
joc.py
Python
gpl-3.0
1,394
from setuptools import setup setup(name='ldsc', version='1.0', description='LD Score Regression (LDSC)', url='http://github.com/bulik/ldsc', author='Brendan Bulik-Sullivan and Hilary Finucane', author_email='', license='GPLv3', packages=['ldscore'], scripts=['ldsc.py', '...
bulik/ldsc
setup.py
Python
gpl-3.0
577
#!/usr/bin/env python3 import os from config import Dirs, Disks, Files, XAS99_CONFIG from utils import (xas, xdm, sinc, error, clear_env, delfile, check_obj_code_eq, check_image_set_eq, check_image_files_eq, read_stderr, get_source_markers, check_errors) # Main test def runtest(): """check c...
endlos99/xdt99
test/as-checkobj.py
Python
gpl-3.0
4,385
# coding: utf-8 import datetime from sqlalchemy.engine import create_engine from sqlalchemy.ext.declarative.api import declarative_base from sqlalchemy.orm.scoping import scoped_session from sqlalchemy.orm.session import sessionmaker import imp from migrate.versioning import api engine = create_engine('sqlite:///py...
PyIran/website
project/database.py
Python
gpl-3.0
2,785
# LIPGLOSS - Graphical user interface for constructing glaze recipes # Copyright (C) 2017 Pieter Mostert # 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, version 3 of the License. # This progra...
PieterMostert/Lipgloss
model/lipgloss/restrictions.py
Python
gpl-3.0
13,939
# -*- coding: utf-8 -*- from __future__ import print_function from nltk import download TOKENIZER_MODEL = "punkt" POS_TAGGER = "maxent_treebank_pos_tagger" def downloadDependencies(): download(TOKENIZER_MODEL) download(POS_TAGGER) if __name__ == '__main__': downloadDependencies()
kbuschme/irony-detection
setup.py
Python
gpl-3.0
301
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Janice Cheng # ex17_inFile.txt # ex17_outFile.txt from sys import argv from os.path import exists script,from_file,to_file = argv print("Copying from {} to {}".format(from_file,to_file)) # we could do these two on one line too, how? in_file = open(from_file) ...
jcchoiling/learningPython
books/learn-python-the-hard-way/ex17_More_Files.py
Python
gpl-3.0
645
'''Module containing a DensityFunc abstract class, with common probability densities @since: Jan 10, 2013 @author: kroon ''' from __future__ import division import numpy as np class Gaussian(object): ''' Class for representing a multi-dimensional Gaussian distribution of dimension d, given mean and c...
scjrobertson/xRange
kalman/gaussian.py
Python
gpl-3.0
4,271
#! /usr/bin/python3 import os import shutil import tempfile import unittest from ubiquity import install_misc class InstallMiscTests(unittest.TestCase): def setUp(self): self.source = tempfile.mkdtemp() self.addCleanup(shutil.rmtree, self.source) self.target = tempfile.mkdtemp() ...
yolanother/ubuntumobidev_ubiquity
tests/test_install_misc.py
Python
gpl-3.0
4,712
#!/usr/bin/python # -*- coding: utf-8 -*- from __init__ import * from common.models import Account import logging class BaseController(webapp.RequestHandler): template_values = {} template_module = '' def get(self, action, key=None): # FIXME mysterious bug this gets set over requests somehow ...
geekybeaver/Billy
common/controller/base.py
Python
gpl-3.0
1,515
# -*- 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 2 of the License, or # (at your option) any later version. # # This program is distributed in the h...
Etxea/gestioneide
cambridge/urls.py
Python
gpl-3.0
7,898
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cvirtual.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that the...
Serchcode/cvirtual
manage.py
Python
gpl-3.0
806
# MolMod is a collection of molecular modelling tools for python. # Copyright (C) 2007 - 2008 Toon Verstraelen <Toon.Verstraelen@UGent.be> # # This file is part of MolMod. # # MolMod 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...
woutersmet/Molmodsummer
test/unit_cell.py
Python
gpl-3.0
3,464
#!/usr/bin/python # -*- coding: utf-8 -*- #Copyright (C) 2014 Jonathan Delvaux <apdu@djoproject.net> #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 #any later...
djo938/apdu_builder
apdu/readers/proxnroll.py
Python
gpl-3.0
18,825
# -*- coding: utf-8 -*- # modRana - signal object ## based on: http://code.activestate.com/recipes/576477/ #Author: Thiago Marcos P. Santos from weakref import WeakValueDictionary class Signal(object): def __init__(self): self.__slots = WeakValueDictionary() def __call__(self, *args, **kargs): ...
M4rtinK/modrana
core/signal.py
Python
gpl-3.0
1,757
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, 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 Lic...
amenonsen/ansible
lib/ansible/modules/network/fortios/fortios_system_password_policy.py
Python
gpl-3.0
12,572
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2019-05-31 07:38 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('events', '0037_auto_20190306...
Spoken-tutorial/spoken-website
events/migrations/0038_auto_20190531_0738.py
Python
gpl-3.0
98,329
# -*- coding: utf-8 -*- # Aualé oware graphic user interface. # Copyright (C) 2014-2020 Joan Sala Soler <contact@joansala.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...
joansalasoler/auale
src/auale/book/opening_book.py
Python
gpl-3.0
3,781
# -*- coding: utf-8 -*- # # codimension - graphics python two-way code editor and analyzer # Copyright (C) 2010-2017 Sergey Satskiy <sergey.satskiy@gmail.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 Softw...
SergeySatskiy/codimension
codimension/ui/parsererrors.py
Python
gpl-3.0
3,321
# -*- coding: utf-8 -*- from __future__ import unicode_literals from copy import deepcopy class Assign(object): def __init__(self, name, expression): self._name = name self._expression = expression def __str__(self): return '{0} = {1}'.format(self._name, self._expression) def __...
jscn/pysimple
pysimple/statements.py
Python
gpl-3.0
1,195
# coding=utf-8 """ Faça um programa, contendo subprogramas, que: a) Leia da entrada padrão as dimensões, quantidade de linhas e quantidade de colunas de uma matriz bidimensional; b) Gere uma matriz, onde cada célula é um número inteiro gerado aleatoriamente no intervalo 0 a 9; c) Mostre a matriz, linha a linha na tel...
deyvedvm/cederj
fund-prog/2017-2/ap1/questao3.py
Python
gpl-3.0
2,277
# Copyright 2016 Mycroft AI, Inc. # # This file is part of Mycroft Core. # # Mycroft Core 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 versio...
JarbasAI/jarbas-core
mycroft/skills/intent_service.py
Python
gpl-3.0
14,724
#!/usr/bin/env python # http://pyrocko.org - GPLv3 # # The Pyrocko Developers, 21st Century # ---|P------/S----------~Lg---------- from __future__ import print_function import sys import re import os.path as op import logging import copy import shutil from optparse import OptionParser from pyrocko import util, trace,...
pyrocko/pyrocko
src/apps/fomosto.py
Python
gpl-3.0
36,133
# Topydo - A todo.txt client written in Python. # Copyright (C) 2014 - 2015 Bram Schoenmakers <me@bramschoenmakers.nl> # # 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 L...
MinchinWeb/topydo
topydo/commands/DepriCommand.py
Python
gpl-3.0
1,906
# -*- coding: utf-8 -*- # License GPL-3.0 or later (http://www.gnu.org/licenses/gpl). from click.testing import CliRunner from giraumon.initialize import init def test_init_without_git_repo(): """Test init on folder with no git root """ runner = CliRunner() result = runner.invoke(init, ['/tmp']) asse...
mgasystem/giraumon
giraumon/tests/test_initialize.py
Python
gpl-3.0
924
""" TaskQueueDB class is a front-end to the task queues db """ __RCSID__ = "$Id" import random from DIRAC import gConfig, gLogger, S_OK, S_ERROR from DIRAC.WorkloadManagementSystem.private.SharesCorrector import SharesCorrector from DIRAC.ConfigurationSystem.Client.Helpers.Operations import Operations from DIRAC.Core...
arrabito/DIRAC
WorkloadManagementSystem/DB/TaskQueueDB.py
Python
gpl-3.0
51,921
#!/usr/bin/env python # # Analyse benchio output files # # System modules for grabbing data import sys import os.path import re from glob import glob import seaborn as sns # Modules for analysing and visualising data import pandas as pd import numpy as np import matplotlib matplotlib.use('Agg') from matplotlib import...
ARCHER-CSE/parallel-io
benchmark/analysis/analyse_benchio_output.py
Python
gpl-3.0
4,610
"""Utility Class used to report timings """ import time class Timings(object): def __init__(self): """Key of data dictionary is the name for timings, values are a tuple which is (n,t,st) where n is the number of calls, and t the cumulative time it took, and st the status ('finished',STARTTIME)""" ...
Juanlu001/CBC.Solve
cbc/swing/fsinewton/utils/timings.py
Python
gpl-3.0
3,415
import turtle def draw_square(some_turtle): for i in range(1,5): some_turtle.forward(100) some_turtle.right(90) def draw_art(): window=turtle.Screen() window.bgcolor("red") brad=turtle.Turtle() brad.shape("turtle") brad.color("yellow") brad.speed(2) for i in range(1,37): draw_square(brad) brad.right(1...
pinakinathc/python_code
mini_programs/mindstorms.py
Python
gpl-3.0
358
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2016 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 the h...
didrocks/snapcraft
snapcraft/tests/test_config.py
Python
gpl-3.0
3,065
import argparse import matplotlib.pyplot as plt import seaborn as sns sns.set_palette("colorblind") sns.set_color_codes("colorblind") def parse(logfile): loss_train = [] loss_test = [] section_loss = [] acc_train = [] acc_test = [] section_acc = [] mean_diff_train = [] mean_diff_test =...
hrantzsch/signature-verification
tools/plot_clf.py
Python
gpl-3.0
5,362
#!/usr/bin/env python2 import snapext, os handler = snapext.SnapHandler data = dict() @handler.route('/') def main(): return 'Ich bin online!' @handler.route('/check') def key_in_data(key): return key in data @handler.route('/get') def get_data(key): return data[key] if key_in_data(key) else '' @handle...
Code-WvS/snapmesh
snapmesh.py
Python
gpl-3.0
851
import web import base import local def orNone(a, b): if a is None: return b return a class Field(object): def __init__(self, name, description, primary=False, validator=None): self.name = name self.primary = primary self.description = description if validator == ...
mateoqac/unqTip
language/vgbs/web/forms.py
Python
gpl-3.0
6,865
import numpy as py class Perceptron(object): """Perceptron classifier. Parameters ------------- eta : float Learning rate (between 0.0 and 1.0) n_iter : int Passes over the training dataset. Attributes ----------- w_ : 1d...
gedman4b/MachineLearning
Python/perceptron.py
Python
gpl-3.0
1,711
from biohub.core.tasks.exceptions import TaskInstanceNotExists from biohub.core.tasks.result import AsyncResult class TaskPayload(object): """ A task payload carries information related to a specific task instance, including task_id, arguments, options, etc. """ __slots__ = ['task_name', 'task_id...
igemsoftware2017/USTC-Software-2017
biohub/core/tasks/payload.py
Python
gpl-3.0
1,411
import unittest import kata.descendents.main as cb class Tests(unittest.TestCase): def test_main(self): cb.run()
matthewdeanmartin/kata-python
kata/descendents/test.py
Python
gpl-3.0
127
# Copyright (C) 2003-2005 Peter J. Verveer # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following d...
alephu5/Soundbyte
environment/lib/python3.3/site-packages/scipy/ndimage/measurements.py
Python
gpl-3.0
47,436
# Parabench - A parallel file system benchmark # Copyright (C) 2009-2010 Dennis Runz # University of Heidelberg # # 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 Licens...
drunz/parabench
src/ppc/Template.py
Python
gpl-3.0
2,742
#************************************************************************ # Codelet Tuning Infrastructure # Copyright (C) 2010-2015 Intel Corporation, CEA, GENCI, and UVSQ # # 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 # th...
franck-talbart/codelet_tuning_infrastructure
ctr-common/plugins/8b9f58b8-9d01-4af4-8884-42443337da67/util.py
Python
gpl-3.0
8,819
from django.conf.urls import patterns, url from . import views urlpatterns = patterns('', url(r'^endpoints/$', views.endpoint_list, name='endpoint_list'), url(r'^endpoints/(?P<path>[^?#]+)/$', views.endpoint_details, name='endpoint_details'), url(r'^api/(?P<path>[^?#]+)/$', views.application_endpoint, na...
apiaas/gae-search
src/api/urls.py
Python
gpl-3.0
350
#!/usr/bin/env python3 import sys from json import dumps ### CompoundStack is the class to use for all parsers. class ParallelRecord(object): """ParallelRecord tracks objects that are parallel to a primary record stack. Used by CompoundStack.""" def __init__(self, type, name, id): self.type = typ...
ARTFL-Project/PhiloLogic5
python/philologic/OHCOVector.py
Python
gpl-3.0
12,529
#!/usr/bin/env python """ Created on 28.10.2014 @author: evg-zhabotinsky """ from test_mir_common import * mir = tirpan_get_mir('test_mir17.py') n = find_mir_nodes(mir, x_call = func_checker('x'), y_call = func_checker('y'), z_call = func_checker('z'), ...
bronikkk/tirpan
tests/accept_mir17.py
Python
gpl-3.0
1,313
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2018 David Arroyo Menéndez # Author: David Arroyo Menéndez <davidam@gnu.org> # Maintainer: David Arroyo Menéndez <davidam@gnu.org> # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as p...
davidam/python-examples
matplotlib/stackplot_demo.py
Python
gpl-3.0
2,255
import re from nxtools import * from .common import * def shorten(instr, nlen): line = instr.split("\n")[0] if len(line) < 100: return line return line[:nlen] + "..." def filter_match(f, r): """OR""" if type(f) in [list, tuple]: res = False for fl in f: if re.m...
immstudios/nebula-core
nebulacore/meta_utils.py
Python
gpl-3.0
1,789
# Django settings for wapzap project. from dist import * DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( #('Firstname Lastname', 'admin@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3'...
lig/picket_classic
settings/local_sample.py
Python
gpl-3.0
890
import subprocess import json import collections import random import sys def parse_json_result(out): """Parse the provided JSON text and extract a dict representing the predicates described in the first solver result.""" result = json.loads(out) assert len(result['Call']) > 0 assert len(result['Call'][0]['Witn...
dnalexander/CMPM146_P7
p7_driver.py
Python
gpl-3.0
2,598
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-11-03 14:52 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('presence', '0001_initial'), ] operations = [ ...
RESTfactory/presence
presence/migrations/0002_session.py
Python
gpl-3.0
830
import urllib, urllib2, re, cookielib, os, tempfile, json, md5, time from BeautifulSoup import BeautifulSoup import proxy from gomutil import * class NotLoggedInException(Exception): pass def request(url, params=None, headers={}, opener=None): data = params and urllib.urlencode(params) req = urllib2.Reque...
jhawthorn/plugin.video.gomtv.net
gomtv.py
Python
gpl-3.0
9,910
# # Copyright (C) 2010 Cardapio Team (tvst@hotmail.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, or # (at your option) any later version. # # ...
daboross/cardapio
src/plugins/duckduck.py
Python
gpl-3.0
8,409
from chiplotle.geometry.core.coordinate import Coordinate import math #def polar_to_xy(*args): def polar_to_xy(args): '''Converts polar (r, A) to Cartesian (x y) coordinates, where r is the radius and A is the angle in radians. ''' try: r, A = tuple(Coordinate(*args)) except: raise...
drepetto/chiplotle
chiplotle/tools/mathtools/polar_to_xy.py
Python
gpl-3.0
434
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
syl20bnr/nupic
nupic/research/TP.py
Python
gpl-3.0
132,910
#!/usr/bin/env python import pprint import random import glob import copy import numpy as np from nilearn.input_data import NiftiMasker from sklearn import preprocessing def Sort(dir_1, dir_2, n_1, n_2): '''Create dict of subject file list of both groups''' files_1 = glob.glob(dir_1) files_2 = glob.glob(...
jrabenoit/skellify
prep.py
Python
gpl-3.0
2,486
import configparser import json from os.path import join import discord import requests from discord.ext import commands import ereputils # Config reader config = configparser.ConfigParser() config.read("config.ini") # API Key apiKey = config["DEFAULT"]["api_key"] apiVersion = config["DEFAULT"]["api_version"] cla...
Curlybear/Socrates
battle.py
Python
gpl-3.0
23,254
import heapq from collections import defaultdict, Counter class FreqStackHeap(object): """ Leet code solution. Timing out. Execution result is correct but times out for exceptionally high number of inputs. """ def __init__(self): self._mem = {} self.heap = [] self._idx = 0...
Sriee/epi
data_structures/heaps/frequency_stack.py
Python
gpl-3.0
2,003
# wikirandom.py: Functions for downloading random articles from Wikipedia # # Copyright (C) 2010 Matthew D. Hoffman # # 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 Lic...
ajbc/lda-svi
generalrandom.py
Python
gpl-3.0
8,782
from vsg.token import signal_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression from vsg.vhdlFile.classify import identifier_list from vsg.vhdlFile.classify import signal_kind from vsg.vhdlFile.classify import subtype_indication def detect(iToken, lObjects): ''' ...
jeremiah-c-leary/vhdl-style-guide
vsg/vhdlFile/classify/signal_declaration.py
Python
gpl-3.0
1,368
# -*- coding: utf-8 -*- class LineCallback(object): def __init__(self, callback): self.callback = callback def Pinverified(self, pin): self.callback("Enter PinCode '" + pin + "' to your mobile phone in 2 minutes") def QrUrl(self, url): self.callback("Login qrcode to your...
Hyunakyu/FFR
LineAlpha/LineApi/LineCallback.py
Python
gpl-3.0
435
#!/usr/bin/python from datetime import datetime dateTimeObj = datetime.now() with open("/var/log/nems/argonone.log","a") as text_file: text_file.write("{0} Test was run.\r\n".format(dateTimeObj))
Cat5TV/nems-migrator
data/1.6/argonone/test.py
Python
gpl-3.0
199
# # 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/package_manager.py
Python
gpl-3.0
12,528
""" Instructions: 1) Set up testing/config.py (copy from config.py.example and fill in the fields) 2) Run this script 3) Look inside your GCP_BUCKET under test_doodad and you should see results in secret.txt """ import os import doodad from doodad.utils import TESTING_DIR from testing.config import GCP_PROJECT, GCP_BU...
justinjfu/doodad
testing/remote/test_gcp.py
Python
gpl-3.0
1,085
# -*- coding: utf-8 -*- # Copyright (C) 2011, 2012 Sebastian Wiesner <lunaryorn@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; either version 2.1 of the License, or (at your ...
luv/impulse-cube
deps/pyudev-0.16.1/tests/test_libudev.py
Python
gpl-3.0
4,686
""" TranSPHIRE is supposed to help with the cryo-EM data collection Copyright (C) 2017 Markus Stabrin 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 Licen...
mstabrin/transphire
transphire/transphire_import.py
Python
gpl-3.0
19,292
#!/usr/bin/python3 ''' The fibonacci series is a series of numbers in which each number (Fibonacci number) is the sum of the two preceding numbers. The simplest is the series 1, 1, 2, 3, 5, 8, 13, 21 etc. It's a common example used when learning recursion. Its inefficiency also leads to an alternate, iterative, "dynam...
lancepants/notes
lern/fibonacci.py
Python
gpl-3.0
857
import os from pylons import app_globals def delete_image(image): paths = image.path.split(';') for p in paths: path = os.path.join(app_globals.image_storage, p) os.remove(path)
hep-gc/repoman
server/repoman/repoman/lib/storage/storage.py
Python
gpl-3.0
204
# coding=utf-8 from kg.lang.jondomo import Jondomo from kg.lang.lang import KyrgyzWord from kg.tests import KGTestCase class JondomoTest(KGTestCase): def test_ilik(self): data = self.get_ilik_data() for word, expected_form in data.items(): jondomo_affix = Jondomo(KyrgyzWord(word)) ...
MasterAlish/kyrgyz_tili
kg/tests/test_jondomo.py
Python
gpl-3.0
4,602
# -*- coding: utf-8 -*- # ########################################################## # ## make sure administrator is on localhost # ########################################################### import os import socket import datetime import copy import gluon.contenttype import gluon.fileutils # ## critical --- make a ...
ourway/vixenserver
controllers/appadmin.py
Python
gpl-3.0
14,439
#!/usr/bin/env python # -*- coding: utf-8 -* KEYS = { 'a': 'w', 'b': 'E', 'c': 'x', 'd': '1', 'e': 'a', 'f': 't', 'g': '0', 'h': 'C', 'i': 'b', 'j': '!', 'k': 'z', 'l': '8', 'm': 'M', 'n': 'I', 'o': 'd', 'p': '.', 'q': 'U', 'r': 'Y', 's': 'i',...
MauricioAcosta/Aprendiendo_Python
encriptar/criptografia.py
Python
gpl-3.0
2,469
import numpy as np, gevent, traceback from gevent.queue import Queue, Empty from sakura.common.release import auto_release from sakura.common.chunk import NumpyChunk from sakura.common.exactness import EXACT, APPROXIMATE, UNDEFINED, Exactness def reassemble_chunk_stream(it, dt, chunk_size): if chunk_size is None: ...
eduble/panteda
sakura/common/stream.py
Python
gpl-3.0
4,447
from generic_module import BasicModule from equipment.general import SolarPanel, DOCK_EQUIPMENT, WaterTank, CBM, Window, Battery, Comms from equipment.lifesupport import UniversalToilet, WaterPurifier, OxygenElectrolyzer, RegenerableCO2Filter from equipment.computer import DockingComputer, MissionComputer from equipme...
facepalm/bliss-station-game
src/modular_module.py
Python
gpl-3.0
7,899
import os, random, struct, sys from Crypto.Cipher import AES import getpass from optparse import OptionParser import hashlib parser = OptionParser() parser.add_option("-p") (options, args) = parser.parse_args() if(len(sys.argv) < 2): print "usage: python aes_cmdl.py input_file_name <output_file_name> -p <pa...
Bergurth/aes_cmdl.py
aes_cmdl.py
Python
gpl-3.0
2,518
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file is part of picapy # # Copyright (C) 2010-2016 Lorenzo Carbonell # lorenzo.carbonell.cerezo@gmail.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 So...
atareao/Picapy
src/picasamod.py
Python
gpl-3.0
3,598
# -*- coding: utf-8 -*- import re from core import httptools from core import scrapertools from platformcode import logger def test_video_exists(page_url): result = False message = '' try: error_message_file_not_exists = 'File does not exist on this server' error_message_file_deleted = '...
pitunti/alfaPitunti
plugin.video.alfa/servers/zippyshare.py
Python
gpl-3.0
1,478
import os import sys def getRootDir(): cwd = os.getcwd() print(cwd) pos = cwd.find("hm65Vault") print(pos) pos += len("hm65Vault") cwd = cwd[0:pos] print(cwd) getRootDir() sys.exit(0)
humanist1965/hm65Vault
test.py
Python
gpl-3.0
212
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # Copyright (C) 2014 Brian Douglass bhdouglass@gmail.com # 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 Softwa...
bhdouglass/agui
agui/backends/gtk/widgets/button.py
Python
gpl-3.0
1,417
from turtle import * from random import * speed(0) colormode(255) for side_n in range(15,2,-1): color((randint(1, 255),randint(1, 255),randint(1, 255)),(randint(1, 255),randint(1, 255),randint(1, 255))) begin_fill() for i in range(side_n): forward(100) left(360/side_n) end_fill()
hanamvu/C4E11
SS1/tur_a_circle.py
Python
gpl-3.0
313
# -*- coding: utf-8 -*- # # diffoscope: in-depth comparison of files, archives, and directories # # Copyright © 2015 Jérémy Bobbio <lunar@debian.org> # # diffoscope 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 Foundati...
anthraxx/diffoscope
tests/comparators/test_fonts.py
Python
gpl-3.0
1,846
########################################################################### # OCRFeeder - The complete OCR suite # Copyright (C) 2013 Joaquim Rocha <me@joaquimrocha.com> # Copyright (C) 2009-2012 Igalia, S.L. # # This program is free software: you can redistribute it and/or modify # it under the terms of...
GNOME/ocrfeeder
src/ocrfeeder/util/log.py
Python
gpl-3.0
1,404
from irobot.precache._abc import AbstractDataObject, AbstractPrecache from irobot.precache._do import DataObject from irobot.precache._types import PrecacheFull, InProgress, InProgressWithETA from irobot.precache.precache import Precache
wtsi-hgi/irobot
irobot/precache/__init__.py
Python
gpl-3.0
238
#!/opt/local/bin/python2.7 # -*- coding: utf-8 -*- # Code source: Maurizio Giordano # # # License: GPL import numpy as np try: import matplotlib #matplotlib.use('pdf') import matplotlib.pyplot as plt import itertools matplotfound = True except ImportError: matplotfound = False pass class c...
giordamaug/WisardClassifier
utilities.py
Python
gpl-3.0
2,785
from . import * offline_providers = { 'builtin': builtin.ProviderBuiltin, }
luskaner/wps-dict
wps_dict/wps_dict/providers/offline/list.py
Python
gpl-3.0
81
# -*- coding: utf-8 -*- from __future__ import with_statement import base64 import uuid import pycurl from module.network.HTTPRequest import BadHeader from module.network.RequestFactory import getRequest as get_request from module.plugins.internal.Addon import Addon from module.plugins.internal.misc import threaded ...
rlindner81/pyload
module/plugins/hooks/ExpertDecoders.py
Python
gpl-3.0
3,102
# -*- coding: utf-8 -*- """ QuakeML Plug-in for Jane's Document Database. This file also serves as a template/tutorial to create new plug-ins and is thus extensively commented. """ # In the interest of quick import/startup times, please try to import within # the functions and not at the file level. from jane.document...
krischer/jane
src/jane/quakeml/plugins.py
Python
gpl-3.0
12,262