text
stringlengths
17
737k
# This file is part of rhizi, a collaborative knowledge graph editor. # Copyright (C) 2014-2015 Rhizi # # 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...
####### ALL TESTS HERE PROVIDE INPUTS PROPERLY ########### import unittest import sys import numpy as np from Bio import Seq from Bio.Alphabet import generic_dna SRC_CODE = "../src/" # Path to source code. sys.path.append(SRC_CODE) from matrixBuilder import * from misc import Model class matrixBuilder_baseClass_tes...
__author__ = 'Richard W. Lincoln, r.w.lincoln@gmail.com' import os import sys import logging import webbrowser from Tkinter import * from tkFileDialog import askopenfilename, asksaveasfilename import tkSimpleDialog from pylon import \ Network, DCPF, NewtonRaphson, FastDecoupled, DCOPF, ACOPF, UDOPF from pylon.r...
#!/usr/bin/env python import dbus import dbus.service if getattr(dbus, 'version', (0,0,0)) >= (0,41,0): import dbus.glib import gobject import time from telepathy import * class Channel(dbus.service.Object): """ All communication in the Telepathy framework is carried out via channel objects which are ...
from __future__ import unicode_literals from django.db import models class Game(models.Model): access_key = models.CharField(db_index=True, unique=True, max_length=6) GAME_PHASE_LOBBY = 0 GAME_PHASE_ROLE = 1 GAME_PHASE_PICK = 2 GAME_PHASE_VOTING = 3 GAME_PHASE_MISSION = 4 GAME_PHASE_ASSASS...
#! /usr/bin/env python # vi:ts=4:et # $Id$ import sys, os, urllib, cStringIO, threading, Queue, time from gtk import * from gnome.ui import * from gtkhtml import * import pycurl # We should ignore SIGPIPE when using pycurl.NOSIGNAL - see the libcurl # documentation `libcurl-the-guide' for more info. import signal sig...
#!/usr/bin/python # # Copyright (c) rPath, Inc. # # 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 di...
#!/usr/bin/python import os import socket def getUptime(): # second number is amount of time system has been idle since reboot. return float(open('/proc/uptime').read().strip().split()[0]) def getLoadAverage(): # The fourth number is the number of running processes / total number of # processes. ...
import discord from discord.ext import commands import sys import textwrap from typing import Optional # import unicodedata import urllib import dateutil import isodate import unicodedata2 as unicodedata from modules import utilities from utilities import checks sys.path.insert(0, "..") from units.time import dura...
import json from django.http import HttpResponse, HttpResponseBadRequest from django.views.decorators.http import require_POST, require_GET from django.template.response import TemplateResponse from django.core.urlresolvers import reverse from django.template import Template, Context, loader, TemplateDoesNotExist fro...
# Copyright (c) 2014, Salesforce.com, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # - Redistributions of source code must retain the above copyright # notice, this list of conditions...
""" The MIT License (MIT) Copyright (c) 2016 Christian August Reksten-Monsen 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 t...
""" The RPyC protocol """ import sys import weakref import itertools import socket import time import gc from threading import Lock, RLock, Event from rpyc.lib.compat import pickle, next, is_py3k, maxint, select_error from rpyc.lib.colls import WeakValueDict, RefCountingColl from rpyc.core import consts, brine, vinega...
# -*- coding: utf-8 -*- """ Sphinx rst2pdf builder extension ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Usage: 1. Copy this file to your Sphinx project directory. 2. In conf.py file uncomment this line: #sys.path.append(os.path.abspath('.')) 3. In conf.py add 'pdfbuilder' element to ...
import networkx as nx from itertools import combinations class MaxCliquesPercolation: def __init__(self, g, k): self.g = g self.k = k def get_maxcliques_percolation(self): # Source: https://gist.github.com/conradlee/1341933 percolation_graph = nx.Graph() cliques = list...
import sys import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import time # Import the three change making algorithms sys.path.insert(0, "../divide-conquer/") sys.path.insert(0, "../dynamic-programming") sys.path.insert(0, "../greedy") from changeslow import changeslow from changegreedy import ch...
#!/usr/bin/env python3 # Copyright (c) 2016-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the bumpfee RPC. Verifies that the bumpfee RPC creates replacement transactions successfully when...
# coding=utf-8 # Copyright (c) 2001-2015, Canal TP and/or its affiliates. All rights reserved. # # This file is part of fabric_navitia, the provisioning and deployment tool # of Navitia, the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by C...
''' Created on 29 mars 2012 @author: jll ''' # This file should never be imported anywhere import os import sys import argparse import Facemovie import FaceParams class Facemoviefier(): """ Class defining the interactions with the end user. Should be used as point of entry for all end users. """ ...
from totalimpactwebapp.card import Card from totalimpactwebapp import configs from totalimpactwebapp.card_generate import * import os import datetime def make(user): products = user.product_objects user_dict_about = user.dict_about() cards = [] cards += ProductNewMetricCardGenerator.make(user, pro...
"" # noqa """ mpipe 0.6 ========= Send message-pack messages to subprocess. Mini RPC mostly used for testinng using hypothesis. """ import ctypes from subprocess import Popen, PIPE, TimeoutExpired import sys import os import signal import time try: import umsgpack except ImportError: import msgpack as umsgpa...
"""Implementation of Queue.""" from dll import DoublyLinkedList class Queue(object): """Class implementation of queue. 1. Enqueue: Add new head node. 2. Dequeue: Remove tail node. 3. Peek: Display tail node, 4. Size: Display queue length. """ def __init__(self, iterable=None): ...
from __future__ import print_function from setuptools import setup, Extension from distutils.errors import LibError from setuptools.command.install import install from distutils.command.build_ext import build_ext from distutils.command.install_lib import install_lib from os import mkdir, chdir, listdir, getcwd, link, r...
import pygame import logging import os class Snake(pygame.sprite.Sprite): # This dictionary contains all the possible combinations that the snake can move in degrees of 90 and 180. # For example, LeftUp means that the current direction of the snake is left and the new direction that the snake wants to move ...
from keras.callbacks import ModelCheckpoint from keras.callbacks import LearningRateScheduler from keras.optimizers import Adam from image_generator import ImageGenerator from multibox_loss import MultiboxLoss from models import SSD300 from utils.prior_box_creator import PriorBoxCreator #from utils.prior_box_creator_p...
#!/usr/bin/env python2 import sys import re def main(): try: filename = sys.argv[1] shift = float(sys.argv[2]) except (IndexError, ValueError): print("usage: srt-shift filename shift") return out = '' with open(filename, 'r') as file: i = 0 for line i...
# -*- coding: utf-8 -*- from django.http import HttpResponse, HttpRequest, QueryDict, HttpResponseRedirect import json import conekta from store.models import * from store.forms import * ### PETICIONES API PARA EL CARRITO def delBasket(request): id = str(request.GET.get('id')) if request.GET.ge...
#!/usr/bin/env python # -*- coding: utf-8 -*- # python 2 compatibility from __future__ import division from builtins import int, str class Element(object): """ Food or other element with certain properties """ def __init__(self, name, **properties): """properties are set as attributes for easier a...
# -*- coding: utf-8 -*- # /*************************************************************************** # Irmt # A QGIS plugin # OpenQuake Integrated Risk Modelling Toolkit # ------------------- # begin : 2013-10-24 # copyright ...
""" COEX service. """ __author__ = 'Dan Gunter <dkgunter@lbl.gov>' __date__ = '12/12/13' ## Imports # Stdlib import copy import json import sys from string import Template from operator import itemgetter # Third party import requests import urllib2 # Service framework from biokbase.narrative.common.service import ...
import binascii import logging import pykka import serial import struct logger = logging.getLogger(__name__) # Primare documentation on their RS232 protocol writes this: # == Command structure == # Commands are sent to the device using the following format, where each field # is one byte sent to the device: # <ST...
# Copyright 2017-2018 Akretion (http://www.akretion.com) # Sébastien BEAU <sebastien.beau@akretion.com> # Raphaël Reverdy <raphael.reverdy@akretion.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Base Jsonify", "summary": "Base module that provide the jsonify method on all ...
''' All functions acting on the hits of one DUT are listed here''' import logging import tables as tb import numpy as np from pixel_clusterizer.clusterizer import HitClusterizer from testbeam_analysis import analysis_utils from testbeam_analysis import plot_utils def remove_noisy_pixels(data_file, threshold=6., chu...
from actions import add_guide, add_module, add_decl_html from docset.actions import cp_file, patch_file from docset.predicate import rel_path CSS_PATCH = """ /* Dash DocSet overrides */ .sidebar, .sub { display: none; } .content { margin-left: 0; } """ """Rules are in form: [predicate1, predicate2, predicate3, ......
from django.core.management import call_command try: from django.shortcuts import resolve_url except ImportError: import warnings warnings.warn("URL path supported only in get_url() with Django < 1.5") resolve_url = lambda to, *args, **kwargs: to from behave_django.testcase import BehaveDjangoTestCase ...
"""Contains the MultiBall device class.""" from mpf.core.enable_disable_mixin import EnableDisableMixin from mpf.core.delays import DelayManager from mpf.core.device_monitor import DeviceMonitor from mpf.core.events import event_handler from mpf.core.mode_device import ModeDevice from mpf.core.placeholder_manager impo...
"""Script for managing mtgcdb.""" import csv import datetime import os import shutil import openpyxl from mtgcdb import downloader from mtgcdb import models from mtgcdb import mtgcsv from mtgcdb import mtgjson from mtgcdb import mtgxlsx def backup_file(filename): """Given a filename, backup the file if it exis...
#!/usr/bin/env python # MIT License # # Copyright (c) 2017 Mayo Clinic # # 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 u...
import re from django.http import HttpResponse from django.shortcuts import render_to_response, get_object_or_404, redirect from django.template import RequestContext from django.utils import simplejson import datetime from operator import itemgetter # from mzalendo.helpers import geocode from core import models ...
from collections import OrderedDict from itertools import chain import json import random import re from nalaf.utils.qmath import arithmetic_mean from nalaf import print_debug, print_verbose import warnings from itertools import chain from collections import Counter class Dataset: """ Class representing a gro...
""" 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 distributed ...
"""Topology components for FAUCET Mininet unit tests.""" import os import pty import select import socket import string import shutil import subprocess import time import netifaces # pylint: disable=import-error from mininet.log import error, output from mininet.topo import Topo from mininet.node import Controller f...
import pandas as pd import numpy as np import pyaf.ForecastEngine as autof import pyaf.Bench.TS_datasets as tsds import pyaf.CodeGen.TS_CodeGenerator as tscodegen b1 = tsds.load_airline_passengers() df = b1.mPastData df.head() lEngine = autof.cForecastEngine() lEngine H = b1.mHorizon; # lEngine.mOptions.enable_s...
#! /usr/bin/python # -*- coding: utf-8 -*- import sys import os.path path_to_script = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(path_to_script, "../src/extern")) sys.path.append(os.path.join(path_to_script, "../../lar-cc/lib/py/")) import unittest # import numpy as np class Interpolat...
# Copyright (c) 2015 OpenStack Foundation. # # 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 # # Unle...
# -*- coding: utf-8 -*- ''' Mango accounts system logic. ''' # This file is part of mango. # Distributed under the terms of the last AGPL License. # The full license is in the file LICENCE, distributed as part of this software. __author__ = 'Team Machine' import uuid import logging import ujson as json from to...
""" Creates DBPedia labels-types file of the following format: { LABEL: [Type1, Type2, ...], ...} For example: Tramore: Town, Settlement, PopulatedPlace, Place Tramore,_Ireland: Town, Settlement, PopulatedPlace, Place """ import codecs import subprocess import urllib from collections import defaultdi...
# -*- coding: utf-8 -*- """neighbourhoods.py Scripts to extract the areal units where the different classes are over-represented, and cluster the areal units that have common boundaries. """ import math import shapely import marble as mb from common import (regroup_per_class, return_categories, ...
import logging import subprocess from ..payload import Payload from .. import constants from ..config import save_config_value from ..log import log_to_client def _get_mac_username(): proposed_mac_username = subprocess.check_output(['echo', '$USER']) if raw_input('Is {} your mac_username. Enter y for yes: '.f...
import asyncio import http import tempfile from waterbutler.core import streams from waterbutler.core import provider from waterbutler.core import exceptions from waterbutler.providers.dataverse import settings from waterbutler.providers.dataverse.metadata import DataverseRevision from waterbutler.providers.dataverse...
# -*- coding: utf-8 -*- # # defivelo-intranet -- Outil métier pour la gestion du Défi Vélo # Copyright (C) 2015 Didier Raboud <me+defivelo@odyx.org> # # 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 ...
"""This module contains custom filter backends.""" from django.core.exceptions import ( ImproperlyConfigured, ValidationError as InternalValidationError ) from django.db.models import Q, Prefetch from django.utils import six from rest_framework import serializers from rest_framework.exceptions import Validatio...
from math import sqrt from typing import Callable, List, NamedTuple, Optional, Tuple, Union import haiku as hk import jax import jax.numpy as jnp import numpy as np from e3nn_jax import Irreps, IrrepsArray, config from e3nn_jax._src.core_tensor_product import _sum_tensors class Instruction(NamedTuple): i_in: int...
import elementary import evas import ecore import urllib import time import os import shutil import datetime class playerWindow(elementary.Box): def __init__( self, parent ): #Builds an elementary tabel that displays our information elementary.Box.__init__(self, parent.mainWindow) #Store t...
""":mod:`earthreader.web.wsgi` --- WSGI middlewares ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ import re __all__ = 'MethodRewriteMiddleware', class MethodRewriteMiddleware(object): """The WSGI middleware that overrides HTTP methods for old browsers. HTML4 and XHTML only specify ``POST`` and ``G...
# # Copyright (C) 2011-2014 Jeff Bush # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is d...
""" flask.ext.restless.views ~~~~~~~~~~~~~~~~~~~~~~~~ Provides the following view classes, subclasses of :class:`flask.MethodView` which provide generic endpoints for interacting with an entity of the database: :class:`flask.ext.restless.views.API` Provides the endpoints for each of the ...
#!/usr/bin/env python """Universal feed parser Handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom feeds Visit http://feedparser.org/ for the latest version Visit http://feedparser.org/docs/ for the latest documentation Required: Python 2.1 or later Recommended: Python 2.3 or later Recommended: libxml2 <http://xmlsoft.org...
""" Django Admin pages """ # pylint: disable=no-self-argument, no-member import pytz from datetime import datetime, timedelta from django import forms from django.db.models import Q from django.contrib import admin from django.contrib import messages from django.utils.translation import ugettext_lazy as _ from edx_pr...
import unittest import os import sys import mock sys.path.append(".") from pywinauto.windows.application import Application # noqa: E402 from pywinauto.handleprops import processid # noqa: E402 from pywinauto.sysinfo import is_x64_Python # noqa: E402 from pywinauto.sysinfo import UIA_support # noqa: E402 from pywi...
import logging import getopt import sys import subprocess import os.path import smtplib import datetime, time import psutil, os import re import socket import urllib2 from os import access, R_OK from ConfigParser import SafeConfigParser from subprocess import Popen,PIPE,STDOUT from email.MIMEMultipart import MIMEMultip...
from collections import namedtuple import datetime from django.db.models import F from django.utils.translation import ugettext_noop from corehq.apps.data_analytics.models import MALTRow from corehq.apps.reports.standard import ProjectReport from corehq.apps.style.decorators import use_nvd3 from corehq.apps.users.util ...
from __future__ import absolute_import from __future__ import unicode_literals from corehq.apps.app_manager.xform import XForm from corehq.apps.export.models import FormExportDataSchema, CaseExportDataSchema from corehq.apps.export.system_properties import BOTTOM_MAIN_FORM_TABLE_PROPERTIES, MAIN_CASE_TABLE_PROPERTIES f...
''' The networking module for RHEL/Fedora based distros ''' # Import python libs import logging import re from os.path import exists, join # import third party libs import jinja2 # Set up logging log = logging.getLogger(__name__) # Set up template environment env = jinja2.Environment(loader=jinja2.PackageLoader('sal...
from uuid import uuid4 from django.test import TestCase import requests from casexml.apps.case.mock import CaseBlock from corehq.apps.accounting.models import SoftwarePlanEdition from corehq.apps.accounting.tests.utils import DomainSubscriptionMixin from corehq.apps.accounting.utils import clear_plan_version_cache ...
import numpy, random class GeneratePrivateKey(object): def __init__(self): pass def generate_prime_number(self, n): # http://stackoverflow.com/questions/2068372/fastest-way-to-list-all-primes-below-n-in-python/3035188#3035188 """ Input n>=6, Returns a array of primes, 2 <= p < n """ ...
# -*- coding: utf-8 -*- ''' Managing Images in OpenStack Glance =================================== ''' # Import python libs from __future__ import absolute_import import logging import time log = logging.getLogger(__name__) def _find_image(name): ''' Tries to find image with given name, returns - im...
# -*- coding: utf-8 -*- ''' Define some generic socket functions for network modules ''' # Import python libs from __future__ import absolute_import, unicode_literals, print_function import itertools import os import re import types import socket import logging import platform import random import subprocess from stri...
# -*- coding: utf-8 -*- ''' salt.utils.parsers ~~~~~~~~~~~~~~~~~~ This is were all the black magic happens on all of salt's CLI tools. :codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)` :copyright: © 2012 by the SaltStack Team, see AUTHORS for more details. :license: Apache 2.0, see LICE...
#!/usr/bin/python # -*- coding: utf-8 -*- __version__ = '0.0.15'
import numpy as np import pdb class SC3Pipeline(object): """ Meta-class for single-cell clustering based on the SC3 pipeline. Nico Goernitz, TU Berlin, 2016 """ cell_filter_list = None gene_filter_list = None data_transf = None dists_list = None dimred_list = None intermediate...
# Copyright 2013 The Chromium Authors. All rights reserved. # Copyright 2013 Intel Corporation. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'variables': { 'variables': { 'enable_ozone_wayland_vkb%': 0, 'enable_xdg_shell...
import copy import logging import os import pytest import salt.ext.tornado import salt.ext.tornado.gen import salt.ext.tornado.testing import salt.minion import salt.syspaths import salt.utils.crypt import salt.utils.event as event import salt.utils.jid import salt.utils.platform import salt.utils.process from salt._c...
#!/usr/bin/env python # # Copyright 2012, Kay Hayen, mailto:kayhayen@gmx.de # # Python test originally created or extracted from other peoples work. The # parts and resulting tests are too small to be protected and therefore # is in the public domain. # # If you submit Kay Hayen patches to this in e...
# # 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...
import unittest import pandas as pd import eval_classification # Type nosetests in commandline in project root to run these tests. class TestEvalClassification(unittest.TestCase): def setUp(self): dict = {"truth": [1,2,2,1], "predicted": [1,1,2,2], "confidence": [0.2,0.3...
# DESCRIPTION: Contains more advanced tests for the chess board. # 4920646f6e5c2774206361726520696620697420776f726b73206f6e20796f7572206d61636869 # 6e652120576520617265206e6f74207368697070696e6720796f7572206d616368696e6521 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~IMPORTS/GLOBALS~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ from time impo...
# coding=utf-8 # Copyright 2018 The TF-Agents 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 law...
import copy import json import furl from waterbutler.core import path from waterbutler.core import streams from waterbutler.core import provider from waterbutler.core import exceptions from waterbutler.providers.github import settings from waterbutler.providers.github.metadata import GitHubRevision from waterbutler....
import json as _json import logging from importlib import import_module from django.utils import timezone from api.indy.agent import Holder from api.indy import eventloop from von_agent.util import schema_key from api_v2.models.Issuer import Issuer from api_v2.models.Schema import Schema from api_v2.models.Topic im...
# This scrip will turn firebase json onject into csv file. # It will print out key id of test, which has some issues # Author: Xuefeng Zhu # Date: Dec. 6th, 2014 import json import csv fieldnames = ["city" ,"adcash", "stumbleupon", "google", "adobe", "instagram", "netflix", "outbrain", "vimeo", "mozilla", "salesfo...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015-2016: Alignak team, see AUTHORS.txt file for contributors # # This file is part of Alignak. # # Alignak 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 So...
from termcolor import colored from voca.vocaDict import vocaDict class vocaUtil(): def check_word_in_local_dect(self, word): if word in vocaDict: return vocaDict[word]['short'], vocaDict[word]['long'], vocaDict[word]['sentences'] else: return None, None, None def prin...
#!/usr/bin/env python # Script by Ben Limmer # https://github.com/l1m5 # # This Python script will combine all the host files you provide # as sources into one, unique host file to keep you internet browsing happy. # pylint: disable=invalid-name # pylint: disable=bad-whitespace # Making Python 2 compatible with Pyth...
#!/usr/bin/env python # Script by Ben Limmer # https://github.com/l1m5 # # This Python script will combine all the host files you provide # as sources into one, unique host file to keep you internet browsing happy. from __future__ import (absolute_import, division, print_function, unicode_lite...
#!/usr/bin/env python # Script by Ben Limmer # https://github.com/l1m5 # # This Python script will combine all the host files you provide # as sources into one, unique host file to keep you internet browsing happy. from __future__ import (absolute_import, division, print_function, unicode_literals) import argparse i...
""" Universal database functions. specific functions related to some components are in component file """ import random import urllib.parse from datetime import datetime from random import shuffle import pymongo from bson.objectid import ObjectId from upol_crawler.settings import * from upol_crawler.utils import urls...
import pandas as pd from glob import glob import numpy as np import re import csv import sys followUp = {} ack = {} nonIntimate = {} intimate = {} featureList = {} '''headers for COVAREP features''' header = ["video", "question", "starttime", "endtime", 'F0_mean', 'VUV_mean', 'NAQ_mean', 'QOQ_mean', 'H1H2_mean', ...
############################################################################### # # Copyright (c) 2011 Ruslan Spivak # # 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, inc...
from django.core.mail import EmailMessage from django.views.decorators.csrf import csrf_exempt from django.conf import settings import jingo from product_details import product_details import basket import l10n_utils from forms import ContributeForm, NewsletterCountryForm @csrf_exempt def contribute(request): def...
# Packages from flask import Blueprint, Response # PRoject from datapunt_geosearch.datasource import AtlasDataSource, NapMeetboutenDataSource health = Blueprint('health', __name__) @health.route('/status/health', methods=['GET', 'HEAD', 'OPTIONS']) def search_list(): """Execute test query against datasources""" ...
#!/usr/bin/python2.4 # -*- mode: python -*- # # Copyright (c) 2006 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always ...
# # Copyright (c) 2004-2005 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.opensource.org/...
# 21 septembre 2017 # astro_v2.py from pylab import * def B3V_eq(x): """ :param x: abcsisse du point de la ligne B3V dont on veut obtenir l'ordonnée :return: ordonnée du point de la ligne B3V correspondant à l'abscisse x (dans un graphique u-g vs g-r) """ return 0.9909 * x - 0.8901 def lignes(f...
"""Tornado websocket handler to serve a terminal interface. """ # # BSD License # # Copyright (c) 2014, Ramalingam Saravanan <sarava@sarava.net> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
from Response import Response class ConfigureResponse(Response): def __init__(self, response): self.upload_id = None self.media_id = None self.image_url = None self.media_code = None if self.STATUS_OK == response['status']: self.upload_id = response['upload_id'...
#!/usr/bin/env python # Copyright (C) 2010-2011 Hideo Hattori # Copyright (C) 2011-2013 Hideo Hattori, Steven Myint # Copyright (C) 2013-2016 Hideo Hattori, Steven Myint, Bill Wendling # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files...
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext_noop from corehq.apps.reminders.models import REMINDER_TYPE_ONE_TIME from corehq.apps.reports.datatables import DataTablesHeader, DataTablesColumn from corehq.apps.reports.graph_models import Axis, LineChart from corehq.app...
#!/usr/bin/env python # # Copyright (C) 2010-2011 Hideo Hattori # Copyright (C) 2011-2013 Hideo Hattori, Steven Myint # # 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, in...
#!/usr/bin/env python # Copyright 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. """Downloads and unpacks a toolchain for building on Windows. The contents are matched by sha1 which will be updated when the toolchain...