Skip to content

Instantly share code, notes, and snippets.

View cjauvin's full-sized avatar

Christian Jauvin cjauvin

View GitHub Profile

Vérification des faits : L'open source

Chaque ligne contient un fait extrait du texte, un lien source, et un résumé de la vérification.


Introduction

  • Fait : Linux fait tourner la grande majorité des serveurs web, des téléphones Android et des superordinateurs. | Source : Linux Statistics - Enterprise Apps Today | Vérification : Linux domine avec 96,3 % des top 1 million de serveurs web, Android (basé sur Linux) détient 72 % du marché mobile, et 100 % des 500 superordinateurs les plus puissants tournent sous Linux depuis 2017.
pico-8 cartridge // http://www.pico-8.com
version 42
__lua__
function _init()
pspeed=4
gameover=0
xpos=63
ballposx=63
ballposy=63
import sys
from random import randrange
if __name__ == "__main__":
while True:
print("Level: ", end="")
try:
level = int(input())
except ValueError:
level = False
import numpy as np
def weighted_quantile_type_7(a, q, weights=None, axis=None):
def _func_1d(arr, q, weights):
n = len(arr)
if weights is None:
weights = np.repeat(1 / n, n)
else:
@cjauvin
cjauvin / hru_deduping.py
Last active February 13, 2021 15:56
HRU Deduping
In [65]: import pandas as pd
In [66]: a = pd.DataFrame({'hru': [9, 10, 10], 'sub': [100, 100, 100], 'down': [-1, 200, -1]})
In [67]: a
Out[67]:
hru sub down
0 9 100 -1
1 10 100 200
2 10 100 -1
import sqlalchemy as db
from sqlalchemy import Table, Column, Integer, String, ForeignKey
from sqlalchemy.orm import relationship
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
Base = declarative_base()
engine = db.create_engine("sqlite:///toto.db", echo=True)
@cjauvin
cjauvin / seb.py
Last active November 25, 2018 20:48
from flask import Flask, send_file
from io import BytesIO
app = Flask(__name__)
@app.route('/get_placements')
def get_placements():
placements = '<Placemark>bla</Placemark>' # replace with your own placement creation logic
f = BytesIO() # memory buffer, acting as a file
# f-strings are new in py3.6+
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.