input stringlengths 2.65k 237k | output stringclasses 1
value |
|---|---|
# -*-coding: utf8-*-
"""symboldict module
"""
from __future__ import (absolute_import, division,
print_function, unicode_literals)
import functools
from importlib import import_module
import sys
from .version import __version__
import warnings
def deprecated(func):
'''This is a decorator which can be used to mark f... | |
<reponame>CopticScriptorium/gitdox
#!/usr/bin/python
# -*- coding: utf-8 -*-
#print("Content-type:text/html\r\n\r\n")
from six import iteritems
import cgi, cgitb
import os, shutil
import sys, traceback
from modules.logintools import login
import urllib
from modules.gitdox_sql import *
from modules.gitdox_git import *... | |
from ..base import OptionsGroup
from ..exceptions import ConfigurationError
from ..typehints import Strlist, Strint
from ..utils import KeyValue
class MasterProcess(OptionsGroup):
"""Master process is a separate process offering mentoring capabilities
for other processes. Only one master process per uWSGI instance.... | |
interface to %s_automation.c (in %s)' % (self.m_name, path.abspath(path.curdir)) )
generatorDir = path.dirname(sys.argv[0])
arduinoConfig = path.abspath(path.join(generatorDir, '..', '..', '..', 'libraries', 'SequantoAutomation', 'utility', 'src', 'config.h'))
fp = open ( '%s_automation.c' % self.m_name, 'w' )
fp... | |
'''
Dataset and Dataloader classes for both numerical test cases
=====
Distributed by: <NAME> SCAI Lab (MIT Liscense)
- Associated publication:
url: http://aimsciences.org//article/id/3a9f3d14-3421-4947-a45f-a9cc74edd097
doi: https://dx.doi.org/10.3934/fods.2020019
github: https://github.com/zabaras/deep-turbulence
==... | |
cleaning and estimate action center and spread.
Parameters
----------
data_threshold: dict
parameters for threshold detector
data_dbscan: dict
parameters for dbscan detector
data_local_outlier_factor: dict
parameters for local outlier factor detector
data_isolation_forest: dict
parameters for isolation fores... | |
and also the entry
level for the user level operations.
"""
manager = None
""" The manager of the template file, this is considered to
be the owner and generator instance """
base_path = None
""" The base path to be used in the resolution of template
files, this value may or may not be defined and i... | |
is None and data is not None:
raise EVMException("Invalid end transaction result")
if not isinstance(data, (type(None), Array, bytes)):
raise EVMException("Invalid end transaction data type")
self.result = result
self.data = data
def is_rollback(self):
if self.result in {"STOP", "RETURN", "SELFDESTRUCT"}:
retu... | |
3 * y(t) + 31),
Eq(diff(y(t), t, t), 9 * x(t) + 7 * y(t) + 12),
)
sol2 = [
Eq(
x(t),
3 * C1 * exp(t * rootof(l ** 4 - 15 * l ** 2 + 29, 0))
+ 3 * C2 * exp(t * rootof(l ** 4 - 15 * l ** 2 + 29, 1))
+ 3 * C3 * exp(t * rootof(l ** 4 - 15 * l ** 2 + 29, 2))
+ 3 * C4 * exp(t * rootof(l ** 4 - 15 * l ** 2 + 29, 3))
... | |
from tnsnames.tnsnamesListener import TnsnamesListener
from tnsnames.tnsnamesParser import tnsnamesParser
from tnsnames.tnsnamesStack import TnsnamesStack
# Base class for all format classes
class TnsnamesFormatter(TnsnamesListener):
def __init__(self):
self._lines = []
self._tnsStack = TnsnamesStack()
self._ente... | |
or_coord_format = 'cart'
else:
or_coord_format = 'cart'
#
# update display section
#
if 'display' in di:
for k in di['display']:
try:
self.display[k] = eval(di['display'][k])
except:
self.display[k] = di['display'][k]
# self.ax = self.display['box']
#
# [points]
#
# update points section
for nn in di[... | |
_ref_Abel_v_12_t),
(12,71 ) : ((0,1,645,446,813,543,413,7,55,177,468,503,646), _ref_Abel_v_12_t),
(12,73 ) : ((0,1,607,719,837,496,240,645,184,829,451,830,770), _ref_Abel_v_12_t),
(12,83 ) : ((0,1,627,898,836,939,742,42,847,531,173,607,361), _ref_Abel_v_12_t),
(12,85 ) : ((0,1,778,1000,913,819,961,456,507,186,509,4... | |
chromo, pos):
anno_file = dat.GzipFile(anno_file, 'r')
anno = pd.read_table(anno_file, header=None, usecols=[0, 1, 2],
dtype={0: 'str', 1: 'int32', 2: 'int32'})
anno_file.close()
anno.columns = ['chromo', 'start', 'end']
anno.chromo = anno.chromo.str.upper().str.replace('CHR', '')
anno = anno.loc[anno.chromo == ... | |
<gh_stars>100-1000
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 1999-2017 Alibaba Group Holding 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://www.apache.org/lic... | |
<gh_stars>1-10
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 21 16:45:28 2019
@author: qde
"""
import numpy as np
from numpy.linalg import inv, norm
from scipy.linalg import solve_discrete_are,lstsq
from numpy.random import randn
from filterpy.common import pretty_str
from filterpy.kalman import KalmanFilter
class... | |
<filename>userbot/modules/multimemes.py
# Copyright (C) 2020 MoveAngel and MinaProject
#
# Licensed under the Raphielscape Public License, Version 1.d (the "License");
# you may not use this file except in compliance with the License.
#
# Multifunction memes
#
# Based code + improve from AdekMaulana and aidilary... | |
please pass async_req=True
>>> thread = api.get_run_upstream_lineage_with_http_info(owner, entity, uuid, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str owner: Owner of the namespace (required)
:param str entity: Entity name under namesapce (required)
:p... | |
Ports if defined in senders or recipients
- MAC address ethSrc loaded from Ingress device
- Check intent state with retry
Required:
name - Type of point intent to add eg. IPV4 | VLAN | Dualstack
senders - List of host dictionaries i.e.
[ { "name":"h8", "device":"of:0000000000000005/8","mac":"00:00:00:00:00:08" } ... | |
and (line_list[line]["line_type"]=="abs"): line_list[line]["voff"] = "ABS_VOFF"
elif ("line_type" not in line_list[line]) or (line_list[line]["line_type"]=="user"):
if verbose:
print("\n Warning: %s has no line_type keyword specified. Assuming narrow line." % (line))
line_list[line]["voff"] = "NA_VOFF"
line_list[l... | |
bold').grid(row=2, column=0, sticky="ne")
TK.Label(OtherFrame, text='Initial Flux (Jy/km/s) =', bg='black', fg='white', font='none 12 bold').grid(row=1, column=2, sticky="ne")
self.UserDiskThic = TK.Entry(OtherFrame, width=20, bg='white')
self.UserDiskThic.grid(row=0, column=1, sticky="nwse")
self.UserDiskAng... | |
# All Rights Reserved.
# Copyright 2013 SolidFire 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 ag... | |
"""
Segmentaion Part
Modified from DETR (https://github.com/facebookresearch/detr)
"""
from collections import defaultdict
from typing import List, Optional
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch import Tensor
from PIL import Image
from einops import rearrange, repeat
try:
fr... | |
fermé."""
return self[0] if len(self)==1 else centreGravite(self.dpoints)
centregravite=gravitycenter
@property
def barycentre(self):
u"""Le centre de gravité du nuage de points matériels cpoints."""
return baryCentre(self.cpoints)
@property
def degre(self):
m0,m1 = self.methode
if m0 in ('cubic',) : return ... | |
import sys, os
import numpy as np
from lflib.lightfield import LightField
from lflib.imageio import save_image
from scipy.ndimage import filters
os.environ['PYOPENCL_COMPILER_OUTPUT'] = '1'
try:
import pyopencl as cl
import pyopencl.array as cl_array
LFLIB_HAVE_OPENCL = True
except ImportError:
LFLIB_HAVE_OPENCL = ... | |
<reponame>blackdaemon/enso-launcher-continued
# Copyright (c) 2008, Humanized, 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:
#
# 1. Redistributions of source code must retain the above copy... | |
import logging
from pprint import pprint
import numpy as np
from copy import deepcopy
from pycqed.measurement.waveform_control import pulsar as ps
from pycqed.measurement.waveform_control import sequence as sequence
from pycqed.measurement.waveform_control import segment as segment
from pycqed.measurement.randomized_b... | |
"faulty": -1.3,
"undesirable": -1.9,
"flustered": -1.0,
"beauteousness": 2.7,
"loyalty": 2.5,
"ambivalent": 0.5,
"vulnerableness": -1.1,
"loyalists": 1.1,
"longingly": 0.7,
"faithlessly": -0.9,
"determinate": 0.8,
"intimidatingly": -1.1,
"responsive": 1.5,
"lovingness": 2.7,
"shitheads": -2.6,
"pleasurab... | |
<gh_stars>1-10
"""
Keywords used across different PENELOPE main programs.
"""
# Standard library modules.
from operator import attrgetter
# Third party modules.
# Local modules.
from pypenelopetools.penelope.keyword import (
TypeKeyword,
KeywordSequence,
KeywordGroupBase,
)
from pypenelopetools.penelope.enums imp... | |
str
:param Tid: 设备TID
:type Tid: str
:param OrderCount: 订单数量,可一次性创建多个订单
:type OrderCount: int
:param StorageRegion: 云存服务所在的区域,如ap-guangzhou,ap-singapore
:type StorageRegion: str
:param ChnNum: 视频流通道号。(对于存在多路视频流的设备,如NVR设备,与设备实际视频流通道号对应)
:type ChnNum: int
:param AccessId: 设备主人用户在IoT Video平台的注册ID。该参数用于验证Paas/Saas... | |
1
## Have to move 1 in the Y direction which is the same as z_num
back_plane_top_left_idx = z_proj + z_num
back_plane_bot_left_idx = back_plane_top_left_idx + 1
## Have to move 1 in the X direction which is the same as z_num*y_num
front_plane_top_right_idx = z_proj + y_num*z_num
front_plane_bot_right_idx = f... | |
<reponame>tioui/Vim_Eiffel_IDE
# The MIT License (MIT)
#
# Copyright (c) 2014 <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 ri... | |
<reponame>olivermfacon/premier-league-app
import os
import json
import http.client
import requests
from mailjet_rest import Client
from dotenv import load_dotenv
from oddscalculator import *
from fractions import Fraction
def club_colors(selected_team_id):
"""
Returns the colors based on the id of the team. The col... | |
== 1)
m.c1527 = Constraint(expr= m.x924 + m.x940 == 1)
m.c1528 = Constraint(expr= m.x925 + m.x941 == 1)
m.c1529 = Constraint(expr= m.x926 + m.x942 == 1)
m.c1530 = Constraint(expr= m.x927 + m.x943 == 1)
m.c1531 = Constraint(expr= m.x928 + m.x944 == 1)
m.c1532 = Constraint(expr= m.x929 + m.x945 == 1)
m.c1533 = Con... | |
# -*- coding: utf-8 -*-
"""Contains various utility classes for creating loopy arrays
and indexing / mapping
"""
import logging
import six
import copy
from string import Template
import loopy as lp
import numpy as np
from loopy.kernel.data import AddressSpace as scopes
from pyjac.core.enum_types import JacobianForma... | |
#!/usr/bin/env python3
import abc
from functools import partial
from typing import Generator, Optional, Tuple, Union
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from sklearn import metrics
from sklearn.model_selection import KFold
from sklearn.preprocessing import MinMaxScaler, Normalizer, ... | |
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
from matplotlib.backends.backend_pdf import PdfPages
import pandas as pd
import numpy as np
from yellowbrick.regressor import PredictionError, ResidualsPlot
from yellowbrick.regressor.alphas import AlphaSelection
import yellowbrick as yb
from typing ... | |
import binascii
import cgi
import json
import os
import subprocess
import urllib.parse
import webbrowser
import requests
import sublime
import sublime_plugin
from Default.paragraph import expand_to_paragraph
Settings = None
class ValeFixCommand(sublime_plugin.TextCommand):
"""Applies a fix for an alert.
"""
d... | |
<gh_stars>1-10
""" Module contains filter used in tidal time series analysis.
"""
## Python libary import.
from numpy import abs
import pandas as pd
import numpy as np
from vtools.data.vtime import seconds, minutes, hours
from scipy import array as sciarray
from scipy.signal import lfilter,firwin,filtfilt
from scipy.... | |
process closes before the
# command is finished. If you would like your application to print a warning message, then set the
# broken_pipe_warning attribute to the message you want printed.`
if self.broken_pipe_warning:
sys.stderr.write(self.broken_pipe_warning)
# ----- Methods related to tab completion -----
d... | |
when sending a request.
:ivar type: The type of the target. Possible values include: "TargetGroup", "SqlDatabase",
"SqlElasticPool", "SqlShardMap", "SqlServer".
:vartype type: str or ~azure.mgmt.sql.models.JobTargetType
:ivar server_name: The server name.
:vartype server_name: str
:ivar database_name: The databa... | |
if
c.concepticon_id}
else: # All observed concepts
self.concepts_subset = set(concepts.values())
self.lang_to_concept = defaultdict(set)
self.data = defaultdict(lambda:defaultdict(list))
for row in progressbar(db.iter_table('FormTable'),
desc="Loading data..."):
if row.get("Loan", ""): continue # Ignore loan... | |
from django.shortcuts import render, redirect, get_object_or_404, HttpResponseRedirect, reverse
from django.views.generic import ListView, View, CreateView, UpdateView, DeleteView, RedirectView, DetailView
from .models import JobOpening, ShareJob, RequestJob
from django.contrib.auth.mixins import LoginRequiredMixin, Us... | |
flowing wells so that there is
not an abrupt change in flowing well rates.
rate : [double]
* rate (double) is the volumetric pumping rate for the multi-
aquifer well. A positive value indicates recharge and a
negative value indicates discharge (pumping). RATE only
applies to active (IBOUND > 0) multi-aquifer well... | |
# coding=utf-8
"""Multifuture inferencing."""
import argparse
import json
import os
#import cPickle as pickle
import pickle
import numpy as np
import tensorflow as tf
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
# the following will still have colocation debug info
tf.compat.v1.logging.set_verbosity(tf.compat.v1.loggin... | |
"parameters": {},
"form_key": None,
},
"y": {
"class": "NumpyArray",
"primitive": "bool",
"inner_shape": [],
"has_identifier": False,
"parameters": {},
"form_key": None,
},
},
"has_identifier": False,
"parameters": {},
"form_key": None,
}
assert ak._v2.forms.recordform.RecordForm(
contents=[
ak._v2.fo... | |
"困":
List.append("9EAE")
elif i == "択":
List.append("9EAF")
elif i == "夕":
List.append("9EB0")
elif i == "扱":
List.append("9EB1")
elif i == "啓":
List.append("9EB2")
elif i == "汚":
List.append("9EB3")
elif i == "罰":
List.append("9EB4")
elif i == "胆":
List.append("9EB5")
elif i == "猫":
List.append("9EB6"... | |
<filename>textstat/textstat.py
import warnings
import string
import re
import math
from collections import Counter
import pkg_resources
from functools import lru_cache
from pyphen import Pyphen
langs = {
"en": { # Default config
"fre_base": 206.835,
"fre_sentence_length": 1.015,
"fre_syll_per_word": 84.6,
"sylla... | |
if not present.
if item["loc"]["chr"] not in chr_blocks:
chr_blocks[item["loc"]["chr"]] = {}
block_id = "bid:%s" % (math.floor(item["loc"]["left"] / resolution) * 1000, )
if block_id not in chr_blocks[item["loc"]["chr"]]:
chr_blocks[item["loc"]["chr"]][block_id] = [0 for x in range(len(self.linearData))] # one fo... | |
-> structure: parameter "path" of String, parameter
"shock_id" of String, parameter "ftp_url" of String, parameter
"gff_file" of type "File" -> structure: parameter "path" of
String, parameter "shock_id" of String, parameter "ftp_url" of
String, parameter "genome_name" of String, parameter
"workspace_name" of Stri... | |
"""
Implements the ArraysInterface object and supporting functionality.
"""
#***************************************************************************************************
# Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
# Under the terms of Contract DE-NA0003525 with NTES... | |
<gh_stars>0
#!/usr/local/bin/python3
"""
Copyright contributors to the Application Gateway project
"""
import logging as sys_logging
import sys
import os
import traceback
import yaml
from ibm_application_gateway.config import *
from ibm_application_gateway.system import *
###########################################... | |
to include the changes sent by the user."""
subtract, add = value
value = set(subject.get_value(attribute.key().name()) or [])
value -= set(subtract)
value |= set(add)
return list(value)
DEFAULT_SUBJECT_TYPES = {
'haiti': 'hospital',
'pakistan': 'hospital'
}
def match_email(text):
"""Given a string, tries t... | |
action='store_true', help='if set save test results to XML file')),
(['--with-coverage'], dict(
default=False, action='store_true', help='if set assess code coverage')),
(['--coverage-dirname'], dict(
type=str, default='tests/reports', help="Directory to store coverage data; default='tests/reports'")),
(['--covera... | |
Returns:
Settings are recoded in `self.control_df` rows: `'port_0_terms+-'` & `'port_1_terms+-'`
"""
assert port_0_pos_term in self.circ_netlist_obj.node_names, f'`{port_0_pos_term}` is not a node in the circuit under test'
self.port_0_pos_term=port_0_pos_term
assert port_0_neg_term in self.circ_netlist_obj.no... | |
be increasing.
By default, this expectation only works for numeric or datetime data.
When `parse_strings_as_datetimes=True`, it can also parse strings to datetimes.
If `strictly=True`, then this expectation is only satisfied if each consecutive value
is strictly increasing--equal values are treated as failures.
... | |
<filename>seocrawler/__init__.py
# -*- coding: utf-8 -*-
import os
import sys
import time
import uuid
import requests
import re
import hashlib
import json
from urlparse import urlparse, urljoin
import atexit
import gzip
from bs4 import BeautifulSoup
import seolinter
html_parser = "lxml"
# html_parser = "html.parse... | |
# utils codes of reader. The codes are based on huggingface pre-trained-bert libraries.
from __future__ import absolute_import, division, print_function
import json
import logging
import math
import collections
from io import open
import numpy as np
from pytorch_pretrained_bert.tokenization import BasicTokenizer, wh... | |
"""
Notice : 神兽保佑 ,测试一次通过
//
// ┏┛ ┻━━━━━┛ ┻┓
// ┃ ┃
// ┃ ━ ┃
// ┃ ┳┛ ┗┳ ┃
// ┃ ┃
// ┃ ┻ ┃
// ┃ ┃
// ┗━┓ ┏━━━┛
// ┃ ┃ Author: somewheve
// ┃ ┃ Datetime: 2019/7/3 下午8:46 ---> 无知即是罪恶
// ┃ ┗━━━━━━━━━┓
// ┃ ┣┓
// ┃ ┏┛
// ┗━┓ ┓ ┏━━━┳ ┓ ┏━┛
// ┃ ┫ ┫ ┃ ┫ ┫
// ┗━┻━┛ ┗━┻━┛
//
"""
f... | |
Field(
name='Extra_ModsKeys',
type='ref|list|ulong',
key='Mods.dat',
),
Field(
name='Flag0',
type='byte',
),
Field(
name='Flag1',
type='byte',
),
Field(
name='Flag2',
type='byte',
),
Field(
name='Key3',
type='ulong',
),
Field(
name='Unknown12',
type='int',
),
Field(
name='Unknown13',
type='in... | |
'data': attribData_8570479821456996,
'lang': attribLang_267608473188383376,
'name': attribName_1939937075622105121,
'standby': attribStandby_1257958614369601764,
'align': attribAlign_242187980190960400,
'vspace': attribVspace_3197471081211222544,
'onkeyup': attribOnkeyup_4105996191008517796,
'ondblclick... | |
# :[diStorm3}: Python binding
# Based on diStorm64 Python binding by <NAME>
# Initial support for decompose API added by <NAME>
# Changed license to GPLv3.
#
# Compatible with Python2.6 and above.
#
info = (
"diStorm3 by <NAME>, http://code.google.com/p/distorm/\n"
"Based on diStorm64 Python binding by <NA... | |
<gh_stars>10-100
# -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# formats: ipynb,py:light,md
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.13.3
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
# name: python3
# ---
# # 🔄 Online le... | |
<gh_stars>1-10
import six
import types
import itertools
import numpy as np
class Sampling(object):
"""Some useful functions for sampling are defined
Attributes:
input_configuration (dict): store sampling yielders
_backup_input_configuration (dict): copy of self.input_configuration
_dummy_type_tee (itertools.te... | |
#-------------------------------------------------------------------------------
#
# Handles the WPS requests to the VirES server
#
# Authors: <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
#
#-------------------------------------------------------------------------------
# Copyright (C) 2018 EOX IT Services GmbH
#
# Permission i... | |
_dict:
args['limits'] = ResourceLimits.from_dict(_dict.get('limits'))
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
"""Initialize a ResourceObjectFabV1 object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
"""Return a json dictionary representing this model."""... | |
"""
Undirected graph data type and procedures for its manipulation.
"""
from collections import deque
import sys
class Graph:
"""
Generic purpose data structure to represent an directed or undirected graph in a time and memory efficient way.\n
Vertexes are named with consecutive numbers starting from 0
(the last... | |
import re
import pathlib
import tempfile
from collections import OrderedDict
from enum import Enum
from functools import lru_cache
from typing import List, Union, Dict
from hikari.resources import cif_core_dict
from hikari.utility import make_abspath
class CifBlock(OrderedDict):
"""
CifBlock object handles all da... | |
# 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 use t... | |
[], "SRL L", 2),
(0xCB, 0x3E) : (0, [], [ MR(indirect="HL", action=SRL()), MW(indirect="HL") ], "SRL (HL)", 2),
(0xCB, 0x3F) : (0, [ SRL("A") ], [], "SRL A", 2),
(0xCB, 0x40) : (0, [ BIT(0, "B") ], [], "BIT 0,B", 2),
(0xCB, 0x41) : (0, [ BIT(0, "C") ], [], "BIT 0,C", 2),
(0xCB, 0x42) : (0, [ BIT(0, "D") ], [], "BI... | |
<filename>lib/saq/cloudphish.py
# vim: sw=4:ts=4:et:cc=120
# constants used by cloudphish
import datetime
import hashlib
import json
import logging
import os, os.path
import pickle
import uuid
from urllib.parse import urlparse
import saq
from saq.analysis import RootAnalysis
from saq.constants import *
from saq.craw... | |
<filename>notion2pg.py
#!/usr/bin/env python
# Notes on formulas
# -----------------
#
# There are four output types of formulas:
#
# 1. string
# 2. number
# 3. date — never a date range, unlike date properties
# 4. boolean
# Notes on rollups
# ----------------
#
# There are four signatures of rollup functions:
#
# 1... | |
# Copyright 2019 DeepMind Technologies 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 t... | |
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.I16:
self.Sub = iprot.readI16()
else:
iprot.skip(ftype)
elif fid == 4:
if ftype == TType.I16:
self.Subsub = iprot.readI16()
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
def write(self, oprot):
if oprot._fas... | |
out_channels: int,
kernel_size: typing.Union[
int, typing.Tuple[int, int], typing.Tuple[int, int, int]
] = 3,
stride: typing.Union[
int, typing.Tuple[int, int], typing.Tuple[int, int, int]
] = 1,
padding: typing.Union[
str, int, typing.Tuple[int, int], typing.Tuple[int, int, int]
] = "same",
dilation: typing.... | |
triples generated from an RDFa 1.1 source are not the same as for RDFa 1.0. (See the separate U{section in the RDFa 1.1 specification<http://www.w3.org/TR/rdfa-core/#major-differences-with-rdfa-syntax-1.0>} for some further details.)
This distiller’s default behavior is RDFa 1.1. However, if the source includes, in th... | |
P.ghWp__tilde__, P.G0 ],
color = [ '1' ],
lorentz = [ L.UUS1 ],
couplings = {(0,0):C.GC_2052})
V_104 = Vertex(name = 'V_104',
particles = [ P.ghWp, P.ghWp__tilde__, P.A0 ],
color = [ '1' ],
lorentz = [ L.UUS1 ],
couplings = {(0,0):C.GC_2044})
V_105 = Vertex(name = 'V_105',
particles = [ P.ghWp, P.ghWp__tilde_... | |
<gh_stars>0
# coding: utf-8
# (C) Copyright IBM Corp. 2021.
#
# 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 l... | |
"""\
basis sets for use with PyQuante
This program is part of the PyQuante quantum chemistry program suite.
"""
sto3g = \
{1: [('S',
[(3.4252509099999999, 0.15432897000000001),
(0.62391373000000006, 0.53532813999999995),
(0.16885539999999999, 0.44463454000000002)])],
2: [('S',
[(6.3624213899999997, 0.154328970... | |
yielding strings, tuples or dicts.
keys: which keys of the tuple/dict to tokenize (by default: all)
vocab_type: Type of vocabulary, one of: 'subword', 'sentencepiece', 'char'.
vocab_file: Name of the vocabulary file.
vocab_dir: Directory which contains the vocabulary file.
n_reserved_ids: An int, offset added so 0... | |
It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default... | |
<filename>nova/virt/libvirt/migration.py
# Copyright (c) 2016 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 b... | |
White":0xe8e6e7,
"Minuette":0xd47791,
"Minute Mauve":0xcfc9c8,
"Mirabella":0x886793,
"Mirabelle Yellow":0xf3be67,
"Miracle":0x898696,
"Miracle Bay":0x799292,
"Miracle Elixir":0x617ba6,
"Mirador":0xbcdccd,
"Mirage":0x373f43,
"Mirage Blue":0x636c77,
"Mirage Grey":0xabafae,
"Mirage Lake":0x4f938f,
"Mirage White":0xf5f4e6,... | |
<gh_stars>1-10
from collections import OrderedDict
import logging
from pathlib import Path, PureWindowsPath
import uuid
import matplotlib.pyplot as plt
import numpy as np
from pkg_resources import parse_version
from scipy import interpolate
import alf.io
from brainbox.core import Bunch
import ibllib.dsp as dsp
import... | |
#!/usr/bin/env python
# Copyright 2017-2021 The PySCF Developers. 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
#
# Unles... | |
<filename>polynomials_over_Zp.py
# -*- coding: utf-8 -*-
"""
"""
# =============================================================================
from sympy.polys import galoistools as gt
from sympy.ntheory import isprime
from sympy.polys.domains import ZZ
# ===========================================================... | |
<reponame>cottongin/coolchat-discord-bot<filename>cogs/scores.py
# coding=utf-8
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
import pickle
import shlex
import aiohttp
import coloredlogs
import pendulum
import requests
import discord
from discord.ext import command... | |
define at line ' + str(line_number))
def parse_messages(self):
self.File.setup_iterator()
while(self.File.has_next()):
[line_number, line] = self.File.get_next()
if(line[0] == 'message'):
# Create new message object
message = Message.get_message(line)
# Extract message block
... | |
<gh_stars>0
# Copyright (c) 2015 Infortrend Technology, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | |
Player.white): 2294607763040053819,
(Point(row=9, col=8), Player.black): 5178250685268040999,
(Point(row=9, col=8), Player.white): 3364679157508528694,
(Point(row=9, col=9), Player.black): 3553967243152693124,
(Point(row=9, col=9), Player.white): 3068058057478630282,
(Point(row=9, col=10), Player.black): 618423816... | |
import os
import json
import tempfile
import logging
import contextlib
from maya import cmds
from . import capsule, xgen
from .vendor import capture
from .. import utils
log = logging.getLogger(__name__)
def export_fbx(out_path, selected=True):
from pymel.core import mel as pymel
try:
pymel.FBXExport(f=out_pat... | |
= 'TheirEnum'
class WhoseEnum(TheirEnum):
def __init_subclass__(cls, **kwds):
pass
class NoEnum(WhoseEnum):
ONE = 1
self.assertEqual(TheirEnum.__dict__['_test1'], 'MyEnum')
self.assertEqual(WhoseEnum.__dict__['_test1'], 'MyEnum')
self.assertEqual(WhoseEnum.__dict__['_test2'], 'TheirEnum')
self.assertFalse(NoEn... | |
a voice channel'.format(ctx.author.name), color=color)
embed.set_author(name="Voice", icon_url=url_author_music)
await ctx.send(embed=embed)
else:
embed = discord.Embed(description="{}, buddy, connect to a voice channel first 🔊".format(ctx.author.name), color=color)
embed.set_author(name="Walkman™", icon_url=url... | |
the
``LogEntry``
arg: from_log_id (osid.id.Id): the ``Id`` of the current
``Log``
arg: to_log_id (osid.id.Id): the ``Id`` of the destination
``Log``
raise: NotFound - ``log_entry_id, from_log_id,`` or
``to_log_id`` not found or ``log_entry_id`` not mapped
to ``from_log_id``
raise: NullArgument - ``log_entry_id... | |
<reponame>thieu1995/mealpy
#!/usr/bin/env python
# ------------------------------------------------------------------------------------------------------%
# Created by "<NAME>" at 07:03, 18/03/2020 %
# %
# Email: <EMAIL> %
# Homepage: https://www.researchgate.net/profile/Thieu_Nguyen6 %
# Github: https://github.com/thi... | |
"""
Created on Tue July 13 12:01 2021
@author: juliaroquette
Spin evolution model implemented in the development of the study by
Roquette et al. 2021.
The class SpinEvolutionCode performs the spin evolution modeling of stars
in the mass range 0.1-1.3 Msun. For a details on the theoretical background
in the model, s... | |
\
If you don't specify stds then pure elements are assumed. Otherwise standards is a dictionary mapping an element to a composition."""
if isinstance(comp, epq.ISpectrumData):
cp = comp.getProperties()
t = cp.getCompositionWithDefault(epq.SpectrumProperties.MicroanalyticalComposition, None)
if not t:
t = cp.getCo... | |
"""
The crypt module manages all of the cryptography functions for minions and
masters, encrypting and decrypting payloads, preparing messages, and
authenticating peers
"""
import base64
import binascii
import copy
import getpass
import hashlib
import hmac
import logging
import os
import random
import stat
import sys
... | |
<gh_stars>10-100
"""Test AdsSymbol class.
:author: <NAME> <<EMAIL>>
:license: MIT, see license file or https://opensource.org/licenses/MIT
:created on: 2020-11-16
"""
import time
from datetime import datetime, timedelta
import struct
from ctypes import sizeof, pointer
import unittest
from unittest import mock
impor... | |
=16776960 # from enum XlRgbColor
rgbAquamarine =13959039 # from enum XlRgbColor
rgbAzure =16777200 # from enum XlRgbColor
rgbBeige =14480885 # from enum XlRgbColor
rgbBisque =12903679 # from enum XlRgbColor
rgbBlack =0 # from enum XlRgbColor
rgbBlanchedAlmond =13495295 # from enum XlRgbColor
rgbBlue =16711680 # from en... | |
threshold = 0.015 # acceptance thr when comparing //PARAM
matchings = list()
steps = 32 # steps on spin //PARAM
for i in range(steps):
trans = np.eye(4) # set transformation amtrix
trans[:3,:3] = source.get_rotation_matrix_from_xyz((0,0, -(np.pi/(steps/2))*i)) # add rotation
reg_p2l = o3d.pipelines.registratio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.