Skip to content

Instantly share code, notes, and snippets.

View charlesakalugwu's full-sized avatar

Charles Akalugwu charlesakalugwu

View GitHub Profile
1. Write a Python program to find those numbers which are divisible by 7 and multiple of 5, between 1500 and 2700 (both included).
2. Write a Python program to convert temperatures to and from celsius, fahrenheit.
[ Formula : c/5 = f-32/9 [ where c = temperature in celsius and f = temperature in fahrenheit ]
Expected Output :
60°C is 140 in Fahrenheit
45°F is 7 in Celsius
3. Write a Python program to guess a number between 1 to 9.
Note : User is prompted to enter a guess. If the user guesses wrong then the prompt appears again until the guess is correct, on successful guess, user will get a "Well guessed!" message, and the program will exit.
codecov:
token: uuid # Your private repository token
url: "http" # for Codecov Enterprise customers
slug: "owner/repo" # for Codecov Enterprise customers
branch: master # override the default branch
bot: username # set user whom will be the consumer of oauth requests
ci: # Custom CI domains if Codecov does not identify them automatically
- ci.domain.com
- !provider # ignore these providers when checking if CI passed
# ex. You may test on Travis, Circle, and AppVeyor, but only need

Keybase proof

I hereby claim:

  • I am charlesakalugwu on github.
  • I am charlesakalugwu (https://keybase.io/charlesakalugwu) on keybase.
  • I have a public key ASADf0A5-1KTNUZyifgtEwio-cxNO99urk8bL99Bh-dXVAo

To claim this, I am signing this object:

@charlesakalugwu
charlesakalugwu / gist:2a4768ce832a902a958e8dff6aba7113
Created December 11, 2017 02:02
heapster 1.4.0 logs on k8s 1.8.3
$ kubectl logs --namespace=kube-system heapster-584544cbd9-ctgkc
I1129 17:09:54.750362 1 heapster.go:72] /heapster --source=kubernetes.summary_api:'' --sink=influxdb:http://monitoring-influxdb.kube-system.svc:8086
I1129 17:09:54.750412 1 heapster.go:73] Heapster version v1.4.0
I1129 17:09:54.750600 1 configs.go:61] Using Kubernetes client with master "https://10.77.0.1:443" and version v1
I1129 17:09:54.750610 1 configs.go:62] Using kubelet port 10255
E1129 17:10:44.754591 1 influxdb.go:264] issues while creating an InfluxDB sink: failed to ping InfluxDB server at "monitoring-influxdb.kube-system.svc:8086" - Get http://monitoring-influxdb.kube-system.svc:8086/ping: dial tcp: lookup monitoring-influxdb.kube-system.svc on 10.77.0.10:53: read udp 10.40.0.8:54138->10.77.0.10:53: i/o timeout, will retry on use
I1129 17:10:44.754620 1 influxdb.go:278] created influxdb sink with options: host:monitoring-influxdb.kube-system.svc:8086 user:root db:k8s
I1129 17:10:44.754645 1 h
@charlesakalugwu
charlesakalugwu / k8s-svc-annotations.md
Created December 4, 2017 19:02 — forked from mgoodness/k8s-svc-annotations.md
AWS ELB-related annotations for Kubernetes Services (v1.5)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval (in minutes)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-enabled (true|false)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix
  • service.beta.kubernetes.io/aws-load-balancer-backend-protocol (http|https|ssl|tcp)
  • service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled (true|false)
  • service.beta.kubernetes.io/aws-load-balancer-connection-draining-timeout (in seconds)
@charlesakalugwu
charlesakalugwu / gist:03cb48bcf0b9d9d510cd3510c419c594
Created November 24, 2017 11:04
zookeeper statefulset quorum failure
```
[2017-11-24 07:59:19,009] WARN Cannot open channel to 2 at election address zookeeper-1.zookeeper/10.40.0.1:3888 (org.apache.zookeeper.server.quorum.QuorumCnxManager)
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:562)
---
kind: ServiceAccount
apiVersion: v1
metadata:
name: zookeeper
namespace: default
---
@charlesakalugwu
charlesakalugwu / Jenkinsfile.groovy
Created June 6, 2017 21:45 — forked from Faheetah/Jenkinsfile.groovy
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'No quotes in single backticks'
sh 'echo $BUILD_NUMBER'
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"'
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"'
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"'
echo 'Using three backslashes still results in preserving the single quotes'
@charlesakalugwu
charlesakalugwu / Jenkinsfile.groovy
Created June 6, 2017 21:45 — forked from Faheetah/Jenkinsfile.groovy
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'No quotes in single backticks'
sh 'echo $BUILD_NUMBER'
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"'
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"'
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"'
echo 'Using three backslashes still results in preserving the single quotes'
@charlesakalugwu
charlesakalugwu / parse_yaml.sh
Created May 6, 2016 08:03 — forked from pkuczynski/parse_yaml.sh
Read YAML file from Bash script
#!/bin/sh
parse_yaml() {
local prefix=$2
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 |
awk -F$fs '{
indent = length($1)/2;
vname[indent] = $2;
for (i in vname) {if (i > indent) {delete vname[i]}}