Skip to content

Instantly share code, notes, and snippets.

View mehedi-shafi's full-sized avatar
💭
Input array too big

Mehedi Shafi mehedi-shafi

💭
Input array too big
  • Berlin, Germany
  • 08:27 (UTC +02:00)
View GitHub Profile
@mehedi-shafi
mehedi-shafi / a.csv
Created April 15, 2022 13:43
DF merging
a b c d e
x y 0 1 0.99
x y 1 1 0.43
x z 0 0 0.90
y z 0 1 0.11
x z 0 1 0.78
import pygame
import sys
import random
import time
display_size = (720, 480)
snakehead = [360, 240]
snakebody = []
direction = 'RIGHT'
food = [random.randrange(1, display_size[0]//10) * 10, random.randrange(1, display_size[1]//10-20)*10]
@mehedi-shafi
mehedi-shafi / crawler.py
Last active July 12, 2019 16:20
webscraping blog
import scrapper
import sys
from datetime import datetime, timedelta
def startCrawling(date1, date2):
print("Crawling started for date range ",
date1.strftime('%d-%m-%Y'), ' to ',
date2.strftime('%d-%m-%Y'))
if date1 > date2:
temp = date1
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mehedi-shafi
mehedi-shafi / average.py
Created November 1, 2018 18:09
AI_FALL_2018_Class Script: Average.
# function to calculate average of 3 variables
def avg(a, b, c):
return (a+b+c)/3
t = int(input()) # type casting is not necessary but making sure is always good.
data = [] # to store all the data
for i in range(t): # loop through 0 to t-1
x = str(input()) # Taking each row input
x = x.split(' ') # splitting the input string into list of separated items.
data.append(x) # adding new informations to global data list
@mehedi-shafi
mehedi-shafi / decistion.py
Created October 6, 2018 17:12
decision tree using iris dataset
import sklearn.datasets as datasets
import pandas as pd
from sklearn.externals.six import StringIO
from IPython.display import Image
from sklearn.tree import export_graphviz
import pydotplus
iris=datasets.load_iris()
df=pd.DataFrame(iris.data, columns=iris.feature_names)
@mehedi-shafi
mehedi-shafi / Main.java
Created October 6, 2018 15:04
NGPC PC Test Codes
public class Main{
public static void main (String [] args){
System.out.println("3. Java run: OK");
}
}
@mehedi-shafi
mehedi-shafi / aaaa.txt
Created March 25, 2018 08:28
AI Lab 06 File
AI LAB 06
@mehedi-shafi
mehedi-shafi / aaa.txt
Created March 18, 2018 08:28
AI LAB 5 files
AI Lab 5
@mehedi-shafi
mehedi-shafi / Homework.txt
Last active February 16, 2018 06:28
Class 04 C-khoon Senior Spring 2018
* Take a number N input (1000 <= N <= 1000000) print all the armstrong number from 1 to N. (Or print the count).
* Complete the binery search code.
* Solve the problems in the note of the group