hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a0aa0758bfa595cd25f970e948e10a627041392 | 935 | py | Python | tests/api_testing/test_default.py | ooclab/ga.service | 894b4703628b2ce93790db31939009783e8e7b09 | [
"MIT"
] | null | null | null | tests/api_testing/test_default.py | ooclab/ga.service | 894b4703628b2ce93790db31939009783e8e7b09 | [
"MIT"
] | null | null | null | tests/api_testing/test_default.py | ooclab/ga.service | 894b4703628b2ce93790db31939009783e8e7b09 | [
"MIT"
] | null | null | null | # pylint: disable=R0201
import os
from yaml import safe_load
from swagger_spec_validator.util import get_validator
from .base import BaseTestCase
class HealthTestCase(BaseTestCase):
"""GET /_health - 健康检查
"""
def test_health(self):
"""返回正确
"""
resp = self.fetch("/_health")
... | 21.744186 | 73 | 0.617112 |
4a0aa1e7c3d7da93395bb8245c72fb4cb1cae055 | 5,062 | py | Python | tests/test_rollingrank.py | contribu/rollingrank | 33cdeadf5eda724f5d50438ae7b314b3670d3503 | [
"MIT"
] | 9 | 2020-04-03T17:22:59.000Z | 2021-11-19T01:09:54.000Z | tests/test_rollingrank.py | contribu/rollingrank | 33cdeadf5eda724f5d50438ae7b314b3670d3503 | [
"MIT"
] | 3 | 2020-12-17T13:18:06.000Z | 2022-03-02T11:12:47.000Z | tests/test_rollingrank.py | contribu/rollingrank | 33cdeadf5eda724f5d50438ae7b314b3670d3503 | [
"MIT"
] | null | null | null | from unittest import TestCase
import numpy as np
import pandas as pd
import rollingrank
import random
class TestRollingrank(TestCase):
def test_normal_case(self):
x = np.array([0.1, 0.2, 0.3, 0.25, 0.1, 0.2, 0.3])
y = rollingrank.rollingrank(x, window=3)
np.testing.assert_array_equal(y, [np... | 41.491803 | 98 | 0.589885 |
4a0aa27fe4db45a9235e1b363dc0f3b4fd7a4b2a | 7,987 | py | Python | qa/rpc-tests/txn_clone.py | wmchain/wmc1 | b993266ddb5c027e5e301a39669556b02581f854 | [
"MIT"
] | null | null | null | qa/rpc-tests/txn_clone.py | wmchain/wmc1 | b993266ddb5c027e5e301a39669556b02581f854 | [
"MIT"
] | null | null | null | qa/rpc-tests/txn_clone.py | wmchain/wmc1 | b993266ddb5c027e5e301a39669556b02581f854 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# Copyright (c) 2014-2015 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 proper accounting with an equivalent malleability clone
#
from test_framework.test_framework im... | 48.114458 | 115 | 0.60924 |
4a0aa465c6bdbbc5440de7a5515951e1d7118fcf | 21,268 | py | Python | espnet/nets/pytorch_backend/e2e_sid_transformer.py | creatorscan/espnet-asrtts | e516601bd550aeb5d75ee819749c743fc4777eee | [
"Apache-2.0"
] | 5 | 2021-04-17T13:12:20.000Z | 2022-02-22T09:36:45.000Z | espnet/nets/pytorch_backend/e2e_sid_transformer.py | creatorscan/espnet-asrtts | e516601bd550aeb5d75ee819749c743fc4777eee | [
"Apache-2.0"
] | null | null | null | espnet/nets/pytorch_backend/e2e_sid_transformer.py | creatorscan/espnet-asrtts | e516601bd550aeb5d75ee819749c743fc4777eee | [
"Apache-2.0"
] | 5 | 2020-02-24T08:13:54.000Z | 2022-02-22T09:03:09.000Z | # Copyright 2019 Shigeki Karita
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
from argparse import Namespace
from distutils.util import strtobool
import logging
import math
import torch
from espnet.nets.asr_interface import ASRInterface
from espnet.nets.pytorch_backend.ctc import CTC
from espnet.nets.p... | 44.124481 | 115 | 0.588772 |
4a0aa4825f75e8b41abd17783e211c64f5316d62 | 932 | py | Python | 0169.Majority Element/solution.py | zhlinh/leetcode | 6dfa0a4df9ec07b2c746a13c8257780880ea04af | [
"Apache-2.0"
] | null | null | null | 0169.Majority Element/solution.py | zhlinh/leetcode | 6dfa0a4df9ec07b2c746a13c8257780880ea04af | [
"Apache-2.0"
] | null | null | null | 0169.Majority Element/solution.py | zhlinh/leetcode | 6dfa0a4df9ec07b2c746a13c8257780880ea04af | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
*****************************************
Author: zhlinh
Email: zhlinhng@gmail.com
Version: 0.0.1
Created Time: 2016-03-22
Last_modify: 2016-03-22
******************************************
'''
'''
Given an array of size n, find the majorit... | 25.189189 | 74 | 0.530043 |
4a0aa4ccadf6d0b04891719e11482d77d70b5b07 | 918 | py | Python | wxPython/CommonControls/CommandLinkButton/CommandLinkButton.py | Python-clique/Examples_Python | 1f86a50b43177a7ee03bef43cb37ceb657a952a4 | [
"MIT"
] | 1 | 2020-09-08T05:36:32.000Z | 2020-09-08T05:36:32.000Z | wxPython/CommonControls/CommandLinkButton/CommandLinkButton.py | Python-clique/Examples_Python | 1f86a50b43177a7ee03bef43cb37ceb657a952a4 | [
"MIT"
] | null | null | null | wxPython/CommonControls/CommandLinkButton/CommandLinkButton.py | Python-clique/Examples_Python | 1f86a50b43177a7ee03bef43cb37ceb657a952a4 | [
"MIT"
] | 2 | 2021-09-21T09:57:38.000Z | 2021-09-30T11:16:31.000Z | #!/usr/bin/env python3
# -*-coding:utf-8 -*
import wx
import wx.adv
class Frame1(wx.Frame):
def __init__(self):
super().__init__(None, wx.ID_ANY, 'Command link button example', wx.DefaultPosition, wx.Size(300, 300))
self.commandLinkButton1Clicked = 0
self.panel = wx.Panel(self)
self.commandLinkButto... | 39.913043 | 141 | 0.734205 |
4a0aa62af53e58172657e9e787ef6a6b0a67eccc | 1,646 | py | Python | lab/lab4 Regular Expressions.py | SilvesterHsu/COM6115 | 94acc02a844138915fce1afaf7169aab0b6b9d4d | [
"MIT"
] | null | null | null | lab/lab4 Regular Expressions.py | SilvesterHsu/COM6115 | 94acc02a844138915fce1afaf7169aab0b6b9d4d | [
"MIT"
] | null | null | null | lab/lab4 Regular Expressions.py | SilvesterHsu/COM6115 | 94acc02a844138915fce1afaf7169aab0b6b9d4d | [
"MIT"
] | 1 | 2021-02-04T00:23:55.000Z | 2021-02-04T00:23:55.000Z | import re
PATH = 'lab/data/RGX_DATA.html'
def load(PATH):
with open(PATH) as handle:
text = handle.read()
return text
text = load(PATH)
# QUESTION: 1
def Q1(text):
rule = re.compile("<(.*?)>",re.I)
for tag in rule.findall(text):
print("TAG: {}".format(tag))
Q1(text)
# QUESTION: 2
... | 21.102564 | 79 | 0.532199 |
4a0aa7c53739b0a4a112e280a2a8a2e7e3dee74d | 1,177 | py | Python | backend/api/authentication/migrations/0003_auto_20200601_2036.py | jacorea/ismp | 81cf55559005753f3055165689889b18aec958ac | [
"CC0-1.0"
] | 3 | 2020-05-08T03:51:43.000Z | 2020-06-13T23:12:26.000Z | backend/api/authentication/migrations/0003_auto_20200601_2036.py | jacorea/ismp | 81cf55559005753f3055165689889b18aec958ac | [
"CC0-1.0"
] | 15 | 2020-05-04T05:49:17.000Z | 2020-06-01T21:31:03.000Z | backend/api/authentication/migrations/0003_auto_20200601_2036.py | jacorea/ismp | 81cf55559005753f3055165689889b18aec958ac | [
"CC0-1.0"
] | 11 | 2020-05-01T04:35:24.000Z | 2020-05-28T17:17:21.000Z | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('auth', '0011_update_proxy_permissions'),
('authentication', '0002_auto_20200530_2129'),
]
operations = [
migrations.AlterField(
model_name='user',
name='grou... | 36.78125 | 101 | 0.497876 |
4a0aaa43a3a276e862d7ac6a27a0072cae85026d | 1,561 | py | Python | core/migrations/0006_change_fields_as_not_null.py | profesormig/quimica3a | a453f0d7485ebc4b2d7b06a72b44c6c179a3bbd4 | [
"BSD-3-Clause"
] | null | null | null | core/migrations/0006_change_fields_as_not_null.py | profesormig/quimica3a | a453f0d7485ebc4b2d7b06a72b44c6c179a3bbd4 | [
"BSD-3-Clause"
] | null | null | null | core/migrations/0006_change_fields_as_not_null.py | profesormig/quimica3a | a453f0d7485ebc4b2d7b06a72b44c6c179a3bbd4 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def remove_null_entries(apps, schema_editor):
ProviderMachineMembership = apps.get_model(
"core",
"ProviderMachineMembership")
MachineRequest = apps.get_model("core", "MachineRequest")
... | 33.934783 | 76 | 0.663037 |
4a0aaa54aa3a1dab74512493ff458eb0b1eea5f6 | 3,979 | py | Python | mmdet/apis/train.py | limbo0000/InstanceLoc | a419bb6d27d05f5224a734a91a9f366ed815c1e1 | [
"Apache-2.0"
] | 120 | 2021-02-16T12:06:05.000Z | 2022-03-30T03:38:37.000Z | mmdet/apis/train.py | limbo0000/InstanceLoc | a419bb6d27d05f5224a734a91a9f366ed815c1e1 | [
"Apache-2.0"
] | 19 | 2021-02-22T12:52:31.000Z | 2022-03-07T12:04:03.000Z | mmdet/apis/train.py | limbo0000/InstanceLoc | a419bb6d27d05f5224a734a91a9f366ed815c1e1 | [
"Apache-2.0"
] | 9 | 2021-02-22T02:35:20.000Z | 2022-02-25T05:38:52.000Z | import random
import numpy as np
import torch
from mmcv.parallel import MMDataParallel, MMDistributedDataParallel
from mmcv.runner import (DistSamplerSeedHook, EpochBasedRunner, OptimizerHook,
build_optimizer)
from mmdet.core import DistEvalHook, EvalHook
from mmdet.datasets import build_data... | 35.526786 | 79 | 0.634079 |
4a0aac62403724e03620d85e424dcf4ae8885617 | 359 | py | Python | accounts/models.py | michaelachrisco/djangorest | 562446291d1cdbd82b68fd366bc65d0e1a5a6b7f | [
"MIT"
] | 1 | 2020-02-20T23:29:29.000Z | 2020-02-20T23:29:29.000Z | accounts/models.py | michaelachrisco/djangorest | 562446291d1cdbd82b68fd366bc65d0e1a5a6b7f | [
"MIT"
] | 8 | 2020-03-04T07:15:33.000Z | 2021-09-22T18:41:10.000Z | accounts/models.py | michaelachrisco/djangorest | 562446291d1cdbd82b68fd366bc65d0e1a5a6b7f | [
"MIT"
] | null | null | null | from django.db import models
class Account(models.Model):
name = models.CharField(max_length=30)
description = models.TextField(null=True, blank=True)
class Transaction(models.Model):
amount = models.DecimalField(decimal_places=2, default=0.00, max_digits=7)
action_datetime = models.DateField()
... | 27.615385 | 78 | 0.749304 |
4a0aad8776b099ecf40a975a300b5e63d2c61392 | 4,034 | py | Python | sublime_tower.py | dersimn/sublime_tower_plugin | 7cf895426d94ff0fc5dcfa0aa1f89dce8d72367f | [
"MIT"
] | null | null | null | sublime_tower.py | dersimn/sublime_tower_plugin | 7cf895426d94ff0fc5dcfa0aa1f89dce8d72367f | [
"MIT"
] | null | null | null | sublime_tower.py | dersimn/sublime_tower_plugin | 7cf895426d94ff0fc5dcfa0aa1f89dce8d72367f | [
"MIT"
] | null | null | null | """
Open git repos from Sublime Text in Tower.
If you regularly open a shell to run `$ gittower .`, this is faster.
"""
import os.path
import subprocess
import sublime
import sublime_plugin
def build_cmd_is_in_repo(path):
return 'cd "{}" && git rev-parse --is-inside-work-tree'.format(path)
def build_cmd_get_... | 26.194805 | 80 | 0.615766 |
4a0aae1572af5f9628d1c2b43041eee53a401027 | 1,984 | py | Python | embedding/w2v/train.py | akkefa/Islam-360 | 2fa49872f92e1abcb9a31a893b4654f7485711ae | [
"MIT"
] | null | null | null | embedding/w2v/train.py | akkefa/Islam-360 | 2fa49872f92e1abcb9a31a893b4654f7485711ae | [
"MIT"
] | null | null | null | embedding/w2v/train.py | akkefa/Islam-360 | 2fa49872f92e1abcb9a31a893b4654f7485711ae | [
"MIT"
] | null | null | null | # coding: utf8
"""Train"""
import csv
from multiprocessing import cpu_count
import gensim
from gensim.models.word2vec import LineSentence
from sklearn.metrics import accuracy_score
from sklearn.model_selection import ParameterGrid
# logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging... | 32.52459 | 115 | 0.602823 |
4a0aae2692324cb26a284e3182d7e39beceec202 | 224 | py | Python | pytrackmate/tests/test_trackmate.py | zindy/pytrackmate | a1eda3610b9822d71601c8a69c1b4de5abdc73b4 | [
"BSD-3-Clause"
] | 5 | 2020-09-14T13:57:23.000Z | 2021-11-30T22:02:32.000Z | pytrackmate/tests/test_trackmate.py | zindy/pytrackmate | a1eda3610b9822d71601c8a69c1b4de5abdc73b4 | [
"BSD-3-Clause"
] | 3 | 2020-11-16T21:07:45.000Z | 2021-07-02T12:26:28.000Z | pytrackmate/tests/test_trackmate.py | zindy/pytrackmate | a1eda3610b9822d71601c8a69c1b4de5abdc73b4 | [
"BSD-3-Clause"
] | 5 | 2020-09-14T12:25:01.000Z | 2022-02-14T10:36:19.000Z | import os
from pytrackmate import trackmate_peak_import
def test_import():
fname = os.path.join(os.path.dirname(__file__), "FakeTracks.xml")
spots = trackmate_peak_import(fname)
assert spots.shape == (12, 17)
| 22.4 | 69 | 0.732143 |
4a0aaf425d917b692acaf76690c5c3c69b964a08 | 740 | py | Python | woid/apps/services/migrations/0018_tweet.py | gsdeeksha/makeiteasy | e05afc739dabf6fcd76ca1511b3f8a0395879d61 | [
"Apache-2.0"
] | 2 | 2019-07-09T08:55:12.000Z | 2019-10-16T10:24:42.000Z | woid/apps/services/migrations/0018_tweet.py | gsdeeksha/makeiteasy | e05afc739dabf6fcd76ca1511b3f8a0395879d61 | [
"Apache-2.0"
] | 3 | 2020-02-12T00:54:26.000Z | 2021-06-10T21:39:41.000Z | woid/apps/services/migrations/0018_tweet.py | gsdeeksha/makeiteasy | e05afc739dabf6fcd76ca1511b3f8a0395879d61 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.1.5 on 2019-06-28 06:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('services', '0017_auto_20190109_1956'),
]
operations = [
migrations.CreateModel(
name='Tweet',
fields=[
... | 30.833333 | 114 | 0.583784 |
4a0aafc844635a48e675337a8bed299d0e769f32 | 9,910 | py | Python | accounts/views.py | chandra-prakash-code/editor | 727b3523ca58a91afe91260850c8a0da6a2b37a0 | [
"Apache-2.0"
] | 1 | 2020-10-15T08:21:13.000Z | 2020-10-15T08:21:13.000Z | accounts/views.py | adad20/editor | 2446a70dfb8cb0d2ac9bd75c5552418e2f413edd | [
"Apache-2.0"
] | null | null | null | accounts/views.py | adad20/editor | 2446a70dfb8cb0d2ac9bd75c5552418e2f413edd | [
"Apache-2.0"
] | null | null | null | from zipfile import ZipFile
import json
try:
from cStringIO import StringIO
except ImportError:
from io import StringIO
from accounts.forms import NumbasRegistrationForm, DeactivateUserForm, ReassignContentForm
from accounts.forms import UserProfileForm, ChangePasswordForm
from accounts.models impor... | 37.255639 | 119 | 0.662664 |
4a0aaffe64906551a0a17593b731546c5db01776 | 2,575 | py | Python | model_history/compat.py | rsalmaso/django-model-history | 41321acfc3c5db4dd29fe3e452c2603f578c59ca | [
"MIT"
] | null | null | null | model_history/compat.py | rsalmaso/django-model-history | 41321acfc3c5db4dd29fe3e452c2603f578c59ca | [
"MIT"
] | null | null | null | model_history/compat.py | rsalmaso/django-model-history | 41321acfc3c5db4dd29fe3e452c2603f578c59ca | [
"MIT"
] | null | null | null | # Copyright (C) 2007-2017, Raffaele Salmaso <raffaele@salmaso.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, cop... | 37.318841 | 95 | 0.71767 |
4a0ab2ba9439879527110fdd2eebe0686097f08c | 43,471 | py | Python | models_all_solvable2/rsyn0805h.py | grossmann-group/pyomo-MINLP-benchmarking | 714f0a0dffd61675649a805683c0627af6b4929e | [
"MIT"
] | 7 | 2019-05-08T19:14:34.000Z | 2021-12-24T00:00:40.000Z | models_all_solvable2/rsyn0805h.py | grossmann-group/pyomo-MINLP-benchmarking | 714f0a0dffd61675649a805683c0627af6b4929e | [
"MIT"
] | null | null | null | models_all_solvable2/rsyn0805h.py | grossmann-group/pyomo-MINLP-benchmarking | 714f0a0dffd61675649a805683c0627af6b4929e | [
"MIT"
] | 2 | 2020-05-21T22:15:51.000Z | 2020-06-02T23:02:08.000Z | # MINLP written by GAMS Convert at 05/15/20 00:51:13
#
# Equation counts
# Total E G L N X C B
# 430 207 9 214 0 0 0 0
#
# Variable counts
# x b i s1s s2s sc ... | 36.256047 | 119 | 0.639737 |
4a0ab2fbbb9894365a04cf6252833961e5fc303a | 9,657 | py | Python | asposeslidescloud/models/image_export_options.py | rizwanniazigroupdocs/aspose-slides-cloud-python | f692a7082387350f80f0b389c1914e33b800a76f | [
"MIT"
] | null | null | null | asposeslidescloud/models/image_export_options.py | rizwanniazigroupdocs/aspose-slides-cloud-python | f692a7082387350f80f0b389c1914e33b800a76f | [
"MIT"
] | null | null | null | asposeslidescloud/models/image_export_options.py | rizwanniazigroupdocs/aspose-slides-cloud-python | f692a7082387350f80f0b389c1914e33b800a76f | [
"MIT"
] | null | null | null | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose">
# Copyright (c) 2018 Aspose.Slides for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associa... | 39.416327 | 177 | 0.623382 |
4a0ab3467b0e8d79f90d067c5362b24cc643f7bf | 3,855 | py | Python | src/passthrough/label_tools.py | ExoMars-PanCam/passthrough | 7ff9f82e4c85c40a4f2dab20bbee1c46d79d61a5 | [
"MIT"
] | 2 | 2021-05-04T04:30:37.000Z | 2021-05-04T12:17:22.000Z | src/passthrough/label_tools.py | ExoMars-PanCam/passthrough | 7ff9f82e4c85c40a4f2dab20bbee1c46d79d61a5 | [
"MIT"
] | 4 | 2021-05-04T16:56:49.000Z | 2021-05-12T17:00:07.000Z | src/passthrough/label_tools.py | ExoMars-PanCam/passthrough | 7ff9f82e4c85c40a4f2dab20bbee1c46d79d61a5 | [
"MIT"
] | null | null | null | """PDS4 label interrogation and manipulation functionality"""
__all__ = [
"LabelLike",
"PDS_NS_PREFIX",
"ATTR_PATHS",
"labellike_to_etree",
"add_default_ns",
"is_populated",
"PathManipulator",
]
from pathlib import Path
from typing import Dict, Optional, Union
from lxml import etree
try:... | 33.232759 | 88 | 0.649027 |
4a0ab36a012b894aa17aaef3cec1dc4dc70cc32e | 546 | py | Python | tsaotun/lib/Docker/Addon/disable.py | qazbnm456/tsaotun | 70186faebd5303961d5996c758f7c9147c4439ba | [
"Apache-2.0"
] | 47 | 2017-01-15T08:33:46.000Z | 2022-02-11T22:37:48.000Z | tsaotun/lib/Docker/Addon/disable.py | qazbnm456/dokcer | 70186faebd5303961d5996c758f7c9147c4439ba | [
"Apache-2.0"
] | null | null | null | tsaotun/lib/Docker/Addon/disable.py | qazbnm456/dokcer | 70186faebd5303961d5996c758f7c9147c4439ba | [
"Apache-2.0"
] | 2 | 2017-01-16T13:10:22.000Z | 2019-03-28T17:05:04.000Z | """This module contains `tsaotun addon disable` class"""
from .command import Command
from ....lib.Addon.loader import Loader
class Disable(Command):
"""This class implements `tsaotun addon disable` command"""
name = "addon disable"
require = []
def __init__(self):
Command.__init__(self)
... | 23.73913 | 64 | 0.652015 |
4a0ab4810aa683c3902507c036516293dfbd8701 | 4,517 | py | Python | converter/cli.py | OasisLMF/OasisDataConverter | c1cad71431558db8eab065e7b085603452300210 | [
"BSD-3-Clause"
] | 2 | 2021-06-11T13:18:35.000Z | 2021-07-14T16:25:04.000Z | converter/cli.py | OasisLMF/OasisDataConverter | c1cad71431558db8eab065e7b085603452300210 | [
"BSD-3-Clause"
] | 17 | 2020-08-11T11:35:06.000Z | 2021-07-22T15:15:34.000Z | converter/cli.py | OasisLMF/OasisDataConverter | c1cad71431558db8eab065e7b085603452300210 | [
"BSD-3-Clause"
] | 2 | 2020-11-11T12:02:04.000Z | 2021-03-29T13:56:32.000Z | import logging
import os
import sys
from datetime import datetime
from logging.config import dictConfig as loggingDictConfig
import click
import yaml
from converter.config import Config
from converter.controller import Controller
class ColorFormatter(logging.Formatter):
"""
Changes the color of the log mess... | 24.818681 | 79 | 0.556121 |
4a0ab5404f67a5b2a3a0df23367083d11fc772e3 | 5,570 | py | Python | sailfish/setups/envelope_shock.py | macfadyen/sailfish | 44752a6769a2a7566a90dd9c8df21d4e2c49d720 | [
"MIT"
] | 9 | 2021-06-29T15:43:58.000Z | 2022-03-20T10:13:26.000Z | sailfish/setups/envelope_shock.py | macfadyen/sailfish | 44752a6769a2a7566a90dd9c8df21d4e2c49d720 | [
"MIT"
] | 1 | 2021-12-23T00:00:46.000Z | 2021-12-23T00:00:46.000Z | sailfish/setups/envelope_shock.py | macfadyen/sailfish | 44752a6769a2a7566a90dd9c8df21d4e2c49d720 | [
"MIT"
] | 8 | 2021-06-09T09:11:15.000Z | 2021-11-02T20:25:27.000Z | """
Contains a setup for studying a relativistic type-II shockwave.
"""
from math import pi, exp, log10
from sailfish.setup import Setup, SetupError, param
from sailfish.mesh import LogSphericalMesh
__all__ = ["EnvelopeShock"]
class EnvelopeShock(Setup):
"""
A relativistic shell launched into a homologous,... | 29.162304 | 88 | 0.551885 |
4a0ab5f1a06e21dc55e3453a873f644435367846 | 9,754 | py | Python | pysster/Motif.py | sproft/pysster | b2634262f5bdfffc46461ec0f753e9fc743107ec | [
"MIT"
] | null | null | null | pysster/Motif.py | sproft/pysster | b2634262f5bdfffc46461ec0f753e9fc743107ec | [
"MIT"
] | null | null | null | pysster/Motif.py | sproft/pysster | b2634262f5bdfffc46461ec0f753e9fc743107ec | [
"MIT"
] | null | null | null | import numpy as np
from os.path import dirname
from collections import Counter
from copy import deepcopy
from math import log
from PIL import Image, ImageDraw, ImageFont, ImageChops, ImageColor
class Motif:
"""
The Motif class is a convenience class to compute and plot a position-weight matrix (PWM)... | 43.936937 | 108 | 0.565409 |
4a0ab6383b70a4b343e4c77257f7c13826aafbc8 | 172,875 | py | Python | src/sage/graphs/generators/smallgraphs.py | Ivo-Maffei/DistanceRegular | d4dedd5c3e7da73111168fcce60d1f180fe24019 | [
"BSL-1.0"
] | 1 | 2020-05-19T22:34:03.000Z | 2020-05-19T22:34:03.000Z | src/sage/graphs/generators/smallgraphs.py | Ivo-Maffei/DistanceRegular | d4dedd5c3e7da73111168fcce60d1f180fe24019 | [
"BSL-1.0"
] | null | null | null | src/sage/graphs/generators/smallgraphs.py | Ivo-Maffei/DistanceRegular | d4dedd5c3e7da73111168fcce60d1f180fe24019 | [
"BSL-1.0"
] | 3 | 2020-03-29T17:13:36.000Z | 2021-05-03T18:11:28.000Z | # -*- coding: utf-8 -*-
r"""
Small graphs
The methods defined here appear in :mod:`sage.graphs.graph_generators`.
"""
#*****************************************************************************
# Copyright (C) 2006 Robert L. Miller <rlmillster@gmail.com>
# and Emily A. Kirkman... | 33.451045 | 149 | 0.533744 |
4a0ab6af83691bca10ba35c6cc51026c88cc4540 | 9,739 | py | Python | django/core/management/commands/squashmigrations.py | QinMing/django | 162ae9c9143aa85eb27ea69b446a28973eea4854 | [
"PSF-2.0",
"BSD-3-Clause"
] | 19 | 2015-07-07T02:08:59.000Z | 2021-11-08T11:05:40.000Z | django/core/management/commands/squashmigrations.py | QinMing/django | 162ae9c9143aa85eb27ea69b446a28973eea4854 | [
"PSF-2.0",
"BSD-3-Clause"
] | 1 | 2020-01-31T11:30:21.000Z | 2020-01-31T11:30:21.000Z | django/core/management/commands/squashmigrations.py | QinMing/django | 162ae9c9143aa85eb27ea69b446a28973eea4854 | [
"PSF-2.0",
"BSD-3-Clause"
] | 145 | 2019-03-14T18:54:45.000Z | 2022-03-04T20:25:31.000Z | from django.apps import apps
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.db import DEFAULT_DB_ALIAS, connections, migrations
from django.db.migrations.loader import AmbiguityError, MigrationLoader
from django.db.migrations.migration import SwappableTupl... | 45.297674 | 119 | 0.595852 |
4a0ab6c4067066fa4c265954ee71cddb0e20cb13 | 1,342 | py | Python | bsuite/bsuite/experiments/cartpole_swingup/cartpole_swingup_test.py | hbutsuak95/iv_rl | 0f72a8f077a238237027ea96b7d1160c35ac9959 | [
"MIT"
] | 1,337 | 2019-08-13T09:25:31.000Z | 2022-03-28T14:30:04.000Z | bsuite/bsuite/experiments/cartpole_swingup/cartpole_swingup_test.py | hbutsuak95/iv_rl | 0f72a8f077a238237027ea96b7d1160c35ac9959 | [
"MIT"
] | 37 | 2019-08-13T19:08:01.000Z | 2021-05-20T15:32:06.000Z | bsuite/bsuite/experiments/cartpole_swingup/cartpole_swingup_test.py | hbutsuak95/iv_rl | 0f72a8f077a238237027ea96b7d1160c35ac9959 | [
"MIT"
] | 194 | 2019-08-13T18:06:07.000Z | 2022-03-24T05:50:10.000Z | # python3
# pylint: disable=g-bad-file-header
# Copyright 2019 DeepMind Technologies Limited. 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... | 32.731707 | 78 | 0.722057 |
4a0ab75dd4ab4bc4c9acd0e482a5ca7420ab3c4f | 2,320 | py | Python | test/Fortran/F90COMSTR.py | moroten/scons | 20927b42ed4f0cb87f51287fa3b4b6cf915afcf8 | [
"MIT"
] | 1,403 | 2017-11-23T14:24:01.000Z | 2022-03-30T20:59:39.000Z | test/Fortran/F90COMSTR.py | moroten/scons | 20927b42ed4f0cb87f51287fa3b4b6cf915afcf8 | [
"MIT"
] | 3,708 | 2017-11-27T13:47:12.000Z | 2022-03-29T17:21:17.000Z | test/Fortran/F90COMSTR.py | moroten/scons | 20927b42ed4f0cb87f51287fa3b4b6cf915afcf8 | [
"MIT"
] | 281 | 2017-12-01T23:48:38.000Z | 2022-03-31T15:25:44.000Z | #!/usr/bin/env python
#
# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
... | 34.117647 | 81 | 0.709483 |
4a0ab890b6d0d040ee3318ebb299bb01b4d3e646 | 6,792 | py | Python | python/GafferSceneTest/IECoreGLPreviewTest/RendererTest.py | sebaDesmet/gaffer | 47b2d093c40452bd77947e3b5bd0722a366c8d59 | [
"BSD-3-Clause"
] | null | null | null | python/GafferSceneTest/IECoreGLPreviewTest/RendererTest.py | sebaDesmet/gaffer | 47b2d093c40452bd77947e3b5bd0722a366c8d59 | [
"BSD-3-Clause"
] | null | null | null | python/GafferSceneTest/IECoreGLPreviewTest/RendererTest.py | sebaDesmet/gaffer | 47b2d093c40452bd77947e3b5bd0722a366c8d59 | [
"BSD-3-Clause"
] | null | null | null | ##########################################################################
#
# Copyright (c) 2017, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistrib... | 29.402597 | 128 | 0.66755 |
4a0ab9510b9828ec238beba30bcffcac7ec8675f | 3,061 | py | Python | lamlight/aws_resources/ec2_utils.py | Rohit25negi/lamlight | 5ae455f8018efef8aa0049825d73777311a806a7 | [
"MIT"
] | 40 | 2017-12-03T13:12:51.000Z | 2018-05-24T10:03:46.000Z | lamlight/aws_resources/ec2_utils.py | Rohit25negi/lamlight | 5ae455f8018efef8aa0049825d73777311a806a7 | [
"MIT"
] | 10 | 2018-05-19T13:37:57.000Z | 2018-06-15T10:09:41.000Z | lamlight/aws_resources/ec2_utils.py | Rohit25negi/Lamlight | 5ae455f8018efef8aa0049825d73777311a806a7 | [
"MIT"
] | 1 | 2018-04-25T05:12:17.000Z | 2018-04-25T05:12:17.000Z | """
Module provides the following utilities:
1) List the available subnets and let user select one.
2) List the available IAM roles and let user selecrt one.
3) List the available Security Groups and let user select one.
"""
import os
import boto3
def get_subnet_id():
"""
Returns the subnet id fo... | 34.784091 | 92 | 0.504084 |
4a0ab977d2bfc18f74500f65c190f6a2342e80b2 | 485 | py | Python | tests/atest/transformers/NormalizeSettingName/test_transformer.py | Liambeguin/robotframework-tidy | c67875f9d40dacff974256dda16501190b5faa2d | [
"Apache-2.0"
] | 37 | 2020-12-02T19:55:16.000Z | 2022-03-27T09:47:27.000Z | tests/atest/transformers/NormalizeSettingName/test_transformer.py | Liambeguin/robotframework-tidy | c67875f9d40dacff974256dda16501190b5faa2d | [
"Apache-2.0"
] | 223 | 2020-12-03T15:44:48.000Z | 2022-03-29T07:10:41.000Z | tests/atest/transformers/NormalizeSettingName/test_transformer.py | Liambeguin/robotframework-tidy | c67875f9d40dacff974256dda16501190b5faa2d | [
"Apache-2.0"
] | 7 | 2021-01-24T21:38:53.000Z | 2022-03-24T17:11:11.000Z | from .. import run_tidy_and_compare
class TestNormalizeSettingName:
TRANSFORMER_NAME = 'NormalizeSettingName'
def test_normalize_setting_name(self):
run_tidy_and_compare(self.TRANSFORMER_NAME, source='tests.robot')
def test_normalize_setting_name_selected(self):
run_tidy_and_compare(
... | 28.529412 | 73 | 0.682474 |
4a0ab9eacf08de65b3f21afb1a5be61b8bae8d39 | 3,757 | py | Python | fastreid/data/datasets/vehicleid.py | tycallen/fast-reid | 66683fa95bc7d7222659e8db3ac04e5b8e366190 | [
"Apache-2.0"
] | 4 | 2021-04-26T05:35:37.000Z | 2021-08-29T23:36:44.000Z | fastreid/data/datasets/vehicleid.py | tycallen/fast-reid | 66683fa95bc7d7222659e8db3ac04e5b8e366190 | [
"Apache-2.0"
] | null | null | null | fastreid/data/datasets/vehicleid.py | tycallen/fast-reid | 66683fa95bc7d7222659e8db3ac04e5b8e366190 | [
"Apache-2.0"
] | 1 | 2021-04-26T05:35:38.000Z | 2021-04-26T05:35:38.000Z | # encoding: utf-8
"""
@author: Jinkai Zheng
@contact: 1315673509@qq.com
"""
import os.path as osp
import random
from .bases import ImageDataset
from ..datasets import DATASET_REGISTRY
@DATASET_REGISTRY.register()
class VehicleID(ImageDataset):
"""VehicleID.
Reference:
Liu et al. Deep relative dist... | 30.056 | 108 | 0.620708 |
4a0aba1b020862032f87786e7f35d81670da9d0c | 151 | py | Python | datasets/__init__.py | ml-research/Do-Not-Trust-Prediction-Scores-for-Membership-Inference-Attacks | 396a4d903a97e10c3a1ecfec131a660aaf9a384e | [
"MIT"
] | 3 | 2021-11-17T14:14:52.000Z | 2021-12-13T09:35:11.000Z | datasets/__init__.py | ml-research/Do-Not-Trust-Prediction-Scores-for-Membership-Inference-Attacks | 396a4d903a97e10c3a1ecfec131a660aaf9a384e | [
"MIT"
] | null | null | null | datasets/__init__.py | ml-research/Do-Not-Trust-Prediction-Scores-for-Membership-Inference-Attacks | 396a4d903a97e10c3a1ecfec131a660aaf9a384e | [
"MIT"
] | 1 | 2021-12-10T07:37:16.000Z | 2021-12-10T07:37:16.000Z | from .fake_cifar10 import FakeCIFAR10
from .stanford_dogs import StanfordDogs
from .afhq import AFHQ
__all__ = ['FakeCIFAR10', 'StanfordDogs', 'AFHQ'] | 30.2 | 49 | 0.794702 |
4a0abbe9a67f18568113435048d75483eb4a5cd4 | 5,237 | py | Python | src/grammar_learner/kmeans.py | vsbogd/language-learning | 601e7bc7f97a0b6c1f713f8108fc6e81d492e921 | [
"MIT"
] | 21 | 2018-01-30T08:18:20.000Z | 2020-02-18T08:15:53.000Z | src/grammar_learner/kmeans.py | vsbogd/language-learning | 601e7bc7f97a0b6c1f713f8108fc6e81d492e921 | [
"MIT"
] | 3 | 2018-02-09T18:22:45.000Z | 2018-07-10T10:31:25.000Z | src/grammar_learner/kmeans.py | vsbogd/language-learning | 601e7bc7f97a0b6c1f713f8108fc6e81d492e921 | [
"MIT"
] | 10 | 2018-01-30T10:31:43.000Z | 2021-01-26T07:54:24.000Z | #language-learning/src/grammar_learner/kmeans.py POC.0.5 80725 as-was tmp
import logging
import numpy as np
import pandas as pd
from sklearn.cluster import KMeans
from sklearn.metrics import pairwise_distances, silhouette_score
from statistics import mode
from .utl import round1, round2, round3
# -from kmeans import cl... | 43.641667 | 96 | 0.638152 |
4a0abcb18de9ee16b7edff3bb436b2225c04f2b5 | 192 | py | Python | button/base_btn.py | PitPietro/gpiozero-pyqt5 | 0384d34348841d193c025a1909d909d1bf772a7d | [
"MIT"
] | null | null | null | button/base_btn.py | PitPietro/gpiozero-pyqt5 | 0384d34348841d193c025a1909d909d1bf772a7d | [
"MIT"
] | null | null | null | button/base_btn.py | PitPietro/gpiozero-pyqt5 | 0384d34348841d193c025a1909d909d1bf772a7d | [
"MIT"
] | null | null | null | from gpiozero import Button
button = Button(2)
while True:
if button.is_pressed:
print("Button is pressed - LOW")
else:
print("Button is not pressed - HIGH")
| 19.2 | 45 | 0.614583 |
4a0abce08077970a4b73fb0b39738f1c555aa2a4 | 676 | py | Python | WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/time/time_get_clock_info.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/time/time_get_clock_info.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/time/time_get_clock_info.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | """The difference between clock and time.
"""
# end_pymotw_header
import textwrap
import time
available_clocks = [
("monotonic", time.monotonic),
("perf_counter", time.perf_counter),
("process_time", time.process_time),
("time", time.time),
]
for clock_name, func in available_clocks:
print(
... | 24.142857 | 87 | 0.615385 |
4a0abdb3269da3835943a0f144f3b4cc4938b15c | 75,134 | py | Python | rawdata.py | icogg/psl | d53329fc4b72ceb55fff1f4c73f6d13666a2caf1 | [
"MIT"
] | null | null | null | rawdata.py | icogg/psl | d53329fc4b72ceb55fff1f4c73f6d13666a2caf1 | [
"MIT"
] | null | null | null | rawdata.py | icogg/psl | d53329fc4b72ceb55fff1f4c73f6d13666a2caf1 | [
"MIT"
] | null | null | null |
blankpsl = """
A P P : C o u r i e r
T Y P E : S c h e m e L o g i c E d i t o r
F O R M A T : 1 . 0
V E R S I O N : 4 . 0 0
D O M A I N : 0 0 S e t t i n g s
S U B D O M A I N : 0 P S L S e t t i n g G r p 1
M O D E L : P 1 4 2 1 1 7 B 4 M 0 4 3 0 J
R E F E ... | 853.795455 | 26,608 | 0.431789 |
4a0abf9b2303e770e78f0ea7211973988c7c3267 | 111,605 | py | Python | mne/source_space.py | jdammers/mne-python | 1dc1502215a53385cda15c6c336fcc4341dc4d3b | [
"BSD-3-Clause"
] | null | null | null | mne/source_space.py | jdammers/mne-python | 1dc1502215a53385cda15c6c336fcc4341dc4d3b | [
"BSD-3-Clause"
] | null | null | null | mne/source_space.py | jdammers/mne-python | 1dc1502215a53385cda15c6c336fcc4341dc4d3b | [
"BSD-3-Clause"
] | null | null | null | # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Matti Hamalainen <msh@nmr.mgh.harvard.edu>
#
# License: BSD (3-clause)
from copy import deepcopy
from functools import partial
from gzip import GzipFile
import os
import os.path as op
import numpy as np
from scipy import sparse, linalg... | 39.173394 | 79 | 0.577169 |
4a0ac0f47a2d3a5fb4a4fd02b7b5b577afe711c8 | 642 | py | Python | src/test_data.py | dadosjusbr/coletor-mprn | f6d0507ae59d644d46fb34a24fa5666ca65e1a31 | [
"MIT"
] | 1 | 2021-11-23T11:58:15.000Z | 2021-11-23T11:58:15.000Z | src/test_data.py | marcos-inja/coletor-mprn | 5a78a2ccefd6e88b9d297b1455eff90aa6c33a1f | [
"MIT"
] | null | null | null | src/test_data.py | marcos-inja/coletor-mprn | 5a78a2ccefd6e88b9d297b1455eff90aa6c33a1f | [
"MIT"
] | 1 | 2021-12-02T12:22:16.000Z | 2021-12-02T12:22:16.000Z | import unittest
from data import load
file_names = [
"src/output_test/membros-ativos-contracheque-02-2020.ods",
"src/output_test/membros-ativos-verbas-indenizatorias-02-2020.ods",
]
class TestData(unittest.TestCase):
# Validação para ver se a planilha não foi apagada no processo...
def test_validat... | 27.913043 | 71 | 0.697819 |
4a0ac39d831b60af400ee42ea8228d4744184354 | 409 | py | Python | src/ethereum_test/common.py | lightclient/test-filler | f8b8e38c62a7682c9e08ee83cecf71d2b10fc5fc | [
"MIT"
] | null | null | null | src/ethereum_test/common.py | lightclient/test-filler | f8b8e38c62a7682c9e08ee83cecf71d2b10fc5fc | [
"MIT"
] | 1 | 2021-11-27T06:07:47.000Z | 2021-11-27T06:07:47.000Z | src/ethereum_test/common.py | lightclient/test-filler | f8b8e38c62a7682c9e08ee83cecf71d2b10fc5fc | [
"MIT"
] | null | null | null | """
Common values used in Ethereum tests.
"""
TestPrivateKey = (
"0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8"
)
TestAddress = "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b"
AddrAA = "0x00000000000000000000000000000000000000aa"
AddrBB = "0x00000000000000000000000000000000000000bb"
EmptyTrieR... | 29.214286 | 98 | 0.848411 |
4a0ac4cb7accc71faeccb2cb97202fec89fd0b71 | 2,648 | py | Python | src/custodians/image.py | patrickbcullen/aws-custodians | 07e34d0df7d46ccb67d1d1f42ddde5cd3304a4dd | [
"MIT"
] | null | null | null | src/custodians/image.py | patrickbcullen/aws-custodians | 07e34d0df7d46ccb67d1d1f42ddde5cd3304a4dd | [
"MIT"
] | null | null | null | src/custodians/image.py | patrickbcullen/aws-custodians | 07e34d0df7d46ccb67d1d1f42ddde5cd3304a4dd | [
"MIT"
] | null | null | null | from custodians.util import age_in_days, flatten_dict
import logging
import dateutil.parser
class ImageCustodian(object):
def __init__(self, aws):
self.aws = aws
self.logger = logging.getLogger(self.__class__.__name__)
def cleanup(self, dryrun, region, max_days, name_filters=[]):
try:
... | 40.121212 | 145 | 0.601964 |
4a0ac4f649657c359cafe7169e5613a3b24027b2 | 7,658 | py | Python | contrib/devtools/update-translations.py | ilixom/ilixomtest | 64794641759027f6531ea0c12ad83d3911ecbb12 | [
"MIT"
] | null | null | null | contrib/devtools/update-translations.py | ilixom/ilixomtest | 64794641759027f6531ea0c12ad83d3911ecbb12 | [
"MIT"
] | null | null | null | contrib/devtools/update-translations.py | ilixom/ilixomtest | 64794641759027f6531ea0c12ad83d3911ecbb12 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Run this script from the root of the repository to update all translations from
transifex.
It will do the following... | 37.539216 | 124 | 0.629277 |
4a0ac56924599fc4f6d18c2ef53c87cb5770bffe | 9,478 | py | Python | sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py | vchske/azure-sdk-for-python | 6383ed3676b7355af7be394562b126209961ec13 | [
"MIT"
] | null | null | null | sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py | vchske/azure-sdk-for-python | 6383ed3676b7355af7be394562b126209961ec13 | [
"MIT"
] | 1 | 2019-06-04T18:12:16.000Z | 2019-06-04T18:12:16.000Z | sdk/cosmos/azure-cosmos/test/query_execution_context_tests.py | vchske/azure-sdk-for-python | 6383ed3676b7355af7be394562b126209961ec13 | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | #The MIT License (MIT)
#Copyright (c) 2014 Microsoft Corporation
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modi... | 39.491667 | 116 | 0.618907 |
4a0ac668ca187843f7dae8ba71f481dbf9140e05 | 16,837 | py | Python | data_loading/augmenter.py | justusschock/data_loading_stuff | 08a8d7b86f14a4901a9af4981d9a3c25a63ccb2a | [
"MIT"
] | null | null | null | data_loading/augmenter.py | justusschock/data_loading_stuff | 08a8d7b86f14a4901a9af4981d9a3c25a63ccb2a | [
"MIT"
] | null | null | null | data_loading/augmenter.py | justusschock/data_loading_stuff | 08a8d7b86f14a4901a9af4981d9a3c25a63ccb2a | [
"MIT"
] | null | null | null | import multiprocessing
from multiprocessing import connection as mpconnection
from collections import Callable
import abc
import os
import numpy as np
import random
from data_loading.sampler import AbstractSampler, BatchSampler
from data_loading.data_loader import DataLoader
from delira import get_current_debug_mode
... | 32.378846 | 79 | 0.575756 |
4a0ac6d46a662d2000376854ef0ba980088b3537 | 176 | py | Python | saltshaker/exceptions.py | diegotoral/SaltShaker | 86c7619f3347c1b56ed3e680b8bb558d93b0e385 | [
"MIT"
] | 2 | 2017-07-02T20:29:26.000Z | 2017-07-02T21:18:51.000Z | saltshaker/exceptions.py | diegotoral/SaltShaker | 86c7619f3347c1b56ed3e680b8bb558d93b0e385 | [
"MIT"
] | null | null | null | saltshaker/exceptions.py | diegotoral/SaltShaker | 86c7619f3347c1b56ed3e680b8bb558d93b0e385 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
class ShakerError(Exception):
"""
Base class for all SaltShaker exceptions
"""
pass
class ConfigurationError(ShakerError):
pass
| 13.538462 | 44 | 0.636364 |
4a0ac77e798e8d590ff30d35f9da84f3677e5546 | 1,164 | py | Python | bus_board/migrations/0005_ticket.py | AG371/bus-board | a30561ab19c1af14483a0222e78959f7902a8a96 | [
"MIT"
] | 11 | 2018-01-31T12:58:40.000Z | 2022-03-25T19:23:12.000Z | bus_board/migrations/0005_ticket.py | AG371/bus-board | a30561ab19c1af14483a0222e78959f7902a8a96 | [
"MIT"
] | 7 | 2020-02-12T00:38:19.000Z | 2021-09-07T23:51:50.000Z | bus_board/migrations/0005_ticket.py | AG371/bus-board | a30561ab19c1af14483a0222e78959f7902a8a96 | [
"MIT"
] | 7 | 2018-03-07T22:00:00.000Z | 2021-04-15T16:34:47.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2018-01-18 09:24
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import phonenumber_field.modelfields
import uuid
class Migration(migrations.Migration):
dependencies = [
('bus_board'... | 36.375 | 118 | 0.633162 |
4a0ac78a42ffcc76d39a3567e06ab771330e38f2 | 1,380 | py | Python | gameservice/universeservice.py | willwybrow/starlines-web | c6c0ef4c02362bd666b750980a1e005394fd423d | [
"MIT"
] | null | null | null | gameservice/universeservice.py | willwybrow/starlines-web | c6c0ef4c02362bd666b750980a1e005394fd423d | [
"MIT"
] | null | null | null | gameservice/universeservice.py | willwybrow/starlines-web | c6c0ef4c02362bd666b750980a1e005394fd423d | [
"MIT"
] | null | null | null | import random
from typing import Dict
from game.geometry import Point
from game.star import ClusterID, Star, StarID
from game.universe import MASS_PER_NEW_CLUSTER, CLUSTER_SIZE
from gameservice.service import Service
class UniverseService(Service):
def __init__(self, repository):
super().__init__(reposit... | 44.516129 | 149 | 0.713043 |
4a0ac78cd503bdac920a2d31e3380ca5a98e53f4 | 4,442 | py | Python | app.py | mohamed17717/Toss | 4b756cb9d06f2ba27551e77c02bf2bf92aaba253 | [
"MIT"
] | null | null | null | app.py | mohamed17717/Toss | 4b756cb9d06f2ba27551e77c02bf2bf92aaba253 | [
"MIT"
] | null | null | null | app.py | mohamed17717/Toss | 4b756cb9d06f2ba27551e77c02bf2bf92aaba253 | [
"MIT"
] | null | null | null | import os
from view import *
from flask import Flask, request, redirect, url_for
from flask_session import Session
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
app = Flask(__name__, template_folder='templates', static_folder='static')
# Check for environment variable... | 28.113924 | 88 | 0.724448 |
4a0ac7917cc05600075b21724a0723764a933e98 | 817 | py | Python | concourse-driver-python/tests/__init__.py | surendranaidu/concourse | ba9d4bdad708f03b015a59cb49d8ba96cf2b1c6a | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | concourse-driver-python/tests/__init__.py | surendranaidu/concourse | ba9d4bdad708f03b015a59cb49d8ba96cf2b1c6a | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | concourse-driver-python/tests/__init__.py | surendranaidu/concourse | ba9d4bdad708f03b015a59cb49d8ba96cf2b1c6a | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | # Copyright (c) 2013-2019 Cinchapi Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 31.423077 | 74 | 0.734394 |
4a0ac7d67f99669c44def1c9d0190ea85fe9a7e7 | 3,926 | py | Python | xarray/backends/cfgrib_.py | mmann1123/xarray | a0c71c1508f34345ad7eef244cdbbe224e031c1b | [
"CC-BY-4.0",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | xarray/backends/cfgrib_.py | mmann1123/xarray | a0c71c1508f34345ad7eef244cdbbe224e031c1b | [
"CC-BY-4.0",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | xarray/backends/cfgrib_.py | mmann1123/xarray | a0c71c1508f34345ad7eef244cdbbe224e031c1b | [
"CC-BY-4.0",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | import os
import numpy as np
from ..core import indexing
from ..core.utils import Frozen, FrozenDict, close_on_error
from ..core.variable import Variable
from .common import (
BACKEND_ENTRYPOINTS,
AbstractDataStore,
BackendArray,
BackendEntrypoint,
)
from .locks import SerializableLock, ensure_lock
fr... | 26.527027 | 85 | 0.663271 |
4a0ac7dcf5191e6ebf65233ff289bf8e06174180 | 1,633 | py | Python | pages/register.py | mektebi/UIMagentoPy | 07444a223de0bd5e1c1bdbc362a9ed6aaa381d47 | [
"MIT"
] | null | null | null | pages/register.py | mektebi/UIMagentoPy | 07444a223de0bd5e1c1bdbc362a9ed6aaa381d47 | [
"MIT"
] | null | null | null | pages/register.py | mektebi/UIMagentoPy | 07444a223de0bd5e1c1bdbc362a9ed6aaa381d47 | [
"MIT"
] | null | null | null | """
This module contains RegisterPage,
"""
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
import names
class RegisterPage:
# URL
URL = 'https://m2.leanscale.com/customer/account/create/'
# Locators
FIRSTNAME_INPUT = (By.ID, 'firstname')
LASTNAME_INPUT = (By.I... | 28.155172 | 89 | 0.74158 |
4a0ac8b8380cefd7c6e9d3033363686516d78015 | 3,066 | py | Python | leet/plan/algorithms/back_track/n_queen_problem_reference.py | manojkumar-github/DataStructures-DynamicProgramming-in-Python-JAVA-Cplusplus | 16722a60c4c744ad3d240469b28f5d6ab6e9c25d | [
"MIT"
] | null | null | null | leet/plan/algorithms/back_track/n_queen_problem_reference.py | manojkumar-github/DataStructures-DynamicProgramming-in-Python-JAVA-Cplusplus | 16722a60c4c744ad3d240469b28f5d6ab6e9c25d | [
"MIT"
] | null | null | null | leet/plan/algorithms/back_track/n_queen_problem_reference.py | manojkumar-github/DataStructures-DynamicProgramming-in-Python-JAVA-Cplusplus | 16722a60c4c744ad3d240469b28f5d6ab6e9c25d | [
"MIT"
] | null | null | null | #!/usr/bin.env python
# Copyright (C) Pearson Assessments - 2020. All Rights Reserved.
# Proprietary - Use with Pearson Written Permission Only
# Python3 program to solve N Queen
# Problem using backtracking
def printSolution(board):
for i in range(4):
for j in range(4):
print(board[i][j], ... | 26.205128 | 68 | 0.576321 |
4a0ac907755b5da1faa44da45835503fcb3405e4 | 2,023 | py | Python | python/examples/read_any_param_cache.py | rozum-robotics/Rozum-Servo-Drives-API | 6657372870e6235089e38a68a422ea2d4dc4b0c3 | [
"Apache-2.0"
] | 8 | 2018-07-24T13:32:31.000Z | 2021-09-03T13:52:35.000Z | python/examples/read_any_param_cache.py | rozum-robotics/Rozum-Servo-Drives-API | 6657372870e6235089e38a68a422ea2d4dc4b0c3 | [
"Apache-2.0"
] | 4 | 2018-09-14T09:27:20.000Z | 2021-11-16T04:08:53.000Z | python/examples/read_any_param_cache.py | rozum-robotics/Rozum-Servo-Drives-API | 6657372870e6235089e38a68a422ea2d4dc4b0c3 | [
"Apache-2.0"
] | 6 | 2018-07-28T00:52:38.000Z | 2021-02-07T18:52:19.000Z | """ @page tutor_py_param_cache Reading few parameters synchronously
Complete source code: <br>
\snippet read_any_param_cache.py read_any_param_cache_py
"""
"""! [read_any_param_cache_py] """
import logging
import os
import argparse
import rdrive as rr
logging.basicConfig()
logger = logging.getLogger(os.path.basename... | 32.629032 | 100 | 0.759763 |
4a0ac9f57642712c83558be721258def245d308d | 1,733 | py | Python | draw.py | hkxIron/pencil-python | 27746bd957ed14b866ce9def2f3a67cb93ff12b2 | [
"MIT"
] | null | null | null | draw.py | hkxIron/pencil-python | 27746bd957ed14b866ce9def2f3a67cb93ff12b2 | [
"MIT"
] | null | null | null | draw.py | hkxIron/pencil-python | 27746bd957ed14b866ce9def2f3a67cb93ff12b2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
import time
from pencil import pencil_draw
from color_pencil import color_draw
import argparse
parser = argparse.ArgumentParser(description='Pencil Drawing Program. '
'You will get the productions at the output folder.')
parser.add_... | 38.511111 | 101 | 0.64397 |
4a0acae9ab096ad1e7961b687f6cf792c2554cb2 | 2,781 | py | Python | commands/stats_commands.py | DamourYouKnow/HAHA-NO-4STAR | b34bc9634c3822c0b08d22d8a2666edce958bb6c | [
"MIT"
] | 2 | 2019-06-28T09:33:53.000Z | 2022-02-25T08:39:42.000Z | commands/stats_commands.py | DamourYouKnow/HAHA-NO-4STAR | b34bc9634c3822c0b08d22d8a2666edce958bb6c | [
"MIT"
] | 11 | 2018-04-06T22:34:05.000Z | 2022-01-13T00:43:34.000Z | commands/stats_commands.py | DamourYouKnow/HAHA-NO-4STAR | b34bc9634c3822c0b08d22d8a2666edce958bb6c | [
"MIT"
] | 1 | 2021-09-10T14:30:16.000Z | 2021-09-10T14:30:16.000Z | import discord
from discord.ext import commands
from core.checks import check_mongo
from bot import HahaNo4Star
class Stats:
def __init__(self, bot: HahaNo4Star):
self.bot = bot
@commands.command(pass_context=True, aliases=['stats'])
@commands.cooldown(rate=3, per=10, type=commands.BucketType.user... | 30.9 | 74 | 0.595829 |
4a0acb8c6e83ed75bc883080ad5dfae7ed926703 | 1,416 | py | Python | cleanflux/proxy/http_request.py | Transatel/cleanflux | a0f7e5fad7f5a9d3265acb79bc23fe7a0830b66b | [
"MIT"
] | 38 | 2020-01-15T12:56:42.000Z | 2022-03-16T08:54:48.000Z | cleanflux/proxy/http_request.py | Transatel/cleanflux | a0f7e5fad7f5a9d3265acb79bc23fe7a0830b66b | [
"MIT"
] | 1 | 2020-01-15T18:56:22.000Z | 2020-01-15T18:57:31.000Z | cleanflux/proxy/http_request.py | Transatel/cleanflux | a0f7e5fad7f5a9d3265acb79bc23fe7a0830b66b | [
"MIT"
] | 3 | 2020-01-15T12:56:44.000Z | 2022-02-17T19:41:06.000Z | from http.client import HTTPSConnection, HTTPConnection, IncompleteRead
import urllib.parse
import threading
class HTTPRequest(object):
"""
A simple, thread-safe wrapper around HTTP(S)Connection
"""
def __init__(self):
self.tls = threading.local()
self.tls.conns = {}
def request(... | 33.714286 | 93 | 0.586864 |
4a0acd737cf7217f1dff9d626632c3a883dd1896 | 2,437 | py | Python | MFWSpider/MFWSpider/spiders/places.py | Karmenzind/mfw | 29bee5a2e0ebc5115a2703d2f5e9c774f76cd07a | [
"MIT"
] | 18 | 2018-08-27T19:57:27.000Z | 2022-03-09T15:54:52.000Z | MFWSpider/MFWSpider/spiders/places.py | Mistakey/mfw | 46c750f692d781c8d2b28e6002d9a86d0df67657 | [
"MIT"
] | null | null | null | MFWSpider/MFWSpider/spiders/places.py | Mistakey/mfw | 46c750f692d781c8d2b28e6002d9a86d0df67657 | [
"MIT"
] | 1 | 2021-01-26T15:10:32.000Z | 2021-01-26T15:10:32.000Z | # -*- coding: utf-8 -*-
import re
from urllib.parse import urljoin
from MFWSpider.items import Place
from MFWSpider.pipelines import MfwspiderPipeline
from scrapy.conf import settings
from scrapy.http import Request
from scrapy.spiders import CrawlSpider
from scrapy_splash import SplashRequest
db = MfwspiderPipeline... | 32.932432 | 79 | 0.546984 |
4a0acd9f659098ea4105205d89f3ad82c593574b | 2,796 | py | Python | source/strikeamatch.py | Rik89/Publicidad_Web | c1ea61154a7d3ed866f6b28d88e24b9523203711 | [
"MIT"
] | null | null | null | source/strikeamatch.py | Rik89/Publicidad_Web | c1ea61154a7d3ed866f6b28d88e24b9523203711 | [
"MIT"
] | null | null | null | source/strikeamatch.py | Rik89/Publicidad_Web | c1ea61154a7d3ed866f6b28d88e24b9523203711 | [
"MIT"
] | null | null | null | def _get_character_pairs(text):
"""Returns a defaultdict(int) of adjacent character pair counts.
>>> _get_character_pairs('Test IS')
{'IS': 1, 'TE': 1, 'ES': 1, 'ST': 1}
>>> _get_character_pairs('Test 123')
{'23': 1, '12': 1, 'TE': 1, 'ES': 1, 'ST': 1}
>>> _get_character_pairs('Test T... | 27.96 | 91 | 0.587983 |
4a0acfb50307643c0f2f857b9b14ddb94c1e3090 | 10,904 | py | Python | platformio/home/rpc/handlers/project.py | xeno010/platformio-core | 94f8afec38fc8d35db1055368f5fbe4e67c89e7e | [
"Apache-2.0"
] | null | null | null | platformio/home/rpc/handlers/project.py | xeno010/platformio-core | 94f8afec38fc8d35db1055368f5fbe4e67c89e7e | [
"Apache-2.0"
] | null | null | null | platformio/home/rpc/handlers/project.py | xeno010/platformio-core | 94f8afec38fc8d35db1055368f5fbe4e67c89e7e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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 appli... | 37.730104 | 87 | 0.532373 |
4a0acfea20c4a3042ebd5aacc9b8fc2e00b5b547 | 24,864 | py | Python | src/plant_energyse/openwind/openWindComponent.py | WISDEM/Plant_EnergySE | 5ca898bf65b63fd1a87a40241591866f5f0b185a | [
"Apache-2.0"
] | 1 | 2019-02-26T17:54:14.000Z | 2019-02-26T17:54:14.000Z | src/plant_energyse/openwind/openWindComponent.py | WISDEM/Plant_EnergySE | 5ca898bf65b63fd1a87a40241591866f5f0b185a | [
"Apache-2.0"
] | null | null | null | src/plant_energyse/openwind/openWindComponent.py | WISDEM/Plant_EnergySE | 5ca898bf65b63fd1a87a40241591866f5f0b185a | [
"Apache-2.0"
] | 1 | 2021-04-19T18:40:39.000Z | 2021-04-19T18:40:39.000Z | # openWindComponent.py
# 2014 10 16
'''
Execute OpenWind as an OpenMDAO Component
2014 10 16: this is based on openWindAcComponent.py
BUT: the 'academic' version of OpenWind has gone away
The new Enterprise OW included the functions of the former academic version.
They are enabled by setting the foll... | 41.097521 | 137 | 0.591216 |
4a0ad0f178cea93fd651e45ad899ccf5b44fc7bc | 1,295 | py | Python | setup.py | bakszero/voxpopuli | 5745dca4bd16624bbd0e486b3f7fdb08ff795238 | [
"MIT"
] | 1 | 2020-10-08T14:48:35.000Z | 2020-10-08T14:48:35.000Z | setup.py | bakszero/voxpopuli | 5745dca4bd16624bbd0e486b3f7fdb08ff795238 | [
"MIT"
] | null | null | null | setup.py | bakszero/voxpopuli | 5745dca4bd16624bbd0e486b3f7fdb08ff795238 | [
"MIT"
] | null | null | null | # coding=utf-8
"""Install config."""
from setuptools import setup, find_packages
with open("README.md") as readme:
long_description = readme.read()
setup(
name='voxpopuli',
version='0.3.6',
description='A wrapper around Espeak and Mbrola, to do simple Text-To-Speech (TTS),'
' with the ... | 35 | 88 | 0.637838 |
4a0ad17cb7ff461d2d6d5db5c71dc1487d15b017 | 10,993 | py | Python | reports/utils.py | sxntixgo/merger | cfe98b36afe861797a848618c6f2e1e208c4bd2c | [
"MIT"
] | null | null | null | reports/utils.py | sxntixgo/merger | cfe98b36afe861797a848618c6f2e1e208c4bd2c | [
"MIT"
] | 2 | 2021-03-31T20:05:15.000Z | 2021-06-10T19:56:29.000Z | reports/utils.py | sxntixgo/merger | cfe98b36afe861797a848618c6f2e1e208c4bd2c | [
"MIT"
] | null | null | null | from django.core.files import File
from .models import ReportTemplate
from main.models import Attach, Proj, Vuln, RISK
from docx import Document
from docx.enum.text import WD_ALIGN_PARAGRAPH, WD_BREAK
from docx.oxml import OxmlElement
from docx.oxml.ns import qn
from docx.shared import Inches, Pt, RGBColor
import ma... | 39.82971 | 183 | 0.59265 |
4a0ad1a083d197ea92ca7443eef579332c70890a | 720 | py | Python | setup.py | vkottler/vmklib | 493d23c1b260d2ef53cafd85d00c2f76c682df6f | [
"MIT"
] | 1 | 2022-02-27T00:14:15.000Z | 2022-02-27T00:14:15.000Z | setup.py | vkottler/vmklib | 493d23c1b260d2ef53cafd85d00c2f76c682df6f | [
"MIT"
] | 23 | 2021-01-28T01:26:57.000Z | 2022-03-29T08:44:54.000Z | setup.py | vkottler/vmklib | 493d23c1b260d2ef53cafd85d00c2f76c682df6f | [
"MIT"
] | null | null | null | # =====================================
# generator=datazen
# version=1.7.9
# hash=1b779f83ea09cc421cd4bc0c7ace4b21
# =====================================
"""
vmklib - Package definition for distribution.
"""
# third-party
from vmklib.setup import setup
# internal
from vmklib import PKG_NAME, VERSION, DESCRIPTION
... | 18 | 49 | 0.538889 |
4a0ad1a0e959aa33c93ca320dd8b3a941cdc4f80 | 2,065 | py | Python | setup.py | justinnoah/hamper | a12c4b61243bd1ddd8c88e11605348da77fb21fe | [
"MIT"
] | null | null | null | setup.py | justinnoah/hamper | a12c4b61243bd1ddd8c88e11605348da77fb21fe | [
"MIT"
] | null | null | null | setup.py | justinnoah/hamper | a12c4b61243bd1ddd8c88e11605348da77fb21fe | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
from setuptools import setup, find_packages
requires = open('requirements.txt').read().split('\n')
setup(
name='hamper',
version='1.10.1',
description='Yet another IRC bot',
install_requires=requires,
author='Mike Cooper',
author_email='mythmon@gmail.com',
url='http... | 40.490196 | 72 | 0.611138 |
4a0ad1b8413588d513ca47bad46090be0ea974c2 | 2,565 | py | Python | vsts/vsts/release/v4_1/models/approval_options.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | vsts/vsts/release/v4_1/models/approval_options.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | vsts/vsts/release/v4_1/models/approval_options.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 55.76087 | 244 | 0.691228 |
4a0ad2204bd558a70775f0b4c9f254e6e5b1e106 | 12,712 | py | Python | examples/test_examples.py | DiscoSteve/SDK-Python | a359380d18dc8bf82308ecfab9bf0d475b1b8878 | [
"Apache-2.0"
] | null | null | null | examples/test_examples.py | DiscoSteve/SDK-Python | a359380d18dc8bf82308ecfab9bf0d475b1b8878 | [
"Apache-2.0"
] | null | null | null | examples/test_examples.py | DiscoSteve/SDK-Python | a359380d18dc8bf82308ecfab9bf0d475b1b8878 | [
"Apache-2.0"
] | null | null | null | import copy
import pprint
import unittest
# needed to connect to the central infrastructure
from highcliff.infrastructure import InvalidTopic, InvalidMessageFormat
# needed to run a local version of the AI
from highcliff.ai import AI, intent_is_real
from highcliff.actions import ActionStatus
# the Highcliff actions... | 39.478261 | 118 | 0.674717 |
4a0ad29951f2884a2b658553f705170dbf3f1951 | 635 | py | Python | backend/manage.py | crowdbotics-apps/dashboard-31817 | bb5ff5bfc8deb2c551b5c249d080cfb92db20d10 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | crowdbotics-apps/dashboard-31817 | bb5ff5bfc8deb2c551b5c249d080cfb92db20d10 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | crowdbotics-apps/dashboard-31817 | bb5ff5bfc8deb2c551b5c249d080cfb92db20d10 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dashboard_31817.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
rais... | 28.863636 | 79 | 0.686614 |
4a0ad2e75bfa5ef1bbf0f22e0e5ceb4973bda0dc | 2,388 | py | Python | model-optimizer/extensions/front/caffe/proposal_ext_test.py | tdp2110/dldt | 87f321c5365ed813e849ea0ed987354ef2c39743 | [
"Apache-2.0"
] | null | null | null | model-optimizer/extensions/front/caffe/proposal_ext_test.py | tdp2110/dldt | 87f321c5365ed813e849ea0ed987354ef2c39743 | [
"Apache-2.0"
] | null | null | null | model-optimizer/extensions/front/caffe/proposal_ext_test.py | tdp2110/dldt | 87f321c5365ed813e849ea0ed987354ef2c39743 | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2018-2019 Intel Corporation
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 i... | 31.012987 | 90 | 0.656198 |
4a0ad36a7401c7687e6e4536d32a967b74f42e75 | 1,792 | py | Python | test/integration/vint/linting/policy/test_prohibit_autocmd_with_no_group.py | tmsanrinsha/vint | 8c34196252b43d7361d0f58cb78cf2d3e4e4fbd0 | [
"MIT"
] | 2 | 2021-06-15T15:07:28.000Z | 2021-10-05T12:23:23.000Z | test/integration/vint/linting/policy/test_prohibit_autocmd_with_no_group.py | tmsanrinsha/vint | 8c34196252b43d7361d0f58cb78cf2d3e4e4fbd0 | [
"MIT"
] | null | null | null | test/integration/vint/linting/policy/test_prohibit_autocmd_with_no_group.py | tmsanrinsha/vint | 8c34196252b43d7361d0f58cb78cf2d3e4e4fbd0 | [
"MIT"
] | null | null | null | import unittest
from test.asserting.policy import PolicyAssertion, get_fixture_path
from vint.linting.level import Level
from vint.linting.policy.prohibit_autocmd_with_no_group import ProhibitAutocmdWithNoGroup
VALID_VIM_SCRIPT_WITH_AUGROUP = get_fixture_path(
'prohibit_autocmd_with_no_group_valid_with_augroup.v... | 33.185185 | 89 | 0.686384 |
4a0ad4321adc708ec43c7990890f4582ca186cf4 | 9,587 | py | Python | model/model.py | frank-xwang/RIDE-LongTailRecognition | 5396100d33b75992e0a72dd01819513c10088611 | [
"MIT"
] | 175 | 2020-12-04T19:23:32.000Z | 2022-03-30T06:22:32.000Z | model/model.py | frank-xwang/RIDE-LongTailRecognition | 5396100d33b75992e0a72dd01819513c10088611 | [
"MIT"
] | 25 | 2020-12-10T13:37:38.000Z | 2021-12-09T17:34:18.000Z | model/model.py | frank-xwang/RIDE-LongTailRecognition | 5396100d33b75992e0a72dd01819513c10088611 | [
"MIT"
] | 23 | 2020-12-21T09:51:07.000Z | 2022-03-31T12:54:00.000Z | import torch.nn as nn
import torch.nn.functional as F
from base import BaseModel
from .fb_resnets import ResNet
from .fb_resnets import ResNeXt
from .fb_resnets import RIDEResNet
from .fb_resnets import RIDEResNeXt
from .fb_resnets import EAResNet
from .fb_resnets import EAResNeXt
from .ldam_drw_resnets import resnet_c... | 71.014815 | 298 | 0.765099 |
4a0ad43931d66279e21fb312a45caad54f76798d | 1,453 | py | Python | python/test/test_design_sensor.py | thracesystems/powermeter-api | 7bdab034ff916ee49e986de88f157bd044e981c1 | [
"Apache-2.0"
] | null | null | null | python/test/test_design_sensor.py | thracesystems/powermeter-api | 7bdab034ff916ee49e986de88f157bd044e981c1 | [
"Apache-2.0"
] | null | null | null | python/test/test_design_sensor.py | thracesystems/powermeter-api | 7bdab034ff916ee49e986de88f157bd044e981c1 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
PowerMeter API
API # noqa: E501
The version of the OpenAPI document: 2021.4.1
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import datetime
import powermeter_api
from powermeter_api.models.design_sensor import DesignSe... | 24.627119 | 82 | 0.604955 |
4a0ad472c4395e8d4b9a8dff046ecaa9ba7bfc56 | 2,662 | py | Python | tests/fiaas_deploy_daemon/specs/test_lookup.py | ariadnarouco/fiaas-deploy-daemon | 644c09e79f6f07bd85ca9153e731755836f7e454 | [
"Apache-2.0"
] | 57 | 2017-09-13T09:30:04.000Z | 2022-03-23T12:00:56.000Z | tests/fiaas_deploy_daemon/specs/test_lookup.py | ariadnarouco/fiaas-deploy-daemon | 644c09e79f6f07bd85ca9153e731755836f7e454 | [
"Apache-2.0"
] | 113 | 2019-02-26T16:10:13.000Z | 2022-03-31T13:11:03.000Z | tests/fiaas_deploy_daemon/specs/test_lookup.py | ariadnarouco/fiaas-deploy-daemon | 644c09e79f6f07bd85ca9153e731755836f7e454 | [
"Apache-2.0"
] | 30 | 2019-02-22T11:16:24.000Z | 2022-03-21T22:37:52.000Z | #!/usr/bin/env python
# -*- coding: utf-8
# Copyright 2017-2019 The FIAAS 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
#
# Unle... | 27.163265 | 98 | 0.589031 |
4a0ad4bc2a597c475988451262eafc0361d9cd4a | 5,098 | py | Python | docs/jnpr_healthbot_swagger/swagger_client/models/destination_schema.py | dmontagner/healthbot-py-client | 0952e0a9e7ed63c9fe84879f40407c3327735252 | [
"Apache-2.0"
] | null | null | null | docs/jnpr_healthbot_swagger/swagger_client/models/destination_schema.py | dmontagner/healthbot-py-client | 0952e0a9e7ed63c9fe84879f40407c3327735252 | [
"Apache-2.0"
] | null | null | null | docs/jnpr_healthbot_swagger/swagger_client/models/destination_schema.py | dmontagner/healthbot-py-client | 0952e0a9e7ed63c9fe84879f40407c3327735252 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Healthbot APIs
API interface for Healthbot application # noqa: E501
OpenAPI spec version: 1.0.0
Contact: healthbot-hackers@juniper.net
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from swagger_client... | 29.131429 | 137 | 0.576893 |
4a0ad51e388229221e8667a31c1d25946b21cd84 | 4,395 | py | Python | classifiers/random_supervised.py | dulayjm/data-science-project | 1fc992e9083f724bd2c48064328e504be698d461 | [
"MIT"
] | null | null | null | classifiers/random_supervised.py | dulayjm/data-science-project | 1fc992e9083f724bd2c48064328e504be698d461 | [
"MIT"
] | null | null | null | classifiers/random_supervised.py | dulayjm/data-science-project | 1fc992e9083f724bd2c48064328e504be698d461 | [
"MIT"
] | null | null | null | import os
from argparse import ArgumentParser
from random import choice, seed
from typing import List
from torchvision.datasets import Omniglot
from torchvision import transforms
from tqdm import tqdm
from data.dataset import OmniglotReactionTimeDataset
from data.full_omniglot import FullOmniglot
from helpers.strati... | 43.514851 | 113 | 0.669397 |
4a0ad577f90f88f900418ddf3efe7ff693900e8b | 3,370 | py | Python | homeassistant/components/hive/alarm_control_panel.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 3 | 2021-11-22T22:37:43.000Z | 2022-03-17T00:55:28.000Z | homeassistant/components/hive/alarm_control_panel.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 25 | 2021-11-24T06:24:10.000Z | 2022-03-31T06:23:06.000Z | homeassistant/components/hive/alarm_control_panel.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 3 | 2022-01-02T18:49:54.000Z | 2022-01-25T02:03:54.000Z | """Support for the Hive alarm."""
from datetime import timedelta
from homeassistant.components.alarm_control_panel import AlarmControlPanelEntity
from homeassistant.components.alarm_control_panel.const import (
SUPPORT_ALARM_ARM_AWAY,
SUPPORT_ALARM_ARM_NIGHT,
)
from homeassistant.config_entries import ConfigEn... | 32.095238 | 84 | 0.687537 |
4a0ad602368505ff374c51fe50543f0f78868466 | 1,947 | py | Python | lattice/models.py | aditya2695/Applicatiopn-for-Computation-of-Lattice-Invariants | dd8dee5e385c8e79c8fb411eb9a0836567700982 | [
"MIT"
] | null | null | null | lattice/models.py | aditya2695/Applicatiopn-for-Computation-of-Lattice-Invariants | dd8dee5e385c8e79c8fb411eb9a0836567700982 | [
"MIT"
] | null | null | null | lattice/models.py | aditya2695/Applicatiopn-for-Computation-of-Lattice-Invariants | dd8dee5e385c8e79c8fb411eb9a0836567700982 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class Lattice(models.Model):
name = models.CharField(max_length=255)
length_a = models.FloatField()
length_b = models.FloatField()
length_c = models.FloatField()
angle_a = models.FloatField()
angle_b = models.FloatField()
angle_c = m... | 26.671233 | 79 | 0.703133 |
4a0ad6c81e812a0d8bdaa188b29d4f096c871212 | 58 | py | Python | api/reply.py | TClaypool00/ExpenseTrackerClient-Python | 44f45e7e7b7434d19a20a0d1b565592a157bed88 | [
"MIT"
] | null | null | null | api/reply.py | TClaypool00/ExpenseTrackerClient-Python | 44f45e7e7b7434d19a20a0d1b565592a157bed88 | [
"MIT"
] | null | null | null | api/reply.py | TClaypool00/ExpenseTrackerClient-Python | 44f45e7e7b7434d19a20a0d1b565592a157bed88 | [
"MIT"
] | null | null | null | from .api import base_url
reply_url = base_url + 'reply/' | 19.333333 | 31 | 0.741379 |
4a0ad76140b691f3801647618db07b670805d85e | 2,845 | py | Python | xonsh/xontribs_meta.py | sthagen/xonsh-xonsh | 5f418483015dfdac064c69a3891d7769971a0772 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xonsh/xontribs_meta.py | sthagen/xonsh-xonsh | 5f418483015dfdac064c69a3891d7769971a0772 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xonsh/xontribs_meta.py | sthagen/xonsh-xonsh | 5f418483015dfdac064c69a3891d7769971a0772 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | """
This modules is the place where one would define the xontribs.
"""
import importlib.util
import typing as tp
from pathlib import Path
from xonsh.lazyasd import LazyObject, lazyobject
class _XontribPkg(tp.NamedTuple):
"""Class to define package information of a xontrib.
Attributes
----------
ins... | 26.839623 | 96 | 0.6 |
4a0ad762b24fef0ab2f25de3a301b19946ba93d6 | 1,671 | py | Python | AWS/lambda/wakeup-web-ec2.py | grtfou/devops-tools | 8a8e0539d98fe6958f4da9d3af57021f03fce1c4 | [
"MIT"
] | 1 | 2016-03-02T16:21:26.000Z | 2016-03-02T16:21:26.000Z | AWS/lambda/wakeup-web-ec2.py | grtfou/DevOp-tools | 8a8e0539d98fe6958f4da9d3af57021f03fce1c4 | [
"MIT"
] | null | null | null | AWS/lambda/wakeup-web-ec2.py | grtfou/DevOp-tools | 8a8e0539d98fe6958f4da9d3af57021f03fce1c4 | [
"MIT"
] | 1 | 2017-10-18T20:12:08.000Z | 2017-10-18T20:12:08.000Z | """
Start a EC2 instance and associate ip to it.
Then set Router 53 to map the ip.
"""
import os
import sys
root = os.environ["LAMBDA_TASK_ROOT"]
sys.path.insert(0, root)
import boto3
from boto3.session import Session
AWS_KEY_ID = 'YourIAMID'
AWS_SECRET_KEY = 'YourIAMSecretKey'
INSTANCE_ID = 'i-example'
REGION_NA... | 23.871429 | 67 | 0.540395 |
4a0ad771e742c6da99365705972c81c7048cc1f6 | 1,189 | py | Python | examples/status.py | Soneydom13/python-adguardhome | 8e6b027630d9819112313ffe85c0866ea227ebe8 | [
"MIT"
] | null | null | null | examples/status.py | Soneydom13/python-adguardhome | 8e6b027630d9819112313ffe85c0866ea227ebe8 | [
"MIT"
] | null | null | null | examples/status.py | Soneydom13/python-adguardhome | 8e6b027630d9819112313ffe85c0866ea227ebe8 | [
"MIT"
] | 1 | 2021-02-19T01:14:50.000Z | 2021-02-19T01:14:50.000Z | # pylint: disable=W0621
"""Asynchronous Python client for the AdGuard Home API."""
import asyncio
from adguardhome import AdGuardHome
async def main():
"""Show example how to get status of your AdGuard Home instance."""
async with AdGuardHome("192.168.1.2") as adguard:
version = await adguard.versio... | 30.487179 | 71 | 0.647603 |
4a0ad8d03e1124831d878b7b9e33eeac8d414c2c | 5,987 | py | Python | tensornet/gradcam/visual.py | shan18/TensorNet | c79a0c64152dbeb3499d204994772858326f668c | [
"MIT"
] | 6 | 2020-06-04T16:01:38.000Z | 2021-11-28T17:47:13.000Z | tensornet/gradcam/visual.py | shan18/TensorNet | c79a0c64152dbeb3499d204994772858326f668c | [
"MIT"
] | 22 | 2020-03-20T22:00:32.000Z | 2021-02-08T19:32:32.000Z | tensornet/gradcam/visual.py | shan18/TensorNet | c79a0c64152dbeb3499d204994772858326f668c | [
"MIT"
] | 5 | 2020-03-24T11:29:22.000Z | 2020-11-01T11:45:20.000Z | import cv2
import torch
import numpy as np
import matplotlib.pyplot as plt
from tensornet.gradcam.gradcam import GradCAM
from tensornet.gradcam.gradcam_pp import GradCAMPP
from tensornet.data.utils import to_numpy, unnormalize
from typing import Tuple, List, Dict, Union, Optional
def visualize_cam(mask: torch.Tenso... | 38.625806 | 103 | 0.616502 |
4a0ad8d9acf44a4a24acbb3c647784384d9676f7 | 7,927 | py | Python | vsgia_model/utils/utils.py | nkuhzx/VSG-IA | 075b58c2bf89562cc197e721f050396589861c6a | [
"Apache-2.0"
] | null | null | null | vsgia_model/utils/utils.py | nkuhzx/VSG-IA | 075b58c2bf89562cc197e721f050396589861c6a | [
"Apache-2.0"
] | null | null | null | vsgia_model/utils/utils.py | nkuhzx/VSG-IA | 075b58c2bf89562cc197e721f050396589861c6a | [
"Apache-2.0"
] | null | null | null | import numpy as np
from collections import deque
from sklearn.metrics import average_precision_score
from PIL import Image
from sklearn.metrics import roc_auc_score
class AverageMeter():
def __init__(self):
self.reset()
def reset(self):
self.count=0
self.newval=0
self.sum=0... | 27.911972 | 120 | 0.605021 |
4a0ad97ff7e36afe68fbff03099b3ea7be8de477 | 5,516 | py | Python | contrib/seeds/makeseeds.py | mctnoc/nocnoc | 87cab7106ae50aa9b7d17de5536f03084a1c98af | [
"MIT"
] | 1 | 2021-01-04T08:11:51.000Z | 2021-01-04T08:11:51.000Z | contrib/seeds/makeseeds.py | CryptoLover705/NocNoc | fafa860f29c63d7357721a231fef7ad314355263 | [
"MIT"
] | 1 | 2021-02-07T01:14:40.000Z | 2021-02-07T02:39:47.000Z | contrib/seeds/makeseeds.py | CryptoLover705/NocNoc | fafa860f29c63d7357721a231fef7ad314355263 | [
"MIT"
] | 6 | 2020-12-05T19:25:13.000Z | 2021-05-21T18:19:11.000Z | #!/usr/bin/env python3
# Copyright (c) 2013-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Generate seeds.txt from Pieter's DNS seeder
#
NSEEDS=512
MAX_SEEDS_PER_ASN=2
MIN_BLOCKS = 615801
#... | 32.069767 | 186 | 0.567078 |
4a0ad9da02093564d15f0ef9a99f8501cc3fc40d | 710 | py | Python | docs/steps/code/s1b.py | westpark/wallball | c3603680a8c7d722a92b13c31d9e4cc3b753f530 | [
"MIT"
] | 1 | 2020-03-19T15:12:08.000Z | 2020-03-19T15:12:08.000Z | docs/steps/code/s1b.py | westpark/wallball | c3603680a8c7d722a92b13c31d9e4cc3b753f530 | [
"MIT"
] | null | null | null | docs/steps/code/s1b.py | westpark/wallball | c3603680a8c7d722a92b13c31d9e4cc3b753f530 | [
"MIT"
] | 1 | 2020-03-19T15:12:19.000Z | 2020-03-19T15:12:19.000Z | WIDTH = 640
HEIGHT = 480
class Ball(ZRect): pass
#
# The ball is a red square halfway across the game screen
#
ball = Ball(0, 0, 30, 30)
ball.center = WIDTH / 2, HEIGHT / 2
ball.colour = "red"
#
# The ball moves one step right and one step down each tick
#
ball.direction = 1, 1
#
# The ball moves at a s... | 22.1875 | 69 | 0.633803 |
4a0adb9419cebf8a82676ce752d9fce502506613 | 13,820 | py | Python | simpleml/persistables/hashing.py | ptoman/SimpleML | a829ee05da01a75b64982d91a012e9274b6f7c6e | [
"BSD-3-Clause"
] | null | null | null | simpleml/persistables/hashing.py | ptoman/SimpleML | a829ee05da01a75b64982d91a012e9274b6f7c6e | [
"BSD-3-Clause"
] | null | null | null | simpleml/persistables/hashing.py | ptoman/SimpleML | a829ee05da01a75b64982d91a012e9274b6f7c6e | [
"BSD-3-Clause"
] | null | null | null | '''
Mixin classes to handle hashing
'''
__author__ = 'Elisha Yadgaran'
import pandas as pd
import numpy as np
from pandas.util import hash_pandas_object
import inspect
class CustomHasherMixin(object):
'''
Mixin class to hash any object
'''
def custom_hasher(self, object_to_hash, custom_class_proxy=... | 38.711485 | 109 | 0.613242 |
4a0adbc2633a435c29ed711c7958f8aa86d9d16e | 3,186 | py | Python | learn2learn/vision/datasets/full_omniglot.py | vfdev-5/learn2learn | dd0dfc20ef7b3e1655c73417e84d12361582160a | [
"MIT"
] | 13 | 2019-08-12T09:33:09.000Z | 2021-11-09T00:16:36.000Z | learn2learn/vision/datasets/full_omniglot.py | vainaijr/learn2learn | a1da2c755856505556241809bba9b150f36850c2 | [
"MIT"
] | 20 | 2019-08-13T16:23:26.000Z | 2019-09-04T17:38:46.000Z | learn2learn/vision/datasets/full_omniglot.py | vainaijr/learn2learn | a1da2c755856505556241809bba9b150f36850c2 | [
"MIT"
] | 1 | 2019-09-01T00:01:37.000Z | 2019-09-01T00:01:37.000Z | #!/usr/bin/env python3
from torch.utils.data import Dataset, ConcatDataset
from torchvision.datasets.omniglot import Omniglot
class FullOmniglot(Dataset):
"""
[[Source]]()
**Description**
This class provides an interface to the Omniglot dataset.
The Omniglot dataset was introduced by Lake et ... | 40.846154 | 105 | 0.591965 |
4a0adc4d8fe8343fdaf267749ec6df11185e7858 | 126 | py | Python | app/tournament/app.py | RobLewisQA/PrisonersDilemma | fb763464dcdcad07c3a9f70c736a577bcd9305b1 | [
"MIT"
] | null | null | null | app/tournament/app.py | RobLewisQA/PrisonersDilemma | fb763464dcdcad07c3a9f70c736a577bcd9305b1 | [
"MIT"
] | null | null | null | app/tournament/app.py | RobLewisQA/PrisonersDilemma | fb763464dcdcad07c3a9f70c736a577bcd9305b1 | [
"MIT"
] | 1 | 2021-04-18T14:09:27.000Z | 2021-04-18T14:09:27.000Z | from flask import Flask
from application import app
if __name__=='__main__':
app.run(host='0.0.0.0', port=5000, debug=True) | 25.2 | 48 | 0.738095 |
4a0addc7ea0061a30f327c50cf69e8d1c80df2ec | 2,863 | py | Python | get_Exploitdb_CSV_SUPERSEDED.py | NadimKawwa/CybersecurityThreatIdentification | e088dbb861342676337b4c9d385e6abfb6463291 | [
"MIT"
] | 3 | 2021-01-15T10:28:54.000Z | 2021-11-09T17:55:45.000Z | get_Exploitdb_CSV_SUPERSEDED.py | NadimKawwa/CybersecurityThreatIdentification | e088dbb861342676337b4c9d385e6abfb6463291 | [
"MIT"
] | null | null | null | get_Exploitdb_CSV_SUPERSEDED.py | NadimKawwa/CybersecurityThreatIdentification | e088dbb861342676337b4c9d385e6abfb6463291 | [
"MIT"
] | 2 | 2021-02-05T17:35:48.000Z | 2021-04-23T18:56:21.000Z | from time import sleep
from pymongo import MongoClient
from FakePersona import getPage
base_url = "https://www.exploit-db.com"
def getExploitCategories():
#access page as fake persona
soup = getPage(base_url)
#find all list items <li>
categories = soup.find("ul", {"class":"w-nav-list"}).findAll("li",... | 34.083333 | 121 | 0.567586 |
4a0ade80c1b9c1961a7ad8e1f5d7a2f859682ee2 | 809 | py | Python | src/bt/game/state.py | btdevel/bt | 23abdf0860484a4adcfbe2bcbe94eebca7f820fd | [
"MIT"
] | 1 | 2017-06-30T00:35:05.000Z | 2017-06-30T00:35:05.000Z | src/bt/game/state.py | btdevel/bt | 23abdf0860484a4adcfbe2bcbe94eebca7f820fd | [
"MIT"
] | null | null | null | src/bt/game/state.py | btdevel/bt | 23abdf0860484a4adcfbe2bcbe94eebca7f820fd | [
"MIT"
] | null | null | null | from bt.game.character import Party
from bt.game.ui import UI
class State:
def __init__(self, city_handler, start_handler):
self.city_handler = city_handler
self.start_handler = start_handler
self.curr_handler = None
self.ui = UI()
self.party = Party()
def run(self):
... | 26.966667 | 52 | 0.637824 |
4a0adf403b61ec03a0e0ec17a87ef3b59a0d5fed | 187 | py | Python | contact_us/apps.py | ohahlev/ahlev-django-contact-us | a1e8e22bba16ca79ee355ac12a4627df29f76ce8 | [
"BSD-3-Clause"
] | null | null | null | contact_us/apps.py | ohahlev/ahlev-django-contact-us | a1e8e22bba16ca79ee355ac12a4627df29f76ce8 | [
"BSD-3-Clause"
] | null | null | null | contact_us/apps.py | ohahlev/ahlev-django-contact-us | a1e8e22bba16ca79ee355ac12a4627df29f76ce8 | [
"BSD-3-Clause"
] | null | null | null | from django.apps import AppConfig
from . import __version__ as VERSION
class ContactUsConfig(AppConfig):
name = "contact_us"
verbose_name = "Contact Us Management %s" % VERSION
| 23.375 | 55 | 0.754011 |
4a0ae1430d255468cf8f7fa8fab0bd431da224f4 | 9,051 | py | Python | Plugins/UnrealEnginePython/Binaries/Win64/Lib/site-packages/tensorflow/contrib/quantize/python/graph_matcher.py | JustinACoder/H22-GR3-UnrealAI | 361eb9ef1147f8a2991e5f98c4118cd823184adf | [
"MIT"
] | 6 | 2022-02-04T18:12:24.000Z | 2022-03-21T23:57:12.000Z | Lib/site-packages/tensorflow/contrib/quantize/python/graph_matcher.py | shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings | 1fa4cd6a566c8745f455fc3d2273208f21f88ced | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/tensorflow/contrib/quantize/python/graph_matcher.py | shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings | 1fa4cd6a566c8745f455fc3d2273208f21f88ced | [
"bzip2-1.0.6"
] | 1 | 2022-02-08T03:53:23.000Z | 2022-02-08T03:53:23.000Z | # Copyright 2017 The TensorFlow 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... | 33.153846 | 81 | 0.662689 |
4a0ae177ba4ecf064aae80d40f975331346da828 | 2,131 | py | Python | ngraph_onnx/onnx_importer/utils/misc.py | ddokupil/ngraph-onnx | 497f91d0972de0b5ca902633b3bce09e58b913a0 | [
"Apache-2.0"
] | null | null | null | ngraph_onnx/onnx_importer/utils/misc.py | ddokupil/ngraph-onnx | 497f91d0972de0b5ca902633b3bce09e58b913a0 | [
"Apache-2.0"
] | 3 | 2018-06-04T13:37:27.000Z | 2018-06-04T14:05:47.000Z | ngraph_onnx/onnx_importer/utils/misc.py | ddokupil/ngraph-onnx | 497f91d0972de0b5ca902633b3bce09e58b913a0 | [
"Apache-2.0"
] | null | null | null | # ******************************************************************************
# Copyright 2018 Intel Corporation
#
# 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.o... | 38.745455 | 90 | 0.651807 |
4a0ae17a11102bd62aadc2e50ea0cc887917c6ef | 690 | py | Python | models.py | Thytu/earthquakePrediction | 95777022e492bd21aa2107c2b5af7a80b38abc2f | [
"MIT"
] | null | null | null | models.py | Thytu/earthquakePrediction | 95777022e492bd21aa2107c2b5af7a80b38abc2f | [
"MIT"
] | null | null | null | models.py | Thytu/earthquakePrediction | 95777022e492bd21aa2107c2b5af7a80b38abc2f | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
class RNN(nn.Module):
def __init__(self, intput_size, hidden_size, output_size):
super().__init__()
self.hidden_size = hidden_size
self.i2h = nn.Linear(intput_size + hidden_size, hidden_size)
self.i2o = nn.Linear(intput_size + hidden_size, output_... | 30 | 68 | 0.65942 |
4a0ae1cd5a4fef1efc21cab29c25016a0e1926b0 | 2,364 | py | Python | intruder-detector.py | Miguel-Munoz-Dominguez/diy-opensource-intruder-detection | 23b14169d6e46fc12f6c4447c7b6727ea94b5521 | [
"MIT"
] | null | null | null | intruder-detector.py | Miguel-Munoz-Dominguez/diy-opensource-intruder-detection | 23b14169d6e46fc12f6c4447c7b6727ea94b5521 | [
"MIT"
] | null | null | null | intruder-detector.py | Miguel-Munoz-Dominguez/diy-opensource-intruder-detection | 23b14169d6e46fc12f6c4447c7b6727ea94b5521 | [
"MIT"
] | null | null | null |
picam = False
if picam:
from picamera import PiCamera
else:
import cv2
import time
import telepot
import RPi.GPIO as GPIO
import subprocess
if picam:
camera = PiCamera()
camera.rotation = 180
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
GPIO.setup(11,GPIO.IN)
intruder = False
enabled = False
def handle(... | 27.488372 | 136 | 0.649746 |
4a0ae33271a6e7f3cfd72dabf2bfff2acdd86300 | 5,819 | py | Python | tests/annotators/test_cosmic.py | NCI-GDC/aliquot-maf-tools | 6aec9490ab7194ec605bf02c4c8e7c1cfca53973 | [
"Apache-2.0"
] | 1 | 2020-09-18T17:52:37.000Z | 2020-09-18T17:52:37.000Z | tests/annotators/test_cosmic.py | NCI-GDC/aliquot-maf-tools | 6aec9490ab7194ec605bf02c4c8e7c1cfca53973 | [
"Apache-2.0"
] | null | null | null | tests/annotators/test_cosmic.py | NCI-GDC/aliquot-maf-tools | 6aec9490ab7194ec605bf02c4c8e7c1cfca53973 | [
"Apache-2.0"
] | 1 | 2020-08-14T08:49:39.000Z | 2020-08-14T08:49:39.000Z | """
Tests for the ``aliquotmaf.annotators.Cosmic`` class.
"""
from collections import OrderedDict, namedtuple
import pysam
import pytest
from maflib.column_types import SequenceOfStrings
from aliquotmaf.annotators import CosmicID
from aliquotmaf.converters.builder import get_builder
@pytest.fixture
def setup_annota... | 27.448113 | 83 | 0.670562 |
4a0ae41fc43591aa1d8fa0b837c5058ae5f5a250 | 218 | py | Python | basis_modules/modules/marketstack/importers/base.py | kvh/snapflow-modules | 6123597f4b71a8e890b8ba7df471c7efbd59d6a4 | [
"BSD-3-Clause"
] | null | null | null | basis_modules/modules/marketstack/importers/base.py | kvh/snapflow-modules | 6123597f4b71a8e890b8ba7df471c7efbd59d6a4 | [
"BSD-3-Clause"
] | 2 | 2021-07-26T17:46:22.000Z | 2021-08-02T19:40:02.000Z | basis_modules/modules/marketstack/importers/base.py | kvh/snapflow-modules | 6123597f4b71a8e890b8ba7df471c7efbd59d6a4 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import annotations
from datetime import date
MARKETSTACK_API_BASE_URL = "http://api.marketstack.com/v1/"
HTTPS_MARKETSTACK_API_BASE_URL = "https://api.marketstack.com/v1/"
MIN_DATE = date(2000, 1, 1)
| 27.25 | 66 | 0.788991 |
4a0ae51bee48d252592d182838f4d6fcd70d5659 | 119 | py | Python | django_project/users/admin.py | courage173/django_project | 7a04cbfa20cc4bb913d08edab74c6f7d633fd3ee | [
"bzip2-1.0.6"
] | null | null | null | django_project/users/admin.py | courage173/django_project | 7a04cbfa20cc4bb913d08edab74c6f7d633fd3ee | [
"bzip2-1.0.6"
] | null | null | null | django_project/users/admin.py | courage173/django_project | 7a04cbfa20cc4bb913d08edab74c6f7d633fd3ee | [
"bzip2-1.0.6"
] | null | null | null | from django.contrib import admin
# Register your models here.
from .models import Profile
admin.site.register(Profile) | 23.8 | 32 | 0.815126 |
4a0ae60a8630c4a48f9ced0729dd343d07987615 | 3,951 | py | Python | tests/test_writers.py | EgorVorontsov/corsair | d17ea4d43cf16a6cc3b45ffbb407650bbe628665 | [
"MIT"
] | null | null | null | tests/test_writers.py | EgorVorontsov/corsair | d17ea4d43cf16a6cc3b45ffbb407650bbe628665 | [
"MIT"
] | null | null | null | tests/test_writers.py | EgorVorontsov/corsair | d17ea4d43cf16a6cc3b45ffbb407650bbe628665 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Writers module tests.
"""
import pytest
from corsair import RegisterMapReader, ConfigurationReader
from corsair import RegisterMapWriter, ConfigurationWriter, LbBridgeWriter
from corsair import HdlWriter, DocsWriter
from corsair import Configuration, RegisterMap
cla... | 31.862903 | 74 | 0.627436 |
4a0ae653fbe1fccb883f83aba5065f77ce2a79de | 9,589 | py | Python | demo_cli.py | DJKINGASSASSIN/Real-Time-Voice-Cloning | 34bb74b0286840cd093a8d9f71e5ae89da4ce3b4 | [
"MIT"
] | 35,818 | 2019-06-12T17:16:29.000Z | 2022-03-31T21:02:16.000Z | demo_cli.py | DJKINGASSASSIN/Real-Time-Voice-Cloning | 34bb74b0286840cd093a8d9f71e5ae89da4ce3b4 | [
"MIT"
] | 973 | 2019-06-12T17:16:35.000Z | 2022-03-31T10:35:41.000Z | demo_cli.py | DJKINGASSASSIN/Real-Time-Voice-Cloning | 34bb74b0286840cd093a8d9f71e5ae89da4ce3b4 | [
"MIT"
] | 6,583 | 2019-06-12T21:14:18.000Z | 2022-03-31T03:54:10.000Z | import argparse
import os
from pathlib import Path
import librosa
import numpy as np
import soundfile as sf
import torch
from encoder import inference as encoder
from encoder.params_model import model_embedding_size as speaker_embedding_size
from synthesizer.inference import Synthesizer
from utils.argutils import pri... | 45.880383 | 117 | 0.653457 |
4a0ae6e4d8b11a3284c792fb299479b8510f89be | 16,414 | py | Python | lib/enthought/traits/ui/item.py | mattfoster/matplotlib | 0b47697b19b77226c633ec6a3d74a2199a153315 | [
"PSF-2.0",
"BSD-3-Clause"
] | 1 | 2016-05-08T18:33:12.000Z | 2016-05-08T18:33:12.000Z | lib/enthought/traits/ui/item.py | mattfoster/matplotlib | 0b47697b19b77226c633ec6a3d74a2199a153315 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | lib/enthought/traits/ui/item.py | mattfoster/matplotlib | 0b47697b19b77226c633ec6a3d74a2199a153315 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | #------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions describe... | 39.839806 | 84 | 0.495614 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.