Skip to content

Instantly share code, notes, and snippets.

View codeOfRobin's full-sized avatar

Robin codeOfRobin

View GitHub Profile
noOfParams = 10
noOfOutputs = 4
m=10
n=10
inputs = zeros(m,n,noOfParams)
inputNames = {'EPI';'E';'warpLinearDensity';'C1'; 'warpYarnDensity';'PPI';'N';'weftLinearDensity';'c2';'weftYarnDensity'}
for k = 1:noOfParams
currentFile = inputNames{k}
inputs(:,:,k) = importdata(strcat(currentFile, '.csv'))
import json
x = {}
x["key1"] = "value"
x["key2"] = "value2"
x["path"] = "field path"
files = []
for i in range(1,6):
currentFile = {}
currentFile["fileName"] = "Document"+str(i)+".png"
Sample Input file:
#3 //number of entity
Product //entity name
#4 //number of attributes
Id,ProductName,BrandName,TaxId //attribute list
#4 //number of tuples
1,Laptop,Samsung,1 //first tuple
2,Mouse,Dell,1
3,Mobile,Apple,1
enum Icon: String
{
case ClearDay = "clear-day"
case ClearNight = "clear-night"
case Rain = "rain"
case Snow = "snow"
case Sleet = "sleet"
case Wind = "wind"
case Fog = "fog"
case Cloudy = "cloudy"
The marketing mix is traditionally known as consisting of the Four Ps (4Ps) of marketing — **price, product, promotion, and place** (or distribution)—a classification suggested by McCarthy (1960).
Yet the marketing mix may certainly have elements beyond the 4Ps when one considers that the marketing of an offering may be influenced by other vitally important elements. Some marketers, therefore, refer to the marketing mix by the Five Ps, where ‘people’ is added as another key element.
Some literature points to a sixth P - people.
WHY THE FUCK ARE THEY ALWAYS ADDING SO MANY Ps?
In the extended Marketing Mix (also called the service marketing mix), we add people, process and physical evidence.
Various other stupid acronyms like the 30Rs and 4Cs were introduced.
class Minion
{
let name: String?
let image: UIImage?
let favoriteActivity: String?
init(name: String?, favoriteActivity: String?)
{
self.name = name
self.image = UIImage(named: name!)
class DismissSegue: UIStoryboardSegue
{
override func perform()
{
let sourceController = self.sourceViewController
sourceController.dismissViewControllerAnimated(true, completion: {
})
}
//Extensions for Pantry using reflection. Default implementation
public protocol Pantryable: Storable {
func allProperties() throws -> [String: Any]
func toDictionary() -> [String : AnyObject]
}
extension Pantryable {
@codeOfRobin
codeOfRobin / open iterm.scpt
Created December 19, 2016 07:24
open current folder in iTerm with Apple Script
on run {input, parameters}
tell application "Finder"
set dir_path to quoted form of (POSIX path of (folder of the front window as alias))
end tell
CD_to(dir_path)
end run
on CD_to(theDir)
tell application "iTerm"
activate
lane :travis do
increment_build_number
cocoapods
carthage(command: "update",
use_ssh: "true",
no_skip_current: false,
use_binaries: false,
platform: "iOS")