This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import cv2 | |
import numpy as np | |
import torch | |
import torchvision.transforms.functional as TF | |
from typing import List | |
from kornia.filters import filter2d, get_gaussian_kernel2d | |
from kornia.filters import filter2d_separable, get_gaussian_kernel1d | |
from kornia.filters.filter import _compute_padding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <ctype.h> | |
enum {PLUS, MINUS, TIMES, DIV, LPARN, RPARN, CONST}; | |
enum {LEFT, RIGHT, NA}; | |
struct property { | |
uint8_t prec; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <ctype.h> | |
enum {PLUS, MINUS, TIMES, DIV, LPARN, RPARN, CONST}; | |
enum {LEFT, RIGHT, NA}; | |
struct property { | |
uint8_t prec; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
enum {IMM, ADD, SUB, MUL, DIV}; | |
typedef struct ast ast; | |
typedef struct ast { | |
int tok; | |
int val; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Recursive Descent Parser for the following grammar. | |
* | |
* expression = term { ( "+" | "-" ) term }. | |
* term = factor { ( "*" | "/" ) factor }. | |
* factor = number | "(" expression ")". | |
* | |
*/ | |
#include <stdio.h> |