blob_id
large_string
repo_name
large_string
path
large_string
src_encoding
large_string
length_bytes
int64
score
float64
int_score
int64
detected_licenses
large list
license_type
large_string
text
string
download_success
bool
e279c6c9639fce4a6ccdec76ffdb28faaa3ab8d7
mesh-payments/hmac-auth-examples
/python3/__main__.py
UTF-8
1,416
2.515625
3
[ "Apache-2.0" ]
permissive
import os import sys import requests import datetime import uuid import hmac import hashlib import base64 def call_api(host: str, key: str, secret: str): # gather params timestamp = datetime.datetime.utcnow().replace(microsecond=0).isoformat() + 'Z' nonce = uuid.uuid4().hex print(f'Timestamp is {times...
true
3e3f81e651086e9032ae0a20326f93db363175d4
xolbynz/gwan.science2
/data/preprocess.py
UTF-8
3,504
2.90625
3
[]
no_license
import os import csv import numpy as np import tensorflow as tf from config import config import pathlib import PIL import PIL.Image from sklearn.utils import shuffle from sklearn.model_selection import train_test_split # Req. 3-1 이미지 경로 및 캡션 불러오기 def get_path_caption(caption_file_path): f = open(caption_file_...
true
f555810e2474c064ddc48e9624817b64f7724912
balouf/sisu
/sisu/pit/gismo_wrapper.py
UTF-8
7,594
3.03125
3
[ "BSD-3-Clause" ]
permissive
import copy import re from gismo.corpus import Corpus from gismo import Gismo from sklearn.feature_extraction.text import CountVectorizer from gismo.embedding import Embedding from sisu.datasets.covid import get_title, get_abstract, get_content COVID19_TEXT_GETTERS = { "title": get_title, "abstract": get_abstr...
true
f647476c36493730c112fa107e290b163e458a71
greusor2003/2DConvex-Hull
/convex_hull.py
UTF-8
6,701
3.484375
3
[]
no_license
# -*- coding: utf-8 -*- """ Algorithm for finding the convex hull of a list of points. The set of points is implemented as a (2,) ndarray (numpy type), each column representing the (x,y) coordinates of a point. Step 0: The functions scatter_points() and no_dupli() generate L, the list of distinct point...
true
4376b3f5438edc29303d5c5bedca914b31e7bd4e
pavithraabhi/repo
/cube.py
UTF-8
84
3.203125
3
[]
no_license
g,h,j=list(map(int,input().split())) print(2*g*h+2*h*j+2*j*g,end=" ") print(g*h*j)
true
f5d88665a827cd375cc03718b558e91c6bffd46f
markusfoote/NVISII
/examples/21.ndds_export.py
UTF-8
14,089
2.828125
3
[ "Apache-2.0" ]
permissive
import nvisii import numpy as np opt = lambda : None opt.spp = 100 opt.width = 500 opt.height = 500 opt.out = "21_ndds_export.png" # # # # # # # # # # # # # # # # # # # # # # # # # # Function to add cuboid information to an object using def add_cuboid(name, debug=False): """ Add cuboid children to the tra...
true
564e8da88be679cda7f020534f448b2ce35e539c
ZhaoKaidii/leetcode-my-solutions-
/#45. Jump Game II.py
UTF-8
468
2.890625
3
[]
no_license
class Solution: def jump(self, nums: List[int]) -> int: step,mp,end=0,0,0 for i in range(len(nums)-1): if mp>=i: mp=max(mp,nums[i]+i) #更新最大位置 if i==end: #当指针i指向end的时候,mp已经统计了i到end之间每个格子能到的最大位置,将end更新至mp,step加一 ...
true
963e7e943936701f815fbe4385c9951b01ff2f5e
acoolbest/practice
/python_demo/get_ip_by_dns.py
UTF-8
1,431
2.65625
3
[]
no_license
#!/usr/bin/env python # -*- coding:utf8 -*- import socket import os import sys import re def reply_to_iplist(data): assert isinstance(data, basestring) iplist = ['.'.join(str(ord(x)) for x in s) for s in re.findall('\xc0.\x00\x01\x00\x01.{6}(.{4})', data) if all(ord(x) <= 255 for x in s)] return iplist ...
true
9767e9d3b14af54b7293da0d68d70aee8c1025ef
petr-tik/kaggle-recipes
/src/process_prep.py
UTF-8
2,818
3.296875
3
[]
no_license
#!/usr/bin/env python import nltk import sklearn import json import pandas as pd import string import re from nltk.corpus import stopwords from nltk.tokenize import word_tokenize from nltk.util import ngrams from collections import Counter from collections import OrderedDict """ if raw strings are counted separately...
true
d54f7bbbf1c78533e982b9222c76818d6815cb86
MaxAmende/Raspberry-MH-Z19-BME280-Firebase-Python-Script
/MHz19_BME280_Readout_And_Firebase_Update.py
UTF-8
2,488
2.890625
3
[]
no_license
#Import of required libraries import mh_z19 import firebase_admin from time import gmtime, strftime from firebase_admin import credentials from firebase_admin import db import smbus2 import bme280 #Definition of ports port = 1 address = 0x76 bus = smbus2.SMBus(port) bme280.load_calibration_params(bus,address) #Defini...
true
a6bc77e55fa74830fe6fb755bbcaf7c500d4cbc7
Frankmayerr/SNTP
/sntp_client.py
UTF-8
476
2.625
3
[]
no_license
import socket import struct import time TIME1970 = 2208988800 client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) data = b'\x1b' + 47 * b'\0' while (True): client.sendto(data, (b'localhost', 123)) data, address = client.recvfrom(1024) if data: print('Response received from:', address) ...
true
22f80a8b7907028cb6bd65675618c3b3d0fc6bb8
Liuzen/UPH-1
/py15.py
UTF-8
398
3.859375
4
[ "MIT" ]
permissive
import random a = [] for i in range (100) : a.append(random.randint(1,100)) print("List of numbers: ") for i in range (100) : print(str(a[i]),end = ' ') print() a.sort() print("Number in ascending order: ") for i in range (100) : print(str(a[i]),end = ' ') print() b = sorted(a, reverse=True) print("Number in des...
true
10b046b286ffbf8c5f2c3cf5d35dbc0f1307197e
ryrysmiley/compsci230
/dict.py
UTF-8
313
3.640625
4
[]
no_license
#dictionary practice cereal={ "kind":"Cinnamon", "Calories":270, "Ingredients":["whole grain", "sugar", "rice flour"] } cereal["kind"]="Raisin" """ print(cereal) print(cereal["kind"]) print(cereal["Ingredients"][0]) """ print(dict.keys()) print(dict.values()) print(dict.get("Calories")) print(dict.pop("kind"))
true
f667dac94da51e2f77836b563e1cdc66504c9153
moonhyeji/Python
/Python01/com/test03/rand01.py
UTF-8
171
3.296875
3
[]
no_license
import random r1 = random.random() print(r1) # 1 <= r <= 45 r2 = random.randint(1, 45) print(r2) print(type(r1)) #<class 'float'> print(type(r2)) #<class 'int'>
true
f65db4e908f0ab26b9f6084ed36d3d06363e13fc
DanielMGuedes/Exercicios_Python_Prof_Guanabara
/Aulas_Python/Python/Exercícios/Exe023- separando digítos de um número.py
UTF-8
1,085
3.953125
4
[ "MIT" ]
permissive
# maneira simples de fazer para entender o fatiamento por posição. O Problema á quando nã utiliza os 4 digitos(espaços) ''' num=int(input('Digite um numero de 1 a 9999: ')) n=str(num) print('Analisando o número {}'.format(num)) print('unidade: {}'.format(n[3])) print('Dezena: {}'.format(n[2])) print('Centena: {}'.forma...
true
5f6594b5751b0723446e832b3da017a2cfd1d173
ilia-makhonin/thomas-method-test
/main.py
UTF-8
2,463
2.8125
3
[]
no_license
import telebot import json from test_analys import user_result, answer_reducer bot = telebot.TeleBot('token') keyboard = telebot.types.InlineKeyboardMarkup() one = telebot.types.InlineKeyboardButton(text='a', callback_data='А') two = telebot.types.InlineKeyboardButton(text='b', callback_data='В') keyboard.add(one, tw...
true
44a7da5df9db40bc81a4e10a8176a6cd2b5a956f
tbnorth/pannotate
/pannotate.py
UTF-8
8,698
2.578125
3
[]
no_license
""" --filter keyword NNNM i.e. it's `keyword`, not `keywords` etc. """ import argparse import json import os import re import sys import time import urllib from collections import namedtuple, defaultdict import bibtexparser from bibtexparser.bparser import BibTexParser import popplerqt5 import PyQt5 from lxml impo...
true
a34fd9280ca6c6185bb939d3406beb5494f67c53
Aggelosborlokas/PYTHON-PROJECTS
/ergasia4.py
UTF-8
2,129
4.03125
4
[]
no_license
def times(x): x = str(x) + "*" return x def minus(x): x = str(x) + "-" return x def plus(x): x = str(x) + "+" return x def chooseoperation(y, calc, number): if calc == "*": return number * y elif calc == "-": return y - number elif calc == "+": return nu...
true
58defc6414f3459db81d23cfebf9c2e24113f18b
player-Ling/python
/exercise/42ACSII码加减乘除.py
UTF-8
629
3.234375
3
[]
no_license
class Nstr: ''' num=0 def __init__(self,num): for i in num: self.num+=ord(i) def __add__(self,num1): return self.num+num1.num def __sub__(self,num1): return self.num-num1.num def __mul__(self,num1): return self.num*num1.num def __floordiv__(sel...
true
abd58aa169a88a75a7dce21bccfe57526a4098cd
liuyi103/auction_exp
/exp_plot.py
UTF-8
783
2.84375
3
[]
no_license
import matplotlib.pyplot as plt import numpy as np typ='u' maps={'u':'uniform distribution','e':'exponential distribution','n':'normal distribution'} f=file('%s_c.txt'%typ,'r') s1,s2,s3=f.readlines() sp,esp,sb=[],[],[] exec 'sp='+s1 exec 'esp='+s2 exec 'sb='+s3 print sp,esp,sb plt.title(maps[typ],size=25) p...
true
c3f0bd3562d5afcefde32724b112e994a6a2f7f2
terrence-adams/Python-Sandbox
/Requests/Requests2.py
UTF-8
702
2.625
3
[]
no_license
import requests uri = 'https://api.github.com/search/repositories' full_uri = '' r = None key_word = '' q = '?q=' def open_session(): default_keword = 'c#' full_uri = uri + q + default_keword s = requests.Session() r = s.get(full_uri) return r def get_status(): my_resp = open_session() p...
true
60c0be43aa7db415f9f3a33a3f43f41cff2be6ff
iliyankrastanov/Python
/file65.py
UTF-8
473
3.484375
3
[]
no_license
import re if __name__ == "__main__": names = None pattern = re.compile('^\w+\\s+\w+$') while not names: names = input('your names (firstname lastname:') m = pattern.match(names) if not m: names = None continue print(f'names start:{m.start()} en...
true
45d99042432d69ba9497c4ef683f0162a2f9720e
naspnrd/Python-programs
/if_else_challenge.py
UTF-8
224
3.828125
4
[ "Unlicense" ]
permissive
name =input("enter your name:") age = int(input("How old are you, {0} ".format(name))) if age >= 18 and age < 31 : print("You are welcome for holidays, {0}".format(name)) else: print("sorry, you are under age")
true
b70f83691f0dc18027bacfea16f4a12bd6055456
vitorhvmelo/Deep-Learning
/Iris/iris_salvar.py
UTF-8
1,519
2.703125
3
[ "MIT" ]
permissive
import pandas as pd from keras.models import Sequential from keras.layers import Dense, Dropout from keras.wrappers.scikit_learn import KerasClassifier from keras.utils import np_utils from sklearn.preprocessing import LabelEncoder from sklearn.model_selection import train_test_split base = pd.read_csv('iris.csv') pre...
true
8b53720f13fd2c197491738c717196180bd80980
ngirmachew/python-workshops
/math-puzzles/heads-and-tails.py
UTF-8
932
3.796875
4
[]
no_license
import random import matplotlib.pyplot as plt results = {} for i in range(100): r = random.randrange(100) print(r) if r%2: #print(f'Got {r}, marking tails') results['tails'] = results.get('tails', 0) + 1 else: #print(f'Got {r}, marking heads') results['heads'] = results....
true
b0f06ef5e3a1ef51600e7c57490c7aae96f9a102
kogansheina/euler
/p1_30/p25.py
UTF-8
895
3.796875
4
[]
no_license
import os import sys """ The Fibonacci sequence is defined by the recurrence relation: Fn = Fn-1 + Fn-2, where F1 = 1 and F2 = 1. What is the index of the first term in the Fibonacci sequence to contain 1000 digits? """ def fibonacci(n): nlen = len(n)-2 if nlen < 0: return None n.append(n[nlen]+n...
true
f11e9f908720f35b1113ebd31ad641751e63da79
rangayadavch/movietrailer-434
/entertainment.py
UTF-8
881
2.75
3
[]
no_license
#!/usr/bin/env python import media import fresh_tomatoes ''' atr1:movie name atr2:theme atr3:image link atr4:youtube link ''' bahu = media.Movie("Bahubali The Conclusion", "war", "https://bit.ly/2GBNgc1", "https://www.youtube.com/embed/sOEg_YZQsTI") avengers = media.Movie("Avengers I...
true
01a53859898b952a96806a76197cb3ddf42aed14
phillipeluiz/betcheck
/loteriacaixa/domain/entity/contest.py
UTF-8
1,286
3.546875
4
[]
no_license
import sys class Contest(): def __init__(self, contest, modality): self.contest = contest self.date = None self.modality = modality self.drawn = None self.bets = [] def set_drawn(self, value): self.drawn = value def get_drawn(self): re...
true
235151630b29867cd71b9bf1a1f56ac5aea70134
a-tbd/math21a
/homework2/homework2.py
UTF-8
18,958
3.40625
3
[]
no_license
''' PDF homework assignment for week 2 generated using pylatex https://jeltef.github.io/PyLaTeX/ ''' from pylatex import Document, Section, Subsection, Itemize, Enumerate, Description, \ Subsection, Command, NoEscape, Math, Alignat, Figure from pylatex.utils import italic, NoEscape import os def fill_document(d...
true
5d54edb74f4e7253f3f6b2cf3571fd225c53cb73
ryz1g/Tic-Tac-Toe-using-AI-ML
/helping_functions.py
UTF-8
7,488
2.875
3
[ "MIT" ]
permissive
from os import system import numpy as np import math from tensorflow.keras.models import model_from_json import tensorflow as tf from tensorflow import keras #loading of pretrained model and weights starts json_file = open('model.json', 'r') loaded_model_json = json_file.read() json_file.close() loaded_model = model_f...
true
b48af73ec0f29c98d5c7307a53f6d8ffd1485d00
chaitanyakulkarni21/Python
/OOPS_in_Python/Sport.py
UTF-8
487
3.84375
4
[]
no_license
class Sport: def __init__(self,sportName, sportType): self.sportName = sportName self.sportType = sportType def getSport(self): self.sportName = input("Enter Sport Name: ") self.sportType = input("Enter Sport Type: ") def printSport(self): print("Sport Name: ",self.sportName) print("Spor...
true
809979992d157a82b86a439d2253d4b1caccb284
heshiqiufenzuoan/practice
/python基础代码/面向对象基础/13__摆放家具__03_添加家具.py
UTF-8
1,406
4.125
4
[]
no_license
class HouseItem: def __init__(self,name,area): self.name = name self.area = area def __str__(self): return "[%s] 占地 %.2f" % (self.name,self.area) class House: def __init__(self,house_type,area): self.house_type = house_type self.area = area #剩余面积...
true
575a18a562cbe4d0ffdf6177ca75f7bb4edcd95c
pedrotari7/euler
/160-169/169.py
UTF-8
322
3.25
3
[]
no_license
N = 10**25 chains = [] def powers(chain, poss): s = sum(chain) if s == N: chains.append(chain) return True elif s > N: return True for i,n in enumerate(poss): if chain.count(n) < 2: if powers(chain +[n],poss[i:]): break numbers = [2**i for i in xrange(83)] powers([],numbers) print len(chains...
true
511fe69caf47dd49efd52bff47c7fc4cc5aa2410
Wendell245/Portland-OSM
/mapParser.py
UTF-8
10,132
2.640625
3
[]
no_license
import os import csv import codecs import pprint import re import xml.etree.cElementTree as ET import time import cerberus import Schema OSM_PATH = "Portland_map.osm" NODES_PATH = "csv/nodes.csv" NODE_TAGS_PATH = "csv/nodes_tags.csv" WAYS_PATH = "csv/ways.csv" WAY_NODES_PATH = "csv/ways_nodes.csv" WAY_TAGS_PATH = ...
true
20e46b70661f272b29b463c16a09ae206c917b8e
smoitra87/pareto-hmm
/ParetoHMM/sim1.py
UTF-8
1,909
2.671875
3
[]
no_license
""" Simulation Study 1 : Create a 12 length protein @author: smoitra@cs.cmu.edu @license: BSD """ import os,sys import pylab as pl import numpy as np import scipy as sci from HMM import HMM,CMRF,TMRF from itertools import product from cvxhull import pareto_frontier def set_params_hmm_exp1(hmm) : """ Sets the param...
true
47a47a502e9b166839fb183cb0a294930dbf3c35
JamesSibbit/tools
/maps.py
UTF-8
878
2.734375
3
[]
no_license
import csv from bokeh.io import output_file, show from bokeh.models import (GMapPlot, GMapOptions, ColumnDataSource, Circle, Range1d, PanTool, WheelZoomTool, BoxSelectTool) lats = ['54.653468'] longs = ['-3.380473'] # f = open('countries.csv', encoding='ISO-8859-1') # countries = csv.reader(f) # for ab, lat, long, na...
true
e7fa3cadca9879c8a37138e078b6a08bc825cdea
magdamagda/matepair
/src/readsam.py
UTF-8
742
3.046875
3
[]
no_license
import sam import os.path def readSamFile(name): samFile = sam.SAM() with open(name, 'r') as f: line = f.readline() # read header while line[0] == '@': line = f.readline() # read rest while line!='': samList = line.strip().split('\t') ...
true
d2ca2e49faddcc89dddabffee8f3bc89bc342849
codeproy/newPython
/sumtwo.py
UTF-8
98
3.234375
3
[]
no_license
def sumtwo(a,b) : return a * b x = int(input ()) y = int(input ()) c = sumtwo(x,y) print (c)
true
1efa4fe1c0e2097bd6d9f297747f56e7b38ff12a
ConorHuh/CheckMK
/Monitoring/new/newAlert.py
UTF-8
882
2.703125
3
[]
no_license
from datetime import datetime, timedelta class alert: def __init__(self, host, metric, norm, std): self.host = host self.metric = metric self.time_sent = None self.average = norm self.std = std def check_time_since_last_alert(self): if(self.time_sent != Non...
true
f9acfcfa13a6b49ebcac2811d0f11bd2574fd156
francescopampallona/Audio-signal-processing
/sound_math_function/smf.py
UTF-8
808
2.921875
3
[]
no_license
import math import numpy as np import matplotlib.pyplot as plt from scipy.io.wavfile import write import sounddevice as sd ''' DATI SULLA DURATA DEL SEGNALE E SUL SUO CAMPIONAMENTO ''' DURATA = 4.0 #Durata del suono in secondi SF = 10000.0 #FREQUENZA DI CAMPIONAMENTO ''' DATI DEL SEGNALE (w=pulsazione) ''' w1 = ...
true
d8ddf2c9986017469b0129fcb61e5d9c2465caf8
GoogleCloudPlatform/solutions-gcs-bq-streaming-functions-python
/functions/streaming/main.py
UTF-8
3,997
2.765625
3
[ "LicenseRef-scancode-generic-cla", "Apache-2.0" ]
permissive
# Copyright 2018 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
true
b009ccc3243ea34f3ed2a8a6e97f178363a8603d
Aasthaengg/IBMdataset
/Python_codes/p03088/s789099061.py
UTF-8
1,836
2.78125
3
[]
no_license
import itertools s=dict() for i in itertools.product(["A","C","G","T"], repeat=3): s[i]=1 s[("A","G","C")]=0 s[("G","A","C")]=0 s[("A","C","G")]=0 n=int(input()) mod=10**9+7 nn=3 t=dict() while nn<n: for i in itertools.product(["A","C","G","T"], repeat=3): t[i]=0 nn+=1 for ky in s.keys(): ...
true
54d7c7a829f40b3a1514c4971529aedbdd3f0fc3
yoonho0922/Algorithm
/boj/Python/day34/p13413_오셀로재배치.py
UTF-8
442
2.90625
3
[]
no_license
import sys readline = sys.stdin.readline T = int(readline()) for _ in range(T): N = int(readline()) init = readline().strip() target = readline().strip() W, B = 0, 0 i = 0 while i < N: if init[i] == target[i]: i += 1 else: if init[i] == 'B': ...
true
81122a84d36cb600435ac5c1eb4ce403d4ae401a
M4573R/CSCE-625-Project
/TagOVR.py
UTF-8
2,963
2.890625
3
[]
no_license
#!/usr/bin/python import Timer import DataProcessor import OneVsRest def main(): # Handle for data processor processor = DataProcessor.DataProcessor() # Gather and clean training set data trainingSet = [] dictionary = set() tags = [] processor.compileTrainingSet("posts.xml", 1, trainingSet, di...
true
d7125328c2aa3f85384e59d1050aa1f430d11a0f
LZhang2004/Year9DesignCS-PythonLZ
/SecretCipher/MainGame.py
UTF-8
10,341
2.640625
3
[]
no_license
#main game #http://jjal.download/index.php?module=sms&lang=en - Phone Notification Fake all going to use this for the messages import tkinter as tk from tkinter import * from PIL import ImageTk, Image import math import os import time root = tk.Tk() root.title("Game") #enable and disable keypad and message buttons...
true
de9888af49db7f84ccab32798d927a4de623e7db
judy2k/command-line-talk
/examples/io/mickeymouse.py
UTF-8
222
3.1875
3
[]
no_license
#!/usr/bin/env python import sys # Print to stdout: print "You've seen this all before." # Print to stderr: print >>sys.stderr, "This is not *standard* output" # Read from stdin: for line in sys.stdin: print line,
true
1092d4f71d789e12fef46d7d5e0b643d4a6030a4
justgod3/hard
/hard/first/tests.py
UTF-8
3,563
2.546875
3
[]
no_license
from django.test import TestCase # Create your tests here. # 服务端 # import socket # # sk = socket.socket() # # sk.bind(("127.0.0.1",8080)) # sk.listen(5) # # while True: # conn,address = sk.accept() # conn.sendall(bytes("欢迎光临我爱我家",encoding="utf-8")) # # size = conn.recv(1024) # size_str = str(size,en...
true
4785138be292a25df6e964e1d84f4be0ad9953b0
lucasdigian/ChatBot_GUI
/InterfaceBot/main.py
UTF-8
1,002
2.953125
3
[]
no_license
from tkinter import * import tkinter.scrolledtext def Write(): message = f"Usuario: {input_area.get('1.0' , 'end')}" if message != '': input_area.delete('1.0' , 'end') text_Area.config(state='normal') text_Area.insert('end',message) text_Area.yvi...
true
affc207a9c71da20d89cd25fa1370a339161d56d
mehurlock/qbb2017-answers
/week_4/manhattan_maker.py
UTF-8
1,088
2.671875
3
[]
no_license
#!/usr/bin/env python import sys import itertools import os import matplotlib.pyplot as plt import numpy as np import math segment_file=open(sys.argv[1]) file_name=sys.argv[1] p_value_sig=[] p_value_insig=[] lines=-1 for i in segment_file: fields=i.split() if fields[8] != "NA" and fields[8] != "P": ...
true
bf5a73ab4108c6f1cda9a916299a176f360284c9
anderson-github-classroom-2021-spring/csc-466-student
/chapters/Chapter6.py
UTF-8
5,590
3.328125
3
[]
no_license
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # formats: ipynb,md,py # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.8.0 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # + ...
true
714afa5fe2111c4091de1d0a33db2e7458f72fdd
autoshoptgmaster/autoshop-tg_bot
/messages.py
UTF-8
17,522
2.765625
3
[]
no_license
import settings start = { 'mes': 'start', 'text': '''Привет!''', 'markup': [ ['👁‍🗨 Смотреть', '📲 Подписаться'], ['🚀 Продвижение'], ['💶 Мой доход', '🏦 Баланс'], ['♻️ Статистика', '⚠️ Информация'], ]} # '🏦 Баланс','👥 Рефералы' admin = { 'text': 'П...
true
16bdd0f29b388c17bfb3c5123b087dfb286747a2
yz-hust/variance
/echofunctions/mask.py
UTF-8
2,236
2.953125
3
[]
no_license
"""Echonet Function Evaluation generation of masks with lines to determine volume calculation area""" import pandas as pd from ast import literal_eval import os import cv2 from tqdm import tqdm from algorithms import funcs as funcs import loader def generateMasks(segmentedFramesFolder="control_video_frames", outputMa...
true
a38e2796a4edc5531ae3dca9f002788dfcb95160
sidravic/pycon2019
/code/test_run_test.py
UTF-8
616
3.1875
3
[]
no_license
import asyncio from unittest import TestCase async def async_calculator(a, b): while(1): x = a + b class Tests(TestCase): def test_1_1(self): loop = asyncio.get_event_loop() val = loop.run_until_complete(async_calculator(1,1)) self.assertEqual(1, val) def test_1_0(self...
true
2486bf611be7e165de9341b53152c3c98cbcbd43
bpandola/advent-of-code
/2019/day_08.py
UTF-8
1,055
3.15625
3
[]
no_license
IMAGE_WIDTH = 25 IMAGE_HEIGHT = 6 if __name__ == '__main__': puzzle_input = [int(i) for i in open('day_08.in').read()] # Part 1 data = list(puzzle_input) fewest_zeros = IMAGE_HEIGHT * IMAGE_WIDTH checksum = 0 while data: layer = data[:IMAGE_WIDTH * IMAGE_HEIGHT] data = data[...
true
ece116a8bad9417551cbf8d06170ec166917b43e
iosonofabio/viscRNA-Seq-paper
/fig2-S4.py
UTF-8
3,667
2.5625
3
[]
no_license
# vim: fdm=indent ''' author: Fabio Zanini date: 08/09/17 content: Script for studying bystander effects. ''' # Modules import os import sys import argparse import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns os.environ['SINGLET_CONFIG_FILENAME'] = 'singlet.yml' sy...
true
6386d81c64654116047db6ba3d4aa3e4d6aac789
hyosay/py_algo
/day3/functionTest.py
UTF-8
1,039
3.84375
4
[]
no_license
''' def add(a,b): return a+b ans = add(2,5) print('ans : ', ans) add2 = lambda x,y : x+y print('ans lam :', add2(2,4)) ''' ''' _list1 = [] for i in range(5): _list1.append(i*2) print('list1', _list1) _list2 = [i*2 for i in range(5)] print('list2', _list2) _list3 = list(map(lambda x : x*2, r...
true
6af7dba30192a5c7580a6cbbf502f3af6d5eb9ea
sunsmilely/OnlineComputing
/compute/compute/views.py
UTF-8
1,473
2.5625
3
[ "MIT" ]
permissive
# -*- encoding: utf-8 -*- """ @Author: cuiyonghua @CreateDate: 2021/6/28 上午10:19 @File: views.py.py @Description: """ import time import random from django.http import HttpResponse from django.shortcuts import render def app_normal(request): return HttpResponse("app normal--- ") from django.shortcuts import r...
true
088cecc80d8cc03a42534b6f6baa4af5fe09c6b8
fortredux/py_net_eng
/exercises/22_textfsm/task_22_1.py
UTF-8
1,895
3.59375
4
[]
no_license
# -*- coding: utf-8 -*- ''' Задание 22.1 Создать функцию parse_command_output. Параметры функции: * template - имя файла, в котором находится шаблон TextFSM * command_output - вывод соответствующей команды show (строка) Функция должна возвращать список: * первый элемент - это список с названиями столбцов * остальные ...
true
819d20d0fdbc176dc4a2eb86c405977da0b1cdea
dcarmod2/VisionZeroTheory_Submission
/FINAL_Morning_RushHour/windower.py
UTF-8
280
3.1875
3
[ "MIT" ]
permissive
import datetime name="Manhattan morning rush hour" print(name) (start_morning_rush,end_morning_rush)=(7,9) # 7 to 9 AM window_length = 3 def timewindower(dt): if (dt.isoweekday()>5): return False #immediate return false if weekend return (start_morning_rush<=dt.hour<=end_morning_rush)
true
25cc1ff20b251209219d37b6080a194e5123cca8
ningxu2020/python201
/funnylist.py
UTF-8
1,062
4.3125
4
[]
no_license
class FunnyList(list): def __init__(self, item): """Allows us to create a FunnyList not only from a list, but ALSO from a single element """ if type(item) == list: return super().__init__(item) else: return super().__init__([item]) def __eq__(s...
true
007b3a6d660f7bbdaac0b6e853f9a96fd94fa6b6
MarcoLopez2001/pablo
/problema12.py.py
UTF-8
725
4.09375
4
[]
no_license
def salario(): hpd = int(input("Ingrese las horas por dia del empleado: ")) if hpd > 0 and hpd <= 8: tph = float(input("Ingrese tarifa por hora: ")) d = int(input("Ingrese el número de dias que laboró: ")) else: print("El empleado debe tener más d...
true
8b4958c844c47ebdf367437fb0eb7cff6e4b7ba7
adamhammes/advent-of-code
/aoc_2021/day17.py
UTF-8
2,526
3.34375
3
[]
no_license
from typing import NamedTuple, Tuple import re from lib import Point PROBLEM_INPUT = "target area: x=102..157, y=-146..-90" class TargetRange(NamedTuple): x_range: range y_range: range def __contains__(self, p: "Probe") -> bool: return p.position.x in self.x_range and p.position.y in self.y_ran...
true
2d7de0e48124fea11c86a2ed7283dc344cae3dbc
alperyeg/enkf-nn
/act_func/results/04/default_run/different_normalization/test_accuracy.py
UTF-8
17,546
2.71875
3
[]
no_license
import matplotlib.pyplot as plt import numpy as np import os import seaborn as sns import torch from torchvision import datasets, transforms from mpl_toolkits.axes_grid1.inset_locator import zoomed_inset_axes from mpl_toolkits.axes_grid1.inset_locator import mark_inset sns.set(style="white") sns.set_color_codes("dark...
true
bca24db95392ffb87cc7025ff7cd487b37450966
eastonYi/ReinforcementLearning
/src/envs/MDP.py
UTF-8
2,086
2.921875
3
[]
no_license
import numpy as np import random import copy from .env import Environment from src.tools.state import State class MDP(Environment): """ A->A->A->...->A each move will generate various and deterministic rewards the agent needs to search a best path walking through. It is a simple implement of lamg...
true
41b148d4acf68e60a6f29fa6b9c4e1030cf79f6d
rosedu/hfall
/test/teste teren/display lists + itertools - 30-40fps/2.py
UTF-8
3,515
2.6875
3
[]
no_license
import pyglet import array import ctypes import itertools from pyglet import window from pyglet import clock from pyglet.gl import * try: # Try and create a window with multisampling (antialiasing) config = Config(sample_buffers=1, samples=4, depth_size=16, double_buffer=True,) ...
true
3e3f032b9c0a0c703656b85e66e0cb6c5e172e15
ilerda/bacterial-chemotaxis
/plot_paths.py
UTF-8
2,247
3.140625
3
[ "MIT" ]
permissive
'''Functions to plot bacterium paths are provided and implemented.''' import matplotlib.pyplot as pyplot import matplotlib.cm from path_funcs import * def make_plot(): pyplot.plot(trajectory[:,0], trajectory[:,1]) def make_simplified_plot(): x_points = numpy.array([trajectory[0,0],trajectory[-1,0]]) y_p...
true
ed37c49750bf2ffe17b11fa6ca2dd4abd37eed3e
javiabellan/bioinformatics
/Rosalind (python)/2) Transcribing DNA into RNA/transcribe.py
UTF-8
111
2.828125
3
[]
no_license
import sys fileName = sys.argv[1] file = open(fileName, 'r') data = file.read() print(data.replace("T", "U"))
true
0e6f2350fcfdfeb8740eefc57caa3a8e527571a8
bamboodew/Python_Cookbook
/Chapter02_strings_and_text/02字符串开头或结尾匹配/__init__.py
UTF-8
447
4.53125
5
[]
no_license
# data structure # 列表的方法 a = [66.25, 333, 333, 1, 1234.5] print(a.count(333)) # list.count(x):返回x在列表中出现的次数。 a.insert(2, -1) # 在指定位置插入一个元素。第一个参数是准备插入到其前面的那个元素的索引 print(a) a.append(222) print(a) print(a.index(333)) a.remove(333) print(a) a.reverse() # 倒排列表中的元素 print(a) a.sort() # 对列表中的元素进行排序 print(a)
true
79ab2e0b3f20a9e5995e02e5fdd3d82068caf8b5
sohcalvin/ref
/python/ttt.py
UTF-8
353
3.078125
3
[]
no_license
import numpy as np import math def sigmoid(x): return 1 / (1 + math.exp(-x)) def softmax(x): """Compute softmax values for each sets of scores in x.""" return np.exp(x) / np.sum(np.exp(x), axis=0) print(sigmoid(6)) print(sigmoid(7)) print(sigmoid(20)) tmp1 = softmax([5,6,5.5]) tmp2 = softmax([2.7,2.8,4.2,...
true
32735e20f9b03e4b2a19c01f74cfebcdd81289eb
parse/ilsken
/IrcBot.py
UTF-8
5,233
2.796875
3
[]
no_license
import socket, re from SpotifyMetaData import Metadata #Import Spotimeta (http://pypi.python.org/pypi/spotimeta/0.2) # @todo: Multiple networks class IrcBot: network = '' port = 0 nick = '' channel = [] irc = None def __init__ (self, params): """Init bot using ser...
true
f6063799e6b685a4160607f2fd0f66f2c4110c97
sourcesimian/wayBack
/bin/syncMusicAlbums/AlbumInfo.py
UTF-8
2,711
2.765625
3
[]
no_license
#!/usr/bin/env python import os #=============================================================================== class AlbumInfo(dict): def __init__(self): dict.__init__(self) self._musicFileExts = ['.mp3', '.mpc', '.wma', 'wav'] #--------------------------------------------------------------...
true
f4a524d26c179e5d341c6756550ecc27aed7ccfa
dihuynh/projectEuler
/p7_10001prime.py
UTF-8
226
3.4375
3
[]
no_license
#!/usr/bin/env python def primes (n): ps = [] sieve = [True]*(n+1) for p in xrange(2,n+1): if sieve[p]: ps.append(p) for i in xrange(p*p, n+1, p): sieve[i]=False return ps[10000] print primes(1000000)
true
3579dc3c53a7ab52fa32e790507714f447080a0f
inkmonk/json-test
/json_test/json_check.py
UTF-8
2,251
3.3125
3
[ "BSD-3-Clause" ]
permissive
from jvalue import JList, JObject import json def check_json(json_string, json_structure): """ json_string: String representing the json json_structure: A value representing JSON schema. """ js = json.loads(json_string) return check_json_object(js, json_structure) def check_json_object(json_ob...
true
270559be492c60b66657cf358bc49fdf5b8c4f0d
3uxeca/Bitcamp-AI-study
/tf/tf20_boston_20.py
UTF-8
2,646
2.859375
3
[]
no_license
import numpy as np import tensorflow as tf import random from sklearn.preprocessing import StandardScaler tf.set_random_seed(777) # Iris Data x_data = np.load("./data/boston_housing_x.npy") y_data = np.load("./data/boston_housing_y.npy") # print(x_data.shape) # (506, 13) # print(y_data.shape) # (506, ) sta = Standa...
true
a1cdf188b742a7452aabe9f2ad7bef339cc010d6
peterpdu/mashup
/mashup/calculate/vector_embedding.py
UTF-8
1,902
2.625
3
[]
no_license
#!/usr/bin/env python 3.6 import numpy as np from scipy.optimize import minimize, fmin_l_bfgs_b def vector_embedding(q, ndim, maxiter): def optim_fn(wx): wx = wx.reshape(ndim, nnode + ncontext) p = p_fn(wx[:, :ncontext], wx[:, ncontext:]) fval = obj_fn(p) wgrad = np.matmul(wx[:...
true
f022d4c196b4c45454af923331572b6eecec2f1a
CyberWendy123/automation
/prettyCharacterCount.py
UTF-8
474
4.09375
4
[]
no_license
# Aug 12, 2019 (Ch 5: Dictionaries) # understanding pprint() and pformat() functions import pprint message = 'It was a bright cold day in April, and the clocks were striking thirteen.' count = {} for character in message: count.setdefault(character, 0) count[character] = count[character] + 1 pprint.pprint(coun...
true
275d8fb7305f23d0d2415c3a71de111c2b99d2d1
cjsantucci/pyTestRunner
/PyClassUtil.py
UTF-8
9,554
3.015625
3
[]
no_license
''' Created on Jul 3, 2019 @author: z1085043 ''' from builtins import isinstance import collections import importlib import inspect as INSP import re import reprlib as RL import os import traceback import warnings class PyClassHelper(object): ''' This class helps with property initialization and nice printing...
true
af8f51dc9a3a68ef9a4cba609d802bf71fe46b34
xtream1101/scraper-monitor-lib
/scraper_monitor/scraper_monitor.py
UTF-8
4,535
2.734375
3
[ "MIT" ]
permissive
import logging import requests import datetime import threading logger = logging.getLogger(__name__) class ScraperMonitor(): def __init__(self): self.config = {} def start(self, scraper_name=None, host=None, apikey=None, scraper_key=None, scraper_run=None, environment=None, machine_name=None): ...
true
d867cbae0015875a4ad8a3014b1ff28c690edaa3
Askannz/gaming-flightcheck
/gaming_flightcheck/utils/Checklist.py
UTF-8
2,215
3.234375
3
[ "MIT" ]
permissive
import os class Checklist: def __init__(self): self.available_items_list = self._build_checklist_items_list() self.current_items_list = {} def add_item(self, item_level, item_name): assert item_level in self.available_items_list.keys() assert item_name in self.available_item...
true
caa06d94986a0ef38c2cd062b56e2ca19afebec8
euka96/Baekjoon
/기본 수학 1/분수찾기.py
UTF-8
783
3.984375
4
[]
no_license
# 무한히 큰 배열에 다음과 같이 분수들이 적혀있다. # 1/1 1/2 1/3 1/4 1/5 … # 2/1 2/2 2/3 2/4 … … # 3/1 3/2 3/3 … … … # 4/1 4/2 … … … … # 5/1 … … … … … # … … … … … … # 이와 같이 나열된 분수들을 1/1 -> 1/2 -> 2/1 -> 3/1 -> 2/2 -> … 과 같은 지그재그 순서로 차례대로 1번, 2번, 3번, 4번, 5번, … 분수라고 하자. # X가 주어졌을 때, X번째 분수를 구하는 프로그램을 작성하시오. # 첫째 줄에 X(1 ≤ X ≤ 10,000,000...
true
720ac778eaf4f57a6ff157dcf57f6457bee5869f
Krazete/dis105a
/main.py
UTF-8
2,561
2.546875
3
[]
no_license
import webapp2 from google.appengine.api import urlfetch import re class Index(webapp2.RequestHandler): def set(self, path, header): # set header self.response.headers['Content-Type'] = header try: # get original content content = urlfetch.fetch(path).content ...
true
0908f2aa067c9647e6d43e19343ace2acbaa3dd0
anzhao920/MicrosoftProject15_Invictus
/COMP0016_2020_21_Team12-datasetsExperimentsAna/pwa/FADapp/pythonScripts/venv/Lib/site-packages/numpy/typing/tests/data/pass/ndarray_conversion.py
UTF-8
1,720
2.8125
3
[ "BSD-3-Clause", "GPL-3.0-or-later", "BSD-3-Clause-Open-MPI", "GPL-3.0-only", "GCC-exception-3.1", "MIT" ]
permissive
import os import tempfile import numpy as np nd = np.array([[1, 2], [3, 4]]) scalar_array = np.array(1) # item scalar_array.item() nd.item(1) nd.item(0, 1) nd.item((0, 1)) # tolist is pretty simple # itemset scalar_array.itemset(3) nd.itemset(3, 0) nd.itemset((0, 0), 3) # tobytes nd.tobytes(...
true
1a2b026c6a42a0dbbb118aa52e2154b0ca7a97fa
jerabekjak/smoderp2d-optim-sens
/model/smoderp2d/processes/infiltration/greenampt.py
UTF-8
3,433
2.828125
3
[]
no_license
from model.model.smoderp2d.core.general import GridGlobals from model.model.smoderp2d.processes.infiltration import BaseInfiltration from scipy.optimize import newton import math class SingleSoilGA(object): """ Green ampt infiltration for single soil type """ def __init__(self, ks): """ for each soi...
true
978894c0ddf265e7696cfe9fcadc62a8fcb5b753
casheljp/pythonlabs
/examples/5/first_function.py
UTF-8
127
2.828125
3
[]
no_license
#!/usr/bin/env python3 def printmsg(): print("This function simply ", end="") print("prints this message") printmsg()
true
32403af4392f066b72a4dd8847bcc0a9bd0e119f
Dis-count/Python_practice
/How_to_use_Python_work/Excel/Excel_graph.py
UTF-8
1,000
3.0625
3
[]
no_license
import xlsxwriter #设置一个例子 data = [20, 45, 26, 18, 45] #创建表格 workbook = xlsxwriter.Workbook("temp.xlsx") worksheet = workbook.add_worksheet("data") #添加数据 worksheet.write_column('A1', data) #创建图表 chart = workbook.add_chart({'type': 'line'}) #图表添加数据 chart.add_series({ 'values': '=data!$A1:$A6', 'name'...
true
1d94d924c4c1d2658f72e98663b72efa3b3dbed1
rositsabodurova/Problem-Solving-PY
/ProgrammingBasics-tasks/PasswordGuess1.py
UTF-8
142
3.453125
3
[]
no_license
user_input = input() pass_to_compare = "s3cr3t!P@ssw0rd" if user_input == pass_to_compare: print("Welcome") else: print("Wrong password!")
true
260f0d4fbbeb42cfa6b93f6f15344e8eb0577c7f
brij2020/Ds-pythonic
/Quiz-Linked-List/Showing_L2_element_accor_L1.py
UTF-8
647
3.265625
3
[]
no_license
import Singly_linked_list l1 = Singly_linked_list.List() l2 = Singly_linked_list.List() for num in [1,7,1,3,4,5,6]: l1.createList(num) for num in [1,2,34,1,23,12,34,2,12,11]: l2.createList(num) def printNth(): node = l1.head while node: if l2.size() >= l1.size(): n = l2.head ...
true
49bc4a23393a1400b8cfd45c46c5bfdb925e3bd0
Rex7/PythonDemo
/Home.py
UTF-8
129
3.078125
3
[]
no_license
# program for Input Demo class n0 = int(input("enter your no ")) a,b = 0,1 print(n0) while(a<n0): a , b = b,a+b print(a)
true
93e7588b58e1282e8bd53d1cc86aaa72336f88f0
senorsac/ros_pyparrot
/Mambo/mambokeyboardcontrolled.py
UTF-8
7,151
2.515625
3
[ "MIT" ]
permissive
#!/usr/bin/env python3.6 # Written by Isaac Vargas and Alan Garduno import time import keyboard from pyparrot.Minidrone import Mambo #Variable that will store the parameters of the mambo drone mamboAdd = "D0:3A:EE:30:E6:20" # ViconObject = Mambo_1 #mamboAdd = "E0:14:A0:AE:3D:C7" # ViconObject = Mambo_5 #mamboAdd = "D...
true
78dec86fd40e3084cee6c66bbbef21d6e8952bcc
JeanPSF/python-diff-string
/sequenceMatcher.py
UTF-8
132
2.625
3
[]
no_license
from difflib import SequenceMatcher def similar (a, b): return SequenceMatcher(None, a, b).ratio() print(similar('Oia','Ola'))
true
e897d5d7e14692800dc1a6e7c9a176dc3510ce1c
jhh130910/pycharm
/06_Train/train_dir/4.closure_and_decorator.py
UTF-8
787
3.84375
4
[]
no_license
# closure list_test = [1,2,3,4,9] def func_closure(list_obj): a = 1 print ('func_closure ...') def func_inter(): list_obj[2] += 1 b = 2 print (list_obj ) return func_inter func = func_closure(list_test) func() func() # decorator # 不影响原有函数的功能,还可以添加新的功能 def func1(func): ...
true
8ae1f56aa32002d01dc5fb63c1dabd94bee153b9
rogergranada/dataset-annotation
/code/compress_relations.py
UTF-8
3,305
2.953125
3
[ "MIT" ]
permissive
#!/usr/bin/env python # coding: utf-8 """ This script reads a file containing relations as: Frame \t Subject \t Relation \t Object and creates a file containing a compressed annotation with the sequence of frames for a relation as: Initial_frame - Final_frame - Id_subject - Id_relation - Id_object Thus, an example...
true
8373b51b0ab9a2af189fc971f046bb11889788a4
Brain-0ut/Vielit_Python_HW
/Abto_CV_AI_2022_Camp_var_B/test1.py
UTF-8
532
2.9375
3
[]
no_license
def task2(x: int) -> int: if x < 2: return x i = x >> 1 if (x & 1) == 1: n = task2(i) print(n, (n << 2), (i << 2), "+1") return (n << 2) + (i << 2) + 1 else: n = task2(i) print(n, n << 2) return n << 2 def main(): x = 49 y = 122 & 1# ...
true
f30f4342d069f36212f453953b67c6508c7db570
matheusschuetz/AulasPython
/02-Aula2/exercicio/exercicio4.py
UTF-8
509
3.140625
3
[ "MIT" ]
permissive
#--- Exercicio 4 - Variávies e impressão com interpolacão de string #--- Imprima a tela de um itinerário de viagem #--- O itinerário deve conter o ponto de partida e de destino #--- Entre os dois pontos deve conter no minimo 10 pontos de parada #--- Cada item deve conter data, hora e descrição #--- O itineário deve co...
true
bb44e5444749b283ae8d23c90773dbd1228d8455
MoAfshar/random_learning_projects
/PDF_to_Text/testing.py
UTF-8
1,875
2.9375
3
[]
no_license
import sys from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter from pdfminer.pdfpage import PDFPage from pdfminer.converter import TextConverter from pdfminer.layout import LAParams import io from tqdm import tqdm from functools import lru_cache import re from nltk.corpus import stopwords REPLACE_BY_...
true
32cbd5551320f5bd3954989626a50ea52e3d306f
burakbayramli/books
/A_Primer_on_Scientific_Programming_with_Python/random/normal_numbers1.py
UTF-8
391
2.734375
3
[]
no_license
import sys N = int(sys.argv[1]) m = float(sys.argv[2]) s = float(sys.argv[3]) import numpy as np np.random.seed(12) samples = np.random.normal(m, s, N) print np.mean(samples), np.std(samples) import scitools.std as st x, y = st.compute_histogram(samples, 20, piecewise_constant=True) st.plot(x, y, hardcopy='tmp.eps', ...
true
6c5d3f4a9f1372728d2223ce35e89de7963ad4cf
ScottSoren/EC_MS_0
/Molecules.py
UTF-8
14,521
2.828125
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Mon Oct 17 22:36:15 2016 @author: scott This module will define the Molecule class used to organize, access, and manipulate information about molecules. Objects of this class will generate and utilize text files in EC_MS/data/ """ from __future__ import print_function, divis...
true
046d9fe31f5c343faa9014eb64d765663c7172be
sivas1998/sivasubramanian
/and operator.py
UTF-8
266
3.46875
3
[]
no_license
my_age = 22 insert = int(("enter your age")) if(user_age > my_age and user_age == my_age) print("user is elder than myage","user age is equal to my age") if(user_age < my_age and user_age == my_age) print("user is younger than myage ","user age is equal to my age")
true
79417fa590b3a3848968c2c5c47b8d62b1fbb9a0
lc4t/LeetCode
/problems/No8_String_to_Integer_atoi.py
UTF-8
1,023
3.03125
3
[]
no_license
#!/usr/bin/python3 # -*- coding:utf-8 -*- import string class Solution(object): def myAtoi(self, s): """ :type str: str :rtype: int """ MAX = 2147483647 MIN = -2147483648 flag = '' ans = '' space = 0 for i in s: if i == '-...
true
03ba66cafbe2196b6e48d1ce65be8ed950e3a37a
CAMILA125/Python
/atividade2MLP.py
UTF-8
3,179
3.609375
4
[]
no_license
# -*- coding: utf-8 -*- """ @author: Bruno """ import math entradas = [[0,0],[0,1],[1,0],[1,1]] pesos = [ [0.0,0.0], # 0 - Neuronio A entradas [0.0,0.0], # 1 - Neuronio B entradas [0.0,0.0] # 2 - Neuronio C entradas ] bias = 0 bias_peso = [0.0,0.0,0.0] # 0 - A / 1 - B / 2 - C tax...
true