src
stringlengths
721
1.04M
import logging import struct from .utility import get_word if len(logging._handlerList) == 0: logging.basicConfig(level=logging.INFO, format="%(asctime)-15s %(message)s") LOG = logging.getLogger(__name__) class PeTools(object): BITNESS_MAP = {0x14c: 32, 0x8664: 64} @staticmethod def mapBinary(binar...
from __future__ import unicode_literals, with_statement import re import os import subprocess from django.utils.encoding import smart_str from django.core.files.temp import NamedTemporaryFile from sorl.thumbnail.base import EXTENSIONS from sorl.thumbnail.compat import b from sorl.thumbnail.conf import settings from s...
import shutil from typing import List, Tuple, Optional import attr import click from furl import furl # type: ignore from pyffdl.__version__ import __version__ from pyffdl.sites import ( AdultFanFictionStory, ArchiveOfOurOwnStory, FanFictionNetStory, HTMLStory, TwistingTheHellmouthStory, TGSt...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from sure import scenario from pyeqs import QuerySet from tests.helpers import prepare_data, cleanup_data, add_document @scenario(prepare_data, cleanup_data) def test_simple_search_with_host_string(context): """ Connect with host string """...
# encoding: utf-8 from woo.dem import * from woo.fem import * import woo.core, woo.dem, woo.pyderived, woo.models, woo.config import math from minieigen import * class CylDepot(woo.core.Preprocessor,woo.pyderived.PyWooObject): ''''Deposition of particles inside cylindrical tube. This preprocessor was created for ...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright (c) 2014, Georgios Is. Detorakis (gdetor@gmail.com) and # Nicolas P. Rougier (nicolas.rougier@inria.fr) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redis...
#!/usr/bin/env python # -*- encoding: utf-8; indent-tabs-mode: nil -*- """ crawler ~~~~~~~ desc :copyright: (c) 2015 Menglong TAN. """ import os import sys import re import urllib2 import time import BeautifulSoup import logging logger = logging.getLogger(__file__) logger.setLevel(logging.DEBUG) ch ...
import json import logging import sys from functools import wraps from django.conf import settings from django.core.cache import caches from django.core.validators import ValidationError, validate_email from django.views.decorators.csrf import requires_csrf_token from django.views.defaults import server_error from dja...
# encoding: utf-8 # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # # MIMICS THE requests API (http://docs.python-re...
import pytest from astropy import units as u from astropy.tests.helper import assert_quantity_allclose from poliastro.bodies import ( Sun, Mercury, Venus, Earth, Moon, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto, Body ) from poliastro.patched_conics import compute_soi def test_compute_soi(): # Dat...
# -*- coding: utf-8 -*- # ***************************************************************************** # Copyright (c) 2020, Intel Corporation All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # written for python 3 but also run on python 2 from __future__ import absolute_import, division, print_function, unicode_literals """ make index json file from text file tree. Expects Python 3 https://github.com/sukuba/js-py-document-search """ import argparse import os...
# Basic infrastructure for Bubble Shooter import simplegui import random import math # Global constants WIDTH = 800 HEIGHT = 600 FIRING_POSITION = [WIDTH // 2, HEIGHT] FIRING_LINE_LENGTH = 60 FIRING_ANGLE_VEL_INC = 0.02 BUBBLE_RADIUS = 20 COLOR_LIST = ["Red", "Green", "Blue", "White"] # global variables firing_angle...
# -*- coding: utf-8 -*- """ /*************************************************************************** ACS_preProcessing1Dialog A QGIS plugin Transfer stream data ------------------- begin : 2017-07-26 git sha ...
import os import sys import tempfile from pathlib import Path import arcpy import pandas as pd import numpy as np import geopandas as gpd #constants #WGS_1984 coordinate system WGS_1984 = \ "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984', "+\ "SPHEROID['WGS_1984',6378137.0,298.257223563]], "+\ "PRIMEM['Greenwi...
'''This module provides a class for Reference calls to the CC API''' from currencycloud.http import Http from currencycloud.resources import BeneficiaryRequiredDetails, ConversionDates, Currency, SettlementAccount, PayerRequiredDetails, PaymentPurposeCode, BankDetails, PaymentFeeRule class Reference(Http): '''Th...
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.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, eithe...
import os import sys import termios import fcntl from blessings import Terminal def getch(): fd = sys.stdin.fileno() oldterm = termios.tcgetattr(fd) newattr = termios.tcgetattr(fd) newattr[3] = newattr[3] & ~termios.ICANON & ~termios.ECHO termios.tcsetattr(fd, termios.TCSANOW, newattr) oldfl...
from __future__ import unicode_literals from django.core.management.base import NoArgsCommand from doc.actions import parse_doc from optparse import make_option from docutil.commands_util import recocommand from docutil.str_util import smart_decode class Command(NoArgsCommand): option_list = NoArgsCommand.option_...
import unittest2 as unittest from nose.plugins.attrib import attr from mock import patch, MagicMock, call from jnpr.junos.exception import FactLoopError from jnpr.junos import Device from ncclient.manager import Manager, make_device_handler from ncclient.transport import SSHSession __author__ = "Stacy Smith" __credi...
#!/usr/bin/python2.7 import sqlalchemy as sqla import codecs, re uistring = '/mnt/500G/Games/dragonnest/extract/resource/uistring/uistring.xml' message_re = re.compile(r'<message mid="(\d+)"><!\[CDATA\[(.+)\]\]></message>', re.UNICODE|re.DOTALL) def readlines(f, bufsize): buf = u'' data = True while data:...
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [] setup_requirements = ['pytest-runne...
# Copyright 2006-2014 Mark Diekhans import unittest, sys, cPickle if __name__ == '__main__': sys.path.extend(["../../..", "../../../.."]) from pycbio.sys.symEnum import SymEnum, SymEnumValue from pycbio.sys.testCaseBase import TestCaseBase class Color(SymEnum): red = 1 green = 2 blue = 3 class GeneFea...
import uuid import math import time import logging import redis as engine from zencore.errors import WrongParameterTypeError from .types import smart_force_to_string logger = logging.getLogger(__name__) class RedisLock(object): def __init__(self, url, name=None, app_name=None, expire=None, prefix="zencore:lock...
# Copyright (C) 2010 Google 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 agreed to in writ...
#!/usr/bin/env python # Copyright (c) 2011, Development Seed, Inc. # 2011, Andrew Harvey <andrew.harvey4@gmail.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: #...
import sys reload(sys) sys.setdefaultencoding("utf-8") from flask import Flask, request, render_template import requests from bs4 import BeautifulSoup import os app = Flask(__name__) header = {"User-Agent":"instadown", "e-mail":"contato@contato.com"} def get_data(url): r = requests.get(url, headers=header) ...
""" Provides useful functions and classes. Most useful are probably printTreeDocs and printTreeSpec. :copyright: Copyright since 2006 by Oliver Schoenborn, all rights reserved. :license: BSD, see LICENSE_BSD_Simple.txt for details. """ import sys __all__ = ('printImported', 'Callback') def printImported(): """...
from django.template import RequestContext from django.core.context_processors import csrf from django.shortcuts import render_to_response from django.http import Http404, HttpResponse, HttpResponseRedirect import json from urllib import urlopen from subprocess import call def test(request): c = {} return rend...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ The experiment with 10 Hz/5Hz, wisp, attention, 70, cA 5, delta, theta, alpha low, alpha high, beta low, beta high, batch size = 10 and balanced data set @author: yaric """ import experiment as ex import config from time import time n_hidden = 5 batch_size = 10 ex...
# -*- coding: utf-8 -*- # # django-tellafriend documentation build configuration file, created by # sphinx-quickstart on Fri Aug 6 20:14:06 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated fi...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re pattern = r'^[0-9.]+$' try: addr = raw_input('input ip address: \n') if re.match(pattern, addr): pass else: print('A incorrect address') addr = '192.168.1.1' except ValueError: print "A incorrect address" command = 'ipset -L | grep ' comman...
#!/usr/bin/python # -*- coding: iso-8859-15 -*- # ========================================================================== # Copyright (C) 2016 Dr. Alejandro Pina Ortega # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may ob...
# -*- coding: utf-8 -*- """ This file is part of Radar. Radar is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Radar is distributed ...
# 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...
""" Test CuisineCore module """ import unittest from unittest.mock import patch, PropertyMock import copy from JumpScale import j @patch('JumpScale.core.redis.Redis.hget') @patch('JumpScale.core.redis.Redis.hset') class TestCuisineCore(unittest.TestCase): def setUp(self): self.dump_env = { '...
# -*- coding: utf8 -*- import unittest import urllib from django.utils import translation from mock import Mock from nose.tools import eq_ from pyquery import PyQuery as pq import amo import amo.tests from amo.urlresolvers import reverse from amo.tests.test_helpers import render from addons.models import Addon from ...
import random import os from math import sqrt from multiprocessing import Pool import simulation.Networks as Network import simulation.Contagion as Contagion import simulation.System as System import simulation.MCMC as MCMC random.seed(int("54e22d", 16)) steps = 1000000 side = 100 spins = side * side def observable...
from coinpy.lib.vm.stack_valtype import cast_to_number, valtype_from_number from coinpy.lib.vm.opcode_impl.flow import op_verify import functools def arithmetic_op(vm, func, arity): if len(vm.stack) < arity: raise Exception("Not enought arguments") args = [cast_to_number(vm.stack.pop()) for _ in range...
#!/usr/bin/env python #!coding:utf-8 import unittest import sys import set_path from nfa import NFA class TestNFA(unittest.TestCase): EPSILON = 'epsilon' start = 'q0' final = {'q0'} sigma = ['0', '1', 'epsilon'] states = ['q0', 'q1', 'q2'] ttable = [[{}, {'q1'}, {'q2'}], [{'q...
# From Python 2.5.1 # tempfile.py unit tests. import tempfile import os import sys import re import errno import warnings import unittest from test import test_support warnings.filterwarnings("ignore", category=RuntimeWarning, message="mktemp", module=__name__) if has...
""" The nth term of the sequence of triangle numbers is given by, tn = ½n(n+1); so the first ten triangle numbers are: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ... By converting each letter in a word to a number corresponding to its alphabetical position and adding these values we form a word value. For example, the word...
## 1. Overview ## import pandas as pd food_info = pd.read_csv('food_info.csv') col_names = food_info.columns.tolist() print(food_info.head(3)) ## 2. Transforming a Column ## div_1000 = food_info["Iron_(mg)"] / 1000 add_100 = food_info["Iron_(mg)"] + 100 sub_100 = food_info["Iron_(mg)"] - 100 mult_2 = food_info["Iron...
import os from prettytable import PrettyTable from counterpartycli import wallet, util # TODO: inelegant def get_view(view_name, args): if view_name == 'balances': return wallet.balances(args.address) elif view_name == 'asset': return wallet.asset(args.asset) elif view_name == 'wallet': ...
# vim: set fileencoding=utf-8 sw=2 ts=2 et : from __future__ import absolute_import from __future__ import with_statement from logging import getLogger import networkx as NX import yaml from systems.collector import Aggregate, CResource from systems.registry import get_registry from systems.typesystem import EResour...
# -*- coding: utf-8 -*- # # BrodyHopfield.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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, ...
from __future__ import with_statement from app import app from flask import request, jsonify from werkzeug.exceptions import BadRequest import threading import subprocess import os import sys import traceback import datetime import uuid import time from newman_es.es_search import initialize_email_addr_cache from ut...
#!/usr/bin/env python import sys import vtk from PyQt4 import QtCore, QtGui from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor class MainWindow(QtGui.QMainWindow): def __init__(self, parent=None): QtGui.QMainWindow.__init__(self, parent) self.frame = QtGui.QFrame() ...
#!/usr/bin/python import sys import json from client import client from colors import colors from mpos_osx import get_mouse_pos, Point from time import sleep from clone import clone_from PORT = 8888 variables = {'@win': 'C:\\Windows', '@sys': 'C:\\Windows\\system32', '@yas': '10.71.36', ...
# Copyright (c) 2013 Calin Crisan # This file is part of motionEye. # # motionEye 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. # #...
"""" Introduction Adventure Author: Ignacio Avas (iavas@sophilabs.com) """ import codecs import io import sys import unittest from story.adventures import AdventureVerificationError, BaseAdventure from story.translation import gettext as _ class TestOutput(unittest.TestCase): """Variables Adventure test""" d...
class Field: """ A field keeps track of all positions on a field and the content of these posisions. :param length: Length of the field. :param height: The height of the field. """ def __init__(self, width=10, height=10): self.width = 10 self.height = 10 self.field =...
import datetime import hmac import base64 import hashlib import asyncio from xml.etree.ElementTree import fromstring as parse_xml from xml.etree.ElementTree import tostring as xml_tostring from xml.etree.ElementTree import Element, SubElement from functools import partial from urllib.parse import quote import aiohttp ...
# ---------------------------------------------------------------------------- # # # # 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 ...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'SessionBlockTweet' db.create_table(u'twit_sessionblocktweet', ( (u'id', self.gf(...
#!/bin/env python3 import sys import collections def main(): sites = collections.defaultdict(set) for filename in sys.argv[1:]: try: with open(filename) as open_file: for line in open_file: add_sites(line, sites, filename) except EnvironmentErro...
import functools import itertools import types import typing as tp # NOQA import unittest import numpy import six from chainer.testing import _bundle from chainer import utils def _param_to_str(obj): if isinstance(obj, type): return obj.__name__ return repr(obj) def _shorten(s, maxlen): # Sho...
# Copyright (C) 2011 Statoil ASA, Norway. # # The file '__init__.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT 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 ...
''' Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target. Link: https://leetcode.com/problems/4sum/#/description Example: For example, given array S = [1, 0, -1, 0, -2, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # config.py # # Copyright 2016 Andrei Tumbar <atuser@Kronos> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the Li...
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # 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...
# encoding: utf-8 """ origin.py Created by Thomas Mangin on 2009-11-05. Copyright (c) 2009-2017 Exa Networks. All rights reserved. License: 3-clause BSD. (See the COPYRIGHT file) """ from exabgp.bgp.message.update.attribute.attribute import Attribute # ===============================================================...
# Copyright 2010-2011 OpenStack Foundation # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # 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/licens...
from django.dispatch.dispatcher import Signal from location.models import LocationSnapshot location_updated = Signal(providing_args=['user', 'from_', 'to']) location_changed = Signal(providing_args=['user', 'from_', 'to']) class watch_location(object): def __init__(self, user): self.user = user de...
#!/usr/bin/python # -*- coding: utf-8 -*- # armoni.py # # Copyright 2012-2014 Ángel Coto <codiasw@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of t...
#!/usr/bin/env python3 import json, sys, time as dt, pprint, math import urllib import imgur_config from Imgur.Factory import Factory from Imgur.Auth.Expired import Expired try: from urllib.request import urlopen as UrlLibOpen from urllib.request import HTTPError except ImportError: from urllib2 import ur...
""" Functions about shapes. """ from typing import Optional, List, Dict, TYPE_CHECKING import pandas as pd from pandas import DataFrame import numpy as np import utm import shapely.geometry as sg from . import constants as cs from . import helpers as hp # Help mypy but avoid circular imports if TYPE_CHECKING: fr...
# coding=utf-8 from emft.core import constant from emft.core.logging import make_logger from emft.gui.base import GridLayout, HSpacer, Label, VLayout, VSpacer from emft.gui.main_ui_tab_widget import MainUiTabChild LOGGER = make_logger(__name__) class TabChildAbout(MainUiTabChild): def tab_clicked(self): ...
# Copyright (c) 2014 by Ecreall under licence AGPL terms # available on http://www.gnu.org/licenses/agpl.html # licence: AGPL # author: Amen Souissi from pyramid.view import view_config from pyramid.httpexceptions import HTTPFound from dace.util import getSite from dace.processinstance.core import DEFAULTMAPPING_A...
"""Meanshift clustering. Authors: Conrad Lee conradlee@gmail.com Alexandre Gramfort alexandre.gramfort@inria.fr Gael Varoquaux gael.varoquaux@normalesup.org """ from collections import defaultdict import numpy as np from ..utils import extmath, check_random_state from ..base import BaseEstimator fr...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ The experiment with 10 Hz/5Hz, wisp, attention, 70, cA 7, delta, theta, alpha low, alpha high, beta low, beta high, gamm low, batch size = 5 and balanced data set @author: yaric """ import experiment as ex import config from time import time n_hidden = 7 batch_size...
from typing import Tuple, Union, Generator from .program_members import (Attribute, Subroutine, Uniform, UniformBlock, Varying) __all__ = ['Program', 'detect_format'] class Program: ''' A Program object represents fully processed executable code in the OpenGL Shadin...
# This code demonstrates how the eBot can be used to detect an obstacle and turn left/right/stop. # All sonar values are reported during the exercise. # Copyright (c) 2014, Erik Wilhelm # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided ...
# [h] set advance width of selected glyphs ### options `split difference` and `relative split` ### suggested and funded by Bas Jacobs / Underware # imports from mojo.roboFont import CurrentFont, CurrentGlyph from vanilla import * from hTools2 import hDialog from hTools2.dialogs.misc import Spinner from hTools2.modu...
import unittest import os from happana.template import SafeTester from happana.template import RiskyTester class SafeDBTester(SafeTester): """ General template for safe "DB" modules testing """ def __init__(self, test_name): SafeTester.__init__(self, test_name) def set_dir(self): self.wo...
from __future__ import print_function import time import os from graph import Graph from graph import make from graph import GraphException from graph import Matrix def run(name): graph = make( name ) ret = [0,0] start = time.time() graph.dfs(0) ret[1] = (time.time()-star...
"""Callback management utilities""" import collections from ctypes import * # pylint: disable=wildcard-import,unused-wildcard-import import logging class CallbackManager(object): """Manager for ctypes DLL hooks""" def __init__(self, dll): self.dll = dll self.hooks = collections.defaultdict(di...
import gzip import logging from overrides import overrides import numpy import torch from torch.nn.functional import embedding import h5py from allennlp.common import Params from allennlp.common.checks import ConfigurationError from allennlp.common.file_utils import cached_path from allennlp.data import Vocabulary fr...
# -*- test-case-name: txweb2.test.test_server -*- ## # Copyright (c) 2001-2008 Twisted Matrix Laboratories. # Copyright (c) 2010-2014 Apple Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), t...
#!/usr/bin/env python # Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia 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 ...
from django.contrib.sites.models import Site from django.core.cache import cache from django.db import models from django.utils import translation from templatefield.fields import TemplateTextField from templatefield.managers import RenderTemplateManager class FlatContent(models.Model): slug = models.SlugField(ma...
""" Stores global access to draw to the window. The graphics context is the embodiment of what will be drawn. Whenever something wants draw to the screen, it must do so via what is provided here. In particular, most drawing is done by providing sprites and data about how to position, rotate, and scale the sprite....
#!/usr/bin/python3 # -*- coding: utf-8 -*- '''Pychemqt, Chemical Engineering Process simulator Copyright (C) 2009-2017, Juan José Gómez Romera <jjgomera@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Softwar...
# Copyright 2015 Metaswitch Networks # # 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 w...
# Copyright (C) 2009, Thomas Leonard # See the README file for details, or visit http://0install.net. from __future__ import print_function import os, sys import logging import warnings from optparse import OptionParser from zeroinstall import _, SafeException from zeroinstall.injector import requirements from zero...
from gi.repository import Gtk from pychess import Variants from pychess.Utils.const import NORMALCHESS, ATOMICCHESS, BUGHOUSECHESS, CRAZYHOUSECHESS, \ LOSERSCHESS, SUICIDECHESS, FISCHERRANDOMCHESS, WILDCASTLESHUFFLECHESS, \ SHUFFLECHESS, RANDOMCHESS, ASYMMETRICRANDOMCHESS, WILDCASTLECHESS, UPSIDEDOWNCHESS, \ ...
# This file is part of Radicale Server - Calendar Server # Copyright © 2008 Nicolas Kandel # Copyright © 2008 Pascal Halter # Copyright © 2008-2017 Guillaume Ayoub # Copyright © 2017-2018 Unrud <unrud@outlook.com> # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU G...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2020 The Project U-Ray Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC import os import random random.seed(int(o...
#!/usr/bin/python -u # Copyright (c) 2010-2012 OpenStack Foundation # # 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 ap...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Minimal path in a 80x80 matrix, from top left node to bottom right node. Moving up, down, left, or right directions. ''' from __future__ import print_function import timeit import os try: range = xrange except NameError: pass path = os.getcwd().strip('py_...
"""Registry of available TrueType font files XXX Currently two copies of exactly the same font will likely confuse the registry because the specificFonts set will only have one of the metrics sets. Nothing breaks at the moment because of this, but it's not ideal. """ from ttfquery import describe, fi...
# Copyright (c) 2011 OpenStack, LLC. # 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 requi...
''' Created on Nov 5, 2015 @author: David Zwicker <dzwicker@seas.harvard.edu> ''' from __future__ import division import numpy as np class Cuboid(object): """ class that represents a cuboid in n dimensions """ def __init__(self, pos, size): self.pos = np.asarray(pos) self.size = np.as...
import requests import sys, getopt, os import time import datetime CHUNK_SIZE = 1024 MB_SIZE = 1048576 links = None outputdir = None def main(): try: opts, args = getopt.getopt(sys.argv[1:],"hf:o:",["file=","outdir="]) except getopt.GetoptError: print('usage: bulk-downloader.py -f <link.txt>...
############################################################################# ## ## Copyright (C) 2015 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing ## ## This file is part of Qt Creator. ## ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance wit...
import os import unittest from vsg.rules import process from vsg.rules import architecture from vsg import vhdlFile from vsg.tests import utils # Read in test file used for all tests lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(os.path.dirname(__file__), 'next_line_code_tag_test_input.vhd')) oFile = v...
# Copyright 2005 Mark Rose <mkrose@users.sourceforge.net> # All rights reserved. from NodeConstructor import * RegisterNetwork(globals()) ####################################################################### # pitch control laws class filtered_pitch_rate(LeadFilter): a = 1.0 input = "pitch_rate" gain = Radians...
#------------------------------------------------------------------------------- # PROJECT: VHDL Code Generator # NAME: System # # LICENSE: GNU-GPL V3 #------------------------------------------------------------------------------- __author__ = "BlakeTeam" import lib.signature from lib import * from .B...
from CommonServerPython import * ''' IMPORTS ''' from typing import Dict, Tuple, List, AnyStr, Optional, Union import urllib3 # Disable insecure warnings urllib3.disable_warnings() """GLOBALS/PARAMS Attributes: INTEGRATION_NAME: Name of the integration as shown in the integration UI, for example: Microso...