hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
916ad498f5f7937a47cd76bb93a7df7cec38d72f | 5,354 | py | Python | core_tools/utility/plotting/plot_1D.py | peendebak/core_tools | 2e43edf0bbc1d7ceb7042559db499535e8f6a076 | [
"BSD-2-Clause"
] | null | null | null | core_tools/utility/plotting/plot_1D.py | peendebak/core_tools | 2e43edf0bbc1d7ceb7042559db499535e8f6a076 | [
"BSD-2-Clause"
] | null | null | null | core_tools/utility/plotting/plot_1D.py | peendebak/core_tools | 2e43edf0bbc1d7ceb7042559db499535e8f6a076 | [
"BSD-2-Clause"
] | null | null | null | import matplotlib.pyplot as plt
import matplotlib as mpl
import numpy as np
import copy
from core_tools.utility.plotting.plot_settings import plot_layout, graph_settings_1D, _1D_raw_plot_data
from core_tools.utility.plotting.plot_general import _data_plotter
# TODO add log scale support !!!
if __name__ == '__main__... | 31.309942 | 111 | 0.686216 |
916bb212bcbe679ba4c75cb54521ee006fb78140 | 5,110 | py | Python | v0.3/achat.py | Forec/lan-ichat | f2ae85ef6a8f2b30126be787e52785971c926d8c | [
"0BSD"
] | 63 | 2016-10-25T06:05:29.000Z | 2021-06-11T01:13:30.000Z | v0.3/achat.py | yyfhust/lan-ichat | f2ae85ef6a8f2b30126be787e52785971c926d8c | [
"0BSD"
] | 1 | 2018-10-16T10:06:19.000Z | 2018-10-16T10:06:19.000Z | v0.3/achat.py | yyfhust/lan-ichat | f2ae85ef6a8f2b30126be787e52785971c926d8c | [
"0BSD"
] | 55 | 2016-10-25T06:05:33.000Z | 2021-12-10T04:58:57.000Z | # last edit date: 2016/11/2
# author: Forec
# LICENSE
# Copyright (c) 2015-2017, Forec <forec@bupt.edu.cn>
# Permission to use, copy, modify, and/or distribute this code for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
... | 34.066667 | 77 | 0.541292 |
916c668852524852bcc137172db7eabf2b12d323 | 25 | py | Python | gdb/util.py | dennereed/paleocore | d6da6c39cde96050ee4b9e7213ec1200530cbeee | [
"MIT"
] | 1 | 2021-02-05T19:50:13.000Z | 2021-02-05T19:50:13.000Z | gdb/util.py | dennereed/paleocore | d6da6c39cde96050ee4b9e7213ec1200530cbeee | [
"MIT"
] | 59 | 2020-06-17T22:21:51.000Z | 2022-02-10T05:00:01.000Z | gdb/util.py | dennereed/paleocore | d6da6c39cde96050ee4b9e7213ec1200530cbeee | [
"MIT"
] | 2 | 2020-07-01T14:11:09.000Z | 2020-08-10T17:27:26.000Z | from gdb.models import *
| 12.5 | 24 | 0.76 |
916cb78c9e97224f18aea1ae145aa0983c3481c1 | 274 | py | Python | iwg_blog/blog/views/__init__.py | razortheory/who-iwg-webapp | e2318d286cd9ab87d4d8103bc7b3072cfb99bf76 | [
"MIT"
] | null | null | null | iwg_blog/blog/views/__init__.py | razortheory/who-iwg-webapp | e2318d286cd9ab87d4d8103bc7b3072cfb99bf76 | [
"MIT"
] | null | null | null | iwg_blog/blog/views/__init__.py | razortheory/who-iwg-webapp | e2318d286cd9ab87d4d8103bc7b3072cfb99bf76 | [
"MIT"
] | null | null | null | from .base import ArticleView, ArticlePreviewView, ArticleListView, SearchView, LandingView, \
CategoryView, TagView, SubscribeForUpdates, UnsubscribeFromUpdates
from .ajax import GetArticleSlugAjax, TagsAutocompleteAjax
from .errors import page_not_found, server_error
| 54.8 | 94 | 0.850365 |
916d6d6dc88be47cd9a443a50f8be165dfb36ec7 | 3,167 | py | Python | io_import_rbsp/rbsp/rpak_materials.py | snake-biscuits/io_import_rbsp | 0de47dc70c373cc0417cc222d5d83e6dde72068b | [
"MIT"
] | 7 | 2021-09-30T11:13:00.000Z | 2022-03-25T16:19:19.000Z | io_import_rbsp/rbsp/rpak_materials.py | snake-biscuits/io_import_rbsp | 0de47dc70c373cc0417cc222d5d83e6dde72068b | [
"MIT"
] | 1 | 2021-11-15T18:36:51.000Z | 2021-11-15T18:36:51.000Z | io_import_rbsp/rbsp/rpak_materials.py | snake-biscuits/io_import_rbsp | 0de47dc70c373cc0417cc222d5d83e6dde72068b | [
"MIT"
] | null | null | null | # by MrSteyk & Dogecore
# TODO: extraction instructions & testing
import json
import os.path
from typing import List
import bpy
loaded_materials = {}
MATERIAL_LOAD_PATH = "" # put your path here
# normal has special logic
MATERIAL_INPUT_LINKING = {
"color": "Base Color",
"rough": "Roughness",
"spec": ... | 38.156627 | 115 | 0.649826 |
916e1ddff0241cef174fcd4e5ccac0206688c76b | 636 | py | Python | initcmds/models.py | alldevic/mtauksync | 1a5d325ca8a7878aba5b292d7835546b24bb554c | [
"MIT"
] | null | null | null | initcmds/models.py | alldevic/mtauksync | 1a5d325ca8a7878aba5b292d7835546b24bb554c | [
"MIT"
] | null | null | null | initcmds/models.py | alldevic/mtauksync | 1a5d325ca8a7878aba5b292d7835546b24bb554c | [
"MIT"
] | null | null | null | from django.db import models
TASK_STATUS = (
("c", "created"),
("p", "progress"),
("s", "success"),
("f", "failed")
)
| 27.652174 | 77 | 0.636792 |
916f9138f4bbb1766481eef3ea77cac318445838 | 3,291 | py | Python | aardvark/conf/reaper_conf.py | ttsiouts/aardvark | cbf29f332df86814dd581152faf863c0d29ae41c | [
"Apache-2.0"
] | null | null | null | aardvark/conf/reaper_conf.py | ttsiouts/aardvark | cbf29f332df86814dd581152faf863c0d29ae41c | [
"Apache-2.0"
] | null | null | null | aardvark/conf/reaper_conf.py | ttsiouts/aardvark | cbf29f332df86814dd581152faf863c0d29ae41c | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 European Organization for Nuclear Research.
# 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/LIC... | 32.91 | 79 | 0.671832 |
916fbb01e62cdbb436021c5d032e0ff8b5532255 | 3,171 | py | Python | src/Data.py | jhlee93/WNet-cGAN-Keras | 89666be91083735c3259e04907bbfbe1c89fc8f8 | [
"MIT"
] | 7 | 2019-07-09T15:16:52.000Z | 2021-05-13T14:14:48.000Z | src/Data.py | jhlee93/WNet-cGAN-Keras | 89666be91083735c3259e04907bbfbe1c89fc8f8 | [
"MIT"
] | 4 | 2019-07-24T13:35:11.000Z | 2021-04-20T07:59:49.000Z | src/Data.py | jhlee93/WNet-cGAN-Keras | 89666be91083735c3259e04907bbfbe1c89fc8f8 | [
"MIT"
] | 1 | 2021-12-16T13:19:13.000Z | 2021-12-16T13:19:13.000Z | import glob
import numpy as np
| 44.661972 | 198 | 0.571429 |
9170343444c1172d149626528603249b2f63831c | 370 | py | Python | count_files.py | xuannianc/keras-retinanet | d1da39592042927aaf3b3eb905a308c327983bed | [
"Apache-2.0"
] | null | null | null | count_files.py | xuannianc/keras-retinanet | d1da39592042927aaf3b3eb905a308c327983bed | [
"Apache-2.0"
] | null | null | null | count_files.py | xuannianc/keras-retinanet | d1da39592042927aaf3b3eb905a308c327983bed | [
"Apache-2.0"
] | null | null | null | import csv
vat_filenames = set()
train_csv_filename = 'train_annotations.csv'
val_csv_filename = 'val_annotations.csv'
for csv_filename in [train_csv_filename, val_csv_filename]:
for line in csv.reader(open(csv_filename)):
vat_filename = line[0].split('/')[-1]
vat_filenames.add(vat_filename)
pr... | 30.833333 | 59 | 0.735135 |
917058eae76c95edb3644d77520d9eb1f3e8a1e9 | 8,908 | py | Python | liberaforms/views/admin.py | ngi-nix/liberaforms | 5882994736292e7ab34c4c9207805b307478a6c7 | [
"MIT"
] | 3 | 2021-09-02T16:45:42.000Z | 2022-02-21T19:06:25.000Z | liberaforms/views/admin.py | ngi-nix/liberaforms | 5882994736292e7ab34c4c9207805b307478a6c7 | [
"MIT"
] | 2 | 2021-08-17T04:13:10.000Z | 2021-09-14T22:48:21.000Z | liberaforms/views/admin.py | ngi-nix/liberaforms | 5882994736292e7ab34c4c9207805b307478a6c7 | [
"MIT"
] | 1 | 2021-08-17T07:13:15.000Z | 2021-08-17T07:13:15.000Z | """
This file is part of LiberaForms.
# SPDX-FileCopyrightText: 2020 LiberaForms.org
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
import os, json
from flask import g, request, render_template, redirect
from flask import session, flash, Blueprint
from flask import send_file, after_this_request
from flask_babel imp... | 36.064777 | 84 | 0.635608 |
91705feef5320bb231c5d61b510ee6321361c934 | 29,405 | py | Python | python/zephyr/datasets/score_dataset.py | r-pad/zephyr | c8f45e207c11bfc2b21df169db65a7df892d2848 | [
"MIT"
] | 18 | 2021-05-27T04:40:38.000Z | 2022-02-08T19:46:31.000Z | python/zephyr/datasets/score_dataset.py | r-pad/zephyr | c8f45e207c11bfc2b21df169db65a7df892d2848 | [
"MIT"
] | null | null | null | python/zephyr/datasets/score_dataset.py | r-pad/zephyr | c8f45e207c11bfc2b21df169db65a7df892d2848 | [
"MIT"
] | 2 | 2021-11-07T12:42:00.000Z | 2022-03-01T12:51:54.000Z | import os, copy
import cv2
from functools import partial
import numpy as np
import torch
import torchvision
from torch.utils.data import Dataset
from zephyr.data_util import to_np, vectorize, img2uint8
from zephyr.utils import torch_norm_fast
from zephyr.utils.mask_edge import getRendEdgeScore
from zephyr... | 44.218045 | 167 | 0.534875 |
91708273d963214e9092983f15d8ef3340677e15 | 814 | py | Python | em Python/Roteiro7/Roteiro7__testes_dijkstra.py | GuilhermeEsdras/Grafos | b6556c3d679496d576f65b798a1a584cd73e40f4 | [
"MIT"
] | null | null | null | em Python/Roteiro7/Roteiro7__testes_dijkstra.py | GuilhermeEsdras/Grafos | b6556c3d679496d576f65b798a1a584cd73e40f4 | [
"MIT"
] | null | null | null | em Python/Roteiro7/Roteiro7__testes_dijkstra.py | GuilhermeEsdras/Grafos | b6556c3d679496d576f65b798a1a584cd73e40f4 | [
"MIT"
] | null | null | null | from Roteiro7.Roteiro7__funcoes import GrafoComPesos
# .:: Arquivo de Testes do Algoritmo de Dijkstra ::. #
# --------------------------------------------------------------------------- #
grafo_aula = GrafoComPesos(
['E', 'A', 'B', 'C', 'D'],
{
'E-A': 1,
'E-C': 10,
'A-B': 2,
'B... | 22.611111 | 79 | 0.395577 |
9170b4be66538fa8e6767525842e58971759fde7 | 356 | py | Python | QScreenCast/spyder/api.py | awinia-github/QScreenCast | 09d343cae0a1c7f86faf28e08a62bd09976aaf2e | [
"MIT"
] | null | null | null | QScreenCast/spyder/api.py | awinia-github/QScreenCast | 09d343cae0a1c7f86faf28e08a62bd09976aaf2e | [
"MIT"
] | null | null | null | QScreenCast/spyder/api.py | awinia-github/QScreenCast | 09d343cae0a1c7f86faf28e08a62bd09976aaf2e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# ----------------------------------------------------------------------------
# Copyright Tom Hren
# Licensed under the terms of the MIT License
# ----------------------------------------------------------------------------
"""
Python QtScreenCaster Spyder API.
"""
| 25.428571 | 78 | 0.38764 |
917377628f552efbcce428798dd528e6e5fe7134 | 4,196 | py | Python | setup.py | aaron19950321/ICOM | d5bd0705776c505dd1df0a1c76a07fee2d218394 | [
"PSF-2.0",
"BSD-3-Clause"
] | 5 | 2018-10-09T13:39:31.000Z | 2020-03-26T18:39:49.000Z | setup.py | aaron19950321/ICOM | d5bd0705776c505dd1df0a1c76a07fee2d218394 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | setup.py | aaron19950321/ICOM | d5bd0705776c505dd1df0a1c76a07fee2d218394 | [
"PSF-2.0",
"BSD-3-Clause"
] | 2 | 2018-10-09T13:39:36.000Z | 2018-10-09T23:18:39.000Z | import os, os.path
import subprocess
from distutils.core import setup
from py2exe.build_exe import py2exe
PROGRAM_NAME = 'icom_app'
PROGRAM_DESC = 'simple icom app'
NSIS_SCRIPT_TEMPLATE = r"""
!define py2exeOutputDirectory '{output_dir}\'
!define exe '{program_name}.exe'
; Uses solid LZMA compression. Ca... | 30.18705 | 81 | 0.580076 |
91762cf01e789ac760eedf4942c7a866b5214252 | 632 | py | Python | src/lingcomp/farm/features.py | CharlottePouw/interpreting-complexity | b9a73c0aff18e4c6b4209a6511d00639494c70da | [
"Apache-2.0"
] | 2 | 2020-12-18T12:26:22.000Z | 2020-12-19T18:47:07.000Z | src/lingcomp/farm/features.py | CharlottePouw/interpreting-complexity | b9a73c0aff18e4c6b4209a6511d00639494c70da | [
"Apache-2.0"
] | null | null | null | src/lingcomp/farm/features.py | CharlottePouw/interpreting-complexity | b9a73c0aff18e4c6b4209a6511d00639494c70da | [
"Apache-2.0"
] | 1 | 2021-05-19T13:39:45.000Z | 2021-05-19T13:39:45.000Z | import torch
from farm.data_handler.samples import Sample
from farm.modeling.prediction_head import RegressionHead
| 31.6 | 88 | 0.724684 |
9176396ea025090d1e564363b18149e19bf37323 | 5,057 | py | Python | manager/tests/api_view_test_classes.py | UN-ICC/icc-digital-id-manager | aca0109b3202b292145326ec5523ee8f24691a83 | [
"Apache-2.0"
] | 3 | 2021-02-03T16:37:19.000Z | 2022-02-07T09:59:03.000Z | manager/tests/api_view_test_classes.py | UN-ICC/icc-digital-id-manager | aca0109b3202b292145326ec5523ee8f24691a83 | [
"Apache-2.0"
] | null | null | null | manager/tests/api_view_test_classes.py | UN-ICC/icc-digital-id-manager | aca0109b3202b292145326ec5523ee8f24691a83 | [
"Apache-2.0"
] | 2 | 2021-02-10T16:03:31.000Z | 2022-02-07T08:50:16.000Z | import pytest
from rest_framework import status
from rest_framework.test import APIClient
def returns_status_code_http_200_ok(response):
assert response.status_code == status.HTTP_200_OK
def returns_status_code_http_401_unauthorized(response):
assert response.status_code == status.HTTP_401_UNAUTHOR... | 31.02454 | 84 | 0.721376 |
9176ff87702ba5b114dba78865e902b3d3390b83 | 2,259 | py | Python | dashboard/dashboard.py | TrustyJAID/Toxic-Cogs | 870d92067ba2a99b9ade2f957f945b95fdbc80f7 | [
"MIT"
] | null | null | null | dashboard/dashboard.py | TrustyJAID/Toxic-Cogs | 870d92067ba2a99b9ade2f957f945b95fdbc80f7 | [
"MIT"
] | null | null | null | dashboard/dashboard.py | TrustyJAID/Toxic-Cogs | 870d92067ba2a99b9ade2f957f945b95fdbc80f7 | [
"MIT"
] | null | null | null | from collections import defaultdict
import discord
from redbot.core import Config, checks, commands
from redbot.core.bot import Red
from redbot.core.utils.chat_formatting import box, humanize_list, inline
from abc import ABC
# ABC Mixins
from dashboard.abc.abc import MixinMeta
from dashboard.abc.mixin impor... | 30.945205 | 110 | 0.657371 |
91773a1b99193243fe941616b2fc5339f203eb98 | 410 | py | Python | algorithms/162.Find-Peak-Element/Python/solution_2.py | hopeness/leetcode | 496455fa967f0704d729b4014f92f52b1d69d690 | [
"MIT"
] | null | null | null | algorithms/162.Find-Peak-Element/Python/solution_2.py | hopeness/leetcode | 496455fa967f0704d729b4014f92f52b1d69d690 | [
"MIT"
] | null | null | null | algorithms/162.Find-Peak-Element/Python/solution_2.py | hopeness/leetcode | 496455fa967f0704d729b4014f92f52b1d69d690 | [
"MIT"
] | null | null | null | """
https://leetcode.com/problems/find-peak-element/submissions/
"""
from typing import List
| 22.777778 | 60 | 0.473171 |
9177bf15b6da687a6ae646c46fc3addf65d8004a | 2,684 | py | Python | data_loader.py | vinbigdata-medical/MIDL2021-Xray-Classification | 51359126d07573053059c36e3cd95a7fd7100e0e | [
"MIT"
] | 4 | 2021-04-14T08:04:08.000Z | 2021-08-10T10:15:00.000Z | data_loader.py | vinbigdata-medical/MIDL2021-Xray-Classification | 51359126d07573053059c36e3cd95a7fd7100e0e | [
"MIT"
] | 1 | 2022-01-13T12:51:31.000Z | 2022-01-13T12:51:31.000Z | data_loader.py | vinbigdata-medical/MIDL2021-Xray-Classification | 51359126d07573053059c36e3cd95a7fd7100e0e | [
"MIT"
] | null | null | null | from torchvision.datasets import ImageFolder
from torchvision import transforms
import random
import os
import torch
from torch.utils.data.dataloader import DataLoader
from utils import constants, get_default_device
from image_folder_with_path import ImageFolderWithPaths
def to_device(data, device):
"""Move tensor... | 37.277778 | 118 | 0.770492 |
9177c031d705388dfe8031bad5b727ad1032aa9e | 4,254 | py | Python | calliope/test/test_analysis.py | sjpfenninger/calliope | a4e49c3b7d37f908bafc84543510eec0b4cf5d9f | [
"Apache-2.0"
] | 1 | 2019-11-11T15:50:16.000Z | 2019-11-11T15:50:16.000Z | calliope/test/test_analysis.py | mhdella/calliope | a4e49c3b7d37f908bafc84543510eec0b4cf5d9f | [
"Apache-2.0"
] | null | null | null | calliope/test/test_analysis.py | mhdella/calliope | a4e49c3b7d37f908bafc84543510eec0b4cf5d9f | [
"Apache-2.0"
] | 1 | 2019-11-11T15:50:18.000Z | 2019-11-11T15:50:18.000Z | # import matplotlib
# matplotlib.use('Qt5Agg') # Prevents `Invalid DISPLAY variable` errors
import pytest
import tempfile
from calliope import Model
from calliope.utils import AttrDict
from calliope import analysis
from . import common
from .common import assert_almost_equal, solver, solver_io
import matplotlib.p... | 36.672414 | 99 | 0.603197 |
917a6b3b8a05d7c695e7c6d3cb38a9324f5ab905 | 302 | py | Python | mol/data/reader.py | TzuTingWei/mol | 9499925443f389d8e960b6d656f2953d21df3e3b | [
"MIT"
] | null | null | null | mol/data/reader.py | TzuTingWei/mol | 9499925443f389d8e960b6d656f2953d21df3e3b | [
"MIT"
] | null | null | null | mol/data/reader.py | TzuTingWei/mol | 9499925443f389d8e960b6d656f2953d21df3e3b | [
"MIT"
] | null | null | null | import os
from mol.util import read_xyz
dirname = os.path.dirname(os.path.abspath(__file__))
filename = os.path.join(dirname, 'look_and_say.dat')
with open(filename, 'r') as handle:
look_and_say = handle.read()
| 25.166667 | 58 | 0.748344 |
917a93c6b5689f031c6779f12176c0d60e186575 | 13,198 | py | Python | cinder/tests/unit/targets/test_spdknvmf.py | lightsey/cinder | e03d68e42e57a63f8d0f3e177fb4287290612b24 | [
"Apache-2.0"
] | 3 | 2015-04-02T21:44:36.000Z | 2016-04-29T21:19:04.000Z | cinder/tests/unit/targets/test_spdknvmf.py | lightsey/cinder | e03d68e42e57a63f8d0f3e177fb4287290612b24 | [
"Apache-2.0"
] | 3 | 2016-04-29T21:45:26.000Z | 2016-05-04T19:41:23.000Z | cinder/tests/unit/targets/test_spdknvmf.py | lightsey/cinder | e03d68e42e57a63f8d0f3e177fb4287290612b24 | [
"Apache-2.0"
] | 4 | 2016-01-27T00:25:52.000Z | 2021-03-25T19:54:08.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 32.268949 | 78 | 0.539855 |
917afbcd55aefac0dcfd4785b8010a4e43b0d1c3 | 4,204 | py | Python | server/algos/euler/transformer.py | yizhang7210/Acre | c98cf8a4fdfb223a1958e8e61df759f889a1b13f | [
"MIT"
] | 2 | 2017-11-27T21:55:21.000Z | 2017-12-30T03:34:40.000Z | server/algos/euler/transformer.py | yizhang7210/Acre | c98cf8a4fdfb223a1958e8e61df759f889a1b13f | [
"MIT"
] | 30 | 2017-09-06T12:00:08.000Z | 2018-06-20T22:47:46.000Z | server/algos/euler/transformer.py | yizhang7210/Acre | c98cf8a4fdfb223a1958e8e61df759f889a1b13f | [
"MIT"
] | 1 | 2021-04-05T13:59:37.000Z | 2021-04-05T13:59:37.000Z | """ This is algos.euler.transformer module.
This module is responsible for transforming raw candle data into training
samples usable to the Euler algorithm.
"""
import datetime
import decimal
from algos.euler.models import training_samples as ts
from core.models import instruments
from datasource.models import... | 35.033333 | 80 | 0.674833 |
917b4bfe42198de5b3e0fb37cbc4743cf9cac201 | 142 | py | Python | diagrams/outscale/__init__.py | analyticsftw/diagrams | 217af329a323084bb98031ac1768bc2353e6d9b6 | [
"MIT"
] | 17,037 | 2020-02-03T01:30:30.000Z | 2022-03-31T18:09:15.000Z | diagrams/outscale/__init__.py | analyticsftw/diagrams | 217af329a323084bb98031ac1768bc2353e6d9b6 | [
"MIT"
] | 529 | 2020-02-03T10:43:41.000Z | 2022-03-31T17:33:08.000Z | diagrams/outscale/__init__.py | analyticsftw/diagrams | 217af329a323084bb98031ac1768bc2353e6d9b6 | [
"MIT"
] | 1,068 | 2020-02-05T11:54:29.000Z | 2022-03-30T23:28:55.000Z | from diagrams import Node
| 15.777778 | 36 | 0.690141 |
917b8eb1f8726a411ad6e99afecc5eaca421cc08 | 1,793 | py | Python | misc/python/mango/application/main_driver/logstream.py | pymango/pymango | b55f831f0194b214e746b2dfb4d9c6671a1abc38 | [
"BSD-2-Clause"
] | 3 | 2020-05-11T03:23:17.000Z | 2021-03-16T09:01:48.000Z | misc/python/mango/application/main_driver/logstream.py | pymango/pymango | b55f831f0194b214e746b2dfb4d9c6671a1abc38 | [
"BSD-2-Clause"
] | null | null | null | misc/python/mango/application/main_driver/logstream.py | pymango/pymango | b55f831f0194b214e746b2dfb4d9c6671a1abc38 | [
"BSD-2-Clause"
] | 2 | 2017-03-04T11:03:40.000Z | 2020-08-01T10:01:36.000Z | __doc__ = \
"""
=======================================================================================
Main-driver :obj:`LogStream` variables (:mod:`mango.application.main_driver.logstream`)
=======================================================================================
.. currentmodule:: mango.application.ma... | 25.985507 | 108 | 0.665365 |
917c31411ccb8a75122b971cca9ce661e5940151 | 9,680 | py | Python | ucdev/cy7c65211/header.py | luftek/python-ucdev | 8d3c46d25551f1237e6a2f7a90d54c24bcb1d4f9 | [
"MIT"
] | 11 | 2015-07-08T01:28:01.000Z | 2022-01-26T14:29:47.000Z | ucdev/cy7c65211/header.py | luftek/python-ucdev | 8d3c46d25551f1237e6a2f7a90d54c24bcb1d4f9 | [
"MIT"
] | 5 | 2017-12-07T15:04:00.000Z | 2021-06-02T14:47:14.000Z | ucdev/cy7c65211/header.py | tai/python-ucdev | 8d3c46d25551f1237e6a2f7a90d54c24bcb1d4f9 | [
"MIT"
] | 4 | 2017-02-18T18:20:13.000Z | 2022-03-23T16:21:20.000Z | # -*- coding: utf-8-unix -*-
import platform
######################################################################
# Platform specific headers
######################################################################
if platform.system() == 'Linux':
src = """
typedef bool BOOL;
"""
#############################... | 25.882353 | 70 | 0.71095 |
917c654b7225932aa925e3dba908d54b0c600e75 | 565 | py | Python | deep_qa/layers/wrappers/output_mask.py | richarajpal/deep_qa | d918335a1bed71b9cfccf1d5743321cee9c61952 | [
"Apache-2.0"
] | 459 | 2017-02-08T13:40:17.000Z | 2021-12-12T12:57:48.000Z | deep_qa/layers/wrappers/output_mask.py | richarajpal/deep_qa | d918335a1bed71b9cfccf1d5743321cee9c61952 | [
"Apache-2.0"
] | 176 | 2017-01-26T01:19:41.000Z | 2018-04-22T19:16:01.000Z | deep_qa/layers/wrappers/output_mask.py | richarajpal/deep_qa | d918335a1bed71b9cfccf1d5743321cee9c61952 | [
"Apache-2.0"
] | 154 | 2017-01-26T01:00:30.000Z | 2021-02-05T10:44:42.000Z | from overrides import overrides
from ..masked_layer import MaskedLayer
| 26.904762 | 98 | 0.695575 |
917d1911394719c31fdc868c9c05aa1015cc7576 | 1,316 | py | Python | ljmc/energy.py | karnesh/Monte-Carlo-LJ | f33f08c247df963ca48b9d9f8456e26c0bb19923 | [
"MIT"
] | null | null | null | ljmc/energy.py | karnesh/Monte-Carlo-LJ | f33f08c247df963ca48b9d9f8456e26c0bb19923 | [
"MIT"
] | null | null | null | ljmc/energy.py | karnesh/Monte-Carlo-LJ | f33f08c247df963ca48b9d9f8456e26c0bb19923 | [
"MIT"
] | null | null | null | """
energy.py
function that computes the inter particle energy
It uses truncated 12-6 Lennard Jones potential
All the variables are in reduced units.
"""
def distance(atom1, atom2):
"""
Computes the square of inter particle distance
Minimum image convention is applied for distance calculatio... | 19.352941 | 101 | 0.544833 |
917d24af3dd098f693a886046f82e8514c7bd83a | 2,628 | py | Python | CEST/Evaluation/lorenzian.py | ludgerradke/bMRI | dcf93749bb2fba3700e6bcfde691355d55090951 | [
"MIT"
] | null | null | null | CEST/Evaluation/lorenzian.py | ludgerradke/bMRI | dcf93749bb2fba3700e6bcfde691355d55090951 | [
"MIT"
] | null | null | null | CEST/Evaluation/lorenzian.py | ludgerradke/bMRI | dcf93749bb2fba3700e6bcfde691355d55090951 | [
"MIT"
] | null | null | null | import numpy as np
import math
from scipy.optimize import curve_fit
| 45.310345 | 117 | 0.459665 |
917ddc860e3cb5987c6d77cf2eda4923d9234d7a | 7,572 | py | Python | components/network_models_LSTU.py | neuralchen/CooGAN | 3155cbb5a283226474356d3a9f01918609ddd4ec | [
"MIT"
] | 12 | 2020-12-09T07:04:12.000Z | 2022-03-01T03:30:46.000Z | components/network_models_LSTU.py | neuralchen/CooGAN | 3155cbb5a283226474356d3a9f01918609ddd4ec | [
"MIT"
] | null | null | null | components/network_models_LSTU.py | neuralchen/CooGAN | 3155cbb5a283226474356d3a9f01918609ddd4ec | [
"MIT"
] | 4 | 2020-12-23T03:57:53.000Z | 2022-03-28T13:56:14.000Z | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
#############################################################
# File: network_models_LSTU.py
# Created Date: Tuesday February 25th 2020
# Author: Chen Xuanhong
# Email: chenxuanhongzju@outlook.com
# Last Modified: Tuesday, 25th February 2020 9:57:06 pm
# Modified By: Chen ... | 39.233161 | 118 | 0.58822 |
917e0cc4efaf369d4d17aeaeb0fc5c964a039793 | 760 | py | Python | slender/tests/list/test_keep_if.py | torokmark/slender | 3bf815e22f7802ba48706f31ba608cf609e23e68 | [
"Apache-2.0"
] | 1 | 2020-01-10T21:51:46.000Z | 2020-01-10T21:51:46.000Z | slender/tests/list/test_keep_if.py | torokmark/slender | 3bf815e22f7802ba48706f31ba608cf609e23e68 | [
"Apache-2.0"
] | null | null | null | slender/tests/list/test_keep_if.py | torokmark/slender | 3bf815e22f7802ba48706f31ba608cf609e23e68 | [
"Apache-2.0"
] | null | null | null |
from unittest import TestCase
from expects import expect, equal, raise_error
from slender import List
| 28.148148 | 76 | 0.628947 |
9181932ab3632366f38b401fcbe5e47425259914 | 6,809 | py | Python | test/functional/bchn-txbroadcastinterval.py | 1Crazymoney/bitcoin-cash-node | 8f82823b3c5d4bcb401b0e4e6b464c1228f936e1 | [
"MIT"
] | 1 | 2021-11-24T03:54:05.000Z | 2021-11-24T03:54:05.000Z | test/functional/bchn-txbroadcastinterval.py | 1Crazymoney/bitcoin-cash-node | 8f82823b3c5d4bcb401b0e4e6b464c1228f936e1 | [
"MIT"
] | null | null | null | test/functional/bchn-txbroadcastinterval.py | 1Crazymoney/bitcoin-cash-node | 8f82823b3c5d4bcb401b0e4e6b464c1228f936e1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2020 The Bitcoin Cash Node developers
# Author matricz
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
Test that inv messages are sent according to
an exponential distribution with scale -... | 46.958621 | 110 | 0.679101 |
91820c594379b0529582b42b9cc165d4cd520738 | 33,871 | py | Python | tests/compute/test_sampler.py | buaaqt/dgl | 64f6f3c1a8c2c3e08ec0750b902f3e2c63fd2cd7 | [
"Apache-2.0"
] | 1 | 2020-07-21T03:03:15.000Z | 2020-07-21T03:03:15.000Z | tests/compute/test_sampler.py | buaaqt/dgl | 64f6f3c1a8c2c3e08ec0750b902f3e2c63fd2cd7 | [
"Apache-2.0"
] | null | null | null | tests/compute/test_sampler.py | buaaqt/dgl | 64f6f3c1a8c2c3e08ec0750b902f3e2c63fd2cd7 | [
"Apache-2.0"
] | null | null | null | import backend as F
import numpy as np
import scipy as sp
import dgl
from dgl import utils
import unittest
from numpy.testing import assert_array_equal
np.random.seed(42)
if __name__ == '__main__':
test_create_full()
test_1neighbor_sampler_all()
test_10neighbor_sampler_all()
test_1neighbor_sampler(... | 46.783149 | 103 | 0.575507 |
9183b4d3330e5dc6c4da3188d85901cf1703c4d4 | 3,178 | py | Python | plugins/voila/voila/__init__.py | srinivasreddych/aws-orbit-workbench | 2d154addff58d26f5459a73c06148aaf5e9fad46 | [
"Apache-2.0"
] | 94 | 2021-03-19T19:55:11.000Z | 2022-03-31T19:50:01.000Z | plugins/voila/voila/__init__.py | srinivasreddych/aws-orbit-workbench | 2d154addff58d26f5459a73c06148aaf5e9fad46 | [
"Apache-2.0"
] | 410 | 2021-03-19T18:04:48.000Z | 2022-03-22T13:56:53.000Z | plugins/voila/voila/__init__.py | srinivasreddych/aws-orbit-workbench | 2d154addff58d26f5459a73c06148aaf5e9fad46 | [
"Apache-2.0"
] | 24 | 2021-03-19T23:16:23.000Z | 2022-03-04T01:05:18.000Z | # Copyright Amazon.com, Inc. or its affiliates. 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
#
# Unl... | 37.833333 | 116 | 0.701385 |
91848acd7c9a76b40212893d24a66f1267e0b221 | 4,316 | py | Python | tools/generate_driver_list.py | aarunsai81/netapp | 8f0f7bf9be7f4d9fb9c3846bfc639c90a05f86ba | [
"Apache-2.0"
] | 11 | 2015-08-25T13:11:18.000Z | 2020-10-15T11:29:20.000Z | tools/generate_driver_list.py | aarunsai81/netapp | 8f0f7bf9be7f4d9fb9c3846bfc639c90a05f86ba | [
"Apache-2.0"
] | 5 | 2018-01-25T11:31:56.000Z | 2019-05-06T23:13:35.000Z | tools/generate_driver_list.py | aarunsai81/netapp | 8f0f7bf9be7f4d9fb9c3846bfc639c90a05f86ba | [
"Apache-2.0"
] | 11 | 2015-02-20T18:48:24.000Z | 2021-01-30T20:26:18.000Z | #! /usr/bin/env python
#
# 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... | 30.609929 | 78 | 0.621177 |
9184ffff91bd0e91c571446c2eb2a2d6fb77ed63 | 126 | py | Python | Disp_pythonScript.py | maniegley/python | 0e3a98cbff910cc78b2c0386a9cca6c5bb20eefc | [
"MIT"
] | 1 | 2019-05-04T03:20:44.000Z | 2019-05-04T03:20:44.000Z | Disp_pythonScript.py | maniegley/python | 0e3a98cbff910cc78b2c0386a9cca6c5bb20eefc | [
"MIT"
] | null | null | null | Disp_pythonScript.py | maniegley/python | 0e3a98cbff910cc78b2c0386a9cca6c5bb20eefc | [
"MIT"
] | null | null | null | import sys
f = open("/home/vader/Desktop/test.py", "r")
#read all file
python_script = f.read()
print(python_script)
| 15.75 | 44 | 0.666667 |
9185566c87d7284eaa28e018591be112687ee8a6 | 2,001 | py | Python | email_file.py | grussr/email-file-attachment | afa65b679b3c88b419643e216b9942fdefeaf9fc | [
"MIT"
] | null | null | null | email_file.py | grussr/email-file-attachment | afa65b679b3c88b419643e216b9942fdefeaf9fc | [
"MIT"
] | null | null | null | email_file.py | grussr/email-file-attachment | afa65b679b3c88b419643e216b9942fdefeaf9fc | [
"MIT"
] | null | null | null | import smtplib
import argparse
from os.path import basename
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.utils import COMMASPACE, formatdate
import configparser
import json
parser = argparse.ArgumentParser()
parser.add... | 32.274194 | 155 | 0.696152 |
91860dad187d68b19d0b7553594210d867a8ccc4 | 70 | py | Python | logs/constants.py | gonzatorte/sw-utils | 767ec4aa8cbe1e0143f601482024ba1d9b76da64 | [
"MIT"
] | null | null | null | logs/constants.py | gonzatorte/sw-utils | 767ec4aa8cbe1e0143f601482024ba1d9b76da64 | [
"MIT"
] | null | null | null | logs/constants.py | gonzatorte/sw-utils | 767ec4aa8cbe1e0143f601482024ba1d9b76da64 | [
"MIT"
] | null | null | null | import logging
TRACE_LVL = int( (logging.DEBUG + logging.INFO) / 2 )
| 17.5 | 53 | 0.7 |
9186884237c62f08e8e5c91cdb86f2cf165aa0f6 | 173 | py | Python | examples/simple_lakehouse/simple_lakehouse/repo.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 2 | 2021-06-21T17:50:26.000Z | 2021-06-21T19:14:23.000Z | examples/simple_lakehouse/simple_lakehouse/repo.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 1 | 2021-06-21T18:30:02.000Z | 2021-06-25T21:18:39.000Z | examples/simple_lakehouse/simple_lakehouse/repo.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 1 | 2021-08-18T17:21:57.000Z | 2021-08-18T17:21:57.000Z | from dagster import repository
from simple_lakehouse.pipelines import simple_lakehouse_pipeline
| 21.625 | 64 | 0.849711 |
9186f6c899c8a19e537fae60a274b21c711b183a | 7,649 | py | Python | demos/odyssey/dodyssey.py | steingabelgaard/reportlab | b9a537e8386fb4b4b80e9ec89e0cdf392dbd6f61 | [
"BSD-3-Clause"
] | 55 | 2019-09-21T02:45:18.000Z | 2021-12-10T13:38:51.000Z | demos/odyssey/dodyssey.py | cnauroth/reportlab | 377d4ff58491dc6de48551e730c3d7f72db783e5 | [
"BSD-3-Clause"
] | 4 | 2019-09-26T03:16:50.000Z | 2021-12-10T13:40:49.000Z | demos/odyssey/dodyssey.py | cnauroth/reportlab | 377d4ff58491dc6de48551e730c3d7f72db783e5 | [
"BSD-3-Clause"
] | 26 | 2019-09-25T03:54:30.000Z | 2022-03-21T14:03:12.000Z | #Copyright ReportLab Europe Ltd. 2000-2017
#see license.txt for license details
__version__='3.3.0'
__doc__=''
#REPORTLAB_TEST_SCRIPT
import sys, copy, os
from reportlab.platypus import *
_NEW_PARA=os.environ.get('NEW_PARA','0')[0] in ('y','Y','1')
_REDCAP=int(os.environ.get('REDCAP','0'))
_CALLBACK=os.environ.get('CA... | 31.093496 | 104 | 0.587397 |
9187649de93ea28a41bff761a58a3a5d39922848 | 764 | py | Python | tests/test_fred_fred_view.py | Traceabl3/GamestonkTerminal | 922353cade542ce3f62701e10d816852805b9386 | [
"MIT"
] | null | null | null | tests/test_fred_fred_view.py | Traceabl3/GamestonkTerminal | 922353cade542ce3f62701e10d816852805b9386 | [
"MIT"
] | null | null | null | tests/test_fred_fred_view.py | Traceabl3/GamestonkTerminal | 922353cade542ce3f62701e10d816852805b9386 | [
"MIT"
] | null | null | null | """ econ/fred_view.py tests """
import unittest
from unittest import mock
from io import StringIO
import pandas as pd
# pylint: disable=unused-import
from gamestonk_terminal.econ.fred_view import get_fred_data # noqa: F401
fred_data_mock = """
,GDP
2019-01-01,21115.309
2019-04-01,21329.877
2019-07-01,21540.325
2019-... | 24.645161 | 80 | 0.747382 |
9187aae337945bbf532915814ef30a4e08766d0c | 10,938 | py | Python | python27/1.0/lib/linux/gevent/pool.py | jt6562/XX-Net | 7b78e4820a3c78c3ba3e75b3917129d17f00e9fc | [
"BSD-2-Clause"
] | 2 | 2017-04-24T03:04:45.000Z | 2017-09-19T03:38:37.000Z | python27/1.0/lib/linux/gevent/pool.py | TDUncle/XX-Net | 24b2af60dc0abc1c26211813064bb14c1e22bac8 | [
"BSD-2-Clause"
] | null | null | null | python27/1.0/lib/linux/gevent/pool.py | TDUncle/XX-Net | 24b2af60dc0abc1c26211813064bb14c1e22bac8 | [
"BSD-2-Clause"
] | 1 | 2019-04-19T09:11:54.000Z | 2019-04-19T09:11:54.000Z | # Copyright (c) 2009-2010 Denis Bilenko. See LICENSE for details.
"""Managing greenlets in a group.
The :class:`Group` class in this module abstracts a group of running greenlets.
When a greenlet dies, it's automatically removed from the group.
The :class:`Pool` which a subclass of :class:`Group` provides a way to li... | 31.162393 | 132 | 0.598555 |
9187b814b570a612e2b93ab230ce46d039efd3f1 | 4,974 | py | Python | lecarb/estimator/lw/lw_tree.py | anshumandutt/AreCELearnedYet | e2286c3621dea8e4961057b6197c1e14e75aea5a | [
"MIT"
] | 34 | 2020-12-14T01:21:29.000Z | 2022-03-29T04:52:46.000Z | lecarb/estimator/lw/lw_tree.py | anshumandutt/AreCELearnedYet | e2286c3621dea8e4961057b6197c1e14e75aea5a | [
"MIT"
] | 5 | 2020-12-28T16:06:22.000Z | 2022-01-19T18:28:53.000Z | lecarb/estimator/lw/lw_tree.py | anshumandutt/AreCELearnedYet | e2286c3621dea8e4961057b6197c1e14e75aea5a | [
"MIT"
] | 12 | 2021-02-08T17:50:13.000Z | 2022-03-28T11:09:06.000Z | import time
import logging
from typing import Dict, Any, Tuple
import pickle
import numpy as np
import xgboost as xgb
from .common import load_lw_dataset, encode_query, decode_label
from ..postgres import Postgres
from ..estimator import Estimator
from ..utils import evaluate, run_test
from ...dataset.dataset import ... | 34.783217 | 130 | 0.65963 |
9187ef6ed78f1f18095fecd6ea3ce015376d4dfc | 2,525 | py | Python | fsim/utils.py | yamasampo/fsim | 30100789b03981dd9ea11c5c2e17a3c53910f724 | [
"MIT"
] | null | null | null | fsim/utils.py | yamasampo/fsim | 30100789b03981dd9ea11c5c2e17a3c53910f724 | [
"MIT"
] | null | null | null | fsim/utils.py | yamasampo/fsim | 30100789b03981dd9ea11c5c2e17a3c53910f724 | [
"MIT"
] | null | null | null |
import os
import configparser
from warnings import warn
def write_info_to_file(file_handle, separator, *args, **kw_args):
""" Write arguments or keyword arguments to a file. Values will be
separated by a given separator.
"""
output_lines = []
if len(args) > 0:
output_lines.append(separat... | 32.371795 | 98 | 0.613861 |
918946b8867e4746cc6439a71e8ab2ad6d7dc6a7 | 2,950 | py | Python | src/pymortests/function.py | mahgadalla/pymor | ee2806b4c93748e716294c42454d611415da7b5e | [
"Unlicense"
] | 1 | 2021-07-26T12:58:50.000Z | 2021-07-26T12:58:50.000Z | src/pymortests/function.py | mahgadalla/pymor | ee2806b4c93748e716294c42454d611415da7b5e | [
"Unlicense"
] | null | null | null | src/pymortests/function.py | mahgadalla/pymor | ee2806b4c93748e716294c42454d611415da7b5e | [
"Unlicense"
] | null | null | null | # This file is part of the pyMOR project (http://www.pymor.org).
# Copyright 2013-2017 pyMOR developers and contributors. All rights reserved.
# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
import numpy as np
import pytest
from pymor.core.pickle import dumps, loads
from pymor.functions.... | 38.815789 | 108 | 0.671186 |
918a293306bf241e1a965c6b6c86f2b524157237 | 4,603 | py | Python | Code/userIDCrawler.py | CarberZ/social-media-mining | 41aee64a41244a0692987b75b30dedbd0552be49 | [
"MIT"
] | 2 | 2018-10-16T23:09:00.000Z | 2018-11-14T04:08:00.000Z | Code/userIDCrawler.py | CarberZ/social-media-mining | 41aee64a41244a0692987b75b30dedbd0552be49 | [
"MIT"
] | 1 | 2018-11-14T04:06:13.000Z | 2018-11-14T04:15:56.000Z | Code/userIDCrawler.py | CarberZ/social-media-mining | 41aee64a41244a0692987b75b30dedbd0552be49 | [
"MIT"
] | 1 | 2018-11-14T04:06:31.000Z | 2018-11-14T04:06:31.000Z |
'''
step 1
get the userID and their locations
put them all into a database
'''
from bs4 import BeautifulSoup
import urllib
import sqlite3
from selenium import webdriver
import time
import re
from urllib import request
import random
import pickle
import os
import pytesseract
url_dog = "http... | 30.483444 | 138 | 0.550728 |
918a3b0f516ea68dd89954d9a42756ad875c22c6 | 33 | py | Python | src/stoat/core/structure/__init__.py | saarkatz/guppy-struct | b9099353312c365cfd788dbd2d168a9c844765be | [
"Apache-2.0"
] | 1 | 2021-12-07T11:59:11.000Z | 2021-12-07T11:59:11.000Z | src/stoat/core/structure/__init__.py | saarkatz/stoat-struct | b9099353312c365cfd788dbd2d168a9c844765be | [
"Apache-2.0"
] | null | null | null | src/stoat/core/structure/__init__.py | saarkatz/stoat-struct | b9099353312c365cfd788dbd2d168a9c844765be | [
"Apache-2.0"
] | null | null | null | from .structure import Structure
| 16.5 | 32 | 0.848485 |
918a81c6af8725a4b95ff16551cc06a18c633a21 | 709 | py | Python | tbase/network/polices_test.py | iminders/TradeBaselines | 26eb87f2bcd5f6ff479149219b38b17002be6a40 | [
"MIT"
] | 16 | 2020-03-19T15:12:28.000Z | 2021-12-20T06:02:32.000Z | tbase/network/polices_test.py | iminders/TradeBaselines | 26eb87f2bcd5f6ff479149219b38b17002be6a40 | [
"MIT"
] | 14 | 2020-03-23T03:57:00.000Z | 2021-12-20T05:53:33.000Z | tbase/network/polices_test.py | iminders/TradeBaselines | 26eb87f2bcd5f6ff479149219b38b17002be6a40 | [
"MIT"
] | 7 | 2020-03-25T00:30:18.000Z | 2021-01-31T18:45:09.000Z | import unittest
import numpy as np
from tbase.common.cmd_util import set_global_seeds
from tbase.network.polices import RandomPolicy
if __name__ == '__main__':
unittest.main()
| 25.321429 | 65 | 0.671368 |
918a8725328fa6920f55c21e0bb7c5f7406c3135 | 36,887 | py | Python | keystone/tests/unit/core.py | knikolla/keystone | 50f0a50cf4d52d3f61b64713bd4faa7a4626ae53 | [
"Apache-2.0"
] | null | null | null | keystone/tests/unit/core.py | knikolla/keystone | 50f0a50cf4d52d3f61b64713bd4faa7a4626ae53 | [
"Apache-2.0"
] | null | null | null | keystone/tests/unit/core.py | knikolla/keystone | 50f0a50cf4d52d3f61b64713bd4faa7a4626ae53 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 34.217996 | 79 | 0.619676 |
918dd351f71913e5bfee0b534327c85070c34d0b | 17,327 | py | Python | PyISY/Nodes/__init__.py | sneelco/PyISY | f1f916cd7951b1b6a5235bb36444c695fe3294e1 | [
"Apache-2.0"
] | null | null | null | PyISY/Nodes/__init__.py | sneelco/PyISY | f1f916cd7951b1b6a5235bb36444c695fe3294e1 | [
"Apache-2.0"
] | null | null | null | PyISY/Nodes/__init__.py | sneelco/PyISY | f1f916cd7951b1b6a5235bb36444c695fe3294e1 | [
"Apache-2.0"
] | null | null | null |
from .group import Group
from .node import (Node, parse_xml_properties, ATTR_ID)
from time import sleep
from xml.dom import minidom
| 36.324948 | 100 | 0.48612 |
918e36c7c2d321203012c2cecdfb70b87e94940f | 1,329 | py | Python | easyCore/Utils/Logging.py | easyScience/easyCore | 5d16d5b27803277d0c44886f94dab599f764ae0b | [
"BSD-3-Clause"
] | 2 | 2021-11-02T10:22:45.000Z | 2022-02-18T23:41:19.000Z | easyCore/Utils/Logging.py | easyScience/easyCore | 5d16d5b27803277d0c44886f94dab599f764ae0b | [
"BSD-3-Clause"
] | 114 | 2020-06-30T08:52:27.000Z | 2022-03-30T20:47:56.000Z | easyCore/Utils/Logging.py | easyScience/easyCore | 5d16d5b27803277d0c44886f94dab599f764ae0b | [
"BSD-3-Clause"
] | 1 | 2022-03-04T13:01:09.000Z | 2022-03-04T13:01:09.000Z | # SPDX-FileCopyrightText: 2021 easyCore contributors <core@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# 2021 Contributors to the easyCore project <https://github.com/easyScience/easyCore>
__author__ = 'github.com/wardsimon'
__version__ = '0.1.0'
import logging
| 36.916667 | 91 | 0.645598 |
91903bbb82369647bc8ec6646143a89d378edc88 | 234 | py | Python | iqoptionapi/http/billing.py | mustx1/MYIQ | 3afb597aa8a8abc278b7d70dad46af81789eae3e | [
"MIT"
] | 3 | 2021-06-05T06:58:01.000Z | 2021-11-25T23:52:18.000Z | iqoptionapi/http/billing.py | mustx1/MYIQ | 3afb597aa8a8abc278b7d70dad46af81789eae3e | [
"MIT"
] | 5 | 2022-01-20T00:32:49.000Z | 2022-02-16T23:12:10.000Z | iqoptionapi/http/billing.py | mustx1/MYIQ | 3afb597aa8a8abc278b7d70dad46af81789eae3e | [
"MIT"
] | 2 | 2020-11-10T19:03:38.000Z | 2020-12-07T10:42:36.000Z | """Module for IQ option billing resource."""
from iqoptionapi.http.resource import Resource
| 21.272727 | 47 | 0.709402 |
919092189581e9b39163223362020fad3bbd08e7 | 3,416 | py | Python | defaultsob/core.py | honewatson/defaults | c6a845ec1f25fc82e7645dfee60dd2df1cfa4e81 | [
"0BSD"
] | null | null | null | defaultsob/core.py | honewatson/defaults | c6a845ec1f25fc82e7645dfee60dd2df1cfa4e81 | [
"0BSD"
] | null | null | null | defaultsob/core.py | honewatson/defaults | c6a845ec1f25fc82e7645dfee60dd2df1cfa4e81 | [
"0BSD"
] | null | null | null | # -*- coding: utf-8 -*-
def ordered_set(iter):
"""Creates an ordered set
@param iter: list or tuple
@return: list with unique values
"""
final = []
for i in iter:
if i not in final:
final.append(i)
return final
def class_slots(ob):
"""Get object attributes from... | 27.772358 | 77 | 0.624415 |
9190a55060e46f0f4d728a8eb6583235a5fc4dcf | 3,140 | py | Python | tests/bot_test.py | item4/yui | 8628d0d54b94ada3cbe7d1b0f624063258bad10a | [
"MIT"
] | 36 | 2017-06-12T01:09:46.000Z | 2021-01-31T17:57:41.000Z | tests/bot_test.py | item4/yui | 8628d0d54b94ada3cbe7d1b0f624063258bad10a | [
"MIT"
] | 145 | 2017-06-21T13:31:29.000Z | 2021-06-20T01:01:30.000Z | tests/bot_test.py | item4/yui | 8628d0d54b94ada3cbe7d1b0f624063258bad10a | [
"MIT"
] | 21 | 2017-07-24T15:53:19.000Z | 2021-12-23T04:18:31.000Z | import asyncio
from collections import defaultdict
from datetime import timedelta
import pytest
from yui.api import SlackAPI
from yui.bot import Bot
from yui.box import Box
from yui.types.slack.response import APIResponse
from yui.utils import json
from .util import FakeImportLib
| 27.787611 | 75 | 0.605414 |
9190bf228865d048848fd87f601781ac36e5057a | 2,901 | py | Python | scripts/marker_filter.py | CesMak/aruco_detector_ocv | bb45e39664247779cbbbc8d37b89c4556b4984d6 | [
"BSD-3-Clause"
] | 12 | 2019-03-12T08:47:07.000Z | 2022-02-09T03:59:39.000Z | scripts/marker_filter.py | vprooks/simple_aruco_detector | 40cb7354d7da67028c91b4c4652e8c4a1d2abbbb | [
"MIT"
] | 3 | 2020-07-02T04:25:10.000Z | 2021-08-31T15:56:13.000Z | scripts/marker_filter.py | CesMak/aruco_detector_ocv | bb45e39664247779cbbbc8d37b89c4556b4984d6 | [
"BSD-3-Clause"
] | 11 | 2019-10-25T17:36:44.000Z | 2022-02-16T17:12:38.000Z | #!/usr/bin/env python
import numpy as np
import rospy
import geometry_msgs.msg
import tf2_ros
from tf.transformations import quaternion_slerp
if __name__ == '__main__':
rospy.init_node('marker_filter')
alpha = rospy.get_param('~alpha', 0.9)
parent_frame_id = rospy.get_param('~parent_frame_id', 'kinect2... | 36.2625 | 109 | 0.666322 |
9190f1884667aaeb95f3ee0745ae12dfce3341d8 | 3,713 | py | Python | src/backbone/utils.py | hankyul2/FaceDA | 73006327df3668923d4206f81d4976ca1240329d | [
"Apache-2.0"
] | 20 | 2021-11-26T18:05:30.000Z | 2022-02-15T12:21:10.000Z | src/backbone/utils.py | hankyul2/FaceDA | 73006327df3668923d4206f81d4976ca1240329d | [
"Apache-2.0"
] | null | null | null | src/backbone/utils.py | hankyul2/FaceDA | 73006327df3668923d4206f81d4976ca1240329d | [
"Apache-2.0"
] | 1 | 2022-02-15T12:21:17.000Z | 2022-02-15T12:21:17.000Z | import os
import subprocess
from pathlib import Path
from torch.hub import load_state_dict_from_url
import numpy as np
model_urls = {
# ResNet
'resnet18': 'https://download.pytorch.org/models/resnet18-f37072fd.pth',
'resnet34': 'https://download.pytorch.org/models/resnet34-b627a593.pth',
'resnet50':... | 50.175676 | 127 | 0.720442 |
91918e0b4360daa841c2dd658213e7f9249510fa | 702 | py | Python | crawler1.py | pjha1994/Scrape_reddit | 2a00a83854085e09f0cf53aef81969025876039b | [
"Apache-2.0"
] | null | null | null | crawler1.py | pjha1994/Scrape_reddit | 2a00a83854085e09f0cf53aef81969025876039b | [
"Apache-2.0"
] | null | null | null | crawler1.py | pjha1994/Scrape_reddit | 2a00a83854085e09f0cf53aef81969025876039b | [
"Apache-2.0"
] | null | null | null | import requests
from bs4 import BeautifulSoup
links = getLinks("http://www.reddit.com/")
print(links) | 27 | 62 | 0.602564 |
9191a318c08b49c9339f1e4504f721d3f2d1d83b | 2,428 | py | Python | chime2/tests/normal/models/seir_test.py | BrianThomasRoss/CHIME-2 | f084ab552fac5e50841a922293b74d653450790b | [
"BSD-3-Clause"
] | null | null | null | chime2/tests/normal/models/seir_test.py | BrianThomasRoss/CHIME-2 | f084ab552fac5e50841a922293b74d653450790b | [
"BSD-3-Clause"
] | null | null | null | chime2/tests/normal/models/seir_test.py | BrianThomasRoss/CHIME-2 | f084ab552fac5e50841a922293b74d653450790b | [
"BSD-3-Clause"
] | 1 | 2020-11-19T23:08:52.000Z | 2020-11-19T23:08:52.000Z | """Tests for SEIR model in this repo
* Compares conserved quantities
* Compares model against SEIR wo social policies in limit to SIR
"""
from pandas import Series
from pandas.testing import assert_frame_equal, assert_series_equal
from bayes_chime.normal.models import SEIRModel, SIRModel
from pytest import fixture
fro... | 28.232558 | 81 | 0.710461 |
91928996da1f5de4298b9395563c76e7f7e3542f | 4,681 | py | Python | Libraries/mattsLibraries/mathOperations.py | mrware91/PhilTransA-TRXS-Limits | 5592c6c66276cd493d10f066aa636aaf600d3a00 | [
"MIT"
] | null | null | null | Libraries/mattsLibraries/mathOperations.py | mrware91/PhilTransA-TRXS-Limits | 5592c6c66276cd493d10f066aa636aaf600d3a00 | [
"MIT"
] | 2 | 2018-06-19T00:01:27.000Z | 2018-10-16T18:33:24.000Z | Libraries/mattsLibraries/mathOperations.py | mrware91/PhilTransA-TRXS-Limits | 5592c6c66276cd493d10f066aa636aaf600d3a00 | [
"MIT"
] | null | null | null | import numpy as np
from scipy.interpolate import interp1d
from pyTools import *
################################################################################
#~~~~~~~~~Log ops
################################################################################
##########################################################... | 32.734266 | 129 | 0.470626 |
9192d6d1ce77aea0159f3db895468368ec72c08a | 592 | py | Python | setup.py | avryhof/ambient_api | 08194b5d8626801f2c2c7369adacb15eace54802 | [
"MIT"
] | 20 | 2018-12-24T15:40:49.000Z | 2022-01-10T18:58:41.000Z | setup.py | avryhof/ambient_api | 08194b5d8626801f2c2c7369adacb15eace54802 | [
"MIT"
] | 10 | 2018-08-17T02:01:45.000Z | 2021-01-08T23:34:59.000Z | setup.py | avryhof/ambient_api | 08194b5d8626801f2c2c7369adacb15eace54802 | [
"MIT"
] | 14 | 2018-06-13T23:40:12.000Z | 2022-01-05T06:34:13.000Z | from setuptools import setup
setup(
name="ambient_api",
version="1.5.6",
packages=["ambient_api"],
url="https://github.com/avryhof/ambient_api",
license="MIT",
author="Amos Vryhof",
author_email="amos@vryhofresearch.com",
description="A Python class for accessing the Ambient Weather API... | 29.6 | 72 | 0.640203 |
9192df0712738e90f6f197873c3a465c79101722 | 585 | py | Python | tests/llvm/static/test_main_is_found/test_main_is_found.py | ganeshutah/FPChecker | 53a471429762ace13f69733cb2f8b7227fc15b9f | [
"Apache-2.0"
] | 19 | 2019-09-28T16:15:45.000Z | 2022-02-15T15:11:28.000Z | tests/llvm/static/test_main_is_found/test_main_is_found.py | tanmaytirpankar/FPChecker | d3fe4bd9489c5705df58a67dbbc388ac1ebf56bf | [
"Apache-2.0"
] | 16 | 2020-02-01T18:43:00.000Z | 2021-12-22T14:47:39.000Z | tests/llvm/static/test_main_is_found/test_main_is_found.py | tanmaytirpankar/FPChecker | d3fe4bd9489c5705df58a67dbbc388ac1ebf56bf | [
"Apache-2.0"
] | 5 | 2020-07-27T18:15:36.000Z | 2021-11-01T18:43:34.000Z | #!/usr/bin/env python
import subprocess
import os
| 22.5 | 82 | 0.666667 |
91936b7f0195e57ee35ddf84cdb73c2bef559977 | 745 | py | Python | Dynamic_Programming/1259.Integer Replacement/Solution_BFS.py | Zhenye-Na/LxxxCode | afd79d790d0a7495d75e6650f80adaa99bd0ff07 | [
"MIT"
] | 12 | 2019-05-04T04:21:27.000Z | 2022-03-02T07:06:57.000Z | Dynamic_Programming/1259.Integer Replacement/Solution_BFS.py | Zhenye-Na/LxxxCode | afd79d790d0a7495d75e6650f80adaa99bd0ff07 | [
"MIT"
] | 1 | 2019-07-24T18:43:53.000Z | 2019-07-24T18:43:53.000Z | Dynamic_Programming/1259.Integer Replacement/Solution_BFS.py | Zhenye-Na/LxxxCode | afd79d790d0a7495d75e6650f80adaa99bd0ff07 | [
"MIT"
] | 10 | 2019-07-01T04:03:04.000Z | 2022-03-09T03:57:37.000Z | from collections import deque
| 23.28125 | 47 | 0.436242 |
91941908fbc07382f07b7bc44926ab4220545f9d | 947 | py | Python | src/routes/web.py | enflo/weather-flask | c4d905e1f557b4c9b39d0a578fdbb6fefc839028 | [
"Apache-2.0"
] | null | null | null | src/routes/web.py | enflo/weather-flask | c4d905e1f557b4c9b39d0a578fdbb6fefc839028 | [
"Apache-2.0"
] | null | null | null | src/routes/web.py | enflo/weather-flask | c4d905e1f557b4c9b39d0a578fdbb6fefc839028 | [
"Apache-2.0"
] | null | null | null | from flask import Blueprint, render_template
from gateways.models import getWeatherData
web = Blueprint("web", __name__, template_folder='templates')
#@web.route("/profile", methods=['GET'])
#def profile():
# items = getWeatherData.get_last_item()
# return render_template("profile.html",
# ... | 32.655172 | 61 | 0.564942 |
9195f3cdb36a82835721ebe4e4fc6cc7220eecc8 | 677 | py | Python | changes/buildsteps/lxc.py | bowlofstew/changes | ebd393520e0fdb07c240a8d4e8747281b6186e28 | [
"Apache-2.0"
] | null | null | null | changes/buildsteps/lxc.py | bowlofstew/changes | ebd393520e0fdb07c240a8d4e8747281b6186e28 | [
"Apache-2.0"
] | null | null | null | changes/buildsteps/lxc.py | bowlofstew/changes | ebd393520e0fdb07c240a8d4e8747281b6186e28 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from changes.buildsteps.default import DefaultBuildStep
| 27.08 | 75 | 0.680945 |
91979003f9cb74dc9f591b8277facbe005dfd825 | 532 | py | Python | swapidemo1.py | anvytran-dev/mycode | 3753c19828f0ecc506a6450bb6b71b4a5d651e5f | [
"MIT"
] | null | null | null | swapidemo1.py | anvytran-dev/mycode | 3753c19828f0ecc506a6450bb6b71b4a5d651e5f | [
"MIT"
] | null | null | null | swapidemo1.py | anvytran-dev/mycode | 3753c19828f0ecc506a6450bb6b71b4a5d651e5f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Star Wars API HTTP response parsing"""
# requests is used to send HTTP requests (get it?)
import requests
URL= "https://swapi.dev/api/people/1"
def main():
"""sending GET request, checking response"""
# SWAPI response is stored in "resp" object
resp= requests.get(URL)
# wh... | 22.166667 | 52 | 0.654135 |
9197f982af32fc988794515b093dd5bf984c98a5 | 4,132 | py | Python | src/biota_models/vegetation/model/constants_json_create.py | Deltares/NBSDynamics | 4710da529d85b588ea249f6e2b4f4cac132bb34f | [
"MIT"
] | 2 | 2022-01-14T05:02:04.000Z | 2022-03-02T10:42:59.000Z | src/biota_models/vegetation/model/constants_json_create.py | Deltares/NBSDynamics | 4710da529d85b588ea249f6e2b4f4cac132bb34f | [
"MIT"
] | 35 | 2021-11-01T08:59:02.000Z | 2021-11-19T16:47:17.000Z | src/biota_models/vegetation/model/constants_json_create.py | Deltares/NBSDynamics | 4710da529d85b588ea249f6e2b4f4cac132bb34f | [
"MIT"
] | 1 | 2022-03-16T07:11:00.000Z | 2022-03-16T07:11:00.000Z | import json
schema = {
"Spartina": {
"ColStart": "2000-04-01",
"ColEnd": "2000-05-31",
"random": 7,
"mud_colonization": [0.0, 0.0],
"fl_dr": 0.005,
"Maximum age": 20,
"Number LifeStages": 2,
"initial root length": 0.05,
"initial shoot length":... | 43.494737 | 76 | 0.547193 |
9198600a03831a59503bb3d3f2827b284d0e1c16 | 2,316 | bzl | Python | format/format.bzl | harshad-deo/TorchVI | f66d1486201368c9906869477ba7ae254d2e7191 | [
"Apache-2.0"
] | null | null | null | format/format.bzl | harshad-deo/TorchVI | f66d1486201368c9906869477ba7ae254d2e7191 | [
"Apache-2.0"
] | null | null | null | format/format.bzl | harshad-deo/TorchVI | f66d1486201368c9906869477ba7ae254d2e7191 | [
"Apache-2.0"
] | null | null | null |
format_py = rule(
implementation = _format_py_impl,
executable = True,
attrs = {
"srcs": attr.label_list(
allow_files = [".py"],
mandatory = True,
),
"_fmt": attr.label(
cfg = "host",
default = "//format:format_py",
executa... | 30.473684 | 88 | 0.577288 |
91993f87e0ff04f74f7a6f31b278e5b76bf7a8ba | 1,376 | py | Python | Stream-3/Full-Stack-Development/10.Custom-User-And-Email-Authentication/2.Custom-User-Model/auth_demo/accounts/models.py | GunnerJnr/_CodeInstitute | efba0984a3dc71558eef97724c85e274a712798c | [
"MIT"
] | 4 | 2017-10-10T14:00:40.000Z | 2021-01-27T14:08:26.000Z | Stream-3/Full-Stack-Development/10.Custom-User-And-Email-Authentication/2.Custom-User-Model/auth_demo/accounts/models.py | GunnerJnr/_CodeInstitute | efba0984a3dc71558eef97724c85e274a712798c | [
"MIT"
] | 115 | 2019-10-24T11:18:33.000Z | 2022-03-11T23:15:42.000Z | Stream-3/Full-Stack-Development/10.Custom-User-And-Email-Authentication/2.Custom-User-Model/auth_demo/accounts/models.py | GunnerJnr/_CodeInstitute | efba0984a3dc71558eef97724c85e274a712798c | [
"MIT"
] | 5 | 2017-09-22T21:42:39.000Z | 2020-02-07T02:18:11.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.auth.models import AbstractUser, UserManager
from django.db import models
from django.utils import timezone
# Create your models here.
# Create our new user class
| 32 | 95 | 0.641715 |
919b5dc79a4db8bc0c773739c3eacec33d693967 | 11,973 | py | Python | histoGAN.py | mahmoudnafifi/HistoGAN | 50be1482638ace3ec85d733e849dec494ede155b | [
"MIT"
] | 169 | 2020-11-25T07:42:26.000Z | 2022-03-30T03:08:35.000Z | histoGAN.py | mahmoudnafifi/HistoGAN | 50be1482638ace3ec85d733e849dec494ede155b | [
"MIT"
] | 22 | 2020-12-22T13:14:24.000Z | 2022-03-31T08:41:26.000Z | histoGAN.py | mahmoudnafifi/HistoGAN | 50be1482638ace3ec85d733e849dec494ede155b | [
"MIT"
] | 19 | 2020-11-28T17:28:46.000Z | 2022-02-23T06:09:23.000Z | """
If you find this code useful, please cite our paper:
Mahmoud Afifi, Marcus A. Brubaker, and Michael S. Brown. "HistoGAN:
Controlling Colors of GAN-Generated and Real Images via Color Histograms."
In CVPR, 2021.
@inproceedings{afifi2021histogan,
title={Histo{GAN}: Controlling Colors of {GAN}-Generated and R... | 39.127451 | 80 | 0.647791 |
919b5e557651de3e6e934fa6c4b16a3e517ceea9 | 501 | py | Python | apps/careeropportunity/migrations/0003_careeropportunity_deadline.py | Kpaubert/onlineweb4 | 9ac79f163bc3a816db57ffa8477ea88770d97807 | [
"MIT"
] | 32 | 2017-02-22T13:38:38.000Z | 2022-03-31T23:29:54.000Z | apps/careeropportunity/migrations/0003_careeropportunity_deadline.py | Kpaubert/onlineweb4 | 9ac79f163bc3a816db57ffa8477ea88770d97807 | [
"MIT"
] | 694 | 2017-02-15T23:09:52.000Z | 2022-03-31T23:16:07.000Z | apps/careeropportunity/migrations/0003_careeropportunity_deadline.py | Kpaubert/onlineweb4 | 9ac79f163bc3a816db57ffa8477ea88770d97807 | [
"MIT"
] | 35 | 2017-09-02T21:13:09.000Z | 2022-02-21T11:30:30.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.10 on 2016-10-05 18:52
from __future__ import unicode_literals
from django.db import migrations, models
| 26.368421 | 87 | 0.670659 |
919c72f34a550015e3cadb40b602759ce1ee194d | 14,482 | py | Python | benchmark/python/ffi/benchmark_ffi.py | grygielski/incubator-mxnet | 45952e21a35e32a04b7607b121085973369a42db | [
"BSL-1.0",
"Apache-2.0"
] | 211 | 2016-06-06T08:32:36.000Z | 2021-07-03T16:50:16.000Z | benchmark/python/ffi/benchmark_ffi.py | grygielski/incubator-mxnet | 45952e21a35e32a04b7607b121085973369a42db | [
"BSL-1.0",
"Apache-2.0"
] | 42 | 2017-01-05T02:45:13.000Z | 2020-08-11T23:45:27.000Z | benchmark/python/ffi/benchmark_ffi.py | grygielski/incubator-mxnet | 45952e21a35e32a04b7607b121085973369a42db | [
"BSL-1.0",
"Apache-2.0"
] | 58 | 2016-10-27T07:37:08.000Z | 2021-07-03T16: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"); you may not u... | 51.90681 | 116 | 0.646596 |
919e14a6393eda0c7e38c0fd3d5e470f7982030f | 11,038 | py | Python | first-floor.py | levabd/smart-climat-daemon | 8ff273eeb74fb03ea04fda11b0128fa13d35b500 | [
"MIT"
] | null | null | null | first-floor.py | levabd/smart-climat-daemon | 8ff273eeb74fb03ea04fda11b0128fa13d35b500 | [
"MIT"
] | 1 | 2021-06-02T03:55:13.000Z | 2021-06-02T03:55:13.000Z | first-floor.py | levabd/smart-climat-daemon | 8ff273eeb74fb03ea04fda11b0128fa13d35b500 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import json
import argparse
import re
import datetime
import paramiko
import requests
# cmd ['ssh', 'smart',
# 'mkdir -p /home/levabd/smart-home-temp-humidity-monitor;
# cat - > /home/levabd/smart-home-temp-humidity-monitor/lr.json']
from miio import chuangmi_plug
from btlewrap import availabl... | 37.80137 | 118 | 0.602102 |
919e36250164a66af6592305ae454fa0dbde1d43 | 642 | py | Python | reservior_classification.py | Optimist-Prime/QML-for-MNIST-classification | 7513b3faa548166dba3df927a248e8c7f1ab2a15 | [
"BSD-3-Clause"
] | 1 | 2020-02-04T12:51:47.000Z | 2020-02-04T12:51:47.000Z | reservior_classification.py | Optimist-Prime/QML-for-MNIST-classification | 7513b3faa548166dba3df927a248e8c7f1ab2a15 | [
"BSD-3-Clause"
] | null | null | null | reservior_classification.py | Optimist-Prime/QML-for-MNIST-classification | 7513b3faa548166dba3df927a248e8c7f1ab2a15 | [
"BSD-3-Clause"
] | null | null | null | import pickle
from sklearn.neural_network import MLPClassifier
train = pickle.load(open('train_pca_reservoir_output_200samples.pickle','rb'))
test = pickle.load(open('test_pca_reservoir_output_50samples.pickle','rb'))
train_num = 200
test_num = 50
mlp = MLPClassifier(hidden_layer_sizes=(2000,), max_iter=100, alpha=1... | 37.764706 | 78 | 0.700935 |
919f4e67778a5a961b0e58f4deb0ff4d5a7ee8e6 | 4,099 | py | Python | util.py | delmarrerikaine/LPG-PCA | deb631ee2c4c88190ce4204fcbc0765ae5cd8f53 | [
"MIT"
] | 1 | 2021-05-07T01:00:18.000Z | 2021-05-07T01:00:18.000Z | util.py | delmarrerikaine/LPG-PCA | deb631ee2c4c88190ce4204fcbc0765ae5cd8f53 | [
"MIT"
] | null | null | null | util.py | delmarrerikaine/LPG-PCA | deb631ee2c4c88190ce4204fcbc0765ae5cd8f53 | [
"MIT"
] | 2 | 2019-06-29T16:30:32.000Z | 2020-11-18T17:40:47.000Z | import numpy as np
import pandas as pd
from skimage import io
import skimage.measure as measure
import os
from lpg_pca_impl import denoise
| 36.598214 | 141 | 0.658941 |
91a0653094ec563d20865f6d3bbca729f2752582 | 3,178 | py | Python | ui/ui.py | kringen/wingnut | 73be4f8393720ff0932ab069543e5f2d2308296d | [
"MIT"
] | null | null | null | ui/ui.py | kringen/wingnut | 73be4f8393720ff0932ab069543e5f2d2308296d | [
"MIT"
] | null | null | null | ui/ui.py | kringen/wingnut | 73be4f8393720ff0932ab069543e5f2d2308296d | [
"MIT"
] | null | null | null | import redis
from rq import Queue, Connection
from flask import Flask, render_template, Blueprint, jsonify, request
import tasks
import rq_dashboard
from wingnut import Wingnut
app = Flask(
__name__,
template_folder="./templates",
static_folder="./static",
)
app.config.from_object(rq_dashb... | 29.425926 | 77 | 0.608559 |
91a50c39cf3d401ee6a7a290edb9d36a330b0540 | 42 | py | Python | pytaboola/__init__.py | Openmail/pytaboola | ed71b3b9c5fb2e4452d4b6d40aec1ff037dd5436 | [
"MIT"
] | null | null | null | pytaboola/__init__.py | Openmail/pytaboola | ed71b3b9c5fb2e4452d4b6d40aec1ff037dd5436 | [
"MIT"
] | 2 | 2020-04-27T23:41:57.000Z | 2020-07-30T20:48:59.000Z | pytaboola/__init__.py | Openmail/pytaboola | ed71b3b9c5fb2e4452d4b6d40aec1ff037dd5436 | [
"MIT"
] | null | null | null | from pytaboola.client import TaboolaClient | 42 | 42 | 0.904762 |
91a63511fb79b5745ac6428aee3eedeaa5046fe6 | 1,410 | py | Python | omkar/code.py | omi28/ga-learner-dst-repo | 396c35ea56028717a96aed6ca771e39ebf68dc5b | [
"MIT"
] | null | null | null | omkar/code.py | omi28/ga-learner-dst-repo | 396c35ea56028717a96aed6ca771e39ebf68dc5b | [
"MIT"
] | null | null | null | omkar/code.py | omi28/ga-learner-dst-repo | 396c35ea56028717a96aed6ca771e39ebf68dc5b | [
"MIT"
] | null | null | null | # --------------
# Importing header files
import numpy as np
import warnings
warnings.filterwarnings('ignore')
new_record=[[50, 9, 4, 1, 0, 0, 40, 0]]
#New record
#Reading file
data = np.genfromtxt(path, delimiter=",", skip_header=1)
data.shape
cenus=np.concatenate((new_record,data),axis=0)
cenus.... | 20.434783 | 57 | 0.719858 |
91a824d6a95f0e9a4a572ff289971a58109b3c3c | 3,887 | py | Python | test/present.py | jchampio/apache-websocket | 18ad4ae2fc99381b8d75785f492a479f789b322b | [
"Apache-2.0"
] | 8 | 2015-09-10T21:49:25.000Z | 2022-02-02T04:39:00.000Z | test/present.py | jchampio/apache-websocket | 18ad4ae2fc99381b8d75785f492a479f789b322b | [
"Apache-2.0"
] | 34 | 2015-09-10T21:40:09.000Z | 2020-09-04T22:16:08.000Z | test/present.py | jchampio/apache-websocket | 18ad4ae2fc99381b8d75785f492a479f789b322b | [
"Apache-2.0"
] | 5 | 2016-01-22T05:16:54.000Z | 2017-10-18T12:28:02.000Z | #! /usr/bin/env python
#
# Presents the results of an Autobahn TestSuite run in TAP format.
#
# Copyright 2015 Jacob Champion
#
# 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://ww... | 28.792593 | 84 | 0.623874 |
91a977f44ca6b26789c3c66246a46fa0280ee2a7 | 1,143 | py | Python | softwarecollections/scls/migrations/0004_other_repos_default_values.py | WEBZCC/softwarecollections | efee5c3c276033d526a0cdba504d43deff71581e | [
"BSD-3-Clause"
] | 39 | 2016-12-24T02:57:55.000Z | 2022-02-15T09:29:43.000Z | softwarecollections/scls/migrations/0004_other_repos_default_values.py | WEBZCC/softwarecollections | efee5c3c276033d526a0cdba504d43deff71581e | [
"BSD-3-Clause"
] | 32 | 2016-11-21T15:05:07.000Z | 2021-12-06T11:52:32.000Z | softwarecollections/scls/migrations/0004_other_repos_default_values.py | WEBZCC/softwarecollections | efee5c3c276033d526a0cdba504d43deff71581e | [
"BSD-3-Clause"
] | 13 | 2016-12-14T10:42:22.000Z | 2022-01-01T20:35:15.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
| 32.657143 | 185 | 0.582677 |
91aa65150dc0f4a17f1e9ed16821f5753cc86fa6 | 389 | py | Python | python/Excel/enumerateCells.py | davidgjy/arch-lib | b4402b96d2540995a848e6c5f600b2d99847ded6 | [
"Apache-2.0"
] | null | null | null | python/Excel/enumerateCells.py | davidgjy/arch-lib | b4402b96d2540995a848e6c5f600b2d99847ded6 | [
"Apache-2.0"
] | null | null | null | python/Excel/enumerateCells.py | davidgjy/arch-lib | b4402b96d2540995a848e6c5f600b2d99847ded6 | [
"Apache-2.0"
] | null | null | null | import openpyxl
wb = openpyxl.load_workbook('example.xlsx')
sheet = wb.get_sheet_by_name('Sheet1')
rows = sheet.get_highest_row()
cols = sheet.get_highest_column()
for i in range(1, rows + 1):
for j in range(1, cols + 1):
print('%s: %s' % (sheet.cell(row=i, column=j).coordinate, sheet.cell(row=i, column=j).... | 32.416667 | 96 | 0.59126 |
91ab6aa12f229c7b9ddab5414461949479dfe028 | 787 | py | Python | plugins/polio/migrations/0029_campaign_country.py | BLSQ/iaso-copy | 85fb17f408c15e8c2d730416d1312f58f8db39b7 | [
"MIT"
] | 29 | 2020-12-26T07:22:19.000Z | 2022-03-07T13:40:09.000Z | plugins/polio/migrations/0029_campaign_country.py | BLSQ/iaso-copy | 85fb17f408c15e8c2d730416d1312f58f8db39b7 | [
"MIT"
] | 150 | 2020-11-09T15:03:27.000Z | 2022-03-07T15:36:07.000Z | plugins/polio/migrations/0029_campaign_country.py | BLSQ/iaso | 95c8087c0182bdd576598eb8cd39c440e58e15d7 | [
"MIT"
] | 4 | 2020-11-09T10:38:13.000Z | 2021-10-04T09:42:47.000Z | # Generated by Django 3.1.13 on 2021-10-04 11:44
from django.db import migrations, models
import django.db.models.deletion
| 28.107143 | 90 | 0.590851 |
91ac9d140e7247cc524f64941c877611ed2cbd70 | 6,257 | py | Python | CurrencyExchange.py | aarana14/CurrencyExchange | e3f35c1481acf19683a74a41509b1dd37ae48594 | [
"MIT"
] | null | null | null | CurrencyExchange.py | aarana14/CurrencyExchange | e3f35c1481acf19683a74a41509b1dd37ae48594 | [
"MIT"
] | null | null | null | CurrencyExchange.py | aarana14/CurrencyExchange | e3f35c1481acf19683a74a41509b1dd37ae48594 | [
"MIT"
] | null | null | null | #import external libraries used in code
import requests, json
import pycountry
print('Currency Exchange')
currencies = []
if __name__ == "__main__":
findCurrency()
help()
currencyAmount, fromCurrency, toCurrency = userData()
rate = realTimeRate(fromCurrency, toCurrency)
complet... | 38.863354 | 189 | 0.61563 |
91ad7c273462430b62373174e1161a8ff1416f63 | 715 | py | Python | atcoder/corp/codethxfes2014a_e.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | 1 | 2018-11-12T15:18:55.000Z | 2018-11-12T15:18:55.000Z | atcoder/corp/codethxfes2014a_e.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | null | null | null | atcoder/corp/codethxfes2014a_e.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | null | null | null | r, c, m = map(int, input().split())
n = int(input())
op = [list(map(lambda x: int(x) - 1, input().split())) for _ in range(n)]
board = [[0 for _ in range(c)] for _ in range(r)]
for ra, rb, ca, cb in op:
for j in range(ra, rb + 1):
for k in range(ca, cb + 1):
board[j][k] += 1
cnt = 0
for i in ra... | 25.535714 | 73 | 0.439161 |
91ad8a5fd94219e90c24839542dbfefd0cc9fc70 | 6,142 | py | Python | scripts/analyse_bse.py | QU-XIAO/yambopy | ff65a4f90c1bfefe642ebc61e490efe781709ff9 | [
"BSD-3-Clause"
] | 21 | 2016-04-07T20:53:29.000Z | 2021-05-14T08:06:02.000Z | scripts/analyse_bse.py | alexmoratalla/yambopy | 8ec0e1e18868ccaadb3eab36c55e6a47021e257d | [
"BSD-3-Clause"
] | 22 | 2016-06-14T22:29:47.000Z | 2021-09-16T15:36:26.000Z | scripts/analyse_bse.py | alexmoratalla/yambopy | 8ec0e1e18868ccaadb3eab36c55e6a47021e257d | [
"BSD-3-Clause"
] | 15 | 2016-06-14T18:40:57.000Z | 2021-08-07T13:17:43.000Z | # Copyright (C) 2018 Alexandre Morlet, Henrique Pereira Coutada Miranda
# All rights reserved.
#
# This file is part of yambopy
#
from __future__ import print_function
from builtins import range
from yambopy import *
from qepy import *
import json
import matplotlib.pyplot as plt
import numpy as np
import sys
import arg... | 36.559524 | 122 | 0.632693 |
91ae1121ab522c5ec74869736cdca27ee08ca053 | 3,080 | py | Python | halmodule.py | richteer/pyfatafl | 1faddcf5d9eb36cbc6952b9a8e8bb899989f7112 | [
"MIT"
] | null | null | null | halmodule.py | richteer/pyfatafl | 1faddcf5d9eb36cbc6952b9a8e8bb899989f7112 | [
"MIT"
] | null | null | null | halmodule.py | richteer/pyfatafl | 1faddcf5d9eb36cbc6952b9a8e8bb899989f7112 | [
"MIT"
] | null | null | null | from module import XMPPModule
import halutils
import pyfatafl
# Commented to avoid loading before its ready
| 29.615385 | 147 | 0.656494 |
91aeb848169969b77dd6c9be3484be7a02c40a1b | 2,218 | py | Python | tools/acetz.py | arkhipenko/AceTime | bc6e6aa530e309b62a204b7574322ba013066b06 | [
"MIT"
] | 1 | 2021-02-23T06:17:36.000Z | 2021-02-23T06:17:36.000Z | tools/acetz.py | arkhipenko/AceTime | bc6e6aa530e309b62a204b7574322ba013066b06 | [
"MIT"
] | null | null | null | tools/acetz.py | arkhipenko/AceTime | bc6e6aa530e309b62a204b7574322ba013066b06 | [
"MIT"
] | null | null | null | from typing import cast, Optional
from datetime import datetime, tzinfo, timedelta
from zonedbpy import zone_infos
from zone_processor.zone_specifier import ZoneSpecifier
from zone_processor.inline_zone_info import ZoneInfo
__version__ = '1.1'
| 34.65625 | 73 | 0.628945 |
91b2c92f668693110e6ccdfb6fa82e177d314e5d | 8,510 | py | Python | z2/part2/interactive/jm/random_fuzzy_arrows_1/554539540.py | kozakusek/ipp-2020-testy | 09aa008fa53d159672cc7cbf969a6b237e15a7b8 | [
"MIT"
] | 1 | 2020-04-16T12:13:47.000Z | 2020-04-16T12:13:47.000Z | z2/part2/interactive/jm/random_fuzzy_arrows_1/554539540.py | kozakusek/ipp-2020-testy | 09aa008fa53d159672cc7cbf969a6b237e15a7b8 | [
"MIT"
] | 18 | 2020-03-06T17:50:15.000Z | 2020-05-19T14:58:30.000Z | z2/part2/interactive/jm/random_fuzzy_arrows_1/554539540.py | kozakusek/ipp-2020-testy | 09aa008fa53d159672cc7cbf969a6b237e15a7b8 | [
"MIT"
] | 18 | 2020-03-06T17:45:13.000Z | 2020-06-09T19:18:31.000Z | from part1 import (
gamma_board,
gamma_busy_fields,
gamma_delete,
gamma_free_fields,
gamma_golden_move,
gamma_golden_possible,
gamma_move,
gamma_new,
)
"""
scenario: test_random_actions
uuid: 554539540
"""
"""
random actions, total chaos
"""
board = gamma_new(6, 8, 3, 17)
assert board i... | 30.722022 | 46 | 0.653114 |
91b37c8672721c9195859e7e71caa5db1a857b4d | 25,928 | py | Python | examples/run_chemistry_parser.py | ZhuoyuWei/transformers | 16d0ebd55d17dd5095231566a0544ecebd56bc9c | [
"Apache-2.0"
] | null | null | null | examples/run_chemistry_parser.py | ZhuoyuWei/transformers | 16d0ebd55d17dd5095231566a0544ecebd56bc9c | [
"Apache-2.0"
] | null | null | null | examples/run_chemistry_parser.py | ZhuoyuWei/transformers | 16d0ebd55d17dd5095231566a0544ecebd56bc9c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2019 The HuggingFace Inc. team.
# Copyright (c) 2019 The HuggingFace Inc. 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.a... | 34.432935 | 127 | 0.612234 |
91b41dc55c2835ad843b049f4f5251bad3abf07e | 676 | py | Python | envergo/geodata/management/commands/import_shapefiles.py | MTES-MCT/envergo | 8bb6e4ffa15a39edda51b39401db6cc12e73ad0a | [
"MIT"
] | null | null | null | envergo/geodata/management/commands/import_shapefiles.py | MTES-MCT/envergo | 8bb6e4ffa15a39edda51b39401db6cc12e73ad0a | [
"MIT"
] | 6 | 2021-07-12T14:33:18.000Z | 2022-02-14T10:36:09.000Z | envergo/geodata/management/commands/import_shapefiles.py | MTES-MCT/envergo | 8bb6e4ffa15a39edda51b39401db6cc12e73ad0a | [
"MIT"
] | null | null | null | from django.contrib.gis.gdal import DataSource
from django.contrib.gis.utils import LayerMapping
from django.core.management.base import BaseCommand
from envergo.geodata.models import Zone
| 32.190476 | 60 | 0.695266 |
91b47f9da5c47dfa6628ace04164ad0d1bc8a057 | 1,710 | py | Python | vimfiles/bundle/ultisnips/test/test_AnonymousExpansion.py | duanqiaobb/vim-for-java | 01b60e4494e65a73c9a9de00f50259d8a7c8d0bb | [
"MIT"
] | null | null | null | vimfiles/bundle/ultisnips/test/test_AnonymousExpansion.py | duanqiaobb/vim-for-java | 01b60e4494e65a73c9a9de00f50259d8a7c8d0bb | [
"MIT"
] | null | null | null | vimfiles/bundle/ultisnips/test/test_AnonymousExpansion.py | duanqiaobb/vim-for-java | 01b60e4494e65a73c9a9de00f50259d8a7c8d0bb | [
"MIT"
] | null | null | null | from test.vim_test_case import VimTestCase as _VimTest
from test.constant import *
# Anonymous Expansion {{{#
# End: Anonymous Expansion #}}}
| 25.147059 | 77 | 0.615789 |
91b495763107bc2ceb225b3984a8b4ffae309299 | 2,914 | py | Python | data_converter/data_converter.py | jkchen2/JshBot-plugins | b5999fecf0df067e34673ff193dcfbf8c7e2fde2 | [
"MIT"
] | 1 | 2021-08-09T19:28:49.000Z | 2021-08-09T19:28:49.000Z | data_converter/data_converter.py | jkchen2/JshBot-plugins | b5999fecf0df067e34673ff193dcfbf8c7e2fde2 | [
"MIT"
] | null | null | null | data_converter/data_converter.py | jkchen2/JshBot-plugins | b5999fecf0df067e34673ff193dcfbf8c7e2fde2 | [
"MIT"
] | 2 | 2017-07-14T00:15:54.000Z | 2019-03-02T09:46:21.000Z | import discord
from jshbot import utilities, data, configurations, plugins, logger
from jshbot.exceptions import BotException, ConfiguredBotException
from jshbot.commands import (
Command, SubCommand, Shortcut, ArgTypes, Attachment, Arg, Opt, MessageTypes, Response)
__version__ = '0.1.0'
CBException = ConfiguredB... | 38.853333 | 96 | 0.576527 |
91b5d5a9da8d21cc54215371e88cbf75203f4ad6 | 374 | py | Python | tut2.py | ankit98040/TKINTER-JIS | 8b650138bf8ab2449da83e910ee33c0caee69a8d | [
"Apache-2.0"
] | null | null | null | tut2.py | ankit98040/TKINTER-JIS | 8b650138bf8ab2449da83e910ee33c0caee69a8d | [
"Apache-2.0"
] | null | null | null | tut2.py | ankit98040/TKINTER-JIS | 8b650138bf8ab2449da83e910ee33c0caee69a8d | [
"Apache-2.0"
] | null | null | null | from tkinter import *
from PIL import Image, ImageTk
#python image library
#imagetk supports jpg image
a1 = Tk()
a1.geometry("455x244")
#for png image
#photo = PhotoImage(file="filename.png")
#a2 = Label(image = photo)
#a2.pack()
image = Image.open("PJXlVd.jpg")
photo = ImageTk.PhotoImage(image)
... | 17 | 41 | 0.671123 |
91b62cc1816352d2c7a0ead7b1bf1eabb9a68df6 | 8,113 | py | Python | dataset.py | mintanwei/IPCLs-Net | 04937df683216a090c0749cc90ab7e517dbab0fd | [
"MIT"
] | null | null | null | dataset.py | mintanwei/IPCLs-Net | 04937df683216a090c0749cc90ab7e517dbab0fd | [
"MIT"
] | null | null | null | dataset.py | mintanwei/IPCLs-Net | 04937df683216a090c0749cc90ab7e517dbab0fd | [
"MIT"
] | null | null | null | import os
import torch
from PIL import Image
from read_csv import csv_to_label_and_bbx
import numpy as np
from torch.utils.data import Subset, random_split, ConcatDataset
def split_index(K=5, len=100):
idx = list(range(len))
final_list = []
for i in range(K):
final_list.append(idx[(i*len)//K:... | 32.322709 | 110 | 0.598053 |
91b7b2d421c1a0795b99655b4fa4a8c0503e4114 | 1,056 | py | Python | design_patterns/chapter5/mymath.py | FeliciaMJ/PythonLearningJourney | ae1bfac872ee29256e69df6e0e8e507321404cba | [
"Apache-2.0"
] | null | null | null | design_patterns/chapter5/mymath.py | FeliciaMJ/PythonLearningJourney | ae1bfac872ee29256e69df6e0e8e507321404cba | [
"Apache-2.0"
] | null | null | null | design_patterns/chapter5/mymath.py | FeliciaMJ/PythonLearningJourney | ae1bfac872ee29256e69df6e0e8e507321404cba | [
"Apache-2.0"
] | 2 | 2021-04-04T00:27:29.000Z | 2021-06-05T03:26:53.000Z | # coding: utf-8
import functools
if __name__ == '__main__':
from timeit import Timer
measure = [{'exec': 'fibonacci(100)', 'import': 'fibonacci',
'func': fibonacci}, {'exec': 'nsum(200)', 'import': 'nsum',
'func': nsum}]
for m in measure:
t =... | 25.142857 | 75 | 0.507576 |
91b7d7d61842cf27c4aaa82c80b40afa5304b3b0 | 27 | py | Python | transforms/__init__.py | yangyuke001/emotion-expression.shufflenetv2 | d70fd17871fb758eb4fc7d2f9df430cc7e44ad64 | [
"Apache-2.0"
] | 3 | 2019-11-29T01:29:58.000Z | 2020-09-16T12:48:49.000Z | transforms/__init__.py | yangyuke001/emotion-expression.shufflenetv2 | d70fd17871fb758eb4fc7d2f9df430cc7e44ad64 | [
"Apache-2.0"
] | null | null | null | transforms/__init__.py | yangyuke001/emotion-expression.shufflenetv2 | d70fd17871fb758eb4fc7d2f9df430cc7e44ad64 | [
"Apache-2.0"
] | null | null | null |
from .transforms import *
| 9 | 25 | 0.740741 |
91b880c2b2d9577a02c8519251133c3cee61564c | 14,894 | py | Python | codes/elastoplasticity_spectralAnalysis/planeStress/slowWavePlaneStressSigDriven.py | adRenaud/research | 2f0062a1800d7a17577bbfc2393b084253d567f4 | [
"MIT"
] | 1 | 2021-06-18T14:52:03.000Z | 2021-06-18T14:52:03.000Z | codes/elastoplasticity_spectralAnalysis/planeStress/slowWavePlaneStressSigDriven.py | adRenaud/research | 2f0062a1800d7a17577bbfc2393b084253d567f4 | [
"MIT"
] | 1 | 2019-01-07T13:11:11.000Z | 2019-01-07T13:11:11.000Z | codes/elastoplasticity_spectralAnalysis/planeStress/slowWavePlaneStressSigDriven.py | adRenaud/research | 2f0062a1800d7a17577bbfc2393b084253d567f4 | [
"MIT"
] | null | null | null | # !\usr\bin\python
import numpy as np
from mpl_toolkits import mplot3d
import matplotlib.pyplot as plt
import scipy.optimize
from matplotlib import animation
from scipy.integrate import ode
import pdb
# Material parameters
rho = 7800.
E = 2.e11
nu = 0.3
mu = 0.5*E/(1.+nu)
kappa = E/(3.*(1.-2.*nu))
lamb = kappa-2.*mu/3... | 37.422111 | 216 | 0.589701 |
91b88e3d926b20d74b8739d087b18e11fc2bf047 | 343 | py | Python | pyhsms/core/connectionstate.py | cherish-web/pyhsms | 83a88b8b45bf1aba30cb7572f44a02478009052b | [
"MIT"
] | 2 | 2021-05-01T12:02:12.000Z | 2021-05-03T14:37:27.000Z | pyhsms/core/connectionstate.py | cherish-web/pyhsms | 83a88b8b45bf1aba30cb7572f44a02478009052b | [
"MIT"
] | null | null | null | pyhsms/core/connectionstate.py | cherish-web/pyhsms | 83a88b8b45bf1aba30cb7572f44a02478009052b | [
"MIT"
] | null | null | null | # _*_ coding: utf-8 _*_
#@Time : 2020/7/29 09:49
#@Author : cherish_peng
#@Email : 1058386071@qq.com
#@File : connectionstate.py
#@Software : PyCharm
from enum import Enum | 21.4375 | 32 | 0.626822 |
91b96455218c552cfb88f8804f7f9440605930b5 | 84,787 | py | Python | lifelines/fitters/coxph_fitter.py | msanpe/lifelines | a73d441f6347332ca870bf2ec32eeeca410dc6de | [
"MIT"
] | null | null | null | lifelines/fitters/coxph_fitter.py | msanpe/lifelines | a73d441f6347332ca870bf2ec32eeeca410dc6de | [
"MIT"
] | null | null | null | lifelines/fitters/coxph_fitter.py | msanpe/lifelines | a73d441f6347332ca870bf2ec32eeeca410dc6de | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import time
from datetime import datetime
import warnings
from textwrap import dedent, fill
import numpy as np
import pandas as pd
from numpy.linalg import norm, inv
from scipy.linalg import solve as spsolve, LinAlgError
from scipy.integrate import trapz
from scipy import stats
from lifelines.... | 40.374762 | 354 | 0.585868 |
91ba64e37706ae1e4223523b060a3928b5d8e678 | 393 | py | Python | nlp_server/config/test/test_config.py | asevans48/NLPServer | 6feb1d89748165f9efea40d0777d355044c48176 | [
"Apache-2.0"
] | null | null | null | nlp_server/config/test/test_config.py | asevans48/NLPServer | 6feb1d89748165f9efea40d0777d355044c48176 | [
"Apache-2.0"
] | null | null | null | nlp_server/config/test/test_config.py | asevans48/NLPServer | 6feb1d89748165f9efea40d0777d355044c48176 | [
"Apache-2.0"
] | null | null | null | """
Test configuration loading
@author aevans
"""
import os
from nlp_server.config import load_config
def test_load_config():
"""
Test loading a configuration
"""
current_dir = os.path.curdir
test_path = os.path.sep.join([current_dir, 'data', 'test_config.json'])
cfg = load_config.load_conf... | 18.714286 | 75 | 0.699746 |
91bc729480a0e69ec82630c25580e01aa1aa5937 | 4,469 | py | Python | frappe/utils/safe_exec.py | ektai/frappe3 | 44aa948b4d5a0d729eacfb3dabdc9c8894ae1799 | [
"MIT"
] | null | null | null | frappe/utils/safe_exec.py | ektai/frappe3 | 44aa948b4d5a0d729eacfb3dabdc9c8894ae1799 | [
"MIT"
] | null | null | null | frappe/utils/safe_exec.py | ektai/frappe3 | 44aa948b4d5a0d729eacfb3dabdc9c8894ae1799 | [
"MIT"
] | null | null | null |
import os, json, inspect
import mimetypes
from html2text import html2text
from RestrictedPython import compile_restricted, safe_globals
import RestrictedPython.Guards
import frappe
import frappe.utils
import frappe.utils.data
from frappe.website.utils import (get_shade, get_toc, get_next_link)
from frappe.modules impo... | 29.401316 | 118 | 0.762587 |