code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
################################################################################ # This file is part of OpenELEC - http://www.openelec.tv # Copyright (C) 2009-2017 Stephan Raue (stephan@openelec.tv) # Copyright (C) 2013 Lutz Fiebach (lufie@openelec.tv) # # This program is dual-licensed; you can redistri...
OpenELEC/service.openelec.settings
src/service.py
Python
gpl-2.0
4,695
#coding: utf-8 # # Ailurus - a simple application installer and GNOME tweaker # # Copyright (C) 2009-2010, Ailurus developers and Ailurus contributors # Copyright (C) 2007-2010, Trusted Digital Technology Laboratory, Shanghai Jiao Tong University, China. # # Ailurus is free software; you can redistribute it and/or modi...
killpanda/Ailurus
ailurus/fedora/apps_eclipse.py
Python
gpl-2.0
7,840
import inspect import os.path import django import SocketServer import sys from django.conf import settings from django.views.debug import linebreak_iter # Figure out some paths django_path = os.path.realpath(os.path.dirname(django.__file__)) socketserver_path = os.path.realpath(os.path.dirname(SocketServer.__file__)...
viswimmer1/PythonGenerator
data/python_files/30552411/__init__.py
Python
gpl-2.0
4,785
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of astroid. # # astroid 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 #...
pylint-bot/astroid-unofficial
astroid/decorators.py
Python
gpl-2.0
5,576
#!/usr/bin/python # -*- coding: iso-8859-15 -*- """ GraphDataCreator Shell(bash)-to-Pyhton translation from Christian Ramiro code Miguel Angel Fernandez Sanchez """ #TODO Implement -s option (program lauched from a super-script, no questions) import os import sys from time import strftime, gmtime import subprocess i...
LibreSoftTeam/R-SNA
GraphDataCreator.py
Python
gpl-2.0
32,520
#!/usr/bin/env python # encoding: utf-8 from yast import import_module import_module('UI') from yast import * class AutoShortcut1Client: def main(self): # (Minimalistic) Demo for automatically generated shortcuts. # # See 'AutoShortcut2.ycp' for a more realistic example. # # Please n...
yast/yast-python-bindings
examples/AutoShortcut1.py
Python
gpl-2.0
1,568
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('registro', '0015_auto_20151220_1216'), ] operations = [ migrations.AlterField( model_name='certificacion', ...
infoINGenieria/Zweb
z_web/registro/migrations/0016_auto_20151230_0957.py
Python
gpl-2.0
1,002
# -*- coding: utf-8 -*- """ Created on Thu Dec 11 15:47:44 2014 @author: Acer """ class Demandmodelsetup: def __init__(self, numberofDemand_Models, starting_value_i, **Demand_Modelattributes ): self.numberofDemand_Models = numberofDemand_Models self.Demand_Modelattributelist = [] s...
christianurich/DynaMind-ToolBox
DynaMind-Performance-Assessment/3rdparty/CD3Waterbalance/Modelcreator/Demandmodelsetup.py
Python
gpl-2.0
2,545
__author__ = 'Fabrizio' #kivy.require(1.8.0") from kivy.app import App from kivy.lang import Builder from kivy.uix.screenmanager import Screen, ScreenManager, FadeTransition from kivy.uix.widget import Widget from kivy.graphics import Ellipse, Rectangle, Line from kivy.uix import label """ http://robertour.com/2013/0...
ForAP/Advanc3d-Pr0graming
A5-Tree/Spike-Code/main.py
Python
gpl-2.0
2,421
class PanelAlreadyRegistered(Exception): pass class LabProfileRequisitionModelError(Exception): pass class LabProfile: """A container class for panels. Added panels must have a matching requisition_model. """ def __init__(self, name=None, requisition_model=None): self.aliquot_typ...
botswana-harvard/edc-lab
edc_lab/lab/lab_profile.py
Python
gpl-2.0
1,528
from typing import List import expression as E VAR_DECL = "STM_VAR_DECL" FUN_DECL = "STM_FUN_DECL" BLOCK = "STM_BLOCK" IF = "STM_IF" WHILE = "STM_WHILE" BREAK = "STM_BREAK" RETURN = "STM_RETURN" PRINT = "STM_PRINT" EXP_STM = "STM_EXP_STM" class Stm(object): def __init__(self, kind): ...
ThatIndividual/midas
src/statement.py
Python
gpl-2.0
3,777
# record.py # ------------------------- # Fall 2012; Alex Safatli # ------------------------- # Software package for handling # the recording and calculating # of player scores for the Eclipse # board game, along with keeping # track of individual matches. # Imports import os, cPickle, datetime # Match class. Encaps...
AlexSafatli/EclipseBoardGame
record.py
Python
gpl-2.0
2,974
from resources.lib.externals.hachoir.hachoir_core.field import Field, FieldSet, ParserError, Bytes, MissingField from resources.lib.externals.hachoir.hachoir_core.stream import FragmentedStream class Link(Field): def __init__(self, parent, name, *args, **kw): Field.__init__(self, parent, name, 0, *args, *...
azumimuo/family-xbmc-addon
plugin.video.bubbles/resources/lib/externals/hachoir/hachoir_core/field/link.py
Python
gpl-2.0
3,240
""" # Majic # Copyright (C) 2014 CEH # # 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 pr...
NERC-CEH/jules-jasmin
majic/joj/websetup_jules_parameters.py
Python
gpl-2.0
10,957
# # Copyright 2019 Red Hat, 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 version. # # This program is distributed in th...
candlepin/virt-who
virtwho/virt/kubevirt/client.py
Python
gpl-2.0
4,273
import pickle import shelve jmena = 'Petr,Jan,Tomáš'.split(',') with open('/tmp/jmena.bin', 'wb') as f: pickle.dump(jmena, f) pickle.dump(0x202073612020, f) pickle.dump({k: v for k, v in enumerate(jmena)}, f) with open('/tmp/jmena.bin', 'rb') as f: print(*[pickle.load(f) for _ in range(3)], sep='\n')...
anomen-s/programming-challenges
gopas.cz/python_adv/4_pickle.py
Python
gpl-2.0
580
#!/usr/bin/env python3 import requests from bs4 import BeautifulSoup from gi.repository import Notify from time import sleep url = "http://www.amazon.in/gp/offer-listing/B00VBH9G8S/ref=dp_olp_new?ie=UTF8&condition=new" threshold_prize = 95000 print("Fetching rates..") while True: try: r = requests.get(url) ...
shubham2892/prize-fall-notifier
prize_fall_notifier.py
Python
gpl-2.0
817
#!/usr/bin/python import footgen f = footgen.Footgen("BSR14","geda") f.add_pad("3", - 0.95, -1, 0.6, 0.7) f.add_pad("2", 0.95, -1, 0.6, 0.7) f.add_pad("1", 0, 1, 0.6, 0.7) f.silkbox(3.3,1) f.finish()
benoitclem/gEDALibraries
footprints/nxp/bsr14.py
Python
gpl-2.0
210
from classes import * hammer = Item() nail = Item() print(hammer.name) print(nail.name)
superboot/radioIsland
boneYard/orderTest.py
Python
gpl-2.0
88
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Philippe Biondi <phil@secdev.org> # This program is published under a GPLv2 license """ Packet class Provides: - the default Packet classes - binding mechanisms - fuzz() method - exploration methods: explo...
secdev/scapy
scapy/packet.py
Python
gpl-2.0
89,628
##################################################################### # -*- coding: iso-8859-1 -*- # # # # Frets on Fire # # Copyright (C) 2006 Sami Kyöstilä ...
upgradeadvice/fofix-grisly-virtualenv
FoFiX/Menu.py
Python
gpl-2.0
21,146
#! /usr/bin/env python3 from __future__ import print_function import argparse import os import sys def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('locale_dir') return parser.parse_args() args = parse_args() basedir = os.path.abspath(os.path.join(os.path.abspath(__file__), '..'...
jendrikseipp/rednotebook-elementary
win/build-translations.py
Python
gpl-2.0
569
# -*- coding: utf-8 -*- # This code is part of Amoco # Copyright (C) 2006-2011 Axel Tillequin (bdcht3@gmail.com) # published under GPLv2 license from amoco.system.elf import * from amoco.system.core import CoreExec, DefineStub from amoco.code import tag import amoco.arch.x64.cpu_x64 as cpu # AMD 64 specific definiti...
bdcht/amoco
amoco/system/linux64/x64.py
Python
gpl-2.0
6,623
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import cv2 from constants import ENV_TYPE class Environment(object): # cached action size action_size = -1 @staticmethod def create_environment(): if ...
gkwatson/lab
gavinunrealdepth/environment/environment.py
Python
gpl-2.0
1,742
import os import env_settings as env from gi.repository import Gtk from lxml import etree class NavPoint(object): def __init__(self, label, contentsrc, children=[]): self._label = label self._contentsrc = contentsrc self._children = children def get_label(self): return self._...
activitycentral/ebookreader
src/ReadTab/epubview/navmap.py
Python
gpl-2.0
5,036
from django.conf import settings from edc_constants.constants import MALE, FEMALE, OTHER, YES, NO, NOT_APPLICABLE from edc_constants.constants import NEW, OPEN, CLOSED class DashboardMiddleware: def __init__(self, get_response): self.get_response = get_response def __call__(self, request): tr...
botswana-harvard/edc-dashboard
edc_dashboard/middleware.py
Python
gpl-2.0
1,322
#!/usr/bin/env python import os from app import create_app # , db # from app.models import User, Role from flask.ext.script import Manager, Shell # from flask.ext.migrate import Migrate, MigrateCommand app = create_app(os.getenv('FLASK_CONFIG') or 'default') manager = Manager(app) # migrate = Migrate(app, db) def mak...
ludusrusso/arduino-compiler-web
manage.py
Python
gpl-2.0
725
""" Manages a Beaker cache of WMS capabilities documents. @author: rwilkinson """ import logging from beaker.cache import CacheManager from beaker.util import parse_cache_config_options from joj.lib.wmc_util import GetWebMapCapabilities log = logging.getLogger(__name__) class WmsCapabilityCache(): """ Manages a...
NERC-CEH/jules-jasmin
majic/joj/lib/wms_capability_cache.py
Python
gpl-2.0
2,164
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright © 2009 Progiciels Bourbeau-Pinard inc. # François Pinard <pinard@iro.umontreal.ca>, 2009. # 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...
pinard/TweeTabs
TweeTabs/Tab.py
Python
gpl-2.0
14,849
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('report', '0002_auto_20160401_1609'), ] operations = [ migrations.CreateModel( name='ExternalPage', f...
BlackSmith/GreenTea
apps/report/migrations/0003_externalpage.py
Python
gpl-2.0
661
# -*- coding: utf-8 -*- """ Tests for WFS-T provider using QGIS Server through qgis_wrapped_server.py. This is an integration test for QGIS Desktop WFS-T provider and QGIS Server WFS-T that check if QGIS can talk to and uderstand itself. The test uses testdata/wfs_transactional/wfs_transactional.qgs and three initia...
gioman/QGIS
tests/src/python/test_qgsserver_wfst.py
Python
gpl-2.0
12,220
# Copyright (c) 2009-2010 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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...
gilshwartz/tortoisehg-caja
tortoisehg/hgqt/filelistmodel.py
Python
gpl-2.0
7,732
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 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 later...
dset0x/invenio-workflows
setup.py
Python
gpl-2.0
4,153
#! /usr/bin/env python class myclass: "zx class" i = 11111 def f(self): return 'hw' def pi(self): print "pi i={0}".format(self.i) def si(self, v): self.i = v def pp(self): print 'pp', self.pi() x = myclass() x.f() x.pi() x.si(9) x.pi() x.pp() print '============================' class newclass(mycl...
jencce/stuff
py/class.py
Python
gpl-2.0
693
# Test cases for Cobbler # # Michael DeHaan <mdehaan@redhat.com> import sys import unittest import os import subprocess import tempfile import shutil import traceback from cobbler.cexceptions import * from cobbler import settings from cobbler import collection_distros from cobbler import collection_profiles from c...
brenton/cobbler
tests/tests.py
Python
gpl-2.0
37,355
#!/usr/bin/env python # -*- coding: <encoding name> -*- __author__ = "i_pogorelko" __email__ = "i.pogorelko@gmail.com" __date__ = "2014-11-16" text='Proin eget tortor risus. Cras ultricies ligula sed magna dictum porta.\ Donec rutrum congue leo eget malesuada.' def percentage_1(text): print '' print 'input:...
pybursa/homeworks
i_pogorelko/hw4_i_pogorelko/hw4_solution1.py
Python
gpl-2.0
804
# -*- coding: utf-8 -*- import asyncore import socket import struct import pickle from server_tank import Tank, Tank_config from server_player import Game_Client # сокет, принимающий соединение от клиентов class Game_Server_UDP(asyncore.dispatcher): # инициализация def __init__(self, host, port, BLOCK_SIZE, ...
apsmi/PyTanks
server_dispatcher.py
Python
gpl-2.0
4,595
# Copyright (C) 2014 InfiniDB, 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; version 2 of # the License. # # This program is distributed in the hope that it will be useful, # but WITHOU...
infinidb/emtools
emtools/cluster/__init__.py
Python
gpl-2.0
802
import os import sys import imp from idlelib.TreeWidget import TreeItem from idlelib.ClassBrowser import ClassBrowser, ModuleBrowserTreeItem from idlelib.PyShell import PyShellFileList class PathBrowser(ClassBrowser): def __init__(self, flist, _htest=False): """ _htest - bool, chang...
j5shi/Thruster
pylibs/idlelib/PathBrowser.py
Python
gpl-2.0
3,069
#!/usr/env python class Flyable: def fly(self): pass class Quackable(object): def quack(self): pass class ReadHeadDuckFly(Flyable): def fly(self): print "I am a readheadduck, I can fly" class ReadHeadDuckQack(Quackable): def quack(self): print "I am a readheadduck,Dc...
sahikaru/DP
chapter1/strategymode.py
Python
gpl-2.0
1,364
""" # TOP2049 Open Source programming suite # # HM62256 DIP28 SRAM support # # Copyright (c) 2011 Michael Buesch <m@bues.ch> # # 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; e...
mbuesch/toprammer
libtoprammer/chips/hm62256dip28.py
Python
gpl-2.0
1,359
from enigma import eTimer, eEnv from Screens.Screen import Screen from Components.ActionMap import ActionMap, NumberActionMap from Components.Pixmap import Pixmap,MultiPixmap from Components.Label import Label from Components.Sources.StaticText import StaticText from Components.Sources.List import List from Components....
idrogeno/IdroMips
lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py
Python
gpl-2.0
16,367
# -*- coding: utf-8 -*- """ Created on Tue Apr 18 12:04:44 2017 @author: rstreet """ from os import getcwd, path, remove, environ from sys import path as systempath cwd = getcwd() systempath.append(path.join(cwd,'..')) import artemis_subscriber import log_utilities import glob from datetime import datetime import pyt...
ytsapras/robonet_site
scripts/tests/test_survey_data_utilities.py
Python
gpl-2.0
4,078
import pytest from amoco.system.structs import * def test_rawfield(): f = RawField('I',fcount=2,fname='v') assert f.format()=='2I' assert f.size()==8 assert f.unpack(b'\0\x01\x02\x03AAAA') == (0x03020100,0x41414141) def test_varfield(): f = VarField('s',fname='string') assert f.format()=='#s' ...
LRGH/amoco
tests/test_system_structs.py
Python
gpl-2.0
3,557
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Test of the omero cli base class including line parsing. Copyright 2009 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt """ import os import pytest from path import path from omero.cli import CLI from ome...
emilroz/openmicroscopy
components/tools/OmeroPy/test/unit/clitest/test_cli.py
Python
gpl-2.0
1,860
__author__ = 'sandro' from distutils.core import setup setup( author='Sandro Covo', author_email="sandro@covo.ch", packages=['brainfuck'], scripts=['scripts/pyfuck'], name="Pyfuck", description="Brainfuck interpreter written in python" )
sacovo/brainfuck
setup.py
Python
gpl-2.0
262
import gi gi.require_version("Gtk", "3.0") from gi.repository import Gtk, GObject import random import re import datetime class GenrePop(Gtk.Popover): """Creates a popover to filter by genre""" __gsignals__ = { "genres-updated": (GObject.SIGNAL_RUN_FIRST, GObject.TYPE_NONE, (object,)) } def...
Return0Software/Flix-with-Friends
src/gtk-gui/SearchBar.py
Python
gpl-2.0
11,298
# This code is part of Wakka. # Wakka 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. # Wakka is distributed in the hope that it will...
mayankjohri/wakka-package-manager
wakkacore/terminal.py
Python
gpl-2.0
3,148
# This is a module
ngocson2vn/webapps
shortly/__init__.py
Python
gpl-2.0
18
# Portions Copyright (c) Facebook, Inc. and its affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2. # hgweb/__init__.py - web interface to a mercurial repository # # Copyright 21 May 2005 - (c) 2005 Jake Edge <jake@edge2.net> # Copyright 2005 ...
facebookexperimental/eden
eden/hg-server/edenscm/mercurial/hgweb/__init__.py
Python
gpl-2.0
3,073
#!/usr/bin/env python """ a simple script can run and test your html rendering classes. Uncomment the steps as you add to your rendering. """ import codecs import cStringIO # importing the html_rendering code with a short name for easy typing. import html_render as hr ## writing the file out: def render(page, fil...
AmandaMoen/AmandaMoen
code/session06/run_html_render.py
Python
gpl-2.0
5,015
from setuptools import setup version = '1.2.dev0' long_description = '\n\n'.join([ open('README.rst').read(), open('CREDITS.rst').read(), open('CHANGES.rst').read(), ]) install_requires = [ 'setuptools', 'zest.releaser', ], tests_require = [ 'coverage', 'mock', 'nose', ] ...
nens/qgispluginreleaser
setup.py
Python
gpl-3.0
1,483
#!/usr/bin/env python2.7 """A python script to manage minecraft servers Designed for use with MineOS: http://minecraft.codeemo.com """ __author__ = "William Dizon" __license__ = "GNU GPL v3.0" __version__ = "0.6.0" __email__ = "wdchromium@gmail.com" import cherrypy import os from mineos import mc class cron(cherr...
MiLk/mineos
server.py
Python
gpl-3.0
10,406
#------------------------------------------------------------------------------- # Name: Table # Purpose: Tabularise data # # Author: James Burke # Created: 8/09/2014 # # Copyright: (c) James Burke 2014 # Licence: MIT # Permission is hereby granted, free of charge, to any person obtaining a co...
tKroopy/tkroopy
src/modules/table.py
Python
gpl-3.0
8,168
# -*- coding: utf-8 -*- # # Silly speech generator documentation build configuration file, created by # sphinx-quickstart on Wed Jul 19 16:57:13 2017. # # 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 # autogenera...
brainwane/obamaspeech
docs/source/conf.py
Python
gpl-3.0
6,121
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
jocave/snapcraft
snapcraft/plugins/maven.py
Python
gpl-3.0
5,693
# -*- coding: utf-8 -*- # Author: Mikhail Polyanskiy # Last modified: 2017-04-02 # Original data: Djurišić and Li 1999, https://doi.org/10.1063/1.369370 import numpy as np import matplotlib.pyplot as plt # LD model parameters - Normal polarization (ordinary) ωp = 27 εinf = 1.070 f0 = 0.014 Γ0 = 6.365 ω0 = 0 ...
polyanskiy/refractiveindex.info-scripts
scripts/Djurisic 1999 - Graphite-o.py
Python
gpl-3.0
2,735
from django.contrib import admin from .models import ( Store, Seller ) admin.site.register(Store) admin.site.register(Seller)
pymelibre/ecolepo
agrostore/stores/admin.py
Python
gpl-3.0
135
"""Helper functions and base classes for restapi module""" from __future__ import print_function import requests import fnmatch import datetime import collections import mimetypes import urllib import tempfile import time import codecs import json import copy import os import sys import munch from itertools import izip...
CalebM1987/serverAdminTools
serverAdminTools/restapi/rest_utils.py
Python
gpl-3.0
41,101
#!/usr/bin/env python # # sockets.py # # Copyright (c) 2012-2013 by Alexey Gladkov # Copyright (c) 2012-2013 by Nikolay Ivanov # # This file is covered by the GNU General Public License, # which should be included with billing as the file COPYING. # import socket as pysocket import threading, time, struct, errno, logg...
legionus/billing
lib/bc/sockets.py
Python
gpl-3.0
4,022
''' Written by Dmitry Chirikov <dmitry@chirikov.ru> This file is part of Luna, cluster provisioning tool https://github.com/dchirikov/luna This file is part of Luna. Luna 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 Foun...
dchirikov/luna
luna/utils/ip.py
Python
gpl-3.0
5,972
"""Models for the Users app.""" from django.contrib.auth.models import AbstractUser from django.db import models from django.urls import reverse from django.utils.translation import gettext_lazy as _ class User(AbstractUser): """Extended User model.""" # First Name and Last Name do not cover name patterns ...
studybuffalo/studybuffalo
study_buffalo/users/models.py
Python
gpl-3.0
641
from __future__ import unicode_literals, absolute_import from datetime import date from django.test import TestCase from django.views.generic import ListView from cms.plugin_pool import plugin_pool from django_dynamic_fixture import G from django_harness.fast_dispatch import FastDispatchMixin from django_harness.htm...
aptivate/djangocms_mount
tests/test_app/tests.py
Python
gpl-3.0
2,543
import os DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS root = lambda x: os.path.join(os.path.dirname(__file__), x) # TODO: Sqlite3 is only for development! Replace with postgresql_psycopg2 ASAP DATABASES = { 'default': { 'ENGINE': 'dj...
valberg/django-webmail
djwebmail/djwebmail/settings.py
Python
gpl-3.0
3,253
import numpy as np from bmtools.filters import filtfilt_butter def derivatefilterQ(model, q, t, cutoff, fs, filter_order=4): ''' Differentiate data using backwards finite differences and butterworth low pass filter. Takes care of quaternions Inputs: ...
GaloMALDONADO/motorg
motorog/filterKinematics.py
Python
gpl-3.0
2,952
import os import datetime from datetime import timedelta from django.db import models from django.utils import timezone from django.contrib.auth.models import User from core.utils import date_range class Package(models.Model): title = models.CharField(max_length=200, unique=True) level = models.SmallIntegerF...
hamasho/endojo
apps/games/listening/models.py
Python
gpl-3.0
4,489
from collections import namedtuple import numpy as np from .definitions import ImageDisplayType Event = namedtuple('Event', ['x', 'y']) def apply_display_type(complex_values, display_type): if display_type == ImageDisplayType.mag: data = np.abs(complex_values) elif display_type == ImageDisplayType....
AlanKuurstra/vidi3d
vidi3d/helpers.py
Python
gpl-3.0
623
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2017-2018 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in ...
snapcore/snapcraft
snapcraft/internal/repo/_base.py
Python
gpl-3.0
13,377
from django.db import models GENDER=( ('Male','Male'), ('Female','Female'), ('Transgender','Transgender'), ('Unknown','Unknown'), ) QUALIFICATION =( ('SSLC','SSLC'), ('Unknown','Unknown'), ) ATTENDANCE =( ('Present','Present'), ('Absent','Absent'), ('N.A','N.A'), )...
askyourgovt/nammamla2
src/misc/models.py
Python
gpl-3.0
6,418
#!/bin/env python # -*- coding: utf-8; -*- from fabtotum.utils.pyro.gcodeservice import GCodeServiceServer gcss = GCodeServiceServer() gcss.loop()
infinity0n3/fabtotum-experiments
gcodeservice.py
Python
gpl-3.0
149
# -*- coding: utf-8 -*- # # Yelandur documentation build configuration file, created by # sphinx-quickstart on Thu Jan 10 16:10:42 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. # # Al...
science-en-poche/yelandur
docs/source/conf.py
Python
gpl-3.0
7,995
import bpy from bpy.props import * from ... sockets.info import toListDataType from ... base_types.node import AnimationNode class FloatRangeListNode(bpy.types.Node, AnimationNode): bl_idname = "an_FloatRangeListNode" bl_label = "Number Range" dynamicLabelType = "ALWAYS" onlySearchTags = True sear...
Thortoise/Super-Snake
Blender/animation_nodes-master/nodes/number/float_range_list.py
Python
gpl-3.0
1,324
from httmock import all_requests @all_requests def non_json_episode_response(url, request): return {'status_code': 200, 'content': None} @all_requests def unauthorized_episode_response(url, request): return {'status_code': 401, 'content': '{"error": "access_denied", "error_message": "The resource owner or a...
NickMolloy/rt_api
tests/mock_api.py
Python
gpl-3.0
935
# -*- coding: utf-8 -*- # # zephserver documentation build configuration file, created by # sphinx-quickstart on Thu Oct 8 10:50:38 2015. # # 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. # ...
CDSP/zephserver
docs/conf.py
Python
gpl-3.0
9,276
#!/usr/bin/env python3 from setuptools import setup #setup the package as the default application setup( name = 'videowatcher', packages = ['videowatcher'], version = '0.1.5', author = 'Gabriel Boorse', description = 'Shared video playback package', include_package_data = True, install_req...
gnboorse/videowatcher
setup.py
Python
gpl-3.0
356
#!/usr/bin/env python ''' pyOpt_history Holds the Python Design Optimization History Class. Copyright (c) 2008-2014 by pyOpt Developers All rights reserved. Revision: 1.0 $Date: 11/12/2009 21:00$ Developers: ----------- - Dr. Ruben E. Perez (RP) - Mr. Peter W. Jansen (PJ) History ------- v. 1.0 - Initial Class...
svn2github/pyopt
pyOpt/pyOpt_history.py
Python
gpl-3.0
7,012
# 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 from frappe import _, throw from frappe.desk.form.assign_to import clear, close_all_assignments from frappe.model.mapper imp...
ESS-LLP/erpnext
erpnext/projects/doctype/task/task.py
Python
gpl-3.0
12,175
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("delft3dworker", "0064_merge"), ] operations = [ migrations.AlterField( model_name="scene", name="pha...
openearth/delft3d-gt-server
delft3dworker/migrations/0065_auto_20160831_1441.py
Python
gpl-3.0
1,435
# -*- coding: utf-8 -*- import os """ Ce programme est proposé par Vincent Grenard (PCSI, Lycée Poincaré, Nancy). Il produit une boîte de dialogue qui permet un tracé interactif des battements en permettant de modifier les divers paramètres pour illustrer la notion de battements. """ import numpy as np import pyl...
NicovincX2/Python-3.5
Physique/Onde/Mécanique ondulatoire/Acoustique/battements_interactif.py
Python
gpl-3.0
2,089
""" cfbrank -- A college football ranking algorithm dataparse.py: A module for parsing datafiles containing the relevant statistics for the cfbrank algorithm. See the readme for full details on the data formats and sources supported. Written by Michael V. DePalatis <depalatis@gmail.com> cfbrank is distributed under ...
mivade/cfbrank
dataparse.py
Python
gpl-3.0
3,352
from django import forms from .models import PO, Line_PO, Cost_Center from vendor.models import Supplier, Publisher from quote.models import Quote from django.contrib.auth.models import User class POForm(forms.Form): supplier = forms.ModelChoiceField(queryset=Supplier.objects.all()) blanket = forms.BooleanFi...
inspectorbean/spat
po/forms.py
Python
gpl-3.0
1,543
from Luna import Luna from bson import ObjectId luna = Luna('luna',['cluster','nodes']) print 1 print luna.find_obj('nodes', 'node005') print 2 print luna.add_array_elem('nodes', ['node005', 'node006'], 'nodes1', ['a1', 'a2', 'a3'] ) print 3 print luna.change_obj('nodes',['node001', 'node003'], {'zzz': 6})
hicham-a/luna
test/test06.py
Python
gpl-3.0
308
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from trainer.models import Language class AddWordForm(forms.Form): language = forms.ModelChoiceField(queryset=Language.objects.all()) word = forms.CharField(required=True) class Create...
chrigu6/vocabulary
vocabulary/trainer/forms.py
Python
gpl-3.0
1,356
from django.contrib import admin from .models import Post, Category, Tag # Register your models here. class PostAdmin(admin.ModelAdmin): list_display = ['title', 'created_time', 'modified_time', 'category', 'author'] # 注册新增PostAdmin admin.site.register(Post, PostAdmin) admin.site.register(Category) admin.site.reg...
wldisaster/Alice
blog/admin.py
Python
gpl-3.0
339
#!/usr/bin/python # (c) 2017, Red Hat Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.0', 'status': ['preview'], 'supported_b...
jbenden/ansible
lib/ansible/modules/monitoring/sensu_client.py
Python
gpl-3.0
9,506
from pythonosc import osc_message_builder from pythonosc import osc_bundle_builder def build_message(*args): """Sends an OscBundle or OscMessage to the server.""" msg = osc_message_builder.OscMessageBuilder(address = args[0]) for arg in args[1:]: msg.add_arg(arg) return msg.build() def build_b...
the-drunk-coder/regraa
regraa_osc_tools.py
Python
gpl-3.0
531
# -*- coding: utf-8 -*- from itertools import product, imap import copy import math import string import multiprocessing import platform import numpy as np import pandas as pd from pandas.tools.plotting import radviz import matplotlib.pyplot as plt import matplotlib.cm as cm from matplotlib.colors import ColorConverte...
chrisjsewell/PyGauss
pygauss/analysis.py
Python
gpl-3.0
44,913
# -*- coding: utf-8 -*- from __future__ import unicode_literals # ############################################################################# # ################################ Notes ################################## # ############################################################################# """ 1....
denisjul/democratos
democratos/CreateYourLaws/dl_law_codes/download_codes.py
Python
gpl-3.0
19,157
from time import clock # Actual Sum def SommePartielle (L, a, b) : s = 0 for i in range (a, b+1) : s += L[i] return s # Partial Sum def SommesPartielles_1 (L) : S = [] for i in range (0, len(L)) : S.append ( SommePartielle (L, 0, i) ) return S # Partial Sum de...
tqdv/info-lstl
Info/TPs/2016-11-22.py
Python
gpl-3.0
4,210
SYSTEM_IS_DEBUG = True NOTFOUND_PAGE = 'notfound/Index' DEFAULT_MOD = 'index' DEFAULT_CONTROLLER = 'Index' DB_DRIVER = 'mysql' DB_NAME = '' DB_USER = '' DB_PASSWORD = '' DB_HOST = 'localhost' DB_PORT = 3306 DB_CHARSET = 'utf8' DB_TABLE_PREFIX = '' DB_LOG_SQL = True DEFAULT_TEMPLATOR = 'jinja2' SESSION_STORE_ENGINE =...
lexdene/drape
drape/_default_configs.py
Python
gpl-3.0
525
import os import errno class LockError (Exception): pass class LockIsLocked (LockError): pass class LockIsUnlocked (LockError): pass class Lock (object): def __init__ (self, path): self.path = path self.locked = False def acquire (self): if self.locked: rais...
larsks/gitblogger
gitblogger/lock.py
Python
gpl-3.0
966
# -*- coding: utf-8 -*- """ This class can be used to load an RDF-type summary graph. :author: Spyridon Kazanas :contact: s.kazanas@gmail.com """ import networkx as nx import cPickle,csv from os import path class RDFTypeSummary(): # db info db_graph = None db_file = None def __init__(self,inputfile=N...
SWRG/semanticsdata
RDFTypeSummary.py
Python
gpl-3.0
1,493
from flask_user import login_required from app.API_Rest.Services.BaseService import BaseService from app.models.generadorJSON.respuestas_encuestas_generadorJSON import generarJSON_encuesta_alumno from app.models.respuestas_encuesta_models import EncuestaAlumno, RespuestaEncuestaTematica, RespuestaEncuestaTags from app....
jennywoites/MUSSA
MUSSA_Flask/app/API_Rest/Services/AlumnoServices/EncuestaAlumnoService.py
Python
gpl-3.0
6,276
pathebs= 'ebs.txt' docuebs= open(pathebs, 'w') pathke= 'ke.txt' docuke= open(pathke, 'w') pathvna= 'vna.txt' docuvna= open(pathvna, 'w') pathvxc= 'vxc.txt' docuvxc= open(pathvxc, 'w') pathvnl= 'vnl.txt' docuvnl= open(pathvnl, 'w') for n in range(1, 200): if n < 10: pathSour1= '00%d.ENERGIES' % ...
fireball-dft/fireball-fireball
tests/06.methane/energies_components.py
Python
gpl-3.0
1,017
import unittest from subprocess import call from functional_test_environment import TestEnvironment class ComandLineFeatureTests(unittest.TestCase): def setUp(self): self.env = TestEnvironment() def tearDown(self): self.env.destroy() def check_log_of_file_in_rev(self, name, rev, e...
TNG/svnfiltereddump
functional_tests/command_line_feature_tests.py
Python
gpl-3.0
13,483
__author__ = 'Indra Gunawan' import math, sys, time import pp import re import collections, string, pickle def isprime(n): """Returns True if n is prime and False otherwise""" if not isinstance(n, int): raise TypeError("argument passed to is_prime is not of 'int' type") if n < 2: return Fa...
ardinusawan/Sistem_Terdistribusi
Cluster/Manajer.py
Python
gpl-3.0
7,838
import os import numpy as np import pandas as pd from pytrack_analysis import Multibench from pytrack_analysis.dataio import VideoRawData from pytrack_analysis.profile import get_profile, get_scriptname, show_profile from pytrack_analysis.posttracking import frameskips, get_displacements, mistracks, get_head_tail, get...
degoldschmidt/pytrack-analysis
examples/run_post_tracking.py
Python
gpl-3.0
5,316
from .requests_test import RequestsTest import copy import sys class XSSTest(RequestsTest): def test(self): if self.DEBUG: print("Run the XSS Tests") passed = 0 failed = 0 messages = [] url = self.domain['protocol'] + self.domain['host'] + self.config['path'] print(...
sethlaw/sputr
tests/xss_test.py
Python
gpl-3.0
3,768
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015-2017 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in ...
snapcore/snapcraft
snapcraft/internal/sources/__init__.py
Python
gpl-3.0
7,056
# Copyright (C) 2011, The SAO/NASA Astrophysics Data System # # 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 p...
adsabs/ADS_records_merger
pipeline_log_functions.py
Python
gpl-3.0
1,639