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
'''Convert the same into a function | |
freq step value changed to 0.01 instead of 0.001 | |
''' | |
import scipy.stats as stats | |
import datetime as dt | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from numpy import pi, sqrt as isqrt, cos, sin | |
import random | |
import time |
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
#include<reg52.h> | |
#define display_port P1 //Data pins connected to port 2 on microcontroller | |
sbit rs = P2^0; //RS pin connected to pin 0 of port 2 | |
sbit rw = P2^1; // RW pin connected to pin 1 of port 2 | |
sbit e = P2^2; //E pin connected to pin 2 of port 2 | |
int k; | |
int i; | |
unsigned char str[26]; | |
unsigned char text_mode[9]="AT+CMGF=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
//SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.19; | |
contract AllorNothing { | |
address public owner; | |
mapping (address => uint256) public balances; | |
event Deposit(address indexed depositor, uint256 amount); | |
event Withdraw(address indexed withdrawer, uint256 amount); | |
error ZeroBalance(); | |
constructor() { |
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 matplotlib.pyplot as plt | |
import concurrent.futures | |
import scipy.stats as stats | |
import datetime as dt | |
import time | |
import numpy as np | |
from numpy import cos, sin, sqrt as isqrt, pi | |
def calc_MA(da, kzA, pA, array_length=10): |
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
// This is your Prisma schema file, | |
// learn more about it in the docs: https://pris.ly/d/prisma-schema | |
generator client { | |
provider = "prisma-client-js" | |
} | |
datasource db { | |
provider = "postgresql" | |
url = env("DATABASE_URL") |
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
from datetime import datetime | |
from firebase_admin import db, storage, credentials, initialize_app | |
from flask import Flask, request | |
# Import the constant from constants.py | |
server = Flask(__name__) | |
cread_obj = credentials.Certificate("./credentials.json") | |
firebaseApp = initialize_app(cread_obj, { | |
"databaseURL": "https://python-248f7-default-rtdb.firebaseio.com/" |
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
:set number | |
:set autoindent | |
:set mouse=a | |
:set smarttab | |
:set tabstop=4 | |
:set clipboard=unnamedplus | |
call plug#begin('~/.config/nvim/plugged') |
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
const parseStringToHTML = (input: string) => { | |
const elements = []; | |
let tempStr: any = ""; | |
let isBold = false; | |
const pushElement = (content: any, type: string) => { | |
if (content) { | |
if (type === "p") { | |
elements.push(<p key={elements.length} className="pt-2">{content}</p>); | |
} else if (type === "li") { |