Skip to content

Instantly share code, notes, and snippets.

View kdeenanauth's full-sized avatar

Kevin Deenanauth kdeenanauth

View GitHub Profile
@kdeenanauth
kdeenanauth / exp-firebase-tsoa.hbs
Created June 23, 2020 10:00
Example of custom TSOA template to create separate express servers
/* tslint:disable */
/* eslint-disable */
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
{{#if canImportByAlias}}
import { Controller, ValidationService, FieldErrors, ValidateError, TsoaRoute, HttpStatusCodeLiteral, TsoaResponse } from 'tsoa';
{{else}}
import { Controller, ValidationService, FieldErrors, ValidateError, TsoaRoute, HttpStatusCodeLiteral, TsoaResponse } from '../../../src';
{{/if}}
{{#each controllers}}
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF4UNJwBEADO00NwkswdTxA9+p9AtrIvid+UCOZ7chsXu2UPQqovsJ30/nZL
I3Yha2eZCSmMlOc+XlPut5ZZ2u61gJhin6rLVe/4qBQYX+zrG2Bmyrm8ImlaQOGj
b374hV7aUHuMmzhxt/x26Urb15Kugx2PPoq1APV+sfUhQo7TMq/anJu7dZbpQ4u0
TfwRSk/RgDCcuHjc3ZDbs/Lw8r2d3PK2v2Hgl2hY1K2WV9mWT9fsgUrYQoOYv3zI
ocXBVSFqE0GdFZy0l9hxRgD/EHocAnniMmrGOFiUGYUjxQF8TPW2I6HPkOzO1WqR
BzKkcvu8by78PdKKPX6dFgzysixJp13EVh4oBTPOpDE5LZtgG15Kdp3X7WuhBK4K
LnNT5qE3tvfSFBvvsBcp5KaYKfczU4RTTD2YQezF7gQziPeIr85DaMUK4+9RMurp
nycdqh8aigc3m4AwOQwVRRkCKWkVuZIU8VGM57A+RgtTj6+8fAv2lymU/4CP6nmT
@kdeenanauth
kdeenanauth / keybase.md
Created December 31, 2019 06:28
keybase.md

Keybase proof

I hereby claim:

  • I am kdeenanauth on github.
  • I am kdeenanauth (https://keybase.io/kdeenanauth) on keybase.
  • I have a public key ASDKK1kW13j40UzrPubmqsC4PtjI6n6jpZlLF7Bafh6kJQo

To claim this, I am signing this object:

@kdeenanauth
kdeenanauth / concat.txt
Last active July 26, 2017 21:22
Concat
>>> data = [{'col1': 'a', 'col2': 'z'}, {'col1':'b', 'col2': 'z'}, {'col1':'c', 'col2':'y'}, {'col1':'d', 'col2':'y'}]
>>> data
[{'col1': 'a', 'col2': 'z'}, {'col1': 'b', 'col2': 'z'}, {'col1': 'c', 'col2': 'y'}, {'col1': 'd', 'col2': 'y'}]
>>> df = pandas.DataFrame(data)
>>> df.groupby('col2')['col1'].apply(lambda x : x.str.cat(sep=', '))
col2
y c, d
@kdeenanauth
kdeenanauth / JSON_Demo.ipynb
Created July 26, 2017 16:06
Python JSON Demo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
class NexusRepo {
static def getPyPiAssetVersions(String baseUrl, String repository, String filter) {
if (filter == null) {
filter = ''
}
def post = new URL(baseUrl + "/service/extdirect").openConnection();
def message = '{"action":"coreui_Component","method":"readAssets","data":[{"page":1,"start":0,"limit":10000,"sort":[{"property":"name","direction":"ASC"}],"filter":[{"property":"repositoryName","value":"' +
repository +'"},{"property":"filter","value":"' +
filter + '"}]}],"type":"rpc","tid":35}'
@kdeenanauth
kdeenanauth / xtz.py
Last active May 1, 2017 05:42
xtz.py
#pylint: disable=expression-not-assigned, too-many-arguments, too-few-public-methods, C0103
"""xtz helps you build linear pipelines
The xtz module provides an environment to easily inject dependencies, log and debug
pipeline steps.
Example:
import logging
from typing import List
[
{
"description": null,
"mode": "NULLABLE",
"name": "visitorId",
"type": "INTEGER"
},
{
"description": null,
"mode": "NULLABLE",
[
{
"description": null,
"mode": "NULLABLE",
"name": "visitorId",
"type": "INTEGER"
},
{
"description": null,
"mode": "NULLABLE",
@kdeenanauth
kdeenanauth / .gitconfig
Created April 6, 2017 18:40
.gitconfig
[user]
email = kevin@deenanauth.com
name = Kevin Deenanauth
[alias]
prune = fetch --prune
# Because I constantly forget how to do this
# https://git-scm.com/docs/git-fetch#git-fetch--p
undo = reset --soft HEAD^