Skip to content

Instantly share code, notes, and snippets.

@chenbo515
chenbo515 / UDF.md
Created January 16, 2025 06:19 — forked from bochentg/UDF.md

Step-by-Step Guide to Setting and Using a UDF in TDCloud

This guide will walk you through the process of setting up and using a User-Defined Function (UDF) in TDCloud. Follow the steps below to achieve this.

Step 1: Login to TDCloud

  1. Login to TDCloud: Navigate to tgcloud.io and log in with your credentials.
  2. Select Workspace:
    • Go to Workgroups > Workspace.
  • Click on the desired workspace name.
@chenbo515
chenbo515 / source.c
Created May 25, 2022 15:00
comment counter
/*
*********** DO NOT CHANGE OR COMMIT THIS FILE ***********
Special cases that you'll need to handle.
There are:
- 5 single-line comments
- 23 multiple-line comments
*/
@chenbo515
chenbo515 / trackback.py
Created January 11, 2021 14:07
回溯算法计算学生购买的书籍
import random
import copy
# student_fees 每个学生交的钱
# 每本书的价格
def solve(student_fees, book_nums, book_price):
track = [[] for x in range(len(student_fees))]
result = []
def backtrack(i):
@chenbo515
chenbo515 / SimpleHTTPServerWithUpload.py
Created November 29, 2017 14:24 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@chenbo515
chenbo515 / fncache.py
Created March 20, 2016 10:21 — forked from kwarrick/fncache.py
Redis-backed LRU cache decorator in Python.
#!/usr/bin/env python
__author__ = 'Kevin Warrick'
__email__ = '[email protected]'
import cPickle
from functools import wraps
def redis_lru(capacity=5000, slice=slice(None)):
"""
Simple Redis-based LRU cache decorator *.
@chenbo515
chenbo515 / pass_socket.py
Created December 3, 2015 13:39 — forked from josiahcarlson/pass_socket.py
An example of passing a socket between processes using Python's multiprocessing library
'''pass_socket.py
Written September 14, 2012
Released into the public domain.
Works on Python 2.6, 2.7, and may need minor changes for 3+.
'''
import multiprocessing