Showing posts with label #Education. Show all posts
Showing posts with label #Education. Show all posts

Tuesday, August 30, 2022

How to list all files in the folder and sub folder ( directories and sub directories) and store it in csv files

 Hi Everyone,

I am newbie to Python #python 

I have tried so many sites and could not able to find how to get files from the folder and its sub folder.

So i got bit and pieces from stakeoverflow forum and created this code with help of my friend Gowrishankar.

Please find the code below

code:-

import os
import pandas as pd
#path of the file you want to enemurate
path = "//home//halovivek//Downloads//education//Jimi Kwik - Super Brain//"
directory =[]
filename=[]

for (root,dirs, file) in os.walk(path):
for f in file:
directory.append(root)
filename.append(f)

print(f)

#column name of the sheet
df=pd.DataFrame(list(zip(directory,filename)),columns=['Directory',"filename"])
#change the file of exccl sheet
df.to_csv("filedirectory.csv")

 (path:- if you are using windows then you need to use backward slash (\\)  instead of forward slash - // )

Output:-

/home/halovivek/PycharmProjects/yearcoding/venv/bin/python /home/halovivek/PycharmProjects/yearcoding/30082022_listfilesfromdirectory.py
Day 12 - Implementation Day - Juggling Exercise.mp4
Day 12 - Implementation Day - Juggling Exercise.MP3
Part 2 - Preparing For The Quest.mp4
Part 1 - Welcome To Your 30-Day Superbrain Quest.mp4
Part 5 - 10 Morning Habits Geniuses Use To Jump Start The Brain.mp4
Part 3 - The FAST Method For Learning Anything.mp4
Part 2 - Preparing For The Quest.MP3
Part 1 - Welcome To Your 30-Day Superbrain Quest.MP3
Part 5 - 10 Morning Habits Geniuses Use To Jump Start The Brain.MP3
Part 4 - How To Take Notes.mp4
Part 3 - The FAST Method For Learning Anything.MP3
Part 4 - How To Take Notes.MP3
Day 27 - The Ancient Alphanumeric Code Of Memory Part 2 - Application.MP3
Day 27 - The Ancient Alphanumeric Code Of Memory Part 2 - Application.mp4
Day 29 - The 5 Levels Of Transformation.MP3
Day 29 - The 5 Levels Of Transformation.mp4
Day 14 - Memory Is As Easy As PIE.MP3
Day 14 - Memory Is As Easy As PIE.mp4
Day 15 - The FDR Technique.MP3
Day 15 - The FDR Technique.mp4
Day 31 - Overcoming Procrastination.mp4
Day 31 - Overcoming Procrastination.MP3
Day 9 - Chain Linking - Part 1.mp4
Day 9 - Chain Linking - Part 1.MP3
Day 8 - Implementation Day - Morning Routine.mp4
Day 8 - Implementation Day - Morning Routine.MP3
Day 24 - Implementation Day - Crossovers.MP3
Day 24 - Implementation Day - Crossovers.mp4
Day 19 - Learning Foreign Languages.mp4
Day 19 - Learning Foreign Languages.MP3
Day 13 - BE SUAVE Remembering Names.MP3
Day 13 - BE SUAVE Remembering Names.mp4
Day 34 - Speed Reading.MP3
Day 34 - Speed Reading.mp4
Day 22 - The Location Method.MP3
Day 22 - The Location Method.mp4
Day 5 - Nutrition _ Your Body Folders.MP3
Day 5 - Nutrition _ Your Body Folders.mp4
Day 23 - Memorize Word For Word.MP3
Day 23 - Memorize Word For Word.mp4
Day 30 - Q&A Session with Jim.mp4
Day 30 - The 5 Levels Of Learning.mp4
Day 30 - The 5 Levels Of Learning.MP3
Day 30 - Q&A with Jim.MP3
Day 28 - Implementation Day - Phonetic Number Code.MP3
Day 28 - Implementation Day - Phonetic Number Code.mp4
How To Become A Super Learner Masterclass - Jim Kwik.mp4
how_to_become_a_super_learner_by_jim_kwik_workbook_nsp.pdf
Day 18 - Keyword Substitution Method.MP3
Day 18 - Keyword Substitution Method.mp4
Day 32 - Your 8 C's To Muscle Memory.mp4
Day 32 - Your 8 C's To Muscle Memory.MP3
Day 4 - Implementation Day - Spaced Repetition Concept.mp4
Day 4 - Implementation Day - Spaced Repetition Concept.MP3
Day 26 - The Ancient Alphanumeric Code Of Memory Part 1 - The Sounds.MP3
Day 26 - The Ancient Alphanumeric Code Of Memory Part 1 - The Sounds.mp4
Day 2 - The Sun Is Up.mp4
Day 2 - The Sun Is Up.MP3
Day 16 - Implementation Day - Superbrain Yoga.MP3
Day 16 - Implementation Day - Superbrain Yoga.mp4
Day 10 - Chain Linking - Part 2.MP3
Day 10 - Chain Linking - Part 2.mp4
.getxfer.14810.259.mega
Day 7 - Sleep _ Stress Management.MP3
Day 7 - Sleep _ Stress Management.mp4
Day 33 - Remembering Your Dreams.mp4
Day 33 - Remembering Your Dreams.MP3
.getxfer.14709.10.mega
.getxfer.28947.5.mega
Day 21 - How To Give A Speech Without Notes.MP3
.getxfer.27388.5.mega
Day 3 - The 10 Keys To Unlocking Your Superbrain.mp4
.getxfer.10040.5.mega
Day 6 - Environments _ Killing ANTs.MP3
_Groupinsiders.com.url
Day 6 - Environments _ Killing ANTs.mp4
Day 25 - Numbers - The Basics.mp4
Day 25 - Numbers - The Basics.MP3
Day 1 - M.O.M. Can Help You Remember.MP3
Day 1 - M.O.M. Can Help You Remember.mp4
Day 20 - Implementation Day - Counting To 10 In Japanese.MP3
Day 20 - Implementation Day - Counting To 10 In Japanese.mp4
Day 11 - The Peg Memory Method.MP3
Day 11 - The Peg Memory Method.mp4
Day 17 - The Ultimate TIP To Remembering Anything.MP3
Day 17 - The Ultimate TIP To Remembering Anything.mp4

Process finished with exit code 0


Sunday, March 5, 2017

Tips to Win in share trading Intraday

INTRADAY TIPS M:
*
General tips of earning in Intraday Trade
*

1: - Close your position in same only, don'tcarryover. If you dont have caliber to book loss, dont do intdaday trade. Even you are not fit for stock trade.

2:- Trade by brain, not by heart.

3:- Dont believe in superpower, believe at your own skills and candle sticks and stock trading protocols.

4:- Use strict stop loss, "training stop loss" and set a good an "in the money" target. Put that in terminal not in mind.

5:- Don't try to take reverence from the market (or any stock).

6:- If any particular stock gave a loss or profit, just leave that script of this same day. Avoid averaging.

7: - Don't be a compulsive trade (in you are not comfortable in trade mainly in range bound trade), no trade is also a trade.

8:- Avoid trade during lunch time. (11 :30 AM to 1:30 PM)

9:- Start trading from 9:30 am to 11:00 AM and 1.30 to 3:30.

10:- Set your daily loss book limit, then start trade and after book that loos, leave for that day. (How you can calculate it, msg me personally)

11:- If you got loss any day, try to avoid trade for that same day, sentimentality you will not be fit for trade, due to panic your upcoming decisions might be wrong.

12:- After getting 5 % return of your investment, you can stop trade.

13:- Choose only 5 stock (maximum) for a day for trade.

14:- Don;t be greedy and avoid anger.

15:- Trend is your friend, don't go opposite.

16:- Don't try to be over smart, one brains cant be powerful that a millions of cumulative brains. Trade as market says, don't try to make control over market.

17:- Wake early in the morning at see CNBC and ZEE News. Just see, dont follow then blindly. See
www.moneycontrol.com and https://
www.bloomberg.com regularly. Getting news and keep eyes in emerging market is very important.

18:- Keep eyes on doller index, and INRvs Rs as well.

19:- Have a compulsory lunch at 12.30 to 1.00

20:- Every evening, forget that day go at walk. Enjoy weekend with friends.

Posted as I got :)

How to Get files from the directory - One more method

 import os import openpyxl # Specify the target folder folder_path = "C:/Your/Target/Folder"  # Replace with the actual path # Cre...