Skip to content

Instantly share code, notes, and snippets.

@Yepoleb
Yepoleb / freq_diff.cpp
Last active December 2, 2018 06:55
Advent of Code 2018 Solution 1.2
#include <cassert>
#include <limits.h>
#include <cstdio>
#include "input.hpp"
int find_freq(const std::vector<int>& changes)
{
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
int main(void)
{
int end = 35000000;
int *sums = malloc(end * sizeof(int));
// Limit where we start counting divisors twice
int max_div = sqrtf(end);
/* License: CC0-1.0 */
/* Usage: shitty_streamcipher <key> < plaintext > ciphertext */
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <cstdio>
#include <cassert>
#include <stddef.h>
#include <gmp.h>
constexpr size_t PRIME_BITS = 1024;
constexpr size_t PRIME_BYTES = PRIME_BITS / 8;
namespace stx {
template<typename T>
class MapKeyIterator : public T
{
public:
MapKeyIterator() : T() {}
MapKeyIterator(T iter) : T(iter) {}
auto* operator->()
const uint32_t CONNECTIONLESS_HEADER = 0xFFFFFFFF;
const uint8_t A2S_GETCHALLENGE = 'q';
const uint8_t S2C_CHALLENGE = 'A';
const uint8_t C2S_CONNECT = 'k';
const uint8_t S2C_CONNECTION = 'B';
const uint32_t PROTOCOL_HASHEDCDKEY = 0x02;
const uint32_t PROTOCOL_STEAM = 0x03;
#include <stdint.h>
#include <cmath>
#define SIMDPP_ARCH_X86_SSE3
#include "simdpp/simd.h"
#include "SimplexNoise.h"
using vec4 = simdpp::float32<4>;
[
{
"type": "DepotDirectory",
"path": "data/",
"date": "2017-11-29T13:49:44",
"stats": 16877
},
{
"type": "DepotDirectory",
"path": "data/noarch/",
"""
Prints all bonus content changes tracked by GOG DB.
Needs a CSV dump in data/
"""
import csv
CHANGE_SYMBOL = {
This file has been truncated, but you can view the full file.
1917 data\aom_agents\abil_agent-play_scaled_damage_aoe.vseb_pc.str2_pc
173 data\aom_agents\abil_agent-play_scaled_damage_aoe.vseb_pc.strh_pc
2576 data\aom_agents\abil_heal-melee.vseb_pc.str2_pc
277 data\aom_agents\abil_heal-melee.vseb_pc.strh_pc
956 data\aom_agents\anim\synced\synced_anim_tags.tfe_pc.str2_pc
168 data\aom_agents\anim\synced\synced_anim_tags.tfe_pc.strh_pc
2305439* data\aom_agents\aom_agents.strh_pc
3112 data\aom_agents\aom_agents.vpkg
253561 data\aom_agents\aom_agents_precache.vpp_pc
12735 data\aom_agents\audio\1000048190.wem_pc