src
stringlengths
721
1.04M
from collections import OrderedDict import logging from django.core.paginator import EmptyPage from django.http import Http404 from django.utils.translation import get_language from django.shortcuts import get_list_or_404 from django.db.models import Q from django.utils import timezone from rest_framework.parsers imp...
# Copyright 2012 Josh Durgin # Copyright 2013 Canonical Ltd. # 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/LICENS...
# 见unsolved 找规律 N = 1000 FS = (15499,94744) dstRadio = FS[0]/FS[1] p = [0 for i in range(0, N+10)] def init(): p[1] = 1 for i in range(2, N+1): if p[i] == 0: j = i*i while j <= N: p[j] = i j += i def rc(val, arr, idx, der, pn): if idx == len...
import os from django.test import TransactionTestCase from django.db import IntegrityError from django.contrib.auth.models import Group from django.core.exceptions import ValidationError from rest_framework.exceptions import ValidationError as DRF_ValidationError from hs_core.testing import MockIRODSTestCaseMixin fr...
# coding: utf-8 """ ORCID Member No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: Latest Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six fr...
from __future__ import with_statement from fudge import Fake, patched_context, with_fakes import unittest from nose.tools import raises, ok_ import random import sys import fabric from fabric.tasks import WrappedCallableTask, execute, Task, get_task_details from fabric.main import display_command from fabric.api impo...
"""Circular Restricted 3-Body Problem (CR3BP) Includes the computation of Lagrange points """ import numpy as np from astropy import units as u from scipy.optimize import brentq from poliastro.util import norm @u.quantity_input(r12=u.km, m1=u.kg, m2=u.kg) def lagrange_points(r12, m1, m2): """Computes th...
"""lesson6/solution_return.py Contains solutions for functions that return values. """ # Exercise 6: Write a function my_name that returns your name. Remember # to test your function by calling it and print the result. # print(my_name()) -> "Vinay Mayar" def my_name(): return "Vinay Mayar" print(my_name()) ...
"""Period deltas""" import datetime from collections import OrderedDict from geopandas import read_postgis import numpy as np from pyiem.plot import MapPlot, centered_bins, get_cmap from pyiem.util import get_autoplot_context, get_dbconn from pyiem.exceptions import NoDataFound PDICT = { "state": "State Level Map...
#!/usr/bin/env python # # @file ExtensionFiles.py # @brief class for generating the plugin files # @author Frank Bergmann # @author Sarah Keating # # <!-------------------------------------------------------------------------- # # Copyright (c) 2013-2018 by the California Institute of Technology # (California, U...
from kivy.graphics import Color, Rectangle from kivy.uix.boxlayout import BoxLayout from kivy.uix.label import Label from kivy.uix.widget import Widget class ReportCell(BoxLayout): def __init__(self, **kw): super(ReportCell, self).__init__(**kw) self.data = kw['data'] with self.canvas...
import datetime from typing import Text from django.db import models import zerver.models def get_remote_server_by_uuid(uuid: Text) -> 'RemoteZulipServer': return RemoteZulipServer.objects.get(uuid=uuid) class RemoteZulipServer(models.Model): uuid = models.CharField(max_length=36, unique=True) # type: Text...
#!/usr/bin/env python2 import os import sys import redis import tornado.httpserver import tornado.ioloop import tornado.web import psycopg2 import momoko import shapy.editor import shapy.user import shapy.assets import shapy.permissions import shapy.public class IndexHandler(tornado.web.StaticFileHandler): def...
#!/usr/bin/env python import unittest import python_jsonschema_objects as pjs class TestPersonGenerator(unittest.TestCase): def test_simple_person(self): schema = { 'definitions': { 'Person': { 'type': 'object', 'additionalProperties': Fa...
"""Top 10 largest, smallest""" import datetime try: from zoneinfo import ZoneInfo except ImportError: from backports.zoneinfo import ZoneInfo from pandas.io.sql import read_sql from matplotlib.font_manager import FontProperties from pyiem.util import get_autoplot_context, get_dbconn from pyiem.plot import fig...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 IBM Corp. # # 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 # # ...
import os __author__ = "David Rusk <drusk@uvic.ca>" from astropy.io import fits import io from ossos.gui import logger from .. import storage import sys class Downloader(object): """ Downloads data from VOSpace. """ def download_hdulist(self, uri, **kwargs): """ Downloads a FITS ima...
import vtk import math import numpy as np from core.settings import Settings class UPoint: def __init__(self, p, dist_to_closest_point): self.p = p self.dist_to_closest_point = dist_to_closest_point def compute_energy(self): diff = self.dist_to_closest_point - Settings.inter_neuron_distance if...
"""Generic base class for cli hammer commands.""" import logging import re from wait_for import wait_for from robottelo import ssh from robottelo.cli import hammer from robottelo.config import settings class CLIError(Exception): """Indicates that a CLI command could not be run.""" class CLIBaseError(Exception...
#!/usr/bin/env python # Copyright (C) 2012 Andrea Valle # # This file is part of swgit. # # swgit 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 lat...
# encoding: utf-8 import os import logging import json from dateutil.relativedelta import relativedelta from django.core.urlresolvers import reverse from django.db import IntegrityError from django.http import HttpResponse, HttpResponseRedirect, Http404, \ HttpResponseBadRequest from django.shortcuts import render...
# coding: utf-8 """ Wavefront REST API <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ...
# -*- coding: utf-8 -*- import configparser def config_file_exists(filename): config = configparser.ConfigParser() try: with open(filename) as f: config.read(f) f.close() except IOError: raise def validate_ini_file(filename, sections): try: config_fil...
# -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # (C) British Crown Copyright 2012-5 Met Office. # # This file is part of Rose, a framework for meteorological suites. # # Rose is free software: you can redistribute it and/or modify # it under the terms of the GNU G...
from __future__ import print_function from __future__ import absolute_import from __future__ import division from math import pi from compas.utilities import pairwise from compas.geometry import angle_vectors from compas.geometry import is_ccw_xy __all__ = [ 'network_find_cycles', ] PI2 = 2.0 * pi def netwo...
# -*- coding: utf-8 -*- from __future__ import unicode_literals class BaseCartModifier(object): """ Cart Modifiers are the cart's counterpart to backends. It allows to implement taxes and rebates / bulk prices in an elegant and reusable manner: Every time the cart is refreshed (via it's update() meth...
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim:ts=2:sw=2:expandtab # # Copyright (c) 2010-2011, Nik Cubrilovic. All rights reserved. # # <nikcub@gmail.com> <http://nikcub.appspot.com> # # Licensed under a BSD license. You may obtain a copy of the License at # # http://nikcub.appspot.com/bsd-license # """ S...
#-*- coding:utf-8 -*- import hashlib, os, sys, tempfile, time from ctp.futures import ApiStruct, TraderApi class MyTraderApi(TraderApi): def __init__(self, brokerID, userID, password, instIDs): print 'into __init__' self.requestID = 0 self.brokerID = brokerID self.userID = userID ...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' @author: Travis A. Ebesu @created: 2015-02-22 @summary: ''' # pylint: disable=all class Node(object): def __init__(self, key): self.key = key self.left = None self.right = None self.parent = None def __str__(self): re...
# -*- coding: utf-8 -*- # Copyright 2019 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """An implementation of the ReplicationConfig proto interface.""" from __future__ import print_function import json import os im...
# -*- coding: utf-8 -*- """This module contains REST API specific tests.""" import fauxfactory import pytest from cfme import Credential from cfme.configure.access_control import User, Group from cfme.login import login from cfme.rest import vm as _vm from utils.providers import setup_a_provider as _setup_a_provider f...
import os import logging from pegasus.models import TargetPlatform, Architecture, ProductType from pegasus.targets.macosx_common import ( process_params_for_driver, link_product_dependency, get_full_product_name, get_full_product_path, get_full_symbols_path, get_product_install_name, check_source_compiles, ch...
######### # Copyright (c) 2015 GigaSpaces Technologies Ltd. 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...
""" Module to help load python modules from packages """ import logging import os import importlib LOGGER = logging.getLogger(__name__) MODULE_TYPES = ('conditions', 'nodes') CLASS_NAME_CONSTS = ('NODE_CLASS_NAME', 'CONDITION_CLASS_NAME') def load_package_modules(local_directory): """ Loads all modules for ...
# # Copyright 2013 Geodelic # # 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 ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # bonsai documentation build configuration file, created by # sphinx-quickstart on Sat Jan 18 21:30:25 2014. # # 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 # aut...
import sqlite3 class Database: configArray = {} def __init__(self): self.connect() self.checkAndCreateTables() # self.getConfig() def connect(self): self.db = sqlite3.connect('accounts.db') def checkAndCreateTables(self): self.connect() c = self.db.cu...
import os import json from glob import glob class Theme (object): def __init__(self, j = None): self.__backgroundColour = '' self.__tintColour = '' self.__toolbarBackgroundColour = '' self.__invertWebView = False self.__themeName = '' self.__textColour = '' self.__subTextColour = '' self.__settingsCe...
""" All function in this module take and return :class:`bytes` """ import sys from os import urandom as random_bytes from struct import pack from base64 import b64decode from Cryptodome.Hash import MD5, SHA1, HMAC from Cryptodome.PublicKey.RSA import import_key as rsa_import_key, construct as rsa_construct from Crypto...
# This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2019 DataONE # # Licensed under the Apache License, Version 2.0 (the "License"); # you ma...
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2013) # # This file is part of GWSumm. # # GWSumm 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) ...
""" Django settings for lbzproject project. Generated by 'django-admin startproject' using Django 1.11. 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/ """ import o...
__author__ = 'Arpit' import unittest import json from Airline.src.Graph import Graph from Airline.src.UIConsole import UIConsole class Test_graph(unittest.TestCase): #This function is run before every test case is executed #def setUp(self): #The parser function def parse_file(self, json_file): ...
# -*- coding: cp1253 -*- from tkinter import * from time import sleep def create(w, x1, y1): w.place(x=x1, y=y1) def erase(w): w.destroy() def reset(w): w.destroy() start() def exit(w): w.destroy() def e_q1(root, counter, step): TL = Toplevel() w, h = TL.winfo_screenwidth(), TL.winf...
"""This file contains code for use with "Think Bayes", by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function, division import thinkbayes2 class Cookie(thinkbayes2.Suite): """A map fro...
import itertools import math import functools import time import random import copy def timer(func): def with_time(*args, **kwargs): t = time.time() res = func(*args, **kwargs) print("{} took {} sec".format(func.__name__, time.time() - t)) return res return with_time def read()...
#!/usr/bin/env python # -*- coding:utf-8 -*- # # The route helpers were originally written by # # Jeremy Kelley (http://github.com/nod). import tornado.web class Route(object): """ decorates RequestHandlers and builds up a list of routables handlers Tech Notes (or 'What the *@# is really happening here...
from Resizer import Resizer class ConsistentHashing(Resizer): """Implement a consistent hashing ring. Part of 'Functional Core' - methods of this class don't change any state or objects, all they do is take values and return values. E.g. add_node will take new node and all existing nodes and return ...
'''This program finds to pallindrome in a string by taking each character as a center of pallindrome. From center it probes in both direction this pallindrome exists. A pallindrome might exists in space between two characters e.g, "bb" ''' def palindrome(string): '''test cases >>> palindrome("") >>> ...
# coding: utf-8 from flask import abort from sqlalchemy.orm.exc import NoResultFound from sqlalchemy.orm.query import Query from .. import db from ..logic.event_logic import create_project_event from ..logic.project_logic import ProjectLogic from ..models import Project, User, LinkedCopr def check_link_exists(proj...
""" """ from django.test import TestCase from django.test.utils import override_settings from mock import patch from notifier.user import get_digest_subscribers, DIGEST_NOTIFICATION_PREFERENCE_KEY from notifier.user import get_moderators from .utils import make_mock_json_response TEST_API_KEY = 'ZXY123!@#$%' # som...
# -*- coding: utf-8 -*- # Third party stuff from django.shortcuts import render, get_object_or_404 from django.views.generic import ListView, DetailView from django.views.generic.base import TemplateView # Our stuff from .models import Product, Subcategory, Category class CategoryListView(ListView): """ Browse a...
''' Module db_context_manager.py Connect to sqlite database and perform crud functions ''' import sqlite3 import os PATH = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) print(PATH) def grup(txtv): ''' Trasforms a string to uppercase special for Greek comparison ''' ar1 = u"αάΆΑβγδεέΈζ...
from __future__ import unicode_literals from django.core.exceptions import ObjectDoesNotExist from django.http import Http404 from django.shortcuts import render, redirect, get_object_or_404 from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.models im...
from __future__ import print_function, unicode_literals import sqlite3 import os import tempfile from faker import Factory import pytest import sqlitefts as fts from sqlitefts import fts5 igo = pytest.importorskip('igo') fake = Factory.create('ja_JP') class IgoTokenizer(fts.Tokenizer): def __init__(self, path=N...
#!/usr/bin/python # # linearize-hashes.py: List blocks in a linear, no-fork version of the chain. # # Copyright (c) 2013-2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from __future__ import pr...
from __future__ import unicode_literals import datetime from decimal import Decimal from django.db import models from django.core.paginator import Paginator from django.test import TestCase from django.utils import unittest from rest_framework import generics, status, pagination, filters, serializers from rest_framewor...
from celery import task, chord from .scan import scanners, heavy_scanners from .search import search_engines from .source import sources from datetime import datetime from dateutil.tz import tzutc from models import TopicSet # validator = jsonschema.Draft3Validator(json.loads(pkgutil.get_data("malware_cr...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010-2013 Zuza Software Foundation # Copyright 2013-2014 Evernote Corporation # # This file is part of Pootle. # # 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...
import unittest import pinq class queryable_first_tests(unittest.TestCase): def setUp(self): self.queryable0 = pinq.as_queryable([]) self.queryable1 = pinq.as_queryable(range(1)) self.queryable2 = pinq.as_queryable(range(1, 11)) def test_first_only_element(self): self.assertE...
# -*- coding: utf-8 -*- # # RM-Synthesis documentation build configuration file, created by # sphinx-quickstart on Mon Jan 30 10:43:10 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. # ...
import logging import traceback import itertools from django.db import models, IntegrityError, transaction from django.db.models import Q from django.dispatch import receiver from django.core.exceptions import ObjectDoesNotExist from constance import config from rest_client import get_salt_client from roll_engine.co...
from django.conf import settings from typing import Any, Dict, Optional from zerver.lib.utils import generate_random_token import re import redis import ujson # Redis accepts keys up to 512MB in size, but there's no reason for us to use such size, # so we want to stay limited to 1024 characters. MAX_KEY_LENGTH = 1024...
from sysdata.csv.csv_futures_contract_prices import ConfigCsvFuturesPrices import os from syscore.fileutils import files_with_extension_in_pathname from syscore.dateutils import month_from_contract_letter from sysinit.futures.contract_prices_from_csv_to_arctic import init_arctic_with_csv_futures_contract_prices def ...
# This file is part of Boomer Core. # # Boomer Core 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. # # Boomer Core is distributed in t...
#! /usr/bin/env python ## {{{ http://code.activestate.com/recipes/496795/ (r5) """ A Python replacement for java.util.Properties class This is modelled as closely as possible to the Java original. Created - Anand B Pillai <abpillai@gmail.com> """ import sys,os import re import time class IllegalArgumentExceptio...
#!/usr/bin/env python """ Senty Project Copyright(c) 2017 Senty. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License, version 2, as published by the Free Software Foundation. This program is distributed in the hope it will be useful...
# -*- coding: utf-8 -*- import json import os import re import sys import base64 import hashlib import contoml import delegator import pipfile import toml from .utils import ( mkdir_p, convert_deps_from_pip, pep423_name, recase_file, find_requirements, is_file, is_vcs, python_version, cleanup_toml, is_ins...
import logging import os import datetime import string import random class Logger(): """ Creates a beautifully crafted logger object to use with fennec. """ def __init__(self, root_path): self.logger = logging.getLogger('fennec') self.logger.setLevel(logging.DEBUG) trace_id = ''.join(random.choice(string.as...
# Copyright 2019 Intel Corporation. import logging import os import platform import sys import threading import pkg_resources from plaidml2._ffi import ffi logger = logging.getLogger(__name__) _TLS = threading.local() _TLS.err = ffi.new('plaidml_error*') _LIBNAME = 'plaidml2' if os.getenv('PLAIDML_MLIR') == '1': ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # toolbars.py por: # Cristian García <cristian99garcia@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the Li...
# Copyright (c) 2011-2014 Kyle Gorman and Michael Wagner # # 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, copy, modify,...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2017--2018 Amazon.com, Inc. or its affiliates. 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. A copy of the License # is located at # # http://aws....
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010, 2degrees Limited <egoddard@tech.2degreesnetwork.com>. # All Rights Reserved. # # This file is part of djangoaudit <https://launchpad.net/django-audit/>, # which is subject to the provisions of ...
from flask import jsonify, request, g, url_for, current_app from .. import db from ..models import Post, Permission, Comment from . import api from .decorators import permission_required @api.route('/comments/') def get_comments(): page = request.args.get('page', 1, type=int) pagination = Comment.qu...
############################################################################## # # Copyright (c) 2006 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SO...
from bs4 import BeautifulSoup import urllib from requests import get def speakers(url, year): url = url year = year soup = BeautifulSoup(get(url).content) cards = soup.find_all(attrs={"class": "portfolio-it"}) d = {} for card in cards: # byline_url = card.a['href'] d.update({card.find('h4').string:card.a.img...
# 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. """ Stops people spectating then quickly joining the 'free' team. This ...
from unittest import mock from django.utils import timezone from django.core.exceptions import ValidationError import pytest from stripe.error import InvalidRequestError from restframework_stripe import models from restframework_stripe.test import get_mock_resource @mock.patch("stripe.Coupon.create") @pytest.mark....
# -*- coding: utf-8 -*- # Copyright 2014 OpenMarket Ltd # # 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 la...
# -*- coding: utf8 -*- import logging from os import listdir from os.path import exists, isfile, join import yaml from .helpers import detect_test_runners logger = logging.getLogger(__name__) def build_tasks(directory): try: files = [f for f in listdir(directory) if isfile(join(directory, f))] exce...
# -*- coding: utf-8 -*- from matriz import * import random #----------Auxiliares---------- def num(x): """Converte x para um número. Tenta pra int, se não der, float""" try: return int(x) except ValueError: return float(x) #------------------------------ def identidade(ordem=1): """Cria e retorna uma matriz ...
# python imports from datetime import datetime from datetime import timedelta # django imports from django.contrib.auth.decorators import permission_required from django.core.paginator import Paginator from django.http import HttpResponse from django.shortcuts import render_to_response from django.template.loader impo...
# -*- coding: utf-8 -*- # Generated by Django 1.9.11 on 2017-01-25 22:30 from __future__ import unicode_literals import re from django.db import migrations def update_perms_and_locks(apps, schema_editor): # update all permissions Tag = apps.get_model('typeclasses', 'Tag') perm_map = {"guests": "guest", ...
# # pdf2txt.py from the FOSS python PDFMiner package # http://euske.github.io/pdfminer/index.html#pdf2txt # Extract text from PDF to text files # # Has to be run separately with python2.X (not compatible with python3.X) # import sys from pdfminer.pdfdocument import PDFDocument from pdfminer.pdfparser import PDFParser ...
# Copyright 2012-2013 Hewlett-Packard Development Company, L.P. # 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/LICE...
# This file is part of pybliographer # # Copyright (C) 1998-2004 Frederic GOBRY # Email : gobry@pybliographer.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 2 # of t...
import os import re import datetime import string import json from fabric.contrib.project import rsync_project from fabric.contrib.files import upload_template from fabric.api import local, run, sudo from fabric.state import env from fabric.context_managers import cd dev_conf = json.load(open('dev_conf.json')) env.ho...
from abc import ABCMeta, abstractmethod class IServiceFactory(object): __metaclass__ = ABCMeta @abstractmethod def create_service(self): """ :rtype: L{pyligaforex.services.gateways.interfaces.IService} """ class IService(object): __metaclass__ = ABCMeta @abstractmet...
# # 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, software # ...
# coding=utf-8 # Copyright 2021 The Tensor2Robot Authors. # # 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 ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import multiselectfield.db.fields class Migration(migrations.Migration): dependencies = [ ('branch', '0001_initial'), ] operations = [ migrations.AddField( model_name='jo...
'''Copyright Gigaspaces, 2017, All Rights Reserved''' import json import re from cloudify.exceptions import NonRecoverableError, RecoverableError import requests CITY_NAME_REGEX = (r'^([a-z]+\,\s?[a-z]{2})$', re.IGNORECASE) def get_wind_speed(ctx, city_name): ''' Gets wind speed from an external service ...
# -*- coding: utf-8 -*- import codecs import getpass import json import os import requests import shutil from clint.textui import colored, puts from cssmin import cssmin from flask import g, Blueprint from jinja2 import Markup from slimit import minify from smartypants import smartypants from tarbell.hooks import regi...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # ezhost documentation build configuration file, created by # sphinx-quickstart on Wed May 25 11:10:25 2016. # # 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 # aut...
#!/usr/bin/env python # ********************************************************************* # * Copyright (C) 2014 Luca Baldini (luca.baldini@pi.infn.it) * # * * # * For the license terms see the file LICENSE, distributed * # * along ...
from django.shortcuts import render from django.template import RequestContext from django.views.generic import View from django.http import HttpResponse from customers import models as m import sys, json from datetime import datetime,timedelta class Save_Card_Preferences(View): try: def __init__(self): ...
# 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 model 'Event' db.create_table('events_event', ( ('id', self.gf('django.db.models.fiel...
# -*- coding: utf-8 -*- from __future__ import absolute_import from .primitive import Primitive, PrimitiveVisual from .symbol import Symbol from .axis import axis_visual from .box import Box, BoxVisual from .diagrams import (CIE_1931_chromaticity_diagram, CIE_1960_UCS_chromaticity_diagram, ...
#################################################################### # First step in the order process - capture all the demographic info ##################################################################### import logging from django import http from django.core import urlresolvers from django.shortcuts import render...