This file contains 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 | |
path = "" | |
fileType = ".xml" | |
dictionary = { | |
"oldvalue": "newvalue", | |
} | |
modified = False |
This file contains 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 http.server | |
import socketserver | |
import sys | |
PORT = int(sys.argv[1]) | |
print(f"Port {PORT}") | |
if PORT == "": | |
exit(-1) |
This file contains 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 Discord; | |
using Discord.WebSocket; | |
namespace DiscordBotTest; | |
internal class Program | |
{ | |
private const string Token = ""; | |
private readonly DiscordSocketClient _client; |
This file contains 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; | |
namespace Project.Extensions | |
{ | |
public static class LocalDateExtension | |
{ | |
private static int DayCount(in int month) => (month % 2 != 0) ? 31 : 30; | |
private static object ValidateNumberOfDays(in int day, in int month) | |
=> (day > DayCount(month)) ? throw new Exception() : default; |
This file contains 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 sklearn.base import BaseEstimator, ClassifierMixin | |
import numpy as np | |
class SimplePerceptron(BaseEstimator, ClassifierMixin): | |
def __init__(self, eta=1.0): | |
self.class_labels_ = None | |
self.w_ = None # wagi | |
self.k_ = None # liczba kroków algorytmu | |
self.eta_ = eta # współczynnik uczenia |
This file contains 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.Linq; | |
namespace Day2 | |
{ | |
public class Password | |
{ | |
private PasswordPolicy _policy { get; set; } | |
private string _password { get; set; } | |
public Password(PasswordPolicy policy, string password) |
This file contains 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
@echo off | |
title Activate Windows 10 ALL versions for FREE! WireDroid.com&cls&echo ============================================================================&echo #Project: Activating Microsoft software products for FREE without software(WireDroid.com)&echo ============================================================================&echo.&echo #Supported products:&echo - Windows 10 Home&echo - Windows 10 Home N&echo - Windows 10 Home Single Language&echo - Windows 10 Home Country Specific&echo - Windows 10 Professional&echo - Windows 10 Professional N&echo - Windows 10 Education N&echo - Windows 10 Education N&echo - Windows 10 Enterprise&echo - Windows 10 Enterprise N&echo - Windows 10 Enterprise LTSB&echo - Windows 10 Enterprise LTSB N&echo.&echo.&echo ============================================================================&echo Activating your Windows...&cscript //nologo slmgr.vbs /upk >nul&cscript //nologo slmgr.vbs /cpky >nul&wmic os | findstr /I "enterprise" >nul | |
if %errorlevel% EQU 0 (cscript //no |
This file contains 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
let isEditingAlready = false; | |
let editedElementId = null; | |
window.addEventListener('click', (event) => { | |
if (event.target.type == "text" && (event.target.id !== 'addTodoInput' && event.target.id !== 'searchInput')) { | |
if (!isEditingAlready) | |
{ | |
console.log("Start editing..."); | |
event.target.disabled = false; |
This file contains 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
const filterTodoList = (word) =>{ | |
return todos.filter((item) => { | |
return item.desc.toLowerCase().includes(word.toLowerCase()); | |
}); | |
}; | |
searchInput.addEventListener('input', (event) => { | |
event.preventDefault(); | |
if (event.target.value.length >= 3){ |
This file contains 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
const addTodo = (desc, date) => { | |
let todo = new Todo(desc, date); | |
console.log(`Add Task... ${todo.id}`); | |
todos.push(todo); | |
localStorage.setItem('todos', JSON.stringify(todos)); | |
// resetowanie wartości pól | |
addTodoInput.value = addTodoInput.defaultValue; |
NewerOlder