Skip to content

Instantly share code, notes, and snippets.

View dancanyego's full-sized avatar
😎
Data Specialist

dancanyego

😎
Data Specialist
View GitHub Profile
@dancanyego
dancanyego / data.ipynb
Created July 18, 2024 11:41
Reading multiple dataset in pandas
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dancanyego
dancanyego / pca.ipynb
Created June 9, 2023 13:21
Principal-Component-Analysis In an unsupervised learning algorithm,
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dancanyego
dancanyego / war_game.py
Created April 11, 2023 20:47 — forked from damianesteban/war_game.py
python war card game oop
import random
################################################################################
def main():
table = Table(['Matthew', 'Mark', 'Luke', 'John'])
table.deal_cards()
table.play_all()
def print_underline(string, line):
@dancanyego
dancanyego / Animals.kt
Created October 11, 2022 13:22
Stage Implementation for stage 4/4: Sustainable care hyperskill
//const val camel = """Switching on the camera in the camel habitat...
// ___.-''''-.
///___ @ |
//',,,,. | _.'''''''._
// ' | / \
// | \ _.-' \
// | '.-' '-.
// | ',
// | '',
// ',,-, ':;
@dancanyego
dancanyego / client.py
Created November 23, 2021 05:46
client side socket design
import socket
import sys
# Create a TCP/IP socket
stream_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# Define host
host = 'localhost'
port = 8080
@dancanyego
dancanyego / server.py
Created November 23, 2021 05:44
Server side Socket
import socket
import sys
# Create a TCP/IP socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# Define host
host = 'localhost'
port = 8080
public class HelloWorld {
public static void main(String[] args) {
System.out.println(“Hello world!”);
}
}
This is our first java program
@dancanyego
dancanyego / MainActivity.java
Last active March 5, 2020 20:27
Android Permissions In mainActivity.java
package com.danny.myapplication;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.content.DialogInterface;
import android.content.pm.PackageManager;
@dancanyego
dancanyego / File1.kt
Created January 31, 2020 18:56
Android Activity cycle Concepts
lateinit var textView: TextView
// some transient state for the activity instance
var gameState: String? = null
override fun onCreate(savedInstanceState: Bundle?) {
// call the super class onCreate to complete the creation of activity like
// the view hierarchy
super.onCreate(savedInstanceState)
# The Android Manifest.xml
*It names the Package Manager
*Describes the Activity Components
*Names the clases that implements the components and publishes their Capabilities
*They also declares the permissions that are needed in Your App
*It also sets the minimum Api that are needed in your Android App
*It Also lists the libraries In your Lovely app
#Happy learning