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.IO; | |
| public class Program | |
| { | |
| public static void Main() | |
| { | |
| int counter = ReadCounterFromFile(); // Reading the counter value from a file | |
| // Incrementing the counter |
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 requests | |
| # Define the URL | |
| url = "https://source.unsplash.com/random/900x700/" | |
| # Send an HTTP GET request to the URL | |
| response = requests.get(url) | |
| # Check if the request was successful (status code 200) | |
| if response.status_code == 200: |
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
| from pytube import Playlist, YouTube | |
| # YouTube Playlist URL | |
| playlist_url = 'playlist_URL' # Replace with your playlist URL | |
| # Get the playlist object | |
| playlist = Playlist(playlist_url) | |
| # Iterate through the videos in the playlist | |
| for video_url in playlist.video_urls: |
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 jdatetime | |
| # Get the current date in Persian | |
| today = jdatetime.date.today() | |
| # Print the full date in Persian | |
| print(today.strftime("%A %d %B %Y")) |
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
| // ==UserScript== | |
| // @name New Jalali Date for Trello (Intl API) - Observer Edition | |
| // @namespace Seyed Morteza Kamali | |
| // @description Jalali date updated everywhere on Trello using native Intl.DateTimeFormat, MutationObserver, and universal text scanning. | |
| // @include https://trello.com/* | |
| // @include http://trello.com/* | |
| // @version 0.0.10 // Incremented version to reflect fix | |
| // @grant none | |
| // @require https://unpkg.com/jalali-moment/dist/jalali-moment.browser.js | |
| // ==/UserScript== |
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
| from moviepy.editor import AudioFileClip | |
| from tkinter import Tk, filedialog | |
| # Create Tkinter root window | |
| root = Tk() | |
| root.withdraw() # Hide the root window | |
| # Open file dialog to select the audio file | |
| file_path = filedialog.askopenfilename() |
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
| { | |
| "tasksData": [ | |
| { | |
| "name": "Animals", | |
| "localizedName": "حيوانات", | |
| "gameType": 2, | |
| "orderNumber": 1, | |
| "Levels": [ | |
| { | |
| "number": 1, |
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
| public static class ExtensionMethods | |
| { | |
| public static TaskAwaiter GetAwaiter(this AsyncOperation asyncOp) | |
| { | |
| var tcs = new TaskCompletionSource<object>(); | |
| asyncOp.completed += obj => { tcs.SetResult(null); }; | |
| return ((Task)tcs.Task).GetAwaiter(); | |
| } | |
| } |
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
| // When creating shaders for Universal Render Pipeline you can you the ShaderGraph which is super AWESOME! | |
| // However, if you want to author shaders in shading language you can use this teamplate as a base. | |
| // Please note, this shader does not necessarily match perfomance of the built-in URP Lit shader. | |
| // This shader works with URP 7.1.x and above | |
| Shader "Universal Render Pipeline/Custom/Physically Based Example" | |
| { | |
| Properties | |
| { | |
| // Specular vs Metallic workflow | |
| [HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0 |
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
| Shader "Sprite Lit Master" | |
| { | |
| Properties | |
| { | |
| [NoScaleOffset]_MainTex("MainText", 2D) = "white" {} | |
| _Color("Color", Color) = (0, 0, 0, 0) | |
| } | |
| SubShader | |
| { | |
| Tags |
NewerOlder