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 sqlite3 | |
import random | |
import time | |
import string | |
from builtins import bytes, range, int, min, max, print | |
from statistics import mean | |
import itertools | |
# Connect to SQLite database (or create it if it doesn't exist) | |
conn = sqlite3.connect('/Users/riccardobusetti/Desktop/sqlite/my_db.sqlite') |
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
use std::borrow::BorrowMut; | |
use std::cell::{Ref, RefCell}; | |
use std::ops::Add; | |
use std::rc::Rc; | |
use crate::cmrdts::CmRDTOp::ADD; | |
#[derive(Copy, Clone)] | |
pub enum CmRDTOp<T> { | |
ADD(T) |
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
extern crate core; | |
use std::borrow::Borrow; | |
use std::cell::RefCell; | |
use std::collections::HashMap; | |
use std::fmt::format; | |
use std::io; | |
use std::os::macos::raw::{stat, time_t}; | |
use std::rc::Rc; | |
use std::sync::{Arc, Mutex}; |
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
#include <stdio.h> | |
#include <string.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <time.h> | |
/* PIPE CONSTANTS */ | |
#define READ_ON_PIPE 0 | |
#define WRITE_ON_PIPE 1 |
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
#include <stdio.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <pthread.h> | |
#include <dirent.h> | |
#include "fcopy.h" | |
#include <string.h> | |
/* MACROS */ | |
#define MAX_MP3_TRANSFER 100 |