Skip to content

Instantly share code, notes, and snippets.

View zning1994's full-sized avatar
🎯
Focusing DevOps, Machine Intelligence and Blog

ZHANG Ning zning1994

🎯
Focusing DevOps, Machine Intelligence and Blog
View GitHub Profile
@zning1994
zning1994 / 2019-7-3_CentOS7.6升级5内核.sh
Created July 3, 2019 15:21
2019-7-3_CentOS7.6升级5内核
#!/bin/bash
#
# Title: CentOS7.6_x64_upgrade_kernel_script
# Author: ZNing
# Date: 2019-7-3 23:13:09
# Pass on the Aliyun CentOS7.6 x64
# You should run this script three times. The first is yum update, the second is kernel upgrade to 5, the final one is optional when you decided to maunal which is deleting old kernel.
# Having fun to using it. (*^▽^*) Best wishes from Misaka Mikoto and Misaka 10086.
clear;
@zning1994
zning1994 / article.tplx
Last active July 14, 2019 13:20
Kaggle Docker for GPU Using in Mainland China
((=- Default to the notebook output style -=))
((* if not cell_style is defined *))
((* set cell_style = 'style_jupyter.tplx' *))
((* endif *))
((=- Inherit from the specified cell style. -=))
((* extends cell_style *))
@zning1994
zning1994 / HelloWeb3.sol
Created September 29, 2022 19:45
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract HelloWeb3{
string public _string = "Hello Web3!";
}
@zning1994
zning1994 / where_can_i_find_ngrok_url.sh
Created November 14, 2022 05:05
where_can_i_find_ngrok_url
curl http://127.0.0.1:4040/api/tunnels
# create EKS cluster
module "base" {
source = "./base/"
cluster_name = var.cluster_name
name_prefix = var.name_prefix
main_network_block = var.main_network_block
subnet_prefix_extension = var.subnet_prefix_extension
zone_offset = var.zone_offset
eks_managed_node_groups = var.eks_managed_node_groups
@zning1994
zning1994 / openai-proxy.py
Created May 13, 2023 10:07 — forked from wujianguo/openai-proxy.py
openai chatgpt python flask proxy 代理,支持 SSE
from flask import Flask, request, Response
import requests, logging
_FIELD_SEPARATOR = ':'
class SSEClient(object):
"""Implementation of a SSE client.
See http://www.w3.org/TR/2009/WD-eventsource-20091029/ for the
specification.
"""