Skip to content

Instantly share code, notes, and snippets.

View BedirYilmaz's full-sized avatar
🌍

Bedir Yılmaz BedirYilmaz

🌍
View GitHub Profile
% byobu
# * Used by X11 *
F1
# Display this help
Shift-F1
# Create a new window
F2

In most of deep learning projects, the training scripts always start with lines to load in data, which can easily take a handful minutes. Only after data ready can start testing my buggy code. It is so frustratingly often that I wait for ten minutes just to find I made a stupid typo, then I have to restart and wait for another ten minutes hoping no other typos are made.

In order to make my life easy, I devote lots of effort to reduce the overhead of I/O loading. Here I list some useful tricks I found and hope they also save you some time.

  1. use Numpy Memmap to load array and say goodbye to HDF5.

    I used to relay on HDF5 to read/write data, especially when loading only sub-part of all data. Yet that was before I realized how fast and charming Numpy Memmapfile is. In short, Memmapfile does not load in the whole array at open, and only later "lazily" load in the parts that are required for real operations.

Sometimes I may want to copy the full array to memory at once, as it makes later operations

@BedirYilmaz
BedirYilmaz / How to Do a Clean Restart of a Docker Instance
Last active October 1, 2021 11:53 — forked from pmutua/How to Do a Clean Restart of a Docker Instance
How to Do a Clean Restart of a Docker Instance
https://docs.tibco.com/pub/mash-local/4.1.1/doc/html/docker/GUID-BD850566-5B79-4915-987E-430FC38DAAE4.html
How to Do a Clean Restart of a Docker Instance
If you are using Docker-Machine, make sure your are talking to the right one. Execute the command docker-machine ls to find which one is currently active. It is also recommended to always redo the command:
`eval "$(docker-machine env <docker machine name>)" `
Note: Deleting volumes will wipe out their data. Back up any data that you need before deleting a container.
Procedure
Stop the container(s) using the following command:
`docker-compose down`
Delete all containers using the following command:
########## Assignment 2-3 Closest person to each person in each image
########## - Calculate the Euclidean Distance between every pair in every annotation
########## - Match everyone with their closet
########## 10/04/2018
########## Nithikan Srinakrung - Bam
########## DF4, FTSM, UKM
import os,sys
@BedirYilmaz
BedirYilmaz / soyisimler.sql
Last active February 10, 2022 19:35 — forked from emrekgn/soyisimler
Türkçe Soyisim Listesi - Sqlleştirildi
CREATE TABLE soyisimler (
id int IDENTITY(1,1) NOT NULL,
soyisim varchar(255) NOT NULL,
PRIMARY KEY (id)
)
INSERT INTO soyisimler VALUES ('ABAT');
INSERT INTO soyisimler VALUES ('ABSEYİ');
INSERT INTO soyisimler VALUES ('ABACIOĞLU');
INSERT INTO soyisimler VALUES ('ACAR');