Skip to content

Instantly share code, notes, and snippets.

View alinasrullayev's full-sized avatar
:octocat:

Ali Nasrullayev alinasrullayev

:octocat:
  • Azeribaijan/Baku
View GitHub Profile
@alinasrullayev
alinasrullayev / battery.cs
Created April 24, 2023 09:20 — forked from ahawker/battery.cs
Battery info from win32 api
View battery.cs
using System;
using System.IO;
using Microsoft.Win32.SafeHandles;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Text;
namespace Test
{
@alinasrullayev
alinasrullayev / download_from_minio.sh
Created April 19, 2023 06:23 — forked from JustinTimperio/download_from_minio.sh
Download a File to Minio with Curl and Zero External Libraries or Programs
View download_from_minio.sh
#!/usr/bin/env sh
# Example: ./download_minio.sh example.url.com username password bucket-name minio/path/to/file.txt.zst /download/path/to/file.txt.zst
if [ -z $1 ]; then
echo "You have NOT specified a MINIO URL!"
exit 1
fi
if [ -z $2 ]; then
@alinasrullayev
alinasrullayev / README.md
Created April 16, 2023 07:19 — forked from florimondmanca/README.md
HTTPX vs aiohttp (over HTTPS)
View README.md

Usage

  • Generate TLS certificates for localhost:
pip install trustme-cli
trustme-cli
  • Run wrk on each endpoint, eg:
@alinasrullayev
alinasrullayev / python-k8s-scheduler.py
Created April 14, 2023 10:34 — forked from alicek106/python-k8s-scheduler.py
Simple python scheduler for kubernetes
View python-k8s-scheduler.py
import random
import json
from kubernetes import client, config, watch
# 이 스케줄러가 담당할 스케줄러 이름을 지정합니다.
scheduler_name = "my-custom-scheduler"
# 이 스케줄러가 스케줄링할 포드의 네임스페이스를 지정합니다. 필요에 따라 전역적으로 사용할 수도 있습니다.
namespace_name = "default"
View configmap.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: test
spec:
replicas: 1
template:
metadata:
creationTimestamp: null
@alinasrullayev
alinasrullayev / nginx-minio-static.md
Created September 17, 2022 10:48 — forked from harshavardhana/nginx-minio-static.md
How to configure static website using Nginx with MinIO ?
View ActionDefaultAskAffirmation.py
from rasa_core_sdk import Action
import csv
class ActionDefaultAskAffirmation(Action):
"""Asks for an affirmation of the intent if NLU threshold is not met."""
def name(self):
return "action_default_ask_affirmation"
@alinasrullayev
alinasrullayev / inspections.txt
Created September 1, 2022 11:29 — forked from pylover/inspections.txt
PyCharm inspections
View inspections.txt
# Extracted using: $ unzip -p lib/pycharm.jar com/jetbrains/python/PyBundle.properties | grep -B1 INSP.NAME | grep '^#' | sed 's|Inspection||g' | sed -e 's|#\s\{,1\}|# noinspection |'
# noinspection PyPep8
# noinspection PyPep8Naming
# noinspection PyTypeChecker
# noinspection PyAbstractClass
# noinspection PyArgumentEqualDefault
# noinspection PyArgumentList
# noinspection PyAssignmentToLoopOrWithParameter
# noinspection PyAttributeOutsideInit
@alinasrullayev
alinasrullayev / validate_tfrecords.py
Created August 13, 2022 16:40 — forked from ed-alertedh/validate_tfrecords.py
Utility functions to check for corruption in tfrecord files
View validate_tfrecords.py
import tensorflow as tf
def validate_dataset(filenames, reader_opts=None):
"""
Attempt to iterate over every record in the supplied iterable of TFRecord filenames
:param filenames: iterable of filenames to read
:param reader_opts: (optional) tf.python_io.TFRecordOptions to use when constructing the record iterator
"""
i = 0
View g_series_5.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.