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
| package main | |
| import ( | |
| "context" | |
| "encoding/json" | |
| "log" | |
| "os" | |
| "path/filepath" | |
| "runtime" | |
| "sync" |
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 json | |
| import random; | |
| import os | |
| folder_name = "Playlist" | |
| tracks=os.listdir(folder_name) | |
| while True: | |
| songName = input("\n\nEnter the song or artist name(Enter q to quit): ").lower() |
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 json | |
| import random | |
| playlists=["trap","hiphop"] | |
| query = input("Enter song name or artist name: ").lower() | |
| def load_songs(file): | |
| file_path = file + ".json" | |
| with open(file_path) as f: | |
| songs = json.load(f) |
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
| package main | |
| import ( | |
| "bufio" | |
| "encoding/json" | |
| "fmt" | |
| "net/http" | |
| "os" | |
| "strings" | |
| ) |
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
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "io" | |
| "os" | |
| "strings" | |
| "time" | |
| ) |
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 fnmatch | |
| # Define the root directory | |
| root_dir = os.getcwd() | |
| # Define the output file name | |
| output_file = "directory_structure.txt" | |
| # Define patterns to ignore |
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
| <?php | |
| function downloadFile($url, $destination) | |
| { | |
| $fileContents = @file_get_contents($url); | |
| if ($fileContents === false) { | |
| die("Error: Failed to download the file from $url"); | |
| } | |
| $result = file_put_contents($destination, $fileContents); | |
| if ($result === false) { |
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
| <?php | |
| class RateLimiter { | |
| private $timePeriod; | |
| private $maxRequests; | |
| private $retryAfter; | |
| private $sessionKey; | |
| private $errorRedirectUrl; | |
| private $userRolesLimits; |
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
| // A JS class that wraps Dexie.js major functions | |
| class DexieWrapper { | |
| // Constructor takes a database name and an optional schema object | |
| constructor(dbName, schema = {}) { | |
| // Create a new Dexie instance with the given name | |
| this.db = new Dexie(dbName); | |
| // Define the schema if given | |
| if (Object.keys(schema).length > 0) { | |
| this.db.version(1).stores(schema); | |
| } |
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
| :root { | |
| --bg: #000; | |
| --co: #fff; | |
| --ho: #ff00ff; | |
| --ac: #00ffff; | |
| --inp: #333; | |
| --icon-light: #fff; | |
| --icon-dark: #000; | |
| --box-shadow: 0 0 5px var(--light); | |
| --tab: #333; |