Aspect | Ants | Humans |
---|---|---|
First Appeared | 100–150 million years ago | ~300,000 years ago |
Civilization | Always social | Only ~10,000 years old |
Global Spread | Survived mass extinctions | Still adapting |
Factor | Dinosaurs | Ants |
---|---|---|
Size | Massive (up to 100+ feet) | Tiny (0.08–1 inch) |
Adaptability | Slow to evolve | Rapid evolution |
Social Structure | Mostly solitary | Highly organized colonies |
Survival Strategy | Dominance through size | Dominance through teamwork |
Method | Learns Parameters | Applies Transformation | Use Case |
---|---|---|---|
fit() |
Yes | No | Initial learning step. |
transform() |
No | Yes | Applying learned transformation. |
fit_transform() |
Yes | Yes | Convenient for initial training data. |
This file contains hidden or 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
""" | |
Created on Thu Oct 26 11:23:47 2017 | |
Original Author: | |
@author: Utku Ozbulak - github.com/utkuozbulak | |
Changes for ResNet Compatibility: | |
Moritz Freidank - github.com/MFreidank | |
""" | |
import torch |
This file contains hidden or 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
public static void showSalaries(Connection conn, String dept) { | |
String sql = "SELECT name, salary FROM employees WHERE department = ?"; | |
try (PreparedStatement stmt = conn.prepareStatement(sql)) { | |
stmt.setString(1, dept); | |
ResultSet rs = stmt.executeQuery(); | |
while (rs.next()) { | |
String name = rs.getString("name"); | |
double salary = rs.getDouble("salary"); | |
System.out.println(name + " - " + salary); | |
} |
This file contains hidden or 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
//Step 1: import lib | |
import javax.swing.*; | |
import java.awt.*; | |
public class Main { | |
public static void main(String[] args) { | |
//step 2: Top level Frame / window | |
JFrame frame= new JFrame(); | |
//step 3: container to frame |
This file contains hidden or 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
// Example program | |
#include <iostream> | |
#include<vector> | |
#include <string> | |
using namespace std; | |
int main() | |
{ | |
int no_of_eid_messages=0; | |
cout<<"Enter number of eid messages: "; |
This file contains hidden or 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 <string> | |
using namespace std; | |
// Brute Force | |
string largestOddNumber(string number) { | |
int save = -1; | |
for(int i=number.size()-1; i>=0; --i){ | |
// string ch = ; | |
int n = number[i] - '0'; |
This file contains hidden or 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 <string> | |
#include <stack> | |
#include <tuple> | |
using namespace std; | |
string reverseWords(string sentence) { | |
stack<string> words_stack; | |
string word = ""; | |
for(int i=0; i<sentence.size(); ++i){ | |
if(sentence[i] == ' ' && word != ""){ |
NewerOlder