Skip to content

Instantly share code, notes, and snippets.

View avin-kavish's full-sized avatar
💡
Building

Avin avin-kavish

💡
Building
View GitHub Profile
@avin-kavish
avin-kavish / timescale--db--backend--base.py
Created April 14, 2025 07:11 — forked from dedsm/timescale--db--backend--base.py
WeRiot Django Timescale integration
import logging
from django.contrib.gis.db.backends.postgis.base import \
DatabaseWrapper as PostgisDBWrapper
from django.db import ProgrammingError
from .schema import TimescaleSchemaEditor
logger = logging.getLogger(__name__)
interface GitProvider {
download(): Code
}
class ProviderBase {
endpoint: string
}
class GitHubProvider extends ProviderBase implements GitProvider {
download() {}
import { immerable, produce } from 'immer'
type POJO<T> = {
[K in keyof T]: T[K]
}
class Car {
[immerable] = true
velocity = 0
@avin-kavish
avin-kavish / app.jsx
Created March 30, 2020 10:58
Overmind Basic Application
import React from "react"
import { createOvermind } from "overmind"
import { createHook, Provider } from "overmind-react"
const app = createOvermind({
state: {
counter: 0
},
actions: {
increment({ state }) {
const incrementCounter = () => {
type: 'INCREMENT',
}
const initialState = {
counter: 0
}
function reducer(state = initialState, action = {}) {
switch(action.type) {