This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useContext } from 'react'; | |
import { createStore, createEffect, createEvent, sample, attach, combine, restore } from 'effector'; | |
import { spread, debug, not, and, empty, or } from 'patronum'; | |
import { createGate, useGate } from 'effector-react'; | |
import { | |
useLocation, | |
useNavigate, | |
matchPath, | |
generatePath, | |
RouteMatch, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { resolve } from 'path' | |
import sequence from 'run-sequence' | |
import dotenv from 'dotenv' | |
import sort from 'sort-stream' | |
/* Common */ | |
import gulp, { src, dest } from 'gulp' | |
import changed from 'gulp-changed' | |
import when from 'gulp-if' | |
import sourcemaps from 'gulp-sourcemaps' | |
import plumber from 'gulp-plumber' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class Semaphore { | |
private concurrency: number | |
private currentCount: number | |
private queue: (() => void)[] | |
constructor(concurrency: number) { | |
this.concurrency = concurrency | |
this.currentCount = 0 | |
this.queue = [] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pydicom | |
import os | |
def split_multiframe_dicom(input_file): | |
ds = pydicom.dcmread(input_file) | |
number_of_frames = int(ds.NumberOfFrames) | |
pixelArray = ds.pixel_array.squeeze() | |
for idx in range(number_of_frames): | |
file_meta = pydicom.dataset.FileMetaDataset() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { FC, createContext, useContext } from 'react'; | |
export function createModelFactory<T extends (...args: any[]) => any>(creator: T) { | |
type Model = ReturnType<typeof creator>; | |
type ModelProps = { model: Model }; | |
const Context = createContext<Model | null>(null); | |
function useModel() { | |
const model = useContext(Context); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"config": { | |
"specification": { | |
"languageCode": "ru-RU", | |
"audioEncoding": "MP3" | |
} | |
}, | |
"audio": { | |
"uri": "https://storage.yandexcloud.net/yarastqt-media/record.mp3" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SharedStore { | |
hydrate(ctx) { | |
this.data = ctx.data | |
} | |
} | |
const $sharedStore = new SharedStore() | |
class FeatureStore { | |
data = $sharedStore.data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { declare } from '@babel/helper-plugin-utils' | |
import { types as t } from '@babel/core' | |
import type { | |
ImportDeclaration, | |
TaggedTemplateExpression, | |
Program, | |
CallExpression, | |
} from '@babel/types' | |
import type { NodePath } from '@babel/core' |
NewerOlder