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
unit Example; | |
interface | |
uses | |
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, | |
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs; | |
type | |
TForm1 = class(TForm) |
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 'package:flutter/material.dart'; | |
import 'package:get/get.dart'; | |
import 'package:get_storage/get_storage.dart'; | |
void main() async { | |
WidgetsFlutterBinding.ensureInitialized(); | |
await initialConfig(); | |
final storage = Get.find<StorageService>(); |
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 'package:flutter/material.dart'; | |
import 'package:get/get.dart'; | |
void main() { | |
runApp(GetMaterialApp( | |
initialRoute: '/login', | |
getPages: [ | |
GetPage( | |
name: '/login', | |
page: () => LoginPage(), |
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
Future main() async { | |
Map<String, dynamic> res = { | |
"content": [ | |
{ | |
"from_info": { | |
"address": { | |
"address_string": "Av. Paulista, 302 - Bela Vista, São Paulo - SP, 01310-000, Brazil", | |
"latitude": "-23.5688619", | |
"longitude": "-46.6464484" |
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 requests | |
r = requests.post( | |
'http://veiculos.fipe.org.br/api/veiculos/ConsultarMarcas', | |
json=payload, | |
headers={ | |
'Host': 'veiculos.fipe.org.br', | |
'Referer': 'http://veiculos.fipe.org.br/' | |
} | |
) |
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
# docker build -t ubuntu1604py36 | |
FROM ubuntu:16.04 | |
RUN apt-get update && \ | |
apt-get install -y software-properties-common && \ | |
add-apt-repository ppa:jonathonf/python-3.6 | |
RUN apt-get update | |
RUN apt-get install -y build-essential python3.6 python3.6-dev python3-pip python3.6-venv | |
RUN apt-get install -y git |
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
''' | |
Get Bitcoin Value | |
http://api.coindesk.com/v1/bpi/currentprice.json | |
''' | |
import urllib.request, json, time | |
def obter_valor(): | |
try: | |
url = "http://api.coindesk.com/v1/bpi/currentprice.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
""" | |
Análise inicial da autonomia do combustível (gasolina) de um veículo para uma viagem, ajudando a prever a probabilidade de faltar gasolina. | |
Cálculo incompleto, use por sua conta e risco. | |
Precisa de refatoração. | |
""" | |
class Fabricante(object): | |
nome = '' | |
def __init__(self, nome): |
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
version: '2' | |
services: | |
agency: | |
image: arangodb/arangodb | |
environment: | |
- ARANGO_NO_AUTH=1 | |
command: arangod --server.endpoint tcp://0.0.0.0:5001 --server.authentication false --agency.activate true --agency.size 1 --agency.supervision true --database.directory /var/lib/arangodb3/agency1 | |
coordinator: | |
image: arangodb/arangodb |
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
""" | |
http://stackoverflow.com/questions/28022432/receiving-rtp-packets-after-rtsp-setup | |
A demo python code that .. | |
1) Connects to an IP cam with RTSP | |
2) Draws RTP/NAL/H264 packets from the camera | |
3) Writes them to a file that can be read with any stock video player (say, mplayer, vlc & other ffmpeg based video-players) | |
Done for educative/demonstrative purposes, not for efficiency..! |
NewerOlder