teleren/devto huggingface dataset:
amazon-orders for Python
Tags: python, amazon
Published: 2024-01-31 23:02:46

<p align="center"><img alt="amazon-orders - a python library" src="https://amazon-orders.readthedocs.io/en/latest/_images/logo.png" /></p>

`amazon-orders` is an unofficial library that provides a command line interface alongside a programmatic API that can
be used to interact with Amazon.com's consumer-facing website.

This works by parsing website data from Amazon.com. A nightly build validates functionality to ensure its
stability, but as Amazon provides no official API to use, this package may break at any time. This
package only supports the English version of the website.

## Installation

`amazon-orders` is available on [PyPI](https://pypi.org/project/amazon-orders/) and can be installed using `pip`:

```sh
pip install amazon-orders
```

That's it! `amazon-orders` is now available as a Python package is available from the command line.

## Basic Usage

Execute `amazon-orders` from the command line with:

```sh
amazon-orders --username <AMAZON_EMAIL> --password <AMAZON_PASSWORD> history
```

Or use `amazon-orders` programmatically:

```python
from amazonorders.session import AmazonSession
from amazonorders.orders import AmazonOrders

amazon_session = AmazonSession("<AMAZON_EMAIL>",
                               "<AMAZON_PASSWORD>")
amazon_session.login()

amazon_orders = AmazonOrders(amazon_session)
orders = amazon_orders.get_order_history(year=2023)

for order in orders:
    print("{} - {}".format(order.order_number, order.grand_total))
```

## Documentation

For more advanced usage, `amazon-orders`'s official documentation is available at [http://amazon-orders.readthedocs.io](http://amazon-orders.readthedocs.io).

## Contributing

If you would like to get involved, be sure to review the [Contribution Guide](https://github.com/alexdlaird/amazon-orders-python/blob/main/CONTRIBUTING.rst).

Want to contribute financially? If you've found `amazon-orders` useful, [sponsorship](https://github.com/sponsors/alexdlaird) would
also be greatly appreciated!
Next.js Codebase Analysis <> create-next-app <> index.ts explained - Part 1.10
Tags: webdev, nextjs, javascript, react
Published: 2024-01-31 23:01:45

In the previous article, I wrote about project name validation. In this article, let’s look at more code from [index.ts](https://github.com/vercel/next.js/blob/canary/packages/create-next-app/index.ts)

```
if (program.example === true) {
    console.error(
      'Please provide an example name or url, otherwise remove the example option.'
    )
    process.exit(1)
  }
```

program.example reminds of accessing options passed in via the cli

example is an option as shown below:

```
// https://www.npmjs.com/package/commander#options
// -e
// https://github.com/vercel/next.js/tree/canary/packages/create-next-app#non-interactive
.option(
  '-e, --example [name]|[github-url]',
  `
    An example to bootstrap the app with. You can use an example name
    from the official Next.js repo or a GitHub URL. The URL can use
    any branch and/or subdirectory
  `
)
```

Pass it as npx create-my-app -e, because it needs url when there is no url provided, the following error is thrown

![example option](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/051xrom0lxexyic9ehif.jpeg)

## Conclusion:
As I look at the more lines of code, I see that there is safeguarding in place for options submitted, for example, for project name and now for example.

Take the user input and importantly validate it before proceeding further.

I am building a platform that explains best practices used in open source by elite programmers. [Join the waitlist](https://docs.google.com/forms/d/e/1FAIpQLSe2JCZAaIB5oXzNHLTrYJR4LMZ5SEwrGPgmG5DeFWdDhu8-Gw/viewform) and I will send you the link to the tutorials once they are ready.

If you have any questions, feel free to reach out to me at ramu.narasinga@gmail.com
new to web developer 1st week in bootcamp
Tags: beginners, javascript
Published: 2024-01-31 22:52:38

hello everyone ,I'm switching my 60 hour job to become a web developer , if anyone has any better idea i can do as a newbie please share your thoughts, i really want to make this work for me and my future. this week was my first and i feel like im still lost in this web developer class, maybe i need to spend more time out side of class learning on how to understand HTML and CSS, im having a little trouble getting this all together at once. maybe im doing something wrong as a student ?
CODER CYBER SERVICES HELPS RECOVER SCAMMED BITCOIN AND CRYPTO
Published: 2024-01-31 22:29:27

In the world of cryptocurrency, Bitcoin has emerged as a prominent digital asset with immense potential for financial gains. However, the decentralized nature and unique characteristics of Bitcoin also pose risks, especially when it comes to the security of digital wallets and the potential loss of access to funds. As a result, the need for safe and effective Bitcoin recovery solutions has become increasingly vital. Need for Secure Recovery
Bitcoin, the digital currency that took the world by storm, has revolutionized the way we think about money and transactions. With its decentralized nature and potential for massive returns, more and more individuals are investing in Bitcoin. But with great investments come great responsibilities, and one of the most crucial aspects of owning Bitcoin is ensuring its safe recovery. While the popularity of Bitcoin continues to grow, so does the risk of losing access to your digital assets. Whether it's a misplaced password, a forgotten private key, or a compromised hardware wallet, the consequences of losing access to your Bitcoin can be devastating. That's where safe Bitcoin recovery comes into play. Enter Coder Cyber Services, your friendly neighborhood wizard in the world of Bitcoin recovery. This all-in-one solution is designed to make the recovery process as smooth and effortless as possible. With a user-friendly interface and a variety of powerful tools at your disposal, Coder Cyber Services takes the stress out of recovering your lost or inaccessible Bitcoin. Coder Cyber Service's all-encompassing strategy is what distinguishes it from other recovery options. To increase your chances of a successful recovery, Wizard Web Recovery uses a variety of tools and strategies in place of depending only on one tool or procedure. Coder Cyber Services can help, regardless of the issue—a broken hard drive, a compromised wallet, or a lost password. Having the correct tools at your disposal is essential when it comes to retrieving lost Bitcoin. A variety of cutting-edge software tools created especially for Bitcoin recovery are available from Coder Cyber Services. A group of subject-matter specialists creates and updates these tools on a regular basis to make sure you have access to the newest and best fixes. To get in touch with the company send them an email codercyberservices@tech-center.com or rather visit their website  https://codercyberservices.info/    to enquire and get the information you need.
Our honest reviews of Le Wagon's coding bootcamp
Published: 2024-01-31 22:09:18

50+ of us had an awful experience with Le Wagon at campuses worldwide (and online). 

We were SHOCKED by the overwhelmingly positive reviews. 

A group of us (more than 50 and counting) had a terrible experience with Le Wagon in 2024, 2023 and prior. 

Seeing as our reviews were hidden (by the biased, incentivised "bootcamp review" websites, we made lewagonreviews.com and shared them there.

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

Any questions, feel free to ask.
CODER CYBER SERVICES HELPS RECOVER SCAMMED BITCOIN AND CRYPTO
Published: 2024-01-31 22:05:32

In the world of cryptocurrency, Bitcoin has emerged as a prominent digital asset with immense potential for financial gains. However, the decentralized nature and unique characteristics of Bitcoin also pose risks, especially when it comes to the security of digital wallets and the potential loss of access to funds. As a result, the need for safe and effective Bitcoin recovery solutions has become increasingly vital. Need for Secure Recovery
Bitcoin, the digital currency that took the world by storm, has revolutionized the way we think about money and transactions. With its decentralized nature and potential for massive returns, more and more individuals are investing in Bitcoin. But with great investments come great responsibilities, and one of the most crucial aspects of owning Bitcoin is ensuring its safe recovery. While the popularity of Bitcoin continues to grow, so does the risk of losing access to your digital assets. Whether it's a misplaced password, a forgotten private key, or a compromised hardware wallet, the consequences of losing access to your Bitcoin can be devastating. That's where safe Bitcoin recovery comes into play. Enter Coder Cyber Services, your friendly neighborhood wizard in the world of Bitcoin recovery. This all-in-one solution is designed to make the recovery process as smooth and effortless as possible. With a user-friendly interface and a variety of powerful tools at your disposal, Coder Cyber Services takes the stress out of recovering your lost or inaccessible Bitcoin. Coder Cyber Service's all-encompassing strategy is what distinguishes it from other recovery options. To increase your chances of a successful recovery, Wizard Web Recovery uses a variety of tools and strategies in place of depending only on one tool or procedure. Coder Cyber Services can help, regardless of the issue—a broken hard drive, a compromised wallet, or a lost password. Having the correct tools at your disposal is essential when it comes to retrieving lost Bitcoin. A variety of cutting-edge software tools created especially for Bitcoin recovery are available from Coder Cyber Services. A group of subject-matter specialists creates and updates these tools on a regular basis to make sure you have access to the newest and best fixes. To get in touch with the company send them an email codercyberservices@tech-center.com or rather visit their website  https://codercyberservices.info/    to enquire and get the information you need.
How To Track Down And Recover Lost Hacked Or Stolen BTC//ETH - Captain WebGenesis.
Published: 2024-01-31 21:59:50

Hello everyone. I'm Jackson, and I wanted to sincerely thank the woman who commented about how she was able to get her bitcoin back into her wallet with the assistance of CAPTAIN WEBGENESIS. Coincidentally, I was having a similar issue, so I had to contact the expert right away to get help getting my money back.
It is with great satisfaction that I attest to the fact that CAPTAIN WEBGENESIS comes highly recommended for any type of Bitcoin recovery services. I was able to get back all my lost funds in a short period of time.
I recommend CAPTAIN WEBGENESIS to all victims who have fallen prey to these online Ponzi schemes.
Notice multi thread problem when working with Java Servlet
Tags: java, servlet, springmvc
Published: 2024-01-31 21:57:20

## Notice

I wrote this article and was originally published on [Qiita](https://qiita.com/saladlam/items/7b2c35f814348f7a039d) on 19 September 2019.

---

First please read following code of Spring MVC controller

```java
@Controller
@RequestMapping("/count")
public class CountController {

	private long count = 0;

	@GetMapping(value = "/increment", produces = "text/plain")
	@ResponseBody
	public String increment() {
		count++;
		return Long.toString(count);
	}

}
```

The function of this controller is to memorize how many times this controller being accessed, and print out the access count. If 100,000 times this controller being called, **one by one**, the controller should correctly print 100,000.

But there is a serious bug in this controller. If 100 users access this controller simultaneously, and 100 times of group access being done. After that the count is not 100,000.

Java Servlet is under multi thread environment, in other word is the environment which many request can be processed simultaneously. Spring MVC is built on the top of Java Servlet. And on designing Java Servlet class should be aware the problem of multi thread.

Simple to say, the problem is class variable *count* is not thread safe. Change code of controller to following should solve this problem.

```java
@Controller
@RequestMapping("/count")
public class CountController {

	private AtomicLong count = new AtomicLong(0l);

	@GetMapping(value = "/increment", produces = "text/plain")
	@ResponseBody
	public String increment() {
		return Long.toString(count.addAndGet(1l));
	}

}
```
Performance Optimization (Platform 9 Edition)
Tags: kubernetes, programming, cloud, git
Published: 2024-01-31 21:55:08

Without resource optimization, cost optimization, and overall performance optimization, everything from VMs in the cloud to bare metal to Kubernetes wouldn't work as expected. Whether your goal is to save money, have application stacks perform more efficiently, or fully understand how your environment will be as effective as possible, Performance Optimization is key.

In this blog post, you'll learn a bit about resource/cost optimization, why it's important, and how Platform 9 can help.


## Why Performance Optimization

The answer to this question may sound obvious, but let's break down three primary questions:

1. Is your application performing as expected?
2. Do you know how your application is performing?
3. Do you have the data to understand how your application is performing?

With these three questions answered you can easily solve the majority of your problems from a performance perspective.

Proper requests, limits, Cluster Autoscaler (Karpenter if you're feeling fancy), and forecast data for how your application stack works.


## Platform 9 Implementation

Platform 9 can help in several ways, but the two primary methods are:

- Proactive ops: Platform 9 has a Control/Management Plane that has its own stack (Prometheus, Vault, Consul, etc etc) for your environment to run as expected with a 99% uptime.

- Elastic Machine Pool (EMP): Essentially, think about it like your under-utilization tool. Instead of scaling up or scaling down with a tool like Karpenter, you let EMP handle it for you.

EMP can be considered an alternative to both Fargate and Karpenter.
Array is object
Tags: java
Published: 2024-01-31 21:54:54

## Notice

I wrote this article and was originally published on [Qiita](https://qiita.com/saladlam/items/95b27387d92030e96c36) on 19 September 2019.

---

# Array class is defined in JVM

```java
public class ArrayClassClassloader {

	public static void main(String[] args) {
		System.out.println(boolean[].class.getClassLoader());
	}

}
```

Output

```
null
```

This means that array class is load by bootstrap class loader

# Name of array class

```java
public class ArrayClassName {

	public static void main(String[] args) {
		System.out.println(boolean[].class.getName());
		System.out.println(short[].class.getName());
		System.out.println(int[].class.getName());
		System.out.println(long[].class.getName());
		System.out.println(float[].class.getName());
		System.out.println(double[].class.getName());
		System.out.println(char[].class.getName());
		System.out.println(byte[].class.getName());
		System.out.println();
		System.out.println(java.lang.Integer[].class.getName());
		System.out.println();
		System.out.println(int[][].class.getName());
		System.out.println(int[][][].class.getName());
		System.out.println(int[][][][].class.getName());
	}

}
```

Output

```
[Z
[S
[I
[J
[F
[D
[C
[B

[Ljava.lang.Integer;

[[I
[[[I
[[[[I
```
Crafting Adventures and Cocktails: The Story Behind My Drink Generator Game
Tags: dungeonsanddragons, terminal, generator, python
Published: 2024-01-31 21:33:50


Greetings, fellow adventurers and mixologists! Allow me to introduce myself; I am Jose, the proud creator of a delightful concoction that brings together the realms of Dungeons & Dragons and mixology in a unique and entertaining way. Today, I'm excited to share the story behind the creation of my very own drink generator game.

## A Sip of Imagination
As a passionate Dungeons & Dragons enthusiast, I've always believed that every quest is best embarked upon with a companion by your side. What better companion than a perfectly crafted drink to accompany you on your epic journeys through dungeons, dragons, and everything in between?

Inspired by the spirit of camaraderie and the unpredictability of a D&D campaign, I set out to create a game that would add an extra layer of excitement to our gaming sessions. Thus, the drink generator game was born.

## Brewing Creativity in a Glass
The idea was simple: roll the dice, flip a coin, and let fate decide whether you'll be sipping on a full-sized drink or a potent shot. Drawing inspiration from the vast array of spirits, mixers, and flairs, the game generates a unique drink recipe for each player, turning the act of crafting cocktails into a fantastical adventure.

Whether it's the exotic taste of Absinth, the warmth of Tequila Rose, or the kick of Hot Sauce flair, each element is chosen at random, ensuring that no two drinks are ever the same. The result? An imaginative and ever-changing menu that adds a touch of whimsy to our D&D gatherings.

## Raising a Glass to Friendship
What makes this game truly special is the sense of shared experience it brings to the table—quite literally. Picture a group of friends, gathered around the gaming table, each with their own uniquely crafted drink in hand. The clinking of glasses becomes a ritual, a toast to the unfolding adventure and the bonds forged over dice rolls and shared laughter.

In the following posts, I'll delve deeper into the mechanics of the game, sharing some of the most memorable drink combinations and the unexpected twists they've brought to our gaming sessions. So, fellow adventurers, join me as we uncork the tales of creativity, camaraderie, and cocktails in the world of Dungeons & Drinks.

Get ready to roll the dice, raise your glass, and embark on a journey where every sip is a step into the unknown.

Cheers to adventures and libations!

You can check the game out here: https://github.com/xEDOCxYRANIBx/DungeonDrinks.git

Jose Diaz

Creator of Dungeons & Drinks

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8sa51bw71sgqnqw7k062.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wzpamoh3tdtmroza9dub.png)
Get class method parameter name from .class file at runtime
Tags: java, spring, springmvc
Published: 2024-01-31 21:31:47

## Notice

I wrote this article and was originally published on [Qiita](https://qiita.com/saladlam/items/9522ccbc2248a33fc4d2) on 4 July 2021.

---

#In the beginning

In the beginning class method parameter name is ignored by complier and only parameter type is recored into .class file. For example

```java
float totalSalary(float hours, float hourlySalary) {
	...
}
```

You can get the following only if decompile .clsss file generated. This called [method signature](https://docs.oracle.com/javase/tutorial/java/javaOO/methods.html).

```
float totalSalary(float, float)
```

So this is the reason why you **can't** define two methods like below with same method signature in one class.

```java
float totalSalary(float hours, float hourlySalary) {
	...
}

float totalSalary(float days, float dailySalary) {
	...
}
```

#Start from Java 8

As I remember, new option "-parameters" is introduced into javac which includes class method parameter name into .class file. For example

```java
package test;

public class TestClass {

	public static void main(String[] args) {
		System.out.println("Hello");
	}

}
```

By using javap to decompile generated .class file

```
javap -v -cp <class path> test.TestClass
```

Output is

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

Method parameter name is shown on **MethodParameters**. And you may refer to [here](https://stackoverflow.com/a/20594685) for how to read this at runtime.

# Relationsip between Spring Framework

Modern frameworks including Spring Framework are heavy using this feature. If "-parameters" option is not specified when compile source code, for example *org.springframework.web.bind.annotation.PathVariable* annotation of Spring MVC will not work.

If your project is managed by Maven, you can specify **parameters** parameter in [Apache Maven Compiler](https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#parameters) plugin.

Or if your project is built on the top of *spring-boot-starter-parent* project, you don't need to do anything because complier parameter is included at parent POMs.
Migrating DynamoDB tables from one AWS Account to Another using AWS Backup Service
Published: 2024-01-31 21:30:30

{% cta https://nagababumedicharla.medium.com/migrating-dynamodb-tables-from-one-aws-account-to-another-using-aws-backup-service-ab0d44ea9f02 %} Click on Description to view the complete blog {% endcta %}
Record of trying Cloudflare CDN
Tags: cloudflare
Published: 2024-01-31 21:24:04

## Notice

I wrote this article and was originally published on [Qiita](https://qiita.com/saladlam/items/4f4ed0c05f80cee01bf0) on 12 August 2021.

---

#Setup
1. copy **ALL** existing entries of your domain from current DNS server to Cloudflare DNS server (Please check carefully if all entries is copied, otherwise services using missing entries will be inaccessable)
2. on your domain name registrar, set DNS server serving your domain name to Cloudflare DNS server
3. wait **at most 48 hours** for DNS servers cache expires, Cloudflare also periodly checks if domain name moves to Cloudflare or not
4. turn on websites under your domain to use Cloudflare CDN

#Default caching behavior
Assume that *free* plan is joined, and no *page rule* is setup

1. only file extension is consider, not "Content-Type" response header
2. html file will not be cached (file with "htm", "html" or "php" extension), file without extension also will not be cached
3. [here](https://support.cloudflare.com/hc/en-us/articles/200172516-Understanding-Cloudflare-s-CDN) shows file with which extension will be cached
4. for cached file, "Cache-Control" response header will be rewrite to value of "Browser Cache TTL" setting
5. file with "Set-Cookie" response header will not be cached, although which is cached file extension
6. value of "Caching Level" setting is "Standard", it means that the cached content becomes invalid if the query string changes

You can refer "cf-cache-status" response header returned by Cloudflare's edge server to know if the request is cached or not.

Under the default caching behavior, you may observe that **there is a noticeable delay** between domain name is entered and content starts to display on the browser (html file is not cached by default). Then content rendering is fast due to the help of caching image, javascript and css files of Cloudflare CDN.