Ref | Conv. Type | Pooling | Attention | Embedding | Accuracy (%) | Correct (/237) |
---|---|---|---|---|---|---|
1 |
GraphSage |
max |
rich |
integer |
17.7% |
42 |
2 |
GraphSage |
mean |
rich |
integer |
13.1% |
31 |
3 |
GAT |
max |
rich |
integer |
11.4% |
27 |
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
# pseudo-setup script, obviously replace djenson with your id everywhere | |
# login; don't do any computation/data moving on the head node, you'll get cancelled | |
ssh djenson@sc.stanford.edu | |
# generate ssh keys (on sc head node) | |
# NOTE: just press enter and skip adding a password (it's fine) | |
# https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent | |
ssh-keygen -t ed25519 -C "djenson@stanford.edu" | |
cat ~/.ssh/id_rsa.pub # copy output and add it on github: https://github.com/settings/keys |
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
#!/bin/bash | |
# source this file from your ~/.bashrc, i.e. `source git_funcs.sh` | |
# run this before making changes, otherwise you'll need to deal with merge conflicts | |
# usage: gitu | |
gitu () { git pull --rebase; } | |
# add it all, push it all, fuck the police | |
# usage: gitx | |
gitx () { |
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
#!/usr/bin/env python3 | |
import argparse | |
import asyncio | |
import json | |
import multiprocessing as mp | |
import subprocess | |
import sys | |
def rage(n_cpu: int = mp.cpu_count()): |
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 | |
import os | |
from glob import glob | |
from progressbar import ProgressBar | |
if __name__ == '__main__': | |
proof_steps = glob(os.path.join('proof_steps_gnn', '**', '*.pt'), recursive=True) | |
# print(proof_steps) | |
bar = ProgressBar(max_value = len(proof_steps)) | |
for i, filename in enumerate(proof_steps): |
Model | Conv. Type | Pooling | Attention | Embedding | Accuracy (%) | Correct (/237) |
---|---|---|---|---|---|---|
ASTactic |
n/a |
n/a |
n/a |
n/a |
14.8% |
35 |
Ref 1 |
GraphSage |
max |
rich |
integer |
19.4% |
46 |
Ref 4 |
GAT |
mean |
rich |
integer |
17.3% |
41 |
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
from typing import Generic, TypeVar | |
from abc import ABC, abstractmethod | |
from dataclasses import dataclass | |
import numpy as np | |
A = TypeVar("A") # type variable named "A" | |
class Distribution(ABC, Generic[A]): # abstract base class (interface) | |
@abstractmethod | |
def sample(self) -> A: |
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
def sqrt(a: float) -> Iterator[float]: | |
""" | |
With this version, we update x at each iteration and then yield the updated value. In- | |
stead of getting a single value, the caller of the function gets an iterator that contains an | |
infinite number of iterations; it is up to the caller to decide how many iterations to evalu- | |
ate and when to stop. | |
""" | |
x = a / 2 # initial guess | |
while True: | |
x = (x + (a / x)) / 2 |
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
# run in colab cell | |
l = [] | |
while(Ture): | |
l.extend("cs246") |
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
# ----------------------------------------------------------------------------------------- | |
# Example application of gdb to understand address logic of buffer overflow exploit | |
# Our exploit creates a buffer, writes to file, creates target with file as arg | |
# Target then reads file to a buffer and then uses the data in that file to open shell | |
# ----------------------------------------------------------------------------------------- | |
# First compile everything ---------------------------------------------------------------- | |
cd proj1/xploits/ | |
make |
OlderNewer