input stringlengths 2.65k 237k | output stringclasses 1
value |
|---|---|
'''
GOAL: Take .fastq files, corresponding to forward and reverse reads, and
sort each read into separate files depending on which barcodes it contains.
'''
from Bio import SeqIO
import sys
import os
import shutil
from itertools import izip
import multiprocessing, threading
from functools import partial
import time
fr... | |
<gh_stars>0
# Copyright 2020 The TensorFlow Quantum Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | |
'\u2267\u0338',
'ngeqslant;': '\u2a7e\u0338',
'nges;': '\u2a7e\u0338',
'nGg;': '\u22d9\u0338',
'ngsim;': '\u2275',
'nGt;': '\u226b\u20d2',
'ngt;': '\u226f',
'ngtr;': '\u226f',
'nGtv;': '\u226b\u0338',
'nhArr;': '\u21ce',
'nharr;': '\u21ae',
'nhpar;': '\u2af2',
'ni;': '\u220b',
'nis;': '\u22fc',
'nisd;': '... | |
<reponame>icreator/shopForBTCMerchant<gh_stars>0
#!/usr/bin/env python
# coding: utf8
import datetime
from decimal import Decimal
from gluon import current
T = current.T
import common
import crypto_client
import shops_lib
import db_client
import wager_lib
#
# на самом деле это не сервер - он не висит ... | |
<filename>rmgpy/pdep/network.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# #
# RMG - Reaction Mechanism Generator #
# #
# Copyright (c) 2002-2018 Prof. <NAME> (<EMAIL>), #
# Prof. <NAME> (<EMAIL>) and the RMG Team (<EMAIL>) #
# #
# Pe... | |
try:
shutil.rmtree(dir)
logger.debug("Remove directory: " + dir)
except EnvironmentError:
logger.error("Unable to remove directory: " + dir)
else:
logger.debug("Request to remove directory that does not exist: " + dir)
def break_up_fasta_file(fasta_file, max_seqs):
"""
Break up a fasta file into smaller fasta... | |
"art": "constructed",
"art-blk": "Bolak",
"art-bsp": "Black Speech",
"art-com": "Communicationssprache",
"art-dtk": "Dothraki",
"art-elo": "Eloi",
"art-gld": "Goa'uld",
"art-lap": "Lapine",
"art-man": "Mandalorian",
"art-mun": "Mundolinco",
"art-nav": "Na'vi",
"art-nox": "Noxilo",
"art-una": "Unas",
"aru":... | |
= list(itertools.chain(*[c for m, s, g, f, c, ps, pc, psm, pm, psb, bc, st, bm, mt, cc, sb, os, smc in figuras]))
pausacolcheia = list(itertools.chain(*[pc for m, s, g, f, c, ps, pc, psm, pm, psb, bc, st, bm, mt, cc, sb, os, smc in figuras]))
pausaseminima = list(itertools.chain(*[psm for m, s, g, f, c, ps, pc, psm, ... | |
#!/usr/bin/env python
# whisker_serial_order/models.py
"""
===============================================================================
Copyright © 2016-2018 <NAME> (<EMAIL>).
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You m... | |
import datetime
import enum
import gc
import itertools
import pickle
import pickletools
import string
import sys
import uuid
from distutils.version import StrictVersion
import pytest
import quickle
BATCHSIZE = 1000
def test_picklebuffer_is_shared():
assert pickle.PickleBuffer is quickle.PickleBuffer
def test_m... | |
run__fin_rl():
# env = FinanceMultiStockEnv() # 2020-12-24
#
# from AgentZoo import AgentPPO
#
# args = Arguments(rl_agent=AgentPPO, env=env)
# args.eval_times1 = 1
# args.eval_times2 = 1
# args.rollout_num = 4
# args.if_break_early = False
#
# args.reward_scale = 2 ** 0 # (0) 1.1 ~ 15 (19)
# args.break_step = int(5e6 ... | |
<filename>api/drf_views.py<gh_stars>0
from rest_framework.status import HTTP_201_CREATED, HTTP_200_OK
from rest_framework.generics import GenericAPIView, CreateAPIView, UpdateAPIView
from rest_framework.response import Response
from rest_framework.authentication import TokenAuthentication
from rest_framework.permission... | |
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 18 09:17:23 2018
@author: Manuel
the pentaton logic go around II
"""
import random
random.seed(0)
print(random.getrandbits(5))
# =============================================================================
#
# Variables
# =====================... | |
len(item.split("-")) == 6:
self.params[item.split("-")[-1]] = params[item]
class cp2k_motion_md_barostat_print_energy:
def __init__(self):
self.params = {
}
self.status = False
self.each = cp2k_motion_md_barostat_print_energy_each()
# basic setting
def to_input(self, fout):
fout.write("\t\t\t... | |
<gh_stars>0
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import errno
import fcntl
import os
import socket
import time
from datetime import datetime
from typing import... | |
empty container for results
out = {}
# Poincaré features (SD1, SD2, etc.)
out = _hrv_nonlinear_poincare(rri, out)
# Heart Rate Fragmentation
out = _hrv_nonlinear_fragmentation(rri, out)
# Heart Rate Asymmetry
out = _hrv_nonlinear_poincare_hra(rri, out)
# DFA
out = _hrv_dfa(peaks, rri, out, **kwargs)
# Co... | |
# type: ignore
from typing import Union, List, Dict
from urllib.parse import urlparse
import urllib3
from pymisp import ExpandedPyMISP, PyMISPError, MISPObject, MISPSighting, MISPEvent, MISPAttribute
from pymisp.tools import GenericObjectGenerator
import copy
from pymisp.tools import FileObject
from CommonServerPytho... | |
probably
# throw some sort of HTTP exception
else:
raise Exception()
# TML import is distinguished by having an {'Accept': 'text/plain'} header on the POST
def metadata_tml_import(
self,
tml: Union[Dict, List[Dict]],
create_new_on_server: bool = False,
validate_only: bool = False,
formattype: str = 'JSON'
)... | |
"""Environment for training the acceleration behavior of vehicles in a ring."""
import numpy as np
from gym.spaces import Box, Discrete
from flow.core import rewards
from flow.envs.ring.accel import AccelEnv
from flow.envs.multiagent.base import MultiEnv
ADDITIONAL_ENV_PARAMS = {
# maximum acceleration for autonomo... | |
# Copyright (c) 2019-2021, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2020 UT-Battelle, LLC. All rights reserved.
# See file LICENSE for terms.
import array
import asyncio
import gc
import logging
import os
import re
import struct
import weakref
from functools import partial
from os import close as close... | |
<reponame>hpaugam33/vehicule-detection
#!/usr/bin/python
# -*- coding: utf-8 -*-
# ----------------------------------------------
# --- Author : <NAME>
# --- Mail : <EMAIL>
# --- Date : 27th January 2018
# ----------------------------------------------
# Imports
import numpy as np
import os
import six.moves.urllib as ... | |
<reponame>mfisherlevine/astroquery
# Licensed under a 3-clause BSD style license - see LICENSE.rst
# Basic imports
import copy
import io
import re
import warnings
# Import various astropy modules
import astropy.coordinates as coord
import astropy.units as u
import astropy.units.cds as cds
import numpy as np
from astr... | |
<gh_stars>1-10
# -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
import time
import os
import matplotlib.pyplot as plt
import datetime as dt
from numpy import seterr
seterr(all='raise')
np.set_printoptions(suppress=True, threshold=10000, linewidth=1000)
# vaild sele
# MENU = sys.argv[1]
# FILE_PATH = sys... | |
getdata[i*2+5]== 0xff and getdata[i*2+6]== 0xff:
actangle[i-1] = -1
else:
actangle[i-1] = getdata[i*2+5] + (getdata[i*2+6]<<8)
return actangle
#读取实际的受力
def get_actforce():
global hand_id
global ser
datanum = 0x04
b = [0]*(datanum + 5)
#包头
b[0] = 0xEB
b[1] = 0x90
#hand_id号
b[2] = hand_id
#数据个数
b[3] ... | |
#!/usr/bin/env python3
#===============================================================================
# smsExtractor.py | Version 1.3 | FreeBSD License | 2022-06-21
# <NAME> | <EMAIL>
#
# Description:
# Simple script that extracts SMS and MMS messages from previously
# generated XML files into a subdirectory named af... | |
#!/usr/bin/env python
# * coding: utf8 *
'''
cloudb
Usage:
cloudb enable extensions [--verbosity=<level>]
cloudb create schema [--schemas=<name> --verbosity=<level>]
cloudb create admin-user [--verbosity=<level>]
cloudb create read-only-user [--verbosity=<level>]
cloudb create indexes [--verbosity=<level>]
cloud... | |
import sys
from twisted.internet import defer, task
from twisted.internet.endpoints import clientFromString
from twisted.python.failure import Failure
from twisted.python import usage, log
import click
import txtorcon
from . import carml_readme
from . import carml_check_pypi
from . import carml_stream
from . import ... | |
['upstream'],
#'server': ['upstream'],
'upstream': ['http'],
# REF: http://wiki.nginx.org/HttpUseridModule
'userid': ['http', 'server', 'location'],
'userid_domain': ['http', 'server', 'location'],
'userid_expires': ['http', 'server', 'location'],
'userid_name': ['http', 'server', 'location'],
'useri... | |
<reponame>ldfaiztt/redis-in-action
import bisect
from collections import defaultdict, deque
import json
import math
import os
import time
import unittest
import uuid
import zlib
import redis
QUIT = False
pipe = inv = item = buyer = seller = inventory = None
# <start id="_1314_14473_8380"/>
def add_update_contact(co... | |
"Security Definer",
p.proleakproof as "Leak Proof",
p.proisstrict as "Is Strict",
(case p.provolatile when 'i' then 'Immutable' when 's' then 'Stable' when 'v' then 'Volatile' end) as "Volatile",
(case p.proparallel when 's' then 'Safe' when 'r' then 'Restricted' when 'u' then 'Unsafe' end) as "Parallel",
p.pronar... | |
'M', structure='topological')
sage: c_xy.<x,y> = M.chart()
sage: f = M.scalar_field(x+2*y)
sage: f.domain()
2-dimensional topological manifold M
sage: U = M.open_subset('U', coord_def={c_xy: x<0})
sage: g = f.restrict(U)
sage: g.domain()
Open subset U of the 2-dimensional topological manifold M
"""
return se... | |
False)
#Run through a series of differet finds to ensure the various parameter filters are working.
negotiations = self.org_client.find_org_negotiations(org2_id, headers=self.system_actor_header)
self.assertEqual(len(negotiations),2)
negotiations = self.org_client.find_org_negotiations(org2_id,negotiation_status=... | |
<filename>scripts/turtlebot.py<gh_stars>10-100
from math import pi, sqrt, atan2, cos, sin
import numpy as np
import matplotlib.pyplot as plt
import rospy
import tf
from geometry_msgs.msg import Twist, Pose2D
from nav_msgs.msg import Odometry
from obstacle_detector.msg import Obstacles, CircleObstacle, SegmentObstacle
... | |
<reponame>mizutanilab/schizo-nn
from tensorflow.keras import layers
from tensorflow.keras import backend as K
import math
import numpy as np
#https://github.com/tensorflow/tensorflow/blob/v2.3.0/tensorflow/python/keras/layers/core.py
from tensorflow.python.keras.layers.ops import core as core_ops
from tensorflow.pytho... | |
distance + 0.001
# internal nodes have entries
# have one-to-one relationship between nodes and entries
class RTreeNode:
def __init__(self, parent, entries, is_leaf):
self.parent = parent
# self.entries = entries
self.is_leaf = is_leaf
self.m = 8
self.M = 16
self.child_to_entry_dict = {}
for entry in entries:
... | |
= dst_bounds.left + (xres * dst_width)
y1 = dst_bounds.top - (yres * dst_height)
dst_bounds = rio.coords.BoundingBox(top=dst_bounds.top, left=dst_bounds.left, bottom=y1, right=x1)
# Set output shape (Note: dst_size is (ncol, nrow))
if dst_size is not None:
dst_shape = (self.count, dst_size[1], dst_size[0])
dst_d... | |
= self.common_headers
if self.x_acs_dingtalk_access_token is not None:
result['x-acs-dingtalk-access-token'] = self.x_acs_dingtalk_access_token
return result
def from_map(self, m: dict = None):
m = m or dict()
if m.get('commonHeaders') is not None:
self.common_headers = m.get('commonHeaders')
if m.get('x-acs-d... | |
points - " +
str(prediction_at_list))
out_writer.write("Evaluating for the fold-" + str(count) + " for the forecast reference points -- " +
str(prediction_at_list) + "for the method evaluation -- " + str(method) + "\n")
else:
print("Evaluating for the final model over the " + " forecast reference points - " +
str... | |
<reponame>hongzhonglu/vivarium
from __future__ import absolute_import, division, print_function
import os
import argparse
os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = "hide"
import random
import math
import numpy as np
import matplotlib
matplotlib.use('TKAgg')
import matplotlib.pyplot as plt
import matplotlib.patches... | |
<filename>emmet-builders/emmet/builders/qchem/molecules.py
from datetime import datetime
from itertools import chain, groupby
from math import ceil
from typing import Any, Dict, Iterable, Iterator, List, Optional
import networkx as nx
from maggma.builders import Builder
from maggma.stores import Store
from maggma.uti... | |
import numpy as np
from math import*
import pybrain.rl.environments
from pybrain.utilities import one_to_n
from environment import Environment
# The agent's actions are T and d.
# TODO where do we set up the generalization?
# TODO must pass omegadd to the learner.
# TODO the tiling might be achieved by implementing ... | |
self._cache.put('_lastconfig_', self._name, self._config)
# call custom initialization
if hasattr(self, 'doInit'):
self.doInit(self._mode)
def _getCache(self):
"""Indirection needed by the Cache client itself."""
return session.cache
def _validateType(self, value, param, paraminfo=None):
"""Validate and coer... | |
'''
Assign stellar mass/magnitude to subhalos via abundance matching.
Masses in log {M_sun}, luminosities in log {L_sun / h^2}, distances in {Mpc comoving}.
'''
# system -----
#from __future__ import division
import numpy as np
from numpy import log10, Inf
from scipy import integrate, interpolate, ndimage
# local ---... | |
<filename>trainLib.py
import math
#constants and globals
background = '0'
NORTH = 0
EAST = 1
SOUTH = 2
WEST = 3
dirs = {0 : "NORTH", 1 : "EAST", 2 : "SOUTH", 3 : "WEST"}
class CellElement(): #CellELement Interface for the subclasses
#Subclasses: RegularRoad, Switch, LevelCrossing, Bridge, Station
def setPosition... | |
# Copyright 2015 Radware LTD. 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 applicable law or agree... | |
<reponame>RUB-SysSec/tropyhunter<filename>lib/emulation/random.py
from elftools.elf.elffile import ELFFile, RelocationSection
from capstone import Cs, CS_ARCH_X86, CS_MODE_64
from .fuzzing import fuzzing_end_point, fuzzing_coverage
from .emulation import *
from .core import FunctionOutput, FunctionOutputType, FunctionE... | |
import condition, seed, substitute, trace
>>> import numpyro.distributions as dist
>>> def model():
... numpyro.sample('a', dist.Normal(0., 1.))
>>> model = seed(model, random.PRNGKey(0))
>>> exec_trace = trace(condition(model, {'a': -1})).get_trace()
>>> assert exec_trace['a']['value'] == -1
>>> assert exec_t... | |
b*r5, evaluate=False)
((sqrt(3)*a, sqrt(5)*b, sqrt(2)*(a + b)), 3)
>>> collect_sqrt(a*sqrt(2) + b, evaluate=False)
((b, sqrt(2)*a), 1)
>>> collect_sqrt(a + b, evaluate=False)
((a + b,), 0)
See Also
========
collect, collect_const, rcollect
"""
if evaluate is None:
evaluate = global_evaluate[0]
# this step ... | |
mass fractions.
xc12 = rho_c12[rho_T_mask] / dens
xsi28 = rho_si28[rho_T_mask] / dens
xni56 = rho_ni56[rho_T_mask] / dens
# What we want is to make a mask array that determines which
# zones are dominated by each of these three species.
c12_mask = np.where(np.logical_and(xc12 > xsi28, xc12 > xni56))
si28_ma... | |
"""
Copyright 2018 Duo Security
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 copyright notice, this list of conditions and the following
disclaimer.
2. Redistribut... | |
""" File utils base class for NXOS devices. """
import logging
# Parent inheritance
from .. import FileUtils as FileUtilsDeviceBase
# Dir parser
try:
from genie.libs.parser.nxos.show_platform import Dir
except ImportError:
# For apidoc building only
from unittest.mock import Mock; Dir=Mock()
logger = logging.get... | |
<reponame>SFGLab/ChromoLooping<gh_stars>0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author: zparteka
"""
from peak_stats.reader.peaks import Image, Group, Peak
from scipy.spatial import ConvexHull
from matplotlib import pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
# Histograms glob... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#author: wowdd1
#mail: <EMAIL>
#data: 2014.12.07
from spider import *
sys.path.append("..")
from utils import Utils
class BaikeSpider(Spider):
def __init__(self):
Spider.__init__(self)
self.subject = 'rank'
self.school = "baike"
def processNobelprize(self):
subje... | |
the
# drifts in the data streams. This drift handling is done in real time. The data received from this event could be used
# for an even more accurate drift adjustment in the post processing. Callbacks will receive a TimeSynchronizationData
# object or a dictionary with values if as_dictionary is True.
# See @ref find... | |
# flake8: noqa
import argparse
import os
import json
import sys
import time
from typing import Tuple
import boto3
import dask
import dask.dataframe as dd
import mlflow
import pandas as pd
import ray
import torch
import torch.nn as nn
import torch.optim as optim
from dask_ml.compose import ColumnTransformer
from dask_m... | |
<reponame>satroutr/poppy
# coding= utf-8
# Copyright (c) 2015 Rackspace, 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 requir... | |
<gh_stars>0
# -*- coding: utf-8 -*-
r"""
Interface for a simple data store where the root and subtables are nested
Python :py:class:`dict` objects.
AUTHORS:
- <NAME> (2010-03-01): initial version, 0.1
EXAMPLES::
from neuronpy.util import dictdb
import datetime
the_dict = { \
'sub1' : { \
'key_a' : { \
'ke... | |
<reponame>UmaTaru/run
from functools import reduce
import torch
from torch._utils import _accumulate
from ..function import Function, InplaceFunction, once_differentiable
from ..variable import Variable
class Index(Function):
@staticmethod
def forward(ctx, i, index):
ctx.input_size = i.size()
ctx.index = index
... | |
could be found for computing the components
in the Coordinate frame (V, (d/du,d/dv))
Since the identity map is a special element, its components cannot be
changed::
sage: id = M.tangent_identity_field()
sage: id.add_comp(e)[0,1] = u*v
Traceback (most recent call last):
...
AssertionError: the components of th... | |
G T", None),
("Sat, 10 Oct 2009 13:47:21 GM ", None),
# Replace numeric elements with stuff that contains A-Z
("Fri, Burp Oct 2009 13:47:21 GMT", None),
("Fri, 10 Tabalqplar 2009 13:47:21 GMT", None),
("Sat, 10 Oct Fruit 13:47:21 GMT", None),
("Sat, 10 Oct 2009 13:47:21 Fruits", None),
# Weekday
(", Dec 31 00:0... | |
# Authors: <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
#
# License: Simplified BSD
import os
import os.path as op
from pathlib import Path
import sys
import numpy as np
from numpy.testing import assert_array_equal, assert_allclose
import pytest
impor... | |
or pitch radius """
return self.min_radius - self.h_parameter / 4
@property
def external_thread_core_radius(self) -> float:
""" The radius of an internal thread object used to size an appropriate hole """
if self.hollow:
value = self.major_diameter / 2 - 7 * self.h_parameter / 8
else:
value = None
return valu... | |
devicefarm)
if directconnect is not None:
pulumi.set(__self__, "directconnect", directconnect)
if dlm is not None:
pulumi.set(__self__, "dlm", dlm)
if dms is not None:
pulumi.set(__self__, "dms", dms)
if docdb is not None:
pulumi.set(__self__, "docdb", docdb)
if ds is not None:
pulumi.set(__self__, "ds", ds)
... | |
root = build_tree(result['id'], executions_by_parent, execution_descriptions, is_cached_result)
if tree:
print(format_tree(tree[root], root))
try:
num_processed_results = 0
roots = collections.OrderedDict()
for execution_result in dxpy.find_executions(**query):
if args.trees:
if args.classname == 'job':
root ... | |
import numpy as np
import copy
# import sklearn
import sklearn as sk
import sklearn.preprocessing
import sklearn.model_selection
import sklearn.ensemble
import sklearn.metrics
# import plotly
import plotly.graph_objs as go
import plotly.figure_factory as ff
# import internal functions
from plotly_scient... | |
assign to each rank; this provides a way to
specify a partition manually.
If ``None``, the parameters are partitioned according to an
internal algorithm.
(default: ``None``)
Returns:
A :class:`list` where each element of the list contains the
``param_groups`` for a rank (which itself is a :class:`list` of
:cla... | |
[c_void_p]
isl.isl_union_map_from_domain_and_range.restype = c_void_p
isl.isl_union_map_from_domain_and_range.argtypes = [c_void_p, c_void_p]
isl.isl_union_map_from_range.restype = c_void_p
isl.isl_union_map_from_range.argtypes = [c_void_p]
isl.isl_union_map_gist.restype = c_void_p
isl.isl_union_map_gist.argtypes = [c_... | |
# -*- coding: utf-8 -*-
"""Create a tmux workspace from a configuration :py:obj:`dict`.
Ref: [tmuxp.workspacebuilder](https://github.com/tmux-python/tmuxp)
"""
import re
import json
import subprocess
from libtmux.exc import TmuxSessionExists
from libtmux.pane import Pane
from libtmux.server import Server
from libtmux.... | |
import numpy as np
import xarray as xr
import laspy
import os
from time import perf_counter
from datetime import datetime
from HSTB.kluster.pydro_helpers import is_pydro
from HSTB.kluster.pdal_entwine import build_entwine_points
class FqprExport:
"""
Visualizations in Matplotlib built on top of FQPR class. Include... | |
{ipv4}'
]
result = self.enode(
(' '.join(cmd)).format(**locals()),
shell='vtysh'
)
if result:
raise determine_exception(result)(result)
def ip_address_secondary(
self, ipv4):
"""
Set secondary IP address
This function runs the following vtysh command:
::
# ip address {ipv4} secondary
:param ipv4: ... | |
<filename>mvpa2/clfs/gpr.py
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# Copyright (c) 2008 <NAME> <<EMAIL>>
# See COPYING file distributed along with the PyMVPA packag... | |
<filename>acc2omp_converter.py
#!/usr/bin/python
# Author: <NAME>
# e-mail: <EMAIL>
# Argonne National Laboratory
# Python imports
import fileinput
import re
from shutil import copyfile
# Most common user configurable parameters
# Set to True for debugging and development purposes
debug = True
# Set to True to retain... | |
"ref/net462/System.Runtime.dll",
core_deps = {
"netcoreapp2.0": [
"@microsoft.netcore.platforms//:netcoreapp2.0_core",
"@microsoft.netcore.targets//:netcoreapp2.0_core",
],
"netcoreapp2.1": [
"@microsoft.netcore.platforms//:netcoreapp2.1_core",
"@microsoft.netcore.targets//:netcoreapp2.1_core",
],
"netcoreapp... | |
<reponame>USF-GT-Molecular-Modeling/hoomd-blue<gh_stars>0
# Copyright (c) 2009-2022 The Regents of the University of Michigan.
# Part of HOOMD-blue, released under the BSD 3-Clause License.
r"""Neighbor list acceleration structures.
Pair forces (`hoomd.md.pair`) use neighbor list data structures to find
neighboring p... | |
fake_name,
fake_instance,
self.fake_marathon_app_config.config_dict,
{
'desired_state': 'start',
'force_bounce': '99999',
}
)
fake_service_config_3 = marathon_tools.MarathonServiceConfig(
fake_name,
fake_instance,
self.fake_marathon_app_config.config_dict,
{
'desired_state': 'stop',
'force_bounce': '9999... | |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** 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, Sequence, Union, overload
from ... import _utilities
fro... | |
# Mount Fuji ..Person With Folded Hands
(0x1f680, 0x1f6c5,), # Rocket ..Left Luggage
(0x1f6cc, 0x1f6cc,), # Sleeping Accommodation ..Sleeping Accommodation
(0x1f6d0, 0x1f6d2,), # Place Of Worship ..Shopping Trolley
(0x1f6eb, 0x1f6ec,), # Airplane Departure ..Airplane Arriving
(0x1f6f4, 0x1f6f6,), # Scooter ..Canoe... | |
False
if name.startswith('panda.um.'):
self.proxyLock.acquire()
retMer,resMer = taskBuffer.querySQLS("SELECT /*+ index(tab FILESTABLE4_DESTDBLOCK_IDX) */ PandaID FROM ATLAS_PANDA.filesTable4 tab WHERE destinationDBlock=:destinationDBlock AND status IN (:statusM,:statusF) ",
{':destinationDBlock':name,
':statusM':'... | |
# tests for llc_rearrange.py
import pytest
import numpy as _np
import sys
sys.path.append('/Users/Mikejmnez/llc_transformations/llc_rearrange/')
from LLC_rearrange import LLCtransformation as LLC
from LLC_rearrange import make_chunks, make_array, pos_chunks, chunk_sizes, face_connect, arct_connect, init_vars
from LLC_r... | |
import os
import numpy as np
import random
from sklearn.utils import shuffle
import scipy.io
import matlab.engine
import time
import glob
import argparse
from utils_noisescope import *
import logging
import joblib
random.seed(6666)
eng = matlab.engine.start_matlab()
def extract_fingerpint_via_clustering(all_res_path... | |
<gh_stars>10-100
# Source code is modified from and based off of
# old/original Appium Python implementation at
#
# https://github.com/hugs/appium-old
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional... | |
'''
Functions for calculating the relief along the crust-mantle interface of
a planet using gravity and topography.
'''
import numpy as np
import pyshtools as pysh
# ==== pyMoho ====
def pyMoho(pot, topo, lmax, rho_c, rho_m, thickave, filter_type=0, half=None,
nmax=8, delta_max=5., lmax_calc=None, correction=None... | |
<reponame>dwillmer/pyquil<gh_stars>1-10
##############################################################################
# Copyright 2016-2018 Rigetti Computing
#
# 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... | |
accepts a 2d array with a *single entry* as its argument and returns a scalar. The single
entry is the TransferMechanism's current `value <Mechanism_Base.value>` (that is, its previous_value
is ignored). After each execution, the function is passed the Mechanism's current `value <Mechanism_Base.value>`,
and the scalar ... | |
calendar = property(fget=get_calendar)
@abc.abstractmethod
def can_search_schedule_slots(self):
"""Tests if this user can perform ``ScheduleSlots`` searches.
A return of true does not guarantee successful authorization. A
return of false indicates that it is known all methods in this
session will result in a ``... | |
treatment is required
e1 = ie1
e2 = ie2
else:
if (isinstance(ie1, unicode)):
e1 = ie1.encode('utf-8')
else:
e1 = ie1
if (isinstance(ie2, unicode)):
e2 = ie2.encode('utf-8')
else:
e2 = ie2
# The keys in key_translate represent a concatenated string. We should split
# these strings and then compare the valu... | |
<gh_stars>0
import numpy as np
import networkx as nx
import copy
from math import log2
"""
Implementation of the hierarchy coordinates via networkX from
Hierarchy in Complex Networks: The Possible and the Actual [B Corominas-Murtra - 2013] [*] - Supporting Information
Though implemented for unweighted networkX graph... | |
#
# This source file is part of the EdgeDB open source project.
#
# Copyright 2008-present MagicStack Inc. and the EdgeDB authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://w... | |
<reponame>shinying/SA
import copy
import math
import numpy as np
import pandas as pd
from typing import List, Dict
from datetime import timedelta, datetime, time
from sys import stderr
from random import random, randint, choice
from collections import deque
from .model import Task, Tug, Ship, TmpTask, TaskState, ShipSt... | |
returns object of type '_Application'
"Application": (61440, 2, (9, 0), (), "Application", '{00063001-0000-0000-C000-000000000046}'),
"Class": (61450, 2, (3, 0), (), "Class", None),
"Count": (80, 2, (3, 0), (), "Count", None),
"Parent": (61441, 2, (9, 0), (), "Parent", None),
# Method 'Session' returns object... | |
import dateutil
from typing import List
import numpy as np
import pandas as pd
from macpie._config import get_option
from macpie import lltools, strtools
def add_diff_days(
df: pd.DataFrame, col_start: str, col_end: str, diff_days_col: str = None, inplace=False
):
"""Adds a column to DataFrame called ``_diff_days... | |
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
#
# 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 ... | |
<gh_stars>0
"""
Library Features:
Name: lib_ecmwf_0100_variables
Author(s): <NAME> (<EMAIL>)
Date: '2020210'
Version: '1.5.0'
"""
#######################################################################################
# Library
import logging
import numpy as np
from src.hyde.algorithm.io.nwp.ecmwf.lib_ecmwf_io_gener... | |
<gh_stars>1-10
# coding=utf-8
# Copyright 2020 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | |
not set
"source_scan_id": {"type": ["integer", "null"]},
# Scan UID of the source (scan of the standard), optional, null if not set
"source_scan_uid": {"type": ["string", "null"]}
}
}
def save_xrf_quant_fluor_json_file(file_path, fluor_data, *, overwrite_existing=False):
r"""
Save the results of processing of a... | |
<reponame>milesgray/CALAE
# coding=utf-8
# Copyright 2019 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unles... | |
import numpy as np
import os
import torch
import torch.nn as nn
import time
import importlib
from utils.utils import logger_print
import hdf5storage
from utils.utils import cal_pesq
from utils.utils import cal_stoi
from utils.utils import cal_sisnr
train_epoch, val_epoch, val_metric_epoch = [], [], [] # for ... | |
toggle invert if set
toggle = 0 #Used to toggle invert between groups of airports. Leave set at 0
#Add update message to beginning of list
sortwindslist.insert(0,("Updated", dt_string))
#Add type of data being displayed, METAR, TAF, MOS etc
if metar_taf_mos == 1: #Displaying METAR data
sortwindslist.insert(0,("... | |
"""
Copyright Government of Canada 2020-2021
Written by: <NAME>, National Microbiology Laboratory,
Public Health Agency of Canada
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this work except in compliance with the License. You may obtain a copy of the
License at:
http://www.apach... | |
text in sorted_li]
return json.dumps(OrderedDict(reformatted_li))
def abstract_meaning(self):
# this is used for displaying morpheme keywords per language in the morpheme list view
abstract_meaning = []
if self.dataset:
for language in self.dataset.translation_languages.all():
translations = self.translation_s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.