Skip to content

Instantly share code, notes, and snippets.

View sapeol's full-sized avatar
🦍
forking like gorillaz

Sudeep kuchara sapeol

🦍
forking like gorillaz
View GitHub Profile
@sapeol
sapeol / prime.py
Last active January 5, 2023 09:30
# spoj coding problem
# exceeds the time limit
# primenumbergenerator
x = int(input())
quck=x
z=[]
p=[]
while x != 0:
#used in the implementation of xor function in neat-python
#Configuration for the Neat Neural network
#outputs has been increased to 10 (see the output layer)
[NEAT]
fitness_criterion = max
fitness_threshold = 10000
pop_size = 20
reset_on_extinction = true
[DefaultGenome]
# By Sudeep kuchara
# Special thanks to the lucas thompson's YT channel, he helped me throughout this project
# Application of the NEAT algorithm using neat-python to play the retro contra(NES)
# OpenAI environment
# bugfixes are coming sooner than later
# Retro-gym yadayadayada
import retro
import numpy as np
import cv2
@sapeol
sapeol / advancedastrology.java
Created July 21, 2020 20:16
codes for mooc course from university of helsinki
public class AdvancedAstrology {
public static void printStars(int number) {
// part 1 of the exercise
for (int i = 0; i < number; i++) {
System.out.print("*");
}
System.out.println();
@sapeol
sapeol / LeapYear.java
Created October 22, 2020 15:29
leap bleep
import java.util.Scanner;
public class LeapYear {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.print("Give a year:");
int year = Integer.parseInt(scan.nextLine());
if (year % 100 == 0 && year % 400 == 0) {
These will work on Fedora versions:
sudo rpm -e --nodeps totem-*
https://abp.oisd.nl/
https://raw.githubusercontent.com/notracking/hosts-blocklists/master/adblock/adblock.txt
https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt
||www.geeksforgeeks.org/wp-content/themes/iconic-one/js/gfg.min.js
@sapeol
sapeol / discord.js
Last active January 31, 2022 12:07
// Author : Sudeep
function playAlong() {
setTimeout(function() {
try {
var playerinfo = document.querySelector("div.avatar-3QF_VA.wrapper-1VLyxH").ariaLabel
playerinfo = playerinfo.split(",")
var allItems = document.querySelectorAll('.item-3XjbnG')
if (playerinfo.includes('Offline')) {
console.log(`${playerinfo[0]} is ${playerinfo[1]}`)
type LogLevel = 'info' | 'warn' | 'error';
function log(level: LogLevel, message: string, error: Error | null = null): void {
const timestamp = new Date().toISOString();
console[level](`[${timestamp}] ${message}`, error);
}
function generateRobustXPath(element: Element): string[] {
try {
const xpaths: string[] = [];
function log(level, message, error = null) {
const timestamp = new Date().toISOString();
console[level](`[${timestamp}] ${message}`, error);
}
function isClickableElement(element) {
const clickableTags = ['A', 'BUTTON', 'INPUT', 'SELECT', 'TEXTAREA'];
return clickableTags.includes(element.tagName) ||
element instanceof SVGElement ||
element.onclick != null ||