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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e867f8f3576d97ab9d96c3cce77d0aca4dd635a2 | 89,179 | py | Python | src/python/grpcio/grpc_core_dependencies.py | stungkit/grpc | 063c36cb46733c13d2ce8116b6af482c9bd832d6 | [
"Apache-2.0"
] | null | null | null | src/python/grpcio/grpc_core_dependencies.py | stungkit/grpc | 063c36cb46733c13d2ce8116b6af482c9bd832d6 | [
"Apache-2.0"
] | null | null | null | src/python/grpcio/grpc_core_dependencies.py | stungkit/grpc | 063c36cb46733c13d2ce8116b6af482c9bd832d6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 64.342713 | 131 | 0.753182 |
e8680e2e4605af2acbb58f33bf478b6b4b11be9c | 532 | py | Python | kottaslau/models/Station.py | mulore/kottaslau | 0f9b166bc554666e3e779cdd79cf29153faaca3f | [
"MIT"
] | null | null | null | kottaslau/models/Station.py | mulore/kottaslau | 0f9b166bc554666e3e779cdd79cf29153faaca3f | [
"MIT"
] | null | null | null | kottaslau/models/Station.py | mulore/kottaslau | 0f9b166bc554666e3e779cdd79cf29153faaca3f | [
"MIT"
] | null | null | null | from models.Task import Task
class Station:
"""
Class used to represent a single station to which tasks are assigned.
...
Attributes
----------
station_id : str
station's unique id
out_line_cost : Dict[str, float]
for each task in the station, saved the out-li... | 28 | 120 | 0.62594 |
e86840428fb60a0ab0a0bd14d6177b8c190fb792 | 10,844 | py | Python | foox/species/second.py | butayama/foox | 7c73c54f125a95250624ba53767b758232033427 | [
"MIT"
] | 94 | 2015-01-27T18:42:09.000Z | 2022-02-11T13:42:38.000Z | foox/species/second.py | butayama/foox | 7c73c54f125a95250624ba53767b758232033427 | [
"MIT"
] | 1 | 2016-04-12T18:10:29.000Z | 2016-04-13T17:10:21.000Z | foox/species/second.py | butayama/foox | 7c73c54f125a95250624ba53767b758232033427 | [
"MIT"
] | 37 | 2015-01-23T21:31:21.000Z | 2021-07-18T22:45:35.000Z | """
This module encapsulates the behaviour of second species counterpoint.
"""
import random
import foox.ga as ga
from .utils import is_parallel, make_generate_function, is_stepwise_motion
# Some sane defaults.
DEFAULT_POPULATION_SIZE = 1000
DEFAULT_MAX_GENERATION = 200
DEFAULT_MUTATION_RANGE = 7
DEFAULT_MUTATION_RA... | 36.511785 | 78 | 0.641645 |
e86894021fe5e6b715f4373e3f50e518758b0867 | 4,644 | py | Python | meta_model/batchers.py | jackd/meta-model | 3ad44c3e12011d4a2309725d05b8678d19f1e23f | [
"Apache-2.0"
] | null | null | null | meta_model/batchers.py | jackd/meta-model | 3ad44c3e12011d4a2309725d05b8678d19f1e23f | [
"Apache-2.0"
] | null | null | null | meta_model/batchers.py | jackd/meta-model | 3ad44c3e12011d4a2309725d05b8678d19f1e23f | [
"Apache-2.0"
] | null | null | null | import abc
import tensorflow as tf
from meta_model import utils
@utils.register_serializable
class Batcher(abc.ABC):
def __init__(self, batch_size: int, drop_remainder: bool = False):
assert isinstance(batch_size, int)
self._batch_size = batch_size
self._drop_remainder = drop_remainder
... | 32.704225 | 86 | 0.627692 |
e868caaa82dd8a7e5bf7620b3cfffb68fa538e36 | 44,072 | py | Python | moto/dynamodb2/models.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 2 | 2018-01-29T14:50:38.000Z | 2018-05-12T10:45:31.000Z | moto/dynamodb2/models.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 1 | 2021-03-19T11:56:45.000Z | 2021-03-19T11:56:45.000Z | moto/dynamodb2/models.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 12 | 2017-09-06T22:11:15.000Z | 2021-05-28T17:22:31.000Z | from __future__ import unicode_literals
from collections import defaultdict
import copy
import datetime
import decimal
import json
import re
import uuid
import six
import boto3
from moto.compat import OrderedDict
from moto.core import BaseBackend, BaseModel
from moto.core.utils import unix_time
from moto.core.exceptio... | 40.029064 | 147 | 0.570135 |
e868cf9df920db304b1e226bd011eb178ff37024 | 6,101 | py | Python | algorithm.py | Abszoluto/cryptograph-file | d675c62276c7c763d4964620ecb5741a59030f2f | [
"MIT"
] | null | null | null | algorithm.py | Abszoluto/cryptograph-file | d675c62276c7c763d4964620ecb5741a59030f2f | [
"MIT"
] | null | null | null | algorithm.py | Abszoluto/cryptograph-file | d675c62276c7c763d4964620ecb5741a59030f2f | [
"MIT"
] | null | null | null | """
* Author: Abszoluto
* Code made with Python 3.7.0
* What does that do ?
This is a code that will open a file and cryptograph its content
The cryptograph method is Vigenere Cypher
* Version 4.0
Main menu not working
Terminal commands improved with -i ... | 39.36129 | 143 | 0.584822 |
e868d5bd4562c526d8637ac8555ec89f8c3e242d | 1,830 | py | Python | tests/test_writer_tsv.py | psd/openregister | 7aa831464f2917c5be7a5ae34ff4c0de96451811 | [
"MIT"
] | null | null | null | tests/test_writer_tsv.py | psd/openregister | 7aa831464f2917c5be7a5ae34ff4c0de96451811 | [
"MIT"
] | null | null | null | tests/test_writer_tsv.py | psd/openregister | 7aa831464f2917c5be7a5ae34ff4c0de96451811 | [
"MIT"
] | null | null | null | import io
from openregister import Item
from openregister.representations.tsv import Writer
def test_writer_zero_items():
out = io.StringIO()
writer = Writer(out, fieldnames=[])
writer.close()
string = out.getvalue()
assert string == "\n"
def test_writer_zero_items_titles():
out = io.String... | 24.4 | 87 | 0.612022 |
e869080485e20606e85e271940dda8ec67c0da32 | 3,959 | py | Python | data_prep/rgb_to_v1v2_cmdlne.py | MSchnei/MRI_segmentation_preparation_scripts | 02f65b584e09908247202fff57714b63ef44e7dd | [
"MIT"
] | 1 | 2022-03-17T15:46:25.000Z | 2022-03-17T15:46:25.000Z | data_prep/rgb_to_v1v2_cmdlne.py | MSchnei/MRI_segmentation_preparation_scripts | 02f65b584e09908247202fff57714b63ef44e7dd | [
"MIT"
] | null | null | null | data_prep/rgb_to_v1v2_cmdlne.py | MSchnei/MRI_segmentation_preparation_scripts | 02f65b584e09908247202fff57714b63ef44e7dd | [
"MIT"
] | null | null | null | """Create isometric logratio transformed coordinates for MRI data."""
from matplotlib.colors import LogNorm
import matplotlib.pyplot as plt
import os
import sys
import numpy as np
import compoda.core as tet
from compoda.utils import scale_range
from nibabel import load, save, Nifti1Image
"""Load Data"""
# check wheth... | 30.689922 | 80 | 0.674665 |
e86935e6035ca541ce330cd2446b6cad06de20be | 386 | py | Python | cride/circles/migrations/0003_rename_is_verified_circle_verified.py | frorozcol-UN/Cride_platzi | 0c6160492bf4f7f439ab5a8b56464f0f1b2bd428 | [
"MIT"
] | null | null | null | cride/circles/migrations/0003_rename_is_verified_circle_verified.py | frorozcol-UN/Cride_platzi | 0c6160492bf4f7f439ab5a8b56464f0f1b2bd428 | [
"MIT"
] | null | null | null | cride/circles/migrations/0003_rename_is_verified_circle_verified.py | frorozcol-UN/Cride_platzi | 0c6160492bf4f7f439ab5a8b56464f0f1b2bd428 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-11-27 21:53
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('circles', '0002_rename_verified_circle_is_verified'),
]
operations = [
migrations.RenameField(
model_name='circle',
old_name... | 20.315789 | 63 | 0.608808 |
e869803d85b45e42fc9c588a900483c0453da25c | 1,742 | py | Python | functest/core/testcase_base.py | mytianfu/functest | 1001f3f7adff734ae80d17ce65914f60c6cce18d | [
"Apache-2.0"
] | null | null | null | functest/core/testcase_base.py | mytianfu/functest | 1001f3f7adff734ae80d17ce65914f60c6cce18d | [
"Apache-2.0"
] | null | null | null | functest/core/testcase_base.py | mytianfu/functest | 1001f3f7adff734ae80d17ce65914f60c6cce18d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2016 Orange 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
import os
... | 32.259259 | 78 | 0.646958 |
e869cb146e30e6a39c7dc0ebf0416270c2cf96d4 | 1,417 | py | Python | django_auth_adfs/views.py | leibowitz/django-auth-adfs | 10b664aa55518fb0df806d4256e0883e012b9b5b | [
"BSD-2-Clause"
] | null | null | null | django_auth_adfs/views.py | leibowitz/django-auth-adfs | 10b664aa55518fb0df806d4256e0883e012b9b5b | [
"BSD-2-Clause"
] | null | null | null | django_auth_adfs/views.py | leibowitz/django-auth-adfs | 10b664aa55518fb0df806d4256e0883e012b9b5b | [
"BSD-2-Clause"
] | null | null | null | from django.conf import settings as django_settings
from django.contrib.auth import authenticate, login
from django.http.response import HttpResponse
from django.shortcuts import redirect
from django.views.generic import View
from django_auth_adfs.config import settings
class OAuth2View(View):
def get(self, requ... | 36.333333 | 78 | 0.626676 |
e869d86486965d1bac65241fd6d6ec04764e5e08 | 1,296 | py | Python | tests/pyregex/test_file_ext.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | tests/pyregex/test_file_ext.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | tests/pyregex/test_file_ext.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | import unittest
from pyregex.file_extensions import is_img, is_audio
class FileExtTests(unittest.TestCase):
def test_1(self):
self.assertEqual(is_audio("Nothing Else Matters.mp3"), False)
def test_2(self):
self.assertEqual(is_audio("NothingElseMatters.mp3"), True)
def test_3(self):
... | 24.923077 | 69 | 0.655093 |
e869d8c9506d0c275993c5f2eb5be72c6857fbc9 | 2,278 | py | Python | setup.py | martibosch/revelation | 7deb809b46cb3c90a98af7a846da7a81299cb3d5 | [
"MIT"
] | null | null | null | setup.py | martibosch/revelation | 7deb809b46cb3c90a98af7a846da7a81299cb3d5 | [
"MIT"
] | null | null | null | setup.py | martibosch/revelation | 7deb809b46cb3c90a98af7a846da7a81299cb3d5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""revelation setup file"""
import os
import re
from setuptools import find_packages, setup
PACKAGE = "revelation"
REQUIREMENTS = [
"Jinja2==2.10",
"Werkzeug==0.14.1",
"click==6.7",
"gevent-websocket==0.10.1",
"gevent==1.3.6",
"watchdog==0.8.3",
]... | 28.475 | 73 | 0.610184 |
e869f95674a9fd0f6235a97af1a93b043ed5a42c | 790 | py | Python | catkin_ws/build/turtlebot3_msgs/cmake/turtlebot3_msgs-genmsg-context.py | a-yildiz/ROS-Simple-Sample-Packages | eb6b18adcd1fe26e2b5e644c42922e8102867cd9 | [
"MIT"
] | 1 | 2021-09-19T07:51:23.000Z | 2021-09-19T07:51:23.000Z | catkin_ws/build/turtlebot3_msgs/cmake/turtlebot3_msgs-genmsg-context.py | a-yildiz/ROS-Simple-Sample-Packages | eb6b18adcd1fe26e2b5e644c42922e8102867cd9 | [
"MIT"
] | null | null | null | catkin_ws/build/turtlebot3_msgs/cmake/turtlebot3_msgs-genmsg-context.py | a-yildiz/ROS-Simple-Sample-Packages | eb6b18adcd1fe26e2b5e644c42922e8102867cd9 | [
"MIT"
] | null | null | null | # generated from genmsg/cmake/pkg-genmsg.context.in
messages_str = "/home/yildiz/GitRepos/ROS_Samples/catkin_ws/src/turtlebot3_msgs/msg/SensorState.msg;/home/yildiz/GitRepos/ROS_Samples/catkin_ws/src/turtlebot3_msgs/msg/VersionInfo.msg;/home/yildiz/GitRepos/ROS_Samples/catkin_ws/src/turtlebot3_msgs/msg/Sound.msg"
serv... | 65.833333 | 262 | 0.810127 |
e86a3c7b9d493691211e1e42ea1eb09d8283b2ce | 13,440 | py | Python | ansible/roles/test/files/ptftests/fib_test.py | manjuv1/sonic-mgmt | ad761a0400b573dc6a9ede931a6bf5d461b2fafa | [
"Apache-2.0"
] | null | null | null | ansible/roles/test/files/ptftests/fib_test.py | manjuv1/sonic-mgmt | ad761a0400b573dc6a9ede931a6bf5d461b2fafa | [
"Apache-2.0"
] | null | null | null | ansible/roles/test/files/ptftests/fib_test.py | manjuv1/sonic-mgmt | ad761a0400b573dc6a9ede931a6bf5d461b2fafa | [
"Apache-2.0"
] | null | null | null | '''
Description: This file contains the FIB test for SONIC
Design is available in https://github.com/Azure/SONiC/wiki/FIB-Scale-Test-Plan
Usage: Examples of how to use log analyzer
ptf --test-dir fib fib_test.FibTest --platform remote -t 'router_mac="00:02:03:04:05:00";rou... | 45.252525 | 154 | 0.563021 |
e86a44f18e0fd8fcf9afb868bd45e4946eea77d4 | 88 | py | Python | carrot/apps.py | martinell/django-carrot | 11c8790d8e68ccd7757cc9187d852acb2f528a8d | [
"Apache-2.0"
] | 63 | 2017-10-12T19:38:17.000Z | 2022-02-21T15:56:17.000Z | carrot/apps.py | martinell/django-carrot | 11c8790d8e68ccd7757cc9187d852acb2f528a8d | [
"Apache-2.0"
] | 93 | 2017-10-13T06:17:14.000Z | 2022-03-02T14:25:40.000Z | carrot/apps.py | martinell/django-carrot | 11c8790d8e68ccd7757cc9187d852acb2f528a8d | [
"Apache-2.0"
] | 19 | 2018-03-26T08:33:13.000Z | 2022-03-17T04:33:49.000Z | from django.apps import AppConfig
class CarrotConfig(AppConfig):
name = 'carrot'
| 12.571429 | 33 | 0.738636 |
e86a4c192e7be943efb807e4d43cdab3052cd9aa | 5,539 | py | Python | alphafold/data/tools/hhblits.py | xxchenxx/alphafold | 41e4d0c90aaad9920ee25d8431c6b54bf69d417b | [
"Apache-2.0"
] | null | null | null | alphafold/data/tools/hhblits.py | xxchenxx/alphafold | 41e4d0c90aaad9920ee25d8431c6b54bf69d417b | [
"Apache-2.0"
] | null | null | null | alphafold/data/tools/hhblits.py | xxchenxx/alphafold | 41e4d0c90aaad9920ee25d8431c6b54bf69d417b | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 35.50641 | 79 | 0.631161 |
e86a620dee9290f13aa4413f2fab04bbc9e66022 | 1,266 | py | Python | util/convpathtobase64.py | awsomesawce/my-python-scripts | f9a1d1b0956135e720467bdeb6e5f0e669630112 | [
"BSD-2-Clause"
] | null | null | null | util/convpathtobase64.py | awsomesawce/my-python-scripts | f9a1d1b0956135e720467bdeb6e5f0e669630112 | [
"BSD-2-Clause"
] | null | null | null | util/convpathtobase64.py | awsomesawce/my-python-scripts | f9a1d1b0956135e720467bdeb6e5f0e669630112 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# Base64 encode a path-like object
"""With as little code as possible, encode a string object into
bytes, then into base64.
Optionally create shell script from this (python -m myscript mystring)"""
import os
import sys
import pathlib
import base64
encode = base64.standard_b64encode
def getbase6... | 25.836735 | 80 | 0.697472 |
e86a71d08b6e803b39b60b1de52bf027d6789cf3 | 505 | py | Python | slavdict/dictionary/migrations/0025_auto_20180523_1900.py | slavdict/slavdict | 893886b80de413cb2bb6c0af5adba9c55aa6a7af | [
"CC0-1.0"
] | 1 | 2022-01-17T17:26:25.000Z | 2022-01-17T17:26:25.000Z | slavdict/dictionary/migrations/0025_auto_20180523_1900.py | slavdict/slavdict | 893886b80de413cb2bb6c0af5adba9c55aa6a7af | [
"CC0-1.0"
] | 8 | 2020-02-12T13:26:05.000Z | 2022-02-10T19:28:07.000Z | slavdict/dictionary/migrations/0025_auto_20180523_1900.py | slavdict/slavdict | 893886b80de413cb2bb6c0af5adba9c55aa6a7af | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-05-23 19:00
from django.db import migrations
def move_position_data(apps, schema_editor):
Translation = apps.get_model('dictionary', 'Translation')
for t in Translation.objects.all():
t.fragment_end = t.position
t.save()
class Mig... | 22.954545 | 61 | 0.665347 |
e86a8b17c85f8bf9c58ea02f290a655155984ca5 | 2,930 | py | Python | oscar/lib/python2.7/site-packages/prompt_toolkit/auto_suggest.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/prompt_toolkit/auto_suggest.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/prompt_toolkit/auto_suggest.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """
`Fish-style <http://fishshell.com/>`_ like auto-suggestion.
While a user types input in a certain buffer, suggestions are generated
(asynchronously.) Usually, they are displayed after the input. When the cursor
presses the right arrow and the cursor is at the end of the input, the
suggestion will be inserte... | 32.921348 | 82 | 0.646416 |
e86a8e5a5baa5657f92243172c818518af7c77dc | 5,459 | py | Python | tensorflow/python/ops/histogram_ops.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/ops/histogram_ops.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/ops/histogram_ops.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.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.909722 | 80 | 0.666239 |
e86aa0bbb5d842d88ddf12766cd6184fe0cd4925 | 5,362 | py | Python | src/merge_branch_fc.py | knmac/LCDC_release | f977ca1cda972983cac7e33b324f07f2e1463a19 | [
"MIT"
] | 24 | 2019-09-18T09:22:08.000Z | 2022-03-08T06:47:33.000Z | src/merge_branch_fc.py | knmac/LCDC_release | f977ca1cda972983cac7e33b324f07f2e1463a19 | [
"MIT"
] | 6 | 2019-09-18T09:21:02.000Z | 2022-02-09T23:31:48.000Z | src/merge_branch_fc.py | knmac/LCDC_release | f977ca1cda972983cac7e33b324f07f2e1463a19 | [
"MIT"
] | 4 | 2020-08-06T02:05:36.000Z | 2021-12-12T07:19:17.000Z | """Merge two branches using fc layer
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import sys
import os
sys.path.insert(
0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'src')))
import numpy as np
import scipy.io as sio
import gl... | 31.174419 | 80 | 0.633159 |
e86aa859a9236923c48e4719b2148f6c4ccc9322 | 3,063 | py | Python | dataset.py | wjc852456/pytorch-mobilenet-v2 | f1817557a55a5784b67355fb30939bdee19ab5fd | [
"Apache-2.0"
] | 3 | 2018-08-01T02:13:41.000Z | 2018-10-26T15:01:37.000Z | dataset.py | wjc852456/pytorch-mobilenet-v2 | f1817557a55a5784b67355fb30939bdee19ab5fd | [
"Apache-2.0"
] | null | null | null | dataset.py | wjc852456/pytorch-mobilenet-v2 | f1817557a55a5784b67355fb30939bdee19ab5fd | [
"Apache-2.0"
] | 1 | 2019-11-21T03:07:23.000Z | 2019-11-21T03:07:23.000Z | import sys
sys.path.append("../")
import os
import os.path
import numpy as np
import torch
from torch.utils import data
import torchvision.transforms as transforms
import torchvision.datasets as datasets
import torchvision.models as models
normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406],
... | 32.935484 | 118 | 0.624878 |
e86aac3beea89c8d4bd97e2c96e855ff8ef41ffb | 1,601 | py | Python | tests/test_rpt_gene2go_evidencecodes.py | cinaljess/goatools | 8cd603df88fcb49da970e37c445cdb1bdd17ee01 | [
"BSD-2-Clause"
] | null | null | null | tests/test_rpt_gene2go_evidencecodes.py | cinaljess/goatools | 8cd603df88fcb49da970e37c445cdb1bdd17ee01 | [
"BSD-2-Clause"
] | null | null | null | tests/test_rpt_gene2go_evidencecodes.py | cinaljess/goatools | 8cd603df88fcb49da970e37c445cdb1bdd17ee01 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
"""Tests that all evidence codes seen in NCBI's gene2go have description."""
from __future__ import print_function
__copyright__ = "Copyright (C) 2016-2019, DV Klopfenstein, H Tang. All rights reserved."
__author__ = "DV Klopfenstein"
import os
from goatools.associations import dnld_ncbi_gene... | 35.577778 | 88 | 0.648969 |
e86ab2e63a4c9622cfe95fb37d5fc56425f56d66 | 8,932 | py | Python | google-datacatalog-sisense-connector/src/google/datacatalog_connectors/sisense/scrape/rest_api_helper.py | anugrah86/datacatalog-connectors-bi | 58cc57e12632cbd1e237b3d6930e519333c51f4e | [
"Apache-2.0"
] | 27 | 2020-04-27T21:55:49.000Z | 2022-02-18T22:09:13.000Z | google-datacatalog-sisense-connector/src/google/datacatalog_connectors/sisense/scrape/rest_api_helper.py | anugrah86/datacatalog-connectors-bi | 58cc57e12632cbd1e237b3d6930e519333c51f4e | [
"Apache-2.0"
] | 36 | 2020-05-01T15:26:14.000Z | 2022-03-26T00:09:19.000Z | google-datacatalog-sisense-connector/src/google/datacatalog_connectors/sisense/scrape/rest_api_helper.py | anugrah86/datacatalog-connectors-bi | 58cc57e12632cbd1e237b3d6930e519333c51f4e | [
"Apache-2.0"
] | 18 | 2020-04-30T22:14:09.000Z | 2022-01-13T10:28:03.000Z | #!/usr/bin/python
#
# Copyright 2021 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 ag... | 37.372385 | 79 | 0.61554 |
e86abb72d9919b5cdc61d52465ab3fcadd9e8e15 | 22,226 | py | Python | nova/virt/block_device.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/virt/block_device.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/virt/block_device.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 1 | 2020-07-24T01:18:44.000Z | 2020-07-24T01:18:44.000Z | # All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 37.928328 | 79 | 0.606002 |
e86abcb22111fdc5d6bf39cf3070228208fa5f51 | 5,168 | py | Python | credoscript/mixins/residuemixin.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | credoscript/mixins/residuemixin.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | credoscript/mixins/residuemixin.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | from sqlalchemy.orm import backref, relationship
from sqlalchemy.orm.collections import attribute_mapped_collection
from sqlalchemy.sql.expression import and_
from sqlalchemy.ext.declarative import declared_attr
from credoscript.mixins.base import paginate
class ResidueMixin(object):
"""
This Mixin is used fo... | 33.128205 | 151 | 0.565015 |
e86ac99696ff4bd1a6aa9a3939f3ec5ec0e0111d | 7,037 | py | Python | tests/test_potential.py | agolovanov/schrodinger | 6b7038b19250fe8052d709ca14c562177470c6b9 | [
"MIT"
] | null | null | null | tests/test_potential.py | agolovanov/schrodinger | 6b7038b19250fe8052d709ca14c562177470c6b9 | [
"MIT"
] | null | null | null | tests/test_potential.py | agolovanov/schrodinger | 6b7038b19250fe8052d709ca14c562177470c6b9 | [
"MIT"
] | 1 | 2020-12-10T16:06:16.000Z | 2020-12-10T16:06:16.000Z | import potential
import wavefunction
import numpy as np
import pytest
import random
def test_delta_potential():
x = np.linspace(-50, 50, 40000)
depths = np.linspace(0.1, 10, 10)
for d in depths:
v = potential.DeltaPotential1D(d)
assert(v.get_delta_depth() == d)
assert(v.get_number... | 35.00995 | 114 | 0.561319 |
e86ad9ee74f1b55bd77032e80fffdeb530faa18e | 5,168 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/operations/_resource_skus_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/operations/_resource_skus_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/operations/_resource_skus_operations.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 ... | 43.79661 | 133 | 0.664667 |
e86adfedd2643cd4cad6ca9278ae41fd393e0af7 | 14,158 | py | Python | test/service/test_drs.py | DataBiosphere/azul | abcaa7c6a04f1f5b8fd74e449e254eff6c433913 | [
"Apache-2.0"
] | 17 | 2018-07-20T02:53:35.000Z | 2022-01-11T12:27:31.000Z | test/service/test_drs.py | DataBiosphere/azul | abcaa7c6a04f1f5b8fd74e449e254eff6c433913 | [
"Apache-2.0"
] | 3,887 | 2018-06-29T15:23:02.000Z | 2022-03-31T23:29:37.000Z | test/service/test_drs.py | DataBiosphere/azul | abcaa7c6a04f1f5b8fd74e449e254eff6c433913 | [
"Apache-2.0"
] | 21 | 2018-07-06T03:17:33.000Z | 2022-02-18T04:10:02.000Z | import base64
import json
import unittest
from unittest import (
mock,
)
from unittest.mock import (
MagicMock,
)
import urllib.parse
from chalice.config import (
Config as ChaliceConfig,
)
import requests
import responses
from azul import (
config,
)
from azul.drs import (
AccessMethod,
)
from az... | 46.726073 | 120 | 0.514126 |
e86ae95eb5abf12e2cc331fa24f0b6b0373ad4fa | 4,787 | py | Python | geosoft/gxapi/GXMAPL.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 25 | 2017-07-14T06:39:37.000Z | 2022-03-09T21:39:51.000Z | geosoft/gxapi/GXMAPL.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 100 | 2016-12-13T17:30:41.000Z | 2021-08-01T20:21:13.000Z | geosoft/gxapi/GXMAPL.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 28 | 2016-12-12T17:34:40.000Z | 2022-03-16T15:39:39.000Z | ### extends 'class_empty.py'
### block ClassImports
# NOTICE: Do not edit anything here, it is generated code
from . import gxapi_cy
from geosoft.gxapi import GXContext, float_ref, int_ref, str_ref
### endblock ClassImports
### block Header
# NOTICE: The code generator will not replace the code in this block
### end... | 30.297468 | 135 | 0.619804 |
e86af1ae2a5846a1fc0b3f113e659edf94058c17 | 723 | py | Python | src/api/endpoints/activity_types/__init__.py | andela/andela-societies-backend | b8382f308449a08e5c7bda46c6deabe597cc2e25 | [
"MIT"
] | 1 | 2018-09-13T16:33:20.000Z | 2018-09-13T16:33:20.000Z | src/api/endpoints/activity_types/__init__.py | jonathankamau/andela-societies-backend | b8382f308449a08e5c7bda46c6deabe597cc2e25 | [
"MIT"
] | 6 | 2019-03-11T17:50:27.000Z | 2019-08-26T11:00:40.000Z | src/api/endpoints/activity_types/__init__.py | jonathankamau/andela-societies-backend | b8382f308449a08e5c7bda46c6deabe597cc2e25 | [
"MIT"
] | 9 | 2019-01-09T12:23:12.000Z | 2021-05-28T04:58:31.000Z | """setup activitiy_type request resource blueprint."""
def activitiy_type_bp(Api, Blueprint):
from .models import ActivityType
from .activity_types import ActivityTypesAPI
activitiy_type_bp_service = Blueprint('activitiy_type_api', __name__)
activitiy_type_api = Api(activitiy_type_bp_service)
# ... | 30.125 | 73 | 0.695712 |
e86afb49d5ae81ac514d8849050edd30eee7dfde | 343 | py | Python | Seeder/contracts/migrations/0005_remove_contract_creative_commons.py | WebarchivCZ/Seeder | 1958c5d3f6bdcbbdb2c81dcb6abc7f689125b6a8 | [
"MIT"
] | 8 | 2017-08-16T19:18:57.000Z | 2022-01-24T10:08:19.000Z | Seeder/contracts/migrations/0005_remove_contract_creative_commons.py | WebarchivCZ/Seeder | 1958c5d3f6bdcbbdb2c81dcb6abc7f689125b6a8 | [
"MIT"
] | 242 | 2017-02-03T19:15:52.000Z | 2022-03-25T08:02:52.000Z | Seeder/contracts/migrations/0005_remove_contract_creative_commons.py | WebarchivCZ/Seeder | 1958c5d3f6bdcbbdb2c81dcb6abc7f689125b6a8 | [
"MIT"
] | 2 | 2019-03-06T12:36:29.000Z | 2019-07-08T12:52:20.000Z | # Generated by Django 2.2.12 on 2020-06-19 11:47
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('contracts', '0004_auto_20200422_0741'),
]
operations = [
migrations.RemoveField(
model_name='contract',
name='creative_comm... | 19.055556 | 49 | 0.609329 |
e86b03ee9e34a0117f0f1d4be23ba08474b5dbbe | 7,831 | py | Python | oscar/lib/python2.7/site-packages/django/db/backends/base/introspection.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/db/backends/base/introspection.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/db/backends/base/introspection.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from collections import namedtuple
# Structure returned by DatabaseIntrospection.get_table_list()
TableInfo = namedtuple('TableInfo', ['name', 'type'])
# Structure returned by the DB-API cursor.description interface (PEP 249)
FieldInfo = namedtuple('FieldInfo', 'name type_code display_size internal_size precisi... | 43.265193 | 116 | 0.6284 |
e86b3a7fe5a1e55500cfa84affa05d3b378afbe7 | 884 | py | Python | myia/operations/prim_scalar_bit_or.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 222 | 2019-02-13T07:56:28.000Z | 2022-03-28T07:07:54.000Z | myia/operations/prim_scalar_bit_or.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 107 | 2019-02-12T21:56:39.000Z | 2022-03-12T01:08:03.000Z | myia/operations/prim_scalar_bit_or.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 27 | 2017-11-14T17:58:15.000Z | 2019-01-14T01:36:09.000Z | """Definitions for the primitive `scalar_bit_or` x | y."""
from ..lib import UniformPrimitiveInferrer, assert_scalar
from ..xtype import Integral
from . import primitives as P
def pyimpl_scalar_bit_or(x: Integral, y: Integral) -> Integral:
"""Implement `scalar_bit_or`."""
assert_scalar(x, y)
return x | y... | 26.787879 | 70 | 0.728507 |
e86b4446c4617dd8ee104d0b4db4ad3aa6e3ef9c | 1,697 | py | Python | dp_conceptual_search/search/query_helper.py | flaxandteal/dp-conceptual-search | 16c6383a61ba5b7069337c2626a0dc243bfe9d35 | [
"MIT"
] | 3 | 2018-05-10T16:49:27.000Z | 2022-03-29T15:23:04.000Z | dp_conceptual_search/search/query_helper.py | flaxandteal/dp-conceptual-search | 16c6383a61ba5b7069337c2626a0dc243bfe9d35 | [
"MIT"
] | 2 | 2018-09-20T06:37:27.000Z | 2018-11-12T12:05:08.000Z | dp_conceptual_search/search/query_helper.py | flaxandteal/dp-conceptual-search | 16c6383a61ba5b7069337c2626a0dc243bfe9d35 | [
"MIT"
] | 3 | 2018-06-25T10:48:43.000Z | 2021-04-11T08:01:27.000Z | from typing import List
from elasticsearch_dsl import query as Q
from dp_conceptual_search.search.dsl.script_score import ScriptScore
def match_by_uri(uri: str) -> Q.Query:
"""
Match a document by its uri
:param uri:
:return:
"""
if not uri.startswith("/"):
uri = "/" + uri
return... | 21.481013 | 88 | 0.610489 |
e86b4a5d70734148e22a14eaa76bf83be4a46f2f | 849 | py | Python | features/steps/cubes_steps.py | cloose/ray-tracer-challenge | 5e9dd56fb67c5cba47172986a963fc22a8cbcaa2 | [
"MIT"
] | null | null | null | features/steps/cubes_steps.py | cloose/ray-tracer-challenge | 5e9dd56fb67c5cba47172986a963fc22a8cbcaa2 | [
"MIT"
] | null | null | null | features/steps/cubes_steps.py | cloose/ray-tracer-challenge | 5e9dd56fb67c5cba47172986a963fc22a8cbcaa2 | [
"MIT"
] | null | null | null | from behave import given, when, then # pylint: disable=no-name-in-module
from asserts import assert_tuple
from core import vector
from shapes import Cube
@given(u'c <- cube()')
def step_create_cube_c(context):
context.c = Cube()
@when(u'xs <- local_intersect(c, r)')
def step_assign_local_intersect_between_cube... | 28.3 | 73 | 0.745583 |
e86b8a466ca31d4cf759ea95e2b1cd25c92a5e58 | 4,780 | py | Python | bf_bike_share_flask_predict_mod.py | hanumanthsistla/bf_si_test | e233a5b08c31be5dd91128fc61b26bedd941da34 | [
"MIT"
] | null | null | null | bf_bike_share_flask_predict_mod.py | hanumanthsistla/bf_si_test | e233a5b08c31be5dd91128fc61b26bedd941da34 | [
"MIT"
] | null | null | null | bf_bike_share_flask_predict_mod.py | hanumanthsistla/bf_si_test | e233a5b08c31be5dd91128fc61b26bedd941da34 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue May 5 13:43:42 2020
@author: hduser
"""
import requests, json
# url = '[http://localhost:8000/makecalc/](http://localhost:8000/makecalc/)'
url = 'http://localhost:8000/makecalc/'
# ==================================================================... | 25.978261 | 79 | 0.372803 |
e86b9619d598cc53404f01ca55e0a83e370a5380 | 4,285 | py | Python | oneflow/python/framework/python_callback.py | standbyme/oneflow | 9f504dfcc0fa4ac40e9d979e5cb7c3027bd2703d | [
"Apache-2.0"
] | null | null | null | oneflow/python/framework/python_callback.py | standbyme/oneflow | 9f504dfcc0fa4ac40e9d979e5cb7c3027bd2703d | [
"Apache-2.0"
] | null | null | null | oneflow/python/framework/python_callback.py | standbyme/oneflow | 9f504dfcc0fa4ac40e9d979e5cb7c3027bd2703d | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow 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 applicable law or agr... | 34.007937 | 108 | 0.689148 |
e86b9aff1122f98a80da3192f96e2c6f9d2ee8d4 | 2,318 | py | Python | src/api/bkuser_core/apis/v3/serializers.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | src/api/bkuser_core/apis/v3/serializers.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | src/api/bkuser_core/apis/v3/serializers.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the Lic... | 34.088235 | 115 | 0.668248 |
e86bca5e401d69bd355b02f71037fb00f6b632b0 | 3,613 | py | Python | intersight/models/ls_service_profile_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/ls_service_profile_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/ls_service_profile_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class LsServiceProfileRef(object):
"""
NOTE: This c... | 24.086667 | 77 | 0.541932 |
e86bd2448facf40caea437b50f4544213d78cf70 | 29,501 | py | Python | tests/test_flow_meter.py | volpatto/fluids | 693268d0fd7c9e2f276ebdf14353cb9d7dbac195 | [
"MIT"
] | null | null | null | tests/test_flow_meter.py | volpatto/fluids | 693268d0fd7c9e2f276ebdf14353cb9d7dbac195 | [
"MIT"
] | null | null | null | tests/test_flow_meter.py | volpatto/fluids | 693268d0fd7c9e2f276ebdf14353cb9d7dbac195 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2018 Caleb Bell <Caleb.Andrew.Bell@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
... | 51.039792 | 393 | 0.663164 |
e86bedde7618546aaaa6cc232a91128512962d5f | 3,739 | py | Python | ignition/int_gen/tests/test_generator.py | VictorEijkhout/ignition | 95cd8ada9281db31bb7c5a64f5561b43c472cb41 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2019-10-05T23:14:27.000Z | 2019-10-05T23:14:27.000Z | ignition/int_gen/tests/test_generator.py | VictorEijkhout/ignition | 95cd8ada9281db31bb7c5a64f5561b43c472cb41 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ignition/int_gen/tests/test_generator.py | VictorEijkhout/ignition | 95cd8ada9281db31bb7c5a64f5561b43c472cb41 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2019-11-14T01:27:23.000Z | 2019-11-14T01:27:23.000Z | import os
from subprocess import Popen, PIPE
import sympy
from ignition.int_gen.language import DiscFunc, Dom, Func
from ignition.int_gen.generator import gen_file, int_gen
def test_symbolic_fun():
x = sympy.Symbol("x")
intgrl = Func(sympy.cos(x), x) * Dom(x, 0, 1)
code = int_gen(intgrl, "tmp1", [])
... | 26.899281 | 80 | 0.555496 |
e86c1055aa7c36c30fd575134b6e150febceea56 | 1,093 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/max9744_simpletest.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/examples/max9744_simpletest.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/examples/max9744_simpletest.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2018 Tony DiCola for Adafruit Industries
# SPDX-License-Identifier: MIT
# Simple demo of the MAX9744 20W class D amplifier I2C control.
# This show how to set the volume of the amplifier.
import board
import busio
import adafruit_max9744
# Initialize I2C bus.
i2c = busio.I2C(board.SCL, boa... | 33.121212 | 76 | 0.759378 |
e86c32fb42b60c6519200f2dfbfa313aa4bee6ad | 10,836 | py | Python | box_blueprints/upload_file.py | shipyardapp/box-blueprints | 5e89be9d7b71ef5ac46218aba17965156d14d16d | [
"Apache-2.0"
] | null | null | null | box_blueprints/upload_file.py | shipyardapp/box-blueprints | 5e89be9d7b71ef5ac46218aba17965156d14d16d | [
"Apache-2.0"
] | 2 | 2020-08-03T18:34:15.000Z | 2020-08-03T18:46:10.000Z | box_blueprints/upload_file.py | shipyardapp/box-blueprints | 5e89be9d7b71ef5ac46218aba17965156d14d16d | [
"Apache-2.0"
] | null | null | null | import os
import re
import json
import tempfile
import argparse
import glob
from boxsdk import Client, JWTAuth
from boxsdk.exception import *
import logging
logging.getLogger('boxsdk').setLevel(logging.CRITICAL)
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument('--source-file-name-match... | 32.93617 | 96 | 0.673127 |
e86c4db6b47238db20c8f8f01f0f5e32a4848066 | 815 | py | Python | empryonic/plot.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | 1 | 2021-08-25T03:57:55.000Z | 2021-08-25T03:57:55.000Z | empryonic/plot.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | 1 | 2019-04-01T13:39:09.000Z | 2019-04-01T13:39:09.000Z | empryonic/plot.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | 1 | 2018-11-15T13:17:26.000Z | 2018-11-15T13:17:26.000Z | from enthought.mayavi import mlab
def cutPlanes( volume, colormap='gist_ncar' ):
'''Display a 3D volume of scalars with two cut planes.
volume: a three dimensional array of scalars
'''
scalarField = mlab.pipeline.scalar_field( volume )
mlab.pipeline.image_plane_widget(scalarField,
... | 33.958333 | 58 | 0.51411 |
e86c5c787ff341527f92aaf29a17958d345805a5 | 2,467 | py | Python | venv/lib/python3.8/site-packages/dateparser/data/date_translation_data/nnh.py | yuta-komura/vishnu | 67173b674d5f4f3be189474103612447ef69ab44 | [
"MIT"
] | 1 | 2021-11-17T04:55:14.000Z | 2021-11-17T04:55:14.000Z | dateparser/data/date_translation_data/nnh.py | cool-RR/dateparser | c38336df521cc57d947dc2c9111539a72f801652 | [
"BSD-3-Clause"
] | null | null | null | dateparser/data/date_translation_data/nnh.py | cool-RR/dateparser | c38336df521cc57d947dc2c9111539a72f801652 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
info = {
"name": "nnh",
"date_order": "DMY",
"january": [
"saŋ tsetsɛ̀ɛ lùm"
],
"february": [
"saŋ kàg ngwóŋ"
],
"march": [
"saŋ lepyè shúm"
],
"april": [
"saŋ cÿó"
],
"may": [
"saŋ tsɛ̀ɛ cÿó"
],
"june": ... | 16.230263 | 33 | 0.291852 |
e86c7e090ef8aa877a7effc5d5eea3b766c20827 | 6,923 | py | Python | niapy/problems/schaffer.py | chinmay3/NiaPy | b4e5c0f98063e2a9eebd8d750f0922cfca88bc55 | [
"MIT"
] | null | null | null | niapy/problems/schaffer.py | chinmay3/NiaPy | b4e5c0f98063e2a9eebd8d750f0922cfca88bc55 | [
"MIT"
] | 1 | 2021-08-13T07:52:40.000Z | 2021-08-16T08:52:20.000Z | niapy/problems/schaffer.py | chinmay3/NiaPy | b4e5c0f98063e2a9eebd8d750f0922cfca88bc55 | [
"MIT"
] | 2 | 2021-08-08T08:29:53.000Z | 2021-08-12T15:31:55.000Z | # encoding=utf8
"""Implementations of Schaffer functions."""
import numpy as np
from niapy.problems.problem import Problem
__all__ = ['SchafferN2', 'SchafferN4', 'ExpandedSchaffer']
class SchafferN2(Problem):
r"""Implementations of Schaffer N. 2 functions.
Date: 2018
Author: Klemen Berkovič
Lice... | 34.615 | 214 | 0.547884 |
e86c95ba5536f74483711e1f9370b9862dc8ad79 | 6,353 | py | Python | pysyrenn/frontend/tests/concat_layer.py | 95616ARG/SyReNN | 19abf589e84ee67317134573054c648bb25c244d | [
"MIT"
] | 36 | 2019-08-19T06:17:52.000Z | 2022-03-11T09:02:40.000Z | pysyrenn/frontend/tests/concat_layer.py | 95616ARG/SyReNN | 19abf589e84ee67317134573054c648bb25c244d | [
"MIT"
] | 8 | 2020-04-09T20:59:04.000Z | 2022-03-11T23:56:50.000Z | pysyrenn/frontend/tests/concat_layer.py | 95616ARG/SyReNN | 19abf589e84ee67317134573054c648bb25c244d | [
"MIT"
] | 4 | 2021-01-13T11:17:55.000Z | 2021-06-28T19:36:04.000Z | """Tests the methods in concat_layer.py
"""
import numpy as np
import torch
from external.bazel_python.pytest_helper import main
from pysyrenn.frontend.strided_window_data import StridedWindowData
from pysyrenn.frontend.fullyconnected_layer import FullyConnectedLayer
from pysyrenn.frontend.normalize_layer import Normal... | 39.459627 | 79 | 0.709271 |
e86c98c97c5408ae2e09367d971c6294affbf58a | 2,739 | py | Python | code_and_dataset/config_parser.py | pcpLiu/DeepSeqPanII | 86ce7675a1c69fd6059216d98b1e65e315ace3eb | [
"MIT"
] | 11 | 2019-10-30T12:41:56.000Z | 2021-11-17T02:45:52.000Z | code_and_dataset/config_parser.py | pcpLiu/DeepSeqPanII | 86ce7675a1c69fd6059216d98b1e65e315ace3eb | [
"MIT"
] | 2 | 2020-12-18T00:02:54.000Z | 2021-11-19T02:33:37.000Z | code_and_dataset/config_parser.py | pcpLiu/DeepSeqPanII | 86ce7675a1c69fd6059216d98b1e65e315ace3eb | [
"MIT"
] | 3 | 2020-03-09T06:25:20.000Z | 2021-08-02T11:36:46.000Z | # -*- coding: utf-8 -*-
import os
import json
import torch
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
class Config:
def __init__(self, json_file):
self.config = json.loads(open(json_file).read())
self.device = torch.device("cuda:1" if torch.cuda.is_available() else "cpu")
self... | 24.675676 | 87 | 0.642935 |
e86c9b0f292ae316bbac25062d515f649144e5b4 | 5,522 | py | Python | custom_components/pfsense/binary_sensor.py | aneisch/home-assistant | d8a866d75f512d23ffa7b9e5d82d7c575ece3c76 | [
"Apache-2.0"
] | 18 | 2016-08-10T01:02:27.000Z | 2017-10-26T04:19:49.000Z | custom_components/pfsense/binary_sensor.py | aneisch/home-assistant | d8a866d75f512d23ffa7b9e5d82d7c575ece3c76 | [
"Apache-2.0"
] | null | null | null | custom_components/pfsense/binary_sensor.py | aneisch/home-assistant | d8a866d75f512d23ffa7b9e5d82d7c575ece3c76 | [
"Apache-2.0"
] | 4 | 2017-04-20T19:41:21.000Z | 2017-05-16T17:10:05.000Z | """pfSense integration."""
import logging
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_PROBLEM,
DEVICE_CLASS_UPDATE,
BinarySensorEntity,
BinarySensorEntityDescription,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import STATE_UNKNOWN
from homeassi... | 29.063158 | 86 | 0.642883 |
e86c9f9a0a1292df7fde9bc643c62c94d6ed3d34 | 215 | py | Python | server/settings/environments/development.py | HellsYeah/censortracker_backend | ccc582e7f9ed1eb46f1a7c241c53134b50336bb1 | [
"MIT"
] | null | null | null | server/settings/environments/development.py | HellsYeah/censortracker_backend | ccc582e7f9ed1eb46f1a7c241c53134b50336bb1 | [
"MIT"
] | null | null | null | server/settings/environments/development.py | HellsYeah/censortracker_backend | ccc582e7f9ed1eb46f1a7c241c53134b50336bb1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
This file contains all the settings that defines the development server.
SECURITY WARNING: don't run with debug turned on in production!
"""
DEBUG = True
ALLOWED_HOSTS = [
'*',
]
| 15.357143 | 72 | 0.669767 |
e86cb5c08cab1bd1cd5c293bb37e2777f4d6b587 | 94,806 | py | Python | sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_01_30_preview/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_01_30_preview/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_01_30_preview/models/_models_py3.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 ... | 41.202086 | 307 | 0.655507 |
e86cbd073cbafb8b412dcc5708b540d9fa20d14a | 2,113 | py | Python | fontFeatures/shaperLib/Routine.py | simoncozens/fontFeatures | d84359016019a845bf40f13d7afdb9adf813f374 | [
"BSD-3-Clause"
] | 51 | 2020-01-15T09:28:51.000Z | 2022-03-30T06:48:36.000Z | fontFeatures/shaperLib/Routine.py | simoncozens/fontFeatures | d84359016019a845bf40f13d7afdb9adf813f374 | [
"BSD-3-Clause"
] | 51 | 2020-05-11T18:51:25.000Z | 2021-12-20T12:55:08.000Z | fontFeatures/shaperLib/Routine.py | simoncozens/fontFeatures | d84359016019a845bf40f13d7afdb9adf813f374 | [
"BSD-3-Clause"
] | 8 | 2020-08-28T20:03:14.000Z | 2021-12-08T01:22:28.000Z | import logging
__all__ = ["apply_to_buffer"]
def is_forward(rules):
clearly_forward = False
clearly_reverse = False
for r in rules:
if hasattr(r, "reverse") and r.reverse:
clearly_reverse = True
else:
clearly_forward = True
if clearly_forward and clearly_revers... | 38.418182 | 117 | 0.561761 |
e86cc98892738697b6a63ba62bb8a06d1784ec01 | 11,213 | py | Python | userbot/plugins/got_memes.py | kumar451/CatUserbot | 44fab853232fad163fee63565cc4f3e645596527 | [
"MIT"
] | null | null | null | userbot/plugins/got_memes.py | kumar451/CatUserbot | 44fab853232fad163fee63565cc4f3e645596527 | [
"MIT"
] | null | null | null | userbot/plugins/got_memes.py | kumar451/CatUserbot | 44fab853232fad163fee63565cc4f3e645596527 | [
"MIT"
] | null | null | null | # BY @Deonnn
"""
Game of Thrones Dialogues That You Can Use In Everyday Situations
command .gotm
by @Deonnn
Game of Thrones Thoughts plugin
by @Deonnn
command .gott
"""
from telethon import events
import asyncio
from userbot import CMD_HELP
import os
import sys
import random
from userbot.utils import admin_cmd
... | 57.209184 | 216 | 0.653706 |
e86cfe3358c2d1a253fc5200ae5b818cb5e7e88d | 5,719 | py | Python | blog/views.py | andywar65/projetc_repo | a318b36d601a15a1d5e4a9bbc65d7bcbb5ac02ef | [
"BSD-2-Clause"
] | null | null | null | blog/views.py | andywar65/projetc_repo | a318b36d601a15a1d5e4a9bbc65d7bcbb5ac02ef | [
"BSD-2-Clause"
] | 2 | 2021-03-19T17:12:07.000Z | 2021-03-19T17:12:08.000Z | blog/views.py | andywar65/projetc_repo | a318b36d601a15a1d5e4a9bbc65d7bcbb5ac02ef | [
"BSD-2-Clause"
] | null | null | null | from django.shortcuts import render, get_object_or_404
from django.contrib.auth.mixins import PermissionRequiredMixin
from django.views.generic import (ListView, DetailView, CreateView,
TemplateView)
from django.views.generic.dates import (ArchiveIndexView, YearArchiveView,
MonthArchiveView, DayArchiveView, )
f... | 34.451807 | 86 | 0.678965 |
e86d1062f6ec9597510c9a3a7af4c32dd84c4df5 | 675 | py | Python | splunk_eventgen/lib/logutils_src/tests/logutil_tests.py | hyacker/eventgen | 2d33536e5b830b4bccb620b5239f25609c647c1a | [
"Apache-2.0"
] | 5 | 2017-09-01T22:48:30.000Z | 2022-03-06T05:04:05.000Z | splunk_eventgen/lib/logutils_src/tests/logutil_tests.py | hyacker/eventgen | 2d33536e5b830b4bccb620b5239f25609c647c1a | [
"Apache-2.0"
] | null | null | null | splunk_eventgen/lib/logutils_src/tests/logutil_tests.py | hyacker/eventgen | 2d33536e5b830b4bccb620b5239f25609c647c1a | [
"Apache-2.0"
] | 1 | 2022-03-06T05:04:14.000Z | 2022-03-06T05:04:14.000Z | #
# Copyright (C) 2008-2017 Vinay Sajip. See LICENSE.txt for details.
#
import sys
from test_testing import LoggingTest
from test_dictconfig import ConfigDictTest
from test_queue import QueueTest
from test_formatter import FormatterTest
from test_messages import MessageTest
from test_colorize import ColorizeTest
try:
... | 29.347826 | 77 | 0.76 |
e86d465da1ed2ce53116541ce71a48f26b12a972 | 1,730 | py | Python | goods2/migrations/0005_auto_20180613_1632.py | huachao2017/goodsdl | 3616d53b90696a97a5d56a064e2a14d484b821d7 | [
"Apache-2.0"
] | 3 | 2018-10-16T09:36:12.000Z | 2019-04-15T03:12:49.000Z | goods2/migrations/0005_auto_20180613_1632.py | huachao2017/goodsdl | 3616d53b90696a97a5d56a064e2a14d484b821d7 | [
"Apache-2.0"
] | null | null | null | goods2/migrations/0005_auto_20180613_1632.py | huachao2017/goodsdl | 3616d53b90696a97a5d56a064e2a14d484b821d7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-06-13 16:32
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('goods2', '0004_auto_20180613_1523'),
]
operations ... | 32.641509 | 138 | 0.575723 |
e86d545736bd97f2361f4a8110d694d1dd4a1a08 | 11,096 | py | Python | nnvm/python/nnvm/top/nn.py | Aimledge/tvm | f41c050fc681a9d9805e6c73e729df233e1acbac | [
"Apache-2.0"
] | null | null | null | nnvm/python/nnvm/top/nn.py | Aimledge/tvm | f41c050fc681a9d9805e6c73e729df233e1acbac | [
"Apache-2.0"
] | 2 | 2018-06-19T10:11:42.000Z | 2018-06-21T08:49:05.000Z | nnvm/python/nnvm/top/nn.py | Aimledge/tvm | f41c050fc681a9d9805e6c73e729df233e1acbac | [
"Apache-2.0"
] | 3 | 2018-05-29T05:54:15.000Z | 2018-06-11T09:51:51.000Z | # pylint: disable=invalid-name, unused-argument
"""Definition of nn ops"""
from __future__ import absolute_import
import tvm
import topi
from topi.util import get_const_int
from .tensor import _fschedule_broadcast, _fschedule_injective
from . import registry as reg
from .registry import OpPattern
# relu
reg.register_... | 35.793548 | 85 | 0.705209 |
e86d70b30cf774e5970114066623a152464dd954 | 16,662 | py | Python | scripts/pseudo_full_pangenome.py | AMARTELKE/Pangenome-with-Panaroo | b720debf8616882668d53600038c334393080d9b | [
"MIT"
] | null | null | null | scripts/pseudo_full_pangenome.py | AMARTELKE/Pangenome-with-Panaroo | b720debf8616882668d53600038c334393080d9b | [
"MIT"
] | null | null | null | scripts/pseudo_full_pangenome.py | AMARTELKE/Pangenome-with-Panaroo | b720debf8616882668d53600038c334393080d9b | [
"MIT"
] | null | null | null | import sys, os
import argparse
from collections import OrderedDict, defaultdict
import gffutils as gff
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
from io import StringIO
import numpy as np
from random import sample
from dendropy.simulate import treesim
from dendropy.model import r... | 37.611738 | 83 | 0.502641 |
e86d75af4e741d92c055d84d54956e7fde06b4b8 | 2,338 | py | Python | toontown/effects/DistributedFireworkShowAI.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/effects/DistributedFireworkShowAI.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/effects/DistributedFireworkShowAI.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | import random
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectAI import DistributedObjectAI
from direct.distributed.ClockDelta import *
from direct.task import Task
from otp.ai.MagicWordGlobal import *
from toontown.toonbase import ToontownGlobals
from toontown.parties import... | 38.966667 | 124 | 0.718135 |
e86d7d97e4243f949030468f296c13d22474a798 | 7,798 | py | Python | module/tests/views/test_admin_view.py | antkrit/project | 89172be482a640fe656c45a1c35ea1242cd98347 | [
"MIT"
] | null | null | null | module/tests/views/test_admin_view.py | antkrit/project | 89172be482a640fe656c45a1c35ea1242cd98347 | [
"MIT"
] | 1 | 2021-05-20T18:15:46.000Z | 2021-05-21T14:27:47.000Z | module/tests/views/test_admin_view.py | antkrit/project | 89172be482a640fe656c45a1c35ea1242cd98347 | [
"MIT"
] | null | null | null | """Testing route /admin"""
from flask import session
from flask_login import current_user
from module.server.models.user import User, State, Tariffs
from module.tests import captured_templates, init_app, login_user, logout_user
def test_admin_view_access_and_render(init_app):
"""Make sure route '/cabinet' works a... | 40.827225 | 98 | 0.603488 |
e86db7fc96b3667d0fac738fc039cd31af6fbc2b | 3,332 | py | Python | tests/conftest.py | jianlingzhong/xonsh | 42e2d792117ceeb0ab7ec8f92fb1177b21388f84 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | tests/conftest.py | jianlingzhong/xonsh | 42e2d792117ceeb0ab7ec8f92fb1177b21388f84 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | tests/conftest.py | jianlingzhong/xonsh | 42e2d792117ceeb0ab7ec8f92fb1177b21388f84 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | import glob
import builtins
import pytest
import xonsh.built_ins
from xonsh.built_ins import ensure_list_of_strs
from xonsh.execer import Execer
from xonsh.tools import XonshBlockError
from xonsh.jobs import tasks
from xonsh.events import events
from xonsh.platform import ON_WINDOWS
from tools import DummyShell, sp... | 34.350515 | 100 | 0.748499 |
e86dd448a43b9cca75a710dd22a02b984f061c93 | 3,657 | py | Python | phonlp/models/common/biaffine.py | WEYAI/PhoNLP | 8fefe49965dc6346c224a5636d9333a7ddf55a2c | [
"Apache-2.0"
] | 99 | 2020-12-31T05:44:17.000Z | 2022-03-17T08:48:54.000Z | phonlp/models/common/biaffine.py | WEYAI/PhoNLP | 8fefe49965dc6346c224a5636d9333a7ddf55a2c | [
"Apache-2.0"
] | 5 | 2020-12-31T14:44:50.000Z | 2021-12-17T08:54:06.000Z | phonlp/models/common/biaffine.py | WEYAI/PhoNLP | 8fefe49965dc6346c224a5636d9333a7ddf55a2c | [
"Apache-2.0"
] | 13 | 2020-12-31T05:49:37.000Z | 2021-12-29T16:34:42.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
class PairwiseBilinear(nn.Module):
"""A bilinear module that deals with broadcasting for efficient memory usage.
Input: tensors of sizes (N x L1 x D1) and (N x L2 x D2)
Output: tensor of size (N x L1 x L2 x O)"""
def __init__(self, in... | 39.322581 | 113 | 0.637681 |
e86e11e313c5499520ff0d967e72e1fb7d0410d7 | 22,592 | py | Python | mturk.py | soumye/dialog_without_dialog | 9f95d6fb457659f9007445d9036b94e639bddd8b | [
"MIT"
] | 3 | 2020-09-08T23:19:51.000Z | 2021-07-21T11:12:48.000Z | mturk.py | soumye/dialog_without_dialog | 9f95d6fb457659f9007445d9036b94e639bddd8b | [
"MIT"
] | 2 | 2021-01-08T02:08:09.000Z | 2021-11-15T23:51:02.000Z | mturk.py | soumye/dialog_without_dialog | 9f95d6fb457659f9007445d9036b94e639bddd8b | [
"MIT"
] | 2 | 2020-11-10T15:53:03.000Z | 2020-12-11T03:24:00.000Z | import os
import os.path as pth
import json
import argparse
import pickle as pkl
import random
import itertools
import datetime
import math
import hashlib
from subprocess import Popen
import pprint
import tabulate
import boto3
import joblib
import jinja2
import xmltodict
parser = argparse.ArgumentParser(
... | 41.226277 | 138 | 0.623716 |
e86e1c1053ccc1009f0969de4543849ba921680d | 1,362 | py | Python | indecisive/game/client/scenes/help_menu.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 15 | 2020-04-17T12:02:14.000Z | 2022-03-16T03:01:34.000Z | indecisive/game/client/scenes/help_menu.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 9 | 2020-04-25T01:57:16.000Z | 2020-04-29T11:42:34.000Z | indecisive/game/client/scenes/help_menu.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 55 | 2020-04-17T12:01:11.000Z | 2021-12-28T10:14:02.000Z | import arcade
from .base import Base
import json
class Help(Base):
def __init__(self, display):
self.spritelist = arcade.SpriteList()
self.spritedict = dict()
self.timeAlive = 0
self.sprite_setup()
self.display = display
def sprite_setup(self):
self.spritedict =... | 24.763636 | 91 | 0.543319 |
e86e3c198db0542a0993a7f243c1422140f71c20 | 2,434 | py | Python | src/reference_model/poseidon_python/constants.py | wengwz/poseidon-spinalhdl | 16f60c4e21fc893622620a4d46d13bd31ac03d81 | [
"MIT"
] | 1 | 2022-01-16T18:20:12.000Z | 2022-01-16T18:20:12.000Z | src/reference_model/poseidon_python/constants.py | datenlord/poseidon-spinal | 601d097216e3929f2c576d7e7c68913a5ec5b22e | [
"MIT"
] | null | null | null | src/reference_model/poseidon_python/constants.py | datenlord/poseidon-spinal | 601d097216e3929f2c576d7e7c68913a5ec5b22e | [
"MIT"
] | null | null | null | import basic
import os
def int_to_bin(num_int, length):
"""convert int to binary string of given length"""
num_str = bin(num_int)[2:]
str_len = len(num_str)
if length <= str_len:
return num_str[str_len - length : str_len]
else:
return num_str.zfill(length)
def xor_b... | 28.635294 | 88 | 0.606409 |
e86e7977aa9486085284217becb1f86707acfc1f | 1,084 | py | Python | tests/integration/test_alternative_images.py | gruyaume/grafana-k8s-operator | 6fe48473f20916c41b94a872abc29acb3c4a0b33 | [
"Apache-2.0"
] | null | null | null | tests/integration/test_alternative_images.py | gruyaume/grafana-k8s-operator | 6fe48473f20916c41b94a872abc29acb3c4a0b33 | [
"Apache-2.0"
] | null | null | null | tests/integration/test_alternative_images.py | gruyaume/grafana-k8s-operator | 6fe48473f20916c41b94a872abc29acb3c4a0b33 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2021 Canonical Ltd.
# See LICENSE file for licensing details.
import pytest
from helpers import check_grafana_is_ready, oci_image
grafana_resources = {"grafana-image": oci_image("./metadata.yaml", "grafana-image")}
@pytest.mark.abort_on_fail
async def test_build_and_deploy_with_al... | 37.37931 | 98 | 0.77214 |
e86e84708cdaf1d22c733148c85989df4fc96310 | 19,564 | py | Python | spacepackets/uslp/frame.py | robamu-org/py-spacepackets | 522b021ba5690f97a4b74ae8b110762a32eb9b19 | [
"Apache-2.0"
] | null | null | null | spacepackets/uslp/frame.py | robamu-org/py-spacepackets | 522b021ba5690f97a4b74ae8b110762a32eb9b19 | [
"Apache-2.0"
] | 3 | 2021-10-05T09:29:45.000Z | 2022-02-12T15:46:43.000Z | spacepackets/uslp/frame.py | robamu-org/py-spacepackets | 522b021ba5690f97a4b74ae8b110762a32eb9b19 | [
"Apache-2.0"
] | 1 | 2022-03-04T17:25:29.000Z | 2022-03-04T17:25:29.000Z | from __future__ import annotations
import enum
import struct
from .header import (
TruncatedPrimaryHeader,
PrimaryHeader,
SourceOrDestField,
determine_header_type,
HeaderType,
)
from .definitions import (
UslpInvalidRawPacketOrFrameLen,
UslpTruncatedFrameNotAllowed,
UslpInvalidConstruct... | 37.76834 | 100 | 0.650838 |
e86e9e103e174c1a9739a1d5545651b5fa8cad41 | 9,805 | py | Python | benchmark/checks/utils.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | benchmark/checks/utils.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | benchmark/checks/utils.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2019 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 may obtain a copy of the ... | 31.629032 | 127 | 0.64049 |
e86ec5555cf2e3849b232cfd5741e2c54ed8d876 | 1,345 | py | Python | py/0203.remove-linked-list-elements.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | py/0203.remove-linked-list-elements.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | py/0203.remove-linked-list-elements.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=203 lang=python3
#
# [203] Remove Linked List Elements
#
# https://leetcode.com/problems/remove-linked-list-elements/description/
#
# algorithms
# Easy (40.00%)
# Likes: 2851
# Dislikes: 128
# Total Accepted: 483.5K
# Total Submissions: 1.2M
# Testcase Example: '[1,2,6,3,4,5,6]\n6'
#
# Gi... | 19.214286 | 77 | 0.577695 |
e86ed67042b1fde6ac3488959c858e0e029a2713 | 280 | py | Python | tolqc-api/app/main/schema/library.py | sanger-tol/tolqc | 6ef535a0eb0028c5d9270ff18d95d38c6656cbdd | [
"MIT"
] | null | null | null | tolqc-api/app/main/schema/library.py | sanger-tol/tolqc | 6ef535a0eb0028c5d9270ff18d95d38c6656cbdd | [
"MIT"
] | null | null | null | tolqc-api/app/main/schema/library.py | sanger-tol/tolqc | 6ef535a0eb0028c5d9270ff18d95d38c6656cbdd | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2021 Genome Research Ltd.
#
# SPDX-License-Identifier: MIT
from main.model import TolqcLibrary
from .base import BaseSchema, setup_schema
@setup_schema
class LibrarySchema(BaseSchema):
class Meta(BaseSchema.BaseMeta):
model = TolqcLibrary
| 21.538462 | 51 | 0.775 |
e86eea74a76f5a3b92c1d1be315acd6dc09830c7 | 6,610 | py | Python | df_config/apps/pipeline.py | d9pouces/df_conf | b905e8efea80633c3b95c22c19c0d13604a71a5b | [
"CECILL-B"
] | null | null | null | df_config/apps/pipeline.py | d9pouces/df_conf | b905e8efea80633c3b95c22c19c0d13604a71a5b | [
"CECILL-B"
] | null | null | null | df_config/apps/pipeline.py | d9pouces/df_conf | b905e8efea80633c3b95c22c19c0d13604a71a5b | [
"CECILL-B"
] | null | null | null | # ##############################################################################
# This file is part of df_config #
# #
# Copyright (C) 2020 Matthieu Gallet <github@19pouces.net> ... | 33.72449 | 101 | 0.608623 |
e86f01100077928b6d0153a4b84b4a48bab3e856 | 6,193 | py | Python | city_scrapers/spiders/cook_electoral.py | noahkconley/city-scrapers | 37420ce3a9295c2aac68c0fb4a957ad41394a801 | [
"MIT"
] | null | null | null | city_scrapers/spiders/cook_electoral.py | noahkconley/city-scrapers | 37420ce3a9295c2aac68c0fb4a957ad41394a801 | [
"MIT"
] | null | null | null | city_scrapers/spiders/cook_electoral.py | noahkconley/city-scrapers | 37420ce3a9295c2aac68c0fb4a957ad41394a801 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
All spiders should yield data shaped according to the Open Civic Data
specification (http://docs.opencivicdata.org/en/latest/data/event.html).
"""
import scrapy
from datetime import datetime
from dateutil.parser import parse
from city_scrapers.spider import Spider
class Cook_electoralSpid... | 32.594737 | 134 | 0.569675 |
e86f34884e53aef8e8b0822b47f1a4f8b422079c | 3,796 | py | Python | test/unit/test_unpaired_loader.py | Zhiyuan-w/DeepReg | 3e372d1835fdc9468c026db3767dcf9e8d4a4b0e | [
"Apache-2.0"
] | 379 | 2020-07-18T22:00:53.000Z | 2022-03-31T05:17:29.000Z | test/unit/test_unpaired_loader.py | Zhiyuan-w/DeepReg | 3e372d1835fdc9468c026db3767dcf9e8d4a4b0e | [
"Apache-2.0"
] | 646 | 2020-07-18T08:55:48.000Z | 2022-03-29T02:24:54.000Z | test/unit/test_unpaired_loader.py | Zhiyuan-w/DeepReg | 3e372d1835fdc9468c026db3767dcf9e8d4a4b0e | [
"Apache-2.0"
] | 62 | 2020-07-26T05:00:23.000Z | 2022-02-22T21:58:19.000Z | # coding=utf-8
"""
Tests for deepreg/dataset/util.py in
pytest style
"""
from os.path import join
import numpy as np
from deepreg.dataset.loader.h5_loader import H5FileLoader
from deepreg.dataset.loader.nifti_loader import NiftiFileLoader
from deepreg.dataset.loader.unpaired_loader import UnpairedDataLoader
FileLoa... | 34.509091 | 84 | 0.595364 |
e86f51a3f302b29ffdf253e2f426a7e27b325c22 | 3,611 | py | Python | letsencrypt/achallenges.py | meehow/letsencrypt | 64073b234a6b87a574d873599a8d4dbf11729d5c | [
"Apache-2.0"
] | 1 | 2021-09-05T14:18:00.000Z | 2021-09-05T14:18:00.000Z | letsencrypt/achallenges.py | meehow/letsencrypt | 64073b234a6b87a574d873599a8d4dbf11729d5c | [
"Apache-2.0"
] | null | null | null | letsencrypt/achallenges.py | meehow/letsencrypt | 64073b234a6b87a574d873599a8d4dbf11729d5c | [
"Apache-2.0"
] | null | null | null | """Client annotated ACME challenges.
Please use names such as ``achall`` to distiguish from variables "of type"
:class:`acme.challenges.Challenge` (denoted by ``chall``)
and :class:`.ChallengeBody` (denoted by ``challb``)::
from acme import challenges
from acme import messages
from letsencrypt import achallenge... | 30.091667 | 78 | 0.67959 |
e86f94d8a7a756d37812c0ac6e31daca2dd687d3 | 4,476 | py | Python | datastruct/typing_ext.py | hgrecco/datastruct | a567b6293b56952756d1432a54fd799dff20c74e | [
"BSD-3-Clause"
] | null | null | null | datastruct/typing_ext.py | hgrecco/datastruct | a567b6293b56952756d1432a54fd799dff20c74e | [
"BSD-3-Clause"
] | null | null | null | datastruct/typing_ext.py | hgrecco/datastruct | a567b6293b56952756d1432a54fd799dff20c74e | [
"BSD-3-Clause"
] | 2 | 2020-05-05T22:52:40.000Z | 2020-08-17T22:38:06.000Z | """
datastruct.typing_ext
~~~~~~~~~~~~~~~~~~~~~
Extension for the python typing module.
Adapted from https://stackoverflow.com/questions/49171189/whats-the-correct-way-to-check-if-an-object-is-a-typing-generic
:copyright: 2020 by datastruct Authors, see AUTHORS for more details.
:license: BSD... | 26.642857 | 125 | 0.562332 |
e86fc73637e5124684a0133143eb825f91e1878f | 1,532 | py | Python | tests/test-paths1.py | 6tudent/pyemf | 830e61008af8acf1830e5c91dc876313a771afdb | [
"BSD-3-Clause-No-Nuclear-Warranty"
] | 16 | 2016-01-22T01:40:10.000Z | 2021-07-22T02:19:24.000Z | tests/test-paths1.py | 6tudent/pyemf | 830e61008af8acf1830e5c91dc876313a771afdb | [
"BSD-3-Clause-No-Nuclear-Warranty"
] | 1 | 2017-11-07T11:53:14.000Z | 2017-11-07T11:53:14.000Z | tests/test-paths1.py | jeremysanders/pyemf | 830e61008af8acf1830e5c91dc876313a771afdb | [
"BSD-3-Clause-No-Nuclear-Warranty"
] | 11 | 2017-02-28T21:02:26.000Z | 2020-10-21T19:23:29.000Z | #!/usr/bin/env python
import pyemf
def path(emf,text,x,y,size=300):
emf.TextOut(x,y,text);
y+=50
emf.BeginPath()
emf.MoveTo(x,y)
emf.LineTo(x+100,y+300)
emf.ArcTo(x+100,y+300,x+100+size,y+300+size,x+100,y+300,x+100+size,y+300)
emf.PolylineTo([(x+400,y+300),(x+450,y+200),(x+500,y+300... | 22.865672 | 77 | 0.66906 |
e86fcdd601baefa97f77e588ca123193aff8c763 | 25,325 | py | Python | axolotl/algorithms/tuners/custom_hps.py | tods-doc/axolotl | 6fc87bedb514677db09c039d492d1d3c7864913d | [
"Apache-2.0"
] | null | null | null | axolotl/algorithms/tuners/custom_hps.py | tods-doc/axolotl | 6fc87bedb514677db09c039d492d1d3c7864913d | [
"Apache-2.0"
] | null | null | null | axolotl/algorithms/tuners/custom_hps.py | tods-doc/axolotl | 6fc87bedb514677db09c039d492d1d3c7864913d | [
"Apache-2.0"
] | null | null | null | import sys
from collections import OrderedDict
from d3m.metadata import hyperparams
epsilon = sys.float_info.epsilon
clf_xgboost_config = dict(
n_estimators=hyperparams.UniformInt(
lower=10,
upper=50,
default=20,
description='The number of trees in the forest.',
semantic_t... | 47.248134 | 680 | 0.630839 |
e86fd16320d5d57f4a56323d9cb5bbe0e813732a | 1,557 | py | Python | office365/sharepoint/sites/sph_site.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | office365/sharepoint/sites/sph_site.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | office365/sharepoint/sites/sph_site.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | from office365.runtime.client_result import ClientResult
from office365.runtime.queries.service_operation_query import ServiceOperationQuery
from office365.runtime.resource_path import ResourcePath
from office365.sharepoint.base_entity import BaseEntity
class SPHSite(BaseEntity):
def __init__(self, context):
... | 32.4375 | 93 | 0.677585 |
e86fe64b3ac03c20861b5c5a8704018a11c000e7 | 16,122 | py | Python | escriptcore/test/python/run_xml.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | escriptcore/test/python/run_xml.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | 1 | 2019-01-14T03:07:43.000Z | 2019-01-14T03:07:43.000Z | escriptcore/test/python/run_xml.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2003-2018 by The University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Apache License, version 2.0
# http://www.apache.org/licenses/LICENSE... | 34.012658 | 103 | 0.608982 |
e870048a40afdbd7440d72ed41b13cfe328fe714 | 791 | py | Python | powerline/segments/shell.py | zhaocai/powerline | 8aae1145835b4b2a71f1ed71b81d490e2907bd39 | [
"MIT"
] | 1 | 2015-03-21T21:59:15.000Z | 2015-03-21T21:59:15.000Z | powerline/segments/shell.py | zhaocai/powerline | 8aae1145835b4b2a71f1ed71b81d490e2907bd39 | [
"MIT"
] | null | null | null | powerline/segments/shell.py | zhaocai/powerline | 8aae1145835b4b2a71f1ed71b81d490e2907bd39 | [
"MIT"
] | null | null | null | # vim:fileencoding=utf-8:noet
from powerline.theme import requires_segment_info
@requires_segment_info
def last_status(pl, segment_info):
'''Return last exit code.
Highlight groups used: ``exit_fail``
'''
if not segment_info['args'].last_exit_code:
return None
return [{'contents': str(segment_info['args'].la... | 27.275862 | 125 | 0.753477 |
e8700fd6a2837cd2e6a46383759b6a0026080a02 | 2,064 | py | Python | modules/ResnetIdentityBlock.py | zhangguobin/fast-neural-style | eefdcc3b6ba5e92bbad24cd20999c71dde4df072 | [
"MIT"
] | null | null | null | modules/ResnetIdentityBlock.py | zhangguobin/fast-neural-style | eefdcc3b6ba5e92bbad24cd20999c71dde4df072 | [
"MIT"
] | null | null | null | modules/ResnetIdentityBlock.py | zhangguobin/fast-neural-style | eefdcc3b6ba5e92bbad24cd20999c71dde4df072 | [
"MIT"
] | null | null | null | from tensorflow.keras import layers
from modules.InstanceNormalization import InstanceNormalization
import tensorflow as tf
class ResnetIdentityBlock(tf.keras.Model):
def __init__(self, kernel_size, filters, instanceNorm=True, regularizer=None):
super(ResnetIdentityBlock, self).__init__()
filters1... | 38.943396 | 82 | 0.565891 |
e8701c1c0af2cc82289a4bfedf3b5ea29a7a088f | 69 | py | Python | tests/__init__.py | CMLPlatform/pysuttoio | 4d0c2de6c7d6d90e9caf4b5b361e5046828bf113 | [
"MIT"
] | null | null | null | tests/__init__.py | CMLPlatform/pysuttoio | 4d0c2de6c7d6d90e9caf4b5b361e5046828bf113 | [
"MIT"
] | null | null | null | tests/__init__.py | CMLPlatform/pysuttoio | 4d0c2de6c7d6d90e9caf4b5b361e5046828bf113 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Unit test package for pyEXIO_SUTtoIO."""
| 17.25 | 43 | 0.608696 |
e8702ba6799c617e9b441a593314cf4d6031f662 | 1,439 | py | Python | pocean/dsg/timeseries/ir.py | lucmehl/pocean-core | 79ac85c975f409826abee0de6880b0dd9a3ede6e | [
"MIT"
] | null | null | null | pocean/dsg/timeseries/ir.py | lucmehl/pocean-core | 79ac85c975f409826abee0de6880b0dd9a3ede6e | [
"MIT"
] | null | null | null | pocean/dsg/timeseries/ir.py | lucmehl/pocean-core | 79ac85c975f409826abee0de6880b0dd9a3ede6e | [
"MIT"
] | null | null | null | #!python
# coding=utf-8
from pocean.cf import CFDataset
from pocean import logger # noqa
class IndexedRaggedTimeseries(CFDataset):
@classmethod
def is_mine(cls, dsg):
try:
rvars = dsg.filter_by_attrs(cf_role='timeseries_id')
assert len(rvars) == 1
assert dsg.feat... | 29.979167 | 94 | 0.600417 |
e87046b599fd437f02eec181bab87be040f23863 | 878 | py | Python | bll/membership/principal.py | RobertoPrevato/Flask-three-template | 00b7dd6dd299a1fd91f08f60007fe09235216096 | [
"MIT"
] | 7 | 2015-11-19T20:45:16.000Z | 2020-04-22T22:18:34.000Z | bll/membership/principal.py | RobertoPrevato/Flask-three-template | 00b7dd6dd299a1fd91f08f60007fe09235216096 | [
"MIT"
] | null | null | null | bll/membership/principal.py | RobertoPrevato/Flask-three-template | 00b7dd6dd299a1fd91f08f60007fe09235216096 | [
"MIT"
] | 2 | 2016-10-08T20:09:06.000Z | 2020-04-22T22:18:36.000Z | """
* Copyright 2015, Roberto Prevato roberto.prevato@gmail.com
* https://github.com/RobertoPrevato/Flask-three-template
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
"""
class Principal:
"""
Generic security principal used to implement authentication.
"""
def __init__(se... | 29.266667 | 75 | 0.648064 |
e870489e717aef3118c1dd8ba28c5f49fe152726 | 3,872 | py | Python | aesara/typed_list/type.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | aesara/typed_list/type.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | aesara/typed_list/type.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | from aesara.graph.type import CType, Type
class TypedListType(CType):
"""
Parameters
----------
ttype
Type of aesara variable this list will contains, can be another list.
depth
Optional parameters, any value above 0 will create a nested list of
this depth. (0-based)
... | 25.986577 | 79 | 0.508781 |
e8704d7aab6df2e02bed4b4cb2a7a210feec1fbc | 1,293 | py | Python | Logger/__init__.py | ekarakasis/Logger | ac141dd3b18494943ef6fd3589d1a677a1d08a03 | [
"MIT"
] | 1 | 2019-09-09T13:32:30.000Z | 2019-09-09T13:32:30.000Z | cvToolbox/__init__.py | ekarakasis/cvToolbox | 1d68e40e232e580d66a9b4819512968545a25456 | [
"MIT"
] | null | null | null | cvToolbox/__init__.py | ekarakasis/cvToolbox | 1d68e40e232e580d66a9b4819512968545a25456 | [
"MIT"
] | null | null | null | # ==================================================================================
#
# Copyright (c) 2019, Evangelos G. Karakasis
#
# 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 with... | 56.217391 | 85 | 0.664346 |
e87051925cf11beffef8e1c5ca1c881043180170 | 3,279 | gyp | Python | third_party/WebKit/Source/wtf/wtf_tests.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | third_party/WebKit/Source/wtf/wtf_tests.gyp | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | null | null | null | third_party/WebKit/Source/wtf/wtf_tests.gyp | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright (C) 2013 Google 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 copyright
# notice, this list of conditions and the ... | 34.882979 | 79 | 0.619396 |
e870a1e35de8806c7ceb5ca3eaf2667b840db025 | 10,188 | py | Python | pytorch/bert_fine_tuning.py | vsmolyakov/deep | 3f95f22c981514bbccd0826065fce791f77a8e75 | [
"MIT"
] | 3 | 2019-05-24T17:58:14.000Z | 2021-05-08T12:47:16.000Z | pytorch/bert_fine_tuning.py | vsmolyakov/deep | 3f95f22c981514bbccd0826065fce791f77a8e75 | [
"MIT"
] | null | null | null | pytorch/bert_fine_tuning.py | vsmolyakov/deep | 3f95f22c981514bbccd0826065fce791f77a8e75 | [
"MIT"
] | 4 | 2017-08-23T20:29:10.000Z | 2019-08-12T09:26:48.000Z | import platform
import numpy as np
import pandas as pd
from tqdm.notebook import tqdm
import matplotlib.pyplot as plt
from sklearn.metrics import mean_squared_error
from sklearn.model_selection import StratifiedKFold
import torch
import transformers
import torch.nn as nn
import torch.nn.functional as F
from torch.cuda... | 33.96 | 108 | 0.59148 |
e870ac8178b0ee06b224d12e437fdb0f59fbde3f | 965 | py | Python | modules/mod_msf_module/example_with_payload.py | slashsec-edu/cryton-modules | 4826b5e353f64e3d915d2abaead93b234a296304 | [
"MIT"
] | null | null | null | modules/mod_msf_module/example_with_payload.py | slashsec-edu/cryton-modules | 4826b5e353f64e3d915d2abaead93b234a296304 | [
"MIT"
] | null | null | null | modules/mod_msf_module/example_with_payload.py | slashsec-edu/cryton-modules | 4826b5e353f64e3d915d2abaead93b234a296304 | [
"MIT"
] | null | null | null | from mod import execute, validate
args = {
"module_type": "exploit",
"module_name": "unix/irc/unreal_ircd_3281_backdoor",
"module_options":
{
"RHOSTS": "172.28.128.99",
"RPORT": "6697"
},
"payload_name": "cmd/unix/reverse_perl", # optional
"payload_options": ... | 26.805556 | 56 | 0.567876 |
e870d7117eb84d867998413e6cadb46176cd2a61 | 8,201 | py | Python | client/tools/swarming_tasks_count.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | tools/swarming_client/tools/swarming_tasks_count.py | cangulcan/src | 2b8388091c71e442910a21ada3d97ae8bc1845d3 | [
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | tools/swarming_client/tools/swarming_tasks_count.py | cangulcan/src | 2b8388091c71e442910a21ada3d97ae8bc1845d3 | [
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | #!/usr/bin/env python
# Copyright 2015 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
"""Calculate statistics about tasks, counts per day.
Saves the data fetched from the server into a json file to enable repr... | 30.261993 | 80 | 0.662724 |
e870e14b8e4383e5d66d394a6b3cf1f62aee821b | 3,430 | py | Python | __main__.py | OofChair/revoltbot-template-1 | ec86b2f82fca9545319090ed0955ca60e09e9292 | [
"Apache-2.0"
] | null | null | null | __main__.py | OofChair/revoltbot-template-1 | ec86b2f82fca9545319090ed0955ca60e09e9292 | [
"Apache-2.0"
] | null | null | null | __main__.py | OofChair/revoltbot-template-1 | ec86b2f82fca9545319090ed0955ca60e09e9292 | [
"Apache-2.0"
] | null | null | null | import asyncio
import os
from configparser import ConfigParser
from mutiny import Client, events
from mutiny._internal.rest import RESTClient
from ext.bot import Bot
from ext.objects import Channel, Context, User, Message
#############
### SETUP ###
#############
_PREFIX = "?>"
_TOKEN = os.environ['BOT_TOKEN']
b... | 26.183206 | 81 | 0.555102 |
e870e2330cb6cdefaa285a8d648e79053f91d6dc | 1,749 | py | Python | tests/metrics/process/test_history_complexity_count.py | avandeursen/pydriller | 5593cf5ad8cf9ecc3a42505048bc4389055d844c | [
"Apache-2.0"
] | 3 | 2020-08-20T10:27:13.000Z | 2021-11-02T20:28:16.000Z | tests/metrics/process/test_history_complexity_count.py | avandeursen/pydriller | 5593cf5ad8cf9ecc3a42505048bc4389055d844c | [
"Apache-2.0"
] | null | null | null | tests/metrics/process/test_history_complexity_count.py | avandeursen/pydriller | 5593cf5ad8cf9ecc3a42505048bc4389055d844c | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
from datetime import datetime
import pytest
from pydriller.metrics.process.history_complexity import HistoryComplexity
TEST_COMMIT_DATA = [
('test-repos/pydriller', 'scm/git_repository.py', '90ca34ebfe69629cb7f186a1582fc38a73cc572e', '90ca34ebfe69629cb7f186a1582fc38a73cc572e', 40.49),
... | 46.026316 | 166 | 0.707833 |
e870e6c916ba7ba7b1d6ab60b8edede58e11bd95 | 625 | py | Python | stixy/manage.py | AnthonyKenny98/Stixy | 5d6dd38cc590d28dc98cca2737bbacf4f1ec69ba | [
"MIT"
] | null | null | null | stixy/manage.py | AnthonyKenny98/Stixy | 5d6dd38cc590d28dc98cca2737bbacf4f1ec69ba | [
"MIT"
] | 7 | 2021-03-19T03:10:21.000Z | 2021-09-22T19:00:19.000Z | stixy/manage.py | AnthonyKenny98/Stixy | 5d6dd38cc590d28dc98cca2737bbacf4f1ec69ba | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'stixy.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportEr... | 28.409091 | 73 | 0.6816 |
e870e806bd7e023efcc1d8290d14e787dbac2d5f | 985 | py | Python | cuchem/tests/test_chembl.py | dorukozturk/cheminformatics | c0fa66dd4f4e6650d7286ae2be533c66b7a2b270 | [
"Apache-2.0"
] | null | null | null | cuchem/tests/test_chembl.py | dorukozturk/cheminformatics | c0fa66dd4f4e6650d7286ae2be533c66b7a2b270 | [
"Apache-2.0"
] | null | null | null | cuchem/tests/test_chembl.py | dorukozturk/cheminformatics | c0fa66dd4f4e6650d7286ae2be533c66b7a2b270 | [
"Apache-2.0"
] | null | null | null | import logging
import dask
from cuchemcommon.data.helper.chembldata import IMP_PROPS
from cuchemcommon.data.cluster_wf import ChemblClusterWfDao
from cuchemcommon.fingerprint import MorganFingerprint, TransformationDefaults
logger = logging.getLogger(__name__)
def test_dataframe():
"""
Verify fetching data ... | 31.774194 | 78 | 0.738071 |
e870f3a70ac596bac5979e6ce8606f37bab9fc7c | 3,300 | py | Python | b_lambda_layer_common/cache/in_memory_data_cache.py | robertasstankevicius/B.LambdaLayerCommon | c927747bf6d7a8c785fc9179cffeaaa111624f03 | [
"Apache-2.0"
] | 2 | 2020-09-07T11:39:33.000Z | 2021-10-05T08:34:07.000Z | b_lambda_layer_common/cache/in_memory_data_cache.py | robertasstankevicius/B.LambdaLayerCommon | c927747bf6d7a8c785fc9179cffeaaa111624f03 | [
"Apache-2.0"
] | 3 | 2020-09-04T08:49:10.000Z | 2020-12-17T14:40:49.000Z | b_lambda_layer_common/cache/in_memory_data_cache.py | robertasstankevicius/B.LambdaLayerCommon | c927747bf6d7a8c785fc9179cffeaaa111624f03 | [
"Apache-2.0"
] | 5 | 2020-08-31T10:51:51.000Z | 2021-11-05T09:07:47.000Z | import logging
from typing import Any, Callable, Set, Union
from b_lambda_layer_common.exceptions.container.internal_error import InternalError
from b_lambda_layer_common.ssm.refreshable import Refreshable
logger = logging.getLogger(__name__)
class InMemoryDataCache(Refreshable):
"""
In-memory data cache im... | 32.352941 | 109 | 0.610909 |
e8710a4484b0b96e32368f340e883c8ddd8bb5f1 | 809 | py | Python | src/strictdf/utils/dtypes.py | CristianContrera95/strict_df | b9c544896835a204ba346254953794ff7e19868a | [
"MIT"
] | null | null | null | src/strictdf/utils/dtypes.py | CristianContrera95/strict_df | b9c544896835a204ba346254953794ff7e19868a | [
"MIT"
] | null | null | null | src/strictdf/utils/dtypes.py | CristianContrera95/strict_df | b9c544896835a204ba346254953794ff7e19868a | [
"MIT"
] | null | null | null | """
Author: Cristian Contrera <cristiancontrera95@gmail.com>
Date: 10/12/2020
License: MIT
"""
import re
__str_check_functions = {
# check boolean in this forms: [0, 1, .0, .1, 0., 1., true, false, t, f]
'bool': re.compile('^([.]?0|[.]?1|true|false|f|t){1}[.]?[0]*$'),
# check int in this forms: [11, -1, ... | 26.966667 | 76 | 0.5822 |
e871136170d9ee44d87169fdbc931ac1dbcac3bf | 2,319 | py | Python | v2/imggen/__main__.py | poonchoi/nft-generator | 1a207d6a1609c175441d640d0a96a57137f8b56c | [
"MIT"
] | 13 | 2021-12-05T22:40:41.000Z | 2022-03-13T23:57:45.000Z | v2/imggen/__main__.py | poonchoi/image-generator | 1a207d6a1609c175441d640d0a96a57137f8b56c | [
"MIT"
] | 1 | 2022-02-21T23:05:35.000Z | 2022-02-21T23:05:35.000Z | v2/imggen/__main__.py | poonchoi/image-generator | 1a207d6a1609c175441d640d0a96a57137f8b56c | [
"MIT"
] | 4 | 2021-12-06T22:59:55.000Z | 2022-01-21T21:53:09.000Z | import time
import typer
from imggen.accessorygen.accessory_gen import *
from imggen.accessorygen.all_accessories import *
from imggen.colorgen.colors import *
from imggen.imgprocessing.img_generator import *
from imggen.imgprocessing.img_layering import *
from imggen.imgprocessing.opentemplate import *
from imggen.dir... | 25.206522 | 84 | 0.576973 |
e8716893016b15642da53fd88065ab02b474f955 | 1,137 | py | Python | src/python/pants/build_graph/from_target.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | src/python/pants/build_graph/from_target.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | src/python/pants/build_graph/from_target.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | 1 | 2019-06-10T17:24:34.000Z | 2019-06-10T17:24:34.000Z | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import six
from pan... | 36.677419 | 95 | 0.716799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.