hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | 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 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
37eb1b0657a210c55097430b315fbcd465c4cdfe | 814 | py | Python | policykit/django_db_logger/migrations/0002_initial.py | mashton/policyk | 623523d76d63c06b6d559ad7b477d80512fbd2e7 | [
"MIT"
] | 78 | 2020-05-08T17:25:38.000Z | 2022-01-13T05:44:50.000Z | policykit/django_db_logger/migrations/0002_initial.py | mashton/policyk | 623523d76d63c06b6d559ad7b477d80512fbd2e7 | [
"MIT"
] | 302 | 2020-02-20T07:04:30.000Z | 2022-02-25T17:44:23.000Z | policykit/django_db_logger/migrations/0002_initial.py | mashton/policyk | 623523d76d63c06b6d559ad7b477d80512fbd2e7 | [
"MIT"
] | 13 | 2020-04-17T19:44:26.000Z | 2022-02-25T17:18:04.000Z | # Generated by Django 3.2.2 on 2021-09-02 15:10
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('django_db_logger', '0001_initial'),
('policyengine', '0001_initial'),
]
operations = [
... | 29.071429 | 134 | 0.638821 | 688 | 0.845209 | 0 | 0 | 0 | 0 | 0 | 0 | 205 | 0.251843 |
37eb3791b2e71065562272b988c38a600939b27b | 3,087 | py | Python | Charm/models/risk_functions.py | TanyaAdams1/Charm | cc6dd64d01f8cb4cf0eb92dadefcb7575d75ec9d | [
"BSD-3-Clause"
] | 17 | 2018-04-23T20:17:58.000Z | 2021-04-12T19:28:40.000Z | Charm/models/risk_functions.py | TanyaAdams1/Charm | cc6dd64d01f8cb4cf0eb92dadefcb7575d75ec9d | [
"BSD-3-Clause"
] | 1 | 2020-02-01T23:57:28.000Z | 2020-02-04T18:03:17.000Z | Charm/models/risk_functions.py | TanyaAdams1/Charm | cc6dd64d01f8cb4cf0eb92dadefcb7575d75ec9d | [
"BSD-3-Clause"
] | 3 | 2018-04-19T19:24:38.000Z | 2020-11-06T00:33:53.000Z | import numpy as np
from mcerp import *
from uncertainties.core import AffineScalarFunc
class RiskFunction(object):
def get_risk(self, bar, p):
""" Computes risk for perf array w.r.t. bar.
Args:
bar: reference performance bar.
perfs: performance array-like.
Returns:... | 29.4 | 74 | 0.551344 | 2,986 | 0.967282 | 0 | 0 | 0 | 0 | 0 | 0 | 441 | 0.142857 |
37eb8f04b291f998b42a8e819f9ce512c5fabcfb | 277 | py | Python | code/doubanUtils.py | verazuo/douban_crawler | 042e870c74df8b6f4eb1cd2af3b90d5b6699ab8f | [
"MIT"
] | 1 | 2021-04-03T12:41:29.000Z | 2021-04-03T12:41:29.000Z | code/doubanUtils.py | verazuo/douban_crawler | 042e870c74df8b6f4eb1cd2af3b90d5b6699ab8f | [
"MIT"
] | null | null | null | code/doubanUtils.py | verazuo/douban_crawler | 042e870c74df8b6f4eb1cd2af3b90d5b6699ab8f | [
"MIT"
] | null | null | null | import requests
import re
from bs4 import BeautifulSoup
def nextPageLink(sess,soup,page,head=""):
NextPage=soup.find(class_='next').link.get('href')
req=sess.get(head + NextPage)
print(f'第{page}页:',req.status_code)
return BeautifulSoup(req.text,'html.parser') | 27.7 | 54 | 0.722022 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.159011 |
37eba4f34e7db6830d71aa2b98daa23f3f5f4d63 | 1,565 | py | Python | 491/491.py | kaixiang1992/python-flask | 2b4c597d83f5a6ed662d42d7ff692e563a9adbf8 | [
"MIT"
] | null | null | null | 491/491.py | kaixiang1992/python-flask | 2b4c597d83f5a6ed662d42d7ff692e563a9adbf8 | [
"MIT"
] | null | null | null | 491/491.py | kaixiang1992/python-flask | 2b4c597d83f5a6ed662d42d7ff692e563a9adbf8 | [
"MIT"
] | null | null | null | from sqlalchemy import create_engine, Column, Integer, String, ForeignKey
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, relationship
# TODO: db_uri
# dialect+driver://username:password@host:port/database?charset=utf8
DB_URI = 'mysql+pymysql://root:root123@127.0.0.1:33... | 26.525424 | 84 | 0.729073 | 565 | 0.340157 | 0 | 0 | 0 | 0 | 0 | 0 | 767 | 0.46177 |
37ebc35183b9314a344aaf25eb9e7de4a348916a | 2,149 | py | Python | spacy/tests/tagger/test_lemmatizer.py | TerminalWitchcraft/spaCy | 29adbef095c04e21a691e912671e4ec21082b047 | [
"MIT"
] | 1 | 2018-09-24T17:00:23.000Z | 2018-09-24T17:00:23.000Z | spacy/tests/tagger/test_lemmatizer.py | TerminalWitchcraft/spaCy | 29adbef095c04e21a691e912671e4ec21082b047 | [
"MIT"
] | null | null | null | spacy/tests/tagger/test_lemmatizer.py | TerminalWitchcraft/spaCy | 29adbef095c04e21a691e912671e4ec21082b047 | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals
from ...lemmatizer import read_index, read_exc
import pytest
@pytest.mark.models
@pytest.mark.parametrize('text,lemmas', [("aardwolves", ["aardwolf"]),
("aardwolf", ["aardwolf"]),
... | 30.7 | 74 | 0.604467 | 0 | 0 | 0 | 0 | 2,013 | 0.934974 | 0 | 0 | 331 | 0.153739 |
37ebf327c9046920009b45cecc899607501e8a37 | 2,530 | py | Python | sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/models/__init__.py | RAY-316/azure-sdk-for-python | 4f7790deaf46c6f4e965f099f36eb73a7954ad5b | [
"MIT"
] | null | null | null | sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/models/__init__.py | RAY-316/azure-sdk-for-python | 4f7790deaf46c6f4e965f099f36eb73a7954ad5b | [
"MIT"
] | null | null | null | sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/models/__init__.py | RAY-316/azure-sdk-for-python | 4f7790deaf46c6f4e965f099f36eb73a7954ad5b | [
"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 ... | 40.806452 | 94 | 0.729644 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,024 | 0.404743 |
37ee0cfd689d053055f9512b80721598ce49ab1a | 1,845 | py | Python | AlgoNet2/Helper.py | Bhaney44/AlgorandDevelopment | 309e68337227af879f5c4e92c72156928a39fe32 | [
"MIT"
] | null | null | null | AlgoNet2/Helper.py | Bhaney44/AlgorandDevelopment | 309e68337227af879f5c4e92c72156928a39fe32 | [
"MIT"
] | 1 | 2021-04-24T19:24:05.000Z | 2021-04-28T05:32:40.000Z | AlgoNet2/Helper.py | Bhaney44/AlgorandDevelopment | 309e68337227af879f5c4e92c72156928a39fe32 | [
"MIT"
] | 1 | 2022-01-17T18:00:56.000Z | 2022-01-17T18:00:56.000Z | import numpy as np
from keras.models import Sequential
from keras.layers import LSTM, Dense, Dropout
def visualize_training_results(results):
"""
Plots the loss and accuracy for the training and testing data
"""
history = results.history
plt.figure(figsize=(12,4))
plt.plot(history['val_loss'])
... | 27.954545 | 101 | 0.615176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 583 | 0.315989 |
37ef3e58f557478ce40c98955a961b550b4256ca | 14,120 | py | Python | apex/contrib/multihead_attn/self_multihead_attn_func.py | Muflhi01/apex | 79c018776129aad13abeb4ce63d24e1fbb4cd29e | [
"BSD-3-Clause"
] | 6,523 | 2018-04-25T17:35:27.000Z | 2022-03-31T22:49:45.000Z | apex/contrib/multihead_attn/self_multihead_attn_func.py | Muflhi01/apex | 79c018776129aad13abeb4ce63d24e1fbb4cd29e | [
"BSD-3-Clause"
] | 1,100 | 2018-05-18T00:03:34.000Z | 2022-03-30T22:00:33.000Z | apex/contrib/multihead_attn/self_multihead_attn_func.py | Muflhi01/apex | 79c018776129aad13abeb4ce63d24e1fbb4cd29e | [
"BSD-3-Clause"
] | 1,057 | 2018-05-07T13:53:04.000Z | 2022-03-31T09:18:47.000Z | import torch
import torch.nn.functional as F
class SelfAttnFunc(torch.autograd.Function):
@staticmethod
def forward(
ctx,
use_time_mask,
is_training,
heads,
scale,
inputs,
input_weights,
output_weights,
input_biases,
output_biases... | 45.844156 | 133 | 0.590652 | 14,034 | 0.993909 | 0 | 0 | 13,979 | 0.990014 | 0 | 0 | 5,123 | 0.362819 |
37ef3fd76dba247104e4038149d9913b2621526c | 6,481 | py | Python | api/app/reviews/models.py | NikolaSiplakova/Baobab | 180cd3cb492ed47d38ca0b473572fad0ac6f604b | [
"Apache-2.0"
] | null | null | null | api/app/reviews/models.py | NikolaSiplakova/Baobab | 180cd3cb492ed47d38ca0b473572fad0ac6f604b | [
"Apache-2.0"
] | null | null | null | api/app/reviews/models.py | NikolaSiplakova/Baobab | 180cd3cb492ed47d38ca0b473572fad0ac6f604b | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
from app import db
from app.utils import misc
class ReviewForm(db.Model):
id = db.Column(db.Integer(), primary_key=True)
application_form_id = db.Column(db.Integer(), db.ForeignKey('application_form.id'), nullable=False)
is_open = db.Column(db.Boolean(), nullable=False)... | 42.084416 | 123 | 0.666101 | 6,368 | 0.982564 | 0 | 0 | 0 | 0 | 0 | 0 | 474 | 0.073137 |
37ef5b190722144951d2dc7179cd76d69b1cdbc2 | 3,307 | py | Python | speednet/vae/ConvVae.py | Abhranta/speednet | d15971e946cddc62a644d6a6f3be10a4df5b2ce2 | [
"MIT"
] | 1 | 2021-01-20T14:29:14.000Z | 2021-01-20T14:29:14.000Z | speednet/vae/ConvVae.py | Abhranta/speednet | d15971e946cddc62a644d6a6f3be10a4df5b2ce2 | [
"MIT"
] | null | null | null | speednet/vae/ConvVae.py | Abhranta/speednet | d15971e946cddc62a644d6a6f3be10a4df5b2ce2 | [
"MIT"
] | null | null | null | import torch.nn as nn
import torch
from utils import Flatten , Unflatten , weights_init , down_conv , up_conv
class Net(nn.Module):
def __init__(self , num_layers , img_dim , in_chan , act_func , latent_vector_size):
super(Net , self).__init__()
assert act_func in ("ReLU" , "LeakyReLU") , ... | 47.927536 | 133 | 0.556093 | 3,196 | 0.966435 | 0 | 0 | 0 | 0 | 0 | 0 | 165 | 0.049894 |
37f19f659d9ef143b2408f934266bdcc951f5ade | 73,603 | py | Python | nelpy/utils.py | IsaacBusaleh/nelpy | f2663cf6f028c9bd0e630fbf8a527c236f4e0f41 | [
"MIT"
] | 1 | 2021-01-01T17:59:31.000Z | 2021-01-01T17:59:31.000Z | nelpy/utils.py | IsaacBusaleh/nelpy | f2663cf6f028c9bd0e630fbf8a527c236f4e0f41 | [
"MIT"
] | null | null | null | nelpy/utils.py | IsaacBusaleh/nelpy | f2663cf6f028c9bd0e630fbf8a527c236f4e0f41 | [
"MIT"
] | null | null | null | """This module contains helper functions and utilities for nelpy."""
__all__ = ['spatial_information',
'frange',
'swap_cols',
'swap_rows',
'pairwise',
'is_sorted',
'linear_merge',
'PrettyDuration',
'ddt_asa',
'get_contig... | 37.135721 | 190 | 0.615709 | 4,432 | 0.060189 | 2,839 | 0.038555 | 22,944 | 0.311591 | 0 | 0 | 37,687 | 0.511808 |
37f1a13e31b524b47983953b4e76242354934ac4 | 23,625 | py | Python | python/paddle/fluid/contrib/slim/quantization/imperative/qat.py | logan-siyao-peng/Paddle | 10a8f3e5c3151c1abb810fba2994cc30e1232bec | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/contrib/slim/quantization/imperative/qat.py | logan-siyao-peng/Paddle | 10a8f3e5c3151c1abb810fba2994cc30e1232bec | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/contrib/slim/quantization/imperative/qat.py | logan-siyao-peng/Paddle | 10a8f3e5c3151c1abb810fba2994cc30e1232bec | [
"Apache-2.0"
] | 1 | 2021-01-17T01:11:45.000Z | 2021-01-17T01:11:45.000Z | # Copyright (c) 2020 PaddlePaddle 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 app... | 46.232877 | 114 | 0.600974 | 21,644 | 0.916148 | 0 | 0 | 0 | 0 | 0 | 0 | 11,637 | 0.492571 |
37f415fea8c9ac7d7647ab03f1f9ceb7a0593bde | 1,815 | py | Python | sc/northwind.py | elliotgunn/DS-Unit-3-Sprint-2-SQL-and-Databases | c730e2b3e66199226fa7549511cbb7801eb7a694 | [
"MIT"
] | null | null | null | sc/northwind.py | elliotgunn/DS-Unit-3-Sprint-2-SQL-and-Databases | c730e2b3e66199226fa7549511cbb7801eb7a694 | [
"MIT"
] | null | null | null | sc/northwind.py | elliotgunn/DS-Unit-3-Sprint-2-SQL-and-Databases | c730e2b3e66199226fa7549511cbb7801eb7a694 | [
"MIT"
] | null | null | null | import pandas as pd
import sqlite3
from pandas import DataFrame
n_conn = sqlite3.connect('northwind_small.sqlite3')
n_curs = n_conn.cursor()
# What are the ten most expensive items (per unit price) in the database?
query = """
SELECT ProductName, UnitPrice
FROM Product
ORDER BY UnitPrice DESC
LIMIT 10
"""
n_curs.ex... | 22.6875 | 79 | 0.755923 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,336 | 0.736088 |
37f57e46f9f9adb655b1a0930224aed655bce6c7 | 1,396 | py | Python | tests/test_app/library/loans/admin.py | Pijuli/django-jazzmin | e3f9d45183d58f78bf4c6793969490631a84681d | [
"MIT"
] | 972 | 2020-05-12T19:51:01.000Z | 2022-03-31T20:18:33.000Z | tests/test_app/library/loans/admin.py | Pijuli/django-jazzmin | e3f9d45183d58f78bf4c6793969490631a84681d | [
"MIT"
] | 290 | 2020-05-12T17:35:21.000Z | 2022-03-31T15:18:59.000Z | tests/test_app/library/loans/admin.py | Pijuli/django-jazzmin | e3f9d45183d58f78bf4c6793969490631a84681d | [
"MIT"
] | 166 | 2020-06-11T10:50:47.000Z | 2022-03-24T12:19:00.000Z | from django.contrib import admin
from django.urls import path
from .models import BookLoan, Library
from .views import CustomView
class BookLoanInline(admin.StackedInline):
model = BookLoan
extra = 1
readonly_fields = ("id", "duration")
fields = (
"book",
"imprint",
"status",
... | 25.851852 | 85 | 0.593123 | 1,205 | 0.863181 | 0 | 0 | 982 | 0.703438 | 0 | 0 | 374 | 0.267908 |
37f5b2546c850f56d3d094ea379b377bba04af7c | 2,051 | py | Python | lib/MergeMetabolicAnnotations/utils/CompareAnnotationsUtil.py | jeffkimbrel/MergeMetabolicAnnotations | ec971d114d57942cef73dc2980c8faf48cea7afe | [
"MIT"
] | 1 | 2021-08-04T15:42:46.000Z | 2021-08-04T15:42:46.000Z | lib/MergeMetabolicAnnotations/utils/CompareAnnotationsUtil.py | jeffkimbrel/MergeMetabolicAnnotations | ec971d114d57942cef73dc2980c8faf48cea7afe | [
"MIT"
] | 3 | 2019-02-01T22:14:02.000Z | 2021-02-03T03:16:52.000Z | lib/MergeMetabolicAnnotations/utils/CompareAnnotationsUtil.py | jeffkimbrel/MergeMetabolicAnnotations | ec971d114d57942cef73dc2980c8faf48cea7afe | [
"MIT"
] | 3 | 2018-11-30T21:31:00.000Z | 2021-01-12T16:13:01.000Z | import os
import datetime
import logging
import json
import uuid
from installed_clients.WorkspaceClient import Workspace as Workspace
from installed_clients.KBaseReportClient import KBaseReport
from installed_clients.annotation_ontology_apiServiceClient import annotation_ontology_api
import MergeMetabolicAnnotations.... | 36.625 | 92 | 0.686494 | 1,707 | 0.832277 | 0 | 0 | 0 | 0 | 0 | 0 | 355 | 0.173086 |
37f7e625de3ee5f43165604bef1b04155036f942 | 56 | py | Python | models/__init__.py | TvSeriesFans/CineMonster | 036a3223618afd536932d21b0e86d18d0fba3b28 | [
"Apache-2.0"
] | 15 | 2017-09-17T17:52:43.000Z | 2020-08-31T15:41:12.000Z | models/__init__.py | TvSeriesFans/CineMonster | 036a3223618afd536932d21b0e86d18d0fba3b28 | [
"Apache-2.0"
] | 13 | 2017-03-14T13:24:14.000Z | 2021-08-20T13:52:54.000Z | models/__init__.py | TvSeriesFans/CineMonster | 036a3223618afd536932d21b0e86d18d0fba3b28 | [
"Apache-2.0"
] | 27 | 2017-07-01T18:33:49.000Z | 2021-08-05T09:13:18.000Z | from models.Model import Player, Group, Session, engine
| 28 | 55 | 0.803571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
37f85d17e2772b9092e4ca6adf7715edc27bc547 | 1,168 | py | Python | src/backend/tests/test_game/test_models.py | ToJestKrzysio/TheJungleGame | 904dd4adc937145df2c8c353eb83bec3b5dd1f7e | [
"MIT"
] | null | null | null | src/backend/tests/test_game/test_models.py | ToJestKrzysio/TheJungleGame | 904dd4adc937145df2c8c353eb83bec3b5dd1f7e | [
"MIT"
] | null | null | null | src/backend/tests/test_game/test_models.py | ToJestKrzysio/TheJungleGame | 904dd4adc937145df2c8c353eb83bec3b5dd1f7e | [
"MIT"
] | null | null | null | from unittest.mock import Mock, patch
import numpy as np
from game.models import ValuePolicyModel
def test_predict():
mask = np.zeros((9, 7, 8), dtype=bool)
mask[1, 2, 3] = 1
mask[6, 6, 6] = 1
tensor_mock = Mock()
policy_tensor = np.zeros((9, 7, 8), dtype=float)
policy_tensor[0, 0, 0] = 10... | 27.809524 | 85 | 0.673801 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
37f98cbd357a8c5c3fa954e32959aafbe7a7882b | 653 | py | Python | sina_spider/items.py | yanwen0614/Weibo | 5d85e39d0cf7fc848bf5a06df08acbf38661db8d | [
"Apache-2.0"
] | null | null | null | sina_spider/items.py | yanwen0614/Weibo | 5d85e39d0cf7fc848bf5a06df08acbf38661db8d | [
"Apache-2.0"
] | null | null | null | sina_spider/items.py | yanwen0614/Weibo | 5d85e39d0cf7fc848bf5a06df08acbf38661db8d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
from scrapy import Item, Field
class TweetsItem(Item):
# define the fields for your item here like:
Author = Field()
Title = Field()
Create_time = Fie... | 18.138889 | 51 | 0.603369 | 381 | 0.583461 | 0 | 0 | 0 | 0 | 0 | 0 | 199 | 0.304747 |
37fa8681617c1303e48ae88c3c02ae64abad5b16 | 9,259 | py | Python | emission/core/wrapper/client.py | Andrew-Tan/e-mission-server | 91d59bee86e63d803e401f10f4b6a2502effedda | [
"BSD-3-Clause"
] | null | null | null | emission/core/wrapper/client.py | Andrew-Tan/e-mission-server | 91d59bee86e63d803e401f10f4b6a2502effedda | [
"BSD-3-Clause"
] | 1 | 2017-08-31T19:54:16.000Z | 2017-08-31T19:54:16.000Z | emission/core/wrapper/client.py | Andrew-Tan/e-mission-server | 91d59bee86e63d803e401f10f4b6a2502effedda | [
"BSD-3-Clause"
] | null | null | null | import json
import logging
import dateutil.parser
from datetime import datetime
# Our imports
from emission.core.get_database import get_profile_db, get_client_db, get_pending_signup_db
import emission.clients.common
class Client:
def __init__(self, clientName):
# TODO: write background process to ensure that t... | 38.102881 | 186 | 0.696836 | 9,039 | 0.976239 | 0 | 0 | 639 | 0.069014 | 0 | 0 | 3,208 | 0.346474 |
37fb65065000540ac24e1a720effb1e2f2805f1c | 57 | py | Python | setup.py | karianjahi/advent_of_code | 16939cc7c475465c35d8750328b9b7aef60fc4d6 | [
"MIT"
] | null | null | null | setup.py | karianjahi/advent_of_code | 16939cc7c475465c35d8750328b9b7aef60fc4d6 | [
"MIT"
] | null | null | null | setup.py | karianjahi/advent_of_code | 16939cc7c475465c35d8750328b9b7aef60fc4d6 | [
"MIT"
] | null | null | null | import setuptools
setuptools.setup(name='advent_of_code') | 28.5 | 39 | 0.859649 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.280702 |
37fbc6ec2f245fb6973d1636993985b6d187eb07 | 63 | py | Python | src/csvutils.py | imco/nmx | 5c6303ece6148a83963b2e6524d6f94b450ad659 | [
"MIT"
] | null | null | null | src/csvutils.py | imco/nmx | 5c6303ece6148a83963b2e6524d6f94b450ad659 | [
"MIT"
] | null | null | null | src/csvutils.py | imco/nmx | 5c6303ece6148a83963b2e6524d6f94b450ad659 | [
"MIT"
] | 1 | 2020-04-07T19:02:41.000Z | 2020-04-07T19:02:41.000Z | def escapeQuotes(string):
return string.replace('"','""');
| 21 | 36 | 0.634921 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.111111 |
37fbd5a54d581539270bd58bff9f475311ff3236 | 68 | py | Python | test/sanity_import_vpp_papi.py | amithbraj/vpp | edf1da94dc099c6e2ab1d455ce8652fada3cdb04 | [
"Apache-2.0"
] | 751 | 2017-07-13T06:16:46.000Z | 2022-03-30T09:14:35.000Z | test/sanity_import_vpp_papi.py | amithbraj/vpp | edf1da94dc099c6e2ab1d455ce8652fada3cdb04 | [
"Apache-2.0"
] | 63 | 2018-06-11T09:48:35.000Z | 2021-01-05T09:11:03.000Z | test/sanity_import_vpp_papi.py | amithbraj/vpp | edf1da94dc099c6e2ab1d455ce8652fada3cdb04 | [
"Apache-2.0"
] | 479 | 2017-07-13T06:17:26.000Z | 2022-03-31T18:20:43.000Z | #!/usr/bin/env python3
""" sanity check script """
import vpp_papi
| 13.6 | 27 | 0.691176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 0.720588 |
37fbd663edc97f78d91a3917050b5ae91d7a6023 | 2,191 | py | Python | examples/labs/demo_dmtx.py | yarikoptic/nipy | 749302c7ffa8ea714cc32d405f0df521102bbc6f | [
"BSD-3-Clause"
] | null | null | null | examples/labs/demo_dmtx.py | yarikoptic/nipy | 749302c7ffa8ea714cc32d405f0df521102bbc6f | [
"BSD-3-Clause"
] | null | null | null | examples/labs/demo_dmtx.py | yarikoptic/nipy | 749302c7ffa8ea714cc32d405f0df521102bbc6f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
from __future__ import print_function # Python 2/3 compatibility
__doc__ = """
Examples of design matrices specification and and computation (event-related
design, FIR design, etc)
Re... | 30.013699 | 77 | 0.685075 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 669 | 0.30534 |
37fdb024ea14a002f56310787cf60b4ca3d52485 | 36,821 | py | Python | fbpcs/private_computation/test/service/test_private_computation.py | yelixu2/fbpcs | 31b1154bf1a207471fa207a0b0e4c74693f09608 | [
"MIT"
] | null | null | null | fbpcs/private_computation/test/service/test_private_computation.py | yelixu2/fbpcs | 31b1154bf1a207471fa207a0b0e4c74693f09608 | [
"MIT"
] | null | null | null | fbpcs/private_computation/test/service/test_private_computation.py | yelixu2/fbpcs | 31b1154bf1a207471fa207a0b0e4c74693f09608 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import unittest
from collections import defaultdict
from typing import List, Optional, Tuple
from unittest.mock import ... | 41.558691 | 515 | 0.677222 | 34,132 | 0.926971 | 0 | 0 | 14,660 | 0.398142 | 2,033 | 0.055213 | 6,569 | 0.178404 |
53009d254c6a8eb6bd006c01a55209b99684addf | 174 | py | Python | app.py | Eubule/Store-Manager-With-Datastructure | c21a7307cc59b53516fb40437b1a359ca48a4f2e | [
"MIT"
] | null | null | null | app.py | Eubule/Store-Manager-With-Datastructure | c21a7307cc59b53516fb40437b1a359ca48a4f2e | [
"MIT"
] | 4 | 2018-10-25T07:33:03.000Z | 2019-10-18T17:20:55.000Z | app.py | Eubule/Store-Manager-With-Datastructure | c21a7307cc59b53516fb40437b1a359ca48a4f2e | [
"MIT"
] | null | null | null | from app import app
from app.database.db import Database
if __name__ == "__main__":
db = Database()
db.create_tables()
db.create_admin()
app.run(debug=True) | 19.333333 | 36 | 0.683908 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.057471 |
5300ca645e4b887401ddf050ab62d54008d81798 | 680 | py | Python | src/main.py | ryuichi1208/scraping-py | 43036dff75cc47d3169e012096f0de70dea0296b | [
"MIT"
] | 2 | 2018-12-19T22:40:19.000Z | 2019-06-19T06:38:18.000Z | src/main.py | ryuichi1208/scraping_py | 43036dff75cc47d3169e012096f0de70dea0296b | [
"MIT"
] | null | null | null | src/main.py | ryuichi1208/scraping_py | 43036dff75cc47d3169e012096f0de70dea0296b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# flake8: noqa
from flask import Flask
from flask_themes2 import Themes
import config
from util.auth import is_admin
from util.converter import RegexConverter
from util.csrf import generate_csrf_token
app = Flask(__name__.split('.')[0])
app.secret_key = config.SECRET_KEY
app.url_map.converter... | 24.285714 | 57 | 0.757353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.192647 |
5302a9b7f4d36ed1d8c39a9e74b3775344df1bd4 | 2,028 | py | Python | HoursSelect.py | Maxahoy/ClassVolumeSilencer | 9a05f9dd4efbbbddc74377a27027fa40b2167d02 | [
"MIT"
] | null | null | null | HoursSelect.py | Maxahoy/ClassVolumeSilencer | 9a05f9dd4efbbbddc74377a27027fa40b2167d02 | [
"MIT"
] | null | null | null | HoursSelect.py | Maxahoy/ClassVolumeSilencer | 9a05f9dd4efbbbddc74377a27027fa40b2167d02 | [
"MIT"
] | null | null | null | """
This is how I'm gonna schedule hours
IDEA: import the format example file that I'm using and is saved in the same directory
"""
import csv
import pprint
from tkinter import *
from tkinter.filedialog import askopenfilename
import StringProcessing
def selectHoursFile():
Tk().withdraw() # we don't want a fu... | 28.971429 | 113 | 0.607988 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,252 | 0.617357 |
5305fe341e34b46ded5f2b3c486985048c12d0b5 | 415 | py | Python | src/bsmu/bone_age/models/dense_net/configs.py | IvanKosik/bone-age-models | 07f20a94951a3b584ee7b6d9a11805c37878214a | [
"BSD-3-Clause"
] | null | null | null | src/bsmu/bone_age/models/dense_net/configs.py | IvanKosik/bone-age-models | 07f20a94951a3b584ee7b6d9a11805c37878214a | [
"BSD-3-Clause"
] | null | null | null | src/bsmu/bone_age/models/dense_net/configs.py | IvanKosik/bone-age-models | 07f20a94951a3b584ee7b6d9a11805c37878214a | [
"BSD-3-Clause"
] | null | null | null | from pathlib import Path
from bsmu.bone_age.models import constants
IMAGE_DIR = Path('C:/MyDiskBackup/Projects/BoneAge/Data/SmallImages500_NoPads')
TRAIN_DATA_CSV_PATH = constants.TRAIN_DATA_CSV_PATH
VALID_DATA_CSV_PATH = constants.VALID_DATA_CSV_PATH
TEST_DATA_CSV_PATH = constants.TEST_DATA_CSV_PATH
BATC... | 29.642857 | 80 | 0.826506 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 99 | 0.238554 |
53066ef029d7bd3ef7be8bb9baad9578898d6c71 | 2,325 | py | Python | projection.py | ogawan/nisa | d758e41e4983cc35477e81d944689b0226f00ef5 | [
"MIT"
] | null | null | null | projection.py | ogawan/nisa | d758e41e4983cc35477e81d944689b0226f00ef5 | [
"MIT"
] | null | null | null | projection.py | ogawan/nisa | d758e41e4983cc35477e81d944689b0226f00ef5 | [
"MIT"
] | null | null | null | from matplotlib import pyplot as plt
def nisa_projection(years=30, annual_deposit=80, initial_budget=100):
"""
This is a function to plot deposit of TSUMITATE NISA
Parameters:
---------------
years: integer
How many years are you going to continue?
annual_depoist: integer
Annual deposit in... | 21.728972 | 76 | 0.594409 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 823 | 0.353978 |
530685b38b63bb864c23c036e780f7efc9f20c41 | 440,655 | py | Python | tensorflow-ops-generator/resources/gen_ops/gen_math_ops.py | wumo/sim-world | 2a3a5118239b27eeb268cd1e7bdbfe5f5604dab6 | [
"MIT"
] | 1 | 2019-01-12T13:17:32.000Z | 2019-01-12T13:17:32.000Z | rcnn/lib/python3.6/site-packages/tensorflow/python/ops/gen_math_ops.py | dreamingweaver/making_passportImage | 68f23411780ff82abe934dfae5fc04acb80f2c49 | [
"MIT"
] | null | null | null | rcnn/lib/python3.6/site-packages/tensorflow/python/ops/gen_math_ops.py | dreamingweaver/making_passportImage | 68f23411780ff82abe934dfae5fc04acb80f2c49 | [
"MIT"
] | null | null | null | """Python wrappers around TensorFlow ops.
This file is MACHINE GENERATED! Do not edit.
Original C++ source file: math_ops.cc
"""
import collections as _collections
import six as _six
from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow
from tensorflow.python.eager import context as _context
from ten... | 31.749766 | 26,169 | 0.632458 | 0 | 0 | 0 | 0 | 88,382 | 0.20057 | 0 | 0 | 221,310 | 0.50223 |
53090ea45ea4a45cdc2f0069622a80742e35321e | 5,215 | py | Python | indico/modules/oauth/models/applications.py | yamiacat/indico | 754c02cd7cd25bf1eab0ca5f497eb24b135dd51c | [
"MIT"
] | null | null | null | indico/modules/oauth/models/applications.py | yamiacat/indico | 754c02cd7cd25bf1eab0ca5f497eb24b135dd51c | [
"MIT"
] | null | null | null | indico/modules/oauth/models/applications.py | yamiacat/indico | 754c02cd7cd25bf1eab0ca5f497eb24b135dd51c | [
"MIT"
] | null | null | null | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from uuid import uuid4
from sqlalchemy.dialects.postgresql import ARRAY, UUID
from sqlalchemy.ext.declara... | 31.227545 | 117 | 0.623011 | 4,403 | 0.844295 | 0 | 0 | 787 | 0.150911 | 0 | 0 | 1,913 | 0.366826 |
530c6ba5f7b617f99321342102c64a175ed1a651 | 6,257 | py | Python | PaddleNLP/unarchived/deep_attention_matching_net/utils/layers.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | 3 | 2019-09-05T14:03:42.000Z | 2019-09-09T10:34:35.000Z | PaddleNLP/unarchived/deep_attention_matching_net/utils/layers.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | 2 | 2019-06-26T03:21:49.000Z | 2019-09-19T09:43:42.000Z | PaddleNLP/unarchived/deep_attention_matching_net/utils/layers.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | 2 | 2018-06-14T13:59:36.000Z | 2018-11-14T12:34:47.000Z | import paddle.fluid as fluid
def loss(x, y, clip_value=10.0):
"""Calculate the sigmoid cross entropy with logits for input(x).
Args:
x: Variable with shape with shape [batch, dim]
y: Input label
Returns:
loss: cross entropy
logits: prediction
"""
logits = fluid.l... | 31.129353 | 94 | 0.546588 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,020 | 0.163017 |
530c6de530c859b58a3a007a91c54314cf276d8d | 6,896 | py | Python | plugin.video.saltsrd.lite/js2py/translators/jsregexps.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | 1 | 2019-03-05T09:38:10.000Z | 2019-03-05T09:38:10.000Z | plugin.video.saltsrd.lite/js2py/translators/jsregexps.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | null | null | null | plugin.video.saltsrd.lite/js2py/translators/jsregexps.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | 1 | 2021-11-05T20:48:09.000Z | 2021-11-05T20:48:09.000Z | from salts_lib.pyjsparser.pyjsparserdata import *
REGEXP_SPECIAL_SINGLE = {'\\', '^', '$', '*', '+', '?', '.'}
NOT_PATTERN_CHARS = {'^', '$', '\\', '.', '*', '+', '?', '(', ')', '[', ']', '|'} # what about '{', '}', ???
CHAR_CLASS_ESCAPE = {'d', 'D', 's', 'S', 'w', 'W'}
CONTROL_ESCAPE_CHARS = {'f', 'n', 'r', 't',... | 31.488584 | 118 | 0.484049 | 6,029 | 0.874275 | 0 | 0 | 0 | 0 | 0 | 0 | 994 | 0.144142 |
530d6b117d510322f8ed51ead9a1be94d7c692f1 | 2,388 | py | Python | connectomics/model/block/squeeze_excitation.py | yixinliao/pytorch_connectomics | 0f6de546e6da1e0f3258b2c84f7e16b3a993c70c | [
"MIT"
] | 1 | 2020-05-17T08:01:56.000Z | 2020-05-17T08:01:56.000Z | connectomics/model/block/squeeze_excitation.py | yixinliao/pytorch_connectomics | 0f6de546e6da1e0f3258b2c84f7e16b3a993c70c | [
"MIT"
] | null | null | null | connectomics/model/block/squeeze_excitation.py | yixinliao/pytorch_connectomics | 0f6de546e6da1e0f3258b2c84f7e16b3a993c70c | [
"MIT"
] | 3 | 2020-03-31T21:40:12.000Z | 2021-06-09T02:26:43.000Z | import torch.nn as nn
from .basic import *
class squeeze_excitation_2d(nn.Module):
"""Squeeze-and-Excitation Block 2D
Args:
channel (int): number of input channels.
channel_reduction (int): channel squeezing factor.
spatial_reduction (int): pooling factor for x,y axes.
"""
def ... | 46.823529 | 156 | 0.68258 | 2,341 | 0.980318 | 0 | 0 | 0 | 0 | 0 | 0 | 540 | 0.226131 |
530dbebdee877862aa38a08b696073a86196141c | 4,282 | py | Python | duckdown/handlers/site_handler.py | blueshed/duckdown | e6d0e62d378bd2d9ed0cd5ce4bc7ab3476b86020 | [
"MIT"
] | null | null | null | duckdown/handlers/site_handler.py | blueshed/duckdown | e6d0e62d378bd2d9ed0cd5ce4bc7ab3476b86020 | [
"MIT"
] | null | null | null | duckdown/handlers/site_handler.py | blueshed/duckdown | e6d0e62d378bd2d9ed0cd5ce4bc7ab3476b86020 | [
"MIT"
] | null | null | null | # pylint: disable=W0201, E1101
""" handle request for markdown pages """
import logging
import os
import importlib
from tornado.web import RequestHandler, HTTPError
from tornado.escape import url_escape
from ..utils.converter_mixin import ConverterMixin
from .access_control import UserMixin
from ..utils.nav import nav
... | 33.193798 | 70 | 0.578001 | 3,867 | 0.903083 | 0 | 0 | 115 | 0.026857 | 1,775 | 0.414526 | 829 | 0.193601 |
530e6c72942083800f06be0b1704afe86e8b9dd0 | 627 | py | Python | Problemset/binary-search-tree-to-greater-sum-tree/binary-search-tree-to-greater-sum-tree.py | KivenCkl/LeetCode | fcc97c66f8154a5d20c2aca86120cb37b9d2d83d | [
"MIT"
] | 7 | 2019-05-08T03:41:05.000Z | 2020-12-22T12:39:43.000Z | Problemset/binary-search-tree-to-greater-sum-tree/binary-search-tree-to-greater-sum-tree.py | Yuziquan/LeetCode | 303fc1c8af847f783c4020bd731b28b72ed92a35 | [
"MIT"
] | 1 | 2021-07-19T03:48:35.000Z | 2021-07-19T03:48:35.000Z | Problemset/binary-search-tree-to-greater-sum-tree/binary-search-tree-to-greater-sum-tree.py | Yuziquan/LeetCode | 303fc1c8af847f783c4020bd731b28b72ed92a35 | [
"MIT"
] | 7 | 2019-05-10T20:43:20.000Z | 2021-02-22T03:47:35.000Z |
# @Title: 从二叉搜索树到更大和树 (Binary Search Tree to Greater Sum Tree)
# @Author: KivenC
# @Date: 2019-05-15 19:52:08
# @Runtime: 48 ms
# @Memory: 13 MB
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solu... | 24.115385 | 62 | 0.593301 | 316 | 0.486903 | 0 | 0 | 0 | 0 | 0 | 0 | 318 | 0.489985 |
530ebd58aea0c6b33d05245813f2f54d1c4a046b | 2,058 | py | Python | vine/clone.py | robinson96/GRAPE | f6404ae6ee2933647e515a9480077ab01fb2c430 | [
"BSD-3-Clause"
] | 4 | 2017-04-30T17:08:42.000Z | 2019-11-15T04:44:09.000Z | vine/clone.py | robinson96/GRAPE | f6404ae6ee2933647e515a9480077ab01fb2c430 | [
"BSD-3-Clause"
] | 1 | 2016-02-12T07:51:30.000Z | 2016-02-12T07:51:30.000Z | vine/clone.py | robinson96/GRAPE | f6404ae6ee2933647e515a9480077ab01fb2c430 | [
"BSD-3-Clause"
] | null | null | null | import os
import option
import utility
import grapeMenu
import grapeGit as git
import grapeConfig
class Clone(option.Option):
""" grape-clone
Clones a git repo and configures it for use with git.
Usage: grape-clone <url> <path> [--recursive] [--allNested]
Arguments:
<url> The URL of th... | 30.716418 | 120 | 0.59378 | 1,957 | 0.950923 | 0 | 0 | 0 | 0 | 0 | 0 | 798 | 0.387755 |
530f17168f0cbb129e06d1280fd5322946f49710 | 45,589 | py | Python | neo/test/iotest/test_nixio.py | pearsonlab/python-neo | 8915dfe9e55fd3a36be83d820bdd83ab085e9402 | [
"BSD-3-Clause"
] | null | null | null | neo/test/iotest/test_nixio.py | pearsonlab/python-neo | 8915dfe9e55fd3a36be83d820bdd83ab085e9402 | [
"BSD-3-Clause"
] | null | null | null | neo/test/iotest/test_nixio.py | pearsonlab/python-neo | 8915dfe9e55fd3a36be83d820bdd83ab085e9402 | [
"BSD-3-Clause"
] | 1 | 2018-04-13T04:48:48.000Z | 2018-04-13T04:48:48.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2016, German Neuroinformatics Node (G-Node)
# Achilleas Koutsou <achilleas.k@gmail.com>
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted under the terms of the BSD License. See
# LICE... | 39.132189 | 81 | 0.564873 | 44,440 | 0.974797 | 0 | 0 | 24,299 | 0.533001 | 0 | 0 | 4,193 | 0.091974 |
530f7b706908016c5f54e7ff0367363c422ad2e4 | 5,686 | py | Python | lib/taudataNlpTm.py | taudata-indonesia/elearning | 6f9db8b829357cde1ae678255cc251629dfc25d2 | [
"Apache-2.0"
] | 3 | 2020-08-29T04:54:25.000Z | 2021-12-12T08:25:48.000Z | lib/taudataNlpTm.py | taudataid/eLearning | 6f9db8b829357cde1ae678255cc251629dfc25d2 | [
"Apache-2.0"
] | null | null | null | lib/taudataNlpTm.py | taudataid/eLearning | 6f9db8b829357cde1ae678255cc251629dfc25d2 | [
"Apache-2.0"
] | 6 | 2020-07-28T23:46:57.000Z | 2021-09-27T02:22:01.000Z | # -*- coding: utf-8 -*-
"""
Created on Wed Mar 28 11:25:43 2019
@author: Taufik Sutanto
taufik@tau-data.id
https://tau-data.id
~~Perjanjian Penggunaan Materi & Codes (PPMC) - License:~~
* Modul Python dan gambar-gambar (images) yang digunakan adalah milik dari berbagai sumber sebagaimana yang telah dicantumkan... | 44.077519 | 185 | 0.657052 | 0 | 0 | 596 | 0.104819 | 0 | 0 | 0 | 0 | 2,036 | 0.358072 |
530fcd223daa28d413c36696ab6a481ec8c169e5 | 5,205 | py | Python | reamber/base/MapSet.py | Eve-ning/reamber_base_py | 6d19c84f2c110b60e633b82b73e0516396466f56 | [
"MIT"
] | 10 | 2020-06-28T11:16:36.000Z | 2021-08-09T21:41:43.000Z | reamber/base/MapSet.py | Eve-ning/reamberPy | 6d19c84f2c110b60e633b82b73e0516396466f56 | [
"MIT"
] | 35 | 2020-06-18T13:05:50.000Z | 2022-02-18T10:13:35.000Z | reamber/base/MapSet.py | Eve-ning/reamber_base_py | 6d19c84f2c110b60e633b82b73e0516396466f56 | [
"MIT"
] | 2 | 2021-05-26T17:05:06.000Z | 2021-06-12T18:42:13.000Z | from __future__ import annotations
from copy import deepcopy
from dataclasses import dataclass, field
from typing import List, Iterator, TypeVar, Union, Any, Generic
import pandas as pd
from pandas.core.indexing import _LocIndexer
from reamber.base.Map import Map
from reamber.base.Property import stack_props
NoteLi... | 34.019608 | 102 | 0.615562 | 4,726 | 0.907973 | 162 | 0.031124 | 4,737 | 0.910086 | 0 | 0 | 2,948 | 0.566378 |
53104f17c4720a21e638155abf65cadc6cce2788 | 24,765 | py | Python | src/poretitioner/utils/filtering.py | uwmisl/poretitioner | 0ff9f67a3b25fdcb460b11c970b2ed366da07da7 | [
"MIT"
] | 2 | 2021-03-11T21:27:16.000Z | 2021-03-18T00:58:22.000Z | src/poretitioner/utils/filtering.py | uwmisl/poretitioner | 0ff9f67a3b25fdcb460b11c970b2ed366da07da7 | [
"MIT"
] | 12 | 2021-02-19T19:36:05.000Z | 2021-03-24T15:38:02.000Z | src/poretitioner/utils/filtering.py | uwmisl/poretitioner | 0ff9f67a3b25fdcb460b11c970b2ed366da07da7 | [
"MIT"
] | null | null | null | """
=========
filtering.py
=========
This module provides more granular filtering for captures.
You can customize your own filters too.
"""
from __future__ import annotations
import re
from abc import ABC, ABCMeta, abstractmethod
from dataclasses import dataclass
from json import JSONEncoder
from pathlib import Posi... | 31.190176 | 171 | 0.666828 | 14,665 | 0.592166 | 0 | 0 | 6,621 | 0.267353 | 0 | 0 | 13,528 | 0.546255 |
53106f8214d7d4213892a247bedd084271aa2866 | 344 | py | Python | Chapter 11/wrong_type.py | nescience8/starting-out-with-python-global-4th-edition | c16f93b7cbb4c7ae7b57653a7190bf192fe6b472 | [
"MIT"
] | 35 | 2019-05-03T00:30:31.000Z | 2022-01-20T06:57:25.000Z | Chapter 11/wrong_type.py | nescience8/starting-out-with-python-global-4th-edition | c16f93b7cbb4c7ae7b57653a7190bf192fe6b472 | [
"MIT"
] | 1 | 2020-09-04T02:04:33.000Z | 2020-09-04T02:04:33.000Z | Chapter 11/wrong_type.py | nescience8/starting-out-with-python-global-4th-edition | c16f93b7cbb4c7ae7b57653a7190bf192fe6b472 | [
"MIT"
] | 22 | 2020-05-13T21:20:02.000Z | 2021-12-21T08:35:59.000Z | def main():
# Pass a string to show_mammal_info...
show_mammal_info('I am a string')
# The show_mammal_info function accepts an object
# as an argument, and calls its show_species
# and make_sound methods.
def show_mammal_info(creature):
creature.show_species()
creature.make_sound()
# Call th... | 22.933333 | 49 | 0.718023 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 196 | 0.569767 |
531171031428111b90a898b1687d659af83a08e1 | 1,307 | py | Python | fase2-exercicios/cap2/lista-de-exercicios/RM94336_EX04.py | Leodf/FIAP | e2acf897017c4f49357112f67702070b7dcbfe9d | [
"MIT"
] | null | null | null | fase2-exercicios/cap2/lista-de-exercicios/RM94336_EX04.py | Leodf/FIAP | e2acf897017c4f49357112f67702070b7dcbfe9d | [
"MIT"
] | null | null | null | fase2-exercicios/cap2/lista-de-exercicios/RM94336_EX04.py | Leodf/FIAP | e2acf897017c4f49357112f67702070b7dcbfe9d | [
"MIT"
] | null | null | null | """
4 – Um grande cliente seu sofreu um ataque hacker: o servidor foi sequestrado por um software malicioso, que criptografou todos os discos e pede a digitação de uma senha para a liberação da máquina. E é claro que os criminosos exigem um pagamento para informar a senha.
Ao analisar o código do programa deles, porém... | 81.6875 | 507 | 0.778118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,215 | 0.904691 |
53118be4670acbc222a105780122139b5d7bef92 | 1,555 | py | Python | dosagelib/helpers.py | yasen-m/dosage | 81fe088621ad335cac2a53fcbc7b9b37f49ddce2 | [
"MIT"
] | null | null | null | dosagelib/helpers.py | yasen-m/dosage | 81fe088621ad335cac2a53fcbc7b9b37f49ddce2 | [
"MIT"
] | null | null | null | dosagelib/helpers.py | yasen-m/dosage | 81fe088621ad335cac2a53fcbc7b9b37f49ddce2 | [
"MIT"
] | null | null | null | # -*- coding: iso-8859-1 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam
from .util import fetchUrl, getPageContent, getQueryParams
def queryNamer(paramName, usePageUrl=False):
"""Get name from URL query part."""
@classmethod
def _namer(cls, ... | 32.395833 | 63 | 0.659164 | 0 | 0 | 0 | 0 | 906 | 0.582637 | 0 | 0 | 425 | 0.273312 |
5311bdf4dfe6e2813dcf2c28b40dad10195c1693 | 66,098 | py | Python | research/object_detection/data_decoders/tf_example_decoder_test.py | akshit-protonn/models | 38c8c6fe4144c93d6aadd19981c2b90570c29eba | [
"Apache-2.0"
] | 18 | 2022-01-14T09:58:27.000Z | 2022-01-14T09:58:37.000Z | research/object_detection/data_decoders/tf_example_decoder_test.py | akshit-protonn/models | 38c8c6fe4144c93d6aadd19981c2b90570c29eba | [
"Apache-2.0"
] | 62 | 2021-06-09T00:47:27.000Z | 2021-09-24T09:06:58.000Z | research/object_detection/data_decoders/tf_example_decoder_test.py | akshit-protonn/models | 38c8c6fe4144c93d6aadd19981c2b90570c29eba | [
"Apache-2.0"
] | 2 | 2021-02-17T06:59:57.000Z | 2021-03-18T10:12:30.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 applica... | 40.03513 | 80 | 0.603089 | 64,949 | 0.982617 | 0 | 0 | 0 | 0 | 0 | 0 | 7,353 | 0.111244 |
53120b489f06aa51d07ee8b517ab0cf190f8e1f9 | 807 | py | Python | counting_capitals.py | m10singh94/Python-programs | a83083044b4a85afcf70c4b7024287a808b01fee | [
"Apache-2.0"
] | null | null | null | counting_capitals.py | m10singh94/Python-programs | a83083044b4a85afcf70c4b7024287a808b01fee | [
"Apache-2.0"
] | null | null | null | counting_capitals.py | m10singh94/Python-programs | a83083044b4a85afcf70c4b7024287a808b01fee | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Apr 21 08:09:31 2020
@author: Shivadhar SIngh
"""
def count_capitals(string):
count = 0
for ch in string:
if ord(ch) >= 65 and ord(ch) <= 90:
count += 1
return count
def remove_substring_everywhere(string, substring):
'''
Remove all o... | 25.21875 | 63 | 0.591078 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 250 | 0.309789 |
5312250f481274756afa3e391b2f3f60164d3ff0 | 12,695 | py | Python | admit/at/GenerateSpectrum_AT.py | astroumd/admit | bbf3d79bb6e1a6f7523553ed8ede0d358d106f2c | [
"MIT"
] | 4 | 2017-03-01T17:26:28.000Z | 2022-03-03T19:23:06.000Z | admit/at/GenerateSpectrum_AT.py | teuben/admit | 1cae54d1937c9af3f719102838df716e7e6d655c | [
"MIT"
] | 48 | 2016-10-04T01:25:33.000Z | 2021-09-08T14:51:10.000Z | admit/at/GenerateSpectrum_AT.py | teuben/admit | 1cae54d1937c9af3f719102838df716e7e6d655c | [
"MIT"
] | 2 | 2016-11-10T14:10:22.000Z | 2017-03-30T18:58:05.000Z | """ .. _GenerateSpectrum-at-api:
**GenerateSpectrum_AT** --- Generates synthetic test spectra.
-------------------------------------------------------------
This module defines the GenerateSpectrum_AT class.
"""
from admit.AT import AT
import admit.util.bdp_types as bt
from admit.bdp.CubeSpectrum_BDP import ... | 37.338235 | 132 | 0.530996 | 11,453 | 0.902166 | 0 | 0 | 0 | 0 | 0 | 0 | 6,837 | 0.538558 |
53122c71e26ce2a712524601aa3f1353a6ea1b32 | 11,576 | py | Python | lib/flows/general/discovery_test.py | nahidupa/grr | 100a9d85ef2abb234e12e3ac2623caffb4116be7 | [
"Apache-2.0"
] | 1 | 2015-02-22T16:05:06.000Z | 2015-02-22T16:05:06.000Z | lib/flows/general/discovery_test.py | nahidupa/grr | 100a9d85ef2abb234e12e3ac2623caffb4116be7 | [
"Apache-2.0"
] | 3 | 2020-09-11T12:54:50.000Z | 2020-09-11T12:55:01.000Z | lib/flows/general/discovery_test.py | nahidupa/grr | 100a9d85ef2abb234e12e3ac2623caffb4116be7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- mode: python; encoding: utf-8 -*-
"""Tests for Interrogate."""
import socket
from grr.client import vfs
from grr.lib import action_mocks
from grr.lib import aff4
from grr.lib import artifact_test
from grr.lib import client_index
from grr.lib import config_lib
from grr.lib import flags
fro... | 40.194444 | 80 | 0.666379 | 11,008 | 0.950933 | 0 | 0 | 153 | 0.013217 | 0 | 0 | 2,528 | 0.218383 |
5312934109f52156adbe6f8ebda77f7b1fb3121e | 3,595 | py | Python | practices/20210112/GraphicsView.py | liff-engineer/articles | ad3386ef9cda5083793f485e309a9f85ab36f664 | [
"MIT"
] | 2 | 2020-12-01T06:44:41.000Z | 2021-11-22T06:07:52.000Z | practices/20210112/GraphicsView.py | liff-engineer/articles | ad3386ef9cda5083793f485e309a9f85ab36f664 | [
"MIT"
] | null | null | null | practices/20210112/GraphicsView.py | liff-engineer/articles | ad3386ef9cda5083793f485e309a9f85ab36f664 | [
"MIT"
] | null | null | null | import sys
from PySide2.QtWidgets import QGraphicsView, QGraphicsScene, QApplication
from PySide2.QtCore import *
from PySide2.QtGui import *
class GraphicsView(QGraphicsView):
def __init__(self, parent=None):
super().__init__(parent)
# 画布视图尺寸
self.w = 64000.0
self.h = 32000.0
... | 36.313131 | 99 | 0.638387 | 3,223 | 0.891563 | 0 | 0 | 0 | 0 | 0 | 0 | 69 | 0.019087 |
5312cd144bf0324fa0ae682f9f5f4f2654ceadda | 781 | py | Python | armstrong/hatband/tests/_utils.py | joncotton/armstrong.hatband | c71aed4bd0b03a78d68a6b306e8a0ba9cd92324e | [
"Apache-2.0"
] | null | null | null | armstrong/hatband/tests/_utils.py | joncotton/armstrong.hatband | c71aed4bd0b03a78d68a6b306e8a0ba9cd92324e | [
"Apache-2.0"
] | 3 | 2015-05-29T05:07:09.000Z | 2018-07-18T13:53:36.000Z | armstrong/hatband/tests/_utils.py | joncotton/armstrong.hatband | c71aed4bd0b03a78d68a6b306e8a0ba9cd92324e | [
"Apache-2.0"
] | 2 | 2015-07-29T20:58:29.000Z | 2015-08-07T02:59:37.000Z | from armstrong.dev.tests.utils import ArmstrongTestCase
import random
def random_range():
# TODO: make sure this can only be generated once
return range(random.randint(1000, 2000))
class HatbandTestCase(ArmstrongTestCase):
pass
class HatbandTestMixin(object):
script_code = """
<script type="t... | 27.892857 | 79 | 0.729834 | 584 | 0.747759 | 0 | 0 | 0 | 0 | 0 | 0 | 170 | 0.21767 |
5313e0d9c7ffb25cacea29febc7679af1ef4f1a0 | 7,997 | py | Python | tests/propositional/test_natural_deduction.py | ariroffe/logics | fb918ae8cf243a452e5b030f0df17add83f47f8b | [
"MIT"
] | 12 | 2021-03-31T08:12:09.000Z | 2022-03-15T21:36:59.000Z | tests/propositional/test_natural_deduction.py | ariroffe/logics | fb918ae8cf243a452e5b030f0df17add83f47f8b | [
"MIT"
] | null | null | null | tests/propositional/test_natural_deduction.py | ariroffe/logics | fb918ae8cf243a452e5b030f0df17add83f47f8b | [
"MIT"
] | 1 | 2021-03-31T15:14:26.000Z | 2021-03-31T15:14:26.000Z | import unittest
from logics.classes.propositional import Inference, Formula
from logics.classes.propositional.proof_theories import NaturalDeductionStep, NaturalDeductionRule
from logics.utils.parsers import classical_parser
from logics.instances.propositional.natural_deduction import classical_natural_deduction_syste... | 43.227027 | 108 | 0.549456 | 7,716 | 0.95224 | 0 | 0 | 0 | 0 | 0 | 0 | 3,348 | 0.41318 |
5314e40633c46116c596429cdd1af4edda4e5856 | 10,244 | py | Python | src/trusted/validator_arm/dgen_decoder_output.py | cohortfsllc/cohort-cocl2-sandbox | 0ac6669d1a459d65a52007b80d5cffa4ef330287 | [
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | src/trusted/validator_arm/dgen_decoder_output.py | cohortfsllc/cohort-cocl2-sandbox | 0ac6669d1a459d65a52007b80d5cffa4ef330287 | [
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | src/trusted/validator_arm/dgen_decoder_output.py | cohortfsllc/cohort-cocl2-sandbox | 0ac6669d1a459d65a52007b80d5cffa4ef330287 | [
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | #!/usr/bin/python
#
# Copyright (c) 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
"""
Responsible for generating the decoder based on parsed
table representations.
"""
import dgen_opt
import dgen_output
imp... | 31.327217 | 79 | 0.695334 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,141 | 0.599473 |
5314f89fdb3bc7bd293961169b273d8fa69fd14c | 2,985 | py | Python | compose/progress_stream.py | ilinum/compose | d1633d8e9df3c2dd4fa6f562c6b037cfe1af8ddb | [
"Apache-2.0"
] | 1 | 2019-03-06T08:03:18.000Z | 2019-03-06T08:03:18.000Z | compose/progress_stream.py | SeppPenner/compose | 87b25363a385b108066f87570aa5396567585324 | [
"Apache-2.0"
] | 2 | 2021-03-25T21:27:44.000Z | 2021-06-01T21:41:30.000Z | compose/progress_stream.py | SeppPenner/compose | 87b25363a385b108066f87570aa5396567585324 | [
"Apache-2.0"
] | 2 | 2018-07-20T15:52:21.000Z | 2018-12-14T11:54:03.000Z | from __future__ import absolute_import
from __future__ import unicode_literals
from compose import utils
class StreamOutputError(Exception):
pass
def stream_output(output, stream):
is_terminal = hasattr(stream, 'isatty') and stream.isatty()
stream = utils.get_output_stream(stream)
all_events = []
... | 26.651786 | 89 | 0.58794 | 44 | 0.01474 | 0 | 0 | 0 | 0 | 0 | 0 | 524 | 0.175544 |
5315716313b67d48f560713c76b83b311d4a39e6 | 13,110 | py | Python | tests/test_db.py | beloglazov/openstack-neat | a5a853ae2affb0cdc582e3ab641737f5ebd3d0a7 | [
"Apache-2.0"
] | 34 | 2015-01-04T08:02:37.000Z | 2022-02-19T14:43:47.000Z | tests/test_db.py | beloglazov/openstack-neat | a5a853ae2affb0cdc582e3ab641737f5ebd3d0a7 | [
"Apache-2.0"
] | 3 | 2015-01-23T07:45:15.000Z | 2019-07-03T11:16:27.000Z | tests/test_db.py | beloglazov/openstack-neat | a5a853ae2affb0cdc582e3ab641737f5ebd3d0a7 | [
"Apache-2.0"
] | 22 | 2015-01-14T17:54:46.000Z | 2021-08-09T06:09:17.000Z | # Copyright 2012 Anton Beloglazov
#
# 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 writ... | 36.825843 | 94 | 0.555683 | 12,382 | 0.94447 | 0 | 0 | 10,549 | 0.804653 | 0 | 0 | 1,525 | 0.116323 |
53180c720a6c468e5a33fc70c5bb3a7936430339 | 808 | py | Python | libs/BIDS.py | GuillermoPerez32/EE2BIDS_backend | 2cab240840e11e227ad60e4c8e17ac9ac87defd4 | [
"MIT"
] | null | null | null | libs/BIDS.py | GuillermoPerez32/EE2BIDS_backend | 2cab240840e11e227ad60e4c8e17ac9ac87defd4 | [
"MIT"
] | null | null | null | libs/BIDS.py | GuillermoPerez32/EE2BIDS_backend | 2cab240840e11e227ad60e4c8e17ac9ac87defd4 | [
"MIT"
] | null | null | null | import os
from bids_validator import BIDSValidator
def validate(bids_directory):
print('- Validate: init started.')
file_paths = []
result = []
validator = BIDSValidator()
for path, dirs, files in os.walk(bids_directory):
for filename in files:
if filename == '.bidsignore':
... | 29.925926 | 81 | 0.613861 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 140 | 0.173267 |
53186bfab87cf033e365cec1f3ce308e9a8c439b | 32,090 | py | Python | src/python/triangula/chassis.py | peterbrazil/brazil | 3823dca6f05b6946251800125d45069048d1bca1 | [
"Apache-2.0"
] | null | null | null | src/python/triangula/chassis.py | peterbrazil/brazil | 3823dca6f05b6946251800125d45069048d1bca1 | [
"Apache-2.0"
] | null | null | null | src/python/triangula/chassis.py | peterbrazil/brazil | 3823dca6f05b6946251800125d45069048d1bca1 | [
"Apache-2.0"
] | null | null | null | from math import cos, sin, degrees, radians, pi
from time import time
from euclid import Vector2, Point2
from numpy import array as np_array
from numpy.linalg import solve as np_solve
__author__ = 'tom'
def test():
chassis = HoloChassis(wheels=[
HoloChassis.OmniWheel(position=Point2(1, 0), angle=0, radi... | 51.508828 | 120 | 0.67186 | 27,194 | 0.847429 | 0 | 0 | 0 | 0 | 0 | 0 | 22,448 | 0.699533 |
5319f9beb8c0372d2483c2292e3473295821dc00 | 12,467 | py | Python | libs/PureCloudPlatformClientV2/models/management_unit.py | rocketbot-cl/genesysCloud | dd9d9b5ebb90a82bab98c0d88b9585c22c91f333 | [
"MIT"
] | 1 | 2021-10-08T20:46:45.000Z | 2021-10-08T20:46:45.000Z | libs/PureCloudPlatformClientV2/models/management_unit.py | rocketbot-cl/genesysCloud | dd9d9b5ebb90a82bab98c0d88b9585c22c91f333 | [
"MIT"
] | null | null | null | libs/PureCloudPlatformClientV2/models/management_unit.py | rocketbot-cl/genesysCloud | dd9d9b5ebb90a82bab98c0d88b9585c22c91f333 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Copyright 2016 SmartBear Software
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 applica... | 29.612827 | 208 | 0.599422 | 11,663 | 0.93551 | 0 | 0 | 8,089 | 0.648833 | 0 | 0 | 7,793 | 0.62509 |
531bf28ae62e80e65e0bf53d63aae0164d547e7c | 696 | py | Python | harmony_tools/core/colors.py | a1fred/guitar_gammas | 9933fe899af7a8e7f490f61d58004bb59f03271c | [
"MIT"
] | 1 | 2021-02-26T03:52:26.000Z | 2021-02-26T03:52:26.000Z | harmony_tools/core/colors.py | a1fred/harmony_tools | 9933fe899af7a8e7f490f61d58004bb59f03271c | [
"MIT"
] | null | null | null | harmony_tools/core/colors.py | a1fred/harmony_tools | 9933fe899af7a8e7f490f61d58004bb59f03271c | [
"MIT"
] | null | null | null | COLOR_BLUE = '\033[0;34m'
COLOR_GREEN = '\033[0;32m'
COLOR_CYAN = '\033[0;36m'
COLOR_RED = '\033[0;31m'
COLOR_PURPLE = '\033[0;35m'
COLOR_BROWN = '\033[0;33m'
COLOR_YELLOW = '\033[1;33m'
COLOR_GRAY = '\033[1;30m'
COLOR_RESET = '\033[0m'
FG_COLORS = [
# COLOR_BLUE,
COLOR_GREEN,
# COLOR_CYAN,
# COLOR_R... | 17.4 | 42 | 0.627874 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 218 | 0.313218 |
531ccd14367ef1d863f40816ee6edf521bc6c3f6 | 712 | py | Python | Common_Questions/TextBookQuestions/PythonCrashCourse/Chapter_8/8_5.py | tegamax/ProjectCode | 0ed86e227fba50b453c5c4a2596afbadc39a167e | [
"MIT"
] | null | null | null | Common_Questions/TextBookQuestions/PythonCrashCourse/Chapter_8/8_5.py | tegamax/ProjectCode | 0ed86e227fba50b453c5c4a2596afbadc39a167e | [
"MIT"
] | null | null | null | Common_Questions/TextBookQuestions/PythonCrashCourse/Chapter_8/8_5.py | tegamax/ProjectCode | 0ed86e227fba50b453c5c4a2596afbadc39a167e | [
"MIT"
] | null | null | null | '''
8-5. Cities: Write a function called describe_city() that accepts the name of a city and its country.
The function should print a simple sentence, such as Reykjavik is in Iceland. Give the parameter for the country a default value.
Call your function for three different cities, at least one of which is not in the... | 28.48 | 130 | 0.685393 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 537 | 0.743767 |
531ce1da9e2ab397f8a8222a28bef7e919e9c968 | 12,383 | py | Python | tests/test_geometry_loader.py | trnielsen/nexus-constructor | 65efb6eedca30250b75f142dd29a46bc909958df | [
"BSD-2-Clause"
] | null | null | null | tests/test_geometry_loader.py | trnielsen/nexus-constructor | 65efb6eedca30250b75f142dd29a46bc909958df | [
"BSD-2-Clause"
] | null | null | null | tests/test_geometry_loader.py | trnielsen/nexus-constructor | 65efb6eedca30250b75f142dd29a46bc909958df | [
"BSD-2-Clause"
] | null | null | null | from nexus_constructor.geometry import OFFGeometryNoNexus
from nexus_constructor.geometry.geometry_loader import load_geometry_from_file_object
from nexus_constructor.off_renderer import repeat_shape_over_positions
from PySide2.QtGui import QVector3D
from io import StringIO
def test_GIVEN_off_file_containing_geometry... | 34.112948 | 132 | 0.622305 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,579 | 0.369781 |
531dc0c210eb864fa15db98132f5b9dc46d4e0b4 | 3,140 | py | Python | verteste/ui/ui_about.py | Chum4k3r/Verteste | 216c04468ff14c392ee3c6aebe12a0fa0e98767c | [
"MIT"
] | null | null | null | verteste/ui/ui_about.py | Chum4k3r/Verteste | 216c04468ff14c392ee3c6aebe12a0fa0e98767c | [
"MIT"
] | null | null | null | verteste/ui/ui_about.py | Chum4k3r/Verteste | 216c04468ff14c392ee3c6aebe12a0fa0e98767c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'aboutdialog.ui'
##
## Created by: Qt User Interface Compiler version 6.1.1
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
###############... | 36.941176 | 117 | 0.653503 | 2,617 | 0.832114 | 0 | 0 | 0 | 0 | 0 | 0 | 834 | 0.265183 |
531e55e6be488ba1586f078680847b9d77b065ff | 4,416 | py | Python | tests/test_base_protocol.py | Qix-/aiohttp | aee067dccad3dc0e79778a1b213105f20bf39baf | [
"Apache-2.0"
] | 3 | 2019-01-15T04:17:33.000Z | 2019-03-13T13:12:15.000Z | tests/test_base_protocol.py | Qix-/aiohttp | aee067dccad3dc0e79778a1b213105f20bf39baf | [
"Apache-2.0"
] | 309 | 2019-08-20T21:49:50.000Z | 2021-07-31T13:27:18.000Z | tests/test_base_protocol.py | amenezes/aiohttp | e8049814a2161278bae178cb96334ce0c98e66f3 | [
"Apache-2.0"
] | 1 | 2020-12-02T16:06:16.000Z | 2020-12-02T16:06:16.000Z | import asyncio
from contextlib import suppress
from unittest import mock
import pytest
from aiohttp.base_protocol import BaseProtocol
async def test_loop() -> None:
loop = asyncio.get_event_loop()
asyncio.set_event_loop(None)
pr = BaseProtocol(loop)
assert pr._loop is loop
async def test_pause_wri... | 24.131148 | 63 | 0.688406 | 0 | 0 | 0 | 0 | 0 | 0 | 4,241 | 0.960371 | 0 | 0 |
531e5848bd2aa1d173ccaded9dac7c7007b60544 | 1,599 | py | Python | main.py | marcusviniciusteixeira/RPAPython | 8055e7283e6a8dd8910139cbbaa914761e2924f2 | [
"MIT"
] | 1 | 2022-01-23T00:17:05.000Z | 2022-01-23T00:17:05.000Z | main.py | marcusviniciusteixeira/RPAPython | 8055e7283e6a8dd8910139cbbaa914761e2924f2 | [
"MIT"
] | null | null | null | main.py | marcusviniciusteixeira/RPAPython | 8055e7283e6a8dd8910139cbbaa914761e2924f2 | [
"MIT"
] | null | null | null | import PySimpleGUI as sg
import os
import time
import pyautogui
class TelaPython:
def __init__(self):
layout = [
[sg.Text('Usuário',size=(10,0)), sg.Input(size=(20,0),key='usuario')],
[sg.Text('Senha',size=(10,0)), sg.Input(size=(20,0),key='senha')],
[sg.Text('Número',si... | 32.632653 | 127 | 0.579112 | 1,499 | 0.935705 | 0 | 0 | 0 | 0 | 0 | 0 | 196 | 0.122347 |
531fa48589e0156d08a9e55a80a6582cdc603310 | 810 | py | Python | logistic-regression/plot_binary_losses.py | eliben/deep-learning-samples | d5ca86c5db664fabfb302cbbc231c50ec3d6a103 | [
"Unlicense"
] | 183 | 2015-12-29T07:21:24.000Z | 2022-01-18T01:19:23.000Z | logistic-regression/plot_binary_losses.py | eliben/deep-learning-samples | d5ca86c5db664fabfb302cbbc231c50ec3d6a103 | [
"Unlicense"
] | null | null | null | logistic-regression/plot_binary_losses.py | eliben/deep-learning-samples | d5ca86c5db664fabfb302cbbc231c50ec3d6a103 | [
"Unlicense"
] | 68 | 2016-06-02T15:31:51.000Z | 2021-09-08T19:58:10.000Z | # Helper code to plot binary losses.
#
# Eli Bendersky (http://eli.thegreenplace.net)
# This code is in the public domain
from __future__ import print_function
import matplotlib.pyplot as plt
import numpy as np
if __name__ == '__main__':
fig, ax = plt.subplots()
fig.set_tight_layout(True)
xs = np.linspac... | 23.823529 | 70 | 0.608642 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 223 | 0.275309 |
531fbba3b5ee2b6bc1a9dd51c2d5b53732a600be | 1,243 | py | Python | utils/watch-less.py | K-Fitzpatrick/crop_planner | 2605c0886fd3b4681c2ea3ac5e88e1d8555178f5 | [
"MIT"
] | 91 | 2016-03-15T16:41:41.000Z | 2022-03-25T16:30:09.000Z | utils/watch-less.py | SoaringDragon42/crop_planner | 2605c0886fd3b4681c2ea3ac5e88e1d8555178f5 | [
"MIT"
] | 18 | 2016-03-30T15:01:25.000Z | 2020-03-09T06:17:08.000Z | utils/watch-less.py | SoaringDragon42/crop_planner | 2605c0886fd3b4681c2ea3ac5e88e1d8555178f5 | [
"MIT"
] | 48 | 2016-03-15T16:41:44.000Z | 2022-03-09T21:28:05.000Z | #!/usr/bin/env python3
################################
# Development tool
# Auto-compiles style.less to style.css
#
# Requires lessc and less clean css to be installed:
# npm install -g less
# npm install -g less-plugin-clean-css
################################
import os, time
from os import path
from math import fl... | 23.45283 | 79 | 0.636364 | 760 | 0.611424 | 0 | 0 | 0 | 0 | 0 | 0 | 458 | 0.368463 |
5320daf74e5189735d626582356010934114572d | 10,522 | py | Python | testapp/app/app/tests/test_export_action.py | instituciones-abiertas/django-admin-export-action | bb089180e418915e1bba31927554537249fbec78 | [
"MIT"
] | 5 | 2020-12-15T11:38:42.000Z | 2022-01-06T02:33:59.000Z | testapp/app/app/tests/test_export_action.py | instituciones-abiertas/django-admin-export-action | bb089180e418915e1bba31927554537249fbec78 | [
"MIT"
] | 2 | 2021-09-14T19:25:29.000Z | 2021-11-26T14:16:50.000Z | testapp/app/app/tests/test_export_action.py | instituciones-abiertas/django-admin-export-action | bb089180e418915e1bba31927554537249fbec78 | [
"MIT"
] | 2 | 2021-09-14T19:19:05.000Z | 2021-09-14T19:19:18.000Z | # -- encoding: UTF-8 --
import json
import uuid
from admin_export_action import report
from admin_export_action.admin import export_selected_objects
from admin_export_action.config import default_config, get_config
from django.contrib.admin.sites import AdminSite
from django.contrib.auth.models import User
from djang... | 36.79021 | 129 | 0.560255 | 9,920 | 0.942787 | 0 | 0 | 0 | 0 | 0 | 0 | 1,676 | 0.159285 |
5321da160f808c8f4dfdd8dfa49b6f548aebb482 | 367 | py | Python | shapeshifter/tests/conftest.py | martinogden/django-shapeshifter | dbcba74c0a6914af181c1e8f0ba23369d4c3c94b | [
"Apache-2.0"
] | 164 | 2018-08-27T16:48:15.000Z | 2022-03-01T06:43:35.000Z | shapeshifter/tests/conftest.py | FlipperPA/django-shapeshifter | 0ce9cc2796164a529749a6b2208642d819f706bd | [
"Apache-2.0"
] | 2 | 2018-09-04T14:26:34.000Z | 2021-07-23T21:02:29.000Z | shapeshifter/tests/conftest.py | FlipperPA/django-shapeshifter | 0ce9cc2796164a529749a6b2208642d819f706bd | [
"Apache-2.0"
] | 12 | 2018-08-27T20:55:12.000Z | 2022-02-07T23:41:33.000Z | from pytest_djangoapp import configure_djangoapp_plugin
pytest_plugins = configure_djangoapp_plugin(
extend_INSTALLED_APPS=[
'django.contrib.sessions',
'django.contrib.messages',
],
extend_MIDDLEWARE=[
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.m... | 28.230769 | 63 | 0.730245 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 158 | 0.430518 |
5322235447e97ac9d03d73498451ad6c8b6d4fab | 10,434 | py | Python | face_attribute_verification.py | seymayucer/FacialPhenotypes | 043f3ecf956cad53095d93f19383c4c94e033692 | [
"MIT"
] | 2 | 2021-03-02T22:25:32.000Z | 2021-03-06T23:53:13.000Z | face_attribute_verification.py | seymayucer/FacialPhenotypes | 043f3ecf956cad53095d93f19383c4c94e033692 | [
"MIT"
] | null | null | null | face_attribute_verification.py | seymayucer/FacialPhenotypes | 043f3ecf956cad53095d93f19383c4c94e033692 | [
"MIT"
] | 1 | 2021-03-22T02:05:32.000Z | 2021-03-22T02:05:32.000Z | import argparse
import numpy as np
from sklearn.model_selection import StratifiedKFold
import sklearn
import cv2
import datetime
import mxnet as mx
from mxnet import ndarray as nd
import pandas as pd
from numpy import linalg as line
import logging
logging.basicConfig(
format="%(asctime)s %(message)s", datefmt="%m/... | 35.610922 | 88 | 0.568047 | 9,056 | 0.867932 | 0 | 0 | 0 | 0 | 0 | 0 | 1,145 | 0.109737 |
5322c20dd329a34737e71921f9eef02bff3f4b61 | 691 | py | Python | pkgs/applications/virtualization/virt-manager/custom_runner.py | mornfall/nixpkgs | 0eb6f056b9ce3e32dbc3297f298472aef19f8c73 | [
"MIT"
] | 1 | 2015-03-10T08:51:43.000Z | 2015-03-10T08:51:43.000Z | pkgs/applications/virtualization/virt-manager/custom_runner.py | mornfall/nixpkgs | 0eb6f056b9ce3e32dbc3297f298472aef19f8c73 | [
"MIT"
] | null | null | null | pkgs/applications/virtualization/virt-manager/custom_runner.py | mornfall/nixpkgs | 0eb6f056b9ce3e32dbc3297f298472aef19f8c73 | [
"MIT"
] | null | null | null | #!/usr/bin/python -t
# this script was written to use /etc/nixos/nixpkgs/pkgs/development/python-modules/generic/wrap.sh
# which already automates python executable wrapping by extending the PATH/pythonPath
# from http://docs.python.org/library/subprocess.html
# Warning Invoking the system shell with shell=True can be... | 49.357143 | 171 | 0.798842 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 512 | 0.740955 |
5322e645a2731e419b7aab530efd6f637ecbe5b3 | 6,645 | py | Python | jsonform/fields.py | Pix-00/jsonform | d62543474d96b258606ec38dd427693232daeda3 | [
"Apache-2.0"
] | null | null | null | jsonform/fields.py | Pix-00/jsonform | d62543474d96b258606ec38dd427693232daeda3 | [
"Apache-2.0"
] | null | null | null | jsonform/fields.py | Pix-00/jsonform | d62543474d96b258606ec38dd427693232daeda3 | [
"Apache-2.0"
] | null | null | null | import base64
import datetime
from abc import ABC, abstractmethod
from .conditions import AnyValue
from .errors import FieldError, FormError
__all__ = [
'Field', 'StringField', 'IntegerField', 'FloatField', 'BooleanField',
'DateTimeField', 'DateField', 'TimeField', 'ListField','SetField', 'EnumField', 'BytesF... | 27.233607 | 96 | 0.582844 | 6,276 | 0.94447 | 0 | 0 | 428 | 0.064409 | 0 | 0 | 437 | 0.065764 |
53233f3a8dea82db62a5a19f4e770dd7fed41add | 3,331 | py | Python | napari/layers/_source.py | napari/napari-gui | 9beb1a0b797890718e1c4f372cbd6256747f9101 | [
"BSD-3-Clause"
] | 7 | 2018-07-03T17:35:46.000Z | 2018-11-07T15:48:58.000Z | napari/layers/_source.py | guiwitz/napari | 1546f18ecc13364d5415623a9c11ed760ff043e2 | [
"BSD-3-Clause"
] | 120 | 2018-09-04T22:05:13.000Z | 2019-03-02T01:13:57.000Z | napari/layers/_source.py | napari/napari-gui | 9beb1a0b797890718e1c4f372cbd6256747f9101 | [
"BSD-3-Clause"
] | 8 | 2018-09-04T21:48:26.000Z | 2019-01-29T04:48:30.000Z | from __future__ import annotations
from contextlib import contextmanager
from contextvars import ContextVar
from typing import Optional, Tuple
from magicgui.widgets import FunctionGui
from pydantic import BaseModel
class Source(BaseModel):
"""An object to store the provenance of a layer.
Parameters
---... | 33.31 | 97 | 0.691684 | 1,104 | 0.331432 | 1,662 | 0.498949 | 1,678 | 0.503753 | 0 | 0 | 2,446 | 0.734314 |
532376f847c7965500c6f9f56d9f6308f976ea4f | 1,599 | py | Python | tests/unit/test_BaseDirection.py | vpalex999/project-mars | 6e21c5acfe6105a7b7c87a79770e7420bda46f26 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_BaseDirection.py | vpalex999/project-mars | 6e21c5acfe6105a7b7c87a79770e7420bda46f26 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_BaseDirection.py | vpalex999/project-mars | 6e21c5acfe6105a7b7c87a79770e7420bda46f26 | [
"Apache-2.0"
] | null | null | null | import pytest
import src.constants as cnst
from src.directions import BaseDirection
@pytest.fixture
def base_direction():
return BaseDirection()
def test_init_BaseDirection(base_direction):
assert isinstance(base_direction, BaseDirection)
def test_current_direction_is(base_direction):
assert base_dir... | 35.533333 | 94 | 0.707942 | 0 | 0 | 0 | 0 | 1,311 | 0.819887 | 0 | 0 | 74 | 0.046279 |
5323be56fb9f52f802238cdfb9a7b782de3d3c6b | 1,220 | py | Python | OpenCV-Computer-Vision-Examples-with-Python-A-Complete-Guide-for-Dummies-master/Source Code/opencv_operations/draw-circles.py | Payal197bhadra/ComputerVision | d66b5037ece99b6189dd4306b2c9be67cffd14af | [
"MIT"
] | 6 | 2019-06-30T09:08:03.000Z | 2021-10-11T17:51:16.000Z | OpenCV-Computer-Vision-Examples-with-Python-A-Complete-Guide-for-Dummies-master/Source Code/opencv_operations/draw-circles.py | Payal197bhadra/ComputerVision | d66b5037ece99b6189dd4306b2c9be67cffd14af | [
"MIT"
] | null | null | null | OpenCV-Computer-Vision-Examples-with-Python-A-Complete-Guide-for-Dummies-master/Source Code/opencv_operations/draw-circles.py | Payal197bhadra/ComputerVision | d66b5037ece99b6189dd4306b2c9be67cffd14af | [
"MIT"
] | 3 | 2020-01-01T17:41:10.000Z | 2021-04-22T22:21:56.000Z | import numpy as np
import cv2
#define a canvas of size 300x300 px, with 3 channels (R,G,B) and data type as 8 bit unsigned integer
canvas = np.zeros((300,300,3), dtype ="uint8")
#define color
#draw a circle
#arguments are canvas/image, midpoint, radius, color, thickness(optional)
#display in cv2 window
green = (0,255... | 30.5 | 100 | 0.696721 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 481 | 0.394262 |
5323c4b7d5f3632bee1bd22e2b1ceebf3d070d46 | 1,648 | py | Python | tmux_cssh/main.py | cscutcher/tmux_cssh | bfbb7eb26d5f5864c0888fa8e614122401ed4f5f | [
"Unlicense"
] | null | null | null | tmux_cssh/main.py | cscutcher/tmux_cssh | bfbb7eb26d5f5864c0888fa8e614122401ed4f5f | [
"Unlicense"
] | null | null | null | tmux_cssh/main.py | cscutcher/tmux_cssh | bfbb7eb26d5f5864c0888fa8e614122401ed4f5f | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Main Script
"""
import logging
import argh
import sarge
import tmuxp
DEV_LOGGER = logging.getLogger(__name__)
def get_current_session(server=None):
'''
Seems to be no easy way to grab current attached session in tmuxp so
this provides a simple alternative.
'''
server ... | 26.580645 | 78 | 0.68932 | 0 | 0 | 0 | 0 | 1,117 | 0.677791 | 0 | 0 | 822 | 0.498786 |
53249bb622e69bc18a3497cdf35b1da555bf7b6c | 87 | py | Python | nautobot_capacity_metrics/management/commands/__init__.py | david-kn/nautobot-plugin-capacity-metrics | df2a635257a464b8340b788d8723b5f00e3e238f | [
"Apache-2.0"
] | 6 | 2021-02-24T22:17:11.000Z | 2022-01-25T18:36:29.000Z | nautobot_capacity_metrics/management/commands/__init__.py | david-kn/nautobot-plugin-capacity-metrics | df2a635257a464b8340b788d8723b5f00e3e238f | [
"Apache-2.0"
] | 12 | 2021-04-26T17:23:53.000Z | 2021-09-09T16:23:56.000Z | nautobot_capacity_metrics/management/commands/__init__.py | david-kn/nautobot-plugin-capacity-metrics | df2a635257a464b8340b788d8723b5f00e3e238f | [
"Apache-2.0"
] | 3 | 2021-06-28T12:44:45.000Z | 2021-08-02T18:00:22.000Z | """Additional Django management commands added by nautobot_capacity_metrics plugin."""
| 43.5 | 86 | 0.827586 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 86 | 0.988506 |
5324fa73c034a05cd172d09f6d03e2153b7f495e | 35 | py | Python | nptweak/__init__.py | kmedian/nptweak | 222f46b8abb9b00f1ae8065d38d0514193aa8a4b | [
"MIT"
] | null | null | null | nptweak/__init__.py | kmedian/nptweak | 222f46b8abb9b00f1ae8065d38d0514193aa8a4b | [
"MIT"
] | 2 | 2019-12-03T12:37:17.000Z | 2019-12-03T12:37:45.000Z | nptweak/__init__.py | kmedian/nptweak | 222f46b8abb9b00f1ae8065d38d0514193aa8a4b | [
"MIT"
] | null | null | null | from .to_2darray import to_2darray
| 17.5 | 34 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5326222cf04cc16e106a9b078150b32472ee3fb7 | 1,520 | py | Python | resources/models/Image.py | sphildreth/roadie-python | 1465ac0f4282356ab5a074020b4f0a9f28058a86 | [
"MIT"
] | null | null | null | resources/models/Image.py | sphildreth/roadie-python | 1465ac0f4282356ab5a074020b4f0a9f28058a86 | [
"MIT"
] | null | null | null | resources/models/Image.py | sphildreth/roadie-python | 1465ac0f4282356ab5a074020b4f0a9f28058a86 | [
"MIT"
] | null | null | null | import io
from PIL import Image as PILImage
from sqlalchemy import Column, ForeignKey, LargeBinary, Index, Integer, String
from resources.models.ModelBase import Base
class Image(Base):
# If this is used then the image is stored in the database
image = Column(LargeBinary(length=16777215), default=None)
#... | 38 | 117 | 0.647368 | 1,349 | 0.8875 | 0 | 0 | 0 | 0 | 0 | 0 | 361 | 0.2375 |
5326a402c4dd86ad307f49de1d63c62b7a921bd6 | 10,288 | py | Python | arch2vec/search_methods/reinforce_darts.py | gabrielasuchopar/arch2vec | 1fc47d2cc7d63832e0d6337b8482669366b4aef2 | [
"Apache-2.0"
] | null | null | null | arch2vec/search_methods/reinforce_darts.py | gabrielasuchopar/arch2vec | 1fc47d2cc7d63832e0d6337b8482669366b4aef2 | [
"Apache-2.0"
] | null | null | null | arch2vec/search_methods/reinforce_darts.py | gabrielasuchopar/arch2vec | 1fc47d2cc7d63832e0d6337b8482669366b4aef2 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import argparse
import json
import random
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from arch2vec.models.pretraining_nasbench101 import configs
from arch2vec.utils import load_json, preprocessing, one_hot_darts
from arch2vec.preprocessing.gen_is... | 39.722008 | 138 | 0.629374 | 4,540 | 0.441291 | 0 | 0 | 0 | 0 | 0 | 0 | 1,478 | 0.143663 |
53285c4fc141853fde6ba747fb42c02369b8ef62 | 2,326 | py | Python | setup.py | mentaal/r_map | 42986e90b31018b1e7fc992a53b0f5f6e559253f | [
"MIT"
] | null | null | null | setup.py | mentaal/r_map | 42986e90b31018b1e7fc992a53b0f5f6e559253f | [
"MIT"
] | null | null | null | setup.py | mentaal/r_map | 42986e90b31018b1e7fc992a53b0f5f6e559253f | [
"MIT"
] | null | null | null | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspa... | 34.205882 | 89 | 0.676698 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,621 | 0.696905 |
53288d2b29e82fc8c4f0e83a7806673cbfd64265 | 538 | py | Python | dont_worry.py | karianjahi/fahrer_minijob | 020a9de27b77f8e0bcdec198a37cfb7f1d4736ed | [
"MIT"
] | null | null | null | dont_worry.py | karianjahi/fahrer_minijob | 020a9de27b77f8e0bcdec198a37cfb7f1d4736ed | [
"MIT"
] | null | null | null | dont_worry.py | karianjahi/fahrer_minijob | 020a9de27b77f8e0bcdec198a37cfb7f1d4736ed | [
"MIT"
] | null | null | null | class Hey:
def __init__(jose, name="mours"):
jose.name = name
def get_name(jose):
return jose.name
class Person(object):
def __init__(self, name, phone):
self.name = name
self.phone = phone
class Teenager(Person):
def __init__(self, *args, **kwargs):
self.website... | 26.9 | 55 | 0.615242 | 397 | 0.737918 | 0 | 0 | 0 | 0 | 0 | 0 | 77 | 0.143123 |
532b482d23a5934d3f01f1f60135af259bfe9eb5 | 449 | py | Python | tests/zoo/tree.py | dynalz/odmantic | f20f08f8ab1768534c1e743f7539bfe4f8c73bdd | [
"0BSD"
] | 486 | 2020-10-19T05:33:53.000Z | 2022-03-30T12:54:57.000Z | tests/zoo/tree.py | dynalz/odmantic | f20f08f8ab1768534c1e743f7539bfe4f8c73bdd | [
"0BSD"
] | 183 | 2020-10-19T18:15:25.000Z | 2022-03-31T04:59:21.000Z | tests/zoo/tree.py | dynalz/odmantic | f20f08f8ab1768534c1e743f7539bfe4f8c73bdd | [
"0BSD"
] | 53 | 2020-10-19T09:35:01.000Z | 2022-03-31T20:39:51.000Z | import enum
from typing import Dict, List
from odmantic.field import Field
from odmantic.model import Model
class TreeKind(str, enum.Enum):
BIG = "big"
SMALL = "small"
class TreeModel(Model):
name: str = Field(primary_key=True, default="Acacia des montagnes")
average_size: float = Field(mongo_name=... | 22.45 | 71 | 0.721604 | 334 | 0.743875 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.089087 |
532c5feeb5220f24428fb820adb0794dc7c4ef05 | 115,103 | py | Python | adanet/core/estimator_test.py | eustomaqua/adanet | 9c1de82428a4e661768af8e764041afebfec2e6f | [
"Apache-2.0"
] | null | null | null | adanet/core/estimator_test.py | eustomaqua/adanet | 9c1de82428a4e661768af8e764041afebfec2e6f | [
"Apache-2.0"
] | null | null | null | adanet/core/estimator_test.py | eustomaqua/adanet | 9c1de82428a4e661768af8e764041afebfec2e6f | [
"Apache-2.0"
] | null | null | null | """Test AdaNet estimator single graph implementation.
Copyright 2018 The AdaNet 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
https://www.apache.org/licenses/LI... | 34.83747 | 139 | 0.57326 | 110,852 | 0.963068 | 0 | 0 | 77,761 | 0.675578 | 0 | 0 | 22,429 | 0.19486 |
532c9a004feae83c4d1b5c9bdf050c58af603c9f | 1,473 | py | Python | ua_roomseeker/uploader.py | nyg1/classroom-finder | 13b6332187c2afb9833a1acd82bdf31ab81af5c8 | [
"MIT"
] | 1 | 2020-08-29T22:04:17.000Z | 2020-08-29T22:04:17.000Z | ua_roomseeker/uploader.py | nyg1/classroom-finder | 13b6332187c2afb9833a1acd82bdf31ab81af5c8 | [
"MIT"
] | 1 | 2020-02-17T05:18:36.000Z | 2020-02-17T05:18:36.000Z | ua_roomseeker/uploader.py | nyg1/UAroomseeker | 13b6332187c2afb9833a1acd82bdf31ab81af5c8 | [
"MIT"
] | 2 | 2020-08-29T22:04:22.000Z | 2020-09-07T18:01:46.000Z | from seeker.models import Building, Classroom, Time
import json
import os
os.chdir('../data')
fileList = os.listdir()
#loops through each json file
for jsonfile in fileList:
#opens the jsonfile and loads the data
f = open(jsonfile, 'r')
data = f.read()
jsondata = json.loads(data)
#create the build... | 43.323529 | 230 | 0.681602 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 563 | 0.382213 |
532d64eb017b0350df305fd05c57bebebc901080 | 6,729 | py | Python | dash_daq/Slider.py | luiztauffer/dash-daq | 4975093449bdc4d7ff4cd366ac82a847cdf24c34 | [
"MIT"
] | null | null | null | dash_daq/Slider.py | luiztauffer/dash-daq | 4975093449bdc4d7ff4cd366ac82a847cdf24c34 | [
"MIT"
] | null | null | null | dash_daq/Slider.py | luiztauffer/dash-daq | 4975093449bdc4d7ff4cd366ac82a847cdf24c34 | [
"MIT"
] | null | null | null | # AUTO GENERATED FILE - DO NOT EDIT
from dash.development.base_component import Component, _explicitize_args
class Slider(Component):
"""A Slider component.
A slider component with support for
a target value.
Keyword arguments:
- id (string; optional):
The ID used to identify this component in Dash callbac... | 38.895954 | 651 | 0.693862 | 6,616 | 0.983207 | 0 | 0 | 1,806 | 0.268391 | 0 | 0 | 5,314 | 0.789716 |
532e406ed64b6d506b797cd81b981fdce20419b3 | 353 | py | Python | src/util/__init__.py | ooshyun/filterdesign | 59dbea191b8cd44aa9f2d02d3787b5805d486ae2 | [
"MIT"
] | 1 | 2021-12-27T00:38:32.000Z | 2021-12-27T00:38:32.000Z | src/util/__init__.py | ooshyun/FilterDesign | 7162ccad8e1ae8aebca370da56be56603b9e8b24 | [
"MIT"
] | null | null | null | src/util/__init__.py | ooshyun/FilterDesign | 7162ccad8e1ae8aebca370da56be56603b9e8b24 | [
"MIT"
] | null | null | null | """Utility function for process to raw data
"""
from .util import (
cvt_pcm2wav,
cvt_float2fixed,
cvt_char2num,
plot_frequency_response,
plot_pole_zero_analysis,
)
from .fi import fi
__all__ = [
"fi",
"cvt_pcm2wav",
"cvt_float2fixed",
"cvt_char2num",
"plot_frequency_response",
... | 16.809524 | 43 | 0.677054 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 145 | 0.410765 |
532f2625149c93f751d40a68a85af35c606a9f80 | 1,192 | py | Python | infra/apps/catalog/tests/views/distribution_upload_tests.py | datosgobar/infra.datos.gob.ar | 9f6ae7f0fc741aad79d074e7b2eb2a7dddf8b2cf | [
"MIT"
] | 1 | 2019-07-01T19:38:52.000Z | 2019-07-01T19:38:52.000Z | infra/apps/catalog/tests/views/distribution_upload_tests.py | datosgobar/infra.datos.gob.ar | 9f6ae7f0fc741aad79d074e7b2eb2a7dddf8b2cf | [
"MIT"
] | 77 | 2019-05-27T18:16:30.000Z | 2021-09-20T21:25:24.000Z | infra/apps/catalog/tests/views/distribution_upload_tests.py | datosgobar/infra.datos.gob.ar | 9f6ae7f0fc741aad79d074e7b2eb2a7dddf8b2cf | [
"MIT"
] | 3 | 2019-12-09T16:38:18.000Z | 2020-10-30T02:10:20.000Z | import pytest
from django.core.files import File
from django.urls import reverse
from freezegun import freeze_time
from infra.apps.catalog.tests.helpers.open_catalog import open_catalog
pytestmark = pytest.mark.django_db
@pytest.fixture(autouse=True)
def give_user_edit_rights(user, node):
node.admins.add(user)
... | 34.057143 | 78 | 0.72651 | 0 | 0 | 0 | 0 | 94 | 0.078859 | 0 | 0 | 92 | 0.077181 |
5330d3c71a4dca71ef0aca045f8b4a15a601bd18 | 3,494 | py | Python | examples/model_zoo/build_binaries.py | Embracing/unrealcv | 19305da8554c3a0e683a5e27a1e487cc2cf42776 | [
"MIT"
] | 1,617 | 2016-09-10T04:41:33.000Z | 2022-03-31T20:03:28.000Z | examples/model_zoo/build_binaries.py | Embracing/unrealcv | 19305da8554c3a0e683a5e27a1e487cc2cf42776 | [
"MIT"
] | 199 | 2016-09-13T09:40:59.000Z | 2022-03-16T02:37:23.000Z | examples/model_zoo/build_binaries.py | Embracing/unrealcv | 19305da8554c3a0e683a5e27a1e487cc2cf42776 | [
"MIT"
] | 431 | 2016-09-10T03:20:35.000Z | 2022-03-19T13:44:21.000Z | import subprocess, os
ue4_win = r"C:\Program Files\Epic Games\UE_4.16"
ue4_linux = "/home/qiuwch/workspace/UE416"
ue4_mac = '/Users/Shared/Epic Games/UE_4.16'
win_uprojects = [
r'C:\qiuwch\workspace\uprojects\UE4RealisticRendering\RealisticRendering.uproject',
r'C:\qiuwch\workspace\uprojects\UE4ArchinteriorsV... | 40.627907 | 108 | 0.694333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,708 | 0.488838 |
53315defe5a40f6e5f9bc740259ebb1dfe1b3225 | 3,515 | py | Python | __init__.py | NeonJarbas/skill-ddg | 48476ad650e72f68ee7e96dd92c6d18f841ce6ec | [
"Apache-2.0"
] | null | null | null | __init__.py | NeonJarbas/skill-ddg | 48476ad650e72f68ee7e96dd92c6d18f841ce6ec | [
"Apache-2.0"
] | null | null | null | __init__.py | NeonJarbas/skill-ddg | 48476ad650e72f68ee7e96dd92c6d18f841ce6ec | [
"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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | 35.867347 | 82 | 0.62276 | 2,668 | 0.759033 | 0 | 0 | 655 | 0.186344 | 0 | 0 | 1,191 | 0.338834 |
533191e519d8de6668af0108951a5877a4213bac | 6,639 | py | Python | openstack_lease_it/openstack_lease_it/settings.py | LAL/openstack-lease-it | 4ff983911825eac886fa6f76d6efc25225a698b7 | [
"Apache-2.0"
] | null | null | null | openstack_lease_it/openstack_lease_it/settings.py | LAL/openstack-lease-it | 4ff983911825eac886fa6f76d6efc25225a698b7 | [
"Apache-2.0"
] | 11 | 2017-04-13T16:48:16.000Z | 2017-11-22T08:13:39.000Z | openstack_lease_it/openstack_lease_it/settings.py | LAL/openstack-lease-it | 4ff983911825eac886fa6f76d6efc25225a698b7 | [
"Apache-2.0"
] | 3 | 2017-04-06T09:08:40.000Z | 2021-05-25T08:15:00.000Z | """
Django settings for openstack_lease_it project.
Generated by 'django-admin startproject' using Django 1.8.7.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
#... | 31.023364 | 89 | 0.658081 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,014 | 0.604609 |
533284cf96b1c69f9f29a622772bb5c570e08d44 | 3,619 | py | Python | rigl/experimental/jax/pruning/pruning.py | vishalbelsare/rigl | f18abc7d82ae3acc6736068408a0186c9efa575c | [
"Apache-2.0"
] | 276 | 2019-11-25T22:05:45.000Z | 2022-03-30T11:55:34.000Z | rigl/experimental/jax/pruning/pruning.py | vishalbelsare/rigl | f18abc7d82ae3acc6736068408a0186c9efa575c | [
"Apache-2.0"
] | 10 | 2020-02-26T14:53:50.000Z | 2021-09-08T16:27:28.000Z | rigl/experimental/jax/pruning/pruning.py | vishalbelsare/rigl | f18abc7d82ae3acc6736068408a0186c9efa575c | [
"Apache-2.0"
] | 54 | 2019-11-26T18:50:33.000Z | 2022-03-29T20:08:08.000Z | # coding=utf-8
# Copyright 2021 RigL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 37.697917 | 100 | 0.716773 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,962 | 0.542139 |
5333f0221e4e3679432478592dc87f3e97d8ca99 | 3,643 | py | Python | venv/Lib/site-packages/dash_bootstrap_components/_components/CardLink.py | hanzzhu/chadle | ac1d63b0410bb43f3fab362bb00abfc2e8790b9d | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/dash_bootstrap_components/_components/CardLink.py | hanzzhu/chadle | ac1d63b0410bb43f3fab362bb00abfc2e8790b9d | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/dash_bootstrap_components/_components/CardLink.py | hanzzhu/chadle | ac1d63b0410bb43f3fab362bb00abfc2e8790b9d | [
"Apache-2.0"
] | null | null | null | # AUTO GENERATED FILE - DO NOT EDIT
from dash.development.base_component import Component, _explicitize_args
class CardLink(Component):
"""A CardLink component.
Use card link to add consistently styled links to your cards. Links can be
used like buttons, external links, or internal Dash style links.
Keyword arg... | 42.360465 | 349 | 0.705188 | 3,530 | 0.968982 | 0 | 0 | 1,330 | 0.365084 | 0 | 0 | 2,547 | 0.699149 |
53341c91d6109f552f8886886b2f526f32484d2e | 731 | py | Python | plugins/hanlp_demo/hanlp_demo/zh/tf/train/train_ctb9_pos_electra.py | antfootAlex/HanLP | e8044b27ae1de54b9070db08549853d3ca8271e2 | [
"Apache-2.0"
] | 3 | 2022-03-07T08:33:16.000Z | 2022-03-07T08:38:08.000Z | plugins/hanlp_demo/hanlp_demo/zh/tf/train/train_ctb9_pos_electra.py | hushaoyun/HanLP | 967b52404c9d0adbc0cff2699690c127ecfca36e | [
"Apache-2.0"
] | null | null | null | plugins/hanlp_demo/hanlp_demo/zh/tf/train/train_ctb9_pos_electra.py | hushaoyun/HanLP | 967b52404c9d0adbc0cff2699690c127ecfca36e | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
# Author: hankcs
# Date: 2019-12-28 23:15
from hanlp.components.taggers.transformers.transformer_tagger_tf import TransformerTaggerTF
from tests import cdroot
cdroot()
tagger = TransformerTaggerTF()
save_dir = 'data/model/pos/ctb9_electra_small_zh_epoch_20'
tagger.fit('data/pos/ctb9/train.tsv',
... | 33.227273 | 91 | 0.679891 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 290 | 0.387183 |
533456ef85893ecb35c41dc38df64614c652cb8f | 768 | py | Python | src/app/main.py | Wedding-APIs-System/Backend-APi | 5a03be5f36ce8ca7e3abba2d64b63c55752697f3 | [
"MIT"
] | null | null | null | src/app/main.py | Wedding-APIs-System/Backend-APi | 5a03be5f36ce8ca7e3abba2d64b63c55752697f3 | [
"MIT"
] | null | null | null | src/app/main.py | Wedding-APIs-System/Backend-APi | 5a03be5f36ce8ca7e3abba2d64b63c55752697f3 | [
"MIT"
] | null | null | null | from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from app.api import landing, login, attendance_confirmation
from sql_app.database import orm_connection
app = FastAPI(title="Sergio's wedding backend API",
description="REST API which serves login, attendance confirmation and other fea... | 20.210526 | 90 | 0.71875 | 0 | 0 | 0 | 0 | 64 | 0.083333 | 46 | 0.059896 | 184 | 0.239583 |
5334ff647ed3cefd61f9291666af5ce5a96e862e | 1,800 | py | Python | tests/test_pydora/test_utils.py | NextGenTechBar/twandora | f626717a5580f82250bbe66d4ebc357e0882382c | [
"MIT"
] | null | null | null | tests/test_pydora/test_utils.py | NextGenTechBar/twandora | f626717a5580f82250bbe66d4ebc357e0882382c | [
"MIT"
] | null | null | null | tests/test_pydora/test_utils.py | NextGenTechBar/twandora | f626717a5580f82250bbe66d4ebc357e0882382c | [
"MIT"
] | null | null | null | from unittest import TestCase
from pandora.client import APIClient
from pandora.errors import InvalidAuthToken, ParameterMissing
from pandora.models.pandora import Station, AdItem, PlaylistItem
from pandora.py2compat import Mock, patch
from pydora.utils import iterate_forever
class TestIterateForever(TestCase):
... | 45 | 124 | 0.693333 | 1,519 | 0.843889 | 0 | 0 | 0 | 0 | 0 | 0 | 169 | 0.093889 |
5338514dfbd12161e51e2cea2de687a8253338f8 | 28,526 | py | Python | PyDSTool/PyCont/BifPoint.py | mdlama/pydstool | 3d298e908ff55340cd3612078508be0c791f63a8 | [
"Python-2.0",
"OLDAP-2.7"
] | 2 | 2021-02-04T15:01:31.000Z | 2021-02-25T16:08:43.000Z | PyDSTool/PyCont/BifPoint.py | mdlama/pydstool | 3d298e908ff55340cd3612078508be0c791f63a8 | [
"Python-2.0",
"OLDAP-2.7"
] | null | null | null | PyDSTool/PyCont/BifPoint.py | mdlama/pydstool | 3d298e908ff55340cd3612078508be0c791f63a8 | [
"Python-2.0",
"OLDAP-2.7"
] | 1 | 2021-02-25T14:43:36.000Z | 2021-02-25T14:43:36.000Z | """ Bifurcation point classes. Each class locates and processes bifurcation points.
* _BranchPointFold is a version based on BranchPoint location algorithms
* BranchPoint: Branch process is broken (can't find alternate branch -- see MATCONT notes)
Drew LaMar, March 2006
"""
from __future__ import absolu... | 32.638444 | 120 | 0.534179 | 27,355 | 0.95895 | 0 | 0 | 0 | 0 | 0 | 0 | 3,773 | 0.132265 |
533866f2077fc08488ebf544ff7c3db315b050b5 | 283 | py | Python | src/marion/marion/urls/__init__.py | OmenApps/marion | f501674cafbd91f0bbad7454e4dcf3527cf4445e | [
"MIT"
] | 7 | 2021-04-06T20:33:31.000Z | 2021-09-30T23:29:24.000Z | src/marion/marion/urls/__init__.py | OmenApps/marion | f501674cafbd91f0bbad7454e4dcf3527cf4445e | [
"MIT"
] | 23 | 2020-09-09T15:01:50.000Z | 2022-01-03T08:58:36.000Z | src/marion/marion/urls/__init__.py | OmenApps/marion | f501674cafbd91f0bbad7454e4dcf3527cf4445e | [
"MIT"
] | 2 | 2020-12-14T10:07:07.000Z | 2021-06-29T00:20:43.000Z | """Urls for the marion application"""
from django.urls import include, path
from rest_framework import routers
from .. import views
router = routers.DefaultRouter()
router.register(r"requests", views.DocumentRequestViewSet)
urlpatterns = [
path("", include(router.urls)),
]
| 18.866667 | 58 | 0.749117 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.176678 |
533987c4f01c2ae25c35913b042954d6d704d9b2 | 1,736 | py | Python | setup.py | TanKingsley/pyxll-jupyter | 4f7b3eb361079b74683d89340dfff9576fb2ff41 | [
"MIT"
] | 1 | 2020-12-28T10:40:38.000Z | 2020-12-28T10:40:38.000Z | setup.py | TanKingsley/pyxll-jupyter | 4f7b3eb361079b74683d89340dfff9576fb2ff41 | [
"MIT"
] | null | null | null | setup.py | TanKingsley/pyxll-jupyter | 4f7b3eb361079b74683d89340dfff9576fb2ff41 | [
"MIT"
] | null | null | null | """
PyXLL-Jupyter
This package integrated Jupyter notebooks into Microsoft Excel.
To install it, first install PyXLL (see https://www.pyxll.com).
Briefly, to install PyXLL do the following::
pip install pyxll
pyxll install
Once PyXLL is installed then installing this package will add a
button to the PyXLL ... | 26.707692 | 73 | 0.657258 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,024 | 0.589862 |
5339fd0b2f57b238565a16867e9a32da801ab240 | 5,630 | py | Python | board/views.py | albi23/Pyra | 1c1ceece15d55cd0e0ecf41d7224683b93b72555 | [
"MIT"
] | null | null | null | board/views.py | albi23/Pyra | 1c1ceece15d55cd0e0ecf41d7224683b93b72555 | [
"MIT"
] | 6 | 2021-03-19T01:58:04.000Z | 2021-09-22T18:53:15.000Z | board/views.py | albi23/Pyra | 1c1ceece15d55cd0e0ecf41d7224683b93b72555 | [
"MIT"
] | 1 | 2020-06-29T18:16:29.000Z | 2020-06-29T18:16:29.000Z | from typing import List
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.http import JsonResponse
from django.shortcuts import render
from django.urls import reverse_lazy
from django.views import generic, View
from board.forms import SignUpForm
from .co... | 28.291457 | 101 | 0.610302 | 2,565 | 0.455595 | 0 | 0 | 2,415 | 0.428952 | 0 | 0 | 538 | 0.09556 |
533acfb3888fb78753274cc7a4925350317c5e43 | 1,008 | py | Python | setup.py | lazmond3/pylib-instagram-type | 9683a7fb1dad9b1a770a3f98317f1cde1085f0a7 | [
"BSD-2-Clause"
] | null | null | null | setup.py | lazmond3/pylib-instagram-type | 9683a7fb1dad9b1a770a3f98317f1cde1085f0a7 | [
"BSD-2-Clause"
] | null | null | null | setup.py | lazmond3/pylib-instagram-type | 9683a7fb1dad9b1a770a3f98317f1cde1085f0a7 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Learn more: https://github.com/kennethreitz/setup.py
from setuptools import setup, find_packages
import os
with open('README.md') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
def take_package_name(name):
if name.startswith("-e"):
return name[... | 25.2 | 92 | 0.667659 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 351 | 0.346838 |
533adf5d76752741ed41f712b78044d29524e61c | 2,455 | py | Python | tbx/core/migrations/0111_move_sign_up_form_into_new_app.py | arush15june/wagtail-torchbox | c4d06e096c72bd8007975dc016133024f9d27fab | [
"MIT"
] | null | null | null | tbx/core/migrations/0111_move_sign_up_form_into_new_app.py | arush15june/wagtail-torchbox | c4d06e096c72bd8007975dc016133024f9d27fab | [
"MIT"
] | null | null | null | tbx/core/migrations/0111_move_sign_up_form_into_new_app.py | arush15june/wagtail-torchbox | c4d06e096c72bd8007975dc016133024f9d27fab | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2019-01-15 22:49
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('wagtailsearchpromotions', '0002_capitalizeverbose'),
('wagtailcore', '0040_page_draft_title... | 31.474359 | 100 | 0.619959 | 2,304 | 0.938493 | 0 | 0 | 0 | 0 | 0 | 0 | 873 | 0.355601 |