ezoic

Wednesday, January 25, 2017

Tuesday, January 24, 2017

How to switch to another disk and how to get ipconfig work on command prompt

How to switch to another disk and how to get ipconfig work on command prompt.

If you want to switch from C drive to G drive, you can try:

cd  /d G:\



If you want to know your IP, you can use ipconfig. Sometimes it won't work. Try to go to windows\system32, and then type ipconfig.

C:\Windows\System32\ipconfig


How to run a python class, and ow to run R script on linux

Here is a python class:



    class Student:
         def   __init__(self, name, age):
                 self.name=name
                 self.age=age
         def   say_hello(self):
                print(self.name, "say hello")



And, to run it, type the following in the same program:

alice=Student("Alice", 16)
alice.say_hello()

Do not forget the parenthesis.



Save the program as python1.py

And on linux run:

python python1.py

And you will see on the screen:

('Alice', 'say hello')



Here is another example:


class Base1:
def __init__(self,x,y):
self.x=x
self.y=y
def add1(self):
z=self.x+self.y
print(z)

def main():
foo=Base1(1,2)
foo.add1()

if __name__=="__main__":
main()

And you will see 3 was printed on screen.



To run an R program on linux, write an R program and save as rprog1.R


a=c(1,2,3)
for ( i in 1:3)
{ print(i)}

And run Rscript rprog1.R on linux, you will see:
[1] 1
[2] 2
[3] 3




Text mining websites and books etc

text mining with R:

http://tidytextmining.com/

text mining website:

http://abbottanalytics.blogspot.com/search/label/text%20mining


http://text-analytics101.rxnlp.com/








R is not a simple programming language, and it does better on reading excel files than python

R is not a simple programming language, and it does better on reading excel files than python . tried to read excel files to python and R. i...