Skip to content

Instantly share code, notes, and snippets.

View RowlandOti's full-sized avatar
🎯
Focusing on what holds things in their inmost folds.

Rowland Oti RowlandOti

🎯
Focusing on what holds things in their inmost folds.
View GitHub Profile
@RowlandOti
RowlandOti / example.md
Created September 3, 2020 19:30 — forked from sdnts/example.md
Postman pm.sendRequest example

To send a request via the sandbox, you can use pm.sendRequest.

pm.test("Status code is 200", function () {
    pm.sendRequest('https://postman-echo.com/get', function (err, res) {
        pm.expect(err).to.not.be.ok;
        pm.expect(res).to.have.property('code', 200);
        pm.expect(res).to.have.property('status', 'OK');
    });
});
@RowlandOti
RowlandOti / ffmpeg.md
Created May 22, 2020 20:38 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@RowlandOti
RowlandOti / gist:904bd4bb1d5947f21f5a719b392f0871
Created February 6, 2020 09:15 — forked from tayvano/gist:6e2d456a9897f55025e25035478a3a50
complete list of ffmpeg flags / commands
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full.
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}…
Getting help:
-h — print basic options
-h long — print more options
-h full — print all options (including all format and codec specific options, very long)
@RowlandOti
RowlandOti / AndroidManifest.xml
Created June 21, 2019 19:18 — forked from manishcm/AndroidManifest.xml
Android App Widget sample app using setOnClickPendingIntent
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.test1"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="19" />
@RowlandOti
RowlandOti / CircularFragReveal.java
Created November 24, 2017 20:20 — forked from tinmegali/CircularFragReveal.java
Add a circular Reveal and Unreveal transition animation to a Android Fragment
import android.animation.Animator;
import android.animation.TimeInterpolator;
import android.annotation.TargetApi;
import android.graphics.Color;
import android.os.Build;
import android.support.annotation.NonNull;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewAnimationUtils;
/**
* ArcUtils.java
*
* Copyright (c) 2014 BioWink GmbH.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@RowlandOti
RowlandOti / textai.py
Created October 6, 2017 06:33 — forked from iamukasa/textai.py
LSTM model to create the next version of the text file to finish it look out George rr martin
import numpy as np
import sys
class RecurrentNeuralNetwork:
def __init__(self,xs,ys,rl,eo,lr):
self.x=np.zeros(xs)
self.xs=xs
self.y=np.zeros(ys)
self.ys=ys
self.w=np.random.random((ys,ys))
@RowlandOti
RowlandOti / naivebayes.py
Created June 10, 2017 20:40 — forked from kvorion/naivebayes.py
naive bayes implementation
#Author: Krishnamurthy Koduvayur Viswanathan
from __future__ import division
import collections
import math
class Model:
def __init__(self, arffFile):
self.trainingFile = arffFile
self.features = {} #all feature names and their possible values (including the class label)
@RowlandOti
RowlandOti / nn.py
Created May 28, 2017 19:45 — forked from ottokart/nn.py
3-layer neural network example with dropout in 2nd layer
# Tiny example of 3-layer nerual network with dropout in 2nd hidden layer
# Output layer is linear with L2 cost (regression model)
# Hidden layer activation is tanh
import numpy as np
n_epochs = 100
n_samples = 100
n_in = 10
n_hidden = 5
@RowlandOti
RowlandOti / Dropout.py
Created May 28, 2017 19:42 — forked from yusugomori/Dropout.py
Dropout Neural Networks (with ReLU)
# -*- coding: utf-8 -*-
import sys
import numpy
numpy.seterr(all='ignore')
'''