This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ffmpeg | |
import sdl2, sdl2/audio | |
import os, strformat, times, math, asyncdispatch, locks, threadpool, times, terminal | |
import ../kyuickObject | |
import sugar | |
type | |
CodecData* = ref object of RootObj | |
params*: AVcodecParameters | |
codec*: ptr AVCodec |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std/[base64, strutils] | |
import checksums/md5 | |
# AES-256 sizes; _password in plaintext form, and _salt in byte form. | |
proc evp_BytesToKey*(passwordz, saltz: string): tuple[key, iv: string] = | |
var password: string = passwordz | |
var salt: string = saltz | |
var passwordBytes = newString(len(password)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
var i: float = 0 | |
var iterations: int = 1 | |
var n: int = 4 # Number of slices | |
var deltaX: float = 1/4 # deltaX, (b - a)/n | |
template dfunk*(): untyped = | |
10*cos(i*i) # Type your integral function here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std/math | |
proc fibbonacci*(n: int): int = | |
var idx: int = 1 | |
var num: int = 1 | |
var prv: int = 0 | |
while idx <= n: | |
inc idx | |
let t: int = num | |
num = (num + prv) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std/[os, osproc, terminal, htmlparser, xmltree, strutils, strtabs, parseutils] | |
import system/io | |
#var kindSimilar: bool = false | |
#var isXnElement: bool = false | |
#var attrTag: bool = false | |
#var isEquivalent: bool = false | |
#if a.kind == b.kind: | |
# kindSimilar = true | |
# if a.kind == xnElement: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# name:LightNovelPub | |
# scraperType:nvl | |
# version:0.0.1 | |
# siteUri:www.lightnovelpub.com | |
import std/[htmlparser, xmltree] | |
var defaultHeaders: seq[tuple[key: string, value: string]] = @[ | |
("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0"), | |
("Accept-Encoding", "identity"), ("Accept", "*/*")] | |
var page: XmlNode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ADLCore, ADLCore/Novel/NovelTypes, ADLCore/Novel/NovelHall | |
import ADLCore/Video/VideoType, ADLCore/Video/VidStream, ADLCore/genericMediaTypes | |
import std/[os, terminal, strutils] | |
echo "Testing ADLCore" | |
var videoObj: Video | |
echo "Testing Video -- VidStream" | |
videoObj = GenerateNewVideoInstance("vidstreamAni", "https://gogoplay1.com/videos/shine-post-episode-4") | |
assert videoObj != nil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import std/math | |
import strutils | |
let a = float64(parseFloat(paramStr(1))) | |
let b = float64(parseFloat(paramStr(2))) | |
let c = float64(parseFloat(paramStr(3))) | |
proc getVertex(a: float64, b: float64): float64 = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.IO; | |
using System.IO.Compression; | |
namespace ADLCore | |
{ | |
public enum MediaType | |
{ |