ayushnoori commited on
Commit
ecbc9c7
1 Parent(s): f1916b8

Base repository files

Browse files
Files changed (6) hide show
  1. .gitignore +32 -0
  2. Code/synthesizer.py +15 -0
  3. README.md +5 -2
  4. project_config.py +25 -0
  5. setup.sh +3 -0
  6. setup_jupyter.sh +4 -0
.gitignore ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .Rproj.user
2
+ .Rhistory
3
+ .RData
4
+ .Ruserdata
5
+ .DS_Store
6
+ */.DS_Store
7
+
8
+ # ignore Python cache
9
+ __pycache__
10
+ .ipynb_checkpoints
11
+
12
+ # ignore Notes
13
+ Code/Notes/*
14
+
15
+ # ignore files in Data subdirectories
16
+ Data/*/*
17
+
18
+ # unignore README files with .md extensions
19
+ !Data/*/README.md
20
+
21
+ # ignore files in Results subdirectories
22
+ Results/*/*
23
+
24
+ # unignore README files with .md extensions
25
+ !Results/*/README.md
26
+
27
+ # ignore lightning logs
28
+ **/lightning_logs/
29
+
30
+ # ignore virtual environment
31
+ # to activate, run source synthetic_env/bin/activate
32
+ cs252r_env/
Code/synthesizer.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ '''
2
+ BOTTOM UP ENUMERATIVE SYNTHESIS
3
+ Ayush Noori
4
+ CS252R, Fall 2020
5
+ '''
6
+
7
+ # load libraries
8
+ import numpy as np
9
+ import os
10
+
11
+ # import project config file
12
+ import sys
13
+ sys.path.append('..')
14
+ import project_config
15
+
README.md CHANGED
@@ -1,2 +1,5 @@
1
- # cs252r
2
- CS252R: Program Synthesis at Harvard College, Fall 2023.
 
 
 
 
1
+ # CS252R: Program Synthesis
2
+
3
+
4
+ ## PSET 1: Bottom-Up Enumerative Synthesis
5
+
project_config.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ '''
2
+ PROJECT CONFIGURATION FILE
3
+ This file contains the configuration variables for the project. The variables are used
4
+ in the other scripts to define the paths to the data and results directories. The variables
5
+ are also used to set the random seed for reproducibility.
6
+ '''
7
+
8
+ # import libraries
9
+ import os
10
+ from pathlib import Path
11
+
12
+ # check if on O2 or not
13
+ home_variable = os.getenv('HOME')
14
+ on_remote = (home_variable == "/home/an252")
15
+
16
+ # define base project directory based on whether on O2 or not
17
+ if on_remote:
18
+ PROJECT_DIR = Path('')
19
+ else:
20
+ PROJECT_DIR = Path('/Users/an583/Library/CloudStorage/OneDrive-Personal/Academic/College/Junior Year/Fall Term/COMPSCI 252R/cs252r')
21
+
22
+ # define project configuration variables
23
+ DATA_DIR = PROJECT_DIR / 'Data'
24
+ RESULTS_DIR = PROJECT_DIR / 'Results'
25
+ SEED = 42
setup.sh ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ #!/bin/bash
2
+ conda deactivate
3
+ source synthesis_env/bin/activate
setup_jupyter.sh ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ #!/bin/bash
2
+ conda deactivate
3
+ source synthesis_env/bin/activate
4
+ jupyter notebook --port=54321 --browser='none'