hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | 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 239 | max_issues_repo_name stringlengths 5 130 | 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 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a1a1ef8f99f89b3757dd63b7c63fce1737020f4 | 2,343 | py | Python | funcx_endpoint/funcx_endpoint/mock_broker/mock_broker.py | ravescovi/funcX | 325b55248622ab455199492aafb0c01487f3c80c | [
"Apache-2.0"
] | 86 | 2019-05-16T21:48:37.000Z | 2022-03-10T03:03:27.000Z | funcx_endpoint/funcx_endpoint/mock_broker/mock_broker.py | ravescovi/funcX | 325b55248622ab455199492aafb0c01487f3c80c | [
"Apache-2.0"
] | 520 | 2019-06-05T15:42:59.000Z | 2022-03-31T21:33:32.000Z | funcx_endpoint/funcx_endpoint/mock_broker/mock_broker.py | ravescovi/funcX | 325b55248622ab455199492aafb0c01487f3c80c | [
"Apache-2.0"
] | 33 | 2019-07-21T20:26:14.000Z | 2022-01-31T23:43:10.000Z | """ The broker service
This REST service fields incoming registration requests from endpoints,
creates an appropriate forwarder to which the endpoint can connect up.
"""
import bottle
from bottle import post, run, request, route
import argparse
import json
import uuid
import sys
from funcx_endpoint.mock_broker.forw... | 30.828947 | 83 | 0.675203 |
4a1a1f4510503f4d61063e433d683afc119d333e | 3,283 | py | Python | matchzoo/data_generator/callbacks/dynamic_pooling.py | baajur/MatchZoo | fe0ccdd82500d116a7f945539ed05566fce90434 | [
"Apache-2.0"
] | 2,209 | 2018-10-15T08:31:35.000Z | 2022-03-31T14:29:11.000Z | matchzoo/data_generator/callbacks/dynamic_pooling.py | dutyhong/MatchZoo | 2547f9d1b302d0f166508ba39fa659dfa210a276 | [
"Apache-2.0"
] | 398 | 2018-10-15T07:35:01.000Z | 2022-03-13T21:31:26.000Z | matchzoo/data_generator/callbacks/dynamic_pooling.py | dutyhong/MatchZoo | 2547f9d1b302d0f166508ba39fa659dfa210a276 | [
"Apache-2.0"
] | 535 | 2018-10-16T09:29:02.000Z | 2022-03-31T02:12:52.000Z | import numpy as np
from matchzoo.data_generator.callbacks import Callback
class DynamicPooling(Callback):
""":class:`DPoolPairDataGenerator` constructor.
:param fixed_length_left: max length of left text.
:param fixed_length_right: max length of right text.
:param compress_ratio_left: the length cha... | 35.301075 | 70 | 0.614682 |
4a1a1ff4dc3cd7c2340004feb86a36272f831801 | 38 | py | Python | wp api/errors.py | aouwalitshikkha/wp-gutenberg | fc1f94ccaede1fd7520645d0c8922cdeaaa28279 | [
"MIT"
] | 1 | 2022-03-25T08:16:35.000Z | 2022-03-25T08:16:35.000Z | wp api/errors.py | aouwalitshikkha/wp-gutenberg | fc1f94ccaede1fd7520645d0c8922cdeaaa28279 | [
"MIT"
] | null | null | null | wp api/errors.py | aouwalitshikkha/wp-gutenberg | fc1f94ccaede1fd7520645d0c8922cdeaaa28279 | [
"MIT"
] | null | null | null | class WpApiError(Exception):
pass
| 12.666667 | 28 | 0.736842 |
4a1a20b9e6eddd07f3e797493f68092cafb615de | 915 | py | Python | nextstop/nextstop/urls.py | ericmhuntley/now-boarding | 3c7bcecbca3ebd2ef1076049cd239b9b33fd0ba1 | [
"MIT"
] | null | null | null | nextstop/nextstop/urls.py | ericmhuntley/now-boarding | 3c7bcecbca3ebd2ef1076049cd239b9b33fd0ba1 | [
"MIT"
] | null | null | null | nextstop/nextstop/urls.py | ericmhuntley/now-boarding | 3c7bcecbca3ebd2ef1076049cd239b9b33fd0ba1 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path, re_path
from django.conf.urls import url, include
from django.views.generic import RedirectView
from django.conf import settings
from django.conf.urls.static import static
from rest_framework import routers
from survey import views
router = routers.Default... | 38.125 | 103 | 0.793443 |
4a1a2181531418d39850d9929ab6777911cdafe0 | 13,804 | py | Python | sbibm/utils/nflows.py | rdgao/sbibm | 9b453b600d92ba5c213f7bcf35a93c9b96729b67 | [
"MIT"
] | null | null | null | sbibm/utils/nflows.py | rdgao/sbibm | 9b453b600d92ba5c213f7bcf35a93c9b96729b67 | [
"MIT"
] | null | null | null | sbibm/utils/nflows.py | rdgao/sbibm | 9b453b600d92ba5c213f7bcf35a93c9b96729b67 | [
"MIT"
] | null | null | null | from copy import deepcopy
from typing import Optional
import numpy as np
import torch
from nflows import distributions as distributions_
from nflows import flows, transforms
from nflows.distributions.base import Distribution
from nflows.nn import nets
from nflows.utils import torchutils
from sbi.utils.torchutils impor... | 35.947917 | 117 | 0.589249 |
4a1a21e5142d023181f7e7006bfdadff8a82e2a2 | 653 | py | Python | scene/intro.py | wonknu/head_shot_adfab | 7e85c483ef3d4c8044e24f0132c0a2b700108d29 | [
"MIT"
] | null | null | null | scene/intro.py | wonknu/head_shot_adfab | 7e85c483ef3d4c8044e24f0132c0a2b700108d29 | [
"MIT"
] | null | null | null | scene/intro.py | wonknu/head_shot_adfab | 7e85c483ef3d4c8044e24f0132c0a2b700108d29 | [
"MIT"
] | null | null | null | import pygame
from utils.index import *
from constantes.index import *
from components.ui.button.index import *
class Intro:
def __init__(self, screen, callback):
self.screen = screen
self.callback = callback
self.btnPlay = Button()
def draw(self, events):
for event in events:
if event.type ... | 32.65 | 140 | 0.672282 |
4a1a21faaf7785fbefeecd56d5f9061e84c9a6e8 | 695 | py | Python | CodeWars/7-Mumbling.py | SabariVig/python-programs | 682f11df8157d4a070c294eded341f86845e38a8 | [
"MIT"
] | null | null | null | CodeWars/7-Mumbling.py | SabariVig/python-programs | 682f11df8157d4a070c294eded341f86845e38a8 | [
"MIT"
] | 1 | 2018-07-11T10:49:29.000Z | 2018-07-11T10:51:25.000Z | CodeWars/7-Mumbling.py | SabariVig/python-programs | 682f11df8157d4a070c294eded341f86845e38a8 | [
"MIT"
] | null | null | null | def accum(s):
q=""
s=s.split()
for i in range(len(s[0])):
q+=((s[0][i])*(i+1)+"-").title()
return(q[:-1])
print(accum("ZpglnRxqenU"), "\nZ-Pp-Ggg-Llll-Nnnnn-Rrrrrr-Xxxxxxx-Qqqqqqqq-Eeeeeeeee-Nnnnnnnnnn-Uuuuuuuuuuu")
# print(accum("NyffsGeyylB"), "N-Yy-Fff-Ffff-Sssss-Gggggg-Eeeeeee-Y... | 49.642857 | 110 | 0.702158 |
4a1a222603f5698a28add3d30da1c35bc3e2343d | 1,945 | py | Python | tests/test_spaces.py | uwe-iben/torchphysics | f0a56539cff331d49caaa90bc2fdd0d238b298f8 | [
"Apache-2.0"
] | null | null | null | tests/test_spaces.py | uwe-iben/torchphysics | f0a56539cff331d49caaa90bc2fdd0d238b298f8 | [
"Apache-2.0"
] | null | null | null | tests/test_spaces.py | uwe-iben/torchphysics | f0a56539cff331d49caaa90bc2fdd0d238b298f8 | [
"Apache-2.0"
] | null | null | null | from collections import Counter, OrderedDict
from torchphysics.problem.spaces.space import Space, R1, R2, R3
def test_create_space():
s = Space({'x': 1})
assert isinstance(s, Counter)
assert isinstance(s, OrderedDict)
def test_product_of_spaces():
s1 = Space({'x': 1})
s2 = Space({'t': 3})
s... | 20.913978 | 63 | 0.601028 |
4a1a23e113b02e0ab3d29428e97908bccb25af31 | 2,451 | py | Python | lvt/utils/afwa/templates/submit_lvt_conrad_3hr_noah.py | jvgeiger/lisf-test | 59e0206a0c8ddef4704b172dfd220e6285442478 | [
"Apache-2.0"
] | null | null | null | lvt/utils/afwa/templates/submit_lvt_conrad_3hr_noah.py | jvgeiger/lisf-test | 59e0206a0c8ddef4704b172dfd220e6285442478 | [
"Apache-2.0"
] | null | null | null | lvt/utils/afwa/templates/submit_lvt_conrad_3hr_noah.py | jvgeiger/lisf-test | 59e0206a0c8ddef4704b172dfd220e6285442478 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import subprocess
import sys
import time
vars = ['RelSMC_inst','SmLiqFrac_inst',
'SoilMoist_inst', 'SoilMoist_tavg',
'SoilTemp_inst', 'SoilTemp_tavg',
'RHMin_inst',
'Albedo_tavg', 'AvgSurfT_inst', 'AvgSurfT_tavg',
'CanopInt_inst', 'Elevation_ins... | 26.641304 | 69 | 0.624643 |
4a1a240e085692be755251b0cd92c5d70955d6e9 | 1,824 | py | Python | examples/load_ESL.py | abkoesdw/ml-datasets | c8c7b85ba8ed9c0ea233b4092d499d5022952011 | [
"MIT"
] | 1 | 2020-07-05T04:58:07.000Z | 2020-07-05T04:58:07.000Z | examples/load_ESL.py | abkoesdw/ml-datasets | c8c7b85ba8ed9c0ea233b4092d499d5022952011 | [
"MIT"
] | null | null | null | examples/load_ESL.py | abkoesdw/ml-datasets | c8c7b85ba8ed9c0ea233b4092d499d5022952011 | [
"MIT"
] | null | null | null | from ml_datasets.esl import Mixture
from ml_datasets.esl import ProstateCancer
from ml_datasets.esl import EmailSpam
from ml_datasets.esl import HandwrittenDigit
from ml_datasets.esl import NCI
from ml_datasets.utils import plot_2D, plot_dna
def main(**kwargs):
dataset = kwargs.get("dataset", None)
if datase... | 27.223881 | 78 | 0.582237 |
4a1a24785ccd960b090598e7f00b1710f8968a9a | 80 | py | Python | setup.py | Cold-Bore-Capital/cbc-dbmanager | d863b298badf4e32964a0ae1f1b9aef6dd51fa68 | [
"MIT"
] | 1 | 2021-11-17T13:29:32.000Z | 2021-11-17T13:29:32.000Z | setup.py | Cold-Bore-Capital/cbc-dbmanager | d863b298badf4e32964a0ae1f1b9aef6dd51fa68 | [
"MIT"
] | null | null | null | setup.py | Cold-Bore-Capital/cbc-dbmanager | d863b298badf4e32964a0ae1f1b9aef6dd51fa68 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='cbcdb',
packages=['cbcdb']
)
| 11.428571 | 28 | 0.65 |
4a1a279b97c1fe9056acc7df716cba43ad1ceda9 | 1,493 | py | Python | classy/migrations/0012_auto_20180219_1401.py | Krocodial/DSC | 91063b06b536e732e655ce7f1ad0b7c2caa61e0d | [
"Apache-2.0"
] | null | null | null | classy/migrations/0012_auto_20180219_1401.py | Krocodial/DSC | 91063b06b536e732e655ce7f1ad0b7c2caa61e0d | [
"Apache-2.0"
] | null | null | null | classy/migrations/0012_auto_20180219_1401.py | Krocodial/DSC | 91063b06b536e732e655ce7f1ad0b7c2caa61e0d | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.0.1 on 2018-02-19 22:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('classy', '0011_classification_logs_o_classification'),
]
operations = [
migrations.AlterField(
model_name='classification',
... | 30.469388 | 64 | 0.584729 |
4a1a284c083d51c0163be5f1e8a0183f6c157213 | 4,241 | py | Python | ARIMA Model.py | Wathminishari/solar-forecasting-using-time-series | c3bca342cc3d70a1cbf1d60a506b0aa36db0858f | [
"Apache-2.0"
] | null | null | null | ARIMA Model.py | Wathminishari/solar-forecasting-using-time-series | c3bca342cc3d70a1cbf1d60a506b0aa36db0858f | [
"Apache-2.0"
] | null | null | null | ARIMA Model.py | Wathminishari/solar-forecasting-using-time-series | c3bca342cc3d70a1cbf1d60a506b0aa36db0858f | [
"Apache-2.0"
] | null | null | null |
# coding: utf-8
# In[1]:
import matplotlib
import pylab
import matplotlib.pyplot as plt
import matplotlib.dates as md
import datetime
import seaborn as sns
from scipy.stats import pearsonr
from matplotlib import cm as cm
import calendar
import warnings
import itertools
from statsmodels.tsa.stattools import adfuller
... | 30.510791 | 323 | 0.723178 |
4a1a294091a63e04302dcd70ea0ca1e7a211dda7 | 123,236 | py | Python | src/transformers/models/longformer/modeling_tf_longformer.py | terrenceedmonds/transformers | 1c19b423bf274a465f95725a79819bf82f71329e | [
"Apache-2.0"
] | null | null | null | src/transformers/models/longformer/modeling_tf_longformer.py | terrenceedmonds/transformers | 1c19b423bf274a465f95725a79819bf82f71329e | [
"Apache-2.0"
] | null | null | null | src/transformers/models/longformer/modeling_tf_longformer.py | terrenceedmonds/transformers | 1c19b423bf274a465f95725a79819bf82f71329e | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The Allen Institute for AI team and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... | 45.949292 | 327 | 0.663443 |
4a1a29590bc1e3d2d8c14ece00b03914acaf8e05 | 637 | py | Python | shop_mngr_project/manage.py | jtroussard/auto-shop-management-software | 163494d83b3ab75aaf974ddb882902035a095770 | [
"Apache-2.0"
] | null | null | null | shop_mngr_project/manage.py | jtroussard/auto-shop-management-software | 163494d83b3ab75aaf974ddb882902035a095770 | [
"Apache-2.0"
] | null | null | null | shop_mngr_project/manage.py | jtroussard/auto-shop-management-software | 163494d83b3ab75aaf974ddb882902035a095770 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'shop_mngr_project.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
ra... | 28.954545 | 81 | 0.687598 |
4a1a296deb709e1ea3d954a5ba2565be0e97ddb8 | 8,496 | py | Python | telemetry/telemetry/benchmark_unittest.py | chandakumari/catapult | 7ae76b98cd134229b4008596d48d31f986cd0641 | [
"BSD-3-Clause"
] | null | null | null | telemetry/telemetry/benchmark_unittest.py | chandakumari/catapult | 7ae76b98cd134229b4008596d48d31f986cd0641 | [
"BSD-3-Clause"
] | null | null | null | telemetry/telemetry/benchmark_unittest.py | chandakumari/catapult | 7ae76b98cd134229b4008596d48d31f986cd0641 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import shutil
import tempfile
import unittest
import mock
from telemetry import android
from telemetry import benchmark
from telemetry.testing import optio... | 34.962963 | 80 | 0.732227 |
4a1a29c6cfbbf0b3e954ab432e16d3dd525be883 | 1,366 | py | Python | snorkel/parser/corpus_parser.py | Conengmo/snorkel | 36868e8a84de19b94e1c4b8eceaa64969a61a46b | [
"Apache-2.0"
] | 30 | 2019-08-22T19:27:59.000Z | 2022-03-13T22:03:15.000Z | snorkel/parser/corpus_parser.py | Conengmo/snorkel | 36868e8a84de19b94e1c4b8eceaa64969a61a46b | [
"Apache-2.0"
] | 2 | 2019-08-22T16:51:58.000Z | 2022-03-21T02:59:18.000Z | snorkel/parser/corpus_parser.py | Conengmo/snorkel | 36868e8a84de19b94e1c4b8eceaa64969a61a46b | [
"Apache-2.0"
] | 31 | 2019-08-22T19:28:08.000Z | 2022-03-23T12:50:49.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from builtins import *
from snorkel.parser.spacy_parser import Spacy
from snorkel.models import Candidate, Context, Sentence
from snorkel.udf import UDF, UDFRunner
clas... | 34.15 | 76 | 0.648609 |
4a1a2a74337a119a0da2d0e27838b1ca7ac7cf76 | 5,282 | py | Python | qiskit/aqua/components/optimizers/tnc.py | chunfuchen/aqua | fde435203a2799433a4e50897554fa226c8ff1dc | [
"Apache-2.0"
] | null | null | null | qiskit/aqua/components/optimizers/tnc.py | chunfuchen/aqua | fde435203a2799433a4e50897554fa226c8ff1dc | [
"Apache-2.0"
] | null | null | null | qiskit/aqua/components/optimizers/tnc.py | chunfuchen/aqua | fde435203a2799433a4e50897554fa226c8ff1dc | [
"Apache-2.0"
] | 2 | 2020-02-13T02:17:58.000Z | 2020-08-09T07:56:25.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | 39.125926 | 95 | 0.525937 |
4a1a2d12f60a7b8acb9ea194a5791190cd109fd6 | 648 | py | Python | cauldron/docgen/conversions.py | DanMayhew/cauldron | ac41481830fc1a363c145f4b58ce785aac054d10 | [
"MIT"
] | 90 | 2016-09-02T15:11:10.000Z | 2022-01-02T11:37:57.000Z | cauldron/docgen/conversions.py | DanMayhew/cauldron | ac41481830fc1a363c145f4b58ce785aac054d10 | [
"MIT"
] | 86 | 2016-09-23T16:52:22.000Z | 2022-03-31T21:39:56.000Z | cauldron/docgen/conversions.py | DanMayhew/cauldron | ac41481830fc1a363c145f4b58ce785aac054d10 | [
"MIT"
] | 261 | 2016-12-22T05:36:48.000Z | 2021-11-26T12:40:42.000Z | def arg_type_to_string(arg_type) -> str:
"""
Converts the argument type to a string
:param arg_type:
:return:
String representation of the argument type. Multiple return types are
turned into a comma delimited list of type names
"""
union_params = (
getattr(arg_type, '_... | 28.173913 | 77 | 0.654321 |
4a1a2d32104b3c29b5cf076aafa995ce8fc5708e | 1,464 | py | Python | setup.py | PythonCHB/lat_lon_parser | 6b942061bca374238781e3cfa05dab7554c2cdd0 | [
"CC0-1.0"
] | 8 | 2019-05-27T10:34:22.000Z | 2022-03-29T13:26:53.000Z | setup.py | PythonCHB/lat_lon_parser | 6b942061bca374238781e3cfa05dab7554c2cdd0 | [
"CC0-1.0"
] | 7 | 2019-04-08T21:35:55.000Z | 2022-01-23T08:10:46.000Z | setup.py | PythonCHB/lat_lon_parser | 6b942061bca374238781e3cfa05dab7554c2cdd0 | [
"CC0-1.0"
] | 8 | 2017-07-16T07:21:42.000Z | 2022-01-23T08:18:24.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
from setuptools import setup, find_packages
def get_version():
with open(os.path.join("lat_lon_parser", "_... | 28.705882 | 74 | 0.673497 |
4a1a2d75c398bcfb936e546408fd5081f33780fb | 4,376 | py | Python | docs/source/examples/make_example_rst.py | ghanashyamchalla/cis_interface | 7b59439276eacb66f1f6ea4177d3a85cc061eed5 | [
"BSD-3-Clause"
] | null | null | null | docs/source/examples/make_example_rst.py | ghanashyamchalla/cis_interface | 7b59439276eacb66f1f6ea4177d3a85cc061eed5 | [
"BSD-3-Clause"
] | null | null | null | docs/source/examples/make_example_rst.py | ghanashyamchalla/cis_interface | 7b59439276eacb66f1f6ea4177d3a85cc061eed5 | [
"BSD-3-Clause"
] | null | null | null | import os
from yggdrasil.examples import source, yamls
rst_dir = os.path.dirname(os.path.abspath(__file__))
toc_file = os.path.join(rst_dir, 'examples_toc.rst')
lang2print = {'python': 'Python',
'matlab': 'Matlab',
'cmake': 'CMake',
'make': 'Make',
'r': 'R',
... | 26.521212 | 78 | 0.573126 |
4a1a2e5d0dbc78ba4b060bc2efdf55e5db2bf46c | 10,010 | py | Python | src/kgtests/src/cleaning/test_export_predications.py | HermannKroll/KGExtractionToolbox | c17a55dd1fa098f5033b7765ed0f80d3abb44cb7 | [
"MIT"
] | 6 | 2021-09-17T09:49:59.000Z | 2021-12-06T10:07:01.000Z | src/kgtests/src/cleaning/test_export_predications.py | HermannKroll/KGExtractionToolbox | c17a55dd1fa098f5033b7765ed0f80d3abb44cb7 | [
"MIT"
] | null | null | null | src/kgtests/src/cleaning/test_export_predications.py | HermannKroll/KGExtractionToolbox | c17a55dd1fa098f5033b7765ed0f80d3abb44cb7 | [
"MIT"
] | 1 | 2021-09-18T17:56:12.000Z | 2021-09-18T17:56:12.000Z | import unittest
import rdflib
from kgextractiontoolbox.backend.database import Session
from kgextractiontoolbox.backend.models import Document, Sentence, Predication
from kgextractiontoolbox.extraction.export_predications import export_predications_as_tsv, export_predications_as_rdf
from kgtests import util
class E... | 57.2 | 120 | 0.59001 |
4a1a2eb5209770759774c9fca6e87e1e5fdacdd5 | 2,946 | py | Python | lib/modules/base_module.py | ace-ecosystem/faqueue | a53b5577892ace4ca918f76ef9e676e85e30c93f | [
"Apache-2.0"
] | null | null | null | lib/modules/base_module.py | ace-ecosystem/faqueue | a53b5577892ace4ca918f76ef9e676e85e30c93f | [
"Apache-2.0"
] | null | null | null | lib/modules/base_module.py | ace-ecosystem/faqueue | a53b5577892ace4ca918f76ef9e676e85e30c93f | [
"Apache-2.0"
] | null | null | null | import threading
import logging
from threading import Lock
log = logging.getLogger()
class BaseModule(threading.Thread):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.crits_data = { 'module_status' : 'not initialized' }
self.data_lock = Lock()
pass
... | 30.371134 | 93 | 0.612695 |
4a1a2efd61b55d3260c74fa8bbc6a37e6d7d2c7b | 7,660 | py | Python | doc/source/conf.py | keszybz/pelita | 081329340b61e73436fb860f66882ffa47d0009e | [
"BSD-2-Clause"
] | null | null | null | doc/source/conf.py | keszybz/pelita | 081329340b61e73436fb860f66882ffa47d0009e | [
"BSD-2-Clause"
] | null | null | null | doc/source/conf.py | keszybz/pelita | 081329340b61e73436fb860f66882ffa47d0009e | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Pelita documentation build configuration file, created by
# sphinx-quickstart on Mon Jul 18 14:32:16 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All ... | 32.184874 | 85 | 0.720104 |
4a1a2f4a6a8629c5cdab899fa2b83e63e2716830 | 63,011 | py | Python | synapse/storage/databases/main/events_worker.py | maxkratz/synapse | e46ac85d674d90fa01aa49aee9587093ab6d8677 | [
"Apache-2.0"
] | 1 | 2021-10-16T07:33:46.000Z | 2021-10-16T07:33:46.000Z | synapse/storage/databases/main/events_worker.py | maxkratz/synapse | e46ac85d674d90fa01aa49aee9587093ab6d8677 | [
"Apache-2.0"
] | 1 | 2021-10-16T08:27:46.000Z | 2021-10-16T08:27:46.000Z | synapse/storage/databases/main/events_worker.py | maxkratz/synapse | e46ac85d674d90fa01aa49aee9587093ab6d8677 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 39.455855 | 95 | 0.586183 |
4a1a2fae85f5df9c1569eb6ce35d1817acbb9ec0 | 1,661 | py | Python | Calibration/HcalCalibAlgos/test/python/hcalHBHEMuon_cfg.py | malbouis/cmssw | 16173a30d3f0c9ecc5419c474bb4d272c58b65c8 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | Calibration/HcalCalibAlgos/test/python/hcalHBHEMuon_cfg.py | gartung/cmssw | 3072dde3ce94dcd1791d778988198a44cde02162 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | Calibration/HcalCalibAlgos/test/python/hcalHBHEMuon_cfg.py | gartung/cmssw | 3072dde3ce94dcd1791d778988198a44cde02162 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
from Configuration.Eras.Era_Run2_2017_cff import Run2_2017
process = cms.Process("RaddamMuon",Run2_2017)
process.load("FWCore.MessageService.MessageLogger_cfi")
process.load("Configuration.StandardSequences.GeometryDB_cff")
process.load("Configuration.StandardSequences.Geometr... | 37.75 | 141 | 0.768212 |
4a1a3101b93bf3eee1d6edaee4a2b33959442ebd | 1,240 | py | Python | shotglass/app/migrations/0001_initial.py | johntellsall/shotglass | 0ad5311f92bd79cd5b3bafe4a91dd9cdcce947e8 | [
"MIT"
] | 10 | 2015-08-23T14:39:13.000Z | 2022-02-14T08:11:07.000Z | shotglass/app/migrations/0001_initial.py | johntellsall/shotglass | 0ad5311f92bd79cd5b3bafe4a91dd9cdcce947e8 | [
"MIT"
] | 13 | 2015-08-24T21:54:16.000Z | 2022-02-04T04:34:48.000Z | shotglass/app/migrations/0001_initial.py | johntellsall/shotglass | 0ad5311f92bd79cd5b3bafe4a91dd9cdcce947e8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = []
operations = [
migrations.CreateModel(
name="SourceLine",
fields=[
(
"id",
... | 28.837209 | 62 | 0.348387 |
4a1a321c7ceb7552463fd75b216cfcab624bd2d7 | 1,596 | py | Python | easytext/metrics/acc_metric.py | cuilunan/easytext | 95511a5a12d3af4a102ecb7a4d10e09a7d9b8680 | [
"MIT"
] | 1 | 2020-07-20T06:40:19.000Z | 2020-07-20T06:40:19.000Z | easytext/metrics/acc_metric.py | cuilunan/easytext | 95511a5a12d3af4a102ecb7a4d10e09a7d9b8680 | [
"MIT"
] | null | null | null | easytext/metrics/acc_metric.py | cuilunan/easytext | 95511a5a12d3af4a102ecb7a4d10e09a7d9b8680 | [
"MIT"
] | null | null | null | #!/usr/bin/env python 3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020 Baidu.com, Inc. All Rights Reserved
#
"""
acc 指标
Authors: panxu(panxu@baidu.com)
Date: 2020/05/30 07:36:00
"""
from typing import Dict
import torch
from .metric import Metric
class AccMetric(Metric):
"""
Acc Metric
"""
ACC ... | 22.166667 | 101 | 0.599624 |
4a1a3353419a09928bca1797314e1a855ab1ab73 | 4,097 | py | Python | tests/Modules/test_crds.py | hugs-cloud/hugs | 65aef97d662746f1382bd03b15f46a6647c7b7f5 | [
"Apache-2.0"
] | null | null | null | tests/Modules/test_crds.py | hugs-cloud/hugs | 65aef97d662746f1382bd03b15f46a6647c7b7f5 | [
"Apache-2.0"
] | 5 | 2020-08-18T12:22:46.000Z | 2020-09-30T14:30:11.000Z | tests/Modules/test_crds.py | hugs-cloud/hugs | 65aef97d662746f1382bd03b15f46a6647c7b7f5 | [
"Apache-2.0"
] | 2 | 2020-06-11T20:30:24.000Z | 2020-10-29T17:30:21.000Z | import datetime
import logging
import os
import uuid
from pathlib import Path
import pandas as pd
import pytest
from Acquire.ObjectStore import datetime_to_datetime, datetime_to_string
from HUGS.Modules import CRDS, Datasource
from HUGS.ObjectStore import get_local_bucket
mpl_logger = logging.getLogger("matplotlib")... | 29.688406 | 113 | 0.676104 |
4a1a33ae3f513aa8294abc01a7290186b1ce15c9 | 1,827 | py | Python | oneflow/compatible_single_client_python/framework/op_util.py | xcnick/oneflow | 7b786b27069dec35d2493256011e773988c91f56 | [
"Apache-2.0"
] | null | null | null | oneflow/compatible_single_client_python/framework/op_util.py | xcnick/oneflow | 7b786b27069dec35d2493256011e773988c91f56 | [
"Apache-2.0"
] | null | null | null | oneflow/compatible_single_client_python/framework/op_util.py | xcnick/oneflow | 7b786b27069dec35d2493256011e773988c91f56 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow 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 applicable law or agr... | 38.87234 | 98 | 0.782704 |
4a1a33d79684bfac0791df6e457f49efddc08456 | 1,810 | py | Python | plotxy.py | peterneorr/plotbot | 7e8422f1dc16768b50018bc7bbd8b45192c63e66 | [
"MIT"
] | null | null | null | plotxy.py | peterneorr/plotbot | 7e8422f1dc16768b50018bc7bbd8b45192c63e66 | [
"MIT"
] | null | null | null | plotxy.py | peterneorr/plotbot | 7e8422f1dc16768b50018bc7bbd8b45192c63e66 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import logging
import threading
import sys
import time
import threading
import RPi.GPIO as GPIO
from pb.homing_motor import HomingMotor
import pb.plotbot as PB
def main():
GPIO.setmode(GPIO.BCM)
config = PB.read_config()
x, y, z = PB.init_motors(config)
z.go_home()
x.go_h... | 22.345679 | 60 | 0.530387 |
4a1a342375c20a09de24bae32b2cfca889818519 | 457 | py | Python | src/layouts/buttonbox/builder/buttonbox.py | webpedrovinicius/gui-python-gtk | eb85ecd99bfcded376190a2770aabd31d8db8fa5 | [
"MIT"
] | 1 | 2021-02-14T19:00:31.000Z | 2021-02-14T19:00:31.000Z | src/layouts/buttonbox/builder/buttonbox.py | webpedrovinicius/gui-python-gtk | eb85ecd99bfcded376190a2770aabd31d8db8fa5 | [
"MIT"
] | null | null | null | src/layouts/buttonbox/builder/buttonbox.py | webpedrovinicius/gui-python-gtk | eb85ecd99bfcded376190a2770aabd31d8db8fa5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Contêiner do tipo ButtonBox Layout."""
import gi
gi.require_version(namespace='Gtk', version='3.0')
from gi.repository import Gtk
# @Gtk.Template(string, filename, resource_path)
@Gtk.Template(filename='./buttonbox.glade')
class MainWindow(Gtk.ApplicationWindow):
__gtype_name__ = 'Mai... | 21.761905 | 50 | 0.698031 |
4a1a345cd2cee1c8c9c5fcd395346137c6eae613 | 1,387 | py | Python | ematch/venv/Lib/site-packages/djangorave/tests/test_serializers.py | Faisal-Sey/Dreamnmatch.com | f69f8be8e825b37c6abda5e169cc794b5ea2bd4e | [
"MIT"
] | null | null | null | ematch/venv/Lib/site-packages/djangorave/tests/test_serializers.py | Faisal-Sey/Dreamnmatch.com | f69f8be8e825b37c6abda5e169cc794b5ea2bd4e | [
"MIT"
] | null | null | null | ematch/venv/Lib/site-packages/djangorave/tests/test_serializers.py | Faisal-Sey/Dreamnmatch.com | f69f8be8e825b37c6abda5e169cc794b5ea2bd4e | [
"MIT"
] | null | null | null | # stdlib imports
# django imports
from django.test import TestCase
# 3rd party imports
from rest_framework.exceptions import ValidationError
# project imports
from djangorave.serializers import TransactionSerializer
from djangorave.tests.factories import PaymentTypeModelFactory, UserFactory
class TestTransactionSe... | 34.675 | 78 | 0.708003 |
4a1a34b6742e1d607d88a61c025870a3c71f23c1 | 6,067 | py | Python | main_eos_table.py | sotzee/quaryonic_eos | 2f0f16040d111d8c9e75795a63a6a29d26ea9dca | [
"MIT"
] | 1 | 2021-02-25T06:58:14.000Z | 2021-02-25T06:58:14.000Z | main_eos_table.py | sotzee/quaryonic_eos | 2f0f16040d111d8c9e75795a63a6a29d26ea9dca | [
"MIT"
] | null | null | null | main_eos_table.py | sotzee/quaryonic_eos | 2f0f16040d111d8c9e75795a63a6a29d26ea9dca | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 2 15:06:25 2020
@author: sotzee
"""
import numpy as np
import scipy.optimize as opt
from joblib import Parallel, delayed
import unitconvert
import eos_quarkyonic
import eos_potential
from config import saturation_density,u_max,N1,N2,path,args,eos_s... | 52.301724 | 173 | 0.755893 |
4a1a350c0849e8c9e2ffde06ef0974f057b215af | 210 | py | Python | app/tests/common/test_exceptions.py | isayakhov/duty-schedule-bot | 2515fe8e1ba71b183c31363d99d1c8f1d552826a | [
"MIT"
] | 6 | 2021-01-30T11:31:46.000Z | 2022-02-15T10:09:07.000Z | app/tests/common/test_exceptions.py | isayakhov/duty-schedule-bot | 2515fe8e1ba71b183c31363d99d1c8f1d552826a | [
"MIT"
] | 2 | 2021-02-04T19:45:07.000Z | 2021-02-05T12:23:56.000Z | app/tests/common/test_exceptions.py | isayakhov/duty-schedule-bot | 2515fe8e1ba71b183c31363d99d1c8f1d552826a | [
"MIT"
] | 2 | 2022-02-06T11:22:30.000Z | 2022-02-06T18:46:14.000Z | from app.common.exceptions import DutyError
def test_duty_error():
msg = "Custom message"
exc = DutyError(message=msg)
assert repr(exc) == f"DutyError(code='{DutyError.code}', message='{msg}',)"
| 23.333333 | 79 | 0.685714 |
4a1a36052246701f6ef629ef5466a5587970080b | 204 | py | Python | carla_ego_vehicle/setup.py | VILMA-LMA/ros-bridge | e635635c2657b81d914596bec289f49bbde910e5 | [
"MIT"
] | 205 | 2018-05-14T16:37:06.000Z | 2022-03-26T21:32:29.000Z | ros/src/ros_carla_bridge/carla_ego_vehicle/setup.py | xmeng17/ALVNS | 8d891600af3d851add27a10ae45cf3c2108bb87c | [
"MIT"
] | 19 | 2018-05-27T21:06:52.000Z | 2021-09-08T00:37:46.000Z | ros/src/ros_carla_bridge/carla_ego_vehicle/setup.py | xmeng17/ALVNS | 8d891600af3d851add27a10ae45cf3c2108bb87c | [
"MIT"
] | 73 | 2018-09-13T05:04:47.000Z | 2022-02-26T14:51:02.000Z | from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup(
packages=['carla_ego_vehicle'],
package_dir={'': 'src'}
)
setup(**d)
| 18.545455 | 60 | 0.754902 |
4a1a361177ecd7f650f564e15a4591d21a7265ab | 6,665 | py | Python | data/convert_jigsaw.py | vilka-lab/JigsawRate | d4d70f6611209b5c9b5bcda9f9380d317ef1737e | [
"MIT"
] | null | null | null | data/convert_jigsaw.py | vilka-lab/JigsawRate | d4d70f6611209b5c9b5bcda9f9380d317ef1737e | [
"MIT"
] | null | null | null | data/convert_jigsaw.py | vilka-lab/JigsawRate | d4d70f6611209b5c9b5bcda9f9380d317ef1737e | [
"MIT"
] | null | null | null | import pandas as pd
import click
from pathlib import Path
# from typing import List
import re
import emoji
from tqdm import tqdm
def read_toxic_data(folder_toxic: str) -> pd.DataFrame:
train_path = 'train.csv.zip'
test_labels_path = 'test_labels.csv.zip'
test_path = 'test.csv.zip'
folder_toxic = Path... | 38.085714 | 150 | 0.67952 |
4a1a36e216121e19856726b7109d167557fa13c6 | 4,315 | py | Python | baselines/customised_plotter.py | dkangin/baselines | 91b1c35e8f60a09bb10e3f1e76a03eeb5682bfae | [
"MIT"
] | 5 | 2019-01-21T06:56:01.000Z | 2020-09-06T16:11:32.000Z | baselines/customised_plotter.py | dkangin/baselines | 91b1c35e8f60a09bb10e3f1e76a03eeb5682bfae | [
"MIT"
] | null | null | null | baselines/customised_plotter.py | dkangin/baselines | 91b1c35e8f60a09bb10e3f1e76a03eeb5682bfae | [
"MIT"
] | 2 | 2019-09-02T09:22:31.000Z | 2019-12-22T09:11:44.000Z | import matplotlib
matplotlib.use('Agg') # Can change to 'Agg' for non-interactive mode
import matplotlib.pyplot as plt
import argparse
import os
from baselines.bench.monitor import load_results
import numpy as np
def ts2xy(ts):
x = np.cumsum(ts.l.values)
y = ts.r.values
return x, y
def rolling_window(a, w... | 48.483146 | 328 | 0.692932 |
4a1a3724616ad5e8de05d1ec75a8e0d683576db5 | 4,566 | py | Python | controllers/fin.py | nursix/eden | 61d5a947da20bbf4d6458c9be88ed37b1330518c | [
"MIT"
] | 4 | 2015-04-08T19:51:44.000Z | 2016-08-06T07:05:35.000Z | controllers/fin.py | waidyanatha/eden | a275ed7d10c2bf8839de86b7ac7c549186fc94b7 | [
"MIT"
] | 27 | 2015-02-18T23:38:23.000Z | 2020-04-27T13:53:23.000Z | controllers/fin.py | waidyanatha/eden | a275ed7d10c2bf8839de86b7ac7c549186fc94b7 | [
"MIT"
] | 5 | 2015-09-10T05:31:14.000Z | 2017-06-07T11:06:27.000Z | # -*- coding: utf-8 -*-
"""
Finance
"""
if not settings.has_module(c):
raise HTTP(404, body="Module disabled: %s" % c)
# -----------------------------------------------------------------------------
def index():
""" Module's Home Page """
return s3db.cms_index(c)
# ---------------------------------... | 31.489655 | 84 | 0.438458 |
4a1a376bbcd6680c3bf56556fc5713080f7f6db7 | 4,945 | py | Python | bin/texpost.py | jt14den/teachtogether.tech | e3f67366ef5d717167f83a0bd5bc5c8545531fb8 | [
"CC-BY-4.0"
] | null | null | null | bin/texpost.py | jt14den/teachtogether.tech | e3f67366ef5d717167f83a0bd5bc5c8545531fb8 | [
"CC-BY-4.0"
] | 1 | 2018-09-14T10:12:27.000Z | 2018-09-18T07:46:24.000Z | bin/texpost.py | jt14den/teachtogether.tech | e3f67366ef5d717167f83a0bd5bc5c8545531fb8 | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/env python
'''
Post-process what Pandoc produces from the book's Markdown.
I'm not proud of this...
'''
import sys
import re
import yaml
STRINGS = [(r'\/-', '-'),
(r'\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}', ''),
(r'\def\labelenumi{\arabic{enumi}.}', ''),
... | 27.320442 | 88 | 0.554702 |
4a1a37eb06e45664dfa9683d7f7f383e5444098f | 613 | py | Python | sevennotes/helpers/decoraters.py | sathaaaaaa/SevenNotesMusic | 917f718eaab8a4b6a23aaaadfc3e61071fb24d6b | [
"MIT"
] | null | null | null | sevennotes/helpers/decoraters.py | sathaaaaaa/SevenNotesMusic | 917f718eaab8a4b6a23aaaadfc3e61071fb24d6b | [
"MIT"
] | null | null | null | sevennotes/helpers/decoraters.py | sathaaaaaa/SevenNotesMusic | 917f718eaab8a4b6a23aaaadfc3e61071fb24d6b | [
"MIT"
] | null | null | null | from pyrogram import Client, filters
from pyrogram.types import Message
def admin_check(function):
async def wrapper(c, m, *args, **kwargs):
chat = m.chat.id
user = m.from_user.id
admins = await c.get_chat_members(
chat_id=chat,
filter="administrators",
)
admin_ids = []
for admi... | 27.863636 | 72 | 0.644372 |
4a1a38a844ca6130ad47a54e6dd18d84232012f9 | 3,861 | py | Python | stwfsapy/tests/thesaurus_features_test.py | mo-fu/stwfsapy | dd47c15e5b1b5422fd4ce6fe63ceb3e25ef15322 | [
"Apache-2.0"
] | null | null | null | stwfsapy/tests/thesaurus_features_test.py | mo-fu/stwfsapy | dd47c15e5b1b5422fd4ce6fe63ceb3e25ef15322 | [
"Apache-2.0"
] | null | null | null | stwfsapy/tests/thesaurus_features_test.py | mo-fu/stwfsapy | dd47c15e5b1b5422fd4ce6fe63ceb3e25ef15322 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Leibniz Information Centre for Economics
#
# 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 ... | 33.868421 | 79 | 0.688164 |
4a1a3931bb3b077c37511818c876506191bd41a0 | 90,104 | py | Python | test/functional/p2p_segwit.py | Chellit/Chellit | 7d804cfc64b4e91234b68f14b82f12c752eb6aae | [
"MIT"
] | 2 | 2021-02-01T08:29:18.000Z | 2021-06-28T23:45:28.000Z | test/functional/p2p_segwit.py | Chellit/Chellit | 7d804cfc64b4e91234b68f14b82f12c752eb6aae | [
"MIT"
] | null | null | null | test/functional/p2p_segwit.py | Chellit/Chellit | 7d804cfc64b4e91234b68f14b82f12c752eb6aae | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2016 The Bitcoin Core developers
# Copyright (c) 2017-2018 The Chellit Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test segwit transactions and blocks on P2P network."""... | 46.183496 | 143 | 0.658162 |
4a1a3c31cf1ac5aeccf2c305684f5b1eaf09db96 | 13,937 | py | Python | Code/predict_tensorflow.py | yolsever/ML-in-equity-prediction | 48aec0e1d26f7f715461cbcb76d78ab527ec096c | [
"MIT"
] | 31 | 2019-10-21T20:48:38.000Z | 2022-03-26T02:52:34.000Z | Code/predict_tensorflow.py | yolsever/ML-in-equity-prediction | 48aec0e1d26f7f715461cbcb76d78ab527ec096c | [
"MIT"
] | 1 | 2019-05-26T14:16:37.000Z | 2021-06-20T14:44:28.000Z | Code/predict_tensorflow.py | yolsever/ML-in-equity-prediction | 48aec0e1d26f7f715461cbcb76d78ab527ec096c | [
"MIT"
] | 11 | 2020-02-14T08:58:20.000Z | 2022-03-21T15:21:40.000Z | # test_data = mid_prices[11000:]
vals = stock.values
n_train = floor(vals.shape[0]*0.7)
n_val = floor(n_train + vals.shape[0]*0.15)
vals[:n_val,:] = scaler.fit_transform(vals[:n_val,:])
vals[n_val:,:] = scaler.transform(vals[n_val:,:])
train = vals[:n_train,:]
valid = vals[n_train:n_val,:]
test = vals[n_val:,:]
[n,d]... | 37.165333 | 121 | 0.695272 |
4a1a3c645379c8c98ed9e7f98e3f57571c58250b | 80,089 | py | Python | ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/vport.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 20 | 2019-05-07T01:59:14.000Z | 2022-02-11T05:24:47.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/vport.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 60 | 2019-04-03T18:59:35.000Z | 2022-02-22T12:05:05.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/vport.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 13 | 2019-05-20T10:48:31.000Z | 2021-10-06T07:45:44.000Z | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# 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,... | 47.672024 | 753 | 0.638465 |
4a1a3cbec08e6ba469abc1791a94cfcdd24aecc6 | 1,982 | py | Python | app/utils/bangs.py | Y50ES/whoogle-search | 1af4566991f5248fd0d3576ca4fbcc0a84293004 | [
"MIT"
] | 1 | 2022-02-19T19:56:37.000Z | 2022-02-19T19:56:37.000Z | app/utils/bangs.py | Y50ES/whoogle-search | 1af4566991f5248fd0d3576ca4fbcc0a84293004 | [
"MIT"
] | null | null | null | app/utils/bangs.py | Y50ES/whoogle-search | 1af4566991f5248fd0d3576ca4fbcc0a84293004 | [
"MIT"
] | null | null | null | import json
import requests
DDG_BANGS = 'https://duckduckgo.com/bang.v255.js'
def gen_bangs_json(bangs_file: str) -> None:
"""Generates a json file from the DDG bangs list
Args:
bangs_file: The str path to the new DDG bangs json file
Returns:
None
"""
try:
# Request ful... | 29.58209 | 77 | 0.58779 |
4a1a3d238f4d58e50b116bc0ea7884f10819c9dc | 628 | py | Python | src/repository.py | JoseTorquato/crypto-report | 3e53bd630c66bd27b85c7da52292c03af672d9fe | [
"MIT"
] | null | null | null | src/repository.py | JoseTorquato/crypto-report | 3e53bd630c66bd27b85c7da52292c03af672d9fe | [
"MIT"
] | null | null | null | src/repository.py | JoseTorquato/crypto-report | 3e53bd630c66bd27b85c7da52292c03af672d9fe | [
"MIT"
] | null | null | null | from src.config.client import ClientPancakeSwap
from src.services.token import Token
class Repository:
@classmethod
def parse(self, list_address):
message = ""
for obj in list_address:
response = ClientPancakeSwap().get_token(obj["address"])
if response["status"] == 20... | 34.888889 | 158 | 0.590764 |
4a1a3d98c8536cfdb53fb681e7faafc091f3250f | 2,697 | py | Python | contact_test.py | petersoleeh/Contact-list | 54606f860496a90b6d1c93ab501c6f4d39676c99 | [
"MIT"
] | null | null | null | contact_test.py | petersoleeh/Contact-list | 54606f860496a90b6d1c93ab501c6f4d39676c99 | [
"MIT"
] | null | null | null | contact_test.py | petersoleeh/Contact-list | 54606f860496a90b6d1c93ab501c6f4d39676c99 | [
"MIT"
] | null | null | null | import unittest # Importing the uniitest module
import pyperclip
from contact import Contact # import the Contact class
class TestContact(unittest.TestCase):
def setUp(self):
self.new_contact = Contact(
"Peter", "Maina", "072012131", "petersoleeh@yahoo.com") # create contact object
d... | 34.139241 | 92 | 0.651835 |
4a1a3dfcee5b95524324eba86f33d72496ff73ae | 9,537 | py | Python | sdk/tools/flash_writer/scripts/flash_writer.py | EthanZhao802738/spresense | 5e8abfc8096283fcf6eaa2d574a29cbd2c6a88e6 | [
"Apache-2.0"
] | 110 | 2018-07-12T16:04:50.000Z | 2022-02-26T12:27:56.000Z | sdk/tools/flash_writer/scripts/flash_writer.py | EthanZhao802738/spresense | 5e8abfc8096283fcf6eaa2d574a29cbd2c6a88e6 | [
"Apache-2.0"
] | 37 | 2018-08-10T13:05:45.000Z | 2022-03-18T20:33:18.000Z | sdk/tools/flash_writer/scripts/flash_writer.py | EthanZhao802738/spresense | 5e8abfc8096283fcf6eaa2d574a29cbd2c6a88e6 | [
"Apache-2.0"
] | 94 | 2018-07-13T03:48:34.000Z | 2022-03-19T07:32:08.000Z | #! /usr/bin/env python3
__copyright__ = ['Copyright (C) 2018, 2021 Sony Semiconductor Solutions Corp.']
__license__ = 'LGPL v2.1'
import time
import sys
import os
import struct
import glob
import fnmatch
import errno
import argparse
import shutil
import subprocess
import re
import xmodem
import_serial_module = True
... | 27.016997 | 109 | 0.700849 |
4a1a3e2c6893239df24704738369b2576f43eb47 | 1,754 | py | Python | Credential.py | Ruterana/password_locker | eadc92b506bea9607c395fe5027b8cc61722a6a3 | [
"MIT"
] | null | null | null | Credential.py | Ruterana/password_locker | eadc92b506bea9607c395fe5027b8cc61722a6a3 | [
"MIT"
] | null | null | null | Credential.py | Ruterana/password_locker | eadc92b506bea9607c395fe5027b8cc61722a6a3 | [
"MIT"
] | null | null | null | class Credential:
"""
Class that generates new instances of Credentials .
"""
Credential_list = [] # Empty User list
def __init__(self,Account,user_name,password):
# docstring removed for simplicity
self.Account= Account
self.user_name = user_name
self.password ... | 27.84127 | 92 | 0.611745 |
4a1a3e84d395b2d3dd3a3793ed13b04ff29fa1e8 | 386 | py | Python | Ejercicios/b. Listas/Reto 8. 16-04.py | lufe089/material-intro-prog | c5b653587aa128e957d31b7f818795303da216d5 | [
"MIT"
] | 1 | 2022-01-30T17:19:08.000Z | 2022-01-30T17:19:08.000Z | Ejercicios/b. Listas/Reto 8. 16-04.py | lufe089/material-intro-prog | c5b653587aa128e957d31b7f818795303da216d5 | [
"MIT"
] | null | null | null | Ejercicios/b. Listas/Reto 8. 16-04.py | lufe089/material-intro-prog | c5b653587aa128e957d31b7f818795303da216d5 | [
"MIT"
] | 1 | 2021-12-27T15:47:04.000Z | 2021-12-27T15:47:04.000Z | # Haga un función que le pida la nota final de cada alumno de un curso de N estudiantes, imprima el promedio y retorne una lista con las notas del curso.
# Haga un procedimiento que reciba N cantidad de cursos para usar la función anterior.
# A partir de los vectores, crear una función que cuente cuales estudiantes su... | 96.5 | 154 | 0.790155 |
4a1a3f3740efd3b4f98945c29225283d1a900bec | 2,813 | py | Python | tools/server-side/svnpubsub/commit-hook.py | ruchirarya/svn | 81502a213251c2af21361a942bd9a8cd7d3adb9f | [
"Apache-2.0"
] | 7 | 2018-01-18T06:13:21.000Z | 2020-07-09T03:46:16.000Z | depe/subversion/tools/server-side/svnpubsub/commit-hook.py | louis-tru/TouchCode2 | 91c182aeaa37fba16e381ea749d32906dab1aeea | [
"BSD-3-Clause-Clear"
] | 4 | 2015-01-12T22:23:41.000Z | 2015-01-12T22:33:52.000Z | src/subversion/tools/server-side/svnpubsub/commit-hook.py | schwern/alien-svn | 7423b08f9bc4fdf0ac0d7ea53495269b21b3e8f9 | [
"Apache-2.0"
] | 1 | 2020-11-04T07:25:22.000Z | 2020-11-04T07:25:22.000Z | #!/usr/local/bin/python
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "L... | 29.925532 | 78 | 0.636331 |
4a1a3f86977432a5afe5281ac35538d23317fd30 | 11,502 | py | Python | pvmismatch/contrib/xlsio/xlsio.py | adambgnr/PVMismatch | 66d8ef38319cbd8c36e032ae29f92d679bae7da9 | [
"BSD-3-Clause"
] | null | null | null | pvmismatch/contrib/xlsio/xlsio.py | adambgnr/PVMismatch | 66d8ef38319cbd8c36e032ae29f92d679bae7da9 | [
"BSD-3-Clause"
] | null | null | null | pvmismatch/contrib/xlsio/xlsio.py | adambgnr/PVMismatch | 66d8ef38319cbd8c36e032ae29f92d679bae7da9 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from scipy.interpolate import interp1d
# Pandas is an optional dependency only used by xlsio, therefore
# not installed with PVMismatch:
try:
import pandas as pd
except ImportError:
print("Pandas module not found. You need to install it before proceeding:")
print("https://pandas.pydata.or... | 51.810811 | 86 | 0.505477 |
4a1a3fa7ab1b142e5e894f1aed407e5db0c238dc | 42 | py | Python | tests/test_underdevelopment.py | GoodManWEN/aiohttp-debugmode | 1c49167165c59a981e38ec0174deb0e674c61f48 | [
"MIT"
] | 2 | 2020-06-15T15:52:22.000Z | 2021-05-05T22:59:35.000Z | tests/test_underdevelopment.py | GoodManWEN/aiohttp-debugmode | 1c49167165c59a981e38ec0174deb0e674c61f48 | [
"MIT"
] | 1 | 2021-07-21T11:51:45.000Z | 2021-07-21T11:51:45.000Z | tests/test_underdevelopment.py | GoodManWEN/aiohttp-debugmode | 1c49167165c59a981e38ec0174deb0e674c61f48 | [
"MIT"
] | 1 | 2021-05-05T21:04:49.000Z | 2021-05-05T21:04:49.000Z | '''
'''
def test_item():
assert True
| 7 | 16 | 0.52381 |
4a1a3ff9f49b9b947fb6f4c93f6603d56e77ae54 | 33,881 | py | Python | src/python/pants/jvm/resolve/coursier_fetch.py | alexey-tereshenkov-oxb/pants | 920591edc6e0fb372930253c821b712a74b0dec8 | [
"Apache-2.0"
] | null | null | null | src/python/pants/jvm/resolve/coursier_fetch.py | alexey-tereshenkov-oxb/pants | 920591edc6e0fb372930253c821b712a74b0dec8 | [
"Apache-2.0"
] | 8 | 2022-02-06T12:14:38.000Z | 2022-02-16T11:22:05.000Z | src/python/pants/jvm/resolve/coursier_fetch.py | alexey-tereshenkov-oxb/pants | 920591edc6e0fb372930253c821b712a74b0dec8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
import dataclasses
import json
import logging
import os
import re
from dataclasses import dataclass
from itertools import chain
from typing import Any, ... | 39.580607 | 179 | 0.684071 |
4a1a40c657d820864c828e0fcfb905bc1d0dd87c | 3,251 | py | Python | venv/Lib/site-packages/networkx/readwrite/json_graph/tests/test_node_link.py | 997Yi/Flask-web | 6b5e5d274bfa25fbd3db5af02723a5671f1e901d | [
"MIT"
] | 3 | 2020-08-04T20:29:41.000Z | 2020-11-09T09:28:19.000Z | venv/Lib/site-packages/networkx/readwrite/json_graph/tests/test_node_link.py | 997Yi/Flask-web | 6b5e5d274bfa25fbd3db5af02723a5671f1e901d | [
"MIT"
] | 30 | 2020-04-15T19:37:40.000Z | 2020-04-22T21:19:35.000Z | venv/Lib/site-packages/networkx/readwrite/json_graph/tests/test_node_link.py | 997Yi/Flask-web | 6b5e5d274bfa25fbd3db5af02723a5671f1e901d | [
"MIT"
] | 2 | 2020-03-12T23:20:22.000Z | 2021-02-15T21:54:02.000Z | # -*- coding: utf-8 -*-
import json
import pytest
import networkx as nx
from networkx.readwrite.json_graph import *
class TestNodeLink:
def test_graph(self):
G = nx.path_graph(4)
H = node_link_graph(node_link_data(G))
assert nx.is_isomorphic(G, H)
def test_graph_attributes(self):
... | 30.669811 | 100 | 0.538604 |
4a1a418e74726271e3c0920a04ff9d32248986f8 | 953 | py | Python | src/visions/backends/python/types/date_time.py | bhumikapahariapuresoftware/visions | 8838d89b4f02e401112378b4662a779227ead9f8 | [
"BSD-4-Clause"
] | 142 | 2020-01-07T21:17:10.000Z | 2022-03-30T13:10:14.000Z | src/visions/backends/python/types/date_time.py | bhumikapahariapuresoftware/visions | 8838d89b4f02e401112378b4662a779227ead9f8 | [
"BSD-4-Clause"
] | 121 | 2020-01-07T02:26:38.000Z | 2022-03-29T17:18:19.000Z | src/visions/backends/python/types/date_time.py | bhumikapahariapuresoftware/visions | 8838d89b4f02e401112378b4662a779227ead9f8 | [
"BSD-4-Clause"
] | 18 | 2020-02-17T03:17:37.000Z | 2022-02-20T14:01:11.000Z | from datetime import datetime
from typing import Sequence
from visions.backends.python.series_utils import sequence_not_empty
from visions.types.date_time import DateTime
from visions.types.string import String
@DateTime.register_relationship(String, Sequence)
def string_is_datetime(sequence: Sequence, state: dict) ... | 30.741935 | 84 | 0.748164 |
4a1a424cf02abd0d673b692d675ef7d22775dcde | 1,814 | py | Python | MolRep/Models/graph_based/MorganFP.py | UsedToBe97/MolRep | b39c427f3600056dd67b89bfbdce45cdc91a1e10 | [
"MIT"
] | null | null | null | MolRep/Models/graph_based/MorganFP.py | UsedToBe97/MolRep | b39c427f3600056dd67b89bfbdce45cdc91a1e10 | [
"MIT"
] | null | null | null | MolRep/Models/graph_based/MorganFP.py | UsedToBe97/MolRep | b39c427f3600056dd67b89bfbdce45cdc91a1e10 | [
"MIT"
] | null | null | null |
import torch
import torch.nn as nn
from torch_geometric.nn import global_add_pool
class MorganFP(torch.nn.Module):
def __init__(self, dim_features, dim_target, model_configs, dataset_configs):
super(MorganFP, self).__init__()
hidden_dim = model_configs['hidden_units']
dim_features = 2048... | 42.186047 | 144 | 0.656009 |
4a1a4350e6878b97a317c0df1443d8b14654212e | 403 | py | Python | company/company_type.py | thinkstack-co/ConnectPyse | ded8b426250aee352598f33ad08b7bcc3c6a3017 | [
"MIT"
] | 23 | 2017-01-24T05:44:05.000Z | 2021-11-26T17:08:01.000Z | company/company_type.py | thinkstack-co/ConnectPyse | ded8b426250aee352598f33ad08b7bcc3c6a3017 | [
"MIT"
] | 10 | 2017-01-14T21:11:10.000Z | 2019-06-16T21:10:29.000Z | company/company_type.py | thinkstack-co/ConnectPyse | ded8b426250aee352598f33ad08b7bcc3c6a3017 | [
"MIT"
] | 16 | 2017-01-24T02:28:19.000Z | 2021-07-13T17:23:22.000Z | from ..cw_model import CWModel
class CompanyType(CWModel):
def __init__(self, json_dict=None):
self.id = None # (Integer)
self.name = None # *(String(50))
self.defaultFlag = None # (Boolean)
self.vendorFlag = None # (Boolean)
self._info = None # (Metadata)
... | 26.866667 | 45 | 0.583127 |
4a1a43f88ad95bc8d6ba62c7a845f38b341137af | 3,349 | py | Python | cvxpy/transforms/indicator.py | gabrielhartmann/cvxpy | 8197e683b6e7b5cc9118505a5c95f102007747f1 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-04-15T14:01:03.000Z | 2019-04-15T14:01:03.000Z | cvxpy/transforms/indicator.py | gabrielhartmann/cvxpy | 8197e683b6e7b5cc9118505a5c95f102007747f1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cvxpy/transforms/indicator.py | gabrielhartmann/cvxpy | 8197e683b6e7b5cc9118505a5c95f102007747f1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | """
Copyright 2017 Steven Diamond
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... | 26.579365 | 80 | 0.616303 |
4a1a4436ad48eeefa451ad9cc850714a19ceefef | 869 | py | Python | tests/test_examples.py | vberlier/tokenstream | 70fca6405cca8f2d08186c118cb6322d9c7c176e | [
"MIT"
] | 5 | 2021-06-17T07:57:28.000Z | 2022-01-05T16:20:08.000Z | tests/test_examples.py | vberlier/tokenstream | 70fca6405cca8f2d08186c118cb6322d9c7c176e | [
"MIT"
] | 66 | 2021-06-22T13:18:48.000Z | 2022-03-30T13:14:38.000Z | tests/test_examples.py | vberlier/tokenstream | 70fca6405cca8f2d08186c118cb6322d9c7c176e | [
"MIT"
] | null | null | null | import json
import pytest
from examples.calculator import calculate_sum
from examples.json import parse_json
from tokenstream import TokenStream
@pytest.mark.parametrize(
"source",
[
"123",
"1 + 2 + 3",
"1 * 2 * 3",
"1 + 2 * 3",
"1 * 2 + 3",
"1 + 2 - 3 * 4 / 5... | 20.690476 | 64 | 0.474108 |
4a1a452fef4236efba5d2332fa233683c1d4b7b9 | 13,673 | py | Python | lisa/parameter_parser/runbook.py | tyhicks/lisa | 50d07cbd13e4e777eaa211b01387721fe2d2094f | [
"MIT"
] | 65 | 2020-12-15T13:42:29.000Z | 2022-03-03T13:14:16.000Z | lisa/parameter_parser/runbook.py | acidburn0zzz/lisa | 3934d0546592d3ff71bc3e2c4aab5d4bc646a3b9 | [
"MIT"
] | 236 | 2020-11-24T18:28:26.000Z | 2022-03-30T19:19:25.000Z | lisa/parameter_parser/runbook.py | acidburn0zzz/lisa | 3934d0546592d3ff71bc3e2c4aab5d4bc646a3b9 | [
"MIT"
] | 52 | 2020-12-08T17:40:46.000Z | 2022-03-31T18:24:14.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import copy
from functools import partial
from pathlib import Path
from typing import Any, Dict, List, Optional, Set, Union, cast
import yaml
from marshmallow import Schema
from lisa import schema
from lisa.util import LisaException, constants
... | 35.239691 | 88 | 0.601185 |
4a1a46e0f79ffa8c7b88672f06b0928efe8d0621 | 3,870 | py | Python | crawling/samsung_vd_request.py | jungchulha/Python-study | 6fbeb6f449bbee24245e2cadce6df105dfc07f0b | [
"MIT"
] | null | null | null | crawling/samsung_vd_request.py | jungchulha/Python-study | 6fbeb6f449bbee24245e2cadce6df105dfc07f0b | [
"MIT"
] | null | null | null | crawling/samsung_vd_request.py | jungchulha/Python-study | 6fbeb6f449bbee24245e2cadce6df105dfc07f0b | [
"MIT"
] | null | null | null | import sys
from concurrent.futures import ThreadPoolExecutor
import requests
from bs4 import BeautifulSoup
from selenium import webdriver
from queue import Queue, Empty
import pandas as pd
import json
import re
import time
import json
from multiprocessing import Pool # Pool import하기
from pymongo import MongoClient
impo... | 27.446809 | 102 | 0.573643 |
4a1a46f6c8d9e69fc6d804e8442962b30248ee19 | 15,843 | py | Python | PyInstaller/depend/dylib.py | BearerPipelineTest/pyinstaller | 0de9d6cf1701689c53161610acdab143a76d40b5 | [
"Apache-2.0"
] | null | null | null | PyInstaller/depend/dylib.py | BearerPipelineTest/pyinstaller | 0de9d6cf1701689c53161610acdab143a76d40b5 | [
"Apache-2.0"
] | null | null | null | PyInstaller/depend/dylib.py | BearerPipelineTest/pyinstaller | 0de9d6cf1701689c53161610acdab143a76d40b5 | [
"Apache-2.0"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2013-2022, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt... | 34.896476 | 120 | 0.650761 |
4a1a474766bfccc8f331d5e0094873185b34f709 | 7,161 | py | Python | common-python/oc_provisioning/oc_provision_wrappers/wls/v12_2_1/weblogic_helper.py | LaudateCorpus1/atg-commerce-iaas | f1ae31657fc0111a5c019d46a28a3c81aae1acb2 | [
"MIT"
] | 28 | 2016-11-07T14:03:25.000Z | 2022-02-01T08:46:52.000Z | common-python/oc_provisioning/oc_provision_wrappers/wls/v12_2_1/weblogic_helper.py | LaudateCorpus1/atg-commerce-iaas | f1ae31657fc0111a5c019d46a28a3c81aae1acb2 | [
"MIT"
] | 3 | 2016-11-09T13:23:03.000Z | 2018-04-05T15:49:22.000Z | common-python/oc_provisioning/oc_provision_wrappers/wls/v12_2_1/weblogic_helper.py | LaudateCorpus1/atg-commerce-iaas | f1ae31657fc0111a5c019d46a28a3c81aae1acb2 | [
"MIT"
] | 13 | 2016-10-27T17:59:38.000Z | 2022-02-18T04:38:38.000Z | # The MIT License (MIT)
#
# Copyright (c) 2016 Oracle
#
# 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, me... | 45.611465 | 157 | 0.664153 |
4a1a4882be6fe1bad11373390bf9fe623de65f0a | 2,729 | py | Python | hostchecker/__main__.py | SimoneCorazza/HostChecker | 56bc9d24f7b783570925b41cb883974b21128c29 | [
"CC0-1.0"
] | null | null | null | hostchecker/__main__.py | SimoneCorazza/HostChecker | 56bc9d24f7b783570925b41cb883974b21128c29 | [
"CC0-1.0"
] | 1 | 2021-03-31T19:52:17.000Z | 2021-03-31T19:52:17.000Z | hostchecker/__main__.py | SimoneCorazza/HostChecker | 56bc9d24f7b783570925b41cb883974b21128c29 | [
"CC0-1.0"
] | 1 | 2020-10-01T17:56:26.000Z | 2020-10-01T17:56:26.000Z | import datetime
import chrome_bookmarks
import argparse
from hostingInfo import HostInfo
from hostStorage import HostStorage
def printInfoUrl(domain, hostStorage, useCache, storeOnCache):
"""
Print the info for the given url
:param domain: String of the damain to get the hosting info from
:param hostS... | 33.280488 | 87 | 0.655551 |
4a1a48aaea66c1f43e2a4272211b868dbd1ac486 | 3,137 | py | Python | examples/python/example-03-slice.py | lukasm91/serialbox2 | 3a8dba366ef160df684c957e59c0a5f6b1b17244 | [
"BSD-2-Clause"
] | 1 | 2020-09-04T00:43:52.000Z | 2020-09-04T00:43:52.000Z | examples/python/example-03-slice.py | mlange05/serialbox2 | fa72d8a39f62c7c0b76536680f7a9953957f59f2 | [
"BSD-2-Clause"
] | null | null | null | examples/python/example-03-slice.py | mlange05/serialbox2 | fa72d8a39f62c7c0b76536680f7a9953957f59f2 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
##===-----------------------------------------------------------------------------*- Python -*-===##
##
## S E R I A L B O X
##
## This file is distributed under terms of BSD license.
## See LICENSE.txt for more information.
##
##===-... | 32.677083 | 102 | 0.561683 |
4a1a48d28541093d2df3217ef6815a5ba01724e6 | 10,264 | py | Python | lisa/features/gpu.py | srveniga/lisa | 0b5bcf028ed4211d79ff90b9f915981c426baab4 | [
"MIT"
] | null | null | null | lisa/features/gpu.py | srveniga/lisa | 0b5bcf028ed4211d79ff90b9f915981c426baab4 | [
"MIT"
] | null | null | null | lisa/features/gpu.py | srveniga/lisa | 0b5bcf028ed4211d79ff90b9f915981c426baab4 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import re
from enum import Enum
from typing import Any, List, Set
from lisa.base_tools import Wget
from lisa.feature import Feature
from lisa.operating_system import Redhat, Ubuntu
from lisa.sut_orchestrator.azure.tools import LisDriver
from lis... | 38.014815 | 129 | 0.582424 |
4a1a492ff20f25097050bb49ff5aeb5042e00c3a | 685 | py | Python | boundaries/ocd-division/country:ca/csd:3506008/definition.py | imhangoo/represent-canada-data | 0d9cc818b343079f81a00c15438d79c079a10c9b | [
"OML"
] | null | null | null | boundaries/ocd-division/country:ca/csd:3506008/definition.py | imhangoo/represent-canada-data | 0d9cc818b343079f81a00c15438d79c079a10c9b | [
"OML"
] | null | null | null | boundaries/ocd-division/country:ca/csd:3506008/definition.py | imhangoo/represent-canada-data | 0d9cc818b343079f81a00c15438d79c079a10c9b | [
"OML"
] | null | null | null | from datetime import date
import boundaries
boundaries.register('Ottawa wards',
domain='Ottawa, ON',
last_updated=date(2018, 4, 24),
name_func=boundaries.clean_attr('WARD_EN'),
id_func=boundaries.attr('WARD_NUM'),
authority='City of Ottawa',
source_url='http://data.ottawa.ca/en/dataset/wards-2... | 40.294118 | 159 | 0.732847 |
4a1a49b9df3ca0ad98aa9ceb1c87748ed1a9a6f7 | 6,511 | py | Python | app/test/stubs/empresa.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 1 | 2019-07-25T21:15:05.000Z | 2019-07-25T21:15:05.000Z | app/test/stubs/empresa.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 44 | 2019-08-05T15:24:00.000Z | 2022-01-31T23:11:31.000Z | app/test/stubs/empresa.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 1 | 2021-05-11T07:49:51.000Z | 2021-05-11T07:49:51.000Z | """ Stubs for model testing """
import pandas as pd
from datetime import datetime
from model.empresa.empresa import Empresa
from model.thematic import Thematic
from repository.empresa.pessoadatasets import PessoaDatasetsRepository
from repository.empresa.datasets import DatasetsRepository
from repository.empresa.empres... | 35.38587 | 159 | 0.574105 |
4a1a49d2eba38d14ce3e3831bec5aa3ca2d07126 | 356 | py | Python | test_data/himanis/convert_guerin.py | matgille/boudams | d253ff2ee124e13186b5782ebb3c2d9b4bedd942 | [
"MIT"
] | 5 | 2019-10-12T22:12:42.000Z | 2022-02-17T14:59:02.000Z | test_data/himanis/convert_guerin.py | matgille/boudams | d253ff2ee124e13186b5782ebb3c2d9b4bedd942 | [
"MIT"
] | 10 | 2019-06-08T09:31:19.000Z | 2021-05-16T09:27:14.000Z | test_data/himanis/convert_guerin.py | matgille/boudams | d253ff2ee124e13186b5782ebb3c2d9b4bedd942 | [
"MIT"
] | 2 | 2020-01-10T09:46:09.000Z | 2021-02-26T17:04:36.000Z | import os
directory = os.path.dirname(__file__)
with open(os.path.join(directory, "txt", "guerin.txt")) as f:
for line_index, line in enumerate(f.readlines()):
if not line.strip():
continue
#
lang, text = line[:3], line[7:].strip()
with open(os.path.join(directory, lang, "guerin-%s.txt"% line_index), "w... | 25.428571 | 87 | 0.668539 |
4a1a49d815a6b246ff76cb14bc580ee86f1ee9e4 | 2,534 | py | Python | nni/experiment/config/training_services/remote.py | dutxubo/nni | c16f4e1c89b54b8b80661ef0072433d255ad2d24 | [
"MIT"
] | 9,680 | 2019-05-07T01:42:30.000Z | 2022-03-31T16:48:33.000Z | nni/experiment/config/training_services/remote.py | dutxubo/nni | c16f4e1c89b54b8b80661ef0072433d255ad2d24 | [
"MIT"
] | 1,957 | 2019-05-06T21:44:21.000Z | 2022-03-31T09:21:53.000Z | nni/experiment/config/training_services/remote.py | dutxubo/nni | c16f4e1c89b54b8b80661ef0072433d255ad2d24 | [
"MIT"
] | 1,571 | 2019-05-07T06:42:55.000Z | 2022-03-31T03:19:24.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
"""
Configuration for remote training service.
Check the reference_ for explaination of each field.
You may also want to check `remote training service doc`_.
.. _reference: https://nni.readthedocs.io/en/stable/reference/experiment_config.html... | 34.712329 | 118 | 0.718232 |
4a1a4aec104bd4afe5bf0e271d46bbe758ceb236 | 32,315 | py | Python | mars/dataframe/indexing/reindex.py | chineking/mars | 660098c65bcb389c6bbebc26b2502a9b3af43cf9 | [
"Apache-2.0"
] | null | null | null | mars/dataframe/indexing/reindex.py | chineking/mars | 660098c65bcb389c6bbebc26b2502a9b3af43cf9 | [
"Apache-2.0"
] | null | null | null | mars/dataframe/indexing/reindex.py | chineking/mars | 660098c65bcb389c6bbebc26b2502a9b3af43cf9 | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 35.865705 | 88 | 0.558564 |
4a1a4b66b929e809ab9ffc70f4f62e22e1d277f5 | 825 | py | Python | xlib/avecl/_internal/op/__init__.py | szywind/DeepFaceLive | 60d867843c323a810352b1a8ac209912dec0acf2 | [
"MIT"
] | 3 | 2021-12-08T08:59:50.000Z | 2022-02-08T02:54:27.000Z | xlib/avecl/_internal/op/__init__.py | SandUhrGucker/DeepFaceLive | a897cbb06ee3511c63f10d9fbf2ccb66c3ee9659 | [
"MIT"
] | 1 | 2022-02-08T01:29:03.000Z | 2022-02-08T01:29:03.000Z | xlib/avecl/_internal/op/__init__.py | SandUhrGucker/DeepFaceLive | a897cbb06ee3511c63f10d9fbf2ccb66c3ee9659 | [
"MIT"
] | 1 | 2021-12-14T09:18:15.000Z | 2021-12-14T09:18:15.000Z | from .any_wise import add, any_wise, div, max_, min_, mul, sqrt, square, sub
from .binary_dilate_circle import binary_dilate_circle
from .binary_erode_circle import binary_erode_circle
from .binary_morph import binary_morph
from .cast import cast
from .concat import concat
from .depthwise_conv2D import depthwise_conv2D... | 37.5 | 78 | 0.814545 |
4a1a4c612c49384f3ec250cc307f560e4b14dde2 | 13,227 | py | Python | google/appengine/tools/devappserver2/inotify_file_watcher_test.py | theosp/google_appengine | 9ce87a20684dc99cf5968e6f488c060e1530c159 | [
"Apache-2.0"
] | 3 | 2019-01-28T03:57:20.000Z | 2020-02-20T01:37:33.000Z | google/appengine/tools/devappserver2/inotify_file_watcher_test.py | theosp/google_appengine | 9ce87a20684dc99cf5968e6f488c060e1530c159 | [
"Apache-2.0"
] | null | null | null | google/appengine/tools/devappserver2/inotify_file_watcher_test.py | theosp/google_appengine | 9ce87a20684dc99cf5968e6f488c060e1530c159 | [
"Apache-2.0"
] | 3 | 2019-01-18T11:33:56.000Z | 2020-01-05T10:44:05.000Z | #!/usr/bin/env python
#
# Copyright 2007 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 o... | 32.419118 | 80 | 0.683451 |
4a1a4db7f214ac566d070c1e9d3ba85565522ff1 | 10,736 | py | Python | src/mp_api/routes/materials/query_operators.py | materialsproject/api | e32114e83bc1c54b392723a1951f749acea6b9c3 | [
"BSD-3-Clause-LBNL"
] | 18 | 2021-04-07T14:22:15.000Z | 2022-03-29T13:21:20.000Z | src/mp_api/routes/materials/query_operators.py | materialsproject/api | e32114e83bc1c54b392723a1951f749acea6b9c3 | [
"BSD-3-Clause-LBNL"
] | 411 | 2020-06-01T19:23:15.000Z | 2022-03-31T19:15:25.000Z | src/mp_api/routes/materials/query_operators.py | materialsproject/api | e32114e83bc1c54b392723a1951f749acea6b9c3 | [
"BSD-3-Clause-LBNL"
] | 7 | 2020-01-29T22:19:59.000Z | 2021-11-18T16:48:45.000Z | from itertools import permutations
from typing import Optional
from emmet.core.symmetry import CrystalSystem
from fastapi import Body, HTTPException, Query
from maggma.api.query_operator import QueryOperator
from maggma.api.utils import STORE_PARAMS
from mp_api.routes.materials.utils import formula_to_criteria, chemsy... | 27.741602 | 107 | 0.538562 |
4a1a4f15547afa589fe8d95c6bc51a6c342f2f1d | 1,979 | py | Python | jeopardy_backend/jeopardy/serializers.py | daniel-weisdorf/jeopardy | 509e7fe23276c7311492e23690e9b9ee9c7083ff | [
"Apache-2.0"
] | null | null | null | jeopardy_backend/jeopardy/serializers.py | daniel-weisdorf/jeopardy | 509e7fe23276c7311492e23690e9b9ee9c7083ff | [
"Apache-2.0"
] | null | null | null | jeopardy_backend/jeopardy/serializers.py | daniel-weisdorf/jeopardy | 509e7fe23276c7311492e23690e9b9ee9c7083ff | [
"Apache-2.0"
] | 1 | 2021-04-04T04:56:34.000Z | 2021-04-04T04:56:34.000Z | from rest_framework import serializers
from jeopardy.models import Game, Team, Player, Category, Question, Host
class QuestionSerializer(serializers.ModelSerializer):
category_name = serializers.SerializerMethodField()
def get_category_name(self, obj):
return obj.category.name
class Meta:
model = Question
ex... | 26.039474 | 72 | 0.775139 |
4a1a50e73542a011948d4e2ea0bc94ccff8c3d3f | 1,521 | py | Python | pyservice/organizer.py | adomokos/pyservice | e79b4aeacec84bea31b1f3492cdef7bec47d9f1a | [
"MIT"
] | 1 | 2021-01-06T01:50:44.000Z | 2021-01-06T01:50:44.000Z | pyservice/organizer.py | adomokos/pyservice | e79b4aeacec84bea31b1f3492cdef7bec47d9f1a | [
"MIT"
] | null | null | null | pyservice/organizer.py | adomokos/pyservice | e79b4aeacec84bea31b1f3492cdef7bec47d9f1a | [
"MIT"
] | null | null | null | import functools
from pyservice.action import Action
from pyservice.context import Context
from itertools import takewhile
from typing import List
class Organizer:
class ContextFailed(Exception):
def __init__(self, action: Action):
self.action = action
def __init__(self, actions: List[Act... | 28.166667 | 88 | 0.631821 |
4a1a50ef7fa6e0969b024477cfe0f9d016d7f48c | 817 | py | Python | 01-DesenvolvimentoDeSistemas/02-LinguagensDeProgramacao/01-Python/01-ListaDeExercicios/02-Aluno/Edno/065.py | moacirsouza/nadas | ad98d73b4281d1581fd2b2a9d29001acb426ee56 | [
"MIT"
] | 1 | 2020-07-03T13:54:18.000Z | 2020-07-03T13:54:18.000Z | 01-DesenvolvimentoDeSistemas/02-LinguagensDeProgramacao/01-Python/01-ListaDeExercicios/02-Aluno/Edno/065.py | moacirsouza/nadas | ad98d73b4281d1581fd2b2a9d29001acb426ee56 | [
"MIT"
] | null | null | null | 01-DesenvolvimentoDeSistemas/02-LinguagensDeProgramacao/01-Python/01-ListaDeExercicios/02-Aluno/Edno/065.py | moacirsouza/nadas | ad98d73b4281d1581fd2b2a9d29001acb426ee56 | [
"MIT"
] | null | null | null | # (01-Gabarito/065.py)) Crie um programa que leia vários números inteiros pelo teclado.
# No final da execução mostre a média entre todos os valores e qual foi o maior e o menor valores lidos.
# O programa deve perguntar ao usuário se ele quer ou não continuar a digitar valores.
continuar = 1
maior = 0
menor = 99999... | 31.423077 | 139 | 0.674419 |
4a1a51dd7800f0928e20f4725e4d3055584887a8 | 1,117 | py | Python | ajaximage/image.py | trailhawks/django-ajaximage | ab4ceca0bed93216d317d5576be9ce41c45e657b | [
"MIT"
] | null | null | null | ajaximage/image.py | trailhawks/django-ajaximage | ab4ceca0bed93216d317d5576be9ce41c45e657b | [
"MIT"
] | null | null | null | ajaximage/image.py | trailhawks/django-ajaximage | ab4ceca0bed93216d317d5576be9ce41c45e657b | [
"MIT"
] | null | null | null | import os
from PIL import Image, ImageOps
try:
from StringIO import StringIO as IO
except ImportError:
from io import BytesIO as IO
from django.core.files.base import ContentFile
from django.core.files.uploadedfile import SimpleUploadedFile
def resize(file_, max_width=0, max_height=0, crop=0):
max_width... | 25.386364 | 81 | 0.675022 |
4a1a5205e2ba73b5fa86b9a31cb6be78d3a2fa3c | 1,664 | py | Python | models_all_solvable2/st_test4.py | grossmann-group/pyomo-MINLP-benchmarking | 714f0a0dffd61675649a805683c0627af6b4929e | [
"MIT"
] | 7 | 2019-05-08T19:14:34.000Z | 2021-12-24T00:00:40.000Z | models_all_solvable2/st_test4.py | grossmann-group/pyomo-MINLP-benchmarking | 714f0a0dffd61675649a805683c0627af6b4929e | [
"MIT"
] | null | null | null | models_all_solvable2/st_test4.py | grossmann-group/pyomo-MINLP-benchmarking | 714f0a0dffd61675649a805683c0627af6b4929e | [
"MIT"
] | 2 | 2020-05-21T22:15:51.000Z | 2020-06-02T23:02:08.000Z | # MINLP written by GAMS Convert at 05/15/20 00:51:23
#
# Equation counts
# Total E G L N X C B
# 6 1 0 5 0 0 0 0
#
# Variable counts
# x b i s1s s2s sc ... | 38.697674 | 119 | 0.481971 |
4a1a52dfdca2cc530a3d5ef2f4ce476dd6906106 | 4,597 | py | Python | src/jindex.py | cerad95/job-scraper | 3841c34d0ead57089fce192bd285faccfcf8f5da | [
"MIT"
] | null | null | null | src/jindex.py | cerad95/job-scraper | 3841c34d0ead57089fce192bd285faccfcf8f5da | [
"MIT"
] | null | null | null | src/jindex.py | cerad95/job-scraper | 3841c34d0ead57089fce192bd285faccfcf8f5da | [
"MIT"
] | null | null | null | import asyncio
import re
from datetime import datetime
import aiohttp
import bs4
from tqdm import tqdm
from job import Job
from website import Website
async def fetch(session, url):
async with session.get(url) as response:
return await response.read()
class jindex(Website):
async def fetch_all_ur... | 37.991736 | 166 | 0.580379 |
4a1a5369567c07c93f01e105e25e26119bbcd425 | 722 | py | Python | async/async19fixed.py | showa-yojyo/bin | 8ddd29b3c629634212b3708904cf615c42a6eaf5 | [
"MIT"
] | 1 | 2017-04-27T19:58:41.000Z | 2017-04-27T19:58:41.000Z | async/async19fixed.py | showa-yojyo/bin | 8ddd29b3c629634212b3708904cf615c42a6eaf5 | [
"MIT"
] | 8 | 2016-10-30T17:16:45.000Z | 2018-05-15T15:01:45.000Z | async/async19fixed.py | showa-yojyo/bin | 8ddd29b3c629634212b3708904cf615c42a6eaf5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""async19fixed.py: Chain coroutines (fixed)
Usage:
async19fixed.py
"""
import asyncio
async def create():
await asyncio.sleep(3.0)
print("(1) create file")
async def write():
await asyncio.sleep(1.0)
print("(2) write into file")
async def close():
print("(3) close file"... | 19.513514 | 67 | 0.648199 |
4a1a55696cb9baed4e136e83306b246d22a54cf5 | 4,483 | py | Python | python/chicago_crime_server.py | thekingofkings/chicago-crime | 30550697402aa3a5a074096a0032b0c1e1264313 | [
"MIT"
] | 10 | 2016-11-08T04:31:06.000Z | 2021-07-28T15:17:52.000Z | python/chicago_crime_server.py | thekingofkings/chicago-crime | 30550697402aa3a5a074096a0032b0c1e1264313 | [
"MIT"
] | 24 | 2016-04-19T15:07:52.000Z | 2017-05-20T02:29:23.000Z | python/chicago_crime_server.py | thekingofkings/urban-flow-analysis | 30550697402aa3a5a074096a0032b0c1e1264313 | [
"MIT"
] | 5 | 2016-09-13T21:13:46.000Z | 2019-12-04T11:40:02.000Z | from flask import Flask, request, jsonify, redirect, make_response
from flask import render_template, send_from_directory
from NBRegression import *
import os
here = os.path.dirname(os.path.abspath(__file__))
import glob
app = Flask(__name__)
app.debug = True
features = ['density', 'disadvantage', '... | 29.11039 | 107 | 0.571269 |
4a1a5573ecade10bf79ac29c3286c599a5b3109d | 12,682 | py | Python | src/lms-ds-loader/tests/test_loader_facade.py | Ed-Fi-Alliance-OSS/LMS-Toolkit | 22eb5e77465c7d0f179ebf192f6c8560fa396418 | [
"Apache-2.0"
] | 3 | 2021-06-10T16:27:18.000Z | 2022-01-25T18:41:35.000Z | src/lms-ds-loader/tests/test_loader_facade.py | Ed-Fi-Alliance-OSS/LMS-Toolkit | 22eb5e77465c7d0f179ebf192f6c8560fa396418 | [
"Apache-2.0"
] | 30 | 2021-03-19T17:50:11.000Z | 2022-02-01T21:37:56.000Z | src/lms-ds-loader/tests/test_loader_facade.py | Ed-Fi-Exchange-OSS/LMS-Toolkit | 22eb5e77465c7d0f179ebf192f6c8560fa396418 | [
"Apache-2.0"
] | 10 | 2021-06-10T16:27:27.000Z | 2021-12-27T12:31:57.000Z | # SPDX-License-Identifier: Apache-2.0
# Licensed to the Ed-Fi Alliance under one or more agreements.
# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
# See the LICENSE and NOTICES files in the project root for more information.
from typing import Dict, Tuple
import pandas as pd
im... | 40.006309 | 94 | 0.620722 |
4a1a563f7229b382d4782f689c41c4687f344433 | 1,973 | py | Python | aries_cloudagent/messaging/routing/messages/tests/test_route_query_request.py | DibbsZA/aries-cloudagent-python | a094dd7697023721ac2a2fd4e58b04d4b37d1f44 | [
"Apache-2.0"
] | 7 | 2020-07-07T15:44:41.000Z | 2022-03-26T21:20:41.000Z | aries_cloudagent/messaging/routing/messages/tests/test_route_query_request.py | totemprotocol/aries-fl | dd78dcebc771971abfee301b80cdd5d246c14840 | [
"Apache-2.0"
] | null | null | null | aries_cloudagent/messaging/routing/messages/tests/test_route_query_request.py | totemprotocol/aries-fl | dd78dcebc771971abfee301b80cdd5d246c14840 | [
"Apache-2.0"
] | 2 | 2019-12-02T18:59:07.000Z | 2020-06-03T18:58:20.000Z | from ..route_query_request import RouteQueryRequest
from ...message_types import ROUTE_QUERY_REQUEST
from ...models.paginate import Paginate, PaginateSchema
from unittest import mock, TestCase
class TestRouteQueryRequest(TestCase):
test_limit = 100
test_offset = 10
test_verkey = "3Dn1SJNPaCXcvvJvSbsFWP2x... | 35.872727 | 102 | 0.737962 |
4a1a568bbc677728fb311c7bfe0d66c764102916 | 4,233 | py | Python | release/stubs.min/System/ComponentModel/__init___parts/PropertyTabAttribute.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/System/ComponentModel/__init___parts/PropertyTabAttribute.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/System/ComponentModel/__init___parts/PropertyTabAttribute.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | class PropertyTabAttribute(Attribute, _Attribute):
"""
Identifies the property tab or tabs to display for the specified class or classes.
PropertyTabAttribute()
PropertyTabAttribute(tabClass: Type)
PropertyTabAttribute(tabClassName: str)
PropertyTabAttribute(tabClass: Type,tabScope: Property... | 27.134615 | 221 | 0.690999 |
4a1a56ebde53ef8b628e74cf9c90e6bd94975bbb | 5,956 | py | Python | frappe/www/list.py | chaitraliw/mws_frappe | 52182a27f3b9a61d080e741e349a308be3e94582 | [
"MIT"
] | 1 | 2020-08-12T23:07:02.000Z | 2020-08-12T23:07:02.000Z | frappe/www/list.py | chaitraliw/mws_frappe | 52182a27f3b9a61d080e741e349a308be3e94582 | [
"MIT"
] | null | null | null | frappe/www/list.py | chaitraliw/mws_frappe | 52182a27f3b9a61d080e741e349a308be3e94582 | [
"MIT"
] | 1 | 2018-03-21T18:41:05.000Z | 2018-03-21T18:41:05.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import cint, quoted
from frappe.website.render import resolve_path
from frappe.model.document import get_controller, Document
from frappe import _
... | 32.546448 | 99 | 0.749161 |
4a1a57256faa46cc2bcf64bb3865c166c4dba713 | 10,094 | py | Python | scripts/pyqtgraph-develop/pyqtgraph/colormap.py | kuldeepaman/tf-pose | 8050912c52a7b4f3c8a2656f267d47ba21d093f6 | [
"Apache-2.0"
] | null | null | null | scripts/pyqtgraph-develop/pyqtgraph/colormap.py | kuldeepaman/tf-pose | 8050912c52a7b4f3c8a2656f267d47ba21d093f6 | [
"Apache-2.0"
] | null | null | null | scripts/pyqtgraph-develop/pyqtgraph/colormap.py | kuldeepaman/tf-pose | 8050912c52a7b4f3c8a2656f267d47ba21d093f6 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from .Qt import QtGui, QtCore
from .python2_3 import basestring
class ColorMap(object):
"""
A ColorMap defines a relationship between a scalar value and a range of colors.
ColorMaps are commonly used for false-coloring monochromatic images, coloring
scatter-plot points, a... | 39.584314 | 125 | 0.482267 |
4a1a57cdd23807dce4ade8e9afe6a51652599a23 | 881 | py | Python | src/SimilarNeuron/utils/dicttool.py | luxuncang/similar-neuron | b0bab30270e768ec70551d26d709e692d00f62a9 | [
"MIT"
] | 4 | 2021-12-02T15:54:09.000Z | 2021-12-09T14:22:05.000Z | src/SimilarNeuron/utils/dicttool.py | luxuncang/similar-neuron | b0bab30270e768ec70551d26d709e692d00f62a9 | [
"MIT"
] | 13 | 2021-12-03T07:04:39.000Z | 2022-03-09T08:38:39.000Z | src/SimilarNeuron/utils/dicttool.py | luxuncang/similar-neuron | b0bab30270e768ec70551d26d709e692d00f62a9 | [
"MIT"
] | 1 | 2021-12-13T14:39:12.000Z | 2021-12-13T14:39:12.000Z | from typing import Any, Iterable, Iterator, Hashable
def dictDFS(d: dict) -> Iterator:
'''python Dict DFS(stop dict.v not dict)'''
for k,v in d.items():
if isinstance(v, dict):
yield (k, v)
yield from dictDFS(v)
else:
yield (k,v)
def dictBSF(d: di... | 35.24 | 105 | 0.553916 |
4a1a589a5abfd6b8ece2c1c7017bde9492c6fe82 | 567 | py | Python | vc_assistance/indico_vc_assistance/blueprint.py | pferreir/indico-plugins-cern | 0fc2eb6b1aa3c3083a813477886a6632f148a4d9 | [
"MIT"
] | null | null | null | vc_assistance/indico_vc_assistance/blueprint.py | pferreir/indico-plugins-cern | 0fc2eb6b1aa3c3083a813477886a6632f148a4d9 | [
"MIT"
] | null | null | null | vc_assistance/indico_vc_assistance/blueprint.py | pferreir/indico-plugins-cern | 0fc2eb6b1aa3c3083a813477886a6632f148a4d9 | [
"MIT"
] | null | null | null | # This file is part of the CERN Indico plugins.
# Copyright (C) 2014 - 2019 CERN
#
# The CERN Indico plugins are free software; you can redistribute
# them and/or modify them under the terms of the MIT License; see
# the LICENSE file for more details.
from __future__ import unicode_literals
from indico.core.plugins i... | 33.352941 | 97 | 0.798942 |
4a1a58af4359c1a6762af3867af4070eaa25cde6 | 2,931 | py | Python | Twitter/Model/Place/Place.py | david00medina/cyberattack-forecasting | e8a18e474d9eec0800d06e3f21c9cd25cb54e831 | [
"MIT"
] | null | null | null | Twitter/Model/Place/Place.py | david00medina/cyberattack-forecasting | e8a18e474d9eec0800d06e3f21c9cd25cb54e831 | [
"MIT"
] | null | null | null | Twitter/Model/Place/Place.py | david00medina/cyberattack-forecasting | e8a18e474d9eec0800d06e3f21c9cd25cb54e831 | [
"MIT"
] | null | null | null | # ############################################################################################################
# Copyright (c) 2022 David Alberto Medina Medina. #
# ... | 62.361702 | 110 | 0.479359 |
4a1a58b4876e2586f72fc3ef6510a0184a9fd5f2 | 1,176 | py | Python | models/disposable_booking.py | ndalilav/Textdump | 7fef26b88903f40ee0588b309d2cb08ea6d9b062 | [
"MIT"
] | null | null | null | models/disposable_booking.py | ndalilav/Textdump | 7fef26b88903f40ee0588b309d2cb08ea6d9b062 | [
"MIT"
] | null | null | null | models/disposable_booking.py | ndalilav/Textdump | 7fef26b88903f40ee0588b309d2cb08ea6d9b062 | [
"MIT"
] | null | null | null | from main import db
from sqlalchemy import func
class DisposableBooking(db.Model):
__tablename__ = "disposable_bookings"
id = db.Column(db.Integer, primary_key=True, nullable=False)
email = db.Column(db.String(255), nullable=False)
phone_number = db.Column(db.String(255), nullable=False)
full_name ... | 33.6 | 84 | 0.694728 |
4a1a59706b6097f300ac28a823bcb23e862a4fb7 | 318 | py | Python | bims/templatetags/td_biblio.py | Christiaanvdm/django-bims | f92a63156c711b2d53c5f8ea06867cd64cee9eb9 | [
"MIT"
] | 7 | 2017-03-16T20:50:29.000Z | 2019-11-07T01:00:10.000Z | bims/templatetags/td_biblio.py | Christiaanvdm/django-bims | f92a63156c711b2d53c5f8ea06867cd64cee9eb9 | [
"MIT"
] | 25 | 2017-03-23T14:12:25.000Z | 2019-06-14T07:53:17.000Z | bims/templatetags/td_biblio.py | Christiaanvdm/django-bims | f92a63156c711b2d53c5f8ea06867cd64cee9eb9 | [
"MIT"
] | 6 | 2017-09-05T06:55:20.000Z | 2019-06-09T14:04:00.000Z | # -*- coding: utf-8 -*-
from django import template
register = template.Library()
@register.filter
def publication_date(entry):
"""We expect an entry object to filter"""
if entry.is_partial_publication_date:
fmt = "%Y"
else:
fmt = "%F %Y"
return entry.publication_date.strftime(fmt)
| 21.2 | 47 | 0.657233 |
4a1a59d7d340f69a01b005f138e304714fe35641 | 855 | py | Python | src/chapter3_ros2_basics/chapter3_ros2_basics/topic_subscriber.py | slowrunner/handsonros2 | 8434414bba54e0bea06cda23f58ae62ee3c38b20 | [
"Apache-2.0"
] | 1 | 2021-09-21T19:53:29.000Z | 2021-09-21T19:53:29.000Z | src/chapter3_ros2_basics/chapter3_ros2_basics/topic_subscriber.py | slowrunner/handsonros2 | 8434414bba54e0bea06cda23f58ae62ee3c38b20 | [
"Apache-2.0"
] | null | null | null | src/chapter3_ros2_basics/chapter3_ros2_basics/topic_subscriber.py | slowrunner/handsonros2 | 8434414bba54e0bea06cda23f58ae62ee3c38b20 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# BEGIN ALL
# import rospy
import rclpy
from rclpy.node import Node
from std_msgs.msg import Int32
import sys
# BEGIN CALLBACK
def callback(msg):
global node
print(msg.data)
# rospy.loginfo(rospy.get_caller_id() + 'I heard %s', msg.data)
node.get_logger().info('I heard: {}'.for... | 21.923077 | 83 | 0.679532 |
4a1a5b9e84d463c8428cc9cc662dc2deb373eaf3 | 21,262 | py | Python | stafd.py | charles-rose/nvme-stas | 7af1f489d98dad53d7bbb697eccc53e5c08dbfcc | [
"Apache-2.0"
] | null | null | null | stafd.py | charles-rose/nvme-stas | 7af1f489d98dad53d7bbb697eccc53e5c08dbfcc | [
"Apache-2.0"
] | null | null | null | stafd.py | charles-rose/nvme-stas | 7af1f489d98dad53d7bbb697eccc53e5c08dbfcc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2021, Dell Inc. or its subsidiaries. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# See the LICENSE file for details.
#
# This file is part of NVMe STorage Appliance Services (nvme-stas).
#
# Authors: Martin Belanger <Martin.Belanger@dell.com>
#
''' STorage Applianc... | 45.528908 | 195 | 0.611796 |
4a1a5ba35c88b9dfdbbcb55463cda70da0625b51 | 3,166 | py | Python | workers/data_refinery_workers/processors/tximport.py | cgreene/refinebio | fe75e42f2963d60c4307806cba11520754547190 | [
"BSD-3-Clause"
] | null | null | null | workers/data_refinery_workers/processors/tximport.py | cgreene/refinebio | fe75e42f2963d60c4307806cba11520754547190 | [
"BSD-3-Clause"
] | null | null | null | workers/data_refinery_workers/processors/tximport.py | cgreene/refinebio | fe75e42f2963d60c4307806cba11520754547190 | [
"BSD-3-Clause"
] | null | null | null | import boto3
import glob
import io
import json
import multiprocessing
import os
import re
import shutil
import subprocess
import tarfile
from botocore.client import Config
from django.conf import settings
from django.db import transaction
from django.utils import timezone
from typing import Dict, List
import numpy as ... | 33.680851 | 92 | 0.708781 |
4a1a5bf6ba168a098f1d76f96235cdab0a4bb9c7 | 1,722 | py | Python | anvil/rig_templates/insect.py | AndresMWeber/Anvil | 9cd202183ac998983c2bf6e55cc46bbc0ca1a78e | [
"Apache-2.0"
] | 3 | 2019-11-22T04:38:06.000Z | 2022-01-19T08:27:18.000Z | anvil/rig_templates/insect.py | AndresMWeber/Anvil | 9cd202183ac998983c2bf6e55cc46bbc0ca1a78e | [
"Apache-2.0"
] | 28 | 2018-02-01T20:39:42.000Z | 2018-04-26T17:25:23.000Z | anvil/rig_templates/insect.py | AndresMWeber/Anvil | 9cd202183ac998983c2bf6e55cc46bbc0ca1a78e | [
"Apache-2.0"
] | 1 | 2018-03-11T06:47:26.000Z | 2018-03-11T06:47:26.000Z | import anvil.node_types as nt
import anvil.config as cfg
import anvil.sub_rig_templates as sub_rig_templates
class Diptera(nt.Rig):
SUB_RIG_BUIlD_TABLE = {
cfg.LEFT + '_' + cfg.ARM: [sub_rig_templates.BipedArm, {cfg.NAME: cfg.ARM, cfg.SIDE: cfg.LEFT}],
cfg.RIGHT + '_' + cfg.ARM: [sub_rig_templates... | 57.4 | 109 | 0.660859 |
4a1a5de8e9c10795660b18dbbccdc4c417d05993 | 731 | py | Python | zvt/domain/meta/block_meta.py | aaron8tang/zvt | 568cf0d42577eb05b96e1a07ec512aed34245b2d | [
"MIT"
] | null | null | null | zvt/domain/meta/block_meta.py | aaron8tang/zvt | 568cf0d42577eb05b96e1a07ec512aed34245b2d | [
"MIT"
] | null | null | null | zvt/domain/meta/block_meta.py | aaron8tang/zvt | 568cf0d42577eb05b96e1a07ec512aed34245b2d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from sqlalchemy import Column, String
from sqlalchemy.orm import declarative_base
from zvt.contract import Portfolio, PortfolioStock
from zvt.contract.register import register_schema, register_entity
BlockMetaBase = declarative_base()
@register_entity(entity_type='block')
class Block(BlockM... | 24.366667 | 70 | 0.730506 |
4a1a5eac51ec4e416742313543ea3def598f145a | 17,468 | py | Python | test/functional/test_framework/test_node.py | mdvenka/FTHcoin | 335d026521402e8452f5e1dc570366bd18a0fdf7 | [
"MIT"
] | null | null | null | test/functional/test_framework/test_node.py | mdvenka/FTHcoin | 335d026521402e8452f5e1dc570366bd18a0fdf7 | [
"MIT"
] | null | null | null | test/functional/test_framework/test_node.py | mdvenka/FTHcoin | 335d026521402e8452f5e1dc570366bd18a0fdf7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Class for faithcoind node under test"""
import contextlib
import decimal
import errno
from enum import... | 42.193237 | 158 | 0.631383 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.