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 PIL import Image, ImageOps, ImageDraw | |
import numpy as np | |
import pandas as pd | |
import os, sys | |
import logging | |
logging.basicConfig( | |
format='%(asctime)s %(levelname)-8s %(message)s', | |
level=logging.INFO, | |
datefmt='%Y-%m-%d %H:%M:%S') |
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 PIL import Image, ImageOps, ImageDraw | |
import numpy as np | |
import pandas as pd | |
import os, sys | |
#import ace_tools as tools | |
# Function to load an image from a file | |
def load_image(file_path): | |
return Image.open(file_path) |
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 ubuntu:bionic | |
RUN chmod 777 /tmp | |
RUN apt-get update && apt-get -y upgrade | |
RUN apt-get install -y git wget cmake sudo gcc-7 g++-7 python3-pip zlib1g-dev g++ | |
RUN mkdir /code | |
COPY ./main.cpp /code | |
RUN g++ /code/main.cpp -o /code/a.out | |
RUN chmod +x /code/a.out |
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
func GetDirUsage(dir string) (UsageInfo, error) { | |
var usage UsageInfo | |
if dir == "" { | |
return usage, fmt.Errorf("invalid directory") | |
} | |
rootInfo, err := os.Stat(dir) | |
if err != nil { | |
return usage, fmt.Errorf("could not stat %q to get inode usage: %v", dir, err) |
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
DIRECTORIES="main contrib non-free restricted universe multiverse" | |
UBUNTU="http://mirror.hetzner.de/ubuntu/packages/pool/ http://ddebs.ubuntu.com/pool/"; | |
DEBIAN="http://mirror.hetzner.de/debian/packages/pool/ http://debug.mirrors.debian.org/debian-debug/pool/" | |
UBUNTU_DSC="http://archive.ubuntu.com/ubuntu/pool/" | |
DEBIAN_DSC="http://ftp.debian.org/debian/pool/" | |
if [[ $# -eq 0 ]] | |
then | |
echo "Choose 'all', 'debian', or 'ubuntu' as first argument." | |
exit 1 |
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
DIRECTORIES="main contrib non-free restricted universe multiverse" | |
UBUNTU="http://mirror.hetzner.de/ubuntu/packages/pool/ http://ddebs.ubuntu.com/pool/"; | |
DEBIAN="http://mirror.hetzner.de/debian/packages/pool/ http://debug.mirrors.debian.org/debian-debug/pool/" | |
if [[ $# -eq 0 ]] | |
then | |
echo "Choose 'all', 'debian', or 'ubuntu' as first argument." | |
exit 1 | |
fi |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Minimal D3 Example</title> | |
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
<style> | |
:root { | |
--savings-color: #A9C3D0F0; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Minimal D3 Example</title> | |
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
<style> | |
.service_bar_pre { | |
fill: steelblue; | |
stroke-width: 3; |
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
""" | |
Simple, hacked-up image similarity search using Tensorflow + the inception | |
CNN as feature extractor and ANNoy for nearest neighbor search. | |
Requires Tensorflow and ANNoy. | |
Based on gist code under | |
https://gist.github.com/david90/e98e1c41a0ebc580e5a9ce25ff6a972d | |
""" | |
from annoy import AnnoyIndex |
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 os | |
import threading | |
import pdbparse | |
from pdbparse.pe import Sections | |
from pdbparse.omap import Omap | |
import binaryninja as bn | |
def load_pdb_thread(bv): |
NewerOlder