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
FROM ubuntu:latest | |
RUN apt update && apt install ffmpeg -y | |
RUN apt install python3 -y && apt install python3-pip -y | |
RUN pip install -U openai-whisper | |
RUN pip install setuptools-rust |
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
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddControllers(); | |
//configure httpclient service | |
services.AddHttpClient<IGithubService, GithubService>(client => | |
{ | |
//customize as per your need | |
client.BaseAddress = new Uri("http://api.github.com/"); | |
client.DefaultRequestHeaders.Add("Accept", "application/vnd.github.v3+json"); |
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 pymongo | |
def get_db_connection(): | |
db_client = pymongo.MongoClient("mongodb+srv://YOUR_USERNAME:YOUR_PWD@YOUR_SERVER/") | |
db_conn = db_client["test_db"] | |
db_coll = db_conn["products"] | |
return db_coll | |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Mvc; | |
namespace TestAPIGithub.Controllers | |
{ |
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
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddControllers(); | |
//configure httpclient service | |
services.AddHttpClient("GithubAPI", client=> | |
{ | |
//customize as per your need | |
client.BaseAddress = new Uri("http://api.github.com/"); | |
client.DefaultRequestHeaders.Add("Accept", "application/vnd.github.v3+json"); |
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
[HttpGet("TestGithub/{userName}")] | |
public async Task<IActionResult> TestGithub(string userName) | |
{ | |
var httpClient = new HttpClient | |
{ | |
BaseAddress = new Uri("http://api.github.com/"), | |
DefaultRequestHeaders = | |
{ | |
{ "Accept", "application/vnd.github.v3+json" }, |
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
[ | |
{ | |
"empId": 1, | |
"name": "John", | |
"city": "Satara", | |
"salary" : 1000.0 | |
}, | |
{ | |
"empId": 2, | |
"name": "Jane", |
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 android.os.Bundle; | |
import android.widget.ImageView; | |
import androidx.appcompat.app.AppCompatActivity; | |
public class MainActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); |
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 com.theappnerds.zoomview; | |
import android.graphics.PointF; | |
import android.view.MotionEvent; | |
import android.view.View; | |
public class ZoomView { | |
float[] lastEvent = null; | |
float d = 0f; |
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
<?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"> | |
<ImageView | |
android:id="@+id/imageView" |
NewerOlder