src
stringlengths
721
1.04M
from django.conf.urls import url,include from estagio.base.views import home,\ contatos,\ lista_em_arvore,\ download,\ view_compacta_pesquisa_selecionada,\ baixar_pesquisa,\ exemplo,\ view_compacta_toda_pesquisa,\ exemplo_assinc,\ get_resultado,\ define_sessao,\ requisicao_en...
from __future__ import unicode_literals import datetime from django.contrib.admin import (site, ModelAdmin, SimpleListFilter, BooleanFieldListFilter, AllValuesFieldListFilter, RelatedOnlyFieldListFilter) from django.contrib.admin.views.main import ChangeList from django.contrib.auth.admin import UserAdmin from dj...
import pygame import random class Player(pygame.sprite.Sprite): def __init__(self, level, *groups): super(Player, self).__init__(*groups) #the game level self.level = level #spritegrups self.unpassable = pygame.sprite.Group() #base image sel...
"Repository for representation standards" import sys from .small_classes import Quantity try: sys.stdout.write(u"\u200b") DEFAULT_UNIT_PRINTING = [":P~"] except UnicodeEncodeError: DEFAULT_UNIT_PRINTING = [":~"] def _repr(self): "Returns namespaced string." return "gpkit.%s(%s)" % (self.__class__...
from pygame.rect import Rect __author__ = 'mouton' from pygame.sprite import Sprite import pygame from collections import defaultdict from copy import copy _rootDir = None _spritesList = defaultdict(pygame.sprite.OrderedUpdates) _rectsToUpdate = [] def init(rootDir): global _rootDir _rootDir = rootDir ...
""" RenderPipeline Copyright (c) 2014-2016 tobspr <tobias.springer1@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use...
# Copyright 2016-2019 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """The domain handler for the WebSocket connection.""" from django.core.exceptions import ValidationError from maasserver.forms.dnsdata import DNSDataForm from maasserver.f...
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import fields, api, models, _ from op...
#*************************************************************** #* Name: LimeSDRMini.py #* Purpose: Class implementing LimeSDRMini functions #* Author: Lime Microsystems () #* Created: 2018-04-16 #* Copyright: Lime Microsystems (limemicro.com) #* License: #**************************************************...
from Products.DataCollector.plugins.CollectorPlugin import ( SnmpPlugin, GetTableMap, ) class EMCIsilonDiskPerfs(SnmpPlugin): relname = 'emcisilon_diskperfs' modname = 'ZenPacks.community.EMCIsilon.EMCIsilonDiskPerf' snmpGetTableMaps = ( GetTableMap( 'diskPerfTable', '.1.3.6.1...
#!/usr/bin/python ## Printing troubleshooter ## Copyright (C) 2008, 2009 Red Hat, Inc. ## Author: Tim Waugh <twaugh@redhat.com> ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either versi...
"""Provide tools for generating objects for testing purposes.""" from datetime import datetime from random import randint import random import string from bookie.models import DBSession from bookie.models import Bmark from bookie.models import Tag from bookie.models.applog import AppLog from bookie.models.auth import ...
from BlockScan import BlockScan from amitools.fs.FSString import FSString from amitools.fs.FileName import FileName from amitools.fs.validate.Log import Log import amitools.fs.DosType as DosType class DirChainEntry: """entry of the hash chain""" def __init__(self, blk_info): self.blk_info = blk_info self.p...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
import networkx # pylint:disable=unused-import class RemoveNodeNotice(Exception): pass class AILGraphWalker: """ Walks an AIL graph and optionally replaces each node with a new node. """ def __init__(self, graph, handler, replace_nodes: bool=False): self.graph = graph # type: network...
import os import sublime import sublime_plugin from .lib.pyjavaproperties import Properties class AddEditPropertiesCommand(sublime_plugin.WindowCommand): def run(self, paths = []): # TODO: validate if *.properties file self.paths = paths self.window.show_input_panel("Properties to add/edit:", '', self.on...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Basic functions, including timing, rush (imported), quit """ # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2021 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). from __future__ import abs...
""" python-bna Battle.net Authenticator routines in Python. Specification can be found here: <http://bnetauth.freeportal.us/specification.html> Python implementation by Jerome Leclanche <jerome.leclanche@gmail.com> """ __version__ = "3.1" import hmac from binascii import hexlify from hashlib import sha1 try: from...
from flask import render_template, redirect, request, url_for, flash from flask.ext.login import login_user, logout_user, login_required, \ current_user from . import auth from .. import db from ..models import User from ..email import send_email from .forms import LoginForm, RegistrationForm, ChangePasswordForm,\ ...
# -*- encoding: utf-8 -*- """Test class for Location CLI""" from fauxfactory import gen_string from random import randint from robottelo.cli.base import CLIReturnCodeError from robottelo.cli.factory import ( CLIFactoryError, make_compute_resource, make_domain, make_environment, make_hostgroup, ...
# -*- 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): # Changing field 'Building.air_conditioning' db.alter_column(u'building_building', 'air_conditioning', self...
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved. # Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved. # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # versi...
########################################################################## # # Copyright (c) 2012, John Haddon. All rights reserved. # Copyright (c) 2012-2016, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided ...
''' eogRichExif A eog (Eye of GNOME Image Viewer) plugin which shows many Exif info in side pane. Thanks to the eogMetaEdit plugin. ''' ''' eogRichExif 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...
import flask_wtf import wtforms from wtforms.validators import DataRequired, Length, Email, Regexp, EqualTo from ..models import User class LoginForm(flask_wtf.FlaskForm): email = wtforms.StringField('电子邮件地址', validators=[DataRequired(), Length(1, 64), Email()...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Zoe Sysinfo - https://github.com/rmed/zoe-sysinfo # # Copyright (c) 2015 Rafael Medina García <rafamedgar@gmail.com> # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentati...
""" URLConf for Django user registration and authentication. If the default behavior of the registration views is acceptable to you, simply use a line like this in your root URLConf to set up the default URLs for registration:: (r'^accounts/', include('registration.urls')), This will also automatically set up th...
# encoding: utf8 from unittest import TestCase from SmallScrewdriver import Size class TestSize(TestCase): def test_area(self): size = Size(100, 100) self.assertEqual(size.area(), 10000) size = Size(10, 10) self.assertEqual(size.area(), 100) size = Size(20, 20) s...
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import sys from pan...
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-08-27 15:52 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('auth', '0007_alter_validators_add_error_messages'), ...
""" Result Proxy ------------ The result proxy wraps the result instance given to each test. It performs two functions: enabling extended error/failure reporting and calling plugins. As each result event is fired, plugins are called with the same event; however, plugins are called with the nose.case.Test instance tha...
#################################################################################################### # # Musica - A Music Theory Package for Python # Copyright (C) 2017 Fabrice Salvaire # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
# Run these tests with 'nosetests': # install the 'python-nose' package (Fedora/CentOS or Ubuntu) # run 'nosetests' in the root of the repository import unittest import platform import planex.spec def get_rpm_machine(): if platform.machine() == 'x86_64': return 'x86_64' return 'i386' def get_de...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
from framework.utils import iso8601format from website.project.metadata.utils import serialize_meta_schema def serialize_user(user): return { 'full_name': user.fullname, 'username': user.username, 'id': user._id } # TODO: Write and use APIv2 serializer for this def serialize_draft_re...
from decodes.core import * from . import dc_base, dc_vec, dc_point, dc_has_pts #here we may only import modules that have been loaded before this one. see core/__init__.py for proper order if VERBOSE_FS: print("mesh.py loaded") import copy, collections class Mesh(HasPts): """ a very simple mesh class "...
""" jut integrations api """ from jut import defaults from jut.api import deployments, data_engine def get_webhook_url(deployment_name, space='default', data_source='webhook', token_manager=None, app_url=defaults.APP_URL, ...
"""Utility to compile possibly incomplete Python source code.""" __all__ = ["compile_command"] def compile_command(source, filename="<input>", symbol="single"): r"""Compile a command and determine whether it is incomplete. Arguments: source -- the source string; may contain \n characters filename --...
# Copyright (c) 2017, Fernando Freire <fernando.freire@nike.com> # All rights reserved. # # See LICENSE file for full license. import types from . import AWSObject, AWSProperty from .awslambda import Environment, VPCConfig, validate_memory_size from .dynamodb import ProvisionedThroughput from .validators import posit...
#!/Xsoftware64/EM/EMAN2/extlib/bin/python # # Author: John Flanagan (jfflanag@bcm.edu) # Copyright (c) 2000-2011 Baylor College of Medicine # This software is issued under a joint BSD/GNU license. You may use the # source code in this file under either license. However, note that the # complete EMAN2 and SPARX softwa...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Copyright (c) 2012 Lars Hupfeldt Nielsen, Hupfeldt IT # All rights reserved. This work is under a BSD license, see LICENSE.TXT. from multiconf import mc_config, ConfigItem, RepeatableConfigItem, ConfigBuilder, MC_REQUIRED from multiconf.decorators import nested_repeatables, named_as, required from multiconf.envs imp...
import bpy import bmesh import gzip # Date 12/28/15 # Wrriten for Blender ver. 2.76.2b # This file will serve as a record of how we will transmit data from blender to our raytracer. # These parameters are more or less mirrored information about BlendData types from: # http://www.blender.org/api/blender_python_api_2_76...
# # Copyright (c) 2008-2015 Citrix Systems, Inc. # # 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 l...
import os from time import sleep import shutil import pytest from watchdog.events import ( # noqa FileDeletedEvent, FileModifiedEvent, FileCreatedEvent, FileMovedEvent, DirDeletedEvent, DirModifiedEvent, DirCreatedEvent, DirMovedEvent ) from osfoffline import settings from tests.bas...
import requests from .sentry_api_client.api import get_api_instance class Patrol: def __init__(self, sentry_api_token, timeout=None): self.headers = {"Authorization": "Bearer {}".format(sentry_api_token)} self.timeout = timeout self.api = get_api_instance(sentry_api_token, timeout) d...
import ringogw def ringo_reader(fd, sze, fname): import struct, zlib MAGIC_HEAD = (0x47da66b5,) MAGIC_TAIL = (0xacc50f5d,) def read_really(s): t = 0 buf = "" while t < s: r = fd.read(s - t) ...
# Simple tool for flood fill. # # 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 distributed in the h...
# -*- coding: utf-8 -*- import json import os from sunpy.net import hek from pprint import pprint from datetime import datetime,timedelta from time import strftime import numpy as np import matplotlib.pyplot as plt client = hek.HEKClient() #SEARCH FOR FAST AND WIDE CMEs IN THE HEK! #'FAST' means linear speed higher th...
#!/usr/bin/env python3 # This file is part of dwinelle-tools. # dwinelle-tools 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. # dwi...
#! /usr/bin/env python # :noTabs=true: # (c) Copyright (c) 2017 Gijs Kant # (c) This file is distributed under the MIT License, # (c) see the file LICENSE. """ connectfour.py Brief: Generates SMV files representing the Connect Four game. Author: Gijs Kant <gijskant@protonmail.com> """ import sys N = 7 # width of ...
# -*- coding: utf-8 -*- """A collection of benchmark problems.""" import numpy as np def bench1(x): """A benchmark function for test purposes. f(x) = x ** 2 It has a single minima with f(x*) = 0 at x* = 0. """ return x[0] ** 2 def bench1_with_time(x): """Same as bench1 but returns the...
''' Collagen is a commandline utility that creates a collage using image segmentation. ''' import os import os.path from collagen import segments from collagen import collage import sys from collagen import utils COLLAGEN_DIR = os.path.abspath(__file__ + "/../../") def segment_images(source_image_folder,segment_path...
# Copyright 2018 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
from website import app, views # Home and search app.add_url_rule('/', view_func=views.index) app.add_url_rule('/search', view_func=views.search_results) # Carts app.add_url_rule('/carts/<cid>', view_func=views.cart_page, methods=['GET', 'POST']) app.add_url_rule('/carts/<cid>/menu', view_func=views.menu_page, method...
""" homeassistant.components.demo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sets up a demo environment that mimics interaction with devices """ import random import homeassistant as ha import homeassistant.loader as loader from homeassistant.components import (SERVICE_TURN_ON, SERVICE_TURN_OFF, ...
# Copyright (c) 2019 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Test the simplified plotting interface.""" from datetime import datetime, timedelta from io import BytesIO import warnings import cartopy.crs as ccrs import cartopy.feature a...
""" The :class:`.CDNClient` class provides a simple API for downloading Steam content from SteamPipe Initializing :class:`.CDNClient` requires a logged in :class:`.SteamClient` instance .. code:: python mysteam = SteamClient() ... mycdn = CDNClient(mysteam) Getting depot manifests for an app .. code::...
# F3AT - Flumotion Asynchronous Autonomous Agent Toolkit # Copyright (C) 2010,2011 Flumotion Services, S.A. # 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...
# -*- coding: UTF-8 -*- from __future__ import print_function, division import numpy as np class CorrFunction(object): """ correlation function data, additional information and manipulation methods Parameters ---------- corr : (nvec, nframes) array Correlation functions std : (nvec,...
from core.himesis import Himesis, HimesisPreConditionPatternLHS import uuid class HMM4_then1_ConnectedLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the AToM3 model HMM4_then1_ConnectedLHS. """ #...
# -*- coding: utf-8 -*- from __future__ import division, absolute_import, print_function, unicode_literals from oucfeed.crawler import util from oucfeed.crawler.newsspider import NewsSpider class Spider(NewsSpider): """水产学院 栏目数比较多,直接请求了包含所有栏目的页面,减少请求次数,但总抓取数比较多(100+) 某些栏目的置顶文章过多可能导致无法检测到新的未置顶的文章,未处理 ...
from numbers import Integral import itertools import bisect from array import array from future.builtins import range from .utils import isint, basic_getitem, basic_setitem, normalize_slice, \ get_logger class Arange: def __init__(self, start, stop=None, step=None): if stop is None and step is None: ...
#!/usr/bin/python from Adafruit_MotorHAT import Adafruit_MotorHAT, Adafruit_DCMotor import serial import time import atexit #initialize i2c communication with motor shield roboMotor = Adafruit_MotorHAT(addr=0x60) #initialize serial communications with XBee RF reciever xBee = serial.Serial('/dev/ttyACM1',57600) compas...
# Copyright (C) 2003-2007 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # # Paramiko 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 op...
# 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 ...
# coding=utf-8 import os import platform if platform.system() == "Windows": from conans.util.windows import conan_expand_user, rm_conandir else: from conans.util.files import rmdir conan_expand_user = os.path.expanduser rm_conandir = rmdir def get_conan_user_home(): user_home = os.getenv("CONAN...
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import torch import torch.o...
from flask import Flask, render_template, request from forms import ContactForm from flask.ext.mail import Message, Mail mail = Mail() app = Flask(__name__) app.secret_key = #removed from public version app.config['MAIL_SERVER'] = "smtp.gmail.com" app.config['MAIL_PORT'] = 465 app.config['MAIL_USE_SSL'] = True app....
#!/usr/bin/env python3 import psutil import os import json import re import itertools from contextlib import contextmanager import pprint import time import socket import subprocess import logging logger = logging.getLogger(__name__) def pairwise(iterable): "s -> (s0,s1), (s2,s3), (s4, s5), ..." a = iter(ite...
import dbus import socket import hashlib import time import datetime import os from servicetest import EventPattern, assertEquals, assertSameSets, call_async from gabbletest import exec_test, sync_stream, make_result_iq import ns from bytestream import create_from_si_offer, announce_socks5_proxy import bytestream fro...
import html.parser from urllib.parse import urljoin import re import tinycss from enum import Enum from os.path import commonprefix from collections import namedtuple class RefCat(Enum): internal = 1 external = 2 Ref = namedtuple('Ref', 'cat ref') def grok_ref(link, containing_component=None): ROOT = 'ht...
from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np import cv2 import os import dto import pickle ROOT_DIR = "/home/pi/jme3/assets/Textures/" RESIZE_WIDTH = 1920 # Raspberry pi texture size def list_files(directory, extension): ret = [] for file in os.listdir(direc...
# -*- coding: utf-8 -*- #====================================================================== # This file is part of "Museo-Cachi". # # Museo-Cachi 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,...
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-01-25 13:21 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): initial = True dependencies = [ migrations...
from __future__ import absolute_import, print_function, division import numpy as np import numpy import theano from theano.tests import unittest_tools as utt from theano.tensor.extra_ops import (SearchsortedOp, searchsorted, CumsumOp, cumsum, CumprodOp, cumprod, ...
from Module import Command from datetime import datetime from requests import HTTPError import re import os from ChatExchange3.chatexchange3.messages import Message def command_alive(cmd, bot, args, msg, event): return "Yes, I'm alive." def command_utc(cmd, bot, args, msg, event): return datetime.utcnow().c...
# -*- coding: utf-8 -*- # Copyright 2012 Loris Corazza, Sakis Christakidis # # 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 # # U...
#!/usr/bin/env python3 """ Recursively link all files. """ import argparse import glob import os import signal import sys from typing import List import file_mod class Options: """ Options class """ def __init__(self) -> None: self._args: argparse.Namespace = None self.parse(sys.arg...
from django.core.urlresolvers import reverse from rest_framework import status from bluebottle.bb_projects.models import ProjectPhase from bluebottle.geo.models import Country from bluebottle.test.factory_models.accounts import BlueBottleUserFactory from bluebottle.test.factory_models.geo import CountryFactory from bl...
import urllib2 import simplejson from django import forms from django.contrib.localflavor.uk.forms import UKPostcodeField from models import Alert # Due to a bug in UKPostcodeField, can't override error message. This is # fixed in: http://code.djangoproject.com/ticket/12017 # So remove this extra class when we have...
#coding=utf-8 from flask import url_for from flask.ext.sqlalchemy import SQLAlchemy from app import db,app from hashlib import md5 from datetime import datetime import os user_user_concern=db.Table('user_user_concern', db.Column('user1_id',db.Integer,db.ForeignKey('user.id'),primary_key=True), db.Column('use...
######################################################################### # YASMon - Yet Another System Monitor # # Copyright (C) 2010 Scott Lawrence # # # # This program is free s...
"""bookworm URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/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') Class-ba...
#!/usr/bin/etc python import sys import time import os import json import pickle def readfile(fn): result = {} result["Turns"] = {} current_turn = 0 key_index = 0 keys = ["Turn", "You", "TickTock", "Appropriateness"] for l in open(fn): if ":" in l: key = l.split(":")[0] value = ":".join(l.s...
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from pathlib import PurePath from textwrap import dedent from typing import List, Optional from pants.backend.python.lint.pylint.rules import PylintFieldSet, PylintFieldSets from pants.ba...
# Copyright (c) 2014 Rackspace, Inc. # # 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 wr...
import unittest import os import logging from rdflib.Graph import Graph from rdflib.Namespace import Namespace from rdflib import URIRef, BNode, Literal from FuXi.Rete.Util import generateTokenSet from curate.rules import makeRuleStore from StringIO import StringIO OWL = Namespace("http://www.w3.org/2002/07/owl#") de...
""" Django settings for djangobucketlist project. Generated by 'django-admin startproject' using Django 1.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Bui...
from oppia.test import OppiaTestCase from av.models import UploadedMedia, UploadedMediaImage, image_file_name class AVModelsTest(OppiaTestCase): fixtures = ['tests/test_user.json', 'tests/test_oppia.json', 'tests/test_permissions.json', 'tests/test_av_uploadedmedi...
# Copyright 2017 The UAI-SDK Authors. All Rights Reserved. # # 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...
""" Django settings for openpaste project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) ...
from rhombus.views import * @roles( PUBLIC ) def index(request): """ input tags gallery """ static = False html = div( div(h3('Input Gallery'))) eform = form( name='rhombus/gallery', method=POST, action='') eform.add( fieldset( input_hidden(name='rhombus-gall...
#! /usr/bin/env python # Copyright (C) 2012 Club Capra - capra.etsmtl.ca # # This filename is part of CapraVision. # # CapraVision 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 ve...
import wx #import wx.lib.inspection import os import imp import json from templite import Templite import vstore outputs = {} open_dir = os.path.join(os.path.dirname(__file__),"templates") load_save_dir = os.path.expanduser("~") export_dir = os.path.expanduser("~") def load_module(path): return imp.load_source...
#!/usr/bin/env python ''' pbsplit - split a protobuf stream into multiple files ''' import sys import getopt import lwpb import lwpb.stream import lwpb.codec def shift(L): e = L[0] ; del L[0:1] ; return e def main(): typename = "" skip = 0 count = -1 splitsize = 1000 # in number of records pb2file = ...
# Solfege - free ear training software # Copyright (C) 2007, 2008 Tom Cato Amundsen # License is GPL, see file COPYING from __future__ import absolute_import import unittest from solfege.utils import string_get_line_at class TestStringGetLineAt(unittest.TestCase): def test1(self): self.assertEquals(strin...
import hashlib import re from collections import Counter from datetime import timedelta from django.contrib.auth.models import User from django.conf import settings from django.contrib.auth.models import User from django.core.exceptions import ValidationError from django.core.validators import MinValueValidator, MaxVal...
# -*- coding: utf-8 -*- """ Copyright (C) 2017 Sebastian Golasch (plugin.video.netflix) Copyright (C) 2018 Caphm (original implementation module) Helper functions for Kodi operations SPDX-License-Identifier: MIT See LICENSES/MIT.md for more information. """ from __future__ import absolute_import, d...