Skip to content

Instantly share code, notes, and snippets.

View adam-dziedzic's full-sized avatar
🎯
Focusing

Adam Dziedzic adam-dziedzic

🎯
Focusing
View GitHub Profile
@adam-dziedzic
adam-dziedzic / mnist_juelich.py
Created October 31, 2025 10:40
MNIST training on Juelich with GPUs
import argparse
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import datasets, transforms
from torch.optim.lr_scheduler import StepLR
class Net(nn.Module):
@adam-dziedzic
adam-dziedzic / example.py
Created April 26, 2024 12:15 — forked from Ankowa/example.py
MIA_example
import torch
from torch.utils.data import Dataset
from typing import Tuple
import numpy as np
import requests
import pandas as pd
#### LOADING THE MODEL
from torchvision.models import resnet18
@adam-dziedzic
adam-dziedzic / cifar100_fine_coarse_labels.py
Created November 19, 2020 15:39
Mappings between fine (classes) and coarse labels (superclasses) for CIFAR100.
import pprint as pp
fine_labels = [
'apple', # id 0
'aquarium_fish',
'baby',
'bear',
'beaver',
'bed',
@adam-dziedzic
adam-dziedzic / git-clearHistory
Created October 21, 2020 16:16 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@adam-dziedzic
adam-dziedzic / nvvp.md
Created June 6, 2020 04:08 — forked from sonots/nvvp.md
How to use NVIDIA profiler

Usually, located at /usr/local/cuda/bin

Non-Visual Profiler

$ nvprof python train_mnist.py

I prefer to use --print-gpu-trace.

#!/bin/bash -e
#
# Copyright (c) 2014, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
#
init_dir=`pwd`
@adam-dziedzic
adam-dziedzic / LibrarySchema
Created April 3, 2016 02:19
This is the dataset which should be used for homework 1, problem: 6-14 (Database course, University of Chicago)
group: library schema
description[[ the data for problem: 6.14 ]]
member = {memb_no name dob
1 adam 123
2 mike 456
3 jack 789
4 luke 100
5 tom 111
6 veronique 101
@adam-dziedzic
adam-dziedzic / EmployeeSchema
Created April 3, 2016 01:51
This is the dataset which should be used for homework 1, problems: 6-11 and 6-13 (Database course, University of Chicago)
group: employee schema
description[[ the data for problems: 6.11, 6.13 ]]
employee = {person_name street city
adam kenwood chicago
bob kimbark chicago
joe michigan chicago
kate woodlawn boston
noelle woodlawn boston
veronique kimbark warsaw
@adam-dziedzic
adam-dziedzic / UniversitySchemaDBUchicago
Last active April 9, 2016 20:35
This is the dataset which should be used for homework 1 (Database course, University of Chicago).
group: university schema
description[[ the data for homework 1, exercise 6.10
* the relation _course_ courses at the university
* the relation _takes_ which coures a student takes
* the relation _stuent_ students
* the relation _instructor_ instructors
]]