hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1507c96d9d4f256bc65da807cd5af86c8c25fb94 | 6,371 | py | Python | dft/dft-hartree-hydrogen.py | marvinfriede/projects | 7050cd76880c8ff0d9de17b8676e82f1929a68e0 | [
"MIT"
] | null | null | null | dft/dft-hartree-hydrogen.py | marvinfriede/projects | 7050cd76880c8ff0d9de17b8676e82f1929a68e0 | [
"MIT"
] | 3 | 2021-04-14T20:15:26.000Z | 2021-04-14T20:20:54.000Z | dft/dft-hartree-hydrogen.py | marvinfriede/projects | 7050cd76880c8ff0d9de17b8676e82f1929a68e0 | [
"MIT"
] | null | null | null | #!/bin/env python3
# coding: utf8
'''
My implementation of DFT Assignment 5.1: Hartree energy for H-atom GS
Taught by René Wirnata in 2019/2020.
Links:
https://tu-freiberg.de/fakultaet2/thph/lehre/density-functional-theory
https://github.com/PandaScience/teaching-resources
This script uses the last assignment's ... | 30.777778 | 86 | 0.644169 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,105 | 0.486906 |
1507f85202e8ecdff0fe986b123a48f1bb2bac41 | 18,714 | py | Python | workflow & analyses notebooks/fukushima_telomere_methods.py | Jared-Luxton/Fukushima-Nuclear-Disaster-Humans | 1cb84f63172005f3bd8947d2bca041deaeec90e8 | [
"MIT"
] | null | null | null | workflow & analyses notebooks/fukushima_telomere_methods.py | Jared-Luxton/Fukushima-Nuclear-Disaster-Humans | 1cb84f63172005f3bd8947d2bca041deaeec90e8 | [
"MIT"
] | null | null | null | workflow & analyses notebooks/fukushima_telomere_methods.py | Jared-Luxton/Fukushima-Nuclear-Disaster-Humans | 1cb84f63172005f3bd8947d2bca041deaeec90e8 | [
"MIT"
] | 1 | 2021-05-23T22:06:17.000Z | 2021-05-23T22:06:17.000Z | import numpy as np
import pandas as pd
import os
import matplotlib.pyplot as plt
from sklearn import datasets, linear_model
from difflib import SequenceMatcher
import seaborn as sns
from statistics import mean
from ast import literal_eval
from scipy import stats
from sklearn.linear_model import LinearRegression
from s... | 35.850575 | 125 | 0.589879 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,958 | 0.211499 |
1508aa76e743b64f436cbb0a8c19cf6751c48d1b | 4,684 | py | Python | src/xia2/cli/report.py | graeme-winter/xia2 | e00d688137d4ddb4b125be9a3f37ae00265886c2 | [
"BSD-3-Clause"
] | 10 | 2015-10-30T06:36:55.000Z | 2021-12-10T20:06:22.000Z | src/xia2/cli/report.py | graeme-winter/xia2 | e00d688137d4ddb4b125be9a3f37ae00265886c2 | [
"BSD-3-Clause"
] | 528 | 2015-11-24T08:20:12.000Z | 2022-03-21T21:47:29.000Z | src/xia2/cli/report.py | graeme-winter/xia2 | e00d688137d4ddb4b125be9a3f37ae00265886c2 | [
"BSD-3-Clause"
] | 14 | 2016-03-15T22:07:03.000Z | 2020-12-14T07:13:35.000Z | import json
import os
import sys
from collections import OrderedDict
import iotbx.phil
import xia2.Handlers.Streams
from dials.util.options import OptionParser
from jinja2 import ChoiceLoader, Environment, PackageLoader
from xia2.Modules.Report import Report
from xia2.XIA2Version import Version
phil_scope = iotbx.phi... | 28.216867 | 87 | 0.637916 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 850 | 0.181469 |
150bff7433b6fabe00d05feee353f17bc33f7d36 | 757 | py | Python | minoan_project/minoan_project/urls.py | mtzirkel/minoan | 3eadeb1f73acf261e2f550642432ea5c25557ecb | [
"MIT"
] | null | null | null | minoan_project/minoan_project/urls.py | mtzirkel/minoan | 3eadeb1f73acf261e2f550642432ea5c25557ecb | [
"MIT"
] | null | null | null | minoan_project/minoan_project/urls.py | mtzirkel/minoan | 3eadeb1f73acf261e2f550642432ea5c25557ecb | [
"MIT"
] | null | null | null | from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.conf import settings
from django.views.generic import TemplateView
from . import views
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patt... | 27.035714 | 89 | 0.698811 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 304 | 0.401585 |
150c07692f09dbc4c2bc2f82c96435eb48b056d8 | 324 | py | Python | algorithm/__init__.py | sirCamp/bioinformatics | 2609044c57eba1097263829f9db579cd1825b8bb | [
"MIT"
] | null | null | null | algorithm/__init__.py | sirCamp/bioinformatics | 2609044c57eba1097263829f9db579cd1825b8bb | [
"MIT"
] | null | null | null | algorithm/__init__.py | sirCamp/bioinformatics | 2609044c57eba1097263829f9db579cd1825b8bb | [
"MIT"
] | null | null | null | from algorithm.InsertionLengthAlgorithm import InsertionLengthAlgorithm
from algorithm.PhysicalCoverageAlgorithm import PhysicalCoverageAlgorithm
from algorithm.SequenceCoverageAlgorithm import SequenceCoverageAlgorithm
from algorithm.CigarAlgorithm import CigarAlgorithm
from algorithm.KmersAlgorithm import KmersAlgori... | 54 | 73 | 0.92284 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
150e69b2f9539045223d00d448f50c262f488903 | 1,874 | py | Python | attackMain.py | saurabhK99/substitution-cipher | dcf69cd4866ce7408eda6faf03ddd9b601bc3fec | [
"MIT"
] | null | null | null | attackMain.py | saurabhK99/substitution-cipher | dcf69cd4866ce7408eda6faf03ddd9b601bc3fec | [
"MIT"
] | null | null | null | attackMain.py | saurabhK99/substitution-cipher | dcf69cd4866ce7408eda6faf03ddd9b601bc3fec | [
"MIT"
] | null | null | null | from tkinter import *
from attack import *
#calls letter frequency attack
def attack(on, cipherTxt):
plainTxt = str()
attack = LetterFrequencyAttack(cipherTxt, on)
for i in range(10):
plainTxt = plainTxt + attack.attack() + '\n\n'
answer.config(text = plainTxt)
#defining main wi... | 23.425 | 72 | 0.657417 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 583 | 0.311099 |
150ef1714addd55d364456c56a5bbe4b9e5b825d | 12,703 | py | Python | eden.py | nobesio/eden | c301abdc64647fde02e8117ea137db322a804739 | [
"MIT"
] | null | null | null | eden.py | nobesio/eden | c301abdc64647fde02e8117ea137db322a804739 | [
"MIT"
] | null | null | null | eden.py | nobesio/eden | c301abdc64647fde02e8117ea137db322a804739 | [
"MIT"
] | null | null | null | from random import randint
import copy
# Auxiliary Function for rotating the DNA in each cycle.
def rotate(l,n):
return l[n:] + l[:n]
# History is the object responsible for accounting all the organisms.
class History:
def __init__(self):
self.orgs = []
def addOrganism(self, org):
... | 37.919403 | 112 | 0.492954 | 10,457 | 0.823191 | 0 | 0 | 0 | 0 | 0 | 0 | 995 | 0.078328 |
1512acbfbf9725f996d722bba323e798347b6270 | 2,407 | py | Python | examples/example_pipeline.py | madconsulting/datanectar | 7177b907c72c92de31fb136740f33c509ed5d499 | [
"Unlicense"
] | null | null | null | examples/example_pipeline.py | madconsulting/datanectar | 7177b907c72c92de31fb136740f33c509ed5d499 | [
"Unlicense"
] | null | null | null | examples/example_pipeline.py | madconsulting/datanectar | 7177b907c72c92de31fb136740f33c509ed5d499 | [
"Unlicense"
] | null | null | null | import os
import datetime
from pathlib import Path
import pandas as pd
import luigi
PROCESSED_DIR = 'processed'
ROLLUP_DIR = 'rollups'
class PrepareDataTask(luigi.Task):
def __init__(self):
super().__init__()
self.last_processed_id = 0
if os.path.exists('last_processed_id.txt'):
... | 28.317647 | 93 | 0.617366 | 2,221 | 0.922725 | 0 | 0 | 0 | 0 | 0 | 0 | 597 | 0.248027 |
151306af1c1480903dd00ab70e45e88f683fbe48 | 2,463 | py | Python | scripts/tflite_model_tools/tflite/Metadata.py | LaudateCorpus1/edgeai-tidl-tools | d98789769a711e5a3700dfdc20d877073bd87da7 | [
"CNRI-Python"
] | 15 | 2021-09-05T03:43:54.000Z | 2022-03-29T14:17:29.000Z | scripts/tflite_model_tools/tflite/Metadata.py | LaudateCorpus1/edgeai-tidl-tools | d98789769a711e5a3700dfdc20d877073bd87da7 | [
"CNRI-Python"
] | 21 | 2021-09-01T06:58:31.000Z | 2022-03-31T06:33:15.000Z | scripts/tflite_model_tools/tflite/Metadata.py | LaudateCorpus1/edgeai-tidl-tools | d98789769a711e5a3700dfdc20d877073bd87da7 | [
"CNRI-Python"
] | 6 | 2021-09-22T06:44:19.000Z | 2022-02-07T06:28:35.000Z | # automatically generated by the FlatBuffers compiler, do not modify
# namespace: tflite
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class Metadata(object):
__slots__ = ['_tab']
@classmethod
def GetRootAsMetadata(cls, buf, offset):
n = flatbuffers.encode.Ge... | 29.674699 | 131 | 0.657734 | 1,967 | 0.79862 | 0 | 0 | 676 | 0.274462 | 0 | 0 | 197 | 0.079984 |
15136d40366243c73182b9f6916a6c550042f55f | 1,124 | py | Python | kukur/config.py | timeseer-ai/kukur | 28210ff0bde396d961b60828782fef56e326b319 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2021-09-12T08:29:30.000Z | 2022-01-19T19:06:45.000Z | kukur/config.py | timeseer-ai/kukur | 28210ff0bde396d961b60828782fef56e326b319 | [
"ECL-2.0",
"Apache-2.0"
] | 34 | 2021-03-16T08:21:01.000Z | 2022-03-21T07:30:28.000Z | kukur/config.py | timeseer-ai/kukur | 28210ff0bde396d961b60828782fef56e326b319 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-09-12T08:29:34.000Z | 2021-09-12T08:29:34.000Z | """Read the Kukur configuration."""
# SPDX-FileCopyrightText: 2021 Timeseer.AI
#
# SPDX-License-Identifier: Apache-2.0
import glob
import toml
class InvalidIncludeException(Exception):
"""Raised when the include configuration is invalid."""
def __init__(self, message: str):
Exception.__init__(self, ... | 32.114286 | 71 | 0.598754 | 204 | 0.181495 | 0 | 0 | 0 | 0 | 0 | 0 | 307 | 0.273132 |
1514c4cab7976c14d2d2ff2686c1ed82e350d931 | 3,326 | py | Python | scheduletest.py | ambimanus/appsim | 8f60b3a736af8aa7f03435c28aef2685a3dbfbe3 | [
"MIT"
] | null | null | null | scheduletest.py | ambimanus/appsim | 8f60b3a736af8aa7f03435c28aef2685a3dbfbe3 | [
"MIT"
] | null | null | null | scheduletest.py | ambimanus/appsim | 8f60b3a736af8aa7f03435c28aef2685a3dbfbe3 | [
"MIT"
] | null | null | null | import time
from datetime import datetime
import numpy as np
from matplotlib import pyplot as plt
from matplotlib.dates import epoch2num
import device_factory
if __name__ == '__main__':
amount = 50
devices = []
for i in range(amount):
device = device_factory.ecopower_4(i, i)
... | 35.010526 | 88 | 0.585989 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 662 | 0.199038 |
15165694e2716645ea22f6406f0f303943c423b8 | 329 | py | Python | src/genie/libs/parser/iosxe/tests/ShowInstallState/cli/equal/golden_output3_expected.py | ykoehler/genieparser | b62cf622c3d8eab77c7b69e932c214ed04a2565a | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/tests/ShowInstallState/cli/equal/golden_output3_expected.py | ykoehler/genieparser | b62cf622c3d8eab77c7b69e932c214ed04a2565a | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/tests/ShowInstallState/cli/equal/golden_output3_expected.py | ykoehler/genieparser | b62cf622c3d8eab77c7b69e932c214ed04a2565a | [
"Apache-2.0"
] | null | null | null | expected_output = {
"location": {
"R0 R1": {
"auto_abort_timer": "inactive",
"pkg_state": {
1: {
"filename_version": "17.08.01.0.149429",
"state": "U",
"type": "IMG",
}
},
... | 23.5 | 60 | 0.31307 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 114 | 0.346505 |
1516d58cc828bc371a33c9b4a9ca474fdb7eba79 | 8,637 | py | Python | lite/tests/unittest_py/pass/test_conv_elementwise_fuser_pass.py | 714627034/Paddle-Lite | 015ba88a4d639db0b73603e37f83e47be041a4eb | [
"Apache-2.0"
] | 808 | 2018-04-17T17:43:12.000Z | 2019-08-18T07:39:13.000Z | lite/tests/unittest_py/pass/test_conv_elementwise_fuser_pass.py | 714627034/Paddle-Lite | 015ba88a4d639db0b73603e37f83e47be041a4eb | [
"Apache-2.0"
] | 728 | 2018-04-18T08:15:25.000Z | 2019-08-16T07:14:43.000Z | lite/tests/unittest_py/pass/test_conv_elementwise_fuser_pass.py | 714627034/Paddle-Lite | 015ba88a4d639db0b73603e37f83e47be041a4eb | [
"Apache-2.0"
] | 364 | 2018-04-18T17:05:02.000Z | 2019-08-18T03:25:38.000Z | # Copyright (c) 2021 PaddlePaddle 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 appli... | 40.359813 | 125 | 0.554706 | 7,369 | 0.85319 | 0 | 0 | 0 | 0 | 0 | 0 | 1,176 | 0.136158 |
151724d850402f50ae0bbd91cc2f5825d03ab2de | 22,871 | py | Python | cfn_policy_validator/tests/validation_tests/test_resource_validator.py | awslabs/aws-cloudformation-iam-policy-validator | 52c1439e4d76d2c7d45c97563cc87f8458134e0b | [
"MIT-0"
] | 41 | 2021-09-30T01:28:51.000Z | 2022-03-24T09:42:09.000Z | cfn_policy_validator/tests/validation_tests/test_resource_validator.py | awslabs/aws-cloudformation-iam-policy-validator | 52c1439e4d76d2c7d45c97563cc87f8458134e0b | [
"MIT-0"
] | 10 | 2021-09-30T08:13:11.000Z | 2022-03-22T07:34:41.000Z | cfn_policy_validator/tests/validation_tests/test_resource_validator.py | awslabs/aws-cloudformation-iam-policy-validator | 52c1439e4d76d2c7d45c97563cc87f8458134e0b | [
"MIT-0"
] | 3 | 2021-11-29T21:13:30.000Z | 2022-02-04T12:49:40.000Z | """
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""
import boto3
import copy
import unittest
from botocore.stub import ANY
from cfn_policy_validator.tests import account_config, offline_only, only_run_for_end_to_end
from cfn_policy_validator.tests.boto_mocks impor... | 33.437135 | 145 | 0.773425 | 17,605 | 0.769752 | 0 | 0 | 15,300 | 0.668969 | 0 | 0 | 5,963 | 0.260723 |
1518a255b1570670a775245440b45ebe73fe295d | 6,672 | py | Python | HDF4_H5_NETCDF/source2.7/h5py/tests/hl/test_datatype.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 31 | 2018-10-19T15:28:36.000Z | 2022-02-14T03:01:25.000Z | h5py/tests/hl/test_datatype.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 13 | 2020-01-28T22:20:14.000Z | 2022-03-11T23:20:14.000Z | h5py/tests/hl/test_datatype.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 10 | 2019-01-10T04:02:12.000Z | 2021-11-17T01:52:15.000Z | """
Tests for the h5py.Datatype class.
"""
from __future__ import absolute_import
from itertools import count
import numpy as np
import h5py
from ..common import ut, TestCase
class TestVlen(TestCase):
"""
Check that storage of vlen strings is carried out correctly.
"""
def assertVlenArrayEq... | 33.527638 | 78 | 0.508243 | 6,485 | 0.971972 | 0 | 0 | 0 | 0 | 0 | 0 | 772 | 0.115707 |
151937c4e4552fde0563a4d7a5da8405bfdf819f | 2,278 | py | Python | conmon/regex.py | flashdagger/conmon | c6e75f115ad104ea7ecc7b14618efadefadad2f8 | [
"MIT"
] | null | null | null | conmon/regex.py | flashdagger/conmon | c6e75f115ad104ea7ecc7b14618efadefadad2f8 | [
"MIT"
] | null | null | null | conmon/regex.py | flashdagger/conmon | c6e75f115ad104ea7ecc7b14618efadefadad2f8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import re
from typing import Pattern, Tuple, Iterator, Match, Union, Optional, List, Dict
from conmon.conan import storage_path
DECOLORIZE_REGEX = re.compile(r"[\u001b]\[\d{1,2}m", re.UNICODE)
CONAN_DATA_PATH = re.compile(
r"""(?x)
(?P<path>
([a-z... | 28.475 | 87 | 0.565847 | 0 | 0 | 307 | 0.134767 | 0 | 0 | 0 | 0 | 838 | 0.367867 |
15195236d745c09ce968bf6af2311b1a616e1824 | 5,089 | py | Python | src/north/cli/gscli/main.py | falcacicd/goldstone-mgmt | e7348011180e3c2dcd0558636ddc5c21779c7a3f | [
"Apache-2.0"
] | null | null | null | src/north/cli/gscli/main.py | falcacicd/goldstone-mgmt | e7348011180e3c2dcd0558636ddc5c21779c7a3f | [
"Apache-2.0"
] | null | null | null | src/north/cli/gscli/main.py | falcacicd/goldstone-mgmt | e7348011180e3c2dcd0558636ddc5c21779c7a3f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import sysrepo as sr
import argparse
from prompt_toolkit import PromptSession
from prompt_toolkit.key_binding import KeyBindings
from prompt_toolkit.completion import Completer
import sys
import os
import logging
import asyncio
from .base import Object, InvalidInput, BreakLoop
from .onlp impo... | 28.751412 | 118 | 0.592847 | 2,679 | 0.52643 | 0 | 0 | 753 | 0.147966 | 1,220 | 0.239733 | 834 | 0.163883 |
1519776f4ef0553b7494300ab7ab52a92881c3de | 350 | py | Python | InsertionSort/selectionSort/selectionsort/selectionSort.py | khaledshishani32/data-structures-and-algorithms-python | 6397ef2467958b100747ef430ddfb3e691a97a0f | [
"MIT"
] | null | null | null | InsertionSort/selectionSort/selectionsort/selectionSort.py | khaledshishani32/data-structures-and-algorithms-python | 6397ef2467958b100747ef430ddfb3e691a97a0f | [
"MIT"
] | null | null | null | InsertionSort/selectionSort/selectionsort/selectionSort.py | khaledshishani32/data-structures-and-algorithms-python | 6397ef2467958b100747ef430ddfb3e691a97a0f | [
"MIT"
] | null | null | null | def selection_sort(my_list):
for i in range(len(my_list)):
min_index=i
for j in range(i+1 , len(my_list)):
if my_list[min_index]>my_list[j]:
min_index= j
my_list[i],my_list[min_index]= my_list[min_index] ,my_list[i]
print(my_list)
cus_list=[8,4,23,42,16,... | 25 | 69 | 0.611429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1519b725bc8e51fd74703c95a095ecb5723fb0b3 | 437 | py | Python | tests/creditcrawler_test.py | Mivinci/cqupt-piper | ce76a4334a2d7a7b75750d7bfac9efa747f968c7 | [
"MIT"
] | 3 | 2019-09-08T16:22:30.000Z | 2021-01-23T02:54:10.000Z | tests/creditcrawler_test.py | Mivinci/cqupt-piper | ce76a4334a2d7a7b75750d7bfac9efa747f968c7 | [
"MIT"
] | 1 | 2020-01-11T05:13:43.000Z | 2020-01-11T05:13:43.000Z | tests/creditcrawler_test.py | Mivinci/cqupt-piper | ce76a4334a2d7a7b75750d7bfac9efa747f968c7 | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
from prettytable import PrettyTable
# html = requests.get(
# 'http://jwzx.cqu.pt/student/xkxfTj.php',
# cookies={'PHPSESSID': 'o2r2fpddrj892dp1ntqddcp2hv'}).text
# soup = BeautifulSoup(html, 'html.parser')
# for tr in soup.find('table', {'id': 'AxfTjTable'}).find... | 24.277778 | 71 | 0.665904 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 304 | 0.695652 |
1519c99cb202a036f7cd0c6cfb24bf58a516d62b | 602 | py | Python | ClassMethod.py | AdarshKvT/python-oop | b619226807c3a0b434fe9789952cc86dc8cde9b7 | [
"Apache-2.0"
] | null | null | null | ClassMethod.py | AdarshKvT/python-oop | b619226807c3a0b434fe9789952cc86dc8cde9b7 | [
"Apache-2.0"
] | null | null | null | ClassMethod.py | AdarshKvT/python-oop | b619226807c3a0b434fe9789952cc86dc8cde9b7 | [
"Apache-2.0"
] | null | null | null | class Person:
number_of_people = 0
def __init__(self, name):
print("__init__ initiated")
self.name = name
print("calling add_person()")
Person.add_person()
@classmethod
def num_of_people(cls):
print("initiating num_of_person()")
return cls.number_of_peo... | 20.066667 | 43 | 0.647841 | 433 | 0.719269 | 0 | 0 | 224 | 0.372093 | 0 | 0 | 190 | 0.315615 |
1519fb893e14d2984bb652c58400576b1b324256 | 1,117 | py | Python | webpack_manifest/templatetags/webpack_manifest_tags.py | temoto/python-webpack-manifest | bb10dbb718f2b41d8356c983b375b064e220d521 | [
"MIT"
] | 55 | 2015-11-02T19:50:41.000Z | 2022-03-06T21:48:36.000Z | webpack_manifest/templatetags/webpack_manifest_tags.py | temoto/python-webpack-manifest | bb10dbb718f2b41d8356c983b375b064e220d521 | [
"MIT"
] | 7 | 2015-09-16T05:24:37.000Z | 2018-07-25T23:10:30.000Z | webpack_manifest/templatetags/webpack_manifest_tags.py | temoto/python-webpack-manifest | bb10dbb718f2b41d8356c983b375b064e220d521 | [
"MIT"
] | 10 | 2016-03-06T16:30:00.000Z | 2020-08-12T01:41:51.000Z | from django import template
from django.conf import settings
from webpack_manifest import webpack_manifest
if not hasattr(settings, 'WEBPACK_MANIFEST'):
raise webpack_manifest.WebpackManifestConfigError('`WEBPACK_MANIFEST` has not been defined in settings')
if 'manifests' not in settings.WEBPACK_MANIFEST:
rai... | 34.90625 | 108 | 0.706356 | 0 | 0 | 0 | 0 | 632 | 0.565801 | 0 | 0 | 339 | 0.303491 |
151a77fa24452704d617da768baec7d8f8f8b186 | 2,668 | py | Python | utilities/jaccard_utilities.py | jjc2718/netreg | 292540e911cdfbe18ff6fe0f9bfe8e055053d23c | [
"BSD-3-Clause"
] | null | null | null | utilities/jaccard_utilities.py | jjc2718/netreg | 292540e911cdfbe18ff6fe0f9bfe8e055053d23c | [
"BSD-3-Clause"
] | 6 | 2019-07-12T15:52:31.000Z | 2020-01-13T18:14:41.000Z | utilities/jaccard_utilities.py | jjc2718/netreg | 292540e911cdfbe18ff6fe0f9bfe8e055053d23c | [
"BSD-3-Clause"
] | 1 | 2019-07-18T18:28:59.000Z | 2019-07-18T18:28:59.000Z | import os
import itertools as it
import pandas as pd
def compute_jaccard(v1, v2):
v1, v2 = set(v1), set(v2)
intersection = v1.intersection(v2)
union = v1.union(v2)
return ((len(intersection) / len(union) if len(union) != 0 else 0),
len(intersection),
len(union))
def get_inter_m... | 44.466667 | 110 | 0.642054 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 56 | 0.02099 |
151aa06c987c92f779a676ea9b8988f697c25f28 | 2,600 | py | Python | CursoEmVideo/pythonProject/venv/Lib/site-packages/Interface/tests/unitfixtures.py | cassio645/Aprendendo-python | 17a8b5a0e7abc3342d24841ed28093db13d2c130 | [
"MIT"
] | null | null | null | CursoEmVideo/pythonProject/venv/Lib/site-packages/Interface/tests/unitfixtures.py | cassio645/Aprendendo-python | 17a8b5a0e7abc3342d24841ed28093db13d2c130 | [
"MIT"
] | null | null | null | CursoEmVideo/pythonProject/venv/Lib/site-packages/Interface/tests/unitfixtures.py | cassio645/Aprendendo-python | 17a8b5a0e7abc3342d24841ed28093db13d2c130 | [
"MIT"
] | null | null | null | ##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# T... | 22.033898 | 78 | 0.602308 | 1,517 | 0.583462 | 0 | 0 | 0 | 0 | 0 | 0 | 1,181 | 0.454231 |
151beeecee85f8f8f1854a4eb0eedf92f2702417 | 7,188 | py | Python | noise_robust_cobras/noise_robust/datastructures/cycle.py | jonassoenen/noise_robust_cobras | 0e5823dbba0263c3ccb3c2afb4267f2f542fc568 | [
"Apache-2.0"
] | 2 | 2020-07-30T15:09:53.000Z | 2020-07-31T06:33:36.000Z | noise_robust_cobras/noise_robust/datastructures/cycle.py | magicalJohn/noise_robust_cobras | 0e5823dbba0263c3ccb3c2afb4267f2f542fc568 | [
"Apache-2.0"
] | null | null | null | noise_robust_cobras/noise_robust/datastructures/cycle.py | magicalJohn/noise_robust_cobras | 0e5823dbba0263c3ccb3c2afb4267f2f542fc568 | [
"Apache-2.0"
] | 1 | 2021-12-12T11:11:25.000Z | 2021-12-12T11:11:25.000Z | from collections import defaultdict
from noise_robust_cobras.noise_robust.datastructures.constraint import Constraint
from noise_robust_cobras.noise_robust.datastructures.constraint_index import (
ConstraintIndex,
)
class Cycle:
"""
A class that represents a valid constraint cycle
attributes:... | 37.243523 | 128 | 0.657763 | 6,964 | 0.968837 | 0 | 0 | 2,784 | 0.387312 | 0 | 0 | 734 | 0.102115 |
151d22605d16726325dce1205b7a8ba505f35329 | 525 | py | Python | python3/hackerrank_leetcode/remove_duplicates_from_sorted_array/test.py | seLain/codesnippets | ae9a1fa05b67f4b3ac1703cc962fcf5f6de1e289 | [
"MIT"
] | null | null | null | python3/hackerrank_leetcode/remove_duplicates_from_sorted_array/test.py | seLain/codesnippets | ae9a1fa05b67f4b3ac1703cc962fcf5f6de1e289 | [
"MIT"
] | null | null | null | python3/hackerrank_leetcode/remove_duplicates_from_sorted_array/test.py | seLain/codesnippets | ae9a1fa05b67f4b3ac1703cc962fcf5f6de1e289 | [
"MIT"
] | null | null | null | import unittest
from main import Solution
class TestSolutionMethods(unittest.TestCase):
solution = Solution()
def test_longestCommonPrefix(self):
# leetcode test
self.assertEqual(self.solution.removeDuplicates([1,1,2]), 2)
# customized test
self.assertEqual(self.solution.remov... | 30.882353 | 72 | 0.693333 | 434 | 0.826667 | 0 | 0 | 0 | 0 | 0 | 0 | 42 | 0.08 |
12772bd26a04aaf3f825acfbb2e6f63963b94d81 | 246 | py | Python | 7KYU/word_splitter.py | yaznasivasai/python_codewars | 25493591dde4649dc9c1ec3bece8191a3bed6818 | [
"MIT"
] | 4 | 2021-07-17T22:48:03.000Z | 2022-03-25T14:10:58.000Z | 7KYU/word_splitter.py | yaznasivasai/python_codewars | 25493591dde4649dc9c1ec3bece8191a3bed6818 | [
"MIT"
] | null | null | null | 7KYU/word_splitter.py | yaznasivasai/python_codewars | 25493591dde4649dc9c1ec3bece8191a3bed6818 | [
"MIT"
] | 3 | 2021-06-14T14:18:16.000Z | 2022-03-16T06:02:02.000Z | SEPARATOR: list = [':', ',', '*', ';', '#', '|', '+', '%', '>', '?', '&', '=', '!']
def word_splitter(string: str) -> list:
for i in string:
if i in SEPARATOR:
string = string.replace(i, ' ')
return string.split()
| 35.142857 | 83 | 0.426829 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 42 | 0.170732 |
12781452042b292ed356843d47c2a5e60478909f | 7,998 | py | Python | parsers/sales_order.py | njncalub/logistiko | 74b1d17bc76538de6f5f70c7eca927780d6b4113 | [
"MIT"
] | null | null | null | parsers/sales_order.py | njncalub/logistiko | 74b1d17bc76538de6f5f70c7eca927780d6b4113 | [
"MIT"
] | null | null | null | parsers/sales_order.py | njncalub/logistiko | 74b1d17bc76538de6f5f70c7eca927780d6b4113 | [
"MIT"
] | null | null | null | import csv
from core.exceptions import InvalidFileException
def load_so_item_from_file(path, db_service):
with open(path) as csv_file:
csv_reader = csv.reader(csv_file)
error_msg = 'Missing required header: {}'
for i, row in enumerate(csv_reader, 1):
data = {
... | 46.77193 | 79 | 0.542136 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,240 | 0.28007 |
1278169f69007b0aff65ad2222788f61228ad8d6 | 8,342 | py | Python | maps.py | BouncyButton/places-simulator | a1f5fc385750af9968cc3c6216ba20f5de4719fd | [
"MIT"
] | null | null | null | maps.py | BouncyButton/places-simulator | a1f5fc385750af9968cc3c6216ba20f5de4719fd | [
"MIT"
] | null | null | null | maps.py | BouncyButton/places-simulator | a1f5fc385750af9968cc3c6216ba20f5de4719fd | [
"MIT"
] | null | null | null | import googlemaps
import secret
from datetime import datetime
import requests
import pickle
import time
gmaps = googlemaps.Client(key=secret.PLACES_API_KEY)
# lat = 45.411400
# lon = 11.887491
coordinates = [
(45.411400, 11.887491), # torre archimede
(45.409218, 11.877915), # piazza garibaldi
(45.407698... | 29.167832 | 121 | 0.609686 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,455 | 0.294118 |
12785f321ec0fa0181c3a4c19bc2048854ea35ad | 31,231 | py | Python | azure-iot-device/tests/iothub/test_sync_handler_manager.py | dt-boringtao/azure-iot-sdk-python | 35a09679bdf4d7a727391b265a8f1fbb99a30c45 | [
"MIT"
] | null | null | null | azure-iot-device/tests/iothub/test_sync_handler_manager.py | dt-boringtao/azure-iot-sdk-python | 35a09679bdf4d7a727391b265a8f1fbb99a30c45 | [
"MIT"
] | null | null | null | azure-iot-device/tests/iothub/test_sync_handler_manager.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 log... | 43.077241 | 170 | 0.700202 | 28,091 | 0.899459 | 3,839 | 0.122923 | 27,766 | 0.889053 | 0 | 0 | 10,436 | 0.334155 |
1278ee593e924b3273cd53898ff8735b235b993e | 885 | py | Python | src/python/Chameleon.Faas/demo/helloworld_grpc_client.py | sevenTiny/Seventiny.Cloud.ScriptEngine | dda66a7d2ec8c203823e07666314b9d0c8795768 | [
"Apache-2.0"
] | 2 | 2020-01-17T03:16:42.000Z | 2020-08-28T04:23:06.000Z | src/python/Chameleon.Faas/demo/helloworld_grpc_client.py | sevenTiny/Seventiny.Cloud.ScriptEngine | dda66a7d2ec8c203823e07666314b9d0c8795768 | [
"Apache-2.0"
] | null | null | null | src/python/Chameleon.Faas/demo/helloworld_grpc_client.py | sevenTiny/Seventiny.Cloud.ScriptEngine | dda66a7d2ec8c203823e07666314b9d0c8795768 | [
"Apache-2.0"
] | 1 | 2019-12-13T07:02:56.000Z | 2019-12-13T07:02:56.000Z | import grpc
import helloworld_pb2
import helloworld_pb2_grpc
from grpc.beta import implementations
def run():
# 连接 rpc 服务器
# TSL连接方式 >>>
with open('G:\\DotNet\\SevenTiny.Cloud.FaaS\\Code\\Python\\SevenTiny.Cloud.FaaS.GRpc\\ca\\client.pem', 'rb') as f:
pem = f.read()
creds = implementations.ssl... | 34.038462 | 118 | 0.701695 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 320 | 0.348205 |
1279a170c86c50a1d9aa504d29a7b4fbc15ef3a6 | 2,350 | py | Python | tools/pca_outcore.py | escorciav/deep-action-proposals | c14f512febc1abd0ec40bd3188a83e4ee3913535 | [
"MIT"
] | 28 | 2017-03-19T12:02:22.000Z | 2021-07-08T13:49:41.000Z | tools/pca_outcore.py | escorciav/deep-action-proposals | c14f512febc1abd0ec40bd3188a83e4ee3913535 | [
"MIT"
] | 2 | 2018-05-07T07:43:15.000Z | 2018-12-14T16:06:48.000Z | tools/pca_outcore.py | escorciav/deep-action-proposals | c14f512febc1abd0ec40bd3188a83e4ee3913535 | [
"MIT"
] | 7 | 2017-03-19T11:51:21.000Z | 2020-01-07T11:17:48.000Z | #!/usr/bin/env python
"""
PCA done via matrix multiplication out-of-core.
"""
import argparse
import time
import h5py
import hickle as hkl
import numpy as np
def input_parse():
description = 'Compute PCA with A.T * A computation out of core'
p = argparse.ArgumentParser(description=description)
p.add_ar... | 30.519481 | 73 | 0.609362 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 560 | 0.238298 |
127b202282fe9d7b819fac4de12d835378edbe4e | 5,680 | py | Python | azdev/params.py | marstr/azure-cli-dev-tools | 8b82b1867a425a9a017868c6c1aef2f4bb5aa62b | [
"MIT"
] | null | null | null | azdev/params.py | marstr/azure-cli-dev-tools | 8b82b1867a425a9a017868c6c1aef2f4bb5aa62b | [
"MIT"
] | null | null | null | azdev/params.py | marstr/azure-cli-dev-tools | 8b82b1867a425a9a017868c6c1aef2f4bb5aa62b | [
"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.
# -----------------------------------------------------------------------------
# ... | 67.619048 | 214 | 0.659859 | 28 | 0.00493 | 0 | 0 | 0 | 0 | 0 | 0 | 3,171 | 0.558275 |
127b40e7a10ad49a4f232756467391a18976528f | 1,968 | py | Python | gamry_parser/cv.py | bcliang/gamry-parser | c1dfcf73d973c88ee496f0aa256d99f642ab6013 | [
"MIT"
] | 6 | 2019-03-14T21:21:13.000Z | 2022-03-04T19:21:32.000Z | gamry_parser/cv.py | bcliang/gamry-parser | c1dfcf73d973c88ee496f0aa256d99f642ab6013 | [
"MIT"
] | 34 | 2019-03-11T04:21:51.000Z | 2022-01-10T21:45:38.000Z | gamry_parser/cv.py | bcliang/gamry-parser | c1dfcf73d973c88ee496f0aa256d99f642ab6013 | [
"MIT"
] | 5 | 2019-08-11T15:38:30.000Z | 2021-04-24T20:06:09.000Z | import gamry_parser as parser
class CyclicVoltammetry(parser.GamryParser):
"""Load a Cyclic Voltammetry experiment generated in Gamry EXPLAIN format."""
def get_v_range(self):
"""retrieve the programmed voltage scan ranges
Args:
None
Returns:
tuple, containin... | 29.373134 | 83 | 0.571646 | 1,935 | 0.983232 | 0 | 0 | 0 | 0 | 0 | 0 | 1,182 | 0.60061 |
127c2b5fae2468e39370fecece20d2e64788de00 | 11,609 | py | Python | comps.py | matthewb66/bdconsole | edc9a03f93dd782d58ff274ebe5152f7eccecff7 | [
"MIT"
] | null | null | null | comps.py | matthewb66/bdconsole | edc9a03f93dd782d58ff274ebe5152f7eccecff7 | [
"MIT"
] | null | null | null | comps.py | matthewb66/bdconsole | edc9a03f93dd782d58ff274ebe5152f7eccecff7 | [
"MIT"
] | null | null | null | import json
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
import pandas as pd
import dash_table
def get_comps_data(bd, projverurl):
print('Getting components ...')
# path = projverurl + "/components?limit=5000"
#
# custom_headers = {'Acc... | 41.460714 | 103 | 0.450168 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,606 | 0.396761 |
127c9e72b97842964045050d2c4c20f3d0a12a28 | 656 | py | Python | CursoemVideoPython/Desafio 35.py | Beebruna/Python | bdbe10ea76acca1b417f5960db0aae8be44e0af3 | [
"MIT"
] | null | null | null | CursoemVideoPython/Desafio 35.py | Beebruna/Python | bdbe10ea76acca1b417f5960db0aae8be44e0af3 | [
"MIT"
] | null | null | null | CursoemVideoPython/Desafio 35.py | Beebruna/Python | bdbe10ea76acca1b417f5960db0aae8be44e0af3 | [
"MIT"
] | null | null | null | '''
Desenvolva um programa que leia o comprimento de três retas e diga ao usuário se elas
podem ou não formar um triângulo.
'''
reta1 = float(input('Digite o comprimento da primeira reta: '))
reta2 = float(input('Digite o comprimento da segunda reta: '))
reta3 = float(input('Digite o comprimento da terceira reta: '))
... | 38.588235 | 85 | 0.689024 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 402 | 0.602699 |
127d60f439a2eeaeea97213b05b97e925b002613 | 15,790 | py | Python | osprofiler/tests/unit/drivers/test_ceilometer.py | charliebr30/osprofiler | cffca4e29e373e3f09f2ffdd458761183a851569 | [
"Apache-2.0"
] | null | null | null | osprofiler/tests/unit/drivers/test_ceilometer.py | charliebr30/osprofiler | cffca4e29e373e3f09f2ffdd458761183a851569 | [
"Apache-2.0"
] | 1 | 2017-04-15T22:16:06.000Z | 2017-04-15T22:16:06.000Z | osprofiler/tests/unit/drivers/test_ceilometer.py | shwsun/osprofiler | 46d29fc5ab8a4068217e399883f39cdd443a7500 | [
"Apache-2.0"
] | 1 | 2020-02-17T09:48:43.000Z | 2020-02-17T09:48:43.000Z | # Copyright 2016 Mirantis Inc.
# 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... | 37.240566 | 79 | 0.338252 | 15,058 | 0.953642 | 0 | 0 | 0 | 0 | 0 | 0 | 5,559 | 0.352058 |
127dce97d99e34df63ba730d1cd14233e203885a | 2,271 | py | Python | threshold.py | jiep/unicode-similarity | a32a031f96dce2b8a52a8ff4b5365c768c016fc6 | [
"MIT"
] | 1 | 2019-02-22T10:31:51.000Z | 2019-02-22T10:31:51.000Z | threshold.py | jiep/unicode-similarity | a32a031f96dce2b8a52a8ff4b5365c768c016fc6 | [
"MIT"
] | null | null | null | threshold.py | jiep/unicode-similarity | a32a031f96dce2b8a52a8ff4b5365c768c016fc6 | [
"MIT"
] | 1 | 2020-12-15T15:34:43.000Z | 2020-12-15T15:34:43.000Z | from pathlib import Path
import numpy as np
import pickle
import argparse
import errno
import sys
def file_exists(path):
return Path(path).is_file()
def dir_exists(path):
return Path(path).is_dir()
def remove_extension(x): return x.split('.')[0]
def print_error(type, file):
print(FileNotFoundError(e... | 28.037037 | 79 | 0.589608 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 344 | 0.151475 |
127def7299a4b8a5f141ed18533a55c708f10769 | 1,813 | py | Python | y2019/control_loops/python/wrist.py | Ewpratten/frc_971_mirror | 3a8a0c4359f284d29547962c2b4c43d290d8065c | [
"BSD-2-Clause"
] | null | null | null | y2019/control_loops/python/wrist.py | Ewpratten/frc_971_mirror | 3a8a0c4359f284d29547962c2b4c43d290d8065c | [
"BSD-2-Clause"
] | null | null | null | y2019/control_loops/python/wrist.py | Ewpratten/frc_971_mirror | 3a8a0c4359f284d29547962c2b4c43d290d8065c | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python
from aos.util.trapezoid_profile import TrapezoidProfile
from frc971.control_loops.python import control_loop
from frc971.control_loops.python import angular_system
from frc971.control_loops.python import controls
import copy
import numpy
import sys
from matplotlib import pylab
import gflags
import gl... | 24.835616 | 87 | 0.674021 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 314 | 0.173194 |
12810e363b2fde4bb2f563894e88d9b033fc5d56 | 2,666 | py | Python | utils/tools.py | alipay/Pyraformer | 84af4dbd93b7b96975b5034f0dde412005260123 | [
"Apache-2.0"
] | 7 | 2022-03-24T03:42:14.000Z | 2022-03-27T16:27:31.000Z | utils/tools.py | alipay/Pyraformer | 84af4dbd93b7b96975b5034f0dde412005260123 | [
"Apache-2.0"
] | 1 | 2022-03-17T08:54:42.000Z | 2022-03-17T08:54:42.000Z | utils/tools.py | alipay/Pyraformer | 84af4dbd93b7b96975b5034f0dde412005260123 | [
"Apache-2.0"
] | 1 | 2022-03-29T16:33:44.000Z | 2022-03-29T16:33:44.000Z | from torch.nn.modules import loss
import torch
import numpy as np
def MAE(pred, true):
return np.mean(np.abs(pred-true))
def MSE(pred, true):
return np.mean((pred-true)**2)
def RMSE(pred, true):
return np.sqrt(MSE(pred, true))
def MAPE(pred, true):
return np.mean(np.abs((pred - true) / true))
def ... | 28.361702 | 112 | 0.62003 | 1,876 | 0.703676 | 0 | 0 | 0 | 0 | 0 | 0 | 51 | 0.01913 |
1282bd510ec173d21c0fd86f0dd67b09824e394a | 2,772 | py | Python | .venv/lib/python3.8/site-packages/pandas/tests/indexes/timedeltas/test_shift.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 115 | 2020-06-18T15:00:58.000Z | 2022-03-02T10:13:19.000Z | .venv/lib/python3.8/site-packages/pandas/tests/indexes/timedeltas/test_shift.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 37 | 2020-10-20T08:30:53.000Z | 2020-12-22T13:15:45.000Z | .venv/lib/python3.8/site-packages/pandas/tests/indexes/timedeltas/test_shift.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 60 | 2020-07-22T14:53:10.000Z | 2022-03-23T10:17:59.000Z | import pytest
from pandas.errors import NullFrequencyError
import pandas as pd
from pandas import TimedeltaIndex
import pandas._testing as tm
class TestTimedeltaIndexShift:
# -------------------------------------------------------------
# TimedeltaIndex.shift is used by __add__/__sub__
def test_tdi_sh... | 35.538462 | 82 | 0.544372 | 2,625 | 0.94697 | 0 | 0 | 0 | 0 | 0 | 0 | 658 | 0.237374 |
1282edeb2a30864dc3a5aa0e406d5fae2795f292 | 1,974 | py | Python | webScraping/Instagram/2a_selenium_corriere.py | PythonBiellaGroup/MaterialeSerate | 58b45ecda7b9a8a298b9ca966d2806618a277372 | [
"MIT"
] | 12 | 2021-12-12T22:19:52.000Z | 2022-03-18T11:45:17.000Z | webScraping/Instagram/2a_selenium_corriere.py | PythonGroupBiella/MaterialeLezioni | 58b45ecda7b9a8a298b9ca966d2806618a277372 | [
"MIT"
] | 1 | 2022-03-23T13:58:33.000Z | 2022-03-23T14:05:08.000Z | webScraping/Instagram/2a_selenium_corriere.py | PythonGroupBiella/MaterialeLezioni | 58b45ecda7b9a8a298b9ca966d2806618a277372 | [
"MIT"
] | 5 | 2021-11-30T19:38:41.000Z | 2022-01-30T14:50:44.000Z | # use selenium to scrape headlines from corriere.it
# pip install selenium
from re import L
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.co... | 44.863636 | 258 | 0.766971 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,320 | 0.665994 |
1283922931293c1f0272600761d089b38ea78f4b | 2,033 | py | Python | stolos/tests/test_bin.py | sailthru/stolos | 7b74da527033b2da7f3ccd6d19ed6fb0245ea0fc | [
"Apache-2.0"
] | 121 | 2015-01-20T08:58:35.000Z | 2021-08-08T15:13:11.000Z | stolos/tests/test_bin.py | sailthru/stolos | 7b74da527033b2da7f3ccd6d19ed6fb0245ea0fc | [
"Apache-2.0"
] | 3 | 2015-01-20T22:19:49.000Z | 2016-02-10T10:48:11.000Z | stolos/tests/test_bin.py | sailthru/stolos | 7b74da527033b2da7f3ccd6d19ed6fb0245ea0fc | [
"Apache-2.0"
] | 20 | 2016-02-03T17:08:31.000Z | 2021-04-19T10:43:28.000Z | import os
from subprocess import check_output, CalledProcessError
from nose import tools as nt
from stolos import queue_backend as qb
from stolos.testing_tools import (
with_setup, validate_zero_queued_task, validate_one_queued_task,
validate_n_queued_task
)
def run(cmd, tasks_json_tmpfile, **kwargs):
cm... | 36.303571 | 75 | 0.713724 | 0 | 0 | 0 | 0 | 1,474 | 0.725037 | 0 | 0 | 262 | 0.128874 |
1283e6ee8cf196eb827ab2c20c8605ca98bca840 | 12,442 | py | Python | senlin/tests/unit/engine/actions/test_create.py | chenyb4/senlin | 8b9ec31566890dc9989fe08e221172d37c0451b4 | [
"Apache-2.0"
] | null | null | null | senlin/tests/unit/engine/actions/test_create.py | chenyb4/senlin | 8b9ec31566890dc9989fe08e221172d37c0451b4 | [
"Apache-2.0"
] | null | null | null | senlin/tests/unit/engine/actions/test_create.py | chenyb4/senlin | 8b9ec31566890dc9989fe08e221172d37c0451b4 | [
"Apache-2.0"
] | null | null | null | # 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 writing, software
# distributed unde... | 43.201389 | 79 | 0.60987 | 11,379 | 0.914564 | 0 | 0 | 11,418 | 0.917698 | 0 | 0 | 2,553 | 0.205192 |
12848f59193336131bb837186f98da6abb8ba010 | 1,665 | py | Python | tests/test_api.py | bh-chaker/wetterdienst | b0d51bb4c7392eb47834e4978e26882d74b22e35 | [
"MIT"
] | 155 | 2020-07-03T05:09:22.000Z | 2022-03-28T06:57:39.000Z | tests/test_api.py | bh-chaker/wetterdienst | b0d51bb4c7392eb47834e4978e26882d74b22e35 | [
"MIT"
] | 453 | 2020-07-02T21:21:52.000Z | 2022-03-31T21:35:36.000Z | tests/test_api.py | bh-chaker/wetterdienst | b0d51bb4c7392eb47834e4978e26882d74b22e35 | [
"MIT"
] | 21 | 2020-09-07T12:13:27.000Z | 2022-03-26T16:26:09.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2018-2021, earthobservations developers.
# Distributed under the MIT License. See LICENSE for more info.
import pytest
from wetterdienst import Wetterdienst
@pytest.mark.remote
@pytest.mark.parametrize(
"provider,kind,kwargs",
[
# German Weather Service (DWD)
... | 26.015625 | 79 | 0.587988 | 0 | 0 | 0 | 0 | 1,464 | 0.879279 | 0 | 0 | 763 | 0.458258 |
128572fd0692d7bc47b673410cce38c578481632 | 5,803 | py | Python | examples/sentence_embedding/task_sentence_embedding_sbert_unsupervised_TSDAE.py | Tongjilibo/bert4torch | 71d5ffb3698730b16e5a252b06644a136787711e | [
"MIT"
] | 49 | 2022-03-15T07:28:16.000Z | 2022-03-31T07:16:15.000Z | examples/sentence_embedding/task_sentence_embedding_sbert_unsupervised_TSDAE.py | Tongjilibo/bert4torch | 71d5ffb3698730b16e5a252b06644a136787711e | [
"MIT"
] | null | null | null | examples/sentence_embedding/task_sentence_embedding_sbert_unsupervised_TSDAE.py | Tongjilibo/bert4torch | 71d5ffb3698730b16e5a252b06644a136787711e | [
"MIT"
] | null | null | null | #! -*- coding:utf-8 -*-
# 语义相似度任务-无监督:训练集为网上pretrain数据, dev集为sts-b
from bert4torch.tokenizers import Tokenizer
from bert4torch.models import build_transformer_model, BaseModel
from bert4torch.snippets import sequence_padding, Callback, ListDataset
import torch.nn as nn
import torch
import torch.optim as optim
from to... | 37.681818 | 196 | 0.689988 | 2,319 | 0.385793 | 0 | 0 | 0 | 0 | 0 | 0 | 975 | 0.162203 |
12867ea275e82f412c64f544501dc211d18fb6b3 | 2,761 | py | Python | crowd_anki/export/anki_exporter_wrapper.py | katrinleinweber/CrowdAnki | c78d837e082365d69bde5b1361b1dd4d11cd3d63 | [
"MIT"
] | 391 | 2016-08-31T21:55:07.000Z | 2022-03-30T16:30:12.000Z | crowd_anki/export/anki_exporter_wrapper.py | katrinleinweber/CrowdAnki | c78d837e082365d69bde5b1361b1dd4d11cd3d63 | [
"MIT"
] | 150 | 2016-09-01T00:35:35.000Z | 2022-03-30T23:26:48.000Z | crowd_anki/export/anki_exporter_wrapper.py | katrinleinweber/CrowdAnki | c78d837e082365d69bde5b1361b1dd4d11cd3d63 | [
"MIT"
] | 51 | 2016-09-04T17:02:39.000Z | 2022-02-04T11:49:10.000Z | from pathlib import Path
from .anki_exporter import AnkiJsonExporter
from ..anki.adapters.anki_deck import AnkiDeck
from ..config.config_settings import ConfigSettings
from ..utils import constants
from ..utils.notifier import AnkiModalNotifier, Notifier
from ..utils.disambiguate_uuids import disambiguate_note_model_u... | 40.014493 | 139 | 0.680913 | 2,122 | 0.768562 | 0 | 0 | 0 | 0 | 0 | 0 | 666 | 0.241217 |
1286fbd5f6c9f344c50efdbd092dd4dcc7eb7bc9 | 1,086 | py | Python | shadow/apis/item.py | f1uzz/shadow | 0c2a1308f8bbe77ce4be005153148aac8ea0b4b2 | [
"MIT"
] | 1 | 2020-09-10T22:31:54.000Z | 2020-09-10T22:31:54.000Z | shadow/apis/item.py | f1uzz/shadow | 0c2a1308f8bbe77ce4be005153148aac8ea0b4b2 | [
"MIT"
] | 1 | 2020-03-12T15:47:14.000Z | 2020-09-11T18:46:44.000Z | shadow/apis/item.py | f1uzz/shadow | 0c2a1308f8bbe77ce4be005153148aac8ea0b4b2 | [
"MIT"
] | null | null | null | from functools import lru_cache
from typing import Optional
import requests
from .patches import Patches
class Item:
"""
Manipulation of static item data
"""
ITEM_URL = f"http://ddragon.leagueoflegends.com/cdn/{Patches.get_current_patch()}/data/en_US/item.json"
items = requests.get(ITEM_URL).js... | 25.255814 | 107 | 0.598527 | 977 | 0.899632 | 0 | 0 | 750 | 0.690608 | 0 | 0 | 440 | 0.405157 |
128751ef3f270c09dd8bfd854209616c9fbc00a9 | 2,694 | py | Python | tests/test_lmdb_eager.py | rjpower/tensorflow-io | 39aa0b46cfaa403121fdddbd491a03d2f3190a87 | [
"Apache-2.0"
] | null | null | null | tests/test_lmdb_eager.py | rjpower/tensorflow-io | 39aa0b46cfaa403121fdddbd491a03d2f3190a87 | [
"Apache-2.0"
] | null | null | null | tests/test_lmdb_eager.py | rjpower/tensorflow-io | 39aa0b46cfaa403121fdddbd491a03d2f3190a87 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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 applic... | 33.259259 | 80 | 0.655902 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,039 | 0.385672 |
128792253fac3bfe35e8e9d68865a244469d6f80 | 5,211 | py | Python | recbole/quick_start/quick_start.py | RuihongQiu/DuoRec | 4ebc30d8b7d9465f854867887b127a0bbc38bc31 | [
"MIT"
] | 16 | 2021-11-03T02:12:49.000Z | 2022-03-27T05:48:19.000Z | recbole/quick_start/quick_start.py | RuihongQiu/DuoRec | 4ebc30d8b7d9465f854867887b127a0bbc38bc31 | [
"MIT"
] | 2 | 2021-11-21T14:12:25.000Z | 2022-03-11T03:00:04.000Z | recbole/quick_start/quick_start.py | RuihongQiu/DuoRec | 4ebc30d8b7d9465f854867887b127a0bbc38bc31 | [
"MIT"
] | 4 | 2021-11-25T09:23:41.000Z | 2022-03-26T11:23:26.000Z | # @Time : 2020/10/6
# @Author : Shanlei Mu
# @Email : [email protected]
"""
recbole.quick_start
########################
"""
import logging
from logging import getLogger
from recbole.config import Config
from recbole.data import create_dataset, data_preparation
from recbole.utils import init_logger, get_model, get_t... | 35.209459 | 137 | 0.682978 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,749 | 0.335636 |
1287e0c57eb8a30f8e6d4ada3266d63abc50f722 | 4,947 | py | Python | inferlo/generic/inference/bucket_renormalization.py | InferLO/inferlo | a65efce721d7f99d2f274dd94a1aaf7ca159e944 | [
"Apache-2.0"
] | 1 | 2022-01-27T18:44:07.000Z | 2022-01-27T18:44:07.000Z | inferlo/generic/inference/bucket_renormalization.py | InferLO/inferlo | a65efce721d7f99d2f274dd94a1aaf7ca159e944 | [
"Apache-2.0"
] | 3 | 2022-01-23T18:02:30.000Z | 2022-01-27T23:10:51.000Z | inferlo/generic/inference/bucket_renormalization.py | InferLO/inferlo | a65efce721d7f99d2f274dd94a1aaf7ca159e944 | [
"Apache-2.0"
] | 1 | 2021-09-03T06:12:57.000Z | 2021-09-03T06:12:57.000Z | # Copyright (c) The InferLO authors. All rights reserved.
# Licensed under the Apache License, Version 2.0 - see LICENSE.
import warnings
import numpy as np
from sklearn.utils.extmath import randomized_svd
from .bucket_elimination import BucketElimination
from .factor import Factor, default_factor_name, produ... | 41.571429 | 80 | 0.595512 | 4,506 | 0.910855 | 0 | 0 | 0 | 0 | 0 | 0 | 392 | 0.07924 |
1287eefddb9d27db413d1feaac4d915eb6887055 | 5,519 | py | Python | oldcode/guestbook111013.py | mdreid/dinkylink | 34370633c9361f6625227440d4aca6ed2b57bfab | [
"MIT"
] | 1 | 2015-05-06T20:07:36.000Z | 2015-05-06T20:07:36.000Z | oldcode/guestbook111013.py | mdreid/dinkylink | 34370633c9361f6625227440d4aca6ed2b57bfab | [
"MIT"
] | null | null | null | oldcode/guestbook111013.py | mdreid/dinkylink | 34370633c9361f6625227440d4aca6ed2b57bfab | [
"MIT"
] | null | null | null | import os
import urllib
from google.appengine.api import users
from google.appengine.ext import ndb
import jinja2
import webapp2
from sys import argv
import datetime
import pickle
import sys
sys.path.insert(0, 'libs')
import BeautifulSoup
from bs4 import BeautifulSoup
import requests
import json
JINJA_ENVIRONM... | 31.901734 | 181 | 0.698315 | 1,885 | 0.341547 | 0 | 0 | 0 | 0 | 0 | 0 | 1,792 | 0.324697 |
1289c37f5bf5c6f565d40cc79d0b3cb7b6862bc0 | 4,482 | py | Python | is_core/tests/crawler.py | zzuzzy/django-is-core | 3f87ec56a814738683c732dce5f07e0328c2300d | [
"BSD-3-Clause"
] | null | null | null | is_core/tests/crawler.py | zzuzzy/django-is-core | 3f87ec56a814738683c732dce5f07e0328c2300d | [
"BSD-3-Clause"
] | null | null | null | is_core/tests/crawler.py | zzuzzy/django-is-core | 3f87ec56a814738683c732dce5f07e0328c2300d | [
"BSD-3-Clause"
] | null | null | null | import json
from django.utils.encoding import force_text
from germanium.tools import assert_true, assert_not_equal
from germanium.test_cases.client import ClientTestCase
from germanium.decorators import login
from germanium.crawler import Crawler, LinkExtractor, HtmlLinkExtractor as OriginalHtmlLinkExtractor
def fl... | 34.744186 | 118 | 0.594378 | 3,929 | 0.876618 | 0 | 0 | 1,730 | 0.385988 | 0 | 0 | 574 | 0.128068 |
1289e9a1e3edba91a08623829d6f72757cbc5c8d | 136 | py | Python | example/geometry/admin.py | emelianovss-yandex-praktikum/07_pyplus_django_2 | 09bda00f9c8e9fd1ff0f3a483ecb210041d19a48 | [
"MIT"
] | null | null | null | example/geometry/admin.py | emelianovss-yandex-praktikum/07_pyplus_django_2 | 09bda00f9c8e9fd1ff0f3a483ecb210041d19a48 | [
"MIT"
] | null | null | null | example/geometry/admin.py | emelianovss-yandex-praktikum/07_pyplus_django_2 | 09bda00f9c8e9fd1ff0f3a483ecb210041d19a48 | [
"MIT"
] | 2 | 2021-11-27T08:06:35.000Z | 2021-11-27T13:52:41.000Z | from django.contrib import admin
from geometry.models import Shape
@admin.register(Shape)
class AdminShape(admin.ModelAdmin):
...
| 17 | 35 | 0.772059 | 43 | 0.316176 | 0 | 0 | 66 | 0.485294 | 0 | 0 | 0 | 0 |
128a2d7a634e13b30d2d38fc5ac9815e890ebcfe | 943 | py | Python | demo2/demo2_consume2.py | YuYanzy/kafka-python-demo | fc01ac29230b41fe1821f6e5a9d7226dea9688fe | [
"Apache-2.0"
] | 3 | 2021-05-07T01:48:37.000Z | 2021-09-24T20:53:51.000Z | demo2/demo2_consume2.py | YuYanzy/kafka-python-demo | fc01ac29230b41fe1821f6e5a9d7226dea9688fe | [
"Apache-2.0"
] | null | null | null | demo2/demo2_consume2.py | YuYanzy/kafka-python-demo | fc01ac29230b41fe1821f6e5a9d7226dea9688fe | [
"Apache-2.0"
] | 1 | 2021-05-08T08:46:01.000Z | 2021-05-08T08:46:01.000Z | # -*- coding: utf-8 -*-
# @Author : Ecohnoch(xcy)
# @File : demo2_consume.py
# @Function : TODO
import kafka
demo2_config = {
'kafka_host': 'localhost:9092',
'kafka_topic': 'demo2',
'kafka_group_id': 'demo2_group1'
}
def consume():
consumer = kafka.KafkaConsumer(demo2_config['kafka_topic'],
... | 29.46875 | 118 | 0.604454 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 354 | 0.375398 |
128a56c54e5b4a6dbabdff93bd337ad93578a5cd | 2,280 | py | Python | autoscalingsim/scaling/scaling_model/scaling_model.py | Remit/autoscaling-simulator | 091943c0e9eedf9543e9305682a067ab60f56def | [
"MIT"
] | 6 | 2021-03-10T16:23:10.000Z | 2022-01-14T04:57:46.000Z | autoscalingsim/scaling/scaling_model/scaling_model.py | Remit/autoscaling-simulator | 091943c0e9eedf9543e9305682a067ab60f56def | [
"MIT"
] | null | null | null | autoscalingsim/scaling/scaling_model/scaling_model.py | Remit/autoscaling-simulator | 091943c0e9eedf9543e9305682a067ab60f56def | [
"MIT"
] | 1 | 2022-01-14T04:57:55.000Z | 2022-01-14T04:57:55.000Z | import json
import pandas as pd
from .application_scaling_model import ApplicationScalingModel
from .platform_scaling_model import PlatformScalingModel
from autoscalingsim.deltarepr.group_of_services_delta import GroupOfServicesDelta
from autoscalingsim.deltarepr.node_group_delta import NodeGroupDelta
from autoscali... | 43.018868 | 124 | 0.744298 | 1,914 | 0.839474 | 0 | 0 | 0 | 0 | 0 | 0 | 502 | 0.220175 |
128b3b5e8ee085ddcb7d0e7d01778d05032f8030 | 1,662 | py | Python | src/zojax/filefield/copy.py | Zojax/zojax.filefield | 36d92242dffbd5a7b4ce3c6886d8d5898067245a | [
"ZPL-2.1"
] | null | null | null | src/zojax/filefield/copy.py | Zojax/zojax.filefield | 36d92242dffbd5a7b4ce3c6886d8d5898067245a | [
"ZPL-2.1"
] | null | null | null | src/zojax/filefield/copy.py | Zojax/zojax.filefield | 36d92242dffbd5a7b4ce3c6886d8d5898067245a | [
"ZPL-2.1"
] | null | null | null | ##############################################################################
#
# Copyright (c) 2009 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | 29.157895 | 78 | 0.642599 | 0 | 0 | 0 | 0 | 860 | 0.517449 | 0 | 0 | 636 | 0.382671 |
128cfb0881a4cb2a09e645ca55b7c92a498aaab7 | 192 | py | Python | verbose.py | lowrey/myjsonstore | 4d47f147fa5d86bea5d4e9b0bcab567583a794af | [
"MIT"
] | 1 | 2018-07-30T14:17:25.000Z | 2018-07-30T14:17:25.000Z | verbose.py | lowrey/myjsonstore | 4d47f147fa5d86bea5d4e9b0bcab567583a794af | [
"MIT"
] | null | null | null | verbose.py | lowrey/myjsonstore | 4d47f147fa5d86bea5d4e9b0bcab567583a794af | [
"MIT"
] | null | null | null | import sys
verbose = False
def set_v(v):
global verbose
verbose = v
def print_v(s):
if verbose:
print(s)
def write_v(s):
if verbose:
sys.stdout.write(s)
| 10.105263 | 27 | 0.583333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
128d0ee6d357971754e6aa9345f8db462e223612 | 1,087 | py | Python | app/component_b/command/services.py | mirevsky/django-grpc-cqrs-kafka-template | 31af0bf5d15e393837f937cace90f82a7de26355 | [
"MIT"
] | 2 | 2022-01-10T19:52:36.000Z | 2022-03-19T07:34:54.000Z | app/component_b/command/services.py | mirevsky/django-grpc-cqrs-kafka-template | 31af0bf5d15e393837f937cace90f82a7de26355 | [
"MIT"
] | null | null | null | app/component_b/command/services.py | mirevsky/django-grpc-cqrs-kafka-template | 31af0bf5d15e393837f937cace90f82a7de26355 | [
"MIT"
] | null | null | null | import grpc
from google.protobuf import empty_pb2
from django_grpc_framework.services import Service
from component_b.common.serializers import PersonProtoSerializer
from component_b.common.models import PersonModel
class PersonCommandService(Service):
def get_object(self, pk):
try:
return P... | 31.970588 | 84 | 0.706532 | 867 | 0.797608 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 0.018399 |
128d2e658f8131c779045c3cbeaae1830ec9ef68 | 485 | py | Python | Lab 5/course_reader.py | kq4hy/CS3240-Lab-Files | 2611c3185a405da95547434825da9052cd4c6cec | [
"MIT"
] | null | null | null | Lab 5/course_reader.py | kq4hy/CS3240-Lab-Files | 2611c3185a405da95547434825da9052cd4c6cec | [
"MIT"
] | null | null | null | Lab 5/course_reader.py | kq4hy/CS3240-Lab-Files | 2611c3185a405da95547434825da9052cd4c6cec | [
"MIT"
] | null | null | null | __author__ = 'kq4hy'
import csv
import sqlite3
def load_course_database(db_name, csv_filename):
conn = sqlite3.connect(db_name)
with conn:
curs = conn.cursor()
with open(csv_filename, 'rU') as csvfile:
reader = csv.reader(csvfile)
for row in reader:
sql... | 28.529412 | 78 | 0.610309 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 100 | 0.206186 |
128e53da4b600437f498e3a40b34bc75e174bc07 | 117 | py | Python | marshmallow_helpers/__init__.py | hilearn/marsh-enum | 2003ed850b076cd9d29a340ee44abe1c73aadc66 | [
"MIT"
] | null | null | null | marshmallow_helpers/__init__.py | hilearn/marsh-enum | 2003ed850b076cd9d29a340ee44abe1c73aadc66 | [
"MIT"
] | null | null | null | marshmallow_helpers/__init__.py | hilearn/marsh-enum | 2003ed850b076cd9d29a340ee44abe1c73aadc66 | [
"MIT"
] | null | null | null | from .enum_field import EnumField, RegisteredEnum # noqa
from .marsh_schema import attr_with_schema, derive # noqa
| 39 | 58 | 0.811966 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.102564 |
128e7777e186dad8ff8ca443386abd102aa7f54e | 1,492 | py | Python | Weather Station using DHT Sensor with Raspberry Pi and ThingSpeak Platform/Weather Station - ThingSpeak - Raspberry Pi.py | MeqdadDev/ai-robotics-cv-iot-mini-projects | 0c591bc495c95aa95d436e51f38e55bf510349ac | [
"MIT"
] | null | null | null | Weather Station using DHT Sensor with Raspberry Pi and ThingSpeak Platform/Weather Station - ThingSpeak - Raspberry Pi.py | MeqdadDev/ai-robotics-cv-iot-mini-projects | 0c591bc495c95aa95d436e51f38e55bf510349ac | [
"MIT"
] | null | null | null | Weather Station using DHT Sensor with Raspberry Pi and ThingSpeak Platform/Weather Station - ThingSpeak - Raspberry Pi.py | MeqdadDev/ai-robotics-cv-iot-mini-projects | 0c591bc495c95aa95d436e51f38e55bf510349ac | [
"MIT"
] | 1 | 2022-03-29T07:41:23.000Z | 2022-03-29T07:41:23.000Z | '''
IoT Mini Project
Weather Station using DHT Sensor and Raspberry Pi with ThingSpeak Platform
Code Sample: Interfacing DHT22 with Raspberry Pi and sending the data to an IoT Platform (ThingSpeak Platform)
'''
from time import sleep
# import Adafruit_DHT # Not supported library
import adafruit_dht
from board import *... | 29.84 | 110 | 0.690349 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 749 | 0.501674 |
128e873ecfed93a46701bf97c5bfb7c6ee49fa55 | 931 | py | Python | Demo2_PageObjectModel/features/steps/PageObject_Registration.py | imademethink/imademethink_python_selenium_demo | cc364bda00e75eb9115c680ddea5e2fbca1d7acb | [
"BSD-4-Clause"
] | 2 | 2019-04-05T05:09:14.000Z | 2020-07-21T16:06:53.000Z | Demo2_PageObjectModel/features/steps/PageObject_Registration.py | imademethink/Python_Selenium_Demo | cc364bda00e75eb9115c680ddea5e2fbca1d7acb | [
"BSD-4-Clause"
] | 1 | 2020-01-08T08:15:42.000Z | 2020-01-08T08:15:42.000Z | Demo2_PageObjectModel/features/steps/PageObject_Registration.py | imademethink/Python_Selenium_Demo | cc364bda00e75eb9115c680ddea5e2fbca1d7acb | [
"BSD-4-Clause"
] | 4 | 2018-04-13T08:28:53.000Z | 2018-12-30T20:35:19.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import time
from page_objects import PageObject, PageElement
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.common.by import By
delay_mi... | 35.807692 | 128 | 0.784103 | 553 | 0.593985 | 0 | 0 | 0 | 0 | 0 | 0 | 138 | 0.148228 |
128eba5345a78af068fb819342cfe180d8d296fd | 53 | py | Python | Tests/TestData/HOSimulation/HOTrialWavefunction/config.py | McCoyGroup/RynLib | 8d7e119ebbd3da4c8b0efb49facba9ff1cbaa09d | [
"MIT"
] | 1 | 2019-05-04T00:34:11.000Z | 2019-05-04T00:34:11.000Z | Tests/TestData/HOSimulation/HOTrialWavefunction/config.py | McCoyGroup/RynLib | 8d7e119ebbd3da4c8b0efb49facba9ff1cbaa09d | [
"MIT"
] | null | null | null | Tests/TestData/HOSimulation/HOTrialWavefunction/config.py | McCoyGroup/RynLib | 8d7e119ebbd3da4c8b0efb49facba9ff1cbaa09d | [
"MIT"
] | 1 | 2020-03-04T22:47:09.000Z | 2020-03-04T22:47:09.000Z |
config = dict(
module="HOTrialWavefunction.py"
) | 13.25 | 35 | 0.698113 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.45283 |
128f728bec79cfe03c54bf8f06695117449e7c5a | 5,771 | py | Python | python/ucloud/import_data.py | oldthreefeng/miscellany | 8d3c7a14b53929d752c7356c85ae6681000cd526 | [
"MIT"
] | 1 | 2019-01-04T07:44:08.000Z | 2019-01-04T07:44:08.000Z | python/ucloud/import_data.py | oldthreefeng/miscellany | 8d3c7a14b53929d752c7356c85ae6681000cd526 | [
"MIT"
] | null | null | null | python/ucloud/import_data.py | oldthreefeng/miscellany | 8d3c7a14b53929d752c7356c85ae6681000cd526 | [
"MIT"
] | 2 | 2018-12-10T12:55:38.000Z | 2019-01-04T07:43:55.000Z | #!/usr/bin/python2
import sys
import os
import redis
import time
import datetime
string_keys = []
hash_keys = []
list_keys = []
set_keys = []
zset_keys = []
def import_string(source, dest):
print "Begin Import String Type"
keys_count = len(string_keys)
print "String Key Count is:", keys_count
pipeSrc... | 30.21466 | 83 | 0.562468 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 624 | 0.108127 |
128ffa30d0305f7d87c64ef11d99dcfb6d3e311f | 5,990 | py | Python | kinlin/core/strategy.py | the-lay/kinlin | ce7c95d46d130049e356104ba77fad51bc59fb3f | [
"MIT"
] | null | null | null | kinlin/core/strategy.py | the-lay/kinlin | ce7c95d46d130049e356104ba77fad51bc59fb3f | [
"MIT"
] | null | null | null | kinlin/core/strategy.py | the-lay/kinlin | ce7c95d46d130049e356104ba77fad51bc59fb3f | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import numpy as np
from enum import Enum
from typing import List, Callable, Any
from tqdm import tqdm
from .model import Model
from .dataset import Dataset
from .experiment import Experiment
from .callback import Callback
class TrainingEvents(Enum):
START = 'on_start'
FINIS... | 40.748299 | 119 | 0.645576 | 5,724 | 0.955593 | 0 | 0 | 0 | 0 | 0 | 0 | 1,050 | 0.175292 |
1290da62e7e73de3c4c75ef861a9d5a9bcbe1f4b | 2,924 | py | Python | tests/test_utils.py | jamesmcclain/pystac | 993b54f5a10b0d55db18dbda81c5ad7acc06d921 | [
"Apache-2.0"
] | 1 | 2018-08-04T05:24:58.000Z | 2018-08-04T05:24:58.000Z | tests/test_utils.py | jamesmcclain/pystac | 993b54f5a10b0d55db18dbda81c5ad7acc06d921 | [
"Apache-2.0"
] | 4 | 2017-12-11T22:15:44.000Z | 2018-06-15T15:20:34.000Z | tests/test_utils.py | jamesmcclain/pystac | 993b54f5a10b0d55db18dbda81c5ad7acc06d921 | [
"Apache-2.0"
] | 5 | 2018-06-15T14:51:50.000Z | 2019-08-22T05:33:55.000Z | import unittest
from pystac.utils import (make_relative_href, make_absolute_href,
is_absolute_href)
class UtilsTest(unittest.TestCase):
def test_make_relative_href(self):
# Test cases of (source_href, start_href, expected)
test_cases = [
('/a/b/c/d/catalog.js... | 46.412698 | 77 | 0.548906 | 2,794 | 0.95554 | 0 | 0 | 0 | 0 | 0 | 0 | 1,474 | 0.504104 |
1290db3be5d147e6281013adc1419767bcf94d89 | 1,322 | py | Python | services/web/manage.py | EMBEDDIA/ULR_NER_REST | 520accbced155a43543969f8a0a96a02c0b2d46d | [
"MIT"
] | null | null | null | services/web/manage.py | EMBEDDIA/ULR_NER_REST | 520accbced155a43543969f8a0a96a02c0b2d46d | [
"MIT"
] | 3 | 2020-04-24T11:38:40.000Z | 2021-12-03T09:01:17.000Z | services/web/manage.py | EMBEDDIA/ULR_NER_REST | 520accbced155a43543969f8a0a96a02c0b2d46d | [
"MIT"
] | null | null | null | # Copyright (c) 2020 Michael Herman
# Copyright (c) 2020 Vid Podpečan
# 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, copy... | 45.586207 | 96 | 0.781392 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,140 | 0.861678 |
12916103d8a5f146e7baa8906defb115aac95a11 | 5,737 | py | Python | GUI/PopUps/ExportPopUp.py | iagerogiannis/Image_to_plot | 15c01c50dcd23dfd187069145b3f2fdc06ed73a9 | [
"BSD-3-Clause"
] | null | null | null | GUI/PopUps/ExportPopUp.py | iagerogiannis/Image_to_plot | 15c01c50dcd23dfd187069145b3f2fdc06ed73a9 | [
"BSD-3-Clause"
] | null | null | null | GUI/PopUps/ExportPopUp.py | iagerogiannis/Image_to_plot | 15c01c50dcd23dfd187069145b3f2fdc06ed73a9 | [
"BSD-3-Clause"
] | null | null | null | from PyQt5.QtWidgets import QDialog, QPushButton, QVBoxLayout, QComboBox, QGroupBox, QCheckBox, QGridLayout, QMessageBox, QRadioButton
from GUI.CustomWidgets.PathFileLineEdit import PathFileLineEdit
from GUI.CustomWidgets.InputField import InputField
class ExportPopUp(QDialog):
def __init__(self, parent):
... | 40.401408 | 134 | 0.656092 | 5,483 | 0.955726 | 0 | 0 | 0 | 0 | 0 | 0 | 399 | 0.069549 |
1291ab8aed0db6cb7b1e8e05e5e25b1e6da39aea | 7,993 | py | Python | cwltool/update.py | PlatformedTasks/PLAS-cwl-tes | 5e66a5f9309906d1e8caa0f7148b8517a17f840d | [
"Apache-2.0"
] | null | null | null | cwltool/update.py | PlatformedTasks/PLAS-cwl-tes | 5e66a5f9309906d1e8caa0f7148b8517a17f840d | [
"Apache-2.0"
] | null | null | null | cwltool/update.py | PlatformedTasks/PLAS-cwl-tes | 5e66a5f9309906d1e8caa0f7148b8517a17f840d | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
import copy
import re
from typing import (Any, Callable, Dict, List, MutableMapping, MutableSequence,
Optional, Tuple, Union)
from functools import partial
from ruamel.yaml.comments import CommentedMap, CommentedSeq
from schema_salad import validate
from sch... | 39.181373 | 116 | 0.600025 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,832 | 0.35431 |
129258b78096fc56ca7d44ecd92404b8c97448a2 | 2,072 | py | Python | plottify/plottify.py | neutrinoceros/plottify | 21f4858dabe1228559a8beb385f134ccfb25321e | [
"MIT"
] | null | null | null | plottify/plottify.py | neutrinoceros/plottify | 21f4858dabe1228559a8beb385f134ccfb25321e | [
"MIT"
] | null | null | null | plottify/plottify.py | neutrinoceros/plottify | 21f4858dabe1228559a8beb385f134ccfb25321e | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
from matplotlib import collections
from matplotlib.lines import Line2D
def autosize(fig=None, figsize=None):
## Take current figure if no figure provided
if fig is None:
fig = plt.gcf()
if figsize is None:
## Get size of figure
figsize = fig.get_s... | 26.227848 | 87 | 0.598456 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 282 | 0.1361 |
12928ccd7dc4a56b7be40e6eb4668aed89dd266b | 8,546 | py | Python | ocular_algorithm/0x04_BasicRecurrenceAndRecursion.py | DistinctWind/ManimProjects | 6318643afcc24574cbd9a0a45ff0d913d4711b13 | [
"MIT"
] | 2 | 2020-03-15T01:27:09.000Z | 2020-03-20T02:08:09.000Z | ocular_algorithm/0x04_BasicRecurrenceAndRecursion.py | DistinctWind/ManimProjects | 6318643afcc24574cbd9a0a45ff0d913d4711b13 | [
"MIT"
] | null | null | null | ocular_algorithm/0x04_BasicRecurrenceAndRecursion.py | DistinctWind/ManimProjects | 6318643afcc24574cbd9a0a45ff0d913d4711b13 | [
"MIT"
] | null | null | null | from re import S
from manimlib import *
import sys
import os
from tqdm.std import tqdm
sys.path.append(os.getcwd())
from utils.imports import *
class Opening(Scene):
def construct(self):
title = Text("基础递推递归", font='msyh')
self.play(Write(title), run_time=2)
self.wait()
self.pla... | 32.371212 | 121 | 0.589165 | 8,412 | 0.97905 | 0 | 0 | 0 | 0 | 0 | 0 | 567 | 0.065992 |
1292ffb60fd870f5e14b52506ec687c6761bed39 | 299 | py | Python | utility.py | Ming-desu/POKEMING | 2def3b47e7c08b71885f14944bffe105a63cc12a | [
"MIT"
] | null | null | null | utility.py | Ming-desu/POKEMING | 2def3b47e7c08b71885f14944bffe105a63cc12a | [
"MIT"
] | null | null | null | utility.py | Ming-desu/POKEMING | 2def3b47e7c08b71885f14944bffe105a63cc12a | [
"MIT"
] | null | null | null | # POKEMING - GON'NA CATCH 'EM ALL
# -- A simple hack 'n slash game in console
# -- This class is handles all utility related things
class Utility:
# This allows to see important message of the game
def pause(message):
print(message)
input('Press any key to continue.') | 37.375 | 55 | 0.665552 | 164 | 0.548495 | 0 | 0 | 0 | 0 | 0 | 0 | 211 | 0.705686 |
12932a6f23a6e9331d41a53f62dfc3d9f6482d92 | 2,057 | py | Python | gpv2/data/lessons/mil.py | michalsr/gpv2 | 00a22b311dbaeefb04e1df676eb6ae3373d8d4b5 | [
"Apache-2.0"
] | null | null | null | gpv2/data/lessons/mil.py | michalsr/gpv2 | 00a22b311dbaeefb04e1df676eb6ae3373d8d4b5 | [
"Apache-2.0"
] | null | null | null | gpv2/data/lessons/mil.py | michalsr/gpv2 | 00a22b311dbaeefb04e1df676eb6ae3373d8d4b5 | [
"Apache-2.0"
] | null | null | null | import logging
import sys
from typing import Union, Optional, Dict, Any, List
from dataclasses import dataclass, replace
from exp.ours import file_paths
from exp.ours.boosting import MaskSpec
from exp.ours.data.dataset import Dataset, Task
from exp.ours.data.gpv_example import GPVExample
from exp.ours.models.model im... | 21.206186 | 76 | 0.701507 | 556 | 0.270297 | 0 | 0 | 592 | 0.287798 | 0 | 0 | 506 | 0.245989 |
12932d615b9cdc4848ccdf491cf3ec6f30e667d0 | 6,968 | py | Python | creel_portal/api/filters/FN024_Filter.py | AdamCottrill/CreelPortal | 5ec867c4f11b4231c112e8209116b6b96c2830ec | [
"MIT"
] | null | null | null | creel_portal/api/filters/FN024_Filter.py | AdamCottrill/CreelPortal | 5ec867c4f11b4231c112e8209116b6b96c2830ec | [
"MIT"
] | null | null | null | creel_portal/api/filters/FN024_Filter.py | AdamCottrill/CreelPortal | 5ec867c4f11b4231c112e8209116b6b96c2830ec | [
"MIT"
] | null | null | null | import django_filters
from ...models import FN024
from .filter_utils import NumberInFilter, ValueInFilter
class FN024SubFilter(django_filters.FilterSet):
"""A fitlerset that allows us to select subsets of net set objects by
net set attributes."""
prd = ValueInFilter(field_name="prd")
prd__not = Valu... | 33.180952 | 87 | 0.695896 | 6,855 | 0.983783 | 0 | 0 | 0 | 0 | 0 | 0 | 2,149 | 0.30841 |
1295c606d9e77831f602309b8cf0e51374c22061 | 7,148 | py | Python | modules/utils.py | PaulLerner/deep_parkinson_handwriting | 806f34eaa6c5dde2a8230a07615c69e0873c0535 | [
"MIT"
] | 2 | 2021-01-19T02:47:32.000Z | 2021-05-20T08:29:36.000Z | modules/utils.py | PaulLerner/deep_parkinson_handwriting | 806f34eaa6c5dde2a8230a07615c69e0873c0535 | [
"MIT"
] | null | null | null | modules/utils.py | PaulLerner/deep_parkinson_handwriting | 806f34eaa6c5dde2a8230a07615c69e0873c0535 | [
"MIT"
] | 2 | 2021-01-23T18:20:19.000Z | 2021-08-09T03:53:32.000Z | import numpy as np
from time import time
import matplotlib.pyplot as plt
measure2index={"y-coordinate":0,"x-coordinate":1,"timestamp":2, "button_status":3,"tilt":4, "elevation":5,"pressure":6}
index2measure=list(measure2index.keys())
task2index={"spiral":0,"l":1,"le":2 ,"les":3,"lektorka" :4,"porovnat":5,"nepopadnout... | 42.047059 | 133 | 0.663123 | 0 | 0 | 163 | 0.022794 | 0 | 0 | 0 | 0 | 1,552 | 0.217033 |
1296326732d0f3f0616b1b674348b31dbce55859 | 574 | py | Python | Mundo2/Desafio039.py | Marcoakira/Desafios_Python_do_Curso_Guanabara | c49b774148a2232f8f3c21b83e3dc97610480757 | [
"MIT"
] | null | null | null | Mundo2/Desafio039.py | Marcoakira/Desafios_Python_do_Curso_Guanabara | c49b774148a2232f8f3c21b83e3dc97610480757 | [
"MIT"
] | null | null | null | Mundo2/Desafio039.py | Marcoakira/Desafios_Python_do_Curso_Guanabara | c49b774148a2232f8f3c21b83e3dc97610480757 | [
"MIT"
] | null | null | null | import datetime
datenasc = int(input(f'insert you date of bit '))
atualdate = str(datetime.date.today())[0:4]
datestr = int(atualdate)
datefinal = datestr - datenasc
print(datefinal)
if datefinal < 18:
print(f'voce esta com {datefinal}Faltam {18-datefinal} pra você se alistar ao exercito hahahah' )
elif datefinal =... | 41 | 101 | 0.728223 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 329 | 0.566265 |
1296680de0a376242d8b5859461295d893d5f13c | 4,180 | py | Python | local_test/test_pullparser.py | rmoskal/e-springpad | d2c1dfbae63a29737d9cfdee571704b7a5e85bd5 | [
"MIT"
] | 1 | 2017-01-10T17:12:25.000Z | 2017-01-10T17:12:25.000Z | local_test/test_pullparser.py | rmoskal/e-springpad | d2c1dfbae63a29737d9cfdee571704b7a5e85bd5 | [
"MIT"
] | null | null | null | local_test/test_pullparser.py | rmoskal/e-springpad | d2c1dfbae63a29737d9cfdee571704b7a5e85bd5 | [
"MIT"
] | null | null | null | __author__ = 'rob'
import unittest
import logging
import evernotebookparser
from xml.etree import ElementTree
import re
class TestNotebookParser(unittest.TestCase):
def setUp(self):
self.o = evernotebookparser.NotebookParser2("../Quotes.enex")
def test_parsing2(self):
results... | 32.403101 | 157 | 0.570335 | 4,039 | 0.966268 | 0 | 0 | 0 | 0 | 0 | 0 | 818 | 0.195694 |
1296f3adb86af7c4bde450922af6cd40c775ef6d | 6,872 | py | Python | test/test_sysroot_compiler.py | prajakta-gokhale/cross_compile | cbdc94ed5b25d6fc336aa5c0faa2838d9ce61db4 | [
"Apache-2.0"
] | null | null | null | test/test_sysroot_compiler.py | prajakta-gokhale/cross_compile | cbdc94ed5b25d6fc336aa5c0faa2838d9ce61db4 | [
"Apache-2.0"
] | null | null | null | test/test_sysroot_compiler.py | prajakta-gokhale/cross_compile | cbdc94ed5b25d6fc336aa5c0faa2838d9ce61db4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Amazon.com, Inc. or its affiliates. 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 require... | 37.551913 | 88 | 0.721478 | 0 | 0 | 0 | 0 | 273 | 0.039726 | 0 | 0 | 2,698 | 0.392608 |
1297e5fb738245835e074daab17948395423d0ba | 2,083 | py | Python | estimate.py | farr/galmassproxy | f4a1c7acc19d130a6f57030bceef03c993a7170c | [
"MIT"
] | null | null | null | estimate.py | farr/galmassproxy | f4a1c7acc19d130a6f57030bceef03c993a7170c | [
"MIT"
] | null | null | null | estimate.py | farr/galmassproxy | f4a1c7acc19d130a6f57030bceef03c993a7170c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
r"""estimate.py
Use to estimate masses based on observed proxy values (and associated
errors) from a pre-calibrated generative model for the mass-proxy
relationship. The estimates will be returned as samples (fair draws)
from the model's posterior on the mass given the proxy observation.
This p... | 30.632353 | 106 | 0.683629 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 873 | 0.419107 |
129824738bfae0f0fbd02b667cf74972ac9ca42e | 143 | py | Python | scripts/python/printings.py | samk-ai/cmd-tools-course-materials | fa3615df7ae70bbc701661bdeef588cbbf17be97 | [
"MIT"
] | null | null | null | scripts/python/printings.py | samk-ai/cmd-tools-course-materials | fa3615df7ae70bbc701661bdeef588cbbf17be97 | [
"MIT"
] | null | null | null | scripts/python/printings.py | samk-ai/cmd-tools-course-materials | fa3615df7ae70bbc701661bdeef588cbbf17be97 | [
"MIT"
] | null | null | null | str1 = "Python"
str2 = "Python"
print("\nMemory location of str1 =", hex(id(str1)))
print("Memory location of str2 =", hex(id(str2)))
print() | 23.833333 | 51 | 0.657343 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 0.503497 |
12990c8712d2523d8e2f0753d7b1faee0bbfa287 | 353 | py | Python | plots_lib/architecture_config.py | cmimprota/ASL-SIFT | e6e489e9cc06746e2ab8cd11193fc9fc0112e5df | [
"Zlib"
] | 1 | 2021-12-30T14:59:43.000Z | 2021-12-30T14:59:43.000Z | plots_lib/architecture_config.py | cmimprota/ASL-SIFT | e6e489e9cc06746e2ab8cd11193fc9fc0112e5df | [
"Zlib"
] | null | null | null | plots_lib/architecture_config.py | cmimprota/ASL-SIFT | e6e489e9cc06746e2ab8cd11193fc9fc0112e5df | [
"Zlib"
] | 1 | 2021-04-12T11:13:32.000Z | 2021-04-12T11:13:32.000Z | config = dict()
config['fixed_cpu_frequency'] = "@ 3700 MHz"
config['frequency'] = 3.7e9
config['maxflops_sisd'] = 2
config['maxflops_sisd_fma'] = 4
config['maxflops_simd'] = 16
config['maxflops_simd_fma'] = 32
config['roofline_beta'] = 64 # According to WikiChip (Skylake)
config['figure_size'] = (20,9)
config... | 29.416667 | 69 | 0.691218 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 201 | 0.569405 |
129b2012dab2f92bc6a116945f46ccc5481200f2 | 562 | py | Python | telemetry_f1_2021/generate_dataset.py | jasperan/f1-telemetry-oracle | 5b2d7efac265539931849863655a5f92d86c75a8 | [
"MIT"
] | 4 | 2022-02-21T16:36:09.000Z | 2022-03-28T06:50:54.000Z | telemetry_f1_2021/generate_dataset.py | jasperan/f1-telemetry-oracle | 5b2d7efac265539931849863655a5f92d86c75a8 | [
"MIT"
] | null | null | null | telemetry_f1_2021/generate_dataset.py | jasperan/f1-telemetry-oracle | 5b2d7efac265539931849863655a5f92d86c75a8 | [
"MIT"
] | 2 | 2022-02-17T19:25:04.000Z | 2022-02-23T04:16:16.000Z | import cx_Oracle
from oracledb import OracleJSONDatabaseConnection
import json
jsondb = OracleJSONDatabaseConnection()
connection = jsondb.get_connection()
connection.autocommit = True
soda = connection.getSodaDatabase()
x_collection = soda.createCollection('f1_2021_weather')
all_data = list()
for doc in x_collect... | 24.434783 | 55 | 0.765125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 51 | 0.090747 |
129b447d8e3a2e21029c717a45661b4dd2311adc | 8,257 | py | Python | UserPage.py | muath22/BookStore | db5b30e540de311931b234e71937ace3db9750c8 | [
"MIT"
] | 9 | 2018-09-13T10:43:34.000Z | 2021-05-05T08:51:52.000Z | UserPage.py | muath22/BookStore | db5b30e540de311931b234e71937ace3db9750c8 | [
"MIT"
] | 4 | 2018-09-13T10:09:32.000Z | 2021-03-20T00:03:10.000Z | UserPage.py | muath22/BookStore | db5b30e540de311931b234e71937ace3db9750c8 | [
"MIT"
] | 5 | 2020-02-26T13:54:03.000Z | 2021-01-06T09:38:56.000Z | from Tkinter import *
import ttk
import BuyBook
import BookInformationPage
import Message
class UserPage(object):
def __init__(self, root, color, font, dbConnection, userInfo):
for child in root.winfo_children():
child.destroy()
self.root = root
self.color = color
sel... | 32.128405 | 84 | 0.592588 | 8,155 | 0.987647 | 0 | 0 | 0 | 0 | 0 | 0 | 523 | 0.06334 |
129b4ea5990948782bef80ca4f25a0a104636e5b | 775 | py | Python | migrations/versions/1b57e397deea_initial_migration.py | sicness9/BugHub | 2af45b0840757f7826927d4fefc0e626fef136e1 | [
"FTL"
] | null | null | null | migrations/versions/1b57e397deea_initial_migration.py | sicness9/BugHub | 2af45b0840757f7826927d4fefc0e626fef136e1 | [
"FTL"
] | null | null | null | migrations/versions/1b57e397deea_initial_migration.py | sicness9/BugHub | 2af45b0840757f7826927d4fefc0e626fef136e1 | [
"FTL"
] | null | null | null | """initial migration
Revision ID: 1b57e397deea
Revises:
Create Date: 2021-12-20 20:57:14.696646
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1b57e397deea'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto ... | 25 | 70 | 0.676129 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 430 | 0.554839 |
129b54403eb231e9102fbf7abe8cda7f3996ce5b | 5,596 | py | Python | app/utility/base_planning_svc.py | scottctaylor12/caldera | 4e81aaaf0ed592232a0474dda36ea2fd505da0de | [
"Apache-2.0"
] | null | null | null | app/utility/base_planning_svc.py | scottctaylor12/caldera | 4e81aaaf0ed592232a0474dda36ea2fd505da0de | [
"Apache-2.0"
] | null | null | null | app/utility/base_planning_svc.py | scottctaylor12/caldera | 4e81aaaf0ed592232a0474dda36ea2fd505da0de | [
"Apache-2.0"
] | null | null | null | import copy
import itertools
import re
from base64 import b64decode
from app.utility.base_service import BaseService
from app.utility.rule import RuleSet
class BasePlanningService(BaseService):
async def trim_links(self, operation, links, agent):
"""
Trim links in supplied list. Where 'trim' ent... | 38.593103 | 103 | 0.606862 | 5,438 | 0.971766 | 0 | 0 | 2,439 | 0.435847 | 5,150 | 0.9203 | 1,370 | 0.244818 |
129c2cba3840cfd8f3de73d2239ee04d334e5bc9 | 215 | py | Python | pyclid/__init__.py | Kaundur/pyclid | c59865fed9120b76cba6e41a84653256ac3072ee | [
"MIT"
] | 2 | 2019-02-12T11:31:04.000Z | 2021-12-31T10:39:01.000Z | pyclid/__init__.py | Kaundur/pyclid | c59865fed9120b76cba6e41a84653256ac3072ee | [
"MIT"
] | null | null | null | pyclid/__init__.py | Kaundur/pyclid | c59865fed9120b76cba6e41a84653256ac3072ee | [
"MIT"
] | null | null | null | import math
from pyclid.vector import *
from pyclid.matrix import *
from pyclid.quaternion import *
#from pyclid.vector import vector
#from pyclid.quaternion import quaternion
#from pyclid.matrix import matrix
| 16.538462 | 41 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 107 | 0.497674 |
129c738a3288c017144786e45c751a99bdb4acea | 2,939 | py | Python | tools/gen_histograms.py | mistajuliax/pbrt-v3-IILE | afda605d92517d2396e494d81465ead22d0c25e1 | [
"BSD-2-Clause"
] | 16 | 2018-10-12T15:29:22.000Z | 2022-03-16T11:24:10.000Z | tools/gen_histograms.py | mistajuliax/pbrt-v3-IILE | afda605d92517d2396e494d81465ead22d0c25e1 | [
"BSD-2-Clause"
] | 16 | 2018-02-02T11:49:36.000Z | 2018-04-21T09:07:08.000Z | tools/gen_histograms.py | giuliojiang/pbrt-v3-IISPT | b9be01096293ab0f50b14b9043556c93ff9e07ec | [
"BSD-2-Clause"
] | 2 | 2018-12-12T08:49:43.000Z | 2019-12-03T12:20:04.000Z | import os
rootdir = os.path.abspath(os.path.join(__file__, "..", ".."))
mldir = os.path.join(rootdir, "ml")
import sys
sys.path.append(mldir)
import pfm
import iispt_transforms
import math
import plotly
import plotly.plotly as py
import plotly.graph_objs as go
# ====================================================... | 25.780702 | 79 | 0.555971 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 611 | 0.207894 |
129ced52ad5bddf6d93136148de2d32cf2de02ec | 4,762 | py | Python | crownstone_uart/core/uart/UartBridge.py | RicArch97/crownstone-lib-python-uart | c0aaf1415936e5e622aa6395fdac4f88ebcf82bf | [
"MIT"
] | null | null | null | crownstone_uart/core/uart/UartBridge.py | RicArch97/crownstone-lib-python-uart | c0aaf1415936e5e622aa6395fdac4f88ebcf82bf | [
"MIT"
] | null | null | null | crownstone_uart/core/uart/UartBridge.py | RicArch97/crownstone-lib-python-uart | c0aaf1415936e5e622aa6395fdac4f88ebcf82bf | [
"MIT"
] | null | null | null | import logging
import sys
import threading
import serial
import serial.tools.list_ports
from crownstone_uart.Constants import UART_READ_TIMEOUT, UART_WRITE_TIMEOUT
from crownstone_uart.core.UartEventBus import UartEventBus
from crownstone_uart.core.uart.UartParser import UartParser
from crownstone_uart.core.uart.Uart... | 40.355932 | 144 | 0.640277 | 4,306 | 0.904242 | 0 | 0 | 0 | 0 | 0 | 0 | 768 | 0.161277 |
129d3359e74cfc680cc1a6d1b0edd803c1383270 | 20,753 | py | Python | data-batch-treatment/test_agg_script/locations.py | coder-baymax/taxi-poc-aws | 4be8021873ee6b58b2dba5a5d41df12cdd3b67fc | [
"MIT"
] | null | null | null | data-batch-treatment/test_agg_script/locations.py | coder-baymax/taxi-poc-aws | 4be8021873ee6b58b2dba5a5d41df12cdd3b67fc | [
"MIT"
] | null | null | null | data-batch-treatment/test_agg_script/locations.py | coder-baymax/taxi-poc-aws | 4be8021873ee6b58b2dba5a5d41df12cdd3b67fc | [
"MIT"
] | null | null | null | class Location:
def __init__(self, location_id, borough, zone, lat, lng):
self.location_id = location_id
self.borough = borough
self.zone = zone
self.lat = lat
self.lng = lng
@property
def json(self):
return {
"location_id": self.location_id,
... | 72.562937 | 112 | 0.679131 | 451 | 0.021732 | 0 | 0 | 226 | 0.01089 | 0 | 0 | 7,271 | 0.350359 |
129d53076c9002e63bb6e233e94f66b83a1c9e37 | 114 | py | Python | main.py | viniciuslimafernandes/interpolation | 1aff08cba6026143fd267a0c648bad8975ae5d74 | [
"MIT"
] | null | null | null | main.py | viniciuslimafernandes/interpolation | 1aff08cba6026143fd267a0c648bad8975ae5d74 | [
"MIT"
] | null | null | null | main.py | viniciuslimafernandes/interpolation | 1aff08cba6026143fd267a0c648bad8975ae5d74 | [
"MIT"
] | null | null | null | import math
from utils import *
def main():
showHome()
option = chooseOption()
handleOption(option)
main() | 12.666667 | 25 | 0.701754 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
129e3285af4caf68d1f91b717a406d9814f4383d | 222 | py | Python | tests/helper.py | blehers/PyViCare | e74b854afe6678f30c05bdef5e642ab66d1c0b6a | [
"Apache-2.0"
] | null | null | null | tests/helper.py | blehers/PyViCare | e74b854afe6678f30c05bdef5e642ab66d1c0b6a | [
"Apache-2.0"
] | null | null | null | tests/helper.py | blehers/PyViCare | e74b854afe6678f30c05bdef5e642ab66d1c0b6a | [
"Apache-2.0"
] | null | null | null | import os
import simplejson as json
def readJson(fileName):
test_filename = os.path.join(os.path.dirname(__file__), fileName)
with open(test_filename, mode='rb') as json_file:
return json.load(json_file)
| 24.666667 | 69 | 0.72973 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0.018018 |
129f44f6dc7578a9b45f3abd7e3b50f1fe3a4274 | 1,999 | py | Python | examples/client-example.py | pkalemba/python-warp10client | 25a9b446a217066a7d6c39aeb7d19d1be93a7688 | [
"BSD-3-Clause"
] | 8 | 2017-11-20T13:31:58.000Z | 2021-07-13T08:34:52.000Z | examples/client-example.py | pkalemba/python-warp10client | 25a9b446a217066a7d6c39aeb7d19d1be93a7688 | [
"BSD-3-Clause"
] | 2 | 2017-11-20T21:16:16.000Z | 2017-12-11T13:56:44.000Z | examples/client-example.py | regel/python-warp10client | bee380513d899ae7c55a26e43a8914f8c29b5279 | [
"BSD-3-Clause"
] | 4 | 2017-11-21T07:51:01.000Z | 2020-04-07T12:03:23.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import daiquiri
from time import time
import warp10client
LOG = daiquiri.getLogger(__name__)
warp10_api_url = '' # Add here backend url where metrics are stored
read_token = '' # Add here your metrics read token
write_token = '' # Add here your metrics write token
#... | 24.9875 | 79 | 0.64032 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,127 | 0.563782 |
12a0170295fb80e383d69995765e135510da8362 | 3,094 | py | Python | ports/stm32/boards/NUCLEO_WB55/rfcore_makefirmware.py | H-Grobben/micropython | fce96b11f3ff444c1ac24501db465dbe9e5902bf | [
"MIT"
] | null | null | null | ports/stm32/boards/NUCLEO_WB55/rfcore_makefirmware.py | H-Grobben/micropython | fce96b11f3ff444c1ac24501db465dbe9e5902bf | [
"MIT"
] | null | null | null | ports/stm32/boards/NUCLEO_WB55/rfcore_makefirmware.py | H-Grobben/micropython | fce96b11f3ff444c1ac24501db465dbe9e5902bf | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# This file is part of the MicroPython project, http://micropython.org/
#
# The MIT License (MIT)
#
# Copyright (c) 2020 Jim Mussared
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
... | 38.675 | 184 | 0.671946 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,999 | 0.646089 |
12a080db56a168dea64d817c232a427dfdd87858 | 1,081 | py | Python | universal/spiders/universalSpider.py | universalscraper/universal-spider | 0b6d82ee0c749cf32dcf501e6d84f518ee2e8437 | [
"MIT"
] | 2 | 2017-01-14T20:09:24.000Z | 2019-09-23T09:26:23.000Z | universal/spiders/universalSpider.py | scraperize/universal-spider | 0b6d82ee0c749cf32dcf501e6d84f518ee2e8437 | [
"MIT"
] | null | null | null | universal/spiders/universalSpider.py | scraperize/universal-spider | 0b6d82ee0c749cf32dcf501e6d84f518ee2e8437 | [
"MIT"
] | null | null | null | import scrapy
import yaml
class universalSpider(scrapy.Spider):
name = "universal"
parameters = None
def __init__(self, *args, **kwargs):
worker = kwargs.get("worker")
if not worker:
exit("You must specify worker name : -a worker=name")
self.parameters = yaml.load(f... | 29.216216 | 130 | 0.60592 | 1,053 | 0.974098 | 541 | 0.500463 | 0 | 0 | 0 | 0 | 177 | 0.163737 |
12a0f3a1d45fe59fa067cf5c06c3bffbb58f6bd1 | 11,715 | py | Python | environments/IPP_BO_Ypacarai.py | FedePeralta/ASVs_Deep_Reinforcement_Learning_with_CNNs | 23b9b181499a4b06f2ca2951c002359c1959e727 | [
"MIT"
] | null | null | null | environments/IPP_BO_Ypacarai.py | FedePeralta/ASVs_Deep_Reinforcement_Learning_with_CNNs | 23b9b181499a4b06f2ca2951c002359c1959e727 | [
"MIT"
] | null | null | null | environments/IPP_BO_Ypacarai.py | FedePeralta/ASVs_Deep_Reinforcement_Learning_with_CNNs | 23b9b181499a4b06f2ca2951c002359c1959e727 | [
"MIT"
] | null | null | null | import warnings
import gym
import matplotlib.pyplot as plt
import numpy as np
from skopt.acquisition import gaussian_ei
from environments.groundtruthgenerator import GroundTruth
warnings.simplefilter("ignore", UserWarning)
from skopt.learning.gaussian_process import gpr, kernels
class ContinuousBO(gym.Env):
en... | 38.284314 | 120 | 0.626376 | 9,525 | 0.81306 | 0 | 0 | 0 | 0 | 0 | 0 | 3,924 | 0.334955 |
12a151b9a4e765ed24ceecf3aa9bec0771ac3589 | 5,281 | py | Python | utils/metrics.py | 0b3d/Image-Map-Embeddings | a9fc65ac92094bcfcd0f19a3604f0b9d8bd3174f | [
"MIT"
] | 2 | 2022-02-11T06:05:35.000Z | 2022-03-14T02:10:31.000Z | utils/metrics.py | 0b3d/Image-Map-Embeddings | a9fc65ac92094bcfcd0f19a3604f0b9d8bd3174f | [
"MIT"
] | null | null | null | utils/metrics.py | 0b3d/Image-Map-Embeddings | a9fc65ac92094bcfcd0f19a3604f0b9d8bd3174f | [
"MIT"
] | null | null | null | import numpy as np
from sklearn.metrics import pairwise_distances
import matplotlib.pyplot as plt
class NumpyMetrics():
def __init__(self, metric='euclidean'):
self.metric = metric
def rank(self, x,y, x_labels, y_labels):
distances = pairwise_distances(x,y,self.metric)
batch_size = x_... | 51.271845 | 166 | 0.667487 | 5,175 | 0.979928 | 0 | 0 | 0 | 0 | 0 | 0 | 1,389 | 0.263018 |
12a1ccdc2c994161fe55e1738031ece8631b2305 | 693 | py | Python | tests/bugs/test-200908181430.py | eLBati/pyxb | 14737c23a125fd12c954823ad64fc4497816fae3 | [
"Apache-2.0"
] | 123 | 2015-01-12T06:43:22.000Z | 2022-03-20T18:06:46.000Z | tests/bugs/test-200908181430.py | eLBati/pyxb | 14737c23a125fd12c954823ad64fc4497816fae3 | [
"Apache-2.0"
] | 103 | 2015-01-08T18:35:57.000Z | 2022-01-18T01:44:14.000Z | tests/bugs/test-200908181430.py | eLBati/pyxb | 14737c23a125fd12c954823ad64fc4497816fae3 | [
"Apache-2.0"
] | 54 | 2015-02-15T17:12:00.000Z | 2022-03-07T23:02:32.000Z | # -*- coding: utf-8 -*-
import logging
if __name__ == '__main__':
logging.basicConfig()
_log = logging.getLogger(__name__)
import pyxb.binding.generate
import pyxb.binding.datatypes as xs
import pyxb.binding.basis
import pyxb.utils.domutils
import os.path
xsd='''<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xm... | 25.666667 | 108 | 0.735931 | 185 | 0.266955 | 0 | 0 | 0 | 0 | 0 | 0 | 186 | 0.268398 |
12a26d1b84cfd62fa98cec13a5aa4a115ddadb78 | 779 | py | Python | bin/print_data_structure.py | JohanComparat/pyEmerge | 9b5bfa01959d48ea41221609b8f375f27e3e39ff | [
"Unlicense"
] | null | null | null | bin/print_data_structure.py | JohanComparat/pyEmerge | 9b5bfa01959d48ea41221609b8f375f27e3e39ff | [
"Unlicense"
] | null | null | null | bin/print_data_structure.py | JohanComparat/pyEmerge | 9b5bfa01959d48ea41221609b8f375f27e3e39ff | [
"Unlicense"
] | null | null | null | import sys
ii = int(sys.argv[1])
env = sys.argv[2]
# python3 print_data_structure.py 22 MD10
import glob
import os
import numpy as n
import EmergeIterate
iterate = EmergeIterate.EmergeIterate(ii, env)
iterate.open_snapshots()
def print_attr(h5item):
for attr in h5item:
print(attr, h5item[attr])
def print... | 23.606061 | 55 | 0.56611 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 211 | 0.27086 |
12a383eaf645019cefa1dc9f3842290ed2752e23 | 1,999 | py | Python | setup.py | ljdursi/mergevcf | b400385936417c6e517d3c7daec8b9ca6389c51f | [
"MIT"
] | 25 | 2015-06-22T15:30:32.000Z | 2021-05-13T14:59:18.000Z | setup.py | ljdursi/mergevcf | b400385936417c6e517d3c7daec8b9ca6389c51f | [
"MIT"
] | 7 | 2015-08-14T11:20:35.000Z | 2021-05-18T17:48:38.000Z | setup.py | ljdursi/mergevcf | b400385936417c6e517d3c7daec8b9ca6389c51f | [
"MIT"
] | 6 | 2017-04-17T18:35:43.000Z | 2018-05-15T21:47:13.000Z | # based on https://github.com/pypa/sampleproject
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the relevant file
with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f:
long_descript... | 26.653333 | 85 | 0.617309 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,250 | 0.625313 |
12a4188c00b7c8a1abdb2f2f512a6ed7085ea497 | 1,291 | py | Python | tests/test_coders.py | GlobalFishingWatch/pipe-tools | 34dff591997bb2c25e018df86d13a9d42972032b | [
"Apache-2.0"
] | 1 | 2018-05-26T20:10:51.000Z | 2018-05-26T20:10:51.000Z | tests/test_coders.py | GlobalFishingWatch/pipe-tools | 34dff591997bb2c25e018df86d13a9d42972032b | [
"Apache-2.0"
] | 37 | 2017-10-22T12:00:59.000Z | 2022-02-08T19:17:58.000Z | tests/test_coders.py | GlobalFishingWatch/pipe-tools | 34dff591997bb2c25e018df86d13a9d42972032b | [
"Apache-2.0"
] | null | null | null | import pytest
import six
import ujson
import apache_beam as beam
from apache_beam.testing.test_pipeline import TestPipeline as _TestPipeline
from apache_beam.testing.util import assert_that
from apache_beam.testing.util import equal_to
from apache_beam.coders import typecoders
from apache_beam.typehints import Dict, U... | 26.346939 | 118 | 0.676995 | 635 | 0.491867 | 0 | 0 | 801 | 0.620449 | 0 | 0 | 145 | 0.112316 |