Skip to content

Commit

Permalink
[gen].update
Browse files Browse the repository at this point in the history
  • Loading branch information
universmc committed Dec 7, 2023
1 parent 3498cdc commit 7e3b129
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 2 deletions.
13 changes: 13 additions & 0 deletions ia/lib/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Project Name

Version: N/A

## Issues
Issues:
3498cdc update
8ce10a8 test
6d3031d Initial commit


## Brainstorming Summary
Brainstorming Summary: ...
2 changes: 2 additions & 0 deletions ia/lib/combined.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions ia/lib/generate_combined_svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ def generate_sigmoid(diameter, weight):
x = np.linspace(-diameter / 2, diameter / 2, 100)
y = 1 / (1 + np.exp(-weight * x))
return x, y

def generate_svg(diameter, weight, tensor):
dwg = svgwrite.Drawing('combined.svg', profile='tiny')

Expand All @@ -20,7 +19,8 @@ def generate_svg(diameter, weight, tensor):
for j, value in enumerate(row):
rect_x = j * 20 # Adjust as needed
rect_y = 100 + i * 20 # Adjust as needed
dwg.add(dwg.rect((rect_x, rect_y), (15, 15), fill=f'rgb({value * 255}, {value * 255}, {value * 255})'))
# Use rect_x and rect_y within this loop
dwg.add(dwg.rect((rect_x, rect_y), (15, 15), fill=f'rgb({int(value * 255)}, {int(value * 255)}, {int(value * 255)})'))

dwg.save()

Expand Down
45 changes: 45 additions & 0 deletions ia/lib/generate_readme.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# generate_readme.py

import os
import subprocess

def get_git_version():
try:
version = subprocess.check_output(['git', 'describe', '--tags'], stderr=subprocess.STDOUT, text=True).strip()
return f"Version: {version}"
except subprocess.CalledProcessError:
return "Version: N/A"

def get_git_issues():
try:
issues = subprocess.check_output(['git', 'log', '--oneline', '--no-merges'], stderr=subprocess.STDOUT, text=True)
return f"Issues:\n{issues}"
except subprocess.CalledProcessError:
return "Issues: N/A"

def get_brainstorming_summary():
# You can customize this function to read summaries from your brainstorming sessions
return "Brainstorming Summary: ..."

def generate_readme():
version = get_git_version()
issues = get_git_issues()
brainstorming_summary = get_brainstorming_summary()

readme_content = f"""# Project Name
{version}
## Issues
{issues}
## Brainstorming Summary
{brainstorming_summary}
"""

with open("README.md", "w") as readme_file:
readme_file.write(readme_content)

if __name__ == "__main__":
generate_readme()

0 comments on commit 7e3b129

Please sign in to comment.