Skip to content

Instantly share code, notes, and snippets.

@geo2k1
geo2k1 / PY0101EN-5-1-Numpy1D.ipynb
Created Dec 20, 2019
Created on Cognitive Class Labs
View PY0101EN-5-1-Numpy1D.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View cr_5579_1576853311.diff
diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c
index 27f4b0834..c33fc0f1f 100644
--- a/vtysh/vtysh_config.c
+++ b/vtysh/vtysh_config.c
@@ -262,7 +262,8 @@ void vtysh_config_parse_line(void *arg, const char *line)
|| !strncmp(line, " no vrrp",
strlen(" no vrrp"))) {
config_add_line(config->line, line);
- } else if (!strncmp(line, " ip mroute", strlen(" ip mroute"))) {
+ } else if (!strncmp(line, " ip mroute",
@itzg
itzg / get-kube-apis.sh
Last active Dec 20, 2019
curl snippet to access kubernetes API from within a pod
View get-kube-apis.sh
curl --cacert /var/run/secrets/kubernetes.io/serviceaccount/ca.crt \
-H "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" \
https://kubernetes/apis/
View module.ts
import * as log from "https://deno.land/std/log/mod.ts";
View HttpService.cpp
// Fill out your copyright notice in the Description page of Project Settings.
#include "HttpService.h"
#include "NetworkPlayerState.h"
// Sets default values
AHttpService::AHttpService()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = false;
@ctarn
ctarn / bug.py
Created Dec 20, 2019
Python3 Bug
View bug.py
import collections
from typing import Iterable
from unittest import TestCase
class Node(collections.UserList):
owner: None = None
class Leaf(Node):
@dage459
dage459 / alpine-alertmanager:1.0.0
Created Dec 20, 2019
alpine-alertmanager:1.0.0
View alpine-alertmanager:1.0.0
# Copyright 2019 [@dage459]
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@sharanry
sharanry / GenVsTuring.ipynb
Last active Dec 20, 2019
Turing HMC vs Gen MH & SMC
View GenVsTuring.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View learn_sliced.go
inputs := make([][]float64, len(lines))
y := make([]float64, len(lines))
// Loop through lines & turn into object
for i, line := range lines {
inputs[i] = make([]float64, len(line)-1)
for j, data := range line {
f, err := strconv.ParseFloat(data, 64)
if err != nil {
return nil, nil, err
View keybase.md

Keybase proof

I hereby claim:

  • I am nrosenw on github.
  • I am swagijuana (https://keybase.io/swagijuana) on keybase.
  • I have a public key ASAgr8FRKQbcud4_YGi36ECRx68MkB01ZH1Cl7jjRx-1mAo

To claim this, I am signing this object:

You can’t perform that action at this time.