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/env python3 | |
# -*- coding: utf-8 -*- | |
# @Time : 2024/06/01 | |
# @Author : zhengyu ([email protected]) | |
# @Description: 通过性能平台的 stepid 获取对应测试的 log 和指定 sql 的 profile | |
# 用法:python3 perf.py --stepid=stepid --sql=sql --idx=idx --output=output | |
# 必要参数: | |
# stepid: stepid | |
# sql: 如 q09、q19 (tpch格式)、query01、query68 (tpcds格式) | |
# 可选参数: |
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
<!DOCTYPE html> | |
<html> | |
<body> | |
<h1>对话生成评估</h1> | |
<p>选择TSV文件:</p> | |
<input type="file" id="inputTSV" onchange="loadFiles()"/> | |
<p>选择Model1预测:</p> |
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 pyorc | |
import sys | |
# 打开要读取的orc文件 | |
with open("./output.orc", "rb") as data: | |
# 创建一个读取器对象 | |
reader = pyorc.Reader(data) | |
# 初始化一个变量来存储总大小 | |
total_size = 0 | |
# 遍历文件中的每一行记录 |
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 | |
# pip install pyspark before execution | |
import random | |
import json | |
import os | |
import sys | |
from pyspark.sql import SparkSession | |
from pyspark import SparkContext | |
ROW_NUM = 500 |
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/env python3 | |
import json | |
import sys | |
def data_flatten(key,val,con_s='_',basic_types=(str,int,float,bool,complex,bytes)): | |
""" | |
数据展开生成器,以键值对为最基础的数据 | |
param key: 键,默认为基础类型数据,不做进一步分析 | |
param val: 值,判断值的数据类型,如果为复杂类型就做进一步分析 | |
param con_s: 拼接符,当前级的键与父级键拼接的连接符,默认为_ |
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
inline void create_bytes_random(char *data_buf, int size) { | |
int data = 0; | |
int i = 0; | |
char *data_ptr = data_buf; | |
char data_char; | |
for ( i = 0; i < size/2; i ++) { | |
data = rand(); | |
data_char = (char)data; | |
if (data_char ==0) |
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
# turn on chrome | |
if VPNISON ~ 0 | |
connect vpn | |
set VPNISON 1 | |
wait 30sec // wait 30 sec and set disconnectable to avoid frequent on/off | |
set VPNISON 2 // disconnectable | |
endif | |
# turn on others (turn off chrome) | |
if VPNISON ~ 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
#include <stdio.h> // For printf() | |
#include <string.h> // For memcmp() | |
#include <stdlib.h> // For exit() | |
#include <assert.h> | |
#include <time.h> /* for clock_gettime() */ | |
#include <string.h> | |
#include <linux/types.h> | |
#include <stdint.h> | |
#include "lz4.h" |
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 | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" | |