text:
KOTH: Every coin has two sides
Final results available
Introduction
After my previous KOTH with heavy themes (fantasy war, worldwide pandemic...), I'm back with a new lighthearted game. This time, you are facing off in a "board game-like" situation. A pile of upside down coins is placed at the center of a really big table, and you are determined to get your share of the loot!
Glossary

Coins: Tokens that can either be flipped or unflipped.
Unflipped: Coins placed on the table with their value pointing down. This is the default state of the coins.
Flipped: Coins placed on the table with their value pointing up.
Local: Refers to your pile of coins.
Global: Refers to the pile of coins at the center.

Principle
At the start of the game, each player starts with 0 points and 0 coins (flipped or unflipped). The game is turn-based. During their turn, players can take up to 3 actions interacting either with the pile of coins at the center of the table, their own pile of coins or with other players.
Play order is defined randomly at the start of the game. The order of the players in the argument list represents the turn order, and it goes from left to right in that list. "Next" and "Previous" refer respectively to "on the right in that list" and "on the left in that list" with a loop if you're the last of either side.
The game lasts for 50 rounds or until there are 0 coins at the center at the end of a player turn (meaning that you will finish your 3 actions even if the pile is empty after your first action, and you can put back coins to let the game continue). The starting number of global coins is defined randomly with this formula:
(2 ^ nb_players) + (nb_players * 10) - random(1 + (nb_players ^ 2))`

Each action will get you points (or make you lose some) and at the end of the game, each coin you have will be added to your points (-1 for unflipped, +2 for flipped). The player with the highest score wins.
The controller provides you with input via command arguments, and your program has to output via stdout.
Syntax
Input
Each time your program is called, it will receive arguments in this format:
Round;YourPlayerId;Coins;PlayerId_Points_Flipped_Unflipped;PlayerId_Points_Flipped_Unflipped;...
Rounds are 1-indexed.
Example input
6;2;52;1_20_3_12;0_-2_0_1;2_12_1_0
Here, you see it is the 6th round and you are player 2. There are 52 coins in the central pile. You have 12 points, 1 flipped coin and 0 unflipped coin. Points can be negative.
Output
You have to output three characters (no space, no separator), which each correspond to one action you'll take this turn. The order of the characters determine the order of the actions. You can output the same actions multiple times. In case there is not enough coins to complete your action, it will use the maximum of available coins and count points only for the coins used.
N: Do Nothing
1: Take 1 coin from the central pile [Effects: +1 local unflipped / -1 point / -1 global unflipped]
2: Take 2 coins from the central pile [Effects: +2 local unflipped / -2 points / -2 global unflipped]
3: Take 3 coins from the central pile [Effects: +3 local unflipped / -3 points / -3 global unflipped]
A: Put back 1 coin from your pile [Effects: -1 local unflipped / +1 point / +1 global unflipped]
B: Put back 2 coins from your pile [Effects: -2 local unflipped / +2 points / +2 global unflipped]
C: Put back 3 coins from your pile [Effects: -3 local unflipped / +3 points / +3 global unflipped]
X: Remove 1 coin from your pile [Effects: -1 local unflipped / 0 point]
Y: Remove 2 coins from your pile [Effects: -2 local unflipped / 0 point]
Z: Remove 3 coins from your pile [Effects: -3 local unflipped / 0 point]
R: Rotate coins to previous player [Effects: -1 point per unflipped received, +2 points per flipped received / applies to all players]
T: Rotate coins to next player [Effects: -1 point per unflipped received, +2 points per flipped received / applies to all players]
F: Flip 1 coin [Effects: -1 local unflipped / +1 local flipped / +2 point]
U: Unflip 1 coin [Effects: +1 local unflipped / -1 local flipped / -2 point]
Example output
2FF : Takes two coins and flips two coin, scoring -2 + 2 + 2 = 2 points
If your output is incorrect, controller will assume NNN.
Controller
You can find the controller on GitHub. It also contains two samplebots, written in Java.
To make it run, check out the project and open it in your Java IDE. The entry point in the main method of the class Game. Java 8 required.
To add bots, first you need either the compiled version for Java (.class files) or the sources for interpreted languages. Place them in the root folder of the project. Then, create a new Java class in the players package (you can take example on the already existing bots). This class must implement Player to override the method String getCmd(). The String returned is the shell command to run your bots. You can for example make a Ruby bot work with this command : return "C:\Ruby\bin\ruby.exe MyBot.rb";. Finally, add the bot in the players array at the top of the Game class.
Rules

Bots should not be written to beat or support specific other bots.
Writing to files is allowed. Please write to"yoursubmissionname.txt", the folder will be emptied before a game starts. Other external resources are disallowed.
Your submission has 1 second to respond.
Provide commands to compile and run your submissions.

Supported Languages
I'll try and support every language, but it needs to be available online for free. Please provide instructions for installation if you're not using a "mainstream" language.
As of right now, I can run : Java 6-7-8, PHP, Ruby, Perl, Python 2-3, Lua, R, node.js, Haskell, Kotlin, C++ 11.
Final results
These are the results of 100 games (points are added up) :
1. BirdInTheHand: 1017790
2. Balance: 851428
3. SecondBest: 802316
4. Crook: 739080
5. Jim: 723440
6. Flipper: 613290
7. Wheeler: 585516
8. Oracle: 574916
9. SimpleBot: 543665
10. TraderBot: 538160
11. EgoisticalBot: 529567
12. RememberMe: 497513
13. PassiveBot: 494441
14. TheJanitor: 474069
15. GreedyRotation: 447057
16. Devil: 79212
17. Saboteur: 62240

Individual results of the games are available here : http://pasted.co/63f1e924 (with starting coins and number of rounds per game).
A bounty of 50 reputations is awarded to the winner : Bird In The Hand by Martin Büttner.
Thank you all for your participation, see you next KOTH~

"Effects: -1 local unflipped / +1 local flipped / +2 point" looks wrong to me. Shouldn't it be +3 points, because you've gone from -1 for an unflipped coin to +2 for a flipped one?

@PeterTaylor I think the points are independent of the coins. Each action is associated with a number of points received or lost and these are independent of the points you actually get for the coins at the end of the game.

You mention coins with their "value" pointing up or down. What are these values used for? Are coins distinguishable?

@PeterTaylor As Martin Büttner said, you get coins for actions (in this case +2 for flipping) and you also get points for having coins at the end (in this case +2 for each flipped).

Is the ID zero-based or one-based?

@frederick As you can see in the sample output, it is zero-based.

@Thrax Updated source of TraderBot

I see a lot of variance in your results. I think that may be from the amount of coins starting in the middle. Would you include in the next set of game results the starting coin count, as well as the game length of each game?

The version of my bot on your Github is still its first version (I modified it several times since then). Did you run this round of games with this old version or the new one?

I'm running the final 100 games, and rewarding the winner with a 50 reputation bounty. Future answers won't be eligible for the bounty.

Bird in the Hand, Ruby
def deep_copy(o)
  Marshal.load(Marshal.dump(o))
end

ID = 0
PTS = 1
FLP = 2
UFL = 3

round, id, global, *players = ARGV[0].split(';')
round = round.to_i
id = id.to_i
global = global.to_i

players.map!{ |s| s.split('_').map(&:to_i) }

nplayers = players.size

my_pos = players.find_index { |i, p, f, u| i == id }

state = {
    round: round,
    id: id,
    global: global,
    players: players,
    my_pos: my_pos,
    me: players[my_pos],
    prev_p: players[my_pos-1],
    next_p: players[(my_pos+1)%nplayers],
    ends_game: round == 50 && my_pos == nplayers-1,
    score: 0
}

moves = {
    'N' => ->s{deep_copy(s)},
    '1' => ->s{t = deep_copy(s); coins = [1, t[:global]].min; t[:global] -= coins; t[:me][UFL] += coins; t[:score] -= coins; t},
    '2' => ->s{t = deep_copy(s); coins = [2, t[:global]].min; t[:global] -= coins; t[:me][UFL] += coins; t[:score] -= coins; t},
    '3' => ->s{t = deep_copy(s); coins = [3, t[:global]].min; t[:global] -= coins; t[:me][UFL] += coins; t[:score] -= coins; t},
    'A' => ->s{t = deep_copy(s); coins = [1, t[:me][UFL]].min; t[:global] += coins; t[:me][UFL] -= coins; t[:score] += coins; t},
    'B' => ->s{t = deep_copy(s); coins = [2, t[:me][UFL]].min; t[:global] += coins; t[:me][UFL] -= coins; t[:score] += coins; t},
    'C' => ->s{t = deep_copy(s); coins = [3, t[:me][UFL]].min; t[:global] += coins; t[:me][UFL] -= coins; t[:score] += coins; t},
    'X' => ->s{t = deep_copy(s); coins = [1, t[:me][UFL]].min; t[:me][UFL] -= coins; t},
    'Y' => ->s{t = deep_copy(s); coins = [2, t[:me][UFL]].min; t[:me][UFL] -= coins; t},
    'Z' => ->s{t = deep_copy(s); coins = [3, t[:me][UFL]].min; t[:me][UFL] -= coins; t},
    'F' => ->s{t = deep_copy(s); coins = [1, t[:me][UFL]].min; t[:me][UFL] -= coins; t[:me][FLP] += coins; t[:score] += 2*coins; t},
    'U' => ->s{t = deep_copy(s); coins = [1, t[:me][FLP]].min; t[:me][FLP] -= coins; t[:me][UFL] += coins; t[:score] -= 2*coins; t},
    'R' => ->s{
        t = deep_copy(s)
        (-1...t[:players].size-1).each do |i|
            t[:players][i][FLP] = s[:players][i+1][FLP]
            t[:players][i][UFL] = s[:players][i+1][UFL]
        end
        t[:score] += 2*t[:me][FLP] - t[:me][UFL];
        t
    },
    'T' => ->s{
        t = deep_copy(s)
        (0...t[:players].size).each do |i|
            t[:players][i][FLP] = s[:players][i-1][FLP]
            t[:players][i][UFL] = s[:players][i-1][UFL]
        end
        t[:score] += 2*t[:me][FLP] - t[:me][UFL];
        t
    }
}

results = {}

'N123ABCXYZFURT'.each_char { |c1|
    s1 = moves[c1][state]
    'N123ABCXYZFURT'.each_char { |c2|
        s2 = moves[c2][s1]
        'N123ABCXYZFURT'.each_char { |c3|
            s3 = moves[c3][s2]
            s3[:ends_game] ||= s3[:global] == 0
            results[c1+c2+c3] = s3
        }
    }
}

endingMoves = results.keys.select{|k| results[k][:ends_game]}

endingMoves.each{|k| results[k][:score] += 2*results[k][:me][FLP] - results[k][:me][UFL]}

$> << results.keys.shuffle.max_by {|k| results[k][:score]}

If neither of us has a bug in their programs, the main algorithm of this is likely very similar to Mathias's Oracle. Based on the assumption that prior to the final round we can't know which coins we'll end up with, we evaluate the current set of moves purely based on the points received immediately, ignoring completely what sort of coins we'll end up with. Since there are only 143 = 2744 possible move sets we can easily simulate all of them to figure out how many points they'll bring.
However, if a move set ends the game (either because it reduces the global pot to zero, or because this is round 50 and we're the last one to move), then it also takes into account the coins owned at the end of the move set to determine the move set's value. I first considered terminating the game whenever possible, but this would result in the horrible move 333 when there are only 9 coins left in the pot.
If there are multiple move sets giving the same result, we choose a random one. (I might change this to bias it in favour of game-terminating move sets.)

Oracle, Python 3
Update: changed the order of the various tries to favor low pile of coins over rotations.
import sys
import itertools
from copy import deepcopy

MOVES_REQUIRED = 3

FLIPPED = 0
UNFLIPPED = 1

def filter_neighbors(neighbors, me, size):
    limit = size - MOVES_REQUIRED
    for data in neighbors:
        i, _, flipped, unflipped = map(int, data.split('_'))
        if MOVES_REQUIRED < (me - i) % size < limit:
            continue  # Skip neighbors that are too far away
        yield i, [flipped, unflipped]

class Player:
    def __init__(self, raw_data):
        _, me, coins, *data = raw_data.split(';')

        self.num_players = len(data)
        self._me = int(me)
        self._coins = int(coins)
        self._state = dict(filter_neighbors(data, self._me, self.num_players))

    def reset(self):
        self.me = self._me
        self.coins = self._coins
        self.state = deepcopy(self._state)
        self.my_state = self.state[self.me]

    def invalid_move(self, move):
        if move in 'NRT':
            return False

        if move in '123'[:self.coins]:
            return False

        flipped, unflipped = self.my_state
        if flipped and move == 'U':
            return False
        if unflipped and move == 'F':
            return False

        if move in 'AXBYCZ'[:2 * unflipped]:
            return False

        return True

    def N(self):
        return 0

    def one(self):
        self.coins -= 1
        self.my_state[UNFLIPPED] += 1
        return -1

    def two(self):
        self.coins -= 2
        self.my_state[UNFLIPPED] += 2
        return -2

    def three(self):
        self.coins -= 3
        self.my_state[UNFLIPPED] += 3
        return -3

    def A(self):
        self.coins += 1
        self.my_state[UNFLIPPED] -= 1
        return 1

    def B(self):
        self.coins += 2
        self.my_state[UNFLIPPED] -= 2
        return 2

    def C(self):
        self.coins += 3
        self.my_state[UNFLIPPED] -= 3
        return 3

    def X(self):
        self.my_state[UNFLIPPED] -= 1
        return 0

    def Y(self):
        self.my_state[UNFLIPPED] -= 2
        return 0

    def Z(self):
        self.my_state[UNFLIPPED] -= 3
        return 0

    def R(self):
        self.me = (self.me + 1) % self.num_players
        flipped, unflipped = self.my_state = self.state[self.me]
        return 2 * flipped - unflipped

    def T(self):
        self.me = (self.me - 1) % self.num_players
        flipped, unflipped = self.my_state = self.state[self.me]
        return 2 * flipped - unflipped

    def F(self):
        self.my_state[FLIPPED] += 1
        self.my_state[UNFLIPPED] -= 1
        return 2

    def U(self):
        self.my_state[FLIPPED] -= 1
        self.my_state[UNFLIPPED] += 1
        return -2

setattr(Player, '1', Player.one)
setattr(Player, '2', Player.two)
setattr(Player, '3', Player.three)

def scenarii(player):
    for tries in itertools.product('FUABCXYZ123NRT', repeat=MOVES_REQUIRED):
        player.reset()
        points = 0
        for try_ in tries:
            if player.invalid_move(try_):
                break
            points += getattr(player, try_)()
        else:
            yield points, ''.join(tries)

if __name__ == '__main__':
    player = Player(sys.argv[1])
    print(max(scenarii(player))[1])

Tries every single possible output and keep the one that yield the maximum amount of points for this turn.

Ah, I was just about to implement this, +1. :) (I still might actually, because I had one or two smaller ideas to improve this slightly.)

@MartinBüttner I thought of improving space (thus time [deepcopy]) complexity by keeping only relevant neighbors. Not sure of how it will impact things though.

@Thrax I fixed a bug in filter_neighbors and modified invalid_move to account for clarifications in the question. I can't reproduce the error though: $ python oracle.py '4;7;2040;8_-28_1_10;9_-43_0_9;2_-10_4_3;6_-24_6_3;0_6_2_12;1_48_3_0;10_21_4_8;5_6_5_1;4_-12_3_7;7_10_1_3;3_1_1_0' prints TTR

Greedy Rotation, Ruby
round, id, global, *players = ARGV[0].split(';')
round = round.to_i
id = id.to_i
global = global.to_i

players.map!{ |s| s.split('_').map(&:to_i) }

nplayers = players.size

my_pos = players.find_index { |i, p, f, u| i == id }

prev_p = players[my_pos-1]
next_p = players[(my_pos+1)%nplayers]

prev_score = 2*prev_p[2] - prev_p[3]
next_score = 2*next_p[2] - next_p[3]

take_from = prev_p

$><< '3'
if prev_score > next_score || prev_score == next_score && prev_p[3] > next_p[3]
    $><< 'T'
else
    $><< 'R'
    take_from = next_p
end

if take_from[3] >= 3
    $><< 'C'
elsif take_from[3] >= 1
    $><< 'F'
else
    $><< 'N'
end

This is quite similar to ArtOfCode's approach, except that this checks from which neighbour we can get more points, and it chooses C instead of F if we end up with 3 or more coins after the rotation.
After writing this up, I'm pretty sure that a better approach would be just to greedily pick the best out of all moves every time, preceding rotation by taking if possible (instead of sticking to a fixed "get unflipped, rotate, get rid of unflipped" pattern).
This also doesn't take into account the implicit points represented by the coins actually owned (based on the assumption that the game is going to last enough rounds that I likely won't end up keeping my coins anyway).

Flipper, Python 2
Flipper gathers coins and tries to turn unflipped to flipped. Flipper is not a smart player but tries to be a positive force in the game.
import sys, random

# process input data (not used here):
args = sys.argv[1].split(';')
rounds, myid, coins = map(int, args[:3])
players = [map(int, data.split('_')) for data in args[3:]]

# implement strategy using multiples of 'N123ABCXYZRTFU':
options = '12333FFFFFFFFFFF'
print ''.join(random.choice(options) for i in range(3))

Flipper just needs the python flipper.py <arg> to run.

SimpleBot, Python 3
SimpleBot is, well, simple. He's worked out one strategy and he's going to stick with it.
To run:
python3 main.py

where the contents of the main.py file is:
def main():
    print("3RF")

if __name__ == "__main__":
    main()

Balance, Lua
Balance will try to keep the balance in its token, minimizing the loss in case someone uses the R and T actions against him.
He thinks this style of life is the true one and should be enforced to anyone that doesn't keep a good balance of flipped/unflipped coins, so everyone close to him will be punished as soon as it could make them lose points.
He needs the following command to run:
lua balance.lua

Where the file balance.lua contains the following piece of code:
local datas={}
local arg=arg[1]..";"

-- parse the arguments
-- add some meta datas for debuging purpose/usefulness
arg:gsub("(.-);",function(c)
  if not datas.round
  then
    datas.round=c+0
  elseif not datas.myID
  then
    datas.myID=c+0
  elseif not datas.coins
  then
    datas.coins=c+0
  else
    datas[#datas+1]={}
    datas[#datas].repr=c
    c=c.."_"
    tmp={}
    c:gsub("(.-)_",function(d) tmp[#tmp+1]=d end)
    datas[#datas].id=tmp[1]+0
    datas[#datas].points=tmp[2]+0
    datas[#datas].flip=tmp[3]+0
    datas[#datas].unflip=tmp[4]+0
    if datas[#datas].id==datas.myID
    then
      datas.myOrder=#datas
      datas.myDatas=datas[#datas]
    end
  end
end)

local actions=""
-- construct actions
for i=1,3
do
  -- if we aren't in balance and can grab more coins
  -- we do it
  if #actions==0 and datas.myDatas.unflip<=datas.myDatas.flip/2 and datas.coins>=3
  then
    actions=actions.."3"
    datas.myDatas.unflip=datas.myDatas.unflip+3
    datas.coins=datas.coins-3
  -- if we couldn't grab coins, but aren't in balance, we flip some coins
  elseif datas.myDatas.unflip>datas.myDatas.flip/2
  then
    actions=actions.."F"
    datas.myDatas.unflip=datas.myDatas.unflip-1
    datas.myDatas.flip=datas.myDatas.flip+1

  -- if we didn't have anything to do on our pile, let's punish
  -- the fools who doesn't follow the great Balance principle
  else
    previous=datas.myOrder<2 and #datas or datas.myOrder-1
    following=datas.myOrder>=#datas and 1 or datas.myOrder+1

    lossPrev=-datas[previous].flip + 2*datas[previous].unflip
    lossFoll=-datas[following].flip+ 2*datas[following].unflip
    if lossFoll>0 and lossPrev>0
    then
      actions =actions.."N"
    elseif lossFoll>=lossPrev
    then
      actions=actions.."T"
      datas[following].unflip,datas[following].flip=datas[following].flip,datas[following].unflip
    else
      actions=actions.."R"
      datas[previous].unflip,datas[previous].flip=datas[previous].flip,datas[previous].unflip
    end
  end
end
print(actions)

The Janitor, Python 3
He tries to clean the mess the other players make with all these coins and put them back into pool.
import sys;
def Parse(S):
    T = S.split(';');
    me = eval(T[1]);
    N = len(T)-3;
    A = list(map(lambda x: list(map(lambda y:int(y),T[3+((2*N+x+me)%N)].split('_'))),range(-3,4)));
    Dic = {}
    for a in A:
        Dic[a[0]] = a[1:];
    Dic[-1] = [me];
    return Dic;
def Recursive(Dic,me,D):
    if D==3: return '';
    V = Dic[me];
    N = max(Dic.keys());
    Next = (me+1)%N;
    Prev = (N+1+me)%N;
    for i in range(3,0,-1):
        if V[2]>=i:
            Dic[me][2] = Dic[me][2]-i;
            return chr((i-1)+ord('A'))+Recursive(Dic,me,D+1);
    if V[1]>0:
        Dic[me][1] = Dic[me][1]-1;
        Dic[me][2] = Dic[me][2]+1;
        return 'U'+Recursive(Dic,me,D+1);
    if Dic[Next][2]>Dic[Prev][2]:
        return 'T'+Recursive(Dic,Next,D+1);
    return 'R'+Recursive(Dic,Prev,D+1);
Dic = Parse(sys.argv[1]);
me = Dic[-1][0];
print(Recursive(Dic,me,0));

He tries to give back all his unflipped coins, if he has some stuck flipped coins he will unflip them and if he gets rid of all his coins he will get somebody's else.

Crook, R
args <- strsplit(commandArgs(TRUE),";")[[1]]
state <- as.data.frame(do.call(rbind,strsplit(args[-(1:3)],"_")), stringsAsFactors=FALSE)
colnames(state) <- c("id","pts","flipped","unflipped")
state$flipped <- as.integer(state$flipped)
state$unflipped <- as.integer(state$unflipped)
nb <- nrow(state)
score <- function(place) 2*state$flipped[place]-state$unflipped[place]
my_place <- which(state$id==args[2])
next_1 <- ifelse(my_place!=nb,my_place+1,1)
next_2 <- ifelse(next_1!=nb,next_1+1,1)
next_3 <- ifelse(next_2!=nb,next_2+1,1)
previous_1 <- ifelse(my_place!=1,my_place-1,nb)
previous_2 <- ifelse(previous_1!=1,previous_1-1,nb)
previous_3 <- ifelse(previous_2!=1,previous_2-1,nb)
n <- 3
out <- c()
while(n){
    M <- N <- score(my_place)
    R <- switch(n,"1"=score(next_1),
                "2"=cumsum(c(score(next_1),score(next_2))),
                "3"=cumsum(c(score(next_1),score(next_2),score(next_3))))
    P <- switch(n,"1"=score(previous_1),
                "2"=cumsum(c(score(previous_1),score(previous_2))),
                "3"=cumsum(c(score(previous_1),score(previous_2),score(previous_3))))
    M <- c(M,M+R[-n])
    N <- c(N,N+P[-n])
    if(any(R>M & R>0)){
        action <- c("R","RR","RRR")[which.max(R-M)]
        out <- c(out, action)
        state[,3:4] <- state[c((nchar(action)+1):nb,seq_len(nchar(action))),3:4]
        n <- n-nchar(action)
    }else if(any(P>N & P>0)){
        action <- c("T","TT","TTT")[which.max(P-N)]
        out <- c(out, action)
        state[,3:4] <- state[c((nb+1-seq_len(nchar(action))),1:(nb-seq_len(nchar(action)))),3:4]
        n <- n-nchar(action)
    }else if(n>1 & all(R[1]+M[1]>c(0,P[1]+M[1],R[1]+R[2]))){
        out <- c(out,"RT")
        n <- n-2
    }else if(n>1 & all(P[1]+M[1]>c(0,R[1]+M[1],P[1]+P[2]))){
        out <- c(out,"TR")
        n <- n-2
    }else{
        out <- c(out, switch(n,"1"="A","2"="1F","3"="2FF"))
        n <- 0
        }
    }
cat(paste(out,collapse=""))

To run: Rscript Crook.R
Basically it exchanges its coins with its neighbours only if the exchange is uneven in its favour. If no beneficial exchange is possible, then it exchanges coins with the global pile in a way that keeps its ratio intact but generate some points.
Edit: I added a little bit of depth to this bot by making it check the next and previous 2 and 3 player stacks instead of just the next one and check if, overall, it is beneficial to rotate that many times.
2nd Edit: Following @MartinBüttner's idea, the bot now performs a "RT", or "TR", if it would be beneficial for him more than for its neighbours (if I didn't mess up in implementing it :) ).

Re your edit: If the guy next to you has a ton of flipped coins it can even be best to do RTR so that you get the score from his coins twice.

True. Though it will also give one of the neighbours that score once. But I will think about it indeed, it's definitely an idea to explore.

@MartinBüttner Ok in the end I found a way to implement it while keeping the spirit of the bot. Thanks for the suggestion!

@thrax Just so that you won't forget to update my bot when running the next game, I thought I should warn you that the version of my bot in your github repo is an old one.

Jim, Ruby
based on Martin Büttner's Greedy Rotation.
PlayerId = 0
Points = 1
Flipped = 2
Unflipped = 3

round, id, global, *players = ARGV[0].split(';')
round = round.to_i
id = id.to_i
global = global.to_i

if(round == 1)
    print '3FF'
    exit
end

players.map!{ |s| s.split('_').map(&:to_i) }

nplayers = players.size

my_pos = players.find_index { |a| a[PlayerId] == id }

coin_vals = players.map{|a| a[Flipped]*2 - a[Unflipped]}

move = [-1,1].max_by{|s|
    swap_gain = coin_vals.rotate(s)
    scores = (0...nplayers).map{|i|
        swap_gain[i]+players[i][Points]
    }
    scores.delete_at(my_pos)-scores.max
}
if move == 1
    print 'R'
else
    print 'T'
end

print ['1F', 'FF'][rand 2]

will rotate one way or the other, depending on what will give him the most points compared to the best other player. Then, he flips for quick cash.

TraderBot
This bot tries to rotate whenever it is the one that takes the most points in that action. If it cannot rotate then tries to get rid of the unfliped coins or take a few more to change them in the following actions.
import java.util.ArrayList;

import java.util.List;
public class TraderBot {
class Player{
    private int id;
    private int points;
    private int flip;
    private int unflip;

    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    public int getPoints() {
        return points;
    }
    public void setPoints(int points) {
        this.points = points;
    }
    public int getFlip() {
        return flip;
    }
    public void setFlip(int flip) {
        this.flip = flip;
    }
    public int getUnflip() {
        return unflip;
    }
    public void setUnflip(int unflip) {
        this.unflip = unflip;
    }

}

int round;
int coins;
int otherMaxPoints = 0;
Player myself = new Player();
List<Player> players = new ArrayList<>();

public static void main (String[] s){
    new TraderBot().play(s);
}

private void play(String[] s){
    parse(s[0]);
    System.out.println(action() + action() + action());
}

private int simRotateNext(){
    int flip, unflip;
    int maxP = Integer.MIN_VALUE;
    int myP = 0;
    for (int i = 0; i < players.size(); i++){
        flip = players.get(i).getFlip();
        unflip = players.get(i).getUnflip();
        int next = i + 1 <= players.size() - 1 ? i + 1 : 0;
        int p = 2 * flip - unflip;
        if (p > maxP && players.get(next).getId() != myself.getId()){
            maxP = p;
        } else if (players.get(next).getId() == myself.getId()){
            myP = p;
        }

    }
    return  myP - maxP;
}

private int simRotatePrev(){
    int flip, unflip;
    int maxP = Integer.MIN_VALUE;
    int myP = 0;
    for (int i = players.size() -1; i > 0; i--){
        flip = players.get(i).getFlip();
        unflip = players.get(i).getUnflip();
        int prev = i - 1 >= 0 ? i - 1 : players.size() - 1;
        int p = 2 * flip - unflip;
        if (p > maxP && players.get(prev).getId() != myself.getId()){
            maxP = p;
        } else if (players.get(prev).getId() == myself.getId()){
            myP = p;
        }
    }
    return  myP - maxP;
}

private int rotateNext(){
    int flip, unflip, nflip, nunflip;
    flip = players.get(0).getFlip();
    unflip = players.get(0).getUnflip();
    for (int i = 0; i < players.size(); i++){
        int next = i + 1 <= players.size() - 1 ? i + 1 : 0;
        nflip = players.get(next).getFlip();
        nunflip = players.get(next).getUnflip();
        players.get(next).setFlip(flip);
        players.get(next).setUnflip(unflip);
        players.get(next).setPoints(players.get(next).getPoints() + 2 * flip - unflip);
        flip = nflip;
        unflip = nunflip;
    }
    return myself.getPoints();
}

private int rotatePrev(){
    int flip, unflip,  nflip, nunflip;
    flip = players.get(players.size() -1).getFlip();
    unflip = players.get(players.size() -1).getUnflip();
    for (int i = players.size() -1; i > 0; i--){
        int prev = i - 1 >= 0 ? i - 1 : players.size() - 1;
        nflip = players.get(prev).getFlip();
        nunflip = players.get(prev).getUnflip();
        players.get(prev).setFlip(flip);
        players.get(prev).setUnflip(unflip);
        players.get(prev).setPoints(players.get(prev).getPoints() + 2 * flip - unflip);
        flip = nflip;
        unflip = nunflip;
    }
    return myself.getPoints();
}

private String action() {
    int next = simRotateNext();
    int prev = simRotatePrev();

    if (next > 0 || prev > 0){
        if (next > prev){
            rotateNext();
            return "T";
        } else {
            rotatePrev();
            return "R";
        }
    }

    if (myself.getUnflip() > 3){
        myself.unflip -= 3;
        myself.points += 3;
        return "C";
    }

    if (myself.getUnflip() > 0){
        myself.unflip -= 1;
        myself.points += 2;
        return "F";
    }

    if (myself.getPoints() > otherMaxPoints){
        return "N";
    } else {
        myself.unflip += 3;
        myself.points -= 3;
        return "3";
    }

}

private void parse(String s){
    String[] ps = s.split(";");
    round = Integer.parseInt(ps[0]);
    myself.setId(Integer.parseInt(ps[1]));
    coins = round = Integer.parseInt(ps[2]);
    for (int i = 3; i < ps.length; i++){
        String[] sp2 = ps[i].split("_");
        if (Integer.parseInt(sp2[0]) == myself.getId()){
            myself.setPoints(Integer.parseInt(sp2[1]));
            myself.setFlip(Integer.parseInt(sp2[2]));
            myself.setUnflip(Integer.parseInt(sp2[3]));
            players.add(myself);
        } else {
            Player p = new Player();
            p.setId(Integer.parseInt(sp2[0]));
            p.setPoints(Integer.parseInt(sp2[1]));
            p.setFlip(Integer.parseInt(sp2[2]));
            p.setUnflip(Integer.parseInt(sp2[3]));
            players.add(p);
            if (p.getPoints() > otherMaxPoints){
                otherMaxPoints = p.getPoints();
            }
        }
    }
}
}

To run: Just add it to the same folder as the default bots and then create the following class
package players;

import controller.Player;

public class TraderBot extends Player {

    @Override
    public String getCmd() {
        return "java TraderBot";
    }
}

Then add that class to the Player[] players array.

Wheeler
Wheeler calculated the best possible move for it when rotating the coins.
import java.util.ArrayList;
import java.util.List;

public class Wheeler {

String[] actions = {"TTT", "TTR", "TRR", "TRT", "RRR", "RRT", "RTR", "RTT"};
String paramString;

class Player{
    private int id;
    private int points;
    private int flip;
    private int unflip;

    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    public int getPoints() {
        return points;
    }
    public void setPoints(int points) {
        this.points = points;
    }
    public int getFlip() {
        return flip;
    }
    public void setFlip(int flip) {
        this.flip = flip;
    }
    public int getUnflip() {
        return unflip;
    }
    public void setUnflip(int unflip) {
        this.unflip = unflip;
    }
    @Override
    public String toString() {
        return "Player [id=" + id + ", points=" + points + ", flip=" + flip + ", unflip=" + unflip + "]";
    }

}

int round;
int coins;
int otherMaxPoints = 0;
Player myself = new Player();
List<Player> players = new ArrayList<>();

public static void main (String[] s){
    new Wheeler().play(s);
}

private void play(String[] s){
    paramString = s[0];
    reset();
    System.out.println(action());
}

private int rotateNext(){
    int flip, unflip, nflip, nunflip;
    flip = players.get(0).getFlip();
    unflip = players.get(0).getUnflip();
    for (int i = 0; i < players.size(); i++){
        int next = i + 1 <= players.size() - 1 ? i + 1 : 0;
        nflip = players.get(next).getFlip();
        nunflip = players.get(next).getUnflip();
        players.get(next).setFlip(flip);
        players.get(next).setUnflip(unflip);
        players.get(next).setPoints(players.get(next).getPoints() + 2 * flip - unflip);
        flip = nflip;
        unflip = nunflip;
    }
    return myself.getPoints();
}

private int rotatePrev(){
    int flip, unflip,  nflip, nunflip;
    flip = players.get(players.size() -1).getFlip();
    unflip = players.get(players.size() -1).getUnflip();
    for (int i = players.size() -1; i > 0; i--){
        int prev = i - 1 >= 0 ? i - 1 : players.size() - 1;
        nflip = players.get(prev).getFlip();
        nunflip = players.get(prev).getUnflip();
        players.get(prev).setFlip(flip);
        players.get(prev).setUnflip(unflip);
        players.get(prev).setPoints(players.get(prev).getPoints() + 2 * flip - unflip);
        flip = nflip;
        unflip = nunflip;
    }
    return myself.getPoints();
}

private String action() {
    int maxPoints = myself.getPoints();
    String action = "1F2";
    for (String s : actions){
        int cPoints = 0;
        for (char c : s.toCharArray()){
            if (c == 'T'){
                cPoints += rotateNext();
            } else {
                cPoints += rotatePrev();
            }
        }
        if (cPoints > maxPoints){
            action = s;
        }
        reset();
    }
    return action;
}

private void reset(){
    players = new ArrayList<>();
    String[] ps = paramString.split(";");
    round = Integer.parseInt(ps[0]);
    myself.setId(Integer.parseInt(ps[1]));
    coins = round = Integer.parseInt(ps[2]);
    for (int i = 3; i < ps.length; i++){
        String[] sp2 = ps[i].split("_");
        if (Integer.parseInt(sp2[0]) == myself.getId()){
            myself.setPoints(Integer.parseInt(sp2[1]));
            myself.setFlip(Integer.parseInt(sp2[2]));
            myself.setUnflip(Integer.parseInt(sp2[3]));
            players.add(myself);
        } else {
            Player p = new Player();
            p.setId(Integer.parseInt(sp2[0]));
            p.setPoints(Integer.parseInt(sp2[1]));
            p.setFlip(Integer.parseInt(sp2[2]));
            p.setUnflip(Integer.parseInt(sp2[3]));
            players.add(p);
            if (p.getPoints() > otherMaxPoints){
                otherMaxPoints = p.getPoints();
            }
        }
    }
}

}

SecondBest, Python 3
This program will go through all possible 3 move combinations and choose the second-best one.
Because if you have the perfect move, it's probably a trap.
Edit: removed commented-out input
import sys
from copy import deepcopy
from random import randint
In=str(sys.argv[1])
def V(n,f=10,t=14):
 n=str(n);z=0;s='';d='0123456789';d1='N123ABCXYZRTFU'
 for i in n:z=z*f+d.index(i)
 while z:z,m=divmod(z,t);s=d1[m]+s
 while len(s)<3:s='N'+s
 return s
In=In.split(';')
number=In[0:3]
players=In[3:]
for x in range(0,len(players)):players[x]=players[x].split('_')
for x in players:
 if number[1] in x[0]:self=x
for x in range(0,len(players)):
 for y in range(0,len(players[x])):
  players[x][y]=int(players[x][y])
for x in range(0,len(number)):number[x]=int(number[x])
Pos=list(map(V,range(0,14**3)))
B=[]
C=[]
P1=deepcopy(players)
N1=deepcopy(number)
for x in range(len(Pos)):
    P=True
    y=Pos[x]
    if '1A'in y or '2B'in y or '3C'in y or 'FU'in y or 'A1'in y or 'B2'in y or 'C3'in y or 'UF'in y:
            P=False#stupid check
    if P:#legality check
        z=0
        players=deepcopy(P1)
        number=deepcopy(N1)
        for x in players:
            if str(number[1]) in str(x[0]):self=x
        for w in range(0,3):
            if y[w] in '3':
                if int(number[2])<3:P=False;break
                else:z-=3;self[3]+=3;number[2]-=3
            if y[w] in '2':
                if int(number[2])<2:P=False;break
                else:z-=2;self[3]+=2;number[2]-=2
            if y[w] in '1':
                if int(number[2])<1:P=False;break
                else:z-=1;self[3]+=1;number[2]-=1
            if y[w] in 'A':
                if int(self[3])<1:P=False;break
                else:z+=1;self[3]-=3;number[2]+=3
            if y[w] in 'B':
                if int(self[3])<2:P=False;break
                else:z+=2;self[3]-=2;number[2]+=2
            if y[w] in 'C':
                if int(self[3])<3:P=False;break
                else:z+=3;self[3]-=1;number[2]+=1
            if y[w] in 'X':
                if int(self[3])<1:P=False;break
                else:self[3]-=1
            if y[w] in 'Y':
                if int(self[3])<2:P=False;break
                else:self[3]-=2
            if y[w] in 'Z':
                if int(self[3])<3:P=False;break
                else:self[3]-=3
            if y[w] in 'F':
                if int(self[3])<1:P=False;break
                else:z+=2;self[3]-=1;self[2]+=1
            if y[w] in 'U':
                if int(self[3])<1:P=False;break
                else:z-=2;self[3]+=1;self[2]-=1
            if y[w] in 'R':
                self[2:4]=players[(players.index(self)+1)%len(players)][2:4]
                z+=int(self[3])*-1
                z+=int(self[2])*2
            if y[w] in 'T':
                self[2:4]=players[(players.index(self)-1)%len(players)][2:4]
                z+=int(self[3])*-1
                z+=int(self[2])*2
    if P:
        C.append(z);B.append((z,y))
c=list(set(C))
c.sort()
c=c[::-1][1];D=[]
for x in B:
    if c in x:D.append(x)
print(D[randint(0,len(D)-1)][1])

Edit: The code was printing a random legal move. It should now be returning the second best result.

Saboteur, Python 2
import random
moves = '3R'
print '33' + ''.join(random.choice(moves))

The randomness means it probably won't sabotage very well, but later I think I'll have it wait til the 'end' (how many turns/coins are left) and THEN rotate, after looking at the nearby reachable players to steal from... actually only doing one rotation seems really poor, considering other people are also likely to use rotations. I don't think this'll work very well...

The thing this one does most is run the coin pile out. as well as give himself and others a lot of negative points.

@MegaTom Yeah, I did think that would be a side effect, I kind of glazed over the formula for total coins I guess. I could make it a random number. And on the negative points, giving others negative points is just another way to win!

You don't need the sys import. :P

Devil's Bot
Although its output is only half the devil's number, the results should be quite disastrous. Taking 9 coins each turn, it eventually exhausts the pile of coins. Since this bot never flips any of the coins it takes, it is extremely bad for anyone else sitting next to it when there is a rotation (-9 points for each turn taken by this bot).
print("333")

Command: python3 devil.py
I hope to make some real bots later on.

@plannapus Whoops! I didn't notice that one. Thanks for telling me!

Remember Me, Python 3
This program contains a significant amount of inbuilt data from a test against the fixed SecondBest bot.
It should learn about what moves are the best to use, but it does not use other players' input.
Edit: removed unnecessary point calculation
Edit: uncommented player input
import sys
file=sys.argv[0].split('\\')[::-1][0]
from copy import deepcopy
from random import randint
In=str(sys.argv[1])
def V(n,f=10,t=14):
 n=str(n);z=0;s='';d='0123456789';d1='N123ABCXYZRTFU'
 for i in n:z=z*f+d.index(i)
 while z:z,m=divmod(z,t);s=d1[m]+s
 while len(s)<3:s='N'+s
 return s
In=In.split(';')
number=In[0:3]
players=In[3:]
for x in range(0,len(players)):players[x]=players[x].split('_')
for x in players:
 if number[1] in x[0]:self=x
for x in range(0,len(players)):
 for y in range(0,len(players[x])):
  players[x][y]=int(players[x][y])
for x in range(0,len(number)):number[x]=int(number[x])
Pos=list(map(V,range(0,14**3)))
B=[]
P1=deepcopy(players)
N1=deepcopy(number)
for x in range(len(Pos)):
    P=True
    y=Pos[x]
    if '1A'in y or '2B'in y or '3C'in y or 'FU'in y or 'A1'in y or 'B2'in y or 'C3'in y or 'UF'in y:
            P=False
    if P:
        players=deepcopy(P1)
        number=deepcopy(N1)
        for x in players:
            if str(number[1]) in str(x[0]):self=x
        for w in range(0,3):
            if y[w] in '3':
                if int(number[2])<3:P=False;break
                else:self[3]+=3;number[2]-=3
            if y[w] in '2':
                if int(number[2])<2:P=False;break
                else:self[3]+=2;number[2]-=2
            if y[w] in '1':
                if int(number[2])<1:P=False;break
                else:self[3]+=1;number[2]-=1
            if y[w] in 'A':
                if int(self[3])<1:P=False;break
                else:self[3]-=3;number[2]+=3
            if y[w] in 'B':
                if int(self[3])<2:P=False;break
                else:self[3]-=2;number[2]+=2
            if y[w] in 'C':
                if int(self[3])<3:P=False;break
                else:self[3]-=1;number[2]+=1
            if y[w] in 'X':
                if int(self[3])<1:P=False;break
                else:self[3]-=1
            if y[w] in 'Y':
                if int(self[3])<2:P=False;break
                else:self[3]-=2
            if y[w] in 'Z':
                if int(self[3])<3:P=False;break
                else:self[3]-=3
            if y[w] in 'F':
                if int(self[3])<1:P=False;break
                else:self[3]-=1;self[2]+=1
            if y[w] in 'U':
                if int(self[3])<1:P=False;break
                else:self[3]+=1;self[2]-=1
            if y[w] in 'R':
                self[2:4]=players[(players.index(self)+1)%len(players)][2:4]
            if y[w] in 'T':
                self[2:4]=players[(players.index(self)-1)%len(players)][2:4]
    if P:
        B.append(y)
Pos=list(B)
B=[]
#
C=[['NNN',0],['NN1',-1],['NN2',-2],['NN3',-3],['NNR',-6],['NNT',-1],['N1N',-1],['N11',-2],['N12',-3],['N13',-4],['N1X',-1],['N1R',-7],['N1T',-2],['N1F',1],['N1U',-3],['N2N',-2],['N21',-3],['N22',-4],['N23',-5],['N2A',-1],['N2X',-2],['N2Y',-2],['N2R',-8],['N2T',-3],['N2F',0],['N2U',-4],['N3N',-3],['N31',-4],['N32',-5],['N33',-6],['N3A',-2],['N3B',-1],['N3X',-3],['N3Y',-3],['N3Z',-3],['N3R',-9],['N3T',-4],['N3F',-1],['N3U',-5],['NRN',-6],['NR1',-7],['NR2',-8],['NR3',-9],['NRA',-5],['NRB',-4],['NRC',-3],['NRX',-6],['NRY',-6],['NRZ',-6],['NRR',-12],['NRT',-7],['NRF',-4],['NRU',-8],['NTN',-1],['NT1',-2],['NT2',-3],['NT3',-4],['NTA',0],['NTX',-1],['NTR',-7],['NTT',-2],['NTF',1],['NTU',-3],['1NN',-1],['1N1',-2],['1N2',-3],['1N3',-4],['1NA',0],['1NX',-1],['1NR',-7],['1NT',-2],['1NF',1],['1NU',-3],['11N',-2],['111',-3],['112',-4],['113',-5],['11B',0],['11X',-2],['11Y',-2],['11R',-8],['11T',-3],['11F',0],['11U',-4],['12N',-3],['121',-4],['122',-5],['123',-6],['12A',-2],['12C',0],['12X',-3],['12Y',-3],['12Z',-3],['12R',-9],['12T',-4],['12F',-1],['12U',-5],['13N',-4],['131',-5],['132',-6],['133',-7],['13A',-3],['13B',-2],['13X',-4],['13Y',-4],['13Z',-4],['13R',-10],['13T',-5],['13F',-2],['13U',-6],['1XN',-1],['1X1',-2],['1X2',-3],['1X3',-4],['1XR',-7],['1XT',-2],['1RN',-7],['1R1',-8],['1R2',-9],['1R3',-10],['1RA',-6],['1RB',-5],['1RC',-4],['1RX',-7],['1RY',-7],['1RZ',-7],['1RR',-13],['1RT',-8],['1RF',-5],['1RU',-9],['1TN',-2],['1T1',-3],['1T2',-4],['1T3',-5],['1TA',-1],['1TX',-2],['1TR',-8],['1TT',-3],['1TF',0],['1TU',-4],['1FN',1],['1F1',0],['1F2',-1],['1F3',-2],['1FR',-5],['1FT',0],['1UN',-3],['1U1',-4],['1U2',-5],['1U3',-6],['1UA',-2],['1UB',-1],['1UX',-3],['1UY',-3],['1UR',-9],['1UT',-4],['1UU',-5],['2NN',-2],['2N1',-3],['2N2',-4],['2N3',-5],['2NA',-1],['2NB',0],['2NX',-2],['2NY',-2],['2NR',-8],['2NT',-3],['2NF',0],['2NU',-4],['21N',-3],['211',-4],['212',-5],['213',-6],['21B',-1],['21C',0],['21X',-3],['21Y',-3],['21Z',-3],['21R',-9],['21T',-4],['21F',-1],['21U',-5],['22N',-4],['221',-5],['222',-6],['223',-7],['22A',-3],['22C',-1],['22X',-4],['22Y',-4],['22Z',-4],['22R',-10],['22T',-5],['22F',-2],['22U',-6],['23N',-5],['231',-6],['232',-7],['233',-8],['23A',-4],['23B',-3],['23X',-5],['23Y',-5],['23Z',-5],['23R',-11],['23T',-6],['23F',-3],['23U',-7],['2AN',-1],['2A2',-3],['2A3',-4],['2AR',-7],['2AT',-2],['2XN',-2],['2X1',-3],['2X2',-4],['2X3',-5],['2XA',-1],['2XX',-2],['2XR',-8],['2XT',-3],['2XF',0],['2XU',-4],['2YN',-2],['2Y1',-3],['2Y2',-4],['2Y3',-5],['2YR',-8],['2YT',-3],['2RN',-8],['2R1',-9],['2R2',-10],['2R3',-11],['2RA',-7],['2RB',-6],['2RC',-5],['2RX',-8],['2RY',-8],['2RZ',-8],['2RR',-14],['2RT',-9],['2RF',-6],['2RU',-10],['2TN',-3],['2T1',-4],['2T2',-5],['2T3',-6],['2TA',-2],['2TX',-3],['2TR',-9],['2TT',-4],['2TF',-1],['2TU',-5],['2FN',0],['2F1',-1],['2F2',-2],['2F3',-3],['2FA',1],['2FX',0],['2FR',-6],['2FT',-1],['2FF',2],['2UN',-4],['2U1',-5],['2U2',-6],['2U3',-7],['2UA',-3],['2UB',-2],['2UC',-1],['2UX',-4],['2UY',-4],['2UZ',-4],['2UR',-10],['2UT',-5],['2UU',-6],['3NN',-3],['3N1',-4],['3N2',-5],['3N3',-6],['3NA',-2],['3NB',-1],['3NC',0],['3NX',-3],['3NY',-3],['3NZ',-3],['3NR',-9],['3NT',-4],['3NF',-1],['3NU',-5],['31N',-4],['311',-5],['312',-6],['313',-7],['31B',-2],['31C',-1],['31X',-4],['31Y',-4],['31Z',-4],['31R',-10],['31T',-5],['31F',-2],['31U',-6],['32N',-5],['321',-6],['322',-7],['323',-8],['32A',-4],['32C',-2],['32X',-5],['32Y',-5],['32Z',-5],['32R',-11],['32T',-6],['32F',-3],['32U',-7],['33N',-6],['331',-7],['332',-8],['333',-9],['33A',-5],['33B',-4],['33X',-6],['33Y',-6],['33Z',-6],['33R',-12],['33T',-7],['33F',-4],['33U',-8],['3AN',-2],['3A2',-4],['3A3',-5],['3AR',-8],['3AT',-3],['3BN',-1],['3B1',-2],['3B3',-4],['3BA',0],['3BX',-1],['3BR',-7],['3BT',-2],['3BF',1],['3BU',-3],['3XN',-3],['3X1',-4],['3X2',-5],['3X3',-6],['3XA',-2],['3XB',-1],['3XX',-3],['3XY',-3],['3XR',-9],['3XT',-4],['3XF',-1],['3XU',-5],['3YN',-3],['3Y1',-4],['3Y2',-5],['3Y3',-6],['3YA',-2],['3YX',-3],['3YR',-9],['3YT',-4],['3YF',-1],['3YU',-5],['3ZN',-3],['3Z1',-4],['3Z2',-5],['3Z3',-6],['3ZR',-9],['3ZT',-4],['3RN',-9],['3R1',-10],['3R2',-11],['3R3',-12],['3RA',-8],['3RB',-7],['3RC',-6],['3RX',-9],['3RY',-9],['3RZ',-9],['3RR',-15],['3RT',-10],['3RF',-7],['3RU',-11],['3TN',-4],['3T1',-5],['3T2',-6],['3T3',-7],['3TA',-3],['3TX',-4],['3TR',-10],['3TT',-5],['3TF',-2],['3TU',-6],['3FN',-1],['3F1',-2],['3F2',-3],['3F3',-4],['3FA',0],['3FB',1],['3FX',-1],['3FY',-1],['3FR',-7],['3FT',-2],['3FF',1],['3UN',-5],['3U1',-6],['3U2',-7],['3U3',-8],['3UA',-4],['3UB',-3],['3UC',-2],['3UX',-5],['3UY',-5],['3UZ',-5],['3UR',-11],['3UT',-6],['3UU',-7],['RNN',-6],['RN1',-7],['RN2',-8],['RN3',-9],['RNA',-5],['RNB',-4],['RNC',-3],['RNX',-6],['RNY',-6],['RNZ',-6],['RNR',-12],['RNT',-7],['RNF',-4],['RNU',-8],['R1N',-7],['R11',-8],['R12',-9],['R13',-10],['R1B',-5],['R1C',-4],['R1X',-7],['R1Y',-7],['R1Z',-7],['R1R',-13],['R1T',-8],['R1F',-5],['R1U',-9],['R2N',-8],['R21',-9],['R22',-10],['R23',-11],['R2A',-7],['R2C',-5],['R2X',-8],['R2Y',-8],['R2Z',-8],['R2R',-14],['R2T',-9],['R2F',-6],['R2U',-10],['R3N',-9],['R31',-10],['R32',-11],['R33',-12],['R3A',-8],['R3B',-7],['R3X',-9],['R3Y',-9],['R3Z',-9],['R3R',-15],['R3T',-10],['R3F',-7],['R3U',-11],['RAN',-5],['RA2',-7],['RA3',-8],['RAA',-4],['RAB',-3],['RAC',-2],['RAX',-5],['RAY',-5],['RAZ',-5],['RAR',-11],['RAT',-6],['RAF',-3],['RAU',-7],['RBN',-4],['RB1',-5],['RB3',-7],['RBA',-3],['RBB',-2],['RBC',-1],['RBX',-4],['RBY',-4],['RBZ',-4],['RBR',-10],['RBT',-5],['RBF',-2],['RBU',-6],['RCN',-3],['RC1',-4],['RC2',-5],['RCA',-2],['RCB',-1],['RCC',0],['RCX',-3],['RCY',-3],['RCZ',-3],['RCR',-9],['RCT',-4],['RCF',-1],['RCU',-5],['RXN',-6],['RX1',-7],['RX2',-8],['RX3',-9],['RXA',-5],['RXB',-4],['RXC',-3],['RXX',-6],['RXY',-6],['RXZ',-6],['RXR',-12],['RXT',-7],['RXF',-4],['RXU',-8],['RYN',-6],['RY1',-7],['RY2',-8],['RY3',-9],['RYA',-5],['RYB',-4],['RYC',-3],['RYX',-6],['RYY',-6],['RYZ',-6],['RYR',-12],['RYT',-7],['RYF',-4],['RYU',-8],['RZN',-6],['RZ1',-7],['RZ2',-8],['RZ3',-9],['RZA',-5],['RZB',-4],['RZC',-3],['RZX',-6],['RZY',-6],['RZZ',-6],['RZR',-12],['RZT',-7],['RZF',-4],['RZU',-8],['RRN',-12],['RR1',-13],['RR2',-14],['RR3',-15],['RRA',-11],['RRB',-10],['RRC',-9],['RRX',-12],['RRY',-12],['RRZ',-12],['RRR',-18],['RRT',-13],['RRF',-10],['RRU',-14],['RTN',-7],['RT1',-8],['RT2',-9],['RT3',-10],['RTA',-6],['RTX',-7],['RTR',-13],['RTT',-8],['RTF',-5],['RTU',-9],['RFN',-4],['RF1',-5],['RF2',-6],['RF3',-7],['RFA',-3],['RFB',-2],['RFC',-1],['RFX',-4],['RFY',-4],['RFZ',-4],['RFR',-10],['RFT',-5],['RFF',-2],['RUN',-8],['RU1',-9],['RU2',-10],['RU3',-11],['RUA',-7],['RUB',-6],['RUC',-5],['RUX',-8],['RUY',-8],['RUZ',-8],['RUR',-14],['RUT',-9],['RUU',-10],['TNN',-1],['TN1',-2],['TN2',-3],['TN3',-4],['TNA',0],['TNX',-1],['TNR',-7],['TNT',-2],['TNF',1],['TNU',-3],['T1N',-2],['T11',-3],['T12',-4],['T13',-5],['T1B',0],['T1X',-2],['T1Y',-2],['T1R',-8],['T1T',-3],['T1F',0],['T1U',-4],['T2N',-3],['T21',-4],['T22',-5],['T23',-6],['T2A',-2],['T2C',0],['T2X',-3],['T2Y',-3],['T2Z',-3],['T2R',-9],['T2T',-4],['T2F',-1],['T2U',-5],['T3N',-4],['T31',-5],['T32',-6],['T33',-7],['T3A',-3],['T3B',-2],['T3X',-4],['T3Y',-4],['T3Z',-4],['T3R',-10],['T3T',-5],['T3F',-2],['T3U',-6],['TAN',0],['TA2',-2],['TA3',-3],['TAR',-6],['TAT',-1],['TXN',-1],['TX1',-2],['TX2',-3],['TX3',-4],['TXR',-7],['TXT',-2],['TRN',-7],['TR1',-8],['TR2',-9],['TR3',-10],['TRA',-6],['TRB',-5],['TRC',-4],['TRX',-7],['TRY',-7],['TRZ',-7],['TRR',-13],['TRT',-8],['TRF',-5],['TRU',-9],['TTN',-2],['TT1',-3],['TT2',-4],['TT3',-5],['TTA',-1],['TTX',-2],['TTR',-8],['TTT',-3],['TTF',0],['TTU',-4],['TFN',1],['TF1',0],['TF2',-1],['TF3',-2],['TFR',-5],['TFT',0],['TUN',-3],['TU1',-4],['TU2',-5],['TU3',-6],['TUA',-2],['TUB',-1],['TUX',-3],['TUY',-3],['TUR',-9],['TUT',-4],['TUU',-5]]
#
points=0
#
dpoints=self[1]-points
z=0
for x in range(len(Pos)):
    y=Pos[x]
    z=0
    for x in C:
     if x[0]==y:z=x[1]
    B.append((z,y))
B.sort()
B=B[::-1]
G=open(file,'r')
H=G.read().split('#')[::-1]
G.close()
G=open(file,'w')
H[3]=H[3].replace(H[3][8:-1],str(self[1]))
J=eval(H[4][3:-1])
A=[B[0][1],dpoints]
P=1
for x in range(0,len(J)):
 if J[x][0]==A[0]:J[x][1]+=A[1];P=0
if P:J.append(A)
H[4]='\nC='+str(J)+'\n'
s=''
for x in H[::-1]:s+=x;s+='#'
G.write(s[:-1])
G.close()
print(B[0][1])

I think you have the input commented in the line #5

It should be fixed now. Thanks for pointing it out.


text:
Encrypting and Decrypting Challenge
Encrypting Challenge
Your encrypting program must be able to do following things:

Input password
Generate random key
Encrypt random key with set key
Then, the decrypting program must be able to these things:
Input encrypted password
Input encrypted random key
Decrypt random key
Decrypt password with decrypted random key
Print password

The encryption must be setted with the key. It must be a table encryption or a encryption which makes the unencrypted values  to a part of the key.
This is code-golf. The shortest program wins!

I voted to close as unclear what you're asking, because I'm not even sure what the inputs are for all of the mentioned use cases. However, you also need to narrow down the spec to avoid the question being closed as too broad. What counts as "encrypted".

encrypt=(p,k)=>p+k; decrypt=(p,k)=>p.substring(0,p.indexOf(k)); Best encryption method ever! Very secure! Jokes aside, you should probably specify what kind of encryption method should be used, or restrict to a set of methods. As it is, this challenge is too broad to produce fair results

I see you've tried to clarify the challenge a bit with your recent edit, but I'm still not sure what counts as "encryption" here. There's a lot of ways to encrypt something, some good, many bad (e.g. Bas' example), so unfortunately the question is still quite broad as is...

It doesn't matter which kind of encryption you choose, it may be Casear, BASE64... Just take any encryption.

...so, double ROT-13 is fair game?

Function(s) or complete program? If a complete program, what should be the command-line? If any cypher is allowed, I choose the null cypher: the plaintext is passed as-is to the cyphertext, ignoring the password. Please set the encryption method.

@MegaMan Base64 is not an encryption method.

Didn't know it, but when I think about it...

Pyth, 16+16 = 32 bytes
Encryption:
s@LG+VxLGQxLG*zl

Try it online!
Decryption:
s@LG-VxLGQxLG*zl

Try it online!
Uses Vigenère cipher.

source: Stack Exchange

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

sort: votes


text:
Reverse a 1-dimensional array
Note: This challenge is not the same.
Challenge
Believe it or not, we haven't got ONE challenge for reversing one-dimensional arrays (although we've got one for n-dimensional ones)! This should operate only on the 1st dimension, not on all dimensions of an array.
Rules

Standard loopholes are denied
[[1, 2], [3, 4]] becomes [[3, 4], [1, 2]], not [[4, 3], [2, 1]].
This is code-golf, but no answer is accepted. Go beat the others!
You can get the array any way, except hardcoding. You can also get a string and process it.
The input will be an array (yes, commas or no commas, it needs to be an array).

Test cases
These are the test cases:
[1, 2, 3, 4]
[1, 2, 'hello', 'world!']
[[1, 2, 3, 4], [2, 3, 4, 1]]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]

These are the supposed results:
[4, 3, 2, 1]
['world!', 'hello', 2, 1]
[[2, 3, 4, 1], [1, 2, 3, 4]]
[23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]

You may accept input as [1 2 3 4], or even 1 2 3 4, or any other form or array your language has.

The empty array and a single-element array would probably be good test cases.

I'm not a huge fan of the very rigid input format. You've chosen one specific way languages denote arrays which gives an arbitrary benefit to all languages using this syntax. Other languages might not use , as separators (but only spaces), or use ; instead, and some might use () or {} instead of []. On top of that, many languages don't support arrays of mixed type, or strings at all. It's normally a good idea to allow people to take the array in the most natural form for their language.

"Believe it or not, we haven't got ONE challenge for reversing one-dimensional arrays" Probably because it's extremely trivial. One byte in both Pyth and Jelly.

@Doorknob I don't think simple challenges are a problem. But since they are only interesting in languages which don't have built-ins for them (i.e. esolangs in this case), it's a bit pointless to pose a simple challenge without making it as inclusive for all languages as possible.

Do we need to take input as a string, or an array? Some of the specifications you list look like you want strings, but none of the active answers do it that way.

@Doorknob And it would be one byte in Vitsy, save for the rigid input format.

@MartinBüttner Well, that IS the challenge! (replying to very rigid input format comment)

@ΈρικΚωνσταντόπουλος That's also why the challenge is so unpopular: if you want to make a challenge about string processing, make a challenge about string processing. But making a challenge that is seemingly about reversing an array, but then is dominated by string processing in arbitrary set of languages (while it can be solved with a single built-in in languages that get the string processing for free because the format happens to match their syntax), is mostly not in the spirit of this community.

@MartinBüttner I have specified that both arrays and strings are allowed.

But we still have the strict output format.

@CatsAreFluffy I don't see anywhere that we are supposed to output to stdout, even less that there's a strict output format.

See the Molecule answer.

@CatsAreFluffy if this is only in a comment on a submission, you can practically ignore it, as it isn't in the specs

@CatsAreFluffy I changed output format, although I didn't like that change at all.

Jelly, 1 byte
Ṛ

Try it online! It reverses an array. (yay this is my first Jelly answer!)

Oh, there is a flat version of U? I've always been using U'...

Pyth, 2 1 bytes
1 byte off thanks to Doorknob
_

_ is reverse, and Pyth takes implicit input. Yes, my first Pyth answer is an underscore.

All of a sudden, +2! Yay! (Maybe my username change...)

Python 2, 8 bytes
reversed

This is too short.

reversed is the name for a built in function in python that takes an iterable and reverses it.

I think this returns an iterable, not an array.

@EriktheGolfer Where does it say the output has to be an array

, 3 bytes
ᴚ

Literally reverses array. Implicitly performs I/O.

Python 3, 16 bytes
lambda x:x[::-1]

This isn't even enough characters to post as an answer.

Clever! 8 more to go...

C, 65 bytes
Takes a pointer to the start of the list and a list length.
void f(int*a,int s){int t=*a;*a=a[--s];a[s--]=t;if(s>1)f(a+1,s);}

This is a recursive algorithm that swaps the first element with the last, and then runs the same function on the middle.
Ungolfed:
void f(int* a, int s){
  int t = a[0];
  a[0] = a[--s];
  a[s--] = t;
  if(s > 1){
    f(a + 1, s - 2);
  }
}

Python 2, 19 bytes
print input()[::-1]

Hold on... doesn't python 2 have 'raw_input()' instead of 'input()'?

@TuukkaX Yes, but that returns a string. In python 2, input() is equivalent to eval(input()) meaning it returns a list instead of a string in this instance. Python 3 is significantly longer: print(eval(input()[::-1])) (26 chars)

@DrGreenEggsandHamDJ Oh. Thanks for telling O.o!

@DrGreenEggsandHamDJ We count in bytes, not chars, tho.

05AB1E, 1 byte
Code:
R

Try it online!.

Brachylog, 2 bytes
r.

which expects a list as Input and unifies the reverse with the Output.
Alternative
rw

which expects a list as Input and writes the reverse to STDOUT.

@Downvoter any reason why this answer is less interesting than all others?

That guy seems to have down voted every answer.

@CatsAreFluffy well that's interesting…

@CatsAreFluffy Except possibly the OP's answer. I checked before and after, but I can't be sure because I don't have 750 rep.

Nope, that's downvoted too.

The only non-downvoted one from May 2 is the Jelly answer...

Java 8, 62 38 30 bytes
java.util.Collections::reverse

Modifies the input-ArrayList instead of returning a new one to save bytes.
-8 bytes thanks to @OliverGrégoire.
Try it here.

With an array as input instead of ArrayList (62 bytes):
import java.util.*;a->{Collections.reverse(Arrays.asList(a));}

Modifies the input-array instead of returning a new one to save bytes.
Try it here.

Looping over the array to reverse it would be 75 69 bytes instead:
a->{Object t;for(int i=0,j=a.length;i<--j;a[i++]=a[j],a[j]=t)t=a[i];}

Try it here.
-5 bytes thanks to @OliverGrégoire.

71 bytes for the loop.

@OlivierGrégoire 69 you mean: a->{Object t;for(int s=0,e=a.length;s<--e;a[s++]=a[e],a[e]=t)t=a[s];} ;) But thanks

Yes, I don't know where my mind was. Sorry... Also, for the api-answer, java.util.Collections::reverse (30 bytes) should be enough, because a list is an array, conceptually speaking.

@OlivierGrégoire Yeah, I had l->{java.util.Collections.reverse(l);} at first, but "The input will be an array (yes, commas or no commas, it needs to be an array)." sounded like I couldn't use a List. But I now realize he means it must be an array/list/set/etc. and cannot be a String.

Ruby, 14 bytes
you can't get simpler than this:
->a{a.reverse}

If you want more idiomatic Ruby, a.method:reverse is only two bytes longer.

JavaScript ES6, 14 bytes
x=>x.reverse()

Simple enough. Anonymous lambda that reverses an array.

Couldn't you do x.reverse as well? It returns a function object which, when called, returns the reversed version of x, which is exactly what this one does.

@QPaysTaxes Nope. x.reverse is the general method inherited from the Array prototype. For you solution to work, we'd have to re-bind it to the original instance, as x=>x.reverse.bind(x)

Oh, I see. Darn, that'd have saved a few bytes.

Actually, 1 byte
R

Reverses the input list. These are words to make this answer long enough.

SmileBASIC, 34 bytes
DEF R A
DIM T[LEN(A)]RSORT T,A
END

RSORT actually just sorts the arrays, and then reverses them.
Cheating answer: (requires turning the screen upside down):
LINPUT S$ATTR 2?S$

Python 3, 12 bytes
list.reverse

Surprised nobody else used this.
Reverses in place, but I don't think there are any restrictions on that.

Jolf, 1 + 1 = 2 bytes
_

Try it here! (bonus for polyglot with Pyth?) _ reverses (negates) an array. (Make sure pretty output is on.)

Why did you add 1?

@msh210 1 byte to ensure the pretty print option is enabled.

Pyke, 1 byte
_

Try it here!
Pyke has implicit input and output. Polyglot with Pyth, Jolf,

Perl 5, 11 bytes
A subroutine:
{reverse@_}

Keg, 1 byte
Nothing interesting. Keg has a built-in. (Since Keg does not have any other means of representing an array, let's assume the stack is the array (and in fact it is).)
?

Try it online!

Lua, 61 bytes
It beats C! \o/
It simply fill a new table in the reversed order.
function f(g)h={}for i=0,#g do h[#g-i]=g[i+1]end return h end

It could have been done by working on the pointer, suppressing the return statement and the new table definition, but it actually is longer by 2 bytes
function f(g)for i=1,#g/2 do x=#g-i+1g[x],g[i]=g[i],g[x]end end

Python, 16 bytes
lambda l:l[::-1]

Please examine this answer again. I was a bit lazy answering this :P
Thanks to 55749 (J843136028) for suggesting to convert this to a function :)

Molecule, 8 bytes
I"Ar"+`n

Explanation:
I"Ar"+`n
I"Ar"    Read input, append the command (reverse array) as a string.
     +   concatenate the 2 strings
      `n set the program's source code to that new string.

Simple I/O:
Input    | Output
[5 "n"]    [n 5.0]
['n 3]     [3.0 n]

This isn't the correct output format, unfortunately.

yeah, but that's just because this language doesn't do commas between objects while creating arrays.

As much as I'd agree with you, this challenge requires a strict I/o format.

There is no longer a strict input format, I think.

MySQL, 64 bytes
set@=1;select a from(select a,@:=@+1 n from t order by n desc)u;

Tested on 5.6.24.
My first SQL answer; please provide feedback!

PHP, 17 bytes
$r=array_reverse;

call $r($array)
non-built-in version, 53 bytes:
function r($a){while($a)$b[]=array_pop($a);return$b;}

call r($array)
generator for PHP >= 5.5, 45 bytes
function y($a){while($a)yield array_pop($a);}

usage: foreach(y($array)as$v)var_dump($v);

TI-Basic, 16 bytes
seq(Ans(I),I,dim(Ans),1,~1

No built-ins for reversing an array in TI-Basic...

Triangularity, 7 bytes
.).
IER

Try it online!

Dodos, 43 bytes
	main dab
	dab - a
-
	- dip
a
	dot dab
	dot

Try it online!
(the - function subtracts and a is lambda x: [sum(x[1:]), sum(x)]. So dab - a takes the first element of a list)

I think that you could argue you define a function R like this.

Preproc, 279 bytes
#define v(x)Z(Z(Z(Z(Z(x)))))
#define Z(x)Y(Y(Y(Y(Y(x)))))
#define Y(x)X(X(X(X(X(x)))))
#define X(x)e(e(e(e(e(x)))))
#define e(x,...)x
#define d()
#define s(x,y,...)y
#define r(x,y...)i(x,,R d d d d()()()()()(y)x)
#define C,
#define R()r
#define i(x,v...)s d()(C##x v)
v(r e()(I))

Try it online!

Some notes.

Because the language (one pass of the C preprocessor) is not Turing-complete (as far as I know), this can only process arrays up to a fixed size. That can be increased by making v(x) evaluate e(x) more times.
Input on command line, separated with , (please only give non-negative integers)
Output on stdout, separated with spaces.
My first Preproc answer. Golfing suggestions are appreciated.
I would appreciate it if someone explain why do I need 4 nested d.

MathGolf, 1 byte
Nothing interesting. MathGolf has a built-in.
x

Try it online!

APL (Dyalog Unicode), 1 byte
⊖

This works both on lists of lists and proper multi-dimensional arrays.
Try it online!

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

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


text:
Golf Text into DNA
Text to DNA golf
Challenge
Convert input into a DNA output.
Algorithm

Convert text into ASCII code points (e.g. codegolf -> [99, 111, 100, 101, 103, 111, 108, 102])
String the ASCII codes together (e.g. 99111100101103111108102)
Convert to binary (e.g. 10100111111001101001011010001000011001101011011110000110010111111011000000110)
Pad 0s onto the end to make an even number of characters (e.g. 101001111110011010010110100010000110011010110111100001100101111110110000001100)
Replace 00 with A, 01 with C, 10 with G, and 11 with T (e.g. GGCTTGCGGCCGGAGACGCGGTCTGACGCCTTGTAAATA)
Output

Test Cases
codegolf > GGCTTGCGGCCGGAGACGCGGTCTGACGCCTTGTAAATA
ppcg > GGCTAATTGTCGCACTT
} > TTGG (padding)

Specifications

This is code-golf
Your program must accept spaces in input.
Your program must work for codegolf.

I think you should add a test case that requires the padding behaviour. The lazy choice would be } which I believe becomes TTGG.

How large of input do we need to support? 99111100101103111108102 for example is larger than uint-64, so some languages may struggle with bigger conversions.

That is not how you string ASCII codes together if you want to ever be able to decode them again.

@immibis I know.

Jelly, 15 13 bytes
OVBs2UḄị“GCTA

Try it online! or verify all test cases.
How it works
OVBs2UḄị“GCTA    Main link. Argument: s (string)

O                Ordinal; replace each character with its code point.
 V               Eval. This converts the list to a string before evaluating, so it
                 returns the integer that results of concatenating all the digits.
  B              Binary; convert from integer to base 2.
   s2            Split into chunks of length 2.
     U           Upend; reverse the digits of each chunk.
                 Reversing means that we would have to conditionally PREPEND a zero
                 to the last chunk, which makes no difference for base conversion.
      Ḅ          Unbinary; convert each chunk from base 2 to integer.
                 `UḄ' maps:
                     [0, 1   ] -> [1,    0] -> 2
                     [1, 0(?)] -> [0(?), 1] -> 1
                     [1, 1   ] -> [1,    1] -> 3
                     [0, 0(?)] -> [0(?), 0] -> 0
       ị“GCTA    Replace each number by the character at that index.
                 Indexing is 1-based, so the indices are [1, 2, 3, 0].

CJam, 24 23 bytes
Thanks to Dennis for saving 1 byte in a really clever way. :)
l:isi2b2/Wf%2fb"AGCT"f=

Test it here.
Explanation
Very direct implementation of the specification. The only interesting bit is the padding to an even number of zeros (which was actually Dennis's idea). Instead of treating the digits in each pair in the usual order, we make the second bit the most significant one. That means, ending in a single bit is identical to appending a zero to it, which means we don't have to append the zero at all.
l          e# Read input.
:i         e# Convert to character codes.
si         e# Convert to flat string and back to integer.
2b         e# Convert to binary.
2/         e# Split into pairs.
Wf%        e# Reverse each pair.
2fb        e# Convert each pair back from binary, to get a value in [0 1 2 3].
"AGCT"f=   e# Select corresponding letter for each number.

I don't know anything about CJam, but why do you need to reverse each pair? Can you not convert them directly back from binary?

@KevinLau-notKenny Reversing each pair avoids appending zeroes to get an even length. In the reversed pairs, you'd have to prepend zeroes, which doesn't matter for base conversion.

Nice trick! It would probably have saved a ton of bytes on my own solution if I had thought about that trick

Python 2, 109 103 bytes
lambda s,j=''.join:j('ACGT'[int(j(t),2)]for t in
zip(*[iter(bin(int(j(`ord(c)`for c in s))*2)[2:])]*2))

Test it on Ideone.

Ruby, 59 bytes
$_='%b0'.%$_.bytes*''
gsub(/../){:ACGT[$&.hex%7]}
chomp'0'

A full program. Run with the -p flag.

how did you even... i don't understand

Python 3, 130 bytes.
Saved 2 bytes thanks to vaultah.
Saved 6 bytes thanks to Kevin Lau - not Kenny.
I hate how hard it is to convert to binary in python.
def f(x):c=bin(int(''.join(map(str,map(ord,x)))))[2:];return''.join('ACGT'[int(z+y,2)]for z,y in zip(*[iter(c+'0'*(len(c)%2))]*2))

Test cases:
assert f('codegolf') == 'GGCTTGCGGCCGGAGACGCGGTCTGACGCCTTGTAAATA'
assert f('ppcg') == 'GGCTAATTGTCGCACTT'

Looks like you have 1 extra pair of brackets after the second ''.join

@vaultah Oops, yup, you're right.

Use 'ACGT'[int(z+y,2)] instead, converting directly out of binary instead of using your longer string and converting from base 10. Also, unsure how much difference it would make but look at using re.sub instead of your messy join trick?

@KevinLau-notKenny Oooo, thanks. I forgot you can specify a base with int. I'll look into re.sub, thanks for the suggestion.

Nice approach, I came up with (almost) exactly the same code without having looked at yours. :)

Python 3, 126 bytes
lambda v:"".join(["ACGT"[int(x,2)]for x in map(''.join,zip(*[iter((bin(int("".join([str(ord(i))for i in v])))+"0")[2:])]*2))])

Welcome to Programming Puzzles & Code Golf! In case you're wondering about the downvote, this is what happened.

Ruby, 80 bytes
->s{s=s.bytes.join.to_i.to_s 2;s+=?0*(s.size%2)
s.gsub(/../){"ACGT"[$&.to_i 2]}}

As straightforward as the problem is, it's possible to squeeze a lot more bytes out of this :)

Mathematica, 108 bytes
{"A","C","G","T"}[[IntegerDigits[Mod[Floor@Log2@#,2,1]#&@FromDigits[""<>ToString/@ToCharacterCode@#],4]+1]]&

Takes a string as input, and outputs a list of bases.

Vyxal, 17 bytes
Cṅb₅∷[0J]B`ACGT`τ

Try it Online!
A mess.
C                 # Charcodes
 ṅ                # Concatenated
  b               # To binary
   ₅∷[  ]         # If length is odd
      0J          # Append a 0
         B        # To base10
          `ACGT`τ # Convert to custom base `ACGT` (convert to base4, replace 0-3 with corresponding item of "ACGT")

@Shaggy Hmm, it seems to be mixing up C and G sometimes. One moment...l

Python 2.7, 135 bytes
def f(A):g=''.join;B=bin(int(g(map(str,map(ord,A)))))[2:];B+=len(B)%2*'0';return g('ACGT'[int(B[i:i+2],2)] for i in range(len(B))[::2])

Ungolfed:
def f(A):
    g = ''.join
    B = bin(int(g(map(str,map(ord,A)))))[2:] # convert string input to binary
    B += len(B)%2 * '0' # add extra 0 if necessary
    return g('ACGT'[int(B[i:i+2],2)] for i in range(len(B))[::2]) # map every two characters into 'ACGT'

Output
f('codegolf')
'GGCTTGCGGCCGGAGACGCGGTCTGACGCCTTGTAAATA'

@DrGreenEggsandHamDJ I have the g(...) function in there twice, so I believe replacing it with the join would add 2 bytes?

Ah, I missed that. My bad!

Pyth, 25 bytes
sm@"ACGT"id2Pc.B*4sjkCMQ2

Try it here!
Explanation
Burrowing the padding trick from Martins CJam answer.

sm@"ACGT"id2Pc.B*4sjkCMQ2    # Q = input

                     CMQ     # Map each character of Q to its character code
                  sjk        # Join into one string and convert to an integer
              .B*4           # Mulitply with 4 and convert to binary
             c          2    # Split into pairs
            P                # Discard the last pair
 m                           # Map each pair d
         id2                 # Convert pair from binary to decimal
  @"ACGT"                    # Use the result ^ as index into a lookup string
s                            # Join the resulting list into on string

05AB1E, 23 bytes
Code:
SÇJb00«2÷¨C3210"TGCA"‡á

Uses CP-1252 encoding. Try it online!.

Java, 194 bytes
String a(int[]a){String s="",r=s;for(int i:a)s+=i;s=new BigInteger(s).toString(2)+0;for(int i=0,y,n=48;i<(s.length()/2)*2;r+=s.charAt(i++)==n?y==n?'A':'G':y==n?'C':'T')y=s.charAt(i++);return r;}

Ungolfed
String a(int[] a) {
    String s = "", r = s;
    for (int i : a) s += i;
    s = new BigInteger(s).toString(2) + 0;
    for (int i = 0, y, n = 48; i < (s.length() / 2) * 2;
        r += s.charAt(i++) == n
                 ? y == n
                 ? 'A'
                 : 'G'
                 : y == n
                 ? 'C'
                 : 'T')
        y = s.charAt(i++);
    return r;
}

Note

Input is an array of chars (which should count as a form of String), parameter is of type int[] because thats one byte saved over char[].

Output
Input:  codegolf
Output: GGCTTGCGGCCGGAGACGCGGTCTGACGCCTTGTAAATA

Input:  .
Output: GTG

Input:  }
Output: TTGG

Input:  wow
Output: TGATAGTTGTGCTG

Input:  programming puzzles
Output: GTGTCAGAGTTGAAGGCCGTTCCGCAGTGCATTTGGCTCGTCTGGTGTCTACTAGCCTGCGAGAGGAGTTACTTTGGATCCTTGACTTGT

Suggest s.length()/2 instead of (s.length()/2)

MATL, 21 bytes
'CGTA'joV4Y2HZa2e!XB)

Try it online!
Explanation
'CGTA'   % Push string to be indexed into
j        % Take input string
o        % Convert each char to its ASCII code
V        % Convert to string (*). Numbers are separated by spaces
4Y2      % Push the string '0123456789'
H        % Push number 2
Za       % Convert string (*) from base '0123456789' to base 2, ignoring spaces
2e       % Reshape into a 2-column matrix, padding with a trailing 0 if needed
!        % Transpose
XB       % Convert from binary to decimal
)        % Index into string with the DNA letters. Indexing is 1-based and modular

Factor + grouping.extras, 95 bytes
[ [ present ] f map-as concat dec> >bin 2 48 pad-groups 2 group [ bin> "ACGT" nth ] "" map-as ]

Doesn't work on TIO because pad-groups postdates build 1525, the one TIO uses. Here's a picture of running it in build 2101:

There is no build where whitespace can be omitted after strings and pad-groups exists, but pad-groups makes it worth it.
Explanation:
It's a quotation (anonymous function) that accepts a string from the data stack as input and leaves a string on the data stack as output. Assuming "ppcg" is on the data stack when this quotation is called...

Snippet
Output

[ present ] f map-as
{ "112" "112" "99" "103" }

concat
"11211299103"

dec>
11211299103

>bin
"1010011100001111101101100100011111"

2 48 pad-groups
"1010011100001111101101100100011111" (append zeros so length is divisible by 2.)

2 group
{ "10" "10" "01" "11" "00" "00" "11" "11" "10" "11" "01" "10" "01" "00" "01" "11" "11" }

[ bin> ] map
{ 2 2 1 3 0 0 3 3 2 3 1 2 1 0 1 3 3 }

[ "ACGT" nth ] "" map-as
"GGCTAATTGTCGCACTT"

Pyth, 23 bytes
sm@"AGCT"i_d2c.BsjkCMQ2

Try it online!
Explanation
Borrowing the trick from Dennis' Jelly answer.
sm@"AGCT"i_d2c.BsjkCMQ2
                   CMQ   convert each character to its byte value
                sjk      convert to a string and then to integer
              .B         convert to binary
             c        2  chop into pairs
 m         d             for each pair:
          _                  reverse it
         i  2                convert from binary to integer
  @"AGCT"                    find its position in "AGCT"
s                        join the string

Groovy, 114 bytes
{s->'ACGT'[(new BigInteger(((Byte[])s).join())*2).toString(2).toList().collate(2)*.with{0.parseInt(it.join(),2)}]}

Explanation:
{s->
    'ACGT'[ //access character from string
        (new BigInteger( //create Big Integer from string
           ((Byte[])s).join() //split string to bytes and then join to string
        ) * 2) //multiply by 2 to add 0 at the end in binary
        .toString(2) //change to binary string
        .toList() //split to characters
        .collate(2) //group characters by two
        *.with{
            0.parseInt(it.join(),2) //join every group and parse to decimal
        }
     ]
}

Great answer! Can you please add an explanation please?

First version was not working, because I forgot to append 0. I fixed it, and went down with bytes btw.

Julia 0.4, 77 bytes
s->replace(bin(BigInt(join(int(s)))),r"..?",t->"AGCT"[1+int("0b"reverse(t))])

This anonymous function takes a character array as input and returns a string.
Try it online!

J, 52 bytes
 3 :'''ACGT''{~#._2,\#:".,&''x''":(,&:(":"0))/3&u:y'

Usage: 3 :'''ACGT''{~#._2,\#:".,&''x''":(,&:(":"0))/3&u:y' 'codegolf' ==> GGCTTGCGGCCGGAGACGCGGTCTGACGCCTTGTAAATA

Javascript ES7, 105 103 bytes
s=>((+[for(c of s)c.charCodeAt()].join``).toString(2)+'0').match(/../g).map(x=>"ACGT"['0b'+x-0]).join``

The ES7 part is the for(c of s) part.
ES6 version, 107 105 bytes
s=>((+[...s].map(c=>c.charCodeAt()).join``).toString(2)+'0').match(/../g).map(x=>"ACGT"['0b'+x-0]).join``

Ungolfed code
dna = (str)=>{
  var codes = +[for(c of str)c.charCodeAt()].join``;
  var binaries = (codes.toString(2)+'0').match(/../g);
  return binaries.map(x=>"ACGT"['0b'+x-0]).join``
}

This is my first try at golfing on PPCG, feel free to correct me if something's wrong.
Thanks @AlexA for the small improvement.

This is a nice first golf! Since the function isn't recursive and we don't require functions to be named, so you should be able to remove f=, saving 2 bytes. :)

+'0' => +0.

Hoon, 148 138 bytes
|*
*
=+
(scan (reel +< |=({a/@ b/tape} (weld <a> b))) dem)
`tape`(flop (turn (rip 1 (mul - +((mod (met 0 -) 2)))) |=(@ (snag +< "ACGT"))))

"abc" is a list of atoms. Interpolate them into strings (<a>) while folding over the list, joining them together into a new string. Parse the number with ++dem to get it back to an atom.
Multiply the number by (bitwise length + 1) % 2 to pad it. Use ++rip to disassemble every two byte pair of the atom into a list, map over the list and use the number as an index into the string "ACGT".
> =a |*
  *
  =+
  (scan (reel +< |=({a/@ b/tape} (weld <a> b))) dem)
  `tape`(flop (turn (rip 1 (mul - +((mod (met 0 -) 2)))) |=(@ (snag +< "ACGT"))))
> (a "codegolf")
"GGCTTGCGGCCGGAGACGCGGTCTGACGCCTTGTAAATA"
> (a "ppcg")
"GGCTAATTGTCGCACTT"
> (a "}")
"TTGG"

Common Lisp (Lispworks), 415 bytes
(defun f(s)(labels((p(e f)(concatenate'string e f)))(let((b"")(d""))(dotimes(i(length s))(setf b(p b(write-to-string(char-int(elt s i))))))(setf b(write-to-string(parse-integer b):base 2))(if(oddp #1=(length b))(setf b(p b"0")))(do((j 0(+ j 2)))((= j #1#)d)(let((c(subseq b j(+ j 2))))(cond((#2=string="00"c)(setf d(p d"A")))((#2#"01"c)(setf d(p d"C")))((#2#"10"c)(setf d(p d"G")))((#2#"11"c)(setf d(p d"T")))))))))

ungolfed:
(defun f (s)
  (labels ((p (e f)
             (concatenate 'string e f)))
  (let ((b "") (d ""))
    (dotimes (i (length s))
      (setf b
            (p b
               (write-to-string
                (char-int (elt s i))))))
    (setf b (write-to-string (parse-integer b) :base 2))
    (if (oddp #1=(length b))
        (setf b (p b "0")))
      (do ((j 0 (+ j 2)))
          ((= j #1#) d)
        (let ((c (subseq b j (+ j 2))))
          (cond ((#2=string=  "00" c)
                 (setf d (p d "A")))
                ((#2# "01" c)
                 (setf d (p d "C")))
                ((#2# "10" c)
                 (setf d (p d "G")))
                ((#2# "11" c)
                 (setf d (p d "T")))))))))

Usage:
CL-USER 2060 > (f "}")
"TTGG"

CL-USER 2061 > (f "golf")
"TAAAAATTATCCATAAATA"

PowerShell Core, 143 121 bytes
filter d{if($_){"$(($_-($i=$_%2))/2|d)$i"}}-join([regex]"(..)"|% s* "$(-join($args|%{+$_})|d)0"|?{$_[1]}|%{"ACGT"[$_%8]})

Try it online!
Explanations
Takes as an input a string transformed as a char array using splatting
First, a filter to convert decimal to binary as Powershell can't do it for number larger than long
filter d{if($_){"$(($_-($i=$_%2))/2|d)$i"}}

This converts the char array to an int array, joins them as a string, splits with binary string concatenated with the padding in strings of length 2.
It converts each substring to a number, and using modulus 8, finds the correct char in the ACGT string.
-join([regex]"(..)"|% s* "$(-join($args|%{+$_})|d)0"|?{$_[1]}|%{"ACGT"[$_%8]})

Perl, 155 148 137 + 1 (-p flag) = 138 bytes
#!perl -p
s/./ord$&/sge;while($_){/.$/;$s=$&%2 .$s;$t=$v="";$t.=$v+$_/2|0,$v=$_%2*5
for/./g;s/^0// if$_=$t}$_=$s;s/(.)(.)?/([A,C],[G,T])[$1][$2]/ge

Test it on Ideone.

Perl 6, 57 + 1 (-p flag) = 58 bytes
$_=(+[~] .ords).base(2);s:g/..?/{<A G C T>[:2($/.flip)]}/

Step by step explanation:
-p flag causes Perl 6 interpreter to run code line by line, put current line $_, and at end put it back from $_.
.ords - If there is nothing before a period, a method is called on $_. ords method returns list of codepoints in a string.
[~] - [] is a reduction operator, which stores its reduction operator between brackets. In this case, it's ~, which is a string concatenation operator. For example, [~] 1, 2, 3 is equivalent to 1 ~ 2 ~ 3.
+ converts its argument to a number, needed because base method is only defined for integers.
.base(2) - converts an integer to a string in base 2
$_= - assigns the result to $_.
s:g/..?/{...}/ - this is a regular expression replacing any (:g, global mode) instance of regex ..? (one or two characters). The second argument is a replacement pattern, which in this case in code (in Perl 6, curly brackets in strings and replacement patterns are executed as code).
$/ - a regex match variable
.flip - inverts a string. It implicitly converts $/ (a regex match object) to a string. This is because a single character 1 should be expanded to 10, as opposed to 01. Because of that flip, order of elements in array has G and C reversed.
:2(...) - parses a base-2 string into an integer.
<A G C T> - array of four elements.
...[...] - array access operator.
What does that mean? The program gets list of all codepoints in a string, concatenates them together, converts them to base 2. Then, it replaces all instances of two or one character into one of letters A, G, C, T depending on flipped representation of a number in binary.

Python 3, 117 bytes
This answer ignores padding. Looks like it could be shorter.
lambda x:''.join('ACGT'[h//4]+'ACGT'[h%4]for h in [int(h,16)for h in hex(int(''.join(map(str,x.encode()))))[2:]])[1:]

Try it online!

Python 3.8 (pre-release), 92 90 bytes
Does not handle padding, but is under 100.
lambda x,s='':f(x,'ACGT'[v%4]+s)if (v:=int(''.join(map(str,x.encode())))>>len(s)*2) else s

Try it online!
Python 3, 113 110 bytes
Spending almost 1/5 bytes on padding.
def f(x):
	v=int(''.join(map(str,x.encode())));v<<=len(bin(v))%2;c=''
	while v:c='ACGT'[v%4]+c;v>>=2
	return c

Try it online!
Python 3.8 (pre-release), 110 bytes
f=lambda x,s='':f(x,'ACGT'[v%4]+s)if(v:=(u:=int(''.join(map(str,x.encode()))))<<len(bin(u))%2>>len(s)*2)else s

Try it online!


text:
Rainbowlify An Image
This challenge is about gradually shifting hues in an image to make pretty pictures like this:

(original)
Challenge
Write a program or function that takes in two non-negative integers and an image in any common image file format of your choosing (you can take a path to the image or the raw image data).
We'll call the first integer the cycles and the second integer the offset.
We'll also define floating-point step as 360 times cycles divided by the area of the image, or step = 360 * cycles / (image width * image height).
For each pixel P in the image, moving one row at a time, left-to-right, top-to-bottom (i.e. in reading order if the pixels were letters), do the following:

Increase the hue of P by offset degrees (looping around from 360 to 0 if necessary).

Then increase offset by step.

Save, display, or output raw the resulting image in any common image file format.
This procedure incrementally increases the hue of all the pixels in the image, making cycles full loops around the hue rainbow, starting by initially offsetting the hue by offset.
When cycles is 1 and offset is 0, as in the Starry Night image above, the top and bottom rows of pixels have practically no hue shift but in between there's a full color cycle.
Details

Cycles can be any non-negative integer but you may assume that offset is from 0 to 359 inclusive.

When cycles is 0, every pixel in the image will have its hue shifted by exactly offset since step must be 0 too. (In this case if offset is 0 then the image doesn't change at all.)

You may assume cycles and offset are input as floats if desired (i.e. 1.0 instead of 1). (I realize they needn't be integers at all, it just makes the challenge simpler.)

"Hue" refers to the RGB color space version, common in HSL/HSV color models.

Examples
Original:

Cycles = 1, offset = 0:

Cycles = 1, offset = 180:

Original:

Cycles = 2, offset = 60:

Original:

(Thanks ArtOfCode.)
Cycles = 1, offset = 120:

Original:

(Thanks Doorknob.)
Cycles = 1, offset = 0:

Cycles = 4, offset = 0:

Cycles = 200, offset = 0:

Cycles = 30000, offset = 0:

(These images may not be pixel perfect due to imgur compressing them.)
Scoring
The shortest code in bytes wins. Tiebreaker is higher voted answer.
Answers that post their own cool looking test images will get more brownie points from me.

This looks like Doorknob is smoking some pot.

I presume an array of integers as return value would be included in "or output raw"?

@Marv No. I mean the raw bytes of the image (in your chosen common format, say ppm) can be piped direct to stdout.

Do outputs have to be identical to your examples? I'm getting slightly different images.

@DrGreenEggsandHamDJ If you can't visually tell a difference then it's probably fine. Pixel perfection is not required (imgur may have lossily compressed my images anyway).

Pyth, 86 bytes, full program
=N.tE7=Z*6*.n0cEl.n'zMmhtS[0255ss*VG.>+Lc-1.tH1 3[.tH1Kc.tH0@3 2_K)d)3.wmmgk~-NZd'z

Pyth doesn't have built-in color space conversions - this is the real deal.
Takes input in the following format on stdin:
input_filename.png
offset
cycles

The output image is written to o.png.

This works by rotating the color cube around its diagonal, and then clamping any values outside of the range.
If a is the angle to rotate by, and r, g, b is the input color, we calculate the new color r', g', b' by:
o = cos(a), i = sin(a) / sqrt(3)
n = (1 - o) / 3
m = [n + o, n - i, n + i]
clamp(c) = max(0, min(255, c))
r' = clamp(r*m[0] + g*m[1] + b*m[2])
g' = clamp(r*m[2] + g*m[0] + b*m[1])
b' = clamp(r*m[1] + g*m[2] + b*m[0])

Java (Full program), 491 488 bytes (Thanks @Geobits)
import java.awt.*;import java.io.*;import static javax.imageio.ImageIO.*;class Q{public static void main(String[]v)throws Exception{File f=new File(v[2]);java.awt.image.BufferedImage b=read(f);for(int i=0,j,h=b.getHeight(),w=b.getWidth();i<h;i++)for(j=0;j<w;){Color c=new Color(b.getRGB(j,i));float[]a=new float[3];c.RGBtoHSB(c.getRed(),c.getGreen(),c.getBlue(),a);b.setRGB(j++,i,c.HSBtoRGB((a[0]+Float.valueOf(v[1])/360+(i*w+j)*Float.valueOf(v[0])/w/h)%1,a[1],a[2]));}write(b,"png",f);}}

Ungolfed
import java.awt.*;
import java.io.*;

import static javax.imageio.ImageIO.*;

class A79200 {
    public static void main(String[] v) throws Exception {
        File file = new File(v[2]);
        java.awt.image.BufferedImage image = read(file);
        for (int i = 0, j, height = image.getHeight(), width = image.getWidth(); i < height; i++)
            for (j = 0; j < width; ) {
                Color color = new Color(image.getRGB(j, i));
                float[] arr = new float[3];
                color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), arr);
                image.setRGB(j++, i, color.HSBtoRGB((arr[0] + Float.valueOf(v[1]) / 360 + (i * width + j) * Float.valueOf(v[0]) / width / height) % 1, arr[1], arr[2]));
            }
        write(image, "png", file);
    }
}

Explanation

Usage: Pretty straightforward. Compile with java -c Q.java. Run with java Q <cycles> <offset> <imagepath>. Will override the existing image, so be careful.
I was gonna make a method only solution at first but I didn't quite know how to handle imports on those, so I figured I'd go full java, this is probably not going to win anyways :^)

Results:
Image 1: 1 cycle, 0 offset

Image 1: 1 cycle, 180 offset

Image 2: 2 cycles, 60 offset

Image 3: 1 cycle, 120 offset

Image 4: 1 cycle, 0 offset

Image 4: 4 cycles, 0 offset

Image 4: 200 cycles, 0 offset

Bonus: The Starry Night, 1 cycle, 0 offset

For future reference, you can do imports for method-only answers just the same as you normally would. Just put them outside the method body and count the bytes. You can also fully-qualify classes instead of importing them if you'll only be needing it once, to save a few bytes in some cases.

Also, is there a reason you're importing java.io.File instead of java.io.* ?

Thanks, good to know. And second, nope, theres no reason. Good point.

Why import static, not just import?

So that I'm able to call ImageIO::read and ImageIO::write without having to prepend ImageIO.: This adds 9 bytes (static .*) but saves 16 (ImageIO. twice).

Python, 379 bytes
from PIL.Image import*
from colorsys import*
def f(H,c,I):
 i=open(I);x,y=i.size;S=1.*c/(x*y);r,g,b=i.split();R=[];G=[];B=[]
 for x,y,z in zip(r.getdata(),g.getdata(),b.getdata()):
  e=255.;h,s,v=rgb_to_hsv(x/e,y/e,z/e);t=hsv_to_rgb(h+H,s,v);H=H+S%1.;x,y,z=[int(x*e)for x in t];R.append(x);G.append(y);B.append(z)
 p=Image.putdata;p(r,R);p(g,G);p(b,B);return merge('RGB',(r,g,b))

This takes a path to a .jpg as input. It will not work with png, although you can change r,g,b=i.split(); to r,g,b=i.split()[:3]; to load a png image.
Here are some images:
Original:

Offset: 0, Cycles: 4

Original:

Offset 0, 1 cycle:

Original:

Offset 0, 2.5 cycles: