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 |
|---|---|---|---|---|---|
# Tweepy
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
import os
import mimetypes
from tweepy.binder import bind_api
from tweepy.error import TweepError
from tweepy.parsers import ModelParser
from tweepy.utils import list_to_csv
class API(object):
"""Twitter API"""
def __init__(self, au... | tkaitchuck/nupic | external/linux64/lib/python2.6/site-packages/tweepy/api.py | Python | gpl-3.0 | 22,718 |
# -*- coding: utf-8 -*-
from __future__ import print_function
import codecs
import re
from . import bayes
import pkg_resources
try:
_
except NameError:
def _(s): return s
hybrid = 1
htmlStart = """
<html><head>
<style>
</style>
</head>
<body>
"""
htmlEnd = """
</body>
</html>
"""
paraOpen = '<div class="'
... | EKT1/valence | valence/valencecolor.py | Python | gpl-3.0 | 9,621 |
#!/usr/bin/env python2
'''
Author: xswxm
Blog: xswxm.com
This script will analyze the paylods/tasks assigned by the messager.py
and output the result to display.py.
It also stores most parameters, which are shared between different classes and scripts.
'''
import sys
sys.path.append("..")
from array import array
f... | xswxm/nrf24-injection | utils/config.py | Python | gpl-3.0 | 8,406 |
import re
from .state import State
from .expression import ConstantExpression
__all__ = ["assemble"]
_const_parser = None
def _evaluate_d(expression : str, state : State) -> int:
value = _get_register(expression) or state.GetLabelAddress(expression)
if not value:
value = _const_parser.Evaluate(expr... | Seairth/Orochi | assembler/__init__.py | Python | gpl-3.0 | 11,327 |
## Copyright 2009-2011 Luc Saffre
## This file is part of the Lino project.
## Lino 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.... | MaxTyutyunnikov/lino | obsolete/ui_old/qx/qx_store.py | Python | gpl-3.0 | 18,650 |
"""horteloesurbanos URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')... | abispo/horteloesurbanos | horteloesurbanos/horteloesurbanos/urls.py | Python | gpl-3.0 | 773 |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "DiscreteDistributions.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| viktorki/Discrete-Distributions | manage.py | Python | gpl-3.0 | 264 |
"""
Django settings for dnd_tracker project.
Generated by 'django-admin startproject' using Django 1.11.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
impor... | MariusLauge/dnd_tracker | dnd_tracker/settings.py | Python | gpl-3.0 | 3,300 |
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from models import Account
def wants_user(f):
def decorated(*args, **kwargs):
try: args[0].user = Account.objects.get(pk=args[0].session['user_id'])
except: args[0].user = None
return f(*args, **kwargs)
return decorated
... | nephthys/shr_im | oauthlogin/decorators.py | Python | gpl-3.0 | 550 |
""" The Symantec Python class that handles all the Symantec VIP API SOAP calls for management services.
.. moduleauthor:: Allen Huynh
""" | ArrenH/Securitas | symantec_package/lib/managementService/__init__.py | Python | gpl-3.0 | 139 |
# -*- coding: utf-8 -*-
from django import forms
from app_academico.curso.models import *
from app_academico.turno.models import TblAcademicoTurno
class UsuarioModelForm(forms.ModelForm):
# def __init__(self, *args, **kwargs):
# super(CursoModelForm, self).__init__(*args, **kwargs)
descricao = forms.CharField(
... | dparaujo/projeto | app_administrativo/usuario/forms.py | Python | gpl-3.0 | 1,398 |
import os
from sqlalchemy import create_engine, ForeignKey, func
from sqlalchemy import Column, Date, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship, backref, sessionmaker
Base = declarative_base()
class Series( Base ):
__tablename__ = 'series'
... | simondodson/Curator | media_db.py | Python | gpl-3.0 | 935 |
# -*- coding: utf-8 -*-
from django.db import models
from django.utils.translation import ugettext_lazy as _
from usuarios.models import Usuario
class Sistema(models.Model):
sigla = models.CharField(verbose_name=_('Sigla'), max_length=10)
nome = models.CharField(verbose_name=_('Nome Sistema'),
... | interlegis/atendimento | solicitacoes/models.py | Python | gpl-3.0 | 2,330 |
import re,json
import numpy as np
import scipy.stats as sp
emoticons_str = r"""
(?:
[:=;] # Eyes
[oO\-]? # Nose (optional)
[D\)\]\(\]/\\OpP] # Mouth
)"""
regex_str = [
emoticons_str,
r'<[^>]+>', # HTML tags
r'(?:@[\w_]+)', # @-mentions
r"(?:\#+[\w_]+[\w\'_\-]*[\w_]+)",... | bcongdon/Data-Science-Projects | election_tweets/tweet_tokenizer.py | Python | gpl-3.0 | 1,301 |
#! /usr/bin/env python2
import sys, os
import flickrapi
import xml.etree.ElementTree
if len(sys.argv) < 2:
sys.stderr.write("usage: %s <filename> ..." % sys.argv[0])
sys.exit(1)
def auth():
api_key = "87af34fe62dafd3c5d6d4959ca92c193"
api_secret = "18ecfc909af569af"
flickr = flickrapi.FlickrAPI(api_k... | juantascon/flickr_mass_upload | flickr_mass_upload.py | Python | gpl-3.0 | 1,220 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-07-31 00:22
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('configuration_management_tools', '0001_initial'),
]
operations = [
migrations.Alter... | lsantagata/smslib_ui | src/configuration_management_tools/migrations/0002_auto_20170731_0022.py | Python | gpl-3.0 | 608 |
# coding:utf-8
import logging
import constants
import types
import random
import re
from utils.captcha.captcha import captcha
from lib.yuntongxun import sms
from handlers.base import BaseHandler
from utils.response_code import RET
class ImageCodeHandler(BaseHandler):
"""图片验证码"""
def get(self):
# 获取前... | delron-kung/Tornado-iHome | handlers/verfiycode.py | Python | gpl-3.0 | 3,911 |
"""
ship_crew.py
Generates a minimal ship crew based on tonnage.
python crew -s 400
"""
from __future__ import print_function
import random
import sys
sys.path.append(".")
from character import Character
import character_tools
def get_career():
return random.choice(['Scouts', 'Navy', 'Merchants'])
def creat... | makhidkarun/py_tools | lib/ship_crew.py | Python | gpl-3.0 | 852 |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "rds.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| jakobadam/origo-desktops | manage.py | Python | gpl-3.0 | 246 |
from gi.repository import AppIndicator3 as appindicator
class IndicatorController:
__application = None # Application
__indicator = None # appindicator.Indicator
def __init__(self, application):
# Gtk.Builder
self.__gladeBuilder = application.createGladeBuilder('indicator')
sel... | addiks/gmattermost | src/Controller/IndicatorController.py | Python | gpl-3.0 | 1,064 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest
import mock
import authentication
NONCE = 1
class TestAuthentication(object):
headers = None
data = None
def setup(self):
global NONCE
authentication.load_from_json_file = mock.MagicMock(return_value={'foo': {'secret': 'bar1'}... | ValyrianTech/BitcoinSpellbook-v0.3 | unittests/test_authentication.py | Python | gpl-3.0 | 3,052 |
# -*- encoding: utf-8 -*-
"""Implements Medium UI."""
from robottelo.ui.base import Base, UIError
from robottelo.ui.locators import common_locators, locators
from robottelo.ui.navigator import Navigator
from selenium.webdriver.support.select import Select
class Medium(Base):
"""Implements the CRUD functions for ... | abalakh/robottelo | robottelo/ui/medium.py | Python | gpl-3.0 | 2,794 |
# -*- 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):
pass
def backwards(self, orm):
pass
models = {
}
... | CWVanderReyden/originalMyHomeNet | recipeBox/migrations/0001_initial.py | Python | gpl-3.0 | 353 |
# -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... | ctrlaltdel/neutrinator | vendor/openstack/tests/unit/cloud/test_volume_access.py | Python | gpl-3.0 | 8,462 |
import unittest
import pickle
import pickletools
import copyreg
from test.support import TestFailed, TESTFN, run_with_locale
from pickle import bytes_types
# Tests that try a number of pickle protocols should have a
# for proto in protocols:
# kind of outer loop.
protocols = range(pickle.HIGHEST_PROTOCOL + 1)
... | mancoast/CPythonPyc_test | fail/301_pickletester.py | Python | gpl-3.0 | 35,665 |
import csv
from ..parser import Parser
__author__ = 'James DeVincentis <james.d@hexhost.net>'
class Csv(Parser):
def __init__(self, **kwargs):
self.csv = csv.reader(self.file)
def parsefile(self, filehandle, max_objects=1000):
"""Parse file provided by `filehandle`. Return `max_objects` at ... | jmdevince/cifpy3 | lib/cif/feeder/parsers/csv.py | Python | gpl-3.0 | 2,069 |
#!/usr/bin/env python
import os
from django.core import management
os.environ['DJANGO_SETTINGS_MODULE'] = 'kgadmin.conf.settings'
if __name__ == "__main__":
management.execute_from_command_line()
| Karaage-Cluster/karaage-admin | manage.py | Python | gpl-3.0 | 201 |
###############################################################################
# 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 #
... | pablorecio/Cobaya | src/cobaya/app.py | Python | gpl-3.0 | 4,990 |
import pygame
from pygame.locals import *
import sys; sys.path.insert(0, "./lib/")
from pgu import gui
from Vec2d import *
##
## KBSimulation graphics
##
class KBGUI(gui.container.Container):
def __init__(self, module):
## Module
self.module = module
self.config = mo... | ajhalme/kbsim | KBGUI.py | Python | gpl-3.0 | 16,260 |
# -*- coding: UTF-8 -*-
# Copyright (C) 2008 Matthieu France <matthieu@itaapy.com>
# Copyright (C) 2008, 2010 J. David Ibáñez <jdavid.ibp@gmail.com>
# Copyright (C) 2008, 2011 Hervé Cauwelier <herve@oursours.net>
# Copyright (C) 2010 Henry Obein <henry.obein@gmail.com>
#
# This program is free software: you can redistr... | nicolasderam/itools | itools/web/messages.py | Python | gpl-3.0 | 1,562 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pylab as plt
import numpy as np
import seaborn as sns; sns.set()
import keras
from keras.models import Sequential, Model
from keras.layers import Dense
from keras.optimizers import Adam
from keras.data... | wolfiex/DSMACC-testing | dsmacc/examples/autoencoderminst.py | Python | gpl-3.0 | 2,098 |
# -*- coding: utf-8 -*-
"""Manage low level support for pigjar.
**Copyright 2014-2018 Stephen Rigden.**
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 op... | trin5tensa/pigjar | pigjar/support.py | Python | gpl-3.0 | 17,792 |
import sys
import gzip
import logging
from csv import DictReader
from datetime import datetime
from . import app, connect_db
from ..constants import DEFAULT_GENOME_BUILD, BENIGN, UNCERTAIN, UNKNOWN, PATHOGENIC
from ..extensions import mongo
from ..backend import build_variant_doc, get_variant_category, update_variant... | buske/variant-subscription-service | vss/scripts/import.py | Python | gpl-3.0 | 2,871 |
from random import randint
import time
from django.contrib.gis.geos import Point
from django.core.management.base import BaseCommand
from ajapaik.ajapaik.models import Album
class Command(BaseCommand):
help = 'Refresh albums'
def handle(self, *args, **options):
albums = Album.objects.exclude(atype_... | Ajapaik/ajapaik-web | ajapaik/ajapaik/management/commands/refresh_albums.py | Python | gpl-3.0 | 1,895 |
import kivy
from kivy.app import App
from kivy.clock import Clock
from kivy.uix.popup import Popup
from kivy.uix.progressbar import ProgressBar
from kivy.uix.widget import Widget
from kivy.properties import ObjectProperty
kivy.require("1.9.1")
class MyPopupProgressBar(Widget):
progress_bar = ObjectProperty() # Ki... | bradfortner/Convergence-Jukebox-Experimental | working_popup_progress_bar rewrite.py | Python | gpl-3.0 | 1,763 |
from yapsy.IPlugin import IPlugin
class SimplePrinter(IPlugin):
def getOutput(self):
return "SimplePrinter"
def getExports(self):
return ['name']
| neil-davis/penfold | src/plugins/SimplePrinter.py | Python | gpl-3.0 | 174 |
# Copyright 2016 Metehan Özbek <mthnzbk@gmail.com>
# 2020 Erdem Ersoy <erdemersoy@erdemersoy.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
... | PisiLinuxNew/kaptan | kaptan/libkaptan/ui_welcome.py | Python | gpl-3.0 | 2,425 |
from .x264 import X264Package
from .yasm import YasmPackage
from ..packaging import AutotoolsPackage, package
@package
class FfmpegPackage(AutotoolsPackage):
"""Ffmpeg: record, convert and stream audio and video."""
name = "ffmpeg"
homepage = "https://www.ffmpeg.org/"
version = "3.0"
dependencie... | arxanas/caenbrew | caenbrew/packages/ffmpeg.py | Python | gpl-3.0 | 1,345 |
import pygame
from GameFrame import TextObject, Globals, Level
class EntryTextObject(TextObject):
def __init__(self, room: Level, x: int, y: int, max_len=4):
TextObject.__init__(self, room, x, y, '')
self.max_len = max_len
self.handle_key_events = True
self.accepting_input = True
... | tuxta/gameframe | GameFrame/EntryTextObject.py | Python | gpl-3.0 | 4,969 |
from zipfile import ZipFile
import codecs
from pykml import parser
def extraer_info_punto(punto):
datos = {
'coordinates': punto.Point.coordinates
}
for dato in punto.ExtendedData.Data:
name = dato.values()[0]
value = dato.value
datos[name] = value
return datos
def recuperar_puntos(coche):
... | nicopace/procesado_kmz_cole | pcontrol_reader.py | Python | gpl-3.0 | 1,070 |
# Used for when precision or recall == 0 to supress warnings
def warn(*args, **kwargs):
pass
import warnings
warnings.warn = warn
import numpy as np
import sklearn_crfsuite
from sklearn.metrics import make_scorer, confusion_matrix
from sklearn_crfsuite import metrics
from sklearn_crfsuite.utils import flatten
from... | bmcinnes/VCU-VIP-Nanoinformatics | NERD/CRF/CRF.py | Python | gpl-3.0 | 5,075 |
# Copyright 2014 Mark Chilenski
# This program is distributed under the terms of the GNU General Purpose License (GPL).
# Refer to http://www.gnu.org/licenses/gpl.txt
#
# 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 Fr... | markchil/gptools | gptools/error_handling.py | Python | gpl-3.0 | 1,176 |
# -*- coding: utf-8 -*-
''' Checks ground_motion_record function
by integrating the accelerations calculated as follows:
x= 9*t**3+10*t**2
xdot= 27*t**2+20*t
xdotdot= 54*t+20 '''
import xc_base
import geom
import xc
__author__= "Luis C. Pérez Tato (LCPT) and Ana Ortega (AOO)"
__copyright__= "Copyrig... | lcpt/xc | verif/tests/loads/test_ground_motion_04.py | Python | gpl-3.0 | 2,458 |
#!/usr/bin/python
# encoding: UTF-8
"""
This file is part of PenTestKit
Copyright (C) 2017-2018 @maldevel
https://github.com/maldevel/PenTestKit
PenTestKit - Useful tools for Penetration Testing.
This program is free software: you can redistribute it and/or modify
it under the term... | maldevel/PenTestKit | web/compare-post-data.py | Python | gpl-3.0 | 2,917 |
# vim: ts=4:sw=4:expandtab
# 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
# ... | tstenner/bleachbit | tests/TestWinapp.py | Python | gpl-3.0 | 19,272 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from unittest import TestLoader, TextTestRunner
from potcommuntests import Tests
runner = TextTestRunner()
testsSuite = TestLoader().loadTestsFromTestCase(Tests)
#testsSuite = TestLoader().loadTestsFromName("potcommuntests.Tests.test_with_some_missing_items")
runner.run(t... | manuco/Pot-commun | testrunner.py | Python | gpl-3.0 | 332 |
# Topydo - A todo.txt client written in Python.
# Copyright (C) 2014 - 2015 Bram Schoenmakers <bram@topydo.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,... | bram85/topydo | test/facilities.py | Python | gpl-3.0 | 1,802 |
import calendar
import os
import subprocess
import tempfile
import shutil
import stat
import datetime
import time
import csv
from collections import defaultdict
from io import StringIO
import pytz
from pyquery import PyQuery as pq
from django import http
from django.core.cache import cache
from django.utils.timezone im... | mozilla/peekaboo | peekaboo/main/views.py | Python | mpl-2.0 | 17,096 |
from copy import deepcopy
from math import inf
from numbers import Number
from typing import List, Union
from abstract_domains.lattice import BottomMixin
from abstract_domains.numerical.numerical import NumericalMixin
from abstract_domains.state import State
from abstract_domains.store import Store
from core.expressio... | gitsimon/spadup-lyra | abstract_domains/numerical/interval_domain.py | Python | mpl-2.0 | 13,333 |
#
# Newfies-Dialer License
# http://www.newfies-dialer.org
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (C) 2011-2014 Star2Billing S.L.
#
# The primar... | tarikgwa/nfd | newfies/dialer_contact/templatetags/dialer_contact_tags.py | Python | mpl-2.0 | 689 |
# 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/.
#
# Author: Kyle Lahnakoski (kyle@lahnakoski.com)
#
from __future__ import unicode_literals
from __f... | klahnakoski/MySQL-to-S3 | vendor/pyLibrary/env/pulse.py | Python | mpl-2.0 | 7,554 |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'oclapi.settings.local')
os.environ.setdefault('DJANGO_CONFIGURATION', 'Local')
from configurations.management import execute_from_command_line
execute_from_command_line(sys.argv)
| ayseyo/oclapi | django-nonrel/ocl/manage.py | Python | mpl-2.0 | 318 |
#!/usr/bin/env python
# pylint: disable=invalid-name
"""
A text-mode interface to the Ubuntu IRC logs as served by Algolia.
The idea is that this is running against live logs, which explains some of
the design decisions (i.e. lots of querying).
"""
from algoliasearch import algoliasearch
import npyscreen
import json
... | phrawzty/ubunolia | npyscreen_test.py | Python | mpl-2.0 | 5,391 |
import json
import logging
import re
from html.parser import HTMLParser
import jsonschema
from django.conf import settings
logger = logging.getLogger(__name__)
class ParserBase:
"""
Base class for all parsers.
"""
def __init__(self, name):
"""Setup the artifact to hold the extracted data.""... | edmorley/treeherder | treeherder/log_parser/parsers.py | Python | mpl-2.0 | 20,165 |
import logging
from .._resource_model_base import ResourceModelBase
from ..resources import ImmutableObjectTypeResource
_LOG = logging.getLogger(__name__)
class ImmutableObjectTypeResourceModel(ResourceModelBase):
__resource_cls__ = ImmutableObjectTypeResource
__resource_indexes__ = tuple()
def _init_... | artPlusPlus/elemental-backend | elemental_backend/resource_models/_immutable_object_type_resource_model.py | Python | mpl-2.0 | 1,279 |
# __init__.py for gempy.eti module
__version__ = '0.1.0 (May 2010)'
import gemcombineeti
import gireduceeti
import gmosaiceti
import gsappwaveeti
import gscrrejeti
import gsextracteti
import gsflateti
import gsskysubeti
import gstransformeti
import gswavelengtheti
import sploteti
| pyrrho314/recipesystem | trunk/gempy/gemini/eti/__init__.py | Python | mpl-2.0 | 283 |
from . import test_account_asset_management
from . import test_asset_management_xls
| OCA/account-financial-tools | account_asset_management/tests/__init__.py | Python | agpl-3.0 | 84 |
from uber.custom_tags import normalize_newlines
from panels import *
@all_renderable(c.STUFF)
class Root:
@unrestricted
def index(self, session, message=''):
if c.ALT_SCHEDULE_URL:
raise HTTPRedirect(c.ALT_SCHEDULE_URL)
else:
raise HTTPRedirect("internal")
@cached
... | magfest/panels | panels/site_sections/schedule.py | Python | agpl-3.0 | 14,930 |
# coding: utf8
{
'!langcode!': 'fr-fr',
'!langname!': 'fr-fr',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%d-%m-%y': '%d-%m-%y',
'... | InstitutoPascal/campuswebpro | languages/fr-fr.py | Python | agpl-3.0 | 5,725 |
from django.forms.widgets import RadioSelect
class OneJobSelect(RadioSelect):
def value_from_datadict(self, data, files, name):
"""
Given a dictionary of data and this widget's name, returns the value
of this widget. Returns None if it's not provided.
"""
return [data.get(na... | MaximeBiset/care4care | branch/widgets.py | Python | agpl-3.0 | 332 |
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
# (C) 2011 - 2013 Therp BV (<http://therp.nl>).
#
# All other contributions are (C) by their respective contributors
#
# ... | otherway/sepa-tools | account_payment_export/model/payment_mode.py | Python | agpl-3.0 | 1,830 |
from . import calendar
| multidadosti-erp/multidadosti-addons | calendar_systray_menu/models/__init__.py | Python | agpl-3.0 | 23 |
"""
This file is part of DeepConvSep.
Copyright (c) 2014-2017 Marius Miron <miron.marius at gmail.com>
DeepConvSep 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... | gerruz/DeepConvSep | examples/bach10/compute_features_bach10sibelius.py | Python | agpl-3.0 | 5,850 |
# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
import sys
from django.contrib.auth.models import User
from lxml import etree
from django.core.management import BaseCommand
from documents.models import Book
fro... | fnp/redakcja | src/documents/management/commands/prune_audience.py | Python | agpl-3.0 | 2,111 |
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import payment_mode
from . import res_company
from . import res_partner
from . import account_tax_template
from . import account_tax
from . import res_currency
from . import account_invoice_integration
from . import account_invoice_integratio... | factorlibre/l10n-spain | l10n_es_facturae/models/__init__.py | Python | agpl-3.0 | 405 |
# Copyright 2021 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class SaleOrder(models.Model):
_inherit = "sale.order"
def _apply_pricelist_from_commitment_date(self):
self.ensure_one()
for line in self.order_line:
# Pr... | OCA/sale-workflow | sale_pricelist_from_commitment_date/models/sale_order.py | Python | agpl-3.0 | 1,711 |
"""
Implement the command-line tool interface.
"""
from __future__ import unicode_literals
import argparse
import os
import sys
import diff_cover
from diff_cover.diff_reporter import GitDiffReporter
from diff_cover.git_diff import GitDiffTool
from diff_cover.git_path import GitPathTool
from diff_cover.violations_report... | hugovk/diff-cover | diff_cover/tool.py | Python | agpl-3.0 | 6,230 |
# -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa 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... | proyectos-analizo-info/pybossa-analizo-info | pybossa/sched.py | Python | agpl-3.0 | 7,472 |
from django.conf import settings
from core.views.generic import TemplateView
from core.mixins import LoginPermissionRequiredMixin
from organization import messages as org_messages
from organization.views import mixins as org_mixins
class Search(LoginPermissionRequiredMixin,
org_mixins.ProjectMixin,
... | Cadasta/cadasta-platform | cadasta/search/views/default.py | Python | agpl-3.0 | 909 |
import datetime
from pymongo import errors
from pymongo import ReturnDocument
from vj4 import db
from vj4 import error
from vj4.model import builtin
from vj4.util import argmethod
from vj4.util import pwhash
from vj4.util import validator
PROJECTION_PUBLIC = {'_id': 1,
'uname': 1,
... | vijos/vj4 | vj4/model/user.py | Python | agpl-3.0 | 6,864 |
# This file is part of the FragDev Website.
#
# the FragDev Website 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.
#
# the FragDev W... | lo-windigo/fragdev | fragdev/settings.py | Python | agpl-3.0 | 5,073 |
from twisted.web.server import Site
from .root import RootResource
from .auth import AuthResource
def make_site(**kwargs):
root_resource = RootResource()
auth_resource = AuthResource(kwargs['authenticator'])
root_resource.putChild('auth', auth_resource)
return Site(root_resource)
| shyba/cryptosync | cryptosync/resources/__init__.py | Python | agpl-3.0 | 300 |
import time
from lib.DomainObjects.EyeosCard import EyeosCard
from lib.Errors.EyeosAPIError import EyeosAPIError
from lib.EyeosApi.EyeosApiCall import EyeosApiCall
from lib.Settings import Settings
from lib.Wrappers.Logger import Logger
class Logout:
def __init__(self, injected_proxy_ip=None, injected_eyeos_api... | Open365/Open365 | lib/EyeosApi/Logout.py | Python | agpl-3.0 | 1,097 |
from django.test import TestCase
from webapp.forms import ItemForm
from webapp.models import User, Collection, CollectionPermission, Item, Accessor, OWNER, GUEST
from webapp.util import server_side_md
class ModelPermissionsTest(TestCase):
def setUp(self):
self.user1 = User.objects.create_user('a', 'a@a.c... | msipos/lasernotes | backend/webapp/tests.py | Python | agpl-3.0 | 3,156 |
#!/usr/bin/env python
#
# This file is used to test host- and service-downtimes.
#
import sys
import time
import datetime
import os
import string
import re
import random
import unittest
import copy
# import the shinken library from the parent directory
import __import_shinken ; del __import_shinken
import shinken
f... | h4wkmoon/shinken | test/shinken_test.py | Python | agpl-3.0 | 14,045 |
'''
Copyright (C) 2016-2019 Vanessa Sochat.
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 distribute... | vsoch/singularity-python | singularity/analysis/reproduce/utils.py | Python | agpl-3.0 | 6,015 |
# -*- coding: utf-8 -*-
##############################################################################
#
# UK Report Template
# Copyright (C) 2015 OpusVL (<http://opusvl.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
# pu... | OpusVL/Odoo-UK-Format-Reports | UK_Reports/__init__.py | Python | agpl-3.0 | 1,037 |
"""
Unit tests for LMS instructor-initiated background tasks.
Runs tasks on answers to course problems to validate that code
paths actually work.
"""
import json
from uuid import uuid4
from itertools import cycle, chain, repeat
from mock import patch, Mock
from smtplib import SMTPServerDisconnected, SMTPDataError, SM... | nttks/jenkins-test | lms/djangoapps/bulk_email/tests/test_tasks.py | Python | agpl-3.0 | 24,083 |
# coding: utf-8
from mongomock import MongoClient as MockMongoClient
from .base import *
# For tests, don't use KoBoCAT's DB
DATABASES = {
'default': dj_database_url.config(default='sqlite:///%s/db.sqlite3' % BASE_DIR),
}
DATABASE_ROUTERS = ['kpi.db_routers.TestingDatabaseRouter']
TESTING = True
# Decrease pro... | kobotoolbox/kpi | kobo/settings/testing.py | Python | agpl-3.0 | 664 |
import copy
import itertools
from collections import defaultdict
from boto.ec2.instance import Instance as BotoInstance, Reservation
from moto.core import BaseBackend
from .exceptions import (
InvalidIdError,
DependencyViolationError,
InvalidDHCPOptionsIdError
)
from .utils import (
random_ami_id,
... | GbalsaC/bitnamiP | venv/lib/python2.7/site-packages/moto/ec2/models.py | Python | agpl-3.0 | 37,412 |
"""
Test the Studio help links.
"""
from flaky import flaky
from bok_choy.web_app_test import WebAppTest
from unittest import skip
from common.test.acceptance.fixtures.course import XBlockFixtureDesc
from common.test.acceptance.tests.studio.base_studio_test import StudioCourseTest, ContainerBase
from common.test.acce... | itsjeyd/edx-platform | common/test/acceptance/tests/studio/test_studio_help.py | Python | agpl-3.0 | 48,758 |
# Copyright (C) 2011, 2016 Francois Marier <francois@libravatar.org>
#
# This file is part of Libravatar
#
# Libravatar 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, ... | libravatar/libravatar | libravatar/tools/test_views.py | Python | agpl-3.0 | 4,299 |
import os
import json
import jinja2
import logging
import datetime
from request import global_vars
from settings import MANDRILL_API_KEY, MANDRILL_SENDER
from settings import CURRENT_URL, MANDRILL_API_BASE_ENDPOINT
from google.appengine.api import urlfetch
jinja_environment = jinja2.Environment(
loader=jinja2.File... | opengovt/ckan-agency-management-tool | mandrill_email.py | Python | agpl-3.0 | 2,565 |
"""
Views related to the video upload feature
"""
from boto import s3
import csv
from uuid import uuid4
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse, HttpResponseNotFound
from django.utils.translation import ugettext as _, ugettext_noop... | sameetb-cuelogic/edx-platform-test | cms/djangoapps/contentstore/views/videos.py | Python | agpl-3.0 | 12,545 |
from .platform import Platform
from ..wasm.structure import (
ModuleInstance,
Store,
FuncAddr,
HostFunc,
Stack,
ProtoFuncInst,
MemInst,
MemAddr,
GlobalInst,
GlobalAddr,
TableInst,
TableAddr,
ExternVal,
Module,
)
from ..wasm.types import Trap, TypeIdx, TableType, M... | trailofbits/manticore | manticore/platforms/wasm.py | Python | agpl-3.0 | 17,265 |
from django.db import models
# Models of drScratch
class File(models.Model):
filename = models.CharField(max_length=100)
method = models.CharField(max_length=100)
time = models.TextField()
score = models.CharField(max_length=10)
move = models.CharField(max_length=100)
art = models.CharField(ma... | Saruus/drPencilcode | app/models.py | Python | agpl-3.0 | 1,482 |
# -*- coding: utf-8 -*-
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
# This program is free software: you can r... | dayatz/taiga-back | taiga/export_import/services/store.py | Python | agpl-3.0 | 29,644 |
# Copyright(C) 2011,2012,2013,2014 by Abe developers.
# DataStore.py: back end database access for Abe.
# 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... | Oizopower/Whitecoin-ABE | Abe/DataStore.py | Python | agpl-3.0 | 122,759 |
'''
VERIDIC - Towards a centralized access control system
Copyright (C) 2011 Mikael Ates
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
Licen... | BryceLohr/authentic | authentic2/attribute_aggregator/user_profile.py | Python | agpl-3.0 | 4,952 |
from django.http import HttpResponse
from django.db import connection
def save_ajax(request):
cursor = connection.cursor()
cursor.execute("INSERT INTO codings_values (coding_id,field_id,intval) VALUES (34,"+request.POST.get("fieldID", "")+","+request.POST.get("fieldValueID", "")+")")
''' cursor.execut... | aemal/westcat | annotator/save.py | Python | agpl-3.0 | 616 |
# -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from shuup.core.order_creator import OrderSource
class Basketish... | suutari/shoop | shuup_tests/utils/basketish_order_source.py | Python | agpl-3.0 | 355 |
#!/usr/bin/env python
import rhythm
re = rhythm.RhythmExtract()
# fname = '/media/Data/Data/CompMusicDB/Carnatic/audio/Aneesh_Vidyashankar/Pure_Expressions/7_Jagadoddharana.mp3'
fname = '/media/Code/UPFWork/PhD/Data/CMCMDa/mp3/adi/10014_1313_Bhagyadalakshmi.mp3'
results = re.run(fname)
print("All done")
| MTG/pycompmusic | test/essentia/rhythmTest.py | Python | agpl-3.0 | 306 |
from sst.actions import (
assert_element,
assert_title,
check_flags,
click_button,
get_element,
go_to,
wait_for,
)
from u1testutils import mail
from u1testutils.sso import mail as sso_mail
from u1testutils.sst import config
from acceptance import helpers
check_flags('allow_unverified')
c... | miing/mci_migo | acceptance/tests/new_account/new_account_8_confirmation_requires_login.py | Python | agpl-3.0 | 862 |
# -*- coding: utf-8 -*-
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('rsr', '0056_auto_20160219_1007'),
]
operations = [
migrations.AlterField(
model_name='iatiimport',
name='enabled',
field=models... | akvo/akvo-rsr | akvo/rsr/migrations/0057_auto_20160222_1015.py | Python | agpl-3.0 | 1,201 |
from requests.exceptions import ConnectionError
class RequesterStub:
def __init__(self, mocked_requests, mocked_decode='', auth_cookies=''):
self.mocked_requests = mocked_requests
self.call_count = {}
self.mocked_decode = mocked_decode
for url in mocked_requests.keys():
... | RosesTheN00b/BudgetButlerWeb | butler_offline/test/RequesterStub.py | Python | agpl-3.0 | 1,716 |
#
# This file is part of Plinth.
#
# 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 distribute... | freedomboxtwh/Plinth | plinth/__init__.py | Python | agpl-3.0 | 750 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from flask import url_for
from udata.core.storages import images, default_image_basename
from udata.i18n import lazy_gettext as _
from udata.models import db
__all__ = ('Post', )
IMAGE_SIZES = [400, 100, 50]
class Post(db.Datetimed, db.Document):
... | davidbgk/udata | udata/core/post/models.py | Python | agpl-3.0 | 1,465 |
import logging
from django.core.urlresolvers import reverse
from django.db import models
from django.db.models import QuerySet, Max, Min
import autostew_web_session.models.participant
from autostew_web_enums.models import SessionState
from autostew_web_session.models.member import Member
class SessionSetup(models.M... | Autostew/autostew | autostew_web_session/models/session.py | Python | agpl-3.0 | 13,540 |
import json
from io import BytesIO
from tempfile import TemporaryFile
import qrcode
from django.core.files.base import ContentFile
from django.core.files.storage import default_storage
from django.utils import timezone
from reportlab.lib import colors
from reportlab.lib.units import mm
from reportlab.platypus import P... | c3cashdesk/c6sh | src/postix/backoffice/report.py | Python | agpl-3.0 | 15,278 |
"""
Tests for the Certificate REST APIs.
"""
from django.core.urlresolvers import reverse
from rest_framework import status
from rest_framework.test import APITestCase
from certificates.models import CertificateStatuses
from certificates.tests.factories import GeneratedCertificateFactory
from course_modes.models impor... | 10clouds/edx-platform | lms/djangoapps/certificates/apis/v0/tests/test_views.py | Python | agpl-3.0 | 4,367 |