๐
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 csv | |
| import requests | |
| import shutil | |
| import os | |
| import argparse | |
| import numpy as np | |
| import time | |
| from tqdm import tqdm | |
| from PIL import Image, ImageOps | |
| from concurrent.futures import ThreadPoolExecutor |
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
| function Firebase1() { | |
| return new Promise(resolve => { | |
| db.collection("ReceivedTransferFinAccount").get().then((querySnapshot) => { | |
| const data = [] | |
| querySnapshot.forEach((doc) => { | |
| data.push(doc.data()) | |
| }); |
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
| # reference | |
| # https://github.com/c0decracker/video-splitter | |
| import math | |
| import re | |
| import subprocess | |
| import os | |
| length_regexp = 'Duration: (\d{2}):(\d{2}):(\d{2})\.\d+,' | |
| re_length = re.compile(length_regexp) |
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 torch | |
| from torch.autograd import Variable | |
| from udacity_car.data_loader import img_road_path | |
| model = torch.load('model.pkl') | |
| img_tensor = img_road_path(['./img/temp.jpg']) | |
| img_tensor.unsqueeze_(0) | |
| tt = Variable(img_tensor) |
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
| LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) | |
| { | |
| int wmId, wmEvent; | |
| PAINTSTRUCT ps; | |
| HDC hdc; | |
| POINTS pt; | |
| static int x; | |
| static int y; | |
| static bool isDraw = false; |
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; | |
| namespace PeopleManagement | |
| { | |
| class Person | |
| { | |
| public int Number; | |
| public string Name; | |
| public string Phone, Email, year; |
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 __future__ import print_function # for compatibility with both python 2 and 3 | |
| from subprocess import call # for calling mplayer and lame | |
| import os # help with file handling | |
| def check_file_exists(directory, filename, extension): | |
| path = directory + "/" + filename + extension | |
| return os.path.isfile(path) | |
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
| Iterable<DataSnapshot> dataSnapshots = dataSnapshot.getChildren(); | |
| for (DataSnapshot tempSnapshot : dataSnapshots) { | |
| String value = tempSnapshot.getValue().toString(); | |
| String key = tempSnapshot.getKey(); | |
| if (key.equals("num")) { | |
| Log.e(TAG, value); | |
| } else if (key.equals("value")) { | |
| Log.e(TAG, value); |
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 com.google.gson.Gson; | |
| import com.google.gson.GsonBuilder; | |
| import com.google.maps.DirectionsApi; | |
| import com.google.maps.GeoApiContext; | |
| import com.google.maps.GeocodingApi; | |
| import com.google.maps.errors.ApiException; | |
| import com.google.maps.model.DirectionsResult; | |
| import com.google.maps.model.GeocodingResult; | |
| import com.google.maps.model.TravelMode; |
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 numpy as np | |
| import pandas as pd | |
| import tensorflow as tf | |
| train = pd.read_csv("data_bike/train.csv", parse_dates=["datetime"]) | |
| test = train[:2000] | |
| train= train[2000:] | |
| feature=['temp', 'atemp', 'humidity', 'windspeed', 'casual', 'registered'] |