- 博客(152)
- 收藏
- 关注
原创 1.3. DIGITAL SIGNATURES数字签名
《BITCOIN AND CRYPTOCURRENCY TECHNOLOGIES》Chapter 1系列1.3. DIGITAL SIGNATURES数字签名
2022-09-19 21:24:03
1138
原创 1.3. DIGITAL SIGNATURES
《BITCOIN AND CRYPTOCURRENCY TECHNOLOGIES》Chapter 1系列1.3. DIGITAL SIGNATURES数字签名一、数字签名性质我们希望数字签名需要有两个性质:1、只有你自己可以签名,别人看到签名可以验证它是否有效。2、希望你的签名和你签名的文档进行绑定,这样这个签名不会被乱用,比如拿去签(贴)到别的文档上。二、数字签名方案● (s...
2022-09-19 21:16:00
241
原创 1.2. HASH POINTERS AND DATA STRUCTURES哈希指针及数据结构
《BITCOIN AND CRYPTOCURRENCY TECHNOLOGIES》Chapter 1系列——1.2. HASH POINTERS AND DATA STRUCTURES哈希指针及数据结构
2022-09-15 19:34:51
2472
1
原创 1.2. HASH POINTERS AND DATA STRUCTURES
《BITCOIN AND CRYPTOCURRENCY TECHNOLOGIES》Chapter 1系列1.2. HASH POINTERS AND DATA STRUCTURES哈希指针及数据结构一、Hash pointer 哈希指针书中原话:A hash pointer is a pointer to where data is storedtogether with a c...
2022-09-15 19:17:00
157
原创 1.1. Cryptographic Hash Function.加密哈希函数
《BITCOIN AND CRYPTOCURRENCY TECHNOLOGIES》1.1. Cryptographic Hash Function.加密哈希函数。主要介绍三个性质。
2022-09-04 21:47:01
1078
原创 1.1. CRYPTOGRAPHIC HASH FUNCTIONS加密哈希函数
《BITCOIN AND CRYPTOCURRENCY TECHNOLOGIES》Chapter 1系列1.1. Cryptographic Hash Function.加密哈希函数哈希函数的三个性质:1、输入可以是任意长度的任意string;2、输出固定size;3、计算效率高。在合理的时间内将哈希函数的输出计算出来。(时间复杂度:O(n))。加密哈希函数比普通哈希函数多了三...
2022-09-04 21:35:00
410
原创 git 常用命令
Git 创建仓库初始化一个git仓库,在执行完成git init命令后,Git 仓库会在当前目录生成一个 .git 目录。git init如果使用指定目录作为git仓库git init newrepo初始化后,会在 newrepo 目录下会出现一个名为 .git 的目录git add 命令告诉 Git 对哪些文件进行跟踪:git add *.cg...
2020-08-12 15:58:00
133
原创 无法连接NVIDIA驱动:NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver...
关机之后,驱动不能用解决:step1:sudo apt-get install dkmsstep2: sudo dkms install -m nvidia -v 390.59 其中step2 中的410.79是NVIDIA的版本号,当你不知道的时候,进入/usr/src目录中,可以看到里面有nvidia文件夹,后缀就是其版本号ls /usr/src...
2020-04-26 11:49:00
513
原创 快速排序
void QuickSort(int array[], int start, int last){ int i = start; int j = last; int temp = array[i]; if (i < j) { while (i < j) // { ...
2020-03-30 10:09:00
171
原创 归并排序
#include <iostream>#include <vector>using namespace std;void merge(vector<int> &arr,int L,int mid,int R){ int *help = new int(R-L+1); int p1=L,p2=mid+1,i=0;...
2020-03-30 09:54:00
159
原创 tensorflow.python.framework.errors_impl.InvalidArgumentError: Feature: input_ids0 (data type: int64)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Feature: input_ids0 (data type: int64) is required but could not be found. [[{{node ParseSingleExample/ParseSingleExample}}]] [[no...
2019-12-05 19:29:00
597
原创 安装支持gpu的docker
安装curl:sudo apt-get updatesudo apt install curl安装nvidia-docker:可能要删除之前的sudo yum remove docker docker-common container-selinux docker-selinux docker-engine nvidia-dockerhttps://github...
2019-11-20 20:02:00
219
原创 docker:ImportError: libcuda.so.1: cannot open shared object file: No such file or directory
docker中运行tensorflow出错:Traceback (most recent call last): File "run_classifier.py", line 24, in <module> import modeling File "/home/work/adapter-bert/modeling.py", line 28, in &...
2019-11-20 19:22:00
4349
原创 按行合并文件
pastepaste -d -s -file1 file2选项含义如下:-d 指定不同于空格或t a b键的域分隔符。例如用@分隔域,使用- d @。-s 将每个文件合并成行而不是按行粘贴。- 使用标准输入。例如ls -l |paste ,意即只在一列上显示输出file1abcfile2123如何合并两个文件,得到...
2019-09-25 16:27:00
342
原创 54. Spiral Matrix
54. Spiral MatrixGiven a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.Example 1:Input:[ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9...
2019-09-19 18:36:00
144
原创 数据不平衡
1、PCA降维 pca = PCA(n_components=20) trans = pca.fit(train_data1) train_data = trans.transform(train_data1)2、class-weight 设置了这个参数后,会自动设置class weight让每类的sample对损失的贡献相等model = SVM.SVC(k...
2019-06-28 11:12:00
263
原创 TSNE/分析两个数据的分布
使用sklearn.manifold的函数TSNE#coding=utf-8import numpy as npimport picklefrom sklearn.manifold import TSNEimport matplotlibmatplotlib.use('Agg')import matplotlib.pyplot as plt #数据集装载函...
2019-06-28 10:57:00
840
原创 _tkinter.TclError: no display name and no $DISPLAY environment variable
在引入pyplot、pylab之前,要先更改matplotlib的后端模式为”Agg”参考:https://www.cnblogs.com/students/p/8963420.html
2019-06-27 13:27:00
480
原创 split分割文件
split分割文件 split [-bl] file [prefix]参数说明:-b,--bytes=SIZE:对file进行切分,每个小文件大小为SIZE。可以指定单位b,k,m。-l,--lines=NUMBER:对file进行切分,每个文件有NUMBER行。prefix:分割后产生的文件名前缀。示例:假设要切分的文件为t...
2019-05-07 16:15:00
844
原创 ubuntu+jdk
ubuntu+jdk 1、查看java是否已经安装:gpu245@gpu245-S2600IP:~$ java输出:程序 'java' 已包含在下列软件包中: * default-jre * gcj-5-jre-headless * openjdk-8-jre-headless * gcj-4.8-jre-h...
2019-04-27 08:45:00
306
原创 进程操作
进程操作 查看现有进程$ ps -ef或者:$ ps -auxPID USER PR NI VIRT RES SHR S %CPU %MEM TIME+gpu245 122844 1 0 09:17 ? 00:00:00 /li...
2019-04-16 18:09:00
164
原创 ImportError: No module named apex
ImportError: No module named apex 也可以直接下载文件夹 importhttps://github.com/nvidia/apex#__NO_LINK_PROXY__git clone https://www.github.com/nvidia/apexcd apexpython setup....
2019-04-13 10:06:00
2961
原创 Ubuntu 16.04.4安装Anaconda
Ubuntu 16.04.4安装Anaconda 环境:刚装上的系统:$ lsb_release -aNo LSB modules are available.Distributor ID: UbuntuDescription: Ubuntu 16.04.4 LTSRelease: 16.04C...
2019-03-07 14:58:00
365
原创 Bert论文-读记录
Bert论文-读记录 https://github.com/google-research/bertAbstract: 我们提出...,与之前的语言表示不同的是,Bert用到左边和右边的context,用来训练双向表示。结果:预训练的Bert只需要一个额外的output layer作为 fine-tune 使用。 Bert 很简单...
2019-02-22 10:40:00
756
原创 pytorch 常见函数理解
gather>>> a = torch.Tensor([[1,2],[3,4]])>>> atensor([[ 1., 2.], [ 3., 4.]])>>> torch.gather(a,1,torch.LongTensor([... [0,0],... [1,0]]))tensor([[ 1., 1....
2018-11-28 09:40:00
410
原创 字典排序,初始化,简单使用
如想对字典wordhash排序:通过list实现:wordlistwordhash={'\ufeff': 1, '作者': 8, ':': 114, 'Calvin': 1, 'Shi': 1, '链接': 1, 'www': 1, '.': 35, 'zhihu': 1, 'question': 1, '27068465': 1}wordlist = [('\ufeff',...
2018-11-15 22:03:00
243
原创 解决RuntimeError: cuda runtime error (30) : unknown error at /pytorch/aten/src/THC/THCGeneral.cpp:70&N...
解决两个问题:(1)RuntimeError: cuda runtime error (30) : unknown error at /pytorch/aten/src/THC/THCGeneral.cpp:70(2)NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make...
2018-11-14 21:35:00
21933
4
原创 查看Ubuntu/cuda/Tensorflow/Pytorch版本
查看Cuda版本:cat /usr/local/cuda/version.txtCUDA Version 9.0.176 查看Linux/Ubuntu版本:(1)cat /proc/version输出:Linux version 4.4.0-137-generic (buildd@lgw01-amd64-037) (gcc version 5.4.0 2...
2018-11-13 09:19:00
704
原创 查看Ubuntu/Anaconda/cuda/cudnn/Tensorflow/Pytorch版本
查看python某个模块安装位置import module(所查询的模块)print(module.__file__) 查看anaconda版本:conda -V驱动版本:cat /proc/driver/nvidia/version查看Cuda版本:cat /usr/local/cuda/version.txtCUDA Version 9.0.176...
2018-11-13 09:19:00
194
原创 创建新用户
gpu4@gpu4:~$ sudo useradd -m -s /bin/bash haiou[sudo] gpu4 的密码: gpu4@gpu4:~$ sudo passwd haiou输入新的 UNIX 密码: 重新输入新的 UNIX 密码: passwd:已成功更新密码gpu4@gpu4:~$...
2018-10-12 16:10:00
238
原创 142. Linked List Cycle II
142. Linked List Cycle II Similiar problem:141. Linked List CycleGiven a linked list, return the node where the cycle begins. If there is no cycle, return null.Note: Do not modify the linked l...
2018-08-15 09:55:00
230
原创 160. Intersection of Two Linked Lists
我在discussion区的更新:C++-solutioneasy-to-understand 160. Intersection of Two Linked Lists Write a program to find the node at which the intersection of two singly linked lists begins. For examp...
2018-08-14 21:22:00
220
原创 网页版Instagram如何发照片
网页版Instagram如何发照片?教程如下~~首先打开ins主页: 按键盘F12键 或者右键审查(检查): 然后点击右面的: 点击之后刷新下页面(F5),你会发现左边会变成这样的如图: 发现多了一栏哦仔细看看界面是不是跟手机版一样?我们点击最中间的那个“相机”选一张需要上传的照片。 ...
2018-08-14 10:55:00
24365
原创 141. Linked List Cycle
141. Linked List CycleGiven a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space? 第二次遇到这个题 竟然忘记怎么做:/** * Definition for singly-linked list...
2018-08-13 20:30:00
141
原创 将博客搬至优快云
将博客搬至优快云
2018-08-13 09:57:00
159
原创 92. Reverse Linked List II
Author:hozhangelTime:2018-08-12 11:45:12 92. Reverse Linked List IIsimilar problem: 206. Reverse Linked ListReverse a linked list from position m to n. Do it in one-pass.Note: 1 ≤ m ≤ ...
2018-08-12 11:45:00
190
原创 206. Reverse Linked List
Author: hozhangel Time: 2018-08-11 20:31:01206. Reverse Linked Listproblem description:Reverse a singly linked list.Example:Input: 1->2->3->4->5->NULLOutput: 5->...
2018-08-11 20:19:00
161
原创 86. Partition List
86. Partition ListGiven a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the original relative order of th...
2018-08-11 19:33:00
194
原创 83. Remove Duplicates from Sorted List
83. Remove Duplicates from Sorted List(相似题目:82. Remove Duplicates from Sorted List II)Given a sorted linked list, delete all duplicates such that each element appear only once.Example 1:Input...
2018-08-11 19:11:00
160
原创 82. Remove Duplicates from Sorted List II
82. Remove Duplicates from Sorted List IIGiven a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.Example 1:Input: 1->2-...
2018-08-11 19:05:00
150
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人