teleren/devto huggingface dataset:
What is Apple thinking?
Tags: news, ios, security, discuss
Published: 2021-08-09 14:00:35

It's been a few days. You've probably read about this.

## [Apple plans to scan US iPhones for child abuse imagery](https://www.ft.com/content/14440f81-d405-452f-97e2-a81458f5411f)

> Apple intends to install software on American iPhones to scan for child abuse imagery, according to people briefed on its plans, raising alarm among security researchers who warn that it could open the door to surveillance of millions of people’s personal devices.

> Apple detailed its proposed system — known as “neuralMatch” — to some US academics earlier this week, according to two security researchers briefed on the virtual meeting. The plans could be publicised more widely as soon as this week, they said.

> The automated system would proactively alert a team of human reviewers if it believes illegal imagery is detected, who would then contact law enforcement if the material can be verified. The scheme will initially roll out only in the US.

> Apple declined to comment.

Has Apple spoken more to this yet? I have yet to see anyone in our industry offer up rationale for why this company that fought so hard to deny the FBI access to a terrorist's iPhone is no proactively developing surveillance functionality into the device in this way. I think we can all agree that preventing child predators is a good thing, but not like this.

{% youtube VtvjbmoDx-I %}

With a few days to digest this and gather info/opinions, what are your thoughts?
Rectangle Path with SVG
Published: 2021-08-09 14:37:50

In this snippet, `rectPath` creates a rectangle with “move to” and “line to” commands to be used in conjunction with SVG paths.

{% codepen https://codepen.io/ZevanRosser/pen/KKmbpeY default-tab=js,result %}

_See more stuff like this over @ [Snippet Zone](https://snippet.zone/)_
Create such amazing art in python with just 11 lines of code
Tags: python, tutorial, todayilearned
Published: 2021-08-09 14:30:38

This might have been an normal image for most of you, but this image has been generated with python using [turtle](https://docs.python.org/3/library/turtle.html#module-turtle)

![Main image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r01ddc56dxmcjqpr7p1d.png)

## Code

```python
import turtle
import random
turtle.bgcolor('black')
turtle.colormode(255)
turtle.speed(0)
for x in range(500): r,b,g=random.randint(0,255),random.randint(0,255),random.randint(0,255)
    turtle.pencolor(r,g,b)
    turtle.fd(x+50)
    turtle.rt(91)
turtle.exitonclick()
```

```python
import turtle
import random
```

We need the turtle module to create graphics and random module to generate random colours needed for the lines.

`turtle.bgcolor('black')`
We now say turtle to use `black` colour canvas.

We now iterate over `500` times, this can be any arbitrary number on how many lines you want in the diagram.

`r,b,g=random.randint(0,255),random.randint(0,255),random.randint(0,255)`
This one liner give `r,g,b` with random values between 0 and 255.
 
`turtle.pencolor(r,g,b)`
We now set the turtle pen color, which means the colour of the line.

`turtle.fd(x+50)`
Here we move forward by `x+50` which means initially we move forward by `50` units then by `51` units then `52` so on till `50+499` units.

`turtle.rt(91)`
After each movement we turn right about 91 degrees.

`turtle.exitonclick()`
This will ensure the canvas doesn't close automatically until you click it.

If you like to see this in replit check it out below.
{% replit @RohithGilla/TurtleExample %}


Follow me for short and long posts

{% user gillarohith %}

My recent posts include deploying server less application in python, deploying full stack scalable application using Blitz JS.

Thanks
Visualize Financial Data With Sankey Diagrams in Python
Tags: programming, python, datascience, machinelearning
Published: 2021-08-09 14:21:38

#### Today I'll be showing you a unique, versatile and useful way of visualizing data in python.

************
[Sankey diagrams](https://www.python-graph-gallery.com/sankey-diagram/) are a great, yet often overlooked method of visualizing important data such as: resource management and usage, financial data such as income and investments, time management and allocation, expenses and much more!

************
For example, let's take a SaaS company(let's call it DatavizWRLD.com) and Josh, the CEO wants to see the company's monthly income, profit, expenses, and money management. We can give him an easy way of visualizing all those with a Sankey diagram:
![Sankey diagram](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o2mh5kw3agesxcst12v3.png)
![Sankey diagram hover](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/00143s1w2ks8jr5vrpll.png)
![Sankey diagram hover 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3hz2hcgeq41xvrx3usn6.png)
***********
As you can see, this Sankey diagram gives Josh a simple and effective way of visualizing his company's monthly income, profit, expenses, and money management.

***********
### Building your own!

_If you just want the code, voila( even though I advise that you stick around for the explanation because it might be difficult to understand from the beginning ):_
```python
import plotly.graph_objects as go

fig = go.Figure(data=[go.Sankey(
	node = dict(
	thickness = 5,
	label = ["Ads", "Net profit", "Total income", "ROI", "Paid services", "Investment", "Expenses", "Maintaining website", "Paying employes", "Advertising", "Personal expenses", "Savings"],
	color = "cyan"
	),
	link = dict(
		
	# indices correspond to labels
	source = [0, 1, 4, 2, 3, 2, 6, 6, 6, 1, 1],
	target = [2, 5, 2, 1, 2, 6, 7, 8, 9, 10, 11],
	value = [60000, 40000, 90000, 100000, 10000, 60000, 10000, 30000, 20000, 20000, 40000]
))])

fig.update_layout(
    title="DatavizWRLD.com monthly income and income management of 2021( in USD )",
    font=dict(size = 12, color = 'black')
)

fig.show()
```

**Let's make sense of all this**
* First, we import "plotly.graph_objects" as "go".
* Define "fig", this will be our Sankey diagram.
* Characterize the parts of our Sankey diagram with: thickness, color, and labels.
* Next, we define how and where the labels should connect to or disconnect from, as well as the value of each label.
(_The numbers on "source" and "target" are indices of the labels array_).
* Finally, we give our diagram a title colored black with a size of 12.

****************
### So there's that, a great and versatile yet underrated way of visualizing data in python. 

***********
Byeeeee👋
It's been a minute, but here's a gist to update your Vim dependencies.
Tags: vim, bash, security, git
Published: 2021-08-09 14:15:10

Howdy! It's been a while since I posted anything, so I figured I'd come post something simple and fun.

We all know that updating our system dependencies and our software dependencies is super important for system security, but what about our editor dependencies? That module that you installed for VS Code or Vim or Emacs, what about if security or stability fixes are made?

VS Code solves this problem by having an auto-update capability, and there are several other editors and IDEs which do the same. Unfortunately, those of us who are into the classics (Vim and Emacs are still very widely used) have frequently been left to fend for ourselves.

I've been a Vim user for more than 25 years now (yes, I'm old; it happens), and I use a module manager called "Pathogen" for getting modules running in Vim. It's a pretty common package manager, and almost every module on [VimAwesome.com](https://vimawesome.com) supports it. It's pretty simple, and to install a module with Pathogen all you do is check it out from Git into the `~/.vim/bundles` folder. It'll pull the primary branch, and from there once you start Vim the Pathogen package manager sets it up and gives you the functionality.

One of my favorite parts of this is that you can update modules with a simple `git pull`, but you have to run it in the working director for each of the modules. With a really simple bash script, that's easy to do.

{% gist https://gist.github.com/manchicken/08aa4f5652300fd1a1f224d2d74f589c.js %}

If you're like me, and you have a folder with a bunch of git repos checked out, you can also parameterize the directory that it uses as the base folder and update _all_ of your Git repos in a single command. If you do this, though, make sure you remove the `--reset` flag as that will wipe out local changed to tracked files.

Anyway, I'm gonna get back to work now. Have a great day.
Login responsive Taildwindcss + Tabler Icons + Google Fonts 🎨
Tags: tailwindcss, css, html, spanish
Published: 2021-08-09 14:02:41

Hace pocos días que estoy probando Tailwindcss como framework css para realizar proyectos personales y hasta ahora con lo poco que se estoy más que complacido.

A continuación les comparto un login responsive bastante básicaoque pude hacer, espero les sirva de algo.

El login como tal se ve de la siguiente manera: 

![img](https://raw.githubusercontent.com/crisdux/login-responsive-taildwindcss/main/public/img/cel.png)
![img](https://raw.githubusercontent.com/crisdux/login-responsive-taildwindcss/main/public/img/tablet.png)


Y el repositorio completo en Github puedes verlo acá:

{% github crisdux/login-responsive-taildwindcss %}
Two Types of Consulting
Tags: consulting
Published: 2021-08-09 13:51:20

![2 views of a bridge](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y5legt0i35f0u0muluhb.jpg)

Working with a client recently, I was reminded of what I call the "Two Varieties of Consulting".  I've seen this pattern many times over the 10+ years I've been running my own cloud and data [consultancy](https://lynnlangit.com/).

## Traditional - Solved by Consultant

👩‍💻 Another way to think about this method is based on what I like to call using a focused approach to consulting. The sentence below is another way to think about this idea.

>*Get the urgent work done as fast as possible.*

- Solve an immediate problem via outside experience
- Problem will be solved to the level of complexity based on consultant knowledge
- Focus will be on deploying running code ASAP
- Minimal (or no) tests or verification of correctness
- Billing will be deliverable-based
- Consultant will have minimal interaction with existing team
- Consultant will complete project and leave

Usual Results: solution works when run by consultant, but solution is often not maintainable by team due to complexity and lack of documentation. Solution code becomes brittle over time and team is unwilling to update it (it breaks when changed).  Sometimes the solution is not actually deployable to existing production environment.

---

## Modern - Solved by Team 

👨‍💻 👱🏿 👩‍💻 👩‍💻 🧕 Another way to think about this method is based on what I like to call using a consultative approach to consulting. The sentence below is another way to think about this idea. 

>*Do what can be done together*

- First step is listening to access current situation - problem(s), team and code
- Next agree on priority project with stakeholders and team
- Conduct detailed assessment of current technical implementation (expect surprises!)
- Create implementable plan to address top priority problem
- Present plan which includes information about learning techniques suggested
- Include path to implement and next suggested project in presentation
- Include test and verification steps in plan
- (Optional) work side-by-side with team to implement on their timeline
- Engage for next round based on team input

Usual Results: When solution is implemented it works as expected and is maintainable (and by association extendable by team).
Python + Flask (from Windows WSL) on Heroku.
Published: 2021-08-09 04:52:56

This week I was working on a "hackathon" project that involved an application written in Python and served through Flask.  I decided for testing that I would host it on Heroku.  Here's what I had to do in order to get it up and runnning.

Following the steps in https://devcenter.heroku.com/articles/getting-started-with-python, revealed to me that there were no specific steps for using Flask.  So going through the steps, I'll talk about where you diverge - specifically as it pertains to making this happen on Windows (WSL).  ***These steps will not make the app able to run locally, this will only configure the Heroku deployment to run on Heroku.

1. Installing the Heroku CLI: In Windows WSL, if you are using Ubuntu for your Linux OS, you would follow the Ubuntu instructions:
```
curl https://cli-assets.heroku.com/install.sh | sh
```
Once installed, you can use the heroku command from your command shell (you might need to close and reopen your terminal)
```
heroku login
heroku: Press any key to open up the browser to login or q to exit
 ›   Warning: If browser does not open, visit
 ›   https://cli-auth.heroku.com/auth/browser/***
heroku: Waiting for login...
Logging in... done
Logged in as me@example.com
```
(all of these commands were taken from the original Heroku devcenter article)
You have now installed the Heroku CLI

2. Clone the Heroku sample Python app (it is a Django app, but we'll change that later)
```
git clone https://github.com/heroku/python-getting-started.git
cd python-getting-started
```

3. Deploy the sample app
```
heroku create
Creating app... done, ⬢ serene-caverns-82714
```
```
git push heroku main
...lots of stuff here, ultimately...
remote: Verifying deploy... done.
```
Make one instance of the app to run
```
heroku ps:scale web=1
```
And view it in your web browser
```
heroku open
```
(If that doesn't work, just copy the URL that is generated during the 'git push heroku main' step)

4.  You have deployed the sample (Django) app.  Now let's make some changes to make a Flask app.

When you cloned the original git sample repo, four of the files cloned are where we are going to make our changes:
procfile
```
    web: gunicorn app:app
```
requirements.txt
```
    gunicorn
    flask
```
runtime.txt
```
    python-3.9.6
```
app.py
```
from flask import Flask

app = Flask(__name__)

@app.route("/")
def hello_world():
    return "<p>Hello, World!</p>"
```

5. Now one more round of
```
git push heroku main
```
and Heroku will take it from there.  Heroku reads the 'requirements.txt' file and knows to change the existing (remote) installation from Django to Flask.  You can now write whatever Python you want and it will serve through Heroku as a Flask app.
Promise.allSettled explained - Little Bits
Tags: javascript, typescript, async, promise
Published: 2021-08-09 13:32:13

##### Little Bits is a series of short articles explaining quick solutions to common dev problems. No unnecessary descriptions or code snippets. No bullshit.

In this episode, I want to show you a really powerful tool for working with Promises - `allSetled` method.

# Problem

Imagine that you have two fetch methods, that are getting some data from external APIs. When both of them returns that data, you combine it and pass it down to your client. Methods are parallel and you use `Promise.all` method. When one of them fails, you fail the whole service and return an error - a pretty common scenario. Let's see how that might look like:

```tsx
const fetchMeSomeData = fetch('/url');
const fetchMeSomeOtherData = fetch('/other-url');

const [data, otherData] = await Promise.all([fetchMeSomeData, fetchMeSomeOtherData]);

return mapTheResponse(data, otherData)
// Manipulate the `data` and `otherData` and return to the client
```

Now imagine your PM comes to you and says "That's all good, but we want to change the behaviour. If the `otherData` call will fail, we want to map the response only based on `data` - we can ignore the `otherData`".  How we can achieve this?

# Solution

We can use the `Promise.allSettled` method, which gives us better control over the flow.

```tsx
const fetchMeSomeData = fetch('/url');
const fetchMeSomeOtherData = fetch('/other-url');

const [data, otherData] = await Promise.allSettled([fetchMeSomeData, fetchMeSomeOtherData])

if(otherData.status === 'rejected') return mapTheResponseWithoutOtherData(data.value);
if(data.status === 'rejected') throw new Error('Not enough data');

return mapTheResponse(data.value, otherData.value);
```

As you can see, this gives us more options when it comes to controlling the behaviour of our fetch methods. We can ignore the failed `fetchMeSomeOtherData` method and focus only on the response from `fetchMeSomeData`.

# Summary

This handy method was release in the ES2020 edition, so it's relatively new to the JS/TS ecosystem, but as you can see, it's very powerful and allows us to have much more control over our code flow. If you want to learn more about it, check out the [MDN page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled).
Python Increment - Everything you need to know
Tags: python, programming, tutorial, beginners
Published: 2021-08-09 13:19:44

In this short tutorial, we learn about how to increment in Python. We also look at why the unary increment/ decrement operator does not work in Python.

This tutorial is a part of our initiative at [Flexiple](#https://flexiple.com/), to write short curated tutorials around often used or interesting concepts.

### Table of Contents - Python increment
- [Why doesn’t the “++/--” operator work in Python?](#why-doesnt-the-operator-work-in-python)
- [Python Increment](#python-increment)
- [Code and Explanation](#code-and-explanation)
- [Python increment - Closing thoughts](#python-increment-closing-thoughts)

## Why doesn’t the “++/--” operator work in Python?
If you have used programming languages like C you have likely used the ++/ -- operator to increment or decrement a variable. However, if you have tried the same in Python you would receive an Invalid Syntax error.

Python does not treat variables the same way as C. Python uses names and objects and these values are immutable. The below examples would help you get a better understanding of this concept.  

Let us assign the same integer value to multiple values and check the Id of the objects. 

```python
a = b =  c = 1

print(id(a))
#Output - 1833296619824

print(id(b))
#Output - 1833296619824

print(id(c))
#Output - 1833296619824
```

As you can see since all the variables have the same values Python assigns the same value for all the objects. Python does this to increase memory efficiency. 

Now if the value of one variable is changed, Python changes the value by reassigning the variable with another value. 

```python
a = b =  c = 1

a = 2

print(id(a))
#Output - 1825080174928

print(id(b))
#Output - 1833296619824

print(id(c))
#Output - 1833296619824
```

Since the value of ‘a’ was changed, Python creates a new object and assigns it. However, the value of ‘b’  and ‘c’ remains the same. 

In languages like C, each variable is given a value, if that value is incremented only that variable is affected. Since that is not the case in Python increment works differently. 

The value needs to be reassigned and incremented by 1.
 
## Python Increment:
Since ints are immutable, values need to be incremented and reassigned.

This can be done using a = a +1, but Python supports a += 1 as well. 

## Code and Explanation:

```python
a = 1

a += 2

print(a)
#Output - 3
```

The above code shows how to increment values using Python increment. You could use the Id function before and after the values and check how the id changes after you have incremented the value. 

## Python increment - Closing thoughts:
Python increment can be quite easy to learn in case you are coming from another language. In case you are new to it, I would recommend you practice Python increment a few times. 

And in case you are wondering where Python increments are used, they are used to count occurrences of a particular instance. Eg: Likes, log in, etc.
Matter & Legal Case Management Software
Published: 2021-08-09 13:13:14

https://www.legalfiles.com/

Legal case management or matter management software provides standard tools for lawyers to oversee their practice. Law firms utilize these tools as a database for past, ongoing, and future cases and clients. This can include document assembly for relevant case details, notes on the opposition when applicable, time tracking, and any other case-related information. Legal case management software often integrates with ediscovery tools to gather relevant case information, and integrates or comes packaged with legal billing software to track man-hours and process fees from clients.
FREE CRM for Freelancers and Small Businesses
Published: 2021-08-09 13:06:37

I recently created a small CRM for freelancers and small businesses. and I decided to share with you all for FREE. its build on top of Laravel 8. to check out and download for FREE https://store.codeconia.com/gmax-crm-lite 
help me to spread to this to those who really need it

and yes .. you can feel free to customize and resell as well
Make your live HTML website editable in seconds
Published: 2021-08-09 10:44:12

Hi Everyone 😀
We have created an extremely convenient editor/CMS for static websites (www.frontecs.com)

💡 Frontecs is a self-hosted database-free website editor that instantly integrates into existing HTML websites at a fixed price. Users can publish their editable website on any Cpanel server and make content & metadata changes right on a live website's layout.

📢 Frontecs Editor gives a rock-solid competitive advantage to website developers, increasing their income and making their product/service more attractive in the market.
With Frontecs Editor, web designers can distinguish themselves from their competitors by incorporating an easy-to-use, cutting-edge technology website editor into their products in no time.

📢 On average, developers would spend around a month manually creating and incorporating similar technology into an existing HTML website with about a $1,000 budget.
With Frontecs Editor, users spend a couple of minutes integrating editing features into any HTML website, paying a fixed cost of $52 for a $1,000 technology.

✔️ Our users don't have to register to test or purchase the Frontecs editor. Frontecs platform is open to any experiments.
✔️ We don't force our users to publish their editable website on our server to use the editor. Users can independently host their editable websites on any external server.
✔️ Our product is white-labeled - users can re-sell our technology as their own product.
✔️ We offer only a fixed price for our product, which means that our users are free of monthly charges.
✔️ Frontecs is a database-free editor. Our users don't have to create complicated databases on a server-side to run the editor. After downloading their existing website's editable version from the Frontecs platform, users can upload it into any Cpanel server and start editing their live website on the go.

🙋 We'd love to get some feedback and always happy to answer your questions!
Mein LifterLMS Review
Tags: wordpress, lms, wordpresslms
Published: 2021-08-09 12:47:02


LMS steht für Learning Management System und ist ein Plugin, das für jeden Benutzer ein Benutzerkonto und für jeden Schüler ein Benutzerkonto erstellt. Der Schüler braucht also einen Account über das LMS, um auf das Material im Kurs zuzugreifen. Der Schüler kann sich auch über das LMS einloggen, um in seinem eigenen Benutzerkonto auf das Kursmaterial zuzugreifen.

In diesem Review werden wir uns auf das volle Potential des [Lifterlms WordPress Plugins](https://kursprofi.com/review/lifterlms/) konzentrieren.