-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python deva_iast_comp step0 #3
Comments
Of course, questions and comments here welcome. |
Guess it will take her a few more days to recover. I myself was dead for three days, but now it's ower. She will soon follow. |
Were you and Anna taken by Covid? Glad you are better, and hope also Anna recovers soon. |
It was not covid for me, hope not for Anna as well. Anna said she'll be back in a couple of days. And I would want to introduce Kate, @KateRusse from the same city Anna initially came from, from the same Saint Petersburg State University. |
Dear all, |
Marcis, you aren't quite right, before Greece I was living and studying in Moscow. In Saint Petersburg and in Saint Petersburg State University I just have a lot of friends. |
This is the 'command' to use in a terminal, such as the git bash terminal. |
Dear Jim, many thanks!!! I suppose i understood now what to do. I will try to manage it tomorrow. |
You may see the term 'development environment' which refers to the programs (tools) used to aid in the development of programs written in some programming language. In the way I am describing to you, the development environment involves three components:
This is a minimalist python development environment.
What we are doing might be classified as a type of natural language processing, which is considered a branch of 'data science', Effective use of these more robust development environments requires gaining knowledge of the tools and, sometimes, a complex installation procedure. For me, the learning curve has never been worth it. But I do occasionally like to experiment with Jupyter notebooks. When beginning Python programming several years ago, I also made use of some simpler web-based programming environments such as And probably others. Depending on how your interest in Python develops, you may sometime want to try some of these other approaches. But for now, I'll stick with helping you learn via the 'minimalist' environment. |
The default one for students. |
@AnnaRybakovaT The command to execute the program must be consistent with where things are in the file system. Notice that you are in the directory 'MD'. But that is not where 'readwrite.py' is found. (do you see how the error message gives this clue?) Thus, you need to find the directory containing this 'readwrite.py' program, then 'cd' there in Gitbash. So, what directory is readwrite.py in ? |
Yep! You got it! Do you understand why the command has '../data.txt' instead of 'data.txt' ? What is that '../' ? What happens if you omit the '../' ? What happens if you run the command And why did I write '../temp_readwrite.txt' instead of '../readwrite.txt' ? |
@AnnaRybakovaT Try now |
Thanks! It works now! |
I pulled, and now see your results of running readwrite program and documentationSome suggestions regarding 'documentation' of your new program. The main principle: add enough documentation to help recall what you did. Documentation is never perfect, and what is enough documentation is subjective. Here are suggestions regarding documentation of readwriteA1.
|
Is "documentation" should be in a file "readme"? |
Dear all, |
First, there is already a file 'readme.txt' in step0 directory, which I started. |
the untracked file '../readwrite.txt'I presume that
In this case, git picks up all the modified files in the current directory or in any subdirectories of the current directory. So git shows the two readwriteA1 files in green, indicating it found them. what does '../' mean?When current directory is In terminal, make step0 your current dirrectory, then issue command Next try |
what to do with '../readwrite.txt'I think you really don't want md/deva_iast_comp/readwrite.txt. (the readwrite.txt you want is |
Why did I use '../data.txt'This was in running readwrite.py (and similarly your readwriteA1.py). I put data.txt in the deva_iast_comp directory on purpose, in anticipation of using it as the input file not only in step0 but in future step1, step2, etc. But since we are running our program from step0 (and later from step1, etc.),
Thus, we have to indicate the full location of data.txt, and since data.txt is in the directory which |
multi-level house analogyHere's an analogy that may be helpful in thinking about '../' and other things about locations. Think of the 'MD' directory as a multi-level house, with each level containing rooms, and possibly containing stairs connecting the levels.
We can use the stairs down to deva_iast_comp room:
What's in that room?
two boxes data.txt and readme.txt, and a stairway down to a room step0. If we want to go back up to the level above this level, the stairway up is known as '../'
Don't know if this analogy is helpful. If not, just ignore. |
Dear Jim, |
I had this message during my 1st try to write the Usage for readwriteA1.py. And now I understood why)) |
Has done. |
I am confused a bit... Probably I have to delete one of those files: |
You could delete md/deva_iast_comp/readwrite.txt (you would also need to change your documentation deva_iast_comp/step0/readme.txt at line 44 from '../readwrite.txt' to '../data.txt'. |
I'll start preparing a 'step1' . Where we'll do more complex things in the 'adjustlines' function. |
Dear Jim, |
Yes, exactly. Incidentally, the suggested change to documentation is optional. But, in the hypothetical case where you
Then someone reading the documentation in readme and trying the suggested command would get an error, and thus might be confused. It is to avoid (to the extent possible) such confusion that I suggested the change to the readme file. It's good to get in the habit of thinking of documentation as an integral part of programming. |
It is something to be learnt from you. Actually I have quite many Russian newcommers and they are ready for different tasks. What could we test them on? |
@gasyoun What kinds of 'different tasks' are you thinking of for the newcomers? |
Thanks!!! Just wanted to be sure. Now has done. |
Whatever - checking of lists of suspected words, abbreviation cleanup, literally anything.
They are no-coders, or maybe one them is a bit, but I would not push in this directin too far. |
@gasyoun got it. Will keep this in mind and develop some ideas. |
@AnnaRybakovaT -
Please git pull (or clone) this https://github.com/sanskrit-lexicon/MD/ repository and
Check out the 'deva_iast_comp' directory, starting with the readme files.
Then try the suggestions for study in step0/readme.txt.
When you're ready, push the directory again.
The text was updated successfully, but these errors were encountered: