Those questions

Simply write down questions that ever frustrated me a little:

  1. How to convert unix timestamp to standard format in SQL?
  2. How to convert unix timestamp to standard format in R?
  3. How to download files from the remote server to local desktop?
  4. How to quit vim?
  5. How to edit config in vim to install java as a root?
  6. How to install Neo4j on Linux?
  7. How to switch between root and super in Linux?
  8. What is the common command for tmux?
  9. How to download file via url from the remote server?
  10. What is the common command for neo4j?
  11. How to install pip in cmd?
  12. Git: bash: cd: too many arguments?
  13. How to export one large table from hive to personal file on remote server?
  14. How to set the system variable?
  15. How to check and edit in shell?
  16. How to schedule a task in shell?
  17. How to install postgresql in shell?
  18. How to run R script and .py from command line?
  19. How to suppress the message from command line?
  20. How to git push initially?
  21. Why messy code in the output under shell exvirenment?
  22. Why output '/usr/bin/env "python\r"' error in Linux?
  23. How to check MD5 for one .model file?

Answers

FROM_UNIXTIME(log_timestamp/1000,'%Y-%m-%d %H:%i:%S')
as.POSIXct(1522789634, origin="1970-01-01 00:00:00")
[1] "2018-04-04 05:07:14 CST"
scp root@139.224.15.11:/home/super/weifan/behaviour/script_001_behavioral/out/* Downloads
scp -r root@139.224.15.11:/home/super/weifan/behaviour/script_001_behavioral/out/ Downloads/
scp C:/Users/lenovo/Documents/master/Innotechx/doc/graphdb.sh daiweifan@39.106.135.84:/home/super/weifanD
sz *.jpg
save and quit: ESC -> ':' -> 'wq'; not save and quit: ESC -> ':' -> 'q!'; unchange angthing and quitL ESC -> ':' -> '!'
sudo su -
cd /usr
mkdir java
cp /home/super/software/jdk-8u161-linux-x64.tar.gz /usr/java/
tar -zxvf jdk-8u161-linux-x64.tar.gz
ln -s /usr/java/jdk1.8.0_161/ /usr/jdk
vim /etc/profile JAVA_HOME=/usr/jdk
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME
export PATH
export CLASSPATH source /etc/profile
sudo update-alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_161/bin/java 50
sudo update-alternatives --install /usr/bin/javac javac /usr/java/jdk1.8.0_161/bin/javac 50
sudo update-alternatives --config java
tar -xf <filename>
cd $NEO4J_HOME
sudo bash
sudo su -
exit
sudo apt-get install tmux//install tmux
tmux ls//查看现有会话
tmux attach -t 0//进入当前会话
Ctrl+B D//退出
wget https://hue.qutoutiao.net/filebrowser/download=/user/ac/node_member/000008_0
cd /path/to/neo4j
bin/neo4j start
bin/neo4j-shell
du -hc /SN.db/*store.db*
- download python package
- check pip.exe under \Scripts directory
- add path for pyhton and \Scripts file
- enter pip in cmd
- if there is error 'failed to create process', enter python.exe -m pip
replace the blank with ' '
sudo su -

beeline -u 'jdbc:hive2://172.16.53.159:10000' -n ac -p ac123 --outputformat=csv2 --incremental=true -e "set mapreduce.job.queuename=root.develop.adhoc.ac;select a.member_id,a.device_code,a.teacher_id from (
select teacher_id, member_id,device_code from gobblin.qukan_p_member_info
where day='2018-04-20'
) a
left join (
select id,status from gobblin.qukan_p_member
where day='2018-04-20'
and status=1
) b
on a.teacher_id=b.id
order by a.member_id" > member_info.csv;
path: C:\Users\lenovo\software\python34
C:\Users\lenovo\software\python34\Scripts
# check the size of file
- ls -lh test1.sh
- cat test1.sh |wc -l
- head test1.sh
- cat member-city0424.csv | sed 1d |cut -d ',' -f 2,3|sort|uniq > city.csv
- df -h
- ssh root@139.224.15.11
- ps -ef |grep neo4j
- grep -Ev '^null|^Null|NULL' locate.csv > locate2.csv
- kill -9 ***
- find / -name '*.py'
- [root@arch 12002]# cd /var/lib/postgres/data/base/12002
[root@arch 12002]# du -sh
- grep -E '(100_1000|bigger_1000)' 20160220 | head
crontab -e
0 0 * * * * sh /your/path/to/***.sh > /your/path/to/**log.sh
yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm
yum install postgresql10
yum install postgresql10-server
/usr/pgsql-10/bin/postgresql-10-setup initdb
systemctl enable postgresql-10
systemctl start postgresql-10
vim /var/lib/pgsql/10/data/**.conf
service postgresql-10 restart
psql -U postgres # connect to database mimic
$ psql -d mimic # set default schema to mimiciii
mimic=# SET search_path TO mimiciii; # chack and unstall the software
$ rpm -qa | grep pgdg-centos10
$ yum -y remove postgresql10-libs-10.4-1PGDG.f25.x86_64
# run
Rscript test.r C:\Users\lenovo\Desktop\1.csv C:\Users\lenovo\Desktop\img
python similarity.py input_case/ output/ # install package
sudo su - -c\ "R -e \"install.packages('dplyr',repos='https://cran.rstudio.com/')\""
install.packages('',repos='https://cran.rstudio.com/')
pip install # arguments
# R
#! /path/to/Rscript --vanilla --default-packages=utils
args <- commandArgs(TRUE)
args[1]
args[2] # python
sys.argv[0]
suppressWarnings(suppressMessages(suppressPackageStartupMessages({})
git config --global user.name "戴微帆"
git config --global user.email "daiweifan@bigbaser.com"
scp root@224.139.15.11:/home/super/weifan/behaviour/ .
scp root@224.139.15.11:/opt/rwork/scripts/ .
scp root@139.224.15.11:/opt/rwork/scripts/ .
scp root@139.224.15.11:/opt/rwork/scripts/script_002_similarity .
scp root@139.224.15.11:/opt/rwork/scripts/script_002_similarity/ .
scp -r root@139.224.15.11:/opt/rwork/scripts/ .
cd scripts
ll
git init
git add --all
git commit -m 'Initial commit'
git remote add origin http://daiweifan@git.innotechx.com/scm/an/ac-data-job.git
git push -u origin master
git add --all
git commit -m 'Initial commit'
git remote add origin http://daiweifan@git.innotechx.com/scm/an/ac-data-job.git
git push -u origin master
1、C:\Windows\Fonts下找到字体文件simsun.ttc,重命名为simsun.ttf;
2、上传到主机/usr/share/fonts/zh_CN/
3、修改文件权限755
4、mkfontscale (如果提示 mkfontscale: command not found,需自行安装 # yum install mkfontscale )
5、mkfontdir
6、fc-cache -fv (如果提示 fc-cache: command not found,则需要安装# yum install fontconfig )
或 fc-cache /usr/share/fonts/zh_CN/
7、reboot系统(生产环境,未做此操作,执行完fc-cache /usr/share/fonts/zh_CN/后fc-list验证新字体已存在,应用乱码问题经验证也已解决,说明reboot不是必须。) 验证字体:
fc-list|grep 宋 fc-list :lang=zh-cn | sort
https://blog.csdn.net/qq_40809549/article/details/80523849
用 ./ 运行python 脚本文件出现 报错信息 /usr/bin/env "python\r" 找不到那个文件或目录

错误原因:这主要是因为\r这个字符的缘故。在linux终端下,输出\r会什么都不显示,只是把光标移到行首。于是终端虽然输出了/usr/bin/env: python,但是碰到\r后,光标会被移到行首,接着输出了:No such file or directory把前面的覆盖掉了。于是出现了那个莫名其妙的出错信息了

解决办法:

    用vim打开sh脚本文件 vim file_name.py 打开后输入

    :set ff 然后回车  再重新设置下文件格式:

    :set ff=unix 然后保存退出

    :wq! 回车
linux: md5sum model.***
Win10: certutil -hashfile model.*** MD5

Q&A in 2018 - Q1的更多相关文章

  1. Q&A in 2018 - Q2

    How to zip a file for Windows? 压缩一个文件: makecab c:/file_name.txt c:/file_name.zip 解压一个文件: expand c:/f ...

  2. Django中数据查询(万能下换线,聚合,F,Q)

    数据查询中万能的下划线基本用法: __contains: 包含 __icontains: 包含(忽略大小写) __startswith: 以什么开头 __istartswith: 以什么开头(忽略大小 ...

  3. 聚合查询、分组查询、F&Q查询

    一.聚合查询和分组查询 1.aggregate(*args, **kwargs): 通过对QuerySet进行计算,返回一个聚合值的字典.aggregate()中每个参数都指定一个包含在字典中的返回值 ...

  4. (CCPC-Final 2018)K - Mr. Panda and Kakin

    题意:x是\([1e5,1e9]\)的随机数,p是小于x的最大素数,q是大于等于x的最小素数,\(n=pq\),\(c=f^{2^{30}+3}\mod{n}\),给n和c求f 题解:rsa解密,首先 ...

  5. Django 数据库操作进阶F和Q操作

    Model中的F F 的操作通常的应用场景在于:公司对于每个员工,都涨500的工资.这个时候F就可以作为查询条件 1 2 3 from django.db.models import F models ...

  6. Python菜鸟之路:Django 数据库操作进阶F和Q操作

    Model中的F F 的操作通常的应用场景在于:公司对于每个员工,都涨500的工资.这个时候F就可以作为查询条件 from django.db.models import F models.UserI ...

  7. Q的进阶用法

    Q的实例化用法 #q1 里面的条件都是or的关系 q1=Q() q1.connector = 'OR' q1.children.append(('id',1)) q1.children.append( ...

  8. Django-F和Q函数作用与使用

    F函数 能够解析对现有查询对象的引用的对象. obj = Score.objects.get(stuid=') obj.score += 1 obj.order.save() 执行出的SQL语句 wh ...

  9. 洛谷P1527 [国家集训队] 矩阵乘法 [整体二分,二维树状数组]

    题目传送门 矩阵乘法 题目描述 给你一个N*N的矩阵,不用算矩阵乘法,但是每次询问一个子矩形的第K小数. 输入输出格式 输入格式: 第一行两个数N,Q,表示矩阵大小和询问组数: 接下来N行N列一共N* ...

随机推荐

  1. 注册并加入dn42网络的方法

    简介 https://dn42.net/howto/Getting-started 注册要求: 一个24小时运行的linux/BSD设备 该设备必须支持创建隧道,例如GRE,OpenVpn,IPSec ...

  2. selenium pyunit单元测试框架

    selenium pyunit单元测试框架 #PyUnit框架 #coding = utf - 8 #将要被测试的类 class Widget: def __int__(self,size = (40 ...

  3. 洛谷P1649 【[USACO07OCT]障碍路线Obstacle Course】

    题目描述 Consider an N x N (1 <= N <= 100) square field composed of 1 by 1 tiles. Some of these ti ...

  4. [PowerShell]Python虚拟环境激活失败

    用Activate.ps1激活还是失效的情况下, 用ISE打开发现路径中的中文乱码了. 所以解决方案有两种, 一是把中文路径改成英文 二是把Activate.ps1脚本用记事本打开另存为ANSI编码即 ...

  5. POJ_3450_KMP

    http://poj.org/problem?id=3450 直接暴力枚举第一行的每一个字串,在下面的字符串中查找就行了,注意不符合就及时break. 然后试了一下strstr,发现效率是KMP的3- ...

  6. bootstrap 表单类

    bootstrap 表单类 表单美化 用法: 向父元素 <form role="form"></form>     添加 role="form&q ...

  7. ionic2的返回按钮的编辑问题

    ionic2 返回按钮 首先可以在 app.module.ts 文件中配置. @NgModule 中的 imports 属性的 IonicModule.forRoot 第二个参数,如下: IonicM ...

  8. Shiro权限验证说明

    1.简介 shiro是一个安全框架,是Apache的一个子项目.shiro提供了:认证.授权.加密.会话管理.与web集成.缓存等模块. 1.1.模块介绍 Authentication:用户身份识别, ...

  9. Import This - The Zen of Python

    The Zen of Python -- by Tim Peters Beautiful is better than ugly.Explicit is better than implicit.Si ...

  10. 使用Webpack的代码拆分在Vue中进行懒加载

    参考学习:https://alexjover.com/blog/lazy-load-in-vue-using-webpack-s-code-splitting/ 学习文案:https://webpac ...