mysql> create table t (id integer primary key, f1 float, f2 float(10,4));
mysql> insert into t (id, f1, f2) values (1, 0.0001, 0.0001);
mysql> select f1, f1=0.0001, f1=0.0001e0, f2, f2=0.0001, f2=0.0001e0 from t;
+--------+-----------+-------------+--------+-----------+-------------+
| f1 | f1=0.0001 | f1=0.0001e0 | f2 | f2=0.0001 | f2=0.0001e0 |
+--------+-----------+-------------+--------+-----------+-------------+
| 0.0001 | 0 | 0 | 0.0001 | 1 | 0 |
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
FATAL(RSC-016): build/epub/Python.epub/genindex-A.xhtml(34,29): Fatal Error while parsing file: The entity "ndash" was referenced, but not declared. | |
FATAL(RSC-016): build/epub/Python.epub/genindex-B.xhtml(34,29): Fatal Error while parsing file: The entity "ndash" was referenced, but not declared. | |
FATAL(RSC-016): build/epub/Python.epub/genindex-C.xhtml(34,29): Fatal Error while parsing file: The entity "ndash" was referenced, but not declared. | |
FATAL(RSC-016): build/epub/Python.epub/genindex-D.xhtml(34,29): Fatal Error while parsing file: The entity "ndash" was referenced, but not declared. | |
FATAL(RSC-016): build/epub/Python.epub/genindex-E.xhtml(34,29): Fatal Error while parsing file: The entity "ndash" was referenced, but not declared. | |
FATAL(RSC-016): build/epub/Python.epub/genindex-F.xhtml(34,29): Fatal Error while parsing file: The entity "ndash" was referenced, but not declared. | |
FATAL(RSC-016): build/epub/Python.epub/genindex-G.xhtml(34,29): Fatal Error while parsing file: The entity "ndash" was referenced, |
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 sys | |
import os | |
import io | |
import traceback | |
import json | |
import pathlib | |
import sub | |
try: |
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
Run uwsgi | |
uwsgi --wsgi-file=mt_sample.py --threads 8 --workers 4 --max-requests 40 --http-socket=:8000 --master --min-worker-lifetime=7 -L | |
Run hey[1] | |
hey -c 32 -z 10m 'http://127.0.0.1:8000/' | |
[1] hey: https://github.com/rakyll/hey |
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
# https://github.com/python/cpython/pull/107374 | |
import sys | |
import textwrap | |
import timeit | |
filename = "Objects/unicodeobject.c" | |
if len(sys.argv) > 1: | |
filename = sys.argv[1] |
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
diff -r ffdfb1066ac6 contrib/win32/hg.bat | |
--- a/contrib/win32/hg.bat Thu Mar 02 15:34:45 2023 +0100 | |
+++ b/contrib/win32/hg.bat Wed Jun 28 18:53:44 2023 +0900 | |
@@ -5,6 +5,7 @@ | |
set HG=%~f0 | |
set PYTHONLEGACYWINDOWSSTDIO=1 | |
+set PYTHONLEGACYWINDOWSFSENCODING=1 | |
rem Use a full path to Python (relative to this script) if it exists, |
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
#!/usr/bin/env python3 | |
import pyperf | |
def build_dict_str(n): | |
mydict = {str(k): k for k in range(n)} | |
return mydict, list(mydict) | |
def build_dict_int(n): |
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
// create known hash in test_hash | |
#include <cstdint> | |
#include <iostream> | |
#include <stdio.h> | |
#include <stddef.h> | |
#include <string.h> | |
// copied from initconfig.c |
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
diff --git a/Objects/setobject.c b/Objects/setobject.c | |
index 2ccf183..db9b86b 100644 | |
--- a/Objects/setobject.c | |
+++ b/Objects/setobject.c | |
@@ -302,7 +302,7 @@ set_table_resize(PySetObject *so, Py_ssize_t minused) | |
setentry small_copy[PySet_MINSIZE]; | |
assert(minused >= 0); | |
- minused = (minused > 50000) ? minused * 2 : minused * 4; | |
+ minused *= 2; |
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
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"os" | |
"time" | |
) |
NewerOlder