Skip to content

EFN 4.2 - Modern Freedom

Choose a tag to compare

@Takax62 Takax62 released this 20 Dec 18:35
· 11 commits to main since this release
f3a4ca3

What's new:

  • Tensorflow, mpmath, numpy, librosa, moviepy, ssl, inspect, pycryptodome, paramiko, markovify and pytorch functions
  • New Alpha Glass design
  • reversed() function
  • locals(), globals()
  • matplotlib pyplot image showing
  • safe evalution and expression-only evalution
  • isspace() function
  • WinAero-like window creation
  • Bug fixes (like the assembly write and normal write, now assembly write is writeasm())
  • And more...!

Examples:
isspace() function:

isspace(variable)

WinAero window:

gui = createwinaerowindow("Test", "500x500+500+345", "lime", "", fullscreen=False)
rungui(gui) # You can resize, minimize the window (bring back the minimized window with Ctrl+R) and close it.

Image blur:

imageblur() # Will generate a blue-green-yellow blur image

Image style switching (styles: similar, cold, warm, green, redrose):

img = stylizeimageto(your_image_here, style=your_pick_here, alpha=1.0)
mainimg = img.numpy().squeeze()
plt.imshow(mainimg)
plt.axes('off')
plt.show()

JPEG checker:

isJpeg(contents)

Encoding png file:

encodePng(image, compression=-1)

Alpha Glass:

def demo():
    root = tk.Tk()
    root.title("Liquid Glass Demo")
    root.geometry("520x360")
    root.configure(bg="#232428")

    canvas = tk.Canvas(root, width=420, height=240,
                       highlightthickness=0, bd=0, bg="#232428")
    canvas.place(relx=0.5, rely=0.5, anchor="center")

    def update():
        glass = createglassbg(420,240,blur=18,tint=(255,255,255,110),radius=30)
        photo = ImageTk.PhotoImage(glass)
        canvas.delete("all")
        canvas.create_image(0,0,anchor="nw",image=photo)
        canvas.image_ref = photo

        canvas.create_text(210,120,
                           text="Test",
                           font=("Helvetica",22),
                           fill="#1e1f22")

        root.after(50, update)

    update()
    root.mainloop()


if __name__ == "__main__":
    demo()

Scientific operation:

write(scientificoperation("sqrt", 5))

Scientific pi:

setprecision(digits=10) # or whatever you want
write(mpmath.pi)

Expression-only evalution:

write(expressionevalution(9803*302)) # Will print the result
write(expressionevalution("hi")) # Errors/returns None

Safe evalution:

write(safeevaluate(1+1)) # Prints 2
write(safeevaluate(print("hi"))) # Errors/returns None

Business day count:

write(businessdaycount('2025-01-10', '2025-01-29', weekmask='1111100', holidays=None))

Zeta:

write(zeta(9))

Siegel theta:

write(siegeltheta(7))

Tensorflow hub loading:

loadfromhub(toload)

Scientific square root:

write(scientificsqrt(7))

locals():

write(localitems())

globals():

write(globalitems())

EFN's new Tensor() class (setup and examples):

tensor = Tensor(data: Array, requiresGradient: bool = False, context=None)
write(represent(tensor)) # represent example, prints Tensor(self.shape=...)
x = Tensor([[1, -2], [3, 4]], requiresGradient=True)
y = Tensor([[2], [1]], requiresGradient=True)
z = (x @ y).relu().sum()
z.backward()
print(z.data)
print(x.gradient)
print(y.gradient)
# Random example...

re.match():

match(pattern, string, flags=0)

tf.math.mod():

mathmod(x, y, name=None)

NumPy ones:

array = createonesarray(shape, dtype, order='C', like=None)

NumPy Piecewise:

piecewise(number, ifstatement, elsestatement, taskofif, taskofelse)

Matplotlib Pyplot:

showimage(image, axeson=False, numpysqueeze=False, block=None, title="Figure 1", fontsize=16, color='black') # Image showing
saveimagefromdata(filename, imagevariable) # Image saving

Pkgutil walk packages:

walkpackages(path=None, prefix='', onerror=None)

New AES:

aesnew(key, mode, iv=None, nonce=None)

Getting class attributes:

getClassAttributes(classname)

Get the protocol name:

getProtocolName(protocol)

Some MoviePy functions:

useClipFpsByDefault(clip)
convertToSeconds(value, fps=None)
applyToAudio(clip, function)

Paramiko message class:

MessageClass(data=None)

Zero fraction:

zeroFraction(x, name=None)

Audio loading (librosa):

loadaudio(path, sr=22050, mono=True, offset=0.0, duration=None, dtype=np.float32, res_type="kaiser_best")

EFN's speed was tested, it is REALLY fast. I hope you enjoy this version of EFN too!