Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
10
votes
2
answers
654
views
On scoring imported functions
For instance, in Python, the NumPy library provides the function eye which returns the nxn identity matrix. … from numpy import*
seems like cheating, but by the wording of the other discussion, I think it could be argued that it's valid. …
0
votes
On scoring imported functions
For instance, as far as I understand, the numpy library is a third-party library independently developed from the Python language. … The existence of numpy is not guaranteed with any Python implementation.
Hence
from numpy import *
is an incomplete implementation of the n×n identity matrix function. …
19
votes
Is a language with an extension a valid golfing language?
For example, if you're using Python + NumPy, you don't get import numpy as np for free. …
4
votes
1
answer
110
views
Should "import" statement be included in byte count if I'm not using it directly [duplicate]
Another example is, I want to find out all positive number in an array:
import numpy as np
f = lambda x:x[x>0]
f(np.array([1,3,-2,5,-4]))
So, how should I score above codes? … Is the numpy answer valid?
Should I include import numpy as in byte count? …
-1
votes
Sandbox for Proposed Challenges
External modules, like numpy, as allowed. The most efficient program wins. …
9
votes
Accepted
Is "vim + plugins" a valid language?
Yes, it's valid in the same way that Python + NumPy (for example) is valid. …
3
votes
Default for Code Golf: Input/Output methods
all of the following python types (and equivalents in other languages) acceptable in meeting the spec.
list[list[T]]
list[dict[int, T]]
dict[int, list[T]]
dict[int, dict[int, T]]
dict[(int, int), T]
# numpy …
2
votes
Sandbox for Proposed Challenges
Libraries that facilitate matrix computations, such as numpy, are permitted.
The winning criterion is code-golf. …
10
votes
Where to find an online testing environment for specific programming languages?
Terminals:
CentOS
IPython
Lua
Memcached
Mongo DB
MySQL
Node.JS
Numpy
Oracle
Octave
PowerShell
PHP
R Programming
Redis
Ruby
Scipy
Sympy
IDEs:
Ada (Gnat)
Algol-68
Angular JS
Assembly
AsciiDoc
Awk
Bash …
6
votes
In bash, can I use non-coreutil programs
Similar things are done with internal libraries (Python 3, numpy, scikit, 100% or Bash + Cygwin (or WSL), 21 bytes) as well as with flags (i.e. …
0
votes
Sandbox for Proposed Challenges
count,str(success)) , end='\r')
count += 1
success,image = vidcap.read()
outvideo.release()
vidcap.release()
Python code to calculate avg Mean Square Error over two videos
import cv2
import numpy …
0
votes
Sandbox for Proposed Challenges
. - Mots et Grumots (2003), Marc Escayrol
#@title Setup common imports and functions
import numpy as np
import os
import pandas as pd
import tensorflow.compat.v2 as tf
import tensorflow_hub as hub
from …
0
votes
Sandbox for Proposed Challenges
import random
import numpy
### Bots ###
class DoNothing:
def __init__(self, index):
return
def turn(self, scoresheets, d, my_turn):
return ([],[])
class AlwaysWhitesInRed: …
-2
votes
Sandbox for Proposed Challenges
import numpy as np
from math import sqrt,sin,cos,acos
def ex_unm():
"""Example - Verification from UNM"""
print("Example UNM")
# Material Properties
E = 29500 # (units = ksi)
A = 1 …