text:
Log Scales are for Quitters
Everyone knows log scales are for quitters. Therefore, you must write a program or function that de-quitifies a bar graph with a log scale given a base.
The bar graph input is taken as a single string which is a list of bars, where each bar of the log scale bar graph is separated by the printable (or whitespace) delimiter of your choosing (so 0x09-0x0A + 0x20-0x7E) and composed of a printable non-whitespace (so 0x21-0x7E) filler character of your choosing.
The program or function outputs a single string which is a list of bars, where each bar is separated by the same delimiter the input was separated by and is composed of the same filler character the input was composed of.
Example
We choose a delimiter of "\n" (one newline) and a filler character of "#".
The input passed to our program or function is:
base=2
and
string=
####
##
######
###

The code would find that the lengths of the bars are [4,2,6,3]. It would compute the anti-log of each length with base 2 to get [2^4,2^2,2^6,2^3] = [16,4,64,8]. Then, the lengths are output in linear scale bar format:
################
####
################################################################
########

Input / Output
Your program or function may input and output in any reasonable format.
The input base is guaranteed to be an integer greater than 1. You may assume the base is less than 256.
The string input is guaranteed to fully match the regex (f+s)+f+, where f and s are replaced with your filler and delimiter respectively.
The string output must fully match the regex (f+s)+f+, where f and s are replaced with the same filler and delimiter respectively. The output may optionally have a trailing newline.
The output and input may also be a list of strings instead of delimited by a substring, though it must be possible to understand which bar is which.
Testcases
(assume filler is # and delimiter is \n)
base
-
input string
-
output string
-----
2
-
####
##
######
###
-
################
####
################################################################
########
-----
3
-
##
#
###
#
-
#########
###
###########################
###
-----
100
-
#   I am not the delimiter
###  nor the filler
-
Anything (You do not have to handle input which does not match the regex)
-----
1
-
###
#######
###################################################
-
Anything (You do not have to handle bases less than or equal to 1).
-----
5
-
####
##
###
#
-
#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
#########################
#############################################################################################################################
#####
-----
2
-
#
#
##
##
#
##
#
#
#
#
##
##
#
#
##
#
-
##
##
####
####
##
####
##
##
##
##
####
####
##
##
####
##

x86 32-bit machine code function, 21 bytes
x86-64 machine code function, 22 bytes
The 1B saving in 32-bit mode requires using separator = filler-1, e.g. fill=0 and sep=/.  The 22-byte version can use an arbitrary choice of separator and filler.

This is the 21-byte version, with input-separator = \n (0xa), output-filler = 0, output-separator = / = filler-1.  These constants can be easily changed.
; see the source for more comments
; RDI points to the output buffer,  RSI points to the src string
; EDX holds the base
; This is the 32-bit version.
; The 64-bit version is the same, but the DEC is one byte longer (or we can just mov al,output_separator)
08048080 <str_exp>:
 8048080:       6a 01           push   0x1
 8048082:       59              pop    ecx           ; ecx = 1 = base**0
 8048083:       ac                      lods   al,BYTE PTR ds:[esi]  ; skip the first char so we don't do too many multiplies

; read an input row and accumulate base**n as we go.
08048084 <str_exp.read_bar>:
 8048084:       0f af ca        imul   ecx,edx       ; accumulate the exponential
 8048087:       ac              lods   al,BYTE PTR ds:[esi]
 8048088:       3c 0a           cmp    al,0xa        ; input_separator = newline
 804808a:       77 f8           ja     8048084 <str_exp.read_bar>
 ; AL = separator or terminator
 ; flags = below (CF=1) or equal (ZF=1).  Equal also implies CF=0 in this case.

 ; store the output row
 804808c:       b0 30           mov    al,0x30       ; output_filler
 804808e:       f3 aa           rep stos BYTE PTR es:[edi],al  ; ecx bytes of filler
 8048090:       48              dec    eax           ; mov al,output_separator
 8048091:       aa              stos   BYTE PTR es:[edi],al  ;append delim

 ; CF still set from the inner loop, even after DEC clobbers the other flags
 8048092:       73 ec           jnc    8048080 <str_exp>  ; new row if this is a separator, not terminator

 8048094:       c3              ret

08048095  <end_of_function>
; 0x95 - 0x80 = 0x15 = 21 bytes

The 64-bit version is 1 byte longer, using a 2-byte DEC or a mov al, output_separator.  Other than that, the machine-code is the same for both versions, but some register names change (e.g. rcx instead of ecx in the pop).
Sample output from running the test program (base 3):
$ ./string-exponential $'.\n..\n...\n....' $(seq 3);echo
000/000000000/000000000000000000000000000/000000000000000000000000000000000000000000000000000000000000000000000000000000000/

Algorithm:
Loop over the input, doing exp *= base for every filler char.  On delimiters and the terminating zero byte, append exp bytes of filler and then a separator to the output string and reset to exp=1.  It's very convenient that the input is guaranteed not to end with both a newline and a terminator.
On input, any byte value above the separator (unsigned compare) is treated as filler, and any byte value below the separator is treated as an end-of-string marker.  (Checking explicitly for a zero-byte would take an extra test al,al vs. branching on flags set by the inner loop).

The rules only allow a trailing separator when it's a trailing newline.  My implementation always appends the separator.  To get the 1B saving in 32-bit mode, that rule requires separator = 0xa ('\n' ASCII LF = linefeed), filler = 0xb ('\v' ASCII VT = vertical tab).  That's not very human-friendly, but satisfies the letter of the law.  (You can hexdump or
tr $'\v' x the output to verify that it works, or change the constant so the output separator and filler are printable.  I also noticed that the rules seem to require that it can accept input with the same fill/sep it uses for output, but I don't see anything to gain from breaking that rule.).

NASM/YASM source.  Build as 32 or 64-bit code, using the %if stuff included with the test program or just change rcx to ecx.
input_separator equ 0xa  ; `\n` in NASM syntax, but YASM doesn't do C-style escapes

output_filler equ '0'                 ; For strict rules-compliance, needs to be input_separator+1
output_separator equ output_filler-1  ; saves 1B in 32-bit vs. an arbitrary choice
    ;; Using output_filler+1 is also possible, but isn't compatible with using the same filler and separator for input and output.

global str_exp
str_exp:                        ; void str_exp(char *out /*rdi*/, const char *src /*rsi*/,
                                ;              unsigned base /*edx*/);
.new_row:
    push   1
    pop    rcx                  ; ecx=1 = base**0

    lodsb                       ; Skip the first char, since we multiply for the separator
.read_bar:
    imul   ecx, edx             ; accumulate the exponential
    lodsb
    cmp    al, input_separator
    ja .read_bar                ; anything > separator is treated as filler
    ; AL = separator or terminator
    ; flags = below (CF=1) or equal (ZF=1).  Equal also implies CF=0, since x-x doesn't produce carry.

    mov    al, output_filler
    rep stosb                   ; append ecx bytes of filler to the output string
%if output_separator == output_filler-1
    dec   eax         ; saves 1B in the 32-bit version.  Use dec even in 64-bit for easier testing
%else
    mov    al, output_separator
%endif
    stosb                       ; append the delimiter

    ; CF is still set from the .read_bar loop, even if DEC clobbered the other flags
    ; JNC/JNB here is equivalent to JE on the original flags, because we can only be here if the char was below-or-equal the separator
    jnc .new_row            ; separator means more rows, else it's a terminator
    ; (f+s)+f+ full-match guarantees that the input doesn't end with separator + terminator
    ret

The function follows the x86-64 SystemV ABI, with signature
void str_exp(char *out /*rdi*/, const char *src /*rsi*/, unsigned base /*edx*/);
It only informs the caller of the length of the output string by leaving a one-past-the-end pointer to it in rdi, so you could consider this the return value in a non-standard calling convention.
It would cost 1 or 2 bytes (xchg eax,edi) to return the end-pointer in eax or rax.  (If using the x32 ABI, pointers are guaranteed to be only 32 bits, otherwise we have to use xchg rax,rdi in case the caller passes a pointer to a buffer outside the low 32 bits.)  I didn't include this in the version I'm posting because there are workarounds the caller can use without getting the value from rdi, so you could call this from C with no wrapper.
We don't even null-terminate the output string or anything, so it's only newline-terminated.  It would take 2 bytes to fix that: xchg eax,ecx / stosb  (rcx is zero from rep stosb.)
The ways to find out the output-string length are:

rdi points to one-past-the-end of the string on return (so the caller can do len=end-start)
the caller can just know how many rows were in the input and count newlines
the caller can use a large zeroed buffer and strlen() afterwards.

They're not pretty or efficient (except for using the RDI return value from an asm caller), but if you want that then don't call golfed asm functions from C. :P

Size/range limitations
The max output string size is only limited by virtual memory address-space limitations.  (Mainly that current x86-64 hardware only supports 48 significant bits in virtual addresses, split in half because they sign-extend instead of zero-extend.  See the diagram in the linked answer.)
Each row can only have a maximum of 2**32 - 1 filler bytes, since I accumulate the exponential in a 32-bit register.
The function works correctly for bases from 0 to 2**32 - 1.  (Correct for base 0 is 0^x = 0, i.e. just blank lines with no filler bytes.  Correct for base 1 is 1^x = 1, so always 1 filler per line.)
It's also blazingly fast on Intel IvyBridge and later, especially for large rows being written to aligned memory.  rep stosb is an optimal implementation of memset() for large counts with aligned pointers on CPUs with the ERMSB feature.  e.g. 180**4 is 0.97GB, and takes 0.27 seconds on my i7-6700k Skylake (with ~256k soft page-faults) to write to /dev/null.  (On Linux the device-driver for /dev/null doesn't copy the data anywhere, it just returns.  So all of the time is in the rep stosb and the soft page-faults that triggers when touching the memory for the first time.  It's unfortunately not using transparent hugepages for the array in the BSS.  Probably an madvise() system call would speed it up.)
Test program:
Build a static binary and run as ./string-exponential $'#\n##\n###' $(seq 2) for base 2.  To avoid implementing an atoi, it uses base = argc-2.  (Command-line length limits prevent testing ridiculously large bases.)
This wrapper works for output strings up to 1 GB.  (It only makes a single write() system call even for gigantic strings, but Linux supports this even for writing to pipes).  For counting characters, either pipe into wc -c or use strace ./foo ... > /dev/null to see the arg to the write syscall.
This takes advantage of the RDI return-value to calculate the string length as an arg for write().
;;; Test program that calls it
;;; Assembles correctly for either x86-64 or i386, using the following %if stuff.
;;; This block of macro-stuff also lets us build the function itself as 32 or 64-bit with no source changes.

%ifidn __OUTPUT_FORMAT__, elf64
%define CPUMODE 64
%define STACKWIDTH 8    ; push / pop 8 bytes
%define PTRWIDTH 8
%elifidn __OUTPUT_FORMAT__, elfx32
%define CPUMODE 64
%define STACKWIDTH 8    ; push / pop 8 bytes
%define PTRWIDTH 4
%else
%define CPUMODE 32
%define STACKWIDTH 4    ; push / pop 4 bytes
%define PTRWIDTH 4
%define rcx ecx      ; Use the 32-bit names everywhere, even in addressing modes and push/pop, for 32-bit code
%define rsi esi
%define rdi edi
%define rsp esp
%endif

global _start
_start:
    mov  rsi, [rsp+PTRWIDTH + PTRWIDTH*1]  ; rsi = argv[1]
    mov  edx, [rsp]          ; base = argc
    sub  edx, 2              ; base = argc-2  (so it's possible to test base=0 and base=1, and so ./foo $'xxx\nxx\nx' $(seq 2) has the actual base in the arg to seq)
    mov  edi, outbuf         ; output buffer.  static data is in the low 2G of address space, so 32-bit mov is fine.  This part isn't golfed, though

    call str_exp             ; str_exp(outbuf, argv[1], argc-2)
    ;  leaves RDI pointing to one-past-the-end of the string
    mov  esi, outbuf

    mov  edx, edi
    sub  edx, esi               ; length = end - start

%if CPUMODE == 64 ; use the x86-64 ABI
    mov  edi, 1                 ; fd=1 (stdout)
    mov  eax, 1                 ; SYS_write  (Linux x86-64 ABI, from /usr/include/asm/unistd_64.h)
    syscall                     ; write(1, outbuf, length);

    xor edi,edi
    mov eax,231   ; exit_group(0)
    syscall

%else  ; Use the i386 32-bit ABI (with legacy int 0x80 instead of sysenter for convenience)
    mov ebx, 1
    mov eax, 4                  ; SYS_write (Linux i386 ABI, from /usr/include/asm/unistd_32.h)
    mov ecx, esi  ; outbuf
    ; 3rd arg goes in edx for both ABIs, conveniently enough
    int 0x80                    ; write(1, outbuf, length)

    xor ebx,ebx
    mov eax, 1
    int 0x80     ; 32-bit ABI _exit(0)
%endif

section .bss
align 2*1024*1024 ; hugepage alignment (32-bit uses 4M hugepages, but whatever)
outbuf:    resb 1024*1024*1024 * 1
; 2GB of code+data is the limit for the default 64-bit code model.
; But with -m32, a 2GB bss doesn't get mapped, so we segfault.  1GB is plenty anyway.

This was a fun challenge that lent itself very well to asm, especially x86 string ops.  The rules are nicely designed to avoid having to handle a newline and then a terminator at the end of the input string.
An exponential with repeated multiplication is just like multiplying with repeated addition, and I needed to loop to count chars in each input row anyway.
I considered using one-operand mul or imul instead of the longer imul r,r, but its implicit use of EAX would conflict with LODSB.

I also tried SCASB instead of load and compare, but I needed xchg esi,edi before and after the inner loop, because SCASB and STOSB both use EDI.  (So the 64-bit version has to use the x32 ABI to avoid truncating 64-bit pointers).
Avoiding STOSB is not an option; nothing else is anywhere near as short.  And half the benefit of using SCASB is that AL=filler after leaving the inner loop, so we don't need any setup for REP STOSB.
SCASB compares in the other direction from what I had been doing, so I needed to reverse the comparisons.
My best attempt with xchg and scasb.  Works, but isn't shorter.  (32-bit code, using the inc/dec trick to change filler into separator).
; SCASB version, 24 bytes.  Also experimenting with a different loop structure for the inner loop, but all these ideas are break-even at best
; Using separator = filler+1 instead of filler-1 was necessary to distinguish separator from terminator from just CF.

input_filler equ '.'    ; bytes below this -> terminator.  Bytes above this -> separator
output_filler equ input_filler       ; implicit
output_separator equ input_filler+1  ; ('/') implicit

 8048080:       89 d1                   mov    ecx,edx    ; ecx=base**1
 8048082:       b0 2e                   mov    al,0x2e    ; input_filler= .
 8048084:       87 fe                   xchg   esi,edi
 8048086:       ae                      scas   al,BYTE PTR es:[edi]

08048087 <str_exp.read_bar>:
 8048087:       ae                      scas   al,BYTE PTR es:[edi]
 8048088:       75 05                   jne    804808f <str_exp.bar_end>
 804808a:       0f af ca                imul   ecx,edx           ; exit the loop before multiplying for non-filler
 804808d:       eb f8                   jmp    8048087 <str_exp.read_bar>   ; The other loop structure (ending with the conditional) would work with SCASB, too.  Just showing this for variety.
0804808f <str_exp.bar_end>:

; flags = below if CF=1 (filler<separator),  above if CF=0 (filler<terminator)
; (CF=0 is the AE condition, but we can't be here on equal)
; So CF is enough info to distinguish separator from terminator if we clobber ZF with INC

; AL = input_filler = output_filler
 804808f:       87 fe                   xchg   esi,edi
 8048091:       f3 aa                   rep stos BYTE PTR es:[edi],al
 8048093:       40                      inc    eax         ; output_separator
 8048094:       aa                      stos   BYTE PTR es:[edi],al
 8048095:       72 e9                   jc     8048080 <str_exp>   ; CF is still set from the inner loop
 8048097:       c3                      ret

For an input of ../.../., produces ..../......../../.  I'm not going to bother showing a hexdump of the version with separator=newline.

Mathematica 41 38 Bytes
-3 Bytes thanks to LLlAMnYP
This takes input as a list of strings followed by an integer. Output is also a list of strings.
""<>"#"~Table~#&/@(#2^StringLength@#)&

Explanation:
                   StringLength@# & - find length of each string in first input
                   #2^               & - raise to power of second input
                /@(                 )  - Uses each of these numbers on an inner function of ...
    "#"~Table~#&                       - Create arrys of specific length using character "#"
 ""<>                                  - Join arrays of characters together to make strings

Old version, 41 Bytes
"#"~StringRepeat~#&/@(#2^StringLength@#)&

"" <> "#"~Table~# is 3 bytes shorter than "#"~StringRepeat~#, probably golfable further as well.

Haskell, 32 bytes
f b=map$foldr(\_->([1..b]>>))"#"

Try it online! Example usage: f 3 ["##","#","###","#"] returns ["#########","###","###########################","###"].
Use mapM putStrLn $ f 3 ["##","#","###","#"] to get a more visually pleasing output:
#########
###
###########################
###

Just commenting here because I can't comment on the post you deleted... try sum[sum[]^sum[],sum[]^sum[]].

Japt, 7 bytes
Takes the graph as an array of strings with " as the filler, and the base as an integer.
£QpVpXl

Try it online
Add }R to the end in order to take the graph as a newline separated string instead. (Try it)

Explanation
    :Implicit input of array U.
£   :Map over the array, replacing each element with ...
Q   :the " character ...
p   :repeated ...
V   :integer input ...
p   :to the power of ...
Xl  :the length of the current element times.
    :Implicit output of result.

MATL, 14 11 bytes
Y'iw^1HL(Y"

Delimiter is space. Filler is any character other than space.
Try it online!
Explanation
       % Implicit input: string
       %   STACK: '## # ### #'
Y'     % Run-length encoding
       %   STACK: '# # # #', [2 1 1 1 3 1 1]
i      % Input: number
       %   STACK: '# # # #', [2 1 1 1 3 1 1], 3
w      % Swap
       %   STACK: '# # # #', 3, [2 1 1 1 3 1 1]
^      % Power, element-wise
       %   STACK: '# # # #', [9 3 3 3 9 3 3]
1      % Push 1
       %   STACK: '# # # #', [9 3 3 3 27 3 3], 1
HL     % Push [2 2 1j]. When used as an index, this means 2:2:end
       %   STACK: '# # # #', [9 3 3 3 27 3 3], 1, [2 2 1j]
(      % Write specified value at specified entries
       %   STACK: '# # # #', [9 1 3 1 27 1 3]
Y"     % Run-length decoding
       %  STACK: '######### ### ########################### ###'
       % Implicit display

This doesn't seem to work; the length of each line in the output for the test case you included in your TIO should be 9,3,27,9 but instead it's 6,3,9,3.

@Shaggy You are totally right. Thanks for noticing. I made a mistake in my latest edit. I have rolled back to the previous version, ehich is correct

Couldn't figure out how it was working from the explanation - then I clicked through to the TIO! :D

@Shaggy I just added an explanation for this version, hopefully clearer!

Haskell, 37 33 bytes
4 bytes shaved off thanks to sudee
\b->map(\x->'#'<$[1..b^length x])

Description:
\b->                               -- take an integer b as the first input input
    map(\x->                    )  -- apply the following to every element x in the second input
            '#'<$[1..b^length x]   ---- replicate '#' (b^(length x)) times

Disappointingly, this is 2 bytes much shorter than the way-harder-to-read pointfree version:
map.(flip replicate '#'.).(.length).(^)

The input should be a single string

@bartavelle, not necessarily.

That's what I understand by The bar graph input is taken as a single string ...

@bartavelle: The output and input may also be a list of strings instead of delimited by a substring, though it must be possible to understand which bar is which.

You can replace replicate(b^length x)'#' with '#'<$[1..b^length x].

ReRegex, 105 bytes
#import math
(\d+)\n((;.*\n)*)(_+)/$1\n$2;$1^d<$4>/^\d+\n((;\d+\n?)+)$/$1/^((_*\n)*);(\d+)/$1u<$3>/#input

Try it online!
ReRegex is like Retina's ugly cousin that gives all the effort to Regular Expressions, instead of having it's own fancy operators.
Of course, it also has #import and #input to save both hardcoding input, and re-writing the same expressions over and over again.
Explained.
Takes input in the form of:
2
____
__
______
___

on STDIN, and gives output like
________________
____
________________________________________________________________
________

Firstly, the program imports the Math Library, which of course is entirely written in ReRegex.
The bulk of this is then three regular expressions.
(\d+)\n((;.*\n)*)(_+)   ->  $1\n$2;$1^d<$4>
^\d+\n((;\d+\n?)+)$     ->  $1
^((_*\n)*);(\d+)        ->  $1u<$3>

The first matches our input base, and seeks a line of unary after it. it then, replaces that line with ;$1^d<$4>, which is the base, to the power of the (In Decimal) Unary. The Math library handles the base conversion and the exponent. A ; is placed at the start to identify it later as finished.
The second, matches the base, then many lines of ;, before ending. If this matches the entire thing, it snips off the base. leaving uf with just the answers and ;s.
The last, matches just unary at the start, optionally, then a ; answer. It then transforms that answer into unary again, without the ;.
Because the output isn't matched by the first regex, it doesn't loop infinitely, and so our solution is outputted.

Python 2, 52 36 bytes
Input and output are taken as arrays of strings. # is the filler.
lambda s,n:['#'*n**len(l)for l in s]

Try it online!

Röda, 19 bytes
f n,s{s|["#"*n^#_]}

Try it online!
Takes an array as input and returns a stream of values as output.
Explanation
f n,s{s|["#"*n^#_]}              n is the number and s is the array of strings consisting of #s
      s|                         Push the each value of s to the stream
        [        ]               For each push
         "#"*                     "#" repeated
             n^#_                 n raised to the length of the string

05AB1E, 9 bytes
Bars are seperated by spaces, output character is same as input character.
¬Š#€gm×ðý

Try it online!
¬Š#€gm×ðý   Arguments: n, s
¬           Head, get bar character
 Š          Rearrange stack to get: s, n, bar-character
  #         Split s on spaces
   €g       Map to length
     m      n to that power
      ×     That many bar-characters
       ðý   Join on space
            Implicit output

Risky, 6 bytes
_?_!?_?[*+?

Try it online!
Inputs and outputs an array like ["@@", "@@@@"]. Unfortunately, the output is implicitly concatenated. 6 more bytes to have it joined by newlines:
Risky, 12 bytes
_*+_0+_0+_0*_?_!?_?[*+?

Try it online!

APL (Dyalog Unicode), 7 bytes
Anonymous tacit infix function taking base as left argument and list of strings as right argument
*∘≢¨⍴¨⊢

Try it online!
*∘≢¨ base to the power of the length of each string
⍴¨ cyclically reshapes each
⊢ string

Julia, 22 bytes
x$b="#".^b.^length.(x)

Try it online!
input and output are lists of strings

JavaScript (ES8), 39 bytes
Takes the base as an integer and the graph as an array of strings with any character as the filler, using currying syntax.
b=>a=>a.map(x=>x.padEnd(b**x.length,x))

Try it

f=
b=>a=>a.map(x=>x.padEnd(b**x.length,x))
oninput=_=>o.innerText=f(i.value)(j.value.split`\n`).join`\n`
o.innerText=f(i.value=2)((j.value=`####\n##\n######\n###`).split`\n`).join`\n`
*{box-sizing:border-box}#i,#j{margin:0 0 5px;width:200px}#j{display:block;height:100px
<input id=i type=number><textarea id=j></textarea><pre id=o>

Alternative, 49 bytes
This version takes the graph as a newline separated string, again with any character as filler.
b=>s=>s.replace(/.+/g,m=>m.padEnd(b**m.length,m))

Don't think you need the m flag on the regex, by default . doesn't match newlines.

Hmm, don't know where that came from - the perils of trying to golf from a phone. Thanks for pointing it out, @ETHproductions.

PHP, 69 Bytes
<?foreach($_GET[1]as$l)echo str_pad("",$_GET[0]**strlen($l),"#")."
";

Try it online!

This returns with a leading newline, which is not allowed by the regex.  You can use [str_pad]."\n" instead of "\n".[str_pad] to fix this (+1 byte). Also, you may assume what the filler is, so you could save two bytes in $l[0] by changing it to "#".

@fireflame241 Done Thank You

Jelly, 7 bytes
ṁL*@¥¥€

A monadic link taking and returning lists of the bars (themselves lists of characters, AKA strings) the filler character is flexible.
Try it online! (the footer prettifies the resulting list by joining its elements with newlines.)
How?
ṁL*@¥¥€ - Main link: list of list of characters, bars; number, base
     ¥€ - last two links as a dyad for €ach bar in bars:
    ¥   -   last two links as a dyad:
 L      -     length (of a bar)
  *@    -     exponentiate (swap @rguments) (base ^ length)
ṁ       -   mould like (e.g. moulding "##" like 8 yields "########")

Alternative 7-byter: ṁ"L€*@¥ - get length of each bar (L€), raise base to that power (*@), then zip (") the list and that applying the mould dyad (ṁ) between the two.

4 quicks and 3 actual links? This challenge is quite heavy on controlling the flow of data...

Yeah, there might be a shorter solution available...

@JonathanAllan I'm afraid there isn't.

@ETHproductions It's actually one link as a whole. The explanation could've pretty much been just one line.

Ruby, 29 bytes
->x,y{x.map{|z|?#*y**z.size}}

Try it online!
Yeah, I found out last week that ?# produces a single-character string. I've no idea why this feature exists but I'm sure glad it does.

The ?X operator, where X is some character, is the "get the default representation of this character" operator. In Ruby < 1.9, it would return the Unicode code point of the character, because that's how characters were defined, but now it returns a string containing the character. It's part of a general shift towards more consistent Unicode handling in Ruby.

@Turtleman, is there any hysterical raisin for why ?X is used? A lot of Ruby's quirkier conventions, like the plethora of $-variables, exist because of familiarity with Perl.

Vyxal r, 6 bytes
ƛL⁰e×*

Try it Online!
Inputs and outputs a list of strings; uses * as the filler character 'cuz that's easy in Vyxal.
ƛL⁰e×*
ƛ        # For each bar in the string
   e     # Raise...
  ⁰      # the base...
 L       # to the power of the bar's length
    ×*   # Push that many *s

I'm not familiar with Vyxal, but does the r flag count as an extra byte?

No (https://codegolf.meta.stackexchange.com/a/14339/80050)

Jelly, 6 bytes
ẈƓ*ṁ@"

Try it online!
Takes a list of lines on the left and the base on STDIN
How it works
ẈƓ*ṁ@" - Main link. Takes a list of lines L on the left
Ẉ      - Get the lengths of each line
 Ɠ     - Read the base b from STDIN
  *    - Raise b to the power of each length
     " - For each pair (length, original_line):
    @  -   Reverse the arguments as (original_line, length):
   ṁ   -     Mold the original_line to the length

Pip -rl, 9 8 bytes
0XaE#*Sg

Attempt This Online!
Takes the base followed by the bar graph (using any non-whitespace symbol) from stdin; outputs a bar graph of 0s to stdout.
Explanation
       g  List of lines of stdin (due to -r flag)
      S   All but the first element
    #*    Length of each
  aE      First line of stdin raised to each of those powers
0X        0 repeated that many times
          Autoprint (implicit), one element per line (due to -l flag)

Excel, 24 bytes
=REPT("#",A1^LEN(A2:A5))
A1 is the base
A2:A5 are the input lines

This would not work for the last test case, for example, because it has more than four lines. Is there an Excel consensus that I am missing?

Knight, 21 bytes
;=y+0P W=xP O*"#"^yLx

Try it online!
Had to actually fix a bug in the interpreter on this one.
Delimiter is newline, filler is # (although it doesn't check this, it just checks the length)
# read base, coerce to int
; = base + 0 PROMPT
# read all lines
: WHILE (= line PROMPT)
    # output base ^ length(line) #'s
    OUTPUT(* "#" (^ base LENGTH(line)))

Mathematica, 86 bytes
(s=#2^StringLength[StringSplit@#1];StringJoin/@Table[Table["#",s[[i]]],{i,Length@s}])&

input

["####\n##\n######\n###", 2]

ok...Fixed......

Octave, 42 bytes
@(b,s)[(1:max(k=b.^sum(s'>32)')<=k)+32 '']

*The string input/output doesn't fully match the regex but it is possible to understand which bar is which.
A function takes as input base b and a 2D array of chars s containing "!" and the output is also an array of chars.
Try it online!
Explanation:
                       s'>32               % logical array of input represents 1 for filler and 0 for spaces
                   sum(     )'             % an array containing length of each string
              k=b.^                        % exponentiate ( lengths of output)
        1:max(                )            % range form 1 to max of output lengths
                               <=k         % logical array of output represents 1 for filler and 0 for spaces
      [(                          )+32 ''] % convert the logical array to char array.

CJam, 20 bytes
q~:A;N/{,A\#"#"e*N}%

Input format
Input is required in the following format:
"##
####
######"2

Charcoal, 11 bytes
ＮβＷＳ«ＰＸβＬι↓

Try it online! Link is to verbose version of code. I/O is as a list of strings of - characters (note that you need an empty line to terminate the list).

V, 27 bytes
The basic idea is that we add a ' to each row (n^0), and then for each # we replace the 's in the line with [input] * '.  At the end I swapped all of the ' for # again
Àé'ld0ÎA'
ò/#
"_xÓ'/"òÍ'/#

Try it online!

R, 35 bytes
function(s,b)strrep('#',b^nchar(s))

an anonymous function which takes the strings as a list and the base, and returns a list of strings.
Try it online!

05AB1E, 10 bytes
U|v1Xygm×,

The filer character is 1 and the delimiter is a newline.
Try it online!
U          # Store the base in X
 |         # Get the rest of input as a list of lines
  v        # For each...
   1       #   Push 1
    X      #   Push the base
     y     #   Push this bar
      g    #   Get the length
       m   #   Push a**b
        ×, #   Print a string of #s with that length

Retina, 62 bytes
ms`^(?=.*¶(.*))
#;$1$*#;
{`#(?=#*;(#+);#)
$1
}m`#$

;#+;|¶.*$

Try it online! After all, a bar graph is just a list of unary numbers. Takes input as the graph (using #s) followed by the base in decimal (to avoid confusion). Explanation: The first replacement prefixes 1 and the base to each line of the graph. The second replacement then multiplies the first number on each line by the second, as long as the third number is nonzero. The third replacement then decrements the third number on each line. These two replacements are repeated until the third number becomes zero. The last replacement deletes the base everywhere, leaving the desired result.

Alice, 23 bytes
/'/dI
\I!wO&K/h.n$@?~E&

Try it online!
Not only am I not a quitter, but I'm so committed to making the point properly that I use ! as the filler.  That will certainly get the reader's attention.
Explanation
Mirrors are retained in this explanation to make it more clear when the program switches between cardinal and ordinal modes.
/I/!/wI&/h.n$@?~E&\'!dOK

/I                        % input base
  /!/                     % store onto tape as integer
     w                    % push return address
      I                   % input next line
       &/h                % get length (by adding 1 for each character in the string)
          .n$@            % terminate if zero
              ?~E         % get base from tape and raise to power
                 &\'!     % push "!" onto the stack that many times
                     d    % combine into a single string
                      O   % output string with newline
                       K  % return to stored address (without popping it from the return address stack)

Convex, 9 bytes
f{,#'#*N}

Try it online!

Perl 6, 26 bytes
{map '#'x$^b** *.comb,@^a}

The list of input strings is in the first parameter, @^a.  The second parameter $^b is the base.  A list of output strings is returned.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Radiation hardened cyclic quine polyglot
Challenge
Write two programs that:

run in two different programming languages.

These may not be two versions of one language.

when one program is run, it outputs the second program, and vice versa.
The two programs must be different (no polyglots).

Here's the catch though:

The programs must be radiation hardened.

This means that when any set of \$n\$ (defined below) characters is removed from either of the two programs, their functionality is unaffected.
\$n\$ is defined as the number of characters that may be omitted with your program's functionality unaffected.
\$n\$ must be at least \$1\$.

Rules

Standard loopholes are disallowed.
Your programs must be proper cyclic quines. They may not read their own source code.
Scoring is performed as follows:

Your score is \$\frac{S_1+S_2}n\$…
where \$S_1\$ and \$S_2\$ are the size of your first and second programs respectively…
and \$n\$ is as defined above.

This is a code-challenge, lowest score wins.

Reward
As this challenge is difficult to answer, I will be giving a bounty to the first person to answer.

Must the programs be proper quines?

@Mego Whoops - forgot to mention that. Yes.

Well, "proper quine" isn't the right term since they're not quines, but it seems you understood what I meant.

@Mego Yeah. I'll fix that now

Does "Two different programming languages" allow for the use of e.g. Python 2 and Python 3? What about Python 2.5 and Python 2.7?

@Phoenix Two different versions of a programming language are still one programming language. I should edit that in.

To confirm: after I remove n chars from program 1, should it output the second program, or the second program minus n chars?

@StephenS Second program.

Personally, I don't think this really adds much to the semiquine and radiation-hardening quine challenges we've already had; both categories have already been thrown together in so many combinations that it's extremely hard to come up with a truly original combination.

You should probably add some kind of reward for answering this. I feel like it's too extremely difficult for many people to want to try. I saw this had no answers and I was thinking "ooh a quine challenge, I love those!" but then I read ALL THE RULES and it completely deterred me.

@MDXF The description of the challenge is "radiation hardened multi-language cyclic quine". The list of rules is there to establish scoring and stop rule breaking, and to prevent the question from being closed as unclear.

Gol><> and ><>, (117 bytes + 117 bytes)/1 = 234
Gol><>
\\<<'3d*}}}}~}:r0<}!o::! ?>~~a<o>Hr~Kl a}}:?%2l}}}ss2"<<\\
\\<<'3d*}}}}~}:r0<}!o::! ?>~~a<o>Hr~Kl a}}:?%2l}}}ss2"<<\\

Try it online!
><>
\\<<"2ss}}}l2%?:}}a lK~rH>o<a~~>? !::o!}<0r:}~}}}}*d3'<<\\
\\<<"2ss}}}l2%?:}}a lK~rH>o<a~~>? !::o!}<0r:}~}}}}*d3'<<\\

Try it online!
Verification!
These two programs are the same, just reversed. They both follow the same general code structure.
Explanation (Gol><> on top, ><> on the bottom)
\\<<                           <<\\  Transition to the copy of the code that is not radiated
\\<<                           <<\\

                              "    Wrapping string literal over the rest of the code
                              '

                           ss2     Push the string character
                           *3d

                        }}}        Rotate the "<<\" to the correct end of the stack
                        }}}

                 }}:?%2l           Use the extra \ to replace a possible irradiated copy
                    }~}:

       ~     lK                    Duplicate the code
        ~~>? !::o!}<0r             Print a copy of the code in reverse

                a                  Push a newline
       a
    Hr                             Reverse, print the rest of stack and terminate
    >o<                            Print the rest of the stack and terminate

source: Stack Exchange

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Covfefify a string
In this challenge, you must take a string matching the regex ^[a-zA-Z]+$ or whatever is reasonable (you don't have to consider uppercase or lowercase letters if you want) (you may assume the string is long enough, and has the right structure for all the operations), and output another string, produced similarly to word at the end of a recent dadaist tweet by the POTUS ("Despite the constant negative press covfefe").
How to covfefify a string:
First, get the first sound group (made up terminology).
How do you do this? Well:

Find the first vowel (y is also a vowel)
  v
creation

Find the first consonant after that
    v
creation

Remove the rest of the string
creat

That is your first sound group.
Next step:
Get the last consonant of the sound group
t

and replace it with the voiced or voiceless version. To do this, find the letter in this table. Replace with the letter given (which may be the same letter)
b: p
c: g
d: t
f: v
g: k
h: h
j: j
k: g
l: l
m: m
n: n
p: b
q: q
r: r
s: z
t: d
v: f
w: w
x: x
z: s

so, we get
d

Then, take the next vowel after that consonant. You can assume that this consonant is not at the end of the string. Join these two together, then repeat it twice:
didi

Concatenate this to the first sound group:
creatdidi

You're done: the string is covfefified, and you can now output it.
Test cases:
coverage: covfefe

example: exxaxa

programming: progkaka (the a is the first vowel after the g, even though it is not immediately after)
code: codtete

president: preszizi

This is code-golf, so please make your program as short as possible!

"x" should technically map onto "gz". "qu" should map onto "gw".

This specifies one concept of covfefification but I keep feeling that a reference to Douglas Hofstadter's (and Melanie Mitchell's) work on string-conversion analogies, e.g. in Fluid Concepts seems appropriate.

Answers over 140 characters should be disqualified

Unfortunately it is impossible to do this in TrumpScript :(

@SandyGifford No, see the list of things to avoid when writing a challenge. https://codegolf.meta.stackexchange.com/a/8928/75773

@ThePlasmaRailgun dude...

@ThePlasmaRailgun It was a joke, since tweets have to be 140 characters or less.

It is worth noting that covfefifying a covfefified string will keep it the same.

Jelly,  58  57 bytes
<TḢị
e€Øyµ¬TĖEÐḟḢṪ;ç¥T
ḣÇḢ⁸ÇịµḢØYiị“ßȷ%Hẹrȧq’œ?ØY¤⁾cgy;ẋ2

A full program that accepts a list of lowercase characters and prints the result.
Try it online!
How?
<TḢị - Link 1, extract first value from y not less than x: number, x; list of numbers, y
     -                                                     e.g. 5, [3,4,7]
<    - x less than vectorised across y                             [0,0,1]
 T   - truthy indices                                              [    3]
  Ḣ  - head                                                             3
   ị - index into y                                                     7

e€Øyµ¬TĖEÐḟḢṪ;ç¥T - Link 2, indices of the letters to manipulate: list of characters, w
  Øy              - vowel+ yield = "AEIOUYaeiouy"                 e.g.  "smouching"
e€                - exists in for €ach letter in w                       001100100
    µ             - monadic chain separation, call that v
     ¬            - not vectorised across v                              110011011
      T           - truthy indices                                       12  56 89
       Ė          - enumerate                      [[1,1],[2,2],[3,5],[4,6],[5,8],[6,9]]
         Ðḟ       - filter discard if:
        E         -   elements are equal                       [[3,5],[4,6],[5,8],[6,9]]
           Ḣ      - head                                        [3,5]
            Ṫ     - tail                                           5
                T - truthy indices of v                                    34  7
               ¥  - last 2 links as a dyad
              ç   -   call last link (1) as a dyad                         7
             ;    -   concatenate                                     5,7
                  -                                    ...i.e the indexes of 'c' and 'i'

ḣÇḢ⁸ÇịµḢØYiị“ßȷ%Hẹrȧq’œ?ØY¤⁾cgy;ẋ2 - Main link: list of characters, w
                                   -                             e.g.  "smouching"
 Ç                                 - call the last link (2) as a monad    [5,7]
ḣ                                  - head to index (vectorises)      ["smouc","smouchi"]
  Ḣ                                - head                             "smouc"
                                   -   implicit print due to below leading constant chain
   ⁸                               - link's left argument, w
    Ç                              - call the last link (2) as a monad    [5,7]
     ị                             - index into w                         "ci"
      µ                            - monadic chain separation, call that p
       Ḣ                           - head p                               'c'
        ØY                         - consonant- yield = "BCDFGHJKLMNPQRSTVWXZbcdfghjklmnpqrstvwxz"
          i                        - first index                          22
                          ¤        - nilad followed by link(s) as a nilad:
            “ßȷ%Hẹrȧq’             -   base 250 number = 1349402632272870364
                        ØY         -   consonant- yield = "BCDFGHJKLMNPQRSTVWXZbcdfghjklmnpqrstvwxz"
                      œ?           -   nth permutation  = "BCDFGHJKLMNPQRSTVWXZpctvkhjglmnbqrzdfwxs"
           ị                       - index into         (special case ->) 'c'
                           ⁾cg     - literal ['c','g']
                              y    - translate (change 'c's to 'g's)      'g'
                               ;   - concatenate with the headed p        "gi"
                                ẋ2 - repeat list twice                    "gigi"
                                   - implicit print ...along with earlier = smoucgigi

This is amazing...

Incredible work.

I'm jelly. Upvoted.

This is the weirdest programming language I've ever seen.

@Ryan it's intended for golfing.

I'm learning Jelly currently and this answer is still amazing.

JavaScript (ES6), 107 103 bytes
Saved 4 bytes thanks to GOTO 0
s=>([,a,b,c]=s.match`(.*?[aeiouy]+(.)).*?([aeiouy])`,a+(b=(a="bcdfgszkvtgp")[11-a.search(b)]||b)+c+b+c)

Test cases

let f =

s=>([,a,b,c]=s.match`(.*?[aeiouy]+(.)).*?([aeiouy])`,a+(b=(a="bcdfgszkvtgp")[11-a.search(b)]||b)+c+b+c)

console.log(f("creation"))
console.log(f("coverage"))
console.log(f("example"))
console.log(f("programming"))
console.log(f("president"))

You can save a few bytes like this: s=>([,a,b,c]=s.match\(.?[aeiouy]+(.)).?([aeiouy])`,a+(b=(a="bcdfgszkvtgp")[11-a.search(b)]||b)+c+b+c)`

@GOTO0 Thanks, updated.

Jelly, 45 39 bytes
Øa“œṣ$b|0Ḃ’ṃ,Ṛ$yṫµfØyḢṭḢẋ2
e€ØyIi-‘ɓḣ;ç

Try it online!
How it works
e€ØyIi-‘ɓḣ;ç                Main link. Argument: s (string)

  Øy                        Vowels with y; yield "AEIOUYaeiouy".
e€                          Test each character in s for membership.
    I                       Increments; compute the forward differences of the
                            resulting array of Booleans.
     i-                     Find the first index of -1.
       ‘                    Increment this index to find the index of the first
                            consonant that follows a vowel.
                            Let's call this index j.
        ɓ                   Begin a new chain. Left argument: s. Right argument: j
         ḣ                  Head; yield the first j characters of s.
           ç                Call the helper link with arguments s and j.
          ;                 Concatenate the results to both sides.

Øa“œṣ$b|0Ḃ’ṃ,Ṛ$yṫµfØyḢṭḢẋ2  Helper link. Left argument: s. Right argument: j

Øa                          Alphabet; set the return value to “abc...xyz”.
  “œṣ$b|0Ḃ’                 Yield 7787255460949942. This is a numeric literal in
                            bijective base 250. The value of each digit matches its
                            1-based index in Jelly's code page.
           ṃ                Convert 7787255460949942 to base 26, using the digts
                            a = 1, b = 2, ..., y = 25, z = 0.
                            This yields "bcdfkszgvtgp".
            ,Ṛ$             Pair the result with its reverse, yielding
                            ["bcdfkszgvtgp", "pgtvgzskfdcb"].
                ṫ           Call tail with arguments s and j, yielding the j-th and
                            all following characters of s.
               y            Translate the result to the right according to the
                            mapping to the left, i.e., replace 'b' with 'p', 'c'
                            with 'g', etc. 'g' appears twice in the first string
                            of the mapping; only the first occurrence counts.
                            Let's call the resulting string r.
                 µ          Begin a new chain. Argument: r
                  fØy       Filter; remove non-vowels from r.
                     Ḣ      Head; take the first vowel.
                       Ḣ    Head; take the first character/consonant of r.
                      ṭ     Tack; append vowel to the consonant.
                        ẋ2  Repeat the resulting string twice.

sorry, buddy, looks like you missed out on the mega jelly rep

tfw an answer looks overly simplistic but is in fact really wonderful...simple is beautiful

C, 219 213 206 179 175 bytes
#define p putchar
#define q(a)for(;a strchr("aeiouy",*s);p(*s++));
f(s,c,h)char*s;{q(!)q()p(*s);p(c="pgt vkh jglmn bqrzd fwx s"[*s-98]);p(h=s[strcspn(s,"aeiouy")]);p(c);p(h);}

Try it online!

Does *p=putchar work as the first line?

Sorry disqualified. Can't fit in a tweet.

@cairdcoinheringaahing you sir are incorrect (I know that it was 140 when you wrote that)

171 bytes

12 or so bytes can be shaved off by replacing #defines and the function with preprocessor flags (-D...).

Actually tweetable now because twitter allows 280 chars.

CJam, 59 58 57 56 bytes
q_{"aeiouy":V&,_T|:T^}#)/(_W>"cbdfkszgvtpg"_W%er@sV&0=+_

Try it online!
Explanation
q_                   e# Read the input and copy it.
{                    e# Find the index of the first char for which the following is true:
 "aeiouy":V          e#  Push "aeiouy" and store it in V.
 &,                  e#  Check if the current char is in the vowel string (0 or 1).
 _T|:T               e#  Copy the result and OR with T (T is initially 0), storing back in T.
 ^                   e#  XOR with the original result. This will be 1 for the first
                     e#  consonant appearing after a vowel.
}#                   e# (end find)
)/                   e# Increment the index and split the string into chunks of that size.
(                    e# Pull out the first chunk.
_W>                  e# Copy it and get the last character (the consonant).
"cbdfkszgvtpg"_W%er  e# Transliterate the consonant to voiced/voiceless alternative.
@s                   e# Bring all the other split chunks to the top and join them together.
V&0=                 e# First char of the set intersection of that and the vowels.
                     e# (i.e. the first vowel in the second half)
+                    e# Concatenate the new consonant and the vowel.
_                    e# Duplicate the result of that.
                     e# Implicit output of stack contents.

CJam beats Jelly? :O (At least, it beats the Jelly answer everybody seems to be upvoting.)

Perl 5, 81 72 71 bytes
-1 byte thanks to Xcali!
s![aeiouy]+(.)\K.*!($1=~y/bdfgpstvzck/ptvkbzdfsg/r.$&x/[aeiouy]/g)x2!ge

Try it online!

You and I had the same idea with \K, but you did it 9 bytes better than I did. Good answer!

This can save a byte by reordering the translation: Try it online!

PHP, 121 Bytes
$v=aeiouy;preg_match("#(.*?[$v]+([^$v])).*?([$v])#",$argn,$t);echo$t[1],$z=strtr($t[2].$t[3],bcdfgkpstvz,pgtvkgbzdfs),$z;

Try it online!

-2 bytes: echo$t[1],$z=strtr($t[2].$t[3],bcdfgkpstvz,pgtvkgbzdfs),$z;

@Titus I have not think about that. Thank You

why not rename $argn to something shorter? $a, for example - that's -3 bytes

@TylerSebastian I must have an input variable that exists. Yes I can create a function but if I do it it raise the byte count more as use the three bytes

ah ok sorry I forgot how PHP does command line args - I just saw that you had defined it in the header section but failed to realize it was a reserved variable.

Java 8, 243 236 222 bytes
s->{String q="[a-z&&[^aeiouy]]",a=s.replaceAll("(^"+q+"*[aeiouy]+"+q+").*","$1"),b="pgtvkhjglmnbqrzdfwxs".charAt("bcdfghjklmnpqrstvwxz".indexOf(a.charAt(a.length()-1)))+s.replaceAll(a+q+"*([aeiouy]).*","$1");return a+b+b;}

Uses .replaceAll regexes with capture groups to filter out the parts we don't want.
Explanation:
Try it here.
s->{ // Method with String parameter and String return-type
  // Temp String we use multiple times:
  String q="[a-z&&[^aeiouy]]",
   // Regex to get the first part (i.e. `creation` -> `creat` / `example` -> `ex`)
   a=s.replaceAll("(^"+q+"*[aeiouy]+"+q+").*","$1"),
   // Get the trailing consonant and convert it
   b="pgtvkhjglmnbqrzdfwxs".charAt("bcdfghjklmnpqrstvwxz".indexOf(a.charAt(a.length()-1)))
   // Get the next vowel after the previous consonant from the input-String
    +s.replaceAll(a+q+"*([aeiouy]).*","$1");
  // Return the result:
  return a+b+b;
} // End of method

Python 3, 155 139 bytes
import re
def f(x,k='aeiouy])'):b,c,v=re.findall(f'(.*?[{k}([^{k}.*?([{k}',x)[0];return b+c+(('bcdfgkpstvz'+c)['pgtvkgbzdfs'.find(c)]+v)*2

removed 16 bytes thanks to @ovs
removed 1 byte thanks to Gábor Fekete

You could create a variable which has the value 'aeiouy]', maybe that will save some bytes. Also you can remove some characters from the replacement strings as there are the same.

I can't remove the identical characters from the replacement string, because that would be an IndexError, and saving aeiouy]) doesn't save any bytes.

if you pull out something like s='aeiouy])', you could use b,c,v=re.findall('(.*?[%s([^%s.*?([%s'%(s,s,s).  It's not shorter, but might lead towards a way to shorten it overall.

yeah, using f-strings it might be shorter

Shortened to 139 bytes

Who serially upvoted comments?

Using f-strings will save 1 byte:
k='aeiouy])' and f'(.*?[{k}([^{k}.*?([{k}'

Pyth, 54 bytes
L+hb?>F}RJ"aeiouy"<b2+hKtb*2+XhK"cgdsfbpvztkg")h@JKytb

This defines a function y, that expects a string.
Try it online: Test Suite

Haskell, 143 141 138 137 136 bytes
z h=elem h"aeiouy"
f i|(s,(m,c:x))<-span z<$>break z i,j:_<-filter z x,d<-"pgt.vkh.jglmn.bqrzd.fwx.s"!!(fromEnum c-98)=s++m++[c,d,j,d,j]

Try it online!

Awesome! Replacing nx with something one-lettered will save 2 bytes.

declaring z outside of f and switching to guards instead of a let saves another two bytes: Try it online!

And two more by combining (s,v)<-break z i,(m,c:x)<-span z v into (s,(m,c:x))<-span z<$>break z i.

Could shave one more by putting the opening parenthesis next to the let, thanks!

@Laikoni I don't understand the part about moving z out of f ?

@Laikoni : ok, finally got it, saved 1 byte!

Python, 261 260 bytes
def c(s,t='bpcgdtfvgksz'):
 q,r,t='aeiouy',range(len(s)),t+t[::-1]
 c=[i for i in r if i>[j for j in r if s[j]in q][0]and s[i]not in q][0]
 C=([t[2*i+1]for i in range(12)if s[c]==t[i*2]]or s[c])[0]
 return s[:c+1]+(C+s[[i for i in r if i>c and s[i]in q][0]])*2

A Non regex, Not esoteric solution. Took about 20 minutes to make, and an hour more to golf.
It probably has more list comprehension than the entire python standard library, mostly because I don't know regex...
Try it online! (With testcases)

Python 2, 251 246 245 239 237 234 229 211 bytes
First submission here.
def f(s):
  r=c='';n=0;w='aeiouy';a='bcdfghjklmnpqrstvwxz'
  for i in s:
    if n<2:r+=i
    if n<1and i in w:n=1
    if n==1and i in a:c='pgtvkhjglmnbqrzdfwxs'[a.index(i)];n=2
    if n==2and i in w:r+=c+i+c+i;break
  return r

Try it online!
Fellow golfers that helped me:
 Destructible Lemon / Wheat Wizard - 5 bytes
 Hubert Grzeskowiak - 1 byte
 musicman523 - 16 bytes

Welcome to the site! I see you tried using tabs for indentation. If you replace each tab with a single space, it is functionally identical and actually shows up properly instead of as extra bytes

While what Destructible Lemon said is correct, you can save even more bytes in you source by indenting the first level of your code with a single space and the second level with a single tab, this will make it a bit hard to display, but will save you 5 bytes.

Changes made, thanks a lot !

Is the semicolon at the end of line 4 necessary?

Well spotted Sir !

@WheatWizard Mixing spaces and tabs does make it incompatible with Python 3, though.

@WaitndSee I think you can shorten some of your conditionals. First: you can change not n to n<1 for 2 bytes, since you know n will never be negative. Also you can change n==3 to n>2 since you know n will never be greater than 3. You can also use the Python tricks for conditionals to shorten the first and second-last even further: n=[n,1][i in w and n<1]; r+=[0,r][n<2]

@musicman523 I haven't tried the trick for shortening conditionnals as I don't fully understand it's functionning yet, but will look forward toward it in the future. Thanks for the ideas and the link to the page that showed me the "(int)(operator)" trick !

@musicman523 2 bytes saved by removing the r+=i on line 5 and using your trick. EDIT : Nevermind, old way seems more efficient but you got me to rethink a way to remove those caracters on line 5 so 11 bytes total thanks to you directly and indirectly !

You can change r,v,c=('',)*3 to r=v=c='', since strings are immutable. I've tried a bunch of other clever tricks but frustratingly they are exactly as long. Also it may be worth adding a Try it online! link to your post

Ruby, 90 bytes
->x{x[/(.*?#{$v='[aeiouy]'}+.).*?(#$v)/];$1+($1[-1].tr('bcdfgkpstvz','pgtvkgbzdfs')+$2)*2}

Try it online!
Ungolfing it a bit, we have something equivalent to:
def covfefefify(x)
  v = '[aeiouy]'
  # Match x to a regular expression capturing:
  # Group 1:
  #  some characters (non-greedy)
  #  followed by some (greedy) non-zero number of vowels
  #  followed by exactly one character
  # Ungrouped:
  #  Some more (non-greedy) characters
  # Group 2
  #  Exactly one other vowel
  # By switching between greedy and non-greedy matches, we can capture longest and shortest vowel/consonant sequences without writing out all the consonants
  x[/(.*?#{v}+.).*?(#{v})/]
  # Glue it back together, replace the necessary consonants, duplicate where needed
  $1+($1[-1].tr('bcdfgkpstvz','pgtvkgbzdfs')+$2)*2
end

Ruby, 175 141 110 bytes
->s{s=~/(.*?#{v='[aeiouy]'}+(#{c='[^aeiouy]'}))#{c}*(#{v})/;"#$1#{($2.tr('bcdfgkpstvz','pgtvkgbzdfs')+$3)*2}"}

Try it online!

Saved 34 bytes thanks to Eric Duminil
Saved 31 bytes thanks to Value Ink + optimized suggested tr arguments

Ungolfed

covfefify = -> (s) {
    from = 'bcdfgkpstvz'
    to   = 'pgtvkgbzdfs'

    vowels = "[aeiouy]"
    consonants = "[^aeiouy]"

    s.match(/(.*?#{vowels}+(#{consonants}))#{consonants}*(#{vowels})/)
    d = ($2.tr(from, to) + $3) * 2
    "#$1#{d}"
}

-34 bytes with Hash[*"bpcgdtfvgkkgpbsztdvfzs".chars]

Since input seems guaranteed to be all alphabetical characters, c=[^aeiou] is shorter. Have the first interpolation for each variable assign it simultaneously for -2 bytes: /^(.*?${v='[aeiou]'}+(#{c='[^aeiou]})).../. Finally, $2.tr("b-z","pgtevkhijgl-obqrzdufwxys") instead of the Hash solution.

You can save 14 bytes by using subexpressions (\g<n>) instead of interpolation, plus another 14 using @ValueInk's [^aeiou] suggestion: s=~/^(.*?([aeiouy])+([^aeiou]))\g<3>*(\g<2>)/.

Actually, that has a bug with programming -> progkaka, which I can't quite figure out.

@Jordan unfortunately the subexpression call \g<3> updates the value of $3, so we can't use this shortcut.

Crystal, 203 194 187 186 184 163 bytes
o=""
ARGV[v=c=0].each_char{|a|r=/#{a}/
"aeiouy"=~r&&(v=x=1)||(c=v)
o+=a if c<2||x
c>0&&(x&&break||(o+=(i="pgtvkgbqrzdfs"=~r)?"bcdfgkpqrstvz"[i]: a))}
p o+o[-2..-1]

I think you can lose the parens around c=v and o+=<...>

Retina, 68 bytes
r`\B(?>([^aeiouy])+)([aeiouy]).*
$1$1$2$1$2
T-5>`fs\dbgcgk\ptzv`Ro`.

Try it online!

!@#$%^&*()_+, 102 101 100 99 80 bytes
`33554(_(^1%)%)$pgtevkhijglmnobqrzdufwxys(0*!@&)^(0*!!@&_^)Q++&!@%(0*!^&)+!@0&@@

42nd answer of this question, it looks like. Just one byte longer than BQN! It took much more time than it should. I'm pretty sure there are still some simple tricks that I'm missing.
Accept lowercase characters. The program does not actually contain digits - 01345Q in the code above are unprintable characters with ASCII code 0, 1, 3, 4, 5 and 25 respectively.
Try it online!

How does this work?

@emanresuA It's very naive. Two lookup tables at the beginning: "is consonant" (with unprintable characters \x00 and \x01) and "voiced or voiceless". Then three do-while loops to find a vowel (and output along the way), consonant (and output along the way), and vowel.

Oh, and explaining that made me realize I wasted a very dumb byte. I've fixed it now.

...Damn, one completely unnecessary byte. Two-digits!!!

80!!! (19 chars) EXPLANATION COMIN' SOON

MATLAB / Octave - 159 158 bytes
The following works assuming the input string is all lowercase.
a=input('','s');m=ismember(a,'aeiouy');s='pgt vkh jglmn bqrzd fwx s';m(1:find(m,1))=1;i=find(~m,1);f=a(1:i);d=s(f(end)-97);m(1:i)=0;v=a(find(m,1));[f d v d v]

Explanation

a = input('','s');: Gets a string from STDIN and stores it into the variable a.
m=ismember(a,'aeiouy');: Returns a Boolean array that is the same size as the string a determining where vowels are located
s='pgt vkh jglmn bqrzd fwx s'; The covfefe mapping of consonants as a string.  This string is 25 characters long and omitting the vowels.  The first position where the vowel 'a' is supposed to be is removed while the other positions where the vowels are located are placed with a dummy space character.  This is so that when we determine the first consonant appearing after the vowel, we will convert the consonant to a position to access a character in this string to determine the first component of the converted word.
m(1:find(m,1))=1: Sets the first position of the Boolean array up to where we have found the first vowel as all vowels.  This will be so that when we search for the next consonant that follows the first vowel, we will ignore these characters.
i=find(~m,1);: Finds the first position of the string that is a consonant after the first vowel.
f=a(1:i): Removes the string after the first consonant that follows the vowel.  We simply sample from the first position of the string up to this point.
d=s(f(end)-97);: Take the last character of the string that is remaining and finds where we need to sample from the lookup string and gets that character. Subtracting a character and a number in MATLAB or Octave coalesces to form an integer by converting the character into its ASCII code. In this case, we subtract the last character by the character at the beginning of the alphabet to give us the position relative to the beginning. However, instead of subtracting by b (98), we subtract by a as MATLAB starts indexing by 1 instead of 0.  'a''s ASCII code is 97.
m(1:i)=0;: Takes the Boolean mask and sets all characters in the input string from the first position to the first consonant following a vowel to false.
v=a(find(m,1));: Finds the next vowel that follows the first consonant from the input string.
[f d v d v]: Output our covfefeied string.

Example Runs
>> a=input('','s');m=ismember(a,'aeiouy');s='pgt vkh jglmn bqrzd fwx s';m(1:find(m,1))=1;i=find(~m,1);f=a(1:i);d=s(f(end)-97);m(1:i)=0;v=a(find(m,1));[f d v d v]
coverage

ans =

covfefe

>> a=input('','s');m=ismember(a,'aeiouy');s='pgt vkh jglmn bqrzd fwx s';m(1:find(m,1))=1;i=find(~m,1);f=a(1:i);d=s(f(end)-97);m(1:i)=0;v=a(find(m,1));[f d v d v]
example

ans =

exxaxa

>> a=input('','s');m=ismember(a,'aeiouy');s='pgt vkh jglmn bqrzd fwx s';m(1:find(m,1))=1;i=find(~m,1);f=a(1:i);d=s(f(end)-97);m(1:i)=0;v=a(find(m,1));[f d v d v]
programming

ans =

progkaka

>> a=input('','s');m=ismember(a,'aeiouy');s='pgt vkh jglmn bqrzd fwx s';m(1:find(m,1))=1;i=find(~m,1);f=a(1:i);d=s(f(end)-97);m(1:i)=0;v=a(find(m,1));[f d v d v]
code

ans =

codtete

>> a=input('','s');m=ismember(a,'aeiouy');s='pgt vkh jglmn bqrzd fwx s';m(1:find(m,1))=1;i=find(~m,1);f=a(1:i);d=s(f(end)-97);m(1:i)=0;v=a(find(m,1));[f d v d v]
president

ans =

preszizi

Try it online!
http://www.tutorialspoint.com/execute_octave_online.php?PID=0Bw_CjBb95KQMdjROYVR0aFNrWXM
When you hit the Execute button at the top, wait a few moments, then enter the desired string.  Enter the string slowly as there seems to be a delay when entering in text.

BlitzMax, 190 bytes
s$=Input()For i=1To s.Length
f="aeiouy".Contains(s[i-1..i])If f v=i If c Exit
If v And c|f=0c=i
Next
t$="bpdtfvgkcgsz"x$=s[c-1..c]r=t.Find(x)~1If r>=0x=t[r..r+1]
x:+s[v-1..v]Print s[..c]+x+x

Takes a word from stdin and prints the result to stdout. The input word is assumed to be lowercase and to contain at least one vowel followed by a consonant.
A more readable version of the progam with formatting and variable declarations:
SuperStrict
Framework BRL.StandardIO

Local s:String = Input()
Local v:Int
Local c:Int

For Local i:Int = 1 To s.Length
    Local f:Int = "aeiouy".Contains(s[i - 1..i])
    If f Then
        v = i
        If c Then Exit
    End If
    If v And c | f = 0 Then c = i
Next

Local t:String = "bpdtfvgkcgsz"
Local x:String = s[c-1..c]
Local r:Int = t.Find(x) ~ 1
If r >= 0 Then x = t[r..r + 1]
x :+ s[v - 1..v]
Print s[..c] + x + x

How it works:
BlitzMax doesn't have any builtin regex functionality or similar, so a loop is used to iterate over the characters of the input word until it finds a vowel followed by a chain of at least one consonant. The variable c stores the position of the last of those consonants, v that of the vowel. The loop continues to see if there is another vowel after the chain and if so, v is updated accordingly.
Then the consonant at c is looked up in the string "bpdtfvgkcgsz", which acts as a replacement table. If the consonant is found in the table at any position, then that position is XOR-ed with 1 and the character at the resulting position gets used as its replacement. The XOR operation turns 0 into 1, 2 into 3, 4 into 5 etc. and vice versa, so that b gets swapped with p, d with t and so on. Finally, the original string up to c, the replacement character and the vowel at v are put together as required and printed.
Example results:

coverage covfefe
creation creatdidi
programming progkaka
stupidity stupbibi
blah blahhaha

link to blitzmax repo?

@DestructibleLemon BlitzMax was created as a language primarily for amateur game delevopment and with a proprietary compiler sold for money. While it is now free and available from here, I believe the compiler is still not open source. There exists an alternative implementation (repo here, builds here), which will however only run the ungolfed version of above code due to the lack of a "non-strict" setting that allows omitting variable declarations.

Clever use of XOR on index -- I'll probably be using that someday.  Thank you.

Clojure, 182 156 chars
#(let[v #{\a\e\i\o\u\y}p(partition-by v %)[s m[c][n]](if(v(first %))(cons[]p)p)z[(or((zipmap"bcdfgkpstvz""pgtvkgbzdfs")c)c)n]](apply str(concat s m[c]z z)))

How It Works
(partition-by v "president")

Returns a seq of ((\p \r) (\e) (\s) (\i) (\d) (\e) (\n \t))
[s m [c] [n]] (if (v (first x)) (cons [] p) p)

Destructures the seq into s=(\p \r), m=(\e), c=\s, n=\i.
Or for "example" it's s=[], m=(\e), c=\x, n=\a.
(apply str (concat s m [c] [(l c) n] [(l c) n]))

Returns the output string by concatenating the pieces together and stringifying it.
And then I just removed as much whitespace as I could while still making it compile.
De-uglified:
(defn covfefify [x]
  (let [vowel? #{\a\e\i\o\u\y}
        parts (partition-by vowel? x)
        [start mid [consonant] [last-vowel]] (if (vowel? (first x)) (cons [] parts) parts)
        lookup #(or ((zipmap "bcdfgkpstvz" "pgtvkgbzdfs") %) %)]
    (apply str (concat start mid [consonant] [(lookup consonant) last-vowel] [(lookup consonant) last-vowel]))))

Welcome to PPCG, and great first answer! We hope you'll stay and have fun participating in more challenges. :-)

If you're defining a function, its name should probably be as short as possible. You could just call the main function c, for example. (We also allow anonymous functions, which are shorter in many languages; I'm not sure whether they are in Clojure). I see you've made that improvement in the interior of your code already, though, so probably not much needs changing here.

R, 341 characters
f=function(x){g=function(x,y)el(strsplit(x,y));a=g(x,'');v=g('aeiouy','');n=letters[-c(1,5,9,15,21,25)];l=data.frame(n,g('pgtvkhjglmnbqrzdfwxs',''));y=min(match(n,a)[which(match(n,a)>min(match(v,a),na.rm=T))]);m=l[which(l$n==a[y]),2];e<-a[-c(1:y)][min(match(v,a[-c(1:y)]),na.rm=T)];paste0(paste0(a[c(1:y)],collapse=''),m,e,m,e,collapse="")}

Horrendous R attempt, why are strings so hard
Readable version:
f = function(x) {
  g = function(x, y)el(strsplit(x, y))
  a = g(x, '')
  v = g('aeiouy', '')
  n = letters[-c(1, 5, 9, 15, 21, 25)]
  l = data.frame(n, g('pgtvkhjglmnbqrzdfwxs', ''))
  y = min(match(n, a)[which(match(n, a) > min(match(v, a), na.rm = T))])
  m = l[which(l$n == a[y]), 2]
  e <-a[-c(1:y)][min(match(v, a[-c(1:y)]), na.rm = T)]
  paste0(paste0(a[c(1:y)], collapse = ''), m, e, m, e, collapse = "")
}

I believe your count it is off - I count 340 bytes

Got it down to 304 bytes

Python 3.8 (pre-release), 142 bytes
s=input()
g=lambda i,f='aeiuoy':i if s[i]in f else g(i+1,f)
q=g(g(0),c:='pgtcvkh jglmn bqrzd fwx s')
exit(s[:-~q]+(c[ord(s[q])-98]+s[g(q)])*2)

Try it online!
A little late to the party, but here's yet another non-regex Python answer! I interpreted the rules to allow printing to STDERR which saves a byte (exit/print). Using Python 3.8 over 3<=3.7 saves me a total of 1 byte with the walrus operator as opposed to defining the c variable elsewhere.
Thanks a lot to Post Rock Garf Hunter (-21 bytes) for the help!

Looks good! +1 for the good job :D also, you are never late  for a code-golf party!

You can take off some bytes by having b look for the index instead of the character since indexing is shorter than .find.  Try it online!

I really, really like this, but does it not break on input words such as peeled? Try it online!
I need a bit of time to properly understand it, I can't quite figure out how to fix it but I have a feeling that it is possible!

I thought I had it with this, however it also breaks if the word start with a vowel :( The example given should return avfefe

You can save a few bytes with short-circuiting

Oh, nice! It breaks on example on input, but this seems to be solved by calling g(-1) instead of g(0)

05AB1E, 101 104 88 bytes
-16 bytes thanks to Okx
I somehow hope this can be done way more efficiently.
žOÃćIsk>[DIs£¤žPså#\>]s[DIsèDžOså#\>]ŠŠ"bpcgdtfvgkhhjjkgllmmnnpbqqrrsztdvfwwxxzs"S2ôDí«ø`Šs¤sŠksŠèsŠì2×«

Try it online!
Explanation
                  Argument: s
žOÃ0èk            Get index of first vowel in s
>[DIs£¤žPså#\>]   Increment index and split s until last character of substring is a consonant
s[DIsèDžOså#\>]   Increment index an get character at index in s until character is a vowel
ŠŠ                Rearrange stack
.•7¶ëÒ—Öb´ƒ≠Ä“šʒÆµJ^ÝV“Îpи•S2ôDí«ø`   Prepare character substitution map
Šs                Rearrange stack
¤                 Last character of substring
sŠ                Rearrange stack (yes, again)
k                 Index of last character in substitution key list
sŠ                Rearrange stack (it won't stop)
è                 Character at index in character substitution value list
sŠ                Rearrange stack (ONE LAST TIME)
ì2×«              Prepend substitution consonant before vowel, duplcicate and concatenate with the substring from the very beginning

You can replace "bpcgdtfvgkhhjjkgllmmnnpbqqrrsztdvfwwxxzs" with .•7¶ëÒ—Öb´ƒ≠Ä“šʒÆµJ^ÝV“Îpи• to save 15 bytes

You can also replace žOÃćIsk with žOÃ0èk to save another byte.

@Okx I think I really need to learn some String compression techniques. Thanks!

@kalsowerus I know it's been a while, but you can golf 8 bytes from your answer like this: žOÃнk>[DIs£¤žPså#\>]©s[DIsèDžOså#\>]s\.•7¶ëÒ—Öb´ƒ≠Ä“šʒÆµJ^ÝV“Îpи•S2ôDí«ø`®θkèìDJ Try it online. I mainly got rid of all the swaps and triple-swaps by using a variable instead. And 0è can be н, and I've replaced 2×« with DJ to join the entire stack together. PS: I've also posted a 55 bytes 05AB1E answer using a different technique. (Which also includes a link to better understand compression in 05AB1E. :D)

Perl, 71 bytes
s#[aeiouy]+(.)\K.*?([aeiouy]).*#"$1$2"=~y/bcdfgkpstvz/pgtvkgbzdfs/rx2#e

Also run with perl -pe. A few bytes less than the previous Perl solution. Admittedly I got some inspiration from there as well.

Vim, 107 keystrokes
Who needs Java, Python 3, Modern Pascal 2.0, C#, Python 2, R, Go, C, BlitzMax, Javascript, Crystal, Clojure, Lua, Matlab/Octave, Haskell and PHP when you have vim?
i ⎋o⏎bcdfghjklmnpqrstvwxz⏎pgtvkhjglmnbqrzdfwxs⎋1Ghqy/[aeiouy]⏎q/[^aeiouy]⏎mz@yyl`zpld$yhjpg*jyl`zpy2lPjdGX

⎋ is the Escape key and ⏎ is the Return key
Explanation
i ⎋                         Insert a space before the first character
o⏎bcdfghjklmnpqrstvwxz⏎     Insert the character data
  pgtvkhjglmnbqrzdfwxs⎋1Gh
qy/[aeiouy]⏎q               Find the first vocal after the space
/[^aeiouy]⏎mz               Find the next consonant and add a marker
@yyl`zp                     Find the next vocal and put it after the consonant
ld$                         Delete the rest of the world
yhjpg*                      Search for the consonant in the first row of the character data
jyl                         Copy the character in the same position in the second row
`zpy2lPjdGX                 Paste it after the last vowel and repeat the two last characters

I may be wrong, but it doesn't look like [aeiou] and [^aeiou] account for the fact that, in this challenge, y is considered a vowel.

05AB1E, 55 42 bytes
η.ΔžOSåàyžPSÅ¿à*}ÐIsKžOÃнsθ.•gÍĆdQ¸G•Â‡ìDJ

-13 bytes thanks to @Grimmy.
Try it online or verify all test cases.
Explanation:
η                # Suffixes of the (implicit) input
                 #  i.e. "creation" → ["c","cr","cre","crea","creat","creati","creato","creatio","creation"]
 .Δ       }      # Find the first for which the following is truthy:
   žO            #  Push vowels (including y): "aeiouy"
     S           #  Convert it to a list of characters: ["a","e","i","o","u","y"]
      å          #  Check for each if they're in the current (implicit) suffix
                 #   i.e. "creat" → [1,1,0,0,0,0]
       à         #  Pop and push the max (basically check if any are truthy)
                 #   i.e. [1,1,0,0,0,0] → 1
   y             #  Push the suffix again
    žP           #  Push the consonants (excluding y): "bcdfghjklmnpqrstvwxz"
      S          #  Convert to a list of characters: ["b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","z"]
       Å¿        #  Check for each if the suffix ends with it
                 #   i.e. "creat" → [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0]
         à       #  Pop and push the max (basically check if any are truthy)
                 #   i.e. [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0] → 1
   *             #  Check if both are truthy
                 #   i.e. 1 and 1 → 1
           Ð     # Triplicate the found suffix
            I    # Push the input
             s   # Swap the top two items on the stack
                 #  i.e. stack contains now: "creat","creat","creation","creat"
K                # Remove the suffix from the input
                 #  i.e. "creation" and "creat" → "ion"
 žOÃ             # Only leave the vowels
                 #  i.e. "ion" → "io"
    н            # Pop and push the first character
                 #  i.e. "io" → "i"
s                # Swap again so the prefix is a the top of the stack again
 θ               # Pop and push the last character
                 #  i.e. "creat" → "t"
  .•gÍĆdQ¸G•     # Push string "bcdfkszgvtgp"
            Â    # Bifurcate it (short for Duplicate & Reverse copy): "pgtvgzskfdcb"
             ‡   # Transliterate the character of "bcdfkszgvtgp" to the same index in "pgtvgzskfdcb"
              ì  # Prepend the second character in front of the first
                 #  i.e. "d" and "i" → "di"
               D # Duplicate it
J                # Join the stack together (and output implicitly)
                 #  i.e. "creat" and "di" and "di" → "creatdidi"

See this 05AB1E tips of mine (section How to compress strings not part of the dictionary?) to understand why .•gÍĆdQ¸G• is "bcdfkszgvtgp".

I ended up making my own answer, since even though I used your answer as a starting point, the result is very different. Unfortunately couldn’t get it below 35.

Lexurgy, 288 286 281 bytes
Docs here.
Lexurgy is an online tool meant for conlangers (people who make constructed languages) to apply sound changes to their conlangs via a series of programmable rules. As such, this tool involves many string operations.

-2: remove the u and w classes and replace them with one-time substitutions.
-5: fix a bug with the example case, combine some rules into a single step

Class v {a,e,i,o,u}
Class c {p,t,k,f,s,c,b,d,g,v,z,g,h,j,l,m,n,q,r,w,x}
a:
@c *=>@c ;/$ @c* @v* _//{$ _,$ @c _}
b:
@c=>* /; _
c:
{@v,@c}=>* /; @v {@v,@c}* _
* {{p,t,k,f,s,c,x},{b,d,g,v,z,g,x}}$1=>$1 {{b,d,g,v,z,g,x},{p,t,k,f,s,c,x}}/_ ;
e:
@c$1 ;=>; $1
f:
(@c @v)$1=>$1 $1/; _
;=>*

Ungolfed:
Class vowel {a,e,i,o,u}
Class unvoiced {p,t,k,f,s,c}
Class voiced {b,d,g,v,z,g}
Class consonant {@unvoiced,@voiced,h,j,l,m,n,q,r,w,x}

# find first consonant after first vowel
part-1:
 @consonant * => @consonant ; / $ @consonant* @vowel* _ // {$ _, $ @consonant _}

romanizer-a:
 unchanged

# delete the consonant after the seperator
part-2:
 @consonant => * / ; _

romanizer-b:
 unchanged

# remove everything except the second vowel
part-3:
 {@vowel, @consonant} => * / ; @vowel {@vowel, @consonant}* _

romanizer-c:
 unchanged

# voicings
part-4:
 * @voiced$1 => $1 @unvoiced / _ ;
 * @unvoiced$1 => $1 @voiced / _ ;

romanizer-d:
 unchanged

# swap mapped consonant and seperator
part-5:
 @consonant$1 ; => ; $1

romanizer-e:
 unchanged

# duplicate the `fe`
part-6:
 (@consonant @vowel)$1 => $1 $1 / ; _

romanizer-f:
 unchanged

# remove the seperator
part-7:
 ; => *

Crystal, 130 Bytes
c=/[aeiouy]/
x,y,z=ARGV[0].partition /[^aeiouy]*#{c}*/
k=z[0]
b=((i="pgtvkgbqrzdfs"=~/#{k}/)?"bcdfgkpqrstvz"[i]: k)+z[c]
p y+k+b*2

How it works
c = /[aeiouy]/

store a regex for searching first vowel to c.
x, y, z = ARGV[0].partition /[^aeiouy]*#{c}*/

split the first argument into three parts {"", String until one character before the first consonant after first vowel, rest of string} and store each of the elements into x, y and z.
k = z[0]

get the first character, the relevant consonant.
i = "pgtvkgbqrzdfs" =~ /#{k}/

get the index of the consonant inside the left string or nil.
b = ((i = ...) ? "bcdfgkpqrstvz"[i] : k) + z[c]

if i is not nil, use this index for the second string (kind of a golfed hash).
if i is nil, use the original character.
next, append the first vowel of z.
p y + k + (b * 2)

finally, print first part from first regex y, the first consonant k and two times the previous calculated string b.
Try it online.

sed, 106 (105+1) bytes
This is sed with the -E flag, which apparently counts for one byte.
s/([aoeuiy][^aoeuiy])[^aoeuiy]*(.).*/\1\2/
h
s/.*(..)/\1\1/
y/bcdfgkpstvz/pgtvkgbzdfs/
x
s/.$//
G
s/\n//g

Try it online!

SmileBASIC 3, 195 bytes
Very late to this question, but how could I resist a good challenge for SmileBASIC 3? Features like iterating over a sequence or manipulating a string aren't quite as robust as other languages, so this is a bit of a challenge to do it as small as possible. Assumes words are UPPERCASE.
V$="AEIOUY
LINPUT W$REPEAT I=I+1UNTIL.<=INSTR(V$,W$[I-1])&&.>INSTR(V$,W$[I])J=I
WHILE.>INSTR(V$,W$[J])J=J+1WEND?LEFT$(W$,I+1)+("PGTVKHJGLMNBQRZDFWXS"[INSTR("BCDFGHJKLMNPQRSTVWXZ",W$[I])]+W$[J])*2

Detailed explanation here!

05AB1E, 35 bytes
1ú.γžOså}R`¦??н©?н®ì.•gÍĆdQ¸G•Â‡D?,

Try it online!
1ú                 # prepend the input with a space
                   # (this ensures the word doesn’t start with a vowel)
  .γ    }          # group characters by:
    žO             #  built-in constant "aeiouy"
      så           #  is the character in that string?
         R         # reverse the list of groups
          `        # dump all on the stack (first group on top)
¦                  # remove the space we added earlier
 ?                 # print the first consonant group
  ?                # print the first vowel group
   н               # get the first letter of the second consonant group
    ©              # save it in the register
     ?             # print it
      н            # get the first letter of the second vowel group
       ®           # restore the consonant from the register
        ì          # prepend, giving a consonant-vowel pair
.•gÍĆdQ¸G•         # compressed string "pgtvgzskfdcb"
          Â        # push a reversed copy of it
           ‡       # transliterate (b => p, c => g, ...)
            D      # duplicate the transliterated pair
             ?,    # print both copies (with a newline the second time)

PowerShell, 324 bytes
$v="[aeiouy]";$f=[regex]::match($w,$v).index+1;$s=[regex]::match($w.substring($f),"[^aeiouy]").index;$t=[regex]::match($w.substring($f),$v);
$c=@{b='p';c='g';d='t';f='v';g='k';h='h';j='j';k='g';l='l';m='m';n='n';p='b';q='q';r='r';s='z';t='d';v='f';w='w';x='x';z='s'};
$r=$c["$($w[($f+$s)])"];$w.substring(0,$f+$s+1)+"$r$t$r$t"

This was as short as I could get it without frying my brain. Takes input as $w='coverage'.
Try it online!

Welcome to Code Golf, and nice first answer! Be sure to check out our Tips for golfing in Powershell page for ways you can golf your program

Nice one! I golfed your solution down to 249 bytes :)

JavaScript (ES5), 237 229 bytes
function(s){r=['aeiouy','bcdfgkpstvz','pgtvkgbzdfs']i=0,p=''while(p+=s[i],r[0].indexOf(s[i++])<0);while(p+=s[i],~r[0].indexOf(s[i++]));b=s[i-1];while(r[0].indexOf(s[i++])<0);c=r[1].indexOf(b)d=((~c)?r[2][c]:b)+s[i-1]return p+d+d}

Try it online!
Probably not the most golfy, but it is ES5.
Recently fixed a bug. Example output:
creation->creatdidi
coverage->covfefe
example->exxaxa
programming->progkaka
code->codtete
president->preszizi

Lua, 164 157 bytes
w=arg[1]
i,j,a,b=w:find('[aeiouy]+([^aeiouy]+)(.)')
print(w:sub(1,j-#a)..(('pgtvkhjglmnbqrzdfwxs'):sub(('bcdfghjklmnpqrstvwxz'):find(a:sub(1,1)))..b):rep(2))

Edit 1: Removed 7 bytes by looking for any character after the consonants (see regex)
Try it online!
This program takes a string in CLI argument and prints its covfefied version.
This is my first submission to a code golf! I didn't check the others in detail so I might have missed some common optimizations (and fell in some traps). I used Lua because I've grown to like this little language, and I tried to find a regex that suited my needs.
Here's a cleaner version, using a function (I intended to use one, but the keywords in Lua are too long!):
function covfefy(word)
  i, j, a, b = word:find('[aeiouy]+([^aeiouy]+)(.)')

  -- 'a' is one or several consonants following the first vowel, b is the first vowel after that
  -- 'i' is the index of the beginning of 'a', 'j' the index of 'b'

  cov = word:sub(1, j - #a)

  -- Look for the first letter of 'a' in the voiced/voiceless table
  f = ('pgtvkhjglmnbqrzdfwxs'):sub(('bcdfghjklmnpqrstvwxz'):find(a:sub(1, 1)))

  return cov .. (f .. b):rep(2)
end

Feel free to give some feedback :)
Note: If you're wondering, it's 149 bytes long using MoonScript!

C#, 584 581 bytes
-3 bytes thanks to Destructible Lemon
This is my first submission on Code Golf and on Stack Exchange in general. I know that C# isn't a great golfing language and this probably isn't completely optimized but I wanted to give it a shot :p. Any tips are welcome!
Golfed Version:
namespace System{class B{static void Main(string[]args){var s="creation";var t="aeiou";int i=0,j=0,l=s.Length;char c=' ',f=' ';for(int x=0;x++<l;){if(t.IndexOf(s[x])>=0){i=x;break;}}for(int x=i;x++<l;){if(!(t.IndexOf(s[x])>=0)){j=x;c=s[x];for(int y=x;y++<l;){if (t.IndexOf(s[y])>=0){f=s[y];goto W;}}}}W:switch(c){case'b':c='p';break;case'c':c='g';break;case'd':c='t';break;case'f':c='v';break;case'g':c='k';break;case'k':c='j';break;case'p':c='b';break;case's':c='z';break;case't':c='d';break;case'v':c='f';break;case'z':c='s';break;}Console.Write(s.Substring(0,l-i-1)+c+f+c+f);}}}

Readable Version:
namespace System
{
    class B
    {
        static void Main(string[] args)
        {
            var s = "creation";
            var t = "aeiou";
            int i = 0, j = 0, l = s.Length;
            char c = ' ', f = ' ';
            for (int x = 0; x++ < l; )
            {
                if (t.IndexOf(s[x]) >= 0)
                {
                    i = x; break;
                }
            }
            for (int x = i; x++ < l;)
            {
                if (!(t.IndexOf(s[x]) >= 0))
                {
                    j = x; c = s[x];
                    for (int y = x; y++ < l;)
                    {
                        if (t.IndexOf(s[y]) >= 0)
                        {
                            f = s[y];
                            break;
                        }
                    }
                }
            }
            switch (c)
            {
                case 'b': c = 'p';
                    break;
                case 'c': c = 'g';
                    break;
                case 'd': c = 't';
                    break;
                case 'f': c = 'v';
                    break;
                case 'g': c = 'k';
                    break;
                case 'k': c = 'j';
                    break;
                case 'p': c = 'b';
                    break;
                case 's': c = 'z';
                    break;
                case 't': c = 'd';
                    break;
                case 'v': c = 'f';
                    break;
                case 'z': c = 's';
                    break;
            }
            Console.Write(s.Substring(0, l - i - 1) + c + f + c + f);
        }
    }
}

I'm no expert, but I think you can add the incrementation to the comparator in the for loop, that is, x++ < l, or something (maybe l > x++ if the first doesn't work). not sure though

@DestructibleLemon Thanks for the tip!

Python 3, 190 bytes
f=lambda s,g='aeiouy':min([s.index(l)for l in g if l in s])
C='bcdfghjklmnpqrstvwxyz'
q=input()
v=f(q)
c=f(q[v:],C)+v+1
print(q[:c]+('pgtvkhjglmnbqrzdfwxs'[C.index(q[c-1])]+q[f(q[c:])+c])*2)

Try it online!
I've had this coded since the week of the challenge, but was discouraged to post in its then-current state (which also happens to be the current state) because of all the 80-byte regex answers.
But hey, what the hell. Here's another non-esoteric, non-regex answer, six months late to the party.
-30 bytes from typing out the consonants in a string rather than using a list comprehension
-4 bytes from using the result of a calculation inline rather than assigning it to a variable (whoops)

Your TIO gives an error.

@FlipTack turns out I'm just an idiot - "test" is not a valid test string. Updated the link and shaved 4 bytes off of the source

SmileBASIC, 185 179 168 bytes
This is an even more golfed version of snail_'s answer.
INPUT W$DEF V(C)RETURN.>INSTR(@AEIOUY,W$[C])END@L?W$[I];
I=I+1ON!V(I-1)&&V(I)GOTO@L
X$=W$[I]WHILE V(I)I=I+1WEND?X$;((X$+@PGTVKGBZDFS)[INSTR(@BCDFGKPSTVZ,X$)+1]+W$[I])*2

Ungolfed:
'input
INPUT WORD$
'function returns true if the character at POS is a consonant
DEF CONSONANT(POS)
 RETURN INSTR(@AEIOUY,WORD$[POS])<0
END
'scan through the word until there's a vowel followed by a consonant
REPEAT
 PRINT WORD$[I];
 I=I+1
UNTIL !CONSONANT(I-1) && CONSONANT(I)
'Store and print the final letter of the "normal" section
LASTNORMAL$=WORD$[I]
PRINT LASTNORMAL$;
'Find the next vowel
WHILE CONSONANT(I)
 I=I+1
WEND
'If last normal letter is one of "BCDFGKPSTVZ", replace with corresponding letter in "PGTVKGBZDFS"
'otherwise don't change it
CORRUPTED$=(LASTNORMAL$+@PGTVKGBZDFS)[INSTR(@BCDFGKPSTVZ,LASTNORMAL$)+1]
'print the "corrupted" letter and the vowel that was found earlier, twice.
PRINT (CORRUPTED$+WORD$[I])*2

Python 3, 170 149 bytes
def f(s):g=lambda x,y:[(i in"aeiouy")for i in s].index(x,y);j=g(0,g(1,0));c=s[j];z="ckbdfszvtpgg"+c;return s[:j+1]+2*((c+z)[-z.index(c)-2]+s[g(1,j)])

Try it online!
A more readable version:
def f(s):
    n = [ (i in "aeiou") for i in s ]
    i = n.index(1)
    j = n.index(0, i)
    k = n.index(1, j)
    c = s[j]
    v = s[k]
    z = "ckbdfszvtpgg" + c
    r = (c+z)[-z.index(c)-2]
    return s[:j+1] + r + v + r + v

i, j, and k are the indices of the first vowel, the first consonant after that c, and the first vowel after that v respectively.

Welcome to the site and nice first answer! I've added in a link to an online interpreter so that others can test and verify your code. Note that you can save a few bytes by changing the indentation to a single space on each line. For more tips, check out our Tips for golfing in Python page!

Welcome to the site! More than just a single space, you can actually get rid of all of the indentation by using ;.  You also have an extra space after the first in. Try it online!

Thank you guys for the optimizations!

BQN, 79 bytesSBCS
{s∾4⥊("s_xwf_dzrqb_nmlgj_hkv_tgp"⊑˜'z'-⊑⌽s←⊑w⊔)∾⊑/˜v∧w←0∾»∨`1‿0⍷v←∊"aeiouy"}

Run online!

Perl, 90 bytes (89 + 1)
I see that I've already been beaten by another Perl answer, but I'll post this anyway. Run with -p.
s/[aeiouy](.)\K[^aeiouy]*(.).*$//;$x=$1=~y/bcdfgkpstvz/pgtvkgbzdfs/r;$_.="$x$2"x2

Modern Pascal 2.0, 415, 396 bytes
function c(S:String):String;
var L,M,I:Longint; const v='aeiouy'; o='_pgt_vkh_jglmn_bqrzd_fwx_s';
begin S:=Lowercase(S); Result:=S;
For l:=1 to length(S) do if pos(S[l],v)>0 then Break;
For M:=l to length(S) do if pos(S[M],v)=0 then begin
Result:=Copy(S,1,M);I:=Ord(S[M])-96;Delete(S,1,M);
For L:=1 to Length(S) do If Pos(S[l],v)>0 then begin
Result+=o[I]+S[L]+o[I]+S[L];Break;End;Break;End;End;

// Author of Modern Pascal

this is not 415 bytes. please trim spaces and actually make it 415 bytes to have that score. also the function name can be golfed

made smaller by unformatting. Could go even smaller, as modern pascal does not enforce the grammer of then a wasted heartbeat in parsing.

if you can go even smaller then you should

Go, 298 bytes
func c(l string)string{v:="aeiouy";c:="bcdfghjklmnpqrstvwxz";r:="pgtvkhjglmnbqrzdfwxs";b:=l[0:strings.IndexAny(l,v)+1];t:=strings.SplitAfterN(l,b,2)[1];i:=strings.IndexAny(t,c);b=b+t[0:i+1];x:=string(r[strings.IndexAny(c,string(t[i]))]);z:=string(t[i:][strings.IndexAny(t[i:],v)]);return b+x+z+x+z}

Welcome to PPCG!

brev 149 bytes
(define(v x)(string-translate x"bcdfgkpstvz""pgtvkgbzdfs"))(fn(strse x"(.*?[aeiouy]+(.))[^aeiouy]*(.)"(entire(conc(m 1)(v(m 2))(m 3)(v(m 2))(m 3)))))

Straight-forward regex solution♥

Vyxal o, 32 bytes
ðp≬k∪$cḊṘ÷Ḣ₴₴h:₴$hJ«ƛKS⟩NĖ!ǐ«ḂĿd

Try it Online!
Port of Grimmy's 05AB1E answer.

Knight, 161 154 bytes
;=xP;=v=c=uF;=s"";Wx;|&v c=s+sA=tAx;I=p|?97=aAx|?101a|?105a|?111a|?117a?121a=vTx;I&v!p=cTx;&&p&c&v!u=uAa=xGx 1LxO+s*+G"pgt_vkh_jglmn_bqrzd_fwx_s"-t 98Tu 2

Try it online!
-7 bytes thanks to Aiden Chow

155 bytes: ;=xP;=v=c=uF;=s"";Wx;|&v c=s+sA=tAx;I=p|?97=aAx|?101a|?105a|?111a|?117a?121a=vTx;I&v!p=cTx;I&p&c&v!u=uAaN=xGx 1LxO+s*+G"pgt_vkh_jglmn_bqrzd_fwx_s"-t 98Tu 2

Excel, 207 bytes
=LET(s,A1,x,SEQUENCE(LEN(s)),c,ISERROR(FIND(MID(s,x,1),"aeiouy")),k,MIN(IF(c*(x>MIN(IF(c,"",x))),x,"")),q,MID(s,k,1),m,"bcdfkszgvtgp"&q,n,MID(q&m,14-FIND(q,m),1)&MID(s,MIN(IF(c+(x<k),"",x)),1),LEFT(s,k)&n&n)

Scala, 281 bytes
Modified from the answer of @WaitndSe.

281 bytes version. Try it online!
type S=String
def f(s:S):S={val r,c=new StringBuilder;var(n,w,a)=(0,"aeiouy","bcdfghjklmnpqrstvwxz");for(i<-s){if(n<2)r+=i;if(n<1&&w.contains(i))n= 1;if(n==1&&a.contains(i)){c++="pgtvkhjglmnbqrzdfwxs"(a.indexOf(i))+"";n=2};if(n==2&&w.contains(i)){r++=c+""+i+c+i;return r+""}};r+""}

340 bytes version. Try it online!
type S=String
implicit class V[A](val x:A)extends AnyVal{def Q=x.toString}
def f(s:S):S={val r,c=new StringBuilder;var(n,w,a)=(0,"aeiouy","bcdfghjklmnpqrstvwxz");for(i<-s){if(n<2)r+=i;if(n<1&&w.contains(i))n= 1;if(n==1&&a.contains(i)){c++="pgtvkhjglmnbqrzdfwxs"(a.indexOf(i)).Q;n=2};if(n==2&&w.contains(i)){r++=c.Q+i+c.Q+i;return r.Q}};r.Q}

Ungolfed version. Try it online!
import scala.collection.mutable

object Main {
  def f(s: String): String = {
    val r = new StringBuilder
    var c = ""
    var n = 0
    val w = "aeiouy"
    val a = "bcdfghjklmnpqrstvwxz"

    for (i <- s) {
      if (n < 2) r += i
      if (n < 1 && w.contains(i)) n = 1
      if (n == 1 && a.contains(i)) {
        c = "pgtvkhjglmnbqrzdfwxs"(a.indexOf(i)).toString
        n = 2
      }
      if (n == 2 && w.contains(i)) {
        r ++= c + i + c + i
        return r.toString()
      }
    }
    r.toString()
  }

  def test(func: String => String, testcases: Map[String, String]): Unit = {
    for ((caseInput, caseOutput) <- testcases) {
      if (func(caseInput) != caseOutput) {
        throw new Exception(s"Function fails on testcase '$caseInput'.")
      }
    }
    println("Function passed all testcases.")
  }

  def main(args: Array[String]): Unit = {
    test(f, Map(
      "coverage" -> "covfefe",
      "example" -> "exxaxa",
      "programming" -> "progkaka",
      "code" -> "codtete",
      "president" -> "preszizi"
    ))

    println(f("creation"))
    println(f("coverage"))
    println(f("example"))
    println(f("programming"))
    println(f("code"))
    println(f("president"))
  }
}

Lua, 128 bytes
w=...i,j,a,b=w:find'[aeiouy]+([^aeiouy]+)(.)'n=a:byte()-97g=('pgtevkhijglmnobqrzdufwxys'):sub(n,n)..b print(w:sub(1,j-#a)..g..g)

Try it online!
This is effectively Kyrio's Answer with a lot of minor optimizations, as well as completely swapping out the logic for finding the replacement consonant.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/