This file has been truncated, but you can view the full file.
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
| // GENERATED CODE | |
| // Network Protocol: 14094 | |
| use demoinfocs2_lite::{game_event::derive::GameEvent, entity::EntityClass}; | |
| use demoinfocs2_lite::entity::serializer::vector::*; | |
| #[derive(EntityClass, Clone, Default)] | |
| pub struct CAK47 { | |
| #[entity(name = "m_flAnimTime")] |
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 json, requests | |
| def fetch_and_write_ipset(output, data_type, resource_type): | |
| url = ( | |
| f"https://stat.ripe.net/data/{data_type}/data.json?v4_format=prefix&resource={resource_type}" | |
| ) | |
| r = requests.get(url) | |
| data = json.loads(r.text)["data"] |
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 natpmp | |
| import threading | |
| import urllib.request | |
| import json | |
| import traceback | |
| BASE_URL = "http://127.0.0.1:11205" | |
| def get_qbittorrent_perfs(): |
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
| pub trait SortInterface<T> { | |
| fn less(&self, another: &T) -> bool; | |
| } | |
| /// provides a exact same copy of the go container/heap implementation | |
| pub struct Heap<T: SortInterface<T>> { | |
| pub data: Vec<T>, | |
| } | |
| impl<T: SortInterface<T>> Heap<T> { |
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
| use std::os::fd::AsRawFd; | |
| use nix::sys::socket; | |
| fn main() -> Result<(), std::io::Error> { | |
| let sock = socket::socket( | |
| socket::AddressFamily::Inet, | |
| socket::SockType::Raw, | |
| socket::SockFlag::empty(), | |
| socket::SockProtocol::Udp, |
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
| from google.protobuf import descriptor_pb2 as descriptor_pb | |
| def print_field(field: descriptor_pb.FieldDescriptorProto, indent, is_proto3, sout): | |
| labels = {descriptor_pb.FieldDescriptorProto.LABEL_OPTIONAL: 'optional', | |
| descriptor_pb.FieldDescriptorProto.LABEL_REQUIRED: 'required', | |
| descriptor_pb.FieldDescriptorProto.LABEL_REPEATED: 'repeated'} | |
| types = {descriptor_pb.FieldDescriptorProto.TYPE_DOUBLE: 'double', | |
| descriptor_pb.FieldDescriptorProto.TYPE_FLOAT: 'float', | |
| descriptor_pb.FieldDescriptorProto.TYPE_INT64: 'int64', | |
| descriptor_pb.FieldDescriptorProto.TYPE_UINT64: 'uint64', |
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
| package hotpatch | |
| import ( | |
| "fmt" | |
| "io" | |
| "net/http" | |
| "strconv" | |
| ) | |
| type PartialHttpReader struct { |
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
| const CryptoJS = require('crypto-js'); | |
| function hexStringToUint8Array(hexString) { | |
| const length = hexString.length; | |
| const uint8Array = new Uint8Array(length / 2); | |
| for (let i = 0; i < length; i += 2) { | |
| uint8Array[i / 2] = parseInt(hexString.substring(i, i + 2), 16); | |
| } | |
| return uint8Array; | |
| } |
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
| package main | |
| import ( | |
| "math" | |
| ) | |
| // replicates https://pypi.org/project/rotor/ | |
| // which is used to decipher NXPK files | |
| type RotorObj struct { | |
| key [5]int16 |
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 types | |
| import cStringIO | |
| TYPE_NULL = '0' | |
| TYPE_NONE = 'N' | |
| TYPE_FALSE = 'F' | |
| TYPE_TRUE = 'T' | |
| TYPE_STOPITER = 'S' | |
| TYPE_ELLIPSIS = '.' | |
| TYPE_INT = 'i' |