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
| input="""123 328 51 64 | |
| 45 64 387 23 | |
| 6 98 215 314 | |
| * + * +""" | |
| import re | |
| from functools import reduce | |
| all= input.split("\n") | |
| X = len(all) | |
| Y=len(re.split(r"\s+", all[0].strip())) |
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
| input2="""123 328 51 64 | |
| 45 64 387 23 | |
| 6 98 215 314 | |
| * + * +""" | |
| import re | |
| from functools import reduce | |
| all= input.split("\n") | |
| X = len(all) | |
| Y=len(re.split(r"\s+", all[0].strip())) |
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
| class Matrix: | |
| def __init__(self,size_x,size_y, mutable_sequence): | |
| """construct a view of a dimension x and y on mutable_sequence | |
| the mutable_sequence must have a dimension compliant with its size | |
| """ | |
| self.size_y=size_y | |
| self.pattern = [ ".", "@", "X" ] | |
| self.size_x=size_x |
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
| #!/usr/bin/env bash | |
| set -e | |
| declare -a action; | |
| RD='\e[31m' | |
| GB='\e[33m' | |
| BL='\e[34m' | |
| RZ='\e[0m' | |
| DEBUG=${DEBUG:-1} | |
| ONE_VAR=${ONE_VAR:-template.dot} |
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
| #!/usr/bin/env bash | |
| # Licence : fait tout ce que tu veux excepter dire que tu l'as écrit ou repomper sans citer jul | |
| usage() { | |
| cat << NAN | |
| # $0 (freeze|thaw|prior_result) input | |
| Blogpost-documentation generated by using \`$0 usage \` as a way to | |
| try to have all in one place ;) | |
| Source here : [https://gist.github.com/jul/ef4cbc4f506caace73c3c38b91cb1ea2](https://gist.github.com/jul/ef4cbc4f506caace73c3c38b91cb1ea2) |
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
| import json | |
| import os | |
| import sys | |
| import spacy | |
| from langdetect import detect | |
| from archery import mdict, vdict | |
| from time import time | |
| import re |
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
| #!/usr/bin/env python | |
| #basé sur https://gist.github.com/stuartlangridge/20ffe860fee0ecc315d3878c1ea77c35 | |
| import json | |
| import os | |
| import sys | |
| from atproto_client.models import get_or_create | |
| from atproto import CAR, models, Client, client_utils | |
| import requests | |
| from atproto_firehose import FirehoseSubscribeReposClient, parse_subscribe_repos_message |
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
| # MIGRATED HERE https://github.com/jul/pdca/blob/main/simple.py | |
| # STDLIB | |
| import multipart | |
| from wsgiref.simple_server import make_server | |
| from json import dumps | |
| from html.parser import HTMLParser | |
| from base64 import b64encode | |
| from urllib.parse import parse_qsl, urlparse | |
| import traceback | |
| from http.cookies import SimpleCookie as Cookie |
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
| import pyaudio | |
| import matplotlib.pyplot as plt | |
| import matplotlib.animation as animation | |
| import numpy as np | |
| import time | |
| from sys import argv | |
| A = 440.0 | |
| try: | |
| A=float(argv[1]) |
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
| #!/usr/bin/env python3 | |
| # -*- coding: utf8 -*- | |
| from subprocess import Popen, PIPE, STDOUT | |
| import sys, os | |
| from time import sleep | |
| import select | |
| from random import randint | |
| MAXX=512 | |
| MAXY=512 |
NewerOlder