repo_name
stringlengths
5
104
path
stringlengths
4
248
content
stringlengths
102
99.9k
gamesbrewer/kegger
kegger/myapp/flaskmyappname/views.py
from flask import Blueprint, request, url_for, render_template from models import * general = Blueprint('general', __name__) @general.route('/') def hello(): return render_template('index.html') @general.route('/Sign-Up', methods=['POST', 'GET']) def Sign_Up(): error = '' if request.method == 'POST': ...
Exirel/djangoes
setup.py
"""djangoes A way to integrate ElasticSearch into a Django project. No, this is not an ElasticSearch based ORM. """ from setuptools import setup, find_packages classifiers = [ 'Development Status :: 3 - Alpha', 'Environment :: Plugins', 'Environment :: Web Environment', 'Framework :: Django', '...
hannah2306-cmis/hannah2306-cmis-cs2
functions.py
def add(a,b): #compute the addition of a and b return a + b def sub(a,b): #compute the difference between a and b return a - b def mul(a,b): #compute the multiplication of a and b return a * b def div(a,b): #compute the division of a and b return a / b def hours_from_seconds(a): #change the hours to seconds...
Barrog/C4-Datapack
data/jscript/quests/216_TrialOfGuildsman/__init__.py
# Maked by Mr. Have fun! Version 0.2 # # Updated by ElgarL # print "importing quests: 216: Trial Of Guildsman" import sys from net.sf.l2j.gameserver.model.quest import State from net.sf.l2j.gameserver.model.quest import QuestState from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest MARK_OF_GUIL...
overpythoned/chat_repo
rooms.py
# Rooms module # Create, Store, find rooms in archive import os # Directory path to users database + name of file # Later it will be changed with the help of os module # On my desktop ROOMS_DATABASE = '/Users/mikhail/Documents/Progs/chat/rooms_db' # On my laptop EEE_ROOMS_DATABASE = '/home/mikhail/Karma/chat/rooms_d...
osks/pylyskom
pylyskom/errors.py
# -*- coding: utf-8 -*- # LysKOM Protocol A version 10/11 client interface for Python # (C) 1999-2002 Kent Engström. Released under GPL. # (C) 2008 Henrik Rindlöw. Released under GPL. # (C) 2012-2014 Oskar Skoog. Released under GPL. # All errors belong to this class class Error(Exception): pass # All Protocol A erro...
lcharleux/abapy
doc/example_code/indentation/ContactData.py
import numpy as np from abapy.indentation import ContactData X = np.linspace(-3., 3., 512) Y = np.linspace(-3., 3., 512) X, Y = np.meshgrid(X, Y) # Axi cd = ContactData() x = [0, 1, 2, 10] alt = [-1,.1, 0, 0] press = [1, 0, 0, 0] cd.add_data(x, altitude = alt, pressure = press) Alt_axi, Press_axi = cd.interpolate(X, ...
drtuxwang/system-config
bin/pyprof.py
#!/usr/bin/env python3 """ Profile Python 3.x program. """ import argparse import glob import os import pstats import signal import sys from typing import List import command_mod import subtask_mod class Options: """ Options class """ def __init__(self) -> None: self._args: argparse.Namespa...
paranoiasystem/SeminarioTPA
codice/python/main.py
#!/usr/bin/python3 from impiegato import Impiegato from employer import Employer from empleado import Empleado import class_adapter import object_adapter import special_adapter __author__ = 'paranoia' def my_print_method(objects): for obj in objects: print( obj.get_nome(), obj.get_cognome...
akarol/cfme_tests
cfme/containers/provider/kubernetes.py
from . import ContainersProvider from wrapanapi.containers.providers.rhkubernetes import Kubernetes class KubernetesProvider(ContainersProvider): type_name = "kubernetes" mgmt_class = Kubernetes db_types = ["Kubernetes::ContainerManager"] def __init__(self, name=None, credentials=None, key=None, zone...
quarckster/cfme_tests
cfme/scripting/appliance.py
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """Script to encrypt config files. Usage: scripts/encrypt_conf.py confname1 confname2 ... confnameN scripts/encrypt_conf.py credentials """ import click import tempfile from cached_property import cached_property from cfme.utils import os from cfme.utils.conf impor...
qkitgroup/qkit
qkit/drivers/FTDI_DAQ.py
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful,...
ADiEmme/pymon-pi
pymon_lib.py
#!/usr/bin/python import datetime #sendmail #This function will be used for sending email notifications def sendmail(message): from smtplib import SMTP debuglevel = 0 smtp = SMTP() smtp.set_debuglevel(debuglevel) smtp.connect('mail.domain.com', 25) smtp.ehlo() ...
okolisny/integration_tests
cfme/middleware/provider/hawkular.py
import re from widgetastic_patternfly import Input, BootstrapSelect from wrapanapi.hawkular import Hawkular from cfme.common import TopologyMixin, TimelinesMixin from cfme.common.provider import DefaultEndpoint, DefaultEndpointForm from cfme.utils.appliance import Navigatable from cfme.utils.appliance.implementations...
tectronics/ogrobot
src/OGBot.py
#!/usr/bin/env python # -*- coding: ISO-8859-1 -*- # # Kovan's OGBot # Copyright (c) 2007 by kovan # # ************************************************************************* # * * # * This program is free software; you ca...
satyamz/Tests
Test-503-new.py
#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures that Wget handles a 503 Service Unavailable response correctly. """ TEST_NAME = "503 Service Unavailable" ############# File Definitions ####################################...
sebastianmanger/troi-mobile
main.py
from datetime import datetime from kivy.uix.boxlayout import BoxLayout from kivy.app import App from kivy.properties import StringProperty class Header(BoxLayout): """ Some kind of Label/Icon and the selected date. If the date is clicked, open a dialogue to select a date. """ date = StringProperty(da...
ntekpelek/wcml
wcml_webapp/models/db.py
# -*- coding: utf-8 -*- db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'],migrate=False) response.generic_patterns = ['*'] if request.is_local else [] from gluon.tools import Auth, Service, PluginManager auth = Auth(db) service = Service() plugins = PluginManager() ## create all tables needed by...
makersauce/FLASK-BANG
flask-bang.py
#!/usr/bin/env python import os import subprocess vals = {} print "You need two names. Site name. and what you'll name your module (one,lowercase word)" vals['site_name'] = raw_input("Site Name: ") vals['name'] = raw_input("Module name: ") vals['host'] = raw_input("host name? eg. example.com : ") vals['port'] = 80 v...
itkinside/ari
ari/canvas/canvas.py
#! /usr/bin/env python # # Copyright (C) 2006 Stein Magnus Jodal # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 # as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, #...
liushuaikobe/evermd
create.py
import sys import config import utils utils.import_evernote_lib() from oauth import EvermdAuth from evernote.api.client import EvernoteClient import lib.evernote.edam.notestore.NoteStore as NoteStore import evernote.edam.type.ttypes as Types import lib.thrift.protocol.TBinaryProtocol as TBinaryProtocol import lib.thr...
tim-moody/xsce
roles/kiwix/files/xsce-make-kiwix-lib.py
#!/usr/bin/python """ Creates library.xml file for kiwix from contents of /zims/content and index Author: Tim Moody <tim(at)timmoody(dot)com> """ import os, sys, syslog import pwd, grp import time from datetime import date, datetime import json import yaml import re import subprocess import shlex import Conf...
dannykopping/mysql-utilities
mysql-test/t/compare_db.py
# # Copyright (c) 2010, 2013, Oracle and/or its affiliates. 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; version 2 of the License. # # This program is distributed in th...
S4kur4/Sepia
lib/core/convert.py
#!/usr/bin/env python #-*- coding:utf-8 -*- import sys from lib.core.settings import IS_WIN, UNICODE_ENCODING def singleTimeWarnMessage(message): # Cross-linked function sys.stdout.write(message) sys.stdout.write("\n") sys.stdout.flush() def stdoutencode(data): retVal = None try: data...
salamer/picard
picard/formats/id3.py
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # Copyright (C) 2006-2007 Lukáš Lalinský # # 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 Li...
Dziolas/invenio-checker
invenio_checker/bibcheck_from_legacy/__init__.py
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2013, 2015 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 option) any...
mikf/gallery-dl
gallery_dl/extractor/myportfolio.py
# -*- coding: utf-8 -*- # Copyright 2018-2021 Mike Fährmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. """Extract images from https://www.myportfolio.com/""" from .common imp...
niimailtah/projecteuler.net
sources/problem014.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Autor: Alexey V. Polurotov # e-mail: niimailtah@gmail.com # Common nick: Niimailtah # ---------------------------------------------------------------------------- # https://projecteuler.net/problem=14 # Longest Collatz sequence # Problem 14 # # The following iterative ...
ekorneechev/Connector
source/gui.py
#!/usr/bin/python3 # -*- coding: utf-8 -*- import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gdk, GdkPixbuf, GLib, Gio import random from ctor import * from GLOBAL import * from pathlib import Path def viewStatus(bar, message): """Функция отображения происходящих действий в строке состояни...
ernestyalumni/Propulsion
T1000/T1000/Model/static_tree_like_tables.py
""" @file static_tree_like_tables.py """ from ..DatabaseSetup.base import Base from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.orm import relationship class AA(Base): __tablename__ = "table_name_a_a" id = Column(Integer, primary_key=True) name = Column(String(250), nullable=F...
muelli/openpgp-python
djangoapp/keys/admin.py
from django.contrib import admin from django.core.urlresolvers import reverse from django.contrib.admin.utils import NestedObjects from django.template.defaultfilters import unordered_list from django.utils.safestring import mark_safe from django.utils.html import escape from django.contrib.admin import DateFieldListFi...
jalavik/invenio-workflows-ui
invenio_workflows_ui/tasks.py
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016 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 option) any later...
marcdata/pynba-tfo
tfo_espndata.py
# Import espn spreadsheet of 2014-2015 team stats import pandas as pd import os.path import pickle import tfo_extra import matplotlib.pyplot as plt from scipy.stats.stats import pearsonr # ----------------------------------- filepre = "c://Users/Marc/Documents/nbadata/" filename = "espn_nba_offense_20142015...
southpaw94/MachineLearning
SpamFilter/spam_nn.py
from keras.models import Sequential from keras.layers.core import Dense, Dropout from keras.utils import np_utils from keras.optimizers import SGD from sklearn.cross_validation import train_test_split import pandas as pd import numpy as np def load_data(): spam_data = pd.read_csv('https://archive.ics.uci.edu/ml/ma...
arunkgupta/gramps
gramps/gen/filters/rules/person/_isdescendantoffiltermatch.py
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2007 Donald N. Allingham # # 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 you...
onoga/wm
src/gnue/forms/uidrivers/java/widgets/notepage.py
# GNU Enterprise Forms - wx 2.6 UI Driver - Box widget # # Copyright 2001-2007 Free Software Foundation # # This file is part of GNU Enterprise # # GNU Enterprise 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...
rafamanzo/colab
colab/plugins/gitlab/models.py
from django.db import models from django.utils.translation import ugettext_lazy as _ from colab.plugins.utils.models import Collaboration from hitcounter.models import HitCounterModelMixin class GitlabProject(models.Model, HitCounterModelMixin): id = models.IntegerField(primary_key=True) description = models...
labase/activnce
main/utils/testregistry.py
# -*- coding: utf-8 -*- """ ################################################ Plataforma ActivUFRJ ################################################ :Author: *Núcleo de Computação Eletrônica (NCE/UFRJ)* :Contact: carlo@nce.ufrj.br :Date: $Date: 2009-2010 $ :Status: This is a "work in progress" :Revision: $Revision: 0.0...
azumimuo/family-xbmc-addon
plugin.video.specto/resources/lib/libraries/cleantitle.py
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda 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 l...
kanafghan/fiziq-backend
src/tests/test_factories.py
import unittest import datetime import models from google.appengine.ext import testbed from google.appengine.ext.ndb.blobstore import BlobKey from models.factories import ModelFactory class ModelFactoryTest(unittest.TestCase): def setUp(self): self.testbed = testbed.Testbed() self.testbed.activa...
Forage/Gramps
gramps/gui/selectors/selectorfactory.py
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2006 Donald N. Allingham # Copyright (C) 2011 Tim G L Lyons # # 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; eith...
2Habibie/ctocpp
c2cpp/lexer.py
import string import wstring import sys import os """ C to C++ Library Functions for scanning C source and header files. (c) 2001-2009 by D.G. Sureau Contributed August 30 2005 by Georg Wittenburg This program is free software; you can redistribute it and/or modify it under the...
niknow/TaskArena
tarenalib/arena.py
# -*- coding: utf-8 -*- # TaskArena - Adding collaborative functionality to TaskWarrior # Copyright (C) 2015 Nikolai Nowaczyk # # 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 ...
rukayaj/eia
core/migrations/0006_auto_20160207_1915.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0005_auto_20160207_1813'), ] operations = [ migrations.RenameField( model_name='populationdata', ...
exploreshaifali/portal
systers_portal/systers_portal/settings/base.py
''' Django settings for systers_portal project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ ''' # Build paths inside the project like this: os.path.join(BASE_DIR, ...
unioslo/cerebrum
Cerebrum/modules/job_runner/queue.py
# -*- coding: utf-8 -*- # Copyright 2018-2021 University of Oslo, Norway # # This file is part of Cerebrum. # # Cerebrum 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 # (...
ATNF/askapsdp
Tools/scons_tools/functestbuilder.py
# Copyright (c) 2009 CSIRO # Australia Telescope National Facility (ATNF) # Commonwealth Scientific and Industrial Research Organisation (CSIRO) # PO Box 76, Epping NSW 1710, Australia # atnf-enquiries@csiro.au # # This file is part of the ASKAP software distribution. # # The ASKAP software distribution is free softwar...
gppezzi/easybuild-framework
easybuild/tools/toolchain/utilities.py
# # # Copyright 2012-2019 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 (...
gstlt/check_couchbase
check_couchbase.py
#!/usr/bin/env python # -*- coding: utf-8; -*- """ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. check_couchbase.py is distr...
Ophiuchus1312/enigma2-master
lib/python/Screens/Dish.py
# -*- coding: utf-8 -*- from Screens.Screen import Screen from Components.BlinkingPixmap import BlinkingPixmapConditional from Components.config import config, ConfigInteger from Components.Label import Label from Components.ServiceEventTracker import ServiceEventTracker from enigma import eDVBSatelliteEquipmentControl...
nizhikebinesi/code_problems_python
rosalind/IPRB.py
import sys import math extension = '.txt' directory = './input/' name_part = 'rosalind_' problem_name = 'iprb' txt_name = directory + name_part + problem_name + extension with open(txt_name, 'r') as read: input_str = [int(x) for x in read.readlines()[0].split()] k, m, n = input_str[0], input_str[1], input_str[2]...
avocado-framework/avocado-vt
avocado_vt/plugins/vt_joblock.py
import errno import logging import os import re import random import string import sys from avocado.core import exit_codes from avocado.utils.process import pid_exists from avocado.utils.stacktrace import log_exc_info from avocado.core.plugin_interfaces import JobPreTests as Pre from avocado.core.plugin_interfaces im...
kawamuray/ganeti
lib/rapi/rlib2.py
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later...
munin/munin
munin/mod/roidcost.py
""" Loadable.Loadable subclass """ # This file is part of Munin. # Munin 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. # Munin is ...
llaumgui/seedboxsync
seedboxsync/main.py
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2022 Guillaume Kulakowski <guillaume@kulakowski.fr> # # For the full copyright and license information, please view the LICENSE # file that was distributed with this source code. # import signal from cement import App, TestApp from cement.core.exc import CaughtSignal from...
stephenfin/patchwork
patchwork/migrations/0030_add_submission_covering_index.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-08-31 23:47 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('patchwork', '0029_add_list_covering_index'), ] operations = [ migrations.A...
facebook/mysql-5.6
mysql-test/suite/innodb/t/innodb_optimistic_insert_race.py
import hashlib import MySQLdb import os import random import signal import sys import threading import time import string CHARS = string.ascii_letters + string.digits def sha1(x): if type(x) == str: x = x.encode('ascii') return hashlib.sha1(x).hexdigest() def get_msg(): blob_length = random.randint(1, 255)...
evernote/pootle
pootle/settings.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2013 Zuza Software Foundation # Copyright 2014 Evernote Corporation # # This file is part of Pootle. # # Pootle 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 # F...
snooptheone/LegendasTV.bundle
Contents/Libraries/Shared/unrar/unrarlib.py
# -*- coding: utf-8 -*- # Copyright (C) 2012 Matias Bordese # # 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...
rafaelmartins/pidsim
pidsim/core/pid/identification.py
# -*- coding: utf-8 -*- """ pidsim.core.pid.identification ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PID Controller identification methods. This module implements some PID identification methods for simulation, based on the reaction curve. Take care to choose a total time after the system stabilizati...
redsk/neo_wordnet
relsSet.py
import cPickle as pickle import sys def main(): numargs = len(sys.argv) w = None if numargs == 2: fname = sys.argv[1] else: fname = "../wordnet/WNedges.csv" relsSet = set() with open (fname, "r") as f: for idx, line in enumerate(f): if idx == 0: ...
GNOME/gedit
plugins/snippets/snippets/appactivatable.py
# Gedit snippets plugin # Copyright (C) 2005-2006 Jesse van den Kieboom <jesse@icecrew.nl> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or #...
jef-n/QGIS
tests/src/python/test_qgsserver_wms_getprint.py
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsServer WMS GetPrint. From build dir, run: ctest -R PyQgsServerWMSGetPrint -V .. note:: 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 versi...
freesmartphone/framework
framework/subsystems/oeventsd/fso_actions.py
# -*- coding: UTF-8 -*- """ The freesmartphone Events Module - Python Implementation (C) 2008-2009 Michael 'Mickey' Lauer <mlauer@vanille-media.de> (C) 2008 Jan 'Shoragan' Lübbe <jluebbe@lasnet.de> (C) 2008 Guillaume 'Charlie' Chereau (C) 2008 Openmoko, Inc. GPLv2 or later Package: oeventsd Module: fso_actions """ ...
pankajb64/webfp-crawler-phantomjs
tor-browser-crawler-webfp-paper/test/torutils_test.py
import os import sys import time import unittest from selenium import webdriver from selenium.common.exceptions import NoSuchElementException, TimeoutException from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC sys.path.append(os.path.dirname(os.path...
Aracthor/super_zappy
AI/python/Exceptions.py
#!/usr/bin/python3 ## ZappyException.py for super_zappy in /home/aracthor/programs/projects/hub/super_zappy/ia/python ## ## Made by aracthor ## Login <aracthor@epitech.net> ## ## Started on Tue Feb 24 10:09:53 2015 aracthor ## Last Update Tue Feb 24 12:22:56 2015 aracthor ## class ZappyException(Exception): ...
ChinaMassClouds/copenstack-server
deploy/src/mplatform/utils/virt.py
#!/usr/bin/python # -*- coding: utf-8 -*- # # virt.py - Copyright (C) 2012 Red Hat, Inc. # Written by Fabian Deutsch <fabiand@redhat.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; versio...
ColdrickSotK/coldtea-library
coldtealib/data.py
# Copyright (c) 2014 Adam Coldrick (SotK) import yaml import coldtealib class Database(): """Class to handle the database of books.""" def __init__(self, data): """Initialise the database.""" self.data = data def __repr__(self): """Return a nice representation of the database."...
WillArmentrout/galSims
simulate/Simulate_Function.py
#!/usr/bin/python from scipy.stats import cauchy import random import math import csv import numpy as np import netCDF4 as nc import argparse import lvDiagram ''' parser = argparse.ArgumentParser() parser.add_argument("numberRegions", type=int, help="Number of HII Regions to Populate in Model") a...
ufieeehw/IEEE2015
ros/ieee2015_vision/src/visual_servoing/distance_server.py
#!/usr/bin/env python import tf import rospy import geometry_msgs.msg import math from ieee2015_msgs.srv import ComputeDistance from geometry_msgs.msg import PointStamped from geometry_msgs.msg import Point #takes two points and a height of an object ####point1 #center point (0,0,0) ####point2 #featured point (x,y,h)...
SylvainCecchetto/plugin.video.catchuptvandmore
plugin.video.catchuptvandmore/resources/lib/channels/fr/sportenfrance.py
# -*- coding: utf-8 -*- """ Catch-up TV & More Copyright (C) 2019 SylvainCecchetto This file is part of Catch-up TV & More. Catch-up TV & More 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 Foundat...
Cimbali/pympress
pympress/document.py
# -*- coding: utf-8 -*- # # document.py # # Copyright 2009, 2010 Thomas Jost <thomas.jost@gmail.com> # Copyright 2015 Cimbali <me@cimba.li> # # 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 # ...
joeheyming/redef
test_redef.py
#!/usr/bin/env python import unittest from redef import redef, stdout_of, stderr_of, wiretap, Redef from oktest import ok, test class Somewhere: def show(self, message): return self.__class__.__name__ + ', ' + message class RedefTest(unittest.TestCase): @test("Test1: redef del test") def t1(self)...
facebookexperimental/eden
eden/scm/edenscm/hgext/pushrebase/__init__.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2. # pushrebase.py - server-side rebasing of pushed changesets """rebases commits during push The pushrebase extension allows the server to rebase incom...
Outernet-Project/librarian
librarian/core/contrib/sessions/sessions.py
""" sessions.py: Tools for dealing with server-side sessions Copyright 2014-2015, Outernet Inc. Some rights reserved. This software is free software licensed under the terms of GPLv3. See COPYING file that comes with the source code, or http://www.gnu.org/licenses/gpl.txt. """ import uuid import json import datetime...
benfitzpatrick/cylc
lib/parsec/tests/synonyms/lib/python/cfgspec.py
#!/usr/bin/env python # THIS FILE IS PART OF THE CYLC SUITE ENGINE. # Copyright (C) 2008-2016 NIWA # # 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 yo...
TAlonglong/trollduction-test
trollduction/collectors/trigger.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012, 2014, 2015 Martin Raspaud # Author(s): # Kristian Rune Larsen <krl@dmi.dk> # Martin Raspaud <martin.raspaud@smhi.se> # Panu Lahtinen <panu.lahtinen@fmi.fi> # This program is free software: you can redistribute it and/or modify # it under the ...
gnumdk/eolie
eolie/localized.py
# Copyright (c) 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 version. ...
ReproducibleBuilds/diffoscope
diffoscope/comparators/haskell.py
# -*- coding: utf-8 -*- # # diffoscope: in-depth comparison of files, archives, and directories # # Copyright © 2014-2015 Jérémy Bobbio <lunar@debian.org> # # diffoscope is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Fou...
abice-sbr/adaptsearch
12_scriptExtractMatch_v20_BLASTX.py
#!/usr/bin/python ### TBLASTX formatting ### MATCH = Only the first match keeped MATCH = 0 # Only 1rst match Wanted #MATCH = 1 # All match want ### SUBMATCH = several part of a same sequence match with the query SUBMATCH = 0 # SUBMATCH NOT WANTED (ONLY 1rst HIT) #SUBMATCH =1 # SUBMATCH WANTED ### NAME F...
newmediamedicine/indivo_server_1_0
indivo/views/reports/allergy.py
""" .. module:: views.reports.allergy :synopsis: Indivo view implementations for the allergy report. .. moduleauthor:: Daniel Haas <daniel.haas@post.harvard.edu> .. moduleauthor:: Ben Adida <ben@adida.net> """ from django.http import HttpResponseBadRequest, HttpResponse from indivo.lib.view_decorators import mars...
sc3/cookcountyjail
countyapi/migrations/0017_auto__del_field_dailypopulationcounts_date.py
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'DailyPopulationCounts.date' db.delete_column('countyapi_dailypopulationcounts', 'date') ...
iLoop2/ResInsight
ThirdParty/Ert/devel/python/python/ert_gui/widgets/path_chooser.py
# Copyright (C) 2011 Statoil ASA, Norway. # # The file 'path_chooser.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 ...
grv87/thesis-code
PlotCDF.py
#!/usr/bin/env python3 # -*- coding, utf-8 -*- # Оценка параметров гамма-распределения методом МП # Estimation of gamma distributions by ML method # Copyright © 2013–2014 Василий Горохов-Апельсинов # This file is part of code for my bachelor's thesis. # # Code for my bachelor's thesis is free software: you can redis...
slobberchops/rop
controls/deprecated/sensors.py
#!/usr/bin/python # # controls.py # # opens rotating file handler # reads distance, voltage, current ## maybe by 3 threads each taking 100 samples ## take time-weighted average? # checks voltage: off if <11.1, log, shutdown, set long sleep (120s), continue # check distance: if presence, reset run_until +60s from no...
computeVision/pcl_stereoimages
code/main.py
#!/usr/bin/env python3 import numpy as np import matplotlib matplotlib.use('tkagg') import matplotlib.pyplot as plt import os from glob import glob import time import pickle import random import config import cv2 # I added it. from PIL import Image from mpl_toolkits.mplot3d import Axes3D glob_counter = 0 # todo de...
linuxdaemon/CloudBot
cloudbot/__init__.py
import sys # check python version if sys.version_info < (3, 5, 3): print("CloudBot requires Python 3.5.3 or newer.") sys.exit(1) import json import logging.config import logging import os __version__ = "1.0.9" __all__ = ["clients", "util", "bot", "client", "config", "event", "hook", "permissions", "plugin",...
esdalmaijer/EyeTribe_test
experiment/pygaze/_keyboard/pygamekeyboard.py
# -*- coding: utf-8 -*- # # This file is part of PyGaze - the open-source toolbox for eye tracking # # PyGaze is a Python module for easily creating gaze contingent experiments # or other software (as well as non-gaze contingent experiments/software) # Copyright (C) 2012-2013 Edwin S. Dalmaijer # # This progra...
libretees/libreshop
libreshop/inventory/migrations/0021_supply_units_received.py
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-11-01 22:52 from __future__ import unicode_literals from decimal import Decimal from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('inventory', '0020_auto_20161023_2045'), ] operations = [ ...
astra-toolbox/astra-toolbox
python/astra/plugin.py
# ----------------------------------------------------------------------- # 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...
ross-spencer/painter-goblin
core/twitter/stream_example.py
""" Example program for the Stream API. This prints public status messages from the "sample" stream as fast as possible. Use -h for help. """ from __future__ import print_function import argparse from twitter.stream import TwitterStream, Timeout, HeartbeatTimeout, Hangup from twitter.oauth import OAuth from twitter....
mfiers/Moa
moa/data/templates/fastainfo.finish.py
#!/usr/bin/env python import os import sys import yaml import pprint import moa.script args = moa.script.getArgs() def errex(message): print message sys.exit(-1) statfiles = args['stats_files'] data = {} for sf in statfiles: with open(sf) as F: d = yaml.load(F) bn = os.path.basename(d['...
tyndare/osmose-backend
plugins/Name_UpperCaseNumber.py
#-*- coding: utf-8 -*- ########################################################################### ## ## ## Copyrights Etienne Chové <chove@crans.org> 2009 ## ## ...
jantman/TuxTruck-wxPython
TuxTruck_Settings.py
# TuxTruck Skin Manager # Time-stamp: "2008-05-12 15:11:29 jantman" # $Id: TuxTruck_Settings.py,v 1.6 2008-05-12 19:10:43 jantman Exp $ # # Copyright 2008 Jason Antman. Licensed under GNU GPLv3 or latest version (at author's discretion). # Jason Antman - jason@jasonantman.com - http://www.jasonantman.com # Project web ...
DigitalCampus/django-oppia
quiz/urls.py
from django.urls import path from quiz import views app_name = 'quiz' urlpatterns = [ path('<int:course_id>/feedback/<int:feedback_id>/download', views.feedback_download, name="feedback_results_download"), path('<int:course_id>/old_feedback/<int:feedback_id>/download', views.old_fe...
cjaymes/pyscap
src/scap/model/xs/NegativeIntegerType.py
# 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 ...
nnmware/nnmware
apps/board/views.py
# nnmware(c)2012-2020 from __future__ import unicode_literals from django.db.models import Q from django.views.generic.dates import YearArchiveView, MonthArchiveView, DayArchiveView from django.views.generic.detail import DetailView from django.views.generic.edit import CreateView, UpdateView from django.views.generi...
treecal20/FIRSTSteamworks2017
raspberrypi/grip.py
import cv2 import numpy import math from enum import Enum class GripPipeline: """ An OpenCV pipeline generated by GRIP. """ def __init__(self): """initializes all values to presets or None if need to be set """ self.__cv_resize_dsize = (0, 0) self.__cv_resize_fx = ...
NicoVarg99/daf-recipes
ckan/ckan/ckan/ckanext/datapusher/tests/test_interfaces.py
# encoding: utf-8 import json import httpretty import nose import sys import datetime from nose.tools import raises from ckan.common import config import sqlalchemy.orm as orm import paste.fixture from ckan.tests import helpers, factories import ckan.plugins as p import ckan.model as model import ckan.tests.legacy a...
to266/hyperspy
hyperspy/_components/power_law.py
# -*- coding: utf-8 -*- # Copyright 2007-2016 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...