This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GroovyIncrementalVersioning { | |
/* | |
* Created by @alivcor (Abhinandan Dubey) on 10/26/20 | |
* Licensed under the Mozilla Public License Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Car { | |
private int modelYear; | |
private String modelName; | |
private String color; | |
private String manufacturer; | |
private double sellingPrice; | |
private String carType; | |
private Boolean isLuxury; | |
private Boolean isImported; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("00000010101010000000000\n00101000001010000000100\n10001000100010010110010\n10101010101010100100100\n00000000000000000000000\n00000000000011000000000\n00000000001101000000000\n00000000001101000000000\n00000000010101000000000\n00000000011111000000000\n00000000000000000000000\n11000011100011000011000\n10000000000000110010000\n11010001100011000011010\n11111011111011111011111\n00000000000000000000000\n00010000000000000000010\n00000000000000000000000\n00001000000000000000001\n11111000000000000011111\n00000000000000000000000\n11000011000011100011000\n10000000100000000010000\n11010000110001110011010\n11111011111011111011111\n00000000000000000000000\n00010000001100000000010\n00000000001100000000000\n00001000001100000000001\n11111000001100000011111\n00000000001100000000000\n00100000000100000000100\n00010000001100000001000\n00001100001100000010000\n00000011000100001100000\n00000000001100110000000\n00000011000100001100000\n00001100001100000010000\n00010000001000000001000\n00100000001100000000100\n01000000001100000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include "vector" | |
#include "string" | |
using namespace std; | |
void printIntVector(vector<int>& nums){ | |
string s; | |
for(auto it = nums.begin();it!=nums.end(); ++it){ | |
s.append(to_string(*it)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import random | |
def randPartition(alldata_X, alldata_Y, _FRACTION): | |
""" | |
alldata_X : All of your X (Features) data | |
alldata_Y : All of your Y (Prediction) data | |
_FRACTION : The fraction of data rows you want for train (0.75 means you need 75% of your data as train and 25% as test) | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Bonus: If you want to handle events on keypress: | |
#http://matplotlib.org/examples/event_handling/keypress_demo.html | |
#Inspired by cnn_train in MatConvNet ?? :p (Please ignore if you do not understand - you're not supposed to !) | |
import math | |
import matplotlib.pyplot as plt | |
import numpy as np | |
# + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
#If you're frustrated with tensorflow, and just want to do a simple task of creating a tensor type list and append to it, you're at the right place. The author of this gist was in the same place at the time of writing this gist. And stackoverflow sucks. TF documentation is outdated, help is limited. Have fun ! | |
sess = tf.InteractiveSession() | |
matrix1 = tf.constant([[1., 2., 3., 4., 5., 6.], [3., 1., 2., 2., 0., 1.]]) | |
matrix2 = tf.constant([[2., 0., 1., 9., 3., 2.5], [1.8, 2.5, 9.4, 1., 0.3, 3.1]]) | |
#lets make a 6x6 matrix by append |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
sess = tf.InteractiveSession() | |
matrix1 = tf.constant([[1., 2., 3., 4., 5., 6.], [3., 1., 2., 2., 0., 1.]]) | |
matrix2 = tf.constant([[2., 0., 1., 9., 3., 2.5], [1.8, 2.5, 9.4, 1., 0.3, 3.1]]) | |
#lets make a 6x6 matrix by append | |
A = tf.concat([matrix2], 0) #Now A is a 2 x 6 tensor | |
A = tf.concat([A, matrix1], 0) #Now A is a 4 x 6 tensor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sampleSVG = d3.select("#bubbles") | |
.append("svg") | |
.attr("width", 960) | |
.attr("height", 960); | |
var mydata = []; | |
d3.csv("/baseball_data.csv", function(data) { | |
data.forEach(function(d) { | |
d["HR"] = +d["HR"]; | |
mydata.push(+d["HR"]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sampleSVG = d3.select("#viz") | |
.append("svg") | |
.attr("width", 800) | |
.attr("height", 800); | |
var barrier = sampleSVG.append("line") | |
.attr("x1", 120) | |
.attr("y1", 540) | |
.attr("x2", 280) | |
.attr("y2", 540) |
NewerOlder