Skip to content

Instantly share code, notes, and snippets.

View AlexRogalskiy's full-sized avatar
🛰️
Work on stuff that matters

Alexander AlexRogalskiy

🛰️
Work on stuff that matters
View GitHub Profile
@ijokarumawak
ijokarumawak / Query timestamp only by hours.md
Created December 15, 2021 03:10
A runtime field example at query time.
GET blogs/_search
{
  "runtime_mappings": {
    "publish_hour": {
      "type": "long",
      "script": {
        "source": "emit(doc['publish_date'].value.hour)"
      }
 }
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 4.
,React,Angular
Performance,Virtual DOM allows us to update the changes without rewriting the entire HTML doc virtually. This renders updates much faster and ensures fast performance – no matter of the apps' size.,"Real DOM, instead of changing just the piece of data required, updates the entire tree structure of HTML tables until it reaches the needed data."
Data Binding,"One-way binding makes the code more stable, and also makes debugging an app build with React versus Angular app much easier. ",Angular uses both one- and two-way data binding: changing data impacts view and changing view triggers changes in data. It is simpler to work with and makes the framework more flexible.
Component Architecture,"With React, you build components that manage their own state and structure them together into more complex UIs. React is easier to grasp, but it requires multiple integrations like Redux to use it's potential fully.","Angular is a pure full-fledged framework which comes with many out-of-the-box features like Rx
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MachineLearningIsEasy
MachineLearningIsEasy / mlflow_tracking_example.ipynb
Created November 13, 2021 13:24
Mlflow tracking simple example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true">
<appender name="json" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.contrib.json.classic.JsonLayout">
<jsonFormatter
class="ch.qos.logback.contrib.jackson.JacksonJsonFormatter">
<prettyPrint>true</prettyPrint>
</jsonFormatter>
<timestampFormat>yyyy-MM-dd' 'HH:mm:ss.SSS</timestampFormat>
</layout>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback.contrib</groupId>
<artifactId>logback-json-classic</artifactId>
<version>${logback.json.version}</version>
</dependency>
<dependency>
from flask import request, Flask
import json
import pickle
app = Flask(__name__)
@app.route('/', methods=['GET', 'POST'])
def main_flask_function():
if request.method == 'GET':
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MachineLearningIsEasy
MachineLearningIsEasy / bert.ipynb
Created October 28, 2021 12:32
Using BERT in classification
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.