- Create your bot with botfather
- Make you bot an admin of your channel
Go to Telegram web and open a channel, get the ID from -[channel id] from hash in the path
https://web.telegram.org/k/#-9999999999999
| import React from "react"; | |
| import { | |
| Text, | |
| View, | |
| Item, | |
| Icon, | |
| Input, | |
| Button | |
| } from 'native-base'; | |
| import { KeyboardAvoidingView } from "react-native"; |
| getGreetingTime = (currentTime) => { | |
| if (!currentTime || !currentTime.isValid()) { return 'Hello'; } | |
| const splitAfternoon = 12; // 24hr time to split the afternoon | |
| const splitEvening = 17; // 24hr time to split the evening | |
| const currentHour = parseFloat(currentTime.format('HH')); | |
| if (currentHour >= splitAfternoon && currentHour <= splitEvening) { | |
| // Between 12 PM and 5PM | |
| return 'Good afternoon'; |
| # Step 1: Go to .git/hooks/ directory | |
| # Step 2: Rename "commit-msg.sample" to "commit-msg" (CLI: mv commit-msg.sample commit-msg) | |
| # Step 3: Replace the existing code in a "commit-msg" file with the following code | |
| NAME=$(git branch | grep '*' | sed 's/* //') | |
| TIMESTAMP=$(date +"%D %T") | |
| DESCRIPTION=$(git config branch."$NAME".description) | |
| echo "$TIMESTAMP — $NAME"': '$(cat "$1") > "$1" | |
| if [ -n "$DESCRIPTION" ] | |
| then | |
| echo "" >> "$1" |
| import sys | |
| from watchdog.observers import Observer | |
| from watchdog.events import FileSystemEventHandler | |
| class EventHandler(FileSystemEventHandler): | |
| def on_any_event(self, event): | |
| print("EVENT") | |
| print(event.event_type) | |
| print(event.src_path) | |
| print() |
| { | |
| "500px": 62062, | |
| "accessible-icon": 62312, | |
| "accusoft": 62313, | |
| "address-book": 62137, | |
| "address-card": 62139, | |
| "adjust": 61506, | |
| "adn": 61808, | |
| "adversal": 62314, | |
| "affiliatetheme": 62315, |
| const axios = require('axios') | |
| /* ... */ | |
| const params = new URLSearchParams() | |
| params.append('name', 'Akexorcist') | |
| params.append('age', '28') | |
| params.append('position', 'Android Developer') | |
| params.append('description', 'birthdate=25-12-1989&favourite=coding%20coding%20and%20coding&company=Nextzy%20Technologies&website=http://www.akexorcist.com/') | |
| params.append('awesome', true) |
yarn add react-native-configreact-native link react-native-config.env files for each configuration. Ex: .env.dev, .env.prod, etc
Ex:API_ENDPOINT=https://api.myresource.com/dev
ENV=dev
| # Import a bunch of models | |
| from sklearn.linear_model import LinearRegression | |
| from sklearn.svm import SVR | |
| from sklearn.neighbors import KNeighborsRegressor | |
| from sklearn.tree import DecisionTreeRegressor | |
| from sklearn.ensemble import GradientBoostingRegressor | |
| from sklearn.gaussian_process import GaussianProcessRegressor | |
| from sklearn.cross_decomposition import PLSRegression | |
| from sklearn.ensemble import AdaBoostRegressor |