Skip to content

Instantly share code, notes, and snippets.

View iwouldnot's full-sized avatar

Ivan Vaniushin iwouldnot

  • Tomsk, Russia
View GitHub Profile
@iwouldnot
iwouldnot / laba7.cs
Created October 24, 2017 03:07
mediator
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace constr_PO_laba7
{
abstract class Mediator
{
{
"danceability" : 0.428,
"energy" : 0.701,
"key" : 11,
"loudness" : -6.670,
"mode" : 0,
"speechiness" : 0.0352,
"acousticness" : 0.425,
"instrumentalness" : 0.00000161,
"liveness" : 0.102,
@iwouldnot
iwouldnot / lab5.c
Created October 17, 2017 14:05
спешл фо даша
#include <stdio.h>
#include <stdlib.h> // For exit()
int main()
{
FILE* fptr;
char filename[100], c;
printf("Enter the filename to open \n");
@iwouldnot
iwouldnot / singleton.cs
Created October 10, 2017 03:14
singleton
public sealed class DBConnection
{
private static SqlConnection instance = null;
private static readonly object padlock = new object();
private DBConnection()
{
}
@iwouldnot
iwouldnot / l2.sql
Created October 5, 2017 03:43 — forked from anonymous/l2.sql
angl
CREATE USER van_user1
IDENTIFIED BY pass;
CREATE USER van_user2
IDENTIFIED BY word;
CREATE ROLE van_role;
GRANT van_role TO van_user1, van_user2;
@iwouldnot
iwouldnot / lab1.py
Created September 11, 2017 06:07 — forked from anonymous/lab1.py
import numpy as np
import time
from tqdm import tnrange, tqdm
from bokeh.plotting import figure, output_notebook, show
def solve(a):
diag = np.diag(np.fliplr(a)) # n + log(n)
min_elem_index = diag.argmin() # n^2
avrg_sum = a[a < 0].mean() # nlog(n)
min_elem_row, min_elem_columns = min_elem_index, a.shape[1] - min_elem_index - 1 # 5
#!/bin/bash
cd $1
shopt -s nulglob
for f in * ; do
if [[ $f == *"$2"* ]] ; then
echo $f in $PWD ;
fi
done
#!/bin/bash
find ~/$1 -name '*'$2'*'
find ~/$1 f ! -name '*'$2'*' -delete