hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1d070df20d870d429e179a748023415c9109a438 | 2,209 | py | Python | trees/bst.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null | trees/bst.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null | trees/bst.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null |
class BNode:
def __init__(self, val=None, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Node:
def __init__(self, val=None, left=None, right=None):
self.val = val
self.left = left
self.right = right
def inorder_print(root):
... | 16.992308 | 56 | 0.621096 |
1d071e39dab6f9cb22dab15e4f8ecfb5df354d29 | 22,075 | py | Python | hallo/modules/games/games.py | joshcoales/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 1 | 2018-05-19T22:27:20.000Z | 2018-05-19T22:27:20.000Z | hallo/modules/games/games.py | joshcoales/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 75 | 2015-09-26T18:07:18.000Z | 2022-01-04T07:15:11.000Z | hallo/modules/games/games.py | SpangleLabs/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 1 | 2021-04-10T12:02:47.000Z | 2021-04-10T12:02:47.000Z | from hallo.destination import Channel, User
from hallo.events import EventMessage
import random
import time
from hallo.inc.commons import Commons
from threading import Thread
import hallo.modules.games.cards
class Game:
"""
Generic Game object. Stores players and location.
"""
def __init__(self, pl... | 38.660245 | 103 | 0.575946 |
1d0726d7b6b418b48859e05ab90727b9ff23b5fe | 1,035 | py | Python | antarest/study/storage/rawstudy/model/filesystem/root/settings/scenariobuilder.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 2 | 2020-09-30T11:40:22.000Z | 2020-11-09T09:06:30.000Z | antarest/study/storage/rawstudy/model/filesystem/root/settings/scenariobuilder.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 542 | 2021-01-11T13:23:47.000Z | 2022-03-31T15:38:10.000Z | antarest/study/storage/rawstudy/model/filesystem/root/settings/scenariobuilder.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 1 | 2020-10-01T12:18:15.000Z | 2020-10-01T12:18:15.000Z | from typing import Dict, Type
from antarest.study.storage.rawstudy.model.filesystem.config.model import (
FileStudyTreeConfig,
)
from antarest.study.storage.rawstudy.model.filesystem.context import (
ContextServer,
)
from antarest.study.storage.rawstudy.model.filesystem.ini_file_node import (
IniFileNode,
... | 30.441176 | 76 | 0.631884 |
1d073c7ad19175c0b58fae51c78bd7e7a007b5f1 | 752 | py | Python | cn_proj/server.py | Carl-Rabbit/CS305-CN-Proj | d005c32674b7ce3f90e4099c536b3c914e133d7d | [
"Apache-2.0"
] | null | null | null | cn_proj/server.py | Carl-Rabbit/CS305-CN-Proj | d005c32674b7ce3f90e4099c536b3c914e133d7d | [
"Apache-2.0"
] | null | null | null | cn_proj/server.py | Carl-Rabbit/CS305-CN-Proj | d005c32674b7ce3f90e4099c536b3c914e133d7d | [
"Apache-2.0"
] | null | null | null | from rdt import RDTSocket
from socket import socket, AF_INET, SOCK_DGRAM, SOCK_STREAM
import time
if __name__ == '__main__':
server = RDTSocket()
# server = socket(AF_INET, SOCK_STREAM) # check what python socket does
server.bind(('127.0.0.1', 9000))
# check what python socket does
# server.liste... | 26.857143 | 76 | 0.577128 |
1d0756583b5869b77293837f89832b3a9d0e1133 | 5,937 | py | Python | tests/test_voronoi_fps.py | lab-cosmo/scikit-cosmo | 8121cb74d3577618936c809b2f1b2cd698362d2f | [
"BSD-3-Clause"
] | 16 | 2020-12-07T23:27:11.000Z | 2021-12-17T22:28:33.000Z | tests/test_voronoi_fps.py | lab-cosmo/scikit-cosmo | 8121cb74d3577618936c809b2f1b2cd698362d2f | [
"BSD-3-Clause"
] | 74 | 2020-11-30T18:51:41.000Z | 2021-12-06T20:53:31.000Z | tests/test_voronoi_fps.py | lab-cosmo/scikit-cosmo | 8121cb74d3577618936c809b2f1b2cd698362d2f | [
"BSD-3-Clause"
] | 4 | 2020-12-02T16:42:53.000Z | 2021-11-16T15:50:33.000Z | import unittest
import numpy as np
from sklearn.exceptions import NotFittedError
from skcosmo.sample_selection import (
FPS,
VoronoiFPS,
)
from test_sample_simple_fps import TestFPS
class TestVoronoiFPS(TestFPS):
def setUp(self):
super().setUp()
def test_restart(self):
"""
T... | 32.266304 | 120 | 0.581438 |
1d075e4914e140f5fd02c6db8c4707d5672326b1 | 15,997 | py | Python | wienerschnitzelgemeinschaft/src/Christof/models/GAPNet/11_tests_on_clr/train_4in20_0001.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/GAPNet/11_tests_on_clr/train_4in20_0001.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/GAPNet/11_tests_on_clr/train_4in20_0001.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | import os, sys
#os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="1"
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import skimage.io
from skimage.transform import resize
from imgaug import augmenters as iaa
from tqdm import tqdm
import PIL
from PIL import Image... | 34.927948 | 144 | 0.655748 |
1d0762ad02469d4129d1816b5b46355482a17dd3 | 26,916 | py | Python | libapparmor/utils/test/test-change_profile.py | pyronia-sys/libpyronia | 02ccf1d832754f771d1f9a60e5e91819ec878757 | [
"Apache-2.0"
] | null | null | null | libapparmor/utils/test/test-change_profile.py | pyronia-sys/libpyronia | 02ccf1d832754f771d1f9a60e5e91819ec878757 | [
"Apache-2.0"
] | 2 | 2020-02-05T01:26:55.000Z | 2020-02-05T01:31:32.000Z | libapparmor/utils/test/test-change_profile.py | pyronia-sys/libpyronia | 02ccf1d832754f771d1f9a60e5e91819ec878757 | [
"Apache-2.0"
] | 1 | 2021-12-05T19:53:32.000Z | 2021-12-05T19:53:32.000Z | #!/usr/bin/python3
# ----------------------------------------------------------------------
# Copyright (C) 2015 Christian Boltz <apparmor@cboltz.de>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License as published by... | 55.155738 | 202 | 0.510328 |
1d079e7bd93dcf7d672e575b8ccdcb4006cd3276 | 471 | py | Python | camply/config/__init__.py | grantland/camply | aec4c6b82380fdc85f254563d8e8de290edc05ad | [
"MIT"
] | null | null | null | camply/config/__init__.py | grantland/camply | aec4c6b82380fdc85f254563d8e8de290edc05ad | [
"MIT"
] | null | null | null | camply/config/__init__.py | grantland/camply | aec4c6b82380fdc85f254563d8e8de290edc05ad | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Author:: Justin Flannery (mailto:juftin@juftin.com)
"""
Config __init__ file
"""
from .api_config import RecreationBookingConfig, RIDBConfig, STANDARD_HEADERS, USER_AGENTS
from .cli_config import CommandLineConfig
from .data_columns import DataColumns
from .file_config import FileConfig
... | 29.4375 | 90 | 0.828025 |
1d07a647b501b6c06ba3c7d5707d5b40fdfbc688 | 14,549 | py | Python | reana_job_controller/app.py | dleehr/reana-job-controller | aa23803db5528ff1e31bb674fd57a28f83fd41ed | [
"MIT"
] | null | null | null | reana_job_controller/app.py | dleehr/reana-job-controller | aa23803db5528ff1e31bb674fd57a28f83fd41ed | [
"MIT"
] | null | null | null | reana_job_controller/app.py | dleehr/reana-job-controller | aa23803db5528ff1e31bb674fd57a28f83fd41ed | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This file is part of REANA.
# Copyright (C) 2017, 2018 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Rest API endpoint for job management."""
import copy
import json
import logging
impo... | 31.491342 | 79 | 0.556327 |
1d07aa783f075ce2f12d607610ca5e7cc9880964 | 604 | py | Python | comments/migrations/0005_auto_20190723_1337.py | moonbirddk/networked-toolbox | b059b77bfda173794b3cad55874cb06edc70d0e1 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2016-09-02T12:45:31.000Z | 2018-02-10T10:18:11.000Z | comments/migrations/0005_auto_20190723_1337.py | Socialsquare/networked-toolbox | b059b77bfda173794b3cad55874cb06edc70d0e1 | [
"BSD-2-Clause-FreeBSD"
] | 17 | 2020-03-24T15:58:05.000Z | 2022-02-10T08:08:57.000Z | comments/migrations/0005_auto_20190723_1337.py | moonbirddk/networked-toolbox | b059b77bfda173794b3cad55874cb06edc70d0e1 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2018-01-05T08:02:18.000Z | 2018-01-05T08:02:18.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2019-07-23 13:37
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('comments', '0004_threadedcomment_comment_root'),
]
... | 27.454545 | 144 | 0.675497 |
1d07cbce6e4d7c33612cac114ca0a1f401069b33 | 4,673 | py | Python | src/visitpy/visit_utils/tests/test_qannote_multi_prog.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/visitpy/visit_utils/tests/test_qannote_multi_prog.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/visitpy/visit_utils/tests/test_qannote_multi_prog.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # Copyright (c) Lawrence Livermore National Security, LLC and other VisIt
# Project developers. See the top-level LICENSE file for dates and other
# details. No copyright assignment is required to contribute to VisIt.
"""
author: Cyrus Harrison (cyrush@llnl.gov)
description:
Tests for qannote module.
"""
... | 37.384 | 78 | 0.359726 |
1d07d155f190966449d2cf0f0244001bf6a67d7d | 357,260 | py | Python | languages/fr.py | nursix/DRKCM | 09328289ff721c416494398aa751ff99906327cb | [
"MIT"
] | 3 | 2022-01-26T08:07:54.000Z | 2022-03-21T21:53:52.000Z | languages/fr.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | languages/fr.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | {
"%s rows deleted',nrows": "%s lignes supprimées',nrows",
"%s rows updated',nrows": "%s lignes mises à jour',nrows",
"'Cancel' will indicate an asset log entry did not occur": "'Annuler' indiquera une entrée de journal actif n'a pas se produire",
"A location that specifies the geographic area for this region. This can... | 66.977878 | 1,069 | 0.758081 |
1d07d9b6ad25bda6e4b3fafe8f2b702132f5d11e | 4,564 | py | Python | tools/superpose_using_MDAnalysis.py | 1A-OneAngstrom/SAMSON-Python-Samples | fba571af9a199628d542675351c71e1089e8337d | [
"BSD-3-Clause"
] | null | null | null | tools/superpose_using_MDAnalysis.py | 1A-OneAngstrom/SAMSON-Python-Samples | fba571af9a199628d542675351c71e1089e8337d | [
"BSD-3-Clause"
] | 2 | 2021-01-05T18:40:35.000Z | 2021-01-05T18:50:14.000Z | tools/superpose_using_MDAnalysis.py | 1A-OneAngstrom/SAMSON-Python-Samples | fba571af9a199628d542675351c71e1089e8337d | [
"BSD-3-Clause"
] | null | null | null | '''
Let us consider a case, when we have two structures (e.g., two structural models in terms of SAMSON)
in the active Document in SAMSON and we want to superimpose
in a way that minimizes the RMSD. For that we can use functions in the MDAnalysis.analysis.align module.
Let the first molecule be the reference one, and ... | 53.069767 | 163 | 0.687774 |
1d0824628492fffbb37eb7101f8df418879ab561 | 29,718 | py | Python | tests/helpers/test_config_validation.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 7 | 2019-02-07T14:14:12.000Z | 2019-07-28T06:56:10.000Z | tests/helpers/test_config_validation.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 6 | 2021-02-08T20:54:31.000Z | 2022-03-12T00:50:43.000Z | tests/helpers/test_config_validation.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Test config validators."""
from datetime import date, datetime, timedelta
import enum
import os
from socket import _GLOBAL_DEFAULT_TIMEOUT
from unittest.mock import Mock, patch
import uuid
import pytest
import voluptuous as vol
import homeassistant
import homeassistant.helpers.config_validation as cv
def test_bo... | 28.35687 | 87 | 0.608587 |
1d08260f2f40d3ea8af3009ecf07a0b0485246de | 7,409 | py | Python | layers/conv.py | magic2du/dlnn | 9a6fdd1e9e84826c402b564853673dd1c9cd12b9 | [
"Apache-2.0"
] | null | null | null | layers/conv.py | magic2du/dlnn | 9a6fdd1e9e84826c402b564853673dd1c9cd12b9 | [
"Apache-2.0"
] | null | null | null | layers/conv.py | magic2du/dlnn | 9a6fdd1e9e84826c402b564853673dd1c9cd12b9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Tianchuan Du University of Delaware
# 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
#
# THIS CODE IS PROVIDED *AS IS* BAS... | 40.266304 | 108 | 0.613443 |
1d083701be2babd8cc108fa1d7c70e2b81ae5b11 | 4,490 | py | Python | benchmark/checks/check_dialogues_memory_usage.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | benchmark/checks/check_dialogues_memory_usage.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | benchmark/checks/check_dialogues_memory_usage.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2020 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You ma... | 32.071429 | 85 | 0.640535 |
1d084b968138f0a48db25015c2d508b2443bc990 | 666 | py | Python | Paas/resources/serializers.py | Windsooon/chainstack_interview | fd6e4d0e693686777b5558c490c244d0a1ea31e6 | [
"MIT"
] | null | null | null | Paas/resources/serializers.py | Windsooon/chainstack_interview | fd6e4d0e693686777b5558c490c244d0a1ea31e6 | [
"MIT"
] | 3 | 2018-10-09T15:07:55.000Z | 2021-06-10T20:54:31.000Z | Paas/resources/serializers.py | Windsooon/chainstack_interview | fd6e4d0e693686777b5558c490c244d0a1ea31e6 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from rest_framework.response import Response
from .models import Resource
class ResourceSerializer(serializers.ModelSerializer):
class Meta:
model = Resource
fields = ('id', 'unique_id', 'create_time')
def create(self, validated_data):
user = se... | 31.714286 | 82 | 0.627628 |
1d0851e5be950f12ddc083450b32f6a373baec90 | 546 | py | Python | presets/pov/lamp/15_(3200K)_40W_Induction_ Fluorescent.py | 1-MillionParanoidTterabytes/blender-addons-master | acc8fc23a38e6e89099c3e5079bea31ce85da06a | [
"Unlicense"
] | 1 | 2018-06-18T09:46:10.000Z | 2018-06-18T09:46:10.000Z | presets/pov/lamp/15_(3200K)_40W_Induction_ Fluorescent.py | 1-MillionParanoidTterabytes/blender-addons-master | acc8fc23a38e6e89099c3e5079bea31ce85da06a | [
"Unlicense"
] | null | null | null | presets/pov/lamp/15_(3200K)_40W_Induction_ Fluorescent.py | 1-MillionParanoidTterabytes/blender-addons-master | acc8fc23a38e6e89099c3e5079bea31ce85da06a | [
"Unlicense"
] | null | null | null | #since the 1990's,
#Often circular or rectangular closed loop electrodeless fluorescent lamps
import bpy
bpy.context.object.data.type = 'SPOT'
lampdata = bpy.context.object.data
#lampdata.use_halo = True
lampdata.spot_size = 3.14
lampdata.spot_blend = 0.9
lampdata.color = (1.0, 0.9450980424880981, 0.8784313797950745... | 36.4 | 92 | 0.789377 |
1d08669bbbe62932d254a1c5a6db5ca8d7c509e1 | 756 | py | Python | inverso_modulo_m.py | aarroyoc/codigos-criptografia | 9ad93dfe105a33ebdff36bee154ccd98ca1e5f18 | [
"Unlicense"
] | 1 | 2019-03-14T03:23:36.000Z | 2019-03-14T03:23:36.000Z | inverso_modulo_m.py | aarroyoc/codigos-criptografia | 9ad93dfe105a33ebdff36bee154ccd98ca1e5f18 | [
"Unlicense"
] | null | null | null | inverso_modulo_m.py | aarroyoc/codigos-criptografia | 9ad93dfe105a33ebdff36bee154ccd98ca1e5f18 | [
"Unlicense"
] | null | null | null | num = input("Introduzca el número")
num = int(num)
mod = input("Introduzca el módulo")
mod = int(mod)
def mcd(a,b):
m = a
n = b
x = list()
y = list()
step = 1
r = -1
while r != 0:
r = m % n
c = m // n
if step == 1:
x.append(1)
y.append(0)
... | 18 | 35 | 0.378307 |
1d08735602ebc32ab768333ae4d690b7b5b03d48 | 907 | py | Python | pcdet/datasets/kitti/kitti_object_eval_python/evaluate.py | halostorm/OpenPCDet | 9650c9d71e7f03815e925fee6e16909fb219336a | [
"Apache-2.0"
] | 2 | 2020-08-04T08:39:28.000Z | 2021-02-09T08:07:13.000Z | pcdet/datasets/kitti/kitti_object_eval_python/evaluate.py | halostorm/OpenPCDet | 9650c9d71e7f03815e925fee6e16909fb219336a | [
"Apache-2.0"
] | null | null | null | pcdet/datasets/kitti/kitti_object_eval_python/evaluate.py | halostorm/OpenPCDet | 9650c9d71e7f03815e925fee6e16909fb219336a | [
"Apache-2.0"
] | null | null | null | import time
import fire
import.kitti_common as kitti
from .eval import get_official_eval_result, get_coco_eval_result
def _read_imageset_file(path):
with open(path, 'r') as f:
lines = f.readlines()
return [int(line) for line in lines]
def evaluate(label_path,
result_path,
... | 27.484848 | 74 | 0.693495 |
1d087ac7bc0fdedda41e6e156e693fae3816ed05 | 7,036 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_ds1841.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_ds1841.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_ds1841.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # The MIT License (MIT)
#
# Copyright (c) 2020 Bryan Siepert for Adafruit Industries
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the ri... | 35.897959 | 95 | 0.68448 |
1d08bcfef038f80b2e0b2d7e77bed7d72c1135e0 | 4,073 | py | Python | stoq/plugins/dispatcher.py | ytreister/stoq | 8bfc78b226ee6500eb78e1bdf361fc83bc5005b7 | [
"Apache-2.0"
] | 385 | 2015-11-20T02:21:18.000Z | 2022-03-24T09:38:24.000Z | stoq/plugins/dispatcher.py | ytreister/stoq | 8bfc78b226ee6500eb78e1bdf361fc83bc5005b7 | [
"Apache-2.0"
] | 127 | 2016-07-08T20:23:20.000Z | 2022-02-23T13:52:19.000Z | stoq/plugins/dispatcher.py | ytreister/stoq | 8bfc78b226ee6500eb78e1bdf361fc83bc5005b7 | [
"Apache-2.0"
] | 68 | 2015-11-20T12:51:44.000Z | 2022-01-25T04:35:54.000Z | #!/usr/bin/env python3
# Copyright 2014-2018 PUNCH Cyber Analytics Group
#
# 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
#
# Un... | 31.820313 | 92 | 0.641542 |
1d08c9673d19b9cb9707a659229f1f805df93922 | 127 | py | Python | rlberry/agents/torch/__init__.py | akrouriad/rlberry | dde4e2cbafca05fdef1df07646bb6368059eeadf | [
"MIT"
] | 86 | 2020-11-20T21:02:27.000Z | 2022-03-07T14:57:40.000Z | rlberry/agents/torch/__init__.py | akrouriad/rlberry | dde4e2cbafca05fdef1df07646bb6368059eeadf | [
"MIT"
] | 103 | 2020-11-17T12:31:21.000Z | 2022-03-28T13:46:16.000Z | rlberry/agents/torch/__init__.py | akrouriad/rlberry | dde4e2cbafca05fdef1df07646bb6368059eeadf | [
"MIT"
] | 20 | 2020-11-23T01:47:50.000Z | 2022-03-25T07:45:24.000Z | # agents (alphabetical!)
from .a2c import *
from .avec import *
from .dqn import *
from .ppo import *
from .reinforce import *
| 18.142857 | 24 | 0.708661 |
1d08e4edcf228adb182ba5d2560f7cc44132ef42 | 1,321 | py | Python | func_tests/pages/languagespage/customized_language_locator.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | func_tests/pages/languagespage/customized_language_locator.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | func_tests/pages/languagespage/customized_language_locator.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | from framework.utils.common_utils import by_id, by_css
LANGUAGE_SAVE_BUTTON_LOCATOR = by_id("language_save")
LANGUAGE_DROP_DOWN_LOCATOR = by_id("language")
SUCCESS_SUBMISSION_MESSAGE_LOCATOR = by_id("custom_message0")
SUBMISSION_WITH_ERROR_MESSAGE_LOCATOR = by_id("custom_message1")
SUBMISSION_WITH_INCORRECT_NUMBER_OF_... | 60.045455 | 88 | 0.864497 |
1d08ef8b926030ff2dd2a107516b67757ec02178 | 3,978 | py | Python | chrome/common/extensions/docs/server2/intro_data_source.py | leiferikb/bitpop-private | 4c967307d228e86f07f2576068a169e846c833ca | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2021-11-15T15:17:43.000Z | 2021-11-15T15:17:43.000Z | chrome/common/extensions/docs/server2/intro_data_source.py | leiferikb/bitpop-private | 4c967307d228e86f07f2576068a169e846c833ca | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | chrome/common/extensions/docs/server2/intro_data_source.py | leiferikb/bitpop-private | 4c967307d228e86f07f2576068a169e846c833ca | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2019-02-21T16:13:42.000Z | 2019-02-21T16:13:42.000Z | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from HTMLParser import HTMLParser
import re
import logging
from docs_server_utils import FormatKey
from file_system import FileNotFoundError
import comp... | 34.894737 | 80 | 0.65812 |
1d09070e9f45433cc5d91c2ef853f4428f7beaf9 | 2,019 | py | Python | app/api/v1/utils/user_validators.py | Dave-mash/Questioner-api | 1cceb49e8e462059b2e507beb3192141763d007d | [
"MIT"
] | null | null | null | app/api/v1/utils/user_validators.py | Dave-mash/Questioner-api | 1cceb49e8e462059b2e507beb3192141763d007d | [
"MIT"
] | 1 | 2019-01-15T13:05:09.000Z | 2019-01-15T13:05:09.000Z | app/api/v1/utils/user_validators.py | Dave-mash/Questioner-api | 1cceb49e8e462059b2e507beb3192141763d007d | [
"MIT"
] | null | null | null | """
This module takes care of validating input from the endpoints
"""
from datetime import datetime
import re
from app.api.v1.models.base import Base
base_model = Base()
class UserValidator:
def __init__(
self,
Fname="",
Lname="",
username="",
email="",
passw... | 28.43662 | 93 | 0.577018 |
1d0926afdd1c8ba7ea2695d853274a389e893957 | 22,748 | py | Python | vnpy/gateway/tora/td.py | howyu88/vnpy2 | c8ae445823dc1f71abda1a79fae7d4be3dd92dd4 | [
"MIT"
] | 11 | 2019-11-18T06:07:16.000Z | 2020-10-12T11:36:21.000Z | vnpy/gateway/tora/td.py | howyu88/vnpy2 | c8ae445823dc1f71abda1a79fae7d4be3dd92dd4 | [
"MIT"
] | 2 | 2019-08-04T01:45:37.000Z | 2019-08-04T01:48:18.000Z | vnpy/gateway/tora/td.py | howyu88/vnpy2 | c8ae445823dc1f71abda1a79fae7d4be3dd92dd4 | [
"MIT"
] | 6 | 2019-10-30T14:52:21.000Z | 2021-01-11T05:41:17.000Z | import functools
from dataclasses import dataclass, field
from datetime import datetime
from typing import Dict, Optional
from vnpy.api.tora.vntora import (CTORATstpConditionOrderField, CTORATstpInputOrderActionField,
CTORATstpInputOrderField, CTORATstpInvestorField,
... | 37.169935 | 100 | 0.614867 |
1d09494987fd8866388428b21ffef459c469d528 | 1,255 | py | Python | web/get_db_3d.py | RightMesh/payment-channel-performance | 3abde2d4d32353e212a49c946cb8222f297379e7 | [
"MIT"
] | null | null | null | web/get_db_3d.py | RightMesh/payment-channel-performance | 3abde2d4d32353e212a49c946cb8222f297379e7 | [
"MIT"
] | 43 | 2019-01-25T23:54:27.000Z | 2019-04-09T02:36:52.000Z | web/get_db_3d.py | RightMesh/payment-channel-performance | 3abde2d4d32353e212a49c946cb8222f297379e7 | [
"MIT"
] | 1 | 2019-04-27T00:17:44.000Z | 2019-04-27T00:17:44.000Z | import pymongo
from pymongo.errors import BulkWriteError
from lib.db import DB
from bson import ObjectId, Code
import json
import os
MONGO_INITDB_DATABASE = os.environ.get('MONGO_INITDB_DATABASE')
BATCH_INTERVAL = int(os.environ.get('BATCH_INTERVAL'))
def get_gas_stat_3d():
# Connect to mongodb
db_connection = ... | 29.880952 | 135 | 0.653386 |
1d09772cab1ceb097e532bc9515e1b9c8c8f75a1 | 1,097 | py | Python | openstackclient/i18n.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | openstackclient/i18n.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | openstackclient/i18n.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | # Copyright 2012-2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 34.28125 | 77 | 0.756609 |
1d098064cd7aa70db72815c492d40e1a9a3a59f9 | 4,235 | py | Python | python/neuralpixels/image/display.py | neuralpixels/NeuralPixels | 5b6a6f0e20892535d2a193b0c9e2080a2071e9ad | [
"MIT"
] | 1 | 2020-06-07T05:23:20.000Z | 2020-06-07T05:23:20.000Z | python/neuralpixels/image/display.py | neuralpixels/NeuralPixels | 5b6a6f0e20892535d2a193b0c9e2080a2071e9ad | [
"MIT"
] | null | null | null | python/neuralpixels/image/display.py | neuralpixels/NeuralPixels | 5b6a6f0e20892535d2a193b0c9e2080a2071e9ad | [
"MIT"
] | null | null | null | import os
import numpy as np
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
import atexit
import cv2
import matplotlib.pyplot as plt
is_window_shown = False
def make_collage(images, match_size=True, v_stack=False, uint_clip=True):
font_path = os.path.join(os.path.dirname(__file__), 'as... | 32.083333 | 109 | 0.588194 |
1d09a6882ad97f2b11b280305a60ad2da3c53d63 | 575 | py | Python | trajectories/tests/testDiscreteFrechet.py | donsheehy/geomcps | b4ef5dbf0fed21927485b01580b724272f84d9ed | [
"MIT"
] | null | null | null | trajectories/tests/testDiscreteFrechet.py | donsheehy/geomcps | b4ef5dbf0fed21927485b01580b724272f84d9ed | [
"MIT"
] | null | null | null | trajectories/tests/testDiscreteFrechet.py | donsheehy/geomcps | b4ef5dbf0fed21927485b01580b724272f84d9ed | [
"MIT"
] | null | null | null | import unittest
from trajectories.trajectory import Trajectory
from trajectories.point import Point
from trajectories.discreteFrechet import frechetDist
class TestDiscreteFrechet(unittest.TestCase):
def testdiscretefrechet(self):
L1 = [Point([1,1]), Point([2, 1]), Point([2,2])]
L2 = [Point([2,2]), ... | 31.944444 | 56 | 0.655652 |
1d09b71e6086eaee95929fbfc7bee650796007d3 | 9,689 | py | Python | synth.py | gertventer1970/dialogflow-python-client-v2 | e78b0e6765f94fb9ecbbc72c9fc30ce7245703e2 | [
"Apache-2.0"
] | 1 | 2020-10-14T07:43:19.000Z | 2020-10-14T07:43:19.000Z | synth.py | everydaycodings/dialogflow-python-client-v2 | c1c925d94726f49e549870e087ad79ee491056e2 | [
"Apache-2.0"
] | null | null | null | synth.py | everydaycodings/dialogflow-python-client-v2 | c1c925d94726f49e549870e087ad79ee491056e2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 30.373041 | 125 | 0.622665 |
1d09c62f28858b5d78d3d4a42e6503a1dc5eba75 | 10,153 | py | Python | myeongsoo/code2/dkt/trainer.py | DongjaeJang/Deep-Knowledge-Tracing | aab72939a6cbdfc8b7f11bf074040b48771cbf3f | [
"Unlicense"
] | null | null | null | myeongsoo/code2/dkt/trainer.py | DongjaeJang/Deep-Knowledge-Tracing | aab72939a6cbdfc8b7f11bf074040b48771cbf3f | [
"Unlicense"
] | null | null | null | myeongsoo/code2/dkt/trainer.py | DongjaeJang/Deep-Knowledge-Tracing | aab72939a6cbdfc8b7f11bf074040b48771cbf3f | [
"Unlicense"
] | null | null | null | import os
import torch
import numpy as np
import torch.nn.functional as F
from .dataloader import get_loaders
from .optimizer import get_optimizer
from .scheduler import get_scheduler
from .criterion import get_criterion, epoch_update_gamma, ArcMarginProduct, SphereProduct
from .metric import get_metric
from .model i... | 33.071661 | 163 | 0.626219 |
1d09d728608ccf7fd9b0a2b8d8b9d045237bbb0f | 2,798 | py | Python | workalendar/usa/__init__.py | vanadium23/workalendar | 4c67b5a7900fa56d7a93b767c6cbd8f1cc6b70a7 | [
"MIT"
] | null | null | null | workalendar/usa/__init__.py | vanadium23/workalendar | 4c67b5a7900fa56d7a93b767c6cbd8f1cc6b70a7 | [
"MIT"
] | null | null | null | workalendar/usa/__init__.py | vanadium23/workalendar | 4c67b5a7900fa56d7a93b767c6cbd8f1cc6b70a7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from .core import UnitedStates
from .alabama import (
Alabama, AlabamaBaldwinCounty, AlabamaMobileCounty, AlabamaPerryCounty)
from .alaska import Alaska
from .arizona import Arizona... | 23.91453 | 75 | 0.758399 |
1d0a2b9e37139135ce2073469031bb5150a07009 | 8,044 | py | Python | graph/update.py | StephenGrey/covid_data | 8651460734a9aa21b5106896ab98c47491eadb3c | [
"MIT"
] | null | null | null | graph/update.py | StephenGrey/covid_data | 8651460734a9aa21b5106896ab98c47491eadb3c | [
"MIT"
] | null | null | null | graph/update.py | StephenGrey/covid_data | 8651460734a9aa21b5106896ab98c47491eadb3c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os, logging
from .models import CovidWeek, CovidScores,AverageWeek
from . import ons_fetch,model_calcs,phe_fetch,scotland,import_csv,n_ireland,infections,wales,phe_deaths
from django.db.models import Sum
from .ons_week import stored_names
log = logging.getLogger('api.graph.update')
#co... | 31.920635 | 186 | 0.581427 |
1d0a2bfff09df6c67f5a0c1bf3c250c800b981b5 | 759 | py | Python | sender/Entities/Reassembler.py | schc-over-sigfox/schc-over-sigfox | d03e26cf5524ebd6bd64b4ca33a83149eec5e59f | [
"MIT"
] | null | null | null | sender/Entities/Reassembler.py | schc-over-sigfox/schc-over-sigfox | d03e26cf5524ebd6bd64b4ca33a83149eec5e59f | [
"MIT"
] | null | null | null | sender/Entities/Reassembler.py | schc-over-sigfox/schc-over-sigfox | d03e26cf5524ebd6bd64b4ca33a83149eec5e59f | [
"MIT"
] | 1 | 2022-03-19T12:36:30.000Z | 2022-03-19T12:36:30.000Z | from Messages.Fragment import Fragment
class Reassembler:
PROFILE = None
SCHC_FRAGMENTS = []
rule_set = set()
dtag_set = set()
window_set = set()
fcn_set = set()
def __init__(self, profile, schc_fragments):
self.PROFILE = profile
for fragment in schc_fragments:
if fragment != b'':
self.SCHC_FRAGME... | 23 | 64 | 0.737813 |
1d0a68b0b850bec125601e56b2b9e37415d6887d | 8,273 | py | Python | src/merge.py | XIThing/esdl-mapeditor | 9f4cd4a58714ea67aeb532e88e88f0435a87dbd5 | [
"Apache-2.0"
] | null | null | null | src/merge.py | XIThing/esdl-mapeditor | 9f4cd4a58714ea67aeb532e88e88f0435a87dbd5 | [
"Apache-2.0"
] | 14 | 2020-09-30T21:16:46.000Z | 2021-11-08T18:54:34.000Z | src/merge.py | XIThing/esdl-mapeditor | 9f4cd4a58714ea67aeb532e88e88f0435a87dbd5 | [
"Apache-2.0"
] | 1 | 2020-09-17T12:48:57.000Z | 2020-09-17T12:48:57.000Z | # This work is based on original code developed and copyrighted by TNO 2020.
# Subsequent contributions are licensed to you by the developers of such code and are
# made available to the Project under one or several contributor license agreements.
#
# This work is licensed to you under the Apache License, Versi... | 44.005319 | 149 | 0.615375 |
1d0a7813df2d4739beabea6c88d63bef73e26bbf | 201 | py | Python | mcd2cpp/__init__.py | u9g/RikerBot | ef2dbbeb4f8adbc465dd04a908d52a23e5877c41 | [
"Zlib"
] | 45 | 2020-08-07T18:09:29.000Z | 2022-03-07T12:36:35.000Z | mcd2cpp/__init__.py | u9g/RikerBot | ef2dbbeb4f8adbc465dd04a908d52a23e5877c41 | [
"Zlib"
] | 22 | 2020-08-11T07:34:59.000Z | 2022-02-16T16:51:25.000Z | mcd2cpp/__init__.py | u9g/RikerBot | ef2dbbeb4f8adbc465dd04a908d52a23e5877c41 | [
"Zlib"
] | 10 | 2020-08-14T22:54:35.000Z | 2022-03-18T18:03:45.000Z | import minecraft_data
from . import blocks, particles, protocol, shapes
def run(version):
mcd = minecraft_data(version)
protocol.run(mcd)
particles.run(mcd)
shapes.run(mcd)
blocks.run(mcd)
| 18.272727 | 49 | 0.741294 |
1d0a8ec0d6f0ad4f70347d7f00d4103299caf800 | 10,128 | py | Python | tests/python/test_element_wise.py | knight42/taichi | c8d5b3f00061ad03b7867f91735f25fe5174b36c | [
"MIT"
] | 1 | 2022-02-07T06:34:03.000Z | 2022-02-07T06:34:03.000Z | tests/python/test_element_wise.py | knight42/taichi | c8d5b3f00061ad03b7867f91735f25fe5174b36c | [
"MIT"
] | null | null | null | tests/python/test_element_wise.py | knight42/taichi | c8d5b3f00061ad03b7867f91735f25fe5174b36c | [
"MIT"
] | null | null | null | import numpy as np
import pytest
from taichi._testing import allclose
import taichi as ti
def _c_mod(a, b):
return a - b * int(float(a) / b)
@pytest.mark.parametrize('lhs_is_mat,rhs_is_mat', [(True, True), (True, False),
(False, True)])
@ti.test(fast_math=Fals... | 29.271676 | 79 | 0.496347 |
1d0a95c4975e01919adb63fde9fc92912b6bc526 | 701 | py | Python | ensembl_rest/ensemblclient.py | pedrocr83/EnsemblRest | 4841b4a631e5b9aec178a8d0787eb3bb42e69738 | [
"MIT"
] | null | null | null | ensembl_rest/ensemblclient.py | pedrocr83/EnsemblRest | 4841b4a631e5b9aec178a8d0787eb3bb42e69738 | [
"MIT"
] | null | null | null | ensembl_rest/ensemblclient.py | pedrocr83/EnsemblRest | 4841b4a631e5b9aec178a8d0787eb3bb42e69738 | [
"MIT"
] | null | null | null | """
This file is part of pyEnsemblRest.
Copyright (C) 2018, Andrés García
Any questions, comments or issues can be addressed to a.garcia230395@gmail.com.
"""
import json
from importlib_resources import open_text, path
from .core import build_client_class
# Import API information
with open_text('ensembl_res... | 25.962963 | 83 | 0.697575 |
1d0aae9cbf6d13a1b52cc46c3e336d0bd213e90d | 2,710 | py | Python | torchvision_models/segmentation/deeplab_vgg.py | ozcell/pytorch-auto-drive | f1c2fd223cf7d307a3968fe671d0271b03ced39c | [
"BSD-3-Clause"
] | 1 | 2021-04-12T22:59:48.000Z | 2021-04-12T22:59:48.000Z | torchvision_models/segmentation/deeplab_vgg.py | ozcell/pytorch-auto-drive | f1c2fd223cf7d307a3968fe671d0271b03ced39c | [
"BSD-3-Clause"
] | null | null | null | torchvision_models/segmentation/deeplab_vgg.py | ozcell/pytorch-auto-drive | f1c2fd223cf7d307a3968fe671d0271b03ced39c | [
"BSD-3-Clause"
] | null | null | null | # jcdubron/scnn_pytorch
import torch.nn as nn
import torchvision
from collections import OrderedDict
from ..lane_detection.common_models import SpatialConv, SimpleLaneExist
# Modified VGG16 backbone in DeepLab-LargeFOV
class VGG16(nn.Module):
def __init__(self, pretained=True):
super(VGG16, self).__init__... | 31.149425 | 103 | 0.597786 |
1d0b03e54399d1f812e93a72332e640965b2d7c8 | 152 | py | Python | dcss_stats/__init__.py | oschwab/dcss_stats | 33bd337277ab01289a541864032350d46acca885 | [
"Unlicense"
] | 3 | 2017-10-02T21:45:49.000Z | 2021-12-24T02:11:50.000Z | dcss_stats/__init__.py | oschwab/dcss_stats | 33bd337277ab01289a541864032350d46acca885 | [
"Unlicense"
] | 2 | 2017-10-04T18:44:50.000Z | 2017-10-05T11:11:36.000Z | dcss_stats/__init__.py | oschwab/dcss_stats | 33bd337277ab01289a541864032350d46acca885 | [
"Unlicense"
] | null | null | null | """dcss_stats - Statistics tool for Dungeon Crawl Stone Soup"""
__version__ = '0.0.7'
__author__ = 'OSchwab <olivier.schwab72@gmail.com>'
__all__ = []
| 25.333333 | 63 | 0.717105 |
1d0b2412a227b84f09df9e7586b445838d499813 | 970 | py | Python | __init__.py | SIIS-cloud/ivp | 964aef735ffad2d647766936648cce8a1ac55116 | [
"Apache-2.0"
] | null | null | null | __init__.py | SIIS-cloud/ivp | 964aef735ffad2d647766936648cce8a1ac55116 | [
"Apache-2.0"
] | null | null | null | __init__.py | SIIS-cloud/ivp | 964aef735ffad2d647766936648cce8a1ac55116 | [
"Apache-2.0"
] | null | null | null | # The Integrity Verification Proxy (IVP) additions are ...
#
# Copyright (c) 2012 The Pennsylvania State University
# Systems and Internet Infrastructure Security Laboratory
#
# they were developed by:
#
# Joshua Schiffman <jschiffm@cse.psu.edu>
# Hayawardh Vijayakumar <huv101@cse.psu.edu>
# Trent Jaeger <tjaeger... | 31.290323 | 77 | 0.727835 |
1d0b3c1696a3a16daffd2c39f3598c46a021f59c | 971 | py | Python | src/oscar/apps/basket/managers.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | src/oscar/apps/basket/managers.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | src/oscar/apps/basket/managers.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from django.db import models
class OpenBasketManager(models.Manager):
"""For searching/creating OPEN baskets only."""
status_filter = "Open"
def get_queryset(self):
return super(OpenBasketManager, self).get_queryset().filter(
status=self.status_filter)
def get_or_creat... | 31.322581 | 79 | 0.661174 |
1d0b64165729768fde0a4bd43a4f3561890e57de | 3,685 | py | Python | sasmodels/models/star_polymer.py | zattala/sasmodels | a547aa73d43145b3bd34770b0ea27ba8882170a3 | [
"BSD-3-Clause"
] | null | null | null | sasmodels/models/star_polymer.py | zattala/sasmodels | a547aa73d43145b3bd34770b0ea27ba8882170a3 | [
"BSD-3-Clause"
] | null | null | null | sasmodels/models/star_polymer.py | zattala/sasmodels | a547aa73d43145b3bd34770b0ea27ba8882170a3 | [
"BSD-3-Clause"
] | null | null | null | r"""
Definition
----------
Calcuates the scattering from a simple star polymer with f equal Gaussian coil
arms. A star being defined as a branched polymer with all the branches
emanating from a common central (in the case of this model) point. It is
derived as a special case of on the Benoit model for general branche... | 34.12037 | 120 | 0.625237 |
1d0b67050a94c9c91fe47898c9eb7b6c72779f79 | 4,961 | py | Python | previews.py | IntermodulationProducts/vips | 8ed2ad3db74e1e6ab312ab5e5605a05377779bb1 | [
"MIT"
] | null | null | null | previews.py | IntermodulationProducts/vips | 8ed2ad3db74e1e6ab312ab5e5605a05377779bb1 | [
"MIT"
] | null | null | null | previews.py | IntermodulationProducts/vips | 8ed2ad3db74e1e6ab312ab5e5605a05377779bb1 | [
"MIT"
] | null | null | null | # Authored by Johan Blomberg and Gustav Grännsjö, 2020
"""
A collection of functions for ViPS's preview functionality.
"""
import numpy as np
from vivace import pulsed
import utils
import templates
def get_template_preview(vips, quant):
"""
Construct a wave based on the envelope template
indicated by t... | 38.161538 | 98 | 0.682725 |
1d0b6927a786662abf8a2fc74b27f49779cf729c | 370 | py | Python | src/quotes.py | Evalle/bm-cat | f3ab01eebc32d162e3805b73bd8904a97cc92ea3 | [
"MIT"
] | 5 | 2018-10-26T13:19:23.000Z | 2020-10-16T15:12:54.000Z | src/quotes.py | Evalle/bm-cat | f3ab01eebc32d162e3805b73bd8904a97cc92ea3 | [
"MIT"
] | 32 | 2018-10-24T18:53:48.000Z | 2018-12-03T14:33:22.000Z | src/quotes.py | Evalle/bm-cat | f3ab01eebc32d162e3805b73bd8904a97cc92ea3 | [
"MIT"
] | 3 | 2018-10-24T22:48:49.000Z | 2018-10-26T13:19:30.000Z | #!/usr/bin/env python3
import random
# For now, quotes are stored in txt file
def get_random(cache):
"""
get_random(cache) - returns random quota from cache
Arguments:
- cache - global cache
"""
try:
return random.choice(list(cache.get('quotes').values()))
except IndexError:
... | 19.473684 | 64 | 0.637838 |
1d0b70e746e65494c13a8d2e7795367240cb9475 | 4,307 | py | Python | oscar/lib/python2.7/site-packages/unidecode/x024.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/unidecode/x024.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/unidecode/x024.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | data = (
'', # 0x00
'', # 0x01
'', # 0x02
'', # 0x03
'', # 0x04
'', # 0x05
'', # 0x06
'', # 0x07
'', # 0x08
'', # 0x09
'', # 0x0a
'', # 0x0b
'', # 0x0c
'', # 0x0d
'', # 0x0e
'', # 0x0f
'', # 0x10
'', # 0x11
'', # 0x12
'', # 0x13
'', # 0... | 16.629344 | 18 | 0.286046 |
1d0b77e7efe5ce04e5ac99bc41e4cc2c01460774 | 2,536 | py | Python | oscar/lib/python2.7/site-packages/django/utils/version.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/utils/version.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/utils/version.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
import datetime
import os
import subprocess
from django.utils.lru_cache import lru_cache
def get_version(version=None):
"Returns a PEP 440-compliant version number from VERSION."
version = get_complete_version(version)
# Now build the two parts of th... | 30.926829 | 80 | 0.636435 |
1d0ba2cd56b51b4beb0e0d3ed47ca684a4a9ac68 | 3,332 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2016_12_01/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2016_12_01/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2016_12_01/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # 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 ... | 48.289855 | 181 | 0.697179 |
1d0c1ae3ebc11abbe7d917bfa7d1d46cb0e19d63 | 1,970 | py | Python | deepmath/deephol/jup_prover/default/prove_one.py | aahadley/deepmath | ad4426323be64bacd4a6727f1e48f4e54ee1e259 | [
"Apache-2.0"
] | 8 | 2019-12-12T19:13:28.000Z | 2021-08-08T09:29:35.000Z | deepmath/deephol/jup_prover/default/prove_one.py | aahadley/deepmath | ad4426323be64bacd4a6727f1e48f4e54ee1e259 | [
"Apache-2.0"
] | null | null | null | deepmath/deephol/jup_prover/default/prove_one.py | aahadley/deepmath | ad4426323be64bacd4a6727f1e48f4e54ee1e259 | [
"Apache-2.0"
] | 2 | 2020-10-02T11:55:03.000Z | 2021-09-26T23:53:25.000Z | from deepmath.deephol import prover_util
import tensorflow as tf
def _prove_one(self, tree, task):
"""Searches for a proof via BFS.
Args:
tree: Search tree with a single goal node to be proved.
task: ProverTask to be performed.
Returns:
None on success and error message on failure.
... | 41.914894 | 80 | 0.641624 |
1d0c24ef12224b56047a08c841eca15af8e41698 | 1,682 | py | Python | src/esm/models/catalog.py | elastest/elastest-service-manager | e0adbe383eada746a5ac103ee7938791c8656633 | [
"Apache-2.0"
] | 2 | 2017-06-15T21:32:07.000Z | 2020-01-08T09:08:33.000Z | src/esm/models/catalog.py | elastest/elastest-service-manager | e0adbe383eada746a5ac103ee7938791c8656633 | [
"Apache-2.0"
] | 20 | 2017-06-12T10:57:45.000Z | 2020-01-08T08:22:31.000Z | src/esm/models/catalog.py | elastest/elastest-service-manager | e0adbe383eada746a5ac103ee7938791c8656633 | [
"Apache-2.0"
] | 8 | 2017-06-07T10:05:47.000Z | 2017-12-12T15:31:41.000Z | # coding: utf-8
from __future__ import absolute_import
from typing import List
from esm.models.service_type import ServiceType
from .base_model_ import Model
from ..util import deserialize_model
class Catalog(Model):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not e... | 24.376812 | 80 | 0.602854 |
1d0c3c7639ac84b9ba0e2fe3ca8bb811c68e1a52 | 535 | py | Python | onadata/apps/viewer/management/commands/import.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 87 | 2015-02-10T23:36:28.000Z | 2022-01-31T00:51:10.000Z | onadata/apps/viewer/management/commands/import.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 443 | 2015-04-28T18:50:25.000Z | 2022-03-31T03:29:43.000Z | onadata/apps/viewer/management/commands/import.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 122 | 2015-01-13T16:27:44.000Z | 2022-01-24T09:35:56.000Z | # coding: utf-8
#!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4 coding=utf-8
import os
from django.core.management.base import BaseCommand
from django.core.management import call_command
from django.utils.translation import ugettext_lazy
class Command(BaseCommand):
help = ugettext_lazy("Import ODK forms and i... | 29.722222 | 73 | 0.717757 |
1d0c492a4a5c0733d6c82cde374b2542a9670b13 | 23,514 | py | Python | samurai/mcmc_physical.py | jlustigy/samurai | ed46e45600956581c94ae44d820e06c35c464962 | [
"MIT"
] | 1 | 2021-01-05T07:27:40.000Z | 2021-01-05T07:27:40.000Z | samurai/mcmc_physical.py | jlustigy/samurai | ed46e45600956581c94ae44d820e06c35c464962 | [
"MIT"
] | null | null | null | samurai/mcmc_physical.py | jlustigy/samurai | ed46e45600956581c94ae44d820e06c35c464962 | [
"MIT"
] | null | null | null | import matplotlib as mpl
import platform
if platform.system() == "Linux":
mpl.use('Agg')
import matplotlib.pyplot as plt
from matplotlib import gridspec
from matplotlib import rc
import numpy as np
import healpy as hp
import emcee
from scipy.optimize import minimize
import sys, getopt
import corner
import datetime... | 33.11831 | 116 | 0.585013 |
1d0c74a0143065ca01f705d3e78e93df630d3b1f | 750 | py | Python | rhucrl/policy/utilities.py | sebascuri/rhucrl | 27663e1302f3bbc636dff28495c6f2667bb7c1da | [
"MIT"
] | 1 | 2021-11-19T11:46:48.000Z | 2021-11-19T11:46:48.000Z | rhucrl/policy/utilities.py | sebascuri/rhucrl | 27663e1302f3bbc636dff28495c6f2667bb7c1da | [
"MIT"
] | 1 | 2021-11-22T07:48:03.000Z | 2021-11-22T07:48:03.000Z | rhucrl/policy/utilities.py | sebascuri/rhucrl | 27663e1302f3bbc636dff28495c6f2667bb7c1da | [
"MIT"
] | 1 | 2022-03-26T10:18:01.000Z | 2022-03-26T10:18:01.000Z | """Python Script Template."""
class ProtagonistMode(object):
"""Context Manager to set the policy to be protagonist."""
def __init__(self, policy, protagonist=True):
self.policy = policy
self.old = self.policy.protagonist
self.protagonist = protagonist
def __enter__(self):
... | 28.846154 | 62 | 0.674667 |
1d0c86ebe1936eb8df708384912b546067ddeb3e | 244 | py | Python | src/pylie/hmanifold/__init__.py | jakobsen/diffpy | 50aed98bfe0d206d9b9227f35424c1a4463c38cf | [
"MIT"
] | 4 | 2021-05-06T12:00:56.000Z | 2021-10-08T22:18:43.000Z | src/pylie/hmanifold/__init__.py | jakobsen/diffpy | 50aed98bfe0d206d9b9227f35424c1a4463c38cf | [
"MIT"
] | 2 | 2021-01-22T12:37:30.000Z | 2021-01-22T12:37:51.000Z | src/pylie/hmanifold/__init__.py | jakobsen/pylie | 50aed98bfe0d206d9b9227f35424c1a4463c38cf | [
"MIT"
] | null | null | null | from .hmanifold import HomogenousManifold
from .hmnsphere import HomogenousSphere
from .hmheavytop import HeavyTop
from .hmpendulum import SphericalPendulum
__all__ = ["HomogenousManifold", "HomogenousSphere", "HeavyTop", "SphericalPendulum"]
| 34.857143 | 85 | 0.831967 |
1d0c9281cd7d42e372f28f945d30e71777dd07dd | 2,188 | py | Python | .leetcode/392.is-subsequence.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/392.is-subsequence.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/392.is-subsequence.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=392 lang=python3
#
# [392] Is Subsequence
#
# https://leetcode.com/problems/is-subsequence/description/
#
# algorithms
# Easy (49.80%)
# Likes: 2926
# Dislikes: 251
# Total Accepted: 327.8K
# Total Submissions: 658.1K
# Testcase Example: '"abc"\n"ahbgdc"'
#
# Given two strings s and t, retu... | 21.038462 | 79 | 0.594607 |
1d0c954659cbebdd53ae399c42b42c165e8a2bca | 3,960 | py | Python | rest_models/storage.py | matheusmatos/django-rest-models | 18da71bd921064279b03129aac38d3fbb9e29ae2 | [
"BSD-2-Clause"
] | 61 | 2016-12-05T09:09:49.000Z | 2022-03-09T13:23:06.000Z | rest_models/storage.py | matheusmatos/django-rest-models | 18da71bd921064279b03129aac38d3fbb9e29ae2 | [
"BSD-2-Clause"
] | 51 | 2016-12-07T10:19:52.000Z | 2022-03-11T23:35:23.000Z | rest_models/storage.py | matheusmatos/django-rest-models | 18da71bd921064279b03129aac38d3fbb9e29ae2 | [
"BSD-2-Clause"
] | 18 | 2017-03-11T18:07:17.000Z | 2022-03-09T13:14:40.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
import logging
import os
import threading
import unidecode
from django.core.files.base import ContentFile
from django.core.files.storage import Storage
from django.utils.deconstruct import deconstructible
from django.utils.http import url... | 32.459016 | 105 | 0.638636 |
1d0c9af2070da92c5461619e72e5411a06873572 | 2,316 | py | Python | stests/generators/wg_110/p3s1_refund_users.py | goral09/stests | 4de26485535cadf1b708188a7133a976536ccba3 | [
"Apache-2.0"
] | 4 | 2020-03-10T15:28:17.000Z | 2021-10-02T11:41:17.000Z | stests/generators/wg_110/p3s1_refund_users.py | goral09/stests | 4de26485535cadf1b708188a7133a976536ccba3 | [
"Apache-2.0"
] | 1 | 2020-03-25T11:31:44.000Z | 2020-03-25T11:31:44.000Z | stests/generators/wg_110/p3s1_refund_users.py | goral09/stests | 4de26485535cadf1b708188a7133a976536ccba3 | [
"Apache-2.0"
] | 9 | 2020-02-25T18:43:42.000Z | 2021-08-10T17:08:42.000Z | import typing
import dramatiq
from stests.core.types.chain import DeployType
from stests.core.types.infra import NodeIdentifier
from stests.core.types.orchestration import ExecutionContext
from stests.core.utils.exceptions import IgnoreableAssertionError
from stests.generators.utils import accounts
from stests.generat... | 34.567164 | 113 | 0.734456 |
1d0cc0197a5fbeb206f0893de0ca5f80205e613e | 11,840 | py | Python | api-docs/source/conf.py | gkprow-runsafe/binaryninja-api | 8f9004fa3cba785ec67909e9f96498b00086a3a7 | [
"MIT"
] | null | null | null | api-docs/source/conf.py | gkprow-runsafe/binaryninja-api | 8f9004fa3cba785ec67909e9f96498b00086a3a7 | [
"MIT"
] | null | null | null | api-docs/source/conf.py | gkprow-runsafe/binaryninja-api | 8f9004fa3cba785ec67909e9f96498b00086a3a7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Binary Ninja Documentation build configuration file, created by
# sphinx-quickstart on Tue Jun 28 23:02:45 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
... | 29.674185 | 382 | 0.698902 |
1d0cf7b200883a440d88142b1baf1d913216c2f7 | 507 | py | Python | tests/check_tag.py | PY-GZKY/aiorq | 23080b8098438d58ee3c736789452b8a55a7946e | [
"MIT"
] | 6 | 2021-11-16T04:07:48.000Z | 2022-03-18T09:15:09.000Z | tests/check_tag.py | PY-GZKY/aiorq | 23080b8098438d58ee3c736789452b8a55a7946e | [
"MIT"
] | null | null | null | tests/check_tag.py | PY-GZKY/aiorq | 23080b8098438d58ee3c736789452b8a55a7946e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import sys
from aiorq.version import __version__
git_tag = os.getenv('TRAVIS_TAG')
if git_tag:
if git_tag.lower().lstrip('v') != str(__version__).lower():
print('✖ "TRAVIS_TAG" environment variable does not match aiorq.version: "%s" vs. "%s"' % (git_tag, __version__))
... | 31.6875 | 121 | 0.662722 |
1d0cf953b12cfbebe2f74bd41bdef9d47506b993 | 576 | py | Python | energyquantified/time/timezone.py | energyquantified/eq-python-client | 3ca8423ae29c4a3dbd8f6289ab76a64b21dabf1c | [
"Apache-2.0"
] | 4 | 2021-03-02T10:08:37.000Z | 2021-11-12T08:18:18.000Z | energyquantified/time/timezone.py | energyquantified/eq-python-client | 3ca8423ae29c4a3dbd8f6289ab76a64b21dabf1c | [
"Apache-2.0"
] | 23 | 2020-07-22T13:41:20.000Z | 2021-10-12T09:03:27.000Z | energyquantified/time/timezone.py | energyquantified/eq-python-client | 3ca8423ae29c4a3dbd8f6289ab76a64b21dabf1c | [
"Apache-2.0"
] | 2 | 2020-10-01T20:18:08.000Z | 2021-03-02T10:08:41.000Z | import pytz
import tzlocal
from ._timezone_gas import _build_europe_gas_day_tzinfo
# Look up the most used time zones in the European power markets
# from the pytz library
UTC = pytz.UTC
CET = pytz.timezone("CET")
WET = pytz.timezone("WET")
EET = pytz.timezone("EET")
TRT = pytz.timezone("Europe/Istanbul")
GAS_DAY =... | 18 | 64 | 0.715278 |
1d0d1b35b167c8a7cb0470bea4d305091cd5bcf6 | 1,506 | py | Python | inputs/bond_distance.py | nbraunsc/MIM | 587ae79b0ec76c20af6235a68c85ed15f2cc7155 | [
"BSD-3-Clause"
] | null | null | null | inputs/bond_distance.py | nbraunsc/MIM | 587ae79b0ec76c20af6235a68c85ed15f2cc7155 | [
"BSD-3-Clause"
] | null | null | null | inputs/bond_distance.py | nbraunsc/MIM | 587ae79b0ec76c20af6235a68c85ed15f2cc7155 | [
"BSD-3-Clause"
] | null | null | null | import os
import numpy as np
import sys
from sys import argv
import xml.etree.ElementTree as ET
opt_coords = sys.argv[1]
cml = sys.argv[2]
with open(opt_coords) as f:
lines = f.readlines()
lines_new = lines[2:]
tree = ET.parse(cml)
root = tree.getroot()
#parse the cml for C-C bonds
rows = []
for node in root:
... | 24.290323 | 119 | 0.615538 |
1d0d1bd2efa1b0474041c5fc90cf8f784d1e38d4 | 5,621 | py | Python | dataset/utils.py | JiarunLiu/Co-correcting | 4e3ca4951de5d73ca812bbbcfe666273082ff2fd | [
"Apache-2.0"
] | 19 | 2020-10-29T14:22:58.000Z | 2022-03-31T13:45:56.000Z | dataset/utils.py | JiarunLiu/Co-correcting | 4e3ca4951de5d73ca812bbbcfe666273082ff2fd | [
"Apache-2.0"
] | null | null | null | dataset/utils.py | JiarunLiu/Co-correcting | 4e3ca4951de5d73ca812bbbcfe666273082ff2fd | [
"Apache-2.0"
] | 7 | 2021-09-15T05:16:32.000Z | 2022-02-02T01:31:07.000Z | from __future__ import print_function
import os
import os.path
import hashlib
import errno
import numpy as np
from numpy.testing import assert_array_almost_equal
def check_integrity(fpath, md5):
if not os.path.isfile(fpath):
return False
md5o = hashlib.md5()
with open(fpath, 'rb') as f:
# r... | 31.227778 | 141 | 0.601139 |
1d0d3edd04616187b7d0b3b17bc17133ff46de8f | 16,831 | py | Python | venv/lib/python2.7/site-packages/pytube/api.py | EmadElmogy/youtubeCrawler | 3bd3bafc3deb3aaa44ba7685dd490725f585bb22 | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/pytube/api.py | EmadElmogy/youtubeCrawler | 3bd3bafc3deb3aaa44ba7685dd490725f585bb22 | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/pytube/api.py | EmadElmogy/youtubeCrawler | 3bd3bafc3deb3aaa44ba7685dd490725f585bb22 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import json
import logging
import re
import warnings
from collections import defaultdict
from .compat import parse_qs
from .compat import unquote
from .compat import urlopen
from .compat import urlparse
from .exceptions import AgeRes... | 36.430736 | 79 | 0.556414 |
1d0d3f7c65bb3fff6980f85b35b832735a23b5c6 | 7,120 | py | Python | catboost/python-package/mk_wheel.py | r1nadeg/04_catboost | 6755bbbd1496540b92ded57eea1974f64bef87c5 | [
"Apache-2.0"
] | null | null | null | catboost/python-package/mk_wheel.py | r1nadeg/04_catboost | 6755bbbd1496540b92ded57eea1974f64bef87c5 | [
"Apache-2.0"
] | null | null | null | catboost/python-package/mk_wheel.py | r1nadeg/04_catboost | 6755bbbd1496540b92ded57eea1974f64bef87c5 | [
"Apache-2.0"
] | 1 | 2018-08-06T14:13:12.000Z | 2018-08-06T14:13:12.000Z | from __future__ import print_function
import subprocess
import shutil
import os
import sys
import platform
import tempfile
sys.dont_write_bytecode = True
PL_LINUX = 'manylinux1_x86_64'
PL_MACOS = 'macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64'
PL_WIN = 'win_amd64'
c... | 33.116279 | 170 | 0.654494 |
1d0d43c3c4b05c45ca560d5cc5e91a1ab3a3be29 | 667 | py | Python | dipy/workflows/tests/test_utils.py | martcous/dipy | 6bff5655f03db19bde5aa951ffb91987983a889b | [
"MIT"
] | null | null | null | dipy/workflows/tests/test_utils.py | martcous/dipy | 6bff5655f03db19bde5aa951ffb91987983a889b | [
"MIT"
] | null | null | null | dipy/workflows/tests/test_utils.py | martcous/dipy | 6bff5655f03db19bde5aa951ffb91987983a889b | [
"MIT"
] | null | null | null | import numpy.testing as npt
from os.path import join
from dipy.workflows.utils import choose_create_out_dir
from nibabel.tmpdirs import InTemporaryDirectory
def test_choose_create_out_dir():
with InTemporaryDirectory() as tmp_dir:
root_path = join(tmp_dir, 'fake_file.nii')
result_path = choose_cre... | 35.105263 | 67 | 0.742129 |
1d0d6a57522adcf0a38579f5e3849230c83228a6 | 7,701 | py | Python | RNNS/loader/loader.py | CenIII/Text-style-transfer-DeleteRetrieve | 2b7aa017765dcae65b42fc94d3ccaddc57ac8661 | [
"MIT"
] | null | null | null | RNNS/loader/loader.py | CenIII/Text-style-transfer-DeleteRetrieve | 2b7aa017765dcae65b42fc94d3ccaddc57ac8661 | [
"MIT"
] | null | null | null | RNNS/loader/loader.py | CenIII/Text-style-transfer-DeleteRetrieve | 2b7aa017765dcae65b42fc94d3ccaddc57ac8661 | [
"MIT"
] | null | null | null | import torch
from torch.utils.data import Dataset, DataLoader
import pickle
from utils import subset, seq_collate, StyleMarker
import numpy as np
class YelpDataset(Dataset):
"""Custom dataset inherit torch.utils.data.Dataset.
See https://pytorch.org/tutorials/beginner/data_loading_tutorial.html for more informat... | 36.49763 | 133 | 0.696143 |
1d0d73c5aa08367fa33fef137745ba55fb0edf47 | 5,201 | py | Python | require_license/tests/settings.py | collab-project/django-require-license | 27c9ec2e79014d5b55cad56745fd4da1601de5e7 | [
"MIT"
] | 2 | 2015-04-01T00:04:01.000Z | 2016-07-13T13:00:35.000Z | require_license/tests/settings.py | collab-project/django-require-license | 27c9ec2e79014d5b55cad56745fd4da1601de5e7 | [
"MIT"
] | 2 | 2017-04-10T19:53:23.000Z | 2019-07-09T21:26:06.000Z | require_license/tests/settings.py | collab-project/django-require-license | 27c9ec2e79014d5b55cad56745fd4da1601de5e7 | [
"MIT"
] | 4 | 2016-05-25T09:40:32.000Z | 2022-03-07T07:02:01.000Z | # -*- coding: utf-8 -*-
# Copyright Collab 2015-2016
# See LICENSE for details.
import os
from datetime import datetime, date
DEBUG = True
SITE_ID = 1
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
TEST_ROOT = os.path.dirname(__file__)
INSTALLED_... | 31.521212 | 79 | 0.61046 |
1d0d84747997f77c09bc5f9d59c16a5d2066f1f8 | 2,907 | bzl | Python | internal_deps.bzl | aspect-build/rules_container | dc3d83909940f242c1edb28e109e820a483c5c1f | [
"Apache-2.0"
] | 3 | 2022-02-14T22:18:11.000Z | 2022-03-26T15:08:30.000Z | internal_deps.bzl | aspect-build/rules_container | dc3d83909940f242c1edb28e109e820a483c5c1f | [
"Apache-2.0"
] | 4 | 2022-02-01T15:49:51.000Z | 2022-02-17T18:46:53.000Z | internal_deps.bzl | aspect-build/rules_container | dc3d83909940f242c1edb28e109e820a483c5c1f | [
"Apache-2.0"
] | 2 | 2021-12-13T20:26:59.000Z | 2022-01-18T03:07:25.000Z | """Our "development" dependencies
Users should *not* need to install these. If users see a load()
statement from these, that's a bug in our distribution.
"""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
def rules_container_interna... | 39.821918 | 132 | 0.671483 |
1d0db98ce1c1071c45ee0f50546280f5560f0b70 | 91 | py | Python | ServiceConfig.py | AndySchuetz/homemade_pi | fc828ce747cb90d01687cf0dc702aac4b29f5b46 | [
"MIT"
] | null | null | null | ServiceConfig.py | AndySchuetz/homemade_pi | fc828ce747cb90d01687cf0dc702aac4b29f5b46 | [
"MIT"
] | null | null | null | ServiceConfig.py | AndySchuetz/homemade_pi | fc828ce747cb90d01687cf0dc702aac4b29f5b46 | [
"MIT"
] | null | null | null | #
#
# Web service default config module
#
#
#
#
#
#
config = { 'DEBUG' = False } | 8.272727 | 38 | 0.494505 |
1d0dbb950afff8ea09c2c30d98b7767f7f11a8cf | 1,926 | py | Python | tensorflow/python/framework/random_seed_test.py | gnoses/TensorFlow | 63a21e054007d86269ed1ad0145ebce04ee57a81 | [
"Apache-2.0"
] | 65 | 2016-09-26T01:30:40.000Z | 2021-08-11T17:00:41.000Z | tensorflow/python/framework/random_seed_test.py | amineferchichi/tensorflow | 4ac9c09d5ca57a03b8daa5fb9e295947b1619854 | [
"Apache-2.0"
] | 5 | 2017-02-21T08:37:52.000Z | 2017-03-29T05:46:05.000Z | tensorflow/python/framework/random_seed_test.py | amineferchichi/tensorflow | 4ac9c09d5ca57a03b8daa5fb9e295947b1619854 | [
"Apache-2.0"
] | 10 | 2017-03-28T06:16:10.000Z | 2020-08-25T09:03:44.000Z | # Copyright 2015 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... | 37.764706 | 80 | 0.63136 |
1d0dc8f68ab6f9f86e4fa3a63c864bce7932c821 | 163 | py | Python | src/onevision/models/enhancement/zerodce/__init__.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | 2 | 2022-03-28T09:46:38.000Z | 2022-03-28T14:12:32.000Z | src/onevision/models/enhancement/zerodce/__init__.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | src/onevision/models/enhancement/zerodce/__init__.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
"""
from __future__ import annotations
from .configs import *
from .zerodce import *
from .zerodcepp import *
| 13.583333 | 34 | 0.668712 |
1d0e0641d243b81bf01fea47e777a23d5e21b3c9 | 1,374 | py | Python | avro_to_python/utils/avro/types/reference.py | Usiel/avro-to-python | b76e475017575f4d4b58ad2218962df6da9e2b81 | [
"MIT"
] | null | null | null | avro_to_python/utils/avro/types/reference.py | Usiel/avro-to-python | b76e475017575f4d4b58ad2218962df6da9e2b81 | [
"MIT"
] | null | null | null | avro_to_python/utils/avro/types/reference.py | Usiel/avro-to-python | b76e475017575f4d4b58ad2218962df6da9e2b81 | [
"MIT"
] | null | null | null | """ function for handling referenced names in records files """
from avro_to_python.classes.field import Field
from avro_to_python.classes.reference import Reference
from avro_to_python.utils.avro.helpers import split_namespace
def _reference_type(field: dict, references: list) -> Field:
""" Should take refere... | 29.869565 | 103 | 0.649927 |
1d0e183755ea07a0c80752bab68fc3e962675535 | 3,163 | py | Python | qiita_db/test/test_reference.py | Jorge-C/qiita | cc502083cdbcf8654f1b467c6b5f0fb9fe6ab5a4 | [
"BSD-3-Clause"
] | null | null | null | qiita_db/test/test_reference.py | Jorge-C/qiita | cc502083cdbcf8654f1b467c6b5f0fb9fe6ab5a4 | [
"BSD-3-Clause"
] | null | null | null | qiita_db/test/test_reference.py | Jorge-C/qiita | cc502083cdbcf8654f1b467c6b5f0fb9fe6ab5a4 | [
"BSD-3-Clause"
] | null | null | null | # -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | 37.211765 | 79 | 0.578248 |
1d0e22f1b528d4c49358430f79c7cd7b33e96b73 | 4,254 | py | Python | tests/test_xltypes.py | ckp95/xlcalculator | 8f3f04a2a0a2ecb12c3d5837a5b13519137ae427 | [
"MIT"
] | 54 | 2020-04-26T09:18:29.000Z | 2022-03-30T08:47:45.000Z | tests/test_xltypes.py | st-lo/xlcalculator | 19190ec90e948b7ab1eceb06448b96cc1728bc51 | [
"MIT"
] | 41 | 2020-05-04T04:12:36.000Z | 2022-01-31T02:41:05.000Z | tests/test_xltypes.py | st-lo/xlcalculator | 19190ec90e948b7ab1eceb06448b96cc1728bc51 | [
"MIT"
] | 21 | 2020-05-21T20:49:23.000Z | 2022-02-20T14:15:56.000Z | import unittest
from xlcalculator import xltypes
from xlcalculator.tokenizer import f_token
from . import testing
class XLFormulaTest(testing.XlCalculatorTestCase):
def test_formula(self):
self.assertEqual(
xltypes.XLFormula('=SUM(A1:B1)').formula, '=SUM(A1:B1)')
def test_tokens(self):... | 33.761905 | 78 | 0.579925 |
1d0e46b105ceecf89b28e0539cc6adbcb62bc60a | 9,436 | py | Python | trac/web/tests/api.py | arielnetworks/trac | 1a96a3c39961a8952358cb8c64ccf9e94079c26b | [
"BSD-3-Clause"
] | null | null | null | trac/web/tests/api.py | arielnetworks/trac | 1a96a3c39961a8952358cb8c64ccf9e94079c26b | [
"BSD-3-Clause"
] | null | null | null | trac/web/tests/api.py | arielnetworks/trac | 1a96a3c39961a8952358cb8c64ccf9e94079c26b | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2005-2013 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.edgewall.org/wiki/TracLicense.
#
# This software consi... | 39.814346 | 92 | 0.625689 |
1d0e534af0cfce7a51b94ed62539fd468ec85389 | 4,914 | py | Python | scripts/packet_monitoring.py | feedmari/linux-network-monitor | 698e93bea9c20023bb69fee8f593d85b9dbac08a | [
"MIT"
] | null | null | null | scripts/packet_monitoring.py | feedmari/linux-network-monitor | 698e93bea9c20023bb69fee8f593d85b9dbac08a | [
"MIT"
] | null | null | null | scripts/packet_monitoring.py | feedmari/linux-network-monitor | 698e93bea9c20023bb69fee8f593d85b9dbac08a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#title : packet_monitoring.py
#description : This program is used in order to monitor the network speed in real time.
#author : Federico Marinelli
#bash_version : 4.1.5(1)-release
#==============================================================================
import ... | 33.428571 | 220 | 0.509361 |
1d0e785bf0cd0ec96d0c4df7a3d2f37f10154a23 | 496 | py | Python | Chapter04/lxml/get_debian_version.py | yangwawa0323/Learning-Python-Networking-Second-Edition | 5460fe4fb6acc5d0df19bf36e52ac09e9a11eb8b | [
"MIT"
] | 52 | 2018-12-17T19:33:06.000Z | 2022-03-25T18:14:02.000Z | Chapter04/lxml/get_debian_version.py | barretthugh/Learning-Python-Networking-Second-Edition | 0f00b8b20c1c85e76754e47113dff8ca9e99d5ca | [
"MIT"
] | null | null | null | Chapter04/lxml/get_debian_version.py | barretthugh/Learning-Python-Networking-Second-Edition | 0f00b8b20c1c85e76754e47113dff8ca9e99d5ca | [
"MIT"
] | 38 | 2018-12-18T09:08:43.000Z | 2022-02-06T02:53:05.000Z | #!/usr/bin/env python3
import re
import requests
from lxml.etree import HTML
response = requests.get('https://www.debian.org/releases/stable/index.en.html')
root = HTML(response.content)
title_text = root.find('head').find('title').text
if re.search('\u201c(.*)\u201d', title_text):
release = re.search('\u201c(.*)\... | 31 | 79 | 0.695565 |
1d0eb1b29211445ea520ea11431080ddc5205506 | 2,419 | py | Python | external/snake-0.3/snake/tests/test_convergence.py | mesnardo/cuIBM | 0b63f86c58e93e62f9dc720c08510cc88b10dd04 | [
"MIT"
] | 67 | 2015-01-25T18:33:39.000Z | 2022-02-17T17:50:00.000Z | external/snake-0.3/snake/tests/test_convergence.py | mesnardo/cuIBM | 0b63f86c58e93e62f9dc720c08510cc88b10dd04 | [
"MIT"
] | 20 | 2015-01-25T05:29:30.000Z | 2018-05-14T02:07:03.000Z | external/snake-0.3/snake/tests/test_convergence.py | mesnardo/cuIBM | 0b63f86c58e93e62f9dc720c08510cc88b10dd04 | [
"MIT"
] | 39 | 2015-01-22T16:32:11.000Z | 2022-02-17T08:17:09.000Z | """
Tests functions of the module `convergence`.
"""
import unittest
import numpy
from snake.field import Field
from snake import convergence
atol = 1.0E-12
class ConvergenceTest(unittest.TestCase):
def __init__(self, *args, **kwargs):
super(ConvergenceTest, self).__init__(*args, **kwargs)
self.generate... | 36.651515 | 78 | 0.538239 |
1d0ef873fdbf4074ee8d27592b11981a5e67c189 | 1,070 | py | Python | impbot/handlers/regex.py | rlazarus/impbot | 9c9b0e0d84c7badd1786813bc5e19b20175f5d5b | [
"MIT"
] | null | null | null | impbot/handlers/regex.py | rlazarus/impbot | 9c9b0e0d84c7badd1786813bc5e19b20175f5d5b | [
"MIT"
] | null | null | null | impbot/handlers/regex.py | rlazarus/impbot | 9c9b0e0d84c7badd1786813bc5e19b20175f5d5b | [
"MIT"
] | null | null | null | import collections
import re
import sre_compile
from typing import Optional, Mapping
from impbot.core import base
class RegexHandler(base.Handler[base.Message]):
def __init__(self, patterns: Mapping[str, str]) -> None:
super().__init__()
try:
self.patterns = {re.compile(k): v for k, v... | 32.424242 | 80 | 0.627103 |
1d0efcff204cfc0ff8f5ac9b0a440725b6cfba5a | 1,612 | py | Python | examples/no_output_example.py | ttracx/ChatterBot | ec6cb0ae09304ddac7bef9c3dcf9b148b7568d76 | [
"BSD-3-Clause"
] | 1 | 2016-05-21T21:26:15.000Z | 2016-05-21T21:26:15.000Z | examples/no_output_example.py | ttracx/ChatterBot | ec6cb0ae09304ddac7bef9c3dcf9b148b7568d76 | [
"BSD-3-Clause"
] | null | null | null | examples/no_output_example.py | ttracx/ChatterBot | ec6cb0ae09304ddac7bef9c3dcf9b148b7568d76 | [
"BSD-3-Clause"
] | null | null | null | from chatterbot import ChatBot
# Create a new instance of a ChatBot
bot = ChatBot("No Output",
storage_adapter="chatterbot.adapters.storage.JsonDatabaseAdapter",
logic_adapter="chatterbot.adapters.logic.ClosestMatchAdapter",
io_adapter="chatterbot.adapters.io.NoOutputAdapter",
database="../database.db... | 32.24 | 92 | 0.710918 |
1d0f03f1dbb993efd87e65074605809b5fe6cc86 | 228 | py | Python | src/aboutdialog/__init__.py | cityofaustin/ags-service-publisher-gui | 641cdc052c6ecd42092d8e6eef0ff164cd9f2833 | [
"CC0-1.0"
] | 4 | 2019-02-04T18:45:12.000Z | 2021-04-16T12:43:38.000Z | src/aboutdialog/__init__.py | cityofaustin/ags-service-publisher-gui | 641cdc052c6ecd42092d8e6eef0ff164cd9f2833 | [
"CC0-1.0"
] | null | null | null | src/aboutdialog/__init__.py | cityofaustin/ags-service-publisher-gui | 641cdc052c6ecd42092d8e6eef0ff164cd9f2833 | [
"CC0-1.0"
] | null | null | null | from PyQt4 import QtGui
from aboutdialog_ui import Ui_AboutDialog
class AboutDialog(QtGui.QDialog, Ui_AboutDialog):
def __init__(self, parent=None):
QtGui.QDialog.__init__(self, parent)
self.setupUi(self)
| 22.8 | 49 | 0.745614 |
1d0f67e04909a305b11465684632db97d90fc2a4 | 804 | py | Python | manage.py | dpakach/RentalService | 2fe2c899b7f149ed3f0fc475100beaa0bc76619e | [
"MIT"
] | null | null | null | manage.py | dpakach/RentalService | 2fe2c899b7f149ed3f0fc475100beaa0bc76619e | [
"MIT"
] | 1 | 2018-11-06T03:17:14.000Z | 2018-11-06T03:17:14.000Z | manage.py | dpakach/RentalService | 2fe2c899b7f149ed3f0fc475100beaa0bc76619e | [
"MIT"
] | 1 | 2020-02-04T10:44:11.000Z | 2020-02-04T10:44:11.000Z | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "rental.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that the
... | 34.956522 | 77 | 0.641791 |
1d0f6eda9d9d7271e18b7bdc4b5bb920d107717b | 1,462 | py | Python | space_rocks/views/old_plot_magnitude.py | dave5801/space-rocks | c40dbc2f92f26bc2b3ddcd328c35ba4263fd7e04 | [
"MIT"
] | 1 | 2019-04-16T04:21:38.000Z | 2019-04-16T04:21:38.000Z | space_rocks/views/old_plot_magnitude.py | dave5801/space-rocks | c40dbc2f92f26bc2b3ddcd328c35ba4263fd7e04 | [
"MIT"
] | 21 | 2017-11-12T20:52:07.000Z | 2021-06-01T21:41:51.000Z | space_rocks/views/old_plot_magnitude.py | dave5801/space-rocks | c40dbc2f92f26bc2b3ddcd328c35ba4263fd7e04 | [
"MIT"
] | 2 | 2017-11-20T02:31:11.000Z | 2017-12-30T18:28:03.000Z | """Class for Scatter Plot -to be integrated with API calls."""
from bokeh.models import ColumnDataSource, OpenURL, TapTool
from bokeh.plotting import figure, output_file, show
import os
from space_rocks.CustomExceptions.custom_exceptions import UnknownAxisException
from space_rocks.models.spacemodel import AbsoluteMag... | 28.115385 | 111 | 0.670999 |
1d0f7d65f71d6f95cf84604807913ac4abb59c8e | 3,760 | py | Python | pyop2/mpi.py | chromy/PyOP2 | 8a1955c628b795019485c9771709c338a806e661 | [
"BSD-3-Clause"
] | null | null | null | pyop2/mpi.py | chromy/PyOP2 | 8a1955c628b795019485c9771709c338a806e661 | [
"BSD-3-Clause"
] | null | null | null | pyop2/mpi.py | chromy/PyOP2 | 8a1955c628b795019485c9771709c338a806e661 | [
"BSD-3-Clause"
] | null | null | null | # This file is part of PyOP2
#
# PyOP2 is Copyright (c) 2012, Imperial College London and
# others. Please see the AUTHORS file in the main source directory for
# a full list of copyright holders. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted ... | 36.504854 | 80 | 0.702926 |
1d0f88c734e95df9f7680144e69bad98a5b73970 | 6,294 | py | Python | poppurri/mixture/migrations/0011_auto__add_field_mixture_slug.py | ariel17/poppurri | 56c2f7ec96402e96776b928cd8be5454f7c2ab67 | [
"MIT"
] | null | null | null | poppurri/mixture/migrations/0011_auto__add_field_mixture_slug.py | ariel17/poppurri | 56c2f7ec96402e96776b928cd8be5454f7c2ab67 | [
"MIT"
] | 12 | 2017-06-01T13:15:33.000Z | 2017-06-01T13:15:35.000Z | poppurri/mixture/migrations/0011_auto__add_field_mixture_slug.py | ariel17/poppurri | 56c2f7ec96402e96776b928cd8be5454f7c2ab67 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Mixture.slug'
db.add_column(u'mixture_mixture', 'slug',
... | 69.933333 | 195 | 0.566095 |
1d0f8a03fabef21bee6e092a76374fe72c5adda6 | 12,358 | py | Python | sensor.py | antonhoess/sdf_simulator | 50c66a90bf7813f8bd92b34b86f123fb90d66062 | [
"BSD-3-Clause"
] | 1 | 2021-02-04T20:39:07.000Z | 2021-02-04T20:39:07.000Z | sensor.py | antonhoess/sdf_simulator | 50c66a90bf7813f8bd92b34b86f123fb90d66062 | [
"BSD-3-Clause"
] | null | null | null | sensor.py | antonhoess/sdf_simulator | 50c66a90bf7813f8bd92b34b86f123fb90d66062 | [
"BSD-3-Clause"
] | null | null | null | import abc
from vehicle import *
from type_check import *
__author__ = "Anton Höß"
__copyright__ = "Copyright 2020"
class Measurement(abc.ABC):
"""An abstract measurement class.
Parameters
----------
vehicle : Vehicle
The vehicle that the measurement is assigned to.
meas : numpy.ndarray... | 25.799582 | 110 | 0.577197 |
1d0fafe65082f81f774b225e36936412735ffbad | 1,518 | py | Python | isy-04/models/cnnmodel.py | bschurian/Interactive-Systems-Ben | f1a02a7150b154cd53806db190ebae5072ba74f1 | [
"MIT"
] | null | null | null | isy-04/models/cnnmodel.py | bschurian/Interactive-Systems-Ben | f1a02a7150b154cd53806db190ebae5072ba74f1 | [
"MIT"
] | null | null | null | isy-04/models/cnnmodel.py | bschurian/Interactive-Systems-Ben | f1a02a7150b154cd53806db190ebae5072ba74f1 | [
"MIT"
] | null | null | null | from keras.models import Sequential
from keras.layers import Dropout, Convolution2D, MaxPooling2D, Flatten, Dense, Activation
class CNNModel:
img_rows = 28
img_cols = 28
@staticmethod
def load_inputshape():
return CNNModel.img_rows, CNNModel.img_cols, 1
@staticmethod
def reshape_inpu... | 41.027027 | 145 | 0.689065 |
1d0fee2ef714cc91060dc27f0fbbab0a55623a8d | 1,029 | py | Python | tests/EarthClimate/test_EarthClimate.py | Trixter9994/vplanet | 7af9838688888f4f05da7919d1478d91b5670a36 | [
"MIT"
] | null | null | null | tests/EarthClimate/test_EarthClimate.py | Trixter9994/vplanet | 7af9838688888f4f05da7919d1478d91b5670a36 | [
"MIT"
] | null | null | null | tests/EarthClimate/test_EarthClimate.py | Trixter9994/vplanet | 7af9838688888f4f05da7919d1478d91b5670a36 | [
"MIT"
] | null | null | null | from vplot import GetOutput
import subprocess
import numpy as np
import os
cwd = os.path.dirname(os.path.realpath(__file__))
def test_EarthClimate():
"""Test modules distorb, distrot, and poise."""
# Remove old log file
subprocess.run(['rm', 'solarsys.log'], cwd=cwd)
# Run vplanet
subprocess.run([... | 32.15625 | 71 | 0.717201 |
1d0ff47f6a98744c75d1e792b30542cbf793507e | 1,399 | py | Python | examples/docs_snippets/docs_snippets_tests/concepts_tests/configuration_tests/test_configured_example.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets_tests/concepts_tests/configuration_tests/test_configured_example.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets_tests/concepts_tests/configuration_tests/test_configured_example.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | import yaml
from dagster import graph, op
from dagster.utils import file_relative_path
from docs_snippets.concepts.configuration.config_map_example import unsigned_s3_session
from docs_snippets.concepts.configuration.configured_example import (
east_unsigned_s3_session,
s3_session,
west_signed_s3_session,
... | 26.903846 | 87 | 0.720515 |
1d101b1c94ce69be6b950c70f8e6879a29722945 | 2,805 | py | Python | savu/plugins/segmentation/gaussian_mixtures/gmm_segment3D.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 39 | 2015-03-30T14:03:42.000Z | 2022-03-16T16:50:33.000Z | savu/plugins/segmentation/gaussian_mixtures/gmm_segment3D.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 670 | 2015-02-11T11:08:09.000Z | 2022-03-21T09:27:57.000Z | savu/plugins/segmentation/gaussian_mixtures/gmm_segment3D.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 54 | 2015-02-13T14:09:52.000Z | 2022-01-24T13:57:09.000Z | # Copyright 2019 Diamond Light Source Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 35.506329 | 113 | 0.687344 |
1d1028007cd09dd8a94c6d5a7103374afe5560b3 | 890 | py | Python | test_files/test_itr.py | ak212/python-hockey-rss | 60dc71168db53dee0eaf2bf02a40a73f5e3527db | [
"MIT"
] | 1 | 2015-12-22T18:37:45.000Z | 2015-12-22T18:37:45.000Z | test_files/test_itr.py | ak212/python-hockey-rss | 60dc71168db53dee0eaf2bf02a40a73f5e3527db | [
"MIT"
] | null | null | null | test_files/test_itr.py | ak212/python-hockey-rss | 60dc71168db53dee0eaf2bf02a40a73f5e3527db | [
"MIT"
] | null | null | null | '''
Created on Oct 6, 2014
@author: Aaron
'''
team_abbrvs = ['ANA', 'ARI', 'BOS', 'BUF', 'CAR', 'CBJ', 'CGY', 'CHI', 'COL', 'DAL',
'DET', 'EDM', 'FLA', 'LA', 'MIN', 'MTL', 'NAS', 'NJ', 'NYI', 'NYR',
'OTT', 'PHI', 'PIT', 'SJ', 'STL', 'TB', 'TOR', 'VAN', 'WPG', 'WSH']
team_names = ['Ducks',... | 37.083333 | 84 | 0.520225 |
1d103ee2b690d87a9e5d0fa689a132d1748aea6e | 8,960 | py | Python | preprocess.py | samar-khanna/cs224w-project | 50b255f87fe395cb8b638ec599825af2d1fc172b | [
"MIT"
] | 2 | 2022-03-06T17:14:12.000Z | 2022-03-11T13:37:59.000Z | preprocess.py | samar-khanna/cs224w-project | 50b255f87fe395cb8b638ec599825af2d1fc172b | [
"MIT"
] | null | null | null | preprocess.py | samar-khanna/cs224w-project | 50b255f87fe395cb8b638ec599825af2d1fc172b | [
"MIT"
] | 2 | 2022-03-06T16:26:39.000Z | 2022-03-06T17:14:20.000Z | import os
import torch
import pickle
import argparse
import numpy as np
import torch_geometric as pyg
from ogb.linkproppred import PygLinkPropPredDataset
class NoEdgeException(Exception):
pass
def create_online_edge_index(n_id, full_edge_index, curr_edge_index, curr_nodes, rng,
trai... | 46.666667 | 106 | 0.667522 |
1d1070a04549b175f1b31a3833cde3d465967741 | 2,235 | py | Python | draalcore/rest/file_download.py | jojanper/draalcore | 3d3f5a53efe32c721c34d7e48267328a4e9e8402 | [
"MIT"
] | 1 | 2017-04-25T10:54:55.000Z | 2017-04-25T10:54:55.000Z | draalcore/rest/file_download.py | jojanper/draalcore | 3d3f5a53efe32c721c34d7e48267328a4e9e8402 | [
"MIT"
] | 1 | 2022-02-10T06:48:36.000Z | 2022-02-10T06:48:36.000Z | draalcore/rest/file_download.py | jojanper/draalcore | 3d3f5a53efe32c721c34d7e48267328a4e9e8402 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""File download handling."""
# System imports
import os
import logging
import mimetypes
from django.conf import settings
from django.utils.encoding import smart_str
from django.http import StreamingHttpResponse
from wsgiref.util import FileWrapper
logger = logging.getLo... | 37.25 | 99 | 0.681879 |
1d10799c383e8de90cacd83fbb9655aeae10e893 | 424 | py | Python | terrascript/split/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/split/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/split/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/split/r.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class split_environment(terrascript.Resource):
pass
class split_group(terrascript.Resource):
pass
... | 16.307692 | 79 | 0.766509 |
1d108749d27b292c20ddb12135c2b8e6d5431fba | 12,211 | py | Python | services/traction/acapy_client/model/schema_send_request.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 12 | 2022-01-29T20:30:03.000Z | 2022-03-29T11:46:14.000Z | services/traction/acapy_client/model/schema_send_request.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 38 | 2021-11-22T17:52:50.000Z | 2022-03-31T17:52:00.000Z | services/traction/acapy_client/model/schema_send_request.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 9 | 2021-11-22T18:05:48.000Z | 2022-03-29T11:25:08.000Z | """
Aries Cloud Agent
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v0.7.2
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from acapy_cli... | 40.839465 | 124 | 0.560233 |
1d10a3051c24f1219a87d4b92bb96f150f13b900 | 1,321 | py | Python | Geoplot/price_range_geo.py | ivydanliu/CS35-Final-Project | 85407eb6f948a3f9b7cc46fe7879a3ce004b1732 | [
"MIT"
] | null | null | null | Geoplot/price_range_geo.py | ivydanliu/CS35-Final-Project | 85407eb6f948a3f9b7cc46fe7879a3ce004b1732 | [
"MIT"
] | null | null | null | Geoplot/price_range_geo.py | ivydanliu/CS35-Final-Project | 85407eb6f948a3f9b7cc46fe7879a3ce004b1732 | [
"MIT"
] | null | null | null | # please use python2 and run 'pip install geoplotlib'
# in terminal to make sure you have the required
# dependencies
import pandas
import geoplotlib
# Load the data
data = pandas.read_csv('data/yelp_vegas_price_level.csv')
# Read the price range, latittude, longitude attributes
price_rangeL = (data['name'].tolist())... | 23.589286 | 57 | 0.655564 |
1d10d91829d04d038e100a20c6a7a673e00e0154 | 718 | py | Python | appengine/findit/handlers/test/build_ahead_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/findit/handlers/test/build_ahead_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/findit/handlers/test/build_ahead_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import mock
import webapp2
from handlers import build_ahead
from services import build_ahead as build_ahead_service
from waterfall.test import wf_testcase
... | 27.615385 | 72 | 0.749304 |
1d10e60cda50b9b51781f1a8f71a0f9d943f1bda | 47,449 | py | Python | libqtile/window.py | lKk2/qtile | 1e8b153d4f52705adf05391453120f803df6ecac | [
"MIT"
] | 1 | 2020-07-15T13:44:45.000Z | 2020-07-15T13:44:45.000Z | libqtile/window.py | lKk2/qtile | 1e8b153d4f52705adf05391453120f803df6ecac | [
"MIT"
] | null | null | null | libqtile/window.py | lKk2/qtile | 1e8b153d4f52705adf05391453120f803df6ecac | [
"MIT"
] | null | null | null | # Copyright (c) 2008, Aldo Cortesi. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify,... | 32.322207 | 120 | 0.572341 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.