Skip to content

Instantly share code, notes, and snippets.

View pingf's full-sized avatar
💭
waiting for delivery!

Makefile君 pingf

💭
waiting for delivery!
View GitHub Profile
@whimo
whimo / blog_with_images_ray_batched.py
Last active April 1, 2025 12:33
Blog with images using Ray, batched
import os
import ray
from dotenv import load_dotenv
from langchain_community.tools import DuckDuckGoSearchRun
from ray.dag.input_node import InputNode
from motleycrew.agents.crewai import CrewAIMotleyAgent
from motleycrew.agents.langchain import ReActToolCallingMotleyAgent
from motleycrew.common import configure_logging
@santaklouse
santaklouse / CrossOver.sh
Last active April 9, 2025 11:20
unlimited CrossOver trial (MacOS)
#!/usr/bin/env bash
# checck if pidof exists
PIDOF="$(which pidof)"
# and if not - install it
(test "${PIDOF}" && test -f "${PIDOF}") || brew install pidof
# find app in default paths
CO_PWD=~/Applications/CrossOver.app/Contents/MacOS
test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS
@mcmoe
mcmoe / lit-element-in-browser.html
Created March 19, 2021 07:57
Using Lit Element without npm directly in the browser
<!-- From: https://gist.githubusercontent.com/sorvell/48f4b7be35c8748e8f6db5c66d36ee29/raw/67346e4e8bc4c81d5a7968d18f0a6a8bc00d792e/index.html -->
<!doctype html>
<html>
<head>
<!-- Polyfills only needed for Firefox and Edge. -->
<script src="https://unpkg.com/@webcomponents/webcomponentsjs@latest/webcomponents-loader.js"></script>
</head>
<body>
<!-- Works only on browsers that support Javascript modules like
Chrome, Safari, Firefox 60, Edge 17 -->
@thomasdarimont
thomasdarimont / open-source-sso.md
Created April 15, 2020 06:02 — forked from bmaupin/open-source-sso.md
Comparison of open-source SSO implementations
@dmontagu
dmontagu / app.py
Created February 18, 2020 00:28
FastAPI + dash
# Based on the example from https://www.activestate.com/blog/dash-vs-bokeh/
import dash
import dash_core_components as dcc
import dash_html_components as html
import pandas as pd
import plotly.graph_objs as obj
import uvicorn as uvicorn
from dash.dependencies import Input, Output
from fastapi import FastAPI
from starlette.middleware.wsgi import WSGIMiddleware
import os
import signal
import subprocess
import sys
# Parse command-line arguments.
if len(sys.argv) > 1:
folder = os.path.abspath(sys.argv[1])
else:
folder = os.path.abspath(os.getcwd())
@pissang
pissang / echarts-svg.js
Last active August 23, 2024 03:34
Server side SVG rendering of ECharts
const echarts = require("echarts");
const Canvas = require('canvas');
const {JSDOM} = require('jsdom');
const fs = require('fs');
echarts.setCanvasCreator(() => {
return new Canvas(100, 100);
});
const {window} = new JSDOM();
global.window = window;
@JustinSDK
JustinSDK / simple_lang.js
Last active June 27, 2024 05:18
simple_lang.js - this gist has evolved into https://github.com/JustinSDK/toy_lang
// === Tokenizer
class Tokens {
constructor(tokens) {
this.head = tokens[0];
this.tail = tokens.slice(1);
}
}
class Tokenizer {
#!/usr/bin/python2
# -*- coding:utf-8 -*-
import requests
import time
import hashlib
from Crypto.Cipher import AES
import base64
import json
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active April 9, 2025 10:36
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub