This file contains hidden or 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
from __future__ import annotations | |
import time | |
import queue | |
import typing as t | |
import threading | |
from functools import total_ordering | |
from starwhale.utils import console | |
from starwhale.utils.error import ParameterError |
This file contains hidden or 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
# 清除starwhale(执行完,需要稍等几分钟,执行minikube kubectl -- get pods -n starwhale 没有任何输出再进行重新安装) | |
helm uninstall my-starwhale -n starwhale | |
# 重新安装starwhale | |
export SWNAME=starwhale SWNS=starwhale | |
helm upgrade --install $SWNAME starwhale/starwhale --namespace $SWNS --create-namespace --set minikube.enabled=true --set mysql.primary.persistence.storageClass=$SWNAME-mysql --set minio.persistence.storageClass=$SWNAME-minio --set image.registry=docker-registry.starwhale.cn --set minio.global.imageRegistry=docker-registry.starwhale.cn --set mysql.global.imageRegistry=docker-registry.starwhale.cn |
This file contains hidden or 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 bash | |
set -e | |
if [[ ! -z ${DEBUG} ]]; then | |
set -x | |
fi | |
ulimit -n 65535 || true | |
rootdir=/opt/python-workdir |
This file contains hidden or 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
{"lastUpload":"2020-05-13T10:46:00.823Z","extensionVersion":"v3.4.3"} |
This file contains hidden or 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
package main | |
import ( | |
"crypto/tls" | |
"fmt" | |
"golang.org/x/net/proxy" | |
"io/ioutil" | |
"net" | |
"net/http" | |
"os" |
This file contains hidden or 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
package main | |
import ( | |
"net" | |
"github.com/sirupsen/logrus" | |
"net/http" | |
"io/ioutil" | |
) | |
func dial(){ |
This file contains hidden or 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
admin: | |
port: 4400 | |
namers: | |
- kind: io.l5d.serversets | |
zkAddrs: | |
- host: zk1 | |
port: 2181 | |
- host: zk2 | |
port: 2181 |
This file contains hidden or 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
def nth_percentile(dataset, percentile = 90): | |
sorted_dataset = sorted(dataset) | |
new_length = len(sorted_dataset) * percentile / 100 | |
return sorted_dataset[0:new_length] | |
def mean(dataset): | |
return sum(dataset)/float(len(dataset)) | |
dataset = [5, 9, 7, 101, 4, 8, 109, 104, 6, 1, 110, 106, 3, 107, 105, 2, 102, 10, 103, 108] | |
percentile_90 = nth_percentile(dataset) |
This file contains hidden or 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
#coding: utf-8 | |
class Solution(object): | |
def fullJustify(self, words, maxWidth): | |
""" | |
:type words: List[str] | |
:type maxWidth: int | |
:rtype: List[str] |
This file contains hidden or 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
#coding: utf-8 | |
class Base(object): | |
def __init__(self): | |
print 'Base __init__' | |
def update(self): | |
print 'Base update' |
NewerOlder