teleren/devto huggingface dataset:
I need team viewer partner in Europe or America
Tags: career, webdev
Published: 2019-12-19 01:05:13

Hello, guys. I want to work on upwork using European or American account to get more money. If you don't work on upwork, you can help me, I think.
Instead, I will pay money more than $100 per month.
If you are interested in, please contact me.

Skype: Roshan Webmaster
Discord: SUPERMAN#4107
Gmail: superman19931207@gmail.com
First Class Functions in Python
Tags: python, programming, functions, firstclassfunctions
Published: 2019-12-19 01:02:15

This article was first published [here](https://sethirajat.com/first-class-functions-in-python/)

## What are first class functions ?

Functions in programming language are considered first class citizens if they exhibit the following characteristics.

- They can be stored in a variables.
- They can be stored in data structures.
- They can be passed as an argument to a function.
- They can be returned as values from another function.

Python supports all these features so functions are treated as first class citizens.

This is not a python only feature by any means, many other languages treat functions as their first class citizens, namely JavaScript, PHP, Perl. They are pretty much a necessity for the functional programming style.

## Defining functions 

As you must already know we define functions in Python with the `def` keyword. 

```python
def foo():
    pass
```

The function gets stored at a memory location as shown below at the address `0x0376CB28`.

```python
>>> foo
<function foo at 0x0376CB28>
```


## Storing functions in variables

As function in python are first class citizens you can store the function in a variable.

```python
>>> foo
<function foo at 0x0376CB28>
>>> bar = foo
>>> bar
<function foo at 0x0376CB28>
```

![sdf](/images/first-class-functions-1.png)

Even though the function is assigned to a separate variable `bar` notice that the location of the function still stays the same. Its merely 2 variables storing the location of the same function in the memory.


Not only you can store them in simple variables but you can store functions in a list, dict and other data structures as shown below.

```python
# storing in list
>>> mylist = []
>>> mylist.append(foo)

# storing in dict
>>> mydict = {}
>>> mydict['function_foo']= foo
```

## Passing functions as arguments

Functions can be passed as arguments to another function. Check out the sample below.

```python
def main(func):
    print(func)

def foo():
    pass

print(foo)

main(foo)
```

Output shown below...

```python
<function foo at 0x0163CD68>
<function foo at 0x0163CD68>
```

The function `foo` is passed as an argument to the function `main` and we can confirm that it is the same function `foo` which `main` has received as the argument by printing the memory address (feature of CPython) of the function globally as well as within the `main` function.


## Returning functions

Similarly a function can return another function.

```python
def foo():
    pass

def main():
    return foo  # returns a function

bar = main()
```

As you see the memory address is still the same for `foo` and `bar`.

```python
>>> foo
<function foo at 0x009CF6F0>
>>> bar
<function foo at 0x009CF6F0>
```
## Advantages of first class functions

There can be numerous benefits of this approach, some of them are listed below. You can check out the below topics to further dig deeper.

- __Decorators__ 
- __Dynamic Code Inspection__ 
- __Callbacks__
Sponsor Me
Tags: devrel, conferences
Published: 2019-12-19 00:35:46

To the tune of [Grow For Me](https://www.youtube.com/watch?v=JgVnpMkXOas) from Little Shop of Horrors:

I will give you dope rhymes
I will give you plays
I’ll ask you for something:
To fund my main stage!
I'm beggin' you sweetly.
I'm down on my knees.
Oh, please sponsor meeeee!

I will give you brain food,
Some lessons to learn.
I’ll teach you what you need
To increase what you earn!
I’d like some live captions
Some coffee and tea,
So please sponsor me!

I want to have free childcare onsite
For parents to share.
And an afterparty
That goes all night,
All are welcome there!
I want to record all the sessions
From open to end.
Plus mentoring, quiet rooms,
Pronoun pins, catering
For everyone who attends!

I’ve got a great venue
The team’s picked a day
But nothing will happen
Unless they can paaaaaaay!
I’ll grab you a table.
A sign will decree
That your company’s... sponsored me!

_I had a lot of fun writing this. If you or your company is interested in supporting [&lt;title of conf&gt;](https://www.titleofconf.org), please check out [titleofconf.org/sponsor](https://www.titleofconf.org/sponsor/) or get in touch with me directly!_
laravel 6 validation for confirm password
Published: 2019-12-26 12:24:08

---
title: laravel 6 validation for confirm password
published: true
date: 2019-12-19 00:00:00 UTC
tags: 
canonical_url: 
---

Hi GuysIn this exampleI will learn you to give password and passwordconfirmation validation in laravel 6you can simply use to validation in laravel 6we want to match password and confirm password using this validation you will check password and passwordconfirmation then use below solut
Roam Research to Explore Ideas
Tags: productivity, roamresearch
Published: 2019-12-19 16:38:08

---
title: Roam Research to Explore Ideas
published: true
date: 2019-12-19 00:00:00 UTC
tags: productivity, roam research
canonical_url: https://ianjones.us/rr
---

RoamResearch.com is a tool that I have been using for the past couple weeks as a sort of daily log/research tool. It as completely changed what I expect out of a note taking tool. The best part is its easy of use. Theres zero friction to start recording your thoughts on a topic.

I keep track of everything I do in the "Daily Log".

![Roam Research Daily Log](https://thepracticaldev.s3.amazonaws.com/i/st1gykjxgke6kaoq0ned.png)

There are handy short cuts for mark down syntax and everything.

Roam is a networked not taking app :exploding_head:

When ever you get to some topic you want to reference, you can add `[[]]` around the string to create a page. Now that you've created a page, you can reference that page from anywhere.

For example, I use rails for work, so Ive created a `[[Rails]]` tag.

This is the page that Roam created for me:

![Roam Research Tag Page](https://thepracticaldev.s3.amazonaws.com/i/dt2d6whohq97cgymennj.png)

This page gives you a place to put any content you want around this tag. You'll notice that you can reference other tags on this page. If you shift-click the tag, it opens that page in the sidebar:

![Roam Research Side Panel](https://thepracticaldev.s3.amazonaws.com/i/jr0sw1j5ywx10i77igzp.png)

This is the networked aspect of Roam. It allows you to easily navigate through your notes. I can see this being an amazing tool for researching a topic to write about or just generally keep your notes in.
Target elements without classes
Tags: css
Published: 2020-01-04 16:45:24

---
title: Target elements without classes
published: true
date: 2019-12-19 00:00:00 UTC
tags: CSS
canonical_url: https://coltborg.com/target-elements-without-classes/
cover_image: https://thepracticaldev.s3.amazonaws.com/i/bub9hqet0i1l984j32f9.png
---

## Why did I need to target classless elements?

In making this blog site, I want to style content that comes from markdown files. I found a nice trick to apply styles to the elements that don’t have any classes one them—aka coming from the markdown content.

I can do this by combining the `not()` and `attribute` selectors. For example, if I want to target any paragraph without a class, it would look like this:

```css
p:not([class]) {
  margin: 1rem 0;
}
```


### Why :not()

`:not()` is a [negation pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/:not). So whatever you put in it, it will look for things that are not that thing.

### Your best friend Attribute Selectors

[Attribute selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors) are really powerful. They can check for a whole bunch of different things. But in this case, we can use them to detect if `class` is placed on the element. In this case we don't care which or how many classes are used.
A year of blogging every week
Tags: devrel, blogging
Published: 2019-12-27 02:13:37

---
title: A year of blogging every week
published: true
date: 2019-12-18 23:56:56 UTC
tags: DevRel,DeveloperRelations, Blogging
canonical_url: https://maxkatz.org/2019/12/18/a-year-of-blogging-every-week/
---

Last January I set a goal for myself to publish a blog post every week that offer some value, even if small (I actually started in February 2019). I couldn’t miss even a single week, no excuses. I had to publish something. Now, not every blog post was a long-form, in fact most blog posts were short and cover something very small/specific. Nevertheless, the goal was not to miss a single week. For me it was important to get into the habit and stay consistent and once the habit was established it became easier to come up with content ideas and write every week. If this also works for you — that’s great. You should come up with your own approach to keep going.

If you think it will be hard to come up new ideas every week that go beyond the standard tutorial, article or how-to, I shared a blog post [on interesting content ideas you can try](https://dev.to/maxkatz/interesting-content-ideas-you-may-try-fo1). The blog post covers the following ideas:

- Notes or summary from a conference, meetup
- Event in 10 pictures
- Links to series of articles
- Links to previous month video recordings

Since I published that blog post, here are some additional ideas to help you.

### Link to a podcast

If you recorded a podcast (as a guest for example), create a blog post by linking to the podcast or embedding it in the post itself.

### Q&A

Do a Q&A with a colleague, a friend or someone you know from another company. [Dave Nugent](https://twitter.com/drnugent) has done a number [Q&A blog posts](https://dev.to/drnugent/effective-developer-advocacy-for-highly-technical-projects-dl8) which are great.

### Answer questions on Quora

See what people are asking on Quora about a particular topic. Publish a blog post that answers that question and then answer the Quora question with a link to your blog.

### Drafts (when out of ideas)

Write 1-2 blog post drafts and keep them as drafts. If at some point throughout the year you don’t have anything to publish or just very busy, you can always go back to the drafts and publish them.

### See what others are doing

OK, if you are really out of ideas, you can always peak (or also called [borrowing brilliance](https://www.cnbc.com/id/32900786)) at what other people are writing. For example, majority of content on Serverless is based on using AWS Lambda. Take a tutorial that uses AWS Lambda and write a similar one that uses Azure Functions, IBM Cloud Functions or Google Cloud Functions.

I hope these old and new ideas help you write on regular bases whether you decide to publish once a week, every two weeks or once a month. If you are new to blogging or have been writing for some time, you should also read [Where to publish content?](https://dev.to/maxkatz/where-to-publish-content-53ao)

If you have any other ideas, I’d love to learn about them so please share in comments.
GKE : use local domain (OSX)
Tags: gke, tls, contour
Published: 2019-12-18 23:13:31

---
title: GKE : use local domain (OSX)
published: true
description: Sometime you need to test SSL on localhost, for a demo, live coding ...

tags: GKE, TLS, CONTOUR
---

I have a GKE cluster & I want to try ingress with a fake localhost dns like https://main.local

## set a local dns to your ingress external IP 
/etc/hosts :
```
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	localhost docker.for.mac.localhost
255.255.255.255	broadcasthost
::1             localhost

xx.xxx.xxx.xx   main.local
```

## Generate SSL cert with letsencrypt: 

e.g : ssl for https://main.local 

```
openssl req -x509 -out main.crt -keyout main.key \
  -newkey rsa:2048 -nodes -sha256 \
  -subj '/CN=main.local' -extensions EXT -config <( \
   printf "[dn]\nCN=main.local\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:main.local\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
```

## Create Secret TLS on your K8S cluster

```
kubectl create secret tls tls-main --key main.key --cert main.crt
```

## Put it in your Ingress 

here I use [Contour](https://projectcontour.io) proxy

main-route.yaml :
```
apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
  name: main-httpproxy
  namespace: default
spec:
  virtualhost:
    fqdn: main.local
    tls:
      secretName: tls-main
  routes:
    - services:
        - name: myservice
          port: 80

```
## Set cert trust on OSX

- Launch Application/Utilities/Keychain Access.app & upload your main.crt

- set trusted always

see [tuto](https://tosbourn.com/getting-os-x-to-trust-self-signed-ssl-certificates)
Day 55 : So Fresh, So Clean
Tags: hiphop, code, coding, lifelongdev
Published: 2019-12-18 23:09:36

_liner notes_:
- Professional : Got up early to attend the first session of the Talk Preps. These were special because there was a theme. Festive Ignite Talks. 20 slides that automatically advance every 15 seconds so that you do not go over 5 minutes. From the first session, I realized that the talk didn't have to be on a technical topic. It was then that I decided I would create a talk to present in the next session. My subject was "The Greatest Group of All Time (to me)". Of course it was about OutKast. Putting it together was a really good exercise, especially since I had a time crunch. I did the presentation and I think it went okay. I covered all my points for each slide and kept it under 5 minutes. So fresh, so clean. Rest of the day, I worked on my blog post and found a framework to create CLIs.

- Personal : I've been using my Google Pixel Slate more to try and replace my other laptops. I'm writing this post on it right now. I installed Visual Studio Code on it also. Going to see if I can somehow work out coding online with Docker or something. Got some more research to do. Found out that there is Visual Studio Online. I knew about coder.com that had an open source Visual Studio Code that you could host in the cloud even though it seems as if they changed up their offerings.  

![A trail through the forest in Redwood State Park, CA, USA](https://thepracticaldev.s3.amazonaws.com/i/osarctylkch4x5cmuq6r.png)

So I came across an article talking about Benjamin Franklin's schedule. I think I'm going to try it out. So I'll be going to bed earlier. Got some stuff I want to get done before that.

![Benjamin Franklin's schedule](https://thepracticaldev.s3.amazonaws.com/i/oxwqn6wnu98gg26364m0.jpeg)

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube -JfEJq56IwI %}
Charming the Python: Exception Handling
Tags: python, beginners
Published: 2019-12-18 22:26:09

*If coding tutorials with math examples are the bane of your existence, keep reading. This series uses relatable examples like dogs and cats.*

---
## Exception Handling

Exception Handling is how Python deals with errors. Handling works similar to [if-else statements](https://dev.to/vickilanger/charming-the-python-loops-1ngp).

```python
# syntax
try:
    code in this block  # if things go well
except:
    code in this block  # run if things go wrong
```

Here's a basic example. Know that you should use better wording to explain what it going wrong.
```python
try:
    let_dog_outside
except:
    print('Something goes wrong')
```

Exception handling uses `try`, `except`, `else`, and `finally` to decide how to handle the errors Python gives. 
```python
try:
    let_dog_outside
except SyntaxError:
    print('Fix your syntax')
except TypeError:
    print('Oh no! A TypeError has appeared')
except ValueError:
    print('A ValueError jumped out of nowhere!')
except ZeroDivisionError:
    print('Did you try to divide by zero?')
else:
    print('maybe you just need to unlock the door')
finally:
    print('something went horribly wrong, contact admin')
```

Another dog example. 
```python
while dog_wants_to_go_out == True:
    try:
        let_dog_outside
        break
    except RuntimeError:
        print("dog lies and doesn't really want to go out")
```

You may also use `raise` to force an exception.

---

Learn By Example has [good examples and they have great visuals](https://www.learnbyexample.org/python-exceptions-try-except/).

RealPython has a well-detailed [post on exception handling](https://realpython.com/python-exceptions/).

For more info on exception handling, [check the docs](https://docs.python.org/3.9/tutorial/errors.html)

---
Series loosely based on {% post https://dev.to/asabeneh/30daysofpyton-challenge-43ii %}
Fullstack starter for Svelte and netlify 
Tags: svelte, netlify, firebase, jamstack
Published: 2019-12-18 22:13:18

I made a fullstack starter for #svelte and netlify.

live demo https://svelte-netlify-identity.netlify.com

I will be adding support for firebase next.

See the youtube series for full explanations.

📘Svelte Fullstack Starter Playlist:


https://www.youtube.com/playlist?list=PLCrwuqjmVebJeMDrAPQDrJmnwXWDw3CJW  

https://github.com/QuantumInformation/svelte-fullstack-starter
(Video) Interview with a real DevOps Practitioner
Tags: devops, career, vide, aws
Published: 2019-12-18 21:57:19

Hey Folks,
So I will try and keep this short as the real content of this post is of course the video itself and the wonderfully wise words that my interviewee delivers.

If you are interested in DevOps at all then this video interview is for you. Basically I ask a real DevOps Practitioner that works and has worked in the DevOps world for many years lots of questions all about DevOps, from the basics, like what it is and how to get involved and learn DevOps techniques all the way to asking questions about DevOps frameworks (CALMS) and even security's involvement in DevOps...

Anyway, I thought I would just post it here to you wonderful people incase anyone had an interest and the gentleman that I interview (Jamal) is incredibly insightful and full of wisdom that he openly shares. I honestly learnt so much just interviewing him so I am sure you can gather a bunch of useful information (or at least jumping off points) that you can take back to your respective companies or places of work/devving...

This video in total is nearly half an hour long so for your benefit I have included in this post the questions that I asked and timestamps to those questions in the video so that you can jump ahead if you would like to. I have also included links that are discussed in the video so that if you don't even want to watch the video then you can at least gain something from this post in regards to places online where you can learn more about DevOps and engage with the DevOps community! (The actual video is at the bottom)

## Questions that are asked and their timestamps

01:10 - Who are you? What do you do?
01:40 - Solutions Architect vs. DevOps?
02:31 - What is DevOps?
03:32 - What do you mean "Silos"?
06:50 - How did you get into DevOps?
07:48 - What tools did you use in your previous role?
09:23 - What did you do before DevOps?
11:10 - Whats the difference between a DevOps practitioner & a DevOps Engineer?
13:24 - How would you learn DevOps?
16:45 - Is security included at all within DevOps?
18:43 - What is CALMS?
22:40 - What does a day-in-the-life look like?
24:01 - What do you mean by Infrastructure
24:52 - Do you have any side projects atm?
27:03 - Fun Extra Questions...

## Links discussed in the video

The DevOps Institue:
https://devopsinstitute.com/

LinkedIn Group of DevOps:
https://www.linkedin.com/groups/2825397/

CALMS framework explained:
https://devops.com/using-calms-to-assess-organizations-devops/

Other useful DevOps Learning Links:
https://devopsdays.org/
https://devops.com/
https://www.alldaydevops.com/

25:30 - Jamal's Toolchain Anxiety YT Video:
https://youtu.be/yj-TseEfP4k


## The Video
{% youtube s-t_d-igimU %}


## Onwards

If you have ANY feedback or questions at all please let me know in the comments below or reach out to me on twitter:

[My Twitter (@ben_kadel)](https://twitter.com/ben_kadel)

Thanks for reading and possibly watching!
Django Test Plus Extensions
Tags: django, python, test
Published: 2019-12-18 11:51:58

---
title: Django Test Plus Extensions
published: true
description: Django Test Plus Extensions is a collection of custom extensions for the Django Framework.
tags: django, python, test
---

[![](https://img.shields.io/pypi/v/test-plus.svg)](https://pypi.org/project/test_plus/)

https://github.com/tolgahanuzun/test_plus

Django Test Plus Extension is an advanced tool for Django tests. Motivation; This is a detailed analysis of the atomic parts of Django tests. In short, each running test understands how long it runs.

The total time information of Django tests is returned. There are more than a thousand test cases in the company I work for. I wanted to analyze long tests and correct mistakes.I saw such a shortcoming, I aimed to write a package.

## Support and Update


Inspired by the Django Extensions package. It is free and open to improvement. I can improve if you tell me your needs. You can also support the development.


## Installing

```
pip install test_plus
```
and

Add it to INSTALLED_APPS in your projects settings.py file:

```
INSTALLED_APPS = (
    ...
    'test_plus',
    ...
)
```

## Using and Result

It takes the same parameter in Django tests.

```
python manage.py test_plus
```

or

```
python manage.py test_plus app_name.test.test_file -k -v 2
```

![](https://raw.githubusercontent.com/tolgahanuzun/test_plus/master/test.png)