Skip to content

Instantly share code, notes, and snippets.

Avatar

Nguyễn Gia Phong McSinyx

View GitHub Profile
@McSinyx
McSinyx / build.zig
Created Sep 7, 2021
Zig extern struct recognized differently from Zig and C
View build.zig
const Builder = @import("std").build.Builder;
pub fn build(b: *Builder) void {
const exe = b.addExecutable("test", "main.zig");
exe.addIncludeDir(".");
exe.linkSystemLibrary("c");
exe.setTarget(b.standardTargetOptions(.{}));
exe.setBuildMode(b.standardReleaseOptions());
exe.install();
@McSinyx
McSinyx / keybase.md
Created May 24, 2021
Prove my GitHub identity
View keybase.md

Keybase proof

I hereby claim:

  • I am McSinyx on github.
  • I am mcsinyx (https://keybase.io/mcsinyx) on keybase.
  • I have a public key whose fingerprint is E90E 11B8 0493 343B 6132 E394 2714 8B2C 06A2 224B

To claim this, I am signing this object:

@McSinyx
McSinyx / acanban.pdf
Last active Mar 16, 2021
Acanban final paper
View acanban.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@McSinyx
McSinyx / extras_provider.py
Last active Jun 2, 2020
Resolve wheel requirements from PyPI with parallel download
View extras_provider.py
"""A provider that handles packages with "extras".
Python package dependencies can include "extras", which are additional
dependencies that are installed "on demand". For instance, project X could
have an additional set of dependencies if PDF generation features are needed.
These can be defined for an extra "pdf" and requested on install as X[pdf].
The basic resolvelib algorithm cannot handle extras, as it builds a dependency
graph which needs to be static - the edges (dependencies) from a node
(candidate) must be fixed. Extras break this assumption.
@McSinyx
McSinyx / anon.pdf
Last active Apr 15, 2020
System Cascade Connection
View anon.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@McSinyx
McSinyx / archaicy-aliases.h
Last active Dec 18, 2019
Alure play in Cython
View archaicy-aliases.h
// Aliases for relevant STL containers not declarable in Cython
// Copyright (C) 2019 Nguyễn Gia Phong
//
// This file is part of archaicy.
//
// archaicy is free software: you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
@McSinyx
McSinyx / problems.pdf
Last active Oct 8, 2019
Probability et Statistiques
View problems.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@McSinyx
McSinyx / start.html
Last active Oct 11, 2020
Abstract Start Page
View start.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Start Page</title>
<style type="text/css" media="screen">
@namespace svg url(http://www.w3.org/2000/svg);
svg {
display: block;
position: absolute;
View gist:f04c0224800eac33e62bcfac8bb47bbb
MemTotal: 16375596 kB
MemFree: 12515232 kB
MemAvailable: 10788976 kB
Buffers: 65768 kB
Cached: 1671596 kB
SwapCached: 0 kB
Active: 2343932 kB
Inactive: 955088 kB
Active(anon): 1566884 kB
Inactive(anon): 98080 kB
@McSinyx
McSinyx / do-not-read-me.md
Last active Apr 26, 2019
ICT1.2: Labwork 6
View do-not-read-me.md

After studying about pointers, labworks start to get interesting. So I decided to upload my solutions to compare with others. Hope some may find my implementations either helpful or amusing.

For exercise 4, please head to this commit. I felt that it was too long to be put together with 5-minute attempts.

Don't mind the file name tho, I put it that way so that the file will get alphabetically sorted before the labworks.