hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7c74c0dc505ba1b7931433012246c35690d6cd20 | 184 | py | Python | aws-s3-django-postgresql-rest/app/core/serializers.py | MdSauravChowdhury/cheat-project | 8602d1479e0b2adad48265404e4509ab6a45b8e3 | [
"MIT"
] | null | null | null | aws-s3-django-postgresql-rest/app/core/serializers.py | MdSauravChowdhury/cheat-project | 8602d1479e0b2adad48265404e4509ab6a45b8e3 | [
"MIT"
] | null | null | null | aws-s3-django-postgresql-rest/app/core/serializers.py | MdSauravChowdhury/cheat-project | 8602d1479e0b2adad48265404e4509ab6a45b8e3 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from .models import S3Box
class S3BoxSerializer(serializers.ModelSerializer):
class Meta:
model = S3Box
fields = '__all__' | 23 | 51 | 0.728261 |
1325e70bb906f9a092ce51f47b6b3f02f3c23dc9 | 5,650 | py | Python | tests/cli/test_add.py | elmirjagudin/symstore | c84f7481f2a10a40011b630a06ea1265c7168b83 | [
"MIT"
] | 26 | 2015-11-18T17:45:35.000Z | 2021-03-15T07:38:08.000Z | tests/cli/test_add.py | elmirjagudin/symstore | c84f7481f2a10a40011b630a06ea1265c7168b83 | [
"MIT"
] | 17 | 2016-08-20T07:17:21.000Z | 2021-06-03T06:59:14.000Z | tests/cli/test_add.py | elmirjagudin/symstore | c84f7481f2a10a40011b630a06ea1265c7168b83 | [
"MIT"
] | 14 | 2015-10-02T23:04:46.000Z | 2021-05-28T23:34:26.000Z | import unittest
import tempfile
import shutil
from os import path
from symstore import cab
from tests.cli import util
class TestNewStore(util.CliTester):
"""
Test publishing files to a new symstore.
"""
def setUp(self):
self.recordStartTime()
# set test's symstore path to a non-exist... | 33.040936 | 78 | 0.610619 |
2cf9a9948b3d07129060072e7d1868c5d4286f84 | 5,702 | py | Python | tests/test_comp_ops.py | Ben-Wu/ShrugProgrammingLanguage | 1aa95acfe02ebfac147bd23c4a028a4b7b78645c | [
"MIT"
] | 2 | 2018-09-25T06:57:55.000Z | 2019-06-07T19:07:46.000Z | tests/test_comp_ops.py | Ben-Wu/ShrugProgrammingLanguage | 1aa95acfe02ebfac147bd23c4a028a4b7b78645c | [
"MIT"
] | 4 | 2018-09-21T22:03:55.000Z | 2019-06-07T19:07:05.000Z | tests/test_comp_ops.py | Ben-Wu/ShrugProgrammingLanguage | 1aa95acfe02ebfac147bd23c4a028a4b7b78645c | [
"MIT"
] | null | null | null | import unittest
from shrug_lang.operators import CompOp
from .utils import BaseTokenParserTestCase, TokenGenerator
class TestCompOperations(unittest.TestCase):
def test_equality(self):
self.assertTrue(CompOp.eq(('',), ('',)))
self.assertTrue(CompOp.eq(('abc',), ('abc',)))
self.assertTrue(... | 40.439716 | 79 | 0.594528 |
3144306ef4ad85deb15e86b9824832896c2b0939 | 5,172 | py | Python | Groups/Group_ID_35/MULDA/mulda.py | aryapushpa/DataScience | 89ba01c18d3ed36942ffdf3e1f3c68fd08b05324 | [
"MIT"
] | 5 | 2020-12-13T07:53:22.000Z | 2020-12-20T18:49:27.000Z | Groups/Group_ID_35/MULDA/mulda.py | Gulnaz-Tabassum/DataScience | 1fd771f873a9bc0800458fd7c05e228bb6c4e8a0 | [
"MIT"
] | null | null | null | Groups/Group_ID_35/MULDA/mulda.py | Gulnaz-Tabassum/DataScience | 1fd771f873a9bc0800458fd7c05e228bb6c4e8a0 | [
"MIT"
] | 24 | 2020-12-12T11:23:28.000Z | 2021-10-04T13:09:38.000Z | # For Understanding the functionality perfomed by each function refer to .ipynb file it has everything explained in detail
# Authors
# Kanishk Gupta(0801CS171031)
# Aadeesh Jain (0801CS171001)
# Harsh Pastaria(0801CS171027
import numpy as np
import pandas as pd
import math
import os
class MULDA:
... | 27.078534 | 124 | 0.458237 |
83d2cf77e824b6336c4945f0c92e4362be1722f7 | 8,646 | py | Python | fastai/text.py | royalbhati/fastai | 745ddabcf9301b0078a16ac6333cd41684df149b | [
"Apache-2.0"
] | 7 | 2018-10-23T23:43:15.000Z | 2021-12-25T01:08:09.000Z | fastai/text.py | royalbhati/fastai | 745ddabcf9301b0078a16ac6333cd41684df149b | [
"Apache-2.0"
] | 8 | 2021-03-18T20:46:24.000Z | 2022-03-11T23:26:30.000Z | fastai/text.py | royalbhati/fastai | 745ddabcf9301b0078a16ac6333cd41684df149b | [
"Apache-2.0"
] | 11 | 2019-01-19T08:10:46.000Z | 2021-10-02T06:45:42.000Z | from .core import *
from .learner import *
from .lm_rnn import *
from torch.utils.data.sampler import Sampler
import spacy
from spacy.symbols import ORTH
re_tok = re.compile(f'([{string.punctuation}“”¨«»®´·º½¾¿¡§£₤‘’])')
def tokenize(s): return re_tok.sub(r' \1 ', s).split()
def texts_labels_from_folders(path, folder... | 38.945946 | 126 | 0.62607 |
54b4ed1af049feb0425c65c7a4259a956927e72c | 126 | py | Python | profile_test.py | LudwigVonChesterfield/Asciiglet | d06d4fc5b63b1ab334b7597c6edccff95f80bc8e | [
"MIT"
] | null | null | null | profile_test.py | LudwigVonChesterfield/Asciiglet | d06d4fc5b63b1ab334b7597c6edccff95f80bc8e | [
"MIT"
] | null | null | null | profile_test.py | LudwigVonChesterfield/Asciiglet | d06d4fc5b63b1ab334b7597c6edccff95f80bc8e | [
"MIT"
] | null | null | null | import cProfile
p = cProfile.Profile()
p.enable()
import test
p.disable()
# p.print_stats()
p.dump_stats("results.prof")
| 9.692308 | 28 | 0.706349 |
c04d434e220a65c92aa50923dfd6ca452c645a5c | 1,229 | py | Python | 09-revisao/practice_python/guessing_game_one.py | lcnodc/codes | 068e04323362737c3f840b4e21a73cf0718aa401 | [
"MIT"
] | 1 | 2019-09-16T18:00:47.000Z | 2019-09-16T18:00:47.000Z | 09-revisao/practice_python/guessing_game_one.py | lcnodc/codes | 068e04323362737c3f840b4e21a73cf0718aa401 | [
"MIT"
] | null | null | null | 09-revisao/practice_python/guessing_game_one.py | lcnodc/codes | 068e04323362737c3f840b4e21a73cf0718aa401 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Exercise 9: Guess a number.
Generate a random number between 1 and 9 (including 1 and 9). Ask the
user to guess the number, then tell them whether they guessed too low,
too high, or exactly right. (Hint: remember to use the user input
lessons from the very first exerci... | 31.512821 | 97 | 0.627339 |
98c48df01b6ad0a326613a7f9346883265b46af4 | 1,451 | py | Python | utils.py | edward-zhu/neural-transform | af0829733e21ea3a1f1748b33a42ebbc0e041969 | [
"Apache-2.0"
] | 3 | 2018-05-14T05:09:31.000Z | 2021-01-11T09:51:03.000Z | utils.py | edward-zhu/neural-transform | af0829733e21ea3a1f1748b33a42ebbc0e041969 | [
"Apache-2.0"
] | null | null | null | utils.py | edward-zhu/neural-transform | af0829733e21ea3a1f1748b33a42ebbc0e041969 | [
"Apache-2.0"
] | null | null | null | import torch
from torchvision import transforms
import numpy as np
from PIL import Image
def get_mean_var(c):
n_batch, n_ch, h, w = c.size()
c_view = c.view(n_batch, n_ch, h * w)
c_mean = c_view.mean(2)
c_mean = c_mean.view(n_batch, n_ch, 1, 1).expand_as(c)
c_var = c_view.var(2)
c_var = c_v... | 29.02 | 75 | 0.608546 |
945623500cde0ef435e8d8d91f7b36f2ce119040 | 4,943 | py | Python | featureflags/evaluations/segment.py | meghamathur03/ff-python-server-sdk | 33b599aea44c0fe0854836f271642b23c96b7bb2 | [
"Apache-2.0"
] | null | null | null | featureflags/evaluations/segment.py | meghamathur03/ff-python-server-sdk | 33b599aea44c0fe0854836f271642b23c96b7bb2 | [
"Apache-2.0"
] | null | null | null | featureflags/evaluations/segment.py | meghamathur03/ff-python-server-sdk | 33b599aea44c0fe0854836f271642b23c96b7bb2 | [
"Apache-2.0"
] | null | null | null | from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from featureflags.models import UNSET, Unset
from .auth_target import Target
from .clause import Clause, Clauses
from .tag import Tag
T = TypeVar("T", bound="Segment")
@attr.s(auto_attribs=True)
class Segment(object):
identifier: str
nam... | 29.422619 | 77 | 0.588711 |
99cbb1134bfe0e20df3a314b1706fe982d43916b | 2,813 | py | Python | tests/test_prepare_data.py | Abhishek2304/Cerebro-System-Ray | 1e2f2ae291cd449573f87bb83fb2bda12e606b3a | [
"Apache-2.0"
] | 16 | 2020-05-09T03:55:38.000Z | 2022-02-27T01:06:09.000Z | tests/test_prepare_data.py | Abhishek2304/Cerebro-System-Ray | 1e2f2ae291cd449573f87bb83fb2bda12e606b3a | [
"Apache-2.0"
] | 16 | 2020-04-20T20:47:10.000Z | 2021-12-02T05:11:09.000Z | tests/test_prepare_data.py | Abhishek2304/Cerebro-System-Ray | 1e2f2ae291cd449573f87bb83fb2bda12e606b3a | [
"Apache-2.0"
] | 6 | 2020-06-08T01:27:03.000Z | 2021-12-02T12:06:44.000Z | # Copyright 2020 Supun Nakandala, Yuhao Zhang, and Arun Kumar. 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
#
# Unle... | 36.064103 | 94 | 0.646996 |
f1177e19b45772734c3642f939466e6cc8751cf5 | 5,381 | py | Python | hub-sim/sim.py | concord-consortium/sensaurus | 36f0229d1bb527eb05d1cc96dd2bd331a2c193f4 | [
"MIT"
] | null | null | null | hub-sim/sim.py | concord-consortium/sensaurus | 36f0229d1bb527eb05d1cc96dd2bd331a2c193f4 | [
"MIT"
] | null | null | null | hub-sim/sim.py | concord-consortium/sensaurus | 36f0229d1bb527eb05d1cc96dd2bd331a2c193f4 | [
"MIT"
] | null | null | null | import paho.mqtt.client as paho
import ssl
import time
import json
import random
import hjson
class Hub(object):
def __init__(self, config):
self.mqttc = None
self.connected = False
self.devices = []
self.owner_id = config['owner_id']
self.config = config
self.id =... | 36.856164 | 123 | 0.584092 |
15f56902a780b4e05b5ed5f4c2768ce13a31ef6f | 3,513 | py | Python | XYZHubConnector/xyz_qgis/loader/space_loader.py | heremaps/xyz-qgis-plugin | 570402e1bb886db5dd36d2b2d2f278a25ef8ad12 | [
"MIT"
] | 19 | 2019-03-06T18:25:17.000Z | 2021-07-21T10:08:20.000Z | XYZHubConnector/xyz_qgis/loader/space_loader.py | heremaps/xyz-qgis-plugin | 570402e1bb886db5dd36d2b2d2f278a25ef8ad12 | [
"MIT"
] | 28 | 2019-03-07T18:18:44.000Z | 2021-11-16T13:49:39.000Z | XYZHubConnector/xyz_qgis/loader/space_loader.py | heremaps/xyz-qgis-plugin | 570402e1bb886db5dd36d2b2d2f278a25ef8ad12 | [
"MIT"
] | 8 | 2019-03-01T10:41:08.000Z | 2021-01-18T18:02:56.000Z | # -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (c) 2019 HERE Europe B.V.
#
# SPDX-License-Identifier: MIT
# License-Filename: LICENSE
#
###############################################################################
from qgis.PyQt.QtCore import QTh... | 25.642336 | 79 | 0.56419 |
62c10bf396bd6c8e93dca24f45b9d086a4be6fea | 1,300 | py | Python | hat11/analyze.py | bmorris3/friedrich | a2a4d9c446a60e78879bdfcd66a37bd5946a4ef9 | [
"MIT"
] | null | null | null | hat11/analyze.py | bmorris3/friedrich | a2a4d9c446a60e78879bdfcd66a37bd5946a4ef9 | [
"MIT"
] | null | null | null | hat11/analyze.py | bmorris3/friedrich | a2a4d9c446a60e78879bdfcd66a37bd5946a4ef9 | [
"MIT"
] | null | null | null |
from __future__ import (absolute_import, division, print_function,
unicode_literals)
# Import dev version of friedrich:
import sys
sys.path.insert(0, '../')
from friedrich.analysis import MCMCResults
from friedrich.lightcurve import hat11_params_morris
from glob import glob
import matplotlib.p... | 31.707317 | 73 | 0.690769 |
719c06daed5dc41ae568598682fbd3636bd1f829 | 318 | py | Python | PythonExercicios/Mundo 2/8_estrutura_de_repeticao_for/ex055.py | GuilhermoCampos/Curso-Python3-curso-em-video | 723767bc6069e9c1fa9e28fe412e694f9eb8d05e | [
"MIT"
] | null | null | null | PythonExercicios/Mundo 2/8_estrutura_de_repeticao_for/ex055.py | GuilhermoCampos/Curso-Python3-curso-em-video | 723767bc6069e9c1fa9e28fe412e694f9eb8d05e | [
"MIT"
] | null | null | null | PythonExercicios/Mundo 2/8_estrutura_de_repeticao_for/ex055.py | GuilhermoCampos/Curso-Python3-curso-em-video | 723767bc6069e9c1fa9e28fe412e694f9eb8d05e | [
"MIT"
] | null | null | null | maior = 0
menor = 300
for pes in range(1, 6):
peso = float(input('Digite o Peso(kg) da {}º pessoa: '.format(pes)))
if peso > maior:
maior = peso
elif peso < menor:
menor = peso
print('O Maior peso registrado foi de {}kg, enquanto o Menor peso Registrado foi de {}kg.'.format(maior, menor))
| 31.8 | 112 | 0.625786 |
abf09d567632228af50c74cd88859e2d8232cc80 | 2,810 | py | Python | keystone/identity/mapping_backends/base.py | ISCAS-VDI/keystone | 11af181c06d78026c89a873f62931558e80f3192 | [
"Apache-2.0"
] | null | null | null | keystone/identity/mapping_backends/base.py | ISCAS-VDI/keystone | 11af181c06d78026c89a873f62931558e80f3192 | [
"Apache-2.0"
] | null | null | null | keystone/identity/mapping_backends/base.py | ISCAS-VDI/keystone | 11af181c06d78026c89a873f62931558e80f3192 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation
#
# 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... | 34.268293 | 78 | 0.64911 |
af91059f642aaf41f102062b5aa0d44454785265 | 322 | py | Python | Projekteuler/projecteuler_aufgabe003.py | kilian-funk/Python-Kurs | f5ef5a2fb2a875d2e80d77c1a6c3596a0e577d7f | [
"MIT"
] | null | null | null | Projekteuler/projecteuler_aufgabe003.py | kilian-funk/Python-Kurs | f5ef5a2fb2a875d2e80d77c1a6c3596a0e577d7f | [
"MIT"
] | null | null | null | Projekteuler/projecteuler_aufgabe003.py | kilian-funk/Python-Kurs | f5ef5a2fb2a875d2e80d77c1a6c3596a0e577d7f | [
"MIT"
] | null | null | null | """
Aufgabe 3 aus http://projecteuler.net
(Deutsche Übersetzung auf http://projekteuler.de)
Größter Primfaktor
Die Primfaktoren von 13195 sind 5, 7, 13 und 29.
Was ist der größte Primfaktor der Zahl 600851475143?
"""
zahl = 600851475143
faktor = # Los geht's ...
print("Groesster Primfaktor ist {}".format(faktor)... | 17.888889 | 52 | 0.732919 |
ee99e9a51876ebb4c54b5f4c32c0354747cc5ef3 | 20,529 | py | Python | raiden/waiting.py | ezdac/raiden | d7504996e6738b55d5a9dcf9a36ef66797f6f326 | [
"MIT"
] | 1 | 2020-10-19T15:00:42.000Z | 2020-10-19T15:00:42.000Z | raiden/waiting.py | ezdac/raiden | d7504996e6738b55d5a9dcf9a36ef66797f6f326 | [
"MIT"
] | null | null | null | raiden/waiting.py | ezdac/raiden | d7504996e6738b55d5a9dcf9a36ef66797f6f326 | [
"MIT"
] | null | null | null | import time
from enum import Enum
from typing import TYPE_CHECKING, List
import gevent
import structlog
from raiden.storage.restore import get_state_change_with_transfer_by_secrethash
from raiden.transfer import channel, views
from raiden.transfer.events import EventPaymentReceivedSuccess
from raiden.transfer.identif... | 34.101329 | 99 | 0.700813 |
1d73837cfba6bc4e5e39d1fa7da1861630c38139 | 5,607 | py | Python | mdrsl/data_handling/one_hot_encoding/encoding_book_keeping.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | 3 | 2020-08-03T19:25:44.000Z | 2021-06-27T22:25:55.000Z | mdrsl/data_handling/one_hot_encoding/encoding_book_keeping.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | null | null | null | mdrsl/data_handling/one_hot_encoding/encoding_book_keeping.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | 2 | 2020-08-07T22:54:28.000Z | 2021-02-18T06:11:01.000Z | from typing import Optional, Dict, List, KeysView
Attr = str
class EncodingBookKeeper:
"""
Keeps track of a one hot encoding,
i.e. which original columns map to which set of one-hot-encoded columns,
and vice versa.
"""
def __init__(self, ohe_prefix_separator: str):
self.ohe_prefix_se... | 44.856 | 110 | 0.643838 |
389d17dfa7f337fbe2393027556082977192b4e3 | 74,048 | py | Python | batch/batch/front_end/front_end.py | saponas/hail | bafea6b18247a4279d6ef11015e8e9f3c2b5ecea | [
"MIT"
] | null | null | null | batch/batch/front_end/front_end.py | saponas/hail | bafea6b18247a4279d6ef11015e8e9f3c2b5ecea | [
"MIT"
] | null | null | null | batch/batch/front_end/front_end.py | saponas/hail | bafea6b18247a4279d6ef11015e8e9f3c2b5ecea | [
"MIT"
] | null | null | null | from numbers import Number
import os
import concurrent
import logging
import json
import random
import datetime
import collections
from functools import wraps
import asyncio
import aiohttp
import signal
from aiohttp import web
import aiohttp_session
import pymysql
import google.oauth2.service_account
import google.api_... | 35.160494 | 163 | 0.639437 |
fe8e4a4b09d8fd988b6575c1cba9b4844587af87 | 2,864 | py | Python | yt_astro_analysis/halo_analysis/halo_catalog/halo_filters.py | brittonsmith/yt_astro_analysis | f5d255a89dc1e882866cbfabcc627c3af3ee6d62 | [
"BSD-3-Clause-Clear"
] | null | null | null | yt_astro_analysis/halo_analysis/halo_catalog/halo_filters.py | brittonsmith/yt_astro_analysis | f5d255a89dc1e882866cbfabcc627c3af3ee6d62 | [
"BSD-3-Clause-Clear"
] | null | null | null | yt_astro_analysis/halo_analysis/halo_catalog/halo_filters.py | brittonsmith/yt_astro_analysis | f5d255a89dc1e882866cbfabcc627c3af3ee6d62 | [
"BSD-3-Clause-Clear"
] | null | null | null | """
HaloCatalog filters
"""
import numpy as np
from yt.utilities.on_demand_imports import \
_scipy as scipy
from yt_astro_analysis.halo_analysis.halo_catalog.analysis_operators import \
add_filter
def quantity_value(halo, field, operator, value, units):
r"""
Filter based on a value in the halo qu... | 34.095238 | 91 | 0.670391 |
321284219c9f0ae73164597a45404aa5235b0205 | 646 | py | Python | Algorithms/radixten.py | akselsd/VisualSort | 26b5505219227c20ac1ca834bc9ec89c989af457 | [
"MIT"
] | null | null | null | Algorithms/radixten.py | akselsd/VisualSort | 26b5505219227c20ac1ca834bc9ec89c989af457 | [
"MIT"
] | null | null | null | Algorithms/radixten.py | akselsd/VisualSort | 26b5505219227c20ac1ca834bc9ec89c989af457 | [
"MIT"
] | null | null | null | def radix_sort_base_ten(numlist,handler):
n = len(numlist.numbers)
max_digit = len(str(n))
for base in range(max_digit):
buckets = [[] for x in range(10)]
for index, value in enumerate(numlist.numbers):
handler.update([index])
base_value = (value // (10**base)) % 10
... | 32.3 | 58 | 0.589783 |
fee6696480cc8f410c45a046379a186aec179dc8 | 13,256 | py | Python | run_if_finetuning.py | aporporato/electra | 247e1d507cf6bcaf9cc6080101f6593f8b3d92f7 | [
"Apache-2.0"
] | null | null | null | run_if_finetuning.py | aporporato/electra | 247e1d507cf6bcaf9cc6080101f6593f8b3d92f7 | [
"Apache-2.0"
] | null | null | null | run_if_finetuning.py | aporporato/electra | 247e1d507cf6bcaf9cc6080101f6593f8b3d92f7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 42.216561 | 91 | 0.634203 |
9746ccd97229349c3a95a03599877d30caa6a9b6 | 1,205 | py | Python | src/gdrive_transfer/testing.py | benkrikler/gdrive_transfer | 2ad608590c9ddb64a88e3825bbee30f9d78edf73 | [
"MIT"
] | null | null | null | src/gdrive_transfer/testing.py | benkrikler/gdrive_transfer | 2ad608590c9ddb64a88e3825bbee30f9d78edf73 | [
"MIT"
] | null | null | null | src/gdrive_transfer/testing.py | benkrikler/gdrive_transfer | 2ad608590c9ddb64a88e3825bbee30f9d78edf73 | [
"MIT"
] | null | null | null | from .drive import create, create_shortcut, ls
from .auth import get_credentials
import googleapiclient
from googleapiclient.discovery import build
def create_test_structure_1(dest_id):
cred = get_credentials()
with build('drive', 'v3', credentials=cred) as service:
extra = {"gdrive_transfer_test-data... | 50.208333 | 103 | 0.670539 |
9ff94b005099a57109f7b62955a7cea9f5f9ce4c | 1,077 | py | Python | sin_Taylor_series_diffeq.py | chapman-phys227-2016s/hw-3-malfa100 | df1343476e7b40c728f7b9027162369d8d559c13 | [
"MIT"
] | null | null | null | sin_Taylor_series_diffeq.py | chapman-phys227-2016s/hw-3-malfa100 | df1343476e7b40c728f7b9027162369d8d559c13 | [
"MIT"
] | null | null | null | sin_Taylor_series_diffeq.py | chapman-phys227-2016s/hw-3-malfa100 | df1343476e7b40c728f7b9027162369d8d559c13 | [
"MIT"
] | null | null | null | """
File: sin_Taylor_series_diffeq.py
Copyright (c) 2016 Andrew Malfavon
Excerise A.14
License: MIT
Computes a Taylor polynomial approximation for sinx and shows the accuracy in a table
"""
import numpy as np
#computes the approximation based on the exercises in the book
def sin_Taylor(x, n):
i = 1
an_prev = x... | 29.916667 | 87 | 0.5961 |
43d93817420151d6272455f7b1e9fc08ddfb0aeb | 2,002 | py | Python | examples/pipeline.py | jgoldford/ASR | 10897401faa5e4dcdf03cc18f8b1b826b5b4a066 | [
"MIT"
] | null | null | null | examples/pipeline.py | jgoldford/ASR | 10897401faa5e4dcdf03cc18f8b1b826b5b4a066 | [
"MIT"
] | null | null | null | examples/pipeline.py | jgoldford/ASR | 10897401faa5e4dcdf03cc18f8b1b826b5b4a066 | [
"MIT"
] | null | null | null |
# PIPELINE For the construction for ancesteral sequences based on the tutorial provided by Rubin Studer:
# https://evosite3d.blogspot.com/2014/09/tutorial-on-ancestral-sequence.html
# Dependence all on path and aliased ()
# mafft - multiple sequence alignment
# phyml - large tree building using maximum likelihood
# c... | 31.777778 | 115 | 0.728771 |
68d1b5cf8bfecdfbd4d8e3407097de087e639d67 | 12,750 | py | Python | widget/bean/plot_dataset_props.py | CASL/VERAview | 89b18f239ca5228185b80d5392068981d7733d3b | [
"BSD-3-Clause"
] | 7 | 2017-04-21T05:35:16.000Z | 2022-02-28T20:14:42.000Z | widget/bean/plot_dataset_props.py | CASL/VERAview | 89b18f239ca5228185b80d5392068981d7733d3b | [
"BSD-3-Clause"
] | 2 | 2019-02-27T15:25:34.000Z | 2021-05-26T17:01:59.000Z | widget/bean/plot_dataset_props.py | CASL/VERAview | 89b18f239ca5228185b80d5392068981d7733d3b | [
"BSD-3-Clause"
] | 3 | 2019-07-09T08:31:34.000Z | 2022-03-08T03:18:48.000Z | #!/usr/bin/env python
# $Id$
#------------------------------------------------------------------------
# NAME: plot_dataset_props.py -
# HISTORY: -
# 2018-09-12 leerw@ornl.gov -
# Added draw order field.
# 2017-07-21 leerw@ornl.gov -
# Fixing _OnCharHook for Linux.
# 2017-03-31 leerw@ornl.gov ... | 29.72028 | 80 | 0.502588 |
2e3d0f992c6bad6513fa1ab5362590242b370749 | 10,897 | py | Python | scripts/autodiff_logreg.py | VaibhaviMishra04/pyprobml | 53208f571561acd25e8608ac5d1eb5e2610f6cc0 | [
"MIT"
] | 2 | 2021-04-10T18:12:19.000Z | 2021-05-11T12:07:40.000Z | scripts/autodiff_logreg.py | Rebeca98/pyprobml | 2a4b9a267f64720cbba35dfa41af3e995ea006ca | [
"MIT"
] | 1 | 2021-04-22T15:46:27.000Z | 2021-04-22T15:46:27.000Z | scripts/autodiff_logreg.py | Rebeca98/pyprobml | 2a4b9a267f64720cbba35dfa41af3e995ea006ca | [
"MIT"
] | 1 | 2021-06-21T01:18:07.000Z | 2021-06-21T01:18:07.000Z | #!/usr/bin/python
"""
Demonstrate automatic differentiaiton on binary logistic regression
using JAX, Torch and TF
"""
import warnings
import tensorflow as tf
from absl import app, flags
warnings.filterwarnings("ignore", category=DeprecationWarning)
FLAGS = flags.FLAGS
# Define a command-line argument using the Abs... | 33.42638 | 93 | 0.674865 |
bff485b9f1b164b7ba59e43b509d66147fb353b3 | 8,279 | py | Python | mapproxy/test/system/test_util_conf.py | kaiCu/mapproxy | 9b28f9ca1286e686b8f2188dd52ce56b607427a7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | mapproxy/test/system/test_util_conf.py | kaiCu/mapproxy | 9b28f9ca1286e686b8f2188dd52ce56b607427a7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | mapproxy/test/system/test_util_conf.py | kaiCu/mapproxy | 9b28f9ca1286e686b8f2188dd52ce56b607427a7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # -:- encoding: utf-8 -:-
# This file is part of the MapProxy project.
# Copyright (C) 2013 Omniscale <http://omniscale.de>
#
# 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.a... | 36.471366 | 186 | 0.460201 |
4198dcdb5b0a3ea4799160bba88094b1308ddf7d | 1,183 | py | Python | using-python-to-interact-with-the-operating-system/week-five/rearrange_test.py | veera-raju/google-it-automation-with-python | 19aaee57055c600b23a65392ca7471cdfca88500 | [
"MIT"
] | 164 | 2020-02-08T18:04:42.000Z | 2022-03-24T14:46:53.000Z | using-python-to-interact-with-the-operating-system/week-five/rearrange_test.py | Arunnoobmaster/google-it-automation-with-python | 19aaee57055c600b23a65392ca7471cdfca88500 | [
"MIT"
] | 12 | 2020-05-13T06:24:15.000Z | 2020-11-23T20:15:50.000Z | using-python-to-interact-with-the-operating-system/week-five/rearrange_test.py | Arunnoobmaster/google-it-automation-with-python | 19aaee57055c600b23a65392ca7471cdfca88500 | [
"MIT"
] | 195 | 2020-02-10T01:46:34.000Z | 2022-03-24T14:46:22.000Z | #!/usr/bin/env python3
# Writing Unit Tests in Python
# from keyword imports a function from a script in the python3 interpreter
# the function can be called without having to write the module name each time we want to call it
from rearrange import rearrange_name
# unittest module includes classes and methods for crea... | 33.8 | 97 | 0.704142 |
652223b710138d3365f7344a363457ddfc87cb28 | 8,323 | py | Python | examples/hotel_ads/add_hotel_ad.py | bjagadev17/google-ads-python | ee2c059498d5679a0d1d9011f3795324439fad7c | [
"Apache-2.0"
] | null | null | null | examples/hotel_ads/add_hotel_ad.py | bjagadev17/google-ads-python | ee2c059498d5679a0d1d9011f3795324439fad7c | [
"Apache-2.0"
] | null | null | null | examples/hotel_ads/add_hotel_ad.py | bjagadev17/google-ads-python | ee2c059498d5679a0d1d9011f3795324439fad7c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 34.110656 | 86 | 0.721855 |
e92cdbe8e29c8c0dcb05e73f8f175ffeacedbd31 | 3,957 | py | Python | T1A_informed_search/game.py | allanmoreira/inteligencia_artificial | ee29a881be7fdb9dd150d08dbf9bb9e49f09cb71 | [
"Apache-2.0"
] | null | null | null | T1A_informed_search/game.py | allanmoreira/inteligencia_artificial | ee29a881be7fdb9dd150d08dbf9bb9e49f09cb71 | [
"Apache-2.0"
] | 1 | 2017-08-03T15:53:01.000Z | 2017-08-03T15:55:02.000Z | T1A_informed_search/game.py | allanmoreira/inteligencia_artificial | ee29a881be7fdb9dd150d08dbf9bb9e49f09cb71 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Four spaces as indentation [no tabs]
import sys
import pygame
from pygame.locals import (QUIT, KEYDOWN, K_SPACE, K_ESCAPE)
from common import *
from player import *
# ==========================================
# Game
# ==========================================
class Game:
# -------------... | 37.330189 | 122 | 0.466262 |
53093944bc036c38e2e5d9b57b50bf3d0f8322b6 | 2,783 | py | Python | scripts/run_evaluation.py | huggingface/hf_benchmarks | 2a4367b003d4e363a7e3c6485c4a6bdbfd8f95f0 | [
"Apache-2.0"
] | null | null | null | scripts/run_evaluation.py | huggingface/hf_benchmarks | 2a4367b003d4e363a7e3c6485c4a6bdbfd8f95f0 | [
"Apache-2.0"
] | 1 | 2022-03-30T20:36:55.000Z | 2022-03-30T20:36:55.000Z | scripts/run_evaluation.py | huggingface/hf_benchmarks | 2a4367b003d4e363a7e3c6485c4a6bdbfd8f95f0 | [
"Apache-2.0"
] | null | null | null | import os
import re
import subprocess
from pathlib import Path
import pandas as pd
import requests
import typer
from dotenv import load_dotenv
from hf_benchmarks import extract_tags, get_benchmark_repos
if Path(".env").is_file():
load_dotenv(".env")
auth_token = os.getenv("HF_HUB_TOKEN")
app = typer.Typer()
... | 37.608108 | 131 | 0.623787 |
294bd4ecd98bc334c4f74da76d975454d6d89ef2 | 13,053 | py | Python | sdk/python/pulumi_azure_nextgen/network/v20181001/inbound_nat_rule.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/network/v20181001/inbound_nat_rule.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/network/v20181001/inbound_nat_rule.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 60.995327 | 2,070 | 0.698537 |
e7159fea3e4b612f0fd6a4c0a010a4eb7c398877 | 583 | py | Python | products/migrations/0002_auto_20190725_1623.py | destodasoftware/kately_api | 89e4e80a93ebf8e5d2f2981d108ce5efde75d0dd | [
"MIT"
] | null | null | null | products/migrations/0002_auto_20190725_1623.py | destodasoftware/kately_api | 89e4e80a93ebf8e5d2f2981d108ce5efde75d0dd | [
"MIT"
] | 10 | 2019-12-04T23:52:31.000Z | 2022-02-10T08:34:15.000Z | products/migrations/0002_auto_20190725_1623.py | destodasoftware/kately_api | 89e4e80a93ebf8e5d2f2981d108ce5efde75d0dd | [
"MIT"
] | null | null | null | # Generated by Django 2.2.3 on 2019-07-25 16:23
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='product',
name='minimum_stock',
... | 23.32 | 57 | 0.57976 |
d0b1797b4850ff39c005cf88d69f6c0c318a9f5d | 25,191 | py | Python | pymatgen/analysis/ewald.py | dynikon/pymatgen | 6183f479e30a69bf5b94a0a7e21a3e810b40f02d | [
"MIT"
] | 6 | 2015-02-06T08:27:09.000Z | 2021-02-28T14:42:52.000Z | pymatgen/analysis/ewald.py | dynikon/pymatgen | 6183f479e30a69bf5b94a0a7e21a3e810b40f02d | [
"MIT"
] | null | null | null | pymatgen/analysis/ewald.py | dynikon/pymatgen | 6183f479e30a69bf5b94a0a7e21a3e810b40f02d | [
"MIT"
] | 3 | 2015-10-21T08:04:40.000Z | 2019-03-19T23:11:15.000Z | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module provides classes for calculating the ewald sum of a structure.
"""
from math import pi, sqrt, log
from datetime import datetime
from copy import deepcopy, copy
from warnings import warn
import ... | 37.430906 | 113 | 0.592474 |
c7f944a2dd5f08fb2fbabc1f2937cada48894df6 | 2,721 | py | Python | pybo/pybochunk.py | mikkokotila/pybo | ae921861e3e8c18856f19c59fc4c7da8f2126c1c | [
"Apache-2.0"
] | null | null | null | pybo/pybochunk.py | mikkokotila/pybo | ae921861e3e8c18856f19c59fc4c7da8f2126c1c | [
"Apache-2.0"
] | null | null | null | pybo/pybochunk.py | mikkokotila/pybo | ae921861e3e8c18856f19c59fc4c7da8f2126c1c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from .bochunk import BoChunk
class PyBoChunk(BoChunk):
"""
Produces chunks of the following types: bo, non-bo, punct and syl chunks
Implements the following chunking pipeline:
chunk "input_str" into "bo"/"non-bo"
| chunk "bo" into "punct"/"bo"
| chunk "... | 38.871429 | 105 | 0.601617 |
bbc84c6e01a364c890e8a69b5ad4013093e64578 | 2,376 | py | Python | changes/models/plan.py | bowlofstew/changes | ebd393520e0fdb07c240a8d4e8747281b6186e28 | [
"Apache-2.0"
] | null | null | null | changes/models/plan.py | bowlofstew/changes | ebd393520e0fdb07c240a8d4e8747281b6186e28 | [
"Apache-2.0"
] | null | null | null | changes/models/plan.py | bowlofstew/changes | ebd393520e0fdb07c240a8d4e8747281b6186e28 | [
"Apache-2.0"
] | null | null | null | from uuid import uuid4
from datetime import datetime
from enum import Enum
from sqlalchemy import Column, DateTime, ForeignKey, Integer, String
from sqlalchemy.orm import backref, relationship
from changes.config import db
from changes.db.types.enum import Enum as EnumType
from changes.db.types.guid import GUID
from ... | 35.462687 | 94 | 0.698232 |
4482cc5f10ebe599865a6a7aee5b72d77cc6824b | 5,578 | py | Python | tests/models.py | wethegit/django-modelcluster | cb9e1da8cfaa4e8f1e6176473206bfaa6519e0cb | [
"BSD-3-Clause"
] | null | null | null | tests/models.py | wethegit/django-modelcluster | cb9e1da8cfaa4e8f1e6176473206bfaa6519e0cb | [
"BSD-3-Clause"
] | null | null | null | tests/models.py | wethegit/django-modelcluster | cb9e1da8cfaa4e8f1e6176473206bfaa6519e0cb | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from modelcluster.contrib.taggit import ClusterTaggableManager
from taggit.managers import TaggableManager
from taggit.models import TaggedItemBase
from modelcluster.fields import Parent... | 27.477833 | 120 | 0.743277 |
4e5dc07ca03ef141198e7438d165bb77664ecfce | 1,810 | py | Python | aliyun-python-sdk-ccc/aliyunsdkccc/request/v20200701/AddNumbersToSkillGroupRequest.py | jorsonzen/aliyun-openapi-python-sdk | 0afbfa8e5f9e19455695aa799f7dcc1cd853d827 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-ccc/aliyunsdkccc/request/v20200701/AddNumbersToSkillGroupRequest.py | jorsonzen/aliyun-openapi-python-sdk | 0afbfa8e5f9e19455695aa799f7dcc1cd853d827 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-ccc/aliyunsdkccc/request/v20200701/AddNumbersToSkillGroupRequest.py | jorsonzen/aliyun-openapi-python-sdk | 0afbfa8e5f9e19455695aa799f7dcc1cd853d827 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.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... | 36.2 | 81 | 0.769061 |
cf0621c7b44847af82d2ee7341cd32432e883908 | 629 | py | Python | .idea/VirtualEnvironment/Lib/site-packages/hstest/common/utils.py | Vladpetr/NewsPortal | cd4127fbc09d9c8f5e65c8ae699856c6d380a320 | [
"Apache-2.0"
] | null | null | null | .idea/VirtualEnvironment/Lib/site-packages/hstest/common/utils.py | Vladpetr/NewsPortal | cd4127fbc09d9c8f5e65c8ae699856c6d380a320 | [
"Apache-2.0"
] | 5 | 2021-04-08T22:02:15.000Z | 2022-02-10T14:53:45.000Z | .idea/VirtualEnvironment/Lib/site-packages/hstest/common/utils.py | Vladpetr/NewsPortal | cd4127fbc09d9c8f5e65c8ae699856c6d380a320 | [
"Apache-2.0"
] | null | null | null | failed_msg_start = '#educational_plugin FAILED + '
failed_msg_continue = '#educational_plugin '
success_msg = '#educational_plugin test OK'
def failed(message: str):
""" Reports failure """
lines = message.splitlines()
print('\n' + failed_msg_start + lines[0])
for line in lines[1:]:
print(fail... | 23.296296 | 50 | 0.594595 |
3e4d598bb50abac7c04346facfd03893bc076c5d | 322 | py | Python | calc_template/__init__.py | flying-sheep/calc_template | 17519d5e2e946af49f3252067352ef9063d08c0d | [
"BSD-3-Clause"
] | null | null | null | calc_template/__init__.py | flying-sheep/calc_template | 17519d5e2e946af49f3252067352ef9063d08c0d | [
"BSD-3-Clause"
] | null | null | null | calc_template/__init__.py | flying-sheep/calc_template | 17519d5e2e946af49f3252067352ef9063d08c0d | [
"BSD-3-Clause"
] | null | null | null | from . import paths, params
from .data import read_data, write_data
from .summary import write_summary
import scanpy.api as sc
def main():
adata = read_data(paths.exprs_in)
# Do stuff with the anndata object, e.g.
sc.pp.log1p(adata)
write_data(paths.exprs_transformed, adata)
write_summary(adata... | 20.125 | 46 | 0.729814 |
4243f6936ab14a31799b9fbc361b6c1f1813e371 | 1,044 | py | Python | src/git_svn_monitor/core/logger.py | shin-hama/git-svn-monitor | acb793c2da63d6802efa8e0e6c99482f4fad0f80 | [
"MIT"
] | null | null | null | src/git_svn_monitor/core/logger.py | shin-hama/git-svn-monitor | acb793c2da63d6802efa8e0e6c99482f4fad0f80 | [
"MIT"
] | 36 | 2021-07-12T00:08:03.000Z | 2022-03-25T11:19:39.000Z | src/git_svn_monitor/core/logger.py | shin-hama/git-svn-monitor | acb793c2da63d6802efa8e0e6c99482f4fad0f80 | [
"MIT"
] | null | null | null | import logging
import logging.handlers
from git_svn_monitor.core.config import env_config, LOG_FILE
def setup_logger(name: str) -> None:
""" Setup logging config
Parameter
---------
name: str
The logger name, expected root package name.
ex) Call from __init__.py at the root of this p... | 26.1 | 90 | 0.658046 |
77d4caa255747374bb9c5abb90dbbb7bfe1ff359 | 817 | py | Python | LAB1/multiagent/projectParams.py | LuciferDarkStar/USTC_2021_AI_Lab | d777a999f45372e90c067120af40730e8d041e54 | [
"MIT"
] | 43 | 2019-10-31T10:21:14.000Z | 2022-03-31T14:55:01.000Z | LAB1/multiagent/projectParams.py | LuciferDarkStar/USTC_2021_AI_Lab | d777a999f45372e90c067120af40730e8d041e54 | [
"MIT"
] | 19 | 2021-05-10T20:58:19.000Z | 2021-11-12T21:15:22.000Z | LAB1/multiagent/projectParams.py | LuciferDarkStar/USTC_2021_AI_Lab | d777a999f45372e90c067120af40730e8d041e54 | [
"MIT"
] | 27 | 2020-03-27T00:13:11.000Z | 2022-03-27T01:51:15.000Z | # projectParams.py
# ----------------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to http://ai.berkel... | 43 | 80 | 0.761322 |
c370d0a84942de228646255e8a1b5e355901524d | 4,556 | py | Python | configs/example/hmctest.py | mandaltj/gem5_chips | b9c0c602241ffda7851c1afb32fa01f295bb98fd | [
"BSD-3-Clause"
] | 30 | 2019-07-12T02:35:33.000Z | 2022-02-22T03:34:35.000Z | configs/example/hmctest.py | mandaltj/gem5_chips | b9c0c602241ffda7851c1afb32fa01f295bb98fd | [
"BSD-3-Clause"
] | 2 | 2019-03-22T14:23:38.000Z | 2019-03-22T15:45:35.000Z | configs/example/hmctest.py | mandaltj/gem5_chips | b9c0c602241ffda7851c1afb32fa01f295bb98fd | [
"BSD-3-Clause"
] | 12 | 2019-10-16T02:23:23.000Z | 2022-03-30T09:21:10.000Z | from __future__ import print_function
import sys
import argparse
import subprocess
from pprint import pprint
import m5
from m5.objects import *
from m5.util import *
addToPath('../')
from common import MemConfig
from common import HMC
def add_options(parser):
parser.add_argument("--external-memory-system", de... | 39.275862 | 79 | 0.619403 |
33c898248f085482a51ddfe6737271eaadf555c4 | 13,656 | py | Python | models/comboptnet.py | martius-lab/CombOptNet | d563d31a95dce35a365d50b81f932c27531ae09b | [
"MIT"
] | 46 | 2021-05-08T21:04:56.000Z | 2022-03-10T11:37:23.000Z | models/comboptnet.py | martius-lab/CombOptNet | d563d31a95dce35a365d50b81f932c27531ae09b | [
"MIT"
] | null | null | null | models/comboptnet.py | martius-lab/CombOptNet | d563d31a95dce35a365d50b81f932c27531ae09b | [
"MIT"
] | 7 | 2021-05-08T23:33:16.000Z | 2021-12-30T16:15:22.000Z | import warnings
import gurobipy as gp
import jax.numpy as jnp
import numpy as np
import torch
from gurobipy import GRB, quicksum
from jax import grad
from utils.comboptnet_utils import compute_delta_y, check_point_feasibility, softmin, \
signed_euclidean_distance_constraint_point, tensor_to_jax
from utils.utils i... | 56.6639 | 120 | 0.676333 |
32fdad643dd82cfe10f83f5e9f281b7bdb9e41b1 | 40,694 | py | Python | sympy/utilities/autowrap.py | clyring/sympy | 54d7726c182065fc25df69b5d1030e568931d82f | [
"BSD-3-Clause"
] | 3 | 2015-01-17T23:15:04.000Z | 2015-05-26T14:11:44.000Z | sympy/utilities/autowrap.py | clyring/sympy | 54d7726c182065fc25df69b5d1030e568931d82f | [
"BSD-3-Clause"
] | 1 | 2017-08-26T01:07:46.000Z | 2017-08-26T16:05:49.000Z | sympy/utilities/autowrap.py | leosartaj/sympy | 28d913d3cead6c5646307ffa6540b21d65059dfd | [
"BSD-3-Clause"
] | null | null | null | """Module for compiling codegen output, and wrap the binary for use in
python.
.. note:: To use the autowrap module it must first be imported
>>> from sympy.utilities.autowrap import autowrap
This module provides a common interface for different external backends, such
as f2py, fwrap, Cython, SWIG(?) etc. (Curren... | 36.793852 | 115 | 0.603111 |
f11fe096d3440dc44ebba93de62c649a59e23971 | 1,500 | py | Python | contributions_rnn/core/metrics.py | MinCiencia/ECQQ | f93a01ce2dd140d073bd81afb9b4733c1d8a34c3 | [
"CC0-1.0"
] | 4 | 2021-10-05T00:55:28.000Z | 2021-12-21T10:56:14.000Z | contributions_rnn/core/metrics.py | MinCiencia/ECQQ | f93a01ce2dd140d073bd81afb9b4733c1d8a34c3 | [
"CC0-1.0"
] | null | null | null | contributions_rnn/core/metrics.py | MinCiencia/ECQQ | f93a01ce2dd140d073bd81afb9b4733c1d8a34c3 | [
"CC0-1.0"
] | 1 | 2022-01-14T17:31:16.000Z | 2022-01-14T17:31:16.000Z | import tensorflow as tf
class MaskedACC(tf.keras.metrics.Metric):
def __init__(self, name="Accuracy", **kwargs):
super(MaskedACC, self).__init__(name=name, **kwargs)
self.acc_value = tf.constant(0.)
def update_state(self, y_true, y_pred, sample_weight=None):
real = tf.slice(y_tru... | 37.5 | 70 | 0.637333 |
54b62fb420ad4b077c6414d49daabaf80869b5f1 | 181 | py | Python | python/gdal_cookbook/cookbook_general/check_version.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/gdal_cookbook/cookbook_general/check_version.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/gdal_cookbook/cookbook_general/check_version.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import sys
from osgeo import gdal
version_num = int(gdal.VersionInfo('VERSION_NUM'))
if version_num < 1100000:
sys.exit('ERROR: Python bindings of GDAL 1.10 or later required') | 30.166667 | 69 | 0.762431 |
5f236e7f47e529efde878e275e891e7029b3da3f | 28,237 | py | Python | AnkleSegmentation/extract_data_deepLearning.py | Benjamin-Fouquet/dynMRI | c80b48cee834e2042e95241701ce064c22e3d3d1 | [
"CECILL-B"
] | 6 | 2017-11-23T13:02:43.000Z | 2021-06-23T03:26:10.000Z | AnkleSegmentation/extract_data_deepLearning.py | Benjamin-Fouquet/dynMRI | c80b48cee834e2042e95241701ce064c22e3d3d1 | [
"CECILL-B"
] | null | null | null | AnkleSegmentation/extract_data_deepLearning.py | Benjamin-Fouquet/dynMRI | c80b48cee834e2042e95241701ce064c22e3d3d1 | [
"CECILL-B"
] | 3 | 2019-10-21T16:00:24.000Z | 2021-06-16T08:45:12.000Z | import os
import sys
import numpy as np
from extract_PatchesSegmentationHR import get_hcp_2dpatches_SegmentationHR
from extract_Patches import get_hcp_2dpatches
from extract_slices import get_hcp_coupes2d
import argparse
import nibabel as nib
from joblib import dump
parser = argparse.ArgumentParser()
parser.add_argum... | 70.241294 | 179 | 0.571413 |
7c86d7967ac38697f069c1caf99de9ec998bc176 | 3,880 | py | Python | mxfusion/inference/prediction.py | JeremiasKnoblauch/MXFusion | af6223e9636b055d029d136dd7ae023b210b4560 | [
"Apache-2.0"
] | 2 | 2019-05-31T09:50:47.000Z | 2021-03-06T09:38:47.000Z | mxfusion/inference/prediction.py | JeremiasKnoblauch/MXFusion | af6223e9636b055d029d136dd7ae023b210b4560 | [
"Apache-2.0"
] | null | null | null | mxfusion/inference/prediction.py | JeremiasKnoblauch/MXFusion | af6223e9636b055d029d136dd7ae023b210b4560 | [
"Apache-2.0"
] | 1 | 2019-05-30T09:39:46.000Z | 2019-05-30T09:39:46.000Z | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in th... | 45.116279 | 119 | 0.605155 |
4eb47cb9f92cb6694a2511c91823ba69aff6c931 | 4,911 | py | Python | tests/SMB_RPC/test_mimilib.py | kamnsv/impacket | 83a581e4ba0cb3b7ba5dfa3018b87f9bf1a2cb58 | [
"Apache-1.1"
] | 6,612 | 2018-10-10T22:45:11.000Z | 2022-03-31T18:13:01.000Z | tests/SMB_RPC/test_mimilib.py | kamnsv/impacket | 83a581e4ba0cb3b7ba5dfa3018b87f9bf1a2cb58 | [
"Apache-1.1"
] | 703 | 2018-10-11T11:38:30.000Z | 2022-03-31T14:59:22.000Z | tests/SMB_RPC/test_mimilib.py | kamnsv/impacket | 83a581e4ba0cb3b7ba5dfa3018b87f9bf1a2cb58 | [
"Apache-1.1"
] | 2,172 | 2018-10-11T10:51:26.000Z | 2022-03-31T04:45:49.000Z | # Impacket - Collection of Python classes for working with network protocols.
#
# SECUREAUTH LABS. Copyright (C) 2021 SecureAuth Corporation. All rights reserved.
#
# This software is provided under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#... | 38.669291 | 111 | 0.653431 |
6c526ed491c8018ce9a5da553a94bca1d61a8201 | 3,071 | py | Python | test/integration/test_replicas.py | ssavrim/curator | 3ddfbb95ea7a164bb3f8c773b0392481f067da7c | [
"Apache-2.0"
] | 2,449 | 2015-03-11T05:04:13.000Z | 2022-03-30T11:24:31.000Z | test/integration/test_replicas.py | ssavrim/curator | 3ddfbb95ea7a164bb3f8c773b0392481f067da7c | [
"Apache-2.0"
] | 960 | 2015-03-10T20:58:11.000Z | 2022-03-24T15:26:40.000Z | test/integration/test_replicas.py | ssavrim/curator | 3ddfbb95ea7a164bb3f8c773b0392481f067da7c | [
"Apache-2.0"
] | 702 | 2015-03-11T09:35:39.000Z | 2022-03-28T06:22:59.000Z | import elasticsearch
import curator
import os
import json
import string, random, tempfile
import click
from click import testing as clicktest
from mock import patch, Mock
from . import CuratorTestCase
from . import testvars as testvars
import logging
logger = logging.getLogger(__name__)
host, port = os.environ.get('... | 34.897727 | 108 | 0.553566 |
4e1b06a2f38826287ed4340b53ea71fb9707d9af | 5,083 | py | Python | main.py | njfanxun/san | 120b76ade4a12ce5bde8821bf79ab1464673ce91 | [
"MIT"
] | null | null | null | main.py | njfanxun/san | 120b76ade4a12ce5bde8821bf79ab1464673ce91 | [
"MIT"
] | null | null | null | main.py | njfanxun/san | 120b76ade4a12ce5bde8821bf79ab1464673ce91 | [
"MIT"
] | null | null | null | import time
import cv2
import glob
import numpy
from PIL import Image
import os
import torch
from animegan import AnimeGANer
from torchvision.transforms.functional import to_tensor, to_pil_image
from basicsr.archs.rrdbnet_arch import RRDBNet
from realesrgan import RealESRGANer
from gfpgan import GFPGANer
import ssl
f... | 36.833333 | 118 | 0.641747 |
9e7b6692496d67549336e79d96f735c6f81273ca | 12,830 | py | Python | rvlyzer/rep/base.py | nessdoor/RVlyzer | 239beb63a4db1653261bc1cc59227ee2ddb77d1a | [
"MIT"
] | null | null | null | rvlyzer/rep/base.py | nessdoor/RVlyzer | 239beb63a4db1653261bc1cc59227ee2ddb77d1a | [
"MIT"
] | null | null | null | rvlyzer/rep/base.py | nessdoor/RVlyzer | 239beb63a4db1653261bc1cc59227ee2ddb77d1a | [
"MIT"
] | null | null | null | from enum import Enum
from typing import NamedTuple, Union, Iterator, Sequence, Optional, Mapping, Tuple
from BitVector import BitVector
from rep.instr_pretty_print import familystr
class Register(Enum):
"""An enumeration of the 32 unprivileged RISC-V integer registers."""
ZERO = 0
RA = 1
SP = 2
... | 40.345912 | 120 | 0.555729 |
667723e2e61b5779064ef15ed968a1b41c1589bc | 1,116 | py | Python | parlai/tasks/snli/build.py | zl930216/ParlAI | abf0ad6d1779af0f8ce0b5aed00d2bab71416684 | [
"MIT"
] | 9,228 | 2017-05-03T03:40:34.000Z | 2022-03-31T14:03:29.000Z | parlai/tasks/snli/build.py | zl930216/ParlAI | abf0ad6d1779af0f8ce0b5aed00d2bab71416684 | [
"MIT"
] | 2,660 | 2017-05-03T23:06:02.000Z | 2022-03-31T21:24:29.000Z | parlai/tasks/snli/build.py | zl930216/ParlAI | abf0ad6d1779af0f8ce0b5aed00d2bab71416684 | [
"MIT"
] | 2,058 | 2017-05-04T12:19:48.000Z | 2022-03-31T10:28:11.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
import parlai.core.build_data as build_data
from parlai.core.build_data import DownloadableFile
RESOURCES =... | 27.9 | 75 | 0.681004 |
90821a59c87967debb6eb604d4316780516b638d | 270 | py | Python | ecommerce/ordering/ordering/commands.py | NetstationPL/example_event_source_ecommerce | 67e673e91da4e24ff88d17e34e69a312da65b80d | [
"MIT"
] | null | null | null | ecommerce/ordering/ordering/commands.py | NetstationPL/example_event_source_ecommerce | 67e673e91da4e24ff88d17e34e69a312da65b80d | [
"MIT"
] | null | null | null | ecommerce/ordering/ordering/commands.py | NetstationPL/example_event_source_ecommerce | 67e673e91da4e24ff88d17e34e69a312da65b80d | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from uuid import UUID
from infra.command_bus import Command
@dataclass
class AddItemToBasket(Command):
order_id: UUID
product_id: UUID
@dataclass
class RemoveItemFromBasket(Command):
order_id: UUID
product_id: UUID
| 15.882353 | 37 | 0.777778 |
b9d73f2878aefb0b8b5976f0f7cae5654c0ef806 | 13,421 | py | Python | auxiliary/table3.py | huiren-j/Replication-of-Decarolis-2014- | 162fc0f60b067c88370922f901fac7fa17d78cd3 | [
"MIT"
] | null | null | null | auxiliary/table3.py | huiren-j/Replication-of-Decarolis-2014- | 162fc0f60b067c88370922f901fac7fa17d78cd3 | [
"MIT"
] | null | null | null | auxiliary/table3.py | huiren-j/Replication-of-Decarolis-2014- | 162fc0f60b067c88370922f901fac7fa17d78cd3 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from linearmodels import PanelOLS
import statsmodels.api as sm
import econtools as econ
import econtools.metrics as mt
import math
from statsmodels.stats.outliers_influence import variance_inflation_factor
from auxiliary.prepare import *
from auxil... | 37.488827 | 188 | 0.596081 |
e6ed961e5ac2ed3f40b63a905807d40ed663818a | 1,035 | py | Python | py_sys_test/ping_test/ping_http_test.py | interhui/py-sys | 5d0f8cf5421a5766ed66d78a5364a017cb38aa3a | [
"Apache-2.0"
] | 1 | 2016-03-23T10:25:57.000Z | 2016-03-23T10:25:57.000Z | py_sys_test/ping_test/ping_http_test.py | vicky-tan/py-sys | 5d0f8cf5421a5766ed66d78a5364a017cb38aa3a | [
"Apache-2.0"
] | null | null | null | py_sys_test/ping_test/ping_http_test.py | vicky-tan/py-sys | 5d0f8cf5421a5766ed66d78a5364a017cb38aa3a | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
import unittest
from py_sys.ping import ping_http
class Test(unittest.TestCase):
def test_ping_http(self):
p = ping_http.PingHTTP()
result = p.ping('http://www.baidu.com', 80, 1, 5)
for item in result:
self.assertEqual(item.get('result'), 'success')
... | 32.34375 | 62 | 0.562319 |
4a02be56e21466ad79d4febb5791cb1bacbd5c6b | 418 | py | Python | Python/7/HalvingSum/test_halving_sum.py | hwakabh/codewars | 7afce5a7424d35abc55c350301ac134f2d3edd3d | [
"MIT"
] | null | null | null | Python/7/HalvingSum/test_halving_sum.py | hwakabh/codewars | 7afce5a7424d35abc55c350301ac134f2d3edd3d | [
"MIT"
] | 6 | 2020-02-21T17:01:59.000Z | 2021-05-04T07:04:41.000Z | Python/7/HalvingSum/test_halving_sum.py | hwakabh/codewars | 7afce5a7424d35abc55c350301ac134f2d3edd3d | [
"MIT"
] | null | null | null | from unittest import TestCase
from unittest import main
from halving_sum import halving_sum
class TestHalvingSum(TestCase):
def test_halving_sum(self):
ptr = [
(25, 47),
(127, 247),
]
for inp, exp in ptr:
with self.subTest(inp=inp, exp=exp):
... | 20.9 | 57 | 0.595694 |
40c216a84ec5f7a617a6edb7abcd803ed6df3cd4 | 3,769 | py | Python | ovis/estimators/reinforce.py | vlievin/ovis | 71f05a5f5219b2df66a9cdbd5a5339e0e179597b | [
"MIT"
] | 10 | 2020-08-06T22:25:11.000Z | 2022-03-07T13:10:15.000Z | ovis/estimators/reinforce.py | vlievin/ovis | 71f05a5f5219b2df66a9cdbd5a5339e0e179597b | [
"MIT"
] | 2 | 2021-06-08T22:15:24.000Z | 2022-03-12T00:45:59.000Z | ovis/estimators/reinforce.py | vlievin/ovis | 71f05a5f5219b2df66a9cdbd5a5339e0e179597b | [
"MIT"
] | null | null | null | from .vi import *
class Reinforce(VariationalInference):
"""
The "Reinforce" or "score-function" gradient estimator. The gradients of the generative model are given by
* d L_K/ d\theta = \E_q(z_1, ... z_K | x) [ d/d\theta \log Z ]
The gradients of the inference network are given by:
* d L_K/ d... | 38.459184 | 123 | 0.613691 |
048261aaee48869e292aeef875d8422f3fbbac7f | 18,719 | py | Python | venv/lib/python2.7/site-packages/scipy/interpolate/tests/test_fitpack2.py | bopopescu/fbserver | e812dbc4dc0cbf2fda19473015a3d7e253718a19 | [
"Apache-2.0"
] | null | null | null | venv/lib/python2.7/site-packages/scipy/interpolate/tests/test_fitpack2.py | bopopescu/fbserver | e812dbc4dc0cbf2fda19473015a3d7e253718a19 | [
"Apache-2.0"
] | 5 | 2021-03-19T08:36:48.000Z | 2022-01-13T01:52:34.000Z | venv/lib/python2.7/site-packages/scipy/interpolate/tests/test_fitpack2.py | bopopescu/fbserver | e812dbc4dc0cbf2fda19473015a3d7e253718a19 | [
"Apache-2.0"
] | 1 | 2020-07-23T19:26:19.000Z | 2020-07-23T19:26:19.000Z | #!/usr/bin/env python
# Created by Pearu Peterson, June 2003
from __future__ import division, print_function, absolute_import
import warnings
import numpy as np
from numpy.testing import (assert_equal, assert_almost_equal, assert_array_equal,
assert_array_almost_equal, assert_allclose, assert_raises, TestCase... | 40.342672 | 98 | 0.527111 |
38bd31737fa51388073ef72f196c5c16f3636166 | 1,439 | py | Python | 2-Primitive_Triangle_Drawing/triangle_draw.py | ayengec/OpenGL_with_Python | 858748115aa02f8c7de0f79c2ef23990e00074b4 | [
"Unlicense"
] | null | null | null | 2-Primitive_Triangle_Drawing/triangle_draw.py | ayengec/OpenGL_with_Python | 858748115aa02f8c7de0f79c2ef23990e00074b4 | [
"Unlicense"
] | null | null | null | 2-Primitive_Triangle_Drawing/triangle_draw.py | ayengec/OpenGL_with_Python | 858748115aa02f8c7de0f79c2ef23990e00074b4 | [
"Unlicense"
] | null | null | null | # ayengec
# github OpenGL examples with python
# github.com/ayengec
from OpenGL.GL import *
from OpenGL.GLUT import *
from OpenGL.GLU import *
import math
def draw_circle():
glClear(GL_COLOR_BUFFER_BIT) # we declare which buffer we want to clear
glColor3f(1, 0.2, 0.3)
triangleAmount = 60 # 12
gl... | 37.868421 | 165 | 0.680334 |
883c7f93557946d88be80959cfbfe709aed727d1 | 7,436 | py | Python | Cython/TestUtils.py | matthew-brett/cython | f69ac182f690fb167259657a1c85d59298c66db4 | [
"Apache-2.0"
] | null | null | null | Cython/TestUtils.py | matthew-brett/cython | f69ac182f690fb167259657a1c85d59298c66db4 | [
"Apache-2.0"
] | null | null | null | Cython/TestUtils.py | matthew-brett/cython | f69ac182f690fb167259657a1c85d59298c66db4 | [
"Apache-2.0"
] | null | null | null | import Cython.Compiler.Errors as Errors
from Cython.CodeWriter import CodeWriter
from Cython.Compiler.TreeFragment import TreeFragment, strip_common_indent
from Cython.Compiler.Visitor import TreeVisitor, VisitorTransform
from Cython.Compiler import TreePath
import unittest
import os, sys
import tempfile
class NodeTy... | 38.329897 | 122 | 0.627353 |
06ca29493c2fbc30b27647829f93c61cec26f6e6 | 1,583 | py | Python | deepclustering/arch/classification/dummy.py | jizongFox/deep-clustering-toolbox | 0721cbbb278af027409ed4c115ccc743b6daed1b | [
"MIT"
] | 34 | 2019-08-05T03:48:36.000Z | 2022-03-29T03:04:51.000Z | deepclustering/arch/classification/dummy.py | jizongFox/deep-clustering-toolbox | 0721cbbb278af027409ed4c115ccc743b6daed1b | [
"MIT"
] | 10 | 2019-05-03T21:02:50.000Z | 2021-12-23T08:01:30.000Z | deepclustering/arch/classification/dummy.py | ETS-Research-Repositories/deep-clustering-toolbox | 0721cbbb278af027409ed4c115ccc743b6daed1b | [
"MIT"
] | 5 | 2019-09-29T07:56:03.000Z | 2021-04-22T12:08:50.000Z | from torch import nn
class PlaceholderNet(nn.Module):
def __init__(self):
super().__init__()
self.conv1 = nn.Conv2d(128, 256, 3)
self.avg_pool = nn.AdaptiveAvgPool2d((1, 1))
def forward(self, input):
return input
# return self.avg_pool(self.conv1(input))
class Dummy(... | 28.781818 | 69 | 0.566014 |
489df86fb6a01783d4751e05f1ff03ff98c0b0c4 | 7,277 | py | Python | projecthosting_upload.py | DanEble/git-cl | 34a69ef307845983c5c25dc8ae47436604f27bd6 | [
"BSD-3-Clause"
] | null | null | null | projecthosting_upload.py | DanEble/git-cl | 34a69ef307845983c5c25dc8ae47436604f27bd6 | [
"BSD-3-Clause"
] | 2 | 2018-06-01T16:56:45.000Z | 2019-11-03T11:25:15.000Z | projecthosting_upload.py | DanEble/git-cl | 34a69ef307845983c5c25dc8ae47436604f27bd6 | [
"BSD-3-Clause"
] | 2 | 2018-06-01T12:19:08.000Z | 2019-11-02T19:28:09.000Z | #!/usr/bin/env python
import sys
import re
import os.path
import allura_issues
# API docs:
# http://code.google.com/p/support/wiki/IssueTrackerAPIPython
import gdata.projecthosting.client
import gdata.projecthosting.data
import gdata.gauth
import gdata.client
import gdata.data
import atom.http_core
import atom.cor... | 36.567839 | 162 | 0.56232 |
64263d0911e289f0607f2feb1f29e06951af8f0c | 6,888 | py | Python | shapes_operator/tera_shape_export.py | MovingBlocks/BlenderAddon | 3a261ea12e62fa3dee500bc4ef487786be35e854 | [
"Apache-2.0"
] | 4 | 2018-10-13T07:58:34.000Z | 2020-10-12T19:36:27.000Z | shapes_operator/tera_shape_export.py | MovingBlocks/BlenderAddon | 3a261ea12e62fa3dee500bc4ef487786be35e854 | [
"Apache-2.0"
] | 2 | 2019-12-12T05:36:01.000Z | 2021-04-03T20:38:23.000Z | shapes_operator/tera_shape_export.py | MovingBlocks/BlenderAddon | 3a261ea12e62fa3dee500bc4ef487786be35e854 | [
"Apache-2.0"
] | 6 | 2018-09-27T15:51:46.000Z | 2021-03-21T09:23:37.000Z | import json
import re
from _ctypes import PyObj_FromPtr
import bpy
import bmesh
from bpy.props import BoolProperty, StringProperty
import bpy_extras.io_utils
import json
import datetime
import mathutils
class NoIndent(object):
""" Value wrapper. """
def __init__(self, value):
self.value = value
cla... | 37.846154 | 132 | 0.58072 |
425df296c4157089653a99e7f9b2274e453fcb1e | 8,761 | py | Python | src/environments/tests/test_permissions.py | nixplay/bullet-train-api | 608422d174443a4d9178d875ccaeb756a771e908 | [
"BSD-3-Clause"
] | null | null | null | src/environments/tests/test_permissions.py | nixplay/bullet-train-api | 608422d174443a4d9178d875ccaeb756a771e908 | [
"BSD-3-Clause"
] | null | null | null | src/environments/tests/test_permissions.py | nixplay/bullet-train-api | 608422d174443a4d9178d875ccaeb756a771e908 | [
"BSD-3-Clause"
] | null | null | null | from unittest import TestCase, mock
import pytest
from environments.models import Environment, UserEnvironmentPermission, Identity
from environments.permissions import EnvironmentPermissions, NestedEnvironmentPermissions
from organisations.models import Organisation, OrganisationRole
from projects.models import Proje... | 33.311787 | 109 | 0.687364 |
f9bf875b4df682b5402026590f9c6f2997947502 | 3,271 | py | Python | smartrecruiters_python_client/models/user_language.py | roksela/smartrecruiters-python-client | 6d0849d173a3d6718b5f0769098f4c76857f637d | [
"MIT"
] | 5 | 2018-03-27T08:20:13.000Z | 2022-03-30T06:23:38.000Z | smartrecruiters_python_client/models/user_language.py | roksela/smartrecruiters-python-client | 6d0849d173a3d6718b5f0769098f4c76857f637d | [
"MIT"
] | null | null | null | smartrecruiters_python_client/models/user_language.py | roksela/smartrecruiters-python-client | 6d0849d173a3d6718b5f0769098f4c76857f637d | [
"MIT"
] | 2 | 2018-12-05T04:48:37.000Z | 2020-12-17T12:12:12.000Z | # coding: utf-8
"""
Unofficial python library for the SmartRecruiters API
The SmartRecruiters API provides a platform to integrate services or applications, build apps and create fully customizable career sites. It exposes SmartRecruiters functionality and allows to connect and build software enhancing it.
... | 27.258333 | 237 | 0.551819 |
62dd0c7bc03335863348803abc9fad659f2058d7 | 163 | py | Python | mundo 1/030.py | thiagofreitascarneiro/Curso-de-Python---Curso-em-Video | 0342e482780b5a1c6f78cddd51d9bfad785c79fa | [
"MIT"
] | 1 | 2021-08-04T13:21:22.000Z | 2021-08-04T13:21:22.000Z | mundo 1/030.py | thiagofreitascarneiro/Curso-de-Python---Curso-em-Video | 0342e482780b5a1c6f78cddd51d9bfad785c79fa | [
"MIT"
] | null | null | null | mundo 1/030.py | thiagofreitascarneiro/Curso-de-Python---Curso-em-Video | 0342e482780b5a1c6f78cddd51d9bfad785c79fa | [
"MIT"
] | null | null | null | numero = int(input('Digite um numero qualquer:'))
resto = numero%2
if resto == 0:
print(f'O numero {numero} é par')
else:
print(f'numero {numero} é impar') | 27.166667 | 49 | 0.656442 |
28adb924e0a4b7d3aac0d7e3eb255bc448880322 | 1,248 | py | Python | felpy/model/core/detector_test.py | twguest/FELpy | 0ac9dd965b0d8e04dddbf2c9aef5ac137d1f0dfd | [
"Apache-2.0"
] | 1 | 2021-03-15T14:04:19.000Z | 2021-03-15T14:04:19.000Z | felpy/model/core/detector_test.py | twguest/FELpy | 0ac9dd965b0d8e04dddbf2c9aef5ac137d1f0dfd | [
"Apache-2.0"
] | 2 | 2021-11-27T11:55:48.000Z | 2021-11-27T11:56:26.000Z | felpy/model/core/detector_test.py | twguest/FELpy | 0ac9dd965b0d8e04dddbf2c9aef5ac137d1f0dfd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
hybrid wpg-felpy detector module
"""
from felpy.model.src.coherent import construct_SA1_pulse
from wpg.srwlib import SRWLDet
from felpy.model.core.beamline import Beamline
from felpy.model.tools import propagation_parameters
from wpg.optical_elements import Drift
class Detector:
... | 25.469388 | 113 | 0.581731 |
9e735a9c4f8ddadc263e85aefe937e45b87be438 | 502 | py | Python | scripts/quest/q31146e.py | Snewmy/swordie | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | [
"MIT"
] | 9 | 2021-04-26T11:59:29.000Z | 2021-12-20T13:15:27.000Z | scripts/quest/q31146e.py | Snewmy/swordie | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | [
"MIT"
] | null | null | null | scripts/quest/q31146e.py | Snewmy/swordie | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | [
"MIT"
] | 6 | 2021-07-14T06:32:05.000Z | 2022-02-06T02:32:56.000Z | # Knight Stronghold: Secret Grove
# Quest: Rescue Neinhart
NEINHEART = 2143001
sm.setSpeakerID(NEINHEART)
sm.completeQuest(parentID)
sm.sendNext("Thank you for saving me, but I'll remain here. My"
"\r\ndissapearance would only make things worse. Besides,"
"\r\nI should be able to do some good ... | 38.615385 | 70 | 0.693227 |
e47c507bd5833d6830b99476d5813a043db51ca5 | 8,359 | py | Python | test/functional/feature_proxy.py | orobio/gulden-official | a329faf163b15eabc7ff1d9f07ea87f66df8d27d | [
"MIT"
] | 158 | 2016-01-08T10:38:37.000Z | 2022-02-01T06:28:05.000Z | test/functional/feature_proxy.py | orobio/gulden-official | a329faf163b15eabc7ff1d9f07ea87f66df8d27d | [
"MIT"
] | 196 | 2015-11-19T10:59:24.000Z | 2021-10-07T14:52:13.000Z | test/functional/feature_proxy.py | orobio/gulden-official | a329faf163b15eabc7ff1d9f07ea87f66df8d27d | [
"MIT"
] | 71 | 2016-06-25T23:29:04.000Z | 2022-03-14T10:57:19.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test GuldenD with different proxy configuration.
Test plan:
- Start GuldenD's with different proxy con... | 41.381188 | 120 | 0.625793 |
73427622af9efa6dfcd351f236ffacb11bc2a1ad | 769 | py | Python | xcparse/Xcode/XCSchemeActions/BuildableReference.py | samdmarshall/xcparser | 4f78af149127325e60e3785b6e09d6dbfeedc799 | [
"BSD-3-Clause"
] | 59 | 2015-02-27T21:45:37.000Z | 2021-03-16T04:37:40.000Z | xcparse/Xcode/XCSchemeActions/BuildableReference.py | samdmarshall/xcparser | 4f78af149127325e60e3785b6e09d6dbfeedc799 | [
"BSD-3-Clause"
] | 14 | 2015-03-02T18:53:51.000Z | 2016-07-19T23:20:23.000Z | xcparse/Xcode/XCSchemeActions/BuildableReference.py | samdmarshall/xcparser | 4f78af149127325e60e3785b6e09d6dbfeedc799 | [
"BSD-3-Clause"
] | 8 | 2015-03-02T02:32:09.000Z | 2017-07-31T21:14:51.000Z | class BuildableReference(object):
def __init__(self, entry_item):
self.contents = entry_item;
if 'BuildableIdentifier' in self.contents.keys():
self.BuildableIdentifier = self.contents.get('BuildableIdentifier');
if 'BlueprintIdentifier' in self.contents.keys():
... | 54.928571 | 80 | 0.676203 |
562bba209bc481e62bf55b6e2a19a3688724c98f | 750 | py | Python | DPMailer/urls.py | dphans/DPMailer | 57a0f8575de01a9436b592e73c55d5fe108d6e4d | [
"MIT"
] | null | null | null | DPMailer/urls.py | dphans/DPMailer | 57a0f8575de01a9436b592e73c55d5fe108d6e4d | [
"MIT"
] | null | null | null | DPMailer/urls.py | dphans/DPMailer | 57a0f8575de01a9436b592e73c55d5fe108d6e4d | [
"MIT"
] | null | null | null | """DPMailer URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-base... | 34.090909 | 77 | 0.709333 |
a6e567ec0aa94f1cf11bc0209b1a5723996f1c91 | 4,857 | py | Python | config.py | Potapov-AA/CaesarCipherWithKeyword | 4bd520418254b56950be079d0fce638039d4e202 | [
"MIT"
] | null | null | null | config.py | Potapov-AA/CaesarCipherWithKeyword | 4bd520418254b56950be079d0fce638039d4e202 | [
"MIT"
] | null | null | null | config.py | Potapov-AA/CaesarCipherWithKeyword | 4bd520418254b56950be079d0fce638039d4e202 | [
"MIT"
] | null | null | null | import re
import time
class CONFIG(object):
# Доступные алфавиты для шифрования
alphaList_En = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
alphaList_Ru = list("АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ")
alphaList = object
new_alphaList = object
def __init__(self, choseAlphaList:str, numberKey:str, stringKey:... | 41.87069 | 112 | 0.536133 |
dd3274f33c094c7609cba4708c90907b4788a7d2 | 1,282 | py | Python | Search_DnaA_trios/11_score_trio.py | DongMeiJing/DnaA-trios | 573c8664515989c2f1f53b7fcc1c3fb928aadbce | [
"Apache-2.0"
] | null | null | null | Search_DnaA_trios/11_score_trio.py | DongMeiJing/DnaA-trios | 573c8664515989c2f1f53b7fcc1c3fb928aadbce | [
"Apache-2.0"
] | null | null | null | Search_DnaA_trios/11_score_trio.py | DongMeiJing/DnaA-trios | 573c8664515989c2f1f53b7fcc1c3fb928aadbce | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import re
def get_trio_score(trio_list):
GAT_list = ['GAT']
AAT_list = ['AAT']
GAX = re.compile('.AT|GA.')
XAX = re.compile('.A.')
trio_list_new = []
for each_trio in trio_list:
trio_list_new.append(each_trio.upper())
score = 0
for each_trio_u... | 27.869565 | 60 | 0.570983 |
42e1582169c7d4c7b3d026289c4923d7131bb5cb | 247 | py | Python | Hackerrank_python/7.collections/59.Word Order.py | manish1822510059/Hackerrank | 7c6e4553f033f067e04dc6c756ef90cb43f3c4a8 | [
"MIT"
] | 39 | 2020-09-27T05:32:05.000Z | 2022-01-08T18:04:05.000Z | Hackerrank_python/7.collections/59.Word Order.py | manish1822510059/Hackerrank | 7c6e4553f033f067e04dc6c756ef90cb43f3c4a8 | [
"MIT"
] | 5 | 2020-10-02T13:33:00.000Z | 2021-03-01T14:06:08.000Z | Hackerrank_python/7.collections/59.Word Order.py | manish1822510059/Hackerrank | 7c6e4553f033f067e04dc6c756ef90cb43f3c4a8 | [
"MIT"
] | 6 | 2020-10-03T04:04:55.000Z | 2021-10-18T04:07:53.000Z | # Enter your code here. Read input from STDIN. Print output to STDOUT
from collections import*
d={}
for i in range(int(input())):
word=input()
if word in d:
d[word]+=1
else:
d[word]=1
print(len(d))
print(*d.values())
| 20.583333 | 69 | 0.607287 |
2da6c1383904273290f5323bbd117e28f5c75558 | 304 | py | Python | exercises/level_1/basic_exercises/common_list.py | eliranM98/python_course | d9431dd6c0f27fca8ca052cc2a821ed0b883136c | [
"MIT"
] | 6 | 2019-03-29T06:14:53.000Z | 2021-10-15T23:42:36.000Z | exercises/level_1/basic_exercises/common_list.py | eliranM98/python_course | d9431dd6c0f27fca8ca052cc2a821ed0b883136c | [
"MIT"
] | 4 | 2019-09-06T10:03:40.000Z | 2022-03-11T23:30:55.000Z | exercises/level_1/basic_exercises/common_list.py | eliranM98/python_course | d9431dd6c0f27fca8ca052cc2a821ed0b883136c | [
"MIT"
] | 12 | 2019-06-20T19:34:52.000Z | 2021-10-15T23:42:39.000Z | a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
def intersect(a, b):
# the & is for intersection, which will take the common between the two
return list(set(a) & set(b))
def main():
print(intersect(a, b))
if __name__ == "__main__":
main()
| 19 | 75 | 0.549342 |
010839aeddb6fc580438c259bcecbea9c1b0722e | 1,215 | py | Python | chromewhip/protocol/testing.py | spinda/chromewhip | 4c8089441f0767b91840abf6a076e9f65c83bdbc | [
"MIT"
] | 97 | 2017-07-22T13:12:36.000Z | 2021-03-20T04:03:27.000Z | chromewhip/protocol/testing.py | spinda/chromewhip | 4c8089441f0767b91840abf6a076e9f65c83bdbc | [
"MIT"
] | 15 | 2017-07-20T06:33:01.000Z | 2020-11-06T15:36:18.000Z | chromewhip/protocol/testing.py | spinda/chromewhip | 4c8089441f0767b91840abf6a076e9f65c83bdbc | [
"MIT"
] | 12 | 2017-11-30T17:46:53.000Z | 2020-10-01T17:57:19.000Z | # noinspection PyPep8
# noinspection PyArgumentList
"""
AUTO-GENERATED BY `scripts/generate_protocol.py` using `data/browser_protocol.json`
and `data/js_protocol.json` as inputs! Please do not modify this file.
"""
import logging
from typing import Any, Optional, Union
from chromewhip.helpers import PayloadMixin, Ba... | 30.375 | 121 | 0.624691 |
8ef81ece736059954ef295510f8431484ff32496 | 2,588 | py | Python | lib/train_utils/lr_scheduler.py | pigtamer/SNIPER | 95a4c773a6e855290504932fb43adeb39f029239 | [
"Apache-2.0"
] | 2,722 | 2018-06-18T10:01:29.000Z | 2022-03-12T09:46:06.000Z | lib/train_utils/lr_scheduler.py | qijiezhao/SNIPER | 714e7399bee1e85854b3895ecaef7b143562eab4 | [
"Apache-2.0"
] | 184 | 2018-06-18T11:35:54.000Z | 2021-10-19T11:31:56.000Z | lib/train_utils/lr_scheduler.py | qijiezhao/SNIPER | 714e7399bee1e85854b3895ecaef7b143562eab4 | [
"Apache-2.0"
] | 486 | 2018-06-18T08:55:24.000Z | 2022-02-21T15:51:39.000Z | # ---------------------------------------------------------------
# SNIPER: Efficient Multi-scale Training
# Licensed under The Apache-2.0 License [see LICENSE for details]
# Modified from https://github.com/msracver/Deformable-ConvNets
# Modified by Mahyar Najibi
# -----------------------------------------------------... | 38.626866 | 96 | 0.586553 |
c0a642f94fcfb05adb17c23b07306366a7a3f551 | 2,678 | py | Python | uvicore/auth/authenticators/base.py | coboyoshi/uvicore | 9cfdeeac83000b156fe48f068b4658edaf51c8de | [
"MIT"
] | null | null | null | uvicore/auth/authenticators/base.py | coboyoshi/uvicore | 9cfdeeac83000b156fe48f068b4658edaf51c8de | [
"MIT"
] | null | null | null | uvicore/auth/authenticators/base.py | coboyoshi/uvicore | 9cfdeeac83000b156fe48f068b4658edaf51c8de | [
"MIT"
] | null | null | null | import uvicore
from uvicore.support import module
from uvicore.support.dumper import dump, dd
from uvicore.http.request import HTTPConnection
from uvicore.contracts import UserInfo, UserProvider
from uvicore.typing import Dict, Optional, List, Tuple
from uvicore.contracts import Authenticator as AuthenticatorInterface
... | 38.811594 | 137 | 0.682599 |
e566b8659222e70ecab14b44a81f31b8d5799266 | 2,123 | py | Python | data/build.py | lbl123456/TMPcode | 2601653bd6fe3e26d65e48b82f41fd4f07026f2c | [
"BSD-2-Clause"
] | null | null | null | data/build.py | lbl123456/TMPcode | 2601653bd6fe3e26d65e48b82f41fd4f07026f2c | [
"BSD-2-Clause"
] | null | null | null | data/build.py | lbl123456/TMPcode | 2601653bd6fe3e26d65e48b82f41fd4f07026f2c | [
"BSD-2-Clause"
] | null | null | null | # encoding: utf-8
"""
@author: liaoxingyu
@contact: sherlockliao01@gmail.com
"""
from torch.utils.data import DataLoader
from .collate_batch import train_collate_fn, val_collate_fn
from .datasets import init_dataset, ImageDataset
from .samplers import RandomIdentitySampler, RandomIdentitySampler_alignedreid # New a... | 40.826923 | 121 | 0.729628 |
7375f9fc55ee30b43cc1173f38b34b8fa3df6fc8 | 389 | py | Python | first_steps/cup.py | lowrybg/PythonOOP | 1ef5023ca76645d5d96b8c4fb9a54d0f431a1947 | [
"MIT"
] | null | null | null | first_steps/cup.py | lowrybg/PythonOOP | 1ef5023ca76645d5d96b8c4fb9a54d0f431a1947 | [
"MIT"
] | null | null | null | first_steps/cup.py | lowrybg/PythonOOP | 1ef5023ca76645d5d96b8c4fb9a54d0f431a1947 | [
"MIT"
] | null | null | null | class Cup:
def __init__(self, size: int, quantity: int):
self.size = size
self.quantity = quantity
def fill(self, amount: int):
if self.quantity + amount <= self.size:
self.quantity += amount
def status(self):
return self.size - self.quantity
cup = Cup(100, 5... | 19.45 | 49 | 0.604113 |
326228677d9b718174cd9d8dc39f5a1e724ba838 | 7,150 | py | Python | tracer/atlas_loader.py | pbotros/TRACER | 269e17ca27fe0fb78c30484d8685d119caab5dbb | [
"MIT"
] | null | null | null | tracer/atlas_loader.py | pbotros/TRACER | 269e17ca27fe0fb78c30484d8685d119caab5dbb | [
"MIT"
] | null | null | null | tracer/atlas_loader.py | pbotros/TRACER | 269e17ca27fe0fb78c30484d8685d119caab5dbb | [
"MIT"
] | null | null | null | import os
import cv2
import nibabel as nib
import numpy as np
def readlabel(file):
"""
Purpose
-------------
Read the atlas label file.
Inputs
-------------
file :
Outputs
-------------
A list contains ...
"""
output_index = []
output_names = []
output_color... | 39.502762 | 182 | 0.623357 |
10cd692317be324589abaff1df9fe37b36858228 | 1,015 | py | Python | tests/test_reuters_news.py | chakki-works/chazutsu | 811dedb19e3d670011da3679dc3befe4f1f2c41c | [
"Apache-2.0"
] | 250 | 2017-05-12T07:48:04.000Z | 2022-03-08T02:14:26.000Z | tests/test_reuters_news.py | chakki-works/chazutsu | 811dedb19e3d670011da3679dc3befe4f1f2c41c | [
"Apache-2.0"
] | 10 | 2017-05-26T09:14:59.000Z | 2021-11-15T21:31:20.000Z | tests/test_reuters_news.py | chakki-works/chazutsu | 811dedb19e3d670011da3679dc3befe4f1f2c41c | [
"Apache-2.0"
] | 28 | 2017-05-16T12:58:15.000Z | 2021-10-05T05:26:13.000Z | import os
import sys
import shutil
import unittest
sys.path.append(os.path.join(os.path.dirname(__file__), "../"))
import chazutsu.datasets
from tests.dataset_base_test import DatasetTestCase
class TestReutersNews(DatasetTestCase):
def test_topics(self):
r = chazutsu.datasets.ReutersNews(kind="topics").... | 29.852941 | 102 | 0.6867 |
27c48f44db34a98db0d35c51bb7992e234589057 | 2,631 | py | Python | examples/testing.py | edblancas/ploomber | f9cec77ba8e69cc13a238cf917914c1f19f37bd3 | [
"Apache-2.0"
] | null | null | null | examples/testing.py | edblancas/ploomber | f9cec77ba8e69cc13a238cf917914c1f19f37bd3 | [
"Apache-2.0"
] | null | null | null | examples/testing.py | edblancas/ploomber | f9cec77ba8e69cc13a238cf917914c1f19f37bd3 | [
"Apache-2.0"
] | null | null | null | """
Acceptance tests
================
Testing is crucial for any data pipeline. Raw data comes from sources where
developers have no control over. Raw data inconsistencies are a common source
for bugs in data pipelines (e.g. a unusual high proportion of NAs in certain
column), but to make progress, a developer must ma... | 31.321429 | 79 | 0.580768 |
589945c511ff83b1014df28cd0f69d03c4af97aa | 47,423 | py | Python | mesonbuild/linkers.py | monwarez/meson | 63814543de6f46fc8aee7d3884a8746c968806ca | [
"Apache-2.0"
] | 1 | 2020-10-22T05:33:27.000Z | 2020-10-22T05:33:27.000Z | mesonbuild/linkers.py | monwarez/meson | 63814543de6f46fc8aee7d3884a8746c968806ca | [
"Apache-2.0"
] | null | null | null | mesonbuild/linkers.py | monwarez/meson | 63814543de6f46fc8aee7d3884a8746c968806ca | [
"Apache-2.0"
] | 1 | 2020-12-07T15:37:35.000Z | 2020-12-07T15:37:35.000Z | # Copyright 2012-2017 The Meson development 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.0
# Unless required by applicable law or agree... | 35.28497 | 110 | 0.618645 |
02b07f6484b8331ff818e0241489e9c5c0989cb0 | 2,430 | py | Python | homework/course_design_17231039/keywords.py | hiyouga/PY-Learning | 296f08e7964845c314874906039f244010d5422a | [
"MIT"
] | 2 | 2017-12-09T14:41:29.000Z | 2017-12-27T11:12:16.000Z | homework/course_design_17231039/keywords.py | hiyouga/PY-Learning | 296f08e7964845c314874906039f244010d5422a | [
"MIT"
] | null | null | null | homework/course_design_17231039/keywords.py | hiyouga/PY-Learning | 296f08e7964845c314874906039f244010d5422a | [
"MIT"
] | null | null | null | import json
import jieba
import pickle
from gensim.models import LdaModel, TfidfModel
from gensim.corpora import Dictionary
from wordcloud import WordCloud
with open('pagerank.json', 'r') as f:
pages = json.loads(f.read())
f.close()
pagelist = list(pages.keys())
contents = []
word_stats = {}
def std_fn(s):
... | 31.558442 | 111 | 0.647737 |
4d54920d691e7df4343b9938e59d8be1c591af2c | 22,629 | py | Python | adles/vsphere/vsphere_class.py | devAmoghS/ADLES | bcfd5bc16c6222153ba56438a735ebb707a2b512 | [
"Apache-2.0"
] | null | null | null | adles/vsphere/vsphere_class.py | devAmoghS/ADLES | bcfd5bc16c6222153ba56438a735ebb707a2b512 | [
"Apache-2.0"
] | null | null | null | adles/vsphere/vsphere_class.py | devAmoghS/ADLES | bcfd5bc16c6222153ba56438a735ebb707a2b512 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# 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, softwa... | 41.445055 | 80 | 0.592602 |
68c0d3ad84ba9f681f2ded0e4517bd7ea420cab7 | 2,386 | py | Python | platform-tools/systrace/catapult/devil/devil/android/crash_handler_devicetest.py | NBPS-Robotics/FTC-Code-Team-9987---2022 | 180538f3ebd234635fa88f96ae7cf7441df6a246 | [
"MIT"
] | 7 | 2021-06-02T06:55:50.000Z | 2022-03-29T10:32:33.000Z | platform-tools/systrace/catapult/devil/devil/android/crash_handler_devicetest.py | NBPS-Robotics/FTC-Code-Team-9987---2022 | 180538f3ebd234635fa88f96ae7cf7441df6a246 | [
"MIT"
] | 7 | 2020-07-19T11:24:45.000Z | 2022-03-02T07:11:57.000Z | platform-tools/systrace/catapult/devil/devil/android/crash_handler_devicetest.py | NBPS-Robotics/FTC-Code-Team-9987---2022 | 180538f3ebd234635fa88f96ae7cf7441df6a246 | [
"MIT"
] | 1 | 2020-07-24T18:22:03.000Z | 2020-07-24T18:22:03.000Z | #!/usr/bin/env python
# Copyright 2017 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 os
import sys
import unittest
if __name__ == '__main__':
sys.path.append(
os.path.abspath(os.path.join(
os.pa... | 29.825 | 80 | 0.648365 |
f7591892a21c17f2024fa7e993cd4a2d0221fef7 | 4,016 | py | Python | tests/test_manage.py | james-portman/openstack-ansible | 882d98c94b6e429dec9d66d26722ed457e3b18b9 | [
"Apache-2.0"
] | null | null | null | tests/test_manage.py | james-portman/openstack-ansible | 882d98c94b6e429dec9d66d26722ed457e3b18b9 | [
"Apache-2.0"
] | null | null | null | tests/test_manage.py | james-portman/openstack-ansible | 882d98c94b6e429dec9d66d26722ed457e3b18b9 | [
"Apache-2.0"
] | 1 | 2018-05-21T18:41:51.000Z | 2018-05-21T18:41:51.000Z | #!/usr/bin/env python
# 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... | 31.622047 | 75 | 0.668327 |
95151cffb0e4f65d38105df09f0a846878331493 | 27,244 | py | Python | test/functional/rpc_psbt.py | CounosH/cch | 880f3890127951cba9f6b235193d8c9a9536e075 | [
"MIT"
] | null | null | null | test/functional/rpc_psbt.py | CounosH/cch | 880f3890127951cba9f6b235193d8c9a9536e075 | [
"MIT"
] | null | null | null | test/functional/rpc_psbt.py | CounosH/cch | 880f3890127951cba9f6b235193d8c9a9536e075 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2018-2019 The CounosH Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the Partially Signed Transaction RPCs.
"""
from decimal import Decimal
from test_framework.test_f... | 58.969697 | 575 | 0.680517 |
b874c715857f8ddc79a8fa68e842882e04784650 | 7,999 | py | Python | backwardcompatibilityml/widgets/model_comparison/model_comparison.py | microsoft/BackwardCompatibilityML | 5910e485453f07fd5c85114d15c423c5db521122 | [
"MIT"
] | 54 | 2020-09-11T18:36:59.000Z | 2022-03-29T00:47:55.000Z | backwardcompatibilityml/widgets/model_comparison/model_comparison.py | microsoft/BackwardCompatibilityML | 5910e485453f07fd5c85114d15c423c5db521122 | [
"MIT"
] | 115 | 2020-10-08T16:55:34.000Z | 2022-03-12T00:50:21.000Z | backwardcompatibilityml/widgets/model_comparison/model_comparison.py | microsoft/BackwardCompatibilityML | 5910e485453f07fd5c85114d15c423c5db521122 | [
"MIT"
] | 11 | 2020-10-04T09:40:11.000Z | 2021-12-21T21:03:33.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import json
import pkg_resources
from jinja2 import Template
from IPython.display import (
display,
HTML
)
import torch.optim as optim
from flask import Response
from backwardcompatibilityml import loss
from backwardcompatibilityml.compar... | 40.39899 | 179 | 0.682835 |
29f1ad99ae00509442ea3babf5d07a9d4e1cf5a3 | 305 | py | Python | 2017/11/midterms-senate-seats-20171107/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2017/11/midterms-senate-seats-20171107/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2017/11/midterms-senate-seats-20171107/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | #!/usr/bin/env python
import base_filters
COPY_GOOGLE_DOC_KEY = '10Bcz3dUqr893Q19IF3sFrOKh1jjcJYy7AOzbtf-XRCQ'
USE_ASSETS = False
# Use these variables to override the default cache timeouts for this graphic
# DEFAULT_MAX_AGE = 20
# ASSETS_MAX_AGE = 300
JINJA_FILTER_FUNCTIONS = base_filters.FILTERS
| 21.785714 | 77 | 0.816393 |
2c56f19b2e9af0619aedfc2f338375537b227bb3 | 9,981 | py | Python | coder/blueprints/billing/gateways/stripecom.py | mikkokotila/coder-1 | c0462fb63bd23d4367a31f86f9c7f29b1ece93bd | [
"MIT"
] | 1 | 2019-03-11T12:44:33.000Z | 2019-03-11T12:44:33.000Z | coder/blueprints/billing/gateways/stripecom.py | mikkokotila/coder-1 | c0462fb63bd23d4367a31f86f9c7f29b1ece93bd | [
"MIT"
] | 1 | 2019-01-02T09:52:17.000Z | 2019-01-02T09:52:17.000Z | coder/blueprints/billing/gateways/stripecom.py | mikkokotila/coder-1 | c0462fb63bd23d4367a31f86f9c7f29b1ece93bd | [
"MIT"
] | 1 | 2019-01-04T12:44:50.000Z | 2019-01-04T12:44:50.000Z | import stripe
class Event(object):
@classmethod
def retrieve(cls, event_id):
"""
Retrieve an event, this is used to validate the event in attempt to
protect us from potentially malicious events not sent from Stripe.
API Documentation:
https://stripe.com/docs/api#retr... | 29.617211 | 79 | 0.574992 |
873f5dfcaf6da97e7b73067d8813c31fa94f21fa | 12,072 | py | Python | CMW7 Generic/5130_irf-config.py | manpowertw/leafspine-ops | 59309bed802e6d11c7c801f893adfd9b188222b6 | [
"Apache-2.0"
] | 32 | 2016-05-24T23:32:02.000Z | 2021-11-17T07:53:50.000Z | CMW7 Generic/5130_irf-config.py | manpowertw/leafspine-ops | 59309bed802e6d11c7c801f893adfd9b188222b6 | [
"Apache-2.0"
] | 5 | 2016-09-25T15:55:02.000Z | 2018-09-06T10:54:45.000Z | CMW7 Generic/5130_irf-config.py | manpowertw/leafspine-ops | 59309bed802e6d11c7c801f893adfd9b188222b6 | [
"Apache-2.0"
] | 34 | 2016-03-02T17:37:07.000Z | 2021-11-17T07:54:04.000Z |
__author__ = 'Remi Batist / AXEZ ICT Solutions'
__version__ = '2.3'
__comments__= 'remi.batist@axez.nl'
### Deploying (IRF-)(iMC-)config and software on HP5130 24/48 Ports PoE Switches #########
### Support for models JG936A & JG937A
### version 1.0: first release (support for 6 members)
### version 1.1:... | 38.941935 | 177 | 0.64952 |
bdd37c99df0a835565ebae80b9bd1c5d4d52c702 | 114,968 | py | Python | python/pyspark/ml/classification.py | adamtobey/spark | 20cd47e82d7d84516455df960ededbd647694aa5 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2020-07-01T04:44:36.000Z | 2020-07-01T04:44:36.000Z | python/pyspark/ml/classification.py | adamtobey/spark | 20cd47e82d7d84516455df960ededbd647694aa5 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2017-03-10T03:47:48.000Z | 2020-06-29T00:02:52.000Z | python/pyspark/ml/classification.py | adamtobey/spark | 20cd47e82d7d84516455df960ededbd647694aa5 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 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 us... | 35.793275 | 100 | 0.612249 |
370f72a6b657dc7012dddc8539a629bcd299794e | 2,922 | py | Python | Virtual2038.py | Furcht968/Virtual2038 | 9348cec6288e0095ff535b35422d2c493802c8c6 | [
"MIT"
] | null | null | null | Virtual2038.py | Furcht968/Virtual2038 | 9348cec6288e0095ff535b35422d2c493802c8c6 | [
"MIT"
] | null | null | null | Virtual2038.py | Furcht968/Virtual2038 | 9348cec6288e0095ff535b35422d2c493802c8c6 | [
"MIT"
] | null | null | null | # *****************************************
#
# Virtual2038 - Virtual 2038 Problem Python Software
#
#
# Copyright (c) 2020 Furcht968
# Released under the MIT license
# https://github.com/Furcht968/Virtual2038/blob/master/License/LICENSE.txt
# https://github.com/Furcht968/Virtual2038/blob/master/License/LICENSE_jp.txt
... | 32.466667 | 77 | 0.569815 |
7647170de4ab0620c4d214cce6a5af57a95dc128 | 5,605 | py | Python | backend/modules/aux_fn_ML.py | alexp25/d4w_app_lab | df40e32f524bba8a726ffe788cfb932b45c32f25 | [
"MIT"
] | null | null | null | backend/modules/aux_fn_ML.py | alexp25/d4w_app_lab | df40e32f524bba8a726ffe788cfb932b45c32f25 | [
"MIT"
] | null | null | null | backend/modules/aux_fn_ML.py | alexp25/d4w_app_lab | df40e32f524bba8a726ffe788cfb932b45c32f25 | [
"MIT"
] | null | null | null | from modules.aux_fn import *
import copy
import scipy
# from sklearn.metrics import classification_report
from sklearn.metrics.pairwise import pairwise_distances_argmin
from sklearn.metrics import silhouette_samples, silhouette_score
from sklearn.cluster import KMeans
def run_dual_clustering_on_node_range(data... | 34.813665 | 113 | 0.65388 |
d1f1451e43947337be833bec0d732fb722ebb211 | 18,908 | py | Python | tests/regressiontests/aggregation_regress/models.py | mrts2/django | 973cf20260cb90b42b0c97d6fe80c988b539ed89 | [
"BSD-3-Clause"
] | 1 | 2016-05-09T13:27:14.000Z | 2016-05-09T13:27:14.000Z | tests/regressiontests/aggregation_regress/models.py | mrts2/django | 973cf20260cb90b42b0c97d6fe80c988b539ed89 | [
"BSD-3-Clause"
] | null | null | null | tests/regressiontests/aggregation_regress/models.py | mrts2/django | 973cf20260cb90b42b0c97d6fe80c988b539ed89 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
import pickle
from django.db import models
from django.conf import settings
try:
sorted
except NameError:
from django.utils.itercompat import sorted # For Python 2.3
class Author(models.Model):
name = models.CharField(max_length=100)
age = models.IntegerField()
friends = mode... | 51.241192 | 382 | 0.708642 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.