src
stringlengths
721
1.04M
from django.conf.urls import url from . import views urlpatterns = [ url(r"^$", views.index, name="movies_home"), url(r"^movies$", views.moviesList, name="movies_list"), url(r"^movies/create$", views.movieCreate, name="movie_create"), url(r"^movies/import$", views.movieImport, name="movie_import"), ...
# Copyright 1999-2000 by Jeffrey Chang. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # Patches by Mike Poidinger to support multiple databases. # Updated by Peter Cock in 2007...
# type: ignore """ OmegaConf setup Instructions: # Build: rm -rf dist/ omegaconf.egg-info/ python setup.py sdist bdist_wheel # Upload: twine upload dist/* """ import pathlib import pkg_resources import setuptools from build_helpers.build_helpers import ( ANTLRCommand, BuildPyCommand, ...
# This file is part of Archivematica. # # Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica 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 the ...
# Copyright 2008, Kovid Goyal <kovid at kovidgoyal.net> # Copyright 2013 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "GPL v3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.hardcoded.net/...
from usual import xmap, zmap class hold(object): """ This class is used to wait events from a given Mode class. """ def __init__(self, target, *event_list): # Where we wait the event from. self.target = target self.event_list = event_list def __call__(self, mod, seq): ...
from pydub import AudioSegment from config import audio_secs, name, sec from sinesudoku.sudokusynth import Sudokusynth def post_process(audio, headroom, threshold): output = audio.low_pass_filter(20000) output = output.high_pass_filter(20) output = output.normalize(0) output = output.compress_dynamic...
""" Copyright 2012 Ali Ok (aliokATapacheDOTorg) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wr...
# test_connect_var.py """ Testing connecting different variable types to each other. """ import unittest from openmdao.main.api import Assembly, Component, set_as_top from openmdao.main.datatypes.api import Array, Float, Int, Str, Bool, Enum class Oneout(Component): """ A simple output component """ ...
# # Copyright (C) 2011-2015, 2020 UNINETT # # 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 3 as published by # the Free Software Foundation. # # This program is distributed in ...
# -*- coding: utf-8 -*- # Copyright (c) 2008 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing the Editor Spellchecking configuration page. """ from __future__ import unicode_literals from PyQt5.QtCore import pyqtSlot from E5Gui.E5Completers import E5FileCompleter from E5Gui import E5Fil...
""" FileDump plugin for Artifactor Add a stanza to the artifactor config like this, artifactor: log_dir: /home/username/outdir per_run: test #test, run, None overwrite: True plugins: filedump: enabled: True plugin: filedump """ from artifactor import ArtifactorBasePlugi...
"""Test for the cooperator strategy.""" import axelrod from .test_player import TestPlayer C, D = axelrod.Actions.C, axelrod.Actions.D class TestCooperator(TestPlayer): name = "Cooperator" player = axelrod.Cooperator expected_classifier = { 'memory_depth': 0, 'stochastic': False, ...
#!/usr/bin/env python3 import time import os import shutil import tarfile import logging HOWOLD = 1 basepath = 'E:/1CBufferDirectory/1CUTAxelot' logging.basicConfig(filename=basepath + '/archivate.log', format='%(levelname)s:%(message)s', level=logging.INFO) try: if os.path.getsize(basepath + '/archivate.log') ...
import inspect from inspect import isclass, isfunction, isroutine from typing import List from .utils import import_object def get_classes(module, exclude: List[str] = None, return_strings: bool = True): """Get all the classes of a module. # Arguments module: The modu...
# Copyright 2017 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 logging from devil import base_error from devil.android import device_errors logger = logging.getLogger(__name__) def RetryOnSystemCrash(f, devic...
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.controllers import ControllerWaterCoil log = logging.getLogger(__name__) class TestControllerWaterCoil(unittest.TestCase): def setUp(self): self.fd, self.path = tem...
""" to install: python setup.py install """ from setuptools import setup setup( name="arbiter", description="A task-dependency solver", long_description=open('README.rst').read(), version="0.4.0", author="Brendan Curran-Johnson", author_email="brendan.curran.johnson@invenia.ca", licen...
""" Utility functions that lightly wrap some GL functionality. Also interaction with pygame. """ from . import gles2 from .rpi_egl import create_opengl_window import ctypes import pygame import numpy import re from operator import attrgetter from functools import partial from .lazycall import LazyAttr import contextli...
import datetime import hashlib import random import re from django.conf import settings #try: from django.contrib.auth import get_user_model #except ImportError: # django < 1.5 # from django.contrib.auth.models import User #else: User = settings.AUTH_USER_MODEL from django.db import models from django.db import tra...
""" Django settings for transtats project - development env. 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/setting...
# -*- coding:utf-8 -*- import six import sys import time import logging try: import curses assert curses except ImportError: curses = None logger = logging.getLogger("WeRoBot") def enable_pretty_logging(logger, level='info'): """ 按照配置开启 log 的格式化优化。 :param logger: 配置的 logger 对象 :param ...
from unittest.mock import Mock from core.exceptions import AddedMoreToCartThanAvailable from django.core.exceptions import ValidationError from django.db import IntegrityError from django.utils import timezone from core.tests.base import CoreTestCase from core.models.shop import ProductCategory, Product, DeliveryPoint...
import os import subprocess if not "ConnectedVision" in os.environ: raise Exception("\"ConnectedVision\" environment variable is not defined") cvDir = os.path.abspath(os.environ["ConnectedVision"]) if not os.path.isdir(cvDir): raise Exception("the directory path referenced by the ConnectedVision environment variab...
''' - Leetcode problem: 384 - Difficulty: Medium - Brief problem description: Shuffle a set of numbers without duplicates. Example: // Init an array with set 1, 2, and 3. int[] nums = {1,2,3}; Solution solution = new Solution(nums); // Shuffle the array [1,2,3] and return its result. Any permutation of [1,2,3] mu...
# 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 agreed to in...
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2006 Donald N. Allingham # Copyright (C) 2009 Gary Burton # Copyright (C) 2011 Tim G L Lyons # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published ...
import json from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.test import TestCase from django.test.client import RequestFactory from courseware.access import has_access from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from student.m...
from django_sqlalchemy.test import * from apps.blog.models import Category class TestFirst(object): def setup(self): Category.__table__.insert().execute({'name': 'Python'}, {'name': 'PHP'}, {'name': 'Ruby'}, {'name': 'Smalltalk'}, {'name': 'CSharp'}, {'name': 'Modula'}, {'name': '...
# SConsBuildFramework - Copyright (C) 2013, Nicolas Papier. # Distributed under the terms of the GNU General Public License (GPL) # as published by the Free Software Foundation. # Author Guillaume Brocker # # http://code.google.com/p/cityhash/ import os import re import shutil import subprocess # Version ...
from .const import Bound from .interval import Interval, singleton from collections.abc import MutableMapping, Mapping from sortedcontainers import SortedDict def _sort(i): # Sort by lower bound, closed first return (i[0].lower, i[0].left is Bound.OPEN) class IntervalDict(MutableMapping): """ An I...
#!/usr/bin/env python '''Generate configuration files for decoding via Kaldi. The input directory (wavdir) should contain 16-bit 8KHz wav files, with the naming convention <spk_id>_<utt_id>.wav. For example: 0001_0001.wav, 0002_0001.wav etc. ''' import sys import os from glob import glob def get_filepaths(directory)...
import Edison.i2c as I2C import sharp2y0a21 import ads1015 import time import thread class proximity_warning: def __init__(self, sensorid, calibration, sensing_freq): self.sensing_freq = sensing_freq self.warning = [] adc = ads1015.ads1015(I2C.i2c(1,0x48)) adc.setchannel(sensorid, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import find_packages, setup import pycolorname with open('requirements.txt') as requirements: required = requirements.read().splitlines() with open('test-requirements.txt') as requirements: test_required = requirements.read().splitlines() if __n...
import os import hashlib from base_test import BaseTest pytest_plugins = ["pytester"] class TestReportScreenshots(BaseTest): expected_response = [ {'name': 'image1.png', 'image': 'cXdlcnR5', 'date': 'd-m-y'}, {'name': 'image2.png', 'image': 'dHl1aW9w', 'date': 'd-m-y'} ] def get_actio...
#!/usr/bin/env python # Copyright (c) 2014-2017 Max Beloborodko. # # 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 # # Unl...
from touristfriend.external import google from touristfriend.external import yelp import time def bayesian(R, v, m, C): """ Computes the Bayesian average for the given parameters :param R: Average rating for this business :param v: Number of ratings for this business :param m: Minimum ratings requ...
"""Main Module. Boots Glin""" import argparse import configparser import logging import os import sys from pkg_resources import iter_entry_points import glin.animations import glin.app import glin.hardware def boot(): """Read configuration files, initialize glin and run main loop""" argparser = argparse.Argu...
import re import inspect from .condition import Condition import warnings __author__ = 'Móréh, Tamás' # Type of compiled regexes RE = type(re.compile("")) def element_to_string(element, encoding="unicode", method="xml", **kwargs): return YAXReader.etree.tostring(element, encoding=encoding, method=method, **kwa...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Getting Things GNOME! - a personal organizer for the GNOME desktop # Copyright (c) 2008-2013 - Lionel Dricot & Bertrand Rousseau # # This program is free software: you can redistribute it and/or modify it under # t...
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
#!/usr/bin/python import logging, os from QXSConsolas.Cli import CliApp from QXSConsolas.Command import SSH, call @CliApp( Name = "Tests something", Description = "A very nice description cannot live without the text", Opts = [ { "argument": "--name:", "default": None, "multiple": True, "desc...
""" Unofficial Python API for retrieving data from Delicious.com. This module provides the following features plus some more: * retrieving a URL's full public bookmarking history including * users who bookmarked the URL including tags used for such bookmarks and the creation time of the ...
# -*- coding: utf-8 -*- # # This file is part of the VecNet OpenMalaria Portal. # For copyright and licensing information about this package, see the # NOTICE.txt and LICENSE.txt files in its top-level directory; they are # available at https://github.com/vecnet/om # # This Source Code Form is subject to the terms of t...
from datetime import datetime as dt import logging from base_scraper import TwittrScrapr logger = logging.getLogger("TwittrScrapr.ProfileScrapr") class ProfileScrapr(TwittrScrapr): def __init__(self, api_keys, writer): """ Construct the ProfileScraper object :param api_keys: A dict con...
#!/usr/bin/env python import sys sys.path.append('../../monitor') import datetime, glob, job_stats, os, subprocess, time import matplotlib if not 'matplotlib.pyplot' in sys.modules: matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy import scipy, scipy.stats import argparse import tspl, tspl_utils c...
import ast from collections import OrderedDict from io import StringIO from typing import List, Dict, Any, Tuple, Optional import dectree.propfuncs as propfuncs from dectree.config import CONFIG_NAME_INPUTS_NAME, CONFIG_NAME_OUTPUTS_NAME, CONFIG_NAME_PARAMS_NAME from .config import get_config_value, \ CONFIG_NAME_...
# -*- coding: iso-8859-15 -*- #Copyright (C) 2005, 2008 Py-Acqua #http://www.pyacqua.net #email: info@pyacqua.net # # #Py-Acqua 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...
# -*-coding:utf8-*- from pyspider.libs.base_handler import * PAGE_START = 1 PAGE_END = 30 DIR_PATH = './platform/Python' class Handler(BaseHandler): crawl_config = { } def __init__(self): self.base_url = 'https://mm.taobao.com/json/request_top_list.htm?page=' self.page_num = 1 s...
#!/usr/bin/env python3 # Copyright (c) 2014-2017 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 wallet accounts properly when there is a double-spend conflict.""" from decimal import Decimal...
# Copyright LFUnion # 2016 # GNU # the effect of this python file # start of this file is tools #includes from os import listdir from os.path import isfile from os.path import isdir from os import chdir from os.path import abspath from os import environ #time from time import sleep #multiprocessing from multiproces...
# MIT License # # Copyright (c) 2020-2021 CNRS # # 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, merge, pu...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ test_misc: Unittests for all functions in the misc module. Copyright (C) 2017 Ivar Farup 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 ver...
"""Contstants and helpers common to multiple operations.""" from __future__ import print_function import os import sys import boto import argparse import datetime import operator import pkg_resources from collections import namedtuple from pip.utils import SUPPORTED_EXTENSIONS from boto.exception import NoAuthHandle...
""" Test Anything Protocol extension to Python's unit testing framework This module contains TAPTestRunner and TAPTestResult which are used to produce a test report in a TAP compatible format. All remaining functionality comes from Python's own unittest module. The core of the tests does not need any change and is pu...
from flask import request, make_response import os from pwd import getpwnam from grp import getgrnam from ConfigParser import ConfigParser # TODO: why not use SafeConfigParser() ?? config_parser = ConfigParser() CONFFILE = os.getenv('DIRECTOR_CFG') if not CONFFILE: CONFFILE = "/etc/cpsdirector/director.cfg" ...
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
#!/usr/bin/env python # -*- coding: utf-8 -*- import config connectFailed = { 'en': 'connect failed', 'tr': 'bağlantı başarısız' } connected = { 'en': '[System] Connected', 'tr': '[Sistem] Bağlanıldı' } authFailed = { 'en': 'auth failed', 'tr': 'giriş başarısız' } authSucces = { 'en': '[System] auth succesf...
# gpio.py: Implements the GPIO calls to operate OpenSprinkler zones # # Copyright 2013 Sudaraka Wijesinghe <sudaraka.wijesinghe@gmail.com> # # This file is part of OpenSprinkler Pi Monitor (OSPi Monitor) # # OSPi Monitor is free software: you can redistribute it and/or modify # it under the terms of the GNU General Pub...
""" the website http://www.engineeringtoolbox.com/air-altitude-pressure-d_462.html Calculates air pressure above sea level as: pressure(Pa) = 101325 * (1 - 2.25577E-5 * h)**5.25588 where x=altitude(m) 1) run script and get slightly improved answer from web site (Note that Percent Error fit has better %StdDev b...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import difflib import inspect import operator import re import sys from functools import wraps, partial from types import MethodType from flask import url_for, request, current_app from flask import make_response as original_flask_make_response from fla...
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
# -*- coding: utf-8 -*- import os def test_001_basic(settings, inspector): """Looking for parents of basic sample""" sources = [ os.path.join(settings.sample_path, 'main_basic.scss'), os.path.join(settings.sample_path, 'main_depth_import-3.scss'), os.path.join(settings.sample_path, 'ma...
# -*- coding: utf-8 -*- # # Copyright © 2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions # of the GNU General Public License v.2, or (at your option) any later # version. This program is distributed in t...
#!/usr/bin/env python import Command #~ import reicastControllers import recalboxFiles from generators.Generator import Generator import ppssppConfig import ppssppControllers import shutil import os.path import ConfigParser class PPSSPPGenerator(Generator): # Main entry of the module # Configure fba and retu...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2020 EMBL - European Bioinformatics Institute # # 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/LICEN...
import numpy as np def normalise_windows(window_data): normalised_data = [] for window in window_data: normalised_window = [((float(p) / float(window[0])) - 1) for p in window] normalised_data.append(normalised_window) return normalised_data def load_data(filename, seq_len, normalise_wind...
# Copyright (c) 2021 Project CHIP 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 in ...
# MacroIP_UDP is part of MacroIP Core. Provides Access to UDP data through simple # textual macros. # Copyright (C) 2014 Nicola Cimmino # # 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 Foundatio...
#!/usr/bin/env python """ test_pacman-mirrors ---------------------------------- Tests for `pacman-mirrors` module. """ import unittest from unittest.mock import patch from pacman_mirrors.functions import cliFn from pacman_mirrors.functions import configFn from pacman_mirrors.pacman_mirrors import PacmanMirrors fro...
from Analysis.client_pipeline.identical_list_creator import * import os import shutil TEST_FILES = "test_files" def test_compare_list(request): def clear_test_files(): shutil.rmtree(TEST_FILES, ignore_errors=True) request.addfinalizer(clear_test_files) # create test files dir if not os.path...
# -*- coding: utf-8 -*- # from functools import wraps import time import json import os import pickle import sha import re import urllib import HTMLParser import sys import traceback import collections import ssl from websocket import create_connection,WebSocketConnectionClosedException # hack to make tests possible...
#/*********************************************************************** # * Licensed Materials - Property of IBM # * # * IBM SPSS Products: Statistics Common # * # * (C) Copyright IBM Corp. 1989, 2020 # * # * US Government Users Restricted Rights - Use, duplication or disclosure # * restricted by GSA ADP Schedule C...
"""Implementations of mapping abstract base class search_orders.""" # pylint: disable=invalid-name # Method names comply with OSID specification. # pylint: disable=no-init # Abstract classes do not define __init__. # pylint: disable=too-few-public-methods # Some interfaces are specified as 'markers' and inc...
from functools import partial from client.player import Player from client.updater import fetchClientUpdate from config import Settings import fa from fa.factions import Factions ''' Created on Dec 1, 2011 @author: thygrrr ''' from PyQt4 import QtCore, QtGui, QtNetwork, QtWebKit from PyQt4.QtCore import QDataStream ...
######## # 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...
"""CopyFile task plugin for copying a file to specified location.""" import logging import os import shutil from oslo_config import cfg from seedbox.tasks import base LOG = logging.getLogger(__name__) cfg.CONF.import_group('tasks', 'seedbox.options') class CopyFile(base.BaseTask): """Provides the capability o...
#!/usr/bin/python2 import argparse import os import psycopg2 as ps from psycopg2.extensions import AsIs from psycopg2.extras import Json, DictCursor import bz2, cPickle import numpy as np import cv2 import colorsys import matplotlib.pyplot as plt from matplotlib.ticker import MultipleLocator def unpack_img(bzip2ed_pi...
# # Manage registers in a hardware design # # Copyright (C) 2008 Donald N. Allingham # # 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...
import multiprocessing import time def test(times, processID): print "Starting engine Point process %s" % processID time.sleep(times) print "Exit process %s" % processID class AdpPointProcess(): def __init__(self, engine, processID): self.processID = processID self.engine = engine ...
from enum import Enum from operator import attrgetter from django.db import models from django.db.models import sql from django.db.models.deletion import Collector from django.utils import six from django_types.operations import CustomTypeOperation from .fields import EnumField """ Use a symbol = value style as...
import numpy as np import pytest from gameanalysis import gamegen from gameanalysis import gpgame from gameanalysis import rsgame GAMES = [ ([1], 1), ([1], 2), ([2], 1), ([2], 2), ([2], 5), ([5], 2), ([5], 5), (2 * [1], 1), (2 * [1], 2), (2 * [2], 1), (2 * [2], 2), (5 *...
import json import os import multiprocessing import signal import socket import sys import time from mozlog import get_default_logger, handlers, proxy from wptlogging import LogLevelRewriter from wptserve.handlers import StringHandler here = os.path.split(__file__)[0] repo_root = os.path.abspath(os.path.join(here, o...
#!/usr/bin/env python # # Copyright 2016 Google 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 requir...
# coding=utf-8 """ install_examples.py Dialogs that installs scripts to a desired directory. Simple front end to sfc_models.examples.install_example_scripts Migrated to sfc_models.examples License/Disclaimer ------------------ Copyright 2017 Brian Romanchuk Licensed under the Apache License, Version 2.0 (the "Lic...
# Copyright (C) 2013-2019 Roland Lutz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed ...
#!/usr/bin/env python #coding: utf-8 def header(string): """ Display header """ timeInfo = time.strftime("%Y-%m-%d %H:%M") print '\n', timeInfo, "****", string, "****" def info(string): """ Display basic information """ timeInfo = time.strftime("%Y-%m-%d %H:%M") print ...
# This file is part of the Edison Project. # Please refer to the LICENSE document that was supplied with this software for information on how it can be used. try: from geraldo import Report, landscape, ReportBand, ObjectValue, SystemField,BAND_WIDTH, Label,ReportGroup from reportlab.lib.pagesizes import A5 from repo...
# who nate smith # when march 2010 # why the done tool # where midwest usa import sys from time import mktime, time from datetime import datetime import sqlite3 from termcolor import colored import sql_interp.sql_interp as si from Config import db_path class Task: def __init__(self, desc, due): self....
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 Softwa...
import argparse import ConfigParser import sys import sched import time import random from noise_generate import noise_generator from noise_dispatch import email_dispatcher, twitter_dispatcher prog_desc = """This is the NOISE program. Turn up the noise! NOISE was written in July of 2013 as a way to create "real-looki...
# -*- coding: utf-8 -*- # # Public Database documentation build configuration file # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys import os import mock MOCK...
import copy import datetime import decimal import sys from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.backends.signals import connection_created from django.db.utils import DatabaseError from pymongo.collection import Collection from pymongo.connection import Co...
from django.shortcuts import render from django.http import HttpResponse, HttpResponseRedirect from django.template import RequestContext, loader, Template, Context from django.core.urlresolvers import reverse from log.models import Entry from datetime import datetime # Create your views here. def index(request): ...
#!/usr/bin/env python # Sieve of Eratosthenes # Code by David Eppstein, UC Irvine, 28 Feb 2002 # http://code.activestate.com/recipes/117119/ def gen_primes(): """ Generate an infinite sequence of prime numbers. """ # Maps composites to primes witnessing their compositeness. # This is memory efficient...
from django.core.management.base import BaseCommand, CommandError from game.models import * from settings import MIN_COL, MAX_COL, MIN_ROW, MAX_ROW, GRID_SIZE from PIL import Image from PIL import ImageDraw def hex_to_rgb(value): value = value.lstrip('#') lv = len(value) if lv == 1: v = int(value,...
from setuptools import setup, find_packages import io version = dict() with io.open("lydoc/_version.py", "r", encoding='utf-8') as fp: exec(fp.read(), version) with io.open("README.rst", "r", encoding='utf-8') as fp: long_desc = fp.read() setup( name='lydoc', version=version['__version__'], auth...
#!/usr/bin/env python # Copyright (c) 2015-2017 The Machinecoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Perform basic ELF security checks on a series of executables. Exit status will be 0 if successful, ...
from sourcer import Grammar # This is work in progress. # See: https://help.salesforce.com/articleView?id=customize_functions.htm&type=5 g = Grammar(r''' ``` import ast ``` start = Expression Expression = OperatorPrecedence( Atom | "(" >> Expression << ")", Postfix(ArgumentList |...
''' Windows Only. Generic WMI check. This check allows you to specify particular metrics that you want from WMI in your configuration. Check wmi_check.yaml.example in your conf.d directory for more details on configuration. ''' # 3rd party import wmi # project from checks import AgentCheck UP_METRIC = 'Up' SEARCH_WI...