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
@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
@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:
@meftaul
meftaul / business_card_parser.py
Last active September 19, 2019 04:47 — forked from dmod/README.md
Business Card Parser
## business_card_parser.py
#
# The following module contains the necessary functionality to parse and
# represent the output of an OCR Business Card Reader. Two classes are contained,
# one that will represent the model of the contact info parsed from the business
# card, including: Name, Phone Number, and Email Address. The other class
# contains the necessary methods to parse each field from the string of business
# card text.
import re
@meftaul
meftaul / webdev_online_resources.md
Created July 24, 2018 19:36 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
@meftaul
meftaul / text2png.py
Created February 13, 2017 17:48 — forked from destan/text2png.py
Python text to image (png) conversion with automatic new line calculation
# coding=utf8
import PIL
from PIL import ImageFont
from PIL import Image
from PIL import ImageDraw
def text2png(text, fullpath, color = "#000", bgcolor = "#FFF", fontfullpath = None, fontsize = 13, leftpadding = 3, rightpadding = 3, width = 200):
REPLACEMENT_CHARACTER = u'\uFFFD'
NEWLINE_REPLACEMENT_STRING = ' ' + REPLACEMENT_CHARACTER + ' '
@meftaul
meftaul / octave.md
Created January 11, 2016 05:58 — forked from miguelsaddress/octave.md
An Octave introduction cheat sheet.

Octave CheatSheet

GNU Octave is a high-level interpreted language, primarily intended for numerical computations.
(via GNU Octave)

Basics

  • not equal ~=
  • logical AND &amp;&amp;