Skip to content

Instantly share code, notes, and snippets.

View Kenan7's full-sized avatar

Mirkenan Kazımzade Kenan7

View GitHub Profile
��#}�(�metadata�}�(�title�� Test (Energy Performance Report)�� workspace��Test��source��DEADBEEF�� cur_start��datetime��datetime���C
� ���R��cur_end�h C
� ���R��
created_at�� mock.mock��_ANY���)��� ref_start�J3�gb�ref_end�h C
�
97���R�u�summary�}�� active_energy�}�(� consumption�}�(�v��numpy.core.multiarray��scalar����numpy��dtype����f8�����R�(K�<�NNNJ����J����Kt�bC33333�F@���R��units��kWh��percent_change��0 %�� trend_arrow��!TODO_trend_arrow_calculation_here��other��Price per kWh: 0.5 EUR�u�
total_cost�}�(h$h'h-C33333�6@���R�h3�EUR�h5h6h7h8h9�Price per kWh: 0.5 EUR�u� footprint�}�(h$h'h-CX9���-@���R�h3�
tones CO2e�h5h6h7h8h9�Conversion factor k = 0.33�uus� voltage_max�}�(�V1r�}�(h$h'h*�i8�����R�(Kh.NNNJ����J����Kt�bC����R��t�GAؙ�?�u�V2r�}�(h$h'hOC����R�hTGAؙ�?u�V3r�}�(h$h'hOC����R�hTGAؙ�?�u�unit��V�u� voltage_min�}�(hK}�(h$h'hOC����R�hTGAؙ�>�uhU}�(h$h'hOC����R�hTGAؙ�>�uhZ}�(h$h'hOC�
@Kenan7
Kenan7 / index.html
Created November 20, 2021 11:06
Modern Blog Layout with CSS Grid
<div class="blog">
<div class="blog-part is-menu">
<a href="#" class="blog-menu">
Work
<svg fill="none" stroke="currentColor" stroke-width=".7" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-right" viewBox="0 0 24 24">
<path d="M7 17L17 7M7 7h10v10" />
</svg>
</a>
<a href="#" class="blog-menu">Studio</a>
<a href="#" class="blog-menu">Blog</a>
@Kenan7
Kenan7 / .aliases
Last active October 25, 2021 12:14
Little tools and aliases
function find-and-kill() {
# find the process id given port number
# $1 is the port number
# get the process id
pid=$(sudo lsof -i :$1 -t)
echo "Killing process id -> $pid"
sudo kill -9 $pid
echo "Done ✔️"
}
@Kenan7
Kenan7 / cbar.py
Last active April 26, 2022 20:16
Get currency from CBAR
import xml.etree.ElementTree as ET
from datetime import date
import requests
from logzero import logger
'''
value = CurrencyCbar().get_one_try()
'''
@Kenan7
Kenan7 / client.py
Last active June 24, 2020 15:55
XML-RPC Python server-client example
import xmlrpc.client
with xmlrpc.client.ServerProxy("http://localhost:5080/") as proxy:
print("sum of 1 and 1 is: %s" % str(proxy.add(1, 1)))
print("subtraction of 2 from 5 is: %s" % str(proxy.sub(5, 2)))
@Kenan7
Kenan7 / Dockerfile
Last active June 2, 2020 12:38
Docker-compose, nginx Dockerfile, django Dockerfile
# backend dockerfile
FROM python:3.8.0-alpine
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
RUN mkdir /app
WORKDIR /app
# install psycopg2 dependencies