Skip to content

Instantly share code, notes, and snippets.

View harilee1325's full-sized avatar

Harilee harilee1325

View GitHub Profile
from flask import Flask, request, jsonify
import json as simplejson
from bson.json_util import dumps
app = Flask(__name__)
@app.route("/")
def hello():
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route("/")
def hello():
return "Welcome to Python Flask, hello coder!"
from flask import Flask, request, jsonify
import json as simplejson
from bson.json_util import dumps
app = Flask(__name__)
@app.route("/")
def hello():
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<Button
android:id="@+id/call_api"
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.1'
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
package com.example.retrofitsimple;
import android.annotation.SuppressLint;
import java.util.concurrent.TimeUnit;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocketFactory;
package com.example.retrofitsimple;
import retrofit2.Call;
import retrofit2.http.GET;
public interface ApiInterface {
@GET("todos/1")
Call<Response> getAllData();
package com.example.retrofitsimple;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Response {
@SerializedName("userId")
@Expose
private Integer userId;
@SerializedName("id")
package com.example.retrofitsimple;
import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import android.content.DialogInterface;
import android.content.Intent;
import android.media.DeniedByServerException;
import android.os.Build;
from flask import Flask, jsonify, request
import math, random
from pyfcm import FCMNotification
from twilio.rest import Client
import zerosms
import getpass
app = Flask(__name__)