New to All of This, Trying to Use "Video Killed the Radio Star" - artificial-intelligence

I thought I'd step a toe into exploring AI for generating music videos, and found the "Video Killed the Radio Star" tool in Colab. Not knowing anything about any of this (and knowing I was going in mostly blind), I thought my tiny bit of familiarity with code could help me muscle through.
Alas, to no avail; each time I have tried I have encountered the same "IndexError: list index out of range" on my compilation step:
IndexError Traceback (most recent call last)
<ipython-input-16-04c12e9d8f67> in <module>
110 prompt_starts = storyboard.prompt_starts
111 batch_gen = BackgroundGenerator(
--> 112 [(idx, rec, process_sequence(idx))
113 for idx, rec in enumerate(prompt_starts)]
114 ,max_prefetch=2)
I figure this means there's a table somewhere that needs to match the output image index the generator will use to create the video file, and for some reason it does not; but, I can't find a way to audit wherever this index may be nor what the discrepancy is.
Does anyone have any pointers where I should start with troubleshooting this error?
Trying to execute: https://github.com/dmarx/video-killed-the-radio-star

Related

How to loop through Roblox studio to find all the humanoid and choose which is the closest one to chase? (For an Npc)

I want to make a Npc that chases the nearest humanoids (Npc or Player) and I'm not sure how to loop through workspace to do that.
I tried experimenting with for loops but I'm a noob and I need help.
Ok i figured it out but One problem though, I use this script to check whether the npc is close and if its less than 3 to damage the other fighter... (fighter.HumanoidRootPart.Position.X. - closestEnemy.HumanoidRootPart.Position.X).Magnitude < 3...but when it runs and the npcs chase each other and they Touch each other it prints 55 or 30 even though they are legit touching each other.
Get the distance between you and the entity and check if its smaller. Its very simple math

How to find a pointer in a game?

I am trying to find the offset/pointer for FIFA 22 timed finishing.
For example, if you double press "D" it will activate the timed finishing mechanic.
If you press them too quickly, too late or in the right time it will show like this "TOO EARLY" "TOO LATE" "EARLY" "GREAT TIMING"
I am trying to find this offset to modify, so everytime you shoot with timed finishing, so it will appear" GREAT TIMING" even if you don't do it right.
In FIFA 20, the offset is right here, in the attached photo.
Memory adress : 142BEC9A and you need to modify the C5 into C7, and all shots will be with green saying great timing.
But in FIFA 22, I cant' find it.
Can someone help me please, how do I know where to look? I mention I didn't found fifa 20 memory adress alone, I just got it from someone's cheat engine table.
How do I know where to find that memory adress for fifa 22 ?
https://www.youtube.com/watch?v=tk_F...channel=247CTF
Here it's a video so you can know how this game mechanic works, here in fifa 21, I had timed finishing hack activated, and as you can see, all shots were perfect.
How do I find that offset/pointer? Because it's not like searching for HP or Ammo in a shooter, to search 100, get some damage, and then do some rescan.
In the photo I posted, the adres 142BECD9A it's responsible 4for timed finishing.
The only thing I should do in that dump, is to modify the C5 into C7, and voila, all shots will be perfect.
My question is, how do you find this to modify in FIFA 22??
Ok, I don't personally own or play FIFA, but i've looked at the mechanic and can give you a few tips as to how to find it. But before that keep in mind that finding a code and knowing how to modify it is not a trivial task, like finding a value and changing it and may require you to have way more experience with cheat engine, game logic and assembly.
What you are trying to find is an instruction or instructions somewhere in the code which are responsible for figuring out how well you did the timing shot. There are many ways to get there, but my usual method is to start by finding a value very closely related to the instruction.
For example: If you are looking for an instruction that executes when the player gets damaged, you should probably find the player health, since it will likely be modified by that instruction.
With FIFA i noticed there is a bar that appears over the player's head when he does the timing shot in which bar there are lines moving towards the center. There is likely a value associated with the current value/position of that bar. Maybe when it's in the red zone the value is:10, and when it's in the green zone it might be 95-100.
To find it you can use the speedhack to slowdown your game and then search for unknown float/4 byte value and search for incremented.
Once you find the value play around with it and see if you can force it to be such that it always gives you the 'Great shot'
For changing the code:
With the value in hand you can use a 'find out what writes to that address' to find the code that modifies that value. If you can understand it and the instructions around it, you may be able to write a script that always sets it to a value that would cause it to give you 'Great timing'

XOR neural network seems to converge around 0.5

I'm trying to code a XOR neural network for some weeks, but I always face the same problem. First of all you have to know that I spent hours and hours trying all I found on the net but nothing worked.
After trying to do it using 3Blue1Brown videos on the subject without success, I am now using this http://neuralnetworksanddeeplearning.com/chap2.html. I coded a Matrix library
with all the necessary functions.
My network does have 3 layers with: 2 input neurons, 2 hidden neurons, 1 output neuron.
Moreover I have 2 biases pointing the hidden neurons, and one pointing the output neuron. I use the sigmoid function to have values between 0 and 1, and the quadratic cost function. Everytime I train the network (ie everytime I use backpropagation) I choose a random input with its corresponding output.
The problem is, whatever how many times I train it, the output is never even close to 0 or 1 but always messing around 0.5, and my cost function is stuck around 0.14.
ANY HINT OR HELP IS APPRECIATED -- I really don't get where the problem is, I feel like I've tried everything. PS: Did not show any code here, if needed, don't hesitate to say it.
I've managed to resolve my problem by adding layers in my network. Moreover, when I improved it in order to code an OCR, I added a learning rate to escape from local miminas which were partly the problem everytime my network was getting stuck.

How to fix "cannot find ExtGState dictionary" in mupdf?

On Linux I'm using the mupdf library to convert a pdf to a png using the mudraw command:
mudraw -o thefile.png thefile.pdf 1
This normally works perfectly fine, but for one pdf I get the following output:
error: cannot find ExtGState dictionary
error: cannot set graphics state
warning: Ignoring errors during rendering
error: cannot find XObject dictionary when looking for: 'R132'
error: cannot draw xobject/image
Since I had never heard of ExtGState I looked it up and according to the PDF specs, "it specifies a PDEElement object's extended graphics state, which is part of its graphics state", or according to a post here on SO "It specifies a function that should be used for processing colors or color components".
I also found the line of C-code on which the error gets thrown, but since my C skills are not so well, and my knowledge of the PDF specifications even worse I don't really have a clue what the source of the trouble is.
Could anybody shed some more light on this error, and possibly point my in the direction of a solution? All tips are welcome!
[EDIT]
The file which is giving me trouble can be downloaded here.
Sounds like your PDF file is broken. As yms said, post an example file
[edit]
The file contains a Form XObject:
141 0 obj
<<
/FormType 1
/Subtype /Form
/Type /XObject
/BBox [ 2972.77002 2600.78003 6097.58008 3245.17993 ]
/Matrix [ 1 0 0 1 0 0 ]
/Length 91
/Group 138 0 R
>>
This does not include a Resources entry, so any objects defined by reference will have to inherit from the parent Resources. The stream is :
stream
/R131 gs
q
2980 1958.9 2700 1340 re W n
q 3124.8 0 0 644.4 2972.78 2600.78 cm
/R132 Do
Q
Q
endstream
Notice that this uses two named objects /R131 and /R132. From context we can see that R131 is a graphics state (an ExtGState in fact) and R132 is an XObject (either an image or a form).
This form appears to be used only as a Group in a couple of places, both times for an SMask. One of those is from the Page object, as a ExtGState, the other, although defined doesn't appear to be used at all (its legal to have unused objects in a PDF file)
So its only used once, from the Page object. Since the Form XObject doesn't have a Resources dictionary we consult its parent (the main Page) which does have a Resources dictionary. But that Resources dictionary does not define the named objects R131 or R132. This means that MuPDF can't find those objects, so it can't use them.
So essentially your PDF file is invalid. It will render (MuDraw does render a PNG file from it), but the result may not be what was intended. There's no way for me to tell.
Note that Adobe Acrobat also throws an error viewing this PDF file.
Assuming you really did use Ghostscript to create this file (which is what the Producer metadata says) my recommendation is that you upgrade to something rather more recent. The current version is 9.18, this was created using 9.10 whcih is 2 years old. However the file has also been modified using something called TCT 5.7.0.1 which I've not previously heard of. It may be that this modification is what broke the file, I can't tell.

Why does my touch develop script keep crashing?

The question isn't exactly concerned with touch develop rather just basic programming "structure" or syntax.
what I am trying to do is create a simple compass working on the phones heading capability. The heading capability just spits out degree readings to several (like 12) decimal places.
Anyway, even just letting the phone spit out the heading, eventually the phone will crash, why is that? Running out of memory?
The reason I came here is because of this:
I want to update the page with a photo of an associated rotation based on degree readout. I can't figure out how to do something like if 0 < x < 1 post this picture. Since the heading readout varies like 321.18364947363 and 321.10243635471
So currently I am testing this: several if / if else statements saying if heading output is 1 post picture with 1 degree rotation, 2 post picture with 2 degree rotation. This definitely and guaranteed crashes the phone. Why? Memory?
If you are a touch developer, would it be easier and more sane to simply take a round object, center it in relation to a square image and use it as a sprite or object which then you can dictate what angular velocity and position the object has without doing / using 360 individual images.
GAH! Damn character limits / thread format
this is what follows what I last wrote below for anyone that cares :
The concept seems simple enough but I am basically a programming noob, I was all over the place trying to learn Python, Java and C/C#/C++. ( I wrote this on my Windows Phone 8 but I was unable to copy the text ( GAY ) ) I am happy to have come across Touch Develop because it is better for me as a visual learner. (Thanks for the life story )right ? haha
The idea would have been to use this dumb pink against black giant compass with three headings / points of interests namely A fixed relative north, the heading and a position given by the person to be found's lat and long coordinates relative to the finder's phone's current location (lat and long ). This app in my mind would be used for party scenarios. I would have benefited from this app had the circumstances been right, I was lost at a party and I had to take a cab home for $110.00 because I didn't drive to that party.

Resources