Skip to content

Instantly share code, notes, and snippets.

@cenit
Created September 9, 2024 12:03
Show Gist options
  • Select an option

  • Save cenit/7b413b6f20e127c4846f65314504391f to your computer and use it in GitHub Desktop.

Select an option

Save cenit/7b413b6f20e127c4846f65314504391f to your computer and use it in GitHub Desktop.
import numpy as np
from sklearn.ensemble import RandomForestClassifier
def DataScientist(x, y, z):
X = np.array([x, y, z]).reshape(1, -1)
rf = RandomForestClassifier(random_state=42)
rf.fit(X, [1])
i = rf.feature_importances_
k = int(sum(i) * 1000)
s = [74, 79, 73, 78, 32, 79, 85, 82, 32, 84, 69, 65, 77]
return ''.join([chr((c + k) % 128) for c in s])
def DataScientistResponse(x, y, z):
X = np.array([x, y, z]).reshape(1, -1)
rf = RandomForestClassifier(random_state=42)
rf.fit(X, [1])
i = rf.feature_importances_
k = int(sum(i) * 1000)
s = [67, 72, 65, 76, 76, 69, 78, 71, 69, 32, 65, 67, 67, 69, 80, 84, 69, 68]
return ''.join([chr((c + k) % 128) for c in s])
print(DataScientist(7, 5, 9))
print(DataScientistResponse(7, 5, 9))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment