hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 4 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 4 247 | max_forks_repo_name stringlengths 4 130 | 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 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9edf97789321d9901bac7d3458335d78de943376 | 3,806 | py | Python | config.py | stummyhurt/auto-emby-accounts | f6ee172ffa704a4eb23b41bef25be2136b3cf5bc | [
"MIT"
] | 4 | 2020-07-13T16:57:41.000Z | 2020-12-05T16:18:57.000Z | config.py | seansusmilch/auto-emby-accounts | f6ee172ffa704a4eb23b41bef25be2136b3cf5bc | [
"MIT"
] | 1 | 2020-05-14T03:01:30.000Z | 2020-05-14T03:01:30.000Z | config.py | seansusmilch/auto-emby-accounts | f6ee172ffa704a4eb23b41bef25be2136b3cf5bc | [
"MIT"
] | 2 | 2021-09-17T05:32:13.000Z | 2022-02-14T13:46:40.000Z | # Different Logging Levels
# 4: DEBUG
# 3: INFO
# 2: WARNING
# 1: ERROR
# 0: CRITICAL
log_level = 3
# When set true, if the script finds a user that already exists,
# the script will attempt to change the policy of that user,
# and add the emby connect account to that user.
overwrite = False
# The... | 46.987654 | 159 | 0.53547 | # Different Logging Levels
# 4: DEBUG
# 3: INFO
# 2: WARNING
# 1: ERROR
# 0: CRITICAL
log_level = 3
# When set true, if the script finds a user that already exists,
# the script will attempt to change the policy of that user,
# and add the emby connect account to that user.
overwrite = False
# The... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6fcba304f8d15443f18e2e1f65d3e399bd0853b4 | 2,565 | py | Python | benchmarks/code_cifar10/sdt.py | PSSF23/SPDT | 2e369a3aa5735994c3c5efd485ed19a1e9f1e8ad | [
"MIT"
] | 3 | 2020-10-02T18:36:17.000Z | 2020-10-13T00:43:13.000Z | benchmarks/code_cifar10/sdt.py | PSSF23/SPDT | 2e369a3aa5735994c3c5efd485ed19a1e9f1e8ad | [
"MIT"
] | 8 | 2020-10-02T18:40:51.000Z | 2021-10-01T17:40:54.000Z | benchmarks/code_cifar10/sdt.py | PSSF23/SPDT | 2e369a3aa5735994c3c5efd485ed19a1e9f1e8ad | [
"MIT"
] | null | null | null | """
Author: Haoyin Xu
"""
import time
import numpy as np
import torchvision.datasets as datasets
from numpy.random import permutation
from sklearn.tree import DecisionTreeClassifier
def write_result(filename, acc_ls):
"""Writes results to specified text file"""
output = open(filename, "w")
for acc in acc_... | 26.443299 | 88 | 0.661988 | """
Author: Haoyin Xu
"""
import time
import numpy as np
import torchvision.datasets as datasets
from numpy.random import permutation
from sklearn.tree import DecisionTreeClassifier
def write_result(filename, acc_ls):
"""Writes results to specified text file"""
output = open(filename, "w")
for acc in acc_... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
60bd8b8f9eae67891fa4c30429ba3e25b2bb87c3 | 3,503 | py | Python | src/train_cnn.py | JiJingYu/Sensor-Specific-Hyperspectral-Image-Feature-Learning | de0ddec567fb8b47b37cffc6215c51533ac35a56 | [
"Apache-2.0"
] | 1 | 2017-08-14T03:21:00.000Z | 2017-08-14T03:21:00.000Z | src/train_cnn.py | JiJingYu/Sensor-Specific-Hyperspectral-Image-Feature-Learning | de0ddec567fb8b47b37cffc6215c51533ac35a56 | [
"Apache-2.0"
] | null | null | null | src/train_cnn.py | JiJingYu/Sensor-Specific-Hyperspectral-Image-Feature-Learning | de0ddec567fb8b47b37cffc6215c51533ac35a56 | [
"Apache-2.0"
] | 1 | 2021-02-16T00:04:52.000Z | 2021-02-16T00:04:52.000Z | import argparse
import net.proto_file as proto_file
import data_analysis.find_caffe as find_caffe
caffe_root = find_caffe.caffe_root
if __name__ == '__main__':
parser = argparse.ArgumentParser(description="train bn net",
formatter_class=argparse.ArgumentDefaultsHelpForma... | 43.246914 | 118 | 0.640879 | import os
import sys
import h5py
import argparse
import net.proto_file as proto_file
import subprocess
import numpy as np
import scipy.io as sio
import data_analysis.find_caffe as find_caffe
import Config.ExpConfigInfo as Config
caffe_root = find_caffe.caffe_root
def train_aviris_10_times(label_unique, args):
f... | 0 | 0 | 0 | 0 | 0 | 2,051 | 0 | -23 | 246 |
03d5517469cf562a344fb431f9038f8db0ca08af | 3,360 | py | Python | merge.py | arvin-chou/livechat | 13da09d4007439dea2011dbaad5f3ee4a2ca72e8 | [
"MIT"
] | null | null | null | merge.py | arvin-chou/livechat | 13da09d4007439dea2011dbaad5f3ee4a2ca72e8 | [
"MIT"
] | 4 | 2021-09-08T21:31:38.000Z | 2022-03-29T22:39:21.000Z | merge.py | arvin-chou/livechat | 13da09d4007439dea2011dbaad5f3ee4a2ca72e8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import time
from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument("-p", "--path",
help="log path", dest="p", default="app/static/line")
parser.add_argument("-i", "--id",
help="chrome extension id", dest="i", default="*")
parser.add_argument("-u",... | 32.307692 | 124 | 0.56756 | # -*- coding: utf-8 -*-
import io
import json
import os
import glob
import requests
import urllib.parse
import sys
import time
from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument("-p", "--path",
help="log path", dest="p", default="app/static/line")
parser.add_argument("-i", "-... | 0 | 0 | 0 | 0 | 0 | 2,271 | 0 | -63 | 177 |
345a93ce42a9e0745a244e0f859478711fe136ec | 2,310 | py | Python | csgostash_scraper/modules/objects/_utils.py | Quentium-s-Forks/csgostash-scraper | cb75128215e208e49a29c54c142da1da6386f55a | [
"MIT"
] | 6 | 2020-05-10T12:46:57.000Z | 2022-03-25T17:14:54.000Z | csgostash_scraper/modules/objects/_utils.py | Quentium-s-Forks/csgostash-scraper | cb75128215e208e49a29c54c142da1da6386f55a | [
"MIT"
] | 1 | 2021-03-21T16:52:05.000Z | 2021-03-21T16:52:05.000Z | csgostash_scraper/modules/objects/_utils.py | Quentium-s-Forks/csgostash-scraper | cb75128215e208e49a29c54c142da1da6386f55a | [
"MIT"
] | 4 | 2021-03-12T00:17:37.000Z | 2021-07-16T15:27:37.000Z | # -*- coding: utf-8 -*-
"""
MIT License
Copyright (c) 2020 supr3me
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 use, ... | 30 | 85 | 0.651082 | # -*- coding: utf-8 -*-
"""
MIT License
Copyright (c) 2020 supr3me
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 use, ... | 0 | 402 | 0 | 728 | 0 | 0 | 0 | 0 | 24 |
8d9b430957d44a00d42d86da9d135e189d354a83 | 189 | py | Python | 15_euler.py | f0ti/euler | c939f80f6fe806297c60cc6763dc1dc5daa86328 | [
"MIT"
] | 1 | 2021-07-31T12:50:38.000Z | 2021-07-31T12:50:38.000Z | 15_euler.py | f0ti/euler | c939f80f6fe806297c60cc6763dc1dc5daa86328 | [
"MIT"
] | null | null | null | 15_euler.py | f0ti/euler | c939f80f6fe806297c60cc6763dc1dc5daa86328 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Binomial coeff 4ever
print(int(find_bin_coeff(40, 20))) | 18.9 | 66 | 0.730159 | #!/usr/bin/env python3
import math
# Binomial coeff 4ever
def find_bin_coeff(n, k):
return math.factorial(n)/(math.factorial(k)*math.factorial(n-k))
print(int(find_bin_coeff(40, 20))) | 0 | 0 | 0 | 0 | 0 | 71 | 0 | -10 | 46 |
4006594bb13d96bcc673addd0398f1af7ae36a69 | 12,700 | py | Python | fizz_buzz.py | Danielli-Itai/TfFizzBuzz | b5962dcf1ad0f111041bb890df515abd6a2fce7a | [
"Unlicense"
] | null | null | null | fizz_buzz.py | Danielli-Itai/TfFizzBuzz | b5962dcf1ad0f111041bb890df515abd6a2fce7a | [
"Unlicense"
] | null | null | null | fizz_buzz.py | Danielli-Itai/TfFizzBuzz | b5962dcf1ad0f111041bb890df515abd6a2fce7a | [
"Unlicense"
] | null | null | null | # Fizz Buzz in Tensorflow!
# Our goal is to produce fizzbuzz for the numbers 1 to 100.
# So it would be unfair to include these in our training data.
# Accordingly, the training data corresponds to the numbers 101 to (2 ** NUM_DIGITS - 1).
# see http://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
#***********... | 38.957055 | 153 | 0.669528 | # Fizz Buzz in Tensorflow!
# Our goal is to produce fizzbuzz for the numbers 1 to 100.
# So it would be unfair to include these in our training data.
# Accordingly, the training data corresponds to the numbers 101 to (2 ** NUM_DIGITS - 1).
# see http://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
from PyBaseGUI.Mpl... | 3 | 0 | 0 | 0 | 0 | 6,168 | 0 | 62 | 584 |
70ddf0689650d8dd4714c839a174e7639e9072f0 | 11,815 | py | Python | lib/coginvasion/hood/TownLoader.py | theclashingfritz/Cog-Invasion-Online-Dump | 2561abbacb3e2e288e06f3f04b935b5ed589c8f8 | [
"Apache-2.0"
] | 1 | 2020-03-12T16:44:10.000Z | 2020-03-12T16:44:10.000Z | lib/coginvasion/hood/TownLoader.py | theclashingfritz/Cog-Invasion-Online-Dump | 2561abbacb3e2e288e06f3f04b935b5ed589c8f8 | [
"Apache-2.0"
] | null | null | null | lib/coginvasion/hood/TownLoader.py | theclashingfritz/Cog-Invasion-Online-Dump | 2561abbacb3e2e288e06f3f04b935b5ed589c8f8 | [
"Apache-2.0"
] | null | null | null | # uncompyle6 version 3.2.4
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)]
# Embedded file name: lib.coginvasion.hood.TownLoader | 41.167247 | 296 | 0.650529 | # uncompyle6 version 3.2.4
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)]
# Embedded file name: lib.coginvasion.hood.TownLoader
from panda3d.core import *
from direct.directnotify.DirectNotifyGlobal import directNotify
from direct.f... | 0 | 0 | 0 | 11,178 | 0 | 0 | 0 | 201 | 221 |
43f11f15a49bd36c2028ac01e96f9ab77af58c94 | 3,221 | py | Python | tests/workflow_tests/test_storage.py | acidburn0zzz/cloudify-manager | ee2224c52347f7461a95976179ab61aee74a49dd | [
"Apache-2.0"
] | 1 | 2015-11-03T14:27:11.000Z | 2015-11-03T14:27:11.000Z | tests/workflow_tests/test_storage.py | acidburn0zzz/cloudify-manager | ee2224c52347f7461a95976179ab61aee74a49dd | [
"Apache-2.0"
] | 2 | 2021-03-20T05:33:19.000Z | 2021-03-26T00:38:21.000Z | tests/workflow_tests/test_storage.py | acidburn0zzz/cloudify-manager | ee2224c52347f7461a95976179ab61aee74a49dd | [
"Apache-2.0"
] | 1 | 2019-10-29T06:15:31.000Z | 2019-10-29T06:15:31.000Z | ########
# Copyright (c) 2013 GigaSpaces Technologies Ltd. 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... | 42.381579 | 79 | 0.65104 | ########
# Copyright (c) 2013 GigaSpaces Technologies Ltd. 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... | 0 | 0 | 0 | 2,296 | 0 | 0 | 0 | 124 | 157 |
f9d3414f8f4fa8562edec0a0c9d4ef0efad6a5c4 | 1,092 | py | Python | tests/test_utils.py | takeshiD/urdf2dh | 76d9c4ce6d388ef4bd7325be60b704ea955dad7d | [
"MIT"
] | 1 | 2021-11-03T06:59:50.000Z | 2021-11-03T06:59:50.000Z | tests/test_utils.py | takeshiD/urdf2dh | 76d9c4ce6d388ef4bd7325be60b704ea955dad7d | [
"MIT"
] | 1 | 2021-10-19T12:40:15.000Z | 2021-10-19T12:40:15.000Z | tests/test_utils.py | takeshiD/urdf2dh | 76d9c4ce6d388ef4bd7325be60b704ea955dad7d | [
"MIT"
] | null | null | null |
ATOL = 1.e-8 | 34.125 | 76 | 0.668498 | import pytest
from tik.utils import _RotX, _RotY, _RotZ, Rot, Trans, homogeneous_transform
import numpy as np
ATOL = 1.e-8
@pytest.mark.parametrize(('theta', 'expected'), [
(0, np.eye(4)),
(2*np.pi, np.eye(4)),
])
def test_RotXYZ(theta, expected):
assert np.allclose(_RotX(theta), expected, atol=ATOL)
a... | 0 | 879 | 0 | 0 | 0 | 0 | 0 | 44 | 156 |
cdc8d0d7da85ef3d2e6f802fc54b3d3064614620 | 2,165 | py | Python | v2.5.7/otp/ai/passlib/ifc.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-01T15:46:43.000Z | 2021-07-23T16:26:48.000Z | v2.5.7/otp/ai/passlib/ifc.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 1 | 2019-06-29T03:40:05.000Z | 2021-06-13T01:15:16.000Z | v2.5.7/otp/ai/passlib/ifc.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-28T21:18:46.000Z | 2021-02-25T06:37:25.000Z | import logging
log = logging.getLogger(__name__)
__all__ = [
'PasswordHash']
| 27.0625 | 78 | 0.685912 | import logging
log = logging.getLogger(__name__)
import sys
from otp.ai.passlib.utils.decor import deprecated_method
__all__ = [
'PasswordHash']
def recreate_with_metaclass(meta):
def builder(cls):
if meta is type(cls):
return cls
return meta(cls.__name__, cls.__bases__, cls.__dict__.... | 0 | 1,622 | 0 | 89 | 0 | 179 | 0 | 60 | 136 |
90c7e36f7d5ca62d1e26ad3ae288e6ece67a2e02 | 592 | py | Python | tests/saversion.py | edupo/py-mongosql | 27d2d125e862106077addec0376b07b13894439d | [
"MIT"
] | 36 | 2015-02-25T20:30:34.000Z | 2022-02-13T08:38:24.000Z | tests/saversion.py | edupo/py-mongosql | 27d2d125e862106077addec0376b07b13894439d | [
"MIT"
] | 8 | 2017-06-14T03:21:42.000Z | 2022-02-09T11:56:00.000Z | tests/saversion.py | edupo/py-mongosql | 27d2d125e862106077addec0376b07b13894439d | [
"MIT"
] | 10 | 2015-10-21T09:22:37.000Z | 2022-02-09T11:33:32.000Z | from distutils.version import LooseVersion
from mongosql import SA_VERSION
def SA_VERSION_IN(min_version, max_version):
""" Check that SqlAlchemy version lies within a range
This is slow; only use in unit-tests!
"""
return LooseVersion(min_version) <= LooseVersion(SA_VERSION) <= LooseVersion(max_ver... | 26.909091 | 93 | 0.72973 | from distutils.version import LooseVersion
from mongosql import SA_VERSION, SA_12, SA_13
def SA_VERSION_IN(min_version, max_version):
""" Check that SqlAlchemy version lies within a range
This is slow; only use in unit-tests!
"""
return LooseVersion(min_version) <= LooseVersion(SA_VERSION) <= LooseV... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0 |
78a25d57287b85842e5ab7905e861a14d92d55e6 | 1,347 | py | Python | cn/opencv/color/color_three.py | Jasonandy/Python-X | 2f02b9a17bd5495dd1f8746b191f11ec2d7bccbe | [
"Apache-2.0"
] | null | null | null | cn/opencv/color/color_three.py | Jasonandy/Python-X | 2f02b9a17bd5495dd1f8746b191f11ec2d7bccbe | [
"Apache-2.0"
] | null | null | null | cn/opencv/color/color_three.py | Jasonandy/Python-X | 2f02b9a17bd5495dd1f8746b191f11ec2d7bccbe | [
"Apache-2.0"
] | 2 | 2019-06-18T05:53:26.000Z | 2019-06-19T03:26:02.000Z | import numpy as np
import cv2
red_lower = np.array([0,43,46])
red_upper = np.array([10,255,255])
blue_lower = np.array([100,43,46])
blue_upper = np.array([124,255,255])
cap = cv2.VideoCapture(0)
cap.set(3,320)
cap.set(4,240)
while 1:
ret,frame = cap.read()
frame = cv2.GaussianBlur(frame,(5,5),0)
hsv = cv2... | 30.613636 | 88 | 0.651076 | import numpy as np
import cv2
red_lower = np.array([0,43,46])
red_upper = np.array([10,255,255])
blue_lower = np.array([100,43,46])
blue_upper = np.array([124,255,255])
cap = cv2.VideoCapture(0)
cap.set(3,320)
cap.set(4,240)
def ChestRed():
hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)
mask = cv2.inRange(hsv, ... | 0 | 0 | 0 | 0 | 0 | 557 | 0 | 0 | 44 |
cd43012772e2d2ca2aed819c9c52c439b40a78aa | 4,595 | py | Python | snapflow/testing/utils.py | icedevml/snapflow | 329dae3f8eaa70d3a26d38a505faeb45d8eecb57 | [
"BSD-3-Clause"
] | null | null | null | snapflow/testing/utils.py | icedevml/snapflow | 329dae3f8eaa70d3a26d38a505faeb45d8eecb57 | [
"BSD-3-Clause"
] | null | null | null | snapflow/testing/utils.py | icedevml/snapflow | 329dae3f8eaa70d3a26d38a505faeb45d8eecb57 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import annotations
| 34.548872 | 82 | 0.661371 | from __future__ import annotations
import tempfile
from contextlib import contextmanager
from dataclasses import dataclass
from typing import Any, Dict, Iterator, List, Optional
from commonmodel.base import Schema, SchemaLike
from dcp.data_format.handler import get_handler_for_name, infer_schema_for_name
from dcp.dat... | 0 | 2,333 | 0 | 0 | 0 | 1,308 | 0 | 447 | 468 |
4e8e763886d62307b0f52e2c95d2165e30ba591c | 26,851 | py | Python | pysnmp-with-texts/CISCO-SME-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/CISCO-SME-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/CISCO-SME-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module CISCO-SME-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-SME-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:12:18 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 201... | 139.124352 | 2,458 | 0.783732 | #
# PySNMP MIB module CISCO-SME-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-SME-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:12:18 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 201... | 0 | 0 | 0 | 1,413 | 0 | 0 | 0 | 0 | 68 |
2bd219b3e013b14aa017a9137cadf5e8dcaa45fe | 2,035 | py | Python | racketinterpreter/predefined/_symbol.py | ZibingZhang/racket-interpreter | 20402401ddcbfead0cc028fe214834ef7720b9db | [
"MIT"
] | 2 | 2020-06-09T01:43:15.000Z | 2020-06-25T23:25:45.000Z | racketinterpreter/predefined/_symbol.py | ZibingZhang/racket-interpreter | 20402401ddcbfead0cc028fe214834ef7720b9db | [
"MIT"
] | 1 | 2021-02-02T23:46:55.000Z | 2021-02-02T23:46:55.000Z | racketinterpreter/predefined/_symbol.py | ZibingZhang/racket-interpreter | 20402401ddcbfead0cc028fe214834ef7720b9db | [
"MIT"
] | null | null | null | from __future__ import annotations
import typing as tp
if tp.TYPE_CHECKING:
| 29.071429 | 91 | 0.649631 | from __future__ import annotations
import typing as tp
from racketinterpreter.classes import data as d
from racketinterpreter.classes import errors as err
from racketinterpreter.predefined._base import BuiltInProc
if tp.TYPE_CHECKING:
from racketinterpreter.classes import ast
from racketinterpreter.processes i... | 0 | 1,489 | 0 | 82 | 0 | 0 | 0 | 143 | 241 |
51eea1c1e038fc63b707ac70d1a882e36370b93e | 1,155 | py | Python | src/solution_794b24be.py | MoizSM/ARC | f04b696f32a02db682271187f16ab8b1ffa1cfeb | [
"Apache-2.0"
] | null | null | null | src/solution_794b24be.py | MoizSM/ARC | f04b696f32a02db682271187f16ab8b1ffa1cfeb | [
"Apache-2.0"
] | null | null | null | src/solution_794b24be.py | MoizSM/ARC | f04b696f32a02db682271187f16ab8b1ffa1cfeb | [
"Apache-2.0"
] | null | null | null |
solve() | 36.09375 | 132 | 0.499567 | import sys
import json
import numpy as np
def solve(): #Function that contains the logic to solve the task
with open(sys.argv[1] , 'r') as f:
data = json.load(f) #Parsing the JSON file.
var = ['train' , 'test']
#Running for all the training and testing inputs
for z in var:
for n in ran... | 0 | 0 | 0 | 0 | 0 | 1,073 | 0 | -24 | 89 |
a351715bd030ece07ed0ad9c9e6f3fe8b928150c | 878 | py | Python | ampa/cole/migrations/0008_alumne_to_many.py | jordiprats/django-ampa | b8e9d6076c32caa8bdc11094362ddccb12d95f8c | [
"Apache-2.0"
] | null | null | null | ampa/cole/migrations/0008_alumne_to_many.py | jordiprats/django-ampa | b8e9d6076c32caa8bdc11094362ddccb12d95f8c | [
"Apache-2.0"
] | null | null | null | ampa/cole/migrations/0008_alumne_to_many.py | jordiprats/django-ampa | b8e9d6076c32caa8bdc11094362ddccb12d95f8c | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.0.5 on 2020-11-28 14:53
| 29.266667 | 127 | 0.634396 | # Generated by Django 3.0.5 on 2020-11-28 14:53
from django.db import migrations, models
import django.db.models.deletion
def forward(apps, schema_editor):
Alumne = apps.get_model("cole", "Alumne")
for alumne in Alumne.objects.all():
alumne.classes.add(alumne.classe)
class Migration(migrations.Migrat... | 0 | 0 | 0 | 569 | 0 | 140 | 0 | 30 | 91 |
bf4380d0dc7511bd18cb8a9b7d036c28f6afddd5 | 1,216 | py | Python | model/dataset/dataset.py | qiaofengsheng/Pytorch-Image-Classifier-Collection | b95a07451c6c169639af9a4f6f5e074055570828 | [
"MulanPSL-1.0"
] | 3 | 2022-01-29T07:25:40.000Z | 2022-03-06T15:20:39.000Z | model/dataset/dataset.py | qiaofengsheng/Pytorch-Image-Classifier-Collection | b95a07451c6c169639af9a4f6f5e074055570828 | [
"MulanPSL-1.0"
] | null | null | null | model/dataset/dataset.py | qiaofengsheng/Pytorch-Image-Classifier-Collection | b95a07451c6c169639af9a4f6f5e074055570828 | [
"MulanPSL-1.0"
] | 1 | 2022-03-06T18:01:19.000Z | 2022-03-06T18:01:19.000Z | '''
_*_coding:utf-8 _*_
@Time :2022/1/28 19:00
@Author : qiaofengsheng
@File :dataset.py
@Software :PyCharm
'''
| 29.658537 | 73 | 0.625822 | '''
_*_coding:utf-8 _*_
@Time :2022/1/28 19:00
@Author : qiaofengsheng
@File :dataset.py
@Software :PyCharm
'''
import os
from PIL import Image
from torch.utils.data import *
from model.utils import utils
from torchvision import transforms
class ClassDataset(Dataset):
def __init__(self, data_di... | 0 | 0 | 0 | 933 | 0 | 0 | 0 | 18 | 134 |
3aa72ac8757e08fce59031b12faa36a550dc500e | 1,388 | py | Python | compute_nads.py | gortizji/linearized-networks | 3c271fb0a6c6bdffa9c1aabd8497f8803b725731 | [
"MIT"
] | 6 | 2021-11-15T07:09:21.000Z | 2022-01-26T10:12:07.000Z | compute_nads.py | gortizji/linearized-networks | 3c271fb0a6c6bdffa9c1aabd8497f8803b725731 | [
"MIT"
] | 1 | 2021-12-21T19:54:12.000Z | 2022-03-31T10:54:41.000Z | compute_nads.py | gortizji/linearized-networks | 3c271fb0a6c6bdffa9c1aabd8497f8803b725731 | [
"MIT"
] | 1 | 2021-12-21T03:33:20.000Z | 2021-12-21T03:33:20.000Z |
if __name__ == "__main__":
main()
| 28.326531 | 90 | 0.729107 | import os
import hydra
import jax
import jax.numpy as jnp
from flax.serialization import to_state_dict
from omegaconf import DictConfig, OmegaConf
from models.jax import get_model
from neural_kernels.nads import mixed_derivative_nad_decomposition
from utils.misc import get_apply_fn
@hydra.main(config_path="config/c... | 0 | 1,039 | 0 | 0 | 0 | 0 | 0 | 85 | 223 |
96a037cf665d372ee897e3e0fead1ed297bca97f | 2,678 | py | Python | youtube_video_scraper.py | minimaxir/youtube-video-scraper | a5332f070f4dd27ef54d86b4aef718b9073692aa | [
"MIT"
] | 19 | 2021-05-20T18:47:34.000Z | 2022-01-10T11:52:03.000Z | youtube_video_scraper.py | minimaxir/youtube-video-scraper | a5332f070f4dd27ef54d86b4aef718b9073692aa | [
"MIT"
] | null | null | null | youtube_video_scraper.py | minimaxir/youtube-video-scraper | a5332f070f4dd27ef54d86b4aef718b9073692aa | [
"MIT"
] | 2 | 2021-10-09T18:44:55.000Z | 2022-01-31T17:56:48.000Z | import yaml
import csv
import os
from tqdm import tqdm
import requests
import time
with open("config.yml", "r", encoding="utf-8") as f:
config = yaml.safe_load(f)
API_KEY = config["API_KEY"]
CHANNELS_API_URL = "https://www.googleapis.com/youtube/v3/channels"
PLAYLIST_API_URL = "https://www.googleapis.com/youtub... | 30.431818 | 84 | 0.605302 | import yaml
import csv
import os
from tqdm import tqdm
import requests
import time
def process_video(video_snippet):
temp_dict = {}
temp_dict["video_id"] = video_snippet["resourceId"]["videoId"]
temp_dict["title"] = video_snippet["title"]
temp_dict["video_published_at"] = video_snippet["publishedAt"]
... | 0 | 0 | 0 | 0 | 0 | 234 | 0 | 0 | 23 |
a7ae004d197716589d3b70fcaee6b224af5dd3b6 | 231 | py | Python | workSpace/esp32neopixeltest.py | khutson/macequilt | a4a090ddf296fcea763825fda4243bc84b4d5f0d | [
"MIT"
] | null | null | null | workSpace/esp32neopixeltest.py | khutson/macequilt | a4a090ddf296fcea763825fda4243bc84b4d5f0d | [
"MIT"
] | null | null | null | workSpace/esp32neopixeltest.py | khutson/macequilt | a4a090ddf296fcea763825fda4243bc84b4d5f0d | [
"MIT"
] | null | null | null | from neopixel import NeoPixel
import machine
import time
np = NeoPixel(machine.Pin(4),1)
for r in range(255):
for g in range(255):
for b in range(255):
np[0]=((r,g,b))
np.write()
time.sleep_ms(10)
| 15.4 | 31 | 0.606061 | from neopixel import NeoPixel
import machine
import time
np = NeoPixel(machine.Pin(4),1)
for r in range(255):
for g in range(255):
for b in range(255):
np[0]=((r,g,b))
np.write()
time.sleep_ms(10)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d895d2119c18fb0dbae41dc21f1ac8211c55d97f | 3,016 | py | Python | wbia_pie_v2/models/efficientnet.py | dylanirion/wbia-plugin-pie-v2 | 8ae37c2ad218e5e888bb1aea039f1b04a3fe9d8d | [
"Apache-2.0"
] | null | null | null | wbia_pie_v2/models/efficientnet.py | dylanirion/wbia-plugin-pie-v2 | 8ae37c2ad218e5e888bb1aea039f1b04a3fe9d8d | [
"Apache-2.0"
] | null | null | null | wbia_pie_v2/models/efficientnet.py | dylanirion/wbia-plugin-pie-v2 | 8ae37c2ad218e5e888bb1aea039f1b04a3fe9d8d | [
"Apache-2.0"
] | 1 | 2021-04-05T23:46:11.000Z | 2021-04-05T23:46:11.000Z | # -*- coding: utf-8 -*-
# Written by Olga Moskvyak (olga.moskvyak@hdr.qut.edu.au)
import logging
import torch.nn as nn
logger = logging.getLogger(__name__)
NAME_EMBEDDING_SIZE = {
'efficientnet-b0': 1280,
'efficientnet-b1': 1280,
'efficientnet-b2': 1408,
'efficientnet-b3': 1536,
'efficientnet-b4... | 28.72381 | 99 | 0.618037 | # -*- coding: utf-8 -*-
# Written by Olga Moskvyak (olga.moskvyak@hdr.qut.edu.au)
import logging
import torch.nn as nn
from torchvision import models as torchmodels # NOQA
from efficientnet_pytorch import EfficientNet
logger = logging.getLogger(__name__)
NAME_EMBEDDING_SIZE = {
'efficientnet-b0': 1280,
'ef... | 0 | 0 | 0 | 2,205 | 0 | 245 | 0 | 48 | 98 |
fa72870226cae55f6adc9d6ec167b5fc30470890 | 761 | py | Python | algorithm/raw_sum.py | hibikisan2018/learn_python | b0f9c82e1823782a59019882cae3523fbf533aa0 | [
"BSD-2-Clause"
] | 1 | 2019-05-04T05:23:46.000Z | 2019-05-04T05:23:46.000Z | algorithm/raw_sum.py | hibikisan2018/learn_python | b0f9c82e1823782a59019882cae3523fbf533aa0 | [
"BSD-2-Clause"
] | null | null | null | algorithm/raw_sum.py | hibikisan2018/learn_python | b0f9c82e1823782a59019882cae3523fbf533aa0 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Refer to "https://hibiki-press.tech/algorithm/sum_2darray/698"
@author: hibikisan
"""
import random
if __name__ == '__main__':
dim = (5, 3) # the dimension of original data array
data = []
for i in range(dim[0]):
data.append([random.randi... | 21.742857 | 67 | 0.546649 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Refer to "https://hibiki-press.tech/algorithm/sum_2darray/698"
@author: hibikisan
"""
import random
def raw_sum(data):
for i in data:
sum_ = 0
for j in range(len(i)):
sum_ += i[j]
i.append(sum_)
return data
if __n... | 0 | 0 | 0 | 0 | 0 | 134 | 0 | 0 | 23 |
a7f57df51d5609d8d6a099be39d77ff18d29c83c | 20,228 | py | Python | src/moca_modules/moca_log.py | el-ideal-ideas/MocaUsersAPI | 8acc17d14ad1e3c57142b24a812a1806c44180a5 | [
"MIT"
] | 6 | 2020-04-12T08:43:27.000Z | 2020-06-03T07:03:19.000Z | src/moca_modules/moca_log.py | el-ideal-ideas/MocaUsersAPI | 8acc17d14ad1e3c57142b24a812a1806c44180a5 | [
"MIT"
] | null | null | null | src/moca_modules/moca_log.py | el-ideal-ideas/MocaUsersAPI | 8acc17d14ad1e3c57142b24a812a1806c44180a5 | [
"MIT"
] | 1 | 2020-06-26T18:12:47.000Z | 2020-06-26T18:12:47.000Z | # *
#
#
#
#
#
#
#
#
#
#
#
#
#
#
"""
Copyright (c) 2020.5.28 [el.ideal-ideas]
This software is released under the MIT License.
see LICENSE.txt or following URL.
https://www.el-ideal-ideas.com/MocaSystem/LICENSE/
"""
# -- Imports ----------------------------------------------... | 36.121429 | 115 | 0.562636 | # Ω*
# ■ ■■■■■
# ■ ■■ ■■
# ■ ■■ ■
# ■ ■■
# ■■■■■ ■ ■■■
# ■■ ■■ ■ ■■■
# ■■ ■■ ■ ■■■■
# ■■ ■■ ■ ■■■■
# ■■■■■■■■■ ■ ■■■
... | 1,256 | 1,365 | 5,309 | 11,432 | 0 | 0 | 0 | 160 | 334 |
4b507bf64e3654ff7c0698713e9656acd7b4e1f7 | 334 | py | Python | code_test.py | twhughes/Finite-Difference-Frequency-Domain | e97739a40860305259ee7f53a052174a2697df0d | [
"MIT"
] | 1 | 2019-11-10T05:17:39.000Z | 2019-11-10T05:17:39.000Z | code_test.py | twhughes/Finite-Difference-Frequency-Domain | e97739a40860305259ee7f53a052174a2697df0d | [
"MIT"
] | null | null | null | code_test.py | twhughes/Finite-Difference-Frequency-Domain | e97739a40860305259ee7f53a052174a2697df0d | [
"MIT"
] | null | null | null | from NN import NN
import numpy as np
layer_sizes = [2,4,1]
activations = ['relu','sigmoid']
N = NN(layer_sizes,activations)
#print(N.biases[4].shape)
input = np.array([[1,2,3],[3,5,4]])
N.forward_prop(input)
N.back_prop(np.array([[1,2,3]]))
N.derivative_check(m=6,verbose=False)
N.update_weights()
| 18.555556 | 37 | 0.706587 | from NN import NN
import numpy as np
import matplotlib.pylab as plt
layer_sizes = [2,4,1]
activations = ['relu','sigmoid']
N = NN(layer_sizes,activations)
#print(N.biases[4].shape)
input = np.array([[1,2,3],[3,5,4]])
N.forward_prop(input)
N.back_prop(np.array([[1,2,3]]))
N.derivative_check(m=6,verbose=False)
N.updat... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 22 |
e369600bb8c77456462727ac300a097d3fd556bc | 25,316 | py | Python | atlas/lib/idds/atlas/workflow/atlaspandawork.py | wguanicedew/iDDS | ff3e8eadda3c7a7f8c87f0e68e06dbe02b7278e5 | [
"Apache-2.0"
] | null | null | null | atlas/lib/idds/atlas/workflow/atlaspandawork.py | wguanicedew/iDDS | ff3e8eadda3c7a7f8c87f0e68e06dbe02b7278e5 | [
"Apache-2.0"
] | null | null | null | atlas/lib/idds/atlas/workflow/atlaspandawork.py | wguanicedew/iDDS | ff3e8eadda3c7a7f8c87f0e68e06dbe02b7278e5 | [
"Apache-2.0"
] | 1 | 2020-05-27T13:04:38.000Z | 2020-05-27T13:04:38.000Z | #!/usr/bin/env python
#
# 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.0OA
#
# Authors:
# - Wen Guan, <wen.guan@cern.ch>, 2020 - 2021
try:
impor... | 49.252918 | 1,843 | 0.60918 | #!/usr/bin/env python
#
# 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.0OA
#
# Authors:
# - Wen Guan, <wen.guan@cern.ch>, 2020 - 2021
try:
impor... | 0 | 0 | 0 | 24,432 | 0 | 0 | 0 | 179 | 250 |
bfe5be08375a6dd3c112ad918030bbe369fe8e25 | 8,340 | py | Python | file_parser.py | bcbogdan/lisa-parser | 08b636ef1d5ebafc076da11c84e92765cbc381bf | [
"Apache-2.0"
] | null | null | null | file_parser.py | bcbogdan/lisa-parser | 08b636ef1d5ebafc076da11c84e92765cbc381bf | [
"Apache-2.0"
] | null | null | null | file_parser.py | bcbogdan/lisa-parser | 08b636ef1d5ebafc076da11c84e92765cbc381bf | [
"Apache-2.0"
] | null | null | null | """
Linux on Hyper-V and Azure Test Code, ver. 1.0.0
Copyright (c) Microsoft Corporation
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/LICEN... | 34.320988 | 83 | 0.556715 | """
Linux on Hyper-V and Azure Test Code, ver. 1.0.0
Copyright (c) Microsoft Corporation
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/LICEN... | 0 | 2,064 | 0 | 1,768 | 0 | 0 | 0 | -11 | 45 |
b06c6d5d0112f1268854aa1a8670da026490b05f | 12,363 | py | Python | adaptive/interface/adaptive/ttypes.py | scwolof/adaptive | 9f7475400aa0469778cb60d5ce9c95d9ca359174 | [
"MIT"
] | null | null | null | adaptive/interface/adaptive/ttypes.py | scwolof/adaptive | 9f7475400aa0469778cb60d5ce9c95d9ca359174 | [
"MIT"
] | null | null | null | adaptive/interface/adaptive/ttypes.py | scwolof/adaptive | 9f7475400aa0469778cb60d5ce9c95d9ca359174 | [
"MIT"
] | null | null | null | #
# Autogenerated by Thrift Compiler (0.11.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py
#
from thrift.Thrift import TType
from thrift.TRecursive import fix_spec
import adaptive.interface.constants.datatypes.ttypes
import adaptive.interface.constants.exceptions.ttypes
... | 33.871233 | 134 | 0.568632 | #
# Autogenerated by Thrift Compiler (0.11.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py
#
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
from thrift.protocol.TProtocol import TProtocolException
from thrift.TRecursive impo... | 0 | 0 | 0 | 10,523 | 0 | 0 | 0 | 104 | 160 |
d52704885e710e3feeb3ec02460d3b66440f0656 | 3,416 | py | Python | dataset-tf.py | harrywang/chinese-calligraphy-dataset | 92c9cf3cba044f00812639fdd7d8b5b1e98d6b2a | [
"Apache-2.0"
] | 10 | 2020-12-14T05:08:03.000Z | 2022-03-24T13:55:10.000Z | dataset-tf.py | harrywang/chinese-calligraphy-dataset | 92c9cf3cba044f00812639fdd7d8b5b1e98d6b2a | [
"Apache-2.0"
] | null | null | null | dataset-tf.py | harrywang/chinese-calligraphy-dataset | 92c9cf3cba044f00812639fdd7d8b5b1e98d6b2a | [
"Apache-2.0"
] | 3 | 2020-10-05T12:54:59.000Z | 2022-03-22T03:58:01.000Z | import numpy as np
if __name__ == '__main__':
import matplotlib.pyplot as plt
batch_size = 8
sample_batch_num = 4
dataset = CalligraphyDataset(data_dir='./data/chinese-calligraphy-dataset/',
character_csv='./data/label_character.csv',
batch... | 34.16 | 113 | 0.604508 | import tensorflow as tf
import os
import pathlib
import numpy as np
class CalligraphyDataset:
def _process_path(self, file_path):
# read images from file
# and then convert RGB to grayscale
# for the images only have black and white
img = tf.io.read_file(file_path)
img = ... | 3 | 0 | 0 | 2,258 | 0 | 0 | 0 | -17 | 89 |
d8862b356539452c39a1b4172bc9c903c6711dfb | 1,675 | py | Python | interactive.py | ilSommo/rate-severity-of-toxic-comments | c0c28475c4d83eeeea72012df6911fc10ba0edbf | [
"MIT"
] | 1 | 2022-02-25T18:37:02.000Z | 2022-02-25T18:37:02.000Z | interactive.py | ilSommo/rate-severity-of-toxic-comments | c0c28475c4d83eeeea72012df6911fc10ba0edbf | [
"MIT"
] | null | null | null | interactive.py | ilSommo/rate-severity-of-toxic-comments | c0c28475c4d83eeeea72012df6911fc10ba0edbf | [
"MIT"
] | null | null | null | __version__ = '1.0.0-rc.1'
__author__ = 'Lorenzo Menghini, Martino Pulici, Alessandro Stockman, Luca Zucchini'
import argparse
import pandas as pd
import torch
from rate_severity_of_toxic_comments.model import create_model
from rate_severity_of_toxic_comments.utilities import parse_config, process_config
DEFAULT_... | 27.916667 | 83 | 0.644776 | __version__ = '1.0.0-rc.1'
__author__ = 'Lorenzo Menghini, Martino Pulici, Alessandro Stockman, Luca Zucchini'
import argparse
import pandas as pd
import torch
from rate_severity_of_toxic_comments.model import create_model
from rate_severity_of_toxic_comments.utilities import parse_config, process_config
DEFAULT_... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
87e8c794bd6b41de02e02249cde7d720c0a22080 | 3,945 | py | Python | cre.py | flowirtz/common-requirement-enumeration | c89b7bad18e7a62e247e7250100ef834fbfe1456 | [
"CC0-1.0"
] | null | null | null | cre.py | flowirtz/common-requirement-enumeration | c89b7bad18e7a62e247e7250100ef834fbfe1456 | [
"CC0-1.0"
] | null | null | null | cre.py | flowirtz/common-requirement-enumeration | c89b7bad18e7a62e247e7250100ef834fbfe1456 | [
"CC0-1.0"
] | null | null | null | import os
from flask_migrate import Migrate # type: ignore
from application import create_app, sqla # type: ignore
# Hacky solutions to make this both a command line application with argparse and a flask application
app = create_app(mode=os.getenv("FLASK_CONFIG") or "default")
migrate = Migrate(app, sqla, render_a... | 31.814516 | 127 | 0.65019 | import argparse
import os
import sys
import unittest
from typing import List
import click # type: ignore
import coverage # type: ignore
from flask_migrate import Migrate # type: ignore
from application import create_app, sqla # type: ignore
from application.cmd import cre_main
# Hacky solutions to make this both... | 0 | 1,116 | 0 | 0 | 0 | 2,158 | 0 | -21 | 233 |
4721e0326315f8d91204ee9ea647d2bb2acb85af | 4,419 | py | Python | src/virtual_de1soc.py | weiernt/virtual-de1soc | e3405a18fbb9c07c98463a98aaacb8afe26716ea | [
"Python-2.0",
"OLDAP-2.3",
"OLDAP-2.8"
] | 7 | 2020-05-05T05:52:49.000Z | 2021-05-17T12:36:55.000Z | src/virtual_de1soc.py | weiernt/virtual-de1soc | e3405a18fbb9c07c98463a98aaacb8afe26716ea | [
"Python-2.0",
"OLDAP-2.3",
"OLDAP-2.8"
] | 22 | 2020-05-27T08:34:57.000Z | 2021-05-03T14:59:07.000Z | src/virtual_de1soc.py | weiernt/virtual-de1soc | e3405a18fbb9c07c98463a98aaacb8afe26716ea | [
"Python-2.0",
"OLDAP-2.3",
"OLDAP-2.8"
] | 1 | 2021-05-04T01:04:40.000Z | 2021-05-04T01:04:40.000Z | import ascii_ui
screenIO = ascii_ui.ScreenIO()
screenIO.renderMessage("Config loading...")
configuration = initialise(screenIO)
run_lib(screenIO, configuration)
run_compile(screenIO, configuration)
run_simulation(screenIO, configuration)
| 28.326923 | 104 | 0.719167 | import fpga
import modelsim
import config_manager
import ascii_ui
import os
import time
import pathlib
import keyboard
def get_key_stroke():
keyevents = keyboard.stop_recording()
keyboard.start_recording()
keylist = []
for event in keyevents:
if event.event_type == "down":
if event.name not in keylist:
k... | 0 | 0 | 0 | 0 | 0 | 3,955 | 0 | -51 | 270 |
99d2314f7f503b983874f71b34cfeda2a9a10fd6 | 1,950 | py | Python | dns_sprockets_lib/validators/rrsig_orphan.py | roeckelein/sprocket | 8e7f9acf4d330d7b1005ba7a2ae8b644571f11fb | [
"Apache-2.0"
] | 7 | 2015-09-11T04:08:12.000Z | 2021-01-04T21:47:30.000Z | dns_sprockets_lib/validators/rrsig_orphan.py | roeckelein/sprocket | 8e7f9acf4d330d7b1005ba7a2ae8b644571f11fb | [
"Apache-2.0"
] | null | null | null | dns_sprockets_lib/validators/rrsig_orphan.py | roeckelein/sprocket | 8e7f9acf4d330d7b1005ba7a2ae8b644571f11fb | [
"Apache-2.0"
] | null | null | null | '''
rrsig_orphan - Record test: RrsigOrphan
.. Copyright (c) 2015 Neustar, Inc. All rights reserved.
.. See COPYRIGHT.txt for full notice. See LICENSE.txt for terms and conditions.
'''
import dns.rdtypes.ANY.RRSIG
import dns_sprockets_lib.validators as validators
# end of file
| 30 | 92 | 0.608718 | '''
rrsig_orphan - Record test: RrsigOrphan
.. Copyright (c) 2015 Neustar, Inc. All rights reserved.
.. See COPYRIGHT.txt for full notice. See LICENSE.txt for terms and conditions.
'''
import time
import dns.rdtypes.ANY.RRSIG
import dns.dnssec
import dns_sprockets_lib.validators as validators
class RrsigOrphan(... | 0 | 0 | 0 | 1,611 | 0 | 0 | 0 | -14 | 68 |
36536755edb2e6bd4a2e3ce5501ab142294d5898 | 5,100 | py | Python | ModulemdTranslationHelpers/cli.py | sgallagher/ModulemdTranslationHelpers | a8fc0d786b4afa646ac3e017b719bdcce496522a | [
"MIT"
] | null | null | null | ModulemdTranslationHelpers/cli.py | sgallagher/ModulemdTranslationHelpers | a8fc0d786b4afa646ac3e017b719bdcce496522a | [
"MIT"
] | null | null | null | ModulemdTranslationHelpers/cli.py | sgallagher/ModulemdTranslationHelpers | a8fc0d786b4afa646ac3e017b719bdcce496522a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# This file is part of ModulemdTranslationHelpers
# Copyright (C) 2018 Stephen Gallagher
#
# Fedora-License-Identifier: MIT
# SPDX-2.0-License-Identifier: MIT
# SPDX-3.0-License-Identifier: MIT
#
# This program is free software.
# For more information on the license, see COPYING.
# For more info... | 36.428571 | 78 | 0.546078 | # -*- coding: utf-8 -*-
# This file is part of ModulemdTranslationHelpers
# Copyright (C) 2018 Stephen Gallagher
#
# Fedora-License-Identifier: MIT
# SPDX-2.0-License-Identifier: MIT
# SPDX-3.0-License-Identifier: MIT
#
# This program is free software.
# For more information on the license, see COPYING.
# For more info... | 0 | 3,076 | 0 | 0 | 0 | 0 | 0 | 232 | 292 |
16891a91672520f3f4e34f0fed1c6dff57615f3a | 444 | py | Python | cert_tool/database.py | never00rei/cert_tool | 07928bfdf59627b0f3cbc55d3cccc756c29dbec5 | [
"MIT"
] | null | null | null | cert_tool/database.py | never00rei/cert_tool | 07928bfdf59627b0f3cbc55d3cccc756c29dbec5 | [
"MIT"
] | null | null | null | cert_tool/database.py | never00rei/cert_tool | 07928bfdf59627b0f3cbc55d3cccc756c29dbec5 | [
"MIT"
] | null | null | null | from sqlalchemy import Column, Integer, Text, Table
from sqlalchemy.ext.declarative import declarative_base
base = declarative_base()
certs = Table(
"ssl_certificates",
base.metadata,
Column("cert_id", Integer, primary_key=True, nullable=False),
Column("cert_hostname", Text, nullable=False),
Colum... | 27.75 | 65 | 0.763514 | import datetime
from sqlalchemy import Column, Integer, Text, Table, DateTime
from sqlalchemy.orm import relationship, backref
from sqlalchemy.ext.declarative import declarative_base
base = declarative_base()
certs = Table(
"ssl_certificates",
base.metadata,
Column("cert_id", Integer, primary_key=True, nu... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 44 |
57b96e2ecbc98aec697e4e1fb2cefa03fd7166db | 8,552 | py | Python | Autorigger/scripts/dataNodeManager.py | danOrzc/HeavyDutyVehicle | 3954314a8ec8101003a8691aeced408c83981bc6 | [
"MIT"
] | null | null | null | Autorigger/scripts/dataNodeManager.py | danOrzc/HeavyDutyVehicle | 3954314a8ec8101003a8691aeced408c83981bc6 | [
"MIT"
] | null | null | null | Autorigger/scripts/dataNodeManager.py | danOrzc/HeavyDutyVehicle | 3954314a8ec8101003a8691aeced408c83981bc6 | [
"MIT"
] | null | null | null | """Rigging data storing.
This script has functions that allows maya to save the rigging tool process
results inside an empty network node that doesn't have transform info.
It is in charge of creating the node and the attributes to store the data.
It can also query the data or delete the attributes.
We are using this... | 37.182609 | 128 | 0.684986 | """Rigging data storing.
This script has functions that allows maya to save the rigging tool process
results inside an empty network node that doesn't have transform info.
It is in charge of creating the node and the attributes to store the data.
It can also query the data or delete the attributes.
We are using this... | 0 | 0 | 0 | 1,402 | 0 | 0 | 0 | 0 | 23 |
bdc72d2e2682ca17e97115fa3e5b4f56f301576d | 1,921 | py | Python | aries_cloudagent/protocols/revocation_notification/v1_0/handlers/tests/test_revoke_handler.py | kuraakhilesh8230/aries-cloudagent-python | ee384d1330f6a50ff45a507392ce54f92900f23a | [
"Apache-2.0"
] | 4 | 2019-07-01T13:12:50.000Z | 2019-07-02T20:01:37.000Z | aries_cloudagent/protocols/revocation_notification/v1_0/handlers/tests/test_revoke_handler.py | kuraakhilesh8230/aries-cloudagent-python | ee384d1330f6a50ff45a507392ce54f92900f23a | [
"Apache-2.0"
] | 51 | 2021-01-12T05:50:50.000Z | 2022-03-25T06:03:13.000Z | aries_cloudagent/protocols/revocation_notification/v1_0/handlers/tests/test_revoke_handler.py | kuraakhilesh8230/aries-cloudagent-python | ee384d1330f6a50ff45a507392ce54f92900f23a | [
"Apache-2.0"
] | 12 | 2019-06-24T22:17:44.000Z | 2019-07-02T19:49:31.000Z | """Test RevokeHandler."""
| 27.84058 | 78 | 0.756897 | """Test RevokeHandler."""
import pytest
from ......config.settings import Settings
from ......core.event_bus import EventBus, MockEventBus
from ......core.in_memory import InMemoryProfile
from ......core.profile import Profile
from ......messaging.request_context import RequestContext
from ......messaging.responder i... | 0 | 1,317 | 0 | 0 | 0 | 0 | 0 | 210 | 361 |
ecf2055ea110bcb9f0572f57c0cfa8cc49cbc007 | 11,805 | py | Python | synthesis/write_java.py | jajajaqlt/nsg | 1873f2b5e10441110c3c69940ceb4650f9684ac0 | [
"Apache-2.0"
] | 10 | 2021-11-02T18:30:38.000Z | 2022-03-21T06:31:33.000Z | synthesis/write_java.py | rohanmukh/nag | f2c4b8e60a97c58a6a1c549cc8b4753ebfe8a5e3 | [
"Apache-2.0"
] | 2 | 2021-11-05T18:40:42.000Z | 2022-03-30T04:33:08.000Z | synthesis/write_java.py | rohanmukh/nag | f2c4b8e60a97c58a6a1c549cc8b4753ebfe8a5e3 | [
"Apache-2.0"
] | 2 | 2021-11-03T19:14:06.000Z | 2021-11-03T23:47:09.000Z | # Copyright 2017 Rice University
#
# 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 writin... | 41.421053 | 129 | 0.567302 | # Copyright 2017 Rice University
#
# 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 writin... | 0 | 0 | 0 | 10,743 | 0 | 0 | 0 | 263 | 179 |
01c8ffb32ae80f7960704c7b88ed605914b4e037 | 3,805 | py | Python | finsky/protos/book_doc_details_pb2.py | mmcloughlin/finsky | f21ccdbebf86e55a542c658b6972cb1f3fb5f119 | [
"MIT"
] | 59 | 2015-07-11T18:53:59.000Z | 2021-09-08T03:16:17.000Z | finsky/protos/book_doc_details_pb2.py | mmcloughlin/finsky | f21ccdbebf86e55a542c658b6972cb1f3fb5f119 | [
"MIT"
] | 10 | 2015-07-01T08:09:29.000Z | 2021-12-06T01:23:00.000Z | finsky/protos/book_doc_details_pb2.py | mmcloughlin/finsky | f21ccdbebf86e55a542c658b6972cb1f3fb5f119 | [
"MIT"
] | 14 | 2015-08-15T22:04:02.000Z | 2021-03-03T09:14:39.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: book_doc_details.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection ... | 38.05 | 369 | 0.750066 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: book_doc_details.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8b3e705ea470405e32c4419d8579f4b5bcce600d | 4,095 | py | Python | examples/wallstreetbets-analytics/aggregates/aggregate.py | admariner/beneath | a6aa2c220e4a646be792379528ae673f4bef440b | [
"MIT"
] | 65 | 2021-04-27T13:13:09.000Z | 2022-01-24T00:26:06.000Z | examples/wallstreetbets-analytics/aggregates/aggregate.py | admariner/beneath | a6aa2c220e4a646be792379528ae673f4bef440b | [
"MIT"
] | 22 | 2021-10-06T10:30:40.000Z | 2021-12-10T11:36:55.000Z | examples/wallstreetbets-analytics/aggregates/aggregate.py | admariner/beneath | a6aa2c220e4a646be792379528ae673f4bef440b | [
"MIT"
] | 4 | 2021-04-24T15:29:51.000Z | 2022-03-30T16:20:12.000Z | import asyncio
asyncio.run(main())
| 44.032258 | 172 | 0.689621 | import asyncio
import beneath
from datetime import datetime, timedelta
from config import BLACKLIST
async def main():
client = beneath.Client()
await client.start()
# TABLE 1: indexed by symbol
table = await client.find_table(
"examples/wallstreetbets-analytics/stock-metrics-24h-by-symbol"
... | 0 | 0 | 3,948 | 0 | 0 | 0 | 0 | 19 | 90 |
f7b882e2ba7b43a7c88aa4eb623d02e8e8a6b467 | 476 | py | Python | Python/EXERCICIOS/FOR/CRV054 - FOR.py | ccpn1988/Python | 94c84aa6f3ef9d05d64c3d87212dfd67694f4544 | [
"MIT"
] | null | null | null | Python/EXERCICIOS/FOR/CRV054 - FOR.py | ccpn1988/Python | 94c84aa6f3ef9d05d64c3d87212dfd67694f4544 | [
"MIT"
] | null | null | null | Python/EXERCICIOS/FOR/CRV054 - FOR.py | ccpn1988/Python | 94c84aa6f3ef9d05d64c3d87212dfd67694f4544 | [
"MIT"
] | null | null | null | # 054 - LER ANO DE NASCIMENTO DE 07 PESSOAS E MOSTRAR QUANTAS PESSOAS SO MAIORES DE IDADE.
from datetime import date
atual = date.today().year
tmaior = 0
tmenor = 0
for pessoa in range(1, 8):
nasc = int(input(f'Em que ano {pessoa} a pessoa nasceu? '))
idade = atual - nasc
if idade >= 21:
tmaior += ... | 29.75 | 91 | 0.668067 | # 054 - LER ANO DE NASCIMENTO DE 07 PESSOAS E MOSTRAR QUANTAS PESSOAS SÂO MAIORES DE IDADE.
from datetime import date
atual = date.today().year
tmaior = 0
tmenor = 0
for pessoa in range(1, 8):
nasc = int(input(f'Em que ano {pessoa}° a pessoa nasceu? '))
idade = atual - nasc
if idade >= 21:
tmaior +... | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a6172a57ec332dc717fbcf4654e3a076ea850e06 | 760 | py | Python | app/settings.py | zhenyit/mask_detection | c381e262118ee06a5f6c3d48ce885972ccde217e | [
"MIT"
] | 1 | 2021-02-21T12:07:04.000Z | 2021-02-21T12:07:04.000Z | app/settings.py | zhenyit/mask_detection | c381e262118ee06a5f6c3d48ce885972ccde217e | [
"MIT"
] | null | null | null | app/settings.py | zhenyit/mask_detection | c381e262118ee06a5f6c3d48ce885972ccde217e | [
"MIT"
] | null | null | null | import os
from datetime import timedelta
from dotenv import load_dotenv
load_dotenv()
SECRET_KEY = os.urandom(32)
# SQLite Database Config
APP_PATH = os.path.dirname(os.path.abspath(__file__))
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + APP_PATH + '/models/sqlite.db'
SQLALCHEMY_TRACK_MODIFICATIONS = True
# setting up... | 25.333333 | 71 | 0.738158 | import os
from datetime import timedelta
from dotenv import load_dotenv
load_dotenv()
SECRET_KEY = os.urandom(32)
# SQLite Database Config
APP_PATH = os.path.dirname(os.path.abspath(__file__))
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + APP_PATH + '/models/sqlite.db'
SQLALCHEMY_TRACK_MODIFICATIONS = True
# setting up... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
98f192a8bc04e0f17848096cd40ed569b3cb8d09 | 7,430 | py | Python | TokenScraper/CoinMarketCap Dev API/coincap_ERC-20_DevAPI.py | SamIlic/Web-Scraping | fae1e0b000adda18abff44e4c60fbad77e872314 | [
"MIT"
] | 1 | 2022-02-22T12:15:28.000Z | 2022-02-22T12:15:28.000Z | TokenScraper/CoinMarketCap Dev API/coincap_ERC-20_DevAPI.py | SamIlic/Web-Scraping | fae1e0b000adda18abff44e4c60fbad77e872314 | [
"MIT"
] | null | null | null | TokenScraper/CoinMarketCap Dev API/coincap_ERC-20_DevAPI.py | SamIlic/Web-Scraping | fae1e0b000adda18abff44e4c60fbad77e872314 | [
"MIT"
] | 1 | 2022-02-22T12:15:30.000Z | 2022-02-22T12:15:30.000Z | """
# NOTE (for Sam): Run on "QSTrader" Conda Virtual Enviroment
> "source activate QSTrader"
> Run via "python coincap_ERC-20_ranker.py"
Summary of script
1) Open Top ERC-20 file & create a DataFrame with the info
2) Get ID's for all ERC-20 tokens using Global API
3) Use Ticker(Specific Currency)... | 34.55814 | 142 | 0.664065 | """
# NOTE (for Sam): Run on "QSTrader" Conda Virtual Enviroment
> "source activate QSTrader"
> Run via "python coincap_ERC-20_ranker.py"
Summary of script
1) Open Top ERC-20 file & create a DataFrame with the info
2) Get ID's for all ERC-20 tokens using Global API
3) Use Ticker(Specific Currency)... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -5 | 134 |
95785ab1ca666f93525815ee3dd8bb11851fa2b1 | 862 | py | Python | bot.py | DreamBNC/Python-Service-Bot | 2625e471e332de7a99f1933f82437c54ec97af97 | [
"MIT"
] | 1 | 2016-08-09T21:29:52.000Z | 2016-08-09T21:29:52.000Z | bot.py | DreamBNC/Python-Service-Bot | 2625e471e332de7a99f1933f82437c54ec97af97 | [
"MIT"
] | null | null | null | bot.py | DreamBNC/Python-Service-Bot | 2625e471e332de7a99f1933f82437c54ec97af97 | [
"MIT"
] | null | null | null | # WIP
# DreamBNC Bot 2
# (c) DreamBNC
# Loading essential libraries (needed for connecting to IRC)
import zirc
print("DreamBNC Service Bot")
print("(c) 2016 DreamBNC dev team.")
print("Initalizing.")
# setting variables
bncprovider = DreamBNC
bncweb = dreambnc.xyz
server1 = Mushroom
print("Initalized; connecting..."... | 24.628571 | 62 | 0.726218 | # WIP
# DreamBNC Bot 2
# (c) DreamBNC
# Loading essential libraries (needed for connecting to IRC)
import zirc, ssl
print("DreamBNC Service Bot")
print("(c) 2016 DreamBNC dev team.")
print("Initalizing.")
# setting variables
bncprovider = DreamBNC
bncweb = dreambnc.xyz
server1 = Mushroom
print("Initalized; connectin... | 0 | 0 | 0 | 85 | 0 | 0 | 0 | 5 | 22 |
ff3ee4e0aa72c96a6b61185f57659ec9f099df4c | 3,401 | py | Python | Quantize/Quantizers_test.py | stevenygd/TensorQuant-Experiment | f084b57c22a3c2d4fa49d77b56a35e9017149789 | [
"Apache-2.0"
] | null | null | null | Quantize/Quantizers_test.py | stevenygd/TensorQuant-Experiment | f084b57c22a3c2d4fa49d77b56a35e9017149789 | [
"Apache-2.0"
] | null | null | null | Quantize/Quantizers_test.py | stevenygd/TensorQuant-Experiment | f084b57c22a3c2d4fa49d77b56a35e9017149789 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
import numpy as np
import Quantizers
import struct
hex_lambda = lambda x : hex(struct.unpack('<I', struct.pack('<f', x))[0])
toHex = np.vectorize(hex_lambda)
input_width = input_height = 4
batch_size = 2
input_channels = 2
entries = input_width*input_height*batch_size*input_channels
testdata_... | 29.068376 | 104 | 0.707439 | import tensorflow as tf
import numpy as np
import Quantizers
import math
import time
import struct
from tensorflow.python.ops import standard_ops
from tensorflow.python.ops import nn
hex_lambda = lambda x : hex(struct.unpack('<I', struct.pack('<f', x))[0])
toHex = np.vectorize(hex_lambda)
input_width = input_height... | 0 | 0 | 0 | 0 | 0 | 393 | 0 | 20 | 181 |
298728a2e15813871cd0299700345ed04b777f24 | 3,044 | py | Python | airflow/sensors/hive_partition_sensor.py | suensummit/airflow | 37a342d0e96a91ce2d34085e225a4e86f54c4e21 | [
"Apache-2.0"
] | 3 | 2019-10-03T21:38:59.000Z | 2019-10-04T00:39:03.000Z | airflow/sensors/hive_partition_sensor.py | suensummit/airflow | 37a342d0e96a91ce2d34085e225a4e86f54c4e21 | [
"Apache-2.0"
] | 20 | 2017-04-18T19:47:46.000Z | 2020-01-13T04:19:24.000Z | airflow/sensors/hive_partition_sensor.py | suensummit/airflow | 37a342d0e96a91ce2d34085e225a4e86f54c4e21 | [
"Apache-2.0"
] | 5 | 2017-06-19T19:55:47.000Z | 2020-10-10T00:49:20.000Z | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 40.052632 | 91 | 0.669842 | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 0 | 542 | 0 | 1,546 | 0 | 0 | 0 | 76 | 68 |
56975f404ec591ff536aa967cda09455639f1f89 | 7,627 | py | Python | app/controllers/admin/routes.py | BCStudentSoftwareDevTeam/celts | b14f3aea8fb3777d9e04feafbbb0f23f02ad5cf5 | [
"BSD-3-Clause"
] | null | null | null | app/controllers/admin/routes.py | BCStudentSoftwareDevTeam/celts | b14f3aea8fb3777d9e04feafbbb0f23f02ad5cf5 | [
"BSD-3-Clause"
] | 147 | 2021-06-11T18:27:53.000Z | 2022-03-22T18:50:35.000Z | app/controllers/admin/routes.py | BCStudentSoftwareDevTeam/celts | b14f3aea8fb3777d9e04feafbbb0f23f02ad5cf5 | [
"BSD-3-Clause"
] | 2 | 2021-09-16T18:46:21.000Z | 2021-11-10T19:10:17.000Z | from flask import json
from app.models.eventParticipant import EventParticipant
| 38.715736 | 133 | 0.687164 | from flask import request, render_template, url_for, g, Flask, redirect, flash, abort, json, jsonify, session
from peewee import DoesNotExist
from playhouse.shortcuts import model_to_dict, dict_to_model
import json
from datetime import datetime
from dateutil import parser
from app import app
from app.models.program im... | 0 | 6,067 | 0 | 0 | 0 | 0 | 0 | 719 | 759 |
a04c386a7755577c38e7b1543dff12ea31edb648 | 2,259 | py | Python | abrir_cam.py | kbueso/Python | a18a23bbf6ba3f214c2ed751a20348fe415c6dbe | [
"MIT"
] | null | null | null | abrir_cam.py | kbueso/Python | a18a23bbf6ba3f214c2ed751a20348fe415c6dbe | [
"MIT"
] | null | null | null | abrir_cam.py | kbueso/Python | a18a23bbf6ba3f214c2ed751a20348fe415c6dbe | [
"MIT"
] | null | null | null | import cv2 as cv
import functions
import os
cam = cv.VideoCapture(0) #Iniciando WebCam
file_name = "haarcascade_frontalface_alt2.xml"
classifier = cv.CascadeClassifier(f"{cv.haarcascades}{os.sep}{file_name}") #Modelo para reconhecer faces
dataframe = functions.load_dataframe() #Cargando dataframe com las imagenes par... | 35.296875 | 132 | 0.654714 | import cv2 as cv
import functions
import os
cam = cv.VideoCapture(0) #Iniciando WebCam
file_name = "haarcascade_frontalface_alt2.xml"
classifier = cv.CascadeClassifier(f"{cv.haarcascades}{os.sep}{file_name}") #Modelo para reconhecer faces
dataframe = functions.load_dataframe() #Cargando dataframe com las imagenes par... | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d2a0ec8516b7c6d8905c9cf4d37d838a8a61333c | 1,911 | py | Python | app/images.py | jkpawlowski96/Web-scraper | 5b6db52198b10e6de619a4db7e5a1ba652e98c45 | [
"MIT"
] | 1 | 2021-05-16T16:30:37.000Z | 2021-05-16T16:30:37.000Z | app/images.py | jkpawlowski96/Web-scraper | 5b6db52198b10e6de619a4db7e5a1ba652e98c45 | [
"MIT"
] | null | null | null | app/images.py | jkpawlowski96/Web-scraper | 5b6db52198b10e6de619a4db7e5a1ba652e98c45 | [
"MIT"
] | null | null | null | from PIL import Image
import urllib.request as request
import requests
from io import BytesIO
from bs4 import BeautifulSoup
def get_images_links(address):
"""
Scrap website from images links
:param address: website address example: https://www.youtube.com/
:return: images links
"""
page = requ... | 24.818182 | 92 | 0.644689 | from PIL import Image
import urllib.request as request
import requests
from io import BytesIO, StringIO
from bs4 import BeautifulSoup
import numpy as np
def get_images_links(address):
"""
Scrap website from images links
:param address: website address example: https://www.youtube.com/
:return: images ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 22 |
976023701895aae99b62d02a4f829bb4c063b92c | 7,200 | py | Python | model/dsc.py | Mhaiyang/iccv | 04a8ee52c2323d7ff5cdf03c0be1466e8180d2eb | [
"MIT"
] | 2 | 2019-01-10T03:44:03.000Z | 2019-05-24T08:50:14.000Z | model/dsc.py | Mhaiyang/iccv | 04a8ee52c2323d7ff5cdf03c0be1466e8180d2eb | [
"MIT"
] | null | null | null | model/dsc.py | Mhaiyang/iccv | 04a8ee52c2323d7ff5cdf03c0be1466e8180d2eb | [
"MIT"
] | null | null | null | """
@Time : 2019-1-9 04:41
@Author : TaylorMei
@Email : mhy845879017@gmail.com
@Project : iccv
@File : dsc.py
@Function:
"""
# Module Function
# Module Class
# Network Class
| 38.709677 | 114 | 0.650833 | """
@Time : 2019-1-9 04:41
@Author : TaylorMei
@Email : mhy845879017@gmail.com
@Project : iccv
@File : dsc.py
@Function:
"""
import torch
import torch.nn.functional as F
from torch import nn
from backbone.resnext.resnext101_regular import ResNeXt101
# Module Function
# Module Class
clas... | 0 | 0 | 0 | 6,774 | 0 | 0 | 0 | 37 | 179 |
e2b1f43d3ecbc2dea164169f5ea8f19cfc51fd32 | 756 | py | Python | utils/discriminators/DiscriminatorGAN.py | ynakaDream/Deep-Learning-GANs | 2e00405079c131245f4dd23eb494a27a2b12598d | [
"MIT"
] | 4 | 2019-01-14T04:38:51.000Z | 2020-02-13T20:38:10.000Z | utils/discriminators/DiscriminatorGAN.py | ynakaDream/Deep-Learning-GANs | 2e00405079c131245f4dd23eb494a27a2b12598d | [
"MIT"
] | null | null | null | utils/discriminators/DiscriminatorGAN.py | ynakaDream/Deep-Learning-GANs | 2e00405079c131245f4dd23eb494a27a2b12598d | [
"MIT"
] | null | null | null | import torch.nn as nn
| 31.5 | 57 | 0.596561 | import torch.nn as nn
import torch.nn.functional as F
class DiscriminatorGAN(nn.Module):
def __init__(self, input, output):
super().__init__()
self.fc1 = nn.Linear(input, 128)
self.fc2 = nn.Linear(128, 256)
self.fc3 = nn.Linear(256, 512)
self.fc4 = nn.Linear(512, 1024)
... | 0 | 0 | 0 | 678 | 0 | 0 | 0 | 10 | 45 |
e1e1b6141776eb67390f56f962e945f8ae672af2 | 735 | py | Python | NitrotypePy/api/access.py | RangerEmerald/NitrotypePy | b68e9ce8918708778def249c2f57ffc49926d805 | [
"MIT"
] | 1 | 2022-02-02T03:06:58.000Z | 2022-02-02T03:06:58.000Z | NitrotypePy/api/access.py | RangerEmerald/NitrotypePy | b68e9ce8918708778def249c2f57ffc49926d805 | [
"MIT"
] | null | null | null | NitrotypePy/api/access.py | RangerEmerald/NitrotypePy | b68e9ce8918708778def249c2f57ffc49926d805 | [
"MIT"
] | null | null | null | try:
import cloudscraper
except ModuleNotFoundError:
raise ModuleNotFoundError("Unable to load cloudscraper")
def access(endpoint=""):
"""The function used to access the entirety of nitrotype.
Endpoint
--------
https://www.nitrotype.com/{endpoint}
endpoint : str
The end url t... | 21.617647 | 71 | 0.619048 | try:
import cloudscraper
except ModuleNotFoundError:
raise ModuleNotFoundError("Unable to load cloudscraper")
def access(endpoint=""):
"""The function used to access the entirety of nitrotype.
Endpoint
--------
https://www.nitrotype.com/{endpoint}
endpoint : str
The end url t... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6de67a6f2629812232468239d97bf3449d0dd06f | 953 | py | Python | example/backend/migrations/0006_auto_20211122_0910.py | martimarkov/django-ajax-datatable | d132504a199cb2afe2cfd74a2e6d5d5f2969c4a4 | [
"MIT"
] | 1 | 2021-11-19T13:36:30.000Z | 2021-11-19T13:36:30.000Z | example/backend/migrations/0006_auto_20211122_0910.py | martimarkov/django-ajax-datatable | d132504a199cb2afe2cfd74a2e6d5d5f2969c4a4 | [
"MIT"
] | null | null | null | example/backend/migrations/0006_auto_20211122_0910.py | martimarkov/django-ajax-datatable | d132504a199cb2afe2cfd74a2e6d5d5f2969c4a4 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.8 on 2021-11-22 09:10
| 30.741935 | 127 | 0.559286 | # Generated by Django 3.0.8 on 2021-11-22 09:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('backend', '0005_auto_20210606_0651'),
]
operations = [
migrations.CreateModel(
name='Tag2',
fields=[
... | 0 | 0 | 0 | 839 | 0 | 0 | 0 | 19 | 46 |
93f832cdbf2242b47ab3b0ac7e517856e501a723 | 16,675 | py | Python | ChecklistPanel.py | bopopescu/Lauecollect | 60ae2b05ea8596ba0decf426e37aeaca0bc8b6be | [
"MIT"
] | null | null | null | ChecklistPanel.py | bopopescu/Lauecollect | 60ae2b05ea8596ba0decf426e37aeaca0bc8b6be | [
"MIT"
] | 1 | 2019-10-22T21:28:31.000Z | 2019-10-22T21:39:12.000Z | ChecklistPanel.py | bopopescu/Lauecollect | 60ae2b05ea8596ba0decf426e37aeaca0bc8b6be | [
"MIT"
] | 2 | 2019-06-06T15:06:46.000Z | 2020-07-20T02:03:22.000Z | #!/usr/bin/env python
"""Controls when data collection is suspended, in case the X-ray beam is
down
Friedrich Schotte,
Date created: 2017-02-24
Date last modified: 2018-03-15
"""
__version__ = "1.2.9" # logging
import wx
if __name__ == '__main__':
import logging
from tempfile import gettempdir
... | 36.487965 | 86 | 0.610735 | #!/usr/bin/env python
"""Controls when data collection is suspended, in case the X-ray beam is
down
Friedrich Schotte,
Date created: 2017-02-24
Date last modified: 2018-03-15
"""
__version__ = "1.2.9" # logging
from checklist import checklist
import wx, wx3_compatibility
from EditableControls import TextCtrl,Combo... | 0 | 324 | 0 | 15,474 | 0 | 0 | 0 | 67 | 187 |
60ac941679c0f11de1c3686002d8acf273e59fd2 | 21,830 | py | Python | PrevendoCustomerChurnEmOperadorasDeTelecom.py | luizfmello01/Projeto04_PrevendoCustomerChurnEmOperadorasDeTelecom | ac0119a9cd07ee9cea7e20247cb0b571b801d937 | [
"MIT"
] | null | null | null | PrevendoCustomerChurnEmOperadorasDeTelecom.py | luizfmello01/Projeto04_PrevendoCustomerChurnEmOperadorasDeTelecom | ac0119a9cd07ee9cea7e20247cb0b571b801d937 | [
"MIT"
] | null | null | null | PrevendoCustomerChurnEmOperadorasDeTelecom.py | luizfmello01/Projeto04_PrevendoCustomerChurnEmOperadorasDeTelecom | ac0119a9cd07ee9cea7e20247cb0b571b801d937 | [
"MIT"
] | null | null | null | # Bibliotecas
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
from sklearn.preprocessing import LabelEncoder
from sklearn.preprocessing import StandardScaler
from sklearn.feature_selection import SelectKBest, f_classif
# !pip install imbalanced-learn
from ... | 28.498695 | 436 | 0.736051 | # Bibliotecas
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
from scipy.stats import shapiro
from scipy.stats import chi2
from sklearn.preprocessing import LabelEncoder
from sklearn.preprocessing import StandardScaler
from sklearn.feature_selection import... | 750 | 0 | 0 | 0 | 0 | 2,355 | 0 | 102 | 222 |
b54cc2f8011e885fcaf35b074d8ab57d62f80215 | 178 | py | Python | extheano/__init__.py | koheimiya/extheano | ea099a6395ca8772660b2c715fb26cde12738181 | [
"MIT"
] | 2 | 2016-06-13T13:58:23.000Z | 2017-04-05T05:19:56.000Z | extheano/__init__.py | koheimiya/extheano | ea099a6395ca8772660b2c715fb26cde12738181 | [
"MIT"
] | null | null | null | extheano/__init__.py | koheimiya/extheano | ea099a6395ca8772660b2c715fb26cde12738181 | [
"MIT"
] | null | null | null | __all__ = []
from .nodebuffer import Scanner as _Scanner
scan = _Scanner.scan
| 22.25 | 61 | 0.797753 | __all__ = []
from .nodebuffer import NodeBuffer, NodeDescriptor, BufferSet
from .nodebuffer import Scanner as _Scanner
scan = _Scanner.scan
from .jit import JITCompiler as jit
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 54 | 45 |
56c2047b0a57c8dc94ee7191641a00a00c0de033 | 5,344 | py | Python | scripts/generative/gvae_exp.py | choderalab/pinot | 413a349ab42912d8a668a645effde8e70ba608a6 | [
"MIT"
] | 13 | 2020-03-23T21:53:06.000Z | 2021-09-28T19:29:35.000Z | scripts/generative/gvae_exp.py | choderalab/pinot | 413a349ab42912d8a668a645effde8e70ba608a6 | [
"MIT"
] | 89 | 2020-03-27T21:18:55.000Z | 2021-04-02T19:36:50.000Z | scripts/generative/gvae_exp.py | choderalab/pinot | 413a349ab42912d8a668a645effde8e70ba608a6 | [
"MIT"
] | 2 | 2020-04-25T03:23:40.000Z | 2021-02-19T18:35:27.000Z | from __future__ import division
from __future__ import print_function
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--epochs', type=int, default=100, help='Number of epochs to train.')
parser.add_argument('--split',nargs='+', type=float, default=[0.9, 0.1, 0.], help="train, test, validation ... | 38.724638 | 158 | 0.690868 | from __future__ import division
from __future__ import print_function
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--epochs', type=int, default=100, help='Number of epochs to train.')
parser.add_argument('--split',nargs='+', type=float, default=[0.9, 0.1, 0.], help="train, test, validation ... | 0 | 0 | 0 | 0 | 0 | 3,722 | 0 | 65 | 315 |
d77f9868884df422417b5e97e91ff3e08b0c1013 | 37,960 | py | Python | tests/tests_bian.py | devashah1992/bianPython | e0b92b092c23c07d09446abf5f5d765e0bfe1c4e | [
"MIT"
] | null | null | null | tests/tests_bian.py | devashah1992/bianPython | e0b92b092c23c07d09446abf5f5d765e0bfe1c4e | [
"MIT"
] | null | null | null | tests/tests_bian.py | devashah1992/bianPython | e0b92b092c23c07d09446abf5f5d765e0bfe1c4e | [
"MIT"
] | null | null | null | from __future__ import print_function
from faker import Faker
from flask import Flask
from flask_restful import Api
fake = Faker()
app = Flask(__name__)
api = Api(app)
| 47.688442 | 217 | 0.653056 | from __future__ import print_function
from faker import Faker
from flask import Flask, request
from requests.auth import *
from flask_restful import Api
import json
from nose.tools import eq_
from halo_flask.exceptions import ApiError
from halo_flask.flask.utilx import status
from halo_bian.bian.abs_bian_srv import Ab... | 0 | 0 | 0 | 36,390 | 0 | 0 | 0 | 540 | 858 |
76ea23e2c20a282da1d09a527396d6354b723e6a | 14,852 | py | Python | tripleo_common/image/builder/buildah.py | openstack/tripleo-common | 7e8942329a453142155763851a3b19251bbe662b | [
"Apache-2.0"
] | 52 | 2015-04-17T12:06:09.000Z | 2021-11-23T09:46:30.000Z | tripleo_common/image/builder/buildah.py | openstack/tripleo-common | 7e8942329a453142155763851a3b19251bbe662b | [
"Apache-2.0"
] | null | null | null | tripleo_common/image/builder/buildah.py | openstack/tripleo-common | 7e8942329a453142155763851a3b19251bbe662b | [
"Apache-2.0"
] | 47 | 2015-10-09T15:22:38.000Z | 2021-04-22T04:35:57.000Z | # Copyright 2019 Red Hat, Inc.
#
# 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 ... | 38.677083 | 78 | 0.588406 | # Copyright 2019 Red Hat, Inc.
#
# 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 ... | 0 | 3,570 | 0 | 10,281 | 0 | 0 | 0 | 62 | 202 |
2510f4d75121878a4de9bf307f8d87dc38d3a446 | 4,976 | py | Python | deep_phospho/proteomics_utils/gen_dp_lib.py | weizhenFrank/DeepPhospho | e720b867528d92f9a1a5ec840484989af2b8eb63 | [
"MIT"
] | 2 | 2021-11-25T01:06:18.000Z | 2021-12-22T06:34:53.000Z | deep_phospho/proteomics_utils/gen_dp_lib.py | weizhenFrank/DeepPhospho | e720b867528d92f9a1a5ec840484989af2b8eb63 | [
"MIT"
] | null | null | null | deep_phospho/proteomics_utils/gen_dp_lib.py | weizhenFrank/DeepPhospho | e720b867528d92f9a1a5ec840484989af2b8eb63 | [
"MIT"
] | 1 | 2021-04-26T03:00:48.000Z | 2021-04-26T03:00:48.000Z | import os
import re
import json
import pandas as pd
from deep_phospho import proteomics_utils as prot_utils
from deep_phospho.proteomics_utils.post_analysis import spectronaut as SN
def generate_spec_lib(
data_name,
output_folder,
pred_ion_path,
pred_rt_path,
min_frag_inten=5... | 37.69697 | 122 | 0.668006 | import os
import re
import json
import pandas as pd
from deep_phospho import proteomics_utils as prot_utils
from deep_phospho.proteomics_utils.post_analysis import spectronaut as SN
def generate_spec_lib(
data_name,
output_folder,
pred_ion_path,
pred_rt_path,
min_frag_inten=5... | 0 | 0 | 0 | 0 | 0 | 1,410 | 0 | 0 | 23 |
0371c9c42945a8e4ea127cc077ce2715110eed65 | 3,428 | py | Python | old_src/showcontrol.py | cscashby/pi-showcontrol | 2cc9b2b34ec8eeebede7609535b3c1e937b700cb | [
"MIT"
] | 3 | 2017-05-07T18:13:09.000Z | 2017-08-25T09:35:26.000Z | old_src/showcontrol.py | cscashby/pi-showcontrol | 2cc9b2b34ec8eeebede7609535b3c1e937b700cb | [
"MIT"
] | 6 | 2017-05-07T11:36:45.000Z | 2017-07-31T15:30:20.000Z | old_src/showcontrol.py | cscashby/pi-showcontrol | 2cc9b2b34ec8eeebede7609535b3c1e937b700cb | [
"MIT"
] | null | null | null | #!/usr/bin/python3
global keyThreads
keyThreads = []
global importedModules
importedModules = {}
if __name__ == "__main__":
setup()
for serverName in config()['oscServers']:
print("Starting OSC UDP server: {}".format(serverName))
start_server(serverName)
start_keyThread(key_charLCD)
| 30.607143 | 97 | 0.703326 | #!/usr/bin/python3
import time
import signal
import sys
import os
import threading
import json
import Adafruit_CharLCD as LCD
import imp
from pythonosc import osc_message_builder
from pythonosc import udp_client
from pythonosc import dispatcher
from pythonosc import osc_server
from config import *
from lcd import *
g... | 0 | 0 | 0 | 0 | 0 | 2,666 | 0 | -10 | 470 |
49e20921b4c92a181e06cb3bc780c2e8dc4816fd | 7,648 | py | Python | easytransfer/model_zoo/modeling_utils.py | mczhuge/Kaleido-BERT | 50579660fb8dc1e250c7cc40e0f10294c54532e3 | [
"MIT"
] | 109 | 2021-04-14T04:15:53.000Z | 2022-03-24T05:24:43.000Z | easytransfer/model_zoo/modeling_utils.py | NoLoPhe/Kaleido-BERT | 1b14073e3ad3490c50bbd1e7e94846830671b332 | [
"MIT"
] | 12 | 2021-04-18T13:21:07.000Z | 2022-01-27T09:42:51.000Z | easytransfer/model_zoo/modeling_utils.py | NoLoPhe/Kaleido-BERT | 1b14073e3ad3490c50bbd1e7e94846830671b332 | [
"MIT"
] | 12 | 2021-04-25T08:40:09.000Z | 2022-03-24T08:56:29.000Z | # coding=utf-8
# Copyright (c) 2019 Alibaba PAI team.
#
# 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 ... | 37.674877 | 116 | 0.63363 | # coding=utf-8
# Copyright (c) 2019 Alibaba PAI team.
#
# 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 ... | 0 | 2,171 | 0 | 3,001 | 0 | 1,526 | 0 | 80 | 268 |
b9dc0df31309f5eb24cb2c055d9194cf73ff1aa4 | 13,013 | py | Python | test/test_reward_estimation.py | BaiLiping/BLPtensorforce | 01bc0b7130a497c9dfff9caa2fd5df919ffe7552 | [
"Apache-2.0"
] | 1 | 2021-12-25T16:54:16.000Z | 2021-12-25T16:54:16.000Z | test/test_reward_estimation.py | BaiLiping/BLPtensorforce | 01bc0b7130a497c9dfff9caa2fd5df919ffe7552 | [
"Apache-2.0"
] | null | null | null | test/test_reward_estimation.py | BaiLiping/BLPtensorforce | 01bc0b7130a497c9dfff9caa2fd5df919ffe7552 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Tensorforce Team. 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 required by applicable la... | 47.148551 | 98 | 0.64474 | # Copyright 2020 Tensorforce Team. 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 required by applicable la... | 0 | 0 | 0 | 12,244 | 0 | 0 | 0 | 16 | 69 |
b60c408e7d5e29894ac397aff64595f1fd2bf711 | 2,254 | py | Python | examples/11_bottles_of_beer/bottles.py | ktruong2004/be434-fall-2021 | cad03aa7ce033fa3c813daf48dd9216976e1874b | [
"MIT"
] | null | null | null | examples/11_bottles_of_beer/bottles.py | ktruong2004/be434-fall-2021 | cad03aa7ce033fa3c813daf48dd9216976e1874b | [
"MIT"
] | null | null | null | examples/11_bottles_of_beer/bottles.py | ktruong2004/be434-fall-2021 | cad03aa7ce033fa3c813daf48dd9216976e1874b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Author : ktruong <ktruong@localhost>
Date : 2021-10-25
Purpose: Rock the Casbah
"""
import argparse
import sys
# --------------------------------------------------
def get_args():
"""Get command-line arguments"""
parser = argparse.ArgumentParser(
description='Rock the Cas... | 26.517647 | 73 | 0.484028 | #!/usr/bin/env python3
"""
Author : ktruong <ktruong@localhost>
Date : 2021-10-25
Purpose: Rock the Casbah
"""
import argparse
import sys
# --------------------------------------------------
def get_args():
"""Get command-line arguments"""
parser = argparse.ArgumentParser(
description='Rock the Cas... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5bf5d720c8028c2aa7e3bdee89a1800fa00452a8 | 2,081 | py | Python | navegador.py | paulofv/tp-cliente-servidor | 8b5d05ae888c983b5a39233a16fc93f3070e497f | [
"BSD-2-Clause"
] | null | null | null | navegador.py | paulofv/tp-cliente-servidor | 8b5d05ae888c983b5a39233a16fc93f3070e497f | [
"BSD-2-Clause"
] | null | null | null | navegador.py | paulofv/tp-cliente-servidor | 8b5d05ae888c983b5a39233a16fc93f3070e497f | [
"BSD-2-Clause"
] | null | null | null | #coding: utf-8
import sys
import socket
import os
PORT = 80 #porta padro caso usurio no especifique
if len(sys.argv) == 1: # Verifica se o usuario passou pelo menos o parametro obrigatorio
print "Nao foi informado a url no paramentro!\n"
sys.exit()
if len(sys.argv) == 3: # Verifica se o usuario especi... | 23.382022 | 101 | 0.662662 | #coding: utf-8
import sys
import socket
import os
PORT = 80 #porta padrão caso usuário não especifique
if len(sys.argv) == 1: # Verifica se o usuario passou pelo menos o parametro obrigatorio
print "Nao foi informado a url no paramentro!\n"
sys.exit()
if len(sys.argv) == 3: # Verifica se o usuario es... | 15 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ed35599c92749feb364e4b561ea3e5b68d3d86c6 | 456 | py | Python | day6/height.py | dikshaa1702/ml | c35f279b8fa7544517ca713c2c1e55f08270d4c3 | [
"Apache-2.0"
] | 1 | 2019-06-13T13:52:09.000Z | 2019-06-13T13:52:09.000Z | day6/height.py | dikshaa1702/ml | c35f279b8fa7544517ca713c2c1e55f08270d4c3 | [
"Apache-2.0"
] | null | null | null | day6/height.py | dikshaa1702/ml | c35f279b8fa7544517ca713c2c1e55f08270d4c3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon May 13 11:22:01 2019
@author: DiPu
"""
from functools import reduce
people =[{'name': 'Mary', 'height': 160},
{'name': 'Isla', 'height': 80},
{'name': 'Sam'}]
b=(list(filter(lambda x: True if 'height' in x else False,people)))
g=list(map(lambda x:x['height... | 30.4 | 72 | 0.609649 | # -*- coding: utf-8 -*-
"""
Created on Mon May 13 11:22:01 2019
@author: DiPu
"""
from functools import reduce
people =[{'name': 'Mary', 'height': 160},
{'name': 'Isla', 'height': 80},
{'name': 'Sam'}]
b=(list(filter(lambda x: True if 'height' in x else False,people)))
g=list(map(lambda x:x['height... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b9cf41cc30e8da1d9edf096602212846e3958cd2 | 3,858 | py | Python | alan/abstract/questions.py | DotSlashCommunity/alan-server | 1a933e4a6b40656cc2413d55a72b498d610f1bd7 | [
"MIT"
] | null | null | null | alan/abstract/questions.py | DotSlashCommunity/alan-server | 1a933e4a6b40656cc2413d55a72b498d610f1bd7 | [
"MIT"
] | null | null | null | alan/abstract/questions.py | DotSlashCommunity/alan-server | 1a933e4a6b40656cc2413d55a72b498d610f1bd7 | [
"MIT"
] | null | null | null | # @author ksdme
# abstracts methods on question model
from random import shuffle
from alan.db.models import ReplyModel
def getQuestion(qno, qmodel):
"""
read a question from the
given qmodel
"""
try:
return qmodel.get(qmodel.id == qno)
except qmodel.DoesNotExist:
return None
def getOffset(using, cycle=2... | 20.305263 | 85 | 0.681441 | # @author ksdme
# abstracts methods on question model
from random import shuffle
from alan.db.models import ReplyModel
def getQuestion(qno, qmodel):
"""
read a question from the
given qmodel
"""
try:
return qmodel.get(qmodel.id == qno)
except qmodel.DoesNotExist:
return None
def getOffset(using, cycle=2... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6347be9abf7d48e5ad4f3a89677d852d3403a2d3 | 753 | py | Python | coh2stats/weeklystats/routes.py | ZEDGR/coh2stats | 0d6f0f0ca62a57c0644072727d90451f4e3b7a0e | [
"MIT"
] | 1 | 2017-10-15T09:24:20.000Z | 2017-10-15T09:24:20.000Z | coh2stats/weeklystats/routes.py | ZEDGR/coh2stats | 0d6f0f0ca62a57c0644072727d90451f4e3b7a0e | [
"MIT"
] | 1 | 2021-06-02T00:58:27.000Z | 2021-06-02T00:58:27.000Z | coh2stats/weeklystats/routes.py | ZEDGR/coh2stats | 0d6f0f0ca62a57c0644072727d90451f4e3b7a0e | [
"MIT"
] | null | null | null | from flask import Blueprint
stats = Blueprint('stats', __name__)
| 31.375 | 67 | 0.802125 | from flask import render_template, Blueprint
from coh2stats.weeklystats.utils import get_players_stats
from coh2stats.weeklystats.utils import get_teams_stats
from coh2stats import dao
import os
stats = Blueprint('stats', __name__)
@stats.route('/weeklystats/1v1/latest')
def weeklystats_1v1():
current_results, p... | 0 | 472 | 0 | 0 | 0 | 0 | 0 | 79 | 134 |
321d4d6311b8ff4c4a7b730f362f0523b1db2c8c | 1,722 | py | Python | 5.py | mjenrungrot/AdventOfCode2020 | ad2607fe6c4418327a97b863146f7a5af3361afe | [
"MIT"
] | null | null | null | 5.py | mjenrungrot/AdventOfCode2020 | ad2607fe6c4418327a97b863146f7a5af3361afe | [
"MIT"
] | null | null | null | 5.py | mjenrungrot/AdventOfCode2020 | ad2607fe6c4418327a97b863146f7a5af3361afe | [
"MIT"
] | null | null | null | import sys
if __name__ == '__main__':
if len(sys.argv) == 2 and sys.argv[1] == 'extra':
extra()
else:
main()
| 24.253521 | 79 | 0.47619 | import sys
def extra():
fp = open("5.input")
lines = list(map(lambda x: (x.strip()[:7], x.strip()[7:]), fp.readlines()))
occupied = set()
max_seat_id = -1
for _, line in enumerate(lines):
seat = line[0]
seat = list(map(lambda ch: int(ch == 'B'), seat))
base = 64
ro... | 0 | 0 | 0 | 0 | 0 | 1,539 | 0 | 0 | 46 |
fe5faeef8ee1634c0f11e3b81c2ab55c90744a4f | 1,239 | py | Python | tests/test_utils.py | cenyk1230/cogdl | fa1f74d5c3a15b5a52abfc7cd3f04dce4b7dbcce | [
"MIT"
] | 1,072 | 2019-08-02T05:46:21.000Z | 2022-03-31T07:51:53.000Z | tests/test_utils.py | cenyk1230/cogdl | fa1f74d5c3a15b5a52abfc7cd3f04dce4b7dbcce | [
"MIT"
] | 96 | 2019-08-05T17:27:22.000Z | 2022-03-03T08:36:57.000Z | tests/test_utils.py | cenyk1230/cogdl | fa1f74d5c3a15b5a52abfc7cd3f04dce4b7dbcce | [
"MIT"
] | 299 | 2019-08-08T07:33:10.000Z | 2022-03-31T09:30:07.000Z |
if __name__ == "__main__":
test_build_args_from_dict()
| 31.769231 | 104 | 0.678773 | from sklearn.metrics import f1_score
import torch
from cogdl.utils import build_args_from_dict
from cogdl.utils import accuracy, multiclass_f1, multilabel_f1, bce_with_logits_loss, cross_entropy_loss
def test_build_args_from_dict():
dic = {"arg1": "value1", "arg2": 2, "arg3": 0.3}
args = build_args_from_dict(... | 0 | 0 | 0 | 0 | 0 | 930 | 0 | 112 | 134 |
c38a95aad8565a4d121edf838f6134f6a4a283f3 | 9,493 | py | Python | analogistics/supply_chain/P8_performance_assessment/wh_indexes.py | aletuf93/analogistics | c5f76910683bc3a1cc6f24799f0299232b4fc522 | [
"MIT"
] | null | null | null | analogistics/supply_chain/P8_performance_assessment/wh_indexes.py | aletuf93/analogistics | c5f76910683bc3a1cc6f24799f0299232b4fc522 | [
"MIT"
] | null | null | null | analogistics/supply_chain/P8_performance_assessment/wh_indexes.py | aletuf93/analogistics | c5f76910683bc3a1cc6f24799f0299232b4fc522 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from analogistics.statistics import time_series as ts
from analogistics.supply_chain.information_framework import movementfunctionfromInventory
from analogistics.explore import paretoDataframe
def calculatePopularity(movem... | 27.83871 | 107 | 0.651006 | # -*- coding: utf-8 -*-
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from analogistics.statistics import time_series as ts
from analogistics.supply_chain.information_framework import movementfunctionfromInventory
from analogistics.explore import paretoDataframe
def calculatePopularity(movem... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7d2d81b868d78570f829b82f7e1a603d8f307c26 | 25,424 | py | Python | causallearn/score/LocalScoreFunction.py | softsys4ai/causal-config-labyrinth | 4f50f9ff15429b0ac6ad0a99fbe4cfdd17e360fc | [
"MIT"
] | 15 | 2022-01-20T12:35:35.000Z | 2022-03-24T16:25:24.000Z | causallearn/score/LocalScoreFunction.py | softsys4ai/unicorn | 4f50f9ff15429b0ac6ad0a99fbe4cfdd17e360fc | [
"MIT"
] | 14 | 2022-01-23T00:20:00.000Z | 2022-02-22T01:40:43.000Z | causallearn/score/LocalScoreFunction.py | softsys4ai/causal-config-labyrinth | 4f50f9ff15429b0ac6ad0a99fbe4cfdd17e360fc | [
"MIT"
] | 1 | 2022-02-23T08:59:24.000Z | 2022-02-23T08:59:24.000Z | import math
import pandas as pd
def local_score_BIC(Data, i, PAi, parameters=None):
'''
Calculate the *negative* local score with BIC for the linear Gaussian continue data case
Parameters
----------
Data: ndarray, (sample, features)
i: current index
PAi: parent indexes
parameters: la... | 40.484076 | 115 | 0.48411 | import math
import pandas as pd
from causallearn.utils.ScoreUtils import *
def local_score_BIC(Data, i, PAi, parameters=None):
'''
Calculate the *negative* local score with BIC for the linear Gaussian continue data case
Parameters
----------
Data: ndarray, (sample, features)
i: current inde... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 23 |
2c9f5d52f1b4861421709e07ade22be53a597029 | 4,882 | py | Python | src/data_generation/data_recorder.py | StanfordASL/NASA_ULI_Xplane_Simulator | 051fa492b650545442c790cf04a8cdb19632bd02 | [
"Apache-2.0"
] | 4 | 2021-06-28T19:13:58.000Z | 2021-12-10T03:10:38.000Z | src/data_generation/data_recorder.py | StanfordASL/NASA_ULI_Xplane_Simulator | 051fa492b650545442c790cf04a8cdb19632bd02 | [
"Apache-2.0"
] | null | null | null | src/data_generation/data_recorder.py | StanfordASL/NASA_ULI_Xplane_Simulator | 051fa492b650545442c790cf04a8cdb19632bd02 | [
"Apache-2.0"
] | 1 | 2021-05-25T20:52:11.000Z | 2021-05-25T20:52:11.000Z | import sys
import os
# make sure this is a system variable in your bashrc
NASA_ULI_ROOT_DIR = os.environ['NASA_ULI_ROOT_DIR']
XPC3_DIR = NASA_ULI_ROOT_DIR + '/src/'
sys.path.append(XPC3_DIR)
import numpy as np
import xpc3_helper
import time
import os
import mss
import cv2
import settings
screenShot = mss.mss()
de... | 38.440945 | 134 | 0.630274 | import sys
import os
# make sure this is a system variable in your bashrc
NASA_ULI_ROOT_DIR = os.environ['NASA_ULI_ROOT_DIR']
XPC3_DIR = NASA_ULI_ROOT_DIR + '/src/'
sys.path.append(XPC3_DIR)
import numpy as np
import xpc3
import xpc3_helper
import time
import os
import mss
import cv2
import settings
screenShot = m... | 0 | 0 | 0 | 0 | 0 | 190 | 0 | -10 | 45 |
e9e8e3d3249ddc6a3c68b462aadd0cf70fd33c59 | 581 | py | Python | rsatest.py | PotatoDIY/rsamsg | 2e324b9fc37a6bfcd9edf06214def00818e44380 | [
"MIT"
] | null | null | null | rsatest.py | PotatoDIY/rsamsg | 2e324b9fc37a6bfcd9edf06214def00818e44380 | [
"MIT"
] | 1 | 2021-04-30T21:03:26.000Z | 2021-04-30T21:03:26.000Z | rsatest.py | PotatoDIY/rsamsg | 2e324b9fc37a6bfcd9edf06214def00818e44380 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
#alice and bob
#alice_pubkey, alice_privkey=gen()
#bob_pubkey, bob_privkey=gen()
alice_pubkey = loadfile("keys/alice_pubkey")
alice_prikey = loadfile("keys/alice_prikey")
bob_pubkey = loadfile("keys/bob_pubkey")
bob_prikey = loadfile("keys/bob_prikey")
#from alice
messa... | 20.034483 | 77 | 0.748709 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
from rsamsg import *
#alice and bob
#alice_pubkey, alice_privkey=gen()
#bob_pubkey, bob_privkey=gen()
alice_pubkey = loadfile("keys/alice_pubkey")
alice_prikey = loadfile("keys/alice_prikey")
bob_pubkey = loadfile("keys/bob_pubkey")
bob_prikey = loadfile("keys/bob_prikey"... | 6 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 22 |
ab19dd13a41e5770195c38a79129d61c58d261cd | 3,338 | py | Python | scale/job/tasks/health_task.py | kaydoh/scale | 1b6a3b879ffe83e10d3b9d9074835a4c3bf476ee | [
"Apache-2.0"
] | 121 | 2015-11-18T18:15:33.000Z | 2022-03-10T01:55:00.000Z | scale/job/tasks/health_task.py | kaydoh/scale | 1b6a3b879ffe83e10d3b9d9074835a4c3bf476ee | [
"Apache-2.0"
] | 1,415 | 2015-12-23T23:36:04.000Z | 2022-01-07T14:10:09.000Z | scale/job/tasks/health_task.py | kaydoh/scale | 1b6a3b879ffe83e10d3b9d9074835a4c3bf476ee | [
"Apache-2.0"
] | 66 | 2015-12-03T20:38:56.000Z | 2020-07-27T15:28:11.000Z | """Defines the class for a node health check task"""
from __future__ import unicode_literals
from job.tasks.base_task import AtomicCounter
HEALTH_TASK_ID_PREFIX = 'scale_health'
COUNTER = AtomicCounter()
| 40.216867 | 117 | 0.679449 | """Defines the class for a node health check task"""
from __future__ import unicode_literals
import datetime
from django.conf import settings
from job.tasks.base_task import AtomicCounter
from job.tasks.node_task import NodeTask
from node.resources.node_resources import NodeResources
from node.resources.resource imp... | 0 | 0 | 0 | 2,913 | 0 | 0 | 0 | 82 | 135 |
d997ece80f2c50ef76115ac62ab2023286b010bd | 11,486 | py | Python | bommerge/bommerge.py | sakoPO/bommerge | 88a3697ce03908053c9d7c52fd3f78db0ce52371 | [
"BSD-3-Clause"
] | null | null | null | bommerge/bommerge.py | sakoPO/bommerge | 88a3697ce03908053c9d7c52fd3f78db0ce52371 | [
"BSD-3-Clause"
] | null | null | null | bommerge/bommerge.py | sakoPO/bommerge | 88a3697ce03908053c9d7c52fd3f78db0ce52371 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
try:
from components import resistor
from components import capacitor
from components import voltage
from components import tolerance
except:
try:
import Tkinter as tk
import ttk
except ImportError:
if __name__ == "__main__":
main()
| 41.168459 | 133 | 0.610134 | #!/usr/bin/env python
try:
from components import resistor
from components import capacitor
from components import voltage
from components import tolerance
except:
from bommerge.components import resistor
from bommerge.components import capacitor
from bommerge.components import voltage
... | 0 | 0 | 0 | 253 | 0 | 10,267 | 0 | 124 | 543 |
d499107a5099731a8a38c060088fba35d321c56e | 6,764 | py | Python | fairseq/data/token_block_dataset.py | Ruil/fairseq | 5cd5c334631a2aca1d3cfaaaddeec1b56df9e0e4 | [
"BSD-3-Clause"
] | null | null | null | fairseq/data/token_block_dataset.py | Ruil/fairseq | 5cd5c334631a2aca1d3cfaaaddeec1b56df9e0e4 | [
"BSD-3-Clause"
] | null | null | null | fairseq/data/token_block_dataset.py | Ruil/fairseq | 5cd5c334631a2aca1d3cfaaaddeec1b56df9e0e4 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the LICENSE file in
# the root directory of this source tree. An additional grant of patent rights
# can be found in the PATENTS file in the same directory.
| 39.555556 | 101 | 0.567859 | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the LICENSE file in
# the root directory of this source tree. An additional grant of patent rights
# can be found in the PATENTS file in the same directory.
import math
import numpy as np
im... | 0 | 86 | 0 | 6,293 | 0 | 0 | 0 | -15 | 114 |
1bfa0533a1a96ae691f7676df2620d787c8e4bee | 358 | py | Python | scripts/a3_withdraw_matic.py | PatrickAlphaC/vrf_pizza | c39c03ea707234a814d3d57419111c8e049d87a9 | [
"MIT"
] | 9 | 2021-03-13T03:47:12.000Z | 2021-09-01T13:49:58.000Z | scripts/a3_withdraw_matic.py | PatrickAlphaC/vrf_pizza | c39c03ea707234a814d3d57419111c8e049d87a9 | [
"MIT"
] | 1 | 2021-03-07T21:32:55.000Z | 2021-03-29T00:34:22.000Z | scripts/a3_withdraw_matic.py | PatrickAlphaC/vrf_pizza | c39c03ea707234a814d3d57419111c8e049d87a9 | [
"MIT"
] | 1 | 2021-09-01T13:49:58.000Z | 2021-09-01T13:49:58.000Z | #!/usr/bin/python3
STATIC_SEED = 123
| 27.538462 | 82 | 0.723464 | #!/usr/bin/python3
import os
from brownie import VRF_Pizza, VRF_Pizza_RNG, accounts, network, config, interface
STATIC_SEED = 123
def main():
dev = accounts.add(os.getenv(config['wallets']['from_key']))
# Get the most recent PriceFeed Object
vrf_pizza = VRF_Pizza[len(VRF_Pizza) - 1]
vrf_pizza.withdra... | 0 | 0 | 0 | 0 | 0 | 203 | 0 | 49 | 67 |
bc757e04afd30e67cca0d546bb738a5c4acbd1ce | 1,460 | py | Python | .venv/lib/python3.8/site-packages/vectorbt/utils/math.py | eo1989/VectorBTanalysis | bea3deaf2ee3fc114b308146f2af3e4f35f70197 | [
"MIT"
] | null | null | null | .venv/lib/python3.8/site-packages/vectorbt/utils/math.py | eo1989/VectorBTanalysis | bea3deaf2ee3fc114b308146f2af3e4f35f70197 | [
"MIT"
] | null | null | null | .venv/lib/python3.8/site-packages/vectorbt/utils/math.py | eo1989/VectorBTanalysis | bea3deaf2ee3fc114b308146f2af3e4f35f70197 | [
"MIT"
] | null | null | null | """Math utilities."""
import numpy as np
from numba import njit
rel_tol = 1e-10
abs_tol = 0.
def is_close(a, b, rel_tol=rel_tol, abs_tol=abs_tol):
"""Tell whether two values are approximately equal."""
if np.isnan(a) or np.isnan(b):
return False
if np.isinf(a) or np.isinf(b):
return Fals... | 27.54717 | 95 | 0.666438 | """Math utilities."""
import numpy as np
from numba import njit
rel_tol = 1e-10
abs_tol = 0.
def is_close(a, b, rel_tol=rel_tol, abs_tol=abs_tol):
"""Tell whether two values are approximately equal."""
if np.isnan(a) or np.isnan(b):
return False
if np.isinf(a) or np.isinf(b):
return Fals... | 0 | 411 | 0 | 0 | 0 | 0 | 0 | 0 | 46 |
d3ea9909cecbb0a14b18ea874848473f176f24e3 | 831 | py | Python | tsaotun/lib/Docker/Image/rm.py | qazbnm456/tsaotun | 70186faebd5303961d5996c758f7c9147c4439ba | [
"Apache-2.0"
] | 47 | 2017-01-15T08:33:46.000Z | 2022-02-11T22:37:48.000Z | tsaotun/lib/Docker/Image/rm.py | qazbnm456/dokcer | 70186faebd5303961d5996c758f7c9147c4439ba | [
"Apache-2.0"
] | null | null | null | tsaotun/lib/Docker/Image/rm.py | qazbnm456/dokcer | 70186faebd5303961d5996c758f7c9147c4439ba | [
"Apache-2.0"
] | 2 | 2017-01-16T13:10:22.000Z | 2019-03-28T17:05:04.000Z | """This module contains `docker image rm` class"""
| 24.441176 | 57 | 0.54994 | """This module contains `docker image rm` class"""
from docker.errors import APIError
from .command import Command
class Rm(Command):
"""This class implements `docker image rm` command"""
name = "image rm"
require = []
def __init__(self):
Command.__init__(self)
self.settings[self.n... | 0 | 0 | 0 | 690 | 0 | 0 | 0 | 20 | 69 |
d7272969a073a6a76d09365b16f3fbe62aad6ad2 | 22,050 | py | Python | vstools/readers.py | libyal/vstools | 3e8bb323c4f1b51ff0dc18654707ab44b6bb6cd5 | [
"Apache-2.0"
] | 3 | 2017-07-02T11:01:22.000Z | 2021-01-31T04:52:58.000Z | vstools/readers.py | libyal/vstools | 3e8bb323c4f1b51ff0dc18654707ab44b6bb6cd5 | [
"Apache-2.0"
] | 7 | 2017-06-30T08:09:34.000Z | 2018-03-22T07:29:51.000Z | vstools/readers.py | libyal/vstools | 3e8bb323c4f1b51ff0dc18654707ab44b6bb6cd5 | [
"Apache-2.0"
] | 1 | 2017-09-10T07:34:04.000Z | 2017-09-10T07:34:04.000Z | # -*- coding: utf-8 -*-
"""Project and solution file reader classes."""
| 28.451613 | 80 | 0.651519 | # -*- coding: utf-8 -*-
"""Project and solution file reader classes."""
import abc
import re
from vstools import resources
class FileReader(object):
"""File reader."""
def __init__(self, encoding='utf-8'):
"""Initializes a file reader.
Args:
encoding (str): encoding.
"""
super(FileReader... | 0 | 223 | 0 | 21,294 | 0 | 0 | 0 | -15 | 459 |
9103dc90b43809f95c0f53e862bd0ec25567ff06 | 14,802 | py | Python | tests/test_cli.py | jhermann/pip-upgrader | ba8613d47cd91f1e1f4ae546c561eb030ba5ddf8 | [
"Apache-2.0"
] | null | null | null | tests/test_cli.py | jhermann/pip-upgrader | ba8613d47cd91f1e1f4ae546c561eb030ba5ddf8 | [
"Apache-2.0"
] | null | null | null | tests/test_cli.py | jhermann/pip-upgrader | ba8613d47cd91f1e1f4ae546c561eb030ba5ddf8 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
try:
from unittest.mock import patch
except ImportError:
try:
from io import StringIO
except ImportError: # pragma: nocover
| 45.128049 | 119 | 0.657344 | from __future__ import unicode_literals
from subprocess import PIPE, Popen as popen
from unittest import TestCase
import responses
from packaging.utils import canonicalize_name
from pip_upgrader import __version__ as VERSION
from pip_upgrader import cli
from pip_upgrader.packages_status_detector import PackagesStat... | 0 | 13,671 | 0 | 531 | 0 | 0 | 0 | 143 | 279 |
3762dac387dc47cb0414df8d63924698e9c65760 | 559 | py | Python | code/wind-analysis/complete/wind-reducer-max.py | cssherry/ox-clo | 4c771048f8b02639c7ac9e3609b92f08a2a345c1 | [
"CC0-1.0"
] | null | null | null | code/wind-analysis/complete/wind-reducer-max.py | cssherry/ox-clo | 4c771048f8b02639c7ac9e3609b92f08a2a345c1 | [
"CC0-1.0"
] | null | null | null | code/wind-analysis/complete/wind-reducer-max.py | cssherry/ox-clo | 4c771048f8b02639c7ac9e3609b92f08a2a345c1 | [
"CC0-1.0"
] | null | null | null | #! /usr/bin/env python
import sys
speeds = dict()
# counts = dict()
# need this for extension
for line in sys.stdin:
try:
line = line.strip()
station, speed = line.split('\t')
speed = float(speed)
# Add code here to use the data
if station in speeds:
if speeds[station] < spee... | 17.46875 | 39 | 0.593918 | #! /usr/bin/env python
import sys
speeds = dict()
# counts = dict()
# need this for extension
for line in sys.stdin:
try:
line = line.strip()
station, speed = line.split('\t')
speed = float(speed)
# Add code here to use the data
if station in speeds:
if speeds[station] < spee... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9e57b930e0dbd8dcbcf97bd5461976d81c31f4a1 | 25,064 | py | Python | pointnav_vo/vo/dataset/regression_geo_invariance_iter_dataset.py | rxlqn/PointNav-VO | 6f7672482a3f1628a3b11025709518ee166e812b | [
"Apache-2.0"
] | 25 | 2021-08-28T04:06:31.000Z | 2022-03-02T23:03:13.000Z | pointnav_vo/vo/dataset/regression_geo_invariance_iter_dataset.py | rxlqn/PointNav-VO | 6f7672482a3f1628a3b11025709518ee166e812b | [
"Apache-2.0"
] | 11 | 2021-10-01T07:03:11.000Z | 2022-03-26T02:28:44.000Z | pointnav_vo/vo/dataset/regression_geo_invariance_iter_dataset.py | rxlqn/PointNav-VO | 6f7672482a3f1628a3b11025709518ee166e812b | [
"Apache-2.0"
] | 5 | 2021-09-01T09:05:42.000Z | 2022-01-27T10:11:37.000Z | #! /usr/bin/env python
import torch
import torch.nn as nn
FloatTensor = torch.FloatTensor
| 38.56 | 148 | 0.615385 | #! /usr/bin/env python
import os
import h5py
import random
import time
import copy
import numpy as np
from tqdm import tqdm
from collections import OrderedDict, defaultdict
import torch
import torch.nn as nn
from torch.utils.data import Dataset, IterableDataset
from habitat import logger
from habitat.utils.geometry_... | 0 | 214 | 0 | 18,819 | 0 | 5,244 | 0 | 311 | 380 |
651cd1831dd5eccc15391398626087e34c64f27c | 765 | py | Python | wordy/wordy.py | cmccandless/ExercismSolutions-python | d80bf441c842daa2eb446bdba9c03d3e8864ea58 | [
"MIT"
] | null | null | null | wordy/wordy.py | cmccandless/ExercismSolutions-python | d80bf441c842daa2eb446bdba9c03d3e8864ea58 | [
"MIT"
] | null | null | null | wordy/wordy.py | cmccandless/ExercismSolutions-python | d80bf441c842daa2eb446bdba9c03d3e8864ea58 | [
"MIT"
] | null | null | null | op = {
'plus': lambda x, y: x + y,
'minus': lambda x, y: x - y,
'multiplied': lambda x, y: x * y,
'divided': lambda x, y: x / y,
}
| 27.321429 | 54 | 0.439216 | op = {
'plus': lambda x, y: x + y,
'minus': lambda x, y: x - y,
'multiplied': lambda x, y: x * y,
'divided': lambda x, y: x / y,
}
def calculate(expr):
s = list(reversed(expr[:-1].split()[2:]))
r, o = (0, op['plus'])
while len(s) > 0:
x = s.pop()
try:
... | 0 | 0 | 0 | 0 | 0 | 585 | 0 | 0 | 25 |
e693c32dff9ada05fbab24b39e3c9417628ef392 | 3,718 | py | Python | tasks-deploy/code-lock/generate.py | irdkwmnsb/lkshl-ctf | e5c0200ddc8ba73df5f321b87b9763fb1bbaba57 | [
"MIT"
] | 3 | 2021-03-30T06:27:58.000Z | 2021-04-03T17:56:35.000Z | tasks-deploy/code-lock/generate.py | irdkwmnsb/lkshl-ctf | e5c0200ddc8ba73df5f321b87b9763fb1bbaba57 | [
"MIT"
] | null | null | null | tasks-deploy/code-lock/generate.py | irdkwmnsb/lkshl-ctf | e5c0200ddc8ba73df5f321b87b9763fb1bbaba57 | [
"MIT"
] | null | null | null | TASK_URL = "http://code-lock.ctf.sicamp.ru"
TITLE = " "
STATEMENT_TEMPLATE = f'''
" " - . , . ?
[{TASK_URL}/{{0}}]({TASK_URL}/{{0}})
'''
tokens = ['CyCHgDjGEITw', 'mhLo7Fo1T0CB', 'MvXYeD9qdKbD', 'IcI8GUb3ifnu', 'WfClJasVVMqE', '6N111DvhAm1a', 'oKZdNHSWuEzB', '83xZkQHbnkB2', 'WAa0NtH4Oh... | 265.571429 | 3,209 | 0.743679 | TASK_URL = "http://code-lock.ctf.sicamp.ru"
TITLE = "Кодовый замок"
STATEMENT_TEMPLATE = f'''
"Безопасность превыше всего" - сказал ваш приятель и поставил на входную дверь кодовый замок. Но теперь вам срочно нужно попасть к нему домой, а кода вы не знаете. Что же делать?
[{TASK_URL}/{{0}}]({TASK_URL}/{{0}})
'''
... | 306 | 0 | 0 | 0 | 0 | 160 | 0 | 0 | 25 |
80d96f5c5eee131c39bba40f38a78bb59c0e41f9 | 69 | py | Python | playbook/roles/jupyter/files/.ipyparallel/profile_mpi/ipengine_config.py | kemusiro/rpicluster-for-openmpi | fb27da339e8f13efdcc108a005a26e335527ade1 | [
"MIT"
] | null | null | null | playbook/roles/jupyter/files/.ipyparallel/profile_mpi/ipengine_config.py | kemusiro/rpicluster-for-openmpi | fb27da339e8f13efdcc108a005a26e335527ade1 | [
"MIT"
] | null | null | null | playbook/roles/jupyter/files/.ipyparallel/profile_mpi/ipengine_config.py | kemusiro/rpicluster-for-openmpi | fb27da339e8f13efdcc108a005a26e335527ade1 | [
"MIT"
] | null | null | null | c.IPEngineApp.wait_for_url_file = 30
c.RegistrationFactory.ip = '*'
| 17.25 | 36 | 0.768116 | c.IPEngineApp.wait_for_url_file = 30
c.RegistrationFactory.ip = '*'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f714c0f34fff9800c3a67b955f8cc23e9eeb99c8 | 9,027 | py | Python | emu/containers/docker_container.py | CONQ-Agency/android-emulator-container-scripts | 0d5f55ca938818486a2ad638b91464e952e87cf4 | [
"Apache-2.0"
] | null | null | null | emu/containers/docker_container.py | CONQ-Agency/android-emulator-container-scripts | 0d5f55ca938818486a2ad638b91464e952e87cf4 | [
"Apache-2.0"
] | 1 | 2021-06-15T11:59:58.000Z | 2021-06-16T12:08:38.000Z | emu/containers/docker_container.py | CONQ-Agency/android-emulator-container-scripts | 0d5f55ca938818486a2ad638b91464e952e87cf4 | [
"Apache-2.0"
] | 1 | 2021-05-12T14:08:12.000Z | 2021-05-12T14:08:12.000Z | # Copyright 2019 The Android Open Source Project
#
# 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 ag... | 34.586207 | 107 | 0.583029 | # Copyright 2019 The Android Open Source Project
#
# 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 ag... | 0 | 768 | 0 | 7,478 | 0 | 0 | 0 | -61 | 245 |
0ddf1e275961fe3e95a3ee2b91a70698817c2960 | 3,618 | py | Python | python/2020/day16.py | SylvainDe/aoc | b8a4609327831685ef94c9960350ff7bb5ace1a5 | [
"MIT"
] | null | null | null | python/2020/day16.py | SylvainDe/aoc | b8a4609327831685ef94c9960350ff7bb5ace1a5 | [
"MIT"
] | null | null | null | python/2020/day16.py | SylvainDe/aoc | b8a4609327831685ef94c9960350ff7bb5ace1a5 | [
"MIT"
] | null | null | null | # vi: set shiftwidth=4 tabstop=4 expandtab:
import datetime
import re
rules_re = re.compile(r"(?P<min>\d+)-(?P<max>\d+)")
if __name__ == "__main__":
begin = datetime.datetime.now()
run_tests()
get_solutions()
end = datetime.datetime.now()
print(end - begin)
| 28.046512 | 86 | 0.609729 | # vi: set shiftwidth=4 tabstop=4 expandtab:
import datetime
import re
rules_re = re.compile(r"(?P<min>\d+)-(?P<max>\d+)")
def get_rule_from_string(string):
name, values = string.split(": ")
return (name, [(int(mini), int(maxi)) for mini, maxi in rules_re.findall(values)])
def get_ticket_from_string(string)... | 0 | 0 | 0 | 0 | 0 | 3,097 | 0 | 0 | 230 |
a6e3a48eaa19202a70ac26f47f0ceced944359ba | 750 | py | Python | scripts/1_deploy_pokemon.py | abhicoder29/pokemon-nft | 29d517ac996c878558795cc135cd17828976c179 | [
"MIT"
] | 1 | 2021-12-30T07:58:20.000Z | 2021-12-30T07:58:20.000Z | scripts/1_deploy_pokemon.py | abhicoder29/pokemon-nft | 29d517ac996c878558795cc135cd17828976c179 | [
"MIT"
] | null | null | null | scripts/1_deploy_pokemon.py | abhicoder29/pokemon-nft | 29d517ac996c878558795cc135cd17828976c179 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
| 34.090909 | 108 | 0.684 | #!/usr/bin/python3
from brownie import Pokemon, accounts, network, config
from scripts.helpful_scripts import fund
import asyncio
import json
def main():
dev = accounts.add(config["wallets"]["from_key"])
print(network.show_active())
# publish_source = True if os.getenv("ETHERSCAN_TOKEN") else False # Curr... | 0 | 0 | 0 | 0 | 0 | 584 | 0 | 35 | 111 |
45a0b3e934efd1b716e4e65e5d9b8da1fcedcf16 | 1,313 | py | Python | colorthermoexample.py | majikpig/ubtech | 8d21f4b522e06f998bfdf3b1947db23bfc349e3d | [
"MIT"
] | null | null | null | colorthermoexample.py | majikpig/ubtech | 8d21f4b522e06f998bfdf3b1947db23bfc349e3d | [
"MIT"
] | null | null | null | colorthermoexample.py | majikpig/ubtech | 8d21f4b522e06f998bfdf3b1947db23bfc349e3d | [
"MIT"
] | 1 | 2019-03-23T16:08:30.000Z | 2019-03-23T16:08:30.000Z | import tempsensor
import time
import btnlib as btn
import ledlib as led
red = 80
orange = 75
yellow = 70
green = 65
blue = 60
purple = 55
while btn.isOn(btn.switch): #while the switch is on:
led.turn_on(led.white)
temp = tempsensor.tempF() #get the temp
print temp
if temp > red :
led.turn_on_all()
elif temp > ... | 20.84127 | 52 | 0.711348 | import tempsensor
import time
import btnlib as btn
import ledlib as led
red = 80
orange = 75
yellow = 70
green = 65
blue = 60
purple = 55
while btn.isOn(btn.switch): #while the switch is on:
led.turn_on(led.white)
temp = tempsensor.tempF() #get the temp
print temp
if temp > red :
led.turn_on_all()
elif temp > ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
18792a2154e363e0b2b8ccacb226f0fb273783c3 | 723 | py | Python | sim_examples/inference_cnn_loadweight.py | thuime/XPEsim | ab97d4c3c5b32ce4804ca58ad0f0083bb9de11fc | [
"MIT"
] | 27 | 2018-04-17T02:39:57.000Z | 2022-03-25T13:51:14.000Z | sim_examples/inference_cnn_loadweight.py | Arvin-xd/XPEsim | ab97d4c3c5b32ce4804ca58ad0f0083bb9de11fc | [
"MIT"
] | 1 | 2018-12-13T17:58:20.000Z | 2021-04-15T15:32:04.000Z | sim_examples/inference_cnn_loadweight.py | Arvin-xd/XPEsim | ab97d4c3c5b32ce4804ca58ad0f0083bb9de11fc | [
"MIT"
] | 14 | 2018-04-17T02:40:17.000Z | 2021-12-24T22:11:40.000Z | import simulator
import numpy as np
'''
TODO Support CNN in the Hardware Evaluation
'''
weights_dir = "./data/mnist-lenet.npz"
image_dir = "./data/dataset/mnist/test.npy"
batch_size = 10 # The number of input picture
weights = np.load(weights_dir)['arr_0'].item()
data = np.load(image_dir)[:batch_size]
... | 22.59375 | 67 | 0.644537 | import simulator
import numpy as np
'''
TODO Support CNN in the Hardware Evaluation
'''
weights_dir = "./data/mnist-lenet.npz"
image_dir = "./data/dataset/mnist/test.npy"
batch_size = 10 # The number of input picture
weights = np.load(weights_dir)['arr_0'].item()
data = np.load(image_dir)[:batch_size]
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ae3ea7a76f6a45e67113e758d9604cf094c6cf81 | 1,468 | py | Python | 07_docker/marathon_tweets/tweet_collector/get_tweets.py | bfc782/spice_weasel | 7f2d7586ae485001a9b875b62d093fd04e28faa8 | [
"CC0-1.0"
] | null | null | null | 07_docker/marathon_tweets/tweet_collector/get_tweets.py | bfc782/spice_weasel | 7f2d7586ae485001a9b875b62d093fd04e28faa8 | [
"CC0-1.0"
] | null | null | null | 07_docker/marathon_tweets/tweet_collector/get_tweets.py | bfc782/spice_weasel | 7f2d7586ae485001a9b875b62d093fd04e28faa8 | [
"CC0-1.0"
] | null | null | null | #import config
import os
from tweepy import OAuthHandler, Stream
import pymongo
import time
client = pymongo.MongoClient("mongodb")
db = client.tweets
time.sleep(10)
api_key = os.getenv('TWITTER_CONSUMER_API_KEY')
api_secret = os.getenv('TWITTER_CONSUMER_API_SECRET')
access_token = os.getenv('TWITTER_ACCESS_TOKEN')
... | 25.754386 | 90 | 0.681199 | #import config
import os
from tweepy import OAuthHandler, Stream
from tweepy.streaming import StreamListener
import json
import logging
import pymongo
import time
client = pymongo.MongoClient("mongodb")
db = client.tweets
time.sleep(10)
api_key = os.getenv('TWITTER_CONSUMER_API_KEY')
api_secret = os.getenv('TWITTER_... | 0 | 0 | 0 | 596 | 0 | 0 | 0 | 5 | 89 |
6cef8f5b03beb08dc2b0a1f5dceed760540264db | 859 | py | Python | Script Examples/example_py_script.py | snichola/Aurora | 3d38de87e9bb8affb309a0dd6f47c8479c5557be | [
"MIT"
] | null | null | null | Script Examples/example_py_script.py | snichola/Aurora | 3d38de87e9bb8affb309a0dd6f47c8479c5557be | [
"MIT"
] | null | null | null | Script Examples/example_py_script.py | snichola/Aurora | 3d38de87e9bb8affb309a0dd6f47c8479c5557be | [
"MIT"
] | null | null | null | import clr
clr.AddReference("Aurora")
clr.AddReference("System.Drawing")
from Aurora.Devices import DeviceKeys
import System
array_device_keys = System.Array[DeviceKeys] | 37.347826 | 207 | 0.772992 | import clr
clr.AddReference("Aurora")
clr.AddReference("System.Drawing")
from Aurora import Global
from Aurora.Settings import KeySequence
from Aurora.Devices import DeviceKeys
from Aurora.EffectsEngine import EffectLayer
from System.Drawing import Color
import System
array_device_keys = System.Array[DeviceKeys]
cl... | 0 | 0 | 0 | 520 | 0 | 0 | 0 | 56 | 112 |
c5b1a0e5bbf1b1c1c34ff6523e7d2c68a22c4255 | 1,077 | py | Python | list_files.py | diegomendesmoreno/stm8_standalone_programmer | 6f37d0416c91ff6ff90df3d197b359a41bb23705 | [
"MIT"
] | null | null | null | list_files.py | diegomendesmoreno/stm8_standalone_programmer | 6f37d0416c91ff6ff90df3d197b359a41bb23705 | [
"MIT"
] | null | null | null | list_files.py | diegomendesmoreno/stm8_standalone_programmer | 6f37d0416c91ff6ff90df3d197b359a41bb23705 | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
file_list = FileList()
file_list.list_files()
print(file_list.num_files, "files listed")
for f in file_list.files:
print(f)
| 31.676471 | 59 | 0.508821 | import os
class FileList:
def __init__(self):
self.path = 'Bin/' # Search in the 'Bin' directory
self.files = []
self.num_files = 0
def list_files(self):
# r=root, d=directories, f = files
for r, d, f in os.walk(self.path):
for file in f:
i... | 0 | 0 | 0 | 866 | 0 | 0 | 0 | -12 | 45 |
950517294b314e4c36db0912d9df4efeae2545e1 | 7,534 | py | Python | cows/service/imps/csmlbackend/wfs_csmlstoredqueries.py | cedadev/cows | db9ed729c886b271ce85355b97e39243081e8246 | [
"BSD-2-Clause"
] | 2 | 2018-05-09T16:12:43.000Z | 2018-08-21T17:10:22.000Z | cows/service/imps/csmlbackend/wfs_csmlstoredqueries.py | cedadev/cows | db9ed729c886b271ce85355b97e39243081e8246 | [
"BSD-2-Clause"
] | null | null | null | cows/service/imps/csmlbackend/wfs_csmlstoredqueries.py | cedadev/cows | db9ed729c886b271ce85355b97e39243081e8246 | [
"BSD-2-Clause"
] | null | null | null | # BSD Licence
# Copyright (c) 2009, Science & Technology Facilities Council (STFC)
# All rights reserved.
#
# See the LICENSE file in the source distribution of this software for
# the full license text.
""" This module contains CSML WFS 2.0 stored query implementations.
To add a new stored query, write the functiona... | 50.226667 | 157 | 0.765729 | # BSD Licence
# Copyright (c) 2009, Science & Technology Facilities Council (STFC)
# All rights reserved.
#
# See the LICENSE file in the source distribution of this software for
# the full license text.
""" This module contains CSML WFS 2.0 stored query implementations.
To add a new stored query, write the functiona... | 0 | 0 | 0 | 127 | 0 | 5,855 | 0 | 58 | 277 |
5bf3053088af5e798861a4a5b0c9a40c7343b799 | 1,383 | py | Python | markov_chain/specialists.py | pesikj/DataAnalysisUsingPython | 00269a7a7b5388fbbdcf3ddadd951a80a07f9c3a | [
"MIT"
] | null | null | null | markov_chain/specialists.py | pesikj/DataAnalysisUsingPython | 00269a7a7b5388fbbdcf3ddadd951a80a07f9c3a | [
"MIT"
] | null | null | null | markov_chain/specialists.py | pesikj/DataAnalysisUsingPython | 00269a7a7b5388fbbdcf3ddadd951a80a07f9c3a | [
"MIT"
] | null | null | null | import numpy as np
from numpy.linalg import inv
from scipy.stats import binom
#a1 = failed
#a2 = passed
testPassingProbabilities = [0.7, 0.6, 0.8, 0.9]
noOfSpecialistsCurrent = [100, 70, 50, 60]
wantedSpecialists = 5
wantedWithProbability = 0.9
transitionMatrix = np.zeros((len(testPassingProbabilities) + 2, len(tes... | 34.575 | 107 | 0.748373 | import numpy as np
from numpy.linalg import inv
from scipy.stats import binom
#a1 = failed
#a2 = passed
testPassingProbabilities = [0.7, 0.6, 0.8, 0.9]
noOfSpecialistsCurrent = [100, 70, 50, 60]
wantedSpecialists = 5
wantedWithProbability = 0.9
transitionMatrix = np.zeros((len(testPassingProbabilities) + 2, len(tes... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
83de024d990b9741a3362c8d9bb1b9a580904364 | 14,833 | py | Python | eosfactory/shell/wallet.py | ephdtrg/eosfactory | 721843707cb277618142c6d9518e3f231cae3b79 | [
"MIT"
] | null | null | null | eosfactory/shell/wallet.py | ephdtrg/eosfactory | 721843707cb277618142c6d9518e3f231cae3b79 | [
"MIT"
] | null | null | null | eosfactory/shell/wallet.py | ephdtrg/eosfactory | 721843707cb277618142c6d9518e3f231cae3b79 | [
"MIT"
] | null | null | null |
import eosfactory.core.logger as logger
import eosfactory.core.errors as errors
import eosfactory.core.setup as setup
import eosfactory.core.interface as interface
import eosfactory.core.teos as teos
if setup.node_api == "cleos":
import eosfactory.core.cleos as cleos
elif setup.node_api == "eosjs":
import eosfact... | 34.256351 | 103 | 0.523697 | import os
import json
import inspect
import eosfactory.core.logger as logger
import eosfactory.core.errors as errors
import eosfactory.core.setup as setup
import eosfactory.core.interface as interface
import eosfactory.core.teos as teos
if setup.node_api == "cleos":
import eosfactory.core.cleos as cleos
elif setup... | 0 | 0 | 0 | 13,692 | 0 | 595 | 0 | -13 | 207 |
9ff5a5ee62d2ada8f035ed015df587c46f476bb6 | 302 | py | Python | codes/Ex074.py | BelfortJoao/Curso-phyton01 | 79376233be228f39bf548f90b8d9bd5419ac067a | [
"MIT"
] | 3 | 2021-08-17T14:02:14.000Z | 2021-08-19T02:37:30.000Z | codes/Ex074.py | BelfortJoao/Curso-phyton01 | 79376233be228f39bf548f90b8d9bd5419ac067a | [
"MIT"
] | null | null | null | codes/Ex074.py | BelfortJoao/Curso-phyton01 | 79376233be228f39bf548f90b8d9bd5419ac067a | [
"MIT"
] | null | null | null | from random import randint
x = (randint(1, 10), randint(1, 10), randint(1, 10), randint(1, 10), randint(1, 10), randint(1, 10))
print('sorteei os numeros:', end='')
for n in x:
print(f'{n}', end=", ")
print(f"\nO maior valor na ordem foi {max(x)}")
print(f"\nO menor valor na ordem foi {min(x)}")
| 37.75 | 100 | 0.625828 | from random import randint
x = (randint(1, 10), randint(1, 10), randint(1, 10), randint(1, 10), randint(1, 10), randint(1, 10))
print('sorteei os numeros:', end='')
for n in x:
print(f'{n}', end=", ")
print(f"\nO maior valor na ordem foi {max(x)}")
print(f"\nO menor valor na ordem foi {min(x)}")
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |