Skip to content

Instantly share code, notes, and snippets.

View Kida007's full-sized avatar
🏠
Working from home

PIYUSH GUPTA Kida007

🏠
Working from home
  • Topaz
  • India
View GitHub Profile
@Kida007
Kida007 / animation.js
Created June 20, 2020 10:14
ListItems Shared Background Animation ( Reanimated v2 )
import Animated, {
useSharedValue,
withTiming,
useAnimatedStyle,
useDerivedValue,
Easing,
withSpring,
} from 'react-native-reanimated';
import {View, Button, Dimensions, Text, TouchableOpacity} from 'react-native';
import MaskedView from '@react-native-community/masked-view';
/* eslint-disable react-native/no-inline-styles */
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow
*/
import React from 'react';
@Kida007
Kida007 / dfdf.py
Last active November 15, 2019 21:29
def optimize(nn_last_layer, correct_label, learning_rate, num_classes):
# Reshape 4D tensors to 2D, each row represents a pixel, each column a class
logits = tf.reshape(nn_last_layer, (-1, num_classes), name="fcn_logits")
correct_label_reshaped = tf.reshape(correct_label, (-1, num_classes))
# Calculate distance from actual labels using cross entropy
import React from "react";
import {
View,
SafeAreaView,
Text,
Dimensions,
StyleSheet,
TouchableWithoutFeedback
} from "react-native";
import Svg, {
import React from "react";
import { FlatList, PanResponder, View, Image } from "react-native";
class Paginator extends React.Component {
// can ignore the color getAccentColor and this.props.onPaginatorScroll stuff.
getAccentColor(index) {
if (index % 4 == 0) return "#FF9F5D";
if (index % 3 == 0) return "#FF8EAC";