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 IPython | |
import numpy as np | |
from IPython.display import display, HTML, Javascript | |
import time | |
import random | |
def configure_browser_state(): | |
display(IPython.core.display.HTML(''' | |
<canvas id="myChart"></canvas> | |
''')) |
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 networkx as nx | |
# Degree distribution | |
# Input: A graph | |
# Output: find degrees and plot their distribution | |
def Degree_Distribution(G): | |
degree = G.degree() | |
degree = [ deg for (v,deg) in degree ] | |
plot_distribution(degree, xlabel='Degree ($k$)', |
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
<div> | |
<h1>Your module title here</h1> | |
<div style="display: grid; grid-template-columns: 100px auto"> | |
<img | |
width="100%" | |
src="https://www.cs.cornell.edu/courses/cs1110/2020fa/lessons/lesson30/thumb.png" | |
/> | |
<div> | |
<p> | |
Your descriotion here. Your descriotion here. Your descriotion here. |
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
def x(): | |
return 129 | |
x = 90 |
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
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: shell-demo2 | |
namespace: default | |
spec: | |
containers: | |
- image: tozd/sgx:ubuntu-xenial | |
imagePullPolicy: IfNotPresent | |
name: sgx-ubuntu2 |
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 org.apache.arrow.memory.RootAllocator; | |
import org.apache.arrow.vector.IntVector; | |
import org.apache.arrow.vector.VectorSchemaRoot; | |
import org.apache.arrow.vector.ipc.ArrowFileReader; | |
import org.apache.arrow.vector.ipc.SeekableReadChannel; | |
import org.apache.arrow.vector.ipc.message.ArrowBlock; | |
import org.apache.arrow.vector.types.pojo.Schema; | |
import java.io.File; |
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
const axios = require('axios'); | |
const headers = {Authorization: "Basic YWRtaW46ZGlzdHJpY3Q="}; | |
const baseURL = "https://play.dhis2.org/2.33.2/api/"; | |
function getTEIs() { | |
return axios.get(baseURL + "trackedEntityInstances.json?ouMode=ACCESSIBLE&fields=[trackedEntityInstance,relationships]", {headers}); | |
} | |
function getTEIInfo(teiId) { |
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
{ | |
totalMapTaskSpecs: 29, | |
completedMapTaskSpecs: 29, | |
totalReduceTaskSpecs: 8, | |
completedReduceTaskSpecs: 0, | |
jobConfig: { | |
name: "Word Count", | |
id: "37f40245-de47-4d43-bd6c-9c896e780e37", | |
mapperClass: "com.cwidanage.mapred.examples.WordCount$WordMapper", |
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 <arrow/compute/api.h> | |
#include <arrow/array/builder_base.h> | |
#include "arrow_utils.h" | |
namespace twisterx::util { | |
void copy_int64_by_index(int64_t index, | |
std::shared_ptr<arrow::Array> data_column, | |
std::shared_ptr<arrow::ArrayBuilder> array_builder) { | |
auto casted_builder = std::static_pointer_cast<arrow::Int64Builder>(array_builder); |
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
# https://github.com/log0/video_streaming_with_flask_example | |
import os | |
import numpy as np | |
import cv2 | |
from flask import Flask, render_template, Response | |
import time | |
import cv2 | |
import core.utils as utils |