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 startbot, stats, os, re, random, sys
import utils
MARKOV_LENGTH = 2
#majority of the code taken from https://github.com/hrs/markov-sentence-generator
#changes made: allowed it to hook up from the text gotten directly from messages
#changed it to be encompassed in a class structure. Made minor changes to make ... | crc5464/groupme-bot | src/markov.py | Python | gpl-3.0 | 6,551 |
#!/usr/bin/python
#
# to run an example
# python RunMakeFigures.py -p Demo -i 0 -j 1 -f 3FITC_4PE_004.fcs -h ./projects/Demo
#
import getopt,sys,os
import numpy as np
## important line to fix popup error in mac osx
import matplotlib
matplotlib.use('Agg')
from cytostream import Model
import matplotlib.pyplot as plt
#... | ajrichards/GenesDI | genesdi/RunMakeFigures.py | Python | gpl-3.0 | 5,628 |
default_app_config = "django_beid.apps.DjangoBeidConfig"
| Lapin-Blanc/django_beid | __init__.py | Python | gpl-3.0 | 57 |
#coding:utf-8
from KNNDetector.KNN_Detect import *
import requests
from PIL import Image
import base64
import getpass
def login(username,passwd):
session=requests.session()
session.get('http://wsxk.hust.edu.cn/login.jsp').text
img=session.get('http://wsxk.hust.edu.cn/randomImage.action').conten... | yyxt11/CaptchaProject | KNNDetector/console.py | Python | gpl-3.0 | 1,556 |
#!/usr/bin/env python
# -*- coding: utf8 -*-
#
# autocomplit.py
#
# Copyright 2011 Basmanov Illya <ffsdmad@gmail.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 Foundati... | ffsdmad/af-web | cgi-bin/plugins/plugin_manager.py | Python | gpl-3.0 | 2,225 |
import serviceinfo.data as data
import unittest
import datetime
class ServiceTest(unittest.TestCase):
def _create_service(self):
"""
Internal method to create a service object
:return: Service object
"""
service = data.Service()
service.servicenumber = 1234
... | geertw/rdt-serviceinfo | tests/test_data.py | Python | gpl-3.0 | 3,353 |
class List_C():
def __init__(
self,
size=0,
):
self.size = size
self._elements = None
def __iter__(self):
self._pos = -1
self._search()
return self
def __next__(self):
self._pos += 1
if self._pos < len(self._elements):
... | basbloemsaat/sheepsense_v2 | lib/sheepsense/model/__init__.py | Python | gpl-3.0 | 908 |
from __future__ import print_function
import re, os, sys, multiprocessing, zipfile, Queue
from bs4 import BeautifulSoup
import pandas as pd
import numpy as np
from urlparse import urlparse
#https://pypi.python.org/pypi/etaprogress/
from etaprogress.progress import ProgressBar
#337304 total HTML files, some are actuall... | carlsonp/kaggle-TrulyNative | processURLS_count.py | Python | gpl-3.0 | 2,502 |
# Copyright (C) 2009-2017 Lars Wirzenius
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distribu... | obnam-mirror/obnam | obnamlib/app.py | Python | gpl-3.0 | 11,277 |
#!/usr/bin/env python
import re
import sys
import hashlib
import subprocess as sp
import numpy as np
debug = False
typ1 = np.dtype([('name', 'a50'), ('beg', 'i'), ('end', 'i'), ('type', 'a4')])
# starts with spaces or spaces and one of { 'end', 'pure', ... }
# if function it can have a type next goes subroutine or f... | migueldvb/piernik | bin/qa.py | Python | gpl-3.0 | 15,798 |
import cPickle as pkl
import pdb
import datetime
import time
import numpy as np
import pylab as pl
import scipy.stats
import scipy.special
from scipy.special import gamma
from scipy.misc import factorial
import gnumpy as gp
import data_helper
class RBM(object):
'''
Restricted Boltzmann Machine (RBM) using... | ebattenberg/crbm-drum-patterns | crbm.py | Python | gpl-3.0 | 63,541 |
"""Person model"""
from sqlalchemy import Column, UniqueConstraint, ForeignKey
from sqlalchemy import schema as saschema
from sqlalchemy.types import Integer, String, Unicode, Float, UnicodeText, DateTime
from discariche.model.meta import Base
class Reallocation(Base):
__tablename__ = "reallocation"
id = Col... | mov-q/dumpy | discariche/model/reallocation.py | Python | gpl-3.0 | 1,137 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-06-04 14:03
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('web', '0001_initial'),
]
operations = [
migrations.RemoveField(
... | andrius-momzyakov/grade | web/migrations/0002_auto_20170604_1403.py | Python | gpl-3.0 | 593 |
#!/usr/bin/env python
import sys
import os
import math
# ensure that the kicad-footprint-generator directory is available
#sys.path.append(os.environ.get('KIFOOTPRINTGENERATOR')) # enable package import from parent directory
#sys.path.append("D:\hardware\KiCAD\kicad-footprint-generator") # enable package import fro... | SchrodingersGat/kicad-footprint-generator | scripts/TerminalBlock_WAGO/make_TerminalBlock_WAGO.py | Python | gpl-3.0 | 11,840 |
from __future__ import (absolute_import, division, print_function)
import os
import numpy as np
from mantid import config, mtd, logger
from mantid.kernel import StringListValidator, Direction
from mantid.api import PythonAlgorithm, MultipleFileProperty, FileProperty, \
WorkspaceGroupProperty, FileAction, Progress
... | ScreamingUdder/mantid | Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectILLEnergyTransfer.py | Python | gpl-3.0 | 17,107 |
"""
Tests for the dokomo database
"""
import unittest
import uuid
from sqlalchemy import cast, Text, Boolean
from datetime import timedelta
from passlib.hash import bcrypt_sha256
from dokomoforms.db import update_record, delete_record
from dokomoforms import db
from dokomoforms.db.answer import answer_insert, answer... | wesley1001/dokomoforms | tests/db_test.py | Python | gpl-3.0 | 47,704 |
from django.db import models
from flocs import entities
from flocsweb.mixins import ImportExportMixin
class Instruction(models.Model, ImportExportMixin):
entity_class = entities.Instruction
instruction_id = models.CharField(max_length=256, primary_key=True)
def __str__(self):
return self.instruc... | adaptive-learning/flocs-web | tasks/models/instruction.py | Python | gpl-3.0 | 328 |
# -*- coding: utf-8 -*-
#------------------------------------------------------------
# tvalacarta - XBMC Plugin
# Canal para ecuador tv
# http://blog.tvalacarta.info/plugin-xbmc/tvalacarta/
#------------------------------------------------------------
import os
import sys
import urlparse,re
import urllib
import datet... | tvalacarta/tvalacarta | python/main-classic/channels/ecuadortv.py | Python | gpl-3.0 | 680 |
"""
This is an extension of the HyperNetwork, where the layer specific input z's
will be conditioned on the input. We first find the max of the input across
the feature channel, then we project this reduced input to the dimension of
z's, which is 4 here.
"""
import keras.backend as K
from keras.engine.topology import L... | unique-horn/ppap | ppap/layers/HyperNetwork_max.py | Python | gpl-3.0 | 4,797 |
# coding: utf8
Paises=(
(4, 'AF', 'AFG', 93, 'Afganistán', 'Asia', '', 'AFN', 'Afgani afgano'),
(8, 'AL', 'ALB', 355, 'Albania', 'Europa', '', 'ALL', 'Lek albanés'),
(10, 'AQ', 'ATA', 672, 'Antártida', 'Antártida', '', '', ''),
(12, 'DZ', 'DZA', 213, 'Argelia', 'África', '', 'DZD', 'Dinar algerino'),
(16, 'AS', 'ASM', ... | jredrejo/bancal | web2py/applications/bancal/modules/paises.py | Python | gpl-3.0 | 18,468 |
'''
Copyright (C) 2014 Terry Stewart and Travis DeWolf
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distrib... | ericl1u/eece7398 | sim_and_plot.py | Python | gpl-3.0 | 7,267 |
# -*- coding: utf-8 -*-
"""
/***************************************************************************
viewAttributesDialog
A QGIS plugin
Show attributes of a field selected stored in a shapefile.
-------------------
begin : 2017-0... | fernando1980/viewAttributes | viewAttributes/view_Attributes_dialog.py | Python | gpl-3.0 | 2,071 |
""" Run tests on photo models. """
| brianmay/spud | spud/tests/a_unit/photos/test_models.py | Python | gpl-3.0 | 35 |
# Copyright (C) 2016 Noah Meltzer
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in t... | nmGit/MView | MNodeEditor/MNodes/MDeviceNode.py | Python | gpl-3.0 | 3,749 |
from django.http import Http404
from django.shortcuts import get_object_or_404
from django.utils.translation import gettext_lazy as _
from zds.api.validators import Validator
from zds.member.models import Profile
class ParticipantsUserValidator(Validator):
can_be_empty = False
def validate_participants(self,... | ChantyTaguan/zds-site | zds/mp/validators.py | Python | gpl-3.0 | 3,768 |
#!/usr/bin/env python
#coding:utf-8
##
# @file argv-test.py
# @brief
# 最底层的命令行解析,其他模块应该都是对其的封装
# @author unlessbamboo
# @version 1.0
# @date 2016-03-03
import sys
def testSys():
"""testSys"""
for arg in sys.argv[1:]:
print (arg)
if __name__ == '__main__':
testSys()
| unlessbamboo/grocery-shop | language/python/src/command-line/argv-test.py | Python | gpl-3.0 | 347 |
#!/usr/bin/env python3
"""Geometric Object Class"""
class GeometricObject:
def __init__(self, color="green", filled=True):
self.__color = color
self.__filled = filled
def get_color(self):
return self.__color
def set_color(self, color):
self.__color = color
def is_fil... | dennyb87/pycity | week7/GeometricObject.py | Python | gpl-3.0 | 543 |
"""
BleachBit
Copyright (C) 2008-2020 Andrew Ziem
https://www.bleachbit.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This... | tstenner/bleachbit | windows/setup_py2exe.py | Python | gpl-3.0 | 20,767 |
import os
import unittest
from copyright import Walk
class TestWalk(unittest.TestCase):
DIRS = [
'./tmp/dir1/dir2',
'./tmp/dir3'
]
FILES = [
'./tmp/f',
'./tmp/dir1/f1',
'./tmp/dir3/f3',
'./tmp/dir1/dir2/f2'
]
def setUp(self):
... | rsmz/copyright | test/test_walk.py | Python | gpl-3.0 | 2,190 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2018 David Arroyo Menéndez
# Author: David Arroyo Menéndez <davidam@gnu.org>
# Maintainer: David Arroyo Menéndez <davidam@gnu.org>
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as p... | davidam/python-examples | gtk/cellrenderedcombo.py | Python | gpl-3.0 | 2,560 |
import sys
import re
import numpy as np
import pandas as pd
import librosa
import argparse
argparser = argparse.ArgumentParser('''
Utility for computing sound power metrics from the Natural Stories audio stimuli
''')
argparser.add_argument('files', nargs='+', help='Paths to audio files for processing')
argpars... | modelblocks/modelblocks-release | resource-naturalstoriesfmri/scripts/get_sound_power.py | Python | gpl-3.0 | 4,677 |
##############################################################################
#
# Copyright (c) 2003 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.
# THIS SO... | Donkyhotay/MoonPy | zope/configuration/tests/test_conditions.py | Python | gpl-3.0 | 3,562 |
import bpy
from bpy.props import *
from ... events import executionCodeChanged
from ... base_types.node import AnimationNode
from ... utils.fcurve import getArrayValueAtFrame
frameTypeItems = [
("OFFSET", "Offset", ""),
("ABSOLUTE", "Absolute", "") ]
class ObjectTransformsInputNode(bpy.types.Node, AnimationNo... | Thortoise/Super-Snake | Blender/animation_nodes-master/nodes/object/object_transforms_input.py | Python | gpl-3.0 | 4,311 |
# Copyright (C) 2010 Joel Dunham
#
# This file is part of OnlineLinguisticDatabase.
#
# OnlineLinguisticDatabase 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 o... | jrwdunham/old-webapp | onlinelinguisticdatabase/controllers/collection.py | Python | gpl-3.0 | 26,844 |
from itertools import product
import numpy as np
import pandas as pd
from larray.core.array import Array
from larray.core.axis import Axis, AxisCollection
from larray.core.constants import nan
from larray.util.misc import unique_list
def decode(s, encoding='utf-8', errors='strict'):
if isinstance(s, bytes):
... | gdementen/larray | larray/inout/pandas.py | Python | gpl-3.0 | 15,402 |
#!/usr/bin/env python
import os, sys
from Bio import SeqIO
from Bio.Blast import NCBIWWW
from time import sleep
from helpers import parse_fasta, get_opts
def usage():
print """Usage: blast_fasta.py [OPTIONS] seqs.fasta
Options:
-t blast_type blastn, blastp, blastx, tblastn, tblastx, default: blastn... | Serpens/small_bioinfo | blast_fasta.py | Python | gpl-3.0 | 1,496 |
import os
from ConfigParser import SafeConfigParser
addrs = os.environ.get('MULTIPLEXER_ADDRESSES', '').split(',')
addr_tuples = []
if addrs:
for addr in addrs:
addr = addr.split(':')
if len(addr) == 2:
addr_tuples.append((addr[0], int(addr[1])))
MULTIPLEXER_ADDRESSES = addr_tuples if ... | BrainTech/openbci | obci/configs/settings.py | Python | gpl-3.0 | 1,839 |
#! /usr/local/bin/python
"""Script for producing a RASPP curve: the average disruption (energy)
and average mutation of libraries that have the lowest average energy
given constraints on fragment length.
******************************************************************
Copyright (C) 2005 Allan Drummond, Cali... | mattasmith/SCHEMA-RASPP | rasppcurve.py | Python | gpl-3.0 | 7,335 |
#!/usr/bin/python
'''
Cytostream
LeftDock
Adam Richards
adamricha@gmail.com
'''
import sys,os
from PyQt4 import QtGui,QtCore
if hasattr(sys,'frozen'):
baseDir = os.path.dirname(sys.executable)
baseDir = re.sub("MacOS","Resources",baseDir)
else:
baseDir = os.path.dirname(__file... | ajrichards/GenesDI | genesdi/qtlib/LeftDock.py | Python | gpl-3.0 | 7,251 |
# -*- coding: utf-8 -*-
__all__ = ["inet_aton", "record_by_ip", "record_by_request", "get_ip",
"record_by_ip_as_dict", "record_by_request_as_dict"]
import struct
import socket
from geoip.defaults import BACKEND, REDIS_TYPE
from geoip.redis_wrapper import RedisClient
from geoip.models import Range
_RECOR... | gotlium/django-geoip-redis | geoip/geo.py | Python | gpl-3.0 | 1,723 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-05-22 16:02
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('teklif', '0003_auto_20170522_1559'),
... | ufukdogan92/is-teklif-sistemi | odeme/migrations/0001_initial.py | Python | gpl-3.0 | 1,244 |
#!/usr/bin/env python
from __future__ import print_function
from setuptools import setup, find_packages
import yowsup_ext.commandserver
deps = ['yowsup2==2.4.48', 'yowsup-commandserver']
setup(
name='yowsup-commandserver',
version=yowsup_ext.commandserver.__version__,
tests_require=[],
install_require... | jorgehortelano/yowsup-commandserver | setup.py | Python | gpl-3.0 | 974 |
# -*- 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 'Page'
db.create_table('api_page', (
('id', self.gf('django.db.models.fields.Auto... | brianloveswords/webpagemaker | webpagemaker/api/migrations/0001_initial.py | Python | mpl-2.0 | 1,133 |
from elasticsearch_dsl import query
from kuma.core.tests import eq_, ok_
from kuma.wiki.search import WikiDocumentType
from . import ElasticTestCase
class WikiDocumentTypeTests(ElasticTestCase):
fixtures = ElasticTestCase.fixtures + ['wiki/documents.json']
def test_get_excerpt_strips_html(self):
se... | safwanrahman/kuma | kuma/search/tests/test_types.py | Python | mpl-2.0 | 1,629 |
# -*- 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/.
from django import forms
from django.forms.models import inlineformset_factory, BaseInlineFormSe... | ansp-2015/arquea | memorando/forms.py | Python | mpl-2.0 | 6,746 |
# Copyright 2014-2020 The ODL contributors
#
# This file is part of ODL.
#
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at https://mozilla.org/MPL/2.0/.
"""Operators defined on `DiscretizedSpace`."... | kohr-h/odl | odl/discr/discr_ops.py | Python | mpl-2.0 | 20,951 |
#!/usr/bin/env python
# Aid tools to quality checker.
# Qchecklib
# Eliane Araujo, 2016
import os
import sys
import commands
import json
try:
from cc import measure_complexity
except ImportError:
print("tst quality checker needs cc.py to work.")
sys.exit(1)
try:
sys.path.append('/usr/local/bin/radon... | elianearaujo/tst-qcheck | bin/qchecklib.py | Python | agpl-3.0 | 3,348 |
# -*- coding: utf-8 -*-
# © <YEAR(S)> <AUTHOR(S)>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import api, _, models
from openerp.exceptions import UserError
class MrpBomLine(models.Model):
_inherit = 'mrp.bom.line'
@api.model
def create(self, vals):
if not s... | Gebesa-Dev/Addons-gebesa | global_privilege_button/models/mrp_bom_line.py | Python | agpl-3.0 | 1,447 |
from . import Checker
class ExactChecker(Checker):
async def check(self, sandbox, task):
output = await sandbox.read("/tmp/output.txt")
task.accepted = output == task.testcase.output
task.verdict = "AC" if task.accepted else "WA"
| johnchen902/toyoj | judge/toyojjudge/checker/exact.py | Python | agpl-3.0 | 259 |
def transform(scrabble):
return {ch.lower(): v for (v, chs) in scrabble.items() for ch in chs}
| CubicComet/exercism-python-solutions | etl/etl.py | Python | agpl-3.0 | 99 |
# -*- coding: utf-8 -*-
# @author: vuolter
from __future__ import absolute_import, unicode_literals
import os
import re
from future import standard_library
from pyload.utils import convert, purge, web
from pyload.utils.convert import to_str
from pyload.utils.layer.legacy import hashlib
from pyload.utils.time import... | pyblub/pyload | pyload/utils/parse.py | Python | agpl-3.0 | 4,211 |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
#from . import report_order_line
#from . import order_report_nex # Estado de Cuenta - Used by Patient - Moved
from . import report_sale_product
from . import order_admin
from . import ticket
from . import order
from . import order_business
from . ... | gibil5/openhealth | models/order/__init__.py | Python | agpl-3.0 | 535 |
import ckan.plugins as plugins
import ckan.lib.base as base
class LegalController(base.BaseController):
def index(self):
return plugins.toolkit.render('ckanext/legal/index.html')
def nutzungsbedingungen(self):
return plugins.toolkit.render('ckanext/legal/nutzungsbedingungen.html')
class HelpC... | EUDAT-B2FIND/ckanext-b2find | ckanext/b2find/controller.py | Python | agpl-3.0 | 918 |
# -*- coding: utf-8 -*-
##############################################################
# Module Writen For Odoo, Open Source Management Solution
#
# Copyright (c) 2011 Vauxoo - http://www.vauxoo.com
# All Rights Reserved.
# info Vauxoo (info@vauxoo.com)
# coded by: moylop260@vauxoo.com
##################... | open-synergy/runbot-addons | runbot_language/models/__init__.py | Python | agpl-3.0 | 433 |
#
# Copyright (C) 2013-2015 RoboIME
#
# 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 distrib... | roboime/pyroboime | roboime/utils/mathutils.py | Python | agpl-3.0 | 2,108 |
# This file is part of wger Workout Manager.
#
# wger Workout Manager 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.
#
# wger W... | rolandgeider/wger | wger/nutrition/tests/test_calories_calculator.py | Python | agpl-3.0 | 6,686 |
import os
import random
import string
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
TEST_APP_URL = os.getenv('TEST_APP_URL')
TEST_CLIENT_URL = os.getenv('TEST_CLIENT_URL')
E2E_ARGS = os.getenv('E2E_ARGS')
TEST_URL = TEST_CLIENT_URL if E2E_ARGS... | SamR1/FitTrackee | e2e/utils.py | Python | agpl-3.0 | 2,863 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2018-03-26 15:34
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('jurisdiction', '0020_auto_20180312_1413'),
]
operations = [
migrations.RemoveField(
model_name='jurisdiction',... | MuckRock/muckrock | muckrock/jurisdiction/migrations/0021_remove_jurisdiction_full_name.py | Python | agpl-3.0 | 368 |
##############################################################################
#
# Copyright (c) 2009 Albert Cervera i Areny <albert@nan-tic.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting f... | jeffery9/mixprint_addons | jasper_reports/JasperReports/RecordDataGenerator.py | Python | agpl-3.0 | 5,047 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('app', '0014_survey'),
]
operations = [
migrations.AddField(
model_name='survey',
name='question2',
... | Saruus/drPencilcode | app/migrations/0015_survey_question2.py | Python | agpl-3.0 | 435 |
# coding=utf-8
import os
import setuptools
###################################################################################################
# The plugin's identifier, has to be unique
plugin_identifier = "OctoPNP"
# The plugin's python package, should be "octoprint_<plugin identifier>", has to be unique
plugin_pa... | platsch/OctoPNP | setup.py | Python | agpl-3.0 | 3,559 |
from __future__ import unicode_literals
from frappe import _
app_name = "erpnext"
app_title = "ERPNext"
app_publisher = "Frappe Technologies Pvt. Ltd."
app_description = """ERP made simple"""
app_icon = "icon-th"
app_color = "#e74c3c"
app_version = "6.13.1"
app_email = "info@erpnext.com"
app_license = "GNU General Pub... | indictranstech/biggift-erpnext | erpnext/hooks.py | Python | agpl-3.0 | 4,979 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name='clustercheck',
use_scm_version=True,
setup_requires=['setuptools_scm'],
install_requires=[
'Twisted>=12.2',
'PyMySQL'
],
description='Standalone service for reporting of Perco... | Oneiroi/clustercheck | setup.py | Python | agpl-3.0 | 707 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import socket
import struct
import time
import hashlib
import sys
import os
import random
import traceback
# CONFIG
server = "192.168.100.150"
username = ""
password = ""
host_name = "LIYUANYUAN"
host_os = "8089D"
host_ip = "10.30.22.17"
PRIMARY_DNS = "114.114.114.114"
dh... | drcoms/drcom-generic | latest-wired.py | Python | agpl-3.0 | 18,049 |
# © 2017 Sergio Teruel <sergio.teruel@tecnativa.com>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from .hooks import pre_init_hook
from . import models
from . import report
| OCA/margin-analysis | account_invoice_margin/__init__.py | Python | agpl-3.0 | 194 |
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
from __future__ import (
absolute_import,
print_function,
unicode_literals,
)
"""Access middleware."""
str = None
__metaclass__ = type
__all__ = [
"AccessMid... | cloudbase/maas | src/maasserver/middleware.py | Python | agpl-3.0 | 8,467 |
"""
Test for LMS instructor background task queue management
"""
from mock import patch, Mock
from bulk_email.models import CourseEmail, SEND_TO_ALL
from courseware.tests.factories import UserFactory
from xmodule.modulestore.exceptions import ItemNotFoundError
from instructor_task.api import (
get_running_instruct... | simbs/edx-platform | lms/djangoapps/instructor_task/tests/test_api.py | Python | agpl-3.0 | 13,801 |
from django.urls import path
from . import dashboard_views
app_name = 'exam'
urlpatterns = [
path('assignment/new/', dashboard_views.MakeAssignmentView.as_view(),
name='assignment_new'),
path('assignment/success/',
dashboard_views.MakeAssignmentSuccess.as_view(),
name='assignment_su... | d120/pyophase | exam/dashboard_urls.py | Python | agpl-3.0 | 483 |
# Copyright (c) 2014 by Ecreall under licence AGPL terms
# available on http://www.gnu.org/licenses/agpl.html
# licence: AGPL
# author: Amen Souissi
from pyramid.view import view_config
from dace.processinstance.core import DEFAULTMAPPING_ACTIONS_VIEWS
from pontus.default_behavior import Cancel
from pontus.form i... | ecreall/lagendacommun | lac/views/base_review_management/remove_review.py | Python | agpl-3.0 | 1,736 |
from base64 import urlsafe_b64decode
from io import StringIO
from django.http.response import HttpResponse
from django.shortcuts import render
from django.views.decorators.cache import never_cache
from django.views.decorators.csrf import csrf_exempt
import openid2rp
from Care4Care.settings import STATICFILES_DIRS
@... | dsarkozi/care4care-sdp-grp4 | Care4Care/C4CApplication/tests/OIDTest.py | Python | agpl-3.0 | 5,177 |
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from . import controllers
| OCA/social | website_mass_mailing_name/__init__.py | Python | agpl-3.0 | 91 |
# Copyright 2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Tests for the source package recipe view classes and templates."""
__metaclass__ = type
from mechanize import LinkNotFoundError
from storm.locals import Store
from testtools.ma... | abramhindle/UnnaturalCodeFork | python/testdata/launchpad/lib/lp/code/browser/tests/test_sourcepackagerecipebuild.py | Python | agpl-3.0 | 11,028 |
"""
Tests for the dump_to_neo4j management command.
"""
from datetime import datetime
from unittest import mock
import ddt
from django.core.management import call_command
from edx_toggles.toggles.testutils import override_waffle_switch
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase
from... | eduNEXT/edx-platform | openedx/core/djangoapps/coursegraph/management/commands/tests/test_dump_to_neo4j.py | Python | agpl-3.0 | 20,829 |
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | pulinagrawal/nupic | examples/opf/experiments/opfrunexperiment_test/simpleOPF/hotgym/description.py | Python | agpl-3.0 | 16,183 |
# defivelo-intranet -- Outil métier pour la gestion du Défi Vélo
# Copyright (C) 2020 Didier 'OdyX' Raboud <didier.raboud@liip.ch>
#
# 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... | defivelo/db | apps/challenge/views/settings.py | Python | agpl-3.0 | 3,051 |
from typing import Optional
import os
def get_env(secret_name: str, default: Optional[str] = None):
"""Gathers secrets and envvars from secret provider and environment"""
if secret_name.startswith("SDC_"):
# Get secret from a secret provider (portainer ?)
return ""
result = os.environ.ge... | UrLab/beta402 | www/utils.py | Python | agpl-3.0 | 1,720 |
# -*- coding: utf-8 -*-
# template 18
"""
Various tools at your fingertips.
The available tools are:
* cvt_csv_2_rst.py: convert csv file into rst file
* cvt_csv_2_xml.py: convert csv file into xml file
* cvt_script: parse bash script and convert to meet company standard
* gen_readme.py: generate documentation files,... | zeroincombenze/tools | wok_code/scripts/main.py | Python | agpl-3.0 | 6,236 |
from test_delete import *
from test_openid import *
from test_edit import *
| cc-archive/commoner | src/commoner/profiles/tests/__init__.py | Python | agpl-3.0 | 76 |
from sklearn.utils import check_array
import numpy as np
def geh(y_true, y_pred, axis=0):
return np.sqrt(2*np.power(y_pred - y_true, 2)/(y_pred + y_true)).mean(axis=axis)
def mean_absolute_percentage_error(y_true, y_pred):
"""
Use of this metric is not recommended; for illustration only.
See other re... | JonnoFTW/htm-models-adelaide | engine/metrics.py | Python | agpl-3.0 | 2,087 |
# This file is part of VoltDB.
# Copyright (C) 2008-2016 VoltDB Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later ver... | paulmartel/voltdb | lib/python/vdm/tests/server/deployment_user_test.py | Python | agpl-3.0 | 12,365 |
# -*- coding: utf8 -*-
#
# Copyright (C) 2014 NDP Systèmes (<http://www.ndp-systemes.fr>).
#
# 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,... | ndp-systemes/odoo-addons | purchase_working_days/tests/test_purchase_working_days.py | Python | agpl-3.0 | 7,653 |
##############################################################################
#
# Copyright (C) 2014 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py
#
#####################... | CompassionCH/compassion-modules | crm_compassion/models/event_compassion.py | Python | agpl-3.0 | 22,387 |
# Copyright 2017 LasLabs Inc.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo import api, fields, models
class IrMailServer(models.Model):
_inherit = "ir.mail_server"
smtp_from = fields.Char(
string="Email From", help="Set this in order to email from a specific addres... | OCA/social | mail_outbound_static/models/ir_mail_server.py | Python | agpl-3.0 | 1,677 |
# Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Account Move Line Product",
"version": "14.0.1.0.0",
"summary": "Displays the product in the journal entries and items",
"author": "ForgeFlow, Odoo Community Asso... | OCA/stock-logistics-warehouse | account_move_line_product/__manifest__.py | Python | agpl-3.0 | 560 |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import re
from odoo import models, fields, api, _
from odoo.exceptions import ValidationError, UserError
from odoo.tools.float_utils import float_split_str
from odoo.tools.misc import mod10r
l10n_ch_ISR_NUMBER_LENGTH ... | ddico/odoo | addons/l10n_ch/models/account_invoice.py | Python | agpl-3.0 | 11,966 |
"""
Test for asset XML generation / parsing.
"""
import unittest
import pytest
from contracts import ContractNotRespected
from lxml import etree
from opaque_keys.edx.locator import CourseLocator
from path import Path as path
from six.moves import zip
from xmodule.assetstore import AssetMetadata
from xmodule.modules... | stvstnfrd/edx-platform | common/lib/xmodule/xmodule/assetstore/tests/test_asset_xml.py | Python | agpl-3.0 | 3,718 |
from typing import Any, Sequence, Union
from dataclasses import dataclass
from . import RequestMsg, ReplyMsg, Message, SimpleMessage
from hedgehog.protocol.proto import ack_pb2
from hedgehog.utils import protobuf
__all__ = ['Acknowledgement']
# <GSL customizable: module-header>
from hedgehog.protocol.proto.ack_pb2 i... | PRIArobotics/HedgehogProtocol | hedgehog/protocol/messages/ack.py | Python | agpl-3.0 | 1,301 |
# -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013 - 2018 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
from superd... | mugurrus/superdesk-core | superdesk/io/feed_parsers/stt_newsml.py | Python | agpl-3.0 | 2,362 |
##############################################################################
#
# 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 | ddd/logic/preparation_programme_annuel_etudiant/domain/service/get_programme_inscription_cours.py | Python | agpl-3.0 | 8,497 |
# coding: utf-8
import constance
from django.conf import settings
from rest_framework.response import Response
from rest_framework.views import APIView
from kobo.static_lists import COUNTRIES, LANGUAGES, SECTORS
from kobo.apps.hook.constants import SUBMISSION_PLACEHOLDER
class EnvironmentView(APIView):
"""
G... | kobotoolbox/kpi | kpi/views/environment.py | Python | agpl-3.0 | 1,307 |
# REST API Backend for the Radiocontrol Project
#
# Copyright (C) 2017 Stefan Derkits <stefan@derkits.at>
#
# 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... | Horrendus/radiocontrol | api/api/admin.py | Python | agpl-3.0 | 820 |
# -*- coding: utf-8 -*-
import unicodecsv
from collections import Counter
from django.http import HttpResponse
from django.shortcuts import render
from .models import Disciplina, Docente, Pesquisa, Extensao, Administrativo
def query_estudantes(query):
result = [
['1-6', query.filter(estudantes__gte=... | UFRB/chdocente | cadastro/views.py | Python | agpl-3.0 | 13,491 |
# -*- encoding: utf-8 -*-
################################################################################
# #
# Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol #
# ... | CLVsol/oehealth | oehealth_insured_group/oehealth_insured_group_member.py | Python | agpl-3.0 | 2,443 |
##############################################################################
#
# 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 | assessments/tests/business/test_score_encoding_progress.py | Python | agpl-3.0 | 14,789 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'pyslvs_ui/entities/edit_point.ui'
#
# Created by: PyQt5 UI code generator 5.15.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from qtp... | 40323230/Pyslvs-PyQt5 | pyslvs_ui/entities/edit_point_ui.py | Python | agpl-3.0 | 9,330 |
"""
Test for LMS instructor background task queue management
"""
from bulk_email.models import CourseEmail, SEND_TO_ALL
from courseware.tests.factories import UserFactory
from xmodule.modulestore.exceptions import ItemNotFoundError
from instructor_task.api import (
get_running_instructor_tasks,
get_instructor_... | UXE/local-edx | lms/djangoapps/instructor_task/tests/test_api.py | Python | agpl-3.0 | 9,831 |
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2011 NUMA Extreme Systems (www.numaes.com) for Cubic ERP - Teradata SAC. (http://cubicerp.com).
#
# WARNING: This program as such is intended to be use... | miltonruelas/cursotecnico | branch/l10n_pe_ple08/report/sunat_8_1_print.py | Python | agpl-3.0 | 2,003 |
# coding=utf-8
from __future__ import absolute_import
__author__ = "Gina Häußge <osd@foosel.net>"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License"
import os
from octoprint.se... | ymilord/OctoPrint-MrBeam | src/octoprint/plugin/__init__.py | Python | agpl-3.0 | 5,253 |
__all__ = ["annotation", "detection", "track"]
| camielv/wildlife-monitoring | src/modules/datastructures/__init__.py | Python | lgpl-2.1 | 47 |
# -*- coding: utf-8 -*-
# ####################################################################
# Copyright (C) 2005-2013 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 ... | whiterabbitengine/fifeplusplus | engine/python/fife/extensions/pychan/exceptions.py | Python | lgpl-2.1 | 1,894 |