Skip to content

Instantly share code, notes, and snippets.

View oraoto's full-sized avatar

Oraoto oraoto

  • Guangzhou, China
View GitHub Profile
@oraoto
oraoto / biostats.bt
Created February 15, 2019 11:12
Block IO size and latency tracing
#!/usr/bin/env bpftrace
BEGIN {
printf("Tracing block io, Ctrl-C to get result\n");
}
tracepoint:block:block_rq_issue / args->sector > 0 /
{
@start[args->sector] = nsecs;
@kbs[args->sector] = args->bytes / 1024;
@oraoto
oraoto / Dockerfile
Created December 25, 2018 08:54
swoole dockerfile
FROM php:7.3
COPY mirrors /etc/apt/sources.list
ARG SWOOLE_VERSION=4.2.9
RUN rm /etc/apt/sources.list.d -r \
&& apt-get update \
&& apt-get install libssl-dev git -y \
&& docker-php-ext-install pdo_mysql sockets \

生态方面

大司用的 php 并不是你用的 php

事实上,用 php 的大公司不算多,

不清楚

Facebook 总的来说,我更愿意称他在用 PHP 的风格生成 C++ 代码。

@oraoto
oraoto / steps.md
Last active August 23, 2018 03:41
AI Studio打开Terminal

打开Terminal页

通过修改URL直接进入Juputer的Termianl页面:

把URL最后的/notebooks/<project_id>.ipynb替换为/terminals/1

例如notebook页面:

http://aistudio.baidu.com/user/603/21127/notebooks/21127.ipynb
@oraoto
oraoto / memory_optimize.ipynb
Created July 26, 2018 09:06
memory_optimize error
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oraoto
oraoto / se-resnet-cifar10.ipynb
Last active July 26, 2018 05:21
Paddle Fluid pre-trained model fine-tuning
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oraoto
oraoto / output.svg
Last active April 16, 2018 04:14
NNabla to NCS, maxpooling + tanh example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oraoto
oraoto / graph.py
Last active September 28, 2018 07:07
nnabla graph visualization
import nnabla as nn
import nnabla.functions as F
import numpy as np
import matplotlib.pyplot as plt
import graphviz as gv
def draw_graph(v, hide_params=True, op_as_edge=False):
graph = gv.Digraph()
params = nn.get_parameters(grad_only=False)
layer_count = {}
@oraoto
oraoto / TensorFlowParser.py
Created March 6, 2018 01:44
modified TensorFlowParser.py
# Copyright 2017 Intel Corporation.
# The source code, information and material ("Material") contained herein is
# owned by Intel Corporation or its suppliers or licensors, and title to such
# Material remains with Intel Corporation or its suppliers or licensors.
# The Material contains proprietary information of Intel or its suppliers and
# licensors. The Material is protected by worldwide copyright laws and treaty
# provisions.
# No part of the Material may be used, copied, reproduced, modified, published,
# uploaded, posted, transmitted, distributed or disclosed in any way without
# Intel's prior express written permission. No license under any patent,