What do you want to save?
Add Code snippet
New code examples
-
C# 2021-08-31 16:50:02
simple enemy spawning Unity
using System.Collections; using System.Collections.Generic; using UnityEngine; public class GameManagerScript : MonoBehaviour { //This variables will be used to make the limits of the spawn area public Vector2 EnemyAreaLimitUpLeft; public Vec... Add solution -
Python 2021-08-30 02:01:02
plotly table cell color based on values
import plotly.graph_objects as go from plotly.colors import n_colors import numpy as np np.random.seed(1) colors = n_colors('rgb(255, 200, 200)', 'rgb(200, 0, 0)', 9, colortype='rgb') a = np.random.randint(low=0, high=9, size=10) b = np.random.randint(lo... Add solution -
Python 2021-08-29 14:42:01
np array append
x = np.random.randint(2, size=10) x = np.append(x, 2) Add solution -
Java 2021-08-27 13:45:01
Mergesort parallelization using Spark
import random import time from pyspark import SparkContext def execute_merge_sort(generated_list): start_time = time.time() sorted_list = merge_sort(generated_list) elapsed = time.time() - start_time print('Simple merge sort: %f sec' % el... Add solution -
Python 2021-08-27 09:51:01
create dataframe with date
import pandas as pd import numpy as np np.random.seed(0) # create an array of 5 dates starting at '2015-02-24', one per minute rng = pd.date_range('2015-02-24', periods=5, freq='T') df = pd.DataFrame({ 'Date': rng, 'Val': np.random.randn(len(rng)) }) p... Add solution
Best helpers
Ranking is empty