index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
88,881
SlawekMaciejewski/Python_exercises
refs/heads/master
/oop/oop_magic_method.py
import collections # from collections import namedtuple # użycie tego nie wymaga uzycia collections.namedtuple(), a samego namedtuple from random import choice Card = collections.namedtuple('Card', ['rank', 'suit']) class FrenchDeck: ranks = [str(n) for n in range(2, 11)] + list('JQKA') suits = 'spades diamon...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,882
SlawekMaciejewski/Python_exercises
refs/heads/master
/examples/ex_object.py
""" Stwierdzenie, że zmienna a przechowuje wartość, mimo że w zasadzie poprawne, nie oddaje całej prawdy. Wartość jest w Pythonie obiektem przechowywanym w pamięci, a zmienna jedynie umożliwia dostęp do niego. Ideę tę dobrze ilustruje schemat: zmienna ------> wartość Dwie lub więcej zmi...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,883
SlawekMaciejewski/Python_exercises
refs/heads/master
/examples/list_comprehension.py
old_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] new_list = [x ** 2 for x in old_list if not x % 2] print(new_list) def capitalize_all(t): res = [] for s in t: res.append(s.capitalize()) return res d = "Ala Ma Kota" print(capitalize_all(d)) def capitalize_all2(t): return [s.capitalize() for s in...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,884
SlawekMaciejewski/Python_exercises
refs/heads/master
/structures/iterators.py
class Fib: def __init__(self, n): self.iteration = 0 self.n = n self.current = 0 self.next = 1 def __next__(self): if self.iteration == self.n: raise StopIteration self.iteration += 1 ret = self.current self.current = self.next ...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,885
SlawekMaciejewski/Python_exercises
refs/heads/master
/src/hamming.py
def hamming(dziecko, list1, list2): count1 = 0 count2 = 0 for number in range(len(dziecko)): if dziecko[number] != list1[number]: count1 += 1 for number in range(len(dziecko)): if dziecko[number] != list2[number]: count2 += 1 if count1 > count2: return...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,886
SlawekMaciejewski/Python_exercises
refs/heads/master
/functions/func_lambda.py
if __name__ == '__main__': my_lambda = lambda x: x.upper() print(my_lambda('map, reduce, filter')) square_lambda = lambda x: x**2 print(square_lambda(3)) equels_lambda = lambda x, y: x == y print(equels_lambda(2, 2)) print(equels_lambda(2, 3))
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,887
SlawekMaciejewski/Python_exercises
refs/heads/master
/src/my_split.py
def my_split(text: str, sep: str = ' ') -> list: text = text.strip() split_list = [] indx_list = [] for i, char in enumerate(text): if char == sep: indx_list.append(i) split_list.append(text[:indx_list[0]]) k = 0 for indx in indx_list: if k < text.count(sep) - ...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,888
SlawekMaciejewski/Python_exercises
refs/heads/master
/functions/collection_unpacking.py
if __name__ == '__main__': numbers_info = ('753159826', '+77', '-') number, area_code, delimiter = numbers_info print(number, area_code, delimiter) shopping_list = ['apples', 'oranges', 'bannans'] apples, oranges, bannans = shopping_list print(apples, oranges, bannans) quantities = [('apple...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,889
SlawekMaciejewski/Python_exercises
refs/heads/master
/structures/counter.py
""" Counter przyjmuje dowolną kolekcję (listę, krotkę, string) a jest typem słownika, którego kluczami są elementy wejściowej kolekcji a wartościami ilości wystąpień. Counter posiada wszystkie metody znane ze słownika jak również metodę most_common(n), zwracającą n najczęściej występujących elementów. """ from collecti...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,890
SlawekMaciejewski/Python_exercises
refs/heads/master
/functions/default_args.py
""" W Pythonie funkcja może posiadać domyślne argumenty. ● W takim przypadku w sygnaturze funkcji, możemy wymieniając argumenty dać znak równości i podać domyślny argument. ● Argumenty bez domyślnych wartości muszą poprzedzać argumenty z wartościami domyślnymi, nie można mieszać tych dwóch rodzajów. ● Wywołując funkcj...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,891
SlawekMaciejewski/Python_exercises
refs/heads/master
/imports/package2/import2.py
from imports.package1.import1 import Klasa1 class Klasa2(Klasa1): print('Klasa2') def __init__(self): super().__init__() self.a = 5 self.b = 15 print('init2') print(f'init2 name: {__name__}') def sums(self, a, b): print('metoda sums2') return a + b...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,892
SlawekMaciejewski/Python_exercises
refs/heads/master
/examples/ex_namedtuple_inter.py
from collections import namedtuple NumberInfo = namedtuple('NumberInfo', 'number area_code delimiter') pierwszy_numer = NumberInfo('1234546', '+48', '-') print(pierwszy_numer) print(pierwszy_numer.area_code)
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,893
SlawekMaciejewski/Python_exercises
refs/heads/master
/examples/tuples.py
if __name__ == '__main__': a = tuple() print(a)
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,894
SlawekMaciejewski/Python_exercises
refs/heads/master
/functions/sorted_min_max.py
if __name__ == '__main__': pairs = [(1, 10), (2, 9), (3, 8)] print(min(pairs)) print(max(pairs)) print(min(pairs, key=lambda x: x[1])) print(max(pairs, key=lambda x: x[1])) print(min(pairs, key=lambda x: x[0] * x[1])) print(max(pairs, key=lambda x: x[0] * x[1])) print(sorted(pairs, key=l...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,895
SlawekMaciejewski/Python_exercises
refs/heads/master
/src/dna.py
transcription = { 'G': 'C', 'C': 'G', 'T': 'A', 'A': 'U', } def dna_to_rna(dna): rna = '' for letter in dna: rna += transcription[letter] return rna def validate_dna(dna): return set(dna).issubset('GCTA') def main(): while True: my_dna = input('Type DNA sequence: '...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,896
SlawekMaciejewski/Python_exercises
refs/heads/master
/examples/ex_loop_else.py
for i in range(3): print('iterator:', i) else: # 'else' execute always when 'for' was completed !!! print('else') print(i) for i in range(3): print('iterator:', i) if i == 1: break # using a 'break' statement in a loop will actually skip the 'else' block else: print('else2') for i in []...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,897
SlawekMaciejewski/Python_exercises
refs/heads/master
/structures/default_dict.py
from collections import defaultdict from typing import DefaultDict def count_letters(text: str) -> dict: counter = {} for letter in text: if letter not in counter: counter[letter] = 1 else: counter[letter] += 1 return counter def count_letters_defaultdict(text: st...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,898
SlawekMaciejewski/Python_exercises
refs/heads/master
/examples/copy_vs_deepcopy.py
from copy import deepcopy slownik = {'jeden': 1, 'dwa':2, 'trzy': 3} lista1 = [slownik, 4, 5, 6] def zmien_liste_albo_nie(lista): lista[1] = 40 lista[0]['jeden'] = 10 print('funk', lista) print(lista1) zmien_liste_albo_nie(lista1[:]) # [:] przekazywana jest kopia ale plytka print(lista1) print('***********...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,899
SlawekMaciejewski/Python_exercises
refs/heads/master
/examples/lists.py
my_list = [1, 2, 3, 4] my_list2 = [1, 'ala', 'ma', 2, 'koty'] my_list3 = [[1, 2, 'ala'], 5, 'Arek', (8, 9), ('pies', 6)] my_list4 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] not_sorted = [3, 2, 1, 9, 7, 8, 4, 5, 10, 6, 11] print(my_list[2]) print(my_list) print(my_list2) print(my_list3) my_list.append(11) my_list2.append('i ps...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,900
SlawekMaciejewski/Python_exercises
refs/heads/master
/examples/loops.py
def knock_name(name): for i in range(3): print(f'{name}!', end='***') print() def knock(number): while number: print(number) number -= 1 print('the end function') def knock_name2(counter, name): while counter: print(f'{name}!') counter -= 1 print('the ...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,901
SlawekMaciejewski/Python_exercises
refs/heads/master
/src/max_elem_for.py
def my_max(sequence): largest = 0 for element in sequence: if element > largest: largest = element return largest if __name__ == '__main__': my_list = [11, 333, 111, 44, 5, 444, 322, 555, 6] largest = my_max(my_list) print(largest)
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,902
SlawekMaciejewski/Python_exercises
refs/heads/master
/books/slatkin_ 59_specific_ways/13_try.py
# # Przykład 1. # handle = open('tmp/random_data.txt', 'w', encoding='utf-8') # handle.write('success\nand\nnew\nlines') # handle.close() # handle = open('tmp/random_data.txt') # Może spowodować zgłoszenie wyjątku IOError. # try: # data = handle.read() # Może spowodować zgłoszenie wyjątku UnicodeDecodeError. # fi...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,903
SlawekMaciejewski/Python_exercises
refs/heads/master
/functions/map_reduce_filter.py
from functools import reduce if __name__ == '__main__': items = [1, 2, 3, 4, 5] squared = list(map(lambda x: x**2, items)) print(squared) square_sum = reduce((lambda x, y: x + y), squared) print(square_sum) odds = tuple(filter(lambda x: x % 2, squared)) print(odds) odds = tuple(filter(...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,904
SlawekMaciejewski/Python_exercises
refs/heads/master
/examples/ex_if.py
a = 0 # insert 1 or 0 to test 'if' b = 1 # insert 1 or 0 to test 'if' if a: print('a is true') elif not a: # insert 'not' or not before 'a' if you want to test 'elif' print('elif: a') elif b: print('elif: b') else: print('else')
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,905
SlawekMaciejewski/Python_exercises
refs/heads/master
/books/slatkin_ 59_specific_ways/09_generator_expressions.py
""" Przyjmujemy założenie, że celem programu jest odczyt pliku i wyświetlenie liczby znaków znajdujących się w poszczególnych wierszach. Użycie do tego celu listy składanej oznacza konieczność przechowywania w pamięci wszyst- kich wierszy pliku. Jeżeli plik jest naprawdę duży lub pracujemy z nigdy niekończącym się ...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,906
SlawekMaciejewski/Python_exercises
refs/heads/master
/oop/oop_abstract_classes_abc.py
import abc import typing class Instrument(abc.ABC): @classmethod def play(self): pass class Guitar(Instrument): def play(self): print('brzdek, brzdek') class Flute(Instrument): def play(self): print('fiu, fiu') class Violin(Instrument): def play(self): pri...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,907
SlawekMaciejewski/Python_exercises
refs/heads/master
/examples/ex_namedtuple.py
from collections import namedtuple from dataclasses import dataclass from datetime import datetime Order = namedtuple('Order', ['product_name', 'category', 'custom_id', 'due_date', 'model']) # lub @dataclass class OrderCls: product_name: str category: str custom_id: int Due_date: datetime model: s...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,908
SlawekMaciejewski/Python_exercises
refs/heads/master
/regular_exprssion/simply_regex.py
import re print(re.findall(r'.\d', '12')) print(re.search(r'ala', 'ale ola ela ala')) print(re.search(r'.la', 'ale ola ela ala')) print(re.findall(r'.la', 'alae ola ela ala')) print(re.findall(r'Ala', 'alae ola ela ala')) print(re.findall(r'Ala', 'alae ola ela ala', re.I)) # flaga re.I ignoruje wielkość liter print(re...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,909
SlawekMaciejewski/Python_exercises
refs/heads/master
/examples/strings.py
a = 'abcdefghdeijklmnop' print(a.upper()) print(a.lower()) print(a.find('de', 0, 5)) b = '\n' c = 'ma' print(b.join(c))
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,910
SlawekMaciejewski/Python_exercises
refs/heads/master
/oop/oop_dziedziczenie_employee.py
import datetime class Employee: raise_amount = 1.04 def __init__(self, first, last, pay): self.first = first self.last = last self.pay = pay # self.email = f'{first}.{last}@aptor.com' # uzywajac @property mozemy zrezygnowac z tego atrybutu @property def email(self): ...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,911
SlawekMaciejewski/Python_exercises
refs/heads/master
/functions/args_and_kwargs_python_receptury.py
""" Dygresja do Python Receptury rozdz. 7.1 str. 203 odp. https://stackoverflow.com/questions/54115906/capturing-the-values-from-dict-items/54115921 """ import html def make_element(name, value, **attrs): print(attrs.items()) # keyvals = [' %s="%s"' % item for item in attrs.items()] # old style # keyvals ...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,912
SlawekMaciejewski/Python_exercises
refs/heads/master
/examples/immutable.py
if __name__ == '__main__': lists_name = ['Ania', 'Marek', 'Krzysiek', 'Gosia'] output = '' for name in lists_name: """Faktyczne jednak przy każdym obiegu pętli powstaje nowy obiekt a my ustawiamy jedynie zmienną output na ten, który obecnie jest najdłuższy. ● Pozos...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,913
SlawekMaciejewski/Python_exercises
refs/heads/master
/books/slatkin_ 59_specific_ways/11_zip.py
# Przykład 1. names = ['Cecylia', 'Liza', 'Maria'] letters = [len(x) for x in names] print(letters) longest_name = None max_letters = 0 for i in range(len(names)): count = letters[i] if count > max_letters: longest_name = names[i] max_letters = count print(longest_name) # Przykład 2. longest_...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,914
SlawekMaciejewski/Python_exercises
refs/heads/master
/structures/generators.py
def gen_(): yield 1 yield 2 yield 3 def gen(): for i in range(10): yield i if __name__ == '__main__': gen1 = gen_() # print(list(gen1)) # użycie tej linni spowoduje zużycie generatora i np: for się już nie wykona # print(list(gen1)) # zwróci pustą liste gdyz generator zuzyl sie l...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,915
SlawekMaciejewski/Python_exercises
refs/heads/master
/examples/ex_range.py
import numpy as np def range_with_floats(start, stop, step): while stop > start: yield round(start, 2) start += step if __name__ == '__main__': print(range(10)) print(type(range(3))) print(list(range(10))) print(list(range(3, 10))) print(list(range(3, 20, 1))) print(list(...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,916
SlawekMaciejewski/Python_exercises
refs/heads/master
/src/FizzBuzz.py
def fizz_buzz(n): n = int(n) if n % 3 == 0 and n % 5 == 0: return f'{n} - FizzBuzz' elif n % 3 == 0: return f'{n} - Fizz' elif n % 5 == 0: return f'{n} - Buzz' else: return n def fizz_buzz2(num): out = '' if num % 3 == 0: out += 'Fizz' if num % 5...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,917
SlawekMaciejewski/Python_exercises
refs/heads/master
/src/count_down_while.py
def count_down(n): while n >= 0: print(n) n -= 1 return 'bum' def count_down2(n): while n: print(n) n -= 1 return 'bum' if __name__ == '__main__': print(count_down(10)) print(count_down2(10))
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,918
SlawekMaciejewski/Python_exercises
refs/heads/master
/oop/oop_book.py
isbn_db = { 'ABC123': ('Pan tadeusz', 'Adam'), 'ABC124': ('Zawod programista', 'Maciej Aniserowicz'), 'ABC125': ('DNA', 'Maciej Aniserowicz'), } class Book: total_number_of_books = 0 def __init__(self, title, author): self.title = title self.author = author Book.total_numb...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,919
SlawekMaciejewski/Python_exercises
refs/heads/master
/oop/oop_car.py
""" oop example """ class Car: acceleration = 10 def __init__(self, reg_number): self.reg_number = reg_number self.in_motion = False self.speed = 0 def print_reg_number(self): print(f'Number registration is {self.reg_number} - {self.speed} km/h') def drive(self): ...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,920
SlawekMaciejewski/Python_exercises
refs/heads/master
/examples/ex_str.py
a = 'a ala ma kot ' print(a) print(a.split()) # robi liste elementow domyslnie po spacji, wiele spacji jest traktownych jako jedna i usuwana # string.split(separator, max) max - domyslnie -1 czyli wszystkie wystapienia print(a.strip()) # usuwa białe znaki na początku i koncu print(a.split(' ')) #jesli poda się...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,921
SlawekMaciejewski/Python_exercises
refs/heads/master
/examples/ex_dict.py
dict1 = {'A': 1, 'B': 2, 'E': 3, 'G': 4} print(dict1) print(dict1['B']) a = dict1.values() print(list(a)) print(dict1.popitem()) print(dict1.pop('B')) print(dict1) dict1.update({'new': 2}) add_dict = {'V': 44, 'X': 33} dict1.update(add_dict) print(dict1) dict1['C'] = 99 print(dict1) dict1 = {'A': 1, 'B': 2, 'E': 3, 'G...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,922
SlawekMaciejewski/Python_exercises
refs/heads/master
/src/fibonacci.py
def fib(f): """ :param f: :return: """ f0 = 0 f1 = 1 f2 = 1 print(f0) print(f1) print(f2) for i in range(3, f+1): fn = f1 + f2 f1 = f2 f2 = fn print(fn) def fib_list(f): """ The function uses a list of Python :param f: :return...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,923
SlawekMaciejewski/Python_exercises
refs/heads/master
/oop/oop_employee.py
import datetime class Employee: raise_amount = 1.04 def __init__(self, first, last, pay): self.first = first self.last = last self.pay = pay # self.email = f'{first}.{last}@aptor.com' # uzywajac @property mozemy zrezygnowac z tego atrybutu @property def email(self): ...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,924
SlawekMaciejewski/Python_exercises
refs/heads/master
/src/colatz.py
def colatz(n): while n != 1: print(n) if n % 2 == 0: n = n * 3 + 1 else: n = n / 2 def colatz2(n): while n >= 1: print(n) if n == 1: return 1 elif n % 2 == 0: n = n / 2 elif n % 2 != 0: n = n * ...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,925
SlawekMaciejewski/Python_exercises
refs/heads/master
/src/bmi.py
def compute_bmi(weight, height): bmi = weight / height ** 2 if bmi < 18.5: resulte = 'underweight' elif bmi > 25: resulte = 'overweight' else: resulte = ' normal' return resulte if __name__ == '__main__': my_weight = float(input('Your weight [kg]: ')) my_height = fl...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,926
SlawekMaciejewski/Python_exercises
refs/heads/master
/structures/stack_deque.py
from collections import deque stack = [] stack.append('first') stack.append('second') stack.append('last') print(stack) print(stack.pop()) print(stack.pop()) print(stack) queue = deque() queue.append('1') queue.append('2') queue.append('3') print(queue) print(queue.popleft()) print(queue.popleft()) print(queue) queu...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,927
SlawekMaciejewski/Python_exercises
refs/heads/master
/src/guess_the_number.py
from random import randint def draw_a_number() -> int: random_number = randint(1, 100) return random_number def is_a_number(data: str) -> bool: try: if data.isdigit(): return True else: raise ValueError except ValueError: print("It's not an integer, en...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,928
SlawekMaciejewski/Python_exercises
refs/heads/master
/structures/ex_dataclass.py
from dataclasses import dataclass @dataclass(frozen=True) class UserData: name: str surname: str age: int if __name__ == '__main__': user = UserData('Slawek', 'Nowak', 33) print(user) print(user.age) user.age = 20 # dla frozen=True będzie błąd bo klasa staje się immutable jak tuple p...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,929
SlawekMaciejewski/Python_exercises
refs/heads/master
/functions/args_kwargs.py
def tag(name, *content, cls=None, **atrs): """Genrate one or more HTML tags""" if cls is not None: atrs['class'] = cls print(atrs) print(sorted(atrs.items())) if atrs: attr_str = ''.join(f' {attr}="{value}"' for attr, value in sorted(atrs.items())) ...
{"/imports/package2/import2.py": ["/imports/package1/import1.py"]}
88,932
immortalmice/opennode-qc
refs/heads/master
/moneriote.py
from functools import partial from multiprocessing import Pool, freeze_support from subprocess import Popen from time import sleep import json import re import requests import subprocess import random, pprint monerodLocation = 'monerod.exe' # This is the relative or full path to the monerod binary moneroDaemonAddr =...
{"/main.py": ["/moneriote.py"]}
88,933
immortalmice/opennode-qc
refs/heads/master
/main.py
import json, requests, time, datetime, configparser, os, moneriote from multiprocessing import Pool, freeze_support config = configparser.ConfigParser() config.read('config.ini') zone_id = config['cloudflare-setting']['Zone-id'] cf_auth_email = config['cloudflare-setting']['X-Auth-Email'] cf_auth_key = config['cloudf...
{"/main.py": ["/moneriote.py"]}
89,037
dehadeaaryan/discord-bot-maker
refs/heads/main
/src/discord_bot_maker/__init__.py
from .dbot import DBot
{"/src/discord_bot_maker/__init__.py": ["/src/discord_bot_maker/dbot.py"]}
89,038
dehadeaaryan/discord-bot-maker
refs/heads/main
/src/discord_bot_maker/command.py
class Command: def __init__(self, ): self.dict = {} self.trigger = False self.Reply = False self.Reply2 = False self.Emoji = False self.Image = False self.Help = False def __add__(self, ): pass def __call__(self): return tuple(sel...
{"/src/discord_bot_maker/__init__.py": ["/src/discord_bot_maker/dbot.py"]}
89,039
dehadeaaryan/discord-bot-maker
refs/heads/main
/src/discord_bot_maker/example.py
from discord_bot_maker import DBot d = DBot(TOKEN) d.createCommand(trigger = "jump", reply = "whoop!", reply2 = "I just jumped", emoji = "😄", image = "jumping.gif", help = "jumps") d()
{"/src/discord_bot_maker/__init__.py": ["/src/discord_bot_maker/dbot.py"]}
89,040
dehadeaaryan/discord-bot-maker
refs/heads/main
/src/discord_bot_maker/dbot.py
import discord from discord.ext import commands PACKAGENAME = "DiscordBotMaker" color = discord.Color.dark_red() FATHER = "<@!781547664079847464>" owner = FATHER class DBot: def __init__(self, bTOKEN : str, bPrefix : tuple = ".", owner : str = FATHER, helpCommand : bool = True, baseCode :...
{"/src/discord_bot_maker/__init__.py": ["/src/discord_bot_maker/dbot.py"]}
89,044
BillowJ/Python-
refs/heads/master
/blog/views.py
from django.shortcuts import render from django.shortcuts import redirect from .models import * from django.views.decorators.csrf import * # Create your views here. from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage, InvalidPage from django.http import HttpResponse def index(request): user...
{"/blog/views.py": ["/blog/models.py"], "/DJ_1/urls.py": ["/blog/views.py"]}
89,045
BillowJ/Python-
refs/heads/master
/blog/migrations/0003_auto_20191204_1404.py
# Generated by Django 2.2.7 on 2019-12-04 06:04 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0002_auto_20191204_1402'), ] operations = [ migrations.AlterField( model_name='blogs', name='created_at', ...
{"/blog/views.py": ["/blog/models.py"], "/DJ_1/urls.py": ["/blog/views.py"]}
89,046
BillowJ/Python-
refs/heads/master
/blog/migrations/0001_initial.py
# Generated by Django 2.2.7 on 2019-12-04 05:40 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='users', fields=[ ...
{"/blog/views.py": ["/blog/models.py"], "/DJ_1/urls.py": ["/blog/views.py"]}
89,047
BillowJ/Python-
refs/heads/master
/DJ_1/urls.py
"""DJ_1 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based vi...
{"/blog/views.py": ["/blog/models.py"], "/DJ_1/urls.py": ["/blog/views.py"]}
89,048
BillowJ/Python-
refs/heads/master
/blog/models.py
from django.db import models # Create your models here. class users(models.Model): user_id = models.AutoField(primary_key=True) user_name = models.CharField(max_length=10,unique=True) passwd = models.CharField(max_length=20) admin = models.IntegerField(default=0) create_at = models.DateField() ...
{"/blog/views.py": ["/blog/models.py"], "/DJ_1/urls.py": ["/blog/views.py"]}
89,049
tabias/NeuroKit
refs/heads/master
/tests/tests_eog.py
# -*- coding: utf-8 -*- import numpy as np import mne import neurokit2 as nk def test_eog_clean(): # test with exported csv eog_signal = nk.data('eog_200hz')["vEOG"] eog_cleaned = nk.eog_clean(eog_signal, sampling_rate=200) assert eog_cleaned.size == eog_signal.size # test with mne.io.Raw r...
{"/neurokit2/eog/__init__.py": ["/neurokit2/eog/eog_clean.py", "/neurokit2/eog/eog_peaks.py", "/neurokit2/eog/eog_process.py"], "/neurokit2/eog/eog_process.py": ["/neurokit2/eog/eog_clean.py"]}
89,050
tabias/NeuroKit
refs/heads/master
/neurokit2/eog/eog_peaks.py
# -*- coding: utf-8 -*- from ..misc import as_vector from ..signal import signal_findpeaks def eog_peaks(eog_cleaned, method="mne"): """Locate EOG events (blinks, saccades, eye-movements, ...). Locate EOG events (blinks, saccades, eye-movements, ...). Parameters ---------- eog_cleaned : list or...
{"/neurokit2/eog/__init__.py": ["/neurokit2/eog/eog_clean.py", "/neurokit2/eog/eog_peaks.py", "/neurokit2/eog/eog_process.py"], "/neurokit2/eog/eog_process.py": ["/neurokit2/eog/eog_clean.py"]}
89,051
tabias/NeuroKit
refs/heads/master
/neurokit2/eog/eog_clean.py
# -*- coding: utf-8 -*- import numpy as np import scipy.ndimage from ..misc import as_vector from ..signal import signal_filter def eog_clean(eog_signal, sampling_rate=1000, method="agarwal2019"): """Clean an EOG signal. Prepare a raw EOG signal for eye blinks detection. Parameters ---------- e...
{"/neurokit2/eog/__init__.py": ["/neurokit2/eog/eog_clean.py", "/neurokit2/eog/eog_peaks.py", "/neurokit2/eog/eog_process.py"], "/neurokit2/eog/eog_process.py": ["/neurokit2/eog/eog_clean.py"]}
89,052
tabias/NeuroKit
refs/heads/master
/neurokit2/signal/signal_decompose.py
import numpy as np from .signal_zerocrossings import signal_zerocrossings def signal_decompose(signal): """Decompose a signal. Parameters ----------- signal : list or array or Series Vector of values. Returns ------- Array Values of the decomposed signal. Examples ...
{"/neurokit2/eog/__init__.py": ["/neurokit2/eog/eog_clean.py", "/neurokit2/eog/eog_peaks.py", "/neurokit2/eog/eog_process.py"], "/neurokit2/eog/eog_process.py": ["/neurokit2/eog/eog_clean.py"]}
89,053
tabias/NeuroKit
refs/heads/master
/neurokit2/eog/__init__.py
"""Submodule for NeuroKit.""" from .eog_clean import eog_clean from .eog_peaks import eog_peaks from .eog_process import eog_process __all__ = ["eog_clean", "eog_peaks", "eog_process"]
{"/neurokit2/eog/__init__.py": ["/neurokit2/eog/eog_clean.py", "/neurokit2/eog/eog_peaks.py", "/neurokit2/eog/eog_process.py"], "/neurokit2/eog/eog_process.py": ["/neurokit2/eog/eog_clean.py"]}
89,054
tabias/NeuroKit
refs/heads/master
/neurokit2/signal/signal_period.py
# -*- coding: utf-8 -*- import numpy as np from .signal_formatpeaks import _signal_formatpeaks_sanitize from .signal_interpolate import signal_interpolate def signal_period(peaks, sampling_rate=1000, desired_length=None, interpolation_method="monotone_cubic"): """Calculate signal period from a series of peaks. ...
{"/neurokit2/eog/__init__.py": ["/neurokit2/eog/eog_clean.py", "/neurokit2/eog/eog_peaks.py", "/neurokit2/eog/eog_process.py"], "/neurokit2/eog/eog_process.py": ["/neurokit2/eog/eog_clean.py"]}
89,055
tabias/NeuroKit
refs/heads/master
/neurokit2/eog/eog_process.py
# -*- coding: utf-8 -*- import pandas as pd from ..signal import signal_period from ..signal.signal_formatpeaks import _signal_from_indices from .eog_clean import eog_clean def eog_process(eog_signal, raw, sampling_rate=1000, lfreq=1, hfreq=10): """Process an EOG signal. Convenience function that automatica...
{"/neurokit2/eog/__init__.py": ["/neurokit2/eog/eog_clean.py", "/neurokit2/eog/eog_peaks.py", "/neurokit2/eog/eog_process.py"], "/neurokit2/eog/eog_process.py": ["/neurokit2/eog/eog_clean.py"]}
89,056
tabias/NeuroKit
refs/heads/master
/neurokit2/hrv/hrv_nonlinear.py
# -*- coding: utf-8 -*- import matplotlib import matplotlib.pyplot as plt import numpy as np import pandas as pd import scipy.stats from ..complexity.entropy_sample import entropy_sample from .hrv_utils import _hrv_get_rri, _hrv_sanitize_input def hrv_nonlinear(peaks, sampling_rate=1000, show=False): """Computes...
{"/neurokit2/eog/__init__.py": ["/neurokit2/eog/eog_clean.py", "/neurokit2/eog/eog_peaks.py", "/neurokit2/eog/eog_process.py"], "/neurokit2/eog/eog_process.py": ["/neurokit2/eog/eog_clean.py"]}
89,104
tchaikousky/dodgeball-game
refs/heads/master
/scene_final.py
import pygame # import random # from player_class import * from random import randint from player_class import * from opposition_class import * from hometeam_class import * from ball_stub import * from level_class import * from os import path img_dir = path.join(path.dirname(__file__), 'img') snd_dir = path.join(path....
{"/scene_final.py": ["/player_class.py", "/opposition_class.py", "/hometeam_class.py", "/ball_stub.py"], "/scene.py": ["/player_class.py", "/opposition_class.py", "/hometeam_class.py", "/ball_stub.py"], "/hometeam_class.py": ["/player_class.py"], "/opposition_class.py": ["/player_class.py"]}
89,105
tchaikousky/dodgeball-game
refs/heads/master
/scene.py
import pygame from random import randint from player_class import * from opposition_class import * from hometeam_class import * from ball_stub import * from level_class import * from os import path from pygame.locals import ( K_UP, K_DOWN, K_LEFT, K_RIGHT, K_ESCAPE, KEYDOWN, K...
{"/scene_final.py": ["/player_class.py", "/opposition_class.py", "/hometeam_class.py", "/ball_stub.py"], "/scene.py": ["/player_class.py", "/opposition_class.py", "/hometeam_class.py", "/ball_stub.py"], "/hometeam_class.py": ["/player_class.py"], "/opposition_class.py": ["/player_class.py"]}
89,106
tchaikousky/dodgeball-game
refs/heads/master
/player_class.py
import pygame from pygame.locals import ( RLEACCEL, K_UP, K_DOWN, K_LEFT, K_RIGHT, K_ESCAPE, KEYDOWN, QUIT, ) class Player(pygame.sprite.Sprite): def __init__(self): super(Player, self).__init__() player_img = pygame.image.load("player-imgs/0_Citize...
{"/scene_final.py": ["/player_class.py", "/opposition_class.py", "/hometeam_class.py", "/ball_stub.py"], "/scene.py": ["/player_class.py", "/opposition_class.py", "/hometeam_class.py", "/ball_stub.py"], "/hometeam_class.py": ["/player_class.py"], "/opposition_class.py": ["/player_class.py"]}
89,107
tchaikousky/dodgeball-game
refs/heads/master
/hometeam_class.py
import pygame from player_class import Player from pygame.locals import ( K_UP, K_DOWN, K_LEFT, K_RIGHT, K_ESCAPE, KEYDOWN, QUIT, ) class Hometeam(Player): is_special = False SCREEN_WIDTH = 800 SCREEN_HEIGHT = 600 def __init__(self, name): super(Ho...
{"/scene_final.py": ["/player_class.py", "/opposition_class.py", "/hometeam_class.py", "/ball_stub.py"], "/scene.py": ["/player_class.py", "/opposition_class.py", "/hometeam_class.py", "/ball_stub.py"], "/hometeam_class.py": ["/player_class.py"], "/opposition_class.py": ["/player_class.py"]}
89,108
tchaikousky/dodgeball-game
refs/heads/master
/ball_stub.py
#imports and CONSTANTS #imports import pygame import random # from player_class import * from os import path from pygame.locals import ( K_UP, K_DOWN, K_LEFT, K_RIGHT, K_ESCAPE, KEYDOWN, QUIT, K_SPACE ) img_dir = path.join(path.dirname(__file__), 'img') # ball_img...
{"/scene_final.py": ["/player_class.py", "/opposition_class.py", "/hometeam_class.py", "/ball_stub.py"], "/scene.py": ["/player_class.py", "/opposition_class.py", "/hometeam_class.py", "/ball_stub.py"], "/hometeam_class.py": ["/player_class.py"], "/opposition_class.py": ["/player_class.py"]}
89,109
tchaikousky/dodgeball-game
refs/heads/master
/opposition_class.py
import pygame from player_class import Player from random import randint from pygame.locals import ( K_UP, K_DOWN, K_LEFT, K_RIGHT, K_ESCAPE, KEYDOWN, QUIT, ) class Opposition(Player): is_special = False SCREEN_WIDTH = 800 SCREEN_HEIGHT = 600 def __init__(...
{"/scene_final.py": ["/player_class.py", "/opposition_class.py", "/hometeam_class.py", "/ball_stub.py"], "/scene.py": ["/player_class.py", "/opposition_class.py", "/hometeam_class.py", "/ball_stub.py"], "/hometeam_class.py": ["/player_class.py"], "/opposition_class.py": ["/player_class.py"]}
89,115
vlimant/NADE
refs/heads/master
/deepnade/buml/Results/__init__.py
from Results import *
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,116
vlimant/NADE
refs/heads/master
/deepnade/buml/Data/__init__.py
from Data import * from Dataset import * from BigDataset import * from TheanoAdapter import *
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,117
vlimant/NADE
refs/heads/master
/deepnade/buml/TrainingController/__init__.py
from ConfigurationSchedule import ConfigurationSchedule from LinearConfigurationSchedule import LinearConfigurationSchedule from AdaptiveLearningRate import AdaptiveLearningRate from MaxIterations import MaxIterations from TrainingErrorStop import TrainingErrorStop from NaNBreaker import NaNBreaker from EarlyStopping i...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,118
vlimant/NADE
refs/heads/master
/convnade/convnade/__init__.py
from .convnade import *
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,119
vlimant/NADE
refs/heads/master
/deepnade/buml/Utils/MVNormal.py
# -*- coding: utf-8 -*- """Multivariate Normal and t distributions Taken from statsmodel (github.com/statsmodels) Created on Sat May 28 15:38:23 2011 @author: Josef Perktold Examples -------- Note, several parts of these examples are random and the numbers will not be (exactly) the same. >>> import numpy as np >...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,120
vlimant/NADE
refs/heads/master
/convnade/scripts/sample_convnade.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys # Hack so you don't have to put the library containing this script in the PYTHONPATH. sys.path = [os.path.abspath(os.path.join(__file__, '..', '..'))] + sys.path from os.path import join as pjoin import argparse import pickle import numpy as np imp...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,121
vlimant/NADE
refs/heads/master
/deepnade/buml/ParameterInitialiser/__init__.py
from ParameterInitialiser import * from Gaussian import Gaussian from Sparse import Sparse from Constant import Constant from Copy import Copy
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,122
vlimant/NADE
refs/heads/master
/deepnade/buml/TrainingController/TrainingController.py
class TrainingController(object): def __init__(self): pass def before_training(self, training_method): pass def after_training(self, training_method): pass def before_training_iteration(self, trainable): pass def after_training_iteration(self, trainable): ...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,123
vlimant/NADE
refs/heads/master
/deepnade/buml/Backends/__init__.py
from Backend import Backend from HDF5 import HDF5 from Console import Console from TextFile import TextFile
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,124
vlimant/NADE
refs/heads/master
/deepnade/buml/Data/utils/__init__.py
from utils import * from filter_speech import *
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,125
vlimant/NADE
refs/heads/master
/convnade/scripts/estimate_nll.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys # Hack so you don't have to put the library containing this script in the PYTHONPATH. sys.path = [os.path.abspath(os.path.join(__file__, '..', '..'))] + sys.path import re import pickle import argparse import numpy as np from os.path import join as p...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,126
vlimant/NADE
refs/heads/master
/convnade/scripts/view_results.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division import os import sys # Hack so you don't have to put the library containing this script in the PYTHONPATH. sys.path = [os.path.abspath(os.path.join(__file__, '..', '..'))] + sys.path import numpy as np import argparse import csv import r...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,127
vlimant/NADE
refs/heads/master
/convnade/scripts/train_convnade.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys # Hack so you don't have to put the library containing this script in the PYTHONPATH. sys.path = [os.path.abspath(os.path.join(__file__, '..', '..'))] + sys.path from os.path import join as pjoin import shutil import argparse import datetime import ...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,128
vlimant/NADE
refs/heads/master
/convnade/setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='ConvNADE', version='1.0.0', author='Marc-Alexandre Côté', author_email='marc-alexandre.cote@usherbrooke.ca', url='https://github.com/MarcCote/NADE', packages=find_packages(), license='LIC...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,129
vlimant/NADE
refs/heads/master
/convnade/convnade/factories.py
import theano.tensor as T import smartlearner.initializers as initer WEIGHTS_INITIALIZERS = ["uniform", "zeros", "diagonal", "orthogonal", "gaussian"] def weigths_initializer_factory(name, seed=1234): if name == "uniform": return initer.UniformInitializer(seed) elif name == "zeros": return ...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,130
vlimant/NADE
refs/heads/master
/convnade/convnade/datasets.py
import os import numpy as np import theano from smartlearner.interfaces import Dataset DATASETS_ENV = "DATASETS" class ReconstructionDataset(Dataset): """ ReconstructionDataset interface. Behaves like a normal `Dataset` object but the targets are the inputs. Attributes ---------- symb_inputs :...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,131
vlimant/NADE
refs/heads/master
/deepnade/buml/Optimization/__init__.py
from Optimizer import Optimizer, has_parameter from Epochable import Epochable from SGD import SGD from MomentumSGD import MomentumSGD
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,132
vlimant/NADE
refs/heads/master
/convnade/scripts/compute_nll.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys # Hack so you don't have to put the library containing this script in the PYTHONPATH. sys.path = [os.path.abspath(os.path.join(__file__, '..', '..'))] + sys.path import argparse import numpy as np from os.path import join as pjoin from smartlearner ...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,133
vlimant/NADE
refs/heads/master
/convnade/convnade/vizu.py
import numpy as np def concatenate_images(images, shape=None, dim=None, border_size=0, clim=(-1, 1)): """ Parameters ---------- images : list of 1D, 2D, 3D arrays shape : (height, width) Shape of individual image dim : tuple (nrows, ncols) border_size : int """ if dim is No...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,134
vlimant/NADE
refs/heads/master
/deepnade/buml/NADE/__init__.py
from BernoulliNADE import * from MoGNADE import * from OrderlessBernoulliNADE import * from OrderlessMoGNADE import *
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,135
vlimant/NADE
refs/heads/master
/convnade/tests/test_losses.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys # Hack so you don't have to put the library containing this script in the PYTHONPATH. sys.path = [os.path.abspath(os.path.join(__file__, '..', '..'))] + sys.path import theano import theano.tensor as T import numpy as np import tempfile from numpy....
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,136
vlimant/NADE
refs/heads/master
/convnade/scripts/merge_nll_evaluations.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys # Hack so you don't have to put the library containing this script in the PYTHONPATH. sys.path = [os.path.abspath(os.path.join(__file__, '..', '..'))] + sys.path import re import pickle import argparse import numpy as np from os.path import join as p...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,137
vlimant/NADE
refs/heads/master
/deepnade/buml/Results/Results.py
import os import pickle import h5py import numpy as np import string import re def get_keys(f, route): keys = [int(x) for x in f[route].keys() ] keys.sort() return keys def get_route(*route): return string.join(route, '/') def series(f, route): keys = get_keys(f, route) x = list() y = lis...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,138
vlimant/NADE
refs/heads/master
/deepnade/buml/Utils/svn.py
import subprocess def svnversion(): p = subprocess.Popen("svnversion", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (stdout, stderr) = p.communicate() return stdout def svnstatus(): p = subprocess.Popen("svn status", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (stdou...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,139
vlimant/NADE
refs/heads/master
/convnade/convnade/losses.py
import numpy as np import theano.tensor as T from smartlearner import Loss from smartlearner.views import ItemGetter #class NllEstimateUsingBinaryCrossEntropyWithAutoRegressiveMask(Loss): class BinaryCrossEntropyEstimateWithAutoRegressiveMask(Loss): """ NLL estimate for a Deep NADE model where an auto regressive...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,140
vlimant/NADE
refs/heads/master
/deepnade/buml/Data/utils/filter_speech.py
def is_phone_state_f(phone_state): def is_phone_state(acoustics, labels): which = labels[:, phone_state] == 1 return (acoustics[which],) return lambda acoustics, labels: is_phone_state(acoustics, labels) def is_not_phone_state_f(phone_state): def is_not_phone_state(acoustics, labels...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}