Skip to content

Instantly share code, notes, and snippets.

View m0o0scar's full-sized avatar
💻
Oscar + coffee + AI => code

Oscar m0o0scar

💻
Oscar + coffee + AI => code
  • Sea
  • Singapore
View GitHub Profile
@m0o0scar
m0o0scar / Microphone.cs
Last active November 16, 2017 02:27
Unity To Playback A Microphone Input In Real Time
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(AudioSource))]
public class Microphone : MonoBehaviour {
AudioSource source;
void Start () {
if(Microphone.devices.Length > 0) {
@m0o0scar
m0o0scar / uuid.js
Last active November 16, 2017 02:28
Generate UUID
//generate an uuid with specify length
function uuid(length=26) {
let len = Math.min(length, 50)/2;
return Math.random().toString(36).substring(2, 2+Math.floor(len)) +
Math.random().toString(36).substring(2, 2+Math.ceil(len));
}
@m0o0scar
m0o0scar / DistanceCalculator.cs
Last active November 16, 2017 02:28
Simple way to calculate closest distance to a cube surface
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DistanceCalculator : MonoBehaviour {
public GameObject[] targets;
void Update () {
foreach(GameObject target in targets) {
@m0o0scar
m0o0scar / isSupportFontFamily.js
Created February 27, 2018 10:18
用JS检测用户是否安装某font-family字体
//原文及原理请见:http://www.zhangxinxu.com/wordpress/2018/02/js-detect-suppot-font-family/
var isSupportFontFamily=function(f){if(typeof f!="string"){return false}var h="Arial";if(f.toLowerCase()==h.toLowerCase()){return true}var e="a";var d=100;var a=100,i=100;var c=document.createElement("canvas");var b=c.getContext("2d");c.width=a;c.height=i;b.textAlign="center";b.fillStyle="black";b.textBaseline="middle";var g=function(j){b.clearRect(0,0,a,i);b.font=d+"px "+j+", "+h;b.fillText(e,a/2,i/2);var k=b.getImageData(0,0,a,i).data;return[].slice.call(k).filter(function(l){return l!=0})};return g(h).join("")!==g(f).join("")};
@m0o0scar
m0o0scar / index.html
Last active September 24, 2021 08:19
iPhone 12 HDR video overexposed issue
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<h1>iPhone 12 HDR Video Test</h1>
<p id="userAgent"></p>
@m0o0scar
m0o0scar / index.html
Created July 1, 2021 04:42
Prevent google.com from crashing Electron v13
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<title>Hello World!</title>
</head>
<body>
@m0o0scar
m0o0scar / countries.json
Last active November 8, 2022 08:41 — forked from almost/countries.json
A list of countries along 2 letter ISO 3166-1 Alpha 2 (https://en.wikipedia.org/wiki/ISO_3166-1) codes in JSON format
[
{"name": "Afghanistan", "code": "AF"},
{"name": "Åland Islands", "code": "AX"},
{"name": "Albania", "code": "AL"},
{"name": "Algeria", "code": "DZ"},
{"name": "American Samoa", "code": "AS"},
{"name": "AndorrA", "code": "AD"},
{"name": "Angola", "code": "AO"},
{"name": "Anguilla", "code": "AI"},
{"name": "Antarctica", "code": "AQ"},
@m0o0scar
m0o0scar / 📖 OpenDevin! An Open Platform for AI Software Developers as Generalist Agents.md
Last active July 26, 2024 07:31
OpenDevin: An Open Platform for AI Software Developers as Generalist Agents. Continue this conversation at http://localhost:3000?gist=4d2ce6b27502023a989e2dd6840b1511

[arxiv] OpenDevin: An Open Platform for AI Software Developers as Generalist Agents

Source

Xingyao Wang, Boxuan Li, Yufan Song, Frank F. Xu, Xiangru Tang, Mingchen Zhuge, Jiayi Pan, Yueqi Song, Bowen Li, Jaskirat Singh, Hoang H. Tran, Fuqiang Li, Ren Ma, Mingzhang Zheng, Bill Qian, Yanjun Shao, Niklas Muennighoff, Yizhe Zhang, Binyuan Hui, Junyang Lin, Robert Brennan, Hao Peng, Heng Ji, Graham Neubig

Software is one of the most powerful tools that we humans have at our disposal; it allows a skilled programmer to interact with the world in complex and profound ways. At the same time, thanks to improvements in large language models (LLMs), there has also been a rapid development in AI agents that interact with and affect change in their surrounding environments. In this paper, we introduce OpenDevin, a platform for the development of powerful and flexible AI agents that interact with the world in similar ways to those of a human developer: by writing code, interacting with a command line, and browsi

@m0o0scar
m0o0scar / 📖 OpenDevin! An Open Platform for AI Software Developers as Generalist Agents.md
Created July 26, 2024 07:32
OpenDevin: An Open Platform for AI Software Developers as Generalist Agents. Continue this conversation at http://localhost:3000?gist=027fa8af8eebe13c001f238aa411ee00

[arxiv] OpenDevin: An Open Platform for AI Software Developers as Generalist Agents

Source

Xingyao Wang, Boxuan Li, Yufan Song, Frank F. Xu, Xiangru Tang, Mingchen Zhuge, Jiayi Pan, Yueqi Song, Bowen Li, Jaskirat Singh, Hoang H. Tran, Fuqiang Li, Ren Ma, Mingzhang Zheng, Bill Qian, Yanjun Shao, Niklas Muennighoff, Yizhe Zhang, Binyuan Hui, Junyang Lin, Robert Brennan, Hao Peng, Heng Ji, Graham Neubig

Software is one of the most powerful tools that we humans have at our disposal; it allows a skilled programmer to interact with the world in complex and profound ways. At the same time, thanks to improvements in large language models (LLMs), there has also been a rapid development in AI agents that interact with and affect change in their surrounding environments. In this paper, we introduce OpenDevin, a platform for the development of powerful and flexible AI agents that interact with the world in similar ways to those of a human developer: by writing code, interacting with a command line, and browsi

@m0o0scar
m0o0scar / 📖 stanford-oval_storm.md
Created July 26, 2024 07:41
stanford-oval/storm. Continue this conversation at http://localhost:3000?gist=1ceffd24c807aec44d2bcc419b42ae73

[github] stanford-oval/storm

Source

Python / 5.5K lines of code. An LLM-powered knowledge curation system that researches a topic and generates a full-length report with citations.

URL: https://github.com/stanford-oval/storm

Conversation