View metadata.json
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
{"valueParameterDescriptions":[],"slotParameterDescriptions":[],"roleDescriptions":[],"contractType":"O","contractName":"","contractDescription":"","choiceDescriptions":[]} |
View blockly.xml
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
?contract |
View blockly.xml
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
?contract |
View trySet.cpp
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
// C++ 14 | |
#include <iostream> | |
#include <memory> | |
#include <set> | |
// template specialization | |
template<typename T> struct std::less<std::unique_ptr<T>> { | |
bool operator()(const std::unique_ptr<T>& a, const std::unique_ptr<T>& b) const { | |
return *a < *b; | |
} |
View onnx_gen_model.py
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
# By eopXD (eopxd.com) | |
# Since it took me some time to figure it out, I guess this file can help out. | |
import onnx | |
from onnx import helper | |
from onnx import AttributeProto, TensorProto, GraphProto | |
from onnx import numpy_helper | |
xNP = np.array([[[[0., 1., 2.], # (1, 1, 3, 3) | |
[3., 4., 5.], | |
[6., 7., 8.]]]]).astype(np.float32) |
View coin.cpp
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
// see https://eopxd.com/2020/09/15/canonical-coin-system/ for some explaination | |
#include <cstdio> | |
#include <vector> | |
#define N 1000006 | |
using namespace std; | |
int dp[2*N]; | |
vector<int> coin; | |
int G ( int x ) { | |
int ret = 0; | |
for ( auto it=coin.rbegin(); it!= coin.rend(); ++it ) { |
View morris.cpp
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
// see https://eopxd.com/2020/08/30/morris-traversal/ for explaination | |
#include <iostream> | |
#include <cassert> | |
#include <vector> | |
#include <memory> | |
using namespace std; | |
template<class T> | |
struct Tree { |
View vm-backup.sh
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 | |
# | |
BACKUPDEST="$1" | |
DOMAIN="$2" | |
MAXBACKUPS="$3" | |
if [ -z "$BACKUPDEST" -o -z "$DOMAIN" ]; then | |
echo "Usage: ./vm-backup <backup-folder> <domain> [max-backups]" | |
exit 1 |
View stats_on_accounts
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
###################################### | |
field name: councilor | |
element in list: 102830 | |
unique element: 947 | |
top 30 repeating value: | |
0 : [2057, '黃國安'] | |
1 : [1773, '張鎮榮'] | |
2 : [1721, '陳見賢'] | |
3 : [1125, '劉水復'] | |
4 : [1049, '江維屏'] |