Skip to content

Instantly share code, notes, and snippets.

View 10dimensions's full-sized avatar
🎯
Focusing

10dimensions

🎯
Focusing
  • Bangalore, India
View GitHub Profile
@10dimensions
10dimensions / html5-webcam-demo-with-getusermedia.markdown
Created June 7, 2019 13:31
HTML5 webcam demo with getUserMedia()
var express = require('express');
var bodyParser = require('body-parser');
var app = express();
// --> 7) Mount the Logger middleware here
app.use(express.static(__dirname + "/public"));
@10dimensions
10dimensions / array.py
Created October 3, 2019 06:25 — forked from PulkitS01/array.py
Introduction to PyTorch
# initializing two arrays
a = np.array(2)
b = np.array(1)
print(a,b)
import hashlib
import time
class Block:
def __init__(self, index, proof_no, prev_hash, data, timestamp=None):
self.index = index
self.proof_no = proof_no
self.prev_hash = prev_hash
/*
********************* Node.js Static Site Serving *********//
project/
server/
server.js
dispatcher.js
www/
index.html
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.IO.Ports;
using System;
using System.Threading;
public class SerialPortComm : MonoBehaviour
{
public static SerialPortComm Instance;
/*
* @author vishal / https://github.com/10dimensions
* @author zz85 / https://github.com/zz85
* @author mrdoob / http://mrdoob.com
* Running this will allow you to drag three.js objects around the screen.
*/
import {
Camera,
EventDispatcher,
@10dimensions
10dimensions / fill_depth_colorization.py
Created January 5, 2021 15:20 — forked from ialhashim/fill_depth_colorization.py
Python implementation of depth filling from NYU Depth v2 toolbox
# Original Matlab code https://cs.nyu.edu/~silberman/datasets/nyu_depth_v2.html
#
#
# Python port of depth filling code from NYU toolbox
# Speed needs to be improved
#
# Uses 'pypardiso' solver
#
import scipy
import skimage
@10dimensions
10dimensions / aws-amplify-configure.js
Created July 10, 2021 14:57 — forked from praveen001/aws-amplify-configure.js
Passwordless Phone number authentication using AWS Amplify and Cognito
import Amplify, { Auth } from 'aws-amplify';
Amplify.configure({
Auth: {
region: 'us-east-1',
userPoolId: '**********',
userPoolWebClientId: '******************',
}
});
@10dimensions
10dimensions / Nft_mint_airdrop.sol
Created February 10, 2022 14:36
mint and airdrop ERC721 tokens
//Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/release-v4.4/contracts/token/ERC721/ERC721Upgradeable.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/release-v4.4/contracts/utils/CountersUpgradeable.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/release-v4.4/contracts/access/OwnableUpgradeable.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/release-v4.4/contracts/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/release-v4.4/contracts/proxy/utils/Initializable.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/release-v4.4/contracts/utils/ContextUpgradeable.sol";