Skip to content

Instantly share code, notes, and snippets.

View ranmocy's full-sized avatar

Mocy ranmocy

View GitHub Profile
@VictorTaelin
VictorTaelin / a_b_challenge.md
Last active May 2, 2024 07:48
A::B Prompting Challenge: $10k to prove me wrong!

CHALLENGE

Develop an AI prompt that solves random 12-token instances of the A::B problem (defined here), with 90%+ success rate.

RULES

1. The AI will be given a <problem/> to solve.

We'll use your prompt as the SYSTEM PROMPT, and a specific instance of problem as the PROMPT, inside XML tags. Example:

@sindresorhus
sindresorhus / esm-package.md
Last active May 4, 2024 15:48
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@janx
janx / fetchsub.py
Created July 27, 2011 02:31
Feching subtitles on shooter.cn
#!/usr/bin/python2
USAGESTR = """Usage: fetchsub.py [-l langcode] videofile1 [videofile2 ...]
langcode: chn [default]
eng
sub file will saved in the same directory of each videofile
XXXXXXX.mkv 's sub files will named as:
XXXXXXX.chn.0.srt, XXXXXXX.chn.1.srt, XXXXXXX.chn.2.srt
"""
"""Author: sevenever