逆向工程说明: 本文档基于 nof1.ai Alpha Arena 的公开文档、交易行为模式、API 响应格式和社区讨论,系统性地逆向推导出其 System Prompt 和 User Prompt 的完整结构,欢迎各路大佬戳戳评论,一起来进行这个有趣的实验。
逆向工程说明: 本文档基于 nof1.ai Alpha Arena 的公开文档、交易行为模式、API 响应格式和社区讨论,系统性地逆向推导出其 System Prompt 和 User Prompt 的完整结构,欢迎各路大佬戳戳评论,一起来进行这个有趣的实验。
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 streamlit as st | |
| import numpy as np | |
| from streamlit_webrtc import WebRtcMode, webrtc_streamer | |
| # from streamlit_webrtc import VideoTransformerBase, VideoTransformerContext | |
| from pydub import AudioSegment | |
| import queue, pydub, tempfile, openai, os, time | |
| def save_audio(audio_segment: AudioSegment, base_filename: str) -> None: |
This gist allows you to implement a material drawer easily for your projects. It consists of three files:
- PageDrawer.qml The drawer itself, with an icon viewer, a list view and some hacks to execute the actions/functions assigned to each drawer item
- DrawerItem.qml Which can act as an action, a spacer, a separator or a link
- SvgImage.qml Ugly hack to make SVG images look crisp and smooth on HDPI screens
This code is released under the WTFPL, for more information click here.
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
| """Provide high-level UDP endpoints for asyncio. | |
| Example: | |
| async def main(): | |
| # Create a local UDP enpoint | |
| local = await open_local_endpoint('localhost', 8888) | |
| # Create a remote UDP enpoint, pointing to the first one |
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 python | |
| # -*- coding: utf-8 -*- | |
| from Crypto.Cipher import PKCS1_v1_5 | |
| from Crypto.PublicKey import RSA | |
| from Crypto.Hash import SHA | |
| from Crypto import Random | |
| from Crypto.Cipher import AES | |
| aes_obj_enc = AES.new('This is a key123', AES.MODE_CBC, 'This is an IV456') |
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/sh | |
| # | |
| # pptpd installation script on my own CentOS 7 box. | |
| # inspired by: https://www.digitalocean.com/community/questions/how-to-install-pptp-vpn-on-centos-7 | |
| # and http://unix.stackexchange.com/questions/150837/redhat-centos-7-firewalld-best-practice-for-pptp-or-l2tp-ipsec-rules | |
| # | |
| # Author: 2015 Steve Yang <[email protected]> | |
| # The script comes with ABSOLUTELY NO WARRANTY. | |
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
| // 检测浏览器的 User Agent 应该是非常简单的事情 | |
| // 微信在 Android 下的 User Agent | |
| mozilla/5.0 (linux; u; android 4.1.2; zh-cn; mi-one plus build/jzo54k) applewebkit/534.30 (khtml, like gecko) version/4.0 mobile safari/534.30 micromessenger/5.0.1.352 | |
| // 微信在 iPhone 下的 User Agent | |
| mozilla/5.0 (iphone; cpu iphone os 5_1_1 like mac os x) applewebkit/534.46 (khtml, like gecko) mobile/9b206 micromessenger/5.0 | |
| // 通过javascript判断 | |
| // 很容易看出来,微信的 User Agent 都有‘micromessenger’字符串标示,我们判断是否含有这些字符串就OK了 | |
| function isWeixinBrowser(){ |
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/local/bin/python | |
| #coding:utf-8 | |
| import re | |
| import os | |
| import sys | |
| import syslog | |
| from optparse import OptionParser | |
| syslog.openlog("nagios_plugin") |
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 python2.7 | |
| #encoding:utf-8 | |
| #@description:一个python守护进程的例子 | |
| #@tags:python,daemon | |
| import sys | |
| import os | |
| import time | |
| import atexit | |
| from signal import SIGTERM |
NewerOlder