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
from abc import abstractmethod, abstractproperty, ABC | |
from typing import List | |
def load_from_file(filename): | |
return [GuineaPig("Kéké"), GuineaPig("Choki"), Cat("Gaspard")] | |
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
using System.Runtime.InteropServices; | |
using System.Security.Cryptography; | |
using System.Text; | |
using System.Text.Json; | |
const ushort securityVersionReference = 0; | |
const ushort productIdReference = 0; | |
byte[] nonce = | |
{ | |
0x21, 0x0D, 0x7A, 0x62, 0xFA, 0xC0, 0x71, 0xAD, 0x92, 0x2A, 0xE0, 0x7B, 0x28, 0xFE, 0xCA, 0xD2, |
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
// Advent of Code 2021, day 2, part 1. | |
// Solved using funny immutable and functional C#. | |
// Written by Jämes Ménétrey. | |
using System; | |
using System.IO; | |
using System.Linq; | |
var result = File.ReadAllLines("input.txt") | |
.Aggregate(new Submarine(), ParseInput, submarine => submarine.Result); | |
Console.WriteLine($"Result: {result}"); |
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
U-Boot SPL 2020.10-rc1 (Apr 28 2021 - 16:33:11 +0000) | |
PMIC: PFUZE100 ID=0x10 | |
Normal Boot | |
Trying to boot from MMC2 | |
D/TC:0 get_aslr_seed:1380 Warning: no ASLR seed | |
D/TC:0 add_phys_mem:564 TEE_SHMEM_START type NSEC_SHM 0xffe00000 size 0x00200000 | |
D/TC:0 add_phys_mem:564 TA_RAM_START type TA_RAM 0xfe200000 size 0x01c00000 | |
D/TC:0 add_phys_mem:564 VCORE_UNPG_RW_PA type TEE_RAM_RW 0xfe062000 size 0x0019e000 | |
D/TC:0 add_phys_mem:564 VCORE_UNPG_RX_PA type TEE_RAM_RX 0xfe000000 size 0x00062000 | |
D/TC:0 add_phys_mem:564 ROUNDDOWN(0x38800000, CORE_MMU_PGDIR_SIZE) type IO_SEC 0x38800000 size 0x00200000 |
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
/*++ BUILD Version: 0073 Increment this if a change has global effects | |
Copyright (c) Microsoft Corporation. All rights reserved. | |
Module Name: | |
winnt.h | |
Abstract: |
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
/*! @file | |
* The pin tool is based on the sample tool MyPinTool and has been modified | |
* to only count the executed basic blocks of an application. | |
* | |
* Written by Jämes Ménétrey. | |
*/ | |
#include "pin.H" | |
#include <iostream> |
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
static void Main(string[] args) | |
{ | |
// Allocate the buffer on the stack (therefore not managed by the GC) | |
Span<char> buffer = stackalloc char[20]; | |
// Ask for the password | |
Console.Write("Type a password: "); | |
TypePassword(buffer, 0); | |
Console.WriteLine(); |
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 the online compiler: https://www.onlinegdb.com/online_c_compiler | |
#include <stdio.h> | |
int main() | |
{ | |
char v[] = {00, 00, 0xd8, 0x0a, 0x9b, 0x5f, 0x53, 0x42}; | |
double* d_ptr = &v; | |
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
package main | |
import ( | |
"fmt" | |
"unsafe" | |
) | |
func main() { | |
var i int = 66 | |
var j int = 1234 |
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
// Written by Jämes Ménétrey for the lecture Advanced Programming Paradigms. | |
// Linear walk through inspired from https://gist.github.com/dholbrook/2967371. | |
import scala.annotation.tailrec | |
import scala.language.implicitConversions | |
object BinaryTreeImpl { | |
/** | |
* The contract that defines a binary tree. |
NewerOlder