Comparing libevent and libuv. My upfront biased: I want to like libevent. However, I want to objectively compare the two and make an informed decision.
- libevent 2.0.22 (Stable) [2014-01-05]
- libuv 1.8.0 (Stable) [2015-12-15]
#!/usr/bin/python3.11 | |
from typing import Union | |
from functools import partial | |
import timeit | |
class Foo: | |
__slots__ = "name", "age" | |
def __init__(self, name : str, age : int) -> None: | |
self.name = name |
import smtplib | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText | |
from email.mime.image import MIMEImage | |
from email.mime.application import MIMEApplication | |
def send_test_mail(body): | |
sender_email = "misgana.bayetta@gmail.com" | |
receiver_email = "misgana.oss@gmail.com" |
mport json | |
import urllib | |
people = ["Misgana", "Rahel", "Yosef", "Nemera", "Hawi", "Bayetta", "Fantaye", "Kemeru", "Ayantu", "Ayelech"] | |
generated = [False]*len(people) | |
random_number_service_url = f"https://qrng.anu.edu.au/API/jsonI.php?length={len(people)}&type=uint16" | |
names_generated = [] | |
while not all(generated): | |
request = urllib.request.urlopen(random_number_service_url) | |
data = json.load(request) |
from bokeh.plotting import figure | |
from bokeh.models import ColumnDataSource, HoverTool | |
from bokeh.plotting import figure, output_file, show | |
def location_plot(title, colors): | |
whisky_csv = "whiskies.csv" | |
whisky = pd.read_csv(whisky_csv) | |
output_file(title+".html") | |
location_source = ColumnDataSource( | |
data = { |
import React from 'react'; | |
import { | |
AsyncStorage, | |
StyleSheet, | |
Text, | |
TextInput, | |
TouchableOpacity, | |
View, | |
} from 'react-native'; |
import json | |
import time | |
from websocket import create_connection | |
#NOTE: needs installation of pytest and pytest-benchamark libraries | |
sentences = ['How do you treat a migraine?'] | |
uri = "ws://{}:{}{}".format('node1.naint.tech', 8383, '/services/bio_clinical_bert/') | |
ws = create_connection(uri) |
import pandas as pds | |
import numpy as np | |
import ffx | |
# Silence SKlearn warning on python3 | |
def warn(*args, **kwargs): | |
pass | |
import warnings | |
warnings.warn = warn |
import pandas as pds | |
import numpy as np | |
import ffx | |
# Silence SKlearn warning on python3 | |
def warn(*args, **kwargs): | |
pass | |
import warnings | |
warnings.warn = warn |
2018-12-28 01:08:18.088603 | 887620 | |
---|---|---|
2018-12-28 01:13:21.270092 | 887889 | |
2018-12-28 01:18:31.658331 | 888220 | |
2018-12-28 01:23:34.410043 | 889230 | |
2018-12-28 01:28:37.181794 | 889680 | |
2018-12-28 01:33:48.209001 | 890040 | |
2018-12-28 01:38:51.388811 | 890925 | |
2018-12-28 01:43:54.706751 | 891480 | |
2018-12-28 01:48:57.160848 | 891730 | |
2018-12-28 01:54:03.030119 | 892121 |