Skip to content

Instantly share code, notes, and snippets.

View bveliqi's full-sized avatar
🤙
wuuzzzzuuuuupppppp?!

Behar Veliqi bveliqi

🤙
wuuzzzzuuuuupppppp?!
View GitHub Profile
@bveliqi
bveliqi / ses.md
Last active December 11, 2018 20:03
@bveliqi
bveliqi / carlini_wagner.py
Created September 26, 2018 07:59
Carlini & Wagner attack
import logging
import numpy as np
from .base import Attack
from .base import call_decorator
class CarliniWagnerAttack(Attack):
"""Implements Carlini & Wagner attack introduced in [1]_.
@bveliqi
bveliqi / log.txt
Created May 28, 2018 19:38
Mohanty / nvidia-docker
bveliqi@cantor:~$ nvidia-docker run -it spmohanty/repo2docker-test:v0.1 /home/crowdai/run.sh
v0.1: Pulling from spmohanty/repo2docker-test
297061f60c36: Already exists
e9ccef17b516: Already exists
dbc33716854d: Already exists
8fe36b178d25: Already exists
686596545a94: Already exists
aa76f513fc89: Already exists
c92f47f1bcde: Already exists
172daef71cc3: Already exists
@bveliqi
bveliqi / log.txt
Created May 11, 2018 09:47
PyTorch - ADAM instead of SGD - same microbatch - 100 iters - verbose output
This file has been truncated, but you can view the full file.
2018-05-11 09:44:39,742 Reading data...
2018-05-11 09:45:03,771 Loaded: /root/data/tiny-imagenet-200/train
2018-05-11 09:45:03,772 -- EPOCH: 0
2018-05-11 09:45:04,114 -- ITERATION: 0
2018-05-11 09:45:04,285 --------------------------------------
2018-05-11 09:45:04,285 Name is: conv1.weight
2018-05-11 09:45:04,286 Data is: min: -0.10880786925554276, max: 0.09884308278560638
2018-05-11 09:45:04,286 Grad is: min: -7.468867778778076, max: 11.536825180053711
2018-05-11 09:45:04,287 Target is: min: 0, max: 0
2018-05-11 09:45:04,287 --------------------------------------
@bveliqi
bveliqi / log.txt
Created May 11, 2018 09:13
PyTorch - ADAM instead of SGD - same microbatch - 100 iters
2018-05-11 09:17:05,033 Reading data...
2018-05-11 09:17:28,652 Loaded: /root/data/tiny-imagenet-200/train
2018-05-11 09:17:28,654 -- EPOCH: 0
2018-05-11 09:17:28,765 -- ITERATION: 0
2018-05-11 09:17:28,918 -- RUNNING_LOSS: 4.8924174308776855
2018-05-11 09:17:28,919 -- ITERATION: 1
2018-05-11 09:17:29,045 -- RUNNING_LOSS: 4.160899639129639
2018-05-11 09:17:29,045 -- ITERATION: 2
2018-05-11 09:17:29,139 -- RUNNING_LOSS: 3.475633382797241
2018-05-11 09:17:29,140 -- ITERATION: 3
@bveliqi
bveliqi / score.py
Created May 11, 2018 07:27
PyTorch - Tiny-ImageNet
import torch
import torchvision.datasets as datasets
import torch.utils.data as data
import torchvision.transforms as transforms
from logger import logger
from torch.autograd import Variable
@bveliqi
bveliqi / train.py
Created May 11, 2018 07:27
PyTorch - Tiny-ImageNet
import torch
import torch.nn as nn
import torch.optim as optim
import torchvision.datasets as datasets
import torch.utils.data as data
import torchvision.transforms as transforms
from torch.autograd import Variable
@bveliqi
bveliqi / score.txt
Created May 11, 2018 07:27
PyTorch - Tiny-ImageNet
2018-05-08 19:24:49,208 Loading stored model ...
2018-05-08 19:24:59,635 Loaded model successfully.
2018-05-08 19:24:59,636 Reading data...
2018-05-08 19:24:59,895 Loaded: data/tiny-imagenet-200/val
2018-05-08 19:25:03,391 Progress --- total: 32, correct: tensor(0)
2018-05-08 19:25:06,223 Progress --- total: 64, correct: tensor(0)
2018-05-08 19:25:10,502 Progress --- total: 96, correct: tensor(0)
2018-05-08 19:25:13,293 Progress --- total: 128, correct: tensor(0)
2018-05-08 19:25:17,379 Progress --- total: 160, correct: tensor(0)
2018-05-08 19:25:21,654 Progress --- total: 192, correct: tensor(0)
@bveliqi
bveliqi / case_class.py
Created May 5, 2018 07:32 — forked from wickman/case_class.py
case-class like thing in python
# E.g. TaskClass = CaseClass('name', 'owner', 'pid')
# task1 = TaskClass(name = "hello", owner = "brian", pid = 15)
# task2 = TaskClass(name = "world", owner = "brian", pid = 13)
# tasks = [task1, task2]
#
# filter(lambda task: task.where(owner = "brian"), tasks) => [task1, task2]
# filter(lambda task: task.where(owner = "brian", pid = 13), tasks) => [task2]
#
# matcher = TaskClass(pid = 13)
# filter(lambda task: task.match(matcher), tasks) => [task2]
{
"name": "twitter-data-collector",
"version": "0.0.1",
"description": "a software to collect data from twitter",
"main": "index.js",
"bin": "./build/bundle.js",
"license": "MIT",
"scripts": {
"build": "npm run clean:build && npm run build:webpack && pkg ./build/bundle.js -t node8-linux-x64 -o build/twitter --debug",
"build:webpack": "webpack --config webpack.config.js --output-filename build/bundle.js",