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
public static void Main(string[] args) | |
{ | |
int initPoint = 96; | |
var storeRandom = new List<int>(); | |
Random rand = new Random(); | |
while (initPoint++ <= 122) | |
{ | |
storeRandom.Add(GenerateRandomNumber(rand)); | |
} | |
showRandomNumbersList(storeRandom); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Change Background Color</title> | |
</head> | |
<?php | |
function randomHex() { | |
$chars = 'ABCDEF0123456789'; | |
$color = '#'; | |
for ( $i = 0; $i < 6; $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
[Unit] | |
Description=Automatically generates an internet Hotspot when a valid ssid is not in range | |
After=multi-user.target | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/usr/bin/autohotspot | |
[Install] | |
WantedBy=multi-user.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 tkinter | |
from tkinter import messagebox | |
main_window = tkinter.Tk() | |
main_window.withdraw() #remove the background window. | |
messagebox.showinfo('Title', "This is just a text in a message box") | |
messagebox.showerror('ERROR!', "Here are the details of the error that you faced right now.") | |
messagebox.showwarning("WARNING!", "This will only have a button with ok as text or content.") | |
messagebox.askyesno("Confirmation", "Do you really want to close the application.") |
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
auto lo | |
iface lo inet loopback | |
iface eth0 inet dhcp | |
allow-hotplug wlan0 | |
auto wlan0 | |
iface wlan0 inet dhcp | |
wpa-ssid "Your_ssid" |
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
# Install pipenv by | |
>pip install pipenv | |
>move to working dir | |
>pipenv install requests python-box # install 2 packages | |
you can specify the version of python by | |
pipenv install --three | |
# --three means to use python 3 |
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
# imports | |
from keras.models import Sequential | |
from keras.layers import Conv2D, MaxPooling2D | |
from keras.layers import Activation, Dense, Flatten, Dropout | |
from batchGenerator import generateData | |
# creating a model - function based approach | |
def create_model(): | |
model = Sequential() |
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 os | |
for root, dirs, files in os.walk(os.getcwd()): | |
for _dir in dirs: | |
current_dir = os.getcwd() + os.sep + _dir | |
for x in os.listdir(current_dir): | |
if x.endswith(".xml"): | |
# print(current_dir + os.sep + x) | |
os.remove(current_dir + os.sep + x) |
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 real_writer(self, folder_name=None, images=None): | |
if images is None or len(images) ==0: | |
return | |
import openpyxl | |
from openpyxl.drawing.image import Image | |
workbook = openpyxl.Workbook() | |
# Let's use the hello_world spreadsheet since it has less data | |
# workbook = load_workbook(filename="hello_world.xlsx") |
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 write_excel_second(self, folder_name=None, images=None): | |
import openpyxl | |
from openpyxl import load_workbook | |
from openpyxl.drawing.spreadsheet_drawing import AbsoluteAnchor | |
from openpyxl.drawing.xdr import XDRPoint2D, XDRPositiveSize2D | |
from openpyxl.utils.units import pixels_to_EMU, cm_to_EMU | |
# print('========>', folder_name, images) | |
if images is None or len(images) == 0: |
OlderNewer