查看: 1671| 回复: 12
跳转到指定楼层
上一主题 下一主题
收起左侧

MSDA 课程记录贴

全局:

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x
昨天新上了。CISC 5500 Data Analytics Tools and Scripting

评分

参与人数 1大米 +5 收起 理由
michaelzju + 5 很有用的信息!

查看全部评分


上一篇:【打卡帖】BA转DS 进阶打卡
下一篇:湾区的DATA SCIENCE BOOTCAMP
推荐
 楼主| 宋龙龙96 2018-9-1 00:09:33 | 只看该作者
全局:
. 1point3acres
事实上,terminal与shell有点风牛马不相及,但是很多初学者还是对二者的关系感到一头雾水。
terminal意思是终端,终端包括PC上的键盘、鼠标等设备,举个例子:linux上面的terminal(对的,就是你输入指令的那个黑色框框)就是一个仿真终端,你可以把它当作一个模拟的输入设备。
而shell是壳程序,shell其实就是一个解释器,它负责接收你的输入,通过它可以与操作系统交互,你在终端输入的指令就是被shell接收的。shell是包裹在操作系统外层的一道程序,就好像是操作系统的壳,shell(壳)的名称也由此而来。
在计算机科学中,Shell俗称壳(用来区别于核),是指“提供使用者使用界面”的软件(命令解析器)。它类似于DOS下的command.com和后来的cmd.exe。它接收用户命令,然后调用相应的应用程序。

Linux指令--cd,pwd

本文参照博客做了修改和总结,感谢作者的分享。http://www.cnblogs.com/peida/archive/2012/10/24/2736501.html

cd 命令可以说是Linux中最基本的命令语句,其他的命令语句要进行操作,都是建立在使用 cd 命令上的。所以,学习Linux 常用命令,首先就要学好 cd 命令的使用方法技巧。

    1. 命令格式: cd [目录名]. ----

    2. 命令功能:切换当前目录至dirName

pwd 命令来查看”当前工作目录“的完整路径。 简单得说,每当你在终端进行操作时,你都会有一个当前工作目录。 在不太确定当前位置时,就会使用pwd来判定当前目录在文件系统内的确切位置。
1.命令格式:pwd [选项].--
2.命令功能:查看”当前工作目录“的完整路径

  •     常用范例. check 1point3acres for more.
例一:进入系统根目录
命令:cd /

说明:进入系统根目录,上面命令执行完后拿ls命令看一下,当前目录已经到系统根目录了。当然我们进入系统根目录可以使用“ cd .. ”一直退,就可以到达根目录。


例二:使用 cd 命令进入当前用户主目录

“当前用户主目录”和“系统根目录”是两个不同的概念。进入当前用户主目录有两个方法。
命令:cd或者cd ~

例三:跳转到指定目录
命令: cd 指定路径

说明:可以使用相对路径,也可以使用绝对路径。相对路径直接写路径就可以,绝对路径“/”开头,然后依次往下面写


例四:查看当前目录的完整路径
命令:pwd


例五:目录连接链接时,pwd -P  显示出实际路径,而非使用连接(link)路径;pwd显示的是连接路径
命令:pwd -P

总结:

1,cd指令也经常用,但是这个比较简单,就是说切换到一个目录下面,这里不做赘述了

2,pwd指令用来查看当前目录和文件所有路径,输出绝对路径。


Topics to to covered. From 1point 3acres bbs
● three scripting ‘tools’ ○ Bash ○ Python 1/3○ R ● one lab session for each of three
..


What is Bash?
● bash is a Linux/UNIX shell ● What is a shell? a command line interface (in contrast to a graphical interface/environment) ○ Interpreter ○ REPL (read-eval-print-loop)


Set up the environment
● your own personal computer: ○ Mac, Linux ○ Windows: cygwin, or install bash
● account of our computer science department ● use the labs ● connect remotely (putty, chrome, etc )

..

. ----



回复

使用道具 举报

推荐
 楼主| 宋龙龙96 2018-9-1 00:25:19 | 只看该作者
全局:
Cygwin是一个在windows平台上运行的类UNIX模拟环境,是cygnus solutions公司开发的自由软件(该公司开发的著名工具还有eCos,不过现已被Redhat收购)。它对于学习UNIX/Linux操作环境,或者从UNIX到Windows的应用程序移植,或者进行某些特殊的开发工作,尤其是使用GNU工具集在Windows上进行嵌入式系统开发,非常有用。随着嵌入式系统开发在国内日渐流行,越来越多的开发者对Cygwin产生了兴趣。 [1]
Cygwin 提供一个UNIX 模拟 DLL 以及在其上层构建的多种可以在 Linux 系统中找到的软件包,在 Windows XP SP3 以上的版本提供良好的支持。

今天学的cd命令 其实不用学 语法和DOS基本一样,参数方面 .表示当前目录,../表示上级目录 ~表示当前用户根目录,/表示系统根目录 学了一个新参数 !$ 表示用上一条命令的参数作为cd的参数 例如:你上条执行的是pwd 那么再执行cd !$ ,就等于执行了cd pwd 但是这并无卵用。

pwd命令是显示当前目录的完整路径 一并学习了。

https://blog.csdn.net/xiaoguaihai/article/details/8705992(Linux中许多常用命令是必须掌握的,这里将我学linux入门时学的一些常用的基本命令分享给大家一下,希望可以帮助你们。)

Linux file system.1point3acres
In a graphical environment: using the graphical representation of ‘Windows’ and ‘folders’
Basic  things we can do with the file system:
● Navigate ● Look around ● Manipulate
. 1point 3acres
Navigate
pwd # print name of current working directory (essential)
cd # change directory (essential)
cd directory_name
cd ~
cd
linux命令详解之pwd命令(https://blog.csdn.net/gnail_oug/article/details/70664458Look around
ls # list directory contents (essential)
file # determine file types
less # view file contents (essential, or use more or cat)
大多数用于服务器的Linux操作系统并不提供图形界面,而是通过命令行的方式进行操作,这一点和Windows不同。Linux提供了很多命令,其中经常用于操作目录的命令如下所示:
1. pwd:用于显示当前工作目录。
2. ls:用于查看当前工作目录内容。. 1point 3 acres
3. cd:用于改变当前工作目录。

Manipulate
cp # copy files and directories (essential)
mv # move/rename files and directories (essential)
mkdir # create directories (essential)
rm # remove files and directories (essential). Χ
ln # create hard and symbolic links

Recap: what is a command
● an executable program ● a command built into the shell itself ● a shell function ● an alia

the commands about commands
type # indicate how a command name is interpreted which # display which executable program will be executed help # get help for shell builtins man # Display a command's manual page (essential) apropos # display a list of appropriate commands info # display a command's info entry whatis # display a very brief description of a command alias # create an alias for a command




回复

使用道具 举报

推荐
 楼主| 宋龙龙96 2019-2-16 10:50:16 | 只看该作者
全局:
打基础:
#set集合化(&)去重功能   
     a=[1,2,3,3,4]. 1point3acres.com
     set(a)
-->out:{1,2,3,4}
.
#这样可以索引. Waral dи,
    list(set(a))[1] )

#&交集|并集(& |)
     set(a)&set(b)
     -->out:{2,3}
     set(a)|set(b).--
     -->out: {1,2,3,4}. 1point 3acres
#差集
     set(a) -set(b)
    -->out:(1)
     set(b) -set(a)
     -->out:(4)
     [1,2]>a
    -->out: false. ----

#字典
a={'name':'yangxi','age':18}
      a.keys()
   -->out: dict_keys(['name', 'age'])
但: a.keys()[]会报错
list(a.keys())
   -->out:['name', 'age'].
list(a.values())
   -->Out[7]:['yangxi', 18]

. From 1point 3acres bbs
.1point3acres
a.items()
  -->out: dict_items([('name', 'yangxi'), ('age', 18)])
list(a.items())
  -->out: [('name', 'yangxi'), ('age', 18)]
# 元组不可修改list(a.items())[0][1]
  -->out:'yangxi'
  list(a.items())[0]
  -->out:('name', 'yangxi')
  list(a.items())[0][1]
  -->out:'yangxi'
a.get('nam',1)获取!单纯查找
  -->out: a.get('name',1)


a.setdefault('sex','female')查找后给赋值
'female'aout;{'name': 'yangxi', 'age': 18, 'sex': 'female'}字典 set{a}$set{b}字典d.get(key,0)  
#同d[key]d.has_key(key)      
#有该键值返回true,否则falsed.keys()        
#返回字典键值列表d.values()        
#列表的形式返回字典的值,返回时候无顺序d.update(dict2)               
#增加合并字典d.setdefault('stuid',1123)d.pop(key)d.popitem()               
#得到一个pair,并从字典中删除它,已空则抛出异常d.clear()         . ----
#清空字典,同del dictd.copy()        
#拷贝字典d.cmp(dict1,dict2)        
#比较字典,(优先级为元素个数,键大小,键值大小)第一个大返回1,小-1,一样0d.items()   
#变成列表,每个元素为一个元组



. Χ

回复

使用道具 举报

🔗
 楼主| 宋龙龙96 2018-8-31 22:34:44 | 只看该作者
全局:
https://code.visualstudio.com/ 老师推荐的下软件网站
回复

使用道具 举报

🔗
 楼主| 宋龙龙96 2018-8-31 22:42:19 | 只看该作者
全局:
我们学校第一节的作业。可以参观一下。
General Guideline:

Please submit your homework on paper whenever possible. Either print-out or handwritten is OK. Email the homework only if you have to.
If the assignment is to write a script, which is often the case, please submit the script only. I do not need the output, the screenshot, the report, etc. Well-written comments are appreciated though not required.
Test your script to make sure it does exactly the same thing as specified in the assignment. If it does not work completely, please attach a brief note describing what kind of issues or errors happened.
✏ Homework 1 due on September 10/6, 2018
Test your bash environment with any of options discussed in the class. Type the following commands and describe the response from the command line. . 1point 3acres
uname -a
whoami
Find out what echo command does. Write a script named hello.sh that prints out "Hello there," on the first line and your username on the second line.
⛾ Text to read
TLCL Chapters 1 through 6
回复

使用道具 举报

🔗
 楼主| 宋龙龙96 2018-8-31 23:39:25 | 只看该作者
全局:


CISC 5500 - DATA ANALYTICS TOOLS&SCRIPTING
Data Analytics involves many steps: data has to be acquired, preprocessed, visualized, and possibly transformed into a different representation before it can be analyzed. This foundational class provides the practical knowledge and skills to handle all of these steps. A variety of tools and techniques will be introduced and applied for fetching data (e.g., scraping web pages) and manipulating data. Scripting languages and general purpose languages suitable for these purposes will be covered (e.g., Linux shell, PERL, Python). A number of data mining and data analytic tools will also be introduced, which may include tools such as Matlab, R, and Python, and important Python libraries will be covered (e.g. Numpy). Hands-on exercises will be provided throughout the course. This class will provide the skills necessary to excel in data analytics. It is geared toward graduate students in Data Analytics, but is appropriate for other Computer Science graduate students and graduate students in other fields that rely on data analysis. Basic familiarity with computer programming is expected. Prerequisites: CISC 5300 Computer Programming or equivalent.
3.000 Credit hours -baidu 1point3acres

Bash: essential commands
Linux 中的cd ..和cd -命令有什么区别
cd ..是返回上一层目录, cd -是返回到上一次的工作目录,
.1point3acres
如果当前目录是/
执行cd /usr/local
再执行cd ..就是到 /usr
而执行cd -就是到/

回复

使用道具 举报

🔗
 楼主| 宋龙龙96 2018-11-7 02:17:51 | 只看该作者
全局:
#python关系表达式:  #关系表达式(用来作为条件的,(10>2true,10<2false)关系表达式用来判断true,false的)0假/非0

#流程--if选择 while/for循环(1+3,4,5..100)
#try  except   assert. 1point3acres.com
#基本数据类型 str / int  float

. Waral dи,
#if 语句用来做选择.
#程序要么是选择要么是循环-baidu 1point3acres
if tj1:
    pass. 1point 3acres
#elif tj2:
   # pass
else:
    pass

--------------------------------------------------------------------
​if True:. 1point3acres.com
    pass. .и
elif False:
    pass
elif 0:#false
    pass
elif 1:#true ..
    pass
else:
    pass
#条件(3类):True/False,关系表达式,0/非0
    **1>3 out: false  1==4  out: false
##关系表达式x1=10 x2=20#<=、>=, ! =,==
#Python关系运算符包括:!=,==<=、>=、<>、<、>、<=、>=,返回布尔值True/False(1==2)#关系运算符用来做判断
#and (同时成立)  or   not  in/not in与  或  非
#indentation error

----------------------------------------------------------------------------------
if tj1 and tj2  and tj3:(#同时成立执行,,).1point3acres
    pass
if tj1 or tj2 or tj3:
    pass
if not tj1:
    pass
. Χif tj1 not in []:
    pass

python 运算符:
+ - * ** / // %. check 1point3acres for more.
2**3 8
---------------------------------------------------------
#基本数据类型 str / int  float
num=input("Enter a number")
print(type(num))
#str int float
.1point3acres
字符串转化为数字:
num=int(input("Enter a number:"))   #input得到的返回值为字符串(str)
print(num/2)

eval 对字符串运算:
num=input("Enter a number:")   #得到的返回值为字符串(str)
print(eval(num))
--Enter a number:1+2+3
6
#eval对txt 里面的运算计算 ..




. Χ.--
.








回复

使用道具 举报

🔗
 楼主| 宋龙龙96 2018-11-7 04:14:15 | 只看该作者
全局:
..
In
  • :


    . From 1point 3acres bbs




    -baidu 1point3acres




    主流输出方法 掌握三种

    #print("输出一个数字:",12)输出一个数字:  12print("输出一个数字:%f"%12)格式化%输出一个数字:12.00000多个:print("输出一个数字:%f-%d"%(12,12)) #f-float d-int输出一个数字:12.00000-12​print("输出一个数字:{}".format(12))输出一个数字:12x=12000print(f"输出一个数字:{x}")输出一个数字:12000print(f"输出一个数字:{12000}")----------------------------------#赋值运算符python赋值运算符包括:=、+=、-=、*=、/=、%=a=12a+=1   #a=a+1aout:13#条件(3类):True/False,关系表达式,0/非0##关系表达式x1=10 x2=20#<=、>=, ! =,==#Python关系运算符包括:!=,==<=、>=、<>、<、>、<=、>=,返回布尔值True/False(1==2)#关系运算符用来做判断#and (同时成立)  or   not  in/not in与  或  非#indentation error
    while tj:    passfor i in rongqi: #迭代    pass#容器对象:list/tuple/dict/set. 1point 3acres
    sum=0while True:sum+=10(每次+10)(sum=0+10,sum=10+10, sum=20+10)
    sum=0while i<10:    sum+=10    sum=0i=0(初始值)while i<10:    sum+=10    i=i+1(执行一次就更新一下条件)sumout:100 ..
    死循环:(工厂一直工作)sum=0while True:  sum+=10sum---->sum=0while True:    sum+=10    if sum>150:        break#跳出循环体sumout:160
    while True:    sum+=10    if sum>150:        break#跳出循环体    if sum>0:       continuesum---->sum=0while True:    sum+=10    if sum>0:(sum=0, 0>0 false)       continue    (sum+=10想放哪里放哪里)    if sum>150:(0+10,10>150 false 不执行break,继续执行true-->10>0 continue!#结束本次循环不执行后面的跳回while true        break#跳出循环体sum



    .

    . check 1point3acres for more.



    . 1point 3 acres


    . check 1point3acres for more.
  • 回复

    使用道具 举报

    🔗
    K哥 2019-2-17 00:53:09 | 只看该作者
    全局:
    网课吗还是?
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 注册账号
    隐私提醒:
    • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
    • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
    • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
    • ☑ 查阅全站 🔗各种匿名方法

    本版积分规则

    >
    快速回复 返回顶部 返回列表