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
#!/usr/bin/python3 | |
# Script to help migrate Pylint config to Ruff. | |
# | |
# It lists enabled Pylint rules, Pylint rules that are enabled but already covered by Ruff rules, | |
# and the Ruff rules not enabled yet that match enabled Pylint rules. | |
# | |
# Largely based on https://github.com/astral-sh/ruff/issues/970 | |
import re | |
import subprocess | |
from collections.abc import Mapping, Sequence |
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 libcst as cst | |
import os | |
def process_file(file_path): | |
# Read the content of the file | |
with open(file_path, "r") as file: | |
code = file.read() | |
# Parse the code file into a CST |
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
"growth20122022": 0.11912225705329153, | |
"hasFreelancers": false, | |
"hollandCodeMajor": "S", | |
"hollandCodeMinor": "C", | |
"inAWorkplace": "dans une structure d'accompagnement", | |
"inDomain": "dans le social", | |
"is_diploma_strictly_required": true, | |
"jobBoards": [ | |
{ | |
"filters": [ |
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
// How one would talk about various companies in this job group: | |
// In French: "chez Axa, Groupama ou ...", "à la BNP, au Crédit agricole". | |
// This data was manually built by Bayes Impact's Content Team over the years. | |
string at_various_companies = 24; | |
// Feminine version of what_i_love_about field. | |
// This data was manually built by Bayes Impact's Content Team over the years. | |
string what_i_love_about_feminine = 25; | |
// The (at most 11) top departements in terms of offer/demand ratio, in descending order. |
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
<WithNote | |
hasComment={true} | |
note={<React.Fragment> | |
{userYou('Tu ne trouves pas ton', 'Vous ne trouvez pas votre')} métier ? | |
<ExternalLink style={{color: colors.BOB_BLUE, fontSize: 15, marginLeft: 3}} | |
href="https://airtable.com/shreUw3GYqAwVAA27"> | |
Clique{userYou('', 'z')} ici pour l'ajouter | |
</ExternalLink> | |
</React.Fragment>}> | |
<FieldSet |
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 hashlib | |
import sys | |
def hash_lines(inputfile, outputfile): | |
"""Hash all lines of the input file and populate the output.""" | |
count = 0 | |
with open(outputfile, 'wt') as output: | |
with open(inputfile, 'r') as input_lines: | |
for line in input_lines: |
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
<html> | |
<head> | |
<script src="https://cdn.rawgit.com/emn178/js-sha1/c724643d/src/sha1.js"></script> | |
<script> | |
function hashIt() { | |
var content = document.getElementById('content').value | |
document.getElementById('result').innerText = | |
content.split('\n').map(sha1).join('\n') | |
} | |
</script> |
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
"""Minimal code to reproduce PyLint bug around infered, ignored, no-member.""" | |
import os | |
class MyVeryOwnError(ValueError): | |
"""My Exception class.""" | |
node = True | |
def main(): |