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
| function hex(r,g,b){ | |
| var hexv="0123456789ABCDEF"; | |
| var valhex=""; | |
| var ff=[r,g,b]; | |
| for(var i=0;i<3;i++){ | |
| var del= ff[i] % 16; | |
| var di=Math.floor(ff[i]/16); | |
| if(ff[i]>=255){ | |
| valhex+="FF"; | |
| } else if(ff[i]<=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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text.RegularExpressions; | |
| namespace TestCollections | |
| { | |
| public class Person | |
| { |
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
| // https://www.w3schools.com/colors/colors_names.asp | |
| var t ="", | |
| el=document.querySelectorAll(".w3-table-all tr td:nth-child(1) a"); | |
| for (var i = 0; i < el.length; i++) { | |
| if(!(i%10)) t+="\n"; | |
| t += '"'+el[i].innerText.toLowerCase()+'", '; | |
| } | |
| console.log(t); |
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
| <!doctype html> | |
| <html> | |
| <body> | |
| <?php | |
| function rainbow($str){ | |
| $phase = 0; | |
| $center = 128; | |
| $width = 128; | |
| $s=""; | |
| $frequency = M_PI*2/strlen($str); |
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
| def digits(L, di = 3): | |
| print("Цифры меньше или равно ", di) | |
| return sorted({nums for num in L.values() for nums in num if nums <= di}) | |
| mnosh = { | |
| "one":{1,3.2,3.02,2.78,1.999,2,99998,3,4,5,43}, | |
| "two":{6,0.7,8,9,0.10,.1,4,2,0.2,0.003,3}, | |
| "three":{0.4,0.005,4.3,234.5,1,2.01}, | |
| } |
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
| // ************************** | |
| // Game: America - No Peace Beyond The Line (Завоевание Америки) | |
| // Author: AlekPet 2019 | |
| // Site: https://github.com/AlekPet | |
| // Program run script: AC Tool 5.4.0 | |
| // Descriptions: Auto input cheats codes in game | |
| // Instructions: Run game, run script and back to the game (wait 5 sec *default set delay_start**) | |
| // ************************** | |
| Constants |
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
| # -*- coding: utf-8 -*- | |
| # Author: AlekPet | |
| # Name: Find files in dir and subdir | |
| import os | |
| import shutil | |
| # Path to copy find files to | |
| pathSave = r'C:\Users\UserName\Desktop\FindNotExistFiles\' | |
| # Where search files |
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
| ### by AlekPet 2023 | |
| ### Replace UpperCase to UpperCase and space | |
| import re | |
| def getUpdateString(text): | |
| return re.sub('(?<=[a-z])([A-Z])|(?<=[A-Z])([A-Z][a-z]+)',' \\1\\2', text) | |
| test_string = 'HeloItIsBigWorldGetYouHELLOPeople' | |
| output = getUpdateString(test_string) |