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
from rest_framework import serializers from .models import CustomerWallet class CustomerWalletSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = CustomerWallet fields = ("wallet_id", "msisdn", "balance", "type", "status")
kyrelos/vitelco-mobile-money-wallet
app_dir/customer_wallet_management/serializers.py
Python
gpl-3.0
268
#!/usr/bin/env python2 import urllib2 import urllib from BeautifulSoup import BeautifulSoup import smtplib import ConfigParser # Retreive user information config = ConfigParser.ConfigParser() config.read('config.cfg') user = config.get('data','user') password = config.get('data','password') fromaddr = config.get('dat...
jelly/Utils
unassignedbugs.py
Python
gpl-3.0
2,592
import os import json import collections import datetime from flask import Flask, request, current_app, make_response, session, escape, Response, jsonify from flask_jwt_extended import JWTManager, jwt_required, create_access_token, get_jwt_identity from flask_socketio import SocketIO from neo4j.v1 import GraphDatabase,...
inquisite/Inquisite-Core
api/__init__.py
Python
gpl-3.0
2,483
#!/usr/bin/python import sys sys.path.append('/var/www/html/valumodel.com/scripts/dcf') from calc_dcf import calc_dcf def create_dcf(req, tax_rate, growth_rate_1_year_out, sga_of_sales, da_of_sales, capex_of_sales, nwc_of_sales, levered_beta, current_yield, exit_multiple, ticker): assumptions = {} try: assumption...
willmarkley/valumodel.com
scripts/dcf.py
Python
gpl-3.0
1,260
import os import re import gettext import locale import threading # libsearchfilter_toggle starts thread libsearchfilter_loop import operator import gtk import gobject import pango import ui import misc import formatting import mpdhelper as mpdh from consts import consts import breadcrumbs def library_set_data(albu...
onto/sonata
sonata/library.py
Python
gpl-3.0
66,200
from django.shortcuts import render def about(request): return render(request, "about.html", {}) def location(request): return render(request, "location.html", {}) def failure(request): return render(request, "failure.html", {})
apul1421/table-client-side-app-retake
src/ecommerce2/views.py
Python
gpl-3.0
237
import json import urllib import urllib2 def shorten(url): gurl = 'http://goo.gl/api/url?url=%s' % urllib.quote(url) req = urllib2.Request(gurl, data='') req.add_header('User-Agent','toolbar') results = json.load(urllib2.urlopen(req)) return results['short_url']
arjunjain/nixurl
NixURL/exlib/google.py
Python
gpl-3.0
284
# -*- coding: utf-8 -*- ################################################ ## Aplikacja wspomagajaca tworzenie bazy publikacji naukowych wpsółpracujaca z Google Scholar ## Copyright (C) 2013 Damian Baran ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the...
damianbaran/inz
popup/publikacja.py
Python
gpl-3.0
16,876
__author__ = 'xiaoxiaol' import numpy as np import pylab as pl import scipy import pandas as pd import seaborn as sns import os import sys, getopt from scipy.cluster import hierarchy import platform from scipy.stats.stats import pearsonr import scipy.stats as stats from PIL import Image import glob from sklearn.metri...
XiaoxiaoLiu/morphology_analysis
IVSCC/morph_clustering_on_bbp_features_old_example.py
Python
gpl-3.0
37,767
from xboxdrv_parser import Controller from time import sleep import argparse import os import sys sys.path.append(os.path.abspath("../../..")) from util.communication.grapevine import Communicator from robosub_settings import settings def main (args): com = Communicator (args.module_name) controller = Controll...
pi19404/robosub-1
src/movement/fuzzification/test/xbox_controller.py
Python
gpl-3.0
2,612
""" Integration test: permit call """ import os import sys myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, myPath + '/../../') import logging import nose from nose.tools import * import inte_testutils from telewall.core.model import TelephoneNumber from telewall.core.util import sleep_until...
synox/telewall
telewall/telewall/integrationtests/test_InT01.py
Python
gpl-3.0
1,091
# -*- coding: utf-8 -*- # Copyright © 2013, 2014, 2017, 2020 Tom Most <twm@freecog.net> # # 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) a...
twm/yarrharr
yarrharr/scripts/yarrharr.py
Python
gpl-3.0
1,676
# Copyright 2017 Virgil Dupras # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/gpl-3.0.html from datetime import date from itertools import starmap from hscommon.test...
tuxlifan/moneyguru
core/tests/plugin/test_reference_bind.py
Python
gpl-3.0
2,766
from django.core.management.base import BaseCommand, CommandError from django.core import management from django.db.models import Count from scoping.models import * class Command(BaseCommand): help = 'check a query file - how many records' def add_arguments(self, parser): parser.add_argument('qid',ty...
mcallaghan/tmv
BasicBrowser/scoping/management/commands/check_query_file.py
Python
gpl-3.0
1,107
""" IfExp astroid node An if statement written in an expression form. Attributes: - test (Node) - Holds a single node such as Compare. - Body (List[Node]) - A list of nodes that will execute if the condition passes. - orelse (List[Node]) - The else clause. Example: - te...
shweta97/pyta
nodes/IfExp.py
Python
gpl-3.0
406
# -*- coding: utf-8 -*- import pilas archi = open('datos.txt', 'r') nivel = archi.readline() pantalla = archi.readline() idioma = archi.readline() archi.close() if idioma == "ES": from modulos.ES import * else: from modulos.EN import * class EscenaMenu(pilas.escena.Base): "Es la escena de presentación d...
MendeleievBros/Mendeleiev-Bros
mendeleiev_bros/escena_menu.py
Python
gpl-3.0
2,716
#!/usr/bin/python3 # -*- coding: utf-8 -*- # # SSHplus # A remote connect utlity, sshmenu compatible clone, and application starter. # # (C) 2011 Anil Gulecha # Based on sshlist, incorporating changes by Benjamin Heil's simplestarter # # This program is free software: you can redistribute it and/or modify # it under th...
NoXPhasma/sshplus
sshplus.py
Python
gpl-3.0
9,010
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-09 11:32 from __future__ import unicode_literals import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] ...
cw-intellineers/intellifin
intellifin/migrations/0001_initial.py
Python
gpl-3.0
2,024
# Copyright 2016 Mycroft AI, Inc. # # This file is part of Mycroft Core. # # Mycroft Core 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 versio...
ElliotTheRobot/LILACS-mycroft-core
mycroft/skills/LILACS_chatbot/__init__.py
Python
gpl-3.0
5,092
# -*- coding: utf-8 -*- # This file is part of Gertrude. # # Gertrude 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. #...
studio1247/gertrude
document_dialog.py
Python
gpl-3.0
13,966
from ..rerequest import TemplateRequest init_req = TemplateRequest( re = r'(http://)?(www\.)?(?P<domain>ur(play)?)\.se/(?P<req_url>.+)', encode_vars = lambda v: { 'req_url': 'http://%(domain)s.se/%(req_url)s' % v } ) hls = { 'title': 'UR-play', 'url': 'http://urplay.se/', 'feed_url': 'http://urplay.se/rss',...
jackuess/pirateplay.se
lib/pirateplay/lib/services/ur.py
Python
gpl-3.0
1,161
class Object: def __init__(self, name): self._name = name @property def name(self): return self._name
gnovis/swift
swift_fca/swift_core/object_fca.py
Python
gpl-3.0
131
from planarprocess import * from gds_helpers import * from itertools import cycle xmin, xmax = -5, 5 layers = gds_cross_section('mypmos.gds', [(0,xmin), (0, xmax)], 'gdsmap.map') ['P-Active-Well', 'Active-Cut', 'N-Well', 'Metal-2', 'Metal-1', 'P-Select', 'N-Select', 'Transistor-Poly', 'Via1'] wafer = Wafer(1., 5., 0...
ignamv/PlanarProcess
test.py
Python
gpl-3.0
2,927
from setuptools import setup, find_packages setup( name = "CyprjToMakefile", version = "0.1", author = "Simon Marchi", author_email = "simon.marchi@polymtl.ca", description = "Generate Makefiles from Cypress cyprj files.", license = "GPLv3", url = "https://github.com/simark/cyprj-to-makefil...
simark/cyprj-to-makefile
setup.py
Python
gpl-3.0
576
from .submaker import Submaker from inception.tools.signapk import SignApk import shutil import os from inception.constants import InceptionConstants class UpdatezipSubmaker(Submaker): def make(self, updatePkgDir): keys_name = self.getValue("keys") signingKeys = self.getMaker().getConfig().getKeyCo...
tgalal/inception
inception/argparsers/makers/submakers/submaker_updatezip.py
Python
gpl-3.0
1,747
#!/bin/env python # -*- coding: utf-8 -*- PYS_SERVICE_MOD_PRE='pys_' # 模块名称的前缀 PYS_HEAD_LEN=12 # 报文头长度 PYS_MAX_BODY_LEN=10485760 # 最大报文长度
dungeonsnd/test-code
dev_examples/pyserver/src/util/pys_define.py
Python
gpl-3.0
184
# -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor my_default_errors = { 'required': 'Еңгізуге м...
ra1ski/poetrydb
user/forms.py
Python
gpl-3.0
4,469
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-05-29 13:51 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0054_add_field_user_to_productionform'), ] operations = [ migration...
efornal/pulmo
app/migrations/0055_applicationform_requires_development.py
Python
gpl-3.0
523
__all__ = ["speedtest_exceptions", "speedtest"] from . import sendtest
Awesomecase/Speedtest
speedtest_sendtest/__init__.py
Python
gpl-3.0
71
import os import re import sys """ * Perform initial configuration to ensure that the server is set up to work with Burton's format sudo chown -R ubuntu:ubuntu /var/www mkdir -p /var/www/default/public_html mv /var/www/html/index.html /var/www/default/public_html # Ubuntu >=14.04 mv /var/www/index.html...
dotancohen/burton
configure_websites.py
Python
gpl-3.0
4,169
from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^(\d+)/$', 'onpsx.gallery.views.index'), (r'^$', 'onpsx.gallery.views.index'), )
chrizel/onpsx
src/onpsx/gallery/urls.py
Python
gpl-3.0
160
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle 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 io import os import six import pyte...
ta2-1/pootle
tests/models/store.py
Python
gpl-3.0
64,439
import pilas import json from pilas.escena import Base from general import General from individual import Individual class jugadores(Base): def __init__(self): Base.__init__(self) def fondo(self): pilas.fondos.Fondo("data/img/fondos/aplicacion.jpg") def general(self): self.sonido_boton.rep...
gercordero/va_de_vuelta
src/estadisticas.py
Python
gpl-3.0
1,023
import logging logging.basicConfig() from enum import Enum logger = logging.getLogger('loopabull') logger.setLevel(logging.INFO) class Result(Enum): runfinished = 1 runerrored = 2 unrouted = 3 error = 4 # vim: set expandtab sw=4 sts=4 ts=4
maxamillion/loopabull
loopabull/__init__.py
Python
gpl-3.0
261
# -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function __metaclass__ = type ...
2ndQuadrant/ansible
lib/ansible/module_utils/vmware_rest_client.py
Python
gpl-3.0
13,483
# NOTE: this should inherit from (object) to function correctly with python 2.7 class CachedProperty(object): """ A property that is only computed once per instance and then stores the result in _cached_properties of the object. Source: https://github.com/bottlepy/bottle/commit/fa7733e075da0d790d809aa3...
psy0rz/zfs_autobackup
zfs_autobackup/CachedProperty.py
Python
gpl-3.0
1,252
from vsg.rules import token_prefix from vsg import token lTokens = [] lTokens.append(token.signal_declaration.identifier) class rule_008(token_prefix): ''' This rule checks for valid prefixes on signal identifiers. Default signal prefix is *s\_*. |configuring_prefix_and_suffix_rules_link| **V...
jeremiah-c-leary/vhdl-style-guide
vsg/rules/signal/rule_008.py
Python
gpl-3.0
705
#!/usr/bin/python # Author: Thomas Goodwin <btgoodwin@geontech.com> import urllib2, json, os, sys, re def download_asset(path, url): asset_path = None try: file_name = os.path.basename(url) asset_path = os.path.join(path, file_name) if os.path.exists(asset_path): # Skip do...
Geontech/docker-redhawk-ubuntu
Dockerfiles/files/build/ide-fetcher.py
Python
gpl-3.0
1,661
from setuptools import setup def readme(): with open('README.rst') as f: return f.read() setup(name='MapperTools', packages=['MapperTools'], version='0.1', description='A python 2.7 implementation of Mapper algorithm for Topological Data Analysis', keywords='mapper TDA python', ...
alpatania/MapperTools
setup.py
Python
gpl-3.0
791
# Copyright 2013-2015 Lenna X. Peterson. All rights reserved. from .meta import classproperty class AtomData(object): # Maximum ASA for each residue # from Miller et al. 1987, JMB 196: 641-656 total_asa = { 'A': 113.0, 'R': 241.0, 'N': 158.0, 'D': 151.0, 'C': 140...
lennax/util
util/atom_data.py
Python
gpl-3.0
6,616
import sys import subprocess result = subprocess.Popen('sh test.sh', shell=True) text = result.communicate()[0] sys.exit(result.returncode)
marcindulak/accts
accts/asegpaw/3.6.0-0.9.0.8965/ase/test.py
Python
gpl-3.0
142
#!D:\PycharmProjects\UFT\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==0.6c11','console_scripts','easy_install' __requires__ = 'setuptools==0.6c11' import sys from pkg_resources import load_entry_point sys.exit( load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')() )
hardanimal/UFT_UPGEM
Scripts/easy_install-script.py
Python
gpl-3.0
309
# Author: Jason Lu import urllib.request from bs4 import BeautifulSoup import time req_header = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11', 'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', #'Accept-Language': 'en-U...
jinzekid/codehub
python/lyutil/ly_proxy_test.py
Python
gpl-3.0
3,046
import tensorflow as tf import matplotlib.pyplot as plt import math x_node = tf.random_uniform([1], minval=-1, maxval=1, dtype=tf.float32, name='x_node') y_node = tf.random_uniform([1], minval=-1, maxval=1, dtype=tf.float32, name='y_node') times = 5000 hits = 0 pis = [] with tf.Session() as sessio...
thiswind/nn_practice
tensorflow/calculate_pi_old.py
Python
gpl-3.0
581
# .oooooooo .oooo. oooooooo .ooooo. .ooooo. # 888' `88b `P )88b d'""7d8P d88' `88b d88' `88b # 888 888 .oP"888 .d8P' 888ooo888 888ooo888 # `88bod8P' d8( 888 .d8P' .P 888 .o 888 .o # `8oooooo. `Y888""8o d8888888P `Y8bod8P' `Y8bod8P' # d" YD # "Y88888P' # # config class - btx # i...
btxgit/gazee
gazee/config.py
Python
gpl-3.0
9,088
# -*- coding: utf-8 -*- # Mathmaker creates automatically maths exercises sheets # with their answers # Copyright 2006-2017 Nicolas Hainaux <nh.techn@gmail.com> # This file is part of Mathmaker. # Mathmaker is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License...
nicolashainaux/mathmaker
tests/01_core_objects/test_110_polygons.py
Python
gpl-3.0
4,579
# Copyright (C) 2011-2015 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file from __future__ import absolute_import import re import abc class AddressbookError(Exception): pass class AddressBook(object):...
geier/alot
alot/addressbook/__init__.py
Python
gpl-3.0
1,232
import numpy as np from scipy.signal import medfilt import manager.operations.method as method from manager.operations.methodsteps.confirmation import Confirmation from manager.exceptions import VoltPyNotAllowed class MedianFilter(method.ProcessingMethod): can_be_applied = True _steps = [ { ...
efce/voltPy
manager/operations/methods/MedianFilter.py
Python
gpl-3.0
1,485
""" Django settings for lwc project. Generated by 'django-admin startproject' using Django 1.9.7. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os # Bui...
Phexcom/product-launcher
lwc/settings/base.py
Python
gpl-3.0
3,530
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "MyGarden.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that the...
pmandr/plant_carer
MyGarden/manage.py
Python
gpl-3.0
806
from osweb.projects.ManageProject import ManageProject from osweb.projects.projects_data import ProjectsData
openshine/osweb
osweb/projects/__init__.py
Python
gpl-3.0
108
# Copyright FuseSoC contributors # Licensed under the 2-Clause BSD License, see LICENSE for details. # SPDX-License-Identifier: BSD-2-Clause def test_generators(): import os import tempfile from fusesoc.config import Config from fusesoc.coremanager import CoreManager from fusesoc.edalizer import ...
lowRISC/fusesoc
tests/test_edalizer.py
Python
gpl-3.0
1,641
#! /usr/bin/env python3 from bollinger import bands, plot, strategies import argparse parser = argparse.ArgumentParser(description="plots bollinger bands or suggests investments", epilog="example: bolly.py plot AMZN FB") parser.add_argument("action", metavar="ACTION", choices=["plot", "suggest"], help="either plot o...
juantascon/bollinger-bands
python/bolly.py
Python
gpl-3.0
1,507
# -*- coding: utf-8 -*- import sys import csv from itertools import izip # https://pypi.python.org/pypi/unicodecsv # http://semver.org/ VERSION = (0, 9, 4) __version__ = ".".join(map(str, VERSION)) pass_throughs = [ 'register_dialect', 'unregister_dialect', 'get_dialect', 'list_dialects', 'field_...
archives-new-zealand/archwayimportgenerator
libs/unicodecsv.py
Python
gpl-3.0
7,077
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os,re,sys,pprint,shutil from pathlib import Path PACKAGES_DIR = "../packages" def errorExit(msg): print(msg) sys.exit(1) def isPathDisabled(path): for part in path.parts: if part.lower().startswith("_disabled"): return True return False depsFolder = P...
DeadSix27/python_cross_compile_script
tools/split.py
Python
mpl-2.0
1,806
# 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 unittest import mock from configman.dotdict import DotDict from socorro.lib.task_manager import TaskManager, defa...
lonnen/socorro
socorro/unittest/lib/test_task_manager.py
Python
mpl-2.0
2,418
#!/usr/bin/env python3 # # Copyright (C) 2017-2020 EOS di Manlio Morini. # # 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/ # # A python program that helps to set up ...
morinim/vita
src/setversion.py
Python
mpl-2.0
2,950
import json import mock from django.test import TestCase from django.core.urlresolvers import reverse class TestAPI(TestCase): @mock.patch('ldap.initialize') def test_exists(self, mocked_initialize): connection = mock.MagicMock() mocked_initialize.return_value = connection url = re...
mozilla/medlem
medlem/api/tests.py
Python
mpl-2.0
5,529
# 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) 2016 Digi International Inc. All Rights Reserved. """ Monitor the WR31 door enclosure """ i...
digidotcom/transport_examples
WR31/doormon.py
Python
mpl-2.0
3,979
import copy import logging import os import time from datetime import datetime from hashlib import sha1 import newrelic.agent from django.core.exceptions import ObjectDoesNotExist from django.db.utils import IntegrityError from past.builtins import long from treeherder.etl.artifact import (serialize_artifact_json_blo...
KWierso/treeherder
treeherder/etl/jobs.py
Python
mpl-2.0
18,563
# -*- coding: utf-8 -*- # Copyright: Damien Elmes <anki@ichi2.net> # Copyright © 2014 Roland Sieker <ospalh@gmail.com> # # License: GNU AGPL, version 3 or later; # http://www.gnu.org/licenses/agpl.html import os import re import shutil import zipfile from . import Collection from .hooks import runHook from .lang impo...
ospalh/libanki3
libanki3/exporting.py
Python
agpl-3.0
9,791
# -*- coding: utf-8 -*- # See README.rst file on addon root folder for license details from . import res_partner
incaser/odoo-templates
sample_addon_oca/models/__init__.py
Python
agpl-3.0
114
# -*- coding: utf-8 -*- # Copyright© 2016 ICTSTUDIO <http://www.ictstudio.eu> # Copyright 2016 ACSONE SA/NV (<http://acsone.eu>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': "MIS Builder Cost Center Filter", 'version': '8.0.1.0.0', 'category': 'Reporting', 'summary': "...
ICTSTUDIO/accounting-addons
mis_builder_cost_center_filter/__openerp__.py
Python
agpl-3.0
793
# -*- coding: utf-8 -*- __license__ = "GNU Affero General Public License, Ver.3" __author__ = "Pablo Alvarez de Sotomayor Posadillo" # This file is part of Kirinki. # # Kirinki 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 ...
i02sopop/Kirinki
kirinki/videos.py
Python
agpl-3.0
16,846
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** # ...
SKIRT/PTS
modeling/config/adapt_fit.py
Python
agpl-3.0
2,495
import os from importlib import import_module from django.core.management.base import BaseCommand from django.utils import translation from django.conf import settings def get_modules(): path = os.path.join(settings.BASE_DIR, 'utils', 'upgrade') root, dirs, files = next(os.walk(path)) return files clas...
BirkbeckCTP/janeway
src/utils/management/commands/run_upgrade.py
Python
agpl-3.0
1,613
from .naive import StratNaive import random import numpy as np class BetaDecreaseStrat(StratNaive): def __init__(self, vu_cfg, time_scale=0.9, **strat_cfg2): StratNaive.__init__(self,vu_cfg=vu_cfg, **strat_cfg2) self.time_scale = time_scale def update_speaker(self, ms, w, mh, voc, mem, bool_succ, context=[]): ...
flowersteam/naminggamesal
naminggamesal/ngstrat/beta_decrease.py
Python
agpl-3.0
700
# -*- coding: utf-8 -*- # Copyright (C) 2014-present Taiga Agile LLC # # 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 ver...
taigaio/taiga-back
taiga/webhooks/signal_handlers.py
Python
agpl-3.0
2,526
#!/usr/bin/env python ''' ##BOILERPLATE_COPYRIGHT ##BOILERPLATE_COPYRIGHT_END ''' import unittest, copy from testRoot import RootClass from noink.user_db import UserDB from noink.entry_db import EntryDB class AddEntry(RootClass): def test_AddEntry(self): userDB = UserDB() entryDB = EntryDB()...
criswell/noink
src/tests/test_DelEntry.py
Python
agpl-3.0
740
from unittest import TestCase from micall.drivers.run_info import RunInfo from micall.drivers.sample import Sample from micall.drivers.sample_group import SampleGroup class RunInfoTest(TestCase): def test_get_all_samples(self): expected_fastq_paths = ['1a_R1_001.fastq', '1...
cfe-lab/MiCall
micall/tests/test_run_info.py
Python
agpl-3.0
777
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import os i...
vied12/superdesk
server/superdesk/media/media_operations.py
Python
agpl-3.0
3,953
#!/usr/bin/python """ Copyright 2012 Paul Willworth <ioscode@gmail.com> This file is part of Galaxy Harvester. Galaxy Harvester 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 th...
clreinki/GalaxyHarvester
waypointMaps.py
Python
agpl-3.0
2,719
import os import sys import nose from subprocess import CalledProcessError, check_output as run from functools import partial GJSLINT_COMMAND = 'gjslint' GJSLINT_OPTIONS = ['--strict'] JS_BASE_FOLDER = os.path.join('skylines', 'public', 'js') JS_FILES = [ 'baro.js', 'fix-table.js', 'flight.js', 'gen...
dkm/skylines
skylines/tests/test_gjslint.py
Python
agpl-3.0
1,110
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (C) 2014 Didotech srl (<http://www.didotech.com>). # # All Rights Reserved # # This program is free software: you can redistr...
iw3hxn/LibrERP
sale_direct_buy/models/__init__.py
Python
agpl-3.0
1,069
""" Learning Tools Interoperability (LTI) module. Resources --------- Theoretical background and detailed specifications of LTI can be found on: http://www.imsglobal.org/LTI/v1p1p1/ltiIMGv1p1p1.html This module is based on the version 1.1.1 of the LTI specifications by the IMS Global authority. For authenticat...
mtlchun/edx
common/lib/xmodule/xmodule/lti_module.py
Python
agpl-3.0
37,531
from datetime import datetime, date import pytest from pytz import UTC from uber.config import c from uber.models import Attendee, Session from uber.site_sections import summary @pytest.fixture def birthdays(): dates = [ date(1964, 12, 30), date(1964, 12, 31), date(1964, 1, 1), d...
magfest/ubersystem
tests/uber/site_sections/test_summary.py
Python
agpl-3.0
3,732
from django.template import Library, Node, TemplateSyntaxError, Variable from django.conf import settings from django.core import urlresolvers import hashlib import re register = Library() class ViewNode(Node): def __init__(self, parser, token): self.args = [] self.kwargs = {} tokens = ...
meymarce/overlord
overlord/templatetags/view_tag.py
Python
agpl-3.0
2,130
########################################################################### # Concurrent WSGI server - webserver3h.py # # # # Tested with Python 2.7.9 on Ubuntu 14.04 & Mac OS X # ################...
hamishcunningham/fishy-wifi
wegrow-cloudside/elf-data-collector/webserver4/server-again.py
Python
agpl-3.0
6,539
# Copyright (C) 2018 - TODAY, Pavlov Media # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import models from . import wizards
OCA/contract
agreement_legal/__init__.py
Python
agpl-3.0
151
# -*- coding: utf-8 -*- { 'name': "Better validation for Attendance", 'summary': """ Short (1 phrase/line) summary of the module's purpose, used as subtitle on modules listing or apps.openerp.com""", 'description': """ Long description of module's purpose """, 'author': "J...
jmankiewicz/odooAddons
hr_attendance_new_check/__openerp__.py
Python
agpl-3.0
958
import os import time import sys FOLDERPATH = sys.argv[1] #os.chdir(FOLDERPATH) walk = os.walk(FOLDERPATH) FSEVENT = "delete" for item in walk: FILEPATHPREFIX = item[0] + "\\" for song in item[2]: if song.endswith(".mp3"): FILEPATH = "%s%s" % (FILEPATHPREFIX, song) ...
collaj/MusicServer
scripts/test_script_delete.py
Python
agpl-3.0
404
# coding=utf-8 # Copyright (c) 2001, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and op...
CanalTP/kirin
tests/mock_navitia/vj_bad_order.py
Python
agpl-3.0
13,166
#################################################################################################### # Copyright (C) 2016 by Ingo Keller, Katrin Lohan # # <brutusthetschiepel@gmail.com> # # ...
BrutusTT/pyJD
pyJD/EZModule.py
Python
agpl-3.0
8,093
import os from xbrowse_server import xbrowse_controls from django.core.management.base import BaseCommand from xbrowse_server.base.models import Project, Individual, VCFFile from xbrowse_server import sample_management class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('ar...
macarthur-lab/xbrowse
xbrowse_server/base/management/commands/add_vcf_to_project.py
Python
agpl-3.0
1,768
from __future__ import print_function import time from flask import Flask, session, url_for from flask_debugtoolbar import DebugToolbarExtension from weblablib import WebLab, requires_active, weblab_user, poll app = Flask(__name__) # XXX: IMPORTANT SETTINGS TO CHANGE app.config['SECRET_KEY'] = 'something random' # e...
weblabdeusto/weblablib
examples/simple/example.py
Python
agpl-3.0
3,126
# -*- coding: utf-8 -*- """ Class_LabExperimBased provides functionalities for data handling of data obtained in lab experiments in the field of (waste)water treatment. Copyright (C) 2016 Chaim De Mulder This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General P...
cdemulde/wwdata
wwdata/Class_LabExperimBased.py
Python
agpl-3.0
7,474
import source_navigation_steps import functional_test class TestSourceInterfaceNotFound( functional_test.FunctionalTest, source_navigation_steps.SourceNavigationStepsMixin): def test_not_found(self): self._source_not_found()
garrettr/securedrop
securedrop/tests/functional/test_source_notfound.py
Python
agpl-3.0
256
from common.log import logUtils as log from constants import clientPackets from constants import serverPackets def handle(userToken, packetData): # get token data username = userToken.username # Read packet data packetData = clientPackets.setAwayMessage(packetData) # Set token away message userToken.awayMessa...
osuripple/pep.py
events/setAwayMessageEvent.py
Python
agpl-3.0
743
""" WSGI config for tumuli project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTIN...
daonb/tumulus
tumuli/wsgi.py
Python
agpl-3.0
389
"""course_discovery URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/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') C...
cpennington/course-discovery
course_discovery/urls.py
Python
agpl-3.0
1,899
# Copyright (C) 2021 ForgeFlow S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html) from odoo.tests.common import TransactionCase class TestProjectDuplicateSubtask(TransactionCase): def setUp(self): super().setUp() self.project1 = self.env["project.project"].create({"name": ...
OCA/project
project_duplicate_subtask/tests/test_project_duplicate_subtask.py
Python
agpl-3.0
1,104
# This file is part of authapi. # Copyright (C) 2014-2020 Agora Voting SL <contact@nvotes.com> # authapi 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. # authapi is...
agoravoting/authapi
authapi/captcha/urls.py
Python
agpl-3.0
874
# © 2008-2020 Dorin Hongu <dhongu(@)gmail(.)com # See README.rst file on addons root folder for license details { "name": "Romania - Invoice Report ", "summary": "Localizare Terrabit", "version": "14.0.3.0.3", "author": "Dorin Hongu," "Odoo Community Association (OCA)", "website": "https://github....
dhongu/l10n-romania
l10n_ro_invoice_report/__manifest__.py
Python
agpl-3.0
887
############################################################################## # # Copyright (C) 2014 Comunitea Servicios Tecnológicos All Rights Reserved # $Kiko Sánchez <kiko@comunitea.com>$ # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gen...
Comunitea/CMNT_004_15
project-addons/product_outlet_loss/models/product.py
Python
agpl-3.0
1,853
import tempfile from datetime import datetime import flask_testing from flask import url_for import iis from iis.models import User from iis.extensions import db class BaseTestCase(flask_testing.TestCase): DB_FILE = tempfile.mkstemp() SQLALCHEMY_DATABASE_URI = "sqlite:///" + DB_FILE[1] LOGGING = {"versi...
interactomix/iis
test_utils/base.py
Python
agpl-3.0
1,749
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-isegory', version='0.1', packages=['isegory'], include_package_data=True, license='...
jdelacueva/django-isegory
setup.py
Python
agpl-3.0
1,049
# Recall is a program for storing bookmarks of different things # Copyright (C) 2012 Cal Paterson # # 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 # ...
calpaterson/recall
src/recall/people.py
Python
agpl-3.0
3,665
from collections import defaultdict from fs.errors import ResourceNotFoundError import logging import inspect import re from path import path from django.http import Http404 from django.conf import settings from .module_render import get_module from xmodule.course_module import CourseDescriptor from xmodule.modulestor...
abo-abo/edx-platform
lms/djangoapps/courseware/courses.py
Python
agpl-3.0
11,362
import io import pytest import databot import pandas as pd from databot.db.utils import Row from databot.exporters.utils import flatten_nested_lists, flatten_nested_dicts, get_level_keys, flatten, sort_fields from databot.exporters import jsonl from databot.exporters import pandas @pytest.fixture def data(): re...
sirex/databot
tests/test_export.py
Python
agpl-3.0
9,232
############################################################################ # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core bu...
uclouvain/osis_louvain
base/views/learning_units/detail.py
Python
agpl-3.0
2,249