This file contains hidden or 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
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' }, |
This file contains hidden or 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
/* | |
// 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 |
This file contains hidden or 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
/* | |
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 |
This file contains hidden or 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
# 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 |
This file contains hidden or 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
# 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/' |
This file contains hidden or 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
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 |
This file contains hidden or 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
# 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') |
This file contains hidden or 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
>> 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 |
This file contains hidden or 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
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: |
This file contains hidden or 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
''' | |
Copyright (c) 2020 Lucas Ryan | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so. |
OlderNewer