feat(git hook): init

This commit is contained in:
ZhymabekRoman 2024-11-08 15:13:02 +05:00
parent 76bb8b3c1d
commit 7f9f21d1ba
28 changed files with 132 additions and 134 deletions

View file

@ -16,4 +16,4 @@ ADMIN_SECRET_KEY="test"
PGADMIN_DEFAULT_EMAIL=root@root.com
PGADMIN_DEFAULT_PASSWORD=root
.... and more values to change you can find in ./web/server/config.py and docker-compose rules folder
.... and more values to change you can find in ./web/server/config.py and docker-compose rules folder

2
.gitignore vendored
View file

@ -165,4 +165,4 @@ cython_debug/
medium_db_cache.sqlite*
ban_post_list.db
postgres/
postgres/

View file

@ -1,4 +1,4 @@
{
"python.REPL.enableREPLSmartSend": false,
"python.analysis.typeCheckingMode": "strict"
}
}

View file

@ -3,203 +3,203 @@
encode gzip
header -Server
handle_path /android-chrome-192x192.png {
root * /static/android-chrome-192x192.png
file_server
}
handle_path /android-chrome-512x512.png {
root * /static/android-chrome-512x512.png
file_server
}
handle_path /apple-touch-icon.png {
root * /static/apple-touch-icon.png
file_server
}
handle_path /browserconfig.xml {
root * /static/browserconfig.xml
file_server
}
handle_path /favicon-16x16.png {
root * /static/favicon-16x16.png
file_server
}
handle_path /favicon-32x32.png {
root * /static/favicon-32x32.png
file_server
}
handle_path /favicon.ico {
root * /static/favicon.ico
file_server
}
handle_path /humans.txt {
root * /static/humans.txt
file_server
}
handle_path /mstile-144x144.png {
root * /static/mstile-144x144.png
file_server
}
handle_path /mstile-150x150.png {
root * /static/mstile-150x150.png
file_server
}
handle_path /mstile-310x150.png {
root * /static/mstile-310x150.png
file_server
}
handle_path /mstile-310x310.png {
root * /static/mstile-310x310.png
file_server
}
handle_path /mstile-70x70.png {
root * /static/mstile-70x70.png
file_server
}
handle_path /robots.txt {
root * /static/robots.txt
file_server
}
handle_path /safari-pinned-tab.svg {
root * /static/safari-pinned-tab.svg
file_server
}
handle_path /security.txt {
root * /static/security.txt
file_server
}
handle_path /site.webmanifest {
root * /static/site.webmanifest
file_server
}
handle_path /websocket {
respond "Access denied" 403
}
handle_path /meta.json {
respond "Access denied" 403
}
handle_path /cdn-cgi/challenge-platform/scripts/jsd/main.js {
respond "Access denied" 403
}
handle_path /cdn-cgi/rum {
respond "Access denied" 403
}
handle_path /graphql/websocket {
respond "Access denied" 403
}
handle_path /onboarding/* {
respond "Access denied" 403
}
handle_path /wp-* {
respond "Access denied" 403
}
handle_path /.env {
respond "Access denied" 403
}
handle_path /api* {
respond "Access denied" 403
}
handle_path /apple-touch-icon-precomposed.png {
respond "Access denied" 403
}
handle_path /rss.xml {
respond "Access denied" 403
}
handle_path /.git/* {
respond "Access denied" 403
}
handle_path /apple-touch-icon-120x120.png {
respond "Access denied" 403
}
handle_path /apple-touch-icon-120x120-precomposed.png {
respond "Access denied" 403
}
handle_path /apple-touch-icon-152x152.png {
respond "Access denied" 403
}
handle_path /apple-touch-icon-152x152-precomposed.png {
respond "Access denied" 403
}
handle_path /.well-known/* {
respond "Access denied" 403
}
handle_path /cdn-cgi/challenge-platform/h/b/orchestrate/chl_page/v1 {
respond "Access denied" 403
}
handle_path /cdn-cgi/challenge-platform/h/g/orchestrate/chl_page/v1 {
respond "Access denied" 403
}
}
(header_up) {

View file

@ -1,3 +1,3 @@
FROM caddy:2-alpine
RUN apk add --no-cache curl
RUN apk add --no-cache curl

View file

@ -1,3 +1,3 @@
# Database-Lib
Database-Lib is a library for database operations.
Database-Lib is a library for database operations.

View file

@ -22,4 +22,4 @@ setup(
'Operating System :: OS Independent',
],
python_requires='>=3.7',
)
)

View file

@ -79,4 +79,4 @@ class TestSQLiteCacheBackend(unittest.TestCase):
# self.cache_backend.connection.commit()
if __name__ == '__main__':
unittest.main()
unittest.main()

View file

@ -8,7 +8,7 @@ repos:
- id: end-of-file-fixer
- id: debug-statements
- id: check-toml
- id: check-json
# - id: check-json
- id: check-xml
- id: check-added-large-files
- id: check-ast

View file

@ -31,4 +31,4 @@ ai.gopubby.com
blog.devops.dev
levelup.gitconnected.com
betterhumans.coach.me
ai.plainenglish.io
ai.plainenglish.io

View file

@ -22,7 +22,7 @@ async def main():
print(response.status)
###
###
# Port to Python 3.10+
# https://github.com/fedora-infra/fedora-messaging/pull/250/commits/f3439350de7f55d42f4350e662392e9ffbdde028
@ -34,4 +34,4 @@ else:
ssl_context.options |= ssl.OP_NO_SSLv2
ssl_context.options |= ssl.OP_NO_SSLv3
ssl_context.options |= ssl.OP_NO_TLSv1
ssl_context.options |= ssl.OP_NO_TLSv1_1
ssl_context.options |= ssl.OP_NO_TLSv1_1

View file

@ -10,4 +10,4 @@ Jinja2==3.1.2
beautifulsoup4==4.12.2
async-lru==2.0.4
orjson==3.10.6
asyncer
asyncer

View file

@ -22,4 +22,4 @@ setup(
'Operating System :: OS Independent',
],
python_requires='>=3.7',
)
)

View file

@ -11,4 +11,4 @@
"utils": "$lib/utils"
},
"typescript": true
}
}

View file

@ -59,4 +59,4 @@ export const flyAndScale = (
},
easing: cubicOut
};
};
};

View file

@ -49,4 +49,4 @@ export function flyAndScale(node: Element, params?: FlyAndScaleParams): Transiti
},
easing: cubicOut,
};
}
}

View file

@ -25,4 +25,4 @@
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
}
}

View file

@ -1,3 +1,3 @@
<clickhouse>
<cgroups_memory_usage_observer_wait_time>0</cgroups_memory_usage_observer_wait_time>
</clickhouse>
</clickhouse>

View file

@ -1,3 +1,3 @@
<clickhouse>
<listen_host>0.0.0.0</listen_host>
</clickhouse>
</clickhouse>

View file

@ -33,4 +33,4 @@
<trace_log remove="remove" />
<session_log remove="remove" />
<part_log remove="remove" />
</clickhouse>
</clickhouse>

View file

@ -1511,7 +1511,7 @@ struct __pyx_obj_16rl_string_helper_6mixins_17string_assignment_StringAssignment
/* "rl_string_helper/mixins/string_assignment.pyx":3
* # cython: language_level=3str
*
*
* cdef class StringAssignmentMixin: # <<<<<<<<<<<<<<
* def __cinit__(self, str string):
* self.string = str(string) if isinstance(string, StringAssignmentMixin) else string
@ -2652,7 +2652,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
/* #### Code section: module_code ### */
/* "rl_string_helper/mixins/string_assignment.pyx":4
*
*
* cdef class StringAssignmentMixin:
* def __cinit__(self, str string): # <<<<<<<<<<<<<<
* self.string = str(string) if isinstance(string, StringAssignmentMixin) else string
@ -2759,9 +2759,9 @@ static int __pyx_pf_16rl_string_helper_6mixins_17string_assignment_21StringAssig
* def __cinit__(self, str string):
* self.string = str(string) if isinstance(string, StringAssignmentMixin) else string # <<<<<<<<<<<<<<
* self.string_list = list(self.string)
*
*
*/
__pyx_t_2 = __Pyx_TypeCheck(__pyx_v_string, __pyx_ptype_16rl_string_helper_6mixins_17string_assignment_StringAssignmentMixin);
__pyx_t_2 = __Pyx_TypeCheck(__pyx_v_string, __pyx_ptype_16rl_string_helper_6mixins_17string_assignment_StringAssignmentMixin);
if (__pyx_t_2) {
__pyx_t_3 = __Pyx_PyStr_Str(__pyx_v_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
@ -2782,7 +2782,7 @@ static int __pyx_pf_16rl_string_helper_6mixins_17string_assignment_21StringAssig
* def __cinit__(self, str string):
* self.string = str(string) if isinstance(string, StringAssignmentMixin) else string
* self.string_list = list(self.string) # <<<<<<<<<<<<<<
*
*
* cdef void __render_string(self):
*/
__pyx_t_1 = PySequence_List(__pyx_v_self->string); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
@ -2794,7 +2794,7 @@ static int __pyx_pf_16rl_string_helper_6mixins_17string_assignment_21StringAssig
__pyx_t_1 = 0;
/* "rl_string_helper/mixins/string_assignment.pyx":4
*
*
* cdef class StringAssignmentMixin:
* def __cinit__(self, str string): # <<<<<<<<<<<<<<
* self.string = str(string) if isinstance(string, StringAssignmentMixin) else string
@ -2816,10 +2816,10 @@ static int __pyx_pf_16rl_string_helper_6mixins_17string_assignment_21StringAssig
/* "rl_string_helper/mixins/string_assignment.pyx":8
* self.string_list = list(self.string)
*
*
* cdef void __render_string(self): # <<<<<<<<<<<<<<
* self.string = "".join(self.string_list)
*
*
*/
static void __pyx_f_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin__StringAssignmentMixin__render_string(struct __pyx_obj_16rl_string_helper_6mixins_17string_assignment_StringAssignmentMixin *__pyx_v_self) {
@ -2832,10 +2832,10 @@ static void __pyx_f_16rl_string_helper_6mixins_17string_assignment_21StringAssig
__Pyx_RefNannySetupContext("_StringAssignmentMixin__render_string", 1);
/* "rl_string_helper/mixins/string_assignment.pyx":9
*
*
* cdef void __render_string(self):
* self.string = "".join(self.string_list) # <<<<<<<<<<<<<<
*
*
* def __len__(self):
*/
__pyx_t_1 = __pyx_v_self->string_list;
@ -2852,10 +2852,10 @@ static void __pyx_f_16rl_string_helper_6mixins_17string_assignment_21StringAssig
/* "rl_string_helper/mixins/string_assignment.pyx":8
* self.string_list = list(self.string)
*
*
* cdef void __render_string(self): # <<<<<<<<<<<<<<
* self.string = "".join(self.string_list)
*
*
*/
/* function exit code */
@ -2870,10 +2870,10 @@ static void __pyx_f_16rl_string_helper_6mixins_17string_assignment_21StringAssig
/* "rl_string_helper/mixins/string_assignment.pyx":11
* self.string = "".join(self.string_list)
*
*
* def __len__(self): # <<<<<<<<<<<<<<
* return len(self.string_list)
*
*
*/
/* Python wrapper */
@ -2902,10 +2902,10 @@ static Py_ssize_t __pyx_pf_16rl_string_helper_6mixins_17string_assignment_21Stri
__Pyx_RefNannySetupContext("__len__", 1);
/* "rl_string_helper/mixins/string_assignment.pyx":12
*
*
* def __len__(self):
* return len(self.string_list) # <<<<<<<<<<<<<<
*
*
* cpdef StringAssignmentMixin pop(self, int key):
*/
__pyx_t_1 = __pyx_v_self->string_list;
@ -2921,10 +2921,10 @@ static Py_ssize_t __pyx_pf_16rl_string_helper_6mixins_17string_assignment_21Stri
/* "rl_string_helper/mixins/string_assignment.pyx":11
* self.string = "".join(self.string_list)
*
*
* def __len__(self): # <<<<<<<<<<<<<<
* return len(self.string_list)
*
*
*/
/* function exit code */
@ -2939,13 +2939,13 @@ static Py_ssize_t __pyx_pf_16rl_string_helper_6mixins_17string_assignment_21Stri
/* "rl_string_helper/mixins/string_assignment.pyx":14
* return len(self.string_list)
*
*
* cpdef StringAssignmentMixin pop(self, int key): # <<<<<<<<<<<<<<
* self.string_list.pop(key)
* return self
*/
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_5pop(PyObject *__pyx_v_self,
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_5pop(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@ -3024,11 +3024,11 @@ static struct __pyx_obj_16rl_string_helper_6mixins_17string_assignment_StringAss
}
/* "rl_string_helper/mixins/string_assignment.pyx":15
*
*
* cpdef StringAssignmentMixin pop(self, int key):
* self.string_list.pop(key) # <<<<<<<<<<<<<<
* return self
*
*
*/
if (unlikely(__pyx_v_self->string_list == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop");
@ -3042,7 +3042,7 @@ static struct __pyx_obj_16rl_string_helper_6mixins_17string_assignment_StringAss
* cpdef StringAssignmentMixin pop(self, int key):
* self.string_list.pop(key)
* return self # <<<<<<<<<<<<<<
*
*
* def encode(self, str encoding):
*/
__Pyx_XDECREF((PyObject *)__pyx_r);
@ -3052,7 +3052,7 @@ static struct __pyx_obj_16rl_string_helper_6mixins_17string_assignment_StringAss
/* "rl_string_helper/mixins/string_assignment.pyx":14
* return len(self.string_list)
*
*
* cpdef StringAssignmentMixin pop(self, int key): # <<<<<<<<<<<<<<
* self.string_list.pop(key)
* return self
@ -3074,7 +3074,7 @@ static struct __pyx_obj_16rl_string_helper_6mixins_17string_assignment_StringAss
}
/* Python wrapper */
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_5pop(PyObject *__pyx_v_self,
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_5pop(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@ -3082,7 +3082,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_5pop = {"pop", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_5pop, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_5pop(PyObject *__pyx_v_self,
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_5pop(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@ -3197,14 +3197,14 @@ static PyObject *__pyx_pf_16rl_string_helper_6mixins_17string_assignment_21Strin
/* "rl_string_helper/mixins/string_assignment.pyx":18
* return self
*
*
* def encode(self, str encoding): # <<<<<<<<<<<<<<
* self.__render_string()
* return self.string.encode(encoding, "surrogatepass")
*/
/* Python wrapper */
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_7encode(PyObject *__pyx_v_self,
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_7encode(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@ -3212,7 +3212,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_7encode = {"encode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_7encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_7encode(PyObject *__pyx_v_self,
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_7encode(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@ -3317,11 +3317,11 @@ static PyObject *__pyx_pf_16rl_string_helper_6mixins_17string_assignment_21Strin
__Pyx_RefNannySetupContext("encode", 1);
/* "rl_string_helper/mixins/string_assignment.pyx":19
*
*
* def encode(self, str encoding):
* self.__render_string() # <<<<<<<<<<<<<<
* return self.string.encode(encoding, "surrogatepass")
*
*
*/
((struct __pyx_vtabstruct_16rl_string_helper_6mixins_17string_assignment_StringAssignmentMixin *)__pyx_v_self->__pyx_vtab)->_StringAssignmentMixin__render_string(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 19, __pyx_L1_error)
@ -3329,7 +3329,7 @@ static PyObject *__pyx_pf_16rl_string_helper_6mixins_17string_assignment_21Strin
* def encode(self, str encoding):
* self.__render_string()
* return self.string.encode(encoding, "surrogatepass") # <<<<<<<<<<<<<<
*
*
* cpdef StringAssignmentMixin insert(self, int key, str value):
*/
__Pyx_XDECREF(__pyx_r);
@ -3363,7 +3363,7 @@ static PyObject *__pyx_pf_16rl_string_helper_6mixins_17string_assignment_21Strin
/* "rl_string_helper/mixins/string_assignment.pyx":18
* return self
*
*
* def encode(self, str encoding): # <<<<<<<<<<<<<<
* self.__render_string()
* return self.string.encode(encoding, "surrogatepass")
@ -3384,13 +3384,13 @@ static PyObject *__pyx_pf_16rl_string_helper_6mixins_17string_assignment_21Strin
/* "rl_string_helper/mixins/string_assignment.pyx":22
* return self.string.encode(encoding, "surrogatepass")
*
*
* cpdef StringAssignmentMixin insert(self, int key, str value): # <<<<<<<<<<<<<<
* self.string_list.insert(key, value)
* return self
*/
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_9insert(PyObject *__pyx_v_self,
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_9insert(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@ -3470,11 +3470,11 @@ static struct __pyx_obj_16rl_string_helper_6mixins_17string_assignment_StringAss
}
/* "rl_string_helper/mixins/string_assignment.pyx":23
*
*
* cpdef StringAssignmentMixin insert(self, int key, str value):
* self.string_list.insert(key, value) # <<<<<<<<<<<<<<
* return self
*
*
*/
if (unlikely(__pyx_v_self->string_list == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "insert");
@ -3486,7 +3486,7 @@ static struct __pyx_obj_16rl_string_helper_6mixins_17string_assignment_StringAss
* cpdef StringAssignmentMixin insert(self, int key, str value):
* self.string_list.insert(key, value)
* return self # <<<<<<<<<<<<<<
*
*
* def __setitem__(self, object key, str value):
*/
__Pyx_XDECREF((PyObject *)__pyx_r);
@ -3496,7 +3496,7 @@ static struct __pyx_obj_16rl_string_helper_6mixins_17string_assignment_StringAss
/* "rl_string_helper/mixins/string_assignment.pyx":22
* return self.string.encode(encoding, "surrogatepass")
*
*
* cpdef StringAssignmentMixin insert(self, int key, str value): # <<<<<<<<<<<<<<
* self.string_list.insert(key, value)
* return self
@ -3518,7 +3518,7 @@ static struct __pyx_obj_16rl_string_helper_6mixins_17string_assignment_StringAss
}
/* Python wrapper */
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_9insert(PyObject *__pyx_v_self,
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_9insert(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@ -3526,7 +3526,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_9insert = {"insert", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_9insert, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_9insert(PyObject *__pyx_v_self,
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_9insert(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@ -3661,7 +3661,7 @@ static PyObject *__pyx_pf_16rl_string_helper_6mixins_17string_assignment_21Strin
/* "rl_string_helper/mixins/string_assignment.pyx":26
* return self
*
*
* def __setitem__(self, object key, str value): # <<<<<<<<<<<<<<
* self.string_list[key] = value
* # return self
@ -3697,11 +3697,11 @@ static int __pyx_pf_16rl_string_helper_6mixins_17string_assignment_21StringAssig
int __pyx_clineno = 0;
/* "rl_string_helper/mixins/string_assignment.pyx":27
*
*
* def __setitem__(self, object key, str value):
* self.string_list[key] = value # <<<<<<<<<<<<<<
* # return self
*
*
*/
if (unlikely(__pyx_v_self->string_list == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
@ -3711,7 +3711,7 @@ static int __pyx_pf_16rl_string_helper_6mixins_17string_assignment_21StringAssig
/* "rl_string_helper/mixins/string_assignment.pyx":26
* return self
*
*
* def __setitem__(self, object key, str value): # <<<<<<<<<<<<<<
* self.string_list[key] = value
* # return self
@ -3729,7 +3729,7 @@ static int __pyx_pf_16rl_string_helper_6mixins_17string_assignment_21StringAssig
/* "rl_string_helper/mixins/string_assignment.pyx":30
* # return self
*
*
* def __getitem__(self, object key): # <<<<<<<<<<<<<<
* if isinstance(key, slice):
* return "".join(self.string_list[key])
@ -3762,13 +3762,13 @@ static PyObject *__pyx_pf_16rl_string_helper_6mixins_17string_assignment_21Strin
__Pyx_RefNannySetupContext("__getitem__", 1);
/* "rl_string_helper/mixins/string_assignment.pyx":31
*
*
* def __getitem__(self, object key):
* if isinstance(key, slice): # <<<<<<<<<<<<<<
* return "".join(self.string_list[key])
* else:
*/
__pyx_t_1 = PySlice_Check(__pyx_v_key);
__pyx_t_1 = PySlice_Check(__pyx_v_key);
if (__pyx_t_1) {
/* "rl_string_helper/mixins/string_assignment.pyx":32
@ -3793,7 +3793,7 @@ static PyObject *__pyx_pf_16rl_string_helper_6mixins_17string_assignment_21Strin
goto __pyx_L0;
/* "rl_string_helper/mixins/string_assignment.pyx":31
*
*
* def __getitem__(self, object key):
* if isinstance(key, slice): # <<<<<<<<<<<<<<
* return "".join(self.string_list[key])
@ -3805,7 +3805,7 @@ static PyObject *__pyx_pf_16rl_string_helper_6mixins_17string_assignment_21Strin
* return "".join(self.string_list[key])
* else:
* return self.string_list[key] # <<<<<<<<<<<<<<
*
*
* def __str__(self):
*/
/*else*/ {
@ -3823,7 +3823,7 @@ static PyObject *__pyx_pf_16rl_string_helper_6mixins_17string_assignment_21Strin
/* "rl_string_helper/mixins/string_assignment.pyx":30
* # return self
*
*
* def __getitem__(self, object key): # <<<<<<<<<<<<<<
* if isinstance(key, slice):
* return "".join(self.string_list[key])
@ -3843,7 +3843,7 @@ static PyObject *__pyx_pf_16rl_string_helper_6mixins_17string_assignment_21Strin
/* "rl_string_helper/mixins/string_assignment.pyx":36
* return self.string_list[key]
*
*
* def __str__(self): # <<<<<<<<<<<<<<
* self.__render_string()
* return self.string
@ -3873,11 +3873,11 @@ static PyObject *__pyx_pf_16rl_string_helper_6mixins_17string_assignment_21Strin
__Pyx_RefNannySetupContext("__str__", 1);
/* "rl_string_helper/mixins/string_assignment.pyx":37
*
*
* def __str__(self):
* self.__render_string() # <<<<<<<<<<<<<<
* return self.string
*
*
*/
((struct __pyx_vtabstruct_16rl_string_helper_6mixins_17string_assignment_StringAssignmentMixin *)__pyx_v_self->__pyx_vtab)->_StringAssignmentMixin__render_string(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 37, __pyx_L1_error)
@ -3885,7 +3885,7 @@ static PyObject *__pyx_pf_16rl_string_helper_6mixins_17string_assignment_21Strin
* def __str__(self):
* self.__render_string()
* return self.string # <<<<<<<<<<<<<<
*
*
* __repr__ = __str__
*/
__Pyx_XDECREF(__pyx_r);
@ -3895,7 +3895,7 @@ static PyObject *__pyx_pf_16rl_string_helper_6mixins_17string_assignment_21Strin
/* "rl_string_helper/mixins/string_assignment.pyx":36
* return self.string_list[key]
*
*
* def __str__(self): # <<<<<<<<<<<<<<
* self.__render_string()
* return self.string
@ -3918,7 +3918,7 @@ static PyObject *__pyx_pf_16rl_string_helper_6mixins_17string_assignment_21Strin
*/
/* Python wrapper */
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_17__reduce_cython__(PyObject *__pyx_v_self,
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_17__reduce_cython__(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@ -3926,7 +3926,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_17__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_17__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_17__reduce_cython__(PyObject *__pyx_v_self,
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_17__reduce_cython__(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@ -3998,7 +3998,7 @@ static PyObject *__pyx_pf_16rl_string_helper_6mixins_17string_assignment_21Strin
*/
/* Python wrapper */
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_19__setstate_cython__(PyObject *__pyx_v_self,
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_19__setstate_cython__(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@ -4006,7 +4006,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_19__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_19__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_19__setstate_cython__(PyObject *__pyx_v_self,
static PyObject *__pyx_pw_16rl_string_helper_6mixins_17string_assignment_21StringAssignmentMixin_19__setstate_cython__(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@ -4425,7 +4425,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
/* "rl_string_helper/mixins/string_assignment.pyx":14
* return len(self.string_list)
*
*
* cpdef StringAssignmentMixin pop(self, int key): # <<<<<<<<<<<<<<
* self.string_list.pop(key)
* return self
@ -4437,7 +4437,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
/* "rl_string_helper/mixins/string_assignment.pyx":18
* return self
*
*
* def encode(self, str encoding): # <<<<<<<<<<<<<<
* self.__render_string()
* return self.string.encode(encoding, "surrogatepass")
@ -4449,7 +4449,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
/* "rl_string_helper/mixins/string_assignment.pyx":22
* return self.string.encode(encoding, "surrogatepass")
*
*
* cpdef StringAssignmentMixin insert(self, int key, str value): # <<<<<<<<<<<<<<
* self.string_list.insert(key, value)
* return self
@ -4881,7 +4881,7 @@ if (!__Pyx_RefNanny) {
/* "rl_string_helper/mixins/string_assignment.pyx":14
* return len(self.string_list)
*
*
* cpdef StringAssignmentMixin pop(self, int key): # <<<<<<<<<<<<<<
* self.string_list.pop(key)
* return self
@ -4894,7 +4894,7 @@ if (!__Pyx_RefNanny) {
/* "rl_string_helper/mixins/string_assignment.pyx":18
* return self
*
*
* def encode(self, str encoding): # <<<<<<<<<<<<<<
* self.__render_string()
* return self.string.encode(encoding, "surrogatepass")
@ -4907,7 +4907,7 @@ if (!__Pyx_RefNanny) {
/* "rl_string_helper/mixins/string_assignment.pyx":22
* return self.string.encode(encoding, "surrogatepass")
*
*
* cpdef StringAssignmentMixin insert(self, int key, str value): # <<<<<<<<<<<<<<
* self.string_list.insert(key, value)
* return self
@ -4920,9 +4920,9 @@ if (!__Pyx_RefNanny) {
/* "rl_string_helper/mixins/string_assignment.pyx":40
* return self.string
*
*
* __repr__ = __str__ # <<<<<<<<<<<<<<
*
*
* # Make the class available to Python
*/
__Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_16rl_string_helper_6mixins_17string_assignment_StringAssignmentMixin, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 40, __pyx_L1_error)
@ -4953,7 +4953,7 @@ if (!__Pyx_RefNanny) {
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/* "rl_string_helper/mixins/string_assignment.pyx":43
*
*
* # Make the class available to Python
* StringAssignmentMixin_py = StringAssignmentMixin # <<<<<<<<<<<<<<
*/
@ -4961,7 +4961,7 @@ if (!__Pyx_RefNanny) {
/* "rl_string_helper/mixins/string_assignment.pyx":1
* # cython: language_level=3str # <<<<<<<<<<<<<<
*
*
* cdef class StringAssignmentMixin:
*/
__pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)

View file

@ -6,4 +6,4 @@ cdef class StringAssignmentMixin:
cdef void __render_string(self)
cpdef StringAssignmentMixin pop(self, int key)
cpdef StringAssignmentMixin insert(self, int key, str value)
cpdef StringAssignmentMixin insert(self, int key, str value)

View file

@ -40,4 +40,4 @@ cdef class StringAssignmentMixin:
__repr__ = __str__
# Make the class available to Python
StringAssignmentMixin_py = StringAssignmentMixin
StringAssignmentMixin_py = StringAssignmentMixin

View file

@ -14,7 +14,7 @@ In JavaScript, the `length` property of a String object returns the number of co
In UTF-16, each Unicode character may be encoded as one or two code units (byte). This means that for certain scripts, such as emojis, mathematical symbols, or some Chinese characters,
the value returned by length might not match the actual number of Unicode characters in the string.
Python uses UTF-8 encoding, which each character is encoded as one byte. So here is a workaround to get the actual number of characters and manipulate them in string as in UTF-16 encoding. See pre_utf_16_bang and post_utf_16_bang function.
Python uses UTF-8 encoding, which each character is encoded as one byte. So here is a workaround to get the actual number of characters and manipulate them in string as in UTF-16 encoding. See pre_utf_16_bang and post_utf_16_bang function.
More info to read: https://habr.com/ru/articles/769256/
"""

View file

@ -1 +0,0 @@

View file

@ -1 +0,0 @@

View file

@ -415,4 +415,4 @@
</script>
</body>
</html>
</html>

View file

@ -14,4 +14,4 @@ WORKDIR /app
COPY --from=builder /main .
ENTRYPOINT ["/app/main"]
ENTRYPOINT ["/app/main"]