Skip to content

Instantly share code, notes, and snippets.

@Dysta
Dysta / jukepp.md
Last active September 13, 2022 19:51
Privacy Policy for the JukeBot Discord bot

Privacy Policy for JukeBot

At JukeBot, accessible from https://dysta.github.io/JukeBotLab/, one of our main priorities is the privacy of our visitors. This Privacy Policy document contains types of information that is collected and recorded by JukeBot and how we use it.

If you have additional questions or require more information about our Privacy Policy, do not hesitate to contact us.

This Privacy Policy applies only to our online activities and is valid for visitors to our bot with regards to the information that they shared and/or collect in JukeBot. This policy is not applicable to any information collected offline or via channels other than this bot. Our Privacy Policy was created with the help of the Free Privacy Policy Generator.

Consent

@Dysta
Dysta / juketos.md
Last active September 13, 2022 19:51
Terms of Service for the Jukebot Discord bot

Bot Terms and Conditions of Use

1. Terms

By using this Bot, accessible from https://dysta.github.io/JukeBotLab/, you are agreeing to be bound by these Bot Terms and Conditions of Use and agree that you are responsible for the agreement with any applicable local laws. If you disagree with any of these terms, you are prohibited from using this bot.

2. Use License

Permission is granted to temporarily download one copy of the materials on JukeBot's Website for personal, non-commercial transitory viewing only. This is the grant of a license, not a transfer of title, and under this license you may not:

@Dysta
Dysta / file.py
Last active January 11, 2022 13:41
Redirect nextcord log to loguru
class InterceptHandler(logging.Handler):
"""
This class is used to Intercept logging message and
log those into loguru
"""
def emit(self, record) -> None:
"""
Overriding of emit method from logging.Handler
Code from: https://loguru.readthedocs.io/en/stable/overview.html?highlight=emit#entirely-compatible-with-standard-logging
:param record: the record to log
@Dysta
Dysta / TP4.java
Created September 30, 2020 09:54
Correction TP4 PLE
package bigdata;
import java.io.IOException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
@Dysta
Dysta / dysto.zsh-theme
Last active March 26, 2020 12:21
my custom zsh theme
function prompt_char {
if [ $UID -eq 0 ]; then echo "#"; else echo "»"; fi
}
PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m%{$reset_color%}:%{$fg_bold[blue]%}%(!.%1~.%~) $(git_prompt_info)%{$reset_color%}
%(?.%{$fg_bold[green]%}✓.%{$fg_bold[red]%}✗)%{$reset_color%} $(prompt_char) '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[yellow]%}git:("
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%} "
@Dysta
Dysta / BasketRepository.java
Last active November 30, 2019 11:12
Td6 AO
package fr.ubordeaux.ao.domain;
import java.io.IOException;
public interface BasketRepository {
public void save(Basket b, String filename) throws IOException;
public void save(Basket b);
}
@Dysta
Dysta / Circle.java
Created September 19, 2019 10:49
TD2 de PO - UB
package fr.ubordeaux.ao;
public class Circle extends Shape {
private int radius;
public int getRadius() {
return this.radius;
}
public void setRadius(int radius) {
@Dysta
Dysta / rpg_parser.php
Last active February 11, 2021 22:49
code source de mon API pour parser RPG
<?php
/**
* API pour RPG paradize
* @author Dysta
*/
class RPG_Parser {
/**
* HTML code
* @var string
*/
@Dysta
Dysta / tsp_bf.c
Last active February 20, 2019 11:48
Version brute-force de l'algo TSP.
//
// TSP - BRUTE-FORCE
//
// -> la structure "point" est définie dans tools.h
static double dist(point A, point B){
return sqrt((B.x-A.x)*(B.x-A.x)+(B.y-A.y)*(B.y-A.y));
}
static double value(point *V, int n, int *P){
@Dysta
Dysta / tsp_dyn.c
Last active February 18, 2019 18:53
Version dynamique de l'algo TSP
double tsp_prog_dyn(point *V, int n, int *Q) {
/*
Version programmation dynamique du TSP. Le résultat (la tournée
optimale) doit être écrit dans la permutation Q, tableau qui doit
être alloué avant l'appel. On renvoie la valeur de la tournée
optimale ou -1 s'il y a eut une erreur (pression de 'q' pour sortir
de l'affichage). Une fois que votre programme arrivera à calculer
une tournée optimale (à comparer avec tsp_brute_force() ou
tsp_brute_force_opt()), il sera intéressant de dessiner à chaque
fois que possible le chemin courant avec drawPath(V,n,Q). La