This file contains 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
const https = require('https'); | |
const username = '' | |
const token = '' | |
async function getPRStats(fromDate) { | |
let fixPrefixPRCount = 0; | |
let page = 1; | |
let hasNextPage = true; |
This file contains 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 { baseUrl } from 'env'; | |
function handleResponse(response) { | |
return response.text().then((text) => { | |
const data = text && JSON.parse(text); | |
if (!response.ok) { | |
const error = (data && data.error) || response.statusText; | |
return Promise.reject(error); | |
} |
This file contains 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 React, { Component } from 'react'; | |
import { StyleSheet, Animated, Easing, PanResponder } from 'react-native'; | |
const SCALE = 6 / 5; | |
export default class extends Component { | |
static defaultProps = { | |
width: 40, | |
height: 21, | |
value: false, |
This file contains 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 PropTypes from 'prop-types'; | |
import React, { Component } from 'react'; | |
import { | |
ViewPropTypes, | |
ColorPropType, | |
StyleSheet, | |
Animated, | |
Easing, | |
PanResponder, | |
} from 'react-native'; |
This file contains 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 ge.bog.mobilebank.ui.views.widgets; | |
/** | |
* Created by alex on 2/21/17. | |
*/ | |
import android.content.Context; | |
import android.support.v7.widget.AppCompatEditText; | |
import android.text.Editable; | |
import android.text.InputFilter; |
This file contains 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 class CircleProgressView extends View { | |
private static final int START_ANGLE_POINT = 270; | |
private Paint paint; | |
private RectF rect; | |
private float angle; | |
private RectF shadowRect; | |
private Paint shadowPaint; | |
private Paint circlePaint; |
This file contains 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 ge.bog.cbtransactions.utils; | |
import android.annotation.TargetApi; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.graphics.Canvas; | |
import android.graphics.drawable.BitmapDrawable; | |
import android.graphics.drawable.Drawable; | |
import android.os.Build; |
This file contains 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
func imageWithGaussianBlur(image: UIImage) -> UIImage{ | |
var weight:[CGFloat] = [0.1870270270, 0.2345945946, 0.1816216216, 0.0940540541, 0.0762162162, 0.0940540541, 0.16162162162, 0.1962162162, 0.2040540541, 0.0662162162] | |
UIGraphicsBeginImageContextWithOptions(image.size, Bool(false), image.scale) | |
image.drawInRect(CGRectMake(0, 0, image.size.width, image.size.height), blendMode: kCGBlendModeNormal, alpha: weight[0]) | |
var blurCount = Int(blurAmount) | |
if(blurCount > 9){ | |
blurCount = 9 | |
} |
This file contains 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
func fixOrientation (image: UIImage) -> UIImage { | |
if (image.imageOrientation == UIImageOrientation.Up){ | |
return image | |
} | |
var transform = CGAffineTransformIdentity; | |
switch (image.imageOrientation) { | |
case UIImageOrientation.Down, UIImageOrientation.DownMirrored: | |
transform = CGAffineTransformTranslate(transform, image.size.width, image.size.height); |