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 Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
DavidAndreev/indico
indico_zodbimport/modules/user_management.py
Python
gpl-3.0
1,504
# -*- coding: utf-8 -*- import gtk settings = { 'size':4, } class config(gtk.Frame): def __init__(self, conf, ind): gtk.Frame.__init__(self) self.conf = conf self.ind = ind self.settings = conf.launcher[ind] self.set_border_width(5) framebox = gt...
justbrowsing/justbrowsing-adeskbar
src/plugins/conf/spacer.py
Python
gpl-3.0
1,134
######################################################################## # $Id$ ######################################################################## """ A set of common tools to be used in pilot commands """ import sys import time import os import pickle import getopt import imp import types import urllib2 import...
rajanandakumar/DIRAC
WorkloadManagementSystem/PilotAgent/pilotTools.py
Python
gpl-3.0
16,707
from setuptools import setup setup( name='jenkins-jobs-hidden-param', version='0.1.0', description='Jenkins Job Builder Hidden Param', url='https://github.com/ochirkov/jenkins-job-builder-hidden-param', author='Chyrkov Oleksandr', author_email='ironloriin20@gmail.com', license='MIT license'...
ochirkov/jenkins-job-builder-hidden-param
setup.py
Python
gpl-3.0
941
from GEMEditor.analysis.duplicates.functions import merge_reactions, merge_metabolites from GEMEditor.analysis.duplicates.ui.TreeViewDialog import Ui_Duplicates from GEMEditor.base import Settings, restore_state from GEMEditor.base.dialogs import CustomStandardDialog from GEMEditor.model.display.tables import ReactionB...
JuBra/GEMEditor
GEMEditor/analysis/duplicates/dialog.py
Python
gpl-3.0
5,459
#!/usr/bin/python ''' Importing The required Modules ''' import wx, sys, requests, urllib2, re, os, Queue from bs4 import BeautifulSoup from wx.lib.mixins.listctrl import CheckListCtrlMixin, ListCtrlAutoWidthMixin from wx.lib.mixins.listctrl import ListCtrlAutoWidthMixin import threading, time import cStringIO import...
QuinAsura/VLAD
__link_gen__.py
Python
gpl-3.0
4,115
from ....common.db.sql import VARCHAR, Numeric as NUMBER, DateTime as DATETIME, Column, BaseModel, CLOB, DATE VARCHAR2 = VARCHAR class ChinaOptionDescription(BaseModel): """ 4.192 中国期权基本资料 Attributes ---------- object_id: VARCHAR2(100) 对象ID s_info_windcode: VARCHAR2(40) Win...
SnowWalkerJ/quantlib
quant/data/wind/tables/chinaoptiondescription.py
Python
gpl-3.0
2,005
import theano import theano.tensor as T import numpy as np class GRU: """ Base class containing the GRU weights used by both the encoder and decoder """ def __init__(self, K, embedding_size, hidden_layer=8, use_context_vector=F...
pepijnkokke/ull2
code/gru.py
Python
gpl-3.0
4,074
from .plugin import PlushiePlugin, plushieCmd, commandDoc import sqlite3 import datetime class LastSeenPlugin(PlushiePlugin): name = "Last Said Plugin" description = "See the last thing someone said" authors = ["Garth"] def __init__(self): self.db = sqlite3.connect("chat.db", detect_types=sq...
Etzos/PlushieBot
plugins/lastseenplugin.py
Python
gpl-3.0
5,630
''' Seetings using sqlite databases. Sqlite databases are rather unreliable but good for quick hacks since python supports them out of the box. There are only two reasons you might want to use this environment: * You are on a machine without a compiler and without pgsql python bindings. * You are testing the dat...
grochmal/hq-dw
hq-dw/conf/dev_sqlite.py
Python
gpl-3.0
1,132
"""Provides some common helper functions.""" import math, re, os.path, sys, time, ctypes try: from PIL import Image, ImageTk except: import Image, ImageTk basedir = os.path.dirname(os.path.abspath(__file__)) def is_str(x): """Checks if a given value is a string (8-bit or unicode). ...
cvjena/artos
PyARTOS/utils.py
Python
gpl-3.0
8,690
# Copyright 2008 Dan Smith <dsmith@danplanet.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is ...
cl4u2/chirp
chirp/ic9x_ll.py
Python
gpl-3.0
15,763
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function import hourly, sys, copy length = 48 maxdiff = 2 data = hourly.load('ottawa') values = [] results = {} def handleValue(v): global values if len(v): v = float(v) #print "append(%f,%s)" % (v, values), valu...
endlisnis/weather-records
constantHours.py
Python
gpl-3.0
882
import Instruments import epydoc.apidoc
SirenB/RealCon
ClimateChamberExample.py
Python
gpl-3.0
42
# -*- coding: utf-8 -*- # This file is part of AudioLazy, the signal processing Python package. # Copyright (C) 2012-2016 Danilo de Jesus da Silva Bellini # # AudioLazy 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...
danilobellini/audiolazy
audiolazy/lazy_poly.py
Python
gpl-3.0
19,319
#!/usr/bin/env python # This file is part of nexdatas - Tango Server for NeXus data writer # # Copyright (C) 2012-2017 DESY, Jan Kotanski <jkotan@mail.desy.de> # # nexdatas is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the ...
nexdatas/writer
test/TangoFieldTagServerH5PY_test.py
Python
gpl-3.0
4,817
#! /usr/bin/env python3 # -*- coding: utf8 -*- # # This file is part of Hercules. # http://herc.ws - http://github.com/HerculesWS/Hercules # # Copyright (C) 2015-2021 Hercules Dev Team # Copyright (C) 2015 Andrei Karas (4144) # # Hercules is free software: you can redistribute it and/or modify # it under the terms of t...
Jedzkie/Hercules
tools/mobdbconverter.py
Python
gpl-3.0
11,443
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # --------------------------------------------------------------------------- # # # # iSida bot VI plugin # # Copyright (C) Vitaliy...
isida/vi
plugins/xkcd.py
Python
gpl-3.0
2,085
#! /bin/python3 """ 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 in the hope that it will be us...
fneuorg/fneuproject
setup.py
Python
gpl-3.0
1,651
from yanntricks import * def CbCartTuiii(): pspict,fig = SinglePicture("CbCartTuiii") pspict.dilatation(2) x=var('x') f1=phyFunction(sin(2*x)) f2=phyFunction(sin(3*x)) courbe=ParametricCurve(f1,f2).graph(0,2*pi) pspict.DrawGraphs(courbe) pspict.DrawDefaultAxes() fig.conclude() ...
LaurentClaessens/mazhe
src_yanntricks/yanntricksCbCartTuiii.py
Python
gpl-3.0
343
''' Citizen Science Portal: App containing Agent Exoplant and Show Me Stars for Las Cumbres Observatory Global Telescope Network Copyright (C) 2014-2015 LCOGT 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 Foun...
tomasjames/citsciportal
app/showmestars/admin.py
Python
gpl-3.0
829
# # Copyright © 2012 - 2021 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.org/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
phw/weblate
weblate/accounts/tests/test_utils.py
Python
gpl-3.0
1,584
# Copyright: (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # Copyright: (c) 2018, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = typ...
tareqalayan/ansible
lib/ansible/plugins/action/__init__.py
Python
gpl-3.0
50,679
import logging import os import queue from logging import config as logging_config __logger = logging.getLogger(__name__) DEBUG = True #: Set when tests are being run. Automatically mocks certain aspects of the #: system like hard-drive overwriting TESTING = False #: Detect if we're running on a CI - some tests wi...
fairdk/lcrs-embedded
lcrs_embedded/settings.py
Python
gpl-3.0
3,280
panel_bg = '#1a2740' panel_border = 'none' real_panel_bg = '#232631' icon_color = '#e6e6e6' text_css = { 'css': { 'color': icon_color, 'background-color': real_panel_bg, 'font-size': '14px', 'font-family': 'Hack, FontAwesome' } } def bounds(): return {'x': 0, 'y': 1054, 'w...
TSedlar/gr8bar
test/bluebird/bottom.py
Python
gpl-3.0
533
from sqlalchemy import * from migrate import * from migrate.changeset import schema pre_meta = MetaData() post_meta = MetaData() upgrade = Table('upgrade', post_meta, Column('id', Integer, primary_key=True, nullable=False), Column('level', Integer), Column('cost', String(length=20)), Column('hero_id',...
tomasvalettini/tap-titans
db_repository/versions/005_migration.py
Python
gpl-3.0
781
# Copyright 2014, 2018, 2019, 2020 Andrzej Cichocki # This file is part of pym2149. # # pym2149 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...
combatopera/pym2149
pym2149/test_nod.py
Python
gpl-3.0
1,300
#!/usr/bin/env python #coding=utf8 import numpy as np def getFileContent(file_path): import os if not os.path.exists(file_path): return False result = [] try: f = open(file_path, 'r') for l in f.readlines(): l = l.strip("\r\n") result.append(l.split(","...
fixbugs/py-fixbugs-tools
test/markmov/markmove1sl.py
Python
gpl-3.0
1,373
#!/usr/bin/env python import lib import sys import prettyplotlib as ppl import numpy as np import matplotlib.pyplot as plt if __name__=='__main__': # Parse command line options if len(sys.argv)<=1: print "Please set loop numbers" sys.exit() graph=False if len(sys.argv)>2: g...
badele/prime-number
search_not_mersenne.py
Python
gpl-3.0
635
class LIVertex: def __init__(self, index, co, no, uv, we): self.index = index self.co = co self.no = no self.uv = uv self.we = we def write(self, writer): writer.write_float(self.uv[0]) writer.write_float(1.0 - self.uv[1]) writer.write_float(self.no.x) writer.write_float(self.no.y) writer.write_...
bsmr-games/lipsofsuna
tool/lipsofsuna_export/vertex.py
Python
gpl-3.0
638
import PyHyperNEAT as neat import os, sys from subprocess import call from datetime import datetime start_dir = os.getcwd() experiment_run_dir = "../external/HyperNEAT/NE/HyperNEAT/out" experiment_data_dir = "data" experiment_name = "Xor" experiment_number = 1 output_name = "output" # Specified experi...
anthonytw/neat-deform
src/util/experiment.py
Python
gpl-3.0
1,248
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('mapvotes', '0001_initial'), ] operations = [ migrations.AddField( model_name='marker', name='voting'...
CivilHub/CivilHub
mapvotes/migrations/0002_marker_voting.py
Python
gpl-3.0
490
from django.contrib import admin from documentos.models import Expediente, ExpedienteLey, Pase class PaseInLine(admin.TabularInline): model = Pase extra = 0 class ExpedienteAdmin(admin.ModelAdmin): search_fields = ['caracteristica','partido__nombre', 'region', 'numero', 'anio', 'alcance', 'cuerpo'] fieldsets = [...
mmanto/sstuv
documentos/admin.py
Python
gpl-3.0
1,146
# -*- coding: utf-8 -*- ''' Mepinta Copyright (c) 2011-2012, Joaquin G. Duo, mepinta@joaquinduo.com.ar This file is part of Mepinta. Mepinta 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 th...
joaduo/mepinta
plugins/python/demo/plugins/python/processors/demov1/Geometry2D/output/StdoutPrint/StdoutPrint__0001.py
Python
gpl-3.0
2,004
# nxt.sensor.hitechnic module -- Classes to read HiTechnic sensors # Copyright (C) 2006,2007 Douglas P Lau # Copyright (C) 2009 Marcus Wanner, Paulo Vieira, rhn # Copyright (C) 2010 rhn, Marcus Wanner, melducky, Samuel Leeman-Munk # Copyright (C) 2011 jerradgenson, Marcus Wanner # # This program is free software: y...
bsellentin/minded
nxt/sensor/hitechnic.py
Python
gpl-3.0
23,391
__all__ = ['default_app_config'] default_app_config = 'bootstrap4_skin.apps.Bootstrap4SkinAppConfig'
romanvm/romans_blog
bootstrap4_skin/__init__.py
Python
gpl-3.0
102
""" Collection of utilities for locating certs, proxy, CAs """ import os import DIRAC from DIRAC import gConfig g_SecurityConfPath = "/DIRAC/Security" def getProxyLocation(): """Get the path of the currently active grid proxy file""" for envVar in ["GRID_PROXY_FILE", "X509_USER_PROXY"]: if envVar in...
DIRACGrid/DIRAC
src/DIRAC/Core/Security/Locations.py
Python
gpl-3.0
5,896
# Copyright (c) David Wilson 2015 # Icarus 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. # Icarus is distributed in the hope that it...
jeroanan/GameCollection
UI/Tests/Handlers/TestSigninHandler.py
Python
gpl-3.0
6,351
#!/usr/bin/python3 """ This file contains functions that read data in xlsx format. They also preprocess the data and wrap them into a namedtuple. Author: Howard Cheung (howard.at@gmail.com) Date: 2017/04/11 License of the source code: MIT license """ # import python internal libraries from datetim...
howardcheung/data-preprocessing-helper
src/data_read.py
Python
gpl-3.0
13,416
# coding=utf-8 """ Test Suite for Cadasta. Contact : etienne at kartoza dot com .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your ...
Cadasta/cadasta-qgis-plugin
test_suite.py
Python
gpl-3.0
1,525
#!/usr/bin/python3 from pyrob.api import * @task def task_8_11(): while (wall_is_on_the_right() != True): if (wall_is_above() != True): move_up() fill_cell() move_down() if(wall_is_beneath() != True): move_down() fill_cell() ...
lesina/labs2016
Laba04/task_14.py
Python
gpl-3.0
724
#!/usr/bin/env python import sys,sqlite3 from sqlite3_extensions import safecursor if __name__ == "__main__": if len(sys.argv) < 2: print ("usage: add_tables.py [database]") sys.exit(0) database = sys.argv[1] con = sqlite3.connect(database) curup = con.cursor(safecursor) cmds = list() curup.pexecute("cr...
chinchliff/autophy
other_scripts/src_cody/add_tables.py
Python
gpl-3.0
2,099
# TODO decide where all this shit should reside from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker engine_template = ( 'mysql+pymysql://wiki:ner0_ceasar@localhost/{db_name}?' 'charset=utf8' ) db_name = 'wiki' test_db_name = 'wiki_test' engine = create_engine( engine_template.forma...
Zlira/wikipageviews
db/db_conf.py
Python
gpl-3.0
514
print("Test Michael 2") x = 100 y = 200 s = x + y print("Сумма равна ", s) print("Test Maxim 2")
RomanovMaxim/Python2016_test
test_michael_2.py
Python
gpl-3.0
108
#!/usr/bin/env python # -*- coding: utf-8 -*- __all__ = ['getsubnet']
n4xh4ck5/wh01p
modules/getsubnet/__init__.py
Python
gpl-3.0
73
#!/usr/bin/python import logging logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s") import procgame.game, sys, os import procgame.config import random import procgame.sound import pygame sys.path.insert(0,os.path.pardir) import bingo_emulator.common.units as units i...
bingopodcast/bingos
bingo_emulator/the_twist/game.py
Python
gpl-3.0
71,172
# coding=utf-8 import argparse from gevent.wsgi import WSGIServer from app import app def main(): parser = argparse.ArgumentParser() parser.add_argument('-p', '--port', help='server port', type=int, default=9000) args = parser.parse_args() http_server = WSGIServer(('', args.po...
dongweiming/web_develop
chapter6/section1/gevent_wsgi.py
Python
gpl-3.0
402
from django.core.urlresolvers import reverse_lazy from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse from horizon import exceptions from horizon import forms import json from crystal_dashboard.dashboards.crystal.controllers.instances import forms as instances_forms from...
Crystal-SDS/dashboard
crystal_dashboard/dashboards/crystal/controllers/instances/views.py
Python
gpl-3.0
2,229
#!/usr/bin/python # onlinewikipedia.py: Demonstrates the use of online VB for LDA to # analyze a bunch of random Wikipedia articles. # # Copyright (C) 2010 Matthew D. Hoffman # # 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...
salilnavgire/OnlineLDA
onlinewikipedia.py
Python
gpl-3.0
2,786
# # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2012 Star2Billing S.L. # # The Init...
faddai/newfies-dialer
newfies/dialer_cdr/admin.py
Python
mpl-2.0
11,981
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import unittest from mock import Mock from snorky.services.datasync.subscription import \ Subscription, Subscrip...
ntrrgc/snorky
snorky/tests/test_subscription_manager.py
Python
mpl-2.0
2,538
a = abs(1) b = bin(1) b = b + "2" c = all([1, 2]) d = chr(1) d = d + "" e = complex() f = dir() h, i = divmod(c, 2.0) hh = h ii = i j = float(b) k = hash(j) l = int(j) m = str(l) f[l] f[k] # b := str # d := str # f := List[str] # k := int # l := int
caterinaurban/Typpete
typpete/unittests/inference/builtins_test.py
Python
mpl-2.0
251
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from marionette_harness import MarionetteTestCase class TestPageSource(MarionetteTestCase): def testShouldReturnTh...
Yukarumya/Yukarum-Redfoxes
testing/marionette/harness/marionette_harness/tests/unit/test_pagesource.py
Python
mpl-2.0
1,658
import cv2 PATH_PROTO = "/mnt/kodi/blackbird/Scry/models/3rd_party/vgg16/VGG_ILSVRC_16_layers_deploy.prototxt" PATH_WEIGHTS = "/mnt/kodi/blackbird/Scry/models/3rd_party/vgg16/VGG16_SalObjSub.caffemodel" Net = cv2.dnn.readNetFromCaffe(PATH_PROTO, PATH_WEIGHTS)
undertherain/benchmarker
benchmarker/kernels/vgg16/opencv.py
Python
mpl-2.0
263
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import treeherder.model.fields class Migration(migrations.Migration): dependencies = [ ('model', '0037_remove_refdata_activestatus'), ] operations = [ migrations.CreateModel( ...
akhileshpillai/treeherder
treeherder/model/migrations/0038_text_log_db.py
Python
mpl-2.0
2,117
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. """ This file provides tools to handle plotability of objects """ from sisl._dispatcher import ClassDispatcher, Abstract...
zerothi/sisl
sisl/viz/_plotables.py
Python
mpl-2.0
5,738
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, you can obtain one at http://mozilla.org/MPL/2.0/. """ WSGI config for tecken project. It exposes the WSGI callable as a module-level variable named ``application``. For...
mozilla-services/tecken
tecken/wsgi.py
Python
mpl-2.0
658
from smashbox.script import config import os.path import datetime import subprocess import time import requests import glob # Utilities to be used in the test-cases. from smashbox.utilities.version import version_compare from smashbox.utilities.monitoring import push_to_monitoring def compare_oc_version(compare_to,...
owncloud/smashbox
python/smashbox/utilities/__init__.py
Python
agpl-3.0
30,216
import numpy as np import os from shutil import copyfile try: import cPickle as pickle except ImportError: import pickle SMT_NOT_INSTALLED = False try: from smt.surrogate_models import KRG, KPLS, KPLSK, LS, QP except ImportError: SMT_NOT_INSTALLED = True OPENTURNS_NOT_INSTALLED = False try: from ...
relf/WhatsOpt
services/whatsopt_server/surrogate_store/surrogate_store.py
Python
agpl-3.0
3,012
""" storlever.common ~~~~~~~~~~~~~~~~ This module implements some common API for REST. :copyright: (c) 2014 by OpenSight (www.opensight.cn). :license: AGPLv3, see LICENSE for more details. """ import sys import traceback import copy import pyramid.exceptions from pyramid.view import view_config from pyramid.respons...
OpenSight/StorLever
storlever/rest/common.py
Python
agpl-3.0
3,490
#!/usr/bin/python # # Copyright (C) 2014 Lott Caskey <lottcaskey@gmail.com> # import sys from osdial import OSDial osdial = OSDial() for var in osdial.vars: sys.stderr.write('%s = %s\n' % (var, osdial.vars[var])) #sys.stderr.write('%s = %s\n' % ('PATHconf', osdial.sql.osdial.PATHconf)) #sys.stderr.write('...
southskies/osdial
python/examples/sql.py
Python
agpl-3.0
603
# -*- coding: utf-8 -*- """ This is the common settings file, intended to set sane defaults. If you have a piece of configuration that's dependent on a set of feature flags being set, then create a function that returns the calculated value based on the value of FEATURES[...]. Modules that extend this one can change th...
chrisndodge/edx-platform
lms/envs/common.py
Python
agpl-3.0
102,634
""" Open EdX theme for the Credentials Service. """
edx/credentials
credentials/apps/credentials_theme_openedx/__init__.py
Python
agpl-3.0
52
from django.conf.urls import url from core.views import project_views urlpatterns = [ url(r'^$', project_views.list), url(r'^(?P<project_id>\d+)/$', project_views.view), url(r'^(?P<project_id>\d+)/edit$', project_views.edit_form), url(r'^(?P<project_id>\d+)/.*$', project_views.view), url(r'^submit...
freedomsponsors/www.freedomsponsors.org
djangoproject/core/urls/project_urls.py
Python
agpl-3.0
368
# -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects # Copyright (C) 2015-2019 OpenCraft <contact@opencraft.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Fre...
open-craft/opencraft
opencraft/routing.py
Python
agpl-3.0
1,292
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('core', '0019_auto_20151216_0636'), ] ...
niekas/dakis
dakis/core/migrations/0020_problem_author.py
Python
agpl-3.0
524
# The Hazard Library # Copyright (C) 2012 GEM Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # Th...
ROB-Seismology/oq-hazardlib
openquake/hazardlib/gsim/base.py
Python
agpl-3.0
41,941
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2018: Alignak team, see AUTHORS.txt file for contributors # # This file is part of Alignak. # # Alignak is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, eit...
Alignak-monitoring/alignak
alignak/http/broker_interface.py
Python
agpl-3.0
2,280
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cint, cstr, formatdate, flt from frappe import msgprint, _, throw from erpnext.setup.utils import get_compan...
BhupeshGupta/erpnext
erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
Python
agpl-3.0
15,742
#!/usr/bin/env python """ Script to build Docker image of the project and possibly test it. Actions are largely driven by environment variables, and some information about the version of biweeklybudget installed... If ``DOCKER_TEST_TAG`` is set, just run tests against an existing (local) image with that tag, and exit...
jantman/biweeklybudget
biweeklybudget/tests/docker_build.py
Python
agpl-3.0
28,010
# Copyright (C) 2020 OpenMotics BV # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero 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 distribu...
openmotics/gateway
src/master/core/core_updater.py
Python
agpl-3.0
14,355
# coding=utf-8 """ Unit tests for ``octoprint.server.api``. """ from __future__ import absolute_import __author__ = "Gina Häußge <osd@foosel.net>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2016 The OctoPrint Project - Released under terms of...
Jaesin/OctoPrint
tests/server/api/__init__.py
Python
agpl-3.0
343
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
noemis-fr/old-custom
e3z_report_ipbox/report/special_message_invoice.py
Python
agpl-3.0
11,215
#!/usr/bin/python import lxml.html from lxml import etree import urlparse import dateutil.parser import datetime import re import sys import urllib import urllib2 import os from optparse import OptionParser import time import gzip from StringIO import StringIO import random output_directory = "../../../parldata/cmpag...
henare/parlparse
pyscraper/sp/get-official-reports-new.py
Python
agpl-3.0
5,282
# Copyright 2009 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Test the milestone vocabularies.""" __metaclass__ = type from zope.component import getUtility from lp.app.enums import InformationType from lp.blueprints.interfaces.specific...
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/registry/tests/test_milestone_vocabularies.py
Python
agpl-3.0
4,955
# -*- coding: utf-8 -*- import re from module.lib.BeautifulSoup import BeautifulSoup from module.plugins.Crypter import Crypter class DuckCryptInfo(Crypter): __name__ = "DuckCryptInfo" __type__ = "container" __pattern__ = r"http://(?:www\.)?duckcrypt.info/(folder|wait|link)/(\w+)/?(\w*)" __version__ =...
swayf/pyLoad
module/plugins/crypter/DuckCryptInfo.py
Python
agpl-3.0
2,047
from .solution_service import SolutionService
astrobin/astrobin
astrobin_apps_platesolving/services/__init__.py
Python
agpl-3.0
46
# -*- coding: utf-8 -*- # Copyright 2016 Onestein (<http://www.onestein.eu>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import calendar from datetime import datetime from functools import reduce from dateutil.relativedelta import relativedelta from odoo.exceptions import Warning from odoo im...
VitalPet/addons-onestein
account_cost_spread/models/account_invoice_line.py
Python
agpl-3.0
21,643
"""Collected page objects for Commotion Router web UI. Individual page elements are contained in xelements.py files. """ import objects.router.router as cro import objects.exceptions as exceptions from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as ...
opentechinstitute/commotion-router-test-suite
objects/router/page/page.py
Python
agpl-3.0
8,556
from pathlib import Path import pytest from libretime_api_client.version2 import AirtimeApiClient @pytest.fixture() def config_filepath(tmp_path: Path): filepath = tmp_path / "airtime.conf" filepath.write_text( """ [general] api_key = TEST_KEY base_dir = /test base_port = 80 base_url = localhost """...
LibreTime/libretime
api_client/tests/version2_test.py
Python
agpl-3.0
3,327
""" Tests for users API """ # pylint: disable=no-member import datetime import ddt from mock import patch from nose.plugins.attrib import attr import pytz from django.conf import settings from django.utils import timezone from django.template import defaultfilters from django.test import RequestFactory, override_setti...
romain-li/edx-platform
lms/djangoapps/mobile_api/users/tests.py
Python
agpl-3.0
19,155
# -*- coding: utf-8 -*- # Copyright 2018 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
OCA/carrier-delivery
delivery_carrier_label_postlogistics/patches/__init__.py
Python
agpl-3.0
119
# -*- encoding: utf-8 -*- ############################################################################### # # account_fiscal_position_rule_sale for OpenERP # Copyright (C) 2009-TODAY Akretion <http://www.akretion.com> # @author Renato Lima <renato.lima@akretion.com> # Copyright 2012 Camptocamp SA # @autho...
Trust-Code/account-fiscal-rule
account_fiscal_position_rule_sale/__openerp__.py
Python
agpl-3.0
1,713
# -*- coding: utf-8 -*- # Copyright 2019 Joan Marín <Github@JoanMarin> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from StringIO import StringIO from io import BytesIO from datetime import datetime from base64 import b64encode, b64decode from urllib2 import urlopen from zipfile import ZipFile impor...
odoo-colombia/l10n-colombia
l10n_co_account_e_invoicing/models/account_invoice_dian_document.py
Python
agpl-3.0
39,475
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'EtlJob' db.create_table(u'source_data_etljob', ( ...
SeedScientific/polio
source_data/migrations/0002_add_model_EtlJob.py
Python
agpl-3.0
13,362
from rest_framework import generics from rest_framework.views import APIView from rest_framework.response import Response from rest_framework.reverse import reverse class Base(APIView): def get(self, request, format=None): result = { "Rebuild Index Service for all items": reverse('rebuildinde...
almey/policycompass-services
apps/searchmanager/api.py
Python
agpl-3.0
1,440
# -*- coding: utf-8 -*- # Copyright 2017 Onestein (<http://www.onestein.eu>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_project_issue_stage
VitalPet/addons-onestein
project_issue_stage/tests/__init__.py
Python
agpl-3.0
186
#!/usr/bin/env python # Copyright (C) 2006-2021 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation (FSF), e...
MTG/essentia
test/src/unittests/standard/test_monomixer.py
Python
agpl-3.0
2,476
from pathlib import Path from sys import platform from invoke import task, Context from sslyze import __version__ root_path = Path(__file__).parent.absolute() @task def test(ctx): # type: (Context) -> None ctx.run("pytest --cov=sslyze --cov-fail-under 80 --durations 5") @task def lint(ctx): # type: (C...
nabla-c0d3/sslyze
tasks.py
Python
agpl-3.0
1,896
from setuptools import setup, find_packages import sys, os version = '1.2.1' setup( name='ckanext-odn-theme', version=version, description="Open Data Node CKAN Theme", long_description=''' ''', classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers keywor...
OpenDataNode/ckanext-odn-theme
setup.py
Python
agpl-3.0
2,055
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import fields, models, api, _ from openerp.exceptions import UserError class StockPicking(models.Model): _inherit = 'stock.picking' review = fields.Selection([ ('no_rev...
Gebesa-Dev/Addons-gebesa
stock_picking_review_buttom/models/stock.py
Python
agpl-3.0
1,282
# SPDX-License-Identifier: AGPL-3.0-or-later # lint: pylint """ Meilisearch """ # pylint: disable=global-statement, missing-function-docstring from json import loads, dumps base_url = 'http://localhost:7700' index = '' auth_key = '' facet_filters = list() _search_url = '' result_template = 'key-value.html' categor...
dalf/searx
searx/engines/meilisearch.py
Python
agpl-3.0
1,249
import django import grouprise.core.tests class TestUrls(grouprise.core.tests.Test): def test_content_404(self): r = self.client.get(django.urls.reverse( 'content', args=['non-existent', 'non-existent'])) self.assertEqual(r.status_code, 404) r = self.client.get(self.get_url('c...
stadtgestalten/stadtgestalten
grouprise/features/content/tests.py
Python
agpl-3.0
552
import logging from cStringIO import StringIO from math import exp from lxml import etree from path import path # NOTE (THK): Only used for detecting presence of syllabus import requests from datetime import datetime import dateutil.parser from xmodule.modulestore import Location from xmodule.seq_module import Sequen...
EduPepperPDTesting/pepper2013-testing
common/lib/xmodule/xmodule/course_module.py
Python
agpl-3.0
48,995
""" energy.api ~~~~~~~~~ Define the energy site API """ from datetime import datetime from flask import Blueprint, jsonify, request from metering import get_data_range from . import db from .models import get_meter_api_key api = Blueprint("api", __name__) @api.route("/api/v1.0/data-range", methods=["GE...
aguinane/energyusage
energy/api.py
Python
agpl-3.0
801
# Copyright (c) 2014 by Ecreall under licence AGPL terms # available on http://www.gnu.org/licenses/agpl.html # licence: AGPL # author: Amen Souissi import datetime import pytz from pyramid.view import view_config from pyramid.httpexceptions import HTTPFound from substanced.util import Batch from dace.util import ...
ecreall/nova-ideo
novaideo/views/user_management/see_person.py
Python
agpl-3.0
9,084
from django.contrib.auth.middleware import RemoteUserMiddleware from django.contrib.auth.signals import user_logged_in from django.conf import settings from editorsnotes.main.models import Project from django.contrib import auth from cendari_api import DATA_API_SERVER, cendari_clean_name, CendariDataAPIException, cenda...
CENDARI/editorsnotes
cendari/cendari_middleware.py
Python
agpl-3.0
7,406
# -*- coding: utf-8 -*- # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). from odoo import models from odoo.tools.translate import _ from odoo.exceptions import Warning as UserError from odoo.addons.l10n_it_fatturapa.bindings.fatturapa import ( DatiRitenutaType, AltriDatiGestionaliType, ) clas...
linkitspa/l10n-italy
l10n_it_fatturapa_out_wt/wizard/wizard_export_fatturapa.py
Python
agpl-3.0
2,647
# -*- coding: utf-8 -*- from openfisca_core.parameters import Scale from openfisca_web_api.loader.parameters import build_api_scale, build_api_parameter def test_build_rate_scale(): '''Extracts a 'rate' children from a bracket collection''' data = {'brackets': [{'rate': {'2014-01-01': {'value': 0.5}}, 'thre...
openfisca/openfisca-core
tests/web_api/loader/test_parameters.py
Python
agpl-3.0
1,579
""" iFiltr, Simple & Secure Social Shopping. Copyright (C) 2012-2013 iFiltr (<https://ifiltr.com>). This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the ...
ifiltr/ifiltr
ifiltr/wsgi.py
Python
agpl-3.0
1,922