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
| coro: main.cpp | |
| $(CXX) -O3 -DNDEBUG -g -fno-exceptions -fcoroutines -std=c++2a main.cpp -o coro |
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
| #!/usr/bin/env python3 | |
| import pandas as pd | |
| import numpy as np | |
| import re | |
| number = re.compile("(-)?(\d+)((\.|,)(\d+))?([-+ ](\d))?") | |
| x = pd.read_csv("raw.csv", header=None) |
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
| #include <iostream> | |
| #include <chrono> | |
| #include <cstring> | |
| #include <memory> | |
| #include <cstdint> | |
| #include <unistd.h> | |
| inline void swab_bi(const void* from, void* to, std::size_t size) { | |
| const auto begin = reinterpret_cast<const std::uint16_t*>(from); |
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
| #define _GNU_SOURCE | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <systemd/sd-bus.h> | |
| #include <errno.h> | |
| #include <sys/types.h> | |
| #include <sys/stat.h> | |
| #include <fcntl.h> | |
| #include <sys/mman.h> |
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
| #!/usr/bin/env elixir | |
| :ok = Application.ensure_started(:crypto) | |
| defmodule Git do | |
| defp write_object(repo, type, content) do | |
| object = type <> <<" ">> <> (byte_size(content) |> to_string) <> <<0>> <> content | |
| hash = :crypto.hash(:sha, object) | |
| object = object |> :zlib.compress |
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
| #include <iostream> | |
| #include <cstring> | |
| #include <random> | |
| #include <chrono> | |
| #include <iterator> | |
| template<class RandomIt, class URBG> | |
| void partial_shuffle(RandomIt first, RandomIt middle, RandomIt last, URBG&& g) | |
| { | |
| using difference_type = typename std::iterator_traits<RandomIt>::difference_type; |
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
| #define _GNU_SOURCE | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <unistd.h> | |
| #include <sys/types.h> | |
| #include <sys/stat.h> | |
| #include <fcntl.h> | |
| #include <string.h> | |
| /* |
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 xml.etree.ElementTree as ET | |
| import textwrap | |
| w = textwrap.TextWrapper(initial_indent=' * ', subsequent_indent=' ', width=62) | |
| root = ET.parse('notes.xml') | |
| for x in root.findall('./section[title]'): | |
| print(x.find("title").text) | |
| z = x.findall("./section[title='Fixed Bugs and Malfunctions']/list/item/p[1]") | |
| for y in z: |
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
| /** | |
| Name : ADefine.h 常量及宏定义声明文件 | |
| Author : Xiaomeng Lu | |
| Version : 0.1 | |
| Date : Oct 13, 2012 | |
| Last Date : Oct 13, 2012 | |
| Description : 天文数字图像处理中常用的常量及宏定义 | |
| **/ | |
| #ifndef _ADEFINE_H_ | |
| #define _ADEFINE_H_ |
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
| #include <math.h> | |
| #include <string.h> | |
| #include "TimeAndCoordinate.h" | |
| // FIXME: data!!! | |
| char c19[160]; | |
| char c18[160]; | |
| void Rot123(int a1, double a2, double *a3, double *a4) | |
| { |