teleren/devto huggingface dataset:
Django: _ (underscore) settings gotchas
Tags: python, django
Published: 2021-07-27 10:38:37

It so happened that after we add some localization setup in our app, running our tests error out with:-

```
ackages/django/conf/__init__.py", line 122, in configure
INTERNALERROR>     raise TypeError('Setting %r must be uppercase.' % name)
INTERNALERROR> TypeError: Setting '_' must be uppercase.
```

The settings in question that we have added is this:-

```
try:
    from django.utils.translation import gettext_lazy as _
except ImportError:
    _ = lambda s: s
...
...
LANGUAGES = [
    ("en", _("English")),
    ("ja", _("Japanese")),
]
```

This however only happened when we run tests, it didn't happened in normal django run. Adding some `breakpoint()` in `configure()` function proved that it never get called in normal django run (such as through `runserver`).

My initial gut feeling tell that this is a problem with pytest_djangoapp but after I did some digging, my thinking a bit skewed.

Firstly I looked into the [commit][1] that introduced this check (not allowed `_` as settings attribute). You can find it using `blame` on github.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bpqab1ie721i5ncw8mh9.png)

So it brought me to [issue #30234][2] on django project issue tracker. At this point I thought Django is at fault as the localization docs still showing example of using `_` in settings.py. It doesn't make sense, if you already disallowed using `_` in settings, why still show it in official docs?

Fortunately some wise guy on the issue's comment replied to my comment that this has nothing to do with  Django or its docs. The problem is with pytest_djangoapp which called `settings.configure()` and passing `_` as part of the settings dict.

I can't tell how embarrassed I am. I should have check pytest_djangoapp first before posting the comment in the issue tracker.

[1]:https://github.com/django/django/commit/163236ea0e5df1a301371e79ec35fc67b7a1b7a6
[2]:https://code.djangoproject.com/ticket/30234
Python Basics, Python 101
Published: 2021-07-27 10:31:09

# Introduction.
## What is python?
Python is a “high-level programming language and its core design philosophy is all about code readability and a syntax which allows programmers to express concepts in a few lines of code” created by Guido van Rossum.

Python is one of the most popular programming languages available today. It is widely used in various sectors of business, such as programming, web development, machine learning, and data science. Given its widespread use, it’s not surprising that Python has surpassed Java as the top programming language.

This Python tutorial covers all the basics of Python and some advanced topics of the Python language, such as variables, data types, arrays, functions, and OOPs concepts, all of which will help you prepare for a career as a professional Python programmer.

**# Python 101: The Basics**
**1. Variables**

You can think about variables as a word that stores a value. Simple as that.

In Python it is really easy to define a variable and set a value to it. Imagine you want to store number 1 in a variable called “one”. Let’s do it!

**2. Control Flow: conditional statements**
Conditional Statement in Python perform different computations or actions depending on whether a specific Boolean constraint evaluates to true or false. Conditional statements are handled by IF statements in Python

**3. Looping / Iterator**
In Python we can iterate in different forms. For example the "while and for".

_While Looping:_ while the statement is True, the code inside the block will be executed. 
The while loop needs a “loop condition” and if it keeps True, it continues iterating. 

*Some of the learning outcomes of python include:*

1. Learning the basic features of the python interface. 

2. How to use _Python_ to create *programs*

3. Learning and applying programming concepts to create programs

4. Testing and Debugging.

5. Learning *good programming practices to ensure readability and to avoid errors in programs*.

**Installation**
1. Select Version of Python to Install.
2. Download Python Executable Installer.
3. Run Executable Installer
4. Verify Python Was Installed
5. Verify Pip Was Installed
6. Verify Pip Was Installed
7. You can start coding

*_ Happy Coding!_*
IT platform dedicated for Hospital and Clinics management
Tags: javascript, vue, dotnet
Published: 2021-07-27 10:30:35

This product is an IT platform dedicated for Hospital and Clinics management

✔️ Patient Admission System (PAS)
✔️ Eletronic Medical Record (EMR)
✔️ Human Resource Management (Admin)
⚡ AI Analysis for Fundus and Dry Eye (Beta)

 1. PAS - Patient Admission System

Managing patient profiles
Booking appointment
Admit patient into EMR system
Accepting payments, export invoices and payment receipts
High performance and thorough Reporting system



✔️ 2. EMR - Electronic Medical Record

Medical Forms for doctor to perform examination
Data collection and Episode Manegemnt for each patients visits
Scalable Archetype design to extend to different medical fields
Medicine and Medication management system
Patient Visits and Discharge Summary management


✔️ 3. Admin - Internal Organzation Management

Management of hospital's Human resources
Management of Branding and satlite Clinics
Complete customization of available Medical Services
Doctor Roster and Scheduling System



⚡ 4. A2DS - AI Assisted Diagnosis System (beta)

Dry Eye detection algorithm
Fundus Lesion detection algorithm
Analysis and Flow management

How To Use
1. Run using docker compose 🌈
A complete, Open version of the platform is ready to use with the following commands:

# Clone this repository
$ git clone https://github.com/nichealpham/his-composer.git

# Go into the repository
$ cd his-composer

# Run the app
$ docker-compose up -d
Then navigate to the following URL:

http://localhost:3001: Admin
http://localhost:3002: PAS
http://localhost:3003: EMR
Default Root account:

Username: root
Password: Admin@123#
2. Modify the Default SQL Password ⚡️
You can update the default MSSQL Password by changing the following sections:

In docker-compose.yml file, update line - SA_PASSWORD=[Your new password...]
In api.env file, update line HIS_APP_MSSQL_DB_PASSWORD=[Your new password...]
Then rebuild and run the system:

docker-compose up --build -d
3. Hosting the frontend via a reverse proxy ⭐
We highly recomdend you should be familiar with how to setup a reverse proxy for the application, for example with nginx.

For fontend website to successfully call Backend APIs, modify the following URLs inside web.env file:

HIS_APP_API_AUTHEN=http://localhost:2001/api
HIS_APP_API_BOOKING=http://localhost:2002/api
HIS_APP_API_EMR=http://localhost:2003/api
HIS_APP_API_HR=http://localhost:2004/api
HIS_APP_API_PAS=http://localhost:2005/api
HIS_APP_API_SIGNAL=http://localhost:2006/signal
HIS_APP_API_FUNCTION=http://localhost:2999/graphql
HIS_APP_API_ORTHANC=http://localhost:8042
Then rebuild and run the system:

docker-compose up --build -d
Credits
This software is made by these technologies:

.NET Core
SQL Server
Appolo GraphQL
Vue.js


Detail : https://github.com/nichealpham/his-composer
El porqué de la ingeniería de software.
Published: 2021-07-26 03:33:13

Nota: 
Este artículo es parte de una tarea para la Universidad Francisco Gavidia. 

Muchas personas están interesadas en el estudio de la Ingeniera de Software, como yo lo estuve en el momento de decidir mi carrera, pero además, porque es una carrera que le encuentran importancia en nuestros tiempos actuales, ¿Por qué es esto? 

Definamos la Ingeniería de Software como la creación de software basado en técnicas de Ingeniería, cualquiera con conocimientos técnicos puede crear software, pero un Ingeniero en Software ha tenido estudio para buscar la manera más efectiva tomando en cuenta las necesidades del cliente, las limitaciones del tiempo, la efectividad y rendimiento de su algoritmo, etc. 

Este término se empezó a utilizar por los 1960, han pasado más de 60 años desde que se tuvo la necesidad de separar esta Ingeniería de otras, se consideraba importante, pero nunca se pensó que tendría el boom que se tiene actualmente. Estamos en una época de oro para el software, aunque se le conoce en realidad como la crisis del software, que es la necesidad que se han visto numerosas empresas en la creación de software para una experiencia más personalizada de sus clientes.

Todas las empresas necesitan un sitio web, una atención al cliente que se llevara a cabo por un sistema, un sistema de comunicaciones, etc., y esto es en casi todos los ámbitos modernos, y aunque todas requieren software, las soluciones pueden variar bastante, una solución mal implementada puede ser costoso para una empresa, por esto se necesita un equipo especializado para evitar estos problemas.

Los ingenieros de Software deben demostrar ser expertos, éticos y responsables, para el mayor beneficio del cliente y del desarrollo de software en general, y gracias a ingenieros apasionados en esta ciencia, que apenas va comenzando, es que estamos en una sociedad donde el software ha dado soluciones que hace unos años parecían sueños de ciencia ficción.
Add Messaging, File sharing, Activity Feeds in your website easily
Tags: programming, productivity, sdk, collaboration
Published: 2021-07-27 10:29:10

#What is Weavy?
Weavy is an in-app collaboration API and SDK, meaning that it provides you easy way to add features like in-app messaging, in-app activity feeds, in-app file sharing and in-app tasks management. 
![Weavy](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6yuauk7p3tuvek65ikcr.jpg)

## What does in-app mean?
In-app means that users will remain on your website/application and thus, you can add these features WITHOUT losing your user. Weavy has been designed with simplicity, easy usability, quick integration and complete feature set in mind. 
 
## Can I try it without doing anything?
Sure, you can play around with all the features by going to https://www.weavy.com/try/app

## How is my data secured?
Your data is stored inside your cloud. Weavy provides you complete SDK (Client, Server, Tenant and Mobile) and you will be hosting everything on your cloud. Thus, your data never leaves your system. 

## How to get started?
You can get started on your local machine by following [this](https://www.weavy.com/developer/getting-started/introduction-to-weavy) article. 

## Is it Free?
Weavy provide 30 days of FREE trial to all features (no questions asked, no limits placed). After that, the sales team will help you to get onboard or provide more extension. 

## Need Help?
You can use [Get Help](https://www.weavy.com/developer/contact) form to reach out and get assistance immediately.
#8) What is IIFE in JavaScript🐱‍👤
Tags: javascript, beginners, webdev, career
Published: 2021-07-27 10:12:39

🔰`IIFE: Immediately Invoked Function Expression`

✔It is a JavaScript Function that runs as an when it is defined.
 
Syntax of IIFE👇
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/khtxpu0ska8xts9y0so8.png)

Let's talk about the two parenthesis in the above syntax.
##`( function() {} )`
💠Outer parenthesis '()'👆
✅While executing JavaScript code, whenever the compiler sees the word _function_, it assumes that we are declaring a function in the code. 
✅Therefore, if we do not use the first set of parentheses, the compiler throws an error because it thinks we are declaring a function, and by the syntax of declaring a function, a function should always have a name.

⚠So, instead of getting error, we have to use the first set of parenthesis that tells the compiler that this function is not the function declaration but it's function expression.


##`( function() {}) ();`
💠Right-end side parenthesis '()'👆
✅So, IIFE states that the function should invoke immediately as soon as it is defined.
✅And as we know to run a function we need to invoke it.
✅If we don't invoke it, function declaration is returned.
✅That's why this second parenthesis is just for invoking.
__________________________________________________________________
New Sitecore TDS Update: Protobuf Is Here!
Tags: sitecore, tds, protobuf
Published: 2021-07-27 10:05:56

I'm hoping to get more blogs out soon, but our team just finished a big 8.1 -> 10.0.1 Sitecore upgrade into Kubernetes with Coveo...it's fun to see where containers are going, but also how much work needs to be done for efficiencies still. One area is in the default items used by packages like Coveo, or Powershell Extensions, and yesterday Sitecore decided to start helping out.

When Sitecore 10.1 was released, one of the biggest behind-the-scenes changes was the introduction of Protobuf files. A Google XML format, these files (found in App_Data/items) now store the default items you see in the content tree when you first create your instance. That means a lighter SQL database since they no longer have the items in them. It doesn't mean you can't change these either, but now only changes will be saved to the database as a delta.

Sitecore developed this to be extendable from the get-go, too. By default, there's a single DAT file in each of the core/master/web database folders. But any properly-formatted Protobuf file in here will be added to the mix, which is great...but the question was how to make these files? Tooling has been discussed...and today it begins.

When you [update TDS to 6.0.0.30](https://www.teamdevelopmentforsitecore.com/Download/TDS-Classic) and go to the properties of one of your TDS projects, you'll see a new section:
![TDS Properties](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bxkr13eabshidj98k1nt.png)

It's pretty straightforward...check on the *Build Item Resources File* box, provide a prefix (perhaps based on your project name), and then build the TDS project. Take a look and you'll find a DAT file now created. Then copy that file into a Sitecore 10.1 instance's **App_Data/items/[database]** folder, fire it up, and go take a look!

So what are the possibilities? For containers, you could easily generate a Protobuf file for your core database items, as well as the master database "structural" items (layouts, renderings, templates, etc). I'd shy away from content unless it's more immutable, like protected items for default paths you're establishing. Beyond development though, this is how we should start seeing Coveo ship their items as they work towards a containers package of their own, and I could see Sitecore Powershell Extensions or other packages with items adopting it. True, it only works for 10.1+, but that's likely to be the norm going forward of course.

Give it a try!
Can't add script component because the script class cannot be found
Tags: unity3d, csharp, computerscience
Published: 2021-07-27 09:58:28

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f6bdluya6hlsa8zgkzh0.JPG)
Try these:

**1.** Check if the name of the file is same as the class name or not. The class that associates with `Monobehaviour` must be same as the file name.

**2.** Check for any errors in your script

**3.** Bad import. In that case just right click your mouse in the project folders section and select Reimport All option.
Github repo to learn Jetpack Compose
Tags: jetpackcompose, github, android, learning
Published: 2021-07-27 09:51:05

Jetpack compose is the new toolkit UI for Android Development. It can implementation ui like swift ui or flutter. When you learn jetpack compose you need some resources to help your learn. In this blog i will show you all, github repos that you can use as a resource.

- https://github.com/Foso/Jetpack-Compose-Playground
- https://github.com/Gurupreet/ComposeCookBook
- https://github.com/vinaygaba/Learn-Jetpack-Compose-By-Example
- https://github.com/airbnb/Showkase
- https://github.com/zsoltk/compose-pokedex
- https://github.com/jetpack-compose/jetpack-compose-awesome

if you want website page :
- https://www.jetpackcompose.app/
- https://foso.github.io/Jetpack-Compose-Playground/
HTML TUTORIAL FOR BEGINNERS PART 7
Tags: html, 100daysofcode, programming, codenewbie
Published: 2021-07-27 09:44:26

Sometimes you wanna create list with bullet but sometimes with number, this kinda of stuff are called list elements in HTML.
List elements are divided into two type:
1- Ordered list
2- Unordered list
## Ordered list
Is a list which its list items are numbered at the beginning of the item.
For example you wanna list your school's subjects as the total of your subjects be clear like below👇
1- Math
2- Physics
3- Geometry
4- Computer science
5- Probability
6- Chemistry
As you see the list items are numbered at the beginning of the item.
I hope you, am clear and explained it professionally hope you understand my point.
### Unordered list
Is a list which its items are not numbered but they are started with bullets •, the number of items are not cleared and displayed.
Unordered list is like below👇
• Math
• Physics
• Chemistry
• Probability
How to create these types of lists in HTML.
Don't be scared, it's super easy just look below👇
```
<!--Ordered list-->
<ol>
<li>ordered list item 1</li>
</ol>
<!--Unordered list-->
<ul>
<li>unordered list item 1</li>
</ul>
```
As you see `<ol>` means ordered list.
`<ul>` implies unordered list.
Inside ordered or unordered list we put list item which is `<li>`.
As much as item you can add into your list.
We can customize unordered and ordered list using `list-type` property.
If you want to learn more about lists refer to mdn.org.
Hope you enjoy the story please share and like it.
JavaScript Implementation of FizzBuzz in functional programming
Tags: javascript, fizzbuzz
Published: 2021-07-27 08:12:22

>The FizzBuzz problem is a classic test given in coding interviews. The task is simple: Print integers 1 to N, but print “Fizz” if an integer is divisible by 3, “Buzz” if an integer is divisible by 5, and “FizzBuzz” if an integer is divisible by both 3 and 5.


```js
const isFizz = number => number%3 ==0;
const isBuzz = number => number%5 ==0;

const range = (start, end) => [...new Array(end - start).keys()].map((n) => n + start);

const doFizzBuzz = (start, end) => range(start, end).map((number => {
  if(isFizz(number) && isBuzz(number)) {
    return 'FizzBuzz';
  } else if(isFizz(number)) {
    return 'Fizz';
  } else if(isBuzz(number)) {
    return 'Buzz';
  } else {
    return number;
  }
 }))
 .join(`\n`);

console.log(doFizzBuzz(1, 101));
```

### jsfiddle
https://jsfiddle.net/381g4fct/7/
Why have a beef with Yan and Wang？
Published: 2021-07-27 07:48:20

The feud that Guo against Yan and Wang has been made public since July 14. Guo Wengui stayed in bed and ordered the 'ants' to attack Lude and Yan Limeng separately. A close comrade and a heroic scientist cannot escape Guo Wengui's criticism and physical attacks. Alas, it is chilling. Predictably, such infighting will reemerge in XCP. Who Stand by the side of Guo will face misfortune. Comrades, it's Ok to be an onlooker, but do not get yourself into the mess, or you cannot keep yourself safe. In the end, no one can get you out of it. What a poor man!
Tailwind CSS Neumorphism Login and Registration Form
Tags: css, html, webdev, uiweekly
Published: 2021-07-27 07:39:14

Login and Registration Form is the most important part of the website for users. So here we made Neumorphism Login and Registration Form in Tailwind CSS.

In this form’s we used Tailwind CSS components and utility classes. Also, modify input fields to CSS to make Neumorphism user-interface. We used a grid for making this element responsive and mobile-friendly.



Make it yours now by using it, downloading it, and please share it. we will design more elements for you.

[source Code](https://w3hubs.com/tailwind-css-neumorphism-login-and-registration-form/)
The 'else' Keyword in "for" loop
Tags: python, beginners
Published: 2021-07-27 07:29:00

So , many of you don't know that there is a 'else' statement in for loop basically in python.
I know python is a amazing programming language and it has some amazing features too. So, today we will be learning about the 'else' keyword

> sometime you would have to search a friend name from a list of dictionary, like:


![Example - 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/83lxe3sya0nmn8i5ybyh.png)

so at this point we can use a FOR loop for searching my friend
> in this case we will use a user input.
> So, now if user types friends name like: 'sadi'
it will search the whole dictionary
![example-2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/chv44xupci0gqx1qrq7l.png)


then it will print "friend found" in the console.

at this moment if the user type a wrong name which is not in the list of dictionary like,
> enter your friends name: 'showmik'
it will give you nothing in the console.
so in this case we can use the else keyword.
so, if we write the code like this,

![example-3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s4qwl0nm08k7wpuz7a5m.png)

> this time if the user type wrong name which is not in the list. it will print 'friend not found' in the terminal

But there is a problem using else keyword!
and that is,
>now if the user type correct write name which matches the list, it will output something like this,

![ex-4](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z29y6m21l3cj2zqm6vn8.png)

because the 'else' will be run after the loop ends. that's why it is printing the statement what the 'else' provide. 
i.e, 'friend not found'

> in this case we can use 'break' statement after the loop ends. it will false the else keyword
like,

![ex-5](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uwgjfuykw5947e3jgk5t.png)
in this time after user type the correct name , the only thing will be print is 'Friend found'
for the 'break' statement the 'else' keyword will not be printed.

source: Tofayel