teleren/devto huggingface dataset:
Fast OCR Configuration (Code Example)
Published: 2022-02-28 03:59:30

---
canonical_url: https://ironsoftware.com/csharp/ocr/examples/tune-tesseract-for-speed-in-dotnet/
---

This example renders a 35%+ speed improvement over default setup at the cost of 0.2% accuracy.
You may also be interested in how to [OCR a specific area within an image](https://ironsoftware.com/csharp/ocr/examples/net-tesseract-content-area-rectangle-crop/) that can significantly improve speed.

**C#:**
```
var Ocr = new IronTesseract();
 
// Fast Dictionary
Ocr.Language = OcrLanguage.EnglishFast;
 
// Latest Engine 
Ocr.Configuration.TesseractVersion = TesseractVersion.Tesseract5;
 
//AI OCR only without font analysis
Ocr.Configuration.EngineMode = TesseractEngineMode.LstmOnly; 
 
//Turn off unneeded options
Ocr.Configuration.ReadBarCodes = false;
Ocr.Configuration.RenderSearchablePdfsAndHocr = false;
 
// Assume text is laid out neatly in an orthagonal document
Ocr.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.Auto;
 
using (var Input = new OcrInput(@"images\image.png"))
{
    var Result = Ocr.Read(Input);
    Console.WriteLine(Result.Text);
}
```

**VB:**
```
Dim Ocr = New IronTesseract()
 
' Fast Dictionary
Ocr.Language = OcrLanguage.EnglishFast
 
' Latest Engine 
Ocr.Configuration.TesseractVersion = TesseractVersion.Tesseract5
 
'AI OCR only without font analysis
Ocr.Configuration.EngineMode = TesseractEngineMode.LstmOnly
 
'Turn off unneeded options
Ocr.Configuration.ReadBarCodes = False
Ocr.Configuration.RenderSearchablePdfsAndHocr = False
 
' Assume text is laid out neatly in an orthagonal document
Ocr.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.Auto
 
Using Input = New OcrInput("images\image.png")
	Dim Result = Ocr.Read(Input)
	Console.WriteLine(Result.Text)
End Using
```
How To Toggle Dark And Light Mode Using jQuery
Tags: javascript, jquery, darkmode, lightmode
Published: 2022-02-28 03:48:17

In this tutorial, I will show you how to toggle between dark and light mode using jquery. As per the current trend of web development in many websites provides to the user for reading select themes like dark mode and light mode or day mode and night mode of website and it's very easy to implement in the website.

Using jquery we perform how to change dark and light mode or toggle between light and dark mode using jquery. In this just write some CSS code and javascript for toggle dark mode and light mode website also you can store in local storage for saving the state of user select themes like dark mode and light of website. 

So, here we will see how to toggle dark mode and light mode using jquery step by step.

```
Step 1 : Create HTML File.

Step 2 : Add CSS for Dark Mode and Light Mode. 

Step 3 : Add Switch/Toggle Button for Dark Mode and Light Mode.

Step 4 : Add functionality for Toggle Dark Mode and Light Mode using Javascript or jQuery.
```

---

Output: 


![how_to_toggle_light_mode_using_jquery](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1sm36mg8sdtwdr3dqcef.png)


![how_to_toggle_dark_mode_using_jquery](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q1j59wdxxxd5fzumrv5b.png)

---

> **_[Read More : How To Toggle Dark And Light Mode Using jQuery](https://techsolutionstuff.com/post/how-to-toggle-dark-and-light-mode-using-jquery)_**
getSignaturesForAddress null on localnet
Tags: solana, blockchain, rpc
Published: 2022-02-28 03:58:11

If you're using `solana-test-validator` to test your smart contracts on solana you may have noticed that `getSignaturesForAddress()` returns false null values after a few minutes. It turns out there is a command-line argument on the validator:

```
solana-test-validator --help
	--limit-ledger-size <SHRED_COUNT>
		Keep this amount of shreds in root slots. [default: 10000]
```

Just increase that value! Or use devnet. And check your RPC's value too.
Getting started with Docker
Tags: docker, containers, webcomponents, javascript
Published: 2022-02-28 03:57:39

Before getting started with Docker, it is important to talk about why this technology is so important in the realm of web development. Docker acts as a way to bypass using VMs and having to run many OSs on a system at one time. It allows a user to run applications in containers, which are 
> standardized executable components combining application source code with the operating system (OS) libraries and dependencies required to run that code in any environment.

All that to say that containers make it easy to develop, build, and deploy applications at a very high level. 

### Getting Started
The best way to start using docker is to follow this tutorial [here](https://www.docker.com/101-tutorial). The tutorial gives a simple approach to docker and helps to create a simple Todo list web app. The final product after adding a few list items looks something like this:

![Finished Product of ToDo App](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r5zwqulwxm1uwxiwfxvm.png)

### Play with Docker
Play with Docker is a web-based lab environment for exploring and developing your apps that can be found [here](https://www.docker.com/play-with-docker). The 101 tutorial eventually starts using Play with Docker as well, so if you follow that, you will become familiar with Play with Docker.

### Create a Dockerfile for NASA Image Search Repo
In our lab, we created a news api microservice that basically fetches articles from a news api and then deployed it onto Play with Docker. The github can be found [here](https://github.com/heyMP/news-api-workshop). We can do something very similar with the NASA Image Search microservice we created [here](https://github.com/IST402-Group-E/ip-project). We can write a Dockerfile to be able to deploy our microservice on Play with Docker.

We will have a Dockerfile on both the frontend and backend sides of our microservice. The frontend (part where the user interacts) will look something like this:

![Frontend Dockerfile code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q4dgf1o070arebejwj3n.png)

And the backend Dockerfile will look something like this:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9no9dplejr4cz79waqy4.png)

These files are being read by Play with Docker to help deploy our microservice on their platform. Some things will need to be changed in each file and shifted around, but for the most part, the shell of the microservice and deploying it are the same.
Intro to Apache Arrow
Tags: python, algorithms, performance, apache
Published: 2022-02-28 03:54:46

**What is Apache Arrow?**
Apache Arrow is a series of libraries that enable large data systems to process and transfer data quickly and efficiently. It is used by AWS Data Wrangler, the python library Pandas, MATLAB and many other technologies. The primary component of Apache Arrow is the in-memory columnar format specification used to represent table-like datasets in-memory. 

**The Arrow Columnar format**
There are two advantages to this format for data processing. Firstly, processing data through this format is very fast. The image below gives a good representation of how data is stored in memory. Secondly, this format is language agnostic. Meaning that transferring data between different programming languages or between different databases is simple. Generally, for processing large amounts of data, a data processing engineer would create custom data structures to represent data sets in memory and would develop serialization interfaces to convert the data structures to different file formats or other data transport interfaces. This resulted in a large amount of wasted time within the development process. 

![Columnar data format](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hwte9qxsul9chap15tpj.png)Source: [https://arrow.apache.org/overview/](https://arrow.apache.org/overview/)

**When would I use Apache Arrow?**
Apache Arrow is a good choice if you are processing large amounts of structured data, or if you are handling large, structured data transfer between many different connected technologies. For example, a Java application can call a C or C++ algorithm on data that originated in the JVM.

**An example in Python**
This shows how to read a csv file and process it into the Arrow Columnar format. (For large data sets it will likely be more efficient to use a different file format like Apache Parquet)

```py
import pyarrow as pa
import pyarrow.csv as pacsv

# Get the csv in the same file directory
fn = 'apacheArrowExample0.csv'

# Read the csv file
table = pacsv.read_csv(fn)

# Create the schema for our csv file as a pyarrow Table
pa.Table
id: pa.int32()
firstname: pa.string()
lastname: pa.string()
dateofbirth: pa.date32()

# See that our csv data is formatted as a Apache Arrow Columnar data format
print(table)

"""
pyarrow.Table
id: int64
firstname: string
lastname: string
dateofbirth: date32[day]
----
id: [[1,2,3,4,5,6,7,8,9,10,...]]
firstname: [["Coral","Lucille","Marcy","Christian","Margarette","Vanessa","Christal","Anallese","Aaren","Christian",...]]
lastname: [["Killigrew","Chick","Read","Marden","Chapland","Nedrud","Mott","Johanna","Norrie","Bahr",...]]
dateofbirth: [[1917-01-15,1900-09-15,2018-03-27,1975-09-24,1929-10-31,1987-12-10,1995-12-26,1981-05-28,1914-07-04,1933-04-08,...]]

"""
```

More information about Apache Arrow can be found at [https://arrow.apache.org/](https://arrow.apache.org/) 
Leave a comment if you have any questions or feedback.
Appendix: Developer Tools - AWS Certified Cloud Practitioner Study Guide
Published: 2022-02-28 03:45:46

[AWS CodeBuild](https://aws.amazon.com/codebuild/)
- Fully managed continuous integration service
- Compiles source code, runs tests, and produces software packages that are ready to deploy
- Scales continuously and processes multiple builds concurrently
- Charged by the minute for the compute resources

[AWS CodeCommit](https://aws.amazon.com/codecommit/)
- Secure, highly scalable, managed source control service
- Contributions encrypted in transit and at rest
- Supports the standard functionality of Git

[AWS CodeDeploy](https://aws.amazon.com/codedeploy/)
- Fully managed deployment service that automates software deployments to a variety of compute services

[AWS CodePipeline](https://aws.amazon.com/codepipeline/)
- Fully managed continuous delivery service
- Automates the build, test, and deploy phases of your release process
- Integrates with third-party services such as GitHub

[AWS CodeStar](https://aws.amazon.com/codestar/)
- Software development management system
- Manage access and add owners, contributors, and viewers to your projects
- Integrated issue tracking capability powered by Atlassian JIRA Software
The Power of Docker
Tags: docker
Published: 2022-02-28 03:45:40

## What is Docker?

Docker is an open platform that allows the user to virtually create different software packages in things called, "containers"

## Why is Docker so powerful?

Docker is so powerful because you're able to very easily create software and play around with it very quickly without having to worry about a lot of the backend part of the code and how getting the server up and running works

## How to use 'Play with Docker'

To start with 'Play with Docker' you'll need to head over to the [website](https://labs.play-with-docker.com/)

Once you're on the website, create an account and login. Once you log in the green "login" button on the homepage will change to say "start"

![Docker Homepage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o0w9zxwfabpckrmy6zm9.png)

Once you hit start, you'll see a page that looks like this:

![Play with Docker Main Page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8z969yu3saae1zfywq04.png)

Now to start playing around with Docker you can just hit the "+ Add New Instance" button" and you'll start the Docker server and the webpage will look like this:

![Docker New Instance](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rzkqcdkqwzdy6810jcvt.png)

Now you're all ready to play around with Docker, have fun!

## Creating a DockerFile for our NASA Image Search repo

In order to get your own web application running in Docker you will first need a DockerFile.
- Here is a link to the Docker Docs that explain what a Docker File is and how to create one. [Docker Docs - Docker File](https://docs.docker.com/get-started/02_our_app/)

In order to actually build your Docker container you need to run, `docker build -t getting-started .` but replace the "getting-started" with the name of your component.

To actually start the app container all you have to do is type `docker run -dp 3000:3000 getting-started` into the terminal and just like last step replace "getting-started" with the component name.

Make sure you open the 3000 port through Play with Docker, or go to [localhost:3000](http://localhost:3000) to see the application if using the downloaded version of Docker.
11ty
Published: 2022-02-28 03:41:23

## How to get start

As I never used 11ty before, I started with making a 11ty folder (`mkdir eleventy`) and in the folder, I did `npm init -y` to generate an empty npm project without going through any process. And then, I use `npm install --save-dev @11ty/eleventy` to install and save 11ty.  To process markdown, I first created `default-layout.njk`. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/720djww6f9l3vhmsrpgf.png)


## Blogs

I created a folder called blog and have three markdown files in it. I can change my layout, title, date, teaser and tag as the way I want. By modifying teaser, I can change my blog contents.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0h69j55gzg888y3ezi2q.png)

To successfully load the blog to the website, I also need to create a `index.njk`.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kgq2cjzuuew7zj6ac00i.png)

## Plug-in

To install the plug-in for data, I added the code `npm install --save-dev eleventy-plugin-date`. To run eleventy, type `npx @11ty/eleventy --serve`. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1gdzxql0uyigydekwkbh.png)

To load the plugin, add a _`.eleventy.js`_ file.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/41qhuy0vej3l2lgdp6zv.png)

Open a browser and put the [link]( http://localhost:8080):  _http://localhost:8080_. to load the page.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xrhii62a5y266vcd0hpo.png) 


## To check
the [link ](https://github.com/smm7530/11ty)for repo
The [link](http://localhost:8080/) for webpage
Playing with Docker
Published: 2022-02-28 02:45:58

#Welcome to Docker

Docker is a crazy container architecture that lets users deploy instances of an application which makes it easy for a dev to customize and clone their machines without messing things up on their system. Essentially with Docker you can just throw everything you need to run into a package and distribute it to any end user to mess around with. I still haven't fully wrapped my head around its limitless capabilities so bare with me while I stumble through playing with Docker. Let's get to it!

#Getting Started
First you are going to want to head to the Docker Playground [here](https://labs.play-with-docker.com/)

Click the green button to get started and it should drop you into something that looks like this
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o2ocjsrdngho89xmjpu4.png)

To get a new instance up and running all you have to do is press the "Add New Instance" on the left panel and you are well on your way
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4uwkwksw0gk61k3owygz.png)

The next thing you want to do to get a microservice running is to clone a github repository, for this example I will be using a newsAPI service, you can use NASA image search here or anything. 

I will start with ```git clone https://github.com/heyMP/news-api-workshop && cd news-api-workshop```

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t8ylewrplmm1g19lc3eh.png)


Next, we need to configure our settings for this application. These settings will be an API key and the url of the Play With Docker instance.

```cp dot.env.example dot.env```

In the 'editor' screen you can add API keys from [here](newsapi.org) into the dot.env file

At the top of the screen, make sure Port 4000 is open, then copy the webpage it directs you to, into the dot.env file

#Run it
To run this, type ```docker-compose up```
and we can see our application running on ports 80 (front end) and 4000 (back end)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9uuf0k1of5mdgpxzgxlc.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hkkpumuca2rin3ft96ol.png)

You can use any repo here and as long as you edit the API keys and the endpoints you can have any application up and running as easy as that. Happy coding!
Appendix: Database Services - AWS Certified Cloud Practitioner Study Guide
Published: 2022-02-28 03:27:22

[Amazon Aurora](https://aws.amazon.com/rds/aurora/?aurora-whats-new.sort-by=item.additionalFields.postDateTime&aurora-whats-new.sort-order=desc)
- MySQL and PostgreSQL-compatible relational database
- Up to five times faster than standard MySQL databases and three times faster than standard PostgreSQL databases
- Fully managed by Amazon Relational Database Service (RDS)
- Distributed, fault-tolerant, self-healing storage system that auto-scales up to 128TB per database instance
- Up to 15 low-latency read replicas
- Point in time recovery
- Continuous backup to S3
- Replication across three AZs

[Amazon DynamoDB](https://aws.amazon.com/dynamodb/)
- Fully managed, serverless, key-value NoSQL database
- Single-digit millisecond performance
- Automatic multi-region replication
- Encryption at rest
- Automatic backup and restore
- Auto-scaling

[Amazon ElastiCache](https://aws.amazon.com/elasticache/)
- Fully managed, in-memory caching service
- Microsecond latency
- Improve app and database performance
- Use as storage for cases that don't require durability

[Amazon RDS](https://aws.amazon.com/rds/)
- Cost efficient and resizable relational database instances
- Supports multiple database engines -  Amazon Aurora, PostgreSQL, MySQL, MariaDB, Oracle Database, and SQL Server
- Several instance types optimized for memory, performance, or I/O
- Can use AWS Database Migration Service to migrate data into RDS instance

[Amazon Redshift](https://aws.amazon.com/redshift/)
- Cloud data warehouse
- Uses SQL to analyze structured and semi-structured data across data warehouses, operational databases, and data lakes
- Analyze exabytes of data and run complex analytical queries
OCR with Barcode & QR Reading
Published: 2022-02-28 03:15:26

---
canonical_url: https://ironsoftware.com/csharp/ocr/examples/csharp-ocr-barcodes/
---

The Iron Tesseract `OcrResult` object will read barcodes and QR Codes during OCR if `Ocr.Configuration.ReadBarCodes = true;`

This is just one of Iron Softwares valuable additions to vanilla/free Tesseract functionality.

**C#:**
```
var Ocr = new IronTesseract();
Ocr.Configuration.ReadBarCodes = true;
using (var Input = new OcrInput(@"images\imageWithBarcode.png"))
{
    var Result = Ocr.Read(Input);
    foreach (var barcode in Result.Barcodes) {
        Console.WriteLine(barcode.Value);
    }
}
```

**VB:**
```
Dim Ocr = New IronTesseract()
Ocr.Configuration.ReadBarCodes = True
Using Input = New OcrInput("images\imageWithBarcode.png")
	Dim Result = Ocr.Read(Input)
	For Each barcode In Result.Barcodes
		Console.WriteLine(barcode.Value)
	Next barcode
End Using
```
Docker
Published: 2022-02-28 03:14:44

## Why docker is a powerful tool

Docker can help developers build and run containers simply and easily and automated save all the work through a single API. It can separate an application into several pieces to build different functions and run the application as a whole. It can also update futures faster and cheaper. 

## Get Start
Everything starts with making an [account](https://labs.play-with-docker.com/) and login to the PWD terminal and start docker by running `docker run -dp 80:80 docker/getting-started:pwd`. 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p39g738dqkwja7yuebkw.png)

## NASA Image Search
In the termina, type code `git clone https://github.com/heyMP/news-api-workshop && cd news-api-workshop` to clone a repo and in the repo, type code `cp dot.env.example dot.env` to create a new file called `dot.env`. Then click editor to edit filesystem. 

Editor --> news-api-workshop --> dot.env

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r2tbok85rko3d2qjfgtz.png)

Go to the [link ](https://newsapi.org/)to get a new API key and replace `NEWS_SERVICE_API_KEY=XXXXXXXXXXXXXXXXXX` and click open port in Docker. Type 4000 when they ask the port number as it appears in the editor `NEWS_ENDPOINT=http://news.traefik.me:4000`.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gt6zugyoe7jfqn40hhhb.png)

When it pops up a new web page, copy the link to replace the `NEWS_ENDPOINT` and save it. 

Finally run `docker-compose up`. It can open port 4000 and you should be able to click port 80.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mdts2t0fb19l7brakpt5.png)

Result:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lz9emw7pqxqns55cv7sk.png)
Working with 11ty
Tags: eleventy, webdev, beginners, programming
Published: 2022-02-28 02:26:29

Hello World! Today we are going to be creating three different repositories with different ways to leverage eleventy. To get started, follow the download instructions [here](https://www.11ty.dev/docs/getting-started/).

##Hello World
To begin with our hello-world style blog, you will first need to visit [this](https://www.11ty.dev/) site and follow the tutorial. After following those download instructions, I was able to paste some of my past blog posts in. You can see my work on my [GitHub](https://github.com/hek5118/11tyHello).

##Base Template
For this, I decided to use the basic template found [here](https://github.com/11ty/eleventy-base-blog). Once you download this and clone it to your own repository, you can start to make alterations in the blog posts and about me section to fit your own style. Here is my [GitHub](https://github.com/hek5118/11ty), as well as an image of the home page I created through this template.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/25tqidmhly2n0r31jnlw.png)

##HAX 11ty
Finally, using the final template found [here](https://github.com/elmsln/hax11ty), we are able to build the last blog. Originally, I had tried to use npm to operate this one, but you do require yarn to be downloaded. You can do so following the directions [here](https://classic.yarnpkg.com/en/docs/install#mac-stable). [This](https://github.com/hek5118/11ty-hax) is what I ended up with for this template.

Happy programming!!
Appendix: Containers Services - AWS Certified Cloud Practitioner Study Guide
Published: 2022-02-28 03:12:36

[Amazon Elastic Container Service (Amazon ECS)](https://aws.amazon.com/ecs/)
- Fully managed container orchestration service
- Deploy, manage, and scale containerized applications

[Amazon Elastic Kubernetes Service (Amazon EKS)](https://aws.amazon.com/eks/)
- Managed container service to run and scale Kubernetes applications
- Security patches automatically applied to your cluster’s control plane

[AWS Fargate](https://aws.amazon.com/fargate/)
- Serverless, pay-as-you-go compute engine
- Compatible with ECS and EKS
- Removes the need to own, run, and manage the lifecycle of a compute infrastructure