Skip to content

Instantly share code, notes, and snippets.

View SRsawaguchi's full-sized avatar

Naoya Sawaguchi SRsawaguchi

View GitHub Profile
@gene1wood
gene1wood / aws-lambda-relative-import-no-known-parent-package.md
Last active February 13, 2025 22:07
Python relative imports in AWS Lambda fail with `attempted relative import with no known parent package`

Python relative imports in AWS Lambda fail with attempted relative import with no known parent package

The Problem

In AWS Lambda if I attempt an explicit relative import like this

.
├── lambda_file.py
└── example.py
@RobertMenke
RobertMenke / websocket-close-event-codes.js
Created September 9, 2018 14:44
Defines constants for all websocket close event codes that are used in practice
// Defines constants for all websocket close event codes that are used in practice
// Link: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent
/**
* Normal closure; the connection successfully completed whatever purpose for which it was created.
*/
const NORMAL_CLOSURE = 1000
/**
* The endpoint is going away, either because of a server failure
@niisan-tokyo
niisan-tokyo / Ranking.php
Last active November 1, 2021 05:07
Ranking class using redis extension
<?php
namespace NiisanTokyo;
/**
* ランキング生成・取得クラス
*
* phpredis エクステンションが必要
*
* @see https://github.com/phpredis/phpredis
*/