Friday, June 17, 2022

Python

 virtualenv -p /usr/bin/python3 venv

source venv/bin/activate

pip install -r requirements.txt

python3 python.py

 

requirements.txt

---

autopep8==1.6.0                                                                 
beautifulsoup4==4.10.0                                                          
bs4==0.0.1                                                                      
certifi==2021.10.8                                                              
charset-normalizer==2.0.11                                                      
click==8.0.3                                                                    
dataclasses==0.8                                                                
Flask==2.0.2                                                                    
idna==3.3                                                                       
importlib-metadata==4.8.3                                                       
itsdangerous==2.0.1                                                             
Jinja2==3.0.3                                                                   
joblib==1.1.0                                                                   
Levenshtein==0.17.0                                                             
MarkupSafe==2.0.1                                                               
numpy==1.19.5                                                                   
pycodestyle==2.8.0                                                              
PyYAML==6.0                                                                     
rapidfuzz==1.9.1                                                                
regex==2022.1.18                                                                
requests==2.27.1                                                                
scikit-learn==0.24.2                                                            
scipy==1.5.4                                                                    
soupsieve==2.3.1                                                                
threadpoolctl==3.1.0                                                            
toml==0.10.2                                                                    
typing_extensions==4.0.1                                                        
urllib3==1.26.8                                                                 
Werkzeug==2.0.2                                                                 
zipp==3.6.0 

Tuesday, April 19, 2022

GIT

How to generate diff from PR

 https://xxxx-git.yyyy.com/ppp/xxxx/pull/1323231/files

https://xxxx-git.yyyy.com/ppp/xxxx/pull/1323231.diff -- will generate diff

Thursday, March 3, 2022

Application development

Back-end:

datatabase: Snowflake, terradata, Mangodb, elastic db

Search engine: Elasticsearch is a search engine based on the Lucene library, Azure Search

 Presto (SQL query engine) -- big data query language which includes multiple sources

queries: sql,lucene

Visualization: grafana, kibana, power-bi

Data stream pipelines: Kafka, rabbitmq

 APIs:  

Flow will be top to bottom:
Grafana
|
{API}
|
Kafaka
  |
  Feed to database
  |
 Write to schema1 & schema2 (Elastic-database)

Sunday, February 6, 2022

LLVM

LLVM code snippet:

 call <2 x i64> @read128(<2 x i64>* %1) 

 at above code snippet we are mapping vector to api parameters to map it accordningly in c, we need to create datatype through attribute option as below:

typedef long long test_uint128_t __attribute__((__vector_size__(16), __aligned__(1)));

 

To list the passes an API main() in a  file hello.c goes through:

clang -c -mllvm -print-before-all -mllvm -print-after-all hello.c -mllvm -filter-print-funcs=main

 

Tell clang to emit debug info by adding the -g flag:

clang -Os -S -emit-llvm -g addition.c
 if you are interested where this line came from:

%cmp = icmp sgt i32 %x, 10, !dbg !21


You have to look for the debug entry !21:

!21 = !DILocation(line: 4, column: 9, scope: !22)

line 9 is source line numbe.

 

 

 

 

 

reference:

https://stackoverflow.com/questions/45142289/how-to-map-c-function-to-llvm-ir