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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d23db691c2ade716dad0266ae74681b704dc341c | 625 | py | Python | src/genie/libs/parser/__init__.py | komurzak-cisco/genieparser | e6cd6bb133bab7260b2b82da198fd14a4dec66c7 | [
"Apache-2.0"
] | 1 | 2021-07-26T02:56:27.000Z | 2021-07-26T02:56:27.000Z | src/genie/libs/parser/__init__.py | zhangineer/genieparser | d6abcb49bf6d39092d835d9490d817452920ae98 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/__init__.py | zhangineer/genieparser | d6abcb49bf6d39092d835d9490d817452920ae98 | [
"Apache-2.0"
] | null | null | null | '''
Module:
genie.libs.parser
Description:
This is the library sub-component of Genie for `genie.metaparser`.
'''
# metadata
__version__ = '21.7'
__author__ = 'Cisco Systems Inc.'
__contact__ = ['pyats-support@cisco.com', 'pyats-support-ext@cisco.com']
__copyright__ = 'Copyright (c) 2018, Cis... | 24.038462 | 74 | 0.664 |
b55ec9989540235d6ea6218774ddc6e2db08cf80 | 6,403 | py | Python | rlddpg.py | leopd/jasrlp | 4ebc0a91bd0a5533aeb9b2d136612c862ec8f6a8 | [
"MIT"
] | 2 | 2019-12-02T04:32:36.000Z | 2019-12-03T03:17:40.000Z | rlddpg.py | leopd/jasrlp | 4ebc0a91bd0a5533aeb9b2d136612c862ec8f6a8 | [
"MIT"
] | null | null | null | rlddpg.py | leopd/jasrlp | 4ebc0a91bd0a5533aeb9b2d136612c862ec8f6a8 | [
"MIT"
] | null | null | null | import copy
from collections import deque
import gym
import numpy as np
import random
import time
import torch
from torch import Tensor
import torch.nn as nn
import torch.nn.functional as F
import warnings
from timebudget import timebudget
timebudget.set_quiet()
from typing import List, Union, NamedTuple, Tuple
from... | 35.572222 | 116 | 0.63033 |
4d89ec84debcfc8e50672b519ef72bf431523046 | 3,674 | py | Python | forum/board/tests/test_models.py | RealMadJack/forum | a0b3a22303d853a7ddba48d647d851e0f12e61ff | [
"MIT"
] | null | null | null | forum/board/tests/test_models.py | RealMadJack/forum | a0b3a22303d853a7ddba48d647d851e0f12e61ff | [
"MIT"
] | null | null | null | forum/board/tests/test_models.py | RealMadJack/forum | a0b3a22303d853a7ddba48d647d851e0f12e61ff | [
"MIT"
] | null | null | null | from django.urls import reverse
from test_plus.test import TestCase
from ..models import Board, Category, Topic, Post
class TestBoard(TestCase):
def setUp(self):
self.board = Board(name='test board')
self.board.save()
self.board1 = Board(name='test board')
self.board1.save()
... | 33.706422 | 116 | 0.646707 |
629c62c27d9c1442051f571a38f69509a18ce948 | 18,476 | py | Python | libs/applibs/compendium/c15sports.py | olom70/kutpMD | 2502ce151a0170504b7aa9581d081c755848f060 | [
"MIT"
] | null | null | null | libs/applibs/compendium/c15sports.py | olom70/kutpMD | 2502ce151a0170504b7aa9581d081c755848f060 | [
"MIT"
] | 4 | 2021-06-08T21:33:38.000Z | 2022-03-12T00:29:28.000Z | libs/applibs/compendium/c15sports.py | olom70/kutpMD | 2502ce151a0170504b7aa9581d081c755848f060 | [
"MIT"
] | null | null | null | import os
import sys
import libs.applibs.compendium.abstractcompendium as abstractcompendium
class Sports(abstractcompendium.Compendium):
def __init__(self):
super().__init__()
self.metValue = {15000 : 5.5
,15010 : 4.3
,15020 : 7.0
,15030 : 5.5
,... | 47.253197 | 194 | 0.529985 |
fc1fe3bdbf93bb70bac8c38ec56efa40380bb2d8 | 283 | py | Python | ckan/migration/versions/053_add_group_logo.py | okfde/ckankrzn | df4c1ed624f6751ac2a8f03527ff19e448d27dfb | [
"Apache-2.0"
] | 4 | 2017-06-12T15:18:30.000Z | 2019-10-11T15:12:43.000Z | ckan/migration/versions/053_add_group_logo.py | okfde/ckankrzn | df4c1ed624f6751ac2a8f03527ff19e448d27dfb | [
"Apache-2.0"
] | 64 | 2017-05-14T22:15:53.000Z | 2020-03-08T15:26:49.000Z | ckan/migration/versions/053_add_group_logo.py | okfde/ckankrzn | df4c1ed624f6751ac2a8f03527ff19e448d27dfb | [
"Apache-2.0"
] | 5 | 2017-04-06T21:18:38.000Z | 2020-03-30T17:05:23.000Z | # encoding: utf-8
from sqlalchemy import *
from migrate import *
def upgrade(migrate_engine):
migrate_engine.execute('''
ALTER TABLE "group"
ADD COLUMN image_url text;
ALTER TABLE group_revision
ADD COLUMN image_url text;
'''
)
| 18.866667 | 38 | 0.625442 |
bdf83d41ca1d3d5df8a5e021fb3c673d2b642aa3 | 2,872 | py | Python | data/test/python/bdf83d41ca1d3d5df8a5e021fb3c673d2b642aa3__init__.py | harshp8l/deep-learning-lang-detection | 2a54293181c1c2b1a2b840ddee4d4d80177efb33 | [
"MIT"
] | 84 | 2017-10-25T15:49:21.000Z | 2021-11-28T21:25:54.000Z | data/test/python/bdf83d41ca1d3d5df8a5e021fb3c673d2b642aa3__init__.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 5 | 2018-03-29T11:50:46.000Z | 2021-04-26T13:33:18.000Z | data/test/python/bdf83d41ca1d3d5df8a5e021fb3c673d2b642aa3__init__.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 24 | 2017-11-22T08:31:00.000Z | 2022-03-27T01:22:31.000Z | # The contents of this file are subject to the Common Public Attribution
# License Version 1.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://code.reddit.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, ... | 42.235294 | 80 | 0.827298 |
41a8e5c88721b60253c261c4b1f022ad2b65e60c | 3,201 | py | Python | lib/babelfont/glyph.py | daltonmaag/babelfont | e30aba5326ba23344a386b5b1b736e6e65b22748 | [
"BSD-3-Clause"
] | 38 | 2020-03-27T21:13:07.000Z | 2021-07-18T14:01:17.000Z | lib/babelfont/glyph.py | daltonmaag/babelfont | e30aba5326ba23344a386b5b1b736e6e65b22748 | [
"BSD-3-Clause"
] | 17 | 2020-06-23T07:16:32.000Z | 2022-03-26T08:42:05.000Z | lib/babelfont/glyph.py | daltonmaag/babelfont | e30aba5326ba23344a386b5b1b736e6e65b22748 | [
"BSD-3-Clause"
] | 7 | 2020-03-27T22:47:19.000Z | 2021-03-24T10:01:20.000Z | from fontParts.base.glyph import BaseGlyph
from babelfont.image import Image
from babelfont import addUnderscoreProperty
from babelfont.lib import Lib
from babelfont.anchor import Anchor
# @addUnderscoreProperty(["name", "unicodes", "width", "height", "lib"])
@addUnderscoreProperty("name")
@addUnderscoreProperty("uni... | 30.778846 | 77 | 0.645423 |
456011b18d51934478945cf4edd4e3ce66d695b4 | 8,210 | py | Python | build_phases/stylecop_phase.py | helgames/sublime-advanced-builder | f9e97e02aa1e819701591d81620c635084277a45 | [
"Unlicense",
"MIT"
] | null | null | null | build_phases/stylecop_phase.py | helgames/sublime-advanced-builder | f9e97e02aa1e819701591d81620c635084277a45 | [
"Unlicense",
"MIT"
] | null | null | null | build_phases/stylecop_phase.py | helgames/sublime-advanced-builder | f9e97e02aa1e819701591d81620c635084277a45 | [
"Unlicense",
"MIT"
] | null | null | null | # License:
#
# Copyright (c) 2013, Paul Schulze
# 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,
# this list of condit... | 37.149321 | 137 | 0.625457 |
8756f4e81f95f53de3ab440806210c019c8b76e0 | 869 | py | Python | wsgi_demo.py | Max-Chou/spatz | fac27ad39ac92a96fcd48d02a13e65a076aa480c | [
"Apache-2.0"
] | null | null | null | wsgi_demo.py | Max-Chou/spatz | fac27ad39ac92a96fcd48d02a13e65a076aa480c | [
"Apache-2.0"
] | null | null | null | wsgi_demo.py | Max-Chou/spatz | fac27ad39ac92a96fcd48d02a13e65a076aa480c | [
"Apache-2.0"
] | null | null | null | from wsgiref.simple_server import make_server
class Reverseware:
def __init__(self, app):
self.wrapped_app = app
def __call__(self, environ, start_response, *args, **kwargs):
wrapped_app_responses = self.wrapped_app(environ, start_response)
return [data[::-1] for data in wrapped_... | 23.486486 | 73 | 0.674338 |
6394160097121b0c7a473b6e0b5d366964f3181d | 1,038 | py | Python | pliers/diagnostics/outliers.py | rafiahmed40/media-workflow | 32411d1214302176b0a3d15e6f68a3071a5e3762 | [
"BSD-3-Clause"
] | null | null | null | pliers/diagnostics/outliers.py | rafiahmed40/media-workflow | 32411d1214302176b0a3d15e6f68a3071a5e3762 | [
"BSD-3-Clause"
] | null | null | null | pliers/diagnostics/outliers.py | rafiahmed40/media-workflow | 32411d1214302176b0a3d15e6f68a3071a5e3762 | [
"BSD-3-Clause"
] | 1 | 2018-04-14T13:48:37.000Z | 2018-04-14T13:48:37.000Z | '''
Diagnostic functions for detecting outliers in the data
'''
import pandas as pd
import numpy as np
from scipy.spatial.distance import mahalanobis
from numpy.linalg import LinAlgError
def mahalanobis_distances(df, axis=0):
'''
Returns a pandas Series with Mahalanobis distances for each sample on the
a... | 29.657143 | 78 | 0.683044 |
0995dbdadf06d904e92cd27962f5dedac3e80e0d | 16,558 | py | Python | src/icp.py | CTPLab/AutoCI | 799db8dff8ad5e262dea448a3491ed1db07f5655 | [
"MIT"
] | 5 | 2022-02-07T10:12:09.000Z | 2022-02-10T17:01:19.000Z | src/icp.py | CTPLab/AutoCI | 799db8dff8ad5e262dea448a3491ed1db07f5655 | [
"MIT"
] | null | null | null | src/icp.py | CTPLab/AutoCI | 799db8dff8ad5e262dea448a3491ed1db07f5655 | [
"MIT"
] | null | null | null | # Copyright 2020 Juan L Gamella
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2.... | 37.125561 | 106 | 0.628397 |
e747b079e3991b2ae5221f63134f3748f959c469 | 6,652 | py | Python | nlptk/patterns/patterns.py | GarryGaller/nlp_toolkit | df98ee25f8a1f4379e751fdd4fd9f5389ffbfd1b | [
"MIT"
] | null | null | null | nlptk/patterns/patterns.py | GarryGaller/nlp_toolkit | df98ee25f8a1f4379e751fdd4fd9f5389ffbfd1b | [
"MIT"
] | null | null | null | nlptk/patterns/patterns.py | GarryGaller/nlp_toolkit | df98ee25f8a1f4379e751fdd4fd9f5389ffbfd1b | [
"MIT"
] | null | null | null | import string
import re
'''
Полный список граммем здесь: http://opencorpora.org/dict.php?act=gram
NOUN имя существительное хомяк
ADJF имя прилагательное (полное) хороший
ADJS имя прилагательное (краткое) хорош
COMP компаратив лучше, получше, выше
VERB глагол (личная форма) говорю, говорит, говори... | 39.832335 | 120 | 0.638755 |
8a883c387a955168e31427a1a9fef30e08d0924e | 36,143 | py | Python | ioutracker/metrics/MOTMetrics.py | jiankaiwang/ioutracker | 8a55925fd5488a340b2ca5095d35105cc34b6cb8 | [
"MIT"
] | 3 | 2020-05-15T02:49:56.000Z | 2022-02-10T15:57:20.000Z | ioutracker/metrics/MOTMetrics.py | jiankaiwang/ioutracker | 8a55925fd5488a340b2ca5095d35105cc34b6cb8 | [
"MIT"
] | null | null | null | ioutracker/metrics/MOTMetrics.py | jiankaiwang/ioutracker | 8a55925fd5488a340b2ca5095d35105cc34b6cb8 | [
"MIT"
] | 2 | 2020-06-23T09:28:34.000Z | 2020-08-13T02:38:22.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: jiankaiwang
@version: 0.0.1
@date: 2020/04
@desc: This script implements the multiple object tracking (MOT) metrics.
@note:
Style: pylint_2015
@reference:
MOT Benchmark Article: https://arxiv.org/pdf/1603.00831.pdf
"""
# In[]
import numpy as np
import pa... | 34.920773 | 108 | 0.644938 |
30b9fdc5653141bf4352390e9d7c51e736b1219e | 3,464 | py | Python | test/comparator/wrappers/test_service.py | chingor13/proto-breaking-change-detector | 688ea1f4f3a9d32ec9d2b52b1f2a69b768066ebd | [
"Apache-2.0"
] | null | null | null | test/comparator/wrappers/test_service.py | chingor13/proto-breaking-change-detector | 688ea1f4f3a9d32ec9d2b52b1f2a69b768066ebd | [
"Apache-2.0"
] | null | null | null | test/comparator/wrappers/test_service.py | chingor13/proto-breaking-change-detector | 688ea1f4f3a9d32ec9d2b52b1f2a69b768066ebd | [
"Apache-2.0"
] | null | null | null | #
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed unde... | 34.64 | 82 | 0.623557 |
ce1979c8dde00e52808ec170a39a97ed2e5e3c20 | 4,322 | py | Python | enaml/tests/widgets/enaml_test_case.py | mmckerns/enaml | ebf417b4dce9132bffa038a588ad90436a59d37e | [
"BSD-3-Clause"
] | 11 | 2015-01-04T14:29:23.000Z | 2019-12-25T05:38:37.000Z | enaml/tests/widgets/enaml_test_case.py | mmckerns/enaml | ebf417b4dce9132bffa038a588ad90436a59d37e | [
"BSD-3-Clause"
] | 36 | 2015-02-20T00:56:53.000Z | 2020-12-04T10:02:14.000Z | enaml/tests/widgets/enaml_test_case.py | mmckerns/enaml | ebf417b4dce9132bffa038a588ad90436a59d37e | [
"BSD-3-Clause"
] | 3 | 2015-11-19T15:11:37.000Z | 2019-03-11T23:45:02.000Z | #------------------------------------------------------------------------------
# Copyright (c) 2011-2012, Enthought, Inc.
# All rights reserved.
#------------------------------------------------------------------------------
from contextlib import contextmanager
import itertools
import types
import unittest
from en... | 29.401361 | 80 | 0.623785 |
e7cbea68d769c416753375e60f6b163704093ec8 | 24 | py | Python | .py | anshulsarnayak/hello-world | cb1e0e36cf5a8fe100066bb6bb9b558cabe3656e | [
"MIT"
] | null | null | null | .py | anshulsarnayak/hello-world | cb1e0e36cf5a8fe100066bb6bb9b558cabe3656e | [
"MIT"
] | null | null | null | .py | anshulsarnayak/hello-world | cb1e0e36cf5a8fe100066bb6bb9b558cabe3656e | [
"MIT"
] | null | null | null | print('Hello , World!')
| 12 | 23 | 0.625 |
8d581c47299429c7a97196de4ed6f649ac3f3bfd | 828 | py | Python | addons/web_unsplash/models/ir_qweb.py | jjiege/odoo | fd5b8ad387c1881f349d125cbd56433f4d49398f | [
"MIT"
] | null | null | null | addons/web_unsplash/models/ir_qweb.py | jjiege/odoo | fd5b8ad387c1881f349d125cbd56433f4d49398f | [
"MIT"
] | null | null | null | addons/web_unsplash/models/ir_qweb.py | jjiege/odoo | fd5b8ad387c1881f349d125cbd56433f4d49398f | [
"MIT"
] | null | null | null | from werkzeug import urls
from odoo import models, api
class Image(models.AbstractModel):
_inherit = 'ir.qweb.field.image'
@api.model
def from_html(self, model, field, element):
url = element.find('img').get('src')
url_object = urls.url_parse(url)
if url_object.path.startswith('... | 30.666667 | 66 | 0.535024 |
354bb74d1e368ef9c73d86460aa5157b0982a82a | 3,627 | py | Python | displayimage.py | wahyutirta/kerangka-kerja-CNN-numpy | c8906737f6d5f77ef3030a1c76e117ada6ff92c6 | [
"MIT"
] | 1 | 2021-07-22T00:40:10.000Z | 2021-07-22T00:40:10.000Z | displayimage.py | wahyutirta/kerangka-kerja-CNN-numpy | c8906737f6d5f77ef3030a1c76e117ada6ff92c6 | [
"MIT"
] | null | null | null | displayimage.py | wahyutirta/kerangka-kerja-CNN-numpy | c8906737f6d5f77ef3030a1c76e117ada6ff92c6 | [
"MIT"
] | null | null | null | from lenet5 import *
import numpy as np
import matplotlib.pyplot as plt
"""
file ini digunakan untuk menampilkan dan menyimpan feature map secara hard code
berikut susunan layer berdasarkan file lenet5
1 = feature map convo 1
2 = feature map max pool 1
3 = feature map convo 2
4 = feature map max pool 2
"""
def ploti... | 32.675676 | 124 | 0.663634 |
3c0941fc887a0f35da24a7f1fb043261b115b957 | 11,626 | py | Python | script/gen_requirements_all.py | kakaki/home-assistant | bd6bbcd5affaeac0076357937c3da94dee8f987f | [
"Apache-2.0"
] | null | null | null | script/gen_requirements_all.py | kakaki/home-assistant | bd6bbcd5affaeac0076357937c3da94dee8f987f | [
"Apache-2.0"
] | null | null | null | script/gen_requirements_all.py | kakaki/home-assistant | bd6bbcd5affaeac0076357937c3da94dee8f987f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""Generate an updated requirements_all.txt."""
import importlib
import os
import pathlib
import pkgutil
import re
import sys
from script.hassfest.model import Integration
COMMENT_REQUIREMENTS = (
"Adafruit_BBIO",
"Adafruit-DHT",
"avion",
"beacontools",
"blinkt",
"bluepy... | 24.84188 | 87 | 0.624118 |
1c03bde241bf929b782ab3f63a23b7e3b2cb72af | 543 | py | Python | teams/migrations/0002_auto_20191230_0349.py | robotgear/robotgear | 15361aef197071e6cf23fca0e574fddeef97152c | [
"MIT"
] | null | null | null | teams/migrations/0002_auto_20191230_0349.py | robotgear/robotgear | 15361aef197071e6cf23fca0e574fddeef97152c | [
"MIT"
] | 13 | 2020-03-15T03:44:47.000Z | 2022-03-11T23:48:01.000Z | teams/migrations/0002_auto_20191230_0349.py | robotgear/robotgear | 15361aef197071e6cf23fca0e574fddeef97152c | [
"MIT"
] | null | null | null | # Generated by Django 3.0.1 on 2019-12-30 03:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('teams', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='competition',
name='first_year',
... | 22.625 | 52 | 0.576427 |
0b3930461a74ff7242137d87a04f4ed89149199a | 167 | py | Python | thekindking.py | ron21-meet/meet2019y1lab3 | 4a4986e988a505875aacb16085bbc4ab0829753e | [
"MIT"
] | null | null | null | thekindking.py | ron21-meet/meet2019y1lab3 | 4a4986e988a505875aacb16085bbc4ab0829753e | [
"MIT"
] | null | null | null | thekindking.py | ron21-meet/meet2019y1lab3 | 4a4986e988a505875aacb16085bbc4ab0829753e | [
"MIT"
] | null | null | null | per_1 = int(input("what is the age of the first person?"))
per_2 = int(input("what is the age of the second person?"))
rontheking = abs(per_1-per_2)
print(rontheking)
| 33.4 | 59 | 0.724551 |
1828d2237c671b37c72cbd92d62ca610fc407872 | 104 | py | Python | app/index.py | mcnigno/webtools | d6ae789eaa6156d962d37fbd64626d6df5768ae4 | [
"MIT"
] | null | null | null | app/index.py | mcnigno/webtools | d6ae789eaa6156d962d37fbd64626d6df5768ae4 | [
"MIT"
] | null | null | null | app/index.py | mcnigno/webtools | d6ae789eaa6156d962d37fbd64626d6df5768ae4 | [
"MIT"
] | null | null | null | from flask_appbuilder import IndexView
class MyIndexView(IndexView):
index_template = 'index.html' | 20.8 | 38 | 0.798077 |
59b99471309fd0add6ade8f9269279f205fb96be | 6,169 | py | Python | configs/representation/ssn/ssn_r18_c5p345_sgd_cos_50e_r2_1x8x2_k400.py | happywu/mmaction2-CycleContrast | 019734e471dffd1161b7a9c617ba862d2349a96c | [
"Apache-2.0"
] | null | null | null | configs/representation/ssn/ssn_r18_c5p345_sgd_cos_50e_r2_1x8x2_k400.py | happywu/mmaction2-CycleContrast | 019734e471dffd1161b7a9c617ba862d2349a96c | [
"Apache-2.0"
] | null | null | null | configs/representation/ssn/ssn_r18_c5p345_sgd_cos_50e_r2_1x8x2_k400.py | happywu/mmaction2-CycleContrast | 019734e471dffd1161b7a9c617ba862d2349a96c | [
"Apache-2.0"
] | null | null | null | # model settings
model = dict(
type='SimSiamNeckTracker',
backbone=dict(
type='ResNet',
pretrained=None,
depth=18,
out_indices=(0, 1, 2, 3),
# strides=(1, 2, 1, 1),
norm_cfg=dict(type='SyncBN', requires_grad=True),
norm_eval=False,
zero_init_residu... | 30.845 | 78 | 0.614038 |
2c94f1c05ab08c67bcf7a22948e92feafbe3e03c | 324 | py | Python | odoo-13.0/addons/crm/models/res_users.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | 1 | 2019-12-19T01:53:13.000Z | 2019-12-19T01:53:13.000Z | odoo-13.0/addons/crm/models/res_users.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/addons/crm/models/res_users.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class Users(models.Model):
_inherit = 'res.users'
target_sales_won = fields.Integer('Won in Opportunities Target')
target_sales_done = fields.Integer('Activities Done Targe... | 24.923077 | 74 | 0.725309 |
b97a70587f213379dc97d2fe52f4abc64a946744 | 4,274 | py | Python | tests/ut/python/parallel/test_auto_parallel_for_loop.py | Vincent34/mindspore | a39a60878a46e7e9cb02db788c0bca478f2fa6e5 | [
"Apache-2.0"
] | 2 | 2021-07-08T13:10:42.000Z | 2021-11-08T02:48:57.000Z | tests/ut/python/parallel/test_auto_parallel_for_loop.py | peixinhou/mindspore | fcb2ec2779b753e95c762cf292b23bd81d1f561b | [
"Apache-2.0"
] | null | null | null | tests/ut/python/parallel/test_auto_parallel_for_loop.py | peixinhou/mindspore | fcb2ec2779b753e95c762cf292b23bd81d1f561b | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 32.876923 | 101 | 0.646467 |
d1ad110794c273f3eee960031cf418053519b21d | 10,456 | py | Python | toontown/cogdominium/CogdoMazeGameObjects.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/cogdominium/CogdoMazeGameObjects.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/cogdominium/CogdoMazeGameObjects.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | import math
import random
from pandac.PandaModules import CollisionSphere, CollisionTube, CollisionNode
from pandac.PandaModules import NodePath, BitMask32
from pandac.PandaModules import Point3, Point4, WaitInterval, Vec3, Vec4
from direct.interval.IntervalGlobal import LerpScaleInterval, LerpColorScaleInterval, LerpP... | 39.756654 | 206 | 0.668229 |
a3e34f6a7aa5f0e446b2c4e559e5abf5d82ee261 | 4,421 | py | Python | src/search/BinarySearchST.py | taojiaa/algs4 | 627499d7043559589dbc27a654787ae24e3e43b7 | [
"MIT"
] | 1 | 2019-09-25T00:49:52.000Z | 2019-09-25T00:49:52.000Z | src/search/BinarySearchST.py | taojiaa/algs4 | 627499d7043559589dbc27a654787ae24e3e43b7 | [
"MIT"
] | 4 | 2020-03-24T17:40:23.000Z | 2021-08-23T20:30:07.000Z | src/search/BinarySearchST.py | taojiaa/algs4 | 627499d7043559589dbc27a654787ae24e3e43b7 | [
"MIT"
] | null | null | null | from typing import List, Optional, TypeVar
from .Base import SortedSymbolTable
from .utils import compare
Key = TypeVar('Key')
Value = TypeVar('Value')
class BinarySearchST(SortedSymbolTable):
def __init__(self, capacity: int = 20) -> None:
self._keys: List[Optional[Key]] = [None] * capacity
sel... | 30.489655 | 102 | 0.532911 |
9b84cd0ac28685a9c4c3e96f2f5581237b51e7dd | 58,947 | py | Python | backend/mips_to_c/src/if_statements.py | zestydevy/decomp.me | b280dc6cb9ab93dbb4bba62f208fd4302964c9a6 | [
"MIT"
] | 18 | 2021-07-02T07:58:24.000Z | 2021-10-09T18:40:20.000Z | backend/mips_to_c/src/if_statements.py | zestydevy/decomp.me | b280dc6cb9ab93dbb4bba62f208fd4302964c9a6 | [
"MIT"
] | 102 | 2021-07-02T07:23:03.000Z | 2021-10-17T17:15:34.000Z | backend/mips_to_c/src/if_statements.py | zestydevy/decomp.me | b280dc6cb9ab93dbb4bba62f208fd4302964c9a6 | [
"MIT"
] | 10 | 2021-07-02T07:58:29.000Z | 2021-10-09T00:09:08.000Z | from collections import defaultdict
from dataclasses import dataclass, field, replace
from typing import Dict, List, Optional, Set, Tuple, Union
from .flow_graph import (
BasicNode,
ConditionalNode,
FlowGraph,
Node,
ReturnNode,
SwitchNode,
TerminalNode,
)
from .options import Options
from .... | 40.1 | 108 | 0.633196 |
113748d940a19b1769dc10bf6f9446c90f116654 | 9,397 | py | Python | HTTPWebSocketsHandler.py | SevenW/httpwebsockethandler | 4f72e1f017b45ea8bcf52ed171e857dfbd6babf3 | [
"MIT"
] | 12 | 2015-08-04T11:05:32.000Z | 2021-07-31T13:00:28.000Z | HTTPWebSocketsHandler.py | SevenW/httpwebsockethandler | 4f72e1f017b45ea8bcf52ed171e857dfbd6babf3 | [
"MIT"
] | null | null | null | HTTPWebSocketsHandler.py | SevenW/httpwebsockethandler | 4f72e1f017b45ea8bcf52ed171e857dfbd6babf3 | [
"MIT"
] | 3 | 2016-12-16T22:05:13.000Z | 2019-05-23T13:05:14.000Z | '''
The MIT License (MIT)
Copyright (C) 2014, 2015 Seven Watt <info@sevenwatt.com>
<http://www.sevenwatt.com>
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 ... | 42.139013 | 461 | 0.592104 |
a26878e25c5661ec14c0abf6a8bd3306abfe1301 | 4,167 | py | Python | tests/nuodb_transaction_test.py | madscientist/nuodb-python | 93dc174afada40f56f3e2ddded6b9f473b7ae553 | [
"BSD-3-Clause"
] | 12 | 2015-05-29T10:14:28.000Z | 2019-05-05T19:34:07.000Z | tests/nuodb_transaction_test.py | madscientist/nuodb-python | 93dc174afada40f56f3e2ddded6b9f473b7ae553 | [
"BSD-3-Clause"
] | 76 | 2015-01-21T18:29:04.000Z | 2021-05-25T17:43:37.000Z | tests/nuodb_transaction_test.py | madscientist/nuodb-python | 93dc174afada40f56f3e2ddded6b9f473b7ae553 | [
"BSD-3-Clause"
] | 23 | 2015-01-23T10:13:25.000Z | 2020-08-13T15:02:46.000Z | #!/usr/bin/env python
import unittest
from .nuodb_base import NuoBase
class NuoDBTransactionTest(NuoBase):
def test_connection_isolation(self):
con1 = self._connect()
con2 = self._connect()
cursor1 = con1.cursor()
cursor2 = con2.cursor()
cursor1.execute("SELECT 1 FROM D... | 29.764286 | 74 | 0.640989 |
3cfb50d85b5377488aa9ec45df3537cd75d26ef8 | 1,779 | py | Python | parser/fase2/team10/InstruccionesPL/TablaSimbolosPL/TipoPL.py | Josue-Zea/tytus | f9e4be9a8c03eb698fade7a748972e4f52d46685 | [
"MIT"
] | 35 | 2020-12-07T03:11:43.000Z | 2021-04-15T17:38:16.000Z | parser/fase2/team10/InstruccionesPL/TablaSimbolosPL/TipoPL.py | Josue-Zea/tytus | f9e4be9a8c03eb698fade7a748972e4f52d46685 | [
"MIT"
] | 47 | 2020-12-09T01:29:09.000Z | 2021-01-13T05:37:50.000Z | parser/fase2/team10/InstruccionesPL/TablaSimbolosPL/TipoPL.py | Josue-Zea/tytus | f9e4be9a8c03eb698fade7a748972e4f52d46685 | [
"MIT"
] | 556 | 2020-12-07T03:13:31.000Z | 2021-06-17T17:41:10.000Z | from enum import Enum
from InstruccionesPL.TablaSimbolosPL.InstruccionPL import InstruccionPL
class Tipo_DatoPL(Enum):
# ENTERO
SMALLINT = 1
INTEGER = 2
BIGINT = 3
DECIMAL = 4
NUMERIC = 5
REAL = 6
DOUBLE_PRECISION = 7
MONEY = 8
# CADENA
CHAR = 9
VARCHAR = 10
VARYING ... | 30.152542 | 284 | 0.612142 |
38de7fa1940fa2726276a57db716e84bbaa586bf | 533 | py | Python | src/learning_rest_framework/filters.py | gsi-luis/djangolearning | 4cf1e016cfe2910c907a669e518f5233ae04fb12 | [
"MIT"
] | 1 | 2020-07-05T18:33:33.000Z | 2020-07-05T18:33:33.000Z | src/learning_rest_framework/filters.py | gsi-luis/djangolearning | 4cf1e016cfe2910c907a669e518f5233ae04fb12 | [
"MIT"
] | 2 | 2021-03-30T13:49:58.000Z | 2021-06-10T19:43:27.000Z | src/learning_rest_framework/filters.py | gsi-luis/djangolearning | 4cf1e016cfe2910c907a669e518f5233ae04fb12 | [
"MIT"
] | null | null | null | from rest_framework import filters
class CustomSearchFilter(filters.SearchFilter):
def get_search_fields(self, view, request):
if request.query_params.get('title_only'):
return ['title']
return super(CustomSearchFilter, self).get_search_fields(view, request)
class IsOwnerFilterBacken... | 31.352941 | 79 | 0.722326 |
243d2e71e9b54e0418d9b5f5687effc31c128158 | 13,736 | py | Python | toolkit4nlp/utils.py | xv44586/toolkit4nlp | 0ca8c45efe4ad4c6dc20b47016a13326aadcd0bd | [
"Apache-2.0"
] | 94 | 2020-07-16T03:07:59.000Z | 2022-03-13T08:06:30.000Z | toolkit4nlp/utils.py | xv44586/toolkit4nlp | 0ca8c45efe4ad4c6dc20b47016a13326aadcd0bd | [
"Apache-2.0"
] | 14 | 2020-11-24T04:26:26.000Z | 2021-09-13T02:44:51.000Z | toolkit4nlp/utils.py | xv44586/toolkit4nlp | 0ca8c45efe4ad4c6dc20b47016a13326aadcd0bd | [
"Apache-2.0"
] | 17 | 2020-09-04T07:24:24.000Z | 2021-11-19T06:35:18.000Z | # -*- coding: utf-8 -*-
# @Date : 2020/6/29
# @Author : mingming.xu
# @Email : xv44586@gmail.com
# @File : utils.py
import re
import numpy as np
from abc import abstractmethod
def softmax(x, axis=-1):
"""numpy版softmax
"""
x = x - x.max(axis=axis, keepdims=True)
x = np.exp(x)
return x / x.... | 34.254364 | 112 | 0.533343 |
8ec9919b95d3cb1356cfcf2ecbf19addc17b9839 | 5,702 | py | Python | mmdet/models/detectors/single_stage.py | wobushishuiguo/Rotation-ship-detection | e49f2c7fd71d6f05b3d0fa6dd67ad751b306592e | [
"Apache-2.0"
] | 1 | 2021-11-17T16:07:14.000Z | 2021-11-17T16:07:14.000Z | mmdet/models/detectors/single_stage.py | wobushishuiguo/Rotation-ship-detection | e49f2c7fd71d6f05b3d0fa6dd67ad751b306592e | [
"Apache-2.0"
] | null | null | null | mmdet/models/detectors/single_stage.py | wobushishuiguo/Rotation-ship-detection | e49f2c7fd71d6f05b3d0fa6dd67ad751b306592e | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
from mmdet.core import bbox2result
from ..builder import DETECTORS, build_backbone, build_head, build_neck
from .base import BaseDetector
@DETECTORS.register_module()
class SingleStageDetector(BaseDetector):
"""Base class for single-stage detectors.
Single-stage detectors ... | 38.013333 | 85 | 0.591547 |
99c346344acc092ca07906d4c7347c4c894e8763 | 109,979 | py | Python | tests/unit/faucet/test_valve_stack.py | mab68/faucet | 47d4ee31d34a82392a34fe61fbfd4ef117b91e93 | [
"Apache-2.0"
] | null | null | null | tests/unit/faucet/test_valve_stack.py | mab68/faucet | 47d4ee31d34a82392a34fe61fbfd4ef117b91e93 | [
"Apache-2.0"
] | 10 | 2020-03-19T03:49:17.000Z | 2020-07-06T00:38:03.000Z | tests/unit/faucet/test_valve_stack.py | mab68/faucet | 47d4ee31d34a82392a34fe61fbfd4ef117b91e93 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Unit tests run as PYTHONPATH=../../.. python3 ./test_valve_stack.py."""
# Copyright (C) 2015 Research and Innovation Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2019 The Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file ex... | 34.606356 | 111 | 0.566272 |
9441726d5ca31e56bd986b75c754cd395284f1a0 | 14,396 | py | Python | ENV/lib/python3.6/site-packages/zmq/tests/asyncio/_test_asyncio.py | ShannonTully/data-science | f0e08aec65d9bfa7694308b653283a35a8affb26 | [
"MIT"
] | 34 | 2018-07-13T11:30:46.000Z | 2022-01-05T13:48:10.000Z | venv/lib/python3.6/site-packages/zmq/tests/asyncio/_test_asyncio.py | HeyWeiPan/vnpy_crypto | 844381797a475a01c05a4e162592a5a6e3a48032 | [
"MIT"
] | 1 | 2021-04-15T18:46:45.000Z | 2021-04-15T18:46:45.000Z | venv/lib/python3.6/site-packages/zmq/tests/asyncio/_test_asyncio.py | HeyWeiPan/vnpy_crypto | 844381797a475a01c05a4e162592a5a6e3a48032 | [
"MIT"
] | 22 | 2018-07-13T11:30:48.000Z | 2021-09-25T13:30:08.000Z | """Test asyncio support"""
# Copyright (c) PyZMQ Developers
# Distributed under the terms of the Modified BSD License.
import json
import os
import sys
import pytest
from pytest import mark
import zmq
from zmq.utils.strtypes import u
try:
import asyncio
import zmq.asyncio as zaio
from zmq.auth.asyncio i... | 32.718182 | 77 | 0.541331 |
b938d5d54c06ffb13fa9b20b3d32610a3417f06b | 1,025 | py | Python | jumpscale/data/serializers/__init__.py | zaibon/js-ng | 8b63c04757d1432ed4aa588500a113610701de14 | [
"Apache-2.0"
] | 2 | 2021-04-28T10:46:08.000Z | 2021-12-22T12:33:34.000Z | jumpscale/data/serializers/__init__.py | zaibon/js-ng | 8b63c04757d1432ed4aa588500a113610701de14 | [
"Apache-2.0"
] | 321 | 2020-06-15T11:48:21.000Z | 2022-03-29T22:13:33.000Z | jumpscale/data/serializers/__init__.py | zaibon/js-ng | 8b63c04757d1432ed4aa588500a113610701de14 | [
"Apache-2.0"
] | 4 | 2020-06-18T06:19:29.000Z | 2021-07-14T12:54:47.000Z | """This module does all the work for serialization/deserialization around pickle, base64, json, msgpack, pickle, dill, toml
```
JS-NG> obj = {"name":"username", "list":[1,3,4,7], "n":5}
JS-NG> j.data.serializers.json.dumps(obj) ... | 37.962963 | 123 | 0.491707 |
d34c14b4e7c7750dc576904ccf33ceb714ae1159 | 1,311 | py | Python | leetcode-algorithms/102. Binary Tree Level Order Traversal/102.binary-tree-level-order-traversal.py | cnyy7/LeetCode_EY | 44e92f102b61f5e931e66081ed6636d7ecbdefd4 | [
"MIT"
] | null | null | null | leetcode-algorithms/102. Binary Tree Level Order Traversal/102.binary-tree-level-order-traversal.py | cnyy7/LeetCode_EY | 44e92f102b61f5e931e66081ed6636d7ecbdefd4 | [
"MIT"
] | null | null | null | leetcode-algorithms/102. Binary Tree Level Order Traversal/102.binary-tree-level-order-traversal.py | cnyy7/LeetCode_EY | 44e92f102b61f5e931e66081ed6636d7ecbdefd4 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=102 lang=python3
#
# [102] Binary Tree Level Order Traversal
#
# https://leetcode.com/problems/binary-tree-level-order-traversal/description/
#
# algorithms
# Medium (48.80%)
# Likes: 1532
# Dislikes: 40
# Total Accepted: 389.6K
# Total Submissions: 796.6K
# Testcase Example: ... | 20.809524 | 79 | 0.526316 |
f10e390de6c58f5d3fafd5502961d040b5347f21 | 21,692 | py | Python | backend/venv/lib/python3.5/site-packages/engineio/server.py | Siskat/Hira | cf0410b564d02c7647cbbb868102089fcd2884c3 | [
"MIT"
] | null | null | null | backend/venv/lib/python3.5/site-packages/engineio/server.py | Siskat/Hira | cf0410b564d02c7647cbbb868102089fcd2884c3 | [
"MIT"
] | 2 | 2021-02-08T20:23:00.000Z | 2021-04-30T20:40:25.000Z | backend/venv/lib/python3.5/site-packages/engineio/server.py | Siskat/Hira | cf0410b564d02c7647cbbb868102089fcd2884c3 | [
"MIT"
] | null | null | null | import gzip
import importlib
import logging
import uuid
import zlib
import six
from six.moves import urllib
from . import exceptions
from . import packet
from . import payload
from . import socket
default_logger = logging.getLogger('engineio')
class Server(object):
"""An Engine.IO server.
This class imple... | 43.384 | 79 | 0.547437 |
9ab9d12a8305f08a34b10448af12cd550b522eba | 8,621 | py | Python | custom_components/emporia_vue/sensor.py | shyuep/ha-emporia-vue | e84f003999eb71b6914c5f7915b75c7753df159c | [
"MIT"
] | null | null | null | custom_components/emporia_vue/sensor.py | shyuep/ha-emporia-vue | e84f003999eb71b6914c5f7915b75c7753df159c | [
"MIT"
] | null | null | null | custom_components/emporia_vue/sensor.py | shyuep/ha-emporia-vue | e84f003999eb71b6914c5f7915b75c7753df159c | [
"MIT"
] | null | null | null | """Platform for sensor integration."""
from datetime import timedelta
import logging
import asyncio
import async_timeout
from homeassistant.const import (
DEVICE_CLASS_POWER,
POWER_WATT,
ENERGY_WATT_HOUR,
ENERGY_KILO_WATT_HOUR,
)
from homeassistant.helpers.entity import Entity
from homeassistant.helpe... | 36.375527 | 109 | 0.599466 |
41b64c0683df4d03aea1b1d74decc922147854b9 | 424 | py | Python | class_wrapping/test.py | shinsumicco/pybind11-tutorials | b2f544653035172f1a7e489942dc8b796e7df72b | [
"MIT"
] | null | null | null | class_wrapping/test.py | shinsumicco/pybind11-tutorials | b2f544653035172f1a7e489942dc8b796e7df72b | [
"MIT"
] | null | null | null | class_wrapping/test.py | shinsumicco/pybind11-tutorials | b2f544653035172f1a7e489942dc8b796e7df72b | [
"MIT"
] | null | null | null | import stack
st = stack.stack()
print("size: {}".format(st.get_size()))
print("{}\n".format(st.get_stacked()))
st.push(1)
print("size: {}".format(st.get_size()))
print("{}\n".format(st.get_stacked()))
st.push(5)
st.push(24)
print("size: {}".format(st.get_size()))
print("{}\n".format(st.get_stacked()))
for i in range... | 22.315789 | 39 | 0.627358 |
b7535840ba1f8c7e6ec4e1109edd5442299d0215 | 8,448 | py | Python | model/att.py | anonymous2022ijcai/RGSL | 11c38ee50d50127c0f7c2a137bdb21ca5f7f3644 | [
"MIT"
] | null | null | null | model/att.py | anonymous2022ijcai/RGSL | 11c38ee50d50127c0f7c2a137bdb21ca5f7f3644 | [
"MIT"
] | null | null | null | model/att.py | anonymous2022ijcai/RGSL | 11c38ee50d50127c0f7c2a137bdb21ca5f7f3644 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
def _make_divisible(v, divisor, min_value=None):
if min_value is None:
min_value = divisor
new_v = max(min_value, int(v + divisor / 2) // divisor * divisor)
# Make sure that round down does not go down by more than 10%.
if new_v < 0.9 * v:
new_v += div... | 33.129412 | 129 | 0.515862 |
f1b4ce077270ef320662f9fc7699916996d44dbd | 2,918 | py | Python | 7/solution.py | thesketh/advent-of-code-2021 | 28faafce9e69d2b503f9c93c33b99007d1cd1540 | [
"MIT"
] | null | null | null | 7/solution.py | thesketh/advent-of-code-2021 | 28faafce9e69d2b503f9c93c33b99007d1cd1540 | [
"MIT"
] | null | null | null | 7/solution.py | thesketh/advent-of-code-2021 | 28faafce9e69d2b503f9c93c33b99007d1cd1540 | [
"MIT"
] | null | null | null | """
Solution to the seventh challenge, aligning crab submarines.
"""
from functools import partial
from os import PathLike
from pathlib import Path
from typing import Callable, List, Literal
ROOT = Path(__file__).absolute().parent
Position = int
"""The position of a crab sub."""
FuelCost = int
"""The cost, in unit... | 31.717391 | 88 | 0.663468 |
1d93aea9f770c0e82bb9df4d26edc970db606e46 | 371 | py | Python | bin/createAccessLogs.py | atstpls/soc-faker | 119fcb9c4329a918ef9001ac5eaa36251b862bf0 | [
"MIT"
] | null | null | null | bin/createAccessLogs.py | atstpls/soc-faker | 119fcb9c4329a918ef9001ac5eaa36251b862bf0 | [
"MIT"
] | null | null | null | bin/createAccessLogs.py | atstpls/soc-faker | 119fcb9c4329a918ef9001ac5eaa36251b862bf0 | [
"MIT"
] | null | null | null | from socfaker import SocFaker
import sys
path_file = sys.argv[1]
clients = int(sys.argv[2])
minutes = int(sys.argv[3])
sf = SocFaker()
count=0
while count < minutes:
logs = sf.logs.access(type='test', path_file=path_file, clients=clients)
with open("/app/logs/access.log", "a") as f:
for line in logs... | 19.526316 | 76 | 0.633423 |
9c9686385fceb06f454df02f1da819ba2ed3082a | 84 | py | Python | ufile/__init__.py | joydchh/ufile-sdk-python | bae6149817c422845edbbdfe7b987299acddb539 | [
"MIT"
] | null | null | null | ufile/__init__.py | joydchh/ufile-sdk-python | bae6149817c422845edbbdfe7b987299acddb539 | [
"MIT"
] | null | null | null | ufile/__init__.py | joydchh/ufile-sdk-python | bae6149817c422845edbbdfe7b987299acddb539 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
UCloud UFile SDK for python
"""
__version__ = '3.2.3'
| 10.5 | 27 | 0.559524 |
3066699ba50391891da1065ce671cb5b5ef225a3 | 17,467 | py | Python | taskqueue/taskqueue.py | seung-lab/python-task-queue | 2dec0ba347e8b4194e9d2f61aa5aca5e3700b4dc | [
"BSD-3-Clause"
] | 18 | 2019-01-25T14:54:44.000Z | 2022-02-22T19:58:41.000Z | taskqueue/taskqueue.py | seung-lab/python-task-queue | 2dec0ba347e8b4194e9d2f61aa5aca5e3700b4dc | [
"BSD-3-Clause"
] | 21 | 2018-10-16T14:09:10.000Z | 2022-02-11T18:35:45.000Z | taskqueue/taskqueue.py | seung-lab/python-task-queue | 2dec0ba347e8b4194e9d2f61aa5aca5e3700b4dc | [
"BSD-3-Clause"
] | 9 | 2019-01-25T21:49:21.000Z | 2021-12-21T09:52:39.000Z | import copy
from functools import partial
import itertools
import json
import math
import os
import platform
import random
import signal
import threading
import time
import traceback
import types
import sys
import gevent.pool
import multiprocessing as mp
import numpy as np
import pathos.pools
from tqdm import tqdm
fr... | 29.257956 | 130 | 0.676189 |
1f05fe9dce03eb3a6ac952119233f5d7df478f6a | 31,475 | py | Python | vyper/functions/functions.py | mkeen/vyper | 0d92d86752bcfca875e042cec6048488db3d479c | [
"MIT"
] | 1 | 2021-01-06T21:26:16.000Z | 2021-01-06T21:26:16.000Z | vyper/functions/functions.py | mkeen/vyper | 0d92d86752bcfca875e042cec6048488db3d479c | [
"MIT"
] | null | null | null | vyper/functions/functions.py | mkeen/vyper | 0d92d86752bcfca875e042cec6048488db3d479c | [
"MIT"
] | null | null | null | import ast
from vyper.exceptions import (
ConstancyViolationException,
InvalidLiteralException,
StructureException,
TypeMismatchException,
)
from .signature import (
signature,
Optional,
)
from vyper.parser.parser_utils import (
byte_array_to_num,
LLLnode,
get_length,
get_number... | 46.151026 | 180 | 0.587196 |
15e7c656683e9303510e3f89efa430b49253f95d | 3,093 | py | Python | exercises/simple-cipher/simple_cipher_test.py | inovizz/exercism | cb8a7a7619160456ed6cbe83f18d3f27d7b2985b | [
"MIT"
] | 1 | 2020-08-29T16:42:24.000Z | 2020-08-29T16:42:24.000Z | exercises/simple-cipher/simple_cipher_test.py | inovizz/exercism | cb8a7a7619160456ed6cbe83f18d3f27d7b2985b | [
"MIT"
] | null | null | null | exercises/simple-cipher/simple_cipher_test.py | inovizz/exercism | cb8a7a7619160456ed6cbe83f18d3f27d7b2985b | [
"MIT"
] | null | null | null | import unittest
from simple_cipher import Caesar, Cipher
class SimpleCipherTest(unittest.TestCase):
def test_caesar_encode1(self):
self.assertEqual(Caesar().encode('itisawesomeprogramminginpython'),
'lwlvdzhvrphsurjudpplqjlqsbwkrq')
def test_caesar_encode2(self):
sel... | 34.752809 | 78 | 0.661494 |
3787a955ef15d9e906bd88057389700b920eeb64 | 109 | py | Python | python/visu/object/__init__.py | renehorstmann/Visu | cdfa3b97bd965cb3d7783450c8f2956d1efea9ea | [
"MIT"
] | 1 | 2021-09-16T06:28:05.000Z | 2021-09-16T06:28:05.000Z | python/visu/object/__init__.py | renehorstmann/Visu | cdfa3b97bd965cb3d7783450c8f2956d1efea9ea | [
"MIT"
] | null | null | null | python/visu/object/__init__.py | renehorstmann/Visu | cdfa3b97bd965cb3d7783450c8f2956d1efea9ea | [
"MIT"
] | null | null | null | from .base import *
from .points import *
from .lines import *
from .mesh import *
from .background import *
| 18.166667 | 25 | 0.724771 |
2f5ac0e8d1546011c458123021ebac785b2950fb | 959 | py | Python | fate-manager/fate_manager/controller/version_controller.py | wanglg007/FATE-Cloud | 5b000b8426365ef8bb5eb32758556f21b13aa40a | [
"Apache-2.0"
] | 33 | 2020-02-26T06:03:39.000Z | 2022-02-17T07:05:38.000Z | fate-manager/fate_manager/controller/version_controller.py | wanglg007/FATE-Cloud | 5b000b8426365ef8bb5eb32758556f21b13aa40a | [
"Apache-2.0"
] | 47 | 2020-04-07T03:05:52.000Z | 2022-03-02T07:20:34.000Z | fate-manager/fate_manager/controller/version_controller.py | wanglg007/FATE-Cloud | 5b000b8426365ef8bb5eb32758556f21b13aa40a | [
"Apache-2.0"
] | 15 | 2020-11-16T05:44:27.000Z | 2021-12-03T06:35:10.000Z | from fate_manager.entity import item
from fate_manager.settings import stat_logger
from fate_manager.utils.request_cloud_utils import request_cloud_manager
DEFAULT_FATE_SERVING_VERSION = "1.3.0"
def update_version_to_cloud_manager(site):
site_version_item = item.SiteVersionItem()
site_version_item.fateVersio... | 41.695652 | 116 | 0.791449 |
94a3a726f8022a2f718606b6873262b3fa7eb36f | 21,540 | py | Python | exopy/tasks/declarations.py | jerjohste/exopy | 0fe3eb94f440ead88c396a1abccf7c22dd633a61 | [
"BSD-3-Clause"
] | 1 | 2019-08-27T16:33:39.000Z | 2019-08-27T16:33:39.000Z | exopy/tasks/declarations.py | jerjohste/exopy | 0fe3eb94f440ead88c396a1abccf7c22dd633a61 | [
"BSD-3-Clause"
] | null | null | null | exopy/tasks/declarations.py | jerjohste/exopy | 0fe3eb94f440ead88c396a1abccf7c22dd633a61 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2018 by Exopy Authors, see AUTHORS for more details.
#
# Distributed under the terms of the BSD license.
#
# The full license is in the file LICENCE, distributed with this software.
# ---------------... | 33.447205 | 79 | 0.557289 |
db7588e79227e3cb9ba241ea5c360f53c93f042b | 1,517 | py | Python | tests/test_history.py | tjkemp/ubik-agent | 34e4dd0d6319b8f5c5dba0cd9e087490720b723b | [
"MIT"
] | null | null | null | tests/test_history.py | tjkemp/ubik-agent | 34e4dd0d6319b8f5c5dba0cd9e087490720b723b | [
"MIT"
] | null | null | null | tests/test_history.py | tjkemp/ubik-agent | 34e4dd0d6319b8f5c5dba0cd9e087490720b723b | [
"MIT"
] | null | null | null | import pytest # noqa: F401
from ubikagent.history import History
class TestHistory:
"""Tests the class `History` which provides training history for the
`Interaction` class."""
def test_properties(self):
hist = History()
episode_length = [1, 2]
episode_rewards = [[4.0, 5.0], [2... | 30.34 | 82 | 0.604483 |
2ce99de85bb3060d5c0c07bec75d65e626ae2671 | 44,553 | py | Python | src/zhinst/toolkit/control/drivers/shfqa.py | abdurakhimov/zhinst-toolkit | a09a58bd0bfb473800136306989691329e77e90f | [
"MIT"
] | 14 | 2020-07-09T09:14:39.000Z | 2022-03-23T05:15:40.000Z | src/zhinst/toolkit/control/drivers/shfqa.py | abdurakhimov/zhinst-toolkit | a09a58bd0bfb473800136306989691329e77e90f | [
"MIT"
] | 104 | 2020-08-07T09:38:40.000Z | 2022-03-29T11:42:32.000Z | src/zhinst/toolkit/control/drivers/shfqa.py | abdurakhimov/zhinst-toolkit | a09a58bd0bfb473800136306989691329e77e90f | [
"MIT"
] | 16 | 2020-07-09T09:17:36.000Z | 2022-01-18T14:16:08.000Z | # Copyright (C) 2021 Zurich Instruments
#
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
import time
from zhinst.toolkit.control.drivers.base import (
BaseInstrument,
SHFQAChannel,
SHFGenerator,
SHFReadout,
SHFIntegration,
... | 38.21012 | 99 | 0.602137 |
5b4acab2d2f75e3dfcefc7e63d33047d39a5fa85 | 23,494 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/operations/_local_network_gateways_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/operations/_local_network_gateways_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/operations/_local_network_gateways_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 49.565401 | 209 | 0.671533 |
c0ad53fd97a6b5d95558a1d4f472112435460d2a | 6,639 | py | Python | examples/ex20.py | mfem/PyMFEM | b7b7c3d3de1082eac1015e3a313cf513db06fd7b | [
"BSD-3-Clause"
] | 93 | 2017-03-01T16:45:33.000Z | 2022-03-27T22:10:33.000Z | examples/ex20.py | GabrielJie/PyMFEM | fa654447ac6819c5aa0341397b91a299f4ce5492 | [
"BSD-3-Clause"
] | 64 | 2017-03-15T21:47:31.000Z | 2022-03-31T23:59:00.000Z | examples/ex20.py | GabrielJie/PyMFEM | fa654447ac6819c5aa0341397b91a299f4ce5492 | [
"BSD-3-Clause"
] | 32 | 2017-03-02T22:13:38.000Z | 2022-03-26T13:09:31.000Z | '''
MFEM example 20
See c++ version in the MFEM library for more detail
'''
import os
import mfem.ser as mfem
from mfem.ser import intArray
from os.path import expanduser, join, dirname
import numpy as np
from numpy import sin, cos, exp, sqrt
m_ = 1.0
k_ = 1.0
def run(order=1,
prob=0,
nste... | 31.76555 | 81 | 0.473113 |
fc53345c403797e6afcd2b186bde544689bdc7da | 5,686 | py | Python | lib/surface/compute/http_health_checks/create.py | bopopescu/SDK | e6d9aaee2456f706d1d86e8ec2a41d146e33550d | [
"Apache-2.0"
] | null | null | null | lib/surface/compute/http_health_checks/create.py | bopopescu/SDK | e6d9aaee2456f706d1d86e8ec2a41d146e33550d | [
"Apache-2.0"
] | null | null | null | lib/surface/compute/http_health_checks/create.py | bopopescu/SDK | e6d9aaee2456f706d1d86e8ec2a41d146e33550d | [
"Apache-2.0"
] | 2 | 2020-11-04T03:08:21.000Z | 2020-11-05T08:14:41.000Z | # Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 37.163399 | 85 | 0.665142 |
25f9c9daf4618d26b6f1f5f6a93690441a7df8e7 | 13,597 | py | Python | fandom.py | AndyYu25/ao3-fandom-analyzer | b466f3ad4600214eb8b761a120f5c074391c6498 | [
"MIT"
] | null | null | null | fandom.py | AndyYu25/ao3-fandom-analyzer | b466f3ad4600214eb8b761a120f5c074391c6498 | [
"MIT"
] | null | null | null | fandom.py | AndyYu25/ao3-fandom-analyzer | b466f3ad4600214eb8b761a120f5c074391c6498 | [
"MIT"
] | null | null | null | import AO3
import math
import csv
import time
def counter(countDict: dict, itemList: list)->None:
"""
Destructive helper function.
Given a dict with items as a key and integers corresponding to the frequency of the items
and a list of items, increments the value of the item by 1 in the given d... | 62.658986 | 192 | 0.634478 |
4625904d44d1db96767a6c66a14bdc752eca8adf | 1,550 | py | Python | src/python_checker/checker.py | ttu/cubersensors-iot-azure | cdec18bb99f2316ed65179090f0f66b8791f57ca | [
"Apache-2.0"
] | 1 | 2016-05-29T10:53:09.000Z | 2016-05-29T10:53:09.000Z | src/python_checker/checker.py | ttu/cubersensors-iot-azure | cdec18bb99f2316ed65179090f0f66b8791f57ca | [
"Apache-2.0"
] | null | null | null | src/python_checker/checker.py | ttu/cubersensors-iot-azure | cdec18bb99f2316ed65179090f0f66b8791f57ca | [
"Apache-2.0"
] | 1 | 2018-03-02T05:19:08.000Z | 2018-03-02T05:19:08.000Z | # Azure will execute first file.
# sys.path.append is required by Azure Web Jobs. It requires that all packages are provided to it in zip file.
# env\Lib\site-packages is virtual env path in Windows
import sys
sys.path.append("env\Lib\site-packages")
import logging
import logging.config
from datetime import datetime
... | 32.291667 | 110 | 0.676129 |
2a0e2a40504e082d9fb80bb6bdf067d387a91b95 | 17,080 | py | Python | maltpynt/base.py | matteobachetti/MaLTPyNT | 6c93d2e23041b6c932810b5a8d727ee1b6dabfed | [
"BSD-3-Clause"
] | 8 | 2015-02-23T13:43:21.000Z | 2021-07-17T11:35:24.000Z | maltpynt/base.py | matteobachetti/MaLTPyNT | 6c93d2e23041b6c932810b5a8d727ee1b6dabfed | [
"BSD-3-Clause"
] | 1 | 2017-09-14T07:55:07.000Z | 2017-09-14T07:55:07.000Z | maltpynt/base.py | matteobachetti/MaLTPyNT | 6c93d2e23041b6c932810b5a8d727ee1b6dabfed | [
"BSD-3-Clause"
] | 4 | 2016-03-02T20:36:07.000Z | 2018-02-26T13:23:53.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""A miscellaneous collection of basic functions."""
from __future__ import (absolute_import, unicode_literals, division,
print_function)
import numpy as np
import logging
import sys
def r_in(td, r_0):
"""Calculate incident ... | 28.657718 | 129 | 0.609251 |
86997b6440b555f85ed9fbe95228c3d33f03fbd1 | 6,912 | py | Python | scanpipe/api/serializers.py | saif007sm/scancode.io | 8785b46085dad25d3950b350ae73be5509ae99d9 | [
"Apache-2.0"
] | 1 | 2020-12-26T07:08:14.000Z | 2020-12-26T07:08:14.000Z | scanpipe/api/serializers.py | saif007sm/scancode.io | 8785b46085dad25d3950b350ae73be5509ae99d9 | [
"Apache-2.0"
] | null | null | null | scanpipe/api/serializers.py | saif007sm/scancode.io | 8785b46085dad25d3950b350ae73be5509ae99d9 | [
"Apache-2.0"
] | null | null | null | # SPDX-License-Identifier: Apache-2.0
#
# http://nexb.com and https://github.com/nexB/scancode.io
# The ScanCode.io software is licensed under the Apache License version 2.0.
# Data generated with ScanCode.io is provided as-is without warranties.
# ScanCode is a trademark of nexB Inc.
#
# You may not use this software ... | 32.148837 | 86 | 0.669705 |
73e743678f8bf982898efd4ffa8a26d12142dfd2 | 11,138 | py | Python | flexbuffers/flx_builder.py | mzaks/FlexBuffers-Python | 3de2cad5f1315f521df84d607c2cb6a8257a8526 | [
"MIT"
] | null | null | null | flexbuffers/flx_builder.py | mzaks/FlexBuffers-Python | 3de2cad5f1315f521df84d607c2cb6a8257a8526 | [
"MIT"
] | null | null | null | flexbuffers/flx_builder.py | mzaks/FlexBuffers-Python | 3de2cad5f1315f521df84d607c2cb6a8257a8526 | [
"MIT"
] | null | null | null | import collections
import struct
from .value_types import (ValueType, BitWidth)
class _StackValue:
def __init__(self, value):
self._value = value
if value is None:
self._type = ValueType.Null
self._width = BitWidth.Width8
elif isinstance(value, bool):
se... | 36.162338 | 113 | 0.602801 |
c8823977c89837101c79cef218c05e935f2406af | 107 | py | Python | akex.py | abhishekabhishek/mlh-2018 | 96aa24d822759bb0073f5886dcd885e6b0517047 | [
"MIT"
] | null | null | null | akex.py | abhishekabhishek/mlh-2018 | 96aa24d822759bb0073f5886dcd885e6b0517047 | [
"MIT"
] | null | null | null | akex.py | abhishekabhishek/mlh-2018 | 96aa24d822759bb0073f5886dcd885e6b0517047 | [
"MIT"
] | null | null | null | import autokeras as ak
clf = ak.ImageClassifier()
clf.fit(x_train, y_train)
results = clf.predict(x_test)
| 17.833333 | 29 | 0.766355 |
e27769fe1143d0a23151843888b2f2f7b2eda84e | 211 | py | Python | languages/python/algorithm_fibo.py | Andilyn/learntosolveit | fd15345c74ef543e4e26f4691bf91cb6dac568a4 | [
"BSD-3-Clause"
] | 1 | 2021-04-09T04:15:24.000Z | 2021-04-09T04:15:24.000Z | languages/python/algorithm_fibo.py | Andilyn/learntosolveit | fd15345c74ef543e4e26f4691bf91cb6dac568a4 | [
"BSD-3-Clause"
] | null | null | null | languages/python/algorithm_fibo.py | Andilyn/learntosolveit | fd15345c74ef543e4e26f4691bf91cb6dac568a4 | [
"BSD-3-Clause"
] | 1 | 2021-07-31T02:45:29.000Z | 2021-07-31T02:45:29.000Z | def fibo(n):
if n == 0:
return 0
if n == 1:
return 1
return (fibo(n-2) + fibo(n-1))
print fibo(0)
print fibo(1)
print fibo(2)
print fibo(3)
print fibo(4)
print fibo(5)
print fibo(6)
| 14.066667 | 34 | 0.559242 |
466fbc8c157557fe1ef292a8a4b139e360c6a689 | 2,925 | py | Python | BirdRoostDetection/BuildModels/ShallowCNN/eval.py | carmenchilson/BirdRoostDetection | 5b32069f41d25ca260b5be7d871904b1a8fd0200 | [
"MIT"
] | null | null | null | BirdRoostDetection/BuildModels/ShallowCNN/eval.py | carmenchilson/BirdRoostDetection | 5b32069f41d25ca260b5be7d871904b1a8fd0200 | [
"MIT"
] | null | null | null | BirdRoostDetection/BuildModels/ShallowCNN/eval.py | carmenchilson/BirdRoostDetection | 5b32069f41d25ca260b5be7d871904b1a8fd0200 | [
"MIT"
] | 1 | 2018-09-06T04:00:23.000Z | 2018-09-06T04:00:23.000Z | """Evaluate the shallow CNN model trained on a single radar product.
Use command line arguments to select which radar product model to evaluate.
Optionally input the location of the save file where the default is
model/radar_product/
Use an integer to select a radar_product from the following list:
0 : Reflectivit... | 30.154639 | 75 | 0.668034 |
fc8651e0394308a7a7cf589432ea9cb8d095db44 | 11,525 | py | Python | deutschland/autobahn/model/roads.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | deutschland/autobahn/model/roads.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | deutschland/autobahn/model/roads.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | """
Autobahn App API
Was passiert auf Deutschlands Bundesstraßen? API für aktuelle Verwaltungsdaten zu Baustellen, Staus und Ladestationen. Außerdem Zugang zu Verkehrsüberwachungskameras und vielen weiteren Datensätzen. # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://op... | 41.308244 | 217 | 0.563557 |
312b6cd832a7a22ad315e999c69c277bb91770a5 | 159 | py | Python | src/TradeUnionCommittee.DataAnalysis.Api/src/TradeUnionCommittee.DataAnalysis.Api/Models/ClusterModel.py | zavada-sergey/TradeUnionCommittee.App | 21e2de61410a505d7409cff2e2688765eaf261d2 | [
"MIT"
] | 2 | 2019-07-01T18:57:18.000Z | 2019-07-04T07:20:15.000Z | src/TradeUnionCommittee.DataAnalysis.Api/src/TradeUnionCommittee.DataAnalysis.Api/Models/ClusterModel.py | zavada-sergey/TradeUnionCommittee.App | 21e2de61410a505d7409cff2e2688765eaf261d2 | [
"MIT"
] | 3 | 2021-09-22T08:46:01.000Z | 2022-02-27T16:51:18.000Z | src/TradeUnionCommittee.DataAnalysis.Api/src/TradeUnionCommittee.DataAnalysis.Api/Models/ClusterModel.py | zavada-sergey/TradeUnionCommittee.App | 21e2de61410a505d7409cff2e2688765eaf261d2 | [
"MIT"
] | 2 | 2019-05-15T07:48:13.000Z | 2019-05-15T08:30:22.000Z | class Cluster:
X = []
Y = []
Centers = []
def __init__(self,X,Y,Centers):
self.X = X
self.Y = Y
self.Centers = Centers | 17.666667 | 35 | 0.471698 |
70dfdc5517d3aba2093209b654734932765e9093 | 214,616 | py | Python | nova/db/sqlalchemy/api.py | bopopescu/nova-34 | b037993984229bb698050f20e8719b8c06ff2be3 | [
"Apache-2.0"
] | null | null | null | nova/db/sqlalchemy/api.py | bopopescu/nova-34 | b037993984229bb698050f20e8719b8c06ff2be3 | [
"Apache-2.0"
] | null | null | null | nova/db/sqlalchemy/api.py | bopopescu/nova-34 | b037993984229bb698050f20e8719b8c06ff2be3 | [
"Apache-2.0"
] | 1 | 2020-07-24T08:52:14.000Z | 2020-07-24T08:52:14.000Z | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (t... | 36.027531 | 79 | 0.610066 |
a1aee2b12bb414fca7eec77a99d54015e328e57d | 2,533 | py | Python | tests/common/util/email_util_test.py | pombredanne/forseti-security | 68a9a88243460065e00b6c131b3d9abd0331fb37 | [
"Apache-2.0"
] | 1 | 2018-03-26T08:15:21.000Z | 2018-03-26T08:15:21.000Z | tests/common/util/email_util_test.py | pombredanne/forseti-security | 68a9a88243460065e00b6c131b3d9abd0331fb37 | [
"Apache-2.0"
] | null | null | null | tests/common/util/email_util_test.py | pombredanne/forseti-security | 68a9a88243460065e00b6c131b3d9abd0331fb37 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Forseti Security Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 36.185714 | 78 | 0.721279 |
27440211d71498bd4342c5d1aaa8a28a9aef205d | 1,014 | py | Python | sample/complex.py | av1m/sliding-block-puzzles | 2f764ebeb33bba9611e6d4d17082b7ea984f2636 | [
"MIT"
] | 2 | 2021-06-20T19:56:07.000Z | 2022-03-12T06:35:09.000Z | sample/complex.py | av1m/sliding-block-puzzles | 2f764ebeb33bba9611e6d4d17082b7ea984f2636 | [
"MIT"
] | null | null | null | sample/complex.py | av1m/sliding-block-puzzles | 2f764ebeb33bba9611e6d4d17082b7ea984f2636 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import annotations
from typing import List, TypeVar
from sliding_puzzle import Puzzle, TypePuzzle
from sliding_puzzle.algorithm import get_algorithm
if __name__ == "__main__":
puzzles: List[TypePuzzle] = [
[[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 0, 12], [13, 14, 15, ... | 31.6875 | 81 | 0.506903 |
ca243ac9f53c2c2a7b7abe5de16153a6d0694aef | 9,049 | py | Python | zvmsdk/exception.py | haolp/python-zvm-sdk | 784b60b6528b57eb3fe9f795af439a25e20843b9 | [
"Apache-2.0"
] | 1 | 2021-01-17T02:33:06.000Z | 2021-01-17T02:33:06.000Z | zvmsdk/exception.py | haolp/python-zvm-sdk | 784b60b6528b57eb3fe9f795af439a25e20843b9 | [
"Apache-2.0"
] | 1 | 2020-02-27T02:44:17.000Z | 2020-02-27T02:44:17.000Z | zvmsdk/exception.py | haolp/python-zvm-sdk | 784b60b6528b57eb3fe9f795af439a25e20843b9 | [
"Apache-2.0"
] | 1 | 2020-02-06T14:36:01.000Z | 2020-02-06T14:36:01.000Z | # Copyright 2017,2018 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 34.538168 | 78 | 0.595646 |
4dd898be27641e26ce956256eab31422605409d4 | 6,474 | py | Python | 3rdparty/ps-lite/tests/lint.py | ChrisQiqiang/allocation | 762d11052fbd2a71560a909ca4760f65da6866c3 | [
"Apache-2.0"
] | 1,418 | 2015-04-29T07:22:02.000Z | 2022-03-17T06:20:58.000Z | 3rdparty/ps-lite/tests/lint.py | ChrisQiqiang/allocation | 762d11052fbd2a71560a909ca4760f65da6866c3 | [
"Apache-2.0"
] | 120 | 2015-05-15T21:43:15.000Z | 2021-07-27T08:36:50.000Z | 3rdparty/ps-lite/tests/lint.py | ChrisQiqiang/allocation | 762d11052fbd2a71560a909ca4760f65da6866c3 | [
"Apache-2.0"
] | 607 | 2015-05-12T14:52:24.000Z | 2022-03-01T08:45:05.000Z | #!/usr/bin/env python
# pylint: disable=protected-access, unused-variable, locally-disabled, redefined-variable-type
"""Lint helper to generate lint summary of source.
Copyright by Contributors
"""
import codecs
import sys
import re
import os
import cpplint
from cpplint import _cpplint_state
from pylint import epylint... | 37.206897 | 98 | 0.574915 |
e6ef2294b43bace3063464e3adfa6cb1d6873040 | 20,501 | py | Python | scripts/bert/data/qa.py | xiaotinghe/gluon-nlp | 3ce9995329fb0d18787019df541d4f229d7c9ded | [
"Apache-2.0"
] | 7 | 2019-12-05T02:49:07.000Z | 2020-08-17T01:11:59.000Z | scripts/bert/data/qa.py | xiaotinghe/gluon-nlp | 3ce9995329fb0d18787019df541d4f229d7c9ded | [
"Apache-2.0"
] | 1 | 2021-06-02T01:03:16.000Z | 2021-06-02T01:03:16.000Z | scripts/bert/data/qa.py | xiaotinghe/gluon-nlp | 3ce9995329fb0d18787019df541d4f229d7c9ded | [
"Apache-2.0"
] | 3 | 2021-03-12T04:41:00.000Z | 2021-03-12T04:41:24.000Z | # Copyright 2018 The Google AI Language Team Authors and DMLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 39.349328 | 84 | 0.598068 |
1608f3ca8e0a68cdacf3359e96b35eda618518d5 | 6,764 | py | Python | presalytics_story/models/story_collaborator_all_of.py | presalytics/story-python-client | 48ac7830b85d65b94a9f6bbfc0c7ee8344327084 | [
"MIT"
] | null | null | null | presalytics_story/models/story_collaborator_all_of.py | presalytics/story-python-client | 48ac7830b85d65b94a9f6bbfc0c7ee8344327084 | [
"MIT"
] | null | null | null | presalytics_story/models/story_collaborator_all_of.py | presalytics/story-python-client | 48ac7830b85d65b94a9f6bbfc0c7ee8344327084 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Communcations
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: 0.1
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
cl... | 27.835391 | 136 | 0.598462 |
12282e9494c03c32ad72c0bd45ea68363d5bb139 | 310 | py | Python | data/external/repositories_2to3/262496/diagnose-heart-master/train.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories_2to3/262496/diagnose-heart-master/train.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories_2to3/262496/diagnose-heart-master/train.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | 1 | 2019-12-04T08:23:33.000Z | 2019-12-04T08:23:33.000Z | def train_tencia_model():
from .CNN_B import sunnybrook, segfcn, ch4
sunnybrook.process_data_hdf5()
segfcn.train_model()
segfcn.evaluate()
ch4.process_data()
ch4.train_model()
ch4.evaluate()
def main():
train_tencia_model()
if __name__ == '__main__':
main()
| 20.666667 | 47 | 0.645161 |
157e99e82e9de52ecb0b0a071f4e8b27fe364910 | 7,096 | py | Python | desktop/core/ext-py/pycryptodomex-3.4.7/lib/Crypto/Hash/keccak.py | kokosing/hue | 2307f5379a35aae9be871e836432e6f45138b3d9 | [
"Apache-2.0"
] | 3 | 2018-01-29T14:16:02.000Z | 2019-02-05T21:33:05.000Z | desktop/core/ext-py/pycryptodomex-3.4.7/lib/Crypto/Hash/keccak.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 4 | 2021-03-11T04:02:00.000Z | 2022-03-27T08:31:56.000Z | desktop/core/ext-py/pycryptodomex-3.4.7/lib/Crypto/Hash/keccak.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 2 | 2019-06-17T11:51:56.000Z | 2020-07-25T08:29:56.000Z | # ===================================================================
#
# Copyright (c) 2015, Legrandin <helderijs@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributio... | 40.548571 | 99 | 0.583568 |
35159a322b479057caf44de3d4247a9ba49b955f | 8,879 | py | Python | Python/Woojin/ddpg.py | Marius-Juston/MatLab-RL-ANFIS | 650645345dc197ca5b7069085bf95185acc40467 | [
"BSD-3-Clause"
] | null | null | null | Python/Woojin/ddpg.py | Marius-Juston/MatLab-RL-ANFIS | 650645345dc197ca5b7069085bf95185acc40467 | [
"BSD-3-Clause"
] | null | null | null | Python/Woojin/ddpg.py | Marius-Juston/MatLab-RL-ANFIS | 650645345dc197ca5b7069085bf95185acc40467 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import torch.autograd
import torch.optim as optim
from torch.autograd import Variable
from memory import Memory
from model import Critic
def averaging(model, input):
# far
left = abs(model.layer['fuzzify'].varmfs[input].mfdefs['mf1'].a.item())
right = abs(model.layer['fuzzify'].varmfs[... | 50.737143 | 115 | 0.627999 |
f3513bdce639499857b9f421767c20a367609f2a | 8,490 | py | Python | catboost/pytest/lib/common_helpers.py | PallHaraldsson/catboost | f4b86aae0acb853f0216081518d490e52722ad88 | [
"Apache-2.0"
] | null | null | null | catboost/pytest/lib/common_helpers.py | PallHaraldsson/catboost | f4b86aae0acb853f0216081518d490e52722ad88 | [
"Apache-2.0"
] | null | null | null | catboost/pytest/lib/common_helpers.py | PallHaraldsson/catboost | f4b86aae0acb853f0216081518d490e52722ad88 | [
"Apache-2.0"
] | null | null | null | import csv
import json
import itertools
import os
import random
import shutil
import sys
from pandas import read_csv
from copy import deepcopy
import numpy as np
from catboost import Pool
from catboost.utils import read_cd
__all__ = [
'DelayedTee',
'binary_path',
'compare_evals',
'compare_evals_with_pre... | 34.653061 | 109 | 0.667962 |
c45791160ac37be875b6bb6416adce2b8d514f14 | 13,660 | py | Python | homeassistant/components/lovelace/__init__.py | Test2FAOrghf13g/testinginfraimport | 2aabdf29bb969275381215b8fd198c54a9e6229c | [
"Apache-2.0"
] | 1 | 2019-07-24T09:26:57.000Z | 2019-07-24T09:26:57.000Z | homeassistant/components/lovelace/__init__.py | Test2FAOrghf13g/testinginfraimport | 2aabdf29bb969275381215b8fd198c54a9e6229c | [
"Apache-2.0"
] | 5 | 2021-02-08T20:32:11.000Z | 2022-01-13T01:19:23.000Z | homeassistant/components/lovelace/__init__.py | Test2FAOrghf13g/testinginfraimport | 2aabdf29bb969275381215b8fd198c54a9e6229c | [
"Apache-2.0"
] | null | null | null | """Lovelace UI."""
import logging
import uuid
import os
from os import O_CREAT, O_TRUNC, O_WRONLY
from collections import OrderedDict
from typing import Dict, List, Union
import voluptuous as vol
from homeassistant.components import websocket_api
from homeassistant.exceptions import HomeAssistantError
_LOGGER = logg... | 33.562654 | 79 | 0.650952 |
6777fee55113f2cdbcb3daa381d2c66a852d9bf1 | 235 | py | Python | dataviva/apps/calls/models.py | joelvisroman/dataviva-site | b4219558457746fd5c6b8f4b65b04c738c656fbd | [
"MIT"
] | 126 | 2015-03-24T12:30:43.000Z | 2022-01-06T03:29:54.000Z | dataviva/apps/calls/models.py | joelvisroman/dataviva-site | b4219558457746fd5c6b8f4b65b04c738c656fbd | [
"MIT"
] | 694 | 2015-01-14T11:55:28.000Z | 2021-02-08T20:23:11.000Z | dataviva/apps/calls/models.py | joelvisroman/dataviva-site | b4219558457746fd5c6b8f4b65b04c738c656fbd | [
"MIT"
] | 52 | 2015-06-19T01:54:56.000Z | 2019-09-23T13:10:46.000Z | from dataviva import db
class Call(db.Model):
__tablename__ = 'calls'
id = db.Column(db.Integer, primary_key=True)
title = db.Column(db.String(400))
link = db.Column(db.String(250))
active = db.Column(db.Integer)
| 23.5 | 48 | 0.67234 |
331700efb61a68c18a56d1b6dd6da9d063d6c72f | 5,580 | py | Python | model/framework/molgrad/vis.py | ersilia-os/eos96ia | 4f524479afe547fc15140548aeb7d8c99a3b470d | [
"MIT"
] | null | null | null | model/framework/molgrad/vis.py | ersilia-os/eos96ia | 4f524479afe547fc15140548aeb7d8c99a3b470d | [
"MIT"
] | null | null | null | model/framework/molgrad/vis.py | ersilia-os/eos96ia | 4f524479afe547fc15140548aeb7d8c99a3b470d | [
"MIT"
] | null | null | null | import numpy as np
from IPython.display import SVG
from rdkit.Chem import rdDepictor
from rdkit.Chem.Draw import rdMolDraw2D
from rdkit.Chem.rdmolops import AddHs
from molgrad.ig import integrated_gradients
from molgrad.net_utils import get_global_features, mol_to_dgl
rdDepictor.SetPreferCoordGen(True)
GREEN_COL = (... | 30.828729 | 79 | 0.672043 |
90ebf9844ba5fe276142b352f3a6e242b484be4b | 1,828 | py | Python | app.py | Yogi776/Winequality-Model-Deployement-DVC-Pipline | 0443b8a9a986cba1186e1504ded54852e0aed04c | [
"MIT"
] | 1 | 2021-09-27T16:27:07.000Z | 2021-09-27T16:27:07.000Z | app.py | Yogi776/Winequality-Model-Deployement-DVC-Pipline | 0443b8a9a986cba1186e1504ded54852e0aed04c | [
"MIT"
] | null | null | null | app.py | Yogi776/Winequality-Model-Deployement-DVC-Pipline | 0443b8a9a986cba1186e1504ded54852e0aed04c | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request, jsonify
import os
import yaml
import joblib
import numpy as np
params_path = "params.yaml"
webapp_root = "webapp"
static_dir = os.path.join(webapp_root,"static")
template_dir = os.path.join(webapp_root,"templates")
app = Flask(__name__,static_folder=static_dir,templ... | 26.882353 | 75 | 0.624179 |
dc97abac96d377da747d415bdc84199701a649d1 | 1,420 | py | Python | api/management/commands/setupdb.py | ercchy/coding-events | 38db125b351f190e3ff13be7b27d2a4e777cec40 | [
"MIT"
] | null | null | null | api/management/commands/setupdb.py | ercchy/coding-events | 38db125b351f190e3ff13be7b27d2a4e777cec40 | [
"MIT"
] | null | null | null | api/management/commands/setupdb.py | ercchy/coding-events | 38db125b351f190e3ff13be7b27d2a4e777cec40 | [
"MIT"
] | 1 | 2015-09-22T14:56:49.000Z | 2015-09-22T14:56:49.000Z | import sys, os
from django.conf import settings
from django.contrib.auth.models import User
from django.core.management import call_command
from django.core.management.base import NoArgsCommand
class Command(NoArgsCommand):
help = 'Creates django database, creates superusers.'
def handle(self, *args, **optio... | 34.634146 | 88 | 0.645775 |
d718b484e9d4fc84e98ba74ab9f9b06ca98cd2bd | 18,853 | py | Python | scqubits/core/qubit_base.py | PhilippAumann/scqubits | a90b8420a6ebcdf7fc339a43b8ff8e83d2d7bed3 | [
"BSD-3-Clause"
] | 1 | 2021-06-12T03:02:56.000Z | 2021-06-12T03:02:56.000Z | scqubits/core/qubit_base.py | PhilippAumann/scqubits | a90b8420a6ebcdf7fc339a43b8ff8e83d2d7bed3 | [
"BSD-3-Clause"
] | null | null | null | scqubits/core/qubit_base.py | PhilippAumann/scqubits | a90b8420a6ebcdf7fc339a43b8ff8e83d2d7bed3 | [
"BSD-3-Clause"
] | null | null | null | # qubit_base.py
#
# This file is part of scqubits.
#
# Copyright (c) 2019, Jens Koch and Peter Groszkowski
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
##############################################... | 44.255869 | 120 | 0.644937 |
e786608467cc6558fcf3d451e90bf321693a6c82 | 2,106 | py | Python | vycodi/utils.py | seoester/vycodi | 5ce50439068c0505550109c2248a66c187bcebca | [
"MIT"
] | null | null | null | vycodi/utils.py | seoester/vycodi | 5ce50439068c0505550109c2248a66c187bcebca | [
"MIT"
] | null | null | null | vycodi/utils.py | seoester/vycodi | 5ce50439068c0505550109c2248a66c187bcebca | [
"MIT"
] | null | null | null | import json
from io import IOBase
from os.path import exists
import six
def dumpJSON(data):
return json.dumps(data, separators=(',', ':'))
def loadJSON(string):
if isinstance(string, six.binary_type):
string = string.decode('utf-8')
return json.loads(string)
def loadJSONConfig(file):
if isinstance(file, IOB... | 21.489796 | 68 | 0.690883 |
b8fd4355ced1974f4b63e81bc4a45536ef400d6e | 383 | py | Python | Trojan.Android.GM/gmbot/apps/smsg_r/smsg/wsgi.py | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | 2 | 2021-02-04T06:47:45.000Z | 2021-07-28T10:02:10.000Z | Trojan.Android.GM/gmbot/apps/smsg_r/smsg/wsgi.py | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | null | null | null | Trojan.Android.GM/gmbot/apps/smsg_r/smsg/wsgi.py | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | null | null | null | """
WSGI config for smsg project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "smsg.settings")
from django.core.wsgi im... | 25.533333 | 78 | 0.785901 |
c86600ad7e9faed6a710504767922d314b7bdc0b | 7,507 | py | Python | torchvision/datasets/folder.py | Gokkulnath/vision | 7b60f4db9707d7afdbb87fd4e8ef6906ca014720 | [
"BSD-3-Clause"
] | 1 | 2018-08-03T16:31:54.000Z | 2018-08-03T16:31:54.000Z | torchvision/datasets/folder.py | Gokkulnath/vision | 7b60f4db9707d7afdbb87fd4e8ef6906ca014720 | [
"BSD-3-Clause"
] | null | null | null | torchvision/datasets/folder.py | Gokkulnath/vision | 7b60f4db9707d7afdbb87fd4e8ef6906ca014720 | [
"BSD-3-Clause"
] | 1 | 2019-10-23T09:36:40.000Z | 2019-10-23T09:36:40.000Z | from .vision import VisionDataset
from PIL import Image
import os
import os.path
def has_file_allowed_extension(filename, extensions):
"""Checks if a file is an allowed extension.
Args:
filename (string): path to a file
extensions (tuple of strings): extensions to consider (lowercase)
... | 36.091346 | 113 | 0.636073 |
d836832ebc8af0eedd1c9245039f5e49820616cd | 8,376 | py | Python | openiva/workers/data.py | QuantumLiu/OpenIVA | 4c97a28f999965bab1f4e9e9fd0289df96669526 | [
"Apache-2.0"
] | 8 | 2021-12-08T06:46:27.000Z | 2022-01-15T15:36:31.000Z | openiva/workers/data.py | QuantumLiu/OpenIVA | 4c97a28f999965bab1f4e9e9fd0289df96669526 | [
"Apache-2.0"
] | null | null | null | openiva/workers/data.py | QuantumLiu/OpenIVA | 4c97a28f999965bab1f4e9e9fd0289df96669526 | [
"Apache-2.0"
] | 1 | 2022-03-03T02:15:08.000Z | 2022-03-03T02:15:08.000Z | from .import StoppableThread
from queue import Queue,Empty
import traceback
import time
import uuid
from openiva.commons.videocoding import decode_video_batch_local
from openiva.commons.generators import read_images_local
class TaskDATA(object):
def __init__(self,task_id) -> None:
super().__init__()
cl... | 41.671642 | 158 | 0.601003 |
1863db3626145a22867ffb2899e81c870de85b30 | 1,656 | py | Python | api/weatherapi/apps/weather/rest_api/base/views/export_weather_forecasts.py | sferhan/weather-forecasts-drf | 46c76ed6868990f405311734ff234c758f68726a | [
"MIT"
] | 1 | 2021-11-07T18:30:45.000Z | 2021-11-07T18:30:45.000Z | api/weatherapi/apps/weather/rest_api/base/views/export_weather_forecasts.py | sferhan/weather-forecasts-drf | 46c76ed6868990f405311734ff234c758f68726a | [
"MIT"
] | null | null | null | api/weatherapi/apps/weather/rest_api/base/views/export_weather_forecasts.py | sferhan/weather-forecasts-drf | 46c76ed6868990f405311734ff234c758f68726a | [
"MIT"
] | null | null | null | import logging
from drf_yasg import openapi
from drf_yasg.utils import swagger_auto_schema
from rest_framework_csv import renderers as r
from weatherapi.apps.weather.rest_api.base.serializers.error_response import (
ErrorResponseSerializer,
)
from weatherapi.apps.weather.rest_api.base.views.search_weather_forecast... | 47.314286 | 525 | 0.732488 |
ea4c8f1f7ffff6ef6d23ef7cf5c82b9bfc3f9da1 | 9,796 | py | Python | pyaims/src/sip/maketemplates.py | brainvisa/aims-free | 5852c1164292cadefc97cecace022d14ab362dc4 | [
"CECILL-B"
] | 4 | 2019-07-09T05:34:10.000Z | 2020-10-16T00:03:15.000Z | pyaims/src/sip/maketemplates.py | brainvisa/aims-free | 5852c1164292cadefc97cecace022d14ab362dc4 | [
"CECILL-B"
] | 72 | 2018-10-31T14:52:50.000Z | 2022-03-04T11:22:51.000Z | pyaims/src/sip/maketemplates.py | brainvisa/aims-free | 5852c1164292cadefc97cecace022d14ab362dc4 | [
"CECILL-B"
] | null | null | null | #!/usr/bin/env python
# This software and supporting documentation are distributed by
# Institut Federatif de Recherche 49
# CEA/NeuroSpin, Batiment 145,
# 91191 Gif-sur-Yvette cedex
# France
#
# This software is governed by the CeCILL-B license under
# French law and abiding by the rules of distr... | 36.966038 | 77 | 0.586974 |
d3608eaf08804343c4af42447a99bae54910ddf5 | 1,069 | py | Python | setup.py | cleoold/nonebot | 1552c6fcd4e29d9932ef6495b90b3b42c323f3de | [
"MIT"
] | 1 | 2021-08-03T08:49:50.000Z | 2021-08-03T08:49:50.000Z | setup.py | cleoold/nonebot | 1552c6fcd4e29d9932ef6495b90b3b42c323f3de | [
"MIT"
] | null | null | null | setup.py | cleoold/nonebot | 1552c6fcd4e29d9932ef6495b90b3b42c323f3de | [
"MIT"
] | 1 | 2021-08-03T08:50:06.000Z | 2021-08-03T08:50:06.000Z | from setuptools import setup, find_packages
with open('README.md', 'r', encoding='utf-8') as f:
long_description = f.read()
packages = find_packages(include=('nonebot', 'nonebot.*'))
setup(
name='nonebot',
version='1.6.0',
url='https://github.com/nonebot/nonebot',
license='MIT License',
autho... | 29.694444 | 68 | 0.621141 |
fecced04e203d79efb18aae285b1fe2333ee48e4 | 1,622 | py | Python | aries_cloudagent/protocols/issue_credential/v1_0/handlers/credential_offer_handler.py | Dimitrah/aries-cloudagent-python | d401ee850c9735fe12376008e4c3839a2130658b | [
"Apache-2.0"
] | 2 | 2020-02-26T14:22:44.000Z | 2021-05-06T20:13:36.000Z | aries_cloudagent/protocols/issue_credential/v1_0/handlers/credential_offer_handler.py | Dimitrah/aries-cloudagent-python | d401ee850c9735fe12376008e4c3839a2130658b | [
"Apache-2.0"
] | 6 | 2021-03-10T20:05:19.000Z | 2022-02-27T05:41:09.000Z | aries_cloudagent/protocols/issue_credential/v1_0/handlers/credential_offer_handler.py | Dimitrah/aries-cloudagent-python | d401ee850c9735fe12376008e4c3839a2130658b | [
"Apache-2.0"
] | 4 | 2020-02-19T23:02:11.000Z | 2021-11-18T11:33:43.000Z | """Credential offer message handler."""
from .....messaging.base_handler import (
BaseHandler,
BaseResponder,
HandlerException,
RequestContext,
)
from ..manager import CredentialManager
from ..messages.credential_offer import CredentialOffer
class CredentialOfferHandler(BaseHandler):
"""Message ... | 34.510638 | 86 | 0.696054 |
25ee1c8d9641da6ff29e95c8e174f197e364d7c3 | 31,885 | py | Python | numba/tests/test_function_type.py | luk-f-a/numba | 3a682bd827e416335e3574bc7b10f0ec69adb701 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | numba/tests/test_function_type.py | luk-f-a/numba | 3a682bd827e416335e3574bc7b10f0ec69adb701 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 11 | 2020-08-09T02:30:14.000Z | 2022-03-12T00:50:14.000Z | numba/tests/test_function_type.py | luk-f-a/numba | 3a682bd827e416335e3574bc7b10f0ec69adb701 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | import types as pytypes
from numba import jit, njit, cfunc, types, int64, float64, float32, errors
from numba import literal_unroll
from numba.core.config import IS_32BITS, IS_WIN32
import ctypes
import warnings
from .support import TestCase
def dump(foo): # FOR DEBUGGING, TO BE REMOVED
from numba.core import f... | 28.317052 | 79 | 0.490952 |
f77f71c5909beba20765e1e7fb003eb4f343564c | 40 | py | Python | qflow/optimizers/__init__.py | johanere/qflow | 5453cd5c3230ad7f082adf9ec1aea63ab0a4312a | [
"MIT"
] | 5 | 2019-07-24T21:46:24.000Z | 2021-06-11T18:18:24.000Z | qflow/optimizers/__init__.py | johanere/qflow | 5453cd5c3230ad7f082adf9ec1aea63ab0a4312a | [
"MIT"
] | 22 | 2019-02-19T10:49:26.000Z | 2019-07-18T09:42:13.000Z | qflow/optimizers/__init__.py | bsamseth/FYS4411 | 72b879e7978364498c48fc855b5df676c205f211 | [
"MIT"
] | 2 | 2020-11-04T15:17:24.000Z | 2021-11-03T16:37:38.000Z | from _qflow_backend.optimizers import *
| 20 | 39 | 0.85 |
5665699d4f3ecd9de36356e7fede8510536c9b03 | 23,534 | py | Python | homeassistant/components/media_player/__init__.py | oandrew/home-assistant | 03e0c7c71cbc912d15543c417223c935b14a74d1 | [
"MIT"
] | 1 | 2021-04-13T20:22:53.000Z | 2021-04-13T20:22:53.000Z | homeassistant/components/media_player/__init__.py | oandrew/home-assistant | 03e0c7c71cbc912d15543c417223c935b14a74d1 | [
"MIT"
] | null | null | null | homeassistant/components/media_player/__init__.py | oandrew/home-assistant | 03e0c7c71cbc912d15543c417223c935b14a74d1 | [
"MIT"
] | null | null | null | """
Component to interface with various media players.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/media_player/
"""
import asyncio
import hashlib
import logging
import os
from aiohttp import web
import async_timeout
import voluptuous as vol
from h... | 30.844037 | 79 | 0.682077 |
f9d5542a87678af387881ef5299b6d88a7b56438 | 19,072 | py | Python | SST/SST_experiments_pytorch.py | jiangwenj02/glc | 68ff2264f6ca857d248cedceeee0c64da3cc5d6a | [
"Apache-2.0"
] | 90 | 2018-02-16T12:27:54.000Z | 2022-03-26T10:43:44.000Z | SST/SST_experiments_pytorch.py | jiangwenj02/glc | 68ff2264f6ca857d248cedceeee0c64da3cc5d6a | [
"Apache-2.0"
] | 3 | 2018-07-09T13:12:52.000Z | 2021-03-29T08:04:10.000Z | SST/SST_experiments_pytorch.py | jiangwenj02/glc | 68ff2264f6ca857d248cedceeee0c64da3cc5d6a | [
"Apache-2.0"
] | 23 | 2018-03-23T08:06:49.000Z | 2022-03-12T06:58:21.000Z | import numpy as np
import re
import collections
import pickle
import argparse
import torch
import torch.nn as nn
from torch.autograd import Variable as V
import torch.nn.functional as F
parser = argparse.ArgumentParser(description='sst label corruption experiments')
parser.add_argument('--method', default='ours', ty... | 39.002045 | 124 | 0.599413 |
b5c308a38b241e8fac719f217d268f6c476c3a73 | 466 | py | Python | bar.py | MashukeAlam/DX_Ball_pygame | 807ab07afe1e255cab57d9dca71a49c1519523ca | [
"Apache-2.0"
] | null | null | null | bar.py | MashukeAlam/DX_Ball_pygame | 807ab07afe1e255cab57d9dca71a49c1519523ca | [
"Apache-2.0"
] | null | null | null | bar.py | MashukeAlam/DX_Ball_pygame | 807ab07afe1e255cab57d9dca71a49c1519523ca | [
"Apache-2.0"
] | null | null | null | import pygame
_OFFSET = 15
class Bar:
def __init__(self, speed, dim, image):
self.speed = speed
self.image = pygame.transform.scale(image, (80, 10))
self.rect = self.image.get_rect()
self.dim = dim
self.rect.top = dim[1] - _OFFSET
def move(self, mouseX):
if mous... | 22.190476 | 60 | 0.538627 |
afd0d7273a8833c9510bc43c56f01cf77b4d7899 | 161 | py | Python | future/generateHash.py | ludat/SB | 87d7a47825af73238a44d7808aac4bfc4314d411 | [
"MIT"
] | null | null | null | future/generateHash.py | ludat/SB | 87d7a47825af73238a44d7808aac4bfc4314d411 | [
"MIT"
] | 2 | 2015-02-08T05:13:01.000Z | 2015-03-06T06:15:53.000Z | future/generateHash.py | ludat/lueng | 87d7a47825af73238a44d7808aac4bfc4314d411 | [
"MIT"
] | null | null | null | #!/bin/env python3
from base64 import b64encode
from os import urandom
random_bytes = urandom(64)
token = b64encode(random_bytes).decode('utf-8')
print(token)
| 17.888889 | 47 | 0.770186 |
ac1361d883b962b8533c115250c2faf74953307c | 1,507 | py | Python | consumeraffairs/users/tests/test_views.py | sqyttles/Django-Backend-Test | c46d5b2d8a1f98bf3ec69524ab7a2e344514e538 | [
"MIT"
] | null | null | null | consumeraffairs/users/tests/test_views.py | sqyttles/Django-Backend-Test | c46d5b2d8a1f98bf3ec69524ab7a2e344514e538 | [
"MIT"
] | null | null | null | consumeraffairs/users/tests/test_views.py | sqyttles/Django-Backend-Test | c46d5b2d8a1f98bf3ec69524ab7a2e344514e538 | [
"MIT"
] | null | null | null | import pytest
from django.conf import settings
from django.test import RequestFactory
from consumeraffairs.users.views import UserRedirectView, UserUpdateView
pytestmark = pytest.mark.django_db
class TestUserUpdateView:
"""
TODO:
extracting view initialization code as class-scoped fixture
wo... | 27.907407 | 77 | 0.676178 |
6484ccb111b00cff02768e70eabad03df8d08122 | 985 | py | Python | EP_2019/py_impl/simulation/passenger.py | Alisa-lisa/conferences | d93014747dc9d18493295dbc33fa51c8fb9467dc | [
"MIT"
] | 5 | 2019-07-06T07:22:57.000Z | 2020-12-19T22:49:35.000Z | EP_2019/py_impl/simulation/passenger.py | pindash/conferences | 87fcb9f595a244408c015c66283c337d124b358d | [
"MIT"
] | null | null | null | EP_2019/py_impl/simulation/passenger.py | pindash/conferences | 87fcb9f595a244408c015c66283c337d124b358d | [
"MIT"
] | 3 | 2020-06-07T14:58:24.000Z | 2020-11-24T22:51:14.000Z | """ Passenger class that spawns reauests """
from uuid import uuid4
from simulation.request import Request
import random
import numpy as np
class Passenger:
def __init__(self, id, position):
self.id = id
self.position = position
self.awaiting = False
def update(self, x, y):
""... | 28.970588 | 79 | 0.543147 |
5fb368e641ddcbb71c06cb67e05e6d6ddda4e287 | 889 | py | Python | history.py | dantetam/firefox-yt-music-dl | 527f9af8d97ac006b812048fac50494ec3d5f82a | [
"MIT"
] | null | null | null | history.py | dantetam/firefox-yt-music-dl | 527f9af8d97ac006b812048fac50494ec3d5f82a | [
"MIT"
] | null | null | null | history.py | dantetam/firefox-yt-music-dl | 527f9af8d97ac006b812048fac50494ec3d5f82a | [
"MIT"
] | null | null | null | import json
import subprocess
import os
import urllib.request
import re
from pathlib import Path
import sqlite3
from base import *
chosenHistoryFileName = "./history/places.sqlite"
def main():
downloadLimit = 100
# Create a SQL connection to our SQLite database
con = sqlite3.connect(chosenHistoryFileN... | 24.694444 | 109 | 0.67604 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.