Team Ai
Datasetpublic

Brunobkr/llama.cpp_AlgMor24_github

ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3.1kdownloads
sqids.ts789 linesDownload Raw Back to src
1interface SqidsOptions {2  alphabet?: string3  minLength?: number4  blocklist?: Set<string>5}6 7export const defaultOptions = {8  alphabet: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',9  minLength: 0,10  blocklist: new Set<string>([11    '0rgasm',12    '1d10t',13    '1d1ot',14    '1di0t',15    '1diot',16    '1eccacu10',17    '1eccacu1o',18    '1eccacul0',19    '1eccaculo',20    '1mbec11e',21    '1mbec1le',22    '1mbeci1e',23    '1mbecile',24    'a11upat0',25    'a11upato',26    'a1lupat0',27    'a1lupato',28    'aand',29    'ah01e',30    'ah0le',31    'aho1e',32    'ahole',33    'al1upat0',34    'al1upato',35    'allupat0',36    'allupato',37    'ana1',38    'ana1e',39    'anal',40    'anale',41    'anus',42    'arrapat0',43    'arrapato',44    'arsch',45    'arse',46    'ass',47    'b00b',48    'b00be',49    'b01ata',50    'b0ceta',51    'b0iata',52    'b0ob',53    'b0obe',54    'b0sta',55    'b1tch',56    'b1te',57    'b1tte',58    'ba1atkar',59    'balatkar',60    'bastard0',61    'bastardo',62    'batt0na',63    'battona',64    'bitch',65    'bite',66    'bitte',67    'bo0b',68    'bo0be',69    'bo1ata',70    'boceta',71    'boiata',72    'boob',73    'boobe',74    'bosta',75    'bran1age',76    'bran1er',77    'bran1ette',78    'bran1eur',79    'bran1euse',80    'branlage',81    'branler',82    'branlette',83    'branleur',84    'branleuse',85    'c0ck',86    'c0g110ne',87    'c0g11one',88    'c0g1i0ne',89    'c0g1ione',90    'c0gl10ne',91    'c0gl1one',92    'c0gli0ne',93    'c0glione',94    'c0na',95    'c0nnard',96    'c0nnasse',97    'c0nne',98    'c0u111es',99    'c0u11les',100    'c0u1l1es',101    'c0u1lles',102    'c0ui11es',103    'c0ui1les',104    'c0uil1es',105    'c0uilles',106    'c11t',107    'c11t0',108    'c11to',109    'c1it',110    'c1it0',111    'c1ito',112    'cabr0n',113    'cabra0',114    'cabrao',115    'cabron',116    'caca',117    'cacca',118    'cacete',119    'cagante',120    'cagar',121    'cagare',122    'cagna',123    'cara1h0',124    'cara1ho',125    'caracu10',126    'caracu1o',127    'caracul0',128    'caraculo',129    'caralh0',130    'caralho',131    'cazz0',132    'cazz1mma',133    'cazzata',134    'cazzimma',135    'cazzo',136    'ch00t1a',137    'ch00t1ya',138    'ch00tia',139    'ch00tiya',140    'ch0d',141    'ch0ot1a',142    'ch0ot1ya',143    'ch0otia',144    'ch0otiya',145    'ch1asse',146    'ch1avata',147    'ch1er',148    'ch1ng0',149    'ch1ngadaz0s',150    'ch1ngadazos',151    'ch1ngader1ta',152    'ch1ngaderita',153    'ch1ngar',154    'ch1ngo',155    'ch1ngues',156    'ch1nk',157    'chatte',158    'chiasse',159    'chiavata',160    'chier',161    'ching0',162    'chingadaz0s',163    'chingadazos',164    'chingader1ta',165    'chingaderita',166    'chingar',167    'chingo',168    'chingues',169    'chink',170    'cho0t1a',171    'cho0t1ya',172    'cho0tia',173    'cho0tiya',174    'chod',175    'choot1a',176    'choot1ya',177    'chootia',178    'chootiya',179    'cl1t',180    'cl1t0',181    'cl1to',182    'clit',183    'clit0',184    'clito',185    'cock',186    'cog110ne',187    'cog11one',188    'cog1i0ne',189    'cog1ione',190    'cogl10ne',191    'cogl1one',192    'cogli0ne',193    'coglione',194    'cona',195    'connard',196    'connasse',197    'conne',198    'cou111es',199    'cou11les',200    'cou1l1es',201    'cou1lles',202    'coui11es',203    'coui1les',204    'couil1es',205    'couilles',206    'cracker',207    'crap',208    'cu10',209    'cu1att0ne',210    'cu1attone',211    'cu1er0',212    'cu1ero',213    'cu1o',214    'cul0',215    'culatt0ne',216    'culattone',217    'culer0',218    'culero',219    'culo',220    'cum',221    'cunt',222    'd11d0',223    'd11do',224    'd1ck',225    'd1ld0',226    'd1ldo',227    'damn',228    'de1ch',229    'deich',230    'depp',231    'di1d0',232    'di1do',233    'dick',234    'dild0',235    'dildo',236    'dyke',237    'encu1e',238    'encule',239    'enema',240    'enf01re',241    'enf0ire',242    'enfo1re',243    'enfoire',244    'estup1d0',245    'estup1do',246    'estupid0',247    'estupido',248    'etr0n',249    'etron',250    'f0da',251    'f0der',252    'f0ttere',253    'f0tters1',254    'f0ttersi',255    'f0tze',256    'f0utre',257    'f1ca',258    'f1cker',259    'f1ga',260    'fag',261    'fica',262    'ficker',263    'figa',264    'foda',265    'foder',266    'fottere',267    'fotters1',268    'fottersi',269    'fotze',270    'foutre',271    'fr0c10',272    'fr0c1o',273    'fr0ci0',274    'fr0cio',275    'fr0sc10',276    'fr0sc1o',277    'fr0sci0',278    'fr0scio',279    'froc10',280    'froc1o',281    'froci0',282    'frocio',283    'frosc10',284    'frosc1o',285    'frosci0',286    'froscio',287    'fuck',288    'g00',289    'g0o',290    'g0u1ne',291    'g0uine',292    'gandu',293    'go0',294    'goo',295    'gou1ne',296    'gouine',297    'gr0gnasse',298    'grognasse',299    'haram1',300    'harami',301    'haramzade',302    'hund1n',303    'hundin',304    'id10t',305    'id1ot',306    'idi0t',307    'idiot',308    'imbec11e',309    'imbec1le',310    'imbeci1e',311    'imbecile',312    'j1zz',313    'jerk',314    'jizz',315    'k1ke',316    'kam1ne',317    'kamine',318    'kike',319    'leccacu10',320    'leccacu1o',321    'leccacul0',322    'leccaculo',323    'm1erda',324    'm1gn0tta',325    'm1gnotta',326    'm1nch1a',327    'm1nchia',328    'm1st',329    'mam0n',330    'mamahuev0',331    'mamahuevo',332    'mamon',333    'masturbat10n',334    'masturbat1on',335    'masturbate',336    'masturbati0n',337    'masturbation',338    'merd0s0',339    'merd0so',340    'merda',341    'merde',342    'merdos0',343    'merdoso',344    'mierda',345    'mign0tta',346    'mignotta',347    'minch1a',348    'minchia',349    'mist',350    'musch1',351    'muschi',352    'n1gger',353    'neger',354    'negr0',355    'negre',356    'negro',357    'nerch1a',358    'nerchia',359    'nigger',360    'orgasm',361    'p00p',362    'p011a',363    'p01la',364    'p0l1a',365    'p0lla',366    'p0mp1n0',367    'p0mp1no',368    'p0mpin0',369    'p0mpino',370    'p0op',371    'p0rca',372    'p0rn',373    'p0rra',374    'p0uff1asse',375    'p0uffiasse',376    'p1p1',377    'p1pi',378    'p1r1a',379    'p1rla',380    'p1sc10',381    'p1sc1o',382    'p1sci0',383    'p1scio',384    'p1sser',385    'pa11e',386    'pa1le',387    'pal1e',388    'palle',389    'pane1e1r0',390    'pane1e1ro',391    'pane1eir0',392    'pane1eiro',393    'panele1r0',394    'panele1ro',395    'paneleir0',396    'paneleiro',397    'patakha',398    'pec0r1na',399    'pec0rina',400    'pecor1na',401    'pecorina',402    'pen1s',403    'pendej0',404    'pendejo',405    'penis',406    'pip1',407    'pipi',408    'pir1a',409    'pirla',410    'pisc10',411    'pisc1o',412    'pisci0',413    'piscio',414    'pisser',415    'po0p',416    'po11a',417    'po1la',418    'pol1a',419    'polla',420    'pomp1n0',421    'pomp1no',422    'pompin0',423    'pompino',424    'poop',425    'porca',426    'porn',427    'porra',428    'pouff1asse',429    'pouffiasse',430    'pr1ck',431    'prick',432    'pussy',433    'put1za',434    'puta',435    'puta1n',436    'putain',437    'pute',438    'putiza',439    'puttana',440    'queca',441    'r0mp1ba11e',442    'r0mp1ba1le',443    'r0mp1bal1e',444    'r0mp1balle',445    'r0mpiba11e',446    'r0mpiba1le',447    'r0mpibal1e',448    'r0mpiballe',449    'rand1',450    'randi',451    'rape',452    'recch10ne',453    'recch1one',454    'recchi0ne',455    'recchione',456    'retard',457    'romp1ba11e',458    'romp1ba1le',459    'romp1bal1e',460    'romp1balle',461    'rompiba11e',462    'rompiba1le',463    'rompibal1e',464    'rompiballe',465    'ruff1an0',466    'ruff1ano',467    'ruffian0',468    'ruffiano',469    's1ut',470    'sa10pe',471    'sa1aud',472    'sa1ope',473    'sacanagem',474    'sal0pe',475    'salaud',476    'salope',477    'saugnapf',478    'sb0rr0ne',479    'sb0rra',480    'sb0rrone',481    'sbattere',482    'sbatters1',483    'sbattersi',484    'sborr0ne',485    'sborra',486    'sborrone',487    'sc0pare',488    'sc0pata',489    'sch1ampe',490    'sche1se',491    'sche1sse',492    'scheise',493    'scheisse',494    'schlampe',495    'schwachs1nn1g',496    'schwachs1nnig',497    'schwachsinn1g',498    'schwachsinnig',499    'schwanz',500    'scopare',501    'scopata',502    'sexy',503    'sh1t',504    'shit',505    'slut',506    'sp0mp1nare',507    'sp0mpinare',508    'spomp1nare',509    'spompinare',510    'str0nz0',511    'str0nza',512    'str0nzo',513    'stronz0',514    'stronza',515    'stronzo',516    'stup1d',517    'stupid',518    'succh1am1',519    'succh1ami',520    'succhiam1',521    'succhiami',522    'sucker',523    't0pa',524    'tapette',525    'test1c1e',526    'test1cle',527    'testic1e',528    'testicle',529    'tette',530    'topa',531    'tr01a',532    'tr0ia',533    'tr0mbare',534    'tr1ng1er',535    'tr1ngler',536    'tring1er',537    'tringler',538    'tro1a',539    'troia',540    'trombare',541    'turd',542    'twat',543    'vaffancu10',544    'vaffancu1o',545    'vaffancul0',546    'vaffanculo',547    'vag1na',548    'vagina',549    'verdammt',550    'verga',551    'w1chsen',552    'wank',553    'wichsen',554    'x0ch0ta',555    'x0chota',556    'xana',557    'xoch0ta',558    'xochota',559    'z0cc01a',560    'z0cc0la',561    'z0cco1a',562    'z0ccola',563    'z1z1',564    'z1zi',565    'ziz1',566    'zizi',567    'zocc01a',568    'zocc0la',569    'zocco1a',570    'zoccola',571  ]),572}573 574export default class Sqids {575  private alphabet: string576  private minLength: number577  private blocklist: Set<string>578 579  constructor(options?: SqidsOptions) {580    const alphabet = options?.alphabet ?? defaultOptions.alphabet581    const minLength = options?.minLength ?? defaultOptions.minLength582    const blocklist = options?.blocklist ?? defaultOptions.blocklist583 584    if (new Blob([alphabet]).size !== alphabet.length) {585      throw new Error('Alphabet cannot contain multibyte characters')586    }587 588    const minAlphabetLength = 3589    if (alphabet.length < minAlphabetLength) {590      throw new Error(`Alphabet length must be at least ${minAlphabetLength}`)591    }592 593    if (new Set(alphabet).size !== alphabet.length) {594      throw new Error('Alphabet must contain unique characters')595    }596 597    const minLengthLimit = 255598    if (599      typeof minLength !== 'number' ||600      minLength < 0 ||601      minLength > minLengthLimit602    ) {603      throw new Error(604        `Minimum length has to be between 0 and ${minLengthLimit}`,605      )606    }607 608    const filteredBlocklist = new Set<string>()609    const alphabetChars = alphabet.toLowerCase().split('')610    for (const word of blocklist) {611      if (word.length >= 3) {612        const wordLowercased = word.toLowerCase()613        const wordChars = wordLowercased.split('')614        const intersection = wordChars.filter((c) => alphabetChars.includes(c))615        if (intersection.length === wordChars.length) {616          filteredBlocklist.add(wordLowercased)617        }618      }619    }620 621    this.alphabet = this.shuffle(alphabet)622    this.minLength = minLength623    this.blocklist = filteredBlocklist624  }625 626  encode(numbers: number[]): string {627    if (numbers.length === 0) {628      return ''629    }630 631    const inRangeNumbers = numbers.filter((n) => n >= 0 && n <= this.maxValue())632    if (inRangeNumbers.length !== numbers.length) {633      throw new Error(634        `Encoding supports numbers between 0 and ${this.maxValue()}`,635      )636    }637 638    return this.encodeNumbers(numbers)639  }640 641  decode(id: string): number[] {642    const ret: number[] = []643 644    if (id === '') {645      return ret646    }647 648    const alphabetChars = this.alphabet.split('')649    for (const c of id.split('')) {650      if (!alphabetChars.includes(c)) {651        return ret652      }653    }654 655    const prefix = id.charAt(0)656    const offset = this.alphabet.indexOf(prefix)657    let alphabet = this.alphabet.slice(offset) + this.alphabet.slice(0, offset)658    alphabet = alphabet.split('').reverse().join('')659    let slicedId = id.slice(1)660 661    while (slicedId.length > 0) {662      const separator = alphabet.slice(0, 1)663 664      const chunks = slicedId.split(separator)665      if (chunks.length > 0) {666        if (chunks[0] === '') {667          return ret668        }669 670        ret.push(this.toNumber(chunks[0]!, alphabet.slice(1)))671        if (chunks.length > 1) {672          alphabet = this.shuffle(alphabet)673        }674      }675 676      slicedId = chunks.slice(1).join(separator)677    }678 679    return ret680  }681 682  private encodeNumbers(numbers: number[], increment = 0): string {683    if (increment > this.alphabet.length) {684      throw new Error('Reached max attempts to re-generate the ID')685    }686 687    let offset =688      numbers.reduce(689        (a, v, i) =>690          this.alphabet[v % this.alphabet.length]!.codePointAt(0)! + i + a,691        numbers.length,692      ) % this.alphabet.length693 694    offset = (offset + increment) % this.alphabet.length695    let alphabet = this.alphabet.slice(offset) + this.alphabet.slice(0, offset)696    const prefix = alphabet.charAt(0)697    alphabet = alphabet.split('').reverse().join('')698    const ret = [prefix]699 700    for (let i = 0; i !== numbers.length; i++) {701      const num = numbers[i]!702 703      ret.push(this.toId(num, alphabet.slice(1)))704      if (i < numbers.length - 1) {705        ret.push(alphabet.slice(0, 1))706        alphabet = this.shuffle(alphabet)707      }708    }709 710    let id = ret.join('')711 712    if (this.minLength > id.length) {713      id += alphabet.slice(0, 1)714 715      while (this.minLength - id.length > 0) {716        alphabet = this.shuffle(alphabet)717        id += alphabet.slice(718          0,719          Math.min(this.minLength - id.length, alphabet.length),720        )721      }722    }723 724    if (this.isBlockedId(id)) {725      id = this.encodeNumbers(numbers, increment + 1)726    }727 728    return id729  }730 731  private shuffle(alphabet: string): string {732    const chars = alphabet.split('')733 734    for (let i = 0, j = chars.length - 1; j > 0; i++, j--) {735      const r =736        (i * j + chars[i]!.codePointAt(0)! + chars[j]!.codePointAt(0)!) %737        chars.length738      ;[chars[i], chars[r]] = [chars[r]!, chars[i]!]739    }740 741    return chars.join('')742  }743 744  private toId(num: number, alphabet: string): string {745    const id = []746    const chars = alphabet.split('')747 748    let result = num749 750    do {751      id.unshift(chars[result % chars.length])752      result = Math.floor(result / chars.length)753    } while (result > 0)754 755    return id.join('')756  }757 758  private toNumber(id: string, alphabet: string): number {759    const chars = alphabet.split('')760    return id.split('').reduce((a, v) => a * chars.length + chars.indexOf(v), 0)761  }762 763  private isBlockedId(id: string): boolean {764    const lowercaseId = id.toLowerCase()765 766    for (const word of this.blocklist) {767      if (word.length <= lowercaseId.length) {768        if (lowercaseId.length <= 3 || word.length <= 3) {769          if (lowercaseId === word) {770            return true771          }772        } else if (/\d/.test(word)) {773          if (lowercaseId.startsWith(word) || lowercaseId.endsWith(word)) {774            return true775          }776        } else if (lowercaseId.includes(word)) {777          return true778        }779      }780    }781 782    return false783  }784 785  private maxValue() {786    return Number.MAX_SAFE_INTEGER787  }788}789 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai