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
import pandas as pd | |
pd.__version__ | |
city_names = pd.Series(['San Francisco', 'San Jose', 'Sacramento']) | |
population = pd.Series([852469, 1015785, 485199]) | |
cities = pd.DataFrame({ 'City name': city_names, 'Population': population }) | |
cities['Area square miles'] = pd.Series([46.87, 176.53, 97.92]) | |
cities['Population density'] = cities['Population'] / cities['Area square miles'] | |
cities |
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
from typing import Any, Dict | |
class User: | |
def __init__(self, name: str, village: str) -> None: | |
self.name = name | |
self.village = village | |
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 class User { | |
@SerializedName("name") | |
String name; | |
@SerializedName("village") | |
String villageName; | |
} |
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
dict = {'name': 'Uzumaki Naruto', 'village': 'Leaf Village'} | |
# To print any key value, we can do: | |
print(dict['name']) |
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
<option name="taskNames"> | |
<list> | |
<option value="assembleRelease" /> | |
<option value="myCustomTask1" /> | |
<option value="myCustomTask2" /> | |
</list> | |
</option> |
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
/* | |
* Copyright (C) 2019 @author TheLittleNaruto | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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<linux/module.h> | |
#include<linux/init.h> | |
#include<linux/kernel.h> | |
static int hello_init(void){ | |
printk(KERN_ALERT "Hello TheLittleNaruto; it's your first driver which d oes no shit :/\n"); | |
return 0; | |
} | |
static void hello_exit(void){ |
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
obj-m:=hello.o | |
all: | |
make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) modules | |
clean: | |
make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) clean |
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
# taken from https://realpython.com/python-kwargs-and-args/ | |
# concatenate.py | |
def concatenate(**kwargs): | |
result = "" | |
# Iterating over the Python kwargs dictionary | |
for arg in kwargs.values(): | |
result += arg | |
return result | |
print(concatenate(a="Real", b="Python", c="Is", d="Great", e="!")) |
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
# concatenate.py | |
def concatenate(a: str, b: str): | |
result = "" | |
result += a | |
result += b | |
return result | |
print(concatenate(a="Real", b="Python", c="Is", d="Great", e="!")) | |