WeixiangYan/CodeTransOcean huggingface dataset:
Task: Add a variable to a class instance at runtime




Go: package main

import (
    "bufio"
    "fmt"
    "log"
    "os"
)

type SomeStruct struct {
    runtimeFields map[string]string
}

func check(err error) {
    if err != nil {
        log.Fatal(err)
    }
}

func main() {
    ss := SomeStruct{make(map[string]string)}
    scanner := bufio.NewScanner(os.Stdin)
    fmt.Println("Create two fields at runtime: ")
    for i := 1; i <= 2; i++ {
        fmt.Printf("  Field #%d:\n", i)
        fmt.Print("       Enter name  : ")
        scanner.Scan()
        name := scanner.Text()
        fmt.Print("       Enter value : ")
        scanner.Scan()
        value := scanner.Text()
        check(scanner.Err())
        ss.runtimeFields[name] = value
        fmt.Println()
    }
    for {
        fmt.Print("Which field do you want to inspect ? ")
        scanner.Scan()
        name := scanner.Text()
        check(scanner.Err())
        value, ok := ss.runtimeFields[name]
        if !ok {
            fmt.Println("There is no field of that name, try again")
        } else {
            fmt.Printf("Its value is '%s'\n", value)
            return
        }
    }
}




Python: class empty(object):
    pass
e = empty()
Task: Bioinformatics_Subsequence




Go: package main

import (
    "fmt"
    "math/rand"
    "regexp"
    "time"
)

const base = "ACGT"

func findDnaSubsequence(dnaSize, chunkSize int) {
    dnaSeq := make([]byte, dnaSize)
    for i := 0; i < dnaSize; i++ {
        dnaSeq[i] = base[rand.Intn(4)]
    }
    dnaStr := string(dnaSeq)
    dnaSubseq := make([]byte, 4)
    for i := 0; i < 4; i++ {
        dnaSubseq[i] = base[rand.Intn(4)]
    }
    dnaSubstr := string(dnaSubseq)
    fmt.Println("DNA sequnence:")
    for i := chunkSize; i <= len(dnaStr); i += chunkSize {
        start := i - chunkSize
        fmt.Printf("%3d..%3d: %s\n", start+1, i, dnaStr[start:i])
    }
    fmt.Println("\nSubsequence to locate:", dnaSubstr)
    var r = regexp.MustCompile(dnaSubstr)
    var matches = r.FindAllStringIndex(dnaStr, -1)
    if len(matches) == 0 {
        fmt.Println("No matches found.")
    } else {
        fmt.Println("Matches found at the following indices:")
        for _, m := range matches {
            fmt.Printf("%3d..%-3d\n", m[0]+1, m[1])
        }
    }
}

func main() {
    rand.Seed(time.Now().UnixNano())
    findDnaSubsequence(200, 20)
    fmt.Println()
    findDnaSubsequence(600, 40)
}




Python:  
from random import choice
import regex as re 
import time

def generate_sequence(n: int ) -> str:
    return "".join([ choice(['A','C','G','T']) for _ in range(n) ])

def dna_findall(needle: str, haystack: str) -> None:

    if sum(1 for _ in re.finditer(needle, haystack, overlapped=True)) == 0:
        print("No matches found")
    else:
        print(f"Found {needle} at the following indices: ")
        for match in re.finditer(needle, haystack, overlapped=True):
            print(f"{match.start()}:{match.end()} ")

dna_seq = generate_sequence(200)
sample_seq = generate_sequence(4)

c = 1
for i in dna_seq:
    print(i, end="") if c % 20 != 0 else print(f"{i}")
    c += 1
print(f"\nSearch Sample: {sample_seq}")

dna_findall(sample_seq, dna_seq)
Task: Nested templated data




Go: package main

import (
    "fmt"
    "os"
    "sort"
    "strings"
    "text/template"
)

func main() {
    const t = `[[[{{index .P 1}}, {{index .P 2}}],
  [{{index .P 3}}, {{index .P 4}}, {{index .P 1}}], 
  {{index .P 5}}]]
`
    type S struct {
        P map[int]string
    }

    var s S
    s.P = map[int]string{
        0: "'Payload#0'", 1: "'Payload#1'", 2: "'Payload#2'", 3: "'Payload#3'",
        4: "'Payload#4'", 5: "'Payload#5'", 6: "'Payload#6'",
    }
    tmpl := template.Must(template.New("").Parse(t))
    tmpl.Execute(os.Stdout, s)

    var unused []int
    for k, _ := range s.P {
        if !strings.Contains(t, fmt.Sprintf("{{index .P %d}}", k)) {
            unused = append(unused, k)
        }
    }
    sort.Ints(unused)
    fmt.Println("\nThe unused payloads have indices of :", unused)
}




Python: from pprint import pprint as pp

class Template():
    def __init__(self, structure):
        self.structure = structure
        self.used_payloads, self.missed_payloads = [], []
    
    def inject_payload(self, id2data):
        
        def _inject_payload(substruct, i2d, used, missed):
            used.extend(i2d[x] for x in substruct if type(x) is not tuple and x in i2d)
            missed.extend(f'??
                          for x in substruct if type(x) is not tuple and x not in i2d)
            return tuple(_inject_payload(x, i2d, used, missed) 
                           if type(x) is tuple 
                           else i2d.get(x, f'??
                         for x in substruct)
                           
        ans = _inject_payload(self.structure, id2data, 
                              self.used_payloads, self.missed_payloads)
        self.unused_payloads = sorted(set(id2data.values()) 
                                      - set(self.used_payloads))
        self.missed_payloads = sorted(set(self.missed_payloads))
        return ans

if __name__ == '__main__':
    index2data = {p: f'Payload
    print("
    print('\n  '.join(list(index2data.values())))
    for structure in [
     (((1, 2),
       (3, 4, 1),
       5),),
    
     (((1, 2),
       (10, 4, 1),
       5),)]:
        print("\n\n
        pp(structure, width=13)
        print("\n TEMPLATE WITH PAYLOADS:")
        t = Template(structure)
        out = t.inject_payload(index2data)
        pp(out)
        print("\n UNUSED PAYLOADS:\n  ", end='')
        unused = t.unused_payloads
        print('\n  '.join(unused) if unused else '-')
        print(" MISSING PAYLOADS:\n  ", end='')
        missed = t.missed_payloads
        print('\n  '.join(missed) if missed else '-')
Task: Bitmap_Read an image through a pipe




Go: package main






import (
    "log"
    "os/exec"
    "raster"
)

func main() {
    c := exec.Command("convert", "Unfilledcirc.png", "-depth", "1", "ppm:-")
    pipe, err := c.StdoutPipe()
    if err != nil {
        log.Fatal(err)
    }
    if err = c.Start(); err != nil {
        log.Fatal(err)
    }
    b, err := raster.ReadPpmFrom(pipe)
    if err != nil {
        log.Fatal(err)
    }
    if err = b.WritePpmFile("Unfilledcirc.ppm"); err != nil {
        log.Fatal(err)
    }
}




Python: 

from PIL import Image



im = Image.open("boxes_1.jpg")
im.save("boxes_1v2.ppm")
Task: Memory layout of a data structure




Go: package main

import "fmt"

type rs232p9 uint16

const (
	CD9  rs232p9 = 1 << iota 
	RD9                      
	TD9                      
	DTR9                     
	SG9                      
	DSR9                     
	RTS9                     
	CTS9                     
	RI9                      
)

func main() {
	
	p := RI9 | TD9 | CD9
	fmt.Printf("Type=%T value=%#04x\n", p, p)
}




Python: from ctypes import Structure, c_int

rs232_9pin  = "_0 CD RD TD DTR SG DSR RTS CTS RI".split()
rs232_25pin = ( "_0  PG  TD  RD  RTS CTS DSR SG  CD  pos neg"
                "_11 SCD SCS STD TC  SRD RC"
                "_18 SRS DTR SQD RI DRS XTC" ).split()

class RS232_9pin(Structure):
    _fields_ = [(__, c_int, 1) for __ in rs232_9pin]

	
class RS232_25pin(Structure):
    _fields_ = [(__, c_int, 1) for __ in rs232_25pin]
Task: Sum of two adjacent numbers are primes




Go: package main

import (
    "fmt"
    "math"
    "rcu"
)

func main() {
    limit := int(math.Log(1e7) * 1e7 * 1.2) 
    primes := rcu.Primes(limit)
    fmt.Println("The first 20 pairs of natural numbers whose sum is prime are:")
    for i := 1; i <= 20; i++ {
        p := primes[i]
        hp := p / 2
        fmt.Printf("%2d + %2d = %2d\n", hp, hp+1, p)
    }
    fmt.Println("\nThe 10 millionth such pair is:")
    p := primes[1e7]
    hp := p / 2
    fmt.Printf("%2d + %2d = %2d\n", hp, hp+1, p)
}




Python: 

def isPrime(n):
    for i in range(2, int(n**0.5) + 1):
        if n % i == 0:
            return False        
    return True

if __name__ == "__main__":
    n = 0
    num = 0

    print('The first 20 pairs of numbers whose sum is prime:') 
    while True:
        n += 1
        suma = 2*n+1
        if isPrime(suma):
            num += 1
            if num < 21:
                print('{:2}'.format(n), "+", '{:2}'.format(n+1), "=", '{:2}'.format(suma))
            else:
                break
Task: Maximum difference between adjacent elements of list




Go: package main

import (
    "fmt"
    "math"
)

func main() {
    list := []float64{1, 8, 2, -3, 0, 1, 1, -2.3, 0, 5.5, 8, 6, 2, 9, 11, 10, 3}
    maxDiff := -1.0
    var maxPairs [][2]float64
    for i := 1; i < len(list); i++ {
        diff := math.Abs(list[i-1] - list[i])
        if diff > maxDiff {
            maxDiff = diff
            maxPairs = [][2]float64{{list[i-1], list[i]}}
        } else if diff == maxDiff {
            maxPairs = append(maxPairs, [2]float64{list[i-1], list[i]})
        }
    }
    fmt.Println("The maximum difference between adjacent pairs of the list is:", maxDiff)
    fmt.Println("The pairs with this difference are:", maxPairs)
}




Python: 



def maxDeltas(ns):
    
    pairs = [
        (abs(a - b), (a, b)) for a, b
        in zip(ns, ns[1:])
    ]
    delta = max(pairs, key=lambda ab: ab[0])[0]

    return [
        ab for ab in pairs
        if delta == ab[0]
    ]




def main():
    

    maxPairs = maxDeltas([
        1, 8, 2, -3, 0, 1, 1, -2.3, 0,
        5.5, 8, 6, 2, 9, 11, 10, 3
    ])

    for ab in maxPairs:
        print(ab)



if __name__ == '__main__':
    main()
Task: Composite numbers k with no single digit factors whose factors are all substrings of k




Go: package main

import (
    "fmt"
    "rcu"
    "strconv"
    "strings"
)

func main() {
    count := 0
    k := 11 * 11
    var res []int
    for count < 20 {
        if k%3 == 0 || k%5 == 0 || k%7 == 0 {
            k += 2
            continue
        }
        factors := rcu.PrimeFactors(k)
        if len(factors) > 1 {
            s := strconv.Itoa(k)
            includesAll := true
            prev := -1
            for _, f := range factors {
                if f == prev {
                    continue
                }
                fs := strconv.Itoa(f)
                if strings.Index(s, fs) == -1 {
                    includesAll = false
                    break
                }
            }
            if includesAll {
                res = append(res, k)
                count++
            }
        }
        k += 2
    }
    for _, e := range res[0:10] {
        fmt.Printf("%10s ", rcu.Commatize(e))
    }
    fmt.Println()
    for _, e := range res[10:20] {
        fmt.Printf("%10s ", rcu.Commatize(e))
    }
    fmt.Println()
}




Python: from sympy import isprime, factorint

def contains_its_prime_factors_all_over_7(n):
    if n < 10 or isprime(n):
        return False
    strn = str(n)
    pfacs = factorint(n).keys()
    return all(f > 9 and str(f) in strn for f in pfacs)

found = 0
for n in range(1_000_000_000):
    if contains_its_prime_factors_all_over_7(n):
        found += 1
        print(f'{n: 12,}', end = '\n' if found % 10 == 0 else '')
        if found == 20:
            break
Task: Colour pinstripe_Printer




Go: package main
 
import (
    "github.com/fogleman/gg"
    "log"
    "os/exec"
    "runtime"
)

var palette = [8]string{
    "000000", 
    "FF0000", 
    "00FF00", 
    "0000FF", 
    "FF00FF", 
    "00FFFF", 
    "FFFF00", 
    "FFFFFF", 
}
 
func pinstripe(dc *gg.Context) {
    w := dc.Width()
    h := dc.Height() / 7
    for b := 1; b <= 11; b++ {
        for x, ci := 0, 0; x < w; x, ci = x+b, ci+1 {
            dc.SetHexColor(palette[ci%8])
            y := h * (b - 1)
            dc.DrawRectangle(float64(x), float64(y), float64(b), float64(h))
            dc.Fill()
        }
    }
}
 
func main() {
    dc := gg.NewContext(842, 595)
    pinstripe(dc)
    fileName := "color_pinstripe.png"
    dc.SavePNG(fileName)
    var cmd *exec.Cmd
    if runtime.GOOS == "windows" {
        cmd = exec.Command("mspaint", "/pt", fileName)
    } else {
        cmd = exec.Command("lp", fileName)
    }
    if err := cmd.Run(); err != nil {
        log.Fatal(err)
    }   
}




Python: from turtle import *
from PIL import Image
import time
import subprocess



colors = ["black", "red", "green", "blue", "magenta", "cyan", "yellow", "white"]

screen = getscreen()




inch_width = 11.0
inch_height = 8.5

pixels_per_inch = 100

pix_width = int(inch_width*pixels_per_inch)
pix_height = int(inch_height*pixels_per_inch)

screen.setup (width=pix_width, height=pix_height, startx=0, starty=0)

screen.screensize(pix_width,pix_height)





left_edge = -screen.window_width()//2

right_edge = screen.window_width()//2

bottom_edge = -screen.window_height()//2

top_edge = screen.window_height()//2



screen.delay(0)
screen.tracer(5)

for inch in range(int(inch_width)-1):
    line_width = inch + 1
    pensize(line_width)
    colornum = 0

    min_x = left_edge + (inch * pixels_per_inch)
    max_x = left_edge + ((inch+1) * pixels_per_inch)
    
    for y in range(bottom_edge,top_edge,line_width):
        penup()
        pencolor(colors[colornum])
        colornum = (colornum + 1) % len(colors)
        setposition(min_x,y)
        pendown()
        setposition(max_x,y)
         
screen.getcanvas().postscript(file="striped.eps")




im = Image.open("striped.eps")
im.save("striped.jpg")


    
subprocess.run(["mspaint", "/pt", "striped.jpg"])
Task: Determine sentence type




Go: package main

import (
    "fmt"
    "strings"
)

func sentenceType(s string) string {
    if len(s) == 0 {
        return ""
    }
    var types []string
    for _, c := range s {
        if c == '?' {
            types = append(types, "Q")
        } else if c == '!' {
            types = append(types, "E")
        } else if c == '.' {
            types = append(types, "S")
        }
    }
    if strings.IndexByte("?!.", s[len(s)-1]) == -1 {
        types = append(types, "N")
    }
    return strings.Join(types, "|")
}

func main() {
    s := "hi there, how are you today? I'd like to present to you the washing machine 9001. You have been nominated to win one of these! Just make sure you don't break it"
    fmt.Println(sentenceType(s))
}




Python: import re

txt = 

def haspunctotype(s):
    return 'S' if '.' in s else 'E' if '!' in s else 'Q' if '?' in s else 'N'

txt = re.sub('\n', '', txt)
pars = [s.strip() for s in re.split("(?:(?:(?<=[\?\!\.])(?:))|(?:(?:)(?=[\?\!\.])))", txt)]
if len(pars) % 2:
    pars.append('')  
for i in range(0, len(pars)-1, 2):
    print((pars[i] + pars[i + 1]).ljust(54), "==>", haspunctotype(pars[i + 1]))
Task: Set right-adjacent bits




Go: package main

import (
    "fmt"
    "strings"
)

type test struct {
    bs string
    n  int
}

func setRightBits(bits []byte, e, n int) []byte {
    if e == 0 || n <= 0 {
        return bits
    }
    bits2 := make([]byte, len(bits))
    copy(bits2, bits)
    for i := 0; i < e-1; i++ {
        c := bits[i]
        if c == 1 {
            j := i + 1
            for j <= i+n && j < e {
                bits2[j] = 1
                j++
            }
        }
    }
    return bits2
}

func main() {
    b := "010000000000100000000010000000010000000100000010000010000100010010"
    tests := []test{
        test{"1000", 2}, test{"0100", 2}, test{"0010", 2}, test{"0000", 2},
        test{b, 0}, test{b, 1}, test{b, 2}, test{b, 3},
    }
    for _, test := range tests {
        bs := test.bs
        e := len(bs)
        n := test.n
        fmt.Println("n =", n, "\b; Width e =", e, "\b:")
        fmt.Println("    Input b:", bs)
        bits := []byte(bs)
        for i := 0; i < len(bits); i++ {
            bits[i] = bits[i] - '0'
        }
        bits = setRightBits(bits, e, n)
        var sb strings.Builder
        for i := 0; i < len(bits); i++ {
            sb.WriteByte(bits[i] + '0')
        }
        fmt.Println("    Result :", sb.String())
    }
}




Python: from operator import or_
from functools import reduce

def set_right_adjacent_bits(n: int, b: int) -> int:
    return reduce(or_, (b >> x for x in range(n+1)), 0)


if __name__ == "__main__":
    print("SAME n & Width.\n")
    n = 2  
    bits = "1000 0100 0010 0000"
    first = True
    for b_str in bits.split():
        b = int(b_str, 2)
        e = len(b_str)
        if first:
            first = False
            print(f"n = {n}; Width e = {e}:\n")
        result = set_right_adjacent_bits(n, b)
        print(f"     Input b: {b:0{e}b}")
        print(f"      Result: {result:0{e}b}\n")
        
    print("SAME Input & Width.\n")
    
    bits = '01' + '1'.join('0'*x for x in range(10, 0, -1))
    for n in range(4):
        first = True
        for b_str in bits.split():
            b = int(b_str, 2)
            e = len(b_str)
            if first:
                first = False
                print(f"n = {n}; Width e = {e}:\n")
            result = set_right_adjacent_bits(n, b)
            print(f"     Input b: {b:0{e}b}")
            print(f"      Result: {result:0{e}b}\n")
Task: Cubic special primes




Go: package main

import (
    "fmt"
    "math"
)

func sieve(limit int) []bool {
    limit++
    
    c := make([]bool, limit) 
    c[0] = true
    c[1] = true
    
    p := 3 
    for {
        p2 := p * p
        if p2 >= limit {
            break
        }
        for i := p2; i < limit; i += 2 * p {
            c[i] = true
        }
        for {
            p += 2
            if !c[p] {
                break
            }
        }
    }
    return c
}

func isCube(n int) bool {
    s := int(math.Cbrt(float64(n)))
    return s*s*s == n
}

func commas(n int) string {
    s := fmt.Sprintf("%d", n)
    if n < 0 {
        s = s[1:]
    }
    le := len(s)
    for i := le - 3; i >= 1; i -= 3 {
        s = s[0:i] + "," + s[i:]
    }
    if n >= 0 {
        return s
    }
    return "-" + s
}

func main() {
    c := sieve(14999)
    fmt.Println("Cubic special primes under 15,000:")
    fmt.Println(" Prime1  Prime2    Gap  Cbrt")
    lastCubicSpecial := 3
    gap := 1
    count := 1
    fmt.Printf("%7d %7d %6d %4d\n", 2, 3, 1, 1)
    for i := 5; i < 15000; i += 2 {
        if c[i] {
            continue
        }
        gap = i - lastCubicSpecial
        if isCube(gap) {
            cbrt := int(math.Cbrt(float64(gap)))
            fmt.Printf("%7s %7s %6s %4d\n", commas(lastCubicSpecial), commas(i), commas(gap), cbrt)
            lastCubicSpecial = i
            count++
        }
    }
    fmt.Println("\n", count+1, "such primes found.")
}




Python: 

def isPrime(n):
    for i in range(2, int(n**0.5) + 1):
        if n % i == 0:
            return False        
    return True

if __name__ == '__main__':
    p = 2
    n = 1

    print("2",end = " ")
    while True:
        if isPrime(p + n**3):
            p += n**3
            n = 1
            print(p,end = " ")
        else:
            n += 1
        if p + n**3 >= 15000:
            break
Task: Positive decimal integers with the digit 1 occurring exactly twice




Go: package main

import (
    "fmt"
    "rcu"
)

func main() {
    fmt.Println("Decimal numbers under 1,000 whose digits include two 1's:")
    var results []int
    for i := 11; i <= 911; i++ {
        digits := rcu.Digits(i, 10)
        count := 0
        for _, d := range digits {
            if d == 1 {
                count++
            }
        }
        if count == 2 {
            results = append(results, i)
        }
    }
    for i, n := range results {
        fmt.Printf("%5d", n)
        if (i+1)%7 == 0 {
            fmt.Println()
        }
    }
    fmt.Println("\n\nFound", len(results), "such numbers.")
}




Python: 

from itertools import permutations

for i in range(0,10):
    if i!=1:
        baseList = [1,1]
        baseList.append(i)
        [print(int(''.join(map(str,j)))) for j in sorted(set(permutations(baseList)))]
Task: Odd and square numbers




Go: package main

import (
    "fmt"
    "math"
)

func main() {
    pow := 1
    for p := 0; p < 5; p++ {
        low := int(math.Ceil(math.Sqrt(float64(pow))))
        if low%2 == 0 {
            low++
        }
        pow *= 10
        high := int(math.Sqrt(float64(pow)))
        var oddSq []int
        for i := low; i <= high; i += 2 {
            oddSq = append(oddSq, i*i)
        }
        fmt.Println(len(oddSq), "odd squares from", pow/10, "to", pow, "\b:")
        for i := 0; i < len(oddSq); i++ {
            fmt.Printf("%d ", oddSq[i])
            if (i+1)%10 == 0 {
                fmt.Println()
            }
        }
        fmt.Println("\n")
    }
}




Python: import math
szamok=[]
limit = 1000

for i in range(1,int(math.ceil(math.sqrt(limit))),2):
    num = i*i
    if (num < 1000 and num > 99):
        szamok.append(num)

print(szamok)
Task: Singly-linked list_Traversal


C++: #include <iostream>
#include <forward_list>

int main()
{
    std::forward_list<int> list{1, 2, 3, 4, 5};
    for (int e : list)
        std::cout << e << std::endl;
}







VB: Private Sub Iterate(ByVal list As LinkedList(Of Integer))
    Dim node = list.First
    Do Until node Is Nothing
        node = node.Next
    Loop
    End Sub
Task: Bitmap_Write a PPM file


C++: #include <fstream>
#include <cstdio>

int main() {
    constexpr auto dimx = 800u, dimy = 800u;

    using namespace std;
    ofstream ofs("first.ppm", ios_base::out | ios_base::binary);
    ofs << "P6" << endl << dimx << ' ' << dimy << endl << "255" << endl;

    for (auto j = 0u; j < dimy; ++j)
        for (auto i = 0u; i < dimx; ++i)
            ofs << (char) (i % 256) << (char) (j % 256) << (char) ((i * j) % 256);       

    ofs.close();

    return EXIT_SUCCESS;
}







VB: Public Shared Sub SaveRasterBitmapToPpmFile(ByVal rasterBitmap As RasterBitmap, ByVal filepath As String)
   Dim header As String = String.Format("P6{0}{1}{2}{3}{0}255{0}", vbLf, rasterBitmap.Width, " "c, rasterBitmap.Height)
   Dim bufferSize As Integer = header.Length + (rasterBitmap.Width * rasterBitmap.Height * 3)
   Dim bytes(bufferSize - 1) As Byte
   Buffer.BlockCopy(Encoding.ASCII.GetBytes(header.ToString), 0, bytes, 0, header.Length)
   Dim index As Integer = header.Length
   For y As Integer = 0 To rasterBitmap.Height - 1
      For x As Integer = 0 To rasterBitmap.Width - 1
         Dim color As Rgb = rasterBitmap.GetPixel(x, y)
         bytes(index) = color.R
         bytes(index + 1) = color.G
         bytes(index + 2) = color.B
         index += 3
      Next
   Next
   My.Computer.FileSystem.WriteAllBytes(filepath, bytes, False)
End Sub
Task: Delete a file


C++: #include <cstdio>
#include <direct.h>

int main() {
	remove( "input.txt" );
	remove( "/input.txt" );
	_rmdir( "docs" );
	_rmdir( "/docs" );

	return 0;
}







VB: Option Explicit

Sub DeleteFileOrDirectory()
Dim myPath As String
    myPath = "C:\Users\surname.name\Desktop\Docs"

    Kill myPath & "\input.txt"

    RmDir myPath
End Sub