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 smartpy as sp | |
class SpectrumColors(sp.Contract): | |
def __init__(self): | |
self.init( | |
# fixed dimensions of the board | |
columns = 16, | |
rows = 16, | |
# limit to the total number of colors possible | |
max_colors = 12, |
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
// Dependencies : | |
// npm i download jsdom walk replaceall | |
const path = require('path') | |
const fsp = require('fs/promises') | |
const download = require('download') | |
const walk = require('walk') | |
const replaceAll = require("replaceall"); | |
const { JSDOM } = require('jsdom') |
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
// Dependencies : | |
// npm i download jsdom walk replaceall | |
const path = require('path') | |
const fsp = require('fs').promises | |
const download = require('download') | |
const walk = require('walk') | |
const replaceAll = require("replaceall"); | |
const { JSDOM } = require('jsdom') |
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 Image, { ImageProps } from 'next/image'; | |
import { imageBuilder } from './sanity'; | |
import type { SanityImageSource } from '@sanity/image-url/lib/types/types'; | |
interface MyImageProps extends Omit<ImageProps, 'src'> { | |
src: SanityImageSource; | |
quality?: number; | |
blur?: number; | |
} |
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
$easeLinear: cubic-bezier(0, 0, 1, 1); | |
$easeSineInOut: cubic-bezier(0.37, 0, 0.63, 1); | |
$easeSineIn: cubic-bezier(0.12, 0, 0.39, 0); | |
$easeSineOut: cubic-bezier(0.61, 1, 0.88, 1); | |
$easeQuadraticInOut: cubic-bezier(0.45, 0, 0.55, 1); | |
$easeQuadraticIn: cubic-bezier(0.11, 0, 0.5, 0); | |
$easeQuadraticOut: cubic-bezier(0.5, 1, 0.89, 1); | |
$easeCubicInOut: cubic-bezier(0.65, 0, 0.35, 1); | |
$easeCubicIn: cubic-bezier(0.32, 0, 0.67, 0); | |
$easeCubicOut: cubic-bezier(0.33, 1, 0.68, 1); |
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
// Created by @kunofellasleep on 2019/05/20. | |
//Modules | |
const Diagnostics = require('Diagnostics'); | |
const Materials = require('Materials'); | |
const Textures = require('Textures'); | |
const CameraInfo = require('CameraInfo'); | |
const Shaders = require('Shaders'); | |
const R = require('Reactive'); |
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
# Note: You really should not use this. | |
# You can easily convert your app | |
# to use Quart by using async+await | |
# and then use loop.create_task(bot.start(...)) | |
# before using app.run. | |
from threading import Thread | |
from flask import Flask | |
from functools import partial | |
from discord.ext import commands |
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
// Adapted from @delucis | |
// https://github.com/delucis/pellicola/blob/735bd7487bdc597ac7272e4ddce9473c15f68d09/lib/frame-maker.js#L99-L134 | |
const canvasSketch = require('canvas-sketch'); | |
const settings = { | |
dimensions: [ 512, 512 ], | |
duration: 3, | |
animate: true, | |
fps: 24 |
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
<html> | |
<head> | |
<body onload="onLoad()"> | |
<div id="container"> | |
<div id="show-background">Show background as magenta<input id="show-background-toggle" type="checkbox" checked></div> | |
<canvas id="canvas" width=640px height=480px></canvas> | |
</div> | |
</body> | |
</head> | |
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/[email protected]"> </script> |
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 redis | |
import cv2 | |
import numpy as np | |
import time | |
import io | |
from PIL import Image | |
r = redis.StrictRedis.from_url('redis://:[email protected]:6379/1') | |
img_path ="image" |
NewerOlder