Skip to content

Instantly share code, notes, and snippets.

time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_pretransfer: %{time_pretransfer}\n
time_redirect: %{time_redirect}\n
time_starttransfer: %{time_starttransfer}\n
----------\n
time_total: %{time_total}\n
# asdf
sadfa
sdaf
More details can be found here: [Selenium Headless]
`apt-get install xvfb`
void T3AI::GetBestMove()
{
Position iList[TOTAL]; /* 현재 게임판에서 놓을 수 있는 좌표 개수, 위치 저장 */
int bestValue = -10000; /* besteval 값 선언 */
int possible = 0; /* 가능한 개수 저장 변수 */
possible = GetPossibleMove(iList); /*현재 가능한 수 좌표, 개수 저장 */
for( int i = 0; i < possible; i++ ) /* 가능한 수 만큼 Minimax 알고리즘을 사용하여 수를 계산 */
{
@DanielTimLee
DanielTimLee / Dockerfile
Last active April 4, 2018 10:46
MongoDB docker?
FROM nvidia/cuda:latest
RUN \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 && \
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" > /etc/apt/sources.list.d/mongodb.list && \
apt-get update && \
apt-get install -y mongodb-org && \
apt-get install -y python3 python3-pip
RUN pip3 install flask
@DanielTimLee
DanielTimLee / Dockerfile
Last active April 4, 2018 10:42
Docker Final
FROM nvidia/cuda:latest
RUN \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 && \
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" > /etc/apt/sources.list.d/mongodb.list && \
apt-get update && \
apt-get install -y mongodb-org && \
apt-get install -y python3 python3-pip
RUN pip3 install flask
@DanielTimLee
DanielTimLee / prototype.py
Created July 24, 2018 16:16 — forked from pazdera/prototype.py
Example of `prototype' design pattern in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Example of `prototype' design pattern
# Copyright (C) 2011 Radek Pazdera
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@DanielTimLee
DanielTimLee / pritunl_journal.log
Created April 30, 2019 13:03
Pritunl error due to selinux domain_can_mmap_files boolean
pritunl[7643]: [patient-thunder-3756][2019-04-30 21:31:06,543][INFO] Starting server
pritunl[7643]: selinux_context = "system_u:system_r:pritunl_t:s0"
pritunl[7643]: [patient-thunder-3756][2019-04-30 21:52:49,682][ERROR] Failed to get IPv6 routes
pritunl[7643]: Traceback (most recent call last):
pritunl[7643]: File "/usr/lib/pritunl/lib/python2.7/site-packages/pritunl/setup/ndppd.py", line 24, in _default_interface_thread
pritunl[7643]: ['route', '-n', '-A', 'inet6'])
pritunl[7643]: File "/usr/lib/pritunl/lib/python2.7/site-packages/pritunl/utils/misc.py", line 224, in check_output_logged
pritunl[7643]: return_code, cmd, output=stdoutdata)
pri
@DanielTimLee
DanielTimLee / install_elfutils.sh
Created June 13, 2019 11:34
install latest elfutils script. forked from uftrace project.
#!/bin/bash
#-*- mode: shell-script; -*-
prefix=/usr/local
objdir=$(readlink -f ${objdir:-${PWD}})
builddir=${objdir}/.build
n_cpus=$(grep -c ^processor /proc/cpuinfo)
@DanielTimLee
DanielTimLee / gist:f432b7d362e948fa06a7a6a0b3740b74
Created September 19, 2019 15:20 — forked from dtroyer/gist:a065b77ebe0443659898
Test traps, errexit, errtrace
#!/bin/bash
# Do some errexit testing
# 0 - test success
# 1 - test simple fail
# 2 - test function fail
#
# in function
# N errexit errtrace pass?