code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
from setuptools import setup, find_packages setup( name='pulp_ostree_common', version='1.0.0a1', packages=find_packages(), url='http://www.pulpproject.org', license='GPLv2+', author='Pulp Team', author_email='pulp-list@redhat.com', description='common code for pulp\'s ostree support', )...
dkliban/pulp_ostree
common/setup.py
Python
gpl-2.0
321
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright (C) 2005-2008 Francisco José Rodríguez Bogado, # # Diego Muñoz Escalante. # # (pacoqueen@users.sourceforge.ne...
pacoqueen/bbinn
formularios/trazabilidad_articulos.py
Python
gpl-2.0
71,269
# # Copyright (C) 2015 Uninett AS # # This file is part of Network Administration Visualized (NAV). # # NAV 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 hope...
UNINETT/nav
python/nav/mibs/hp_httpmanageable_mib.py
Python
gpl-2.0
1,236
""" Django settings for central_service project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR,...
Antikythera/hoot
Application/central_service/settings.py
Python
gpl-2.0
3,154
import chanutils.torrent from chanutils import get_json, movie_title_year from playitem import TorrentPlayItem, PlayItemList _SEARCH_URL = 'https://yts.mx/api/v2/list_movies.json' _FEEDLIST = [ {'title':'Latest', 'url':'https://yts.mx/api/v2/list_movies.json?limit=50'}, {'title':'Highest Rated', 'url':'https://yt...
blissland/blissflixx
chls/bfch_yts_torrents/__init__.py
Python
gpl-2.0
4,386
#!/usr/bin/env python from phamerator import * from phamerator.phamerator_manage_db import * from phamerator.db_conf import db_conf import sys, getpass GeneID = sys.argv[1] password = getpass.getpass() db = raw_input('database: ') c = db_conf(username='root', password=password, server='134.126.132.72', db=db).get_cu...
byuphamerator/phamerator-dev
phamerator/plugins/get_relatives.py
Python
gpl-2.0
429
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2015-2016 James Clark <james.clark@ligo.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 2 of the License, or #...
astroclark/numrel_bursts
nrburst_utils/nrburst_pickle_preserve.py
Python
gpl-2.0
2,870
# elastos_cast_checker.py # encoding: UTF-8 # usages: # sudo chmod a+x elastos_cast_checker.py # python elastos_cast_checker.py import re import os import sys def read_file(path): lines = [] if (path.endswith('.cpp') or path.endswith('.h')): if(os.path.isfile(path)): handle =...
kesalin/PythonSnippet
elastos_cast_checker.py
Python
gpl-2.0
6,505
print "You enter a dark room with three doors. Do you go through door #1, door #2 or door #3?" door = raw_input("> ") if door == "1": print "There's a giant bear here eating a cheese cake. What do you do?" print "1. Take the cake." print "2. Scream at the bear." bear = raw_input("> ") if bear ...
tridvaodin/Assignments-Valya-Maskaliova
LPTHW/ex31.py
Python
gpl-2.0
1,470
import minecraft as minecraft import random import time x = 128 y = 2 z = 128 mc = minecraft.Minecraft.create() while y < 63: j = mc.getBlock(x,y,z) if j == 0: mc.setBlock(x,y,z,8) z = z - 1 if z <= -128: ...
mohsraspi/mhscs14
jay/wowobsidian.py
Python
gpl-2.0
437
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in" " the directory containing %r. It appears you've customized " "things.\n...
liveaverage/baruwa
src/baruwa/manage.py
Python
gpl-2.0
575
# -*- coding: utf-8 -*- # SyConn - Synaptic connectivity inference toolkit # # Copyright (c) 2016 - now # Max Planck Institute of Neurobiology, Martinsried, Germany # Authors: Philipp Schubert, Joergen Kornfeld import itertools from typing import List, Any, Optional, TYPE_CHECKING import networkx as nx import numpy as...
StructuralNeurobiologyLab/SyConn
syconn/proc/graphs.py
Python
gpl-2.0
26,039
import xmltodict def parseData(data): try: return xmltodict.parse(data) except: if len(data.split()) is 0: return None else: raise Exception('Invalid XML data', data)
ColinKeigher/McAfeeWebGateway
mwg/parse.py
Python
gpl-2.0
236
""" LAMP """ import numpy as np tol = 1.e-6 # zero tolerance def pdist(x): """ Pairwise distance between pairs of objects TODO: find a fast function """ n, d = x.shape dist = np.zeros((n, n)) for i in range(n): for j in range(n): dist[i][j] = np.linalg.norm(x[i] - x...
adrianolinux/lamp
lamp.py
Python
gpl-2.0
3,207
# -*- coding: utf-8 -*- import os from lutris import settings from lutris.runners.runner import Runner class mupen64plus(Runner): """Nintendo 64 emulator""" human_name = "Mupen64Plus" platform = "Nintendo 64" game_options = [{ 'option': 'main_file', 'type': 'file', 'label': 'RO...
malkavi/lutris
lutris/runners/mupen64plus.py
Python
gpl-3.0
1,602
d, n = list(map(int, input().split())) answer = 0 while n%10: if n%10 == d: answer += 1 n //= 10 print(answer)
lesina/labs2016
contests_1sem/8/F.py
Python
gpl-3.0
127
""" <This library provides a Python interface for the Telegram Bot API> Copyright (C) <2015> <Jacopo De Luca> 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 t...
jacopodl/TbotPy
src/Object/Location.py
Python
gpl-3.0
1,452
import os DOWNLOAD_TMP_DIR = '/tmp' REPOSITORY_PUBLIC_KEY = '/root/keys/cloud_key.pub' LOCAL_REPOSITORY_DIR = '/pkgs' HTML_DIR = '/usr/share/mod-pacmanager/html/' IHM_RESET_SCRIPT = '/root/reset.py' if os.path.exists("/root/repository"): fh = open("/root/repository") REPOSITORY_ADDRESS = fh.read().strip() ...
moddevices/mod-pacmanager
pacman/settings.py
Python
gpl-3.0
597
# https://github.com/Naish21/themostat ''' * The MIT License (MIT) * * Copyright (c) 2016 Jorge Aranda Moro * * 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, inclu...
fandres/Monitor-heladas
Code/themostat-master/main.py
Python
gpl-3.0
3,439
# -*- coding:utf-8 -*- import datetime import xml.etree.ElementTree as et import pony.orm as orm import sys import os pjoin = os.path.join __dir__ = os.path.abspath(os.path.dirname(__file__)) sys.path.append(__dir__) from server import * dat = dict( code = 'concefly', last_login = datetime.datetime.n...
concefly/indent_system
db_test.py
Python
gpl-3.0
598
#!/usr/bin/python # Copyright (c) 2015 IBM # 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'], ...
mheap/ansible
lib/ansible/modules/cloud/openstack/os_flavor_facts.py
Python
gpl-3.0
6,809
# -*- coding: utf-8 -*- # # Copyright (C) 2010 TUBITAK/UEKAE # # 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. # # Pleas...
hknyldz/pisitools
pisilinux/pisilinux/actionsapi/qt4.py
Python
gpl-3.0
2,253
from __future__ import print_function # Copyright (C) 2003 CAMP # Please see the accompanying LICENSE file for further information. """A replacement for the ``time.clock()`` function. From the clock man page:: Note that the time can wrap around. On a 32bit system where CLOCKS_PER_SEC equals 1000000 t...
robwarm/gpaw-symm
gpaw/utilities/timing.py
Python
gpl-3.0
12,883
#import coin class IDatabase: def enter_coin(coin): raise Exception('NotImplementedError')
SVladkov/Numismatic
database/idatabase.py
Python
gpl-3.0
94
# ----------------------------------------------------------------------- # Copyright: 2010-2022, imec Vision Lab, University of Antwerp # 2013-2022, CWI, Amsterdam # # Contact: astra@astra-toolbox.com # Website: http://www.astra-toolbox.com/ # # This file is part of the ASTRA Toolbox. # # # The ASTRA Toolbo...
astra-toolbox/astra-toolbox
samples/python/s004_cpu_reconstruction.py
Python
gpl-3.0
2,550
from matplotlib import pyplot as plt, colorbar from lib2.VNATimeResolvedDispersiveMeasurement2D import * class DispersiveRamseyFringes(VNATimeResolvedDispersiveMeasurement2D): def __init__(self, name, sample_name, **devs_aliases_map): devs_aliases_map["q_z_awg"] = None super().__init__(name, samp...
vdrhtc/Measurement-automation
lib2/DispersiveRamseyFringes.py
Python
gpl-3.0
1,912
import src import random class Shocker(src.items.Item): """ ingame item used as ressource to build bombs and stuff should have the habit to explode at inconvienent times """ type = "Shocker" def __init__(self): """ set up internal state """ super().__init__(di...
MarxMustermann/OfMiceAndMechs
src/itemFolder/military/shocker.py
Python
gpl-3.0
1,603
''' base tools ''' # -*- coding: utf-8 -*- import re def is_ipv4(ip) : pattern = r'^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})){3}$' matcher = re.match(pattern, ip) if matcher is not None : return True return False def is_domain(domain) : ...
allen1989127/WhereRU
org/sz/tools.py
Python
gpl-3.0
508
#!/usr/bin/env python # encoding: utf-8 ''' pvaurora configuration file ''' LATITUDE = 42.6 LONGITUDE = 12.9 API_KEY = "api_key_value" SYSTEM_ID = -1
yuroller/pvaurora
src/config-dist.py
Python
gpl-3.0
152
""" /** * Ossec Framework * * 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 t...
classcat/cc-prism-hids
main/pylib/ccprism/search.py
Python
gpl-3.0
23,411
import discord from discord.ext import commands from .utils import checks from __main__ import send_cmd_help, settings from cogs.utils.dataIO import dataIO import os import re import asyncio class Antilink: """Blocks Discord invite links from users who don't have the permission 'Manage Messages'""" def __ini...
Krissbro/LondonGaymers
antilink/antilink.py
Python
gpl-3.0
4,545
#!/usr/bin/env python3 from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtGui import QPixmap, QMouseEvent from PyQt5.QtWidgets import QToolButton from PyQt5.QtCore import Qt, pyqtSignal from models.components import * class DraggableComponentButton(QToolButton): mousePress = pyqtSignal(ComponentType, QMouseEven...
bandienkhamgalan/flappyeagle
views/DraggableComponentButton.py
Python
gpl-3.0
549
from __future__ import print_function, unicode_literals import sys from resources.lib.kodiutils import params as decode class Params: handle = int(sys.argv[1]) if len(sys.argv) > 1 else -1 orig_args = sys.argv[2] if len(sys.argv) > 2 else '' args = decode(sys.argv[2]) if len(sys.argv) > 2 else {} res...
bbaronSVK/plugin.video.stream-cinema
resources/lib/params.py
Python
gpl-3.0
420
# -*- coding: utf-8 -*- # Copyright (C) Alex Urban (2019) # # This file is part of GWSumm. # # GWSumm 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 ...
gwpy/gwsumm
gwsumm/html/tests/test_static.py
Python
gpl-3.0
1,947
import os import sqlite3 from flask import Flask, request, session, g, redirect, url_for, abort, \ render_template, flash # create makerlinks application app = Flask(__name__) app.config.from_object(__name__) app.config.update(dict( DATABASE = os.path.join(app.root_path, 'makerlinks-dev.db'), DEBUG = True, APP_NA...
MakerLabPC/makerlinks
makerlinks.py
Python
gpl-3.0
1,532
# coding=utf-8 import unittest """996. Number of Squareful Arrays https://leetcode.com/problems/number-of-squareful-arrays/description/ Given an array `A` of non-negative integers, the array is _squareful_ if for every pair of adjacent elements, their sum is a perfect square. Return the number of permutations of A t...
openqt/algorithms
leetcode/python/lc996-number-of-squareful-arrays.py
Python
gpl-3.0
993
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 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 #pylint: disabl...
mganeva/mantid
Testing/SystemTests/tests/analysis/ValidateInstrumentDefinitionFiles.py
Python
gpl-3.0
4,371
#!/usr/bin/python2 ''' This example shows how to use the os chdir command. Note that an exception is thrown if a directory name which cannot be changed to is supplied (bad name, access problem and more). ''' import os # for chdir, system # a wrong directory on purpose... try: os.chdir('/tmpi') except: print...
nonZero/demos-python
src/examples/short/systems_programming/os_chdir.py
Python
gpl-3.0
399
from datetime import datetime import discord from discord.ext import commands import inspect import logging import os import re import textwrap import time from .mod import CaseMessageNotFound, NoModLogAccess from .utils import checks from .utils.chat_formatting import pagify, box, warning, error, info, bold from .uti...
Injabie3/Red-DiscordBot
cogs/punish.py
Python
gpl-3.0
48,408
#!/usr/bin/env python # ROS node for the Neato Robot Vacuum # Copyright (c) 2010 University at Albany. All right 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 ret...
rbtying/Companion-Cube
neato_node/nodes/neato.py
Python
gpl-3.0
6,453
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
priyesingh/rijenpy
libs/robotremoteserver.py
Python
gpl-3.0
21,857
#!/usr/bin/python3 # # Copyright (C) 2019 by Compassion International. All rights reserved. # License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. # This is free software: you are free to change and redistribute it. # There is NO WARRANTY, to the extent permitted by law. """ ETL North Caro...
az0/entity-metadata
code/etl_voter_north_carolina.py
Python
gpl-3.0
1,464
#!/usr/bin/env python3 ''' @author Michele Tomaiuolo - http://www.ce.unipr.it/people/tomamic @license This software is free - http://www.gnu.org/licenses/gpl.html ''' WEEK_DAYS = 7 MAX_WEEKS = 6 first = int(input("first (0-6)? ")) length = int(input("length (28-31)? ")) for i in range (WEEK_DAYS * MAX_WEEKS): d...
tomamic/fondinfo
exercises/e3_2012_7_calendar.py
Python
gpl-3.0
1,002
#!/usr/bin/env python """ Purpose : Extract next sequence number of auto-scaled instance and set new tag to self instance. Script will be running from new instance. will take input from command line instead of from json file Future Plan : will associate instance to a role based IAM profile Usage : python ec2-autoscale-...
kmaiti/AWSAutoScalingWithF5andCloudFormation
aws-autoscale-ec2-instance-modify.py
Python
gpl-3.0
6,954
# cls_plan_BDI.py import datetime class Plan_BDI(object): """ class for handling various plans for AIKIF using Belief | Desires | Intentions """ def __init__(self, name, dependency): self.name = name self.id = 1 self.dependency = dependency self.plan_versi...
acutesoftware/AIKIF
aikif/lib/cls_plan_BDI.py
Python
gpl-3.0
5,209
# Draw graph x-axios is the number of nodes in the network. import re import sys import os import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import NullFormatter # useful for `logit` scale from mininet.log import setLogLevel, output, info # Read the experimental result data file in a specfied ...
iamxg/minindn-wifi
ndnwifi/averesultgraph-consumer-bread.py
Python
gpl-3.0
8,800
#!/usr/bin/python # -*- coding: utf-8 -*- # kate: space-indent on; indent-width 4; mixedindent off; indent-mode python; roundcube = [ {'name':'common', 'mainpackage':True, 'shortdesc':'Installs the latest version of roundcube', 'description':'', 'packages':['roundcube-plugins', 'roundcube-plugin...
aroth-arsoft/arsoft-meta-packages
grp_roundcube.py
Python
gpl-3.0
1,044
from selenium import webdriver from django.test import LiveServerTestCase, TestCase from django.contrib.staticfiles.testing import StaticLiveServerTestCase import datetime from planner.models import Participation, Event, Occurrence, EventType, Role from django.contrib.auth.models import User import pytz import time tz ...
danieka/churchplanner
planner/functional_tests.py
Python
gpl-3.0
1,831
from collections import deque import re class Formula(object): """ Formula allows translation from a prefix-notation expression in a string to a complex number. This is eventually to be replaced with a cython, c++, or openCL implementation as I'm sure the performance of this class...
dtwiers/PyFracking
src/Formula.py
Python
gpl-3.0
2,090
from recon.core.module import BaseModule import codecs import os class Module(BaseModule): meta = { 'name': 'List Creator', 'author': 'Tim Tomes (@LaNMaSteR53)', 'description': 'Creates a file containing a list of records from the database.', 'options': ( ('table', 'hos...
praetorian-inc/pentestly
modules/reporting/list.py
Python
gpl-3.0
1,569
""" Jowa Header, Code # 4 Battery Voltage """ ### INCLUDES ### from common import JOWA_BATT_THRESHOLD, LOW_BATTERY ### CONSTANTS ### ## Battery Voltage Units and Variables ## # Battery voltage calculation notes: # Vbat = ((R5+R4)/R5)*Vch3 = (2*R/R)*Vch3 = # 2*Vch3 = 2*(ADC/ADCmax)*Vref # Where: # Vref, ADC Voltage...
Barmaley13/BA-Software
headers/jowa_4.py
Python
gpl-3.0
813
# 132. Palindrome Partitioning II QuestionEditorial Solution My Submissions # Total Accepted: 58982 # Total Submissions: 256833 # Difficulty: Hard # Given a string s, partition s such that every substring of the partition is a palindrome. # # Return the minimum cuts needed for a palindrome partitioning of s. # # Fo...
shawncaojob/LC
QUESTIONS/132_palindrome_partitioning_ii.py
Python
gpl-3.0
1,362
from ipctest import IpcTest from gi.repository import i3ipc import pytest @pytest.mark.skip(reason='TODO') class TestGetConfig(IpcTest): def test_get_config(self, i3): config = i3.get_config() assert isinstance(config, i3ipc.ConfigReply) with open('test/i3.config') as f: assert...
acrisci/i3ipc-glib
test/test_get_config.py
Python
gpl-3.0
347
from distutils.core import setup import py2exe setup(console=['newsputnik.py'])
maxikov/tatmon
trash/setup.py
Python
gpl-3.0
83
from django import forms from poi_manager.models import Poi, PoiCategory from mptt.forms import TreeNodeChoiceField class PoiCategoryForm(forms.ModelForm): cat_name = forms.CharField(max_length=128, help_text="Please enter the category name.") parent = TreeNodeChoiceField(queryset=PoiCategory.objects.all(), r...
indrz/indrz
indrz/poi_manager/forms.py
Python
gpl-3.0
769
#!/usr/bin/env python # # Copyright 2010 Communications Engineering Lab, KIT # # This is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # # This softwar...
robertwatsonbath/gr-specest-3.7
python/specest_mtm.py
Python
gpl-3.0
4,472
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Tool to recreate all tables/procedures in the database. """ import argparse import copy import re from os import path from src.sqllist import re_sub try: import monetdb.sql as db try: import monetdb.exceptions as me except ImportError: # Ol...
kernsuite-debian/lofar
CEP/GSM/bremen/recreate_tables.py
Python
gpl-3.0
8,597
# -*-Python-*- ################################################################################ # # File: frontend.py # RCS: $Header: $ # Description: frontend: # responsibility: # init backend # init processors # handle two query types: # ...
laats/dpdq
src/qp/frontend.py
Python
gpl-3.0
3,696
# # 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/. # from uitest.framework import UITestCase import time class tdf92611(UITestCase): def test_launch_and_close_bibl...
beppec56/core
uitest/writer_tests/tdf92611.py
Python
gpl-3.0
647
"""djangochat URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/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...
ploggingdev/djangochat
djangochat/urls.py
Python
gpl-3.0
817
# -*- coding: utf-8 -*- import io import pytest import re from collections import namedtuple from unittest import mock from toot import console, User, App, http from toot.exceptions import ConsoleError from tests.utils import MockResponse app = App('habunek.com', 'https://habunek.com', 'foo', 'bar') user = User('ha...
ihabunek/toot
tests/test_console.py
Python
gpl-3.0
20,144
import json from pimlico.datatypes.corpora.json import JsonDocumentType from pimlico.cli.browser.tools.formatter import DocumentBrowserFormatter class JsonFormatter(DocumentBrowserFormatter): DATATYPE = JsonDocumentType() def format_document(self, doc): return json.dumps(doc.data, indent=4)
markgw/pimlico
src/python/pimlico/datatypes/corpora/formatters/json.py
Python
gpl-3.0
313
import sys import os import numpy as np sys.path.append(os.path.join(os.getcwd(), "..")) from run_utils import run_kmc, parse_input from ParameterJuggler import ParameterSet def main(): controller, path, app, cfg, n_procs = parse_input(sys.argv) alpha_values = ParameterSet(cfg, "alpha\s*=\s*(.*)\;") a...
jorgehog/Deux-kMC
scripts/autocorr/run.py
Python
gpl-3.0
881
__author__ = 'student' import turtle import math turtle.shape('turtle') def duga(r): for i in range (20): turtle.forward(r) turtle.left(9) def krug(r): for i in range(72): turtle.forward(r) turtle.left(5) turtle.penup() turtle.forward(200) #Head turtle.left(90) t...
goha2/labs_2016
past/sem 3/13.py
Python
gpl-3.0
1,074
import unittest from aquarius.Aquarius import Aquarius class ConsoleTestBase(unittest.TestCase): def initialise_app_mock(self): self.app = Aquarius(None, None, None) def assert_called(self, method): self.assertTrue(method.called)
jeroanan/Aquarius
tests/output/console/ConsoleTestBase.py
Python
gpl-3.0
257
from __future__ import absolute_import from django.utils.translation import ugettext_lazy as _ from common.utils import encapsulate from documents.models import Document from documents.permissions import (PERMISSION_DOCUMENT_NEW_VERSION, PERMISSION_DOCUMENT_CREATE) from navigation.api import register_links, regis...
rosarior/mayan
apps/sources/__init__.py
Python
gpl-3.0
7,263
VERSION = "0.12beta4" VERSION_NAME = "Anderssen"
btrent/knave
pychess/__init__.py
Python
gpl-3.0
49
#!/usr/bin/env python # -*- coding: iso-8859-15 -*- """ Raspymc is a multimedia centre exposed via a http server built with bottlepy Copyright (C) 2013 Giancarlo Fringuello This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as pub...
GiancarloF/raspymc_server
core/conf_manager.py
Python
gpl-3.0
4,528
# -*- coding: utf-8 -*- """#Versión de la calculadora.""" version = '1.0.0'
Ryszard-Ps/rsr-calculator
rsr_calculator/version.py
Python
gpl-3.0
77
import itertools as it from operator import attrgetter from flask import Markup, render_template, Blueprint, redirect, url_for, flash, abort, request from sqlalchemy import desc from .. import Execution, Stage, Task, TaskStatus from ..job.JobManager import JobManager from . import filters from ..graph.draw import dra...
yassineS/COSMOS-2.0
cosmos/web/views.py
Python
gpl-3.0
8,041
__problem_title__ = "Maximum Integer Partition Product" __problem_url___ = "https://projecteuler.net/problem=374" __problem_description__ = "An integer partition of a number is a way of writing as a sum of " \ "positive integers. Partitions that differ only in the order of their " \ ...
jrichte43/ProjectEuler
Problem-0374/solutions.py
Python
gpl-3.0
1,665
# vim: ts=4:sw=4:expandtab # BleachBit # Copyright (C) 2008-2017 Andrew Ziem # https://www.bleachbit.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 # ...
brahmastra2016/bleachbit
bleachbit/RecognizeCleanerML.py
Python
gpl-3.0
5,942
# coding: utf8 # qtplayer.py # 10/1/2014 jichi __all__ = 'HiddenPlayer', from PySide.QtCore import QUrl from sakurakit.skdebug import dprint class _HiddenPlayer: def __init__(self, parent): self.parent = parent # QWidget self._webView = None # QWebView @property def webView(self): if not self._web...
Dangetsu/vnr
Frameworks/Sakura/py/libs/qtbrowser/qtplayer.py
Python
gpl-3.0
2,795
#!/usr/bin/python3 # -*- coding: utf-8 -*- # repolist.py file is part of slpkg. # Copyright 2014-2021 Dimitris Zlatanidis <d.zlatanidis@gmail.com> # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations # https://gitlab.com/dslackw/slpkg # Slpkg is free software: you can redis...
dslackw/slpkg
slpkg/repolist.py
Python
gpl-3.0
2,957
from bs4 import BeautifulSoup import requests, re n = int(input('How many sudoku\'s do you want to download (between 1 and 10)? ')) if n < 1 or n > 10: die() url = 'http://show.websudoku.com/?level=4' for i in range(n): page = requests.get(url) page.raise_for_status() rawPage=page.text sudokuid = int(re.search...
cawc/sudokusolve
grabsudoku.py
Python
gpl-3.0
804
# -*- coding: utf-8 -*- # Roastero, released under GPLv3 import os import json import time import functools from PyQt5 import QtGui from PyQt5 import QtCore from PyQt5 import QtWidgets from openroast import tools from openroast.views import customqtwidgets from openroast import utils as utils class RecipeEditor(QtW...
Roastero/Openroast
openroast/views/recipeeditorwindow.py
Python
gpl-3.0
19,366
""" input: a loaded image; output: [[x,y],[width,height]] of the detected mouth area """ import cv def findmouth(img): # INITIALIZE: loading the classifiers haarFace = cv.Load('haarcascade_frontalface_default.xml') haarMouth = cv.Load('haarcascade_mouth.xml') # running the classifiers storage = cv.CreateM...
divija96/Emotion-Detection
code/mouthdetection.py
Python
gpl-3.0
1,760
import json import requests from transliterate import translit _eng_chars = "~!@#$%^&qwertyuiop[]asdfghjkl;'zxcvbnm,./QWERTYUIOP{}ASDFGHJKL:\"|ZXCVBNM<>?" _rus_chars = "ё!\"№;%:?йцукенгшщзхъфывапролджэячсмитьбю.ЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭ/ЯЧСМИТЬБЮ," _trans_table = dict(zip(_eng_chars, _rus_chars)) def _fix_layout(s): ...
bashkirtsevich/autocode
text_preprocessing/es_predict.py
Python
gpl-3.0
1,121
import sys def main(): print(1) if __name__ == '__main__': main()
abhishekshanbhag/emotion_based_spotify
spotifyAPITest/python/test.py
Python
gpl-3.0
75
#!/usr/bin/python AGO_SCHEDULER_VERSION = '0.0.1' ############################################ """ Basic class for device and device group schedule """ __author__ = "Joakim Lindbom" __copyright__ = "Copyright 2017, Joakim Lindbom" __date__ = "2017-01-27" __credits__ = ["Joakim Lindbom", "The ago control ...
JoakimLindbom/ago
scheduler/scheduler.py
Python
gpl-3.0
7,085
# """ # This is the interface that allows for creating nested lists. # You should not implement it, or speculate about its implementation # """ #class NestedInteger: # def __init__(self, value=None): # """ # If value is not specified, initializes an empty list. # Otherwise initializes a single i...
YiqunPeng/Leetcode-pyq
solutions/339NestedListWeightSum.py
Python
gpl-3.0
1,788
#7/5/2014 import Image from pytesser import * import telnetlib import base64 import StringIO def main(): tn = telnetlib.Telnet("41.231.53.40",9090) ret = tn.read_until("\n") print ret base64_str = ret.strip() decode = base64.b64decode(base64_str) buff = StringIO.StringIO() buff.write(decod...
SeMorgana/ctf
pwnium2014/rot300/rot300.py
Python
gpl-3.0
1,187
''' Plot queue occupancy over time ''' from helper import * import plot_defaults parser = argparse.ArgumentParser() parser.add_argument('--files', '-f', help="Queue timeseries output to one plot", required=True, action="store", nargs='+',...
XianliangJ/collections
ShrewAttack/util/plot_queue.py
Python
gpl-3.0
3,877
#!/usr/bin/env python # File created on 10 Mar 2010 from __future__ import division __author__ = "Greg Caporaso" __copyright__ = "Copyright 2011-2013, The PICRUSt Project" __credits__ = ["Greg Caporaso","Morgan Langille"] __license__ = "GPL" __version__ = "1.1.0" __maintainer__ = "Greg Caporaso" __email__ = "gregcapor...
zaneveld/picrust
scripts/start_parallel_jobs.py
Python
gpl-3.0
5,341
import numpy as np from astropy.coordinates import Angle, Distance from astropy import units as u from .angles2Plane import gal_theta def vdm_2001_dep_dist_kpc(rho, phi, glx_theta, glx_incl, D_0): """ Deprojected angular distance from vdM & Cioni (2001). D is the distance associated to a point defined ...
Gabriel-p/mcs_rot_angles
modules/i_PA_DeprjDist.py
Python
gpl-3.0
4,382
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2022 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). import io import sys import tempfile import time import os import traceback from pathlib im...
psychopy/psychopy
psychopy/app/pavlovia_ui/project.py
Python
gpl-3.0
36,285
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Calendar-Indicator # # Copyright (C) 2011-2019 Lorenzo Carbonell Cerezo # 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 Softw...
atareao/calendar-indicator
src/loginoption.py
Python
gpl-3.0
3,654
#!/usr/bin/env python3 """ Copyright 2020 Paul Willworth <ioscode@gmail.com> This file is part of Galaxy Harvester. Galaxy Harvester is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 ...
pwillworth/galaxyharvester
catchupMail.py
Python
gpl-3.0
5,380
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'Ui_ExportData.ui' # # Created: Sat May 28 00:16:57 2011 # by: PyQt4 UI code generator 4.8.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except A...
bbreslauer/PySciPlot
src/ui/Ui_ExportData.py
Python
gpl-3.0
13,612
from __future__ import absolute_import import os import re import numpy as np import tensorflow as tf stop_words=set(["a","an","the"]) def load_candidates(data_dir, task_id): assert task_id > 0 and task_id < 6 candidates=[] candidates_f=None candid_dic={} #candidates_f='candidates.txt' candid...
DineshRaghu/dstc6-track1
src/data_utils.py
Python
gpl-3.0
14,089
from django.conf.urls import patterns, include, url from django.conf import settings from django.views.generic import ListView from django.views.generic.detail import DetailView from foo.hotel.models import Hotel from foo.hotel.views import HotelLimitListView from foo.hotel.views import HotelLimitNoOrderListView urlp...
rodo/django-perf
foo/hotel/urls.py
Python
gpl-3.0
544
# Copyright 2016 Casey Jaymes # This file is part of PySCAP. # # PySCAP 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. # # PySCAP is ...
cjaymes/pyscap
src/scap/model/oval_5/VariableIdPattern.py
Python
gpl-3.0
978
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2021 Timothée Lecomte # This file is part of Friture. # # Friture 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. # # Friture is distri...
tlecomte/friture
friture/level_view_model.py
Python
gpl-3.0
2,390
# Copyright 2010, 2014 Gerardo Marset <gammer1994@gmail.com> # # This file is part of Haxxor Engine. # # Haxxor Engine 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 versi...
ideka/haxeng
haxeng/game.py
Python
gpl-3.0
5,288
# Copyright (c) The AcidSWF Project. # See LICENSE.txt for details. """ Support for creating a service which runs a web server. @since: 1.0 """ import logging from twisted.python import usage from twisted.application import service from acidswf.service import createAMFService optParameters = [ ['log-level', ...
thijstriemstra/acidswf
python/acidswf/application/amf.py
Python
gpl-3.0
1,733
__author__ = 'Paolo Bellagente' # Documentation for this module. # # More details. ################################## DATABASE ############################################## from sqlalchemy import * from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship, sessionmaker impor...
mpescimoro/stripp3r
lessonEntity.py
Python
gpl-3.0
1,603
import sys from mock import ( patch, Mock ) from pytest import raises from ..test_helper import argv_kiwi_tests import kiwi from kiwi.exceptions import KiwiFileSystemSetupError from kiwi.builder.filesystem import FileSystemBuilder class TestFileSystemBuilder: @patch('kiwi.builder.filesystem.FileSystemSetup...
b1-systems/kiwi
test/unit/builder/filesystem_test.py
Python
gpl-3.0
5,298
""" This file is part of contribution to the OAD Data Science Toolkit. This 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. The software is...
astro4dev/OAD-Data-Science-Toolkit
Teaching Materials/Machine Learning/Supervised Learning/Examples/PPC/EvaluationStats.py
Python
gpl-3.0
16,967
#!/usr/bin/env python # -*- coding: utf8 -*- """setup (C) Franck Barbenoire <fbarbenoire@yahoo.fr> License : GPL v3""" from distutils.core import setup from setuptools import find_packages setup(name = "django-openzoom", version = "0.1.1", description = "Django application for displaying very high resolution...
franckinux/django-openzoom
setup.py
Python
gpl-3.0
925
from tests.base_test import BaseTest from tests import config from core import modules from core.sessions import SessionURL from testfixtures import log_capture from core import messages import logging import os import subprocess class FileBzip(BaseTest): # Create and bzip2 binary files for the test binstring...
epinna/weevely3
tests/test_file_bzip2.py
Python
gpl-3.0
5,554