This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path = r'd:\ATOMTEX\trash' | |
import statistics | |
from chardet.universaldetector import UniversalDetector | |
namefile = 'GranScannerWebViewer.txt' | |
enc = UniversalDetector() | |
with open(path + f'\{namefile}', 'rb') as flop: | |
for line in flop: | |
enc.feed(line) | |
if enc.done: | |
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def encodingfile(Path, NameFile): | |
from chardet.universaldetector import UniversalDetector | |
''' | |
Функция возвращает кодировку указанного файла в строчном формате. | |
:param Path: Директроия, где располагается файл. | |
:param NameFile: Имя файла с расширением (namefile.txt) | |
:return: Кодировка файла ('utf-8') | |
''' | |
enc = UniversalDetector() | |
with open(Path + f'\{NameFile}', 'rb') as flop: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
# Подключаем модуль управления тиками: | |
import matplotlib.ticker as ticker | |
x = np.linspace(-10, 10, 200) | |
y = 0.01*(x + 9)*(x + 6)*(x - 6)*(x - 9)*x | |
fig, ax = plt.subplots() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy | |
import pandas | |
import random | |
import statistics | |
# Ремонт прибора АТ6102? | |
remont = False | |
# Заводской номер прибора | |
device = '615--' | |
# Погрешность установки дозиметрической гамма-излучения | |
errorUDG130 = 2.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f''' | |
Определение чувствительности спектрометра к нейтронному излучению Плутоний-Бериллиевого источника. | |
''' | |
import random | |
import statistics | |
from tkinter import ROUND | |
NMEAN = float(245) # среднее арифметическое значение скорости счета импульсов фотонного излучения, cps | |
r0 = 100 # расстояние от центра источника до центра детектора |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas | |
import plotly.express | |
import plotly.graph_objects | |
import urllib.request | |
isotope = '40k' | |
# Example | |
# https://www-nds.iaea.org/relnsd/vcharthtml/api_v0_notebook.html | |
# the service URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
import sys | |
import csv, codecs | |
import os | |
import pandas as pd | |
import numpy as np | |
from PyQt5.QtCore import Qt, QDir, QItemSelectionModel, QAbstractTableModel, QModelIndex, QVariant, QSize, QSettings | |
from PyQt5.QtWidgets import (QMainWindow, QTableView, QApplication, QToolBar, QLineEdit, QComboBox, QDialog, | |
QAction, QMenu, QFileDialog, QAbstractItemView, QMessageBox, QWidget, QTableWidgetItem) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import traceback | |
import types | |
from functools import wraps | |
from PyQt5 import QtGui, QtCore, QtWidgets | |
def MyPyQtSlot(*args): | |
if len(args) == 0 or isinstance(args[0], types.FunctionType): | |
args = [] | |
@QtCore.pyqtSlot(*args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PyQt5.QtCore import (Qt, pyqtSlot) | |
from PyQt5.QtWidgets import (QStyledItemDelegate, QComboBox) | |
class ComboDelegate(QStyledItemDelegate): | |
def __init__(self, parent, items): | |
self.items = items | |
QStyledItemDelegate.__init__(self, parent) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# General Library Pre-Build QApplication | |
# Notify file | |
Author = "Alex Povod" | |
Version = "0.0.1" | |
Domain = "https://github.com/ialexpovod/GLP" | |
# Python Traceback | |
# https://www.geeksforgeeks.org/python-traceback/ | |
import datetime |