Skip to content

Instantly share code, notes, and snippets.

Shohruh abduakhatov

Block or report user

Report or block abduakhatov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View python_env
name: catalyst
channels:
- conda-forge
- defaults
dependencies:
- ca-certificates=2017.08.26
- certifi=2018.1.18
- intel-openmp=2018.0.0
- ipython=6.4.0
- jupyter=1.0.0
View gist:b07721590de3d5c76c6d9de82ce1bbb6
# Alternative to existing logic of
# chech_vehicle_updates
def check_vehicle_updates(dict_simulation_result, current_time):
print('>>> check_vehicle_updates')
cars_free = 0
try:
keys = list(dict_simulation_result)
keys.reverse()
@abduakhatov
abduakhatov / delete_git_submodule.md
Created Oct 4, 2018 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.
View delete_git_submodule.md

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@abduakhatov
abduakhatov / min-char-rnn.py
Created Jun 28, 2018 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
View min-char-rnn.py
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
View App.kt
class App : Application(),HasActivityInjector {
@Inject
lateinit var activityInjector : DispatchingAndroidInjector<Activity>
override fun onCreate() {
super.onCreate()
DaggerAppComponent.builder().application(this).build().inject(this)
}
View BottomBarAdapter
class BottomBarAdapter : NavBarFragmentStatePagerAdapter<Fragment> {
private val fragments = ArrayList<Fragment>()
constructor(fm: FragmentManager?) : super(fm)
fun addFragments(fragment: Fragment) {
fragments.add(fragment)
}
@abduakhatov
abduakhatov / Git Commands
Created Feb 1, 2017
Git commands for creating repository
View Git Commands
…or create a new repository on the command line
echo "# Fragments_CreateMeme" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/abduakhatov/Fragments_CreateMeme.git
git push -u origin master
…or push an existing repository from the command line
@abduakhatov
abduakhatov / Equal size .txt
Created Jan 24, 2017
Equal size for all consequtive elements
View Equal size .txt
android:layout_alignStart="@+id/firstEditText"
android:layout_alignEnd="@+id/firstEditText"
View Gesture Detectors.java
package com.example.shohruh.eventhandling;
import android.graphics.Color;
import android.support.v4.view.GestureDetectorCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import android.widget.Button;
@abduakhatov
abduakhatov / Responsive Layout.xml
Created Jan 23, 2017
Responsive Layout for different devises
View Responsive Layout.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.shohruh.otherlayouts.MainActivity">
You can’t perform that action at this time.