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
#!/usr/bin/env python # SerialGrabber reads data from a serial port and processes it with the # configured processor. # Copyright (C) 2012 NigelB # # 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 Foundatio...
nigelb/SerialGrabber
examples/ThingSpeak/ThingSpeakTransformer.py
Python
gpl-2.0
2,101
# Copyright 2004-2006 Daniel Henninger <jadestorm@nc.rr.com> # Licensed for distribution under the GPL version 2, check COPYING for details from twisted.python import log import sys, time import config def observer(eventDict): try: observer2(eventDict) except Exception, e: printf("CRITICAL: Traceback in debug....
shizeeg/pyicqt
src/debug.py
Python
gpl-2.0
3,058
00000 0 output/setDirected.py.err 13678 1 output/setDirected.py.out
Conedy/Conedy
testing/network/expected/sum_setDirected.py
Python
gpl-2.0
76
#!/usr/bin/python # -*- coding: utf-8 -*- ################################################################### # # Company: Squeeze Studio Animation # # Author: Danilo Pinheiro # Date: 2014-02-10 # Updated: 2014-02-24 # # sqStickyLipsSetup.py # # This script will create a Sticky Lips setup. # ########...
SqueezeStudioAnimation/dpAutoRigSystem
dpAutoRigSystem/Extras/sqStickyLipsSetup.py
Python
gpl-2.0
20,524
#!/usr/bin/env python import random from itertools import izip as zip, count PHONES = ['AA0', 'AA1', 'AA2', 'AE0', 'AE1', 'AE2', 'AH0', 'AH1', 'AH2', 'AO0', 'AO1', 'AO2', 'AW0', 'AW1', 'AW2', 'AY0', 'AY1', 'AY2', 'EH0', 'EH1', 'EH2', 'ER0', 'ER1', 'ER2', 'EY0', 'EY1', 'EY2', 'IH0', 'IH1', 'IH2', 'IY0', 'IY1', 'I...
JacksonBates/rhymer
rhyme.py
Python
gpl-2.0
2,132
import unittest from gourmet.importers import importer class TestImporter (unittest.TestCase): def setUp (self): self.i = importer.Importer() def _get_last_rec_ (self): return self.i.added_recs[-1] def testRecImport (self): self.i.start_rec() attrs = [('title','Foo'),('...
kirienko/gourmet
tests/test_importer.py
Python
gpl-2.0
1,162
# encoding: utf-8 # module PyQt4.QtGui # from /usr/lib/python3/dist-packages/PyQt4/QtGui.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore from .QGraphicsLayoutItem import QGraphicsLayoutItem class QGraphicsLayout(QGraphicsLayoutItem): """ QGraphicsLay...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247971765/PyQt4/QtGui/QGraphicsLayout.py
Python
gpl-2.0
2,337
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 nu from __future__ import (unicode_literals, absolute_import, division, print_function) from rtfw.PropertySets import (AttributedList, Colours, Fonts, Papers, MarginsPS, ShadingPS,...
yeleman/rtfw
rtfw/__init__.py
Python
gpl-2.0
1,181
import numpy as np import matplotlib.pylab as plt datos = np.loadtxt( "C_HaloVoid_FOF-Tweb.dat" ) Nneigh = 5 for i in xrange(Nneigh): plt.hist( datos[:,i*5], range=(0,50), bins=500, normed=True, alpha=0.5 ) print( "Percent of halos without %d-th neighbour = %1.2f"%(i+1,(datos[:,i*5]>150).sum()/(1.0*len(datos...
sbustamante/Distance2Void
checker.py
Python
gpl-2.0
340
import os import sys sys.path.append( '../' ) from PyRTF import * def MakeExample1() : doc = Document() ss = doc.StyleSheet section = Section() doc.Sections.append( section ) # text can be added directly to the section # a paragraph object is create as needed section.append( 'Image Example 1' ) sec...
lambdamusic/testproject
konproj/libs/PyRTF/examples/examples2.py
Python
gpl-2.0
1,338
## # Copyright 2009-2016 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
hpcleuven/easybuild-easyblocks
easybuild/easyblocks/o/openfoam.py
Python
gpl-2.0
18,326
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------- # Plugin for FILMAFFINITY support # ----------------------------------------------------------------------- # $Id$ # Version: 080607_01 # # Notes: FilmAffinity plugin. You can add FilmAffinity.com informations for video it...
freevo/freevo1
src/video/plugins/filmaffinity.py
Python
gpl-2.0
23,935
# -*- coding: utf-8 -*- from ...analysis.parameters.glucose_dose import GlucoseGramsDose from ...analysis.parameters.carb_dose import CarbsDoses class ParametersGathering(object): """ Recopila objetos que extraen parámetros """ def __init__(self, context, basic_gathering): pass #self....
koyadovic/Dia
predictive/systems/statistical/analysis/bundles/parameters.py
Python
gpl-2.0
592
#!/usr/bin/env python # # $File: genoStru.py $ # # This file is part of simuPOP, a forward-time population genetics # simulation environment. Please visit http://simupop.sourceforge.net # for details. # # Copyright (C) 2004 - 2010 Bo Peng (bpeng@mdanderson.org) # # This program is free software: you can redistribute i...
BoPeng/simuPOP
docs/genoStru.py
Python
gpl-2.0
1,769
# Common dialog code. # # Copyright (C) 2007, 2008 Red Hat, Inc. All rights reserved. # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it ...
ystk/debian-audit
system-config-audit/src/dialog_base.py
Python
gpl-2.0
5,208
#!/usr/bin/env python # -*- coding: utf-8 -*- ilk_sayisal_deger = 10 ilk_ondalikli_deger = 3.14 ilk_mantiksal_deger = True print ilk_sayisal_deger
ozgebarbaros/ab2015PythonKurs
1.gun/1.ilk_program/verilen_ilk_deger.py
Python
gpl-2.0
147
import numpy as np from .fingerprint import Fingerprint class RelativeLocationFingerprint(Fingerprint): def trans_func_(self, row): values = row max_value = max(values) features = [] for i in range(0, len(values)): for j in range(0, len(values)): if i ...
rloliveirajr/sklearn_transformers
trans4mers/feature_extraction/relative_location_fingerprint.py
Python
gpl-2.0
463
from . import minic_ast class PrettyGenerator(object): def __init__(self): # Statements start with indentation of self.indent_level spaces, using # the _make_indent method # self.indent_level = 0 def _make_indent(self): return ' ' * self.indent_level def visit(sel...
martylee/Python
CSC410-Project-1-master/minic/pretty_minic.py
Python
gpl-2.0
658
# -*- coding: utf-8 -*- # # # TheVirtualBrain-Framework Package. This package holds all Data Management, and # Web-UI helpful to run brain-simulations. To use it, you also need do download # TheVirtualBrain-Scientific Package (for simulators). See content of the # documentation-folder for more details. See also http:/...
rajul/tvb-framework
tvb/core/services/texture_to_json.py
Python
gpl-2.0
2,352
#!/usr/bin/python """ pyNEAT Copyright (C) 2007-2008 Brian Greer 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...
liquidkarma/pyneat
examples/xor/xor_neat.py
Python
gpl-2.0
1,835
# screensaverpause - pauses Exaile playback on screensaver activation # Copyright (C) 2009-2011 Johannes Sasongko <sasongko@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 v...
eri-trabiccolo/exaile
plugins/screensaverpause/__init__.py
Python
gpl-2.0
3,410
#!/usr/bin/python # -*- coding: utf-8 -*- import MySQLdb from datetime import * #Creador de una matriz vacia def Matriz_vacia(filas, columnas): A = [] for i in range(0,filas): A.append([0]*columnas) return A #Muestra la informacion del reparto de la actividad temporal del autor elegido def acti...
ccervigon/codigo_pfc
otros_scripts/author_clasif.py
Python
gpl-2.0
2,056
""" Python Archive Reader 1.0 https://github.com/PastebinArchiveReader/PAR """ import requests from bs4 import BeautifulSoup import urllib import argparse import time # add parsing functionality to provide files parser = argparse.ArgumentParser(description="Script to download pastebin.com archives", ...
PastebinArchiveReader/PAR
PAR.py
Python
gpl-2.0
1,869
from typing import Any from binary_tree import BinaryTree, BinaryTreeNode class AvlTree(BinaryTree): def __init__(self, value): super(AvlTree, self).__init__(value) self.height = 1 def _left_rotate(self, node: BinaryTreeNode) -> BinaryTreeNode: """ Rotate node left :...
jidol/Examples
src/avl_tree.py
Python
gpl-2.0
5,481
from phantom_team.strategy.formation import positions from smsoccer.strategy import formation from superman import SuperMan from smsoccer.players.abstractplayer import AbstractPlayer from smsoccer.strategy.formation import player_position from smsoccer.world.world_model import WorldModel, PlayModes class AtackAgent(A...
dsaldana/phantoms_soccer2d
phantom_team/players/atack_agent.py
Python
gpl-2.0
4,311
import re from xcsoar.mapgen.waypoints.waypoint import Waypoint from xcsoar.mapgen.waypoints.list import WaypointList def __parse_line(line, bounds = None): if line.startswith('$'): return None lat = line[45:52] lat_neg = lat.startswith('S') lat = float(lat[1:3]) + float(lat[3:5]) / 60. + float...
TobiasLohner/mapgen
lib/xcsoar/mapgen/waypoints/welt2000_reader.py
Python
gpl-2.0
4,373
import praw r = praw.Reddit(user_agent='kumaX') #r.login('kumaX','Sho3lick') submissions = r.get_subreddit('worldnews').get_top() print [str(x) for x in submissions]
fro391/Investing
PRAW/Praw.py
Python
gpl-2.0
168
from rest_framework import serializers, fields from . import models class TypeSerializer(serializers.ModelSerializer): class Meta: model = models.Type class IssueSerializer(serializers.ModelSerializer): class Meta: model = models.Issue address = fields.CharField(read_only=True) pos...
initios/hackvg-cityreport-backend
core/serializers.py
Python
gpl-2.0
798
# -*- python-indent: 4; coding: iso-8859-1; mode: python -*- # Copyright (C) 2008 Cedric Pinson, Jeremy Moles # # 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, o...
sketchfab/osgexport
blender-2.5/exporter/osg/osgobject.py
Python
gpl-2.0
48,200
# Valid-IP-checker- #This program check whether a given IP is valid or not IPV4 def ip_checkv4(ip): parts=ip.split(".") if len(parts)<4 or len(parts)>4: return "invalid IP length should be 4 not greater or less than 4" else: while len(parts)== 4: a=int(parts[0]) b=int(parts[1]) c=int(parts[2]) d=int(...
0101a/Valid-IP-checker-
Ipv4.py
Python
gpl-2.0
918
""" A hierarchical Bayesian approach to linear regression with error in both X and Y. """ from linmix import LinMix
martadesimone/Protoplanetarydisks
linmix/linmix/__init__.py
Python
gpl-2.0
117
from cell import Cell from twodarray import TwoDArray from time import sleep from configparser import config import random class Life(object): def __init__(self, height, width): self.area = TwoDArray(width, height) self.buffer_area = TwoDArray(width, height) self.rows = height self.cols = width for x in ra...
migglu/life
src/life.py
Python
gpl-2.0
2,013
# simplebuttons4.py # Button with a border... import sys sys.path.append("../..") from wax import * WaxConfig.default_font = ("Verdana", 9) class MainFrame(Frame): def Body(self): b = Button(self, "one") b.SetSize((80, 80)) self.AddComponent(b, expand='both', border=15) self.Pack...
MSMBA/msmba-workflow
msmba-workflow/srclib/wax/examples/simplebuttons4.py
Python
gpl-2.0
368
# -*- coding: utf-8 -*- from openerp import models, fields, api class RequisitosGarantia(models.Model): _name = 'solicitudes.requisitos_garantia' solicitudes_id = fields.Many2one('solicitudes.solicitudes', string="Número de expediente") documentos_garantia_id = fields.Many2one('politicas.documentos_garan...
sani-coop/tinjaca
addons/solicitudes/models/requisitos_garantia.py
Python
gpl-2.0
648
#!/usr/bin/env python # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8 # # MDAnalysis --- http://www.mdanalysis.org # Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the ...
alejob/mdanalysis
package/setup.py
Python
gpl-2.0
22,845
# -*- coding: utf-8 -*- import ctypes from cpylmnl.linux.netfilter import nfnetlinkh as nfnl from cpylmnl.linux.netfilter import nfnetlink_compath as nfnlcm try: from enum import Enum except ImportError: Enum = object # enum CONNTRACK = nfnl.NFNL_SUBSYS_CTNETLINK EXPECT = nfnl.NFNL_SUBSYS_CTNETLINK_EXP # Su...
chamaken/cpylmnfct
cpylmnfct/_libnetfilter_conntrackh.py
Python
gpl-2.0
13,117
from flask import Flask from flask.ext import restful from flask.ext.restful import Resource, reqparse from lxml import html import urllib2 import json app = Flask(__name__) api = restful.Api(app) parser = reqparse.RequestParser() parser.add_argument('url', type=str, location='form') parser.add_argument('xpath', ty...
sparkica/simex-service
service.py
Python
gpl-2.0
1,442
# coding:utf-8 ''' 8b d8 88 Y8, ,8P ,d 88 Y8, ,8P 88 88 "8aa8" ,adPPYba, 88 88 MM88MMM 88,dPPYba, `88' a8" "8a 88 88 88 88P' "8a 88 8b d8 88 88 88 88 88 88 "8...
YouthBread/CEVE-KB
kb.py
Python
gpl-2.0
26,992
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2011, 2013 CERN. ## ## Invenio 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 opt...
PXke/invenio
invenio/legacy/bibauthorid/templates.py
Python
gpl-2.0
91,185
# -*- coding: iso-8859-1 -*- # Copyright (C) 2006-2014 CEA/DEN, EDF R&D # # 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 option) any lat...
FedoraScientific/salome-yacs
src/salomeloader/salomeloader.py
Python
gpl-2.0
43,462
from provisioning.images_repository import ImagesRepository import uuid class Images(object): def __init__(self): self.images_repository = ImagesRepository() def get_all_images(self): return self.images_repository.get_all_images() def get_image(self, name): return self.images_repo...
janutechnology/VirtShell
virtshell_server/virtshell_server/provisioning/images.py
Python
gpl-2.0
676
## Nao functions version 1.41 ## change log: ## 1.02: Added class "Region" ## 1.02: Resolution stuff. ## 1.03: Detect() now returns an object of the class "Region()" ## 1.04: Added Aldebarans face detection NaoFaceLocation(). ## 1.05: Added the gesture() function and EyeLED() function. ## 1.06: Now able to look ...
Rctue/nao-lib
nao_temp.py
Python
gpl-2.0
64,405
""" Virtualization test utility functions. :copyright: 2008-2009 Red Hat Inc. """ import time import string import random import socket import os import signal import re import logging import commands import fcntl import sys import inspect import tarfile import shutil import getpass from autotest.client import utils,...
spcui/virt-test
virttest/utils_misc.py
Python
gpl-2.0
59,810
from django import forms from django.conf import settings from django.contrib.admin.widgets import AdminRadioSelect, AdminRadioFieldRenderer from edc_constants.constants import YES, NO from lab_requisition.forms import RequisitionFormMixin from microbiome.apps.mb.choices import STUDY_SITES from microbiome.apps.mb_inf...
botswana-harvard/microbiome
microbiome/apps/mb_lab/forms/infant_requisition_form.py
Python
gpl-2.0
3,819
from p1_support import load_level, show_level from math import sqrt from heapq import heappush, heappop import operator VERBOSE = False def debug(*args): if (VERBOSE): print ''.join([str(arg) for arg in args]) def dijkstras_shortest_path(src, dst, graph, adj): dist = {} prev = {} dist[src] = 0 prev[src] = Non...
jtsommers/dijkd
p1.py
Python
gpl-2.0
3,077
import addressbook_pb2 person = addressbook_pb2.Person() person.id = 1234 person.name = "John Doe" person.email = "jdoe@example.com" p1 = person.phones.add() p1.number = "555-5321" p2 = person.phones.add() p2.number = "555-5322" p2.type = addressbook_pb2.Person.WORK #print(person.IsInitialized()) #print(person) print(...
dilworm/pytest
protobuf/main.py
Python
gpl-2.0
380
# Key list dialog. # # Copyright (C) 2008 Red Hat, Inc. All rights reserved. # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it # will be...
ystk/debian-audit
system-config-audit/src/key_list_dialog.py
Python
gpl-2.0
5,086
import unittest from graph_theory.spfa import spfa class GraphTheoryTests(unittest.TestCase): def setUp(self): source = 0 num_nodes = 5 neighbour_list = [[1], # 0 [2], # 1 [3], # 2 [4, 1], # 3 ...
yu-peng/cdru
graph_theory/tests.py
Python
gpl-3.0
1,214
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-12-02 05:05 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True depe...
kull2222/DjangoSourceControl
dsc/djangosourcecontrol/migrations/0001_initial.py
Python
gpl-3.0
2,755
import numpy from .embedded_sequence import embed_seq def ap_entropy(X, M, R): """Computer approximate entropy (ApEN) of series X, specified by M and R. Suppose given time series is X = [x(1), x(2), ... , x(N)]. We first build embedding matrix Em, of dimension (N-M+1)-by-M, such that the i-th row of ...
jbergantine/pyeeg
pyeeg/approximate_entropy.py
Python
gpl-3.0
2,931
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import logging import timeit import unittest from haystack.mappings import folder from haystack.mappings.base import AMemoryMapping from haystack.mappings.base import MemoryHandler from haystack.mappings.file import LocalMemoryMapping...
trolldbois/python-haystack-reverse
test/haystack/reverse/test_pointerfinder.py
Python
gpl-3.0
12,279
''' Script to add period-of-record daily observations counts to the station observation netCDF file. ''' import os from twx.utils import TwxConfig, ymdL from twx.db import add_obs_cnt if __name__ == '__main__': twx_cfg = TwxConfig(os.getenv('TOPOWX_INI')) for elem in twx_cfg.obs_main_elems: ...
jaredwo/topowx
scripts/step05_calc_obs_cnts.py
Python
gpl-3.0
1,001
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/spacecat/AutonomousFlight/simulation/simulation_ws/install/include;/usr/include/eigen3".split(';') if "/home/spacecat/AutonomousFlight/simulation/simulation_ws/install/include;/usr/include/eigen3...
chickonice/AutonomousFlight
simulation/simulation_ws/build/rotors_simulator/rotors_control/catkin_generated/pkg.installspace.context.pc.py
Python
gpl-3.0
777
#!/usr/bin/python # -*- coding: utf-8 -*- # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. #...
jjshoe/ansible-modules-core
cloud/vmware/vsphere_guest.py
Python
gpl-3.0
65,239
# Encas Sales Management Server # Copyright 2013 - Hugo Caille # # This file is part of Encas. # # Encas is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (a...
hugoatease/encas
errors.py
Python
gpl-3.0
2,359
 # -*- coding: utf-8 -*- from django import forms from store.models import Achievement, AchievementLink, Upgrade class RedeemForm(forms.Form): code = forms.CharField(label='Bonus Code', min_length=Achievement.key_length(), max_length=Achievement.key_length()) class OrderForm(forms.Form): upgrade = forms.ModelCho...
dstelter/ctfstore
store/forms.py
Python
gpl-3.0
365
import pandas WEATHER_FNAME = 'weather.dat' FOOTBALL_FNAME = 'football.dat' def read_weather(fname=WEATHER_FNAME): """Read the weather file into a DataFrame and return it. Pandas has many input routines (all prefixed with "read") - http://pandas.pydata.org/pandas-docs/stable/io.html Examining t...
galtay/data_sci_ale
code_kata_04/kata_04.py
Python
gpl-3.0
2,540
import random class Livingbeing(): def __init__(self, name, health, armor, mindset, emotion, skills, inventory): self.name = name self.health = health self.armor = armor self.mindset = mindset self.emotion = emotion self.skills = skills self.inventory ...
MrZigler/UnderdogMilitia
charactors.py
Python
gpl-3.0
628
# Generated by Django 2.1.5 on 2019-10-01 19:43 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('comment', '0005_auto_20191001_1559'), ] operations = [ migrations.AlterField( model_name='dataset', name='dts_type',...
linea-it/dri
api/comment/migrations/0006_auto_20191001_1943.py
Python
gpl-3.0
596
# pylint: disable=missing-module-docstring, missing-class-docstring from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('hc_dpd', '0011_align_with_hc_20220301'), ] operations = [ migrations.AlterField( model_name='company', ...
studybuffalo/studybuffalo
study_buffalo/hc_dpd/migrations/0012_align_with_hc_20220301_2.py
Python
gpl-3.0
620
from scipy.stats import chi2_contingency import numpy as np obs = np.array([[10, 10, 20], [20, 20, 20]]) chi2_contingency(obs) g, p, dof, expctd = chi2_contingency(obs, lambda_="log-likelihood") g, p obs = np.array( [[[[12, 17], [11, 16]], [[11, 12], [15, 16]]], [[[23, 15], [30, 2...
davidam/python-examples
statistics/chi2contigency.py
Python
gpl-3.0
391
# Importing Modules from PyQt5 from PyQt5.QtWidgets import QSizePolicy, QPushButton, QFrame, QWidget, QStackedWidget from PyQt5.QtGui import QColor # Importing Modules from the App from Gui import Table, Plot, Funcs, Budget from Settings import StyleSheets as St def smallerNumber(number1, number2): if number1 < n...
95ellismle/FinancesApp2
Gui/App.py
Python
gpl-3.0
3,438
import os import imp from tinydb import TinyDB from paths import DB_DIR def scan_plugins_dir(plugins_dir='plugins'): """Scan the given dir for files matching the spec for plugin files""" for plugin_file in os.listdir(plugins_dir): plugin_path = os.path.join(plugins_dir, plugin_file) if (not pl...
sentriz/steely
steely/utils.py
Python
gpl-3.0
800
#!/usr/bin/env python import rospy from python_qt_binding.QtCore import Qt from python_qt_binding.QtGui import QHBoxLayout, QGroupBox, QTextEdit, QDoubleSpinBox, QColor # generic helper to generate quickly QDoubleSpinBox def generate_q_double_spin_box(default_val, range_min, range_max, decimals, single_step): sp...
TRECVT/vigir_footstep_planning_basics
vigir_footstep_planning_lib/src/vigir_footstep_planning_lib/qt_helper.py
Python
gpl-3.0
2,044
import asyncio from mandelbrot.transport import * class MockTransport(Transport): def mock_create_item(self, path, item): raise NotImplementedError() @asyncio.coroutine def create_item(self, path, item): return self.mock_create_item(path, item) def mock_replace_item(self, path, item...
msfrank/mandelbrot
test/mock_transport.py
Python
gpl-3.0
1,546
# encoding: utf-8 import ckan.plugins import ckanext.multilingual.plugin as mulilingual_plugin import ckan.lib.helpers import ckan.lib.create_test_data import ckan.logic.action.update import ckan.model as model import ckan.tests.legacy import ckan.tests.legacy.html_check import routes import paste.fixture import pylon...
NicoVarg99/daf-recipes
ckan/ckan/ckan/ckanext/multilingual/tests/test_multilingual_plugin.py
Python
gpl-3.0
8,793
from root2hdf5.data_types.base import BaseData import numpy as np import logging class SegmentData(BaseData): logger = logging.getLogger('root2hdf5.data_types.segment') tree_name = 'image2d_segment_hires_crop_tree' def __init__(self, _file, output_file): super(SegmentData, self).__init__(_file) from lar...
HEP-DL/root2hdf5
root2hdf5/plugins/larcv/segment.py
Python
gpl-3.0
1,556
from django.shortcuts import render # Create your views here. from django.http import HttpResponse from django.views.generic import ListView, DetailView, CreateView class ClusterListView(ListView): model = Cluster
Ranjandas/firewallmanager
clusters/views.py
Python
gpl-3.0
223
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import json import frappe, erpnext from frappe import _, scrub from frappe.utils import cint, flt, round_based_on_smallest_currency_fraction from erpnex...
ebukoz/thrive
erpnext/controllers/taxes_and_totals.py
Python
gpl-3.0
28,062
import time import random BLACK = (0, 0, 0) WHITE = (255, 255, 255) BLUE = (0, 0, 255) GREEN = (0, 255, 0) RED = (255, 0, 0) PURPLE = (255, 0, 255) BROWN = (160, 82, 45) class Landplots(): def __init__(self, owner, umtype, locationregion, jurisdiction, umvalue, inventory): self.owner = owner ...
MrZigler/UnderdogMilitia
landplots.py
Python
gpl-3.0
1,652
# -*-coding:utf-8-*- # @auth ivan # @time 2016-10-25 21:00:02 # @goal test for Observer Pattern class Subject(): def __init__(self): self.observers = [] self.state = 0 def getState(self): return self.state def setState(self, state): self.state = state def attach(self...
IvanaXu/Test_Class_GOF
tPatterns/Behavioral_Patterns/test_Observer_Pattern.py
Python
gpl-3.0
1,644
import numpy from numpy.testing import assert_array_almost_equal import pytest from sklearn.pipeline import make_pipeline from sksurv.datasets import load_breast_cancer from sksurv.ensemble import ExtraSurvivalTrees, RandomSurvivalForest from sksurv.preprocessing import OneHotEncoder from sksurv.testing import assert_...
sebp/scikit-survival
tests/test_forest.py
Python
gpl-3.0
9,388
import numpy as np import matplotlib.pyplot as plt import math from pylab import figure from my_plotter import * import os import sys sys.path.append('./BCI_Framework') import Main import Single_Job_runner as SJR import os import re if __name__ == '__main__': bciciv1 = Main.Main('BCI_Framework','BCICIV2a'...
lol/BCI-BO-old
plot_iv2a.py
Python
gpl-3.0
4,270
""" A python class to encapsulate the ComicBookInfo data """ """ Copyright 2012-2014 Anthony Beville 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...
dickloraine/EmbedComicMetadata
comicbookinfo.py
Python
gpl-3.0
4,500
#!/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
bokeh/openstreetmap.py
Python
gpl-3.0
1,245
# Copyright 2016-2021 Peppy Player peppy.player@gmail.com # # This file is part of Peppy Player. # # Peppy Player 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 you...
project-owner/Peppy
ui/slider/equalizerslider.py
Python
gpl-3.0
3,755
# =============================================================================== # Copyright (C) 2010 Diego Duclos # # This file is part of eos. # # eos 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, ...
Ebag333/Pyfa
eos/db/saveddata/user.py
Python
gpl-3.0
1,355
"""Procedures to initialize the full text search in PostgresQL""" from django.db import connection def setup_full_text_search(script_path): """using postgresql database connection, installs the plsql language, if necessary and runs the stript, whose path is given as an argument """ fts_init_query =...
tvenkat/askbot-devel
askbot/search/postgresql/__init__.py
Python
gpl-3.0
723
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('playbook', '0003_auto_20151028_1735'), ] operations = [ migrations.AddField( model_name='playbookrunhistory', ...
cycloidio/cyclosible
cyclosible/playbook/migrations/0004_playbookrunhistory_log_url.py
Python
gpl-3.0
441
#!/usr/bin/python # Provides all the API functionality callable through "/api" from flask import request from flaskext.auth import login_required import json, os, sys import security, charts, plugins, webconfig, domoticz apiDict = {} modules = {} def init(): global modules modules = plugins.loadPlugins() ...
wez3/domoboard
modules/api.py
Python
gpl-3.0
2,175
# -*- coding: utf-8 -*- """ Created on Sun Apr 03 21:53:14 2016 @author: Antoine Riaud """ from distutils.core import setup setup(name='Acoust_Tweezers_Anisotropic', version='2.2', description='Acoust_tweezers design package for anisotropic media', author='Antoine Riaud, Jean-Louis Thom...
AntoineRiaud/Tweezer_design
setup.py
Python
gpl-3.0
657
import itertools def main(): #print(permutations(41063625)) #print([isCube(i) for i in [41063625, 56623104, 66430125]]) #print(hasCubicPermutations(41063625, 3)) i = 1 while not hasCubicPermutations(i ** 3, 5): i += 1 print(i) print(i, i ** 3) def hasCubicPermutations(n, p): cubesCount = 0 for i in set(p...
ZachOhara/Project-Euler
python/p061_p070/problem062.py
Python
gpl-3.0
688
from __future__ import generators """ httplib2 A caching http interface that supports ETags and gzip to conserve bandwidth. Requires Python 2.3 or later Changelog: 2007-08-18, Rick: Modified so it's able to use a socks proxy if needed. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright...
jbu/personis
personis/examples/aelog/httplib2/__init__.py
Python
gpl-3.0
68,094
# Copyright (c) 2014 Yubico AB # 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, either version 3 of the License, or # (at your option) any later version. # # This program...
tycho/yubioath-desktop
yubioath/gui/messages.py
Python
gpl-3.0
5,696
#!/usr/bin/python # -*- coding: iso-8859-1 -*- import configparser from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, RegexHandler, ConversationHandler from telegram import (ReplyKeyboardMarkup, ReplyKeyboardRemove) from copy import deepcopy import logging import logging.handlers from decisionT...
giuva90/TreeBot
bot.py
Python
gpl-3.0
11,462
""" Здесь могут быть определены любые модели SQLAlchemy """ from flask_sqlalchemy import SQLAlchemy DB = SQLAlchemy()
Dejust/flask-base
app/models/common.py
Python
gpl-3.0
155
# -*- coding: utf-8 -*- """ Created on Tue Nov 27 11:19:54 2018 @author: david """ from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(800, 600) self.centralwidget = QtWidgets.QWidge...
DavidAlt/ITG
python/test-gui-template-as-text.py
Python
gpl-3.0
1,512
#!/usr/bin/env python # encoding: utf-8 """Module to store all constants. Any constant needed in more than one component, or potentially more than one part, of polar2grid should be defined here. Rules/Preferences: - All values lowercase - strings - user-legible (assume that they may be printed in log mess...
tommyjasmin/polar2grid
py/polar2grid_core/polar2grid/core/constants.py
Python
gpl-3.0
5,811
#This file is part of REXT #updater.py - script that handles updating of REXT and it's components #Author: Ján Trenčanský #License: GNU GPL v3 import subprocess import time import re import os import interface.utils import core.globals from interface.messages import print_blue #Pull REXT from git repo def update_re...
bmaia/rext
core/updater.py
Python
gpl-3.0
3,055
# Copyright (C) 2015 Kevin S. Graer # # # This file is part of PseudoTV Live. # # PseudoTV 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...
7fever/script.pseudotv.live
utilities.py
Python
gpl-3.0
6,697
#!/usr/bin/env python from setuptools import setup #from path import path #with (path(__file__).dirname() / 'pyqt_fit' / 'version.txt').open() as f: #__version__ = f.read().strip() import os.path version_filename = os.path.join(os.path.dirname(__file__), 'pyqt_fit', 'version.txt') with open(version_filename, "...
sergeyfarin/pyqt-fit
setup.py
Python
gpl-3.0
2,412
#!/usr/bin/env python3 """ The goal of this example is to show you the syntax for IR seeking readings. When using IR-SEEK with a remote control you get both heading and distance data. The code below shows the syntax for beacon seeking. Additionally it's good to play with a demo so that you can see how well or not we...
Rosebotics/cwc-projects
lego-ev3/examples/analog_sensors/ir_sensor/print_beacon_seeking.py
Python
gpl-3.0
1,582
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2018-02-15 23:16 from __future__ import unicode_literals from django.db import migrations import image_cropping.fields class Migration(migrations.Migration): dependencies = [ ('gardens', '0023_auto_20180215_2314'), ] operations = [ ...
bengosney/rhgd3
gardens/migrations/0024_auto_20180215_2316.py
Python
gpl-3.0
759
"""Pathname and path-related operations for the Macintosh.""" import os from stat import * __all__ = ["normcase","isabs","join","splitdrive","split","splitext", "basename","dirname","commonprefix","getsize","getmtime", "getatime","islink","exists","isdir","isfile", "walk","exp...
DarioGT/OMS-PluginXML
org.modelsphere.sms/lib/jython-2.2.1/Lib/macpath.py
Python
gpl-3.0
6,978
''' This program illustrates the use of findContours and drawContours. The original image is put up along with the image of drawn contours. Usage: contours.py A trackbar is put up which controls the contour level from -3 to 3 ''' import numpy as np import cv2 name_file_tile = "0.45-nd.png" file_tile = "../../wp-...
Null01/detect-polygons-from-image
src/generate-polygons/vectorize-img-03.py
Python
gpl-3.0
1,108
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import os import platform import shutil import sys sys.path.append('bin') from autojump_argparse import ArgumentParser SUPPORTED_SHELLS = ('bash', 'zsh', 'fish') def cp(src, dest, dryrun=False): print("copying file: %s -> %s" ...
mdlawson/autojump
install.py
Python
gpl-3.0
5,781
#-*- coding: ISO-8859-1 -*- # # DBSQL - A SQL database engine. # # Copyright (C) 2007-2008 The DBSQL Group, Inc. - All rights reserved. # # This library 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 ...
gburd/dbsql
src/py/pydbsql/dbapi2.py
Python
gpl-3.0
3,459
from setuptools import setup, find_packages from codecs import open # To use a consistent encoding from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the relevant file with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup(...
duyuan11/ford
setup.py
Python
gpl-3.0
2,137
#!/usr/bin/env python """ A Stepper Motor Driver class for Replicape. Author: Elias Bakken email: elias(dot)bakken(at)gmail(dot)com Website: http://www.thing-printer.com License: GNU GPL v3: http://www.gnu.org/copyleft/gpl.html Redeem is free software: you can redistribute it and/or modify it under the terms of the...
intelligent-agent/redeem
redeem/Stepper.py
Python
gpl-3.0
15,869
# -*- coding: utf-8 -*- """ DrQueue main module Copyright (C) 2011-2013 Andreas Schroeder This file is part of DrQueue. Licensed under GNU General Public License version 3. See LICENSE for details. """ import platform import os import sys import smtplib import json from email.mime.text import MIMEText from .client...
jedie/DrQueueIPython
DrQueue/__init__.py
Python
gpl-3.0
6,522