gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from core import C from singleton import S from operations import AssocOp from cache import cacheit from numbers import ilcm, igcd from collections import defaultdict class Add(AssocOp): __slots__ = [] is_Add = True #identity = S.Zero # cyclic import, so defined in numbers.py @classmethod ...
# Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the ...
"""SCons.Tool SCons tool selection. This looks for modules that define a callable object that can modify a construction environment as appropriate for a given tool (or tool chain). Note that because this subsystem just *selects* a callable that can modify a construction environment, it's possible for people to defin...
from __future__ import unicode_literals from django.db import models from django.forms import ModelForm from django.conf.global_settings import LANGUAGES from django.contrib.auth.models import User class CreatedUpdatedModel(models.Model): created = models.DateTimeField(auto_now_add=True) updated = models.DateTimeF...
from collections import defaultdict, Counter import sys DEBUG = False def log(*arg): """ Logging function for debugging. """ if not DEBUG: return # print "DEBUG:", for i in range(len(arg)): print arg[i], print class Stack(object): def __init__(self): self.s = [] self.size = 0 def ...
"""Binary sensor platform for hvv_departures.""" from datetime import timedelta import logging from aiohttp import ClientConnectorError import async_timeout from pygti.exceptions import InvalidAuth from homeassistant.components.binary_sensor import ( BinarySensorDeviceClass, BinarySensorEntity, ) from homeass...
from __future__ import unicode_literals, division, absolute_import import os import shutil import logging import time from flexget import plugin from flexget.event import event from flexget.utils.template import RenderError from flexget.utils.pathscrub import pathscrub def get_directory_size(directory): """ ...
# Copyright (c) 2010 Resolver Systems Ltd, PythonAnywhere LLP # See LICENSE.md # from mock import call, Mock, patch, sentinel from dirigible.test_utils import die, ResolverTestCase from sheet.cell import Cell from sheet.dependency_graph import ( _add_location_dependencies, build_dependency_graph, _generate_...
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ import os import sys from atomic_reactor.util import ImageName from atomic_reactor.inner import PushConf try: if sys.version_info.major...
# -*- coding: utf-8 -*- import pymongo from modularodm import fields from framework.auth.decorators import Auth from website.models import NodeLog from website.addons.base import GuidFile from website.addons.base import exceptions from website.addons.base import AddonNodeSettingsBase, AddonUserSettingsBase from webs...
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <[email protected]> ## This program is published under a GPLv2 license """ Classes and functions for layer 2 protocols. """ import os,struct,time from scapy.base_classes import Net from scapy...
import logging import sys from kombu.tests.utils import redirect_stdouts from celery import beat from celery import platforms from celery.app import app_or_default from celery.bin import celerybeat as celerybeat_bin from celery.apps import beat as beatapp from celery.utils.compat import defaultdict from celery.tests...
from __future__ import (division, print_function) from pomegranate import * from nose.tools import with_setup from nose.tools import assert_equal import random import numpy as np import time def setup(): ''' Build a model that we want to use to test sequences. This model will be somewhat complicated, in order to ...
""" Acquisition infrastructure shared by all modules. """ ### import #################################################################### import re import os import imp import copy import shutil import pathlib import time import traceback import appdirs import toml import numpy as np import numexpr from PySide2 ...
# This file is part of Androguard. # # Copyright (C) 2014 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 ...
from __future__ import absolute_import, division, print_function from collections import OrderedDict, Iterator import copy from functools import partial from hashlib import md5 import inspect import pickle import os import uuid from toolz import merge, groupby, curry, identity from toolz.functoolz import Compose fro...
from __future__ import unicode_literals import base64 import datetime import hashlib import json import netrc import os import re import socket import sys import time import xml.etree.ElementTree from ..compat import ( compat_cookiejar, compat_cookies, compat_HTTPError, compat_http_client, compat_...
""" topology.models -- for Schedconfig and other topology-related objects """ from django.db import models from core.settings.config import DB_SCHEMA_PANDA # Create your models here. class Schedconfig(models.Model): name = models.CharField(max_length=180, db_column='NAME') nickname = models.CharField(max_len...
# Copyright 2010 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
__author__ = 'jpi' import urllib2 import json import time import os import re from datetime import datetime from decimal import Decimal from urllib2 import HTTPError from django.core.urlresolvers import reverse from django.conf import settings from django.contrib.auth import get_user_model from stadtgedaechtnis_back...
#adults dataset def load_adult(): """loads adult dataset""" remove_sp = lambda n: n.replace(' ', '') last_column = lambda i: i.pop(-1) binary_= lambda u: 0 if u == '<=50K' else 1 defs_ = [ {'age': None}, {'workclass': ['Private', '?', 'Self-emp-not-inc', 'Self-emp-inc', 'Federal-go...
"""Tests for async util methods from Python source.""" import asyncio import sys from unittest.mock import MagicMock, patch from unittest import TestCase import pytest from homeassistant.util import async_ as hasync @patch("asyncio.coroutines.iscoroutine") @patch("concurrent.futures.Future") @patch("threading.get_i...
"""Component to manage a shoppling list.""" import asyncio import json import logging import os import uuid import voluptuous as vol from homeassistant.const import HTTP_NOT_FOUND, HTTP_BAD_REQUEST from homeassistant.core import callback from homeassistant.components import http from homeassistant.helpers import inte...
import logging import pickle from collections import MutableSet from datetime import datetime from sqlalchemy import Unicode, select, Column, Integer, DateTime, ForeignKey, or_, func from sqlalchemy.orm import relationship from sqlalchemy.sql.elements import and_ from flexget import db_schema from flexget.db_schema i...
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
import pymongo import re from pymongo.read_preferences import ReadPreference from bson.dbref import DBRef from mongoengine import signals from mongoengine.common import _import_class from mongoengine.base import ( DocumentMetaclass, TopLevelDocumentMetaclass, BaseDocument, BaseDict, BaseList, ...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
import time, glob, os from itertools import cycle import sha from mako import exceptions from mako.template import Template from mako.lookup import TemplateLookup from galaxy.web.base.controller import * try: import pkg_resources pkg_resources.require("GeneTrack") import atlas from atlas import sql ...
""" This module provides convenient functions to transform sympy expressions to lambda functions which can be used to calculate numerical values very fast. """ from __future__ import print_function, division import inspect import textwrap from sympy.core.compatibility import (exec_, is_sequence, iterable, NotIte...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from textw...
# -*- coding: utf-8 -*- """ oauthlib.common ~~~~~~~~~~~~~~ This module provides data structures and utilities common to all implementations of OAuth. """ from __future__ import absolute_import, unicode_literals import collections import datetime import logging import random import re import sys import time try: ...
#!/usr/bin/env python # 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 json import os import pipes import shutil import subprocess import sys script_dir = os.path.dirname(os.path.realpath(__file__)...
# Copyright (c) 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 applicable law or agreed to ...
from __future__ import absolute_import import os import re import six import time import logging import posixpath from sentry.models import Project, EventError from sentry.plugins import Plugin2 from sentry.lang.native.symbolizer import Symbolizer from sentry.lang.native.utils import find_all_stacktraces, \ find_...
from __future__ import absolute_import import mimetypes import os import tempfile import logging import shutil import string import copy from uuid import uuid4 import errno from django.apps import apps from django.http import Http404 from django.shortcuts import get_object_or_404 from django.utils.timezone import now...
# -*- coding: utf-8 -*- # Copyright (c) 2015-2018 Audun Gravdal Johansen """Classes to operate on SESAM structural data. """ from __future__ import division import numpy as np from .sifdata import SifData from .helpers import getrow from ..exceptions import HierarchyError, NoSuchRecordError, ResultError class Struc...
import os import time import sys import requests import random from azure.mgmt.common import SubscriptionCloudCredentials import azure.mgmt.compute import azure.mgmt.network import azure.mgmt.resource import azure.mgmt.storage class azure_api: def __init__(self, subscripid, endpoint_uri, app_id, app_secret_key):...
# # No-U-Turn Sampler (NUTS) MCMC method # # This file is part of PINTS (https://github.com/pints-team/pints/) which is # released under the BSD 3-clause license. See accompanying LICENSE.md for # copyright notice and full license details. # import asyncio import pints import numpy as np class NutsState(object): ...
############################ from Bio import SeqIO #from Bio.Seq import Seq #from BCBio.GFF import GFFExaminer #from BCBio import GFF #from Bio.Alphabet import IUPAC #import pprint import csv import re #import sys #import string #import os #from Bio.SeqRecord import SeqRecord #from Bio.Alphabet import generic_dna from...
#!/usr/bin/python """Utility functions for scripts in my bin diretory. This module contains common utilities such as wrappers for error/warning reporting, executing shell commands in a controlled way, etc. These functions are shared by a number of helper scripts. """ import locale import os import re import shlex im...
''' Greymind Sequencer for Maya Version: 1.8.0 (c) 2009 - 2015 Greymind Inc. Balakrishnan (Balki) Ranganathan (balki_live_com) All Rights Reserved. ''' # from Common import * from functools import partial as Partial SequencerVersion = "1.8.0" class Animation: Id = -1 Name = "" StartFrame = -1 ...
from jsonrpc import ServiceProxy import sys import string import getpass # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:65015") ...
"""Platform for climate integration.""" from __future__ import annotations from datetime import timedelta from typing import Any from pymelcloud import DEVICE_TYPE_ATA, DEVICE_TYPE_ATW, AtaDevice, AtwDevice import pymelcloud.ata_device as ata import pymelcloud.atw_device as atw from pymelcloud.atw_device import ( ...
#!/usr/bin/env python # -*- coding: utf-8 -*- ## @package TMS1mmSingle # Control module for the Topmetal-S 1mm Electrode single-chip test. # from __future__ import print_function import copy from command import * import socket import time ## Manage Topmetal-S 1mm chip's internal register map. # Allow combining and d...
# -*- 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 field 'Question.identifier' db.add_column(u'survey_question', 'identifier', s...
# Algorithm for determining chord symbols based on frequency spectrum from __future__ import division import math samplingFrequency = 2000 bufferSize = 1024 referenceFrequency = 130.81278265 # C numHarmonics = 2 numOctaves = 4 numBinsToSearch = 2 noteFrequencies = [] chromagram = [0.0000000000000000000]*12 noteNames ...
# Copyright 2016 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...
# (c) 2005 Ian Bicking, Clark C. Evans and contributors # This module is part of the Python Paste Project and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import time import random import os import tempfile try: # Python 3 from email.utils import parsedate_tz, mktime_t...
from __future__ import unicode_literals import threading import weakref from functools import wraps import six from psycopg2cffi._impl import consts from psycopg2cffi._impl import encodings as _enc from psycopg2cffi._impl import exceptions from psycopg2cffi._impl.libpq import libpq, ffi from psycopg2cffi._impl import...
import glob import os.path import re import subprocess import sys import time base_dir = os.path.dirname(__file__) maxas_dir = os.path.join(base_dir, "maxas") sass_dir = os.path.join(base_dir, "sass") # Tile sizes: m, n, k, vA,vB,vC div, op (dynamic shared options) k128x128x8 = (128, 128, 8, 4, 4, 1,...
""" Basic tests for XForms """ import os from django.test import TestCase, TransactionTestCase from django.contrib.auth.models import User, Group from django.test.client import Client from django.core.exceptions import ValidationError from .models import XForm, XFormField, XFormFieldConstraint, xform_received, lookup_...
''' Visgraph supports backing the graph objects with a postgres db. ''' import psycopg2 import traceback import collections import visgraph.graphcore as vg_graphcore init_db = ''' DROP TABLE IF EXISTS vg_edges; CREATE TABLE vg_edges ( eid BIGSERIAL, n1 BIGINT, n2 BIGINT, ...
# Copyright 2010 Hakan Kjellerstrand [email protected] # # 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 ...
#!/usr/bin/env python3 # Copyright 2018 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. """Creates several files used by the size trybot to monitor size regressions.""" import argparse import collections import json impor...
# # 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...
from datetime import datetime from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from mock import ANY, Mock, patch from nose.tools import eq_, ok_, raises from amo.tests import app_factory, TestCase from constants.payments import PROVIDER_BANGO, PROVIDER_REFERENCE from mkt.developers.models ...
'''Contains DStoken class for DateSense package.''' # Used by the parser for keeping track of what goes where, and what can possibly go where class DStoken(object): '''DStoken objects are used by the parser for keeping track of what goes where in tokenized date strings, and what can possibly go where in ...
# Copyright (C) 2013 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
from __future__ import unicode_literals import tablib from copy import deepcopy from datetime import date from decimal import Decimal from unittest import skip, skipUnless from django import VERSION from django.conf import settings from django.contrib.auth.models import User from django.db import IntegrityError, Data...
#!/usr/bin/env python3 import os import shutil import json import yaml from PIL import Image from nxtools import * class GremaProduct(): def __init__(self, parent, title): self.parent = parent self.title = title self.slug = slugify(title) @property def data_dir(self): re...
# Copyright (c) 2014 NetApp, Inc. # Copyright (c) 2015 Mirantis, 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/license...
# -*- encoding: utf-8 -*- __author__ = 'kotaimen' __date__ = '07/11/2017' from troposphere import Base64, FindInMap, GetAtt, Join, Select, Sub from troposphere import ImportValue, Export from troposphere import Condition, And, Equals, If, Not, Or from troposphere import Template, Parameter, Ref, Tags, Output from tro...
# Copyright 2015 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...
# encoding: utf-8 """Magic functions for InteractiveShell. """ #----------------------------------------------------------------------------- # Copyright (C) 2001 Janko Hauser <[email protected]> and # Copyright (C) 2001 Fernando Perez <[email protected]> # Copyright (C) 2008 The IPython Development Team # Dist...
import sys import os sys.path.insert(0, os.environ["QUEX_PATH"]) from quex.blackboard import setup, \ E_Compression import quex.blackboard as blackboard from quex.input.command_line.GetPot import GetPot import quex.input...
# pylint: disable=g-bad-file-header # Copyright 2016 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/LICENS...
from django.test import TestCase from django.contrib.auth.models import Group from hs_access_control.models import PrivilegeCodes from hs_core import hydroshare from hs_core.testing import MockIRODSTestCaseMixin from hs_access_control.tests.utilities import global_reset, is_equal_to_as_set class T11ExplicitGet(Moc...
#!/usr/bin/env python ''' tile-flatten-merge.py This script will create a file for upload containing the flattened data in the files from the mof_dir directory (the MOF files) but only for those objects included in the corresponding id file in coaddid_dir. Usage: python tile-flatten-merge.py -d [mof_dir] -i [coaddid_di...
"""setuptools.command.egg_info Create a distribution's .egg-info directory and contents""" # This module should be kept compatible with Python 2.3 import os, re from setuptools import Command from distutils.errors import * from distutils import log from setuptools.command.sdist import sdist from distutils.util import...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models import pymongo class Migration(SchemaMigration): def forwards(self, orm): from moocng.mongodb import get_db db = get_db() activity = db.get_collection('groups'...
import os,rarfile,zipfile,tarfile,re,sys import comics from shutil import copyfile from django.conf import settings from operator import attrgetter from . import fnameparser from . import utils from urllib.parse import quote class ComicFileHandler(object): def __init__(self): # Set the unrar tool based on filesyst...
from flask import Flask, request, redirect, url_for, jsonify, session, render_template, abort from functools import wraps import requests import urllib.parse import os import json import sys SETTINGS_FILENAME = 'loco.json' if not os.path.exists(SETTINGS_FILENAME): print("Cannot find settings file `{}`".format(SET...
# # Copyright 2016 The BigDL 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 ...
# Copyright 2016 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...
import os, time, urllib2, threading, hashlib, shutil, gzip import xbmc, xbmcvfs, xbmcaddon from StringIO import StringIO from PIL import Image from PIL import ImageEnhance __addon__ = xbmcaddon.Addon() __mainaddon__ = xbmcaddon.Addon('weather.openweathermap.extended') __addonid__ = __addon__.getAddonInfo('id'...
""" kombu.transport.mongodb ======================= MongoDB transport. :copyright: (c) 2010 - 2012 by Flavio Percoco Premoli. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import pymongo from pymongo import errors from anyjson import loads, dumps from pymongo.connection im...
#!/usr/bin/python import os, string, sys, time, re, math, fileinput, glob, shutil import threading, platform, codecs, commands from os.path import expanduser from time import gmtime, strftime # * Description: For clone and update git # my-git.py project_flag branch_name archive_flag # my-git.py apk maste...
import unittest import ctypes import errno import os import tempfile from pathlib import Path from g1.files import xattrs from g1.files import _xattrs class XattrsTestBase(unittest.TestCase): def setUp(self): super().setUp() self._tempfile = tempfile.NamedTemporaryFile() # pylint: disable=cons...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains simple functions for dealing with circular statistics, for instance, mean, variance, standard deviation, correlation coefficient, and so on. This module also cover tests of uniformity, e.g., the Rayleigh and V tests. The Maximum L...
"""Tests for the Entity Registry.""" from unittest.mock import patch import pytest from homeassistant.const import EVENT_HOMEASSISTANT_START, STATE_UNAVAILABLE from homeassistant.core import CoreState, callback, valid_entity_id from homeassistant.helpers import entity_registry from tests.common import ( MockConf...
__author__ = 'Girish' # Bridge Edges v4 # # Find the bridge edges in a graph given the # algorithm in lecture. # Complete the intermediate steps # - create_rooted_spanning_tree # - post_order # - number_of_descendants # - lowest_post_order # - highest_post_order # # And then combine them together in # `bridge_edge...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
#!/usr/bin/env python """Neeraj's generic image aligner. Usage: python %s Some information is written to the saved image, in the UserComment, in our usual format. This includes: - all the parameters passed in via <parameters>, - <METHOD>_TIMESTAMP@seconds_since_the_epoch, where <METHOD> is the capitalized method, ...
''' Unit tests for yedit ''' import os import sys import unittest import mock # Removing invalid variable names for tests so that I can # keep them brief # pylint: disable=invalid-name,no-name-in-module # Disable import-error b/c our libraries aren't loaded in jenkins # pylint: disable=import-error # place yedit in ...
import logging import uuid import pytest import requests import test_helpers from dcos_test_utils import marathon __maintainer__ = 'kensipe' __contact__ = '[email protected]' log = logging.getLogger(__name__) def deploy_test_app_and_check(dcos_api_session, app: dict, test_uuid: str): """This me...
r''' This module provides utilities to get the absolute filenames so that we can be sure that: - The case of a file will match the actual file in the filesystem (otherwise breakpoints won't be hit). - Providing means for the user to make path conversions when doing a remote debugging session in ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from colorama import Fore, Style import os import sys import errno import re import math def print_str(args, _str): """print without newline""" if not args.has_log: sys.stdout.write(_str) sys.stdout.flush() def norm_path(path)...
import cuttsum.events import cuttsum.corpora from cuttsum.pipeline import InputStreamResource from cuttsum.classifiers import NuggetRegressor import cuttsum.judgements import pandas as pd import numpy as np from datetime import datetime from cuttsum.misc import event2semsim from sklearn.cluster import AffinityPropagat...
# Copyright (c) 2013 Red Hat, 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 python3 from fontTools import ttLib import os import sys __doc__ = '''\ Prints all possible kerning pairs within font. Supports RTL kerning. Usage: ------ python getKerningPairsFromOTF.py <path to font file> ''' kKernFeatureTag = 'kern' kGPOStableName = 'GPOS' finalList = [] class myLeftClass: ...
import toolz import numpy as np import theano import theano.tensor as T import treeano import treeano.nodes as tn from . import base from .. import transforms fX = theano.config.floatX class RemoveNodesWithClass(base.NetworkHandlerImpl): """ handler that adds hyperparameters to the network """ def...
# -*- coding: utf-8 -*- """ > Overview This program contains a sample implementation for loading a map produced by Tiled in pyglet. The script can be run on its own to demonstrate its capabilities, or the script can be imported to use its functionality. Users will hopefully use the ResourceLoaderPyglet already provide...
import logging from discord.ext import commands from discord.ext.commands import Context from cogbot import checks from cogbot.cog_bot import CogBot from cogbot.extensions.groups.error import * from cogbot.extensions.groups.group_directory import GroupDirectory log = logging.getLogger(__name__) class GroupsConfig:...
import random from collections.abc import Iterable import numpy as np from dipy.tracking.localtrack import local_tracker, pft_tracker from dipy.tracking.stopping_criterion import (AnatomicalStoppingCriterion, StreamlineStatus) from dipy.tracking import utils class Local...
# Copyright (c) 2019, CRS4 # # 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, publish, distribu...
#!/usr/bin/env python # # Copyright (c) 2001 - 2016 The SCons Foundation # # 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 us...
import unittest import os, sys, os.path, time, inspect from filecmp import dircmp from tempfile import mkdtemp from shutil import rmtree, copy2 from zipfile import ZipFile import mozunit from JarMaker import JarMaker if sys.platform == "win32": import ctypes from ctypes import POINTER, WinError DWORD = ct...
# -*- coding: utf-8 -*- __author__ = 'breddels' import sys import vaex from vaex.ui.qt import * import vaex.ui.qt as dialogs import astropy.units import astropy.io.votable.ucd import logging from vaex.ui.icons import iconfile import vaex.ui.completer logger = logging.getLogger("vaex.ui.columns") completerContents = "...
# -*- coding: utf-8 -*- # vim: ts=2 sw=2 et ai ############################################################################### # Copyright (c) 2012,2021 Andreas Vogel [email protected] # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentatio...
# Copyright 2007 Neal Norwitz # Portions Copyright 2007 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 ...