input
stringlengths
2.65k
237k
output
stringclasses
1 value
col + 1, key['enabled'], cell_format_center) xls_settings.write(row, col + 2, key['learn'], cell_format_center) row += 1 row += 3 ##-------------- Print Evasion ----------------# xls_settings.write(row, col, 'Evasion Settings') row += 2 xls_settings.write(row, col, 'Evasion Techniques') xls_settings...
<reponame>zxkjack123/pypact<gh_stars>10-100 import os import pypact as pp from pypact.printlib.printlib5 import SpectralData from tests.testerbase import Tester, REFERENCE_DIR class PrintLib5UnitTest(Tester): def setUp(self): self.filename = os.path.join(os.path.join(REFERENCE_DIR), "printlib5.out") def tearDow...
<filename>scikits/gpu/shader.py<gh_stars>1-10 """ Copyright (c) 2009, <NAME> <<EMAIL>> This module was originally based on code from http://swiftcoder.wordpress.com/2008/12/19/simple-glsl-wrapper-for-pyglet/ which is Copyright (c) 2008, <NAME> Permission is hereby granted, free of charge, to any person or organiza...
keys class AioRedisBackend(RedisBackend): """Redis Backend logic that constructed by asyncio-redis. """ def __init__(self, poolsize=10, loop=None): self.version = dfconf['mark_version'] self._loop = loop if loop else asyncio.get_event_loop() self.poolsize = poolsize async def init_connection(self): self.rdb...
id=None, max_alloc=None, max_stdalloc=None, name=None, padded_size=None, pool_misses=None, type=None, ): super(GlusterMemoryPool, self).__init__( comment=comment, description=description, id=id, name=name, ) self.alloc_count = alloc_count self.cold_count = cold_count self.hot_count = hot_count self.max...
<filename>src/workqueue/__init__.py import contextlib import logging import os import selectors import subprocess import tempfile import threading from concurrent.futures import ThreadPoolExecutor from dataclasses import dataclass, field from pathlib import Path from typing import ContextManager, Dict, Iterator, NamedT...
import numpy as np import matplotlib.image as mpimg import matplotlib.pyplot as plt import cv2 import glob import argparse import pickle from PIL import Image import os DEFAULT_COLOR_THRESHOLD = (190, 255) DEFAULT_ABS_THRESHOLD = (0, 255) DEFAULT_MAG_THRESHOLD = (0, 255) DEFAULT_DIR_THRESHOLD = (0, np.pi/6) DEFAULT_C...
<reponame>ederst/pulumi-openstack # coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequen...
#!/usr/bin/env python import argparse import os import sys import csv import h5py import tensorflow.keras as keras import tensorflow as tf import numpy as np from tqdm import tqdm import cv2 import SimpleITK as sitk import time tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR) tf.compat.v1.enable_v2_beha...
dict(type=T(series)), ) else: edit_btn = "" if permit("delete", table, record_id=record_id): delete_btn = A(I(" ", _class="icon icon-remove-sign"), _class="dl-item-delete", ) else: delete_btn = "" edit_bar = DIV(edit_btn, delete_btn, _class="edit-bar fright", ) # Dropdown of available documents dtable =...
return self def clearId(self): self.checkMutable() self._id = 0 self._clearPresent('id') return self def hasOptions(self): return self._isPresent('options') def getOptions(self): return self._options def getMutableOptions(self): self.checkMutable() if self._options is MethodOptions.defaultInstance() or ...
str_cmdLine, self.jid, number_of_workers, cpu_limit, memory_limit, gpu_limit, incoming_dir, outgoing_dir) self.dp.qprint('Returning from openshift job...') def json_filePart_get(self, **kwargs): """ If the requested path is *within* a json "file" on the DB, then we need to find the file, and map the relevant ...
### # Introspective Autoencoder Main training Function # <NAME>, 2016 import argparse import imp import time import logging # import sys # sys.path.insert(0, 'C:\Users\Andy\Generative-and-Discriminative-Voxel-Modeling') import numpy as np from path import Path import theano import theano.tensor as T import lasagne ...
<reponame>lijiawei20161002/SecureAuction<gh_stars>1-10 """This module collects the secure (secret-shared) types for MPyC. Secure (secret-shared) number types all use a common base class, which ensures that operators such as +, *, >= are defined by operator overloading. """ import functools import asyncio from mpyc im...
False, 'ca3_age': 21 * 24 * 60 * 60, 'usermoney_age': 20 * 24 * 60 * 60, 'useramount': 100 * COIN, 'reward_to': 'user', 'rewardamount': COIN * 10 * 20 // 365 + 1, 'fee_total': 'auto', 'fee_user_percent': 0, 'refill_moneybox': 'random', 'keys_count_total': randint(1,15), 'keys_count_required': 'random', 'keys...
link. SchemaArn (string) -- [REQUIRED]The Amazon Resource Name (ARN) that is associated with the schema. For more information, see arns . TypedLinkName (string) -- [REQUIRED]The unique name of the typed link facet. :type Attributes: list :param Attributes: [REQUIRED] An ordered set of attributes that are associ...
bands on the Sentinel-2A & B sensors. The index indicates levels of chlorophyll-a (chl-a) concentrations in complex turbid productive waters such as those encountered in many inland water bodies. The index has not been validated in Australian waters, and there are a range of environmental conditions that may have an ef...
Letter Request/" + gp_letter_request) msg = frappe.render_template('one_fm/templates/emails/gp_letter_attachment_no_response.html', context={"page_link": page_link, "gp_letter_request": gp_letter_request}) sender = frappe.get_value("Email Account", filters = {"default_outgoing": 1}, fieldname = "email_id") or None r...
import string import tkinter import BingoBoard import Config from time import time from tkinter import ttk from tkinter import messagebox from copy import deepcopy from math import ceil class TimespinnerBingo(tkinter.Frame): def __init__(self, master, **kw): super().__init__(master, **kw) self.config = Config.Conf...
got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent]) if request is not None and has_flattened_params: raise ValueError( "If the `request` argument is set, then none of " "the individual field arguments should be set." ) # Minor ...
<filename>src/biome/text/model.py import inspect import json import logging import os import pickle import warnings from functools import lru_cache from logging.handlers import RotatingFileHandler from pathlib import Path from typing import Any from typing import Dict from typing import Iterable from typing import List...
import pygame import time from pygame.constants import MOUSEBUTTONDOWN # board = [ [ 3, 1, 6, 5, 7, 8, 4, 9, 2 ], # [ 5, 2, 9, 1, 3, 4, 7, 6, 8 ], # [ 4, 8, 7, 6, 2, 9, 5, 3, 1 ], # [ 2, 6, 3, 0, 1, 5, 9, 8, 7 ], # [ 9, 7, 4, 8, 6, 0, 1, 2, 5 ], # [ 8, 5, 1, 7, 9, 2, 6, 4, 3 ], # [ 1, 3, 8, 0, 4, 7, 2, 0, 6 ], # [ 6...
@mock.patch.object(pxe_utils, 'get_image_info', autospec=True) def _test_clean_up_ramdisk(self, get_image_info_mock, clean_up_pxe_env_mock, mode='deploy'): with task_manager.acquire(self.context, self.node.uuid) as task: kernel_label = '%s_kernel' % mode ramdisk_label = '%s_ramdisk' % mode image_info = {kernel_la...
from celery import Celery,chain from app import app,celery,db import redisearch import time,sys import pandas as pd import billiard as mp #multiprocessing substitute to enable daemon import scipy.stats import numpy as np import os sys.path.insert(0, 'app') import controller.utils as utils from timeit import defaul...
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # Copyright (c) 2017, Battelle Memorial Institute # 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. Redistri...
#!/usr/bin/env python3 import click import hashlib import os import pid import platform import random import shutil import socket import sys import time import toml import ujson from collections import Counter, OrderedDict, defaultdict from dataclasses import dataclass from datetime import date, datetime, timedelta f...
``CREATING`` - Product creation has started; the product is not ready for use. * ``FAILED`` - An action failed. - **ProductARN** *(string) --* The ARN of the product. - **CreatedTime** *(datetime) --* The UTC time stamp of the creation time. - **ProvisioningArtifactSummaries** *(list) --* Information about ...
'<tr align=left class="table1">' else: print '<tr align=left class="table2">' print '<td>%d</td>' % count print '<td>%s</td>' % ISFDBLink('title.cgi', title_id, title_title) print '<td>' for pub in titles[title_title][title_id]: if pub[0] in empty_pubs: suffix = ' [EMPTY]' else: suffix = '' print '%s (%s)%s<...
parallelize the normal estimation for speed num_cores = multiprocessing.cpu_count() Parallel(n_jobs=num_cores)(delayed(estimate_normals)(point_cloud_filename, depth_param_filename, normals_dir_name, n_neighbors) for point_cloud_filename in point_cloud_path_list) def export_video_montage(input_path, output_path, de...
<filename>datacube/index/_datasets.py # coding=utf-8 """ API for dataset indexing, access and search. """ from __future__ import absolute_import import logging from cachetools.func import lru_cache from datacube import compat from datacube.model import Dataset, DatasetType, MetadataType from datacube.utils import In...
import time import gym, numpy as np import pygame, pymunk, logging, math, random # imports for DQNAgent import numpy as np from keras.models import Sequential from keras.layers import Dense, Dropout, Conv2D, MaxPooling2D, Activation, Flatten from tensorflow.keras.optimizers import Adam from keras.callbacks import Tenso...
0xbec1, 0xbc26, 0x3a5c, 0x3f2b, 0xbc89, 0xbd81, 0x3d13, 0x3dba, 0xbcc8, 0xbc38, 0xbea3, 0x3ba5, 0xbebc, 0x3f16, 0xbcb0, 0xbe00, 0xbf19, 0x3eeb, 0xbeb8, 0x3ee7, 0xbea8, 0x3e4d, 0xbe87, 0x3eeb, 0xbeb8, 0x3ead, 0xbf09, 0xbf2a, 0xbe6d, 0x3e5b, 0xbe84, 0x3ef2, 0x3f10, 0x3d80, 0xbe4c, 0x3e1d, 0xbef3, 0xbe0e, 0xbe13, 0xbe...
<gh_stars>0 import httplib2 import json from tasks.taskmanager import TaskManager from tasks.task import * from remote.remote_util import RemoteMachineShellConnection, RemoteUtilHelper import time import ast class BLEVE: STOPWORDS = ['i', 'me', 'my', 'myself', 'we', 'our', 'ours', 'ourselves', 'you', 'your', 'yours'...
and # avoid regression on https://github.com/DataDog/dd-agent/pull/3359 check._submit(check.metrics_mapper[ref_gauge.name], ref_gauge, custom_tags=tags) check.gauge.assert_called_with( 'prometheus.process.vm.bytes', 39211008.0, ['test', 'my_1st_label:my_1st_label_value', 'my_2nd_label:my_2nd_label_value'], hostn...
<reponame>clviegas/StageDP<filename>src/models/tree.py #!/usr/bin/env python # -*- coding: utf-8 -*- # author: Yizhong # created_at: 10/26/2016 下午8:37 import sys from os.path import isfile from features.extraction import ActionFeatureGenerator, RelationFeatureGenerator from models.state import ParsingState from nltk ...
Documentation, chapter 5.2.2""" input_channel_get = { '01': 'VIDEO', '02': 'S-VIDEO', '06': 'COMPONENT', '07': 'CVI 2 (not applicable)', '08': 'VGA', '09': 'HDMI 2', '0A': 'HDMI or HDMI 1', '0B': 'DVI-D', '0C': 'Card DVI-D', '0D': 'Display Port', '0E': 'Card OPS', '0F': 'USB' } input_channel_set = [ {'...
open(filepath, 'w').close() stdout.append('Created an empty file.') if p.is_new and not p.source_filename: # Do not run it if p.source_filename is defined, since svn copy was # using above. stdout.append( self._check_output_svn( ['add', p.filename, '--force'], credentials=False)) for name, value in p.svn_proper...
# -*- coding: utf-8 -*- """ Created on Thu Feb 01 14:23:18 2018 @authors: rafip, T.J.Ashby """ import yaml from os.path import join import pandas as pd import numpy as np from utils import SQLConnection, clean_nan_columns, get_features_from_labevents, get_features_from_chartevents pd.set_option('mode.chained_assignm...
# Extra flags Andrew does not explicitly use but which are in the documentation '-ignore_unrecognized_res', '-in:file:fullatom', '-fa_max_dis', '9.0', '-ddg::dump_pdbs', 'true', '-ddg::suppress_checkpointing', 'true', ] softrep = []#['-ddg:weight_file', 'soft_rep_design'] # use -ddg:weight_file? hardrep = ['-s...
# -*- coding: utf-8 -*- import math import matplotlib.pyplot as plt # Precyzja Pythona dla liczba zmiennoprzecinkowych typu float to 53 bit # w naszym przypadku niedokładności z tym związane są # pomijalne. Nawet dla większych spadków i większych rozpiętości otrzymane # wartości byłyby akceptowalne. Otrzymanie dokładn...
import datetime import math import os import random import matplotlib.pyplot as plt import numpy as np import pandas as pd import tensorflow as tf from PIL import Image from skimage.transform import rescale from sklearn import preprocessing from sklearn.preprocessing import OneHotEncoder, OrdinalEncoder class RawDat...
<filename>pytorch_src/trainer.py ''' file: trainer.py date: 2018_05_07 author: zhangxiong(<EMAIL>) ''' import sys from model import HMRNetBase from Discriminator import Discriminator from config import args import config import torch import torch.nn as nn from torch.utils.data import Dataset, DataLoader, ConcatDat...
#!/usr/bin/env python # CREATED:2014-01-18 14:09:05 by <NAME> <<EMAIL>> # unit tests for util routines # Disable cache import os try: os.environ.pop("LIBROSA_CACHE_DIR") except: pass import platform import numpy as np import scipy.sparse import pytest import warnings import librosa from test_core import srand np...
mainleft = [sourcelabelDict[x.getName()] for x in threads if x.is_alive() is True and x.getName() in mainsourceDict] info = mainleft if debrid_status: if len(info) > 6: line3 = 'Waiting for: %s' % (str(len(info))) elif len(info) > 0: line3 = 'Waiting for: %s' % (', '.join(info)) else: break percent = int(100...
<filename>f8a_report/report_helper.py<gh_stars>0 """Various utility functions used across the repo.""" import os import json import logging from datetime import datetime as dt import psycopg2 import psycopg2.extras import itertools import boto3 from psycopg2 import sql from collections import Counter from botocore.exc...
<reponame>TanayGahlot/mne-python<gh_stars>0 """Conversion tool from Brain Vision EEG to FIF""" # Authors: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # # License: BSD (3-clause) import os import time import re import warnings import numpy as np from ...utils import verbose, logger from ..constants import FIFF from ..meas_i...
escape_((service), True), '.com/users/', escape_((user_id), True), '/', escape_((username), True), '">', escape_((username), True), '</a></p>\n') yield '', join_(' <table cellpadding="2" cellspacing="0">\n') for question in loop.setup(result): yield '', join_(' ', '<tr class="', escape_(loop.parity, True), '">\n') ...
none of above applied (should not happen) return None def processByInequality(self, reduced_reaction): """ Cross-examine inequality and add arcs if possible. One example is, A + B -> C + D where A < C is given by existing arc. We can conclude B > D and add an arc. Return True if processed, False otherwise :...
(KHTML, like Gecko) Version/9.0 Mobile/13D15 Safari/601.1", "Mozilla/5.0 (iPad; CPU OS 9_0_2 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/47.0.2526.107 Mobile/13A452 Safari/601.1.46 (000412)", "Mozilla/5.0 (iPad; CPU OS 9_2_1 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/47.0.2526.107 Mobil...
= str_value[:-1] # trim off '%' character return float(float_part) / 100.0 class ST_PlaceholderSize(XsdTokenEnumeration): """ Valid values for <p:ph> sz (size) attribute """ FULL = "full" HALF = "half" QUARTER = "quarter" _members = (FULL, HALF, QUARTER) class ST_PositiveCoordinate(XsdLong): @classmethod...
<reponame>bkilian15/cmssw<gh_stars>1-10 from __future__ import print_function import sys import os import logging import random import subprocess import re import struct import FWCore.ParameterSet.SequenceTypes as sqt import FWCore.ParameterSet.Config as cms import FWCore.ParameterSet.Modules as mod import FWCore.Para...
not self.CTvertices: return text = """ # This file was automatically created by The UFO_usermod from object_library import all_vertices, all_CTvertices, Vertex, CTVertex import particles as P import couplings as C import lorentz as L """ text += self.create_file_content(self.CTvertices) ff = open(os.path.join(...
# This file is part of astro_metadata_translator. # # Developed for the LSST Data Management System. # This product includes software developed by the LSST Project # (http://www.lsst.org). # See the LICENSE file at the top-level directory of this distribution # for details of code ownership. # # Use of this source code...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may ...
masks</b><br> """) self.setWindowTitle('Multiple segm.npz files detected') is_win = sys.platform.startswith("win") mainLayout = QVBoxLayout() infoLayout = QHBoxLayout() selectionLayout = QGridLayout() buttonsLayout = QHBoxLayout() # Standard Qt Question icon label = QLabel() standardIcon = getattr(QStyle, ...
<gh_stars>0 # author: jteoh # note: This is a snapshot of a script in my utils repo: https://gitli.corp.linkedin.com/jteoh/utils/source/master:thirdeye/detector_admin.py # Use that url for the latest version of the script. # fix desktop python path for argparse import sys sys.path.insert(1, '/usr/local/linkedin/lib/py...
# The following is an exploration of a tensor flow tutorial to "Build a # Convolutional Neural Network using Estimators". The tutorial can be found # at the following address: https://www.tensorflow.org/tutorials/estimators/cnn # Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache...
if line != "wait" else line for line in cmd.split("\n")] ) job_script += [cmd] job_script = "\n".join(job_script) # create and navigate to workdir cwd = os.getcwd() if workdir is None: workdir = cwd pwd = workdir else: pwd = cwd if not os.path.exists(workdir): os.makedirs(workdir) os.chdir(workdir) if ve...
select_manu_window = FloatingWindow(menus=top_f_menus, offset=transform_offset, menu_name='select_top') def create_select_menu(self, add_float=True): self.select_menus = QMenu(self.select_top) qt.change_button_color(self.select_menus, textColor=menu_text, bgColor=menu_bg, hiText=menu_high_text, hiBg=menu_high_bg, ...
<reponame>triump0870/Interactive_Programming_Python # Simple implementation of GalaxyInvanders game # <NAME> (India) - 3 Nov 2013 # www.codeskulptor.org/#user23_fTVPDKIDhRdCfUp VER = "1.0" # "add various aliens" import simplegui, math, random, time #Global const FIELD_WIDTH = 850 FIELD_HEIGHT = 500 TOP...
<filename>scripts/analytics_tests.py # Need to import path to test/fixtures and test/scripts/ # Ex : export PYTHONPATH='$PATH:/root/test/fixtures/:/root/test/scripts/' # # To run tests, you can do 'python -m testtools.run tests'. To run specific tests, # You can do 'python -m testtools.run -l tests' # Set the env varia...
<gh_stars>1-10 # Copyright 2020 The Pigweed 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
from __future__ import division import torch import math import random from PIL import Image import cv2 cv2.setNumThreads(0) cv2.ocl.setUseOpenCL(False) import numpy as np import numbers import types import collections import warnings import matplotlib.pyplot as plt from torchvision.transforms import functional import ...
<reponame>rimmartin/cctbx_project # -*- mode: python; coding: utf-8; indent-tabs-mode: nil; python-indent: 2 -*- # # $Id$ """ A 'slippy map' widget for wxPython. So why is this widget called 'pySlip'? Well, in the OpenStreetMap world[1], a 'slippy map' is a browser map view served by a tile server that can be panned...
""" Remove old build files. """ distfiles = self.packagename.replace("-", "_") distdir = self._settings.DISTRIBUTABLE_DIR self.clean() for f in glob.glob(str(distdir / distfiles) + "*.*"): remove_if_exists(f) for f in glob.glob(str(distdir / self.packagename) + "*.*"): remove_if_exists(f) remove_if_empty(d...
import inspect import math import re import json import sys #ipython = get_ipython() #def hide_traceback(exc_tuple=None, filename=None, tb_offset=None, # exception_only=False, running_compiled_code=False): # etype, value, tb = sys.exc_info() # return ipython._showtraceback(etype, value, ipython.InteractiveTB.get_ex...
<reponame>arthurlogilab/pyramid_session_redis # -*- coding: utf-8 -*- # stdlib import hashlib # pypi from pyramid.decorator import reify from pyramid.exceptions import ConfigurationError from pyramid.interfaces import ISession from zope.interface import implementer # local from .compat import ( pickle, token_hex, ...
if hasattr(inv, 'vSwitchId'): self.vSwitchId = inv.vSwitchId else: self.vSwitchId = None if hasattr(inv, 'status'): self.status = inv.status else: self.status = None if hasattr(inv, 'cidrBlock'): self.cidrBlock = inv.cidrBlock else: self.cidrBlock = None if hasattr(inv, 'availableIpAddressCount'): self....
import datetime import os import uuid from os.path import join as opjoin from pathlib import Path import numpy as np import requests import yaml from celery.result import AsyncResult from django.db.models import Q from drf_yasg import openapi from drf_yasg.utils import swagger_auto_schema from rest_framework import mi...
** 2 == 0: self.polygons.append( numpy.array(paths[ii][0] + paths[ii][1][-2::-1]) ) else: self.polygons.append( numpy.array(paths[ii][0] + paths[ii][1][::-1]) ) paths[ii][0] = paths[ii][0][-1:] paths[ii][1] = paths[ii][1][-1:] self.layers.append(layer[ii % len(layer)]) self.datatypes.append(datatype[ii % len...
= 4 data_len = len(self.data_3d[0]) msg = "Cannot generate {} realizations with data of length {}".format( realizations_len, data_len ) with self.assertRaisesRegex(ValueError, msg): _ = set_up_variable_cube( self.data_3d, realizations=np.arange(realizations_len) ) def test_error_unmatched_height_levels(self):...
highlight that part if flex_st: ax2[1].axvspan(flex_st, flex_en, alpha=0.2, color='red') # Label the subplot ax2[1].set_ylabel('Y Coordinate (m)') ax2[1].tick_params(labelbottom=False) ax2[1].title.set_text('Y') ax2[1].grid(True) # Get y and error values for the Z coord plot yZ = data.EST.Z.values[st_epo...
None, 128835: None, 128836: None, 128837: None, 128838: None, 128839: None, 128840: None, 128841: None, 128842: None, 128843: None, 128844: None, 128845: None, 128846: None, 128847: None, 128848: None, 128849: None, 128850: None, 128851: None, 128852: None, 128853: None, 128854: None, 128855: None, 128856: None,...
def __init__( self, component_type: str = None, biz_alias: str = None, extend_value: str = None, label: str = None, value: str = None, key: str = None, ): # 控件类型 self.component_type = component_type # 控件别名 self.biz_alias = biz_alias # 表单控件扩展数据 self.extend_value = extend_value # 控件名称 self.label = label ...
<filename>scripts/optic/orthologs2list.py ########################################################################## # # MRC FGU Computational Genomics Group # # $Id$ # # Copyright (C) 2009 <NAME> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public Lic...
# Copyright 2016 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. """Exports Chromium changes to web-platform-tests.""" import argparse import logging from blinkpy.common.system.log_utils import configure_logging from blin...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2012-2018 GEM Foundation # # OpenQuake 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 Licen...
""" Helper functions for PASTIS. """ import glob import os import datetime import importlib import itertools import time from shutil import copy import sys from astropy.io import fits import astropy.units as u import fpdf import logging import logging.handlers import numpy as np from PyPDF2 import PdfFileMerger from ...
<reponame>shadowridgedev/lingvo # Copyright 2018 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 # ...
<gh_stars>0 # (C) Copyright 2020 ECMWF. # # This software is licensed under the terms of the Apache Licence Version 2.0 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. # In applying this licence, ECMWF does not waive the privileges and immunities # granted to it by virtue of its status as an inte...
or self.jobs.rebuild_allowUpgrade): if useTypoMetrics: OS2f2T.fsSelection |= 1<<7 else: OS2f2T.fsSelection &= ~(1<<7) if OS2f2T.version < 4: OS2f2T.version = 4 if isinstance(forcePreferredFamily, bool) and \ (OS2f2T.version > 3 or self.jobs.rebuild_allowUpgrade): if forcePreferredFamily: OS2f2T.fsSelection |=...
<gh_stars>1-10 """ MIT License Copyright (c) 2021 <NAME> 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, ...
<gh_stars>1-10 # -*- coding: utf-8 -*- from django import forms from django.db import models from django.utils.translation import ugettext_lazy as _ from django.contrib import messages from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.conf import set...
for the usual 9DOF sensor setup. This message should contain the scaled values to the described units ''' def __init__(self, time_boot_ms, xacc, yacc, zacc, xgyro, ygyro, zgyro, xmag, ymag, zmag): MAVLink_message.__init__(self, MAVLINK_MSG_ID_SCALED_IMU, 'SCALED_IMU') self._fieldnames = ['time_boot_ms', 'xacc', '...
<reponame>m-tmatma/svnmailer<filename>src/lib/svnmailer/settings/_accessors.py # -*- coding: utf-8 -*- # pylint: disable-msg=W0201,W0232,W0613 # pylint-version = 0.7.0 # # Copyright 2004-2005 <NAME> or his licensors, as applicable # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009 <NAME> # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it u...
<gh_stars>1-10 import logging from settings import * import rascsi_interface_pb2 as proto def get_server_info(): """ Sends a SERVER_INFO command to the server. Returns a dict with: - boolean status - str version (RaSCSI version number) - list of str log_levels (the log levels RaSCSI supports) - str current_lo...
if header is None: header = r.dtype.names justify_pad_prec = [get_justify(header[i],r.__getitem__(colname),precision[i]) for i, colname in enumerate(r.dtype.names)] justify_pad_prec_spacer = [] for i in range(len(justify_pad_prec)): just,pad,prec = justify_pad_prec[i] if i == 0: justify_pad_prec_spacer.append(...
<filename>spring/docgen.py import math import random import time from hashlib import md5 from typing import Iterator, List, Tuple import numpy as np from fastdocgen import build_achievements from spring.dictionary import ( NUM_STATES, NUM_STREET_SUFFIXES, STATES, STREET_SUFFIX, ) from spring.settings import Workl...
word_of_perms(sl2z_word_problem(x), self.L(), self.R()) # # Group stuff # def is_normal(self): r""" Test whether the group is normal EXAMPLES:: sage: G = Gamma(2).as_permutation_group() sage: G.is_normal() True sage: G = Gamma1(2).as_permutation_group() sage: G.is_normal() False """ N = self.index()...
<filename>src/son/monitor/son_sp.py """ Copyright (c) 2015 SONATA-NFV 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 ...
= self.getEmpty(1) cv.EqualizeHist(self._getGrayscaleBitmap(), self._equalizedgraybitmap) return self._equalizedgraybitmap def equalize(self): """ **SUMMARY** Perform a histogram equalization on the image. **RETURNS** Returns a grayscale SimpleCV image. **EXAMPLE** >>> img = Image("lenna") >>> im...
North Carolina",3851), ("Mountain View CDP, North Carolina",3715), ("Mount Airy city, North Carolina",10227), ("Mount Gilead town, North Carolina",1161), ("Mount Holly city, North Carolina",15305), ("Mount Olive town, North Carolina",4731), ("Mount Pleasant town, North Carolina",1904), ("Moyock CDP, North Carolina",371...
+ (256*mckin*(-234 + 9*np.pi**2 + 81*np.log(2/mus)))/ (243*mbkin) - (256*mckin**2*(-234 + 9*np.pi**2 + 81*np.log(2/mus)))/ (243*mbkin**2) + (128*mckin**3*(-234 + 9*np.pi**2 + 81*np.log(2/mus)))/ (81*mbkin**3) - (128*mckin**4*(-234 + 9*np.pi**2 + 81*np.log(2/mus)))/ (81*mbkin**4) - (256*mckin**5*(-234 + 9*np.pi**2 +...
<reponame>JuanFMontesinos/TorchTree from collections import OrderedDict def _addindent(s_, numSpaces): s = s_.split('\n') # don't do anything for single-line stuff if len(s) == 1: return s_ first = s.pop(0) s = [(numSpaces * ' ') + line for line in s] s = '\n'.join(s) s = first + '\n' + s return s class Tr...
<reponame>padfoot27/merlin import click import tmdbsimple as tmdb import time tmdb.API_KEY = 'deb5d2f55e284931baf4f7e7020cfe44' genreDict = {u'Action': 28, u'Adventure': 12, u'Animation': 16, u'Comedy': 35, u'Crime': 80, u'Documentary': 99, u'Drama': 18, u'Family': 10751, u'Fantasy': 14, u'Foreign': 10769, ...
1px solid\ #31363B;\x0a bo\ rder-radius: 4px\ ;\x0a}\x0a\x0aQCalendarWi\ dget:disabled {\x0a\ background-c\ olor: #232629;\x0a \ color: #4D545\ B;\x0a}\x0a\x0a/* QLCDNum\ ber ------------\ ----------------\ ----------------\ ----------------\ - */\x0a\x0aQLCDNumber\ {\x0a backgroun\ d-color: #232629\ ;\x0a color: #...
__all__ = ['ButtonBehavior', 'ToggleButtonBehavior', 'FloatBehavior'] from kivy.clock import Clock from kivy.config import Config from weakref import ref from time import time from kivy.app import App from kivy.uix.image import Image from utils import image, icon from kivy.metrics import dp from kivy.properties impo...
now look at all of the files, new and old, to order the diff right # so we don't have to go seeking all over the changeset configList = [] normalList = [] removeList = [] encapsulatedList = [] for job in jobs: if self.hasNewTrove(job[0], job[2][0], job[2][1]): trvCs = self.getNewTroveVersion(job[0], job[2][0], ...
parent dim is checked elsewhere : R505 or R404 if parent_varname in self._lis_vars: typename = "location_index_set" else: typename = "mesh" msg = ( f'has the element dimension "{data_meshdim}", which does ' f"not match the {parent_location} dimension of the " f'"{parent_varname}" {typename}, which is "{parent_d...