Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
AnupKumarPanwar committed Jul 6, 2019
1 parent 831558d commit 4e413c0
Show file tree
Hide file tree
Showing 45 changed files with 404 additions and 702 deletions.
12 changes: 4 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ We want your work to be readable by others; therefore, we encourage you to note

- Write tests to illustrate your work.

The following "testing" approaches are not encouraged:
The following "testing" approaches are **not** encouraged:

```python
```python*
input('Enter your input:')
# Or even worse...
input = eval(raw_input("Enter your input: "))
Expand All @@ -97,13 +97,9 @@ We want your work to be readable by others; therefore, we encourage you to note

#### Other Standard While Submitting Your Work

- File extension for code should be `.py`.

- Please file your work to let others use it in the future. Here are the examples that are acceptable:
- File extension for code should be `.py`. Jupiter notebook files are acceptable in machine learning algorithms.

- Camel cases
- `-` Hyphenated names
- `_` Underscore-separated names
- Strictly use snake case (underscore separated) in your file name, as it will be easy to parse in future using scripts.

If possible, follow the standard *within* the folder you are submitting to.

Expand Down
50 changes: 50 additions & 0 deletions DIRECTORY.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import os

def getListOfFiles(dirName):
# create a list of file and sub directories
# names in the given directory
listOfFile = os.listdir(dirName)
allFiles = list()
# Iterate over all the entries
for entry in listOfFile:
# if entry == listOfFile[len(listOfFile)-1]:
# continue
if entry=='.git':
continue
# Create full path
fullPath = os.path.join(dirName, entry)
entryName = entry.split('_')
# print(entryName)
ffname = ''
try:
for word in entryName:
temp = word[0].upper() + word[1:]
ffname = ffname + ' ' + temp
# print(temp)
final_fn = ffname.replace('.py', '')
final_fn = final_fn.strip()
print('* ['+final_fn+']('+fullPath+')')
# pass
except:
pass
# If entry is a directory then get the list of files in this directory
if os.path.isdir(fullPath):
print ('\n## '+entry)
filesInCurrDir = getListOfFiles(fullPath)
for file in filesInCurrDir:
fileName = file.split('/')
fileName = fileName[len(fileName)-1]

# print (fileName)
allFiles = allFiles + filesInCurrDir
else:
allFiles.append(fullPath)

return allFiles


dirName = './';

# Get the list of all files in directory tree at given path
listOfFiles = getListOfFiles(dirName)
# print (listOfFiles)
Loading

0 comments on commit 4e413c0

Please sign in to comment.