hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
82e49f1ad3ed1e40ba856944b5ae80363654a869 | 133 | py | Python | ska_skeleton/__init__.py | Vinod-Sathe-Company-Limited/ska-skeleton | e93d131fc4d33d5b2f0cd715553fd5907955eccd | [
"BSD-3-Clause"
] | null | null | null | ska_skeleton/__init__.py | Vinod-Sathe-Company-Limited/ska-skeleton | e93d131fc4d33d5b2f0cd715553fd5907955eccd | [
"BSD-3-Clause"
] | null | null | null | ska_skeleton/__init__.py | Vinod-Sathe-Company-Limited/ska-skeleton | e93d131fc4d33d5b2f0cd715553fd5907955eccd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Module init code."""
__version__ = '0.0.0'
__author__ = 'Your Name'
__email__ = 'your.email@mail.com'
| 13.3 | 33 | 0.609023 |
82e67a1fd499cdf5d94a3a3ff757c622620968ef | 2,669 | py | Python | src/users.py | dtekcth/tvmannen | 47d9441ee4000dc3600ae1a28580ba95a5b46a2a | [
"MIT"
] | null | null | null | src/users.py | dtekcth/tvmannen | 47d9441ee4000dc3600ae1a28580ba95a5b46a2a | [
"MIT"
] | null | null | null | src/users.py | dtekcth/tvmannen | 47d9441ee4000dc3600ae1a28580ba95a5b46a2a | [
"MIT"
] | 1 | 2019-12-25T21:49:16.000Z | 2019-12-25T21:49:16.000Z | # Blueprint for user management in /admin/users and /admin/users/delete
from tv import login_manager, db
from flask_login import LoginManager, current_user, login_user, logout_user, login_required
from flask import Blueprint, flash, redirect, render_template, request
from data import User
from forms import Registratio... | 32.156627 | 91 | 0.683402 |
7d5335d6ee6e5dd4d8013184f474bc8d3185581f | 337 | py | Python | mxfield/models.py | krescruz/django-mxfield | 98855412d4414e239a74370380aed5d28b52eeb1 | [
"MIT"
] | null | null | null | mxfield/models.py | krescruz/django-mxfield | 98855412d4414e239a74370380aed5d28b52eeb1 | [
"MIT"
] | null | null | null | mxfield/models.py | krescruz/django-mxfield | 98855412d4414e239a74370380aed5d28b52eeb1 | [
"MIT"
] | null | null | null | from django.db.models import CharField
from django.utils.translation import ugettext_lazy as _
import validators
| 25.923077 | 55 | 0.759644 |
7d53f22522d63caa5e1b6eeef4ed280bfe59205b | 5,646 | py | Python | tests/unit/test_crypt.py | oba11/salt | ddc0286d57c5ce864b60bf43e5bc3007bf7c2549 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_crypt.py | oba11/salt | ddc0286d57c5ce864b60bf43e5bc3007bf7c2549 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_crypt.py | oba11/salt | ddc0286d57c5ce864b60bf43e5bc3007bf7c2549 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# python libs
from __future__ import absolute_import
import os
# salt testing libs
from tests.support.unit import TestCase, skipIf
from tests.support.mock import patch, call, mock_open, NO_MOCK, NO_MOCK_REASON, MagicMock
# salt libs
import salt.utils
import salt.utils.files
from salt import crypt
# ... | 49.526316 | 108 | 0.732554 |
7d54215d7a89cdc6dee240942d655951555aa1e4 | 628 | py | Python | gubbins/tests/utils_tests.py | doismellburning/django-gubbins | d94e91082adfe2ae7462209a5793b479429d40d9 | [
"BSD-2-Clause"
] | null | null | null | gubbins/tests/utils_tests.py | doismellburning/django-gubbins | d94e91082adfe2ae7462209a5793b479429d40d9 | [
"BSD-2-Clause"
] | 4 | 2018-12-20T13:02:40.000Z | 2018-12-21T16:09:20.000Z | gubbins/tests/utils_tests.py | doismellburning/django-gubbins | d94e91082adfe2ae7462209a5793b479429d40d9 | [
"BSD-2-Clause"
] | 2 | 2015-01-05T10:13:42.000Z | 2020-05-29T08:17:58.000Z | import unittest
from gubbins.utils import append_params
| 31.4 | 65 | 0.603503 |
7d553204536b771ce8440161d9597d5690c1a810 | 2,804 | py | Python | tests/components/test_power_output.py | Shivam60/j5 | 18069737644c8f1c95944386773c7643d5df5aeb | [
"MIT"
] | null | null | null | tests/components/test_power_output.py | Shivam60/j5 | 18069737644c8f1c95944386773c7643d5df5aeb | [
"MIT"
] | null | null | null | tests/components/test_power_output.py | Shivam60/j5 | 18069737644c8f1c95944386773c7643d5df5aeb | [
"MIT"
] | null | null | null | """Tests for the power output classes."""
from typing import List, Optional, Type
from j5.backends import Backend
from j5.boards import Board
from j5.components.power_output import PowerOutput, PowerOutputInterface
def test_power_output_interface_implementation():
"""Test that we can implement the PowerOutputI... | 30.813187 | 82 | 0.690442 |
7d55cd544a02e7f8eda686f396f1e614dce7adb0 | 11,660 | py | Python | msg/tools/genmsg/test/test_genmsg_msgs.py | sikuner/Firmware_Marine | 80411dc4eb5aa9dc8eb3ca8ff6d59d1cf081a010 | [
"BSD-3-Clause"
] | 17 | 2020-03-13T00:10:28.000Z | 2021-09-06T17:13:17.000Z | msg/tools/genmsg/test/test_genmsg_msgs.py | sikuner/Firmware_Marine | 80411dc4eb5aa9dc8eb3ca8ff6d59d1cf081a010 | [
"BSD-3-Clause"
] | 1 | 2020-08-24T03:28:49.000Z | 2020-08-24T03:28:49.000Z | msg/tools/genmsg/test/test_genmsg_msgs.py | sikuner/Firmware_Marine | 80411dc4eb5aa9dc8eb3ca8ff6d59d1cf081a010 | [
"BSD-3-Clause"
] | 2 | 2020-03-13T09:05:32.000Z | 2021-08-13T08:28:14.000Z | # Software License Agreement (BSD License)
#
# Copyright (c) 2009, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above... | 38.996656 | 180 | 0.620583 |
7d565d78426b6ee97241efc8582c656e0fcdebc5 | 4,118 | py | Python | custom_components/waste_collection_schedule/waste_collection_schedule/wizard/stadtreinigung_hamburg.py | UBS-P/hacs_waste_collection_schedule | 9ce0fd55010bbab3948f1ee0aa5edb4b65b7d866 | [
"MIT"
] | 142 | 2020-04-13T18:56:12.000Z | 2022-03-30T19:44:08.000Z | custom_components/waste_collection_schedule/waste_collection_schedule/wizard/stadtreinigung_hamburg.py | UBS-P/hacs_waste_collection_schedule | 9ce0fd55010bbab3948f1ee0aa5edb4b65b7d866 | [
"MIT"
] | 138 | 2020-04-30T18:11:30.000Z | 2022-03-30T20:56:33.000Z | custom_components/waste_collection_schedule/waste_collection_schedule/wizard/stadtreinigung_hamburg.py | UBS-P/hacs_waste_collection_schedule | 9ce0fd55010bbab3948f1ee0aa5edb4b65b7d866 | [
"MIT"
] | 89 | 2020-06-16T05:13:08.000Z | 2022-03-28T09:28:25.000Z | #!/usr/bin/env python3
from html.parser import HTMLParser
import inquirer
import requests
# Parser for HTML input
# Parser for HTML option list
def main():
# search for street
questions = [
inquirer.Text("strasse", message="Enter search string for street"),
# inquirer.Text("hausnu... | 29.205674 | 93 | 0.573579 |
7d56702dbd9fe5b8f3529654e0855fa2b7b8f074 | 1,480 | py | Python | pythonstudy/convert.py | flyonskycn/pythonstudy | c2eabe40ed369046c80ba9882b2212feb34cdad6 | [
"Apache-2.0"
] | null | null | null | pythonstudy/convert.py | flyonskycn/pythonstudy | c2eabe40ed369046c80ba9882b2212feb34cdad6 | [
"Apache-2.0"
] | null | null | null | pythonstudy/convert.py | flyonskycn/pythonstudy | c2eabe40ed369046c80ba9882b2212feb34cdad6 | [
"Apache-2.0"
] | null | null | null | import chardet
import sys
import codecs
import os
def getAllFile(path, suffix='.'):
"recursive is enable"
f = os.walk(path)
fpath = []
for root, dir, fname in f:
for name in fname:
if name.endswith(suffix):
fpath.append(os.path.join(root, name))
... | 23.492063 | 84 | 0.531081 |
7d56e588d7a6fdb0c64b6925b9b5823ebec11f36 | 4,547 | py | Python | tests/tests.py | arck1/aio-counter | ffff58bf14ca2f155be5a54c9385481fce5ee58c | [
"MIT"
] | null | null | null | tests/tests.py | arck1/aio-counter | ffff58bf14ca2f155be5a54c9385481fce5ee58c | [
"MIT"
] | null | null | null | tests/tests.py | arck1/aio-counter | ffff58bf14ca2f155be5a54c9385481fce5ee58c | [
"MIT"
] | null | null | null | import unittest
from asyncio import sleep
from async_unittest import TestCase
from aio_counter import AioCounter
from aio_counter.exceptions import AioCounterException
def test_dec_nowait(self):
assert self.counter.empty()
try:
self.counter.dec_nowait()
except AioCounterExce... | 25.544944 | 96 | 0.61667 |
7d57683f060246ecdbe9fa25924715de937635d2 | 67 | py | Python | dexp/processing/remove_beads/__init__.py | haesleinhuepf/dexp | 2ea84f3db323724588fac565fae56f0d522bc5ca | [
"BSD-3-Clause"
] | 16 | 2021-04-21T14:09:19.000Z | 2022-03-22T02:30:59.000Z | dexp/processing/remove_beads/__init__.py | haesleinhuepf/dexp | 2ea84f3db323724588fac565fae56f0d522bc5ca | [
"BSD-3-Clause"
] | 28 | 2021-04-15T17:43:08.000Z | 2022-03-29T16:08:35.000Z | dexp/processing/remove_beads/__init__.py | haesleinhuepf/dexp | 2ea84f3db323724588fac565fae56f0d522bc5ca | [
"BSD-3-Clause"
] | 3 | 2022-02-08T17:41:30.000Z | 2022-03-18T15:32:27.000Z | from dexp.processing.remove_beads.beadsremover import BeadsRemover
| 33.5 | 66 | 0.895522 |
7d57cb53958a854e64b6d878a9826f34dbca7a63 | 96 | py | Python | venv/lib/python3.8/site-packages/pip/_internal/operations/install/editable_legacy.py | Retraces/UkraineBot | 3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71 | [
"MIT"
] | 2 | 2022-03-13T01:58:52.000Z | 2022-03-31T06:07:54.000Z | venv/lib/python3.8/site-packages/pip/_internal/operations/install/editable_legacy.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | 19 | 2021-11-20T04:09:18.000Z | 2022-03-23T15:05:55.000Z | venv/lib/python3.8/site-packages/pip/_internal/operations/install/editable_legacy.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | null | null | null | /home/runner/.cache/pip/pool/6e/30/4e/6df13ab33dd498623bcb8f860a029ad969938275a514553b6fe8b4b10b | 96 | 96 | 0.895833 |
7d58040a8760df0e7d462d968892a9628d5e39f3 | 8,960 | py | Python | corrector_module/opmon_corrector/corrector_worker.py | nordic-institute/X-Road-Metrics | 249d859466bf6065257cf8b3c27d0e9db4ab2378 | [
"MIT"
] | 2 | 2021-06-30T11:12:31.000Z | 2021-09-24T08:50:03.000Z | corrector_module/opmon_corrector/corrector_worker.py | nordic-institute/X-Road-Metrics | 249d859466bf6065257cf8b3c27d0e9db4ab2378 | [
"MIT"
] | null | null | null | corrector_module/opmon_corrector/corrector_worker.py | nordic-institute/X-Road-Metrics | 249d859466bf6065257cf8b3c27d0e9db4ab2378 | [
"MIT"
] | 2 | 2021-07-02T12:31:37.000Z | 2021-11-09T08:44:09.000Z |
# The MIT License
# Copyright (c) 2021- Nordic Institute for Interoperability Solutions (NIIS)
# Copyright (c) 2017-2020 Estonian Information System Authority (RIA)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software... | 48.172043 | 136 | 0.60904 |
7d5889cacaec1535d87725d19f570fd238dc7beb | 724 | py | Python | autosa_tests/large/mm_int16/unroll.py | mfkiwl/AutoSA-SystolicArray | 699742eefda66bd3fd6cac608f7c96f5bf60a2a0 | [
"MIT"
] | 102 | 2020-05-18T04:52:26.000Z | 2022-03-29T06:53:10.000Z | autosa_tests/large/mm_int16/unroll.py | mfkiwl/AutoSA-SystolicArray | 699742eefda66bd3fd6cac608f7c96f5bf60a2a0 | [
"MIT"
] | 14 | 2020-06-04T11:12:33.000Z | 2022-03-14T20:55:00.000Z | autosa_tests/large/mm_int16/unroll.py | mfkiwl/AutoSA-SystolicArray | 699742eefda66bd3fd6cac608f7c96f5bf60a2a0 | [
"MIT"
] | 26 | 2020-05-20T02:47:04.000Z | 2022-03-16T15:09:41.000Z | import math
# Modify the parameters here
UNROLL_FACTOR = 32
DATA_T = 'unsigned short'
# Generate the code
data_type = DATA_T
level = int(math.log2(UNROLL_FACTOR))
for layer in range(level - 1, -1, -1):
pair = int(math.pow(2, layer))
for i in range(pair):
# data_t tmp_[layer]_[pair] = tmp_[layer+1]_[pa... | 36.2 | 114 | 0.592541 |
7d589dd1f59c435f5b8daa7514686b5a0b85423d | 4,451 | py | Python | battlecode-manager/player_plain.py | gruzzlymug/ddg-2018 | 76f598f7548ad51b126ec9efb7da0fd0d4a306c2 | [
"MIT"
] | 1 | 2018-02-11T03:32:22.000Z | 2018-02-11T03:32:22.000Z | battlecode-manager/player_plain.py | gruzzlymug/ddg-2018 | 76f598f7548ad51b126ec9efb7da0fd0d4a306c2 | [
"MIT"
] | null | null | null | battlecode-manager/player_plain.py | gruzzlymug/ddg-2018 | 76f598f7548ad51b126ec9efb7da0fd0d4a306c2 | [
"MIT"
] | null | null | null | import os
import psutil
import subprocess
import threading
import sys
from threading import Timer
import select
from player_abstract import AbstractPlayer
def reap(process, timeout=3):
"Tries hard to terminate and ultimately kill all the children of this process."
try:
procs = process.children(recur... | 32.253623 | 119 | 0.599191 |
7d58f75c60cd92e49b8842d06b9c5d9c9a1f2ca8 | 91 | py | Python | skfda/exploratory/__init__.py | jiduque/scikit-fda | 5ea71e78854801b259aa3a01eb6b154aa63bf54b | [
"BSD-3-Clause"
] | 147 | 2019-05-10T20:46:42.000Z | 2022-03-25T17:23:19.000Z | skfda/exploratory/__init__.py | jiduque/scikit-fda | 5ea71e78854801b259aa3a01eb6b154aa63bf54b | [
"BSD-3-Clause"
] | 306 | 2019-04-26T08:56:05.000Z | 2022-03-30T11:12:48.000Z | skfda/exploratory/__init__.py | jiduque/scikit-fda | 5ea71e78854801b259aa3a01eb6b154aa63bf54b | [
"BSD-3-Clause"
] | 38 | 2019-09-03T17:24:04.000Z | 2022-01-06T05:09:18.000Z | from . import depth
from . import outliers
from . import stats
from . import visualization
| 18.2 | 27 | 0.78022 |
7d5919e7ea877027b781af2973db1c3cf8b3e549 | 4,726 | py | Python | jassen/django/project/blog/views.py | cabilangan112/intern-drf-blog | b2d6c7a4af1316b2c7ce38547bd9df99b4f3e8b9 | [
"MIT"
] | null | null | null | jassen/django/project/blog/views.py | cabilangan112/intern-drf-blog | b2d6c7a4af1316b2c7ce38547bd9df99b4f3e8b9 | [
"MIT"
] | null | null | null | jassen/django/project/blog/views.py | cabilangan112/intern-drf-blog | b2d6c7a4af1316b2c7ce38547bd9df99b4f3e8b9 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.contrib.auth.models import User, Group
from rest_framework import viewsets
from django.shortcuts import get_object_or_404
from rest_framework.response import Response
from rest_framework import viewsets, status
from .models import Post,Comment,Category,Tag
from .serialize... | 34.75 | 90 | 0.658697 |
7d5a512e475a15e2cba00eeed5fa7df50d174682 | 15,479 | py | Python | loopchain/rest_server/rest_server_rs.py | ahastudio/loopchain | 88b76956c069fedc1a0a2d239f47c3866493ad0f | [
"Apache-2.0"
] | null | null | null | loopchain/rest_server/rest_server_rs.py | ahastudio/loopchain | 88b76956c069fedc1a0a2d239f47c3866493ad0f | [
"Apache-2.0"
] | null | null | null | loopchain/rest_server/rest_server_rs.py | ahastudio/loopchain | 88b76956c069fedc1a0a2d239f47c3866493ad0f | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 ICON Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 38.600998 | 122 | 0.640481 |
7d5ba93142fb8ff5765303ca6b3001d2cd9dccdf | 10,178 | py | Python | ceilometer/tests/storage/test_impl_sqlalchemy.py | aristanetworks/ceilometer | 8776b137f82f71eef1241bcb1600de10c1f77394 | [
"Apache-2.0"
] | null | null | null | ceilometer/tests/storage/test_impl_sqlalchemy.py | aristanetworks/ceilometer | 8776b137f82f71eef1241bcb1600de10c1f77394 | [
"Apache-2.0"
] | null | null | null | ceilometer/tests/storage/test_impl_sqlalchemy.py | aristanetworks/ceilometer | 8776b137f82f71eef1241bcb1600de10c1f77394 | [
"Apache-2.0"
] | null | null | null | #
# Author: John Tran <jhtran@att.com>
# Julien Danjou <julien@danjou.info>
#
# 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
#
# Unl... | 40.070866 | 78 | 0.610434 |
7d5e7f22dbe1241e9828565a5008c4bed0402c69 | 17,906 | py | Python | ProjectManager.py | kojingharang/ManagerKit | 6efb9b2290b62e0bd3fe88eb3dc814d066f72f02 | [
"MIT"
] | null | null | null | ProjectManager.py | kojingharang/ManagerKit | 6efb9b2290b62e0bd3fe88eb3dc814d066f72f02 | [
"MIT"
] | null | null | null | ProjectManager.py | kojingharang/ManagerKit | 6efb9b2290b62e0bd3fe88eb3dc814d066f72f02 | [
"MIT"
] | null | null | null | from collections import namedtuple
import datetime
import pprint
import sys
import copy
import json
def expandStatusValue(v):
"""
v : string | (string, datetime.date | None)
string (string, None) .
"""
if isinstance(v, str):
v = (v, None)
return v
"""
title:
url:
owner:
status:
"" :
"o" :
"v" :
... | 24.629986 | 135 | 0.627667 |
7d60c0b18a3d86b57134273bbd22d9fd56431efb | 18,643 | py | Python | asteroids/whatsobservable.py | mcnowinski/various-and-sundry | ec0038d52f43435a45bf4fd1975315ad08fce560 | [
"MIT"
] | 2 | 2016-09-29T09:24:22.000Z | 2021-01-15T06:11:04.000Z | asteroids/whatsobservable.py | mcnowinski/various-and-sundry | ec0038d52f43435a45bf4fd1975315ad08fce560 | [
"MIT"
] | null | null | null | asteroids/whatsobservable.py | mcnowinski/various-and-sundry | ec0038d52f43435a45bf4fd1975315ad08fce560 | [
"MIT"
] | null | null | null | import datetime
import ephem
import os.path
import os
import numpy as np
import pdb
from pandas import DataFrame
__version__ = '0.1.2'
def pack_mpc_date(in_datetime):
"""
Convert a datetime.date or datetime.datetime object into the MPC packed date format, as described at:
http://www.minorplanetc... | 53.418338 | 250 | 0.565145 |
7d6278af283b8d74f950804bc1e7d3a988413e1b | 7,573 | py | Python | pcdet/models/backbones_3d/vfe/pillar_vfe.py | KPeng9510/OpenPCDet | 4bebf2f45a3193afb1ffe4f7ee1913afc0632e62 | [
"Apache-2.0"
] | 1 | 2021-02-18T19:46:44.000Z | 2021-02-18T19:46:44.000Z | pcdet/models/backbones_3d/vfe/pillar_vfe.py | KPeng9510/OpenPCDet | 4bebf2f45a3193afb1ffe4f7ee1913afc0632e62 | [
"Apache-2.0"
] | null | null | null | pcdet/models/backbones_3d/vfe/pillar_vfe.py | KPeng9510/OpenPCDet | 4bebf2f45a3193afb1ffe4f7ee1913afc0632e62 | [
"Apache-2.0"
] | 1 | 2022-01-23T13:37:49.000Z | 2022-01-23T13:37:49.000Z | import torch
from torch_geometric.nn import FeaStConv
from knn_cuda import KNN
from torch_cluster import fps
#from ....ops.roiaware_pool3d import roiaware_pool3d_utils
import torch.nn as nn
import torch.nn.functional as F
from .vfe_template import VFETemplate
import sys
from lppproj import LocalityPreservingProjectio... | 44.810651 | 193 | 0.629737 |
7d68c3cd5ebdfbe4a4f33c56583ea1d144745710 | 915 | py | Python | chess/pythonchess/docs/conf.py | mahakbansal/ChessAlphaZero | 2b3f823fdc252d7fd32de0b5e4e53aece9082dd5 | [
"MIT"
] | 2 | 2021-02-22T21:53:58.000Z | 2021-04-03T16:40:52.000Z | chess/pythonchess/docs/conf.py | mahakbansal/ChessAlphaZero | 2b3f823fdc252d7fd32de0b5e4e53aece9082dd5 | [
"MIT"
] | 1 | 2018-09-26T03:38:57.000Z | 2018-09-26T03:38:57.000Z | chess/pythonchess/docs/conf.py | mahakbansal/ChessAlphaZero | 2b3f823fdc252d7fd32de0b5e4e53aece9082dd5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import sys
import os
# Import the chess module.
sys.path.insert(0, os.path.abspath('..'))
import chess
# Autodoc.
extensions = ["sphinx.ext.autodoc"]
autodoc_member_order = 'bysource'
# The suffix of source filenames.
source_suffix = ".rst"
# The mas... | 22.875 | 74 | 0.747541 |
7d69ee0ea7680377c19eec8ca94d5abf487ee54e | 1,227 | py | Python | python/example.py | msmerlak/aa | 09ffdf7df582be9c83c7c9bfd873c55fddb65109 | [
"MIT"
] | null | null | null | python/example.py | msmerlak/aa | 09ffdf7df582be9c83c7c9bfd873c55fddb65109 | [
"MIT"
] | null | null | null | python/example.py | msmerlak/aa | 09ffdf7df582be9c83c7c9bfd873c55fddb65109 | [
"MIT"
] | null | null | null | # min (1/2) x'Q'x - q'x
from __future__ import print_function
import numpy as np
import aa
dim = 1000
mems = [5, 10, 20, 50, 100]
N = int(1e4)
np.random.seed(1234)
Q = np.random.randn(dim,dim)
Q = Q.T.dot(Q)
q = np.random.randn(dim)
x_0 = np.random.randn(dim)
x_star = np.linalg.solve(Q, q)
step = 0.0005
f_star = ... | 22.309091 | 61 | 0.544417 |
7d6a2293f4de2609456441f4d1fef57b68982b63 | 2,193 | py | Python | MuonAnalysis/MuonAssociators/test/L1MuonMatcher/test.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | MuonAnalysis/MuonAssociators/test/L1MuonMatcher/test.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | MuonAnalysis/MuonAssociators/test/L1MuonMatcher/test.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
process = cms.Process("PAT")
# initialize MessageLogger and output report
process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.MessageLogger.cerr.threshold = 'INFO'
process.MessageLogger.cerr.INFO = cms.untracked.PSet(
default = cms.untracked.PSet( limit... | 37.810345 | 125 | 0.75285 |
7d6a59d7fa23a596aac99cdbb9dd178d370f5c83 | 95 | py | Python | hydropy/__init__.py | GironsLopez/hydropy | 59cb29254e4a3f02f994e2d049e3c1135e9295a2 | [
"MIT"
] | null | null | null | hydropy/__init__.py | GironsLopez/hydropy | 59cb29254e4a3f02f994e2d049e3c1135e9295a2 | [
"MIT"
] | null | null | null | hydropy/__init__.py | GironsLopez/hydropy | 59cb29254e4a3f02f994e2d049e3c1135e9295a2 | [
"MIT"
] | null | null | null | """
Hydropy
=======
Provides functions to work with hydrological processes and equations
"""
| 11.875 | 68 | 0.705263 |
7d6a678fc2e4bddc6ad3dc6d90062ac0ebecff7e | 915 | py | Python | Desafios Finais Python - Cognizant Data Cloud Engineer #2/Preenchimento de Vetor I.py | italocreator/heros-journey | 76a867b3c9addf2c8b6c06999f9993e12a5b4e46 | [
"MIT"
] | null | null | null | Desafios Finais Python - Cognizant Data Cloud Engineer #2/Preenchimento de Vetor I.py | italocreator/heros-journey | 76a867b3c9addf2c8b6c06999f9993e12a5b4e46 | [
"MIT"
] | null | null | null | Desafios Finais Python - Cognizant Data Cloud Engineer #2/Preenchimento de Vetor I.py | italocreator/heros-journey | 76a867b3c9addf2c8b6c06999f9993e12a5b4e46 | [
"MIT"
] | null | null | null | """
Desafio
Voc recebeu o desafio de ler um valor e criar um programa que coloque o valor lido na primeira posio de um vetor N[10].
Em cada posio subsequente, coloque o dobro do valor da posio anterior.
Por exemplo, se o valor lido for 1, os valores do vetor devem ser 1,2,4,8 e assim sucessivamente.
Mostre o vetor e... | 30.5 | 123 | 0.632787 |
7d6a9fc0ae2c18fcc1e9420cc0d5c546fe26cbe4 | 1,267 | py | Python | Home_Work_2_B_Naychuk_Anastasiya/Task1.py | NaychukAnastasiya/goiteens-python3-naychuk | a79d0af238a15f58a822bb5d8e4d48227d4a7bc1 | [
"MIT"
] | null | null | null | Home_Work_2_B_Naychuk_Anastasiya/Task1.py | NaychukAnastasiya/goiteens-python3-naychuk | a79d0af238a15f58a822bb5d8e4d48227d4a7bc1 | [
"MIT"
] | null | null | null | Home_Work_2_B_Naychuk_Anastasiya/Task1.py | NaychukAnastasiya/goiteens-python3-naychuk | a79d0af238a15f58a822bb5d8e4d48227d4a7bc1 | [
"MIT"
] | null | null | null | # 3
print(" ")
var1 = float(input())
print(" ")
var2 = float(input())
print(" ")
var3 = float(input())
# Avg = (var1+var2+var3)/3 # ' :
if ((var1 > var2) and (var1 < var3)) or (var1 < var2) and (var1 > var3):
print (" ",var1)
elif ((var2 > var1) and (var2 < var3)) or ((var2 < var1) ... | 45.25 | 93 | 0.648777 |
7d6ad190979d6481b1c2985d3daa77d4ce6fbfd1 | 5,689 | py | Python | src/paper_1/curriculum/main.py | ludwigflo/paper1 | 13202febdb01a76bbf115435ce9676f6b82e1393 | [
"MIT"
] | null | null | null | src/paper_1/curriculum/main.py | ludwigflo/paper1 | 13202febdb01a76bbf115435ce9676f6b82e1393 | [
"MIT"
] | null | null | null | src/paper_1/curriculum/main.py | ludwigflo/paper1 | 13202febdb01a76bbf115435ce9676f6b82e1393 | [
"MIT"
] | null | null | null | from paper_1.data.data_loader import load_val_data, load_train_data, sequential_data_loader, random_data_loader
from paper_1.utils import read_parameter_file, create_experiment_directory
from paper_1.evaluation.eval_utils import init_metrics_object
from paper_1.baseline.main import train as baseline_train
from paper_1.... | 40.347518 | 123 | 0.731763 |
7d6b4c15322d55cd0ce898e730c14103fb38d94b | 6,793 | py | Python | sfc/tests/functest/sfc_symmetric_chain.py | pkaralis/sfc | b2572f3e4e96ef82fbfd5b6233933f1eac5cb166 | [
"Apache-2.0"
] | null | null | null | sfc/tests/functest/sfc_symmetric_chain.py | pkaralis/sfc | b2572f3e4e96ef82fbfd5b6233933f1eac5cb166 | [
"Apache-2.0"
] | null | null | null | sfc/tests/functest/sfc_symmetric_chain.py | pkaralis/sfc | b2572f3e4e96ef82fbfd5b6233933f1eac5cb166 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2017 Ericsson AB and others. All rights reserved
#
# This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
imp... | 35.196891 | 79 | 0.6227 |
7d6ecad90431713565bfe9a36d5edf9284440624 | 1,827 | py | Python | site-packages/offshoot/main.py | nanpuhaha/SerpentAI | 6af1105fc0a970227a0d7c11e6a0da1bd0bacec6 | [
"MIT"
] | 42 | 2017-01-23T22:36:03.000Z | 2021-11-14T21:22:17.000Z | site-packages/offshoot/main.py | nanpuhaha/SerpentAI | 6af1105fc0a970227a0d7c11e6a0da1bd0bacec6 | [
"MIT"
] | 6 | 2021-09-26T21:18:30.000Z | 2022-02-01T01:26:18.000Z | site-packages/offshoot/main.py | nanpuhaha/SerpentAI | 6af1105fc0a970227a0d7c11e6a0da1bd0bacec6 | [
"MIT"
] | 6 | 2017-04-14T13:07:27.000Z | 2020-06-17T06:24:18.000Z | #!/usr/bin/env python
import sys
import os
import subprocess
import offshoot
valid_commands = ["init", "install", "uninstall"]
if __name__ == "__main__":
execute()
| 27.681818 | 103 | 0.636015 |
7d6f707bec1ef6f1945e2739232de8ac3b5e6c3e | 1,953 | py | Python | samples/unsharp/unsharp.py | hj424/heterocl | e51b8f7f65ae6ad55c0c2426ab7192c3d8f6702b | [
"Apache-2.0"
] | 7 | 2019-08-20T02:43:44.000Z | 2019-12-13T14:26:05.000Z | samples/unsharp/unsharp.py | hj424/heterocl | e51b8f7f65ae6ad55c0c2426ab7192c3d8f6702b | [
"Apache-2.0"
] | null | null | null | samples/unsharp/unsharp.py | hj424/heterocl | e51b8f7f65ae6ad55c0c2426ab7192c3d8f6702b | [
"Apache-2.0"
] | 1 | 2019-07-25T21:46:50.000Z | 2019-07-25T21:46:50.000Z | import heterocl as hcl
from math import sqrt
hcl.config.init_dtype = hcl.Float()
input_image = hcl.placeholder((480, 640, 3), name = "input")
output_image = hcl.placeholder((480, 640, 3), name = "output")
def unsharp(input_image, output_image):
"""
Helper Functions
"""
rx = hcl.reduce_axis(-4, 5, "rx")
r... | 39.06 | 151 | 0.620072 |
7d702e229890e1a0e38bb9dc45ff5dead9dc3d80 | 14,391 | py | Python | hatspil/core/utils.py | dodomorandi/hatspil | 99c4d255b3f9836b32506636c84b16b3456bd74c | [
"MIT"
] | 2 | 2018-12-20T08:54:17.000Z | 2019-10-19T18:35:33.000Z | hatspil/core/utils.py | dodomorandi/hatspil | 99c4d255b3f9836b32506636c84b16b3456bd74c | [
"MIT"
] | null | null | null | hatspil/core/utils.py | dodomorandi/hatspil | 99c4d255b3f9836b32506636c84b16b3456bd74c | [
"MIT"
] | null | null | null | """A collection of utility function, shared across modules."""
import collections
import datetime
import gzip as gz
import logging
import os
import re
import shutil
import subprocess
from argparse import ArgumentTypeError
from copy import deepcopy
from logging import Logger
from typing import (Any, Callable, Dict, Gene... | 32.485327 | 87 | 0.625599 |
7d7258deda24afb1f717d1778a24d42c5aaa3305 | 2,556 | py | Python | DistrictData.py | robbierobinette/rcv-tensorflow | 984852902f465bb6f61ba863e4b76092249911d0 | [
"MIT"
] | null | null | null | DistrictData.py | robbierobinette/rcv-tensorflow | 984852902f465bb6f61ba863e4b76092249911d0 | [
"MIT"
] | null | null | null | DistrictData.py | robbierobinette/rcv-tensorflow | 984852902f465bb6f61ba863e4b76092249911d0 | [
"MIT"
] | null | null | null | import csv
from typing import List
from CombinedPopulation import CombinedPopulation
from PopulationGroup import PopulationGroup, Democrats, Republicans, Independents
def main():
dd = DistrictData("data-5vPn3.csv")
print("got dd")
for k, v in dd.dvr.items():
v.print()
if __name__ == "__main__"... | 29.72093 | 103 | 0.534429 |
7d72c0bcd96eb18d89e4b84f9f4aa4228039c607 | 102 | py | Python | urlmiddleware/base.py | dbramwell/django-urlmiddleware | 8f7f4a571730805cdd04f321548c8d1dc7751ec7 | [
"MIT"
] | 4 | 2015-04-10T10:41:18.000Z | 2016-06-16T01:19:15.000Z | urlmiddleware/base.py | dbramwell/django-urlmiddleware | 8f7f4a571730805cdd04f321548c8d1dc7751ec7 | [
"MIT"
] | 2 | 2015-12-18T12:24:05.000Z | 2015-12-18T17:00:27.000Z | urlmiddleware/base.py | dbramwell/django-urlmiddleware | 8f7f4a571730805cdd04f321548c8d1dc7751ec7 | [
"MIT"
] | 7 | 2015-11-17T17:53:37.000Z | 2016-03-29T06:21:17.000Z | from django.core.urlresolvers import Resolver404
| 17 | 48 | 0.823529 |
7d745ae2b2c11edcf86ebca48a6d9d1699e9100c | 98 | py | Python | test.py | ifplusor/actrie | 54e9aff441594fbcd30a936d4fbc300ad81007b9 | [
"BSD-3-Clause"
] | 8 | 2017-10-01T04:47:12.000Z | 2022-02-15T10:16:11.000Z | test.py | ifplusor/actrie | 54e9aff441594fbcd30a936d4fbc300ad81007b9 | [
"BSD-3-Clause"
] | null | null | null | test.py | ifplusor/actrie | 54e9aff441594fbcd30a936d4fbc300ad81007b9 | [
"BSD-3-Clause"
] | 4 | 2018-04-06T08:27:02.000Z | 2021-05-11T07:56:17.000Z | # coding=utf-8
from actrie.tests.test_matcher import test
if __name__ == "__main__":
test()
| 14 | 42 | 0.704082 |
7d7502212e99f51f8f089c24fff476d5cecb479f | 5,137 | py | Python | warehouse/email/services.py | pradyunsg/warehouse | 82815b06d9f98deed5f205c66e054de59d22a10d | [
"Apache-2.0"
] | 1 | 2022-03-29T11:56:45.000Z | 2022-03-29T11:56:45.000Z | warehouse/email/services.py | pradyunsg/warehouse | 82815b06d9f98deed5f205c66e054de59d22a10d | [
"Apache-2.0"
] | 358 | 2022-01-03T05:30:40.000Z | 2022-03-31T05:40:50.000Z | warehouse/email/services.py | anthonysidesap/warehouse | 140a2cc3cc007daca5f7fa2878a43e7e152d8959 | [
"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 Li... | 32.308176 | 87 | 0.647265 |
7d762add2bb0e919d8e50f41074b703f99873c98 | 265 | py | Python | quickvision/pretrained/_pretrained_weights.py | zlapp/quickvision | cbf87756088bd7fe24d380ca831f5c1a204466f8 | [
"Apache-2.0"
] | 47 | 2020-11-15T03:36:48.000Z | 2021-04-08T05:28:02.000Z | quickvision/pretrained/_pretrained_weights.py | zlapp/quickvision | cbf87756088bd7fe24d380ca831f5c1a204466f8 | [
"Apache-2.0"
] | 78 | 2020-11-14T17:55:28.000Z | 2021-04-06T08:55:24.000Z | quickvision/pretrained/_pretrained_weights.py | zlapp/quickvision | cbf87756088bd7fe24d380ca831f5c1a204466f8 | [
"Apache-2.0"
] | 15 | 2020-11-14T18:01:04.000Z | 2021-02-16T14:50:12.000Z | import torch
__all__ = ["_load_pretrained_weights"]
| 29.444444 | 109 | 0.8 |
7d762e8385c0a3df789a5bd08064a714cdafb006 | 2,420 | py | Python | woke/woke/a_config/data_model.py | Ackee-Blockchain/woke | 0d27de25720142beb9619a89619b7a94c3556af1 | [
"ISC"
] | 7 | 2022-01-28T06:50:00.000Z | 2022-02-14T11:34:32.000Z | woke/woke/a_config/data_model.py | Ackee-Blockchain/woke | 0d27de25720142beb9619a89619b7a94c3556af1 | [
"ISC"
] | 30 | 2022-01-26T17:54:48.000Z | 2022-03-21T12:33:53.000Z | woke/woke/a_config/data_model.py | Ackee-Blockchain/woke | 0d27de25720142beb9619a89619b7a94c3556af1 | [
"ISC"
] | null | null | null | from typing import Optional, List
from pathlib import Path
from dataclasses import astuple
import re
from pydantic import BaseModel, Field, Extra, validator
from pydantic.dataclasses import dataclass
from woke.core.enums import EvmVersionEnum
from woke.c_regex_parsing.solidity_version import SolidityVersion
| 30.25 | 117 | 0.673554 |
7d765dcd0b83ec7b2f5cef707b8de57d0e0211e3 | 1,399 | py | Python | model/rcnn/network.py | da-h/tf-boilerplate | ab8409c935d3fcbed07bbefd1cb0049d45283222 | [
"MIT"
] | null | null | null | model/rcnn/network.py | da-h/tf-boilerplate | ab8409c935d3fcbed07bbefd1cb0049d45283222 | [
"MIT"
] | null | null | null | model/rcnn/network.py | da-h/tf-boilerplate | ab8409c935d3fcbed07bbefd1cb0049d45283222 | [
"MIT"
] | null | null | null | import tensorflow as tf
import tensorflow.contrib.layers as tfl
"""Copied from the almighty Christian Hundt;
CECAM/CSM/IRTG School 2018: Machine Learning in Scientific Computing
https://github.com/CECAML/school_nierstein_2018/blob/master/Convnet%20TF.ipynb
"""
| 31.795455 | 104 | 0.717655 |
7d76a9eff5e5d91d0da51d617aa1f132efbb6c52 | 517 | py | Python | app/application.py | dulin/tornado-test | 8ceeb9f2b50b4cd0f18baa9149140721feec1925 | [
"MIT"
] | null | null | null | app/application.py | dulin/tornado-test | 8ceeb9f2b50b4cd0f18baa9149140721feec1925 | [
"MIT"
] | null | null | null | app/application.py | dulin/tornado-test | 8ceeb9f2b50b4cd0f18baa9149140721feec1925 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- mode: python -*-
import tornado.web
from app.views import HelloWorld
from app.ws.communication import CommunicationSocketHandler
| 23.5 | 63 | 0.599613 |
7d76d0e887ea0135157eb8f9b5b96280465e3061 | 31,326 | py | Python | python-fmclient/fmclient/fmclient/common/wrapping_formatters.py | starlingx/fault | 6105f83a85a8ca2e5ed8f33e0f5ed5455c8f0e17 | [
"Apache-2.0"
] | 2 | 2020-02-07T19:02:07.000Z | 2021-05-28T15:44:48.000Z | python-fmclient/fmclient/fmclient/common/wrapping_formatters.py | starlingx/fault | 6105f83a85a8ca2e5ed8f33e0f5ed5455c8f0e17 | [
"Apache-2.0"
] | null | null | null | python-fmclient/fmclient/fmclient/common/wrapping_formatters.py | starlingx/fault | 6105f83a85a8ca2e5ed8f33e0f5ed5455c8f0e17 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
"""
Manages WrapperFormatter objects.
WrapperFormatter objects can be used for wrapping CLI column celldata in order
for the CLI table (using prettyTable) to fit the terminal screen
The basic idea is:
Once celldata is retri... | 38.721879 | 137 | 0.632925 |
7d77a229da1b2cdc8c56a9c402927cc2d1140814 | 2,139 | py | Python | simple.py | vaiorabbit/python-glfw | b5984650e976f4702c3dc06db7115aebc13698ca | [
"Zlib"
] | null | null | null | simple.py | vaiorabbit/python-glfw | b5984650e976f4702c3dc06db7115aebc13698ca | [
"Zlib"
] | null | null | null | simple.py | vaiorabbit/python-glfw | b5984650e976f4702c3dc06db7115aebc13698ca | [
"Zlib"
] | 1 | 2020-03-04T08:59:15.000Z | 2020-03-04T08:59:15.000Z | # Ref.: https://github.com/vaiorabbit/ruby-opengl/blob/master/sample/simple.rb
from ctypes import *
from OpenGL.GL import *
import GLFW
from GLFW import *
key_callback = GLFWkeyfun(key_callback_fn)
if __name__ == '__main__':
main()
| 28.905405 | 78 | 0.632071 |
7d77a393017f4de426158a54d01130a88642e6af | 34,661 | py | Python | market_sim/_agents/risk_model.py | quanttrade/rl_trading | f4168c69f44fe5a11a06461387d4591426a43735 | [
"Apache-2.0"
] | 247 | 2017-09-14T03:26:39.000Z | 2022-03-30T10:23:02.000Z | market_sim/_agents/risk_model.py | Deeptradingfx/rl_trading | f4168c69f44fe5a11a06461387d4591426a43735 | [
"Apache-2.0"
] | null | null | null | market_sim/_agents/risk_model.py | Deeptradingfx/rl_trading | f4168c69f44fe5a11a06461387d4591426a43735 | [
"Apache-2.0"
] | 111 | 2017-10-18T07:47:07.000Z | 2022-03-30T10:18:49.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Implement different methods to hedge positions and measure the risk of a Zero
cupon bond portfolio
REFERENCE: Nawalkha, S. K; Soto, G. M.; Beliaeva, N. A., "Interest Rate Risk
Modeling, the fixed Income Valuation course". Wiley, 2005
@author: ucaiado
Created on 12/22/20... | 40.72973 | 79 | 0.578979 |
7d78430382af94d8d75d17a72371f34356ac1d39 | 193 | py | Python | hris/apps/jobs/admin.py | Minedomain/hris_backend | 90aab497c076c2d4ce4e05a441db0ee7a175df57 | [
"MIT"
] | null | null | null | hris/apps/jobs/admin.py | Minedomain/hris_backend | 90aab497c076c2d4ce4e05a441db0ee7a175df57 | [
"MIT"
] | null | null | null | hris/apps/jobs/admin.py | Minedomain/hris_backend | 90aab497c076c2d4ce4e05a441db0ee7a175df57 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import *
| 24.125 | 80 | 0.73057 |
7d78bb6905459ba9f8b320facebb6b0cf69eca83 | 3,401 | py | Python | src/arche/readers/schema.py | WinterComes/arche | 6be3d7a4ec66f33f7af544aa7af4ea95c35bef2e | [
"MIT"
] | 52 | 2019-03-18T21:12:59.000Z | 2022-01-24T05:49:23.000Z | src/arche/readers/schema.py | WinterComes/arche | 6be3d7a4ec66f33f7af544aa7af4ea95c35bef2e | [
"MIT"
] | 173 | 2019-03-18T15:50:14.000Z | 2019-12-09T18:03:07.000Z | src/arche/readers/schema.py | WinterComes/arche | 6be3d7a4ec66f33f7af544aa7af4ea95c35bef2e | [
"MIT"
] | 21 | 2019-03-20T17:14:22.000Z | 2022-01-30T18:33:22.000Z | from collections import defaultdict
from enum import Enum
import json
import pprint
from typing import Dict, List, Union, Any, Set, DefaultDict
from arche.tools import s3
import perfect_jsonschema
EXTENDED_KEYWORDS = {"tag", "unique", "coverage_percentage"}
SchemaObject = Dict[str, Union[str, bool, int, float, None,... | 31.490741 | 95 | 0.605116 |
7d7a5b43416629a61d913d56e3d15ecd4f2e0f5f | 5,620 | py | Python | tensorflow_probability/python/mcmc/eight_schools_hmc.py | hephaex/probability | 740d0db0bf2b1e1a04cfd0b55481c44380b3cb05 | [
"Apache-2.0"
] | 4 | 2019-03-07T05:15:13.000Z | 2019-06-13T20:35:45.000Z | tensorflow_probability/python/mcmc/eight_schools_hmc.py | hephaex/probability | 740d0db0bf2b1e1a04cfd0b55481c44380b3cb05 | [
"Apache-2.0"
] | 2 | 2019-08-01T18:31:41.000Z | 2019-08-01T19:42:15.000Z | tensorflow_probability/python/mcmc/eight_schools_hmc.py | hephaex/probability | 740d0db0bf2b1e1a04cfd0b55481c44380b3cb05 | [
"Apache-2.0"
] | 1 | 2019-09-18T15:17:53.000Z | 2019-09-18T15:17:53.000Z | # Copyright 2018 The TensorFlow Probability 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 o... | 34.691358 | 80 | 0.724377 |
7d7a5e990271c6f1b8c5e7eefd58b31203c16bfb | 16,456 | py | Python | src/pyspex/dem_io.py | rmvanhees/pyspex | 1e1370e57d131dba6880bdf7a56808e5ce638ca5 | [
"BSD-3-Clause"
] | null | null | null | src/pyspex/dem_io.py | rmvanhees/pyspex | 1e1370e57d131dba6880bdf7a56808e5ce638ca5 | [
"BSD-3-Clause"
] | 1 | 2022-02-06T14:21:48.000Z | 2022-03-22T15:19:40.000Z | src/pyspex/dem_io.py | rmvanhees/pyspex | 1e1370e57d131dba6880bdf7a56808e5ce638ca5 | [
"BSD-3-Clause"
] | null | null | null | """
This file is part of pyspex
https://github.com/rmvanhees/pyspex.git
Python implementation to read SPEXone DEM output
Copyright (c) 2019-2021 SRON - Netherlands Institute for Space Research
All Rights Reserved
License: BSD-3-Clause
"""
from pathlib import Path
import numpy as np
from .lib.tmtc_def import t... | 34.426778 | 79 | 0.49131 |
7d7bdf74580e44ae7e0eab89dc294d34670eb290 | 7,827 | py | Python | tests/util/test_parsing_helpers.py | lkattis-signal/SignalSDK | f085b9cae0495f4e016b9982df271efc6fd0a8f5 | [
"Apache-2.0"
] | 10 | 2020-09-29T06:36:45.000Z | 2022-03-14T18:15:50.000Z | tests/util/test_parsing_helpers.py | lkattis-signal/SignalSDK | f085b9cae0495f4e016b9982df271efc6fd0a8f5 | [
"Apache-2.0"
] | 53 | 2020-10-08T10:05:00.000Z | 2022-03-29T14:21:18.000Z | tests/util/test_parsing_helpers.py | lkattis-signal/SignalSDK | f085b9cae0495f4e016b9982df271efc6fd0a8f5 | [
"Apache-2.0"
] | 5 | 2020-09-25T07:48:04.000Z | 2021-11-23T07:08:56.000Z | from dataclasses import dataclass, field
from datetime import datetime, timezone
from typing import Union, Type, List, Optional, Any, Tuple
import pytest
from signal_ocean.util import parsing_helpers
def test_parse_model():
data = {'ModelID': 1, 'ModelName': 'model1', 'ModelScore': .97,
'Touch... | 36.919811 | 84 | 0.54542 |
7d7ca170be35a492481ffa204124b3d8dffb5cdc | 2,931 | py | Python | density-based/train.py | ramonpeter/UnbinnedMeasurements | 31c0a8125d48216718c22721cba63544d6b8897a | [
"MIT"
] | null | null | null | density-based/train.py | ramonpeter/UnbinnedMeasurements | 31c0a8125d48216718c22721cba63544d6b8897a | [
"MIT"
] | null | null | null | density-based/train.py | ramonpeter/UnbinnedMeasurements | 31c0a8125d48216718c22721cba63544d6b8897a | [
"MIT"
] | null | null | null | import tensorflow as tf
import pandas as pd
import numpy as np
import sys
import time
from cflow import ConditionalFlow
from MoINN.modules.subnetworks import DenseSubNet
from utils import train_density_estimation, plot_loss, plot_tau_ratio
# import data
tau1_gen = np.reshape(np.load("../data/tau1s_Pythia_gen.npy"), ... | 32.566667 | 113 | 0.702491 |
7d7cdf2a362ccd086f161b36591ea27b0857e365 | 2,408 | py | Python | assignment5/code/src/decoder.py | jschmidtnj/cs584 | d1d4d485d1fac8743cdbbc2996792db249dcf389 | [
"MIT"
] | null | null | null | assignment5/code/src/decoder.py | jschmidtnj/cs584 | d1d4d485d1fac8743cdbbc2996792db249dcf389 | [
"MIT"
] | null | null | null | assignment5/code/src/decoder.py | jschmidtnj/cs584 | d1d4d485d1fac8743cdbbc2996792db249dcf389 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
decoder file
decoder class
"""
import tensorflow as tf
| 31.684211 | 102 | 0.581395 |
7d7cfad6e60102e07f57c14396b2297a35ac5b1c | 2,203 | py | Python | camos/model/inputdata.py | danilexn/camos | 88d2457d3d71bb9f60a9b376a4b2dbeb611fd90d | [
"MIT"
] | 1 | 2022-01-18T09:43:24.000Z | 2022-01-18T09:43:24.000Z | camos/model/inputdata.py | danilexn/camos | 88d2457d3d71bb9f60a9b376a4b2dbeb611fd90d | [
"MIT"
] | null | null | null | camos/model/inputdata.py | danilexn/camos | 88d2457d3d71bb9f60a9b376a4b2dbeb611fd90d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Created on Sat Jun 05 2021
# Last modified on Mon Jun 07 2021
# Copyright (c) CaMOS Development Team. All Rights Reserved.
# Distributed under a MIT License. See LICENSE for more info.
import numpy as np
import camos.model.image as img
from camos.utils.apptools import getGui
| 34.968254 | 177 | 0.625057 |
7d7f83cb6c3e80ad4e030d0441da9a9587d821b7 | 10,462 | py | Python | src/compas_fab/backends/ros/messages/services.py | Kathrin3010/compas_fab | 18230b70479ab57635b24832762c340e41102c10 | [
"MIT"
] | null | null | null | src/compas_fab/backends/ros/messages/services.py | Kathrin3010/compas_fab | 18230b70479ab57635b24832762c340e41102c10 | [
"MIT"
] | null | null | null | src/compas_fab/backends/ros/messages/services.py | Kathrin3010/compas_fab | 18230b70479ab57635b24832762c340e41102c10 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from .geometry_msgs import PoseStamped
from .moveit_msgs import Constraints
from .moveit_msgs import MoveItErrorCodes
from .moveit_msgs import PlannerParams
from .moveit_msgs import PlanningScene
from .moveit_msgs import PlanningSceneComponents
from .moveit_msgs import PositionIK... | 45.290043 | 124 | 0.677882 |
7d803a9aa0c5e2c7510ceac09d326b16dcb098e1 | 9,946 | py | Python | PP4E/Examples/PP4E/Ai/ExpertSystem/holmes/holmes2/forward.py | BeacherHou/Python-_Markdown- | 015d79a02d32f49395b80ca10919b3a09b72c4df | [
"MIT"
] | null | null | null | PP4E/Examples/PP4E/Ai/ExpertSystem/holmes/holmes2/forward.py | BeacherHou/Python-_Markdown- | 015d79a02d32f49395b80ca10919b3a09b72c4df | [
"MIT"
] | null | null | null | PP4E/Examples/PP4E/Ai/ExpertSystem/holmes/holmes2/forward.py | BeacherHou/Python-_Markdown- | 015d79a02d32f49395b80ca10919b3a09b72c4df | [
"MIT"
] | null | null | null | #
# module forward.py
#
# forward chaining inference engine
# see holmes/forward.py and holmes.doc for more info;
#
# optimization: uses known fact and rule 'if' indexes to avoid:
# a) exhaustive fact list search when matching an 'if'
# b) exhaustive fact list scan when seeing if fact redundant
# c) exhausti... | 28.096045 | 81 | 0.478082 |
7d8144c38e98997db49f5fa507e926dc5ff5e76c | 979 | py | Python | bert/tasks/read_file.py | rschoon/bert | 5aeb394dd7c1fcf5995d2f7cd6a25ef3ac81ce13 | [
"MIT"
] | null | null | null | bert/tasks/read_file.py | rschoon/bert | 5aeb394dd7c1fcf5995d2f7cd6a25ef3ac81ce13 | [
"MIT"
] | null | null | null | bert/tasks/read_file.py | rschoon/bert | 5aeb394dd7c1fcf5995d2f7cd6a25ef3ac81ce13 | [
"MIT"
] | null | null | null |
import tarfile
import tempfile
from . import Task, TaskVar
| 27.971429 | 81 | 0.544433 |
7d8289a62a068949c34be79180a4077eeeb19299 | 8,610 | py | Python | p2m/layers.py | dipaco/single-viewTo3D | 923a769afedd95651cc11c72bf4e744c783de87f | [
"Apache-2.0"
] | null | null | null | p2m/layers.py | dipaco/single-viewTo3D | 923a769afedd95651cc11c72bf4e744c783de87f | [
"Apache-2.0"
] | null | null | null | p2m/layers.py | dipaco/single-viewTo3D | 923a769afedd95651cc11c72bf4e744c783de87f | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2019 Nanyang Wang, Yinda Zhang, Zhuwen Li, Yanwei Fu, Wei Liu, Yu-Gang Jiang, Fudan University
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may no... | 32.126866 | 111 | 0.617073 |
7d82c9d35fc41989289ca1ca70bcd714b7bacd76 | 6,477 | py | Python | models/swarm_algorithm.py | AlexanderKlanovets/swarm_algorithms | 8da851baccd4d074c747b7d2b4df9952918fab31 | [
"MIT"
] | 9 | 2019-10-29T13:30:57.000Z | 2022-01-30T14:23:26.000Z | models/swarm_algorithm.py | AlexanderKlanovets/swarm_algorithms | 8da851baccd4d074c747b7d2b4df9952918fab31 | [
"MIT"
] | 2 | 2021-06-08T22:11:11.000Z | 2022-03-12T00:44:37.000Z | models/swarm_algorithm.py | AlexanderKlanovets/swarm_algorithms | 8da851baccd4d074c747b7d2b4df9952918fab31 | [
"MIT"
] | 2 | 2020-02-11T09:26:48.000Z | 2020-05-11T17:47:22.000Z | from abc import ABC, abstractmethod
import numpy as np
| 28.407895 | 79 | 0.589007 |
7d8352a4615e2d80df5904ec6e1dc6850549b6ea | 1,376 | py | Python | Python-3/basic_examples/strings/python_str_to_datetime.py | ghiloufibelgacem/jornaldev | b9b27f9f7da595892520314b4ed1d2675556310a | [
"MIT"
] | 1,139 | 2018-05-09T11:54:36.000Z | 2022-03-31T06:52:50.000Z | Python-3/basic_examples/strings/python_str_to_datetime.py | iamharshverma/journaldev | af24242a1ac1b7dc3e8e2404ec916b77ccf5044a | [
"MIT"
] | 56 | 2018-06-20T03:52:53.000Z | 2022-02-09T22:57:41.000Z | Python-3/basic_examples/strings/python_str_to_datetime.py | iamharshverma/journaldev | af24242a1ac1b7dc3e8e2404ec916b77ccf5044a | [
"MIT"
] | 2,058 | 2018-05-09T09:32:17.000Z | 2022-03-29T13:19:42.000Z | from datetime import datetime
# string to datetime object
datetime_str = '09/19/18 13:55:26'
datetime_object = datetime.strptime(datetime_str, '%m/%d/%y %H:%M:%S')
print(type(datetime_object))
print(datetime_object) # printed in default format
# string to date object
date_str = '09-19-2018'
date_object = datetime... | 24.571429 | 70 | 0.713663 |
7d85c7a93fbd0155d7bd1fe3e1af5e36cc75c497 | 484 | py | Python | sshspawner/tests/__init__.py | 1kastner/SSHSpawner | 2634b3ed863f1dcbc3b48d7bee1ac3d98042e75e | [
"BSD-3-Clause"
] | 5 | 2019-09-23T19:04:59.000Z | 2020-08-06T18:07:48.000Z | sshspawner/tests/__init__.py | 1kastner/SSHSpawner | 2634b3ed863f1dcbc3b48d7bee1ac3d98042e75e | [
"BSD-3-Clause"
] | 1 | 2020-08-08T12:41:35.000Z | 2020-08-10T18:21:48.000Z | sshspawner/tests/__init__.py | 1kastner/SSHSpawner | 2634b3ed863f1dcbc3b48d7bee1ac3d98042e75e | [
"BSD-3-Clause"
] | 4 | 2020-02-25T22:37:02.000Z | 2021-04-13T14:43:16.000Z | ###############################################################################
# Copyright (c) 2018, Lawrence Livermore National Security, LLC
# Produced at the Lawrence Livermore National Laboratory
# Written by Thomas Mendoza mendoza33@llnl.gov
# LLNL-CODE-771750
# All rights reserved
#
# This file is part of SSHSpa... | 37.230769 | 79 | 0.520661 |
7d85e7f96f3d8e7fbfc3a65a4dfc184c2bae42cc | 7,697 | py | Python | vnpy/app/cta_strategy/strategies/tsmyo_bias_accu_strategy.py | TheSuperMyo/vnpy | e38b7f4de879f1756aa664d5dfe7e0bec65c9a1b | [
"MIT"
] | null | null | null | vnpy/app/cta_strategy/strategies/tsmyo_bias_accu_strategy.py | TheSuperMyo/vnpy | e38b7f4de879f1756aa664d5dfe7e0bec65c9a1b | [
"MIT"
] | null | null | null | vnpy/app/cta_strategy/strategies/tsmyo_bias_accu_strategy.py | TheSuperMyo/vnpy | e38b7f4de879f1756aa664d5dfe7e0bec65c9a1b | [
"MIT"
] | null | null | null | from datetime import time
from vnpy.app.cta_strategy import (
CtaTemplate,
StopOrder,
TickData,
BarData,
TradeData,
OrderData,
BarGenerator,
ArrayManager
)
from vnpy.app.cta_strategy.base import (
EngineType,
STOPORDER_PREFIX,
StopOrder,
StopOrderStatus,
)
from vnpy.app.c... | 31.545082 | 127 | 0.572951 |
7d86bb1a8869218343e11c5b17e9cc10ddeac450 | 4,249 | py | Python | test/test-beam-dataflow-nlp.py | tarrade/proj_NLP_text_classification_with_GCP | ac09d6dbf8c07470d03cfb8140a26db7cd5bef9f | [
"Apache-2.0"
] | 1 | 2020-07-19T16:10:19.000Z | 2020-07-19T16:10:19.000Z | test/test-beam-dataflow-nlp.py | tarrade/proj_NLP_text_classification_with_GCP | ac09d6dbf8c07470d03cfb8140a26db7cd5bef9f | [
"Apache-2.0"
] | 46 | 2019-11-01T08:53:32.000Z | 2022-01-15T10:27:56.000Z | test/test-beam-dataflow-nlp.py | tarrade/proj_NLP_text_classification_with_GCP | ac09d6dbf8c07470d03cfb8140a26db7cd5bef9f | [
"Apache-2.0"
] | null | null | null | import sys
import os
import pathlib
import logging
import subprocess
import datetime
import apache_beam as beam
from apache_beam.options.pipeline_options import PipelineOptions
from apache_beam.options.pipeline_options import StandardOptions
from apache_beam.options.pipeline_options import GoogleCloudOptions
from apach... | 35.408333 | 221 | 0.676865 |
7d87158e11ce4ed100a35dda4334c28bbf1bf852 | 3,882 | py | Python | slixmpp/plugins/xep_0405/mix_pam.py | anirudhrata/slixmpp | 1fcee0e80a212eeb274d2f560e69099d8a61bf7f | [
"BSD-3-Clause"
] | 86 | 2016-07-04T13:26:02.000Z | 2022-02-19T10:26:21.000Z | slixmpp/plugins/xep_0405/mix_pam.py | anirudhrata/slixmpp | 1fcee0e80a212eeb274d2f560e69099d8a61bf7f | [
"BSD-3-Clause"
] | 10 | 2016-09-30T18:55:41.000Z | 2020-05-01T14:22:47.000Z | slixmpp/plugins/xep_0405/mix_pam.py | anirudhrata/slixmpp | 1fcee0e80a212eeb274d2f560e69099d8a61bf7f | [
"BSD-3-Clause"
] | 45 | 2016-09-30T18:48:41.000Z | 2022-03-18T21:39:33.000Z | # Slixmpp: The Slick XMPP Library
# Copyright (C) 2020 Mathieu Pasquet <mathieui@mathieui.net>
# This file is part of Slixmpp.
# See the file LICENSE for copying permission.
from typing import (
List,
Optional,
Set,
Tuple,
)
from slixmpp import JID, Iq
from slixmpp.exceptions import IqError, IqTimeout
... | 34.660714 | 95 | 0.580629 |
7d872614c5ec53276181d661d5d56268e35d080a | 1,360 | py | Python | MoraisParkingPython/view/funcoes_areas.py | larissacauane/Morais-Parking-Python | 9063845cabef10459dde76b53d3a51975788a54d | [
"MIT"
] | null | null | null | MoraisParkingPython/view/funcoes_areas.py | larissacauane/Morais-Parking-Python | 9063845cabef10459dde76b53d3a51975788a54d | [
"MIT"
] | null | null | null | MoraisParkingPython/view/funcoes_areas.py | larissacauane/Morais-Parking-Python | 9063845cabef10459dde76b53d3a51975788a54d | [
"MIT"
] | null | null | null | from control.controller_veiculos import ControllerVeiculos
from control.controller_proprietario import ControllerProprietario
from control.controller_area import ControllerAreaEstacionamento
from model.constants import *
controller_veiculo = ControllerVeiculos()
controller_proprietario = ControllerProprietario()
cont... | 32.380952 | 73 | 0.675735 |
7d889fb0ab0b91db363297f53747bd0adaa5fe54 | 2,811 | py | Python | tests/gold_tests/h2/h2spec.test.py | a-canary/trafficserver | df01ace2b0bdffd3ddcc5b2c7587b6d6fed5234c | [
"Apache-2.0"
] | null | null | null | tests/gold_tests/h2/h2spec.test.py | a-canary/trafficserver | df01ace2b0bdffd3ddcc5b2c7587b6d6fed5234c | [
"Apache-2.0"
] | null | null | null | tests/gold_tests/h2/h2spec.test.py | a-canary/trafficserver | df01ace2b0bdffd3ddcc5b2c7587b6d6fed5234c | [
"Apache-2.0"
] | null | null | null | '''
Test HTTP/2 with h2spec
'''
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version... | 37.48 | 121 | 0.743863 |
7d8a92045f001897812e0811e27aaab163f27e32 | 576 | py | Python | examples/02/client.py | cjrh/aiosmartsock | a4ab5ffe5b673ada2a3002d7a9cb68ee1ea4a48f | [
"Apache-2.0"
] | 9 | 2019-03-25T23:25:08.000Z | 2022-01-17T00:49:26.000Z | examples/02/client.py | cjrh/aiomsg | 74b646675e3d7296f0334d3e17c1be0370c5d852 | [
"Apache-2.0"
] | 33 | 2019-04-13T02:31:07.000Z | 2022-03-21T19:12:14.000Z | examples/02/client.py | cjrh/aiosmartsock | a4ab5ffe5b673ada2a3002d7a9cb68ee1ea4a48f | [
"Apache-2.0"
] | 1 | 2021-04-26T09:07:36.000Z | 2021-04-26T09:07:36.000Z | import logging
import itertools
import asyncio
import random
import aiomsg
import aiorun
logging.basicConfig(level="DEBUG")
aiorun.run(main())
| 19.2 | 59 | 0.65625 |
7d8b956b2e624082889be95139c9c63feed50163 | 1,901 | py | Python | data_structures/class_dependency_injection.py | miguelgfierro/pybase | de8e4f11ed5c655e748178e65195c7e70a9c98af | [
"BSD-3-Clause"
] | 14 | 2020-02-07T21:36:39.000Z | 2022-03-12T22:37:04.000Z | data_structures/class_dependency_injection.py | miguelgfierro/pybase | de8e4f11ed5c655e748178e65195c7e70a9c98af | [
"BSD-3-Clause"
] | 19 | 2019-05-18T23:58:30.000Z | 2022-01-09T16:45:35.000Z | data_structures/class_dependency_injection.py | miguelgfierro/pybase | de8e4f11ed5c655e748178e65195c7e70a9c98af | [
"BSD-3-Clause"
] | 5 | 2020-10-06T06:10:27.000Z | 2021-07-08T12:58:46.000Z | # Dependency injection:
# Technique where one object (or static method) supplies the dependencies of another object.
# The objective is to decouple objects to the extent that no client code has to be changed
# simply because an object it depends on needs to be changed to a different one.
# Dependency injection is one f... | 35.203704 | 146 | 0.678064 |
7d8c2a23670b05afd3505faf37ad0aff75f308fd | 5,073 | py | Python | vcommand/libs/crypto.py | virink/vCommand | 328dd5a8bc9390c5edde80f5544d797f54690f91 | [
"MIT"
] | 7 | 2019-08-01T14:57:34.000Z | 2019-11-26T12:12:17.000Z | vcommand/libs/crypto.py | virink/vCommand | 328dd5a8bc9390c5edde80f5544d797f54690f91 | [
"MIT"
] | null | null | null | vcommand/libs/crypto.py | virink/vCommand | 328dd5a8bc9390c5edde80f5544d797f54690f91 | [
"MIT"
] | 2 | 2019-08-16T04:52:50.000Z | 2019-11-26T12:12:25.000Z | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
"""
Author : Virink <virink@outlook.com>
Date : 2019/04/18, 14:49
"""
import string
import re
L = string.ascii_lowercase
U = string.ascii_uppercase
A = string.ascii_letters
def func_atbash(*args):
""""""
arg = args[0]
arg = arg.lower().replace(' ',... | 30.196429 | 74 | 0.350089 |
7d8c33c577dc39007eec8277d366b069630608c1 | 1,773 | py | Python | backend/risk_factors/tasks.py | Doctorinna/backend | cfff4fe751d668dcaf4834ebb730f5158c26e201 | [
"MIT"
] | 24 | 2021-09-13T06:16:44.000Z | 2022-01-08T08:56:04.000Z | backend/risk_factors/tasks.py | Doctorinna/backend | cfff4fe751d668dcaf4834ebb730f5158c26e201 | [
"MIT"
] | 32 | 2021-09-28T05:33:00.000Z | 2021-12-12T09:51:09.000Z | backend/risk_factors/tasks.py | Doctorinna/backend | cfff4fe751d668dcaf4834ebb730f5158c26e201 | [
"MIT"
] | 1 | 2021-10-04T21:52:15.000Z | 2021-10-04T21:52:15.000Z | from .utils import (get_prescription, get_attributes, get_group)
from .models import Disease, Result, Score, Question, SurveyResponse
from .analysis import cardio_risk_group, diabetes_risk_group, stroke_risk_group
from statistics import mean
from celery import shared_task
| 34.764706 | 79 | 0.668359 |
7d8c64c1f1dba35610d7552ede42b4b2192a13c9 | 419 | py | Python | augur/routes/__init__.py | Nayan-Das/augur | 857f4a4e7d688fd54356aa0f546834071fbabbf2 | [
"MIT"
] | 3 | 2019-10-31T19:07:48.000Z | 2019-11-20T23:14:15.000Z | augur/routes/__init__.py | Nayan-Das/augur | 857f4a4e7d688fd54356aa0f546834071fbabbf2 | [
"MIT"
] | 3 | 2021-03-09T22:54:52.000Z | 2021-05-10T19:19:00.000Z | augur/routes/__init__.py | Nayan-Das/augur | 857f4a4e7d688fd54356aa0f546834071fbabbf2 | [
"MIT"
] | 4 | 2019-11-05T20:22:12.000Z | 2019-12-12T18:08:30.000Z | import importlib
import os
import glob
from .user import create_user_routes
from .repo import create_repo_routes
from .broker import create_broker_routes
| 26.1875 | 55 | 0.778043 |
7d8fe3a63259aba89e6864813dbcb43ee8122092 | 2,117 | py | Python | stests/chain/set_transfer_native.py | goral09/stests | 4de26485535cadf1b708188a7133a976536ccba3 | [
"Apache-2.0"
] | 4 | 2020-03-10T15:28:17.000Z | 2021-10-02T11:41:17.000Z | stests/chain/set_transfer_native.py | goral09/stests | 4de26485535cadf1b708188a7133a976536ccba3 | [
"Apache-2.0"
] | 1 | 2020-03-25T11:31:44.000Z | 2020-03-25T11:31:44.000Z | stests/chain/set_transfer_native.py | goral09/stests | 4de26485535cadf1b708188a7133a976536ccba3 | [
"Apache-2.0"
] | 9 | 2020-02-25T18:43:42.000Z | 2021-08-10T17:08:42.000Z | import json
import random
import subprocess
from stests.core.logging import log_event
from stests.chain.utils import execute_cli
from stests.chain.utils import DeployDispatchInfo
from stests.core.types.chain import Account
from stests.core.types.infra import Network
from stests.core.types.infra import Node
from stests... | 34.704918 | 146 | 0.687293 |
7d90aa90743d9451f50ce626438114785520c9d1 | 1,143 | py | Python | Binary Search Tree/235. Lowest Common Ancestor of a Binary Search Tree.py | beckswu/Leetcode | 480e8dc276b1f65961166d66efa5497d7ff0bdfd | [
"MIT"
] | 138 | 2020-02-08T05:25:26.000Z | 2021-11-04T11:59:28.000Z | Binary Search Tree/235. Lowest Common Ancestor of a Binary Search Tree.py | beckswu/Leetcode | 480e8dc276b1f65961166d66efa5497d7ff0bdfd | [
"MIT"
] | null | null | null | Binary Search Tree/235. Lowest Common Ancestor of a Binary Search Tree.py | beckswu/Leetcode | 480e8dc276b1f65961166d66efa5497d7ff0bdfd | [
"MIT"
] | 24 | 2021-01-02T07:18:43.000Z | 2022-03-20T08:17:54.000Z | """
235. Lowest Common Ancestor of a Binary Search Tree
"""
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
| 28.575 | 61 | 0.523185 |
7d9246bc05b6e5994b39b6b9455b5e82dd240f3c | 3,494 | py | Python | waliki/acl.py | sckevmit/waliki | 5baaf6f043275920a1174ff233726f7ff4bfb5cf | [
"BSD-3-Clause"
] | 324 | 2015-01-02T20:48:33.000Z | 2021-12-11T14:44:34.000Z | waliki/acl.py | sckevmit/waliki | 5baaf6f043275920a1174ff233726f7ff4bfb5cf | [
"BSD-3-Clause"
] | 103 | 2015-01-02T03:01:34.000Z | 2020-04-02T19:03:53.000Z | waliki/acl.py | sckevmit/waliki | 5baaf6f043275920a1174ff233726f7ff4bfb5cf | [
"BSD-3-Clause"
] | 84 | 2015-01-07T08:53:05.000Z | 2021-01-04T00:26:38.000Z | from functools import wraps
from collections import Iterable
from django.conf import settings
from django.shortcuts import render
from django.core.exceptions import PermissionDenied
from django.utils.decorators import available_attrs
from django.utils.encoding import force_str
from django.utils.six.moves.urllib.parse i... | 39.704545 | 111 | 0.690326 |
7d9293e84f4a03376c976e40854cc463c3d0b2fe | 529 | py | Python | 2808.py | heltonricardo/URI | 160cca22d94aa667177c9ebf2a1c9864c5e55b41 | [
"MIT"
] | 6 | 2021-04-13T00:33:43.000Z | 2022-02-10T10:23:59.000Z | 2808.py | heltonricardo/URI | 160cca22d94aa667177c9ebf2a1c9864c5e55b41 | [
"MIT"
] | null | null | null | 2808.py | heltonricardo/URI | 160cca22d94aa667177c9ebf2a1c9864c5e55b41 | [
"MIT"
] | 3 | 2021-03-23T18:42:24.000Z | 2022-02-10T10:24:07.000Z |
e = str(input()).split()
a = conv(e[0])
b = conv(e[1])
ax = int(a[0])
ay = int(a[1])
bx = int(b[0])
by = int(b[1])
if (abs(ax - bx) == 1 and abs(ay - by) == 2) or (abs(ax - bx) == 2 and abs(ay - by) == 1):
print('VALIDO')
else: print('INVALIDO')
| 23 | 90 | 0.404537 |
7d92e1048d2857d5559e9d7bb1d06d56001488c0 | 4,095 | py | Python | RabiesRefNAAP_CLI.py | jiangweiyao/RabiesRefNAAP | bd10ca5d9b759381e09ecc25e1456370e94a0744 | [
"Apache-1.1"
] | null | null | null | RabiesRefNAAP_CLI.py | jiangweiyao/RabiesRefNAAP | bd10ca5d9b759381e09ecc25e1456370e94a0744 | [
"Apache-1.1"
] | null | null | null | RabiesRefNAAP_CLI.py | jiangweiyao/RabiesRefNAAP | bd10ca5d9b759381e09ecc25e1456370e94a0744 | [
"Apache-1.1"
] | 1 | 2021-03-01T22:20:26.000Z | 2021-03-01T22:20:26.000Z | #!/usr/bin/env python
import sys
import os
import glob
import re
from datetime import date
import argparse
import subprocess
from pathlib import Path
if __name__ == "__main__":
sys.exit(main())
| 47.616279 | 224 | 0.668132 |
7d93db8015155beda4e7ca3caccf0926ce883652 | 8,887 | py | Python | mtp_cashbook/apps/disbursements/tests/test_search.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-cashbook | d35a621e21631e577faacaeacb5ab9f883c9b4f4 | [
"MIT"
] | 4 | 2016-01-05T12:21:39.000Z | 2016-12-22T15:56:37.000Z | mtp_cashbook/apps/disbursements/tests/test_search.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-cashbook | d35a621e21631e577faacaeacb5ab9f883c9b4f4 | [
"MIT"
] | 132 | 2015-06-10T09:53:14.000Z | 2022-02-01T17:35:54.000Z | mtp_cashbook/apps/disbursements/tests/test_search.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-cashbook | d35a621e21631e577faacaeacb5ab9f883c9b4f4 | [
"MIT"
] | 3 | 2015-07-07T14:40:33.000Z | 2021-04-11T06:20:14.000Z | import datetime
from django.test import SimpleTestCase
from django.urls import reverse
from django.utils.html import strip_tags
import responses
from cashbook.tests import MTPBaseTestCase, api_url
from disbursements.forms import SearchForm
| 47.271277 | 117 | 0.567008 |
7d93e9d98b1bfee0032c7712ee1027aadf9abac0 | 620 | py | Python | pipelines/pipeline_util/graphite_extract_utility.py | MatMoore/app-performance-summary | e94c63c26dec5da39b8458b1e46bcc4f922ab7dc | [
"MIT"
] | null | null | null | pipelines/pipeline_util/graphite_extract_utility.py | MatMoore/app-performance-summary | e94c63c26dec5da39b8458b1e46bcc4f922ab7dc | [
"MIT"
] | 10 | 2018-03-05T17:56:11.000Z | 2018-03-13T16:50:51.000Z | pipelines/pipeline_util/graphite_extract_utility.py | MatMoore/app-performance-summary | e94c63c26dec5da39b8458b1e46bcc4f922ab7dc | [
"MIT"
] | 1 | 2021-04-10T19:50:33.000Z | 2021-04-10T19:50:33.000Z | '''
Utility for extracting data from the graphite API
'''
import os
from urllib.parse import urlencode
import pandas as pd
| 28.181818 | 98 | 0.662903 |
7d953acfe0d26007513dac6a05f6317497155128 | 712 | py | Python | backend/streetsignup/migrations/0002_auto_20200901_1758.py | nicoepp/the-prayer-walk | 6c8217c33f399cfe46dc23075e13ca9464079cae | [
"MIT"
] | null | null | null | backend/streetsignup/migrations/0002_auto_20200901_1758.py | nicoepp/the-prayer-walk | 6c8217c33f399cfe46dc23075e13ca9464079cae | [
"MIT"
] | null | null | null | backend/streetsignup/migrations/0002_auto_20200901_1758.py | nicoepp/the-prayer-walk | 6c8217c33f399cfe46dc23075e13ca9464079cae | [
"MIT"
] | null | null | null | # Generated by Django 3.1.1 on 2020-09-01 17:58
from django.db import migrations, models
import django.db.models.deletion
| 28.48 | 132 | 0.634831 |
7d9767476bcf26c64a3560357db2dd0c005504a9 | 9,830 | py | Python | deepchem/feat/molecule_featurizers/coulomb_matrices.py | deloragaskins/deepchem | 234ab699cdb997e5963966a8b6926cb2cda7c064 | [
"MIT"
] | 3,782 | 2016-02-21T03:53:11.000Z | 2022-03-31T16:10:26.000Z | deepchem/feat/molecule_featurizers/coulomb_matrices.py | deloragaskins/deepchem | 234ab699cdb997e5963966a8b6926cb2cda7c064 | [
"MIT"
] | 2,666 | 2016-02-11T01:54:54.000Z | 2022-03-31T11:14:33.000Z | deepchem/feat/molecule_featurizers/coulomb_matrices.py | deloragaskins/deepchem | 234ab699cdb997e5963966a8b6926cb2cda7c064 | [
"MIT"
] | 1,597 | 2016-02-21T03:10:08.000Z | 2022-03-30T13:21:28.000Z | """
Generate coulomb matrices for molecules.
See Montavon et al., _New Journal of Physics_ __15__ (2013) 095003.
"""
import numpy as np
from typing import Any, List, Optional
from deepchem.utils.typing import RDKitMol
from deepchem.utils.data_utils import pad_array
from deepchem.feat.base_classes import MolecularFeat... | 31.812298 | 88 | 0.653713 |
7d9822ec626534a501f48b72a69df1f8b8c72c49 | 2,882 | py | Python | edk2toollib/uefi/edk2/fmp_payload_header.py | mikeytdisco/edk2-pytool-library | eab28cab8cf26f1018f7cbfac510a503444f0f0d | [
"BSD-2-Clause-Patent"
] | 32 | 2019-06-28T06:04:30.000Z | 2022-03-11T10:44:44.000Z | edk2toollib/uefi/edk2/fmp_payload_header.py | mikeytdisco/edk2-pytool-library | eab28cab8cf26f1018f7cbfac510a503444f0f0d | [
"BSD-2-Clause-Patent"
] | 107 | 2019-07-10T19:09:51.000Z | 2022-03-10T22:52:58.000Z | edk2toollib/uefi/edk2/fmp_payload_header.py | mikeytdisco/edk2-pytool-library | eab28cab8cf26f1018f7cbfac510a503444f0f0d | [
"BSD-2-Clause-Patent"
] | 26 | 2019-07-24T03:27:14.000Z | 2022-03-11T10:44:49.000Z | ## @file
# Module that encodes and decodes a FMP_PAYLOAD_HEADER with a payload.
# The FMP_PAYLOAD_HEADER is processed by the FmpPayloadHeaderLib in the
# FmpDevicePkg.
#
# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
FmpPayloadHeader
'''
import s... | 33.905882 | 112 | 0.651631 |
7d9846b8c90e6af12c68768b068248c24ba1f30a | 1,580 | py | Python | 21-fs-ias-lec/15-AudioLink/Testing.py | paultroeger/BACnet | 855b931f2a0e9b64e9571f41de2a8cd71d7a01f4 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 21-fs-ias-lec/15-AudioLink/Testing.py | paultroeger/BACnet | 855b931f2a0e9b64e9571f41de2a8cd71d7a01f4 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 21-fs-ias-lec/15-AudioLink/Testing.py | paultroeger/BACnet | 855b931f2a0e9b64e9571f41de2a8cd71d7a01f4 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | from Sender import Sender
from Receiver import Receiver
import scipy
import numpy as np
import scipy.io
import scipy.io.wavfile
import matplotlib.pyplot as plt
from scipy import signal
testData = readWav('testbitsnopilots.wav')
subset = readWav('wrongbitstest.wav')
r = Receiver()
rate = 160
corr = 235292
offset... | 21.944444 | 81 | 0.68038 |
7d984b4f33bcef674a43431532ba484ab9af642d | 615 | py | Python | suppress.py | j0hntv/suppress | eea5dbdb904e67abdc792fd946ab51f4d550734f | [
"MIT"
] | null | null | null | suppress.py | j0hntv/suppress | eea5dbdb904e67abdc792fd946ab51f4d550734f | [
"MIT"
] | null | null | null | suppress.py | j0hntv/suppress | eea5dbdb904e67abdc792fd946ab51f4d550734f | [
"MIT"
] | null | null | null | """A simple wrapper around contextlib.suppress"""
import contextlib
from functools import wraps
__version__ = "0.1.1"
| 21.964286 | 50 | 0.604878 |
7d9928a0889c40b5a6ffd1d19e7ea9f5236cde32 | 7,015 | py | Python | anaconda_project/requirements_registry/requirements/conda_env.py | vertingo/Anaconda_Videos_Tutos | f30f2a0549a7b81c17f4d5d249edc59eb3c05458 | [
"BSD-3-Clause"
] | null | null | null | anaconda_project/requirements_registry/requirements/conda_env.py | vertingo/Anaconda_Videos_Tutos | f30f2a0549a7b81c17f4d5d249edc59eb3c05458 | [
"BSD-3-Clause"
] | null | null | null | anaconda_project/requirements_registry/requirements/conda_env.py | vertingo/Anaconda_Videos_Tutos | f30f2a0549a7b81c17f4d5d249edc59eb3c05458 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2016, Anaconda, Inc. All rights reserved.
#
# Licensed under the terms of the BSD 3-Clause License.
# The full license is in the file LICENSE.txt, distributed with this software.
# -------------------... | 41.264706 | 116 | 0.623236 |
7d9a43e7079b4241b2e56a68cd01b2edf6c43289 | 1,697 | py | Python | data_utils/dataset/kodak_dataset.py | hieu1999210/image_compression | 3faf90d704782e1d6a186b0c8ea7fb1e2ec97a2c | [
"Apache-2.0"
] | null | null | null | data_utils/dataset/kodak_dataset.py | hieu1999210/image_compression | 3faf90d704782e1d6a186b0c8ea7fb1e2ec97a2c | [
"Apache-2.0"
] | null | null | null | data_utils/dataset/kodak_dataset.py | hieu1999210/image_compression | 3faf90d704782e1d6a186b0c8ea7fb1e2ec97a2c | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Hieu Nguyen
#
# 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, ... | 26.936508 | 80 | 0.61815 |
7d9a756d138cef5d7f938318a3b5d1bd98451587 | 1,055 | py | Python | ohs/domain/create_component.py | codejsha/infrastructure | 01ff58fea0a7980fce30e37cb02a7c1217c46d9f | [
"Apache-2.0"
] | 4 | 2021-02-13T03:39:38.000Z | 2022-01-30T19:41:43.000Z | ohs/domain/create_component.py | codejsha/infrastructure | 01ff58fea0a7980fce30e37cb02a7c1217c46d9f | [
"Apache-2.0"
] | null | null | null | ohs/domain/create_component.py | codejsha/infrastructure | 01ff58fea0a7980fce30e37cb02a7c1217c46d9f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
domain_home = os.environ['DOMAIN_HOME']
node_manager_name = os.environ['NODE_MANAGER_NAME']
component_name = os.environ['COMPONENT_NAME']
component_admin_listen_address = os.environ['COMPONENT_ADMIN_LISTEN_ADDRESS']
component_admin_listen_port = os.environ['COMPONENT_ADMIN_LISTEN_PORT']
component... | 31.969697 | 77 | 0.777251 |
7d9ad66a69e3d43361db2e0fdcc4e1f1ce926057 | 1,965 | py | Python | ironicclient/tests/functional/test_driver.py | sapcc/python-ironicclient | 8dcbf5b6d0bc2c2dc3881dbc557e2e403e2fe2b4 | [
"Apache-2.0"
] | null | null | null | ironicclient/tests/functional/test_driver.py | sapcc/python-ironicclient | 8dcbf5b6d0bc2c2dc3881dbc557e2e403e2fe2b4 | [
"Apache-2.0"
] | null | null | null | ironicclient/tests/functional/test_driver.py | sapcc/python-ironicclient | 8dcbf5b6d0bc2c2dc3881dbc557e2e403e2fe2b4 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 34.473684 | 79 | 0.686514 |
7d9bd1161fcdf87364f5ca0317aac04cfac291b2 | 380 | py | Python | hw2/2.3 - list.py | ArtemNikolaev/gb-hw | b82403e39dc1ca530dc438309fc98ba89ce4337b | [
"Unlicense"
] | null | null | null | hw2/2.3 - list.py | ArtemNikolaev/gb-hw | b82403e39dc1ca530dc438309fc98ba89ce4337b | [
"Unlicense"
] | 40 | 2021-12-30T15:57:10.000Z | 2022-01-26T16:44:24.000Z | hw2/2.3 - list.py | ArtemNikolaev/gb-hw | b82403e39dc1ca530dc438309fc98ba89ce4337b | [
"Unlicense"
] | 1 | 2022-03-12T19:17:26.000Z | 2022-03-12T19:17:26.000Z | # https://github.com/ArtemNikolaev/gb-hw/issues/18
seasons = [
'',
'',
'',
''
]
month = int(input(' : '))
if month < 1 or month > 12:
print(' 12. - 1, - 12')
else:
seasonInt = (month % 12) // 3
print(' : ' + seasons[seasonInt]) | 23.75 | 84 | 0.634211 |
7d9be08030c54e953623ba6d26f1efa4c9f9a3bb | 414 | py | Python | modoboa/admin/signals.py | vinaebizs/modoboa | fb1e7f4c023b7eb6be3aa77174bfa12fc653670e | [
"0BSD"
] | null | null | null | modoboa/admin/signals.py | vinaebizs/modoboa | fb1e7f4c023b7eb6be3aa77174bfa12fc653670e | [
"0BSD"
] | null | null | null | modoboa/admin/signals.py | vinaebizs/modoboa | fb1e7f4c023b7eb6be3aa77174bfa12fc653670e | [
"0BSD"
] | null | null | null | """Modoboa admin signals."""
import django.dispatch
use_external_recipients = django.dispatch.Signal(providing_args=["recipients"])
extra_domain_actions = django.dispatch.Signal(
providing_args=["user", "domain"])
extra_domain_dashboard_widgets = django.dispatch.Signal(
providing_args=["user", "domain"])
extr... | 34.5 | 79 | 0.772947 |
7d9c78ce7d3a0631fc266360f9979634e2fb0ff2 | 1,401 | py | Python | psono/restapi/tests/health_check.py | psono/psono-fileserver | 537fd392ea9b50807451dbb814266dfeed8c783b | [
"Apache-2.0"
] | 2 | 2020-02-12T15:10:02.000Z | 2021-07-02T18:35:34.000Z | psono/restapi/tests/health_check.py | psono/psono-fileserver | 537fd392ea9b50807451dbb814266dfeed8c783b | [
"Apache-2.0"
] | 2 | 2019-10-29T18:59:26.000Z | 2019-12-28T15:43:19.000Z | psono/restapi/tests/health_check.py | psono/psono-fileserver | 537fd392ea9b50807451dbb814266dfeed8c783b | [
"Apache-2.0"
] | 4 | 2019-10-04T00:41:27.000Z | 2021-04-28T13:25:37.000Z | from django.urls import reverse
from rest_framework import status
from .base import APITestCaseExtended
from mock import patch
from restapi import models
| 20.910448 | 82 | 0.631692 |
7d9d90a49a7ce7f5c4dc585757591fb9e4a928b7 | 1,217 | py | Python | conftest.py | elijahr/python-portaudio | 8434396cf7a9faa8934cab289749daf08b04d0b3 | [
"MIT"
] | null | null | null | conftest.py | elijahr/python-portaudio | 8434396cf7a9faa8934cab289749daf08b04d0b3 | [
"MIT"
] | null | null | null | conftest.py | elijahr/python-portaudio | 8434396cf7a9faa8934cab289749daf08b04d0b3 | [
"MIT"
] | null | null | null | import asyncio
import contextlib
import glob
import itertools
import logging
import os
import pytest
import uvloop
try:
import tracemalloc
tracemalloc.start()
except ImportError:
# Not available in pypy
pass
# clear compiled cython tests
for path in itertools.chain(
glob.glob(os.path.join('... | 21.350877 | 112 | 0.676253 |
7d9edb01d9ce450078aba93d6df890971eee58cc | 3,297 | py | Python | tests/test_storage.py | angru/datamodel | d242b393970dac1a8a53603454ed870fe70b27cf | [
"MIT"
] | 2 | 2020-06-17T21:00:09.000Z | 2020-07-07T15:49:00.000Z | tests/test_storage.py | angru/datamodel | d242b393970dac1a8a53603454ed870fe70b27cf | [
"MIT"
] | 14 | 2020-06-17T14:39:19.000Z | 2020-12-25T17:05:43.000Z | tests/test_storage.py | angru/corm | d242b393970dac1a8a53603454ed870fe70b27cf | [
"MIT"
] | null | null | null | from corm import Entity, Field, Storage, RelationType
| 22.127517 | 65 | 0.59721 |
7da0f8191abd59b72b6876b877822726d97f2ede | 2,268 | py | Python | server/test/test_serverInfoAPI.py | rmetcalf9/VirtualPresencePicture | 4822d2dac0be18d0da30bab9a4f7a8b34091799e | [
"MIT"
] | null | null | null | server/test/test_serverInfoAPI.py | rmetcalf9/VirtualPresencePicture | 4822d2dac0be18d0da30bab9a4f7a8b34091799e | [
"MIT"
] | null | null | null | server/test/test_serverInfoAPI.py | rmetcalf9/VirtualPresencePicture | 4822d2dac0be18d0da30bab9a4f7a8b34091799e | [
"MIT"
] | null | null | null | from TestHelperSuperClass import testHelperAPIClient, env
import unittest
import json
from appObj import appObj
import pytz
import datetime
serverInfoWithoutAnyPictures = {
'Server': {
'Version': env['APIAPP_VERSION']
},
'Pictures': []
}
samplePictureIdentifier = 'ABC123'
samplePictureContent... | 36 | 111 | 0.738536 |
7da3966430bc2a6549730b528f313eb6f4d29793 | 7,990 | py | Python | zp_database/make_zp/create_hard_xray_zp.py | sajid-ali-nu/zone_plate_testing | c50afd575a6e733fce265db2ab8cc1c7b21cfe69 | [
"MIT"
] | null | null | null | zp_database/make_zp/create_hard_xray_zp.py | sajid-ali-nu/zone_plate_testing | c50afd575a6e733fce265db2ab8cc1c7b21cfe69 | [
"MIT"
] | null | null | null | zp_database/make_zp/create_hard_xray_zp.py | sajid-ali-nu/zone_plate_testing | c50afd575a6e733fce265db2ab8cc1c7b21cfe69 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# This script generates a zone plate pattern (based on partial filling) given the material, energy, grid size and number of zones as input
# In[1]:
import numpy as np
import matplotlib.pyplot as plt
from numba import njit
from joblib import Parallel, delayed
from tqdm import tq... | 29.592593 | 359 | 0.659324 |
7da45f218ab8516fdf8f91e39f9a7c42a449c690 | 1,740 | py | Python | model/kubernetes.py | adracus/cc-utils | dcd1ff544d8b18a391188903789d1cac929f50f9 | [
"Apache-2.0"
] | null | null | null | model/kubernetes.py | adracus/cc-utils | dcd1ff544d8b18a391188903789d1cac929f50f9 | [
"Apache-2.0"
] | null | null | null | model/kubernetes.py | adracus/cc-utils | dcd1ff544d8b18a391188903789d1cac929f50f9 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed
# under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Licens... | 31.071429 | 99 | 0.7 |
7da75a749aad9d8e1c359fa964268c99722cc54e | 180 | py | Python | test/test.py | justifyzz/Python-Assignment-1 | 8386203a9cf7099754586c26ba6646ec77dc6165 | [
"MIT"
] | null | null | null | test/test.py | justifyzz/Python-Assignment-1 | 8386203a9cf7099754586c26ba6646ec77dc6165 | [
"MIT"
] | null | null | null | test/test.py | justifyzz/Python-Assignment-1 | 8386203a9cf7099754586c26ba6646ec77dc6165 | [
"MIT"
] | null | null | null | from pycoingecko import CoinGeckoAPI
number = int(input('Enter the number of coins: '))
for i in range(length):
print(i + 1, ':', listOfNames[i], listOfMarketCaps[i])
| 22.5 | 62 | 0.672222 |
7da76f883c897444204f5a70123af7ff361ec610 | 2,528 | py | Python | pymagnitude/third_party/allennlp/tests/data/dataset_readers/snli_reader_test.py | tpeng/magnitude | aec98628b5547773ca8c4114ec6d1ad51e21b230 | [
"MIT"
] | 1,520 | 2018-03-01T13:37:49.000Z | 2022-03-25T11:40:20.000Z | pymagnitude/third_party/allennlp/tests/data/dataset_readers/snli_reader_test.py | tpeng/magnitude | aec98628b5547773ca8c4114ec6d1ad51e21b230 | [
"MIT"
] | 87 | 2018-03-03T15:12:50.000Z | 2022-02-21T15:24:12.000Z | pymagnitude/third_party/allennlp/tests/data/dataset_readers/snli_reader_test.py | tpeng/magnitude | aec98628b5547773ca8c4114ec6d1ad51e21b230 | [
"MIT"
] | 121 | 2018-03-03T08:40:53.000Z | 2022-03-16T05:19:38.000Z | # pylint: disable=no-self-use,invalid-name
from __future__ import division
from __future__ import absolute_import
import pytest
from allennlp.data.dataset_readers import SnliReader
from allennlp.common.util import ensure_list
from allennlp.common.testing import AllenNlpTestCase
| 52.666667 | 109 | 0.560918 |
7da9d5721ae20d0a2dd2bfb648ef9c35e133f2d4 | 4,362 | py | Python | binding/python/setup.py | pmateusz/libgexf | a25355db141a1d4e178553f42e37acfd9f485e3e | [
"MIT"
] | null | null | null | binding/python/setup.py | pmateusz/libgexf | a25355db141a1d4e178553f42e37acfd9f485e3e | [
"MIT"
] | null | null | null | binding/python/setup.py | pmateusz/libgexf | a25355db141a1d4e178553f42e37acfd9f485e3e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
setup.py file for Libgexf
"""
from setuptools import Extension, setup
#from distutils.core import Extension, setup
libgexf_module = Extension(
'_libgexf', # genere un _libgexf.so
include_dirs=['/usr/include/libxml2'],
sources=[
# 'libgexf.i', # genere u... | 36.049587 | 128 | 0.618294 |
7da9f98f6db4dd526d7eaf26e1220f285a37877a | 7,933 | bzl | Python | util/import/raze/crates.bzl | silas-enf/rules_rust | 41b39f0c9951dfda3bd0a95df31695578dd3f5ea | [
"Apache-2.0"
] | 1 | 2017-06-12T02:10:48.000Z | 2017-06-12T02:10:48.000Z | util/import/raze/crates.bzl | silas-enf/rules_rust | 41b39f0c9951dfda3bd0a95df31695578dd3f5ea | [
"Apache-2.0"
] | null | null | null | util/import/raze/crates.bzl | silas-enf/rules_rust | 41b39f0c9951dfda3bd0a95df31695578dd3f5ea | [
"Apache-2.0"
] | null | null | null | """
@generated
cargo-raze generated Bazel file.
DO NOT EDIT! Replaced on runs of cargo-raze
"""
load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository") # buildifier: disable=load
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # buildifier: disable=load
load("@bazel_tools//too... | 41.103627 | 103 | 0.658767 |
7dab84050bffe62a65b369edcbc5f292e22e4734 | 747 | py | Python | scripts/print_thread_name.py | Satheeshcharon/Multithreading-python | 4dcc18d5d417701d8f67f4d92ffa915e5c051a60 | [
"MIT"
] | null | null | null | scripts/print_thread_name.py | Satheeshcharon/Multithreading-python | 4dcc18d5d417701d8f67f4d92ffa915e5c051a60 | [
"MIT"
] | null | null | null | scripts/print_thread_name.py | Satheeshcharon/Multithreading-python | 4dcc18d5d417701d8f67f4d92ffa915e5c051a60 | [
"MIT"
] | null | null | null | #!/usr/bin/python
## This program creates a thread,
## officially names it and
## tries to print the name
import threading
import time
if __name__ == "__main__":
Main()
| 16.977273 | 55 | 0.710843 |
7dac2231269fa172423e388357c676a691296ba3 | 6,241 | py | Python | scripts/first_trace_success_test.py | axelzedigh/DLSCA | f4a04bbc008784cb3f48832a2b4394850048f116 | [
"Unlicense"
] | 9 | 2019-09-23T16:21:50.000Z | 2021-11-23T13:14:27.000Z | scripts/first_trace_success_test.py | axelzedigh/DLSCA | f4a04bbc008784cb3f48832a2b4394850048f116 | [
"Unlicense"
] | null | null | null | scripts/first_trace_success_test.py | axelzedigh/DLSCA | f4a04bbc008784cb3f48832a2b4394850048f116 | [
"Unlicense"
] | 7 | 2019-07-12T06:30:23.000Z | 2021-11-23T13:14:29.000Z | import os.path
import sys
import h5py
import numpy as np
import matplotlib.pyplot as plt
from keras.models import load_model
from keras.losses import categorical_crossentropy
import tensorflow as tf
import heapq
import re
modelName = 'CW_validation.h5'
successResultsNPY = []
###########################################... | 39.751592 | 108 | 0.628425 |
7dacf9f865f47f80badfe339d0f2b8574ea5fb66 | 360 | py | Python | raptrcontainer/appropriated/admin.py | richard-parks/RAPTR | ff1342af4ee6447ab9cc21735e79efb7623df805 | [
"Unlicense"
] | null | null | null | raptrcontainer/appropriated/admin.py | richard-parks/RAPTR | ff1342af4ee6447ab9cc21735e79efb7623df805 | [
"Unlicense"
] | 2 | 2018-11-29T21:03:54.000Z | 2018-12-02T04:41:36.000Z | raptrcontainer/appropriated/admin.py | NOAA-PMEL/Admin_RAPTR | 2353aaa9500dce2e2e65a8d21e802b37c6990054 | [
"Unlicense"
] | null | null | null | from django.contrib import admin
from .models import AppropriatedHistory
| 18.947368 | 49 | 0.644444 |