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
pip install Flask | |
pip install requests |
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 flask import Flask,jsonify,request | |
import json | |
import requests | |
app=Flask(__name__) | |
@app.route('/') | |
def ash(req): | |
mandi=requests.get('https://api.data.gov.in/resource/9ef84268-d588-465a-a308-a864a43d0070?api-key=579b464db66ec23bdd000001cdd3946e44ce4aad7209ff7b23ac571b&format=json&offset=0&limit=1') | |
mandi=json.loads(mandi) |
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
#programming API in python | Gspace | |
from flask import Flask,jsonify,request | |
import pprint | |
import json | |
import requests |
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
app=Flask(__name__) | |
@app.route('/') | |
def ash(req): | |
mandi=requests.get('https://api.data.gov.in/resource/9ef84268-d588-465a-a308-a864a43d0070?api-key=YOUR_API_KEY&format=json&offset=0&limit=1') | |
mandi=json.loads(mandi) | |
for item in mandi['records']: | |
response = """ | |
state: {0} |
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
[{'author': '[email protected] (Adarshreddy Adelli)', | |
'author_detail': {'email': '[email protected]', | |
'name': 'Adarshreddy Adelli'}, | |
'authors': [{'email': '[email protected]', 'name': 'Adarshreddy Adelli'}], | |
'gd_extendedproperty': {'name': 'commentModerationMode', | |
'value': 'FILTERED_POSTMOD'}, | |
'guidislink': False, | |
'href': '', | |
'id': 'tag:blogger.com,1999:blog-6041987638358622721.post-8771612714219978308', | |
'link': 'https://glammingspace.blogspot.com/2019/05/tcav-its-time-to-enquiry-neural-network.html', |
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
$light-color: #eee; | |
body.dark-mode { | |
background-color: #485461; | |
background-image: linear-gradient(315deg, #485461 0%, #28313b 74%); | |
color: $light-color; | |
a { | |
color: #00000; | |
} | |
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
body::-webkit-scrollbar { | |
width: 9px; | |
} | |
body::-webkit-scrollbar-track { | |
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); | |
} | |
body::-webkit-scrollbar-thumb { | |
background-color: #6b0f1a; |
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 socket | |
serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
serversocket.bind(('localhost', 5000)) | |
serversocket.listen(5) | |
while True: | |
connection, address = serversocket.accept() | |
buffer = connection.recv(68) | |
if len(buffer) > 0: | |
print(buffer) | |
break |
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 socket | |
clientsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
clientsocket.connect(('localhost', 5000)) | |
clientsocket.send('Gspace is awesome') |
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 socket | |
HOST = socket.gethostbyname(socket.gethostname()) | |
s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP) | |
s.bind((HOST, 0)) | |
s.setsockopt(socket.IPPROTO_IP, socket.IP_HDRINCL, 1) | |
s.ioctl(socket.SIO_RCVALL, socket.RCVALL_ON) | |
print(s.recvfrom(65565)) | |
s.ioctl(socket.SIO_RCVALL, socket.RCVALL_OFF) |
OlderNewer