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
#!/usr/bin/env python3 from app.app import db class List(db.Model): id = db.Column(db.Integer, primary_key=True) locked = db.Column(db.Boolean) weightclass_id = db.Column(db.Integer, db.ForeignKey("weightclass.id")) weightclass = db.relationship("Weightclass", ...
GuidoSchmidt/juli
src/models/list.py
Python
gpl-2.0
928
""" This module contains data dump creation and import functions. Read more about the data dumps in our documentation here: https://listenbrainz.readthedocs.io/en/production/dev/listenbrainz-dumps.html """ # listenbrainz-server - Server for the ListenBrainz project # # Copyright (C) 2017 MetaBrainz Foundation Inc. # ...
Freso/listenbrainz-server
listenbrainz/db/dump.py
Python
gpl-2.0
24,816
from flask import Blueprint, render_template, json, g, current_app, redirect, url_for, session from datetime import datetime as dt from scrim2.extensions import oid, db, lm from scrim2.models import User from sqlalchemy.orm.exc import NoResultFound from flask.ext.login import login_user, logout_user, current_user impor...
vlttnv/scrimfinder2
scrim2/views/home.py
Python
gpl-2.0
2,491
############################################################################### # # $Id: stretcher.py 585 2010-12-15 05:21:28Z weegreenblobbie $ # ############################################################################### from Nsound import * # Read in the wavefile. a1 = AudioStream("Temperature_in.wav") # Gra...
weegreenblobbie/nsound
src/examples/stretcher.py
Python
gpl-2.0
1,481
from edc_constants.constants import YES, NEG from .base_test_case import BaseTestCase from .factories import MaternalConsentFactory, MaternalEligibilityFactory, PostnatalEnrollmentFactory class TestMaternalLocator(BaseTestCase): def setUp(self): super(TestMaternalLocator, self).setUp() self.mate...
botswana-harvard/microbiome
microbiome/apps/mb_maternal/tests/test_maternal_locator.py
Python
gpl-2.0
847
#!/usr/bin/env python """ github_buildbot.py is based on git_buildbot.py github_buildbot.py will determine the repository information from the JSON HTTP POST it receives from github.com and build the appropriate repository. If your github repository is private, you must add a ssh key to the github repository for the ...
kzys/buildbot
contrib/github_buildbot.py
Python
gpl-2.0
6,842
import numpy as np from . import errors from .container import DiskImageContainer from .segments import SegmentData class DCMContainer(DiskImageContainer): valid_densities = { 0: (720, 128), 1: (720, 256), 2: (1040, 128), } def get_next(self): try: data = self...
robmcmullen/atrcopy
atrcopy/dcm.py
Python
gpl-2.0
1,753
""" cryptopy.cipher.aes_cbc AES_CBC Encryption Algorithm Copyright (c) 2002 by Paul A. Lambert Read LICENSE.txt for license information. 2002-06-14 """ from cryptopy.cipher.aes import AES from cryptopy.cipher.cbc import CBC from cryptopy.cipher.base import BlockCipher, padWithPadLen, noPadding cl...
repotvsupertuga/tvsupertuga.repository
script.module.cryptolib/lib/cryptopy/cipher/aes_cbc.py
Python
gpl-2.0
563
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations plan_types = [ 'Unit', 'Integration', 'Function', 'System', 'Acceptance', 'Installation', 'Performance', 'Product', 'Interoperability', 'Smoke', 'Regression', ] def forwards_...
MrSenko/Nitrate
tcms/testplans/migrations/0002_add_initial_data.py
Python
gpl-2.0
929
#!/bin/env python # -*- coding: utf-8 -*- # # Hid replay / capture_usbmon.py # # must be run as root. # # This program is useful to capture both the raw usb events from an input # device and its kernel generated events. # # Requires several tools to be installed: usbmon, evemu and pyudev # # Copyright (c) 2014 Benjamin...
bentiss/hid-replay
tools/capture_usbmon.py
Python
gpl-2.0
13,959
# # Copyright (C) 2012 Uninett AS # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License version 3 as published by the Free # Software Foundation. # # This program is distributed in the hope...
UNINETT/nav
python/nav/web/netmap/urls.py
Python
gpl-2.0
2,459
import logging import json from os import path import lib LOG = logging.getLogger(__name__) def config_changes_invalidate_templates( generate, old_config_filename, new_config_filename): with open(old_config_filename) as old_config_file: old_config = old_config_file.read() with open(new_config_filename) as ...
levexis/number-tennis
forge-tennis/.template/generate_dynamic/internal_tasks.py
Python
gpl-2.0
1,205
from Config import addFilter # It's true, our server-side man pages are deficient addFilter(r'(beaker-server|beaker-lab-controller)\.noarch: W: no-manual-page-for-binary') # Kid templates produce a .pyc without a corresponding .py when they are compiled addFilter(r'python-bytecode-without-source /usr/lib/python.*/si...
beaker-project/beaker
Misc/rpmlint-config.py
Python
gpl-2.0
3,395
""" :mod:`G1DBinaryString` -- the classical binary string chromosome ===================================================================== This is the classical chromosome representation on GAs, it is the 1D Binary String. This string looks like "00011101010". Default Parameters -------------------------------------...
HyperloopTeam/FullOpenMDAO
lib/python2.7/site-packages/Pyevolve-0.6-py2.7.egg/pyevolve/G1DBinaryString.py
Python
gpl-2.0
5,158
# -*- coding: utf-8 -*- ############################################################################################### # # MediaPortal for Dreambox OS # # Coded by MediaPortal Team (c) 2013-2015 # # This plugin is open source but it is NOT free software. # # This plugin may only be distributed to and executed...
n3wb13/OpenNfrGui-5.0-1
lib/python/Plugins/Extensions/MediaPortal/resources/update.py
Python
gpl-2.0
6,241
from django.apps import AppConfig class UniversityCreditsConfig(AppConfig): name = 'university_credits'
dhavalmanjaria/dma-student-information-system
university_credits/apps.py
Python
gpl-2.0
110
#Copyright ReportLab Europe Ltd. 2000-2017 #see license.txt for license details #history https://hg.reportlab.com/hg-public/reportlab/log/tip/src/reportlab/graphics/charts/doughnut.py # doughnut chart __version__='3.3.0' __doc__="""Doughnut chart Produces a circular chart like the doughnut charts produced by Excel. C...
piMoll/SEILAPLAN
lib/reportlab/graphics/charts/doughnut.py
Python
gpl-2.0
19,476
import collections import pandas as pd from .regexes import re_pandas_x_num from .loggers import create_logger from .alternates import DATA_FRAMES from .misc import unwrap_arrays, match_arr_lengths logger_dataframes = create_logger("PDSlib") def _dotnotation_for_nested_dictionary(d, key, dots): """ Flatten...
nickmckay/LiPD-utilities
Python/lipd/dataframes.py
Python
gpl-2.0
12,355
import json import decimal from datetime import datetime import psutil def get_current_cpu_usage(): cpu_value = psutil.cpu_percent(interval=0) data_dict = [{ "key": "cpu", "values": [{"x": datetime.now(), "y": int(cpu_value)}]}] return json.dumps(data_dict, cls=CustomJSONEncoder) def get_current_memory_u...
anuragal/WebPyGraphRest
stats.py
Python
gpl-2.0
1,382
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2002-2011 Zuza Software Foundation # # This file is part of the Translate Toolkit. # # 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...
mail-apps/translate
translate/storage/fpo.py
Python
gpl-2.0
20,828
# -*- coding: utf-8 -*- """ author: ferris update: 2015-12-08 function: query from Google Analytics API, using loop to overcome quota of 10,000 records per query. """ import argparse from googleapiclient.discovery import build from oauth2client.client import SignedJwtAssertionCredentials import httplib2 from oauth2cli...
ferris-wufei/toolbox
dw/api_ga/api_ga.py
Python
gpl-2.0
5,603
import pytest class TestService: @pytest.mark.complete("service ") def test_1(self, completion): assert completion
algorythmic/bash-completion
test/t/test_service.py
Python
gpl-2.0
133
#!/usr/bin/env python # -*- encoding: utf-8 -*- # isis2json.py: convert ISIS and ISO-2709 files to JSON # # Copyright (C) 2010 BIREME/PAHO/WHO # # This program 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 Found...
fluentpython/isis2json
isis2json.py
Python
gpl-2.0
10,305
""" mbed SDK Copyright (c) 2011-2016 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wr...
linhdh/SnakeRepellerOnMbed50
mbed-os/tools/build_api.py
Python
gpl-2.0
54,455
import sys, re import shared, js_optimizer class AsmModule(): def __init__(self, filename): self.filename = filename self.js = open(filename).read() self.start_asm = self.js.find(js_optimizer.start_asm_marker) self.start_funcs = self.js.find(js_optimizer.start_funcs_marker) self.end_funcs = s...
shrimpboyho/git.js
emscript/emscripten/1.5.6/tools/asm_module.py
Python
gpl-2.0
10,782
# ----------------------------------------------------------------------------- # File name: main.py # # Date created: 3/20/2014 # # Date last modified: 1/18/2015 # ...
TonyWu386/redshift-game
main.py
Python
gpl-2.0
49,393
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'i$9evryhjz*1um&a3%^1bw9cmfu5p2crgn+4j)ta)v#&t@!-t^' DEBUG = True ALLOWED_HOSTS = [] INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions...
rafelbennasar/pathway-displayer
examples/example5/pdr/settings.py
Python
gpl-2.0
1,408
#!/usr/bin/python from __future__ import division ## Math import numpy as np import math ## Display import pygame import time ## Ros import rospy import os, sys from geometry_msgs.msg import Twist, Pose, PoseStamped, Point, Quaternion from tf import transformations as tf_trans from std_msgs.msg import Header from ie...
ufieeehw/IEEE2015
ros/ieee2015_simulator/nodes/mecanum_simulation.py
Python
gpl-2.0
7,968
import math import mmap import gzip import os import codecs import pytz import const from util import ip2long from timezone import time_zone_by_country_and_region MMAP_CACHE = const.MMAP_CACHE MEMORY_CACHE = const.MEMORY_CACHE STANDARD = const.STANDARD class GeoIPError(Exception): pass class GeoIPMetaclass(t...
ContributeToScience/participant-booking-app
booking/core/ip2geo/__init__.py
Python
gpl-2.0
10,628
# !/bin/env python # _*_ coding: utf-8 _*_ import xlsxwriter workbook = xlsxwriter.Workbook('chart.xlsx') # 创建一个Excel文件 worksheet = workbook.add_worksheet() # 创建一个工作表对象 chart = workbook.add_chart({'type': 'column'}) # 创建一个图表对象 # 定义数据表头列表 title = [u'业务名称',u'星期一',u'星期二',u'星期三',u'星期四',u'星期五',u'星期六',u'星期日',u'平均...
zhengjue/mytornado
study/3/XLsxWriter/demo1.py
Python
gpl-3.0
3,331
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2016 Bitergia # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This ...
grimoirelab/arthur
arthur/worker.py
Python
gpl-3.0
1,980
#!/usr/bin/env python # # Copyright (C) 2013-2017(H) # Max Planck Institute for Polymer Research # # This file is part of ESPResSo++. # # ESPResSo++ 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, ei...
espressopp/espressopp
testsuite/AdResS/TDforce/test_TDforce.py
Python
gpl-3.0
16,457
#!/usr/bin/env python ''' Module to perform various time operations. Documentation convention from https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt 07.07.2016 Loris Foresti ''' from __future__ import division from __future__ import print_function import datetime import numpy as np...
meteoswiss-mdr/precipattractor
pymodules/time_tools_attractor.py
Python
gpl-3.0
12,112
# -*- coding: utf-8 -*- # Copyright 2016-2017 Nate Bogdanowicz import datetime __distname__ = "Instrumental-lib" __version__ = "0.6" __author__ = "Nate Bogdanowicz" __email__ = "natezb@gmail.com" __url__ = 'https://github.com/mabuchilab/Instrumental' __license__ = "GPLv3" __copyright__ = "Copyright 2013-{}...
mabuchilab/Instrumental
instrumental/__about__.py
Python
gpl-3.0
374
from kulka import Kulka from random import randint import time class HSV: def __init__(self,hue,saturation,value): import colorsys self.h = hue self.s = saturation self.v = value rgb = colorsys.hsv_to_rgb(self.h/255, self.s/255, self.v/255) self.r = round(rgb[0] * 25...
TNT-Samuel/Coding-Projects
Kulka - Sphero/ex_move_rand.py
Python
gpl-3.0
5,169
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('presentation', '0012_auto_20160505_1508'), ] operations = [ migrations.CreateModel( name='Role', fie...
lesglaneurs/lesglaneurs
presentation/migrations/0013_auto_20160505_1512.py
Python
gpl-3.0
790
# -*- coding: UTF-8 -*- # admin.py # # Copyright (C) 2014 HES-SO//HEG Arc # # Author(s): Cédric Gaspoz <cedric.gaspoz@he-arc.ch> # # This file is part of MarMix. # # MarMix 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 ...
HEG-Arc/marmix
marmix/foobar/admin.py
Python
gpl-3.0
1,025
import mraa as m class Rgb(object): def __init__(self): self.r = m.Gpio(21) self.g = m.Gpio(23) self.b = m.Gpio(26) self.r.dir(m.DIR_OUT) self.g.dir(m.DIR_OUT) self.r.dir(m.DIR...
DnPlas/CalamariExamples
Python/calamari_rgb.py
Python
gpl-3.0
837
# Copyright (C) 2001,2002 Python Software Foundation # Author: barry@zope.com (Barry Warsaw) """Base class for MIME specializations. """ from email import Message class MIMEBase(Message.Message): """Base class for MIME specializations.""" def __init__(self, _maintype, _subtype, **_params): ...
DarioGT/OMS-PluginXML
org.modelsphere.sms/lib/jython-2.2.1/Lib/email/MIMEBase.py
Python
gpl-3.0
780
import LNdigitalIO def switch_pressed(event): event.chip.output_pins[event.pin_num].turn_on() def switch_unpressed(event): event.chip.output_pins[event.pin_num].turn_off() if __name__ == "__main__": LNdigital = LNdigitalIO.LNdigitals() listener = LNdigitalIO.InputEventListener(chip=LNdigital) ...
LeMaker/LNdigitalIO
examples/presslights.py
Python
gpl-3.0
501
''' SandBox.py ---------- Code that I was using to experiment with and understand how edges behaved. Very raw, a bit of a mess. Read at your own peril. I've included it in the name of being open, and would be a good place to start if anyone wanted to understand the algorithms with the help of Nutmeg for visualization. ...
kitizz/edge3d-paper
src/SandBox.py
Python
gpl-3.0
23,475
from django.shortcuts import render from . import contents def getContentDic(obj): ''' Return a dictionairy with the values from the content object obj = <contents.Class> ''' dic = { 'icon': obj.icon, 'title': obj.title, 'subtitle': obj.subtitle, 'content': obj.con...
ulrich3110/erasPAGE
eraspage/homepage/views.py
Python
gpl-3.0
6,452
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('inventory', '0001_initial'), ] operations = [ migrations.AddField( model_name='manufacturer', name='...
melizalab/django-lab-inventory
inventory/migrations/0002_auto_20150626_1805.py
Python
gpl-3.0
701
# coding: utf8 # commentinput.py # 5/28/2014 jichi __all__ = 'CommentInputDialog', if __name__ == '__main__': import sys sys.path.append('..') import debug debug.initenv() from Qt5 import QtWidgets from PySide.QtCore import Qt from sakurakit import skqss #from sakurakit.skclass import memoizedproperty #from ...
Dangetsu/vnr
Frameworks/Sakura/py/apps/reader/dialogs/commentinput.py
Python
gpl-3.0
3,917
""" FileManagerBase is a base class for all the specific File Managers """ # pylint: disable=protected-access import six import os import stat from DIRAC import S_OK, S_ERROR, gLogger from DIRAC.Core.Utilities.List import intListToString from DIRAC.Core.Utilities.Pfn import pfnunparse class FileManagerBase(object):...
DIRACGrid/DIRAC
src/DIRAC/DataManagementSystem/DB/FileCatalogComponents/FileManager/FileManagerBase.py
Python
gpl-3.0
54,505
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import unittest import imgchili import lxml.html from os.path import join, getsize, isfile class TestImgchili(unittest.TestCase): def setUp(self): self.basedir = '/mnt/d/Maidens/Uploads/' self.url = 'http://imgchili.com/show/2765/2765317_9.jpg' ...
Donearm/PyImagedownloader
pyimagedownloader/tests/imgchili_test.py
Python
gpl-3.0
12,411
# PyeNalysis __author__ = "Edwin Dalmaijer" import copy import numpy from scipy.interpolate import interp1d # DEBUG # #from matplotlib import pyplot # # # # # def interpolate_blink(signal, mode='auto', velthresh=5, maxdur=500, margin=10, invalid=-1, edfonly=False): """Returns signal with interpolated results, ...
esdalmaijer/PyGazeAnalyser
pygazeanalyser/traces.py
Python
gpl-3.0
19,865
#!/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. # ...
DepthDeluxe/ansible
lib/ansible/modules/windows/win_scheduled_task.py
Python
gpl-3.0
3,418
import kconfig import parse_rest.connection def get_keys(): config_path = kconfig.ConfigPathDefaults([".psrd", "~/.psrd", "/etc/psrd"]) kconfig.Config().config_path = config_path return kconfig.Config().fetch_config("parse") def register(): config = get_keys() parse_rest.connection.register( config["applicatio...
devonjones/PSRD-Parser
src/psrd/parse/creds.py
Python
gpl-3.0
389
# -*- coding: utf-8 -*- # Copyright © 2014-2016 Digital Catapult and The Copyright Hub Foundation # (together the Open Permissions Platform Coalition) # # 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 Found...
openpermissions/accounts-srv
accounts/controllers/roles_handler.py
Python
gpl-3.0
1,354
import pypower.api as pp import networkx as nx import numpy as np import copy import pypower.idx_brch as idx_brch import pypower.idx_bus as idx_bus import pypower.idx_gen as idx_gen def rescale_power_down(ppc): """Rescales power generation or load within a component uniformly among all buses to balance genera...
kevinzhou96/CascadingFailureSimulation
rescale_power.py
Python
gpl-3.0
2,340
#!/usr/bin/env python # -*- coding: utf8 -*- # *************************************************************************** # # # # Version 0.1 - 2013-08-01 # # Copyright (C) 2013 Marco Cr...
lenonr/dev_xfce
Auto_Config/base/.gimp-2.8/plug-ins/gimp_instagram_XproII.py
Python
gpl-3.0
3,841
from gi.repository import Gtk, Pango # Load application-wide definitions import get_iplayer_downloader #NOTE Import module, not symbol names inside a module, to avoid circular import import get_iplayer_downloader.ui.main_window from get_iplayer_downloader import command_util from get_iplayer_downloader.tools import ...
willemw12/get_iplayer_downloader
src/get_iplayer_downloader/ui/log_dialog.py
Python
gpl-3.0
5,896
from yowsup.structs import ProtocolEntity, ProtocolTreeNode class IqProtocolEntity(ProtocolEntity): ''' <iq type="{{get | set}}" id="{{id}}" xmlns="{{xmlns}}" to="{{TO}}" from="{{FROM}}"> </iq> ''' TYPE_SET = "set" TYPE_GET = "get" TYPE_ERROR = "error" TYPE_RESULT = "result" TYPE_D...
AragurDEV/yowsup
yowsup/layers/protocol_iq/protocolentities/iq.py
Python
gpl-3.0
2,304
import asyncio import logging import copy class Context(object): ''' Saves the context of the conversation ''' def __init__(self, nlu): self.nlu = nlu self.intents_list = [] def is_empty(self): return self.intents_list == [] def have_full_intent(self): for intent in...
Newsboy-VA/Newsboy-Core
core/conversation.py
Python
gpl-3.0
5,642
#!/usr/bin/env python ''' flashbake - wrapper script that will get installed by setup.py into the execution path ''' # copyright 2009 Thomas Gideon # # This file is part of flashbake. # # flashbake is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Lice...
commandline/flashbake
src/flashbake/console.py
Python
gpl-3.0
11,505
import os import time as tm import sys # Handles the creation of condor files for a given set of directories # ----------------------------------------------------------------------------- def createCondorFile(dataDir,outDir,run,day,times): # Condor submission file name convention: run-day-time.condor with ope...
Nablaquabla/sns-analysis
run-ba-analysis-v4.py
Python
gpl-3.0
5,144
#!/usr/bin/python # -*- coding: utf-8 -*- import json import sys from reset_exclusions import * from utils import * from viewer import * class Cleaner(object): """ The Cleaner class allows users to clean up their movie, TV show and music video collection by removing watched items. The user can apply a n...
Anthirian/script.filecleaner
default.py
Python
gpl-3.0
30,945
import numpy as np import theano import theano.tensor as T import pickle import timeit import os.path import sys class MultiNomialLR(object): def __init__(self, in_dim, out_dim): self.W = theano.shared( np.zeros((out_dim, in_dim), dtype=np.float64), name="W", borrow=True...
seaglex/garden
learn_theano/tradition/lr.py
Python
gpl-3.0
5,860
# -*- coding: utf-8 -*- from module.plugins.internal.DeadHoster import DeadHoster class OronCom(DeadHoster): __name__ = "OronCom" __type__ = "hoster" __version__ = "0.18" __status__ = "stable" __pattern__ = r'https?://(?:www\.)?oron\.com/\w{12}' __config__ = [] # @TODO: Remove in 0.4.10 ...
rlindner81/pyload
module/plugins/hoster/OronCom.py
Python
gpl-3.0
493
"""Generic runner functions.""" # from lutris.util.log import logger __all__ = ( # Native "linux", "steam", "browser", "web", # Microsoft based "wine", "winesteam", "dosbox", # Multi-system "mame", "mess", "mednafen", "scummvm", "residualvm", "libretro", "ags", # Commdore "fsuae", "vice...
RobLoach/lutris
lutris/runners/__init__.py
Python
gpl-3.0
1,920
import sys # where RobotControl.py, etc lives sys.path.append('/home/pi/Desktop/ADL/YeastRobot/PythonLibrary') from RobotControl import * ################################# ### Define Deck Layout ################################# deck="""\ DW24P DW24P DW24P DW24P SW24P SW24P SW24P SW24P DW24P DW24P DW24P D...
tdlong/YeastRobot
UserPrograms/Sexual_Mating2Treatment_4.py
Python
gpl-3.0
1,127
'''A collection of tasks to perform related to Piwik custom variables.''' import logging import re import dbsources import dbengine class Populate(object): '''Take existing data and populate custom variables.''' def __init__(self): self.CONFIG = None # tables and fields to use self.CONNECTION ...
bodleian/stats-time-cache
collate/custom_variables.py
Python
gpl-3.0
8,288
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-24 20:36 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Crea...
moniquehw/quoterizer
quotes/migrations/0001_initial.py
Python
gpl-3.0
1,134
import asyncio import discord import re from datetime import timezone from typing import Union, Set, Literal, Optional from redbot.core import checks, Config, modlog, commands from redbot.core.bot import Red from redbot.core.i18n import Translator, cog_i18n, set_contextual_locales_from_guild from redbot.core.utils.pre...
Cog-Creators/Red-DiscordBot
redbot/cogs/filter/filter.py
Python
gpl-3.0
21,315
# -*- coding: utf-8 -*- import sys import os sys.path.insert(0, os.path.abspath('')) extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.mathjax', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', 'sphinx.ext.intersphinx', ] in...
Dans-labs/bit-recover
docs/conf.py
Python
gpl-3.0
2,171
# -*- coding: utf-8 -*- # import re from core import httptools from core import scrapertools from platformcode import logger import codecs def get_video_url(page_url, video_password): logger.info("(page_url='%s')" % page_url) video_urls = [] data = httptools.downloadpage(page_url).data list = scrap...
alfa-addon/addon
plugin.video.alfa/servers/youdbox.py
Python
gpl-3.0
822
#!/usr/bin/python # -*- encoding: utf-8 -*- import yaml import jinja2 as jinjo import colorama import shutil, sys, os from scoutcamp import * from distutils.dir_util import copy_tree prints = Utils.prints printc = Utils.printc paint = Utils.paint class ScoutCamp(object): __app__ = "ScoutCamp" __version__ ...
TheTimeTunnel/scout-camp
PROJECT/src/main.py
Python
gpl-3.0
13,969
# -*- coding: utf-8 -*- from setuptools import setup import sys, os here = os.path.abspath(os.path.dirname(__file__)) DESCRIPTION = open(os.path.join(here, 'DESCRIPTION')).read() version = '0.0.1' setup(name='ssp', version=version, description="System Service Processor communication library", long_...
mdcic/ssp
setup.py
Python
gpl-3.0
1,270
# coding=utf-8 # UrbanFootprint v1.5 # Copyright (C) 2017 Calthorpe Analytics # # This file is part of UrbanFootprint version 1.5 # # UrbanFootprint is distributed under the terms of the GNU General # Public License version 3, as published by the Free Software Foundation. This # code is distributed WITHOUT ANY WARRANT...
CalthorpeAnalytics/urbanfootprint
footprint/main/models/presentation/style_attribute.py
Python
gpl-3.0
3,695
# Copyright (C) 2016, see AUTHORS.md # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed i...
TUM-E21-ThinFilms/Controller
devcontroller/encoder_old/z.py
Python
gpl-3.0
4,616
#!/usr/bin/python2 # -- coding: utf-8 -- # Converts a .qm file to a .ts file. # More info: http://www.mobileread.com/forums/showthread.php?t=261771 # By pipcat & surquizu. Thanks to: tshering, axaRu, davidfor, mobileread.com import codecs, cgi def clean_text(txt, is_utf) : if is_utf == False: txt = txt.decode('u...
pipcat/kobo
translation-tools/qm2ts.py
Python
gpl-3.0
3,181
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'quitter.ui' # # Created by: PyQt5 UI code generator 5.10.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.setObject...
alexisflesch/texamator
partielatormods/guis/guiquit.py
Python
gpl-3.0
3,316
#!/usr/bin/python # -*- coding: utf-8 -*- """ This file is part of XBMC Mega Pack Addon. Copyright (C) 2014 Wolverine (xbmcmegapack@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 Softwar...
xbmcmegapack/plugin.video.megapack.dev
resources/lib/menus/home_languages_faroese.py
Python
gpl-3.0
1,111
# Unit tests for the boundary shape class and the boundary sphere class. import unittest import numpy as N from tracer.spatial_geometry import generate_transform, rotx from tracer.boundary_shape import * class TestInBounds(unittest.TestCase): def setUp(self): self.points = N.array([ [0.,0.,0....
yosefm/tracer
tests/test_boundary_surface.py
Python
gpl-3.0
4,024
""" Module for unpacking of events data. Handles bits in order to increase processing speed to maximum. """ import struct VALID_MARK_SHIFT = 0 VALID_MARK_MASK = 0x00000001 POLARITY_SHIFT = 1 POLARITY_MASK = 0x00000001 Y_ADDR_SHIFT = 2 Y_ADDR_MASK = 0x00007FFF X_ADDR_SHIFT = 17 X_ADDR_MASK = 0x00007FFF def _get_pola...
orpinchasov/pycaer
pycaer/dvs128/process_packets.py
Python
gpl-3.0
731
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import json from frappe import _ from frappe.utils import flt, get_datetime, getdate, date_diff, cint, nowdate from frappe.model.document ...
brownharryb/erpnext
erpnext/manufacturing/doctype/work_order/work_order.py
Python
gpl-3.0
25,289
import pytest from rambutan3 import RTestUtil from rambutan3.check_args.RCheckArgsError import RCheckArgsError from rambutan3.check_args.binary_seq.RBinarySequenceEnum import RBinarySequenceEnum from rambutan3.check_args.binary_seq.RBinarySequenceMatcher import RBinarySequenceMatcher def test_ctor(): with pytest...
kevinarpe/kevinarpe-rambutan3
tests/check_args/binary_seq/test_RBinarySequenceMatcher.py
Python
gpl-3.0
2,247
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) LasLabs, Inc [https://laslabs.com]. All Rights Reserved # ############################################################################## # # Collaborators of this module: # Written By: Da...
OCA/vertical-medical
medical_pharmacy/__manifest__.py
Python
gpl-3.0
1,966
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf.urls import url from channels.routing import ProtocolTypeRouter, URLRouter from channels.auth import AuthMiddlewareStack from channels.staticfiles import StaticFilesWrapper, StaticFilesHandler from chat.consumers import ChatJSONConsumer...
hzlf/openbroadcast.ch
app/routing.py
Python
gpl-3.0
606
#!/usr/bin/python # LADITools - Linux Audio Desktop Integration Tools # Copyright (C) 2011-2012 Alessio Treglia <quadrispro@ubuntu.com> # Copyright (C) 2007-2010, Marc-Olivier Barre <marco@marcochapeau.org> # Copyright (C) 2007-2009, Nedko Arnaudov <nedko@arnaudov.name> # # This program is free software: you can redist...
alessio/laditools
laditools/jack.py
Python
gpl-3.0
8,258
#!/usr/bin/ """ """ from __future__ import print_function from __future__ import division import networkx as nx import sys from networkx.algorithms import bipartite from operator import itemgetter import matplotlib.pyplot as plt import argparse import pickle as cp import math import numpy as np from numpy import percen...
Rinoahu/debias
lib/debias.py
Python
gpl-3.0
49,496
import pandas as pd from scipy import misc import matplotlib.pyplot as plt import random from joblib import Parallel, delayed def generate_test_df(train_df, cols, X_test_prediction, X_test_ind): '''Helper function to make a test data frame with predicted and actual labels ''' test_df = train_df[...
roryhr/yelp_kaggle
old_scripts/helper_functions.py
Python
gpl-3.0
4,554
# Python standard modules import pandas as pd # Own modules from PLR_optclass import PLRMarket import PLR_optimization as plrmodel def PeakLoadReserveFunction(): market = PLRMarket() market.optimize() df_generators = market.data.generators gens_for_zones = market.data.gens_for_country ...
Thomsen22/MissingMoney
Peak Load Reserve - EU system/PLR_function.py
Python
gpl-3.0
4,572
# -*- coding: utf-8 -*- from module.plugins.internal.SimpleCrypter import SimpleCrypter class CrockoComFolder(SimpleCrypter): __name__ = "CrockoComFolder" __type__ = "crypter" __version__ = "0.06" __status__ = "testing" __pattern__ = r'http://(?:www\.)?crocko\.com/f/.+' __config__ = [("activ...
rlindner81/pyload
module/plugins/crypter/CrockoComFolder.py
Python
gpl-3.0
875
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible DIRECTOR = 0 ACTOR = 1 PRODUCER = 2 SCREENPLAY = 3 PHOTOGRAPHY = 4 WRITER = 5 PEOPLE_ROLE = ( (DIRECTOR, 'Director'), (ACTOR, 'Actor'), (PRODUCER, 'Producer'), (SCREENPLAY, 'Sc...
pdevetto/super-duper-disco
movies/models.py
Python
gpl-3.0
1,963
#!/usr/bin/env python3 import pge, sys from pygame.locals import * print("starting catapult") # pge.batch () pge.interactive () t = pge.rgb (1.0/2.0, 2.0/3.0, 3.0/4.0) wood_light = pge.rgb (166.0/256.0, 124.0/256.0, 54.0/256.0) wood_dark = pge.rgb (76.0/256.0, 47.0/256.0, 0.0) red = pge.rgb (1.0, 0.0, 0.0) green = ...
gaiusm/pge
examples/springs/catapult.py
Python
gpl-3.0
2,508
# -*- coding: utf-8 -*- """ /*************************************************************************** IOGeopaparazzi A QGIS plugin A plugin to import/export geodata from/to geopaparazzi Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/ ------------------- begin :...
eachiaradia/IOGeopaparazzi
io_geopaparazzi_provider.py
Python
gpl-3.0
2,828
""" Django settings for exseed project. Generated by 'django-admin startproject' using Django 1.10a1. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ import os im...
projectexseed/exseed
exseed/settings.py
Python
gpl-3.0
4,635
import codecs from nltk.tokenize import wordpunct_tokenize as tokenize data_filepath = 'output/top10kwords_2defs.tsv' def num_words_with_freq(freq, n): c = 0 for w in freq: if freq[w] == n: c = c + 1 return c defined_words = set() freq = {} total_tokens = 0 total_defs = 0 with codecs....
NorThanapon/dict-definition
definition/legacy/analyze_data.py
Python
gpl-3.0
1,265
# # MIT Kerberos server class # # Copyright (c) 2016 Red Hat, Inc. # # This is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 only # # This program is distributed in the hope that it will be useful, bu...
akamensky/sssd
src/tests/intg/kdc.py
Python
gpl-3.0
5,483
def auto_fill_cuts(myMesh,user_cuts,weight_function): ''' fill in user_cut list (or if empty create new one) which prefers edges with larger weight, given by the weight_function NOTE: currently sets naked edges as cuts ''' sorted_edges = get_edge_weights(myMesh,user_cuts,weight_function) fo...
jlopezbi/rhinoUnfolder
rhino_unwrapper/cutSelection/autoCuts.py
Python
gpl-3.0
3,550
# -*- coding: utf-8 -*- # Copyright (C) 2007, 2008, 2014 Toms Bauģis <toms.baugis at gmail.com> # This file is part of Project Hamster. # Project Hamster 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...
wreckJ/hamster
src/hamster/preferences.py
Python
gpl-3.0
22,492
from sakura.common.errors import APIObjectDeniedError from sakura.client.apiobject.base import APIObjectBase, APIObjectRegistry from sakura.client.apiobject.tables import APITable from sakura.client.apiobject.grants import APIGrants from sakura.common.tools import create_names_dict, snakecase class APIDatabase: de...
eduble/panteda
sakura/client/apiobject/databases.py
Python
gpl-3.0
1,593
#!/usr/bin/python # ReachView code is placed under the GPL license. # Written by Egor Fedorov (egor.fedorov@emlid.com) # Copyright (c) 2015, Emlid Limited # All rights reserved. # If you are interested in using ReachView code as a part of a # closed source project, please contact Emlid Limited (info@emlid.com). # Th...
emlid/ReachView
ReachLED.py
Python
gpl-3.0
5,937
""" send mail with html template """ import logging from django.template.loader import render_to_string from common.notify import Notify class Email: def __init__(self): self.logger = logging.getLogger('userquery') def send(self, data): self.logger.info("Sending mail by template %s" % dat...
linea-it/dri
api/userquery/email.py
Python
gpl-3.0
519
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 Lice...
Pakoach/Sick-Beard
sickbeard/databases/mainDB.py
Python
gpl-3.0
33,825
# -*-coding: utf-8 -*- import colander from . import ( SelectInteger, ResourceSchema, BaseForm, BaseSearchForm, BaseAssignForm, Date ) from ..resources.dismissals import DismissalsResource from ..models.dismissal import Dismissal from ..models.employee import Employee from ..models.note import...
mazvv/travelcrm
travelcrm/forms/dismissals.py
Python
gpl-3.0
2,514
DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'nodeshot_ci', 'USER': 'custom_user', 'PASSWORD': 'custom_password', 'HOST': '127.0.0.1', 'PORT': '5432', } } DOMAIN = 'yourcustomhost.com'
sephiroth6/nodeshot
tests/ci/local_settings.example.py
Python
gpl-3.0
284
import sys import numpy as np from PyQt4 import QtGui, QtCore from PyQt4.uic import loadUiType from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar from obspy import read import matplotlib.pyplot as plt...
adlabs-tech/ProsPect
Prospect.py
Python
gpl-3.0
10,755