This tutorial explains how to use CleverHans
together
with a TensorFlow model to craft adversarial examples,
using the Jacobian-based saliency map approach. This attack
is described in details by the following paper.
We assume basic knowledge of TensorFlow. If you need help
getting CleverHans
installed before getting started,
you may find our MNIST tutorial on the fast gradient sign method
to be useful.
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
# Centos 7.1 | |
yum -y install wget | |
wget http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm | |
rpm -ivh nux-dextop-release-0-5.el7.nux.noarch.rpm | |
yum -y install deluge-web | |
systemctl start deluge-web | |
systemctl stop firewalld |
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 sklearn.datasets import make_blobs | |
from sklearn.cluster import dbscan | |
from sklearn.cluster._dbscan_inner import dbscan_inner | |
from sklearn.metrics import pairwise_distances_chunked | |
from scipy.sparse import csr_matrix | |
import numpy as np | |
# dataset | |
n = 50000 | |
ds, _ = make_blobs(n, 100, 50) |
This tutorial explains how to use CleverHans
together
with a TensorFlow model to craft adversarial examples,
as well as make the model more robust to adversarial
examples. We assume basic knowledge of TensorFlow.
First, make sure that you have TensorFlow
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
# Helps define a constant in Python | |
# From Section 6.3: Defining Constants | |
# Python Cookbook (2 Ed) by Alex Martelli et al. | |
# | |
# Usage: | |
# import const | |
# const.magic = 23 # First binding is fine | |
# const.magic = 88 # Second binding raises const.ConstError | |
class _const: |
Thanks to /u/zpoo32 for reporting several issues in this list!
- deemix: just the cli and the library
- deemix-pyweb: the app with a GUI
- deemix-server: just the server part of deemix-pyweb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 pandas as pd | |
def confusion_matrix(df: pd.DataFrame, col1: str, col2: str): | |
""" | |
Given a dataframe with at least | |
two categorical columns, create a | |
confusion matrix of the count of the columns | |
cross-counts | |
use like: |
Run:
brew install gnupg pinentry-mac
git config --global user.signingkey <key>
git config --global commit.gpgsign true
git config --global gpg.program gpg
Then add the following line to ~/.gnupg/gpg-agent.conf
:
pinentry-program /usr/local/bin/pinentry-mac
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 | |
# Centos 7/8 John the Ripper Installation | |
#release=(j 1.8.0) | |
release=(k 1.9.0) | |
# Check Centos version | |
if [ -f /etc/redhat-release ] ; then | |
source /etc/os-release | |
if [ $VERSION_ID == "8" ] ; then | |
packager=dnf | |
elif [ $VERSION_ID == "7" ] ; then |
OlderNewer