Skip to content

Instantly share code, notes, and snippets.

View abdullahmujahidali's full-sized avatar
:shipit:
I may be slow to respond.

Abdullah Mujahid abdullahmujahidali

:shipit:
I may be slow to respond.
View GitHub Profile
@abdullahmujahidali
abdullahmujahidali / .jsx
Created May 29, 2023 05:44
Snap Scroll Tailwind
<div class="snap-x overflow-x-auto whitespace-nowrap">
<div class="inline-block snap-center p-4">
<img src="https://images.unsplash.com/photo-1604999565976-8913ad2ddb7c?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=320&h=160&q=80" />
</div>
<div class="inline-block snap-center p-4">
<img src="https://images.unsplash.com/photo-1540206351-d6465b3ac5c1?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=320&h=160&q=80" />
</div>
<div class="inline-block snap-center p-4">
<img src="https://images.unsplash.com/photo-1622890806166-111d7f6c7c97?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=320&h=160&q=80" />
</div>
@abdullahmujahidali
abdullahmujahidali / README.txt
Created July 26, 2022 15:24
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
REMIX DEFAULT WORKSPACE
Remix default workspace is present when:
i. Remix loads for the very first time
ii. A new workspace is created
iii. There are no files existing in the File Explorer
This workspace contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
@abdullahmujahidali
abdullahmujahidali / scipy.m
Created April 23, 2020 20:52
scipy.integrate.odeint routine to solve the initial value probllem
import numpy as np
from math import pi,exp,cos
from scipy.integrate import odeint
import matplotlib.pyplot as plt
#defining the ode function dhdt
def dhdt(h,t):
h1 = h[0]; h2 = h[1]; h3 = h[2]
h1p = 2*h1 + h2 + 5*h3 + exp(-2*t) #h1'
h2p = -3*h1 -2*h2 -8*h3 + 2*exp(-2*t) - cos(3*t) #h2'
@abdullahmujahidali
abdullahmujahidali / randomWalk.py
Created April 23, 2020 20:50
Random Walk Function
import numpy as np
import random
import matplotlib.pyplot as plt
def randomWalk(L):
# S is a 2d array where x = row1= S[0][:], y = row2 = S[1][:]
S = np.zeros(shape=(2,L+1))
directions = [1,2,3,4]
@abdullahmujahidali
abdullahmujahidali / precip.cs
Created April 23, 2020 20:49
Console App serialization
**************************************************
using System;
namespace project05
{
public class precip
{
private string precipDate;
private string precipType;
@abdullahmujahidali
abdullahmujahidali / neighbourRime.py
Last active April 23, 2020 20:48
Write a function neighboursRime(...) that receives a list (with at least 3 strings(words), and returns the number of “riming contiguous words” in the list. (The last word in the list is considered to be contiguous to the first word in the list.)
def neighboursRime(words):
pairs=0 # pairs found
done=[] # list of words that are checked
counter=0 # index of the list
contiguous="" # contuguous words
# iterate the list
for word in words:
if not word in done:
# get the length of string