Skip to content

Instantly share code, notes, and snippets.

@CleitonDeLima
CleitonDeLima / install-docker.sh
Created Oct 15, 2019 — forked from sethbergman/install-docker.sh
Install Docker CE on Linux Mint 19
View install-docker.sh
#!/usr/bin/env bash
# https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt-get update
sudo apt-get install docker.io
# https://docs.docker.com/compose/install/
@cereniyim
cereniyim / KDE_plot_multiple_cat
Created Oct 15, 2019
KDE plot with multiple categories
View KDE_plot_multiple_cat
# create list of continents
continents = df['continent'].value_counts().index.tolist()
# set kde plot for each continent
for c in continents:
subset = df[df['continent'] == c]
sns.kdeplot(subset["life_expectancy"], label=c, linewidth=2)
# set title, x and y labels
plt.title("KDE Plot of Life Expectancy Among Continents Between 1952 and 2007")
View week8cw(array)
#include "stdafx.h"
#include <iostream>
#include <cstdlib>
#include<array>
using namespace std;
View useInput
```javascript
import React, {useState, useEffect } from 'react';
import ReactDOM from 'react-dom';
import Axios from 'axios';
function useInput(defaultValue) {
const [value, setValue] = useState(defaultValue);
const onChange = e => {
const {
View untrusted-lvl4-solution.js
/*******************
* multiplicity.js *
*******************
*
* Out of one cell and into another. They're not giving you
* very much to work with here, either. Ah, well.
*
* Level filenames can be hints, by the way. Have I
* mentioned that before?
*
View untrusted-lvl3-solution.js
/************************
* validationEngaged.js *
************************
*
* They're really on to us now! The validateLevel function
* has been activated to enforce constraints on what you can
* do. In this case, you're not allowed to remove any blocks.
*
* They're doing all they can to keep you here. But you
* can still outsmart them.
View useInput
import React, {useState, useEffect } from 'react';
import ReactDOM from 'react-dom';
import Axios from 'axios';
function useInput(defaultValue) {
const [value, setValue] = useState(defaultValue);
const onChange = e => {
const {
target: {value}
@sankalpau3
sankalpau3 / grade5array.cpp
Created Oct 15, 2019 — forked from simoncourtenage/grade5array.cpp
Example Grade program using arrays
View grade5array.cpp
#include <iostream>
#include <string>
int main()
{
std::string progName = "Grade Analysis";
std::cout << "Welcome to the " << progName << " program\n"
<< "How many students to be entered (max 10)? " << std::endl;
View gist:86edd136392f841819300eca2da2255c
diff --git a/src/react_native/core.cljs b/src/react_native/core.cljs
index ee71f8e..e155491 100644
--- a/src/react_native/core.cljs
+++ b/src/react_native/core.cljs
@@ -1,8 +1,7 @@
(ns react-native.core
(:require [reagent.core :as r]
- [react-native.utils :refer [adapt] :as u]))
-
-(def app-registry (u/get-obj "AppRegistry"))
View row_matrix.py
# Distributed Data Type - Row Matrix
from pyspark.mllib.linalg.distributed import RowMatrix
# create RDD
rows = sc.parallelize([[1,2,3], [4,5,6], [7,8,9], [10,11,12]])
# create a distributed Row Matrix
row_matrix = RowMatrix(rows)
You can’t perform that action at this time.