Restructure repository: organize tools by purpose, create what search tool
- Move single-file tools to tools/ organized by category (security, forensics, data, etc.) - Move multi-file projects to projects/ (go-tools, puzzlebox, timesketch, rust-tools) - Move system scripts to scripts/ (proxy, display, setup, windows) - Organize config files in config/ (shell, visidata, applications) - Move experimental tools to archive/experimental - Create 'what' fuzzy search tool with progressive enhancement (ollama->fzf->grep) - Add initial metadata database for intelligent tool discovery - Preserve git history using 'git mv' commands
This commit is contained in:
18
archive/experimental/hydrogentest.py
Normal file
18
archive/experimental/hydrogentest.py
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/python3
|
||||
a="ksabvdkbvksajbvkjsabvkjsabvkjabsvkjsabvbvghahfksajfkjhcxvsLHREFIsdfsdfsdfasdfasdfasfd"
|
||||
b="kucasdhkausughaksdflsad iajfdaslfdlgajldsag asldivclsadgnaksndglkasdjasdvc"
|
||||
def longest_common_substring(s1, s2):
|
||||
m = [[0] * (1 + len(s2)) for i in range(1 + len(s1))]
|
||||
longest, x_longest = 0, 0
|
||||
for x in range(1, 1 + len(s1)):
|
||||
for y in range(1, 1 + len(s2)):
|
||||
if s1[x - 1] == s2[y - 1]:
|
||||
m[x][y] = m[x - 1][y - 1] + 1
|
||||
if m[x][y] > longest:
|
||||
longest = m[x][y]
|
||||
x_longest = x
|
||||
else:
|
||||
m[x][y] = 0
|
||||
return s1[x_longest - longest: x_longest]
|
||||
|
||||
print(longest_common_substring(a, b))
|
||||
Reference in New Issue
Block a user