Skip to content

Instantly share code, notes, and snippets.

View meftaul's full-sized avatar
🎯
Focusing

Md. Meftaul Haque Mishu meftaul

🎯
Focusing
View GitHub Profile
import sys
def get_score(category, max_score, options):
print(f"\n{category} ({max_score} points)")
for score, description in options.items():
print(f"{score} – {description}")
while True:
try:
score = int(input("Enter score: "))
if score in options:
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 33 columns, instead of 32 in line 1.
"id","diagnosis","radius_mean","texture_mean","perimeter_mean","area_mean","smoothness_mean","compactness_mean","concavity_mean","concave points_mean","symmetry_mean","fractal_dimension_mean","radius_se","texture_se","perimeter_se","area_se","smoothness_se","compactness_se","concavity_se","concave points_se","symmetry_se","fractal_dimension_se","radius_worst","texture_worst","perimeter_worst","area_worst","smoothness_worst","compactness_worst","concavity_worst","concave points_worst","symmetry_worst","fractal_dimension_worst",
842302,M,17.99,10.38,122.8,1001,0.1184,0.2776,0.3001,0.1471,0.2419,0.07871,1.095,0.9053,8.589,153.4,0.006399,0.04904,0.05373,0.01587,0.03003,0.006193,25.38,17.33,184.6,2019,0.1622,0.6656,0.7119,0.2654,0.4601,0.1189
842517,M,20.57,17.77,132.9,1326,0.08474,0.07864,0.0869,0.07017,0.1812,0.05667,0.5435,0.7339,3.398,74.08,0.005225,0.01308,0.0186,0.0134,0.01389,0.003532,24.99,23.41,158.8,1956,0.1238,0.1866,0.2416,0.186,0.275,0.08902
84300903,M,19.69,21.25,130,1203,0.1096,0.1599,0.1974,0.1279,
cement blast_furnace_slag fly_ash water superplasticizer coarse_aggregate fine_aggregate age concrete_compressive_strength
540.0 0.0 0.0 162.0 2.5 1040.0 676.0 28 79.99
540.0 0.0 0.0 162.0 2.5 1055.0 676.0 28 61.89
332.5 142.5 0.0 228.0 0.0 932.0 594.0 270 40.27
332.5 142.5 0.0 228.0 0.0 932.0 594.0 365 41.05
198.6 132.4 0.0 192.0 0.0 978.4 825.5 360 44.30
266.0 114.0 0.0 228.0 0.0 932.0 670.0 90 47.03
380.0 95.0 0.0 228.0 0.0 932.0 594.0 365 43.70
380.0 95.0 0.0 228.0 0.0 932.0 594.0 28 36.45
266.0 114.0 0.0 228.0 0.0 932.0 670.0 28 45.85
fixed acidity volatile acidity citric acid residual sugar chlorides free sulfur dioxide total sulfur dioxide density pH sulphates alcohol quality
7.4 0.7 0.0 1.9 0.076 11.0 34.0 0.9978 3.51 0.56 9.4 5
7.8 0.88 0.0 2.6 0.098 25.0 67.0 0.9968 3.2 0.68 9.8 5
7.8 0.76 0.04 2.3 0.092 15.0 54.0 0.997 3.26 0.65 9.8 5
11.2 0.28 0.56 1.9 0.075 17.0 60.0 0.998 3.16 0.58 9.8 6
7.4 0.7 0.0 1.9 0.076 11.0 34.0 0.9978 3.51 0.56 9.4 5
7.4 0.66 0.0 1.8 0.075 13.0 40.0 0.9978 3.51 0.56 9.4 5
7.9 0.6 0.06 1.6 0.069 15.0 59.0 0.9964 3.3 0.46 9.4 5
7.3 0.65 0.0 1.2 0.065 15.0 21.0 0.9946 3.39 0.47 10.0 7
7.8 0.58 0.02 2.0 0.073 9.0 18.0 0.9968 3.36 0.57 9.5 7
Age EstimatedSalary Purchased
19 19000 0
35 20000 0
26 43000 0
27 57000 0
19 76000 0
27 58000 0
27 84000 0
32 150000 1
25 33000 0
@meftaul
meftaul / jpa-cheatsheet.java
Created March 22, 2023 04:40 — forked from jahe/jpa-cheatsheet.java
JPA Cheatsheet
/*
JPA (Java Persistence API)
Transaction Management with an Entity-Mananger:
---
entityManager.getTransaction().begin();
entityManager.persist(<some-entity>);
entityManager.getTransaction().commit();
entityManager.clear();
@meftaul
meftaul / installJdkTarGzUbuntu.sh
Created February 12, 2023 08:04 — forked from filipelenfers/installJdkTarGzUbuntu.sh
Install JDK from tar.gz Ubuntu
#Login as root
sudo su
#create jdk directory
mkdir /opt/jdk
#uncompress, change to your file name
tar -zxf jdk-8u5-linux-x64.tar.gz -C /opt/jdk
#check if files are there
Date Avila Adobe Firehouse Museum Chinese American Museum America Tropical Interpretive Center
2014-01-01 24778 4486 1581 6602
2014-02-01 18976 4172 1785 5029
2014-03-01 25231 7082 3229 8129
2014-04-01 26989 6756 2129 2824
2014-05-01 36883 10858 3676 10694
2014-06-01 29487 5751 2121 11036
2014-07-01 32378 5406 2239 13490
2014-08-01 37680 8619 1769 9139
2014-09-01 28473 61192 1073 5661
"player-view": {
"search": {
"title": "Search For Player",
"choose-a-date": "Choose a Date",
"search": "Search",
"reset": "Reset",
"compact-view": "Compact View"
},
"player": {
"now-at": "Now At",
@meftaul
meftaul / rssspider.py
Created August 4, 2020 01:55 — forked from nyov/rssspider.py
Scrapy RSSSpider using feedparser
# -*- coding: utf-8 -*-
import logging
import scrapy
import feedparser
class RSSSpider(scrapy.Spider):
name = "rss"
# Can pass some URLs on the commandline: