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 { Component } from 'react'; | |
class Test extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
items: [1, 2, 3], | |
}; | |
} |
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 torch | |
from lifelines import CoxPHFitter | |
from lifelines.datasets import load_rossi | |
from torch import nn | |
DEVICE = torch.device("cpu") | |
MODEL = None | |
COX_MODEL = None | |
ROSSI = load_rossi() |
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
PYTHONPATH=./ gdb --args python api/tests/crashing_models.py | |
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2 | |
Copyright (C) 2020 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. | |
Type "show copying" and "show warranty" for details. | |
This GDB was configured as "x86_64-linux-gnu". | |
Type "show configuration" for configuration details. | |
For bug reporting instructions, please see: |
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 CircularList: | |
def __init__(self, list): | |
self.list = list | |
def get(self, start, end): | |
return [self.list[idx % len(self)] for idx in range(start, end)] | |
# for i in range(start, end): | |
# start = self.cap(start) | |
# end = self.cap(end) |
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 uuid | |
import sqlite3 | |
import random | |
import time | |
import numpy as np | |
# Start up the high scores database | |
conn = sqlite3.connect('temp.db') | |
cur = conn.cursor() |