Skip to content

Instantly share code, notes, and snippets.

View akornor's full-sized avatar
🚨
checkout https://playlistor.io

Raymond Akornor akornor

🚨
checkout https://playlistor.io
View GitHub Profile
#!/bin/sh
#
# Download and run the latest release version of the Certbot client.
#
# NOTE: THIS SCRIPT IS AUTO-GENERATED AND SELF-UPDATING
#
# IF YOU WANT TO EDIT IT LOCALLY, *ALWAYS* RUN YOUR COPY WITH THE
# "--no-self-upgrade" FLAG
#
# IF YOU WANT TO SEND PULL REQUESTS, THE REAL SOURCE FOR THIS FILE IS
perfalytics.c:106:6: warning: no previous prototype for ‘perfalytics_background_worker_main’ [-Wmissing-prototypes]
void perfalytics_background_worker_main(Datum main_arg) pg_attribute_noreturn();
^
perfalytics.c: In function ‘perfalytics_background_worker_main’:
perfalytics.c:106:57: error: expected declaration specifiers before ‘pg_attribute_noreturn’
void perfalytics_background_worker_main(Datum main_arg) pg_attribute_noreturn();
^
perfalytics.c:108:1: error: parameter ‘perfalytics_flush_query’ is initialized
const char * perfalytics_flush_query =
^
@akornor
akornor / guessletter.js
Created February 25, 2019 19:37
guessletter.js
const letters_of_word = ['F', 'O', 'X']
let letters_of_guessed_word = ['_', '_', '_']
function guessLetter(letter){
for(let i=0; i < letters_of_word.length; i++){
if (letter === letters_of_word[i]){
letters_of_guessed_word[i] = letter
console.log(letters_of_guessed_word.join(''))
console.log(`congratulations letter ${letter} found.`)
break
@akornor
akornor / main.py
Last active October 23, 2018 01:35
import numpy as np
import csv
from collections import namedtuple
from sklearn.linear_model import LinearRegression
Wine = namedtuple('Wine', ['fixed_acidity', 'volatile_acidity', 'citric_acid', 'residual_sugar', 'chlorides', 'free_sulfur_dioxide', 'total_sulfur_dioxide', 'density', 'pH', 'sulphates', 'alcohol', 'quality'])
def main():
wines = []
with open('wines.csv') as f:
@akornor
akornor / tic-tac-toe.py
Last active September 24, 2018 16:44
two player tic tac toe
import sys
import random
WINNING_COMBINATIONS=[
(1,2,3),
(4,5,6),
(7,8,9),
(1,4,7),
(2,5,8),
(3,6,9),
@akornor
akornor / main.py
Last active September 15, 2018 12:37
tic tac toe. assumes you're running python 3.
import sys
import random
WINNING_COMBINATIONS=[
(1,2,3),
(4,5,6),
(7,8,9),
(1,4,7),
(2,5,8),
(3,6,9),
@akornor
akornor / gist:e8ef313f8b8a16e50dba4892d98521a5
Created November 19, 2017 14:51
view html rendered markdown(github flavoured)
#!/bin/bash
file="$1"
curl -s https://api.github.com/markdown/raw -H 'Content-Type: text/plain' --data-binary "@$file"
@akornor
akornor / gist:9e4d997c383032b5391188d6e7a7f328
Created April 23, 2017 00:37
how to fix font rendering on ubuntu.
https://ask.fedoraproject.org/en/question/69232/how-to-fix-font-rendering-of-monaco/
@akornor
akornor / anagrams.txt
Created April 14, 2017 01:00
anagrams
overspread spreadover
muser remus serum
instar santir strain
ordinator radiotron
forecaster reforecast
chola loach olcha
don nod
buckbush bushbuck
armeria mararie
ametria artemia meratia ramaite