free software resistance
the cost of computing freedom is eternal vigilance
### fb.figb.py
*original date:* apr 2017
*originally posted:* oct 2024
fb.figb.py:
```
#!/usr/bin/env python
# encoding: utf-8
# figbuzz translator version: figbuzz 0.1
import sys, os
from sys import stdin, stdout
from os import chdir as figoch
from os import popen as figpo
from os import system as figsh
from os import name as figosname
figsysteme = 0
figfilehandles = {}
figfilecounters = {}
from sys import stdout
def fignonz(p, n=None):
if n==None:
if p == 0: return 1
else:
if p == 0: return n
return p
def fignot(p):
if p: return 0
return -1
figbac = None
figprsbac = None
sub = None
def fignone(p, figbac):
if p == None: return figbac
return p
return -1
def figsgn(p):
p = float(p)
if p > 0: return 1
if p < 0: return -1
return 0
def figstr(p): return str(p)
def figprint(p): print p
def figprints(p): stdout.write(str(p)) ; sys.stdout.flush()
def figint(p): return int(p)
def figplus(p, s):
if type(p) in (float, int):
if type(s) in (float, int):
p = p + s
else:
p = p + s # float(s) if you want it easier
if p == float(int(p)): p = int(p)
else:
if type(p) == str: p = p + s # str(s) if you want it easier
if type(p) == list:
if type(s) == tuple:
p = p + list(s)
elif type(s) == list:
p = p + s[:]
else:
p = p + [s]
if type(p) == tuple:
if type(s) == tuple:
p = tuple(list(p) + list(s))
elif type(s) == list:
p = tuple(list(p) + s[:])
else:
p = tuple(list(p) + [s])
return p
def figtimes(p, s):
if type(p) in (float, int):
p = p * s # float(s) if you want it easier
if p == float(int(p)): p = int(p)
else:
if type(p) == list:
p = p[:] * s # figval(s)
else:
p = p * s # figval(s) if you want it easer
return p
def figdivby(p, s):
p = float(p) / s
if p == float(int(p)): p = int(p)
return p
def figminus(p, s): return p - s
def figmod(p, s):
return p % s
def figfunction(p, s): return p
def figend(x): quit()
def figsystem(x): quit()
#### http://creativecommons.org/publicdomain/zero/1.0/
for fb in range(int(float(1)), int(float(100)) + figsgn(1), fignonz(int(float(1)))):
while 1:
if float(fb) / 5 == int(fb / 5):
if float(fb) / 3 == int(fb / 3):
figlist = 0
try: figlist = int(type(now) == list)
except NameError: pass
if not figlist: now = 0
now = "fizzbuzz" ; figprint(now) ;
break
if float(fb) / 5 == int(fb / 5):
figlist = 0
try: figlist = int(type(now) == list)
except NameError: pass
if not figlist: now = 0
now = "buzz" ; figprint(now) ;
break
if float(fb) / 3 == int(fb / 3):
figlist = 0
try: figlist = int(type(now) == list)
except NameError: pass
if not figlist: now = 0
now = "fizz" ; figprint(now) ;
break
figlist = 0
try: figlist = int(type(now) == list)
except NameError: pass
if not figlist: now = 0
now = fb
figprint(now) ;
break
```
license: 0-clause bsd
```
# 2017 mn
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
```
=> https://freesoftwareresistance.neocities.org