Skip to content

Instantly share code, notes, and snippets.

View itspacchu's full-sized avatar
🎵
NP: Pick a Universe (Tryhardninja) (2:15/3:23)

Prashant itspacchu

🎵
NP: Pick a Universe (Tryhardninja) (2:15/3:23)
View GitHub Profile
# %%
import numpy as np
# %%
p,q=list(),list()
p0,p1,q0,q1 = list(map(int,input('').split(' ')))
p.append(p0);p.append(p1);q.append(q0);q.append(q1)
i = int(input())
arealist = []
import numpy as np
def dft(x):
X = []
N = len(x)
for k in range(-N,N):
re = 0
im = 0
for n in range(0,N):
phi = (2*np.pi*k*n)/N
import bpy
import math
import numpy as np
import random
rawdata = ['978.1466642174169,416.0576927689958',
'1006.8180157843148,417.5706213803142',
'1036.7920721872522,416.6868738547563',
'1066.747012249827,416.38719890540835',
'1059.6128569614289,409.33416276234385',
function preload(){
imgjson = loadJSON('https://raw.githubusercontent.com/itspacchu/Javascript-projects/master/fourierCirclesRE/jsondata.json');
ref = loadImage('imgs/whoCouldItBeEh.png');
}
function setup() {
//img = loadImage('imgs/whoCouldItBeEh.png');
width = window.innerWidth;
height = window.innerHeight;
thecanvas = createCanvas(width, height);
// Made with Amplify Shader Editor
// Available at the Unity Asset Store - http://u3d.as/y3X
Shader "SubsurfaceTest"
{
Properties
{
[HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5
[HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1)
[ASEBegin]_MainColor("Main Color", Color) = (0.3921569,0.3921569,0.3921569,1)
_SpecularColor("Specular Color", Color) = (0.3921569,0.3921569,0.3921569,1)
@itspacchu
itspacchu / wutdisbutton.dart
Last active June 30, 2023 09:06
Made in FlutterFlow :O
import '../flutter_flow/flutter_flow_theme.dart';
import '../flutter_flow/flutter_flow_util.dart';
import '../flutter_flow/flutter_flow_widgets.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
class HomePageWidget extends StatefulWidget {
HomePageWidget({Key key}) : super(key: key);
@override
@itspacchu
itspacchu / image_distort.py
Created June 6, 2021 19:03
Distort image based on function
def distortImage(theImage,fxn):
theImage = np.asarray(theImage)
bc,gc,rc = theImage[:,:,0] , theImage[:,:,1] ,theImage[:,:,2]
dc = []
for imgChannel in bc,gc,rc:
dImg = np.zeros(imgChannel.shape)
Image.fromarray(dImg)
for i in range(theImage.shape[0]):
for j in range(theImage.shape[1]):
try:
@itspacchu
itspacchu / classthing.py
Created August 7, 2021 06:57
fetch classes
import discord
from discord.ext import commands
from datetime import datetime, time, timedelta
import asyncio
from livclaz import create_calender_event_and_return_values
from discord.ext.commands.core import command
intents = discord.Intents.default()
intents.members = True
@itspacchu
itspacchu / monsieurAdd.py
Created August 8, 2021 15:28
Monsieur Add function optimised to core asf
This file has been truncated, but you can view the full file.
def add(a:int,b:int):
if(a == 0 and b == 0):
return 0
elif(a == 0 and b == 1):
return 1
elif(a == 0 and b == 2):
return 2
elif(a == 0 and b == 3):
return 3
elif(a == 0 and b == 4):
@itspacchu
itspacchu / interpolated_walk.cs
Created October 24, 2021 06:54
Walking animation between two positions
IEnumerator Walk(Vector3 target, Transform tgt)
{
float t = 0;
Vector3 start = tgt.position;
while(t < 1)
{
LegMoving = true;
t += Time.deltaTime*LegMoveSpeed;
tgt.position = Vector3.Lerp(start, target, t) + Vector3.up * 1.3f*Mathf.Sin(t * Mathf.PI);