In the context of artificial neural networks, the rectifier is an activation function defined as the positive part of its argument:
f
(
x
)
=
x
+
=
max
(
0
,
x
)
,
{\displaystyle f(x)=x^{+}=\max(0,x),}
where x is the input to a neuron. This is also known as a ramp function and is analogous to half-wave rectification in electrical engineering.
This activation function was first introduced to a dynamical...
Powers and Squares code-golf math
It is a widely-cited fact that 69 is the only number that uses up all of the decimal digits of 0 to 9.
69² = 4761
69³ = 328509
A possible input to find this number is 0123456789, because it at least has one occurence of every number in this number range.
The...
Is this a circular step sequence? code-golf decision-problem sequence
Background
We define a circular step sequence of order \$n\$ as follows:
$$
a_1, a_2, \dots, a_n = \text{Permutation of } 1 \dots n \\
b_i = \min ( |a_{i+1} - a_i|, n-|a_{i+1} - a_i| ), 1 \le i < n \\
\text{Circular step seq...
Task
Given a positive integer n, draw the corresponding rocket.
Examples
From n = 1 to 4 the rockets are below. For your program's output, the trailing newline after a rocket is optional.
|
/ \
*---*
| o |
| o |
*---*
/_\
|
/ \
/ \
*-----*
| o o |
| o o |
| o o |
| o o |
*-----*
...
TIO-awareness code-challenge
Context
TIO is the website we usually use here at codegolf.SE to host our answers to the challenges posted. One amazing feature TIO has is that you can get a link to TIO that already has the code you wrote and the input, output, headers, etc.
Task
Write code on TI...
I know it's just only over 24 hours since I posted this to the sandbox (string calculus), but are people really sure there's nothing wrong with my explanation?
Let‘s golf it to the max!
So I wondered why there is no forkbomb on the web for dart... so I created one. I started to golf it to:
Dart, 99 bytes
import'dart:isolate';class f{static k(o){f().r();} r(){for(;;)Isolate.spawn(k,0);}}main(){f().r();}
Try it online!
Any suggestions or golfing ev...
@Anush Just pretty much every new challenge. If I didn't answer a question, it was either because 1) it's asking for solutions to be posted in a specific langauge or 2) I basically had an overly dense schedule to pick out time to answer it.
I guess not really, because this action doesn't really get detected by the sockpuppeting filter. (After all, gnat cast so many votes and is still okay. :) )
gs2, 15 bytes
I outgolfed Dennis!
CP437:
spooky•me♣╨V↕0B
Hex dump:
73 70 6f 6f 6b 79 07 6d 65 05 d0 56 12 30 42
At the start of the program, STDIN is pushed (e.g. the string "3") and stored in variable A. The first ten bytes of the program push two strings, "spooky" and "me", to the stack...
In this case gs2 (which is a different language) is shorter than GolfScript. "I outgolfed Dennis!" -- Lynn
@Anush I have no problem with having no answers (It's a hard challenge, I get it, it took me a while to even get a working solution), but the low view count is a little sad.
Based on this Numberphile video
A self-locating string is a number (or set of numbers) in a decimal expansion which corresponds to its location, from the start of the decimal.
For example, take the number:
0.2734126393112
Here, we can identify certain items quickly, e.g:
0.27 _3_ _4_ 1263 _...