View hive.py
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""hive.py: call hive command via python3""" | |
__author__ = "xiaoshuai, http://github.com/xiaoshuai" | |
__license__ = "GPL" | |
__version__ = "1.0.1" | |
import subprocess | |
import sys | |
from subprocess import check_output, CalledProcessError |
View hdfs.py
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""hdfs.py: call hdfs command via python3""" | |
__author__ = "xiaoshuai, http://github.com/xiaoshuai" | |
__license__ = "GPL" | |
__version__ = "1.0.1" | |
import os | |
import re | |
import subprocess |
View countries.geo.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View logger.h
#include <stdio.h> | |
#include <stdarg.h> | |
#ifndef HEADER_SINGLELIBC_LOGGER_H | |
#define HEADER_SINGLELIBC_LOGGER_H | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <sys/time.h> | |
#include <math.h> |
View okhttp3Interceptor.java
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import java.io.IOException; | |
import java.util.List; | |
import okhttp3.Interceptor; | |
import okhttp3.Request; | |
import okhttp3.Response; |
View CompareJavaBase64Util.java
public class CompareJavaBase64Util { | |
public static void main(String[] args) { | |
String str_1 = "abcABC123+-*/"; | |
String str_2 = "YWJjQUJDMTIzKy0qLw=="; | |
long l_1 = System.currentTimeMillis(); | |
for (int i = 0; i < 10000; i++) { | |
String encode_str_jdk = java.util.Base64.getEncoder().encodeToString(str_1.getBytes()); | |
byte[] decode_byte_jdk = java.util.Base64.getDecoder().decode(str_2); |
View vagrant-grafana-influxdb
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.require_version ">= 1.9.1" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# 设置常量 | |
if ENV['DEV_VB_MEM'] | |
memory = ENV["DEV_VB_MEM"] | |
else |