hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
91eba96e5a5c1c98d24daaf815592f716f821720 | 1,883 | py | Python | tools.py | DEVESHTARASIA/gans | ce084e6604ce1088496d436d460866a1b49179ff | [
"MIT"
] | null | null | null | tools.py | DEVESHTARASIA/gans | ce084e6604ce1088496d436d460866a1b49179ff | [
"MIT"
] | null | null | null | tools.py | DEVESHTARASIA/gans | ce084e6604ce1088496d436d460866a1b49179ff | [
"MIT"
] | null | null | null | from matplotlib import pyplot as plt
from matplotlib import cm
import math, itertools, os, errno
import numpy as np
import torch
from IPython import display
def print_logs(epoch, num_epochs, n_batch, num_batches, d_error, g_error, d_pred_real, d_pred_fake):
print('Epoch: [{}/{}], Batch Num: [{}/{}]'.format(epoch, ... | 36.211538 | 104 | 0.616038 |
034814b1ed3b08fdf64b455e6f3bd1a192d8cc60 | 7,464 | py | Python | training/mlp_train.py | rdimaio/aptbps-code | 7aeee442e05d6a121f62b358bc9dedb29a8ba664 | [
"MIT"
] | null | null | null | training/mlp_train.py | rdimaio/aptbps-code | 7aeee442e05d6a121f62b358bc9dedb29a8ba664 | [
"MIT"
] | null | null | null | training/mlp_train.py | rdimaio/aptbps-code | 7aeee442e05d6a121f62b358bc9dedb29a8ba664 | [
"MIT"
] | null | null | null | # Adapted from: https://github.com/sergeyprokudin/bps/blob/master/bps_demos/train_modelnet_mlp.py
import numpy as np
import os
import sys
import multiprocessing
import time
# PyTorch dependencies
import torch as pt
import torch.utils.data
import torch.nn as nn
import torch.nn.functional as F
# local dependencies
fro... | 33.470852 | 142 | 0.644159 |
4e3ae66aad38f3ff83129a77cba303049afb0b0d | 44,019 | py | Python | conda_build/os_utils/liefldd.py | DerThorsten/conda-build | 729c0cea03677dae0e2e15b7ec6d98619b5d4401 | [
"BSD-3-Clause"
] | null | null | null | conda_build/os_utils/liefldd.py | DerThorsten/conda-build | 729c0cea03677dae0e2e15b7ec6d98619b5d4401 | [
"BSD-3-Clause"
] | null | null | null | conda_build/os_utils/liefldd.py | DerThorsten/conda-build | 729c0cea03677dae0e2e15b7ec6d98619b5d4401 | [
"BSD-3-Clause"
] | null | null | null | try:
from collections.abc import Hashable
except ImportError:
from collections import Hashable
from functools import partial
import glob2
import hashlib
import json
import os
from subprocess import Popen, PIPE
import struct
import sys
import threading
# TODO :: Remove all use of pyldd
# Currently we verify the... | 43.887338 | 173 | 0.587019 |
6cf1acc911936fff509a3e172f04cfdbea974386 | 5,851 | py | Python | darknet.py | tztztztztz/yolov2.pytorch | 014559ce4df8f7e580e339919a05a05d988073a4 | [
"MIT"
] | 62 | 2019-01-02T13:40:51.000Z | 2022-03-12T13:16:13.000Z | darknet.py | tztztztztz/yolov2.pytorch | 014559ce4df8f7e580e339919a05a05d988073a4 | [
"MIT"
] | 7 | 2019-06-16T09:55:48.000Z | 2021-08-19T08:51:58.000Z | darknet.py | tztztztztz/yolov2.pytorch | 014559ce4df8f7e580e339919a05a05d988073a4 | [
"MIT"
] | 18 | 2019-01-10T03:05:29.000Z | 2021-12-26T21:54:37.000Z | # --------------------------------------------------------
# Pytorch Yolov2
# Licensed under The MIT License [see LICENSE for details]
# Written by Jingru Tan
# --------------------------------------------------------
from __future__ import absolute_import
from __future__ import division
from __future__ import print_f... | 35.895706 | 120 | 0.531362 |
0da43b02bde2c7f0e155c45b9cdbc217daead9ca | 2,919 | py | Python | tfx/extensions/google_cloud_ai_platform/trainer/executor.py | etarakci-hvl/tfx | a8da933539b99ba3a4b4c77dd53697572703fd3b | [
"Apache-2.0"
] | 1 | 2020-11-08T17:03:33.000Z | 2020-11-08T17:03:33.000Z | tfx/extensions/google_cloud_ai_platform/trainer/executor.py | etarakci-hvl/tfx | a8da933539b99ba3a4b4c77dd53697572703fd3b | [
"Apache-2.0"
] | null | null | null | tfx/extensions/google_cloud_ai_platform/trainer/executor.py | etarakci-hvl/tfx | a8da933539b99ba3a4b4c77dd53697572703fd3b | [
"Apache-2.0"
] | null | null | null | # Lint as: python2, python3
# Copyright 2019 Google LLC. 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 req... | 41.7 | 92 | 0.72285 |
336355973ee3d192d678f0993e3430ab5c2e3950 | 328 | py | Python | sector/migrations/0004_auto_20210219_1410.py | luke-feng/MAP | bc82ec20e2859dd6437d314fc12880f5e6b6aad8 | [
"Apache-2.0"
] | 1 | 2021-11-30T19:38:55.000Z | 2021-11-30T19:38:55.000Z | sector/migrations/0004_auto_20210219_1410.py | luke-feng/MAP | bc82ec20e2859dd6437d314fc12880f5e6b6aad8 | [
"Apache-2.0"
] | null | null | null | sector/migrations/0004_auto_20210219_1410.py | luke-feng/MAP | bc82ec20e2859dd6437d314fc12880f5e6b6aad8 | [
"Apache-2.0"
] | 1 | 2022-02-25T22:48:21.000Z | 2022-02-25T22:48:21.000Z | # Generated by Django 3.1.6 on 2021-02-19 14:10
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('sector', '0003_sector'),
]
operations = [
migrations.AlterModelOptions(
name='sector',
options={'managed': False},
)... | 18.222222 | 47 | 0.579268 |
9e471ac0fbcf2d8b88fe80c1e7ed38a0ef5aef9c | 880 | py | Python | tsvis/__init__.py | hdu-jinminghu/TS-VIS-master | c717722f86ee6996afc052ec946fbaefc1b5d3dc | [
"Apache-2.0"
] | 2 | 2022-02-06T05:57:40.000Z | 2022-03-18T07:42:11.000Z | tsvis/__init__.py | hdu-jinminghu/TS-VIS-master | c717722f86ee6996afc052ec946fbaefc1b5d3dc | [
"Apache-2.0"
] | null | null | null | tsvis/__init__.py | hdu-jinminghu/TS-VIS-master | c717722f86ee6996afc052ec946fbaefc1b5d3dc | [
"Apache-2.0"
] | null | null | null | # -*- coding: UTF-8 -*-
"""
Copyright 2021 Tianshu AI Platform. 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 req... | 33.846154 | 73 | 0.7125 |
461efb1459c96db24001601b93773151a45f4af5 | 7,026 | py | Python | python/onshape_client/oas/models/bt_parameter_visibility_always_hidden176.py | toebes/onshape-clients | a26cf6a77cfc7901321e603d5a097e23eb51e35c | [
"MIT"
] | 14 | 2019-06-23T08:47:41.000Z | 2021-11-29T16:28:45.000Z | python/onshape_client/oas/models/bt_parameter_visibility_always_hidden176.py | toebes/onshape-clients | a26cf6a77cfc7901321e603d5a097e23eb51e35c | [
"MIT"
] | 40 | 2019-05-22T14:39:46.000Z | 2022-03-10T10:36:17.000Z | python/onshape_client/oas/models/bt_parameter_visibility_always_hidden176.py | toebes/onshape-clients | a26cf6a77cfc7901321e603d5a097e23eb51e35c | [
"MIT"
] | 24 | 2019-06-02T01:03:41.000Z | 2022-03-29T13:25:36.000Z | # coding: utf-8
"""
Onshape REST API
The Onshape REST API consumed by all clients. # noqa: E501
The version of the OpenAPI document: 1.113
Contact: api-support@onshape.zendesk.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
im... | 35.664975 | 117 | 0.631939 |
802866363fb042cfc6ae2843f9758942a5d919a1 | 709 | py | Python | Algorithms/Implementation/Drawing_book.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Algorithms/Implementation/Drawing_book.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Algorithms/Implementation/Drawing_book.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | #page starts with right side by 1
#backside page count
# https://www.hackerrank.com/challenges/drawing-book/problem?h_r=internal-search
n = 5
p = 4
#pages = [[i,i+1] for i in range(n+1)][::2] #experi
book = list(range(n+1))
book.append(0)
#print(book)
pages = []
elem = []
for i in range(n//2+1):
for j in rang... | 16.488372 | 80 | 0.545839 |
c592d58dd00cd37fe9400d40c63df5f3646820d9 | 1,315 | py | Python | Part Refiner/utils.py | Hao-HUST/G2LGAN | 35f3f451cfdec9e8ab300a62dc21ede5428b5555 | [
"MIT"
] | 24 | 2019-01-04T14:08:05.000Z | 2021-10-13T09:26:52.000Z | Part Refiner/utils.py | Hao-HUST/G2LGAN | 35f3f451cfdec9e8ab300a62dc21ede5428b5555 | [
"MIT"
] | 9 | 2019-07-29T03:07:42.000Z | 2021-05-22T10:40:24.000Z | Part Refiner/utils.py | Hao-HUST/G2LGAN | 35f3f451cfdec9e8ab300a62dc21ede5428b5555 | [
"MIT"
] | 4 | 2019-04-15T00:30:26.000Z | 2020-06-03T18:35:06.000Z | #!/usr/bin/env python
__author__ = "Hao Wang"
__license__ = "MIT"
import numpy as np
#load batch data for training AE
def load_batch(data, data_64, pairs, BATCH_SIZE,label_num ):
idx = np.random.randint(0, len(pairs), BATCH_SIZE)
x = data[pairs[idx, 0]]
y = data_64[pairs[idx, 1]]
label = np.zeros((... | 26.3 | 115 | 0.528517 |
066e9074416e589225096c2c2eee95c739b120ef | 859 | py | Python | tensorflow_federated/python/analytics/__init__.py | vanshhhhh/federated | 20fdca66d01051c55413868310d60c068c84b35d | [
"Apache-2.0"
] | 1,918 | 2019-02-22T21:17:28.000Z | 2022-03-30T14:49:53.000Z | tensorflow_federated/python/analytics/__init__.py | vanshhhhh/federated | 20fdca66d01051c55413868310d60c068c84b35d | [
"Apache-2.0"
] | 999 | 2019-02-22T21:47:44.000Z | 2022-03-31T11:06:42.000Z | tensorflow_federated/python/analytics/__init__.py | vanshhhhh/federated | 20fdca66d01051c55413868310d60c068c84b35d | [
"Apache-2.0"
] | 498 | 2019-02-22T21:17:56.000Z | 2022-03-29T02:54:15.000Z | # Copyright 2021, The TensorFlow Federated 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... | 45.210526 | 74 | 0.798603 |
cedc13c36067668c2f6cf47375231b5663d665f7 | 7,851 | py | Python | checkov/cloudformation/parser/cfn_yaml.py | peaudecastor/checkov | a4804b61c1b1390b7abd44ab53285fcbc3e7e80b | [
"Apache-2.0"
] | null | null | null | checkov/cloudformation/parser/cfn_yaml.py | peaudecastor/checkov | a4804b61c1b1390b7abd44ab53285fcbc3e7e80b | [
"Apache-2.0"
] | null | null | null | checkov/cloudformation/parser/cfn_yaml.py | peaudecastor/checkov | a4804b61c1b1390b7abd44ab53285fcbc3e7e80b | [
"Apache-2.0"
] | null | null | null | """
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""
import logging
from enum import Enum
from pathlib import Path
from typing import List, Tuple
from yaml import MappingNode
from yaml import ScalarNode
from yaml import SequenceNode
from yaml.composer import Co... | 33.695279 | 96 | 0.666921 |
e4ed2e66f72d6ab2327c969abd0e67c6a40cf957 | 1,035 | py | Python | set_to_top.py | gvellut/correctflickrdate | 31615a39332dbde3364eaf834c84f2f2daeb4dc0 | [
"MIT"
] | null | null | null | set_to_top.py | gvellut/correctflickrdate | 31615a39332dbde3364eaf834c84f2f2daeb4dc0 | [
"MIT"
] | null | null | null | set_to_top.py | gvellut/correctflickrdate | 31615a39332dbde3364eaf834c84f2f2daeb4dc0 | [
"MIT"
] | null | null | null | from operator import attrgetter
import os.path
from addict import Dict as Addict
from api_auth import auth_flickr
flickr = auth_flickr()
to_top_album_id = "72157718963869712"
def all_pages(page_elem, iter_elem, func, *args, **kwargs):
page = 1
acc = []
while True:
paginated = Addict(func(*args... | 21.122449 | 71 | 0.684058 |
97517078d49620f7fbbdff7acfc7aad4002ad4cb | 125 | py | Python | setup.py | moctarjallo/pythonapi | f436413167f798c94010910de16b730b636b0f41 | [
"MIT"
] | null | null | null | setup.py | moctarjallo/pythonapi | f436413167f798c94010910de16b730b636b0f41 | [
"MIT"
] | null | null | null | setup.py | moctarjallo/pythonapi | f436413167f798c94010910de16b730b636b0f41 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='pythonapi',
version='1.0.0',
packages=find_packages()
) | 17.857143 | 43 | 0.696 |
e88f5da9a4f4d640504c523a03bdc00150f46283 | 11,688 | py | Python | gooddata-afm-client/gooddata_afm_client/model/pop_date.py | gooddata/gooddata-python-sdk | df4d4a4d730ab376960ae2ed01e7d86498e85c6a | [
"MIT"
] | 7 | 2022-01-24T16:27:06.000Z | 2022-02-25T10:18:49.000Z | gooddata-afm-client/gooddata_afm_client/model/pop_date.py | gooddata/gooddata-python-sdk | df4d4a4d730ab376960ae2ed01e7d86498e85c6a | [
"MIT"
] | 29 | 2022-01-20T15:45:38.000Z | 2022-03-31T09:39:25.000Z | gooddata-afm-client/gooddata_afm_client/model/pop_date.py | gooddata/gooddata-python-sdk | df4d4a4d730ab376960ae2ed01e7d86498e85c6a | [
"MIT"
] | 7 | 2022-01-20T07:11:15.000Z | 2022-03-09T14:50:17.000Z | """
OpenAPI definition
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v0
Contact: support@gooddata.com
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sy... | 42.501818 | 124 | 0.575548 |
230abbc21a16ff831edbb885bf6defb685c55226 | 2,513 | py | Python | django_playground/urls.py | Mohamed-Kaizen/django_playground | 0ca623041857f15c06bd2f9c8edcd2b54b4c4897 | [
"MIT"
] | null | null | null | django_playground/urls.py | Mohamed-Kaizen/django_playground | 0ca623041857f15c06bd2f9c8edcd2b54b4c4897 | [
"MIT"
] | 3 | 2021-06-08T21:15:15.000Z | 2022-03-12T00:35:49.000Z | django_playground/urls.py | Mohamed-Kaizen/django_playground | 0ca623041857f15c06bd2f9c8edcd2b54b4c4897 | [
"MIT"
] | null | null | null | """
django_playground URL Configuration
"""
from dj_rest_auth.registration.views import VerifyEmailView
from django.conf import settings
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.urls import include, path, re_path
from django.views.generic import TemplateView
from drf_... | 33.959459 | 87 | 0.69041 |
27f11f06fbdb28e933aec28d27cff5c971a5521a | 1,865 | py | Python | pyscf/dftd3/test/test_dftd3.py | mfkasim1/pyscf | 7be5e015b2b40181755c71d888449db936604660 | [
"Apache-2.0"
] | 2 | 2021-06-30T22:33:35.000Z | 2021-11-22T18:02:36.000Z | pyscf/dftd3/test/test_dftd3.py | mfkasim1/pyscf | 7be5e015b2b40181755c71d888449db936604660 | [
"Apache-2.0"
] | 36 | 2018-08-22T19:44:03.000Z | 2020-05-09T10:02:36.000Z | pyscf/dftd3/test/test_dftd3.py | mfkasim1/pyscf | 7be5e015b2b40181755c71d888449db936604660 | [
"Apache-2.0"
] | 4 | 2018-02-14T16:28:28.000Z | 2019-08-12T16:40:30.000Z | #!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. 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
#
# U... | 32.719298 | 92 | 0.643968 |
9f1561b41caec5c7cd595e0f0cb870b5decd619b | 1,484 | py | Python | data/download_critero_and_avazu.py | nusdbsystem/ARM-Net | cafda2654b67ec51aeb8834d1995711f918db811 | [
"Apache-2.0"
] | 42 | 2021-06-30T12:36:43.000Z | 2022-03-22T17:14:05.000Z | data/download_critero_and_avazu.py | nusdbsystem/ARM-Net | cafda2654b67ec51aeb8834d1995711f918db811 | [
"Apache-2.0"
] | null | null | null | data/download_critero_and_avazu.py | nusdbsystem/ARM-Net | cafda2654b67ec51aeb8834d1995711f918db811 | [
"Apache-2.0"
] | 9 | 2021-07-01T07:40:50.000Z | 2022-03-21T09:18:10.000Z | # adapted from AFN-AAAI-20
import os
import zipfile
import urllib.request
from tqdm import tqdm
class DownloadProgressBar(tqdm):
def update_to(self, b=1, bsize=1, tsize=None):
if tsize is not None:
self.total = tsize
self.update(b * bsize - self.n)
def download(url, output_path):
w... | 42.4 | 138 | 0.659704 |
72aecf97f6a6f84518996737b1574b90a03f6bf1 | 2,075 | py | Python | Matchingexample.py | nehabheemisetty/Face-mask-detection- | d3162b381e1e26046b1dc2b4cc59841c779e804b | [
"MIT"
] | null | null | null | Matchingexample.py | nehabheemisetty/Face-mask-detection- | d3162b381e1e26046b1dc2b4cc59841c779e804b | [
"MIT"
] | null | null | null | Matchingexample.py | nehabheemisetty/Face-mask-detection- | d3162b381e1e26046b1dc2b4cc59841c779e804b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
from skimage.metrics import structural_similarity as ssim
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import cv2
# In[2]:
def mse(imageA, imageB):
err = np.sum((imageA.astype("float") - imageB.astype("float")) ** 2)
err /= float(im... | 20.959596 | 77 | 0.636627 |
d47cf95558c38758bbe9dbdda614e75442333c47 | 541 | py | Python | virl/cli/ui/commands.py | tombry/virlutils | e98136b4e88c456828f2d0496c14f851f2627a46 | [
"MIT"
] | 133 | 2018-07-01T06:08:49.000Z | 2022-03-26T15:22:21.000Z | virl/cli/ui/commands.py | tombry/virlutils | e98136b4e88c456828f2d0496c14f851f2627a46 | [
"MIT"
] | 76 | 2018-06-28T16:41:57.000Z | 2022-03-26T17:23:06.000Z | virl/cli/ui/commands.py | tombry/virlutils | e98136b4e88c456828f2d0496c14f851f2627a46 | [
"MIT"
] | 43 | 2018-06-27T20:40:52.000Z | 2022-02-22T06:16:11.000Z | import click
from virl.api import VIRLServer
from virl.helpers import get_cml_client, get_current_lab, safe_join_existing_lab
import subprocess
@click.command()
def ui():
"""
opens the Workbench for the current lab
"""
server = VIRLServer()
client = get_cml_client(server)
current_lab = get_cu... | 25.761905 | 80 | 0.672828 |
ff217d63f97049e5e58787ce3695ed9053e21d08 | 10,354 | py | Python | py/selenium/webdriver/ie/options.py | santhoshprem29/selenium | 91626ea036b595da8780f2a9eb999936f2abb74b | [
"Apache-2.0"
] | 4 | 2019-11-29T06:24:07.000Z | 2020-11-01T20:15:24.000Z | py/selenium/webdriver/ie/options.py | santhoshprem29/selenium | 91626ea036b595da8780f2a9eb999936f2abb74b | [
"Apache-2.0"
] | 3 | 2020-06-05T23:21:54.000Z | 2021-06-10T22:02:26.000Z | py/selenium/webdriver/ie/options.py | santhoshprem29/selenium | 91626ea036b595da8780f2a9eb999936f2abb74b | [
"Apache-2.0"
] | 3 | 2018-08-11T13:37:14.000Z | 2020-01-31T09:21:11.000Z | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 30.186589 | 82 | 0.664091 |
f1d544e7255430acc2242ba5dc9c31035794d938 | 198 | py | Python | MD1/002.py | murillotlopes/DSM-Python | 2822b9b1b988936ab098c7052180ee3c3d7dd735 | [
"MIT"
] | null | null | null | MD1/002.py | murillotlopes/DSM-Python | 2822b9b1b988936ab098c7052180ee3c3d7dd735 | [
"MIT"
] | null | null | null | MD1/002.py | murillotlopes/DSM-Python | 2822b9b1b988936ab098c7052180ee3c3d7dd735 | [
"MIT"
] | null | null | null | nome=input('Qual é o seu nome? ')
print('Olá ', nome, '! Prazer em te conhecer')
#ou podemos fazer assim também
nome=input('Qual seu nome? ')
print('Olá {}! É um prazer te conhecer'.format(nome))
| 24.75 | 53 | 0.676768 |
efc16e4f04ce92a6b95e8b2b0bd719d99e06c2e2 | 1,549 | py | Python | test/functional/wallet_disable.py | cho2559/readercoin | aad2d84976b4fc5c8577f5460a303ec7492a3f25 | [
"MIT"
] | null | null | null | test/functional/wallet_disable.py | cho2559/readercoin | aad2d84976b4fc5c8577f5460a303ec7492a3f25 | [
"MIT"
] | null | null | null | test/functional/wallet_disable.py | cho2559/readercoin | aad2d84976b4fc5c8577f5460a303ec7492a3f25 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Readercoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test a node with the -disablewallet option.
- Test that validateaddress RPC works when running with... | 44.257143 | 128 | 0.735959 |
9edd07604a3a97e4febf7283f02a7a1e61075cbb | 36,220 | py | Python | exot/util/misc.py | ETHZ-TEC/exot_eengine | 7b7ce6cb949e1b0a02e716b03f2f9af751713b29 | [
"BSD-3-Clause"
] | null | null | null | exot/util/misc.py | ETHZ-TEC/exot_eengine | 7b7ce6cb949e1b0a02e716b03f2f9af751713b29 | [
"BSD-3-Clause"
] | null | null | null | exot/util/misc.py | ETHZ-TEC/exot_eengine | 7b7ce6cb949e1b0a02e716b03f2f9af751713b29 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2015-2020, Swiss Federal Institute of Technology (ETH Zurich)
# 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... | 33.755825 | 158 | 0.592601 |
dad96fd47d49e93e6fb2c7d4f9c275fcb6db6a00 | 5,817 | py | Python | main/tools/fingexp.py | ecuvelier/closest | 34eb3de140c0be4fdef24dbb8dbcd5f0b209e0c4 | [
"Apache-2.0"
] | null | null | null | main/tools/fingexp.py | ecuvelier/closest | 34eb3de140c0be4fdef24dbb8dbcd5f0b209e0c4 | [
"Apache-2.0"
] | null | null | null | main/tools/fingexp.py | ecuvelier/closest | 34eb3de140c0be4fdef24dbb8dbcd5f0b209e0c4 | [
"Apache-2.0"
] | 1 | 2021-12-31T15:13:38.000Z | 2021-12-31T15:13:38.000Z | """ Base classes for computing fingerprints and exportable versions
of objects.
"""
import json
#from gmpy import mpz
from gmpy2 import mpz, bit_length, f_divmod_2exp
from base64 import b64encode
from hashlib import sha256 as crypthash
from tools import utils
def fingerprint(blob):
"""Compute the fingerprint... | 34.832335 | 86 | 0.620251 |
467d00ca755f3b0ec26fd9255335bf8ead62e302 | 4,436 | py | Python | mc18.py | kmosiejczuk/minecraft-launchers | a0522a16569e9c4b3cf2c4dcc9ba2c5e31ce1182 | [
"BSD-2-Clause"
] | 2 | 2021-02-08T13:54:02.000Z | 2021-03-21T01:13:05.000Z | mc18.py | kmosiejczuk/minecraft-launchers | a0522a16569e9c4b3cf2c4dcc9ba2c5e31ce1182 | [
"BSD-2-Clause"
] | null | null | null | mc18.py | kmosiejczuk/minecraft-launchers | a0522a16569e9c4b3cf2c4dcc9ba2c5e31ce1182 | [
"BSD-2-Clause"
] | 1 | 2021-05-26T23:25:00.000Z | 2021-05-26T23:25:00.000Z | #!/usr/local/bin/python3 -u
import minecraft_launcher_lib as mll
import subprocess
# Minecraft version
mc_version = "1.18"
# Asset index is same but without final revision
asset_index = "1.18"
# Your email, username and password below
login = "yourEmailUsername"
password = "seekritPasswordHere"
# Get Minecraft ... | 40.327273 | 96 | 0.692741 |
9175cdf58a190a12847e8696d666a177992060ab | 13,497 | py | Python | e2e/Tests/RPC/Personal/WatchWalletTest.py | kayabaNerve/Currency | 260ebc20f1704f42ad6183fee39ad58ec6d07961 | [
"CC0-1.0"
] | 27 | 2018-08-04T06:40:18.000Z | 2018-12-22T20:08:55.000Z | e2e/Tests/RPC/Personal/WatchWalletTest.py | kayabaNerve/Currency | 260ebc20f1704f42ad6183fee39ad58ec6d07961 | [
"CC0-1.0"
] | 29 | 2018-08-05T22:24:50.000Z | 2018-12-19T17:55:37.000Z | e2e/Tests/RPC/Personal/WatchWalletTest.py | kayabaNerve/Currency | 260ebc20f1704f42ad6183fee39ad58ec6d07961 | [
"CC0-1.0"
] | 6 | 2018-08-11T12:34:25.000Z | 2018-12-10T23:42:49.000Z | #Developed before, yet finished after, personal_send's test.
#PersonalSendTest is much cleaner and wraps getTransactionTemplate, meaning this really only needs to test from/change.
#Some old, overlapping test cases have been left in.
from typing import Dict, List, Any
from time import sleep
import json
import bech32r... | 33.491315 | 134 | 0.619471 |
44e8682d360d6f6febd432a848df23e74a5764aa | 356 | py | Python | complexReadLine.py | anayakoti/FirstSample | 8ef05772991644e63a4fd6759458f449cd2b00c0 | [
"bzip2-1.0.6"
] | null | null | null | complexReadLine.py | anayakoti/FirstSample | 8ef05772991644e63a4fd6759458f449cd2b00c0 | [
"bzip2-1.0.6"
] | null | null | null | complexReadLine.py | anayakoti/FirstSample | 8ef05772991644e63a4fd6759458f449cd2b00c0 | [
"bzip2-1.0.6"
] | null | null | null | #inFile = open('text.txt', 'r')
#line = inFile.readline()
#print(line)
#line = inFile.readline()
#print(line)
count = 0
total = 0
inFile = open('grades.txt', 'r')
grade = inFile.readline()
while (grade):
print(grade)
count = count+1
total = total + int(grade)
grade = inFile.readline()
average = total / coun... | 20.941176 | 33 | 0.646067 |
a11a60cf05ca62dc05815ec8a68c9cce811d0ee6 | 15,281 | py | Python | plugin_tests/large_image_test.py | ShenQianwithC/large_image-pv | 72dda781ffe43694ba654c786b3d88c019282004 | [
"Apache-2.0"
] | null | null | null | plugin_tests/large_image_test.py | ShenQianwithC/large_image-pv | 72dda781ffe43694ba654c786b3d88c019282004 | [
"Apache-2.0"
] | null | null | null | plugin_tests/large_image_test.py | ShenQianwithC/large_image-pv | 72dda781ffe43694ba654c786b3d88c019282004 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#############################################################################
# Copyright Kitware 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 th... | 42.684358 | 89 | 0.612002 |
9aa70fa29fd74ee5bda7fb52ba1bffb1ce36ecb9 | 12,108 | py | Python | macroeco/compare/_compare.py | jkitzes/macroeco | ee5fac5560a2d64de3a64738b5bc6833e2d7ff2e | [
"BSD-2-Clause"
] | 7 | 2015-08-01T01:04:28.000Z | 2021-08-21T12:10:57.000Z | macroeco/compare/_compare.py | Zakher21/macroeco | ee5fac5560a2d64de3a64738b5bc6833e2d7ff2e | [
"BSD-2-Clause"
] | 27 | 2015-06-03T18:50:08.000Z | 2021-08-07T15:42:49.000Z | macroeco/compare/_compare.py | Zakher21/macroeco | ee5fac5560a2d64de3a64738b5bc6833e2d7ff2e | [
"BSD-2-Clause"
] | 2 | 2018-04-28T06:32:19.000Z | 2019-01-13T12:09:02.000Z | from __future__ import division
import numpy as np
import scipy as sp
import scipy.stats as stats
import pandas as pd
from ..misc import doc_sub
_data_doc = \
"""data : iterable
Data for analysis"""
_model_doc = \
"""model : obj
Scipy frozen distribution object. When freezing, keyword args `... | 25.707006 | 106 | 0.610753 |
3df3d82892502cce7d31db131c6b8be80092797c | 2,781 | py | Python | lib/exabgp/bgp/message/update/attribute/community/initial/community.py | opensourcerouting/exabgp | 2ba3ed23eae97f71372fcb437cf0c30bbffd1e2b | [
"BSD-3-Clause"
] | null | null | null | lib/exabgp/bgp/message/update/attribute/community/initial/community.py | opensourcerouting/exabgp | 2ba3ed23eae97f71372fcb437cf0c30bbffd1e2b | [
"BSD-3-Clause"
] | null | null | null | lib/exabgp/bgp/message/update/attribute/community/initial/community.py | opensourcerouting/exabgp | 2ba3ed23eae97f71372fcb437cf0c30bbffd1e2b | [
"BSD-3-Clause"
] | null | null | null | # encoding: utf-8
"""
community.py
Created by Thomas Mangin on 2009-11-05.
Copyright (c) 2009-2017 Exa Networks. All rights reserved.
License: 3-clause BSD. (See the COPYRIGHT file)
"""
from struct import pack
from struct import unpack
# ==================================================================== Community... | 28.090909 | 93 | 0.630349 |
0dab6be739bb4b5e2954e372ab8f0e09679d8195 | 444 | py | Python | tintz/core/templatetags/typefield.py | dcfranca/tintz-backend | 9f29e17cafc31ab7dc568d1e2c984e6f1b1fc3fc | [
"MIT"
] | 4 | 2016-05-06T20:52:42.000Z | 2018-11-18T08:29:33.000Z | core/templatetags/typefield.py | valbertovc/django_semantic_ui | b4bd87983c1e78c442cef7168721225f6893c67a | [
"MIT"
] | 2 | 2021-03-19T21:51:51.000Z | 2021-06-10T18:22:50.000Z | core/templatetags/typefield.py | valbertovc/django_semantic_ui | b4bd87983c1e78c442cef7168721225f6893c67a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django import template
from django.forms import DateTimeField
from django.forms.utils import ErrorList
from core.utils import SemanticErrorList
register = template.Library()
@register.filter
def is_datetime(field):
return isinstance(field.field, DateTimeField)
@register.filter
def ... | 20.181818 | 49 | 0.774775 |
050200f8d3771392c4dc2bdf514dad0e100512e5 | 282,216 | py | Python | vlc.py | wl-net/dataview-vlc-automator | ef572989433323f8e7f6d6e01f0d947363632f94 | [
"MIT"
] | 2 | 2020-05-14T11:32:03.000Z | 2021-05-04T08:37:59.000Z | vlc.py | alexsunday/video_move_detect | 1f34bfdcdc5ec40b9dfdc2792f0880c76e4f1f84 | [
"Apache-2.0"
] | 1 | 2015-04-15T05:20:30.000Z | 2015-04-19T17:43:05.000Z | vlc.py | alexsunday/video_move_detect | 1f34bfdcdc5ec40b9dfdc2792f0880c76e4f1f84 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/python
# Python ctypes bindings for VLC
#
# Copyright (C) 2009-2012 the VideoLAN team
# $Id: $
#
# Authors: Olivier Aubert <contact at olivieraubert.net>
# Jean Brouwers <MrJean1 at gmail.com>
# Geoff Salmon <geoff.salmon at gmail.com>
#
# This library is free software; you can redistribu... | 41.085456 | 639 | 0.666001 |
f31c4efea4a181df186ab1dd5eb436688160dc93 | 2,875 | py | Python | QUANTAXIS/QASetting/executor.py | sjtututu/QUANTAXIS | e9e20cdeda8b8d132433037b639a7e60f286a190 | [
"MIT"
] | 1 | 2019-11-02T14:42:52.000Z | 2019-11-02T14:42:52.000Z | QUANTAXIS/QASetting/executor.py | sjtututu/QUANTAXIS | e9e20cdeda8b8d132433037b639a7e60f286a190 | [
"MIT"
] | null | null | null | QUANTAXIS/QASetting/executor.py | sjtututu/QUANTAXIS | e9e20cdeda8b8d132433037b639a7e60f286a190 | [
"MIT"
] | null | null | null | # coding:utf-8
#
# The MIT License (MIT)
#
# Copyright (c) 2016-2019 yutiansut/QUANTAXIS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limit... | 39.930556 | 82 | 0.653913 |
763424f1ba293d9af16067768ddf359b0c483423 | 32,996 | py | Python | tests/core_tests.py | ThalesGroup/incubator-superset | f6965f99e389436614d79d91765e88a84cc6b258 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 2 | 2019-08-01T10:49:19.000Z | 2020-02-05T09:22:31.000Z | tests/core_tests.py | ThalesGroup/incubator-superset | f6965f99e389436614d79d91765e88a84cc6b258 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 55 | 2018-10-01T13:42:25.000Z | 2020-04-23T04:50:58.000Z | tests/core_tests.py | ThalesGroup/incubator-superset | f6965f99e389436614d79d91765e88a84cc6b258 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 5 | 2018-09-28T10:34:28.000Z | 2019-04-23T11:50:17.000Z | # # 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 2.0 (the
# # "License"); y... | 40.887237 | 93 | 0.561159 |
8977563cc0b5be4090c075ac74a8d8750b833521 | 3,673 | py | Python | nets/tu_graph_classification/mlp_net.py | ChangminWu/ExpanderGNN | a88bea8ee15d902be2881ec59ec37a8b092a0cd8 | [
"MIT"
] | 2 | 2021-09-04T09:25:59.000Z | 2021-09-05T22:15:24.000Z | nets/tu_graph_classification/mlp_net.py | ChangminWu/ExpanderGNN | a88bea8ee15d902be2881ec59ec37a8b092a0cd8 | [
"MIT"
] | null | null | null | nets/tu_graph_classification/mlp_net.py | ChangminWu/ExpanderGNN | a88bea8ee15d902be2881ec59ec37a8b092a0cd8 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import dgl
from layers.expander.expander_layer import LinearLayer, MultiLinearLayer
from utils import activations
class MLPNet(nn.Module):
def __init__(self, net_params):
super(MLPNet, self).__init__()
indim = net_params["in_dim"]
hiddim = net_params["h... | 38.260417 | 77 | 0.466649 |
4debb61a8e01bba0dd1d359b6770a2847ce427a4 | 11,799 | py | Python | sampler.py | DAIZHENWEI/FastGCN_pytorch | 87efe350d5acbe517a0642e9862ac9676b55c053 | [
"MIT"
] | null | null | null | sampler.py | DAIZHENWEI/FastGCN_pytorch | 87efe350d5acbe517a0642e9862ac9676b55c053 | [
"MIT"
] | null | null | null | sampler.py | DAIZHENWEI/FastGCN_pytorch | 87efe350d5acbe517a0642e9862ac9676b55c053 | [
"MIT"
] | null | null | null | import pdb
import math
import torch
import numpy as np
import scipy.sparse as sp
from scipy.sparse.linalg import norm as sparse_norm
from torch.nn.parameter import Parameter
from utils import sparse_mx_to_torch_sparse_tensor, load_data
class Sampler:
def __init__(self, features, adj, **kwargs):
allowed_... | 36.871875 | 85 | 0.61251 |
f893ab7370f6ae7b381223c829bbab0f3d992985 | 51,739 | py | Python | tests/test_cli_compile.py | cluesblues/pip-tools | c10fd0e4486fe7e096a5c77176eb41d22dd9a434 | [
"BSD-3-Clause"
] | null | null | null | tests/test_cli_compile.py | cluesblues/pip-tools | c10fd0e4486fe7e096a5c77176eb41d22dd9a434 | [
"BSD-3-Clause"
] | null | null | null | tests/test_cli_compile.py | cluesblues/pip-tools | c10fd0e4486fe7e096a5c77176eb41d22dd9a434 | [
"BSD-3-Clause"
] | null | null | null | import os
import subprocess
import sys
from textwrap import dedent
from unittest import mock
import pytest
from pip._internal.utils.urls import path_to_url
from piptools.scripts.compile import cli
from .constants import MINIMAL_WHEELS_PATH, PACKAGES_PATH
@pytest.fixture(autouse=True)
def _temp_dep_cache(tmpdir, mo... | 32.175995 | 93 | 0.613734 |
e739faa956bee4ffde5b12e2607b0430bc975de6 | 2,624 | py | Python | tests/test_archiverepositories.py | crashvb/docker-sign-verify | 3c2a968fc1461398c8be04ecaa54c028cca5c0fe | [
"Apache-2.0"
] | 4 | 2019-07-22T02:47:44.000Z | 2021-09-16T18:44:39.000Z | tests/test_archiverepositories.py | crashvb/docker-sign-verify | 3c2a968fc1461398c8be04ecaa54c028cca5c0fe | [
"Apache-2.0"
] | 20 | 2019-03-18T22:50:19.000Z | 2021-02-26T04:07:34.000Z | tests/test_archiverepositories.py | crashvb/docker-sign-verify | 3c2a968fc1461398c8be04ecaa54c028cca5c0fe | [
"Apache-2.0"
] | 6 | 2019-04-14T01:15:01.000Z | 2022-03-04T04:34:15.000Z | #!/usr/bin/env python
# pylint: disable=redefined-outer-name
"""Manifest tests."""
import pytest
from docker_registry_client_async import FormattedSHA256, ImageName
from docker_sign_verify import ArchiveRepositories
from .testutils import get_test_data
@pytest.fixture
def archive_repositories(archive_repositorie... | 32.395062 | 96 | 0.766006 |
1c49062476515aed231866528eec2b58762011d2 | 4,570 | py | Python | openstack_dashboard/dashboards/project/networks/subnets/tables.py | aristanetworks/horizon | 6b4ba5194d46360bf1a436b6f9531facfbf5084a | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/project/networks/subnets/tables.py | aristanetworks/horizon | 6b4ba5194d46360bf1a436b6f9531facfbf5084a | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/project/networks/subnets/tables.py | aristanetworks/horizon | 6b4ba5194d46360bf1a436b6f9531facfbf5084a | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 NEC Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 35.153846 | 78 | 0.66674 |
2051eba2f4e2d06a77dde793b3a1d3d5b724fb13 | 4,927 | py | Python | chances/methods.py | bjtho08/chances | ec713de1e11f7c2d9997507b07658df9f3369555 | [
"MIT"
] | 5 | 2018-10-09T11:00:39.000Z | 2021-07-19T06:21:29.000Z | chances/methods.py | bjtho08/chances | ec713de1e11f7c2d9997507b07658df9f3369555 | [
"MIT"
] | 13 | 2019-02-09T10:53:06.000Z | 2019-09-26T21:37:05.000Z | chances/methods.py | bjtho08/chances | ec713de1e11f7c2d9997507b07658df9f3369555 | [
"MIT"
] | 2 | 2019-03-07T10:05:01.000Z | 2019-09-25T12:29:07.000Z | import numpy as np
import random
from .sobol.sobol_seq import i4_sobol_generate
from .hypercube.hycusampling import halton, korobov_design_matrix
from .hypercube.hycusampling import improved_lhd_matrix, lhd_matrix
from .lhs_sudoku import sudoku
from .quantum import cached_generator, randint
class Randomizer:
''... | 26.632432 | 79 | 0.603816 |
cb2dafbc7be7729740eff84ae5e392d05937d31d | 12,070 | py | Python | debugging/validation.py | tuggeluk/mmdetection | 669a535c944628a3ab43330cae5c77b643e13a4b | [
"Apache-2.0"
] | 1 | 2020-01-22T15:25:20.000Z | 2020-01-22T15:25:20.000Z | debugging/validation.py | tuggeluk/mmdetection | 669a535c944628a3ab43330cae5c77b643e13a4b | [
"Apache-2.0"
] | 2 | 2019-12-16T10:51:41.000Z | 2020-10-06T13:46:25.000Z | debugging/validation.py | tuggeluk/mmdetection | 669a535c944628a3ab43330cae5c77b643e13a4b | [
"Apache-2.0"
] | 2 | 2020-04-20T08:58:40.000Z | 2021-05-08T07:55:54.000Z | """Validation.
Allows direct access to validation loops and allows debugging of those loops.
Note: This runs on CPU and not CUDA since we want to access the values and
manipulate them more easily
Author:
Yvan Satyawan <y_satyawan@hotmail.com>
"""
import torch
import numpy as np
from mmcv import Config, ProgressBa... | 33.715084 | 78 | 0.581607 |
6e60194154a9da333b4f0f2d6cc18012b74592d9 | 12,026 | py | Python | test/functional/mining_basic.py | adgeese/gbcr | 51145945d78c588f3ec3dc8595e14b1faea1a4e7 | [
"MIT"
] | null | null | null | test/functional/mining_basic.py | adgeese/gbcr | 51145945d78c588f3ec3dc8595e14b1faea1a4e7 | [
"MIT"
] | null | null | null | test/functional/mining_basic.py | adgeese/gbcr | 51145945d78c588f3ec3dc8595e14b1faea1a4e7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2019 The Gold BCR Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test mining RPCs
- getmininginfo
- getblocktemplate proposal mode
- submitblock"""
import copy
from ... | 47.722222 | 163 | 0.69067 |
6ef3216a9d9cdf62fa0e99136ac791848752a013 | 1,033 | py | Python | pynom-env/lib/python3.6/site-packages/pydataset/__init__.py | medvidov/PyNomaly | 0862bc0504b7cc0b77fe6123fbac85c50f50bf73 | [
"Apache-2.0"
] | 982 | 2016-02-01T04:12:43.000Z | 2022-03-28T22:40:47.000Z | pydataset/__init__.py | pythonthings/PyDataset | 789c0ca7587b86343f636b132dcf1f475ee6b90b | [
"MIT"
] | 87 | 2020-08-07T19:12:10.000Z | 2022-02-08T14:46:34.000Z | pydataset/__init__.py | pythonthings/PyDataset | 789c0ca7587b86343f636b132dcf1f475ee6b90b | [
"MIT"
] | 101 | 2016-02-01T08:40:39.000Z | 2022-03-13T15:42:07.000Z | # __init__.py
# main interface to pydataset module
from .datasets_handler import __print_item_docs, __read_csv, __datasets_desc
from .support import find_similar
def data(item=None, show_doc=False):
"""loads a datasaet (from in-modules datasets) in a dataframe data structure.
Args:
item (str) :... | 22.456522 | 81 | 0.599226 |
22bbe609cd35a6e5f3191356126d0f6f9c932640 | 6,853 | py | Python | lapis/scheduler_old.py | tfesenbecker/lapis | 0a79525ad0c3418893232fb084d9437b625696a5 | [
"MIT"
] | null | null | null | lapis/scheduler_old.py | tfesenbecker/lapis | 0a79525ad0c3418893232fb084d9437b625696a5 | [
"MIT"
] | 13 | 2020-09-17T14:17:14.000Z | 2020-10-14T14:30:58.000Z | lapis/scheduler_old.py | tfesenbecker/lapis | 0a79525ad0c3418893232fb084d9437b625696a5 | [
"MIT"
] | null | null | null | from typing import Dict
from usim import Scope, interval, Resources, time
from lapis.drone import Drone
from lapis.monitor import sampling_required
class JobQueue(list):
pass
class CondorJobScheduler(object):
"""
Goal of the htcondor job scheduler is to have a scheduler that somehow
mimics how htco... | 38.717514 | 84 | 0.533635 |
f5682f4c19466f44aa27e28c4172256052d22631 | 10,191 | py | Python | sd3.py | rofferom/seiken_densetsu_3 | 8d5ba61da90df277b8e19cd86ccf475ed5d78da6 | [
"MIT"
] | 5 | 2017-12-06T21:39:58.000Z | 2019-08-09T13:06:03.000Z | sd3.py | rofferom/seiken_densetsu_3 | 8d5ba61da90df277b8e19cd86ccf475ed5d78da6 | [
"MIT"
] | 1 | 2018-02-24T13:22:55.000Z | 2018-02-24T13:22:55.000Z | sd3.py | rofferom/seiken_densetsu_3 | 8d5ba61da90df277b8e19cd86ccf475ed5d78da6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import logging
import sys
import argparse
import sd3.rom
import sd3.gfx
import sd3.seq.reader
import sd3.tools.seq_operations
import sd3.tools.jap_tbl
import sd3.text_dumper
import sd3.disasm.cpu
import sd3.cfa.cfg
import sd3.cfa.dominator
import sd3.tools.gen_op_report
def int_parse(value):
... | 27.768392 | 79 | 0.623197 |
0e6432880e334538bfd90598f42c86b94f920b85 | 1,307 | py | Python | digital_signature.py | julzhk/crypto_spike | 435787aee5bc0d456a871e9e93fd952bc148090c | [
"Unlicense"
] | null | null | null | digital_signature.py | julzhk/crypto_spike | 435787aee5bc0d456a871e9e93fd952bc148090c | [
"Unlicense"
] | null | null | null | digital_signature.py | julzhk/crypto_spike | 435787aee5bc0d456a871e9e93fd952bc148090c | [
"Unlicense"
] | null | null | null | # coding=utf-8
import hashlib
from random import randint
def generate_keys(keysize=256):
# (sk, pk) := generateKeys(keysize) The generateKeys method takes a key size and generates
# a key pair. The secret key sk is kept privately and used to sign messages. pk is the public
# verification key that you gi... | 36.305556 | 102 | 0.693191 |
17c5d87dbe40a9bbfc23a7793e834a8ee2d05832 | 3,960 | py | Python | adjust.py | whyecofiliter/EAP | a0bc95410633dfa1afa260534f7b6e5845981e3f | [
"MIT"
] | 3 | 2022-02-15T12:10:55.000Z | 2022-03-05T17:39:35.000Z | adjust.py | whyecofiliter/EAP | a0bc95410633dfa1afa260534f7b6e5845981e3f | [
"MIT"
] | null | null | null | adjust.py | whyecofiliter/EAP | a0bc95410633dfa1afa260534f7b6e5845981e3f | [
"MIT"
] | 2 | 2022-02-02T02:36:58.000Z | 2022-02-02T13:21:51.000Z | '''
Adjustment Method 调整方法
'''
'''
OLS regrssion
'''
from numpy.core.fromnumeric import diagonal
from statsmodels.stats.sandwich_covariance import cov_hac_simple
from statsmodels.tools.tools import add_constant
def ols(y, x, constant=True) :
from statsmodels.api import OLS, add_constant
if constant == Tr... | 26.4 | 109 | 0.580051 |
57332c57b53496d0ca56e2d7f2fa3a6010258e4d | 1,837 | py | Python | finicityapi/models/institution_branding_response.py | monarchmoney/finicity-python | b2ab1ded435db75c78d42261f5e4acd2a3061487 | [
"MIT"
] | null | null | null | finicityapi/models/institution_branding_response.py | monarchmoney/finicity-python | b2ab1ded435db75c78d42261f5e4acd2a3061487 | [
"MIT"
] | null | null | null | finicityapi/models/institution_branding_response.py | monarchmoney/finicity-python | b2ab1ded435db75c78d42261f5e4acd2a3061487 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import finicityapi.models.branding
class InstitutionBrandingResponse(object):
"""Implementation of the 'Institution Branding Response' model.
TODO: type model description here.
Attributes:
branding (Branding): TODO: type description here.
"""
# C... | 29.15873 | 140 | 0.609145 |
35569f2671f4981821469bef55dbe2d33e793aa4 | 34,069 | py | Python | imagernn/bidir_lstm_generatorTheano.py | rakshithShetty/captionGAN | 3a1d33923aee05ea46d2556f59cb892132a1e5c2 | [
"MIT"
] | 66 | 2017-12-04T05:23:29.000Z | 2022-03-16T02:43:23.000Z | imagernn/bidir_lstm_generatorTheano.py | Jevin754/captionGAN | b9d1331e7a64ed20e152a749eaa1f086c0be556d | [
"MIT"
] | 5 | 2018-02-28T06:25:53.000Z | 2021-11-07T16:38:03.000Z | imagernn/bidir_lstm_generatorTheano.py | Jevin754/captionGAN | b9d1331e7a64ed20e152a749eaa1f086c0be556d | [
"MIT"
] | 17 | 2017-11-16T01:45:15.000Z | 2022-02-06T08:09:08.000Z | import numpy as np
import code
import theano
from theano import config
import theano.tensor as tensor
from theano.ifelse import ifelse
from collections import OrderedDict
import time
from imagernn.utils import zipp, initwTh, numpy_floatX, _p, sliceT, basic_lstm_layer, dropout_layer
from theano.sandbox.rng_mrg import MR... | 44.534641 | 238 | 0.595527 |
e558b25752d6039c06017088c0589aff2770511e | 1,492 | py | Python | examples/test.py | pimoroni/micropython-inkyb | e87ce05a144f20e35be14234a2f62a3f88353ce2 | [
"MIT"
] | 3 | 2020-12-28T21:38:25.000Z | 2021-08-17T20:44:34.000Z | examples/test.py | pimoroni/micropython-inkyb | e87ce05a144f20e35be14234a2f62a3f88353ce2 | [
"MIT"
] | 1 | 2020-12-14T12:49:29.000Z | 2020-12-14T12:49:29.000Z | examples/test.py | pimoroni/micropython-inkybit | e87ce05a144f20e35be14234a2f62a3f88353ce2 | [
"MIT"
] | null | null | null | from microbit import *
import inkybit
x = 0
y = 0
for x in range(inkybit.HEIGHT):
inkybit.set_pixel(x, x, 1)
for x in range(inkybit.HEIGHT):
inkybit.set_pixel(inkybit.HEIGHT - x, x, 1)
for x in range(inkybit.HEIGHT):
inkybit.set_pixel(inkybit.HEIGHT, x, 1)
inkybit.draw_rectangle(125, 0, 25, 20, inkybit.B... | 36.390244 | 101 | 0.743298 |
a7b8dd37a6bd2d900cae606b4e8a0d2ff6591142 | 1,051 | py | Python | projects/migrations/0008_add_phase_to_project.py | SuviVappula/kaavapino | 0e3687c94afff10527c9bee9627fc30bd2dfab4f | [
"MIT"
] | 3 | 2019-02-07T14:47:00.000Z | 2022-02-15T14:09:38.000Z | projects/migrations/0008_add_phase_to_project.py | SuviVappula/kaavapino | 0e3687c94afff10527c9bee9627fc30bd2dfab4f | [
"MIT"
] | 74 | 2017-12-13T09:18:04.000Z | 2022-03-11T23:29:59.000Z | projects/migrations/0008_add_phase_to_project.py | SuviVappula/kaavapino | 0e3687c94afff10527c9bee9627fc30bd2dfab4f | [
"MIT"
] | 8 | 2017-12-13T09:31:20.000Z | 2022-02-15T13:10:34.000Z | # Generated by Django 2.0 on 2018-01-07 11:46
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('projects', '0007_increase_choice_identifier_length'),
]
operations = [
migrations.AlterModelOptions(
... | 36.241379 | 167 | 0.654615 |
ad3b7ed833bdeb8328c4b5fdcd7917efbee5bab3 | 4,935 | py | Python | nlp/capital_city_token.py | mingewang/pytorch_deep_learning_by_example | 83c9e12364a359b9ef77f0645ca7815e9e817f58 | [
"MIT"
] | 7 | 2019-05-28T11:26:02.000Z | 2020-02-13T18:24:18.000Z | nlp/capital_city_token.py | mingewang/pytorch_deep_learning_by_example | 83c9e12364a359b9ef77f0645ca7815e9e817f58 | [
"MIT"
] | null | null | null | nlp/capital_city_token.py | mingewang/pytorch_deep_learning_by_example | 83c9e12364a359b9ef77f0645ca7815e9e817f58 | [
"MIT"
] | 5 | 2019-07-24T18:08:35.000Z | 2021-08-09T01:07:54.000Z | # pytorch sample to show word embedding
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torchvision
from numpy import array
from torchnlp.text_encoders import WhitespaceEncoder
from torchnlp.utils import pad_tensor
import matplotlib.pyplot as plt
# doc/words and ... | 28.039773 | 89 | 0.677609 |
38d159e17130d517036e09d77a6e01dcc87c773e | 2,277 | py | Python | Code/autopkglib/MunkiCatalogBuilder.py | timsutton/autopkg | 55810ad388aef4a1b62bfd68c256949963935414 | [
"Apache-2.0"
] | 2 | 2016-01-02T09:35:03.000Z | 2020-05-24T16:56:34.000Z | Code/autopkglib/MunkiCatalogBuilder.py | timsutton/autopkg | 55810ad388aef4a1b62bfd68c256949963935414 | [
"Apache-2.0"
] | null | null | null | Code/autopkglib/MunkiCatalogBuilder.py | timsutton/autopkg | 55810ad388aef4a1b62bfd68c256949963935414 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2013 Greg Neagle
#
# 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... | 31.625 | 75 | 0.628019 |
377d8d50523414d9401982bb508e1a3c8a29fc58 | 12,842 | py | Python | biostar/apps/posts/views.py | iamjstates/biostar-central | 6a97384ad6103173327e4135f42107d3eaac28b4 | [
"MIT"
] | null | null | null | biostar/apps/posts/views.py | iamjstates/biostar-central | 6a97384ad6103173327e4135f42107d3eaac28b4 | [
"MIT"
] | 3 | 2021-02-02T23:02:57.000Z | 2021-06-10T23:28:33.000Z | biostar/apps/posts/views.py | iamjstates/biostar-central | 6a97384ad6103173327e4135f42107d3eaac28b4 | [
"MIT"
] | null | null | null | # Create your views here.
from django.shortcuts import render_to_response
from django.views.generic import TemplateView, DetailView, ListView, FormView, UpdateView
from .models import Post
from django import forms
from django.core.urlresolvers import reverse
from crispy_forms.helper import FormHelper
from crispy_forms.... | 32.84399 | 117 | 0.638452 |
7d73ac42a55a1bfa67517418cbbcdeec5f6e8a43 | 3,041 | py | Python | idaes/tests/test_config.py | CATER-UCF/idaes-pse | afccbd43e56dc39d63542b4d400ac027b0ccbe84 | [
"RSA-MD"
] | null | null | null | idaes/tests/test_config.py | CATER-UCF/idaes-pse | afccbd43e56dc39d63542b4d400ac027b0ccbe84 | [
"RSA-MD"
] | null | null | null | idaes/tests/test_config.py | CATER-UCF/idaes-pse | afccbd43e56dc39d63542b4d400ac027b0ccbe84 | [
"RSA-MD"
] | 1 | 2022-03-17T11:08:43.000Z | 2022-03-17T11:08:43.000Z | #################################################################################
# The Institute for the Design of Advanced Energy Systems Integrated Platform
# Framework (IDAES IP) was produced under the DOE Institute for the
# Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021
# by the softwar... | 41.094595 | 81 | 0.667215 |
5acd36af3a1ebe14cd4c021d5c20bcd133e81377 | 9,699 | py | Python | tango_shared/utils/sanetize.py | tBaxter/tango-shared-core | 35fc10aef1ceedcdb4d6d866d44a22efff718812 | [
"MIT"
] | 2 | 2015-09-21T04:27:26.000Z | 2016-06-02T16:57:25.000Z | build/lib/tango_shared/utils/sanetize.py | tBaxter/tango-shared-core | 35fc10aef1ceedcdb4d6d866d44a22efff718812 | [
"MIT"
] | 1 | 2018-12-20T13:01:57.000Z | 2018-12-20T13:01:57.000Z | tango_shared/utils/sanetize.py | tBaxter/tango-shared-core | 35fc10aef1ceedcdb4d6d866d44a22efff718812 | [
"MIT"
] | 3 | 2015-11-12T21:11:21.000Z | 2016-10-24T23:18:10.000Z | import re
import six
try:
import urllib.parse as urlparse
except ImportError:
import urlparse
import bleach
import markdown
from django.template.defaultfilters import urlizetrunc
from django.utils.encoding import force_text
from django.utils.safestring import SafeData, mark_safe
from django.utils.html import... | 33.794425 | 128 | 0.521806 |
866e1f8a3a54620891534524c7085474356b5e50 | 968 | py | Python | PySRCG/src/Tabs/augments_tab.py | apampuch/PySRCG | bb3777aed3517b473e5860336c015e2e8d0905e9 | [
"MIT"
] | null | null | null | PySRCG/src/Tabs/augments_tab.py | apampuch/PySRCG | bb3777aed3517b473e5860336c015e2e8d0905e9 | [
"MIT"
] | null | null | null | PySRCG/src/Tabs/augments_tab.py | apampuch/PySRCG | bb3777aed3517b473e5860336c015e2e8d0905e9 | [
"MIT"
] | null | null | null | from tkinter import ttk
from src.Tabs.bioware_tab import BiowareTab
from src.Tabs.cyberware_tab import CyberwareTab
# list of attributes that we need to look for variables in, eg "Cost: rating * 500"
ATTRIBUTES_TO_CALCULATE = ["essence", "cost", "availability_rating", "availability_time"]
STRINGS_TO_IGNORE = [] # ny... | 27.657143 | 89 | 0.707645 |
2384b0a1cea30c7ecba0d41048756a64294d5ea3 | 11,562 | py | Python | tensorflow_data_validation/utils/stats_util.py | Coulbe/data-validation | a2c5e5dd2cc50cce8a7eab5c7e72a0cb11b74b2c | [
"Apache-2.0"
] | 1 | 2020-08-17T21:49:02.000Z | 2020-08-17T21:49:02.000Z | tensorflow_data_validation/utils/stats_util.py | mitakora/tensorflow-data-validation | 8e43d424a6064e9626a00b2ef9db826baa2ab25d | [
"Apache-2.0"
] | null | null | null | tensorflow_data_validation/utils/stats_util.py | mitakora/tensorflow-data-validation | 8e43d424a6064e9626a00b2ef9db826baa2ab25d | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 33.807018 | 82 | 0.734043 |
aedb5ad3cc893f924bbd76ade1269d7f3c4966a3 | 10,784 | py | Python | XLM/stack_transformer.py | harold-ogden-walmart/xlmulator | 7114aa995a7aa5528cde966f6d50db59abab8852 | [
"Apache-2.0",
"MIT"
] | 18 | 2020-05-19T20:49:20.000Z | 2021-07-02T10:03:56.000Z | XLM/stack_transformer.py | harold-ogden-walmart/xlmulator | 7114aa995a7aa5528cde966f6d50db59abab8852 | [
"Apache-2.0",
"MIT"
] | null | null | null | XLM/stack_transformer.py | harold-ogden-walmart/xlmulator | 7114aa995a7aa5528cde966f6d50db59abab8852 | [
"Apache-2.0",
"MIT"
] | 2 | 2020-05-19T16:34:11.000Z | 2020-05-20T00:57:16.000Z | """@package stack_transformer
Lark AST transformer to generate XLM_Objects from an AST generated from olevba_xlm.bnf.
Also functions for parsing olevba XLM.
"""
from __future__ import print_function
import string
import os
import re
# sudo pip install lark-parser
from lark import Lark
from lark import Transformer
fr... | 28.156658 | 154 | 0.557585 |
5c505312295de75ee478bf2320e2560bf280aa81 | 832 | py | Python | 3/q1_adaboost_python/plot_decision_surface.py | danikhani/ML-I_WS2020 | e96555f3993b48511249d1677b39ae4e589e7bdb | [
"MIT"
] | null | null | null | 3/q1_adaboost_python/plot_decision_surface.py | danikhani/ML-I_WS2020 | e96555f3993b48511249d1677b39ae4e589e7bdb | [
"MIT"
] | null | null | null | 3/q1_adaboost_python/plot_decision_surface.py | danikhani/ML-I_WS2020 | e96555f3993b48511249d1677b39ae4e589e7bdb | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
def plot_decision_surface(X_, Y_, X, Y, tit):
# Inputs
# X_ : grid data points
# Y_ : grid predicted labels
# X : train data points
# Y : train ground truth labels
plt.subplot()
plt.xlabel('X')
plt.ylabel('Y')
plt.title(tit)
plt.axis([... | 33.28 | 103 | 0.509615 |
fe2f035431701c0aac0393c09513f81eadfd1e78 | 1,870 | py | Python | tests/test_base_cache.py | MyrikLD/cachelib | f4c8864fbef023d1861c2b9ac712074218a7e614 | [
"BSD-3-Clause"
] | null | null | null | tests/test_base_cache.py | MyrikLD/cachelib | f4c8864fbef023d1861c2b9ac712074218a7e614 | [
"BSD-3-Clause"
] | 13 | 2021-10-01T08:04:29.000Z | 2022-03-01T08:05:01.000Z | tests/test_base_cache.py | northernSage/cachelib | bee587a5fde2c51cc22f6796404ccb75fb4f6e6b | [
"BSD-3-Clause"
] | null | null | null | import pytest
from cachelib import BaseCache
@pytest.fixture(autouse=True)
def cache_factory(request):
def _factory(self, *args, **kwargs):
return BaseCache(*args, **kwargs)
request.cls.cache_factory = _factory
class TestBaseCache:
def test_get(self):
cache = self.cache_factory()
... | 26.714286 | 53 | 0.605348 |
75e12e7d1e86ce1759d40b2650278c60fa10496d | 18,448 | py | Python | empress/core.py | mestaki/empress | 52cb9c8de49ab8f93afea5edf4cb6bfcfa8e72de | [
"Apache-2.0",
"CC0-1.0",
"BSD-3-Clause"
] | null | null | null | empress/core.py | mestaki/empress | 52cb9c8de49ab8f93afea5edf4cb6bfcfa8e72de | [
"Apache-2.0",
"CC0-1.0",
"BSD-3-Clause"
] | null | null | null | empress/core.py | mestaki/empress | 52cb9c8de49ab8f93afea5edf4cb6bfcfa8e72de | [
"Apache-2.0",
"CC0-1.0",
"BSD-3-Clause"
] | null | null | null | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2020, empress development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | 40.017354 | 79 | 0.597897 |
aade1e31148f43bd3e98febab3c75b1ae7a71593 | 10,916 | py | Python | s2py3/lib/python3.6/site-packages/tensorboard/program.py | starcraft2-ai/python-env | 4504696381b8721b9e9914f8ba8d17241348ecf8 | [
"MIT"
] | null | null | null | s2py3/lib/python3.6/site-packages/tensorboard/program.py | starcraft2-ai/python-env | 4504696381b8721b9e9914f8ba8d17241348ecf8 | [
"MIT"
] | 13 | 2020-01-28T22:20:14.000Z | 2022-03-11T23:20:14.000Z | s2py3/lib/python3.6/site-packages/tensorboard/program.py | starcraft2-ai/python-env | 4504696381b8721b9e9914f8ba8d17241348ecf8 | [
"MIT"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 37.129252 | 80 | 0.719494 |
3ec72c73c5b41e0c5ba3ed26e0f5a5d76826e756 | 2,296 | py | Python | hackathon/HePing/neuromac-master/generate_motor.py | zzhmark/vaa3d_tools | 3ca418add85a59ac7e805d55a600b78330d7e53d | [
"MIT"
] | 1 | 2021-12-27T19:14:03.000Z | 2021-12-27T19:14:03.000Z | hackathon/HePing/neuromac-master/generate_motor.py | zzhmark/vaa3d_tools | 3ca418add85a59ac7e805d55a600b78330d7e53d | [
"MIT"
] | null | null | null | hackathon/HePing/neuromac-master/generate_motor.py | zzhmark/vaa3d_tools | 3ca418add85a59ac7e805d55a600b78330d7e53d | [
"MIT"
] | null | null | null | import copy,time
import random
import numpy as np
from growth_procs import unit_sample_on_sphere,\
direction_to,\
gradient_to,\
normalize_length,\
get_entity,\
get_eigen_entity,\
prepare_next_front
L_NORM = 40 # fixed-size elongations
def extend_front(front,seed,constellation):
if front.o... | 41.745455 | 106 | 0.621951 |
0460a7fe0d1f7519350809ff967837b1ccfa551a | 2,323 | py | Python | commands/nitrotype/news.py | adl212/Lacan-NTSport-Source-Code | b5b01cbb5cc97b5cbd3a6ebcf90c2e6d82322968 | [
"MIT"
] | 1 | 2021-04-25T18:31:48.000Z | 2021-04-25T18:31:48.000Z | commands/nitrotype/news.py | adl212/Lacan-NTSport-Source-Code | b5b01cbb5cc97b5cbd3a6ebcf90c2e6d82322968 | [
"MIT"
] | 6 | 2021-03-26T21:18:57.000Z | 2021-05-03T18:04:37.000Z | commands/nitrotype/news.py | adl212/Lacan-NTSport-Source-Code | b5b01cbb5cc97b5cbd3a6ebcf90c2e6d82322968 | [
"MIT"
] | 4 | 2021-03-06T16:48:36.000Z | 2021-05-23T00:54:09.000Z | '''An interactive view of the latest nitrotype news'''
from discord.ext import commands
from discord import Reaction, User
from packages.utils import Embed, ImproperType
from packages.nitrotype import News
from asyncio import TimeoutError
def cycle_news(news, current_page):
if current_page == 4:
return 0
... | 37.467742 | 245 | 0.582867 |
1cd7635f61c64c50f66654a5fcde9f7a82daf0dc | 457 | py | Python | src/fireorm/Fields/NullField.py | jerber/FireORM | bf224c79400c1f00c56d3dfbee14074371da8e74 | [
"MIT"
] | 5 | 2020-04-08T22:46:18.000Z | 2020-08-26T07:44:26.000Z | src/fireorm/Fields/NullField.py | jerber/FireORM | bf224c79400c1f00c56d3dfbee14074371da8e74 | [
"MIT"
] | 1 | 2021-04-30T21:16:12.000Z | 2021-04-30T21:16:12.000Z | src/fireorm/Fields/NullField.py | jerber/FireORM | bf224c79400c1f00c56d3dfbee14074371da8e74 | [
"MIT"
] | null | null | null | from fireorm.Fields import Field
class NullField(Field):
def __init__(self, **kwargs):
super().__init__(validate=NullField.validate, **kwargs)
@staticmethod
def validate(value):
if not type(value) is type(None):
raise Exception(f'Value: {value} is not None! It is type: {type(value)}')
if __name__ == '__... | 19.869565 | 76 | 0.68709 |
2e1d0fa747bc9f9f47dde41e971806bb9dcda151 | 8,209 | py | Python | greendoge/wallet/puzzles/test_cc.py | grayfallstown/greendoge-blockchain | 31e325913374d694dc0859140d006a642e7f95ac | [
"Apache-2.0"
] | null | null | null | greendoge/wallet/puzzles/test_cc.py | grayfallstown/greendoge-blockchain | 31e325913374d694dc0859140d006a642e7f95ac | [
"Apache-2.0"
] | null | null | null | greendoge/wallet/puzzles/test_cc.py | grayfallstown/greendoge-blockchain | 31e325913374d694dc0859140d006a642e7f95ac | [
"Apache-2.0"
] | null | null | null | # this is used to iterate on `cc.clvm` to ensure that it's producing the sort
# of output that we expect
from typing import Dict, List, Optional, Tuple
from blspy import G2Element
from greendoge.types.blockchain_format.coin import Coin
from greendoge.types.blockchain_format.program import Program
from greendoge.type... | 33.781893 | 120 | 0.751736 |
5585e7313ab58cbbabd69d7422df8d286b5b39a7 | 468 | py | Python | practico_03/practico_03_test.py | pablobots/frro-python-2021-00 | 1a3d6d80462e212aa724e6581baa68411b5d2240 | [
"MIT"
] | null | null | null | practico_03/practico_03_test.py | pablobots/frro-python-2021-00 | 1a3d6d80462e212aa724e6581baa68411b5d2240 | [
"MIT"
] | 14 | 2021-02-18T00:17:02.000Z | 2021-03-22T12:53:01.000Z | practico_03/practico_03_test.py | pablobots/frro-python-2021-00 | 1a3d6d80462e212aa724e6581baa68411b5d2240 | [
"MIT"
] | 1 | 2021-02-16T16:23:20.000Z | 2021-02-16T16:23:20.000Z | # Cuando se finalice el TP se debe descomentar este archivo
def test_ejercicio_01():
import ejercicio_01
def test_ejercicio_02():
import ejercicio_02
def test_ejercicio_03():
import ejercicio_03
def test_ejercicio_04():
import ejercicio_04
def test_ejercicio_05():
import ejercicio_05
def... | 13.764706 | 59 | 0.752137 |
848a89a50a5e7d62921c39a36ff06d8c5c1f9963 | 5,797 | py | Python | tests/unit_tests/test_component/gui/tk/test_parameter_setter_window_tk.py | ismaelJimenez/mamba_server | e6e2343291a0df24f226bde0d13e5bfa74cc3650 | [
"MIT"
] | null | null | null | tests/unit_tests/test_component/gui/tk/test_parameter_setter_window_tk.py | ismaelJimenez/mamba_server | e6e2343291a0df24f226bde0d13e5bfa74cc3650 | [
"MIT"
] | null | null | null | tests/unit_tests/test_component/gui/tk/test_parameter_setter_window_tk.py | ismaelJimenez/mamba_server | e6e2343291a0df24f226bde0d13e5bfa74cc3650 | [
"MIT"
] | null | null | null | import pytest
import os
import time
from mamba.core.context import Context
from mamba.marketplace.components.digitizer.keysight_m8131a import DigitizerKsm8131A
from mamba.component.gui.tk.parameter_setter_window_tk import ParameterSetterComponent
from mamba.component.gui.msg import RunAction, RegisterAction
from mamba... | 34.505952 | 86 | 0.634121 |
1b83d453a01f24903cf111e7fb35759632d378c9 | 7,678 | py | Python | cogs/events.py | Senarc-Studios/Security | b179c053c22733f84a9845579ee026ea4f7b0948 | [
"BSD-3-Clause"
] | null | null | null | cogs/events.py | Senarc-Studios/Security | b179c053c22733f84a9845579ee026ea4f7b0948 | [
"BSD-3-Clause"
] | null | null | null | cogs/events.py | Senarc-Studios/Security | b179c053c22733f84a9845579ee026ea4f7b0948 | [
"BSD-3-Clause"
] | null | null | null | import os
import cool_utils
import discord
from cool_utils import Terminal
from dotenv import find_dotenv, load_dotenv
from discord.ext import commands
def output(content):
Terminal.display(content)
def env(variable: str):
load_dotenv(find_dotenv())
env = os.getenv(variable)
if env == None:
Terminal.error(f"En... | 46.533333 | 398 | 0.720761 |
e968690027e049205e8064061b9ec56c666a4a51 | 663 | py | Python | selectionSort.py | rj011/Hacktoberfest2021-4 | 0aa981d4ba5e71c86cc162d34fe57814050064c2 | [
"MIT"
] | 41 | 2021-10-03T16:03:52.000Z | 2021-11-14T18:15:33.000Z | selectionSort.py | rj011/Hacktoberfest2021-4 | 0aa981d4ba5e71c86cc162d34fe57814050064c2 | [
"MIT"
] | 175 | 2021-10-03T10:47:31.000Z | 2021-10-20T11:55:32.000Z | selectionSort.py | rj011/Hacktoberfest2021-4 | 0aa981d4ba5e71c86cc162d34fe57814050064c2 | [
"MIT"
] | 208 | 2021-10-03T11:24:04.000Z | 2021-10-31T17:27:59.000Z | # Sorting Algorithm: Selection Sort
# Time Complexity: O(n^2) , where n is the no of elements
# Space Complexity: O(1)
def selectionSort(arr):
print(f"Unsorted Array: {arr}")
# Size of Array
size = len(arr)
swaps = 0
i = 0
while i < size-1:
j = i + 1
while j <= size-1:
... | 24.555556 | 57 | 0.499246 |
996958433cbaf648657cd317f5a5b15e18facd2a | 243 | py | Python | muazzin/azan_region.py | akirasy/random-apps | 8715a2d41a784615a63d693cac94d44ace9d459c | [
"MIT"
] | null | null | null | muazzin/azan_region.py | akirasy/random-apps | 8715a2d41a784615a63d693cac94d44ace9d459c | [
"MIT"
] | null | null | null | muazzin/azan_region.py | akirasy/random-apps | 8715a2d41a784615a63d693cac94d44ace9d459c | [
"MIT"
] | null | null | null | kemaman = 'https://www.e-solat.gov.my/index.php?r=esolatApi/xmlfeed&zon=TRG04'
kuala_lumpur = 'https://www.e-solat.gov.my/index.php?r=esolatApi/xmlfeed&zon=WLY01'
temerloh = 'https://www.e-solat.gov.my/index.php?r=esolatApi/xmlfeed&zon=PHG03'
| 60.75 | 83 | 0.753086 |
145011cfe0119e75d5f73368cd43257c3b6bf93e | 1,065 | py | Python | var/spack/repos/builtin/packages/ndiff/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/ndiff/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/ndiff/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Ndiff(Package):
"""The ndiff tool is a binary utility that compares putatively similar
... | 34.354839 | 94 | 0.70892 |
3e9b9f9d85c7fdb29b49e3a0c7b1029667e75f49 | 14,833 | py | Python | charts/bctlquickstart/bctl-quickstart/bctl_quickstart/bctl_quickstart/utils.py | bastionzero/charts | 1a51583f2c9aa7dc0c5c72093003e259523a1f14 | [
"Apache-2.0"
] | null | null | null | charts/bctlquickstart/bctl-quickstart/bctl_quickstart/bctl_quickstart/utils.py | bastionzero/charts | 1a51583f2c9aa7dc0c5c72093003e259523a1f14 | [
"Apache-2.0"
] | 2 | 2022-01-26T12:02:20.000Z | 2022-02-23T15:07:09.000Z | charts/bctlquickstart/bctl-quickstart/bctl_quickstart/bctl_quickstart/utils.py | bastionzero/charts | 1a51583f2c9aa7dc0c5c72093003e259523a1f14 | [
"Apache-2.0"
] | null | null | null | # Built-in modules
import yaml
import os
import time
import json
import logging
from datetime import datetime, timedelta
# 3rd party modules
import requests
from kubernetes import client, config, watch
# Global variables
SERVICE_URL = os.environ.get('SERVICE_URL', 'https://cloud.bastionzero.com')
BASE_URL = f'{SERVI... | 36.89801 | 191 | 0.658329 |
bd7c4675d1e27ec0d002f4641d39ffa128332fae | 4,687 | py | Python | examples/online_srv/online_management_simulate.py | lpd6375/qlib | 3a911bc09ba5136cd7c61c2c8dcca8a63339e738 | [
"MIT"
] | 8,637 | 2020-09-21T05:07:34.000Z | 2022-03-31T10:02:54.000Z | examples/online_srv/online_management_simulate.py | yingtaoluo/qlib | c18b64e96702ace58beeb66151148737a549a901 | [
"MIT"
] | 711 | 2020-09-21T03:32:44.000Z | 2022-03-31T22:18:42.000Z | examples/online_srv/online_management_simulate.py | yingtaoluo/qlib | c18b64e96702ace58beeb66151148737a549a901 | [
"MIT"
] | 1,569 | 2020-09-21T10:21:08.000Z | 2022-03-31T01:14:12.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
This example is about how can simulate the OnlineManager based on rolling tasks.
"""
from pprint import pprint
import fire
import qlib
from qlib.model.trainer import DelayTrainerR, DelayTrainerRM, TrainerR, TrainerRM
from qlib.workflow impo... | 45.504854 | 155 | 0.666098 |
f6b24671ac9326fb7bba73691bfbe260de1cceed | 661 | py | Python | pages/main_page.py | ls4351/testapp | 83238af14e07e2dcc7476244a00bbc05b6f960f3 | [
"MIT"
] | null | null | null | pages/main_page.py | ls4351/testapp | 83238af14e07e2dcc7476244a00bbc05b6f960f3 | [
"MIT"
] | null | null | null | pages/main_page.py | ls4351/testapp | 83238af14e07e2dcc7476244a00bbc05b6f960f3 | [
"MIT"
] | null | null | null | from dash import dcc
from dash import html
from dash import callback
from dash.dependencies import Input, Output
from testapp import *
layout = html.Div([
html.H1('You Passed'),
github_info_header(),
html.Div([
"Input: ",
dcc.Input(id='ticker-input', value='Enter stock ticker', type='text')... | 25.423077 | 77 | 0.683812 |
e9a4a641d233b1200b417fa0ad601286786d81ea | 83,709 | py | Python | patroni/ha.py | wilfriedroset/patroni | dc9ff4cb8ae974ae5cc5b2521a12a53143936c2c | [
"MIT"
] | null | null | null | patroni/ha.py | wilfriedroset/patroni | dc9ff4cb8ae974ae5cc5b2521a12a53143936c2c | [
"MIT"
] | 2 | 2020-03-25T08:17:27.000Z | 2020-04-20T14:11:37.000Z | patroni/ha.py | qiuwenhuifx/patroni | 49c9585de1ac1d9206def4ae3ddf66a910f57d67 | [
"MIT"
] | null | null | null | import datetime
import functools
import json
import logging
import six
import sys
import time
import uuid
from collections import namedtuple
from multiprocessing.pool import ThreadPool
from threading import RLock
from . import psycopg
from .async_executor import AsyncExecutor, CriticalTask
from .exceptions import DCS... | 52.746692 | 120 | 0.614283 |
ce1a43967aa2199908c19f5b0370d68f0dd26dce | 4,998 | py | Python | tests/test_helper.py | charlie9578/greenbyte-api-sdk | 6835ee1f6a667b5c7827c5248391081f06b75513 | [
"MIT"
] | null | null | null | tests/test_helper.py | charlie9578/greenbyte-api-sdk | 6835ee1f6a667b5c7827c5248391081f06b75513 | [
"MIT"
] | null | null | null | tests/test_helper.py | charlie9578/greenbyte-api-sdk | 6835ee1f6a667b5c7827c5248391081f06b75513 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
greenbyteapi
This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
"""
import os, tempfile, requests
class TestHelper(object):
"""A Helper Class for various functions associated with API testing.
This class contains static and class methods... | 39.666667 | 99 | 0.560424 |
57459b7219d11980cbb8d1e4aa81ec1f688c1410 | 213 | py | Python | DawnMC/templatetags/kong_tags.py | Dawn-MC/DawnMC-Wiki | e15dbfc5dadd9d0cf0737f390ec4887764cd3bd0 | [
"MIT"
] | 22 | 2015-11-08T11:41:42.000Z | 2022-02-09T15:28:23.000Z | DawnMC/templatetags/kong_tags.py | Dawn-MC/DawnMC-Wiki | e15dbfc5dadd9d0cf0737f390ec4887764cd3bd0 | [
"MIT"
] | 2 | 2016-01-20T22:48:23.000Z | 2016-01-20T22:48:26.000Z | DawnMC/templatetags/kong_tags.py | Dawn-MC/DawnMC-Wiki | e15dbfc5dadd9d0cf0737f390ec4887764cd3bd0 | [
"MIT"
] | 117 | 2015-04-15T20:57:32.000Z | 2022-03-15T21:46:29.000Z | from django import template
register = template.Library()
@register.filter
def micro_to_milli(value):
return value/1000
@register.filter
def render_twill(result):
return result.test.render(result.site)
| 17.75 | 42 | 0.774648 |
eb218cec5d686c760410c51923c47eb703ef2f1d | 3,936 | py | Python | setup.py | qlixed/pymemwiper | 216bc05f9b67e37d0c98e3f3a70f08e3362f07d9 | [
"MIT"
] | 2 | 2017-12-08T22:52:20.000Z | 2018-10-28T20:40:42.000Z | setup.py | qlixed/pymemwiper | 216bc05f9b67e37d0c98e3f3a70f08e3362f07d9 | [
"MIT"
] | 20 | 2017-06-04T22:13:06.000Z | 2020-01-05T22:32:24.000Z | setup.py | qlixed/python-memwiper | 216bc05f9b67e37d0c98e3f3a70f08e3362f07d9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
import io
import os
import re
from glob import glob
from os.path import basename
from os.path import dirname
from os.path import join
from os.path import relpath
from os.path import splitext
fr... | 34.831858 | 115 | 0.61001 |
ae3aad0b469df3c5792b0d2b32ab73214f9db830 | 7,429 | py | Python | app/main/money.py | hezmondo/lulu | 507a863f00086e827e4063d0666a4d97f10941c6 | [
"MIT"
] | null | null | null | app/main/money.py | hezmondo/lulu | 507a863f00086e827e4063d0666a4d97f10941c6 | [
"MIT"
] | 7 | 2021-03-03T00:25:30.000Z | 2021-03-30T14:38:30.000Z | app/main/money.py | hezmondo/lulu | 507a863f00086e827e4063d0666a4d97f10941c6 | [
"MIT"
] | null | null | null | from flask import json, request
from app.dao.money import get_acc_id, get_acc_descs, get_accsums, get_cat_id, get_cats, get_money_acc, \
get_money_item_row, get_money_items, post_money_acc, post_money_item
from app.dao.dashboard import get_user_data_content
from app.dao.income import get_income_items
from app.main.... | 39.727273 | 113 | 0.655404 |
02c7e572ee136bccd41dce5921846204bb6ab68d | 4,475 | py | Python | src/components_3d.py | xFrednet/3D-Packman | bc6ee43d9299f668bb984c5f34b4067077926b6f | [
"MIT"
] | 4 | 2021-03-11T00:21:46.000Z | 2021-12-21T08:02:33.000Z | src/components_3d.py | xFrednet/3D-Packman | bc6ee43d9299f668bb984c5f34b4067077926b6f | [
"MIT"
] | null | null | null | src/components_3d.py | xFrednet/3D-Packman | bc6ee43d9299f668bb984c5f34b4067077926b6f | [
"MIT"
] | null | null | null | import math
import glm
#
# Object physics
#
class Velocity:
def __init__(self, x=0.0, y=0.0, z=0.0, along_world_axis=True, allow_paused=False):
self.value = glm.vec3(x, y, z)
self.along_world_axis = along_world_axis
self.allow_paused = allow_paused
class Ghost:
pass
class Win:
... | 21.618357 | 87 | 0.564916 |
004fd129e769db550cb245b344601e6083fb5bac | 4,916 | py | Python | docs/conf.py | davidblewett/timescale_bench | 0d38ce5892d0d50989e9ff48f332a4033b0d9079 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | davidblewett/timescale_bench | 0d38ce5892d0d50989e9ff48f332a4033b0d9079 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | davidblewett/timescale_bench | 0d38ce5892d0d50989e9ff48f332a4033b0d9079 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# timescale_bench documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 9 13:47:02 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in th... | 29.97561 | 77 | 0.689992 |
c0f1e423722e7803eff396c676772edd9af71ae9 | 973 | py | Python | tests/local_repos_tests/test_amendments_api.py | mtholder/peyotl | bbbe0e828c0cd706a11cd1b25a739d4603cbbe63 | [
"BSD-2-Clause"
] | 6 | 2015-01-11T06:24:38.000Z | 2017-11-23T17:18:12.000Z | tests/local_repos_tests/test_amendments_api.py | OpenTreeOfLife/peyotl | bbbe0e828c0cd706a11cd1b25a739d4603cbbe63 | [
"BSD-2-Clause"
] | 60 | 2015-01-09T10:30:58.000Z | 2020-05-20T17:08:36.000Z | tests/local_repos_tests/test_amendments_api.py | OpenTreeOfLife/peyotl | bbbe0e828c0cd706a11cd1b25a739d4603cbbe63 | [
"BSD-2-Clause"
] | 3 | 2015-09-03T15:29:00.000Z | 2015-10-08T20:03:30.000Z | #! /usr/bin/env python
import unittest
from peyotl.api import TaxonomicAmendmentsAPI
from peyotl.test.support import test_amendments_api
from peyotl.test.support.pathmap import get_test_repos
from peyotl.utility import get_logger
_LOG = get_logger(__name__)
test_repos = get_test_repos(['mini_amendments'])
@unittes... | 30.40625 | 95 | 0.731757 |
6101907c936c7d5131440ca4b83be8d35e69eb34 | 740 | py | Python | src/database_countries.py | abeakkas/ipho-unofficial.org | 803ab3cc20670304f7be899ecc48b753765c2ddc | [
"MIT"
] | 5 | 2020-04-10T19:32:43.000Z | 2021-05-08T23:39:21.000Z | src/database_countries.py | abeakkas/ipho-unofficial.org | 803ab3cc20670304f7be899ecc48b753765c2ddc | [
"MIT"
] | 5 | 2016-09-01T04:38:53.000Z | 2019-01-31T15:51:39.000Z | src/database_countries.py | abeakkas/ipho-unofficial.org | 803ab3cc20670304f7be899ecc48b753765c2ddc | [
"MIT"
] | 7 | 2016-08-10T10:30:59.000Z | 2020-02-21T14:12:35.000Z | import csv
database = []
code_indexed = {}
code_to_country = {}
previous_code = {}
next_code = {}
with open("database/countries.csv") as file:
reader = csv.reader(file)
prev = ""
for row in reader:
assert len(row) == 4, "Country row error: {}".format(row)
entry = {
... | 27.407407 | 66 | 0.504054 |
14febd7571777898c8d1d859636af172dbba0bca | 1,325 | py | Python | src/datasets/mini.py | mattochal/fsl_tutorial_public | f3a65a1f36c2d785e2f7b92638d289dd97439ede | [
"MIT"
] | null | null | null | src/datasets/mini.py | mattochal/fsl_tutorial_public | f3a65a1f36c2d785e2f7b92638d289dd97439ede | [
"MIT"
] | null | null | null | src/datasets/mini.py | mattochal/fsl_tutorial_public | f3a65a1f36c2d785e2f7b92638d289dd97439ede | [
"MIT"
] | null | null | null | from datasets.dataset_utils import load_dataset_from_pkl, load_dataset_from_from_folder
from datasets.dataset_template import ColorDatasetInMemory, ColorDatasetOnDisk
import os
import numpy as np
def get_MiniImageNet(args_per_set, setnames=["train", "val", "test"]):
"""
Returns MiniImagenet datasets.
"""
... | 41.40625 | 92 | 0.673962 |
4a68b69b00a249ce5b99c13714b38580ce66376d | 3,927 | py | Python | sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_workspace_operations.py | praveenkuttappan/azure-sdk-for-python | 4b79413667b7539750a6c7dde15737013a3d4bd5 | [
"MIT"
] | null | null | null | sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_workspace_operations.py | praveenkuttappan/azure-sdk-for-python | 4b79413667b7539750a6c7dde15737013a3d4bd5 | [
"MIT"
] | 1 | 2021-06-07T06:37:28.000Z | 2021-06-07T06:37:28.000Z | sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_workspace_operations.py | praveenkuttappan/azure-sdk-for-python | 4b79413667b7539750a6c7dde15737013a3d4bd5 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 42.684783 | 133 | 0.669977 |
c8b0aa5a05b5ebf7c40bb9a43856c71972bbed7a | 11,692 | py | Python | site-packages/Bio/KEGG/Enzyme/__init__.py | oz90210/Pyto | 59f185149b71e57e5debeb1c9a61a28739e81720 | [
"MIT"
] | 2 | 2020-08-25T13:55:00.000Z | 2020-08-25T16:36:03.000Z | site-packages/Bio/KEGG/Enzyme/__init__.py | oz90210/Pyto | 59f185149b71e57e5debeb1c9a61a28739e81720 | [
"MIT"
] | 1 | 2020-04-25T20:36:07.000Z | 2020-04-25T20:36:07.000Z | site-packages/Bio/KEGG/Enzyme/__init__.py | Wristlebane/Pyto | 901ac307b68486d8289105c159ca702318bea5b0 | [
"MIT"
] | 1 | 2019-03-14T18:59:30.000Z | 2019-03-14T18:59:30.000Z | # Copyright 2001 by Tarjei Mikkelsen. All rights reserved.
# Copyright 2007 by Michiel de Hoon. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Code to work with the KEGG En... | 34.694362 | 74 | 0.503421 |
d85397528d2176195829cf3a756ae0a235e68e96 | 29,261 | py | Python | util/test/rdtest/shared/Texture_Zoo.py | RsDylan/renderdoc | bb45e67e30c26b7b0930b0c877a2c07ecf1755d0 | [
"MIT"
] | null | null | null | util/test/rdtest/shared/Texture_Zoo.py | RsDylan/renderdoc | bb45e67e30c26b7b0930b0c877a2c07ecf1755d0 | [
"MIT"
] | null | null | null | util/test/rdtest/shared/Texture_Zoo.py | RsDylan/renderdoc | bb45e67e30c26b7b0930b0c877a2c07ecf1755d0 | [
"MIT"
] | null | null | null | import renderdoc as rd
import rdtest
from typing import List, Tuple
import time
import os
def srgb2linear(f):
if f <= 0.04045:
return f / 12.92
else:
return ((f + 0.055) / 1.055) ** 2.4
def linear2srgb(f):
if f <= 0.0031308:
return f * 12.92
else:
return 1.055 * (f **... | 43.869565 | 189 | 0.543146 |
20ad4be675488629bed01da7adf32aca86a0f26d | 6,511 | py | Python | freezerclient/v1/client.py | memogarcia/python-freezerclient | 7431d7b62cb75801175a337e41e9c8255786793a | [
"Apache-2.0"
] | 18 | 2016-04-22T10:05:08.000Z | 2021-08-31T05:12:22.000Z | freezerclient/v1/client.py | memogarcia/python-freezerclient | 7431d7b62cb75801175a337e41e9c8255786793a | [
"Apache-2.0"
] | null | null | null | freezerclient/v1/client.py | memogarcia/python-freezerclient | 7431d7b62cb75801175a337e41e9c8255786793a | [
"Apache-2.0"
] | 4 | 2016-06-23T15:53:15.000Z | 2019-03-04T07:26:01.000Z | # (c) Copyright 2014-2016 Hewlett-Packard Development Company, L.P.
#
# 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 ap... | 39.944785 | 78 | 0.65397 |
3fd3a7eeb9e8f16e46b3a60f2eaaa26a210f8981 | 59 | py | Python | web_website/tests/__init__.py | agenterpgmbh/misc-addons | 27e36d119b1e73089a2ebfcd8d4cfc706c8f1f41 | [
"MIT"
] | null | null | null | web_website/tests/__init__.py | agenterpgmbh/misc-addons | 27e36d119b1e73089a2ebfcd8d4cfc706c8f1f41 | [
"MIT"
] | 1 | 2020-05-03T04:27:29.000Z | 2020-05-03T04:27:29.000Z | web_website/tests/__init__.py | eneldoserrata/misc-addons | 6f3b94d8a71d603d9ad449f96edfc66385e78080 | [
"MIT"
] | 2 | 2020-05-09T02:08:59.000Z | 2022-03-21T06:37:15.000Z | from . import test_website_dependent
from . import test_ui
| 19.666667 | 36 | 0.830508 |
bc3af526369fe0cfe3414ea18a420bab17ffaaf6 | 1,633 | py | Python | vega/core/pipeline/conf.py | Lzc06/vega | 852d2f57e21caed11473ddc96397124561eacf8a | [
"MIT"
] | 12 | 2020-12-13T08:34:24.000Z | 2022-03-20T15:17:17.000Z | vega/core/pipeline/conf.py | Lzc06/vega | 852d2f57e21caed11473ddc96397124561eacf8a | [
"MIT"
] | 3 | 2021-03-31T20:15:40.000Z | 2022-02-09T23:50:46.000Z | built-in/TensorFlow/Research/cv/image_classification/Darts_for_TensorFlow/automl/vega/core/pipeline/conf.py | Huawei-Ascend/modelzoo | df51ed9c1d6dbde1deef63f2a037a369f8554406 | [
"Apache-2.0"
] | 2 | 2021-07-10T12:40:46.000Z | 2021-12-17T07:55:15.000Z | # -*- coding:utf-8 -*-
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the MIT License.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the ... | 25.515625 | 72 | 0.726883 |
ec48da9cdf6d539fb10c0cf29246ddd806aa9afa | 161 | py | Python | 2018/Day15/setup.py | dh256/adventofcode | 428eec13f4cbf153333a0e359bcff23070ef6d27 | [
"MIT"
] | null | null | null | 2018/Day15/setup.py | dh256/adventofcode | 428eec13f4cbf153333a0e359bcff23070ef6d27 | [
"MIT"
] | null | null | null | 2018/Day15/setup.py | dh256/adventofcode | 428eec13f4cbf153333a0e359bcff23070ef6d27 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='day15',
author='David Hanley',
packages=['day15'],
description='Advent of Code 2018 Day 15 Solution'
) | 20.125 | 53 | 0.677019 |
3f48b5cd09df92ba1ac25859657275e74906c430 | 3,534 | py | Python | bindings/python/ensmallen/datasets/string/thermusscotoductus.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/thermusscotoductus.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/thermusscotoductus.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Thermus scotoductus.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--protein as... | 32.722222 | 223 | 0.676287 |
6e9a2930950158c575bb28b9860348a4a725a096 | 324 | py | Python | python/python_crash_course/chapter_5/5-11.ordinal_ numbers.py | lmonsalve22/Learning-to-Code | 2e32eba3fbd0bd63cc539e1e6d372ca346b765c9 | [
"MIT"
] | null | null | null | python/python_crash_course/chapter_5/5-11.ordinal_ numbers.py | lmonsalve22/Learning-to-Code | 2e32eba3fbd0bd63cc539e1e6d372ca346b765c9 | [
"MIT"
] | null | null | null | python/python_crash_course/chapter_5/5-11.ordinal_ numbers.py | lmonsalve22/Learning-to-Code | 2e32eba3fbd0bd63cc539e1e6d372ca346b765c9 | [
"MIT"
] | null | null | null | """ print a list with ordinal number
but modify 1st, 2nd, 3rd """
ordinal_numbers = list(range(1,10))
for number in ordinal_numbers:
if number == 1:
print(f'{number}st')
elif number == 2:
print(f'{number}nd')
elif number == 3:
print(f'{number}rd')
else:
print(f'{number}... | 23.142857 | 36 | 0.583333 |
2a8332f74c4495c34a62b65af592fbc1fef7c9d0 | 15,003 | py | Python | core/binaryedge_utils.py | phage-nz/observer | 2a2d9b5047c5b2aba0d102c0c21e97de472bbd39 | [
"Apache-2.0"
] | 2 | 2020-04-25T05:11:49.000Z | 2021-02-09T21:27:38.000Z | core/binaryedge_utils.py | phage-nz/observer | 2a2d9b5047c5b2aba0d102c0c21e97de472bbd39 | [
"Apache-2.0"
] | null | null | null | core/binaryedge_utils.py | phage-nz/observer | 2a2d9b5047c5b2aba0d102c0c21e97de472bbd39 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
from .geo_utils import get_home_isocode, get_home_name, resolve_asn
from .log_utils import get_module_logger
from .string_utils import defang_url
from django.utils import timezone
from web.models import Host, Compromise, SensorHit, OpenPort, PortCVE, Setting, CountryHit
import json
import requests
... | 34.331808 | 253 | 0.629274 |
f34264e4072d3f0134e4e2d206752593af4c7941 | 505 | py | Python | meaningful_agent_training/train.py | moriartyjm/netzerotc | 72abcc20d8ed01e6314316848504aba2ba14ad0e | [
"MIT"
] | 10 | 2021-09-17T14:54:26.000Z | 2022-02-08T02:08:46.000Z | meaningful_agent_training/train.py | rangl-labs/netzerotc | 72abcc20d8ed01e6314316848504aba2ba14ad0e | [
"MIT"
] | 72 | 2021-07-05T12:31:46.000Z | 2022-03-06T17:06:28.000Z | meaningful_agent_training/train.py | moriartyjm/netzerotc | 72abcc20d8ed01e6314316848504aba2ba14ad0e | [
"MIT"
] | 3 | 2021-12-21T23:35:23.000Z | 2022-02-08T02:08:49.000Z | #!/usr/bin/env python
import os
import gym
from util import Trainer
env = gym.make("rangl:nztc-open-loop-v0")
# Train an RL agent on the environment
trainer = Trainer(env)
os.chdir("./saved_models/")
# os.chdir("./noise_sigma0.1_modified_workbook_finalized_env.py_DDPG/")
# To resume a previously trained model:
# tr... | 25.25 | 85 | 0.770297 |
bc8032e5d11e2a1d0183154ae07e0468309188ca | 5,957 | py | Python | src/zenml/post_execution/step.py | SKRohit/zenml | ba84f56d8fc6043cdcb59832ab47bc8261e25d12 | [
"Apache-2.0"
] | null | null | null | src/zenml/post_execution/step.py | SKRohit/zenml | ba84f56d8fc6043cdcb59832ab47bc8261e25d12 | [
"Apache-2.0"
] | null | null | null | src/zenml/post_execution/step.py | SKRohit/zenml | ba84f56d8fc6043cdcb59832ab47bc8261e25d12 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) ZenML GmbH 2021. 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... | 33.846591 | 79 | 0.622965 |
b55e12f9ebdfb606bd74d19ee56f85cf920b8ed6 | 10,268 | py | Python | tests/v2/test_0166-0167-0170-random-issues.py | colesbury/awkward-1.0 | d036ab18eb54de8a2571d9f179d315ac8ee22119 | [
"BSD-3-Clause"
] | null | null | null | tests/v2/test_0166-0167-0170-random-issues.py | colesbury/awkward-1.0 | d036ab18eb54de8a2571d9f179d315ac8ee22119 | [
"BSD-3-Clause"
] | null | null | null | tests/v2/test_0166-0167-0170-random-issues.py | colesbury/awkward-1.0 | d036ab18eb54de8a2571d9f179d315ac8ee22119 | [
"BSD-3-Clause"
] | null | null | null | # BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE
import pytest # noqa: F401
import numpy as np # noqa: F401
import awkward as ak # noqa: F401
to_list = ak._v2.operations.convert.to_list
def test_0166_IndexedOptionArray():
array = ak._v2.highlevel.Array(
[[2, 3,... | 25.478908 | 88 | 0.454519 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.