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
import copy import uuid def copy_exchange(ex): exchange = copy.copy(ex) exchange.id = uuid.uuid4() exchange.in_msg = copy.deepcopy(ex.in_msg) exchange.out_msg = copy.deepcopy(ex.out_msg) exchange.properties = copy.deepcopy(ex.properties) return exchange
vaibhav-sinha/pypipeline
pypipeline/util/ExchangeUtil.py
Python
gpl-3.0
280
""" Functions for processing marker data. """ __version__ = '0.1' __author__ = 'Kjartan Halvorsen' import numpy as np import math import csv import itertools import unittest import matplotlib.pyplot as pyplot import matplotlib.dates as mdates from scipy.interpolate import interp1d import scipy.optimize as optimize fr...
alfkjartan/nvgimu
nvg/ximu/markerdata.py
Python
gpl-3.0
10,131
import pytest import numpy as np from numpy.testing import assert_array_almost_equal, assert_almost_equal from scipy import constants from copy import deepcopy import gromacs import mdpow.config import mdpow.fep def test_molar_to_nm3(): assert_almost_equal(mdpow.fep.molar_to_nm3(1.5), 0.9033212684) assert_a...
Becksteinlab/MDPOW
mdpow/tests/test_fep.py
Python
gpl-3.0
4,710
############################################################################## # # Copyright (c) 2001, 2002 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # T...
Donkyhotay/MoonPy
zope/app/event/tests/test_objectevent.py
Python
gpl-3.0
2,785
# coding=utf-8 import unittest """881. Boats to Save People https://leetcode.com/problems/boats-to-save-people/description/ The `i`-th person has weight `people[i]`, and each boat can carry a maximum weight of `limit`. Each boat carries at most 2 people at the same time, provided the sum of the weight of those peopl...
openqt/algorithms
leetcode/python/lc881-boats-to-save-people.py
Python
gpl-3.0
1,264
#----------------------------------------------------------------------------- # Copyright (c) 2005-2016, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this s...
ijat/Hotspot-PUTRA-Auto-login
PyInstaller-3.2/PyInstaller/hooks/pre_safe_import_module/hook-win32com.py
Python
gpl-3.0
1,177
from docutils import statemachine from docutils.parsers.rst import Directive #pylint: disable=unused-import import re ALG_DOCNAME_RE = re.compile(r'^([A-Z][a-zA-Z0-9]+)-v([0-9][0-9]*)$') FIT_DOCNAME_RE = re.compile(r'^([A-Z][a-zA-Z0-9]+)$') #----------------------------------------------------------------------------...
ScreamingUdder/mantid
docs/sphinxext/mantiddoc/directives/base.py
Python
gpl-3.0
8,208
import smtplib import secrets import sys try: mail_from = str(sys.argv[1]) mail_to = str(sys.argv[2]) subject_line = str(sys.argv[3]) msg_body = str(sys.argv[4]) except IndexError: print ("Error: Enter the from, to, subject, and msg body of the email to complete") print(mail_from) password = raw_i...
Surouxx/special-enigma
send.py
Python
gpl-3.0
654
""" This file contains the System Calibration sub-class as part of the System Class This class handles changes to system settings for calibration """ __author__ = "Corwin Perren" __copyright__ = "None" __credits__ = [""] __license__ = "GPL (GNU General Public License)" __version__ = "0.1 Alpha" __maintainer__ ...
SARL-Engineering/PickAndPlate
Interface/System/SystemCalibration/SystemCalibrationCore.py
Python
gpl-3.0
17,344
#!/usr/bin/env python # Pyctools - a picture processing algorithm development kit. # http://github.com/jim-easterbrook/pyctools # Copyright (C) 2014-18 Pyctools contributors # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as # publis...
jim-easterbrook/pyctools
src/examples/simple/src/pyctools/components/example/flip.py
Python
gpl-3.0
1,741
#!/usr/bin/env python import rospy,copy from geometry_msgs.msg import Twist from std_srvs.srv import Trigger, TriggerResponse from pimouse_ros.msg import LightSensorValues import math class WallStop(): def __init__(self): self.cmd_vel = rospy.Publisher('/cmd_vel',Twist,queue_size=1) self.sensor_va...
sabomeister/pimouse_run_corridor
script/wall_around.py
Python
gpl-3.0
1,637
from django.contrib.auth.decorators import login_required from django.db.models import Q from django.http import Http404 from django.shortcuts import render from django.views.decorators.cache import never_cache from django.views.decorators.csrf import csrf_protect from repanier.models.customer import Customer from rep...
pcolmant/repanier
repanier/views/who_is_who_view.py
Python
gpl-3.0
1,225
import json from django.http import QueryDict from django.utils import timezone from ajapaik.ajapaik_face_recognition.models import FaceRecognitionRectangle from ajapaik.ajapaik_object_recognition.models import ObjectDetectionAnnotation DELETION_EXPIRATION_THRESHOLD_IN_HOURS = 24 GENDER_FEMALE = 0 GENDER_MALE = 1 G...
Ajapaik/ajapaik-web
ajapaik/ajapaik_object_recognition/object_annotation_utils.py
Python
gpl-3.0
4,371
#!/usr/bin/env python # -*- coding: utf-8 -*- #This module contains statistical procedures from scipy import stats as scstats from scipy import special as sc import calculus_functions as cf import numpy as np import loglikelihood as logl import random_effects def var_decomposition(XXNorm=None,X=None,concat=False): ...
espensirnes/paneltime
paneltime/stat_functions.py
Python
gpl-3.0
10,747
import quizduell import cookielib import json import os # Load authenticated session from file to prevent unnecessary logins: cookie_jar = cookielib.MozillaCookieJar('cookie_file') api = quizduell.QuizduellApi(cookie_jar) if os.access(cookie_jar.filename, os.F_OK): cookie_jar.load() else: api.login_user('name...
mtschirs/quizduellapi
examples/top_list_rating.py
Python
gpl-3.0
648
# -*- coding: utf-8 -*- """ :copyright: (c) 2016 by the mediaTUM authors :license: GPL3, see COPYING for details Various functions for checking and converting unsafe user input. """ from __future__ import absolute_import import logging logg = logging.getLogger(__name__) def string_to_int(data): if ...
mediatum/mediatum
utils/userinput.py
Python
gpl-3.0
569
import moose import numpy as np from collections import Counter def xyPosition(objInfo,xory): try: return(float(moose.element(objInfo).getField(xory))) except ValueError: return (float(0)) def setupMeshObj(modelRoot): ''' Setup compartment and its members pool,reaction,enz cplx under self....
subhacom/moose-core
python/moose/chemUtil/chemConnectUtil.py
Python
gpl-3.0
7,761
"""Unit tests for the ``organizations`` paths. Each ``APITestCase`` subclass tests a single URL. A full list of URLs to be tested can be found here: http://theforeman.org/api/apidoc/v2/organizations.html """ import ddt import httplib import sys from fauxfactory import gen_string from nailgun import client from reques...
oshtaier/robottelo
tests/foreman/api/test_organization.py
Python
gpl-3.0
8,794
#!/usr/bin/python #Conky-Fitbit by Exadrid from fitbit.api import FitbitOauthClient import os, sys, webbrowser, fitbit, time, datetime import configparser config = configparser.ConfigParser() client_key = 'ba7c8a6d4376449f8ed481f0af25c7e2' client_secret = '69f323833a91491cbac4fdc4ff219bdc' #Get personal keys and ...
Exadrid/Conky-Fitbit
Conky-Fitbit.py
Python
gpl-3.0
4,749
# -*- coding: utf-8 -*- """ Created on Thu Dec 24 04:03:19 2015 @author: winpython """ from matplotlib.pyplot import imshow import matplotlib.pyplot as plt import numpy as np from PIL import Image import cPickle, pickle import gzip thelist = np.array(['8_7', '1_12', '2_8', '3_15', '8_16', '7_1', '0_3', '1_0', '9_18'...
artmusic0/theano-learning.part02
Training_data 2.0/rd_file_resize_rand_gz.py
Python
gpl-3.0
4,053
Workflow_2 = Workflow( Inputs=[ VariableGenerator_1 ] ) Flow123d_3 = Flow123dAction( Inputs=[ Workflow_2.input() ], YAMLFile='resources/test1.yaml' ) Flow123d_4 = Flow123dAction( Inputs=[ Flow123d_3 ], YAMLFile='resources/test2.yaml' ) Workflow_2.set_config( O...
GeoMop/GeoMop
testing/Analysis/pipeline/results/workflow3.py
Python
gpl-3.0
373
#!/usr/bin/env python3 # pip3 install youtube_dl # dnf install ffmpeg from __future__ import unicode_literals from mpd import MPDClient from os import listdir, makedirs, path, system from shutil import move from sys import argv from youtube_dl import YoutubeDL from youtube_dl.utils import DownloadError library_path...
flippym/spytify-server
Scripts/music-downloader.py
Python
gpl-3.0
2,070
import pygame import configparser import os import time import sys import urllib.request ## # Install: # pip3 install pygame.whl ## version = 0 pygame.init() # Get PyGame ready config = configparser.ConfigParser() # Get configparser ready.... home = os.path.expanduser("~") if not os.path.exists("/.CrackGames/"): ...
CrackGames/MolesterSimulator
MolesterSim.py
Python
gpl-3.0
16,500
from os.path import join from setuptools import setup, find_packages import sys import os def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() def get_version(): with open(join('tinytag', '__init__.py')) as f: for line in f: if line.startswith('__version__ ='...
tilboerner/tinytag
setup.py
Python
gpl-3.0
2,098
import splicetestlib from splicetestlib.splice_testcase import * from splicetestlib.splice_testcase_web import * import nose class test_splice_deleted_2(SpliceTestcase, Splice_has_FAKE_SPACEWALK, Splice_has_Manifest, Splice_has_WebUI): def _setup(self): splicetestlib.fake_spacewalk_env(self.ss.Instances["...
RedHatQE/splice-testing-tools
splice-tests/test_deleted_2_webui.py
Python
gpl-3.0
6,106
# coding:utf-8 import logging from utils.session import Session from .BaseHandler import BaseHandler from utils.image_storage import storage from utils.common import require_logined from utils.response_code import RET from config import image_url_prefix class AvatarHandler(BaseHandler): """头像""" @require_login...
wzj-python-wn/lhome
Tornado_Project/handlers/Profile.py
Python
gpl-3.0
1,267
from django.test import Client as ClientBase class Client(ClientBase): def __init__(self, logged_user=None, **kwargs): super().__init__(**kwargs) if logged_user: assert self.login( username=logged_user.username, password=logged_user._plaintext_password) def extract_po...
erudit/zenon
eruditorg/base/test/testcases.py
Python
gpl-3.0
1,875
# -*- coding: UTF-8 -*- """ Basepaths test cases @author: Aurélien Gâteau <mail@agateau.com> @license: GPL v3 or later """ import os import shutil import tempfile from pathlib import Path from yokadi.core import basepaths from yokadi.tests.yokaditestcase import YokadiTestCase class BasePathsUnixTestCase(YokadiTestC...
agateau/yokadi
yokadi/tests/basepathstestcase.py
Python
gpl-3.0
3,507
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import DrydenMusicApp.models from django.utils.timezone import utc import storages.backends.s3boto import datetime class Migration(migrations.Migration): dependencies = [ ('DrydenMusicApp', '0001_ini...
jdovi/drydenmusic
DrydenMusicApp/migrations/0002_auto_20160815_1814.py
Python
gpl-3.0
1,253
from itertools import chain import networkx as nx __all__ = ["adjacency_data", "adjacency_graph"] _attrs = dict(id="id", key="key") def adjacency_data(G, attrs=_attrs): """Returns data in adjacency format that is suitable for JSON serialization and use in Javascript documents. Parameters ----------...
SpaceGroupUCL/qgisSpaceSyntaxToolkit
esstoolkit/external/networkx/readwrite/json_graph/adjacency.py
Python
gpl-3.0
4,742
""" Object containing dynamic simulation state. """ import opiniongame.IO as og_io import opiniongame.coupling as og_coupling import opiniongame.opinions as og_opinions import opiniongame.adjacency as og_adj import numpy as np class WorldState: def __init__(self, adj, couplingWeights, initialOpinions, initialHist...
mjsottile/PyOpinionGame
opiniongame/state.py
Python
gpl-3.0
4,455
# 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 + # pylint: disable=no-init,too-many-instance-a...
mganeva/mantid
Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ApplyPaalmanPingsCorrection.py
Python
gpl-3.0
17,291
# Importing common provides default settings, see: # https://github.com/taigaio/taiga-back/blob/master/settings/common.py from .common import * DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': os.getenv('TAIGA_DB_NAME'), 'HOST': os.getenv('TAIGA_DB_HOST'), ...
benhutchins/docker-taiga
docker-settings.py
Python
gpl-3.0
1,959
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Switch and Buzzer test file for 'Whizzy' - Line Follower Robot based on GoPiGo with Raspberry Pi. # Intended to run on a Raspberry Pi on the actual robot. # # Copyright (C) 2017 Rob Probin. # All original work. # # This program is free software: you can redistribute it...
robzed/Whizzy_Robot
tests/switch_buzzer_test.py
Python
gpl-3.0
1,997
# Arduboy Game Changer # Server v0.1 # by Matthew Begg # 2017-03-28 import serial import serial.tools.list_ports import time import os gameName = "evade.hex" port = "/dev/ttyACM0" # Upload a hex file to Arduboy def uploadHex(fileName): ser = serial.Serial(port, 1200, timeout=1, dsrdtr=True) ser.close() ...
marvbloke/agc
agc.py
Python
gpl-3.0
1,022
################################################################################ ## ## ## This file is a part of TADEK. ## ## ...
tadek-project/tadek-ui
src/explore/search.py
Python
gpl-3.0
22,004
# -*- coding: utf-8 -*- # rtsserver.py # Main model for the server # Author : Jean-Sébastien Beaulieu import Pyro4 from random import randint from threading import Timer from servertools import ServerTools from datetime import datetime class GameData(): """Used by **RTSTITLE** server to manage user data ...
folkrav/rts-b51
src/server/rtsserver.py
Python
gpl-3.0
3,840
# RAVEn Plugin # # Author: Dnpwwo, 2016 # # # Plugin parameter definition below will be parsed during startup and copied into Manifest.xml, this will then drive the user interface in the Hardware web page # """ <plugin key="RAVEn" name="RAVEn Zigbee energy monitor" author="dnpwwo" version="1.3...
pperichon/domoticz
plugins/examples/RAVEn.py
Python
gpl-3.0
11,003
# oppia/av/admin.py from django.contrib import admin from oppia.av.models import UploadedMedia, UploadedMediaImage class UploadedMediaAdmin(admin.ModelAdmin): list_display = ('id', 'file', 'created_date', 'md5', 'length') class UploadedMediaImageAdmin(admin.ModelAdmin): list_display = ('id', 'image', 'uploa...
DigitalCampus/django-nurhi-oppia
oppia/av/admin.py
Python
gpl-3.0
486
#!/usr/bin/env python """ dyndns.py -- Dynamic DNS for Linode Copyright 2011 Michael S. Yanovich 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...
myano/linode-dyndns
dyndns.py
Python
gpl-3.0
2,806
""" Create a simple, single-elimination demo tournament with 8 teams. """ from django.contrib.auth.models import User from .utils import generate_tournament teams = ['Team {}'.format(i) for i in range(1, 9)] team_defaults = { 'creator': User.objects.get(pk=1), } generate_tournament( teams=teams, team...
clemby/tournasite
scripts/create.py
Python
gpl-3.0
346
#!/usr/bin/python # This file is part of Morse. # # Morse 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. # # Morse ...
retooth/morse
morse/views/topic.py
Python
gpl-3.0
1,937
# # Race Capture App # # Copyright (C) 2014-2016 Autosport Labs # # This file is part of the Race Capture App # # This is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at ...
ddimensia/RaceCapture_App
autosportlabs/racecapture/views/toolbar/toolbarview.py
Python
gpl-3.0
10,857
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014-2017 Vincent Noel (vincent.noel@butantan.gov.br) # # This file is part of libSigNetSim. # # libSigNetSim 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 Fou...
vincent-noel/libSigNetSim
libsignetsim/cwriter/__init__.py
Python
gpl-3.0
849
# -*- coding: utf-8 -*- from rules.rule import * class Rule(KLCRule): """ Create the methods check and fix to use with the kicad lib files. """ def __init__(self, component): super(Rule, self).__init__(component, 'Rule 3.1', 'Using a 100mils grid, pin ends and origin must lie on grid nodes (IE...
reportingsjr/kicad-library-utils
schlib/rules/rule3_1.py
Python
gpl-3.0
1,168
# coding=utf-8 """ Embedded Demo story, start it with python -m tale.demo.story 'Tale' mud driver, mudlib and interactive fiction framework Copyright by Irmen de Jong (irmen@razorvine.net) """ from __future__ import absolute_import, print_function, division, unicode_literals import os import sys import tal...
sils1297/Tale
tale/demo/story.py
Python
gpl-3.0
3,500
# -*- coding: utf-8 -*- """ Administration interface options for ``critica.apps.videos`` models. """ from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from critica.apps.custom_admin.sites import custom_site from critica.apps.videos.models import Video from critica.apps.issues.m...
brunobord/critica
apps/videos/admin.py
Python
gpl-3.0
3,421
# The level editor GUI. # The following workflow is expected: # 1) User load a level # 2) main windows display the scene layout # right-side-top-dock display: # - level scene tree # - level tree (a list in fact) # - level resources tree (a list in fact) # 3) user select an element in one of the tree, related p...
reven86/dfg-amy-editor
src/wogeditor.py
Python
gpl-3.0
105,116
# coding=utf8 # import hashlib from flask import request from flask.views import MethodView DEFAULT_TOKEN = "wechatter" class WechatVerify(MethodView): def get(self): """ """ echostr = request.args.get('echostr') signature = request.args.get('signature') timestamp = request.ar...
seraphln/wheel
wheel/core/plugins/wechat_plugin.py
Python
gpl-3.0
784
from __mailer import *
AdTechMedia/adtechmedia-website
component/ads-blocking-losses/mailer/__init__.py
Python
mpl-2.0
22
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
perlang/bv9arm-chinese
branches/9.16.15/arm/conf.py
Python
mpl-2.0
3,175
# Generated by Django 3.1.5 on 2021-01-04 17:42 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('vehicles', '0007_auto_20201130_1939'), ] operations = [ migrations.AddField( model_name='channel', name='datetime', ...
jclgoodwin/bustimes.org.uk
vehicles/migrations/0008_auto_20210104_1742.py
Python
mpl-2.0
844
import json from nose.tools import eq_ from django.conf import settings from django.core.urlresolvers import reverse from crashstats.base.tests.testbase import DjangoTestCase from ..browserid_mock import mock_browserid class TestViews(DjangoTestCase): def _login_attempt(self, email, assertion='fakeassertion12...
bsmedberg/socorro
webapp-django/crashstats/auth/tests/test_views.py
Python
mpl-2.0
1,566
# The contents of this file are subject to the Mozilla Public License # Version 2.0 (the "License"); you may not use this file except in # compliance with the License. You may obtain a copy of the License at # http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS IS"basis, #...
os2webscanner/os2webscanner
scrapy-webscanner/scanners/items.py
Python
mpl-2.0
1,350
# -*- coding: utf-8 -*- import datetime import pytest from django.utils.timezone import utc from django.forms import ValidationError from crashstats.base.tests.testbase import TestCase from crashstats.supersearch import form_fields class TestFormFields(TestCase): def test_integer_field(self): field =...
Tayamarn/socorro
webapp-django/crashstats/supersearch/tests/test_form_fields.py
Python
mpl-2.0
5,385
# 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/. """This is the base of the crashstorage system - a unified interfaces for saving, fetching and iterating over raw crashe...
bsmedberg/socorro
socorro/external/crashstorage_base.py
Python
mpl-2.0
40,084
from astrodata.eti.pyrafetiparam import PyrafETIParam, IrafStdout from pyraf import iraf from astrodata.adutils import logutils log = logutils.get_logger(__name__) class GemcombineParam(PyrafETIParam): """This class coordinates the ETI parameters as it pertains to the IRAF task gemcombine directly. """ ...
pyrrho314/recipesystem
trunk/gempy/gemini/eti/gemcombineparam.py
Python
mpl-2.0
4,082
class config_eval_tanh(config_base): mutable = 3 def eval_tanh(param): if len(param) == 0: return '' try: v = float(param[0]) except ValueError: return '' v = math.tanh(v) return float_to_str(v) # TESTS # IN ['0'] # OUT '0' # IN ['1'] # OUT_ROUND '0.76159' # IN ['2']...
plepe/pgmapcss
pgmapcss/eval/eval_tanh.py
Python
agpl-3.0
343
# Copyright 2014-2015 Luc Saffre # This file is part of Lino Welfare. # # Lino Welfare 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 ve...
khchine5/lino-welfare
lino_welfare/modlib/projects/__init__.py
Python
agpl-3.0
1,237
#!/usr/bin/env python # -*- encoding: utf-8 -*- """ @authors: Sebastián Ortiz V. neoecos@gmail.com SIIM Server is the web server of SIIM's Framework Copyright (C) 2013 Infometrika Ltda This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public Lice...
CaliopeProject/CaliopeServer
src/test/CaliopeWebSocketAPI_test.py
Python
agpl-3.0
5,425
# Copyright (C) 2021 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/esafe/rfid/idtronic_M890/para/para_handler.py
Python
agpl-3.0
3,126
#!/usr/bin/env python # connectionmon.py - Views your network connections. # Copyright (C) 2013 Mark Wingerd <markwingerd@yahoo.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 vers...
markwingerd/dft_old
module.py
Python
agpl-3.0
3,891
# -*- coding: utf-8 -*- # # 2020-09-21 Cornelius Kölbel <cornelius.koelbel@netknights.it> # Add possibility of multiple questions and answers # http://www.privacyidea.org # 2015-12-16 Initial writeup. # Cornelius Kölbel <cornelius@privacyidea.org> # # # This code is free software; you can red...
privacyidea/privacyidea
privacyidea/lib/tokens/questionnairetoken.py
Python
agpl-3.0
14,293
# Generated by Django 2.2.24 on 2021-10-28 19:15 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('edx_proctoring', '0019_proctoredexamsoftwaresecurereview_encrypted_video_url'), ] operations = [ migrations.AlterField( model_n...
edx/edx-proctoring
edx_proctoring/migrations/0020_auto_20211028_1915.py
Python
agpl-3.0
641
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # Thinkopen Brasil # Copyright (C) Thinkopen Solutions Brasil (<http://www.tkobr.com>). # # This ...
thinkopensolutions/tkobr-addons
tko_partner_department_function_as_m2o/__manifest__.py
Python
agpl-3.0
1,918
import xarray as xr from tikon.central.módulo import Módulo from tikon.central.simul import SimulMódulo from tikon.móds.clima.res import ResultadoClima from tikon.utils import EJE_PARC, EJE_TIEMPO, EJE_COORD from تقدیر.مقام import مقام, ذرائع_بنانا class SimulClima(SimulMódulo): def __init__(símismo, mód, simul_e...
julienmalard/Tikon
tikon/móds/clima/clima.py
Python
agpl-3.0
3,365
from .matrix_server import MatrixServer, MatrixClient from .matrix_graphics import MatrixGraphics from .matrix_controller import MatrixController, MatrixError
Mezgrman/ProjectANNAX
python/annax/__init__.py
Python
agpl-3.0
158
""" Edit Subsection page in Studio """ from bok_choy.page_object import PageObject class SubsectionPage(PageObject): """ Edit Subsection page in Studio """ name = "studio.subsection" def url(self): raise NotImplementedError def is_browser_on_page(self): return self.is_css_p...
pelikanchik/edx-platform
common/test/acceptance/edxapp_pages/studio/edit_subsection.py
Python
agpl-3.0
351
#!/usr/bin/env python import os, sys, shutil, datetime from fabric.api import run, cd, local, get, settings, lcd, put from fabric_ssh_config import getSSHInfoForHost from fabric.context_managers import shell_env from fabric.utils import abort username='test' builddir = "/tmp/" + username + "Kits/buildtemp" version = ...
paulmartel/voltdb
tools/kit_tools/build_kits.py
Python
agpl-3.0
14,723
from collections import defaultdict import math def hits (graph, epsilon = 1e-5, max_its = 100): auth = defaultdict(lambda:1) hub = defaultdict(lambda:1) g = graph._g weight = { (a,b): data['gram'].get('weight', 1) for a, b, data in g.edges_iter(data=True) } delta = epsilon+1 its...
agarsev/grafeno
grafeno/operations/hits.py
Python
agpl-3.0
971
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emmanuel Mathier <emmanuel.mathier@gmail.com> # # The licence is in the file __ma...
ecino/compassion-modules
sbc_compassion/models/__init__.py
Python
agpl-3.0
967
#!/usr/bin/env python # -*- coding: utf-8 -*- # Please note that the function 'make_request' is provided for your reference only. # You will not be able to to actually use it from within the Udacity web UI # All your changes should be in the 'extract_data' function from bs4 import BeautifulSoup import requests import ...
krzyste/ud032
Lesson_2_Data_in_More_Complex_Formats/18-Using_Beautiful_Soup/html_soup.py
Python
agpl-3.0
1,546
# -*- coding: utf-8 -*- import 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 'Dashboard' db.create_table(u'dashboard_dashboard', ( (u'id', self.gf('django.db....
akvo/butler
butler/dashboard/migrations/0001_initial.py
Python
agpl-3.0
2,690
# coding: utf-8 # This file is part of Supysonic. # # Supysonic is a Python implementation of the Subsonic server API. # Copyright (C) 2013 Alban 'spl0k' Féron # # 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 F...
nwokeo/supysonic
supysonic/api/playlists.py
Python
agpl-3.0
4,858
#!/usr/bin/python2 # -*- coding: utf-8 -*- ######################################################################## # # Odoo Tools by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
ClearCorp/odootools
odootools/odootools/lib/tools.py
Python
agpl-3.0
7,392
class ExperimentSyntaxError(Exception): def __init__(self, message): self.message = message class ExperimentExecutionError(Exception): def __init__(self, message): self.message = message class ExperimentSetupError(Exception): def __init__(self, message): self.message = message c...
docmalloc/gplmt
src/error.py
Python
agpl-3.0
419
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. import pytest from shoop import configuration from shoop.core import cache ...
akx/shoop
shoop_tests/core/test_configurations.py
Python
agpl-3.0
4,756
#!/usr/bin/python # -*- coding: utf-8 -*- from setuptools import setup try: from pypandoc import convert read_md = lambda f: convert(f, 'rst') except ImportError: print("warning: pypandoc module not found, could not convert Markdown to RST") read_md = lambda f: open(f, 'r').read() setup( name='the...
CERT-BDF/TheHive4py
setup.py
Python
agpl-3.0
1,293
from coalib.bearlib.abstractions.Linter import linter from coalib.bears.requirements.PipRequirement import PipRequirement @linter(executable='pycodestyle', output_format='regex', output_regex=r'(?P<line>\d+) (?P<column>\d+) ' r'(?P<message>(?P<origin>\S+).*)') class PycodestyleBe...
dosarudaniel/coala-bears
bears/python/PycodestyleBear.py
Python
agpl-3.0
1,751
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2017-03-09 07:51 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ...
macarthur-lab/xbrowse
seqr/migrations/0002_auto_20170309_0751.py
Python
agpl-3.0
2,584
# Generated by Django 1.11.15 on 2019-04-24 17:31 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields import simple_history.models import uuid class Migration(migrations.Migration): dependencies = [ ('core', '0011...
edx/course-discovery
course_discovery/apps/course_metadata/migrations/0172_historicalcourse.py
Python
agpl-3.0
4,942
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "vidan.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
mcuringa/vid-analyzer
web/manage.py
Python
agpl-3.0
248
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('instance', '0064_merge'), ] operations = [ migrations.AddField( model_name='mongodbserver', name='de...
open-craft/opencraft
instance/migrations/0065_create_description.py
Python
agpl-3.0
923
############################################################################### # # Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>). # # 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 ...
Micronaet/micronaet-production
production_note/__openerp__.py
Python
agpl-3.0
1,525
#!/usr/bin/env python import IPython import os import random import re import requests import sys randalpha = lambda n: ''.join([chr(ord('A')+random.randint(0,25)) for _ in range(n)]) new_account = '--regen-creds' in sys.argv or not os.path.exists('web500_creds.txt') def make_creds(): creds = dict() if new_a...
aweinstock314/aweinstock-ctf-writeups
rc3ctf_2015/web500_megafile_exploit.py
Python
agpl-3.0
6,550
# Copyright 2019 Alfredo de la Fuente - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import models, fields class SaleOrder(models.Model): _inherit = 'sale.order' sale_product_ids = fields.Many2many( string='Sale order products', comodel_name='product.product', ...
oihane/odoo-addons
stock_forecast/models/sale_order.py
Python
agpl-3.0
1,158
# -*- coding: utf-8 -*- # Generated by Django 1.11.28 on 2020-08-25 09:51 from __future__ import unicode_literals from django.db import migrations from django.contrib.postgres.operations import CITextExtension class Migration(migrations.Migration): dependencies = [ ('core', '0042_auto_20200825_1051'), ...
BirkbeckCTP/janeway
src/core/migrations/0043_install_ci_extension_pg.py
Python
agpl-3.0
363
### # Tests the driver cursor API ### import unittest from os import getenv from sys import path, argv path.append("../../drivers/python") import rethinkdb as r num_rows = int(argv[2]) port = int(argv[1]) class TestCursor(unittest.TestCase): def setUp(self): c = r.connect(port=port) tbl = r.tab...
AtnNn/rethinkdb
test/rql_test/connections/cursor.py
Python
agpl-3.0
824
# -*- coding: UTF-8 -*- # Copyright 2017 Luc Saffre # License: BSD (see file COPYING for details) """The default :attr:`custom_layouts_module <lino.core.site.Site.custom_layouts_module>` for Lino Cosi. """ from lino.api import rt rt.models.products.Products.column_names = "id name cat sales_price *" rt.models.produ...
khchine5/lino-cosi
lino_cosi/lib/cosi/layouts.py
Python
agpl-3.0
925
# Amara, universalsubtitles.org # # Copyright (C) 2013 Participatory Culture 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 op...
pculture/unisubs
apps/videos/templatetags/videos_tags.py
Python
agpl-3.0
8,099
#!/usr/bin/env python # -*- 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 So...
Alignak-monitoring/alignak
tests_integ/test_launch_daemons.py
Python
agpl-3.0
30,105
""" This is the default template for our main set of AWS servers. """ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files # pylint: disable=wildcard-import, unused-wildcard-import import codecs import copy import os import warnings import yaml fr...
eduNEXT/edx-platform
cms/envs/production.py
Python
agpl-3.0
26,216
# Copyright (c) 2013 "OKso http://okso.me" # # This file is part of Ra. # # Ra 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...
oksome/Home
mandjet/hawk.py
Python
agpl-3.0
1,892
"""Add table impact Revision ID: 6f3aadb613f Revises: 1894217a6b3f Create Date: 2014-07-02 16:58:02.545151 """ # revision identifiers, used by Alembic. revision = '6f3aadb613f' down_revision = '4adbb49a02f0' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql impact_status = s...
CanalTP/Chaos
migrations/versions/6f3aadb613f_.py
Python
agpl-3.0
1,339
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django.utils.translation impor...
taedori81/shoop
shoop/admin/modules/taxes/views/list.py
Python
agpl-3.0
1,947
import ckanapi import os from xlsxtocsv import xlsxtocsv, rfc4180 import tempfile import csv import shutil import subprocess as sp import io import glob import sys import cStringIO import json # _*_ coding: utf-8 _*_ ## Curently this requires a script "pda2pdfa" that conevrts PDF to PDF/A-1b ## Here we use: ## gs -d...
eawag-rdm/prepare_naduf
prepare_naduf.py
Python
agpl-3.0
14,470
import hashlib import random NUMBER_OF_ITERATIONS = 100001 def get_salt(user: bytes): random.seed(user) h = hashlib.sha256() h.update(user) return h.digest() + bytes(str(random.uniform(-1024.0, 1023.0)), encoding='utf8') def hash_password(password: bytes, user: bytes): salt = get_salt(user) ...
sanchopanca/make-me-better
mmb/hashing.py
Python
agpl-3.0
397
"""pharmaship URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-ba...
tuxite/pharmaship
pharmaship/app/urls.py
Python
agpl-3.0
967
#!/usr/bin/env python # Copyright (C) 2009-2011 : # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you can redistribute it and/or mo...
baloo/shinken
shinken/__init__.py
Python
agpl-3.0
957
############################################################################## # # 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 ...
uclouvain/osis_louvain
base/tests/forms/test_learning_unit_pedagogy.py
Python
agpl-3.0
9,738