In [4]:
l = ['others',
'others',
'others',
'others',
'docker',
'docker',
'elasticsearch_template',
'elasticsearch_template',
'elasticsearch_template',
'elasticsearch_template',
'java',
'java',
'java',
'java',
'java',
'java',
'java',
'java',
'java',
'java',
'java',
'java',
'java',
'java',
'js',
'python',
'python',
'python',
'python',
'python',
'python',
'python',
'python',
'python',
'python',
'shells',
'shells',
'shells',
'shells',
'shells',
'shells',
'shells',
'shells',
'shells',
'shells',
'shells',
'shells',
'shells',
'shells',
'shells',
'shells',
'shells',
'shells',
'shells',
'shells',
'shells',
'shells',
'shells',
'simulate_keypress',
'simulate_keypress',
'sql',
'sql',
'sql',
]
In [5]:
dirlist= list(set(l))
In [6]:
flist = ["./others/flush_dns_cache.md",
"./others/jboss_dynamic_host_rewrite.xml",
"./others/jupyter_shortcuts.md",
"./others/nusoap_utf8_response.php",
"./docker/docker_commads.sh",
"./docker/docker_swarm.sh",
"./elasticsearch_template/ngram_template.json",
"./elasticsearch_template/ngram_template_curl.sh",
"./elasticsearch_template/phonetic_analyzer_template.json",
"./elasticsearch_template/phonetic_analyzer_template_curl.sh",
"./java/CheckPolymorphism.java",
"./java/FunFunctionExperiment.java",
"./java/GsonHelper.java",
"./java/java.gitignore.collection",
"./java/maven_copy_dependencies_to_lib.xml",
"./java/maven_shade_manifest_main_class.xml",
"./java/maven_single_fat_jar.xml",
"./java/mysql_connection_for_spring.properties",
"./java/SieveGenerator.java",
"./java/Singleton.java",
"./java/SmtpMailManager.java",
"./java/spring-boot-swagger-config.md",
"./java/ThreadSafeSingleton.java",
"./java/Trie.java",
"./js/detect_change_in_form.js",
"./python/base64EncDec.py",
"./python/checkAvailIp.py",
"./python/generatePermutationCombination.py",
"./python/improve_pure_functool.py",
"./python/inversion_count.py",
"./python/kill_java_process_on_windows.py",
"./python/local_fileserver.py",
"./python/merge_sort.py",
"./python/OraclePagination.py",
"./python/trie.py",
"./shells/append_file_to_another.sh",
"./shells/check_meltdown_ubuntu.sh",
"./shells/check_start_process.pl",
"./shells/delete_file_and_folder_with_pattern.sh",
"./shells/deploy_jar_to_maven.sh",
"./shells/exportImportMySQLdb.sh",
"./shells/find_file_with_size.sh",
"./shells/find_list_of_files_directory.sh",
"./shells/find_text_in_folder.sh",
"./shells/folder_info.sh",
"./shells/install_python2_krnl_conda.sh",
"./shells/loop_between_files_in_folder.sh",
"./shells/lscpu_monitor.sh",
"./shells/mysql_create_user.sh",
"./shells/mysql_install_config.sh",
"./shells/os_info.sh",
"./shells/process_info.sh",
"./shells/rsync_copy_exclude_dir.sh",
"./shells/sha256_csr_with_openssl.sh",
"./shells/smlink_win.bat",
"./shells/start_ubuntu_in_terminal.sh",
"./shells/update_server_time_from_ntp.sh",
"./shells/video_to_audio_ubuntu.sh",
"./shells/word_count_in_a_file.sh",
"./simulate_keypress/simulate.html",
"./simulate_keypress/simulate_keypress.js",
"./sql/detect_duplicate_value.sql",
"./sql/grantAccessMysql.sql",
"./sql/update_column_seq_val.sql",]
In [9]:
dirlist= list(set(l))
flist = sorted(flist)
flist
current = ""
for f in flist:
for d in dirlist:
if f.startswith("./{0}".format(d)):
current = d
print("\n### [" + current + "](./" + current + "/)\n")
dirlist.remove(d)
fileName = f.strip()[len(current)+3:]
print("* [{0}]({1})".format(fileName, f))
In [ ]: