Skip to content

Instantly share code, notes, and snippets.

View zmitry's full-sized avatar
🎯
Focusing

Dmitry Zherebko zmitry

🎯
Focusing
  • Ukraine
View GitHub Profile
{
"components": {
"requestBodies": {
"aggs.AggregationsRequest": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/aggs.AggregationsRequest"
}
}
/* Copyright 2020 Jordan Egstad
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A P ARTICULAR PURPOSE. See the
import pygal
import pandas as pd
import csv
result = []
with open('./log.csv', 'r', newline='') as csvfile:
reader = csv.DictReader(csvfile)
for row in reader:
record = {
import React, { CSSProperties, forwardRef } from "react";
import { ForwardRefComponent } from "@radix-ui/react-polymorphic";
import { css } from "libs/css";
const ZStackStyles = css({
"display": "grid",
"justifyItems": "center",
"placeItems": "center",
"width": "fit-content",
"> *": {
import React, { forwardRef } from "react";
import { Box as Div, PolymorphicComponentProps } from "react-polymorphic-box";
import { css } from "libs/css";
const VStackStyles = css`
display: flex;
flex-direction: column;
& > *:only-child {
height: 100%;
}
function computeSize(
width: number,
{
sizes,
bounded,
gap,
}: {
fitOnlyFull?: boolean;
gap: number;
import { makeRemoteExecutor } from '../lib/stiching/makeRemoteExecutor';
import { FastifyInstance } from 'fastify';
import fs from 'fs';
import { LoginInput, RegisterInput } from 'gen/resolvers.types';
import mercurius, { IResolvers } from 'mercurius';
import { AuthService } from 'services/auth/auth.service';
import { addMocksToSchema } from '@graphql-tools/mock';
import { stitchSchemas } from '@graphql-tools/stitch';
import { buildSchema } from 'graphql';
import { appConfig } from '../config';
type errorHandler func(http.ResponseWriter, *http.Request) error
// rootHandler implements http.Handler interface.
func (fn errorHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
err := fn(w, r) // Call handler function
if err == nil {
return
}
// This is where our error handling logic starts.
import React, { useRef, useMemo, Suspense } from "react";
import { last } from "lodash";
import { stringify } from "./url";
import { Trie, dfs } from "./trie";
function stringifyQueryHash(hash) {
return "?" + stringify(hash);
}
function isUpperCase(str) {
function List({ items, total, actionIcon, onClick }: ListProps) {
return (
<Stack fullWidth as={Box}>
{items.map(({ key, data }) => (
<ListItem key={key} onClick={() => onClick(key)}>
<ListItemText primary={data?.label || key} />
{actionIcon && (
<Box visibility="hidden" touchParent={{ visibility: "visible" }}>
{actionIcon}
</Box>