teleren/devto huggingface dataset:
Python Evaluates Assignments From Right To Left
Tags: python, performance, tutorial
Published: 2023-09-27 14:00:46

**Why does it matter?**
Assigning variables in Python may range from simple statements such as `count=5` to others that may require  evaluation such as `str_len=len("eat one piece of the fruit and you drown")` 
 
When assigning variables in Python the evaluation
 is done from right to left.Meaning the length of the string `str_len` will be evaluated first and then assigned.

**Tuples are immutable**
When working with more complex objects the evaluation order may affect the behaviour of your objects.An example being tuples.Tuples are immutable in Python in that they cannot be modified once created.

```console
>>> a=(1, [2,3,4])
>>> type(a)
<class 'tuple'>
>>> a[0]=8
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
>>> a[1]=[5,6,7,8]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
>>> a
(1, [2, 3, 4])
```
Modifying tuple `a` raises an exception and inspecting it after shows that the tuple has not been modified.
**Murky waters**
Depending on how  a tuple is operated on and its composition, you can get some unexpected behaviour(they become mutable). This can occur when using `augmented assignment operators` in particular `__iadd__ (in-place addition)` which is commonly used as `+=`.

```console
>>> a
(1, [2, 3, 4])
>>> a[1]+=[100,101,700]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
```
An attempt to modify the tuple raises an exception which conforms to the expected behaviour that tuples are immutable.
```console
>>> a
(1, [2, 3, 4])
>>> a[1]+=[100,101,700]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
>>> a
(1, [2, 3, 4, 100, 101, 700])
```
But on inspection as per the above example.The tuple has been modified ,the list in the tuple in particular even though we got an exception.


This occurred due to two aspects of the code:

- In-place addition which is supported in lists.

- Evaluation of  assignments from right to left.


`a[1]` is a list `[2, 3, 4]` which supports inplace addition .The statement `a[1]+=[100,101,700]` is `evaluated from right to left` meaning the list at `a[1]`  is modified first then a assigned into the tuple and this raises an exception.

**Take away**
Understading how python evaluates statements is important, especially when performing operations on  objects which contain types with different behaviours.
The Start of My Coding Journey
Published: 2023-09-27 13:52:56

Two days before the war broke out unexpectedly, my parents had left Ukraine for work;  So, my younger brother and I were left in Ukraine. Once the war began, I immediately sent my brother to join my parents. Sadly, I couldn't leave due to war restrictions. After enduring 14 grueling months in war-torn Ukraine, I finally managed to escape—by that time, my parents and younger brother had immigrated to Canada—and started a new life in America. You might have heard stories like this before. Well, mine happens to be one of them.

After leaving my homeland, I traversed many countries, including Romania, Hungary, Slovenia, Slovakia, Czech Republic, and Poland. I almost settled in Poland for university but decided to roll the dice and aim for North America instead. I also spent close to a month in the Netherlands, sleeping on the floor of my lifelong friend’s apartment. Subsequently, I returned to Poland and spent another month there, residing in hostels while I awaited my visa. Soon after, I visited my family in Canada and even took a trip to Niagara Falls. After spending around four weeks in Canada, I made my move to New York.

Landing in New York was like stepping into another world! I was searching for something, something familiar to keep me grounded. Enter technology, my old friend. It’s been the constant thread through my journey from Ukraine to this gigantic melting pot. And it’s looking good so far!

A friend of mine (he works at Spotify!) recommended Flatiron to me. I took the leap, applied, and here I am.

The Flatiron program is straight to the point: five phases over 15 weeks. I'm now wrapping up the third week of the first phase. In just this short time, I’ve seen my skills grow. I honestly can't believe how much I have learned during this time. JavaScript was the focus, and topics like EventListeners, JSON, Fetch API, and the DOM have become clearer to me. When I hit a roadblock, people from my cohort and the instructors were always there to help.

What’s also great about Flatiron is how it's helping me settle in this city. Alongside tech, there's a community here. We learn, struggle, and celebrate together. Every day, I feel more at home both in New York and in the world of coding.
And so, with every line of code I write at Flatiron, I feel like I’m finding my way, building a new home here—one where my past and my future can peacefully coexist.
Come and see me speaking at GeeCon 2023 in Prague.
Tags: eventsinyourcity, java, webdev, programming
Published: 2023-09-27 13:43:49

I will speak at [GeeCON 2023 in Prague](https://2023.geecon.cz/). This is a video invitation for you to join me. I promise I will not be talking bad stuff about Java!

{% embed https://vimeo.com/867824994 %}

## Abstract

Oh gosh, we had so much fun in the past. Recently, most of the world decided that IT is an elite profession that needs to produce only value no matter what. This is a great tragedy, and it must be rectified. Why do we have feelings, emotions, and personalities if we no longer have fun? In this talk, we’ll take a retrospective journey to what went wrong and how we fix it together. We will cover the epoch of the world before Agile to the era of the Artificial Immigrant(AI), who is here to take your jobs away. This session comes with a bit of heavy metal music.

### Can’t attend?

I’ll gladly send you a recording. Share as a comment an example of how you had fun in the past with your team, and then I'll share the recording when it's available,
Image Captcha Solver - 2captcha
Tags: captcha
Published: 2023-09-27 13:43:45

| [2captcha.com](https://2captcha.com/?from=10075179)

2captcha is a captcha solving service that provides a solution to bypass captcha challenges. The service is easy to use and offers a variety of captcha solving methods, including human-powered and automated solutions. In this article, we will focus on the image captcha solver provided by 2captcha.

**What is an Image Captcha?**

An image captcha is a type of captcha that requires the user to identify and enter the text or numbers displayed in an image. Image captchas are commonly used to prevent automated bots from accessing websites or performing certain actions.

**How Does 2captcha Solve Image Captchas?**

The process of solving an image captcha with 2captcha is as follows:

1. The captcha image is taken from the page and sent to the 2captcha service.
2. An employee at 2captcha solves the captcha by typing the indicated text or numbers.
3. The answer is returned to the user, who enters it in the appropriate field to solve the captcha.

2captcha offers several methods for solving image captchas, including:

- Normal Captcha: An image that contains distorted but human-readable text.
- Text Captcha: A text question that must be answered to solve the captcha.
- Click Captcha: An image that requires the user to click on specific points to solve the captcha.
- reCAPTCHA v2: A Google captcha that requires the user to click on a checkbox to prove they are human.
- reCAPTCHA v3: A Google captcha that uses a score-based system to determine if the user is human.
- FunCaptcha: A captcha that requires the user to complete a simple game to prove they are human.
- GeeTest: A captcha that requires the user to drag a slider to prove they are human.
- hCaptcha: A captcha that requires the user to click on specific images to prove they are human.
- KeyCaptcha: A captcha that requires the user to solve a puzzle to prove they are human.
- Capy: A captcha that requires the user to select a specific animal to prove they are human.
- Grid: A captcha that requires the user to select specific images to prove they are human.
- Canvas: A captcha that requires the user to draw a specific shape to prove they are human.
- Rotate: A captcha that requires the user to rotate an image to prove they are human.

**How to Use 2captcha to Solve Image Captchas**

To use 2captcha to solve image captchas, follow these steps:

1. Register for the service on the 2captcha website.
2. Implement the 2captcha API in your code.
3. Send the captcha image to the 2captcha service using the appropriate method for the captcha type.
4. Receive the answer from 2captcha and enter it in the appropriate field to solve the captcha.

2captcha provides API documentation and code examples for several programming languages, including Python, PHP, C++, Java, C#, Ruby, and Go.


2captcha is a reliable and efficient service that can help you save time and effort when dealing with image captcha challenges. With a variety of captcha solving methods and easy-to-use API, 2captcha is a great solution for anyone looking to bypass image captchas.
Describe the following testing techniques
Published: 2023-09-27 13:38:27

1)**Boundary value analysis**:- This analysis check the valid and invalid partitions or points of values at boundary levels.
2)**Decision table testing**:- It is used to check various testing methods to test the behavior of the system in the systematic approach.
3)**use case testing**:- we can say this as a black box testing where testers use to test from end to end to identify the test cases that covers entire system of project.
4)**LCSAJ testing**:-It is a liner code sequence and jump. kind of white box testing to identify the code or strategy. This also test the program from start to end.
PollyFill
Published: 2023-09-27 13:37:16

```js
// Import stylesheets
import './style.css';

// Write Javascript code!
const appDiv = document.getElementById('app');
appDiv.innerHTML = `<h1>JS Starter</h1>`;

const array = [1, 2, 3, 4, 5, 6, 7, 8, 9];

// map and it's polyfills!
const newArray = array.map((item, index, arr) => {
  return item * 2;
});

Array.prototype.myMap = function (cb) {
  let newArr = [];
  for (let i = 0; i < this.length; i++) {
    newArr.push(cb(this[i], i, this));
  }
  return newArr;
};
const newArray2 = array.myMap((item, index, arr) => {
  return item * 3;
});
console.log(newArray);
console.log(newArray2);

// filter and it's polyfills!
const newFArray = array.filter((item, index, arr) => {
  return item > 5;
});

Array.prototype.myFilter = function (cb) {
  let tempArr = [];
  for (let i = 0; i < this.length; i++) {
    if (cb(this[i], i, this)) {
      tempArr.push(this[i]);
    }
  }
  return tempArr;
};
const newFArray2 = array.myFilter((item, index, arr) => {
  return item > 3;
});
console.log(newFArray);
console.log(newFArray2);

// reduce and it's polyfills!
const newRArray = array.reduce((acc, item, index, arr) => {
  return acc + item;
}, 0);

Array.prototype.myReduce = function (cb, intialValue) {
  var acc = intialValue;
  for (let i = 0; i < this.length; i++) {
    acc = acc ? cb(acc, this[i], i, this) : this[i];
  }
  return acc;
};
const newRArray2 = array.myReduce((acc, item, index, arr) => {
  return acc + item;
}, 0);
console.log(newRArray);
console.log("MyReduce:",newRArray2);

```
Enhance Your Touchpad Experience on Linux with ThumbSense!
Tags: linux, ubuntu, touchpad, ruby
Published: 2023-09-27 13:35:02

---
title: Enhance Your Touchpad Experience on Linux with ThumbSense!
published: true
description: You can use your laptop's touchpad as an additional modifier key on Linux
tags: linux, ubuntu, touchpad, ruby
# cover_image:

# Use a ratio of 100:42 for best results.
# published_at: 2023-09-27 03:25 +0000
---

Hello everyone! 🌟

## What is ThumbSense? 

With ThumbSense, you can use your laptop's touchpad as an additional modifier key.
Assign specific keys as mouse buttons and toggle their functionality based on whether your thumb is touching the touchpad. This feature allows you to keep your hands on the home position of the keyboard.
By turning off the often troublesome "tap to click" feature, you can achieve a more comfortable touchpad experience.


## Repository

Thumbsense is implemented as a plugin of [fusuma](https://github.com/iberianpig/fusuma).

https://github.com/iberianpig/fusuma-plugin-thumbsense


## Key Features:

- Seamless integration with the touchpad gesture tool, [Fusuma](https://github.com/iberianpig/fusuma)
- A stable mouse-like experience without moving your hands away from the keyboard.
- Customize key-to-mouse button mappings using YAML.

## Installation and setup

```sh
$ sudo apt-get install libevdev-dev ruby-dev build-essential

$ echo 'KERNEL=="uinput", MODE="0660", GROUP="input", OPTIONS+="static_node=uinput"' | sudo tee /etc/udev/rules.d/60-udev-fusuma-remap.rules

$ sudo udevadm control --reload-rules && sudo udevadm trigger

$ sudo gem install fusuma-plugin-thumbsense
```

## Customize with yaml


Set the following code in ~/.config/fusuma/config.yml.

```yaml
---
context: 
  thumbsense: true

remap:
  J: BTN_LEFT
  K: BTN_RIGHT
  F: BTN_LEFT
  D: BTN_RIGHT
  SPACE: BTN_LEFT
```


![thumbsense](https://i.gyazo.com/cf929775aec1e3aefaabb3a6dd15a3ff.gif)


![Dragging and Swipe gesture with Fusuma
](https://i.gyazo.com/b434e5c33712b210ea58650451c21caf.gif)


Give it a try and let us know your thoughts! With your feedback and collaboration, let's make touchpad usage more intuitive and efficient!
Hello back! Sharing some projects
Tags: linux, japanese, cyberthreats
Published: 2023-09-27 13:34:53

---
title: Hello back! Sharing some projects
published: true
description: I write about some current research projects related to Linux and Cyber Threats (Japanese)
tags: linux, japanese, cyberthreats
# cover_image: 
# Use a ratio of 100:42 for best results.
# published_at: 2023-09-27 13:25 +0000
---


もっと日本語ともっとCYBERSECURITYを勉強だから数年前にここに書くのをやめましたいま私は現在6年のサイバー脅威の専門家です日本へいきましたそれから私の日本語と私の実務経験は前回よりも優れています

新しいプロジェクトに向けて取り組んでいます! 
それを共有したい

![Small penguin cutely walking on the ice](https://qiita-user-contents.imgix.net/https%3A%2F%2Fqiita-image-store.s3.ap-northeast-1.amazonaws.com%2F0%2F233436%2F7890ca96-5356-0b73-286a-b5f0d3117278.jpeg?ixlib=rb-4.0.0&auto=format&gif-q=60&q=75&w=1400&fit=max&s=af28b837bf5c15d484aebd75f16ac0ec)

## LINUXのサイバー脅威の最先端の研究


私はLINUXのサイバー脅威について1年間研究しました。そのために初めCOWRIEのHONEYPOTを使用しました。。。[このリンク](https://git.sr.ht/~alienagain/honeypot_notes)はそののリポジトリです 
私は3つのイベントにその研究をみせって (スペイン語と英語です)

[AlienVaultで結果を公開しました](https://otx.alienvault.com/user/astronaut_skull/pulses)
![screenshot of alienvault site](https://qiita-user-contents.imgix.net/https%3A%2F%2Fqiita-image-store.s3.ap-northeast-1.amazonaws.com%2F0%2F233436%2F2e03f9d2-de6a-afb5-d9ae-17ce93424cab.png?ixlib=rb-4.0.0&auto=format&gif-q=60&q=75&w=1400&fit=max&s=7a9d80a9ab15563d7e00f7d1f39df241)

2022年にcryptominersは人気になりましたでも2023年にstealersはcryptominersより人気になりました
また、Malware複雑になりました

例えばここにいくつかの最近見たのTTPがあります

* Command&Controlとして使われたTelegramのbots ([T1102.002 MITRE](https://attack.mitre.org/techniques/T1102/002/))
* 2FAのポケんンを窃盗 --- SMS例えば ([T11111 MITRE](https://attack.mitre.org/techniques/T1111))
* Anti-VM (VMを回避) ([T1497 MITRE](https://attack.mitre.org/techniques/T1497))

それでわ最近のキャンペーンは Ransomware (Cyclops, Conti), Stealers (The White Snake), toolkits (Reptile) とその他など



## STEALERS

WindowsとLinuxとMacOSのStealersは人気が出てきています
一部のRansomwareもう暗号化を使用していませんそれはDataを盗むだけです

いま一部の人気のStealersはMeduzaとRacoonとRedlineとBanditとNodeStealerとVidar
[ここで](https://any.run/malware-trends/)部分的に見ることができます。例えばその統計は[Redlineの量](https://any.run/malware-trends/redline)が増えていますと書いてある

![screenshot of any run Redline page](https://qiita-user-contents.imgix.net/https%3A%2F%2Fqiita-image-store.s3.ap-northeast-1.amazonaws.com%2F0%2F233436%2F07cf58b1-fdc2-4c3e-f4f6-b0444bf8b13c.png?ixlib=rb-4.0.0&auto=format&gif-q=60&q=75&w=1400&fit=max&s=b6df12c17b6b4049a2f4815b945f3db5)

Stealers も他のマルウェアのコードをリサイクルします! 例えばQuasarとAsyncRAT（RACOONでっと）


すぐこれについて書きます! 

[Original post](https://qiita.com/terceranexus6/items/b195157b76748cf50d12)
Opening files in python with open() function.
Published: 2023-09-27 13:22:00

First, create a file named hello.txt and add the text below:
"continue coding in Python Mzee." Next, we need to create another file called demo.py which will contain code that will read text from hello.txt file:
```
f = open("hello.txt","r")
print(f.read())
```
when demop.py is run we the text, output
```
continue coding in python mzee
```
in summary f = open("hello.txt", "r"): opens a file named "hello.txt" in read mode ("r") and creates a file object called f that you can use to interact with the file.

print(f.read()): reads the contents of the file represented by the f file object and then prints those contents to the console or screen. The read() method reads the entire content of the file as a single string and then print() displays it.
Setting and Displaying Patroni's Max Connection Count
Tags: database, postgres, linux, beginners
Published: 2023-09-27 13:21:19

Patroni configuration are mainly stored in patroni.yaml. Find the path of that yaml.

**_Not: Patroni configurations are primarily stored in patroni.yaml. Find the path to that YAML file._**

This command lists Patroni clusters and hosts.
``` bash
patronictl -c /etc/patroni.yml list
```

To edit PostgreSQL settings in Patroni, you can use the 'edit-config' command.

``` bash
patronictl -c /etc/patroni.yaml edit-config
``` 

Modify the '**max_connections**' line within 'postgresql.parameters', and create it if it does not already exist.


```
.
postgresql
  parameters
    max_connections: 200
.
``` 

To display the maximum monitor count, you can connect to your Patroni cluster using psql, and then run the script below to show the maximum connection count.

**_To query to patroni server we can use below comamnd:_**
``` bash
psql -h <patroni_ha_ip> -U <username> -p <ha_db_port> -W
```
On psql

``` sql
SHOW max_connections;
```
OR
``` sql
SELECT current_setting('max_connections');
```
Socket.Io Code To Create A Realtime Chat Application In Express Js
Tags: webdev, express, socketio, node
Published: 2023-09-27 13:07:40


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

```
require("dotenv").config();
const express = require("express");
process.env.TZ = "Asia/Kolkata";
const bodyparser = require("body-parser");
const cookieparser = require("cookie-parser");
const mongoose = require("mongoose");
const config = require("./src/Config/db").get(process.env.NODE_ENV);
let cors = require("cors");

const allowedOrigins = [
  "http://localhost:3000",
];
const corsOptions = {
  origin: allowedOrigins,
  credentials: true,
  optionSuccessStatus: 200,
};

const app = express();
PORT = 8000;
app.use(cors(corsOptions));
app.use(bodyparser.urlencoded({ extended: false }));
app.use(bodyparser.json());
app.use(bodyparser.text({ type: "text/html" }));
app.use(cookieparser());

app.use("/public", express.static(path.join(__dirname, "public")));

mongoose.set("strictQuery", true);
mongoose.Promise = global.Promise;
mongoose
  .connect(config.DATABASE, {
    useNewUrlParser: true,
    useUnifiedTopology: true,
  })
  .then(() => {
    console.log("Database connected!");
  })
  .catch((err) => {
    console.log("Database not connecting!");
  });

app.get("/", (req, res) => {
  return res.send("Welcome");
});

const server = app.listen(PORT, (error) => {
  if (!error) console.log("Server is Running at PORT: ", PORT);
  else console.log("Error occurred, server can't start", error?.message);
});

const io = require("socket.io")(server, {
  pingTimeout: 60000,
  cors: {
    origin: allowedOrigins,
    methods: ["GET", "POST", "PUT", "DELETE"],
    credentials: true,
  },
});
global.onlineUsers = new Map();
io.on("connection", (socket, req) => {
  global.chatSocket = socket;
  socket.on("join", (id) => {
    onlineUsers.set(id, socket.id);
    onlineUsers.set(socket.id, id);
    const newUsers = Array.from(onlineUsers.keys());
    setTimeout(() => {
      io.emit("online", newUsers);
    }, 1000);
  });

  socket.on("typing", (user) => {
    const receiver = onlineUsers.get(user.receiver);
    if (receiver) {
      socket.to(receiver).emit("typing", user);
    }
  });

  socket.on("stop-typing", (user) => {
    const receiver = onlineUsers.get(user.receiver);
    if (receiver) {
      socket.to(receiver).emit("stop-typing", user);
    }
  });

  socket.on("send", (message) => {
    const receiver = onlineUsers.get(message.receiver);
    if (receiver) {
      socket.to(receiver).emit("receive", message);
    }
  });
  
  socket.on("disconnect", () => {
    const key = onlineUsers.get(socket.id);
    if (key) {
      onlineUsers.delete(key);
      onlineUsers.delete(socket.id);
    }
    const remainingUsers = Array.from(onlineUsers.keys());
    setTimeout(() => {
      socket.broadcast.emit("online", remainingUsers);
    }, 1000);
  });
});
```
For more : visit - [https://freecodez.com/post/074niht](https://freecodez.com/post/074niht)

Thank You!
Navigating the Admission Process: Study in Australia from Bangladesh
Tags: study, australia
Published: 2023-09-27 13:05:34

So, you've decided to embark on your academic journey in Australia from Bangladesh. Congratulations! To help you navigate the admission process smoothly, we'll outline the key steps to ensure a successful transition to studying abroad.

**Course and University Selection:** The first step is to research and choose a course and university that align with your academic and career goals. Consider factors such as location, course content, and reputation.

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

**Language Proficiency:** Most Australian universities require proof of English language proficiency, typically through tests like IELTS or TOEFL. Prepare for these exams well in advance.

**Application Submission:** Submit your application to the chosen university. Make sure to provide all necessary documents, including academic transcripts, letters of recommendation, and a statement of purpose.

**Student Visa:** Once you receive an acceptance letter from your chosen university, you can start the student visa application process. This includes providing financial evidence to support your studies in Australia.

**Financial Planning: **Study in Australia can be financially demanding. Create a budget, explore scholarship opportunities, and consider part-time work options to support your expenses.

**Health Insurance:** Health insurance is mandatory for international students in Australia. Make sure to arrange this before your departure.

**Accommodation:** Research and arrange accommodation in advance. Universities often offer on-campus housing options for international students.

**Travel Arrangements:** Book your flights well in advance, and make sure you have all the necessary travel documents.

 **Orientation**: Attend the orientation program organized by your university. It's a great way to meet fellow international students and get acquainted with the campus and local culture.

 **Settling In:** After arriving in Australia, open a local bank account, get a mobile phone plan, and familiarize yourself with public transportation and other essential services.

**Remember**, [studying in Australia](https://educationconnect.com.au/) is not just about academics; it's also an opportunity for personal growth, cultural immersion, and building a global network. Be open to new experiences, make the most of your time abroad, and enjoy every moment of your educational journey in Australia from Bangladesh.