Skip to content

Instantly share code, notes, and snippets.

View chkoar's full-sized avatar
💭
I may be slow to respond.

Christos Aridas chkoar

💭
I may be slow to respond.
  • localhost
View GitHub Profile
@chkoar
chkoar / _.py
Last active February 19, 2022 19:19
Target formatter for Prefect
from dask.base import tokenize
class TargetFormatter:
def __init__(self, *args):
self.args = args
def __call__(self, **kwargs):
args = self.args + ("task_name",)
ret = [kwargs.get(x) for x in args]
return tokenize(ret)
@chkoar
chkoar / rxbus.py
Created December 7, 2020 14:57
A lightweighted message bus based on Reactive Extensions for Python (rxpy)
import rx
from rx import operators as ops
from rx.subject import Subject
class MessageBus:
def __init__(self, scheduler=None):
self.subject = Subject()
self.scheduler = scheduler
@chkoar
chkoar / _.html
Last active November 8, 2020 01:51
create crawiling/scrollable text in html ucing css only
<!DOCTYPE html>
<title>Example</title>
<!-- Styles -->
<style>
.crawling {
height: 50px;
overflow: hidden;
position: relative;
}
@chkoar
chkoar / haralick_extractor.py
Last active May 13, 2020 11:58
scikit-learn compatible transformer that extracts haralick features from a given collection of images
import joblib
from mahotas import features
from sklearn.base import TransformerMixin, BaseEstimator
class HaralickExtractor(BaseEstimator, TransformerMixin):
def __init__(self, n_jobs=1):
self.n_jobs = n_jobs
def fit(self, X, y=None):
@chkoar
chkoar / sonarqube-docker-compose.yml
Created May 8, 2020 13:07 — forked from Warchant/sonarqube-docker-compose.yml
docker-compose file to setup production-ready sonarqube
version: "3"
services:
sonarqube:
image: sonarqube
expose:
- 9000
ports:
- "127.0.0.1:9000:9000"
networks:
@chkoar
chkoar / gitlab-runner.bat
Created March 13, 2020 19:24
Gitlab Runner in Windows boxes using docker
docker run --rm -t -i -v C:\Temp\volumes\gitlab-runner\config:/etc/gitlab-runner gitlab/gitlab-runner register
docker run -d --name gitlab-runner --restart always -v C:\Temp\volumes\gitlab-runner\config:/etc/gitlab-runner -v //var/run/docker.sock:/var/run/docker.sock gitlab/gitlab-runner:latest
@chkoar
chkoar / _.md
Last active December 4, 2019 11:04 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@chkoar
chkoar / _.py
Created September 10, 2019 08:36
Get the methods of an object
import inspect
class MySuperObject(object):
def __init__(self):
self.a = 1
self.b = 2
def compute(self):
print("Foo")
@chkoar
chkoar / readme.md
Created September 10, 2019 08:34
Handcrafted features for computer vision

SIFT GLOH Spin Image HoG Textons RIFT

@chkoar
chkoar / get_windows_key.vbs
Created July 22, 2019 13:10
Get your original Windows 10 product key
Option Explicit
Dim objshell,path,DigitalID, Result
Set objshell = CreateObject("WScript.Shell")
'Set registry key path
Path = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\"
'Registry key value
DigitalID = objshell.RegRead(Path & "DigitalProductId")
Dim ProductName,ProductID,ProductKey,ProductData
'Get ProductName, ProductID, ProductKey
ProductName = "Product Name: " & objshell.RegRead(Path & "ProductName")