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 itertools | |
with open (file='fizz') as f: | |
list = [line.rstrip('\n') for line in f.readlines()] | |
iterations = list.pop() | |
# print(iterations) | |
# print(list) | |
product = [] | |
count = 0 | |
numbers = [] |
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
class ShoppingCart(object): | |
def __init__(self): | |
self.items = {} | |
self.total = 0 | |
def add_item(self, item_name, quantity, price): | |
self.total += price * quantity | |
self.items.update({item_name:quantity}) | |
def remove_item(self, item_name, quantity, price): |
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
<html> | |
<head> | |
<!DOCTYPE html> | |
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"> | |
<meta content="utf-8" http-equiv="encoding"> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width" /> | |
<title>x-ziddi Video Chat</title> | |
<script src="jssip-3.2.12.min.js"> </script> | |
</head> |
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
package main | |
import ( | |
"encoding/json" | |
"errors" | |
"fmt" | |
"math" | |
"strings" | |
) |
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
{ | |
"categorization": { | |
"properties": { | |
"action": { | |
"type": "keyword" | |
}, | |
"timestamp": { | |
"type": "date" | |
}, | |
"post": { |
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 | |
df = pandas.read_excel("customer.xlsx") | |
# Replace na values with None | |
df = df.where(df.notnull(), None) | |
customer_dic = df.to_dict(orient="records") | |
print(customer_dic) |
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 './App.css'; | |
import React, { Component } from 'react'; | |
import Signup from './components/signup' | |
class App extends Component { | |
state = { | |
signup: [] | |
} |
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 React from 'react' | |
const Signup = ({ signup }) => { | |
return ( | |
<div> | |
<center><h1>User Created</h1></center> | |
<div class="card"> | |
<div class="card-body"> | |
<h5 class="card-title">{signup.username}</h5> | |
<h6 class="card-subtitle mb-2 text-muted">{signup.email}</h6> |
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
""" | |
Find the nearest BTS (Base Transceiver Station) using FAISS | |
and calculate the actual geodesic (Haversine) distance. | |
""" | |
import faiss | |
import numpy as np | |
from geopy.distance import geodesic | |