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
Verifying that +nidhalselmi is my blockchain ID. https://onename.com/nidhalselmi |
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 math | |
def sig(x): | |
return 1 / (1 + math.exp(-x)) | |
b = [0,1] | |
# INPUT WEIGHTS # | |
w1 = [ 2, 1,-3,-4,-4, 4] |
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 math | |
import sys | |
import time | |
import random | |
import requests | |
from PIL import Image | |
from requests.adapters import HTTPAdapter | |
img = Image.open(sys.argv[1]) |
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
## Quicksort | |
def swap(array,i,j): | |
temp = array[i] | |
array[i] = array[j] | |
array[j] = temp | |
def partition(array, start,end): | |
print('->P(',start,end,')') | |
x = array[end] |
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
void sortStrings(char strings[NUM_STRINGS][STRING_LENGTH]){ | |
for (int i = 0; i < NUM_STRINGS-1 ; i++){ | |
for (int j = 0; j < NUM_STRINGS-i-1; j++){ | |
if (strcmp(strings[j],strings[j+1])>0) {swapStrings(strings[j], strings[j + 1]); | |
}}}} |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<Hotels> | |
<Hotel Stars="****"> | |
<Name>Harbor View Inn</Name> | |
<Contact> | |
<Phone>(805)963-0780</Phone> | |
<Email>contact@harborviewinn.com</Email> | |
</Contact> | |
<Address BusLines="R2"> | |
<Number>28</Number> |
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 random as r,itertools as t | |
def s(M,N,L=[0]): | |
while len(L)<M+1: | |
x=r.randint(1,N) | |
if x!=L[-1]:L.append(x) | |
return len([x[0] for x in t.groupby([(L[i]>L[i-1]) for i in range(2,M+1)])]) | |
M,N,n = 100,100,100000 | |
l = [] | |
for i in range(1,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 sympy import binomial as b | |
def getA2B(X,Y,x,y): | |
U,D,s = X==x,Y==y,x+y | |
u = sum([b(s,i) for i in range(0,y)]) | |
d = sum([b(s,i) for i in range(y+1,s+1)]) | |
r = u*U+b(s,y)+D*d | |
return r/2**s | |
print('B(3,4) C(3,3) => ',getA2B(3,4,3,3)) | |
# Problem represnetation : | |
# Enter destination coordinates B(X,Y) and intercept point C(x,y) |
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><body> | |
<style> audio { filter: | |
sepia(100%) | |
saturate(220%) | |
grayscale(0) | |
contrast(60%) | |
hue-rotate(50deg) | |
invert(100%) | |
drop-shadow(0px 0px 0px #ff0000); | |
</style> |
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
# coding=utf-8 | |
import urllib3 as u | |
from bs4 import BeautifulSoup | |
from tabulate import tabulate | |
import pandas as pd | |
digikey_id_list = ['product-details', 'prod-att-table'] # Digi-Key tables | |
def get_soup(url): |
OlderNewer