Skip to content

Instantly share code, notes, and snippets.

task=$(curl --location 'http://ailint.tiktok-row.org/dev' --header 'Authorization: ABCDEFG' --header 'Content-Type: application/json' --data '{"repo":"https://github.com/bd-iaas-us/AILint.git", "token":"FAKE", "prompt":"create a file whose name is utils.py. implement a binary search. export function as search(array, value)"}' | python3 -c "import sys, json; print(json.load(sys.stdin)['task_id'])")
curl http://ailint.tiktok-row.org/dev/histories/$task --header 'Authorization: ABCDEFG'
1. comment out
```python
def call_api(gateway_list, endpoint, element, http_method='put', api_vars=None):
"""
Generic API handler to process a given request across multiple gateways
:param gateway_list: (list)
:param endpoint: (str) http api endpoint name to call
:param element: (str) object to act upon
:param http_method: (str) put or get http method
@thesues
thesues / userspace_cephfs.cc
Created August 28, 2019 18:58
test cephfs
#include <stdio.h>
#define __USE_FILE_OFFSET64
#include <cephfs/libcephfs.h>
#include <errno.h>
#include <fcntl.h>
#include <string>
#include <iostream>
#include <time.h>
#include <pthread.h>
@thesues
thesues / colonescape.go
Last active April 2, 2019 09:05
colonescape.go
package util
import (
"bytes"
)
func EscapeColon(s string) string {
//Byte loop is OK for utf8
buf := new(bytes.Buffer)
l := len(s)
@thesues
thesues / gist:c3153fcd47f746c98a4386fe5aab1079
Created December 28, 2018 15:07 — forked from fiorix/gist:9664255
Go multicast example
package main
import (
"encoding/hex"
"log"
"net"
"time"
)
const (
@thesues
thesues / gist:127741672ec8c8dfc5fe816937b769f6
Created January 16, 2018 06:12
Download latest release from github
#!/bin/bash
account="thesues"
token=$1
download_asset()
{
user=$1
repo=$2
json=$3

Keybase proof

I hereby claim:

  • I am thesues on github.
  • I am deanraccoon (https://keybase.io/deanraccoon) on keybase.
  • I have a public key ASBBFEKvMtdNnGWGrT-OToZWuImEeG-UQtQly-i7me0-0wo

To claim this, I am signing this object: