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 <math.h> | |
#include <stdio.h> | |
#include <iostream> | |
int Determinant(int**, int); | |
void PrintMatrix(int**, int, int); | |
int** ReadMatrix(int, int); | |
int main(int argc, char const* argv[]) { | |
int n; |
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 os import listdir, rename | |
from os.path import isfile, isdir, join | |
def scroll_dir(dpath): | |
children = [c for c in listdir(dpath)] | |
for c in children: | |
p = join(dpath, c) | |
if isdir(p): | |
scroll_dir(p) |
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 os import listdir, rename | |
from os.path import isfile, isdir, join, basename | |
def scroll_dir(dpath: str): | |
children = [c for c in listdir(dpath)] | |
for c in children: | |
p = join(dpath, c) | |
if isdir(p): | |
scroll_dir(p) |
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> | |
using namespace std; | |
void CinArray(int arr[], int n) { | |
cout << "enter " << n << " numbers: "; | |
for (int i = 0; i < n; i++) { | |
cin >> arr[i]; | |
} | |
} |
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.datasets import load_iris | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from sklearn.linear_model import SGDRegressor | |
# initiate main params | |
iris = load_iris() | |
x = iris.data | |
y = iris.target |
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
import tweepy | |
auth = tweepy.OAuthHandler("CONSUMER_KEY", "CONSUMER_SECRET") | |
auth.set_access_token("ACCESS_TOKEN","ACCESS_TOKEN_SECRET") | |
api = tweepy.API(auth) | |
list_id = 1476313231572578313 # your list id | |
for user in tweepy.Cursor(api.list_members, list_id=list_id).items(): | |
# hack 'm all |
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
import React from "react"; | |
import { BrowserRouter, Route, Link, Switch } from "react-router-dom"; | |
const AskPage = React.lazy(() => import("./AskPage")); | |
const App = () => { | |
return ( | |
<BrowserRouter> | |
<Link to="/ask">AskPage</Link> | |
<Route exact path="/ask"> |
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
import React from "react"; | |
import { BrowserRouter, Route, Link, Switch } from "react-router-dom"; | |
import AskPage from "./AskPage"; | |
const App = () => { | |
return ( | |
<BrowserRouter> | |
<Link to="/ask">AskPage</Link> | |
<Route exact path="/ask" component={AskPage} /> |
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
let array = [0, 1, 2, 3, 4, 5]; | |
array.length = 3; | |
console.log(array); | |
// Result: [0, 1, 2] |
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
const int = 1553 / 10 | 0; | |
console.log(int); | |
// Result: 155 | |
console.log( | |
typeof int | |
) | |
// Result: number |
NewerOlder