This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from collections import Counter | |
| from datetime import date | |
| from dateutil.parser import parse | |
| import plotext as plt | |
| import requests | |
| API_URL = "https://codechalleng.es/api/articles/" | |
| START_YEAR = 2017 | |
| THIS_YEAR = date.today().year |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| from __future__ import print_function | |
| import os | |
| import tempfile | |
| import time | |
| import flask | |
| import psutil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: ReplicationController | |
| metadata: | |
| name: kube-registry-v0 | |
| namespace: kube-system | |
| labels: | |
| k8s-app: kube-registry | |
| version: v0 | |
| spec: | |
| replicas: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ python xor.py | |
| Training: | |
| Epoch 0 MSE: 1.765 | |
| Epoch 100 MSE: 0.015 | |
| Epoch 200 MSE: 0.005 | |
| * Target MSE reached * | |
| Evaluating: | |
| 1 XOR 0 = 1 ( 0.904) Error: 0.096 | |
| 0 XOR 1 = 1 ( 0.908) Error: 0.092 | |
| 1 XOR 1 = 0 (-0.008) Error: 0.008 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # in case of conflict with local nginx: | |
| # make sure in all *.confs ( | |
| # also in default and example to avoid error like | |
| # 'nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)' | |
| # ) | |
| # set for instance "listen 127.0.0.1:80" instead of "listen *:80" | |
| # docker & network settings | |
| DOCKER_IMAGE_NAME="maxexcloo/nginx-php" # build of nginx-php - for example | |
| DOCKER_CONTAINERS_NAME="nginx_bridged" # our container's name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # I installed phpbrew 1.3.0 since has problems with instlaing extentions using 1.3.1 | |
| # see https://github.com/c9s/phpbrew/issues/214 | |
| curl -O https://raw.github.com/c9s/phpbrew/master/phpbrew | |
| chmod +x phpbrew | |
| sudo cp phpbrew /usr/bin/phpbrew | |
| phpbrew init | |
| source ~/.phpbrew/bashrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (setq show-paren-style 'expression) | |
| (show-paren-mode 2) | |
| (menu-bar-mode -1) | |
| (tool-bar-mode -1) | |
| (setq make-backup-files nil) ; Don't want any backup files | |
| (setq auto-save-list-file-name nil) ; Don't want any .saves files | |
| (setq auto-save-default nil) ; Don't want any auto saving |