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
`timescale 1ns / 1ps | |
module reservation_station | |
#(parameter int RS_ID, int DATA_WIDTH) | |
( | |
input logic clk, | |
input logic rst, | |
register_file register_file, | |
issue_bus issue, |
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
#!/usr/bin/java --source 21 | |
import java.io.*; | |
import java.net.*; | |
import java.nio.file.*; | |
import com.sun.net.httpserver.*; | |
public class FileUploadServer implements HttpHandler { | |
public static void main(String[] args) throws IOException { |
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
[bits 16] | |
load: | |
mov ah, 0x02 ; read disk sectors | |
mov al, 0x01 ; 1 sector (probably should statically calculate this somehow, or use linker script) | |
mov ch, 0x00 ; track | |
mov cl, 0x02 ; sector | |
mov dh, 0x00; head | |
; mov dl, 0x00 | |
mov bx, 0 |
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 ax.xz.census.proxy; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import java.io.Closeable; | |
import java.io.IOException; | |
import java.net.InetAddress; | |
import java.net.InetSocketAddress; | |
import java.net.SocketAddress; |
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 java.io.IOException; | |
import java.net.InetAddress; | |
import java.net.InetSocketAddress; | |
import java.net.SocketAddress; | |
import java.nio.ByteBuffer; | |
import java.nio.channels.SelectionKey; | |
import java.nio.channels.Selector; | |
import java.nio.channels.ServerSocketChannel; | |
import java.nio.channels.SocketChannel; | |
import java.nio.charset.StandardCharsets; |
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 numpy as np | |
import scipy as sp | |
def tcp_siggen(samp_rate, freq, amp, noise_var, N): | |
t = np.arange(start=0, stop=N / samp_rate, step=1 / samp_rate, dtype=np.complex64) | |
# Create the phase of the sin wave at each samples | |
phase = 2 * np.pi * freq * t | |
# create a complex sin wave | |
carrier = amp * np.exp(phase * 1j) | |
# generate complex white(ish) gaussian noise with the right variance |
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 numpy as np | |
import scipy as sp | |
def finite_difference_coefficients(k, xbar, x): | |
""" | |
based on the maths in Finite Difference Methods for Ordinary and Partial Differential Equations | |
:param k: the order of the derivative | |
:param xbar: the point at which the derivative is to be evaluated | |
:param x: the set of points at which the function is known | |
:return: the coefficients of the finite difference approximation |
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
@nb.njit | |
def z(theta): # funny bromwich contour | |
return ( | |
.1446 + 3.0232 * theta ** 2 / (theta ** 2 - 3.0767 * np.pi ** 2) | |
+ 0.2339 * 1j * theta | |
) | |
@nb.njit | |
def z_dash(theta, h=.001): |
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 <stdlib.h> | |
#include "parse.h" | |
#define BUFSIZE 256 | |
FILE* open_map() { | |
FILE* ver = fopen("/proc/version", "r"); |
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
zone/zone-list.h: // zone-allocated objects for which destructors are not called anyway, so | |
ast/scopes.cc: // scope and we terminate the iteration there anyway. | |
ast/scopes.cc: // in the outer scope anyway, because if a binding exists in an outer | |
ast/scopes.h: // Sloppy eval in script scopes can only introduce global variables anyway, | |
ast/scopes.h: // isn't extendable anyway, or | |
heap/memory-chunk.cc: // Not actually used but initialize anyway for predictability. | |
heap/cppgc/heap-page.cc: // for the first header which will anyways serve as header again. | |
heap/heap.cc: // This is an optimization. The sweeper will release black fillers anyway. | |
codegen/x64/assembler-x64.cc: // (larger) kCodeAlignment anyways. | |
codegen/ia32/assembler-ia32.cc: // (larger) kCodeAlignment anyways. |
NewerOlder