View test.py
This file contains 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 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): |
View class.c
This file contains 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<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; |
View sort_compare.c
This file contains 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"compare.h" | |
int bigger(int a, int b) | |
{ | |
return a>b; | |
} | |
int smaller(int a, int b) | |
{ | |
return a<b; |
View allocate.c
This file contains 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 "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++) |
View swap.c
This file contains 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"swap.h" | |
void fake_swap(int a, int b) | |
{ | |
int tmp=a; | |
a=b; | |
b=tmp; | |
} |
View main_coord.c
This file contains 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 "coord.h" | |
int main() | |
{ | |
for(coord a, b, c; scanf("%d %d %d %d", &(a.a), &(a.b), &(b.a), &(b.b))!=EOF; ) | |
{ | |
c=add(a, b); | |
print(c); | |
printf("\n"); | |
} |
View ___copy.cpp
This file contains 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<cstdio> | |
#include<iostream> | |
#include<fstream> | |
using namespace std; | |
string exec(const char* cmd){ | |
string ret; | |
char buf[128]; | |
FILE *f=popen(cmd, "r"); |
View ___main.c
This file contains 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"___header.h" | |
#include"___header.h" | |
#include<stdio.h> | |
#include<string.h> | |
void cut(char *p) | |
{ | |
int len=strlen(p); | |
if(p[len-1]=='\n') | |
p[len-1]='\0'; |
View ___in_arg2.txt
This file contains 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
-cat asd zxc |
View ___in_arg1.txt
This file contains 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
-add 123 456 |
NewerOlder