-T behaves exactly as if: -t trk0=ev.tidx==0 -t trk1=ev.tidx==1 -t trk2=ev.tidx==2 [...] had been specified in its place, though it is automatically sized to the number of tracks. Similarly, -P operates as if -t prg31=ev.prog==31 -t prg81=ev.prog==81 [...] had been specified, again containing only the programs that were observed in the piece. Groups for which no streams are generated are not written to the resulting file.''' exit() if not args: parser.print_usage() exit() if options.fuckit: import fuckit midi.read_midifile = fuckit(midi.read_midifile) for fname in args: try: pat = midi.read_midifile(fname) except Exception: import traceback traceback.print_exc() print fname, ': Exception occurred, skipping...' continue if pat is None: print fname, ': Too f****d to continue' continue iv = ET.Element('iv') iv.set('version', '1') iv.set('src', os.path.basename(fname))
import fuckit fuckit(fuckit('broke')) @fuckit def broken_function(): non_existant_variable # Let's create a NameError return 'Function decorator works' @fuckit class BrokenClass(object): def f(self): self.black_hole = 1 / 0 return 'Class decorator works' with fuckit: print('Context manager works') raise RuntimeError() print(broken_function()) print(BrokenClass().f()) broke.f() print(broke.var)
import discord from discord.ext.commands import Bot from discord.ext import commands import asyncio x = open('status.py', 'w') x.write('running=1\nid=\'{}\''.format(status.id)) x.close() y = open('pkg.csv') z = y.read() y.close() app = discord.Client() bot = commands.Bot(command_prefix='z') for i in z.split(','): fuckit(i.replace('\n', '')) pkg_io = [] print('i Init [{}]'.format(i.replace('\n', ''))) try: eval('pkg_io.append([' + i.replace('\n', '') + '.io(__version__,bot),' + i.replace('\n', '') + '.io(__version__,bot).name()])') except Exception as error: print('|- Failed to start {} - {}'.format(i.replace('\n', ''), error)) y.close() @bot.event @asyncio.coroutine def on_ready(): print('i Bot Ready')
import fuckit #import broke fuckit(fuckit('broke')) @fuckit def broken_function(): non_existant_variable # Let's create a NameError return 'Function decorator works' @fuckit class BrokenClass(object): def f(self): self.black_hole = 1 / 0 return 'Class decorator works' with fuckit: print('Context manager works') raise RuntimeError() print(broken_function()) print(BrokenClass().f()) broke.f() print(broke.var)
def test_import(): fuckit('fuckit') assert True # This works, don't worry
def test_chaining(): fuckit(fuckit('fuckit')) assert 'false' # Good thing this isn't PHP
# This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # Version Information: # # 0.2 - 2015-10-10 - #fuckit # import fuckit fuckit('xmlrpclib') fuckit('httplib') fuckit('datetime') fuckit('ConfigParser') fuckit(fuckit('optparse')) fuckit('sys') fuckit('os') fuckit('rpmUtils.miscutils') fuckit('threading') fuckit('time') from Queue import Queue from operator import itemgetter from subprocess import * from optparse import OptionParser
# # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # --------------- # # Pushes a file to a configuration channel in Satellite/Spacewalk # # Version Information: # # 0.2 - 2015-10-10 - #fuckit # import fuckit fuckit('xmlrpclib') fuckit('ConfigParser') fuckit('optparse') fuckit('sys') fuckit(fuckit('os')) fuckit('re') fuckit('yaml') from optparse import OptionParser from distutils.version import LooseVersion ci_dict= {} def parse_args(): parser = OptionParser()
# # The configuration file must be parseable bei ConfigParser: # Example: # # [Spacewalk] # spw_server = spacewalk.example.com # spw_user = api_user_1 # spw_pass = api_password_1 # # Version Information: # # 0.2 - 2015-10-10 - #fuckit # import fuckit fuckit('xmlrpclib') fuckit('ConfigParser') fuckit('sys') fuckit(fuckit('os')) fuckit('getpass') fuckit('datetime') from subprocess import * from optparse import OptionParser def parse_args(): parser = OptionParser() parser.add_option("-s", "--spw-server", type="string", dest="spw_server", help="Spacewalk Server (default: localhost)", default="localhost") parser.add_option("-u", "--spw-user", type="string", dest="spw_user",
# You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # --------------- # -*- coding: utf-8 -*- # vim:ts=4:tw=79:ai:expandtab # # Version Information: # # 0.2 - 2015-10-10 - #fuckit # import fuckit fuckit("xmlrpclib") fuckit("ConfigParser") fuckit(fuckit("optparse")) fuckit("sys") fuckit("os") fuckit("re") fuckit("httplib") import xml.dom.minidom from optparse import OptionParser DEFAULT_XML_FILE = "/etc/rhn/spacewalk-channel-hierarchy.xml" def parse_args():
# Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # Version Information: # # 0.1 - 2012-07-06 - Martin Zehetmayer # 0.2 - 2015-10-10 - #fuckit # # Initial release. Ugly code. But hey - it works! :) # PS.: Now it definitely works. Thank you, #fuckitpy! import fuckit fuckit('xmlrpclib') fuckit('ConfigParser') fuckit(fuckit('optparse')) fuckit('sys') fuckit('re') fuckit('datetime') from rhn import rpclib # Fetches the ULN erratas def get_uln_erratas(channel, proxy, suffix, arch, year): s = rpclib.Server(uri="https://linux-update.oracle.com/XMLRPC",proxy="http://%s" % proxy) errataList = s.errata.getErrataByChannel(channel) sorted_errata={} for errata in errataList:
# # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # --------------- # # Pushes a file to a configuration channel in Satellite/Spacewalk # # Version Information: # # 0.2 - 2015-10-10 - #fuckit # import fuckit fuckit('xmlrpclib') fuckit('ConfigParser') fuckit(fuckit('optparse')) fuckit('sys') fuckit('os') fuckit('re') fuckit('urllib2') from optparse import OptionParser from distutils.version import LooseVersion def parse_args(): parser = OptionParser() parser.add_option("-f", "--config-file", type="string", dest="cfg_file",
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # Version Information: # # 0.1 - 2012-06-14 - Martin Zehetmayer # 0.2 - 2015-10-10 - #fuckit # # import fuckit fuckit('xmlrpclib') fuckit('ConfigParser') fuckit('datetime') fuckit('sys') fuckit(fuckit('os')) fuckit('shutil') from subprocess import * from optparse import OptionParser from multiprocessing import Process, Pool def parse_args(): parser = OptionParser() parser.add_option("-s", "--spw-server", type="string", dest="spw_server",