teleren/devto huggingface dataset:
Learn Haskell
Published: 2022-08-26 11:03:00

## Starting Out
## Haskell
 is a lazy, purely functional programming language created in the late 1980s by a committee of academics.
when we say that Haskell is a functional language, we usually have in mind two things:

1) Functions are first-class, that is, functions are **values** which can be used in exactly the same ways as any other sort of _value_.

2) The meaning of Haskell programs is centered around _evaluating _expressions rather than executing instructions.

-## **Pure**
:-No mutation! Everything (variables, data structures...) is immutable.
Expressions never have “side effects” (like updating global variables or printing to the screen).
Calling the same function with the same arguments results in the same output every time.
-## **Lazy**
:-expressions are not evaluated until their results are actually needed
-## **statically typed**
:-Every Haskell expression has a type, and types are all checked at compile-time. Programs with type errors will not even compile, much less run.

## functions:-

``doubleMe x = x + x `
`doubleUs x y = doubleMe x + doubleMe y  ` 

`--else is most in haskell`
`doubleSmallNumber (x = if x > 100 then x  else x*2  )``

## LIST
In Haskell, lists are a homogenous data structure.

If you want to get an element out of a list by index, use !!. The indices start at 0.
`"Steve Buscemi" !! 6  `
`'B'  `

## Here are some basic functions that operate on lists.

**'head'**-->takes a list and returns its head. The head of a list is basically its first element.
**'tail'**-->takes a list and returns its tail. In other words, it chops off a list's head.
**'last'**-->takes a list and returns its last element.
**'init'**--> takes a list and returns everything except its last 
 element.
**'length'** takes a list and returns its length, obviously.
'null' checks if a list is empty.

## ranges

`[1..20]--oupt[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]  
 [2,4..20] --output [2,4,6,8,10,12,14,16,18,20]   
 ['a'..'z'] `

**cycle **takes a list and cycles it into an infinite list. If you just try to display the result, it will go on forever so you have to slice it off somewhere.
`take 10 (cycle [1,2,3]) `
`[1,2,3,1,2,3,1,2,3,1]  `

**repeat **takes an element and produces an infinite list of just that element. It's like cycling a list with only one element.
`take 10 (repeat 5) `
`[5,5,5,5,5,5,5,5,5,5]  `

## list comprehension
`[x*2 | x <- [1..10]]  --x is range from 1 to 10 than square x's item`
output--> [2,4,6,8,10,12,14,16,18,20]  

**zip.** It takes two lists and then zips them together into one list by joining the matching elements into pairs.
`zip [1..] ["apple", "orange", "cherry", "mango"] `
`[(1,"apple"),(2,"orange"),(3,"cherry"),(4,"mango")] `
Milestones
Published: 2022-08-26 14:41:00

So now that we have had our first Umbrella Project demo, milestones is the topic. Looking back at when my journey started I have had a few. A little over a year ago when I finally found a career interest that was worth pursuing. Working on free code camp and seeing my changes happen in real time was when the light bulb went off. Finally having that sense of accomplishment as I progressed, was something I had been missing for so long.

My biggest milestone to date was finishing Code School and presenting my project on Demo Day to the local tech community. There was many times throughout that I wasn't sure if I was going to make it. Constantly working 7 days a week, pretty much all day on assignments was grueling. I couldn't just give up though, I had come too far. It was all worth it in the end when my final project was completed. The accomplishment I felt the first weekend after my presentation was the best feeling ever.

My most recent milestone was being accepted to Develop Carolina. Having a chance to continue to learn more general skills, while also working with a company and getting paid is a great opportunity. It's hard to step back and notice sometimes, but I've already learned so much in my short time in the program. I'm sure I will hit a few more milestones during my time at DC. 

It's nice to reflect on the milestones I've had in my short time pursuing this career. I look forward to having many more!
Sugar Rush – An open source dashboard to manage Metaplex Candymachines and NFTs in Solana
Tags: web3, typescript, opensource, react
Published: 2022-08-26 14:39:00

Get the full source and test the live app in [github](https://github.com/boxfish-studio/sugar-rush).

Features (v1.0.0):
- See, create, manage, and delete your candymachines
- Preview available NFTs to mint
- See minted NFTs
- Mint new NFTs
- Provide links of items to solana.fm explorer
- Compatible with Phantom, Solflare, Torus, Sollet, Glow and Slope extension wallets
- Support for Devnet and Mainnet
How To Remove The HTML Extension From a URL on Netlify
Tags: webdev, tutorial, beginners, productivity
Published: 2022-08-26 14:22:48

Recently, I was asked how to get rid of the HTML prefix from a URL on a website hosted on Netlify. It's pretty straightforward, but I thought it would be helpful to walk you through the process.

If you don’t know what I’m talking about here, it’s when you visit a website and the URL looks something like this – https://example.com/about.html. Specifically, the .html part is the problem here as most people would prefer to see https://example.com/about instead. It’s nicer, don’t you think?

## How to do it?

Go to Site settings, click Build & deploy and then Post processing.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lcn2dc3a0vmar5k9p11b.png)
 
 
Under Asset optimization, click edit settings and enable asset optimization.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/54qflmu2trn2d5uvfwmc.png)
 
That's it!

## What is Asset Optimization?

To summarize, “asset optimization” involves minifying (compressing) and merging assets (JavaScript, CSS, images) to improve the time it takes to download and display the content on a webpage.

What gets optimized with Netlify’s asset optimization?

Content file types, such as:
- CSS
- JavaScript
- common image formats
- content referenced from other places on your site
this includes links like /path/to/asset.png or ../asset.png or /asset.png
it does not include links like https://site.netlify.com/path/to/asset.png
files not referenced directly by any page of the site will not be optimized

**Note**: If you reference a file/image without a preceding forward slash (/), this can cause the image not to be optimized. Why? This happens when the file is not in the same path as the page itself, so the file isn’t located where the asset optimization expects it to be. If we cannot find the file where it is expected, it won’t be processed.

Something else to keep in mind is that all content processed by the asset optimization system will always be served from a separate CDN (Content Delivery Network). Assets on that CDN currently always have a URL beginning with https://d33wubrfki0l68.cloudfront.net. Also, please note that even if an asset is unchanged (meaning not minified) for some reason, if the asset optimization processed it, it will be served from this CDN.

You can learn more about these settings in their [netlify.toml reference docs](https://docs.netlify.com/configure-builds/file-based-configuration/#post-processing).
5 Useful Resources That Are Worth Your Time
Tags: productivity, career, design, computerscience
Published: 2022-08-26 14:18:04

Here are a few articles and video courses that are worth your time:

1. "Productivity Porn." Caleb Schoepp coined the term to describe anything that, after consumption, makes you feel productive when, in reality, you didn't do anything. It stimulates you without even performing the act, just like regular pornography. Read this article by Caleb Schoepp about productivity porn, examples, and its effects in real life. (5 minute read):
https://calebschoepp.com/blog/2022/productivity-porn/

2. System design is one of the first decisions we can make when building a system. System design is the process of defining the architecture, interfaces, and data for a system that meets specific requirements. This comprehensive course will teach you almost everything about the system design process, including the OSI model, CDN, databases, and so on. (3.2 hour read):
https://kps.hashnode.dev/system-design-the-complete-course

3. Docker is an open platform for developing, shipping, and running applications. In this course, you will gain a thorough understanding of the concepts as well as a comprehensive overview of how Docker is used throughout the software development process. The course is a combination of animated theoretical explanations and hands-on demonstrations that you can follow along with. (2.7 hour YouTube course):
https://dev.to/techworld_with_nana/full-docker-course-free-4hl3

4. Python is the fastest-growing programming language among developers, and companies are using it in almost every industry, such as machine learning and web development. If you want to become a Python developer and looking for a complete 2022 Python Developer RoadMap then this illustrated guide is for you. (8 minute read):
https://medium.com/javarevisited/the-2022-python-programmer-roadmap-bafb365071a3

5. JavaScript can be used to create a wide variety of games. And JavaScript games can run on almost any device that has a web browser. This course will teach you how to create 2D games using HTML, CSS, and plain vanilla JavaScript, with no frameworks or libraries. (9.6 hour YouTube course):
https://www.freecodecamp.org/news/learn-javascript-game-development-full-course/

Quote: “Focus on being productive instead of busy.” — Tim Ferriss

I hope you found something helpful in this post. You can also find me on [LinkedIn](https://www.linkedin.com/in/vishwas-tyagi/) and [Twitter](https://twitter.com/vishwast03).

Cheers and see you in the next one! ✌️
Appwrite Community Report #20
Published: 2022-08-26 14:16:28

Hello everyone! Greetings from team Appwrite 👋

We are back with our weekly community report, to share with you all what Appwrite has been up to! 🤩 

**TLDR;** This week we have updates on Appwrite loot, bugs fixed, work-in-progress, learning resources and more! 

---

## 📢  What’s new 

- Today is the last day of Appwrite monthly loot! Submit your memes to get your hands on some cool swags! 🎁
{% embed https://twitter.com/appwrite/status/1559555617748144128?s=20&t=lNtiXk-0fzvGCAmcHZ_ZoQ %}

- We just announced our 5th OSS Fund sponsored project! 
{% embed https://twitter.com/appwrite/status/1562799097756909570?s=20&t=zZ0WbT6iUbFJl3z4_AIuGg %}
If you are an open source maintainer, who would like some support from Appwrite, the good news is - We are still accepting [applications](https://appwrite.io/oss-fund)!


---

## ✅ Issues solved

Here’s to making Appwrite better everyday! Issues we have worked on this week:


- Improve error message regarding unique indexes
🔗[Link to PR](https://github.com/appwrite/appwrite/pull/3711)

- Allow `null` in equal queries
🔗[Link to PR](https://github.com/utopia-php/database/pull/169)
- Fixing multi-execution of function
🔗[Link to PR](https://github.com/appwrite/appwrite/pull/3696)
- Addition of new runtime templates
🔗[Link to PR](https://github.com/appwrite/functions-starter/pull/33)

---

## ⚒️ What we’re currently working on

- Adding proper CRUD operations for function variables
- Allowing query to Appwrite Services just like database
- Fixing environment variables missing in Swift
- Fixing payload explanation in function templates

---

## 🗣 Discussions

What do you think about this discussion on dynamic validations/permissions? 
🔗[Join the discussion here](https://github.com/appwrite/appwrite/discussions/3705)

---

## 📘 Resources

- Running Self-Hosted Serverless Code with Appwrite Functions
{% embed https://youtu.be/D6TGDn-dM4A %}
- [Building a WhatsApp clone](https://www.youtube.com/watch?v=Jd5Vcj3jS5Y&t=3s) with Appwrite and Vue3 by [Jacob Beckerman](https://twitter.com/JacobBeckerman)
- New to Appwrite? Now you can learn about it in 30 days! {% embed https://30days.appwrite.io/ %}
This Week In Python
Tags: python, discuss, thisweekinpython
Published: 2022-08-26 14:09:13


**Fri, August 26, 2022**


This Week in Python is a concise reading list about what happened in the past week in the Python universe. 


## Python Articles

- [Python tops programming love list – but if you want a job, learn SQL](https://www.theregister.com/2022/08/24/ieee_python_language/)
- [Python Match Case is more powerful than you think](https://guicommits.com/python-match-case-examples/)
- [10 Python Interview Questions for Senior Developers](https://medium.com/techtofreedom/10-python-interview-questions-for-senior-developers-4fefe773719a)
- [Understanding async Python for the web](https://www.b-list.org/weblog/2022/aug/16/async/)
- [Python Decorators: a brief intro with usage examples](https://www.b-list.org/weblog/2022/aug/16/async/)




## Projects

- [bibaandboba](https://github.com/andylvua/bibaandboba) – Python package for analyzing Telegram chats and finding correlations between people 
- [python-ds](https://github.com/prabhupant/python-ds) – No non-sense and no BS repo for how data structure code should be in Python - simple and elegant
- [asyncer](https://github.com/tiangolo/asyncer) – Asyncer, async and await, focused on developer experience
- [diffusers](https://github.com/huggingface/diffusers) – State-of-the-art diffusion models for image and audio generation in PyTorch
- [system-design-primer](https://github.com/donnemartin/system-design-primer) – Learn how to design large-scale systems. Prep for the system design interview


## What other links did I miss? What did you find?
What is Arbitration and How Law Blocks Platform serves Globally.
Published: 2022-08-26 13:59:13

Public trials in appropriate court is the best way to resolve criminal and Revenue Disputes, another
best way to resolve business dispute through ADR is Arbitration.
What is Arbitration?
Arbitration is a procedure in which a business dispute is resolved through Arbritratator, two or more disputing parties agree to the Arbitration Board and cases are filed and resolved. It is one of the best way ADR (Alternate Dispute Resolution) to resolve disputes. The parties select an Arbitrator, a neutral third party, to hear their contentions and render a verdict. Arbitration can happen in and out of the court. The hearing is held in which both parties offer testimony and supporting documentation.
When parties to a business dispute select arbitration as a mode to resolve dispute, a Party to the dispute (or sometimes a panel of three or more) is called an "Arbitrator" to investigate the facts,
analyse the dispute, and render a decision on the matter. Usually, this is done in a process very similar to a trial, though with looser procedural requirements and shorter time frames. The parties agree that the arbitrator's decision is final and binding and that the courts will enforce the decision
if either party violates it.
An arbitrator presides over a hearing (the arbitration) in which witnesses testify and documents are considered, much like court litigation. Discovery and pre-hearing procedures are typically limited and abbreviated to accelerate the process and keep costs down, but the parties' agreement can extend this.
Similarly, the parties can institute other cost-saving measures such as eliminating transcripts and briefs if they agree to these measures. Appeals from arbitration decisions are only available on very limited grounds and are rarely successful. Although arbitration is more formal and expensive than mediation, it is still less expensive and more expeditious than litigation.
Law Blocks help to take this Arbitration process online through our global legal expert community. The final legal contract will record on XDC Network’s blockchain, and users will settle the platform and lawyer fees in LBT token (XRC20 Token). LBT can be accepted globally, allowing one to go with world- class experts without any hustle of payment. The community can now buy LBT on Bitrue and on many more Leading exchanges shortly.

Follow us:
LinkedIn: https://www.linkedin.com/in/law-blocks-365731225/
Twitter: https://twitter.com/lawblockstoken
Reddit: https://www.reddit.com/user/LawBlocks/comments/rd873t/law_blocks_a_legaltech_community/
Discord: https://discord.gg/9eRv89bt
YouTube: https://youtube.com/channel/UCbg3ToXjksIHOpsxl8YsO_A
Website: https://lawblocks.io/
Building in CodeSandbox with Adewale "Ace" Abati
Tags: webdev, javascript, beginners, podcast
Published: 2022-08-26 13:58:57


Original: https://codingcat.dev/podcast/2-36-Building-in-CodeSandbox-with-Adewale-Ace-Abati

{% youtube https://youtu.be/5azEeJEyb1o %}

## Questions

1. Can you tell us more about yourself?
2. Can you tell us what dev is like in Nigeria? It seems to be getting bigger every month.
3. How does someone typically use [CodeSandbox](https://codesandbox.io/)?
4. How is [CodeSandbox](https://codesandbox.io/) different than 
  1. [CodePen](https://codepen.io/)
  2. [GitPod](https://gitpod.io/)
  3. [StackBlitz](https://stackblitz.com/)
5. Does CodeSandbox have plans to move to web containers vs spinning up Docker containers?
  1. [https://codesandbox.io/post/open-beta](https://codesandbox.io/post/open-beta)
6. Demo Time: Can you show us how to interact
7. [Getting started with Docker](https://codesandbox.io/docs/projects/tutorial/getting-started-with-docker)
AM I IN THE RIGHT PLACE?
Tags: beginners, devops
Published: 2022-08-26 13:58:23


I just joined the DEV community and it’s really daunting! 
Everyone seems so knowledgeable in their various fields. Frankly speaking, that’s really wonderful  but it’s also quite uncomfortable because I’m a beginner. 

I recently discovered the world of software development,  I sincerely wish I discovered this earlier. Spent an unusual amount of time doing research on YouTube, GitHub, Quora, LinkedIn…etc. Name any platform and I promise you, I HAVE BEEN THERE! I found so much information some were great others were…meeeeh(sigh) 

I discovered from my research that; everyone in the field has their own opinion, i have read articles and watched videos about “Why you should or shouldn’t get into whatever tech related field you’re trying to get into”. 
I discovered the age old debate ( Is it better getting a degree or self learning?)
I’ve heard how difficult it is to self learn. I heard the term “burnout” so much I doubt that word is ever leaving my mind.
Lastly, I discovered that there are so many free resources for learning if anybody wants to. 

I asked myself so many questions before making a decision. Would I be successful in this field?
Sincerely, I don’t know.
Would I start and not see this through?
Again, I can’t tell but I really want to see this through.
Do I want to be an average developer?
Seriously? Who wants that?
If I don’t put in my best? Would I regret one day?
Absolutely! I hate “what ifs” I would rather put in my best and know it didn’t work out than wonder what could have happened if it did. Unanswered questions really bug me. 
Do I have a mentor and a community for guidance, coaching and learning?
I believe this is really important and this is why i am here. I’m sincerely not sure if I’m in the right place because I’ve not yet seen someone like me who’s just a beginner. 
Everyone here seem quite knowledgeable in their various fields. Currently, my contribution to this community would probably be minimal but I really hope as time progresses, as I grow in knowledge and experience I can become a valuable addition to this community.  
Any help, advice and mentorship I can get from anyone here would be most welcome. 
I’m definitely not the best writer but I hope this was not a terrible reading experience.
A Spotify robot
Tags: scraping, beginners, python
Published: 2022-08-26 13:41:57

# Spotify robot

I want to scrape a Spotify playlist from a web page, at first I try to use selenium, but it is not obtaining the full list, as the song list is dynamically loaded, I must scroll down to the bottom, then it can load all songs.

Finally, I find one Visual Studio Code automation development tool, [clicknium](https://marketplace.visualstudio.com/items?itemName=ClickCorp.clicknium) (it should be new in 2022), it is really easy to use and one click to locate the UI element.
I just need to record two locators and write several lines of python code, the job is accomplished.

As the list is dynamically loaded, I use an iterate index to search each item, as [clicknium](https://www.clicknium.com) can automatically scroll the item into view, it will trigger to load new items, so I don't need to take care of the dynamic loading.

I use a parametric locator for title and author

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


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

As one item may have multiple authors, so I use the following code to get multiple author's names and links:
```python
    element = tab.find_element(locator.chrome.open.div_author, {'index':index})
    authers = element.children
    for item in element.children:
        artist.append(item.get_text())
        link.append(item.get_property('href'))
```

If you want to try Clicknium, you can get started with the video on clicknium official site.