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 Crypto.Cipher import AES | |
from Crypto.Cipher import PKCS1_OAEP | |
from Crypto.PublicKey import RSA | |
from Crypto import Random | |
from hashlib import sha256 | |
import base64 | |
import json | |
class async(): | |
def crypt(self, content, crypt_key, sign_key): |
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 urllib.request import urlopen | |
import re | |
from bs4 import BeautifulSoup as bs4 | |
import webbrowser | |
from mutagen.easyid3 import EasyID3 | |
from os.path import join | |
lien = "https://www.youtube.com/playlist?list=PLPZappeJ88mGglSaXJ4i6_5KPI0SI_RNG" | |
path = "F:/Bibliothèque/Musique/Approaching Nirvana/13. Cinematic Soundscapes Vol. 2/" | |
artist = "Approaching Nirvana" |
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
// Sac à dos.cpp : Defines the entry point for the console application. | |
// | |
#include "stdafx.h" // Pour printf | |
#include <time.h> // Pour générer de l'aléatoire et calculer le temps utilisé par la fonction | |
#include <stdlib.h> // Pour system("pause") | |
#define NBR_OBJETS 25 // Le nombre d'objets à générer | |
int main() |
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
var Julien = function Julien() { | |
var ws, init, send, plugin_indice; | |
init = function init() { | |
ws = new WebSocket("ws://Julien00859.be:9000"); | |
ws.onopen = function onopen(){ | |
console.log("Connection established"); | |
if (plugin_indice === void 0) plugin_indice = Game.customTickers.push(send) - 1; | |
else Game.customTickets[plugin_indice] = send; | |
} | |
ws.onmessage = function onmessage(data){console.log("From WebSocket:", data)} |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\Directory\Background\shell\bash] | |
"Extended"="" | |
"NoWorkingDirectory"="" | |
@="Ouvrir bash ici" | |
[HKEY_CLASSES_ROOT\Directory\Background\shell\bash\command] | |
@="C:\\\\Windows\\\\system32\\\\bash.exe --init-file <(echo -n cd /mnt/; winpath=%V; echo \"${winpath,}\" | sed -r 's/[A-Z]/\\/\\0/g' | sed -r 's/\\://')" |
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 sqlalchemy import Column, Integer, String, Numeric | |
from sqlalchemy.ext.declarative import declarative_base | |
Base = declarative_base() | |
class Log(Base): | |
__tablename__ = "tb_log" | |
id = Column(Integer, primary_key=True) | |
created = Column(Numeric, nullable=False) | |
exc_text = Column(String, nullable=True) |
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
ATM = 0b100000111 | |
AAL = 0b11000110011 | |
CCITT41 = 0b10001000000100001 | |
IEEE802 = 0b100000100110000010001010110110101 | |
def compute_crc(frame: bytes, crc: int = 0, poly: int = ATM) -> int: | |
"""Compute the CRC of the given frame | |
>>> crc = compute_crc(b"Hello world !") | |
>>> compute_crc(b"Hello world !", crc) == 0 |
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; | |
using System.Collections.Generic; | |
using System.Threading; | |
namespace SnakeTIC | |
{ | |
struct Pos | |
{ | |
public int x { get; private set; } | |
public int y { get; private set; } |
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
#!/bin/bash | |
if [ -z $(which python3) ]; then | |
echo "Please install python3" | |
exit 1 | |
fi | |
if [ -z $(which virtualenv) ]; then | |
echo "Please install python-virtualenv" | |
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
"""Wrapper around builtins and itertools to chain calls""" | |
from itertools import * | |
from functools import reduce | |
class Chain: | |
def __init__(self, data): | |
self._data = data | |
# Chain methods |
OlderNewer