What do you want to save?
Add Code snippet
New code examples
-
Python 2021-08-29 16:44:01
sklearn predict threshold
from sklearn.tree import DecisionTreeClassifier clf = DecisionTreeClassifier(random_state = 2) clf.fit(X_train,y_train) # y_pred = clf.predict(X_test) # default threshold is 0.5 y_pred = (clf.predict_proba(X_test)[:,1] >= 0.3).astype(bool) # set thres... Add solution -
Python 2021-08-29 02:49:02
fractal tree python
import pygame, math pygame.init() screen = pygame.display.set_mode((750, 650)) pygame.display.set_caption("Fractal Tree") display = pygame.display.get_surface() def drawTree(a, b, pos, deepness): if deepness: c = a + int(math.cos(math.radians(... Add solution -
Java 2021-08-28 13:41:01
difference between hashmap and map java
Hash map: -> It is the implementation of map interface. -> It can contain null values and keys. -> It doesn't maintain input order. Map: -> It is an interface -> Map has two implementation -> Tree Map -> Hash Map -> Tr... Add solution -
Python 2021-08-28 05:43:02
python form enter data
import os import sys from collections import OrderedDict from PyPDF2 import PdfFileReader def _getFields(obj, tree=None, retval=None, fileobj=None): fieldAttributes = {'/FT': 'Field Type', '/Parent': 'Parent', '/T': 'Field Name', '/TU': 'Alterna... Add solution -
-
Shell/Bash 2021-08-28 00:27:01
zsh syntax highlighting plugin
In your ~/.zshrc Simply clone this repository and source the script: git clone https://github.com/zsh-users/zsh-syntax-highlighting.git echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zsh... Add solution -
Java 2021-08-27 20:24:02
TreeMap lowerEntry(K key) method in java
import java.util.Map; import java.util.TreeMap; public class TreeMapLowerEntryMethodExample { public static void main(String[] args) { try { TreeMap<Integer, String> tm = new TreeMap<Integer, String>(); tm.p... Add solution -
C++ 2021-08-27 19:49:01
bst traversal code in data structure with c++
#include<iostream> using namespace std; struct node { int data; struct node *left; struct node *right; }; struct node *createNode(int val) { struct node *temp = (struct node *)malloc(sizeof(struct ... Add solution