src
stringlengths
721
1.04M
from django.core.exceptions import ImproperlyConfigured class ListFilteredMixin(object): """ Mixin that adds support for django-filter to a vanilla ListView """ filter_set = None def get_filter_set(self): if self.filter_set: return self.filter_set else: ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import sys import subprocess import os from os.path import isfile import matplotlib.pyplot as plt plt.switch_backend('agg') import numpy as np from scipy.stats import kendalltau # sns.set(style="ticks") import math import pandas as pd import seaborn as sns ...
""" Functions for managing data. """ # Copyright 2011-2013 Constantine Lignos # # 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 re...
"""BuyBitcoin 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-...
# -*- 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 'Country' db.create_table(u'venues_country', ( (u'id', self.gf('django.db.models....
import os,subprocess from utils import Timer, Logger from logic import Literal, LogicProgram from weights import Weights class Grounder(object): def __call__(self, infiles, env): self.__env = env logfile = open(env.tmp_path('grounding.log'),'w') logger = Logger(file = logfile,verbose = 1) ...
import base64 import logging import random import sys import unittest import warnings from io import BytesIO import gevent import gevent.pywsgi from flask import Flask, Response, make_response, redirect, request, send_file, stream_with_context import locust from locust import log from locust.event import Events from ...
#!/usr/bin/env python # vim: expandtab tabstop=4 shiftwidth=4 # # Copyright (c) 2016 Christian Schmitz <tynn.dev@gmail.com> # # This program 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 ve...
import pytest import re from SccpLogger.SccpLogger import SccpLogger, EOF, TIMEOUT def handle_tone(ssh, index, child_result_list): tone = int(ssh.match.group(2)) dir = int(ssh.match.group(3)) return 'Tone', {'State':ssh.match.group(1).decode('utf-8'),'Type':sccp.lookup_tone(tone),'Direction':sccp.lookup_toned...
# -*- coding: utf-8 -*- # # Pynuts documentation build configuration file, created by # sphinx-quickstart on Tue Apr 24 10:37:37 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All ...
from array import array import numpy as np import matplotlib.pyplot as plt from sklearn import datasets from sklearn.tree import DecisionTreeClassifier from sklearn.ensemble import AdaBoostClassifier from sklearn.metrics import classification_report, roc_auc_score, roc_curve from sklearn import tree import cPickle ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from PyQt4 import QtCore, QtGui class FlatProxyModel(QtGui.QAbstractProxyModel): def sourceDataChanged(self, topLeft, bottomRight): self.dataChanged.emit(self.mapFromSource(topLeft), self.mapFromSource(bottomRight)) ...
import collections import contextlib import errno import hashlib import json import os import io import re import shutil import stat import struct import tarfile import tempfile import zipfile from datetime import datetime, timedelta from six import text_type from django import forms from django.conf import settings ...
''' This file is part of python-libdeje. python-libdeje is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. python-libdeje is distribute...
import numpy as np import pandas as pd from matplotlib import pyplot as plt import struct import h5py import time import os class Database(): """Connection to an HDF5 database storing message and order book data. Parameters ---------- path : string Specifies location of the HDF5 file name...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('myapp', '0013_auto_20150731_0044'), ] operations = [ migrations.RemoveField( model_name='building', ...
from ...utilities import db, moocdb_utils from common import * def GetForums(vars): output_items = [] resource_type_id = moocdb_utils.GetResourceTypeMap(vars)['forum'] # course_doc = vars['resource_list'][0] # discussion_topics = course_doc['metadata']['discussion_topics'] # src_forums = [{'id...
##################################################################################### # # Copyright (c) Crossbar.io Technologies GmbH # # Unless a separate license agreement exists between you and Crossbar.io GmbH (e.g. # you have purchased a commercial license), the license terms below apply. # # Should you enter ...
#! usr/bin/env python """ Created on Wed May 11 16:56:23 2016 Builds the RobotNet. @author: shuang """ from __future__ import absolute_import from __future__ import print_function import tensorflow as tf import time #import numpy as np import os.path import Robot_data import Nets #-----------------------------------...
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: ts=4 sw=4 expandtab: """ 完成作业以后,运行本文件,它会将你的代码、实验报告一起打包为 submit.zip。 """ from __future__ import print_function # Requires Python 2.7+ import locale import os import re import sys import zipfile # Python3's input == Python2's raw_input try: ...
# -*- coding: utf-8 -*- import psycopg2 #Connection to database conn = psycopg2.connect("dbname=velovunchained user=velovunchained password=velovunchained") #Cursor used to navigate through the database cur = conn.cursor() #Reads the id of the last reservation action tested for the warning rules application last_act...
import argparse import sys from . import __version__ from . import bury from . import flush from . import generate from . import kick from . import list_tubes from . import migrate from . import pause from . import peek from . import purge_buried from . import replay from . import stats from . import stats_tubes CO...
from ipv8.keyvault.crypto import default_eccrypto from pony.orm import db_session from tribler_core.modules.metadata_store.store import MetadataStore from tribler_core.tests.tools.base_test import TriblerCoreTest from tribler_core.utilities.tracker_utils import MalformedTrackerURLException class TestTrackerState(Tr...
# Copyright (C) 2018 Collabora Limited # Author: Guillaume Tucker <guillaume.tucker@collabora.com> # # This module 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 (...
#!/usr/bin/env python3 # -*- coding: utf-8; Mode: Python; indent-tabs-mode: nil; tab-width: 4 -*- # vim: set fileencoding=utf-8 filetype=python syntax=python.doxygen fileformat=unix tabstop=4 expandtab : # kate: encoding utf-8; bom off; syntax python; indent-mode python; eol unix; replace-tabs off; indent-width 4; tab-...
# -*- coding: utf-8 -*- """ Created on Sun Jul 16 17:42:56 2017 @author: Alexander """ # Consumer Preferences for Sporting Events---Conjoint Analysis (Python) # prepare for Python version 3x features and functions from __future__ import division, print_function # import packages for analysis and modelin...
#!/usr/bin/python # clockwatcherd.py - Daemon to generate test notifs once a minute # # Copyright (c) 2015 Jim Fenton # # 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, i...
#!/usr/bin/env python # Time-stamp: <2010-09-08 02:38:38 Tao Liu> """Module Description Copyright (c) 2008 Tao Liu <taoliu@jimmy.harvard.edu> This code is free software; you can redistribute it and/or modify it under the terms of the BSD License (see the file COPYING included with the distribution). @status: exper...
# -*- coding: utf-8 -*- """ Library to extract information from a service. Also clear the page of service so that it is ready for next customer. """ __version__ = "1.0.1" __author__ = "Sorawee Porncharoenwase" import sys, difflib import preload import pwikipedia as pywikibot from lib import libwikitable, libinfo, re...
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Top-level presubmit script for Skia. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmi...
# Copyright 2020 The TensorFlow Quantum 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...
from networkx.algorithms.assortativity import * from networkx.algorithms.block import * from networkx.algorithms.boundary import * from networkx.algorithms.centrality import * from networkx.algorithms.cluster import * from networkx.algorithms.clique import * from networkx.algorithms.community import * from networkx.alg...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os extensions = os.listdir("../include/extensions") try: extensions.remove("extensions.h") except ValueError: pass output = open("../src/extensions/extensions.cpp", "w") output.write("""//Generated by update_extensions.py. Do not edit. Edit update_extensi...
# -*- coding: utf-8 -*- from django.template import RequestContext from django.shortcuts import render_to_response, redirect from django.views.decorators.csrf import ensure_csrf_cookie from django.contrib.auth.decorators import login_required from django.contrib.auth import authenticate, login, logout from django.cor...
# coding=utf-8 """Provides RecurrentEvent class.""" import json from tempo.timeutils import delta, floor, add_delta # pylint: disable=unused-import from tempo.unit import Unit, ORDER, MIN, MAX, BASE, UNITS_MAX class RecurrentEvent(object): """An interval of time expressed in some 'unit' of time (second, week...
"""Generating migration for a PRAW object Revision ID: 960085fce39c Revises: 4d46b88366fc Create Date: 2016-06-13 17:30:49.056215 """ # revision identifiers, used by Alembic. revision = '960085fce39c' down_revision = '4d46b88366fc' branch_labels = None depends_on = None from alembic import op import sqlalchemy as s...
''' Task Coach - Your friendly task manager Copyright (C) 2004-2013 Task Coach developers <developers@taskcoach.org> Task Coach 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 ...
#!/usr/bin/python2.4 # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # # $Id$ # # Copyright (C) 1999-2006 Keith Dart <keith@kdart.com> # # 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...
import asyncio import os import aiomysql from tests._testutils import BaseTest class AIOPyMySQLTestCase(BaseTest): @asyncio.coroutine def _connect_all(self): conn1 = yield from aiomysql.connect(loop=self.loop, host=self.host, port=self.port, user=self.user,...
__version__ = '0.5.0' __author__ = 'Michael Joseph' from .api.base import init, initialise, login from .api.server import ( list_servers, find_server, server_info, server_settings, create_and_start_server, create_server, set_server_parameters, start_server, stop_server, delete_server ) from .api.server_tem...
# Purpose: template class for file handler for the wvdutil.py program # Author: Jim Battle # # Version: 1.0, 2018/09/15, JTB # massive restructuring of the old wvdutil code base # Version: 1.1, 2021/06/19, JTB # get rid of bilingualism (aka python2 support); # convert to inline type hints instead of type h...
import fbchat def login(): username = input("Enter your id --> ") password = input("Enter your password --> ") try: client = fbchat.Client(username, password) except: print("id or password is wrong") login() menu(client) def menu(client): print("1.Messenger") print("2.Spammer") print("3.Log out") c...
#!/usr/bin/env python import os import sys import dotenv if __name__ == "__main__": if 'test' in sys.argv: os.environ.setdefault('TESTING', 'True') dotenv.read_dotenv() SETTINGS_FILE = os.environ.get('DJANGO_SETTINGS_MODULE', 'backoffice.settings.local') os.environ.setdefault("DJANGO_SETTINGS_...
import numpy as np def compute_likelihood_unnorm(data_struct,theta,obsModelType,Kz_inds,Kz,Ks): #function log_likelihood = # compute_likelihood_unnorm(data_struct,theta,obsModelType,Kz_inds,Kz,Ks) if obsModelType == 'Gaussian': invSigma = theta.invSigma mu = theta.mu dimu, T = (data_struct.obs).sh...
# Copyright 2016 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, division import io import logging import math import subprocess from . import plotter import os from django.conf import settings from django.db.models import Q logger = logging.getLogger(__name__) # pylint: disable=invalid-name ...
# -*- coding: utf-8 -*- #python library import matplotlib.pyplot as plt import numpy as np from numpy.random import * import sys from scipy import misc from PIL import Image, ImageDraw, ImageFont import shutil import os import random import time #chainer library import chainer import chainer.functions as F import ch...
""" Component that will help set the ffmpeg component. For more details about this component, please refer to the documentation at https://home-assistant.io/components/ffmpeg/ """ import asyncio import logging import os import voluptuous as vol from homeassistant.core import callback from homeassistant.const import ...
import os import dj_database_url BASE_DIR = os.path.dirname(os.path.dirname(__file__)) DEBUG = not os.environ.get('PRODUCTION') ALLOWED_HOSTS = [ 'tamlynscore.co.uk', 'www.tamlynscore.co.uk', '127.0.0.1', 'localhost', '192.168.1.101', '192.168.1.100', ] ADMINS = ( ('Marc Tamlyn', 'marc....
#!/usr/bin/env python # Copyright (c) 2017,2018, F5 Networks, 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 app...
import random class Forest: def __init__(self): self.money = 100 # just for fun (debug) self.tree_age = 0 def wait_one_more_year(self): if random.randint(0, 20) is 2: self.tree_age = 0 self.money -= 50 return -50 else: ...
# -*- coding: utf-8 -*- # Copyright (c) 2015, ESS LLP and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest from frappe.utils import nowdate, add_days from erpnext.healthcare.doctype.patient_appointment.test_patient_appointment import create_healthcare_docs, create_ap...
# -*- coding: utf-8 -*- # Author : https://github.com/kmlee408 # https://github.com/jeonghoonkang ''' 부산 URL= http://openapi.airkorea.or.kr/openapi/services/rest/ArpltnInforInqireSvc/getCtprvnRltmMesureDnsty?serviceKey=fCRWi0DoCfoCPMHyDwai3trva10y4qb8mh9aysoHzvLKDWw6Q2bWOsvuM4%2BsRdvE4dPiKqBFD7vj7%2F...
# 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, ...
# Copyright 2016, Ray1235 # CoDMayaTools 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 hope t...
from lsystem.LSystem import LSystem import math class Tree7(LSystem): """Fractale en forme d'arbre v7""" def defineParams(self): self.LSName = "Tree7" self.LSAngle = math.pi / 4 self.LSSegment = 100 self.LSSteps = 9 self.LSStartingString = "T(x)" self.LSStochastic = False self.LSStochRange = 0.2 de...
import os import unittest from flask import current_app from flask import url_for from app.core import create_app from app.models import db from flask_sqlalchemy import SQLAlchemy from app.main.models import TermStatus, Document, DocumentType, Term, Category, Person, Link, Location, Table, Column, Rule from app.conf...
# ----------------------------------------------------------------------------- # Copyright (c) 2016+ Buro Petr van Blokland + Claudia Mens & Font Bureau # www.pagebot.io # # P A G E B O T # # Licensed under MIT conditions # Made for usage in DrawBot, www.drawbot.com # ------------------------------...
# Copyright (c) 2014 Thales Services SAS # 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 r...
import datetime import mimetypes import os import pickle from typing import Any, List, Optional import click import requests from requests.auth import AuthBase, HTTPBasicAuth from requests.compat import urljoin from goji.models import Attachment, Comment, Issue, Sprint, Transition, User class JIRAException(click.Cl...
# encoding: UTF-8 """ 缠论模块相关的GUI控制组件 """ from vtGateway import VtSubscribeReq from uiBasicWidget import QtGui, QtCore, BasicCell,BasicMonitor,TradingWidget from eventEngine import * from ctaBase import * import pyqtgraph as pg import numpy as np import pymongo from pymongo.errors import * from datetime import datetime...
#!/usr/bin/env python -u import sys from argparse import ArgumentParser import time import json import yaml import os try: import boto.ec2 import boto.sqs from boto.vpc import VPCConnection from boto.exception import NoAuthHandlerFound, EC2ResponseError from boto.sqs.message import RawMessage except...
""" >>> joe = Customer('John Doe', 0) >>> ann = Customer('Ann Smith', 1100) >>> cart = [LineItem('banana', 3, .5), ... LineItem('apple', 10, 1.5), ... LineItem('watermellon', 5, 5.0)] >>> Order(joe, cart, fidelity_promo) <Order total: 41.50 due: 41.50> >>> Order(ann, car...
import webiopi import datetime import sqlite3 import subprocess import sys GPIO = webiopi.GPIO AUTO = 1 SCRIPT_PATH = "/home/pi/HydroP/python/" LIGHT1 = 17 # GPIO pin using BCM numbering dbconn = sqlite3.connect(SCRIPT_PATH + "hydro.db") dbconn.row_factory = sqlite3.Row dbcursor = dbconn.cursor() # setup function i...
import psycopg2 import psycopg2.extras import sys #usage $from_date_iso8601 $to_date_iso8601 $OPERATORS def writeout(f, cur): while True: out = cur.fetchone() if out is None: break f.write(','.join(out) + '\r\n') conn = psycopg2.connect("dbname='ridprod'") conn.set_client_enc...
# -*- Mode: python; coding: utf-8; tab-width: 8; indent-tabs-mode: t; -*- """ Scraper for http://lyrics.alsong.co.kr/ edge """ import sys import socket import hashlib import urllib2 import xml.dom.minidom as xml from utilities import * from audiofile import AudioFile __title__ = "Alsong" __priority__ = '115' __lrc_...
# # QtHelp.py -- customized Qt widgets and convenience functions # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import glob import os import math import ginga.toolkit from ginga.util import iohelper configured = False toolkit = ginga.toolkit.toolkit #...
# -*- coding: utf-8 -*- from nose import SkipTest from nose.tools import * import networkx as nx from networkx.algorithms.bipartite import spectral_bipartivity as sb # Examples from Figure 1 # E. Estrada and J. A. Rodríguez-Velázquez, "Spectral measures of # bipartivity in complex networks", PhysRev E 72, 0461...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
# -*- coding: utf-8 -*- """ Decorators module """ import logging from docktors.core import decorated from docktors.wdocker import DockerContainer logger = logging.getLogger(__name__) def docker(func=None, **kwargs): """ Decorator to startup and shutdown a docker container. :param image: The name of the ...
""" Basic building blocks for generic class based views. We don't bind behaviour to http method handlers yet, which allows mixin classes to be composed in interesting ways. """ from __future__ import unicode_literals from django.core.exceptions import ValidationError from django.http import Http404 from res...
from common.diagrams import Diagram from common.definitions import ARRESTIN_SEGMENTS from residue.models import Residue from residue.models import ResidueGenericNumber from residue.models import ResidueNumberingScheme from django.utils.safestring import mark_safe from math import cos, sin, pi, floor, sqrt from datet...
#!/usr/bin/env python ''' Run this script inside of src/ and it will look for all the files that were changed this year that still have the last year in the copyright headers, and it will fix the headers on that file using a perl regex one liner. For example: if it finds something like this and we're in 2014 // Copyr...
# -*- coding: utf-8 -*- """ @author: Patrick Alves """ # Arquivo com os parâmetros de projeção arquivo_parametros = "parametros.txt" def obter_parametros(): # Dicionário que armazena os parâmetros parametros = {} with open(arquivo_parametros, 'r' ,encoding='utf-8') as arquivo: for linha in ar...
# -*- coding: utf-8 -*- # Copyright (c) 2011 CommOnEcoute http://commonecoute.com # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation. # # This program is distributed in the hope that it...
"""Common tests shared by test_string and test_userstring""" import string from test_support import verify, verbose, TestFailed, have_unicode transtable = '\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 !"#$%&\'()*+,-./0123456789:;...
# -*- coding: utf-8 -*- # Copyright 2018 Objectif Libre # # 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 ...
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-01-29 06:59 from __future__ import unicode_literals import django.contrib.auth.models import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] ...
# -*- coding: utf-8 -*- # # cs-stats documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have ...
# -*- coding: utf-8 -*- """ requests.structures ~~~~~~~~~~~~~~~~~~~ Data structures that power Requests. """ import collections import time from .compat import OrderedDict current_time = getattr(time, 'monotonic', time.time) class CaseInsensitiveDict(collections.MutableMapping): """A case-i...
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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 ...
#!/usr/bin/env python3 """ Usage: poetry run test_parser FR production """ import time import sys import pprint import datetime import logging import arrow import click from electricitymap.contrib.parsers.lib.parsers import PARSER_KEY_TO_DICT from parsers.lib.quality import ( validate_consumption, validate_p...
#!/usr/bin/env python from abc import ABCMeta, abstractmethod from google.appengine.ext import ndb from google.appengine.ext import db from event_guest import EventGuest class IEventGuestRepository: __metaclass__ = ABCMeta @abstractmethod def create(self, guestFirstName, guestLastName, gu...
import unittest import requests import json import random import string class TestMarcaRest(unittest.TestCase): def setUp(self): self.domain = 'mi.co' self.URL = 'http://localhost:5000/' self.test = 'test@' + self.domain self.password = '1234Abcd' self.admon = 'admon@' + s...
import logging import sys def get_dev_logger(name='dev.radosgw_agent'): """ A simple utility to be able to log things that are meant for developer-eyes and not for user facing. All developer logs must be prepended with `dev` so this utility ensures that is the case. To use it:: dev_log =...
from core.himesis import Himesis class HeattributeOUTeGenericTypeSolveRefEAttributeEGenericTypeEAttributeEGenericType(Himesis): def __init__(self): """ Creates the himesis graph representing the AToM3 model HeattributeOUTeGenericTypeSolveRefEAttributeEGenericTypeEAttributeEGenericType. ""...
#!/usr/bin/python import sys, re class Color(object): def __init__(self, inp, alpha=1): self.alpha = alpha if type(inp) is str: if re.match(r'^#\d{3}$', inp): inp = '#' + inp[1] * 2 + inp[2] * 2 + inp[3] * 2 if re.match(r'^#\d{6}$', inp): se...
from . import cgcrandom # TODO use cpu factory from ..native.cpu.x86 import I386Cpu from ..native.cpu.abstractcpu import Interruption, ConcretizeRegister, ConcretizeArgument from ..native.memory import SMemory32, Memory32 from ..core.smtlib import * from ..core.state import TerminateState from ..binary import CGCElf f...
# Maked by Mr. Have fun! Version 0.2 # Shadow Weapon Coupons contributed by BiTi for the Official L2J Datapack Project # Visit http://forum.l2jdp.com for more details import sys from com.l2scoria.gameserver.model.quest import State from com.l2scoria.gameserver.model.quest import QuestState from com.l2scoria.gameserver....
# LOFAR IMAGING PIPELINE # # setupsourcedb nodes recipe # Marcel Loose, 2012 # loose@astr...
# driver.py # # Author: R. Booth # Date: 17 - Nov - 2016 # # Combined model for dust, gas and chemical evolution ################################################################################ from __future__ import print_function import numpy as np import os from .photoevaporation import FixedExternalEvaporation from...
from __future__ import print_function, division from sympy import * def textplot(expr, a, b, W=55, H=18): """ Print a crude ASCII art plot of the SymPy expression 'expr' (which should contain a single symbol, e.g. x or something else) over the interval [a, b]. Examples ======== textplot...
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 im...
# Copyright (C) 2010-2014 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library ...
# -*- coding: utf-8 -*- # # This file is part of REANA. # Copyright (C) 2017 CERN. # # REANA 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 # ver...
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Ocena.datum_vnosa' db.add_column('infosys_ocena', 'datum_vnosa', self.gf('django.db.model...
# -*- coding: utf-8 -*- import os import xbmc import xbmcaddon ADDON = xbmcaddon.Addon(id='script.suitability') ADDON_ID = ADDON.getAddonInfo('id') # Common logging module def log(txt, loglevel=xbmc.LOGDEBUG): if (ADDON.getSetting("logEnabled") == "true") or (loglevel != xbmc.LOGDEBUG): if isinstance(txt...
# bootloader.py # Anaconda's bootloader configuration module. # # Copyright (C) 2011 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later versi...
#!/usr/bin/env python """Twitter Bot for posting craigslist postings of Free Stuff Currently set up for New York. Example usage: python tweetstuffs.py Attributes: - NO_IMAGE -- link for when there is no image found - FILE -- path to tmp file - PATH -- current directory - C_KEY, C_SECRET, A_TOKEN,...
#!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # # FreeType high-level python API - Copyright 2011 Nicolas P. Rougier # Distributed under the terms of the new BSD license. # # ---------------------------------------------------------------...