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
| const fib = (n) => { | |
| // Returns the n-th element of the fibonacci sequence | |
| if (n == 1) { | |
| return 1; | |
| } else if (n == 2) { | |
| return 1; | |
| } else if (n > 2) { | |
| return (fib(n - 1) + fib(n - 2)) | |
| } | |
| } |
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
| webpackJsonp([0],[function(e,t){e.exports=function(e,t,n,r,o){var i,s=e=e||{},a=typeof e.default;"object"!==a&&"function"!==a||(i=e,s=e.default);var l="function"==typeof s?s.options:s;t&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns),r&&(l._scopeId=r);var u;if(o?(u=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},l._ssrRegister=u):n&&(u=n),u){var d=l.functional,p=d?l.render:l.beforeCreate;d?l.render=function(e,t){return u.call(t),p(e,t)}:l.beforeCreate=p?[].concat(p,u):[u]}return{esModule:i,exports:s,options:l}}},function(e,t){function n(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var i=r(o);return[n].concat(o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"})).concat([i]).join("\n")}return[n].join("\n")}function r(e){return"/*# sourceMappingU |
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
| { | |
| "aliases": [{ | |
| "alias": "fohlen", | |
| "node": "8af7eff0-cc64-11e7-bb20-85407e92063e.inexortestnetwork.tk." | |
| }] | |
| } |
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
| def n_dimensional_euclidean_distance(a, b): | |
| """ | |
| Returns the euclidean distance for n>=2 dimensions | |
| :param a: tuple with integers | |
| :param b: tuple with integers | |
| :return: the euclidean distance as an integer | |
| """ | |
| dimension = len(a) # notice, this will definitely throw a IndexError if len(a) != len(b) | |
| return sqrt(reduce(lambda i,j: i + ((a[j] - b[j]) ** 2), range(dimension), 0)) |
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
| $TTL 86400 | |
| @ IN SOA ns1.first-ns.de. postmaster.robot.first-ns.de. ( | |
| 2018082301 ; serial | |
| 14400 ; refresh | |
| 1800 ; retry | |
| 604800 ; expire | |
| 86400 ) ; minimum | |
| @ IN NS ns1.first-ns.de. | |
| @ IN NS robotns2.second-ns.de. |
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
| # Put in /etc/ufw/after.rules | |
| # Put Docker behind UFW | |
| *filter | |
| :DOCKER-USER - [0:0] | |
| :ufw-user-input - [0:0] | |
| -A DOCKER-USER -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT | |
| -A DOCKER-USER -m conntrack --ctstate INVALID -j DROP | |
| -A DOCKER-USER -i eth0 -j ufw-user-input |
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
| #include <algorithm> | |
| #include <list> | |
| #include <string> | |
| #include <iostream> | |
| using namespace std; | |
| template <typename T> | |
| void print_list(list<T> l) { | |
| for (auto e: l) | |
| { |
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
| # Setting up Matplotlib with python2.7 can be superb pain to set up but a lot of tutorials still use this especially for scikit | |
| # We assume here that you have installed python2.7 via brew (brew install python2.7) | |
| # This means python2.7 is your brew python while python will be your system python | |
| # Configure backend | |
| echo "backend: WXAgg" >> ~/.matplotlib/matplotlibrc | |
| # Go inside your virtualenv with your project and everything | |
| pip install -U wxPython | |
| # After that you will need to exit your VENV |
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
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "os/signal" | |
| "syscall" | |
| "time" | |
| "nanomsg.org/go/mangos/v2" |
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
| namespace Inexorgame.Logging; | |
| include "Inexorgame.Plugin" | |
| /// Describes which level of severity you are logging. | |
| enum LogLevel : byte { | |
| /// Disable all logging. You're on your own now. | |
| Off = 127, | |
| /// This is really fine-grained information—finer even than DEBUG. | |
| Trace, |