teleren/devto huggingface dataset:
Converting Strings into datetime Objects in Python
Published: 2023-10-31 07:10:15

If you have a string of date information, such as '2023/10/31 09:55:00'or 'October 31, 2023', and need to convert it to a datetime object, use the datetime.datetime.strptime() function. The strptime() function is the inverse of the strftime() method. A custom format string using the same directives as strftime() must be passed so that strptime() knows how to parse and understand the string. (The p in the name of the strptime() function stands for parse.)
Enter the  following into  interactive shell to excute:

```
>>> import datetime
>>> dt =datetime.datetime.now()
>>> import datetime
>>> datetime.datetime.strptime('October 31, 2023', '%B %d, %Y')
datetime.datetime(2023, 10, 31, 0, 0)
>>> datetime.datetime.strptime('2023/10/31 09:55:00', '%Y/%m/%d %H:%M:%S')
datetime.datetime(2023, 10, 31, 9, 55)
>>> datetime.datetime.strptime("October of '15",  "%B of '%y")
datetime.datetime(2015, 10, 1, 0, 0)
>>> datetime.datetime.strptime("October of '31",  "%B of '%y")
>>> datetime.datetime.strptime("November of '63", "%B of '%y")
datetime.datetime(2063, 11, 1, 0,0)
```
To get a datetime object from the string 'October 31, 2023', pass 'October 31, 2023' as the first argument to strptime() and the custom format string that corresponds to 'October 31, 2023' as the second argument. The string with the date information must match the custom format string exactly, or Python will raise a ValueError exception
Experiential Learning
Tags: strategy, storybytes
Published: 2023-10-31 07:04:12


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

A learning journey can be linear, where we get information to store or experience that knowledge is continuously gained through both personal and environmental experiences. Experiential Learning is the process of learning new skills, knowledge, behaviours, and attitudes through experience and active reflection. This learning approach emphasises on doing, reflection, and active experimentation by individual learners and groups. Therefore, engaging the participants and transforming them into learners is essential. Do you remember some of our childhoods? The carefree hours of our childhood were spent being unknowingly creative, crafting plans, and overcoming the tricky challenges of our imaginary world. Well, we may have been on to something. Imagine bringing back that playfulness and integrating it into your learning as a full-fledged adult. The energy, curiosity and excitement will cheer us up and get us into a lifelong learning spiral.
Beware the Creepiest Crawliest Coding Bugs! 👾👾👾
Tags: discuss
Published: 2023-10-31 07:00:00

In the Halloween spirit, share your scariest coding bug or error experience. 

---

👻🎃 Join Our Halloween Costume Contest! 🎃👻

Embrace the eerie season, don your most creative costume, and snap a pic. Share it with our community for a chance to win badges. [Check out our post for more info](https://dev.to/devteam/coding-in-costume-join-our-halloween-costume-contest-3dg1). 😈📸🏆

Follow the DEVteam for more discussions and online camaraderie!

{% embed [https://dev.to/devteam](https://dev.to/devteam) %}
Solving Natas Levels 0-3
Published: 2023-10-31 06:59:55

Hello all! This is a series of blog posts outlining my solutions to the "OverTheWire" wargame Natas. I'll also be adding my thoughts/things I learnt after each level, so hopefully there's more to learn than just how to capture the flag :D

**Natas Level 0**
This was an introductory problem and solving it just requires you "inspect element" the page. The password is hidden as a html comment.
pass for next level: **g9D9cREhslqBKtcA2uocGHPfMZVzeFK6**

**Natas Level 1**
Following similar ideas, except now right clicking was blocked. Using the F12 shortcut to open the dev tools revealed the password as a html comment like last time.
pass for next level: **h4ubbcXrWqsTo7GGnnUMLppXbOogfBZ7**


**Natas Level 2**
This level is a bit trickier than the last two, but all you need to know is that the image is a big hint. It reveals that there is a file system that can be routed to. The path of the image was from /files, so by accessing the /files route, a text document is revealed containing the password to the next level.
pass for next level: **G6ctbMJ5Nb4cbFwhpMPSvxGHhQ7I6W8Q**

**Natas Level 3**
This level hints at how the site might be hidden from a search engine. After some research, I learnt about robot meta tags which could instruct search engines to not show the page, but as mentioned previously: "Header info isn't part of the solution". Flowing off this tangent, I searched about robot meta tags and came across robots.txt files which store user agents and can enforce certain user rules. In this case there was a wild card user agent dissallowing the /s3cr3ts route. Upon visiting this route, the password is made available.
pass for next level: **tKOcJIbzM4lTs8hbCmzn5Zr4434fGZQm**

**What I learnt**
These were the introductory problems, so I didn't have too much issue solving them - though I did learn about file systems and the robot meta tag/txt files! It was interesting to see how simple things can become vulnerabilities.
Team Members Journey
Tags: leadership, team, storybytes
Published: 2023-10-31 06:49:51


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

Anyone wishes to be well treated in any circumstances. In some places, you can demand and get extra comfort or extra care, which satisfies your experience. But how do you run an organisation that cares about each team member’s journey? That is something which many organisations work on. Experience can be a mixture of the space you provide, the tools to work on and the culture which you, the organisation, induct and keeps evolving. Over time, the tools and the space will evolve naturally. But the evolution of a Culture is strongly driven by all team members. The first and last days will linger in the memories. We might forget the tools and probably the space we worked on, but the feeling we had with team members or a project phase will linger in our memories for a long while. Every organisation must cherish each team member's journey, even beyond their tenure. No one can predict the course, but every contribution and care enrich it. Regardless of outcomes, this endeavour is the experience an organisation must offer, nurturing every member's ongoing journey. Indeed, a team member's journey is paramount.
5 Github Repositories To Master Next.js 😎
Tags: nextjs, react, webdev, javascript
Published: 2023-10-31 06:47:31

**Hey everyone! 👋** Today I want to share 5 awesome Github repos that will help you master Next.js. 

Next.js is so cool - it makes building React apps easy and fun! 🤩


![Projects](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/okad8opnzwyyzfz7kgkj.gif)

> So, let's see them 👇

## 1. Taxonomy

{% embed https://github.com/shadcn-ui/taxonomy %}

This repo by shadcn-ui is an open source app built with Next.js 13

{% cta https://github.com/shadcn-ui/taxonomy %}Give a Star ⭐{% endcta %} 

It uses all the latest features like the new router, server components, and more. You'll learn a ton studying this code! It also looks super modern and has nice UI components. 💅

## 2. Skateshop

{% embed https://github.com/sadmann7/skateshop %}

If you want to build an ecommerce store, check out this open source skateshop by sadmann7:

{% cta https://github.com/sadmann7/skateshop %}Give a Star ⭐{% endcta %}

It uses Next.js 13 and has a real storefront, products, cart and checkout! I want to build a shop just like this someday. 🛹

## 3. Portfolio Website 

{% embed https://github.com/ByteGrad/portfolio-website %}

Looking to create a personal portfolio? Follow this project by ByteGrad

{% cta https://github.com/ByteGrad/portfolio-website %}Give a Star ⭐{% endcta %}

It shows how to make a fast, good-looking portfolio site with Next.js and React. You'll pick up tips for animations, design, configs, and more! 🎨

## 4. Friendz

{% embed https://github.com/taqui-786/project-friendz %}

Here's a social app for learning Next.js basics

{% cta https://github.com/taqui-786/project-friendz %}Give a Star ⭐{% endcta %} 

It uses TypeScript, Mantine hooks, form handling and other neat stuff. Nice for beginning your Next.js journey! 🚀 

## 5. ItzmyLink

{% embed https://github.com/taqui-786/itZmyLink %}

This simple link shortener app by taqui-786 is great for practice

{% cta https://github.com/taqui-786/itZmyLink %}Give a Star ⭐{% endcta %}

It's built with Next.js, TypeScript, and API routes. Check it out to get ideas for your own projects! 🌐


---


_So that's my list of 5 awesome Github repos for leveling up your Next.js skills._
**Clone them, play around with the code, and have fun building! ✨**

**Don't forget to Drop 💖🔥🦄**

## Happy Coding😊
The Fogg Behaviour Model
Tags: leadership, teambuilding, storybytes
Published: 2023-10-31 06:38:20


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

Changing our own behaviours starts where? Is it Motivation, is it ability, or is it the trigger? In the book, “Tiny Habits”, written by BJ Fogg, the author addresses this with a mental model. The model breaks down behaviour change into Motivation, Ability and Trigger. Motivation is one’s intention to perform the behaviour. Ability is skills, knowledge, or access to resources needed to complete the behaviour. Triggers are a stimulus or cue that sparks the behaviour. If one of these three factors is missing or not sufficiently strong, the behaviour will not occur. To see it through a different lens is, using the formula B = MAT. Motivation, Ability, and Trigger must all happen simultaneously to push the behaviour change. And the more you can improve MAT, the more you increase the chance of behaviour occurring. Use small celebration modals to acknowledge and celebrate success, such as reaching a milestone or completing a task. Celebration is an empowering motivator that engages. Use this model and identify which behaviour change in you is taking its time to evolve. You will probably find the reason and apply MAT therefore.
Cargo Services to Nepal from Dubai- A Complete Guide
Tags: courierservicesinnepal, cargotonepal, cargoservicesdubai, dubaitonepalcargo
Published: 2023-10-31 06:35:24

Cargo services play a critical role in the global economy. In particular, they facilitate the efficient transportation of items from one location to another. 
Moreover, you can send items to your buyers and inform them how far their things are from them. Companies, industries, and consumers are enjoying the convenience of these services. Read this blog on  **[UAE to Nepal Cargo Services](https://www.slrshipping.com/ctservice/uae-to-nepal-cargo-services/)**.

![UAE to Nepal Cargo Services](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eq1goblvof8236dhiiqb.jpg)

## Meaning of Cargo Services
Companies transport items from place to place daily, everything from perishable goods to heavy-duty equipment and raw materials. The transportation of goods to its destination requires Cargo services. 
**Cargo services to Nepal from Dubai** become easy due to the abundance of **UAE to Nepal Cargo Services**. 

## Benefits of Using Cargo Services 
Using an established cargo services provider like **SLR Shipping** to **ship cargo in Nepal from the UAE** has numerous benefits. The benefits of using cargo services are:

- **Pickup and Delivery-** Companies often lose consumers because they need help to meet customer time limits. When a package is lost, it affects the client and business. Cargo Services offers reliable cargo delivery, significantly impacting your business's potency and efficacy.
- **Efficient Tracking-** Although it may take some time for your shipment to reach its final destination, **cargo services companies** use technology to provide an easy-to-use tracking system for their clients. So you can relax that your shipment is safe and secure.
- **Security-** The number one perk of working with a cargo services company is the peace of mind they provide. No matter how far you send your goods, you can trust that it is in good hands. Cargo services promise that your belongings will arrive safely.
- **Cost-effectiveness-** If you use a cargo service company, they can offer you cheaper rates since you are just one of their customers. Many cargo service providers give lower prices to those who are regular clients or sending large orders. 

## Conclusion
International trade will require the use of multiple transport methods with different rules. It is where cargo service providers come in, as they have the expertise and connections to coordinate such shipments. Their understanding of regulations authorizes them to give legal services.

A great way to track your shipment is by hiring a verified **cargo services provider** like **[SLR Shipping](https://www.slrshipping.com)** because it is the best **cargo from UAE to Nepal**. Working with **SLR Shipping** is easy, efficient, and cost-effective.
how to used monthly subscription in stripe payment using node js
Tags: javascript, stripe, node, programming
Published: 2023-10-31 06:33:29

how did the stripe calculate the billings and subscription date. if I have subscribe at 15/10/2023 then the next month bill date is calculate from the first date of month ?  or else its calculate the 30days after last subscriPtion?. if it calculate from month start then how much charge for 15 days.
Your Guide to Choosing the Best Mobile App Development Company
Published: 2023-10-31 06:29:37


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hzyyjohtoft6vhq7wy39.jpg)
If you are looking for one of the **[best mobile app development companies](https://www.anayatglobalworks.com)** online, then say hello to Anayat Global Works. We have been highly experienced in the respective domain and have built a strong portfolio as well. You can always connect with us and check out our range of mobile application development services for both iOS and Android platforms. Our prime objective has always been to deliver the services that ticks all the boxes in terms of design and functionalities. You can always specify to us the things you desire us to cover in terms of prototyping, wireframing, security, testing, and more while serving you with mobile app development services. All these aspects make us one of the best mobile app development companies in the business. So, do not hesitate and connect with our experts now! 

You Read also: https://www.localstar.org/blog/your-guide-to-choosing-the-best-mobile-app-development-company
Ağ Keşif - NMAP Taraması Nasıl Yapılır?
Published: 2023-10-31 06:27:32

Bu yazıda Liman 2.0 araryüzü üzerinde Ağ Keşif (Netex) Eklentisinde Aktif (NMAP taraması) tarama nasıl yapılır göreceğiz.

- Liman açılır.
- Ağ Keşif ve Envanter Yönetimi eklentisine girilir.
- Eklentinin _Ayarlar_ sekmesinden _Nmap Seçenekleri_ seçilir.
- "+" butonuna tıklanır ve gerekli yerler aşağıdaki gibi doldurularak kaydedilir.

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

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

- NMap Seçeneği eklendikten sonra eklentinin _Keşifler_ bölümünden _Sensörler_'e girilir.
- Burada, tarama yapılacak sensörün sağ tarafındaki seçenekler menüsünden _Düzenle_ seçeneği seçilir.

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

- Açılan ekranda gerekli Nmap kısımları aşağıdaki gibi doldurulur ve kaydedilir.

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

> Kaydetme işlemi başarılı olarak tamamlandıktan sonra sensörün Roller bölümünde nmap olarak gözükecektir.

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

- Son olarak, _Tarama Başlat_ butonuna tıklanır ve _Keşifler_ menüsündeki _Keşif Durumu_'ndan tarama durumu takip edilebilir. 

> Tarama işlemi biraz uzun sürebilir. (Yaklaşık 5 dakika)

- Tarama _Başarılı_ olarak sonlandıktan sonra _Makineler_ sekmesinde görüntüleyebilirsiniz.
Coin and Coiled Feedback
Tags: feedback, storybytes
Published: 2023-10-31 06:27:18


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

Giving feedback can be easy - and challenging. Maybe you find yourself in a situation where you must address a team member's performance or behaviour with a "quiet word." However, what begins as an informal conversation can quickly escalate. The entire message could go wrong if we don’t hit it correctly. Strong words are exchanged, accusations are made, and there's a risk of significantly straining the relationship. To overcome this, there are many ways. Executive coach and author Anna Carroll developed the COIN Conversation Model, which can also be used with the COILED Model. It is a simple framework that you can use to plan and structure feedback in a non-confrontational way. COIN stands for Connect, Observation, Impact, and Next Steps. Give feedback from your point of view - speaking from the I. Use "I" statements, such as, "I heard that”, "I understand that”, or "I noticed that “, etc. This way, you emphasise your view of the issue and avoid making snap judgments or accusations. For example, you could say, "I don't understand what you've done here," rather than, "You've done this wrong”. By taking the person along with your feedback, ensure they remain connected. If that’s not the case, open up and combine it with the COILED model by Listening, establishing and defining. Any Feedback frameworks are for the sake of better understanding. As you emphasise your way of giving it, don’t forget the heart and the mind of the person listening. The change might only come from the listener, but how you present it will accelerate or slow down the change.
The Art of Simplicity | Apple ID vs Google Account
Tags: design, google, apple, ux
Published: 2023-10-31 06:20:00

I always enjoyed the way Apple managed to cut off non-essential stuff in its products while keeping them as capable as others.

A recent experience adjusting Apple account settings is a good example that reminds of this 'clean and simple' philosophy.

At first glance there's no much difference from Goolge. In both pages UI is not cluttered, there's enough empty space. Objectively there's just 1 more side menu item (7 vs 6) and content part of the page has slightly more items.

![Apple ID](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ovzmfo9egxne1wdlqg7i.png)

![Google Account](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7gtlrpqfiwxiqzs3ls0d.png)

Yet right away I had this feeling of weight of Google Account page (vs feeling of lightness with Apple ID). Part of that impression is due to chosen styles and looks, part is just my subjective perception or bias towards Material design by Google... A solid chuck of impression comes from the fact that Google has scrolling in its page :)

![Google Account Scroll](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q8wq3hezbl0276vmcled.png)
Haunted data pipeline
Tags: python, etl, haloween
Published: 2023-10-30 17:29:50

Suppose in the spirit of haloween, you want to add some haunting to your DWH. How do you do that?

1. Create a function that returns some strange messages
2. Call it from your pipelines to log the strangeness for lols
3. Watch the logs get haunted :)

Sample code below. Happy haunting!



```python
import requests
from bs4 import BeautifulSoup

import random


# Function to fetch spooky quotes from Goodreads
def fetch_spooky_quotes_goodreads():
    url = "https://www.goodreads.com/quotes/tag/spooky"
    response = requests.get(url)
    soup = BeautifulSoup(response.text, 'html.parser')

    quotes = soup.find_all('div', class_='quoteText')

    for quote in quotes:
        yield(quote.text)



def generate_dummy_data(num_rows=1000000):
    for i in range(1, num_rows + 1):
        data = {
            'ID': i,
            'Name': f'Name_{i}',
            'Age': random.randint(18, 70),
            'Gender': random.choice(['Male', 'Female']),
            'City': random.choice(['New York', 'Los Angeles', 'Chicago', 'Houston', 'Miami']),
            'Score': round(random.uniform(0, 100), 2)
        }
        if random.random() < 0.01: # 1% chance to print
            print(next(fetch_spooky_quotes_goodreads()))
        yield data



# view data
for row in generate_dummy_data():
    print(row)

# open connection
pipeline = dlt.pipeline(
    destination='duckdb',
    dataset_name='raw_data'
)

# Upsert/merge: Update old records, insert new
load_info = pipeline.run(
    data,
    write_disposition="merge",
    primary_key="id",
    table_name="users"
)

```
My 8 Key Smart contract Design Techniques
Published: 2023-10-31 06:18:28

_**Smart contract design is an essential process in smart contract implementation since it gives you a clear guide on how the smart contract will be developed, used and the way it will address the intended purpose during your development. It mainly intends to guide a developer to clearly get the main intention of the contract, the issue to address and the sectors that is intended to as well as the best practices to maintain the contract. 
Certainly below are my 8 preferred techniques I select as the best ones during my building.**_

1. **Clearly define Objectives**
Begin by clearly stating what your smart contract is supposed to do. Explain its purpose and what you expect it to achieve. Think about what it takes in, what it produces, and how it behaves.

2. **Security development**
Write your contract with security in mind. Check and validate the data it receives. Control who can do what by using "require" or use custom error handling(more robust) to set rules. Protect against tricky attacks, like reusing actions before they finish.

3. **Gas efficiency**
Be mindful of the cost of running your contract in terms of "gas." Minimize storage operations, which can be expensive. Use libraries and external contracts for repeating tasks. Avoid operations that could carry up high gas costs, such as long loops.

4. **External integrations**
Think about how your contract will connect with other contracts or services. Make sure it can talk to them smoothly. Consider using "interfaces" or special communication tools to link up with external things.

5. **Testing**
Test your contract thoroughly to make sure it works as expected. Try it out with different situations, even the unusual ones. You can use special testing software to help you do this.

6. **Security review**
Have experts look at your contract to find any security problems. Get outside opinions, like from security pros or companies that do audits. Fix any issues they find, especially ones that others have had trouble with before.

7. **Clear documentation**
Write down clear and detailed instructions for your contract. Explain how to use it, what it does, and how it handles problems. Make it easy for others to understand, including both users and developers. You may prepare a documentation or make a proffessional README.md in your development structure to clearly show case what your contract does so to make it is for developers who intend to use your contract.

8. **Continuos monitoring**
Keep an eye on your contract all the time. Watch for anything unusual, like unexpected costs or strange behavior. Be ready to act fast if something goes wrong, and consider keeping a record of what happens in your contract for monitoring.

Conclusively, Note that the above are only used by me during my development and do not limit other developer's opinions during their own building. If there is a suggestion or consultation, please don't hesitate to reach out to me either by DM or through public comments. 

Thanks,
**_Jonas Sebera_**