teleren/devto huggingface dataset:
Spatial correlation between rasters
Tags: r, rstats, rspatial, raster
Published: 2020-06-09 14:29:54

---
title: Spatial correlation between rasters
published: true
date: 2018-01-27 00:00:00 UTC
tags: r, rstats, rspatial, raster
canonical_url: https://statnmap.com/2018-01-27-spatial-correlation-between-rasters/
---

Correlation between rasters In this blog article, I propose a way to look at the spatial repartition of correlation between two rasters. For your own reason, you may want to know the correlation between rasters, but a unique value issued from fonction cor is not enough. You would like to know if there are variations of correlation in space. You can not compare raster cell by cell, so let’s use a little trick.

See more: [Spatial correlation between rasters](https://statnmap.com/2018-01-27-spatial-correlation-between-rasters/)
Extend nginx/Apache Proxy Configurations on AWS ElasticBeanstalk
Tags: aws, elasticbeanstalk, proxy
Published: 2018-01-26 20:31:21

---
title: Extend nginx/Apache Proxy Configurations on AWS ElasticBeanstalk
published: true
description: Use .ebextensions feature of AWS ElasticBeanstalk to define custom configurations for your proxy server
cover_image: https://thepracticaldev.s3.amazonaws.com/i/8ndsgtt91bqudopf8m7o.png
tags: aws, elasticbeanstalk, proxy
canonical_url: https://blog.davidojeda.dev/extend-nginxapache-proxy-configurations-on-aws-elasticbeanstalk
---

<p>AWS ElasticBeanstalk applications use either an nginx or Apache proxy to relay requests. Using the .ebextensions feature of ElasticBeanstalk we can extend the configuration of these proxies. If you don't know how .ebextensions work you can read more <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions.html">here.</a></p>

<p>I'm going to extend the default nginx proxy configurations using .ebextensions. The same procedure can be used to extend an Apache proxy.</p>

<h1>
    Create a .conf file
</h1>

<p>First we need to create a .conf file with the desired directives. A list of nginx directives can be found <a href="http://nginx.org/en/docs/dirindex.html"> here.</a> My conf file- named proxy.conf -increases some timeouts of the proxy:</p>

{% gist https://gist.github.com/davidojedalopez/b3735a658fbd645b38a13405f9eae8fa %}

<h1>Create nginx conf.d directory</h1>

<p>Now we need the directory where our configuration file will be. Under .ebextensions, create a directory named 'nginx', and inside it another named 'conf.d'. Then add the file you just created. Your dir structure should look like this:</p>

- .ebextensions
    - nginx
        - conf.d
            - proxy.conf

Now, when you deploy a new version of your application, ElasticBeanstalk will automatically copy your files on the `.ebextensions/nginx/conf.d/` directory to the `/etc/nginx/conf.d/` directory of your instances.

<p>This all works because the default nginx.conf file- on line 21 -specifies to include all .conf files under the conf.d directory:</p>

{% gist https://gist.github.com/davidojedalopez/680ae751eb2a3fd46c3bca04a33c5a4c %}

<p>The directives from the .conf file will be added to the <em>http</em> block of the default configuration.</p>

<p>If you need to add directives to the <em>server</em> block you will need to add .conf files to the elasticbeanstalk folder (see line 39 of previous Gist). That dir structure would look:</p>

- .ebextensions
    - nginx
        - conf.d
            - proxy.conf
        - elasticbeanstalk
            - my_other_conf.conf

<p>Same can be done for an Apache proxy. The difference is on the directory structure. For Apache your structure should be this:</p>

- .ebextensions
    - httpd
        - conf
            - proxy.conf

<h1>Wrap-up</h1>

<p>Using .ebextensions is by far the simplest method to add custom configurations to your nginx or Apache proxy. Create as many configuration files as you need and add them to the corresponding directory under .ebextensions and you are done.</p>
Making Videos About Coding is Hard!
Tags: discuss, javascript, node, beginners
Published: 2018-01-26 19:57:25

---
title: Making Videos About Coding is Hard!
published: true
description: I've spent 2 weeks making my first videos about full stack JavaScript, and it was much harder than I thought.
tags: discuss, javascript, node, beginners
---

**update** -- I finally published the course.

> Subscribe to my YouTube channel for [more tutorials on working with VueJS and AdonisJS -- an MVC framework for NodeJS](https://www.youtube.com/channel/UCF5w1QdWroWOoxxXMgp88AQ?sub_confirmation=1)!

---

As I write this I'm waiting for another one of my videos to finishing rendering.

At the end of this 2-week sprint to finish a bunch of videos I was on a roll, so I quickly created another unrehearsed video to capture my immediate ~~thoughts~~ ramblings on recording, learning as a developer, and what I'd like to do with a little pet project of mine.

**TL;DR**

* Sharing experiences in a clear way is hard.
* I went for done not for perfect, and I hope that works out.
* I should not let my computer go to sleep after 5 minutes of inactivity.
* Documenting progress on a personal project is fun, and hopefully proves valuable.
* If you're on the fence about writing more, or creating videos to share your experiences as a developer, get started!

**What has your experience been with making videos or writing blog posts to share what you're learning?**

{% youtube v6AmXUc6Z8k %}
What is the one conference you do not want to miss in 2018?
Tags: discuss, conferences
Published: 2018-01-26 19:09:45

---
title: What is the one conference you do not want to miss in 2018?
published: true
description: What is the one conference you do not want to miss in 2018? 
tags: #discuss #conferences
---

- More than one event is totally fine
- Links to possible CFPs would be useful
- Conferences don't always need to be technical
Swift meetup
Tags: appdev, code, ios, iosdev
Published: 2018-04-11 06:55:11

---
title: Swift meetup
published: true
tags: appdev,code,iOS,iosdev
canonical_url: 
---

After a long time attended a meetup. And this was on the topic which I work on day to day – Swift programming language.

The meetup overall was good. Got to learn couple of new things – _DispatchGroups_, _[Swift Runtime](https://github.com/wickwirew/Runtime)_ and the thing that we can have our own Swift’s virtual environment just like [virtualenv](http://virtualenv.readthedocs.io/en/stable/) in Python, for swift its called [virtualswift](https://github.com/ankit1ank/virtualswift).

The most useful talk for me was on measuring performance in swift by [Mayur Dhaka](https://twitter.com/MayurDhaka) in which I can use immediately is [DispatchGroups](https://developer.apple.com/documentation/dispatch/dispatchgroup).

> **DispatchGroup**  primarily avoids the code shifting to right while using nested blocks like completion handlers.

From what I understood is DispatchGroups are the thing which can be used to group a logical set of background operations into one unit. It has very few APIs. According to [Apple](https://developer.apple.com/documentation/dispatch/dispatchgroup) :

`DispatchGroup().enter()` – to indicate the block has entered the group.

`DispatchGroup().leave()` – to indicate the block in the group has completed.

`DispatchGroup().notify(...)` – to schedule a block or a work item to be submitted to a queue when a group of previously submitted block objects have completed.

`DispatchGroup().wait(...)` – waits synchronously for the previously submitted work to complete.

Basically DispatchGroup is to synchronize and track a set of tasks which are logically grouped and executed according to your requirements.

Hope this gist will help you get to know something new and explore more if interested.

![swift-small](https://itscoderslife.files.wordpress.com/2018/01/swift-small.png?w=656)
What tooling do you use for F# on .NET Core
Tags: discuss
Published: 2018-01-26 17:53:00

---
title: What tooling do you use for F# on .NET Core
published: true
tags: discuss
---

## The Problem

I have tried F# on .NET Core a number of times now. With the Core 1.x release, and now the Core 2.0 release. Both times I have been disappointed to discover that tooling is still basically broken (compared to .NET Framework F# tooling).

For instance using VS 2017 15.5.whatever, the Add Above and Add Below gestures are entirely missing from the Solution Explorer. So I have to hand-edit the project file to put a new file in the order I want it. Then I have to unload and reload the project. This is a significantly annoying regression from the behavior of .NET Framework projects on the same IDE. Definitely feeling the 2nd-class-citizen sentiment from Microsoft there.

> Note for onlookers: Adjusting file order is not me being OCD, it is a very common operation. Because F# uses a single-pass compiler, files are compiled in the order listed in the project file. If you don't keep files in some semblance of dependency order, _the code will not compile_.

I also tried VS Code with Ionide-F#. It is quite an excellent plugin, but I've had a few problems with it as well. For instance, when I tried to use the Move Up/Down gestures in the F# Solution Explorer, it changed the .fsproj file in such a way that it would no longer open (!!!). I also had the experience when I attempted to add a new project to a solution (also thru F# Solution Explorer), it took on the order of 3 minutes for the operation to complete. (A message bar was stuck at the top saying it was working during that time. Although I could see that the .fsproj file had been added, I could not make use of it.)

## The Appeal

So basically my experience so far is that F# tooling for .NET Core is still not-quite-there yet. So I'm wondering how you other F# folks get along on .NET Core. Do you just put up with the irritations or is there some `justWork: true` setting I can tweak or some other workflow I can use? I could put up with some of it for tinkering, but for our production software I really don't want to have to document all the work-arounds. For now I have kept my projects on Framework, waiting for tooling to catch up. But I have some use cases I am eager to hit with .NET Core (docker/linux). Dear reader, please advise me.
Android or React Native?
Tags: android, gettingstarted, reactnative, discuss
Published: 2018-01-26 16:49:22

---
title: Android or React Native?
published: true
description: I'm a proficient iOS / Swift developer and I want to have a go at developing on the Android platform.  How should I do that?
tags: #Android, #gettingstarted, #reactnative, discuss
---
So.  I am a proficient iOS/Swift developer and I am keen to develop an app on the Android platform.

However.  I am also a realist and I know that the time available to me is limited.  

Q : Will my time be better spent learning React-Native - or - Android Java/Kotlin?
Friday Blast #25
Tags: fridayblast, links, post
Published: 2019-01-20 15:22:36

---
title: Friday Blast #25
published: true
tags: friday_blast,links,post
canonical_url: https://horia141.com/friday-blast-25.html
series: "Friday Blast"
---

[Ten year’s worth of learning about pricing (2017)](http://tomtunguz.com/pricing-summary/) - this is not a tech link. But it’s interesting none-the-less I think, for those many engineers which live next to the business side of whatever company they work for.

[Matrices from a geometric perspective (2008)](http://www.coranac.com/documents/geomatrix/) - switching it up to geometry. Understanding linear algebra is much easier when you have the geometric intuition.

[Quick tips for fast code on the JVM (2018)](https://gist.github.com/djspiewak/464c11307cabc80171c90397d4ec34ef) - standard stuff. Define a hot path, and avoid allocations, boxing and megamorphic functions on it. Loads of examples of how things went wrong.

[The art of service discovery (2015) #talk](https://www.youtube.com/watch?v=27ynM2tbNXM) - Once a system grows past a couple of instances, service discovery becomes a thing. There’s a bunch of solutions, depending on how big your problem is (hand-coded, DNS, Consul/etc, hand-crafted). This talk covers Netflix’s custom built solution, with an overview of the architecture and some real-life challenges (mostly around what happens when service discovery is itself unavailable).

[Performance engineering at MasterCard (2015) #talk](https://www.youtube.com/watch?v=Fq97BvwoJbU) - general tips about “performance engineering”. Many larger engineering organizations have specialized cross-functional roles like “testing engineer” or “security engineer”. This talk is best summarized as what a “performance engineer does”.

[Scalable stream processing: a survey of Storm, Samza, Spark and Flink (2016)](https://medium.baqend.com/real-time-stream-processors-a-survey-and-decision-guidance-6d248f692056) - another large piece from the folks at Baqend, this time focusing on various stream processing systems. These are duals/complements/replacements for batch processing systems like Hadoop/MapReduce.
Does repository pattern make sense when using it in Laravel?
Tags: discuss, php, repositorypattern, laravel
Published: 2018-01-26 13:36:41

---
title: Does repository pattern make sense when using it in Laravel?
published: true
description: 
tags: discuss, php, repository pattern, laravel
---

I mean the main purpose of repository pattern is to abstract the database layer like this:

![Respository Pattern](https://bosnadev.com/wp-content/uploads/2015/03/repository_pattern.png)

But I think it is already done by Eloquent. What do you think about it?
Converting A File Uploaded To Base64 using FuctBase64
Tags: javascript, angular, node, fileupload
Published: 2018-01-26 10:56:59

---
title: Converting A File Uploaded To Base64 using FuctBase64
published: true
description: 
tags: javascript, angular, node, file upload
---

# fuctBase64
Converting File Uploads To Base64

# Using the library.

## Installation

install the library using 

```js
npm install fuctbase64
```
or 

```js
npm install fuctbase64 --save
```
to save to your package.json.

## Usage

### In Angular 2+

```ts

// Imports
import { Component } from '@angular/core';

let fileUpload = require('fuctbase64');

// Component Decorator
@Component({
  selector: 'app-file-upload-to-base64',
  template: `<input type="file" name="fileInput" (change)="onFileChange($event)" #fileInput formControlName="fileUpload" />
  <br>
  <div>
    {{fileResult}}  
  </div>`
})

// Component Class
export class FileUploadToBase64Component {
  title = 'app works!';
  fileResult: any;
  constructor(){

  }

  onFileChange(event){
      let result = fileUpload(event);
      this.fileResult = result;
  }
}


```
Check out the [Plunkr](https://plnkr.co/edit/PiAFMiiveFch4tee6CbL?p=preview)

### In Vanilla Javascript

```html

<input id="the-file" name="file" type="file">

```


```js
let fileUpload = require('fuctbase64');

var fileInput = document.getElementById('the-file');

let fileResult = fileUpload(fileInput, true);

console.log(fileResult);

```

#### Multiple File Upload

```html
    <input id="the-file" name="file" type="file" multiple>
```

```js
let fileUpload = require('fuctbase64');

var fileInput = document.getElementById('the-file');

let fileResult = fileUpload(fileInput, true);

console.log(fileResult);

```
What was your most challenging experience in a project you’ve worked on, and why?
Tags: career, interview, beginners, discuss
Published: 2018-01-26 08:40:54

---
title: What was your most challenging experience in a project you’ve worked on, and why?
published: true
description: 
tags: career, interview, beginners, discuss
---

Yesterday I had a conversation with a tech recruiter and I failed to appropriately demonstrate how I can work on/architect web apps too and am more than just a glorified website builder. (Preparation makes perfect, I suppose 🤷🏽‍♂️).

## I failed.

One question in particular that stuck with me was what I’ve posed in the title. I failed to come up with a more interesting experience working on one of my projects in a quick witted manner and choked up something along the lines of “um, authentication. I had to build one from scratch instead of using oAuth or sessions...”

For the record, I’m not a super experienced dev, but I’d like to think I have enough chops to creatively solve problems with code. For example, one “experience” project I developed  was a markdown wikis app with authentication, authorization, building features particular to a premium user and then Stripe subscription payments integrated (do I get _some_ points for third party API integration?). Not to mention database design experiences in both SQL and NoSQL.

At this point in my job search, I honestly can’t tell if that’s beginner level stuff or what you’d call intermediate (these terms are so relative it’s nuts. But there’s gotta be an average boundary to determine what’s beginner and what’s intermediate?)

So my dear reader; If you’re still here I’d like to ask you:

## What was your most challenging experience in a project you’ve worked on, and why?

P.S. hit me up if you know someone looking for a JavaScript or Node/React developer. Thanks! 🤓
Sylvia Plaith
Tags: progressivemadpoetry
Published: 2017-11-24 14:51:07

---
title: Sylvia Plaith
published: true
description: Poetry style
tags: progressive mad poetry
---

To all those that have read my poems, I really try to cancel out the iterations of the style ABAC, rhyming and anything that did not fit too perfectly.  The key is in the lock not fitting, and you will never be able to figure it out.  It just doesn't fit.  It really describes just one thing; it's your code to who knows what.  In the end it only means so much, maybe nothing.  Who am I to judge?

```
They're out of the dark's ragbag, these two
Moles dead in the pebbled rut,
Shapeless as flung gloves, a few feet apart —-
Blue suede a dog or fox has chewed.
One, by himself, seemed pitiable enough,
Little victim unearthed by some large creature
From his orbit under the elm root.
The second carcass makes a duel of the affair:
Blind twins bitten by bad nature.
```

So amazingly insane in the way it projects, death and life biting on the sunken flesh. The sensory direction in this line: "From his orbit under the elm root" produces such feeling of looking up between the tree branches looking down on the elm roots, then the dead animals, the only witness is the tree.

Love to know if you have a favorite poet?

Cheers tc
入門自然言語処理 pp.86-117
Tags: nlp, python, reading
Published: 2018-01-25 23:16:33

---
title: 入門自然言語処理 pp.86-117
published: true
description: 
tags: nlp, python, reading
---

3.2章は、Python の基本的な文字列処理。3.3 は Unicode とエンコーディングの考え方。Python 2 を前提にしているので、 u"..." とか。3.4、3.5 は正規表現と nltk の検索関数。

```
import nltk
from nltk.corpus import gutenberg, nps_chat

moby = nltk.Text(gutenberg.words("melville-moby_dick.txt"))
moby.findall(r"<a> (<.*>) <man>")

chat = nltk.Text(nps_chat.words())
chat.findall(r"<.*> <.*> <bro>")
chat.findall(r"<l.*>{3,}")
```

3.6 は正規化、ステミング。
Intro to the inert attribute
Tags: a11y, javascript
Published: 2018-01-25 21:02:48

---
title: Intro to the inert attribute
published: true
description: A quick introduction to the inert attribute and how you can start using it today.
tags: accessibility, javascript
---

{% youtube aw95rgfpZYY %}


A quick introduction to the inert attribute and how you can use it to trap focus within a modal.

WICG inert polyfill: https://github.com/WICG/inert

Here are a few libraries I have built that make use of the wicg-inert polyfill:

- [butane-sidenav](https://github.com/alexcarpenter/butane-sidenav)
- [butane-dialog](https://github.com/alexcarpenter/butane-dialog)
Comes Now, DebugHelper
Tags: ruby, devtips
Published: 2018-01-25 20:48:24

---
title: Comes Now, DebugHelper
published: true
description: Help with printf-style debugging
tags: ruby, devtips
---

I have no idea how many times I've typed code like this (to do printf-style debugging):

```ruby
my_hash.each_pair do |key, value|
  p [key, value]
end
```

I've finally wised up, and built a helper method to support this:


```ruby
DebugHelper.printf(data)
```

The method allows any data, and specifically supports Hash-like and Array-like structures.

It also allows an optional name (defaults to data class-name) and message.

Typical outputs:


```
Hash (size=3)
  a => 0
  b => 1
  c => 2

Array (size=3)
  0: a
  1: b
  2: c
```

And here's my helper class:


```ruby
# Class to help in 'printf' debugging.
class DebugHelper
  def self.printf(data, name = data.class.to_s, description = '')
    size = data.respond_to?(:size) ? data.size : 1
    puts format('%s (size=%d) %s', name, size, description)
    case
      when data.respond_to?(:each_pair)
        # Hash-like.
        data.each_pair do |k, v|
          puts format('  %s => %s', k, v)
        end
      when data.respond_to?(:each_with_index)
        # Array-like or Set-like.
        data.each_with_index do |v, i|
          puts format('  %6d: %s', i, v)
        end
      else
        puts format('  %s', data.inspect)
    end
    nil
  end
end
```
Reincarnation of popular PHP package for Slack
Tags: php, slack, package, opensource
Published: 2018-01-25 20:43:41

---
title: Reincarnation of popular PHP package for Slack
published: true
tags: php, slack, package, opensource
canonical_url: https://medium.com/@alek13.me/reincarnation-of-popular-php-package-for-slack-cb2e8db98a91
---

Hi, everyone!

Today I want to tell about small but popular open source package and ask some help from you.

# Slack

I think most of you use Slack in your teams for simplifying work on your project. For this, Slack is very great and helpful.

![](https://cdn-images-1.medium.com/max/800/0*fCOb6dHs36rfX6w-.jpeg)

You can create several channels in it for different departments or/and different subteams — for example, for frontend, backend, devops,.. You can connect all kinds of already implemented integrations for every taste: Bitbucket, GitHub, GitLab, Jira, Trello — all that you could only think about, probably already implemented and there is an integration. And if not, there is great API with help of which you can put into effect all your ideas easily. And most likely you’ve already implemented something for Slack at least once.

Also you can connect applications or so-called bots and for example quickly get instant voting or weather summary. And you can write your own. And so on…

Besides you can write a simple small API in your application that will receive commands from Slack and do some actions. In one of my projects I implement many abilities of admin panel via Slack commands. And it turned out very handy.

However we more often use Slack API for monitoring (severs/logs/…) and for notifying about some events in our application.

#PHP package

If you use Slack in your team for monitoring, notifications, commands or other purposes you primarily like me try to find existing package that easy to install and use. And like me find great and popular package maknz/slack.

This package at the moment has about **2 millions** installs, almost **1000 stars** and **150 forks**. This package has **73 depended** packages, including all kinds of integrations with different frameworks (Laravel, Symfony, Yii, …) and automations like PHP-CI. Lets consent that’s fairly well.

read more: https://medium.com/@alek13.me/reincarnation-of-popular-php-package-for-slack-cb2e8db98a91
How To Choose A Data Store For The Next New Shiny Thing
Tags: technical
Published: 2018-06-19 17:28:59

---
title: How To Choose A Data Store For The Next New Shiny Thing
published: true
tags: Technical
canonical_url: https://sendgrid.com/blog/how-to-choose-a-data-store-for-the-next-new-shiny-thing/
---

Choosing a database can be challenging. This article to describe a process that will hopefully guide that decision and, where applicable, explain how the size and maturity of your organization can impact this decision.

The post [How To Choose A Data Store For The Next New Shiny Thing](https://sendgrid.com/blog/how-to-choose-a-data-store-for-the-next-new-shiny-thing/) appeared first on [SendGrid](https://sendgrid.com).