使用前請務必閱讀 免責聲明
Discover gists
import 'package:flutter/services.dart'; | |
import 'package:local_auth/local_auth.dart'; | |
class LocalAuthService { | |
LocalAuthService() { | |
_init(); | |
} | |
final LocalAuthentication _localAuth = LocalAuthentication(); | |
bool _isSupported = false; | |
bool get isSupported => _isSupported; |
extension NSImage { | |
/// Create a CIImage using the best representation available | |
/// | |
/// - Returns: Converted image, or nil | |
func asCIImage() -> CIImage? { | |
if let cgImage = self.asCGImage() { | |
return CIImage(cgImage: cgImage) | |
} | |
return nil | |
} |
I wrote an in-depth research prompt to conduct a GPT-Deep-Research on the Manus topic, seeking to replicate it with currently available open source tools. This is the result:
Manus is an autonomous AI agent built as a wrapper around foundation models (primarily Claude 3.5/3.7 and Alibaba's Qwen). It operates in a cloud-based virtual computing environment with full access to tools like web browsers, shell commands, and code execution. The system's key innovation is using executable Python code as its action mechanism ("CodeAct" approach), allowing it to perform complex operations autonomously. The architecture consists of an iterative agent loop (analyze → plan → execute → observe), with specialized modules for planning, knowledge retrieval, and memory management. Manus uses file-based memory to track progress and store information across operations. The system can be replicated using open-source components including CodeActAgent (a fine-tuned Mistral model), Docker for sandbox
namespace WhatDoIHave; | |
public static class ServicesDebugger | |
{ | |
public static void UseServicesDebugger(this WebApplication app, IHostApplicationBuilder builder, | |
string path = "/__services") | |
{ | |
app.MapGet(path, () => | |
{ | |
// lang=html |
Security Measure | Description | |
---|---|---|
☐ | Use HTTPS everywhere | Prevents basic eavesdropping and man-in-the-middle attacks |
☐ | Input validation and sanitization | Prevents XSS attacks by validating all user inputs |
☐ | Don't store sensitive data in the browser | No secrets in localStorage or client-side code |
☐ | CSRF protection | Implement anti-CSRF tokens for forms and state-changing requests |
☐ | Never expose API keys in frontend | API credentials should always remain server-side |
// Online C++ compiler to run C++ program online | |
#include <iostream> | |
float pi = 3.141; | |
// This should take circleRadius as a parameter and rutrn the area | |
float caculateArea(float r) { | |
// Area = Pi x Square(R) | |
float area = pi * r * r; | |
return area; | |
} |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
-- picotron api explorer (p64env) | |
-- by pancelor | |
-- https://pancelor.com | |
--[[ | |
## how to install | |
1. open picotron (buy from https://www.lexaloffle.com/picotron.php) | |
2. press escape to open the terminal | |
3. run `folder`. a file explorer should open on your host OS. | |
you should see `appdata` and `desktop` |
# COMMAND ---------- | |
import boto3 | |
from botocore.config import Config | |
# COMMAND ---------- | |
awsAccessKeyId = dbutils.secrets.get("scopeName", key = "AWSAccessKeyID") | |
awsSecretAccessKey = dbutils.secrets.get("scopeName", key = "AWSSecretAccessKey") |