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 <Python.h> | |
#include <string.h> | |
static PyObject* name(PyObject *self, PyObject* args){ | |
char *name; | |
char greeting[255] = "Hello "; | |
if (!PyArg_ParseTuple(args, "s", &name)){ | |
return NULL; | |
} |
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 requests | |
import copy | |
import time | |
from datetime import datetime | |
import json | |
API_KEY = '<API KEY>' | |
USER_ID = '<USER ID>' | |
VC = '<VC>' |
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
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
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 socket | |
from select import select | |
from collections import deque | |
import time | |
import heapq | |
class Scheduler: | |
def __init__(self): | |
self.ready = deque() # Holds the tasks to be executed |
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 os | |
import torch | |
import torch.nn as nn | |
from torch.nn import functional as F | |
from torch.utils.data import DataLoader | |
from torchvision.datasets import MNIST | |
import torchvision.transforms as transforms | |
from torch.utils.data import random_split | |
import torch.optim as optim | |
from torch.optim.lr_scheduler import StepLR |
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 pretrainedmodels | |
import logging | |
import torch.nn.functional as F | |
from torch import nn | |
import torch | |
import pytorch_lightning as pl | |
from torch.utils.data import DataLoader | |
from tqdm.notebook import tqdm | |
class ShutdownInstanceCallback(pl.Callback): |
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
0x0f671fd08592586816810ed6175d047a20e047c7 |
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
sudo apt-get install default-jdk ssh | |
sudo addgroup hadoop | |
sudo adduser --ingroup hadoop hduser | |
sudo adduser hduser sudo | |
sudo echo "ubuntu localhost=(hduser) NOPASSWD: ALL" >> /etc/sudoers | |
ssh-keygen -t rsa -P "" | |
ssh-copy-id user@host | |
cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys | |
ssh localhost | |
ssh 0.0.0.0 |