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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79578191892439bc28c435fba3a9ad54a61413fe | 2,542 | py | Python | tools/misc/InvalidTestDetector.py | v-weiguo/test262 | a66c978c5f1faafebf90d1bb13774b7f0643e2c9 | [
"BSD-3-Clause"
] | null | null | null | tools/misc/InvalidTestDetector.py | v-weiguo/test262 | a66c978c5f1faafebf90d1bb13774b7f0643e2c9 | [
"BSD-3-Clause"
] | 1 | 2020-07-28T04:46:04.000Z | 2020-07-28T04:46:04.000Z | exhibitor/node_modules/6to5/vendor/test262/tools/misc/InvalidTestDetector.py | scharissis/liberator | a5a65ec3254b638078470b72aadef928c09e8fdc | [
"MIT"
] | null | null | null | # Copyright (c) 2012 Ecma International. All rights reserved.
# Ecma International makes this code available under the terms and conditions set
# forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
# "Use Terms"). Any redistribution of this code must retain the above
# copyright and this notice... | 38.515152 | 110 | 0.543273 |
795781ebd80873b6fdc52c32ab6038da0944047a | 5,053 | py | Python | tensorflow_datasets/core/features/audio_feature_test.py | harsh020/datasets | b4ad3617b279ec65356e696c4c860458621976f6 | [
"Apache-2.0"
] | 1 | 2020-12-22T17:05:51.000Z | 2020-12-22T17:05:51.000Z | tensorflow_datasets/core/features/audio_feature_test.py | harsh020/datasets | b4ad3617b279ec65356e696c4c860458621976f6 | [
"Apache-2.0"
] | null | null | null | tensorflow_datasets/core/features/audio_feature_test.py | harsh020/datasets | b4ad3617b279ec65356e696c4c860458621976f6 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The TensorFlow Datasets 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 appl... | 30.439759 | 93 | 0.654067 |
795782db8000790f073c54c80c4133492ded6912 | 704 | py | Python | baekjoon/python/increasing_number_11057.py | yskang/AlgorithmPractice | 31b76e38b4c2f1e3e29fb029587662a745437912 | [
"MIT"
] | null | null | null | baekjoon/python/increasing_number_11057.py | yskang/AlgorithmPractice | 31b76e38b4c2f1e3e29fb029587662a745437912 | [
"MIT"
] | 1 | 2019-11-04T06:44:04.000Z | 2019-11-04T06:46:55.000Z | baekjoon/python/increasing_number_11057.py | yskang/AlgorithmPractice | 31b76e38b4c2f1e3e29fb029587662a745437912 | [
"MIT"
] | null | null | null | # Title: 오르막 수
# Link: https://www.acmicpc.net/problem/11057
import sys
sys.setrecursionlimit(10 ** 6)
read_single_int = lambda: int(sys.stdin.readline().strip())
def solution(n: int):
if n == 1:
return 10
d = [[0 for _ in range(10)] for _ in range(n+1)]
for i in range(10):
d... | 17.170732 | 59 | 0.515625 |
795782f8df28af1a815f6a729a3a817fd32e9ed2 | 80,499 | py | Python | zerver/tests/test_events.py | roberthoenig/zulip | 5d6724345a8ba4896d21478be2e33e624f8ac8ab | [
"Apache-2.0"
] | null | null | null | zerver/tests/test_events.py | roberthoenig/zulip | 5d6724345a8ba4896d21478be2e33e624f8ac8ab | [
"Apache-2.0"
] | null | null | null | zerver/tests/test_events.py | roberthoenig/zulip | 5d6724345a8ba4896d21478be2e33e624f8ac8ab | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# See http://zulip.readthedocs.io/en/latest/events-system.html for
# high-level documentation on how this system works.
from __future__ import absolute_import
from __future__ import print_function
from typing import Any, Callable, Dict, List, Optional, Union, Text, Tuple
from django.conf import... | 43.372306 | 133 | 0.571038 |
795783a4216aab9423b51d9926f5f9d4c39cf17d | 1,138 | py | Python | kanon_api/routes/calendars.py | legau/kanon-api | bae8fcba11caefa2f6715247852f853bb52fb9a6 | [
"BSD-3-Clause"
] | null | null | null | kanon_api/routes/calendars.py | legau/kanon-api | bae8fcba11caefa2f6715247852f853bb52fb9a6 | [
"BSD-3-Clause"
] | 80 | 2021-04-21T16:02:03.000Z | 2022-03-28T00:48:58.000Z | kanon_api/routes/calendars.py | legau/kanon-api | bae8fcba11caefa2f6715247852f853bb52fb9a6 | [
"BSD-3-Clause"
] | null | null | null | import dataclasses
from fastapi.param_functions import Depends
from fastapi.routing import APIRouter
from kanon.calendars.calendars import Calendar, hours_to_day
from kanon_api.utils import DateParams, safe_calendar, safe_date
router = APIRouter(prefix="/calendars", tags=["calendars"])
@router.get("/{calendar}/to_... | 27.095238 | 81 | 0.699473 |
795784107a2af5a80883f455d84274dcf5b36d65 | 5,609 | py | Python | src/nimbro_vis/contrib/rqt/rqt_gui/src/rqt_gui/rospkg_plugin_provider.py | nvtienanh/UXA_OP | a06a3f1113721627e7d384f89718369036e8028e | [
"BSD-3-Clause"
] | 2 | 2018-11-22T08:15:43.000Z | 2020-07-22T07:18:50.000Z | src/nimbro_vis/contrib/rqt/rqt_gui/src/rqt_gui/rospkg_plugin_provider.py | nvtienanh/UXA_OP | a06a3f1113721627e7d384f89718369036e8028e | [
"BSD-3-Clause"
] | 1 | 2018-11-22T08:34:34.000Z | 2018-11-22T08:34:34.000Z | src/nimbro_vis/contrib/rqt/rqt_gui/src/rqt_gui/rospkg_plugin_provider.py | nvtienanh/UXA_OP | a06a3f1113721627e7d384f89718369036e8028e | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2011, Dirk Thomas, Dorian Scholz, TU Darmstadt
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice... | 46.741667 | 121 | 0.635051 |
7957848ee5e5f36c726dc835c58233a87d159e0c | 4,282 | py | Python | pdf-txt.py | JamesRunnalls/pdf-txt | 238223d548bf231a9fb76cec8823cec47fad7853 | [
"MIT"
] | null | null | null | pdf-txt.py | JamesRunnalls/pdf-txt | 238223d548bf231a9fb76cec8823cec47fad7853 | [
"MIT"
] | null | null | null | pdf-txt.py | JamesRunnalls/pdf-txt | 238223d548bf231a9fb76cec8823cec47fad7853 | [
"MIT"
] | null | null | null |
# coding: utf-8
from pdfminer.layout import LAParams
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import PDFPageAggregator
from pdfminer.pdfpage import PDFPage
from pdfminer.layout import LTTextBoxHorizontal
from functools import reduce
import pandas as pd
import re
im... | 38.576577 | 254 | 0.581738 |
795785616752ccd327d8d39169088b51c4ed2358 | 12,040 | py | Python | bentoml/service/inference_api.py | d3m0n-r00t/BentoML | e5c53b821369f5391de9ab3a20ecad5db9e77202 | [
"Apache-2.0"
] | 1 | 2021-04-21T17:59:35.000Z | 2021-04-21T17:59:35.000Z | bentoml/service/inference_api.py | d3m0n-r00t/BentoML | e5c53b821369f5391de9ab3a20ecad5db9e77202 | [
"Apache-2.0"
] | 1 | 2021-01-22T08:23:40.000Z | 2021-01-22T08:23:40.000Z | bentoml/service/inference_api.py | d3m0n-r00t/BentoML | e5c53b821369f5391de9ab3a20ecad5db9e77202 | [
"Apache-2.0"
] | 2 | 2021-01-06T14:09:21.000Z | 2021-03-31T16:04:31.000Z | # Copyright 2019 Atalaya Tech, 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,... | 37.275542 | 87 | 0.593522 |
795785640167fa175a30f68940c33818aa3df01a | 12,996 | py | Python | mapss/static/packages/arches/arches/app/datatypes/concept_types.py | MPI-MAPSS/MAPSS | 3a5c0109758801717aaa8de1125ca5e98f83d3b4 | [
"CC0-1.0"
] | null | null | null | mapss/static/packages/arches/arches/app/datatypes/concept_types.py | MPI-MAPSS/MAPSS | 3a5c0109758801717aaa8de1125ca5e98f83d3b4 | [
"CC0-1.0"
] | null | null | null | mapss/static/packages/arches/arches/app/datatypes/concept_types.py | MPI-MAPSS/MAPSS | 3a5c0109758801717aaa8de1125ca5e98f83d3b4 | [
"CC0-1.0"
] | null | null | null | import uuid
import csv
from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import ugettext as _
from arches.app.models import models
from arches.app.models import concept
from arches.app.models.system_settings import settings
from arches.app.datatypes.base import BaseDataType
from arches... | 42.609836 | 139 | 0.601493 |
79578568d0cf8421cd881294ddf582d3b8a48162 | 577 | py | Python | book/code/streamspeedtest.py | columbia-applied-data-science/lecturenotes | 047b0cdc6ce70c441526f26e5516337e395feb84 | [
"CC0-1.0"
] | null | null | null | book/code/streamspeedtest.py | columbia-applied-data-science/lecturenotes | 047b0cdc6ce70c441526f26e5516337e395feb84 | [
"CC0-1.0"
] | null | null | null | book/code/streamspeedtest.py | columbia-applied-data-science/lecturenotes | 047b0cdc6ce70c441526f26e5516337e395feb84 | [
"CC0-1.0"
] | null | null | null | import numpy as np
import pandas
from numpy.random import rand
def generate_arrays(N):
rand(N).tofile('/tmp/x.data', sep='\n')
rand(N).tofile('/tmp/y.data', sep='\n')
def myfun(xfile, yfile):
fx = open(xfile, 'r')
fy = open(yfile, 'r')
retval = 0.0
for x in fx:
y = fy.next()
... | 18.03125 | 43 | 0.590988 |
7957858cbab20ad6f4c34f3744c2929720a79b89 | 1,067 | py | Python | src/livestreamer/stream/http.py | rzr/livestreamer | 96e3c70977901f203ef27272459465c2005cc789 | [
"BSD-2-Clause",
"MIT"
] | 1 | 2016-01-15T09:03:17.000Z | 2016-01-15T09:03:17.000Z | src/livestreamer/stream/http.py | huangbong/livestreamer | 14d242614362208cc66023ada68d71262448a69a | [
"BSD-2-Clause",
"MIT"
] | null | null | null | src/livestreamer/stream/http.py | huangbong/livestreamer | 14d242614362208cc66023ada68d71262448a69a | [
"BSD-2-Clause",
"MIT"
] | null | null | null | from .stream import Stream
from .wrappers import StreamIOWrapper
from ..exceptions import StreamError
from ..utils import urlget
from requests import Request
class HTTPStream(Stream):
"""
Regular HTTP stream
*Attributes:*
- :attr:`url` URL to the stream
- :attr:`args` A :class:`dict` containing... | 23.195652 | 73 | 0.602624 |
795785b712ddd90fefae8c5aebdeae9e2d51058c | 9,362 | py | Python | packages/skills/tac_negotiation/transactions.py | 8ball030/agents-aea | fcf470e3daa9bd8e272ca66542c6003feb0fd7a8 | [
"Apache-2.0"
] | 1 | 2021-07-25T18:50:18.000Z | 2021-07-25T18:50:18.000Z | packages/skills/tac_negotiation/transactions.py | 8ball030/agents-aea | fcf470e3daa9bd8e272ca66542c6003feb0fd7a8 | [
"Apache-2.0"
] | null | null | null | packages/skills/tac_negotiation/transactions.py | 8ball030/agents-aea | fcf470e3daa9bd8e272ca66542c6003feb0fd7a8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2019 Fetch.AI Limited
#
# 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... | 44.160377 | 147 | 0.699423 |
795788424ef06d0225e692e2a417f0c0085c11df | 897 | py | Python | setup.py | alt-dima/aws-quota-checker | 8a2af974fce01149856c99e5d34a29244a3ba067 | [
"MIT"
] | 43 | 2021-02-25T00:53:24.000Z | 2022-02-25T17:38:24.000Z | setup.py | alt-dima/aws-quota-checker | 8a2af974fce01149856c99e5d34a29244a3ba067 | [
"MIT"
] | 25 | 2021-02-24T22:47:29.000Z | 2022-02-14T21:04:26.000Z | setup.py | alt-dima/aws-quota-checker | 8a2af974fce01149856c99e5d34a29244a3ba067 | [
"MIT"
] | 9 | 2021-02-26T21:01:33.000Z | 2022-01-18T08:25:33.000Z | from os import path
from setuptools import setup, find_packages
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='aws-quota-checker',
version='1.10.0',
description='A CLI tool that ch... | 24.243243 | 73 | 0.590858 |
79578a2af373bac8565453360a0efecc8c6b4bf0 | 3,134 | py | Python | gui/qt/qrwindow.py | JeremyRand/electrum-nmc | 52b3522924122b91e2be9923a6e106b35650ebdf | [
"MIT"
] | null | null | null | gui/qt/qrwindow.py | JeremyRand/electrum-nmc | 52b3522924122b91e2be9923a6e106b35650ebdf | [
"MIT"
] | null | null | null | gui/qt/qrwindow.py | JeremyRand/electrum-nmc | 52b3522924122b91e2be9923a6e106b35650ebdf | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2014 Thomas Voegtlin
#
# 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... | 34.822222 | 141 | 0.692087 |
79578a67831da6d4729fd07bf521f1c9aa7f404b | 3,906 | py | Python | scripts/modules/tests/test_reweighting.py | andrrizzi/tfep-revisited-2021 | 9a9aff61286be3111c4e70136620d0e3aac31318 | [
"MIT"
] | 7 | 2021-07-22T00:53:37.000Z | 2022-03-11T07:29:36.000Z | scripts/modules/tests/test_reweighting.py | andrrizzi/tfep-revisited-2021 | 9a9aff61286be3111c4e70136620d0e3aac31318 | [
"MIT"
] | 2 | 2021-08-24T07:54:55.000Z | 2021-09-14T08:51:55.000Z | scripts/modules/tests/test_reweighting.py | andrrizzi/tfep-revisited-2021 | 9a9aff61286be3111c4e70136620d0e3aac31318 | [
"MIT"
] | 1 | 2021-07-22T00:53:56.000Z | 2021-07-22T00:53:56.000Z | #!/usr/bin/env python
# =============================================================================
# MODULE DOCSTRING
# =============================================================================
"""
Test objects and function in the module reweighting.
"""
# ===================================================... | 38.673267 | 106 | 0.534306 |
79578b3702886246708a2f00a3d0605a1346e4e5 | 2,002 | py | Python | tests/helpers.py | oarepo/invenio-oarepo-oai-pmh-harvester | 399ef743ac9da23d36e655e072aa72ee1b332372 | [
"MIT"
] | null | null | null | tests/helpers.py | oarepo/invenio-oarepo-oai-pmh-harvester | 399ef743ac9da23d36e655e072aa72ee1b332372 | [
"MIT"
] | 13 | 2020-11-04T13:47:55.000Z | 2021-04-15T17:56:33.000Z | tests/helpers.py | oarepo/oarepo-oai-pmh-harvester | 399ef743ac9da23d36e655e072aa72ee1b332372 | [
"MIT"
] | 1 | 2020-05-14T07:59:12.000Z | 2020-05-14T07:59:12.000Z | # TODO: otestovat celý kód, zde je Mock harvestu
# https://github.com/mloesch/sickle/blob/master/sickle/tests/test_harvesting.py
import os
from sickle import OAIResponse
from sickle._compat import to_unicode
class MockResponse(object):
"""Mimics the response object returned by HTTP requests."""
def __init_... | 40.857143 | 80 | 0.691808 |
79578b4bac5897314a41a2ea6cdde85312c69ce6 | 1,782 | py | Python | plotposterior.py | JohannesBuchner/massivedatans | bf13e90048a3a1bb945e25e0a8848c08fa8a80f8 | [
"BSD-2-Clause"
] | 10 | 2017-07-17T20:59:29.000Z | 2019-09-09T01:57:05.000Z | plotposterior.py | JohannesBuchner/massivedatans | bf13e90048a3a1bb945e25e0a8848c08fa8a80f8 | [
"BSD-2-Clause"
] | 1 | 2020-04-23T13:59:35.000Z | 2020-04-23T13:59:35.000Z | plotposterior.py | JohannesBuchner/massivedatans | bf13e90048a3a1bb945e25e0a8848c08fa8a80f8 | [
"BSD-2-Clause"
] | 3 | 2017-07-18T01:41:04.000Z | 2018-06-05T16:42:10.000Z | from __future__ import print_function, division
import json
import numpy
from numpy import log, log10
import sys
import matplotlib.pyplot as plt
import h5py
import scipy.stats
xx = []
yy = []
filename = sys.argv[1]
colors = ['yellow', 'pink', 'cyan', 'magenta']
cmap = plt.cm.gray
zs = []
plt.figure(figsize=(6,4))
wit... | 25.457143 | 102 | 0.618406 |
79578b7a5bdbd06bd6c391eaa54f606c1eda2334 | 8,626 | py | Python | test/albumentations_on_real_set.py | GorkemP/EndoCV2021-EfficientDet-Pytorch | 2ca3140d50a07e503850cad101deb0887eace9c7 | [
"MIT"
] | 4 | 2021-05-29T19:02:19.000Z | 2021-12-17T13:53:45.000Z | test/albumentations_on_real_set.py | GorkemP/EndoCV2021-EfficientDet-Pytorch | 2ca3140d50a07e503850cad101deb0887eace9c7 | [
"MIT"
] | null | null | null | test/albumentations_on_real_set.py | GorkemP/EndoCV2021-EfficientDet-Pytorch | 2ca3140d50a07e503850cad101deb0887eace9c7 | [
"MIT"
] | null | null | null | # Created by Gorkem Polat at 23.02.2021
# contact: polatgorkem@gmail.com
# import argparse
# import os
# import numpy as np
# import yaml
# import matplotlib.pyplot as plt
# from torchvision import transforms
# from efficientdet.dataset import CocoDataset, Resizer, Normalizer
# from utils.sync_batchnorm import patch_r... | 45.162304 | 171 | 0.589961 |
79578c4dc78c59e92af79eb8e8beb0fb81fdaa5f | 3,390 | py | Python | airflow/providers/google/marketing_platform/example_dags/example_analytics.py | troywinter/airflow | ba66ba0d97941c55d9f00f66329a9d3c7ad673e7 | [
"Apache-2.0"
] | 1 | 2019-05-07T06:46:55.000Z | 2019-05-07T06:46:55.000Z | airflow/providers/google/marketing_platform/example_dags/example_analytics.py | troywinter/airflow | ba66ba0d97941c55d9f00f66329a9d3c7ad673e7 | [
"Apache-2.0"
] | 9 | 2020-07-28T15:07:03.000Z | 2022-03-29T22:27:52.000Z | airflow/providers/google/marketing_platform/example_dags/example_analytics.py | troywinter/airflow | ba66ba0d97941c55d9f00f66329a9d3c7ad673e7 | [
"Apache-2.0"
] | 1 | 2019-06-15T08:38:53.000Z | 2019-06-15T08:38:53.000Z | # 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
# "License"); you may not u... | 38.965517 | 100 | 0.777876 |
79578c95fc6ffdd414c52bf0c13ed9f11baa76ba | 2,577 | py | Python | webapp/general/models.py | DzenMorm/team_work_tattoo | a4a618eb2f703c8515efa3ecc25259c414594cff | [
"MIT"
] | null | null | null | webapp/general/models.py | DzenMorm/team_work_tattoo | a4a618eb2f703c8515efa3ecc25259c414594cff | [
"MIT"
] | null | null | null | webapp/general/models.py | DzenMorm/team_work_tattoo | a4a618eb2f703c8515efa3ecc25259c414594cff | [
"MIT"
] | null | null | null | from flask_login import UserMixin
from werkzeug.security import generate_password_hash, check_password_hash
from webapp.db import db
class Auth(db.Model, UserMixin):
__tablename__ = 'auth'
id = db.Column(db.Integer, primary_key=True)
email = db.Column(db.String, nullable=False, unique=True)
password... | 31.426829 | 76 | 0.646876 |
79578ca6b93d8e5c21bb1b2cc3a7213418d99e64 | 24,571 | py | Python | run.py | leeyy2020/LM-BFF | 2c80b2ea3987c403c4d4abc6e202d280ea846210 | [
"MIT"
] | null | null | null | run.py | leeyy2020/LM-BFF | 2c80b2ea3987c403c4d4abc6e202d280ea846210 | [
"MIT"
] | null | null | null | run.py | leeyy2020/LM-BFF | 2c80b2ea3987c403c4d4abc6e202d280ea846210 | [
"MIT"
] | null | null | null | """Finetuning the library models for sequence classification on GLUE."""
import dataclasses
import logging
import os
import sys
from dataclasses import dataclass, field
from typing import Callable, Dict, Optional
import torch
import numpy as np
import transformers
from transformers import AutoConfig, AutoModelForSeq... | 38.633648 | 174 | 0.622807 |
79578ce0164e3c1b493d9208e1608e2683884d77 | 4,661 | py | Python | synthesize.wave.py | f2re/FCH-TTS | 54ddee710694929d978943356fe913609ed0aab5 | [
"MIT"
] | 80 | 2021-04-02T09:24:18.000Z | 2021-09-18T08:51:19.000Z | synthesize.wave.py | f2re/FCH-TTS | 54ddee710694929d978943356fe913609ed0aab5 | [
"MIT"
] | 5 | 2021-04-26T06:51:49.000Z | 2021-08-19T09:52:27.000Z | synthesize.wave.py | f2re/FCH-TTS | 54ddee710694929d978943356fe913609ed0aab5 | [
"MIT"
] | 14 | 2021-04-02T00:04:50.000Z | 2021-09-03T00:58:28.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File : train-duration.py
@Date : 2021/01/05, Tue
@Author : Atomicoo
@Version : 1.0
@Contact : atomicoo95@gmail.com
@License : (C)Copyright 2020-2021, ShiGroup-NLP-XMU
@Desc : Synthetize sentences into speech.
'''
__author__ = 'Atomicoo'
impo... | 38.204918 | 113 | 0.700493 |
79578d274fb930885e4a47e5d609aefed900826b | 130 | py | Python | setup.py | tamos/real_prices | 9f14e8e10341eccd1fdd5c726be216afa62ee326 | [
"MIT"
] | null | null | null | setup.py | tamos/real_prices | 9f14e8e10341eccd1fdd5c726be216afa62ee326 | [
"MIT"
] | null | null | null | setup.py | tamos/real_prices | 9f14e8e10341eccd1fdd5c726be216afa62ee326 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(name="real_prices", packages=find_packages(),
install_requires=['pandas'])
| 26 | 51 | 0.776923 |
79578d5f8b22847b84fb5d8a29b67371186ccb9c | 10,416 | py | Python | src/tensorpack_cpu/tensorpack/RL/simulator.py | deepsense-ai/Distributed-BA3C | f5195ae83121746bd449e1a5eb2897000bbd12df | [
"Apache-2.0"
] | 62 | 2017-10-04T12:17:15.000Z | 2021-12-31T06:22:23.000Z | src/tensorpack_cpu/tensorpack/RL/simulator.py | deepsense-ai/Distributed-BA3C | f5195ae83121746bd449e1a5eb2897000bbd12df | [
"Apache-2.0"
] | 19 | 2018-01-28T23:05:33.000Z | 2022-03-11T23:14:57.000Z | src/tensorpack_cpu/tensorpack/RL/simulator.py | deepsense-ai/Distributed-BA3C | f5195ae83121746bd449e1a5eb2897000bbd12df | [
"Apache-2.0"
] | 10 | 2017-10-06T16:36:04.000Z | 2018-12-02T09:11:09.000Z | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
# File: simulator.py
# Author: Yuxin Wu <ppwwyyxxc@gmail.com>
import sys
import os
import signal
import time
import tensorflow as tf
import multiprocessing as mp
import time
import threading
import weakref
from abc import abstractmethod, ABCMeta
from collections import de... | 31.468278 | 102 | 0.627592 |
79578d7e079216ce6b788118f92dccdc9c6e380a | 1,795 | py | Python | conans/test/functional/toolchains/test_msbuild_toolchain.py | fanStefan/conan | 7e9baff749ded0656e19d343a6483bf33cf32086 | [
"MIT"
] | 6,205 | 2015-12-01T13:40:05.000Z | 2022-03-31T07:30:25.000Z | conans/test/functional/toolchains/test_msbuild_toolchain.py | fanStefan/conan | 7e9baff749ded0656e19d343a6483bf33cf32086 | [
"MIT"
] | 8,747 | 2015-12-01T16:28:48.000Z | 2022-03-31T23:34:53.000Z | conans/test/functional/toolchains/test_msbuild_toolchain.py | fanStefan/conan | 7e9baff749ded0656e19d343a6483bf33cf32086 | [
"MIT"
] | 961 | 2015-12-01T16:56:43.000Z | 2022-03-31T13:50:52.000Z | import platform
import textwrap
import pytest
from parameterized import parameterized
from conans.test.utils.tools import TestClient
@parameterized.expand([("msvc", "19.0", "dynamic"),
("msvc", "19.1", "static")]
)
@pytest.mark.tool_visual_studio
@pytest.mark.skipif(plat... | 37.395833 | 80 | 0.62507 |
79578d7eee013a56f9a0f839c364721bf229f1b7 | 728 | py | Python | src/dials/algorithms/image/filter/__init__.py | dials-src/dials | 25055c1f6164dc33e672e7c5c6a9c5a35e870660 | [
"BSD-3-Clause"
] | 1 | 2021-12-10T17:28:16.000Z | 2021-12-10T17:28:16.000Z | src/dials/algorithms/image/filter/__init__.py | dials-src/dials | 25055c1f6164dc33e672e7c5c6a9c5a35e870660 | [
"BSD-3-Clause"
] | null | null | null | src/dials/algorithms/image/filter/__init__.py | dials-src/dials | 25055c1f6164dc33e672e7c5c6a9c5a35e870660 | [
"BSD-3-Clause"
] | 1 | 2021-12-07T12:39:04.000Z | 2021-12-07T12:39:04.000Z | from __future__ import annotations
from dials_algorithms_image_filter_ext import * # noqa: F403; lgtm
__all__ = ( # noqa: F405
"IndexOfDispersionFilterDouble",
"IndexOfDispersionFilterFloat",
"IndexOfDispersionFilterMaskedDouble",
"IndexOfDispersionFilterMaskedFloat",
"MeanAndVarianceFilterDoubl... | 26.962963 | 67 | 0.736264 |
79578df083e4af3fb4ac2410c6c7c48912460aa7 | 1,160 | py | Python | Relue/Eu76.py | jialing3/corner_cases | 54a316518fcf4b43ae96ed9935b4cf91ade1eed9 | [
"Apache-2.0"
] | 1 | 2015-05-29T08:40:48.000Z | 2015-05-29T08:40:48.000Z | Relue/Eu76.py | jialing3/corner_cases | 54a316518fcf4b43ae96ed9935b4cf91ade1eed9 | [
"Apache-2.0"
] | null | null | null | Relue/Eu76.py | jialing3/corner_cases | 54a316518fcf4b43ae96ed9935b4cf91ade1eed9 | [
"Apache-2.0"
] | null | null | null | class Solution:
def __init__(self):
self.memo = {}
def break_down(self, n, to_use):
if type(n) != int or type(to_use) != list:
return 0
else:
if len(to_use) == 0:
return 1 if n == 0 else 0
elif len(to_use) == 1 and to_use[0] == n:
... | 34.117647 | 107 | 0.562069 |
79578e2775f3dd600b92fb3dbe033e834dd9a0f9 | 1,045 | py | Python | models/model_factory.py | yangzonglin1994/yangzl-deep-text-matching | 2beadd1c2ebf2b169558b9978e0cbc66d1d25fc6 | [
"MIT"
] | 2 | 2018-08-10T20:02:44.000Z | 2018-08-10T20:02:50.000Z | models/model_factory.py | yangzonglin1994/yangzl-text-matching | 2beadd1c2ebf2b169558b9978e0cbc66d1d25fc6 | [
"MIT"
] | 1 | 2018-07-30T08:54:35.000Z | 2018-07-30T08:54:35.000Z | models/model_factory.py | yangzonglin1994/yangzl-text-matching | 2beadd1c2ebf2b169558b9978e0cbc66d1d25fc6 | [
"MIT"
] | null | null | null | from configs.net_conf import available_models
from models.avg_seq_dense import AvgSeqDenseModel
from models.basic_model import BasicModel
from models.rnmt_encoder_bilstm_dense import RNMTPlusEncoderBiLSTMDenseModel
from models.stacked_bilstm_dense import StackedBiLSTMDenseModel
from models.transformer_encoder_bilstm_de... | 40.192308 | 86 | 0.757895 |
79578e2af56fa0ba23da75a791ad8f847acd5b4d | 327 | py | Python | PBO_18099/Latihan_7.1.Class1.py | viviyanti/PBO | 2f9ab22a10f94d007bbe5407c91287c53f10a435 | [
"MIT"
] | null | null | null | PBO_18099/Latihan_7.1.Class1.py | viviyanti/PBO | 2f9ab22a10f94d007bbe5407c91287c53f10a435 | [
"MIT"
] | null | null | null | PBO_18099/Latihan_7.1.Class1.py | viviyanti/PBO | 2f9ab22a10f94d007bbe5407c91287c53f10a435 | [
"MIT"
] | 1 | 2020-03-25T03:48:40.000Z | 2020-03-25T03:48:40.000Z | class Mahasiswa :
def __init__(self):
self.nama = "vivi"
self.nilai = (90, 70, 90, 80)
def hitung_nilai(self):
return sum(self.nilai)/len(self.nilai)
#cara pemanggilan class
mahasiswa = Mahasiswa()
print("Nama : ", mahasiswa.nama)
print("Total Nilai : ", mahasiswa.hitung_n... | 25.153846 | 49 | 0.620795 |
79578ea873d9537abe931006f970d96dddb98194 | 3,481 | py | Python | Porosity in selective laser sintering/powderGeneration.py | zwang586/MICNN | 3d27a7f624ed03502fd500628b8e5136cb3f0730 | [
"MIT"
] | null | null | null | Porosity in selective laser sintering/powderGeneration.py | zwang586/MICNN | 3d27a7f624ed03502fd500628b8e5136cb3f0730 | [
"MIT"
] | null | null | null | Porosity in selective laser sintering/powderGeneration.py | zwang586/MICNN | 3d27a7f624ed03502fd500628b8e5136cb3f0730 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
##Add one powder to the lowest point of input structure - s_eta
##Return new structure with the added powder and other updated infomation.
import numpy as np
import matplotlib.pyplot as plt
def powder(s_eta,nx,ny,layer,t,ymax):
#s_eta: input structure.
#layer:layer_no.
#t: ... | 34.127451 | 134 | 0.494398 |
79578f4b889bf7bbc2e60e212272b9dd9fc9aa25 | 550 | py | Python | test/test_issues/test_issue223.py | jjon/rdflib | 4c2ab7b392b353bf3c6088017ec9351ce8ac3db6 | [
"BSD-3-Clause"
] | null | null | null | test/test_issues/test_issue223.py | jjon/rdflib | 4c2ab7b392b353bf3c6088017ec9351ce8ac3db6 | [
"BSD-3-Clause"
] | 6 | 2021-11-22T19:10:32.000Z | 2022-01-31T19:16:37.000Z | test/test_issues/test_issue223.py | jjon/rdflib | 4c2ab7b392b353bf3c6088017ec9351ce8ac3db6 | [
"BSD-3-Clause"
] | null | null | null | from rdflib.graph import Graph
from rdflib.term import URIRef
ttl = """
@prefix : <http://example.org/>.
:s :p (:a :b :a).
"""
def test_collection_with_duplicates():
g = Graph().parse(data=ttl, format="turtle")
for _, _, o in g.triples(
(URIRef("http://example.org/s"), URIRef("http://example.org/p")... | 22.916667 | 86 | 0.598182 |
79578f4d7a3021993ef096aa79e0cb402461f587 | 272 | py | Python | 2019/day-1/part-2.py | joaopalmeiro/advent-of-code-2019 | c42f907c7338968eaa41afd3daccca3ec0e1284b | [
"MIT"
] | null | null | null | 2019/day-1/part-2.py | joaopalmeiro/advent-of-code-2019 | c42f907c7338968eaa41afd3daccca3ec0e1284b | [
"MIT"
] | null | null | null | 2019/day-1/part-2.py | joaopalmeiro/advent-of-code-2019 | c42f907c7338968eaa41afd3daccca3ec0e1284b | [
"MIT"
] | null | null | null | from math import floor
with open('input.txt', 'r') as reader:
inp = list(map(int, reader))
total_fuel = 0
while sum(inp) > 0:
inp = [floor(mass / 3) - 2 if floor(mass / 3) -
2 > 0 else 0 for mass in inp]
total_fuel += sum(inp)
print(total_fuel)
| 19.428571 | 51 | 0.595588 |
79579054f0bccfe8bb10d3c18aae6bcb6dc2b47e | 7,548 | py | Python | tests/python/pants_test/backend/python/tasks/test_select_interpreter.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/backend/python/tasks/test_select_interpreter.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/backend/python/tasks/test_select_interpreter.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import os
from builtins import str
from textwrap import dedent
import mock
from pex.inte... | 48.384615 | 110 | 0.744966 |
795791d22d5a690416135b0b1b48c4eb2da05e91 | 15,008 | py | Python | jina/peapods/pods/config/k8s.py | liusy182/jina | eb1b605f5c635f7db83e6adf9d77e52747ea7a8d | [
"Apache-2.0"
] | 1 | 2021-04-11T08:06:05.000Z | 2021-04-11T08:06:05.000Z | jina/peapods/pods/config/k8s.py | sthagen/jina | c272bbddef733167804c5a68d5f41ec789fa1732 | [
"Apache-2.0"
] | 1 | 2021-07-16T17:36:22.000Z | 2021-09-22T13:48:18.000Z | jina/peapods/pods/config/k8s.py | sthagen/jina | c272bbddef733167804c5a68d5f41ec789fa1732 | [
"Apache-2.0"
] | null | null | null | import copy
from argparse import Namespace
from typing import Dict, Union, List, Optional, Tuple
from jina import __default_executor__
from jina.enums import PeaRoleType
from jina.peapods.pods.config.k8slib import kubernetes_deployment
from jina.peapods.pods.config.helper import (
get_image_name,
to_compatible... | 40.128342 | 94 | 0.567764 |
79579226606f93317586d77801582dc5014e6c84 | 2,230 | py | Python | jwt_auth/utils.py | vwrobel/django-jwt-auth | 12b14645cc29f0b2e5824ff7ff7911026de81cdc | [
"MIT"
] | 1 | 2019-08-27T09:38:45.000Z | 2019-08-27T09:38:45.000Z | jwt_auth/utils.py | vwrobel/django-jwt-auth | 12b14645cc29f0b2e5824ff7ff7911026de81cdc | [
"MIT"
] | null | null | null | jwt_auth/utils.py | vwrobel/django-jwt-auth | 12b14645cc29f0b2e5824ff7ff7911026de81cdc | [
"MIT"
] | 2 | 2016-10-19T11:38:47.000Z | 2019-08-27T09:38:48.000Z | from __future__ import unicode_literals
from datetime import datetime
import importlib
import jwt
def jwt_payload_handler(user):
from jwt_auth import settings
try:
username = user.get_username()
except AttributeError:
username = user.username
return {
'user_id': user.pk,
... | 25.340909 | 107 | 0.662332 |
7957931e05f7ccb7e59239d281025ac9977b6650 | 24,271 | py | Python | PyCORe_main.py | zili1010/LLE-Simulation | 0faf51ec32b99e388b05311b39bc6349da966e87 | [
"MIT"
] | null | null | null | PyCORe_main.py | zili1010/LLE-Simulation | 0faf51ec32b99e388b05311b39bc6349da966e87 | [
"MIT"
] | null | null | null | PyCORe_main.py | zili1010/LLE-Simulation | 0faf51ec32b99e388b05311b39bc6349da966e87 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
from scipy.integrate import complex_ode,solve_ivp
import matplotlib.ticker as ticker
import matplotlib.colors as mcolors
from scipy.constants import pi, c, hbar
from matplotlib.widgets import Slider, Button, TextBox
from matplotlib.animation import FuncAnimation
import... | 47.497065 | 205 | 0.579787 |
7957931ecf7d30fd7b4bc0773fdc6c1009bb7684 | 6,248 | py | Python | src/dataloaders/mnist.py | maharshi95/GANTree | 5541c5fb0ba3d856081c03f37870a85fdd654681 | [
"MIT"
] | 16 | 2019-09-17T00:25:49.000Z | 2021-11-04T06:49:05.000Z | src/dataloaders/mnist.py | maharshi95/GANTree | 5541c5fb0ba3d856081c03f37870a85fdd654681 | [
"MIT"
] | 6 | 2020-01-28T22:55:51.000Z | 2022-02-10T00:20:41.000Z | src/dataloaders/mnist.py | maharshi95/GANTree | 5541c5fb0ba3d856081c03f37870a85fdd654681 | [
"MIT"
] | 3 | 2019-08-21T06:47:05.000Z | 2020-07-19T00:33:13.000Z | from __future__ import absolute_import
import torch as tr
from base.dataloader import BaseDataLoader
from torchvision.datasets import MNIST, FashionMNIST
from torch.utils.data import Dataset
import torchvision.transforms as transforms
import numpy as np
class MnistDataLoader(BaseDataLoader):
def __init__(self, ... | 54.807018 | 128 | 0.540493 |
7957932eded2f3cf164eccf231970c3f3336f74d | 4,141 | py | Python | webproctor/settings.py | mrabhi05/webproctor | a5da4d909f71b3f7b50b00727edbdf52483451d1 | [
"MIT"
] | null | null | null | webproctor/settings.py | mrabhi05/webproctor | a5da4d909f71b3f7b50b00727edbdf52483451d1 | [
"MIT"
] | null | null | null | webproctor/settings.py | mrabhi05/webproctor | a5da4d909f71b3f7b50b00727edbdf52483451d1 | [
"MIT"
] | null | null | null | """
Django settings for webproctor project.
Generated by 'django-admin startproject' using Django 3.0.5.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os... | 27.97973 | 112 | 0.719391 |
795793318a6ae2d56f6b7b082a6739b58462a18b | 974 | py | Python | start_instances.py | danilo-lopes/terra-ec2-cron | 47d92b71f30d740da8d4ca1fd3a3c47b33aa3d5c | [
"MIT"
] | null | null | null | start_instances.py | danilo-lopes/terra-ec2-cron | 47d92b71f30d740da8d4ca1fd3a3c47b33aa3d5c | [
"MIT"
] | null | null | null | start_instances.py | danilo-lopes/terra-ec2-cron | 47d92b71f30d740da8d4ca1fd3a3c47b33aa3d5c | [
"MIT"
] | null | null | null | import boto3
def lambda_handler(event, context):
ec2 = boto3.resource('ec2')
# Filtering instances by their tags
stoppedInstancesFilter = [
{
'Name': 'tag:poweron',
'Values': ['true']
},
{
'Name': 'tag:system',
'Values': ['unitetech'... | 22.651163 | 71 | 0.550308 |
79579381707eee4ab5c265ff5b7cd29ab23ec347 | 384 | py | Python | SIA Model 50/SIA_PICKLE_DUMPER.py | SergentLime/SIA---Smart-Interactive-App | e7afedf01519bca4750101a67f12e2081d4cf171 | [
"Apache-2.0"
] | null | null | null | SIA Model 50/SIA_PICKLE_DUMPER.py | SergentLime/SIA---Smart-Interactive-App | e7afedf01519bca4750101a67f12e2081d4cf171 | [
"Apache-2.0"
] | null | null | null | SIA Model 50/SIA_PICKLE_DUMPER.py | SergentLime/SIA---Smart-Interactive-App | e7afedf01519bca4750101a67f12e2081d4cf171 | [
"Apache-2.0"
] | 1 | 2019-05-12T09:50:19.000Z | 2019-05-12T09:50:19.000Z | import pickle
# Dump data in pickle files of S.I.R.
# Created by GreenGames
# Place name of file in between quote marks
FILE = ".pkl"
# Place Temporary Code Here
# Dumping
with open(FILE, 'wb') as fileObject:
pickle.dump('', fileObject, pickle.HIGHEST_PROTOCOL)
fileObject.close()
# Loading to Check
with ope... | 21.333333 | 56 | 0.716146 |
795795f6bc769dca7fc2a583f145579be82b9043 | 2,762 | py | Python | quex/engine/state_machine/algorithm/TEST/test-nfa-to-dfa.py | smmckay/quex-mirror | 7d75ed560e9f3a591935e59243188676eecb112a | [
"MIT"
] | null | null | null | quex/engine/state_machine/algorithm/TEST/test-nfa-to-dfa.py | smmckay/quex-mirror | 7d75ed560e9f3a591935e59243188676eecb112a | [
"MIT"
] | null | null | null | quex/engine/state_machine/algorithm/TEST/test-nfa-to-dfa.py | smmckay/quex-mirror | 7d75ed560e9f3a591935e59243188676eecb112a | [
"MIT"
] | null | null | null | #! /usr/bin/env python
import sys
import os
sys.path.insert(0, os.environ["QUEX_PATH"])
from quex.engine.state_machine.TEST_help.some_dfas import *
from quex.engine.state_machine.core import *
import quex.engine.state_machine.construction.repeat as repeat
import quex.engine.state_machine.algorithm.nfa... | 34.525 | 100 | 0.546705 |
79579631495458ddd6051d5e9e59bb5a7f87b5e1 | 193 | py | Python | Chapter10/named_tuple_with_list_values.py | kaushalkumarshah/Learn-Python-in-7-Days | 2663656767c8959ace836f0c0e272f3e501bbe6e | [
"MIT"
] | 12 | 2018-07-09T16:20:31.000Z | 2022-03-21T22:52:15.000Z | Chapter10/named_tuple_with_list_values.py | kaushalkumarshah/Learn-Python-in-7-Days | 2663656767c8959ace836f0c0e272f3e501bbe6e | [
"MIT"
] | null | null | null | Chapter10/named_tuple_with_list_values.py | kaushalkumarshah/Learn-Python-in-7-Days | 2663656767c8959ace836f0c0e272f3e501bbe6e | [
"MIT"
] | 19 | 2018-01-09T12:49:06.000Z | 2021-11-23T08:05:55.000Z | import collections
employee = collections.namedtuple('emp','name, age, empid')
list1 = ['BOB', 21, 34567]
record2 =employee._make(list1)
print record2
print "\n"
print (record2._asdict()) | 27.571429 | 60 | 0.715026 |
7957974ae2a4771447f73df0ca439b67869da3ba | 861 | py | Python | pqdm/threads.py | dangercrow/pqdm | d840131048ec609c0c4184d497d5f9f3187d855b | [
"MIT"
] | 129 | 2020-03-18T13:42:39.000Z | 2022-03-28T10:32:53.000Z | pqdm/threads.py | dangercrow/pqdm | d840131048ec609c0c4184d497d5f9f3187d855b | [
"MIT"
] | 139 | 2020-03-11T23:25:16.000Z | 2022-03-18T18:00:42.000Z | pqdm/threads.py | dangercrow/pqdm | d840131048ec609c0c4184d497d5f9f3187d855b | [
"MIT"
] | 11 | 2020-05-04T00:56:45.000Z | 2021-12-17T11:33:08.000Z | from concurrent.futures import ThreadPoolExecutor
from typing import Any, Callable, Iterable, Optional, Union
from bounded_pool_executor import BoundedThreadPoolExecutor
from typing_extensions import Literal
from pqdm._base import _parallel_process
def pqdm(
array: Iterable[Any],
function: Callable[[Any], A... | 30.75 | 104 | 0.721254 |
795797a1ae86ce99b3d6bae81d3ea93777243ad2 | 9,550 | py | Python | train_demo.py | md-experiments/FewRel | a91c0a12ccb35c422d58b51231657806fcb14dea | [
"MIT"
] | null | null | null | train_demo.py | md-experiments/FewRel | a91c0a12ccb35c422d58b51231657806fcb14dea | [
"MIT"
] | null | null | null | train_demo.py | md-experiments/FewRel | a91c0a12ccb35c422d58b51231657806fcb14dea | [
"MIT"
] | null | null | null | from fewshot_re_kit.data_loader import get_loader, get_loader_pair, get_loader_unsupervised
from fewshot_re_kit.framework import FewShotREFramework
from fewshot_re_kit.sentence_encoder import CNNSentenceEncoder, BERTSentenceEncoder, BERTPAIRSentenceEncoder, RobertaSentenceEncoder, RobertaPAIRSentenceEncoder
import mode... | 41.163793 | 160 | 0.635602 |
7957983330a7ce14d77c9ed95ea06bb98edbd3fc | 7,259 | py | Python | data/MuPoTS/MuPoTS.py | Arthur151/3DMPPE_POSENET_RELEASE | 49b71fec03fcb646f1c0e00515dfb2441c41e26b | [
"MIT"
] | 1 | 2021-03-18T09:40:01.000Z | 2021-03-18T09:40:01.000Z | data/MuPoTS/MuPoTS.py | Arthur151/3DMPPE_POSENET_RELEASE | 49b71fec03fcb646f1c0e00515dfb2441c41e26b | [
"MIT"
] | null | null | null | data/MuPoTS/MuPoTS.py | Arthur151/3DMPPE_POSENET_RELEASE | 49b71fec03fcb646f1c0e00515dfb2441c41e26b | [
"MIT"
] | null | null | null | import os
import os.path as osp
import scipy.io as sio
import numpy as np
from pycocotools.coco import COCO
from config import cfg
import json
import cv2
import random
import math
from utils.pose_utils import pixel2cam, process_bbox
from utils.vis import vis_keypoints, vis_3d_skeleton
class MuPoTS:
def __init__(se... | 43.728916 | 258 | 0.522937 |
7957983d15e5560c2c8deed46f5a787a4682691f | 288 | py | Python | snippet/permissions.py | JackieQu/WowFunServer | 072e037ea62009c1cee4d3ce954cb6cf8205b506 | [
"MIT"
] | null | null | null | snippet/permissions.py | JackieQu/WowFunServer | 072e037ea62009c1cee4d3ce954cb6cf8205b506 | [
"MIT"
] | null | null | null | snippet/permissions.py | JackieQu/WowFunServer | 072e037ea62009c1cee4d3ce954cb6cf8205b506 | [
"MIT"
] | null | null | null | from rest_framework import permissions
class IsOwnerOrReadOnly(permissions.BasePermission):
def has_object_permission(self, request, view, obj):
if request.method in permissions.SAFE_METHODS:
return True
return obj.owner == request.user | 28.8 | 56 | 0.690972 |
79579944213c7a2de87579deb94121b4ba0dfe15 | 1,283 | py | Python | src/interface.py | kimvanwyk/ndlc_finances | 7c19a2a9778875fcb08dd7b98685d3aa36f5c7b1 | [
"BSD-3-Clause"
] | null | null | null | src/interface.py | kimvanwyk/ndlc_finances | 7c19a2a9778875fcb08dd7b98685d3aa36f5c7b1 | [
"BSD-3-Clause"
] | null | null | null | src/interface.py | kimvanwyk/ndlc_finances | 7c19a2a9778875fcb08dd7b98685d3aa36f5c7b1 | [
"BSD-3-Clause"
] | null | null | null | from datetime import date
import os, os.path
import shutil
import socket
import build_report
import kppe
UDP_IP = "0.0.0.0"
UDP_PORT = 5001
def build(verbose=True, month=None):
text = build_report.build_markup_file()
fn = f'{date.today():%y%m%d}_ndlc_finance_report'
text = kppe.markup(text)
(ret, ret... | 27.297872 | 111 | 0.5682 |
795799d2301d521a859322225ab813ba4fdd1bf7 | 8,109 | py | Python | subliminal/providers/opensubtitles.py | jtwill/subliminal | 6aaece1c44173d3fbef00637f824d11f3f3dbd32 | [
"MIT"
] | 152 | 2015-01-06T00:56:19.000Z | 2022-03-11T21:08:32.000Z | subliminal/providers/opensubtitles.py | jtwill/subliminal | 6aaece1c44173d3fbef00637f824d11f3f3dbd32 | [
"MIT"
] | 25 | 2015-01-19T15:57:43.000Z | 2020-06-29T08:51:22.000Z | subliminal/providers/opensubtitles.py | jtwill/subliminal | 6aaece1c44173d3fbef00637f824d11f3f3dbd32 | [
"MIT"
] | 34 | 2015-02-10T01:45:14.000Z | 2022-01-03T13:52:35.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import base64
import logging
import os
import re
import zlib
import babelfish
import guessit
from . import Provider
from .. import __version__
from ..compat import ServerProxy, TimeoutTransport
from ..exceptions import ProviderError, AuthenticationError, D... | 39.173913 | 139 | 0.648045 |
79579a1c3df0c22796322266d73577cefe681043 | 13,630 | py | Python | homeassistant/components/nest/legacy/__init__.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | homeassistant/components/nest/legacy/__init__.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 24,710 | 2016-04-13T08:27:26.000Z | 2020-03-02T12:59:13.000Z | homeassistant/components/nest/legacy/__init__.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Support for Nest devices."""
# mypy: ignore-errors
from datetime import datetime, timedelta
import logging
import threading
from nest import Nest
from nest.nest import APIError, AuthorizationError
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.config_entries import ConfigEntr... | 32.375297 | 88 | 0.596919 |
79579b78dbffc1c77448e20ca96c31a18aff936d | 2,794 | py | Python | django_server/feedback_map/rest/serializers/map_data_point.py | ForumViriumHelsinki/FVHFeedbackMap | cfbf3dd8715e34351fb1ba628ebb0c5eb82e78e0 | [
"MIT"
] | null | null | null | django_server/feedback_map/rest/serializers/map_data_point.py | ForumViriumHelsinki/FVHFeedbackMap | cfbf3dd8715e34351fb1ba628ebb0c5eb82e78e0 | [
"MIT"
] | null | null | null | django_server/feedback_map/rest/serializers/map_data_point.py | ForumViriumHelsinki/FVHFeedbackMap | cfbf3dd8715e34351fb1ba628ebb0c5eb82e78e0 | [
"MIT"
] | null | null | null | from django.conf import settings
from rest_framework import serializers
from rest_framework.generics import get_object_or_404
from feedback_map import models
from .base import BaseMapDataPointSerializer
class TagSerializer(serializers.ModelSerializer):
class Meta:
model = models.Tag
fields = '__... | 35.820513 | 115 | 0.716178 |
79579c70b8892064cf487cd5d0b995b6d318fb5b | 424 | py | Python | 594.py | vitkarpenko/leetcode | 3d20c329987dd37fb9764f7f5d624cdaa0a5e2d7 | [
"MIT"
] | null | null | null | 594.py | vitkarpenko/leetcode | 3d20c329987dd37fb9764f7f5d624cdaa0a5e2d7 | [
"MIT"
] | null | null | null | 594.py | vitkarpenko/leetcode | 3d20c329987dd37fb9764f7f5d624cdaa0a5e2d7 | [
"MIT"
] | null | null | null | import collections
class Solution:
def findLHS(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
counts = collections.Counter(nums)
LHS = 0
for count in counts:
if count+1 in counts:
LHS = max(LHS, counts[count] + counts[coun... | 20.190476 | 63 | 0.523585 |
79579c8d632d06b35c34f6ddacf6374642932fb4 | 26,171 | py | Python | discord/player.py | Daggy1234/enhanced-discord.py | 3ffe1348956ebc1e2512439b532fdb6516c267c6 | [
"MIT"
] | null | null | null | discord/player.py | Daggy1234/enhanced-discord.py | 3ffe1348956ebc1e2512439b532fdb6516c267c6 | [
"MIT"
] | 1 | 2022-01-21T08:20:30.000Z | 2022-01-21T08:20:30.000Z | discord/player.py | Daggy1234/enhanced-discord.py | 3ffe1348956ebc1e2512439b532fdb6516c267c6 | [
"MIT"
] | null | null | null | """
The MIT License (MIT)
Copyright (c) 2015-present Rapptz
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, merg... | 35.655313 | 130 | 0.615681 |
79579d765c19f2b3783df30d9608b57f71d3a6fe | 15,091 | py | Python | awaitress/parser.py | melthaw/awaitress | 4effce73479c57a0447a75e40ae3244aeace4d38 | [
"ZPL-2.1"
] | null | null | null | awaitress/parser.py | melthaw/awaitress | 4effce73479c57a0447a75e40ae3244aeace4d38 | [
"ZPL-2.1"
] | null | null | null | awaitress/parser.py | melthaw/awaitress | 4effce73479c57a0447a75e40ae3244aeace4d38 | [
"ZPL-2.1"
] | null | null | null | ##############################################################################
#
# Copyright (c) 2001, 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# TH... | 36.363855 | 115 | 0.561129 |
79579d9b8e697999fbdab436c031b76700a72cd8 | 1,273 | py | Python | data/p4VQE/R4/benchmark/startPyquil810.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startPyquil810.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startPyquil810.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=15
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += H(1) # number=2
pr... | 23.574074 | 64 | 0.600943 |
7957a0915014afad0df012923cbbc3d50bedf99e | 1,112 | py | Python | alchemy_provider/utils/aliased_manager.py | SherkhanSyzdykov/alchemy_provider | d964f8dcfb59f803e9d5f69316eef5199bf71529 | [
"MIT"
] | 1 | 2022-03-30T22:12:50.000Z | 2022-03-30T22:12:50.000Z | alchemy_provider/utils/aliased_manager.py | SherkhanSyzdykov/alchemy_provider | d964f8dcfb59f803e9d5f69316eef5199bf71529 | [
"MIT"
] | null | null | null | alchemy_provider/utils/aliased_manager.py | SherkhanSyzdykov/alchemy_provider | d964f8dcfb59f803e9d5f69316eef5199bf71529 | [
"MIT"
] | null | null | null | from uuid import UUID
from typing import Dict
from sqlalchemy.orm import DeclarativeMeta
from sqlalchemy.orm.util import AliasedClass
from .alchemy_orm import make_aliased_mapper
class AliasedManager:
__aliased_map: Dict[UUID, Dict[str, AliasedClass]] = dict()
@classmethod
def get_or_create(
cls,... | 25.272727 | 75 | 0.638489 |
7957a1b74ccbc6188d648537c8c4be33e809b019 | 7,549 | py | Python | tests/test_config.py | kasium/alembic | af7963889abffe2ab8dc640d4fdcb8cea6d53942 | [
"MIT"
] | 1,324 | 2018-11-27T05:44:41.000Z | 2022-03-30T19:49:20.000Z | tests/test_config.py | kasium/alembic | af7963889abffe2ab8dc640d4fdcb8cea6d53942 | [
"MIT"
] | 452 | 2018-11-27T22:43:38.000Z | 2022-03-28T04:33:43.000Z | tests/test_config.py | kasium/alembic | af7963889abffe2ab8dc640d4fdcb8cea6d53942 | [
"MIT"
] | 159 | 2018-11-29T18:46:15.000Z | 2022-03-28T16:34:19.000Z | #!coding: utf-8
import os
import tempfile
from alembic import config
from alembic import testing
from alembic import util
from alembic.migration import MigrationContext
from alembic.operations import Operations
from alembic.script import ScriptDirectory
from alembic.testing import assert_raises_message
from alembic.te... | 29.837945 | 79 | 0.567227 |
7957a21c6d5fa346adfbf797ac8814b172632ccf | 8,991 | py | Python | tests/admin/controller/test_admin_auth_services.py | pic-ed/LibrarySimplifies | 16dd6459b794fb805b7a5e10758b3c151356908a | [
"Apache-2.0"
] | null | null | null | tests/admin/controller/test_admin_auth_services.py | pic-ed/LibrarySimplifies | 16dd6459b794fb805b7a5e10758b3c151356908a | [
"Apache-2.0"
] | null | null | null | tests/admin/controller/test_admin_auth_services.py | pic-ed/LibrarySimplifies | 16dd6459b794fb805b7a5e10758b3c151356908a | [
"Apache-2.0"
] | null | null | null | from nose.tools import (
set_trace,
eq_,
assert_raises
)
import flask
import json
from werkzeug import MultiDict
from api.admin.exceptions import *
from core.model import (
AdminRole,
ConfigurationSetting,
create,
ExternalIntegration,
get_one,
)
from test_controller import SettingsContro... | 44.073529 | 104 | 0.626404 |
7957a27315478af9ee087bae6758652cabeb578e | 3,149 | py | Python | apps/portalbase/macros/page/actorsdocs/3_main.py | threefoldtech/jumpscale_portal_classic | d14fe4a17c0486df7a87d149e900746654091fda | [
"Apache-2.0"
] | 1 | 2017-06-07T08:12:09.000Z | 2017-06-07T08:12:09.000Z | apps/portalbase/macros/page/actorsdocs/3_main.py | threefoldtech/jumpscale_portal_classic | d14fe4a17c0486df7a87d149e900746654091fda | [
"Apache-2.0"
] | 36 | 2017-05-18T10:54:44.000Z | 2019-03-27T11:24:20.000Z | apps/portalbase/macros/page/actorsdocs/3_main.py | threefoldtech/jumpscale_portal_classic | d14fe4a17c0486df7a87d149e900746654091fda | [
"Apache-2.0"
] | 1 | 2018-06-12T05:18:01.000Z | 2018-06-12T05:18:01.000Z | def main(j, args, params, tags, tasklet):
page = args.page
actors = args.tags.tagGet('actors', '')
group = args.tags.tagGet('group', '')
page.addCSS('/jslib/swagger/css/typography.css', media='screen')
page.addCSS('/jslib/swagger/css/reset.css', media='screen')
page.addCSS('/jslib/swagger/css/s... | 36.195402 | 105 | 0.576691 |
7957a28b610b22d970101b4c572fba0f94bc3f5d | 311 | py | Python | data/multilingual/Deva.MAI/Sun-ExtA_16/pdf_to_json_test_Deva.MAI_Sun-ExtA_16.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | 1 | 2021-09-19T19:47:35.000Z | 2021-09-19T19:47:35.000Z | data/multilingual/Deva.MAI/Sun-ExtA_16/pdf_to_json_test_Deva.MAI_Sun-ExtA_16.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | data/multilingual/Deva.MAI/Sun-ExtA_16/pdf_to_json_test_Deva.MAI_Sun-ExtA_16.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | import pdf_to_json as p2j
import json
url = "file:data/multilingual/Deva.MAI/Sun-ExtA_16/udhr_Deva.MAI_Sun-ExtA_16.pdf"
lConverter = p2j.pdf_to_json.pdf_to_json_converter()
lConverter.mImageHashOnly = True
lDict = lConverter.convert(url)
print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
| 31.1 | 81 | 0.810289 |
7957a2d36cfa0ab2f49a9b6329bd1b349f95c595 | 8,134 | py | Python | hmtl/models/hmtl.py | alasdairtran/hmtl | 80daa2a1e1ba21c775f0352d11b7e625384c0ad1 | [
"MIT"
] | null | null | null | hmtl/models/hmtl.py | alasdairtran/hmtl | 80daa2a1e1ba21c775f0352d11b7e625384c0ad1 | [
"MIT"
] | null | null | null | hmtl/models/hmtl.py | alasdairtran/hmtl | 80daa2a1e1ba21c775f0352d11b7e625384c0ad1 | [
"MIT"
] | null | null | null | # coding: utf-8
import os
import sys
import logging
from typing import Dict
from overrides import overrides
import torch
from allennlp.common import Params
from allennlp.common.checks import ConfigurationError
from allennlp.data import Vocabulary
from allennlp.models.model import Model
from allennlp.modules import S... | 40.467662 | 120 | 0.688468 |
7957a395c374b787b43740a439b8bf496b29c0b4 | 3,224 | py | Python | flare/modules/crystals.py | YuuuuXie/Stanene_FLARE | b6678927dd7fe3b6e6dc405a5f27d1a3339782eb | [
"MIT"
] | null | null | null | flare/modules/crystals.py | YuuuuXie/Stanene_FLARE | b6678927dd7fe3b6e6dc405a5f27d1a3339782eb | [
"MIT"
] | null | null | null | flare/modules/crystals.py | YuuuuXie/Stanene_FLARE | b6678927dd7fe3b6e6dc405a5f27d1a3339782eb | [
"MIT"
] | null | null | null | import numpy as np
from ase.build import fcc111, add_adsorbate
from ase.visualize import view
from ase.io import write
def get_supercell_positions(sc_size, cell, positions):
sc_positions = []
for m in range(sc_size):
vec1 = m * cell[0]
for n in range(sc_size):
vec2 = n * cell[1]
... | 33.237113 | 79 | 0.457816 |
7957a3d9a4ff5c7faecd851aeab7aa6b76f5aac5 | 3,783 | py | Python | start_here.py | giansegato/n-Tuple-patterns-to-forecast-prices | b83ca8b48ddd55f7d93b9daf8a91dad140a4f9a3 | [
"MIT"
] | null | null | null | start_here.py | giansegato/n-Tuple-patterns-to-forecast-prices | b83ca8b48ddd55f7d93b9daf8a91dad140a4f9a3 | [
"MIT"
] | null | null | null | start_here.py | giansegato/n-Tuple-patterns-to-forecast-prices | b83ca8b48ddd55f7d93b9daf8a91dad140a4f9a3 | [
"MIT"
] | null | null | null | from utils import *
import ml
from sklearn import tree, metrics
from sklearn.linear_model import LogisticRegression
from sklearn.linear_model import SGDClassifier
from sklearn.cross_validation import train_test_split
from sklearn.cross_validation import cross_val_score
from sklearn.preprocessing import StandardScaler
f... | 45.035714 | 124 | 0.665609 |
7957a433a713130cfd85c95b69f5ab33049bdfed | 3,299 | py | Python | Northwind_populate_data.py | marvelje/northwind-SQLite3 | c15c9e7b016ea4ec24738fb784f75cff2e5a805d | [
"MIT"
] | 171 | 2017-01-26T09:32:24.000Z | 2022-03-30T21:27:01.000Z | Northwind_populate_data.py | marvelje/northwind-SQLite3 | c15c9e7b016ea4ec24738fb784f75cff2e5a805d | [
"MIT"
] | 4 | 2019-01-15T11:15:00.000Z | 2021-04-25T20:29:53.000Z | Northwind_populate_data.py | marvelje/northwind-SQLite3 | c15c9e7b016ea4ec24738fb784f75cff2e5a805d | [
"MIT"
] | 168 | 2017-03-02T17:55:08.000Z | 2022-03-25T05:14:23.000Z | from datetime import timedelta, datetime
from random import randint
from random import choice as rc
import sqlite3
# This function will return a random datetime between two datetime objects.
def random_date(start, end):
return start + timedelta(seconds=randint(0, int((end - start).total_seconds())))
# Connect to t... | 35.095745 | 231 | 0.665959 |
7957a54d308ec6144c3b622625fa3972bc338d60 | 806 | py | Python | zooniverse_web/tests/test_email.py | ADACS-Australia/SS18A-JBanfield | 26196091cc83f88f28abdf979276ee439349efa8 | [
"MIT"
] | null | null | null | zooniverse_web/tests/test_email.py | ADACS-Australia/SS18A-JBanfield | 26196091cc83f88f28abdf979276ee439349efa8 | [
"MIT"
] | 15 | 2018-06-05T10:28:03.000Z | 2018-07-03T09:05:11.000Z | zooniverse_web/tests/test_email.py | ADACS-Australia/SS18A-JBanfield | 26196091cc83f88f28abdf979276ee439349efa8 | [
"MIT"
] | null | null | null | """
Distributed under the MIT License. See LICENSE.txt for more info.
"""
from __future__ import unicode_literals
from django.test import TestCase
from django.core import mail
from zooniverse_web.mailer.email import Email
class TestEmail(TestCase):
def test_email(self): # tests whether an email can be sent
... | 31 | 117 | 0.658809 |
7957a5eea858c60bc14fc8063a6b6241b9add1b8 | 5,441 | py | Python | main.py | eddielyc/Augmented-Geometric-Distillation | 029973b7ce3c08fa1f0fa4dab27981d2148986a3 | [
"Apache-2.0"
] | 3 | 2022-03-10T05:56:04.000Z | 2022-03-12T07:32:59.000Z | main.py | eddielyc/Augmented-Geometric-Distillation | 029973b7ce3c08fa1f0fa4dab27981d2148986a3 | [
"Apache-2.0"
] | 1 | 2022-03-10T06:00:19.000Z | 2022-03-24T06:52:23.000Z | main.py | eddielyc/Augmented-Geometric-Distillation | 029973b7ce3c08fa1f0fa4dab27981d2148986a3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Time : 2020/5/3 19:22
# Author : Yichen Lu
import argparse
import os.path as osp
import torch
from reid.utils import Dataset
from reid.utils import build_test_loader, build_train_loader
from reid import trainers
from reid.evaluation.evaluators import Evaluator
from reid.uti... | 42.178295 | 113 | 0.642713 |
7957a5f11e6e5af32fe980b9ca85a5458ed89b13 | 1,105 | py | Python | aiotdlib/api/functions/toggle_session_can_accept_calls.py | mostafa-arshadi/aiotdlib | 59f430a65dfb424fc69d471a0d7bcd77ad7acf08 | [
"MIT"
] | 37 | 2021-05-04T10:41:41.000Z | 2022-03-30T13:48:05.000Z | aiotdlib/api/functions/toggle_session_can_accept_calls.py | mostafa-arshadi/aiotdlib | 59f430a65dfb424fc69d471a0d7bcd77ad7acf08 | [
"MIT"
] | 13 | 2021-07-17T19:54:51.000Z | 2022-02-26T06:50:00.000Z | aiotdlib/api/functions/toggle_session_can_accept_calls.py | mostafa-arshadi/aiotdlib | 59f430a65dfb424fc69d471a0d7bcd77ad7acf08 | [
"MIT"
] | 7 | 2021-09-22T21:27:11.000Z | 2022-02-20T02:33:19.000Z | # =============================================================================== #
# #
# This file has been generated automatically!! Do not change this manually! #
# ... | 34.53125 | 83 | 0.499548 |
7957a71d6d2755f3b8fcaf783d2178a12401cb0f | 13,067 | py | Python | debarcer/generate_vcf.py | FelixMoelder/debarcer | a401c1b0ad3f23b1f2c1c1cc03170c635186f78f | [
"MIT"
] | 11 | 2017-03-20T17:57:09.000Z | 2021-04-20T03:11:55.000Z | debarcer/generate_vcf.py | FelixMoelder/debarcer | a401c1b0ad3f23b1f2c1c1cc03170c635186f78f | [
"MIT"
] | 91 | 2016-06-28T20:59:30.000Z | 2021-04-20T21:41:42.000Z | debarcer/generate_vcf.py | FelixMoelder/debarcer | a401c1b0ad3f23b1f2c1c1cc03170c635186f78f | [
"MIT"
] | 13 | 2016-05-31T20:05:33.000Z | 2022-03-10T13:10:17.000Z | # -*- coding: utf-8 -*-
"""
Created on Fri Oct 25 14:25:48 2019
@author: RJovelin
"""
import time
from debarcer.version import __version__
def GetConsData(consfile):
'''
(str) -> dict
:param consfile: Path to the consensus file (merged or not)
Returns a dictionary with consensus fil... | 52.477912 | 151 | 0.506161 |
7957a83621e1bac1e2447ff0f5b26575783757aa | 9,349 | py | Python | ftests/parallel/test_builtin.py | j8xixo12/solvcon | a8bf3a54d4b1ed91d292e0cdbcb6f2710d33d99a | [
"BSD-3-Clause"
] | 16 | 2015-12-09T02:54:42.000Z | 2021-04-20T11:26:39.000Z | ftests/parallel/test_builtin.py | j8xixo12/solvcon | a8bf3a54d4b1ed91d292e0cdbcb6f2710d33d99a | [
"BSD-3-Clause"
] | 95 | 2015-12-09T00:49:40.000Z | 2022-02-14T13:34:55.000Z | ftests/parallel/test_builtin.py | j8xixo12/solvcon | a8bf3a54d4b1ed91d292e0cdbcb6f2710d33d99a | [
"BSD-3-Clause"
] | 13 | 2015-05-08T04:16:42.000Z | 2021-01-15T09:28:06.000Z | # -*- coding: UTF-8 -*-
#
# Copyright (C) 2012 Yung-Yu Chen <yyc@solvcon.net>.
#
# This program 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 2 of the License, or
# (at your option) any later ... | 35.014981 | 78 | 0.620601 |
7957a86d70a141a3e2fbf538bb59d8b3fed332da | 177 | py | Python | quadpy/enr/__init__.py | gdmcbain/quadpy | c083d500027d7c1b2187ae06ff2b7fbdd360ccc7 | [
"MIT"
] | 1 | 2019-01-02T19:04:42.000Z | 2019-01-02T19:04:42.000Z | quadpy/enr/__init__.py | gdmcbain/quadpy | c083d500027d7c1b2187ae06ff2b7fbdd360ccc7 | [
"MIT"
] | null | null | null | quadpy/enr/__init__.py | gdmcbain/quadpy | c083d500027d7c1b2187ae06ff2b7fbdd360ccc7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
from .stroud import Stroud
from .stroud_secrest import StroudSecrest
from .tools import integrate
__all__ = ["Stroud", "StroudSecrest", "integrate"]
| 19.666667 | 50 | 0.723164 |
7957aa82bb9656d3954e7422903e754c9fab5b65 | 14,830 | py | Python | tmtoolkit/lda_utils/visualize.py | ddomhoff/tmtoolkit | 2e533d04af8fd3cbdd57af1a277f67148087b369 | [
"Apache-2.0"
] | null | null | null | tmtoolkit/lda_utils/visualize.py | ddomhoff/tmtoolkit | 2e533d04af8fd3cbdd57af1a277f67148087b369 | [
"Apache-2.0"
] | null | null | null | tmtoolkit/lda_utils/visualize.py | ddomhoff/tmtoolkit | 2e533d04af8fd3cbdd57af1a277f67148087b369 | [
"Apache-2.0"
] | null | null | null | import os
import logging
import numpy as np
import matplotlib.pyplot as plt
from tmtoolkit.utils import mat2d_window_from_indices
from tmtoolkit.lda_utils.common import top_n_from_distribution
logger = logging.getLogger('tmtoolkit')
#
# word clouds from topic models
#
def _wordcloud_color_func_black(word, font_s... | 40.966851 | 118 | 0.663655 |
7957aa94d5643dd7ff67c59ebef391b22de6d989 | 2,428 | py | Python | flask_server/mysite/flask_app.py | pal03377/pc_presence | 367cb2776cee5caa0e54e69bb5a121411851d3f8 | [
"MIT"
] | 2 | 2016-10-21T14:48:19.000Z | 2021-03-03T21:29:01.000Z | flask_server/mysite/flask_app.py | pal03377/pc_presence | 367cb2776cee5caa0e54e69bb5a121411851d3f8 | [
"MIT"
] | null | null | null | flask_server/mysite/flask_app.py | pal03377/pc_presence | 367cb2776cee5caa0e54e69bb5a121411851d3f8 | [
"MIT"
] | null | null | null | from flask import Flask
import os
import hashlib
import pickle
import time
import json
app = Flask(__name__)
mydir = "./mysite"
registrationEnabled = True
offlineAfterTime = 2 * 60 * 60
def checkIfTeamNameIsValid(teamName):
return teamName.isalpha()
@app.route("/")
def home():
return os.getcwd()
@app.ro... | 27.908046 | 92 | 0.615321 |
7957aaf157f297279f712a67434a1024f97a2df8 | 3,444 | py | Python | tests/test_games4e.py | imRushabhShah/aima-python | 77066d1afd0bc432a7c8611ef78e6f351906a663 | [
"MIT"
] | 1 | 2020-04-24T17:12:48.000Z | 2020-04-24T17:12:48.000Z | tests/test_games4e.py | imRushabhShah/aima-python | 77066d1afd0bc432a7c8611ef78e6f351906a663 | [
"MIT"
] | null | null | null | tests/test_games4e.py | imRushabhShah/aima-python | 77066d1afd0bc432a7c8611ef78e6f351906a663 | [
"MIT"
] | 1 | 2019-12-09T20:50:14.000Z | 2019-12-09T20:50:14.000Z | import pytest
from games4e import *
# Creating the game instances
f52 = Fig52Game()
ttt = TicTacToe()
con4 = ConnectFour()
random.seed("aima-python")
def gen_state(to_move='X', x_positions=[], o_positions=[], h=3, v=3, k=3):
"""Given whose turn it is to move, the positions of X's on the board, the
position... | 35.142857 | 81 | 0.612079 |
7957ac51856c156a67d195c9614252a0cc40a90e | 6,044 | py | Python | docs/conf.py | tomerten/sparkdatachallenge | d20dbf5008a4dc5909b886486bb7f5658edd0e73 | [
"MIT"
] | null | null | null | docs/conf.py | tomerten/sparkdatachallenge | d20dbf5008a4dc5909b886486bb7f5658edd0e73 | [
"MIT"
] | null | null | null | docs/conf.py | tomerten/sparkdatachallenge | d20dbf5008a4dc5909b886486bb7f5658edd0e73 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# sparkdatachallenge documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 9 13:47:02 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in... | 30.836735 | 98 | 0.703508 |
7957ac81e27b2ab96c80b5cfd8ddfcc923fafd42 | 393 | py | Python | openfl/component/__init__.py | sarthakpati/openfl | 8edebfd565d94f709a7d7f06d9ee38a7975c066e | [
"Apache-2.0"
] | null | null | null | openfl/component/__init__.py | sarthakpati/openfl | 8edebfd565d94f709a7d7f06d9ee38a7975c066e | [
"Apache-2.0"
] | null | null | null | openfl/component/__init__.py | sarthakpati/openfl | 8edebfd565d94f709a7d7f06d9ee38a7975c066e | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2020-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
"""openfl.component package."""
from .assigner import Assigner, RandomGroupedAssigner, StaticGroupedAssigner
from .aggregator import Aggregator
from .collaborator import Collaborator
__all__ = [
'Assigner',
'RandomGroupedAssign... | 23.117647 | 76 | 0.753181 |
7957acb6b77ec289644558ac78a0407d8ca2a9d6 | 4,767 | py | Python | keecenter/settings.py | GoRoSfan/keecenter | cb2e9a5d0467c817363893958f0efc8ed4622691 | [
"MIT"
] | null | null | null | keecenter/settings.py | GoRoSfan/keecenter | cb2e9a5d0467c817363893958f0efc8ed4622691 | [
"MIT"
] | 28 | 2021-03-10T05:39:07.000Z | 2021-09-23T16:13:16.000Z | keecenter/settings.py | GoRoSfan/keecenter | cb2e9a5d0467c817363893958f0efc8ed4622691 | [
"MIT"
] | null | null | null | """
Django settings for keecenter project.
Generated by 'django-admin startproject' using Django 2.2.7.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
... | 27.554913 | 95 | 0.70086 |
7957ad3e71b22b4cb0d29e499d00f3268570bcba | 1,302 | py | Python | billy/bin/commands/__init__.py | backwardn/billy | 07ac788d25a6c79d03dd0e3d55459bbb55e22439 | [
"BSD-3-Clause"
] | 33 | 2016-11-05T07:25:48.000Z | 2022-01-31T03:40:43.000Z | billy/bin/commands/__init__.py | backwardn/billy | 07ac788d25a6c79d03dd0e3d55459bbb55e22439 | [
"BSD-3-Clause"
] | 16 | 2015-02-05T21:25:58.000Z | 2015-09-18T20:27:06.000Z | billy/bin/commands/__init__.py | backwardn/billy | 07ac788d25a6c79d03dd0e3d55459bbb55e22439 | [
"BSD-3-Clause"
] | 22 | 2015-03-23T07:13:20.000Z | 2016-06-10T04:41:06.000Z | """
defines a command extension system that is used by billy-util
new commands can be added by deriving from BaseCommand and overriding a few
attributes:
name: name of subcommand
help: help string displayed for subcommand
add_args(): method that calls `self.add_argument`
han... | 27.702128 | 79 | 0.64977 |
7957ae0f3ce32ca4209386d35663d72ef290a7bd | 35,347 | py | Python | rllib/utils/test_utils.py | yuanchi2807/ray | cf512254bb4bcd71ff1818dff5c868ab10c5f620 | [
"Apache-2.0"
] | null | null | null | rllib/utils/test_utils.py | yuanchi2807/ray | cf512254bb4bcd71ff1818dff5c868ab10c5f620 | [
"Apache-2.0"
] | null | null | null | rllib/utils/test_utils.py | yuanchi2807/ray | cf512254bb4bcd71ff1818dff5c868ab10c5f620 | [
"Apache-2.0"
] | 1 | 2022-03-27T09:01:59.000Z | 2022-03-27T09:01:59.000Z | from collections import Counter
import copy
from gym.spaces import Box
import logging
import numpy as np
import random
import re
import time
import tree # pip install dm_tree
from typing import Any, Dict, List, Optional, Sequence, Tuple, Union
import yaml
import ray
from ray.rllib.utils.framework import try_import_ja... | 39.230855 | 88 | 0.559595 |
7957aed551b60efd23626a81194086f01cc37555 | 1,186 | py | Python | Lib/site-packages/stripe/api_resources/subscription_schedule.py | 2anirban/LSTM-Stock-Predictor | bcd3709ff88c8d1286df93163b30164c1d225652 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | Lib/site-packages/stripe/api_resources/subscription_schedule.py | 2anirban/LSTM-Stock-Predictor | bcd3709ff88c8d1286df93163b30164c1d225652 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | Lib/site-packages/stripe/api_resources/subscription_schedule.py | 2anirban/LSTM-Stock-Predictor | bcd3709ff88c8d1286df93163b30164c1d225652 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, division, print_function
from stripe import util
from stripe.api_resources.abstract import CreateableAPIResource
from stripe.api_resources.abstract import UpdateableAPIResource
from stripe.api_resources.abstract import ListableAPIResource
from stripe.api_resources.abstract impor... | 39.533333 | 78 | 0.751265 |
7957b00c66b08f7e29826174346e6980c1f73317 | 47,735 | py | Python | tests/test_elastica_numba/test_governing_equations_nb.py | engiecat/PyElastica | 0ea100e23d5908bf7ebdae4261276539e02a53a6 | [
"MIT"
] | null | null | null | tests/test_elastica_numba/test_governing_equations_nb.py | engiecat/PyElastica | 0ea100e23d5908bf7ebdae4261276539e02a53a6 | [
"MIT"
] | null | null | null | tests/test_elastica_numba/test_governing_equations_nb.py | engiecat/PyElastica | 0ea100e23d5908bf7ebdae4261276539e02a53a6 | [
"MIT"
] | null | null | null | __doc__ = """Test Cosserat rod governing equations for Numba implementation"""
# System imports
import numpy as np
from numpy.testing import assert_allclose
from elastica.utils import Tolerance, MaxDimension
from elastica._elastica_numba._linalg import _batch_matvec
from elastica._elastica_numba._rod._cosserat_rod imp... | 37.498036 | 114 | 0.625306 |
7957b02308098ab5f539b738b262a76228b7b93d | 4,858 | py | Python | fhvqe/retrieve_data.py | PhaseCraft/fhvqe-paper | 535878896cc978f3ab7cc4d5d790d50d2a3c2359 | [
"Apache-2.0"
] | null | null | null | fhvqe/retrieve_data.py | PhaseCraft/fhvqe-paper | 535878896cc978f3ab7cc4d5d790d50d2a3c2359 | [
"Apache-2.0"
] | null | null | null | fhvqe/retrieve_data.py | PhaseCraft/fhvqe-paper | 535878896cc978f3ab7cc4d5d790d50d2a3c2359 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Phasecraft 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... | 35.985185 | 86 | 0.666735 |
7957b024f727bae66dba0ad129ba0b19840a0b32 | 4,051 | py | Python | backend/interdisciplinaire/settings.py | jacquant/interdisciplinaire | c2155517117c00d4eee9a0b34a59cda5983d0995 | [
"MIT"
] | null | null | null | backend/interdisciplinaire/settings.py | jacquant/interdisciplinaire | c2155517117c00d4eee9a0b34a59cda5983d0995 | [
"MIT"
] | null | null | null | backend/interdisciplinaire/settings.py | jacquant/interdisciplinaire | c2155517117c00d4eee9a0b34a59cda5983d0995 | [
"MIT"
] | null | null | null | """
Django settings for interdisciplinaire project.
Generated by 'django-admin startproject' using Django 2.2.6.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
i... | 29.569343 | 91 | 0.709948 |
7957b0618d9620dad9fca86106ae183f0807cc3d | 12,913 | py | Python | custom_components/bhyve/__init__.py | allistermaguire/bhyve-home-assistant | 446b39c703166ab9ceba6c97220478b930d98139 | [
"MIT"
] | null | null | null | custom_components/bhyve/__init__.py | allistermaguire/bhyve-home-assistant | 446b39c703166ab9ceba6c97220478b930d98139 | [
"MIT"
] | null | null | null | custom_components/bhyve/__init__.py | allistermaguire/bhyve-home-assistant | 446b39c703166ab9ceba6c97220478b930d98139 | [
"MIT"
] | null | null | null | """Support for Orbit BHyve irrigation devices."""
import json
import logging
import os
import pprint
import voluptuous as vol
from homeassistant.const import (
ATTR_ATTRIBUTION,
CONF_PASSWORD,
CONF_USERNAME,
EVENT_HOMEASSISTANT_STOP,
)
from homeassistant.core import callback
from homeassistant.excepti... | 29.616972 | 102 | 0.603113 |
7957b13567ab9f948095290e58e107f21d66f4ab | 12,218 | py | Python | python/tvm/topi/nn/conv3d.py | aiblackmaner/tvm | 729155fb06e892af0654e93897e140d2d7ad16d6 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | null | null | null | python/tvm/topi/nn/conv3d.py | aiblackmaner/tvm | 729155fb06e892af0654e93897e140d2d7ad16d6 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | null | null | null | python/tvm/topi/nn/conv3d.py | aiblackmaner/tvm | 729155fb06e892af0654e93897e140d2d7ad16d6 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | null | null | null | # 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
# "License"); you may not u... | 36.041298 | 107 | 0.630381 |
7957b1f0125e538077f428000808be9f38f4bd96 | 12,238 | py | Python | pytorch/pytorchcv/models/squeezenext.py | yick2232/imgclsmob | fb220bff18b27d1fc6db1bac6cf69b70c2d07490 | [
"MIT"
] | 9 | 2019-08-12T13:54:48.000Z | 2020-10-12T22:59:40.000Z | pytorch/pytorchcv/models/squeezenext.py | fireoil/imgclsmob | fb220bff18b27d1fc6db1bac6cf69b70c2d07490 | [
"MIT"
] | null | null | null | pytorch/pytorchcv/models/squeezenext.py | fireoil/imgclsmob | fb220bff18b27d1fc6db1bac6cf69b70c2d07490 | [
"MIT"
] | 2 | 2019-08-29T07:06:28.000Z | 2020-04-20T05:50:51.000Z | """
SqueezeNext for ImageNet-1K, implemented in PyTorch.
Original paper: 'SqueezeNext: Hardware-Aware Neural Network Design,' https://arxiv.org/abs/1803.10615.
"""
__all__ = ['SqueezeNext', 'sqnxt23_w1', 'sqnxt23_w3d2', 'sqnxt23_w2', 'sqnxt23v5_w1', 'sqnxt23v5_w3d2', 'sqnxt23v5_w2']
import os
import torch.nn ... | 31.541237 | 119 | 0.600098 |
7957b1f65974fdcac6c4944f7a143ef19f96950a | 251 | py | Python | anchore_engine/vendored/docker_registry_client/docker_registry_client/__init__.py | Talanor/anchore-engine | 5e809db1eb681f89670655c5bf9933eba50cf403 | [
"Apache-2.0"
] | null | null | null | anchore_engine/vendored/docker_registry_client/docker_registry_client/__init__.py | Talanor/anchore-engine | 5e809db1eb681f89670655c5bf9933eba50cf403 | [
"Apache-2.0"
] | null | null | null | anchore_engine/vendored/docker_registry_client/docker_registry_client/__init__.py | Talanor/anchore-engine | 5e809db1eb681f89670655c5bf9933eba50cf403 | [
"Apache-2.0"
] | null | null | null | # flake8: noqa
from __future__ import absolute_import
from .DockerRegistryClient import (DockerRegistryClient,
BaseClient,
Repository)
| 31.375 | 68 | 0.458167 |
7957b25926a87ed196ea3becfeba50d163ec43d7 | 29,148 | py | Python | tests-trio/p2p-trio/test_discovery.py | Lilith1410/trinity | df92df488c6ade7a168483075c1d4f76843d3090 | [
"MIT"
] | null | null | null | tests-trio/p2p-trio/test_discovery.py | Lilith1410/trinity | df92df488c6ade7a168483075c1d4f76843d3090 | [
"MIT"
] | null | null | null | tests-trio/p2p-trio/test_discovery.py | Lilith1410/trinity | df92df488c6ade7a168483075c1d4f76843d3090 | [
"MIT"
] | null | null | null | import copy
import functools
import random
import re
import time
import trio
import pytest
import rlp
from eth_utils import decode_hex, int_to_big_endian
from eth_hash.auto import keccak
from eth_keys import keys
from eth.db.backends.memory import MemoryDB
from p2p import constants
from p2p.constants import IP_... | 39.549525 | 184 | 0.741595 |
7957b27caf9fc7db4169eff2ea12e06b0fe27b02 | 32 | py | Python | teensy/memzip_files/src/test.py | lurch/micropython | 28dfbc2ba2ef41a7810e4e39290031eb2207a0a9 | [
"MIT"
] | 1 | 2015-06-15T11:52:01.000Z | 2015-06-15T11:52:01.000Z | teensy/memzip_files/src/test.py | lurch/micropython | 28dfbc2ba2ef41a7810e4e39290031eb2207a0a9 | [
"MIT"
] | null | null | null | teensy/memzip_files/src/test.py | lurch/micropython | 28dfbc2ba2ef41a7810e4e39290031eb2207a0a9 | [
"MIT"
] | null | null | null | print("Executing /src/test.py")
| 16 | 31 | 0.71875 |
7957b28720e87b51480cd6174189fba08eedec00 | 648 | py | Python | Methods/Machine/Machine/comp_width_airgap_mag.py | Superomeg4/pyleecan | 2b695b5f39e77475a07aa0ea89489fb0a9659337 | [
"Apache-2.0"
] | 2 | 2020-06-29T13:48:37.000Z | 2021-06-15T07:34:05.000Z | Methods/Machine/Machine/comp_width_airgap_mag.py | Superomeg4/pyleecan | 2b695b5f39e77475a07aa0ea89489fb0a9659337 | [
"Apache-2.0"
] | null | null | null | Methods/Machine/Machine/comp_width_airgap_mag.py | Superomeg4/pyleecan | 2b695b5f39e77475a07aa0ea89489fb0a9659337 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""@package Methods.Machine.Machine.comp_width_airgap_mag
Compute the magnetic airgap of the machine method
@date Created on Thu Jan 22 16:25:34 2015
@copyright (C) 2015-2016 EOMYS ENGINEERING.
@author pierre_b
"""
def comp_width_airgap_mag(self):
"""Compute the magnetic airgap (distance b... | 23.142857 | 73 | 0.660494 |
7957b2bdb2d4ed90d944fce7c86e83c07fb9b5c3 | 2,099 | py | Python | src/WindowSorting/WindowFocuser.py | AlexandrePetrassi/awso-me | e174eb478d6f6359d3ad866af2008791b9c73d0c | [
"MIT"
] | null | null | null | src/WindowSorting/WindowFocuser.py | AlexandrePetrassi/awso-me | e174eb478d6f6359d3ad866af2008791b9c73d0c | [
"MIT"
] | null | null | null | src/WindowSorting/WindowFocuser.py | AlexandrePetrassi/awso-me | e174eb478d6f6359d3ad866af2008791b9c73d0c | [
"MIT"
] | null | null | null | """Gives focus to windows"""
import pywintypes
import win32api
import win32gui
import win32process
from win32con import HWND_TOPMOST, HWND_NOTOPMOST
from win32con import SWP_SHOWWINDOW, SWP_NOSIZE, SWP_NOMOVE
ORIGIN = (0, 0, 0, 0)
FLAG_NO_SHOW = SWP_NOSIZE | SWP_NOMOVE
FLAG_SHOW = SWP_SHOWWINDOW | SWP_NOSIZE | SWP_... | 30.867647 | 78 | 0.716532 |
7957b2ea0874e85de1c7133ba0095840bafacc45 | 358 | py | Python | pygamer/Player.py | djpeach/pygamer | 77a0cdab58bc29d06cc88c8cc823850794fe0bf0 | [
"MIT"
] | null | null | null | pygamer/Player.py | djpeach/pygamer | 77a0cdab58bc29d06cc88c8cc823850794fe0bf0 | [
"MIT"
] | null | null | null | pygamer/Player.py | djpeach/pygamer | 77a0cdab58bc29d06cc88c8cc823850794fe0bf0 | [
"MIT"
] | null | null | null | class Player:
def __init__(self, score=0):
self.score = score
self.objects = []
def update(self):
for obj in self.objects:
obj.update()
def draw(self, surface_to_draw_on):
for obj in self.objects:
obj.draw(surface_to_draw_on)
def scored(self, po... | 22.375 | 40 | 0.575419 |
7957b33bf1dcee18b80fbd9df8d05324688fba1c | 61,563 | py | Python | python/paddle/fluid/dygraph/jit.py | douch/Paddle | 81c40722869935d6e897f4b1aeb6e6f67606188a | [
"Apache-2.0"
] | 1 | 2021-12-27T02:40:41.000Z | 2021-12-27T02:40:41.000Z | python/paddle/fluid/dygraph/jit.py | LiYuRio/Paddle | dbd6e2df9d074973b7ee177e2d6b96ed2318008e | [
"Apache-2.0"
] | 1 | 2022-01-28T07:23:22.000Z | 2022-01-28T07:23:22.000Z | python/paddle/fluid/dygraph/jit.py | LiYuRio/Paddle | dbd6e2df9d074973b7ee177e2d6b96ed2318008e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
# Copyright (c) 2021 NVIDIA Corporation. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://ww... | 39.162214 | 287 | 0.610562 |
7957b345a1812f4546f8f2a3f38ef8ba6a39fed3 | 636 | py | Python | read_excel_file.py | thiru15/Python-1 | f276f34a77579e552ca2adb3b5a3a1b0f3ebddee | [
"MIT"
] | 12 | 2019-12-27T07:32:35.000Z | 2022-02-20T20:15:08.000Z | read_excel_file.py | DiasNikita/Python | f276f34a77579e552ca2adb3b5a3a1b0f3ebddee | [
"MIT"
] | 1 | 2018-11-15T01:54:25.000Z | 2018-11-15T01:54:25.000Z | read_excel_file.py | DiasNikita/Python | f276f34a77579e552ca2adb3b5a3a1b0f3ebddee | [
"MIT"
] | 22 | 2019-10-06T20:30:25.000Z | 2022-01-11T16:31:14.000Z | # extract number of rows using Python
import xlrd
# Give the location of the file
loc = ("sample.xlsx")
wb = xlrd.open_workbook(loc)
sheet = wb.sheet_by_index(0)
sheet.cell_value(0, 0)
# Extracting number of rows
print(sheet.nrows)
# extract number of columns in Python
print(sheet.ncols)
# extrac... | 20.516129 | 40 | 0.707547 |
7957b4ddf735d8b06f12abc6447e9ab2937b2e87 | 7,297 | py | Python | main.py | gcarq/keras-timeseries-prediction | 5d58d174bc1386c5fd60b01de0b9d6c4998a7242 | [
"MIT"
] | 116 | 2017-02-25T15:33:45.000Z | 2022-03-28T14:06:11.000Z | main.py | Kushal334/keras-timeseries-prediction | 8ab377b6ad6a60d469a4da8430951df7f7230e9e | [
"MIT"
] | 2 | 2017-10-11T21:07:53.000Z | 2020-06-27T17:41:25.000Z | main.py | Kushal334/keras-timeseries-prediction | 8ab377b6ad6a60d469a4da8430951df7f7230e9e | [
"MIT"
] | 61 | 2017-01-21T16:08:49.000Z | 2021-01-06T18:49:35.000Z | import numpy
import pandas
import matplotlib.pyplot as plt
from keras.layers import Dense, LSTM
from keras.models import Sequential
from sklearn.metrics import mean_squared_error
from sklearn.preprocessing import MinMaxScaler
from tqdm import trange
# fix random seed for reproducibility
numpy.random.seed(7)
def ... | 38.81383 | 115 | 0.695765 |
7957b8be9778cfbdb1cae784c737a9b6d8b8ed51 | 5,905 | py | Python | app.py | vibhor-voicebot/merastore-2fa-enabled | 9ca3a4310d6c1ecb44169bc66dced3cbfd2a15c6 | [
"MIT"
] | null | null | null | app.py | vibhor-voicebot/merastore-2fa-enabled | 9ca3a4310d6c1ecb44169bc66dced3cbfd2a15c6 | [
"MIT"
] | null | null | null | app.py | vibhor-voicebot/merastore-2fa-enabled | 9ca3a4310d6c1ecb44169bc66dced3cbfd2a15c6 | [
"MIT"
] | null | null | null | import os
import base64
from io import BytesIO
from flask import Flask, render_template, redirect, url_for, flash, session, \
abort
from werkzeug.security import generate_password_hash, check_password_hash
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager, UserMixin, login_user, logout_us... | 31.57754 | 80 | 0.669094 |
7957b90901283100f232d844e6417a16c3fd4d36 | 37,927 | py | Python | icepyx/core/query.py | whyjz/icepyx | 0a0984b5ef6013734d0851bc9fe545c3eb37fbf8 | [
"BSD-3-Clause"
] | null | null | null | icepyx/core/query.py | whyjz/icepyx | 0a0984b5ef6013734d0851bc9fe545c3eb37fbf8 | [
"BSD-3-Clause"
] | 2 | 2020-06-18T17:05:17.000Z | 2020-06-18T17:55:46.000Z | icepyx/core/query.py | yochannah/icepyx | fe57c41a2775b663c19a2ab59a6ebb644caf4a3b | [
"BSD-3-Clause"
] | null | null | null | import datetime as dt
import os
import requests
import json
import warnings
import pprint
import time
import geopandas as gpd
import matplotlib.pyplot as plt
from icepyx.core.Earthdata import Earthdata
import icepyx.core.APIformatting as apifmt
import icepyx.core.is2ref as is2ref
import icepyx.core.granules as granule... | 39.548488 | 418 | 0.594511 |
7957b98bc64298134ef8e28ebd9ecc7a12a972b7 | 3,182 | py | Python | backend/imagineer_django/week3/week3/settings.py | cmdlhz/study_for_ver2 | 2e5110d0ce80e70a163a132c9c9cbb0cd9f4f134 | [
"MIT"
] | null | null | null | backend/imagineer_django/week3/week3/settings.py | cmdlhz/study_for_ver2 | 2e5110d0ce80e70a163a132c9c9cbb0cd9f4f134 | [
"MIT"
] | null | null | null | backend/imagineer_django/week3/week3/settings.py | cmdlhz/study_for_ver2 | 2e5110d0ce80e70a163a132c9c9cbb0cd9f4f134 | [
"MIT"
] | null | null | null | """
Django settings for week3 project.
Generated by 'django-admin startproject' using Django 2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
# Bui... | 25.055118 | 91 | 0.693589 |
7957bad8f5bad7cb70c8311811091d949d79def5 | 3,001 | py | Python | cartoframes/data/dataset_info.py | oss-spanish-geoserver/cartoframes | 2e1a1aa785180f8c031688012b3c2663f7c7edc7 | [
"BSD-3-Clause"
] | null | null | null | cartoframes/data/dataset_info.py | oss-spanish-geoserver/cartoframes | 2e1a1aa785180f8c031688012b3c2663f7c7edc7 | [
"BSD-3-Clause"
] | null | null | null | cartoframes/data/dataset_info.py | oss-spanish-geoserver/cartoframes | 2e1a1aa785180f8c031688012b3c2663f7c7edc7 | [
"BSD-3-Clause"
] | null | null | null | import time
from warnings import warn
from carto.datasets import DatasetManager
from carto.exceptions import CartoException
from .utils import setting_value_exception
from ..columns import normalize_name
class DatasetInfo(object):
PRIVATE = 'PRIVATE'
PUBLIC = 'PUBLIC'
LINK = 'LINK'
def __init__(sel... | 32.619565 | 114 | 0.618794 |
7957bbce91fd9173a5c777b405209a92fef06679 | 504 | py | Python | core/tasks.py | Rwibutso/django_celery | 36d03339b8c435ef61089ba966668fea4011f949 | [
"MIT"
] | null | null | null | core/tasks.py | Rwibutso/django_celery | 36d03339b8c435ef61089ba966668fea4011f949 | [
"MIT"
] | null | null | null | core/tasks.py | Rwibutso/django_celery | 36d03339b8c435ef61089ba966668fea4011f949 | [
"MIT"
] | null | null | null | import time
from celery import shared_task
from django.core.mail import send_mail
@shared_task
def add(x, y):
return x + y
@shared_task
def send_email_task(email):
"background task to send an email asynchronously"
subject = 'Helo from Celery'
message = 'This is a test email sent asynchronously with ... | 21 | 69 | 0.65873 |
7957bd8c0ba70e8ced584386676b935d3d3c7186 | 3,909 | py | Python | env/lib/python3.6/site-packages/telegram/inline/inlinequeryresultarticle.py | rogerscristo/BotFWD | 4f2ab1f4f4543c157ca0a79084536c065f74159f | [
"MIT"
] | null | null | null | env/lib/python3.6/site-packages/telegram/inline/inlinequeryresultarticle.py | rogerscristo/BotFWD | 4f2ab1f4f4543c157ca0a79084536c065f74159f | [
"MIT"
] | 3 | 2017-09-01T22:18:30.000Z | 2017-09-01T22:24:57.000Z | env/lib/python3.6/site-packages/telegram/inline/inlinequeryresultarticle.py | rogerscristo/BotFWD | 4f2ab1f4f4543c157ca0a79084536c065f74159f | [
"MIT"
] | 3 | 2018-02-22T22:20:27.000Z | 2018-04-22T10:58:24.000Z | #!/usr/bin/env python
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015-2017
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as publish... | 41.585106 | 98 | 0.622154 |
7957be0b77d128b775bfe6614d8dc44eeb4775af | 5,730 | py | Python | addons/account/tests/test_bank_statement_reconciliation.py | jjiege/odoo | fd5b8ad387c1881f349d125cbd56433f4d49398f | [
"MIT"
] | null | null | null | addons/account/tests/test_bank_statement_reconciliation.py | jjiege/odoo | fd5b8ad387c1881f349d125cbd56433f4d49398f | [
"MIT"
] | null | null | null | addons/account/tests/test_bank_statement_reconciliation.py | jjiege/odoo | fd5b8ad387c1881f349d125cbd56433f4d49398f | [
"MIT"
] | null | null | null | from odoo.addons.account.tests.account_test_classes import AccountingTestCase
from odoo.tests import tagged
@tagged('post_install', '-at_install')
class TestBankStatementReconciliation(AccountingTestCase):
def setUp(self):
super(TestBankStatementReconciliation, self).setUp()
self.i_model = self.e... | 40.638298 | 152 | 0.629494 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.