code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
# -*- coding: utf-8 -*- from tools.factories import generator_factory import ctypes basic_cases = [ [b'%U\n', ctypes.c_long(0)], [b'% U\n', ctypes.c_long(0)], [b'%+U\n', ctypes.c_long(0)], [b'%-U\n', ctypes.c_long(0)], [b'%0U\n', ctypes.c_long(0)], [b'%#U\n', ctypes.c_long(0)], [b'%10U\n',...
vmonteco/YAPT
test_files/uu_cases_regular.py
Python
gpl-3.0
907
import numpy as np ### 1: IH ### 2: EH ### 3: AE ### 4: AO ### 6: AH ### 7: UH ### ### 11: iyC beat ### 12: iyF be ### 21: eyC bait ### 22: eyF bay ### 41: ayV buy ### 47: ayO bite ### 61: oy boy ### 42: aw bough ### 62: owC boat ### 63: owF bow ### 72: uwC boot ### 73: uwF too ### 82: iw suit ### 43: ah father ### 53...
mmcauliffe/linguistic-helper-functions
linghelper/phonetics/vowels/mahalanobis.py
Python
gpl-3.0
11,375
import os import sys import logging import inspect from inspect import getmembers, isfunction from commands import command import handlers logger = logging.getLogger(__name__) class tracker: def __init__(self): self.bot = None self.list = [] self.reset() def set_bot(self, bot): ...
ravrahn/HangoutsBot
hangupsbot/plugins/__init__.py
Python
gpl-3.0
11,524
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-02-09 20:48 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('elearning', '0010_auto_20160209_2042'), ] operations = [ migrations.AddField...
tkupek/tkupek-elearning
tkupek_elearning/elearning/migrations/0011_setting_logo.py
Python
gpl-3.0
461
def is_prime(n): for j in xrange(3, long(n**.5)+1, 2): if n%j == 0 or n%2 == 0: return False return True def lpf(n): for i in xrange(3, long(n**.5)+1, 2): if n%i == 0: if is_prime(i): s = i return s if __name__ == "__main__": from time impo...
MikeRixWolfe/projecteuler
e003.py
Python
gpl-3.0
424
# # rtlsdr_scan # # http://eartoearoak.com/software/rtlsdr-scanner # # Copyright 2012 -2015 Al Brown # # A frequency scanning GUI for the OsmoSDR rtl-sdr library at # http://sdr.osmocom.org/trac/wiki/rtl-sdr # # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Gener...
EarToEarOak/RTLSDR-Scanner
rtlsdr_scanner/devices.py
Python
gpl-3.0
4,603
import os from functools import reduce, lru_cache import logging import re import subprocess from randrctl import DISPLAY, XAUTHORITY from randrctl.exception import XrandrException, ParseException from randrctl.model import Profile, Viewport, XrandrConnection, Display logger = logging.getLogger(__name__) class Xra...
edio/randrctl
randrctl/xrandr.py
Python
gpl-3.0
10,440
from __future__ import (absolute_import, division, print_function) from isis_powder.hrpd_routines.hrpd_enums import HRPD_TOF_WINDOWS absorption_correction_params = { "cylinder_sample_height": 2.0, "cylinder_sample_radius": 0.3, "cylinder_position": [0., 0., 0.], "chemical_formula": "V" } # Default cr...
dymkowsk/mantid
scripts/Diffraction/isis_powder/hrpd_routines/hrpd_advanced_config.py
Python
gpl-3.0
1,942
from main.dataset import DataSet import numpy as np def test_dataset(load_image_data, image_size): images, labels, ids, cls, _ = load_image_data dataset = DataSet(images, labels, ids, cls) assert sorted(list(dataset.cls)) == sorted(['cat', 'dog'] * 10) assert dataset.cls.shape == (20,) assert ...
jhole89/convet-image-classifier
test/test_dataset.py
Python
gpl-3.0
1,572
#!/usr/bin/python3 # # tBB 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. # # tBB is distributed in the hope that it will be useful, #...
dpdani/tBB
tBB/settings.py
Python
gpl-3.0
7,813
import datetime import os import json import re import psycopg2 as dbapi2 from flask import Flask from flask import redirect from flask import request from flask import render_template from flask.helpers import url_for from store import Store from fixture import * from sponsors import * from curlers import * from cl...
itucsdb1509/itucsdb1509
clubs.py
Python
gpl-3.0
8,354
# # AFLTV XBMC Plugin # Copyright (C) 2013 Kagenoshin # # AFLTV 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. # # ...
Kagenoshin/plugin.video.afltv
resources/lib/index.py
Python
gpl-3.0
2,731
# -*- 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 field 'PurpleRobotDevice.first_reading_timestamp' db.add_column(...
cbitstech/Purple-Robot-Django
migrations/0037_auto__add_field_purplerobotdevice_first_reading_timestamp.py
Python
gpl-3.0
10,672
#!/usr/bin/python import Colors import Shapes from abc import ABCMeta, abstractmethod class AbstractFactory(object): __metaclass__ = ABCMeta @abstractmethod def get_color(self, color): pass @abstractmethod def get_shape(self, shape): pass class ShapeFactory(AbstractFactory): ...
Sunhick/design-patterns
Creational/AbstractFactory/GeometryFactory/GeometryFactory.py
Python
gpl-3.0
1,700
# -*- encoding: utf-8 -*- """Test class for Architecture UI""" from fauxfactory import gen_string from nailgun import entities from robottelo.datafactory import generate_strings_list, invalid_values_list from robottelo.decorators import run_only_on, tier1 from robottelo.test import UITestCase from robottelo.ui.factory ...
tkolhar/robottelo
tests/foreman/ui/test_architecture.py
Python
gpl-3.0
5,128
# nxt.server module -- LEGO Mindstorms NXT socket interface module # Copyright (C) 2009 Marcus Wanner # # 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 ...
skorokithakis/nxt-python
nxt/server.py
Python
gpl-3.0
9,781
# THIS IS THE PYTHON CODE FOR PiFACE OUTPUT OFF # # Copyright (C) 2014 Tim Massey # # 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 you...
timm-tem/RPi_mediaserver
piface/output7off.py
Python
gpl-3.0
966
# Authors: John Dennis <jdennis@redhat.com> # # Copyright (C) 2011 Red Hat # see file 'COPYING' for use and warranty information # # 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...
hroncok/freeipa
ipapython/ipa_log_manager.py
Python
gpl-3.0
8,302
import sys import regex as re from BeautifulSoup import BeautifulStoneSoup as bss # REQUIRES BeautifulSoup3. BS4 breaks on Python recursion errors when it gets badly damaged texts. def cleanup(infile, outfile): # main routine. takes a file handle for input and output; called at the bottom of the file. text...
ARTFL-Project/PhiloLogic4
extras/utilities/tei_cleanup.py
Python
gpl-3.0
8,791
import os from . import SoccerFSA from . import DataStates class SoccerPlayer(SoccerFSA.SoccerFSA): def __init__(self, brain): SoccerFSA.SoccerFSA.__init__(self,brain) self.addStates(DataStates) self.setName('pData') self.postDistance = 50 self.lastDistance = 0 # Sp...
northern-bites/nao-man
noggin/players/pData.py
Python
gpl-3.0
1,354
# -*- coding: utf-8 -*- __author__= "Luis C. Pérez Tato (LCPT) and Ana Ortega (AOO)" __copyright__= "Copyright 2015, LCPT and AOO" __license__= "GPL" __version__= "3.0" __email__= "l.pereztato@gmail.com" import xc_base import geom import xc from solution import predefined_solutions from model import predefined_spaces...
lcpt/xc
verif/tests/elements/crd_transf/test_element_axis_03.py
Python
gpl-3.0
3,424
import json from treeherder.log_parser.parsers import (EmptyPerformanceData, PerformanceParser) def test_performance_log_parsing_malformed_perfherder_data(): """ If we have malformed perfherder data lines, we should just ignore them and still be able to parse th...
KWierso/treeherder
tests/log_parser/test_performance_parser.py
Python
mpl-2.0
1,056
# 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 __future__ import print_function import argparse import csv import logging import logging.config import os import ...
Tayamarn/socorro
socorro/signature/__main__.py
Python
mpl-2.0
9,386
# 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 sys import traceback from StringIO import StringIO import re import datetime from urllib import urlencode from co...
mozilla/pto
pto/apps/dates/views.py
Python
mpl-2.0
37,380
from flask import render_template class NginxConfigRenderer(): def __init__(self, manifold): self.manifold = manifold self.app = manifold.app def render(self, minions): with self.app.app_context(): return render_template('nginx/nginx.conf', ...
lepistone/manifold
nginx.py
Python
agpl-3.0
596
# Copyright (c) 2014 by Ecreall under licence AGPL terms # available on http://www.gnu.org/licenses/agpl.html # licence: AGPL # author: Amen Souissi import colander from pyramid.view import view_config from dace.processinstance.core import DEFAULTMAPPING_ACTIONS_VIEWS from pontus.default_behavior import Cancel from ...
ecreall/lagendacommun
lac/views/admin_process/manage_keywords.py
Python
agpl-3.0
2,736
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2008-2013 AvanzOSC S.L. All Rights Reserved # Date: 01/07/2013 # # This program is free software: you can redistribute it and/or modif...
avanzosc/avanzosc6.1
avanzosc_tree_grid_ext/__openerp__.py
Python
agpl-3.0
1,850
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2019 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Samy Bucher <samy.bucher@outlook.com> # # The licence is in the file __manifest__...
ecino/compassion-switzerland
sponsorship_switzerland/models/correspondence.py
Python
agpl-3.0
583
from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from rest_framework.authtoken.models import Token class Command(BaseCommand): help = """Create a default admin user if it doesn't exist. ...
Parisson/TimeSide
timeside/server/management/commands/timeside-create-admin-user.py
Python
agpl-3.0
1,192
# -*- encoding: utf-8 -*- ############################################################################### # # # Copyright (C) 2015 Trustcode - www.trustcode.com.br # # ...
Trust-Code/trust-addons
trust_sale/models/__init__.py
Python
agpl-3.0
1,413
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2015 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) # Pedro M. Baeza <pedro.baeza@serviciosbaeza.com> # # This program is free software: you can redistribute it a...
eLBati/website
website_event_register_free_with_sale/models/website.py
Python
agpl-3.0
1,450
# Generated file. Do not edit __author__="drone" from Abs import Abs from And import And from Average import Average from Ceil import Ceil from Cube import Cube from Divide import Divide from Double import Double from Equal import Equal from Even import Even from Floor import Floor from Greaterorequal import Greateror...
gcobos/rft
app/primitives/__init__.py
Python
agpl-3.0
1,163
""" Helpers for accessing comprehensive theming related variables. This file is imported at startup. Imports of models or things which import models will break startup on Django 1.9+. If you need models here, please import them inside the function which uses them. """ import os import re from logging import getLogge...
stvstnfrd/edx-platform
openedx/core/djangoapps/theming/helpers.py
Python
agpl-3.0
10,226
# from . import test_partner_import from . import test_product_import
iw3hxn/LibrERP
data_migration/tests/__init__.py
Python
agpl-3.0
70
from django.shortcuts import render_to_response from django.http import HttpResponseRedirect from django.core.paginator import Paginator from uwcs_website.choob.models import * def quotes_page(request): quoters = map(lambda q:q[0],QuoteObject.objects.all().values_list('quoter').distinct()) quoted = map(lambda...
UWCS/uwcs-website
uwcs_website/choob/views.py
Python
agpl-3.0
2,057
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-11-22 07:11 from __future__ import unicode_literals from django.core.management.sql import emit_post_migrate_signal from django.db import migrations def add_executive_group(apps, schema_editor): # create group db_alias = schema_editor.connection.al...
uclouvain/osis_louvain
base/migrations/0208_create_role_executive.py
Python
agpl-3.0
935
from __future__ import division from os.path import expanduser, exists from os import chdir, mkdir import pickle import numpy as np from scipy import sparse import networkx as nx home = expanduser('~') chdir(home+'/workspace/vichakshana/vichakshana/') #CELERY from mycelery import app class SASD(): def __init__...
gopalkoduri/vichakshana-public
vichakshana/SASD.py
Python
agpl-3.0
7,505
# -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects # Copyright (C) 2015 OpenCraft <xavier@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 Free Soft...
brousch/opencraft
instance/tasks.py
Python
agpl-3.0
2,970
#!/usr/bin/env python3 import os, sys, logging, urllib, time, string, json, argparse, collections, datetime, re, bz2, math from concurrent.futures import ThreadPoolExecutor, wait import lz4 pool = ThreadPoolExecutor(max_workers=16) logging.basicConfig(level=logging.DEBUG) sys.path.append(os.path.join(os.path.dirnam...
kislyuk/cartographer
postproc_db.py
Python
agpl-3.0
1,920
# -*- coding: utf-8 -*- import logging from moulinette.utils.text import random_ascii from moulinette.core import MoulinetteError, MoulinetteAuthenticationError from moulinette.authentication import BaseAuthenticator logger = logging.getLogger("moulinette.authenticator.yoloswag") # Dummy authenticator implementation...
YunoHost/moulinette
test/src/authenticators/dummy.py
Python
agpl-3.0
2,129
# -*- coding: utf-8 -*- """ Models for Credit Eligibility for courses. Credit courses allow students to receive university credit for successful completion of a course on EdX """ from __future__ import absolute_import import datetime import logging from collections import defaultdict import pytz import six from con...
ESOedX/edx-platform
openedx/core/djangoapps/credit/models.py
Python
agpl-3.0
28,155
# The Hazard Library # Copyright (C) 2012-2014, 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. ...
silviacanessa/oq-hazardlib
openquake/hazardlib/mfd/evenly_discretized.py
Python
agpl-3.0
3,967
""" Configuration for the ``student`` Django application. """ from __future__ import absolute_import from django.apps import AppConfig from django.contrib.auth.signals import user_logged_in class StudentConfig(AppConfig): """ Default configuration for the ``student`` application. """ name = 'student'...
procangroup/edx-platform
common/djangoapps/student/apps.py
Python
agpl-3.0
603
from django.conf.urls import patterns, include, url from volunteers import views urlpatterns = patterns('', #url(r'^$', views.index, name='volunteer_index'), #url(r'^(?P<volunteer_id>\d+)/$', views.volunteer_detail, name='volunteer_detail'), #url(r'^AddTasks/$', views.add_tasks, name='add_tasks'), #url...
cateee/fosdem-volunteers
volunteers/urls.py
Python
agpl-3.0
403
# Copyright 2009-2011 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). __metaclass__ = type import doctest import unittest from lp.testing.layers import DatabaseFunctionalLayer def test_suite(): suite = unittest.TestSuite() suite.laye...
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/app/widgets/tests/test_widget_doctests.py
Python
agpl-3.0
498
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
jss-emr/openerp-7-src
openerp/addons/mail/wizard/mail_compose_message.py
Python
agpl-3.0
12,527
from django.contrib.auth.decorators import login_required import logging from certificates.models import GeneratedCertificate from certificates.models import CertificateStatuses as status from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse import json #@begin:View certificate page...
EduPepperPDTesting/pepper2013-testing
lms/djangoapps/certificates/views.py
Python
agpl-3.0
23,890
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-06 13:24 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('badges', '0003_badgedesign_bg_color'), ] operations = ...
helfertool/helfertool
src/badges/migrations/0004_auto_20160306_1424.py
Python
agpl-3.0
638
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Search Architecture: - Have a list of accounts - Create an "overseer" thread - Search Overseer: - Tracks incoming new location values - Tracks "paused state" - During pause or new location will clears current search queue - Starts search_worker threads - Se...
mpw1337/RocketMap
pogom/search.py
Python
agpl-3.0
56,889
from django.utils.translation import ugettext_lazy as _ app_info = { 'name': 'comments', 'author': 'Katrid', 'website': 'http://katrid.com', 'short_description': 'Enterprise Social Network', 'description': _('Comments, Discussions, Mailing List, News, Document Followers'), 'dependencies': ['ke...
mrmuxl/keops
keops/modules/comments/apps.py
Python
agpl-3.0
403
# -*- coding: utf-8 -*- import os.path from btb.log_filter import skip_unreadable_post BASE_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) TEST_RUNNER = 'btb.test_runner.BtbTestRunner' # # Locale # TIME_ZONE = 'US/Eastern' LANGUAGE_CODE = 'en-us' SITE_ID = 1 USE_I18N = True USE_L10N = True # # Fil...
yourcelf/btb
scanblog/scanblog/default_settings.py
Python
agpl-3.0
6,676
import sdms server = { 'HOST' : 'localhost', 'PORT' : '2506', 'USER' : 'SYSTEM', 'PASSWORD' : 'VerySecret' } conn = sdms.SDMSConnectionOpenV2(server, server['USER'], server['PASSWORD'], "Simple Access Example") try: if 'ERROR' in conn: print(str(conn)) exit(1) except: pass stmt = "LIST SESSIONS;" re...
schedulix/schedulix
src/examples/SimpleAccess3.py
Python
agpl-3.0
704
import os import aiohttp import random import string import asyncio import shutil import re from threading import Thread from io import BytesIO from zipfile import ZipFile from discord.ext import commands from core import BotError DEFAULT_MAJOR = "512" DEFAULT_MINOR = "1416" class WindowsProcessThread(Thread): ...
Aurorastation/BOREALISbot2
cogs/dm_eval.py
Python
agpl-3.0
13,511
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2016-12-28 12:33 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0020_profile_preferred_proxy'), ] operations = [ migrations.AddField( model_name='statistic...
MuckRock/muckrock
muckrock/accounts/migrations/0021_auto_20161228_1233.py
Python
agpl-3.0
2,686
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' gitolite-manager Author: Tim Henderson Contact: tim.tadh@gmail.com, tadh@case.edu Copyright: 2013 All Rights Reserved, see LICENSE ''' import urllib, re import cgi from logging import getLogger log = getLogger('gm:view:user') from pyramid.view import view_config fro...
timtadh/gitolite-manager
gitolite_manager/views/user.py
Python
agpl-3.0
7,934
# -*- 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...
ksrajkumar/openerp-6.1
openerp/addons/itara_customer_commission/__openerp__.py
Python
agpl-3.0
1,639
"""Implements basics of Capa, including class CapaModule.""" import cgi import copy import datetime import hashlib import json import logging import os import traceback import struct import sys import re # We don't want to force a dependency on datadog, so make the import conditional try: import dogstats_wrapper a...
chrisndodge/edx-platform
common/lib/xmodule/xmodule/capa_base.py
Python
agpl-3.0
62,222
from django.core.management.base import BaseCommand from django.utils import timezone import logging import time from borme.models import Config from borme.parser.importer import import_borme_download # from borme.parser.postgres import psql_update_documents import borme.parser.importer from libreborme.utils import ...
PabloCastellano/libreborme
borme/management/commands/importborme.py
Python
agpl-3.0
2,559
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( ...
fnp/wolnelektury
src/infopages/migrations/0001_initial.py
Python
agpl-3.0
4,109
""" This module is essentially a broker to xmodule/tabs.py -- it was originally introduced to perform some LMS-specific tab display gymnastics for the Entrance Exams feature """ from django.conf import settings from django.utils.translation import ugettext as _, ugettext_noop from courseware.access import has_access f...
jbassen/edx-platform
lms/djangoapps/courseware/tabs.py
Python
agpl-3.0
10,813
############################################################################### # # 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-script
DropboxWebsite/dropbox.py
Python
agpl-3.0
4,978
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cases', '0018_auto_20170418_1220'), ] operations = [ migrations.AlterField( model_name='case', name=...
HelloLily/hellolily
lily/cases/migrations/0019_auto_20170418_1243.py
Python
agpl-3.0
425
#! /usr/bin/env python # -*- coding: utf-8 -*- # Freshermeat - An open source software directory and release tracker. # Copyright (C) 2017-2020 Cédric Bonhomme - https://www.cedricbonhomme.org # # For more information: https://sr.ht/~cedric/freshermeat # # This program is free software: you can redistribute it and/or ...
cedricbonhomme/services
freshermeat/web/views/api/v1/language.py
Python
agpl-3.0
1,163
#! /usr/bin/env python # -*- coding: utf-8 -*- import logging import os from dateutil.relativedelta import relativedelta from datetime import datetime, date import click from werkzeug.security import generate_password_hash import newspipe.models from newspipe.bootstrap import application, db from newspipe.controller...
JARR-aggregator/JARR
newspipe/commands.py
Python
agpl-3.0
5,322
# # File: capa/capa_problem.py # # Nomenclature: # # A capa Problem is a collection of text and capa Response questions. # Each Response may have one or more Input entry fields. # The capa problem may include a solution. # """ Main module which shows problems (of "capa" type). This is used by capa_module. """ from ...
pku9104038/edx-platform
common/lib/capa/capa/capa_problem.py
Python
agpl-3.0
28,574
import json from c2corg_api.models.route import Route from c2corg_api.models.topo_map import ArchiveTopoMap, TopoMap, MAP_TYPE from c2corg_api.models.topo_map_association import TopoMapAssociation from c2corg_api.models.waypoint import Waypoint from c2corg_api.tests.search import reset_search_index from c2corg_api.mod...
c2corg/v6_api
c2corg_api/tests/views/test_topo_map.py
Python
agpl-3.0
16,155
#!/usr/bin/env python # -*- coding: utf-8 -*- ## ## Author: Adriano Monteiro Marques <adriano@umitproject.org> ## ## Copyright (C) 2011 S2S Network Consultoria e Tecnologia da Informacao LTDA ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU Affero General Publi...
umitproject/site-status
status_cron/urls.py
Python
agpl-3.0
1,731
# -*- coding: utf-8 -*- # Copyright 2019 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class StockPicking(models.Model): _inherit = 'stock.picking' default_tracking_url = fields.Char( related='carrier_id.default_tracking_url', r...
OCA/carrier-delivery
delivery_carrier_default_tracking_url/models/stock_picking.py
Python
agpl-3.0
340
import web from inginious.frontend.plugins.utils.admin_api import AdminApi from inginious.frontend.plugins.utils import get_mandatory_parameter class FilterTasksApi(AdminApi): def API_POST(self): parameters = web.input() task_query = get_mandatory_parameter(parameters, "task_query") lim...
JuezUN/INGInious
inginious/frontend/plugins/problem_bank/pages/api/filter_tasks_api.py
Python
agpl-3.0
2,183
############################################################################## # For copyright and license notices, see __manifest__.py file in module root # directory ############################################################################## from . import website from . import res_config_settings
ingadhoc/website
website_sale_order_type_ux/models/__init__.py
Python
agpl-3.0
303
#! -*- coding: utf-8 -*- from collections import OrderedDict from sqlalchemy import Column, Date, ForeignKey, Index, String from sqlalchemy import Integer from sqlalchemy.orm import relationship from radar.database import db from radar.models.common import MetaModelMixin, patient_id_column, patient_relationship, uuid...
renalreg/radar
radar/models/patient_addresses.py
Python
agpl-3.0
8,540
#! /usr/bin/env python # -*- coding: utf-8 -*- import os import json from flask import Flask app = Flask(__name__) app.config.from_object(__name__) # Loads the restaurants RESTAURANTS = {} with open('./refuge/var/restaurants.json', 'r') as f: RESTAURANTS = json.load(f) AREAS = { "Kirchberg": [49.638...
cedricbonhomme/c-dric-on-mange-o-midi
refuge/__init__.py
Python
agpl-3.0
1,267
import pytest import pytz from datetime import datetime as dt from arctic.date import datetime_to_ms, ms_to_datetime, mktz, to_pandas_closed_closed, DateRange, OPEN_OPEN, CLOSED_CLOSED from arctic.date._mktz import DEFAULT_TIME_ZONE_NAME from arctic.date._util import to_dt @pytest.mark.parametrize('pdt', [ ...
r0k3/arctic
tests/unit/date/test_util.py
Python
lgpl-2.1
3,570
# da vs turns module import numpy as np from scipy import optimize import matplotlib.pyplot as pl import glob, sys, os, time from deskdb import SixDeskDB,tune_dir,mk_dir import matplotlib # ------------- basic functions ----------- def get_divisors(n): """finds the divisors of an integer number""" large_divisors = ...
mfittere/SixDeskDB
sixdeskdb/davsturns.py
Python
lgpl-2.1
28,687
#!/usr/bin/env python # Aravis - Digital camera library # # Copyright (c) 2011-2012 Emmanuel Pacaud # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, o...
lu-zero/aravis
tests/python/arv-enum-test.py
Python
lgpl-2.1
1,513
#### import the simple module from the paraview from paraview.simple import * import glob, re, os, numpy, csv def CreatePointSelection(ids): source = IDSelectionSource() source.FieldType = "POINT" sids = [] for i in ids: sids.append(0) #proc-id sids.append(i) #cell-id source.IDs = sids ...
jhaase1/zapdos
problems/Schottky_emission/transient/no_ballast/parametric/base/OldUnAveragedSystemData.py
Python
lgpl-2.1
5,514
########################################################################## ## # The Coq Proof Assistant / The Coq Development Team ## ## v # Copyright INRIA, CNRS and contributors ## ## <O___,, # (see version control and CREDITS file for authors & dates) ## ## \VV/ #########...
gares/coq
doc/tools/coqrst/coqdomain.py
Python
lgpl-2.1
54,478
#!/usr/bin/python3 # -*- coding: utf-8 -*- # Copyright © 2014 Martin Ueding <dev@martin-ueding.de> # Licensed under The Lesser GNU Public License Version 2 (or later) from setuptools import setup, find_packages setup( author="David Pine", description="Least squares linear fit for numpy library of Python", ...
djpine/linfit
setup.py
Python
lgpl-2.1
560
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import os from rapidsms.router import Router from rapidsms.backends.backend import Backend from rapidsms.app import App # a really dumb Logger stand-in class MockLogger (list): def __init__(self): # enable logging during tests with an # environment variable,...
ewheeler/rapidsms-core
lib/rapidsms/tests/harness.py
Python
lgpl-3.0
2,151
from torrentstatus.plugin import iTorrentAction from torrentstatus.utorrent.connection import Connection from contextlib import contextmanager from torrentstatus.bearlang import BearLang from torrentstatus.settings import config, labels_config from torrentstatus.utils import intTryParse @contextmanager def utorrent...
dabear/torrentstatus
torrentstatus/plugins/builtin.torrent.onstart.settorrentlabels.py
Python
lgpl-3.0
3,296
# tcpserv # # Copyright (c) 2015 Christian Sengstock, All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 3.0 of the License, or (at your option) any l...
csengstock/tcpserv
tcpserv.py
Python
lgpl-3.0
5,176
############################ Copyrights and license ############################ # # # Copyright 2018 bbi-yggy <yossarian@blackbirdinteractive.com> # # ...
ahmad88me/PyGithub
github/Project.py
Python
lgpl-3.0
10,167
# -*- coding: utf-8 -*- # Copyright (c) 2015 by Pablo Martín <goinnn@gmail.com> # # This software is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) a...
goinnn/django-model-history
example/news/tests.py
Python
lgpl-3.0
4,539
# chat_client.py import sys, socket, select def chat_client(): if(len(sys.argv) < 3) : print 'Usage : python chat_client.py hostname port' sys.exit() host = sys.argv[1] port = int(sys.argv[2]) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.settimeout(2) # connect to...
hantsaniala/KrC
chat_client.py
Python
lgpl-3.0
1,445
# -*- coding: utf-8 -*- # Copyright(C) 2017 Vincent A # # This file is part of a weboob module. # # This weboob module 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 Licen...
laurentb/weboob
modules/lameteoagricole/module.py
Python
lgpl-3.0
1,524
# ID-Fits # Copyright (c) 2015 Institut National de l'Audiovisuel, INA, All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 3.0 of the License, or (at...
ina-foss/ID-Fits
lib/datasets/landmarks_file.py
Python
lgpl-3.0
1,121
import os.path from pyneuroml.lems.LEMSSimulation import LEMSSimulation import shutil import os from pyneuroml.pynml import read_neuroml2_file, get_next_hex_color, print_comment_v, print_comment import random def generate_lems_file_for_neuroml(sim_id, neuroml_file, ...
34383c/pyNeuroML
pyneuroml/lems/__init__.py
Python
lgpl-3.0
7,440
# Copyright 2020 by Kurt Rathjen. All Rights Reserved. # # This library is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. This ...
krathjen/studiolibrary
src/studiolibrary/librarywindow.py
Python
lgpl-3.0
80,070
""" 5.1 - Probabilistic Modeling: Error Propagation ================================================ In this example we will show how easy we can propagate uncertainty from GemPy parameters to final structural models. """ # %% import sys, os sys.path.append("../../gempy") os.environ["THEANO_FLAGS"] = "mode=FAST_RUN,...
cgre-aachen/gempy
examples/tutorials/ch5_probabilistic_modeling_DEP/ch5_1.py
Python
lgpl-3.0
5,072
# pylint: disable=R0904,R0902,E1101,E1103,C0111,C0302,C0103,W0101 from six import string_types import numpy as np from numpy.linalg import norm from pyNastran.utils import integer_types from pyNastran.bdf.cards.elements.bars import CBAR, LineElement from pyNastran.bdf.bdf_interface.assign_type import ( int...
saullocastro/pyNastran
pyNastran/bdf/cards/elements/beam.py
Python
lgpl-3.0
15,046
""" Identity Based Signature | From: "David Pointcheval and Olivier Sanders. Short Randomizable Signatures" | Published in: 2015 | Available from: https://eprint.iacr.org/2015/525.pdf * type: signature (identity-based) * setting: bilinear groups (asymmetric) :Authors: Lovesh Harchandani :Date: ...
JHUISI/charm
charm/schemes/pksig/pksig_ps03.py
Python
lgpl-3.0
2,946
# -*- coding: utf-8 -*- # Copyright (C) 2016 Matthias Luescher # # Authors: # Matthias Luescher # # This file is part of edi. # # edi is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of...
erickeller/edi
tests/lib/test_playbookrunner.py
Python
lgpl-3.0
2,684
from reportlab.lib.colors import black from reportlab.lib.units import cm from base import BAND_WIDTH, BAND_HEIGHT, Element class Graphic(Element): """Base graphic class""" visible = True stroke = True stroke_color = black stroke_width = 1 fill = False fill_color = black def __init_...
joerabelo/geraldo
geraldo/graphics.py
Python
lgpl-3.0
3,556
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from lazagne.config.module_info import ModuleInfo try: from ConfigParser import RawConfigParser # Python 2.7 except ImportError: from configparser import RawConfigParser # Python 3 from collections import OrderedDict class Wifi(ModuleInfo): d...
AlessandroZ/LaZagne
Linux/lazagne/softwares/wifi/wifi.py
Python
lgpl-3.0
1,246
# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import List, Union, Dict, Optional, Any from cura.PrinterOutput.PrinterOutputController import PrinterOutputController from cura.PrinterOutput.Models.PrinterOutputModel import PrinterOutputModel from .CloudClust...
Patola/Cura
plugins/UM3NetworkPrinting/src/Cloud/Models/CloudClusterPrinterStatus.py
Python
lgpl-3.0
4,467
# ============================================================================== # Copyright (C) 2011 Diego Duclos # Copyright (C) 2011-2018 Anton Vorobyov # # This file is part of Eos. # # Eos is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as publi...
pyfa-org/eos
tests/mod_builder/modinfo/affectee_filter/test_affectee_dom_grp.py
Python
lgpl-3.0
5,426
from __future__ import annotations from typing import ( Any, Awaitable, Callable, Iterable, AsyncIterator, Tuple, Mapping, ) from aiohttp import web import aiohttp_cors WebRequestHandler = Callable[ [web.Request], Awaitable[web.StreamResponse] ] WebMiddleware = Callable[ [web.Request...
lablup/sorna-manager
src/ai/backend/gateway/types.py
Python
lgpl-3.0
720
# Copyright (c) 2013 Alon Swartz <alon@turnkeylinux.org> # # This file is part of OctoHub. # # OctoHub 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 l...
bmya/odoo-support
adhoc_modules_server/octohub/exceptions.py
Python
lgpl-3.0
701
#!/usr/bin/python #=============================================================================== # # conversion script to create a mbstestlib readable file containing test specifications # out of an testset file in XML format # #=============================================================================== # Input c...
SIM-TU-Darmstadt/mbslib
dependencies/mbstestlib/src/testsetXML2intermediateConverter.py
Python
lgpl-3.0
9,479
#!/usr/bin/env python3 """tbar - Terminal Bar Number to bar in terminal. """ __version__ = "0.1" import sys from tbar.tbar import TBar from tbar.reader import Reader def main(infile, comment, sep, field, regexp, max, length, vertical): infile = infile or sys.stdin r = Reader(infile=infile, commen...
10sr/tbar
tbar/__init__.py
Python
unlicense
557