This file contains 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
--- arpa/inet.h.old 2018-07-25 00:19:42.423809828 +0800 | |
+++ arpa/inet.h 2018-07-25 00:18:14.071813451 +0800 | |
@@ -36,6 +36,8 @@ | |
__BEGIN_DECLS | |
+typedef uint32_t in_addr_t; | |
+ | |
in_addr_t inet_addr(const char* __s); | |
int inet_aton(const char* __s, struct in_addr* __addr); |
This file contains 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
#!/bin/bash | |
# script that creates clang/llvm cross toolchain for aarch64 android target | |
# compile a hello world program that runs on AOSP Android: | |
# test with: adb push hello /data/cache && adb shell /data/cache/hello | |
# GCC: | |
# C: aarch64-linux-android-gcc hello.c -o hello -pie | |
# C++: aarch64-linux-android-g++ hello.cc -o hello -pie -fPIC -static-libgcc \ | |
# -nostdlib -L/usr/local/aarch64-linux-android/lib -lc++ -lc -nostdinc++ \ | |
# -I/usr/local/aarch64-linux-android/include/c++/v1 -std=c++11 | |
# Clang/LLVM: |
This file contains 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
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<!-- Turn off embedded font --> | |
<match target="font"> | |
<edit name="embeddedbitmap" mode="assign"> | |
<bool>false</bool> | |
</edit> | |
</match> |
This file contains 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
#!/usr/bin/env python | |
# FightTheLandlord Artificial Stupidity | |
# Version 0 | |
# 2018 Pengcheng Xu, Junjie Shan, Zixin Zhou | |
# All rights reserved. | |
# TODO 判斷是用大牌打地主還是清理散牌 | |
# TODO 給牌型排序(設計估值函數) | |
# TODO 計算打出牌型的分值 | |
# TODO 儘量選長的牌出 |
This file contains 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
{ | |
"fonts": { | |
"MS UI Gothic": { | |
"replace": "源ノ角ゴシック Medium", | |
"#italic": false, | |
"#underLine": false, | |
"#strikeOut": false | |
}, | |
"Open Sans": { | |
"replace": "Source Sans Variable Regular", |
This file contains 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
import gym | |
import numpy as np | |
import tensorflow as tf | |
env = gym.make('FrozenLake-v0') | |
tf.reset_default_graph() | |
# establish the feed-forward part of the network used to choose actions | |
inputs1 = tf.placeholder(shape=[1, 16], dtype=tf.float32) |
This file contains 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
# | |
# Automatically generated file; DO NOT EDIT. | |
# Linux/x86 4.9.95-gentoo Kernel Configuration | |
# | |
# | |
# Gentoo Linux | |
# | |
CONFIG_GENTOO_LINUX=y | |
CONFIG_GENTOO_LINUX_UDEV=y |
This file contains 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
#include <algorithm> | |
#include <iomanip> | |
#include <iostream> | |
#include <sstream> | |
#include <vector> | |
// useless headers | |
#include <cstring> | |
#define SIDE(x) ((x)->getTerritory() ? "red" : "blue") |
This file contains 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
#include <algorithm> | |
#include <deque> | |
#include <iomanip> | |
#include <iostream> | |
#include <sstream> | |
#include <unordered_map> | |
#include <vector> | |
// useless headers | |
#include <cstring> |
This file contains 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
class Weapon { | |
public: | |
virtual bool usable() const = 0; | |
virtual double attack() = 0; | |
}; | |
class Sword : public Weapon { | |
private: | |
constexpr static auto startRatio = 0.2; | |
constexpr static auto wearRatio = 0.8; |