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
WebRequest request = WebRequest.Create("https://api.thecatapi.com/v1/categories"); | |
using (var s = request.GetResponse().GetResponseStream()) | |
{ | |
using (var sr = new StreamReader(s)) | |
{ | |
var asJSON = sr.ReadToEnd(); | |
res = JsonConvert.DeserializeObject<List<CategoriesModel>>(asJSON); | |
} | |
} |
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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Runtime.CompilerServices; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; |
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
#include <iostream> | |
#include <vector> | |
using namespace std; | |
int main() | |
{ | |
std::vector<int> v; | |
for(int i =1390; i<12567;++i ){ | |
if((i%3==0 or i%5==0) and i%7!=0 and i%11!=0 and i%13!=0 and i%23!=0) v.push_back(i); | |
} | |
int max = 1389; |
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
using System; | |
using System.Collections.Generic; | |
using System.Drawing; | |
using System.Linq; | |
using System.Runtime.CompilerServices; | |
using System.Windows.Forms; | |
namespace Многоугольники | |
{ | |
public partial class Form1 : Form |
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
<?php | |
function equation($a, $b, $c){ | |
if ($a != 0){ | |
$D = $b*$b - 4*$a*$c; | |
if($D < 0){ | |
return "No roots"; | |
} | |
if($D == 0){ | |
return -$b/(2*$a); | |
} |
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
from sklearn.ensemble import ExtraTreesClassifier | |
import matplotlib.pyplot as plt | |
model = ExtraTreesClassifier() | |
model.fit(X,y) | |
f = plt.figure(figsize=(10, 10)) | |
print(model.feature_importances_) #use inbuilt class feature_importances of tree based classifiers | |
#plot graph of feature importances for better visualization | |
feat_importances = pd.Series(model.feature_importances_, index=X.columns) | |
feat_importances.nlargest(30).plot(kind='barh') | |
plt.show() |
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
// | |
// ImagePicker.swift | |
// | |
// Created by Daniel Khromov on 3/2/21. | |
// | |
import SwiftUI | |
import UIKit | |
struct ImagePicker: UIViewControllerRepresentable{ |
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
FAILED [100%]Recreating table test_when_clean with data from file | |
Done | |
Task: cls | |
| iter | target | algo_i... | prepro... | | |
------------------------------------------------- | |
Child Iteration accuracy: 0.77528 | |
Child Iteration accuracy: 0.786516 | |
| 1 | 0.7865 | 2.063 | 1.061 | | |
Child Iteration accuracy: 0.786516 | |
Child Iteration accuracy: 0.808988 |
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
FAILED [100%]Recreating table test_cls with data from file | |
Done | |
Task: cls | |
| iter | target | algo_i... | prepro... | | |
------------------------------------------------- | |
Child Iteration accuracy: 0.884955 | |
Child Iteration accuracy: 0.862831 | |
| 1 | 0.885 | 2.063 | 1.061 | | |
Child Iteration accuracy: 0.871681 | |
Child Iteration accuracy: 0.865044 |
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
def add_pupil(name, birth_year, cs_score, math_score, physics_score, data): | |
data[name] = (name, birth_year, cs_score, math_score, physics_score) # | |
def show_pupil(name, data): | |
print(*data[name]) | |
def del_pupil(name, data): | |
del data[name] |
OlderNewer