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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cc0684ce66ad720babdcbadd25827e723e33601c | 5,390 | py | Python | tests/unit/data_loader/test_csv_loader.py | tilaboy/recruitment-agency-detector | 9a76d4a9284ef73194dfac80ba2ce12d6941220a | [
"MIT"
] | 1 | 2020-09-21T02:28:22.000Z | 2020-09-21T02:28:22.000Z | tests/unit/data_loader/test_csv_loader.py | tilaboy/recruitment-agency-detector | 9a76d4a9284ef73194dfac80ba2ce12d6941220a | [
"MIT"
] | 4 | 2020-11-17T07:29:10.000Z | 2022-02-10T00:40:07.000Z | tests/unit/data_loader/test_csv_loader.py | tilaboy/recruitment-agency-detector | 9a76d4a9284ef73194dfac80ba2ce12d6941220a | [
"MIT"
] | null | null | null | ', '', '"""unit tests for classifier utils functions"""
import os
import csv
from unittest import TestCase
import tempfile
import shutil
from tk_nn_classifier.data_loader.csv_loader import CSVLoader
class CSVLoaderTestCases(TestCase):
"""unit tests"""
def setUp(self):
self.csv_file = 'tests/resource/s... | 37.172414 | 105 | 0.58256 |
6f5c716aa5aafeee5f0c8a3c0d9fc4e5afe62e2d | 729 | py | Python | accounts/migrations/0001_initial.py | vikaschandak/CRM | 1b440d58049e6fed4e7e1ab8241869f37c751f0f | [
"MIT"
] | null | null | null | accounts/migrations/0001_initial.py | vikaschandak/CRM | 1b440d58049e6fed4e7e1ab8241869f37c751f0f | [
"MIT"
] | null | null | null | accounts/migrations/0001_initial.py | vikaschandak/CRM | 1b440d58049e6fed4e7e1ab8241869f37c751f0f | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-04-22 22:43
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Customer',
fields=[
('id', models.AutoField... | 29.16 | 114 | 0.584362 |
a927244f537faeb4f38305e8c7d235610418c3dc | 175,430 | py | Python | nova/tests/unit/virt/xenapi/test_xenapi.py | bopopescu/calico-nova | d01a4e54df558092702ffeae3cb4551bfb2d7707 | [
"Apache-2.0"
] | 7 | 2015-09-22T11:27:16.000Z | 2015-11-02T12:33:46.000Z | nova/tests/unit/virt/xenapi/test_xenapi.py | bopopescu/calico-nova | d01a4e54df558092702ffeae3cb4551bfb2d7707 | [
"Apache-2.0"
] | 2 | 2015-09-07T22:14:46.000Z | 2020-08-12T08:51:56.000Z | nova/tests/unit/virt/xenapi/test_xenapi.py | bopopescu/calico-nova | d01a4e54df558092702ffeae3cb4551bfb2d7707 | [
"Apache-2.0"
] | 4 | 2015-09-09T16:48:56.000Z | 2022-03-15T20:52:57.000Z | # Copyright (c) 2010 Citrix Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 42.466715 | 79 | 0.598752 |
fc6427a247714e20de7a75fdce8dcc7889dbfd29 | 415 | py | Python | backend/disabled_lift_28393/wsgi.py | crowdbotics-apps/disabled-lift-28393 | b7a7c3a9cc792a4718ba27c14af0aaa20b9cf43c | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/disabled_lift_28393/wsgi.py | crowdbotics-apps/disabled-lift-28393 | b7a7c3a9cc792a4718ba27c14af0aaa20b9cf43c | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/disabled_lift_28393/wsgi.py | crowdbotics-apps/disabled-lift-28393 | b7a7c3a9cc792a4718ba27c14af0aaa20b9cf43c | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
WSGI config for disabled_lift_28393 project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('... | 24.411765 | 79 | 0.79759 |
05e6e321464d1a8c46b48de52979b32226d44ec1 | 14,693 | py | Python | src/foot_sliding/BVH.py | omnia100/motion-inbetweening | e9e3eefea2512e726065c1808403e0314a18eb56 | [
"FTL"
] | 4 | 2022-01-05T15:14:34.000Z | 2022-01-18T19:09:20.000Z | src/foot_sliding/BVH.py | omnia100/motion-inbetweening | e9e3eefea2512e726065c1808403e0314a18eb56 | [
"FTL"
] | null | null | null | src/foot_sliding/BVH.py | omnia100/motion-inbetweening | e9e3eefea2512e726065c1808403e0314a18eb56 | [
"FTL"
] | 1 | 2022-01-04T14:40:33.000Z | 2022-01-04T14:40:33.000Z | import re
import numpy as np
import sys
sys.path.append("motion_utils")
from Animation import Animation
from Quaternions_old import Quaternions
channelmap = {
'Xrotation' : 'x',
'Yrotation' : 'y',
'Zrotation' : 'z'
}
channelmap_inv = {
'x': 'Xrotation',
'y': 'Yrotation',
'z': 'Zrotation',
... | 31.941304 | 114 | 0.489893 |
a4e6e74f625a15e918fd4d028762329478b013fe | 1,496 | py | Python | tests/conftest.py | clementprevot/home-assistant-idiamant | 2fc2703e4f2ec66a135a71d9a76121e2869a940f | [
"MIT"
] | 1 | 2022-02-27T14:52:56.000Z | 2022-02-27T14:52:56.000Z | tests/conftest.py | clementprevot/home-assistant-idiamant | 2fc2703e4f2ec66a135a71d9a76121e2869a940f | [
"MIT"
] | 18 | 2022-02-27T13:38:34.000Z | 2022-03-30T06:32:27.000Z | tests/conftest.py | clementprevot/home-assistant-idiamant | 2fc2703e4f2ec66a135a71d9a76121e2869a940f | [
"MIT"
] | null | null | null | """Global fixtures for iDiamant integration."""
from unittest.mock import patch
import pytest
pytest_plugins = "pytest_homeassistant_custom_component"
# This fixture is used to prevent HomeAssistant from attempting to create and dismiss persistent
# notifications. These calls would fail without this fixture since t... | 37.4 | 98 | 0.764037 |
a10ba046c9ca33a955661c3736bd779460c0f7c4 | 311 | py | Python | data/multilingual/Latn.DEU/Sun-ExtA_16/pdf_to_json_test_Latn.DEU_Sun-ExtA_16.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | 1 | 2021-09-19T19:47:35.000Z | 2021-09-19T19:47:35.000Z | data/multilingual/Latn.DEU/Sun-ExtA_16/pdf_to_json_test_Latn.DEU_Sun-ExtA_16.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | data/multilingual/Latn.DEU/Sun-ExtA_16/pdf_to_json_test_Latn.DEU_Sun-ExtA_16.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | import pdf_to_json as p2j
import json
url = "file:data/multilingual/Latn.DEU/Sun-ExtA_16/udhr_Latn.DEU_Sun-ExtA_16.pdf"
lConverter = p2j.pdf_to_json.pdf_to_json_converter()
lConverter.mImageHashOnly = True
lDict = lConverter.convert(url)
print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
| 31.1 | 81 | 0.810289 |
86c9ff141f7df977460fcbc4c71515b90085ff5e | 478 | py | Python | src/test/resources/test-blueprint/capability_python/Scripts/python/SamplePythonComponentNode.py | eliezio/blueprintsprocessor | 8e5d445d627fb36106468fed1d8d21988f59f976 | [
"Apache-2.0"
] | 1 | 2019-07-16T10:51:00.000Z | 2019-07-16T10:51:00.000Z | src/test/resources/test-blueprint/capability_python/Scripts/python/SamplePythonComponentNode.py | excelsior-esy/blueprintsprocessor | 8e5d445d627fb36106468fed1d8d21988f59f976 | [
"Apache-2.0"
] | null | null | null | src/test/resources/test-blueprint/capability_python/Scripts/python/SamplePythonComponentNode.py | excelsior-esy/blueprintsprocessor | 8e5d445d627fb36106468fed1d8d21988f59f976 | [
"Apache-2.0"
] | null | null | null | from org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor import JythonComponentFunction
from blueprint_constants import *
class SamplePythonComponentNode(JythonComponentFunction):
def process(self, execution_request):
print "Processing calling..." + PROPERTY_BLUEPRINT_BASE_PATH
retur... | 34.142857 | 100 | 0.776151 |
551c48f97dbbb420123ac123e96ab3ee1d9f6a14 | 4,000 | py | Python | app.py | Brent1999/FastMOT | 7b9ef1398e78ac49131e810f703ceb68e2222744 | [
"MIT"
] | null | null | null | app.py | Brent1999/FastMOT | 7b9ef1398e78ac49131e810f703ceb68e2222744 | [
"MIT"
] | null | null | null | app.py | Brent1999/FastMOT | 7b9ef1398e78ac49131e810f703ceb68e2222744 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from pathlib import Path
import argparse
import logging
import json
import cv2
import fastmot
from fastmot.utils import ConfigDecoder, Profiler
def main():
parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument('-i', '--input_uri', metavar=... | 40.40404 | 103 | 0.546 |
d358239db6e8bfcb7b971061e7203e96f8df5e4e | 584 | py | Python | controller/login/auth.py | johndao1005/SDV602-Milestone2-QuangThanhDao | 5818f11db599042ab0ba7379fb08cb27932f7cc1 | [
"MIT"
] | 1 | 2021-09-30T01:25:23.000Z | 2021-09-30T01:25:23.000Z | controller/login/auth.py | johndao1005/SDV602-Milestone2-QuangThanhDao | 5818f11db599042ab0ba7379fb08cb27932f7cc1 | [
"MIT"
] | 3 | 2021-08-31T09:36:06.000Z | 2021-09-03T08:22:36.000Z | controller/login/auth.py | johndao1005/SDV602-Milestone2-QuangThanhDao | 5818f11db599042ab0ba7379fb08cb27932f7cc1 | [
"MIT"
] | null | null | null | """
Process the given data from login view
"""
from tkinter.messagebox import showinfo, showerror
def authentication(parent, name, pw=""):
from view.dataView import dataView
"""Function to check the if username and password is correct then destroy the login window
and open the main menu to allow users ... | 32.444444 | 94 | 0.681507 |
905ac5dbea68f5adefcd058a9123b7e753a9f900 | 2,185 | py | Python | SpectralLibrary/parse_McNamara_Spectra.py | neherlab/PoissonNMF | ae302465c3b68816e40280554fb0f0263a7f4c9f | [
"MIT"
] | 10 | 2016-12-28T07:40:27.000Z | 2021-12-08T13:52:00.000Z | SpectralLibrary/parse_McNamara_Spectra.py | neherlab/PoissonNMF | ae302465c3b68816e40280554fb0f0263a7f4c9f | [
"MIT"
] | 1 | 2021-02-17T08:40:39.000Z | 2021-02-17T08:40:39.000Z | SpectralLibrary/parse_McNamara_Spectra.py | neherlab/PoissonNMF | ae302465c3b68816e40280554fb0f0263a7f4c9f | [
"MIT"
] | 2 | 2018-03-09T11:34:11.000Z | 2020-03-25T07:01:16.000Z | import csv
from collections import defaultdict
dyes = {}
name_count = defaultdict(int)
wavelength =[]
fname = 'McNamara_Spectra.csv'
with open(fname, 'r') as infile:
spectra_reader = csv.reader(infile)
row_count = 0
row = spectra_reader.next()
while row[0]!='dye name':
row=spectra_reader.next()... | 32.132353 | 73 | 0.546911 |
ecba38b8ff68602026f1f6d7d8f66002219c73ae | 4,520 | py | Python | chat/settings.py | maulana20/django-channels-chat | bd3b6349a69c2c133fae6c5e26ce5d26ce5839bd | [
"MIT"
] | null | null | null | chat/settings.py | maulana20/django-channels-chat | bd3b6349a69c2c133fae6c5e26ce5d26ce5839bd | [
"MIT"
] | null | null | null | chat/settings.py | maulana20/django-channels-chat | bd3b6349a69c2c133fae6c5e26ce5d26ce5839bd | [
"MIT"
] | null | null | null | """
Django settings for chat project.
Generated by 'django-admin startproject' using Django 2
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
import os
# Build p... | 24.042553 | 78 | 0.680088 |
bc26abb1aa3ad32220f5b71777fbb07145d78fe7 | 161 | py | Python | tests/model_control/detailed/transf_Fisher/model_control_one_enabled_Fisher_LinearTrend_Seasonal_DayOfMonth_ARX.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/model_control/detailed/transf_Fisher/model_control_one_enabled_Fisher_LinearTrend_Seasonal_DayOfMonth_ARX.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/model_control/detailed/transf_Fisher/model_control_one_enabled_Fisher_LinearTrend_Seasonal_DayOfMonth_ARX.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['Fisher'] , ['LinearTrend'] , ['Seasonal_DayOfMonth'] , ['ARX'] ); | 40.25 | 88 | 0.757764 |
4acb5bfcd2d992277b718617969877f7cb9f10b8 | 12,009 | py | Python | modules/lib/tools/lang_french.py | remibert/pycameresp | cdb2bddadfbd3627c653663ede4e37a63f48f788 | [
"MIT"
] | 28 | 2021-01-19T10:53:20.000Z | 2022-03-24T13:57:09.000Z | modules/lib/tools/lang_french.py | remibert/pycameresp | cdb2bddadfbd3627c653663ede4e37a63f48f788 | [
"MIT"
] | 5 | 2021-02-28T23:00:23.000Z | 2022-03-30T07:36:21.000Z | modules/lib/tools/lang_french.py | remibert/pycameresp | cdb2bddadfbd3627c653663ede4e37a63f48f788 | [
"MIT"
] | 9 | 2021-02-28T23:01:37.000Z | 2022-03-24T13:57:18.000Z | # Distributed under MIT License
# Copyright (c) 2021 Remi BERTHOLET
# POUR DES RAISONS DE PERFORMANCE DU SERVEUR WEB, SEUL LES CHAINES BINAIRES SONT SUPPORTEES : b"..."
menu_system =b" Syst\xC3\xA8me"
item_information =b" Information"
item_system ... | 68.622857 | 172 | 0.518778 |
9fb20e60767f07497c7a83ffb7af2d82cca53aa1 | 5,703 | py | Python | hwmapping/evaluation/generators/cloudgpu.py | phip123/workload-aware-k8s | 79e047916b7239467f299bd2ad605c6ac375cbca | [
"MIT"
] | 5 | 2021-03-08T10:27:27.000Z | 2022-03-24T14:37:17.000Z | hwmapping/evaluation/generators/cloudgpu.py | phip123/workload-aware-k8s | 79e047916b7239467f299bd2ad605c6ac375cbca | [
"MIT"
] | null | null | null | hwmapping/evaluation/generators/cloudgpu.py | phip123/workload-aware-k8s | 79e047916b7239467f299bd2ad605c6ac375cbca | [
"MIT"
] | null | null | null | from hwmapping.device import ArchProperties
from hwmapping.generator import GeneratorSettings
from hwmapping.model import *
cloudgpu_settings = GeneratorSettings(
arch={
Arch.X86: 0.8,
Arch.AARCH64: 0.1,
Arch.ARM32: 0.1
},
properties={
Arch.X86: ArchProperties(
... | 27.157143 | 49 | 0.345257 |
dd32812693f0a3f17deebd0e1d9b3417e24fae90 | 371 | py | Python | adv/yue.py | smashwidget/dl-1 | 352a65b9e40a623d7a9e5a693fa2b412f27d8cff | [
"Apache-2.0"
] | null | null | null | adv/yue.py | smashwidget/dl-1 | 352a65b9e40a623d7a9e5a693fa2b412f27d8cff | [
"Apache-2.0"
] | null | null | null | adv/yue.py | smashwidget/dl-1 | 352a65b9e40a623d7a9e5a693fa2b412f27d8cff | [
"Apache-2.0"
] | null | null | null | import adv.adv_test
import adv
from slot.a import *
from slot.d import *
def module():
return Yue
class Yue(adv.Adv):
#comment = 'Arctos'
conf = {}
conf['acl'] = """
`s3, not this.s3_buff_on
`s1
`s2,seq=4
`fs,seq=5
"""
if __name__ == '__main__':
conf = {}... | 14.84 | 48 | 0.539084 |
d6559636c359a22e1713c0e6ac9a11af2de87988 | 8,178 | py | Python | bin/Python27/Lib/site-packages/vitables/docbrowser/bookmarksdlg.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | bin/Python27/Lib/site-packages/vitables/docbrowser/bookmarksdlg.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | bin/Python27/Lib/site-packages/vitables/docbrowser/bookmarksdlg.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Copyright (C) 2005-2007 Carabos Coop. V. All rights reserved
# Copyright (C) 2008-2013 Vicent Mas. All rights reserved
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public ... | 36.026432 | 80 | 0.621056 |
25fcbf1f2d8f02957e996138b02909cc1f64e69d | 8,531 | py | Python | dae/dae/annotation/annotation_pipeline.py | iossifovlab/gpf | e556243d29666179dbcb72859845b4d6c011af2b | [
"MIT"
] | null | null | null | dae/dae/annotation/annotation_pipeline.py | iossifovlab/gpf | e556243d29666179dbcb72859845b4d6c011af2b | [
"MIT"
] | 82 | 2019-07-22T11:44:23.000Z | 2022-01-13T15:27:33.000Z | dae/dae/annotation/annotation_pipeline.py | iossifovlab/gpf | e556243d29666179dbcb72859845b4d6c011af2b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
import logging
import time
import datetime
import argparse
import subprocess
from typing import List
from box import Box
from dae.annotation.tools.annotator_base import (
AnnotatorBase,
CompositeVariantAnnotator,
)
from dae.configuration.gpf_config_parser import Fr... | 31.021818 | 79 | 0.585277 |
ee496034c34135ddfa70dc7ec2e27789ccc467c1 | 3,216 | py | Python | kmeans_torch.py | yashbhalgat/NeuralDiff | a480f2103384a4f5d77eb84abd977a200e6e6405 | [
"MIT"
] | 1 | 2022-02-22T13:54:41.000Z | 2022-02-22T13:54:41.000Z | kmeans_torch.py | yashbhalgat/NeuralDiff | a480f2103384a4f5d77eb84abd977a200e6e6405 | [
"MIT"
] | null | null | null | kmeans_torch.py | yashbhalgat/NeuralDiff | a480f2103384a4f5d77eb84abd977a200e6e6405 | [
"MIT"
] | null | null | null | import numpy as np
import time
import torch
import pdb
from pykeops.torch import LazyTensor
def KMeans(x, K=10, Niter=10, verbose=True):
"""Implements Lloyd's algorithm for the Euclidean metric."""
N, D = x.shape # Number of samples, dimension of the ambient space
if verbose:
print(
... | 34.580645 | 116 | 0.564366 |
37aedc7d7fbc79c62fad2154cb3b82f1fd72047c | 2,025 | py | Python | test/compare/plot_riou.py | cmpute/d3d | dbe43e5608653c5b743423541a80e388e13be771 | [
"MIT"
] | 27 | 2020-04-16T22:24:47.000Z | 2022-01-12T08:23:43.000Z | test/compare/plot_riou.py | cmpute/d3d | dbe43e5608653c5b743423541a80e388e13be771 | [
"MIT"
] | 2 | 2020-08-11T07:03:35.000Z | 2021-02-05T06:43:26.000Z | test/compare/plot_riou.py | cmpute/d3d | dbe43e5608653c5b743423541a80e388e13be771 | [
"MIT"
] | 6 | 2020-04-16T21:49:50.000Z | 2022-01-26T15:38:47.000Z | import numpy as np
from collections import defaultdict
from matplotlib import pyplot as plt
results = np.load("results.npz")
markers = {
"ours": "o",
"pcdet": "s",
"lilan": "p",
"official": "1",
"rrpn": "Py"
}
forward_mean = defaultdict(list)
forward_std = defaultdict(list)
backward_mean = default... | 28.928571 | 79 | 0.655802 |
ecc1ddc75068a0962b68519f7f72e591a427b9c5 | 347 | py | Python | src/omuse/__init__.py | ipelupessy/omuse | 83850925beb4b8ba6050c7fa8a1ef2371baf6fbb | [
"Apache-2.0"
] | 2 | 2020-11-14T11:24:28.000Z | 2021-04-07T18:15:08.000Z | src/omuse/__init__.py | ipelupessy/omuse | 83850925beb4b8ba6050c7fa8a1ef2371baf6fbb | [
"Apache-2.0"
] | null | null | null | src/omuse/__init__.py | ipelupessy/omuse | 83850925beb4b8ba6050c7fa8a1ef2371baf6fbb | [
"Apache-2.0"
] | 1 | 2022-02-15T09:25:40.000Z | 2022-02-15T09:25:40.000Z | from amuse.support.literature import TrackLiteratureReferences, LiteratureReferencesMixIn
class OMUSE(LiteratureReferencesMixIn):
"""
.. [#] OMUSE 1.0: a framework for multi-model oceanographic simulations, Pelupessy et al., Geoscientific Model Development, 10, 3167
"""
TrackLiteratureReferences.defau... | 38.555556 | 140 | 0.778098 |
21064c2287a05ec5abf623684d95b65b51f542db | 863 | py | Python | questions/api/serializers.py | alexyvassili/otuspy-hasker | 245f149ba555cb611e2d5d884ef07c9be5b4a073 | [
"MIT"
] | null | null | null | questions/api/serializers.py | alexyvassili/otuspy-hasker | 245f149ba555cb611e2d5d884ef07c9be5b4a073 | [
"MIT"
] | 6 | 2020-06-05T18:15:57.000Z | 2022-03-11T23:20:34.000Z | questions/api/serializers.py | alexyvassili/otuspy-hasker | 245f149ba555cb611e2d5d884ef07c9be5b4a073 | [
"MIT"
] | 1 | 2019-11-28T10:10:05.000Z | 2019-11-28T10:10:05.000Z | from rest_framework import serializers
from django.contrib.auth.models import User
from questions.models import Question, Answer, Tag
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ('id', 'username', 'first_name', 'last_name')
class TagSerializer(serializer... | 26.96875 | 80 | 0.677868 |
45bc6217033c9c403bb1c5c71ffe9b184f3ba865 | 1,241 | py | Python | _plotly_utils/tests/validators/test_dataarray_validator.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 1 | 2018-07-16T01:51:47.000Z | 2018-07-16T01:51:47.000Z | _plotly_utils/tests/validators/test_dataarray_validator.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | null | null | null | _plotly_utils/tests/validators/test_dataarray_validator.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 1 | 2019-02-18T04:12:56.000Z | 2019-02-18T04:12:56.000Z | import pytest
from _plotly_utils.basevalidators import DataArrayValidator
import numpy as np
import pandas as pd
# Fixtures
# --------
@pytest.fixture()
def validator():
return DataArrayValidator('prop', 'parent')
# Tests
# -----
# ### Acceptance ###
@pytest.mark.parametrize('val', [
[], [1], [''], (), ('Hel... | 28.860465 | 85 | 0.684126 |
aa00b4b802514aa031dc79a2733e85cc0c4108f6 | 4,315 | py | Python | python/tvm/hybrid/runtime.py | zhanghaohit/incubator-tvm | ee0af843f3c5a3429e888079afb5f30789bd9bee | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 48 | 2020-07-29T18:09:23.000Z | 2021-10-09T01:53:33.000Z | python/tvm/hybrid/runtime.py | zhanghaohit/incubator-tvm | ee0af843f3c5a3429e888079afb5f30789bd9bee | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 9 | 2021-04-02T02:28:07.000Z | 2022-03-26T18:23:59.000Z | python/tvm/hybrid/runtime.py | zhanghaohit/incubator-tvm | ee0af843f3c5a3429e888079afb5f30789bd9bee | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 42 | 2020-08-01T06:41:24.000Z | 2022-01-20T10:33:08.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... | 26.310976 | 86 | 0.594902 |
4a69446fd24c0b64ff90aa00cd4da11bbd02a9a1 | 1,465 | py | Python | pmdarima/setup.py | chivalry/pmdarima | 83aaa8249fc93b8bc2311431af53d2d10d312eea | [
"MIT"
] | null | null | null | pmdarima/setup.py | chivalry/pmdarima | 83aaa8249fc93b8bc2311431af53d2d10d312eea | [
"MIT"
] | null | null | null | pmdarima/setup.py | chivalry/pmdarima | 83aaa8249fc93b8bc2311431af53d2d10d312eea | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Author: Taylor Smith <taylor.smith@alkaline-ml.com>
#
# Setup for submodules of pmdarima
from __future__ import absolute_import
import os
from pmdarima._build_utils import maybe_cythonize_extensions
# DEFINE CONFIG
def configuration(parent_package='', top_path=None):
from numpy.dist... | 26.636364 | 66 | 0.72628 |
3e60b86a6fc438d6d5d15d31a73b0fb26332267b | 2,575 | py | Python | processors/ARM/gdb-8.3.1/gdb/python/python-config.py | bavison/opensmalltalk-vm | d494240736f7c0309e3e819784feb1d53ed0985a | [
"MIT"
] | 445 | 2016-06-30T08:19:11.000Z | 2022-03-28T06:09:49.000Z | processors/ARM/gdb-8.3.1/gdb/python/python-config.py | bavison/opensmalltalk-vm | d494240736f7c0309e3e819784feb1d53ed0985a | [
"MIT"
] | 439 | 2016-06-29T20:14:36.000Z | 2022-03-17T19:59:58.000Z | processors/ARM/gdb-8.3.1/gdb/python/python-config.py | bavison/opensmalltalk-vm | d494240736f7c0309e3e819784feb1d53ed0985a | [
"MIT"
] | 137 | 2016-07-02T17:32:07.000Z | 2022-03-20T11:17:25.000Z | # Program to fetch python compilation parameters.
# Copied from python-config of the 2.7 release.
import sys
import os
import getopt
from distutils import sysconfig
valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
'ldflags', 'help']
def exit_with_usage(code=1):
sys.stderr.write ... | 33.012821 | 84 | 0.596117 |
d866d6f1abeaa23cb3a047bdbb8f1a422185d467 | 2,057 | py | Python | rdr_service/alembic/versions/3677e238ca3d_.py | all-of-us/raw-data-repository | d28ad957557587b03ff9c63d55dd55e0508f91d8 | [
"BSD-3-Clause"
] | 39 | 2017-10-13T19:16:27.000Z | 2021-09-24T16:58:21.000Z | rdr_service/alembic/versions/3677e238ca3d_.py | all-of-us/raw-data-repository | d28ad957557587b03ff9c63d55dd55e0508f91d8 | [
"BSD-3-Clause"
] | 312 | 2017-09-08T15:42:13.000Z | 2022-03-23T18:21:40.000Z | rdr_service/alembic/versions/3677e238ca3d_.py | all-of-us/raw-data-repository | d28ad957557587b03ff9c63d55dd55e0508f91d8 | [
"BSD-3-Clause"
] | 19 | 2017-09-15T13:58:00.000Z | 2022-02-07T18:33:20.000Z | """
Revision ID: 3677e238ca3d
Revises: 072a5b87271a
Create Date: 2021-05-11 14:31:19.657587
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '3677e238ca3d'
down_revision = '072a5b87271a'
branch_labels = None
depends_on = None
def upgrade(engine_name):
globa... | 35.465517 | 117 | 0.732134 |
313efcdd769f949fb1a94f722a784e34f97d6d44 | 8,843 | py | Python | pyquirk.py | abhayhegde/pyquirk | 5232be83d8ed6efb6815128f6c906a99f5d7cecb | [
"MIT"
] | 9 | 2020-08-20T20:55:25.000Z | 2022-01-17T09:00:14.000Z | pyquirk.py | abhayhegde/pyquirk | 5232be83d8ed6efb6815128f6c906a99f5d7cecb | [
"MIT"
] | null | null | null | pyquirk.py | abhayhegde/pyquirk | 5232be83d8ed6efb6815128f6c906a99f5d7cecb | [
"MIT"
] | 2 | 2020-08-20T20:55:28.000Z | 2021-12-01T16:39:14.000Z | #!/usr/bin/env python3
"""
pyquirk.py: A simple python program to convert quantum circuits to TeX code.
Written by Abhay Hegde (2020).
https://github.com/abhayhegde/pyquirk
"""
import sys
import argparse
import json
from urllib.parse import unquote
NUM_ROWS = 0
def get_parser():
"""Returns the parser argument f... | 40.56422 | 391 | 0.570395 |
da58bc7c69505ed5a6e11186d75a94f694caf6b9 | 1,310 | py | Python | app.py | KanaadPathak/Heroku_K | 4a55dcb316af8bb4d171570102c2c14e00075101 | [
"MIT"
] | null | null | null | app.py | KanaadPathak/Heroku_K | 4a55dcb316af8bb4d171570102c2c14e00075101 | [
"MIT"
] | null | null | null | app.py | KanaadPathak/Heroku_K | 4a55dcb316af8bb4d171570102c2c14e00075101 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import urllib
import json
import os
from flask import Flask
from flask import request
from flask import make_response
# Flask app should start in global layout
app = Flask(__name__)
@app.route('/webhook', methods=['POST'])
def webhook():
req = request.get_json(silent=True, force=True)
... | 22.586207 | 95 | 0.619847 |
8218e6ec51ee6e3d63b46d7666f5234a48b4c027 | 11,306 | py | Python | src/spark/io/exec.py | jbalint/spark | caccf1cd9122dd4a7dc0f26a57ee4a649056aa6f | [
"CNRI-Jython"
] | 1 | 2015-05-21T20:00:12.000Z | 2015-05-21T20:00:12.000Z | src/spark/io/exec.py | jbalint/spark | caccf1cd9122dd4a7dc0f26a57ee4a649056aa6f | [
"CNRI-Jython"
] | null | null | null | src/spark/io/exec.py | jbalint/spark | caccf1cd9122dd4a7dc0f26a57ee4a649056aa6f | [
"CNRI-Jython"
] | null | null | null | from spark.internal.version import *
from com.sri.ai.spark.executor import Executor, XPSExecutor, ExecutionListener
#from spark.internal.parse.basicvalues import set_methods, Symbol, BACKQUOTE_SYMBOL, installConstructor, Value, Variable, value_str, Structure, List, isVariable, isSymbol, isList, isStructure, isString
... | 38.587031 | 202 | 0.637361 |
c28ea079c3469440d93e50248980c947ffa646e9 | 2,746 | py | Python | ml_component/server/models.py | Build-Week-SpotifySong4/DataScience | 6a7a19dea55d3a75d674cb66a0a32060ca453a5c | [
"MIT"
] | 1 | 2020-03-02T18:05:16.000Z | 2020-03-02T18:05:16.000Z | ml_component/server/models.py | Build-Week-SpotifySong4/DataScience | 6a7a19dea55d3a75d674cb66a0a32060ca453a5c | [
"MIT"
] | null | null | null | ml_component/server/models.py | Build-Week-SpotifySong4/DataScience | 6a7a19dea55d3a75d674cb66a0a32060ca453a5c | [
"MIT"
] | 1 | 2020-03-03T22:44:45.000Z | 2020-03-03T22:44:45.000Z | # ml_component/server/models.py
from ml_component.server import db
class Song(db.Model):
__tablename__ = "songs"
id = db.Column(db.Integer, primary_key=True)
artist_name = db.Column(db.String)
track_id = db.Column(db.String)
track_name = db.Column(db.String)
acousticness = db.Column(db.Float... | 34.325 | 202 | 0.569192 |
24c659f677c1ca8a7d7c7627bd95745241387a62 | 1,996 | py | Python | tests/experimental_tests/links_tests/model_tests/yolo_tests/test_yolo_v2_tiny.py | souravsingh/chainercv | 8f76510472bc95018c183e72f37bc6c34a89969c | [
"MIT"
] | 1,600 | 2017-06-01T15:37:52.000Z | 2022-03-09T08:39:09.000Z | tests/experimental_tests/links_tests/model_tests/yolo_tests/test_yolo_v2_tiny.py | souravsingh/chainercv | 8f76510472bc95018c183e72f37bc6c34a89969c | [
"MIT"
] | 547 | 2017-06-01T06:43:16.000Z | 2021-05-28T17:14:05.000Z | tests/experimental_tests/links_tests/model_tests/yolo_tests/test_yolo_v2_tiny.py | souravsingh/chainercv | 8f76510472bc95018c183e72f37bc6c34a89969c | [
"MIT"
] | 376 | 2017-06-02T01:29:10.000Z | 2022-03-13T11:19:59.000Z | import numpy as np
import unittest
import chainer
from chainer import testing
from chainer.testing import attr
from chainercv.experimental.links import YOLOv2Tiny
@testing.parameterize(*testing.product({
'n_fg_class': [1, 5, 20],
}))
class TestYOLOv2Tiny(unittest.TestCase):
def setUp(self):
self.li... | 26.613333 | 76 | 0.640782 |
00d3a92b19314c6124e24d17a038985b54b42147 | 2,320 | py | Python | eduexerciseitem/views_show.py | shagun30/djambala-2 | 06f14e3dd237d7ebf535c62172cfe238c3934f4d | [
"BSD-3-Clause"
] | null | null | null | eduexerciseitem/views_show.py | shagun30/djambala-2 | 06f14e3dd237d7ebf535c62172cfe238c3934f4d | [
"BSD-3-Clause"
] | null | null | null | eduexerciseitem/views_show.py | shagun30/djambala-2 | 06f14e3dd237d7ebf535c62172cfe238c3934f4d | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
/dms/eduexerciseitem/views_show.py
.. zeigt den Inhalt der Aufgabe in einem Lernarchiv an
Django content Management System
Hans Rauch
hans.rauch@gmx.net
Die Programme des dms-Systems koennen frei genutzt und den spezifischen
Beduerfnissen entsprechend angepasst werden.
0.01 14.... | 36.25 | 78 | 0.748707 |
5750e13f45eb65ac8fdf525c73c0d97a13365c75 | 10,973 | py | Python | src/robot/variables/search.py | Rudolf-AT/robotframework | 895eac5b48f8bbece60cd803ff416db7fbf90145 | [
"ECL-2.0",
"Apache-2.0"
] | 9 | 2020-04-22T08:30:52.000Z | 2020-12-07T08:25:09.000Z | src/robot/variables/search.py | laughterGod/robotframework | a2813e24ebcc8f4abc720c788632415b186c5e17 | [
"ECL-2.0",
"Apache-2.0"
] | 5 | 2021-03-19T11:01:43.000Z | 2022-02-10T12:02:58.000Z | src/robot/variables/search.py | laughterGod/robotframework | a2813e24ebcc8f4abc720c788632415b186c5e17 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework 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
... | 33.867284 | 78 | 0.609952 |
7b5eb4fd3846ed63879f1b5f7367d6fa1bdeed8c | 6,628 | py | Python | tools/testrunner/local/variants.py | Mohsenpoureiny/v8 | 5974242ae2141744091e5c6adcc95c8d9f6cee81 | [
"BSD-3-Clause"
] | 1 | 2022-03-06T11:10:13.000Z | 2022-03-06T11:10:13.000Z | tools/testrunner/local/variants.py | Mohsenpoureiny/v8 | 5974242ae2141744091e5c6adcc95c8d9f6cee81 | [
"BSD-3-Clause"
] | null | null | null | tools/testrunner/local/variants.py | Mohsenpoureiny/v8 | 5974242ae2141744091e5c6adcc95c8d9f6cee81 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Use this to run several variants of the tests.
ALL_VARIANT_FLAGS = {
"assert_types": [["--assert-types"]],
"code_serializer": [["--cache=code"]],
"... | 43.320261 | 79 | 0.669885 |
752213a87c99b6a78d1fd0234c8782a5b0e4e21d | 1,583 | py | Python | QT-RenderTimeCalculator/functions.py | BrianMarquez3/Python-Course | 2622b4ddfd687505becfd246e82a2ed0cb9b76f3 | [
"MIT"
] | 20 | 2020-08-19T23:27:01.000Z | 2022-02-03T12:02:17.000Z | QT-RenderTimeCalculator/functions.py | BrianMarquez3/Python-Course | 2622b4ddfd687505becfd246e82a2ed0cb9b76f3 | [
"MIT"
] | 1 | 2021-04-10T18:06:05.000Z | 2021-04-10T18:06:05.000Z | QT-RenderTimeCalculator/functions.py | BrianMarquez3/Python-Course | 2622b4ddfd687505becfd246e82a2ed0cb9b76f3 | [
"MIT"
] | 2 | 2020-12-03T19:35:36.000Z | 2021-11-10T14:58:39.000Z | from datetime import datetime, timedelta
import time
import os
os.system("cls")
print("\u001b[36m###########################################################")
print("## RENDER TIME CALCULATOR ##")
print("###########################################################")
print("\u001b[32mDigit... | 49.46875 | 278 | 0.615919 |
eca4f3eaa64241cc18e11b9ccfcbab92e33269b5 | 9,025 | py | Python | ckan/config/middleware/flask_app.py | UoA-eResearch/ckan | 536111fe96fb6e362a6f08f79144301c627a611c | [
"Apache-2.0"
] | null | null | null | ckan/config/middleware/flask_app.py | UoA-eResearch/ckan | 536111fe96fb6e362a6f08f79144301c627a611c | [
"Apache-2.0"
] | null | null | null | ckan/config/middleware/flask_app.py | UoA-eResearch/ckan | 536111fe96fb6e362a6f08f79144301c627a611c | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
import os
import importlib
import inspect
import itertools
import pkgutil
from flask import Flask, Blueprint
from flask.ctx import _AppCtxGlobals
from werkzeug.exceptions import HTTPException
from werkzeug.routing import Rule
from flask_debugtoolbar import DebugToolbarExtension
from paste.deploy.... | 31.778169 | 79 | 0.665817 |
6283d33cd82366c71d3ee5e4d3f1b100980952e1 | 1,675 | py | Python | src/eduid_userdb/signup/__init__.py | SUNET/eduid-userdb | 5970880caf0b0e2bdee6c23869ef287acc87af2a | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | src/eduid_userdb/signup/__init__.py | SUNET/eduid-userdb | 5970880caf0b0e2bdee6c23869ef287acc87af2a | [
"BSD-2-Clause-FreeBSD"
] | 12 | 2015-08-28T12:05:32.000Z | 2020-06-23T13:31:29.000Z | src/eduid_userdb/signup/__init__.py | SUNET/eduid-userdb | 5970880caf0b0e2bdee6c23869ef287acc87af2a | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2016-10-24T06:37:33.000Z | 2016-11-21T11:39:39.000Z | # -*- coding: utf-8 -*-
#
# Copyright (c) 2015, 2020 Sunet
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions of source code must retain the above copyright
# ... | 47.857143 | 110 | 0.774328 |
8e7be9c9ca164a2dd96356d1e8eb88fba5ad76d9 | 619 | py | Python | lucid_bot/cogs/moderation/purge.py | viargentum/lucid-bot | 3c7279221193e09455b93a642507c08c140d3600 | [
"MIT"
] | 3 | 2021-05-12T02:18:55.000Z | 2021-07-27T23:44:03.000Z | lucid_bot/cogs/moderation/purge.py | viargentum/lucid-bot | 3c7279221193e09455b93a642507c08c140d3600 | [
"MIT"
] | 2 | 2021-03-23T18:01:52.000Z | 2021-03-23T23:58:51.000Z | lucid_bot/cogs/moderation/purge.py | viargentum/lucid-bot | 3c7279221193e09455b93a642507c08c140d3600 | [
"MIT"
] | 2 | 2021-03-23T14:40:30.000Z | 2021-03-23T18:04:34.000Z | from discord.ext import commands
from lucid_bot.lucid_embed import lucid_embed
from lucid_bot.utils import Utils, LucidCommandResult
class Purge(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.utils = Utils
@commands.command(name="purge")
@commands.has_permissions(manage_mess... | 24.76 | 75 | 0.675283 |
179d01d2b4936b7897dfa16bf2617896d2c98b96 | 7,873 | py | Python | docs/conf.py | JayThibs/ds-code-review-example | 72e27e15b10532441fa3cee1718a0a00b7992334 | [
"MIT"
] | null | null | null | docs/conf.py | JayThibs/ds-code-review-example | 72e27e15b10532441fa3cee1718a0a00b7992334 | [
"MIT"
] | null | null | null | docs/conf.py | JayThibs/ds-code-review-example | 72e27e15b10532441fa3cee1718a0a00b7992334 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# ds-code-rev documentation build configuration file, created by
# sphinx-quickstart.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values ha... | 32.134694 | 124 | 0.706338 |
69afb6c6c2c12ad32bbc5a888495d7c6df24b218 | 1,568 | py | Python | src/sst/elements/ember/run/configurations/detailedStreamSim.py | zhangyjBU/sst-elements | d2c6725ea5fbb4dd493bf7d1a8c321aea4ff556c | [
"BSD-3-Clause"
] | 2 | 2021-12-24T03:24:33.000Z | 2022-01-11T23:03:39.000Z | src/sst/elements/ember/run/configurations/detailedStreamSim.py | zhangyjBU/sst-elements | d2c6725ea5fbb4dd493bf7d1a8c321aea4ff556c | [
"BSD-3-Clause"
] | null | null | null | src/sst/elements/ember/run/configurations/detailedStreamSim.py | zhangyjBU/sst-elements | d2c6725ea5fbb4dd493bf7d1a8c321aea4ff556c | [
"BSD-3-Clause"
] | 2 | 2021-05-23T02:28:02.000Z | 2021-09-08T13:38:46.000Z | #!/usr/bin/env python
#
# Copyright 2009-2018 NTESS. Under the terms
# of Contract DE-NA0003525 with NTESS, the U.S.
# Government retains certain rights in this software.
#
# Copyright (c) 2009-2018, NTESS
# All rights reserved.
#
# Portions are copyright of other developers:
# See the file CONTRIBUTORS.TXT in the top ... | 21.777778 | 69 | 0.757015 |
d0f7741b042e152c4379956d46fa06dc80acd9fe | 5,459 | py | Python | sites/twitter.py | touuki/colymer-acquirers | 67ed51b281dfca131e79a9d75e5403f8c8b25d8d | [
"MIT"
] | 11 | 2021-06-24T03:33:18.000Z | 2022-01-05T07:23:54.000Z | sites/twitter.py | touuki/colymer-acquirers | 67ed51b281dfca131e79a9d75e5403f8c8b25d8d | [
"MIT"
] | 2 | 2021-05-16T14:32:11.000Z | 2021-05-26T02:06:45.000Z | sites/twitter.py | touuki/colymer-acquirers | 67ed51b281dfca131e79a9d75e5403f8c8b25d8d | [
"MIT"
] | 2 | 2021-09-05T15:19:42.000Z | 2021-12-07T15:02:49.000Z | from .site import Site
import json
import http.cookiejar
import time
import re
class Twitter(Site):
def __init__(self, **kw):
super().__init__(**kw)
self._get_guest_token()
# queryIds可考虑从 https://abs.twimg.com/responsive-web/client-web/main.79e382f5.js 动态获取
self.queryIds = {
... | 37.648276 | 143 | 0.562008 |
d35fcd933e1865e9e3ed8602d583ff101f766ba5 | 3,032 | py | Python | falcon/cmd/inspect_app.py | bibekjoshi54/falcon | 6357a5959e71b59f261a581d168bfd8ab6952ca8 | [
"Apache-2.0"
] | 1 | 2020-04-18T12:58:51.000Z | 2020-04-18T12:58:51.000Z | falcon/cmd/inspect_app.py | bibekjoshi54/falcon | 6357a5959e71b59f261a581d168bfd8ab6952ca8 | [
"Apache-2.0"
] | 1 | 2021-07-24T15:39:29.000Z | 2021-07-24T15:39:29.000Z | falcon/cmd/inspect_app.py | bibekjoshi54/falcon | 6357a5959e71b59f261a581d168bfd8ab6952ca8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2013 by Rackspace Hosting, Inc.
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 29.436893 | 95 | 0.653034 |
5b7a2316122f6acb9746e5954abf8c2d11f11f3b | 5,844 | py | Python | utils/api/api.py | lizehongss/oj_backend | f7bd9f16b44f944e0bb370dcc7e0e82a1f2b5eb4 | [
"MIT"
] | 9 | 2018-11-19T15:02:56.000Z | 2020-03-19T03:15:35.000Z | utils/api/api.py | lizehongss/oj_backend | f7bd9f16b44f944e0bb370dcc7e0e82a1f2b5eb4 | [
"MIT"
] | 1 | 2021-06-10T23:57:05.000Z | 2021-06-10T23:57:05.000Z | utils/api/api.py | lizehongss/oj_backend | f7bd9f16b44f944e0bb370dcc7e0e82a1f2b5eb4 | [
"MIT"
] | 10 | 2018-11-17T02:12:39.000Z | 2021-02-07T16:51:16.000Z | import functools
import json
import logging
from collections import OrderedDict
from django.http import HttpResponse, QueryDict
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
logger = logging.getLogger("")
class APIErro... | 31.589189 | 86 | 0.613107 |
3af412d47b118027c785afb8f9e38a93dec43b7a | 13,754 | py | Python | diffprivlib/mechanisms/exponential.py | dgorelik/differential-privacy-library | 5a7a267c591320036615a52dfad1918dc3718e62 | [
"MIT"
] | null | null | null | diffprivlib/mechanisms/exponential.py | dgorelik/differential-privacy-library | 5a7a267c591320036615a52dfad1918dc3718e62 | [
"MIT"
] | null | null | null | diffprivlib/mechanisms/exponential.py | dgorelik/differential-privacy-library | 5a7a267c591320036615a52dfad1918dc3718e62 | [
"MIT"
] | 1 | 2022-02-23T13:56:19.000Z | 2022-02-23T13:56:19.000Z | # MIT License
#
# Copyright (C) IBM Corporation 2019
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge... | 37.375 | 120 | 0.632907 |
0551ecea00b7eef696fa93b82644170e0b119f19 | 3,850 | py | Python | pypipet/plugins/woocommerce/api.py | pypipet/pypipet | 8c489e4a7992281fbb68b12e2627decf24f2facb | [
"MIT"
] | null | null | null | pypipet/plugins/woocommerce/api.py | pypipet/pypipet | 8c489e4a7992281fbb68b12e2627decf24f2facb | [
"MIT"
] | null | null | null | pypipet/plugins/woocommerce/api.py | pypipet/pypipet | 8c489e4a7992281fbb68b12e2627decf24f2facb | [
"MIT"
] | 1 | 2021-12-10T22:36:34.000Z | 2021-12-10T22:36:34.000Z | # -*- coding: utf-8 -*-
"""
WooCommerce API Class
"""
__title__ = "woocommerce-api"
__version__ = "3.0.0"
__author__ = "Claudio Sanches @ Automattic"
__license__ = "MIT"
from requests import request
from json import dumps as jsonencode
from time import time
from pypipet.plugins.woocommerce.oauth import OAuth
from re... | 31.300813 | 96 | 0.585714 |
4901e66e76b5e0126c907704f56b70ea09779ba7 | 3,767 | py | Python | applications/FemToDemApplication/python_scripts/MainPFEM_for_coupling.py | lcirrott/Kratos | 8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea | [
"BSD-4-Clause"
] | 2 | 2019-10-25T09:28:10.000Z | 2019-11-21T12:51:46.000Z | applications/FemToDemApplication/python_scripts/MainPFEM_for_coupling.py | lcirrott/Kratos | 8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea | [
"BSD-4-Clause"
] | 13 | 2019-10-07T12:06:51.000Z | 2020-02-18T08:48:33.000Z | applications/FemToDemApplication/python_scripts/MainPFEM_for_coupling.py | lcirrott/Kratos | 8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea | [
"BSD-4-Clause"
] | null | null | null | from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7
import KratosMultiphysics
import time as timer
import KratosMultiphysics.PfemFluidDynamicsApplication.pfem_fluid_dynamics_analysis as PfemFluidDynamicsAnalysis
import os
from importli... | 58.859375 | 194 | 0.579241 |
a19a567881a2dc75b8496d54205772f48bb8922d | 27,387 | py | Python | python/ray/tests/test_autoscaler_yaml.py | mgelbart/ray | 4cec2286572e368a4bd64aae467751a384eff62d | [
"Apache-2.0"
] | 22 | 2018-05-08T05:52:34.000Z | 2020-04-01T10:09:55.000Z | python/ray/tests/test_autoscaler_yaml.py | mgelbart/ray | 4cec2286572e368a4bd64aae467751a384eff62d | [
"Apache-2.0"
] | 53 | 2021-10-06T20:08:04.000Z | 2022-03-21T20:17:25.000Z | python/ray/tests/test_autoscaler_yaml.py | mgelbart/ray | 4cec2286572e368a4bd64aae467751a384eff62d | [
"Apache-2.0"
] | 10 | 2018-04-27T10:50:59.000Z | 2020-02-24T02:41:43.000Z | import jsonschema
import logging
import os
import sys
import tempfile
import unittest
import urllib
import yaml
import copy
from unittest.mock import MagicMock, Mock, patch
import pytest
from click.exceptions import ClickException
from ray.autoscaler._private._azure.config import (
_configure_key_pair as _azure_co... | 39.068474 | 111 | 0.61646 |
95bb88024f55e64adab4a849281c96bfd9ce6f84 | 9,958 | py | Python | scripts/assert_code_coverage.py | isfaaghyth/buck | cad8f7ac2de2c9a4f08ce66180db677e44d61aee | [
"Apache-2.0"
] | 2 | 2019-09-22T05:33:37.000Z | 2019-09-22T06:36:24.000Z | scripts/assert_code_coverage.py | isfaaghyth/buck | cad8f7ac2de2c9a4f08ce66180db677e44d61aee | [
"Apache-2.0"
] | 1 | 2019-10-22T21:07:17.000Z | 2019-10-22T21:07:17.000Z | scripts/assert_code_coverage.py | isfaaghyth/buck | cad8f7ac2de2c9a4f08ce66180db677e44d61aee | [
"Apache-2.0"
] | 1 | 2019-10-22T20:43:48.000Z | 2019-10-22T20:43:48.000Z | #!/usr/bin/env python
# Copyright 2018-present Facebook, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 34.576389 | 99 | 0.649628 |
f31c6452359cc7b87e4a9bb40183329f56be4ecc | 373 | py | Python | native/libcst/tests/fixtures/tuple_shenanigans.py | jschavesr/LibCST | e5ab7b90b4c9cd1f46e5b875ad317411abf48298 | [
"Apache-2.0"
] | 880 | 2019-08-07T21:21:11.000Z | 2022-03-29T06:25:34.000Z | native/libcst/tests/fixtures/tuple_shenanigans.py | jschavesr/LibCST | e5ab7b90b4c9cd1f46e5b875ad317411abf48298 | [
"Apache-2.0"
] | 537 | 2019-08-08T18:34:30.000Z | 2022-03-30T16:46:14.000Z | native/libcst/tests/fixtures/tuple_shenanigans.py | jschavesr/LibCST | e5ab7b90b4c9cd1f46e5b875ad317411abf48298 | [
"Apache-2.0"
] | 108 | 2019-08-08T00:17:21.000Z | 2022-03-24T20:53:31.000Z | (1, 2)
(1, 2, 3)
# alright here we go.
()
( # evil >:)
# evil >:(
) # ...
(1,)
( * 1 , * 2 ,)
*_ = (l,)
() = x
( ) = ( x, )
(x) = (x)
( x , ) = x
( x , *y , * z , ) = l
( x , *y , * z , ) = ( x , *y , * z , ) = ( x , *y , * z , x )
(
x , # :)
bar, *
baz
,
) =\
(
(let, *s, ( ) ) ,
... | 13.321429 | 62 | 0.209115 |
e5f7990124b01ef350d63b4b9f0a1f0987e5b24d | 1,193 | py | Python | src/data_utils.py | iapalm/MLBPlayerPredictions | c6b90ce6e95fce4211f98f585d1853eeb6114d96 | [
"MIT"
] | null | null | null | src/data_utils.py | iapalm/MLBPlayerPredictions | c6b90ce6e95fce4211f98f585d1853eeb6114d96 | [
"MIT"
] | null | null | null | src/data_utils.py | iapalm/MLBPlayerPredictions | c6b90ce6e95fce4211f98f585d1853eeb6114d96 | [
"MIT"
] | null | null | null | import numpy as np
def load_data():
try:
data = np.load('../data/gen/batting.npy').item()
return data
except:
return read_data()
def read_data():
print("reading data")
data = dict()
db_file = open('../data/baseballdatabank-master/core/Batting.csv')
col_la... | 28.404762 | 85 | 0.501257 |
614f9783501058e7c660274160b3fa09f9e58e91 | 4,452 | py | Python | tests/unit/anchore_engine/subsys/auth/test_oauth.py | rbrady/anchore-engine | 5a5c492d76b5f911e60be422912fe8d42a74872b | [
"Apache-2.0"
] | 1,484 | 2017-09-11T19:08:42.000Z | 2022-03-29T07:47:44.000Z | tests/unit/anchore_engine/subsys/auth/test_oauth.py | rbrady/anchore-engine | 5a5c492d76b5f911e60be422912fe8d42a74872b | [
"Apache-2.0"
] | 913 | 2017-09-27T20:37:53.000Z | 2022-03-29T17:21:28.000Z | tests/unit/anchore_engine/subsys/auth/test_oauth.py | rbrady/anchore-engine | 5a5c492d76b5f911e60be422912fe8d42a74872b | [
"Apache-2.0"
] | 294 | 2017-09-12T16:54:03.000Z | 2022-03-14T01:28:51.000Z | import pytest
from anchore_engine.auth.oauth import (
JwtTokenManager,
TokenIssuer,
TokenVerifier,
load_keys,
token_manager,
)
from anchore_engine.configuration.localconfig import (
InvalidOauthConfigurationError,
OauthNotConfiguredError,
)
from anchore_engine.subsys import logger
from anch... | 25.734104 | 88 | 0.621518 |
f96fe9c05f57040bb6f1379a2b5844002103dcf9 | 418 | py | Python | tributary/streaming/__init__.py | vishalbelsare/tributary | ab1a75eea50e92cbff2aa1b3d4e576cb25bc20e3 | [
"Apache-2.0"
] | 357 | 2018-09-13T19:58:46.000Z | 2022-03-31T17:22:20.000Z | tributary/streaming/__init__.py | vishalbelsare/tributary | ab1a75eea50e92cbff2aa1b3d4e576cb25bc20e3 | [
"Apache-2.0"
] | 109 | 2018-09-13T18:37:00.000Z | 2022-03-27T00:59:49.000Z | tributary/streaming/__init__.py | vishalbelsare/tributary | ab1a75eea50e92cbff2aa1b3d4e576cb25bc20e3 | [
"Apache-2.0"
] | 36 | 2018-09-17T21:01:05.000Z | 2022-03-26T02:41:37.000Z | from ..base import StreamEnd, StreamNone, StreamRepeat
from .calculations import *
from .control import *
from .graph import StreamingGraph
from .input import *
from .node import Node as StreamingNode
from .output import *
from .scheduler import Scheduler
from .utils import *
def run(node, blocking=True, **kwargs):
... | 26.125 | 54 | 0.748804 |
476ed60645211cc5fdca81eb484e0c6a3fd6d056 | 9,544 | py | Python | testplan/testing/multitest/driver/fix/client.py | armarti/testplan | 5dcfe5840c0c99e9535cc223230f400fa62802f2 | [
"Apache-2.0"
] | null | null | null | testplan/testing/multitest/driver/fix/client.py | armarti/testplan | 5dcfe5840c0c99e9535cc223230f400fa62802f2 | [
"Apache-2.0"
] | 64 | 2019-04-15T20:56:40.000Z | 2021-03-23T01:00:30.000Z | testplan/testing/multitest/driver/fix/client.py | armarti/testplan | 5dcfe5840c0c99e9535cc223230f400fa62802f2 | [
"Apache-2.0"
] | null | null | null | """FixClient driver classes."""
import os
import errno
import socket
from schema import Use, Or
from testplan.common.config import ConfigOption
from testplan.common.utils.context import is_context, expand
from testplan.common.utils.strings import slugify
from testplan.common.utils.sockets.fix.client import Client
fr... | 33.254355 | 80 | 0.591157 |
5760761b49049a7c6dcb95a1ee07668c202f4169 | 17,230 | py | Python | train_hmm.py | ashwinijk/pyhtk | 6ddd053ff603cb1c5c0c91abe462e159ad56f88e | [
"MIT-CMU",
"Unlicense"
] | 1 | 2019-08-18T13:19:17.000Z | 2019-08-18T13:19:17.000Z | train_hmm.py | ashwinijk/pyhtk | 6ddd053ff603cb1c5c0c91abe462e159ad56f88e | [
"MIT-CMU",
"Unlicense"
] | null | null | null | train_hmm.py | ashwinijk/pyhtk | 6ddd053ff603cb1c5c0c91abe462e159ad56f88e | [
"MIT-CMU",
"Unlicense"
] | 1 | 2016-06-16T09:25:33.000Z | 2016-06-16T09:25:33.000Z | """
Functions for training HMMs: forward-backward, alignments, state-tying, and mixing up
"""
import os, sys
import util
HEREST_CMD = 'HERest'
#HEREST_CMD = '/u/arlo/bin/fast_htk/v0/HERest'
def run_iter(model, root_dir, prev_dir, mlf_file, model_list, mix_size, iter, extra):
"""
Run an iteration of Baum-Welc... | 32.632576 | 186 | 0.591526 |
f982802bb32accefed72f94ef85d45ac437ad3dd | 5,673 | py | Python | tests/util/compute_table_stats.py | suifengzhuliu/impala | 611f4c6f3b18cfcddff3b2956cbb87c295a87655 | [
"Apache-2.0"
] | 1,523 | 2015-01-01T03:42:24.000Z | 2022-02-06T22:24:04.000Z | tests/util/compute_table_stats.py | xwzbupt/impala | 97dda2b27da99367f4d07699aa046b16cda16dd4 | [
"Apache-2.0"
] | 10 | 2015-01-09T06:46:05.000Z | 2022-03-29T21:57:57.000Z | tests/util/compute_table_stats.py | xwzbupt/impala | 97dda2b27da99367f4d07699aa046b16cda16dd4 | [
"Apache-2.0"
] | 647 | 2015-01-02T04:01:40.000Z | 2022-03-30T15:57:35.000Z | #!/usr/bin/env impala-python
#
# 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 (... | 46.5 | 91 | 0.702979 |
4abaeb453114149a5c95e9a6140b63e8e00347f6 | 7,087 | py | Python | interfaces/rail/templateFitting.py | ixkael/PhotoZviaGP | 32967d597a6d8c799235d4f9ea75e7328ce0c7af | [
"MIT"
] | null | null | null | interfaces/rail/templateFitting.py | ixkael/PhotoZviaGP | 32967d597a6d8c799235d4f9ea75e7328ce0c7af | [
"MIT"
] | null | null | null | interfaces/rail/templateFitting.py | ixkael/PhotoZviaGP | 32967d597a6d8c799235d4f9ea75e7328ce0c7af | [
"MIT"
] | null | null | null | ########################################################################################
#
# script : templateFitting.py
#
# Does the template fitting not calling gaussian processes
#
# output files : redshiftpdfFileTemp and metricsFileTemp
#
#############################################################################... | 33.587678 | 184 | 0.640751 |
e746104dbeb9bb849abb895411329e453ab06060 | 5,575 | py | Python | contrib/metrics/superpixel_metrics/undersegmentation_error.py | HAL-42/AlchemyCat | ca924755ff48e2ff74543bb0e446376eb2b1f150 | [
"Apache-2.0"
] | 8 | 2020-01-08T19:42:01.000Z | 2021-12-28T08:30:56.000Z | contrib/metrics/superpixel_metrics/undersegmentation_error.py | HAL-42/AlchemyCat | ca924755ff48e2ff74543bb0e446376eb2b1f150 | [
"Apache-2.0"
] | 2 | 2020-09-10T12:22:57.000Z | 2022-02-17T05:21:22.000Z | contrib/metrics/superpixel_metrics/undersegmentation_error.py | HAL-42/AlchemyCat | ca924755ff48e2ff74543bb0e446376eb2b1f150 | [
"Apache-2.0"
] | 1 | 2021-05-12T01:50:27.000Z | 2021-05-12T01:50:27.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@Author : Xiaobo Yang
@Contact : hal_42@zju.edu.cn
@Time : 2021/4/27 15:13
@File : undersegmentation_error.py
@Software: PyCharm
@Desc :
"""
from typing import Optional
import numpy as np
from alchemy_cat.py_tools import Tracker, Statistic
__all__ = ["Unde... | 40.107914 | 119 | 0.630314 |
fafe6cdae4a3360cdd2b9d7c298d6bf3d5c55610 | 4,352 | py | Python | tests/test_s3.py | bgbg/shalosh | 9d5cc05d43d00e23b7993ab5ec240f320d994c7a | [
"MIT"
] | null | null | null | tests/test_s3.py | bgbg/shalosh | 9d5cc05d43d00e23b7993ab5ec240f320d994c7a | [
"MIT"
] | null | null | null | tests/test_s3.py | bgbg/shalosh | 9d5cc05d43d00e23b7993ab5ec240f320d994c7a | [
"MIT"
] | null | null | null | import json
import os
import random
import string
import uuid
from sshalosh import Serializer
import pytest
def get_s3_config():
this_dir = os.path.split(__file__)[0]
dir_secret = os.path.abspath(os.path.join(this_dir, '../secret'))
s3_config = json.load(
open(
os.path.join(dir_secre... | 28.25974 | 69 | 0.663373 |
1bf21ce53144da4bad28263659cf347be9707355 | 454 | py | Python | use_cases/X_Route_tests.py | czack425/openc2_schema_tests | 8bde9baa9894bf653017c93b97ac8341c3f73138 | [
"MIT"
] | null | null | null | use_cases/X_Route_tests.py | czack425/openc2_schema_tests | 8bde9baa9894bf653017c93b97ac8341c3f73138 | [
"MIT"
] | null | null | null | use_cases/X_Route_tests.py | czack425/openc2_schema_tests | 8bde9baa9894bf653017c93b97ac8341c3f73138 | [
"MIT"
] | null | null | null | """
OpenC2 DoD: Packet Routing Custom Profile Custom Profile Use Case Command/Response Pairs Template
"""
import unittest
from .test_setup import SetupTests, ValidationError
from .utils import check_profiles_skip
profile = "X_Route"
@unittest.skipIf(check_profiles_skip(profile), f"{profile} Profile tests not specif... | 25.222222 | 97 | 0.788546 |
b48818ad44072d67d0286982612b3c94bc4a9b0e | 21,780 | py | Python | utils/safe_set_utils.py | KTH-SML/multi-agent-LMPC | d81929c5c64c0a34a1999ff858afd20862f4f3b7 | [
"MIT"
] | 4 | 2021-07-02T10:25:02.000Z | 2022-01-09T12:06:36.000Z | utils/safe_set_utils.py | KTH-SML/multi-agent-LMPC | d81929c5c64c0a34a1999ff858afd20862f4f3b7 | [
"MIT"
] | null | null | null | utils/safe_set_utils.py | KTH-SML/multi-agent-LMPC | d81929c5c64c0a34a1999ff858afd20862f4f3b7 | [
"MIT"
] | 4 | 2021-03-31T15:43:42.000Z | 2022-01-09T12:19:24.000Z | from __future__ import division
import numpy as np
import numpy.linalg as la
import scipy as sp
import scipy.spatial
import cvxpy as cp
import matplotlib.pyplot as plt
from sklearn import svm
import pdb, itertools, matplotlib
import warnings
warnings.filterwarnings("ignore")
def get_safe_set(x_cls, agents, des_num_t... | 35.940594 | 155 | 0.656749 |
78ac0de8c5e587e65a19d661a4a73d792840ced0 | 1,746 | py | Python | irrexplorer/tests/test_clean_query.py | dashcare/irrexplorer | 70977f745769b9d0c761f4d1a92091ec2ae84984 | [
"BSD-2-Clause"
] | 17 | 2021-02-12T14:18:16.000Z | 2021-08-02T13:20:18.000Z | irrexplorer/tests/test_clean_query.py | dashcare/irrexplorer | 70977f745769b9d0c761f4d1a92091ec2ae84984 | [
"BSD-2-Clause"
] | 76 | 2021-02-12T13:08:25.000Z | 2021-08-19T15:17:14.000Z | irrexplorer/tests/test_clean_query.py | dashcare/irrexplorer | 70977f745769b9d0c761f4d1a92091ec2ae84984 | [
"BSD-2-Clause"
] | 2 | 2021-06-09T12:44:54.000Z | 2021-06-17T14:32:35.000Z | import pytest
pytestmark = pytest.mark.asyncio
async def test_clean_query_prefix(client):
response = await client.get("/api/clean_query/192.0.2/24")
assert response.status_code == 200
assert response.json() == {"cleanedValue": "192.0.2.0/24", "category": "prefix"}
async def test_clean_query_prefix_misa... | 34.92 | 84 | 0.712486 |
d751460e3c3c5a07ce816720c34bbcb96c99f086 | 401 | py | Python | examples/plugin_examples/plugin_templates/general/plugin_template3_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 39 | 2015-03-30T14:03:42.000Z | 2022-03-16T16:50:33.000Z | examples/plugin_examples/plugin_templates/general/plugin_template3_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 670 | 2015-02-11T11:08:09.000Z | 2022-03-21T09:27:57.000Z | examples/plugin_examples/plugin_templates/general/plugin_template3_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 54 | 2015-02-13T14:09:52.000Z | 2022-01-24T13:57:09.000Z | from savu.plugins.plugin_tools import PluginTools
class PluginTemplate3Tools(PluginTools):
"""
A plugin template that reduces the data dimensions, e.g. azimuthal
integration.
"""
def define_parameters(self):
"""
num_bins:
visibility: basic
dtype: int
... | 25.0625 | 70 | 0.605985 |
3eb5cc3328bea5ded0ea12f76b0eff6834c67b0a | 2,342 | py | Python | configs/Oct_10_2016_HuR_Mouse_rna.py | saketkc/ribo-seq-snakemake | 06b56d7fa1119c483a9f807c23f31fb9efa00440 | [
"BSD-3-Clause"
] | 2 | 2019-02-22T04:58:31.000Z | 2019-03-14T09:34:57.000Z | configs/Oct_10_2016_HuR_Mouse_rna.py | saketkc/ribo-seq-snakemake | 06b56d7fa1119c483a9f807c23f31fb9efa00440 | [
"BSD-3-Clause"
] | null | null | null | configs/Oct_10_2016_HuR_Mouse_rna.py | saketkc/ribo-seq-snakemake | 06b56d7fa1119c483a9f807c23f31fb9efa00440 | [
"BSD-3-Clause"
] | null | null | null |
## Absolute location where all raw files are
RAWDATA_DIR = '/home/cmb-06/as/skchoudh/dna/Oct_10_2016_HuR_Human_Mouse_Liver/rna-seq/Penalva_L_08182016/mouse'
## Output directory
OUT_DIR = '/home/cmb-06/as/skchoudh/dna/Oct_10_2016_HuR_Human_Mouse_Liver/RNA-Seq_mouse'
## Absolute location to 're-ribo/scripts' direct... | 34.441176 | 145 | 0.754483 |
f07588ee21f29bc2665499a00e98aaebe0048c96 | 156 | py | Python | createNew.py | ThomasPerkins1123/MachineLearningPython | 4c290267a67910ffead56ad66d4e573233d7198f | [
"Apache-2.0"
] | null | null | null | createNew.py | ThomasPerkins1123/MachineLearningPython | 4c290267a67910ffead56ad66d4e573233d7198f | [
"Apache-2.0"
] | null | null | null | createNew.py | ThomasPerkins1123/MachineLearningPython | 4c290267a67910ffead56ad66d4e573233d7198f | [
"Apache-2.0"
] | null | null | null | from MLP import MLP
import pickle
mlp = MLP(784, [300, 200, 100], 10)
output = open('Data/mlp.pkl', 'wb')
pickle.dump(mlp, output)
output.close()
a = 1
| 13 | 35 | 0.653846 |
94f7885e9fbfb4199c1d173184e19ea9f84499f0 | 540 | py | Python | src/compas/utilities/datetime_.py | yijiangh/compas | a9e86edf6b602f47ca051fccedcaa88a5e5d3600 | [
"MIT"
] | 1 | 2019-03-27T22:32:56.000Z | 2019-03-27T22:32:56.000Z | src/compas/utilities/datetime_.py | yijiangh/compas | a9e86edf6b602f47ca051fccedcaa88a5e5d3600 | [
"MIT"
] | null | null | null | src/compas/utilities/datetime_.py | yijiangh/compas | a9e86edf6b602f47ca051fccedcaa88a5e5d3600 | [
"MIT"
] | 1 | 2022-01-16T02:32:43.000Z | 2022-01-16T02:32:43.000Z | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import time
import datetime
__all__ = [
'timestamp',
'now'
]
def timestamp():
return datetime.datetime.fromtimestamp(time.time()).strftime('%Y%m%d%H%M%S')
def now():
return timestamp()
#... | 18 | 80 | 0.492593 |
25fa238865c3f10885615c071e25fe303afe6eb2 | 46,575 | py | Python | simpletransformers/classification/multi_modal_classification_model.py | BjarkePedersen/simpletransformers | 1a2fecdba5485c6d31c646ef83734389796c0f4b | [
"Apache-2.0"
] | null | null | null | simpletransformers/classification/multi_modal_classification_model.py | BjarkePedersen/simpletransformers | 1a2fecdba5485c6d31c646ef83734389796c0f4b | [
"Apache-2.0"
] | null | null | null | simpletransformers/classification/multi_modal_classification_model.py | BjarkePedersen/simpletransformers | 1a2fecdba5485c6d31c646ef83734389796c0f4b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
from __future__ import absolute_import, division, print_function
import json
import logging
import math
import os
import random
import warnings
from multiprocessing import cpu_count
import numpy as np
from scipy.stats import mode, pearsonr
from sklearn.metrics import (
conf... | 43.609551 | 194 | 0.569791 |
6b049ac693d44fcc30d720bda42089cc17d0e799 | 2,727 | py | Python | tests/conftest.py | dmenezesgabriel/workflower | db2358abdd2d133b85baea726e013e71171e5cf3 | [
"MIT"
] | null | null | null | tests/conftest.py | dmenezesgabriel/workflower | db2358abdd2d133b85baea726e013e71171e5cf3 | [
"MIT"
] | null | null | null | tests/conftest.py | dmenezesgabriel/workflower | db2358abdd2d133b85baea726e013e71171e5cf3 | [
"MIT"
] | null | null | null | from typing import Generator
import pytest
from sqlalchemy import create_engine
from sqlalchemy.engine.base import Engine
from sqlalchemy.orm import Session, clear_mappers, sessionmaker
from workflower.adapters.sqlalchemy.orm import run_mappers
from workflower.adapters.sqlalchemy.setup import metadata
from workflower.... | 23.713043 | 76 | 0.6663 |
bb6618b854ca0f9b62d621071f1e99059bb38391 | 9,008 | py | Python | qlib/contrib/model/pytorch_gru_ts.py | hadrianl/qlib | fa8f1cba06ba511744a0625afdf2cc3ac05302d0 | [
"MIT"
] | 1 | 2021-09-10T09:44:25.000Z | 2021-09-10T09:44:25.000Z | qlib/contrib/model/pytorch_gru_ts.py | hadrianl/qlib | fa8f1cba06ba511744a0625afdf2cc3ac05302d0 | [
"MIT"
] | null | null | null | qlib/contrib/model/pytorch_gru_ts.py | hadrianl/qlib | fa8f1cba06ba511744a0625afdf2cc3ac05302d0 | [
"MIT"
] | 1 | 2021-09-10T09:44:29.000Z | 2021-09-10T09:44:29.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
from __future__ import division
from __future__ import print_function
import os
import numpy as np
import pandas as pd
import copy
from sklearn.metrics import roc_auc_score, mean_squared_error
import logging
from ...utils import (
unpack_ar... | 29.827815 | 111 | 0.559947 |
683cc2fdf867e086932c08e7ce4853a66e0f869c | 21,471 | py | Python | python/paddle/fluid/tests/unittests/test_uniform_random_op.py | douch/Paddle | 81c40722869935d6e897f4b1aeb6e6f67606188a | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_uniform_random_op.py | douch/Paddle | 81c40722869935d6e897f4b1aeb6e6f67606188a | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_uniform_random_op.py | douch/Paddle | 81c40722869935d6e897f4b1aeb6e6f67606188a | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 PaddlePaddle 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 app... | 34.574879 | 90 | 0.586512 |
9f8b00661f4bf1d259908651f7d40161cfaa4fd2 | 4,166 | py | Python | tests/test_crossmap_decompose.py | tkonopka/crossmap | 237e4319a77281490c4e037918977230fea43d7e | [
"MIT"
] | 1 | 2021-08-12T11:40:10.000Z | 2021-08-12T11:40:10.000Z | tests/test_crossmap_decompose.py | tkonopka/crossmap | 237e4319a77281490c4e037918977230fea43d7e | [
"MIT"
] | null | null | null | tests/test_crossmap_decompose.py | tkonopka/crossmap | 237e4319a77281490c4e037918977230fea43d7e | [
"MIT"
] | null | null | null | """
Tests for decomposing documents into basis vectors
"""
import unittest
from os.path import join
from crossmap.crossmap import Crossmap
from crossmap.tools import read_yaml_documents
from .tools import remove_crossmap_cache
data_dir = join("tests", "testdata")
config_file= join(data_dir, "config-similars.yaml")
d... | 38.574074 | 79 | 0.667547 |
0a2fc47f4ce712b75c9fa58c5bd96554fd238962 | 641 | py | Python | libtools/ui/GUI_tkinter/base.py | HeadCrab654/Marutools | 427bea3730fb9da6e4a5cf81e244586f833df51a | [
"MIT"
] | null | null | null | libtools/ui/GUI_tkinter/base.py | HeadCrab654/Marutools | 427bea3730fb9da6e4a5cf81e244586f833df51a | [
"MIT"
] | null | null | null | libtools/ui/GUI_tkinter/base.py | HeadCrab654/Marutools | 427bea3730fb9da6e4a5cf81e244586f833df51a | [
"MIT"
] | null | null | null | from . import WidgetBase
class Label(WidgetBase):
def __init__(self, master, image=None, **options):
super().__init__(master=master)
from tkinter.ttk import Label
self.widget=Label(self.master, **options)
class Image(WidgetBase):
def __init__(self, master, image=None, **options):
... | 37.705882 | 80 | 0.658346 |
3023d451919f470b5b9e5cea3bcd1e7f1535a487 | 1,458 | py | Python | LeetCode/InterviewQuestions/Practice.py | shrey199325/LeetCodeSolution | fede0d98d2aeeedc3cd501ac5042f2217494f4c6 | [
"Unlicense"
] | null | null | null | LeetCode/InterviewQuestions/Practice.py | shrey199325/LeetCodeSolution | fede0d98d2aeeedc3cd501ac5042f2217494f4c6 | [
"Unlicense"
] | null | null | null | LeetCode/InterviewQuestions/Practice.py | shrey199325/LeetCodeSolution | fede0d98d2aeeedc3cd501ac5042f2217494f4c6 | [
"Unlicense"
] | 1 | 2020-09-18T09:38:26.000Z | 2020-09-18T09:38:26.000Z | '''
# Sample code to perform I/O:
name = input() # Reading input from STDIN
print('Hi, %s.') % name # Writing output to STDOUT
# Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail
'''
# Write your code here
T = int(input())
temp = input().split(" ")
N = [int(x)... | 23.901639 | 145 | 0.613169 |
98bce14e1d9bc58e8c436cfbf0c1d92bef133b9a | 10,930 | py | Python | docs/source/conf.py | kabdilleh1/readthedocs | 1f3a070860be552b76002ead610b8f397eeba0e3 | [
"Apache-2.0"
] | null | null | null | docs/source/conf.py | kabdilleh1/readthedocs | 1f3a070860be552b76002ead610b8f397eeba0e3 | [
"Apache-2.0"
] | null | null | null | docs/source/conf.py | kabdilleh1/readthedocs | 1f3a070860be552b76002ead610b8f397eeba0e3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# ISB Cancer Genomics Cloud documentation build configuration file, created by
# sphinx-quickstart on Mon Dec 21 07:12:04 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogen... | 33.323171 | 147 | 0.708875 |
8cf4a4a9c6c951a2fc7c24609faf93e54732047a | 46,852 | py | Python | sktime/classifiers/distance_based/proximity_forest.py | ashishpatel26/sktime | 24a79695f63bec1f6abf9f517d4e6dc792c306e7 | [
"BSD-3-Clause"
] | 1 | 2020-07-16T08:36:50.000Z | 2020-07-16T08:36:50.000Z | sktime/classifiers/distance_based/proximity_forest.py | ClaudiaSanches/sktime | 63e7839e80ca6d5fe5fc4f33389ec3bcacd8aa59 | [
"BSD-3-Clause"
] | null | null | null | sktime/classifiers/distance_based/proximity_forest.py | ClaudiaSanches/sktime | 63e7839e80ca6d5fe5fc4f33389ec3bcacd8aa59 | [
"BSD-3-Clause"
] | 1 | 2020-10-08T20:55:55.000Z | 2020-10-08T20:55:55.000Z | """Proximity Forest time series classifier
a decision tree forest which uses distance measures to partition data.
B. Lucas and A. Shifaz, C. Pelletier, L. O’Neill, N. Zaidi, B. Goethals, F. Petitjean and G. Webb
Proximity Forest: an effective and scalable distance-based classifier for time series,
Data Mining and Knowl... | 40.010248 | 124 | 0.636067 |
7d2cfa7058d0d227621e04f653e12de837eb4380 | 3,381 | py | Python | mocks/ginkgo/student/migrations/0001_initial.py | groovetch/edx-figures | a69fc1195c05176ac7dae90b337dd77f4bd9679f | [
"MIT"
] | 43 | 2018-05-29T20:01:25.000Z | 2021-12-02T09:43:17.000Z | mocks/ginkgo/student/migrations/0001_initial.py | groovetch/edx-figures | a69fc1195c05176ac7dae90b337dd77f4bd9679f | [
"MIT"
] | 330 | 2018-05-30T17:06:15.000Z | 2022-03-16T15:52:22.000Z | mocks/ginkgo/student/migrations/0001_initial.py | groovetch/edx-figures | a69fc1195c05176ac7dae90b337dd77f4bd9679f | [
"MIT"
] | 40 | 2018-10-06T00:15:58.000Z | 2022-02-14T12:44:45.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import migrations, models
import django_countries.fields
from django.conf import settings
import openedx.core.djangoapps.xmodule_django.models
class Migration(migrations.Migration):
dependencies... | 52.828125 | 442 | 0.61609 |
f91d6b2442f68a70e0ae1307ff3773a4e980818f | 26,377 | py | Python | metrix_ml/randomforest_randomsearch_scaled.py | mevol/metrix_ml | ae0d4f7ceedd484c8a372a0e520812c8742afe38 | [
"BSD-3-Clause"
] | 1 | 2018-08-21T08:03:20.000Z | 2018-08-21T08:03:20.000Z | metrix_ml/randomforest_randomsearch_scaled.py | mevol/metrix_ml | ae0d4f7ceedd484c8a372a0e520812c8742afe38 | [
"BSD-3-Clause"
] | 2 | 2018-07-17T09:17:46.000Z | 2018-07-20T09:02:27.000Z | metrix_ml/randomforest_randomsearch_scaled.py | mevol/metrix_ml | ae0d4f7ceedd484c8a372a0e520812c8742afe38 | [
"BSD-3-Clause"
] | 1 | 2019-05-13T15:13:01.000Z | 2019-05-13T15:13:01.000Z | ###############################################################################
#
# imports and set up environment
#
###############################################################################
'''Defining the environment for this class'''
import argparse
import pandas as pd
import os
import numpy as np
import jobl... | 45.634948 | 122 | 0.584032 |
05b612de28fcd08ab4e35e39e7e8848d03c4b6e9 | 486 | pyw | Python | file.pyw | catko6583/Niko-XP | 7c06bee5b93d720050b7df45840db9483943a5f1 | [
"MIT"
] | null | null | null | file.pyw | catko6583/Niko-XP | 7c06bee5b93d720050b7df45840db9483943a5f1 | [
"MIT"
] | null | null | null | file.pyw | catko6583/Niko-XP | 7c06bee5b93d720050b7df45840db9483943a5f1 | [
"MIT"
] | null | null | null | from tkinter import *
from tkinter import filedialog
import os
def openFile():
filepath = filedialog.askopenfilename(initialdir="/",
title="Open files",
filetypes= (("text files","*.txt"),
... | 28.588235 | 77 | 0.518519 |
5053059ce64b376ee83d7e7d48bf1f506e94a527 | 1,743 | py | Python | c2cwsgiutils/redis_utils.py | arnaud-morvan/c2cwsgiutils | aa06b77b247bd8969b88225ee3ea109886aefeac | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | c2cwsgiutils/redis_utils.py | arnaud-morvan/c2cwsgiutils | aa06b77b247bd8969b88225ee3ea109886aefeac | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | c2cwsgiutils/redis_utils.py | arnaud-morvan/c2cwsgiutils | aa06b77b247bd8969b88225ee3ea109886aefeac | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | import logging
import threading
import time
from typing import Optional # noqa # pylint: disable=unused-import
import redis.client # noqa # pylint: disable=unused-import
import redis.exceptions
LOG = logging.getLogger(__name__)
class PubSubWorkerThread(threading.Thread):
"""
A clone of redis.client.PubS... | 34.176471 | 96 | 0.620769 |
c548c530afdc4e3d2859ad0c7fcd997ddf2e643f | 294 | py | Python | exercises/de/solution_02_02_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/de/solution_02_02_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/de/solution_02_02_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
nlp = spacy.blank("de")
doc = nlp("Ich habe eine Katze")
# Schlage den Hash für das Wort "Katze" nach
katze_hash = nlp.vocab.strings["Katze"]
print(katze_hash)
# Schlage katze_hash nach, um den String zu erhalten
katze_string = nlp.vocab.strings[katze_hash]
print(katze_string)
| 22.615385 | 52 | 0.755102 |
183770781dd74e778600e14b3e9413027a411f19 | 12,731 | py | Python | Driving_Python/main.py | Valkje/usermodels2122 | d244a9b570ac551ea62490009847ea120b4f313e | [
"MIT"
] | null | null | null | Driving_Python/main.py | Valkje/usermodels2122 | d244a9b570ac551ea62490009847ea120b4f313e | [
"MIT"
] | 2 | 2021-11-02T12:37:45.000Z | 2021-11-02T12:39:22.000Z | Driving_Python/main.py | Valkje/usermodels2122 | d244a9b570ac551ea62490009847ea120b4f313e | [
"MIT"
] | null | null | null | # Contains all actions that the Python component can execute on behalf of the Java component.
# author: Gilles Lijnzaad
"""
Originally, Gilles split the code below across 3 files: client, server, inputhandler.
We did notice that this would lead to some ghost threads being spawned due to
recursive imports. Thus, to limi... | 29.745327 | 119 | 0.735449 |
0392e7fe6e4c7b3675f33022469aab005d840194 | 72,939 | py | Python | dygraph/ppdet/data/transform/operator.py | syyxsxx/PaddleDetection | da0e1eed6472d492abc9db1db324569f9be62a5f | [
"Apache-2.0"
] | 2 | 2021-09-07T08:59:53.000Z | 2022-03-17T03:00:40.000Z | dygraph/ppdet/data/transform/operator.py | syyxsxx/PaddleDetection | da0e1eed6472d492abc9db1db324569f9be62a5f | [
"Apache-2.0"
] | null | null | null | dygraph/ppdet/data/transform/operator.py | syyxsxx/PaddleDetection | da0e1eed6472d492abc9db1db324569f9be62a5f | [
"Apache-2.0"
] | 1 | 2021-08-13T12:29:19.000Z | 2021-08-13T12:29:19.000Z | # Copyright (c) 2020 PaddlePaddle 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 appli... | 38.048513 | 131 | 0.539177 |
afa0e57d0fb4bc48a3e4d6c31a2ee74cea530f80 | 4,314 | py | Python | datasets/criteo/criteo_dataset.py | ayush268/RecoEdge | b6554c646bae602704f44ae80571a4c319f90fd2 | [
"Apache-2.0"
] | 68 | 2021-06-20T07:54:48.000Z | 2022-02-19T16:11:01.000Z | datasets/criteo/criteo_dataset.py | ayush268/RecoEdge | b6554c646bae602704f44ae80571a4c319f90fd2 | [
"Apache-2.0"
] | 100 | 2021-06-24T13:33:24.000Z | 2022-02-23T10:30:27.000Z | datasets/criteo/criteo_dataset.py | ayush268/RecoEdge | b6554c646bae602704f44ae80571a4c319f90fd2 | [
"Apache-2.0"
] | 38 | 2021-07-13T12:16:24.000Z | 2022-02-26T05:08:28.000Z | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import numpy as np
# pytorch
import torch
from torch.utils.data import Dataset
class CriteoDataset(Dataset):
def __init__(
self,
X_int, X_cat, y,
max_ind_range):
... | 29.346939 | 78 | 0.631201 |
f387663fa4c7ac9ec4cc9794f996d89b2d97ba77 | 1,727 | py | Python | app.py | Jaimecobos/DRBox_keras | 8e5484f71f0110aa8f129190cb2b7a03ad2eb82e | [
"Apache-2.0"
] | null | null | null | app.py | Jaimecobos/DRBox_keras | 8e5484f71f0110aa8f129190cb2b7a03ad2eb82e | [
"Apache-2.0"
] | null | null | null | app.py | Jaimecobos/DRBox_keras | 8e5484f71f0110aa8f129190cb2b7a03ad2eb82e | [
"Apache-2.0"
] | null | null | null | # Importing required libraries, obviously
import streamlit as st
import cv2
from PIL import Image
import numpy as np
import os
def about():
st.write(
'''
** This assignment focused on classifying and localizing of bread with the use of Machine learning.
DRBox is used for detection of tasks when objects are ori... | 29.271186 | 231 | 0.675738 |
effabe019db23c5709a486f2fd83be6f0fab0146 | 7,111 | py | Python | tests/unit/cfngin/hooks/test_keypair.py | troyready/runway | 4fd299961a4b73df39e14f4f19a7236f7be17dd8 | [
"Apache-2.0"
] | null | null | null | tests/unit/cfngin/hooks/test_keypair.py | troyready/runway | 4fd299961a4b73df39e14f4f19a7236f7be17dd8 | [
"Apache-2.0"
] | null | null | null | tests/unit/cfngin/hooks/test_keypair.py | troyready/runway | 4fd299961a4b73df39e14f4f19a7236f7be17dd8 | [
"Apache-2.0"
] | null | null | null | """Tests for runway.cfngin.hooks.keypair."""
# pylint: disable=redefined-outer-name
import sys
from collections import namedtuple
from contextlib import contextmanager
import boto3
import mock
import pytest
from moto import mock_ec2, mock_ssm
from runway.cfngin.hooks.keypair import ensure_keypair_exists
from ..facto... | 30.131356 | 87 | 0.69723 |
3ca8b2ddfd345b0f1962de8766a5f8c4902c6639 | 868 | py | Python | iseg/runner/augs.py | TaikiInoue/iSegmentation | 25b2ce6a766e22cefca44b5dd21edadb0870df23 | [
"MIT"
] | null | null | null | iseg/runner/augs.py | TaikiInoue/iSegmentation | 25b2ce6a766e22cefca44b5dd21edadb0870df23 | [
"MIT"
] | null | null | null | iseg/runner/augs.py | TaikiInoue/iSegmentation | 25b2ce6a766e22cefca44b5dd21edadb0870df23 | [
"MIT"
] | null | null | null | import iseg.types as T
from iseg import albu
class RunnerAugs:
cfg: T.DictConfig
def init_augs(self, data_type: str) -> T.Compose:
augs = albu.load(self.cfg.augs[data_type].yaml, data_format="yaml")
if self.cfg.augs[data_type].updates:
augs = self.update_augs(data_type, augs)
... | 28 | 75 | 0.608295 |
ef173d0ecfefe9065fb5e0aadcb03223b2e330b0 | 1,547 | py | Python | setup.py | kaareendrup/gnn-reco | 21f4e36ef17c765a04cde0b2e34d5f802a988055 | [
"Apache-2.0"
] | null | null | null | setup.py | kaareendrup/gnn-reco | 21f4e36ef17c765a04cde0b2e34d5f802a988055 | [
"Apache-2.0"
] | null | null | null | setup.py | kaareendrup/gnn-reco | 21f4e36ef17c765a04cde0b2e34d5f802a988055 | [
"Apache-2.0"
] | null | null | null | import subprocess
import sys
from setuptools import setup, find_packages
import versioneer
# Utility method(s)
def install(package):
subprocess.check_call([sys.executable, "-m", "pip", "install", "--user", package])
# Requirements definitions
EXTRAS_REQUIRE = {
'develop': [
'pytest',
'pylint',... | 24.951613 | 128 | 0.646412 |
9c51383d311a39f3ba671e3dbd0528cb2c2eeba7 | 37,973 | py | Python | snp_finder/scripts/oldscripts/SNPfilter_WGS_recthenfilterthenrec.py | caozhichongchong/snp_finder | 5c769f45b0c0dfb1b7244e1c3d7b4fb8227e64c3 | [
"MIT"
] | 2 | 2021-01-12T21:23:21.000Z | 2021-11-18T19:51:19.000Z | snp_finder/scripts/oldscripts/SNPfilter_WGS_recthenfilterthenrec.py | caozhichongchong/snp_finder | 5c769f45b0c0dfb1b7244e1c3d7b4fb8227e64c3 | [
"MIT"
] | null | null | null | snp_finder/scripts/oldscripts/SNPfilter_WGS_recthenfilterthenrec.py | caozhichongchong/snp_finder | 5c769f45b0c0dfb1b7244e1c3d7b4fb8227e64c3 | [
"MIT"
] | null | null | null | ################################################### END ########################################################
################################################### SET PATH ########################################################
# After round 4 filter results of WGS
import glob
import os
from Bio import SeqIO
from Bi... | 44.257576 | 166 | 0.551207 |
7024a496455e25d71b98af5b7c800e96975774bd | 3,366 | py | Python | Django_Admin/Django_Admin/settings.py | coder-gao/Django-Tools | e5856a64adc55f393d689ad29c9f26c7c25e441a | [
"MIT"
] | 1 | 2020-02-28T11:22:00.000Z | 2020-02-28T11:22:00.000Z | Django_Admin/Django_Admin/settings.py | 1051513344/Django-Tools | e5856a64adc55f393d689ad29c9f26c7c25e441a | [
"MIT"
] | null | null | null | Django_Admin/Django_Admin/settings.py | 1051513344/Django-Tools | e5856a64adc55f393d689ad29c9f26c7c25e441a | [
"MIT"
] | 1 | 2020-02-28T11:22:05.000Z | 2020-02-28T11:22:05.000Z | """
Django settings for Django_Admin project.
Generated by 'django-admin startproject' using Django 2.2.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import ... | 25.694656 | 91 | 0.696376 |
2709424cdf562835c4724bd9961ea5e4c2f704a2 | 688 | py | Python | graph.py | emcd123/Matroids | f1ab7a5164a60b753ba429ef7ba9ce36517d4439 | [
"MIT"
] | null | null | null | graph.py | emcd123/Matroids | f1ab7a5164a60b753ba429ef7ba9ce36517d4439 | [
"MIT"
] | null | null | null | graph.py | emcd123/Matroids | f1ab7a5164a60b753ba429ef7ba9ce36517d4439 | [
"MIT"
] | 1 | 2021-11-21T18:03:07.000Z | 2021-11-21T18:03:07.000Z | V = ['a','b','c'] #vertex set of graph G
E = [1,2,3] #numbered edge set of graph
G = {} #The graph G
def InitGraph(G,V):
#Function to initialise the graph G,
#edge sets need to be hard coded at present
for i in V:
G[i] = [0]
#Now add the edge sets of each vertex as a list in the values... | 22.933333 | 66 | 0.559593 |
384b3062bf11414ef43b7312e7e47875d8ca05ff | 9,708 | py | Python | telethon_generator/docswriter.py | y0nigt/Telethon | d1d20d147d2147ec10b92a41daae1379f9691208 | [
"MIT"
] | null | null | null | telethon_generator/docswriter.py | y0nigt/Telethon | d1d20d147d2147ec10b92a41daae1379f9691208 | [
"MIT"
] | null | null | null | telethon_generator/docswriter.py | y0nigt/Telethon | d1d20d147d2147ec10b92a41daae1379f9691208 | [
"MIT"
] | null | null | null | import os
import re
class DocsWriter:
"""
Utility class used to write the HTML files used on the documentation.
"""
def __init__(self, filename, type_to_path):
"""
Initializes the writer to the specified output file,
creating the parent directories when used if required.
... | 32.686869 | 82 | 0.53152 |
b003c842e1a357cbcd32e6a66d7b344656a2f33f | 1,856 | py | Python | midynet/metrics/graph_entropy.py | charlesmurphy1/fast-midynet | 22071d49077fce9d5f99a4664f36767b27edea64 | [
"MIT"
] | null | null | null | midynet/metrics/graph_entropy.py | charlesmurphy1/fast-midynet | 22071d49077fce9d5f99a4664f36767b27edea64 | [
"MIT"
] | null | null | null | midynet/metrics/graph_entropy.py | charlesmurphy1/fast-midynet | 22071d49077fce9d5f99a4664f36767b27edea64 | [
"MIT"
] | null | null | null | import time
from dataclasses import dataclass, field
from _midynet import utility
from _midynet.mcmc import DynamicsMCMC
from midynet.config import (
Config,
DynamicsFactory,
RandomGraphFactory,
RandomGraphMCMCFactory,
)
from .metrics import Metrics
from .multiprocess import Expectation
from .statistic... | 29 | 75 | 0.662177 |
c100ba6bf46830f51b8da6f595df137a8554ee0f | 4,993 | py | Python | code/a3c/trainingA3C.py | Dookas/Robust-Multitask-RL | 7970e20cbdf91703c88edcb84568d7354e2525bc | [
"MIT"
] | 106 | 2018-03-15T13:11:35.000Z | 2022-02-15T01:01:28.000Z | code/a3c/trainingA3C.py | ChampionZP/Robust-Multitask-RL | 1f23ad0b624e8d859b74fbe023e0c85564ed50e1 | [
"MIT"
] | 3 | 2019-02-11T12:06:39.000Z | 2021-06-04T00:50:53.000Z | code/a3c/trainingA3C.py | ChampionZP/Robust-Multitask-RL | 1f23ad0b624e8d859b74fbe023e0c85564ed50e1 | [
"MIT"
] | 23 | 2018-05-07T13:53:08.000Z | 2022-03-24T02:56:43.000Z | import torch
import torch.nn as nn
from a3cutils import v_wrap, set_init, push_and_pull, record
import torch.nn.functional as F
import torch.multiprocessing as mp
from shared_adam import SharedAdam
import gym
import sys
sys.path.append('../')
from envs.gridworld_env import GridworldEnv
import numpy as np
class Net(nn... | 33.736486 | 185 | 0.586421 |
40b1a7dd277acd8992c1d8aa8e8feb84df771303 | 38,998 | py | Python | evrptw_meta.py | neuyhwu/EVRPTW_Solver | 63e77e525ac714a48d2597b71e16ff46a32555f6 | [
"Apache-2.0"
] | 12 | 2018-11-12T09:36:22.000Z | 2021-05-12T11:36:21.000Z | evrptw_meta.py | neuyhwu/EVRPTW_Solver | 63e77e525ac714a48d2597b71e16ff46a32555f6 | [
"Apache-2.0"
] | 1 | 2020-10-09T10:34:50.000Z | 2020-10-09T10:34:50.000Z | evrptw_meta.py | fwoerister/EVRPTW_Solver | 63e77e525ac714a48d2597b71e16ff46a32555f6 | [
"Apache-2.0"
] | 4 | 2019-04-25T08:28:47.000Z | 2022-01-18T15:20:10.000Z | from copy import deepcopy
from queue import LifoQueue
from random import randint, shuffle, random, choice
from math import exp
from evrptw_solver import RoutingProblemInstance
from targets import Customer, CharingStation
from itertools import combinations, product
import matplotlib.pyplot as plt
import sys
K_MAX =... | 44.87687 | 121 | 0.563978 |
a73b2282e3e8fc3b53fc63359be82293d925daa2 | 5,039 | py | Python | sdks/python/apache_beam/tools/fn_api_runner_microbenchmark.py | harrydrippin/beam | 4b413bbb5f8807b0f7a284fd818f2772f036fe55 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 5,279 | 2016-12-29T04:00:44.000Z | 2022-03-31T22:56:45.000Z | sdks/python/apache_beam/tools/fn_api_runner_microbenchmark.py | harrydrippin/beam | 4b413bbb5f8807b0f7a284fd818f2772f036fe55 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 14,149 | 2016-12-28T00:43:50.000Z | 2022-03-31T23:50:22.000Z | sdks/python/apache_beam/tools/fn_api_runner_microbenchmark.py | harrydrippin/beam | 4b413bbb5f8807b0f7a284fd818f2772f036fe55 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 3,763 | 2016-12-29T04:06:10.000Z | 2022-03-31T22:25:49.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 use ... | 33.370861 | 78 | 0.744592 |
c37a4afe99475cc2453546df065ae75320555b75 | 2,510 | py | Python | src/accounts/migrations/0001_initial.py | graipher/TeaRoom | 0beb8c2c889b8685d5b7a463206de41947c2d669 | [
"MIT"
] | null | null | null | src/accounts/migrations/0001_initial.py | graipher/TeaRoom | 0beb8c2c889b8685d5b7a463206de41947c2d669 | [
"MIT"
] | 15 | 2015-05-20T12:55:13.000Z | 2022-03-11T23:26:40.000Z | src/accounts/migrations/0001_initial.py | graipher/TeaRoom | 0beb8c2c889b8685d5b7a463206de41947c2d669 | [
"MIT"
] | 2 | 2016-11-17T11:07:41.000Z | 2017-07-07T11:18:36.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('auth', '0006_require_contenttypes_0002'),
]
operations = [
migrations.CreateModel(
... | 67.837838 | 312 | 0.66494 |
78c6e1841b30ab868f603067807d15a730d4c393 | 13,705 | py | Python | image_creation.py | IceDynamix/clorox_bot | eca6f6c253a2665ecc0a1f7736dee03a8733e1df | [
"MIT"
] | null | null | null | image_creation.py | IceDynamix/clorox_bot | eca6f6c253a2665ecc0a1f7736dee03a8733e1df | [
"MIT"
] | null | null | null | image_creation.py | IceDynamix/clorox_bot | eca6f6c253a2665ecc0a1f7736dee03a8733e1df | [
"MIT"
] | 1 | 2021-01-31T23:06:06.000Z | 2021-01-31T23:06:06.000Z | from PIL import Image, ImageDraw, ImageFont
import requests
import io
import json
import numpy as np
import pyttanko as osu
########################################################
# #
# Only for testing purposes #
# no specific corr... | 51.329588 | 170 | 0.606494 |
5069165ec9a09236fd3479bbbdaa4886b9ad1c3a | 2,064 | py | Python | common/cache_utils.py | tickbh/luojiawaf_server | 814793ff7989141caf38c3dedee95b4ecfacf8cc | [
"MulanPSL-1.0"
] | 2 | 2022-03-14T12:07:53.000Z | 2022-03-17T02:28:24.000Z | common/cache_utils.py | tickbh/luojiawaf_server | 814793ff7989141caf38c3dedee95b4ecfacf8cc | [
"MulanPSL-1.0"
] | null | null | null | common/cache_utils.py | tickbh/luojiawaf_server | 814793ff7989141caf38c3dedee95b4ecfacf8cc | [
"MulanPSL-1.0"
] | 1 | 2022-03-29T09:33:16.000Z | 2022-03-29T09:33:16.000Z | import time
from common import pool_utils, base_utils, waf_utils
CACHE_STEP = 60
_cache_time_last_read = 0
cache_table = {}
not_wait_forbidden_ratio = "not_wait_forbidden_ratio"
not_wait_forbidden_min_len = "not_wait_forbidden_min_len"
min_all_visit_times = "min_all_visit_times"
max_visit_idx_num = "max_visit_idx_num... | 38.943396 | 96 | 0.788275 |
6660d517b9a1aaa528bd304e30a9f761d7e63fb4 | 11,422 | py | Python | modules/solid/solid_material.py | marchirschvogel/amb | af48b2a672cfcfb7a081020cda599fde85aa6b65 | [
"BSD-4-Clause"
] | null | null | null | modules/solid/solid_material.py | marchirschvogel/amb | af48b2a672cfcfb7a081020cda599fde85aa6b65 | [
"BSD-4-Clause"
] | null | null | null | modules/solid/solid_material.py | marchirschvogel/amb | af48b2a672cfcfb7a081020cda599fde85aa6b65 | [
"BSD-4-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2019-2021, Dr.-Ing. Marc Hirschvogel
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import ufl
# returns the 2nd Piola-Kirchhoff stress S for different material laws
clas... | 33.893175 | 1,240 | 0.558746 |
18cec47ccdc10db7a94b498b0cf7b349b3678dc9 | 431 | py | Python | skbio/parse/__init__.py | Kleptobismol/scikit-bio | 3df95446558273034b884852f2b7bf6a1872f66d | [
"BSD-3-Clause"
] | null | null | null | skbio/parse/__init__.py | Kleptobismol/scikit-bio | 3df95446558273034b884852f2b7bf6a1872f66d | [
"BSD-3-Clause"
] | null | null | null | skbio/parse/__init__.py | Kleptobismol/scikit-bio | 3df95446558273034b884852f2b7bf6a1872f66d | [
"BSD-3-Clause"
] | 1 | 2018-09-21T01:58:43.000Z | 2018-09-21T01:58:43.000Z | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# ---------------------... | 33.153846 | 78 | 0.473318 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.