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
#! /bin/bash | |
chartName=$1 | |
shift 1 | |
for img in $(helm show chart $chartName $@ | yq .annotations.images | yq '.[].image'); do | |
docker pull $img | |
docker save -o "$(echo $img | sed 's#docker.io/##g' | sed 's#:#-#g' | sed 's#/#-#g').tar" $img | |
done |
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 ( | |
"bufio" | |
"bytes" | |
"context" | |
"fmt" | |
"os" | |
"time" |
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 ( | |
"context" | |
"net/http" | |
"os" | |
"github.com/golang/protobuf/ptypes" | |
"github.com/golang/protobuf/ptypes/any" | |
gpb "github.com/golang/protobuf/ptypes/wrappers" |
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 python3 | |
import pulsar | |
@pulsar.command(ack=False) | |
async def _tell(request, data): | |
await request.actor.app.receive_data(request.actor, data) | |
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
(Pdb) print(buf.decode('gbk')) | |
A篹rsion="1.0" encoding="GBK"?> | |
<datas> | |
<infocode>1</infocode> | |
<msg/> | |
<datarow>2</datarow> | |
<page>0</page> | |
<pagesize>0</pagesize> | |
<pagecount>1</pagecount> |
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
import numpy as np | |
class Unit(object): | |
def __init__(self): | |
pass | |
def invoke(self, q): | |
raise NotImplementedError() |
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
import ( | |
"bytes" | |
"io" | |
"io/ioutil" | |
"net/http" | |
) | |
func ReadAndAssignResponseBody(res *http.Response) (io.Reader, error) { | |
buf, err := ioutil.ReadAll(res.Body) | |
if err != nil { |
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 ( | |
"bytes" | |
"fmt" | |
"go/ast" | |
"go/parser" | |
"go/token" | |
"io/ioutil" | |
"log" |
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
import random | |
from itertools import groupby | |
class Dice(object): | |
NUMBERS = [1, 2, 3, 4, 5, 6] | |
def __init__(self, result): | |
self.result = result | |
def __eq__(self, obj): |
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
#define _GNU_SOURCE | |
#include <sys/types.h> | |
#include <sys/wait.h> | |
#include <stdio.h> | |
#include <sched.h> | |
#include <signal.h> | |
#include <unistd.h> | |
#define STACK_SIZE (1024*1024) | |
static char container_stack[STACK_SIZE]; |
NewerOlder