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
# -*- coding: utf8 -*- from django.shortcuts import render, redirect from django.http import HttpResponse from django.contrib.auth.decorators import login_required from django.views.decorators.http import require_POST from .models import Comment from lesson.models import Lesson import json @login_required @require_P...
chenzeyuczy/keba
src/comment/views.py
Python
gpl-2.0
1,049
"""Miscellaneous report classes. """ __author__ = "Martin Blais <blais@furius.ca>" import datetime import re from beancount.reports import report from beancount.reports import table from beancount.reports import gviz from beancount.parser import printer from beancount.core import data from beancount.core import amoun...
iocoop/beancount
src/python/beancount/reports/price_reports.py
Python
gpl-2.0
7,389
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import """Endpoints for the web blog.""" from flask import Blueprint, g, request, redirect, url_for, flash, make_response import datetime import time import re from xml.dom.minidom import Document import rophako.model.user as User import ropha...
kirsle/rophako
rophako/modules/blog/__init__.py
Python
gpl-2.0
18,180
# -*- coding: utf-8 -*- """ AllDb Eksportowanie danych do pliku pdf """ from __future__ import with_statement __author__ = "Karol Będkowski" __copyright__ = "Copyright (c) Karol Będkowski, 2009-2010" __version__ = "2010-06-11" import logging from cStringIO import StringIO from alldb.model import objects from alldb...
KarolBedkowski/alldb
alldb/filetypes/pdf_support.py
Python
gpl-2.0
4,841
#convert nexus tree format to newick import sys import os import dendropy for n in sys.argv[1:]: basename = os.path.splitext(n) outfile = basename[0] + ".nwk" nexusfile = dendropy.TreeList.get_from_path(n, "nexus") nexusfile.write_to_path('temp.nwk', "newick") os.rename('temp.nwk', outfile)
Wendellab/phylogenetics
nexus2newick.py
Python
gpl-2.0
314
# # Copyright (C) 2010 B. Malengier # Copyright (C) 2010 P.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 # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # Th...
bmcage/stickproject
stick/bednet/room1dmodel.py
Python
gpl-2.0
41,045
# -*- coding: utf-8 -*- ''' Copyright (C) 2015-2020 enen92,Zag This file is part of script.screensaver.cocktail SPDX-License-Identifier: GPL-2.0-only See LICENSE for more information. ''' import xbmc import xbmcaddon import xbmcvfs import thecocktaildb import os addon = xbmcaddon.Addon(id='script.screens...
enen92/script.screensaver.cocktail
resources/lib/common_cocktail.py
Python
gpl-2.0
1,041
__author__ = 'tonycastronova' import cPickle as pickle import uuid import stdlib import utilities.spatial from emitLogging import elog from sprint import * from utilities import io def create_variable(variable_name_cv): """ creates a variable object using the lookup table """ sPrint('Loading variabl...
Castronova/EMIT
utilities/mdl.py
Python
gpl-2.0
5,317
################################################################################ ################################### Class ###################################### ################################################################################ from brain import BrainException,Brain class LookUpTableBrainException(Brain...
0x1001/jarvis
jarvis/neural/lookuptablebrain.py
Python
gpl-2.0
1,385
from __future__ import division, print_function, absolute_import import csv import numpy as np from sklearn import metrics, cross_validation # import pandas import tensorflow as tf import tflearn from tflearn.layers.core import input_data, dropout, fully_connected from tflearn.layers.conv import conv_1d from tflearn.l...
vinhqdang/wikipedia_analysis
lang_model/enwiki/cnn.py
Python
gpl-2.0
4,343
''' Created on Jul 9, 2018 @author: lqp ''' import json import os import re from util import TrackUtil from util.TrackUtil import current_milli_time from util.TrackUtil import mongoUri from util.TrackUtil import todayMillis from pymongo.mongo_client import MongoClient import pymongo from xlrd.book import colname clas...
lqp276/repo_lqp
repopy/src/batch/collection_move.py
Python
gpl-2.0
1,299
#! python import sys reader = open(sys.argv[1], 'r') writer = open(sys.argv[2], 'w') def calcIdentity(stringa,stringb): counter = 0 counter2 = 0 if len(stringa) != len(stringb): return 0 for x in range(len(stringa)): if stringa[x] == stringb[x]: #print stringa[x]+stringb[x] counter += 1 counter2 += 1...
carstenuhlig/gobi
python/calc_Identity.py
Python
gpl-2.0
666
import logging from ConfigParser import ConfigParser, NoOptionError import settings from common.functional import LazyObject logger = logging.getLogger('user_prefs') class types(object): str = 'get' bool = 'getboolean' int = 'getint' float = 'getfloat' class UserPrefs(object): defaults = di...
SPlyer/MacTimeLog
user_prefs.py
Python
gpl-2.0
2,419
#! /usr/bin/python # -*- coding: utf-8 -*- """ Copyright (C) 2013 Sebastien GALLET <bibi21000@gmail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License. This program is distributed in the hope that it will be useful, but WITHOUT ...
bibi21000/agocontrol
debian/agocontrol-tellstick/opt/agocontrol/bin/agotellstick.py
Python
gpl-2.0
18,493
# templater.py - template expansion for output # # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2, incorporated herein by reference. from i18n import _ import re, sys, os import util, config, templat...
dkrisman/Traipse
mercurial/templater.py
Python
gpl-2.0
7,996
# Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2011 Nick Hall # 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; either version 2 of th...
Nick-Hall/gramps
gramps/plugins/gramplet/backlinks.py
Python
gpl-2.0
10,199
# -*-python-*- # GemRB - Infinity Engine Emulator # Copyright (C) 2003-2005 The GemRB Project # # 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 opt...
NickDaly/GemRB-FixConfig-Branch
gemrb/GUIScripts/GUISTORE.py
Python
gpl-2.0
42,696
""" Top-level conftest.py does a couple of things: 1) Add cfme_pages repo to the sys.path automatically 2) Load a number of plugins and fixtures automatically """ from pkgutil import iter_modules import pytest import requests import cfme.fixtures import fixtures import markers import metaplugins from fixtures.artifa...
lehinevych/cfme_tests
conftest.py
Python
gpl-2.0
5,434
class Config: db_config = {"user": "root", "password": "root", "host": "localhost", "database": "dita"} table = None @classmethod def get_table(cls): return cls.table @classmethod def set_table(cls, table): cls.table = table
dita-programming/dita-access
model/config.py
Python
gpl-2.0
318
from termcolor import colored import cherrywasp.logger class CherryAccessPoint: """ An object that represents an Access Point seen in the environment. Inputs: - bssid(str) the MAC address of the device sending beacon frames - file_prefix(str) the file prefix to use when creating the .csv file. ...
ajackal/cherry-wasp
cherrywasp/accesspoint.py
Python
gpl-2.0
1,136
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2007-2008 Brian G. Matherly # Copyright (C) 2009 Gary Burton # Contribution 2009 by Reinhard Mueller <reinhard.mueller@bytewise.at> # Copyright (C) 2010 Jakim Friant # Copyright (C) 2013-2014 Paul Franklin # # This program is free softwar...
pmghalvorsen/gramps_branch
gramps/plugins/textreport/kinshipreport.py
Python
gpl-2.0
16,756
# # Copyright 2001 - 2011 Ludek Smid [http://www.ospace.net/] # # This file is part of IGE - Outer Space. # # IGE - Outer Space 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 Lice...
Lukc/ospace-lukc
server/lib/ige/ospace/IPlayer.py
Python
gpl-2.0
47,542
# pygsear # Copyright (C) 2003 Lee Harr # # # This file is part of pygsear. # # pygsear 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....
davesteele/pygsear-debian
examples/wings_chase.py
Python
gpl-2.0
2,919
# Routines for handling fasta sequences and tab sep files # std packages import sys, textwrap, operator, types, doctest,logging, gzip, struct, cPickle, gc, itertools, math from collections import defaultdict from types import * from os.path import basename, splitext # external packages try: import namedtuple exc...
maximilianh/maxtools
lib/maxbio.py
Python
gpl-2.0
12,239
#!/usr/bin/env python ############################################################################### # # searchMappedPairs.py # # Given a bam file, this srcipt will calculate where the mate of the read # is mapped or unmappedand in which contig that mate is mapped to. The aim # being to generate a graphvi...
JoshDaly/scriptShed
searchMappedPairs.py
Python
gpl-2.0
5,548
# 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. # This module will be shared with other services. Therefore, please refrain from # importing anything from Mercurial and creating a dependency on Mercur...
facebookexperimental/eden
eden/hg-server/edenscm/hgext/memcommit/commitdata.py
Python
gpl-2.0
5,031
import pyterpol import matplotlib.pyplot as plt wmin = 3600 wmax = 4100 sygri = pyterpol.SyntheticGrid(flux_type='absolute') params = dict(teff=9950, logg=3.7, z=1.0) spec1 = sygri.get_synthetic_spectrum(params, [wmin, wmax], order=4, step=0.1) params = dict(teff=10000, logg=3.5, z=1.0) spec2 = sygri.get_synthetic_spe...
chrysante87/pyterpol
pyterpol_test/test_absolute_spectra/test.py
Python
gpl-2.0
575
#!/usr/bin/env python # -*- coding: <utf-8> -*- """ This file is part of Spartacus project Copyright (C) 2016 CSE 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...
CommunicationsSecurityEstablishment/spartacus
ToolChain/Linker/Constants.py
Python
gpl-2.0
1,090
# Portions 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. # convert.py Foreign SCM converter # # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed accor...
facebookexperimental/eden
eden/scm/edenscm/hgext/convert/__init__.py
Python
gpl-2.0
16,126
import unittest from model.session import * from model.dbhandler import * class SessionTest(unittest.TestCase): def test_instance(self): session = Session('123') session.addData('key', 'vall') self.assertNotEqual(session.data, None) def test_add_data(self): session1 = Session...
gantonov/restaurant-e-menu
cgi-bin/tests/test_session.py
Python
gpl-3.0
891
''' Created on Mar 25, 2016 Created on Jan 27, 2016 3.3V pin : 1,17 5V pin : 2,4 Ground : 6,9,14,20,25,30,34,39 EPROM : 27,28 GPIO : 3,5,7,8,10,11,12,13,15,16,18,10,21,22,23,24,26,29,31,32,33,35,36,37,38,40 Motor Control : 29,31,33,35 front 7,8 left 11,12 right 15,16 back 21,22 top 23,24 signal 26 sigt 10 wireless ...
kumar-physics/pi
ObstacleAvoidance/ObstacleAvoidance/Jeno.py
Python
gpl-3.0
4,812
def check_voter(name): if voted.get(name): print("kick them out!") else: voted[name] = True print("let them vote!") book = dict() book["apple"] = 0.67 book["milk"] = 1.49 book["avocado"] = 1.49 print(book) print(book["avocado"]) phone_book = {} phone_book["jenny"] = 711256 ph...
serggrom/python-algorithms
Hash-tables.py
Python
gpl-3.0
446
#!/usr/bin/python # (c) Nelen & Schuurmans. GPL licensed, see LICENSE.txt. from optparse import make_option from django.core.management.base import BaseCommand from lizard_wbconfiguration.models import AreaField from django.db import transaction from django.db.models import get_model import logging logger = loggi...
lizardsystem/lizard-wbconfiguration
lizard_wbconfiguration/management/commands/wb_configuration.py
Python
gpl-3.0
1,672
#!/usr/bin/env python3 # -*- coding: utf8 -*- """Module to upload standin plans. This module is there in order to parse, figure out and uploads standin plans for the FLS Wiesbaden framework. """ __all__ = [] __version__ = '4.36.1' __author__ = 'Lukas Schreiner' import urllib.parse import urllib.error import traceba...
FLS-Wiesbaden/vplanUploader
flsvplan.py
Python
gpl-3.0
15,692
from Social import * class Comment(db.Model): __tablename__ = "Comments" Id = db.Column(db.Integer, unique=True, primary_key=True) post = db.Column(db.Integer) author = db.Column(db.String(20)) text = db.Column(db.String(500)) date = db.Column(db.DateTime(25)) def __init__(self, post, aut...
JackSpera/NapNap
Models.py
Python
gpl-3.0
2,444
# -*- coding: utf-8 -*- """ Started on thu, jun 21st, 2018 @author: carlos.arana """ # Librerias utilizadas import pandas as pd import sys module_path = r'D:\PCCS\01_Dmine\Scripts' if module_path not in sys.path: sys.path.append(module_path) from VarInt.VarInt import VarInt from classes.Meta import Meta from Comp...
Caranarq/01_Dmine
99_Descentralizacion/P9902/P9902.py
Python
gpl-3.0
2,753
import configparser import logging import os from shutil import copyfile class wordclock_config: def __init__(self, basePath): self.loadConfig(basePath) def loadConfig(self, basePath): pathToConfigFile = basePath + '/wordclock_config/wordclock_config.cfg' pathToReferenceConfigFile = b...
bk1285/rpi_wordclock
wordclock_tools/wordclock_config.py
Python
gpl-3.0
1,847
import enum from zope.schema.interfaces import IBaseVocabulary from zope.interface import directlyProvides from isu.enterprise.enums import vocabulary @vocabulary('mural') @enum.unique class Mural(enum.IntEnum): Extramural = 0 Intramural = 1 @vocabulary('degree') @enum.unique class Degree(enum.IntEnum): ...
isu-enterprise/isu.college
src/isu/college/enums.py
Python
gpl-3.0
1,242
import base64 from django.contrib.auth import authenticate import logging def basic_http_authentication(request): if not 'HTTP_AUTHORIZATION' in request.META: return None auth = request.META['HTTP_AUTHORIZATION'].split() user = None if len(auth) == 2: if auth[0].lower() == "basic": ...
efornal/shoal
app/http_auth.py
Python
gpl-3.0
468
import sys if sys.version_info > (3,): from builtins import chr import unittest import os import re from adsft import extraction, rules, utils from adsft.tests import test_base from adsputils import load_config import unittest import httpretty from requests.exceptions import HTTPError class TestXMLExtractorBase(t...
adsabs/ADSfulltext
adsft/tests/test_extraction.py
Python
gpl-3.0
40,776
''' Created on Sep 02, 2014 :author: svakulenko ''' # Bing API Version 2.0 # sample URL for web search # https://api.datamarket.azure.com/Bing/Search/Web?$format=json&Query=%27Xbox% # 27&$top=2 from eWRT.ws.rest import RESTClient from eWRT.ws import AbstractIterableWebSource class BingSearch(AbstractIterableWebSou...
weblyzard/ewrt
src/eWRT/ws/bing/search.py
Python
gpl-3.0
2,765
from vsg.rules import token_prefix as Rule from vsg import token lTokens = [] lTokens.append(token.alias_declaration.alias_designator) class rule_600(Rule): ''' This rule checks for valid prefixes on alias designators. Default prefix is *a\_*. |configuring_prefix_and_suffix_rules_link| **Vio...
jeremiah-c-leary/vhdl-style-guide
vsg/rules/alias_declaration/rule_600.py
Python
gpl-3.0
689
import json import mailbox import numpy as np from nltk.corpus import stopwords from nltk.stem import WordNetLemmatizer from sklearn.feature_extraction.text import TfidfVectorizer from lib.analysis.author import ranking from lib.util import custom_stopwords from lib.util.read import * def get_top_autho...
prasadtalasila/MailingListParser
lib/input/mbox/keyword_digest.py
Python
gpl-3.0
11,492
#!/usr/bin/env python2 import netsnmp import argparse def getCAM(DestHost, Version = 2, Community='public'): sess = netsnmp.Session(Version = 2, DestHost=DestHost, Community=Community) sess.UseLongNames = 1 sess.UseNumeric = 1 #to have <tags> returned by the 'get' methods untranslated (i.e. dotted-decimal). Bes...
c4ffein/snmp-cam-table-logger
getCAM.py
Python
gpl-3.0
2,240
#castle script for minecraft by joshua cartwright from mcpi import minecraft from mcpi import block import time mc = minecraft.Minecraft.create() #castle pos = mc.player.getPos() #clear mc.setBlocks(pos.x-5,pos.y-1,pos.z-5,pos.x+5,pos.y+50,pos.z+5,block.AIR) #floor mc.setBlocks(pos.x-5,pos.y-1,pos.z-5,pos.x+5,pos.y...
UTC-Sheffield/mcpi_ideas
misc/Castle.py
Python
gpl-3.0
5,725
# generated from genmsg/cmake/pkg-genmsg.context.in messages_str = "/home/mkhuthir/learnROS/src/chessbot/src/nasa_r2_simulator/gazebo_taskboard/msg/TaskboardPanelA.msg" services_str = "/home/mkhuthir/learnROS/src/chessbot/src/nasa_r2_simulator/gazebo_taskboard/srv/ManipulateNumPad.srv;/home/mkhuthir/learnROS/src/chess...
mkhuthir/catkin_ws
src/chessbot/build/nasa_r2_simulator/gazebo_taskboard/cmake/gazebo_taskboard-genmsg-context.py
Python
gpl-3.0
1,163
from brainforge.learner import Backpropagation from brainforge.layers import Dense from brainforge.optimizers import Momentum from brainforge.util import etalon class DNI: def __init__(self, bpropnet, synth): self.bpropnet = bpropnet self.synth = synth self._predictor = None def pred...
csxeba/brainforge
xperiments/xp_decoupled.py
Python
gpl-3.0
1,775
__author__ = 'Davide' import win32api import win32con import socket # stop not defined VK_MEDIA_STOP = 0xB2 class RemoteController: def play_pause(self): win32api.keybd_event(win32con.VK_MEDIA_PLAY_PAUSE, 34) def stop(self): win32api.keybd_event(VK_MEDIA_STOP, 34) def next(self): ...
DavideCanton/Python3
wmp_remote/server.py
Python
gpl-3.0
1,561
import theano import theano.tensor as T import numpy as np class RNN: """ Base class containing the RNN weights used by both the encoder and decoder """ def __init__(self, K, embedding_size, hidden_layer=8, use_context_vector=F...
pepijnkokke/ull2
code/rnn.py
Python
gpl-3.0
2,367
#!/usr/bin/python # 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. # # Ansible is distributed...
hryamzik/ansible
lib/ansible/modules/cloud/amazon/elb_application_lb.py
Python
gpl-3.0
21,506
#-*-:coding:utf-8-*- from blindtex.latex2ast import converter #from latex2ast import ast from blindtex.interpreter import dictionary to_read = {'simple_superscript' : 'super %s ', 'comp_superscript' : 'super %s endSuper ', 'simple_subscript' : 'sub %s ', 'comp_subscript'...
blindtex/blindtex
blindtex/interpreter/reader.py
Python
gpl-3.0
14,005
import logging from agent import run logger = logging.getLogger(__name__) def example_experiment(): repeat = 5 avg_rew = 0.0 episodes = 100000 sleep = 0.00 params = run.getparams(episodes) reward_list = [] for i in range(repeat): reward, allparams, totrewlist, totrewavglist, greedy...
davidenitti/ML
RL/run_agent.py
Python
gpl-3.0
604
timer = 500 # delay in milliseconds def toggle(): pass
librallu/RICM4Projet
tests/led/led.py
Python
gpl-3.0
57
# -*- coding: utf-8 -*- # # Copyright (C) Translate House and contributors. # # This file is a part of the PyLIFF project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import pytest @pytest.mark.te...
translate/pyliff
tests/target.py
Python
gpl-3.0
668
from django.contrib import admin from comun.models import Departamento, Partido admin.site.register(Departamento) admin.site.register(Partido)
mmanto/sstuv
comun/admin.py
Python
gpl-3.0
144
# coding: utf-8 """ Copyright (c) 2013 João Bernardo Vianna Oliveira This file is part of Discoder. Discoder 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 ...
jbvsmo/discoder
discoder/distributed/server.py
Python
gpl-3.0
3,939
# -*- coding: utf-8 -*- """ env.testsuite.blueprints ~~~~~~~~~~~~~~~~~~~~~~~~~~ Blueprints (and currently mod_auth) :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import flask import unittest import warnings from flask.testsuite import FlaskTestCase, emit...
ncdesouza/bookworm
env/lib/python2.7/site-packages/flask/testsuite/blueprints.py
Python
gpl-3.0
28,088
# ! /usr/bin/env python2.7 # _*_ coding:utf-8 _*_ """ @author = lucas.wang @create_time = 2018-01-12 """ import optparse import os import sys import getpass import json import hashlib import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.header import Header fr...
Lucas-Wong/ToolsProject
IOS/ipa.py
Python
gpl-3.0
13,459
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-08-26 08:49 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("accounts", "0001_squashed_0037_auto_20180416_1406")] operations = [ migrations.AddField...
dontnod/weblate
weblate/accounts/migrations/0002_profile_uploaded.py
Python
gpl-3.0
466
#!/usr/bin/python # # original code from adafruit, see below copyrights # hacked version for bioreactor one # #-------------------------------------------------------------------------------------------- # -- 031616 -- converting temp to fahrenhight, and logging # -- 031816 -- adding in the led libraries to do a simp...
alchemycomputing/raspberrypi-bioreactorproject
maxscroller.py
Python
gpl-3.0
13,796
######################################################################## # $HeadURL$ # File : InstallTools.py # Author : Ricardo Graciani ######################################################################## """ Collection of Tools for installation of DIRAC components: MySQL, DB's, Services's, Agents It only ...
Sbalbp/DIRAC
Core/Utilities/InstallTools.py
Python
gpl-3.0
88,169
#!/usr/bin/env python # encoding:utf-8 # __author__: huxianglin # date: 2016-09-17 # blog: http://huxianglin.cnblogs.com/ http://xianglinhu.blog.51cto.com/ import os from module import actions from module import db_handler from conf import settings ATM_AUTH_DIR = settings.DATABASE["path"] ATM_CARD_LIST=os.listdir(ATM...
huxianglin/pythonstudy
week05-胡湘林/ATM/ATM/module/auth.py
Python
gpl-3.0
3,084
"""This is part of the Mouse Tracks Python application. Source: https://github.com/Peter92/MouseTracks """ #Import the local scipy if possible, otherwise fallback to the installed one from __future__ import absolute_import from ...utils.numpy import process_numpy_array try: from .gaussian import gaussian_filter ...
Peter92/MouseTrack
mousetracks/image/scipy/__init__.py
Python
gpl-3.0
718
from DIRAC import S_OK from DIRAC.AccountingSystem.Client.Types.Pilot import Pilot from DIRAC.AccountingSystem.private.Plotters.BaseReporter import BaseReporter class PilotPlotter(BaseReporter): _typeName = "Pilot" _typeKeyFields = [dF[0] for dF in Pilot().definitionKeyFields] def _reportCumulativeNumbe...
DIRACGrid/DIRAC
src/DIRAC/AccountingSystem/private/Plotters/PilotPlotter.py
Python
gpl-3.0
9,695
# -*- coding: utf-8 -*- from gettext import gettext as _ EXP1 = [ _('Regions'), ['lineasDepto'], [], ['deptos'] ] EXP2 = [ _('Regional capitals'), ['lineasDepto', 'capitales'], [], ['capitales'] ] EXP3 = [ _('Cities'), ['lineasDepto', 'capitales', 'ciudades'], [], ['c...
AlanJAS/iknowAmerica
recursos/0guyana/datos/explorations.py
Python
gpl-3.0
550
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, divi...
mganeva/mantid
Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectILLReductionFWSTest.py
Python
gpl-3.0
3,560
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2016 Pambudi Satria (<https://github.com/pambudisatria>). # @author Pambudi Satria <pambudi.satria@yahoo.com> # # This program is free software: you can redistribute it and/or modify ...
sumihai-tekindo/account_sicepat
sicepat_erp/invoice_line_jne_number/invoice_line_jne_number.py
Python
gpl-3.0
1,191
# vim: ts=8:sts=8:sw=8:noexpandtab # # This file is part of ReText # Copyright: 2017-2021 Dmitry Shachnev # # 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 # ...
retext-project/retext
ReText/preview.py
Python
gpl-3.0
3,107
#!/usr/bin/python ''' Argument parser for infile/outfile for converters ''' import argparse import sys import os.path class Parser: def __init__(self): self.args = self.parse() self.verify() def parse(self): p = argparse.ArgumentParser(description="Convert SLAB6 VOX files t...
Gnomescroll/Gnomescroll
tools/vox_lib/converters/converter_args.py
Python
gpl-3.0
1,296
import psycopg2 as dbapi2 import datetime class Favorite: def __init__(self, app): self.app = app def initialize_Favorite(self): with dbapi2.connect(self.app.config['dsn']) as connection: try: cursor = connection.cursor() cursor.execute(""...
itucsdb1618/itucsdb1618
favorite.py
Python
gpl-3.0
3,818
#!/usr/bin/python import logging import argparse import os import os.path import re from datetime import datetime from datetime import timedelta BasePOSIXTime = datetime(1970, 1, 1) def GetPOSIXTimestamp(dateTimeObj): return int((dateTimeObj - BasePOSIXTime) / timedelta(seconds = 1)) def ListPhotos(): retur...
WesleyLight/FlickrREST
python/flickr.py
Python
gpl-3.0
1,192
import os import shutil import pytest import __builtin__ from libturpial.config import * from libturpial.exceptions import EmptyOAuthCredentials from tests.helpers import DummyFileHandler class DummyConfigParser: def read(self, value): pass def sections(self): return [] def options(self)...
satanas/libturpial
tests/test_config.py
Python
gpl-3.0
14,032
from django import forms from .models import Client, Contact class ClientForm(forms.ModelForm): class Meta: model = Client fields = ('first_name', 'last_name', 'city', 'email', 'phone_number', 'comment', ) class ContactForm(forms.ModelForm): ...
rklimcza/not-yet-crm
crm/forms.py
Python
gpl-3.0
407
""" """ from __future__ import absolute_import import logging import json from datetime import datetime from flask import render_template from flask import request from flask import make_response from . import app from ..utils.slack import Slack from ..models.breakfast import Breakfast def datetime_handler(x): ...
jeremlb/breakfast-tracker
server/controllers/index.py
Python
gpl-3.0
2,838
# Dictionary data structure in python # Dictionary sample_dict = {"Roll": 50, "Name": "Nityan"} # Looping to get key and values from dictionary for key in sample_dict: print(key, sample_dict[key]) # List of keys keys = list(sample_dict.keys()) print("Keys = ", keys) # List of values values = list(...
nityansuman/Python-3
data_structures/dictionary.py
Python
gpl-3.0
995
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-06-13 20:05 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.Creat...
migglu/song-streamer
songstreamer/songs/migrations/0001_initial.py
Python
gpl-3.0
1,687
from calfbox._cbox2 import * from io import BytesIO import struct import sys import traceback import calfbox.metadata as metadata #local file metadata.py type_wrapper_debug = False is_python3 = not sys.version.startswith("2") ############################################################################### # Ugly intern...
kfoltman/calfbox
py/cbox.py
Python
gpl-3.0
47,278
# (c) Copyright 2014, University of Manchester # # This file is part of Pynsim. # # Pynsim 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 optio...
UMWRG/demos
WaterAllocationDemo/model/pynsim/engines/allocation.py
Python
gpl-3.0
2,662
import sys,time from . import argparser if sys.version < '3': from threading import Semaphore class Barrier: def __init__(self, n): self.n = n self.count = 0 self.mutex = Semaphore(1) self.barrier = Semaphore(0) def wait(self): self....
intfrr/btproxy
libbtproxy/utils.py
Python
gpl-3.0
1,903
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-10 14:02 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('accounts', '0001_initial'), ] operations = [ ...
ravigadila/seemyhack
seemyhack/accounts/migrations/0002_userextra.py
Python
gpl-3.0
889
"""Power Supply Diag App.""" from ... import csdev as _csdev from ...namesys import SiriusPVName as _PVName from ...search import PSSearch as _PSSearch class ETypes(_csdev.ETypes): """Local enumerate types.""" DIAG_STATUS_LABELS_AS = ( 'PS Disconnected/Comm. Broken', 'PwrState-Sts Off', ...
lnls-sirius/dev-packages
siriuspy/siriuspy/diagsys/psdiag/csdev.py
Python
gpl-3.0
2,251
#!/usr/bin/env python # coding=utf-8 # # Copyright 2017 Ilya Zhivetiev <i.zhivetiev@gnss-lab.org> # # This file is part of tec-suite. # # tec-suite 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 versio...
gnss-lab/tec-suite
tecs/rinex/v2/o.py
Python
gpl-3.0
18,274
#!/usr/bin/env python """ Quick and dirty IRC notification script. Any '{var}'-formatted environment variables names will be expanded along with git "pretty" format placeholders (like "%H" for commit hash, "%s" for commit message subject, and so on). Use commas to delineate multiple messages. Example: python script...
gridsync/gridsync
scripts/irc-notify.py
Python
gpl-3.0
2,150
#!/usr/bin/env python # -*- coding: UTF-8 -*- import gtk import sqlalchemy VOCABULARY_DB = "sqlite:///data/vocabulary.db" class EntryDialog(gtk.MessageDialog): def __init__(self, *args, **kwargs): ''' Creates a new EntryDialog. Takes all the arguments of the usual MessageDialog constructor...
tomas-mazak/taipan
taipan/vocabulary.py
Python
gpl-3.0
9,999
import logging from ..exports import ObjectCollectorMixin, ListCollector #: Event name used to signal members to perform one-time initialization INITIALIZE = 'initialize' class Hooks(ObjectCollectorMixin, ListCollector): """ This class collects event hooks that should be installed during supervisor sta...
Outernet-Project/librarian
librarian/core/collectors/hooks.py
Python
gpl-3.0
927
"""Sis_legajos URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Clas...
Informatorio/Sis_LegajosV2
Sis_legajos/urls.py
Python
gpl-3.0
3,985
# coding: utf-8 import os import re import hashlib import time from string import strip from datetime import datetime, timedelta, date from dateutil.relativedelta import relativedelta from flask import current_app, request, flash, render_template, session, redirect, url_for from lac.data_modelz import * from lac.helper...
T3h-N1k0/LAC
lac/engine.py
Python
gpl-3.0
57,871
# -*- coding: utf-8 -*- """ """ # Copyright (C) 2015 ZetaOps Inc. # # This file is licensed under the GNU General Public License v3 # (GPLv3). See LICENSE.txt for details. from ulakbus.models import User from .general import fake __author__ = 'Ali Riza Keles' def new_user(username=None, password=None, superuser=F...
yetercatikkas/ulakbus
tests/fake/user.py
Python
gpl-3.0
515
# Mark Gatheman <markrg@protonmail.com> # # This file is part of Hydrus. # # Hydrus 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. # ...
mark-r-g/hydrus
tests/__init__.py
Python
gpl-3.0
1,488
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Setting', fields=[ ('id', models.AutoField(verb...
alirizakeles/tendenci
tendenci/apps/site_settings/migrations/0001_initial.py
Python
gpl-3.0
1,684
import player import gui import distro class master: def startplayer(self): person = player.person() def __init__(self): total = 1.8 self.userin = gui.cligui() [stability,community,bleedingedge] = self.userin.startup(total) self.playerdistro = distro.distrobution(stabilit...
scifi6546/distrowars
master.py
Python
gpl-3.0
773
#!/usr/bin/python """ Read a bulkConverted file and create a matix with top genes to visualize it in R Patrick's analysis without Excel ;-) """ import sys result = dict() allsamples = set() for i in open(sys.argv[1]): if i.startswith("#"): continue fields = i.rstrip().split() sample = fields[1] gen...
TravisCG/SI_scripts
pattab.py
Python
gpl-3.0
804
# -*- coding: utf-8 -*- # Copyright (c) 2012 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing a dialog to show GreaseMonkey script information. """ from __future__ import unicode_literals from PyQt5.QtCore import pyqtSlot from PyQt5.QtWidgets import QDialog from .Ui_GreaseMonkeyConfigur...
davy39/eric
Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationScriptInfoDialog.py
Python
gpl-3.0
2,163
#!/usr/bin/python import sys print "genotype\ttemp\tgenotype:temp" for i in open(sys.argv[1]): fields = i.rstrip().split() if i.startswith("[1]"): hormon = fields[1].replace('"', '') if i.startswith("genotype "): pg = fields[5] if i.startswith("temp"): pt = fields[5] if i.startswith("genotype:temp"): p...
TravisCG/SI_scripts
reconv.py
Python
gpl-3.0
387
import os import datetime import calendar import sqlite3 as sqlite import geomag import tkinter from tkinter import ttk, filedialog, messagebox #separate imports needed due to tkinter idiosyncrasies import sqlparse # local objects from classes import stdevs, meanw, stdevw ### begin function defintion ### def run_sql...
wlieurance/aim-reporting
update.py
Python
gpl-3.0
8,077
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2020 Satpy developers # # This file is part of satpy. # # satpy 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...
pytroll/satpy
satpy/tests/reader_tests/test_mviri_l1b_fiduceo_nc.py
Python
gpl-3.0
19,070
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-05-26 22:08 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('event', '0022_event_number_limit_subscription'), ] operations = [ migrations.AlterM...
sandrofolk/girox
girox/event/migrations/0023_auto_20170526_2208.py
Python
gpl-3.0
482
''' Created on Dec 23, 2013 @author: yusuf ''' #list by: type, name etc. def listFilesAndDirs(listType='a'): from os import listdir from os.path import isfile, join from genericpath import isdir mypath = "." files = [ f for f in listdir(mypath) if isfile(join(mypath,f)) ] directo...
yusufb/file-manager
modules/list.py
Python
gpl-3.0
698
import discord from discord.ext import commands class Helputil: """Shane's custom help utility for Dolores.""" def __init__(self, bot): self.bot = bot @commands.command(pass_context=True) async def dolores(self, ctx): """Dolores command reference.""" #Adds reaction to messa...
bucklingspring/dolores
cogs/helputil/helputil.py
Python
gpl-3.0
3,931
# coding: utf-8 __author__ = 'Math' import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation import random from scipy.interpolate import interp1d, PchipInterpolator, splrep, splev import matplotlib.patches as patches import matplotlib.path as path import matplotlib as mpl from mpltoo...
grupoanfi/orderbook-data-analysis
ODA/shape.py
Python
gpl-3.0
12,925