Skip to content

Instantly share code, notes, and snippets.

@nburn42
nburn42 / example.py
Created January 24, 2019 21:19
labelbox reupload
def delete_labels(client, label_id_list):
res = client.execute('''
mutation DeleteLabels($label_id_list: [ID!]) {
deleteLabels(
labelIds: $label_id_list
){
id
deleted
}
.idea/
data/
model/
logdir/
"""
#TODO change
BigBang-DataScience.com
"""
import random
import tensorflow as tf
import dataUtils
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
k8s-addon: cluster-autoscaler.addons.k8s.io
k8s-app: cluster-autoscaler
name: cluster-autoscaler
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
import tensorflow as tf
import numpy as np
import random
def main():
label_index = {
'Iris-setosa': 0,
'Iris-versicolor': 1,
'Iris-virginica': 2
float pulsewidth = 10; // 1/100 a second
long count = 0;
long goal = 1024;
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
delay(pulsewidth);
import sys
import uuid
from apache_beam.io import iobase
from apache_beam.transforms import PTransform;
from apache_beam.utils.pipeline_options import PipelineOptions
from apache_beam.io.gcp.datastore.v1.datastoreio import ReadFromDatastore
from apache_beam.io.gcp.datastore.v1.datastoreio import WriteToDatastore
from apache_beam.metrics.metric import MetricsFilter
from apache_beam.utils.pipeline_options import GoogleCloudOptions
from apache_beam.utils.pipeline_options import PipelineOptions
import MySQLdb
from MySQLdb.cursors import SSCursor
from google.cloud import datastore
from google.cloud.exceptions import TooManyRequests
import json
import time
def chunks(l, n):
"""Yield successive n-sized chunks from l."""
from apache_beam.metrics.metric import MetricsFilter
from apache_beam.utils.pipeline_options import GoogleCloudOptions
from apache_beam.utils.pipeline_options import PipelineOptions
from apache_beam.utils.pipeline_options import SetupOptions
from apache_beam.utils.pipeline_options import StandardOptions
import googledatastore
import apache_beam as beam
import json
import time
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
from matplotlib import cm
def drange(x, y, jump):
while x < y:
yield float(x)
x += jump