I hereby claim:
- I am icedraco on github.
- I am icedraco (https://keybase.io/icedraco) on keybase.
- I have a public key ASBF5Vf0wwLeueo-RWhQQKq03z5TSoY28EGxWTXhUnJUcwo
To claim this, I am signing this object:
| #pragma once | |
| #include <mutex> | |
| #include <condition_variable> | |
| #include "circular_queue.hpp" | |
| template <typename T, size_t N> | |
| class bqueue |
| #include <cstdio> | |
| template<typename T> | |
| class smartptr { | |
| public: | |
| smartptr(T* v) : _data(new data(v)) { | |
| printf(" * smartptr: obtained value %d\n", *_data->value); | |
| } | |
| smartptr(const smartptr &other) : _data(other._data) { |
| # Bluetooth Speaker Hogging Script | |
| # | |
| # Designed to aggressively hold an open connection to a Bluetooth speaker. | |
| # | |
| # Particularly useful for when your neighbors have an "incompatible" taste in | |
| # music and don't consider it a problem that they play it too loud. | |
| # | |
| # Requirements: | |
| # sudo apt install libbluetooth-dev | |
| # python3.7 -m pip install pybluez |
| package org.icerealm.examples | |
| import java.net.HttpURLConnection | |
| import java.net.URL | |
| fun main() { | |
| val url = URL("https://postman-echo.com/status/403") | |
| val con: HttpURLConnection = url.openConnection() as HttpURLConnection | |
| con.requestMethod = "GET" | |
| con.connectTimeout = 10*1000 |
| /*** | |
| * Source: | |
| * https://stackoverflow.com/questions/40230276/how-to-make-a-type-5-uuid-in-java | |
| */ | |
| import java.security.MessageDigest | |
| import java.security.NoSuchAlgorithmException | |
| import java.util.UUID | |
| """ | |
| This example demonstrates a "dependency injection" technique described | |
| by Raymond Hettinger during PyCon 2015: | |
| https://www.youtube.com/watch?v=EiOglTERPEo | |
| Regular dependency injection requires one to provide a resource to an object | |
| that requires it using the __init__() method (or a class constructor). | |
| This method provides an alternative way to specify a resource using Python's | |
| Method Resolution Order (MRO) and super() magic. |
| import numpy as np | |
| from numpy.random import randint | |
| from typing import List, Tuple | |
| G_GRID_SIZE = 100 | |
| G_INIT_CRYSTAL_COORDS = (50, 50) | |
| G_NUM_PARTICLES = 10 | |
| G_PARTICLE_INCREMENTS = range(10, 31, 10) |
| #!/usr/bin/env python3 | |
| import os | |
| from typing import List, Callable | |
| def transform(name: str) -> str: | |
| return bytes(name, "latin1").decode("utf-8") | |
| from socket import * | |
| # IP ranges we are monitoring | |
| MONITOR_NETWORKS = [ | |
| '192.168.0.0/16', | |
| '10.0.0.0/8', | |
| '169.254.0.0/16' | |
| ] | |
I hereby claim:
To claim this, I am signing this object: