repo
stringlengths
2
99
file
stringlengths
13
225
code
stringlengths
0
18.3M
file_length
int64
0
18.3M
avg_line_length
float64
0
1.36M
max_line_length
int64
0
4.26M
extension_type
stringclasses
1 value
s2anet
s2anet-master/mmdet/models/backbones/__init__.py
from .hrnet import HRNet from .resnet import ResNet, make_res_layer from .resnext import ResNeXt from .ssd_vgg import SSDVGG __all__ = ['ResNet', 'make_res_layer', 'ResNeXt', 'SSDVGG', 'HRNet']
195
27
68
py
s2anet
s2anet-master/mmdet/models/mask_heads/grid_head.py
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import kaiming_init, normal_init from ..builder import build_loss from ..registry import HEADS from ..utils import ConvModule @HEADS.register_module class GridHead(nn.Module): def __init__(self, ...
15,429
41.624309
79
py
s2anet
s2anet-master/mmdet/models/mask_heads/maskiou_head.py
import numpy as np import torch import torch.nn as nn from mmcv.cnn import kaiming_init, normal_init from torch.nn.modules.utils import _pair from mmdet.core import force_fp32 from ..builder import build_loss from ..registry import HEADS @HEADS.register_module class MaskIoUHead(nn.Module): """Mask IoU Head. ...
7,418
37.842932
79
py
s2anet
s2anet-master/mmdet/models/mask_heads/__init__.py
from .fcn_mask_head import FCNMaskHead from .fused_semantic_head import FusedSemanticHead from .grid_head import GridHead from .htc_mask_head import HTCMaskHead from .maskiou_head import MaskIoUHead __all__ = [ 'FCNMaskHead', 'HTCMaskHead', 'FusedSemanticHead', 'GridHead', 'MaskIoUHead' ]
299
26.272727
66
py
s2anet
s2anet-master/mmdet/models/mask_heads/htc_mask_head.py
from ..registry import HEADS from ..utils import ConvModule from .fcn_mask_head import FCNMaskHead @HEADS.register_module class HTCMaskHead(FCNMaskHead): def __init__(self, *args, **kwargs): super(HTCMaskHead, self).__init__(*args, **kwargs) self.conv_res = ConvModule( self.conv_out_c...
1,178
29.230769
78
py
s2anet
s2anet-master/mmdet/models/mask_heads/fcn_mask_head.py
import mmcv import numpy as np import pycocotools.mask as mask_util import torch import torch.nn as nn from torch.nn.modules.utils import _pair from mmdet.core import auto_fp16, force_fp32, mask_target from ..builder import build_loss from ..registry import HEADS from ..utils import ConvModule @HEADS.register_module...
7,043
37.703297
79
py
s2anet
s2anet-master/mmdet/models/mask_heads/fused_semantic_head.py
import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import kaiming_init from mmdet.core import auto_fp16, force_fp32 from ..registry import HEADS from ..utils import ConvModule @HEADS.register_module class FusedSemanticHead(nn.Module): r"""Multi-level fused semantic segmentation head. in_1 -...
3,554
32.224299
79
py
s2anet
s2anet-master/mmdet/datasets/custom.py
import os.path as osp import mmcv import numpy as np from torch.utils.data import Dataset from .pipelines import Compose from .registry import DATASETS @DATASETS.register_module class CustomDataset(Dataset): """Custom dataset for detection. Annotation format: [ { 'filename': 'a.jpg'...
5,161
32.738562
76
py
s2anet
s2anet-master/mmdet/datasets/voc.py
from .registry import DATASETS from .xml_style import XMLDataset @DATASETS.register_module class VOCDataset(XMLDataset): CLASSES = ('aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedpla...
695
32.142857
78
py
s2anet
s2anet-master/mmdet/datasets/registry.py
from mmdet.utils import Registry DATASETS = Registry('dataset') PIPELINES = Registry('pipeline')
98
18.8
32
py
s2anet
s2anet-master/mmdet/datasets/cityscapes.py
from .coco import CocoDataset from .registry import DATASETS @DATASETS.register_module class CityscapesDataset(CocoDataset): CLASSES = ('person', 'rider', 'car', 'truck', 'bus', 'train', 'motorcycle', 'bicycle')
234
22.5
79
py
s2anet
s2anet-master/mmdet/datasets/hrsc2016.py
import os import os.path as osp import xml.etree.ElementTree as ET import mmcv import numpy as np from DOTA_devkit.hrsc2016_evaluation import voc_eval from mmdet.core import norm_angle from mmdet.core import rotated_box_to_poly_single from .builder import DATASETS from .xml_style import XMLDataset @DATASETS.registe...
6,810
35.228723
119
py
s2anet
s2anet-master/mmdet/datasets/dataset_wrappers.py
import bisect import math from collections import defaultdict import numpy as np from torch.utils.data.dataset import ConcatDataset as _ConcatDataset from .registry import DATASETS @DATASETS.register_module class ConcatDataset(_ConcatDataset): """A wrapper of concatenated dataset. Same as :obj:`torch.utils...
2,315
29.88
79
py
s2anet
s2anet-master/mmdet/datasets/xml_style.py
import os.path as osp import xml.etree.ElementTree as ET import mmcv import numpy as np from .custom import CustomDataset from .registry import DATASETS @DATASETS.register_module class XMLDataset(CustomDataset): def __init__(self, min_size=None, **kwargs): super(XMLDataset, self).__init__(**kwargs) ...
3,070
34.298851
79
py
s2anet
s2anet-master/mmdet/datasets/__init__.py
from .builder import build_dataset from .cityscapes import CityscapesDataset from .coco import CocoDataset from .custom import CustomDataset from .dataset_wrappers import ConcatDataset, RepeatDataset from .loader import DistributedGroupSampler, GroupSampler, build_dataloader from .registry import DATASETS from .voc imp...
773
34.181818
75
py
s2anet
s2anet-master/mmdet/datasets/dota.py
import os.path as osp import mmcv import numpy as np from DOTA_devkit.ResultMerge_multi_process import mergebypoly from DOTA_devkit.dota_evaluation_task1 import voc_eval from mmdet.core import rotated_box_to_poly_single from .custom import CustomDataset from .registry import DATASETS @DATASETS.register_module class...
3,375
40.170732
119
py
s2anet
s2anet-master/mmdet/datasets/builder.py
import copy from mmdet.utils import build_from_cfg from .dataset_wrappers import ConcatDataset, RepeatDataset from .registry import DATASETS def _concat_dataset(cfg, default_args=None): ann_files = cfg['ann_file'] img_prefixes = cfg.get('img_prefix', None) seg_prefixes = cfg.get('seg_prefixes', None) ...
1,457
33.714286
78
py
s2anet
s2anet-master/mmdet/datasets/coco.py
import numpy as np from pycocotools.coco import COCO from .custom import CustomDataset from .registry import DATASETS @DATASETS.register_module class CocoDataset(CustomDataset): CLASSES = ('person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic_light', 'fir...
4,304
37.783784
79
py
s2anet
s2anet-master/mmdet/datasets/wider_face.py
import os.path as osp import xml.etree.ElementTree as ET import mmcv from .registry import DATASETS from .xml_style import XMLDataset @DATASETS.register_module class WIDERFaceDataset(XMLDataset): """ Reader for the WIDER Face dataset in PASCAL VOC format. Conversion scripts can be found in https://g...
1,301
29.27907
65
py
s2anet
s2anet-master/mmdet/datasets/loader/sampler.py
from __future__ import division import math import numpy as np import torch from mmcv.runner.utils import get_dist_info from torch.utils.data import DistributedSampler as _DistributedSampler from torch.utils.data import Sampler class DistributedSampler(_DistributedSampler): def __init__(self, dataset, num_repli...
5,832
34.567073
78
py
s2anet
s2anet-master/mmdet/datasets/loader/build_loader.py
import platform from functools import partial from mmcv.parallel import collate from mmcv.runner import get_dist_info from torch.utils.data import DataLoader from .sampler import DistributedGroupSampler, DistributedSampler, GroupSampler if platform.system() != 'Windows': # https://github.com/pytorch/pytorch/issu...
1,559
30.836735
78
py
s2anet
s2anet-master/mmdet/datasets/loader/__init__.py
from .build_loader import build_dataloader from .sampler import DistributedGroupSampler, GroupSampler __all__ = ['GroupSampler', 'DistributedGroupSampler', 'build_dataloader']
177
34.6
73
py
s2anet
s2anet-master/mmdet/datasets/pipelines/test_aug.py
import mmcv from ..registry import PIPELINES from .compose import Compose @PIPELINES.register_module class MultiScaleFlipAug(object): def __init__(self, transforms, img_scale, flip=False): self.transforms = Compose(transforms) self.img_scale = img_scale if isinstance(img_scale, ...
1,312
32.666667
71
py
s2anet
s2anet-master/mmdet/datasets/pipelines/loading.py
import os.path as osp import warnings import mmcv import numpy as np import pycocotools.mask as maskUtils from ..registry import PIPELINES @PIPELINES.register_module class LoadImageFromFile(object): def __init__(self, to_float32=False): self.to_float32 = to_float32 def __call__(self, results): ...
5,246
33.519737
77
py
s2anet
s2anet-master/mmdet/datasets/pipelines/compose.py
import collections from mmdet.utils import build_from_cfg from ..registry import PIPELINES @PIPELINES.register_module class Compose(object): def __init__(self, transforms): assert isinstance(transforms, collections.abc.Sequence) self.transforms = [] for transform in transforms: ...
1,073
28.833333
71
py
s2anet
s2anet-master/mmdet/datasets/pipelines/formating.py
from collections.abc import Sequence import mmcv import numpy as np import torch from mmcv.parallel import DataContainer as DC from ..registry import PIPELINES def to_tensor(data): """Convert objects of various python types to :obj:`torch.Tensor`. Supported types are: :class:`numpy.ndarray`, :class:`torch....
6,008
31.13369
93
py
s2anet
s2anet-master/mmdet/datasets/pipelines/__init__.py
from .compose import Compose from .formating import (Collect, ImageToTensor, ToDataContainer, ToTensor, Transpose, to_tensor) from .loading import LoadAnnotations, LoadImageFromFile, LoadProposals from .test_aug import MultiScaleFlipAug from .transforms import (Albu, Expand, MinIoURandomCrop, No...
1,071
50.047619
79
py
s2anet
s2anet-master/mmdet/datasets/pipelines/transforms_rotated.py
import random import cv2 import numpy as np from mmdet.core import poly_to_rotated_box_np, rotated_box_to_poly_np, norm_angle from .transforms import RandomFlip, Resize from ..registry import PIPELINES @PIPELINES.register_module class RotatedRandomFlip(RandomFlip): def bbox_flip(self, bboxes, img_shape): ...
5,635
33.365854
96
py
s2anet
s2anet-master/mmdet/datasets/pipelines/transforms.py
import inspect import albumentations import mmcv import numpy as np from albumentations import Compose from imagecorruptions import corrupt from numpy import random from mmdet.core.evaluation.bbox_overlaps import bbox_overlaps from ..registry import PIPELINES @PIPELINES.register_module class Resize(object): """...
29,903
34.813174
79
py
s2anet
s2anet-master/mmdet/utils/registry.py
import inspect import mmcv class Registry(object): def __init__(self, name): self._name = name self._module_dict = dict() def __repr__(self): format_str = self.__class__.__name__ + '(name={}, items={})'.format( self._name, list(self._module_dict.keys())) return f...
2,304
28.935065
78
py
s2anet
s2anet-master/mmdet/utils/flops_counter.py
# Modified from flops-counter.pytorch by Vladislav Sovrasov # original repo: https://github.com/sovrasov/flops-counter.pytorch # MIT License # Copyright (c) 2018 Vladislav Sovrasov # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (th...
14,351
32.069124
79
py
s2anet
s2anet-master/mmdet/utils/__init__.py
from .flops_counter import get_model_complexity_info from .registry import Registry, build_from_cfg __all__ = ['Registry', 'build_from_cfg', 'get_model_complexity_info']
171
33.4
69
py
s2anet
s2anet-master/mmdet/ops/context_block.py
import torch from mmcv.cnn import constant_init, kaiming_init from torch import nn def last_zero_init(m): if isinstance(m, nn.Sequential): constant_init(m[-1], val=0) else: constant_init(m, val=0) class ContextBlock(nn.Module): def __init__(self, inplanes, ...
3,766
34.87619
76
py
s2anet
s2anet-master/mmdet/ops/__init__.py
from .context_block import ContextBlock from .dcn import (DeformConv, DeformConvPack, DeformRoIPooling, DeformRoIPoolingPack, ModulatedDeformConv, ModulatedDeformConvPack, ModulatedDeformRoIPoolingPack, deform_conv, deform_roi_pooling, modulated_deform_conv) from .m...
1,217
45.846154
88
py
s2anet
s2anet-master/mmdet/ops/dcn/deform_pool.py
import torch import torch.nn as nn from torch.autograd import Function from torch.autograd.function import once_differentiable from torch.nn.modules.utils import _pair from . import deform_pool_cuda class DeformRoIPoolingFunction(Function): @staticmethod def forward(ctx, data, ...
10,212
39.367589
79
py
s2anet
s2anet-master/mmdet/ops/dcn/deform_conv.py
import math import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Function from torch.autograd.function import once_differentiable from torch.nn.modules.utils import _pair from . import deform_conv_cuda class DeformConvFunction(Function): @staticmethod def forward(ct...
13,344
36.591549
80
py
s2anet
s2anet-master/mmdet/ops/dcn/__init__.py
from .deform_conv import (DeformConv, DeformConvPack, ModulatedDeformConv, ModulatedDeformConvPack, deform_conv, modulated_deform_conv) from .deform_pool import (DeformRoIPooling, DeformRoIPoolingPack, ModulatedDeformRoIPoolingPack, deform_ro...
582
43.846154
76
py
s2anet
s2anet-master/mmdet/ops/orn/__init__.py
from .modules.ORConv import ORConv2d from .functions import rotation_invariant_encoding,RotationInvariantPooling
113
37
75
py
s2anet
s2anet-master/mmdet/ops/orn/functions/active_rotating_filter.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import torch from torch import nn from torch.autograd import Function from torch.autograd.function import once_differentiable from torch.nn.modules.utils import _pair from .. import orn_cuda #import _C class _ActiveRotatingFilter(Function): @s...
2,736
27.510417
96
py
s2anet
s2anet-master/mmdet/ops/orn/functions/rotation_invariant_pooling.py
import torch from torch import nn from torch.nn import functional as F class RotationInvariantPooling(nn.Module): def __init__(self, nInputPlane, nOrientation=8): super(RotationInvariantPooling, self).__init__() self.nInputPlane = nInputPlane self.nOrientation = nOrientation hiddent_dim = int(n...
940
26.676471
76
py
s2anet
s2anet-master/mmdet/ops/orn/functions/__init__.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import torch from .active_rotating_filter import active_rotating_filter from .active_rotating_filter import ActiveRotatingFilter from .rotation_invariant_encoding import rotation_invariant_encoding from .rotation_invariant_encoding import RotationI...
551
60.333333
148
py
s2anet
s2anet-master/mmdet/ops/orn/functions/rotation_invariant_encoding.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import torch from torch import nn from torch.autograd import Function from torch.autograd.function import once_differentiable from torch.nn.modules.utils import _pair from .. import orn_cuda class _RotationInvariantEncoding(Function): @staticme...
1,900
31.775862
106
py
s2anet
s2anet-master/mmdet/ops/orn/modules/ORConv.py
from __future__ import absolute_import import math import torch from torch.nn.parameter import Parameter import torch.nn.functional as F from torch.nn.modules import Conv2d from torch.nn.modules.utils import _pair from ..functions import active_rotating_filter class ORConv2d(Conv2d): def __init__(self, in_channels,...
3,732
35.960396
121
py
s2anet
s2anet-master/mmdet/ops/orn/modules/__init__.py
from .ORConv import ORConv2d #from .ORConv_v2 import ORConv2d_v2 #__all__ = ['ORConv2d', 'ORConv2d_v2'] __all__ = ['ORConv2d']
128
20.5
38
py
s2anet
s2anet-master/mmdet/ops/box_iou_rotated/__init__.py
from .box_iou_rotated_cuda import box_iou_rotated __all__ = ['box_iou_rotated']
81
19.5
49
py
s2anet
s2anet-master/mmdet/ops/ml_nms_rotated/__init__.py
from .ml_nms_rotated_cuda import ml_nms_rotated __all__=['ml_nms_rotated']
76
18.25
47
py
s2anet
s2anet-master/mmdet/ops/masked_conv/masked_conv.py
import math import torch import torch.nn as nn from torch.autograd import Function from torch.autograd.function import once_differentiable from torch.nn.modules.utils import _pair from . import masked_conv2d_cuda class MaskedConv2dFunction(Function): @staticmethod def forward(ctx, features, mask, weight, b...
3,375
36.511111
79
py
s2anet
s2anet-master/mmdet/ops/masked_conv/__init__.py
from .masked_conv import MaskedConv2d, masked_conv2d __all__ = ['masked_conv2d', 'MaskedConv2d']
98
23.75
52
py
s2anet
s2anet-master/mmdet/ops/sigmoid_focal_loss/sigmoid_focal_loss.py
import torch.nn as nn from torch.autograd import Function from torch.autograd.function import once_differentiable from . import sigmoid_focal_loss_cuda class SigmoidFocalLossFunction(Function): @staticmethod def forward(ctx, input, target, gamma=2.0, alpha=0.25): ctx.save_for_backward(input, target)...
1,637
28.781818
77
py
s2anet
s2anet-master/mmdet/ops/sigmoid_focal_loss/__init__.py
from .sigmoid_focal_loss import SigmoidFocalLoss, sigmoid_focal_loss __all__ = ['SigmoidFocalLoss', 'sigmoid_focal_loss']
123
30
68
py
s2anet
s2anet-master/mmdet/ops/roi_align/roi_align.py
import torch.nn as nn from torch.autograd import Function from torch.autograd.function import once_differentiable from torch.nn.modules.utils import _pair from . import roi_align_cuda class RoIAlignFunction(Function): @staticmethod def forward(ctx, features, rois, out_size, spatial_scale, sample_num=0): ...
3,068
33.875
79
py
s2anet
s2anet-master/mmdet/ops/roi_align/gradcheck.py
import os.path as osp import sys import numpy as np import torch from torch.autograd import gradcheck sys.path.append(osp.abspath(osp.join(__file__, '../../'))) from roi_align import RoIAlign # noqa: E402, isort:skip feat_size = 15 spatial_scale = 1.0 / 8 img_size = feat_size / spatial_scale num_imgs = 2 num_rois =...
879
27.387097
76
py
s2anet
s2anet-master/mmdet/ops/roi_align/__init__.py
from .roi_align import RoIAlign, roi_align __all__ = ['roi_align', 'RoIAlign']
80
19.25
42
py
s2anet
s2anet-master/mmdet/ops/box_iou_rotated_diff/box_iou_rotated_diff.py
""" Differentiable IoU calculation for rotated boxes Most of the code is adapted from https://github.com/lilanxiao/Rotated_IoU """ import torch from .box_intersection_2d import oriented_box_intersection_2d def rotated_box_to_poly(rotated_boxes: torch.Tensor): """ Transform rotated boxes to polygons Args: ...
2,207
32.454545
102
py
s2anet
s2anet-master/mmdet/ops/box_iou_rotated_diff/box_intersection_2d.py
''' torch implementation of 2d oriented box intersection author: lanxiao li Modified by csuhan: Remove the `batch` indice in a tensor. This setting is more suitable for mmdet. ''' import torch from .sort_vertices_cuda import sort_vertices_forward EPSILON = 1e-8 def get_intersection_points(polys1: torch.Te...
6,963
35.460733
103
py
s2anet
s2anet-master/mmdet/ops/box_iou_rotated_diff/__init__.py
from .box_iou_rotated_diff import box_iou_rotated_differentiable __all__ = ['box_iou_rotated_differentiable']
110
36
64
py
s2anet
s2anet-master/mmdet/ops/nms_rotated/__init__.py
from . import nms_rotated_cuda __all__ = ['nms_rotated'] def nms_rotated(dets, iou_thr): if dets.shape[0] == 0: return dets keep_inds = nms_rotated_cuda.nms_rotated(dets[:, :5], dets[:, 5], iou_thr) dets = dets[keep_inds, :] return dets, keep_inds
275
22
78
py
s2anet
s2anet-master/mmdet/ops/roi_pool/roi_pool.py
import torch import torch.nn as nn from torch.autograd import Function from torch.autograd.function import once_differentiable from torch.nn.modules.utils import _pair from . import roi_pool_cuda class RoIPoolFunction(Function): @staticmethod def forward(ctx, features, rois, out_size, spatial_scale): ...
2,544
32.486842
78
py
s2anet
s2anet-master/mmdet/ops/roi_pool/gradcheck.py
import os.path as osp import sys import torch from torch.autograd import gradcheck sys.path.append(osp.abspath(osp.join(__file__, '../../'))) from roi_pool import RoIPool # noqa: E402, isort:skip feat = torch.randn(4, 16, 15, 15, requires_grad=True).cuda() rois = torch.Tensor([[0, 0, 0, 50, 50], [0, 10, 30, 43, 55]...
513
29.235294
66
py
s2anet
s2anet-master/mmdet/ops/roi_pool/__init__.py
from .roi_pool import RoIPool, roi_pool __all__ = ['roi_pool', 'RoIPool']
75
18
39
py
s2anet
s2anet-master/mmdet/ops/roi_align_rotated/__init__.py
from .roi_align_rotated import RoIAlignRotated __all__ = ['RoIAlignRotated']
78
18.75
46
py
s2anet
s2anet-master/mmdet/ops/roi_align_rotated/roi_align_rotated.py
# Copyright (c) Facebook, Inc. and its affiliates. import torch from torch import nn from torch.autograd import Function from torch.autograd.function import once_differentiable from torch.nn.modules.utils import _pair from .roi_align_rotated_cuda import roi_align_rotated_forward, roi_align_rotated_backward class _RO...
3,281
33.914894
90
py
s2anet
s2anet-master/mmdet/ops/nms/nms_wrapper.py
import numpy as np import torch from . import nms_cpu, nms_cuda from .soft_nms_cpu import soft_nms_cpu def nms(dets, iou_thr, device_id=None): """Dispatch to either CPU or GPU NMS implementations. The input can be either a torch tensor or numpy array. GPU NMS will be used if the input is a gpu tensor or...
2,580
31.670886
79
py
s2anet
s2anet-master/mmdet/ops/nms/__init__.py
from .nms_wrapper import nms, soft_nms __all__ = ['nms', 'soft_nms']
70
16.75
38
py
Simple-Vanilla-LSTM
Simple-Vanilla-LSTM-master/VanillaLSTM.py
import numpy as np class RecurrentNeuralNetwork: def __init__ (self, xs, ys, rl, eo, lr): #initial input self.x = np.zeros(xs) #input size self.xs = xs #expected output self.y = np.zeros(ys) #output size self.ys = ys #weight matrix for ...
10,289
37.977273
140
py
xaesa
xaesa-master/modified_widgets.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 2 15:02:40 2022 @author: kalinko """ from init import QTVer if QTVer == 4: from PyQt4 import QtGui, QtCore if QTVer == 5: from PyQt5 import QtWidgets as QtGui from PyQt5 import QtCore class QLineEditScroll(QtGui.QLineEdit): ...
1,917
32.649123
73
py
xaesa
xaesa-master/xaesa_viewer.py
# -*- coding: utf-8 -*- """ Created on Fri Apr 6 11:20:43 2018 @author: akali """ from init import QTVer if QTVer == 4: from PyQt4 import QtGui, QtCore from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as N...
5,904
32.174157
104
py
xaesa
xaesa-master/xaesa_xes_class.py
# -*- coding: utf-8 -*- """ Created on Fri Mar 2 15:07:33 2018 @author: akali """ from numpy import concatenate, logical_and, polyfit, where, zeros, sum from scipy.integrate import simps from scipy.interpolate import Rbf class xaesa_xes_class(): def __init__(self): self.name = "" ...
3,276
29.915094
108
py
xaesa
xaesa-master/xaesa_fit.py
# -*- coding: utf-8 -*- """ Created on Mon Oct 24 15:55:28 2016 @author: sasha """ import os from .init import QTVer if QTVer == 4: from PyQt4 import QtGui, QtCore from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToo...
38,370
40.392665
142
py
xaesa
xaesa-master/xaesaGUI.py
# -*- coding: utf-8 -*- #""" #Created on Fri Oct 7 12:25:31 2016 # #@author: sasha #""" XAESA_VERSION = "0.07" GUI_SETTINGS_ID = "XAESA" + XAESA_VERSION import sys from sys import exit, argv, version from os import path, getcwd, getpid import matplotlib.pyplot as plt from matplotlib import __version__ as mpl_versio...
178,553
43.16374
174
py
xaesa
xaesa-master/xaesa_settings.py
# -*- coding: utf-8 -*- """ Created on Fri Apr 6 11:20:43 2018 @author: akali """ from init import QTVer if QTVer == 4: from PyQt4 import QtGui, QtCore if QTVer == 5: from PyQt5 import QtWidgets as QtGui from PyQt5 import QtCore class xaesa_settings(QtGui.QWidget): def __init__(self, parent=Non...
2,976
32.449438
76
py
xaesa
xaesa-master/xaesa_lincombination.py
# -*- coding: utf-8 -*- """ Created on Thu Oct 20 11:07:03 2016 @author: sasha """ import os from .init import QTVer if QTVer == 4: from PyQt4 import QtGui, QtCore from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToo...
12,547
34.148459
105
py
xaesa
xaesa-master/interpolation_k2.py
# -*- coding: utf-8 -*- """ Created on Fri Nov 4 07:20:37 2022 @author: A.Kuzmin """ import numpy as np import matplotlib.pyplot as plt from scipy import interpolate from scipy.interpolate import make_lsq_spline from scipy.interpolate import InterpolatedUnivariateSpline #, BSpline #from scipy.interpolate import ...
3,137
19.376623
94
py
xaesa
xaesa-master/xaesa_deglitch.py
# -*- coding: utf-8 -*- """ Created on Thu Oct 20 11:07:03 2016 @author: sasha """ from .init import QTVer if QTVer == 4: from PyQt4 import QtGui, QtCore from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as...
12,510
34.242254
135
py
xaesa
xaesa-master/xaesa_exafs_class.py
# -*- coding: utf-8 -*- """ Created on Tue Feb 13 11:55:12 2018 @author: akali """ import sys import os from numpy import arange, argmin, argmax, argsort, asarray, concatenate, copy, delete, \ gradient, log, logical_and, multiply, newaxis, pi, power, \ sin, cos, sqrt, sum, whe...
24,396
32.93185
113
py
xaesa
xaesa-master/compare.py
# -*- coding: utf-8 -*- """ Created on Thu Oct 20 11:07:03 2016 @author: sasha """ from .init import QTVer if QTVer == 4: from PyQt4 import QtGui, QtCore from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as...
7,064
32.966346
108
py
xaesa
xaesa-master/xaesa_pca.py
# -*- coding: utf-8 -*- """ Created on Thu Oct 20 11:07:03 2016 @author: sasha """ import os from .init import QTVer if QTVer == 4: from PyQt4 import QtGui, QtCore from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToo...
17,208
34.926931
117
py
xaesa
xaesa-master/xalglib.py
########################################################################### # ALGLIB 3.13.0 (source code generated 2017-12-29) # Copyright (c) Sergey Bochkanov (ALGLIB project). # # >>> SOURCE LICENSE >>> # This software is a non-commercial edition of ALGLIB package, which is # licensed under ALGLIB Personal and A...
1,703,616
41.946884
412
py
xaesa
xaesa-master/init.py
# -*- coding: utf-8 -*- """ Created on Mon Oct 24 15:56:46 2016 @author: sasha """ QTVer = 0 def qtVersionToUse(): try: from PyQt4 import QtGui QTVer = 4 except: QTVer = 0 if QTVer == 0: try: from PyQt5 import QtWidgets as QtGui QTVer = 5 ...
416
15.038462
48
py
xaesa
xaesa-master/tooltiptexts.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 2 15:46:03 2022 @author: kalinko """ xas_es = 'Spectrum start energy.\n' + \ 'INFO: Use mouse scroll to change value.\n' + \ 'CTRL and SHIFT decrease and increase base change 10 times.' xas_e3 = 'Spectrum end energy.\...
454
29.333333
71
py
xaesa
xaesa-master/xaesa_ft.py
#import numpy as np from numpy import sqrt, zeros, pi, arctan, asarray, arange, delete, sum, multiply, sin, cos def FT(k, exafs, rmin, rmax, dr): con = sqrt(2 / pi) nn = len(k) rx = zeros(int((rmax - rmin) / dr), float) exafs_re = zeros(nn, float) # exafs_im = zeros(nn, float) # tr...
4,173
21.934066
91
py
xaesa
xaesa-master/xaesa_constants_formulas.py
# -*- coding: utf-8 -*- """ Created on Tue Feb 13 14:49:33 2018 @author: AKalinko """ from numpy import asarray, exp, zeros #constants me = 9.10938215* 10**-31 # kg h = 6.626070040* 10**-34 #Js = m^2 kg / s hev = 4.135667516 * 10**-15 #eV s c = 299792458 #m/s hbar = 1.054571800*10**-34 def victoreen(x, a, b): ...
617
21.071429
63
py
xaesa
xaesa-master/xaesa_rxes.py
# -*- coding: utf-8 -*- """ Created on Fri Apr 6 11:20:43 2018 @author: akali """ from init import QTVer if QTVer == 4: from PyQt4 import QtGui, QtCore from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as N...
12,920
35.397183
134
py
xaesa
xaesa-master/xaesa_rdf.py
# -*- coding: utf-8 -*- """ Created on Mon Oct 24 15:55:28 2016 @author: sasha """ import os from .init import QTVer if QTVer == 4: from PyQt4 import QtGui, QtCore from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToo...
28,810
36.127577
148
py
lingua-py
lingua-py-main/scripts/benchmark.py
# # Copyright © 2022-present Peter M. Stahl [email protected] # # 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 applicabl...
5,912
55.314286
198
py
lingua-py
lingua-py-main/scripts/memory_profiler.py
# # Copyright © 2022-present Peter M. Stahl [email protected] # # 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 applicabl...
2,797
33.54321
114
py
lingua-py
lingua-py-main/scripts/accuracy_reporter.py
# # Copyright © 2022-present Peter M. Stahl [email protected] # # 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 applicabl...
27,800
39.001439
108
py
lingua-py
lingua-py-main/scripts/accuracy_table_writer.py
# # Copyright © 2022-present Peter M. Stahl [email protected] # # 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 applicabl...
6,510
34.005376
168
py
lingua-py
lingua-py-main/scripts/accuracy_plot_drawer.py
# # Copyright © 2022-present Peter M. Stahl [email protected] # # 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 applicabl...
6,253
33.362637
88
py
lingua-py
lingua-py-main/tests/test_ngram.py
# # Copyright © 2022-present Peter M. Stahl [email protected] # # 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 applicabl...
1,004
30.40625
76
py
lingua-py
lingua-py-main/tests/test_builder.py
# # Copyright © 2022-present Peter M. Stahl [email protected] # # 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 applicabl...
4,984
34.607143
81
py
lingua-py
lingua-py-main/tests/test_language.py
# # Copyright © 2022-present Peter M. Stahl [email protected] # # 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 applicabl...
7,939
28.191176
76
py
lingua-py
lingua-py-main/tests/__init__.py
# # Copyright © 2022-present Peter M. Stahl [email protected] # # 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 applicabl...
608
39.6
76
py
lingua-py
lingua-py-main/tests/test_model.py
# # Copyright © 2022-present Peter M. Stahl [email protected] # # 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 applicabl...
22,964
24.236264
88
py
lingua-py
lingua-py-main/tests/test_writer.py
# # Copyright © 2022-present Peter M. Stahl [email protected] # # 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 applicabl...
19,704
33.329268
174
py
lingua-py
lingua-py-main/tests/test_detector.py
# # Copyright © 2022-present Peter M. Stahl [email protected] # # 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 applicabl...
167,876
129.440559
126,405
py
lingua-py
lingua-py-main/lingua/writer.py
# # Copyright © 2022-present Peter M. Stahl [email protected] # # 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 applicabl...
11,667
37.76412
93
py
lingua-py
lingua-py-main/lingua/isocode.py
# # Copyright © 2022-present Peter M. Stahl [email protected] # # 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 applicabl...
10,920
20.798403
76
py
lingua-py
lingua-py-main/lingua/_constant.py
# # Copyright © 2022-present Peter M. Stahl [email protected] # # 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 applicabl...
7,191
31.107143
88
py
lingua-py
lingua-py-main/lingua/_ngram.py
# # Copyright © 2022-present Peter M. Stahl [email protected] # # 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 applicabl...
1,424
28.6875
77
py