Setting up SSL with nginx on Ubuntu server

For a long time I've procrastinated to learn how to properly configure HTTPS. Turns out it is super easy. This is my simple step by step guide.

Generate certificates

First, make sure that your nginx config can serve files from /var/www/html - it should work by default.

Then install certbot - it is a script that will place some files into your /var/www/html, and then use them to verify that you have the ssh access to the server, which proves that you are the domain owner.

sudo add-apt-repository ppa:certbot/certbotsudo apt-get updatesudo apt-get install certbot 

Deploying Mastodon on Digital Ocean

Mastodon is the new social media platform, a decentralized alternative to Twitter that is currently blowing up. This is a step by step guide on how to run your own Mastodon instance on Digital Ocean.

Set up a Droplet

Create a new docker droplet:

This droplet has almost everything we will need preinstalled.

You will receive an email from DO with the credentials you can use to log in to start setting up the server.

Connect to the server as a root user, using ip and password from the email:

ssh root@[ip-from-email]

You will be prompted to change the default password,

Value Arbitrage

This is an extremely useful idea that I've learned just recently. In fincance, "arbitrage" means buying and selling things in different markets to take the advantage of difference in price. Like buying a toy in India for $15, and then selling it for $25 in the US.

Turns out, you can arbitrage not just products, but also information, knowledge, skill, or even human relationships.

For example, let's say you have met two amazing people who don't know each other. When you introduce them to each other, you generate a massive amount of value for both of them essentially out of

Expected Utility

Imagine I offer you a gamble. I will spin the wheel that looks like this:

And you win the amount of money that it will choose. If it hits a negative number you owe me that much. Should you play or not?

This is the kind of problem you are solving every time you are trying to decide whether or not to take any risky action.

It comes down to figuring out whether the action has a positive or negative value to you, so called Expected Utility, whether it’s benefits outweigh the potential risks.

To find out the answer, you need to know

How AI/AGI/Consciousness works

Just my vague crackpot theory =) Maybe it’s obvious to experts, probably has flaws. But it seems to make sense to me, perhaps will give you some ideas. I would love to hear your thoughts/feedback!

Consume input

The data you need from the world(like video), and useful metrics we want to optimize for, like number of paperclips in the world.

Make predictions and take action

Like deep learning does.

How do human brains convert their structure into action?

Maybe like:

  • Take the current picture of the world as an input.

  • Come up with random action.

  • “Imagine” what will happen.Take the current

What is Recursion?

What is Recursion?

Recursion simply means “self reference”. When something refers to itself or describes itself, it is called recursive.

For example> “This sentence is recursive.”

is recursive.

This picture is also recursive:

In programming, recursive function is a function that calls itself

Let’s say you and your friends have ordered pizza, and now you want to cut it into equal slices. To do that you cut it in half, then you cut the resulting slices in half, and keep going until there’s enough slices for everyone.

In code, it would look like this:

def slice_pizza(number_of_friends, number_of_slices):    # Cut pizza in half    number_of_slices = number_of_slices*2    # Is

Multiclass Classification of Flower Species

The purpose of this project is to learn the basics of training an ANN on a simple example. I will use Keras, TensorFlow, and scikit-learn to train ANN that will classify flower species based on a few basic parameters.

Iris Dataset

I will use a simple dataset that describes different species of flowers and their properties. There are 3 species of iris flowers(Iris setosa, Iris virginica and Iris versicolor), and the dataset contains examples describing 4 properties of each flower (the length and the width of it's sepals and petals), and the species it

Artificial Neural Network writes Harry Potter and the Methods of Rationality

I have trained an Artificial Neural Network on the full text of HPMOR. This is the text it generated. (I have added formatting and removed the most incoherent sentences.)

You can find the source code and an awesome, easy to follow tutorial here.

Somewhere inside him all further. “You have to do science with Professor McGonagall? Say with Fiendfyre?” “Ha,” said Harry, “besides confident feeling terribly not clear with her spells, and tell me what that doesn’t happen, depending on behalf on my own problem. “That sounds like a couple of

Getting started with Web Development

Recently I've received a question:

> Where did you learn web development? What is the best way to get started in web development?

Here's my response:

I've learned everything from books, video courses and by creating my own projects, and I think that it is the absolutely best way to go about it. All the information that you need is available for free on the internet, so you can learn everything just by using free(or very cheap) resources and practicing.

If you are starting from the absolute zero - I would suggest to just create a wordpress website and

Artificial Intelligence resources

This is the list of the best resources to learn the foundations of Artificial Intelligence and Deep Learning. It will be the most useful for beginners, people who want to get into this field, but don't know where to start.

Machine Learning