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 | |
import sys | |
numpy.seterr(all='print') | |
original = numpy.fromfile(sys.argv[1], '<h').astype(int) | |
delayed = numpy.fromfile(sys.argv[2], '<h').astype(int) | |
original_len = len(original) | |
delayed_len = len(delayed) |
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
all: | |
gcc -pipe -nostdlib -nostartfiles -Qn -Wl,--build-id=none -o tiny-hello tiny-hello.s | |
strip -R .ARM.attributes tiny-hello | |
! ./tiny-hello | |
ls -l tiny-hello | |
clean: | |
rm -f tiny-hello |
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; | |
using System.Linq; | |
using System.Linq.Expressions; | |
namespace ConsoleApplication1 | |
{ | |
public class Foo | |
{ | |
public int A { get; set; } | |
public Bar Bar; |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApplication4 | |
{ | |
public class EnumeratorBox<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
package httpclient; | |
import java.io.InputStream; | |
import java.net.URL; | |
import java.net.URLConnection; | |
public class HttpClient { | |
public static void main(String[] args) { | |
if (args.length != 1) { | |
System.err.println("Usage: httpclient <url>"); |
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
#!/bin/bash | |
rm -f programe.csv | |
for i in *.txt; | |
do iconv -f UTF-16 -t UTF-8 $i | tail -n +2 | sort | sed 's/\s\{2,\}\([0-9.]\+\)/,\1/g' | sed "s/^/$i,/g" >> programe.csv; | |
done |
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> | |
int v[10]; | |
void mergesort(int l, int r) | |
{ | |
if (r > l) | |
{ | |
int aux[10], m = (l + r) / 2, i = l, j = m + 1, k = 0; | |
mergesort(l, m); |
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 <iostream> | |
#include <memory> | |
#include <utility> | |
#ifndef _MSC_VER | |
namespace std | |
{ | |
template<class _Ty, | |
class... _Types> inline | |
typename enable_if<!is_array<_Ty>::value, |
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
/* | |
* Datapipe - Create a listen socket to pipe connections to another | |
* machine/port. 'localport' accepts connections on the machine running | |
* datapipe, which will connect to 'remoteport' on 'remotehost'. | |
* It will fork itself into the background on non-Windows machines. | |
* | |
* This implementation of the traditional "datapipe" does not depend on | |
* forking to handle multiple simultaneous clients, and instead is able | |
* to do all processing from within a single process, making it ideal | |
* for low-memory environments. The elimination of the fork also |
OlderNewer