path stringlengths 14 112 | content stringlengths 0 6.32M | size int64 0 6.32M | max_lines int64 1 100k | repo_name stringclasses 2
values | autogenerated bool 1
class |
|---|---|---|---|---|---|
cosmopolitan/third_party/python/Modules/cjkcodecs/__big5_encmap.c | #include "libc/x/x.h"
/* clang-format off */
static _Atomic(void *) __big5_encmap_ptr;
static const unsigned char __big5_encmap_rodata[] = {
0xd4, 0xbc, 0x07, 0x57, 0x6a, 0xcb, 0xd2, 0x36, 0xfa, 0xd7, 0xcc, 0x39, 0xe7,
0x9c, 0x73, 0x0e, 0xcb, 0x1c, 0xfe, 0x0b, 0x39, 0xe7, 0x24, 0x88, 0x80, 0x88,
0x4c, 0x81, 0x49... | 180,123 | 2,261 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/cjkcodecs/gbcommon_encmap.c | #include "libc/x/x.h"
/* clang-format off */
static _Atomic(void *) gbcommon_encmap_ptr;
static const unsigned char gbcommon_encmap_rodata[] = {
0xed, 0xce, 0xbb, 0x32, 0x03, 0x61, 0x18, 0x87, 0xf1, 0xef, 0xcb, 0x66, 0x57,
0xb0, 0x88, 0x65, 0x11, 0xc7, 0x84, 0x04, 0x4b, 0x10, 0x11, 0x71, 0x88, 0x63,
0xc4, 0x61, ... | 1,940 | 34 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/cjkcodecs/jisx0212_decmap.c | #include "libc/x/x.h"
/* clang-format off */
static _Atomic(void *) jisx0212_decmap_ptr;
static const unsigned char jisx0212_decmap_rodata[] = {
0xed, 0xcb, 0x2f, 0x2c, 0xc4, 0x71, 0x1c, 0xc6, 0xf1, 0xef, 0xef, 0x70, 0x87,
0x73, 0xdc, 0xf9, 0xf7, 0x0b, 0x97, 0x9e, 0x8d, 0x09, 0xc2, 0x4d, 0x30, 0x41,
0x3a, 0x23, ... | 1,699 | 31 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/cjkcodecs/cp932ext_decmap.c | #include "libc/x/x.h"
/* clang-format off */
static _Atomic(void *) cp932ext_decmap_ptr;
static const unsigned char cp932ext_decmap_rodata[] = {
0x63, 0x60, 0x18, 0x05, 0x23, 0x1d, 0x30, 0x32, 0xc4, 0x9f, 0xc2, 0x26, 0x9e,
0xcb, 0xe0, 0x30, 0x67, 0x34, 0x74, 0x06, 0x1f, 0x38, 0xc5, 0xe0, 0xf0, 0xa7,
0x9d, 0xd1, ... | 614 | 17 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/cjkcodecs/__ksx1001_decmap.c | #include "libc/x/x.h"
/* clang-format off */
static _Atomic(void *) __ksx1001_decmap_ptr;
static const unsigned char __ksx1001_decmap_rodata[10685] = {
0xb5, 0x79, 0x0d, 0x78, 0x93, 0x55, 0x9a, 0xf6, 0x3e, 0xe7, 0x9c, 0xf7, 0x27,
0x6f, 0xfe, 0x93, 0x36, 0x4d, 0xff, 0x4b, 0x29, 0x50, 0x7e, 0x06, 0x11, 0x10,
0x11,... | 66,115 | 835 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/cjkcodecs/__cp932ext_decmap.c | #include "libc/x/x.h"
/* clang-format off */
static _Atomic(void *) __cp932ext_decmap_ptr;
static const unsigned char __cp932ext_decmap_rodata[872] = {
0xe5, 0x92, 0x5d, 0x4c, 0xd3, 0x67, 0x18, 0xc5, 0x7d, 0x3e, 0xfe, 0x6f, 0x0b,
0x54, 0xac, 0x5b, 0xd7, 0x2a, 0x73, 0xe0, 0x62, 0x63, 0x1a, 0x56, 0x75, 0x2e,
0x8c,... | 5,728 | 81 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/cjkcodecs/__gbcommon_encmap.c | #include "libc/x/x.h"
/* clang-format off */
static _Atomic(void *) __gbcommon_encmap_ptr;
static const unsigned char __gbcommon_encmap_rodata[26264] = {
0xbc, 0xbc, 0x79, 0x74, 0x6b, 0x45, 0x9a, 0x27, 0x98, 0xbf, 0x2f, 0x84, 0xde,
0xab, 0x84, 0xec, 0x47, 0x17, 0xcc, 0xf0, 0xaa, 0xa0, 0x4f, 0x92, 0x05, 0x59,
0x5... | 161,993 | 2,034 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/cjkcodecs/__gb18030ext_decmap.c | #include "libc/x/x.h"
/* clang-format off */
static _Atomic(void *) __gb18030ext_decmap_ptr;
static const unsigned char __gb18030ext_decmap_rodata[405] = {
0xeb, 0x99, 0xcc, 0xce, 0x44, 0x11, 0xf8, 0x92, 0xfd, 0x31, 0x9b, 0x89, 0xb6,
0x60, 0x4b, 0xd6, 0xc6, 0x2c, 0x42, 0x6a, 0x3e, 0x65, 0x32, 0xc0, 0xc0, 0xfa,
0... | 2,864 | 45 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/cjkcodecs/__jisx0212_decmap.c | #include "libc/x/x.h"
/* clang-format off */
static _Atomic(void *) __jisx0212_decmap_ptr;
static const unsigned char __jisx0212_decmap_rodata[3327] = {
0x8d, 0x58, 0x5d, 0xa8, 0x6d, 0x55, 0x15, 0x6e, 0x8d, 0x3d, 0x9d, 0x6b, 0x38,
0xcf, 0x74, 0xde, 0xe9, 0x74, 0xb9, 0xdc, 0x6d, 0xb7, 0xdb, 0xe3, 0xe1, 0x74,
0xb1... | 20,837 | 269 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/cjkcodecs/_codecs_kr.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 14,256 | 489 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/cjkcodecs/__jisx0213_emp_encmap.c | #include "libc/x/x.h"
/* clang-format off */
static _Atomic(void *) __jisx0213_emp_encmap_ptr;
static const unsigned char __jisx0213_emp_encmap_rodata[] = {
0xed, 0x5a, 0xdb, 0x4e, 0xe2, 0x50, 0x14, 0xfd, 0x16, 0x40, 0xe2, 0x80, 0x8e,
0x38, 0x55, 0xbc, 0x30, 0x82, 0x0e, 0x3a, 0xde, 0x47, 0x1c, 0x2f, 0x28, 0x2a,
... | 6,099 | 85 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/cjkcodecs/__cp950ext_encmap.c | #include "libc/x/x.h"
/* clang-format off */
static _Atomic(void *) __cp950ext_encmap_ptr;
static const unsigned char __cp950ext_encmap_rodata[] = {
0xed, 0x93, 0x49, 0x0e, 0x82, 0x40, 0x14, 0x44, 0xaf, 0x26, 0x46, 0x71, 0xe7,
0x1d, 0xbb, 0xbd, 0x89, 0x87, 0x00, 0x1c, 0x01, 0x1b, 0xd0, 0x05, 0x38, 0xe1,
0xf4, 0x... | 1,076 | 23 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/cjkcodecs/jisx0213_2_bmp_decmap.c | #include "libc/x/x.h"
/* clang-format off */
static _Atomic(void *) jisx0213_2_bmp_decmap_ptr;
static const unsigned char jisx0213_2_bmp_decmap_rodata[] = {
0x63, 0x60, 0x18, 0x78, 0xc0, 0xc8, 0xa0, 0x54, 0x07, 0xa2, 0xe3, 0x18, 0x14,
0xeb, 0xf6, 0x00, 0xb1, 0x14, 0xa3, 0x62, 0x2d, 0x4c, 0xae, 0x9c, 0x51, 0xb1,
... | 1,040 | 22 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/cjkcodecs/cp949_encmap.c | #include "libc/x/x.h"
/* clang-format off */
static _Atomic(void *) cp949_encmap_ptr;
static const unsigned char cp949_encmap_rodata[] = {
0xcd, 0xd0, 0x5b, 0x48, 0x93, 0x61, 0x18, 0x07, 0xf0, 0xe7, 0xfd, 0x0e, 0xfb,
0x76, 0xe8, 0x6b, 0x6d, 0x6a, 0xab, 0x65, 0xa6, 0x35, 0x9d, 0x1d, 0xb6, 0xd4,
0xa5, 0x36, 0x2d, ... | 3,593 | 55 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/cjkcodecs/cp950ext_decmap.c | #include "libc/x/x.h"
/* clang-format off */
static _Atomic(void *) cp950ext_decmap_ptr;
static const unsigned char cp950ext_decmap_rodata[] = {
0x63, 0x60, 0x18, 0x05, 0xa3, 0x60, 0x60, 0x01, 0x23, 0x83, 0xeb, 0xe7, 0x0d,
0x0c, 0x8e, 0xee, 0xdb, 0x19, 0x1e, 0x3e, 0x1c, 0x0d, 0x0d, 0xea, 0x83, 0x1d,
0x0c, 0xd7, ... | 523 | 16 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/cjkcodecs/jisxcommon_encmap.c | #include "libc/x/x.h"
/* clang-format off */
static _Atomic(void *) jisxcommon_encmap_ptr;
static const unsigned char jisxcommon_encmap_rodata[] = {
0xed, 0xcb, 0x3d, 0x4f, 0x93, 0x61, 0x18, 0xc5, 0xf1, 0x73, 0xdd, 0xcf, 0x53,
0x6a, 0xd1, 0x0a, 0xad, 0xa8, 0x55, 0xaa, 0xf8, 0x86, 0x50, 0xb0, 0x82, 0x56,
0x4b, 0x... | 2,608 | 42 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/cjkcodecs/__big5_decmap.c | #include "libc/x/x.h"
/* clang-format off */
static _Atomic(void *) __big5_decmap_ptr;
static const unsigned char __big5_decmap_rodata[14386] = {
0xad, 0xbb, 0x7b, 0x74, 0x55, 0xe7, 0x75, 0x2f, 0x7a, 0xe7, 0xfc, 0x5e, 0xeb,
0xbd, 0xd6, 0x5e, 0xfb, 0xfd, 0xde, 0xda, 0xda, 0x7a, 0xbf, 0x85, 0x24, 0x84,
0x10, 0x02,... | 88,877 | 1,120 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/cjkcodecs/__jisx0213_2_emp_decmap.c | #include "libc/x/x.h"
/* clang-format off */
static _Atomic(void *) __jisx0213_2_emp_decmap_ptr;
static const unsigned char __jisx0213_2_emp_decmap_rodata[] = {
0xeb, 0x64, 0xf8, 0xf7, 0x1f, 0x1d, 0x2e, 0x02, 0x8b, 0x2d, 0x41, 0x93, 0x59,
0xc4, 0x88, 0xa9, 0x12, 0x19, 0x0a, 0x33, 0xe1, 0x97, 0x27, 0x07, 0x6a, 0x33... | 6,157 | 86 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/cjkcodecs/clinic/multibytecodec.inc | /* clang-format off */
/*[clinic input]
preserve
[clinic start generated code]*/
PyDoc_STRVAR(_multibytecodec_MultibyteCodec_encode__doc__,
"encode($self, /, input, errors=None)\n"
"--\n"
"\n"
"Return an encoded string version of `input\'.\n"
"\n"
"\'errors\' may be given to set a different error handling scheme. Defa... | 12,243 | 335 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/_multiprocessing/multiprocessing.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 6,500 | 232 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/_multiprocessing/semaphore.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 19,538 | 689 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/_multiprocessing/multiprocessing.h | #ifndef MULTIPROCESSING_H
#define MULTIPROCESSING_H
#define PY_SSIZE_T_CLEAN
#include "libc/thread/semaphore.h"
#include "third_party/python/Include/Python.h"
#include "third_party/python/Include/pythread.h"
#include "third_party/python/Include/structmember.h"
/* clang-format off */
/*
* Platform includes and definit... | 2,147 | 89 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/expat/latin1tab.inc | /* clang-format off */
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML par... | 3,427 | 66 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/expat/iasciitab.inc | /* clang-format off */
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML par... | 3,444 | 67 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/expat/nametab.inc | /* clang-format off */
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML par... | 9,049 | 138 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/expat/xmltok_impl.h.inc | /* clang-format off */
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML par... | 3,341 | 73 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/expat/siphash.inc | /* clang-format off */
/* ==========================================================================
* siphash.h - SipHash-2-4 in a single header file
* --------------------------------------------------------------------------
* Derived by William Ahern from the reference implementation[1] published[2]
* by Jean-P... | 12,903 | 387 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/expat/xmlparse.c | #include "libc/assert.h"
#include "libc/calls/calls.h"
#include "libc/calls/struct/timeval.h"
#include "libc/errno.h"
#include "libc/limits.h"
#include "libc/mem/mem.h"
#include "libc/nexgen32e/rdtsc.h"
#include "libc/nexgen32e/x86feature.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/runtime.h"
#include "libc/... | 234,222 | 6,273 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/expat/xmltok.c | /* clang-format off */
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML par... | 54,686 | 1,662 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/expat/xmltok_ns.inc | /* clang-format off */
/* This file is included!
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
... | 4,367 | 120 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/expat/expat_config.h | #ifndef EXPAT_CONFIG_H
#define EXPAT_CONFIG_H
#include "third_party/python/pyconfig.h"
#ifdef WORDS_BIGENDIAN
#define BYTEORDER 4321
#else
#define BYTEORDER 1234
#endif
#define XML_NS 1
#define XML_DTD 1
#define XML_CONTEXT_BYTES 1024
#endif /* EXPAT_CONFIG_H */
| 287 | 16 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/expat/asciitab.inc | /* clang-format off */
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML par... | 3,374 | 66 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/expat/utf8tab.inc | /* clang-format off */
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML par... | 3,376 | 66 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/expat/xmltok.h | #ifndef XmlTok_INCLUDED
#define XmlTok_INCLUDED 1
#include "third_party/python/Modules/expat/expat_external.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/* The following token may be returned by XmlContentTok */
#define XML_TOK_TRAILING_RSQB \
-5 /* ] or ]] at the ... | 10,794 | 281 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/expat/expat.h | #ifndef Expat_INCLUDED
#define Expat_INCLUDED 1
#include "third_party/python/Modules/expat/expat_external.h"
COSMOPOLITAN_C_START_
struct XML_ParserStruct;
typedef struct XML_ParserStruct *XML_Parser;
typedef unsigned char XML_Bool;
#define XML_TRUE ((XML_Bool)1)
#define XML_FALSE ((XML_Bool)0)
/* The XML_Status en... | 39,038 | 926 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/expat/ascii.inc | /* clang-format off */
#define ASCII_A 0x41
#define ASCII_B 0x42
#define ASCII_C 0x43
#define ASCII_D 0x44
#define ASCII_E 0x45
#define ASCII_F 0x46
#define ASCII_G 0x47
#define ASCII_H 0x48
#define ASCII_I 0x49
#define ASCII_J 0x4A
#define ASCII_K 0x4B
#define ASCII_L 0x4C
#define ASCII_M 0x4D
#define ASCII_N 0x4E
#d... | 2,019 | 91 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/expat/COPYING | Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
Copyright (c) 2001-2017 Expat maintainers
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, includi... | 1,144 | 22 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/expat/expat_external.h | #ifndef Expat_External_INCLUDED
#define Expat_External_INCLUDED 1
#include "third_party/python/Modules/expat/pyexpatns.h"
COSMOPOLITAN_C_START_
/* clang-format off */
#if defined(__GNUC__) \
&& (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
# def... | 846 | 29 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/expat/pyexpatns.h | #ifndef PYEXPATNS_H
#define PYEXPATNS_H
/* clang-format off */
#define XML_DefaultCurrent PyExpat_XML_DefaultCurrent
#define XML_ErrorString PyExpat_XML_ErrorString
#define XML_ExpatVersion PyExpat_XML_ExpatVersion
#define XML_ExpatVersionInfo PyExpat_XML_ExpatVer... | 5,846 | 88 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/expat/xmlrole.h | #ifndef XmlRole_INCLUDED
#define XmlRole_INCLUDED 1
#include "third_party/python/Modules/expat/xmltok.h"
COSMOPOLITAN_C_START_
/* clang-format off */
enum {
XML_ROLE_ERROR = -1,
XML_ROLE_NONE = 0,
XML_ROLE_XML_DECL,
XML_ROLE_INSTANCE_START,
XML_ROLE_DOCTYPE_NONE,
XML_ROLE_DOCTYPE_NAME,
XML_ROLE_DOCTYPE_S... | 2,619 | 96 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/expat/xmlrole.c | /* clang-format off */
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML par... | 34,778 | 1,246 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/expat/xmltok_impl.inc | /* clang-format off */
/* This file is included!
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
... | 52,338 | 1,806 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Modules/expat/internal.inc | /* clang-format off */
/* internal.h
Note: Use of these macros is based on judgement, not hard rules,
and therefore subject to change.
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
... | 3,313 | 97 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/README | This directory contains a number of Python programs that are useful
while building or extending Python.
buildbot Batchfiles for running on Windows buildslaves.
ccbench A Python threads-based concurrency benchmark. (*)
demo Several Python programming demos.
freeze Create a stand-al... | 1,902 | 49 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/ssl/multissltests.py | #!./python
"""Run Python tests against multiple installations of OpenSSL and LibreSSL
The script
(1) downloads OpenSSL / LibreSSL tar bundle
(2) extracts it to ./src
(3) compiles OpenSSL / LibreSSL
(4) installs OpenSSL / LibreSSL into ../multissl/$LIB/$VERSION/
(5) forces a recompilation of Python modules u... | 14,039 | 474 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/ssl/sslspeed.vcxproj | <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platfor... | 2,854 | 70 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/ssl/make_ssl_data.py | #! /usr/bin/env python3
"""
This script should be called *manually* when we want to upgrade SSLError
`library` and `reason` mnemnonics to a more recent OpenSSL version.
It takes two arguments:
- the path to the OpenSSL source tree (e.g. git checkout)
- the path to the C file to be generated
(probably Modules/_ssl_d... | 3,064 | 88 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/clinic/clinic.py | #!/usr/bin/env python3
#
# Argument Clinic
# Copyright 2012-2013 by Larry Hastings.
# Licensed to the PSF under a contributor agreement.
#
import abc
import ast
import atexit
import collections
import contextlib
import copy
import cpp
import functools
import hashlib
import inspect
import io
import itertools
import os
... | 152,215 | 4,385 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/clinic/clinic_test.py | # Argument Clinic
# Copyright 2012-2013 by Larry Hastings.
# Licensed to the PSF under a contributor agreement.
#
import clinic
from clinic import DSLParser
import collections
import inspect
from test import support
import sys
import unittest
from unittest import TestCase
class FakeConverter:
def __init__(self, ... | 20,753 | 792 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/clinic/cpp.py | import re
import sys
def negate(condition):
"""
Returns a CPP conditional that is the opposite of the conditional passed in.
"""
if condition.startswith('!'):
return condition[1:]
return "!" + condition
class Monitor:
"""
A simple C preprocessor that scans C source and computes, li... | 5,984 | 192 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/importbench/importbench.py | """Benchmark some basic import use-cases.
The assumption is made that this benchmark is run in a fresh interpreter and
thus has no external changes made to import-related attributes in sys.
"""
from test.test_importlib import util
import decimal
import imp
import importlib
import importlib.machinery
import json
impor... | 9,140 | 245 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/importbench/README | Importbench is a set of micro-benchmarks for various import scenarios.
It should not be used as an overall benchmark of import performance, but rather
an easy way to measure impact of possible code changes. For a real-world
benchmark of import, use the normal_startup benchmark from
https://github.com/python/performanc... | 322 | 7 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/unicode/comparecodecs.py | #!/usr/bin/env python3
""" Compare the output of two codecs.
(c) Copyright 2005, Marc-Andre Lemburg (mal@lemburg.com).
Licensed to PSF under a Contributor Agreement.
"""
import sys
def compare_codecs(encoding1, encoding2):
print('Comparing encoding/decoding of %r and %r' % (encoding1, encoding2))
... | 1,440 | 54 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/unicode/listcodecs.py | """ List all available codec modules.
(c) Copyright 2005, Marc-Andre Lemburg (mal@lemburg.com).
Licensed to PSF under a Contributor Agreement.
"""
import os, codecs, encodings
_debug = 0
def listcodecs(dir):
names = []
for filename in os.listdir(dir):
if filename[-3:] != '.py':
con... | 1,021 | 42 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/unicode/gencjkcodecs.py | import os, string
codecs = {
'cn': ('gb2312', 'gbk', 'gb18030', 'hz'),
'tw': ('big5', 'cp950'),
'hk': ('big5hkscs',),
'jp': ('cp932', 'shift_jis', 'euc_jp', 'euc_jisx0213', 'shift_jisx0213',
'euc_jis_2004', 'shift_jis_2004'),
'kr': ('cp949', 'euc_kr', 'johab'),
'iso2022': ('iso2022_j... | 2,073 | 71 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/unicode/gencodec.py | """ Unicode Mapping Parser and Codec Generator.
This script parses Unicode mapping files as available from the Unicode
site (ftp://ftp.unicode.org/Public/MAPPINGS/) and creates Python codec
modules from them. The codecs use the standard character mapping codec
to actually apply the mapping.
Synopsis: gencodec.py dir ... | 12,337 | 430 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/unicode/makecjkcodecs.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 7,067 | 207 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/unicode/genwincodecs.bat | @rem Recreate some python charmap codecs from the Windows function
@rem MultiByteToWideChar.
@cd /d %~dp0
@mkdir build
@rem Arabic DOS code page
c:\python30\python genwincodec.py 720 > build/cp720.py
| 201 | 8 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/unicode/mkstringprep.py | import re, sys
from unicodedata import ucd_3_2_0 as unicodedata
if sys.maxunicode == 65535:
raise RuntimeError("need UCS-4 Python")
def gen_category(cats):
for i in range(0, 0x110000):
if unicodedata.category(chr(i)) in cats:
yield(i)
def gen_bidirectional(cats):
for i in range(0, 0x1... | 10,262 | 432 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/unicode/makeunicodedata.py | #
# (re)generate unicode property and type databases
#
# this script converts a unicode 3.2 database file to
# Modules/unicodedata_db.h, Modules/unicodename_db.h,
# and Objects/unicodetype_db.h
#
# history:
# 2000-09-24 fl created (based on bits and pieces from unidb)
# 2000-09-25 fl merged tim's splitbin fixes, se... | 59,577 | 1,568 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/unicode/python-mappings/CP273.TXT | 0x00 0x0000 #NULL (NUL)
0x01 0x0001 #START OF HEADING (SOH)
0x02 0x0002 #START OF TEXT (STX)
0x03 0x0003 #END OF TEXT (ETX)
0x04 0x009C #STRING TERMINATOR (ST)
0x05 0x0009 #CHARACTER TABULATION (HT)
0x06 0x0086 #START OF SELECTED AREA (SSA)
0x07 0x007F #DELETE (DEL)
0x08 0x0097 #END OF GUARDED AREA (EPA)
0x09 0x008D #R... | 9,268 | 259 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/unicode/python-mappings/TIS-620.TXT | #
# Name: TIS-620
# Unicode version: 3.2
# Table version: 1.0
# Table format: Format A
# Date: 2005-10-25
# Authors: Marc-Andre Lemburg <mal@egenix.com>
#
# According to
# ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-11.TXT the
# TIS-620 is the identical ... | 9,350 | 285 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/unicode/python-mappings/CP1140.TXT | #
# Name: CP1140
# Unicode version: 3.2
# Table version: 1.0
# Table format: Format A
# Date: 2005-10-25
# Authors: Marc-Andre Lemburg <mal@egenix.com>
#
# This encoding is a modified CP037 encoding (with added Euro
# currency sign).
#
# (c) Copyright Mar... | 9,829 | 292 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/unicode/python-mappings/KOI8-U.TXT | #
# Name: KOI8-U (RFC2319) to Unicode
# Unicode version: 3.2
# Table version: 1.0
# Table format: Format A
# Date: 2005-10-25
# Authors: Marc-Andre Lemburg <mal@egenix.com>
#
# See RFC2319 for details. This encoding is a modified KOI8-R
# encoding.
#
# (c) Copy... | 11,267 | 299 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/test2to3/README | This project demonstrates how a distutils package
can support Python 2.x and Python 3.x from a single
source, using lib2to3. | 124 | 3 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/test2to3/setup.py | # -*- coding: iso-8859-1 -*-
from distutils.core import setup
try:
from distutils.command.build_py import build_py_2to3 as build_py
except ImportError:
from distutils.command.build_py import build_py
try:
from distutils.command.build_scripts import build_scripts_2to3 as build_scripts
except ImportError:
... | 753 | 27 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/test2to3/maintest.py | #!/usr/bin/env python3
# The above line should get replaced with the path to the Python
# interpreter; the block below should get 2to3-converted.
try:
from test2to3.hello import hello
except ImportError, e:
print "Import failed", e
hello()
| 250 | 11 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/test2to3/test2to3/hello.py | def hello():
try:
print "Hello, world"
except IOError, e:
print e.errno
| 96 | 6 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/test2to3/test2to3/__init__.py | # empty
| 8 | 2 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/test2to3/test/runtests.py | # Fictitious test runner for the project
import sys, os
if sys.version_info > (3,):
# copy test suite over to "build/lib" and convert it
from distutils.util import copydir_run_2to3
testroot = os.path.dirname(__file__)
newroot = os.path.join(testroot, '..', 'build/lib/test')
copydir_run_2to3(testro... | 509 | 20 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/test2to3/test/test_foo.py | import sys
import unittest
class FooTest(unittest.TestCase):
def test_foo(self):
# use 2.6 syntax to demonstrate conversion
print 'In test_foo, using Python %s...' % (sys.version_info,)
self.assertTrue(False)
| 238 | 9 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/ccbench/ccbench.py | # This file should be kept compatible with both Python 2.6 and Python >= 3.0.
from __future__ import division
from __future__ import print_function
"""
ccbench, a Python concurrency benchmark.
"""
import time
import os
import sys
import itertools
import threading
import subprocess
import socket
from optparse import ... | 18,448 | 612 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/stringbench/README | stringbench is a set of performance tests comparing byte string
operations with unicode operations. The two string implementations
are loosely based on each other and sometimes the algorithm for one is
faster than the other.
These test set was started at the Need For Speed sprint in Reykjavik
to identify which string... | 2,516 | 69 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/stringbench/stringbench.py |
# Various microbenchmarks comparing unicode and byte string performance
# Please keep this file both 2.x and 3.x compatible!
import timeit
import itertools
import operator
import re
import sys
import datetime
import optparse
VERSION = '2.0'
def p(*args):
sys.stdout.write(' '.join(str(s) for s in args) + '\n')
... | 44,018 | 1,483 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/google.py | #! /usr/bin/env python3
import sys, webbrowser
def main():
args = sys.argv[1:]
if not args:
print("Usage: %s querystring" % sys.argv[0])
return
list = []
for arg in args:
if '+' in arg:
arg = arg.replace('+', '%2B')
if ' ' in arg:
arg = '"%s"' % ... | 522 | 24 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/highlight.py | #!/usr/bin/env python3
'''Add syntax highlighting to Python source code'''
__author__ = 'Raymond Hettinger'
import builtins
import functools
import html as html_module
import keyword
import re
import tokenize
#### Analyze Python Source #################################
def is_builtin(s):
'Return True if s is th... | 9,162 | 266 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/suff.py | #! /usr/bin/env python3
# suff
#
# show different suffixes amongst arguments
import sys
def main():
files = sys.argv[1:]
suffixes = {}
for filename in files:
suff = getsuffix(filename)
suffixes.setdefault(suff, []).append(filename)
for suff, filenames in sorted(suffixes.items()):
... | 510 | 27 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/pindent.py | #! /usr/bin/env python3
# This file contains a class and a main program that perform three
# related (though complimentary) formatting operations on Python
# programs. When called as "pindent -c", it takes a valid Python
# program as input and outputs a version augmented with block-closing
# comments. When called as... | 17,127 | 507 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/lll.py | #! /usr/bin/env python3
# Find symbolic links and show where they point to.
# Arguments are directories to search; default is current directory.
# No recursion.
# (This is a totally different program from "findsymlinks.py"!)
import sys, os
def lll(dirname):
for name in os.listdir(dirname):
if name not in... | 752 | 29 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/untabify.py | #! /usr/bin/env python3
"Replace tabs with spaces in argument files. Print names of changed files."
import os
import sys
import getopt
import tokenize
def main():
tabsize = 8
try:
opts, args = getopt.getopt(sys.argv[1:], "t:")
if not args:
raise getopt.error("At least one file ar... | 1,296 | 56 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/linktree.py | #! /usr/bin/env python3
# linktree
#
# Make a copy of a directory tree with symbolic links to all files in the
# original tree.
# All symbolic links go to a special symbolic link at the top, so you
# can easily fix things if the original source tree moves.
# See also "mkreal".
#
# usage: mklinks oldtree newtree
impor... | 2,440 | 81 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/fixcid.py | #! /usr/bin/env python3
# Perform massive identifier substitution on C source files.
# This actually tokenizes the files (to some extent) so it can
# avoid making substitutions inside strings or comments.
# Inside strings, substitutions are never made; inside comments,
# it is a user option (off by default).
#
# The s... | 10,051 | 317 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/run_tests.py | """Run Python's test suite in a fast, rigorous way.
The defaults are meant to be reasonably thorough, while skipping certain
tests that can be time-consuming or resource-intensive (e.g. largefile),
or distracting (e.g. audio and gui). These defaults can be overridden by
simply passing a -u option to this script.
"""
... | 1,919 | 60 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/eptags.py | #! /usr/bin/env python3
"""Create a TAGS file for Python programs, usable with GNU Emacs.
usage: eptags pyfiles...
The output TAGS file is usable with Emacs version 18, 19, 20.
Tagged are:
- functions (even inside other defs or classes)
- classes
eptags warns about files it cannot open.
eptags will not give warnin... | 1,493 | 57 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/parse_html5_entities.py | #!/usr/bin/env python3
"""
Utility for parsing HTML5 entity definitions available from:
http://dev.w3.org/html5/spec/entities.json
Written by Ezio Melotti and Iuliia Proskurnia.
"""
import os
import sys
import json
from urllib.request import urlopen
from html.entities import html5
entities_url = 'http://dev.w3... | 3,999 | 106 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/reindent.py | #! /usr/bin/env python3
# Released to the public domain, by Tim Peters, 03 October 2000.
"""reindent [-d][-r][-v] [ path ... ]
-d (--dryrun) Dry run. Analyze, but don't make any changes to, files.
-r (--recurse) Recurse. Search for all .py files in subdirectories too.
-n (--nobackup) No backup. Does not make ... | 11,647 | 334 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/2to3 | #!/usr/bin/env python
import sys
from lib2to3.main import main
sys.exit(main("lib2to3.fixes"))
| 96 | 6 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/crlf.py | #! /usr/bin/env python3
"Replace CRLF with LF in argument files. Print names of changed files."
import sys, os
def main():
for filename in sys.argv[1:]:
if os.path.isdir(filename):
print(filename, "Directory!")
continue
with open(filename, "rb") as f:
data = f.... | 632 | 24 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/treesync.py | #! /usr/bin/env python3
"""Script to synchronize two source trees.
Invoke with two arguments:
python treesync.py slave master
The assumption is that "master" contains CVS administration while
slave doesn't. All files in the slave tree that have a CVS/Entries
entry in the master tree are synchronized. This means:
... | 5,960 | 211 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/dutree.py | #! /usr/bin/env python3
# Format du output in a tree shape
import os, sys, errno
def main():
p = os.popen('du ' + ' '.join(sys.argv[1:]), 'r')
total, d = None, {}
for line in p.readlines():
i = 0
while line[i] in '0123456789': i = i+1
size = eval(line[:i])
while line[i] in ... | 1,608 | 61 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/import_diagnostics.py | #!/usr/bin/env python3
"""Miscellaneous diagnostics for the import system"""
import sys
import argparse
from pprint import pprint
def _dump_state(args):
print(sys.version)
for name in args.attributes:
print("sys.{}:".format(name))
pprint(getattr(sys, name))
def _add_dump_args(cmd):
cmd.ad... | 999 | 38 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/cleanfuture.py | #! /usr/bin/env python3
"""cleanfuture [-d][-r][-v] path ...
-d Dry run. Analyze, but don't make any changes to, files.
-r Recurse. Search for all .py files in subdirectories too.
-v Verbose. Print informative msgs.
Search Python (.py) files for future statements, and remove the features
from such statements t... | 8,623 | 277 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/get-remote-certificate.py | #!/usr/bin/env python3
#
# fetch the certificate that the server(s) are providing in PEM form
#
# args are HOST:PORT [, HOST:PORT...]
#
# By Bill Janssen.
import re
import os
import sys
import tempfile
def fetch_server_certificate (host, port):
def subproc(cmd):
from subprocess import Popen, PIPE, STDOU... | 2,720 | 85 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/objgraph.py | #! /usr/bin/env python3
# objgraph
#
# Read "nm -o" input (on IRIX: "nm -Bo") of a set of libraries or modules
# and print various interesting listings, such as:
#
# - which names are used but not defined in the set (and used where),
# - which names are defined in the set (and where),
# - which modules use which other... | 5,980 | 211 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/pydoc3 | #!/usr/bin/env python3
import pydoc
if __name__ == '__main__':
pydoc.cli()
| 80 | 6 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/abitype.py | #!/usr/bin/env python3
# This script converts a C file to use the PEP 384 type definition API
# Usage: abitype.py < old_code > new_code
import re, sys
###### Replacement of PyTypeObject static instances ##############
# classify each token, giving it a one-letter code:
# S: static
# T: PyTypeObject
# I: ident
# W: wh... | 5,572 | 203 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/README | This directory contains a collection of executable Python scripts that are
useful while building, extending or managing Python. Some (e.g., dutree or lll)
are also generally useful UNIX tools.
2to3 Main script for running the 2to3 conversion tool
abitype.py Converts a C file to use... | 4,781 | 70 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/which.py | #! /usr/bin/env python3
# Variant of "which".
# On stderr, near and total misses are reported.
# '-l<flags>' argument adds ls -l<flags> of each file found.
import sys
if sys.path[0] in (".", ""): del sys.path[0]
import sys, os
from stat import *
def msg(str):
sys.stderr.write(str + '\n')
def main():
pathli... | 1,633 | 61 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/diff.py | #!/usr/bin/env python3
""" Command line interface to difflib.py providing diffs in four formats:
* ndiff: lists every line and highlights interline changes.
* context: highlights clusters of changes in a before/after format.
* unified: highlights clusters of changes in an inline format.
* html: generates side... | 2,256 | 61 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Tools/scripts/rgrep.py | #! /usr/bin/env python3
"""Reverse grep.
Usage: rgrep [-i] pattern file
"""
import sys
import re
import getopt
def main():
bufsize = 64 * 1024
reflags = 0
opts, args = getopt.getopt(sys.argv[1:], "i")
for o, a in opts:
if o == '-i':
reflags = reflags | re.IGNORECASE
if len(a... | 1,476 | 67 | jart/cosmopolitan | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.