src
stringlengths
721
1.04M
"""Tests for stix.ExternalReference""" import pytest import stix2 LMCO_RECON = """{ "kill_chain_name": "lockheed-martin-cyber-kill-chain", "phase_name": "reconnaissance" }""" def test_lockheed_martin_cyber_kill_chain(): recon = stix2.v20.KillChainPhase( kill_chain_name="lockheed-martin-cyber-ki...
"""This module contains the general information for AdaptorFcPortFLogiProfile ManagedObject.""" from ...imcmo import ManagedObject from ...imccoremeta import MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class AdaptorFcPortFLogiProfileConsts: RETRIES_INFINITE = "INFINITE" class AdaptorFcPortFLogiPr...
# # Copyright 2018 Analytics Zoo 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 or agreed to...
import asyncio, io, logging, os, subprocess, re, time import plugins logger = logging.getLogger(__name__) _cocext = { "running": False } def _initialise(bot): plugins.register_user_command(["screen", "coc"]) plugins.register_admin_command(["setlog", "clearlog"]) @asyncio.coroutine def _open_file(name): ...
""" ============ axhspan Demo ============ Create lines or rectangles that span the axes in either the horizontal or vertical direction. """ import numpy as np import matplotlib.pyplot as plt # nodebox section if __name__ == '__builtin__': # were in nodebox import os import tempfile W = 800 inset ...
import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/ # SECURITY WARNING: keep th...
import sys from datetime import datetime from sqlalchemy import ( Column, Integer, Text, DateTime, ) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm.exc import NoResultFound from sqlalchemy.orm import ( scoped_session, sessionmaker, ) from zope.sqlalchemy impo...
# coding: utf-8 import log from log import debug from settings import Settings from base import * import feedparser, urllib2, re from bs4 import BeautifulSoup from nfowriter import * from strmwriter import * import requests, filesystem ################################################################################...
''' Short URL Generator =================== Python implementation for generating Tiny URL- and bit.ly-like URLs. A bit-shuffling approach is used to avoid generating consecutive, predictable URLs. However, the algorithm is deterministic and will guarantee that no collisions will occur. The URL alphabet is fully c...
from django.conf import settings from rest_framework import serializers from rest_framework_simplejwt.serializers import TokenObtainSlidingSerializer from api.exceptions import InsufficientFundsException, NoSociSessionError from economy.models import SociProduct, ProductOrder, SociSession, SociBankAccount class Cust...
# matplotlib without any blocking GUI import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import numpy as np from smst.utils import audio, peaks from smst.models import dft (fs, x) = audio.read_wav('../../../sounds/sine-440-490.wav') w = np.hamming(3529) N = 32768 hN = N / 2 t = -20 pin = 4850 x1...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mainwindow.ui' # # Created: Fri May 15 18:20:42 2015 # by: PyQt5 UI code generator 5.4 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(se...
#!/usr/bin/env python import MySQLdb import os import sys import wpmu home = os.getenv('HOME') daily_filename = '%s/Desktop/daily.txt' % (home) total_filename = '%s/Desktop/total.txt' % (home) daily_users_filename = '%s/Desktop/daily_users.txt' % (home) total_users_filename = '%s/Desktop/total_users.txt' % (home) ...
import copy def get_empty_game_state(): # hi there # make mock game state. # we'll have several fixtures # and a basic one we can set up in each test. return {'players':{}, 'votes':{}, 'STATUS': 'INACTIVE', 'ROUND': None } def all_vote_but_one_state():...
# 函数式编程 # 高阶函数 # map函数 def square(x): return x * x * x r = map(square, [1, 2, 3]) print(list(r)) # reduce 函数 from functools import reduce def fn(x, y): return x * 10 + y print(reduce(fn, [1, 2, 3])) is_str = isinstance(reduce(fn, [1, 2, 3]), int) print(is_str) DIGITS = {'0': 0, '1': 1, '2': 2, '3': ...
#!/usr/bin/env python3 # # Copyright 2017 Red Hat, Inc. # # Authors: # Fam Zheng <famz@redhat.com> # # This work is licensed under the MIT License. Please see the LICENSE file or # http://opensource.org/licenses/MIT. import mbox from .patchewtest import PatchewTestCase, main class MboxTest(PatchewTestCase): ...
############################################################################### ## ## Copyright 2011-2013 Tavendo GmbH ## ## 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 ## ## ...
from . import TYPES from aioriak.error import ContextRequired class Datatype: ''' Base class for all convergent datatype wrappers. You will not use this class directly, but it does define some methods are common to all datatype wrappers. ''' #: The string "name" of this datatype. Each datatyp...
""" 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. Written (W) 2095-2010 Andre Kahles Copyright (C) 2009-2010 by...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import models import wizard import report from openerp import SUPERUSER_ID def _auto_install_l10n(cr, registry): #check the country of the main company (only) and eventually load some module needed in that country ...
# -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2009 by the FIFE team # http://www.fifengine.de # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General P...
from setuptools import setup, find_packages setup( name="django-javascript-features", version="0.1", description="Helps initalizing javascript modules on the pages that need them", long_description=open('README.rst').read(), author='Robert Kajic', author_email='robert@kajic.com', url='https...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2016-2018 Kevin Deldycke <kevin@deldycke.com> # and contributors. # All Rights Reserved. # # This program is Free Software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published ...
# Copyright 2014 Red Hat, Inc. # Copyright 2014 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 # # Unless require...
#!/usr/bin/env python # -*- coding: utf-8 -*- import re def base_name(filename): """ return the string filename without extensions nor directory path >>> base_name('asdf.tar.gz') 'asdf' >>> base_name('/root/ver_strange.dir/asdf.tar.gz') 'asdf' >>> base_name(r'c:\Windows With Space\sdf.tar...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of TryEngine. # # 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 o...
# -*- coding: utf-8 -*- # EDIS - a simple cross-platform IDE for C # # This file is part of Edis # Copyright 2014-2015 - Gabriel Acosta <acostadariogabriel at gmail> # License: GPLv3 (see http://www.gnu.org/licenses/gpl.html) from PyQt4.QtGui import ( QDialog, QVBoxLayout, QHBoxLayout, QIcon, QTool...
# -*- coding: utf-8 -*- # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. import uuid from logging import getLogger as get_logger from datetime import datetime, timedelta from logstash_async.cache import Cache class MemoryCache(Cache): """B...
from tkinter import * import pyautogui import math draw = [] fromx = 0 fromy = 0 tox = 0 toy = 0 phase = 1 togglevar = 0 def callback(e): global fromx, fromy, tox, toy, phase, infox, infoy pos = [0, 1] pos[0] = master.winfo_pointerx() pos[1] = master.winfo_pointery() infox, infoy = click() if (phase == 0): ...
# -*- coding:utf-8 -*- # # Copyright 2019 The Android Open Source Project # # 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 requir...
import random import re from lxml.html import fragments_fromstring, fragment_fromstring, tostring from django.apps import apps from django.utils.safestring import mark_safe from . import conf try: basestring except NameError: basestring = str class CKEditorHtml(object): # TODO replace data-djangolink...
#!/usr/bin/env python3 # Send a big UDP datagram to learn the MTU of the network path. try: import IN except: import sys # change this path as required. I am using virtualenv sys.path.append('/usr/lib/python3.5/plat-x86_64-linux-gnu/' ) import IN import socket if not hasattr(IN, 'IP_MTU'): raise RuntimeError(...
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributi...
#coding=utf-8 from flask import render_template, redirect, request, url_for, flash,abort from . import auth from ..models import users from .. import db from .forms import LoginForm,UserEditForm from flask.ext.login import login_user, logout_user,current_user from flask.ext.login import login_required @auth.r...
from __future__ import print_function import os import sys import struct import numpy as np import argparse import quat_utils import generators def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) def read_points(path): s = open(path, 'rb').read() if len(s) % 20 != 0: raise Exce...
# Copyright (C) 2015 iS3 Software Foundation # Author: Xiaojun Li # Contact: xiaojunli@tongji.edu.cn import sys import clr import System # Load System.Windows.Media in PresentationCore.dll sys.path.append('C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.5') prcore = clr.LoadAsse...
"""Converter from typedoc output to jsdoc doclet format""" import os import sys import json from six import iteritems # JSDoc entries used in sphinx-js: # - optional access of [ public, private, protected ] # - optional classdesc # - optional comment (controls doclet inclusion) # - optional description # - optional ...
from apollo import services def update_participant_completion_rating(participant): forms = services.forms.find(form_type='CHECKLIST') submissions = services.submissions.find( contributor=participant, form__in=forms, submission_type='O' ) numerator = 0 denominator = 0 c...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
""" Philadelphia Address Stanardizer Author: Tom Swanson Created: 8/25/2014 Last Updated: 10/10/2014 Version: 1.0 """ import csv, sys, os, time, math, re from datetime import datetime ''' CLASS DEFINITIONS ''' class suffix: def __init__(self, row): # 0 - not a suffix # 1 - standard s...
import logging import subprocess from django.conf import settings from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.translation import ugettext_lazy as _ from PIL import ( Image, ImageColor,...
# Copyright 2015 Denver Coneybeare <denver@sleepydragon.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This ...
# coding: utf-8 # # This file is part of Sequana software # # Copyright (c) 2016 - Sequana Development Team # # File author(s): # Thomas Cokelaer <thomas.cokelaer@pasteur.fr> # Dimitri Desvillechabrol <dimitri.desvillechabrol@pasteur.fr>, # <d.desvillechabrol@gmail.com> # # Distributed under the ...
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import models from django.utils.translation import ugettext_lazy as _ from mezzanine.utils.importing import import_dotted_path class WikiTextField(models.TextField): """ TextField that stores markup text. ...
import mock import random import time import unittest import requests from os import urandom from mock import patch, Mock from twisted.internet.task import Clock from ethereum import tester from ethereum.keys import privtoaddr from ethereum.processblock import apply_transaction from ethereum.transactions import Tran...
# Copyright 2016 Twitter. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# # import time from typing import List from search import * from transforms import * class Assignments: def __init__(self, **kwargs): self.__dict__.update(kwargs) class Expert: def __init__(self, **asignments): self.assignments = Assignments(**asignments) def _pre_transform(self, module, boilerpl...
#!/usr/bin/python # Copyright 2012-2016 Andrew Lamoureux # # This file is a part of FunChess # # FunChess 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)...
import time import datetime import sys from sys import argv import getopt import os import subprocess import csv import numpy as np import matplotlib import matplotlib.pyplot as plt from scipy import stats from numpy import genfromtxt #from sklearn import svm, datasets def conv(s): try: s=int(s) excep...
from django.template import engines from django.template import TemplateDoesNotExist from mako.runtime import supports_caller ### ### Mako-style tags that DMP provides ### ############################################################### ### Include Django templates ### def django_include(context, template_name, **...
# Copyright 2018 The TensorFlow Probability 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 o...
from itertools import chain from django.shortcuts import render, redirect, resolve_url from django.views.generic.detail import DetailView from django.views.generic import ListView, TemplateView from django.views.generic.edit import CreateView from django.utils.translation import ugettext_lazy as _ from django.c...
__author__ = 'mark' # StarbaseMini Staribus/Starinet Client for the British Astronomical Association Staribus Protocol # Copyright (C) 2015 Mark Horn # # This file is part of StarbaseMini. # # StarbaseMini is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
from common.quote import Quote from tactic import TacticInterface, ExchangeInterface, Symbol, OrderCommon, Fill import pandas as pd class BitmexDummyTactic(TacticInterface): """ This class is associated to orders issued by Bitmex """ def finalize(self) -> None: pass def handle_quote(self...
## # Copyright (c) 2013-2014 Apple Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
from .base_filter import BaseFilter class FastFilter(BaseFilter): """ FastFilter class. Accept only lines that have a duration that is shorter than the specified parameter in ms. """ filterArgs = [ ('--fast', {'action': 'store', 'nargs': '?', 'default': False, 'ty...
#! /usr/bin/env python # -*- coding: utf-8 -*- """ This module contains tools miscellaneous tools used throughout the PF2q module. It also contains some deprecated functions that you can use at your own risk. @author: Karel van de Plassche @licence: GPLv3 """ import os import warnings from math import ceil import num...
from orchestration.nap_api.project_create import create_project_from_table table = [] t = {} t['name'] = 'master' t['cpu_shares'] = '1024' t['mem_limit'] = '32m' t['command'] = '/usr/sbin/sshd -D' t['image'] = 'docker.iwanna.xyz:5000/hmonkey/mpi:v1' t['volumes'] = [{'container_path': '/data', 'host_path': '/va', 'mode...
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file...
import logging import time import sdl2 logging.basicConfig(level=logging.INFO) class Window(sdl2.Window): def __init__(self, width, height, title): super(Window, self).__init__(width, height, title) self.log = logging.getLogger('Windw') self.log.info('++ Creating new window object ({},{...
#!/usr/bin/python import unittest, logging, os import gzip import cartesian_config mydir = os.path.dirname(__file__) testdatadir = os.path.join(mydir, 'unittest_data') class CartesianConfigTest(unittest.TestCase): def _checkDictionaries(self, parser, reference): result = list(parser.get_dicts()) #...
# $Id$ # # Copyright (C) 2002-2006 greg Landrum and Rational Discovery LLC # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # """unit testing code ...
# -*- coding: utf-8 -*- from urllib.parse import quote, quote_plus, unquote, urlencode from plexapi import X_PLEX_CONTAINER_SIZE, log, utils from plexapi.base import PlexObject from plexapi.exceptions import BadRequest, NotFound from plexapi.media import MediaTag from plexapi.settings import Setting class Library(Pl...
from PyQt4 import QtGui from tr import _translate from retranslateui import RetranslateMixin import widgets from newchandialog import NewChanDialog from address_dialogs import ( AddAddressDialog, NewAddressDialog, NewSubscriptionDialog, RegenerateAddressesDialog, SpecialAddressBehaviorDialog, EmailGatewayDialo...
# coding=utf-8 from django.db import transaction from django.http import HttpResponse import json from django.template import RequestContext from django.shortcuts import render_to_response from django.db.models import Q from models import * from random import randint from PIL import Image def JsonResponse(request, da...
""" .. module: lemur.plugins.lemur_openssl.plugin :platform: Unix :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :license: Apache, see LICENSE for more details. .. moduleauthor:: Kevin Glisson <kglisson@netflix.com> """ from io import open import subprocess from flask import current_app from ...
# # Copyright (C) 2015 FreeIPA Contributors see COPYING for license # from __future__ import print_function import copy import os.path import sys import textwrap from astroid import MANAGER, register_module_extender from astroid import scoped_nodes from pylint.checkers import BaseChecker from pylint.checkers.utils ...
# coding: utf-8 # pystacia/lazyenum.py # Copyright (C) 2011-2012 by Paweł Piotr Przeradowski # This module is part of Pystacia and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from six import string_types class Enum(object): def __init__(self, name): self.name...
#!/usr/bin/env python # Copyright (C) 2014 Ioan Dragan # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This progr...
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
""" Django settings for financeiro project. Generated by 'django-admin startproject' using Django 1.9.5. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os...
from PIL import Image import numpy as np import math from scipy import signal def boxfilter(n): assert (n%2 != 0),"Dimension must be odd" a = np.empty((n, n)) a.fill(1/(n*n)) return a def gauss1d(sigma): arr_length = 6*sigma if arr_length % 2 == 0: val = ((arr_length)/2)+1 elif arr...
import datetime import json import logging import requests import iso8601 import os from base64 import b64encode from Crypto import Random from dateutil.parser import parse as dateutil_parse from gevent import Greenlet from hashlib import sha256 from humanize import naturaltime from operator import itemgetter from nu...
from aislug import AISlugField from django.db import models class Item(models.Model): title = models.CharField(max_length=100) slug = AISlugField() class ItemUpdateFalse(models.Model): title = models.CharField(max_length=100) slug = AISlugField(update=False) class ItemSlugify(models.Model): titl...
# Copyright 2010-present Basho Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
#!/usr/bin/env python2.7 # -*- encoding: UTF8 -*- # author: Philipp Klaus, philipp.klaus →AT→ gmail.com # author: Markus Roth, mail →AT→ rothmark.us # This file is part of python-inwx-xmlrpc. # # python-inwx-xmlrpc is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publi...
from django.db import models, transaction from django.utils.importlib import import_module from shrubbery.conf import settings from shrubbery.db.managers import Manager from shrubbery.db.utils import get_sub_models, get_query_set, get_model, remove_join, forge_join from shrubbery.db.union import UnionQuerySet from shr...
# -*- coding: utf-8 -*- from datetime import datetime import io import os import pytest import six import toml from anymarkup_core import * from test import * class TestParse(object): fixtures = os.path.join(os.path.dirname(__file__), 'fixtures') def assert_unicode(self, struct): if isinstance(str...
""" This module provide Serving backend, that use <werkzeug>. """ from ..utils import * class servBackend: """ """ _id='werkzeug' _supportRawSocket=False _supportGevent=True _supportNative=True _supportMultiple=False def __init__(self, id=None): #check importing from werkzeug.ser...
#!/usr/bin/env python # # Copyright 2016 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
import re from itertools import groupby from numpy import zeros, ones, cumsum, take, int32, int64 from numpy import asarray __all__ = ["strmap", "strseq", "lstranges", "erange", "list2str", "fileindex"] __all__ += ["array_arange"] # Function to change a string to a range of integers def strmap(func, s, start=None, ...
# Copyright (C) 2020 Christopher Gearhart # chris@bblanimation.com # http://bblanimation.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 3 of the License, or # (at your opt...
""" Functions for creating tables for useful / important comparisons. These are analogous to charts in that they are forms of output and it's not clear where they belong. Lists of tabular outputs: * process or fragment Inventory * compare process inventories * compare allocations of a multioutput process * comp...
# DFF -- An Open Source Digital Forensics Framework # Copyright (C) 2009 ArxSys # # This program is free software, distributed under the terms of # the GNU General Public License Version 2. See the LICENSE file # at the top of the source tree. # # See http://www.digital-forensic.org for more information about this # ...
# -*- coding: utf-8 -*- # muMDAU_app main / first page from muMDAU_app import app, socketio from flask import make_response, request, render_template, Blueprint, url_for, redirect, session import dbmongo, hashlib from dbmongo import User, Data, Bid , Item import subprocess, os from subprocess import PIPE from time imp...
''' This file passes the maximum allowed number of years that the stock is allowed to fail to meet the desired growth rates. Default is 0 years This value will be used in PassGrowthRate.py ''' # -------------------------- Required Files----- --------------------- # # # --------------------------------------...
from datetime import date from os import path import pandas as pd import ggplot as gp data_path = path.join( path.dirname(path.realpath(__file__)), 'data' ) def date_from_quarter(quarter): year, q = quarter.split() month = int(q[1]) * 3 return pd.Timestamp(date(year=int(year), month=month, day=1)) ...
# Copyright 2014 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. import os import unittest from telemetry import page as page_module from telemetry import value from telemetry.page import page_set class TestBase(unittest...
"""Functions operating on arrays.""" # Any commits made to this module between 2015-05-01 and 2017-03-01 # by Gerrit Holl are developed for the EC project “Fidelity and # Uncertainty in Climate Data Records from Earth Observations (FIDUCEO)”. # Grant agreement: 638822 # # All those contributions are dual-licensed unde...
from rest_framework import views from rest_framework.generics import ListAPIView from rest_framework.response import Response from .serializers import ACPHolidaySerializer, StandardResultsSetPagination from ..models import ACPHoliday, ACPCalendarException class ACPHolidayListAPIView(ListAPIView): # queryset = AC...
# # Copyright (C) 2008-2009 UNINETT AS # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License version 2 as published by the Free # Software Foundation. # # This program is distributed in the...
__author__ = 'we32zac' from pyEOM.datasets import Dataset as DatasetAbs class Dataset(DatasetAbs): shortname = 'MYD10C1' platform = 'Aqua' collection = '005' rastertype = 'CMG' timeInterval = 'P1D' host = 'n5eil01u.ecs.nsidc.org' dir = '/SAN/MOSA/MYD10C1.005' sources = ...
# https://github.com/unbit/uwsgi/blob/master/uwsgidecorators.py from functools import partial import sys from threading import Thread try: import cPickle as pickle except: import pickle import uwsgi if uwsgi.masterpid() == 0: raise Exception( "you have to enable the uWSGI master process to use th...
from GameEngine.AI import _AI from GameEngine.User import _User class Player(object): """ The class which controls if it's a human player or an AI. Can take three parameters as input, where the name and the type of the player (AI or user) is mandatory A second parameter, difficulty, is not needed when...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
"""scons.Node.Alias Alias nodes. This creates a hash of global Aliases (dummy targets). """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation fi...
""" This page is in the table of contents. Comb is a script to comb the extrusion hair of a gcode file. The comb manual page is at: http://www.bitsfrombytes.com/wiki/index.php?title=Skeinforge_Comb Comb bends the extruder travel paths around holes in the slices, to avoid stringers. It moves the extruder to the insid...
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
#!/usr/bin/python import sys from amberparser import * def printUsage(): print "\nUsage: ./parmConvert.py -i filename [-m file1 .. fileN] [-o output_file]\n" print "paramConvert accepts the following parameters:" print "\t--help Show this help and exit." print "\t-p,--parm filename ...
"""Class for efficiently handling contour data""" import sys import warnings import numpy as np from ...features import inert_ratio from .exc import ContourIndexingError class ContourVerificationWarning(UserWarning): pass class ContourColumn(object): def __init__(self, rtdc_dataset): """A wrappe...