Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Vinit Kumar vinitkumar

🎯
Focusing
View GitHub Profile
View temp.py
def convert_none(
key: str, val: None, attr_type: bool, attr: Dict[str, Any] = {}, cdata: bool = False
) -> str:
"""Converts a null value into an XML element"""
LOG.info(f'Inside convert_none(): key="{str(key)}" val={type(val)}')
key, attr = make_valid_xml_name(key, attr)
if attr_type:
attr["type"] = get_xml_type(val)
attrstring = make_attrstring(attr)
View error.log
ber/libdecnumber.a
[gcc/build] clang: warning: argument unused during compilation: '-no-pie' [-Wunused-command-line-argument]
[gcc/build] clang: warning: argument unused during compilation: '-no-pie' [-Wunused-command-line-argument]
[gcc/build] Undefined symbols for architecture arm64:
[gcc/build] "_ZSTD_compress", referenced from:
[gcc/build] Undefined symbols for architecture arm64:
[gcc/build] "_ZSTD_compress", referenced from:
[gcc/build] lto_end_compression(lto_compression_stream*) in libbackend.a(lto-compress.o)
[gcc/build] lto_end_compression(lto_compression_stream*) in libbackend.a(lto-compress.o)
[gcc/build] "_ZSTD_compressBound", referenced from:
View fzf-native-compile-crash.log
mkdir -p build
cc -O3 -Wall -Werror -fpic -std=gnu99 -shared src/fzf.c -o build/libfzf.so
In file included from src/fzf.c:5:
/usr/local/include/stdlib.h:134:25: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
double atof(const char *);
^
/usr/local/include/stdlib.h:134:25: note: insert '_Nullable' if the pointer may be null
double atof(const char *);
^
_Nullable
@vinitkumar
vinitkumar / aws-lambda-static-type-checker.md
Created Sep 20, 2021 — forked from alexcasalboni/aws-lambda-static-type-checker.md
AWS Lambda Static Type Checker Example (Python3)
View aws-lambda-static-type-checker.md

How to use Python3 Type Hints in AWS Lambda

TL;DR

Static Type Checkers help you find simple (but subtle) bugs in your Python code. Check out lambda_types.py and incrementally improve your code base and development/debugging experience with type hints.

Your Lambda Function code will go from this:

View gist:dd010ee9f83b457f7f1648a0387af134
" antirez's .vimrc
" Copyright(C) 2001 Salvatore Sanfilippo
" Enable the syntax highlight mode if available
syntax sync fromstart
if has("syntax")
syntax sync fromstart
syntax on
set background=dark
let php_sync_method="0"
View keybase.md

Keybase proof

I hereby claim:

  • I am vinitkumar on github.
  • I am vinitkme (https://keybase.io/vinitkme) on keybase.
  • I have a public key ASCMqfaVb6CdQcTxrz_cncGkL3VAjRbboGonVQftK8EraAo

To claim this, I am signing this object:

View list.py
import json
import subprocess
import pprint
"""
The goal of this task is to modify the web workers to 2 and timeout to
something like 30 seconds, so that the worker do not cross memory limit
settings['DJANGO_WEB_WORKERS'] = env('DJANGO_WEB_WORKERS', 3)
View loadimags.js
getImages(URL) {
let allURLS = []
return fetch(URL)
.then((response) => { return response.json(); })
.then((json) => {
allURLS.push(json.results);
let newPhotoList = [...this.state.photoList, ...json.results]
this.setState({photoList: newPhotoList})
const nextURL = json.next;
if (!nextURL) {
View mainscript.py
image_sorted_list = ['Aggressive.jpg', 'Agonized.jpg', 'Agreeable.jpg', 'Annoyed.jpg', 'Anxious.jpg', 'Apologetic.jpg', 'Arrogant.jpg', 'Bashful.jpg', 'Been.jpg', 'Behind.jpg', 'Birthday.jpg', 'Bitter.jpg', 'Blissful.jpg', 'Brave.jpg', 'Capable.jpg', 'Caring.jpg', 'Cautious.jpg', 'Cheerful.jpg', 'Christmas.jpg', 'Clumsy.jpg', 'Concentrating.jpg', 'Confident.jpg', 'Confused.jpg', 'Cooperative.jpg', 'Courage.jpg', 'Creative.jpg', 'Crooked.jpg', 'Curious.jpg', 'Curly.jpg', 'Demure.jpg', 'Depressed.jpg', 'Design.jpg', 'Determined.jpg', 'Disappointed.jpg', 'Disapproving.jpg', 'Disbelieving.jpg', 'Distasteful.jpg', 'Dream.jpg', 'Eavesdropping.jpg', 'Ecstatic.jpg', 'Embarrassed.jpg', 'Enjoying.jpg', 'Enraged.jpg', 'Envious.jpg', 'Excited.jpg', 'Exhausted.jpg', 'Fantastic.jpg', 'Fearful.jpg', 'Free.jpg', 'Friendly.jpg', 'Frightened.jpg', 'Frustrated.jpg', 'Generous.jpg', 'Gentle.jpg', 'Gloomy.jpg', 'Gratitude.jpg', 'Grieving.jpg', 'Guilty.jpg', 'Hairy.jpg', 'Horrified.jpg', 'Hungover.jpg', 'Hurt.jpg', 'Hysterical.jpg