Skip to content

Instantly share code, notes, and snippets.

/**
* Parse function for each non-terminal with error recovery.
* TODO: add error recovery!
*
* @param symbol the non-terminal to be parsed.
* @return the parsed value of `symbol` if parsing succeeded, otherwise `null`.
*/
private SemValue parse(int symbol, Set<Integer> follow) {
Pair<Integer, List<Integer>> result = query(symbol, lookahead); // get production by lookahead symbol
@2iw31Zhv
2iw31Zhv / pickle2gds.py
Created December 5, 2019 18:29
some working code to generate gds from pickle file
import pickle
import numpy as np
import matplotlib.pyplot as plt
import gdspy
import cv2
index_low = 1.445*1.445
index_hi = 3.48*3.48
thr = 0.5
SizePerPixel = 0.04
#include <iostream>
#include <fstream>
#include <iomanip>
#include <functional>
#include <random>
#include <chrono>
#include "utils/timer.hpp"
#include "rcwa/WaveEquationCoeff.h"
#include "core/RCWAScatterMatrix.h"