text:
The anti-narcissist
The narcissist is a program which, given its own source as input, prints a truthy value and, given anything other than that, prints a falsey value. Today, we're reversing this.
Create a program that, given the name of whatever your language's truthy value is (True, true, 1), prints its own source. Given the name of whatever your language's falsey value is (False, false, 0), or any input other than these two, it should output nothing (empty string or array: erroring is acceptable).
Trailing whitespace is only good if your language needs it printed alongside with the code.
You need not account for all truthy and falsey values. You can choose one truthy and one falsey value for input.
For languages without truthy/falsey values, use 1 and 0.
This is code golf so the shortest program wins. Standard loopholes and quine rules apply.

What are "standard quine rules"?

So given a truthy value, act as a quine, otherwise output nothing? Similar to this one but with exit instead of reverse

What about trailing whitespace, in general?

Do we need to account for all truthy or falsey values, or can we choose one truthy and one falsey value for input?

@attinat Standard quine rules

For further challenges I recommend you to use the sandbox to get feedback before posting it here.

When you say we should "output nothing", are outputting an empty string/array or throwing an error acceptable?

Is it okay to use 0 and 1 for languages which don't really have truthy or falsy values?

Gol><>, 8 bytes
sP#;H?I"

Try it online!
Adapted from my comment on this answer.
Explanation
sP        Pop and add 17 to the bottom of the stack (default 0)
  #       Reflect
sP        Add 17 again to make 34
       "  Wrapping string literal to push the source
     ?I   If the input is non-zero
    H     Halt and output the stack
   ;      Otherwise just halt

Java 10, 227 202 bytes (full program)
interface N{static void main(String[]a){var s="interface N{static void main(String[]a){var s=%c%s%1$c;if(new Boolean(a[0]))System.out.printf(s,34,s);}}";if(new Boolean(a[0]))System.out.printf(s,34,s);}}

-25 bytes thanks to @ripkoops.
Try it online.
Java 10, 98 bytes (lambda function)
b->{var s="b->{var s=%c%s%1$c;return b?s.format(s,34,s):%1$c%1$c;}";return b?s.format(s,34,s):"";}

Try it online.
quine explanation:

The var s contains the unformatted source code
%s is used to put this String into itself with s.format(...)
%c, %1$c, and 34 are used to format the double-quotes
s.format(s,34,s) puts it all together

And then a ternary if-else check is added, which prints this source code if truthy, or an empty string if falsey.

202 bytes with printf instead of s.format

@ripkoops Ah, of course. Thanks! :)

Vyxal, 10 bytes
`:qp*`:qp*

Try it True!
Try it False!

Python 2, 55 bytes
a=input();_='a=input();_=%r;print(_%%_*a)';print(_%_*a)

Try it online!
-10 bytes thanks to milkyway
Takes 1 or 0 as input. Technically you could give another integer but that produces weird behaviour.

My understanding of the challenge is that solutions must work for all truthy/falsey values, but I'm not sure - probably worth asking for clarification.

I tried to make your answer better: __import__("sys").stderr=object();a=bool(eval(input()));_='__import__("sys").stderr=object();_=%r;print(_%%_*a)';print(_%_*a) it just suppresses error messages if it cannot eval the input, which may not be the best solution or even against the rules.

@Shaggy I'll wait for clarification from the OP but since Python's values are True and False which are 1 and 0 I don't think my solution is invalid. Not sure; I may have to bool-eval it.

@GáborFekete Sorry if I'm misunderstanding something, but how is that better?

@HyperNeutrino it takes any type of input, tries to eval it, if it can, then converts it to a boolean and multiplies the printed text with it (0 if False and 1 if True). It's better than just accepting 0 or 1 (and failing on other numbers)

@GáborFekete Oh okay, I thought you meant length-wise. Sorry. Yeah, I'm awaiting confirmation from OP as to what truthy-falsy means (a pair of values, or all values)

Can't you remove the int()s because it's Python 2?

@MilkyWay90 oh yeah true thanks

You mean -10 bytes, not -50 bytes lol

@MilkyWay90 wait wtf how did i manage that

Sometimes typos half-way across the keyboard do happen, but it's very rare

is there any point to using a instead of just input() in one place? TIO

40 bytes by using exec and removing the brackets around print Try it online!

Haskell, 42 bytes
f n|n=putStr<>print$"f n|n=putStr<>print$"

Try it online!
A simple modification of the standard quine (current version of the Prelude with <> required). Throws an error when given False.

Brachylog, 20 bytes
≜!1∧"≜!1∧~kgjw₁"gjw₁

Try it online!
Brachylog doesn't really have truthy or falsy values, so this just assumes that 0 and 1 are valid choices regardless of actual truthiness.
≜                       Label the input,
 !                      and discard the resulting choice point.
  1                     If the input is 1,
   ∧"≜!1∧~kgjw₁"gjw₁    quine.

This could be reduced to 1∧"1∧~kgjw₁"gjw₁ if we only had to handle the chosen values, or only integers, or only literals--≜! is necessary to handle an empty input or variable input. A lot of different two-byte chunks of code could work in place of ≜!, such as any one of 023456789\^cxzạḅịḷṇụċṁṗẠḄḌẸḤỊḶṆṢṬṾẈẒĊĖṀȮṠṪπφ followed by |, but ≜! seems like the best for specifically catching an unbound input.

Perl 5 (-p), 29 24 bytes
Could save 2 bytes thanks to @Abigail, and some more thanks to this track
$_&&=<<''x2
$_&&=<<''x2

TIO

05AB1E, 21 18 bytes
"34çìIΘ·×"34çìIΘ·×

-3 bytes thanks to @Grimy.
Try it online.
Explanation:
NOTE: Only 1 is truthy in 05AB1E. Everything else is falsey.
It's based on this base quine: "34çìDJ"34çìDJ (or to be more correct: "34çì2×"34çì2×)
"34çìIΘ·×"          # Push string "34çìIΘ·×"
          34ç       # Push 34, converted to character '"'
             ì      # Prepend it in front of the string: '"34çìIΘ·×'
              I     # Push the input
               Θ    # Trutify it (==1)
                ·   # Double it
                 ×  # And repeat the string that many times
                    #  with truthy input 1: '"34çìIΘ·×"34çìIΘ·×'
                    #  with falsey input: ""
                    # (after which the result is output implicitly)

2096239D20BJ is a shorter proper quine, not sure how you'd adapt it though.

@Grimy Oh, nice quine. You should post it here. (Although, not sure if the trailing newline is allowed.) But I don't think it can easily be modified for other quine challenges tbh.

Well, my quine can be adapted, but it's not pretty. Otoh, here's an 18 based on 34ç.

@Grimy Oh, nice! :)

Pyth, 15 bytes
*QjN*2]"*QjN*2]

Try it online!
Input is either True or False. is a modification of the standard Pyth quine, jN*2]"jN*2].
*QjN*2]"*QjN*2]   Implicit: Q=eval(input()), N=quote mark
       "*QjN*2]   The string "*QjN*2]" - closing quote is inferred
      ]           Wrap in a list
    *2            Duplicate
  jN              Join on "
*Q                Multiply by Q - True is evaluated to 1, False to 0
                  Implicit print

Technically, a truthy value in Pyth is any value not in the following list: 0, 0.0, "", [], (), {}, set(), whereas my submission above only works with the strict values for True and False. If we need to cater for any truthy or falsey value, the following will work for 19 bytes: ?!QkjN*2]"?!QkjN*2] (TIO link). This replaces the multiplcation with ?!Qk, which uses the negation of the truthiness of the input (!Q) to select either an empty string (k) or the quine string through the ternary operator (?).

13 bytes, compatible with all truthy and falsey inputs. A modification of the quine jN B"jN B.

JavaScript (Node.js), 16 bytes
Assuming the only falsey string is the empty one
f=_=>_?'f='+f:''

Try it online!

JavaScript (Node.js), 19 bytes
Assuming anything different from true, false, 1, 0 is falsey
f=_=>~_+1?'f='+f:''

Try it online!

Why not simply _?...:''? By the way, the only falsey string in JS is the empty string.

@Shaggy I assumed anything different from true, 1, false, 0 would be false (as it said in the challenge) but you are right tho

Does f=s=>s&&'f='+f work?

@Neil it would output 0 instead of 'nothing'

@Neil, well, I suppose 0 technically is nothing! :D

Japt, 14 bytes
Based on ETH's original standard quine. Expects 0 for falsey and 1 for truthy.
"iQ pUÑ"iQ pUÑ

Try it
"iQ pUÑ"iQ pUÑ     :Implicit input of integer U
"iQ pUÑ"           :Literal string
        i          :Prepend
         Q         :  Quotation mark
           p       :Repeat
            UÑ     :  U*2 times

Runic Enchantments, 12 bytes
"i1=?;3X4+k@

Try it online!
If it weren't for the "or any other value" having to print nothing I could save 2 bytes by removing 1=, but that allows for values like 11 to also print the quine. Note that the ascii character 0x01 implicitly converts to 1 and is effectively also a true value. The only way to distinguish it from numerical 1 would be to concatenate it as a string.
Explanation
The quine portion of this answer is actually pretty boring and straight forward, only i1=?; is added to meet challenge specifications:
"               Begin string mode
 i1=?;3X4+k@    Push the string literal i1=?;3X4+k@
"               Stop string mode
 i1=            Read input, compare to 1
    ?           Skip a number of instructions equal to the top of the stack (0 or 1)
     ;          If 0, terminate
      3X4+      If 1, push 34
          k     Convert to character (")
           @    Dump stack, top to bottom, to output and terminate.

lin, 53 bytes
in (1g@ dup outln out ) e|
in (1g@ dup outln out ) e|

Takes input via STDIN. Truthy value is empty input, falsy value is any other input.
Explanation
in (...) e| only executes whatever is within the parentheses if the input is empty. 1g@ retrieves the second line. dup outln out outputs 2 copies of the second line separated by a newline.
This takes advantage of the fact that lin only executes the program's first line (unless told otherwise by commands).

Charcoal, 40 bytes
≔´η´¿´Ｎ´«´´´≔´Ｆ´η´⁺´´´´´ι´ηη¿Ｎ«´≔Ｆη⁺´´ιη

Try it online! I can't actually seem specify an input of an arbitrary type (I get some weird zero-length truthy value if I try), so this just inputs numeric values and prints itself for any non-zero value. This is based on the standard Charcoal quine in the linked answer, with the actual printing wrapped inside a conditional (+3 bytes) plus that code then quoted inside the assignment (+6 bytes). Charcoal no longer outputs a trailing newline which saves 1 byte. If an exact match with 1 is required, then for 46 bytes:
≔´η´¿´¬´⊖´Ｎ´«´´´≔´Ｆ´η´⁺´´´´´ι´ηη¿¬⊖Ｎ«´≔Ｆη⁺´´ιη

Try it online!

Ruby -n, 46 bytes
Based on the Ruby heredoc quine. Falsy values are nil and false. Truthy values are basically every other valid Ruby object, including true, any number (even zero), any string (even the empty string), and any array (even an empty array).
puts <<2*2,2if eval$_
puts <<2*2,2if eval$_
2

Try it online!

C# (Visual C# Interactive Compiler), 108 bytes
var s="var s={0}{1}{0};if(bool.Parse(ReadLine())Write(s,'{0}',s);";if(bool.Parse(ReadLine()))Write(s,'"',s);

Try it online!
The above link demonstrates the truthy case. Below are some alternative inputs:

Falsy
Something else (empty string)

Based on my C# quine.
Here is a lambda variation:
C# (Visual C# Interactive Compiler), 79 bytes
b=>{var s="b=>{{var s={0}{1}{0};if(b)Write(s,'{0}',s);}}";if(b)Write(s,'"',s);}

Try it online!


text:
Partition and Restructure
Given two contiguous shapes of the same area, determine the optimal way to divide the first shape into a minimum number of contiguous segments such that they can be rearranged to form the second shape. In other words, find the minimum number of segments required that can form both of the shapes.
"Contiguous" means that every square in the shape can be reached from any other square by walking across edges. Shapes and segments are allowed to have holes.
"Rearrange" means you move the segments around; you can translate, rotate, and reflect them.
The shapes are contained on a grid; in other words, each shape consists of a collection of unit squares joined by their corners/edges.
Input Specifications
The input will be provided in some reasonable format - list of points, array of strings representing each grid, etc. You can also take the sizes of the grid if requested. The grids will have the same dimensions and the two shapes are guaranteed to have the same area, and the area will be positive.
Output Specifications
The output should just be a single positive integer. Note that there will always be a positive answer because in the worst case scenario, you just divide the shapes into N unit squares.
Examples
The examples are presented as a grid with . representing a blank and # representing part of the shape.
Case 1
Input
.....
.###.
.#.#.
.###.
.....

###..
..#..
..#..
..###
.....

Output
2

Explanation
You can divide it into two L-shaped blocks of 4:
#
###

Case 2
Input
#...
##..
.#..
.##.

.##.
####
....
....

Output
2

Explanation
You can split the shapes like so:
A...
AA..
.A.
.BB.

.AA.
BBAA
....
....

You could also do:
A...
AA..
.B..
.BB.

.AB.
AABB
....
....

Case 3
Input
#....#
######

.####.
.####.

Output
2

Explanation
A....B
AAABBB

.ABBB.
.AAAB.

(This test case demonstrates the necessity to rotate/reflect shapes for optimal output)
Case 4
Input
.###.
..#..

.##..
.##..

Output
2

Explanation
No matter how you select blocks, selecting a 2x1 from the first shape necessarily prevents the other two from being grouped together; thus, you can use one 2x1 and two 1x1s. However, (thanks @Jonah), you can split it into a 3-block L shape and a single square like so:
.AAB.
..A..

.AA..
.BA..

Case 5
Input
##
#.

#.
##

Output
1

Explanation
The input and output shapes may be identical.
Case 6
Input
#..
##.
.##

#####

Output
3

Explanation
There is no way to divide the original shape into two pieces such that both pieces are straight, so at least three are needed.

Sandbox

Interesting problem.  And seemingly hard.  Are there any algorithms for this more efficient that brute force?

@Jonah I'm not quite sure; I haven't thought about efficient implementations for this yet. Sounds like a DS problem.

Also, probably worth adding more test cases for a problem this complex.

@Jonah Good suggestion, thanks.

@DLosc Yes, that's possible; added a case for both 1 and 3 being the answer.

Python 3.6, 799 791 bytes
7 bytes saved by Jonathan Frech and motavica
B=frozenset
M=min
X={}
T=lambda s:((x,y)for y,x in s)
N=lambda s:B((x-M(s)[0],y-M(T(s))[0])for x,y in s)
G=lambda s:{(x,y):s&{(x-1,y),(x+1,y),(x,y-1),(x,y+1)}for(x,y)in s}
C=lambda g,s,i=0:i<=len(g)and(len(g)==len(s)or C(g,s.union(*map(g.get,s)),i+1))
F=lambda s:N([(-x,y)for x,y in s])
P=lambda s,i=4:M([N(s),F(s),P(F(T(s)),i-1)],key=list)if i else s
S=lambda s,t=B(),i=0:t|S(s,B().union(u|{p}for u in t for p in s-u if C(G(u|{p}),{p}))if i else B([B([next(iter(s))])]),i+1)if-~i<len(s)else t
def U(s):
 k=P(s)
 if k in X:return
 j=[t for t in S(k)if C(G(k-t),{next(iter(k-t))})];X[k]={P(t):B()for t in j}
 for t in j:X[k][P(t)]|=B([B(P(k-t))]);U(t);U(k-t)
V=lambda s,t:1+M(V(v,w)for u in B(X[s])&B(X[t])for v in X[s][u]for w in X[t][u])if s^t else 1
A=lambda s,t:U(s)or U(t)or V(P(s),P(t))

Try it online!
Usage
A(s, t) takes in two shapes where each shape is given by a list of x, y grid positions.
A helper function to convert the graphical representation to a list of positions is below:
def H(g):
 g=g.split("\n")
 return[(x,y)for x in range(len(g[0]))for y in range(len(g))if"#"==g[y][x]]

Example:
case1_1 = \
""".....
.###.
.#.#.
.###.
....."""

case1_2 = \
"""###..
..#..
..#..
..###
....."""

print(A(H(case1_1), H(case1_2))) # Prints 2

Explanation
The algorithm used here is a little better than brute force by caching sub-shapes. For a given shape, it caches all the ways to split that shape into two contiguous shapes, I then normalise these shapes (shift the coordinates so it starts at the origin, then find a rotation/reflection of it which is used in the cache) and store them in the cache to look up quickly later. All sub-shapes then have their sub-shapes cached as well until it gets to the single block shape.
These sub-shapes are generated by converting it to a graph adjacency list and using a BFS to generate all sub-graphs. We can then filter these subgraphs to ones where the vertices which weren't included are a connected component. Determining whether the graph is connected is done with another BFS.
After the cache is complete, the solution is found by comparing the two shapes to find the sub-shapes that it has in common. Once it has these list of sub-shapes, it takes the pair of sub-shapes left over after removing the common shape and recursively applies the same algorithm again to find the minimum number of blocks needed to reconstruct the shape. This then returns the sub-shape with the minimum of all those values and we have our solution.
I've put an annotated version below to kinda explain what each line is doing.
B=frozenset
M=min
# Shapes are stored as a frozenset of tuples where each tuple represents an (x, y) position
# Cache of shape partitions. This is a two-level dictionary where the outer key is a shape, and the inner key is a sub-shape where the value is a list of the shapes left when the sub-shape is removed.
# there may be multiple shapes in the inner-most list if the sub-shape appears multiple times
X={}
# Transpose list of coords (flip around diagonal axis)
T=lambda s:((x,y)for y,x in s)
# Translate shape so its upper-left corner is at the origin
N=lambda s:B((x-M(s)[0],y-M(T(s))[0])for x,y in s)
# Convert shape to graph in adjacency list form
G=lambda s:{(x,y):s&{(x-1,y),(x+1,y),(x,y-1),(x,y+1)}for(x,y)in s}
# Check if graph is connected given a set of nodes, s, known to be connected
C=lambda g,s,i=0:i<=len(g)and(len(g)==len(s)or C(g,s.union(*map(g.get,s)),i+1))
# Flip shape around vertical axis
F=lambda s:N([(-x,y)for x,y in s])
# Converts shape to the minimal reflection or rotation. rotation is equivalent to transpose then flip.
P=lambda s,i=4:M([N(s),F(s),P(F(T(s)),i-1)],key=list)if i else s
# returns all the contiguous sub-shapes of s that contain the first pos, given by next(iter(s))
S=lambda s,t=B(),i=0:t|S(s,B().union(u|{p}for u in t for p in s-u if C(G(u|{p}),{p}))if i else B([B([next(iter(s))])]),i+1)if-~i<len(s)else t
# updates the sub-shape cache, X, recursively for an input shape s
def U(s):
 k=P(s)
 if k in X:return
 j=[t for t in S(k)if C(G(k-t),{next(iter(k-t))})];X[k]={P(t):B()for t in j}
 for t in j:X[k][P(t)]|=B([B(P(k-t))]);U(t);U(k-t)
# Gets the minimum number of partitions for two shapes
V=lambda s,t:1+M(V(v,w)for u in B(X[s])&B(X[t])for v in X[s][u]for w in X[t][u])if s^t else 1
# The function to run, will update the cache for the two input shapes then return the minimum number of partitions
A=lambda s,t:U(s)or U(t)or V(P(s),P(t))

if s==t else could possibly be reversed, allowing the replacement of != to ^.

if i<len(s)-1else ~> if-~i<len(s)else.

def A(s,t):U(s);U(t);return V(P(s),P(t)) could possibly be lambda s,t:U(s)or U(t)or V(P(s),P(t)), saving three bytes.

s.union(*[g[n]for n in s]) ~> s.union(*map(g.get,s))

Python3, 788 bytes:
import itertools as I
E=enumerate
R=lambda x,n=4:set()if n==0 else{str(x),*R([i[::-1]for i in zip(*x)],n-1)}
S=lambda t:{(x,y)for x,k in E(t)for y,p in E(k)if p}
V=lambda x:1==len(x)or all(any((j+J,k+K)in x for J,K in[(0,1),(0,-1),(1,0),(-1,0)])for j,k in x)
G=lambda p,i,F=min:F(j[i]for j in p)
N=lambda p:[(x-G(p,0),y-G(p,1))for x,y in p]
M=lambda j:[[int((x,y) in j)for y in range(G(j,1,max)+1)]for x in range(G(j,0,max)+1)]
O=lambda j:{*R(m:=M(j)),*R([i[::-1]for i in m])}
def P(b,n):
 q=[(b,[],n)]
 while q:
  b,C,n=q.pop(0)
  if n==0 and not b:yield C
  if n and b:
   for i,_ in E(b,1):
    for c in I.combinations(b,i):
     if V(c):q+=[(b-{*c},C+[N(c)],n-1)]
def f(a,b):
 c=0
 while c:=c+1:
  if any(all(O(J)&O(K)for J,K in zip(x,y))for x in P(S(a),c)for y in P(S(b),c)):return c

Try it online!

source: Stack Exchange

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

sort: votes


text:
The year counter is here
Create a program that, given an integer N, outputs the number of years we have to get to N A.D. or how many years it has been since N A.D, as a string or int. For example, given 2014, the program should output 5 as it has been that many years since 2014. Input of the year in which you run the program should result in 0.
Treat the input "0" however you like: as its own year, as 1 A.D. or as 1 B.C. This means that you can pretend there IS a year zero and have all BC years be off by one.
Negative integers (integers with - in front of them) are treated as years B.C. For example inputting -2 would result in the program telling how many years it has been since 2 B.C.
Treat improper inputs (inputs that don't only use numbers and the dash as characters (abcd), or use the dash by itself or use it wrongly (e.g. 6-)) however you want, error or exit or something else.
The winning program is the program with the shortest code that does all of this. Have fun.

Am I dumb or has it been 5 years since 2014?

@HyperNeutrino it has

So an input of -1 should result in an output of 2019 this year?

@HyperNeutrino maybe the thinking is that only 4 full calendar years have passed since the end of 2014. So what is the output meant to be for 2009?..

@JonathanAllan If so, better question is what is the output for 2019? Wouldn't be 0 in this case, but -1 doesn't make sense, and neither does 1...?

@HyperNeutrino agreed maybe there are three zero years

@JonathanAllan Hm. Well, OP posted and probably left, so hopefully they clarify, because otherwise I'm tempted to CV this because there are like three reasonable interpretations plus the answer of "OP forgot it was 2019"

My mistake about the years that it's been since 2014. 2019 should output 0.

Also I clarified. So there's that.

"Treat the input 0 however you like: as its own year, as 1 A.D. or as 1 B.C." - do you mean that even though there is no year zero we may pretend there was and have all B.C. years have an off by 1 error?

05AB1E, 3 bytes
žgα

Try it online!
Explanation
  α   # absolute difference between
      # implicit input
žg    # and current year

Java 8, 46 bytes
n->(n-=java.time.Year.now().getValue())<0?-n:n

Try it online.
Or alternatively:
n->Math.abs(n-java.time.Year.now().getValue())

Try it online.

Japt, 3 bytes
aKi

Try it
aKi     :Implicit input of year
a       :Absolute difference with
 K      :  Date
  i     :  Get year

lol, we posted the same answer at the same time. I deleted mine tho, i had another in php anyway

@LuisfelipeDejesusMunoz - technically, you got there first ... by 8 seconds! No need to delete either of them, though; it happens sometimes.

Pyth, 4 bytes
a.d3

Try it online!
Explanation:
a.d3Q - full program. implicit Q added.
a     - absolute difference of
 .d3  - current year and
    Q - implicit input

C# (Visual C# Interactive Compiler) with /u:System.Math and /u:System.DateTime flags, 32 18 bytes
n=>Abs(Now.Year-n)

Try it online.

PHP, 22 bytes
<?=date('Y')-$argv[1];

Try it online!

Python 3, 66 bytes
from datetime import*
print(abs(int(input())-datetime.now().year))

Try it online!
Gives 5 for 2014 because it's 2019, not 2018.

JavaScript (Node.js), 33 bytes
a=>Math.abs(Date().split` `[3]-a)

Try it online!
-6 bytes thanks to Luis felipe De jesus Munoz

Red, 30 bytes
func[y][absolute y - now/year]

Try it online!

C++ (gcc), 131 127 bytes
#include<ctime>
#include<cstdio>
int main(){long y,t=time(0);scanf("%d",&y);y-=gmtime(&t)->tm_year+1900;printf("%d",y<0?-y:y);}

Try it online!

Thanx for the hint, found an even better solution :)

118 bytes

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


text:
FizzBuzz but time-based
Make a program that outputs the number of seconds from the beginning of today (00:00:00 of the day you run it) to the second you ran it. However, if this number is divisible by three, print Fizz instead. If it is divisible by five, print Buzz instead. If it is divisible by three and five, print FizzBuzz.
Don't pad the number printed with extra zeroes (44 instead of 00044). You don't need to take leap seconds into account (saying for the universe in which people answer this years after I post it). Standard loopholes apply, shortest program wins.

Beginning of today as in 13th of June or Midnight of the day you run it?

Midnight of the day you run it.

I know you're not a new user, but I still strongly suggest using the sandbox to help iron out your challenges. The couple of days' worth of feedback is always well worth it!

This is a just a composition of an existing challenge with 'get the seconds since midnight'. I don't see what that adds.

I more intended this as a way to add a time element to FizzBuzz. I guess this adds text replacement but I dunno.

This is just fizz buzz.

Jelly, 26 bytes
A simple port of Dennis's "1-2-fizz-4-buzz" solution which evaluates the formatted time as seconds first
7ŒTṣ”:Vḅ60µ3,5ḍTị“¡Ṭ4“Ụp»ȯ

Try it online!

Python 2, 73 bytes
import time
a=time.time()%86400//1
print(a%3<1)*"Fizz"+(a%5<1)*"Buzz"or a

Try it online!
-37 bytes using time.time instead of datetime thanks to negative seven
-4 bytes thanks to ArBo (switched to Python 2)

77 with time.time()

@negativeseven oh huh, good idea. thanks!

You can save two bytes on the print parentheses by switching to Python 2. Also, if outputting numbers with a trailing .0 is allowed, you can change int(...) to ...//1 for two more bytes.

@ArBo Oh nice, thanks!

05AB1E, 33 30 bytes
-3 bytes from Grimy
žažbžc)60βÐ3Öi"Fizz"?}5Öi”ÒÖ”,

Try it online!

žažbžc)60β for -3 bytes.

PowerShell, 117 94 90 71 bytes
-23 bytes thanks to mazzy
-4 bytes thanks to AdmBorkBork
-19 bytes thanks to mazzy again
(([int]$x=date|% tim*|% t*ls*),('Fizz'*!($x%3)+'Buzz'*!($x%5))|sort)[1]

Try it online!
An even cheaper way to compute the day's seconds. TotalSeconds also returns as a float so that had to be truncated as well. Plugs that value into this Fizzbuzz answer by AdmBorkBork so give him a thumbs-up as well.

TimeOfDay ?

You can just do date instead of Get-Date for -4.

@AdmBorkBork D'oh, thanks

71 bytes?

Batch, 145 bytes
@set s=%time:~,8%
@set/as=((%s::=)*60+%,f=s%%3,b=s%%5,t=f+b
@for %%a in (Fizz.%f% Buzz.%b% FizzBuzz.%t%)do @if %%~xa==.0 set s=%%~na
@echo %s%

Explanation: %time% is (at least on my system) formatted hh:mm:ss.ff so we start by chopping off the fractions of seconds. Then the shortest way to do the base 60 conversion is to replace the :s with operators and evaluate, and the divisibility by 3, 5 and 15 is also calculated. This is then tested and the number of seconds replaced with the appropriate string if necessary before being printed.

MathGolf, 24 bytes
t♪/╔%_╕Σ╠δ╕┌╠δ`+Γ\35α÷ä§

Try it online!
Explanation
t                          unix timestamp as integer milliseconds
 ♪/                        divide by 1000
   ╔%                      modulo 86400
     _                     duplicate TOS
      ╕Σ╠δ                 Decompress "Σ╠" and capitalize to get "Fizz"
          ╕┌╠δ             Decompress "┌╠" and capitalize to get "Buzz"
              `            duplicate the top two items
               +           pop a, b : push(a+b)
                Γ          wrap last four elements in array
                 \         swap top elements (swaps 2nd copy of time to TOS)
                  35α      push [3, 5]
                     ÷     is divisible
                      ä    convert from binary
                       §   get from array

Jelly, 45 bytes
%3,5¬ȧ"“Fizz“Buzz”o"““”Fȯ⁸
7ŒTṣ”:V×⁽½c,60,1SÇ

Try it online!
This is so bad
34 bytes if I steal Dennis's FizzBuzz

Bash, 154
z=$(($(date +%s)-$(date -d "$(date +%F) 0" +%s)))
[[ 0 -eq "($z%3)" ]]&&a=1&&echo -n "fizz"
[[ 0 -eq "($z%5)" ]]&&echo "buzz"||[ $a -eq 1 ]&&echo||echo $z

could probably golf down last two lines...

JavaScript (Node.js), 125 120 bytes
x=Date().match(/\d\d/g).slice(3,6).reduce((a,j,i)=>a+=60**(2-i)*j)
console.log((x%3==0?'Fizz':'')+(x%5==0?'Buzz':'')||x)

Try it online!

First line parses a date string for [hours, minutes, seconds] and adds them together, second line is just FizzBuzz.

107 bytes (also fixes the bug that made your answer wrong in your reduce function)

Very nice, thanks! We don't have to put console.log in the answer?

Input/output methods are lax to a degree. Specifying a lambda is fine, so rather than outputting to a specific IO stream we just output from our function.

Perl 5, 74 bytes
$t+=$_*60**$g++for(gmtime)[0..2];say+(($t%3==0&&Fizz).($t%5==0&&Buzz))||$t

Try it online!

Bash, 76 bytes
date +'%H 60*%M+60*%S+[p]sc[[]sc[Fizz]n]sa[[]sc[Buzz]n]sbd3%0=ad5%0=blcx'|dc

Try it online!

APL (Dyalog Unicode), 40 bytesSBCS
{∨/d←0=4/3 5|⍵:d/'FizzBuzz'⋄⍵}60⊥3↑3↓⎕TS

Try it online!
⎕TS Time Stamp; e.g. [2019,06,14,07,48,20,317]
3↓ drop three; e.g. [07,48,20,317]
3↑ take three; e.g. [07,48,20]
60⊥ evaluate as base-60 digits; e.g. 28100
{…} apply the following anonymous lambda to that:
 ⍵ the argument; e.g. 28100
 3 5| the division remainder when that is divided by 3 and 5; e.g. [2,0]
 0= Boolean mask where that is equal to 0; e.g. [0,1]
 4/ replicate those numbers for 4 copies of each; e.g. [0,0,0,0,1,1,1,1]
 d← assign that to d
 ∨/…: if any of those are true (OR-reduction); e.g. true:
  d/'FizzBuzz' use d to mask the characters of the string; e.g. "Buzz"
⋄ else:
 ⍵ the argument; e.g. 28100

AutoIt, 90 bytes
$a=(@HOUR*60+@MIN)*60+@SEC
ConsoleWrite($a&(Mod($a,3)=0?"Fizz":"")&(Mod($a,5)=0?"Buzz":""))

It looks really bad without whitespace.
(FYI: AutoIt is a Windows basic-like scripting language)

Pyth, 36 bytes
Js%.dZ84600|+*!%J3"Fizz"*!%J5"Buzz"J

Try it online!
Loosely based on the Python 2 answer.


text:
Pandemic Outbreak Calculator
In the board game Pandemic, an outbreak occurs when a city contains more than 3 disease cubes. When the outbreak occurs, any disease cubes in the city in excess of 3 are removed, and each city connected to it gains one disease cube. This means that chain reactions can, and will occur.
Important note: Each city may only outbreak once in each chain reaction.
Input
A list of cities each containing:

An integer representing the number of disease cubes .
And a number of identifiers of the form (A, B ... AA, AB) (lowercase is allowed) representing which cites in list order it is connected to.

Output
A list of integers representing the number of disease cubes in each city after outbreaks have been resolved.
Winning Condition
This is code-golf, so the shortest code in bytes wins.

Could you add test cases?

I think it's clear enough.

Are city edges bidirectional? Is it strictly greater than (that is, a pandemic starts upon a city gaining its fourth cube)?

The point isn't that it's clear enough (which it isn't); test cases are to test people's solutions otherwise it's very inconvenient to verify that one's solution is valid.

it would take time

and yes to both of those questions

Let us continue this discussion in chat.

A list of integers is a string of integers separated by something other than a digit (whitespace, newline, etc.) ok?

Python 3, 201 bytes
f=lambda d,e,v=[],n=enumerate:any((D>3)>(i in v)for i,D in n(d))and f([(i in v)and D or(min(3,D)+sum((k not in v)*(d[k]>3)for k in E))for i,(D,E) in n(zip(d,e))],e,v+[i for i,D in n(d)if D>3])or sum(d)

Try it online!
Worst case O(n) on the number of cities. d is a list of disease counts, e is a list of city connections by 0-indexed position corresponding to d, and v is the visited array (which should not be given as input, obviously).
For the case [4, 3, 2] with connections 0 <-> 1, 1 <-> 2, and 0 <-> 2, first, city 0 outbreaks and becomes 3 and sets city 1 to 4 and city 2 to 3. Then, city 1 outbreaks and becomes 3 and sets city 2 to 4 (city 0 already had an outbreak). Finally, city 2 has an outbreak and nothing can be affected, leaving all three cities on 3 disease cubes, totalling 9.


text:
Count All Possible Unique Combinations of Letters in a Word
You are given a string, which will contain ordinary a-z characters.  (You can assume this will always be the case in any test, and assume that all letters will be lowercase as well).  You must determine how many unique combinations can be made of the individual characters in the string, and print that number.
However, duplicate letters can be ignored in counting the possible combinations.  In other words, if the string given is "hello", then simply switching the positions of the two ls does not count as a unique phrase, and therefore cannot be counted towards the total.
Shortest byte count wins, looking forward to seeing some creative solutions in non-golfing languages!
Examples:
hello -> 60
aaaaa -> 1
abcde -> 120

Strongly related, possible dupe

@Giuseppe I don't think this is a dupe of that; the specifics of this question allow for much shorter implementations

Adding some testcases may help.

@JonathanAllan Good suggestion!  Title changed accordingly.

Python 2, 50 48 bytes
f=lambda s:s==''or len(s)*f(s[1:])/s.count(s[0])

Try it online!
No boring built-ins! To my surprise, this is even shorter than the brute force approach, calculating all of the permutations with itertools and taking the length.
This function uses the formula
\$\text{# of unique permutations} = \frac{\text{(# of elements)!}}{\prod_{\text{unique elements}}{\text{(# of occurences of that element)!}}}\$
and computes it on the fly. The factorial in the numerator is calculated by multiplying by len(s) in each function call. The denominator is a bit more subtle; in each call, we divide by the number of occurences of that element in what's left of the string, ensuring that for every character c, all numbers between 1 and the amount of occurences of c (inclusive) will be divided by exactly once. Since we divide only at the very end, we're guaranteed not to have any problems with Python 2's default floor division.

itertools is very verbose in its function names

05AB1E, 3 bytes
œÙg

Try it online!
Explanation
  g  # length of the list
 Ù   # of unique
œ    # permutations
     # of the input

CJam, 4 bytes
le!,

Try it online!
Explanation
Read line as a string (l), unique permutations as an array of strings (e!), length (,), implicit display.

Looks like "lel", +1! :D

R, 69 65 bytes
function(s,`!`=factorial)(!nchar(s))/prod(!table(strsplit(s,"")))

Try it online!
4 bytes saved thanks to Zahiro Mor in both answers.
Computes the multinomial coefficient directly.
R, 72 68 bytes
function(s,x=table(strsplit(s,"")))dmultinom(x,,!!x)*sum(1|x)^sum(x)

Try it online!
Uses the multinomial distribution function provided by dmultinom to extract the multinomial coefficient.
Note that the usual (golfier) x<-table(strsplit(s,"")) doesn't work inside the dmultinom call for an unknown reason.

function(s,!=factorial)(!nchar(s))/prod(!table(strsplit(s,"")))  will work.
the el( ) is reduntant - table knows to look for the elements....

@ZahiroMor ah, of course. I had intended to test that but never got around to it.

JavaScript (Node.js), 49 bytes
t=t* is used instead of t*= to avoid rounding error (the |t rounds down the number) as t=t* guarantees that all intermediate (operator-wise) results are whole numbers.
a=>[...a].map(g=x=>t=t*y++/(g[x]=-~g[x]),t=y=1)|t

Try it online!
a=>
 [...a].map(        // Loop over the characters
  g=x=>
   t=t*             // using t*= instead may result in rounding error
    y++             // (Length of string)!
    /(g[x]=-~g[x])  // divided by product of (Count of character)!
  ,t=y=1            // Initialization
 )
 |t

(Potential floating-point rounding error; use t=t* if you want to avoid that.)

@Neil Yeah it failed when the input is aaadegfbbbccc exactly due to the floating-point rounding error

Huh, how did you find that test case?

@Neil Keep adding characters to the string until such rounding error occurs lol

@ShieruAsakoto Title has been changed; count is much better.  Thanks, and nice answer!

Japt, 5 3 bytes
-2 bytes thanks to @Shaggy
á l

Try it online!

TIO seems to be running an old version of Japt, allowing you to ditch the â.

@Shaggy Lol, I did not noticed that. thanks!

APL (Dyalog Unicode), 14 bytes
!∘⍴÷⊂×.(!∘⍴∩)∪

Try it online!
Returns the result as a singleton.

⍴ -> ≢ to make it return simple scalars, ÷⍨/g⌸,g←!⊢∘≢ for -2

J, 15, 14 bytes
[:#@=i.@!@#A.]

Try it online!
-1 byte thanks to FrownyFrog

~. can be =

Nice.  Thank you, @FrownyFrog

Jelly, 4 bytes
Œ!QL

Try it online!
Simply does what was asked: find permutations of input, uniquify and print the length.

C# (Visual C# Interactive Compiler), 59 bytes
f=s=>s==""?1:s.Length*f(s.Substring(1))/s.Count(c=>c==s[0])

Port of @ArBo's Python 2 answer.
Try it online.

Brachylog, 3 bytes
pᶜ¹

Try it online!
       The output is
 ᶜ¹    the number of unique
p      permutations of
       the input.

pᵘl does pretty much exactly the same thing.

Python 2, 57 bytes
lambda s:len(set(permutations(s)))
from itertools import*

Try it online!
Self-documenting: Return the length of the set of unique permutations of the input string.
Python 3, 55 bytes
Credit goes to ArBo on this one:
lambda s:len({*permutations(s)})
from itertools import*

Try it online!

APL (Dyalog Unicode), 24 bytes
⎕CY'dfns'
{≢∪↓⍵[pmat≢⍵]}

Try it online!
Simple Dfn, takes a string as argument.
How:
⎕CY'dfns'      ⍝ Copies the 'dfns' namespace.
{≢∪↓⍵[pmat≢⍵]} ⍝ Main function
          ≢⍵   ⍝ Number of elements in the argument (⍵)
      pmat     ⍝ Permutation Matrix of the range [1..≢⍵]
    ⍵[      ]  ⍝ Index the argument with that matrix, which generates all permutations of ⍵
   ↓           ⍝ Convert the matrix into a vector of strings
  ∪            ⍝ Keep only the unique elements
 ≢             ⍝ Tally the number of elements

Ruby, 41 bytes
f=->s{s.chars.permutation.to_a.uniq.size}

Try it online!

I don't think you need to_a

And anonymous functions/lambdas are acceptable, so you can remove the f= part. (In TIO move it to Header to not get counted.)

Java 8, 103 102 bytes
s->{int r=1,i=s.length();for(;i>0;)r=r*i/~-s.substring(--i).split(s.charAt(i)+"",-1).length;return r;}

Port of @ArBo's Python 2 answer.
-1 byte thanks to @OlivierGrégoire by making it iterative instead of recursive.
Try it online.
Actually generating all unique permutations in a Set and getting its size would be 221 bytes:
import java.util.*;s->{Set S=new HashSet();p(s,S,0,s.length()-1);return S.size();}void p(String s,Set S,int l,int r){for(int i=l;i<=r;p(s.replaceAll("(.{"+l+"})(.)(.{"+(i++-l)+"})(.)(.*)","$1$4$3$2$5"),S,l+1,r))S.add(s);}

Try it online.

Okay, I could golf a byte by making it iterative instead of recursive: s->{int r=1,i=s.length();for(;i>0;)r=r*i/~-s.substring(--i).split(s.charAt(i)+"",-1).length;return r;}.

@OlivierGrégoire Thanks! Btw, do you see something to make the second approach (generating all unique permutations in a set) shorter? I have the feeling some bytes can be saved, but tried some things and most were slightly longer instead of shorter.. But it still looks overly long tbh.

I've been working on it, trying to use streams and count, like this: s->{long r=1,i=s.length();for(;i>0;)r=r*i/(s.chars().skip(--i).filter(c -> c==s.charAt(i)).count()+1);return r;} but without success so far...

Perl 6, 33 30 chars (34 31 bytes)
Fairly straight forward Whatever block.  comb splits the string into letters, permutations gets all possible combinations.  Because of the way coercion to Set need be joined first ( » applies join to each element in the list).
+*.comb.permutations».join.Set

Try it online!
(previous answer used .unique but Sets guarantee uniqueness, and numerify the same, so it saves 3).

Perl 5, 43 bytes
Uses the method in @ArBo's Python answer.
sub c{!@_||@_*c(@_[1..$#_])/grep/$_[0]/,@_}

Try it online!

K (oK), 12 bytes
Solution:
#?x@prm@!#x:

Try it online!
Explanation:
Uses the oK built-in prm:
{[x]{[x]$[x;,/x ,''o'x ^/:x;,x]}@$[-8>@x;!x;x]}

... which, due to x^/:x basically generates the permutations of "helo" not "hello", hence we need to generate the permutations of 0 1 2 3 4, use them to index into "hello" and then take the count of the unique.
#?x@prm@!#x: / the solution
          x: / store input as x
         #   / count (#) length
        !    / range (!) 0..n
    prm@     / apply (@) to function prm
  x@         / apply permutations to input x
 ?           / take the distinct (?)
#            / count (#)

Is prm an ok specific operator? I don't think vanilla k has it?

Yup - only exists in oK per the manual

@HenryHenrinson afaik it's not in k4. in early k5 it was !-n. in late k5 and k6 it became prm. k7(shakti) has prm too.

F# (Mono), 105 bytes
let rec f s=if s=""then 1 else s.Length*(f(s.Substring 1))/(s|>Seq.sumBy(fun c->if c=s.[0]then 1 else 0))

Try it online!

Octave / MATLAB, 35 bytes
@(s)size(unique(perms(s),'rows'),1)

Anonymous function that takes a character vector and produces a number.
In MATLAB this can be shortened to size(unique(perms(s),'ro'),1) (33 bytes).
Try it online!
Explanation
@(s)                                  % Anonymous function with input s
                perms(s)              % Permutations. Gives a char matrix
         unique(        ,'rows')      % Deduplicate rows
    size(                       ,1)   % Number of rows

I thought unique returned unique rows already? Or is that only for tables?

@Giuseppe For numeric/char 2D arrays unique would linearize first. For tables I think you are right; I didn't know that!

Ah, I know where I got the idea -- unique in MATLAB does take rows for tables; R's unique takes unique rows of matrices or data frames. Too many array languages with the same commands that do slightly different things...

Pyth, 5 4 bytes
l{.p

Try it online!
This assumes the input is a python string literal. If input must be raw text, this 5-byte version will work:
l{.pz

Either way, it just computes all permutations of the input as a list, deduplicates it and gets the number of elements in it, and implicitly prints that number.
-1 byte thanks to @hakr14

{ deduplicates a list for a byte less than .{.

MATL, 9 bytes
jY@XuZy1)

Try it online!
Explanation:
j input as string
Y@ get permutations
Xu unique members
Zy size matrix
1) first member of size matrix

You can take the input with quotes, so j becomes i, which can be left implicit. Also, &nx saves a byte over Zy1) https://tio.run/##y00syfn/P9IholQtr@L/f/WM1JycfHUA

Retina 0.8.2, 73 bytes
(.)(?=(.*?\1)*)
/1$#2$*1x1$.'$*
^
1
+`1(?=1*/(1+)x(\1)+$)|/1+x1+$
$#2$*
1

Try it online! Uses @ArBo's formula, but evaluates from right-to-left as this can be done in integer arithmetic while still minimising the size of the unary values involved. Explanation:
(.)(?=(.*?\1)*)
/1$#2$*1x1$.'$*

For each character, count how many remaining duplicates there are and how many further characters there are, add one to each to take the current character into account, and separate the values so we know which ones are to be divided and which are to be multiplied.
^
1

Prefix a 1 to produce a complete expression.
+`1(?=1*/(1+)x(\1)+$)|/1+x1+$
$#2$*

Repeatedly multiply the last and third last numbers while dividing by the second last number. This replaces the last three numbers.
1

Convert to decimal.

Wolfram Language (Mathematica), 32 bytes
Characters/*Permutations/*Length

Try it online!
Explanation: Right-composition with /* applies these three operators one after the other to the function argument, from left to right:

Characters converts the input string to a list of characters.
Permutations makes a list of all unique permutations of this character list.
Length returns the length of this list of unique permutations.

This method is very wasteful for long strings: the unique permutations are actually listed and counted, instead of using a Multinomial to compute their number without listing.

K, 27 bytes
*/[1+!#:x]%*/{*/1+!x}'#:'x:

K, 16 bytes - not a real answer
#?(999999#0N)?\:

Take 999999 random permutations of the input string, take the unique set of them and count the length.
Most of the time it will give the right answer, for shortish strings.
Improved thanks to @Sriotchilism O'Zaic, @Selcuk

Welcome to the site!    Doesn't really matter since it is invalid but could you make your invalid answer more accurate by using 999999 instead of 100000?

Yup, good idea, thanks.

And maybe edit the explanation to reflect that change too?

J, 14 13 bytes
#(%*/)&:!#/.~

Try it online!
1 byte thanks to miles
#                  length
         #/.~      counts of each unique character
 (%*/)             divide left by the product of right
      &:!          after applying ! to both

#(%*/)&:!#/.~ should save another byte

PHP, 77 bytes
function f($s){return!$s?:strlen($s)*f(substr($s,1))/substr_count($s,$s[0]);}

Try it online!
This is basically just a PHP port of @ArBo's winning Python answer which is ridiculously more clever than the recursive answer I originally had. Bravo!

Ohm v2, 4 bytes
ψD∩l

Try it online!
Explanation
   l    output the lenght of
  ∩     the set intersection between
ψD      two copies of all possible permutation of input

Stax, 3 bytes
═1╪

Run and debug it


text:
Distributing parliament seats
Introduction
In a general election, one would like to calculate a constant price per parliament seat. This means that for N >= 0 seats to be distributed and a list ns of votes per party, we would like to find a number d such that
sum(floor(n/d) for n in ns) == N

To make things interesting (and more like the real world), we add two more facts:

Two parties can gather in a 'coalition', so that the seats are given to the 'coalition' by the sum of votes for all parties in it. Then the seats the 'coalition' got are split between parties in a similar fashion (find divisor, etc.)

A party that didn't pass a certain percentage of the votes (e.g. 3.25%) automatically gets 0 seats, and its votes don't count for a 'coalition'.

Challenge
You are given :

A list of lists, each of the nested lists contains integers (number of votes), and is of length 1 for a single party, or length 2 for a 'coalition'.
Minimal percentage of votes (a.k.a "bar" for "barrage") to get seats, as a fraction (so 3.25% is given as 0.0325)
Total number of seats to be distributed between all parties (integer)

You are to print out the same nested list structure, with the number of votes substituted with parliament seats.
Winner is the code with the smallest amount of bytes.
Corner cases:

There might (and usually will be) more than one possible divisor. Since it is not in the output, it doesn't really matter.
Imagine N=10 and ns = [[1]], so the divisor may be 0.1 (not an integer)
Some cases can't be solved, for example ns=[[30],[30],[100]], bar=0, N=20. There's a boundary with d=7.5 where the sum of floored values jumps from 19 to 21. You are not expected to solve these cases. (thanks to community member Arnauld for pointing this case out)

Example Input and Output
A very not-optimized Python3 example:
from math import floor

def main(_l, bar, N):
    # sum all votes to calculate bar in votes
    votes = sum(sum(_) for _ in _l)

    # nullify all parties that didn't pass the bar
    _l = [[__ if __ >= bar * votes else 0 for __ in _] for _ in _l]

    # find divisor for all parliament seats
    divisor = find_divisor([sum(_) for _ in _l], N)

    # find divisor for each 'coalition'
    divisors = [find_divisor(_, floor(sum(_)/divisor)) for _ in _l]

    # return final results
    return [[floor(___/_) for ___ in __] for _, __ in zip(divisors, _l)]

def find_divisor(_l, N, _min=0, _max=1):
    s = sum(floor(_ / _max) for _ in _l)
    if s == N:
            return _max
    elif s < N:
            return find_divisor(_l, N, _min, (_max + _min) / 2)
    else:
            return find_divisor(_l, N, _max, _max * 2)

print(main(l, bar, N))

Example input:
l = [[190970, 156473],
    [138598, 173004],
    [143666, 193442],
    [1140370, 159468],
    [258275, 249049],
    [624, 819],
    [1125881],
    [152756],
    [118031],
    [74701]]
bar = 0.0325
N = 120

And its output:
[[6, 4], [0, 5], [4, 6], [35, 5], [8, 8], [0, 0], [35], [4], [0], [0]]

Some more example outputs:
If bar=0.1 we get an interesting stand-off between two parties as none of the smaller parties are counted in:
[[0, 0], [0, 0], [0, 0], [60, 0], [0, 0], [0, 0], [60], [0], [0], [0]]

And if N=0 (corner case) then of course no one gets anything:
[[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0], [0], [0], [0]]

Welcome to PPCG!

Welcome to CGCC (previous known as PPCG)! I took the liberty of adding Python highlighting so your code becomes more readable, and I've put the input below the code so the input-output are closer together. I've also added two relevant tags. Nice first challenge though, so +1 from me! PS: You could use the Sandbox of proposed challenges to get feedback on challenges before posting them to main, although in this case I think the challenge is clear. Perhaps add a few additional test cases? Enjoy your stay :)

Sure thing @KevinCruijssen, I added two more cases. As for the existing output I trust it to be true as it's the exact results of a recent election :)

@Arnauld Out of curiosity, what should the expected output be for that test case?

I already added a bullet in the corner case, I think that this is an unsolvable case as in the boundary d=7.5 you get a jump from 19 seats to 21 seats.

@scf Oh, OK. Sorry, I missed the edit.

Can the divisor always be a whole number, and if not, can you add a testcase showing that?

The divisor may be a fraction, as seen in the second "special cases" bullet.

05AB1E, 42 39 bytes
ÐOOI*@*DO¸I¸¸2Fнζε`sDO/*Ð©±/D{®1%Oòè‹+ï

Try it online!
05AB1E lacks good recursion, so implementing a binary search as in the reference code would be painful. Thankfully, we don’t need to find the divisor at all!
Let’s use a simple example: [600, 379, 12, 9] votes, 100 seats, no coalitions, no bar. First, we compute how many fractional seats each party gets, defining fractional seats as party_votes * seats / sum_of_votes. In our example, that yields [60, 37.9, 1.2, 0.9].
The interesting bit is that if a party gets f fractional seats, it will get either int(f) or int(f) + 1 real seats. This means we already know how 60+37+1 = 98 of the seats will be allocated, and we’re left with 2 “bonus seats” to distribute among the 4 parties (no party can get more than 1 bonus seat). Who do these bonus seats go to? The parties with the highest ratio of f / (int(f) + 1) (proof left as an exercise to the reader). In our examples, the ratios are [0.98, 0.997, 0.6, 0.9], so the first two parties get a bonus seat each.

Let’s take a look at the code. First, we replace the vote count of all parties that didn’t meet the bar with 0:
Ð          # triplicate the first input (list of votes)
 OO        # flattened sum
   I*      # multiply by the second input (bar)
     @     # greater than? (returns 0 or 1)
      *    # multiply

Now, to work around the lack of recursion, we use an awkard 2F to repeat the main code twice. On the first pass it’ll distribute the total seats between coalition, and on the second pass it’ll distribute each coalition’s seats between its parties. Since the first pass runs only once, but the second pass runs for each coalition, this involves rather a lot of busy work.
DO¸I¸¸2Fнζε`s    # i don’t want to detail this tbh

Okay, after this obscure bit, the top of the stack is now a list of votes (coalition votes on the first pass, party votes on the second), and below that is the number of seats to allocate. We use this to compute the list of fractional seats:
D        # duplicate
 O       # sum
  /      # divide each vote count by the sum
   *     # multiply by the number of seats
    ©    # save the fractional seats in variable r

Now, we compute the ratios:
Ð            # triplicate
 ±           # bitwise not
  /          # divide

Bitwise not works beautifully, here. It truncates to integer, adds 1, and negates, all in a single byte. Why negate? In 05AB1E, division by 0 returns 0, and we need these to sort last.
D{             # sorted copy of the ratios
     ®1%          # fractional votes mod 1 (aka the decimal parts)
        O         # sum of the above (this is the number of bonus seats)
         ò        # round to nearest (required due to floating point bs)
          è       # index into the sorted ratios
This gives us the (n+1)th best ratio, where n is the number of bonus seats (+1 because indexing is 0 based). Thus, the parties that get a bonus seat are those that have a ratio strictly less than this.
‹      # less than
 +     # add to the fractional seats
  ï    # truncate to integer

Very nice. Great way to use math to optimize your code :)

Python 2, 220 bytes
def d(l,n,a=0,b=1.):s=sum(x//b for x in l);return s-n and d(l,n,*[a,b,(a+b)/2,b*2][s>n::2])or b
def f(l,b,n):l=[[x*(x>=b*sum(sum(l,[])))for x in r]for r in l];return[[v//d(x,sum(x)//d(map(sum,l),n))for v in x]for x in l]

Try it online!
Basically just a golf of the reference implementation...

Wolfram - no golf
Was just curious to solve it using LinearProgramming, not a golfing candidate, but maybe an interesting approach to a problem:
findDivisor[l_, n_] := Quiet@Module[{s, c, r, m, b, cons, sol},
   s = Length[l];
   c = Append[ConstantArray[0, s], 1];
   r = Thread[Append[IdentityMatrix[s], -l]];
   m = Append[Join[r, r], Append[ConstantArray[1, s], 0]];
   b = Append[Join[ConstantArray[{0, -1}, s], ConstantArray[{-1, 1}, s]], {n, 0}];
   cons = Append[ConstantArray[Integers, s], Reals];
   sol = LinearProgramming[c, m, b, 0, cons];
   {1/sol[[-1]], Most@sol}
   ]
solve[l_, bar_, n_] :=
 With[{t = l /. x_ /; x <= bar Total[l, 2] -> 0},
  With[{sol = findDivisor[Total /@ t, n]},
   {First@sol, MapThread[findDivisor, {t, Last@sol}]}]
  ]

Read some explanation and try it out!

Even though it's not a competitor, having some explanations about the method and the code would be great for educational purposes.

@scf I've added a link to my attempt at explaining it

Jelly, 63 36 bytes
F×S<ḷ×ḷµ§⁵:,1_×¥:@"§IṠʋ÷9ɗ¥ƬṪṪƲ¥¥@⁺"

Try it online!
A full program taking three arguments: the numbers of votes in the format described by the question, bar and N in that order. Returns a list of lists of seat counts. The footer on TIO is just to highlight the list structure of the output. (Otherwise Jelly hides [] for single-item lists.)
Explanation
F×S<ḷ×ḷµ§⁵:,1_×¥:@"§IṠʋ÷9ɗ¥ƬṪṪƲ¥¥@⁺"

F                                   | Flatten vote counts
 ×                                  | Multiply by bar
  S                                 | Sum
   <ḷ                               | Less than original vote counts (vectorises and respects input list structure)
     ×ḷ                             | Multiply by original vote counts
       µ                            | Start a new monadic link with processed vote counts as input
        §                           | Vectorised sum

         ⁵                      ¥@  | Apply the following as a dyad with the number of seats as the right argument and the vectorised sum of votes as left

           ,                  Ʋ¥    |(*)- Pair vote counts with seat sum and find divisor using the following as a monad:
            1             ¥Ƭ        |     - Starting with 1 as a guess for divisor, and using the paired vote counts and seat sum as the right argument, apply the following as a dyad, collecting intermediate results, until the results repeat
                         ɗ          |       - Following as a dyad:
                      ʋ             |         - Following as a dyad:
                :@"                 |           - Integer divide with arguments zipped and reversed, i.e. divide cote counts by current divisor guess and leave total seats alone
                   §                |           -  Vectorised sum (will sum vote counts but leave seat number alone)
                    I               |           - Find differences i.e. desired total seats minus current calculation based on current divisor guess. Will return a list.
                     Ṡ              |           - Sign of this (-1, 0 or 1)
                       ÷9           |         - Divide by 9 (-0.111, 0 or 0.111)
             _×¥                    |     - Now multiply the current divisor guess by this and subtract it from that guess to generate the next guess. If the current guess is correct, the guess will be unchanged and so the Ƭ loop will terminate
                            ṪṪ      |     - Take the last item twice (first time to get the final
                               output of the Ƭ loop and second to remove the list introduced by I
         :                          | - Integer divide the vote counts by the output of the above

                                  ⁺"| Apply the above dyad from the step labelled (*) again, this time with the output of the previous step (total votes per coalition) as right argument and the vote counts as left argument, zipping the two together and running the link once for each pair

Original Submission (larger but more efficient)
Jelly, 63 bytes
:S_3ƭƒṠ©ḢḤ;$;ṪƲṖÆm;ḊƲ®‘¤?ß¥/}ṛ¹?,
1,0;çḢḢ
FS×Ċ’<ḷ×ḷµ:"§:⁵ç$$ç"Ɗ

Try it online!

Nice submission. I tried it with the input [[1]] 0.0 10, which I expect to return [[10]] (see bullet point 2 in corner cases) and got timed out. Can you confirm it's just extremely long run time and not a bug?

The original submission works with that input BTW.

@scf I’d incorrectly assumed votes were always much higher than seats. Revised version should work ok (and is much more efficient).

Nice, looks good! It'd be nice if you could explain the code a bit.

Naiive question: why is the Ceiling important? If I understand correctly you perform ceiling on the minimal number of votes, however it's unnecessary for the comparison.

@scf Quite right. I’d previously needed it but not any more. Thanks!


text:
Find the C-factor of a vote
In this challenge you will be determining how controversial a vote is, given an array of other votes, by figuring out a number called the C-factor. What is the C-factor, you ask?
Well, imagine you've got multiple votes on an election. We'll use 1 and 0 for the sake of the challenge to represent two different candidates in an election. Here's the ten votes in our sample election:
0110111011

Now, say we want to find the C-factor of any vote for candidate 0. We can do that with the following function:
$$
f(o,v) = abs(o-mean(v))
$$
In \$f\$, o is the vote we want to determine the C-factor for, and v is an array of votes. So, using our function, to get the C-factor of any vote for candidate 0:
$$
f(0, [0,1,1,0,1,1,1,0,1,1]) = 0.7
$$
A lower C-factor shows that the vote was less controversial in comparison to the other votes. So, a vote for candidate 0 is more different from the other votes than a vote for candidate 1. In comparison, the C-factor for a candidate 1 vote is \$0.3\$, so it is less controversial because it is more like the other votes.
The Challenge
Write a function \$f(o,v)\$ to determine the C-factor of a vote o given results of a vote v.

o must be an integer, either 0 or 1.

v must be an array (or similar container type depending on language specifications) of arbitrary length containing zeroes and ones.

The function should return or print to the console the resulting C-factor given the function parameters, using the formula above or a modified method.

Good luck! The least bytes wins (winner chosen in five days).

Isn't mean(v) equal to 0.7 in your example?

@HyperNeutrino Yes. What's the issue?

How is abs(0 - 0.7) equal to 0.3?

Ah. Fixed the example. I reversed the two numbers

Oh okay. Thanks for clarifying!

Can one's program output a fraction?

Jelly, 3 bytes
ạÆm

Try it online!
Literally just "absolute difference to mean".
ạÆm  Main link
ạ    Absolute difference
 Æm  Arithmetic Mean

If you invert the arguments you can invert the atoms.

R, 23 bytes
function(o,v)mean(o!=v)

Try it online!
The challenge boils down to computing the proportion of values in v different from o (i.e. mean(xor(o,v))). We can therefore avoid using abs.

Also works for arbitrary voting representations, neat.

APL (Dyalog Unicode), 9 8 5 bytes
≠⌹⊢=⊢

Try it online!
Anonymous train. Thanks to @Adám for a byte saved, and thanks to @ngn for 3 bytes!
How:
≠⌹⊢=⊢ ⍝ Anonymous Train
    ⊢ ⍝ The right argument (⍵)
  ⊢=  ⍝ Equals itself. Generates an array of 1s
≠     ⍝ XOR left (⍺) and right args; generates ⍵ or (not ⍵), depending on ⍺.
 ⌹    ⍝ Divide these matrices.

you can do it in 5. hint: ⌹

Actually, 3 bytes
♀^æ

Try it online!
Explanation:
♀^æ
♀^   XOR each vote with candidate (0 if matches, 1 if not)
  æ  mean of the list

05AB1E, 3 bytes
ÅAα

Try it online!

I'm 30 seconds too late.. My order was different though, first α then ÅA ;p

@KevinCruijssen I watched your solution come in in real-time, I started to comment, and it was deleted, all within about 30 seconds. Hilarious!

@KevinCruijssen I don't really understand how the two orders work the same... :-) My 05AB1E knowledge is not very good

@LuisMendo Well, whether we first calculate the mean of the list and then the absolute difference of this list with the second input, or first the absolute difference between each value in the list with the second input, and then calculate the mean of that updated list, it'll results in the same output. As long as the list is the first input, either order of the builtins is fine. I think the same applies to Jelly if the list is the first argument tbh.

@KevinCruijssen Ah, I see. What was confusing me is that the two approaches give different results for arbitrary numbers; but for 0/1 inputs they seem to agree. Example

@LuisMendo Ah, yes, you're indeed right. I tested it with a few other integers, but those gave the same results as well regardless of the order (but your test case with 0.8 indeed differs). If the input could have contained something else besides 0/1, your approach of first getting the mean and then the absolute difference is correct when we compare it to the formula in the challenge description. With only 0s/1s some alternative 3-byters are possible as well, like ÊÅA.

Octave, 16 bytes
@(a,b)mean(a!=b)

Try it online!

Attache, 11 8 bytes
Mean@`/=

Try it online! Takes arguments as f[o, v].
Nothing terribly original.
Alternative approaches
11 bytes: Average@`/=
11 bytes: ${1-x~y/#y} Counts the occurrences of x in y divided by the length of  y, then subtracts that from 1.
11 bytes: {1-_2~_/#_} (Arguments are reversed for this one)
15 bytes: ${Sum[x/=y]/#y} A more explicit version of the above, without Average.

Elm 0.19, 48 bytes
f a v=abs(v-(List.sum a/toFloat(List.length a)))

Online demo here.

Retina 0.8.2, 27 bytes
(.),((?(\1)|()).)*$
$#3/$#2

Try it online! Outputs a fraction. Explanation: The first group captures o and the second group captures each entry of v, while the conditional ensures that the third group only makes a capture when the vote is dissimilar. The $# construction then returns the count of the relevant captures as desired.

Perl 5 -MList::Util=sum, 30 bytes
sub f{abs((shift)-sum(@_)/@_)}

Try it online!

K (Kona), 17 bytes
{_abs+/y-x%.0+#x}

Try it online!

C (gcc), 62 bytes
float f(o,v,l,k)int*v;{float r=0;for(k=l;k;)r+=v[--k]^o;r/=l;}

Try it online!
Call as f(int o, int *v, int length_of_v).

Proton, 26 bytes
(o,v)=>1-v.count(o)/len(v)

Try it online!
The output is a fraction because Proton uses sympy instead of regular Python numbers for better precision.
(-7 bytes; abs-diff to mean is shorter than mean of abs-diff; I'm actually dumb)
-1 byte thanks to Rod

@Rod I was trying to figure out how to optimize for the 1/0 input restriction but failed. Thanks!

Enlist, 3 bytes
nÆm

Try it online!
nÆm  Main Link
n    Not Equals (returns a list of whether or not each element is unequal to to the value)
 Æm  Arithmetic Mean

The language is very heavily inspired by Jelly to the point that it's probably more like me experimenting to try to recreate the structure of how Jelly is parsed with my own code.
-1 byte thanks to Mr. Xcoder

You can use n instead of _...A to save 1 (Try it online!).

@Mr.Xcoder Ooh nice. Yeah I realized the != trick after making this lol. Thanks!

JavaScript, 38 bytes
n=>a=>a.map(x=>n-=x/a.length)|n<0?-n:n

Try it

Perl 6, 20 bytes
{@_.sum/@_}o(*X!= *)

Try it online!
* X!= * is an anonymous function which takes the not-equals cross product of its two arguments.  It produces a sequence of Booleans; for example, 1 X!= (1, 0, 1) evaluates to (False, True, False).
{ @_.sum / @_ } is another anonymous function that returns the average of its arguments.  Boolean True evaluates to 1 numerically, and False to 0.
The o operator composes those two functions into one.

Ruby, 31 bytes
->o,v{v.count(1-o)/v.size.to_f}

Try it online!

Pyth, 4 bytes
aE.O

Explanation:
       ( implicitly set Q = eval(input()) )
a      Absolute difference between
 E     eval(input()) (this is the second line of input taken)
  .O   and the average of
    Q  (implicit) Q (the first line of input)

Input is in the format of:
[0,1,1,0,1,1,1,0,1,1]
0

with the array of votes first, and the candidate second.
Try it online!

JavaScript (Node.js), 47 42 bytes
-5 bytes from @arnauld
a=>b=>Math.abs(a-eval(b.join`+`)/b.length)

Try it online!

Japt v2.0a0, 6 bytes
aVx÷Vl

Try it

Java 8, 47 bytes
v->o->(o-=v.get().sum()/v.get().count())<0?-o:o

Try it online.
or alternatively:
v->o->Math.abs(o-v.get().sum()/v.get().count())

Try it online.
For both the inputs are a Supplier<DoubleStream> for the list of votes v and double for the vote o.
Explanation:
v->o->                 // Method with DoubleStream-Supplier & double parameters and double return
  (o-=v.get().sum()    //  Get the sum of the DoubleStream-Supplier
      /v.get().count() //  Divide it by the amount of items in the DoubleStream-Supplier
      )                //  Subtract this from `o`
       <0?-o:o         //  And get the absolute value of this updated value `o`

Common Lisp 49 bytes
Solution:
(defun c(o v)(abs(- o(/(reduce'+ v)(length v)))))

Try it online
Explanation:
(defun c(o v)
  (abs (- o (/ (reduce '+ v) (length v)))))

reduce applies an function over all list elements (+ in this case)
rest is just the base function, abs(o - mean(v))


text:
Convert a string containing integers to list of integers
What is the shortest way to convert a string containing integers separated by spaces to a list of integers?

input : "-3 1 5 8 10"
output : [-3, 1, 5, 8, 10]

I regularly face this situation and I wanted to know if there is a better way than (24 bytes):
list(map(int,s.split()))

Using map is way shorter than any of the ways I mentioned. You should do that.
Instead of calling list(...), you should use [*...] (21 bytes):
[*map(int,s.split())]

Or even better, if you switch to python 2, map will always return a list. (18 bytes):
map(int,s.split())

Try it online!
Original Post:

The straightforward way is going to be 26 bytes
[int(n)for n in s.split()]

Try it online!
However, if a tuple is acceptable instead of a list, we could use a trick to shave one byte off leaving us with 25 bytes
eval(",".join(s.split()))

Try it online!
This can be shortened even more with the replace function (24):
eval(s.replace(' ',','))

Try it online!
and even more with iterable unpacking (22):
eval(s.replace(*" ,"))

Try it online!
If you truly need a list, you can wrap it in [*...]. This is still shorter than the straightforward way by 1 byte:
[*eval(s.replace(*" ,"))]


text:
First occurrence in the Sixers sequence
The Sixers sequence is a name that can be given to sequence A087409. I learned about this sequence in a Numberphile video, and it can be constructed as follows:
First, take the multiples of 6, written in base 10:
6, 12, 18, 24, 30, 36, ...
Next, concatenate the numbers into a stream of digits:
61218243036...
Finally, regroup the stream into pairs and interpret each as an integer:
61, 21, 82, 43, 3, ...
As we're grouping the numbers into pairs, the maximum number in the sequence will be 99, and it turns out that all non-negative integers less than 100 are represented in the sequence. This challenge is to find the index of the first instance of a number in the Sixers sequence.
Input
An integer in the range [0-99]. You do not need to account for numbers outside this range, and your solution can have any behaviour if such an input is given.
Output
The index of the first occurrence of the input number in the Sixers sequence. This may be 0- or 1-indexed; please say which you are using in your answer.
Rules

The procedure to generate the sequence noted in the introduction is for illustrative purposes only, you can use any method you like as long as the results are the same.
You can submit full programs or functions.
Any sensible methods of input and output are allowed.
Standard loopholes are disallowed.
Links to test your code online are recommended!
This is code-golf, so shortest answer in each language wins!

Test cases
Here is a list of all input and outputs, in the format input, 0-indexed output, 1-indexed output.
0   241 242
1   21  22
2   16  17
3   4   5
4   96  97
5   126 127
6   9   10
7   171 172
8   201 202
9   14  15
10  17  18
11  277 278
12  20  21
13  23  24
14  19  20
15  29  30
16  32  33
17  297 298
18  35  36
19  38  39
20  41  42
21  1   2
22  46  47
23  69  70
24  6   7
25  53  54
26  22  23
27  11  12
28  62  63
29  219 220
30  65  66
31  68  69
32  71  72
33  74  75
34  49  50
35  357 358
36  80  81
37  83  84
38  25  26
39  89  90
40  92  93
41  27  28
42  42  43
43  3   4
44  101 102
45  104 105
46  8   9
47  177 178
48  110 111
49  13  14
50  28  29
51  119 120
52  122 123
53  417 418
54  79  80
55  128 129
56  131 132
57  134 135
58  55  56
59  437 438
60  140 141
61  0   1
62  31  32
63  75  76
64  5   6
65  120 121
66  82  83
67  10  11
68  161 162
69  164 165
70  58  59
71  477 478
72  170 171
73  173 174
74  34  35
75  179 180
76  182 183
77  497 498
78  85  86
79  188 189
80  191 192
81  18  19
82  2   3
83  78  79
84  93  94
85  7   8
86  37  38
87  168 169
88  12  13
89  228 229
90  88  89
91  218 219
92  221 222
93  224 225
94  64  65
95  557 558
96  230 231
97  233 234
98  40  41
99  239 240

It may be useful to know that considering 6, 2*6, 3*6,..., 325*6 is sufficient to generate all possible values

@LuisMendo You're right, I was debating whether to include that in the challenge description. A comment is a good place for it too :o)

Can we take the input-integer as string, with the ones $n<10$ padded with a leading 0 (i.e. 00, 01, 02, ...)?

@KevinCruijssen Hmmm, input as a string is fine, but left padding with 0 is a bit too far IMO.

@LuisMendo I found (experimentally) that 295*6 is sufficient to generate needed values: 295*6 = 1770 of which the 77 is the digit pair with the highest index (497/498).

JavaScript (ES6),  71 65  55 bytes
Output is 0-indexed.
n=>(g=([a,b,...c])=>b?a+b-n&&1+g(c):g([a]+6*++i))(i='')

Try it online!
How?
Using a recursive function, we either 'consume' the first 2 characters of the string of concatenated multiples of \$6\$, or append new characters if we have less than 2 of them.
Example for \$n=3\$:
 string | operation                          | result
--------+------------------------------------+--------
 ''     | not enough characters: append '6'  |   0
 '6'    | not enough characters: append '12' |   0
 '612'  | consume '61', increment the result |   1
 '2'    | not enough characters: append '18' |   1
 '218'  | consume '21', increment the result |   2
 '8'    | not enough characters: append '24' |   2
 '824'  | consume '82', increment the result |   3
 '4'    | not enough characters: append '30' |   3
 '430'  | consume '43', increment the result |   4
 '0'    | not enough characters: append '36' |   4
 '036'  | consume '03': success              |   4

Commented
n => (             // n = input
  g = (            // g is a recursive function taking either a string or an array of
                   // characters split into:
    [a, b,         //   a = 1st character, b = 2nd character,
           ...c]   //   c[] = array of all remaining characters
  ) =>             //
    b ?            // if b is defined:
      a + b - n && //   if n subtracted from the concatenation of a and b is not zero:
        1 + g(c)   //     add 1 to the final result and do a recursive call with c[]
                   //   (otherwise: yield 0 and stop recursion)
    :              // else:
      g(           //   do a recursive call with:
        [a] +      //     the concatenation of a (forced to an empty string if undefined)
        6 * ++i    //     and 6 * i, with i pre-incremented
      )            //   end of recursive call
)(i = '')          // initial call to g with an empty string,
                   // and i set to empty string as well (zero'ish)

Python 2, 93 92 85 83 81 68 65 59 bytes
f=lambda n,s='612',i=18:n-int(s[:2])and-~f(n,s[2:]+`i`,i+6)

Try it online!

-2 bytes, thanks to Grimy
-3 bytes, thanks to ArBo
-6 bytes, thanks to xnor

3 bytes shorter as a lambda: f=lambda n,s='612',i=3:n-int(s[:2])and f(n,s[2:]+`i*6`,i+1)or i-2

@ArBo Even better, f=lambda n,s='612',i=18:n-int(s[:2])and-~f(n,s[2:]+`i`,i+6) (0-indexed).

Perl 6, 31 bytes
{+(comb(2,[~] 1..ⅮX*6)...$_)}

Try it online!
Uses the 1-indexed sequence.
Explanation:
{                            } # Anonymous code block
              1..Ⅾ             # The range 1 to 500
                   X*6         # All multiplied by 6
          [~]                  # Join as one giant string
   comb(2,            )        # Split into pairs of characters
                       ...$_   # Take up to the input
 +(                         )  # And return the length of the list

Haskell, 82 ... 65 58 54 bytes
k$show=<<[6,12..]
k(a:b:c)t|read[a,b]==t=0|let=1+k c t

Try it online!

05AB1E, 9 bytes
₄L6*J2ôIk

0-indexed. Accepts either a single integer, or a list of integers as input.
Try it online or verify all test cases.
Explanation:
₄L         # Create a list in the range [1,1000]
  6*       # Multiply each value by 6
    J      # Join the entire list of integers together to a string
     2ô    # Split into parts of size 2
       Ik  # Get the index of the input integer(s)
           # (and output the result implicitly)

Is the default behavior to join as string, or are there separate operators for joining as string and joining as number?

@maxb Overall 05AB1E doesn't need any explicit conversions. All integers can also be used for string-functions like replace or split, and all created strings (which are integers) can also be used as numbers. So 100, "100", and 100.0 are the same for most functions like equal checks and such. There are still cast to int and cast to string functions in 05AB1E for some functionalities, like sorting (numeric vs lexicographic sorting), or for removing decimal digits after the comma from a float when casting to int, but they aren't used that often.

@maxb Relevant 05AB1E tip giving some additional examples.

APL (Dyalog Unicode), 26 bytes
{⍵⍳⍨⍎¨((≠\=⍨)⊂⊢)∊⍕¨6×⍳325}

Try it online! - Tests for all valid inputs.
How:
{⍵⍳⍨⍎¨((≠\=⍨)⊂⊢)∊⍕¨6×⍳325} ⍝ Dfn, input is ⍵.
                    6×⍳325  ⍝ Generates the first 325 multiples of 6.
                  ⍕¨        ⍝ Format each number into a string
                 ∊          ⍝ Enlist, flattens the vector
       (      ⊂⊢)           ⍝ Dyadic enclose, takes a boolean mask as left argument
        (≠\=⍨)              ⍝ Generates the mask 1 0 1 0...
                            ⍝ Enclose then returns the Sixers sequence as a string
     ⍎¨                     ⍝ Execute each element in the string, turning it into a numeric vector
 ⍵⍳⍨                        ⍝ Find the first occurrence of ⍵ in the vector

can you reshape the flattened vector like you can in K? Google suggests ⍴ but APL scares me...

@streetster yes, ⍴ is APL's reshape. So if you want to reshape a flattened vector, you just need to do <new shape vector> ⍴ <vector to reshape>

so could you use reshape to create the 2xN list and then convert each to integer?

You could, but I don't think that'd be shorter than my current answer. One problem would be that, for my answer, reshaping the string into a 1117×2 matrix and then converting to integers would create a vector with 1117, one digit integers. See the difference between the method I'm using versus reshaping

Ah, my flattened string gets reshaped into something more workable :)

Charcoal, 12 bytes
Ｉ⌕Ｉ⪪⭆φ×⁶⊕ι²Ｎ

Try it online! Link is to verbose version of code. 0-indexed. Explanation:
     φ           Predefined constant 1000
    ⭆           Map over implicit range and join
        ι       Current index
       ⊕        Incremented
     ×⁶         Multiplied by 6
   ⪪      ²     Split into pairs of digits
  Ｉ             Cast to integer
           Ｎ    Input as a number
 ⌕              Find its index
Ｉ               Cast to string
                Implicitly print

J, 29 26 bytes
-3 bytes thanks to FrownyFrog!
i.~_2(".\;)6<@":@*1+i.@325

Try it online!
0-based

i.~_2(".\;)6<@":@*1+i.@325

@FrownyFrog Thank you! Nice use of boxing!

Python 3, 87 81 Bytes:
lambda n:[*zip(*[iter(''.join(map(str,range(6,1951,6))))]*2)].index((*'%02d'%n,))

integer input, 0-indexed output.
Try it online!

-6 bytes, thanks to @TFeld.

Wolfram Language (Mathematica), 74 bytes
#&@@Position[FromDigits/@Flatten@IntegerDigits[6Range@365]~Partition~2,#]&

Try it online!
2 bytes saved from @Expired Data

You can get rid of one of the maps

I was working on this before I saw yours.. merged them and got 77 bytes

@ExpiredData nice. 74 bytes now

R, 75 62 bytes
-13 bytes thanks to Giuseppe.
match(scan(,''),substring(Reduce(paste0,3*(a=2*1:999)),a-1,a))

Try it online!

Brachylog, 14 bytes
;İS∧⟦×₆ᵐcġ₂iSt

Try it online!
Too slow for test cases with larger outputs.

x86-16 machine code, 54 53 bytes
00000000: bde5 032b e58b fc57 9633 c0b9 2701 0506  ...+...W.3..'...
00000010: 0050 e80d 0058 e2f6 965f 49f2 aff7 d103  .P...X..._I.....
00000020: e5c3 bb0a 0052 33d2 f7f3 85c0 7403 e8f4  .....R3.....t...
00000030: ff92 aa5a c3                             ...Z.

Listing:
BD 03E5     MOV   BP, 997       ; digits list buffer size
2B E5       SUB   SP, BP        ; allocate from stack
8B FC       MOV   DI, SP        ; DI = start of digits buffer
50          PUSH  AX            ; save input value
57          PUSH  DI            ; save buffer offset
33 C0       XOR   AX, AX        ; counter in AX = 0
B9 0127     MOV   CX, 295       ; generate 295*6 multiples
        SIX_LOOP:
05 0006     ADD   AX, 6         ; increment counter by 6
50          PUSH  AX            ; save AX (clobbered by OUT_DECU)
E8 000D     CALL  OUT_DECU      ; write AX to BCD at ES:DI
58          POP   AX
E2 F6       LOOP  SIX_LOOP      ; loop 295 times
5F          POP   DI            ; restore start of output buffer
58          POP   AX            ; restore input number
49          DEC   CX            ; loop count FFFFh (solution guaranteed)
F2 AF       REPNZ SCASW         ; search for input value
F7 D1       NOT   CX            ; ones complement sign without increment
03 E5       ADD   SP, BP        ; restore stack pointer
C3          RET
        OUT_DECU:               ; divide unsigned word AX into base 10
                                ;  decimal digits to buffer at ES:DI
BB 000A     MOV   BX, 10        ; decimal divisor = 10
        OUT_DECU_R:
52          PUSH  DX            ; save remainder digit / caller DX
33 D2       XOR   DX, DX        ; clear high word of dividend
F7 F3       DIV   BX            ; AX = DX:AX / 10, DX = DX:AX % 10
85 C0       TEST  AX, AX        ; is zero?
74 03       JZ    OUT_DECU_DONE ; loop while AX > 0
E8 FFF4     CALL  OUT_DECU_R    ; recursive call to next division
        OUT_DECU_DONE:
92          XCHG  AX, DX        ; AL = digit
AA          STOSB               ; write to digits list
5A          POP   DX            ; restore digit
C3          RET

Callable function, input value as little endian BCD in AX. Output 1-based index in CX.
The easy approach... generate the entire list and search it.
Note: I found experimentally that 295*6 is sufficient to generate needed values: 295*6 = 1770 of which the 77 is the value for the highest index (497 or 498). This would produce a string 997 digits long.
Tests:

PHP, 58 bytes
<?=array_search($argn,str_split(join(range(6,1950,6)),2));

Try it online!
Input is 0-based via STDIN.
$ echo 0|php -F sixers.php
241

$ echo 50|php -F sixers.php
131

Jelly, 10 bytes
ȷ×€6DFs2Ḍi

Try it online!
TIO link gives all values for 0 to 99.
Explanation
ȷ          | 1000
 ×€6       | each times 6 (using implicit range from 1..1000)
    D      | Convert to decimal digits
     F     | Flatten
      s2   | Split into pairs
        Ḍ  | Convert back from decimal digits to integer
         i | Find index of left argument to link

Java 10, 119 104 102 bytes
n->{int i=2;for(var s="612";!s.substring(0,2).equals(""+n/10+n%10);)s=s.substring(2)+6*++i;return~-i;}

Port of @TFeld's Python 2 answer.
-2 bytes thanks to @Imus.
1-indexed.
Try it online.
Explanation:
n->{                            // Method with integer as both parameter and return-type
  int i=2;                      //  Index-integer, starting at 2
  for(var s="612";              //  String, starting at "612"
      !s.substring(0,2)         //  Loop as long as the first two characters of the String
       .equals(                 //  Are not equal to:
               ""+n/10          //   The input integer-divided by 10 as String
               +n%10);)         //   Concatenated with the input modulo-10
                                //   (which will add leading 0s for inputs < 10)
    s=s.substring(2)            //   Remove the first two characters of the String
      +6*++i;                   //   And append 6 times `i`,
                                //   after we've first increased `i` by 1 with `++i`
return~-i;}                     //  Return `i-1` as result

Original 119 117 bytes version:
n->{var s="";for(int i=0;i<2e3;)s+=i+=6;return java.util.Arrays.asList(s.split("(?<=\\G..)")).indexOf(""+n/10+n%10);}

0-indexed.
Try it online.
Explanation:
n->{                            // Method with integer as both parameter and return-type
  var s="";                     //  String we're building, starting empty
  for(int i=0;i<2e3;)           //  Loop `i` in the range [0, 2000):
      s+=i+=6;                  //   Increase `i` by 6 first every iteration
                                //   And then append the updated `i` to String `s`
  return java.util.Arrays.asList(
          s.split("(?<=\\G..)") //  Split the String in parts of size 2 (as array)
         )                      //  Convert the array to a List
          .indexOf(             //  And get the index of the following in this list:
                   ""+n/10      //   The input integer-divided by 10 as String
                   +n%10);}     //   Concatenated with the input modulo-10

You can save 2 bytes by using ""+n/10+n%10 instead of n>9?n+"":"0"+n

C# (Visual C# Interactive Compiler), 123 bytes 115 bytes
a=>m.First(y=>int.Parse(string.Join("",m.Select((x,i)=>++i*6)).Substring(y*2,2))==a);var m=Enumerable.Range(0,640);

Try it online!

I think there's a bug in your solution somewhere, as f(61) should return 0 (it looks like your solution is 0-indexed)

Thanks @sok should be fixed now

APL+WIN, 37 bytes
Prompts for input of integer. 1 indexed.
↑(⎕=⍎,((n,2)⍴(⍕6×⍳n)~' '),' ')/⍳n←600

Try it online! Coutesy of Dyalog Classic

MathGolf, 10 bytes
•╒6*y░2/i=

Try it online!
Basically the same as the 05AB1E answer, but I lose a byte by having to convert the concatenated number to string explicitly.
Explanation
•╒             push [1, 2, ..., 512]
  6*           multiply by 6
    y          join array without separator to string or number
     ░         convert to string (implicit map)
      2/       split into groups of 2 characters
        i      convert to integer (implicit map)
         =     find index of implicit input in the array

K (oK), 22 bytes
Solution:
(.:'0N 2#,/$6*1+!999)?

Try it online!
Explanation:
0-indexed.
(.:'0N 2#,/$6*1+!999)? / the solution
                     ? / lookup right in left
(                   )  / do this together
                !999   / range 0..999
              1+       / add 1, range 1...1000
            6*         / multiply by 6, 6...6000
           $           / convert to strings
         ,/            / flatten
    0N 2#              / reshape into 2xN
 .:'                   / value each, convert to numbers

Ruby, 46 bytes
->n{[*6.step(5**5,6)].join.scan(/../).index n}

Try it online!

Clojure, 102 bytes
#(count(for[i(partition 2(for[i(range 1 326)c(str(* i 6))]c)):while(not=(seq(str(if(< % 10)0)%))i)]i))

So long! :(

CJam, 17 bytes
325,:)6f*s2/:~ri#

Try it online!
0-based.
Explanation
325,   e# Range [0 1 2 ... 324]
:)     e# Add 1 to each: gives [1 2 3 ... 325]
6f*    e# Multiply each by 6: gives [6 12 18 ... 1950]
s      e# Convert to string: gives "61218...1950"
2/     e# Split into chunks of size 2: gives ["61" "21" ... "95" "0"]
       e# Note how the last chunk has size 1; but it is not used
:~     e# Evaluate each string in that array: gives [61 21 ... 95 0]
ri     e# Read input as an integer
#      e# Index of fist occurrence, 0-based

Out of curiosity, why does CJam has builtins for all integers in the range $[10,20]$, as well as five different builtins that all default to an empty string "", but no builtins for $100$ or $1000$?

@KevinCruijssen Not sure... But having variables with predefined values like 0 or "" is sometimes useful for loops, because those are often the desired starting values. As for not having 100 or 1000, yes, I agree they would more useful than say 18 or 19

It's a shame that leading zeroes are annoying, otherwise you could ditch the :~ and i from your code. :(

Japt, 12 bytes
0-indexed.
L²õ*6 ¬ò b¥U

Try it or test all inputs
L²õ*6 ¬ò b¥U     :Implicit input of integer U
L                :100
 ²               :Squared
  õ              :Range [1,L²]
   *6            :Multiply each by 6
      ¬          :Join to a string
       ò         :Split to array of strings each of length 2
         b       :First 0-based index of
          ¥U     :Test for equality with U (bU wouldn't work here as each string would first need to be cast to an integer, costing more bytes)

Swift 5/Xcode 10.2.1, 140 134 133 bytes
let s=sequence(first:6){$0+6}.lazy.map{String($0)}.joined();return(0...).first{$0%2==0&&Int(String(s.dropFirst($0).prefix(2)))==n}!/2

Try it online!

Red, 97 94 bytes
func[n][(index? find/skip rejoin collect[repeat i 325[keep i * 6]]pad/left/with n 2 #"0"2)/ 2]

Try it online!

Stax, 11 bytes
Æ▒§±~>ûπ╞öt

Run and debug it
Input is an integer.  Output is 0-indexed.

Perl 5 -MList::Util=any -ap, 50 bytes
$\=0,$b.=6*++$,while!any{++$\;"@F"==$_}$b=~/../g}{

Try it online!
1-based output

Retina, 83 77 bytes
I am really out of practice at complicated programming in Retina, but I'm satisfied with the length I managed to do it in.
Outputs the 0-indexed result.
.+
6*1
325+-1%`1+
$0¶6*1$0
1+
$.0
¶

L`..
m`^0

$
¶$+
s`\b(\d+)\b.*\b\1$

C`¶

Try it Online

Explanation
.+                   Replace the input with 6 in unary
6*1
325+-1%`1+           Do 325 times: append line with previous + 6
$0¶6*1$0
1+                   Convert all lines to decimal
$.0
¶                    Remove line breaks

L`..                 List pairs of digits
m`^0                 Remove leading zeros

$                    Append the original input N on a new line
¶$+
s`\b(\d+)\b.*\b\1$   Remove occurrences of N and anything in between

C`¶                  Count the number of line breaks

Retina 0.8.2, 36 bytes
^
2406$*_
_{6}
$.`
^0(..)+?.*\1$
$#1

Try it online! Link includes test suite. 1-indexed. Explanation:
^
2406$*_

Prefix 2406 _s to the input.
_{6}
$.`

Replace every 6 _s with the number of preceding _s. This generates the sequence 0, 6, 12 ... 2400, but automatically concatenates the numbers.
^0(..)+?.*\1$

Skip the leading 0 and find the first pair of digits that match the last two digits i.e. the zero-padded input (because the string ends in 0; in fact the test suite uses the fact that it ends in 00).
$#1

Output the number of pairs of digits up to and including the match.
Retina 1 saves a couple of bytes because its string repetition operator is a byte shorter and already defaults to _ as its right-hand operand, so that the second line of code becomes just 2406*. Another feature of Retina 1 is the > modifier which generates the substitution in the context of the separator after the match, which in the case of $.>` causes it to include the length of the match in the result. Although this costs a byte we save it immediately as we don't need to match the 0 any more. (The repetitions also have to be reduced by 6.) Retina 1 can also do basic arithmetic in a substitution. This means that we don't have to resort to tricks to take multiples of 6, instead we just generate the numbers 1..400 and multiply by 6 in the substitution. Remarkably, this also doesn't affect the overall byte count, as the final result looks like this:
^
400*
_
$.(6*$>`
^(..)+?.*\1$
$#1

Bash, 80 bytes
1-indexed.
dc<<<6[p6+lax]salax|sed 's/./\n&/g;s/\n//'|sed 'N;s/\n//'|sed -n "/^0*$1$/{=;q}"

Try it online!

C# (Visual C# Interactive Compiler), 88 bytes
n=>{int i=2;for(var s="612";!s.StartsWith($"{n:d2}");s=s.Substring(2)+6*++i);return~-i;}

Try it online!
Another port of the Java and Python answers.
My original answer below:
C# (Visual C# Interactive Compiler), 102 bytes
n=>{dynamic s="",t=$"{n:d2}",i=0;for(;i++<400;s+=i*6);for(i=0;s[i++]!=t[0]|s[i++]!=t[1];);return i/2;}

Try it online!
Both solutions use 1-based indexing.

Husk, 11 bytes
€mdC2ṁod*6N

Try it online! Uses 1-based indexing.

Thunno 2, 9 bytes
k1R6×J²NȮ

Try it online!
0-indexed.
Explanation
k1R6×J²NȮ  # Implicit input
k1R        # Push the range [1..1000]
   6×      # Multiply each by 6
     J     # Join into a string
      ²    # Split it into pairs
       N   # Convert each to integer
        Ȯ  # First index of the input
           # Implicit output

Vyxal, 70 bitsv2, 8.75 bytes
₁²6v*ṅ2ẇĖḟ

Try it Online!
Explained
₁²6v*ṅ2ẇĖḟ
₁²6v*       # 6 × n for n in range [1, 1000]
     ṅ2ẇ    # Join the list into a single string and then wrap into pairs.
        Ėḟ  # Evaluate each and find the index of the input

Created with the help of Luminespire.