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 random | |
import threading | |
import time | |
import pathlib | |
import concurrent.futures | |
import requests | |
from typing import Optional, List | |
from lxml import etree | |
import config |
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
df.query('column_name=="some_value") # new df |
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
<dbl xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://db-xsd.oss-cn-beijing.aliyuncs.com/dbl.xsd"> | |
<meta | |
ic_ip12="https://static.didialift.com/pinche/gift/resource/9uc9bip189-1605773441688-ic_ip12.png" | |
bg_red_small="https://static.didialift.com/pinche/gift/resource/9pds8nukfio-1605773441296-bg_red_small.png" | |
bg_red_bar="https://static.didialift.com/pinche/gift/resource/sh9qb8bo7do-1605773441013-bg_red_bar.png" | |
bg_orange="https://static.didialift.com/pinche/gift/resource/gnh6ug2clr-1605773440623-bg_orange.png" | |
/> | |
<render> | |
<image id="img_1" src="${ic_ip12}" width="110dp" height="110dp" leftToLeft="parent" topToTop="parent" marginLeft="5dp" marginTop="5dp"/> | |
<image src="${bg_orange}" width="0" leftToLeft="img_1" rightToRight="img_1" bottomToBottom="img_1" marginLeft="1dp" marginRight="1dp" marginBottom="1dp"/> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<manifest> | |
<remote name="aosp" | |
fetch=".." | |
review="https://android-review.googlesource.com/" /> | |
<default revision="refs/tags/android-9.0.0_r47" | |
remote="aosp" | |
sync-j="4" /> |
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
/** | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2015 Circle Internet Financial | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
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 android.content.Context; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.AttributeSet; | |
import android.view.View; | |
public class AtLeastRecyclerView extends RecyclerView { | |
public AtLeastRecyclerView(Context context) { | |
super(context); | |
} |
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 ResourceTool { | |
public static Drawable getTintedDrawable(Resources res, @DrawableRes int drawableId, @ColorRes int colorId) { | |
Drawable drawable = res.getDrawable(drawableId); | |
int color = res.getColor(colorId); | |
drawable.setColorFilter(color, PorterDuff.Mode.SRC_IN); | |
return drawable; | |
} | |
public static Drawable getAlphaDrawable(Resources res, @DrawableRes int drawableId, @ColorRes int colorId) { | |
Bitmap bitmap = BitmapFactory.decodeResource(res, drawableId); |
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 com.github.airk.getinstalledapp; | |
import android.content.Context; | |
import android.content.pm.ApplicationInfo; | |
import android.content.pm.PackageManager; | |
import android.graphics.drawable.Drawable; | |
import android.os.AsyncTask; | |
import android.os.Bundle; | |
import android.os.Environment; | |
import android.support.v4.app.LoaderManager; |
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
/* | |
* Copyright (C) 2014 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
@Override | |
public boolean onCreateOptionsMenu(Menu menu) { | |
menu.clear(); | |
getMenuInflater().inflate(R.menu.menu_item, menu); | |
MenuItem item = menu.findItem(R.id.action_custom); | |
item.setActionView(R.layout.menu_custom); | |
item.getActionView().findViewById(android.R.id.text1).setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
onCustomClick(v); |
NewerOlder