This file contains hidden or 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
| [package] | |
| name = "mandelbrot" | |
| version = "0.1.0" | |
| authors = ["Federico Pasqua <federico.pasqua.96@gmail.com>"] | |
| [dependencies] | |
| num = "0.1.41" | |
| image = "0.18.0" | |
| crossbeam = "0.3.0" | |
| num_cpus = "1.8.0" |
This file contains hidden or 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::hash::Hasher; | |
| use std::hash::BuildHasher; | |
| struct SquareSumHasher { | |
| state: u64, | |
| } | |
| impl SquareSumHasher { | |
| fn new(state: u64) -> Self { | |
| SquareSumHasher { state } |
This file contains hidden or 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 argparse; | |
| extern crate meval; | |
| extern crate crossbeam; | |
| extern crate num_cpus; | |
| #[macro_use] | |
| extern crate generator; | |
| use argparse::{ArgumentParser, Store}; | |
| use meval::Expr; |
This file contains hidden or 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
| fn get_last_block(bc_file: &Arc<Mutex<File>>) -> io::Result<String> { | |
| let mut f = bc_file.lock().unwrap(); | |
| let a = BufReader::new(f.deref_mut()).lines(); | |
| a.last().unwrap() | |
| } |
This file contains hidden or 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 vulkano::instance::Instance; | |
| use vulkano::instance::InstanceExtensions; | |
| use vulkano::instance::PhysicalDevice; | |
| use vulkano::device::Device; | |
| use vulkano::device::DeviceExtensions; | |
| use vulkano::device::Features; | |
| use vulkano::buffer::BufferUsage; | |
| use vulkano::buffer::CpuAccessibleBuffer; | |
| use vulkano::command_buffer::AutoCommandBufferBuilder; | |
| use vulkano::command_buffer::CommandBuffer; |
This file contains hidden or 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 -*- | |
| """ | |
| Created on Tue Dec 7 19:23:24 2021 | |
| @author: feder | |
| """ | |
| import numpy as np | |
| file = open('input3.txt') |
This file contains hidden or 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 functools | |
| import logging | |
| import pika | |
| from pika.adapters.asyncio_connection import AsyncioConnection | |
| from pika.exchange_type import ExchangeType | |
| LOGGER = logging.getLogger('ipsum.publisher') | |
| class IpsumPublisher: |
This file contains hidden or 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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Windows; | |
| using System.Windows.Controls; | |
| using System.Windows.Media; | |
| using System.Windows.Shapes; | |
| using System.Windows.Threading; | |
This file contains hidden or 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
| // See https://aka.ms/new-console-template for more information | |
| namespace ConsoleAppGameOfLife { | |
| public class GoLRule { | |
| public GoLRule() { | |
| Birth = new[] { 3 }; | |
| Stay = new[] { 2, 3 }; | |
| } | |
| public GoLRule(int[] birth, int[] stay) { |
This file contains hidden or 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
| open System | |
| open Npgsql.FSharp | |
| let connectionString : string = | |
| Sql.host "xxx.com" | |
| |> Sql.database "xxx" | |
| |> Sql.username "xxx" | |
| |> Sql.password "xxx" | |
| |> Sql.port 12345 | |
| |> Sql.requireSslMode |