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 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib import cm | |
from mpl_toolkits.mplot3d import Axes3D | |
fig = plt.figure() | |
ax = fig.add_subplot(111, projection='3d') | |
file = open("map1.txt") |
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 python3 | |
import http.client, urllib.parse, sys | |
# Define the parameters for the POST request and encode them in | |
# a URL-safe format. | |
params = urllib.parse.urlencode([ | |
('js_code', sys.argv[1]), | |
('compilation_level', 'SIMPLE_OPTIMIZATIONS'), |
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 | |
# Copyright (C) 2017 Leo Mao | |
# 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, subject to the following conditions: |
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
const net = require('net'); | |
socket = net.createConnection(54321); | |
socket.on('data', (data) => { | |
console.log(data.toString().trim()); | |
}); | |
socket.on('end', () => { | |
console.log('socket end'); | |
socket.end(); | |
}); |
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
中 日 英 | |
妙蛙種子 フシギダネ Bulbasaur | |
妙蛙草 フシギソウ Ivysaur | |
妙蛙花 フシギバナ Venusaur | |
小火龍 ヒトカゲ Charmander | |
火恐龍 リザード Charmeleon | |
噴火龍 リザードン Charizard | |
傑尼龜 ゼニガメ Squirtle | |
卡咪龜 カメール Wartortle | |
水箭龜 カメックス Blastoise |
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
pkgname=cadvisor | |
pkgver=0.25.0 | |
pkgrel=1 | |
pkgdesc="Analyzes resource usage and performance characteristics of running containers" | |
license=('Apache') | |
arch=('x86_64') | |
url='https://github.com/google/cadvisor' | |
makedepends=() | |
optdepends=() | |
source_x86_64=( |
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 | |
# | |
# Sync local directory to remote directory. | |
# | |
# Modified by: Leo Mao | |
# Modified from: https://gist.github.com/evgenius/6019316 | |
# | |
# Requires Linux, bash, inotifywait and rsync. | |
# | |
# To avoid executing the command multiple times when a sequence of |
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 | |
if [[ -z $(command -v fzf) ]]; then | |
echo "You don't have fzf!!" | |
exit -1 | |
fi | |
# collapse pacaur search result into oneline each entry | |
collapse() { | |
head='' |
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
/////////////////////////////////////////// | |
// Author: LeoMao | |
// Filename: tetris.cpp | |
// Purpose: simulate tetris battle | |
// encoding: UTF-8 | |
// | |
// Features: | |
// => basic tetris battle game control | |
// => can see next 5 pieces | |
// => can hold just like tetris battle |
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
diff --git a/include/contrib/moderngpu/include/device/intrinsics.cuh b/include/contrib/moderngpu/include/device/intrinsics.cuh | |
index a601443..4be77a8 100644 | |
--- a/include/contrib/moderngpu/include/device/intrinsics.cuh | |
+++ b/include/contrib/moderngpu/include/device/intrinsics.cuh | |
@@ -112,7 +112,7 @@ __device__ __forceinline__ float shfl_up(float var, | |
unsigned int delta, int width = 32) { | |
#if __CUDA_ARCH__ >= 300 | |
- var = __shfl_up(var, delta, width); | |
+ var = __shfl_up_sync(0xFFFFFFFF, var, delta, width); |
OlderNewer