Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
This file contains 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
# coding=utf-8 | |
# Copyright 2023 The HuggingFace Inc. team. All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
This file contains 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
// Website you intended to retrieve for users. | |
const upstream = 'api.openai.com' | |
// Custom pathname for the upstream website. | |
const upstream_path = '/' | |
// Website you intended to retrieve for users using mobile devices. | |
const upstream_mobile = upstream | |
// Countries and regions where you wish to suspend your service. |
This file contains 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
# spec/system/support/login_helpers.rb | |
# See this blog post for setup guide: https://evilmartians.com/chronicles/system-of-a-test-setting-up-end-to-end-rails-testing | |
module LoginHelpers | |
def login_as(user) | |
# Craft session cookie to make request authenticated (to pass even routing constraints) | |
# Compilation of these: | |
# - https://dev.to/nejremeslnici/migrating-selenium-system-tests-to-cuprite-42ah#faster-signin-in-tests | |
# - https://turriate.com/articles/2011/feb/how-to-generate-signed-rails-session-cookie | |
# - https://github.com/rails/rails/blob/43e29f0f5d54294ed61c31ddecdf76c2e1a474f7/actionpack/test/dispatch/cookies_test.rb#L350 |
This file contains 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
# 基础引擎框架配置,patch 会更新 default.yaml 文件 | |
patch: | |
schema_list: | |
- schema: double_pinyin_flypy | |
- schema: luna_pinyin_simp | |
switcher/hotkeys: | |
# 切换选项菜单的快捷键 | |
- "Alt+Shift+grave" | |
- "Control+grave" |
This file contains 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
const puppeteer = require('puppeteer') | |
const fs = require('fs'); | |
// Hardcoded for 200 shapes | |
(async () => { | |
const browser = await puppeteer.launch({ headless: true }) | |
const page = await browser.newPage() | |
await page.goto('https://ondras.github.io/primitive.js/', { waitUntil: 'networkidle0' }) | |
const files = fs.readdirSync('img') // Input Folder | |
for (let i = 0; i < files.length; i++) { |
This file contains 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
convert -resize '368x268!' -delay 50 *.png animation.gif | |
gifsicle --colors 256 animation.gif --no-loopcount > animation2.gif | |
gifsicle -O3 --lossy=80 animation2.gif -o animation3.gif |
This file contains 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 * as React from 'react' | |
// routing, etc. | |
import { Reset } from '~/ui/shared/Reset' | |
export class App extends React.Component { | |
public render() { | |
return ( | |
<div> | |
<title>Dashboard</title> |
This file contains 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
const traceProperty = (object, property) => { | |
let value = object[property]; | |
Object.defineProperty(object, property, { | |
get () { | |
console.trace(`${property} requested`); | |
return value; | |
}, | |
set (newValue) { | |
console.trace(`setting ${property} to `, newValue); | |
value = newValue; |
This file contains 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
<html> | |
<head> | |
<title>3D Steiner Chain</title> | |
<style> | |
canvas { | |
width: 100%; | |
height: 100% | |
} | |
</style> |
NewerOlder