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
namespace UnityEngine | |
{ | |
using System; | |
using System.Runtime.InteropServices; | |
using UnityEngine.Assertions.Must; | |
[StructLayout(LayoutKind.Auto)] | |
internal struct BoundsInt | |
{ | |
private Vector3i _min; |
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
std::string GetMatDepth(const cv::Mat& mat) | |
{ | |
const int depth = mat.depth(); | |
switch (depth) | |
{ | |
case CV_8U: return "CV_8U"; | |
case CV_8S: return "CV_8S"; | |
case CV_16U: return "CV_16U"; | |
case CV_16S: return "CV_16S"; |
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
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
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
set background=dark | |
highlight clear | |
if exists("syntax_on") | |
syntax reset | |
endif | |
let colors_name = "comments" | |
" First set Normal to regular white on black text colors: | |
hi Normal ctermfg=LightGray ctermbg=Black guifg=#dddddd guibg=Black |
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/lib/python2.7/site-packages/SCons/Platform/msys.py.orig 2014-11-04 23:23:28.000000000 +0100 | |
+++ /usr/lib/python2.7/site-packages/SCons/Platform/msys.py 2015-05-06 01:27:32.333448600 +0200 | |
@@ -39,6 +39,12 @@ | |
posix.generate(env) | |
env['ENV']['PATH'] = os.getenv('PATH') | |
+ import_env = [ 'SystemDrive', 'SystemRoot', 'TEMP', 'TMP' ] | |
+ for var in import_env: | |
+ v = os.environ.get(var) | |
+ if v: |
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
all: | parallel ; @echo $(JOB_COUNT) | |
parallel: .parallel ; @$(eval JOB_COUNT := $(shell sort -n $< | tail -n 1)) | |
.parallel: FORCE ; @$(MAKE) --no-print-directory par 2>/dev/null >$@ || true | |
FORCE: | |
to_n = $(words $2) $(if $(filter-out $1,$(words x $2)),$(call to_n,$1,x $2)) | |
PAR_COUNT := | |
par: $(addprefix par-,$(call to_n,32)) |
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
#ifndef __LOGGING_HPP__ | |
#define __LOGGING_HPP__ | |
/* | |
Test this with something like: | |
g++ -std=c++11 -x c++ -pthread -DLOGGING_LEVEL_ALL -DTEST_LOGGING logging.hpp -o logging_test | |
./logging_test | |
*/ | |
#include <string> |
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
The documentation for Gerrit when it comes to formatting comments is quite lacking. Here is short list created by trial and error and looking at the source code in: | |
./gerrit-gwtexpui/src/main/java/com/google/gwtexpui/safehtml/client/SafeHtml.java | |
Lists: | |
* List item 1 | |
* List item 2 | |
- List item 1 | |
- List item 2 |
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 | |
# Read either the first argument or from stdin (http://stackoverflow.com/questions/6980090/bash-read-from-file-or-stdin) | |
cat "${1:-/dev/stdin}" | \ | |
# Strip out comments starting with # | |
sed -E 's/#.*$//' | \ | |
# Strip out comments starting with // | |
sed -E 's/\/\/.*$//' | \ | |
# Strip out multi-line comments /* ... */ | |
perl -0777 -pe 's{/\*.*?\*/}{}gs' | \ |
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
/* Minimal declarations for CUDA support. Testing purposes only. */ | |
#define __constant__ __attribute__((constant)) | |
#define __device__ __attribute__((device)) | |
#define __global__ extern "C" __attribute__((global)) | |
#define __host__ __attribute__((host)) | |
#define __shared__ __attribute__((shared)) | |
#define __launch_bounds__(...) __attribute__((launch_bounds(__VA_ARGS__))) | |
#define __forceinline__ __attribute__((always_inline)) |