hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
118ff67c852ea38f217b5c566e77f4efa9b7fe30 | 9,368 | py | Python | FirmsLocations/Retrieve/density_assignation.py | tgquintela/Firms_locations | 476680cbc3eb1308811633d24810049e215101a0 | [
"MIT"
] | null | null | null | FirmsLocations/Retrieve/density_assignation.py | tgquintela/Firms_locations | 476680cbc3eb1308811633d24810049e215101a0 | [
"MIT"
] | null | null | null | FirmsLocations/Retrieve/density_assignation.py | tgquintela/Firms_locations | 476680cbc3eb1308811633d24810049e215101a0 | [
"MIT"
] | null | null | null |
"""
Assign geographically density value to a points.
"""
from scipy.spatial import KDTree
from scipy.spatial.distance import cdist
from scipy.stats import norm
from scipy.optimize import minimize
import numpy as np
def general_density_assignation(locs, parameters, values=None, locs2=None):
"Density assignation ... | 34.315018 | 79 | 0.570773 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,580 | 0.275406 |
1190f1b038385208afbc477445817bdebba87dc5 | 561 | py | Python | nexus/pylon/sources/specific/biorxiv.py | leoll2/hyperboria | 30a0ae466b290208f690560160ef1f5c16e4a744 | [
"Unlicense"
] | null | null | null | nexus/pylon/sources/specific/biorxiv.py | leoll2/hyperboria | 30a0ae466b290208f690560160ef1f5c16e4a744 | [
"Unlicense"
] | null | null | null | nexus/pylon/sources/specific/biorxiv.py | leoll2/hyperboria | 30a0ae466b290208f690560160ef1f5c16e4a744 | [
"Unlicense"
] | null | null | null | from typing import AsyncIterable
from nexus.pylon.sources.base import (
DoiSource,
PreparedRequest,
)
class BiorxivSource(DoiSource):
base_url = 'https://dx.doi.org'
async def resolve(self) -> AsyncIterable[PreparedRequest]:
async with self.get_resolve_session() as session:
url =... | 28.05 | 84 | 0.616756 | 447 | 0.796791 | 374 | 0.666667 | 0 | 0 | 374 | 0.666667 | 65 | 0.115865 |
1193d717cb8b9aa0587bf651757ef62435cc6b62 | 3,645 | py | Python | addLatLon.py | amnh-sciviz/amnh-time-machine | c75c75c6bd3ee91d81cb4b0181a292de27eab9c8 | [
"MIT"
] | null | null | null | addLatLon.py | amnh-sciviz/amnh-time-machine | c75c75c6bd3ee91d81cb4b0181a292de27eab9c8 | [
"MIT"
] | null | null | null | addLatLon.py | amnh-sciviz/amnh-time-machine | c75c75c6bd3ee91d81cb4b0181a292de27eab9c8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import argparse
from difflib import SequenceMatcher
import os
from pprint import pprint
import sys
import lib.eac_utils as eac
import lib.io_utils as io
# input
parser = argparse.ArgumentParser()
parser.add_argument('-in', dest="INPUT_FILE", default="data/eac_dates.csv", help="File with EAC d... | 35.735294 | 199 | 0.652126 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 893 | 0.244993 |
119493a292813a2fe3956c473600e488537134ab | 502 | py | Python | Turtle/MovingPen.py | Williano/Tutorials | c5fb841ba94783ac3b239dbd2be9d04dd6e8d962 | [
"MIT"
] | null | null | null | Turtle/MovingPen.py | Williano/Tutorials | c5fb841ba94783ac3b239dbd2be9d04dd6e8d962 | [
"MIT"
] | null | null | null | Turtle/MovingPen.py | Williano/Tutorials | c5fb841ba94783ac3b239dbd2be9d04dd6e8d962 | [
"MIT"
] | null | null | null | # Script: MovingPen.py
# Description: This program uses python's turtle graphics module to draw shapes,lines,
# circles and text.
# Programmer: William Kpabitey Kwabla.
# Date: 27.05.17
# Importing the turtle module.
import turtle
# It moves the pen to (0, 50) from (0, 0).
turtle.goto(0, 50)
# It move... | 20.08 | 86 | 0.695219 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 366 | 0.729084 |
11958f77466ed28b0ddf34aab10041bc97b2f55d | 912 | py | Python | Solutions/problem07.py | WalrusCow/euler | b5bfa67c87c7043f521cde32e7212c0fffdbacd9 | [
"MIT"
] | null | null | null | Solutions/problem07.py | WalrusCow/euler | b5bfa67c87c7043f521cde32e7212c0fffdbacd9 | [
"MIT"
] | null | null | null | Solutions/problem07.py | WalrusCow/euler | b5bfa67c87c7043f521cde32e7212c0fffdbacd9 | [
"MIT"
] | null | null | null | # Project Euler Problem 7
# Created on: 2012-06-13
# Created by: William McDonald
import math
import time
# Short list of prime numbers under 20
primeList = [2, 3, 5, 7, 9, 11, 13, 17, 19]
# Returns True if n is prime, otherwise False
def isPrime(n):
prime = True
for i in primeList:
if ... | 24 | 46 | 0.551535 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 208 | 0.22807 |
119622f084f9dfff43411b649a9c89be1e105982 | 1,820 | py | Python | cogs/ban.py | QuentiumYT/QuentiumBot | 1673d24d93f13f464b1175424529c4d58abb5c00 | [
"MIT"
] | 9 | 2019-11-14T10:12:00.000Z | 2021-12-17T13:05:40.000Z | cogs/ban.py | QuentiumYT/QuentiumBot | 1673d24d93f13f464b1175424529c4d58abb5c00 | [
"MIT"
] | null | null | null | cogs/ban.py | QuentiumYT/QuentiumBot | 1673d24d93f13f464b1175424529c4d58abb5c00 | [
"MIT"
] | 4 | 2020-08-20T21:24:52.000Z | 2021-12-17T13:05:17.000Z | import discord
from discord.ext import commands
from QuentiumBot import HandleData, get_translations
# Basic command configs
cmd_name = "ban"
tran = get_translations()
aliases = [] if not tran[cmd_name]["fr"]["aliases"] else tran[cmd_name]["fr"]["aliases"].split("/")
class BanAdminRights(commands.Cog):
"""Ban com... | 36.4 | 100 | 0.637912 | 1,486 | 0.816484 | 0 | 0 | 1,328 | 0.72967 | 1,198 | 0.658242 | 305 | 0.167582 |
1197aab149d31aabbae1ade4691c48988b0c9030 | 778 | py | Python | robotframework-ls/src/robotframework_debug_adapter/listeners.py | anton264/robotframework-lsp | 6f8f89b88ec56b767f6d5e9cf0d3fb58847e5844 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | robotframework-ls/src/robotframework_debug_adapter/listeners.py | anton264/robotframework-lsp | 6f8f89b88ec56b767f6d5e9cf0d3fb58847e5844 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-09-30T15:40:29.000Z | 2021-09-30T15:40:29.000Z | robotframework-ls/src/robotframework_debug_adapter/listeners.py | anton264/robotframework-lsp | 6f8f89b88ec56b767f6d5e9cf0d3fb58847e5844 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | class _Callback(object):
def __init__(self):
self._callbacks = []
def register(self, callback):
self._callbacks.append(callback)
def __call__(self, *args, **kwargs):
for c in self._callbacks:
c(*args, **kwargs)
class DebugListener(object):
ROBOT_LISTENER_API_VERSI... | 24.3125 | 41 | 0.6491 | 774 | 0.994859 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
119816fffb1e07970d7a5eddf0acda8930b0e4b4 | 3,057 | py | Python | tpp_tensorflow/models/semisparse.py | gfrogat/tpp_tensorflow | 711dd8cc0a8155ce6b6e5663afb2331b55748d30 | [
"MIT"
] | null | null | null | tpp_tensorflow/models/semisparse.py | gfrogat/tpp_tensorflow | 711dd8cc0a8155ce6b6e5663afb2331b55748d30 | [
"MIT"
] | null | null | null | tpp_tensorflow/models/semisparse.py | gfrogat/tpp_tensorflow | 711dd8cc0a8155ce6b6e5663afb2331b55748d30 | [
"MIT"
] | null | null | null | from tensorflow.keras import Model, layers, regularizers
class SemiSparseInput(Model):
def __init__(self, params):
super(SemiSparseInput, self).__init__()
# Correctly handle SELU
dropout = layers.AlphaDropout if params.activation == "selu" else layers.Dropout
kernel_init = (
... | 31.515464 | 88 | 0.59928 | 2,997 | 0.980373 | 0 | 0 | 0 | 0 | 0 | 0 | 267 | 0.087341 |
119876ff369ecd32448c59ea7ad56ae2b54cfef2 | 4,628 | py | Python | AT/neo4j_functions.py | seakers/daphne-brain | 1d703d468cd503a21395f986dd72e67b6e556451 | [
"MIT"
] | null | null | null | AT/neo4j_functions.py | seakers/daphne-brain | 1d703d468cd503a21395f986dd72e67b6e556451 | [
"MIT"
] | null | null | null | AT/neo4j_functions.py | seakers/daphne-brain | 1d703d468cd503a21395f986dd72e67b6e556451 | [
"MIT"
] | null | null | null | # Testing for neo4j query functions
from neo4j import GraphDatabase, basic_auth
# setup neo4j database connection
driver = GraphDatabase.driver("bolt://13.58.54.49:7687", auth=basic_auth("neo4j", "goSEAKers!"))
session = driver.session()
# Function that can take the intersection of multiple symptom queries
# Fabricat... | 46.747475 | 177 | 0.642178 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,275 | 0.491573 |
119a0cbab86f26fb6ab15f22092ddf49f71f6f94 | 5,486 | py | Python | build.py | refaim/wots | dad9918c603293982a598fb5d6c73ade1a6080e1 | [
"MIT"
] | 2 | 2018-07-14T19:45:38.000Z | 2019-04-21T07:17:20.000Z | build.py | refaim/wots | dad9918c603293982a598fb5d6c73ade1a6080e1 | [
"MIT"
] | 155 | 2018-07-07T00:33:31.000Z | 2021-08-16T17:55:05.000Z | build.py | refaim/wots | dad9918c603293982a598fb5d6c73ade1a6080e1 | [
"MIT"
] | null | null | null | import datetime
import math
import os
import sys
import PyQt5
import dotenv
from PyInstaller.archive.pyz_crypto import PyiBlockCipher
from PyInstaller.building.api import PYZ, EXE, COLLECT
from PyInstaller.building.build_main import Analysis
from app import version
from app.core.utils import OsUtils, PathUtils
APP_N... | 42.527132 | 158 | 0.693584 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 624 | 0.113744 |
119a349c2ca5822591f4b6677156eec1b27631d0 | 1,939 | py | Python | server/constants.py | chrononyan/ok | 1c83e419dd8d5ef64c1e03a7f8a218e65a9fb7cf | [
"Apache-2.0"
] | 148 | 2018-07-03T02:08:30.000Z | 2022-03-26T04:03:35.000Z | server/constants.py | chrononyan/ok | 1c83e419dd8d5ef64c1e03a7f8a218e65a9fb7cf | [
"Apache-2.0"
] | 856 | 2015-01-10T04:27:20.000Z | 2018-06-27T14:43:23.000Z | server/constants.py | chrononyan/ok | 1c83e419dd8d5ef64c1e03a7f8a218e65a9fb7cf | [
"Apache-2.0"
] | 69 | 2015-01-26T08:06:55.000Z | 2018-06-25T12:46:03.000Z | """App constants"""
import os
STUDENT_ROLE = 'student'
GRADER_ROLE = 'grader'
STAFF_ROLE = 'staff'
INSTRUCTOR_ROLE = 'instructor'
LAB_ASSISTANT_ROLE = 'lab assistant'
ROLE_DISPLAY_NAMES = {
STUDENT_ROLE: 'Student',
GRADER_ROLE: 'Reader',
STAFF_ROLE: 'Teaching Assistant',
INSTRUCTOR_ROLE: 'Instructor',
... | 28.101449 | 89 | 0.684373 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 880 | 0.453842 |
119ba308325a28e7115e3336760ea5459e34bcae | 31,721 | py | Python | SRTG-Scheduler/SRTG-ResultAnalysis/scripts/aperiodic-jobs-resultAnalyzer.py | kiritigowda/RTG-scheduler | 4aa3d66e011e6a0d16e19719f940c5cc0a6559ba | [
"MIT"
] | 2 | 2021-10-15T12:00:51.000Z | 2021-11-23T04:50:58.000Z | SRTG-Scheduler/SRTG-ResultAnalysis/scripts/aperiodic-jobs-resultAnalyzer.py | kiritigowda/RTG-scheduler | 4aa3d66e011e6a0d16e19719f940c5cc0a6559ba | [
"MIT"
] | 45 | 2018-01-24T15:38:11.000Z | 2020-10-31T19:50:19.000Z | SRTG-Scheduler/SRTG-ResultAnalysis/scripts/aperiodic-jobs-resultAnalyzer.py | kiritigowda/RTG-scheduler | 4aa3d66e011e6a0d16e19719f940c5cc0a6559ba | [
"MIT"
] | 2 | 2018-05-23T17:13:44.000Z | 2020-09-18T15:06:17.000Z | # Copyright (c) 2017 - 2020 Kiriti Nagesh Gowda, Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to ... | 49.027821 | 225 | 0.694871 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15,623 | 0.492513 |
119bf6a968d6fb73503071ca0eb21d892d8e76bd | 342 | py | Python | legacy_codes/app/my_exception.py | gomjellie/SoongSiri | 251a8259f47e3f0a7b42faa20ea9223f125a42a2 | [
"MIT"
] | 8 | 2018-09-22T05:29:51.000Z | 2021-11-17T03:23:23.000Z | legacy_codes/app/my_exception.py | gomjellie/SoongSiri | 251a8259f47e3f0a7b42faa20ea9223f125a42a2 | [
"MIT"
] | 7 | 2017-12-30T08:02:32.000Z | 2020-08-26T01:59:20.000Z | legacy_codes/app/my_exception.py | gomjellie/SoongSiri | 251a8259f47e3f0a7b42faa20ea9223f125a42a2 | [
"MIT"
] | 3 | 2018-11-13T14:04:04.000Z | 2019-09-01T18:53:11.000Z |
class FoodNotFound(Exception):
def __init__(self, msg=None):
self.msg = msg
def __str__(self):
return "식단을 불러올 수 없습니다.\n {}".format(self.msg)
class FoodRateDuplicate(Exception):
def __init__(self, msg=None):
self.msg = msg
def __str__(self):
return "이미 평가한 항목입니다.\n ... | 19 | 54 | 0.614035 | 377 | 0.981771 | 0 | 0 | 0 | 0 | 0 | 0 | 84 | 0.21875 |
119cfe73411d8df272a8a84fca4c6e3deff92e8f | 939 | py | Python | estudiantes/funciones.py | tabris2015/intro_python_data_science | 784f0b35988676248c4ba6c7999164dfb51ee631 | [
"MIT"
] | null | null | null | estudiantes/funciones.py | tabris2015/intro_python_data_science | 784f0b35988676248c4ba6c7999164dfb51ee631 | [
"MIT"
] | null | null | null | estudiantes/funciones.py | tabris2015/intro_python_data_science | 784f0b35988676248c4ba6c7999164dfb51ee631 | [
"MIT"
] | null | null | null | def registrar_estudiantes(n):
# registro de datos
estudiantes = []
for i in range(n):
estudiante = {}
print(f'estudiante {i+1}:')
estudiante['nombre'] = input('nombre del estudiante: ')
in_edad = input('edad del estudiante: ')
while not in_edad.isdigit():
... | 31.3 | 64 | 0.57295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 340 | 0.362087 |
119d8e43e77baac65ef5c6b64d016a19f85843ba | 6,741 | py | Python | malaya/_utils/_softmax_class.py | leowmjw/Malaya | 33f39835eca08c238d2dd68aeca3b09c5d0a45ab | [
"MIT"
] | null | null | null | malaya/_utils/_softmax_class.py | leowmjw/Malaya | 33f39835eca08c238d2dd68aeca3b09c5d0a45ab | [
"MIT"
] | null | null | null | malaya/_utils/_softmax_class.py | leowmjw/Malaya | 33f39835eca08c238d2dd68aeca3b09c5d0a45ab | [
"MIT"
] | null | null | null | import sys
import warnings
if not sys.warnoptions:
warnings.simplefilter('ignore')
import json
import os
import pickle
from ._utils import check_file, load_graph, check_available, generate_session
from ..stem import _classification_textcleaning_stemmer
from .._models._sklearn_model import (
BINARY_XGB,
BI... | 30.640909 | 122 | 0.58745 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,408 | 0.208871 |
119ea88acc92144d46ec6203fbc4f95f170a347e | 1,580 | py | Python | src/otest/test_setup.py | rohe/otest | 8983db8abfa63eda4e8a35bbe193ac80793c14bb | [
"Apache-2.0"
] | 2 | 2016-08-26T07:42:19.000Z | 2017-09-06T02:13:02.000Z | src/otest/test_setup.py | rohe/otest | 8983db8abfa63eda4e8a35bbe193ac80793c14bb | [
"Apache-2.0"
] | 3 | 2017-06-15T06:07:18.000Z | 2018-06-28T07:43:21.000Z | src/otest/test_setup.py | rohe/otest | 8983db8abfa63eda4e8a35bbe193ac80793c14bb | [
"Apache-2.0"
] | 5 | 2016-07-22T21:38:40.000Z | 2019-04-05T19:20:23.000Z | from oidctest.op import func
from oidctest.op import oper
from oidctest.op.client import Client
from oidctest.session import SessionHandler
from otest.aus.handling_ph import WebIh
from otest.conf_setup import OP_ORDER
from otest.conversation import Conversation
from otest.events import Events
from otest.flow import Fl... | 34.347826 | 76 | 0.681646 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 93 | 0.058861 |
119efd61f102f9d7b866310597894dc025bd5e5a | 466 | py | Python | AlgoritimoRandomize.py | falluk/algoritimoDeBuscas | 6dbca79ef60f2820f5e81110bc4104bdc46496b1 | [
"MIT"
] | 1 | 2021-07-05T13:24:04.000Z | 2021-07-05T13:24:04.000Z | AlgoritimoRandomize.py | falluk/algoritimoDeBuscas | 6dbca79ef60f2820f5e81110bc4104bdc46496b1 | [
"MIT"
] | null | null | null | AlgoritimoRandomize.py | falluk/algoritimoDeBuscas | 6dbca79ef60f2820f5e81110bc4104bdc46496b1 | [
"MIT"
] | null | null | null | #Criado para randomizar uma lsita de 20mil Colaboradores retornando apenas 1000 colaboradores vários cargos distintos.
import pandas as pd
import random
base = pd.read_excel("usuarios - energisa.xlsx", encoding="ISO-8859-1",error_bad_lines=False)
sort1 = base.sample(15000)
sort2 = sort1.sample(10000)
sort3 = sort2... | 22.190476 | 118 | 0.776824 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 181 | 0.38758 |
11a158752080d596792054d55693dc41df752af9 | 7,625 | py | Python | app.py | Build-Week-2106FT-AirBnB-3/front-end | 0df6f9814387a36002a1aaa8feff1f17fcb30b78 | [
"CC0-1.0"
] | null | null | null | app.py | Build-Week-2106FT-AirBnB-3/front-end | 0df6f9814387a36002a1aaa8feff1f17fcb30b78 | [
"CC0-1.0"
] | 1 | 2021-06-24T00:17:40.000Z | 2021-06-24T00:18:42.000Z | app.py | Build-Week-2106FT-AirBnB-3/pricing | 0df6f9814387a36002a1aaa8feff1f17fcb30b78 | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
# https://towardsdatascience.com/build-a-machine-learning-simulation-tool-with-dash-b3f6fd512ad6
# We start with the import of standard ML librairies
import pandas as pd
import numpy as np
from sklearn.datasets import make_regression
from sklearn.ensemble import RandomForestRegressor
# We ad... | 39.921466 | 114 | 0.6 | 0 | 0 | 0 | 0 | 1,441 | 0.188934 | 0 | 0 | 3,119 | 0.408942 |
11a170a7d9d4be2747fc2f885fdbdea415898a39 | 356 | py | Python | others/python/exceptions/except.py | bt3gl/Resources-Numerical_Methods_for_Physics | 8668215f107230fafd9bdeb0061d353328cf03e8 | [
"Apache-2.0"
] | 17 | 2019-10-28T03:13:07.000Z | 2020-11-21T17:38:06.000Z | others/python/exceptions/except.py | bt3gl/Resources-Numerical_Methods_for_Physics | 8668215f107230fafd9bdeb0061d353328cf03e8 | [
"Apache-2.0"
] | null | null | null | others/python/exceptions/except.py | bt3gl/Resources-Numerical_Methods_for_Physics | 8668215f107230fafd9bdeb0061d353328cf03e8 | [
"Apache-2.0"
] | 5 | 2020-05-09T07:55:32.000Z | 2020-12-12T11:05:42.000Z | # try openning a file for reading
try: f = open("file.txt", "r")
except IOError:
print "I/O Error"
# undefined variable
x = 1.0
try: x + y
except NameError:
print "undefined variable"
# example from tutorial
def this_fails():
x = 1/0
try:
this_fails()
except ZeroDivisionError as detail:
print ... | 14.833333 | 44 | 0.671348 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 146 | 0.410112 |
11a1d2a8f067924755b1bb004f5652117e69edcd | 1,787 | py | Python | balloon_learning_environment/env/gym.py | johannah/balloon-learning-environment | cdb2e582f2b03c41f037bf76142d31611f5e0316 | [
"Apache-2.0"
] | 64 | 2021-11-09T08:49:02.000Z | 2022-03-30T17:33:54.000Z | balloon_learning_environment/env/gym.py | johannah/balloon-learning-environment | cdb2e582f2b03c41f037bf76142d31611f5e0316 | [
"Apache-2.0"
] | null | null | null | balloon_learning_environment/env/gym.py | johannah/balloon-learning-environment | cdb2e582f2b03c41f037bf76142d31611f5e0316 | [
"Apache-2.0"
] | 5 | 2021-11-14T18:56:42.000Z | 2022-03-18T16:22:31.000Z | # coding=utf-8
# Copyright 2022 The Balloon Learning Environment Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 43.585366 | 77 | 0.758254 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,335 | 0.747062 |
11a1e1b730dc4e433d8e1358594ee3d9a8526d1b | 15,181 | py | Python | models/multimodal_transformer.py | XiaoJake/MTTR | c383c5b151e3c97aeb45cd2fb4bf08719016498b | [
"Apache-2.0"
] | 516 | 2021-11-30T03:22:41.000Z | 2022-03-31T19:48:59.000Z | models/multimodal_transformer.py | codwest/MTTR | c383c5b151e3c97aeb45cd2fb4bf08719016498b | [
"Apache-2.0"
] | 15 | 2021-12-07T02:43:24.000Z | 2022-03-27T15:59:32.000Z | models/multimodal_transformer.py | codwest/MTTR | c383c5b151e3c97aeb45cd2fb4bf08719016498b | [
"Apache-2.0"
] | 57 | 2021-11-30T08:49:51.000Z | 2022-03-25T19:41:08.000Z | """
MTTR Multimodal Transformer class.
Modified from DETR https://github.com/facebookresearch/detr
"""
import copy
import os
from typing import Optional
import torch
import torch.nn.functional as F
from torch import nn, Tensor
from einops import rearrange, repeat
from transformers import RobertaModel, RobertaTokenizerF... | 44.259475 | 122 | 0.625585 | 14,237 | 0.937817 | 0 | 0 | 0 | 0 | 0 | 0 | 1,599 | 0.105329 |
11a22b195401a97025bc1265b213cb97ff210032 | 403 | py | Python | docker_sdk_api/shared/helpers/get_model_zip.py | BMW-InnovationLab/BMW-Semantic-Segmentation-Training-GUI | 902f35a7e367e635898f687b16a830db892fbaa5 | [
"Apache-2.0"
] | 20 | 2021-07-13T13:08:57.000Z | 2022-03-29T09:38:00.000Z | docker_sdk_api/shared/helpers/get_model_zip.py | BMW-InnovationLab/BMW-Semantic-Segmentation-Training-GUI | 902f35a7e367e635898f687b16a830db892fbaa5 | [
"Apache-2.0"
] | null | null | null | docker_sdk_api/shared/helpers/get_model_zip.py | BMW-InnovationLab/BMW-Semantic-Segmentation-Training-GUI | 902f35a7e367e635898f687b16a830db892fbaa5 | [
"Apache-2.0"
] | 2 | 2021-07-12T08:42:53.000Z | 2022-03-04T18:41:25.000Z | import os
from typing import Dict
def get_downloadable_zip(folder_path: str) -> Dict[str, str]:
servable_models: Dict[str, str] = {}
for root, dirs, files in os.walk(folder_path):
for directory in dirs:
for f in os.listdir(os.path.join(root, directory)):
if f.endswith(".zip... | 28.785714 | 63 | 0.622829 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.014888 |
11a302e0300bce122a82770aa16b84ca6e8d73b5 | 6,065 | py | Python | groups/views.py | 3crabs/class-book | f5de12be816aa9be889d8413007be8eb4abdf45f | [
"WTFPL"
] | 1 | 2020-11-19T14:49:41.000Z | 2020-11-19T14:49:41.000Z | groups/views.py | 3crabs/class-book | f5de12be816aa9be889d8413007be8eb4abdf45f | [
"WTFPL"
] | null | null | null | groups/views.py | 3crabs/class-book | f5de12be816aa9be889d8413007be8eb4abdf45f | [
"WTFPL"
] | null | null | null | from django.core.mail import EmailMessage
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render
from accounting.models import Attendance, Result
from accounting.templatetags import my_tags
from class_book import settings
from groups.models import Group, Student
from subjects.mo... | 32.433155 | 115 | 0.616983 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 710 | 0.114664 |
11a618f11b6fac52f4355fdfd119636e79cd945a | 1,415 | py | Python | pset_pandas_ext/101problems/solutions/p65.py | mottaquikarim/pydev-psets | 9749e0d216ee0a5c586d0d3013ef481cc21dee27 | [
"MIT"
] | 5 | 2019-04-08T20:05:37.000Z | 2019-12-04T20:48:45.000Z | pset_pandas_ext/101problems/solutions/p65.py | mottaquikarim/pydev-psets | 9749e0d216ee0a5c586d0d3013ef481cc21dee27 | [
"MIT"
] | 8 | 2019-04-15T15:16:05.000Z | 2022-02-12T10:33:32.000Z | pset_pandas_ext/101problems/solutions/p65.py | mottaquikarim/pydev-psets | 9749e0d216ee0a5c586d0d3013ef481cc21dee27 | [
"MIT"
] | 2 | 2019-04-10T00:14:42.000Z | 2020-02-26T20:35:21.000Z | """
66. How to replace both the diagonals of dataframe with 0?
"""
"""
Difficulty Level: L2
"""
"""
Replace both values in both diagonals of df with 0.
"""
"""
Input
"""
"""
df = pd.DataFrame(np.random.randint(1,100, 100).reshape(10, -1))
df
# 0 1 2 3 4 5 6 7 8 9
# 0 11 46 26 44 11 62 18 7... | 27.745098 | 64 | 0.477032 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,255 | 0.886926 |
11a8090bef6d5fb982bc2e421b4aadbc73c27dfc | 3,861 | py | Python | src/tree/tree_builder.py | rpSebastian/LeducPoker | 5bbdf61d885bcb23490410ef871de924c58bbf01 | [
"MIT"
] | 1 | 2020-05-22T15:45:22.000Z | 2020-05-22T15:45:22.000Z | src/tree/tree_builder.py | rpSebastian/LeducPoker | 5bbdf61d885bcb23490410ef871de924c58bbf01 | [
"MIT"
] | null | null | null | src/tree/tree_builder.py | rpSebastian/LeducPoker | 5bbdf61d885bcb23490410ef871de924c58bbf01 | [
"MIT"
] | 1 | 2020-05-31T03:01:42.000Z | 2020-05-31T03:01:42.000Z | from settings import constants
from game import bet_sizing, card_tools, card_to_string
from base import Node
import torch
class PokerTreeBuilder():
def __init__(self):
pass
def build_tree(self, params):
root = Node()
root.street = params.root_node.street
root.bets = params.roo... | 38.227723 | 98 | 0.644911 | 3,700 | 0.958301 | 0 | 0 | 0 | 0 | 0 | 0 | 179 | 0.046361 |
11ab85dad8fb08a5c5eee01b9be2f4e803d8712c | 50,062 | py | Python | src/htsql/core/tr/bind.py | sirex/htsql | 52275f6a584b412c109822d2ed2a5e69ac522cdf | [
"Apache-2.0"
] | null | null | null | src/htsql/core/tr/bind.py | sirex/htsql | 52275f6a584b412c109822d2ed2a5e69ac522cdf | [
"Apache-2.0"
] | null | null | null | src/htsql/core/tr/bind.py | sirex/htsql | 52275f6a584b412c109822d2ed2a5e69ac522cdf | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2006-2013, Prometheus Research, LLC
#
"""
:mod:`htsql.core.tr.bind`
=========================
This module implements the binding process.
"""
from ..util import maybe, listof, tupleof, similar
from ..adapter import Adapter, Protocol, adapt, adapt_many
from ..domain import (Domain, BooleanDomain, ... | 37.028107 | 80 | 0.583716 | 45,036 | 0.899604 | 0 | 0 | 3,281 | 0.065539 | 0 | 0 | 10,942 | 0.218569 |
11ad8fe6bba3193be56826f292aa054b4c5199e3 | 2,226 | py | Python | locuszoom_plotting_service/gwas/tests/factories.py | statgen/locuszoom-hosted | ecfcc5f48fefe2869ab277202a661c2575af6abb | [
"MIT"
] | null | null | null | locuszoom_plotting_service/gwas/tests/factories.py | statgen/locuszoom-hosted | ecfcc5f48fefe2869ab277202a661c2575af6abb | [
"MIT"
] | 14 | 2021-01-01T17:16:23.000Z | 2022-02-28T19:37:28.000Z | locuszoom_plotting_service/gwas/tests/factories.py | statgen/locuszoom-hosted | ecfcc5f48fefe2869ab277202a661c2575af6abb | [
"MIT"
] | null | null | null | import os
import random
from django.db.models import signals
from django.utils import timezone
import factory
from factory.django import DjangoModelFactory
from locuszoom_plotting_service.users.tests.factories import UserFactory
from .. import constants as lz_constants
from .. import models as lz_models
def choose_... | 29.68 | 108 | 0.709344 | 1,632 | 0.733154 | 0 | 0 | 1,098 | 0.493261 | 0 | 0 | 508 | 0.228212 |
11aed6db8dec1d89d1561ef9163cbf9b2aff8920 | 761 | py | Python | utils/api.py | alirzaev/vyatsu-schedule-viber-bot | ff44195742b07c541d67be1e8f4ce0e204cba70b | [
"MIT"
] | 1 | 2020-01-31T16:29:15.000Z | 2020-01-31T16:29:15.000Z | utils/api.py | alirzaev/vyatsu-schedule-viber-bot | ff44195742b07c541d67be1e8f4ce0e204cba70b | [
"MIT"
] | null | null | null | utils/api.py | alirzaev/vyatsu-schedule-viber-bot | ff44195742b07c541d67be1e8f4ce0e204cba70b | [
"MIT"
] | null | null | null | import requests
from os import getenv
from typing import List, Dict
_API_URL = getenv('API_URL')
def get_groups() -> List[Dict]:
response = requests.get(f'{_API_URL}/api/v2/groups/by_faculty')
response.raise_for_status()
return response.json()
def get_season() -> str:
response = requests.get(f'{_... | 21.742857 | 78 | 0.697766 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 165 | 0.21682 |
11b20ebad8eab479fb6fed2be3f7940e76f88665 | 22,860 | py | Python | lib/modeling/torchResNet.py | Min-Sheng/CA_FSIS_Cell | c24750d860a9417b30819c05613282cd74dc517f | [
"MIT"
] | null | null | null | lib/modeling/torchResNet.py | Min-Sheng/CA_FSIS_Cell | c24750d860a9417b30819c05613282cd74dc517f | [
"MIT"
] | 1 | 2021-03-01T09:16:15.000Z | 2021-03-01T09:34:49.000Z | lib/modeling/torchResNet.py | Min-Sheng/CA_FSIS_Cell | c24750d860a9417b30819c05613282cd74dc517f | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import math
import copy
from collections import OrderedDict
import torch.utils.model_zoo as model_zoo
from core.config import cfg
import utils.net as net_utils
from deform.torch_deform_conv.layers import ConvOffset2D
model_urls = {
'resnet50': 'https://s3.amazonaws.com/pytorch/mo... | 38.484848 | 104 | 0.580971 | 12,390 | 0.541995 | 0 | 0 | 0 | 0 | 0 | 0 | 3,694 | 0.161592 |
11b5aaf2858fc133d106e1faff9a6c588ffce900 | 1,530 | py | Python | node_Interface.py | robocol-rem-u/master_msgs | fac49cf34a25c16b01ab6014ac47b60c3c5c14a8 | [
"MIT"
] | null | null | null | node_Interface.py | robocol-rem-u/master_msgs | fac49cf34a25c16b01ab6014ac47b60c3c5c14a8 | [
"MIT"
] | null | null | null | node_Interface.py | robocol-rem-u/master_msgs | fac49cf34a25c16b01ab6014ac47b60c3c5c14a8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
from master_msgs.msg import traction_Orders, imu_Speed, imu_Magnetism, pots, current, rpm, arm_Orders, goal,connection
def node_Interface():
rospy.init_node('node_Interface',anonymous=True)
rospy.Subscriber('topic_Traction_Orders',traction_Orders,traction_Orders_Callback)
... | 29.423077 | 118 | 0.760784 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 235 | 0.153595 |
11b627ad398f9ae3625b734210d1a5d1347b9bf2 | 1,700 | py | Python | pantofola_search/management/commands/_private.py | phingage/pantofola.io | f41036d2e568a45f328e2a7ca81d76a27cd134dc | [
"WTFPL"
] | 1 | 2018-06-09T22:20:00.000Z | 2018-06-09T22:20:00.000Z | pantofola_search/management/commands/_private.py | phingage/pantofola.io | f41036d2e568a45f328e2a7ca81d76a27cd134dc | [
"WTFPL"
] | 4 | 2020-02-11T22:01:16.000Z | 2021-06-10T17:38:56.000Z | pantofola_search/management/commands/_private.py | phingage/pantofola.io | f41036d2e568a45f328e2a7ca81d76a27cd134dc | [
"WTFPL"
] | null | null | null | from pantofola_search.models import *
from pantofola_search.tools.imdb_fetcher import ImdbFetcher
def update_new_movie_info(clean_title, imdb_id, torrent, is_imdb=False):
my_imdb = ImdbFetcher()
if not Movie.objects.filter(pk=imdb_id).exists():
# #[imdb_id,year,max_ratio,[titles[1]]]
movie_inf... | 36.956522 | 78 | 0.648824 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 153 | 0.09 |
11b673d3e56e187a96e8ce75c9577f8cea8df161 | 200 | py | Python | pymtl3/passes/rtlir/structural/__init__.py | kevinyuan/pymtl3 | 5949e6a4acc625c0ccbbb25be3af1d0db683df3c | [
"BSD-3-Clause"
] | 152 | 2020-06-03T02:34:11.000Z | 2022-03-30T04:16:45.000Z | pymtl3/passes/rtlir/structural/__init__.py | kevinyuan/pymtl3 | 5949e6a4acc625c0ccbbb25be3af1d0db683df3c | [
"BSD-3-Clause"
] | 139 | 2019-05-29T00:37:09.000Z | 2020-05-17T16:49:26.000Z | pymtl3/passes/rtlir/structural/__init__.py | kevinyuan/pymtl3 | 5949e6a4acc625c0ccbbb25be3af1d0db683df3c | [
"BSD-3-Clause"
] | 22 | 2020-05-18T13:42:05.000Z | 2022-03-11T08:37:51.000Z | """Expose structural RTLIR generation pass.
PyMTL user should only interact with the passes exposed here.
"""
from .StructuralRTLIRGenL4Pass import StructuralRTLIRGenL4Pass as StructuralRTLIRGenPass
| 33.333333 | 88 | 0.84 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 110 | 0.55 |
11b6a22d0d9d730ae6441343ec296d67f55adf10 | 7,663 | py | Python | ArcLint.py | namur007/ArcLint | b17b39cf7fdfeff144339b6f3494d9120eafde90 | [
"MIT"
] | null | null | null | ArcLint.py | namur007/ArcLint | b17b39cf7fdfeff144339b6f3494d9120eafde90 | [
"MIT"
] | 4 | 2020-07-17T18:11:54.000Z | 2020-07-26T12:34:57.000Z | ArcLint.py | namur007/ArcLint | b17b39cf7fdfeff144339b6f3494d9120eafde90 | [
"MIT"
] | null | null | null | import json
import re
import datetime
import os
import arcpy
regex_flag_dict = {
# 'ASCII' re.A, # this is py3 only so wont work in arcgis desktop
'IGNORECASE': re.I,
'LOCALE': re.L,
"MULTILINE": re.M,
"DOTMATCH": re.S,
"UNICODE": re.U,
"VERBOSE": re.X,
}
def main(json_path, feature, outp... | 27.66426 | 136 | 0.588542 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,086 | 0.272217 |
11b7cee72a017b56ab9f447f74c1610717cfe52e | 8,784 | py | Python | tests/st/ops/gpu/test_scatter_nd_func_op.py | PowerOlive/mindspore | bda20724a94113cedd12c3ed9083141012da1f15 | [
"Apache-2.0"
] | 1 | 2021-12-27T13:42:29.000Z | 2021-12-27T13:42:29.000Z | tests/st/ops/gpu/test_scatter_nd_func_op.py | zimo-geek/mindspore | 665ec683d4af85c71b2a1f0d6829356f2bc0e1ff | [
"Apache-2.0"
] | null | null | null | tests/st/ops/gpu/test_scatter_nd_func_op.py | zimo-geek/mindspore | 665ec683d4af85c71b2a1f0d6829356f2bc0e1ff | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 37.378723 | 86 | 0.612136 | 502 | 0.057149 | 0 | 0 | 6,872 | 0.782332 | 0 | 0 | 918 | 0.104508 |
11b7d8f84ea9074863867abdbc15c4a61c060614 | 1,710 | py | Python | files/persona_dao.py | DaletWolff/Curso_postgresql | a9d716236b1a840f104c98a4982eab9b1ad641ba | [
"Unlicense"
] | null | null | null | files/persona_dao.py | DaletWolff/Curso_postgresql | a9d716236b1a840f104c98a4982eab9b1ad641ba | [
"Unlicense"
] | null | null | null | files/persona_dao.py | DaletWolff/Curso_postgresql | a9d716236b1a840f104c98a4982eab9b1ad641ba | [
"Unlicense"
] | null | null | null | from persona import Persona
from logger_base import log
from cursor import Cursor
class PersonaDAO:
_SELECCIONAR = 'SELECT * FROM persona ORDER BY id_persona'
_INSERTAR = 'INSERT INTO persona(nombre, apellido, email) VALUES(%s, %s, %s)'
_ACTUALIZAR = 'UPDATE persona SET nombre=%s, apellido=%s, ema... | 38 | 92 | 0.612281 | 1,623 | 0.949123 | 0 | 0 | 1,273 | 0.744444 | 0 | 0 | 317 | 0.18538 |
11b95e0f9e7afe8543bf0c3e7be151865cf4b771 | 5,394 | py | Python | tests/serve/mock/end-to-end/opbank/test_opbank.py | dfioravanti/hmt | df79404076ec7acea0cfb12b636d58e3ffc83bc5 | [
"MIT"
] | 25 | 2020-05-14T13:25:42.000Z | 2021-11-09T10:09:27.000Z | tests/serve/mock/end-to-end/opbank/test_opbank.py | dfioravanti/hmt | df79404076ec7acea0cfb12b636d58e3ffc83bc5 | [
"MIT"
] | 19 | 2020-05-05T19:47:41.000Z | 2021-02-05T17:06:53.000Z | tests/serve/mock/end-to-end/opbank/test_opbank.py | dfioravanti/hmt | df79404076ec7acea0cfb12b636d58e3ffc83bc5 | [
"MIT"
] | 6 | 2020-05-16T10:02:48.000Z | 2021-10-04T08:03:49.000Z | import json
import pytest
from tornado.httpclient import AsyncHTTPClient, HTTPRequest
from hmt.serve.mock.log import Log
from hmt.serve.mock.scope import Scope
from hmt.serve.mock.specs import load_specs
from hmt.serve.utils.routing import HeaderRouting
@pytest.fixture
def app(mocking_app):
return mocking_app(
... | 32.493976 | 90 | 0.670931 | 0 | 0 | 3,074 | 0.569892 | 3,332 | 0.617723 | 0 | 0 | 2,710 | 0.50241 |
11ba755db1dbc0aa52b8605bc8949960f9ba11a9 | 346 | py | Python | less3_task5.py | rezapci/Algorithms-with-Python | 5f4faf2d463f33375856f5a5ab525467d303aa24 | [
"MIT"
] | null | null | null | less3_task5.py | rezapci/Algorithms-with-Python | 5f4faf2d463f33375856f5a5ab525467d303aa24 | [
"MIT"
] | null | null | null | less3_task5.py | rezapci/Algorithms-with-Python | 5f4faf2d463f33375856f5a5ab525467d303aa24 | [
"MIT"
] | null | null | null | # Find the maximum negative element in the array.
# Display its value and position in the array.
import random
arr = [random.randint(-50, 50) for _ in range(10)]
print(arr)
num = -50
position = 0
for i in arr:
if i < 0 and i > num:
num = i
print ('The maximum negative element {}, its position: {}'.for... | 19.222222 | 87 | 0.656069 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 146 | 0.421965 |
11bc0b3cb2807ff10941fab0ad8b5ff296d80b41 | 253 | py | Python | pages/wacs.py | irzaip/selevaporum | 05754f2a8152185f550e1135feb94fdc85e4046c | [
"MIT"
] | null | null | null | pages/wacs.py | irzaip/selevaporum | 05754f2a8152185f550e1135feb94fdc85e4046c | [
"MIT"
] | null | null | null | pages/wacs.py | irzaip/selevaporum | 05754f2a8152185f550e1135feb94fdc85e4046c | [
"MIT"
] | null | null | null | import collections
from numpy.core.defchararray import lower
import streamlit as st
import numpy as np
import pandas as pd
from pages import utils
def app():
st.title("WhatApp Customer Service")
st.subheader("Where automation matters") | 25.3 | 44 | 0.754941 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 52 | 0.205534 |
11c058f314fcdf27f630e4e67e934c957629b5a4 | 1,000 | py | Python | pype9/cmd/convert.py | tclose/Pype9 | 23f96c0885fd9df12d9d11ff800f816520e4b17a | [
"MIT"
] | null | null | null | pype9/cmd/convert.py | tclose/Pype9 | 23f96c0885fd9df12d9d11ff800f816520e4b17a | [
"MIT"
] | null | null | null | pype9/cmd/convert.py | tclose/Pype9 | 23f96c0885fd9df12d9d11ff800f816520e4b17a | [
"MIT"
] | 1 | 2021-04-08T12:46:21.000Z | 2021-04-08T12:46:21.000Z | """
Tool to convert 9ML files between different supported formats (e.g. XML_,
JSON_, YAML_) and 9ML versions.
"""
from argparse import ArgumentParser
from pype9.utils.arguments import nineml_document
from pype9.utils.logging import logger
def argparser():
parser = ArgumentParser(prog='pype9 convert',
... | 33.333333 | 77 | 0.664 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 281 | 0.281 |
11c2627f43e4b6eeb9e8f2281dbb147804505bde | 85 | py | Python | test.py | Wuzhiqiang88/myFirstSpider | 6e964d26038e2937b0f060c1ff6d30b092394ee3 | [
"Apache-2.0"
] | 1 | 2018-09-12T07:13:53.000Z | 2018-09-12T07:13:53.000Z | test.py | Wuzhiqiang88/myFirstSpider | 6e964d26038e2937b0f060c1ff6d30b092394ee3 | [
"Apache-2.0"
] | null | null | null | test.py | Wuzhiqiang88/myFirstSpider | 6e964d26038e2937b0f060c1ff6d30b092394ee3 | [
"Apache-2.0"
] | null | null | null | i=0
s=[50]
for i in range(0,10):
print("w%dwww"%i)
s[i]=i
print(s[i]
| 7.727273 | 21 | 0.470588 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.094118 |
11c29c94c567a27034de5cc0c60d69d3debbcc00 | 871 | py | Python | Python_UN_POCO_MAS_AVANZADO.py | FreyderUrbano/Python_Programas | 8a11729d1148c319d8fa145ad18038cc7d63f0d9 | [
"MIT"
] | null | null | null | Python_UN_POCO_MAS_AVANZADO.py | FreyderUrbano/Python_Programas | 8a11729d1148c319d8fa145ad18038cc7d63f0d9 | [
"MIT"
] | null | null | null | Python_UN_POCO_MAS_AVANZADO.py | FreyderUrbano/Python_Programas | 8a11729d1148c319d8fa145ad18038cc7d63f0d9 | [
"MIT"
] | null | null | null | #PYTHON UN POCO MAS AVANZADO METODO DE ABRIR EN CONSOLA
print("PYTHON MAS AVANZADO")
texto = "TEXTO DE PRUEBA"
nombre = "FREYDER"
altura = "2 metros"
year = 2021
#print(f"{texto}--{nombre}--{altura}--{str(year)}")
print(texto + " " +nombre + " "+ altura +" "+ str(year))
#entradas o peticiones por teclado
sitio = i... | 17.078431 | 56 | 0.629162 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 647 | 0.742824 |
11c365d4ccc71a94837656d754364a0fe60f8958 | 3,615 | py | Python | Tools/MakeHDF.py | Kadantte/VideoSuperResolution | 4c86e49d81c7a9bea1fe0780d651afc126768df3 | [
"MIT"
] | 1,447 | 2018-06-04T08:44:07.000Z | 2022-03-29T06:19:10.000Z | Tools/MakeHDF.py | Evergreengyq/VideoSuperResolution | 1d0c54fafaf7a02f0d69408502f90c55f0f76536 | [
"MIT"
] | 96 | 2018-08-29T01:02:45.000Z | 2022-01-12T06:00:01.000Z | Tools/MakeHDF.py | Evergreengyq/VideoSuperResolution | 1d0c54fafaf7a02f0d69408502f90c55f0f76536 | [
"MIT"
] | 307 | 2018-06-26T13:35:54.000Z | 2022-01-21T09:01:54.000Z | # Copyright (c): Wenyi Tang 2017-2019.
# Author: Wenyi Tang
# Email: [email protected]
# Update Date: 2019/4/3 下午5:03
import argparse
import time
from pathlib import Path
import h5py
import numpy as np
import tqdm
from PIL import Image
__all__ = ["gather_videos_vqp", "gather_videos", "print_dataset"]
parser ... | 30.125 | 81 | 0.634302 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 816 | 0.225477 |
11c45856fc39f00ce8b427bda4629a69a7f9c3b7 | 1,480 | py | Python | modules/ddg_appwv_cookies.py | ItWasDNS/DDG-Parser | fd63099df7b93a603b9fe2ae4259c232f0555a65 | [
"MIT"
] | null | null | null | modules/ddg_appwv_cookies.py | ItWasDNS/DDG-Parser | fd63099df7b93a603b9fe2ae4259c232f0555a65 | [
"MIT"
] | null | null | null | modules/ddg_appwv_cookies.py | ItWasDNS/DDG-Parser | fd63099df7b93a603b9fe2ae4259c232f0555a65 | [
"MIT"
] | null | null | null | """
Process 'com.duckduckgo.mobile.android/app_webview/Cookies'
"""
import os
import sqlite3
from modules.helpers.ddg_path_handler import process_directory_paths
query_cookies = """
SELECT
host_key,
path,
name,
value,
creation_utc,
last_access_utc,
expires_utc,
secure,
httponly,
persistent,
... | 25.964912 | 107 | 0.663514 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 620 | 0.418919 |
11c4b04fb594071b02b7ee34e2b0b343fa536a12 | 3,382 | py | Python | scripts/redis_performance_test.py | Robbybp/IDAES-CLC | 5498aeab070afe5f3dc57be4cd198250f0f88ff9 | [
"MIT"
] | null | null | null | scripts/redis_performance_test.py | Robbybp/IDAES-CLC | 5498aeab070afe5f3dc57be4cd198250f0f88ff9 | [
"MIT"
] | 1 | 2021-06-01T23:42:14.000Z | 2021-06-01T23:42:14.000Z | scripts/redis_performance_test.py | Robbybp/IDAES-CLC | 5498aeab070afe5f3dc57be4cd198250f0f88ff9 | [
"MIT"
] | null | null | null | """
A simple and short Redis performance test.
"""
__author__ = 'Dan Gunter <[email protected]>'
__date__ = '8/8/16'
import argparse
import logging
import os
import redis
import subprocess
import sys
import time
_log = logging.getLogger(__name__)
_h = logging.StreamHandler()
_h.setFormatter(logging.Formatter('%(asctim... | 28.661017 | 104 | 0.59521 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 694 | 0.205204 |
11c756cc812aa8aa64b2f69c97b3ae507b530f8b | 1,323 | py | Python | Question-1.py | sowmyamanojna/CS6910-Deep-Learning-Assignment-1 | e46d3a82bdfb61d7527ed3daf9250bb4ce228854 | [
"MIT"
] | null | null | null | Question-1.py | sowmyamanojna/CS6910-Deep-Learning-Assignment-1 | e46d3a82bdfb61d7527ed3daf9250bb4ce228854 | [
"MIT"
] | null | null | null | Question-1.py | sowmyamanojna/CS6910-Deep-Learning-Assignment-1 | e46d3a82bdfb61d7527ed3daf9250bb4ce228854 | [
"MIT"
] | null | null | null | print("Importing packages... ", end="")
##############################################################################
import wandb
import numpy as np
from keras.datasets import fashion_mnist
import matplotlib.pyplot as plt
wandb.init(project="trail-1")
print("Done!")
##################################################... | 35.756757 | 152 | 0.517763 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 583 | 0.440665 |
11c77e0e125890c44783034eeeb3c9b9a0ff0a7d | 1,386 | py | Python | app/api/v1/task.py | coder-yuan/vue-template-api | 135f13d7c32b4a2830366fc0b79a1e2a1eda6923 | [
"MIT"
] | null | null | null | app/api/v1/task.py | coder-yuan/vue-template-api | 135f13d7c32b4a2830366fc0b79a1e2a1eda6923 | [
"MIT"
] | null | null | null | app/api/v1/task.py | coder-yuan/vue-template-api | 135f13d7c32b4a2830366fc0b79a1e2a1eda6923 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Project : icode_flask_be
# @Package : task
# @Author : jackeroo
# @Time : 2019/11/29 5:25 下午
# @File : task.py
# @Contact :
# @Software : PyCharm
# @Desc :
from app.extensions import celery
from flask_jwt_extended import jwt_required
from app.he... | 27.72 | 69 | 0.554113 | 0 | 0 | 0 | 0 | 966 | 0.694964 | 0 | 0 | 517 | 0.371942 |
11c82b11914ac9b51ec458c369a7893fadc1d1d2 | 1,851 | bzl | Python | config/infra/buildkite/deps.bzl | corypaik/labtools | 1d9d75eff40e8bf258e8de6d4377bbea073e109d | [
"Apache-2.0"
] | 1 | 2021-09-16T11:57:35.000Z | 2021-09-16T11:57:35.000Z | config/infra/buildkite/deps.bzl | corypaik/labtools | 1d9d75eff40e8bf258e8de6d4377bbea073e109d | [
"Apache-2.0"
] | null | null | null | config/infra/buildkite/deps.bzl | corypaik/labtools | 1d9d75eff40e8bf258e8de6d4377bbea073e109d | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The LabTools Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 43.046512 | 119 | 0.688817 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,436 | 0.775797 |
11cb6ae52142719479c56b52ce2a6eeaa8a094de | 3,855 | py | Python | Tests/Data/Parabolic/T/3D_3BHEs_array/pre/3bhes.py | jbathmann/ogs | a79e95d7521a841ffebd441a6100562847e03ab5 | [
"BSD-4-Clause"
] | null | null | null | Tests/Data/Parabolic/T/3D_3BHEs_array/pre/3bhes.py | jbathmann/ogs | a79e95d7521a841ffebd441a6100562847e03ab5 | [
"BSD-4-Clause"
] | 1 | 2021-09-02T14:21:33.000Z | 2021-09-02T14:21:33.000Z | Tests/Data/Parabolic/T/3D_3BHEs_array/pre/3bhes.py | jbathmann/ogs | a79e95d7521a841ffebd441a6100562847e03ab5 | [
"BSD-4-Clause"
] | null | null | null | ###
# Copyright (c) 2012-2020, OpenGeoSys Community (http://www.opengeosys.org)
# Distributed under a Modified BSD License.
# See accompanying file LICENSE.txt or
# http://www.opengeosys.org/project/license
###
# Execute this file to generate TESPy network csv files
from tespy import cmp, con, nwk, hlp
from tespy impo... | 29.204545 | 79 | 0.692866 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 960 | 0.249027 |
11cc4762ea46108968ee8aa2c98fc1627da5eca3 | 981 | py | Python | pypy/jit/codegen/ppc/test/test_rgenop.py | camillobruni/pygirl | ddbd442d53061d6ff4af831c1eab153bcc771b5a | [
"MIT"
] | 12 | 2016-01-06T07:10:28.000Z | 2021-05-13T23:02:02.000Z | pypy/jit/codegen/ppc/test/test_rgenop.py | camillobruni/pygirl | ddbd442d53061d6ff4af831c1eab153bcc771b5a | [
"MIT"
] | null | null | null | pypy/jit/codegen/ppc/test/test_rgenop.py | camillobruni/pygirl | ddbd442d53061d6ff4af831c1eab153bcc771b5a | [
"MIT"
] | 2 | 2016-07-29T07:09:50.000Z | 2016-10-16T08:50:26.000Z | import py
from pypy.jit.codegen.ppc.rgenop import RPPCGenOp
from pypy.rpython.lltypesystem import lltype
from pypy.jit.codegen.test.rgenop_tests import AbstractRGenOpTests, FUNC, FUNC2
from ctypes import cast, c_int, c_void_p, CFUNCTYPE
from pypy.jit.codegen.ppc import instruction as insn
# for the individual tests se... | 29.727273 | 79 | 0.755352 | 613 | 0.624873 | 0 | 0 | 0 | 0 | 0 | 0 | 118 | 0.120285 |
11cd2cba6c6fa6a758300d6008e0f69f4e32d609 | 996 | py | Python | app/someapp/views.py | artas728/monitoring-example-prometheus-grafana | 2d72f29c19e8a280eca82ca1f25a7fa88453559c | [
"MIT"
] | null | null | null | app/someapp/views.py | artas728/monitoring-example-prometheus-grafana | 2d72f29c19e8a280eca82ca1f25a7fa88453559c | [
"MIT"
] | null | null | null | app/someapp/views.py | artas728/monitoring-example-prometheus-grafana | 2d72f29c19e8a280eca82ca1f25a7fa88453559c | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.views.decorators.csrf import csrf_exempt
from django.http import JsonResponse
from .models import TestModel
import json
import redis
import time
redis_cli = redis.Redis(host='127.0.0.1', port=6379, db=0)
@csrf_exempt
def save_to_redis(request):
data = json.loads(req... | 29.294118 | 73 | 0.638554 | 0 | 0 | 0 | 0 | 735 | 0.737952 | 0 | 0 | 136 | 0.136546 |
11cf52ea9a3f1fafc7387cfc0418073a1858bb56 | 1,114 | py | Python | scripts/feedforwardness_algo_compare.py | neurodata/maggot_connectome | 7a1d5dcf3a01c0d60e287efeac6b50f7ccb29cdf | [
"MIT"
] | 1 | 2021-01-20T00:37:31.000Z | 2021-01-20T00:37:31.000Z | scripts/feedforwardness_algo_compare.py | neurodata/maggot_connectome | 7a1d5dcf3a01c0d60e287efeac6b50f7ccb29cdf | [
"MIT"
] | 17 | 2021-03-03T14:48:54.000Z | 2021-09-08T15:52:50.000Z | scripts/feedforwardness_algo_compare.py | neurodata/maggot_connectome | 7a1d5dcf3a01c0d60e287efeac6b50f7ccb29cdf | [
"MIT"
] | 2 | 2021-03-05T12:23:20.000Z | 2021-03-29T11:49:53.000Z | #%% [markdown]
# # Comparing approaches to feedforwardness ordering
# For evaluating feedforwardness, we have:
# - 4 networks
# - Axo-dendritic (AD)
# - Axo-axonic (AA)
# - Dendro-dendritic (DD)
# - Dendro-axonic (DA)
# - 4+ algorithms for finding an ordering
# - Signal flow (SF)
# - Spring rank (SR)
... | 29.315789 | 85 | 0.672352 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,077 | 0.966786 |
11d1192c076a5c79df7f15736899d5d72fa6cb5f | 1,401 | py | Python | NewEventReporter/blockmanager/blockmanager.py | Deofex/GETNFTBOTV3 | 0b8f1a77925b8f87224b2eaae93560e154b881b8 | [
"MIT"
] | null | null | null | NewEventReporter/blockmanager/blockmanager.py | Deofex/GETNFTBOTV3 | 0b8f1a77925b8f87224b2eaae93560e154b881b8 | [
"MIT"
] | null | null | null | NewEventReporter/blockmanager/blockmanager.py | Deofex/GETNFTBOTV3 | 0b8f1a77925b8f87224b2eaae93560e154b881b8 | [
"MIT"
] | null | null | null | import logging
import json
import os
# Initialize logger
logger = logging.getLogger(__name__)
class BlockManager():
def __init__(self, config, processedblock=0):
logger.info('Initialize Block Manager')
self.processedblock = int(processedblock)
self.config = config
if os.path.isfile... | 31.133333 | 72 | 0.660243 | 1,097 | 0.783012 | 0 | 0 | 0 | 0 | 0 | 0 | 248 | 0.177016 |
11d3d683bc5376ecd600cfbd620489e72ca787ca | 5,299 | py | Python | nmf_eval.py | logan-wright/INMF | 611ccdfd4608ec37629975d04e013ab97e05ff31 | [
"Apache-2.0"
] | 2 | 2017-06-16T19:18:53.000Z | 2019-04-18T02:11:45.000Z | nmf_eval.py | logan-wright/INMF | 611ccdfd4608ec37629975d04e013ab97e05ff31 | [
"Apache-2.0"
] | null | null | null | nmf_eval.py | logan-wright/INMF | 611ccdfd4608ec37629975d04e013ab97e05ff31 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 23 20:35:49 2017
@author: wrightad
"""
import numpy as N
import matplotlib.pyplot as plt
def rmse(v1,v2):
'''
rmse(v1,v2) - Calculates the root mean square error between two vectors
Version 1.0
Created On: Apr 17, 2017
Last Mo... | 32.509202 | 150 | 0.60351 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,857 | 0.727324 |
11d4d6356bac4be3d9c387ca7446a41aec22d1ea | 89 | py | Python | navedex/apps.py | SousaPedro11/navedex-api | f9b2bc0284ebf27de368ece718434a94704c3876 | [
"MIT"
] | null | null | null | navedex/apps.py | SousaPedro11/navedex-api | f9b2bc0284ebf27de368ece718434a94704c3876 | [
"MIT"
] | null | null | null | navedex/apps.py | SousaPedro11/navedex-api | f9b2bc0284ebf27de368ece718434a94704c3876 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class NavedexConfig(AppConfig):
name = 'navedex'
| 14.833333 | 33 | 0.752809 | 52 | 0.58427 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.101124 |
11d5570c1f5104f2732b1bf852cd1144b65ea155 | 61 | py | Python | fastISM/__init__.py | kundajelab/fastISM | 1573feccba1ad5d9f1cee508f5bb03c4aa09bb2b | [
"MIT"
] | 12 | 2020-09-20T17:03:48.000Z | 2022-03-16T06:51:52.000Z | fastISM/__init__.py | kundajelab/fastISM | 1573feccba1ad5d9f1cee508f5bb03c4aa09bb2b | [
"MIT"
] | 5 | 2020-10-24T20:43:45.000Z | 2022-02-25T19:40:47.000Z | fastISM/__init__.py | kundajelab/fastISM | 1573feccba1ad5d9f1cee508f5bb03c4aa09bb2b | [
"MIT"
] | 2 | 2020-10-14T05:18:55.000Z | 2022-02-21T07:34:14.000Z | from .fast_ism import FastISM
from .ism_base import NaiveISM
| 20.333333 | 30 | 0.836066 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
11d7cc28fca1672a8acd01df3e20ebc2577f0edc | 3,127 | py | Python | dipy/reconst/tests/test_odf.py | Garyfallidis/dipy | 4341b734995d6f51ac9c16df26a7de00c46f57ef | [
"BSD-3-Clause"
] | 3 | 2015-07-31T20:43:18.000Z | 2019-07-26T13:58:07.000Z | dipy/reconst/tests/test_odf.py | Garyfallidis/dipy | 4341b734995d6f51ac9c16df26a7de00c46f57ef | [
"BSD-3-Clause"
] | 9 | 2015-05-13T17:44:42.000Z | 2018-05-27T20:09:55.000Z | dipy/reconst/tests/test_odf.py | Garyfallidis/dipy | 4341b734995d6f51ac9c16df26a7de00c46f57ef | [
"BSD-3-Clause"
] | 3 | 2016-08-05T22:43:16.000Z | 2017-06-23T18:35:13.000Z | import numpy as np
from numpy.testing import assert_array_equal
from ..odf import OdfFit, OdfModel, gfa
from dipy.core.triangle_subdivide import (create_half_unit_sphere,
disperse_charges)
from nose.tools import (assert_almost_equal, assert_equal, assert_raises,
assert_true)
class SimpleOdf... | 37.674699 | 73 | 0.688839 | 1,022 | 0.326831 | 0 | 0 | 0 | 0 | 0 | 0 | 76 | 0.024304 |
11d8b360dafd771af3d50fb23f126c256bc27cc5 | 423 | py | Python | recieve.py | RyuYamamoto/inter-process-communication-py | 377c73833f230ba1132006c2cda86decd3580a5b | [
"MIT"
] | null | null | null | recieve.py | RyuYamamoto/inter-process-communication-py | 377c73833f230ba1132006c2cda86decd3580a5b | [
"MIT"
] | null | null | null | recieve.py | RyuYamamoto/inter-process-communication-py | 377c73833f230ba1132006c2cda86decd3580a5b | [
"MIT"
] | null | null | null | import socket
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.bind(('127.0.0.1', 50007))
s.listen(1)
while True:
conn, addr = s.accept()
with conn:
while True:
data = conn.recv(1024)
if not data:
break
... | 28.2 | 61 | 0.486998 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.101655 |
11dc5601e32f2a14e2e6dbd6c443d6cb0fdbc322 | 4,503 | py | Python | utils.py | bbpp222006/elec_nose_plus | d79faa47d3fbb63c697501dd521e834bcc8e4814 | [
"MIT"
] | 1 | 2021-04-08T04:17:04.000Z | 2021-04-08T04:17:04.000Z | utils.py | bbpp222006/elec_nose_plus | d79faa47d3fbb63c697501dd521e834bcc8e4814 | [
"MIT"
] | null | null | null | utils.py | bbpp222006/elec_nose_plus | d79faa47d3fbb63c697501dd521e834bcc8e4814 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# encoding: utf-8
#!/usr/bin/python
# encoding: utf-8
import torch
import torch.nn as nn
from torch.autograd import Variable
import collections
from tqdm import tqdm
import numpy as np
import cv2
import os
import random
from sklearn.cluster import KMeans
import matplotlib.pyplot as plt
class strL... | 27.457317 | 143 | 0.584055 | 2,425 | 0.531682 | 0 | 0 | 0 | 0 | 0 | 0 | 1,562 | 0.342469 |
11dc7d7484bc78800544b03df7488f722be7a5ea | 2,729 | py | Python | down.py | pcahan1/CellNet_Cloud | a228953946b81ccb304fbd068e33766e134103b6 | [
"MIT"
] | 1 | 2020-11-13T10:53:27.000Z | 2020-11-13T10:53:27.000Z | down.py | pcahan1/CellNet_Cloud | a228953946b81ccb304fbd068e33766e134103b6 | [
"MIT"
] | 2 | 2020-06-28T18:17:59.000Z | 2020-12-18T14:11:29.000Z | down.py | pcahan1/CellNet_Cloud | a228953946b81ccb304fbd068e33766e134103b6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import division
import random
import argparse
import os
parser = argparse.ArgumentParser()
parser.add_argument("input", help="input FASTQ Directory")
parser.add_argument("-n", "--number", type=int, help="number of reads to sample")
args = parser.parse_args()
random.seed(12)
if ... | 35.907895 | 118 | 0.629901 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 946 | 0.346647 |
11dce67a3e4c4459fb478df3826b5f61db5fbe5f | 777 | py | Python | Cms/Dtcms/apps/areas/views.py | Highsir/cms | 2d820212227ad2760cd762873365c0df0604c730 | [
"MIT"
] | null | null | null | Cms/Dtcms/apps/areas/views.py | Highsir/cms | 2d820212227ad2760cd762873365c0df0604c730 | [
"MIT"
] | null | null | null | Cms/Dtcms/apps/areas/views.py | Highsir/cms | 2d820212227ad2760cd762873365c0df0604c730 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from rest_framework.viewsets import ReadOnlyModelViewSet, ModelViewSet
from areas.models import Area
from areas.serializers import AreaSerializer, SubAreaSerializer
class AreasViewSet(ModelViewSet):
"""
行政区划信息
"""
pagination_class = None # 区划信息不分页
queryset = A... | 22.2 | 70 | 0.6139 | 652 | 0.759022 | 0 | 0 | 0 | 0 | 0 | 0 | 205 | 0.23865 |
11dd785ec5b8ae06d2da8209269f7b856ed4f908 | 173 | py | Python | 01-logica-de-programacao-e-algoritmos/Aula 03/aula03-exemplo03.py | rafaelbarretomg/Uninter | 1f84b0103263177122663e991db3a8aeb106a959 | [
"MIT"
] | null | null | null | 01-logica-de-programacao-e-algoritmos/Aula 03/aula03-exemplo03.py | rafaelbarretomg/Uninter | 1f84b0103263177122663e991db3a8aeb106a959 | [
"MIT"
] | null | null | null | 01-logica-de-programacao-e-algoritmos/Aula 03/aula03-exemplo03.py | rafaelbarretomg/Uninter | 1f84b0103263177122663e991db3a8aeb106a959 | [
"MIT"
] | null | null | null | # par ou impar ( condicional simples)
x = int(input('Digite um valor inteiro: '))
if (x % 2 == 0):
print('O numero é par!')
if(x % 2 == 1):
print('O numero é impar') | 28.833333 | 43 | 0.583815 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 101 | 0.577143 |
11ded52efac2b1e7adb5a0379b064cebcf41d701 | 900 | py | Python | zeta_python_sdk/oracle_utils.py | prettyirrelevant/zeta-python-sdk | 536967259c89d380b8853b1cfd0621c50143b8b9 | [
"Apache-2.0"
] | 2 | 2022-03-02T04:05:07.000Z | 2022-03-10T11:49:37.000Z | zeta_python_sdk/oracle_utils.py | prettyirrelevant/zeta-python-sdk | 536967259c89d380b8853b1cfd0621c50143b8b9 | [
"Apache-2.0"
] | null | null | null | zeta_python_sdk/oracle_utils.py | prettyirrelevant/zeta-python-sdk | 536967259c89d380b8853b1cfd0621c50143b8b9 | [
"Apache-2.0"
] | null | null | null | import math
from .exceptions import OutOfBoundsException
def ERR_BUFFER_OUT_OF_BOUNDS():
return OutOfBoundsException()
def ERR_INVALID_ARG_TYPE(name: str, expected: str, actual):
return Exception(f'The "{name}" argument must be of type {expected}. Received {actual}')
def ERR_OUT_OF_RANGE(string: str, ran... | 26.470588 | 94 | 0.684444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 220 | 0.244444 |
11deda09dc4cd77f3a703e78c0ad5fb515e8de96 | 3,507 | py | Python | CSR/utility.py | MoreNiceJay/CAmanager_web | 29c6e35b9b1b9e8d851b2825df18e34699f6c5d2 | [
"bzip2-1.0.6"
] | null | null | null | CSR/utility.py | MoreNiceJay/CAmanager_web | 29c6e35b9b1b9e8d851b2825df18e34699f6c5d2 | [
"bzip2-1.0.6"
] | 3 | 2020-02-11T23:59:34.000Z | 2021-06-10T21:19:16.000Z | CSR/utility.py | MoreNiceJay/CAmanager_web | 29c6e35b9b1b9e8d851b2825df18e34699f6c5d2 | [
"bzip2-1.0.6"
] | null | null | null | from django.shortcuts import render
import sys, json, random, hashlib, calendar,time, datetime, os, random
import ast
from cryptography.fernet import Fernet
from django.shortcuts import redirect
from django.http import Http404, HttpResponse
import json
from cryptography.hazmat.primitives.serialization import Encoding, ... | 34.722772 | 115 | 0.741374 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 163 | 0.046478 |
11df93a40b853400f38b4c489077ebc7674cd549 | 51,584 | py | Python | uctp_ufabc/src/uctp.py | luizfmgarcia/uctp_ufabc | 2342f5431e258a4feffdf4e7931344a9d03a8f9c | [
"MIT"
] | null | null | null | uctp_ufabc/src/uctp.py | luizfmgarcia/uctp_ufabc | 2342f5431e258a4feffdf4e7931344a9d03a8f9c | [
"MIT"
] | 6 | 2018-10-30T00:37:20.000Z | 2019-07-23T00:23:18.000Z | uctp_ufabc/src/uctp.py | luizfmgarcia/uctp_ufabc | 2342f5431e258a4feffdf4e7931344a9d03a8f9c | [
"MIT"
] | 1 | 2019-06-06T00:54:13.000Z | 2019-06-06T00:54:13.000Z | # UCTP Main Methods
import objects
import ioData
import random
# Set '1' to allow, during the run, the print on terminal of some steps
printSteps = 0
#==============================================================================================================
# Create the first generation of solutions
def start(s... | 53.015416 | 165 | 0.615462 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 21,252 | 0.411988 |
11e06d5dd0202783c3e0b55b6bc21794e4419ef3 | 840 | py | Python | tests/ManualLoggerTests.py | velexio/pyLegos | 64d3622f2b6d78a02b171e0438a0224a951d2644 | [
"MIT"
] | null | null | null | tests/ManualLoggerTests.py | velexio/pyLegos | 64d3622f2b6d78a02b171e0438a0224a951d2644 | [
"MIT"
] | 2 | 2016-11-23T00:36:34.000Z | 2016-11-23T00:39:08.000Z | tests/ManualLoggerTests.py | velexio/pyLegos | 64d3622f2b6d78a02b171e0438a0224a951d2644 | [
"MIT"
] | null | null | null |
from pylegos import LogFactory
def consoleOnlyTest():
logFactory = LogFactory()
logLevel = logFactory.LogLevel.INFO
log = logFactory.getConsoleLogger()
log.debug('This is a console debug message')
log.info('This is an console info message')
log.warn('This is a warning message')
log.error... | 25.454545 | 90 | 0.703571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 321 | 0.382143 |
11e388ebd565f092940b5ad2ddba87b868dac5de | 3,171 | py | Python | HyperV/WS2012R2/stress/StorVSCIOZoneTest.py | microsoft/FreeBSD-Test-Automation | e96a84054d771ece83908299d37e3c02a19f98b3 | [
"Apache-2.0"
] | 1 | 2020-01-16T08:45:59.000Z | 2020-01-16T08:45:59.000Z | HyperV/WS2012R2/stress/StorVSCIOZoneTest.py | LIS/FreeBSD-Test-Automation | e96a84054d771ece83908299d37e3c02a19f98b3 | [
"Apache-2.0"
] | null | null | null | HyperV/WS2012R2/stress/StorVSCIOZoneTest.py | LIS/FreeBSD-Test-Automation | e96a84054d771ece83908299d37e3c02a19f98b3 | [
"Apache-2.0"
] | 1 | 2021-08-03T00:22:40.000Z | 2021-08-03T00:22:40.000Z | #!/usr/bin/env python
import sys
import os
import time
import test_class
import subprocess
class StorVSCIOZoneTest(test_class.TestClass):
def _set_up_vm(self, vm_name, args):
# this piece of code will be executed first thing after the VM is
# booted up
args['working_dir'] = self._test_pa... | 32.030303 | 82 | 0.561337 | 3,074 | 0.96941 | 0 | 0 | 0 | 0 | 0 | 0 | 1,086 | 0.342479 |
11e3f9c5f47a0f678f4c4be381a8ca3e9eaec6d2 | 16,809 | py | Python | LDDMM_Python/lddmm_python/lib/plotly/colors.py | tt6746690/lddmm-ot | 98e45d44969221b0fc8206560d9b7a655ef7e137 | [
"MIT"
] | 48 | 2017-08-04T03:30:22.000Z | 2022-03-09T03:24:11.000Z | LDDMM_Python/lddmm_python/lib/plotly/colors.py | hushunbo/lddmm-ot | 5af26fe32ae440c598ed403ce2876e98d6e1c692 | [
"MIT"
] | null | null | null | LDDMM_Python/lddmm_python/lib/plotly/colors.py | hushunbo/lddmm-ot | 5af26fe32ae440c598ed403ce2876e98d6e1c692 | [
"MIT"
] | 15 | 2017-09-30T18:55:48.000Z | 2021-04-27T18:27:55.000Z | """
colors
=====
Functions that manipulate colors and arrays of colors
There are three basic types of color types: rgb, hex and tuple:
rgb - An rgb color is a string of the form 'rgb(a,b,c)' where a, b and c are
floats between 0 and 255 inclusive.
hex - A hex color is a string of the form '#xxxxxx' where each x is ... | 32.638835 | 77 | 0.55268 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,818 | 0.405616 |
11e3feaa8eddda799c32e0dc2f9c36ee4b41ba9c | 420 | py | Python | nonebot/consts.py | he0119/nonebot2 | bd7ee0a1bafc0ea7a7501ba37541349d4a81b73e | [
"MIT"
] | 1 | 2022-01-26T12:52:33.000Z | 2022-01-26T12:52:33.000Z | nonebot/consts.py | he0119/nonebot2 | bd7ee0a1bafc0ea7a7501ba37541349d4a81b73e | [
"MIT"
] | null | null | null | nonebot/consts.py | he0119/nonebot2 | bd7ee0a1bafc0ea7a7501ba37541349d4a81b73e | [
"MIT"
] | null | null | null | # used by Matcher
RECEIVE_KEY = "_receive_{id}"
LAST_RECEIVE_KEY = "_last_receive"
ARG_KEY = "{key}"
REJECT_TARGET = "_current_target"
REJECT_CACHE_TARGET = "_next_target"
# used by Rule
PREFIX_KEY = "_prefix"
CMD_KEY = "command"
RAW_CMD_KEY = "raw_command"
CMD_ARG_KEY = "command_arg"
SHELL_ARGS = "_args"
SHELL_ARGV... | 20 | 36 | 0.757143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 199 | 0.47381 |
11e42e8d7b995de0658689f4a01d37ca6d28aa0b | 2,124 | py | Python | todo/views.py | haidoro/TODO_lesson | fa0b92eb5d6f05ee15900dcc407e1ae3451fee5b | [
"CECILL-B"
] | null | null | null | todo/views.py | haidoro/TODO_lesson | fa0b92eb5d6f05ee15900dcc407e1ae3451fee5b | [
"CECILL-B"
] | null | null | null | todo/views.py | haidoro/TODO_lesson | fa0b92eb5d6f05ee15900dcc407e1ae3451fee5b | [
"CECILL-B"
] | null | null | null | from django.shortcuts import render, redirect
from django.contrib.auth.models import User
from django.db import IntegrityError
from django.contrib.auth import authenticate, login, logout
from .models import TodoModel
from django.views.generic import ListView, DetailView, CreateView, DeleteView, UpdateView
from django.u... | 29.5 | 89 | 0.664313 | 741 | 0.343373 | 0 | 0 | 0 | 0 | 0 | 0 | 407 | 0.188601 |
11e827caf9a2f6b79a2d0287af4086e1ef14f2b8 | 269 | py | Python | bindings/kepler.gl-jupyter/keplergl/__init__.py | sw1227/kepler.gl | 14c35fc048a745faab0c6770cab7a4625ccedda3 | [
"MIT"
] | 4,297 | 2019-05-04T01:29:14.000Z | 2022-03-31T19:28:10.000Z | bindings/kepler.gl-jupyter/keplergl/__init__.py | sw1227/kepler.gl | 14c35fc048a745faab0c6770cab7a4625ccedda3 | [
"MIT"
] | 968 | 2019-05-05T16:13:03.000Z | 2022-03-30T13:11:31.000Z | bindings/kepler.gl-jupyter/keplergl/__init__.py | sw1227/kepler.gl | 14c35fc048a745faab0c6770cab7a4625ccedda3 | [
"MIT"
] | 1,082 | 2019-05-04T15:55:24.000Z | 2022-03-30T16:27:53.000Z | from ._version import version_info, __version__
from .keplergl import *
def _jupyter_nbextension_paths():
return [{
'section': 'notebook',
'src': 'static',
'dest': 'keplergl-jupyter',
'require': 'keplergl-jupyter/extension'
}]
| 22.416667 | 47 | 0.624535 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 93 | 0.345725 |
11ed16385a989b7c743480e1ee477feb796f62cc | 9,845 | py | Python | iaso/tests/api/test_token.py | ekhalilbsq/iaso | e6400c52aeb4f67ce1ca83b03efa3cb11ef235ee | [
"MIT"
] | 29 | 2020-12-26T07:22:19.000Z | 2022-03-07T13:40:09.000Z | iaso/tests/api/test_token.py | ekhalilbsq/iaso | e6400c52aeb4f67ce1ca83b03efa3cb11ef235ee | [
"MIT"
] | 150 | 2020-11-09T15:03:27.000Z | 2022-03-07T15:36:07.000Z | iaso/tests/api/test_token.py | ekhalilbsq/iaso | e6400c52aeb4f67ce1ca83b03efa3cb11ef235ee | [
"MIT"
] | 4 | 2020-11-09T10:38:13.000Z | 2021-10-04T09:42:47.000Z | from django.test import tag
from django.core.files import File
from unittest import mock
from iaso import models as m
from iaso.test import APITestCase
class TokenAPITestCase(APITestCase):
@classmethod
def setUpTestData(cls):
data_source = m.DataSource.objects.create(name="counsil")
version ... | 40.020325 | 159 | 0.622854 | 9,689 | 0.984154 | 0 | 0 | 1,776 | 0.180396 | 0 | 0 | 3,377 | 0.343017 |
11f08a8bd257b57737ab450a04da370a5b819540 | 302 | py | Python | core/shortname.py | huioo/tornadoWeb | 001efbae9815b30d8a0c0b4ba8819cc711b99dc4 | [
"Apache-2.0"
] | null | null | null | core/shortname.py | huioo/tornadoWeb | 001efbae9815b30d8a0c0b4ba8819cc711b99dc4 | [
"Apache-2.0"
] | null | null | null | core/shortname.py | huioo/tornadoWeb | 001efbae9815b30d8a0c0b4ba8819cc711b99dc4 | [
"Apache-2.0"
] | null | null | null | import world
import api.captcha.captcha_phone
from api.token.jwt_token import JWTToken
"""
Django 的 shortcuts.py
"""
world_instance = world.World.instance()
redis_server = world_instance.redis
captcha_manager = api.captcha.captcha_phone.CaptchaPhone(redis_server)
jwt_cli = JWTToken()
import django.db | 25.166667 | 70 | 0.817881 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.101974 |
11f229b9297d3ad1a65bef9c394df841a9ccc992 | 6,552 | py | Python | interpro.py | TAMU-CPT/blast-db-download | 53261f08d1f9193c4f538fa90983a465502190a9 | [
"BSD-3-Clause"
] | null | null | null | interpro.py | TAMU-CPT/blast-db-download | 53261f08d1f9193c4f538fa90983a465502190a9 | [
"BSD-3-Clause"
] | 3 | 2017-09-15T18:58:21.000Z | 2020-03-24T19:11:16.000Z | interpro.py | TAMU-CPT/blast-db-download | 53261f08d1f9193c4f538fa90983a465502190a9 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import os
import sys
import time
import datetime
import logging
import subprocess
logging.basicConfig(level=logging.INFO)
log = logging.getLogger('dl')
NOW = datetime.datetime.now()
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
DOWNLOAD_ROOT = os.getcwd()
VERSION = '5.22-61.0'
PANTHER... | 36.808989 | 144 | 0.6308 | 2,489 | 0.379884 | 0 | 0 | 0 | 0 | 0 | 0 | 1,712 | 0.261294 |
11f2ee6d545351fbf6460813569b0d154e97b751 | 2,572 | py | Python | modules/stat/agd_stat.py | epfl-dcsl/persona-orig | d94a8b60f07622bb61736127ff328329c7b131a9 | [
"Apache-2.0"
] | null | null | null | modules/stat/agd_stat.py | epfl-dcsl/persona-orig | d94a8b60f07622bb61736127ff328329c7b131a9 | [
"Apache-2.0"
] | null | null | null | modules/stat/agd_stat.py | epfl-dcsl/persona-orig | d94a8b60f07622bb61736127ff328329c7b131a9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 École Polytechnique Fédérale de Lausanne. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | 35.232877 | 83 | 0.651633 | 1,448 | 0.56233 | 0 | 0 | 0 | 0 | 0 | 0 | 1,186 | 0.460583 |
11f3026c5b723ebaca4c3ade5e133a02d8fccef0 | 6,423 | py | Python | Developing.../main01.py | MuhikaThomas/Pro-forma | da97d9a6581f4dfbd06fe4a0db1128ebb7472d81 | [
"MIT"
] | null | null | null | Developing.../main01.py | MuhikaThomas/Pro-forma | da97d9a6581f4dfbd06fe4a0db1128ebb7472d81 | [
"MIT"
] | null | null | null | Developing.../main01.py | MuhikaThomas/Pro-forma | da97d9a6581f4dfbd06fe4a0db1128ebb7472d81 | [
"MIT"
] | null | null | null | import kivy
from kivy.app import App
from kivy.uix.tabbedpanel import TabbedPanelHeader
from kivy.uix.tabbedpanel import TabbedPanel
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.scrollview import ScrollView
from kivy.uix.gridlayout import GridLayout
from kivy.uix.textinput import TextInput
from kivy.uix.... | 47.932836 | 156 | 0.717422 | 5,906 | 0.919508 | 0 | 0 | 0 | 0 | 0 | 0 | 1,605 | 0.249883 |
11f30bdb0ea58245a57190b0de64ce5ae30b036d | 1,943 | py | Python | day8/day8.py | jwhitex/AdventOfCode2018 | e552185f7d6413ccdad824911c66a6590e8de9bb | [
"MIT"
] | null | null | null | day8/day8.py | jwhitex/AdventOfCode2018 | e552185f7d6413ccdad824911c66a6590e8de9bb | [
"MIT"
] | null | null | null | day8/day8.py | jwhitex/AdventOfCode2018 | e552185f7d6413ccdad824911c66a6590e8de9bb | [
"MIT"
] | null | null | null | import itertools
from io import StringIO
from queue import LifoQueue
inputs = "2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2"
#data = [int(v) for v in StringIO(inputs).read().split(' ')]
data = [int(v) for v in open("day8.input").read().split(' ')]
def parse_packet(idata, lifoq_children, tc_metadata):
if not lifoq_childre... | 30.359375 | 66 | 0.5965 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 303 | 0.155944 |
11f3952caf0eac585e166a957bfe31975eafdc39 | 2,971 | py | Python | dataset_utils/roi.py | kocurvik/retinanet_traffic_3D | 592ceac767750c65bb3d6678b36e6880a7bb0403 | [
"Apache-2.0"
] | 12 | 2021-04-06T00:50:41.000Z | 2022-03-23T03:27:02.000Z | dataset_utils/roi.py | kocurvik/retinanet_traffic_3D | 592ceac767750c65bb3d6678b36e6880a7bb0403 | [
"Apache-2.0"
] | 7 | 2021-07-13T12:47:41.000Z | 2022-03-05T15:08:51.000Z | dataset_utils/roi.py | kocurvik/retinanet_traffic_3D | 592ceac767750c65bb3d6678b36e6880a7bb0403 | [
"Apache-2.0"
] | 4 | 2021-07-15T12:22:06.000Z | 2022-03-01T03:12:36.000Z | import json
import os
import cv2
import numpy as np
from dataset_utils.geometry import computeCameraCalibration
def line_to_point(p1, p2, p3):
return np.abs(np.cross(p2 - p1, p3 - p1, axis=2) / np.linalg.norm(p2 - p1, axis=2))
def get_pts(vid_dir, json_path):
video_path = os.path.join(vid_dir, 'video.avi')... | 32.648352 | 126 | 0.582969 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 753 | 0.25345 |
11f661d7ecc4156688dc11d7e9f3988ffd85ee03 | 1,292 | py | Python | src/ansible_remote_checks/modules/check_process.py | davidvoit/ansible_remote_checks | 491f31855c96297e5466b238e648fa57c1e646d0 | [
"MIT"
] | null | null | null | src/ansible_remote_checks/modules/check_process.py | davidvoit/ansible_remote_checks | 491f31855c96297e5466b238e648fa57c1e646d0 | [
"MIT"
] | null | null | null | src/ansible_remote_checks/modules/check_process.py | davidvoit/ansible_remote_checks | 491f31855c96297e5466b238e648fa57c1e646d0 | [
"MIT"
] | 1 | 2019-08-20T13:19:16.000Z | 2019-08-20T13:19:16.000Z | #!/usr/bin/python2
import re
import subprocess
from ansible.module_utils.basic import AnsibleModule
def get_procs(process_regex, cmdline_regex):
cmd=["ps","-hax","-o","comm pid args"]
process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
output, error = process.communicate()
lines = output.splitlines()
pr... | 23.490909 | 127 | 0.69195 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 152 | 0.117647 |
11f7ea214def9b4195dd57f26ec40b4d4be26bb2 | 972 | py | Python | RESSPyLab/modified_cholesky.py | ioannis-vm/RESSPyLab | 306fc24d5f8ece8f2f2de274b56b80ba2019f605 | [
"MIT"
] | 7 | 2019-10-15T09:16:41.000Z | 2021-09-24T11:28:45.000Z | RESSPyLab/modified_cholesky.py | ioannis-vm/RESSPyLab | 306fc24d5f8ece8f2f2de274b56b80ba2019f605 | [
"MIT"
] | 3 | 2020-10-22T14:27:22.000Z | 2021-11-15T17:46:49.000Z | RESSPyLab/modified_cholesky.py | ioannis-vm/RESSPyLab | 306fc24d5f8ece8f2f2de274b56b80ba2019f605 | [
"MIT"
] | 6 | 2019-07-22T05:47:10.000Z | 2021-10-24T02:06:26.000Z | """@package modified_cholesky
Function to perform the modified Cholesky decomposition.
"""
import numpy as np
import numpy.linalg as la
def modified_cholesky(a):
""" Returns the matrix A if A is positive definite, or returns a modified A that is positive definite.
:param np.array a: (n, n) The symmetric matr... | 31.354839 | 106 | 0.653292 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 410 | 0.421811 |
11f88b21b7c293777ac5db6fccf25f3653b3095f | 1,528 | py | Python | docker_parser.py | hodolizer/HB_LittleBot | 4750c7c8e5bda22fcd5f48ea9248d919b7ca7fb2 | [
"MIT"
] | null | null | null | docker_parser.py | hodolizer/HB_LittleBot | 4750c7c8e5bda22fcd5f48ea9248d919b7ca7fb2 | [
"MIT"
] | null | null | null | docker_parser.py | hodolizer/HB_LittleBot | 4750c7c8e5bda22fcd5f48ea9248d919b7ca7fb2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Python Slack Bot docker parser class for use with the HB Bot
"""
import os
import re
DOCKER_SUPPORTED = ["image", "container", "help"]
SUBCOMMAND_SUPPORTED = ["ls",]
def docker_usage_message():
return ("I'm sorry. I don't understand your docker command."
"I understand docker [%... | 35.534884 | 102 | 0.650524 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 839 | 0.549084 |
11f9627891295b2fef341d114f820b8acfae0f4d | 1,713 | py | Python | estudo/bingo/bingo.py | PedroMoreira87/python | 7f8ed2d17ba12a8089618477b2738e3b1c809e74 | [
"MIT"
] | null | null | null | estudo/bingo/bingo.py | PedroMoreira87/python | 7f8ed2d17ba12a8089618477b2738e3b1c809e74 | [
"MIT"
] | null | null | null | estudo/bingo/bingo.py | PedroMoreira87/python | 7f8ed2d17ba12a8089618477b2738e3b1c809e74 | [
"MIT"
] | null | null | null | # Entregar arquivo com o código da função teste_cartela
#
# Verificador de cartela de bingo
#
# CRIAR UMA FUNÇÃO DO TIPO:
#
# def teste_cartela(numeros_bilhete,numeros_sorteados): #numeros_bilhete e numeros_sorteados tipo lista com valores inteiros
#
# ...
#
# return([bingo,n_acertos,p_acertos,[numeros_acertados],[nume... | 23.148649 | 124 | 0.669002 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 864 | 0.502326 |
11fbeaa0cdadcae10084a5b3b7d7792a3d86cf42 | 103 | py | Python | scripts/pymarkovchain_dynamic/__init__.py | jfahrg/augentbot | 2f26f9287928bb405696366c60f1193b6f34ab4a | [
"CC-BY-2.0",
"MIT"
] | 3 | 2017-10-16T14:05:47.000Z | 2017-10-23T07:18:46.000Z | scripts/pymarkovchain_dynamic/__init__.py | jfahrg/augentbot | 2f26f9287928bb405696366c60f1193b6f34ab4a | [
"CC-BY-2.0",
"MIT"
] | 1 | 2017-10-24T18:11:14.000Z | 2017-10-24T18:11:14.000Z | scripts/pymarkovchain_dynamic/__init__.py | jfde/augentbot | 2f26f9287928bb405696366c60f1193b6f34ab4a | [
"CC-BY-2.0",
"MIT"
] | null | null | null | from pymarkovchain_dynamic.MarkovChain import *
from pymarkovchain_dynamic.DynamicMarkovChain import *
| 34.333333 | 54 | 0.883495 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
11fc76302eb18d7762bad32d8a7fb8d4acc13c44 | 3,033 | py | Python | word_breakdown.py | imjeffhi4/word-breakdown | 7edf823fbc49ac56a5dc356067938d3828edc014 | [
"MIT"
] | null | null | null | word_breakdown.py | imjeffhi4/word-breakdown | 7edf823fbc49ac56a5dc356067938d3828edc014 | [
"MIT"
] | null | null | null | word_breakdown.py | imjeffhi4/word-breakdown | 7edf823fbc49ac56a5dc356067938d3828edc014 | [
"MIT"
] | null | null | null | from transformers import GPTNeoForCausalLM, GPT2Tokenizer
from fastapi import FastAPI
import re
import json
from pydantic import BaseModel
from typing import Optional
import torch
app = FastAPI()
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
morph_path = './Model'
morph_tokenizer = GPT2Toke... | 40.986486 | 155 | 0.636334 | 78 | 0.025717 | 1,109 | 0.365645 | 97 | 0.031982 | 82 | 0.027036 | 1,018 | 0.335641 |
11fe5c633fd36a2c77c71b22b430bb0c40ce5ec0 | 504 | py | Python | mini_book/_build/jupyter_execute/docs/enrollment.py | rebeccajohnson88/qss20 | f936e77660e551bb10a82abb96a36369ccbf3d18 | [
"CC0-1.0"
] | 1 | 2021-04-01T18:42:36.000Z | 2021-04-01T18:42:36.000Z | mini_book/_build/jupyter_execute/docs/enrollment.py | rebeccajohnson88/qss20 | f936e77660e551bb10a82abb96a36369ccbf3d18 | [
"CC0-1.0"
] | 1 | 2021-02-14T22:36:59.000Z | 2021-02-24T23:33:24.000Z | mini_book/_build/jupyter_execute/docs/enrollment.py | rebeccajohnson88/qss20 | f936e77660e551bb10a82abb96a36369ccbf3d18 | [
"CC0-1.0"
] | null | null | null | (enrollment)=
# Enrollment and Waitlist
For Dartmouth students, you can track the enrollment status using the ORC timetable.
The course is capped at 20 students to facilitate small group collaboration for the final data science project. Please fill out this Google form (while logged in via your Dartmouth email) if y... | 72 | 376 | 0.821429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 0.049603 |
11ffbc12ee29d6ded59501a82368db14e943d2d0 | 1,683 | py | Python | decode.py | imandr/image_encode | 9828d5dc570fc0feb729b365b13ab50cfdb8c85e | [
"BSD-3-Clause"
] | null | null | null | decode.py | imandr/image_encode | 9828d5dc570fc0feb729b365b13ab50cfdb8c85e | [
"BSD-3-Clause"
] | null | null | null | decode.py | imandr/image_encode | 9828d5dc570fc0feb729b365b13ab50cfdb8c85e | [
"BSD-3-Clause"
] | null | null | null | import sys, getopt
from zlib import adler32
from PIL import Image
from rnd import Generator, sample
Usage = """
python decode.py <password> <input image file> <output file>
"""
def bits(text):
out = []
for c in text:
n = ord(c)
for _ in range(8):
out.append(n&1)
n >>= 1... | 19.569767 | 60 | 0.565657 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 240 | 0.142602 |
f504c2cb47e19abd70638d4564e9477e15e1315f | 379 | py | Python | member/views.py | comcidis/comcidis-portal | 40eb6d37874f60eac123a15a03661bd48cecd382 | [
"MIT"
] | null | null | null | member/views.py | comcidis/comcidis-portal | 40eb6d37874f60eac123a15a03661bd48cecd382 | [
"MIT"
] | null | null | null | member/views.py | comcidis/comcidis-portal | 40eb6d37874f60eac123a15a03661bd48cecd382 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from .models import Member
def index(request):
"""List all members
"""
advisors = Member.objects.filter(advisor=True)
members = Member.objects.filter(advisor=False)
context = {'mobile_title_page': 'Equipe',
'advisors': advisors, 'members': members... | 29.153846 | 56 | 0.683377 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 92 | 0.242744 |
f506803cc0725d8f77786e4264a390f804bf912b | 447 | py | Python | ping_pong.py | kpbochenek/codewarz | 20f600623bddd269fb845d06b1826c9e50b49594 | [
"Apache-2.0"
] | null | null | null | ping_pong.py | kpbochenek/codewarz | 20f600623bddd269fb845d06b1826c9e50b49594 | [
"Apache-2.0"
] | null | null | null | ping_pong.py | kpbochenek/codewarz | 20f600623bddd269fb845d06b1826c9e50b49594 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import sys
import requests
ping = sys.argv[1]
pong = sys.argv[2]
word = sys.argv[3]
if not ping.startswith('http'):
ping = 'http://' + ping
if not pong.startswith('http'):
pong = 'http://' + pong
while True:
r = requests.post(ping, data={'food': word})
answer = r.text
if ... | 17.88 | 48 | 0.592841 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 69 | 0.154362 |
f506a97a368ef7e32d2a9750ae1f1a3c19762e70 | 437 | py | Python | fenixstroy/shop/forms.py | wiky-avis/fenixstroy_shop | 9e5ed0425e8fc5bcd77b7a0a640484a87c2f888c | [
"MIT"
] | null | null | null | fenixstroy/shop/forms.py | wiky-avis/fenixstroy_shop | 9e5ed0425e8fc5bcd77b7a0a640484a87c2f888c | [
"MIT"
] | 3 | 2021-09-22T18:44:30.000Z | 2022-03-12T00:58:02.000Z | fenixstroy/shop/forms.py | wiky-avis/fenixstroy_shop | 9e5ed0425e8fc5bcd77b7a0a640484a87c2f888c | [
"MIT"
] | null | null | null | from django import forms
from .models import Comment, Rating, RatingStar
class RatingForm(forms.ModelForm):
star = forms.ModelChoiceField(
queryset=RatingStar.objects.all(),
widget=forms.RadioSelect(),
empty_label=None
)
class Meta:
model = Rating
fields = ('star'... | 19.863636 | 47 | 0.631579 | 357 | 0.816934 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 0.045767 |
f50709f23a7db10987ca6be48b2058d6a849444a | 527 | py | Python | lumicks/pylake/tests/test_import_time.py | lumicks/pylake | b5875d156d6416793a371198f3f2590fca2be4cd | [
"Apache-2.0"
] | 8 | 2019-02-18T07:56:39.000Z | 2022-03-19T01:14:48.000Z | lumicks/pylake/tests/test_import_time.py | lumicks/pylake | b5875d156d6416793a371198f3f2590fca2be4cd | [
"Apache-2.0"
] | 42 | 2018-11-30T14:40:35.000Z | 2022-03-29T11:43:45.000Z | lumicks/pylake/tests/test_import_time.py | lumicks/pylake | b5875d156d6416793a371198f3f2590fca2be4cd | [
"Apache-2.0"
] | 4 | 2019-01-09T13:45:53.000Z | 2021-07-06T14:06:52.000Z | from textwrap import dedent
import numpy as np
import subprocess
import sys
import pytest
@pytest.mark.slow
def test_disabling_capturing(report_line):
repeats = 3
code = dedent("""\
import time
tic = time.time()
import lumicks.pylake
print(time.time() - tic)
""")
... | 23.954545 | 105 | 0.643264 | 0 | 0 | 0 | 0 | 434 | 0.823529 | 0 | 0 | 236 | 0.447818 |
ee921704bb61e5ef659b3c250a5774e67e1fc9fd | 3,433 | py | Python | lib/aquilon/consistency/checks/branch.py | ned21/aquilon | 6562ea0f224cda33b72a6f7664f48d65f96bd41a | [
"Apache-2.0"
] | 7 | 2015-07-31T05:57:30.000Z | 2021-09-07T15:18:56.000Z | lib/aquilon/consistency/checks/branch.py | ned21/aquilon | 6562ea0f224cda33b72a6f7664f48d65f96bd41a | [
"Apache-2.0"
] | 115 | 2015-03-03T13:11:46.000Z | 2021-09-20T12:42:24.000Z | lib/aquilon/consistency/checks/branch.py | ned21/aquilon | 6562ea0f224cda33b72a6f7664f48d65f96bd41a | [
"Apache-2.0"
] | 13 | 2015-03-03T11:17:59.000Z | 2021-09-09T09:16:41.000Z | #!/usr/bin/env python
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2013,2014,2017 Contributor
#
# 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... | 42.9125 | 84 | 0.637635 | 2,487 | 0.724439 | 0 | 0 | 0 | 0 | 0 | 0 | 1,713 | 0.49898 |
ee92be80023074621572bda99d5be62e1b63d427 | 1,418 | py | Python | server.py | aoii103/magicworld | cad0df6aa872cd5dcd4142f83ea9fde821652551 | [
"MIT"
] | 7 | 2018-02-05T03:14:08.000Z | 2019-07-28T18:49:41.000Z | server.py | aoii103/magicworld | cad0df6aa872cd5dcd4142f83ea9fde821652551 | [
"MIT"
] | null | null | null | server.py | aoii103/magicworld | cad0df6aa872cd5dcd4142f83ea9fde821652551 | [
"MIT"
] | 3 | 2019-05-21T08:58:32.000Z | 2019-12-26T17:03:07.000Z | import json
import os
from extra import MainStart
import threading
import moment
from jinja2 import Environment, PackageLoader
from sanic import Sanic, response
from sanic.log import logger
from termcolor import colored
from conf import config
from spider import bot
env = Environment(loader=PackageLoad... | 26.754717 | 81 | 0.648096 | 0 | 0 | 0 | 0 | 752 | 0.530324 | 711 | 0.50141 | 174 | 0.122708 |
ee969271d5aeb101a427f273a5ac443c35b1fd94 | 1,891 | py | Python | build/lib/pubsubsql/net/testheader.py | pubsubsql/python | a62f76490222380375d20399dbe3812ff3451815 | [
"Apache-2.0"
] | 1 | 2016-03-17T15:16:16.000Z | 2016-03-17T15:16:16.000Z | src/pubsubsql/net/testheader.py | pubsubsql/pss-py | a62f76490222380375d20399dbe3812ff3451815 | [
"Apache-2.0"
] | null | null | null | src/pubsubsql/net/testheader.py | pubsubsql/pss-py | a62f76490222380375d20399dbe3812ff3451815 | [
"Apache-2.0"
] | 1 | 2015-04-24T10:24:42.000Z | 2015-04-24T10:24:42.000Z | #! /usr/bin/env python
"""
Copyright (C) 2014 CompleteDB LLC.
This program is free software: you can redistribute it and/or modify
it under the terms of the Apache License Version 2.0 http://www.apache.org/licenses.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; with... | 30.5 | 85 | 0.565838 | 1,362 | 0.720254 | 0 | 0 | 0 | 0 | 0 | 0 | 536 | 0.283448 |
ee97351f4698d9e63dc5fa142d72abe0e05ecfef | 5,189 | py | Python | app/giturl_class/routes.py | KnowledgeCaptureAndDiscovery/somef-web | 220ced6a3cb778dd2ba5e2da7c440a6e33447f67 | [
"Apache-2.0"
] | 1 | 2020-04-12T17:03:37.000Z | 2020-04-12T17:03:37.000Z | app/giturl_class/routes.py | KnowledgeCaptureAndDiscovery/somef-web | 220ced6a3cb778dd2ba5e2da7c440a6e33447f67 | [
"Apache-2.0"
] | null | null | null | app/giturl_class/routes.py | KnowledgeCaptureAndDiscovery/somef-web | 220ced6a3cb778dd2ba5e2da7c440a6e33447f67 | [
"Apache-2.0"
] | 1 | 2021-09-21T20:11:50.000Z | 2021-09-21T20:11:50.000Z |
from flask import render_template, flash, send_from_directory, send_file
from app.giturl_class.url_form import UrlForm
from app.giturl_class.download_form import DownloadButton
from app.giturl_class import bp
import json
import os
USE_TEST_FILE = False
if(os.getenv('SM2KG_TEST_MODE') == 'TRUE'):
USE_TEST_FILE = ... | 31.448485 | 163 | 0.582386 | 0 | 0 | 0 | 0 | 3,510 | 0.676431 | 0 | 0 | 1,395 | 0.268838 |
ee98e5cd0e12c0ac4700f16fd1175dbaba124f1a | 681 | py | Python | type.py | pfeak/pymarkdown | e136c361c935785267535734394c579d8c7002f5 | [
"MIT"
] | null | null | null | type.py | pfeak/pymarkdown | e136c361c935785267535734394c579d8c7002f5 | [
"MIT"
] | 1 | 2020-09-17T07:46:58.000Z | 2020-09-17T07:46:58.000Z | type.py | pfeak/pymarkdown | e136c361c935785267535734394c579d8c7002f5 | [
"MIT"
] | null | null | null | import platform
from enum import Enum, unique
@unique
class Type(Enum):
"""Markdown type
"""
# Separation
SEP = '\n'
# Place holder
NULL = ""
SPACE = " "
# Markdown single symbol
H1 = "#"
H2 = "##"
H3 = "###"
H4 = "####"
H5 = "#####"
H6 = "######"
QUOTE = ... | 17.025 | 55 | 0.50514 | 624 | 0.9163 | 0 | 0 | 632 | 0.928047 | 0 | 0 | 297 | 0.436123 |
ee9a90e09df8676533abaa0b7de5176954a8137e | 3,542 | py | Python | server/server/apps/course/views.py | tjsga/study-bank | f4cb17bc642d2fd28affde89d2af6a8ecd2286f2 | [
"MIT"
] | null | null | null | server/server/apps/course/views.py | tjsga/study-bank | f4cb17bc642d2fd28affde89d2af6a8ecd2286f2 | [
"MIT"
] | null | null | null | server/server/apps/course/views.py | tjsga/study-bank | f4cb17bc642d2fd28affde89d2af6a8ecd2286f2 | [
"MIT"
] | null | null | null | from django.shortcuts import render, get_object_or_404
from django.core.exceptions import PermissionDenied
from django.http import Http404
from .models import Course
from ..mod.models import Moderator
from ..files.models import File
from ..decorators import login
# Create your views here.
@login
def index(request)... | 31.625 | 87 | 0.634952 | 0 | 0 | 0 | 0 | 3,220 | 0.909091 | 0 | 0 | 439 | 0.123941 |
ee9c2a66660c6fef43012d8c38ea0b3de96ca075 | 1,134 | py | Python | animepicker/apps/picker/migrations/0001_initial.py | Onosume/anime-picker | 635f260ebb3b63b50e3b461b78d4c3295b4ff703 | [
"MIT"
] | null | null | null | animepicker/apps/picker/migrations/0001_initial.py | Onosume/anime-picker | 635f260ebb3b63b50e3b461b78d4c3295b4ff703 | [
"MIT"
] | null | null | null | animepicker/apps/picker/migrations/0001_initial.py | Onosume/anime-picker | 635f260ebb3b63b50e3b461b78d4c3295b4ff703 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-01-26 14:26
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Anime',... | 36.580645 | 178 | 0.574956 | 977 | 0.861552 | 0 | 0 | 0 | 0 | 0 | 0 | 259 | 0.228395 |
ee9c514425fe52fb6f66f62ee9d6108d08382363 | 5,332 | py | Python | solutions/solution_14.py | claudiobierig/adventofcode19 | 40dabd7c780ab1cd8bad4292550cd9dd1d178365 | [
"MIT"
] | null | null | null | solutions/solution_14.py | claudiobierig/adventofcode19 | 40dabd7c780ab1cd8bad4292550cd9dd1d178365 | [
"MIT"
] | null | null | null | solutions/solution_14.py | claudiobierig/adventofcode19 | 40dabd7c780ab1cd8bad4292550cd9dd1d178365 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import math
def read_input(path):
with open(path) as file:
reactions = [line.strip().split('=>') for line in file.readlines()]
reactions2 = [[r[0].strip().split(","), r[1].strip()] for r in reactions]
result = {}
for reaction in reactions2:
goal = ... | 45.186441 | 693 | 0.564891 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,176 | 0.408102 |
ee9daa8c3f24ee0e5956c82c505b318b5493b1d6 | 471 | py | Python | src/actions/action_sleep.py | JohnVillalovos/webhook-proxy | fbb2df31b10a0c3ffb9572a0abde4df7e1ad2ef3 | [
"MIT"
] | null | null | null | src/actions/action_sleep.py | JohnVillalovos/webhook-proxy | fbb2df31b10a0c3ffb9572a0abde4df7e1ad2ef3 | [
"MIT"
] | null | null | null | src/actions/action_sleep.py | JohnVillalovos/webhook-proxy | fbb2df31b10a0c3ffb9572a0abde4df7e1ad2ef3 | [
"MIT"
] | null | null | null | import time
from actions import Action, action
@action("sleep")
class SleepAction(Action):
def __init__(
self, seconds, output="Waiting {{ seconds }} seconds before continuing ..."
):
self.seconds = seconds
self.output_format = output
def _run(self):
seconds = float(self.... | 23.55 | 83 | 0.673036 | 403 | 0.855626 | 0 | 0 | 420 | 0.89172 | 0 | 0 | 60 | 0.127389 |
ee9fab028e33102060e656a46df7bd6afed90358 | 1,262 | py | Python | a1d05eba1/special_fields/choice_filter.py | dorey/a1d05eba1 | eb6f66a946f3c417ab6bf9047ba9715be071967c | [
"0BSD"
] | null | null | null | a1d05eba1/special_fields/choice_filter.py | dorey/a1d05eba1 | eb6f66a946f3c417ab6bf9047ba9715be071967c | [
"0BSD"
] | 28 | 2020-06-23T19:00:58.000Z | 2021-03-26T22:13:07.000Z | a1d05eba1/special_fields/choice_filter.py | dorey/a1d05eba1 | eb6f66a946f3c417ab6bf9047ba9715be071967c | [
"0BSD"
] | null | null | null | from ..utils.kfrozendict import kfrozendict
from ..utils.kfrozendict import kassertfrozen
class ChoiceFilter:
ROW_KEYS = {
'1': ['choice_filter'],
'2': ['choice_filter'],
}
EXPORT_KEY = 'choice_filter'
@classmethod
def in_row(kls, row, schema):
return 'choice_filter' in ro... | 28.044444 | 59 | 0.585578 | 1,170 | 0.9271 | 572 | 0.453249 | 701 | 0.555468 | 0 | 0 | 208 | 0.164818 |
ee9ff38e8ac3eaab8a58f8de6b4ed70735c17d0f | 3,878 | py | Python | hamster_control_test_version.py | iamnotmarcel/HamsterModell | ce8391e8e120e2cf957f9d49e812be3c4f757f75 | [
"MIT"
] | null | null | null | hamster_control_test_version.py | iamnotmarcel/HamsterModell | ce8391e8e120e2cf957f9d49e812be3c4f757f75 | [
"MIT"
] | 1 | 2022-03-26T17:27:30.000Z | 2022-03-26T17:27:30.000Z | hamster_control_test_version.py | iamnotmarcel/HamsterModell | ce8391e8e120e2cf957f9d49e812be3c4f757f75 | [
"MIT"
] | null | null | null | '''
Author: Marcel Miljak
Klasse: 5aHEL - HTL Anichstraße
Diplomarbeit: Entwicklung eines Hamster Roboters
Jahrgang: 2021/22
'''
import time
from time import sleep
import RPi.GPIO as GPIO
DIR_2 = 18 # Direction-Pin vom 2ten Modul
DIR_1 = 24 # Direction-pin vom 1sten Modul
STEP_1 = 25 # ... | 22.678363 | 70 | 0.581227 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,622 | 0.417611 |