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: ISO-8859-1 -*- """Resource sleeping_svg (from file sleeping.svg)""" # written by resourcepackage: (1, 0, 1) source = 'sleeping.svg' package = 'olpcgames.data' data = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\012<!-- \ Created with Inkscape (http://www.inkscape.org/) -->\012<svg\012 \ ...
gmccreight/geoquiz
olpcgames/data/sleeping_svg.py
Python
gpl-3.0
31,334
""" Copyright (c) 20115 Alan Yorinks All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This library is dis...
Rosebotics/pymata-aio
pymata_aio/private_constants.py
Python
gpl-3.0
4,660
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2019 Manas.Tech # License granted by Canonical Limited # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # ...
ubuntu-core/snapcraft
snapcraft/plugins/v1/crystal.py
Python
gpl-3.0
4,665
# Author: Mr_Orange <mr_orange@hotmail.it> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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 Lic...
bcorbet/SickRage
sickbeard/providers/thepiratebay.py
Python
gpl-3.0
13,315
''' file syntax: - version (2 byte), b'\x00\x01' - encryption method (2 bytes): b'\x00\x01': - argon2id to expand pw to 32 byte key with 32 byte salt - 32 byte salt to derive a master token = sha256(salt + pw) - AES GCM global encryption with 12 byte nonce - AES CBC for passwords: 16 byte iv, token as k...
lugino-emeritus/py-keysaver
keysaver.py
Python
gpl-3.0
13,387
# # Copyright 2010 Free Software Foundation, Inc. # # This file was generated by gr_modtool, a tool from the GNU Radio framework # This file is a part of gr-display # # SPDX-License-Identifier: GPL-3.0-or-later # # """ Utilities for extracting text from generated classes. """ from __future__ import unicode_literals de...
dl1ksv/gr-display
docs/doxygen/doxyxml/text.py
Python
gpl-3.0
1,297
from typing import List from .configuration import ( ClusterConfiguration, GroupConfiguration, ServersConfiguration, ) from .error import NotEnoughNodesError class MinMixin: def raise_for_min(self): if self.config.min > len(self.oar_nodes): raise NotEnoughNodesError( ...
BeyondTheClouds/enoslib
enoslib/infra/enos_g5k/concrete.py
Python
gpl-3.0
1,175
#!/usr/bin/env python import pygame from pygame.locals import color import resources import basic as theme class Render(object): def __init__(self, game): self.__game = game scr_size = (self.__game.size[0] * theme.BRICK_SIZE + 4, self.__game.size[1] * theme.BRICK_SIZE + 4) ...
int-0/aftris
render.py
Python
gpl-3.0
2,746
# -*- coding: utf-8 -*- from module.plugins.internal.MultiHook import MultiHook class ZeveraComHook(MultiHook): __name__ = "ZeveraComHook" __type__ = "hook" __version__ = "0.05" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ...
Zerknechterer/pyload
module/plugins/hooks/ZeveraComHook.py
Python
gpl-3.0
1,128
import sys #seq = list() def memo_lis(i, memo = 0): if memo == 0: memo = dict() if i == 0: if i not in memo: #if memo[i] == None: memo[i] = ([seq[i]]) return([seq[i]]) else: ans = [seq[i]] for j in range(0, i): if seq[i] > seq[j]: # We can add seq[i] after seq[j] if j not in memo...
tristan-hunt/UVaProblems
sdi.py
Python
gpl-3.0
1,195
from setuptools import setup setup(name='todmisc-songops', version='0.1', description='The Other Days Music and Instrument Sound Converter, LSDJ song operations', url='https://github.com/TheOtherDays/todmisc-songops', author='The Other Days (http://theotherdays.net)', author_email='theoth...
TheOtherDays/todmisc-songops
setup.py
Python
gpl-3.0
471
#!/usr/bin/env python # -*- coding: utf-8 -*- from sqlalchemy import * from sqlalchemy import exc from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import * from flask_login import AnonymousUserMixin import sys import os import logging from werkzeug.security import generate_password_hash from...
Kennyl/calibre-web
cps/ub.py
Python
gpl-3.0
23,868
# coding: utf-8 # Copyright (C) 2013-2016 Johan Reitan # # This file is part of QtChordii. # # QtChordii 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) ...
joharei/QtChordii
settings/settings.py
Python
gpl-3.0
2,286
#!/usr/bin/env python3 # This file is part of OpenSoccerManager. # # OpenSoccerManager 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 ver...
OpenSoccerManager/opensoccermanager
uigtk/buildings.py
Python
gpl-3.0
10,863
#!/usr/bin/env python3 import datetime import json import os import time import signal # attempt to ignore ctrl-z signal.signal(signal.SIGTSTP, signal.SIG_IGN) def blinking(string): return '\33[5m' + string + '\33[0m' BANNER = """ W e l c o m e t o ______ __ / ____ \ ___ / /__________ _____ / / ...
netsoc/admin_utils
freshers_signup.py
Python
gpl-3.0
4,811
# The time library is needed to measure execution time # PIL library to manipulate images # colorsys library to manipulate colors # operator library to sort the values of the array in the fastest way import os import sys import time from sorter import * from painter import * from explorer import * start_time = time.ti...
neversettle7/image-color-sorter
pixelsorter.py
Python
gpl-3.0
4,583
from collections import namedtuple class SiaDaemon(object): """The daemon is responsible for starting and stopping the modules which make up the rest of Sia. It also provides endpoints for viewing build constants.""" def __init__(self, scpy): self.scpy = scpy def stop(self): """ Cl...
emilio2601/scpy
scpy/daemon.py
Python
gpl-3.0
900
#!/usr/bin/env python3 import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "skuskovy_system.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
mmunko/skuskovy-system
manage.py
Python
gpl-3.0
259
# coding=utf-8 """ InaSAFE Disaster risk assessment tool developed by AusAid and World Bank - **Functionality related to shake data files.** Contact : ole.moller.nielsen@gmail.com .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License a...
opengeogroep/inasafe
realtime/shake_data.py
Python
gpl-3.0
15,213
# Copyright (C) 2012 Alex Nitz # 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 # self.option) any later version. # # This program is distributed in ...
hagabbar/pycbc_copy
pycbc/events/events.py
Python
gpl-3.0
32,066
# -*- coding: utf-8 -*- # YAFF is yet another force-field code. # Copyright (C) 2011 Toon Verstraelen <Toon.Verstraelen@UGent.be>, # Louis Vanduyfhuys <Louis.Vanduyfhuys@UGent.be>, Center for Molecular Modeling # (CMM), Ghent University, Ghent, Belgium; all rights reserved unless otherwise # stated. # # This file is pa...
molmod/yaff
yaff/sampling/test/test_harmonic.py
Python
gpl-3.0
4,266
#!/usr/bin/env python # ~*~ encoding: utf-8 ~*~ """ This file is part of SOCSIM. SOCSIM 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) an...
peterrenshaw/socsim
socsim/misc/extract.py
Python
gpl-3.0
2,087
""" Copyright (C) 2017 kanishka-linux kanishka.linux@gmail.com This file is part of hlspy. hlspy 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 ver...
kanishka-linux/kawaii-player
kawaii_player/hls_webkit/netmon_webkit.py
Python
gpl-3.0
3,417
# -*- 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. from .backends import ElasticSearchBackend f...
evernote/zing
pootle/core/search/__init__.py
Python
gpl-3.0
454
#!/usr/bin/env python #-*- coding:utf-8 -*- # # This file is part of the NNGT project to generate and analyze # neuronal networks and their activity. # Copyright (C) 2015-2019 Tanguy Fardet # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
Silmathoron/NNGT
doc/examples/multi_groups_network.py
Python
gpl-3.0
1,906
#!/usr/bin/env python __all__ = ['find_parameters'] import os, sys, traceback, getpass, time, re from threading import Thread from subprocess import * import multiprocessing #Werneck import platform #------- if sys.version_info[0] < 3: from Queue import Queue else: from queue import Queue telnet_workers = [] ssh_w...
rafaelwerneck/kuaa
classifiers/libSVM_3_17/grid.py
Python
gpl-3.0
15,616
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright © Spyder Project Contributors # # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) # ----------------------------------------------------------------------------- ...
bgris/ODL_bgris
lib/python3.5/site-packages/spyder/widgets/projects/type/python.py
Python
gpl-3.0
2,795
from flask import Flask,request, jsonify import json app = Flask(__name__) @app.route("/") def rutaStatus(): return jsonify(status='OK') @app.route("/status") def rutaStatusDocker(): return jsonify(status='OK') if __name__ == "__main__": app.run(host='0.0.0.0', port=80)
mariofg92/ivmario
web2.py
Python
gpl-3.0
286
#!/usr/bin/env python from __future__ import division import time import sys import MySQLdb as mdb import smtplib import re import bz2 import alarm # Alarm Levels: # Temperature Alarms # 0 - No alarm, freezer is in a normal state # 1 - freezer is in a high temp range, and has been for 30 min # 2 - freezer is in a high...
xvorenda/DAENA
py/alarm.py
Python
gpl-3.0
62,009
#! /usr/bin/env python ''' Converts realtime ACE data from NOAA to format suitable for MHD test program of PAMHD. Copyright 2015, 2016 Ilja Honkonen All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Re...
nasailja/pamhd
tests/mhd/config_files/magnetohydrodynamic/solar_wind/1d/realtime_solar_wind_sim.py
Python
gpl-3.0
8,193
#****************************************************************************** # FILE: calibrate_vic.py # AUTHOR: Kel Markert # EMAIL: kel.markert@nasa.gov # ORGANIZATION: NASA-SERVIR, UAH/ESSC # MODIFIED BY: n/a # CREATION DATE: 22 Feb. 2017 # LAST MOD DATE: 03 Apr. 2017 # PURPOSE: This script performs a simple calib...
KMarkert/servir-vic-training
scripts/calibrate_vic.py
Python
gpl-3.0
6,662
#!/usr/bin/env python # -*- coding: utf-8 -*- """This module provides a function that knows what you mean""" def know_what_i_mean(wink, numwink=2): """ Prints "Know what I mean?" with a variable number of winks. Args: wink (mixed): Represents a wink. numwink (int): Wink multiplier. Defaults to...
rrafiringa/is210-week-04-warmup
task_01.py
Python
mpl-2.0
759
import hashlib import json import sys import traceback from datetime import datetime, timedelta from functools import wraps import newrelic.agent import waffle from constance import config from django.conf import settings from django.core.exceptions import ValidationError from django.db import models from django.db.mo...
openjck/kuma
kuma/wiki/models.py
Python
mpl-2.0
71,106
#!/usr/bin/env python # -*- coding: utf-8 -*- """This program ccontains functions for temperature conversions.""" import decimal ABSOLUTE_DIFFERENCE = decimal.Decimal('273.15') def fahrenheit_to_celsius(degrees): """Converts from Fahrenheit to Celsius. Args: degrees: Fahrenheit temperature in deci...
slb6968/is210-week-04-synthesizing
task_01.py
Python
mpl-2.0
1,384
# 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 pytest from pages.firefox.new import FirefoxNewPage, FirefoxNewThankYouPage # We don't currently show the down...
jpetto/bedrock
tests/functional/firefox/test_new.py
Python
mpl-2.0
1,647
# encoding: utf-8 # # # 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/. # # Contact: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import, divisi...
klahnakoski/jx-sqlite
vendor/jx_python/expressions/between_op.py
Python
mpl-2.0
438
# -*- coding: utf-8 -*- # 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 json import re from django.conf import settings from django.db.models import Q from dja...
kewisch/bedrock
bedrock/firefox/views.py
Python
mpl-2.0
18,915
# -*- coding: utf-8 -*- # Generated by Django 1.11.8 on 2017-12-11 07:32 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0032_history_json_args'), ] operations = [ migrations.AddField( ...
vstconsulting/polemarch
polemarch/main/migrations/0033_auto_20171211_0732.py
Python
agpl-3.0
628
from django.http import HttpResponse from django.conf import settings import json def javascript_variables(request): variables = { 'STATIC_PREFIX': settings.STATIC_URL } var_catalog = "// VARIABLE CATALOG FOR DJANGO VARIABLES\n\n" var_catalog += "\n".join(("%s = %s;" % (key, json.dumps(va...
Mezgrman/mezgrmanDE
mezgrman/views.py
Python
agpl-3.0
434
""" Settings for Appsembler on CMS in Production. """ import sentry_sdk from openedx.core.djangoapps.appsembler.settings.settings import production_common def plugin_settings(settings): """ Appsembler CMS overrides for both production AND devstack. Make sure those are compatible for devstack via defens...
appsembler/edx-platform
openedx/core/djangoapps/appsembler/settings/settings/production_cms.py
Python
agpl-3.0
1,171
from roboplexx import rpx_util, devices, rpx_prop __author__ = 'ajb' import serial # @rpx_util.rpx_device class PololuSimpleMotorController(devices.McBasic): def __init__(self, device_id): devices.McBasic.__init__(self, device_id) self._connection_string = "/dev/ttyACM0" self._connection...
devalbo/roboplexx
roboplexx/drivers/drvr_pololu_simple_motor_controller.py
Python
agpl-3.0
2,332
# coding=utf-8 """ Tests for the course home page. """ from datetime import datetime, timedelta import ddt import mock from django.conf import settings from django.core.urlresolvers import reverse from django.http import QueryDict from django.utils.http import urlquote_plus from pytz import UTC from waffle.models impo...
hastexo/edx-platform
openedx/features/course_experience/tests/views/test_course_home.py
Python
agpl-3.0
25,064
# -*- coding: utf-8 -*- """Helper functions for working with Programs.""" import datetime from urlparse import urljoin from django.conf import settings from django.core.urlresolvers import reverse from django.utils.text import slugify from opaque_keys.edx.keys import CourseKey from pytz import utc from course_modes.m...
prarthitm/edxplatform
openedx/core/djangoapps/programs/utils.py
Python
agpl-3.0
15,535
# -*- coding: utf-8 -*- # Generated by Django 1.9.11 on 2017-04-07 09:52 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('organization_network', '0098_producerdata'), ] operations = [ migrations.Ad...
Ircam-Web/mezzanine-organization
organization/network/migrations/0099_organization_validation_status.py
Python
agpl-3.0
585
# -*- 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 'ActivityMigrationProgress' db.create_table('activity_activitymigrationprogress', ( ...
wevoice/wesub
apps/activity/migrations/0002_auto__add_activitymigrationprogress.py
Python
agpl-3.0
21,651
# Copyright: Damien Elmes <anki@ichi2.net> # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import socket import time import traceback import gc from aqt.qt import * import aqt from anki import Collection from anki.sync import Syncer, RemoteServer, FullSyncer, MediaSyncer, \ RemoteMe...
Stvad/anki
aqt/sync.py
Python
agpl-3.0
18,494
#kgb import controllers
BorgERP/borg-erp-6of3
verticals/medical61/web_doc_oemedical/__init__.py
Python
agpl-3.0
25
from engine.services.lib.debug import check_if_debugging check_if_debugging() import inspect import logging import os import sys import traceback from logging.handlers import RotatingFileHandler from subprocess import check_call, check_output from flask import Flask ## Moved populate & upgrade from webapp from init...
isard-vdi/isard
engine/engine/start.py
Python
agpl-3.0
2,127
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "MRP product color", "summary": "MRP product color", "version": "9.0.1.0.0", "category": "Product", "website": "https://odoo-community.org/", "author": "<Samuel Barron...
Gebesa-Dev/Addons-gebesa
mrp_product_color/__openerp__.py
Python
agpl-3.0
716
#!/usr/bin/env python3 import ipfsapi import os import pepe import requests import socket import base64 from flask import Flask, request, redirect, render_template from werkzeug.utils import secure_filename from argparse import ArgumentParser import logging from threading import Thread from time import sleep parser = ...
Jacotsu/pepenet
pepenet.py
Python
agpl-3.0
3,777
# -*- coding: utf-8 -*- import os import json from sqlalchemy import and_, extract, func, desc from datetime import datetime from jinja2 import TemplateNotFound from flask import Blueprint, render_template, send_from_directory, abort, request from flask.ext.paginate import Pagination from flask.ext import restful fro...
LuizArmesto/gastos_abertos
gastosabertos/contratos/views.py
Python
agpl-3.0
13,828
import mako import uuid import moksha.common.utils import logging import tw2.core as twc import tg from fedoracommunity.lib.utils import OrderedDict from mako.template import Template from fedoracommunity.connectors.api import get_connector log = logging.getLogger(__name__) class TabWidget(twc.Widget): template...
fedora-infra/fedora-packages
fedoracommunity/widgets/package/package.py
Python
agpl-3.0
4,090
#!/usr/bin/env python3 # -*- coding:UTF-8 -*- #Copyright (c) 1986 Nick Wong. #Copyright (c) 2016-2026 TP-NEW Corp. # License: TP-NEW (www.tp-new.com) __author__ = "Nick Wong" ''' TCP 客户端 ''' #导入socket库 import socket #创建一个socket AF_INET是定IPv4协议、AF_INET6为指定IPv6协议, SOCK_STREAM指定使用面向流的TCP协议 s = socket.socket(socket...
nick-huang-cc/GraffitiSpaceTT
UnderstandStudyPython/TCP_stu2.py
Python
agpl-3.0
1,020
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): # moved to initial data pass def backwards(self, orm): pass models = { 'auth.group': { ...
fgaudin/aemanager
autoentrepreneur/migrations/0003_sales_limit_init.py
Python
agpl-3.0
6,763
# 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 Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # Kirinki is distributed in the...
i02sopop/Kirinki
settings.py
Python
agpl-3.0
4,976
class BaseManager(object): def __init__(self, debug=False): """Init with debug mode on/off.""" self.debug = debug def _do_export(self, rows): """ Do the import job from the specific backend WARNING: self.f MUST be an object that supports the "write()" method...
feroda/lessons-python4beginners
src/gestionale/managers02/base.py
Python
agpl-3.0
1,676
# For copyright and license notices, see __manifest__.py file in module root from . import pos_session from . import account_bank_statement from . import pos_order_inherit
jobiols/odoo-addons
point_of_sale_fast_close/models/__init__.py
Python
agpl-3.0
173
# Copyright 2010-2012 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). import logging import json from datetime import datetime, timedelta from django.conf import settings from django.core.exceptions import ValidationError from django.core.seria...
miing/mci_migo
api/v10/handlers.py
Python
agpl-3.0
14,587
#!/usr/bin/python -S # # Copyright 2011 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). __metaclass__ = type import _pythonpath from lp.registry.scripts.populate_distroseriesdiff import ( PopulateDistroSeriesDiff, ) if __name__ == '_...
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/scripts/populate-distroseriesdiff.py
Python
agpl-3.0
394
# This file is part of django-popularity. # # django-popularity: A generic view- and popularity tracking pluggable for Django. # Copyright (C) 2008-2010 Mathijs de Bruin # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publish...
dokterbob/django-popularity
popularity/models.py
Python
agpl-3.0
23,734
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-10-10 15:34 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('reminder', '0002_newletter...
hrpt-se/hrpt
apps/reminder/migrations/0003_userreminderinfo_user_as_onetoone_field.py
Python
agpl-3.0
614
#!/usr/bin/env python # -*- coding: utf-8 -* from shinken_test import * class TestConfig(ShinkenTest): def setUp(self): # load the configuration from file self.setup_with_file('etc/nagios_antivirg.cfg') def test_hostname_antivirg(self): """Check that it is allowed to have a host with...
xorpaul/shinken
test/test_antivirg.py
Python
agpl-3.0
3,398
from django.db import models class Country(models.Model): isocode = models.CharField(primary_key=True, max_length=3) name = models.CharField(max_length=255) class Meta: managed = False db_table = "cc_country"
LibreTime/libretime
api/libretime_api/models/countries.py
Python
agpl-3.0
240
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Buron and Valeureux Copyright Valeureux.org # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
Valeureux/wezer-exchange
__unreviewed__/community_project/__init__.py
Python
agpl-3.0
963
#!/usr/bin/env python3 # -*- coding:UTF-8 -*- #Copyright (c) 1986 Nick Wong. #Copyright (c) 2016-2026 TP-NEW Corp. # License: TP-NEW (www.tp-new.com) __author__ = "Nick Wong" ''' 正则 ''' /d 数字 /w 字母或数字 /s 空格 . 任意字符 * 任意个字符 + 至少一个字符 ? 0个或1个字符 {n} n个字符 {n,m} n-m个字符 \ 转义字符 [] 表示范围 [0-9a-zA-Z\_]可以匹配一个数...
nick-huang-cc/GraffitiSpaceTT
UnderstandStudyPython/Matching_stu.py
Python
agpl-3.0
1,036
# Copyright (C) 2021 Renato Lima - Akretion <renato.lima@akretion.com.br> # Copyright (C) 2021 Luis Felipe Mileo - KMEE <mileo@kmee.com.br> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import models class DocumentCancelWizard(models.TransientModel): _inherit = "l10n_br_fiscal.docum...
OCA/l10n-brazil
l10n_br_account/wizards/wizard_document_cancel.py
Python
agpl-3.0
580
_use_minified = True def set_use_minified(use_minified): """ Define if use minified files """ global _use_minified _use_minified = use_minified def use_minified(): """ return a boolean to define if use minified files """ return _use_minified
JuezUN/INGInious
inginious/frontend/plugins/lti_register/pages/constants.py
Python
agpl-3.0
265
# Copyright 2021 Daniel Campos - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { "name": "Stock Orderpoint Generation", "version": "14.0.1.0.0", "license": "AGPL-3", "depends": [ "stock", ], "author": "AvanzOSC", "website": "http://www.avanzosc.es", "c...
avanzosc/odoo-addons
stock_orderpoint_generation/__manifest__.py
Python
agpl-3.0
483
import inspect import itertools import types import unittest from tempfile import NamedTemporaryFile from tests.test_bears.AllKindsOfSettingsDependentBear import ( AllKindsOfSettingsDependentBear) from coala_quickstart.generation.Utilities import ( contained_in, get_hashbang, get_default_args, get_all...
coala-analyzer/coala-quickstart
tests/generation/UtilitiesTest.py
Python
agpl-3.0
11,382
#!/usr/bin/env python '''Test Copy FIle''' import os import shutil import unittest import /xfero/.workflow_manager.copy_file as copy_file class Test(unittest.TestCase): ''' **Purpose:** Unit Test class for the function ```copy_file``` +------------+-------------+-----------------...
tickbox-smc-ltd/xfero
src/xfero/test/test_copy_file.py
Python
agpl-3.0
18,198
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-11-06 11:00 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('rdrf', '0081_clinicaldata_active'), ] operations = [ migrations.AlterField(...
muccg/rdrf
rdrf/rdrf/migrations/0082_auto_20181106_1100.py
Python
agpl-3.0
461
############################################################################## # # Copyright (C) 2013 Therp BV (<http://therp.nl>) # All Rights Reserved # # 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...
rschnapka/bank-payment
account_banking_camt/__openerp__.py
Python
agpl-3.0
1,335
import prairielearn as pl import lxml.html import chevron import base64 import hashlib import os from text_unidecode import unidecode EDITOR_CONFIG_FUNCTION_DEFAULT = None ACE_MODE_DEFAULT = None ACE_THEME_DEFAULT = None SOURCE_FILE_NAME_DEFAULT = None MIN_LINES_DEFAULT = None MAX_LINES_DEFAULT = None AUTO_RESIZE_DEF...
PrairieLearn/PrairieLearn
elements/pl-file-editor/pl-file-editor.py
Python
agpl-3.0
6,608
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2018 The OctoPrint Project - Released under terms of the AGPLv3 License" import octoprint.pl...
foosel/OctoPrint
src/octoprint/plugins/tracking/__init__.py
Python
agpl-3.0
15,412
""" A managment command that can be used to set up Schedules with various configurations for testing. """ from __future__ import absolute_import import datetime import factory import pytz from django.contrib.sites.models import Site from django.core.management.base import BaseCommand from openedx.core.djangoapps.co...
jolyonb/edx-platform
openedx/core/djangoapps/schedules/management/commands/setup_models_to_send_test_emails.py
Python
agpl-3.0
3,410
from django.test import TestCase from views import dashify_user, undashify_user class TestUtils(TestCase): def test_undashify_user(self): user = '4c21a87b-4031-4437-a4c5-afb5ddb42aad' undashified_user = undashify_user(user) self.assertEqual(undashified_user, '4c21a87b40314437a4c5afb5ddb42...
rapidpro/ureport-web-participation
webparticipation/apps/utils/tests.py
Python
agpl-3.0
535
# -*- coding: utf-8 -*- # Copyright 2016 Ursa Information Systems <http://ursainfosystems.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import fields, models class ResPartner(models.Model): _inherit = 'res.partner' weight = fields.Float("Weight") weight_uom = fields....
be-cloud-be/horizon-addons
partner-contact/partner_contact_weight/models/res_partner.py
Python
agpl-3.0
534
import django_filters import pytest from django.core.exceptions import ImproperlyConfigured from adhocracy4.filters.filters import FreeTextFilter from adhocracy4.filters.views import FilteredListView from tests.apps.questions import models as question_models class SearchFilterSet(django_filters.FilterSet): sear...
liqd/adhocracy4
tests/filter/test_free_text_filter.py
Python
agpl-3.0
2,219
# -*- 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 field 'Supplier.fee_per_weight' db.add_column('suppliers_supplier', 'fee_per_weight', ...
vegeclic/django-regularcom
suppliers/migrations/0003_auto__add_field_supplier_fee_per_weight.py
Python
agpl-3.0
13,726
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ Copyright 2012-2015 OpenBroadcaster, Inc. This file is part of OpenBroadcaster Player. OpenBroadcaster Player 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...
openbroadcaster/obplayer
obplayer.py
Python
agpl-3.0
887
from unittest import TestCase from mediawords.languages.fi import FinnishLanguage # noinspection SpellCheckingInspection class TestFinnishLanguage(TestCase): def setUp(self): self.__tokenizer = FinnishLanguage() def test_language_code(self): assert self.__tokenizer.language_code() == "fi" ...
berkmancenter/mediacloud
apps/common/tests/python/mediawords/languages/test_fi.py
Python
agpl-3.0
5,793
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-11-30 15:02 from __future__ import unicode_literals from django.db import migrations, utils from django.db import transaction def copy_previous_pgrm_to_current_lunit(apps, model): base = apps.get_app_config('base') ProgramManager = base.get_model('...
uclouvain/osis_louvain
base/migrations/0198_auto_20171130_1602.py
Python
agpl-3.0
1,184
""" Module that provides a connection to the ModuleStore specified in the django settings. Passes settings.MODULESTORE as kwargs to MongoModuleStore """ from __future__ import absolute_import from importlib import import_module import gettext import logging from pkg_resources import resource_filename import re from...
solashirai/edx-platform
common/lib/xmodule/xmodule/modulestore/django.py
Python
agpl-3.0
12,834
#!/usr/bin/env python # Copyright (C) 2006-2015 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation ...
arseneyr/essentia
test/src/unittest/synthesis/test_overlapadd_streaming.py
Python
agpl-3.0
5,943
# -*- coding: utf-8 -*- ############################################################################# # # Copyright (c) 2007 Martin Reisenhofer <martin.reisenhofer@funkring.net> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pu...
funkring/fdoo
addons-funkring/at_project_sale/wizard/correct_time_wizard.py
Python
agpl-3.0
3,859
# -*- encoding: utf-8 -*- # -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public...
CLVsol/clvsol_odoo_api
__init__.py
Python
agpl-3.0
2,405
from . import RephoneTest from re import match class TestViews(RephoneTest): def test_index(self): with self.client: response = self.client.get('/') assert response.status_code == 303 def test_outbound(self): with self.client: response = self.client.post('...
rickmer/rephone
tests/test_views.py
Python
agpl-3.0
1,721
import base64 from django.conf import settings from crum import get_current_request from openedx.core.lib.request_utils import safe_get_host from common.lib.mandrill_client.client import MandrillClient def send_admin_activation_email(first_name, org_id, org_name, claimed_by_name, claimed_by_email, dest_addr, hash_ke...
philanthropy-u/edx-platform
lms/djangoapps/onboarding/email_utils.py
Python
agpl-3.0
3,876
# # Project Kimchi # # Copyright IBM, Corp. 2013 # # 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.1 of the License, or (at your option) any later version. # # This lib...
ssdxiao/kimchi
src/kimchi/xmlutils.py
Python
lgpl-2.1
1,222
# -*- coding: utf-8 -*- import os import kobo.cli import kobo.admin class Start_Worker_Task(kobo.cli.Command): """create a worker task module in the current directory""" enabled = True def options(self): self.parser.usage = "%%prog %s [options] <task_name>" % self.normalized_name self....
pombredanne/https-git.fedorahosted.org-git-kobo
kobo/admin/commands/cmd_start_worker_task.py
Python
lgpl-2.1
815
""" Test cases for ldaptor.protocols.ldap.svcbindproxy module. """ from twisted.trial import unittest from twisted.internet import reactor from ldaptor.protocols.ldap import svcbindproxy, ldaperrors from ldaptor.protocols import pureldap, pureber from ldaptor import ldapfilter, testutil class ServiceBindingProxy(unit...
antong/ldaptor
ldaptor/test/test_svcbindproxy.py
Python
lgpl-2.1
25,999
# Copyright (C) 2014 Red Hat, Inc. # # 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.1 of the License, or (at your option) any later version. # # This library is distri...
jsafrane/dbusmock-gen
scan.py
Python
lgpl-2.1
8,094
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Simple lib to connect to a Zabbix agent and request the value of an item. """ import socket def query_agent(**kwargs): """ Open a socket to port 10050 on the remote server and query for the number of processes running via proc.num[<FOO>], where FOO is either za...
nikatjef/python-zabbix
zabbix/zabbix/get.py
Python
lgpl-2.1
990
#!/usr/bin/env python # ROOT command line tools: rootbrowse # Author: Julien Ripoche # Mail: julien.ripoche@u-psud.fr # Date: 20/08/15 """Command line to open a ROOT file on a TBrowser""" import cmdLineUtils import sys # Help strings COMMAND_HELP = "Open a ROOT file in a TBrowser" EPILOG = """Examples: - rootbrows...
sirinath/root
main/python/rootbrowse.py
Python
lgpl-2.1
711
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class GdkPixbuf(Package): """The Gdk Pixbuf is a toolkit for image loading and pixel buffer ...
rspavel/spack
var/spack/repos/builtin/packages/gdk-pixbuf/package.py
Python
lgpl-2.1
3,882
from gi.repository import Zeitgeist, GLib log = Zeitgeist.Log.get_default() mainloop = GLib.MainLoop() def on_events_received(log, result, data): events = log.find_events_finish(result) for i in xrange(events.size()): event = events.next_value() if event: print "Event id:", event.ge...
freedesktop-unofficial-mirror/zeitgeist__zeitgeist
examples/python/find_events.py
Python
lgpl-2.1
1,009
#------------------------------------------------------------------------------- # Copyright (c) 2011 Anton Golubkov. # All rights reserved. This program and the accompanying materials # are made available under the terms of the GNU Lesser Public License v2.1 # which accompanies this distribution, and is available at #...
anton-golubkov/Garland
src/test/test_image_convert.py
Python
lgpl-2.1
4,530
# EasyShells Module - API for easier Shell Model Construction in Salome # MidSurface.py: Mid surface extraction for EasyShells module # # Copyright (C) 2013 Stefan Reiterer - maldun.finsterschreck@gmail.com # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser ...
maldun/EasyShells
MidSurface.py
Python
lgpl-2.1
2,382
# -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2019 by the FIFE team # http://www.fifengine.net # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public #...
fifengine/fifengine
engine/python/fife/extensions/fife_compat.py
Python
lgpl-2.1
2,742
import os from nose.tools import eq_ import mapnik from .utilities import execution_path, run_all def setup(): # All of the paths used are relative, if we run the tests # from another directory we need to chdir() os.chdir(execution_path('.')) if 'shape' in mapnik.DatasourceCache.plugin_names(): de...
mapycz/python-mapnik
test/python_tests/query_tolerance_test.py
Python
lgpl-2.1
1,397