content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
from pymongo.errors import PyMongoError def human_join(seq, delim=', ', final='or'): size = len(seq) if size == 0: return '' if size == 1: return seq[0] if size == 2: return f'{seq[0]} {final} {seq[1]}' return delim.join(seq[:-1]) + f' {final} {seq[-1]}'
[ 6738, 279, 4948, 25162, 13, 48277, 1330, 9485, 44, 25162, 12331, 628, 628, 198, 4299, 1692, 62, 22179, 7, 41068, 11, 46728, 28, 3256, 46083, 2457, 11639, 273, 6, 2599, 198, 220, 220, 220, 2546, 796, 18896, 7, 41068, 8, 198, 220, 220...
2.13986
143
from typing import Dict, Any, Optional, List import gym import numpy as np from collections import defaultdict from flatland.core.grid.grid4_utils import get_new_position from flatland.envs.agent_utils import EnvAgent, RailAgentStatus from flatland.envs.rail_env import RailEnv, RailEnvActions from envs.flatland.observations.segment_graph import Graph from envs.flatland.utils.gym_env import StepOutput def possible_actions_sorted_by_distance(env: RailEnv, handle: int): agent = env.agents[handle] if agent.status == RailAgentStatus.READY_TO_DEPART: agent_virtual_position = agent.initial_position elif agent.status == RailAgentStatus.ACTIVE: agent_virtual_position = agent.position elif agent.status == RailAgentStatus.DONE: agent_virtual_position = agent.target else: return None possible_transitions = env.rail.get_transitions(*agent_virtual_position, agent.direction) distance_map = env.distance_map.get()[handle] possible_steps = [] for movement in list(range(4)): if possible_transitions[movement]: if movement == agent.direction: action = RailEnvActions.MOVE_FORWARD elif movement == (agent.direction + 1) % 4: action = RailEnvActions.MOVE_RIGHT elif movement == (agent.direction - 1) % 4: action = RailEnvActions.MOVE_LEFT else: raise ValueError("Wtf, debug this shit.") distance = distance_map[get_new_position(agent_virtual_position, movement) + (movement,)] possible_steps.append((action, distance)) possible_steps = sorted(possible_steps, key=lambda step: step[1]) if len(possible_steps) == 1: return possible_steps * 2 else: return possible_steps
[ 198, 6738, 19720, 1330, 360, 713, 11, 4377, 11, 32233, 11, 7343, 198, 198, 11748, 11550, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 6228, 1044, 13, 7295, 13, 25928, 13, 25928, 19, 62, 26791, 13...
2.574859
708
import torch from torch import nn
[ 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198 ]
3.777778
9
import datetime from mock import Mock, call import pytest from finicky import ValidationException, is_int, is_float, is_str, is_date, is_dict, is_list # noinspection PyShadowingBuiltins # noinspection PyShadowingBuiltins def test_must_return_none_when_input_is_none_and_required_is_false(self): assert is_float(required=False)(None) is None # noinspection PyShadowingBuiltins # noinspection PyShadowingBuiltins def test_must_clean_validated_input_before_returning(self): validated_input = is_dict(schema={"phone": is_str(required=True)})({"phone": " +233-23-23283234"}) assert validated_input == {"phone": "+233-23-23283234"} class TestListValidator: """ 1. must reject none input whend field is required 2. must return default value when field isnot required and default is provided 4. must validate all entries against the validator. 5. must require all entries to pass validation by default 6. when all is set to false, must require that at least one entry pass valdiation 7. must return only validated entries 6. on error, must return all errors encountered """
[ 11748, 4818, 8079, 198, 6738, 15290, 1330, 44123, 11, 869, 198, 11748, 12972, 9288, 198, 198, 6738, 957, 17479, 1330, 3254, 24765, 16922, 11, 318, 62, 600, 11, 318, 62, 22468, 11, 318, 62, 2536, 11, 318, 62, 4475, 11, 318, 62, 11600...
3.111111
369
import numpy as np import cv2 as cv img = cv.imread('1.jpeg',cv.IMREAD_COLOR) #for polygon we need to have set of points so we create a numpy array. and pts is an object. pts = np.array([[20,33],[300,120], [67,79], [123,111], [144,134]], np.int32) #the method polylines will actully draws a polygon by taking different parametes, 1.where to draw (img), #2.which set of points, 3.checks first and last point should be connected or not by (bool), 4.color, 5.widht of line. cv.polylines(img, [pts], True,(0,231,123), 1) cv.imshow('image',img) cv.waitKey(0) cv.destroyAllWindows()
[ 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 355, 269, 85, 198, 198, 9600, 796, 269, 85, 13, 320, 961, 10786, 16, 13, 73, 22071, 3256, 33967, 13, 3955, 15675, 62, 46786, 8, 198, 198, 2, 1640, 7514, 14520, 356, 761, 284,...
2.699074
216
#!/usr/bin/env python2 from BeautifulSoup import BeautifulSoup, NavigableString import urllib import string import re if __name__ == "__main__": parser = Parser() parser.findEntries() with open('output.txt', 'w') as file: for entry in parser.entries: file.write(entry.__str__().encode('UTF-8') + '\n')
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 198, 6738, 23762, 50, 10486, 1330, 23762, 50, 10486, 11, 13244, 328, 540, 10100, 198, 11748, 2956, 297, 571, 198, 11748, 4731, 198, 11748, 302, 628, 628, 198, 361, 11593, 3672, 834...
2.511111
135
import flwr as fl import flwr.client from sources.utils.simulation_parameters import DEFAULT_SERVER_ADDRESS from sources.simulators.base_client_provider import BaseClientProvider
[ 11748, 781, 18351, 355, 781, 198, 11748, 781, 18351, 13, 16366, 198, 198, 6738, 4237, 13, 26791, 13, 14323, 1741, 62, 17143, 7307, 1330, 5550, 38865, 62, 35009, 5959, 62, 2885, 7707, 7597, 198, 6738, 4237, 13, 14323, 24325, 13, 8692, ...
3.529412
51
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI 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 in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # ------------------------------------------------------------------------------ """Portable pipe implementation for Linux, MacOS, and Windows.""" import asyncio import errno import logging import os import socket import struct import tempfile from abc import ABC, abstractmethod from asyncio import AbstractEventLoop from asyncio.streams import StreamWriter from shutil import rmtree from typing import IO, Optional from aea.exceptions import enforce _default_logger = logging.getLogger(__name__) PIPE_CONN_TIMEOUT = 10.0 PIPE_CONN_ATTEMPTS = 10 TCP_SOCKET_PIPE_CLIENT_CONN_ATTEMPTS = 5 def make_ipc_channel( logger: logging.Logger = _default_logger, loop: Optional[AbstractEventLoop] = None ) -> IPCChannel: """ Build a portable bidirectional InterProcess Communication channel :param logger: the logger :param loop: the loop :return: IPCChannel """ if os.name == "posix": return PosixNamedPipeChannel(logger=logger, loop=loop) if os.name == "nt": # pragma: nocover return TCPSocketChannel(logger=logger, loop=loop) raise NotImplementedError( # pragma: nocover "make ipc channel is not supported on platform {}".format(os.name) ) def make_ipc_channel_client( in_path: str, out_path: str, logger: logging.Logger = _default_logger, loop: Optional[AbstractEventLoop] = None, ) -> IPCChannelClient: """ Build a portable bidirectional InterProcess Communication client channel :param in_path: rendezvous point for incoming communication :param out_path: rendezvous point for outgoing outgoing :param logger: the logger :param loop: the loop :return: IPCChannel """ if os.name == "posix": return PosixNamedPipeChannelClient(in_path, out_path, logger=logger, loop=loop) if os.name == "nt": # pragma: nocover return TCPSocketChannelClient(in_path, out_path, logger=logger, loop=loop) raise NotImplementedError( # pragma: nocover "make ip channel client is not supported on platform {}".format(os.name) )
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16529, 26171, 198, 2, 198, 2, 220, 220, 15069, 2864, 12, 23344, 376, 7569, 13, 20185, 15302, 198, 2, 198, 2,...
3.072052
916
import mock from mock import patch import unittest from vnc_api.vnc_api import * from svc_monitor.port_tuple import PortTupleAgent from svc_monitor.config_db import * import test_common_utils as test_utils
[ 11748, 15290, 198, 6738, 15290, 1330, 8529, 198, 11748, 555, 715, 395, 198, 6738, 410, 10782, 62, 15042, 13, 85, 10782, 62, 15042, 1330, 1635, 198, 6738, 264, 28435, 62, 41143, 13, 634, 62, 83, 29291, 1330, 4347, 51, 29291, 36772, 198...
3.169231
65
from functools import partial from typing import Callable, List, Optional, Type import numpy as np from gym.vector.vector_env import VectorEnv from pearll.agents.base_agents import BaseAgent from pearll.buffers import RolloutBuffer from pearll.buffers.base_buffer import BaseBuffer from pearll.callbacks.base_callback import BaseCallback from pearll.common.type_aliases import Log from pearll.common.utils import filter_rewards from pearll.explorers.base_explorer import BaseExplorer from pearll.models import ActorCritic, Dummy from pearll.settings import ( BufferSettings, ExplorerSettings, LoggerSettings, MiscellaneousSettings, MutationSettings, PopulationSettings, Settings, ) from pearll.signal_processing import ( crossover_operators, mutation_operators, selection_operators, ) from pearll.updaters.evolution import BaseEvolutionUpdater, GeneticUpdater def default_model(env: VectorEnv): """ Returns a default model for the given environment. """ actor = Dummy(space=env.single_action_space) critic = Dummy(space=env.single_action_space) return ActorCritic( actor=actor, critic=critic, population_settings=PopulationSettings( actor_population_size=env.num_envs, actor_distribution="uniform" ), )
[ 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 19720, 1330, 4889, 540, 11, 7343, 11, 32233, 11, 5994, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 11550, 13, 31364, 13, 31364, 62, 24330, 1330, 20650, 4834, 85, 198, 198, 6738, ...
3.002273
440
import scipy, numpy, typing, numbers from tequila.objective import Objective from tequila.objective.objective import assign_variable, Variable, format_variable_dictionary, format_variable_list from .optimizer_base import Optimizer from ._containers import _EvalContainer, _GradContainer, _HessContainer, _QngContainer from collections import namedtuple from tequila.utils.exceptions import TequilaException from tequila.circuit.noise import NoiseModel from tequila.tools.qng import get_qng_combos SciPyReturnType = namedtuple('SciPyReturnType', 'energy angles history scipy_output') def available_methods(energy=True, gradient=True, hessian=True) -> typing.List[str]: """Convenience :return: Available methods of the scipy optimizer Parameters ---------- energy : (Default value = True) gradient : (Default value = True) hessian : (Default value = True) Returns ------- """ methods = [] if energy: methods += OptimizerSciPy.gradient_free_methods if gradient: methods += OptimizerSciPy.gradient_based_methods if hessian: methods += OptimizerSciPy.hessian_based_methods return methods def minimize(objective: Objective, gradient: typing.Union[str, typing.Dict[Variable, Objective]] = None, hessian: typing.Union[str, typing.Dict[typing.Tuple[Variable, Variable], Objective]] = None, initial_values: typing.Dict[typing.Hashable, numbers.Real] = None, variables: typing.List[typing.Hashable] = None, samples: int = None, maxiter: int = 100, backend: str = None, backend_options: dict = None, noise: NoiseModel = None, method: str = "BFGS", tol: float = 1.e-3, method_options: dict = None, method_bounds: typing.Dict[typing.Hashable, numbers.Real] = None, method_constraints=None, silent: bool = False, save_history: bool = True, *args, **kwargs) -> SciPyReturnType: """ Parameters ---------- objective: Objective : The tequila objective to optimize gradient: typing.Union[str, typing.Dict[Variable, Objective], None] : (Default value = None) : '2-point', 'cs' or '3-point' for numerical gradient evaluation (does not work in combination with all optimizers), dictionary of variables and tequila objective to define own gradient, None for automatic construction (default) Other options include 'qng' to use the quantum natural gradient. hessian: typing.Union[str, typing.Dict[Variable, Objective], None] : (Default value = None) : '2-point', 'cs' or '3-point' for numerical gradient evaluation (does not work in combination with all optimizers), dictionary (keys:tuple of variables, values:tequila objective) to define own gradient, None for automatic construction (default) initial_values: typing.Dict[typing.Hashable, numbers.Real]: (Default value = None): Initial values as dictionary of Hashable types (variable keys) and floating point numbers. If given None they will all be set to zero variables: typing.List[typing.Hashable] : (Default value = None) List of Variables to optimize samples: int : (Default value = None) samples/shots to take in every run of the quantum circuits (None activates full wavefunction simulation) maxiter: int : (Default value = 100) backend: str : (Default value = None) Simulator backend, will be automatically chosen if set to None backend_options: dict: (Default value = None) Additional options for the backend Will be unpacked and passed to the compiled objective in every call noise: NoiseModel: (Default value =None) a NoiseModel to apply to all expectation values in the objective. method: str : (Default value = "BFGS") Optimization method (see scipy documentation, or 'available methods') tol: float : (Default value = 1.e-3) Convergence tolerance for optimization (see scipy documentation) method_options: dict : (Default value = None) Dictionary of options (see scipy documentation) method_bounds: typing.Dict[typing.Hashable, typing.Tuple[float, float]]: (Default value = None) bounds for the variables (see scipy documentation) method_constraints : (Default value = None) (see scipy documentation silent: bool : (Default value = False) No printout if True save_history: bool: (Default value = True) Save the history throughout the optimization Returns ------- """ if isinstance(gradient, dict) or hasattr(gradient, "items"): if all([isinstance(x, Objective) for x in gradient.values()]): gradient = format_variable_dictionary(gradient) if isinstance(hessian, dict) or hasattr(hessian, "items"): if all([isinstance(x, Objective) for x in hessian.values()]): hessian = {(assign_variable(k[0]), assign_variable([k[1]])): v for k, v in hessian.items()} method_bounds = format_variable_dictionary(method_bounds) # set defaults optimizer = OptimizerSciPy(save_history=save_history, maxiter=maxiter, method=method, method_options=method_options, method_bounds=method_bounds, method_constraints=method_constraints, silent=silent, backend=backend, backend_options=backend_options, samples=samples, noise_model=noise, tol=tol, *args, **kwargs) if initial_values is not None: initial_values = {assign_variable(k): v for k, v in initial_values.items()} return optimizer(objective=objective, gradient=gradient, hessian=hessian, initial_values=initial_values, variables=variables, *args, **kwargs)
[ 11748, 629, 541, 88, 11, 299, 32152, 11, 19720, 11, 3146, 198, 6738, 573, 43652, 13, 15252, 425, 1330, 37092, 198, 6738, 573, 43652, 13, 15252, 425, 13, 15252, 425, 1330, 8333, 62, 45286, 11, 35748, 11, 5794, 62, 45286, 62, 67, 1418...
2.387431
2,705
import numpy as np import time import warnings from sklearn.linear_model import LinearRegression from solar import solar from sklearn.exceptions import ConvergenceWarning # For recent version of Scikit-learn: since the class 'Lars' may rely on the Cholesky decomposition and hence may have potential convergence warning in high dimensional data (p is much larger than n), we input the following commmand to skip the convergence warning. warnings.filterwarnings("ignore", category=ConvergenceWarning, module="sklearn") ##################################################### # define the class of bsolar (sequential computing) # ##################################################### ''' this class is used to demonstrate the performance of bootstrap solar (bsolar) via sequential computation please note that this file is identical to "bsolar_parallel.py" except the subsample selection frequency estimation (step 2, line 93 - 120 of this file), where we use sequential computing scheme instead. Check this before you run the code: Plz check if you have 'sci-kit learn', 'numpy', 'joblib', 'matplotlib' and 'tqdm' installed. If not, 1. run 'pip install scikit-learn joblib numpy matplotlib tqdm' if you use pure Python3 2. run 'conda install scikit-learn joblib numpy matplotlib tqdm' if you use Anaconda3 Modules: 1. from scikit-learn, we call 'Lars' to compute solar. 2. we use 'numpy' for matrix computation and random variable generation; 3. for simulator, plz see 'simulator.py' for detail; 4. we use class 'time' to time the computation of solar Inputs: 1. X and y : the inputs and output of regression; 2. n_repeat_solar : the number of subsamples that solar generates; 3. n_repeat_bsolar : the number of subsamples that bsolar generates; 4. step_size : the step size of grid search for threshold optimization of subsample selection frequency; Outputs: 1. bsolar_coef_H : the bsolar-H regression coefficients; 2. bsolar_coef_S : the bsolar-S regression coefficients; 4. Qc_list : the detailed subsample selection frequency of bsolar; 5. Q_opt_c_H : the variable that bsolar-H selects; 5. Q_opt_c_S : the variable that bsolar-S selects; Remarks: 1. fit : the function that trains bsolar; 2. q_list : the plot function that returns the full list of subsample selection frequency for each variable in bsolar; ''' ################################## # test if this module works fine # ################################## ''' this part is set up to test the functionability of the class above; you can run all the codes in this file to test if the class works; when you call the class from this file, the codes (even functions or classes) after " if __name__ == '__main__': " will be ingored ''' if __name__ == '__main__': from simulator import simul sample_size = 100 n_dim = 12 n_info = 5 n_repeat_solar = 10 n_repeat_bsolar = 3 step_size = -0.02 np.random.seed(0) # generate X and Y trial1 = simul(sample_size, n_dim, n_info) X, Y = trial1.data_gen() # start timing start = time.time() # train solar trial2 = bsolar(X, Y, n_repeat_solar, n_repeat_bsolar, step_size) bsolar_coef_H, bsolar_coef_S, Qc_list, Q_opt_c_H, Q_opt_c_S = trial2.fit() # end timing end = time.time() # print the result print('variables that bsolar-H selects: ', Q_opt_c_H) print('variables that bsolar-S selects: ', Q_opt_c_S) trial2.q_list(Qc_list)
[ 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 11748, 14601, 198, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 44800, 8081, 2234, 198, 6738, 6591, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
2.9875
1,200
cases=int(raw_input()) for case in range(cases): answers=[0,0] grid=[[0 for x in range(4)] for y in range(2)] common=[] for i in range(2): answers[i]=int(raw_input()) for j in range(4): grid[i][j]=raw_input().split() grid[i][j] = map(int, grid[i][j]) # Code begins for i in grid[0][answers[0]-1]: if i in grid[1][answers[1]-1]: common.append(i) if len(common)>1: print "Bad magician!" elif len(common)==1: for i in common: print i elif len(common)==0: print "Volunteer cheated!"
[ 33964, 28, 600, 7, 1831, 62, 15414, 28955, 198, 198, 1640, 1339, 287, 2837, 7, 33964, 2599, 198, 220, 220, 220, 7429, 41888, 15, 11, 15, 60, 198, 220, 220, 220, 10706, 28, 30109, 15, 329, 2124, 287, 2837, 7, 19, 15437, 329, 331, ...
1.958599
314
allct_dat = { "TYR": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'}, "HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']], "INTX,KFORM":['INT', '1'], "HD2":{'torsion': 180.0, 'tree': 'E', 'NC': 16, 'NB': 19, 'NA': 21, 'I': 22, 'angle': 120.0, 'blen': 1.09, 'charge': 0.064, 'type': 'HC'}, "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "OH":{'torsion': 180.0, 'tree': 'S', 'NC': 12, 'NB': 14, 'NA': 16, 'I': 17, 'angle': 120.0, 'blen': 1.36, 'charge': -0.528, 'type': 'OH'}, "HD1":{'torsion': 0.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 13, 'angle': 120.0, 'blen': 1.09, 'charge': 0.064, 'type': 'HC'}, "HE1":{'torsion': 180.0, 'tree': 'E', 'NC': 11, 'NB': 12, 'NA': 14, 'I': 15, 'angle': 120.0, 'blen': 1.09, 'charge': 0.102, 'type': 'HC'}, "HE2":{'torsion': 180.0, 'tree': 'E', 'NC': 14, 'NB': 16, 'NA': 19, 'I': 20, 'angle': 120.0, 'blen': 1.09, 'charge': 0.102, 'type': 'HC'}, "CD2":{'torsion': 0.0, 'tree': 'S', 'NC': 14, 'NB': 16, 'NA': 19, 'I': 21, 'angle': 120.0, 'blen': 1.4, 'charge': -0.002, 'type': 'CA'}, "NAMRES":'TYROSINE COO- ANION', "CD1":{'torsion': 180.0, 'tree': 'B', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 120.0, 'blen': 1.4, 'charge': -0.002, 'type': 'CA'}, "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'CD1', 'HD1', 'CE1', 'HE1', 'CZ', 'OH', 'HH', 'CE2', 'HE2', 'CD2', 'HD2', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "CE1":{'torsion': 180.0, 'tree': 'B', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 14, 'angle': 120.0, 'blen': 1.4, 'charge': -0.264, 'type': 'CA'}, "CE2":{'torsion': 0.0, 'tree': 'B', 'NC': 12, 'NB': 14, 'NA': 16, 'I': 19, 'angle': 120.0, 'blen': 1.4, 'charge': -0.264, 'type': 'CA'}, "HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "HH":{'torsion': 0.0, 'tree': 'E', 'NC': 14, 'NB': 16, 'NA': 17, 'I': 18, 'angle': 113.0, 'blen': 0.96, 'charge': 0.334, 'type': 'HO'}, "CZ":{'torsion': 0.0, 'tree': 'B', 'NC': 11, 'NB': 12, 'NA': 14, 'I': 16, 'angle': 120.0, 'blen': 1.4, 'charge': 0.462, 'type': 'C'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 23, 'I': 24, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CG":{'torsion': 180.0, 'tree': 'S', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 109.47, 'blen': 1.51, 'charge': -0.03, 'type': 'CA'}, "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.098, 'type': 'CT'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 23, 'I': 25, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "loopList":[['CG', 'CD2']], "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 23, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, }, "ASN": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'}, "HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'}, "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'OD1', 'ND2', 'HD21', 'HD22', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "ND2":{'torsion': 180.0, 'tree': 'B', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 116.6, 'blen': 1.335, 'charge': -0.867, 'type': 'N'}, "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 16, 'I': 17, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.086, 'type': 'CT'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O'], ['CB', 'ND2', 'CG', 'OD1'], ['CG', 'HD21', 'ND2', 'HD22']], "HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "INTX,KFORM":['INT', '1'], "CG":{'torsion': 180.0, 'tree': 'B', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 111.1, 'blen': 1.522, 'charge': 0.675, 'type': 'C'}, "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "HD21":{'torsion': 180.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 13, 'I': 14, 'angle': 119.8, 'blen': 1.01, 'charge': 0.344, 'type': 'H'}, "OD1":{'torsion': 0.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 120.5, 'blen': 1.229, 'charge': -0.47, 'type': 'O'}, "HD22":{'torsion': 0.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 13, 'I': 15, 'angle': 119.8, 'blen': 1.01, 'charge': 0.344, 'type': 'H'}, "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 16, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 16, 'I': 18, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "NAMRES":'ASPARAGINE COO- ANION', }, "CYS": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'}, "HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'}, "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'SG', 'HSG', 'LP1', 'LP2', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "SG":{'torsion': 180.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 116.0, 'blen': 1.81, 'charge': 0.827, 'type': 'SH'}, "LP1":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 96.7, 'blen': 0.679, 'charge': -0.481, 'type': 'LP'}, "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 15, 'I': 16, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.06, 'type': 'CT'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']], "HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "INTX,KFORM":['INT', '1'], "LP2":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 14, 'angle': 96.7, 'blen': 0.679, 'charge': -0.481, 'type': 'LP'}, "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "HSG":{'torsion': 180.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 96.0, 'blen': 1.33, 'charge': 0.135, 'type': 'HS'}, "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 15, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 15, 'I': 17, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "NAMRES":'CYSTEINE COO- ANION', }, "ARG": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.056, 'type': 'HC'}, "HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.056, 'type': 'HC'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O'], ['NE', 'NH1', 'CZ', 'NH2'], ['CD', 'CZ', 'NE', 'HE'], ['CZ', 'HH12', 'NH1', 'HH11'], ['CZ', 'HH22', 'NH2', 'HH21']], "HH11":{'torsion': 0.0, 'tree': 'E', 'NC': 17, 'NB': 19, 'NA': 20, 'I': 21, 'angle': 119.8, 'blen': 1.01, 'charge': 0.361, 'type': 'H3'}, "HH12":{'torsion': 180.0, 'tree': 'E', 'NC': 17, 'NB': 19, 'NA': 20, 'I': 22, 'angle': 119.8, 'blen': 1.01, 'charge': 0.361, 'type': 'H3'}, "HH21":{'torsion': 0.0, 'tree': 'E', 'NC': 17, 'NB': 19, 'NA': 23, 'I': 24, 'angle': 119.8, 'blen': 1.01, 'charge': 0.361, 'type': 'H3'}, "HH22":{'torsion': 180.0, 'tree': 'E', 'NC': 17, 'NB': 19, 'NA': 23, 'I': 25, 'angle': 119.8, 'blen': 1.01, 'charge': 0.361, 'type': 'H3'}, "INTX,KFORM":['INT', '1'], "NE":{'torsion': 180.0, 'tree': 'B', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 17, 'angle': 111.0, 'blen': 1.48, 'charge': -0.324, 'type': 'N2'}, "HG2":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 109.5, 'blen': 1.09, 'charge': 0.074, 'type': 'HC'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "HD2":{'torsion': 300.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 15, 'angle': 109.5, 'blen': 1.09, 'charge': 0.133, 'type': 'HC'}, "HD3":{'torsion': 60.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 16, 'angle': 109.5, 'blen': 1.09, 'charge': 0.133, 'type': 'HC'}, "NAMRES":'ARGININE COO- ANION', "HE":{'torsion': 0.0, 'tree': 'E', 'NC': 11, 'NB': 14, 'NA': 17, 'I': 18, 'angle': 118.5, 'blen': 1.01, 'charge': 0.269, 'type': 'H3'}, "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'HG2', 'HG3', 'CD', 'HD2', 'HD3', 'NE', 'HE', 'CZ', 'NH1', 'HH11', 'HH12', 'NH2', 'HH21', 'HH22', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "NH2":{'torsion': 180.0, 'tree': 'B', 'NC': 14, 'NB': 17, 'NA': 19, 'I': 23, 'angle': 118.0, 'blen': 1.33, 'charge': -0.624, 'type': 'N2'}, "HG3":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 109.5, 'blen': 1.09, 'charge': 0.074, 'type': 'HC'}, "NH1":{'torsion': 0.0, 'tree': 'B', 'NC': 14, 'NB': 17, 'NA': 19, 'I': 20, 'angle': 122.0, 'blen': 1.33, 'charge': -0.624, 'type': 'N2'}, "HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "CZ":{'torsion': 180.0, 'tree': 'B', 'NC': 11, 'NB': 14, 'NA': 17, 'I': 19, 'angle': 123.0, 'blen': 1.33, 'charge': 0.76, 'type': 'CA'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "CD":{'torsion': 180.0, 'tree': '3', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 14, 'angle': 109.47, 'blen': 1.525, 'charge': -0.228, 'type': 'CT'}, "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 26, 'I': 27, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CG":{'torsion': 180.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 109.47, 'blen': 1.525, 'charge': -0.103, 'type': 'CT'}, "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.08, 'type': 'CT'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 26, 'I': 28, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 26, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, }, "LEU": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.033, 'type': 'HC'}, "HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.033, 'type': 'HC'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']], "INTX,KFORM":['INT', '1'], "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "NAMRES":'LEUCINE COO- ANION', "HG":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 109.5, 'blen': 1.09, 'charge': 0.031, 'type': 'HC'}, "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'HG', 'CD1', 'HD11', 'HD12', 'HD13', 'CD2', 'HD21', 'HD22', 'HD23', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "HD11":{'torsion': 60.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 13, 'I': 14, 'angle': 109.5, 'blen': 1.09, 'charge': 0.034, 'type': 'HC'}, "HD12":{'torsion': 180.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 13, 'I': 15, 'angle': 109.5, 'blen': 1.09, 'charge': 0.034, 'type': 'HC'}, "HD13":{'torsion': 300.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 13, 'I': 16, 'angle': 109.5, 'blen': 1.09, 'charge': 0.034, 'type': 'HC'}, "CD2":{'torsion': 180.0, 'tree': '3', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 17, 'angle': 109.47, 'blen': 1.525, 'charge': -0.107, 'type': 'CT'}, "CD1":{'torsion': 60.0, 'tree': '3', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 109.47, 'blen': 1.525, 'charge': -0.107, 'type': 'CT'}, "HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 21, 'I': 22, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CG":{'torsion': 180.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 109.47, 'blen': 1.525, 'charge': -0.01, 'type': 'CT'}, "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.061, 'type': 'CT'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 21, 'I': 23, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "HD21":{'torsion': 60.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 17, 'I': 18, 'angle': 109.5, 'blen': 1.09, 'charge': 0.034, 'type': 'HC'}, "HD23":{'torsion': 300.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 17, 'I': 20, 'angle': 109.5, 'blen': 1.09, 'charge': 0.034, 'type': 'HC'}, "HD22":{'torsion': 180.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 17, 'I': 19, 'angle': 109.5, 'blen': 1.09, 'charge': 0.034, 'type': 'HC'}, "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 21, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, }, "HID": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'}, "HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'}, "NE2":{'torsion': 0.0, 'tree': 'S', 'NC': 11, 'NB': 12, 'NA': 14, 'I': 16, 'angle': 109.0, 'blen': 1.31, 'charge': -0.502, 'type': 'NB'}, "ND1":{'torsion': 180.0, 'tree': 'B', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 122.0, 'blen': 1.39, 'charge': -0.146, 'type': 'NA'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O'], ['CG', 'CE1', 'ND1', 'HD1']], "CE1":{'torsion': 180.0, 'tree': 'B', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 14, 'angle': 108.0, 'blen': 1.32, 'charge': 0.241, 'type': 'CR'}, "INTX,KFORM":['INT', '1'], "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "HD1":{'torsion': 0.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 13, 'angle': 126.0, 'blen': 1.01, 'charge': 0.228, 'type': 'H'}, "NAMRES":'HISTIDINE DELTAH COO- ANION', "HE":{'torsion': 180.0, 'tree': 'E', 'NC': 11, 'NB': 12, 'NA': 14, 'I': 15, 'angle': 120.0, 'blen': 1.09, 'charge': 0.036, 'type': 'HC'}, "HD":{'torsion': 180.0, 'tree': 'E', 'NC': 14, 'NB': 16, 'NA': 17, 'I': 18, 'angle': 120.0, 'blen': 1.09, 'charge': 0.018, 'type': 'HC'}, "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'ND1', 'HD1', 'CE1', 'HE', 'NE2', 'CD2', 'HD', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "CD2":{'torsion': 0.0, 'tree': 'S', 'NC': 12, 'NB': 14, 'NA': 16, 'I': 17, 'angle': 110.0, 'blen': 1.36, 'charge': 0.195, 'type': 'CV'}, "HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 19, 'I': 20, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CG":{'torsion': 180.0, 'tree': 'S', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 115.0, 'blen': 1.51, 'charge': -0.032, 'type': 'CC'}, "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.098, 'type': 'CT'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 19, 'I': 21, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "loopList":[['CG', 'CD2']], "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 19, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, }, "HIE": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'}, "HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'}, "NE2":{'torsion': 0.0, 'tree': 'B', 'NC': 11, 'NB': 12, 'NA': 13, 'I': 15, 'angle': 109.0, 'blen': 1.31, 'charge': -0.146, 'type': 'NA'}, "ND1":{'torsion': 180.0, 'tree': 'S', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 122.0, 'blen': 1.39, 'charge': -0.502, 'type': 'NB'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O'], ['CE1', 'CD2', 'NE2', 'HE2']], "CE1":{'torsion': 180.0, 'tree': 'B', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 13, 'angle': 108.0, 'blen': 1.32, 'charge': 0.241, 'type': 'CR'}, "INTX,KFORM":['INT', '1'], "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "HE2":{'torsion': 180.0, 'tree': 'E', 'NC': 12, 'NB': 13, 'NA': 15, 'I': 16, 'angle': 125.0, 'blen': 1.01, 'charge': 0.228, 'type': 'H'}, "NAMRES":'HISTIDINE EPSILON-H COO- ANION', "HE":{'torsion': 180.0, 'tree': 'E', 'NC': 11, 'NB': 12, 'NA': 13, 'I': 14, 'angle': 120.0, 'blen': 1.09, 'charge': 0.036, 'type': 'HC'}, "HD":{'torsion': 180.0, 'tree': 'E', 'NC': 13, 'NB': 15, 'NA': 17, 'I': 18, 'angle': 120.0, 'blen': 1.09, 'charge': 0.114, 'type': 'HC'}, "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'ND1', 'CE1', 'HE', 'NE2', 'HE2', 'CD2', 'HD', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "CD2":{'torsion': 0.0, 'tree': 'S', 'NC': 12, 'NB': 13, 'NA': 15, 'I': 17, 'angle': 110.0, 'blen': 1.36, 'charge': -0.184, 'type': 'CW'}, "HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 19, 'I': 20, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CG":{'torsion': 180.0, 'tree': 'S', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 115.0, 'blen': 1.51, 'charge': 0.251, 'type': 'CC'}, "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.098, 'type': 'CT'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 19, 'I': 21, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "loopList":[['CG', 'CD2']], "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 19, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, }, "MET": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.027, 'type': 'HC'}, "HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.027, 'type': 'HC'}, "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 21, 'I': 22, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']], "SD":{'torsion': 180.0, 'tree': '3', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 14, 'angle': 110.0, 'blen': 1.81, 'charge': 0.737, 'type': 'S'}, "LP1":{'torsion': 60.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 15, 'angle': 96.7, 'blen': 0.679, 'charge': -0.381, 'type': 'LP'}, "HG3":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 109.5, 'blen': 1.09, 'charge': 0.0652, 'type': 'HC'}, "HG2":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 109.5, 'blen': 1.09, 'charge': 0.0652, 'type': 'HC'}, "INTX,KFORM":['INT', '1'], "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "HE3":{'torsion': 300.0, 'tree': 'E', 'NC': 11, 'NB': 14, 'NA': 17, 'I': 20, 'angle': 109.5, 'blen': 1.09, 'charge': 0.0652, 'type': 'HC'}, "HE2":{'torsion': 180.0, 'tree': 'E', 'NC': 11, 'NB': 14, 'NA': 17, 'I': 19, 'angle': 109.5, 'blen': 1.09, 'charge': 0.0652, 'type': 'HC'}, "HE1":{'torsion': 60.0, 'tree': 'E', 'NC': 11, 'NB': 14, 'NA': 17, 'I': 18, 'angle': 109.5, 'blen': 1.09, 'charge': 0.0652, 'type': 'HC'}, "NAMRES":'METHIONINE COO- ANION', "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'HG2', 'HG3', 'SD', 'LP1', 'LP2', 'CE', 'HE1', 'HE2', 'HE3', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "CE":{'torsion': 180.0, 'tree': '3', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 17, 'angle': 100.0, 'blen': 1.78, 'charge': -0.134, 'type': 'CT'}, "CG":{'torsion': 180.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 109.47, 'blen': 1.525, 'charge': -0.054, 'type': 'CT'}, "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.151, 'type': 'CT'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 21, 'I': 23, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "LP2":{'torsion': 300.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 16, 'angle': 96.7, 'blen': 0.679, 'charge': -0.381, 'type': 'LP'}, "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 21, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, }, "IDBGEN,IREST,ITYPF":['1', '1', '201'], "ALA": { "HB2":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'}, "HB3":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'}, "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB1', 'HB2', 'HB3', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "HB1":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'}, "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 12, 'I': 13, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.098, 'type': 'CT'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']], "HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "INTX,KFORM":['INT', '1'], "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 12, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 12, 'I': 14, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "NAMRES":'ALANINE COO- ANION', }, "PHE": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'}, "HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']], "INTX,KFORM":['INT', '1'], "HD2":{'torsion': 180.0, 'tree': 'E', 'NC': 16, 'NB': 18, 'NA': 20, 'I': 21, 'angle': 120.0, 'blen': 1.09, 'charge': 0.058, 'type': 'HC'}, "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "HD1":{'torsion': 0.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 13, 'angle': 120.0, 'blen': 1.09, 'charge': 0.058, 'type': 'HC'}, "HE1":{'torsion': 180.0, 'tree': 'E', 'NC': 11, 'NB': 12, 'NA': 14, 'I': 15, 'angle': 120.0, 'blen': 1.09, 'charge': 0.063, 'type': 'HC'}, "HE2":{'torsion': 180.0, 'tree': 'E', 'NC': 14, 'NB': 16, 'NA': 18, 'I': 19, 'angle': 120.0, 'blen': 1.09, 'charge': 0.063, 'type': 'HC'}, "CD2":{'torsion': 0.0, 'tree': 'S', 'NC': 14, 'NB': 16, 'NA': 18, 'I': 20, 'angle': 120.0, 'blen': 1.4, 'charge': -0.069, 'type': 'CA'}, "NAMRES":'PHENYLALANINE COO- ANION', "CD1":{'torsion': 180.0, 'tree': 'B', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 120.0, 'blen': 1.4, 'charge': -0.069, 'type': 'CA'}, "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'CD1', 'HD1', 'CE1', 'HE1', 'CZ', 'HZ', 'CE2', 'HE2', 'CD2', 'HD2', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "CE1":{'torsion': 180.0, 'tree': 'B', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 14, 'angle': 120.0, 'blen': 1.4, 'charge': -0.059, 'type': 'CA'}, "CE2":{'torsion': 0.0, 'tree': 'B', 'NC': 12, 'NB': 14, 'NA': 16, 'I': 18, 'angle': 120.0, 'blen': 1.4, 'charge': -0.059, 'type': 'CA'}, "HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "CZ":{'torsion': 0.0, 'tree': 'B', 'NC': 11, 'NB': 12, 'NA': 14, 'I': 16, 'angle': 120.0, 'blen': 1.4, 'charge': -0.065, 'type': 'CA'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 22, 'I': 23, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CG":{'torsion': 180.0, 'tree': 'S', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 115.0, 'blen': 1.51, 'charge': 0.055, 'type': 'CA'}, "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.098, 'type': 'CT'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 22, 'I': 24, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "loopList":[['CG', 'CD2']], "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 22, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, "HZ":{'torsion': 180.0, 'tree': 'E', 'NC': 12, 'NB': 14, 'NA': 16, 'I': 17, 'angle': 120.0, 'blen': 1.09, 'charge': 0.062, 'type': 'HC'}, }, "CYX": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.0495, 'type': 'HC'}, "HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.0495, 'type': 'HC'}, "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'SG', 'LP1', 'LP2', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "SG":{'torsion': 180.0, 'tree': 'B', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 116.0, 'blen': 1.81, 'charge': 0.824, 'type': 'S'}, "LP1":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 96.7, 'blen': 0.679, 'charge': -0.4045, 'type': 'LP'}, "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 14, 'I': 15, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.098, 'type': 'CT'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']], "HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "INTX,KFORM":['INT', '1'], "LP2":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 96.7, 'blen': 0.679, 'charge': -0.4045, 'type': 'LP'}, "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 14, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 14, 'I': 16, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "NAMRES":'CYSTINE(S-S BRIDGE) COO- ANION', }, "PRO": { "HB2":{'torsion': 136.3, 'tree': 'E', 'NC': 5, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 109.5, 'blen': 1.09, 'charge': 0.061, 'type': 'HC'}, "HB3":{'torsion': 256.3, 'tree': 'E', 'NC': 5, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 109.5, 'blen': 1.09, 'charge': 0.061, 'type': 'HC'}, "impropTors":[['CA', 'OXT', 'C', 'O'], ['-M', 'CA', 'N', 'CD']], "INTX,KFORM":['INT', '1'], "HG3":{'torsion': 98.0, 'tree': 'E', 'NC': 4, 'NB': 5, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.063, 'type': 'HC'}, "HG2":{'torsion': 218.0, 'tree': 'E', 'NC': 4, 'NB': 5, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.063, 'type': 'HC'}, "CD":{'torsion': 356.1, 'tree': '3', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 126.1, 'blen': 1.458, 'charge': -0.012, 'type': 'CT'}, "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "loopList":[['CA', 'CB']], "HD2":{'torsion': 80.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 5, 'I': 6, 'angle': 109.5, 'blen': 1.09, 'charge': 0.06, 'type': 'HC'}, "HD3":{'torsion': 320.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 5, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.06, 'type': 'HC'}, "NAMRES":'PROLINE COO- ANION', "atNameList":['N', 'CD', 'HD2', 'HD3', 'CG', 'HG2', 'HG3', 'CB', 'HB2', 'HB3', 'CA', 'HA', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "HA":{'torsion': 81.1, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 14, 'I': 15, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 117.0, 'blen': 1.337, 'charge': -0.229, 'type': 'N'}, "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 14, 'NA': 16, 'I': 17, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CG":{'torsion': 200.1, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 5, 'I': 8, 'angle': 103.2, 'blen': 1.5, 'charge': -0.121, 'type': 'CT'}, "CA":{'torsion': 175.2, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 14, 'angle': 120.6, 'blen': 1.451, 'charge': 0.035, 'type': 'CT'}, "CB":{'torsion': 338.3, 'tree': 'B', 'NC': 4, 'NB': 5, 'NA': 8, 'I': 11, 'angle': 106.0, 'blen': 1.51, 'charge': -0.115, 'type': 'CT'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 14, 'NA': 16, 'I': 18, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CUT":['0.00000'], "C":{'torsion': 0.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 14, 'I': 16, 'angle': 111.1, 'blen': 1.522, 'charge': 0.438, 'type': 'C'}, }, "LYS": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'}, "HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'}, "HZ2":{'torsion': 180.0, 'tree': 'E', 'NC': 14, 'NB': 17, 'NA': 20, 'I': 22, 'angle': 109.47, 'blen': 1.01, 'charge': 0.294, 'type': 'H3'}, "HZ3":{'torsion': 300.0, 'tree': 'E', 'NC': 14, 'NB': 17, 'NA': 20, 'I': 23, 'angle': 109.47, 'blen': 1.01, 'charge': 0.294, 'type': 'H3'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']], "HZ1":{'torsion': 60.0, 'tree': 'E', 'NC': 14, 'NB': 17, 'NA': 20, 'I': 21, 'angle': 109.47, 'blen': 1.01, 'charge': 0.294, 'type': 'H3'}, "NZ":{'torsion': 180.0, 'tree': '3', 'NC': 11, 'NB': 14, 'NA': 17, 'I': 20, 'angle': 109.47, 'blen': 1.47, 'charge': -0.138, 'type': 'N3'}, "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 24, 'I': 25, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "INTX,KFORM":['INT', '1'], "HG3":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 109.5, 'blen': 1.09, 'charge': 0.116, 'type': 'HC'}, "HG2":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 109.5, 'blen': 1.09, 'charge': 0.116, 'type': 'HC'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "HE3":{'torsion': 60.0, 'tree': 'E', 'NC': 11, 'NB': 14, 'NA': 17, 'I': 19, 'angle': 109.5, 'blen': 1.09, 'charge': 0.098, 'type': 'HC'}, "HE2":{'torsion': 300.0, 'tree': 'E', 'NC': 11, 'NB': 14, 'NA': 17, 'I': 18, 'angle': 109.5, 'blen': 1.09, 'charge': 0.098, 'type': 'HC'}, "HD2":{'torsion': 300.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 15, 'angle': 109.5, 'blen': 1.09, 'charge': 0.122, 'type': 'HC'}, "HD3":{'torsion': 60.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 16, 'angle': 109.5, 'blen': 1.09, 'charge': 0.122, 'type': 'HC'}, "NAMRES":'LYSINE COO- ANION', "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'HG2', 'HG3', 'CD', 'HD2', 'HD3', 'CE', 'HE2', 'HE3', 'NZ', 'HZ1', 'HZ2', 'HZ3', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "CD":{'torsion': 180.0, 'tree': '3', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 14, 'angle': 109.47, 'blen': 1.525, 'charge': -0.18, 'type': 'CT'}, "CE":{'torsion': 180.0, 'tree': '3', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 17, 'angle': 109.47, 'blen': 1.525, 'charge': -0.038, 'type': 'CT'}, "CG":{'torsion': 180.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 109.47, 'blen': 1.525, 'charge': -0.16, 'type': 'CT'}, "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.098, 'type': 'CT'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 24, 'I': 26, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 24, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, }, "NAMDBF":'db4.dat', "SER": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.119, 'type': 'HC'}, "HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.119, 'type': 'HC'}, "HG":{'torsion': 180.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 109.47, 'blen': 0.96, 'charge': 0.31, 'type': 'HO'}, "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'OG', 'HG', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 13, 'I': 14, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': 0.018, 'type': 'CT'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']], "OG":{'torsion': 180.0, 'tree': 'S', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 109.47, 'blen': 1.43, 'charge': -0.55, 'type': 'OH'}, "HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "INTX,KFORM":['INT', '1'], "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 13, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 13, 'I': 15, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "NAMRES":'SERINE COO- ANION', }, "ASP": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.071, 'type': 'HC'}, "HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.071, 'type': 'HC'}, "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'OD1', 'OD2', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 14, 'I': 15, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.398, 'type': 'CT'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O'], ['CB', 'OD1', 'CG', 'OD2']], "HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "INTX,KFORM":['INT', '1'], "CG":{'torsion': 180.0, 'tree': 'B', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 109.47, 'blen': 1.527, 'charge': 0.714, 'type': 'C'}, "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "OD2":{'torsion': 270.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 117.2, 'blen': 1.26, 'charge': -0.721, 'type': 'O2'}, "OD1":{'torsion': 90.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 117.2, 'blen': 1.26, 'charge': -0.721, 'type': 'O2'}, "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 14, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 14, 'I': 16, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "NAMRES":'ASPARTIC ACID COO- ANION', }, "GLN": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'}, "HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'}, "NE2":{'torsion': 180.0, 'tree': 'B', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 16, 'angle': 116.6, 'blen': 1.335, 'charge': -0.867, 'type': 'N'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O'], ['CG', 'NE2', 'CD', 'OE1'], ['CD', 'HE21', 'NE2', 'HE22']], "INTX,KFORM":['INT', '1'], "HG3":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 109.5, 'blen': 1.09, 'charge': 0.057, 'type': 'HC'}, "HG2":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 109.5, 'blen': 1.09, 'charge': 0.057, 'type': 'HC'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "NAMRES":'GLUTAMINE COO- ANION', "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'HG2', 'HG3', 'CD', 'OE1', 'NE2', 'HE21', 'HE22', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "HE21":{'torsion': 180.0, 'tree': 'E', 'NC': 11, 'NB': 14, 'NA': 16, 'I': 17, 'angle': 119.8, 'blen': 1.01, 'charge': 0.344, 'type': 'H'}, "HE22":{'torsion': 0.0, 'tree': 'E', 'NC': 11, 'NB': 14, 'NA': 16, 'I': 18, 'angle': 119.8, 'blen': 1.01, 'charge': 0.344, 'type': 'H'}, "HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "CD":{'torsion': 180.0, 'tree': 'B', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 14, 'angle': 111.1, 'blen': 1.522, 'charge': 0.675, 'type': 'C'}, "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 19, 'I': 20, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CG":{'torsion': 180.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 109.47, 'blen': 1.525, 'charge': -0.102, 'type': 'CT'}, "OE1":{'torsion': 0.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 15, 'angle': 120.5, 'blen': 1.229, 'charge': -0.47, 'type': 'O'}, "CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.098, 'type': 'CT'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 19, 'I': 21, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 19, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, }, "GLU": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.092, 'type': 'HC'}, "HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.092, 'type': 'HC'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O'], ['CG', 'OE1', 'CD', 'OE2']], "INTX,KFORM":['INT', '1'], "HG3":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 13, 'angle': 109.5, 'blen': 1.09, 'charge': 0.071, 'type': 'HC'}, "HG2":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 109.5, 'blen': 1.09, 'charge': 0.071, 'type': 'HC'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "OE2":{'torsion': 270.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 16, 'angle': 117.2, 'blen': 1.26, 'charge': -0.721, 'type': 'O2'}, "NAMRES":'GLUTAMIC ACID COO- ANION', "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'HG2', 'HG3', 'CD', 'OE1', 'OE2', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "CD":{'torsion': 180.0, 'tree': 'B', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 14, 'angle': 109.47, 'blen': 1.527, 'charge': 0.714, 'type': 'C'}, "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 17, 'I': 18, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CG":{'torsion': 180.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 109.47, 'blen': 1.51, 'charge': -0.398, 'type': 'CT'}, "OE1":{'torsion': 90.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 14, 'I': 15, 'angle': 117.2, 'blen': 1.26, 'charge': -0.721, 'type': 'O2'}, "CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.184, 'type': 'CT'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 17, 'I': 19, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 17, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, }, "TRP": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'}, "HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 26, 'I': 28, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "HZ2":{'torsion': 0.0, 'tree': 'E', 'NC': 14, 'NB': 16, 'NA': 17, 'I': 18, 'angle': 120.0, 'blen': 1.09, 'charge': 0.084, 'type': 'HC'}, "HZ3":{'torsion': 180.0, 'tree': 'E', 'NC': 17, 'NB': 19, 'NA': 21, 'I': 22, 'angle': 120.0, 'blen': 1.09, 'charge': 0.057, 'type': 'HC'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O'], ['CD1', 'CE2', 'NE1', 'HE1'], ['CE2', 'CH2', 'CZ2', 'HZ2'], ['CZ2', 'CZ3', 'CH2', 'HH2'], ['CH2', 'CE3', 'CZ3', 'HZ3'], ['CZ3', 'CD2', 'CE3', 'HE3']], "CH2":{'torsion': 180.0, 'tree': 'B', 'NC': 14, 'NB': 16, 'NA': 17, 'I': 19, 'angle': 116.0, 'blen': 1.39, 'charge': -0.077, 'type': 'CA'}, "CZ3":{'torsion': 0.0, 'tree': 'B', 'NC': 16, 'NB': 17, 'NA': 19, 'I': 21, 'angle': 121.0, 'blen': 1.35, 'charge': -0.066, 'type': 'CA'}, "NE1":{'torsion': 180.0, 'tree': 'B', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 14, 'angle': 107.0, 'blen': 1.43, 'charge': -0.352, 'type': 'NA'}, "INTX,KFORM":['INT', '1'], "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "HE3":{'torsion': 180.0, 'tree': 'E', 'NC': 19, 'NB': 21, 'NA': 23, 'I': 24, 'angle': 120.0, 'blen': 1.09, 'charge': 0.086, 'type': 'HC'}, "HD1":{'torsion': 0.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 13, 'angle': 120.0, 'blen': 1.09, 'charge': 0.093, 'type': 'HC'}, "HE1":{'torsion': 180.0, 'tree': 'E', 'NC': 11, 'NB': 12, 'NA': 14, 'I': 15, 'angle': 125.5, 'blen': 1.01, 'charge': 0.271, 'type': 'H'}, "NAMRES":'TRYPTOPHAN COO- ANION', "CD1":{'torsion': 180.0, 'tree': 'B', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 127.0, 'blen': 1.34, 'charge': 0.044, 'type': 'CW'}, "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'CD1', 'HD1', 'NE1', 'HE1', 'CE2', 'CZ2', 'HZ2', 'CH2', 'HH2', 'CZ3', 'HZ3', 'CE3', 'HE3', 'CD2', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "CD2":{'torsion': 0.0, 'tree': 'E', 'NC': 19, 'NB': 21, 'NA': 23, 'I': 25, 'angle': 117.0, 'blen': 1.4, 'charge': 0.146, 'type': 'CB'}, "CE2":{'torsion': 0.0, 'tree': 'S', 'NC': 11, 'NB': 12, 'NA': 14, 'I': 16, 'angle': 109.0, 'blen': 1.31, 'charge': 0.154, 'type': 'CN'}, "CE3":{'torsion': 0.0, 'tree': 'B', 'NC': 17, 'NB': 19, 'NA': 21, 'I': 23, 'angle': 122.0, 'blen': 1.41, 'charge': -0.173, 'type': 'CA'}, "HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 26, 'I': 27, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CG":{'torsion': 180.0, 'tree': 'S', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 115.0, 'blen': 1.51, 'charge': -0.135, 'type': 'C*'}, "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.098, 'type': 'CT'}, "CZ2":{'torsion': 180.0, 'tree': 'B', 'NC': 12, 'NB': 14, 'NA': 16, 'I': 17, 'angle': 128.0, 'blen': 1.4, 'charge': -0.168, 'type': 'CA'}, "loopList":[['CG', 'CD2'], ['CE2', 'CD2']], "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 26, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, "HH2":{'torsion': 180.0, 'tree': 'E', 'NC': 16, 'NB': 17, 'NA': 19, 'I': 20, 'angle': 120.0, 'blen': 1.09, 'charge': 0.074, 'type': 'HC'}, }, "GLY": { "HA3":{'torsion': 60.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 109.5, 'blen': 1.09, 'charge': 0.032, 'type': 'HC'}, "atNameList":['N', 'H', 'CA', 'HA2', 'HA3', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "HA2":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.032, 'type': 'HC'}, "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 9, 'I': 10, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']], "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "INTX,KFORM":['INT', '1'], "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 9, 'angle': 110.4, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 9, 'I': 11, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "NAMRES":'GLYCINE COO- ANION', }, "THR": { "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB', 'CG2', 'HG21', 'HG22', 'HG23', 'OG1', 'HG1', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "HG23":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 10, 'I': 13, 'angle': 109.5, 'blen': 1.09, 'charge': 0.065, 'type': 'HC'}, "HB":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.082, 'type': 'HC'}, "HG22":{'torsion': 180.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 10, 'I': 12, 'angle': 109.5, 'blen': 1.09, 'charge': 0.065, 'type': 'HC'}, "CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': 0.17, 'type': 'CT'}, "HG1":{'torsion': 180.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 14, 'I': 15, 'angle': 109.47, 'blen': 0.96, 'charge': 0.31, 'type': 'HO'}, "HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']], "HG21":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 10, 'I': 11, 'angle': 109.5, 'blen': 1.09, 'charge': 0.065, 'type': 'HC'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "INTX,KFORM":['INT', '1'], "OG1":{'torsion': 60.0, 'tree': 'S', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 14, 'angle': 109.47, 'blen': 1.43, 'charge': -0.55, 'type': 'OH'}, "CG2":{'torsion': 300.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.47, 'blen': 1.525, 'charge': -0.191, 'type': 'CT'}, "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 16, 'I': 17, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 16, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 16, 'I': 18, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "NAMRES":'THREONINE COO- ANION', }, "HIP": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.086, 'type': 'HC'}, "HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.086, 'type': 'HC'}, "NE2":{'torsion': 0.0, 'tree': 'B', 'NC': 11, 'NB': 12, 'NA': 14, 'I': 16, 'angle': 109.0, 'blen': 1.31, 'charge': -0.058, 'type': 'NA'}, "ND1":{'torsion': 180.0, 'tree': 'B', 'NC': 6, 'NB': 8, 'NA': 11, 'I': 12, 'angle': 122.0, 'blen': 1.39, 'charge': -0.058, 'type': 'NA'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O'], ['CG', 'CE1', 'ND1', 'HD1'], ['CE1', 'CD2', 'NE2', 'HE2']], "CE1":{'torsion': 180.0, 'tree': 'B', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 14, 'angle': 108.0, 'blen': 1.32, 'charge': 0.114, 'type': 'CR'}, "INTX,KFORM":['INT', '1'], "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "HD1":{'torsion': 0.0, 'tree': 'E', 'NC': 8, 'NB': 11, 'NA': 12, 'I': 13, 'angle': 126.0, 'blen': 1.01, 'charge': 0.306, 'type': 'H'}, "HE2":{'torsion': 180.0, 'tree': 'E', 'NC': 12, 'NB': 14, 'NA': 16, 'I': 17, 'angle': 125.0, 'blen': 1.01, 'charge': 0.306, 'type': 'H'}, "NAMRES":'HISTIDINE PLUS COO-', "HE":{'torsion': 180.0, 'tree': 'E', 'NC': 11, 'NB': 12, 'NA': 14, 'I': 15, 'angle': 120.0, 'blen': 1.09, 'charge': 0.158, 'type': 'HC'}, "HD":{'torsion': 180.0, 'tree': 'E', 'NC': 14, 'NB': 16, 'NA': 18, 'I': 19, 'angle': 120.0, 'blen': 1.09, 'charge': 0.153, 'type': 'HC'}, "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB2', 'HB3', 'CG', 'ND1', 'HD1', 'CE1', 'HE', 'NE2', 'HE2', 'CD2', 'HD', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "CD2":{'torsion': 0.0, 'tree': 'S', 'NC': 12, 'NB': 14, 'NA': 16, 'I': 18, 'angle': 110.0, 'blen': 1.36, 'charge': -0.037, 'type': 'CW'}, "HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 20, 'I': 21, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CG":{'torsion': 180.0, 'tree': 'S', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 11, 'angle': 115.0, 'blen': 1.51, 'charge': 0.058, 'type': 'CC'}, "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.098, 'type': 'CT'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 20, 'I': 22, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "loopList":[['CG', 'CD2']], "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 20, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, }, "VAL": { "HG22":{'torsion': 180.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 14, 'I': 16, 'angle': 109.5, 'blen': 1.09, 'charge': 0.031, 'type': 'HC'}, "HG23":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 14, 'I': 17, 'angle': 109.5, 'blen': 1.09, 'charge': 0.031, 'type': 'HC'}, "HG21":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 14, 'I': 15, 'angle': 109.5, 'blen': 1.09, 'charge': 0.031, 'type': 'HC'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']], "HG13":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 10, 'I': 13, 'angle': 109.5, 'blen': 1.09, 'charge': 0.031, 'type': 'HC'}, "HG12":{'torsion': 180.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 10, 'I': 12, 'angle': 109.5, 'blen': 1.09, 'charge': 0.031, 'type': 'HC'}, "HG11":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 10, 'I': 11, 'angle': 109.5, 'blen': 1.09, 'charge': 0.031, 'type': 'HC'}, "INTX,KFORM":['INT', '1'], "CG2":{'torsion': 180.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 14, 'angle': 109.47, 'blen': 1.525, 'charge': -0.091, 'type': 'CT'}, "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "CG1":{'torsion': 60.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.47, 'blen': 1.525, 'charge': -0.091, 'type': 'CT'}, "NAMRES":'VALINE COO- ANION', "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB', 'CG1', 'HG11', 'HG12', 'HG13', 'CG2', 'HG21', 'HG22', 'HG23', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "HB":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.024, 'type': 'HC'}, "HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 18, 'I': 19, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 111.1, 'blen': 1.525, 'charge': -0.012, 'type': 'CT'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 18, 'I': 20, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 18, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, }, "ILE": { "HG22":{'torsion': 180.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 10, 'I': 12, 'angle': 109.5, 'blen': 1.09, 'charge': 0.029, 'type': 'HC'}, "HG23":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 10, 'I': 13, 'angle': 109.5, 'blen': 1.09, 'charge': 0.029, 'type': 'HC'}, "HG21":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 10, 'I': 11, 'angle': 109.5, 'blen': 1.09, 'charge': 0.029, 'type': 'HC'}, "HD13":{'torsion': 300.0, 'tree': 'E', 'NC': 8, 'NB': 14, 'NA': 17, 'I': 20, 'angle': 109.5, 'blen': 1.09, 'charge': 0.028, 'type': 'HC'}, "HG13":{'torsion': 60.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 14, 'I': 16, 'angle': 109.5, 'blen': 1.09, 'charge': 0.027, 'type': 'HC'}, "HG12":{'torsion': 300.0, 'tree': 'E', 'NC': 6, 'NB': 8, 'NA': 14, 'I': 15, 'angle': 109.5, 'blen': 1.09, 'charge': 0.027, 'type': 'HC'}, "INTX,KFORM":['INT', '1'], "CG2":{'torsion': 60.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.47, 'blen': 1.525, 'charge': -0.085, 'type': 'CT'}, "IFIXC,IOMIT,ISYMDU,IPOS":['CORR', 'OMIT', 'DU', 'BEG'], "CG1":{'torsion': 180.0, 'tree': '3', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 14, 'angle': 109.47, 'blen': 1.525, 'charge': -0.049, 'type': 'CT'}, "NAMRES":'ISOLEUCINE COO- ANION', "atNameList":['N', 'H', 'CA', 'HA', 'CB', 'HB', 'CG2', 'HG21', 'HG22', 'HG23', 'CG1', 'HG12', 'HG13', 'CD1', 'HD11', 'HD12', 'HD13', 'C', 'O', 'OXT'], "DUMM":[['1', 'DUMM', 'DU', 'M', '0', '-1', '-2', '0.000', '0.000', '0.000', '0.00000'], ['2', 'DUMM', 'DU', 'M', '1', '0', '-1', '1.449', '0.000', '0.000', '0.00000'], ['3', 'DUMM', 'DU', 'M', '2', '1', '0', '1.522', '111.100', '0.000', '0.00000']], "HD11":{'torsion': 60.0, 'tree': 'E', 'NC': 8, 'NB': 14, 'NA': 17, 'I': 18, 'angle': 109.5, 'blen': 1.09, 'charge': 0.028, 'type': 'HC'}, "HD12":{'torsion': 180.0, 'tree': 'E', 'NC': 8, 'NB': 14, 'NA': 17, 'I': 19, 'angle': 109.5, 'blen': 1.09, 'charge': 0.028, 'type': 'HC'}, "HB":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.022, 'type': 'HC'}, "CD1":{'torsion': 180.0, 'tree': '3', 'NC': 6, 'NB': 8, 'NA': 14, 'I': 17, 'angle': 109.47, 'blen': 1.525, 'charge': -0.085, 'type': 'CT'}, "HA":{'torsion': 300.0, 'tree': 'E', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 7, 'angle': 109.5, 'blen': 1.09, 'charge': 0.048, 'type': 'HC'}, "N":{'torsion': 180.0, 'tree': 'M', 'NC': 1, 'NB': 2, 'NA': 3, 'I': 4, 'angle': 116.6, 'blen': 1.335, 'charge': -0.463, 'type': 'N'}, "O":{'torsion': 0.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 21, 'I': 22, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "H":{'torsion': 0.0, 'tree': 'E', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 5, 'angle': 119.8, 'blen': 1.01, 'charge': 0.252, 'type': 'H'}, "CA":{'torsion': 180.0, 'tree': 'M', 'NC': 2, 'NB': 3, 'NA': 4, 'I': 6, 'angle': 121.9, 'blen': 1.449, 'charge': 0.035, 'type': 'CT'}, "CB":{'torsion': 60.0, 'tree': '3', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 8, 'angle': 109.47, 'blen': 1.525, 'charge': -0.012, 'type': 'CT'}, "OXT":{'torsion': 180.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 21, 'I': 23, 'angle': 120.5, 'blen': 1.229, 'charge': -0.706, 'type': 'O2'}, "CUT":['0.00000'], "C":{'torsion': 180.0, 'tree': 'M', 'NC': 3, 'NB': 4, 'NA': 6, 'I': 21, 'angle': 111.1, 'blen': 1.522, 'charge': 0.524, 'type': 'C'}, "impropTors":[['-M', 'CA', 'N', 'H'], ['CA', 'OXT', 'C', 'O']], }, "filename":'allct.in', }
[ 439, 310, 62, 19608, 796, 1391, 198, 1, 9936, 49, 1298, 1391, 197, 1, 32886, 17, 1298, 90, 6, 83, 669, 295, 10354, 5867, 13, 15, 11, 705, 21048, 10354, 705, 36, 3256, 705, 7792, 10354, 604, 11, 705, 32819, 10354, 718, 11, 705, 4...
1.879272
36,752
# # This file is part of the chi repository # (https://github.com/DavAug/chi/) which is released under the # BSD 3-clause license. See accompanying LICENSE.md for copyright notice and # full license details. # import copy import myokit import myokit.formats.sbml as sbml import numpy as np
[ 2, 198, 2, 770, 2393, 318, 636, 286, 262, 33166, 16099, 198, 2, 357, 5450, 1378, 12567, 13, 785, 14, 35, 615, 12512, 14, 11072, 34729, 543, 318, 2716, 739, 262, 198, 2, 347, 10305, 513, 12, 565, 682, 5964, 13, 4091, 19249, 38559, ...
3.182796
93
# -*- coding: utf-8 -*- """ Django settings for smartlicense project. Generated by 'django-admin startproject' using Django 2.0.2. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ from os.path import dirname, abspath, join # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = dirname(dirname(dirname(abspath(__file__)))) SCRATCH_DIR = join(BASE_DIR, '.scratch') SCRACTH_DB = join(SCRATCH_DIR, 'scratch.sqlite3') # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '3ka4^(c+fm7rw+@ttete34bt6tv3^8=r1!*_*-ovp1vu&qi=a9' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ADMINS = [('admin', 'admin@admin.org')] ALLOWED_HOSTS = ['*'] # Application definition INSTALLED_APPS = [ 'martor', 'suit', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django_markup', 'django_object_actions', 'smartlicense.apps.SmartLicenseConfig', ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] ROOT_URLCONF = 'smartlicense.urls' MEDIA_ROOT = SCRATCH_DIR MEDIA_URL = '/media/' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [join(BASE_DIR, 'smartlicense', 'templates')], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'smartlicense.wsgi.application' # Database # https://docs.djangoproject.com/en/2.0/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': SCRACTH_DB, } } # Password validation # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', }, { 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', }, ] # Internationalization # https://docs.djangoproject.com/en/2.0/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/2.0/howto/static-files/ STATIC_URL = '/static/' # Mator MARTOR_ENABLE_CONFIGS = { 'imgur': 'false', # to enable/disable imgur/custom uploader. 'mention': 'false', # to enable/disable mention 'jquery': 'true', # to include/revoke jquery (require for admin default django) } # Custom project settings NODE_IP = '127.0.0.1' NODE_PORT = '9718' NODE_USER = 'testuser' NODE_PWD = 'testpassword' STREAM_SMART_LICENSE = 'smart-license' STREAM_SMART_LICENSE_ATTESTATION = 'smart-license' STREAM_ISCC = 'iscc' SUIT_CONFIG = { 'ADMIN_NAME': 'Smart License Demo', 'CONFIRM_UNSAVED_CHANGES': False, 'MENU_OPEN_FIRST_CHILD': True, 'SEARCH_URL': 'admin:smartlicense_mediacontent_changelist', 'LIST_PER_PAGE': 18, 'MENU': ( {'label': 'Smart Licenses', 'models': ( {'model': 'smartlicense.mediacontent'}, {'model': 'smartlicense.smartlicense'}, )}, {'label': 'Transactions', 'models': ( {'model': 'smartlicense.attestation'}, {'model': 'smartlicense.tokentransaction'}, )}, {'label': 'Configuration', 'models': ( {'model': 'smartlicense.template'}, {'model': 'smartlicense.rightsmodule'}, {'model': 'smartlicense.activationmode'}, )} ) } # Make sure deployment overrides settings try: from smartlicense.settings.config import * except Exception: print( 'No custom configuration found. Create a smartlicense/settings/config.py') import sys sys.exit(0)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 35, 73, 14208, 6460, 329, 4451, 43085, 1628, 13, 198, 198, 8645, 515, 416, 705, 28241, 14208, 12, 28482, 923, 16302, 6, 1262, 37770, 362, 13, 15, 13, 17, ...
2.354563
2,104
## Copyright (c) 2022, Team FirmWire ## SPDX-License-Identifier: BSD-3-Clause from enum import Enum, auto from .hw.soc import SOCPeripheral
[ 2235, 15069, 357, 66, 8, 33160, 11, 4816, 31623, 29451, 198, 2235, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 347, 10305, 12, 18, 12, 2601, 682, 198, 6738, 33829, 1330, 2039, 388, 11, 8295, 198, 6738, 764, 36599, 13, 35634, 1330, 31...
2.979167
48
from .helper import fill_optional_fields from maps_geometry.feature_extraction import get_bounding_box from .MapistoShape import MapistoShape from .BoundingBox import BoundingBox
[ 6738, 764, 2978, 525, 1330, 6070, 62, 25968, 62, 25747, 198, 6738, 8739, 62, 469, 15748, 13, 30053, 62, 2302, 7861, 1330, 651, 62, 7784, 278, 62, 3524, 198, 6738, 764, 13912, 396, 78, 33383, 1330, 9347, 396, 78, 33383, 198, 6738, 76...
3.529412
51
from typing import List print(two_sum([1, 2, 3, 4, 5, 6], 7))
[ 6738, 19720, 1330, 7343, 628, 198, 198, 4798, 7, 11545, 62, 16345, 26933, 16, 11, 362, 11, 513, 11, 604, 11, 642, 11, 718, 4357, 767, 4008, 198 ]
2.321429
28
from vue.bridge import Object import javascript
[ 6738, 410, 518, 13, 9458, 1330, 9515, 198, 11748, 44575, 628, 198 ]
4.166667
12
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from google.cloud.datalabeling_v1beta1.proto import ( annotation_spec_set_pb2 as google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_annotation__spec__set__pb2, ) from google.cloud.datalabeling_v1beta1.proto import ( data_labeling_service_pb2 as google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2, ) from google.cloud.datalabeling_v1beta1.proto import ( dataset_pb2 as google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_dataset__pb2, ) from google.cloud.datalabeling_v1beta1.proto import ( evaluation_job_pb2 as google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_evaluation__job__pb2, ) from google.cloud.datalabeling_v1beta1.proto import ( evaluation_pb2 as google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_evaluation__pb2, ) from google.cloud.datalabeling_v1beta1.proto import ( instruction_pb2 as google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_instruction__pb2, ) from google.longrunning import ( operations_pb2 as google_dot_longrunning_dot_operations__pb2, ) from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 def add_DataLabelingServiceServicer_to_server(servicer, server): rpc_method_handlers = { "CreateDataset": grpc.unary_unary_rpc_method_handler( servicer.CreateDataset, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.CreateDatasetRequest.FromString, response_serializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_dataset__pb2.Dataset.SerializeToString, ), "GetDataset": grpc.unary_unary_rpc_method_handler( servicer.GetDataset, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.GetDatasetRequest.FromString, response_serializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_dataset__pb2.Dataset.SerializeToString, ), "ListDatasets": grpc.unary_unary_rpc_method_handler( servicer.ListDatasets, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.ListDatasetsRequest.FromString, response_serializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.ListDatasetsResponse.SerializeToString, ), "DeleteDataset": grpc.unary_unary_rpc_method_handler( servicer.DeleteDataset, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.DeleteDatasetRequest.FromString, response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, ), "ImportData": grpc.unary_unary_rpc_method_handler( servicer.ImportData, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.ImportDataRequest.FromString, response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, ), "ExportData": grpc.unary_unary_rpc_method_handler( servicer.ExportData, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.ExportDataRequest.FromString, response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, ), "GetDataItem": grpc.unary_unary_rpc_method_handler( servicer.GetDataItem, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.GetDataItemRequest.FromString, response_serializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_dataset__pb2.DataItem.SerializeToString, ), "ListDataItems": grpc.unary_unary_rpc_method_handler( servicer.ListDataItems, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.ListDataItemsRequest.FromString, response_serializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.ListDataItemsResponse.SerializeToString, ), "GetAnnotatedDataset": grpc.unary_unary_rpc_method_handler( servicer.GetAnnotatedDataset, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.GetAnnotatedDatasetRequest.FromString, response_serializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_dataset__pb2.AnnotatedDataset.SerializeToString, ), "ListAnnotatedDatasets": grpc.unary_unary_rpc_method_handler( servicer.ListAnnotatedDatasets, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.ListAnnotatedDatasetsRequest.FromString, response_serializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.ListAnnotatedDatasetsResponse.SerializeToString, ), "DeleteAnnotatedDataset": grpc.unary_unary_rpc_method_handler( servicer.DeleteAnnotatedDataset, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.DeleteAnnotatedDatasetRequest.FromString, response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, ), "LabelImage": grpc.unary_unary_rpc_method_handler( servicer.LabelImage, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.LabelImageRequest.FromString, response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, ), "LabelVideo": grpc.unary_unary_rpc_method_handler( servicer.LabelVideo, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.LabelVideoRequest.FromString, response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, ), "LabelText": grpc.unary_unary_rpc_method_handler( servicer.LabelText, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.LabelTextRequest.FromString, response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, ), "GetExample": grpc.unary_unary_rpc_method_handler( servicer.GetExample, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.GetExampleRequest.FromString, response_serializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_dataset__pb2.Example.SerializeToString, ), "ListExamples": grpc.unary_unary_rpc_method_handler( servicer.ListExamples, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.ListExamplesRequest.FromString, response_serializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.ListExamplesResponse.SerializeToString, ), "CreateAnnotationSpecSet": grpc.unary_unary_rpc_method_handler( servicer.CreateAnnotationSpecSet, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.CreateAnnotationSpecSetRequest.FromString, response_serializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_annotation__spec__set__pb2.AnnotationSpecSet.SerializeToString, ), "GetAnnotationSpecSet": grpc.unary_unary_rpc_method_handler( servicer.GetAnnotationSpecSet, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.GetAnnotationSpecSetRequest.FromString, response_serializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_annotation__spec__set__pb2.AnnotationSpecSet.SerializeToString, ), "ListAnnotationSpecSets": grpc.unary_unary_rpc_method_handler( servicer.ListAnnotationSpecSets, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.ListAnnotationSpecSetsRequest.FromString, response_serializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.ListAnnotationSpecSetsResponse.SerializeToString, ), "DeleteAnnotationSpecSet": grpc.unary_unary_rpc_method_handler( servicer.DeleteAnnotationSpecSet, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.DeleteAnnotationSpecSetRequest.FromString, response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, ), "CreateInstruction": grpc.unary_unary_rpc_method_handler( servicer.CreateInstruction, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.CreateInstructionRequest.FromString, response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, ), "GetInstruction": grpc.unary_unary_rpc_method_handler( servicer.GetInstruction, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.GetInstructionRequest.FromString, response_serializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_instruction__pb2.Instruction.SerializeToString, ), "ListInstructions": grpc.unary_unary_rpc_method_handler( servicer.ListInstructions, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.ListInstructionsRequest.FromString, response_serializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.ListInstructionsResponse.SerializeToString, ), "DeleteInstruction": grpc.unary_unary_rpc_method_handler( servicer.DeleteInstruction, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.DeleteInstructionRequest.FromString, response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, ), "GetEvaluation": grpc.unary_unary_rpc_method_handler( servicer.GetEvaluation, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.GetEvaluationRequest.FromString, response_serializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_evaluation__pb2.Evaluation.SerializeToString, ), "SearchEvaluations": grpc.unary_unary_rpc_method_handler( servicer.SearchEvaluations, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.SearchEvaluationsRequest.FromString, response_serializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.SearchEvaluationsResponse.SerializeToString, ), "SearchExampleComparisons": grpc.unary_unary_rpc_method_handler( servicer.SearchExampleComparisons, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.SearchExampleComparisonsRequest.FromString, response_serializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.SearchExampleComparisonsResponse.SerializeToString, ), "CreateEvaluationJob": grpc.unary_unary_rpc_method_handler( servicer.CreateEvaluationJob, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.CreateEvaluationJobRequest.FromString, response_serializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_evaluation__job__pb2.EvaluationJob.SerializeToString, ), "UpdateEvaluationJob": grpc.unary_unary_rpc_method_handler( servicer.UpdateEvaluationJob, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.UpdateEvaluationJobRequest.FromString, response_serializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_evaluation__job__pb2.EvaluationJob.SerializeToString, ), "GetEvaluationJob": grpc.unary_unary_rpc_method_handler( servicer.GetEvaluationJob, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.GetEvaluationJobRequest.FromString, response_serializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_evaluation__job__pb2.EvaluationJob.SerializeToString, ), "PauseEvaluationJob": grpc.unary_unary_rpc_method_handler( servicer.PauseEvaluationJob, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.PauseEvaluationJobRequest.FromString, response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, ), "ResumeEvaluationJob": grpc.unary_unary_rpc_method_handler( servicer.ResumeEvaluationJob, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.ResumeEvaluationJobRequest.FromString, response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, ), "DeleteEvaluationJob": grpc.unary_unary_rpc_method_handler( servicer.DeleteEvaluationJob, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.DeleteEvaluationJobRequest.FromString, response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, ), "ListEvaluationJobs": grpc.unary_unary_rpc_method_handler( servicer.ListEvaluationJobs, request_deserializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.ListEvaluationJobsRequest.FromString, response_serializer=google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_data__labeling__service__pb2.ListEvaluationJobsResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( "google.cloud.datalabeling.v1beta1.DataLabelingService", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,))
[ 2, 2980, 515, 416, 262, 308, 49, 5662, 11361, 8435, 17050, 13877, 13, 8410, 5626, 48483, 0, 198, 11748, 1036, 14751, 198, 198, 6738, 23645, 13, 17721, 13, 67, 10254, 9608, 278, 62, 85, 16, 31361, 16, 13, 1676, 1462, 1330, 357, 198, ...
2.320166
6,506
import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import keras from keras.models import Model, load_model from keras import backend as K from keras.preprocessing.image import ImageDataGenerator import tensorflow as tf tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR) # mute deprecation warnings from keras.optimizers import Adam, SGD from tensorflow import ConfigProto from tensorflow import InteractiveSession import numpy as np import sys from PIL import Image import argparse from matplotlib import pyplot as plt from .dataloader import * from .model import * from .metrics import *
[ 11748, 28686, 198, 418, 13, 268, 2268, 17816, 10234, 62, 8697, 47, 62, 23678, 62, 25294, 62, 2538, 18697, 20520, 796, 705, 18, 6, 198, 198, 11748, 41927, 292, 198, 6738, 41927, 292, 13, 27530, 1330, 9104, 11, 3440, 62, 19849, 198, 6...
3.184211
190
# 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! *** from .. import _utilities import typing # Export this package's modules as members: from ._enums import * from .application import * from .application_package import * from .batch_account import * from .certificate import * from .get_application import * from .get_application_package import * from .get_batch_account import * from .get_certificate import * from .get_pool import * from .list_batch_account_keys import * from .pool import * from ._inputs import * from . import outputs # Make subpackages available: if typing.TYPE_CHECKING: import pulumi_azure_native.batch.v20151201 as __v20151201 v20151201 = __v20151201 import pulumi_azure_native.batch.v20170101 as __v20170101 v20170101 = __v20170101 import pulumi_azure_native.batch.v20170501 as __v20170501 v20170501 = __v20170501 import pulumi_azure_native.batch.v20170901 as __v20170901 v20170901 = __v20170901 import pulumi_azure_native.batch.v20181201 as __v20181201 v20181201 = __v20181201 import pulumi_azure_native.batch.v20190401 as __v20190401 v20190401 = __v20190401 import pulumi_azure_native.batch.v20190801 as __v20190801 v20190801 = __v20190801 import pulumi_azure_native.batch.v20200301 as __v20200301 v20200301 = __v20200301 import pulumi_azure_native.batch.v20200501 as __v20200501 v20200501 = __v20200501 import pulumi_azure_native.batch.v20200901 as __v20200901 v20200901 = __v20200901 import pulumi_azure_native.batch.v20210101 as __v20210101 v20210101 = __v20210101 import pulumi_azure_native.batch.v20210601 as __v20210601 v20210601 = __v20210601 else: v20151201 = _utilities.lazy_import('pulumi_azure_native.batch.v20151201') v20170101 = _utilities.lazy_import('pulumi_azure_native.batch.v20170101') v20170501 = _utilities.lazy_import('pulumi_azure_native.batch.v20170501') v20170901 = _utilities.lazy_import('pulumi_azure_native.batch.v20170901') v20181201 = _utilities.lazy_import('pulumi_azure_native.batch.v20181201') v20190401 = _utilities.lazy_import('pulumi_azure_native.batch.v20190401') v20190801 = _utilities.lazy_import('pulumi_azure_native.batch.v20190801') v20200301 = _utilities.lazy_import('pulumi_azure_native.batch.v20200301') v20200501 = _utilities.lazy_import('pulumi_azure_native.batch.v20200501') v20200901 = _utilities.lazy_import('pulumi_azure_native.batch.v20200901') v20210101 = _utilities.lazy_import('pulumi_azure_native.batch.v20210101') v20210601 = _utilities.lazy_import('pulumi_azure_native.batch.v20210601')
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 26144, 35986, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760, 644, 345, 389, 1804, 0, 17202, ...
2.536178
1,078
from setuptools import setup, find_packages __name__ = "appJar" __version__ = "0.94.0" __author__ = "Richard Jarvis" __desc__ = "An easy-to-use, feature-rich GUI wrapper for tKinter. Designed specifically for use in the classroom, but powerful enough to be used anywhere." __author_email__ = "info@appjar.info" __license__ = "Apache 2.0" __url__ = "http://appJar.info" __keywords__ = ["python", "gui", "tkinter", "appJar", "interface"] __packages__= ["appJar"] __classifiers__ = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Intended Audience :: Education', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Topic :: Education', 'Topic :: Software Development', 'Topic :: Software Development :: User Interfaces', 'Topic :: Software Development :: Libraries :: Python Modules', 'License :: OSI Approved :: Apache Software License', ] __long_description__ = """# appJar Simple tKinter GUIs in Python. """ setup( name=__name__, packages=__packages__, version=__version__, description=__desc__, long_description=__long_description__, long_description_content_type="text/markdown", author=__author__, author_email=__author_email__, url=__url__, keywords=__keywords__, license=__license__, classifiers=__classifiers__, package_data = { "appJar": ["lib/*.py", "lib/*.txt", "lib/tkdnd2.8/*.tcl", "lib/tkdnd2.8/tcl_files/*.tcl", "lib/tkdnd2.8/tcl_libs/*", "resources/icons/*", "examples/showcase.py", "PYPI.md"] } )
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 834, 3672, 834, 796, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 1324, 47511, 1, 198, 834, 9641, 834, 796, 220, 220, 220, 220, 220, 220, 366, 15, 13, 5824, ...
2.647143
700
import shapefile
[ 11748, 5485, 7753, 198 ]
4.25
4
# Copyright 2016-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import torch, glob, os from .sparseConvNetTensor import SparseConvNetTensor from .metadata import Metadata import sparseconvnet as scn import pdb
[ 2, 15069, 1584, 12, 25579, 11, 3203, 11, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 347, 10305, 12, 7635, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619,...
3.545455
99
# import numpy as np #create numpy arrays # #Generate array height=np.round(np.random.normal(1.75,0.20,5000),2) weight=np.round(np.random.normal(60.32,15,5000),2) np_city=np.column_stack((height,weight)) print(np_city.shape) cars=["Toyota","Chevrolet","Ford","Honda","Brabus"] cars_np=np.array(cars) weight=[20.12,20.12,20.12,20.12,20.12,20.12,20.12,20.12,20.12,20.12,20.12,23,23,23,23,23,23,23,23,23,23,23,23,23, 23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23, 23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23, 23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23, 23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23] baseball=[[74, 180], [74, 215], [72, 210], [72, 210], [73, 188], [69, 176], [69, 209], [71, 200], [76, 231], [71, 180], [73, 188], [73, 180], [74, 185], [74, 160], [69, 180], [70, 185], [73, 189], [75, 185], [78, 219], [79, 230], [76, 205], [74, 230], [76, 195], [72, 180], [71, 192], [75, 225], [77, 203], [74, 195], [73, 182], [74, 188], [78, 200], [73, 180], [75, 200], [73, 200], [75, 245], [75, 240], [74, 215], [69, 185], [71, 175], [74, 199], [73, 200], [73, 215], [76, 200], [74, 205], [74, 206], [70, 186], [72, 188], [77, 220], [74, 210], [70, 195], [73, 200], [75, 200], [76, 212], [76, 224], [78, 210], [74, 205], [74, 220], [76, 195], [77, 200], [81, 260], [78, 228], [75, 270], [77, 200], [75, 210], [76, 190], [74, 220], [72, 180], [72, 205], [75, 210], [73, 220], [73, 211], [73, 200], [70, 180], [70, 190], [70, 170], [76, 230], [68, 155], [71, 185], [72, 185], [75, 200], [75, 225], [75, 225], [75, 220], [68, 160], [74, 205], [78, 235], [71, 250], [73, 210], [76, 190], [74, 160], [74, 200], [79, 205], [75, 222], [73, 195], [76, 205], [74, 220], [74, 220], [73, 170], [72, 185], [74, 195], [73, 220], [74, 230], [72, 180], [73, 220], [69, 180], [72, 180], [73, 170], [75, 210], [75, 215], [73, 200], [72, 213], [72, 180], [76, 192], [74, 235], [72, 185], [77, 235], [74, 210], [77, 222], [75, 210], [76, 230], [80, 220], [74, 180], [74, 190], [75, 200], [78, 210], [73, 194], [73, 180], [74, 190], [75, 240], [76, 200], [71, 198], [73, 200], [74, 195], [76, 210], [76, 220], [74, 190], [73, 210], [74, 225], [70, 180], [72, 185], [73, 170], [73, 185], [73, 185], [73, 180], [71, 178], [74, 175], [74, 200], [72, 204], [74, 211], [71, 190], [74, 210], [73, 190], [75, 190], [75, 185], [79, 290], [73, 175], [75, 185], [76, 200], [74, 220], [76, 170], [78, 220], [74, 190], [76, 220], [72, 205], [74, 200], [76, 250], [74, 225], [75, 215], [78, 210], [75, 215], [72, 195], [74, 200], [72, 194], [74, 220], [70, 180], [71, 180], [70, 170], [75, 195], [71, 180], [71, 170], [73, 206], [72, 205], [71, 200], [73, 225], [72, 201], [75, 225], [74, 233], [74, 180], [75, 225], [73, 180], [77, 220], [73, 180], [76, 237], [75, 215], [74, 190], [76, 235], [75, 190], [73, 180], [71, 165], [76, 195], [75, 200], [72, 190], [71, 190], [77, 185], [73, 185], [74, 205], [71, 190], [72, 205], [74, 206], [75, 220], [73, 208], [72, 170], [75, 195], [75, 210], [74, 190], [72, 211], [74, 230], [71, 170], [70, 185], [74, 185], [77, 241], [77, 225], [75, 210], [75, 175], [78, 230], [75, 200], [76, 215], [73, 198], [75, 226], [75, 278], [79, 215], [77, 230], [76, 240], [71, 184], [75, 219], [74, 170], [69, 218], [71, 190], [76, 225], [72, 220], [72, 176], [70, 190], [72, 197], [73, 204], [71, 167], [72, 180], [71, 195], [73, 220], [72, 215], [73, 185], [74, 190], [74, 205], [72, 205], [75, 200], [74, 210], [74, 215], [77, 200], [75, 205], [73, 211], [72, 190], [71, 208], [74, 200], [77, 210], [75, 232], [75, 230], [75, 210], [78, 220], [78, 210], [74, 202], [76, 212], [78, 225], [76, 170], [70, 190], [72, 200], [80, 237], [74, 220], [74, 170], [71, 193], [70, 190], [72, 150], [71, 220], [74, 200], [71, 190], [72, 185], [71, 185], [74, 200], [69, 172], [76, 220], [75, 225], [75, 190], [76, 195], [73, 219], [76, 190], [73, 197], [77, 200], [73, 195], [72, 210], [72, 177], [77, 220], [77, 235], [71, 180], [74, 195], [74, 195], [73, 190], [78, 230], [75, 190], [73, 200], [70, 190], [74, 190], [72, 200], [73, 200], [73, 184], [75, 200], [75, 180], [74, 219], [76, 187], [73, 200], [74, 220], [75, 205], [75, 190], [72, 170], [73, 160], [73, 215], [72, 175], [74, 205], [78, 200], [76, 214], [73, 200], [74, 190], [75, 180], [70, 205], [75, 220], [71, 190], [72, 215], [78, 235], [75, 191], [73, 200], [73, 181], [71, 200], [75, 210], [77, 240], [72, 185], [69, 165], [73, 190], [74, 185], [72, 175], [70, 155], [75, 210], [70, 170], [72, 175], [72, 220], [74, 210], [73, 205], [74, 200], [76, 205], [75, 195], [80, 240], [72, 150], [75, 200], [73, 215], [74, 202], [74, 200], [73, 190], [75, 205], [75, 190], [71, 160], [73, 215], [75, 185], [74, 200], [74, 190], [72, 210], [74, 185], [74, 220], [74, 190], [73, 202], [76, 205], [75, 220], [72, 175], [73, 160], [73, 190], [73, 200], [72, 229], [72, 206], [72, 220], [72, 180], [71, 195], [75, 175], [75, 188], [74, 230], [73, 190], [75, 200], [79, 190], [74, 219], [76, 235], [73, 180], [74, 180], [74, 180], [72, 200], [74, 234], [74, 185], [75, 220], [78, 223], [74, 200], [74, 210], [74, 200], [77, 210], [70, 190], [73, 177], [74, 227], [73, 180], [71, 195], [75, 199], [71, 175], [72, 185], [77, 240], [74, 210], [70, 180], [77, 194], [73, 225], [72, 180], [76, 205], [71, 193], [76, 230], [78, 230], [75, 220], [73, 200], [78, 249], [74, 190], [79, 208], [75, 245], [76, 250], [72, 160], [75, 192], [75, 220], [70, 170], [72, 197], [70, 155], [74, 190], [71, 200], [76, 220], [73, 210], [76, 228], [71, 190], [69, 160], [72, 184], [72, 180], [69, 180], [73, 200], [69, 176], [73, 160], [74, 222], [74, 211], [72, 195], [71, 200], [72, 175], [72, 206], [76, 240], [76, 185], [76, 260], [74, 185], [76, 221], [75, 205], [71, 200], [72, 170], [71, 201], [73, 205], [75, 185], [76, 205], [75, 245], [71, 220], [75, 210], [74, 220], [72, 185], [73, 175], [73, 170], [73, 180], [73, 200], [76, 210], [72, 175], [76, 220], [73, 206], [73, 180], [73, 210], [75, 195], [75, 200], [77, 200], [73, 164], [72, 180], [75, 220], [70, 195], [74, 205], [72, 170], [80, 240], [71, 210], [71, 195], [74, 200], [74, 205], [73, 192], [75, 190], [76, 170], [73, 240], [77, 200], [72, 205], [73, 175], [77, 250], [76, 220], [71, 224], [75, 210], [73, 195], [74, 180], [77, 245], [71, 175], [72, 180], [73, 215], [69, 175], [73, 180], [70, 195], [74, 230], [76, 230], [73, 205], [73, 215], [75, 195], [73, 180], [79, 205], [74, 180], [73, 190], [74, 180], [77, 190], [75, 190], [74, 220], [73, 210], [77, 255], [73, 190], [77, 230], [74, 200], [74, 205], [73, 210], [77, 225], [74, 215], [77, 220], [75, 205], [77, 200], [75, 220], [71, 197], [74, 225], [70, 187], [79, 245], [72, 185], [72, 185], [70, 175], [74, 200], [74, 180], [72, 188], [73, 225], [72, 200], [74, 210], [74, 245], [76, 213], [82, 231], [74, 165], [74, 228], [70, 210], [73, 250], [73, 191], [74, 190], [77, 200], [72, 215], [76, 254], [73, 232], [73, 180], [72, 215], [74, 220], [74, 180], [71, 200], [72, 170], [75, 195], [74, 210], [74, 200], [77, 220], [70, 165], [71, 180], [73, 200], [76, 200], [71, 170], [75, 224], [74, 220], [72, 180], [76, 198], [79, 240], [76, 239], [73, 185], [76, 210], [78, 220], [75, 200], [76, 195], [72, 220], [72, 230], [73, 170], [73, 220], [75, 230], [71, 165], [76, 205], [70, 192], [75, 210], [74, 205], [75, 200], [73, 210], [71, 185], [71, 195], [72, 202], [73, 205], [73, 195], [72, 180], [69, 200], [73, 185], [78, 240], [71, 185], [73, 220], [75, 205], [76, 205], [70, 180], [74, 201], [77, 190], [75, 208], [79, 240], [72, 180], [77, 230], [73, 195], [75, 215], [75, 190], [75, 195], [73, 215], [73, 215], [76, 220], [77, 220], [75, 230], [70, 195], [71, 190], [71, 195], [75, 209], [74, 204], [69, 170], [70, 185], [75, 205], [72, 175], [75, 210], [73, 190], [72, 180], [72, 180], [72, 160], [76, 235], [75, 200], [74, 210], [69, 180], [73, 190], [72, 197], [72, 203], [75, 205], [77, 170], [76, 200], [80, 250], [77, 200], [76, 220], [79, 200], [71, 190], [75, 170], [73, 190], [76, 220], [77, 215], [73, 206], [76, 215], [70, 185], [75, 235], [73, 188], [75, 230], [70, 195], [69, 168], [71, 190], [72, 160], [72, 200], [73, 200], [70, 189], [70, 180], [73, 190], [76, 200], [75, 220], [72, 187], [73, 240], [79, 190], [71, 180], [72, 185], [74, 210], [74, 220], [74, 219], [72, 190], [76, 193], [76, 175], [72, 180], [72, 215], [71, 210], [72, 200], [72, 190], [70, 185], [77, 220], [74, 170], [72, 195], [76, 205], [71, 195], [76, 210], [71, 190], [73, 190], [70, 180], [73, 220], [73, 190], [72, 186], [71, 185], [71, 190], [71, 180], [72, 190], [72, 170], [74, 210], [74, 240], [74, 220], [71, 180], [72, 210], [75, 210], [72, 195], [71, 160], [72, 180], [72, 205], [72, 200], [72, 185], [74, 245], [74, 190], [77, 210], [75, 200], [73, 200], [75, 222], [73, 215], [76, 240], [72, 170], [77, 220], [75, 156], [72, 190], [71, 202], [71, 221], [75, 200], [72, 190], [73, 210], [73, 190], [71, 200], [70, 165], [75, 190], [71, 185], [76, 230], [73, 208], [68, 209], [71, 175], [72, 180], [74, 200], [77, 205], [72, 200], [76, 250], [78, 210], [81, 230], [72, 244], [73, 202], [76, 240], [72, 200], [72, 215], [74, 177], [76, 210], [73, 170], [76, 215], [75, 217], [70, 198], [71, 200], [74, 220], [72, 170], [73, 200], [76, 230], [76, 231], [73, 183], [71, 192], [68, 167], [71, 190], [71, 180], [74, 180], [77, 215], [69, 160], [72, 205], [76, 223], [75, 175], [76, 170], [75, 190], [76, 240], [72, 175], [74, 230], [76, 223], [74, 196], [72, 167], [75, 195], [78, 190], [77, 250], [70, 190], [72, 190], [79, 190], [74, 170], [71, 160], [68, 150], [77, 225], [75, 220], [71, 209], [72, 210], [70, 176], [72, 260], [72, 195], [73, 190], [72, 184], [74, 180], [72, 195], [72, 195], [75, 219], [72, 225], [73, 212], [74, 202], [72, 185], [78, 200], [75, 209], [72, 200], [74, 195], [75, 228], [75, 210], [76, 190], [74, 212], [74, 190], [73, 218], [74, 220], [71, 190], [74, 235], [75, 210], [76, 200], [74, 188], [76, 210], [76, 235], [73, 188], [75, 215], [75, 216], [74, 220], [68, 180], [72, 185], [75, 200], [71, 210], [70, 220], [72, 185], [73, 231], [72, 210], [75, 195], [74, 200], [70, 205], [76, 200], [71, 190], [82, 250], [72, 185], [73, 180], [74, 170], [71, 180], [75, 208], [77, 235], [72, 215], [74, 244], [72, 220], [73, 185], [78, 230], [77, 190], [73, 200], [73, 180], [73, 190], [73, 196], [73, 180], [76, 230], [75, 224], [70, 160], [73, 178], [72, 205], [73, 185], [75, 210], [74, 180], [73, 190], [73, 200], [76, 257], [73, 190], [75, 220], [70, 165], [77, 205], [72, 200], [77, 208], [74, 185], [75, 215], [75, 170], [75, 235], [75, 210], [72, 170], [74, 180], [71, 170], [76, 190], [71, 150], [75, 230], [76, 203], [83, 260], [75, 246], [74, 186], [76, 210], [72, 198], [72, 210], [75, 215], [75, 180], [72, 200], [77, 245], [73, 200], [72, 192], [70, 192], [74, 200], [72, 192], [74, 205], [72, 190], [71, 186], [70, 170], [71, 197], [76, 219], [74, 200], [76, 220], [74, 207], [74, 225], [74, 207], [75, 212], [75, 225], [71, 170], [71, 190], [74, 210], [77, 230], [71, 210], [74, 200], [75, 238], [77, 234], [76, 222], [74, 200], [76, 190], [72, 170], [71, 220], [72, 223], [75, 210], [73, 215], [68, 196], [72, 175], [69, 175], [73, 189], [73, 205], [75, 210], [70, 180], [70, 180], [74, 197], [75, 220], [74, 228], [74, 190], [73, 204], [74, 165], [75, 216], [77, 220], [73, 208], [74, 210], [76, 215], [74, 195], [75, 200], [73, 215], [76, 229], [78, 240], [75, 207], [73, 205], [77, 208], [74, 185], [72, 190], [74, 170], [72, 208], [71, 225], [73, 190], [75, 225], [73, 185], [67, 180], [67, 165], [76, 240], [74, 220], [73, 212], [70, 163], [75, 215], [70, 175], [72, 205], [77, 210], [79, 205], [78, 208], [74, 215], [75, 180], [75, 200], [78, 230], [76, 211], [75, 230], [69, 190], [75, 220], [72, 180], [75, 205], [73, 190], [74, 180], [75, 205], [75, 190], [73, 195]] weight_np=np.array(weight) #print(type(weight_np)) #print(weight_np) light=weight_np < 21 lowweight=weight_np[light] print(lowweight) np_baseball=np.array(baseball) print(np_baseball.shape) #Basic Operations on numpy arrays # #Statistical Operations on numpy arrays # # np_baseball is available # Print mean height (first column) avg = np.mean(np_baseball[:,0]) print("Average: " + str(avg)) # Print median height. Replace 'None' med = np.median(np_baseball[:,0]) print("Median: " + str(med)) # Print out the standard deviation on height. Replace 'None' stddev = np.std(np_baseball[:,0]) print("Standard Deviation: " + str(stddev)) # Print out correlation between first and second column. Replace 'None' corr = np.corrcoef(np_baseball[:,0],np_baseball[:,1]) print("Correlation: " + str(corr))
[ 2, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 17953, 299, 32152, 26515, 198, 2, 198, 198, 2, 8645, 378, 7177, 198, 17015, 28, 37659, 13, 744, 7, 37659, 13, 25120, 13, 11265, 7, 16, 13, 2425, 11, 15, 13, 1238, 11, 2764...
2.167808
5,989
# # Copyright (c) 2017-2018 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # from sysinv.common import constants from sysinv.common import utils from sysinv.helm import helm from sysinv.puppet import openstack
[ 2, 198, 2, 15069, 357, 66, 8, 2177, 12, 7908, 3086, 5866, 11998, 11, 3457, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 198, 198, 6738, 25064, 16340, 13, 11321, 1330, 38491, 198, ...
3.164384
73
from data import * from heapq import * if __name__ == '__main__': q=Timeline() d = Drone(0,0,100) q.addEvent(Event(d,0,"load")) q.addEvent(Event(d,0,"load")) q.addEvent(Event(d,0,"load")) q.addEvent(Event(d,1,"load")) q.addEvent(Event(d,1,"load")) q.addEvent(Event(d,2,"load")) q.addEvent(Event(d,2,"load")) while not q.isEmpty(): print q.nextEvents() print ""
[ 6738, 1366, 1330, 1635, 220, 198, 6738, 24575, 80, 1330, 1635, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 197, 80, 28, 14967, 4470, 3419, 198, 197, 67, 796, 38959, 7, 15, 11, 15, 11, 3064, 8, 198, 197...
2.22093
172
import json from django.core.exceptions import ObjectDoesNotExist from django.db import transaction from treebeard.mp_tree import MP_Node try: from wagtail.core.blocks import StreamValue except ImportError: # pragma: no cover; fallback for Wagtail < 2.0 from wagtail.wagtailcore.blocks import StreamValue def is_page(page_or_revision): """ Return True if the page_or_revision is a Page object """ return not hasattr(page_or_revision, 'content_json') def get_stream_data(page_or_revision, field_name): """ Get the stream field data for a given field name on a page or a revision """ if is_page(page_or_revision): field = getattr(page_or_revision, field_name) return field.stream_data else: revision_content = json.loads(page_or_revision.content_json) field = revision_content.get(field_name, "[]") return json.loads(field) def set_stream_data(page_or_revision, field_name, stream_data, commit=True): """ Set the stream field data for a given field name on a page or a revision. If commit is True (default) save() is called on the page_or_revision object. """ if is_page(page_or_revision): field = getattr(page_or_revision, field_name) stream_block = field.stream_block stream_value = StreamValue(stream_block, stream_data, is_lazy=True) setattr(page_or_revision, field_name, stream_value) else: revision_content = json.loads(page_or_revision.content_json) revision_content[field_name] = json.dumps(stream_data) page_or_revision.content_json = json.dumps(revision_content) if commit: page_or_revision.save() def migrate_stream_data(page_or_revision, block_path, stream_data, mapper): """ Recursively run the mapper on fields of block_type in stream_data """ migrated = False if isinstance(block_path, str): block_path = [block_path, ] if len(block_path) == 0: return stream_data, False # Separate out the current block name from its child paths block_name = block_path[0] child_block_path = block_path[1:] for field in stream_data: if field['type'] == block_name: if len(child_block_path) == 0: value = mapper(page_or_revision, field['value']) field_migrated = True else: value, field_migrated = migrate_stream_data( page_or_revision, child_block_path, field['value'], mapper ) if field_migrated: field['value'] = value migrated = True return stream_data, migrated def migrate_stream_field(page_or_revision, field_name, block_path, mapper): """ Run mapper on blocks within a StreamField on a page or revision. """ stream_data = get_stream_data(page_or_revision, field_name) stream_data, migrated = migrate_stream_data( page_or_revision, block_path, stream_data, mapper ) if migrated: set_stream_data(page_or_revision, field_name, stream_data)
[ 11748, 33918, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 9515, 13921, 3673, 3109, 396, 198, 6738, 42625, 14208, 13, 9945, 1330, 8611, 198, 198, 6738, 5509, 39433, 13, 3149, 62, 21048, 1330, 4904, 62, 19667, 628, 198,...
2.507742
1,227
from typing import Dict _codes: Dict[int, str] = { # Debug (1xxxx) # System (100xx) 10000: 'Test debug', # Pipe (103xx) 10301: 'Reindexing parser', # Resolver (109xx) 10901: 'Executing catalog', 10902: 'Executing target', 10903: 'Catalog executed', 10904: 'Target executed', # SubProvider (113xx) 11301: 'Common exception while sending request', # Information (2xxxx) # System (200xx) 20000: 'Test information', 20001: 'Thread started', 20002: 'Thread paused', 20003: 'Thread resumed', 20004: 'Thread closing', 20005: 'Thread closed', # Core (201xx) 20101: 'Production mode enabled', 20102: 'Signal Interrupt', 20103: 'Turning off', 20104: 'Saving success hashes started', 20105: 'Saving success hashes complete', 20106: 'Offline', # ThreadManager (202xx) 20201: 'Pipe initialized', 20202: 'Pipe started', 20203: 'Worker initialized', 20204: 'Worker started', 20205: 'CatalogWorker initialized', 20206: 'CatalogWorker started', # Pipe (203xx) 20301: 'Reindexing parsers started', 20302: 'Reindexing parsers complete', 20303: 'Parser reindexing complete', # ScriptManager (205xx) 20501: 'Script loaded', 20502: 'Script unloaded', 20503: 'Script reloaded', 20504: 'Loading all indexed scripts', 20505: 'Loading all indexed scripts complete', 20506: 'Unloading all scripts', 20507: 'Unloading all scripts complete', 20508: 'Reloading all scripts', 20509: 'Reloading all scripts complete', # ScriptIndex (206xx) 20601: 'Config loaded', 20602: 'Config dumped', 20603: 'Config does not loaded (must be dict)', 20604: 'Skipping script (config not detected)', 20605: 'Skipping script (bad config)', 20606: 'Skipping script (script incompatible with core)', 20607: 'Skipping script (script in blacklist)', 20608: 'Skipping script (script with this name is already indexed)', 20609: 'N script(s) indexed', 20610: 'Skipping config (script not in whitelist)', # EventHandler (207xx) 20701: 'Starting loop', 20702: 'Loop started', 20703: 'Stopping loop', 20704: 'Loop stopped', # Logger (208xx) 20801: 'Log level changed', 20802: 'Log mode changed', 20803: 'Time changed to UTC', 20804: 'Time changed to local', # Resolver (209xx) 20901: 'Successful target execution', 20902: 'Catalog updated', # Commands (211xx) 21101: 'Command executing', 21102: 'Command executed', 21103: 'Command execute', # Provider (212xx) 21201: 'Proxies dumped', 21202: 'Checking proxy', 21203: 'Checking proxy (OK)', # Keywords (215xx) 21501: 'Dumping keywords(started)', 21502: 'Dumping keywords(complete)', 21503: 'Clearing keywords(started)', 21504: 'Clearing keywords(complete)', 21505: 'Syncing keywords(started)', 21506: 'Syncing keywords(complete)', 21507: 'Loading keywords(started)', 21508: 'Loading keywords(complete)', # Warning (3xxxx) # System (300xx) 30000: 'Test warning', # ThreadManager (302xx) 30201: 'Pipe was stopped', 30202: 'Worker was stopped', 30203: 'CatalogWorker was stopped', 30204: 'Lock forced released', # Pipe (303xx) 30301: 'Parser reindexing failed', 30302: 'Catalog lost while sending (queue full)', 30303: 'Target lost while sending (queue full)', # ScriptManager (305xx) 30501: 'Module not loaded', 30502: 'Nothing to import in script', 30503: 'Script cannot be unloaded (_unload)', 30504: 'Script cannot be unloaded (_reload)', 30505: 'Script not indexed but still loaded', 30506: 'Script already loaded', 30507: 'Max errors for script reached, unloading', # EventHandler (307xx) 30701: 'Loop already started', 30702: 'Loop already stopped', # Logger (308xx) 30801: 'Meaningless level change (changing to the same value)', 30802: 'Meaningless mode change (changing to the same value)', 30803: 'Meaningless time change (changing to the same value)', # Resolver (309xx) 30901: 'Catalog lost while retrieving (script not loaded)', 30902: 'Catalog lost while retrieving (script has no Parser)', 30903: 'Target lost while retrieving (script not loaded)', 30904: 'Target lost while retrieving (script has no Parser)', 30905: 'Catalog lost while executing (script unloaded)', 30906: 'Catalog lost while executing (script has no parser)', 30907: 'Catalog lost while executing (bad result)', 30908: 'Target lost while executing (script unloaded)', 30909: 'Target lost while executing (script has no parser)', 30910: 'Target lost while executing (bad result)', 30911: 'Smart catalog expired', 30912: 'Smart target expired', # Provider (312xx) 31201: 'Proxy added', 31202: 'Proxy removed', 31203: 'Proxies list changed', 31204: 'Proxies statistics reset', 31205: 'Proxies list cleared', # Keywords (315xx) 31501: 'Keywords file not found', 31511: 'Absolute keyword not loaded (TypeError)', 31512: 'Absolute keyword not loaded (UniquenessError)', 31521: 'Positive keyword not loaded (TypeError)', 31522: 'Positive keyword not loaded (UniquenessError)', 31531: 'Negative keyword not loaded (TypeError)', 31532: 'Negative keyword not loaded (UniquenessError)', # Error (4xxxx) # System (400xx) 40000: 'Unknown error', # ThreadManager (402xx) 40201: 'Pipe was unexpectedly stopped', 40202: 'Worker was unexpectedly stopped', 40203: 'CatalogWorker was unexpectedly stopped', # Pipe (403xx) 40301: 'Wrong catalog received from script', # Worker (404xx) 40401: 'Unknown status received while executing', 40402: 'Parser execution failed', 40403: 'Target lost in pipeline (script unloaded)', # ScriptsManager (405xx) 40501: 'Can\'t load script (ImportError)', 40502: 'Can\'t load script (script not indexed)', 40503: 'Can\'t unload script (script isn\'t loaded)', 40504: 'Can\'t reload script (script isn\'t loaded)', 40505: 'Script cannot be reloaded (folder not found)', 40506: 'Script cannot be reloaded (script not in index)', # EventHandler (407xx) 40701: 'Event execution failed', # Logger (408xx) 40801: 'Can\'t change level (possible values (0, 1, 2, 3, 4, 5))', 40802: 'Can\'t change mode (possible values (0, 1, 2, 3))', # Resolver (409xx) 40901: 'Unknown index type (while inserting)', 40902: 'Unknown target type (while inserting)', 40903: 'Catalog execution failed', 40904: 'Target execution failed', # Provider (412xx) 41201: 'Bad proxy', 41202: 'Checking proxy (FAILED)', # SubProvider (413xx) 41301: 'Severe exception while sending request', # Keywords (415xx) 41501: 'Loading keywords (Failed)', # Fatal (5xxxx) # System (500xx) 50000: 'Test fatal', # Core (501xx) 50101: 'ThreadManager unexpectedly has turned off', # ThreadManager (502xx) 50201: 'Exception raised, emergency stop initiated', # Pipe (503xx) 50301: 'Unexpectedly has turned off', # Worker (504xx) 50401: 'Unexpectedly has turned off', # CatalogWorker (510xx) 51001: 'Unexpectedly has turned off', # RemoteThread (514xx) 51401: 'Unknown fatal error' }
[ 6738, 19720, 1330, 360, 713, 198, 198, 62, 40148, 25, 360, 713, 58, 600, 11, 965, 60, 796, 1391, 198, 220, 220, 220, 1303, 31687, 357, 16, 12343, 8, 198, 220, 220, 220, 1303, 4482, 357, 3064, 5324, 8, 198, 220, 220, 220, 33028, ...
2.777902
2,679
# Erstellt aus vielen TIFF Datei eine stacked Datei mit dem ArcGIS # Tool composite bands import arcpy import os arcpy.env.overwriteOutput = True # Ueberschreiben fuer ArcGIS aktivieren arcpy.env.pyramid = "NONE" # Verhindert dass Pyramiden berechnet werden arcpy.env.rasterStatistics = "NONE" # Verhindert dass Statistiken berechnet werden inFol = "D:/Test/NDVI_tif/" outFol = "D:/Test/NDVI_file/" month = ("jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec") half = ("a", "b") datList = "" for i in range(1981,2013): iStr = str(i)[2:4] for ii in month: for iii in half: datName = inFol + "geo" + iStr + ii + "15" + iii + ".tif" datList = datList + ";" + datName datList = datList [1:] #Da sonst datList mit einem ; beginnt arcpy.CompositeBands_management(datList, outFol + "NDVIstack.tif") #compRas.save(outFol + "NDVIstack.tif")
[ 2, 5256, 301, 695, 83, 257, 385, 410, 8207, 268, 309, 29267, 7536, 72, 304, 500, 24167, 7536, 72, 10255, 1357, 10173, 38, 1797, 198, 2, 16984, 24185, 11760, 198, 198, 11748, 10389, 9078, 198, 11748, 28686, 198, 198, 5605, 9078, 13, ...
2.236277
419
from collections import OrderedDict from unittest import TestCase from frozenordereddict import FrozenOrderedDict
[ 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 12912, 24071, 11600, 1330, 23673, 35422, 1068, 35, 713, 628, 628, 628, 198 ]
3.903226
31
import random import unittest from serial.serialutil import SerialException from data_gateway.dummy_serial import DummySerial, constants, exceptions, random_bytes, random_string from tests.base import BaseTestCase if __name__ == "__main__": unittest.main()
[ 11748, 4738, 198, 11748, 555, 715, 395, 198, 198, 6738, 11389, 13, 46911, 22602, 1330, 23283, 16922, 198, 198, 6738, 1366, 62, 10494, 1014, 13, 67, 13513, 62, 46911, 1330, 360, 13513, 32634, 11, 38491, 11, 13269, 11, 4738, 62, 33661, ...
3.410256
78
# -*- coding: utf-8 -*- r""" speaklater ~~~~~~~~~~ A module that provides lazy strings for translations. Basically you get an object that appears to be a string but changes the value every time the value is evaluated based on a callable you provide. For example you can have a global `lazy_gettext` function that returns a lazy string with the value of the current set language. Example: >>> from speaklater import make_lazy_string >>> sval = u'Hello World' >>> string = make_lazy_string(lambda: sval) This lazy string will evaluate to the value of the `sval` variable. >>> string lu'Hello World' >>> unicode(string) u'Hello World' >>> string.upper() u'HELLO WORLD' If you change the value, the lazy string will change as well: >>> sval = u'Hallo Welt' >>> string.upper() u'HALLO WELT' This is especially handy when combined with a thread local and gettext translations or dicts of translatable strings: >>> from speaklater import make_lazy_gettext >>> from threading import local >>> l = local() >>> l.translations = {u'Yes': 'Ja'} >>> lazy_gettext = make_lazy_gettext(lambda: l.translations.get) >>> yes = lazy_gettext(u'Yes') >>> print yes Ja >>> l.translations[u'Yes'] = u'Si' >>> print yes Si Lazy strings are no real strings so if you pass this sort of string to a function that performs an instance check, it will fail. In that case you have to explicitly convert it with `unicode` and/or `string` depending on what string type the lazy string encapsulates. To check if a string is lazy, you can use the `is_lazy_string` function: >>> from speaklater import is_lazy_string >>> is_lazy_string(u'yes') False >>> is_lazy_string(yes) True New in version 1.2: It's now also possible to pass keyword arguments to the callback used with `make_lazy_string`. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ def is_lazy_string(obj): """Checks if the given object is a lazy string.""" return isinstance(obj, _LazyString) def make_lazy_string(__func, *args, **kwargs): """Creates a lazy string by invoking func with args.""" return _LazyString(__func, args, kwargs) def make_lazy_gettext(lookup_func): """Creates a lazy gettext function dispatches to a gettext function as returned by `lookup_func`. Example: >>> translations = {u'Yes': u'Ja'} >>> lazy_gettext = make_lazy_gettext(lambda: translations.get) >>> x = lazy_gettext(u'Yes') >>> x lu'Ja' >>> translations[u'Yes'] = u'Si' >>> x lu'Si' """ return lazy_gettext if __name__ == '__main__': import doctest doctest.testmod()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 81, 37811, 198, 220, 220, 220, 2740, 36760, 198, 220, 220, 220, 220, 15116, 4907, 628, 220, 220, 220, 317, 8265, 326, 3769, 16931, 13042, 329, 25231, 13, 220, 20759, 3...
2.80658
1,003
import unittest import numpy as np from graph import Graph if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 4823, 1330, 29681, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.707317
41
cumle = input("Cumlenizi giriniz : ") print("Cumlenizdeki kelime sayisi = {}".format(kelime_sayisi(cumle)))
[ 198, 36340, 293, 796, 5128, 7203, 34, 388, 11925, 528, 72, 37370, 259, 528, 1058, 366, 8, 198, 4798, 7203, 34, 388, 11925, 528, 67, 39548, 885, 27299, 910, 23267, 796, 23884, 1911, 18982, 7, 7750, 524, 62, 16706, 23267, 7, 36340, 29...
2.454545
44
import MySQLdb
[ 11748, 33476, 9945, 628 ]
4
4
############################################################################### # Copyright (c) 2019 Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory # # Written by M. Monterial, K. Nelson # monterial1@llnl.gov # # LLNL-CODE-805904 # # All rights reserved. # # 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, sublicense, and/or sell copies # of the Software, and to permit persons to whom the Software is furnished to do # so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED,INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ############################################################################### ''' Module for handling the results of identification. @author monterial1 ''' from typing import List from collections import UserList import textwrap from ._architecture import NuclideResult, Serializable from ._reader import registerReader __all__ = ["NuclideResultList"] def loadNuclideResult(context, element): """ Loads in a nuclide result """ out = NuclideResult(nuclide=None, score=None, prediction=None) for node in element.childNodes: # skip all but elements if node.nodeType != node.ELEMENT_NODE: continue if node.tagName == "nuclide": out.nuclide = str(node.firstChild.nodeValue) continue if node.tagName == "score": out.score = float(node.firstChild.nodeValue) continue if node.tagName == "prediction": out.prediction = int(node.firstChild.nodeValue) continue context.raiseElementError(element, node) return out def loadNuclideResultList(context, element): """ Loads a list of nuclide results """ out = NuclideResultList() for node in element.childNodes: # skip all but elements if node.nodeType != node.ELEMENT_NODE: continue if node.tagName == "NuclideResult": out.addTemplate(loadNuclideResult(context, node)) continue context.raiseElementError(element, node) return out registerReader("NuclideResult", loadNuclideResult) registerReader("NuclideResultList", loadNuclideResultList)
[ 29113, 29113, 7804, 4242, 21017, 198, 2, 15069, 357, 66, 8, 13130, 13914, 45036, 3549, 2351, 4765, 11, 11419, 13, 198, 2, 21522, 771, 379, 262, 13914, 45036, 3549, 2351, 18643, 198, 2, 198, 2, 22503, 416, 337, 13, 2892, 353, 498, 11...
3.07827
971
# -*- coding: utf-8 -*- """ Created on %(date)s @author: %Christian """ """ #BASE +BN #dropout0.15 """ import paddle import paddle.nn as nn import paddle.nn.functional as F import paddlenlp as ppnlp
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 4064, 7, 4475, 8, 82, 201, 198, 201, 198, 31, 9800, 25, 4064, 20298, 201, 198, 37811, 201, 198, 201, 198, 37811, 201, 198, 2, 33, ...
2.19802
101
from functools import partialmethod import pandas as pd from sqlalchemy.orm import sessionmaker from sqlalchemy import create_engine import sqlite3 import click import json import pkg_resources from itertools import combinations from q2_mlab.db.schema import RegressionScore from q2_mlab.plotting.components import ( Mediator, ComponentMixin, Plottable, ButtonComponent, ScatterComponent, SegmentComponent, DataSourceComponent, SelectComponent, ) from bokeh.plotting import figure from bokeh.transform import factor_cmap from bokeh.models import ( ColumnDataSource, CheckboxButtonGroup, TextInput, Legend, LegendItem, ) from bokeh.models.widgets import ( Div, ) from bokeh.palettes import ( Category20, Set3, ) from bokeh.layouts import column, row from bokeh.server.server import Server groups = ['parameters_id', 'dataset', 'target', 'level', 'algorithm'] drop_cols = ['artifact_uuid', 'datetime', 'CV_IDX', 'id'] target_map = { 'age_v2': 'age', 'BL_AGE': 'age', 'age': 'age', 'bmi_v2': 'bmi', 'BMI': 'bmi', 'bmi': 'bmi' } with pkg_resources.resource_stream( __name__, "standard_deviations.json" ) as f: TARGET_SD = json.load(f) def _get_standardized_mae(df_row, norm_dict): """ """ mae = df_row['MAE'] target = df_row['target'] dataset = df_row['dataset'] cv_fold = df_row['CV_IDX'] level = df_row['level'] key = f"({dataset}, {target}, {level}, {cv_fold})" sd = norm_dict.get(key, 1) standardized_mae = mae / sd return standardized_mae def find_segments(group_stats, across, groupby): """ TODO makes some assumptions about the guarantees on pairs when there are more than 2 categories """ seg_cols = groupby.copy() seg_cols.remove(across) group_counts = group_stats[seg_cols + [across]].groupby(seg_cols).count() max_n_pairs = group_counts[across].max() category_values = group_stats[across].unique() where = (group_counts[across] == max_n_pairs) keep_repeats = group_stats.set_index(seg_cols).loc[where] keep_repeats_parts = [] for i, sub_group in enumerate(category_values): where = keep_repeats[across] == sub_group keep_repeats_parts.append(keep_repeats.loc[where]) keep_repeats_parts[i].columns = [col + '_' + sub_group for col in keep_repeats_parts[i].columns] segment_df = pd.concat(keep_repeats_parts, axis=1 ) return segment_df palettes = { 'Category20': Category20, 'Set3': Set3, } DEFAULTS = { 'segment_variable': 'dataset', 'x': 'MAE_mean', 'y': 'MAE_var', 'x_axis_type': 'log', 'y_axis_type': 'log', 'cmap': 'Category20' } def run_app(db, color_scheme): # thanks https://github.com/sqlalchemy/sqlalchemy/issues/4863 engine = create_engine("sqlite://", creator=connect) bkapp = AlgorithmScatter( DEFAULTS['x'], DEFAULTS['y'], engine=engine, cmap=palettes.get(color_scheme), ).plot().app server = Server({'/': bkapp}) server.start() server.io_loop.add_callback(server.show, "/") server.io_loop.start()
[ 6738, 1257, 310, 10141, 1330, 13027, 24396, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 6246, 10297, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 11748, 44161, 578, 18, 198, 11748, 390...
2.316239
1,404
import torch import torch.distributions as D #-------------------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------
[ 11748, 28034, 198, 11748, 28034, 13, 17080, 2455, 507, 355, 360, 198, 198, 2, 10097, 3880, 438, 198, 198, 2, 10097, 3880, 438, 198, 198, 2, 10097, 3880, 438, 198 ]
11.6
30
#!/usr/bin/python condition = 42 # IMPORTANT: colons, _indentation_ are significant! if condition: print "Condition is true!" elif True: # not 'true'! print "I said it's true! :)" else: print "Condition is false :(" # of course, elif/else are optional assert True == (not False) # Equivalent of `for (int i = 0; i < 13; i++) {` for i in range(0, 13): print i, # "," at the end means "no newline" print # newline while True: if condition == 42: break elif condition == 17: continue else: print "?"
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 31448, 796, 5433, 198, 198, 2, 30023, 9863, 8643, 25, 951, 684, 11, 4808, 521, 298, 341, 62, 389, 2383, 0, 198, 361, 4006, 25, 198, 220, 220, 220, 3601, 366, 48362, 318, 2081, 2474, ...
2.509009
222
#!/usr/bin/python # -*- coding: utf-8 -*- # provides functions for selecting a sample of training data from itertools import combinations, islice import blocking import core import numpy import logging import random import sys def findUncertainPairs(field_distances, data_model, bias=0.5): """ Given a set of field distances and a data model return the indices of the record pairs in order of uncertainty. For example, the first indices corresponds to the record pair where we have the least certainty whether the pair are duplicates or distinct. """ probability = core.scorePairs(field_distances, data_model) p_max = (1.0 - bias) logging.info(p_max) informativity = numpy.copy(probability) informativity[probability < p_max] /= p_max informativity[probability >= p_max] = (1 - probability[probability >= p_max])/(1-p_max) return numpy.argsort(-informativity) def activeLearning(candidates, data_model, labelPairFunction, training_data, training_pairs=None): """ Ask the user to label the record pair we are most uncertain of. Train the data model, and update our uncertainty. Repeat until user tells us she is finished. """ fields = [field for field in data_model['fields'] if data_model['fields'][field]['type'] not in ('Missing Data', 'Interaction', 'Higher Categories')] duplicates = [] nonduplicates = [] if training_pairs: nonduplicates.extend(training_pairs[0]) duplicates.extend(training_pairs[1]) if training_data.shape[0] == 0 : rand_int = random.randint(0, len(candidates)) exact_match = candidates[rand_int] training_data = addTrainingData({1:[exact_match]*2, 0:[]}, data_model, training_data) data_model = core.trainModel(training_data, data_model, .1) finished = False import time t_train = time.time() field_distances = core.fieldDistances(candidates, data_model) logging.info('calculated fieldDistances in %s seconds', str(time.time() - t_train)) seen_indices = set() while finished == False: logging.info('finding the next uncertain pair ...') uncertain_indices = findUncertainPairs(field_distances, data_model, (len(duplicates)/ (len(nonduplicates)+1.0))) for uncertain_index in uncertain_indices: if uncertain_index not in seen_indices: seen_indices.add(uncertain_index) break uncertain_pairs = [candidates[uncertain_index]] (labeled_pairs, finished) = labelPairFunction(uncertain_pairs, fields) nonduplicates.extend(labeled_pairs[0]) duplicates.extend(labeled_pairs[1]) training_data = addTrainingData(labeled_pairs, data_model, training_data) if len(training_data) > 0: data_model = core.trainModel(training_data, data_model, .1) else: raise ValueError('No training pairs given') training_pairs = {0: nonduplicates, 1: duplicates} return (training_data, training_pairs, data_model) def addTrainingData(labeled_pairs, data_model, training_data=[]): """ Appends training data to the training data collection. """ fields = data_model['fields'] examples = [record_pair for example in labeled_pairs.values() for record_pair in example] new_training_data = numpy.empty(len(examples), dtype=training_data.dtype) new_training_data['label'] = [0] * len(labeled_pairs[0]) + [1] * len(labeled_pairs[1]) new_training_data['distances'] = core.fieldDistances(examples, data_model) training_data = numpy.append(training_data, new_training_data) return training_data def consoleLabel(uncertain_pairs, fields): '''Command line interface for presenting and labeling training pairs by the user''' duplicates = [] nonduplicates = [] finished = False for record_pair in uncertain_pairs: label = '' for pair in record_pair: for field in fields: line = "%s : %s\n" % (field, pair[field]) sys.stderr.write(line) sys.stderr.write('\n') sys.stderr.write('Do these records refer to the same thing?\n') valid_response = False while not valid_response: sys.stderr.write('(y)es / (n)o / (u)nsure / (f)inished\n') label = sys.stdin.readline().strip() if label in ['y', 'n', 'u', 'f']: valid_response = True if label == 'y': duplicates.append(record_pair) elif label == 'n': nonduplicates.append(record_pair) elif label == 'f': sys.stderr.write('Finished labeling\n') finished = True break elif label != 'u': sys.stderr.write('Nonvalid response\n') raise return ({0: nonduplicates, 1: duplicates}, finished)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 3769, 5499, 329, 17246, 257, 6291, 286, 3047, 1366, 198, 198, 6738, 340, 861, 10141, 1330, 17790, 11, 318, 75, 501, ...
2.19766
2,479
list1 = [10,9,3,7,2,1,23,1,561,1,1,96,1] list1.sort(cmp = cmp1) print list1
[ 4868, 16, 796, 685, 940, 11, 24, 11, 18, 11, 22, 11, 17, 11, 16, 11, 1954, 11, 16, 11, 47915, 11, 16, 11, 16, 11, 4846, 11, 16, 60, 201, 198, 197, 197, 201, 198, 4868, 16, 13, 30619, 7, 48991, 796, 269, 3149, 16, 8, 201, ...
1.537037
54
from AIPS import AIPS from AIPSTask import AIPSTask from AIPSData import AIPSImage from ObitTask import ObitTask AIPS.userno = 103 image = AIPSImage('MANDELBROT', 'MANDL', 1, 1) mandl = AIPSTask('mandl') mandl.outdata = image mandl.imsize[1:] = [ 512, 512 ] mandl.go() try: template = ObitTask('Template') template.DataType = 'AIPS' template.inName = image.name template.inClass = image.klass template.inDisk = image.disk template.inSeq = image.seq template.go() finally: image.zap()
[ 6738, 9552, 3705, 1330, 9552, 3705, 198, 6738, 317, 4061, 2257, 2093, 1330, 317, 4061, 2257, 2093, 198, 6738, 9552, 3705, 6601, 1330, 9552, 3705, 5159, 198, 6738, 1835, 270, 25714, 1330, 1835, 270, 25714, 198, 198, 20185, 3705, 13, 385,...
2.47619
210
import bpy import bmesh import numpy from random import randint import time # pointsToVoxels() has been modified from the function generate_blocks() in https://github.com/cagcoach/BlenderPlot/blob/master/blendplot.py # Some changes to accomodate Blender 2.8's API changes were made, # and the function has been made much more efficient through creative usage of numpy. # Given a 3D array of 0 and 1's it'll place a voxel in every cell that has a 1 in it # place a voxel at a given position, using mesh.primitive_cube_add is really slow so it might be worth making this faster if __name__ == "__main__": # calculate the runtime of this script startTime = time.time() # createVoxel((1,2,3)) # Generate a 10*10*10 3D texture testImageArray = [] for x in range(10): yArray = [] for y in range(10): zArray = [] for z in range(10): zArray.append(0) # zArray.append(randint(0,1)) yArray.append(zArray) testImageArray.append(yArray) # print(testImageArray) # place voxels based on that 10*10*10 array imagesToVoxelsInefficient(testImageArray) # testImage = [[[0,0],[1,1]],[[1,1],[1,0]]] stopTime = time.time() print("Script took:",stopTime-startTime)
[ 11748, 275, 9078, 198, 11748, 275, 76, 5069, 198, 11748, 299, 32152, 198, 6738, 4738, 1330, 43720, 600, 220, 198, 11748, 640, 198, 198, 2, 2173, 2514, 53, 1140, 1424, 3419, 468, 587, 9518, 422, 262, 2163, 7716, 62, 27372, 3419, 287, ...
2.5
522
#!/usr/bin/python #-*-coding:utf-8-*- import json import sys import time # TBD: auto discovery # data_path = "/proc/fs/lustre/llite/nvmefs-ffff883f8a4f2800/stats" data_path = "/proc/fs/lustre/lmv/shnvme3-clilmv-ffff8859d3e2d000/md_stats" # use a dic1/dic2 to hold sampling data # put "next - prev" into delta # print a dictionary in the indented json format # calculate iops for each category except snapshot_time, all divided by snapshot_time if __name__ == '__main__': # dic1/dic2 are used to load prev/next kernel data interchangably # calc delta by doing: next - prev # calc iops by doing: delta/time_consumption dic1 = {} dic2 = {} delta = {} load_data(dic1) prev = 1 # load_data(dic2) # calc_delta(dic1, dic2, delta) # calc_iops_from_delta(delta) # print_dict(delta) # dic1['name'] = 'anhua' # print_dict(dic1) # enter loop while True: time.sleep(2) # TBD: configurable if prev == 1: load_data(dic2) prev = 2 calc_delta(dic1, dic2, delta) else: load_data(dic1) prev = 1 calc_delta(dic2, dic1, delta) calc_iops_from_delta(delta) print_dict(delta)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 220, 198, 2, 12, 9, 12, 66, 7656, 25, 40477, 12, 23, 12, 9, 12, 220, 198, 198, 11748, 33918, 198, 11748, 25064, 198, 11748, 640, 198, 198, 2, 34343, 25, 8295, 9412, 198, 2, 1366, 62, 6978, ...
2.092593
594
import unittest from hashlib import sha1 import pickle import numpy as np from datasketch.lsh import MinHashLSH from datasketch.minhash import MinHash from datasketch.weighted_minhash import WeightedMinHashGenerator if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 12234, 8019, 1330, 427, 64, 16, 198, 11748, 2298, 293, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 4818, 2093, 7569, 13, 75, 1477, 1330, 1855, 26257, 6561, 39, 198, 6738, 4818, 2093, 7569, 13, 1084,...
3.022727
88
import logging from typing import Callable from typing import List import numpy as np import torch.utils.data from .video_dataset import VideoDataset from .video_dataset import VideoRecord LOG = logging.getLogger(__name__) # line_profiler injects a "profile" into __builtins__. When not running under # line_profiler we need to inject our own passthrough if type(__builtins__) is not dict or "profile" not in __builtins__: profile = lambda f: f
[ 11748, 18931, 198, 6738, 19720, 1330, 4889, 540, 198, 6738, 19720, 1330, 7343, 628, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 13, 26791, 13, 7890, 198, 198, 6738, 764, 15588, 62, 19608, 292, 316, 1330, 7623, 27354, 292, 316...
3.297101
138
import click import ce_api import base64 import os from ce_cli.cli import cli, pass_info from ce_cli.utils import check_login_status from ce_cli.utils import api_client, api_call from ce_api.models import FunctionCreate, FunctionVersionCreate from ce_cli.utils import declare, notice from tabulate import tabulate from ce_cli.utils import format_uuid, find_closest_uuid
[ 11748, 3904, 198, 11748, 2906, 62, 15042, 198, 11748, 2779, 2414, 198, 11748, 28686, 198, 6738, 2906, 62, 44506, 13, 44506, 1330, 537, 72, 11, 1208, 62, 10951, 198, 6738, 2906, 62, 44506, 13, 26791, 1330, 2198, 62, 38235, 62, 13376, 1...
3.327434
113
# # This file is part of the LibreOffice project. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # This file incorporates work covered by the following license notice: # # 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 this file # except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 . # from .CommonListener import ItemListenerProcAdapter from .DataAware import DataAware
[ 2, 198, 2, 770, 2393, 318, 636, 286, 262, 44384, 27743, 1628, 13, 198, 2, 198, 2, 770, 8090, 6127, 5178, 318, 2426, 284, 262, 2846, 286, 262, 29258, 5094, 198, 2, 13789, 11, 410, 13, 362, 13, 15, 13, 1002, 257, 4866, 286, 262, ...
3.683333
240
# 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 this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. import re import webob import tg.decorators from decorator import decorator from pylons import request import mock import simplejson from allura.lib import helpers as h _patched = False # must be saved outside the newrelic() method so that multiple newrelic() # calls (e.g. during tests) don't cause the patching to get applied to itself # over and over old_controller_call = tg.controllers.DecoratedController._call
[ 2, 220, 220, 220, 220, 220, 220, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 220, 220, 220, 220, 220, 220, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 220, 220, 220, 220, 2...
3.248744
398
from typing import List s = Solution() ans = [ s.searchRange([1],0), s.searchRange([5,7,7,8,8,8,9,10],8), s.searchRange([7,7,7,8,10],7), s.searchRange([7,7,7,8,10,10,10,10],10), s.searchRange([7,7,7,8,10],10), s.searchRange([7,7,7,7,8,10],10), ] for a in ans: print(a)
[ 6738, 19720, 1330, 7343, 198, 198, 82, 796, 28186, 3419, 198, 504, 796, 685, 198, 220, 220, 220, 264, 13, 12947, 17257, 26933, 16, 4357, 15, 828, 198, 220, 220, 220, 264, 13, 12947, 17257, 26933, 20, 11, 22, 11, 22, 11, 23, 11, ...
1.833333
162
#!/usr/bin/python3 import cartinit from kivy.app import App from kivy.uix.screenmanager import Screen, ScreenManager, SlideTransition from kivy.lang import Builder from buttons import RoundedButton cartinit.init() # create ScreenManager as root, put all screens into sm = ScreenManager() sm.transition = SlideTransition() screens = [] # load kv files Builder.load_file('screens.kv') if __name__ == '__main__': app = CartApp() screens.append(MainScreen()) sm.switch_to(screens[-1]) app.run()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 6383, 15003, 198, 6738, 479, 452, 88, 13, 1324, 1330, 2034, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 9612, 37153, 1330, 15216, 11, 15216, 13511, 11, 37651, 8291, 653, 198, ...
2.898876
178
from CompartmentalSystems import smooth_reservoir_model from CompartmentalSystems import smooth_model_run from CompartmentalSystems import start_distributions
[ 6738, 3082, 1823, 282, 11964, 82, 1330, 7209, 62, 411, 712, 10840, 62, 19849, 198, 6738, 3082, 1823, 282, 11964, 82, 1330, 7209, 62, 19849, 62, 5143, 198, 6738, 3082, 1823, 282, 11964, 82, 1330, 923, 62, 17080, 2455, 507, 628 ]
3.902439
41
import numpy as np import re """ """ OCC_LIMIT = 10 def load_and_parse(filepath, verbose=True, pad_to_tweets=False, tweet_length=280): """ Le nom est plutot equivoque. Charge le fichier txt de chemin 'filepath' et retire les artefacts de parsing :param filepath: chemin d'acces vers le fichier (.txt contenant le texte brut des tweets) :param verbose: affiche ou non l'etat d'avancement de l'algorithme :param pad_to_tweets: permet de forcer les tweets faire 'tweet_length' caracteres :param tweet_length: longueur des tweets dans le cas pad_to_tweets=True :return: charset: set contenant les caracteres uniques utilises dans le texte (moins ceux supprimes car trop peu utilises. text: string contenant le texte brut nettoye. """ if verbose: print("Starting Data parsing...\n") # Lecture et caracterisation du corpus text = open(filepath, 'r').read().lower() charset = list(set(text)) vocab_size = len(charset) # Suppression de certains caractres speciaux polluant la comprehension de la machine re.sub(r"\n", ' ', text) # Dtection des caractres n'apparaissant pas au moins OCC_LIMIT fois dans le corpus nb_occ_chars = np.zeros(len(charset)) for i in range(len(charset)): for j in range(len(text)): if text[j] == charset[i]: nb_occ_chars[i] += 1 vocab_occ = dict(zip(charset, nb_occ_chars)) key_blacklist = [] for key in vocab_occ: if vocab_occ[key] < OCC_LIMIT: key_blacklist.append(key) # La suppression des caractres trop peu nombreux dans le corpus prend en compte les caracteres speciaux # et s'efforce de les rendre lisibles dans les regular expressions en ajoutant un antislash unreadable_chars = ['|', '.', '*' '^', '$', '+', '?'] for k in key_blacklist: if k in unreadable_chars: readable_k = '\\' + k else: readable_k = k text = re.sub(readable_k, '', text) del vocab_occ[k] print("Deleted following characters :\n", key_blacklist, "\n(Insufficient occurences in corpus)\n") # Suppression des 'http://www. ' qui ne menent rien et ajout d'espace avant les liens n'en ayant pas text = re.sub('([0-9]|[a-z]|:|!)(http://|https://)', '\g<1> \g<2>', text) text = re.sub('(http://www.|https://www.|http://)\n', '', text) # Suppression des doubles et triples espaces text = re.sub(' +', ' ', text) if pad_to_tweets: print("Padding tweets...") iterator = 0 old_iterator = 0 text = text + '' while text[iterator] != '': if text[iterator] == '\n' and text[iterator + 1] != '': padding_string = " " * (tweet_length - (iterator - old_iterator)) text = text[:iterator] + padding_string + text[(iterator+1):] old_iterator += tweet_length iterator += len(padding_string) iterator += 1 return charset, text def format_data(charset, data, sequence_length, verbose_x=False): """ :param sequence_length: :param charset: set contenant tous les caracteres utilises par le texte :param data: texte brut pre-nettoye ( l'aide de load_and_parse) :return: x: """ # Dictionnaire liant chaque caractere a un entier et vice-versa(necessaire pour que le reseau les comprenne !) ix_to_char = {ix: char for ix, char in enumerate(charset)} char_to_ix = {char: ix for ix, char in enumerate(charset)} vocab_size = len(charset) # Creation de matrices de donnees. On va en fait decouper ensuite nos donnees en sequences de caracteres de longueur # sequence_length. La matrice de donnees en 3 dimensions : une ligne correspond a une sequence, une colonne a un # caractere dans cette sequence # Le // evite de placer un float dans un in range. Je doute de la proprete mais jusqu'ici pas de soucis x = np.zeros((len(data) // sequence_length, sequence_length, vocab_size)) y = np.zeros((len(data) // sequence_length, sequence_length, vocab_size)) # Le gros du boulot. Remplissage de la matrice ligne par ligne. for i in range(0, len(data) // sequence_length): x_sequence = data[i * sequence_length:(i + 1) * sequence_length] if verbose_x: print(x_sequence) x_sequence_ix = [char_to_ix[value] for value in x_sequence] input_sequence = np.zeros((sequence_length, vocab_size)) for j in range(sequence_length): input_sequence[j][x_sequence_ix[j]] = 1. x[i] = input_sequence y_sequence = data[i * sequence_length + 1:(i + 1) * sequence_length + 1] y_sequence_ix = [char_to_ix[value] for value in y_sequence] target_sequence = np.zeros((sequence_length, vocab_size)) for j in range(sequence_length) : target_sequence[j][y_sequence_ix[j]] = 1. y[i] = target_sequence return x, y, vocab_size, ix_to_char # Generation d'un texte utilisant un modele existant # --------------------------------TESTING------------------------------ if __name__ == "__main__": chars, txt = load_and_parse("./data/tweets_small_raw.txt", pad_to_tweets=True) x, y, v_s, tochar = format_data(chars, txt, 280)
[ 11748, 299, 32152, 355, 45941, 198, 11748, 302, 198, 37811, 198, 198, 37811, 628, 198, 46, 4093, 62, 43, 3955, 2043, 796, 838, 628, 198, 4299, 3440, 62, 392, 62, 29572, 7, 7753, 6978, 11, 15942, 577, 28, 17821, 11, 14841, 62, 1462, ...
2.289086
2,373
from . import _tsp_c from .tsp_c import solve_greedy from .tsp_c import solve_SA from .tsp_c import set_param_SA from .tsp_c import solve_PSO
[ 6738, 764, 1330, 4808, 912, 79, 62, 66, 198, 6738, 764, 912, 79, 62, 66, 1330, 8494, 62, 16694, 4716, 198, 6738, 764, 912, 79, 62, 66, 1330, 8494, 62, 4090, 198, 6738, 764, 912, 79, 62, 66, 1330, 900, 62, 17143, 62, 4090, 198, ...
2.517857
56
""" Data model for results of test cases :Author: Jonathan Karr <karr@mssm.edu> :Date: 2021-01-01 :Copyright: 2021, Center for Reproducible Biomedical Modeling :License: MIT """ from .._version import __version__ from ..warnings import TestCaseWarning # noqa: F401 import enum __all__ = [ 'TestCaseResultType', 'TestCaseResult', 'TestResultsReport', ]
[ 37811, 6060, 2746, 329, 2482, 286, 1332, 2663, 198, 198, 25, 13838, 25, 11232, 509, 3258, 1279, 74, 3258, 31, 76, 824, 76, 13, 15532, 29, 198, 25, 10430, 25, 33448, 12, 486, 12, 486, 198, 25, 15269, 25, 33448, 11, 3337, 329, 36551...
2.991935
124
# The MIT License (MIT) # # Copyright 2021 Fridtjof Gjengset, Adele Zaini, Gaute Holen # # 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, sublicense, and/or sell copies of the Software, # and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all copies or substantial portions of # the Software. THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT # LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF # CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import numpy as np from random import random, seed import pandas as pd import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm from matplotlib.ticker import LinearLocator, FormatStrFormatter from sklearn.model_selection import train_test_split from sklearn import linear_model from sklearn.preprocessing import StandardScaler from sklearn.utils import resample # FrankeFunction: a two-variables function to create the dataset of our vanilla problem # 3D plot of FrankeFunction # Create xyz dataset from the FrankeFunction with a added normal distributed noise # Error analysis: MSE and R2 score # SVD theorem # SVD inversion # Design matrix for two indipendent variables x,y # Splitting and rescaling data (rescaling is optional) # Default values: 20% of test data and the scaler is StandardScaler without std.dev. # OLS equation # Return the rolling mean of a vector and two values at one sigma from the rolling average # Plot MSE in function of complexity of the model (rolling mean)
[ 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2, 15069, 220, 33448, 1305, 312, 83, 73, 1659, 402, 73, 1516, 2617, 11, 1215, 11129, 1168, 391, 72, 11, 12822, 1133, 6479, 268, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, ...
3.693739
591
import json import shelve import sys import os import click from prettytable import PrettyTable import app_config as conf import analytics def get_json_out(raw_text): """Convert input raw text and return JSON.""" return json.dumps(raw_text, indent=4, sort_keys=False) def get_human_out(raw_text): """Convert input raw text and return human readable format (table style).""" human_text = PrettyTable(["id", "name", "description", "periodicity", "created", "checkoffs"]) for item in raw_text: human_text.add_row([item["id"], item["name"], item["description"], item["periodicity"], item["created"], "\n".join(item["checkoffs"])]) return human_text
[ 11748, 33918, 201, 198, 11748, 7497, 303, 201, 198, 11748, 25064, 201, 198, 11748, 28686, 201, 198, 201, 198, 11748, 3904, 201, 198, 6738, 2495, 11487, 1330, 20090, 10962, 201, 198, 201, 198, 11748, 598, 62, 11250, 355, 1013, 201, 198, ...
2.67029
276
# Copyright (C) 2020 Zurich Instruments # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. import numpy as np def _adjust_scale(self, wave): """Adjust the scaling of the waveform. The data is actually sent as complex values in the range of (-1, 1). """ if len(wave) == 0: wave = np.zeros(1) n = len(wave) n = min(n, self.buffer_length) m = np.max(np.abs(wave)) data = np.zeros(self.buffer_length) if self._align_start: if len(wave) > n: data[:n] = wave[:n] / m if m >= 1 else wave[:n] else: data[: len(wave)] = wave / m if m >= 1 else wave else: if len(wave) > n: data[:n] = ( wave[len(wave) - n :] / m if m >= 1 else wave[len(wave) - n :] ) else: data[(self.buffer_length - len(wave)) :] = wave / m if m >= 1 else wave complex_data = data.astype(complex) return complex_data def _round_up(self, waveform_length): """Adapt to the allowed granularity and minimum length of waveforms. The length of the waveform is rounded up if it does not match the waveform granularity and minimum waveform length specifications of the instrument. """ length = max(waveform_length, self._min_length) multiplier, rest = divmod(length, self._granularity) if not rest: return length else: return (multiplier + 1) * self._granularity
[ 2, 15069, 357, 34, 8, 12131, 43412, 43953, 198, 2, 198, 2, 770, 3788, 743, 307, 9518, 290, 9387, 739, 262, 2846, 198, 2, 286, 262, 17168, 5964, 13, 4091, 262, 38559, 24290, 2393, 329, 3307, 13, 198, 198, 11748, 299, 32152, 355, 45...
2.196547
753
# from django.utils.translation import ugettext_lazy as _ # from django import forms # from django.contrib.auth.forms import ReadOnlyPasswordHashField # # from mongoengine.django.auth import User # # from mongodbforms import DocumentForm # # class UserCreationForm(DocumentForm): # """ # A form that creates a user, with no privileges, from the given username and # password. # """ # error_messages = { # 'duplicate_username': _("A user with that username already exists."), # 'password_mismatch': _("The two password fields didn't match."), # } # username = forms.RegexField(label=_("Username"), max_length=30, # regex=r'^[\w.@+-]+$', # help_text=_("Required. 30 characters or fewer. Letters, digits and " # "@/./+/-/_ only."), # error_messages={ # 'invalid': _("This value may contain only letters, numbers and " # "@/./+/-/_ characters.")}) # password1 = forms.CharField(label=_("Password"), # widget=forms.PasswordInput) # password2 = forms.CharField(label=_("Password confirmation"), # widget=forms.PasswordInput, # help_text=_("Enter the same password as above, for verification.")) # # class Meta: # model = User # fields = ("username",) # # def clean_username(self): # # Since User.username is unique, this check is redundant, # # but it sets a nicer error message than the ORM. See #13147. # username = self.cleaned_data["username"] # try: # User.objects.get(username=username) # except User.DoesNotExist: # return username # raise forms.ValidationError( # self.error_messages['duplicate_username'], # code='duplicate_username', # ) # # def clean_password2(self): # password1 = self.cleaned_data.get("password1") # password2 = self.cleaned_data.get("password2") # if password1 and password2 and password1 != password2: # raise forms.ValidationError( # self.error_messages['password_mismatch'], # code='password_mismatch', # ) # return password2 # # def save(self, commit=True): # user = super(UserCreationForm, self).save(commit=False) # self.instance = user.set_password(self.cleaned_data["password1"]) # return self.instance # # # class UserChangeForm(DocumentForm): # username = forms.RegexField( # label=_("Username"), max_length=30, regex=r"^[\w.@+-]+$", # help_text=_("Required. 30 characters or fewer. Letters, digits and " # "@/./+/-/_ only."), # error_messages={ # 'invalid': _("This value may contain only letters, numbers and " # "@/./+/-/_ characters.")}) # password = ReadOnlyPasswordHashField(label=_("Password"), # help_text=_("Raw passwords are not stored, so there is no way to see " # "this user's password, but you can change the password " # "using <a href=\"password/\">this form</a>.")) # # class Meta: # model = User # # def __init__(self, *args, **kwargs): # super(UserChangeForm, self).__init__(*args, **kwargs) # f = self.fields.get('user_permissions', None) # if f is not None: # f.queryset = f.queryset.select_related('content_type') # # def clean_password(self): # # Regardless of what the user provides, return the initial value. # # This is done here, rather than on the field, because the # # field does not have access to the initial value # return self.initial["password"] # # def clean_email(self): # email = self.cleaned_data.get("email") # if email == '': # return None # return email
[ 2, 422, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198, 2, 422, 42625, 14208, 1330, 5107, 198, 2, 422, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 23914, 1330, 4149, 10049, 35215, 26257, 15878...
2.276968
1,715
""" Runs tests for Ptyhon Odin SDK """ import unittest from os import environ import random from pymongo import MongoClient import pyodin as odin if __name__ == "__main__": unittest.main() # run all tests
[ 37811, 44743, 5254, 329, 350, 774, 24130, 19758, 26144, 37227, 198, 198, 11748, 555, 715, 395, 198, 6738, 28686, 1330, 551, 2268, 198, 11748, 4738, 198, 6738, 279, 4948, 25162, 1330, 42591, 11792, 198, 11748, 12972, 375, 259, 355, 16298, ...
3.102941
68
from artemis.general.dict_ops import cross_dict_dicts, merge_dicts __author__ = 'peter' if __name__ == "__main__": test_dict_merge() test_cross_dict_dicts()
[ 6738, 1242, 30561, 13, 24622, 13, 11600, 62, 2840, 1330, 3272, 62, 11600, 62, 11600, 82, 11, 20121, 62, 11600, 82, 198, 198, 834, 9800, 834, 796, 705, 79, 2357, 6, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, ...
2.463768
69
# Copyright 2021 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Compute class and mean-per-class accuracy for CuBERT SO.""" from plur.eval.cubert_classification_eval import CuBertClassificationEval from plur.stage_1.cubert_swapped_operand_classification_dataset import CuBertSwappedOperandClassificationDataset
[ 2, 15069, 33448, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 733...
3.659292
226
if __name__ == "__main__": cost = [[1, 5, 7, 2, 1, 4], [5, 8, 4, 3, 6, 1], [3, 2, 9, 7, 2, 3], [1, 2, 4, 9, 1, 7]] n, k = len(cost), len(cost[0]) print(Solution().paintHouse(cost, n, k))
[ 220, 220, 220, 220, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201, 198, 220, 220, 220, 1575, 796, 16410, 16, 11, 642, 11, 767, 11, 362, 11, 352, 11, 604, 4357, 201, 198, 220, 220, 220, 220, 220...
1.5875
160
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals, division, print_function, absolute_import import sys import os import threading import warnings import locale import logging import win32api import win32con import win32gui import win32ts PY2 = sys.version_info < (3,) if PY2: reload(sys) sys.setdefaultencoding(locale.getpreferredencoding() or "utf-8") NIN_BALLOONSHOW = win32con.WM_USER + 2 NIN_BALLOONHIDE = win32con.WM_USER + 3 NIN_BALLOONTIMEOUT = win32con.WM_USER + 4 NIN_BALLOONUSERCLICK = win32con.WM_USER + 5 WM_TRAY_EVENT = win32con.WM_USER + 20 win32gui.InitCommonControls() ################################################################################ if __name__ == "__main__": logging.basicConfig(level=logging.DEBUG) _test_async()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 11, 7297, 11, 3601, 62, 8818, 11, 4112, 62, 11748, 1...
2.682692
312
# * coding:utf-8 * # Author : Lucy Cai # Create Time : 2019/4/12 # IDE : PyCharm # Copyright(C) 2019 Lucy Cai/plumefox (LucysTime@outlook.com) # Github:https://github.com/plumefox/BiliTrend/ # 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://github.com/plumefox/BiliTrend/LICENSE # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # =============================== from urllib import request from lxml import etree if __name__ == '__main__': headers = { 'Host': 'www.bilibili.com', 'Referer': 'https://www.bilibili.com/', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ' 'AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 ' 'Safari/537.36 Edge/16.16299' } url = 'https://www.bilibili.com/ranking/' a = ProxyIP() a.readProxyIP() u = a.getProxyIP(url,headers) print(u) print("a")
[ 2, 1635, 19617, 25, 40477, 12, 23, 1635, 201, 198, 2, 6434, 1058, 22162, 327, 1872, 201, 198, 2, 13610, 3862, 1058, 13130, 14, 19, 14, 1065, 201, 198, 2, 33497, 1058, 9485, 1925, 1670, 201, 198, 201, 198, 2, 220, 15069, 7, 34, 8...
2.42355
569
import numpy as np import pandas as pd import os.path as path import abydos.distance as abd import abydos.phonetic as abp import pytest from scipy.sparse import csc_matrix from sklearn.feature_extraction.text import TfidfVectorizer import name_matching.name_matcher as nm def test_vectorise_data(name_match): name_match._vectorise_data(transform=False) assert len(name_match._vec.vocabulary_) > 0 def test_search_for_possible_matches_error(adjusted_name): name_matcher = nm.NameMatcher() with pytest.raises(RuntimeError): name_matcher._search_for_possible_matches(adjusted_name) def test_do_name_matching_full(name_match, adjusted_name): result = name_match.match_names(adjusted_name, 'company_name') assert np.sum(result['match_index'] == result.index) == 1922 def test_do_name_matching_split(name_match, adjusted_name): name_match._preprocess_split = True result = name_match.match_names(adjusted_name.iloc[44, :], 'company_name') assert np.any(result['match_index'] == 44) def test_do_name_matching_series(name_match, adjusted_name): result = name_match.match_names(adjusted_name.iloc[44, :], 'company_name') assert np.any(result['match_index'] == 44) def test_do_name_matching_error(adjusted_name): name_match = nm.NameMatcher() with pytest.raises(ValueError): name_match.match_names(adjusted_name, 'company_name')
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 13, 6978, 355, 3108, 198, 11748, 450, 5173, 418, 13, 30246, 355, 450, 67, 198, 11748, 450, 5173, 418, 13, 746, 261, 5139, 355, 450, 79, 198, 117...
2.719466
524
''' Created on Dec 21, 2014 @author: Ben ''' def create_new_default(directory: str, dest: dict, param: dict): ''' Creates new default parameter file based on parameter settings ''' with open(directory, 'w') as new_default: new_default.write( '''TARGET DESTINATION = {} SAVE DESTINATION = {} SAVE DESTINATION2 = {} SAVE STARTUP DEST1 = {} SAVE STARTUP DEST2 = {} SAVE TYPE DEST1 = {} SAVE TYPE DEST2 = {} '''.format(dest['target'], dest['save'], dest['save2'], param["dest1_save_on_start"], param["dest2_save_on_start"], param["save_dest1"], param["save_dest2"]) )
[ 7061, 6, 198, 41972, 319, 4280, 2310, 11, 1946, 198, 198, 31, 9800, 25, 3932, 198, 7061, 6, 628, 198, 4299, 2251, 62, 3605, 62, 12286, 7, 34945, 25, 965, 11, 2244, 25, 8633, 11, 5772, 25, 8633, 2599, 198, 220, 220, 220, 705, 706...
2.320144
278
import numpy as np import math import ROOT import sys # # # PEd = PEdistr('/Volumes/Untitled/zenin/linearity_465/linearity_465_sipm/hists/3500_4_465') # # total = PEd.GetLambda() # stat_err = PEd.GetStatError() # sys_err = PEd.GetSysError() # # print('total lambda = %f \u00B1 %f stat \u00B1 %f sys'%(total, stat_err, sys_err)) # print('relative uncertainty = %f%% stat + %f%% sys'%(stat_err/total*100, sys_err/total*100)) # # h = PEd.GetLambdaDistr().Clone() # print(h.GetBinContent(9)) # h.Draw()
[ 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 11748, 15107, 2394, 198, 11748, 25064, 198, 198, 2, 1303, 198, 2, 350, 7407, 796, 350, 7407, 396, 81, 10786, 14, 16598, 8139, 14, 46332, 14, 4801, 259, 14, 29127, 414, 62, 42018, ...
2.314815
216
""" Bad Apps Blog Author: Brandon Eskridge (a.k.a. 7UR7L3) (Initial commit is based on the official Flask tutorial) About: This app began as an (essentially) exact copy of the official Flask tutorial (linke below). It is intented as an opportunity to practice application security, secure design, and secure coding techniques. At the end of the Flask tutorial, the interested student is challenged to implement several features. In order to achive that goal, we will attempt to implement those features while "pushing left" (security-wise) in the process. Official Flask tutorial : https://flask.palletsprojects.com/en/2.0.x/tutorial/ """ import os import secrets from flask import Flask import logging logging.basicConfig(level=logging.INFO,format='%(asctime)s %(levelname)s %(name)s %(threadName)s : %(message)s')
[ 37811, 198, 198, 22069, 27710, 14001, 198, 198, 13838, 25, 14328, 47534, 12818, 357, 64, 13, 74, 13, 64, 13, 767, 4261, 22, 43, 18, 8, 198, 198, 7, 24243, 4589, 318, 1912, 319, 262, 1743, 46947, 11808, 8, 198, 198, 8585, 25, 770, ...
3.508475
236
from django.conf.urls import patterns, url from status import views urlpatterns = patterns('', url(r'^ups$', views.ups_status, name='ups_status'), url(r'^tor$', views.tor_status, name='tor_status'), )
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 19016, 198, 6738, 3722, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 7572, 10786, 3256, 198, 197, 6371, 7, 81, 6, 61, 4739, 3, 3256, 5009, 13, 4739, 62, 13376, 11, 1438, ...
2.794521
73
import os import json from common import update_json_file, get_logger, exec_cmd from yamlparser import Parser from pathlib import Path logger = get_logger("update-image") # Functions that work to update gluu_versions.json def determine_final_official_and_dev_version(tag_list): """ Determine official version i.e 4.1.0 , 4.2.2..etc using oxauths repo @param tag_list: @return: """ # Check for the highest major.minor.patch i.e 4.2.0 vs 4.2.2 dev_image = "" patch_list = [] for tag in tag_list: patch_list.append(int(tag[4:5])) # Remove duplicates patch_list = list(set(patch_list)) # Sort patch_list.sort() highest_major_minor_patch_number = str(patch_list[-1]) versions_list = [] for tag in tag_list: if "dev" in tag and tag[4:5] == highest_major_minor_patch_number: dev_image = tag[0:5] + "_dev" # Exclude any tag with the following if "dev" not in tag and "a" not in tag and tag[4:5] == highest_major_minor_patch_number: versions_list.append(int(tag[6:8])) # A case were only a dev version of a new patch is available then a lower stable patch should be checked. # i.e there is no 4.3.0_01 but there is 4.2.2_dev if not versions_list: highest_major_minor_patch_number = str(int(highest_major_minor_patch_number) - 1) for tag in tag_list: if not dev_image and "dev" in tag and tag[4:5] == highest_major_minor_patch_number: dev_image = tag[0:5] + "_dev" # Exclude any tag with the following if "dev" not in tag and "a" not in tag and tag[4:5] == highest_major_minor_patch_number: versions_list.append(int(tag[6:8])) # Remove duplicates versions_list = list(set(versions_list)) # Sort versions_list.sort() # Return highest patch highest_major_minor_patch_image_patch = str(versions_list[-1]) if len(highest_major_minor_patch_image_patch) == 1: highest_major_minor_patch_image_patch = "0" + highest_major_minor_patch_image_patch highest_major_minor_patch_image = "" for tag in tag_list: if "dev" not in tag and highest_major_minor_patch_image_patch in tag \ and tag[4:5] == highest_major_minor_patch_number: highest_major_minor_patch_image = tag return highest_major_minor_patch_image, dev_image def determine_major_version(all_repos_tags): """ Determine official major version i.e 4.1 , 4.2..etc using oxauths repo @param all_repos_tags: @return: """ versions_list = [] for tag in all_repos_tags["oxauth"]: # Exclude any tag with the following if "dev" not in tag \ and "latest" not in tag \ and "secret" not in tag \ and "gluu-engine" not in tag: versions_list.append(float(tag[0:3])) # Remove duplicates versions_list = list(set(versions_list)) # Sort versions_list.sort() # Return highest version return versions_list[-1] def get_docker_repo_tag(org, repo): """ Returns a dictionary of all available tags for a certain repo :param org: :param repo: :return: """ logger.info("Getting docker tag for repository {}.".format(repo)) exec_get_repo_tag_curl_command = ["curl", "-s", "https://hub.docker.com/v2/repositories/{}/{}/tags/?page_size=100".format(org, repo)] stdout, stderr, retcode = None, None, None try: stdout, stderr, retcode = exec_cmd(" ".join(exec_get_repo_tag_curl_command)) except (IndexError, Exception): manual_curl_command = " ".join(exec_get_repo_tag_curl_command) logger.error("Failed to curl\n{}".format(manual_curl_command)) all_tags = json.loads(stdout)["results"] image_tags = [] for tag in all_tags: image_tags.append(tag["name"]) image_tags_dict = dict() image_tags_dict[repo] = image_tags return image_tags_dict def filter_all_repo_dictionary_tags(all_repos_tags, major_official_version): """ Analyze the dictionary containing all repos and keeps only the list of tags and versions matching the major version @param all_repos_tags: @param major_official_version: """ filtered_all_repos_tags = dict() for repo, tag_list in all_repos_tags.items(): temp_filtered_tag_list = [] for tag in tag_list: if major_official_version == tag[0:3]: temp_filtered_tag_list.append(tag) filtered_all_repos_tags[repo] = temp_filtered_tag_list return filtered_all_repos_tags def analyze_filtered_dict_return_final_dict(filtered_all_repos_tags, major_official_version): """ Analyze filtered dictionary and return the final dict with only one official version and one dev version @param filtered_all_repos_tags: @param major_official_version: """ final_official_version_dict = dict() final_dev_version_dict = dict() # Gluus main values.yaml gluu_values_file = Path("../pygluu/kubernetes/templates/helm/gluu/values.yaml").resolve() gluu_values_file_parser = Parser(gluu_values_file, True) dev_version = "" for repo, tag_list in filtered_all_repos_tags.items(): official_version, dev_version = determine_final_official_and_dev_version(tag_list) if repo == "casa": update_dicts_and_yamls("CASA", repo, tag_list) elif repo == "oxd-server": update_dicts_and_yamls("OXD", repo, tag_list) elif repo == "fido2": update_dicts_and_yamls("FIDO2", repo, tag_list) elif repo == "scim": update_dicts_and_yamls("SCIM", repo, tag_list) elif repo == "config-init": update_dicts_and_yamls("CONFIG", repo, tag_list, "config") elif repo == "cr-rotate": update_dicts_and_yamls("CACHE_REFRESH_ROTATE", repo, tag_list) elif repo == "certmanager": update_dicts_and_yamls("CERT_MANAGER", repo, tag_list, "oxauth-key-rotation") elif repo == "opendj": update_dicts_and_yamls("LDAP", repo, tag_list, "opendj") elif repo == "jackrabbit": update_dicts_and_yamls("JACKRABBIT", repo, tag_list) elif repo == "oxauth": update_dicts_and_yamls("OXAUTH", repo, tag_list) elif repo == "oxpassport": update_dicts_and_yamls("OXPASSPORT", repo, tag_list) elif repo == "oxshibboleth": update_dicts_and_yamls("OXSHIBBOLETH", repo, tag_list) elif repo == "oxtrust": update_dicts_and_yamls("OXTRUST", repo, tag_list) elif repo == "persistence": update_dicts_and_yamls("PERSISTENCE", repo, tag_list) elif repo == "upgrade": update_dicts_and_yamls("UPGRADE", repo, tag_list) gluu_versions_dict = {major_official_version: final_official_version_dict, dev_version: final_dev_version_dict} gluu_values_file_parser.dump_it() return gluu_versions_dict if __name__ == '__main__': main()
[ 11748, 28686, 198, 11748, 33918, 198, 6738, 2219, 1330, 4296, 62, 17752, 62, 7753, 11, 651, 62, 6404, 1362, 11, 2452, 62, 28758, 198, 6738, 331, 321, 34431, 28198, 1330, 23042, 263, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6404, ...
2.230389
3,238
from reportlab.lib import colors from reportlab.lib.styles import getSampleStyleSheet from reportlab.lib.units import inch from reportlab.lib.pagesizes import A3 from reportlab.platypus import Paragraph, SimpleDocTemplate, Table, TableStyle from reportlab.lib.enums import TA_CENTER import datetime
[ 6738, 989, 23912, 13, 8019, 1330, 7577, 201, 198, 6738, 989, 23912, 13, 8019, 13, 47720, 1330, 651, 36674, 21466, 3347, 316, 201, 198, 6738, 989, 23912, 13, 8019, 13, 41667, 1330, 11111, 201, 198, 6738, 989, 23912, 13, 8019, 13, 31126...
3.347826
92
from jax import config config.update("jax_enable_x64", True) from jax import custom_jvp, numpy as np from timemachine.lib.potentials import SummedPotential def wrap_impl(impl, pack=lambda x: x): """Construct a differentiable function U(x, params, box, lam) -> float from a single unbound potential """ U.defjvps(U_jvp_x, U_jvp_params, None, U_jvp_lam) return U def construct_differentiable_interface(unbound_potentials, precision=np.float32): """Construct a differentiable function U(x, params, box, lam) -> float from a collection of unbound potentials >>> U = construct_differentiable_interface(unbound_potentials) >>> _ = grad(U, (0,1,3))(coords, sys_params, box, lam) This implementation computes the sum of the component potentials in Python """ impls = [ubp.unbound_impl(precision) for ubp in unbound_potentials] U_s = [wrap_impl(impl) for impl in impls] return U def construct_differentiable_interface_fast(unbound_potentials, params, precision=np.float32): """Construct a differentiable function U(x, params, box, lam) -> float from a collection of unbound potentials >>> U = construct_differentiable_interface(unbound_potentials, params) >>> _ = grad(U, (0,1,3))(coords, sys_params, box, lam) This implementation computes the sum of the component potentials in C++ using the SummedPotential custom op """ impl = SummedPotential(unbound_potentials, params).unbound_impl(precision) U = wrap_impl(impl, pack) return U
[ 6738, 474, 897, 1330, 4566, 198, 198, 11250, 13, 19119, 7203, 73, 897, 62, 21633, 62, 87, 2414, 1600, 6407, 8, 198, 198, 6738, 474, 897, 1330, 2183, 62, 73, 36133, 11, 299, 32152, 355, 45941, 198, 198, 6738, 4628, 368, 20480, 13, ...
2.93499
523
from bs4 import BeautifulSoup as soup from urllib.request import Request, urlopen from datetime import date import math import openpyxl import pandas as pd fname = 'https://www.governing.com/gov-data/census/state-minority-population-data-estimates.html' req = Request(fname, headers={'User-Agent': 'Mozilla/5.0'}) webpage = urlopen(req) page_soup = soup(webpage, "html.parser") containers = page_soup.findAll("table") container = containers[1] A = container.findAll("tr") tmp_list = [[], [], [], [], []] for x in range(1, 52): if x == 9: continue B = A[x].findAll("td") for c in range(1, 6): s = str(B[c]) s1 = s.replace('<td>', '') s2 = s1.replace('</td>', '') s3 = s2.replace('%', '') tmp_list[c-1].append(float(s3)) df = pd.read_excel('states_info.xlsx') headers_list = ['hispanic', 'white', 'black', 'asian', 'american indian'] for pos in range(5): df[headers_list[pos]] = tmp_list[pos] df.to_excel('states_info.xlsx')
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 355, 17141, 198, 6738, 2956, 297, 571, 13, 25927, 1330, 19390, 11, 19016, 9654, 198, 6738, 4818, 8079, 1330, 3128, 198, 11748, 10688, 198, 11748, 1280, 9078, 87, 75, 198, 11748, 19798, 292, 3...
2.327103
428
from django.core.exceptions import FieldError from staff.models import Staff import re STAFFCHOICESONE = set() for staff in Staff.objects.all(): STAFFCHOICESONE.add((staff.initialies, staff.name)) STAFFCHOICESTWO = set() STAFFCHOICESTWO.add(('', '')) for staff in Staff.objects.all(): STAFFCHOICESTWO.add((staff.initialies, staff.name)) def check_form_and_db(form, queryset): """ get data from(bevor it was saved) and get data from current object check if there are changes between them :param form: :param queryset: :return: boolean update """ update = False if queryset.box != form.instance.box: update = True elif queryset.customer != form.instance.customer: update = True elif queryset.hardware != form.instance.hardware: update = True elif queryset.created_at != form.instance.created_at: update = True elif queryset.status != form.instance.status: update = False elif queryset.finished_until != form.instance.finished_until: update = True elif queryset.optional_status != form.instance.optional_status: update = False elif queryset.finished_until != form.instance.finished_until: update = True elif queryset.staff != form.instance.staff: update = True elif queryset.time_in_weeks != int(form.instance.time_in_weeks): update = True elif queryset.remark != form.instance.remark: update = True elif queryset.production_remark != form.instance.production_remark: update = False return update COLORS = { 'Fertig': '#33cc00', 'Test': '#99ff99', 'Bearbeitung': '#ffff00', 'Produktion': '#ffffcc', 'Vertrieb': '#ff99ff', 'Lschen': '#ffffff' } def searching(model, search_string, *args, **kwargs): ''' usage e.g.: t = searching(ModelName, search_string, 'Foo', 'Bar', **kwargs) tmp = ModelName.objects.none() for i in t: tmp = i | tmp #merge Querysets :param model: Django Modelobject :param search_string: self explaning :param args: datatypes that should be excluded :param kwargs: can contain exlude or exact as key with a list of values containing the field name/-s :return: list of querysets gte 1 ''' types = [field.get_internal_type() for field in model._meta.get_fields()] names = [f.name for f in [field for field in model._meta.get_fields()]] field_name_dict = dict(zip(names, types)) excat_fields = [] foreignKeyFields = None special_filter = None if kwargs: try: foreignKeyFields = kwargs['foreignKeyFields'] except KeyError: pass try: special_filter = kwargs['filter'] except KeyError: pass try: field_name_dict = remove_items_dict(field_name_dict, kwargs['exclude']) except KeyError: pass try: excat_fields = kwargs['exact'] except KeyError: pass # to use following e.g. in function call: # data = {'exclude': liste['foo', ]} # searching(modelname, searchstring, kwargs=data) try: if 'exclude' in kwargs['kwargs']: field_name_dict = remove_items_dict(field_name_dict, kwargs['kwargs']['exclude']) elif 'exact' in kwargs: excat_fields = kwargs['exact'] except KeyError: pass if args: field_name_dict = remove_items_dict(field_name_dict, args) if special_filter is not None: tmp = model.objects.filter(**{special_filter[0]: special_filter[1]}) else: tmp = model.objects.all() liste = [] for key, value in field_name_dict.items(): if value != 'ForeignKey' and value != 'ManyToManyField': if key in excat_fields: filter = f'{key}__iexact' if len(tmp.filter(**{filter: search_string})) > 0: liste.append(tmp.filter(**{filter: search_string})) else: filter = f'{key}__icontains' if len(tmp.filter(**{filter: search_string})) > 0: liste.append(tmp.filter(**{filter: search_string})) elif value == 'ManyToManyField' and key == 'customer_collar': filter = f'{key}__serialno__icontains' if len(tmp.filter(**{filter: search_string})) > 0: liste.append(tmp.filter(**{filter: search_string})) else: filter = f'{key}__pk__iexact' if len(tmp.filter(**{filter: search_string})) > 0: liste.append(tmp.filter(**{filter: search_string})) else: if foreignKeyFields is not None: for keyfield in foreignKeyFields: filter = f'{key}__{keyfield}__icontains' try: if len(tmp.filter(**{filter: search_string})) > 0: liste.append(tmp.filter(**{filter: search_string})) except FieldError: pass else: filter = f'{key}__name__icontains' if len(tmp.filter(**{filter: search_string})) > 0: liste.append(tmp.filter(**{filter: search_string})) return liste def remove_items_dict(dictionary, keys): ''' Remove items from dictonary :param dictionary: :param keys: :return: ''' return {key: value for key, value in dictionary.items() if key not in keys and value not in keys} def move_ids_from_remark_to_ids(text): ''' extract ids from allready existing production_remark to new field ids :param text: :return: ids as string seperated by ; ''' range_ids = re.findall(r'[0-9]*-[0-9]*', text) tmp_string = '; '.join(range_ids) tmp = re.sub(r'[0-9]*-[0-9]*', '', text) id_list = list(filter(lambda x: len(x) > 4, filter(None, re.findall(r'[\d]*', tmp)))) new_string = '; '.join(id_list) return f'{new_string}; {tmp_string}' def filter_ids(obj, id): ''' :param id: :return: ''' queryset = obj.objects.all().only('pk', 'ids') for i in queryset: if i.ids is not None: if '-' in i.ids: x = i.ids.split('; ') x = list(filter(lambda x: '-' in x, x)) for ids in x: if int(ids.split('-')[0]) > int(id) or int(id) < int(ids.split('-')[1]): return i.pk else: if id in i.ids: return i.pk else: return None else: if id in i.ids: return i.pk return None
[ 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 7663, 12331, 198, 6738, 3085, 13, 27530, 1330, 9983, 198, 11748, 302, 628, 198, 2257, 32, 5777, 44899, 34444, 11651, 796, 900, 3419, 198, 1640, 3085, 287, 9983, 13, 48205, 13, 439, ...
2.066667
3,315
from pydantic import BaseModel from app.orm_models.phone import Phone from tortoise.contrib.pydantic import pydantic_model_creator Phone_Pydantic = pydantic_model_creator(Phone, name="Phone") PhoneIn_Pydantic = pydantic_model_creator( Phone, name="PhoneIn", exclude_readonly=True)
[ 6738, 279, 5173, 5109, 1330, 7308, 17633, 198, 6738, 598, 13, 579, 62, 27530, 13, 4862, 1330, 14484, 198, 6738, 7619, 25678, 13, 3642, 822, 13, 79, 5173, 5109, 1330, 279, 5173, 5109, 62, 19849, 62, 45382, 628, 198, 6132, 62, 47, 517...
3.053191
94
# Need this to fix types from __future__ import annotations import tempfile import threading from typing import Union, Iterable, Dict, Tuple from suls.sul import SUL from graphviz import Digraph import random from itertools import product # A statemachine can represent a system under learning
[ 198, 2, 10664, 428, 284, 4259, 3858, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 20218, 7753, 198, 11748, 4704, 278, 198, 6738, 19720, 1330, 4479, 11, 40806, 540, 11, 360, 713, 11, 309, 29291, 198, 6738, 264, 5753, 13,...
3.716049
81
from threading import Thread from flask import current_app,render_template from flask_mail import Message from . import mail
[ 6738, 4704, 278, 1330, 14122, 198, 6738, 42903, 1330, 1459, 62, 1324, 11, 13287, 62, 28243, 198, 6738, 42903, 62, 4529, 1330, 16000, 198, 6738, 764, 1330, 6920 ]
4.428571
28
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Oct 10 18:30:46 2021 @author: fearthekraken """ import AS import pwaves import sleepy import pandas as pd #%% ### FIGURE 1C - example EEGs for NREM, IS, and REM ### ppath = '/home/fearthekraken/Documents/Data/photometry' AS.plot_example(ppath, 'hans_091118n1', ['EEG'], tstart=721.5, tend=728.5, eeg_nbin=4, ylims=[(-0.6, 0.6)]) # NREM EEG AS.plot_example(ppath, 'hans_091118n1', ['EEG'], tstart=780.0, tend=787.0, eeg_nbin=4, ylims=[(-0.6, 0.6)]) # IS EEG AS.plot_example(ppath, 'hans_091118n1', ['EEG'], tstart=818.5, tend=825.5, eeg_nbin=4, ylims=[(-0.6, 0.6)]) # REM EEG #%% ### FIGURE 1E - example photometry recording ### ppath = '/home/fearthekraken/Documents/Data/photometry' AS.plot_example(ppath, 'hans_091118n1', tstart=170, tend=2900, PLOT=['EEG', 'SP', 'EMG_AMP', 'HYPNO', 'DFF'], dff_nbin=1800, eeg_nbin=130, fmax=25, vm=[50,1800], highres=False, pnorm=0, psmooth=[2,5], flatten_tnrem=4, ma_thr=0) #%% ### FIGURE 1F - average DF/F signal in each brain state ### ppath = '/home/fearthekraken/Documents/Data/photometry' recordings = sleepy.load_recordings(ppath, 'crh_photometry.txt')[1] df = AS.dff_activity(ppath, recordings, istate=[1,2,3,4], ma_thr=20, flatten_tnrem=4, ma_state=3) #%% ### FIGURE 1G - example EEG theta burst & DF/F signal ### ppath = '/home/fearthekraken/Documents/Data/photometry' AS.plot_example(ppath, 'hans_091118n1', tstart=2415, tend=2444, PLOT=['SP', 'DFF'], dff_nbin=450, fmax=20, vm=[0,5], highres=True, recalc_highres=False, nsr_seg=2.5, perc_overlap=0.8, pnorm=1, psmooth=[4,4]) #%% ### FIGURE 1H - average spectral field during REM ### ppath = '/home/fearthekraken/Documents/Data/photometry' recordings = sleepy.load_recordings(ppath, 'crh_photometry.txt')[1] pwaves.spectralfield_highres_mice(ppath, recordings, pre=4, post=4, istate=[1], theta=[1,10,100,1000,10000], pnorm=1, psmooth=[6,1], fmax=25, nsr_seg=2, perc_overlap=0.8, recalc_highres=True) #%% ### FIGURE 2B - recorded P-waveforms ### ppath ='/media/fearthekraken/Mandy_HardDrive1/nrem_transitions' # left - example LFP trace with P-waves AS.plot_example(ppath, 'Fincher_040221n1', tstart=16112, tend=16119, PLOT=['LFP'], lfp_nbin=7, ylims=[(-0.4, 0.2)]) # right - average P-waveform recordings = sleepy.load_recordings(ppath, 'pwaves_mice.txt')[0] pwaves.avg_waveform(ppath, recordings, istate=[], win=[0.15,0.15], mode='pwaves', plaser=False, p_iso=0, pcluster=0, clus_event='waves') #%% ### FIGURE 2C - average P-wave frequency in each brain state ### ppath ='/media/fearthekraken/Mandy_HardDrive1/nrem_transitions/' recordings = sleepy.load_recordings(ppath, 'pwaves_mice.txt')[0] istate = [1,2,3,4]; p_iso=0; pcluster=0 _,_,_,_ = pwaves.state_freq(ppath, recordings, istate, plotMode='03', ma_thr=20, flatten_tnrem=4, ma_state=3, p_iso=p_iso, pcluster=pcluster, ylim2=[-0.3, 0.1]) #%% ### FIGURE 2D - time-normalized P-wave frequency across brain state transitions ### ppath ='/media/fearthekraken/Mandy_HardDrive1/nrem_transitions/' recordings = sleepy.load_recordings(ppath, 'pwaves_mice.txt')[0] sequence=[3,4,1,2]; state_thres=[(0,10000)]*len(sequence); nstates=[20,20,20,20]; vm=[0.2, 2.1] # NREM --> IS --> REM --> WAKE _, mx_pwave, _ = pwaves.stateseq(ppath, recordings, sequence=sequence, nstates=nstates, state_thres=state_thres, ma_thr=20, ma_state=3, flatten_tnrem=4, fmax=25, pnorm=1, vm=vm, psmooth=[2,2], mode='pwaves', mouse_avg='mouse', print_stats=False) #%% ### FIGURE 2E - example theta burst & P-waves ### ppath = '/media/fearthekraken/Mandy_HardDrive1/dreadds_processed/' AS.plot_example(ppath, 'Scrabble_072420n1', tstart=11318.6, tend=11323, PLOT=['SP','EEG','LFP'], eeg_nbin=1, lfp_nbin=6, fmax=20, vm=[0,4.5], highres=True, recalc_highres=False, nsr_seg=1, perc_overlap=0.85, pnorm=1, psmooth=[4,5]) #%% ### FIGURE 2F - averaged spectral power surrounding P-waves ### ppath ='/media/fearthekraken/Mandy_HardDrive1/nrem_transitions/' recordings = sleepy.load_recordings(ppath, 'pwaves_mice.txt')[0] filename = 'sp_win3' # top - averaged spectrogram pwaves.avg_SP(ppath, recordings, istate=[1], win=[-3,3], mouse_avg='mouse', plaser=False, pnorm=2, psmooth=[2,2], fmax=25, vm=[0.8,1.5], pload=filename, psave=filename) # bottom - averaged high theta power _ = pwaves.avg_band_power(ppath, recordings, istate=[1], bands=[(8,15)], band_colors=['green'], win=[-3,3], mouse_avg='mouse', plaser=False, pnorm=2, psmooth=0, ylim=[0.6,1.8], pload=filename, psave=filename) #%% ### FIGURE 2H - example DF/F signal and P-waves ### ppath = '/home/fearthekraken/Documents/Data/photometry' AS.plot_example(ppath, 'Fritz_032819n1', tstart=2991, tend=2996.75, PLOT=['DFF','LFP_THRES_ANNOT'], dff_nbin=50, lfp_nbin=10) #%% ### FIGURE 2I - DF/F signal surrounding P-waves ### ppath ='/media/fearthekraken/Mandy_HardDrive1/nrem_transitions/' # top - diagrams of P-waveforms recordings = sleepy.load_recordings(ppath, 'pwaves_mice.txt')[0] p_iso=0.8; pcluster=0; clus_event='waves' # single P-waves #p_iso=0; pcluster=0.1; clus_event='cluster start' # clustered P-waves pwaves.avg_waveform(ppath, recordings, istate=[], win=[1,1], mode='pwaves', plaser=False, p_iso=p_iso, pcluster=pcluster, clus_event=clus_event, wform_std=False) # middle/bottom - heatmaps & average DF/F plots ppath = '/home/fearthekraken/Documents/Data/photometry' recordings = sleepy.load_recordings(ppath, 'pwaves_photometry.txt')[1] # single P-waves pzscore=[2,2,2]; p_iso=0.8; pcluster=0; ylim=[-0.4,1.0]; vm=[-1,1.5] iso_mx = pwaves.dff_timecourse(ppath, recordings, istate=0, plotMode='ht', dff_win=[10,10], pzscore=pzscore, mouse_avg='mouse', base_int=2.5, baseline_start=0, p_iso=p_iso, pcluster=pcluster, clus_event='waves', ylim=ylim, vm=vm, psmooth=(8,15), ds=1000, sf=1000)[0] # clustered P-waves pzscore=[2,2,2]; p_iso=0; pcluster=0.5; ylim=[-0.4,1.0]; vm=[-1,1.5] clus_mx = pwaves.dff_timecourse(ppath, recordings, istate=0, plotMode='ht', dff_win=[10,10], pzscore=pzscore, mouse_avg='mouse', base_int=2.5, baseline_start=0, p_iso=p_iso, pcluster=pcluster, clus_event='waves', ylim=ylim, vm=vm, psmooth=(4,15), ds=1000, sf=1000)[0] # random points pzscore=[2,2,2]; p_iso=0.8; pcluster=0; ylim=[-0.4,1.0]; vm=[-1,1.5] jter_mx = pwaves.dff_timecourse(ppath, recordings, istate=0, plotMode='ht', dff_win=[10,10], pzscore=pzscore, mouse_avg='mouse', base_int=2.5, baseline_start=0, p_iso=p_iso, pcluster=pcluster, clus_event='waves', ylim=ylim, vm=vm, psmooth=(8,15), ds=1000, sf=1000, jitter=10)[0] #%% ### FIGURE 3B - example open loop opto recording ### ppath = '/home/fearthekraken/Documents/Data/sleepRec_processed' AS.plot_example(ppath, 'Huey_082719n1', tstart=12300, tend=14000, PLOT=['LSR', 'SP', 'HYPNO'], fmax=25, vm=[50,1800], highres=False, pnorm=0, psmooth=[2,2], flatten_tnrem=4, ma_thr=10) #%% ### FIGURE 3C,D - percent time spent in each brain state surrounding laser ### ppath = '/home/fearthekraken/Documents/Data/sleepRec_processed/' recordings = sleepy.load_recordings(ppath, 'crh_chr2_ol.txt')[1] BS, t, df = AS.laser_brainstate(ppath, recordings, pre=400, post=520, flatten_tnrem=4, ma_state=3, ma_thr=20, edge=10, sf=0, ci='sem', ylim=[0,80]) #%% ### FIGURE 3E - averaged SPs and frequency band power surrounding laser ### ppath = '/home/fearthekraken/Documents/Data/sleepRec_processed/' recordings = sleepy.load_recordings(ppath, 'crh_chr2_ol.txt')[1] bands=[(0.5,4), (6,10), (11,15), (55,99)]; band_labels=['delta', 'theta', 'sigma', 'gamma']; band_colors=['firebrick', 'limegreen', 'cyan', 'purple'] AS.laser_triggered_eeg_avg(ppath, recordings, pre=400, post=520, fmax=100, laser_dur=120, pnorm=1, psmooth=3, harmcs=10, iplt_level=2, vm=[0.6,1.4], sf=7, bands=bands, band_labels=band_labels, band_colors=band_colors, ci=95, ylim=[0.6,1.3]) #%% ### FIGURE 3G - example closed loop opto recording ### ppath = '/home/fearthekraken/Documents/Data/sleepRec_processed/' AS.plot_example(ppath, 'Cinderella_022420n1', tstart=7100, tend=10100, PLOT=['LSR', 'SP', 'HYPNO'], fmax=25, vm=[0,1500], highres=False, pnorm=0, psmooth=[2,3], flatten_tnrem=4, ma_thr=0) #%% ### FIGURE 3H - closed-loop ChR2 graph ### ppath = '/home/fearthekraken/Documents/Data/sleepRec_processed/' recordings = sleepy.load_recordings(ppath, 'crh_chr2_cl.txt')[1] _ = AS.state_online_analysis(ppath, recordings, istate=1, plotMode='03', ylim=[0,130]) #%% ### FIGURE 3I - eYFP controls for ChR2 ### ppath = '/home/fearthekraken/Documents/Data/sleepRec_processed/' recordings = sleepy.load_recordings(ppath, 'crh_yfp_chr2_cl.txt')[1] _ = AS.state_online_analysis(ppath, recordings, istate=1, plotMode='03', ylim=[0,130]) #%% ### FIGURE 3J - closed-loop iC++ graph ### ppath = '/home/fearthekraken/Documents/Data/sleepRec_processed/' recordings = sleepy.load_recordings(ppath, 'crh_ic_cl.txt')[1] _ = AS.state_online_analysis(ppath, recordings, istate=1, plotMode='03', ylim=[0,130]) #%% ### FIGURE 3K - eYFP controls for iC++ ### ppath = '/home/fearthekraken/Documents/Data/sleepRec_processed/' recordings = sleepy.load_recordings(ppath, 'crh_yfp_ic_cl.txt')[1] _ = AS.state_online_analysis(ppath, recordings, istate=1, plotMode='03', ylim=[0,130]) #%% ### FIGURE 4B - example spontaneous & laser-triggered P-wave ### ppath = '/home/fearthekraken/Documents/Data/sleepRec_processed' recordings = sleepy.load_recordings(ppath, 'lsr_pwaves.txt')[1] AS.plot_example(ppath, 'Huey_101719n1', tstart=5925, tend=5930, PLOT=['LSR', 'EEG', 'LFP'], eeg_nbin=5, lfp_nbin=10) #%% ### FIGURE 4C,D,E - waveforms & spectral power surrounding P-waves/laser ### ppath = '/home/fearthekraken/Documents/Data/sleepRec_processed' recordings = sleepy.load_recordings(ppath, 'lsr_pwaves.txt')[1] # top - averaged waveforms surrounding P-waves & laser filename = 'wf_win025'; wform_win = [0.25,0.25]; istate=[1] pwaves.avg_waveform(ppath, recordings, istate, mode='pwaves', win=wform_win, mouse_avg='trials', # spontaneous & laser-triggered P-waves plaser=True, post_stim=0.1, pload=filename, psave=filename, ylim=[-0.3,0.1]) pwaves.avg_waveform(ppath, recordings, istate, mode='lsr', win=wform_win, mouse_avg='trials', # successful & failed laser plaser=True, post_stim=0.1, pload=filename, psave=filename, ylim=[-0.3,0.1]) # middle - averaged SPs surrounding P-waves & laser filename = 'sp_win3'; win=[-3,3]; pnorm=2 pwaves.avg_SP(ppath, recordings, istate=[1], mode='pwaves', win=win, plaser=True, post_stim=0.1, # spontaneous & laser-triggered P-waves mouse_avg='mouse', pnorm=pnorm, psmooth=[(8,8),(8,8)], vm=[(0.82,1.32),(0.8,1.45)], fmax=25, recalc_highres=False, pload=filename, psave=filename) pwaves.avg_SP(ppath, recordings, istate=[1], mode='lsr', win=win, plaser=True, post_stim=0.1, # successful & failed laser mouse_avg='mouse', pnorm=pnorm, psmooth=[(8,8),(8,8)], vm=[(0.82,1.32),(0.6,1.8)], fmax=25, recalc_highres=False, pload=filename, psave=filename) # bottom - average high theta power surrounding P-waves & laser _ = pwaves.avg_band_power(ppath, recordings, istate=[1], mode='pwaves', win=win, plaser=True, # spontaneous & laser-triggered P-waves post_stim=0.1, mouse_avg='mouse', bands=[(8,15)], band_colors=[('green')], pnorm=pnorm, psmooth=0, fmax=25, pload=filename, psave=filename, ylim=[0.5,1.5]) # successful and failed laser _ = pwaves.avg_band_power(ppath, recordings, istate=[1], mode='lsr', win=win, plaser=True, # successful & failed laser post_stim=0.1, mouse_avg='mouse', bands=[(8,15)], band_colors=[('green')], pnorm=pnorm, psmooth=0, fmax=25, pload=filename, psave=filename, ylim=[0.5,1.5]) #%% ### FIGURE 4F - spectral profiles: null vs spon vs success lsr vs fail lsr ### ppath = '/home/fearthekraken/Documents/Data/sleepRec_processed' recordings = sleepy.load_recordings(ppath, 'lsr_pwaves.txt')[1] filename = 'sp_win3' spon_win=[-0.5, 0.5]; lsr_win=[0,1]; collect_win=[-3,3]; frange=[0, 20]; pnorm=2; null=True; null_win=0; null_match='lsr' df = pwaves.sp_profiles(ppath, recordings, spon_win=spon_win, lsr_win=lsr_win, collect_win=collect_win, frange=frange, null=null, null_win=null_win, null_match=null_match, plaser=True, post_stim=0.1, pnorm=pnorm, psmooth=12, mouse_avg='mouse', ci='sem', pload=filename, psave=filename) #%% ### FIGURE 4G - probability of laser success per brainstate ### ppath = '/home/fearthekraken/Documents/Data/sleepRec_processed' recordings = sleepy.load_recordings(ppath, 'lsr_pwaves.txt')[1] filename = 'lsr_stats' df = pwaves.get_lsr_stats(ppath, recordings, istate=[1,2,3,4], lsr_jitter=5, post_stim=0.1, flatten_tnrem=4, ma_thr=20, ma_state=3, psave=filename) _ = pwaves.lsr_state_success(df, istate=[1,2,3,4]) # true laser success _ = pwaves.lsr_state_success(df, istate=[1], jstate=[1]) # true vs sham laser success #%% ### FIGURE 4H - latencies of elicited P-waves to laser ### ppath = '/home/fearthekraken/Documents/Data/sleepRec_processed' recordings = sleepy.load_recordings(ppath, 'lsr_pwaves.txt')[1] df = pd.read_pickle('lsr_stats.pkl') pwaves.lsr_pwave_latency(df, istate=1, jitter=True) #%% ### FIGURE 4I - phase preferences of spontaneous & laser-triggered P-waves ### ppath = '/home/fearthekraken/Documents/Data/sleepRec_processed' recordings = sleepy.load_recordings(ppath, 'lsr_pwaves.txt')[1] filename = 'lsr_phases' pwaves.lsr_hilbert(ppath, recordings, istate=1, bp_filt=[6,12], min_state_dur=30, stat='perc', mode='pwaves', mouse_avg='trials', bins=9, pload=filename, psave=filename) #%% ### FIGURE 5B,C - example recordings of hm3dq + saline vs cno ### ppath = '/media/fearthekraken/Mandy_HardDrive1/nrem_transitions/' AS.plot_example(ppath, 'Dahl_030321n1', tstart=3960, tend=5210, PLOT=['EEG', 'SP', 'HYPNO', 'EMG_AMP'], eeg_nbin=100, # saline fmax=25, vm=[15,2200], psmooth=(1,2), flatten_tnrem=4, ma_thr=0, ylims=[[-0.6,0.6],'','',[0,300]]) AS.plot_example(ppath, 'Dahl_031021n1', tstart=3620, tend=4870, PLOT=['EEG', 'SP', 'HYPNO', 'EMG_AMP'], eeg_nbin=100, # CNO fmax=25, vm=[15,2200], psmooth=(1,2), flatten_tnrem=4, ma_thr=0, ylims=[[-0.6,0.6],'','',[0,300]]) #%% ### FIGURE 5D - hm3dq percent time spent in REM ### ppath = '/media/fearthekraken/Mandy_HardDrive1/nrem_transitions/' (c, e) = AS.load_recordings(ppath, 'crh_hm3dq_tnrem.txt', dose=True, pwave_channel=False); e=e['0.25'] cmice, cT = pwaves.sleep_timecourse(ppath, c, istate=[1], tbin=18000, n=1, stats='perc', flatten_tnrem=4, pplot=False) # saline emice, eT = pwaves.sleep_timecourse(ppath, e, istate=[1], tbin=18000, n=1, stats='perc', flatten_tnrem=4, pplot=False) # CNO pwaves.plot_sleep_timecourse([cT,eT], [cmice, emice], tstart=0, tbin=18000, stats='perc', plotMode='03', group_colors=['gray', 'blue'], group_labels=['saline','cno']) # stats df = pwaves.df_from_timecourse_dict([cT,eT], [cmice,emice], ['0','0.25']) pwaves.pairT_from_df(df.iloc[np.where(df['state']==1)[0],:], 'dose', '0', '0.25', ['t0'], print_notice='### STATE = 1 ###') #%% ### FIGURE 5E - hm3dq mean REM duration ### ppath = '/media/fearthekraken/Mandy_HardDrive1/nrem_transitions/' (c, e) = AS.load_recordings(ppath, 'crh_hm3dq_tnrem.txt', dose=True, pwave_channel=False); e=e['0.25'] cmice, cT = pwaves.sleep_timecourse(ppath, c, istate=[1], tbin=18000, n=1, stats='dur', flatten_tnrem=4, pplot=False) # saline emice, eT = pwaves.sleep_timecourse(ppath, e, istate=[1], tbin=18000, n=1, stats='dur', flatten_tnrem=4, pplot=False) # CNO pwaves.plot_sleep_timecourse([cT,eT], [cmice, emice], tstart=0, tbin=18000, stats='dur', plotMode='03', group_colors=['gray', 'blue'], group_labels=['saline','cno']) # stats df = pwaves.df_from_timecourse_dict([cT,eT], [cmice,emice], ['0','0.25']) pwaves.pairT_from_df(df.iloc[np.where(df['state']==1)[0],:], 'dose', '0', '0.25', ['t0'], print_notice='### STATE = 1 ###') #%% ### FIGURE 5F - hm3dq mean REM frequency ### ppath = '/media/fearthekraken/Mandy_HardDrive1/nrem_transitions/' (c, e) = AS.load_recordings(ppath, 'crh_hm3dq_tnrem.txt', dose=True, pwave_channel=False); e=e['0.25'] cmice, cT = pwaves.sleep_timecourse(ppath, c, istate=[1], tbin=18000, n=1, stats='freq', flatten_tnrem=4, pplot=False) # saline emice, eT = pwaves.sleep_timecourse(ppath, e, istate=[1], tbin=18000, n=1, stats='freq', flatten_tnrem=4, pplot=False) # CNO pwaves.plot_sleep_timecourse([cT,eT], [cmice, emice], tstart=0, tbin=18000, stats='freq', plotMode='03', group_colors=['gray', 'blue'], group_labels=['saline','cno']) # stats df = pwaves.df_from_timecourse_dict([cT,eT], [cmice,emice], ['0','0.25']) pwaves.pairT_from_df(df.iloc[np.where(df['state']==1)[0],:], 'dose', '0', '0.25', ['t0'], print_notice='### STATE = 1 ###') #%% ### FIGURE 5G - hm3dq percent time spent in Wake/NREM/IS ### ppath = '/media/fearthekraken/Mandy_HardDrive1/nrem_transitions/' (c, e) = AS.load_recordings(ppath, 'crh_hm3dq_tnrem.txt', dose=True, pwave_channel=False); e=e['0.25'] cmice, cT = pwaves.sleep_timecourse(ppath, c, istate=[2,3,4], tbin=18000, n=1, stats='perc', flatten_tnrem=4, pplot=False) # saline emice, eT = pwaves.sleep_timecourse(ppath, e, istate=[2,3,4], tbin=18000, n=1, stats='perc', flatten_tnrem=4, pplot=False) # CNO pwaves.plot_sleep_timecourse([cT,eT], [cmice, emice], tstart=0, tbin=18000, stats='perc', plotMode='03', group_colors=['gray', 'blue'], group_labels=['saline','cno']) # stats df = pwaves.df_from_timecourse_dict([cT,eT], [cmice,emice], ['0','0.25']) for s in [2,3,4]: pwaves.pairT_from_df(df.iloc[np.where(df['state']==s)[0],:], 'dose', '0', '0.25', ['t0'], print_notice='### STATE = ' + str(s) + ' ###') #%% ### FIGURE 5H - hm3dq probability of IS-->REM transition ### ppath = '/media/fearthekraken/Mandy_HardDrive1/nrem_transitions/' (c, e) = AS.load_recordings(ppath, 'crh_hm3dq_tnrem.txt', dose=True, pwave_channel=False); e=e['0.25'] cmice, cT = pwaves.sleep_timecourse(ppath, c, istate=[1], tbin=18000, n=1, stats='transition probability', flatten_tnrem=False, pplot=False) # saline emice, eT = pwaves.sleep_timecourse(ppath, e, istate=[1], tbin=18000, n=1, stats='transition probability', flatten_tnrem=False, pplot=False) # CNO pwaves.plot_sleep_timecourse([cT,eT], [cmice, emice], tstart=0, tbin=18000, stats='transition probability', plotMode='03', group_colors=['gray', 'blue'], group_labels=['saline','cno']) # stats df = pwaves.df_from_timecourse_dict([cT,eT], [cmice,emice], ['0','0.25']) pwaves.pairT_from_df(df, 'dose', '0', '0.25', ['t0'], print_notice='### STATE = 1 ###') #%% ### FIGURE 5I - example P-waves during NREM-->IS-->REM transitions ### ppath = '/media/fearthekraken/Mandy_HardDrive1/nrem_transitions/' AS.plot_example(ppath, 'King_071020n1', ['HYPNO', 'EEG', 'LFP'], tstart=16097, tend=16172, ylims=['',(-0.6, 0.6), (-0.3, 0.15)]) # saline AS.plot_example(ppath, 'King_071520n1', ['HYPNO', 'EEG', 'LFP'], tstart=5600, tend=5675, ylims=['',(-0.6, 0.6), (-0.3, 0.15)]) # CNO #%% ### FIGURE 5J - hm3dq time-normalized P-wave frequency across brain state transitions ### ppath = '/media/fearthekraken/Mandy_HardDrive1/nrem_transitions/' (c, e) = AS.load_recordings(ppath, 'crh_hm3dq_tnrem.txt', dose=True, pwave_channel=True); e=e['0.25'] c = [i[0] for i in c if i[1] != 'X']; e = [i[0] for i in e if i[1] != 'X'] sequence=[3,4,1,2]; state_thres=[(0,10000)]*len(sequence); nstates=[20,20,20,20]; cvm=[0.3,2.5]; evm= [0.28,2.2] # NREM --> IS --> REM --> WAKE mice,cmx,cspe = pwaves.stateseq(ppath, c, sequence=sequence, nstates=nstates, state_thres=state_thres, fmax=25, pnorm=1, # saline vm=cvm, psmooth=[2,2], mode='pwaves', mouse_avg='mouse', pplot=False, print_stats=False) mice,emx,espe = pwaves.stateseq(ppath, e, sequence=sequence, nstates=nstates, state_thres=state_thres, fmax=25, pnorm=1, # CNO vm=evm, psmooth=[2,2], mode='pwaves', mouse_avg='mouse', pplot=False, print_stats=False) # plot timecourses pwaves.plot_activity_transitions([cmx, emx], [mice, mice], plot_id=['gray', 'blue'], group_labels=['saline', 'cno'], xlim=nstates, xlabel='Time (normalized)', ylabel='P-waves/s', title='NREM-->tNREM-->REM-->Wake') #%% ### FIGURE 5K - hm3dq average P-wave frequency in each brain state ### ppath = '/media/fearthekraken/Mandy_HardDrive1/nrem_transitions/' (c, e) = AS.load_recordings(ppath, 'crh_hm3dq_tnrem.txt', dose=True, pwave_channel=True); e=e['0.25'] c = [i[0] for i in c if i[1] != 'X']; e = [i[0] for i in e if i[1] != 'X'] # top - mean P-wave frequency mice, x, cf, cw = pwaves.state_freq(ppath, c, istate=[1,2,3,4], flatten_tnrem=4, pplot=False, print_stats=False) # saline mice, x, ef, ew = pwaves.state_freq(ppath, e, istate=[1,2,3,4], flatten_tnrem=4, pplot=False, print_stats=False) # CNO pwaves.plot_state_freq(x, [mice, mice], [cf, ef], [cw, ew], group_colors=['gray', 'blue'], group_labels=['saline','cno']) # bottom - change in P-wave frequency from saline to CNO fdif = (ef-cf) df = pd.DataFrame(columns=['Mouse','State','Change']) for i,state in enumerate(x): df = df.append(pd.DataFrame({'Mouse':mice, 'State':[state]*len(mice), 'Change':fdif[:,i]})) plt.figure(); sns.barplot(x='State', y='Change', data=df, order=['NREM', 'tNREM', 'REM', 'Wake'], color='lightblue', ci=68) sns.swarmplot(x='State', y='Change', data=df, order=['NREM', 'tNREM', 'REM', 'Wake'], color='black', size=9); plt.show() # stats for i,s in enumerate([1,2,3,4]): p = stats.ttest_rel(cf[:,i], ef[:,i], nan_policy='omit') print(f'saline vs cno, state={s} -- T={round(p.statistic,3)}, p-value={round(p.pvalue,5)}') #%% ### FIGURE 5L - hm4di percent time spent in REM ### ppath = '/media/fearthekraken/Mandy_HardDrive1/nrem_transitions/' (c, e) = AS.load_recordings(ppath, 'crh_hm4di_tnrem.txt', dose=True, pwave_channel=False); e=e['5'] cmice, cT = pwaves.sleep_timecourse(ppath, c, istate=[1], tbin=18000, n=1, stats='perc', flatten_tnrem=4, pplot=False) # saline emice, eT = pwaves.sleep_timecourse(ppath, e, istate=[1], tbin=18000, n=1, stats='perc', flatten_tnrem=4, pplot=False) # CNO pwaves.plot_sleep_timecourse([cT,eT], [cmice, emice], tstart=0, tbin=18000, stats='perc', plotMode='03', group_colors=['gray', 'red'], group_labels=['saline','cno']) # stats df = pwaves.df_from_timecourse_dict([cT,eT], [cmice,emice], ['0','5']) pwaves.pairT_from_df(df.iloc[np.where(df['state']==1)[0],:], 'dose', '0', '5', ['t0'], print_notice='### STATE = 1 ###') #%% ### FIGURE 5M - hm4di mean REM duration ### ppath = '/media/fearthekraken/Mandy_HardDrive1/nrem_transitions/' (c, e) = AS.load_recordings(ppath, 'crh_hm4di_tnrem.txt', dose=True, pwave_channel=False); e=e['5'] cmice, cT = pwaves.sleep_timecourse(ppath, c, istate=[1], tbin=18000, n=1, stats='dur', flatten_tnrem=4, pplot=False) # saline emice, eT = pwaves.sleep_timecourse(ppath, e, istate=[1], tbin=18000, n=1, stats='dur', flatten_tnrem=4, pplot=False) # CNO pwaves.plot_sleep_timecourse([cT,eT], [cmice, emice], tstart=0, tbin=18000, stats='dur', plotMode='03', group_colors=['gray', 'red'], group_labels=['saline','cno']) # stats df = pwaves.df_from_timecourse_dict([cT,eT], [cmice,emice], ['0','5']) pwaves.pairT_from_df(df.iloc[np.where(df['state']==1)[0],:], 'dose', '0', '5', ['t0'], print_notice='### STATE = 1 ###') #%% ### FIGURE 5N - hm4di mean REM frequency ### ppath = '/media/fearthekraken/Mandy_HardDrive1/nrem_transitions/' (c, e) = AS.load_recordings(ppath, 'crh_hm4di_tnrem.txt', dose=True, pwave_channel=False); e=e['5'] cmice, cT = pwaves.sleep_timecourse(ppath, c, istate=[1], tbin=18000, n=1, stats='freq', flatten_tnrem=4, pplot=False) # saline emice, eT = pwaves.sleep_timecourse(ppath, e, istate=[1], tbin=18000, n=1, stats='freq', flatten_tnrem=4, pplot=False) # CNO pwaves.plot_sleep_timecourse([cT,eT], [cmice, emice], tstart=0, tbin=18000, stats='freq', plotMode='03', group_colors=['gray', 'red'], group_labels=['saline','cno']) # stats df = pwaves.df_from_timecourse_dict([cT,eT], [cmice,emice], ['0','5']) pwaves.pairT_from_df(df.iloc[np.where(df['state']==1)[0],:], 'dose', '0', '5', ['t0'], print_notice='### STATE = 1 ###') #%% ### FIGURE 5O - hm4di percent time spent in Wake/NREM/IS ### ppath = '/media/fearthekraken/Mandy_HardDrive1/nrem_transitions/' (c, e) = AS.load_recordings(ppath, 'crh_hm4di_tnrem.txt', dose=True, pwave_channel=False); e=e['5'] cmice, cT = pwaves.sleep_timecourse(ppath, c, istate=[2,3,4], tbin=18000, n=1, stats='perc', flatten_tnrem=4, pplot=False) # saline emice, eT = pwaves.sleep_timecourse(ppath, e, istate=[2,3,4], tbin=18000, n=1, stats='perc', flatten_tnrem=4, pplot=False) # CNO pwaves.plot_sleep_timecourse([cT,eT], [cmice, emice], tstart=0, tbin=18000, stats='perc', plotMode='03', group_colors=['gray', 'red'], group_labels=['saline','cno']) # stats df = pwaves.df_from_timecourse_dict([cT,eT], [cmice,emice], ['0','5']) for s in [2,3,4]: pwaves.pairT_from_df(df.iloc[np.where(df['state']==s)[0],:], 'dose', '0', '5', ['t0'], print_notice='### STATE = ' + str(s) + ' ###') #%% ### FIGURE 5P - hm4di probability of IS-->REM transition ### ppath = '/media/fearthekraken/Mandy_HardDrive1/nrem_transitions/' (c, e) = AS.load_recordings(ppath, 'crh_hm4di_tnrem.txt', dose=True, pwave_channel=False); e=e['5'] cmice, cT = pwaves.sleep_timecourse(ppath, c, istate=[1], tbin=18000, n=1, stats='transition probability', flatten_tnrem=False, pplot=False) # saline emice, eT = pwaves.sleep_timecourse(ppath, e, istate=[1], tbin=18000, n=1, stats='transition probability', flatten_tnrem=False, pplot=False) # CNO pwaves.plot_sleep_timecourse([cT,eT], [cmice, emice], tstart=0, tbin=18000, stats='transition probability', plotMode='03', group_colors=['gray', 'red'], group_labels=['saline','cno']) # stats df = pwaves.df_from_timecourse_dict([cT,eT], [cmice,emice], ['0','5']) pwaves.pairT_from_df(df, 'dose', '0', '5', ['t0'], print_notice='### STATE = 1 ###') #%% ### FIGURE 5Q - hm4di time-normalized P-wave frequency across brain state transitions ### ppath = '/media/fearthekraken/Mandy_HardDrive1/nrem_transitions/' (c, e) = AS.load_recordings(ppath, 'crh_hm4di_tnrem.txt', dose=True, pwave_channel=True); e=e['5'] c = [i[0] for i in c if i[1] != 'X']; e = [i[0] for i in e if i[1] != 'X'] sequence=[3,4,1,2]; state_thres=[(0,10000)]*len(sequence); nstates=[20,20,20,20]; cvm=[0.3,2.5]; evm= [0.28,2.2] # NREM --> IS --> REM --> WAKE mice,cmx,cspe = pwaves.stateseq(ppath, c, sequence=sequence, nstates=nstates, state_thres=state_thres, fmax=25, pnorm=1, # saline vm=cvm, psmooth=[2,2], mode='pwaves', mouse_avg='mouse', pplot=False, print_stats=False) mice,emx,espe = pwaves.stateseq(ppath, e, sequence=sequence, nstates=nstates, state_thres=state_thres, fmax=25, pnorm=1, # CNO vm=evm, psmooth=[2,2], mode='pwaves', mouse_avg='mouse', pplot=False, print_stats=False) # plot timecourses pwaves.plot_activity_transitions([cmx, emx], [mice, mice], plot_id=['gray', 'red'], group_labels=['saline', 'cno'], xlim=nstates, xlabel='Time (normalized)', ylabel='P-waves/s', title='NREM-->tNREM-->REM-->Wake') #%% ### FIGURE 5R - hm4di average P-wave frequency in each brain state ### ppath = '/media/fearthekraken/Mandy_HardDrive1/nrem_transitions/' (c, e) = AS.load_recordings(ppath, 'crh_hm4di_tnrem.txt', dose=True, pwave_channel=True); e=e['5'] c = [i[0] for i in c if i[1] != 'X']; e = [i[0] for i in e if i[1] != 'X'] # top - mean P-wave frequency mice, x, cf, cw = pwaves.state_freq(ppath, c, istate=[1,2,3,4], flatten_tnrem=4, pplot=False, print_stats=False) # saline mice, x, ef, ew = pwaves.state_freq(ppath, e, istate=[1,2,3,4], flatten_tnrem=4, pplot=False, print_stats=False) # CNO pwaves.plot_state_freq(x, [mice, mice], [cf, ef], [cw, ew], group_colors=['gray', 'red'], group_labels=['saline','cno']) # bottom - change in P-wave frequency from saline to CNO fdif = (ef-cf) df = pd.DataFrame(columns=['Mouse','State','Change']) for i,state in enumerate(x): df = df.append(pd.DataFrame({'Mouse':mice, 'State':[state]*len(mice), 'Change':fdif[:,i]})) plt.figure(); sns.barplot(x='State', y='Change', data=df, order=['NREM', 'tNREM', 'REM', 'Wake'], color='salmon', ci=68) sns.swarmplot(x='State', y='Change', data=df, order=['NREM', 'tNREM', 'REM', 'Wake'], color='black', size=9); plt.show() # stats for i,s in enumerate([1,2,3,4]): p = stats.ttest_rel(cf[:,i], ef[:,i], nan_policy='omit') print(f'saline vs cno, state={s} -- T={round(p.statistic,3)}, p-value={round(p.pvalue,5)}')
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3825, 2556, 838, 1248, 25, 1270, 25, 3510, 33448, 198, 198, 31, 9800, 25, 730, 433, 258, ...
2.151351
13,809
from .filter_service import FilterService
[ 6738, 764, 24455, 62, 15271, 1330, 25853, 16177, 198 ]
4.666667
9
import pickle from copy import deepcopy from graphviz import Digraph from torch.nn import Conv2d, MaxPool2d, ELU, Dropout, BatchNorm2d import pandas as pd from EEGNAS.model_generation.abstract_layers import IdentityLayer, ConvLayer, PoolingLayer, ActivationLayer from EEGNAS.model_generation.custom_modules import IdentityModule SHORT_NAMES = {Conv2d: 'C', MaxPool2d: 'M', ELU: 'E', Dropout: 'D', BatchNorm2d: 'B'} sum_path = "/home/user/Documents/eladr/netflowinsights/CDN_overflow_prediction/eegnas_models/195_10_input_height_240_normalized_handovers_all_inheritance_fold9_architectures_iteration_1.p" per_path = '/home/user/Documents/eladr/netflowinsights/CDN_overflow_prediction/eegnas_models/197_10_input_height_240_normalized_per_handover_handovers_all_inheritance_fold9_architectures_iteration_1.p' weighted_population_per = pickle.load(open(per_path, 'rb')) weighted_population_sum = pickle.load(open(sum_path, 'rb')) # export_eegnas_table([weighted_population_per[i]['finalized_model'] for i in range(5)], 'per_architectures.csv') # export_eegnas_table([weighted_population_sum[i]['finalized_model'] for i in range(5)], 'sum_architectures.csv') create_ensemble_digraph(weighted_population_per, 5)
[ 11748, 2298, 293, 198, 6738, 4866, 1330, 2769, 30073, 198, 198, 6738, 4823, 85, 528, 1330, 7367, 1470, 198, 6738, 28034, 13, 20471, 1330, 34872, 17, 67, 11, 5436, 27201, 17, 67, 11, 17852, 52, 11, 14258, 448, 11, 347, 963, 35393, 17...
2.543825
502
from requests.auth import AuthBase import hmac import base64 import hashlib import urlparse import urllib #add your custom auth handler class to this module #template #example of adding a client certificate #example of adding a client certificate #cloudstack auth example
[ 6738, 7007, 13, 18439, 1330, 26828, 14881, 198, 11748, 289, 20285, 198, 11748, 2779, 2414, 198, 11748, 12234, 8019, 198, 11748, 19016, 29572, 198, 11748, 2956, 297, 571, 198, 198, 2, 2860, 534, 2183, 6284, 21360, 1398, 284, 428, 8265, 1...
2.934579
107
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See LICENSE.txt in the project root for # license information. # -------------------------------------------------------------------------- from azure.core.pipeline import PipelineRequest, PipelineResponse from azure.core.pipeline.policies import AsyncHTTPPolicy from azure.core.pipeline.policies.authentication import _BearerTokenCredentialPolicyBase
[ 2, 16529, 45537, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 38559, 24290, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321, 13, 198, 2, 16529, 35937, ...
4.88785
107
from .trial import Trial, NoTrial from .member import Member from .population import Population __all__ = ['Trial', 'NoTrial', 'Member', 'Population']
[ 6738, 764, 45994, 1330, 21960, 11, 1400, 51, 4454, 198, 6738, 764, 19522, 1330, 10239, 198, 6738, 764, 39748, 1330, 20133, 198, 198, 834, 439, 834, 796, 37250, 51, 4454, 3256, 705, 2949, 51, 4454, 3256, 705, 27608, 3256, 705, 45251, 2...
3.534884
43
import multiprocessing from tqdm import tqdm import os import gdal from .downloader import downloader from .obsclient import bucket from .vector import Vector def Process( VectorDataSource, WgsCord, Class_key, DataSourcesType='Google China', DataSetName="DataSet", Remote_dataset_root="DataSets/", Thread_count=2, Nodata=0, Merge=False, Keep_local=True, Over_write=True, Upload=False, **args ): """ Step I: Init Downlaoder,Bucket,Vector Step II: Init default vector layer Init area , imagery level of mission Step III: Download Merge(Optional) Rasterize Step IV: Upload to Bucket Last Step: If don't save temp dataset ,clean the cache args: for obs server: ak : access_key_id, sk : secret_access_key, server : server bn : bucketname """ print("\033[1;32# ---------------------------------------------------------------------------- #\033[0m") print("\033[1;32# DARTH #\033[0m") print("\033[1;32# ---------------------------------------------------------------------------- #\033[0m") print("# ===== Bucket para preview\033[1;32 %s\033[0m"%args) print("\n\n\n# ---------------------------------------------------------------------------- #") print("# ---------------------------------- Step I ---------------------------------- #") print("# ---------------------------------------------------------------------------- #") Download=downloader(DataSourcesType,thread_count=Thread_count) if Upload: Bucket=bucket( access_key_id=args["ak"], secret_access_key=args["sk"], server=args["server"], bucketName=args["bn"] ) if not Over_write: Bucket.check(remote_metaname) Vec=Vector(VectorDataSource) remote_metaname=Remote_dataset_root+DataSetName+"/.meta" print("\n\n\n# ---------------------------------------------------------------------------- #") print("# ---------------------------------- Step II --------------------------------- #") print("# ---------------------------------------------------------------------------- #") Vec.getDefaultLayerbyName(Class_key) Download.add_cord(*WgsCord) Vec.crop_default_layer_by_rect(Download.mercator_cord) print("\n\n\n# ---------------------------------------------------------------------------- #") print("# --------------------------------- Step III --------------------------------- #") print("# ---------------------------------------------------------------------------- #") image_dir=os.path.join(DataSetName,'images/') targets_dir=os.path.join(DataSetName,'targets/') print("# ===== imagery dir :\033[1;32%s\033[0m"%image_dir) print("# ===== targets dir :\033[1;32%s\033[0m"%targets_dir) if not os.path.exists("./"+DataSetName): os.makedirs(image_dir) os.makedirs(targets_dir) local_metaname=DataSetName+"/.meta" with open(local_metaname,"w") as meta: if Upload: meta.write( "Bucket Meta:\n"+str(Bucket.getBucketMetadata()) ) meta.write( "Vector object Meta:\n"+str(Vec.meta) ) meta.close() if Upload: bucket_imagery_root=os.path.join(Remote_dataset_root,image_dir) bucket_targets_root=os.path.join(Remote_dataset_root,targets_dir) bucket_description_root=os.path.join(Remote_dataset_root,DataSetName+"/") print("# ===== Bucket imagery root :\033[1;32%s\033[0m",bucket_imagery_root) print("# ===== Bucket Targets root :\033[1;32%s\033[0m",bucket_targets_root) print("# ===== Bucket Description root :\033[1;32%s\033[0m",bucket_description_root) Bucket.cd("DataSets") Bucket.ls() print("\033[5;36# ===== Start Downloading.....\033[0m") Download.download(output_path=image_dir) tiles=[i["path"] for i in Download.result] Vec.generate(tiles,output_path=targets_dir) if Upload: print("\n\n\n# ---------------------------------------------------------------------------- #") print("# ---------------------------------- Step IV --------------------------------- #") print("# ---------------------------------------------------------------------------- #") print("# ===== Upload dataset meta\033[1;32%s\033[0m"%remote_metaname) Bucket.upload( remote_path=remote_metaname, local_path=local_metaname ) ## Saveing index json file remote_json_path=os.path.join(bucket_description_root,Download.json_path.split('/')[-1]) print("# ===== Upload dataset description\033[1;32%s\033[0m"%remote_json_path) if not Over_write: Bucket.check(remote_json_path) Bucket.upload( remote_path=remote_json_path, local_path=Download.json_path ) print("# ===== upload imagry to bucket.....") for tile in tqdm(tiles): file_name=tile.split('/')[-1] remote_tiles=os.path.join(bucket_imagery_root,file_name) if not Over_write: Bucket.check(remote_tiles) Bucket.upload( remote_path=remote_tiles, local_path=tile ) print("# ===== upload target to bucket.....") for target in tqdm(Vec.labellist): file_name=target.split('/')[-1] remote_target=os.path.join(bucket_targets_root,file_name) if not Over_write: Bucket.check(remote_target) Bucket.upload( remote_path=remote_target, local_path=target ) print("# ===== uploaded bucket:") Bucket.ls() if not Keep_local: print("# ------------------------------- Clear-cache ------------------------------- #") cmd="rm -rf "+DataSetName os.system(cmd) print("# -------------------------------- Clear-Done ------------------------------- #") print("# ---------------------------------------------------------------------------- #") print("# DataSet process done #") print("# ---------------------------------------------------------------------------- #") if __name__ == '__main__': main()
[ 11748, 18540, 305, 919, 278, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 28686, 198, 11748, 308, 31748, 628, 198, 198, 6738, 764, 15002, 263, 1330, 4321, 263, 198, 6738, 764, 8158, 16366, 1330, 19236, 198, 6738, 764, ...
2.404232
2,788
import sys from setuptools import setup required_packages = ["boombox", "Pillow", "PyYAML", "rich"] win_packages = ["keyboard"] unix_packages = ["pynput"] WIN = "win32" LINUX = "linux" MACOS = "darwin" if sys.platform == WIN: required_packages += win_packages elif sys.platform in (LINUX, MACOS): required_packages += unix_packages setup( name="pantheras_box", version="0.1.0", packages=[ "pantheras_box", "pantheras_box.story", "pantheras_box.sounds", "pantheras_box.backend", "pantheras_box.frontend", "pantheras_box.keyboard_handlers", ], url="", license="MIT", author="Patient Panthers", author_email="", description="Pantheras box TUI game.", install_requires=required_packages, entry_points={ "console_scripts": [ "pantheras-box = pantheras_box.run:run_game", ], }, package_data={"": ["**/*.txt", "**/*.yaml", "**/*.png", "**/*.wav"]}, include_package_data=True, )
[ 11748, 25064, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 35827, 62, 43789, 796, 14631, 2127, 2381, 1140, 1600, 366, 47, 359, 322, 1600, 366, 20519, 56, 2390, 43, 1600, 366, 7527, 8973, 198, 198, 5404, 62, 43789, 796, 146...
2.223195
457
from zipcodes import is_valid from random import randint from all_lunch_locs import call_lunch_api default_max = 30 default_range = 20 if __name__ == '__main__': # format of the json # CombinedMultiDict([ImmutableMultiDict([]), ImmutableMultiDict( # [('token', 'workspace token'), ('team_id', 'team_id'), ('team_domain', 'some_string_name'), # ('channel_id', 'some_channel_id'), ('channel_name', 'some_channel_name'), ('user_id', 'user_id_requested'), ('user_name', 'user_name_requested'), # ('command', '/lunch'), ('text', '80233'), #<---- args # ('response_url', 'response url'), # ('trigger_id', 'slash trigger command')])]) print(create_lunch_event({'text': '80020 20'})) print(create_lunch_event({'text': '20'}))
[ 6738, 19974, 40148, 1330, 318, 62, 12102, 198, 6738, 4738, 1330, 43720, 600, 198, 6738, 477, 62, 75, 3316, 62, 17946, 82, 1330, 869, 62, 75, 3316, 62, 15042, 198, 198, 12286, 62, 9806, 796, 1542, 198, 12286, 62, 9521, 796, 1160, 628...
2.581699
306
""" # -*- coding: utf-8 -*- __author__ = "Trakos" __email__ = "mhdeiimhdeiika@gmail.com" __version__ = 1.0.0" __copyright__ = "Copyright (c) 2019 -2021 Leonard Richardson" # Use of this source code is governed by the MIT license. __license__ = "MIT" Description: py-Insta Is A Python Library Scrape Instagram Data And Print It Or You Can Define It Into A Variable... ##### __version__ = 1.0 import requests from bs4 import BeautifulSoup __url__ = "https://www.instagram.com/{}/" def Insta(username): try: response = requests.get(__url__.format(username.replace('@','')),timeout=5) # InCase Someone Types @UserName if '404' in str(response): # If The Username Is Invalid data = 'No Such Username' return data else: soup = BeautifulSoup(response.text, "html.parser") meta = soup.find("meta", property="og:description") try: s = meta.attrs['content'].split(' ') data = { 'Followers': s[0], 'Following': s[2], 'Posts': s[4], 'Name': s[13] } return data except requests.exceptions.InvalidURL: return 'No Such Username' except (requests.ConnectionError, requests.Timeout): return 'No InterNet Connection'
[ 198, 37811, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 834, 9800, 834, 796, 366, 15721, 46150, 1, 198, 834, 12888, 834, 796, 366, 76, 71, 2934, 72, 320, 71, 2934, 72, 9232, 31, 14816, 13, 785, 1, 198, ...
2.139183
661
from pyopenproject.api_connection.exceptions.request_exception import RequestError from pyopenproject.api_connection.requests.post_request import PostRequest from pyopenproject.business.exception.business_error import BusinessError from pyopenproject.business.services.command.membership.membership_command import MembershipCommand from pyopenproject.model import membership as mem
[ 6738, 12972, 9654, 16302, 13, 15042, 62, 38659, 13, 1069, 11755, 13, 25927, 62, 1069, 4516, 1330, 19390, 12331, 198, 6738, 12972, 9654, 16302, 13, 15042, 62, 38659, 13, 8897, 3558, 13, 7353, 62, 25927, 1330, 2947, 18453, 198, 6738, 1297...
4.303371
89
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import torch from lottery.branch import base import models.registry from pruning.mask import Mask from pruning.pruned_model import PrunedModel from training import train from utils.tensor_utils import shuffle_state_dict, weight_erank, feature_erank, activation, generate_mask_active, features_spectral, features_frobenius, features_spectral_fro_ratio, erank from platforms.platform import get_platform from foundations import paths import json import os import datasets.registry import copy import matplotlib matplotlib.use('pdf') import matplotlib.pyplot as plt import tqdm import seaborn as sns import pandas as pd import numpy as np from utils.tensor_utils import generate_mask_active, erank, shuffle_tensor, mutual_coherence sns.set_style("whitegrid")
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 428, 2723, 5509, 13, 198, 198, ...
3.492537
268
#!/usr/bin/env python # -*- coding: UTF-8 -*- from collections import OrderedDict from decimal import Decimal from parser_data import InlineList, DuplicationList from state import State, StateMachine from type_check import is_int, is_float, is_sci_notation from format import format from error import DMPException def load(fp, options=None): config = { # 'verbose': True, } if options is not None: config.update(options) machine = ParserStateMachine(config) try: machine.runAll(fp) except State.Error as err: raise DMPException.wraps(err) return PostProcessor.run(machine.get_data()) def dump(data, options=None): config = { # 'verbose': True, } if options is not None: config.update(options) lines = [] for key, val in data.iteritems(): lines += format(key, val) # Adds Trailing newline lines.append('') return '\n'.join(lines) def _test(infile, outfile): with open(infile, 'r') as fp: data = load(fp) with open(infile, 'r') as fp: raw = fp.read() # print json.dumps(data, indent=4) out = dump(data) with open(outfile, 'w') as fp: fp.write(out) import subprocess subprocess.call(['diff', infile, outfile]) subprocess.call(['rm', outfile]) if __name__ == "__main__": ALL_DATA = [ "ContractSystem.txt", "Funding.txt", "PCScenario.txt", "ProgressTracking.txt", "Reputation.txt", "ResearchAndDevelopment.txt", "ResourceScenario.txt", "ScenarioDestructibles.txt", "ScenarioNewGameIntro.txt", "ScenarioUpgradeableFacilities.txt", "StrategySystem.txt", "VesselRecovery.txt", ] outfile = './tmp.txt' import os.path for filename in ALL_DATA: infile = os.path.join('../Universe/Scenarios/Saevon/', filename) _test(infile, outfile)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 32465, 1330, 4280, 4402, 198, 198, 6738, 30751, 62, 7890, 1330, 554, 1...
2.34375
832
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project # root for license information. from typing import List from pathlib import Path from azure.storage.blob import ContainerClient from redact.types.file_bundle import FileBundle
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 198, 2, 6808, 329, 5964, 1321, 13, 198, 198, 6738, 19720, 1330, 7343, 198, 6738, 3108, ...
4.013158
76
import torch import math from .grids import * from .conversions import * # ============================================================================= # Equirectangular mapping functions # ============================================================================= # # Note that there is no concept of padding for spherical images because there # are no image boundaries. # # def equirectangular_kernel(shape, kernel_size, dilation=1): """ Returns a kernel sampling grid with angular spacing according to the provided shape (and associated computed angular resolution) of an equirectangular image shape: (H, W) kernel_size: (kh, kw) """ # For convenience kh, kw = kernel_size # Get equirectangular grid resolution res_lon, res_lat = get_equirectangular_grid_resolution(shape) # Build the kernel according to the angular resolution of the equirectangular image dlon = torch.zeros(kernel_size) dlat = torch.zeros(kernel_size) for i in range(kh): cur_i = i - (kh // 2) for j in range(kw): cur_j = j - (kw // 2) dlon[i, j] = cur_j * dilation * res_lon # Flip sign is because +Y is down dlat[i, j] = cur_i * dilation * -res_lat # Returns the kernel differentials as kh x kw return dlon, dlat # ============================================================================= # Cube map mapping functions # ============================================================================= def cube_kernel(cube_dim, kernel_size, dilation=1): """ Returns a kernel sampling grid with angular spacing according to the provided cube dimension (and associated computed angular resolution) of a cube map cube_dim: length of side of square face of cube map kernel_size: (kh, kw) """ # For convenience kh, kw = kernel_size cube_res = 1 / cube_dim # Build the kernel according to the angular resolution of the cube face dx = torch.zeros(kernel_size) dy = torch.zeros(kernel_size) for i in range(kh): cur_i = i - (kh // 2) for j in range(kw): cur_j = j - (kw // 2) dx[i, j] = cur_j * dilation * cube_res # Flip sign is because +Y is down dy[i, j] = cur_i * dilation * -cube_res # Returns the kernel differentials as kh x kw return dx, dy def inverse_cube_face_projection_map(cube_dim, kernel_size, stride=1, dilation=1, polar=False): """ Creates a sampling map which models each face of the cube as an gnomonic projection (equatorial aspect) of the sphere. Warps the kernel according to the inverse gnomonic projection for the face. """ # For convenience kh, kw = kernel_size # Get a meshgrid of a cube face in terms of spherical coordinates face_lon, face_lat = cube_face_spherical_meshgrid(cube_dim, polar) # Get the kernel differentials dx, dy = cube_kernel(cube_dim, kernel_size, dilation) # Equalize views face_lat = face_lat.view(cube_dim, cube_dim, 1) face_lon = face_lon.view(cube_dim, cube_dim, 1) dx = dx.view(1, 1, kh * kw) dy = dy.view(1, 1, kh * kw) # Compute the inverse gnomonic projection of each tangent grid (the kernel) back onto sphere at each pixel of the cube face rho = (dx**2 + dy**2).sqrt() nu = rho.atan() map_lat = (nu.cos() * face_lat.sin() + dy * nu.sin() * face_lat.cos() / rho).asin() map_lon = face_lon + torch.atan2( dx * nu.sin(), rho * face_lat.cos() * nu.cos() - dy * face_lat.sin() * nu.sin()) # Handle the (0,0) case map_lat[..., [kh * kw // 2]] = face_lat map_lon[..., [kh * kw // 2]] = face_lon # Create the sample map in terms of spherical coordinates map_face = torch.stack((map_lon, map_lat), -1) # Convert the cube coordinates on the sphere to pixels in the cube map map_pixels = convert_spherical_to_cube_face(map_face, cube_dim) # Adjust the stride of the map accordingly map_pixels = map_pixels[::stride, ::stride, ...].contiguous() # Return the pixel sampling map # cube_dime x cube_dim x KH*KW x 2 return map_pixels
[ 11748, 28034, 198, 11748, 10688, 198, 198, 6738, 764, 2164, 2340, 1330, 1635, 198, 6738, 764, 1102, 47178, 1330, 1635, 198, 198, 2, 38093, 25609, 198, 2, 7889, 1060, 21413, 16855, 5499, 198, 2, 38093, 25609, 198, 2, 198, 2, 5740, 326,...
2.667284
1,620
import json from typing import Any, Callable, Dict, Optional import attr from .interfaces import Event, Router
[ 11748, 33918, 198, 198, 6738, 19720, 1330, 4377, 11, 4889, 540, 11, 360, 713, 11, 32233, 198, 198, 11748, 708, 81, 198, 198, 6738, 764, 3849, 32186, 1330, 8558, 11, 48538, 628, 628, 628 ]
3.5
34
"""autogenerated by genpy from multi_map_server/VerticalOccupancyGridList.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct _struct_I = genpy.struct_I _struct_2f = struct.Struct("<2f")
[ 37811, 2306, 519, 877, 515, 416, 2429, 9078, 422, 5021, 62, 8899, 62, 15388, 14, 42369, 605, 47658, 3883, 41339, 8053, 13, 19662, 13, 2141, 407, 4370, 526, 15931, 198, 11748, 25064, 198, 29412, 18, 796, 6407, 611, 25064, 13, 33095, 96...
2.976471
85
""" ============== GLVQ Benchmark ============== This example shows the differences between the 4 different GLVQ implementations and LMNN. The Image Segmentation dataset is used for training and test. Each plot shows the projection and classification from each implementation. Because Glvq can't project the data on its own a PCA is used. """ from __future__ import with_statement import numpy as np import matplotlib.pyplot as plt from metric_learn import LMNN from sklearn.decomposition import PCA from sklearn_lvq import GlvqModel, GrlvqModel, LgmlvqModel, GmlvqModel from sklearn_lvq.utils import _to_tango_colors, _tango_color print(__doc__) y = [] x = [] with open('segmentation.data') as f: for line in f: v = line.split(',') y.append(v[0]) x.append(v[1:]) x = np.asarray(x, dtype='float64') y = np.asarray(y) lmnn = LMNN(k=5, learn_rate=1e-6) lmnn.fit(x, y) x_t = lmnn.transform(x) p1 = plt.subplot(231) p1.scatter(x_t[:, 0], x_t[:, 1], c=_to_tango_colors(y, 0)) p1.axis('equal') p1.set_title('LMNN') # GLVQ glvq = GlvqModel() glvq.fit(x, y) p2 = plt.subplot(232) p2.set_title('GLVQ') plot(PCA().fit_transform(x), y, glvq.predict(x), glvq.w_, glvq.c_w_, p2) # GRLVQ grlvq = GrlvqModel() grlvq.fit(x, y) p3 = plt.subplot(233) p3.set_title('GRLVQ') plot(grlvq.project(x, 2), y, grlvq.predict(x), grlvq.project(grlvq.w_, 2), grlvq.c_w_, p3) # GMLVQ gmlvq = GmlvqModel() gmlvq.fit(x, y) p4 = plt.subplot(234) p4.set_title('GMLVQ') plot(gmlvq.project(x, 2), y, gmlvq.predict(x), gmlvq.project(gmlvq.w_, 2), gmlvq.c_w_, p4) # LGMLVQ lgmlvq = LgmlvqModel() lgmlvq.fit(x, y) p5 = plt.subplot(235) elem_set = list(set(lgmlvq.c_w_)) p5.set_title('LGMLVQ 1') plot(lgmlvq.project(x, 1, 2, True), y, lgmlvq.predict(x), lgmlvq.project(np.array([lgmlvq.w_[1]]), 1, 2), elem_set.index(lgmlvq.c_w_[1]), p5) p6 = plt.subplot(236) p6.set_title('LGMLVQ 2') plot(lgmlvq.project(x, 6, 2, True), y, lgmlvq.predict(x), lgmlvq.project(np.array([lgmlvq.w_[6]]), 6, 2), elem_set.index(lgmlvq.c_w_[6]), p6) plt.show()
[ 37811, 198, 25609, 855, 198, 8763, 53, 48, 25187, 4102, 198, 25609, 855, 198, 1212, 1672, 2523, 262, 5400, 1022, 262, 604, 1180, 10188, 53, 48, 25504, 290, 37125, 6144, 13, 198, 464, 7412, 1001, 5154, 341, 27039, 318, 973, 329, 3047, ...
2.00289
1,038