teleren/devto huggingface dataset:
Backend PHP and Backend Machine learning Python
Tags: note, webdev, productivity
Published: 2022-05-30 13:54:48

This for my note but if someone read my article is not problem, I think dev.to is good best place for write content development.

I try find article in internet how communicate PHP backend and Python Backend, as I know too, PHP is backend programming for Web development, but python also backend programming for web or machine learning. python better for machine learning.

in my case the apps have exiting in php and want digitalization with machine learning in python. i know python have django, but maybe it's be long time ti re write code from php to django.

I found some the answer from my question from, quora, stack overflow.

- quora : 
https://www.quora.com/Is-it-possible-to-connect-Python-machine-learning-program-on-PHP-code-which-will-direct-the-code-to-AWS-Amazon-web-services-to-run-the-code-and-send-back-the-result-to-PHP-code-and-then-use-that-Python-code-output

- stack overflow : https://stackoverflow.com/questions/65512366/python-to-front-end-communication

- stack overflow :
https://stackoverflow.com/questions/5965655/communication-between-php-and-python#:~:text=You%20want%20inter%2Dprocess%20communication,and%20send%20it%20its%20status.

some poeple say this proses is say "inter-process communication" what is that ? okey, I am try search in google.

"In computer science, inter-process communication or interprocess communication (IPC) refers specifically to the mechanisms an operating system provides to allow the processes to manage shared data. Typically, applications can use IPC, categorized as clients and servers, where the client requests data and the server responds to client requests." - wikipedia

and some people give suggest try with communication process like socket mechanism and here MDN Mozilla have some documentation about socket https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API.

and some people give suggest try with API end point in python with flask. so this the answer

"You can create API endpoints for your Python app that accepts requests and pass results to your PHP front-end. If you insist on doing it this way, I recommend using the Flask framework as it gives you super easy ways to set up your API."

okay in summary what i get, 
1. fist I need learn about python fundamental , architecture, oop, and framework.
2. find out about socket and API consep pros and cost for machine learning mechanism integrate with another programming language
3. try build simple apps

if I know new, I will update here
to be continue ...
Day 2 - Comments and NatSpec
Tags: solidity, 100daysofcode, web3, blockchain
Published: 2022-05-30 13:44:00

This is Day `2` of `30` in Solidity Series
Today I Learned About Comments and NatSpec Format in Solidity.

Solidity supports both C-style and C++-style comments, Thus −

- Any text between a // and the end of a line is treated as a comment and is ignored by Solidity Compiler.
- Any text between the characters /*and*/ is treated as a comment. This may span multiple lines.

```solidity
// This is a Single Line Comment

```

```solidity
/*

This is A Multi-Line Comment 
It can also Include Emojis 😃

*/

```

### NatSpec Format

Solidity contracts can use a special form of comments to provide rich documentation for functions, return variables and more. This special form is named the Ethereum Natural Language Specification Format (NatSpec).

```solidity
/// This is NatSpec Single Line Comment
/// @title This is a Title
/// @author Author Name
/// @dev Please use this in this way
```

```solidity
/**
This is NatSpec Multi Line comment
This is Line 2
And so on....
*/
```

More on NatSpec - [here](https://docs.soliditylang.org/en/latest/natspec-format.html#)

{% embed https://github.com/Envoy-VC/30-Days-of-Solidity noreadme %}
Change Git default branch name
Tags: git
Published: 2022-05-30 13:34:38

Prior to Git 2.28, the default branch name when `git init` is used is `master`. 

To change the default branch name use the command

`git config --global init.defaultBranch [new default name]`

More details, can be found [here](https://github.blog/2020-07-27-highlights-from-git-2-28/#introducing-init-defaultbranch).
Hotwire + Tailwind: Fade In without Javascript
Tags: hotwire, tailwindcss, ux, tutorial
Published: 2022-05-30 13:31:48

This article will outline how to fade in a loaded turbo frame without additional Javascript.

<sub>**_Disclaimer - The setup includes Tailwind configuration which is technically Javascript._**<sub>

---

### Idea and Setup

Sometimes just loading content to a turbo frame feels rather jerky. Adding a simple fade-in can work miracles and make the app feel smoother and faster. 

The usual approach to this is adding a Javascript animation. Fortunately, it is possible to add the same exact effect with just CSS. 🥳

---

### Adding CSS animations to Tailwind

The setup for Tailwind is pretty straight-forward. The whole idea is to add a CSS animation that turns the element's opacity from 0% to 100%. 

```javascript
// tailwind.config.js

module.exports = {
  // ...
  theme: {
    extend: {
      animation: {
        "fade-in": "fadeIn 0.15s ease-in-out"
      },
      keyframes: () => ({
        fadeIn: {
          "0%": { opacity: 0 },
          "100%": { opacity: 1 }
        }
      })
    }
  }
}
```

Now this animation will be available by adding an `animate-fade-in` class to an element. 💆

---

### Using the fade-in on a Turbo Frame

Applying the fade it is literally adding a `animate-fade-in` class to the turbo frame (or the content inside it).

```html
<turbo-frame id="loadable" class="animate-fade-in">
  <h3 class="uppercase font-semibold">Fading in</h3>
</turbo-frame>
```

---

### Voilà!

![Fade-in Example](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k1ob2aac2jxztw3j21w2.gif)

---


### Wrapping up 
Obviously, such fade-in could be used outside the context of Hotwire or Tailwind. However, this seemed as a great use case that invites better UX and has minimal overhead.

---

If you have any questions or suggestions, feel free to reach out to me on [Twitter](https://twitter.com/predkelis) or visit my [website](https://predkelis.com)!
Roast the code #2 | Minesweeper
Tags: flutter, dart, roastthecode, watercooler
Published: 2022-05-30 13:26:27

Hey there! 👋

This post is the second instalment of my series **"Roast the Code"**, where I share some code, and let YOU roast and/or improve it. There's not much more to it, just be polite and constructive.

This time it's a minesweeper game called Bugsweeper, written in Dart and UI built using Flutter. Just a little fun project I wrote last Saturday.

You can check it out [here](https://flutter-bugsweeper.netlify.app/) (_note that the site can take a bit to load, I will be writing a post related to this in the near future_)

**Note**
* My focus was on the logic of the game, the UI needs a bit of work, but it's playable.

> If you want your code to be roasted on the series, please contact me in the comments or send me a PM here on DEV. And I will share it in a future instalment of the series! 

Now then, head over to the repo and roast as hard as you can! 

{% github https://github.com/nombrekeff/bugsweeper %}
Create secret tunnel using Go
Tags: go, udp, networking, tunnelling
Published: 2022-05-30 13:25:14

## Trutun

Look at my new application [Trutun](https://github.com/teonet-go/trutun). 


![Trutun](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cw8shuqpn0autoaiy70v.jpeg)

It creates secret tunnel by IP address using [Teonet](https://github.com/teonet-go/teonet) [TRU](https://github.com/teonet-go/tru) transport. [TRU](https://github.com/teonet-go/tru) create reliable, low latency and encrypted channel between connected peers.

<!-- Place this tag in your head or just before your close body tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
<!-- Place this tag where you want the button to render. -->
<a class="github-button" href="https://github.com/teonet-go/trutun" data-icon="octicon-star" aria-label="Star teonet-go/trutun on GitHub">Star</a>

The repository is available on Github: 
https://github.com/teonet-go/trutun
13 signs of a well oiled development team
Tags: workflow, automations, discuss
Published: 2022-05-30 13:21:43

### Important software development issues that we no longer discuss at ClickPesa 

1. Working with Issues and Issues tracker
2. Working with separate Git branches for every Issue 
3. Breaking Issues to a smaller Issues 
4. Meaningful variables and configurations names
5. Meaningful project and repositories names
6. Working with tools that serves you
7. Meaningful and defined process 
8. Speaking-out and asking for help ASAP
9. Meaningful commit messages 
10. A well detailed Issue description
11. Tests
12. Code reviews 
13. Code implementations is after a well documented research
 

OKAY! So… It's not that we aren't talking about these issues, but the context has shifted. Improvements, simplification, automation, and the creation of our own custom templates to manage these things within development workflows are now the focus of discussion.

Follow our tech blog, where the team shares stories about our development process improvement journey, among other things
{% embed https://dev.to/clickpesa %}
How we designed the user interface for an enterprise analytical system
Tags: design, ux, uiweekly, webdev
Published: 2022-05-30 13:06:46

In 2021, we were contacted by an industrial plant that was faced with the need to create a system for analyzing processes in its production. The enterprise team studied ready-made solutions, but none of the analytics system designs fully covered the required functionality. So they turned to Evrone with a request to develop their own analytical system that would collect data from all machines and allow it to be analyzed to see bottlenecks in production.

For this project, we created a data-driven UI/UX design and also developed a web-based interface for the equipment monitoring system. [Read more on our website!](https://evrone.com/peas)
Attack of the bruised ego
Published: 2022-06-15 00:24:09

---
title: Attack of the bruised ego
published: true
date: 2022-05-30 13:00:00 UTC
tags: 
canonical_url: https://curiousprogrammer.dev/blog/attack-of-the-bruised-ego/
---

![Eagle Soaring!](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vkmwfwwoq1knzo0ffwy2.jpeg)

1. Take feedback as objectively as possible.
2. Don't be married to your ideas and code. Instead explore, learn, be curious and continuously grow by learning from those around you.
3. Maintain clear, open channels of communication. It will defuse tension and clarify any confusion that may exist.

* * *

I spoke to a friend about the implementation of a particular feature in a project he is working on. I noticed that I struck a nerve when I didn't like and agree with one of his ideas. He became defensive, spewed out a string of excuses and shut out all alternative solutions I offered. It happened in the heat of the moment and was a reaction to a bruised ego from what I could tell. We spoke about it and as we did so, the tension eased and he was able to think objectively.

> Put your ego aside. Just because your idea doesn't cut it, doesn't make you a bad person. It also doesn't mean that all your ideas are bad, so keep your ticker ticking.

## [<svg aria-hidden="true" height="20" version="1.1" viewbox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>](#dangers-of-undesirable-actions)Dangers of undesirable actions

Speaking about it immediately defused the situation! The ego is a powerful force and it drives behavior that could potentially be harmful and

- hurt self-confidence,
- question abilities,
- damage relationships,
- harm reputation in the field,
- cause regret from uncontrolled reactions, and
- destroy a really, really good day.

Not too far down the line it was my turn. I was speaking to a friend about an idea I had and he just didn't buy it. Trying to convince him felt brutal. He finally interjected and said that if I can't convince him, I won't be able to convince anyone else. These were my tell-tale signs of the rise of my defenses:

- Hellish warm wealth of emotions surfaced to my face and rushed throughout my body.
- I lost patience and became defensive.
- My tone of voice changed to be short, abrupt and I ended up interrupting him.

> I immediately neutralized this feeling when I recognized it. It gave me the power to respond in a controlled manner.
Music Monday — What are you listening to? (May 30)
Tags: watercooler, discuss, music
Published: 2022-05-30 12:41:33

_cover image credits: [gifovea](https://gifovea.tumblr.com/post/49634930028)_

In this weekly series, folks can chime in and drop links to whatever it is they've been listening to recently + browse others suggestions.

If you like talking about music, consider following the org [#music discussions](https://dev.to/music-discussions) for more conversations about music!

{% embed https://dev.to/music-discussions %}

Also noteworthy, my friend @duxtech has a Spanish speaking version of this series [here](https://dev.to/duxtech/series/17890) in case you'd like to chime in there as well. 🙌

***

So, what have y'all been listening to today? _Note: you can embed a link to your song on most platforms using the following syntax `{% embed https://... %}`._

I look forward to listening to y'all's suggestions! 👂 🎶
Postman Import/Export – Collection & Environment
Tags: testing, tutorial, beginners, webdev
Published: 2022-05-30 12:28:48

In this post, I will cover how to do import or export of Collection & Environment in Postman. Importing or Exporting data such as Collection and Environment are a great way to share or request data with others.

### Use Case
When you are working with Postman, you typically add bunch of requests related to a project which you can then group them into collections. And, now let’s imagine, if a new team member joins your project and she needs access to those requests, you will have to give her all these request info one by one which will take a really long time. Instead you can simply export your collection, which she can then import into Postman and will have access to all the requests and the related info.

Now ideally, if you have a teams license with postman you can just add her to the team and call it a day but not all companies have that so this is a good alternative to work with.
 
### Check out the video below to learn how to Import and Export Postman Collection and Environment –

{% youtube 8hRK5cE9dzQ %}

---

If you are interested in learning more about Postman, check out this Postman playlist –

https://youtu.be/XzoIYpQ_k5E?list=PL6AdzyjjD5HCiZyLYZqjRrB15gHLs8uyV

---

📧 Subscribe to my [mailing list] (https://automationbro.com/mailing-list) to get access to more content like this as well as be part of amazing free giveaways.

👍 You can follow my content here as well - 
- [Twitter](https://twitter.com/automationbro)
- [LinkedIn](https://www.linkedin.com/company/automation-bro)

...

I love coffees! And, if this post helped you out and you would like to support my work, you can do that by clicking on the button below and buying me a cup of coffee -

<a href="https://www.buymeacoffee.com/automationbro">![Buy me a coffee](https://dev-to-uploads.s3.amazonaws.com/i/4aw2ub3f4qkyjk0ivwt4.png)</a>

You can also support me by liking and sharing this content.

Thanks for reading!
Create Simple Count Down Timer Component
Tags: react, javascript
Published: 2022-05-30 12:21:16

It renders a countdown timer that prints a message when it reaches zero.

1. Use object destructuring to set defaults for the hours, minutes and seconds props.
2. Use the `React.useState()` hook to create the time, paused and over state variables and set their values to the values of the passed props, false and false respectively.
3. Create a method tick, that updates the value of time based on the current value (i.e. decreasing the time by one second).
4. If paused or over is true, tick will return immediately.
5. Create a method reset, that resets all state variables to their initial states.
6. Use the the `React.useEffect()` hook to call the tick method every second via the use of `setInterval()` and use `clearInterval()` to cleanup when the component is unmounted.
7. Use a <div> to wrap a <p> element with the textual representation of the components time state variable, as well as two <button> elements that will pause/unpause and restart the timer respectively.
8. If over is true, the timer will display a message instead of the value of time.

## Code
```javascript
function CountDown({ hours = 0, minutes = 0, seconds = 0 }) {
  const [paused, setPaused] = React.useState(false);
  const [over, setOver] = React.useState(false);
  const [time, setTime] = React.useState({
    hours: parseInt(hours),
    minutes: parseInt(minutes),
    seconds: parseInt(seconds)
  });

  const tick = () => {
    if (paused || over) return;
    if (time.hours == 0 && time.minutes == 0 && time.seconds == 0) setOver(true);
    else if (time.minutes == 0 && time.seconds == 0)
      setTime({
        hours: time.hours - 1,
        minutes: 59,
        seconds: 59
      });
    else if (time.seconds == 0)
      setTime({
        hours: time.hours,
        minutes: time.minutes - 1,
        seconds: 59
      });
    else
      setTime({
        hours: time.hours,
        minutes: time.minutes,
        seconds: time.seconds - 1
      });
  };

  const reset = () => {
    setTime({
      hours: parseInt(hours),
      minutes: parseInt(minutes),
      seconds: parseInt(seconds)
    });
    setPaused(false);
    setOver(false);
  };

  React.useEffect(() => {
    let timerID = setInterval(() => tick(), 1000);
    return () => clearInterval(timerID);
  });

  return (
    <div>
      <p>{`${time.hours.toString().padStart(2, '0')}:${time.minutes
        .toString()
        .padStart(2, '0')}:${time.seconds.toString().padStart(2, '0')}`}</p>
      <div>{over ? "Time's up!" : ''}</div>
      <button onClick={() => setPaused(!paused)}>{paused ? 'Resume' : 'Pause'}</button>
      <button onClick={() => reset()}>Restart</button>
    </div>
  );
}
```

Now you can use it in your React applications. 

```javascript
ReactDOM.render(<CountDown hours="1" minutes="45" />, document.getElementById('root'));
```
Aviyel announcement 📢: Aviyel is set to launch on Product Hunt in Just 2 days[June 1st]
Tags: discuss, startup, web3, architecture
Published: 2022-05-30 12:07:40

Aviyel is attempting to create an environment where everyone may benefit from the opportunities offered by open source software. Our platform encourages organizations and individuals to work together in creating a thriving open source ecosystem where each individual contribution is valued.

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

Aviyel's primary goal is to educate individuals about the benefits of using open source software and foster ties among various groups in the open source community.

### BIG Announcement📣: Aviyel Rewards platform

One of our most eagerly anticipated features- Rewards Platform, is scheduled for launch! 🚀🚀🚀 

![Product Hunt](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0um3o5hc1w9izio17k4e.png)

Our [Product Hunt launch](https://www.producthunt.com/posts/aviyel-rewards) is only two days away, and we are announcing some awesome  GIVEAWAYS! If we achieve Product of the Day tag on June 1, we'll send amazing gifts and surprises to top 30 AviyelxProductHunt. 🎁🎁

Ain't you excited? We are so looking forward to celebrating this launch together, with you!
Your support and feedback would mean the🌎 to us.
Patch an NPM dependency with yarn
Tags: yarn, npm, javascript, webdev
Published: 2022-05-30 12:06:20

When you have a bug in a third party dependency, usually you have a limited set of options to fix it.

You can modify directly the local code of the dependency and make a new build. This works if it's a critical bug and you have to fix it as soon as possible. But, this is not the best option, because you'll lose the fix on the next `yarn` or `npm` install. Also, you won't be able to share the fix with your team.

Another option is to fork the package, fix the bug and create a pull request. At this point, you can update your project dependencies and use your fork until the maintainers of the package approve it and publish a new version.

```json
"dependencies": {
  "buggy-package": "your_user/buggy-package#bugfix"
}
```

This looks like a good option, now your team members will get the fix when they will update the project dependencies. The downside is that you'll have to maintain the fork and make sure it's up to date.

Do we have a better option? Yes, we have. We can use the `yarn patch` command that was introduced in yarn v2.0.0. This allows you to instantly make and keep fixes to your dependencies without having to fork the packages.

Let's take as an example the `remix-run` package. During the development I found an issue with the session storage. I opened a [pull request](https://github.com/remix-run/remix/pull/3113) to fix it, then I patched the package directly in the project using the command:

```bash
  yarn patch @remix-run/node@npm:1.5.1

➤ YN0000: Package @remix-run/node@npm:1.5.1 got extracted with success!
➤ YN0000: You can now edit the following folder: /private/var/folders/xm/qntd4h_97zn6w88tc95bsvxc0000gp/T/xfs-bfc9a229/user
➤ YN0000: Once you are done run yarn patch-commit -s /private/var/folders/xm/qntd4h_97zn6w88tc95bsvxc0000gp/T/xfs-bfc9a229/user and Yarn will store a patchfile based on your changes.
➤ YN0000: Done in 0s 68ms
```

Once the package is extracted, we can open the created folder and make our changes there. One drawback is that you have to modify the production code, which might be minified and hard to debug. In my case was a simple change to the `fileStorage` module.

The next step is to commit the patch using the command displayed earlier in the console

```js
yarn patch-commit -s /private/var/folders/xm/qntd4h_97zn6w88tc95bsvxc0000gp/T/xfs-bfc9a229/user
```

At this point we should see the following change in `package.json`

```json
"resolutions": {
    "@remix-run/node@1.5.1": "patch:@remix-run/node@npm:1.5.1#.yarn/patches/@remix-run-node-npm-1.5.1-51061cf212.patch"
  }
```

and in `.yarn/patches` you'll find the patch file.

The benefits of using this approach are that the patch can be reviewed by your team and it doesn't require additional work to be applied compared to the fork. This should be used for critical fixes, if you need a new feature I would suggest to fork it instead. Also, do not forget to open an issue and create a pull request in the actual package.
C++. Loopga doir masalalar. Yulduzchalar.
Tags: cpp, beginners, programming, discuss
Published: 2022-05-30 12:05:55

### Yulduzchalar yordamida **diamond shape ** chop etish.

Natija:

```
      *
     ***
    *****
   *******
  *********
 ***********
*************
 ***********
  *********
   *******
    *****
     ***
      *
```

Kod:

```cpp
#include<iostream>
using namespace std;

int main()
{
    int i, j, rowNum, space;
    cout<<"Enter the Number of Rows: ";
    cin>>rowNum;
    space = rowNum-1;
    for(i=1; i<=rowNum; i++)
    {
        for(j=1; j<=space; j++)
            cout<<" ";
        space--;
        for(j=1; j<=(2*i-1); j++)
            cout<<"*";
        cout<<endl;
    }
    space = 1;
    for(i=1; i<=(rowNum-1); i++)
    {
        for(j=1; j<=space; j++)
            cout<<" ";
        space++;
        for(j=1; j<=(2*(rowNum-i)-1); j++)
            cout<<"*";
        cout<<endl;
    }
    cout<<endl;
    return 0;
}
```

Savollar va takliflaringizni [Telegram](https://t.me/davron_js) ❤️ orqali qoldirishingiz mumkin.