Skip to content

Instantly share code, notes, and snippets.

@ibmua
ibmua / gist:7e6c3cd365eefc64fb562f2ae354de31
Last active Nov 11, 2020
3080 ai-benchmark.com [run under NGC 20.10-tf1]
View gist:7e6c3cd365eefc64fb562f2ae354de31
First goes 3080 Gigabyte Gaming OC, then 3080 MSI Gaming X Trio
>> AI-Benchmark-v.0.1.2
>> Let the AI Games begin..
2020-11-11 17:04:23.002305: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2599990000 Hz
2020-11-11 17:04:23.003399: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5b4a090 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-11-11 17:04:23.003415: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2020-11-11 17:04:23.005150: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1
2020-11-11 17:04:23.108471: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5b4c500 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
@ibmua
ibmua / gist:bfa8d64afb303500f0bcad7589803db8
Last active Nov 11, 2020
3090 ai-benchmark.com [run under NGC 20.10-tf1]
View gist:bfa8d64afb303500f0bcad7589803db8
>> AI-Benchmark-v.0.1.2
>> Let the AI Games begin..
2020-11-11 16:50:17.642293: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2599990000 Hz
2020-11-11 16:50:17.643424: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x560d110 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-11-11 16:50:17.643440: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2020-11-11 16:50:17.645168: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1
2020-11-11 16:50:17.767055: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x560f580 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2020-11-11 16:50:17.767084: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): GeForce RTX 3090, Compute Capability 8.6
2020-11-11 16:50:17.768002: I tensorflow/core/common_ru
@ibmua
ibmua / face-crop-extractor.py
Last active Nov 7, 2020
extract-1adrianb-crop-face-alignment
View face-crop-extractor.py
# for use with https://github.com/1adrianb/face-alignment
import cv2
import numpy as np
import face_alignment
imread = cv2.imread
_DEAFAULT_JPG_QUALITY = 99
imwrite = partial(cv2.imwrite, params=[int(cv2.IMWRITE_JPEG_QUALITY), _DEAFAULT_JPG_QUALITY])
fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._3D, device='cuda')
@ibmua
ibmua / topcoder-MM116-final.stats
Created Mar 31, 2020
Topcoder Marathon Match 116 final test results
View topcoder-MM116-final.stats
1 0.36563468414359174
2 0.17885260845064882
3 0.28852262366620873
4 0.2514404966692652
5 0.06748542738613812
244169730541 0.23256174721268402
244169730542 0.26269463658657066
244169730543 0.22041798309044436
244169730544 0.16611180158391606
244169730545 0.23481191179623626
@ibmua
ibmua / vis.py
Created Mar 26, 2020
TopCoder Marathon Match 116 statistics visualizer for my solution
View vis.py
# python3 vis.py or use a jupyter notebook
import os
import json
import random
import string
import time
import subprocess
from pathlib import Path
directory = '/home/i/C/marathon/116/outs/'
@ibmua
ibmua / launcher.py
Last active Mar 26, 2020
Bulk-run TopCoder Marathon Match 116 solution
View launcher.py
# python3 launcher.py 0 parallel 4 name
# DO CHANGE THE DIRECTORIES TO YOURS
# ALSO, in ' /home/i/C/marathon/116/stats" -seed '
# /home/i/C/marathon/116/stats can be removed -- it's just for storing some additional statistics.
from multiprocessing.pool import ThreadPool
import os
import sys
import json
import random
import string
@ibmua
ibmua / Lossy2dCompression.cpp
Last active Mar 28, 2020
TopCoder Marathon Match 116 solution
View Lossy2dCompression.cpp
/*
g++ -std=gnu++11 -fsanitize=address -O3 Lossy2dCompression.cpp -o Lossy2dCompression &&
java -jar tester.jar -exec "./Lossy2dCompression" -seed 9 -debug
g++ -std=gnu++11 -include bits/stdc++.h -O3 Lossy2dCompression.cpp -o Lossy2dCompression &&
java -jar tester.jar -exec "./Lossy2dCompression /path/to/store_result_for_seed_9 9" -seed 9 -novis
g++ -std=gnu++11 -include bits/stdc++.h -O3 Lossy2dCompression.cpp -o Lossy2dCompression &&
java -jar tester.jar -exec "./Lossy2dCompression /home/i/C/marathon/116/outs/a 9" -seed 9 -novis
@ibmua
ibmua / sol.cpp
Created Mar 10, 2020
Code Jam "Costume Change" problem solution
View sol.cpp
/*
// By Ihor Menshykov, MIT license
g++ sol.cpp -fsanitize=address -include bits/stdc++.h -O3 -pthread -lm -std=c++14 -o executables/executable && ulimit -Sv 1000000000000 && time ./executables/executable < ./ins/a
time g++ sol.cpp -O3 -pthread -lm -std=c++14 -o executables/executable && ./executables/executable < ./ins/a
time taskset --cpu-list 0 g++ sol.cpp -include bits/stdc++.h -O3 -pthread -lm -std=c++14 -o executables/executable && ulimit -Sv 1000000 &&
time ./executables/executable < ./ins/a
@ibmua
ibmua / country_codes.js
Created Aug 13, 2019
Codes and names of world's countries per iso-3166 + Kosovo
View country_codes.js
var country_codes = [
{ code: 'AF', name: 'Afghanistan' },
{ code: 'AX', name: 'Åland Islands' },
{ code: 'AL', name: 'Albania' },
{ code: 'DZ', name: 'Algeria' },
{ code: 'AS', name: 'American Samoa' },
{ code: 'AD', name: 'Andorra' },
{ code: 'AO', name: 'Angola' },
{ code: 'AI', name: 'Anguilla' },
{ code: 'AQ', name: 'Antarctica' },
You can’t perform that action at this time.