- 博客(30)
- 收藏
- 关注
原创 GitHub Actions ubuntu-latest 内置字体
fc-list > fontlist.txt/usr/share/fonts/truetype/lato/Lato-Medium.ttf: Lato,Lato Medium:style=Medium,Regular/usr/share/fonts/truetype/lato/Lato-SemiboldItalic.ttf: Lato,Lato Semibold:style=Semibold Italic,Italic/usr/share/fonts/truetype/dejavu/DejaVu
2022-02-25 13:31:08 637
原创 并行计算导论
#include <stdio.h>#include <omp.h>int main(void){ #pragma omp parallel printf("Hello, word.\n"); return 0;}#include <stdio.h>#include <omp.h>int main(int argc, char **argv){ int a[100000]; #pragma opm parallel for
2021-09-17 11:19:41 193
原创 坐标J2000与J2000d的相互转换
#http://simbad.u-strasbg.fr/simbad/sim-id?Ident=MAXI+J1820%2B070+&NbIdent=1&Radius=2&Radius.unit=arcmin&submit=submit+id#赤经hour = 18minutes = 20seconds = 21.9424256519#赤纬degree = 7arcminute = 11arcsecond = 7.278818899print('RA {0
2021-07-23 12:54:04 653
原创 读取dat文件
def read_dat(filename): import numpy as np ''' 读dat文件, 返回np.array(x),np.array(xerr),np.array(y),np.array(yerr) ''' with open(filename) as f: data = f.readlines() x = [] y = [] xerr = [] yerr = [] for
2021-07-21 21:10:20 2072
原创 LaTeX超链接的颜色RGB
%%%%%书签%RGB值从0~1\usepackage{hyperref}\hypersetup{ colorlinks=true, bookmarks=true, bookmarksopen=false, bookmarksnumbered=true, linkcolor=[rgb]{.043 0.23 .043}, filecolor=[rgb]{.043 0.23 .043}, urlcolor=[rgb]{.043 0.23 .043},
2021-06-30 16:25:53 1363
原创 Best Practices for Data Publication in the Astronomical Literature
arXiv:2106.01477
2021-06-05 20:54:22 96
原创 给定函数形式进行拟合,得出参数取值95%的置信区间
import numpy as npfrom scipy.optimize import curve_fitfrom scipy.stats.distributions import t as t_distributiondef fun(x,A,b): return A*x+bx = [1 ,2, 3 ]y = [2 ,4, 6 ]def fun_fit(fun, xdata, ydata): ''' import numpy as np from scip
2021-06-01 21:47:22 1784
原创 不同插值对比
数据Tb(v)Tb,v,-319.8,-318.5,-317.2,-315.90000000000003,-314.6,-313.3,-312.0,-310.7,-309.40000000000003,-308.1,-306.8,-305.5,-304.2,-302.90000000000003,-301.6,-300.3,-299.0,-297.7,-296.40000000000003,-295.1,-293.8,-292.5,-291.2,-289.9
2021-05-11 22:30:07 648
原创 射电图像软件CARTA安装
Cube Analysis and Rendering Tool for Astronomy (CARTA),是为ALMA, VLA, and SKA pathfinders而设计的图像可视化和分析工具.1.官网2.GitHub下载3.用户手册
2021-05-11 18:25:02 295
原创 高斯-勒让德积分(Gauss-Legendre integral)的原理及Python实现
Gauss-Legendre integraldef f(x): return x**4-2*x+1N = 3 #取3个样本点a,b = 0,2 #积分上下限x,w = roots_legendre(N)xp = x*(b-a)/2+(b+a)/2wp = w*(b-a)/2s = 0for i in range(N): s+=wp[i]*f(xp[i])print(s)
2021-04-26 22:52:11 4767
原创 量子力学教程 2.4题
import numpy as npimport matplotlib.pyplot as pltplt.rcParams['text.usetex'] = Trueplt.rcParams['xtick.direction'] = 'in'plt.rcParams['ytick.direction'] = 'in'plt.rcParams['grid.linestyle'] = '--'plt.rcParams['font.size'] = 18plt.rcParams['lines.lin
2021-04-20 18:04:51 225
原创 Ubuntu编译openwrt
sudo -ipasswdgroupadd testuseradd -g test -d /home/tester -s /bin/bash -m testpasswd test vi /etc/sudoers #tester ALL=(ALL:ALL) ALLsu testersudo whoami#若显示root,就有root权限sudo sed -i 's/http:\/\/cn.archive.ubuntu.com\/ubuntu/https:\/\/mirrors
2021-03-01 18:03:24 2185 1
原创 Proxmox VE(PVE)连接WiFi及一些配置
以下操作基于Debian换源vi /etc/apt/sources.listdeb http://mirrors.aliyun.com/debian buster main contrib non-freedeb http://mirrors.aliyun.com/debian buster-proposed-updates main contrib non-freedeb http://mirrors.aliyun.com/debian buster-updates main contrib
2021-02-26 13:18:00 24535 2
原创 利用Python进行图片验证码识别
# -*- coding: utf8 -*-from re import findallimport osimport requestsimport tesserocrfrom PIL import Imageimport numpy as npimport matplotlib.pyplot as pltsession = requests.session()Headers = { 'User-Agent' : 'Mozilla/5.0 (Windows NT 10.0; Wi
2021-01-19 18:51:08 1124
原创 LaTeX 数学公式备忘单
tex源代码\RequirePackage{mmap} % make PDF copy and paste-able\documentclass[twocolumn]{article}\usepackage{amsmath, amsthm, amssymb}\usepackage{mathrsfs}\usepackage[utf8]{inputenc}\usepackage[T1]{fontenc}% \usepackage{lmodern} % from http://tex.stac..
2021-01-04 13:59:10 396
原创 利用python将多张图片转为gif
1.安装依赖包pip install imageio2.代码import imageiodef create_gif(image_list, gif_name): frames = [] for image_name in image_list: frames.append(imageio.imread(image_name)) imageio.mimsave(gif_name, frames, 'GIF', duration=0.7)#duration间隔
2020-12-23 21:24:54 1376
原创 关于python -m http.server的使用说明
python -m http.server --help usage: server.py [-h] [--cgi] [--bind ADDRESS] [--directory DIRECTORY] [port]positional arguments: port Specify alternate port [default: 8000]optional arguments
2020-12-21 16:39:19 4856
原创 Z^2的实部和虚部的等值线图
产生一个复数ZZZ, ZZZ的实部和虚部分别从−100-100−100变化到100100100,在一幅图的两幅子图中分别画Z2Z^2Z2的实部和虚部的等值线图.import numpy as npimport matplotlib.pyplot as pltdef polt_Z(a): x_vals = np.linspace(-100,100,200) y_vals = np.linspace(-100,100,200) x,y=np.meshgrid(x_vals,y_v
2020-11-17 19:25:52 1301
原创 heasoft和hxmtsoft一起安装
heasoft和hxmtsoft一起安装1.安装教程1.1安装依赖#Ubuntu系统sudo apt-get -y install libreadline-devsudo apt-get -y install libcurl4sudo apt-get -y install libcurl4-gnutls-devsudo apt-get -y install libncurses5-devsudo apt-get -y install xorg-devsudo apt-get -y inst
2020-10-13 00:11:57 2424 5
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人