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
from test_support import verbose, TestFailed if verbose: print "Testing whether compiler catches assignment to __debug__" try: compile('__debug__ = 1', '?', 'single') except SyntaxError: pass import __builtin__ prev = __builtin__.__debug__ setattr(__builtin__, '__debug__', 'sure') setattr(__...
DarioGT/OMS-PluginXML
org.modelsphere.sms/lib/jython-2.2.1/Lib/test/test_compile.py
Python
gpl-3.0
3,243
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have purchased from # Numenta, Inc. a separate commercial license for this software code, the # following terms and conditio...
Petr-Kovalev/nupic-win32
tests/unit/py2/nupic/frameworks/opf/opf_metrics_test.py
Python
gpl-3.0
27,219
#!/usr/bin/python3 # Copyright 2016-2018 Francisco Pina Martins <f.pinamartins@gmail.com> # This file is part of pyRona. # pyRona 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...
StuntsPT/pyRona
pyRona/pyRona.py
Python
gpl-3.0
8,988
#!/usr/bin/env python # -*- coding: UTF-8 -*- import shutil import os from distutils.core import setup import switchscreen shutil.copyfile("switchscreen.py", "switchscreen") setup( name = "switchscreen", version = switchscreen.__version__, description = "", author = u"Régis FLORET", author_mail...
regisf/switchscreen
setup.py
Python
gpl-3.0
475
#!/usr/bin/python from __future__ import unicode_literals import os def wait(): raw_input('\nPress Enter to continue...\n\n') os.system(['clear', 'cls'][os.name == 'nt']) # Create a class to handle items in a wallet class BaseWalletHandler(object): def __init__(self): self.items = { ...
ricomoss/learn-tech
python/track_1/lesson4/exercise.py
Python
gpl-3.0
1,793
# This file is part of Pooky. # Copyright (C) 2013 Fcrh <coquelicot1117@gmail.com> # # Pooky 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 ver...
coquelicot/Pooky
pooky/Widgets.py
Python
gpl-3.0
2,289
# This Python file uses the following encoding: utf-8 # This file is part of InputShare # # Copyright © 2015 Patrick VanDusen # # This program 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 ver...
input-share/input-share
core.py
Python
gpl-3.0
783
# encoding: utf-8 import sys import os import signal from openpyxl.utils import get_column_letter from openpyxl import Workbook,load_workbook ItemList=[] ## {{{ http://code.activestate.com/recipes/410692/ (r8) # This class provides the functionality we want. You only need to look at # this if you want to know how thi...
Always0806/GPIOTableGen
Util.py
Python
gpl-3.0
4,608
from math import sqrt def euclidean_distance(p1, p2): """ Compute euclidean distance for two points :param p1: :param p2: :return: """ dx, dy = p2[0] - p1[0], p2[1] - p1[1] # Magnitude. Coulomb law. return sqrt(dx ** 2 + dy ** 2)
dsaldana/roomba_sensor_network
roomba_sensor/src/roomba_sensor/util/geo.py
Python
gpl-3.0
268
# -*- coding: utf-8 -*- """ # Copyright Copyright (C) 2012 by Victor victor@caern.de # License This file is part of SoulCreator. SoulCreator 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...
GoliathLeviathan/SoulCreator
src/Tools/ImageTools.py
Python
gpl-3.0
1,059
import copy from nive.utils.dataPool2.mysql.tests import test_MySql try: from nive.utils.dataPool2.mysql.mySqlPool import * except: pass from . import test_db from nive.utils.dataPool2.sqlite.sqlite3Pool import * mode = "mysql" printed = [""] def print_(*kw): if type(kw)!=type(""): v = "" ...
nive/nive
nive/utils/dataPool2/tests/performance_test.py
Python
gpl-3.0
12,761
#!usr/bin/env python from pyspace.planet import PlanetArray from pyspace.simulator import BarnesSimulator import numpy x = numpy.array([0,100]) y = numpy.array([0,0]) z = numpy.array([0,0]) m = numpy.array([1000,1]) v_y = numpy.array([0,(1000/100)**0.5]) pa = PlanetArray(x, y, z, v_y=v_y, m=m) sim = BarnesSimulato...
adityapb/pyspace
examples/barnes_two_planets.py
Python
gpl-3.0
402
import unittest import upload.injectionContainer as injectionContainer from upload.strategy.dummys.injectedContainerDummy import ContainerMock class TestRequestParams(unittest.TestCase): """ Class test for request params class """ def test_open_file_error(self): """ test case secured ...
acostasg/upload
upload/tests/shared/test_open_file.py
Python
gpl-3.0
642
from datetime import timedelta, date def daterange(start_date, end_date): for n in range(int ((end_date - start_date).days)): yield start_date + timedelta(n) start_date = date(2017, 9, 30) end_date = date(2017, 10, 23) for single_date in daterange(start_date, end_date): print './neg_runner.sh', single...
ItsLastDay/academic_university_2016-2018
subjects/BigData/hw01/fourth_group/gen.py
Python
gpl-3.0
409
from nose.tools import assert_raises from endicia.builders.ChangePassPhraseXmlBuilder import ChangePassPhraseXmlBuilder from endicia.builders.EndiciaXmlBuilder import ValueToLongError def test_ChangePassPhraseXmlBuilder_invalid_values(): """ChangePassPhraseXmlBuilder should raise ValueToLongError when each value is p...
streed/PyEndicia
endicia/test/builders/test_ChangePassPhraseXmlBuilder.py
Python
gpl-3.0
817
import csv import pickle import datetime import os import urllib.request, urllib.parse, urllib.error from django.core.cache import cache from django.urls import reverse from django.http import HttpResponseRedirect, HttpResponse, Http404 from django.db.models import Q from django.db.models.aggregates import Max from dj...
sfu-fas/coursys
grades/views.py
Python
gpl-3.0
71,329
__problem_title__ = "Comfortable distance" __problem_url___ = "https://projecteuler.net/problem=364" __problem_description__ = "There are seats in a row. people come after each other to fill the " \ "seats according to the following rules: We can verify that T(10) = " \ ...
jrichte43/ProjectEuler
Problem-0364/solutions.py
Python
gpl-3.0
808
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.core.urlresolvers import reverse_lazy from django.conf import settings from rest_framework import serializers from rest_flex_fields import FlexFieldsModelSerializer from rest_flex_fields.serializers import FlexFieldsSerializerMixin from easy...
hzlf/openbroadcast.org
website/apps/alibrary/apiv2/serializers.py
Python
gpl-3.0
9,901
from ImportDependence import * from CustomClass import * class CIA(AppForm): useddf=pd.DataFrame() Lines = [] Tags = [] description = 'Chemical Index of Alteration' unuseful = ['Name', 'Mineral', 'Author', 'DataType', 'Label', ...
chinageology/GeoPython
geopytool/CIA.py
Python
gpl-3.0
10,636
# Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file import os import email import tempfile import re from email.header import Header import email.charset as charset charset.add_charset('u...
a-sk/alot
alot/db/utils.py
Python
gpl-3.0
15,380
import os #for OS program calls import sys #For Clean sys.exit command import time #for sleep/pause import RPi.GPIO as io #read the GPIO pins io.setmode(io.BCM) pir_pin = 17 screen_saver = False io.setup(pir_pin, io.IN) while True: if screen_saver: if io.input(pir_pin): os.system("xscreensaver-command -dea...
benekex2/smart_mirror
motiondetect.py
Python
gpl-3.0
449
# Copyright (c) 2011 - Rui Batista <ruiandrebatista@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 Software Foundation, either version 3 of the License, or # (at your option) any later vers...
ragb/sudoaudio
sudoaudio/core.py
Python
gpl-3.0
2,629
#!/usr/bin/python # -*- coding: utf-8 -*- """ Code128 Barcode Detection & Analysis (c) Charles Shiflett 2011 Finds Code128 barcodes in documents scanned in Grayscale at 300 dpi. Usage: Each page of the PDF must be converted to a grayscale PNG image, and should be ordered as follows: 1001/1001-...
cbears/octoform
ocr/findBarcode.py
Python
gpl-3.0
15,096
#!/usr/bin/env python # Copyright 2014 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ This file emits the list of reasons why a particular build needs to be clobbered (or a list of 'landmines'). """ import sys de...
geminy/aidear
oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/v8/gypfiles/get_landmines.py
Python
gpl-3.0
1,128
# -*- coding: utf-8 -*- # Copyright (C) 2010-2017 Samuele Carcagno <sam.carcagno@gmail.com> # This file is part of pysoundanalyser # pysoundanalyser 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...
sam81/pysoundanalyser
pysoundanalyser/dialog_apply_filter.py
Python
gpl-3.0
11,571
''' Copyright (C) 2016 Bastille Networks 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 distribut...
BastilleResearch/gr-nordic
python/build_utils_codes.py
Python
gpl-3.0
1,289
import pygame sprite = {} sprite['image'] = pygame.image.load("test/font6x8_normal_w.png") sprite['width'] = 6 sprite['height'] = 8 def Addr(): return sprite
lamestation/LEAM
media/gfx_font6x8.py
Python
gpl-3.0
165
from __future__ import division, print_function import json from collections import Iterable, OrderedDict, namedtuple import numpy as np from six import string_types def isnamedtuple(obj): """Heuristic check if an object is a namedtuple.""" return isinstance(obj, tuple) \ and hasattr(obj, "_field...
chemlab/chemlab
chemlab/core/serialization.py
Python
gpl-3.0
2,379
"""Provides compatibility with first-generation host delegation options in ansible-test.""" from __future__ import annotations import argparse import dataclasses import enum import os import types import typing as t from ..constants import ( CONTROLLER_PYTHON_VERSIONS, SUPPORTED_PYTHON_VERSIONS, ) from ..uti...
abadger/ansible
test/lib/ansible_test/_internal/cli/compat.py
Python
gpl-3.0
22,147
# This file is part of PlexPy. # # PlexPy 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. # # PlexPy is distributed in the hope t...
Hellowlol/plexpy
plexpy/datafactory.py
Python
gpl-3.0
57,912
from apps.plus_permissions.default_agents import get_admin_user from apps.plus_permissions.models import GenericReference def patch(): for ref in GenericReference.objects.filter(creator=None): ref.creator = get_admin_user() ref.save() patch()
thehub/hubplus
scripts/patch_ref_creator_field.py
Python
gpl-3.0
267
import os import cv2 import sys import math import time import json import argparse import numpy as np from ownLibraries.pathsandnames import PathsAndNames debug = False nuevaLocalizacion = '' # We get the current working git branch gitBranches = os.popen('git branch').read().replace(' ','').split('\n') gitVersion = [...
AlvaroRQ/prototipo
install.py
Python
gpl-3.0
14,799
# You have been given an array A consisting of N integers. All the elements in this array A are unique. You have to # answer some queries based on the elements of this array. Each query will consist of a single integer x. You need to # print the rank based position of this element in this array considering that the arr...
OmkarPathak/Python-Programs
CompetitiveProgramming/HackerEarth/Algorithms/Searching/P06_RankIt.py
Python
gpl-3.0
1,665
# Copyright 2015 Diamond Light Source Ltd. # # 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 law or agreed t...
FedeMPouzols/Savu
savu/data/data_structures/data_notes.py
Python
gpl-3.0
7,157
import os import inspect import sys class BlockStore: def __init__(self, input_file, block_size, output_dir): self.input_file = input_file self.block_size = block_size file_size = os.stat(input_file).st_size print 'file_size: %d' % file_size #Should handle this later on. ...
spapageo0x01/dioskrS
layer_block.py
Python
gpl-3.0
1,354
"""geonature samples Revision ID: 3d0bf4ee67d1 Create Date: 2021-09-27 18:00:45.818766 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '3d0bf4ee67d1' down_revision = None branch_labels = ('geonature-samples',) depends_on = ( 'geonature', ) def upgrade(): ...
PnX-SI/GeoNature
backend/geonature/migrations/versions/3d0bf4ee67d1_geonature_samples.py
Python
gpl-3.0
923
''' Created on Dec 5, 2016 @author: paveenju ''' import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib2tikz.save as tikz_save import utils.functions as fn if __name__ == '__main__': pass def axes(): plt.axhline(0, alpha=.1) plt.axvline(0, alpha=.1...
paveenju/mlat-sim
main/figure2_2a.py
Python
gpl-3.0
1,441
#---------------------------------------------------------------------- # Copyright 2012, 2013 Arndt Droullier, Nive GmbH. All rights reserved. # # 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, ...
nive-cms/nive
nive/userdb/userview/view.py
Python
gpl-3.0
11,106
# Copyright (c) 2014-2017 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...
gnumdk/lollypop
lollypop/touch_helper.py
Python
gpl-3.0
3,548
from genesis2.core.core import Plugin, implements from genesis2.interfaces.gui import IMeter class BaseMeter (Plugin): """ Meters are determinable values (int, float, bool) representing system status (sysload, memory usage, service status, etc.) which are used and exported over HTTP by ``health`` buil...
kudrom/genesis2
genesis2/plugins/health/providers.py
Python
gpl-3.0
2,769
from GangaCore.GPIDev.Schema import * from GangaCore.GPIDev.Lib.Tasks.common import * from GangaCore.GPIDev.Lib.Tasks.ITransform import ITransform from GangaCore.GPIDev.Lib.Job.Job import JobError from GangaCore.GPIDev.Lib.Registry.JobRegistry import JobRegistrySlice, JobRegistrySliceProxy from GangaCore.Core.exception...
ganga-devs/ganga
ganga/GangaND280/Tasks/ND280Transform_CSVEvtList.py
Python
gpl-3.0
4,112
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import codecs import csv import fnmatch import inspect import locale import os import openerp.sql_db as sql_db import re import logging import tarfile import tempfile import threading from babel.messages import extract f...
AyoubZahid/odoo
openerp/tools/translate.py
Python
gpl-3.0
48,927
# -*- coding: utf-8 -*- # This file is part of Gtfslib-python. # # Gtfslib-python 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...
afimb/gtfslib-python
test/test_prettyprint.py
Python
gpl-3.0
3,131
#!/usr/bin/python # This file is part of pulseaudio-dlna. # pulseaudio-dlna 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. # pulsea...
leonhandreke/pulseaudio-dlna
pulseaudio_dlna/listener.py
Python
gpl-3.0
2,974
from django.test import TestCase as DjangoTestCase from django.conf import settings from seeder.models import * from seeder.posters import TwitterPoster from random import randint as random from datetime import datetime import time import mox import re def generate_random_authorized_account(): u = User(username = ...
tswicegood/seeder
seeder/tests.py
Python
gpl-3.0
11,995
#!coding: utf-8 """ Usage: main.py <host> <username> <password> [-r] [--port=<port>] [--hub=<hub>] [--pppoe-username=<username>] [--pppoe-password=<password>] [--output=<output>] Options: -h --help Show help -r Change route to make connect to Packetix Server alwa...
zhongpei/softether-client
endpoints/main.py
Python
gpl-3.0
6,782
from PyQt5.QtCore import Qt from ouf.filemodel.filemodelitem import FileModelItem, FileItemType class FileSystemItem(FileModelItem): def __init__(self, path): super().__init__(FileItemType.filesystem, path) def data(self, column, role=Qt.DisplayRole): if column == 0: if role == ...
cbrunet/ouf
src/ouf/filemodel/filesystemitem.py
Python
gpl-3.0
455
#!/usr/bin/env python2 # -*- coding: utf-8 -*- ################################################## # GNU Radio Python Flow Graph # Title: Top Block # Generated: Tue Dec 27 19:28:14 2016 ################################################## if __name__ == '__main__': import ctypes import sys if sys.platform.sta...
james-tate/gnuradio_projects
ettus_lab/lab1/top_block.py
Python
gpl-3.0
3,795
import random from os.path import join, dirname import numpy as np from sklearn.base import ClassifierMixin, BaseEstimator import fasttext as ft from underthesea.util.file_io import write import os from underthesea.util.singleton import Singleton class FastTextClassifier(ClassifierMixin, BaseEstimator): def __i...
rain1024/underthesea
underthesea/classification/model_fasttext.py
Python
gpl-3.0
2,185
# -*- coding: utf-8 -*- """ /*************************************************************************** PisteCreatorDockWidget_OptionDock Option dock for Qgis plugins Option dock initialize ------------------- begin : 2017-07-25 ...
SebastienPeillet/PisteCreator
gui/option_Dock.py
Python
gpl-3.0
8,879
# COPYRIGHT: Robosub Club of the Palouse under the GPL v3 import argparse import time import os import sys from copy import deepcopy from random import random sys.path.append(os.path.abspath("../..")) from util.communication.grapevine import Communicator # TODO: This module should take the fuzzy sets produced by # mo...
pi19404/robosub-1
src/movement/physical/fuzzy_logic_defuzzifier.py
Python
gpl-3.0
1,604
# coding:utf8 """ 无法从上层目录进行导入操作 """ class UnableTest(object): pass
unlessbamboo/grocery-shop
language/python/src/package/abs_import/unable/unable_module.py
Python
gpl-3.0
104
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/Users/chernomirdinmacuvele/Documents/workspace/PscArt2.0.X/UserInt/ui_codificadores_POT.ui' # # Created by: PyQt5 UI code generator 5.8.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets ...
InUrSys/PescArt2.0
GeneratedFiles/ui_codificadores_POT.py
Python
gpl-3.0
3,813
from __future__ import unicode_literals from zipfile import ZipFile import decimal import datetime from xml.dom.minidom import parseString from . import ods_components from .formula import Formula # Basic compatibility setup for Python 2 and Python 3. try: long except NameError: long = int try: unicode ...
jeremyk6/qgeric
odswriter/__init__.py
Python
gpl-3.0
6,498
# -*- coding: utf-8 -*- """ Created on Fri Jun 09 10:36:56 2017 @author: Nzix """ import urllib,urllib2,re,datetime,time,random,xlrd,xlwt,os cookie = "" def ticketcheck(membercode,serial_code_1,serial_code_2): timeout = 3 global cookie if type(membercode) is int: membercode = str(memberco...
nondanee/sousenkyo-auto
2017/formatscript.py
Python
gpl-3.0
7,489
# -*- coding: utf-8 -*- # # testgdt documentation build configuration file, created by # sphinx-quickstart on Sun Feb 12 17:11:03 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...
UCL-CERU/CESMapper
CESMapper/conf.py
Python
gpl-3.0
7,012
# -*- coding: utf-8 -*- """PEP 440 verschemes tests""" import unittest from verschemes.pep440 import Pep440Version class Pep440VersionTestCase(unittest.TestCase): def test_one_segment(self): version = Pep440Version(release1=4) self.assertEqual("4", str(version)) self.assertEqual(0, vers...
gnuworldman/verschemes
tests/test_pep440.py
Python
gpl-3.0
12,943
import sys from mercurial import hg, node, ui def main(): """print (possibly remote) heads Prints a series of lines consisting of hashes and branch names. Specify a local or remote repository, defaulting to the configured remote. """ repo = sys.argv[1] other = hg.peer(ui.ui(), {}, re...
kfirprods/tpp
python/hg-rheads.py
Python
gpl-3.0
482
import lorun import os import codecs import random import subprocess import config import sys RESULT_MAP = [ 2, 10, 5, 4, 3, 6, 11, 7, 12 ] class Runner: def __init__(self): return def compile(self, judger, srcPath, outPath): cmd = config.langCompile[judger.lang] % {'root': sys.path[0], '...
SkyZH/CloudOJWatcher
ojrunnerlinux.py
Python
gpl-3.0
1,643
import os import traceback import json import requests from flask import Flask, request from cities_list import CITIES from messages import get_message, search_keyword token = os.environ.get('FB_ACCESS_TOKEN') api_key = os.environ.get('WEATHER_API_KEY') app = Flask(__name__) def location_quick_reply(sender, text=N...
beckenkamp/weatherbot
index.py
Python
gpl-3.0
7,204
# -*- coding: utf-8 -*- """ This file is part of coffeedatabase. coffeedatabase 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 versi...
simonreich/coffeedatabase
lib/ckeyboard.py
Python
gpl-3.0
17,891
""" BORIS Behavioral Observation Research Interactive Software Copyright 2012-2022 Olivier Friard 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 ...
olivierfriard/BORIS
boris/behavior_binary_table.py
Python
gpl-3.0
12,397
from builtins import str from builtins import object import httplib2 import MySQLdb import json import os import sys import time import config from apiclient.discovery import build from oauth2client.file import Storage from oauth2client.client import OAuth2WebServerFlow from oauth2client.tools import run class Erro...
Spoken-tutorial/spoken-website
cron/upload-subtitle.py
Python
gpl-3.0
7,439
#!/usr/bin/env python # File created on 15 Jul 2011 from __future__ import division __author__ = "Jesse Zaneveld" __copyright__ = "Copyright 2011-2013, The PICRUSt Project" __credits__ = ["Jesse Zaneveld","Morgan Langille"] __license__ = "GPL" __version__ = "1.0.0-dev" __maintainer__ = "Jesse Zaneveld" __email__ = "za...
wasade/picrust
picrust/format_tree_and_trait_table.py
Python
gpl-3.0
28,426
# -*- coding: utf-8 -*- # # python-gnupg documentation build configuration file, created by # sphinx-quickstart on Fri Apr 5 22:38:47 2013. # # 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. # ...
isislovecruft/python-gnupg
docs/conf.py
Python
gpl-3.0
10,098
import cv2 import numpy as np import os from vilay.core.Descriptor import MediaTime, Shape from vilay.detectors.IDetector import IDetector from vilay.core.DescriptionScheme import DescriptionScheme class FaceDetector(IDetector): def getName(self): return "Face Detector" def initialize(self):...
dakot/vilay-detect
vilay/detectors/FaceDetector.py
Python
gpl-3.0
1,782
#!/usr/bin/python ########################################################################## RAD4SNPs:############################################################################## # A set of Python scripts to select and validate independent SNPs markers from a list of read files # #################################...
glassalle/Rad4Snps
RAD4SNPs_Main.py
Python
gpl-3.0
12,997
# -*- coding: utf-8 -*- # Copyright 2010-2012 Kolab Systems AG (http://www.kolabsys.com) # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.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 ...
detrout/pykolab
pykolab/cli/cmd_user_info.py
Python
gpl-3.0
1,532
import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/ # SECURITY WARNING: keep the...
gvizquel/comunidad
comunidad/settings.py
Python
gpl-3.0
4,931
# -*- coding: utf-8 -*- from __future__ import (unicode_literals, absolute_import, print_function, division) from copy import deepcopy from itertools import combinations class Cell: def __init__(self): self.value = 0 self.row = set() self.col = set() self.sq = set() self....
albatros69/Divers
sudoku.py
Python
gpl-3.0
11,551
#!/usr/bin/env python import os import sys import glob import argparse from datetime import datetime import platform if platform.system().lower() == 'darwin': os.environ['PYTHONPATH'] = '%s/osx_libs:$PYTHONPATH' % os.getcwd() import wormtable as wt ###########################################################...
BSGOxford/BrowseVCF
web/scripts/script07_use_gene_list.py
Python
gpl-3.0
8,403
"""All things that are specifically related to adinebook website""" from collections import defaultdict from logging import getLogger from typing import Optional from langid import classify from regex import compile as regex_compile from requests import RequestException from mechanicalsoup import StatefulBrowser fro...
5j9/yadkard
lib/ketabir.py
Python
gpl-3.0
3,580
import struct import re from .core import NamedItemList from copy import deepcopy _SINGLE_MEMBER_REGEX = re.compile(r"^[@=<>!]?([0-9]*)([xcbB\?hHiIlLqQnNefdspP])$") def __isSingleMemberFormatString(format): return bool(_SINGLE_MEMBER_REGEX.match(format)) def formatStringForMembers(members): formatString = "" for...
x6herbius/afterburner
tools/bsp/libbsp/structutils.py
Python
gpl-3.0
11,421
#!/usr/bin/env 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 ...
davidam/python-examples
rdflib/rdflib-example.py
Python
gpl-3.0
1,020
#!/usr/bin/env python """compares BSR values between two groups in a BSR matrix Numpy and BioPython need to be installed. Python version must be at least 2.7 to use collections""" from optparse import OptionParser import subprocess from ls_bsr.util import prune_matrix from ls_bsr.util import compare_values from ls_b...
jasonsahl/LS-BSR
tools/compare_BSR.py
Python
gpl-3.0
3,059
# -*- coding: utf-8 -*- # # Copyright (C) 2014-2015 Bitergia # # 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 ...
pombredanne/sortinghat
sortinghat/matching/__init__.py
Python
gpl-3.0
1,244
""" dwm package setup """ from __future__ import print_function from setuptools import setup, find_packages __version__ = '1.1.0' def readme(): """ open readme for long_description """ try: with open('README.md') as fle: return fle.read() except IOError: return '' setup(...
rh-marketingops/dwm
setup.py
Python
gpl-3.0
1,421
#!/usr/bin/env python # # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import gr, gr_unittest, blocks import math def sig_source_f(samp_rate, freq, amp, N): t = [float(x) / samp_rate for x in range(N)] y = [am...
trabucayre/gnuradio
gr-blocks/python/blocks/qa_vco.py
Python
gpl-3.0
1,819
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-01-13 06:00 from __future__ import unicode_literals import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('MergeServer', '0001_initial'), ] operations = [ migrations.A...
zeqing-guo/SPAKeyManager
MergeServer/migrations/0002_auto_20160113_0600.py
Python
gpl-3.0
480
from django.core.urlresolvers import reverse import django.http import django.utils.simplejson as json import functools def make_url(request, reversible): return request.build_absolute_uri(reverse(reversible)) def json_output(func): @functools.wraps(func) def wrapper(*args, **kwargs): output = ...
ukch/online_sabacc
src/sabacc/api/viewhelpers.py
Python
gpl-3.0
494
# coding: utf-8 import re import os import ast import luigi import psycopg2 import boto3 import random import sqlalchemy import tempfile import glob import datetime import subprocess import pandas as pn from luigi import six from os.path import join, dirname from luigi import configuration from luigi.s3 import S3Targe...
rsanchezavalos/compranet
compranet/pipelines/models/model_orchestra.py
Python
gpl-3.0
2,147
import numpy as np from definition import states_by_id import pyproj as prj class Route: """ A class of Breeding Bird Survey (BBS) route Each Route includes the following members: id - id number of the route name - name of the route stateID - to which state the route belong...
piw/pyCDL
pyCDL/route.py
Python
gpl-3.0
9,010
from . import sqldb class aminoAcid(): def __init__(self,abbr1,abbr3,name): self.abbr3 = abbr3 self.abbr1 = abbr1 self.name = name def __str__(self): return self.name def __repr__(self): return self.name def getOne(self): return self.abbr1 def getThree...
StephDC/MiniBioKit
bioChemData/protein.py
Python
gpl-3.0
1,344
# Copyright © 2020, Joseph Berry, Rico Tabor (opendrop.dev@gmail.com) # OpenDrop is released under the GNU GPL License. You are free to # modify and distribute the code, but always under the same license # # If you use this software in your research, please cite the following # journal articles: # # J. D. Berry, M. J. ...
jdber1/opendrop
opendrop/app/common/image_processing/plugins/define_line/component.py
Python
gpl-3.0
7,694
# -*- coding: utf-8 -*- # Copyright (C) 2007 Osmo Salomaa # # 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 pr...
otsaloma/gaupol
gaupol/actions/__init__.py
Python
gpl-3.0
1,223
from . import _plotting_mess data = _plotting_mess.complex_data databoxes = _plotting_mess.complex_databoxes files = _plotting_mess.complex_files function = _plotting_mess.complex_function
Spinmob/spinmob
_plot_complex.py
Python
gpl-3.0
207
# Copyright 2009-2011 Klas Lindberg <klas.lindberg@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 Software Foundation. import sys import struct import socket import json import math from ta...
Mysingen/dwite
protocol.py
Python
gpl-3.0
30,893
# This file is part of Boomer Core. # # Boomer 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 version. # # Boomer Core is distributed in t...
clusterfudge/boomer
boomer/filesystem/__init__.py
Python
gpl-3.0
1,932
import os from common_helper_files import get_dir_of_file from pluginbase import PluginBase import logging class FilterSystem(): FILTER_TYPE = None def __init__(self, selected_filters): self._init_plugins() if selected_filters == 'all': self._set_all_filters() else: ...
weidenba/recovery_sort
filter_system/base.py
Python
gpl-3.0
1,565
#!/bin/env python # -*- coding: utf-8; -*- # # (c) 2016 FABtotum, http://www.fabtotum.com # # This file is part of FABUI. # # FABUI 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 Licen...
infinity0n3/fabtotum-experiments
fabtotum/fabui/database.py
Python
gpl-3.0
825
#!/usr/bin/env python from __future__ import division import numpy as np import pylab def PCA(Z, verbose = 0): """ PCA Mc Vean style ...
sapfo/medeas
src/old_scripts/python_pca.py
Python
gpl-3.0
3,142
""" Created on 11.09.2014 @author: benjamin@boerngen-schmidt.de """ from abc import ABCMeta, abstractmethod import random import datetime class BaseCar(metaclass=ABCMeta): """ Represents the fundamentals of a car """ def __init__(self, env, tank_size): """ Constructor :type ta...
boerngen-schmidt/commuter-simulation
code/simulation/car.py
Python
gpl-3.0
5,072
## Copyright 2009 Luc Saffre ## This file is part of the Lino project. ## Lino 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. ## L...
MaxTyutyunnikov/lino
lino/utils/requests.py
Python
gpl-3.0
1,997
import AI.pad import AI.state class Character: def __init__(self, pad_path): self.action_list = [] self.last_action = 0 self.pad = AI.pad.Pad(pad_path) self.state = AI.state.State() #Set False to enable character selection self.test_mode = True self.sm = AI....
alex-zoltowski/SSBM-AI
AI/Characters/character.py
Python
gpl-3.0
5,818
# coding = utf-8 """ 3.8 将 KMeans 用于离群点检测 http://git.oschina.net/wizardforcel/sklearn-cb/blob/master/3.md """ # 生成 100 个点的单个数据块,然后识别 5 个离形心最远的点 import numpy as np from sklearn.datasets import make_blobs from sklearn.cluster import KMeans (x, labels) = make_blobs(100, centers=1) kms = KMeans(n_clusters=1) kms.fit(x) # ...
Ginkgo-Biloba/Misc-Python
sklearn/SKLearn3KMOutlier.py
Python
gpl-3.0
1,135
import sys sys.path = ['.'] + sys.path from test.test_support import verbose, run_unittest import re from re import Scanner import sys, os, traceback from weakref import proxy # Misc tests from Tim Peters' re.doc # WARNING: Don't change details in these tests if you don't know # what you're doing. Some of these test...
mancoast/CPythonPyc_test
crash/265_test_re.py
Python
gpl-3.0
37,806
#!/usr/bin/env python3 # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2020-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
qutebrowser/qutebrowser
scripts/opengl_info.py
Python
gpl-3.0
1,537
#!/usr/bin/env python from __future__ import print_function import os import cgi from subprocess import Popen, PIPE, STDOUT # Java SCRIPTDIR = 'javaprolog' # SCRIPT = ['/usr/bin/java', '-cp', 'json-simple-1.1.1.jar:gnuprologjava-0.2.6.jar:.', 'Shrdlite'] import platform if platform.system()=='Windows': SCRIPT =...
cthGoman/shrdlite
cgi-bin/ajaxwrapper.py
Python
gpl-3.0
1,269
#! /usr/bin/python # -*- coding: utf-8 -*- """ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Title: logger Author: David Leclerc Version: 0.1 Date: 13.04.2018 License: GNU General Public License, Version 3 (http://www.gnu.org/licenses...
mm22dl/MeinKPS
logger.py
Python
gpl-3.0
3,955
#!/usr/bin/env python import re, logging, copy from threading import Lock class Tagger(object): def __init__(self, hosts_attr="fields.hosts", hosts_sep=":", tag_file="tags_jobs.safe"): self.tags_by_host = {} self.hosts_sep = str(hosts_sep) self.hosts_attr = str(hosts_attr) self.ta...
RRZE-HPC/LMS
midware/influxdbrouter/influxdbrouter/tagstore.py
Python
gpl-3.0
2,579