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 java.util.*; | |
public class Fibonacci | |
{ | |
private HashMap <Integer,Double> fibo_results; | |
private int number; | |
private boolean fast_mode; | |
private boolean cache_mode; |
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
# pour acceder aux fonctions maths evoluees | |
import math | |
# pour RHO/Erlang de 1 a 80 | |
for p in range(1,80+1): | |
# pour C/capacite de RHO a RHO*2 | |
for c in range(p,p*2+1): | |
# calcul numerateur | |
numerateur = pow(p,c) * 1.0 / math.factorial(c) |
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/env python3 | |
# -*- coding: UTF-8 -*- | |
import sys | |
import requests # http://docs.python-requests.org/en/master/ | |
from bs4 import BeautifulSoup # http://www.crummy.com/software/BeautifulSoup/ | |
# OpenNIC url | |
url = 'https://servers.opennicproject.org' |
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
# -*- coding: utf-8 -*- | |
"""Generic linux daemon base class for python 3.x.""" | |
import os | |
import sys | |
import time | |
import atexit | |
import signal | |
import logging |
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
# | |
# smartcard_list.txt | |
# Copyright (C) 2002-2018 Ludovic Rousseau | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
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/env python | |
# -*- coding: utf-8 -*- | |
import logging | |
from tornado import httpserver, ioloop, netutil, process, web, options | |
# app's title | |
__title__ = 'Example' | |
options.define('port', default=8080, help='run on the given port', type=int) |
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
# -*- coding: UTF-8 -*- | |
import os | |
import csv | |
import logging | |
logger = logging.getLogger(__name__) | |
def read_csv(file: str = 'in.csv', skip_title: bool = 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# depends : | |
# - cryptography | |
# - PyJWT | |
# | |
import timeit | |
import cryptography |
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
# -*- coding: utf-8 -*- | |
import collections | |
def dict_merge(dct: dict, merge_dct: dict): | |
""" Recursive dict merge. Inspired by :meth:``dict.update()``, instead of | |
updating only top-level keys, dict_merge recurses down into dicts nested | |
to an arbitrary depth, updating keys. The ``merge_dct`` is merged into | |
``dct``. |
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
# -*- coding: utf-8 -*- | |
import time | |
import threading | |
class ThreadedClass(object): | |
""" Threading example class. | |
The run() method will be started and it will run in the background |
OlderNewer