Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include "allocate.h"
void read_array(int *a, int len)
{
for(int i=0; i<len; i++)
scanf("%d", &(a[i]));
}
void print_array(int *a, int len)
{
for(int i=0; i<len; i++)
#include<stdio.h>
#include"compare.h"
int bigger(int a, int b)
{
return a>b;
}
int smaller(int a, int b)
{
return a<b;
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include"stack.h"
void init_class(stack *S)
{
(*S).a=(int*)malloc(100*sizeof(int));
(*S).len=0;
(*S).top=_top;
@you74674
you74674 / test.py
Created May 9, 2020 13:47
pytorch jit overload with inheritance
import torch
from torch.nn.utils.rnn import PackedSequence
from typing import overload, Optional
class Base(torch.nn.Module):
def __init__(self):
super().__init__()
@overload
@torch._jit_internal._overload_method
def forward(self, inputs, hx=None):