teleren/devto huggingface dataset:
Capturing process memory from /proc/pid/mem
Published: 2022-12-09 02:15:46

# Why?

You want to inspect process memory to enable further pivots within an environment.

# When?

You have root access to a Linux host, and no Linux Security Modules block access to /proc.

# How?

A statically linked binary is especially convenient here - as is learning from how others have solve the problem (e.g. from [Sliver's Dump Process Memory command](https://github.com/BishopFox/sliver/blob/b86e49d341ea1653b96a6ccea0727527220e9c3c/implant/sliver/procdump/dump_linux.go#L128-L129)).

This nim code reads metadata from /proc/pid/maps, and dumps to stdout offsets of /proc/pid/mem that are: readable, non executable, and non-file-backed. My experience mirrored the Sliver developer's in that `[vvar]` and `[vdso]` errored out when attempting to read them:

```nim
import std/os
import std/strutils
import std/strformat

if paramCount() != 1:
  echo &"Usage: {paramStr(0)} <pid>"
  quit(1)

let f = open(&"/proc/{paramStr(1)}/mem")

for line in lines(&"/proc/{paramStr(1)}/maps"):
  let parts = line.split(" ")
  # readable memory but not executable code
  if parts[1][0] == 'r' and not parts[1].contains('x'):
    # skip files mapped into memory
    if parts[3] == "00:00":
      # skip memory we will error out accessing
      if not(line.endsWith("[vvar]") or line.endsWith("[vdso]")):
        let addresses = parts[0].split("-")
        let offset_start = addresses[0].parseHexInt()
        let offset_end = addresses[1].parseHexInt()
        f.setFilePos(offset_start)
        var buffer: array[1024, int8]
        var remaining = offset_end-offset_start
        while remaining > 0:
          let n = f.readBytes(buffer, 0, min(remaining, 1024))
          remaining -= n
          discard stdout.writeBytes(buffer, 0, n)      

f.close()
```
SPO 600 Project : Auto-vectorization with iFunc - Stage 2
Published: 2022-12-09 02:01:45

How to enable SVE and SVE2 on aarch64 systems:
```
gcc -g -O3 -c march=armv8-a+sve ...
```

```
gcc -g -O3 -c march=armv8-a+sve2 ...
```

How to enable SMID on aarch64 system:
```
gcc -g -O3 -march=armv8-a ...
```

I was having difficulty in deciding which language to choose. Initiall I went with pyton as I had thought it will be easy. Then as the complexity of the project increase I decide to go with C as I thought the it would be the choise as we get to use gcc the again I chose python after Chris recomended it.

My code can be found at:
[https://github.com/smitgabani/spo600_project](https://github.com/smitgabani/spo600_project)

Clone professors test code repo from;
[https://github.com/ctyler/spo600-fall2022-project-test-code.git](https://github.com/ctyler/spo600-fall2022-project-test-code.git)

I have used make header utility used by some of my friends.
[https://github.com/bjconlan/makeheaders.git ](https://github.com/bjconlan/makeheaders.git )


Step 1
Start implementing 3 functions for different modules:

I started by going through some code that Chris provided and seperated the code. 
Parse the string in order to get the function prototype and name. This took a lot of time.

Now I will use the header utility as mentioned above.
Next produce a code file called header.c and place the extracted prototype on top of that file. 

Then get the name of the function in the test code and add a prefix to the name 
for eg.
If the funtion's name is `foo` make three files `foo_sve` `foo_sve2` `foo_adSMID`. 

Step 2
Make a resolver function that will have the logic to choose what implementation will be run

Step 3


Testing on VS Code:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yad3t9ur03c4j129obtp.png)
Error are due to the architecture.

To check the output we need to run the process on israel machine as the machine supports the architecutre.

Testing on Israel SPO600 server:

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



Emulating different stytems using different architecture.


So far the tool has errors.
I'd like to post here again
Published: 2022-12-09 01:05:39

But I still don't know why my account was deleted earlier this year.  I've had two mutually incompatible explanations, which is concerning, on top of the fact that both explanations are in themselves concerning.  (Those being human error, and automation error).

If my account is at risk of deletion (again, still) then I can't justify putting in the effort, unless I'm simply re-blogging posts I've already written on other sites.

:shrug: @ben, please check your Twitter DMs.
SPO 600 Project : Auto-vectorization with iFunc - Stage 1
Published: 2022-12-09 01:04:24

## Objective:
The GCC compiler introduced the ‘ifunc’ extension to allow developers to create programs that can use advanced SIMD, SVE2, etc.
Our project is base on the use of ifunc and advanced SIMD, SVE2.

The goal for this project is to produce a **proof-of-concept tool** that will take code that meets specific conditions and automatically build it with `ifunc` capability to select between **multiple, autovectorized versions of a function**, to take advantage of the best **SIMD implementation** **available on the CPU** on which the code is running.

For a single instruction to be completed for multiple data unit different architecture have different SIMD implementations like advance SIMD, SVE and SVE2. 

The tool designed by us will build 3 implementation for `function.c` file which wil have only one function.

### The language I will be using: C
I am comfortable coding and understanding pyton code and I know python has many library that I can use. The reason I an not using C or C++ is that I am not sure I can complete the project if I face any troble while working with C++. But at last I decided to work with C


### Overall Operation - Approach
I am some what confused no how to approach the problem.

Lets divide the working of the program into steps.
1. Get input
2. Parameters
3. Linker function
4. Functions for different modules
5. will figure out in the future.

The initial process will produce output similar to gcc compiler.

```
gcc -c func.c -o func.o
```

### Challenges
Calling the linking stage multiple times during building for different modules.
PyLadies Dublin x DSI Galway November Meetup 202
Tags: pyladies
Published: 2022-12-09 00:54:06

❄️ Tis the most wonderful time of the year! And a huge thanks to everyone at DSI (looking at you Samira and Priya) for organising this hybrid event in Galway. I wasn't there in-person but next time if it's not a weeknight, I'll certainly join in and meet everyone IRL.

November was our last meetup of 2022, and we will be back in Jan 2023!

💖 For November's meetup, we would like to thank the following:

Host:

* [Data Science Institute (DSI), University of Galway](https://www.universityofgalway.ie/science-engineering/postgraduateprogrammes/structured-phd/dsi-eng-research.html)

Community Partners:

* [Coding Grace](https://codinggrace.com)
* [PSF](https://www.python.org/psf/): Meetup
* [PyLadies](https://pyladies.com/)

# TALKS
## TALK 1: Introduction to Explainable AI and its need by Gargi Gupta

(30 mins) In this talk, I will introduce and discuss the concept of Explainable AI and its need. I will also discuss my research topic, i.e. Interpreting RNNs using state transition diagrams.

### About Gargi: 
Gargi Gupta is currently pursuing her PhD from Machine Learning Labs Ireland and Technological University Dublin. Her research interests are Explainable AI and machine learning for climate and healthcare.

## TALK 2: "Python in the Community" by Vicky Twomey-Lee

(15 mins) Vicky will be talking about her journey in the Python community, how she got involved, and what PyLadies is all about.

{% embed https://speakerdeck.com/pyladiesdublin/python-in-the-community %}

### About Vicky: 
She is a coder, tech event organiser and primarily advocates diversity in tech. She has been involved in the Python community since 2005 and is the founder of PyLadies Dublin. You can always find her involved with the Irish Tech Community, and curates tech events around Ireland and Northern Ireland in her monthly newsletters.

## TALK 3: “Ethics and Trustworthiness in an Data World” by Karen Conway
Description: Karen will touch on an industry perspective of the importance of trustworthy AI and ethics in today’s technically advanced ecosystem.
### About Karen: 
Karen Conway is a Director of software engineering at Fidelity Investment

---

# Next PyLadies Dublin
## (Online) PyLadies Dublin Jan 2023 Meetup 
* Tue Jan 17, 18:30 - 19:30

#### We have two speakers:

* Update Nested Serializers Fields with Django REST Framework by Uffa Modey
* Mitigating Bias in AI by Arthur Lubambo

#### 🎟 RSVP: https://www.meetup.com/pyladiesdublin/events/290101036/

---

# Interested in speaking in 2023?

Submit your talk proposal to https://share-eu1.hsforms.com/1HHEGqvm2Q_-B3vqjq53EfQf1bg5

Or if you have an idea for us to run, a talk topic you want covered, getting involved? Drop us an email at dublin@pyladies.com. 

So have a wonderful holiday break and a new year and see you in the 2023!
+ foco em Engenharia de dados
Published: 2022-12-09 00:52:33

Desde que comecei a trabalhar como desenvolvedor Python backend sempre tive como foco em engenharia de dados. E nesse momento estou atuando justamente nisso. 

Para isso, decidi focar em alguns cursos alguns descritos no post anterior. Para isso acrescentarei alguns cursos aqui começando pelo sensacional curso ["Python Base"](https://www.linuxtips.io/course/python-base) do site [LINUXtips](https://www.linuxtips.io/) tem me ajudado a reforçar habilidades básicas em Python, como sintaxe, tipos de dados e estruturas de controle. Nesse curso existe um modulo sobre testes no qual estou muito ansioso para fazê-lo, quero focar bastante nisso. 

Outro curso que estou fazendo é o ["Unit Testing for Data Science in Python"](https://www.datacamp.com/courses/unit-testing-for-data-science-in-python) do [DataCamp](https://www.datacamp.com/). Esse curso tem me ensinado habilidades avançadas em unit testing, como setup, teardown e mocking. Além disso, estou aprendendo como escrever sanity tests para meus modelos de ciência de dados e como testar gráficos com matplotlib. 

Para finalizar, irei fazer um bootcamp sobre ["Engenheiro de Dados na Nuvem"](https://www.xpeducacao.com.br/bootcamp/engenheiro-de-dados-cloud?evento=data_universe) do site [XP Educação](https://www.xpeducacao.com.br/) junto com um colega de trabalho. Esse bootcamp vai me ensinar sobre arquitetura de microsserviços, conceitos e aplicações. Além disso, vou aprender sobre tecnologias para escalabilidade de soluções em nuvem, como Load Balancers e Auto-scaling. Também vou estudar sobre virtualização e containers, bem como conceitos básicos de Kubernetes e como implantar soluções utilizando manifestos .yaml, helm charts e operadores. 

Ademais, esse mesmo colega vai fazer o bootcamp ["Cientista de dados de Renda Variável"](https://www.xpeducacao.com.br/bootcamp/cientista-de-dados-de-renda-variavel), por isso estou pensando em fazer o bootcamp ["Cientista de Dados de Renda Fixa"](https://www.xpeducacao.com.br/bootcamp/cientista-de-dados-de-renda-fixa) do mesmo site.  Vou aprender sobre títulos públicos, CDB, LCA, LCI e outros fundos de investimentos em renda fixa aliados à Ciência de Dados.  

Sou grato por ter a oportunidade de enfrentar esses desafios e estou confiante em minhas habilidades e capacidades para superá-los. Estou comprometido em dar o meu melhor e em aprender com as dificuldades que encontrar. Também tendo um aval de um veterano (fera DEMAIS) sobre o meu norte de meus estudos.
New to Coding
Published: 2022-12-09 00:49:57

Hello, 

My name is Nate. I'm new to coding (currently enrolled in a Web Development program) and I wanted to say I'm excited to join this development community. In fact, I'm so new to this field that I only recently started learning the basics of HTML these past two weeks. I'm excited to learn from other users on this blog and grow as a web developer. 

Thanks! 
-Nate
Fix Chicony camera on Linux
Published: 2022-12-08 23:15:21

## Almost there

A couple of days ago I installed a brand new Debian bullseye 11 and everything works smoothly, the video GPU, the sound, the microphone, everything but ... the embedded camera :(

## The bug

At the system logs I discovered somehow that the camera was discovered as a keyboard ... that's crazy ... what the udev system did that ?!?

## The first fix attempt

I've tried to set some ignore rules at the udev configuration, it was really crazy, when I isolate the camera as a keyboard then the whole camera has isolated and if not the keyboard part wrongly appeared again.

These are all the udev rules I tried and failed miserably:

```
SUBSYSTEM=="input", ENV{PRODUCT}=="3/4f2/b685/5404", ATTR{authorized}="0"
ACTION=="add", SUBSYSTEM=="input", ATTR{idVendor}=="04f2", RUN="/bin/sh -c 'echo 1 >/sys/\$devpath/remove'"
SUBSYSTEM=="input", ATTRS{idVendor}=="04f2", ATTR{authorized}="0"
ATTRS{idVendor}=="04f2", ATTR{authorized}="0"
SUBSYSTEM="input", ATTRS{idVendor}=="04f2", ATTR{authorized}="0"
ATTRS{idVendor}=="04f2", ATTRS{idProduct}=="b685", ATTR{authorized}="0"
ATTRS{idVendor}=="04f2", ATTRS{idBustype}=="003", ATTR{authorized}="0"
ATTRS{idVendor}=="04f2", ATTR{authorized}="0"
```

Some of them did not even do nothing ... and other did too much

## Second fix attempt

I tried to ignored at the X11 configuration (the place the logs were actually picking up the error)

This is the configuration I've added to X11:

```
Section "InputClass"
	Identifier "catchall"
	MatchProduct "Chicony USB2.0 Camera: Chicony "
	Option "Ignore" "true"
EndSection
```

And I also add a more specific configuration for the actual system keyboard to X11 like this:

```
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
	MatchProduct "AT Translated Set 2 keyboard"
        Option "XkbLayout" "de"
        Option "XkbVariant" "deadtilde"
EndSection
```

I've have to use input, libinput, none, keyboard, system-keyboard and some variations from the vendor and product names until this trick works, the camera was not recognized as a keyboard anymore but the camera was still not working

## The actual fix

After hours and hours of trying and trying and errors and errors, I've just upgraded to Debian bookworm 12 and everything magically works :) ... thank God for the great Debian community, you are the best !!

## Corolary

Even after the failed attempts, I learn a lot ... I learned about udev, udevadm, hwinfo, xinput, the Linux kernels, cameras, Debian, Chinese hardware and a lot of things more ... it's a lot of fun ... but overall ... my laptop has everything working and very fast and beautiful with the new Debian bookworm 12 Linux and Gnome 3 ... thank you all always !!
MongoDB Atlas Hackathon 2022 on DEV
Tags: atlashackathon22
Published: 2022-12-09 00:44:55

## What I built


### Category Submission:


### App Link


### Screenshots


### Description
 

### Link to Source Code


### Permissive License


## Background
(What made you decide to build this particular app? What inspired you?)


### How I built it
(How did you utilize MongoDB Atlas? Did you learn something new along the way? Pick up a new skill?)


### Additional Resources/Info
Keeping empty markers off your HTML using JavaScript
Tags: removechild, foreach, emptystring, beginners
Published: 2022-12-09 00:17:24

When using .forEach on an array each item on that array will be iterated.  If you are iterating empty values (“”) over a ordered or unordered list you will be returned ::markers with nothing attached to them essentially posting an empty string, See example below:


![Form submission page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mz1gi3z1o8qk5kue9sxo.png)


![appending element](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/inq5hxmy31571zoxpzyg.png)

![Too many markers](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sxs7emiyw5zahef8sjtq.png)

You have 2 ::markers with content and 2 ::markers with no content.  If you were iterating a .forEach over an array and wanted to not have empty markers on your page you can simply look at the data and if the data is equal to an empty string (“”) then .removeChild. Example below.

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


![website view no markers](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/auzkjpxwyfr09vu138xh.png)
MongoDB Atlas Hackathon 2022 on DEV HostelMan
Tags: atlashackathon22, microservices, go, mongodb
Published: 2022-12-08 23:14:53

## What I built
HostelMan: A hostel allotment and management system. Digitised the process of hostel room allotment.

### Category Submission:
Think Outside the JS Box

### App Link
No Live Deployment 

### Screenshots
NA

### Description
3 microservices
1. Application: here students apply and upload their documents and then id of this form is sent for document verification through kafka.
2. Consumer: here we're consuming the Kafka messages and marking forms as verified.
3. Payment: here the student can pay for their form and finalize their allotment if it has been verified.

### Link to Source Code
https://github.com/Azanul/HostelMan 

### Permissive License
MIT License 

## Background
(What made you decide to build this particular app? What inspired you?)
Mine and every other students' frustration and wastage of countless hours led me to develop this. I've created this to ease the process for both students and administration while also providing transparency.

### How I built it
(How did you utilize MongoDB Atlas? Did you learn something new along the way? Pick up a new skill?)
Used MongoDB Atlas:
- as primary database for storing students, staff and rooms info
- for storing payment reference per form

Also learnt:
- in depth docker networking
- in depth Rust dependency management
- hands on Kafka, plus, using it as a message queue


### Additional Resources/Info
Currently uses stripe as payment provider
I intend to extend this project to
- support multiple payment providers
- enable AI based document verification
- support real-time availablity update
- support full text search over students collection for admins
MongoDB Atlas Hackathon 2022 on DEV
Tags: atlashackathon22
Published: 2022-12-08 23:59:22

## What I built
Unveil is a platform built with the intention to help developers showcase their talent and make recruitment easier for recruiters by providing them with means to handle an entire cycle of recruitment process at a single place and developers to apply to a job as smoothly as possible.

Currently a basic version is deployed - where in all open jobs are being displayed. Stay tuned for more features.

### Category Submission:
Think Outside the JS Box


### Images

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




### Link to Source Code
https://github.com/DivyaPankajaNanda/unveil/tree/master

### Permissive License
MIT


## Background
I wanted to make the recruitment process easier for both dev and recruiters and add more transparency to the entire process.

### How I built it
I used Fastapi and SvelteKit along with MongoDb.

Though there are many features still pending on the frontend side, while building the backend i did came accross a lot of interesting facts about Fastapi and MongoDb like understanding the difference between json and bson while i was deciding wether to use UUID or Objectid, crud operations in MongoDb with order by and other additional constraints,etc.

No doubt there is still a lot more to learn w.r.t realtime features , text based search using aggregation, etc. which will continue after this hackathon too.


### Additional Resources/Info
Flight Radar (MongoDB Atlas Hackathon 2022 Submission)
Tags: atlashackathon22, nextjs, redux
Published: 2022-12-08 23:57:30

## What I built
Flight Radar is a real-time interactive map for flight simulator games, or with simple modifications, a lot more.

Unfortunately, I didn't have enough time to complete everything I wanted, and there are some bugs or unfinished UIs.

### Category Submission:
About Real-time

### App Link
https://flightradar.kopter.me/
https://flightradar.kopter.me/livemap

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

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

### Description
Every time you enter the website, you will be logged annually to MongoDB, so that you can start to fetch the plane's data in real-time and to get alert notifications, and what are those, every time a plane change to squawk code 7600 (Radio/Communications Failure) or 7700 (Emergency Situation), you will get an alert on the bottom right corner of your screen with information and ways to view more information.

On the live map, the planes will update their location every time new data gets uploaded, you can also pause them by clicking the button on the top right, and clicking again will resume them. By clicking on a plane you will open a small window on your middle left with more information about that flight.

On the all flights page, you have the same information as in the live map except in a table and text form.

On your account,  after one is created or logged in, you can log out of your account, check your flights and generate a key to be used to post data about your current flight via the Cloudflare Worker.

A CRON job should be added, to remove flights that were never terminated via the Cloudflare worker.

### Link to Source Code
https://github.com/Kop7er/FlightRadar

### Permissive License
MIT

## Background
I enjoy aviation, so I play flight simulators, so I thought I could create something that could combine both.

### How I built it
The website is built with NextJS, for the interactive map it uses Mapbox, of course for the database and real-time updates, MongoDB, connected via the Web SDK. For state management, Redux, TailwindCSS for styling the website, with help of, Flowbite, TailwindUI, and MUI components.

To upload the data, I also built a Cloudflare Worker, so that no matter the way you want to upload data, you can easily do it with POST requests.