hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4665d5dadefb82bb653c2472c42416089a41e2f4 | 4,379 | py | Python | contrib/seeds/generate-seeds.py | bitmammoth/kekcoin-segwit | ac5ed108fbe3221a68826108bdc5bef725f98849 | [
"MIT"
] | 7 | 2018-01-29T18:47:19.000Z | 2019-06-24T13:48:10.000Z | contrib/seeds/generate-seeds.py | bitmammoth/kekcoin-segwit | ac5ed108fbe3221a68826108bdc5bef725f98849 | [
"MIT"
] | null | null | null | contrib/seeds/generate-seeds.py | bitmammoth/kekcoin-segwit | ac5ed108fbe3221a68826108bdc5bef725f98849 | [
"MIT"
] | 17 | 2017-11-20T21:20:03.000Z | 2021-01-31T12:43:54.000Z | #!/usr/bin/python
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Script to generate list of seed nodes for chainparams.cpp.
This script expects two text files in the directory tha... | 31.503597 | 98 | 0.582553 |
0776da1912c4008ac8cac90df4b1e35ed2f0701b | 1,210 | py | Python | 05_Howler/howler.py | Alexelofu/TPP | e1aaf103463cc3107ba23642d9666344f8aa79e4 | [
"MIT"
] | null | null | null | 05_Howler/howler.py | Alexelofu/TPP | e1aaf103463cc3107ba23642d9666344f8aa79e4 | [
"MIT"
] | null | null | null | 05_Howler/howler.py | Alexelofu/TPP | e1aaf103463cc3107ba23642d9666344f8aa79e4 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
#!/usr/bin/env python3
import argparse
import os
import sys
# --------------------------------------------------
def get_args():
"""get command-line arguments"""
parser = argparse.ArgumentParser(
description='Howler (upper-cases input)',
formatter_class=argparse.ArgumentD... | 24.2 | 69 | 0.463636 |
94b15f8b263b6203800ac84f5f80e3c04ffe48c5 | 932 | py | Python | 26_ShortestPath/Step02/wowo0709.py | StudyForCoding/BEAKJOON | 84e1c5e463255e919ccf6b6a782978c205420dbf | [
"MIT"
] | null | null | null | 26_ShortestPath/Step02/wowo0709.py | StudyForCoding/BEAKJOON | 84e1c5e463255e919ccf6b6a782978c205420dbf | [
"MIT"
] | 3 | 2020-11-04T05:38:53.000Z | 2021-03-02T02:15:19.000Z | 26_ShortestPath/Step02/wowo0709.py | StudyForCoding/BEAKJOON | 84e1c5e463255e919ccf6b6a782978c205420dbf | [
"MIT"
] | null | null | null | import sys
input = sys.stdin.readline
from heapq import heappush,heappop
INF = float('inf')
# 다익스트라 알고리즘에서는 도착지점에 이를 경우 return하는 방식이 아닌
# 모든 지점에 대한 최단 경로를 구한 뒤 값들을 비교한다.
def dijkstra(startV):
c,c[startV] = [INF for _ in range(V+1)],0
hp = []
heappush(hp,(c[startV],startV))
while hp:
cc,cv = hea... | 28.242424 | 58 | 0.57618 |
f50c6c2e90ae1b81d163120981d30d35c81a1fb9 | 1,695 | py | Python | lmeds/pages/factories.py | ElijahGut/RPT-TTS | fc454d89d758a7c56f9510794db7119a34f09fc2 | [
"MIT"
] | 3 | 2021-12-07T07:24:17.000Z | 2022-02-15T21:39:47.000Z | lmeds/pages/factories.py | ElijahGut/RPT-TTS | fc454d89d758a7c56f9510794db7119a34f09fc2 | [
"MIT"
] | null | null | null | lmeds/pages/factories.py | ElijahGut/RPT-TTS | fc454d89d758a7c56f9510794db7119a34f09fc2 | [
"MIT"
] | null | null | null | '''
Created on Feb 28, 2014
@author: tmahrt
'''
from lmeds.pages import assorted_experiment_pages
from lmeds.pages import boundary_pages
from lmeds.pages import core_pages
class ReservedWordException(Exception):
def __str__(self):
return ("'webSurvey' is a reserved word and cannot be "
... | 30.267857 | 63 | 0.575811 |
71659f9607a8c68504d45e837e400c4f783834cd | 10,771 | py | Python | src/data/preprocess_dataset.py | HuyVu0508/sentence2vector | d3704469d8f256789ce342b81ae1c2e05cf0e97a | [
"MIT"
] | 3 | 2019-02-10T16:35:22.000Z | 2020-12-02T15:27:03.000Z | src/data/preprocess_dataset.py | HuyVu0508/sentence2vector | d3704469d8f256789ce342b81ae1c2e05cf0e97a | [
"MIT"
] | null | null | null | src/data/preprocess_dataset.py | HuyVu0508/sentence2vector | d3704469d8f256789ce342b81ae1c2e05cf0e97a | [
"MIT"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. 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 applica... | 37.141379 | 140 | 0.684245 |
1a004b103c2c19f0facfebd4dbca7a7d54d01e22 | 102,096 | py | Python | tinynn/graph/tracer.py | steven0129/TinyNeuralNetwork | 2ffa5a806cade1d1ebd2aa54c5697d3ad131d22f | [
"MIT"
] | null | null | null | tinynn/graph/tracer.py | steven0129/TinyNeuralNetwork | 2ffa5a806cade1d1ebd2aa54c5697d3ad131d22f | [
"MIT"
] | null | null | null | tinynn/graph/tracer.py | steven0129/TinyNeuralNetwork | 2ffa5a806cade1d1ebd2aa54c5697d3ad131d22f | [
"MIT"
] | null | null | null | import contextlib
import copy
import importlib
import inspect
import io
import os
import re
import sys
import traceback
import typing
import weakref
import torch
import torch.nn as nn
import yaml
import numpy as np
from torch.nn.parallel.data_parallel import DataParallel
from torch.nn.parallel.distributed import Dist... | 39.912432 | 120 | 0.581433 |
80680b329bbdcb41d7a9977da90791772672c224 | 6,353 | py | Python | cnn/train.py | bkj/darts | ed22fae560462ae6df6321a604a7e0ae84918d7f | [
"Apache-2.0"
] | null | null | null | cnn/train.py | bkj/darts | ed22fae560462ae6df6321a604a7e0ae84918d7f | [
"Apache-2.0"
] | null | null | null | cnn/train.py | bkj/darts | ed22fae560462ae6df6321a604a7e0ae84918d7f | [
"Apache-2.0"
] | null | null | null | import os
import sys
import time
import glob
import pickle
import numpy as np
import torch
import utils
import logging
import argparse
import torch.nn as nn
import genotypes
import torch.utils
import torchvision.datasets as dset
import torch.backends.cudnn as cudnn
from torch.autograd import Variable
from model import... | 36.096591 | 100 | 0.718086 |
baa08f0fa7281d954feb2834b2a9921b9fda33e0 | 5,020 | py | Python | python/hsfs/core/expectations_api.py | kouzant/feature-store-api | f6a666e11fd33ae814a79c588ff49547b942b09d | [
"Apache-2.0"
] | null | null | null | python/hsfs/core/expectations_api.py | kouzant/feature-store-api | f6a666e11fd33ae814a79c588ff49547b942b09d | [
"Apache-2.0"
] | null | null | null | python/hsfs/core/expectations_api.py | kouzant/feature-store-api | f6a666e11fd33ae814a79c588ff49547b942b09d | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2020 Logical Clocks AB
#
# 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... | 33.245033 | 90 | 0.619323 |
5796f54068d3b346ddd0b08e54761d529e54a3aa | 700 | py | Python | GameOfLife/agent_gol.py | Ignacio-Moral-22/TC2008B_A01028470 | 69d428b0dacdfef5e84effbdd5ab8021ca7c09bd | [
"MIT"
] | null | null | null | GameOfLife/agent_gol.py | Ignacio-Moral-22/TC2008B_A01028470 | 69d428b0dacdfef5e84effbdd5ab8021ca7c09bd | [
"MIT"
] | null | null | null | GameOfLife/agent_gol.py | Ignacio-Moral-22/TC2008B_A01028470 | 69d428b0dacdfef5e84effbdd5ab8021ca7c09bd | [
"MIT"
] | null | null | null | from mesa import Agent
class GameOfLife(Agent):
def __init__(self, pos, model):
super().__init__(pos, model)
self.pos = pos
self.condition = "Alive"
self.next_state = self.condition
def step(self):
self.next_state = self.condition
count = 0
for neigh... | 30.434783 | 64 | 0.575714 |
ea70576cd78ebc427f58fbbd77230ca43b00a9ee | 4,488 | py | Python | numfun/polyfit.py | mhsnjvd/numfun | b0a8d1c1e7d31f83ee2d93e27047f2416975bbc7 | [
"MIT"
] | null | null | null | numfun/polyfit.py | mhsnjvd/numfun | b0a8d1c1e7d31f83ee2d93e27047f2416975bbc7 | [
"MIT"
] | 1 | 2021-06-25T15:45:18.000Z | 2021-06-25T15:45:18.000Z | numfun/polyfit.py | cristianmatache/numfun | ad382148548c1d24aec2491de0057424eb940421 | [
"MIT"
] | 1 | 2020-10-22T19:48:11.000Z | 2020-10-22T19:48:11.000Z | from typing import Sequence, Union
import numpy as np
from numba import njit
from numfun.function import Function
# noinspection PyPep8Naming
@njit
def polyfit_jit(x: np.array, y: np.array, n: int, a: float, b: float) -> tuple:
"""Jitted version of polyfit, see polyfit for details.
:param x: nodes
:par... | 30.120805 | 97 | 0.565731 |
96c486fef10899a31dd03a29a36fd353cdb55e43 | 15,362 | py | Python | scCloud/scCloud/commands/SubClustering.py | broadinstitute/scRNA-Seq | 03aafb92274a97f4d634ac9e42f0e0feca91ed98 | [
"BSD-3-Clause"
] | 12 | 2019-04-08T11:39:33.000Z | 2022-02-22T02:50:27.000Z | scCloud/scCloud/commands/SubClustering.py | broadinstitute/scRNA-Seq | 03aafb92274a97f4d634ac9e42f0e0feca91ed98 | [
"BSD-3-Clause"
] | null | null | null | scCloud/scCloud/commands/SubClustering.py | broadinstitute/scRNA-Seq | 03aafb92274a97f4d634ac9e42f0e0feca91ed98 | [
"BSD-3-Clause"
] | 3 | 2019-03-06T20:44:33.000Z | 2020-02-17T13:43:46.000Z | from .Base import Base
from ..pipeline import run_pipeline
class SubClustering(Base):
"""
Run scCloud to obtain subclusters.
Usage:
scCloud subcluster [options] --subset-selection <subset-selection>... <input_file> <output_name>
scCloud subcluster -h
Arguments:
input_file Single cell data with ... | 68.887892 | 361 | 0.602721 |
8b7d7c25cd11fec086f054111e9e00614eef165b | 386 | py | Python | HackerRank/Python/Basic_Data_Types/Lists.py | TISparta/competitive-programming-solutions | 31987d4e67bb874bf15653565c6418b5605a20a8 | [
"MIT"
] | 1 | 2018-01-30T13:21:30.000Z | 2018-01-30T13:21:30.000Z | HackerRank/Python/Basic_Data_Types/Lists.py | TISparta/competitive-programming-solutions | 31987d4e67bb874bf15653565c6418b5605a20a8 | [
"MIT"
] | null | null | null | HackerRank/Python/Basic_Data_Types/Lists.py | TISparta/competitive-programming-solutions | 31987d4e67bb874bf15653565c6418b5605a20a8 | [
"MIT"
] | 1 | 2018-08-29T13:26:50.000Z | 2018-08-29T13:26:50.000Z | v = []
tc = int(input())
for t in range(tc):
s = input().split()
if(s[0]=="insert"):
v.insert(int(s[1]),int(s[2]))
elif(s[0]=="print"):
print(v)
elif(s[0]=="remove"):
v.remove(int(s[1]))
elif(s[0]=="append"):
v.append(int(s[1]))
elif(s[0]=="sort"):
v.sort()
elif(s[0]==... | 20.315789 | 35 | 0.455959 |
c6d74c01e452a1af95ed01c873ab73c560b0e6c7 | 38,448 | py | Python | chemkin.py | kyle662606957/PyChemkin | c15a0be92e5021af62f8932acd82a424a1afef44 | [
"Unlicense"
] | 9 | 2018-10-29T13:30:36.000Z | 2022-01-21T13:49:23.000Z | chemkin.py | zhugeyicixin/PyChemkin | c15a0be92e5021af62f8932acd82a424a1afef44 | [
"Unlicense"
] | null | null | null | chemkin.py | zhugeyicixin/PyChemkin | c15a0be92e5021af62f8932acd82a424a1afef44 | [
"Unlicense"
] | 8 | 2016-05-28T08:23:53.000Z | 2021-08-07T07:46:44.000Z | #!/usr/bin/env python
# encoding: utf-8
"""
This module contains several helper functions useful when running Chemkin jobs
from the command line.
"""
import os.path
import subprocess
import csv
import numpy
import logging
import sys
#####################################################################... | 40.008325 | 170 | 0.545386 |
596e955e3f53c25066da11d12577fedbde9c09d1 | 8,270 | py | Python | tests/test_rdb2rdf.py | bennokr/rdflib-r2r | ac6f3d31cff7c16210f62c65c71d858ba711d2ad | [
"MIT"
] | null | null | null | tests/test_rdb2rdf.py | bennokr/rdflib-r2r | ac6f3d31cff7c16210f62c65c71d858ba711d2ad | [
"MIT"
] | null | null | null | tests/test_rdb2rdf.py | bennokr/rdflib-r2r | ac6f3d31cff7c16210f62c65c71d858ba711d2ad | [
"MIT"
] | null | null | null | """
Run tests from [https://www.w3.org/TR/2012/NOTE-rdb2rdf-test-cases-20120814/]
Downloaded from [https://dvcs.w3.org/hg/rdb2rdf-tests/raw-file/default/rdb2rdf-ts.zip]
"""
import pathlib
import logging
import re
import pathlib
from typing import NamedTuple
import pytest
import rdflib
from rdflib.namespace import RD... | 36.59292 | 99 | 0.572551 |
1ad26a1c298ecb86663266062e9e6ad0e453372f | 1,793 | py | Python | tests/test_apps.py | fyntex/fd-django-accounts | 12b5dbe695cb4210750389ef073870a079901a2d | [
"MIT"
] | null | null | null | tests/test_apps.py | fyntex/fd-django-accounts | 12b5dbe695cb4210750389ef073870a079901a2d | [
"MIT"
] | 103 | 2020-04-10T06:02:59.000Z | 2022-03-28T11:02:15.000Z | tests/test_apps.py | fyndata/fyndata-django-accounts | 2100774ddb119819f2123c42e015bba950935ce0 | [
"MIT"
] | null | null | null | import django.core.exceptions
from django.test import SimpleTestCase, override_settings
from fd_dj_accounts.apps import AccountsAppConfig, _validate_app_settings
@override_settings(APP_ACCOUNTS_SYSTEM_USERNAME='user@example.com')
class AppConfigTestCase(SimpleTestCase):
def test_ready(self): # type: ignore
... | 37.354167 | 94 | 0.736196 |
d6805e6bfc546d12e9d9c5c04857c6c341f4e89c | 2,869 | py | Python | budgeted_bo/acquisition_functions/custom_warmstart_multistep_old.py | RaulAstudillo06/BudgetedBO | 740cbf8397ac68bcdb1a196f2b56381adb1be1b4 | [
"MIT"
] | 1 | 2022-03-30T11:45:59.000Z | 2022-03-30T11:45:59.000Z | budgeted_bo/acquisition_functions/custom_warmstart_multistep_old.py | RaulAstudillo06/BudgetedBO | 740cbf8397ac68bcdb1a196f2b56381adb1be1b4 | [
"MIT"
] | null | null | null | budgeted_bo/acquisition_functions/custom_warmstart_multistep_old.py | RaulAstudillo06/BudgetedBO | 740cbf8397ac68bcdb1a196f2b56381adb1be1b4 | [
"MIT"
] | null | null | null | from botorch import acquisition
import random
import torch
from botorch.acquisition.analytic import ExpectedImprovement, PosteriorMean
from botorch.acquisition.multi_step_lookahead import qMultiStepLookahead, warmstart_multistep
from botorch.optim import optimize_acqf
from botorch.sampling.samplers import IIDNormalSam... | 32.977011 | 93 | 0.669571 |
d9df596baf85fad1d5c445c7130103d923d5b8ed | 3,715 | py | Python | examples/ex04_xcel/ChecksumXcelRTL.py | kevinyuan/pymtl3 | 5949e6a4acc625c0ccbbb25be3af1d0db683df3c | [
"BSD-3-Clause"
] | 152 | 2020-06-03T02:34:11.000Z | 2022-03-30T04:16:45.000Z | examples/ex04_xcel/ChecksumXcelRTL.py | kevinyuan/pymtl3 | 5949e6a4acc625c0ccbbb25be3af1d0db683df3c | [
"BSD-3-Clause"
] | 139 | 2019-05-29T00:37:09.000Z | 2020-05-17T16:49:26.000Z | examples/ex04_xcel/ChecksumXcelRTL.py | kevinyuan/pymtl3 | 5949e6a4acc625c0ccbbb25be3af1d0db683df3c | [
"BSD-3-Clause"
] | 22 | 2020-05-18T13:42:05.000Z | 2022-03-11T08:37:51.000Z | """
==========================================================================
ChecksumXcelRTL.py
==========================================================================
Register transfer level implementation of a checksum accelerator.
Author : Yanghui Ou
Date : June 14, 2019
"""
from examples.ex02_cksum.Checksum... | 28.576923 | 76 | 0.563392 |
bb32f1555c6b8241f7b0a0a59b1d4770f0bacb21 | 1,318 | py | Python | pg_interface/result.py | Jesus/bibo | bb5d8a018bc131b9b1cf8f9de9da4d7dd6f6ce63 | [
"MIT"
] | 1 | 2019-08-16T12:12:02.000Z | 2019-08-16T12:12:02.000Z | pg_interface/result.py | Jesus/bibo | bb5d8a018bc131b9b1cf8f9de9da4d7dd6f6ce63 | [
"MIT"
] | 3 | 2019-01-09T04:50:59.000Z | 2020-03-19T15:20:17.000Z | pg_interface/result.py | Jesus/bibo | bb5d8a018bc131b9b1cf8f9de9da4d7dd6f6ce63 | [
"MIT"
] | 1 | 2019-02-09T11:04:47.000Z | 2019-02-09T11:04:47.000Z | import os
import tempfile
import time
import uuid
import socket
import urllib.request
from shutil import rmtree
import psycopg2
import json
class Result:
def __init__(self, data):
self.result_data = data
def persist(self, connection, photo_id):
"""Persists the inference results in the databas... | 28.652174 | 76 | 0.481032 |
b9c4935cefde66d13fcbd17cd8a3d5b1dffa068b | 5,185 | py | Python | mitmproxy/flow.py | fotinakis/mitmproxy | d16a3753d73714a51fbe846e45fe77d5e41cb2ab | [
"MIT"
] | 1 | 2021-01-13T15:39:58.000Z | 2021-01-13T15:39:58.000Z | mitmproxy/flow.py | fotinakis/mitmproxy | d16a3753d73714a51fbe846e45fe77d5e41cb2ab | [
"MIT"
] | null | null | null | mitmproxy/flow.py | fotinakis/mitmproxy | d16a3753d73714a51fbe846e45fe77d5e41cb2ab | [
"MIT"
] | null | null | null | import time
import copy
import uuid
from mitmproxy import controller # noqa
from mitmproxy import stateobject
from mitmproxy import connections
from mitmproxy import version
import typing # noqa
class Error(stateobject.StateObject):
"""
An Error.
This is distinct from an protocol error respon... | 26.726804 | 80 | 0.578206 |
24266026545e6b63ad2bee6d86b508b8cb7ad872 | 9,858 | py | Python | metricbeat/scripts/docs_collector.py | tyrocca/beats | 4c5daa89da0271580c0cb7302a9ca94d3b7c91ec | [
"ECL-2.0",
"Apache-2.0"
] | 87 | 2017-07-22T00:14:20.000Z | 2022-03-28T04:00:43.000Z | metricbeat/scripts/docs_collector.py | tyrocca/beats | 4c5daa89da0271580c0cb7302a9ca94d3b7c91ec | [
"ECL-2.0",
"Apache-2.0"
] | 21 | 2018-05-29T06:50:18.000Z | 2020-07-30T19:07:58.000Z | metricbeat/scripts/docs_collector.py | tyrocca/beats | 4c5daa89da0271580c0cb7302a9ca94d3b7c91ec | [
"ECL-2.0",
"Apache-2.0"
] | 31 | 2018-06-11T19:45:08.000Z | 2022-01-27T08:48:39.000Z | import argparse
import os
import six
import yaml
# Collects docs for all modules and metricset
def collect(beat_name):
oss_base_dir = "module"
oss_path = os.path.abspath(oss_base_dir)
xpack_base_dir = "../x-pack/metricbeat/module"
xpack_path = os.path.abspath(xpack_base_dir)
generated_note = ""... | 35.978102 | 120 | 0.572226 |
f83076a170962332754e91ec71c73f4019f369ff | 8,645 | py | Python | core/dbt/clients/jinja.py | ClaySheffler/dbt | 588851ac1cd2ef9856706f14cee573dedbc46d8c | [
"Apache-2.0"
] | 1 | 2020-08-11T08:44:33.000Z | 2020-08-11T08:44:33.000Z | core/dbt/clients/jinja.py | ClaySheffler/dbt | 588851ac1cd2ef9856706f14cee573dedbc46d8c | [
"Apache-2.0"
] | null | null | null | core/dbt/clients/jinja.py | ClaySheffler/dbt | 588851ac1cd2ef9856706f14cee573dedbc46d8c | [
"Apache-2.0"
] | 1 | 2019-04-16T10:51:10.000Z | 2019-04-16T10:51:10.000Z | import codecs
import linecache
import os
import jinja2
import jinja2._compat
import jinja2.ext
import jinja2.nodes
import jinja2.parser
import jinja2.sandbox
import dbt.compat
import dbt.exceptions
from dbt.node_types import NodeType
from dbt.utils import AttrDict
from dbt.logger import GLOBAL_LOGGER as logger # n... | 30.440141 | 97 | 0.605668 |
dadd7ad57b5dee479ee1fb7db41d07f578680722 | 7,812 | py | Python | build_tools/github_actions/cmake_ci.py | mcx/iree | a85173143d7672d3d508ae38283964a08ed62e86 | [
"Apache-2.0"
] | 1 | 2021-09-18T11:21:53.000Z | 2021-09-18T11:21:53.000Z | build_tools/github_actions/cmake_ci.py | mcx/iree | a85173143d7672d3d508ae38283964a08ed62e86 | [
"Apache-2.0"
] | null | null | null | build_tools/github_actions/cmake_ci.py | mcx/iree | a85173143d7672d3d508ae38283964a08ed62e86 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The IREE Authors
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# This configure script wraps a normal CMake configure of the project for use
# in CI pipelines, doing... | 34.875 | 93 | 0.65361 |
40adea8f0b0d8c3054570172ca86cbea26394703 | 2,760 | py | Python | Task3/module/detector/Detector.py | KKowalewski24/ADZ | 8a04570a1f6f08506572386b2312a259a8308f56 | [
"MIT"
] | null | null | null | Task3/module/detector/Detector.py | KKowalewski24/ADZ | 8a04570a1f6f08506572386b2312a259a8308f56 | [
"MIT"
] | null | null | null | Task3/module/detector/Detector.py | KKowalewski24/ADZ | 8a04570a1f6f08506572386b2312a259a8308f56 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from typing import Any, Dict, List
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
from sklearn.metrics import precision_score, recall_score
from module.utils import prepare_filename
class Detector(ABC):
def __init__(self, dataset: pd.DataFrame, g... | 33.253012 | 94 | 0.63913 |
22ac895542f979e73c74298142814f38022714cc | 10,193 | py | Python | cd-scripts/eosio_rpc_actions_test.py | terradacs/beos-core | 31e19170bcad573b1d498811284e62babd478f92 | [
"MIT"
] | 9 | 2019-04-04T18:46:14.000Z | 2022-03-03T16:22:56.000Z | cd-scripts/eosio_rpc_actions_test.py | terradacs/beos-core | 31e19170bcad573b1d498811284e62babd478f92 | [
"MIT"
] | null | null | null | cd-scripts/eosio_rpc_actions_test.py | terradacs/beos-core | 31e19170bcad573b1d498811284e62babd478f92 | [
"MIT"
] | 3 | 2019-03-19T17:45:08.000Z | 2021-03-22T21:45:35.000Z | #!/usr/bin/env python3
import config
import logging
import sys
MODULE_NAME = "EOSIO RPC Actions Test"
logger = logging.getLogger(MODULE_NAME)
logger.setLevel(config.LOG_LEVEL)
ch = logging.StreamHandler(sys.stdout)
ch.setLevel(config.LOG_LEVEL)
ch.setFormatter(logging.Formatter(config.LOG_FORMAT))
fh = logging.Fil... | 41.604082 | 156 | 0.673109 |
d3164cfd3ec8b920615e8aa4ec3bd76f388da10e | 177 | py | Python | exercicios/lista1/exercicio19.py | lagcrs/algoritmos | 5ee860c71db8ac2ef8bbe6cc87726938b1ca9c72 | [
"Apache-2.0"
] | null | null | null | exercicios/lista1/exercicio19.py | lagcrs/algoritmos | 5ee860c71db8ac2ef8bbe6cc87726938b1ca9c72 | [
"Apache-2.0"
] | null | null | null | exercicios/lista1/exercicio19.py | lagcrs/algoritmos | 5ee860c71db8ac2ef8bbe6cc87726938b1ca9c72 | [
"Apache-2.0"
] | null | null | null | import math
num = int(input("Digite o número: "))
base = int(input("Digite a base: "))
log = math.log(num, base)
print(f'Logaritmo: {log} do numero {num} e base {base}') | 25.285714 | 56 | 0.632768 |
4ce356291e61892412044296f8c157b910cd2af7 | 28,000 | py | Python | env/lib/python3.5/site-packages/sklearn/discriminant_analysis.py | Udolf15/recommedMeMovies | be5ae74acd98e3f93beaaa5bb55623974fb24247 | [
"MIT"
] | 8 | 2019-05-29T09:38:30.000Z | 2021-01-20T03:36:59.000Z | venv/Lib/site-packages/sklearn/discriminant_analysis.py | uncledragon/CalibrationLibrary | 952abcf471b819b6b6dfa23b6d5dd248155f9dbf | [
"MIT"
] | 12 | 2021-03-09T03:01:16.000Z | 2022-03-11T23:59:36.000Z | venv/Lib/site-packages/sklearn/discriminant_analysis.py | uncledragon/CalibrationLibrary | 952abcf471b819b6b6dfa23b6d5dd248155f9dbf | [
"MIT"
] | 3 | 2019-06-13T07:10:54.000Z | 2020-09-11T06:01:40.000Z | """
Linear Discriminant Analysis and Quadratic Discriminant Analysis
"""
# Authors: Clemens Brunner
# Martin Billinger
# Matthieu Perrot
# Mathieu Blondel
# License: BSD 3-Clause
from __future__ import print_function
import warnings
import numpy as np
from .utils import deprecated
from sci... | 35.175879 | 79 | 0.592786 |
4fa3b6d28040cda73cec88f9d3a19bed43ac3835 | 12,057 | py | Python | jina/clients/mixin.py | sthagen/jina-ai-jina | a854da4f7cbafcf5d699a505dacfa4f27014fb62 | [
"Apache-2.0"
] | null | null | null | jina/clients/mixin.py | sthagen/jina-ai-jina | a854da4f7cbafcf5d699a505dacfa4f27014fb62 | [
"Apache-2.0"
] | null | null | null | jina/clients/mixin.py | sthagen/jina-ai-jina | a854da4f7cbafcf5d699a505dacfa4f27014fb62 | [
"Apache-2.0"
] | null | null | null | import warnings
from functools import partialmethod, wraps
from inspect import signature
from typing import TYPE_CHECKING, AsyncGenerator, Dict, List, Optional, Union
from jina.helper import get_or_reuse_loop, run_async
from jina.importer import ImportExtensions
if TYPE_CHECKING:
from jina import DocumentArray
... | 42.157343 | 196 | 0.643775 |
a8a7b5d9c3b7aa4b6a7ada9caa1ee81ae1249f2e | 70 | py | Python | tests/backtests/test_compare_outputs.py | NHSDigital/rap-package-template | 5c79c5c5257c8b931b3e8b0b08f99ca2ea68e094 | [
"MIT"
] | 3 | 2022-01-26T16:55:09.000Z | 2022-03-09T10:15:04.000Z | tests/backtests/test_compare_outputs.py | NHSDigital/rap-package-template | 5c79c5c5257c8b931b3e8b0b08f99ca2ea68e094 | [
"MIT"
] | null | null | null | tests/backtests/test_compare_outputs.py | NHSDigital/rap-package-template | 5c79c5c5257c8b931b3e8b0b08f99ca2ea68e094 | [
"MIT"
] | null | null | null | # Compares historical data outputs between RAP and non RAP pipelines.
| 35 | 69 | 0.814286 |
fc99d11687cc8db89620ca5b6aeda900b0c010a2 | 5,727 | py | Python | django/core/cache/backends/filebased.py | Lord-Elrond/django | 178109c1734ccc16386c3e3cbae1465c7a1b8ed8 | [
"BSD-3-Clause",
"0BSD"
] | 61,676 | 2015-01-01T00:05:13.000Z | 2022-03-31T20:37:54.000Z | django/core/cache/backends/filebased.py | Lord-Elrond/django | 178109c1734ccc16386c3e3cbae1465c7a1b8ed8 | [
"BSD-3-Clause",
"0BSD"
] | 8,884 | 2015-01-01T00:12:05.000Z | 2022-03-31T19:53:11.000Z | django/core/cache/backends/filebased.py | Lord-Elrond/django | 178109c1734ccc16386c3e3cbae1465c7a1b8ed8 | [
"BSD-3-Clause",
"0BSD"
] | 33,143 | 2015-01-01T02:04:52.000Z | 2022-03-31T19:42:46.000Z | "File-based cache backend"
import glob
import os
import pickle
import random
import tempfile
import time
import zlib
from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache
from django.core.files import locks
from django.core.files.move import file_move_safe
from django.utils.crypto import md5
class F... | 34.5 | 80 | 0.586345 |
dce00289bc9cb1fd5ecb8abd67d59859946222a6 | 2,577 | py | Python | Totoro/bin/rearrangeSets.py | sdss/Totoro | 74befd99bda47ebb8c03a276b57371b5788e154a | [
"Apache-2.0"
] | 1 | 2018-08-22T00:34:30.000Z | 2018-08-22T00:34:30.000Z | Totoro/bin/rearrangeSets.py | sdss/Totoro | 74befd99bda47ebb8c03a276b57371b5788e154a | [
"Apache-2.0"
] | 4 | 2018-06-06T22:10:14.000Z | 2018-06-14T04:47:23.000Z | Totoro/bin/rearrangeSets.py | sdss/Totoro | 74befd99bda47ebb8c03a276b57371b5788e154a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
rearrageSets.py
Created by José Sánchez-Gallego on 10 Dec 2014.
Licensed under a 3-clause BSD license.
Revision history:
10 Dec 2014 J. Sánchez-Gallego
Initial version
"""
from __future__ import division, print_function
import argparse
import os
import sys
impo... | 29.284091 | 99 | 0.645324 |
333dea6261acb503fef4f0a820977893bb6684a5 | 1,837 | py | Python | pyctuator/httptrace/flask_http_tracer.py | yanoom/pyctuator | b3aff058e1193eb6db8b887b1c1cf8c116819f82 | [
"Apache-2.0"
] | 1 | 2020-04-28T18:16:43.000Z | 2020-04-28T18:16:43.000Z | pyctuator/httptrace/flask_http_tracer.py | yanoom/pyctuator | b3aff058e1193eb6db8b887b1c1cf8c116819f82 | [
"Apache-2.0"
] | null | null | null | pyctuator/httptrace/flask_http_tracer.py | yanoom/pyctuator | b3aff058e1193eb6db8b887b1c1cf8c116819f82 | [
"Apache-2.0"
] | null | null | null | from collections import defaultdict
from datetime import datetime
from typing import Mapping, List
from flask import Request, Response, after_this_request
from werkzeug.datastructures import Headers
from pyctuator.httptrace import TraceRecord, TraceRequest, TraceResponse
from pyctuator.httptrace.http_tracer import Ht... | 36.74 | 114 | 0.686445 |
ac20c20c211779ee4223f3421c829904feea4ce1 | 4,650 | py | Python | src/prefect/storage/_healthcheck.py | suryatmodulus/prefect | e4ac9f6aa831140c7fba0397f3e5e0884b1b9e42 | [
"Apache-2.0"
] | 3 | 2021-11-09T10:46:58.000Z | 2022-03-11T04:22:35.000Z | src/prefect/storage/_healthcheck.py | suryatmodulus/prefect | e4ac9f6aa831140c7fba0397f3e5e0884b1b9e42 | [
"Apache-2.0"
] | 8 | 2021-10-11T16:42:59.000Z | 2022-03-31T08:42:24.000Z | src/prefect/storage/_healthcheck.py | suryatmodulus/prefect | e4ac9f6aa831140c7fba0397f3e5e0884b1b9e42 | [
"Apache-2.0"
] | 1 | 2022-03-11T04:22:40.000Z | 2022-03-11T04:22:40.000Z | """
A health check script which is intended to be executed inside a user's Docker container
containing their Flow(s). This class runs through a series of checks to catch possible
deployment issues early on.
"""
import ast
import binascii
import json
import sys
import warnings
import cloudpickle
def system_check(py... | 34.701493 | 100 | 0.595269 |
79ac94ce66b722ca88ced358a922536f079f88dd | 2,565 | py | Python | scripts/analysis/lssxcmb/pull_sysnet_snapshot_mpidr9.py | mehdirezaie/LSSutils | aa0505b4d711e591f8a54121ea103ca3e72bdfc8 | [
"MIT"
] | 1 | 2021-12-15T22:38:31.000Z | 2021-12-15T22:38:31.000Z | scripts/analysis/lssxcmb/pull_sysnet_snapshot_mpidr9.py | mehdirezaie/LSSutils | aa0505b4d711e591f8a54121ea103ca3e72bdfc8 | [
"MIT"
] | 3 | 2019-08-19T21:47:47.000Z | 2020-08-25T17:57:19.000Z | scripts/analysis/lssxcmb/pull_sysnet_snapshot_mpidr9.py | mehdirezaie/LSSutils | aa0505b4d711e591f8a54121ea103ca3e72bdfc8 | [
"MIT"
] | null | null | null | import sys
sys.path.insert(0, '/home/mehdi/github/sysnetdev')
sys.path.insert(0, '/home/mehdi/github/LSSutils')
import os
from lssutils.utils import split_NtoM
from sysnet.sources.train import forward
from sysnet.sources.models import DNN
from sysnet.sources.io import load_checkpoint, ImagingData, MyDataSet, DataLoader... | 33.311688 | 123 | 0.637427 |
3e879ae5816354449c4481d458833a6addac1d0f | 6,139 | py | Python | benchmarks/consumer_performance.py | tvoinarovskyi/kafka-python | 8fde79dbb5a3793b1a9ebd10e032d5f3dd535645 | [
"Apache-2.0"
] | 11 | 2016-09-14T21:59:08.000Z | 2019-01-28T21:57:11.000Z | benchmarks/consumer_performance.py | tvoinarovskyi/kafka-python | 8fde79dbb5a3793b1a9ebd10e032d5f3dd535645 | [
"Apache-2.0"
] | null | null | null | benchmarks/consumer_performance.py | tvoinarovskyi/kafka-python | 8fde79dbb5a3793b1a9ebd10e032d5f3dd535645 | [
"Apache-2.0"
] | 2 | 2018-09-17T18:14:59.000Z | 2018-11-08T00:09:04.000Z | #!/usr/bin/env python
# Adapted from https://github.com/mrafayaleem/kafka-jython
from __future__ import absolute_import, print_function
import argparse
import logging
import pprint
import sys
import threading
import traceback
from kafka import KafkaConsumer, KafkaProducer
from test.fixtures import KafkaFixture, Zook... | 34.105556 | 91 | 0.562144 |
bbc8897b916d726351b7bef62a360834a9567e65 | 2,721 | py | Python | scripts/e65.py | JackKelly/neuralnilm_prototype | 2119292e7d5c8a137797ad3c9abf9f37e7f749af | [
"MIT"
] | 38 | 2015-08-14T14:38:52.000Z | 2021-12-15T03:21:04.000Z | scripts/e65.py | VidipG/neuralnilm_prototype | 2119292e7d5c8a137797ad3c9abf9f37e7f749af | [
"MIT"
] | null | null | null | scripts/e65.py | VidipG/neuralnilm_prototype | 2119292e7d5c8a137797ad3c9abf9f37e7f749af | [
"MIT"
] | 26 | 2015-09-24T20:55:26.000Z | 2021-12-07T15:42:09.000Z | from __future__ import print_function, division
from neuralnilm import Net, RealApplianceSource, BLSTMLayer, SubsampleLayer, DimshuffleLayer
from lasagne.nonlinearities import sigmoid, rectify
from lasagne.objectives import crossentropy
from lasagne.init import Uniform, Normal
from lasagne.layers import LSTMLayer, Dens... | 26.163462 | 92 | 0.639838 |
b2d01c23dcadbfb342c096f8c0c5f490c86f924c | 1,348 | py | Python | python/665_Non-decreasing_Array.py | dvlpsh/leetcode-1 | f965328af72113ac8a5a9d6624868c1502be937b | [
"MIT"
] | 4,416 | 2016-03-30T15:02:26.000Z | 2022-03-31T16:31:03.000Z | python/665_Non-decreasing_Array.py | YinpuLi/leetcode-6 | 1371de2631d745efba39de41b51c3424e35da434 | [
"MIT"
] | 20 | 2018-11-17T13:46:25.000Z | 2022-03-13T05:37:06.000Z | python/665_Non-decreasing_Array.py | YinpuLi/leetcode-6 | 1371de2631d745efba39de41b51c3424e35da434 | [
"MIT"
] | 1,374 | 2017-05-26T15:44:30.000Z | 2022-03-30T19:21:02.000Z | class Solution(object):
# def checkPossibility(self, nums):
# """
# :type nums: List[int]
# :rtype: bool
# """
# pos = None
# # Check if there are more than 2 broken point
# # record first index
# for i in range(len(nums) - 1):
# if nums[i]... | 34.564103 | 132 | 0.438427 |
7c5526209fc0a99ba569b13abb3d032d9f5ad29c | 116 | py | Python | bot_handlers.py | Novemberstuart/Aletheia | 89b58efd4f6070961d36dff970567ef1260dee51 | [
"MIT"
] | 1 | 2021-04-13T01:32:17.000Z | 2021-04-13T01:32:17.000Z | bot_handlers.py | Novemberstuart/Aletheia | 89b58efd4f6070961d36dff970567ef1260dee51 | [
"MIT"
] | null | null | null | bot_handlers.py | Novemberstuart/Aletheia | 89b58efd4f6070961d36dff970567ef1260dee51 | [
"MIT"
] | null | null | null | # Undifferentiated mass of bot commands. This WILL be refactored, hopefully soon
print("bot event handlers loaded")
| 38.666667 | 80 | 0.801724 |
013165ed739f410bde5accf0adb812bd03ac0aa5 | 425 | py | Python | ros_ws/src/crazyswarm/scripts/individual_hover.py | sat747/crazyswarm | b27884ed4ef9139f541c70aba739ae90248e6868 | [
"MIT"
] | null | null | null | ros_ws/src/crazyswarm/scripts/individual_hover.py | sat747/crazyswarm | b27884ed4ef9139f541c70aba739ae90248e6868 | [
"MIT"
] | null | null | null | ros_ws/src/crazyswarm/scripts/individual_hover.py | sat747/crazyswarm | b27884ed4ef9139f541c70aba739ae90248e6868 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
from pycrazyswarm import *
def main():
swarm = Crazyswarm()
timeHelper = swarm.timeHelper
allcfs = swarm.allcfs
for cf in allcfs.crazyflies:
print(cf.id)
cf.takeoff(1.0, 5.5)
print("press button to continue")
... | 19.318182 | 44 | 0.637647 |
e6ee19c46029883010bf024e3e8dd551854a83e8 | 80 | py | Python | LINETOKEN/__init__.py | pratannaimjoi/tokenIpad | f03969c05427bc1804d05c42823a28725c7e38a0 | [
"Apache-2.0"
] | null | null | null | LINETOKEN/__init__.py | pratannaimjoi/tokenIpad | f03969c05427bc1804d05c42823a28725c7e38a0 | [
"Apache-2.0"
] | null | null | null | LINETOKEN/__init__.py | pratannaimjoi/tokenIpad | f03969c05427bc1804d05c42823a28725c7e38a0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from .LineApi import LINE
from .lib.Gen.ttypes import *
| 20 | 29 | 0.6625 |
99079fdea956a31f4a02f7bae55b392f2641c842 | 1,219 | py | Python | go.py | bemasc/Broadway | 255a6e7b002db378534f2ef6fcaf8930a616112a | [
"BSD-3-Clause"
] | 24 | 2015-02-18T04:21:53.000Z | 2021-07-10T23:15:24.000Z | go.py | bemasc/Broadway | 255a6e7b002db378534f2ef6fcaf8930a616112a | [
"BSD-3-Clause"
] | null | null | null | go.py | bemasc/Broadway | 255a6e7b002db378534f2ef6fcaf8930a616112a | [
"BSD-3-Clause"
] | 2 | 2015-09-10T07:05:18.000Z | 2015-11-15T17:14:52.000Z | #!/usr/bin/python
import os
import sys
import argparse
commands = ["build", "run", "ref", "cmp"]
parser = argparse.ArgumentParser(description='Broadway Command Center')
parser.add_argument('command', help="Possible commands: [%s]" % ", ".join(commands))
args = parser.parse_args()
if args.command not in commands:
... | 31.25641 | 136 | 0.64397 |
9255a39bfe550ea2d837225d6e26aab81ccb124e | 1,840 | py | Python | setup.py | slhill/nexus-cli | f9db0011efa227c0c811cbff2f5acf8320ee5791 | [
"Apache-2.0"
] | null | null | null | setup.py | slhill/nexus-cli | f9db0011efa227c0c811cbff2f5acf8320ee5791 | [
"Apache-2.0"
] | null | null | null | setup.py | slhill/nexus-cli | f9db0011efa227c0c811cbff2f5acf8320ee5791 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup
setup(
name='nexus-cli',
version='0.2.0',
description='A Command Line Interface (CLI) for Blue Brain Nexus.',
keywords='nexus cli',
url="https://github.com/BlueBrain/nexus-cli",
author="Samuel Kerrien, Mohameth Francois Sy",
author_email="samuel.kerrien@epfl.ch,... | 32.280702 | 71 | 0.575543 |
89ff2d5cc41cc94eb61d9bcac11c1720e9c50b26 | 25,177 | py | Python | framework/generated/vulkan_generators/gencode.py | orbea/gfxreconstruct | 45bf3b5999d9b590a671e7274cfa53e4f251a25d | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | framework/generated/vulkan_generators/gencode.py | orbea/gfxreconstruct | 45bf3b5999d9b590a671e7274cfa53e4f251a25d | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | framework/generated/vulkan_generators/gencode.py | orbea/gfxreconstruct | 45bf3b5999d9b590a671e7274cfa53e4f251a25d | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2013-2016 The Khronos Group Inc.
# Copyright (c) 2018-2020 Valve Corporation
# Copyright (c) 2018-2020 LunarG, 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 th... | 43.558824 | 151 | 0.652937 |
b7f675dcc22494e7ccc448ba1fbe4ceaf8e0806f | 14,510 | py | Python | pyecharts/base.py | zilong305/pycharts | 6cf1bb7f17001a36da6a766615a78b1dbef5918f | [
"MIT"
] | null | null | null | pyecharts/base.py | zilong305/pycharts | 6cf1bb7f17001a36da6a766615a78b1dbef5918f | [
"MIT"
] | null | null | null | pyecharts/base.py | zilong305/pycharts | 6cf1bb7f17001a36da6a766615a78b1dbef5918f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
import json
import uuid
import random
import datetime
from pprint import pprint
from pyecharts.option import get_all_options
from pyecharts import template
import pyecharts.constants as constants
class Base(object):
def __init__(self, title, subtitle,
width... | 33.510393 | 90 | 0.545486 |
0ad811ae20cdde0f8b9cbdfebc79fb0fbd30ddcf | 6,354 | py | Python | opencv_contrib-3.3.0/samples/python2/common.py | AmericaGL/TrashTalk_Dapp | 401f17289261b5f537b239e7759dc039d53211e1 | [
"MIT"
] | 243 | 2017-11-19T01:45:52.000Z | 2022-03-26T15:57:03.000Z | opencv_contrib-3.3.0/samples/python2/common.py | AmericaGL/TrashTalk_Dapp | 401f17289261b5f537b239e7759dc039d53211e1 | [
"MIT"
] | 19 | 2018-02-01T05:41:56.000Z | 2022-01-28T12:11:03.000Z | opencv_contrib-3.3.0/samples/python2/common.py | AmericaGL/TrashTalk_Dapp | 401f17289261b5f537b239e7759dc039d53211e1 | [
"MIT"
] | 270 | 2017-11-21T13:21:28.000Z | 2022-03-31T17:34:58.000Z | #!/usr/bin/env python
'''
This module contains some common routines used by other samples.
'''
import numpy as np
import cv2
# built-in modules
import os
import itertools as it
from contextlib import contextmanager
image_extensions = ['.bmp', '.jpg', '.jpeg', '.png', '.tif', '.tiff', '.pbm', '.pgm', '.ppm']
class ... | 28.751131 | 112 | 0.527699 |
6bf61c8e9d0baff55f4d8e239f8c85f7b17165ac | 673 | py | Python | worker/hello.py | xmengnet/XZZ | 1a514c543eaa65a2ca74f060b36eaeb80c909e15 | [
"MIT"
] | 1 | 2021-06-14T05:54:12.000Z | 2021-06-14T05:54:12.000Z | worker/hello.py | xmengnet/XZZ | 1a514c543eaa65a2ca74f060b36eaeb80c909e15 | [
"MIT"
] | null | null | null | worker/hello.py | xmengnet/XZZ | 1a514c543eaa65a2ca74f060b36eaeb80c909e15 | [
"MIT"
] | null | null | null | from zzcore import StdAns
import requests
class Ans(StdAns):
def GETMSG(self):
if len(self.parms) < 2:
return '你好啊!我是小智障机器人,你现在可以使用/hello 你想说的话 跟我聊天!'
question=self.raw_msg['raw_message'][6:]
# print(question)
quest=self.raw_msg['sender']['nickname']
# print(ques... | 32.047619 | 109 | 0.586924 |
cc1be1bd60b47c78d7eaa3fc95dc06fb65cc4fa4 | 58 | py | Python | core/__init__.py | EarthCompass/patchkit | 7d3dd1f6ad410a1bb975b544ccb666c859ec2448 | [
"MIT"
] | 631 | 2016-08-08T01:44:40.000Z | 2022-03-18T17:38:13.000Z | core/__init__.py | EarthCompass/patchkit | 7d3dd1f6ad410a1bb975b544ccb666c859ec2448 | [
"MIT"
] | 32 | 2016-08-08T01:58:09.000Z | 2021-06-17T11:06:51.000Z | core/__init__.py | EarthCompass/patchkit | 7d3dd1f6ad410a1bb975b544ccb666c859ec2448 | [
"MIT"
] | 94 | 2016-08-08T05:10:06.000Z | 2021-06-17T04:55:06.000Z | from patcher import Patcher
__all__ = [
'Patcher',
]
| 9.666667 | 27 | 0.655172 |
0156cacc205c04308d0b0ee9c15adf3374ca0cff | 8,762 | py | Python | Visualizaion/association_handsID.py | DanLuoNEU/CLASP2 | 262fb1f151c14bfe3b1c452cdf65187d8caa10bd | [
"MIT"
] | 1 | 2019-11-17T21:38:54.000Z | 2019-11-17T21:38:54.000Z | Visualizaion/association_handsID.py | DanLuoNEU/CLASP2 | 262fb1f151c14bfe3b1c452cdf65187d8caa10bd | [
"MIT"
] | null | null | null | Visualizaion/association_handsID.py | DanLuoNEU/CLASP2 | 262fb1f151c14bfe3b1c452cdf65187d8caa10bd | [
"MIT"
] | null | null | null | # Using hands ID to associate the bin with persons and detect possible thefts
# At every frame, bins are the main parts, it will have all the owners in the record file
# 1. Decide bins' belonging
# 2. Detect if there is any suspicious activity
# Dan, 12/15/2019
########## Import ##########
import os
import sys
import c... | 43.59204 | 139 | 0.477631 |
b881c5155b81b52de356e142e5ddcdcd1a0ac0ce | 6,163 | py | Python | submit_scripts_and_plotting/followup_plots/steady_plots.py | apizzuto/v2_alert_stacking_FRA | 6b5bd3f6cd1b5e472797a81a389a30198c64cd9f | [
"MIT"
] | null | null | null | submit_scripts_and_plotting/followup_plots/steady_plots.py | apizzuto/v2_alert_stacking_FRA | 6b5bd3f6cd1b5e472797a81a389a30198c64cd9f | [
"MIT"
] | 4 | 2021-01-08T20:14:23.000Z | 2021-03-25T21:05:15.000Z | submit_scripts_and_plotting/followup_plots/steady_plots.py | apizzuto/v2_alert_stacking_FRA | 6b5bd3f6cd1b5e472797a81a389a30198c64cd9f | [
"MIT"
] | null | null | null | from francis.time_integrated_scripts import steady_sensitivity_fits as ssf
import matplotlib.pyplot as plt
import matplotlib as mpl
import pandas as pd
import numpy as np
import seaborn as sns
import pickle
from francis import utils
utils.initialize_mpl_style()
f_path = utils.get_francis_path()
mpl.rcParams['text.uset... | 43.401408 | 164 | 0.589161 |
2de733fc86040fb157731ec22f978d4bf55bf84b | 23,153 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01/operations/_firewall_policy_rule_collection_groups_operations.py | praveenkuttappan/azure-sdk-for-python | 4b79413667b7539750a6c7dde15737013a3d4bd5 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01/operations/_firewall_policy_rule_collection_groups_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01/operations/_firewall_policy_rule_collection_groups_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 52.382353 | 247 | 0.683065 |
aaf3de182207808bbf62ecee0caad571552c2462 | 1,847 | py | Python | sdk/python/feast/value_type.py | imjuanleonard/feast | 442ca5a1a448032d7096747160ea05f94aaaa7f5 | [
"Apache-2.0"
] | null | null | null | sdk/python/feast/value_type.py | imjuanleonard/feast | 442ca5a1a448032d7096747160ea05f94aaaa7f5 | [
"Apache-2.0"
] | 6 | 2020-10-26T17:50:33.000Z | 2022-02-10T02:01:28.000Z | sdk/python/feast/value_type.py | imjuanleonard/feast | 442ca5a1a448032d7096747160ea05f94aaaa7f5 | [
"Apache-2.0"
] | 1 | 2021-03-25T02:33:54.000Z | 2021-03-25T02:33:54.000Z | # Copyright 2019 The Feast Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 30.278689 | 75 | 0.663238 |
7c74c88db7737100840eec7ad8213053accd39d4 | 3,176 | py | Python | src/secondaires/navigation/commandes/vent/liste.py | vlegoff/tsunami | 36b3b974f6eefbf15cd5d5f099fc14630e66570b | [
"BSD-3-Clause"
] | 14 | 2015-08-21T19:15:21.000Z | 2017-11-26T13:59:17.000Z | src/secondaires/navigation/commandes/vent/liste.py | vincent-lg/tsunami | 36b3b974f6eefbf15cd5d5f099fc14630e66570b | [
"BSD-3-Clause"
] | 20 | 2015-09-29T20:50:45.000Z | 2018-06-21T12:58:30.000Z | src/secondaires/navigation/commandes/vent/liste.py | vlegoff/tsunami | 36b3b974f6eefbf15cd5d5f099fc14630e66570b | [
"BSD-3-Clause"
] | 3 | 2015-05-02T19:42:03.000Z | 2018-09-06T10:55:00.000Z | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
... | 44.111111 | 79 | 0.649244 |
4442b80ceb689a082eb7b8c65ebd933b573bb3ba | 24,703 | py | Python | pymatgen/analysis/chempot_diagram.py | exenGT/pymatgen | a8ffb820ab8fc3f60251099e38c8888f45eae618 | [
"MIT"
] | 1 | 2022-03-22T22:08:16.000Z | 2022-03-22T22:08:16.000Z | pymatgen/analysis/chempot_diagram.py | exenGT/pymatgen | a8ffb820ab8fc3f60251099e38c8888f45eae618 | [
"MIT"
] | null | null | null | pymatgen/analysis/chempot_diagram.py | exenGT/pymatgen | a8ffb820ab8fc3f60251099e38c8888f45eae618 | [
"MIT"
] | null | null | null | # Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module implements the construction and plotting of chemical potential diagrams
from a list of entries within a chemical system containing 2 or more elements. The
chemical potential diagram is the mathematical dual to t... | 38.598438 | 115 | 0.620734 |
db3be820ad108cde5b46abff7d115cb3b9a9090b | 11,637 | py | Python | grad.py | cbracketdash/cpuzpy | 8144c7c6aa4842ad1a3cfa61ff02b86706c67572 | [
"Apache-2.0"
] | null | null | null | grad.py | cbracketdash/cpuzpy | 8144c7c6aa4842ad1a3cfa61ff02b86706c67572 | [
"Apache-2.0"
] | null | null | null | grad.py | cbracketdash/cpuzpy | 8144c7c6aa4842ad1a3cfa61ff02b86706c67572 | [
"Apache-2.0"
] | null | null | null | from tkinter import *
def drag_start(event):
widget = event.widget
widget.startX = event.x
widget.startY = event.y
def drag_motion(event):
widget = event.widget
x = widget.winfo_x() - widget.startX + event.x
y = widget.winfo_y() - widget.startY + event.y
widget.place(x=x, y=y)
window = Tk()
window.geometry("8... | 21.0434 | 56 | 0.488356 |
a486704035f7b08344434df46f5d487370dea3d0 | 1,765 | py | Python | 2.var.py | iwhgao/python_practise | b85e5ffd8703faa04c5f1bd03c09ea4522e238f2 | [
"Apache-2.0"
] | 1 | 2017-08-30T09:06:41.000Z | 2017-08-30T09:06:41.000Z | 2.var.py | iwhgao/python_practise | b85e5ffd8703faa04c5f1bd03c09ea4522e238f2 | [
"Apache-2.0"
] | null | null | null | 2.var.py | iwhgao/python_practise | b85e5ffd8703faa04c5f1bd03c09ea4522e238f2 | [
"Apache-2.0"
] | 1 | 2018-10-08T06:13:51.000Z | 2018-10-08T06:13:51.000Z | #!/usr/bin/python
# -*- coding:utf-8 -*-
# ---------------------------
# Author: deangao
# Copyright: 2016 deangao
# Version: v1.0.0
# Created: 2016/2/3
# ---------------------------
__author__ = 'deangao'
# ---变量名---
# ---和其它语言的变量名命名规则类似---
# 一般是下划线或英文字符开头,且名称是大小写敏感的
A = 5
a = 4
_09 = 12
# 09A = 34 错误的变量名命名方法
p... | 14.233871 | 52 | 0.550708 |
59f62d6e791f1678ead2fba0143729a1c52f5660 | 540 | py | Python | backend/home/migrations/0001_load_initial_data.py | crowdbotics-apps/floral-mode-31842 | 7fdc9895bd7468a9fd21b10f8dcb80d8330c9a50 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/home/migrations/0001_load_initial_data.py | crowdbotics-apps/floral-mode-31842 | 7fdc9895bd7468a9fd21b10f8dcb80d8330c9a50 | [
"FTL",
"AML",
"RSA-MD"
] | 12 | 2021-11-05T21:31:20.000Z | 2021-11-05T21:31:25.000Z | backend/home/migrations/0001_load_initial_data.py | crowdbotics-apps/floral-mode-31842 | 7fdc9895bd7468a9fd21b10f8dcb80d8330c9a50 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | from django.db import migrations
def create_site(apps, schema_editor):
Site = apps.get_model("sites", "Site")
custom_domain = "floral-mode-31842.botics.co"
site_params = {
"name": "Floral Mode",
}
if custom_domain:
site_params["domain"] = custom_domain
Site.objects.update_or_... | 20.769231 | 61 | 0.655556 |
4e511a087acef47e7aceea0d52c62da54e4c5beb | 752 | py | Python | src/bioversions/sources/moalmanac.py | cthoyt/bioversions | 8b0124f106e33be925545ecc178854a6ed3ecc58 | [
"MIT"
] | 7 | 2020-12-13T13:02:26.000Z | 2021-08-29T06:02:30.000Z | src/bioversions/sources/moalmanac.py | cthoyt/bioversions | 8b0124f106e33be925545ecc178854a6ed3ecc58 | [
"MIT"
] | 7 | 2020-12-06T18:26:42.000Z | 2021-03-29T15:54:11.000Z | src/bioversions/sources/moalmanac.py | cthoyt/bioversions | 8b0124f106e33be925545ecc178854a6ed3ecc58 | [
"MIT"
] | 2 | 2021-02-12T19:55:33.000Z | 2021-02-12T20:09:42.000Z | # -*- coding: utf-8 -*-
"""A getter for the Molecular Oncology Almanac."""
from ..utils import Getter, VersionType, get_soup
__all__ = [
"MOAlmanacGetter",
]
class MOAlmanacGetter(Getter):
"""A getter for MOAlmanac."""
name = "Molecular Oncology Almanac"
homepage_fmt = "https://github.com/vanallen... | 25.066667 | 89 | 0.642287 |
62525651ae036fc4c6e55691058905889901a898 | 7,448 | py | Python | nixos/maintainers/scripts/ec2/create-ebs-amis.py | bdimcheff/nixpkgs | 69a0868cd9cf58487a3698e7dbfa7c3cd8706fdb | [
"MIT"
] | 1 | 2021-09-29T20:06:27.000Z | 2021-09-29T20:06:27.000Z | nixos/maintainers/scripts/ec2/create-ebs-amis.py | bdimcheff/nixpkgs | 69a0868cd9cf58487a3698e7dbfa7c3cd8706fdb | [
"MIT"
] | null | null | null | nixos/maintainers/scripts/ec2/create-ebs-amis.py | bdimcheff/nixpkgs | 69a0868cd9cf58487a3698e7dbfa7c3cd8706fdb | [
"MIT"
] | 1 | 2019-05-04T16:16:25.000Z | 2019-05-04T16:16:25.000Z | #! /usr/bin/env python
import os
import sys
import time
import argparse
import nixops.util
from nixops import deployment
from boto.ec2.blockdevicemapping import BlockDeviceMapping, BlockDeviceType
import boto.ec2
from nixops.statefile import StateFile, get_default_state_file
parser = argparse.ArgumentParser(descripti... | 35.807692 | 149 | 0.693878 |
267e2b110de746c907ea54bb77a6dd6161a102c0 | 2,651 | py | Python | tests/test_scoring.py | CatchemAL/Doddle | 0c2ed8b91f998da645d97160d46178c2dab15c9e | [
"MIT"
] | 3 | 2022-02-03T11:50:41.000Z | 2022-02-14T09:25:35.000Z | tests/test_scoring.py | CatchemAl/Doddle | 0c2ed8b91f998da645d97160d46178c2dab15c9e | [
"MIT"
] | 5 | 2022-03-17T07:38:36.000Z | 2022-03-30T02:33:33.000Z | tests/test_scoring.py | CatchemAL/Doddle | 0c2ed8b91f998da645d97160d46178c2dab15c9e | [
"MIT"
] | 2 | 2022-02-06T15:36:29.000Z | 2022-02-06T23:48:57.000Z | import pytest
from doddle.scoring import Scorer, _score_word_jit, score_word_slow, to_ternary
from doddle.words import Word
class TestScorer:
@pytest.mark.parametrize(
"soln_str,guess_str,expected",
[
("SPEAR", "SPEAK", "22220"),
("SPEAR", "STRIP", "20101"),
("... | 33.556962 | 87 | 0.479065 |
0885426e63b86e197b6e5a36655557b6e5068ac1 | 4,314 | py | Python | pypeit/scripts/ql_mos.py | joshwalawender/PypeIt | f952cbb2aaee640b5c585be823884a237b441e8e | [
"BSD-3-Clause"
] | null | null | null | pypeit/scripts/ql_mos.py | joshwalawender/PypeIt | f952cbb2aaee640b5c585be823884a237b441e8e | [
"BSD-3-Clause"
] | null | null | null | pypeit/scripts/ql_mos.py | joshwalawender/PypeIt | f952cbb2aaee640b5c585be823884a237b441e8e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# See top-level LICENSE file for Copyright information
#
# -*- coding: utf-8 -*-
"""
This script runs PypeIt on a set of MultiSlit images
"""
import argparse
from pypeit import msgs
import warnings
def parser(options=None):
parser = argparse.ArgumentParser(description='Script to run Pype... | 35.652893 | 115 | 0.626101 |
cfc24e11e81b04ce5b18d94c82551f93d4485875 | 46,540 | py | Python | bs4_test/aget_test_result_naive_bayes.py | rahman-mahmudur/PyART | 36591cd10b2b7a560bbcb47a6cf744b72466f92a | [
"Apache-2.0"
] | null | null | null | bs4_test/aget_test_result_naive_bayes.py | rahman-mahmudur/PyART | 36591cd10b2b7a560bbcb47a6cf744b72466f92a | [
"Apache-2.0"
] | null | null | null | bs4_test/aget_test_result_naive_bayes.py | rahman-mahmudur/PyART | 36591cd10b2b7a560bbcb47a6cf744b72466f92a | [
"Apache-2.0"
] | null | null | null | import os,time,math,sys,json,re,string,json
import importlib
import get_dataflow
import pandas as pd
import joblib
import json
import requests
import bs4
import lxml
from sklearn.ensemble import RandomForestClassifier
from nltk.tokenize import word_tokenize
stdlib=['string','re','difflib','textwrap','unicodedata','st... | 26.563927 | 272 | 0.620821 |
1d09509b354d7870e746e0a77d91be4a99e954cc | 5,733 | py | Python | datasets/samplers.py | jinfagang/AnchorDETR | f89a2c0c4754e816aa32e5c09b21824dd360a640 | [
"Apache-2.0"
] | 160 | 2021-09-18T10:43:02.000Z | 2022-03-24T16:10:40.000Z | datasets/samplers.py | jinfagang/AnchorDETR | f89a2c0c4754e816aa32e5c09b21824dd360a640 | [
"Apache-2.0"
] | 33 | 2021-09-23T10:37:22.000Z | 2022-03-21T07:36:40.000Z | datasets/samplers.py | jinfagang/AnchorDETR | f89a2c0c4754e816aa32e5c09b21824dd360a640 | [
"Apache-2.0"
] | 15 | 2021-09-18T10:44:26.000Z | 2022-02-17T11:21:46.000Z | # ------------------------------------------------------------------------
# Copyright (c) 2021 megvii-model. All Rights Reserved.
# ------------------------------------------------------------------------
# Modified from Deformable DETR (https://github.com/fundamentalvision/Deformable-DETR)
# Copyright (c) 2020 SenseT... | 40.659574 | 112 | 0.623408 |
330d1f712c43c5f911ff06bde3a1ebacdaa568df | 756 | py | Python | transcript_utils/options.py | lweasel/transcript-utils | 13ebb51e33ca873245396afb09a85aac6d70bc33 | [
"MIT"
] | null | null | null | transcript_utils/options.py | lweasel/transcript-utils | 13ebb51e33ca873245396afb09a85aac6d70bc33 | [
"MIT"
] | 2 | 2018-03-22T23:56:34.000Z | 2019-12-16T13:34:10.000Z | transcript_utils/options.py | lweasel/transcript_utils | 13ebb51e33ca873245396afb09a85aac6d70bc33 | [
"MIT"
] | 1 | 2018-03-22T12:48:40.000Z | 2018-03-22T12:48:40.000Z | import schema
def validate_file_option(file_option, msg):
msg = "{msg}: '{file}'.".format(msg=msg, file=file_option)
validator = schema.Or(open, None)
schema.Schema(validator, error=msg).validate(file_option)
def validate_dict_option(dict_option, values_dict, msg):
msg = "{msg}: '{opt}'.".format(msg... | 32.869565 | 75 | 0.694444 |
b779b909492b15cdc2d00735b35fc8b18d4ae27b | 673 | py | Python | setup.py | grazhopr/lightning-qt | 4619f7984f05fa291f497e442f8b13b9f9372e22 | [
"BSD-3-Clause-Clear"
] | 26 | 2019-05-15T17:35:58.000Z | 2019-05-25T11:59:45.000Z | setup.py | grazhopr/lightning-qt | 4619f7984f05fa291f497e442f8b13b9f9372e22 | [
"BSD-3-Clause-Clear"
] | 16 | 2019-06-07T08:33:38.000Z | 2021-08-30T10:16:47.000Z | setup.py | grazhopr/lightning-qt | 4619f7984f05fa291f497e442f8b13b9f9372e22 | [
"BSD-3-Clause-Clear"
] | 8 | 2019-06-12T13:29:14.000Z | 2021-04-01T21:28:03.000Z | from setuptools import setup
import io
with io.open('README.md', encoding='utf-8') as f:
long_description = f.read()
with io.open('requirements.txt', encoding='utf-8') as f:
requirements = [r for r in f.read().split('\n') if len(r)]
setup(name='lightning-qt',
version='0.1',
description='clightnin... | 30.590909 | 62 | 0.656761 |
c908fde8ce744d239764cc53cadadfd6a329b972 | 7,552 | py | Python | October 13/Lesson 12 Q3.py | Wadden12/Semester1 | a13c4486848daec3b5865e8a2a778689c81528fe | [
"Apache-2.0"
] | null | null | null | October 13/Lesson 12 Q3.py | Wadden12/Semester1 | a13c4486848daec3b5865e8a2a778689c81528fe | [
"Apache-2.0"
] | null | null | null | October 13/Lesson 12 Q3.py | Wadden12/Semester1 | a13c4486848daec3b5865e8a2a778689c81528fe | [
"Apache-2.0"
] | null | null | null | # FileName: Lesson 12 Q3
# Snuggly Company
# Author: Mike Wadden
# Date: October 18, 2021
def Name_Validation(Name):
""" Function to Validate a Name for Input: Allowing Spaces, - and '"""
for Char in Name:
if ("A" <= Char <= "Z" or "a" <= Char <= "z" or Char == " "
or Char == "-" or Cha... | 35.455399 | 123 | 0.557601 |
b589bb889db08e23fa1a8cc2188be096dc913f12 | 5,472 | py | Python | scripts/unusedfiles.py | LeesahMasko/piwikibot | 024af387ff48c21526ee206541178157d2653ddc | [
"MIT"
] | null | null | null | scripts/unusedfiles.py | LeesahMasko/piwikibot | 024af387ff48c21526ee206541178157d2653ddc | [
"MIT"
] | null | null | null | scripts/unusedfiles.py | LeesahMasko/piwikibot | 024af387ff48c21526ee206541178157d2653ddc | [
"MIT"
] | null | null | null | #!/usr/bin/python
"""
This bot appends some text to all unused images and notifies uploaders.
Parameters:
-always Don't be asked every time.
-nouserwarning Do not warn uploader about orphaned file.
-filetemplate: Use a custom template on unused file pages.
-usertemplate: Use a custom template to warn the u... | 33.163636 | 79 | 0.586075 |
7964993ce88d6f7840bb634fd04ab9b7f021f3c8 | 3,123 | py | Python | tests/test_logging_compat.py | YoavCohen/logbook | 3e0badb395ed8d0038d02996d38aa0505441327e | [
"BSD-3-Clause"
] | 771 | 2015-11-07T12:55:07.000Z | 2022-03-16T09:37:44.000Z | tests/test_logging_compat.py | YoavCohen/logbook | 3e0badb395ed8d0038d02996d38aa0505441327e | [
"BSD-3-Clause"
] | 169 | 2015-11-08T06:56:55.000Z | 2022-02-28T06:58:50.000Z | tests/test_logging_compat.py | YoavCohen/logbook | 3e0badb395ed8d0038d02996d38aa0505441327e | [
"BSD-3-Clause"
] | 105 | 2015-11-07T14:11:07.000Z | 2021-12-31T17:46:36.000Z | import functools
from random import randrange
import logbook
import logbook.compat
from logbook.helpers import StringIO
import pytest
from .utils import capturing_stderr_context
__file_without_pyc__ = __file__
if __file_without_pyc__.endswith(".pyc"):
__file_without_pyc__ = __file_without_pyc__[:-1]
@pytest.... | 34.7 | 98 | 0.667947 |
2c16ab70a3b296afff57f5378b08df70b6d82c0d | 8,538 | py | Python | docs/conf.py | viridaria/docs-gcp | 1fdf54ffedc68ada722cc4946b63ff1d0dced602 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | viridaria/docs-gcp | 1fdf54ffedc68ada722cc4946b63ff1d0dced602 | [
"Apache-2.0"
] | 5 | 2019-12-06T15:02:09.000Z | 2021-07-20T23:11:51.000Z | docs/conf.py | viridaria/docs-gcp | 1fdf54ffedc68ada722cc4946b63ff1d0dced602 | [
"Apache-2.0"
] | 4 | 2019-11-01T18:59:21.000Z | 2021-04-12T20:14:49.000Z | # -*- coding: utf-8 -*-
"""
Fanatical Support for GCP documentation build configuration file.
This file is execfile()d with the current directory set to its
containing dir.
Note that not all possible configuration values are present.
All configuration values have a default; values that are commented out
serve to sho... | 32.838462 | 86 | 0.708128 |
b71a7222637ae62455f3be1f4b44e0e4258749c9 | 24,843 | py | Python | StockAnalysisSystem/core/Utiltity/ui_utility.py | lifg2000/StockAnalysisSystem | b0bef50f5c1a9565e1a1f953fedbe7821601147c | [
"Apache-2.0"
] | 138 | 2018-01-03T03:32:49.000Z | 2022-03-12T02:57:46.000Z | StockAnalysisSystem/core/Utiltity/ui_utility.py | lifg2000/StockAnalysisSystem | b0bef50f5c1a9565e1a1f953fedbe7821601147c | [
"Apache-2.0"
] | 9 | 2018-01-01T03:16:24.000Z | 2021-05-27T09:57:24.000Z | StockAnalysisSystem/core/Utiltity/ui_utility.py | lifg2000/StockAnalysisSystem | b0bef50f5c1a9565e1a1f953fedbe7821601147c | [
"Apache-2.0"
] | 50 | 2019-08-05T01:02:30.000Z | 2022-03-07T00:52:14.000Z | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
import pandas as pd
from functools import partial
from types import SimpleNamespace
from PyQt5 import QtCore
from PyQt5.QtGui import QFont, QStandardItemModel, QStandardItem
from PyQt5.QtCore import pyqtSignal, Qt, QAbstractTableModel, QModelIndex, QRect, QVariant... | 36.161572 | 120 | 0.558346 |
a693dc389ee62af95a7bf0cc34df65f48c41c2af | 4,710 | py | Python | evaluater/Variational_dropout/evaluater.py | Neronjust2017/pytorch-regression-project | 28ff39b829837b68a42f0e6dd5324a40eac05343 | [
"MIT"
] | 1 | 2020-07-07T12:28:59.000Z | 2020-07-07T12:28:59.000Z | evaluater/Variational_dropout/evaluater.py | Neronjust2017/pytorch-regression-project | 28ff39b829837b68a42f0e6dd5324a40eac05343 | [
"MIT"
] | null | null | null | evaluater/Variational_dropout/evaluater.py | Neronjust2017/pytorch-regression-project | 28ff39b829837b68a42f0e6dd5324a40eac05343 | [
"MIT"
] | null | null | null | import numpy as np
import torch
from torchvision.utils import make_grid
from base import BaseEvaluater
from utils import *
from model.metric import *
class EvaluaterVd(BaseEvaluater):
"""
Evaluater class
"""
def __init__(self, model, criterion, metric_ftns, config, test_data_loader):
super().__... | 42.432432 | 132 | 0.572399 |
9639eacf0e529a94eab8c073a49df2870046dc2a | 6,842 | py | Python | bindings/python/ensmallen_graph/datasets/string/microbacteriumspunccl10.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/microbacteriumspunccl10.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/microbacteriumspunccl10.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | """
This file offers the methods to automatically retrieve the graph Microbacterium sp. UNCCL10.
The graph is automatically retrieved from the STRING repository.
Report
---------------------
At the time of rendering these methods (please see datetime below), the graph
had the following characteristics:
Datetime: ... | 35.82199 | 223 | 0.708857 |
a912ecfa41ac36ea84035449333236ad24441290 | 21,243 | py | Python | python/cugraph/tests/test_graph.py | divyegala/cugraph | 68d152adb9d81fed9a274f7bda0bb96359f3200a | [
"Apache-2.0"
] | null | null | null | python/cugraph/tests/test_graph.py | divyegala/cugraph | 68d152adb9d81fed9a274f7bda0bb96359f3200a | [
"Apache-2.0"
] | 1 | 2020-12-01T17:34:57.000Z | 2020-12-01T17:34:57.000Z | python/cugraph/tests/test_graph.py | divyegala/cugraph | 68d152adb9d81fed9a274f7bda0bb96359f3200a | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019-2020, NVIDIA CORPORATION.
# 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... | 32.235205 | 79 | 0.643365 |
c5fb87987d3ddb463f1da99653527fbe9fe44d44 | 479 | py | Python | cctbx/sgtbx/plane_groups.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | cctbx/sgtbx/plane_groups.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | cctbx/sgtbx/plane_groups.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import division
hermann_mauguin_hall_table = (
('p_1', 'P 1'),
('p_2', 'P 2'),
('p_m', 'P -2x'),
('p_g', 'P -2xb'),
('c_m', 'C -2x'),
('p_2_m_m', 'P 2 -2'),
('p_2_m_g', 'P 2 -2a'),
('p_2_g_g', 'P 2 -2ab'),
('c_2_m_m', 'C 2 -2'),
('p_4', 'P 4'),
('p_4_m_m', '... | 22.809524 | 31 | 0.402923 |
ec090c243d1baeb04406f7ee5434066d58d48e5c | 1,496 | py | Python | scripts/createLabFiles.py | techiaith/docker-ProsodylabAligner-cy | e2138a8bbda0a34bd5dddd06ebfb7162de1b8f1e | [
"Apache-2.0"
] | null | null | null | scripts/createLabFiles.py | techiaith/docker-ProsodylabAligner-cy | e2138a8bbda0a34bd5dddd06ebfb7162de1b8f1e | [
"Apache-2.0"
] | null | null | null | scripts/createLabFiles.py | techiaith/docker-ProsodylabAligner-cy | e2138a8bbda0a34bd5dddd06ebfb7162de1b8f1e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
import os
import shutil
samplesfile = open(os.path.join("paldaruo", "samples.txt"), 'r', encoding='utf-8')
metadatafile = open(os.path.join("paldaruo", "metadata.csv"), 'r', encoding='utf-8')
sampleslookup={}
for line in samplesfile:
sample, prompt = line.split(' ',1)
sampleslooku... | 31.166667 | 105 | 0.504011 |
0f934b0c3ca8732cb5bd52d01c4e79d22e21d94d | 334 | py | Python | website/utils/form/clearable_image_widget.py | SebastiaanZ/minigigscyclingteam | 6c8c4f7ae41a5b01a551c592dc81fd37fd4f686e | [
"MIT"
] | null | null | null | website/utils/form/clearable_image_widget.py | SebastiaanZ/minigigscyclingteam | 6c8c4f7ae41a5b01a551c592dc81fd37fd4f686e | [
"MIT"
] | 9 | 2020-01-25T12:24:43.000Z | 2022-03-12T00:18:38.000Z | website/utils/form/clearable_image_widget.py | SebastiaanZ/minigigscyclingteam | 6c8c4f7ae41a5b01a551c592dc81fd37fd4f686e | [
"MIT"
] | null | null | null | from django.forms import ClearableFileInput
class ClearableImageInput(ClearableFileInput):
"""Clearable Image Input that displays the current image instead of linking it."""
template_name = "widgets/clearable_image_widget.html"
input_text = "Selecteer nieuwe foto:"
clear_checkbox_label = "Verwijder h... | 33.4 | 86 | 0.778443 |
08fa929d0e69f63d3bde495208060248e42b0da3 | 6,205 | py | Python | test/functional/mempool_updatefromblock.py | ruvcoindev/ruvchain | 9c7c17823b1efb612e0adeb92f0cb1c62859f840 | [
"MIT"
] | 1 | 2022-03-18T17:26:58.000Z | 2022-03-18T17:26:58.000Z | test/functional/mempool_updatefromblock.py | ruvcoindev/ruvchain | 9c7c17823b1efb612e0adeb92f0cb1c62859f840 | [
"MIT"
] | null | null | null | test/functional/mempool_updatefromblock.py | ruvcoindev/ruvchain | 9c7c17823b1efb612e0adeb92f0cb1c62859f840 | [
"MIT"
] | 1 | 2022-01-17T09:17:52.000Z | 2022-01-17T09:17:52.000Z | #!/usr/bin/env python3
# Copyright (c) 2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test mempool descendants/ancestors information update.
Test mempool update of transaction descendants/ances... | 50.040323 | 145 | 0.626753 |
a46ddcf69ca2013dfc556bbbe1ddb0610be5b2cd | 6,563 | py | Python | models/train_classifier.py | EavenK/Disaster-Response-Message-Classification-NLP-Pipelines | 4548409ac1db82ae0eb4fbcb4edd6f2e0fb38f81 | [
"MIT"
] | null | null | null | models/train_classifier.py | EavenK/Disaster-Response-Message-Classification-NLP-Pipelines | 4548409ac1db82ae0eb4fbcb4edd6f2e0fb38f81 | [
"MIT"
] | null | null | null | models/train_classifier.py | EavenK/Disaster-Response-Message-Classification-NLP-Pipelines | 4548409ac1db82ae0eb4fbcb4edd6f2e0fb38f81 | [
"MIT"
] | null | null | null | # import libraries
import os
import sys
import numpy as np
import pandas as pd
from sqlalchemy import create_engine
import pickle
import re
import nltk
nltk.download('punkt')
nltk.download('stopwords')
nltk.download('wordnet')
nltk.download('averaged_perceptron_tagger')
from nltk.stem import WordNetLemm... | 29.968037 | 100 | 0.63218 |
2cb2661621647d8a62406756a180ced3d8b030a6 | 1,023 | py | Python | DjangoCRUD/CRUD/views.py | Dawwie/Django | 8c0382d5e44e125d9c5b52742f8dc07008e0b8b7 | [
"MIT"
] | null | null | null | DjangoCRUD/CRUD/views.py | Dawwie/Django | 8c0382d5e44e125d9c5b52742f8dc07008e0b8b7 | [
"MIT"
] | null | null | null | DjangoCRUD/CRUD/views.py | Dawwie/Django | 8c0382d5e44e125d9c5b52742f8dc07008e0b8b7 | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect
from .models import Product
from .form import ProductForm
def list_products(request):
products = Product.objects.all()
return render(request, 'base.html', {'products': products})
def create_product(request):
form = ProductForm(request.POST or None)
if for... | 29.228571 | 84 | 0.684262 |
f4a4fac6f32d113680df1c86e7f913dda1efeb5b | 3,671 | py | Python | setup.py | Pineirin/invenio-app-rdm | 55a98d7835dddf577be6c770910830b2f52b330a | [
"MIT"
] | null | null | null | setup.py | Pineirin/invenio-app-rdm | 55a98d7835dddf577be6c770910830b2f52b330a | [
"MIT"
] | null | null | null | setup.py | Pineirin/invenio-app-rdm | 55a98d7835dddf577be6c770910830b2f52b330a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2019-2020 CERN.
# Copyright (C) 2019-2020 Northwestern University.
# Copyright (C) 2021 TU Wien.
#
# Invenio App RDM is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Invenio Research Dat... | 28.238462 | 77 | 0.618088 |
530b4ff1676fcb04d755dbdd36a835834a2fd78e | 1,016 | py | Python | tests/spec/Spec/build_test.py | smarkets/bravado-core | 5d9c7eff417118462893c08accc40e27b066e2f6 | [
"BSD-3-Clause"
] | null | null | null | tests/spec/Spec/build_test.py | smarkets/bravado-core | 5d9c7eff417118462893c08accc40e27b066e2f6 | [
"BSD-3-Clause"
] | null | null | null | tests/spec/Spec/build_test.py | smarkets/bravado-core | 5d9c7eff417118462893c08accc40e27b066e2f6 | [
"BSD-3-Clause"
] | 1 | 2022-03-26T12:14:35.000Z | 2022-03-26T12:14:35.000Z | # -*- coding: utf-8 -*-
import pytest
from mock import patch
from swagger_spec_validator.common import SwaggerValidationError
from bravado_core.spec import Spec
def assert_validate_call_count(expected_call_count, config, petstore_dict):
spec = Spec(petstore_dict, config=config)
with patch('bravado_core.spec.... | 30.787879 | 76 | 0.765748 |
204f66d6630870c4bc93346cc33f9b30e8c7cc31 | 2,061 | py | Python | melodic/lib/python2.7/dist-packages/qt_dotgraph/colors.py | Dieptranivsr/Ros_Diep | d790e75e6f5da916701b11a2fdf3e03b6a47086b | [
"MIT"
] | 2 | 2021-07-14T12:33:55.000Z | 2021-11-21T07:14:13.000Z | melodic/src/qt_gui_core/qt_dotgraph/src/qt_dotgraph/colors.py | disorn-inc/ROS-melodic-python3-Opencv-4.1.1-CUDA | 3d265bb64712e3cd7dfa0ad56d78fcdebafdb4b0 | [
"BSD-3-Clause"
] | 1 | 2021-07-08T10:26:06.000Z | 2021-07-08T10:31:11.000Z | melodic/src/qt_gui_core/qt_dotgraph/src/qt_dotgraph/colors.py | disorn-inc/ROS-melodic-python3-Opencv-4.1.1-CUDA | 3d265bb64712e3cd7dfa0ad56d78fcdebafdb4b0 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2011, Dirk Thomas, TU Darmstadt
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of ... | 47.930233 | 70 | 0.73411 |
74d2c3f63dbdd88901efd6f07db65151caf9bbd8 | 4,984 | py | Python | bw2io/export/gexf.py | mfastudillo/brightway2-io | dc383ddb6003a46e78259aeb7f87b9d80965d689 | [
"BSD-3-Clause"
] | null | null | null | bw2io/export/gexf.py | mfastudillo/brightway2-io | dc383ddb6003a46e78259aeb7f87b9d80965d689 | [
"BSD-3-Clause"
] | null | null | null | bw2io/export/gexf.py | mfastudillo/brightway2-io | dc383ddb6003a46e78259aeb7f87b9d80965d689 | [
"BSD-3-Clause"
] | null | null | null | from bw2data import Database, projects
from bw2data.query import Filter
from lxml.builder import ElementMaker
from lxml.etree import tostring
import datetime
import itertools
import os
import pyprind
class DatabaseToGEXF(object):
"""Export a Gephi graph for a database.
Call ``.export()`` to export the file a... | 34.611111 | 105 | 0.542737 |
1df777c24e106daf3f819aae7322ab761a7056ce | 330 | py | Python | kudos_oss/app/kudo/schema.py | ptrompeter/newssite | 9f27e4003239080be4a5f0fedfe48658183f2a46 | [
"MIT"
] | null | null | null | kudos_oss/app/kudo/schema.py | ptrompeter/newssite | 9f27e4003239080be4a5f0fedfe48658183f2a46 | [
"MIT"
] | null | null | null | kudos_oss/app/kudo/schema.py | ptrompeter/newssite | 9f27e4003239080be4a5f0fedfe48658183f2a46 | [
"MIT"
] | null | null | null | from marshmallow import Schema, fields
class GithubRepoSchema(Schema):
id = fields.Int(required=True)
repo_name = fields.Str()
full_name = fields.Str()
language = fields.Str()
description = fields.Str()
repo_url = fields.URL()
class KudoSchema(GithubRepoSchema):
user_id = fields.Email(requ... | 27.5 | 41 | 0.709091 |
653376fe7e703767affb3d458da8a4771e9e3601 | 3,359 | py | Python | summarizer/ClusterFeatures.py | phanxuanphucnd/text-summarization-system | 356aac0a7febaa6996e96932564e2be1fdcca61a | [
"MIT"
] | null | null | null | summarizer/ClusterFeatures.py | phanxuanphucnd/text-summarization-system | 356aac0a7febaa6996e96932564e2be1fdcca61a | [
"MIT"
] | null | null | null | summarizer/ClusterFeatures.py | phanxuanphucnd/text-summarization-system | 356aac0a7febaa6996e96932564e2be1fdcca61a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
from numpy import ndarray
from sklearn.cluster import KMeans
from sklearn.mixture import GaussianMixture
from sklearn.decomposition import PCA
from typing import List
class ClusterFeatures(object):
def __init__(
self,
features: ndarray,
algorith... | 33.257426 | 95 | 0.605835 |
48f4f471a3e33a0bb4dd60c64c8dc0f5a6ceb0b6 | 1,498 | py | Python | sims/SIM_test/int_tests/FluidNetworkConstants.py | nasa/gunns | 248323939a476abe5178538cd7a3512b5f42675c | [
"NASA-1.3"
] | 18 | 2020-01-23T12:14:09.000Z | 2022-02-27T22:11:35.000Z | sims/SIM_test/int_tests/FluidNetworkConstants.py | nasa/gunns | 248323939a476abe5178538cd7a3512b5f42675c | [
"NASA-1.3"
] | 39 | 2020-11-20T12:19:35.000Z | 2022-02-22T18:45:55.000Z | sims/SIM_test/int_tests/FluidNetworkConstants.py | nasa/gunns | 248323939a476abe5178538cd7a3512b5f42675c | [
"NASA-1.3"
] | 7 | 2020-02-10T19:25:43.000Z | 2022-03-16T01:10:00.000Z | # @copyright Copyright 2019 United States Government as represented by the Administrator of the
# National Aeronautics and Space Administration. All Rights Reserved. */
#
#===============================================================================================
# SIM_test Fluid Network Testing Constan... | 34.045455 | 97 | 0.497997 |
a502e3e9f4e5146ceb5ee0840170ebddb3b13af0 | 135 | py | Python | estimator/__init__.py | thjashin/spectral-stein-grad | 8a24c0f68bea64b84b0ef880dbe9794e90e919f4 | [
"MIT"
] | 37 | 2018-06-10T15:41:52.000Z | 2022-01-15T01:23:49.000Z | estimator/__init__.py | thjashin/spectral-stein-grad | 8a24c0f68bea64b84b0ef880dbe9794e90e919f4 | [
"MIT"
] | 1 | 2018-11-21T06:46:51.000Z | 2019-02-01T22:59:39.000Z | estimator/__init__.py | thjashin/spectral-stein-grad | 8a24c0f68bea64b84b0ef880dbe9794e90e919f4 | [
"MIT"
] | 10 | 2019-01-18T13:42:49.000Z | 2021-11-25T06:38:03.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .base import *
from .stein import *
from .spectral import *
from .entropy import *
| 16.875 | 23 | 0.659259 |
2efe82a3d3169970686482e9ecf0b6526e5016a3 | 1,992 | py | Python | azure-iot-device/samples/async-hub-scenarios/send_message_x509.py | dt-boringtao/azure-iot-sdk-python | 35a09679bdf4d7a727391b265a8f1fbb99a30c45 | [
"MIT"
] | null | null | null | azure-iot-device/samples/async-hub-scenarios/send_message_x509.py | dt-boringtao/azure-iot-sdk-python | 35a09679bdf4d7a727391b265a8f1fbb99a30c45 | [
"MIT"
] | null | null | null | azure-iot-device/samples/async-hub-scenarios/send_message_x509.py | dt-boringtao/azure-iot-sdk-python | 35a09679bdf4d7a727391b265a8f1fbb99a30c45 | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import os... | 32.655738 | 103 | 0.636044 |
027069da7b8146ab5167023d5ca2e620a3f0de98 | 13,049 | py | Python | python/run-tests.py | keiSunagawa/spark | abe370f97132a835e8a7cf15d4ecbffb0d49eafd | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 11 | 2020-01-29T10:29:53.000Z | 2022-02-10T09:52:54.000Z | python/run-tests.py | zcc2013/spark | 20a3ef7259490e0c9f6348f13db1e99da5f0df83 | [
"Apache-2.0"
] | 7 | 2017-05-08T23:53:03.000Z | 2020-11-25T01:31:17.000Z | python/run-tests.py | zcc2013/spark | 20a3ef7259490e0c9f6348f13db1e99da5f0df83 | [
"Apache-2.0"
] | 3 | 2016-03-25T01:58:05.000Z | 2019-04-11T07:47:29.000Z | #!/usr/bin/env python
#
# 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 "Li... | 40.65109 | 100 | 0.636984 |
683d7e847ef760c75a2efc2606170d7c30f3e6eb | 686 | py | Python | cap_4/listagem/magicians.v2py.py | rsmonteiro2021/execicios_python | d984508ec529c5a83b51354fc930fa8eafa40dc1 | [
"MIT"
] | 1 | 2021-04-26T02:55:16.000Z | 2021-04-26T02:55:16.000Z | cap_4/listagem/magicians.v2py.py | rsmonteiro2021/execicios_python | d984508ec529c5a83b51354fc930fa8eafa40dc1 | [
"MIT"
] | null | null | null | cap_4/listagem/magicians.v2py.py | rsmonteiro2021/execicios_python | d984508ec529c5a83b51354fc930fa8eafa40dc1 | [
"MIT"
] | null | null | null | #Vamos usar um laço for para exibir cada um dos elementos de uma lista de mágicos:
magicians = ['alice', 'david', 'carolina']#...........Começamos definindo uma lista de mágicos
magicians.sort()#.....................................classifica os valores da lista por ordem alfabética crescente
for magician in magicians:... | 85.75 | 131 | 0.635569 |
8a7d199ae1e198e6063059e6aadf79009efa4790 | 157 | py | Python | website/models/keyword.py | TOXiNdeep2503/makeabilitylabwebsite | 6e57ee4f928742b30f1e933166dc8fa2b6b11d05 | [
"MIT"
] | 3 | 2020-10-01T20:44:24.000Z | 2022-01-20T05:51:24.000Z | website/models/keyword.py | TOXiNdeep2503/makeabilitylabwebsite | 6e57ee4f928742b30f1e933166dc8fa2b6b11d05 | [
"MIT"
] | 571 | 2017-06-14T13:38:45.000Z | 2020-07-17T18:15:58.000Z | website/models/keyword.py | TOXiNdeep2503/makeabilitylabwebsite | 6e57ee4f928742b30f1e933166dc8fa2b6b11d05 | [
"MIT"
] | 99 | 2020-09-30T13:32:25.000Z | 2022-03-07T07:51:54.000Z | from django.db import models
class Keyword(models.Model):
keyword = models.CharField(max_length=255)
def __str__(self):
return self.keyword | 22.428571 | 46 | 0.719745 |
fc07d8c33434fbb65be88a0e404679b9e621979c | 6,513 | py | Python | examples/tensorflow/fcn.py | stavka0619/picpac | 638f56312400fbb6204b7001c0c137386a675e83 | [
"BSD-2-Clause"
] | null | null | null | examples/tensorflow/fcn.py | stavka0619/picpac | 638f56312400fbb6204b7001c0c137386a675e83 | [
"BSD-2-Clause"
] | null | null | null | examples/tensorflow/fcn.py | stavka0619/picpac | 638f56312400fbb6204b7001c0c137386a675e83 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import tensorflow as tf
import picpac
BATCH = 1
flags = tf.app.flags
FLAGS = flags.FLAGS
flags.DEFINE_float('learning_rate', 0.01, 'Initial learning rate.')
flags.DEFINE_intege... | 39.23494 | 96 | 0.555965 |
a131145dc08b47be87b7757ec249183839688283 | 2,244 | py | Python | httpcore/_utils.py | ddkarpovich/httpcore | f9f59afb4a52f931fe87508d8500a2b9f021f4c3 | [
"BSD-3-Clause"
] | null | null | null | httpcore/_utils.py | ddkarpovich/httpcore | f9f59afb4a52f931fe87508d8500a2b9f021f4c3 | [
"BSD-3-Clause"
] | null | null | null | httpcore/_utils.py | ddkarpovich/httpcore | f9f59afb4a52f931fe87508d8500a2b9f021f4c3 | [
"BSD-3-Clause"
] | null | null | null | import itertools
import logging
import os
import sys
import typing
from ._types import URL, Origin
_LOGGER_INITIALIZED = False
TRACE_LOG_LEVEL = 5
DEFAULT_PORTS = {b"http": 80, b"https": 443}
class Logger(logging.Logger):
# Stub for type checkers.
def trace(self, message: str, *args: typing.Any, **kwargs: t... | 30.739726 | 87 | 0.639037 |
5f927e106643e8fafea4bf424ebcae45a2f55834 | 1,345 | py | Python | preprocessing/convert_formats/cord19_transform_topics.py | PranjaliJain/matchmaker | b7e22eb8b70cccabf0729076df7cbab3f4ba4a1f | [
"Apache-2.0"
] | 97 | 2021-07-11T14:34:40.000Z | 2022-03-31T14:17:25.000Z | preprocessing/convert_formats/cord19_transform_topics.py | PranjaliJain/matchmaker | b7e22eb8b70cccabf0729076df7cbab3f4ba4a1f | [
"Apache-2.0"
] | 12 | 2021-07-11T13:03:23.000Z | 2022-03-02T16:07:11.000Z | preprocessing/convert_formats/cord19_transform_topics.py | PranjaliJain/matchmaker | b7e22eb8b70cccabf0729076df7cbab3f4ba4a1f | [
"Apache-2.0"
] | 16 | 2019-12-23T01:22:35.000Z | 2021-06-23T12:54:36.000Z | from xml.dom import minidom
import argparse
from tqdm import tqdm
#
# config
#
parser = argparse.ArgumentParser()
parser.add_argument('--in-file', action='store', dest='in_file',
help='trec topic file', required=True)
parser.add_argument('--out-file', action='store', dest='out_file',
... | 29.888889 | 104 | 0.608178 |
abdb23e3a106f711744b66b00bb0f1197dec9b9d | 18,969 | py | Python | saleor/core/utils/random_data.py | VanilleBid/weekly-saleor | e776e86ee7ce710929ef33878d936e2a8367a217 | [
"BSD-3-Clause"
] | null | null | null | saleor/core/utils/random_data.py | VanilleBid/weekly-saleor | e776e86ee7ce710929ef33878d936e2a8367a217 | [
"BSD-3-Clause"
] | 86 | 2018-03-08T14:19:19.000Z | 2018-05-12T14:55:16.000Z | saleor/core/utils/random_data.py | VanilleBid/weekly-saleor | e776e86ee7ce710929ef33878d936e2a8367a217 | [
"BSD-3-Clause"
] | 2 | 2018-03-05T12:29:10.000Z | 2018-09-28T12:40:52.000Z | from collections import defaultdict
import itertools
import os
import random
import unicodedata
from django.conf import settings
from django.contrib.auth.models import Group, Permission
from django.core.files import File
from django.template.defaultfilters import slugify
from faker import Factory
from faker.providers ... | 34.240072 | 79 | 0.669144 |
68aaf281ac5c4f33035fe2da04dea36ee709850a | 5,281 | py | Python | examples/faster-rcnn/ingest_pascalvoc.py | anlthms/neon | cba318c9f0a2acf2ab8a3d7725b588b2a8b17cb9 | [
"Apache-2.0"
] | 1 | 2022-03-21T11:23:36.000Z | 2022-03-21T11:23:36.000Z | examples/faster-rcnn/ingest_pascalvoc.py | anlthms/neon | cba318c9f0a2acf2ab8a3d7725b588b2a8b17cb9 | [
"Apache-2.0"
] | null | null | null | examples/faster-rcnn/ingest_pascalvoc.py | anlthms/neon | cba318c9f0a2acf2ab8a3d7725b588b2a8b17cb9 | [
"Apache-2.0"
] | null | null | null | # ----------------------------------------------------------------------------
# Copyright 2016 Nervana Systems 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.o... | 44.378151 | 99 | 0.672032 |
658af0ce1e5da69c3158be3cc969891777a7d6ec | 547 | py | Python | client-programs/contrib/metagenscope/metagenscope/modules/constants.py | LongTailBio/pangea-django | 630551dded7f9e38f95eda8c36039e0de46961e7 | [
"MIT"
] | null | null | null | client-programs/contrib/metagenscope/metagenscope/modules/constants.py | LongTailBio/pangea-django | 630551dded7f9e38f95eda8c36039e0de46961e7 | [
"MIT"
] | 27 | 2020-03-26T02:55:12.000Z | 2022-03-12T00:55:04.000Z | client-programs/contrib/metagenscope/metagenscope/modules/constants.py | LongTailBio/pangea-django | 630551dded7f9e38f95eda8c36039e0de46961e7 | [
"MIT"
] | 1 | 2021-09-14T08:15:54.000Z | 2021-09-14T08:15:54.000Z |
KRAKEN2_NAMES = ('cap2::kraken2', 'report', 'Kraken2', 'cap2::capalyzer::kraken2_taxa', 'report')
FASTKRAKEN2_NAMES = ('cap2::fast_kraken2', 'report', 'FastKraken2', 'cap2::capalyzer::fast_kraken2_taxa', 'report')
MICROBECENSUS_NAMES = ('cap1::microbe_census', 'stats', 'MicrobeCensus')
HMP_NAMES = ('cap2::hmp_compari... | 60.777778 | 115 | 0.747715 |
3283fa69e902e2b6cc74557b0568afaa62a05bbd | 12,026 | py | Python | sensor_msgs/src/sensor_msgs/msg/_PointCloud2.py | MRSD2018/reefbot-1 | a595ca718d0cda277726894a3105815cef000475 | [
"MIT"
] | null | null | null | sensor_msgs/src/sensor_msgs/msg/_PointCloud2.py | MRSD2018/reefbot-1 | a595ca718d0cda277726894a3105815cef000475 | [
"MIT"
] | null | null | null | sensor_msgs/src/sensor_msgs/msg/_PointCloud2.py | MRSD2018/reefbot-1 | a595ca718d0cda277726894a3105815cef000475 | [
"MIT"
] | null | null | null | """autogenerated by genpy from sensor_msgs/PointCloud2.msg. Do not edit."""
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
import sensor_msgs.msg
import std_msgs.msg
class PointCloud2(genpy.Message):
_md5sum = "1158d486dd51d683ce2f1be655c3c181"
_type = "sensor_msgs/... | 33.129477 | 122 | 0.621487 |
89355856f33ee3a91fbc46c4cd04f3803d9b95f3 | 1,902 | py | Python | tests/task/nlp/test_masked_language_modeling.py | techthiyanes/lightning-transformers | 4832f00ee26ad8d3d39e77d0d89f220bcc8de944 | [
"Apache-2.0"
] | null | null | null | tests/task/nlp/test_masked_language_modeling.py | techthiyanes/lightning-transformers | 4832f00ee26ad8d3d39e77d0d89f220bcc8de944 | [
"Apache-2.0"
] | null | null | null | tests/task/nlp/test_masked_language_modeling.py | techthiyanes/lightning-transformers | 4832f00ee26ad8d3d39e77d0d89f220bcc8de944 | [
"Apache-2.0"
] | null | null | null | import sys
from unittest.mock import MagicMock
import pytest
import pytorch_lightning as pl
from transformers import AutoTokenizer
from lightning_transformers.task.nlp.masked_language_modeling import (
MaskedLanguageModelingDataConfig,
MaskedLanguageModelingDataModule,
MaskedLanguageModelingTransformer,
)... | 35.222222 | 101 | 0.759201 |
1a13ec387a1920e4c60fef2b4787723155570b42 | 253 | py | Python | app/bookbeeper/manage.py | sydneycarton/NeatMechanicalToy | 71c739d5124fb7f8c0c480012ad26c14718df8b4 | [
"Apache-2.0"
] | null | null | null | app/bookbeeper/manage.py | sydneycarton/NeatMechanicalToy | 71c739d5124fb7f8c0c480012ad26c14718df8b4 | [
"Apache-2.0"
] | null | null | null | app/bookbeeper/manage.py | sydneycarton/NeatMechanicalToy | 71c739d5124fb7f8c0c480012ad26c14718df8b4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bookbeeper.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 23 | 74 | 0.774704 |
a4050f989dd84b61c5f59e3c7cd7c06f9bc5ffa6 | 121 | py | Python | keanu-python/keanu/__init__.py | bwplotka/keanu | 3afc576380fd30f7539b34b220bd89e68529b10e | [
"MIT"
] | null | null | null | keanu-python/keanu/__init__.py | bwplotka/keanu | 3afc576380fd30f7539b34b220bd89e68529b10e | [
"MIT"
] | null | null | null | keanu-python/keanu/__init__.py | bwplotka/keanu | 3afc576380fd30f7539b34b220bd89e68529b10e | [
"MIT"
] | null | null | null | from .model import Model
from .keanu_random import KeanuRandom
from .net import BayesNet
from . import vertex, algorithm
| 24.2 | 37 | 0.818182 |
4f7ffcb017738744160c09ba9264f27a88d9c538 | 33,058 | py | Python | tests/integration/core/chroma_integration_testcase.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | 1 | 2021-02-08T16:59:14.000Z | 2021-02-08T16:59:14.000Z | tests/integration/core/chroma_integration_testcase.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | null | null | null | tests/integration/core/chroma_integration_testcase.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | null | null | null | import logging
import time
import json
from collections import namedtuple
from testconfig import config
from tests.integration.core.api_testcase_with_test_reset import ApiTestCaseWithTestReset
from tests.integration.core.constants import LONG_TEST_TIMEOUT, INSTALL_TIMEOUT
from tests.utils.check_server_host import chec... | 43.326343 | 142 | 0.614163 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.