This Package is a collection of Christmas related packages.
Authors : Christmas
Maintainer : Christmas
To install this package, run:
pip install baysalt_christmas
or
pip3 install baysalt_christmas
Packages
baysalt_christmas
commonCode.py
ddt = converToTime(str)
from christmas.commonCode import convertToTime
ddt = convertToTime('20230330')
ddt = convertToTime('2023033001')
ddt = convertToTime('202303300101')
ddt = convertToTime('20230330010101')
ddt = convertToTime('2022-11-09_01:00:00')
filename = new_filename(_pre,lon, _lat, _lat, _date, _res)
from christmas.commonCode import new_filename
import numpy as np
_lon = np.linspace(100,120)
_lat = np.linspace(10,20)
filename = new_filename('wave', _lon, _lat, _date, 10)
date = get_date()
from christmas.commonCode import get_date
date = get_date()
make_dir(path)
from christmas.commonCode import make_dir
make_dir('/home/ocean/zcy/1/2/3/4')
class: FTPUploadTracker (deprecated)
path = split_path(_path)
from christmas.commonCode import split_path
path = split_path('/home/ocean/zcy/1/2/3/4/')
osprint(_str)
from christmas.commonCode import osprint
x = '123'
osprint(f'{x}SSS')
osprints(_str)
from christmas.commonCode import osprints
x = '123'
osprints('INFO',f'{x}SSS')
timer(func)
processBar.py
class: SftpProcessbar
from christmas.processBar import SftpProcessbar
import paramiko
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(hostname='47.105.220.136', port=22, username='wave', password='wave', timeout=100)
sftp = paramiko.SFTPClient.from_transport(ssh.get_transport())
sftp_obj =SftpProcessbar()
Sprocess_bar = sftp_obj.process_bar
sftp.put('/home/ocean/x.zip', 'x.zip', callback=Sprocess_bar)
translate_byte(B)
class: FtpProcessBar
from christmas.processBar import FtpProcessbar
import os, ftplib
buf_size = 1024
ftp = ftplib.FTP()
ftp.encoding = 'utf-8'
ftp.set_debuglevel(0)
ftp.connect(host='47.105.220.136', port=22)
ftp.login('wave', 'wave')
Ftp_obj = FtpProcessbar(os.path.getsize('/home/ocean/x.zip'))
Fprocess_bar = Ftp_obj.process_bar()
with open('/home/ocean/x.zip', 'rb') as fp:
ftp.storbinary(f'STOR x.zip', fp, buf_size, Fprocess_bar)
read_conf.py
Conf = read_conf(_conf_file, ele=None)
from christmas.read_conf import read_conf
Conf = read_conf('Post_fvcom.conf')
key, value = char_fill_dic(_key,_str)
TF = is_number(_str)
from christmas.read_conf import is_number
TF = is_number('12')
TF = is_number('-12')
TF = is_number('1e10')
TF = is_number('.5')
flattened_lst = flatten_list(_lst, flattened_lst)
S_dateTime.py
Nearby_date = build_date(_date)
from christmas.S_DateTime import build_date
Nearby_date = build_date('20230324')
server_info.py
pid = grep_from_top(_exe)
from christmas.server_info import grep_from_top
pid = grep_from_top('python3 forecast.py')
mpi_num = grep_from_top_mpi(_exe)
from christmas.server_info import grep_from_top_mpi
pid = grep_from_top_mpi('wrf.exe')
cpu_num, free_cpu_num = get_free_core()
from christmas.server_info import get_free_core
cpu_num, free_cpu_num = get_free_core()
user, hostname, ip = get_server_info()
from christmas.server_info import get_serve_info
user, hostname, ip = get_serve_info()
mncPy
class: MncPy
from christmas.mncPy.compress import mnc_Py
mnc = mnc_Py('/home/ocean/wave_without_compress.nc',o_path = True, d_rm=True)
mnc.compress_files()
Metadata
Release files for baysalt-christmas 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| baysalt_christmas-2.0.1.tar.gz | 48.4 kB | Without provenance | Details for baysalt_christmas-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| baysalt_christmas-2.0.1-py3-none-any.whl | Python 3 | none | any | Details for baysalt_christmas-2.0.1-py3-none-any.whl |
Total release size: 106.8 kB
Release files / baysalt_christmas-2.0.1.tar.gz
| Download URL | baysalt_christmas-2.0.1.tar.gz |
|---|---|
| Size | 48.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aae35ad3477e5eca51c7dc5271acd149f80fe841fb238425b2e449bdbd2a7f87
|
|
BLAKE2b-256 checksum How to use checksums |
3fcf325cab57f1b38dbb6e62dfc9d6e62b76441024efcfb4d0397eed2ee1dcbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.3
|
Release files / baysalt_christmas-2.0.1-py3-none-any.whl
| Download URL | baysalt_christmas-2.0.1-py3-none-any.whl |
|---|---|
| Size | 58.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
97897825be5e8331262a1b003e25e5b627d448056f917ae3c59b53174750ac66
|
|
BLAKE2b-256 checksum How to use checksums |
337393c275697629caf323c888441b421dd4551692128deb408a94a9e4c70fab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.3
|
Security for baysalt-christmas 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.