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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5ca225f5afe43c654b35619caef218fd0f7a679c | 3,286 | py | Python | promort/predictions_manager/serializers.py | lucalianas/ProMort | 63702e1b573025e1f956f7d7a0e829f655e728f9 | [
"MIT"
] | 3 | 2016-12-28T08:12:51.000Z | 2020-07-08T21:03:48.000Z | promort/predictions_manager/serializers.py | lucalianas/ProMort | 63702e1b573025e1f956f7d7a0e829f655e728f9 | [
"MIT"
] | 37 | 2016-11-11T09:57:45.000Z | 2022-03-31T16:04:53.000Z | promort/predictions_manager/serializers.py | lucalianas/ProMort | 63702e1b573025e1f956f7d7a0e829f655e728f9 | [
"MIT"
] | 4 | 2016-04-22T07:49:40.000Z | 2021-09-22T08:09:44.000Z | # Copyright (c) 2021, CRS4
#
# 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, modify, merge, publish, distribu... | 38.209302 | 102 | 0.714242 | 1,913 | 0.582167 | 0 | 0 | 0 | 0 | 0 | 0 | 1,538 | 0.468046 |
5ca5b710e576de9630f78f2e41bbd7b1030e61bd | 327 | py | Python | tests/test_tweet.py | dashtagger/sentiment_analysis_covid | b1e948ad83d573b2fa82be778ed04f989f062de5 | [
"MIT"
] | null | null | null | tests/test_tweet.py | dashtagger/sentiment_analysis_covid | b1e948ad83d573b2fa82be778ed04f989f062de5 | [
"MIT"
] | null | null | null | tests/test_tweet.py | dashtagger/sentiment_analysis_covid | b1e948ad83d573b2fa82be778ed04f989f062de5 | [
"MIT"
] | null | null | null | import os
import pytest
from src.modules.tweet_module import Twitter_api
class TestTweet:
def test_tokens(self):
with pytest.raises(ValueError) as e:
api = Twitter_api()
err_msg = 'Provide the correct tokens and keys'
assert e.match(err_msg), 'All credentials are given and acc... | 25.153846 | 73 | 0.69419 | 250 | 0.764526 | 0 | 0 | 0 | 0 | 0 | 0 | 77 | 0.235474 |
5cabf0aecc3c712f0928ee78a802672a8b445c83 | 657 | py | Python | src/gameslib/app.py | inigoini/GamesLib | c2476c1872acc610a559707cccab2d2eac3f15cd | [
"MIT"
] | null | null | null | src/gameslib/app.py | inigoini/GamesLib | c2476c1872acc610a559707cccab2d2eac3f15cd | [
"MIT"
] | null | null | null | src/gameslib/app.py | inigoini/GamesLib | c2476c1872acc610a559707cccab2d2eac3f15cd | [
"MIT"
] | null | null | null | import pygame, gameslib
class App():
def __init__(self, size: gameslib.Size = (600, 300), title: str = 'GamesLib'):
self._screen = pygame.display.set_mode(size)
self._scene = None
pygame.display.set_caption(title)
@property
def screen(self) -> pygame.Surface:
return self._screen
@property... | 19.909091 | 80 | 0.663623 | 628 | 0.95586 | 0 | 0 | 404 | 0.614916 | 0 | 0 | 10 | 0.015221 |
5cac943593c7fe65cc7bacbda5a3b4ec95fe7dc4 | 3,764 | py | Python | research/im2txt/im2txt/gradcam_wrapper.py | dorazhao99/women-snowboard | 9cb2569d7a3cbb846d10aabae825ead9a6e1de29 | [
"Apache-2.0"
] | 19 | 2018-09-26T03:52:59.000Z | 2021-08-19T08:41:06.000Z | research/im2txt/im2txt/gradcam_wrapper.py | dorazhao99/women-snowboard | 9cb2569d7a3cbb846d10aabae825ead9a6e1de29 | [
"Apache-2.0"
] | 13 | 2020-06-29T03:53:45.000Z | 2022-03-11T23:28:19.000Z | research/im2txt/im2txt/gradcam_wrapper.py | dorazhao99/women-snowboard | 9cb2569d7a3cbb846d10aabae825ead9a6e1de29 | [
"Apache-2.0"
] | 6 | 2018-09-19T17:07:00.000Z | 2021-03-21T14:20:25.000Z | """Model wrapper class for performing GradCam visualization with a ShowAndTellModel."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from im2txt import show_and_tell_model
from im2txt.inference_utils import inference_wrapper_base
import numpy as np
im... | 36.192308 | 212 | 0.7144 | 2,899 | 0.770191 | 0 | 0 | 0 | 0 | 0 | 0 | 639 | 0.169766 |
5cb00102137240f57c13ca8984615debc98d7b6c | 1,212 | py | Python | Leak #5 - Lost In Translation/windows/Resources/Ops/PyScripts/lib/ops/cmd/groups.py | bidhata/EquationGroupLeaks | 1ff4bc115cb2bd5bf2ed6bf769af44392926830c | [
"Unlicense"
] | 9 | 2019-11-22T04:58:40.000Z | 2022-02-26T16:47:28.000Z | Python.Fuzzbunch/Resources/Ops/PyScripts/lib/ops/cmd/groups.py | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | null | null | null | Python.Fuzzbunch/Resources/Ops/PyScripts/lib/ops/cmd/groups.py | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | 8 | 2017-09-27T10:31:18.000Z | 2022-01-08T10:30:46.000Z |
import ops.cmd
import ops
import ops.env
import ops.cmd.safetychecks
import ops.security.auditing
from ops.cmd import getBoolOption, setBoolOption, getValueOption, setListOption
OpsCommandException = ops.cmd.OpsCommandException
VALID_OPTIONS = ['user', 'network', 'local', 'target']
class GroupsCommand(ops.cmd.DszComm... | 40.4 | 110 | 0.679043 | 830 | 0.684818 | 0 | 0 | 0 | 0 | 0 | 0 | 112 | 0.092409 |
5cb01f72c2e1f02740ee366e9419f4fc76761ed9 | 1,249 | py | Python | run/f1score.py | osmanbaskaya/wsid | b486fb907a85981aa0d0c30210df1d0c33fcbff2 | [
"MIT"
] | 1 | 2016-12-22T21:41:21.000Z | 2016-12-22T21:41:21.000Z | run/f1score.py | osmanbaskaya/mapping-impact | 8024dd3b916ac2dfc336221dd32faba4c0a98442 | [
"MIT"
] | 4 | 2015-06-20T14:09:35.000Z | 2015-06-26T18:29:26.000Z | run/f1score.py | osmanbaskaya/mapping-impact | 8024dd3b916ac2dfc336221dd32faba4c0a98442 | [
"MIT"
] | 1 | 2018-05-11T00:12:59.000Z | 2018-05-11T00:12:59.000Z | #! /usr/bin/python
# -*- coding: utf-8 -*-
__author__ = "Osman Baskaya"
import os
import subprocess
import sys
def s10_f1_run():
systems = os.listdir('../../systems')
command = "./sup_eval.sh ../../systems/%s . ../80_20/all/mapping.%d.key ../80_20/all/test.%d.key 2>/dev/null | tail -1 | grep -oP '0.\d+'"
... | 35.685714 | 226 | 0.583667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 465 | 0.372298 |
5cb1d1c1b2d0620a0d048a8f6d7b4fcc7668f049 | 1,851 | py | Python | tests/tcn/test_keras_onnx.py | ggardiakos/timemachines | 845001fc6ca3005d3612ef8f44040f5d1e15d9b8 | [
"MIT"
] | null | null | null | tests/tcn/test_keras_onnx.py | ggardiakos/timemachines | 845001fc6ca3005d3612ef8f44040f5d1e15d9b8 | [
"MIT"
] | null | null | null | tests/tcn/test_keras_onnx.py | ggardiakos/timemachines | 845001fc6ca3005d3612ef8f44040f5d1e15d9b8 | [
"MIT"
] | null | null | null | # SPDX-License-Identifier: Apache-2.0
from timemachines.skaters.tcn.tcninclusiontraining import using_tcntraining
if using_tcntraining:
from onnxruntime import InferenceSession
import numpy as np
from tensorflow import keras
from tensorflow.keras import layers, Input
def test_keras_onnx_runtime()... | 34.277778 | 113 | 0.558617 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 602 | 0.32523 |
5cb446a4e4e2baeadec21e9cc78c16dd22923e50 | 2,905 | py | Python | utest/controller/test_rename_keywords.py | hoteltianya/RIDE | dcdccfec631517743d24c8e31fc6687fd29338a0 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-04-11T12:55:29.000Z | 2020-04-11T12:55:29.000Z | utest/controller/test_rename_keywords.py | hoteltianya/RIDE | dcdccfec631517743d24c8e31fc6687fd29338a0 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | utest/controller/test_rename_keywords.py | hoteltianya/RIDE | dcdccfec631517743d24c8e31fc6687fd29338a0 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import unittest
from robotide.controller.commands import *
from nose.tools import assert_true, assert_false, assert_equals
from base_command_test import TestCaseCommandTest
class TestRenameKeywords(TestCaseCommandTest):
def test_test_is_gerkin_kw(self):
observer = NullObserver()
myobject = Renam... | 47.622951 | 103 | 0.692255 | 2,680 | 0.922547 | 0 | 0 | 0 | 0 | 0 | 0 | 756 | 0.260241 |
5cb48a34918725ed322fa84f1070cebbca501f40 | 488 | py | Python | bin/uber.py | taps1197/Traahi | 52765e26b844169349de7c5a13da8edcbd6e7d47 | [
"MIT"
] | 1 | 2019-03-29T11:38:03.000Z | 2019-03-29T11:38:03.000Z | bin/uber.py | taps1197/Traahi | 52765e26b844169349de7c5a13da8edcbd6e7d47 | [
"MIT"
] | null | null | null | bin/uber.py | taps1197/Traahi | 52765e26b844169349de7c5a13da8edcbd6e7d47 | [
"MIT"
] | null | null | null | import os
import json
from uber_rides.session import Session
from uber_rides.client import UberRidesClient
from pprint import pprint
session = Session(server_token="P0xeLpEgkQct68R3USut3nBst62X83Tz4V8BT7CR")
client = UberRidesClient(session)
response = client.get_products(37.77, -122.41)
products = response.json... | 21.217391 | 74 | 0.770492 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 77 | 0.157787 |
5cb4f3d7bb829612fae0f449b3de61ecc0409094 | 1,476 | py | Python | software/Opal/spud/diamond/build/lib.linux-x86_64-2.7/diamond/databuttonswidget.py | msc-acse/acse-9-independent-research-project-Wade003 | cfcba990d52ccf535171cf54c0a91b184db6f276 | [
"MIT"
] | 2 | 2020-05-11T02:39:46.000Z | 2020-05-11T03:08:38.000Z | software/multifluids_icferst/libspud/diamond/build/lib.linux-x86_64-2.7/diamond/databuttonswidget.py | msc-acse/acse-9-independent-research-project-Wade003 | cfcba990d52ccf535171cf54c0a91b184db6f276 | [
"MIT"
] | null | null | null | software/multifluids_icferst/libspud/diamond/build/lib.linux-x86_64-2.7/diamond/databuttonswidget.py | msc-acse/acse-9-independent-research-project-Wade003 | cfcba990d52ccf535171cf54c0a91b184db6f276 | [
"MIT"
] | 2 | 2020-05-21T22:50:19.000Z | 2020-10-28T17:16:31.000Z | #!/usr/bin/env python
# This file is part of Diamond.
#
# Diamond is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ... | 30.75 | 79 | 0.70664 | 696 | 0.471545 | 0 | 0 | 0 | 0 | 0 | 0 | 766 | 0.51897 |
5cb56963b7976f720d715207e1996f45b2421639 | 149 | py | Python | shelf/link_title.py | not-nexus/shelf | ea59703082402ad3b6454482f0487418295fbd19 | [
"MIT"
] | 4 | 2016-11-07T13:02:18.000Z | 2019-09-03T02:04:05.000Z | shelf/link_title.py | not-nexus/shelf | ea59703082402ad3b6454482f0487418295fbd19 | [
"MIT"
] | 21 | 2016-11-30T20:44:52.000Z | 2017-05-02T15:38:56.000Z | shelf/link_title.py | not-nexus/shelf | ea59703082402ad3b6454482f0487418295fbd19 | [
"MIT"
] | 2 | 2017-01-24T14:36:04.000Z | 2020-01-13T16:10:05.000Z | class LinkTitle(object):
ARTIFACT_LIST = "artifact-list"
ARTIFACT_ROOT = "artifact-root"
ARTIFACT = "artifact"
METADATA = "metadata"
| 24.833333 | 35 | 0.684564 | 148 | 0.993289 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.33557 |
5cb5891ba04d0b3c481ca3b5fc5261fc95bd5a1e | 5,274 | py | Python | metapose/launch_iterative_solver.py | dumpmemory/google-research | bc87d010ab9086b6e92c3f075410fa6e1f27251b | [
"Apache-2.0"
] | null | null | null | metapose/launch_iterative_solver.py | dumpmemory/google-research | bc87d010ab9086b6e92c3f075410fa6e1f27251b | [
"Apache-2.0"
] | null | null | null | metapose/launch_iterative_solver.py | dumpmemory/google-research | bc87d010ab9086b6e92c3f075410fa6e1f27251b | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 37.140845 | 79 | 0.695108 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,100 | 0.39818 |
5cb679704e23a1b0acbe6405efd9aa5634185c0e | 3,450 | py | Python | models.py | RCSnyder/subreddit_scraper | 17062c585f2dc0136e6e4ecb914d1ff456c80069 | [
"MIT"
] | null | null | null | models.py | RCSnyder/subreddit_scraper | 17062c585f2dc0136e6e4ecb914d1ff456c80069 | [
"MIT"
] | null | null | null | models.py | RCSnyder/subreddit_scraper | 17062c585f2dc0136e6e4ecb914d1ff456c80069 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
import nltk
nltk.download('vader_lexicon')
from nltk.sentiment.vader import SentimentIntensityAnalyzer
s = SentimentIntensityAnalyzer()
import flair
flair_sentiment = flair.models.TextClassifier.load('en-sentiment')
""" from azure.ai.textanalytics import TextAnalyticsClient
from a... | 31.944444 | 140 | 0.655072 | 1,365 | 0.395652 | 0 | 0 | 58 | 0.016812 | 0 | 0 | 2,018 | 0.584928 |
5cb8c0c2be663ce0d5770be43328e7edfd49f0dd | 384 | py | Python | marioshop/tools/migrations/0008_auto_20210509_1401.py | alpinista06/GBB-Store-project | 55a8c614923e770eb747c37e145a9f422d1bac2a | [
"MIT"
] | null | null | null | marioshop/tools/migrations/0008_auto_20210509_1401.py | alpinista06/GBB-Store-project | 55a8c614923e770eb747c37e145a9f422d1bac2a | [
"MIT"
] | null | null | null | marioshop/tools/migrations/0008_auto_20210509_1401.py | alpinista06/GBB-Store-project | 55a8c614923e770eb747c37e145a9f422d1bac2a | [
"MIT"
] | null | null | null | # Generated by Django 3.0.14 on 2021-05-09 17:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tools', '0007_auto_20210429_1427'),
]
operations = [
migrations.AlterField(
model_name='tool',
name='quantity',
... | 20.210526 | 49 | 0.596354 | 290 | 0.755208 | 0 | 0 | 0 | 0 | 0 | 0 | 96 | 0.25 |
5cbd0d3f9fd7d3affecf3aeb1717980ce341da1d | 12,141 | py | Python | tests/unit/data/test_datamodule.py | pietrolesci/pytorch-energizer | 31b23347967963cda704bda8b05f3e567368c9bb | [
"MIT"
] | null | null | null | tests/unit/data/test_datamodule.py | pietrolesci/pytorch-energizer | 31b23347967963cda704bda8b05f3e567368c9bb | [
"MIT"
] | null | null | null | tests/unit/data/test_datamodule.py | pietrolesci/pytorch-energizer | 31b23347967963cda704bda8b05f3e567368c9bb | [
"MIT"
] | null | null | null | import pytest
from pytorch_lightning.utilities.exceptions import MisconfigurationException
from torch.utils.data.sampler import SequentialSampler
from energizer.data import ActiveDataModule
from energizer.data.datamodule import FixedLengthSampler
@pytest.mark.parametrize("dataset_arg", ["mock_dataset", "mock_hf_data... | 43.206406 | 107 | 0.732889 | 0 | 0 | 0 | 0 | 11,854 | 0.976361 | 0 | 0 | 2,136 | 0.175933 |
5cc027e9ce7d216791c0e4db8b4a2c118390640d | 1,086 | py | Python | apis/invoice-generator/utlis/utlis.py | sats268842/billie-invoice | f10a365acd4c12369466dd5c03a813bcf997c87b | [
"Apache-2.0"
] | null | null | null | apis/invoice-generator/utlis/utlis.py | sats268842/billie-invoice | f10a365acd4c12369466dd5c03a813bcf997c87b | [
"Apache-2.0"
] | null | null | null | apis/invoice-generator/utlis/utlis.py | sats268842/billie-invoice | f10a365acd4c12369466dd5c03a813bcf997c87b | [
"Apache-2.0"
] | null | null | null | # import os
# from typing import List
# # import aiofiles
# from fastapi import UploadFile
# from datetime import datetime
# import shutil
# # from app.model.emails import EmailRequest
# # from app.utils.mail_utils import send_mail
# def get_datetime():
# # return a current datetime string
# return datetime.n... | 31.028571 | 66 | 0.656538 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,052 | 0.968692 |
5cc062591cfe12fa5a06316443ec900f3dbf315c | 1,139 | py | Python | sagemaker-pyspark-sdk/tests/wrapper_test.py | hyandell/sagemaker-spark | 0149cf0f52562008a1a163e455207bb6d00d3e4a | [
"Apache-2.0"
] | 261 | 2017-11-30T04:53:01.000Z | 2022-03-27T14:52:46.000Z | sagemaker-pyspark-sdk/tests/wrapper_test.py | hyandell/sagemaker-spark | 0149cf0f52562008a1a163e455207bb6d00d3e4a | [
"Apache-2.0"
] | 114 | 2017-12-15T23:10:09.000Z | 2022-01-07T18:52:30.000Z | sagemaker-pyspark-sdk/tests/wrapper_test.py | hyandell/sagemaker-spark | 0149cf0f52562008a1a163e455207bb6d00d3e4a | [
"Apache-2.0"
] | 127 | 2017-11-30T18:53:51.000Z | 2022-03-13T18:58:10.000Z | import os
import pytest
from pyspark import SparkConf, SparkContext
from sagemaker_pyspark import classpath_jars
from sagemaker_pyspark.wrapper import Option, ScalaMap, ScalaList
@pytest.fixture(autouse=True)
def with_spark_context():
os.environ['SPARK_CLASSPATH'] = ":".join(classpath_jars())
conf = (SparkC... | 24.76087 | 79 | 0.697103 | 0 | 0 | 396 | 0.347673 | 426 | 0.374012 | 0 | 0 | 179 | 0.157155 |
5cc07fe278fde69f39bb0b891fbc01b7d26bc5c0 | 645 | py | Python | Proj2/neuralnetworks/dropout.py | sebemery/EE559-DeepLearning-MiniProjects | 34ea114884e2e4f1416d63fa53466619e6a5c5fd | [
"MIT"
] | null | null | null | Proj2/neuralnetworks/dropout.py | sebemery/EE559-DeepLearning-MiniProjects | 34ea114884e2e4f1416d63fa53466619e6a5c5fd | [
"MIT"
] | null | null | null | Proj2/neuralnetworks/dropout.py | sebemery/EE559-DeepLearning-MiniProjects | 34ea114884e2e4f1416d63fa53466619e6a5c5fd | [
"MIT"
] | 1 | 2020-03-18T18:58:02.000Z | 2020-03-18T18:58:02.000Z | import torch
import numpy as np
from .base import Module
class Dropout(Module):
def __init__(self, p, input_size, seed=0):
self.p = p
self.generator = np.random.RandomState(seed)
self.activation = self.generator.binomial(size=input_size, n=1, p=1-p)
self.activation = torch.from_nu... | 24.807692 | 78 | 0.624806 | 584 | 0.905426 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5cc149375b44096dc121a4abf69408bc16d3f4e2 | 401 | py | Python | python/controls/datepicker/datepicker_with_change_event.py | pglet/pglet-samples | ab47e797a4daccfa4779daa3d1fd1cc27d92e7f9 | [
"MIT"
] | null | null | null | python/controls/datepicker/datepicker_with_change_event.py | pglet/pglet-samples | ab47e797a4daccfa4779daa3d1fd1cc27d92e7f9 | [
"MIT"
] | null | null | null | python/controls/datepicker/datepicker_with_change_event.py | pglet/pglet-samples | ab47e797a4daccfa4779daa3d1fd1cc27d92e7f9 | [
"MIT"
] | null | null | null | from datetime import datetime
import pglet
from pglet import DatePicker, Text
with pglet.page("datepicker-with-change-event") as page:
def datepicker_changed(e):
t.value = f"DatePicker value changed to {dp.value}"
t.update()
now = datetime.now()
t = Text()
dp = DatePicker(label="Start date", v... | 28.642857 | 89 | 0.698254 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 83 | 0.206983 |
5cc2c89702cb6bfef8fed47f8984c04ad8a693d6 | 250 | py | Python | ExPy/ExPy/module30.py | brad-h/expy | d3f3dfbbdae31ab8c7e134a5ce9d5f6adf94b516 | [
"MIT"
] | null | null | null | ExPy/ExPy/module30.py | brad-h/expy | d3f3dfbbdae31ab8c7e134a5ce9d5f6adf94b516 | [
"MIT"
] | null | null | null | ExPy/ExPy/module30.py | brad-h/expy | d3f3dfbbdae31ab8c7e134a5ce9d5f6adf94b516 | [
"MIT"
] | null | null | null | """ Multiplication Table """
def ex30():
"""Generate a multiplication table"""
for left in range(13):
for right in range(13):
print('{} X {} = {}'.format(left, right, left * right))
if __name__ == '__main__':
ex30()
| 22.727273 | 67 | 0.556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 89 | 0.356 |
5cc5b7cbbc5f291340922f4de02d42c9001eb684 | 5,312 | py | Python | interactive_bots/test/test_commons/test_form_crawler.py | dmitrijbozhkov/emergenecy-medicine-data | 7fea6b2c76a180c5e4c145a7fa6c83ae3e7af7bc | [
"Apache-2.0"
] | null | null | null | interactive_bots/test/test_commons/test_form_crawler.py | dmitrijbozhkov/emergenecy-medicine-data | 7fea6b2c76a180c5e4c145a7fa6c83ae3e7af7bc | [
"Apache-2.0"
] | null | null | null | interactive_bots/test/test_commons/test_form_crawler.py | dmitrijbozhkov/emergenecy-medicine-data | 7fea6b2c76a180c5e4c145a7fa6c83ae3e7af7bc | [
"Apache-2.0"
] | null | null | null | """ Tests for form crawlers """
from unittest import TestCase, main
from unittest.mock import Mock
from functools import partial
from interactive_bots.commons.form_crawler import FormActionOptions, FormCrawler
class FormActionOptionsTestCase(TestCase):
""" Test case for FormActionOptions class """
def setUp(se... | 46.191304 | 127 | 0.69823 | 5,059 | 0.952372 | 0 | 0 | 0 | 0 | 0 | 0 | 1,011 | 0.190324 |
5cc84883f5a1ed2810b170d833c1b4dcfd7d3d83 | 872 | py | Python | django/stock/urls.py | phantomhieve/cashcenter | 642a496c5e60847f4c4a6cc2c80b957ae2d6285b | [
"MIT"
] | null | null | null | django/stock/urls.py | phantomhieve/cashcenter | 642a496c5e60847f4c4a6cc2c80b957ae2d6285b | [
"MIT"
] | 4 | 2021-04-08T22:00:11.000Z | 2021-09-22T19:42:08.000Z | django/stock/urls.py | phantomhieve/cashcenter | 642a496c5e60847f4c4a6cc2c80b957ae2d6285b | [
"MIT"
] | null | null | null | from django.urls import path
from django.contrib.auth.decorators import login_required
from .views import (
StockListView,
stockAddView,
stockDeleteView,
autoComplete
)
urlpatterns = [
path(
'',
login_required(StockListView.as_view(), login_url='/user/login/'),
name='stoc... | 24.222222 | 74 | 0.595183 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 197 | 0.225917 |
5cc96bccafaee3453353f6c6ebd4f4f2e2c88027 | 1,828 | py | Python | tests/test_reader.py | hsuchristine/code_challenge | de82243a685e465a01445cd700f156cbf9b89572 | [
"MIT"
] | 1 | 2020-06-29T01:53:30.000Z | 2020-06-29T01:53:30.000Z | tests/test_reader.py | hsuchristine/code_challenge | de82243a685e465a01445cd700f156cbf9b89572 | [
"MIT"
] | 2 | 2022-01-13T01:54:57.000Z | 2022-03-12T00:07:09.000Z | tests/test_reader.py | hsuchristine/code_challenge | de82243a685e465a01445cd700f156cbf9b89572 | [
"MIT"
] | null | null | null | """Unit test for DataReader (public methods only)"""
import unittest
import numpy as np
import os
from dicom_data_preprocess import parsing
from dicom_data_preprocess.reader import DataReader
__author__ = 'Christine Hsu'
class TestReader(unittest.TestCase):
@classmethod
def setUpClass(TestReader):
TestReader.dow... | 35.153846 | 92 | 0.791028 | 1,557 | 0.851751 | 0 | 0 | 734 | 0.401532 | 0 | 0 | 278 | 0.152079 |
5cc99818ef3d420ba12270f6fd7f4e8403fb924e | 4,064 | py | Python | lib/dashboard/logger.py | hexueyuan/Adanos | b35873fc88b61dabda49c85f0e2b2d126731d34f | [
"MIT"
] | null | null | null | lib/dashboard/logger.py | hexueyuan/Adanos | b35873fc88b61dabda49c85f0e2b2d126731d34f | [
"MIT"
] | 8 | 2020-07-17T01:49:53.000Z | 2022-02-17T22:58:31.000Z | lib/dashboard/logger.py | hexueyuan/Adanos | b35873fc88b61dabda49c85f0e2b2d126731d34f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import logging
import logging.config
import logging.handlers
class Logger:
_default_conf = {
"version": 1,
"disable_existing_loggers": False,
"formatters": {
"default": {
"format": "[%(asctime)s][%(name)s][%(levelname)s][%(filename)s:%(li... | 33.04065 | 105 | 0.532726 | 2,075 | 0.510581 | 0 | 0 | 0 | 0 | 0 | 0 | 1,565 | 0.385089 |
5ccbceb319266f245b6042a34c87089c38999e11 | 846 | py | Python | FileFolder/tempFile.py | jwannebo3524/Attendence | e8ff3f7457337c0516b1e53f2918b9a87f3f1de4 | [
"Unlicense",
"MIT"
] | null | null | null | FileFolder/tempFile.py | jwannebo3524/Attendence | e8ff3f7457337c0516b1e53f2918b9a87f3f1de4 | [
"Unlicense",
"MIT"
] | 2 | 2021-09-17T16:56:28.000Z | 2021-11-02T00:57:32.000Z | FileFolder/tempFile.py | jwannebo3524/Attendence | e8ff3f7457337c0516b1e53f2918b9a87f3f1de4 | [
"Unlicense",
"MIT"
] | null | null | null | from tempfile import NamedTemporaryFile
import shutil
import csv
import datetime
import time
#filename = 'tmpEmployeeDatabase.csv'
tempfile = NamedTemporaryFile('w+t', newline='', delete=False)
class tempFile:
def __init__ ():
filename = "" + str(datetime.date().month) + str(datetime.date().day) + str((da... | 26.4375 | 144 | 0.637116 | 649 | 0.767139 | 0 | 0 | 0 | 0 | 0 | 0 | 97 | 0.114657 |
5cce94b475009bd0fb2fec116696fc64c40388d6 | 121 | py | Python | Pacote Download/Python/OlaMundo.py | DiegoGomesFerreira/Python | bcc33f8c1c77078e8be49333c008d74c59fe0221 | [
"MIT"
] | null | null | null | Pacote Download/Python/OlaMundo.py | DiegoGomesFerreira/Python | bcc33f8c1c77078e8be49333c008d74c59fe0221 | [
"MIT"
] | null | null | null | Pacote Download/Python/OlaMundo.py | DiegoGomesFerreira/Python | bcc33f8c1c77078e8be49333c008d74c59fe0221 | [
"MIT"
] | 1 | 2022-03-28T17:38:52.000Z | 2022-03-28T17:38:52.000Z | from tkinter import *
janela = Tk()
botao = Button(janela, text="Click")
botao.grid(row=0, column=0)
janela.mainloop() | 15.125 | 36 | 0.702479 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.057851 |
5ccfae5fa95146d589ab65e046f6f95b2dcb1775 | 3,205 | py | Python | imagingresponse/explore_layouts.py | marivasq/gamma-ai | 735953e80901afea3e5cdeb2a7b27c9ab5725434 | [
"MIT"
] | 6 | 2020-01-29T07:24:14.000Z | 2022-03-16T10:05:25.000Z | imagingresponse/explore_layouts.py | marivasq/gamma-ai | 735953e80901afea3e5cdeb2a7b27c9ab5725434 | [
"MIT"
] | 6 | 2020-07-03T00:31:10.000Z | 2021-09-10T07:45:01.000Z | imagingresponse/explore_layouts.py | marivasq/gamma-ai | 735953e80901afea3e5cdeb2a7b27c9ab5725434 | [
"MIT"
] | 5 | 2019-02-27T22:56:49.000Z | 2019-08-24T19:01:41.000Z | ###################################################################################################
#
#
# Copyright (C) by Shivani Kishnani & Andreas Zoglauer.
# All rights reserved.
#
# Please see the file License.txt in the main repository for the copyright-notice.
#
###############################################... | 33.041237 | 139 | 0.60936 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,682 | 0.524805 |
5cd04bfaaa27c8c69618c51262862dca892f4515 | 4,013 | py | Python | examples/cloudml-sentiment-analysis/preprocessing/preprocess.py | ruchirjain86/professional-services | 739ac0f5ffc8237f750804fa9f0f14d4d918a0fa | [
"Apache-2.0"
] | 2,116 | 2017-05-18T19:33:05.000Z | 2022-03-31T13:34:48.000Z | examples/cloudml-sentiment-analysis/preprocessing/preprocess.py | ruchirjain86/professional-services | 739ac0f5ffc8237f750804fa9f0f14d4d918a0fa | [
"Apache-2.0"
] | 548 | 2017-05-20T05:05:35.000Z | 2022-03-28T16:38:12.000Z | examples/cloudml-sentiment-analysis/preprocessing/preprocess.py | ruchirjain86/professional-services | 739ac0f5ffc8237f750804fa9f0f14d4d918a0fa | [
"Apache-2.0"
] | 1,095 | 2017-05-19T00:02:36.000Z | 2022-03-31T05:21:39.000Z | # Copyright 2018 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 30.172932 | 97 | 0.705956 | 1,257 | 0.313232 | 1,283 | 0.319711 | 469 | 0.11687 | 0 | 0 | 1,448 | 0.360827 |
5cd096bb54ddc46b06b8bf177a453f80287a8129 | 24,252 | py | Python | inspect4py/utils.py | SoftwareUnderstanding/inspect4py | 9c4d7252535082ad938b26baf281d93f3a27285e | [
"BSD-3-Clause"
] | 2 | 2022-02-15T20:30:57.000Z | 2022-03-17T00:50:37.000Z | inspect4py/utils.py | SoftwareUnderstanding/inspect4py | 9c4d7252535082ad938b26baf281d93f3a27285e | [
"BSD-3-Clause"
] | 14 | 2022-01-25T14:03:50.000Z | 2022-03-28T13:21:08.000Z | inspect4py/utils.py | SoftwareUnderstanding/inspect4py | 9c4d7252535082ad938b26baf281d93f3a27285e | [
"BSD-3-Clause"
] | null | null | null | import ast
import os
import subprocess
from pathlib import Path
from json2html import *
from inspect4py.parse_setup_files import inspect_setup
from inspect4py.structure_tree import DisplayablePath, get_directory_structure
def print_summary(json_dict):
"""
This method prints a small summary of the classes an... | 41.813793 | 121 | 0.616485 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,244 | 0.298697 |
5cd359d31bdc95e8c8ed20bfb7e74a2a5dfecd3f | 582 | py | Python | PythonStarter/ClassOne.py | fsbd1285228/PythonCodes | e71fcd695e19e3d286ec249113791d0729bec751 | [
"MIT"
] | null | null | null | PythonStarter/ClassOne.py | fsbd1285228/PythonCodes | e71fcd695e19e3d286ec249113791d0729bec751 | [
"MIT"
] | null | null | null | PythonStarter/ClassOne.py | fsbd1285228/PythonCodes | e71fcd695e19e3d286ec249113791d0729bec751 | [
"MIT"
] | null | null | null | class Bird(object):
have_feather = True
way_of_reproduction = 'egg'
def move(self, dx, dy):
position = [0,0]
position[0] = position[0] + dx
position[1] = position[1] + dy
return position
class Chicken(Bird):
way_of_move = 'walk'
possible_in_KFC = True
class Oriole(B... | 23.28 | 48 | 0.647766 | 479 | 0.823024 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.07732 |
5cd539226446c2a2f5d8bb7fd1ebb3684b3007da | 3,353 | py | Python | toolkit/cmds/ls_users.py | suraj-testing2/Flowers_Toilet | 21c981531a505a8b74ee42c33a3f4d68ef72d7f3 | [
"Apache-2.0"
] | 22 | 2015-01-22T12:10:50.000Z | 2021-10-12T03:30:56.000Z | toolkit/cmds/ls_users.py | suraj-testing2/Flowers_Toilet | 21c981531a505a8b74ee42c33a3f4d68ef72d7f3 | [
"Apache-2.0"
] | null | null | null | toolkit/cmds/ls_users.py | suraj-testing2/Flowers_Toilet | 21c981531a505a8b74ee42c33a3f4d68ef72d7f3 | [
"Apache-2.0"
] | 17 | 2016-01-28T04:54:39.000Z | 2021-10-12T03:30:49.000Z | #!/usr/bin/python
#
# Copyright 2014 Google 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 b... | 35.294737 | 78 | 0.70176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,444 | 0.430659 |
5cd6e644acdbb15b82dfab8d7e7022c02998853f | 2,151 | py | Python | days/day10.py | Kurocon/AdventOfCode2020 | 40ae8e604eb0e3bc0967c220cf868a8194769a6b | [
"BSD-3-Clause"
] | null | null | null | days/day10.py | Kurocon/AdventOfCode2020 | 40ae8e604eb0e3bc0967c220cf868a8194769a6b | [
"BSD-3-Clause"
] | null | null | null | days/day10.py | Kurocon/AdventOfCode2020 | 40ae8e604eb0e3bc0967c220cf868a8194769a6b | [
"BSD-3-Clause"
] | null | null | null | from functools import lru_cache
from typing import List
from days import AOCDay, day
@day(10)
class Day10(AOCDay):
print_debug = "c12"
test_input = """16
10
15
5
1
11
7
19
6
12
4""".split("\n")
test_input2 = """28
33
18
42
31
14
46
20
48
47
24
23
49
45
19
38
39
11
1
32
25
35
8
17
7
9
4
2
34
10
3""".split(... | 23.637363 | 118 | 0.645281 | 2,054 | 0.954905 | 656 | 0.304974 | 2,063 | 0.959089 | 0 | 0 | 168 | 0.078103 |
5cd8b1b9a2e75158a87d41bc9d2a842af4dc3ce7 | 642 | py | Python | problems/287_find_dup_number.py | apoorvkk/LeetCodeSolutions | 1c3461cfc05deb930d0866428eb00362b4338aab | [
"MIT"
] | 1 | 2018-02-03T14:17:18.000Z | 2018-02-03T14:17:18.000Z | problems/287_find_dup_number.py | apoorvkk/LeetCodeSolutions | 1c3461cfc05deb930d0866428eb00362b4338aab | [
"MIT"
] | null | null | null | problems/287_find_dup_number.py | apoorvkk/LeetCodeSolutions | 1c3461cfc05deb930d0866428eb00362b4338aab | [
"MIT"
] | null | null | null | '''
URL: https://leetcode.com/problems/find-the-duplicate-number/
Time complexity: O(nlogn)
Space complexity: O(1)
'''
class Solution(object):
def findDuplicate(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
if len(nums) < 2:
return -1
lo, hi = 1... | 20.0625 | 61 | 0.423676 | 521 | 0.811526 | 0 | 0 | 0 | 0 | 0 | 0 | 196 | 0.305296 |
5cda1b0a013daae06c8aa16db5b80089deaa912f | 626 | py | Python | src/digi_edit/routes.py | simple-digital-edition/digital-edition-editor | 89c409a20bc947f576176061f9aa96de0efe4123 | [
"MIT"
] | null | null | null | src/digi_edit/routes.py | simple-digital-edition/digital-edition-editor | 89c409a20bc947f576176061f9aa96de0efe4123 | [
"MIT"
] | 8 | 2021-12-17T16:35:07.000Z | 2022-03-03T10:57:13.000Z | src/digi_edit/routes.py | modern-digital-edition/digital-edition-editor | fdf477ff015ceffc691d541110387ee18ee561bc | [
"MIT"
] | null | null | null | def includeme(config):
config.add_static_view('static', 'static', cache_max_age=3600)
config.add_route('root', '/')
config.add_route('ui', '/ui*path')
config.add_route('webhooks.github', '/webhooks/github', request_method='POST')
config.add_route('webhooks.gitlab', '/webhooks/gitlab', request_metho... | 36.823529 | 82 | 0.682109 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 268 | 0.428115 |
5cdf0538bafcb5aaa18058d4c0a939f600b83ff4 | 46,926 | py | Python | tests/server/services/RecommendReviewers_test.py | elifesciences/peerscout | 2e899f268b4712ffb7a09b171de3f3841337d65d | [
"MIT"
] | 3 | 2018-09-10T16:33:14.000Z | 2021-04-06T06:09:23.000Z | tests/server/services/RecommendReviewers_test.py | elifesciences/peerscout | 2e899f268b4712ffb7a09b171de3f3841337d65d | [
"MIT"
] | 247 | 2018-03-01T12:06:07.000Z | 2019-10-25T05:25:16.000Z | tests/server/services/RecommendReviewers_test.py | elifesciences/peerscout | 2e899f268b4712ffb7a09b171de3f3841337d65d | [
"MIT"
] | 3 | 2018-03-01T12:25:44.000Z | 2019-09-04T00:43:34.000Z | import pprint
import logging
from contextlib import contextmanager
import pytest
import pandas as pd
from peerscout.shared.database import populated_in_memory_database
from peerscout.server.services.ManuscriptModel import ManuscriptModel
from peerscout.server.services.DocumentSimilarityModel import DocumentSimilarit... | 40.279828 | 100 | 0.578315 | 39,221 | 0.835805 | 1,042 | 0.022205 | 40,300 | 0.858799 | 0 | 0 | 6,361 | 0.135554 |
5ce1c1e45e684257c61a22c09e36b324c5a48fc3 | 263 | py | Python | Mundo 3_Estruturas Compostas/Desafio_77.py | VictorOliveira02/Desafios-Python3-Curso-em-Video | 53ee8bd814b816f3a21936677ef3f155b582843f | [
"MIT"
] | null | null | null | Mundo 3_Estruturas Compostas/Desafio_77.py | VictorOliveira02/Desafios-Python3-Curso-em-Video | 53ee8bd814b816f3a21936677ef3f155b582843f | [
"MIT"
] | null | null | null | Mundo 3_Estruturas Compostas/Desafio_77.py | VictorOliveira02/Desafios-Python3-Curso-em-Video | 53ee8bd814b816f3a21936677ef3f155b582843f | [
"MIT"
] | null | null | null | palavra = 'MACACO','ARROZ','AZEITONA','LASANHA','PIZZA','CANETA','PARALELEPIPEDO','ONZE','FERNANDO','CAIO'
for p in palavra:
print(f'\nNA PALAVRA {p} TEMOS AS VOGAIS ',end='')
for letra in p:
if letra in 'AEIOU':
print(letra, end=' ')
| 37.571429 | 106 | 0.60076 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 135 | 0.513308 |
5ce1c9f7533769cd42ba4b49d7b1951d113a40f2 | 2,218 | py | Python | sms/apps/products/models.py | vyshakTs/STORE_MANAGEMENT_SYSTEM | b6b82a02c0b512083c35a8656e191436552569a9 | [
"CC0-1.0"
] | null | null | null | sms/apps/products/models.py | vyshakTs/STORE_MANAGEMENT_SYSTEM | b6b82a02c0b512083c35a8656e191436552569a9 | [
"CC0-1.0"
] | null | null | null | sms/apps/products/models.py | vyshakTs/STORE_MANAGEMENT_SYSTEM | b6b82a02c0b512083c35a8656e191436552569a9 | [
"CC0-1.0"
] | null | null | null | import uuid
from autoslug import AutoSlugField
from django.db import models
from sms.apps.accounts.models import TimeStampedModel
# from django_resized import ResizedImageField
# Create your models here.
class Product(models.Model):
IN_STOCK = 1
OUT_OF_STOCK = 0
STATUS_CHOICES = (
(IN_STOCK, 'I... | 31.685714 | 100 | 0.688909 | 1,998 | 0.900812 | 0 | 0 | 0 | 0 | 0 | 0 | 298 | 0.134355 |
5ce2e2885759b71f922db45b1b250447965a354c | 14,927 | py | Python | certifire/cli.py | CertiFire/certifire | 722da20bade41b8cc8553177e70e1f56015fe335 | [
"MIT"
] | null | null | null | certifire/cli.py | CertiFire/certifire | 722da20bade41b8cc8553177e70e1f56015fe335 | [
"MIT"
] | null | null | null | certifire/cli.py | CertiFire/certifire | 722da20bade41b8cc8553177e70e1f56015fe335 | [
"MIT"
] | 1 | 2021-02-06T03:29:56.000Z | 2021-02-06T03:29:56.000Z | import argparse
import logging
import os
import sys
from certifire import app, auth, config, database, db, get_version
from certifire.errors import CertifireError
from certifire.plugins.acme import crypto
from certifire.plugins.acme.models import Account, Certificate, Order
from certifire.plugins.acme.plugin import (c... | 36.85679 | 128 | 0.638239 | 119 | 0.007972 | 0 | 0 | 0 | 0 | 0 | 0 | 5,416 | 0.362832 |
5ce43cf725e3bf8836e708394822671100ec1604 | 2,783 | py | Python | data_gen/gen_p_e_m/gen_p_e_m_from_wiki.py | EMBEDDIA/multilingual_entity_linking | 9042259dd72ae85d94a460a981e9716df4eac203 | [
"Apache-2.0"
] | null | null | null | data_gen/gen_p_e_m/gen_p_e_m_from_wiki.py | EMBEDDIA/multilingual_entity_linking | 9042259dd72ae85d94a460a981e9716df4eac203 | [
"Apache-2.0"
] | 2 | 2021-04-20T13:30:09.000Z | 2021-05-03T14:24:06.000Z | data_gen/gen_p_e_m/gen_p_e_m_from_wiki.py | EMBEDDIA/multilingual_entity_linking | 9042259dd72ae85d94a460a981e9716df4eac203 | [
"Apache-2.0"
] | null | null | null | import argparse, os
from urllib.parse import unquote
import os.path
from os import path
import pickle
ap = argparse.ArgumentParser()
ap.add_argument("-l", "--language", default='en',type = str,
help="path")
args = ap.parse_args()
exec(open("utils/utils.py").read())
exec(open("data_gen/parse_wiki_dump/parse_wiki_du... | 37.106667 | 137 | 0.610492 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 527 | 0.189364 |
5ce52894ee777c761bbe80312dc0afb967f4d975 | 141 | py | Python | homie/models/__init__.py | timpur/homie-discovery-python | f157e3843cae7b1ad3e4fd810b340c35c34473eb | [
"MIT"
] | null | null | null | homie/models/__init__.py | timpur/homie-discovery-python | f157e3843cae7b1ad3e4fd810b340c35c34473eb | [
"MIT"
] | null | null | null | homie/models/__init__.py | timpur/homie-discovery-python | f157e3843cae7b1ad3e4fd810b340c35c34473eb | [
"MIT"
] | null | null | null | """Homie Models module"""
from .homie_device import HomieDevice
from .homie_node import HomieNode
from .homie_property import HomieProperty
| 23.5 | 41 | 0.822695 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 0.177305 |
5ce7079747845637d28230c2367ed9d83c91e81e | 1,865 | py | Python | setup.py | Pranavj94/All-things-NLP | 009e63e35611679afb54ca981675019679179fd3 | [
"Apache-2.0"
] | null | null | null | setup.py | Pranavj94/All-things-NLP | 009e63e35611679afb54ca981675019679179fd3 | [
"Apache-2.0"
] | null | null | null | setup.py | Pranavj94/All-things-NLP | 009e63e35611679afb54ca981675019679179fd3 | [
"Apache-2.0"
] | 1 | 2021-07-27T05:53:36.000Z | 2021-07-27T05:53:36.000Z | ############################################################################################
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
#U... | 38.061224 | 92 | 0.619839 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,367 | 0.732976 |
5ce7ad53f5d3fe95cc2e2d929219a1298a0e9cfe | 533 | py | Python | src/jobs/migrations/0005_auto_20200507_0951.py | earth-emoji/infotechia | 44ed7aecf052001573b47320e6a1239968d2a067 | [
"BSD-2-Clause"
] | null | null | null | src/jobs/migrations/0005_auto_20200507_0951.py | earth-emoji/infotechia | 44ed7aecf052001573b47320e6a1239968d2a067 | [
"BSD-2-Clause"
] | 11 | 2019-10-27T23:41:10.000Z | 2022-02-10T10:30:00.000Z | src/jobs/migrations/0005_auto_20200507_0951.py | earth-emoji/august | 065d4b449a138ead1557293bffcb20cd2db90a41 | [
"BSD-2-Clause"
] | null | null | null | # Generated by Django 2.2.12 on 2020-05-07 09:51
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('jobs', '0004_application_qualifications'),
]
operations = [
migrations.AlterField(
model_name=... | 26.65 | 150 | 0.666041 | 406 | 0.761726 | 0 | 0 | 0 | 0 | 0 | 0 | 148 | 0.277674 |
5ce7f8d38fe3fa47eb76e2373cb55bdd2e43f061 | 4,257 | py | Python | learn_python/hexlet/data_abstraction/lessons/rectangle.py | PavliukKonstantin/learn-python | 3319f60dea252927deadad8a02d24617dbdc6f37 | [
"MIT"
] | null | null | null | learn_python/hexlet/data_abstraction/lessons/rectangle.py | PavliukKonstantin/learn-python | 3319f60dea252927deadad8a02d24617dbdc6f37 | [
"MIT"
] | null | null | null | learn_python/hexlet/data_abstraction/lessons/rectangle.py | PavliukKonstantin/learn-python | 3319f60dea252927deadad8a02d24617dbdc6f37 | [
"MIT"
] | null | null | null | # Реализуйте абстракцию (набор функций) для работы с прямоугольниками,
# стороны которого всегда параллельны осям. Прямоугольник может
# располагаться в любом месте координатной плоскости.
#
# При такой постановке, достаточно знать только три параметра для однозначного
# задания прямоугольника на плоскости: координаты ... | 24.75 | 78 | 0.651633 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,030 | 0.578024 |
7a20dd4f2ffe3e31b486d6e52ca9dfffca42838b | 5,622 | py | Python | tests/test_routes.py | girardinsamuel/masonite-js-routes | 8918b874ff1ca64069745ca5fbb9d4b464ceaf74 | [
"MIT"
] | 4 | 2020-11-01T22:51:01.000Z | 2021-09-23T23:12:53.000Z | tests/test_routes.py | girardinsamuel/masonite-js-routes | 8918b874ff1ca64069745ca5fbb9d4b464ceaf74 | [
"MIT"
] | 17 | 2021-02-07T17:32:15.000Z | 2022-03-21T22:08:31.000Z | tests/test_routes.py | girardinsamuel/masonite-js-routes | 8918b874ff1ca64069745ca5fbb9d4b464ceaf74 | [
"MIT"
] | null | null | null | from masonite.testing import TestCase
from masonite.routes import Get, Post
from src.masonite.js_routes.routes import Routes as JsRoutes
all_expected_routes = {
"home": {"uri": "home", "methods": ["GET"]},
"posts.show": {"uri": "posts/{post}", "methods": ["GET"]},
"posts.store": {"uri": "posts", "methods"... | 38.244898 | 87 | 0.556208 | 4,966 | 0.883316 | 0 | 0 | 0 | 0 | 0 | 0 | 1,906 | 0.339025 |
7a228588da1a1865d35b49af11b46dd3d71bba03 | 3,532 | py | Python | pysph/examples/sphysics/dambreak_sphysics.py | nauaneed/pysph | 9cb9a859934939307c65a25cbf73e4ecc83fea4a | [
"BSD-3-Clause"
] | 293 | 2017-05-26T14:41:15.000Z | 2022-03-28T09:56:16.000Z | pysph/examples/sphysics/dambreak_sphysics.py | nauaneed/pysph | 9cb9a859934939307c65a25cbf73e4ecc83fea4a | [
"BSD-3-Clause"
] | 217 | 2017-05-29T15:48:14.000Z | 2022-03-24T16:16:55.000Z | pysph/examples/sphysics/dambreak_sphysics.py | nauaneed/pysph | 9cb9a859934939307c65a25cbf73e4ecc83fea4a | [
"BSD-3-Clause"
] | 126 | 2017-05-25T19:17:32.000Z | 2022-03-25T11:23:24.000Z | """Dam break past an obstacle with data from SPHysics. (40 minutes)
For benchmarking, we use the input geometry and discretization as the
SPHYSICS Case 5
(https://wiki.manchester.ac.uk/sphysics/index.php/SPHYSICS_Home_Page)
We only require the INDAT and IPART files generated by SPHysics. These
define respectively, th... | 33.009346 | 79 | 0.625708 | 2,004 | 0.567384 | 0 | 0 | 0 | 0 | 0 | 0 | 866 | 0.245187 |
7a25c60958291760ba28905779810fb418738cea | 396 | py | Python | RaspberryPi/work1.py | DTK-Creaters/Course | eb6518306482d21cc6e5848a783ffc0820b017fd | [
"Apache-2.0"
] | 3 | 2020-05-15T15:14:17.000Z | 2021-04-05T11:39:53.000Z | RaspberryPi/work1.py | DTK-Creaters/Course | eb6518306482d21cc6e5848a783ffc0820b017fd | [
"Apache-2.0"
] | null | null | null | RaspberryPi/work1.py | DTK-Creaters/Course | eb6518306482d21cc6e5848a783ffc0820b017fd | [
"Apache-2.0"
] | 1 | 2020-05-17T02:48:13.000Z | 2020-05-17T02:48:13.000Z | # -*- coding: utf-8 -*-
'''
第1回
LEDの点滅を3回繰り返すプログラムを作ってください。
LEDが3つのバージョンを作ってください。
'''
import RPi.GPIO as GPIO
import time
PINS=[10, 11, 12]
#毎回するおまじない
GPIO.setmode(GPIO.BCM)
GPIO.setup(PINS,GPIO.OUT)
for x in range(3):
GPIO.output(PINS,GPIO.HIGH) # ピン10, 11, 12に電流を流す(HIGH)
time.sleep(2)
GPIO.output(PINS... | 17.217391 | 62 | 0.684343 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 292 | 0.542751 |
7a267bf982c64e072a8e94dbfc7827cb9a57a32f | 87 | py | Python | intro-python/section4_answer.py | DanielMichelson/AusOpenRadar2019 | e340ceca7dee9f064a5146876234fda04802e696 | [
"BSD-2-Clause"
] | 12 | 2019-11-03T10:17:32.000Z | 2022-03-10T09:44:10.000Z | intro-python/section4_answer.py | DanielMichelson/AusOpenRadar2019 | e340ceca7dee9f064a5146876234fda04802e696 | [
"BSD-2-Clause"
] | 2 | 2019-11-07T02:41:23.000Z | 2019-11-11T01:04:47.000Z | intro-python/section4_answer.py | DanielMichelson/AusOpenRadar2019 | e340ceca7dee9f064a5146876234fda04802e696 | [
"BSD-2-Clause"
] | 8 | 2019-09-17T00:28:46.000Z | 2021-06-27T19:38:28.000Z | X = np.arange(-100, 100, 0.1)
Y = 2*X + 1
plt.plot(X,Y)
plt.xlabel('X')
plt.ylabel('Y') | 17.4 | 29 | 0.574713 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.068966 |
7a2796507aa8a3ec5cbd031ab878c3b23d7bbd5a | 1,654 | py | Python | tests/test_reset.py | embray/amqp-mock | dfcf50a4a455063331fa334b19db98cf59d88ea9 | [
"Apache-2.0"
] | 6 | 2021-01-13T08:32:16.000Z | 2022-03-23T08:19:47.000Z | tests/test_reset.py | embray/amqp-mock | dfcf50a4a455063331fa334b19db98cf59d88ea9 | [
"Apache-2.0"
] | 20 | 2020-12-02T09:44:15.000Z | 2022-01-04T16:33:09.000Z | tests/test_reset.py | embray/amqp-mock | dfcf50a4a455063331fa334b19db98cf59d88ea9 | [
"Apache-2.0"
] | 3 | 2020-08-20T13:21:13.000Z | 2021-11-05T19:14:58.000Z | import pytest
from amqp_mock import Message
from ._test_utils.fixtures import amqp_client, mock_client, mock_server
from ._test_utils.helpers import random_uuid, to_binary
from ._test_utils.steps import given, then, when
__all__ = ("mock_client", "mock_server", "amqp_client",)
@pytest.mark.asyncio
async def test_r... | 27.114754 | 73 | 0.692866 | 0 | 0 | 0 | 0 | 1,364 | 0.824667 | 1,301 | 0.786578 | 94 | 0.056832 |
7a27a7a55e2650fe9334f43d5b8dce70103b5737 | 12,749 | py | Python | karta/raster/band.py | fortyninemaps/karta | b35d8cbcfb62e9f1d826a5c73605d34a0c0990b6 | [
"MIT"
] | 84 | 2016-03-18T15:42:02.000Z | 2022-02-20T15:12:28.000Z | karta/raster/band.py | fortyninemaps/karta | b35d8cbcfb62e9f1d826a5c73605d34a0c0990b6 | [
"MIT"
] | 21 | 2016-03-06T01:47:38.000Z | 2019-01-13T20:33:52.000Z | karta/raster/band.py | fortyninemaps/karta | b35d8cbcfb62e9f1d826a5c73605d34a0c0990b6 | [
"MIT"
] | 12 | 2016-03-18T15:33:53.000Z | 2022-03-02T08:18:22.000Z | """
Band implementations for storing data in Karta Grid instances
Overview
--------
`BandIndexer` interface for accessing data from one or more bands
`SimpleBand` use numpy arrays for data storage
`CompressedBand` uses blosc compression to reduce in-memory footprint
Implementation
--------------
Bands are expecte... | 33.287206 | 95 | 0.543337 | 11,823 | 0.927367 | 1,397 | 0.109577 | 452 | 0.035454 | 0 | 0 | 3,029 | 0.237587 |
7a2908a25439c4d98ae8dc45dda5930a19f48d95 | 16,580 | py | Python | engine/views.py | Hetvi07/Keep--Blogging | 89359f3d6bffda4e622bd293f815271fc9dd67b3 | [
"MIT"
] | 4 | 2020-10-07T15:08:24.000Z | 2021-11-10T08:27:58.000Z | engine/views.py | Hetvi07/Keep--Blogging | 89359f3d6bffda4e622bd293f815271fc9dd67b3 | [
"MIT"
] | 1 | 2018-03-13T16:52:35.000Z | 2018-03-15T15:10:08.000Z | engine/views.py | briefausde/djs | aeb44debaa9708090e7e343da45de8fa9d6ba8e8 | [
"MIT"
] | 4 | 2020-10-09T19:36:00.000Z | 2021-11-07T19:49:40.000Z | from math import floor
from django.contrib.auth.mixins import LoginRequiredMixin
from django.db.models import Q
from django.http import HttpResponseRedirect, HttpResponse, HttpResponseForbidden
from django.shortcuts import get_object_or_404
from django.template.context_processors import csrf
from django.views import ge... | 34.541667 | 115 | 0.679614 | 15,500 | 0.934861 | 0 | 0 | 0 | 0 | 0 | 0 | 1,723 | 0.10392 |
7a293597c12a4586fa8facd552e68582538dca9a | 798 | py | Python | main_boyd.py | Ratchet-Studios/HashCode2019Qualifier | 44af942ac48212632d1f0fb1d6408a91975153ed | [
"MIT"
] | null | null | null | main_boyd.py | Ratchet-Studios/HashCode2019Qualifier | 44af942ac48212632d1f0fb1d6408a91975153ed | [
"MIT"
] | null | null | null | main_boyd.py | Ratchet-Studios/HashCode2019Qualifier | 44af942ac48212632d1f0fb1d6408a91975153ed | [
"MIT"
] | null | null | null | import InputOutput
files = ["a_example.txt",
"b_lovely_landscape.txt",
"c_memorable_moments.txt",
"d_pet_pictures.txt",
"e_shiny_selfies.txt"]
data = InputOutput.Data("input_data/" + files[0])
"""
data.photos[photo_id][0] - photo id
data.photos[photo_id][1] - 'h' or 'v'
data.photos[... | 27.517241 | 69 | 0.70802 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 620 | 0.776942 |
7a29de7a43e2c76cd682a22718fc79113ae69a57 | 2,789 | py | Python | Kepler.py | wongongv/scholarship_wonjun | b46a621a756782bf0929ef96738bf484afd1708e | [
"MIT"
] | null | null | null | Kepler.py | wongongv/scholarship_wonjun | b46a621a756782bf0929ef96738bf484afd1708e | [
"MIT"
] | null | null | null | Kepler.py | wongongv/scholarship_wonjun | b46a621a756782bf0929ef96738bf484afd1708e | [
"MIT"
] | null | null | null | import tensorflow as tf
import matplotlib.pyplot as plt
import pdb
import numpy as np
import pandas as pd
from tensorflow.keras import layers
sample_num = 500000
# coeff = tf.cast(4*np.pi*np.pi/(6.673*10**-11), dtype = tf.float32)
coeff = tf.cast(1, dtype = tf.float32)
#try the range of 10**5 ~10**7 for both mass and ... | 34.432099 | 123 | 0.630333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 603 | 0.214514 |
7a2ad667b00c796f41fd7d66fe4913a3f7cf25d9 | 16,727 | py | Python | ScPlayback.py | karinharp/EM-uNetPi | a2bf585a039ef228bc34d558941865088da259b9 | [
"MIT"
] | 42 | 2018-08-21T02:49:52.000Z | 2022-02-07T15:49:05.000Z | ScPlayback.py | karinharp/EM-uNetPi | a2bf585a039ef228bc34d558941865088da259b9 | [
"MIT"
] | null | null | null | ScPlayback.py | karinharp/EM-uNetPi | a2bf585a039ef228bc34d558941865088da259b9 | [
"MIT"
] | 6 | 2018-10-05T14:32:58.000Z | 2022-02-07T06:09:22.000Z | import sys, getopt, struct, time, termios, fcntl, sys, os, colorsys, threading, time, datetime, subprocess, random, os.path, math, json
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/fbtft')
from RenderManager import RenderManager
from WanemManager import WanemManager
from ScBase import ScBase
from gfx ... | 38.9 | 135 | 0.511987 | 16,330 | 0.976266 | 0 | 0 | 0 | 0 | 0 | 0 | 1,834 | 0.109643 |
7a2b60eeeb9c5a441e5b481a07de842558d9a0f8 | 1,589 | py | Python | IOPool/Output/test/PoolOutputTestUnscheduled_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | IOPool/Output/test/PoolOutputTestUnscheduled_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | IOPool/Output/test/PoolOutputTestUnscheduled_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
process = cms.Process("TESTOUTPUT")
process.load("FWCore.Framework.test.cmsExceptionsFatal_cff")
process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(20)
)
process.Thing = cms.EDProducer("ThingProducer")
process.OtherThing = cms.EDProducer("OtherThingProduc... | 26.04918 | 131 | 0.721838 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 363 | 0.228446 |
7a2b807cb521dd6964689b0a0c90c6958262c724 | 70,390 | py | Python | pysnmp-with-texts/A3COM-HUAWEI-SYS-MAN-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/A3COM-HUAWEI-SYS-MAN-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/A3COM-HUAWEI-SYS-MAN-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module A3COM-HUAWEI-SYS-MAN-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/A3COM-HUAWEI-SYS-MAN-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:07:12 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.... | 189.730458 | 5,380 | 0.76427 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 32,718 | 0.46481 |
7a2e304b9a1e71032f824334c3a9e4c7ae95323f | 3,748 | py | Python | pineapple/pineapple_core/core/flows.py | societe-generale/Pineapple | 2aad2fbd0d7e231608d1d02bce45a28cd22f82a8 | [
"MIT"
] | null | null | null | pineapple/pineapple_core/core/flows.py | societe-generale/Pineapple | 2aad2fbd0d7e231608d1d02bce45a28cd22f82a8 | [
"MIT"
] | null | null | null | pineapple/pineapple_core/core/flows.py | societe-generale/Pineapple | 2aad2fbd0d7e231608d1d02bce45a28cd22f82a8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""This module contains everything that is related to flows.
This module contains one class : Flow.
"""
from typing import Any, Dict
from pineapple_core.utils.serialization import make_value_serializable
class Flow:
"""Class that represents a flow
Attributes
==========
name:... | 27.15942 | 87 | 0.567236 | 3,515 | 0.937834 | 0 | 0 | 356 | 0.094984 | 0 | 0 | 2,197 | 0.586179 |
7a2fe90ca9c1760303393523fbb9dfacdfef8238 | 11,435 | py | Python | tests/test_main.py | Asday/ytdl | 96a51ba3589e855b27f75095b0cd4a6f00f8eefa | [
"MIT"
] | null | null | null | tests/test_main.py | Asday/ytdl | 96a51ba3589e855b27f75095b0cd4a6f00f8eefa | [
"MIT"
] | 1 | 2019-04-15T02:09:37.000Z | 2019-04-15T02:09:37.000Z | tests/test_main.py | Asday/ytdl | 96a51ba3589e855b27f75095b0cd4a6f00f8eefa | [
"MIT"
] | null | null | null | import datetime
import os
import subprocess
from django.apps import apps
from django.core.management import call_command
import attr
from freezegun import freeze_time
import pytest
import pytz
from downloader.exceptions import (
NoFilesCreatedError,
TooManyFilesCreatedError,
YoutubeDLError,
)
from playli... | 30.412234 | 76 | 0.457718 | 104 | 0.009095 | 0 | 0 | 8,935 | 0.781373 | 0 | 0 | 2,773 | 0.242501 |
7a307f2f55d5637cf1662f83fbfb6b7206eaf55e | 4,012 | py | Python | Tests/test_doc.py | seadavis/StoryNode | e863e68e4b95b92a074554c2399492dbfb54cbab | [
"Apache-2.0"
] | null | null | null | Tests/test_doc.py | seadavis/StoryNode | e863e68e4b95b92a074554c2399492dbfb54cbab | [
"Apache-2.0"
] | null | null | null | Tests/test_doc.py | seadavis/StoryNode | e863e68e4b95b92a074554c2399492dbfb54cbab | [
"Apache-2.0"
] | null | null | null | import spacy
import sys
from spacy.matcher import Matcher
from src.core.document import Document
from src.core.relation_extraction import *
def test_one_to_one_replacement():
sample_text = "Python code is the cleanest code around unlike C++ which is garbage nonsense"
doc = Document(sample_text)
doc2 = Docu... | 39.722772 | 127 | 0.709123 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,622 | 0.404287 |
7a31027b5ed0e4096f71764a61c58585d6898d31 | 116 | py | Python | kigo/bpmn/elements/definitions.py | AsyncMicroStack/kigo-bpmn | dfe8c312399f86067393973a0c28a8695bb5e07a | [
"Apache-2.0"
] | null | null | null | kigo/bpmn/elements/definitions.py | AsyncMicroStack/kigo-bpmn | dfe8c312399f86067393973a0c28a8695bb5e07a | [
"Apache-2.0"
] | null | null | null | kigo/bpmn/elements/definitions.py | AsyncMicroStack/kigo-bpmn | dfe8c312399f86067393973a0c28a8695bb5e07a | [
"Apache-2.0"
] | null | null | null | from kigo.bpmn.elements.element import Element
class BpmnDefinitions(Element):
item_name = "bpmn:definitions"
| 19.333333 | 46 | 0.784483 | 66 | 0.568966 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.155172 |
7a324221f1f84a57129bf65acf3d694eadd4186b | 900 | py | Python | where/parsers/vascc_crf.py | ingridfausk/where | b65398911075b7ddef3a3a1146efa428eae498fe | [
"MIT"
] | 16 | 2018-08-31T10:31:11.000Z | 2022-03-15T16:07:24.000Z | where/parsers/vascc_crf.py | ingridfausk/where | b65398911075b7ddef3a3a1146efa428eae498fe | [
"MIT"
] | 5 | 2018-07-13T14:04:24.000Z | 2021-06-17T02:14:44.000Z | where/parsers/vascc_crf.py | ingridfausk/where | b65398911075b7ddef3a3a1146efa428eae498fe | [
"MIT"
] | 15 | 2018-06-07T05:45:24.000Z | 2022-03-15T16:07:27.000Z | """A parser for reading radio source coordinates from VASCC apriori crf
Description:
------------
Reads radio source coordinates from VASCC (VLBI Software Analysis Comparison Campaign) apriori file.
"""
# Midgard imports
from midgard.dev import plugins
from midgard.parsers._parser_line import LineParser
@plugins.r... | 25.714286 | 100 | 0.576667 | 571 | 0.634444 | 0 | 0 | 589 | 0.654444 | 0 | 0 | 353 | 0.392222 |
7a32575dae7683b788c3a10ea2963e61f6b9dee6 | 1,520 | py | Python | data_engineering/opcua/client.py | croidzen/playground | 37dfe861cdc1803b0f51a0ee623f42c450e75f04 | [
"MIT"
] | null | null | null | data_engineering/opcua/client.py | croidzen/playground | 37dfe861cdc1803b0f51a0ee623f42c450e75f04 | [
"MIT"
] | null | null | null | data_engineering/opcua/client.py | croidzen/playground | 37dfe861cdc1803b0f51a0ee623f42c450e75f04 | [
"MIT"
] | null | null | null | import asyncio
import sys
# sys.path.insert(0, "..")
import logging
from asyncua import Client, Node, ua
logging.basicConfig(level=logging.INFO)
_logger = logging.getLogger('asyncua')
async def main():
url = 'opc.tcp://localhost:4840/freeopcua/server/'
# url = 'opc.tcp://commsvr.com:51234/UA/CAS_UA_Server'
... | 44.705882 | 122 | 0.678289 | 0 | 0 | 0 | 0 | 0 | 0 | 1,280 | 0.842105 | 928 | 0.610526 |
7a335c589184f653a55c2e135b27fd8fe0eb98ba | 2,783 | py | Python | elliptic_moab/Mesh/Selector.py | padmec-reservoir/elliptic_moab | a3b15f29a621c35a8279fd163326a0895aa67f30 | [
"MIT"
] | null | null | null | elliptic_moab/Mesh/Selector.py | padmec-reservoir/elliptic_moab | a3b15f29a621c35a8279fd163326a0895aa67f30 | [
"MIT"
] | null | null | null | elliptic_moab/Mesh/Selector.py | padmec-reservoir/elliptic_moab | a3b15f29a621c35a8279fd163326a0895aa67f30 | [
"MIT"
] | null | null | null | from typing import Type
from elliptic.Kernel.Context import ContextDelegate
from elliptic_meshql.Selector import SelectorImplementationBase
class LoopDelegate(ContextDelegate):
loop_name = ''
def __init__(self, context, unique_id):
super().__init__(context, unique_id)
self.loop_var_prefix ... | 36.618421 | 105 | 0.657923 | 2,636 | 0.947179 | 0 | 0 | 0 | 0 | 0 | 0 | 560 | 0.201222 |
7a33a1943f4be516367d61e93a16ed20c91bac15 | 100 | py | Python | brain_training/programming_challenges/leetcode/easy/T58_Length_of_Last_Word.py | kuzxnia/algoritms | eda3185f39d79a2657b7ef0da869fcc6b825889d | [
"MIT"
] | null | null | null | brain_training/programming_challenges/leetcode/easy/T58_Length_of_Last_Word.py | kuzxnia/algoritms | eda3185f39d79a2657b7ef0da869fcc6b825889d | [
"MIT"
] | null | null | null | brain_training/programming_challenges/leetcode/easy/T58_Length_of_Last_Word.py | kuzxnia/algoritms | eda3185f39d79a2657b7ef0da869fcc6b825889d | [
"MIT"
] | null | null | null | def lengthOfLastWord_(s):
words = s.split()
return 0 if len(words) == 0 else len(words[-1])
| 25 | 51 | 0.63 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7a33a8a8695860ddb6163f6f5857cdcec9984aa3 | 822 | py | Python | cmskit/recipes/menu.py | ozgurgunes/django-cmskit | 19d14fbb57702a6c56b6b3a5d859c93533ff1535 | [
"MIT"
] | 1 | 2015-09-28T10:10:34.000Z | 2015-09-28T10:10:34.000Z | cmskit/recipes/menu.py | ozgurgunes/django-cmskit | 19d14fbb57702a6c56b6b3a5d859c93533ff1535 | [
"MIT"
] | null | null | null | cmskit/recipes/menu.py | ozgurgunes/django-cmskit | 19d14fbb57702a6c56b6b3a5d859c93533ff1535 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import get_language
from cms.menu_bases import CMSAttachMenu
from menus.base import Menu, NavigationNode
from menus.menu_pool import menu_pool
from cmskit.recipes.models import Recipe
class RecipesMenu(CMSAtt... | 27.4 | 66 | 0.600973 | 479 | 0.582725 | 0 | 0 | 0 | 0 | 0 | 0 | 37 | 0.045012 |
7a33ddcfa2b3e722458ff7163d0ad438baf597ed | 6,218 | py | Python | code/results-past/figure-3-b.py | shaifulcse/codemetrics-with-context-replication | 9f0fe6e840d204b70efc9610e6887a64f9a51ce7 | [
"MIT"
] | null | null | null | code/results-past/figure-3-b.py | shaifulcse/codemetrics-with-context-replication | 9f0fe6e840d204b70efc9610e6887a64f9a51ce7 | [
"MIT"
] | null | null | null | code/results-past/figure-3-b.py | shaifulcse/codemetrics-with-context-replication | 9f0fe6e840d204b70efc9610e6887a64f9a51ce7 | [
"MIT"
] | null | null | null | """
"""
import re
import os
import matplotlib.pyplot as plt
import re
import numpy as np
import math
from scipy.stats.stats import pearsonr
from scipy.stats.stats import kendalltau
import scipy
from matplotlib.patches import Rectangle
from scipy import stats
import seaborn as sns
import pandas as pd
sns.set(font_scal... | 24.772908 | 122 | 0.603731 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 902 | 0.145063 |
7a34367f5bced4609356f0cde39e3a13b062d891 | 4,585 | py | Python | ppmi_tweet_collector.py | wolferobert3/uweat_icsc_2022 | 172f4cdd737f7405bdc83357e3dabeee94251efc | [
"MIT"
] | null | null | null | ppmi_tweet_collector.py | wolferobert3/uweat_icsc_2022 | 172f4cdd737f7405bdc83357e3dabeee94251efc | [
"MIT"
] | null | null | null | ppmi_tweet_collector.py | wolferobert3/uweat_icsc_2022 | 172f4cdd737f7405bdc83357e3dabeee94251efc | [
"MIT"
] | null | null | null | import pandas as pd
from os import path, listdir
import pickle
from nltk import word_tokenize
import json
import re
import emoji
import string
TARGET_STATE = 'OR'
source_dir = f''
twitter_files = [i for i in list(listdir(source_dir)) if TARGET_STATE in i]
punctuation_list = list(string.punctuation) + ['.... | 39.188034 | 144 | 0.638168 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 776 | 0.168953 |
7a38fc376b5e5fd6f4153aa152aa553785289bf1 | 911 | py | Python | all/054.py | brenodt/Desafio-365-dias-programando | 6c899b4f2e314b9a3a75734f39509a665016e206 | [
"MIT"
] | null | null | null | all/054.py | brenodt/Desafio-365-dias-programando | 6c899b4f2e314b9a3a75734f39509a665016e206 | [
"MIT"
] | null | null | null | all/054.py | brenodt/Desafio-365-dias-programando | 6c899b4f2e314b9a3a75734f39509a665016e206 | [
"MIT"
] | null | null | null |
from collections import OrderedDict # OrderedDict deve ser importado!
def enesimo_nao_repetido(entrada: str, n: int):
# Cria o dicionário usando OrderedDict e inicializa
# cada chave com o valor 0
dicionario = OrderedDict.fromkeys(entrada, 0)
# Conta a ocorrência de cada letra
for letra in entr... | 28.46875 | 70 | 0.668496 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 374 | 0.406522 |
7a397491b82c42c5a64d723d577f9c2c7718bf3a | 187 | py | Python | testPins.py | brammieman1/MazeSolver | 22d5a91e95fe88aecd4d4b1f75218d628d2e5fe4 | [
"MIT"
] | null | null | null | testPins.py | brammieman1/MazeSolver | 22d5a91e95fe88aecd4d4b1f75218d628d2e5fe4 | [
"MIT"
] | null | null | null | testPins.py | brammieman1/MazeSolver | 22d5a91e95fe88aecd4d4b1f75218d628d2e5fe4 | [
"MIT"
] | null | null | null | import wiringpi2 as wiringpi
import time
wiringpi.wiringPiSetupGpio()
wiringpi.pinMode(17,1)
wiringpi.digitalWrite(17,1)
time.sleep(4)
wiringpi.digitalWrite(17,0)
wiringpi.pinMode(17,0)
| 18.7 | 28 | 0.812834 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7a3acfc511ddee7da218b4ddb4970a9394b9e44a | 5,946 | py | Python | venv/lib/python3.7/site-packages/rqdatac/services/orm/financial_indicator_sql.py | CatTiger/vnpy | 7901a0fb80a5b44d6fc752bd4b2b64ec62c8f84b | [
"MIT"
] | null | null | null | venv/lib/python3.7/site-packages/rqdatac/services/orm/financial_indicator_sql.py | CatTiger/vnpy | 7901a0fb80a5b44d6fc752bd4b2b64ec62c8f84b | [
"MIT"
] | 1 | 2020-04-21T02:42:32.000Z | 2020-04-21T02:42:32.000Z | venv/lib/python3.7/site-packages/rqdatac/services/orm/financial_indicator_sql.py | CatTiger/vnpy | 7901a0fb80a5b44d6fc752bd4b2b64ec62c8f84b | [
"MIT"
] | null | null | null | # coding: utf-8
from sqlalchemy import Numeric, Column
from .fundamental_base_sql import FundamentalBase
class AnaStkFinIdx(FundamentalBase):
earnings_per_share = Column(Numeric(18, 4))
fully_diluted_earnings_per_share = Column(Numeric(18, 4))
diluted_earnings_per_share = Column(Numeric(18, 4))
adjust... | 50.389831 | 71 | 0.736798 | 5,838 | 0.981837 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0.002523 |
7a3e3c0c5a227d2ab34cab782fab2492bb8ae99d | 35,990 | py | Python | teospy/iceliq4.py | jarethholt/teospy | 3bb23e67bbb765c0842aa8d4a73c1d55ea395d2f | [
"MIT"
] | null | null | null | teospy/iceliq4.py | jarethholt/teospy | 3bb23e67bbb765c0842aa8d4a73c1d55ea395d2f | [
"MIT"
] | null | null | null | teospy/iceliq4.py | jarethholt/teospy | 3bb23e67bbb765c0842aa8d4a73c1d55ea395d2f | [
"MIT"
] | null | null | null | """Ice-liquid water equilibrium functions.
This module provides thermodynamic properties of ice and liquid water in
equilibrium, e.g. the enthalpy of melting.
:Examples:
>>> pressure(temp=270.)
39313338.8825
>>> densityliq(temp=270.)
1019.05568894
>>> enthalpymelt(temp=270.)
325166.686739
>>> entropymelt(temp=270.)
... | 39.549451 | 80 | 0.676077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28,143 | 0.781967 |
7a40b49d80fe3632355e2539a5130f841bba126c | 1,091 | py | Python | zipline/gens/composites.py | dxcv/zipline_chstock | 6cbd7e0c7d70d55d55edf86dc3f206f15a8bddc9 | [
"Apache-2.0"
] | 16 | 2019-10-15T08:35:36.000Z | 2021-12-10T14:43:49.000Z | zipline/gens/composites.py | dxcv/zipline_chstock | 6cbd7e0c7d70d55d55edf86dc3f206f15a8bddc9 | [
"Apache-2.0"
] | 2 | 2021-03-31T19:14:15.000Z | 2021-12-13T20:20:50.000Z | zipline/gens/composites.py | fangshi1991/zipline_chstock | 7911642780fa57f92e1705b9c0acaeb837b3d98f | [
"Apache-2.0"
] | 11 | 2019-10-15T14:25:00.000Z | 2021-12-09T15:42:06.000Z | #encoding:utf-8
# Copyright 2013 Quantopian, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 32.088235 | 74 | 0.734189 | 0 | 0 | 535 | 0.464813 | 0 | 0 | 0 | 0 | 827 | 0.718506 |
7a418c864b72cb7a9e6938b4593fb63b01445188 | 716 | py | Python | sdap/studies/migrations/0026_auto_20191128_1041.py | umr1085-irset/reproGenomicsViewer | 187ea320668e567d01572bfbf9497bebd691569a | [
"MIT"
] | null | null | null | sdap/studies/migrations/0026_auto_20191128_1041.py | umr1085-irset/reproGenomicsViewer | 187ea320668e567d01572bfbf9497bebd691569a | [
"MIT"
] | 1 | 2020-02-16T10:48:55.000Z | 2020-02-16T11:06:36.000Z | sdap/studies/migrations/0026_auto_20191128_1041.py | umr1085-irset/reproGenomicsViewer | 187ea320668e567d01572bfbf9497bebd691569a | [
"MIT"
] | 4 | 2019-11-04T15:00:55.000Z | 2020-03-02T13:36:17.000Z | # Generated by Django 2.2.5 on 2019-11-28 10:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('auth', '0011_update_proxy_permissions'),
('studies', '0025_auto_20191128_0958'),
]
operations = [
migrations.AddField(
m... | 28.64 | 101 | 0.622905 | 623 | 0.870112 | 0 | 0 | 0 | 0 | 0 | 0 | 234 | 0.326816 |
7a43eae4859f7e4a0ab17cb3b690aad1f9bb0c07 | 7,430 | py | Python | fpga/fourteensegmentdisplay.py | renzenicolai/nmigen-experiments | c6048ad9cbb29d5b478538ef04997a00c0e5dd1b | [
"Unlicense"
] | null | null | null | fpga/fourteensegmentdisplay.py | renzenicolai/nmigen-experiments | c6048ad9cbb29d5b478538ef04997a00c0e5dd1b | [
"Unlicense"
] | null | null | null | fpga/fourteensegmentdisplay.py | renzenicolai/nmigen-experiments | c6048ad9cbb29d5b478538ef04997a00c0e5dd1b | [
"Unlicense"
] | null | null | null | from nmigen import *
from nmigen.build import Platform, ResourceError
from nmigen.back.pysim import Simulator, Delay, Settle
# Small helper classes to simulate the structure of the platform device
class _OutputSimulator():
def __init__(self, signal):
self.signal = signal
self.eq = self.signal.eq
class _SegmentSi... | 40.162162 | 92 | 0.490983 | 6,816 | 0.917362 | 206 | 0.027725 | 0 | 0 | 0 | 0 | 1,690 | 0.227456 |
7a4693933697b877ba83ef27e07a84e5fbb283c6 | 884 | py | Python | motorway/contrib/amazon_kinesis/intersections.py | alesdotio/motorway | 8514f9e6494c9e55576705b72dda306c175e62dc | [
"Apache-2.0"
] | 1 | 2016-09-16T14:51:59.000Z | 2016-09-16T14:51:59.000Z | motorway/contrib/amazon_kinesis/intersections.py | alesdotio/motorway | 8514f9e6494c9e55576705b72dda306c175e62dc | [
"Apache-2.0"
] | null | null | null | motorway/contrib/amazon_kinesis/intersections.py | alesdotio/motorway | 8514f9e6494c9e55576705b72dda306c175e62dc | [
"Apache-2.0"
] | 1 | 2020-12-12T17:35:55.000Z | 2020-12-12T17:35:55.000Z | import json
import boto.kinesis
from motorway.intersection import Intersection
class KinesisInsertIntersection(Intersection):
stream_name = None
def __init__(self, **kwargs):
super(KinesisInsertIntersection, self).__init__(**kwargs)
self.conn = boto.kinesis.connect_to_region(**self.connection... | 29.466667 | 104 | 0.640271 | 802 | 0.90724 | 213 | 0.24095 | 0 | 0 | 0 | 0 | 176 | 0.199095 |
7a469ca4efeb9a5e00a92c23d28f63e455d24a3f | 266 | py | Python | image processing/4/1/1.py | DzmitrySakalenka/stepik_courses | 7c43ac35cd921e8f6f96fb4f15f77ace38cc2d21 | [
"MIT"
] | null | null | null | image processing/4/1/1.py | DzmitrySakalenka/stepik_courses | 7c43ac35cd921e8f6f96fb4f15f77ace38cc2d21 | [
"MIT"
] | null | null | null | image processing/4/1/1.py | DzmitrySakalenka/stepik_courses | 7c43ac35cd921e8f6f96fb4f15f77ace38cc2d21 | [
"MIT"
] | null | null | null | from skimage.io import imread, imsave
from numpy import ones
from scipy.signal import convolve2d
import warnings
warnings.filterwarnings("ignore")
img = imread('img.png')
img = convolve2d(img, ones((5, 5), dtype=int), mode='valid') // 25
imsave('out_img.png', img) | 26.6 | 66 | 0.744361 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 37 | 0.139098 |
7a4736a2415c86f69bf9548f7c81b587162aa65a | 2,087 | py | Python | embedKB/datatools/__init__.py | zafarali/embedKB | 52d7b65cd47caebb01498826a4c67c76e48ed2c7 | [
"MIT"
] | 1 | 2018-04-29T18:43:56.000Z | 2018-04-29T18:43:56.000Z | embedKB/datatools/__init__.py | zafarali/embedKB | 52d7b65cd47caebb01498826a4c67c76e48ed2c7 | [
"MIT"
] | null | null | null | embedKB/datatools/__init__.py | zafarali/embedKB | 52d7b65cd47caebb01498826a4c67c76e48ed2c7 | [
"MIT"
] | 1 | 2020-01-08T03:01:09.000Z | 2020-01-08T03:01:09.000Z | from .knowledgebase import KnowledgeBase
from .dataset import Dataset
from .dataset import SmartNegativeSampling, NegativeSampling
def get_data(data_path, batch_size):
train_path = data_path + 'train.txt'
valid_path = data_path + 'valid.txt'
test_path = data_path + 'test.txt'
# load knowledge base of ... | 35.372881 | 69 | 0.735985 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 446 | 0.213704 |
7a4758fe075141b33a34759f92db71968b493b1d | 3,034 | py | Python | middle-tier/app/interact_contract.py | Surfndez/Microsoft-Identities-on-the-Ethereum-Blockchain | 35fc2ac329f3a17b59d5bb90115e1e8f7e2ae501 | [
"MIT"
] | 4 | 2018-07-23T22:01:16.000Z | 2020-09-22T11:15:39.000Z | middle-tier/app/interact_contract.py | Surfndez/Microsoft-Identities-on-the-Ethereum-Blockchain | 35fc2ac329f3a17b59d5bb90115e1e8f7e2ae501 | [
"MIT"
] | 1 | 2021-01-21T13:15:16.000Z | 2021-01-21T13:15:16.000Z | middle-tier/app/interact_contract.py | Surfndez/Microsoft-Identities-on-the-Ethereum-Blockchain | 35fc2ac329f3a17b59d5bb90115e1e8f7e2ae501 | [
"MIT"
] | 5 | 2018-07-20T00:23:11.000Z | 2020-09-22T11:15:47.000Z | import json
import time
import web3
import sha3
from os import environ
from web3 import Web3, HTTPProvider
from web3.contract import ConciseContract
from contract import IDENTITY_STORE_JSON
API_KEY = environ.get('API_KEY')
PRIVATE_KEY = environ.get('PRIVATE_KEY')
CONTRACT_ADDRESS = environ.get('CONTRACT_ADDRESS')
... | 30.34 | 83 | 0.627884 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 557 | 0.183586 |
7a4900d73a1ad7f743a5146f147752cc74077496 | 2,227 | py | Python | startup/90-functions.py | NSLS-II-XPD-tomo/profile_collection | a960faa6bd24dc87bd094399f2124f80159207be | [
"BSD-3-Clause"
] | null | null | null | startup/90-functions.py | NSLS-II-XPD-tomo/profile_collection | a960faa6bd24dc87bd094399f2124f80159207be | [
"BSD-3-Clause"
] | null | null | null | startup/90-functions.py | NSLS-II-XPD-tomo/profile_collection | a960faa6bd24dc87bd094399f2124f80159207be | [
"BSD-3-Clause"
] | 2 | 2021-11-08T19:13:50.000Z | 2022-01-08T16:17:01.000Z | print(f'Loading {__file__}')
def configure_area_det(det,acq_time,acq_period=None,exposure=None,num_exposures=1):
if det.name == 'prosilica':
acq_time = min(acq_time,25)
if det.cam.acquire.get() == 0:
yield from bps.abs_set(det.cam.acquire, 1, wait=True)
if det.name == 'dexela': ... | 40.490909 | 118 | 0.624158 | 0 | 0 | 2,194 | 0.985182 | 0 | 0 | 0 | 0 | 351 | 0.157611 |
7a4982c716e53e21237cd2d0f5536f385174c347 | 15,085 | py | Python | same-same.py | gwk/same-same | 065674668bf26dd2bcc62ab7a556629d21647fe4 | [
"CC0-1.0"
] | 22 | 2018-05-25T20:45:46.000Z | 2021-01-24T23:26:20.000Z | same-same.py | gwk/same-same | 065674668bf26dd2bcc62ab7a556629d21647fe4 | [
"CC0-1.0"
] | null | null | null | same-same.py | gwk/same-same | 065674668bf26dd2bcc62ab7a556629d21647fe4 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
# Dedicated to the public domain under CC0: https://creativecommons.org/publicdomain/zero/1.0/.
import re
from argparse import ArgumentParser
from difflib import SequenceMatcher
from itertools import chain, groupby
from os import environ
from sys import stderr, stdout
from typing import *
from t... | 33.300221 | 124 | 0.646868 | 535 | 0.035466 | 0 | 0 | 84 | 0.005568 | 0 | 0 | 5,062 | 0.335565 |
7a49b0b0bcc9d432f9a0ecf41ea8e6994b42eabc | 2,443 | py | Python | hyperglass/models/commands/__init__.py | blkmajik/hyperglass | c52a6f609843177671d38bcad59b8bd658f46b64 | [
"BSD-3-Clause-Clear"
] | 298 | 2019-06-17T13:51:46.000Z | 2021-06-23T18:09:51.000Z | hyperglass/models/commands/__init__.py | blkmajik/hyperglass | c52a6f609843177671d38bcad59b8bd658f46b64 | [
"BSD-3-Clause-Clear"
] | 137 | 2019-06-18T12:59:37.000Z | 2021-06-19T05:50:58.000Z | hyperglass/models/commands/__init__.py | blkmajik/hyperglass | c52a6f609843177671d38bcad59b8bd658f46b64 | [
"BSD-3-Clause-Clear"
] | 42 | 2019-06-18T07:25:23.000Z | 2021-06-18T17:40:20.000Z | """Validate command configuration variables."""
# Local
from .frr import FRRCommands
from .bird import BIRDCommands
from .tnsr import TNSRCommands
from .vyos import VyosCommands
from ..main import HyperglassModelExtra
from .common import CommandGroup
from .huawei import HuaweiCommands
from .juniper import JuniperComma... | 31.727273 | 66 | 0.720016 | 1,371 | 0.561195 | 0 | 0 | 581 | 0.237822 | 0 | 0 | 545 | 0.223086 |
7a4aca28089648fa6cf04d319fbef84a5a8cbf94 | 1,912 | py | Python | ED_Chapter4.py | Wang-ZhengYi/ED_Chapter5_code | f63861ab8b6bce4756b7f0e1fd15041a976c1a38 | [
"MIT"
] | 1 | 2019-12-19T11:04:49.000Z | 2019-12-19T11:04:49.000Z | ED_Chapter4.py | Wang-ZhengYi/ED_assignment | f63861ab8b6bce4756b7f0e1fd15041a976c1a38 | [
"MIT"
] | null | null | null | ED_Chapter4.py | Wang-ZhengYi/ED_assignment | f63861ab8b6bce4756b7f0e1fd15041a976c1a38 | [
"MIT"
] | null | null | null | #!\usr\bin\python3
# -*- coding: utf-8 -*-
'''
Created on Oct. 2019
ED_Chapter4
@author: ZYW @ BNU
'''
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import cm
from scipy import interpolate
from mpl_toolkits.mplot3d import Axes3D
import os
from matplotlib import font_manager as fm, rcParams
impo... | 29.875 | 80 | 0.643828 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 673 | 0.351987 |
7a4b1a9183a636b76d0da0668faad0f0e939fdff | 25 | py | Python | dataloaders/__init__.py | RishiTejaMadduri/pyramid-fuse | a8bad9adc2734572c87c5ee4c2a956aa2d04fb97 | [
"MIT"
] | null | null | null | dataloaders/__init__.py | RishiTejaMadduri/pyramid-fuse | a8bad9adc2734572c87c5ee4c2a956aa2d04fb97 | [
"MIT"
] | null | null | null | dataloaders/__init__.py | RishiTejaMadduri/pyramid-fuse | a8bad9adc2734572c87c5ee4c2a956aa2d04fb97 | [
"MIT"
] | null | null | null |
from .voc1 import VOC
| 5 | 21 | 0.68 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7a4c25d4caa2651ec1f11e6dec4ad5d6ef3519b1 | 6,618 | py | Python | test/dramatis/actor/name_test.py | dramatis/dramatis | 1a43a6be1d7e7e9fd2cde052430d6e84700dc822 | [
"MIT"
] | 5 | 2015-11-05T01:51:29.000Z | 2019-04-16T09:09:19.000Z | test/dramatis/actor/name_test.py | halorgium/dramatis | 50b35c4e79c33e438cb9f5eeab51ab73119bd75d | [
"MIT"
] | null | null | null | test/dramatis/actor/name_test.py | halorgium/dramatis | 50b35c4e79c33e438cb9f5eeab51ab73119bd75d | [
"MIT"
] | 1 | 2022-03-03T19:51:04.000Z | 2022-03-03T19:51:04.000Z | #!/bin/env python
import inspect
import sys
import os.path
import threading
from logging import warning
sys.path[0:0] = [ os.path.join( os.path.dirname( inspect.getabsfile( inspect.currentframe() ) ), '..', '..', 'lib' ) ]
from inspect import currentframe
from inspect import getframeinfo
from traceback import form... | 29.154185 | 118 | 0.586129 | 5,948 | 0.898761 | 0 | 0 | 0 | 0 | 0 | 0 | 1,225 | 0.185101 |
7a4c4b862367ea16f7d5febe0d7eca4640eb21bd | 6,281 | py | Python | ReanalysisRetrieval/NARR_RetrieveLocation_Variable.py | shaunwbell/FOCI_Analysis | dde4a5f0badd76fe5719575d5c138813ab156b70 | [
"MIT"
] | null | null | null | ReanalysisRetrieval/NARR_RetrieveLocation_Variable.py | shaunwbell/FOCI_Analysis | dde4a5f0badd76fe5719575d5c138813ab156b70 | [
"MIT"
] | null | null | null | ReanalysisRetrieval/NARR_RetrieveLocation_Variable.py | shaunwbell/FOCI_Analysis | dde4a5f0badd76fe5719575d5c138813ab156b70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Background:
--------
NARR_RetrieveLocation_Variable.py
Purpose:
--------
Routines to retrieve, output NARR data from a single point over time to combine for analysis
History:
--------
2016-09-20 : Bell - simplify existing multiple routines for various locations into one packag... | 30.940887 | 145 | 0.660723 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,446 | 0.548639 |
7a4dcae230249ada20dad7e710e2b47b9491c925 | 710 | py | Python | rootUtilLib.py | fermi-lat/rootUtil | 3d326b1c35284080b3049cdcee8107205851048b | [
"BSD-3-Clause"
] | null | null | null | rootUtilLib.py | fermi-lat/rootUtil | 3d326b1c35284080b3049cdcee8107205851048b | [
"BSD-3-Clause"
] | null | null | null | rootUtilLib.py | fermi-lat/rootUtil | 3d326b1c35284080b3049cdcee8107205851048b | [
"BSD-3-Clause"
] | null | null | null | # $Header: /nfs/slac/g/glast/ground/cvs/GlastRelease-scons/rootUtil/rootUtilLib.py,v 1.3 2008/10/27 17:49:11 ecephas Exp $
def generate(env, **kw):
if not kw.get('depsOnly', 0):
env.Tool('addLibrary', library = ['rootUtil'])
if env['PLATFORM']=='win32' and env.get('CONTAINERNAME','')=='GlastRelease'... | 50.714286 | 122 | 0.649296 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 369 | 0.519718 |
7a4f041d9b0a170d8f07557ba868331447b86391 | 3,748 | py | Python | experiments/prediction_similarity.py | CrispyHarder/deep-weight-prior | b87e61d6ad590c61b90e188ec86bfb956073be65 | [
"MIT"
] | null | null | null | experiments/prediction_similarity.py | CrispyHarder/deep-weight-prior | b87e61d6ad590c61b90e188ec86bfb956073be65 | [
"MIT"
] | null | null | null | experiments/prediction_similarity.py | CrispyHarder/deep-weight-prior | b87e61d6ad590c61b90e188ec86bfb956073be65 | [
"MIT"
] | null | null | null | import os
import torch
import argparse
import yaml
import utils
import matplotlib.pyplot as plt
import seaborn as sns
import math
import numpy as np
from datetime import date
def plot_matrix_as_heatmap(matrix,show=False,title='',xlabel='',ylabel='',save_path=''):
'''plots the cosine similariy ma... | 33.765766 | 122 | 0.648346 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 429 | 0.114461 |
7a4f2b510df94c47aa5b903e4031611038525ce6 | 425 | py | Python | website/models/user.py | olaruandreea/flaskbootstrapblog | 462f2f700c3b73a794842f1fad4b318c6406c678 | [
"MIT"
] | null | null | null | website/models/user.py | olaruandreea/flaskbootstrapblog | 462f2f700c3b73a794842f1fad4b318c6406c678 | [
"MIT"
] | 4 | 2020-05-03T11:45:01.000Z | 2020-06-13T19:43:26.000Z | website/models/user.py | olaruandreea/flaskbootstrapblog | 462f2f700c3b73a794842f1fad4b318c6406c678 | [
"MIT"
] | null | null | null | from datetime import datetime
from flask_login import UserMixin
from flask import Flask, current_app
from website.routes import get_db
db = get_db()
class User(db.Model, UserMixin):
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(20), unique=True, nullable=False)
email = db.Colu... | 32.692308 | 68 | 0.748235 | 273 | 0.642353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7a4fe2e81bcaaac8a994f19cd3b167cfb47d0dfa | 2,116 | py | Python | plugins/pattern_navigate.py | OdatNurd/SublimeScraps | e9f97d2abc2a182ccec4a7ac8fa56e0911ef4c5c | [
"MIT"
] | 2 | 2017-01-26T06:27:58.000Z | 2017-07-13T22:48:19.000Z | plugins/pattern_navigate.py | OdatNurd/SublimeScraps | e9f97d2abc2a182ccec4a7ac8fa56e0911ef4c5c | [
"MIT"
] | null | null | null | plugins/pattern_navigate.py | OdatNurd/SublimeScraps | e9f97d2abc2a182ccec4a7ac8fa56e0911ef4c5c | [
"MIT"
] | null | null | null | import sublime
import sublime_plugin
# Related Reading:
# https://forum.sublimetext.com/t/find-for-a-macro/57387/
#
# This example command allows you to jump the cursor to the next or previous
# location of a given pattern of text, which can be either a regex or not and
# case sensitive or not based on command arg... | 37.785714 | 79 | 0.666352 | 1,684 | 0.795841 | 0 | 0 | 0 | 0 | 0 | 0 | 1,144 | 0.540643 |
7a50d6dea9ac0f55af007919a82e31ba7ff4734d | 6,440 | py | Python | main.py | gaelfargeas/markdown_to_static_site | 8f270ab38e7cf93f74b58bd64c96e7571f8c5262 | [
"BSD-3-Clause"
] | 1 | 2021-12-13T12:00:21.000Z | 2021-12-13T12:00:21.000Z | main.py | gaelfargeas/markdown_to_static_site | 8f270ab38e7cf93f74b58bd64c96e7571f8c5262 | [
"BSD-3-Clause"
] | null | null | null | main.py | gaelfargeas/markdown_to_static_site | 8f270ab38e7cf93f74b58bd64c96e7571f8c5262 | [
"BSD-3-Clause"
] | null | null | null | import argparse
from pathlib import Path
import markdown2
import jinja2
import os
import shutil
parser = argparse.ArgumentParser()
parser.add_argument("-i", help="Chemin du/des source.", type=str)
parser.add_argument("-o", help="Chemin du dossier des fichiers générés.", type=str)
parser.add_argument("-t", help="Chem... | 34.438503 | 88 | 0.39472 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 651 | 0.10104 |
7a574b70d61a04a7120b0d3ff05a024266c78785 | 5,837 | py | Python | src/rics/cardinality/_enum.py | rsundqvist/rics | c67ff6703facb3170535dcf173d7e55734cedbc6 | [
"MIT"
] | 1 | 2022-02-24T22:12:13.000Z | 2022-02-24T22:12:13.000Z | src/rics/cardinality/_enum.py | rsundqvist/rics | c67ff6703facb3170535dcf173d7e55734cedbc6 | [
"MIT"
] | 26 | 2022-02-24T21:08:51.000Z | 2022-03-19T19:55:26.000Z | src/rics/cardinality/_enum.py | rsundqvist/rics | c67ff6703facb3170535dcf173d7e55734cedbc6 | [
"MIT"
] | null | null | null | from enum import Enum
from typing import Tuple, Union
# CardinalityLiteral = Literal["1:1", "1:N", "N:1", "M:N"]
CardinalityT = Union[str, "Cardinality"]
class Cardinality(Enum):
"""Enumeration type for cardinality relationships.
Cardinalities are comparable using numerical operators, and can be thought of ... | 31.38172 | 120 | 0.582662 | 3,583 | 0.613843 | 0 | 0 | 2,477 | 0.424362 | 0 | 0 | 2,822 | 0.483468 |
7a5751b3bd6e1acf691790d0550d0f5c13fdbbcc | 5,443 | py | Python | salt-pillar-linter.py | Noah-Huppert/salt-pillar-linter | a18d5504a46fe314e729ed611a0d8b29a2ea97aa | [
"MIT"
] | 1 | 2019-10-13T18:52:25.000Z | 2019-10-13T18:52:25.000Z | salt-pillar-linter.py | Noah-Huppert/salt-pillar-linter | a18d5504a46fe314e729ed611a0d8b29a2ea97aa | [
"MIT"
] | null | null | null | salt-pillar-linter.py | Noah-Huppert/salt-pillar-linter | a18d5504a46fe314e729ed611a0d8b29a2ea97aa | [
"MIT"
] | 1 | 2019-03-18T16:51:40.000Z | 2019-03-18T16:51:40.000Z | #!/usr/bin/env python3
import argparse
import os
import sys
import re
import yaml
import jinja2
# {{{1 Parse arguments
parser = argparse.ArgumentParser(description="Lints Salt states to ensure " +
"pillars are used correctly")
parser.prog = 'salt-pillar-linter'
parser.add_argument('-... | 29.263441 | 84 | 0.529855 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,422 | 0.261253 |
7a58c9e4d6b79dfb6949d7b8df14eeeba0805cf6 | 7,493 | py | Python | tests/unit/dataactvalidator/test_b9_award_financial.py | COEJKnight/one | 6a5f8cd9468ab368019eb2597821b7837f74d9e2 | [
"CC0-1.0"
] | 1 | 2018-10-29T12:54:44.000Z | 2018-10-29T12:54:44.000Z | tests/unit/dataactvalidator/test_b9_award_financial.py | COEJKnight/one | 6a5f8cd9468ab368019eb2597821b7837f74d9e2 | [
"CC0-1.0"
] | null | null | null | tests/unit/dataactvalidator/test_b9_award_financial.py | COEJKnight/one | 6a5f8cd9468ab368019eb2597821b7837f74d9e2 | [
"CC0-1.0"
] | null | null | null | from tests.unit.dataactcore.factories.staging import AwardFinancialFactory
from tests.unit.dataactcore.factories.domain import ProgramActivityFactory
from tests.unit.dataactcore.factories.job import SubmissionFactory
from tests.unit.dataactvalidator.utils import number_of_errors, query_columns
_FILE = 'b9_award_finan... | 52.034722 | 119 | 0.680101 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,382 | 0.184439 |
7a58e81c41213397323d2016af44248b99f994ce | 15,107 | py | Python | machine.py | rkronberg/ml-project | 3129beb4ad1c92d7813df1611ccebdeca591b513 | [
"MIT"
] | null | null | null | machine.py | rkronberg/ml-project | 3129beb4ad1c92d7813df1611ccebdeca591b513 | [
"MIT"
] | null | null | null | machine.py | rkronberg/ml-project | 3129beb4ad1c92d7813df1611ccebdeca591b513 | [
"MIT"
] | null | null | null | '''
Optimal hyperparameters for CM + Laplacian kernel
Ea: alpha 1e-11, gamma 1e-4
polarizability: alpha 1e-3, gamma 1e-4
HOMO-LUMO gap: alpha 1e-2, gamma 1e-4
Dipole moment: alpha 1e-1, gamma 1e-3
Optimal hyperparameters for BoB + Laplacian kernel
Ea: alpha 1e-11, gamma 1e... | 41.05163 | 131 | 0.585358 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,509 | 0.364665 |
7a59ef54c76376084770c691cbba94348cea232b | 244 | py | Python | Core/CoreException.py | gengyuming/Foresee | 78b61c276a4e859e996c9ec39040f2145d16b49b | [
"Apache-2.0"
] | null | null | null | Core/CoreException.py | gengyuming/Foresee | 78b61c276a4e859e996c9ec39040f2145d16b49b | [
"Apache-2.0"
] | null | null | null | Core/CoreException.py | gengyuming/Foresee | 78b61c276a4e859e996c9ec39040f2145d16b49b | [
"Apache-2.0"
] | null | null | null | from Core.Logger import log
class MethodException(Exception):
def __init__(self, method):
self.method = method
log('Request method error, not support {} method, please choose ["GET", "POST","PUT","DELETE"]'.format(method)) | 34.857143 | 119 | 0.680328 | 214 | 0.877049 | 0 | 0 | 0 | 0 | 0 | 0 | 91 | 0.372951 |
7a5a3364c51511dc6143a8fdb73fad93ea8e274b | 981 | py | Python | allegro_notify/soap/response/__init__.py | marlowww/AllegroNotify | 5fa8581debacbfa6e28cb2f3a0e6c177c88bc724 | [
"MIT"
] | null | null | null | allegro_notify/soap/response/__init__.py | marlowww/AllegroNotify | 5fa8581debacbfa6e28cb2f3a0e6c177c88bc724 | [
"MIT"
] | null | null | null | allegro_notify/soap/response/__init__.py | marlowww/AllegroNotify | 5fa8581debacbfa6e28cb2f3a0e6c177c88bc724 | [
"MIT"
] | null | null | null | from rinse import NS_MAP
from rinse.util import safe_parse_string
from soap import SoapFault
class SoapResponse():
def __init__(self, response):
self._response = response
# Parse response
try:
self._doc = safe_parse_string(response.content)
self._body = self._doc.x... | 31.645161 | 74 | 0.607543 | 845 | 0.861366 | 0 | 0 | 0 | 0 | 0 | 0 | 181 | 0.184506 |
7a5b5fa3f82709fc1c5b8a1b0be0a9e5c031ce11 | 16,969 | py | Python | ecn.py | asappinc/emergent_comms_negotiation | 19ad405dcb83a3a521b6e1752cec075b69aa164b | [
"MIT"
] | 9 | 2020-03-04T13:24:25.000Z | 2022-03-15T09:52:37.000Z | ecn.py | asappinc/emergent_comms_negotiation | 19ad405dcb83a3a521b6e1752cec075b69aa164b | [
"MIT"
] | 2 | 2019-12-30T07:28:33.000Z | 2020-10-13T11:38:34.000Z | ecn.py | asappinc/emergent_comms_negotiation | 19ad405dcb83a3a521b6e1752cec075b69aa164b | [
"MIT"
] | 6 | 2018-03-15T18:08:45.000Z | 2019-07-15T06:49:16.000Z | import json
import time
import argparse
import os
import datetime
from os import path
import numpy as np
import torch
from torch import autograd, optim, nn
from torch.autograd import Variable
import torch.nn.functional as F
import nets
import sampling
import rewards_lib
import alive_sieve
def render_action(t, s, pro... | 38.830664 | 129 | 0.613236 | 956 | 0.056338 | 0 | 0 | 0 | 0 | 0 | 0 | 2,189 | 0.129 |
7a5cd88fd8c0d16613c9c5ac3d7d23b3867ecc8f | 2,724 | py | Python | nexar_requests.py | NexarDeveloper/nexar-examples-py | 9a55964d9a847cf124e8928308369074e67d1dfe | [
"MIT"
] | null | null | null | nexar_requests.py | NexarDeveloper/nexar-examples-py | 9a55964d9a847cf124e8928308369074e67d1dfe | [
"MIT"
] | null | null | null | nexar_requests.py | NexarDeveloper/nexar-examples-py | 9a55964d9a847cf124e8928308369074e67d1dfe | [
"MIT"
] | null | null | null | """Resources for making Nexar requests."""
import os, requests, re
from typing import Callable, Dict, Iterator
from requests_toolbelt import MultipartEncoder
NEXAR_URL = "https://api.nexar.com/graphql"
NEXAR_FILE_URL = "https://files.nexar.com/Upload/WorkflowAttachment"
class NexarClient:
def __init__(self, toke... | 32.819277 | 85 | 0.552863 | 2,449 | 0.899046 | 0 | 0 | 0 | 0 | 0 | 0 | 485 | 0.178047 |
7a5e39fe1eef3901acdd4ef96bf4275f32e60fa9 | 756 | py | Python | {{cookiecutter.project_slug}}/sources/app/utils/tests/backends/test_admin_backend.py | AsheKR/cookiecutter-django | d0402aefcc2eeaffa747faa7ef50ad97286bfcca | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.project_slug}}/sources/app/utils/tests/backends/test_admin_backend.py | AsheKR/cookiecutter-django | d0402aefcc2eeaffa747faa7ef50ad97286bfcca | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.project_slug}}/sources/app/utils/tests/backends/test_admin_backend.py | AsheKR/cookiecutter-django | d0402aefcc2eeaffa747faa7ef50ad97286bfcca | [
"BSD-3-Clause"
] | null | null | null | from django.contrib.auth import authenticate
from django.test import TestCase, override_settings
class TestAdminBackend(TestCase):
@override_settings(
AUTHENTICATION_BACKENDS=[
"utils.backend.admin_backends.SettingsBackend",
"django.contrib.auth.backends.ModelBackend",
],
... | 36 | 81 | 0.687831 | 656 | 0.867725 | 0 | 0 | 618 | 0.81746 | 0 | 0 | 221 | 0.292328 |
7a5ea12ecc4b49137705efc9bc329a10e0a04827 | 1,560 | py | Python | lab3/test.py | dssgabriel/obhpc | 6358dffc85b18e1e65cb80f8e9b11b191b86463d | [
"MIT"
] | null | null | null | lab3/test.py | dssgabriel/obhpc | 6358dffc85b18e1e65cb80f8e9b11b191b86463d | [
"MIT"
] | null | null | null | lab3/test.py | dssgabriel/obhpc | 6358dffc85b18e1e65cb80f8e9b11b191b86463d | [
"MIT"
] | null | null | null | import numpy as np
import sys
import time
import mblas
# Python matrix multiplication
def sgemm_py(A, B, C, n):
for i in range(0, n):
for j in range(0, n):
loc = A[i * n + j]
for k in range(0, n):
C[i * n + k] += loc * B[j * n + k]
# Time measurement of Python sgem... | 23.636364 | 54 | 0.592949 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 264 | 0.169231 |
7a5ef0d1d60184e8ef2a2b4a6360f59137607317 | 488 | py | Python | tests/conftest.py | odra/kelo | 22930954c6a75ba3e60ec07d258d65d13533b5b0 | [
"MIT"
] | null | null | null | tests/conftest.py | odra/kelo | 22930954c6a75ba3e60ec07d258d65d13533b5b0 | [
"MIT"
] | null | null | null | tests/conftest.py | odra/kelo | 22930954c6a75ba3e60ec07d258d65d13533b5b0 | [
"MIT"
] | null | null | null | import pytest
@pytest.fixture
def hello_world_fn():
def fn():
return 'hello world'
return fn
@pytest.fixture
def greetings_fn():
def fn(name):
return 'hello %s' % name
return fn
@pytest.fixture
def greetings_default_fn():
def fn(name='nobody'):
return 'hello %s' % name
return fn
@pytest.f... | 16.266667 | 95 | 0.655738 | 0 | 0 | 0 | 0 | 462 | 0.946721 | 0 | 0 | 95 | 0.194672 |