input
stringlengths
2.65k
237k
output
stringclasses
1 value
float array Zero-order density (and density derivative for GGA). Giving kwargs rho0, vxc and fxc to improve better performance. vxc : float array First order XC derivatives fxc : float array Second order XC derivatives Examples: ''' if kpts is None: kpts = numpy.zeros((1,3)) xctype = ni._xc_type(xc_code) ...
algorithm R1 from (<NAME> 1959) Sobel, Milton, and <NAME>. "Group testing to eliminate efficiently all defectives in a binomial sample." Bell System Technical Journal 38.5 (1959): 1179-1252. ''' self.num_simultaneous_tests = num_simultaneous_tests self.test_duration = test_duration self.continuousIndex = 0 self...
"""Widget.""" # Standard Library import csv import json import random # Pyramid from colander import Invalid from colander import Mapping from colander import SchemaNode from colander import SchemaType from colander import Sequence from colander import String from colander import null from iso8601.iso8601 import ISO86...
<reponame>hajimen/pykle_serial<filename>tests/test_serial.py import unittest import pykle_serial as serial class TestDeserialization(unittest.TestCase): def test_a_a(self): with self.assertRaises(ValueError, msg="should fail on non-array"): serial.deserialize("test") def test_a_b(self): with self.assertRaises(V...
<gh_stars>0 # -*- coding: utf-8 -*- import KRIS from KRIS.lib.curve.ttypes import * from datetime import datetime import time, random, sys, ast, re, os, io, json, subprocess, threading, string, codecs, requests, ctypes, urllib, urllib2, urllib3, wikipedia, tempfile from bs4 import BeautifulSoup from urllib import urlo...
== (100, 100) with Color('#000') as black: for row in cropped: for col in row: assert col == black with img[150:, :150] as cropped: assert cropped.size == (150, 150) with img[-200:-100, -200:-100] as cropped: assert cropped.size == (100, 100) with img[100:200] as cropped: assert cropped.size == (300, 100) as...
<reponame>mvind/hangman # Problem Set 2, hangman.py # Name: # Collaborators: # Time spent: # Hangman Game # ----------------------------------- # Helper code # You don't need to understand this helper code, # but you will have to know how to use the functions # (so be sure to read the docstrings!) import random import...
self.components: if 'ACTNUM' in self.grid: self.states.pad_na(actnum=self.grid.actnum, fill_na=float(fill_na)) self.states.to_spatial(dimens=self.grid.dimens) if 'wells' in self.components and self.wells.state.has_blocks: self.wells.blocks_to_spatial(self.grid) return self @deprecated(reason="Renamed to_spatial...
<gh_stars>0 from __future__ import print_function, absolute_import, unicode_literals, division # Tree Node with different things that helps to build the AVL Tree class TreeNode(): # It instantiates the class def __init__ (self, val): self.val = val self.place = 0 self.height = 1 self.left = None self.right = No...
size of the app to be 750 X 562.5 Pixels (Slightky Smaller than the RPI 7" Touch Screens) self.mw.resizable(0, 0) #Don't allow resizing in the x or y direction back = tk.Frame(master=self.mw,bg='Grey') back.pack_propagate(0) #Don't allow the widgets inside to determine the frame's width / height back.pack(fill=tk.B...
that have # been created. for model in new_models: target_model_sig = target_app_sig.get_model_sig( model._meta.object_name, required=True) app_sig.add_model_sig(target_model_sig.clone()) if app_sig.upgrade_method != UpgradeMethod.MIGRATIONS: # We're processing this as evolutions. Find out if we're # applyin...
<reponame>mutilin/klever # # Copyright (c) 2018 ISP RAS (http://www.ispras.ru) # Ivannikov Institute for System Programming of the Russian Academy of Sciences # # 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...
<filename>src/legohdl/block.py # ------------------------------------------------------------------------------ # Project: legohdl # Script: block.py # Author: <NAME> # Description: # This script describes the attributes and behaviors for a "block" within # the legohdl framework. A block is a HDL project with a marker ...
operation to prevent watchdog to see this delete self.observer.skip(abs_path) try: os.remove(abs_path) except OSError as e: logger.warning('WARNING impossible delete file during SYNC on path: {}\n' 'Error occurred: {}'.format(abs_path, e)) if self.client_snapshot.pop(filepath, 'ERROR') != 'ERROR': logger.info('...
<reponame>kellertk/boto3 # Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # https://aws.amazon.com/apache2.0/ # # or in ...
= pos super().__init__() @property def image(self) -> pygame.Surface: """Return the text's surface.""" return self._font.render(self._text, True, self._font_color) @property def rect(self) -> pygame.Rect: """Return the text's rect.""" return self.image.get_rect(center=self._pos) class Score(PlainText): ""...
mistake such as ``c.kept[:2] = [True, False, False]`` will break some functionality by forcibly changing size of :attr:`.kept` list. Notes ----- Type of the first element of given sequence is used for dynamic dispatch. """ # TODO: Consider making return value immutable. return self._kept @kept.setter def k...
# ---------------------------------------------------------------------- # CLI FSM # ---------------------------------------------------------------------- # Copyright (C) 2007-2020 The NOC Project # See LICENSE for details # ---------------------------------------------------------------------- # Python modules impor...
# Copyright (c) 2012 <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, publish, distribute, ...
self.segmentation is None: return [] label, attributes = self._get_label_and_attributes( classes, supercategory_map ) points = _get_polygons_for_segmentation( self.segmentation, frame_size, tolerance ) return fol.Polyline( label=label, points=points, closed=False, filled=True, attributes=attributes, ) ...
import os from collections import OrderedDict from rpython.jit.codewriter.effectinfo import EffectInfo from rpython.jit.metainterp.optimizeopt.util import args_dict from rpython.jit.metainterp.history import Const, ConstInt from rpython.jit.metainterp.jitexc import JitException from rpython.jit.metainterp.optimizeopt....
""" Classes used to model various geometric shapes centered around the origin Defines the Neighbourhood Abstract Base Class that can be used to create custom geometric shapes Subclasses of Neighbourhood can be used with the TableExtension and the PointcloudExtension class in the hrosailing.pipeline module """ from ...
import binascii import hashlib import os import re import markdown import json from functools import wraps from flask import (Flask, render_template, flash, redirect, url_for, request, abort) from flask.ext.wtf import Form from wtforms import (BooleanField, TextField, TextAreaField, PasswordField) from wtforms.validat...
# new setitem implementation (TH): in analogy to new __getitem__ and with mix modes # work in progress @property def x(self): """Extend mode: this mode allows destination sig size in assignment to be extended through setitem""" # Set setitem mode to extend self.mix_mode = 'extend' return self extend = x # bett...
<gh_stars>0 #!/usr/bin/python def param_gui(self): param_gui = [ self.K1, self.P1, self.e1, self.om1, self.ma1, self.incl1, self.Omega1, self.K2, self.P2, self.e2, self.om2, self.ma2, self.incl2, self.Omega2, self.K3, self.P3, self.e3, self.om3, self.ma3, self.incl3, self.Omega3, self.K4, self.P4, self.e4, sel...
# -*- coding: utf-8 -*- """ Defines unit tests for :mod:`colour.colorimetry.blackbody` module. """ from __future__ import division, unicode_literals import numpy as np import unittest from itertools import permutations from colour.colorimetry import SpectralShape, planck_law, sd_blackbody from colour.utilities impor...
{'downloaded', 'missed', 'invalid', 'aborted'}: numignores[saved_progress] = numignores.setdefault(saved_progress, 0) + 1 delete_ytmeta_raw(video_id, suffix=" (channel)") continue cache_miss = False # process precached meta if video.meta is None: # We may be reloading old URLs after a program restart print(...
the IP address is outside the VPC for the target group, the only supported value is ``all`` . If the target type is ``lambda`` , this parameter is optional and the only supported value is ``all`` . :rtype: dict :returns: """ pass def remove_listener_certificates(self, ListenerArn: str, Certificates: List) -> Dic...
<gh_stars>0 ''' This generates test data for the image capturing system. 600 by 600 images are created and some have the correct numbered square in the image somewhere. others will have other shapes or noise. ''' import random import cv2 import numpy as np import string import math import ADA import HandyTools as HAT...
overcommitted at any time during execution. If a query completes without error, the result will be verified. An error will be raised upon a result mismatch. """ self._mem_broker = MemBroker(impala.min_impalad_mem_mb, int(impala.min_impalad_mem_mb * mem_overcommit_pct / 100)) # Print the status to show the state...
a higher graph context, stash those away to be restored when we exit the current context. """ self.activeParentGraphContext, self._graph.activeGraphContext = self._graph.activeGraphContext, self if not self._populating: self._graph.activeGraphContext = GraphContext(parentGraphContext=self._graph.activeGraphContex...
data value. NumberValue (string) --A number data value. DatetimeValue (datetime) --A date and time value. ParentReference (dict) -- [REQUIRED]If specified, the parent reference to which this object will be attached. Selector (string) --A path selector supports easy selection of an object by the parent/child links...
i in data): raise TypeError('Data must consist of numbers only.') return True @classmethod def from_data(cls, data): """ Instantiate a new :class:`~nmrpy.data_objects.Fid` object by providing a spectral data object as argument. Eg. :: fid = Fid.from_data(data) """ new_instance = cls() new_instance.dat...
<gh_stars>0 #! /usr/bin/env python # coding: utf-8 import os import numpy import sys from pdb import set_trace import getopt # this file/module is seemingly unused ''' TODO: ''' # add path to bbob_pproc #filepath = '/home/fst/coco/BBOB/code/python/bbob_pproc/' #sys.path.append(os.path.join(filepath, os.path.pardir))...
"""HTML5 Widget abstraction library. - Provides a Widget-abstraction for each HTML-element - Routing of attribute getter/setter and Jquery-style helpers - Fully-integrated HTML-parser for quick Widget prototyping """ import string, re, logging, inspect from typing import Any, Callable, Dict # htmlExpressionEvaluator...
model_id vps = data['vanishing_points_gaussian_sphere'] vanishing_point = np.hstack((vps['x'], vps['y'], vps['z'])) return vanishing_point def rotation_to_make_axes_well_defined(view_dict): ''' Rotates the world coords so that the -z direction of the camera is within 45-degrees of the global +x axis ''' axes_xy...
# -*- coding: utf-8 -*- import base64 import itertools import functools from datetime import datetime import traceback from PyQt5.QtCore import QByteArray, QTimer from PyQt5.QtNetwork import ( QNetworkAccessManager, QNetworkProxyQuery, QNetworkRequest, QNetworkReply ) from twisted.python import log from splash.qt...
<reponame>daniel-thom/ditto # -*- coding: utf-8 -*- """ test_transformer_kv.py ---------------------------------- Tests for parsing nominal voltage values of Transformers from OpenDSS into DiTTo. """ import os import math import pytest import numpy as np from ditto.store import Store from ditto.readers.opendss.read...
= 0 stroke.information = 0 autohotpy.sendToDefaultMouse(stroke) autohotpy.sleep(0.0007777214050292969) stroke = InterceptionMouseStroke() stroke.state = InterceptionMouseState.INTERCEPTION_MOUSE_MOVE stroke.flags = InterceptionMouseFlag.INTERCEPTION_MOUSE_MOVE_RELATIVE stroke.rolling = 0 stroke.x = 0 stroke.y ...
DataSet. return trajectories(self.data) ############################################################################## # Define compute_probability() method. def compute_probability(self, bin_res, method, gf_sigma=None, group_by=None): """ Compute 2-dimensional binned Lagrangian probability distributions using p...
from pycoingecko import CoinGeckoAPI import sys from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import QObject, QThread, pyqtSignal, pyqtSlot from PyQt5.QtGui import * from PyQt5.QtWidgets import QApplication, QPushButton, QTextEdit, QVBoxLayout, QWidget, QGraphicsObject import re sys.path.insert(0, './')...
450MW' in ds['name']: modify_carma_BIGCC_efficiency(ds, year, scenario, image_efficiency) else: modify_standard_carma_dataset_efficiency(ds, year, scenario, image_efficiency) if update_emissions: modify_carma_dataset_emissions(db, ds, year, scenario, image_emissions[fuel_dict[tech]]) # The efficiency defined by ...
# -*- coding: utf-8 -*- """ Sahana Eden Climate Model @copyright: 2011-2021 (c) Sahana Software Foundation @license: MIT 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...
purchase_invoice_line_id=purchase_invoice_line_id, if_match=if_match) def financials_financial_company_purchase_invoice_purchase_invoice_line_delete_item(client, company_id, purchase_invoice_id, purchase_invoice_line_id, if_match=None): return client.delete_item(company_id=company_id, purchase_invoic...
a command (which is usually a typo) ## Can be used to overload default behavior in children classes or instances ## Can be ``"warning"``, which prints warning about this call (default), ## or one of the accessor names (e.g., ``"c"`` or ``"q"``), which routes the call through this accessor _direct_comm_call_action="...
return optionIds def getProductIdBySku(self, sku): self.adaptor.mySQLCursor.execute(self.GETPRODUCTIDBYSKUSQL, [sku]) entity = self.adaptor.mySQLCursor.fetchone() if entity is not None: entityId = int(entity["entity_id"]) else: entityId = 0 return entityId def insertCatalogProductEntity(self, sku, attributeS...
<reponame>ZipTax/readthedocs.org """Tasks related to projects, including fetching repository code, cleaning ``conf.py`` files, and rebuilding documentation. """ import fnmatch import os import shutil import json import logging import uuid from celery import task from django.conf import settings import redis import slu...
not None: break else: hashslot = await self._get_command_from_cache(cmd) if hashslot is None: connection = await self._get_connection() else: connection = await self._get_connection_for_hashslot(hashslot) else: try: connection = await self._get_connection(server) # TODO (misc) should we try getting another c...
# -*- coding: utf-8 -*- """ Created on Thu Apr 2 00:03:13 2020 This code allows the user to input a series of clues to a sudoku puzzle, and will output the (possibly partially) solved puzzle. Any unsolved squares will be displayed as zeros in the output. The script will not fully solve a puzzle that is not fully deter...
<filename>research/nlp/gpt2/modelarts/start_train_language_model.py<gh_stars>10-100 # Copyright 2022 Huawei Technologies Co., Ltd # # 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://ww...
# tuple of {miss:cann} entries. key of tuple entry is miss, value of tuple entry is cann initial_state = {ML:3, CL:3, "position":left, MR:0, CR:0} goal_state = {ML:0, CL:0, "position":right, MR:3, CR:3} reached:set = set() Node.node_count = 0 inital_node = Node(initial_state, None, None, 0, None) for action in...
#!/usr/bin/env python # coding: utf-8 # In[2]: import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns sns.set() # # Importing dataset # 1.Since data is in form of excel file we have to use pandas read_excel to load the data. # # 2.After loading it is important to check the c...
# -*- coding: utf-8 -*- """ @author: <NAME> @email: <EMAIL> """ from gridworld import GridworldEnv from windy_gridworld import WindyGridworldEnv import numpy as np class Agent: def __init__(self, env, discount_factor=1.0, epsilon=1e-6): """ Initialized an Agent to solve a MDP via model free Temporal Difference L...
_gui.Gui_get_channel_count_by_color_depth def Gui_class_info(): return _gui.Gui_class_info() Gui_class_info = _gui.Gui_class_info def Gui____class_destructor__(instance, is_array): return _gui.Gui____class_destructor__(instance, is_array) Gui____class_destructor__ = _gui.Gui____class_destructor__ class GuiResource...
This fraction must be greater than or equal to the minimum stable level for the generator to be able to turn on. We assume that a unit has to reach its setpoint at the start of the timepoint; as such, the ramping between 2 timepoints is assumed to take place during the duration of the first timepoint, and the ram...
1.2590e+00, 761.0: 1.2487e+00, 762.0: 1.2460e+00, 763.0: 1.2543e+00, 764.0: 1.2566e+00, 765.0: 1.2452e+00, 766.0: 1.2000e+00, 767.0: 1.2120e+00, 768.0: 1.2310e+00, 769.0: 1.2142e+00, 770.0: 1.2146e+00, 771.0: 1.2073e+00, 772.0: 1.2120e+00, 773.0: 1.2100e+00, 774.0: 1.2090e+00, 775.0: 1.2080e+00, 776.0: ...
is zero # except for atom pairs separated by 'select' number of bonds # when 'select' == 0, 'bondtol' is irrelevant zvals = [a.Z() for a in self.atom] zmat = np.outer(zvals, zvals) xconn = self.extended_connection_table() nat = xconn.shape[0] if select >= nat: print('Warning: select = {:d} exceeds atom limit in...
''' <NAME> Double hand training !/usr/bin/python -*- coding: utf-8 -*- ''' from win32api import GetSystemMetrics from itertools import combinations from itertools import groupby from tkinter import * import random import copy import re import Toolbox class DH: def __init__(self, root, canvas): ...
#!/usr/bin/env python3 import distro from sql import out_error from db_model import * from funct import check_ver def default_values(): if distro.id() == 'ubuntu': apache_dir = 'apache2' else: apache_dir = 'httpd' data_source = [ {'param': 'time_zone', 'value': 'UTC', 'section': 'main', 'desc': 'Time Zone', ...
<reponame>Chenguang-Zhu/relancer #!/usr/bin/env python # coding: utf-8 # The goal of this statistical analysis is to predict house sales in Kings County. There are various models # which can perform this task each having its advantages and disadvantages. In this report, I started with # Simple Linear Regression and pr...
# define the dataset used in training on offline CARLA dataset import os from PIL import Image import numpy as np import torch import torch.utils.data as data import math from utils import meshgrid, box_iou, box_nms, change_box_order import random class AngleSpliter: # class to spliter the original angle into bin an...
X.T)**2 + (Y - Y.T)**2) D # or D = scipy.spatial.distance.cdist(Z, Z) D # %% 53. How to convert a float (32 bits) array into an integer (32 bits) in place? Z = np.arange(10, dtype=np.float32) Z = Z.astype(np.int32, copy=False) Z # %% 54. How to read the following file? (โ˜…โ˜…โ˜†) """ ``` 1, 2, 3, 4, 5 6, , , 7, 8 , ,...
# Copyright 2021 DeepMind Technologies Limited. 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 appl...
== 'r': functionFlag = arg else: sys.stderr.write('Invalid input in ' + '-f' + ' flag\n') sys.stderr.write(usage + '\n') sys.exit() if opt == '-m': noNewLineFlag = False if opt == '-l': loadGrammarFlag = True if opt == '-g': gap = int(arg) return (aFlag, fFlag, chFlag, printIntsGrammar, quietLog, rFlag, cF...
return annotation.", "108:Function def_doc_inside is missing annotations for argument a.", "108:Function def_doc_inside is missing a return annotation.", "115:Function def_doc_inside_2 is missing annotations for argument a.", "115:Function def_doc_inside_2 is missing a return annotation.", "120:Function def_doc3 i...
the same number of ' 'components.') return instance # Otherwise return the new uninstantiated class itself return new_cls @classmethod def _check_inputs_and_outputs(mcls, operator, left, right): # TODO: These aren't the full rules for handling inputs and outputs, but # this will handle most basic cases corre...
<reponame>Tamlyn78/geo from os import listdir, makedirs from os.path import abspath, basename, dirname, isdir, join import re import csv import numpy as np import pandas as pd from scipy import stats, ndimage, signal import matplotlib.pyplot as plt from matplotlib import cm, rc from mpl_toolkits.axes_grid1 import make...
<gh_stars>10-100 # coding: utf-8 """ Wavefront REST API <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wave...
<reponame>CeilingPhantom/theharvest ''' Backend processing and management of large portions of data and values to be used in game states ''' import os import base64 import pygame as pg pg.init() class Cycle(object): ''' Sets the values for the time and season functionality ''' def __init__(self): ''' 6 seconds...
zip(lli, lli[1:]): # assert abs(i1 - i2) == abs(j1 - j2) == 1 # assert heights[i1] == heights[j1] # return i2 == j2 # # # def mountain_climbining_sol(): # heights = [0, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 5, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 13, 12, 13, 12, 13, 12, # 11, 12, 11, 12, 11, 10, 11, 10, 9, 8, 7, 6, 5, 6...
#!/usr/bin/env python import logging import sys import threading import time import urlparse import uuid import datetime import requests import tornado.ioloop import tornado.web import tornado.httpserver from tornado import httputil __version_info__ = (1, 0) __version__ = '.'.join(map(str, __version_info__)) # Th...
ๅผ€ๅง‹ๆ—ถ้—ดใ€‚ UTCๆ ผๅผๆ—ถ้—ด๏ผŒไพ‹ๅฆ‚: 2019-01-08T10:00:00Zใ€‚ ๆณจๆ„๏ผšๅŒ—ไบฌๆ—ถ้—ดๅ€ผไธบ UTC ๆ—ถ้—ดๅ€ผ + 8 ๅฐๆ—ถ๏ผŒๆ ผๅผๆŒ‰็…ง ISO 8601 ๆ ‡ๅ‡†่กจ็คบ๏ผŒ่ฏฆ่ง [ISO ๆ—ฅๆœŸๆ ผๅผ่ฏดๆ˜Ž](https://cloud.tencent.com/document/product/266/11732#I)ใ€‚ :type StartTime: str :param EndTime: ็ป“ๆŸๆ—ถ้—ดใ€‚ UTCๆ ผๅผๆ—ถ้—ด๏ผŒไพ‹ๅฆ‚๏ผš2019-01-08T10:00:00Zใ€‚ ๆณจๆ„๏ผšๅŒ—ไบฌๆ—ถ้—ดๅ€ผไธบ UTC ๆ—ถ้—ดๅ€ผ + 8 ๅฐๆ—ถ๏ผŒๆ ผๅผๆŒ‰็…ง ISO 8601 ๆ ‡ๅ‡†่กจ็คบ๏ผŒ่ฏฆ่ง [ISO ๆ—ฅๆœŸๆ ผๅผ่ฏดๆ˜Ž](https://cloud.tencent.co...
= [vocabulary[word] for word in word_list if word in vocabulary] #word_id_list PHRASES = range(len(phrases_list)) prob = LpProblem("TermPhrase", LpMaximize) term_vars = LpVariable.dicts("UseTerm", TERMS, 0, 1, LpBinary) phrase_vars = LpVariable.dicts("UsePhrase", PHRASES, 0, 1, LpBinary) # prob += lpSum(term_vars...
import functools import operator import numpy as np from cycler import cycler try: # cytools is a drop-in replacement for toolz, implemented in Cython from cytools import partition except ImportError: from toolz import partition from .utils import snake_cyclers def spiral(x_motor, y_motor, x_start, y_start, x_ra...
# -*- coding: utf-8 -*- """ This script loads the PhoREAL GUI which executes getAtlMeasuredSwath_auto.py Copyright 2019 Applied Research Laboratories, University of Texas at Austin This package is free software; the copyright holder gives unlimited permission to copy and/or distribute, with or without modifica...
import contextlib import os.path import re from abc import ABC, abstractmethod from collections import OrderedDict from logging import getLogger import mutagen.flac from flac_to_mka.flac import arguments from flac_to_mka.util import ext, time FLACTime = time.Time logging = getLogger(__name__) IgnoreKeyError = conte...
from cereal import car, log from common.realtime import DT_CTRL from selfdrive.car import apply_std_steer_torque_limits from selfdrive.car.hyundai.hyundaican import create_lkas11, create_clu11, create_mdps12, create_lfa_mfa from selfdrive.car.hyundai.values import Buttons, SteerLimitParams, CAR, FEATURES from opendbc.c...
# # Copyright (C) 2016-2018 Codethink Limited # # 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...
<gh_stars>10-100 """ An object-oriented bearlibterminal wrapper with the support for complex ASCII art and widget-like behaviour. """ try: from bear_hug import terminal except RuntimeError: # Falling back to system installation of bearlibterminal if # DLLs are not available from bearlibterminal import terminal fro...
<filename>psyneulink/scheduling/condition.py # Princeton University licenses this file to You 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 ...
from __future__ import print_function import numpy as NP """ A module which implements the continuous wavelet transform --------------------------------------------------------- Code released under the BSD 3-clause licence. Copyright (c) 2012, <NAME>, University of Cape Town All rights reserved. Redistribution and ...
<reponame>jiangtaoo2333/StaticGestureRecognition ''' @Author: Jiangtao @Date: 2019-08-07 10:42:06 * @LastEditors : Please set LastEditors * @LastEditTime : 2021-10-08 13:49:42 @Description: ''' import os from collections import OrderedDict import torch import torch.nn as nn from .. import layer class multi_out_5(nn....
= self.genProcessSparseReturnVal(retVals[i], sparseRetType, irOut) self.setResidencyCode(residencyCode) if self._gfxLevel < GFX9 and self._opKind == SpirvImageOpKind.gather: # Patch return type for gather if self._sampledType == SpirvSampledType.i32 or self._sampledType == SpirvSampledType.u32: assert irNeedPatch...
"name" : "EnabledStatus"}, }, "access" : "readwrite", "description" : """802.1x port authentication enabled/disabled for the switch.""", }, # scalar "portAuthTable" : { "nodetype" : "table", "moduleName" : "ZYXEL-ES2024A-MIB", "oid" : "1.3.6.1.4.1.890.172.16.17.32.6.4", "status" : "current", "description" : ...
<reponame>allen-cell-animated/medyan from numpy import * import pylab as plt import matplotlib as mpl from mpl_toolkits.mplot3d import Axes3D import scipy.linalg as la from scipy.stats import linregress import math #Various snapshots for objects class FilamentSnapshot: def __init__(self): self.id=None self.type=N...
<reponame>Devwalkar/BOC-KD<filename>tools/train.py import torch import torchvision import torch.nn as nn import numpy as np import argparse import torchvision.transforms as transforms from torch.autograd import Variable import torch.utils.data import torch.optim as optim from datetime import datetime import sys sys....
<filename>soas.py #!/usr/bin/env python3 import argparse from string import Template import os from os import path from pathlib import Path, PurePath from collections import OrderedDict from typing import Type from gen.type import * from gen.term import * from gen.eq import * class Syntax: """Second-order syntax, con...
#!/usr/bin/env python3 """ Script to log into the CloudGenix Controller UI and take screenshots. Leverages Selenium-wire, headless Chrome, and CloudGenix SDK. Also uses cloudgenix_config files as the data source. """ import sys import os import time import yaml import pathlib import cloudgenix from cloudgenix_config im...
import numpy as np import scipy from ._simsig_tools import _check_list,_rand_uniform from ._generator_base import generator_base #------------------------------------------------------------------------------------ __all__=['harmonics','Harmonics'] #------------------------------------------------------------------...
Scaled (SCS) CCSD' + r'\s*' + r'(?:.*?)' + r'^\s+' + r'Same spin contribution' + r'\s+' + NUMBER + r'\s*' + r'^\s+' + r'Same spin scaling factor' + r'\s+' + NUMBER + r'\s*' r'^\s+' + r'Opposite spin contribution' + r'\s+' + NUMBER + r'\s*' + r'^\s+' + r'Opposite spin scaling factor' + r'\s+' + NUMBER + r'\s*' r'\^s...
<gh_stars>0 from collections import Iterable from pandas import DataFrame from shapely.geometry import LineString, MultiPolygon from shapely.geometry.point import Point from shapely.geometry.multipoint import MultiPoint from shapely.wkt import loads from geopandas import GeoDataFrame, sjoin import pandas as pd from je...
<reponame>anton-sidelnikov/openstacksdk # 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...
hdu,wcs, pix_mask, bkg_mask,Vmag,Tmag,Gmag,rmag,imag,zmag,Jmag,Hmag,Kmag,Teff,ra,dec,logg,rho,dist,CCD,Camera = Get_FFI(ID,Sector,cadence,path,for_injections=for_injections) ax = fig.add_subplot(ax_placement,projection=wcs) if cadence=='short': x=hdu[1].header['1CRPX4']-1 y=hdu[1].header['2CRPX4']-1 ax.set_titl...
<filename>SurfacePlotting.py class PlotSurfaces(object): from nilearn._utils.compat import _basestring # Import libraries import numpy as np import nibabel from nibabel import gifti import matplotlib.pyplot as plt import matplotlib.tri as tri from mpl_toolkits.mplot3d import Axes3D def __init__(self, meshe...
<reponame>alexdesiqueira/papyri from __future__ import annotations import builtins import json import warnings from collections import defaultdict from dataclasses import dataclass from functools import lru_cache from pathlib import Path from typing import Any, Dict, FrozenSet, List, Optional, Tuple, Union from there...
<filename>posts/ParkMaps/park_class_v2.py """ Create a class object for a park. - runs that have been analyzed are tracked so it doesn't re-analyze all runs when a new one is added to directory - breaks runs down into segments based on identified junctions. Identified junctions are tracked. Segments are tracked - Every...
sturdy pair of boots equipped with alien spring technology.", ), Entry( 9, "Spike Shoes", "A sturdy pair of boots with sharp spikes fitted to the bottom.", ), Entry( 10, "Compass", "This classic explorer's tool will point you right to the exit. How convenient!", ), Entry( 11, "Alien Compass", "A special compas...
# -*- coding: utf-8 -*- import os import sys import hashlib import re import redis import MySQLdb import chardet import ConfigParser import subprocess import shlex import binascii import xlrd #import datetime #from dateutil.parser import parse from PyQt4 import QtGui, QtCore from hashlib import sha256 from hmac import ...
<filename>examples/solid_mechanics/linear_elasticity/with_3d_activation/settings.py<gh_stars>10-100 # Linear elasticity with active stress and artifical electrophysiology # Use ParaView for visualization. # Add a Glyph filter with arrows for field "-rhsNeumannBC", this is the applied traction. # # This settings file wo...
๏ปฟ#!/usr/bin/env python # -*- coding: utf-8 -*- """ This experiment was created using PsychoPy3 Experiment Builder (v2020.1.3), on ๅ…ญๆœˆ 15, 2020, at 09:02 If you publish work using this script the most relevant publication is: <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>. (2019) PsychoPy2: E...