hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
209
max_issues_repo_name
stringlengths
5
121
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
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
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
b58d49311f4a35fb47154342912fdc6e20123b51
2,143
py
Python
plans/fixed_ensemble_resnet_dikmeans_4.py
dbis-uibk/MediaEval2021
14d754d9cea36415090aaa115db81f5ace465964
[ "BSD-2-Clause" ]
1
2022-03-31T07:28:12.000Z
2022-03-31T07:28:12.000Z
plans/fixed_ensemble_resnet_dikmeans_4.py
dbis-uibk/MediaEval2021
14d754d9cea36415090aaa115db81f5ace465964
[ "BSD-2-Clause" ]
null
null
null
plans/fixed_ensemble_resnet_dikmeans_4.py
dbis-uibk/MediaEval2021
14d754d9cea36415090aaa115db81f5ace465964
[ "BSD-2-Clause" ]
null
null
null
"""Ensemble plan manually split by type moode/theme.""" import json from dbispipeline.evaluators import FixedSplitEvaluator from dbispipeline.evaluators import ModelCallbackWrapper from sklearn.pipeline import Pipeline from mediaeval2021 import common from mediaeval2021.dataloaders.melspectrograms import MelSpectPick...
35.716667
170
0.673822
bd0487b3dab2f262b26a707b98d663a7809a56a3
2,078
py
Python
demo/demo_my_pi.py
claremacrae/raspi_code
ee089b8eae29dd4ddf8d45e101affa1e8c5efca4
[ "MIT" ]
null
null
null
demo/demo_my_pi.py
claremacrae/raspi_code
ee089b8eae29dd4ddf8d45e101affa1e8c5efca4
[ "MIT" ]
null
null
null
demo/demo_my_pi.py
claremacrae/raspi_code
ee089b8eae29dd4ddf8d45e101affa1e8c5efca4
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ A script to show off certain Raspberry Pi features automatically, without needing to interact with the Pi to start commands. I'm intending this to be run at startup, perhaps if no keyboard is connected? To run this automatically, see http://www.raspberrypi-spy.co.uk/2013/07/running-a-python...
31.014925
84
0.729548
6b0a4461114e99ce0c674f2bd7dee77ba8ff99e1
6,802
py
Python
apps/users/views.py
jakejie/StayOrder
3e1e0011550dc3b98bc4cfe51723bc0fc3ef0727
[ "Apache-2.0" ]
1
2019-11-08T11:41:52.000Z
2019-11-08T11:41:52.000Z
apps/users/views.py
jakejie/StayOrder
3e1e0011550dc3b98bc4cfe51723bc0fc3ef0727
[ "Apache-2.0" ]
6
2020-06-05T19:55:16.000Z
2021-12-13T19:56:00.000Z
apps/users/views.py
jakejie/StayOrder
3e1e0011550dc3b98bc4cfe51723bc0fc3ef0727
[ "Apache-2.0" ]
null
null
null
# coding:utf-8 import datetime from django.shortcuts import render, reverse from django.http import HttpResponseRedirect from django.views.generic import View from .models import CrawlTaskModel, UserProfile # 定义使用邮箱进行登陆 重载方法 from django.contrib.auth.backends import ModelBackend from django.contrib.auth import authentic...
38
113
0.500588
b90adff0b462d7e1c54a8d5ff340091dcc61a928
3,886
py
Python
Individual1.py
dibovdmitry/laba2.18
b314081f976ff2aefa1e69913d8508f49bb3c44e
[ "MIT" ]
null
null
null
Individual1.py
dibovdmitry/laba2.18
b314081f976ff2aefa1e69913d8508f49bb3c44e
[ "MIT" ]
null
null
null
Individual1.py
dibovdmitry/laba2.18
b314081f976ff2aefa1e69913d8508f49bb3c44e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import argparse import json import os import sys def add_airplane(race, path, number, model): race.append( { "path": path, "number": number, "model": model } ) return race def display_airplanes(race): ...
22.079545
62
0.50386
2566ec23254be60067998ccce7ebf64d2fb9f43c
3,919
py
Python
plugins/lib/scope_data/__init__.py
thom1729-forks/PackageDev
bca17d6982983f13bd6588bacdb0245a15e30884
[ "MIT" ]
288
2016-01-25T10:05:22.000Z
2022-03-29T01:46:18.000Z
plugins/lib/scope_data/__init__.py
thom1729-forks/PackageDev
bca17d6982983f13bd6588bacdb0245a15e30884
[ "MIT" ]
243
2016-01-24T22:12:58.000Z
2022-03-23T20:51:13.000Z
plugins/lib/scope_data/__init__.py
thom1729-forks/PackageDev
bca17d6982983f13bd6588bacdb0245a15e30884
[ "MIT" ]
76
2016-01-24T23:04:17.000Z
2022-03-14T03:04:39.000Z
import logging import sublime from .data import DATA __all__ = ["COMPILED_NODES", "COMPILED_HEADS", "completions_from_prefix"] logger = logging.getLogger(__name__) SCOPE_KIND = (sublime.KIND_ID_NAMESPACE, "s", "Scope") class NodeSet(set): """ Methods: * find(name) * find_all(name) ...
25.121795
95
0.573871
c19c604ead8a3a9c0a17cb4a3087dde6aed14cab
27,655
py
Python
apps/beeswax/src/beeswax/server/hive_server2_lib.py
vsosrc/hue
d8bc236d8d622759fa5988ff32246e4c750e7503
[ "Apache-2.0" ]
null
null
null
apps/beeswax/src/beeswax/server/hive_server2_lib.py
vsosrc/hue
d8bc236d8d622759fa5988ff32246e4c750e7503
[ "Apache-2.0" ]
null
null
null
apps/beeswax/src/beeswax/server/hive_server2_lib.py
vsosrc/hue
d8bc236d8d622759fa5988ff32246e4c750e7503
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
34.962073
155
0.705008
6e3d13c1c1d2052fbebff7e8e94edea006545767
377
py
Python
tests/test_beats.py
Ghayyas/amen
eaa1a1186d430d6cb342a7f79278c136439a24a1
[ "BSD-2-Clause" ]
1
2021-08-22T14:17:03.000Z
2021-08-22T14:17:03.000Z
tests/test_beats.py
Ghayyas/amen
eaa1a1186d430d6cb342a7f79278c136439a24a1
[ "BSD-2-Clause" ]
null
null
null
tests/test_beats.py
Ghayyas/amen
eaa1a1186d430d6cb342a7f79278c136439a24a1
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from amen.audio import Audio from amen.utils import example_audio_file from amen.timing import TimingList from nose.tools import eq_ EXAMPLE_FILE = example_audio_file() AUDIO = Audio(EXAMPLE_FILE) def test_beats(): beats = AUDIO.timings['beats'] assert isinstance...
23.5625
53
0.737401
69d0ed09bf58f07a46817c86a75d60b055e9311f
1,509
py
Python
src/meltano/cli/__init__.py
Mu-L/meltano
7bf8f370608ee9a8833b33ea94112c6e219c8161
[ "MIT" ]
null
null
null
src/meltano/cli/__init__.py
Mu-L/meltano
7bf8f370608ee9a8833b33ea94112c6e219c8161
[ "MIT" ]
null
null
null
src/meltano/cli/__init__.py
Mu-L/meltano
7bf8f370608ee9a8833b33ea94112c6e219c8161
[ "MIT" ]
null
null
null
"""Main entry point for the meltano CLI.""" import logging import os import sys from meltano.core.logging import setup_logging from meltano.core.project import ProjectReadonly from .utils import CliError # TODO: Importing the cli.cli module breaks other cli module imports # This suggests a cyclic dependency or a poo...
23.578125
79
0.644135
965e41b9ece46908dd7220d012a878c7498d6d1b
7,340
py
Python
openprocurement/ocds/export/tests/test_export.py
myroslav/openprocurement.ocds.export
127c438f43d766f9519265cd64ee7a2f20cea6a6
[ "Apache-2.0" ]
null
null
null
openprocurement/ocds/export/tests/test_export.py
myroslav/openprocurement.ocds.export
127c438f43d766f9519265cd64ee7a2f20cea6a6
[ "Apache-2.0" ]
null
null
null
openprocurement/ocds/export/tests/test_export.py
myroslav/openprocurement.ocds.export
127c438f43d766f9519265cd64ee7a2f20cea6a6
[ "Apache-2.0" ]
null
null
null
from openprocurement.ocds.export.models import ( Award, Contract, Tender, release_tender, release_tenders, package_tenders, record_tenders, modelsMap, callbacks ) from openprocurement.ocds.export.ext.models import ( TenderExt, AwardExt, ContractExt, update_models_map,...
33.063063
112
0.562534
2a0dcd9b6636733ef382c27d4c4b0a000f08894a
9,579
py
Python
pytext/config/component.py
hudeven/pytext
6e5ab16803be33bcb784b7fd79aa99935cfd12ec
[ "BSD-3-Clause" ]
2
2022-01-21T17:04:19.000Z
2022-01-21T17:04:25.000Z
pytext/config/component.py
hudeven/pytext
6e5ab16803be33bcb784b7fd79aa99935cfd12ec
[ "BSD-3-Clause" ]
null
null
null
pytext/config/component.py
hudeven/pytext
6e5ab16803be33bcb784b7fd79aa99935cfd12ec
[ "BSD-3-Clause" ]
1
2021-11-21T06:17:30.000Z
2021-11-21T06:17:30.000Z
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import collections import enum from typing import Any, Dict, List, Tuple, Type, Union import torch from .pytext_config import ConfigBase, PyTextConfig class ComponentType(enum.Enum): TASK = "task" COLUMN = "column"...
32.361486
87
0.650485
cc4c78d884448ca2c469cc3010c6bda56c1d186a
7,024
py
Python
scripts/fixup_spanner_admin_database_v1_keywords.py
asthamohta/python-spanner
321bc7faf364ad423da08ae4e2c0d6f76834dc09
[ "Apache-2.0" ]
49
2020-02-06T17:36:32.000Z
2022-03-31T05:32:29.000Z
scripts/fixup_spanner_admin_database_v1_keywords.py
asthamohta/python-spanner
321bc7faf364ad423da08ae4e2c0d6f76834dc09
[ "Apache-2.0" ]
417
2020-01-31T23:12:28.000Z
2022-03-30T22:42:11.000Z
scripts/fixup_spanner_admin_database_v1_keywords.py
asthamohta/python-spanner
321bc7faf364ad423da08ae4e2c0d6f76834dc09
[ "Apache-2.0" ]
46
2020-01-31T22:54:25.000Z
2022-03-29T12:04:55.000Z
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
36.393782
101
0.626851
87fd7efa7685def2542bbeb325037ab9d8ac1b65
5,419
py
Python
train.py
camall3n/pytorch_sac
36cfaae3fdca91f1c80a41dfd7e805051f9f4c9f
[ "MIT" ]
null
null
null
train.py
camall3n/pytorch_sac
36cfaae3fdca91f1c80a41dfd7e805051f9f4c9f
[ "MIT" ]
null
null
null
train.py
camall3n/pytorch_sac
36cfaae3fdca91f1c80a41dfd7e805051f9f4c9f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import copy import math import os import sys import time from tqdm import tqdm import pickle as pkl from video import VideoRecorder from logger import Logger from replay_buffer import ReplayBuffer import utils ...
32.842424
88
0.557667
d18a3430c062ac4bdb0a37ce7345445fbc6f654e
223
py
Python
MillisecondCounter/__init__.py
stuartornum/python-MillisecondCounter
64f31cdd9fcae18ae5dabe4f0036d32f445b4e1a
[ "Apache-2.0" ]
null
null
null
MillisecondCounter/__init__.py
stuartornum/python-MillisecondCounter
64f31cdd9fcae18ae5dabe4f0036d32f445b4e1a
[ "Apache-2.0" ]
null
null
null
MillisecondCounter/__init__.py
stuartornum/python-MillisecondCounter
64f31cdd9fcae18ae5dabe4f0036d32f445b4e1a
[ "Apache-2.0" ]
null
null
null
from datetime import datetime class ExecutionCounter(): def __init__(self): self.st = datetime.now() def finish(self): ft = datetime.now() - self.st return int(ft.total_seconds() * 1000)
18.583333
45
0.623318
2fa35859a5bf93c7668ca8ca12beaee01e297ca1
14,702
py
Python
tests/test_ucb.py
jaywonchung/mabwiser
805326a99213f94a6e813530cebf0c8a0f96a2d1
[ "Apache-2.0" ]
60
2020-06-10T11:20:52.000Z
2022-03-25T02:16:47.000Z
tests/test_ucb.py
jaywonchung/mabwiser
805326a99213f94a6e813530cebf0c8a0f96a2d1
[ "Apache-2.0" ]
24
2020-06-04T18:40:21.000Z
2022-03-24T16:49:51.000Z
tests/test_ucb.py
jaywonchung/mabwiser
805326a99213f94a6e813530cebf0c8a0f96a2d1
[ "Apache-2.0" ]
12
2020-11-30T10:37:05.000Z
2022-03-25T02:16:41.000Z
# -*- coding: utf-8 -*- import datetime import math import numpy as np import pandas as pd from mabwiser.mab import LearningPolicy from mabwiser.ucb import _UCB1 from tests.test_base import BaseTest class UCBTest(BaseTest): def test_alpha0(self): arm, mab = self.predict(arms=[1, 2, 3], ...
38.997347
119
0.435859
3710414b2496a8c7b66bb65415facd2cc7827920
1,804
py
Python
porE/results/results_PSD/test_psd_adaptive_stepsize/convergence_MCsteps/results/eval.py
kaitrepte/porE
1d11f7aca6aa0859f9363c42d8a2c4b3de0f2eec
[ "Apache-2.0" ]
2
2020-08-06T09:35:50.000Z
2021-04-12T14:45:45.000Z
porE/results/results_PSD/test_psd_adaptive_stepsize/convergence_MCsteps/results/eval.py
kaitrepte/porE
1d11f7aca6aa0859f9363c42d8a2c4b3de0f2eec
[ "Apache-2.0" ]
9
2020-08-04T16:14:21.000Z
2020-12-19T10:16:37.000Z
porE/results/results_PSD/test_psd_adaptive_stepsize/convergence_MCsteps/results/eval.py
kaitrepte/porE
1d11f7aca6aa0859f9363c42d8a2c4b3de0f2eec
[ "Apache-2.0" ]
2
2019-09-27T21:53:49.000Z
2021-05-07T09:17:39.000Z
import os structures = ['do','vo','dc','vc','u6','u7','u8','m5','ir','h1','ho'] mc_steps = [250,500,750,1000,1250,1500,1750,2000,2250,2500,2750,3000,3500,4000,4500,5000,5500,6000,7000,8000,9000,10000,20000] for i in range(len(structures)): pores = [] distr = [] time = [] for j in range(len(mc_steps)...
34.037736
128
0.432927
2ecfcaa3b229fa46474c864f7a29ee3707f88941
32,351
py
Python
parameters_input.py
gianmarco-lorenti/RECOpt
c7916861db033f9d917d05094102194202e3bb09
[ "MIT" ]
8
2021-03-08T09:30:16.000Z
2022-02-18T19:40:41.000Z
parameters_input.py
gianmarco-lorenti/RECOpt
c7916861db033f9d917d05094102194202e3bb09
[ "MIT" ]
null
null
null
parameters_input.py
gianmarco-lorenti/RECOpt
c7916861db033f9d917d05094102194202e3bb09
[ "MIT" ]
1
2021-05-24T13:21:36.000Z
2021-05-24T13:21:36.000Z
# -*- coding: utf-8 -*- """ Created on Tue Nov 10 16:09:48 2020 @author: giamm """ import numpy as np import csv from pathlib import Path from tabulate import tabulate import datareader from levenshtein_distance import Leven_dist_comparison ############################################################################...
50.786499
176
0.593583
bb57c52f8356f0aa48f610dadb03e8ba80d66016
12,430
py
Python
test/python/transpiler/test_optimize_1q_gates.py
romainfd/qiskit-terra
b5285ccc5cb1d17b7c73402833f2750b93652426
[ "Apache-2.0" ]
2
2020-12-26T21:12:30.000Z
2021-05-18T12:53:42.000Z
test/python/transpiler/test_optimize_1q_gates.py
romainfd/qiskit-terra
b5285ccc5cb1d17b7c73402833f2750b93652426
[ "Apache-2.0" ]
1
2020-03-29T19:57:14.000Z
2020-03-29T21:49:25.000Z
test/python/transpiler/test_optimize_1q_gates.py
romainfd/qiskit-terra
b5285ccc5cb1d17b7c73402833f2750b93652426
[ "Apache-2.0" ]
1
2020-07-13T17:56:46.000Z
2020-07-13T17:56:46.000Z
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
31.075
95
0.582623
776901d2ff6579e160c48bdd174c3f080f28f876
3,351
py
Python
trdg/computer_text_generator.py
Cospel/TextRecognitionDataGenerator
2339383f61a926945c06206ba5bb6358c0cb3568
[ "MIT" ]
null
null
null
trdg/computer_text_generator.py
Cospel/TextRecognitionDataGenerator
2339383f61a926945c06206ba5bb6358c0cb3568
[ "MIT" ]
null
null
null
trdg/computer_text_generator.py
Cospel/TextRecognitionDataGenerator
2339383f61a926945c06206ba5bb6358c0cb3568
[ "MIT" ]
null
null
null
import random as rnd from PIL import Image, ImageColor, ImageFont, ImageDraw, ImageFilter def generate(text, font, text_color, font_size, orientation, space_width, fit, random_opacity, random_character_spacing): if orientation == 0: return _generate_horizontal_text( text, font, text_color, fo...
32.852941
125
0.614742
5d981dc23b4586235bffcb186f3a7b63ddeadc49
1,417
py
Python
homeassistant/components/netatmo/const.py
billyburly/home-assistant
9795449d22783e77a0ca7b745f15c89a830c5cc6
[ "Apache-2.0" ]
5
2020-09-17T10:48:51.000Z
2021-11-22T00:08:17.000Z
homeassistant/components/netatmo/const.py
billyburly/home-assistant
9795449d22783e77a0ca7b745f15c89a830c5cc6
[ "Apache-2.0" ]
9
2022-01-27T06:32:10.000Z
2022-03-31T07:07:51.000Z
homeassistant/components/netatmo/const.py
billyburly/home-assistant
9795449d22783e77a0ca7b745f15c89a830c5cc6
[ "Apache-2.0" ]
6
2019-12-01T19:06:52.000Z
2020-09-17T00:57:06.000Z
"""Constants used by the Netatmo component.""" from datetime import timedelta API = "api" DOMAIN = "netatmo" MANUFACTURER = "Netatmo" AUTH = "netatmo_auth" CONF_PUBLIC = "public_sensor_config" CAMERA_DATA = "netatmo_camera" HOME_DATA = "netatmo_home_data" OAUTH2_AUTHORIZE = "https://api.netatmo.com/oauth2/authorize...
24.431034
61
0.790402
3187420f9565c71fc050b58ee88873ea7a1cff0c
3,613
py
Python
tests/integration/test_integration_user.py
UtrechtUniversity/SWORDS-UU
d9b45706566054541625ec363e41bdf97f58c6b1
[ "MIT" ]
1
2022-02-09T14:53:45.000Z
2022-02-09T14:53:45.000Z
tests/integration/test_integration_user.py
UtrechtUniversity/SWORDS-UU
d9b45706566054541625ec363e41bdf97f58c6b1
[ "MIT" ]
28
2021-11-30T14:37:17.000Z
2022-03-22T12:46:53.000Z
tests/integration/test_integration_user.py
UtrechtUniversity/SWORDS-UU
d9b45706566054541625ec363e41bdf97f58c6b1
[ "MIT" ]
1
2022-01-17T10:53:26.000Z
2022-01-17T10:53:26.000Z
""" Tests for retrieval methods in user collection """ import pytest from ghapi.all import GhApi import os import pandas as pd import time from collect_users.methods.github_search.github_search import get_complete_query_result, get_users_from_repos, get_users_from_users from collect_users.scripts.enrich_users import ...
32.845455
131
0.687517
2a2980a8871f7e464ee083545cdbea51a6194b24
424
py
Python
scripts/Hotword/assistant_direct.py
iamDyeus/KnickAI
c17d808c949cb3467031498e7252bd2095c04699
[ "MIT" ]
31
2021-11-08T18:42:17.000Z
2022-03-25T07:45:46.000Z
scripts/Hotword/awake.py
iamDyeus/KnickAI
c17d808c949cb3467031498e7252bd2095c04699
[ "MIT" ]
6
2021-12-20T14:15:44.000Z
2022-03-28T16:19:12.000Z
scripts/Hotword/awake.py
iamDyeus/KnickAI
c17d808c949cb3467031498e7252bd2095c04699
[ "MIT" ]
3
2021-11-13T09:38:12.000Z
2022-03-25T07:44:17.000Z
import sys sys.path.append('scripts/') from console import intro_header import time #assistant directly works without giving introduction or any other shit. def start_from_hibernation(): print(intro_header) from standardfunctions import wishMe wishMe() time.sleep(1) from FeatureExecuti...
20.190476
73
0.716981
c40f505338c7dc96d483f09fbfb98c5dc3e260d5
1,184
py
Python
Download_subs/Spinner.py
miroslavvidovic/python-scripts
22c925bc2bd9b657ac3183c3c73af0061cb61b3b
[ "MIT" ]
null
null
null
Download_subs/Spinner.py
miroslavvidovic/python-scripts
22c925bc2bd9b657ac3183c3c73af0061cb61b3b
[ "MIT" ]
null
null
null
Download_subs/Spinner.py
miroslavvidovic/python-scripts
22c925bc2bd9b657ac3183c3c73af0061cb61b3b
[ "MIT" ]
null
null
null
""" Spinner.py Spinner animation """ import sys import time import threading class Spinner: """ Spinner running in a separate thread """ busy = False delay = 0.1 @staticmethod def spinning_cursor(): """ Static method for the cursor animation """ while ...
18.793651
82
0.538007
2c5461fd0279f909bf96daf41413b6dc0701cc07
3,932
py
Python
hashicorp_vault_client/hashicorp_vault_client/models/body111.py
drewmullen/HAC
fb185804fd244366f8f8d01df22835b3d96e7512
[ "Apache-2.0" ]
null
null
null
hashicorp_vault_client/hashicorp_vault_client/models/body111.py
drewmullen/HAC
fb185804fd244366f8f8d01df22835b3d96e7512
[ "Apache-2.0" ]
2
2019-09-30T20:56:41.000Z
2019-10-02T00:22:07.000Z
hashicorp_vault_client/hashicorp_vault_client/models/body111.py
drewmullen/HAC
fb185804fd244366f8f8d01df22835b3d96e7512
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ HashiCorp Vault API HTTP API that gives you full access to Vault. All API routes are prefixed with `/v1/`. # noqa: E501 OpenAPI spec version: 1.2.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class...
27.690141
104
0.553917
a8fe79e60649aee330fe8da105214a3e788b0563
1,636
py
Python
t2s.py
zngrn/py-text-speech
ed6a21fde224d14e7b7897fdcb82066732d3f0a2
[ "MIT" ]
null
null
null
t2s.py
zngrn/py-text-speech
ed6a21fde224d14e7b7897fdcb82066732d3f0a2
[ "MIT" ]
null
null
null
t2s.py
zngrn/py-text-speech
ed6a21fde224d14e7b7897fdcb82066732d3f0a2
[ "MIT" ]
null
null
null
import pyttsx3 import speech_recognition from decouple import config from datetime import datetime from random import choice from utils import working_on_it, apologies USER = config('USER') BOT = config('BOT') engine = pyttsx3.init('nsss') engine.setProperty('rate', 187) engine.setProperty('volume', 1.0) voices = en...
26.819672
60
0.639976
f919607268956928296e6ee4bd7db5767d5ae62f
4,964
py
Python
tests/unit/utils/test_measurables.py
Trendometrics/pyowm
ba1581c37a8c6a2e113a77670cc68fe2b4adeca6
[ "MIT" ]
799
2015-01-03T12:07:57.000Z
2022-03-31T03:59:53.000Z
tests/unit/utils/test_measurables.py
Trendometrics/pyowm
ba1581c37a8c6a2e113a77670cc68fe2b4adeca6
[ "MIT" ]
279
2015-02-12T16:11:43.000Z
2022-02-14T21:49:03.000Z
tests/unit/utils/test_measurables.py
Trendometrics/pyowm
ba1581c37a8c6a2e113a77670cc68fe2b4adeca6
[ "MIT" ]
215
2015-01-06T19:07:11.000Z
2022-02-14T21:39:33.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest from pyowm.utils import measurables class TestMeasurablesUtils(unittest.TestCase): def test_kelvin_dict_to(self): kelvin_dict = {'a': 301.0, 'b': 280} celsius_dict = {'a': 27.85, 'b': 6.85} fahrenheit_dict = {'a': 82.13, 'b': ...
32.233766
86
0.524577
9138cba6ab9695becdf68d9bcc983603a92613cf
2,482
py
Python
rdflib/plugins/sparql/results/csvresults.py
gtfierro/rdflib
be3d026e9065c8f60f59ac79a70da9f3199f5f43
[ "BSD-3-Clause" ]
1
2022-02-02T23:04:51.000Z
2022-02-02T23:04:51.000Z
rdflib/plugins/sparql/results/csvresults.py
gtfierro/rdflib
be3d026e9065c8f60f59ac79a70da9f3199f5f43
[ "BSD-3-Clause" ]
6
2021-11-22T19:10:32.000Z
2022-01-31T19:16:37.000Z
rdflib/plugins/sparql/results/csvresults.py
jjon/rdflib
4c2ab7b392b353bf3c6088017ec9351ce8ac3db6
[ "BSD-3-Clause" ]
null
null
null
""" This module implements a parser and serializer for the CSV SPARQL result formats http://www.w3.org/TR/sparql11-results-csv-tsv/ """ import codecs import csv from typing import IO from rdflib import BNode, Literal, URIRef, Variable from rdflib.query import Result, ResultParser, ResultSerializer class CSVResul...
28.204545
112
0.605157
0394509844fae3051822cae0605003ec3af98f7b
103
py
Python
mapserver/django/django_project/fba/apps.py
dimasciput/geocris-inasafe-fba
e8bc982f7328740235133605049634c6dca93279
[ "MIT" ]
1
2020-12-01T14:42:12.000Z
2020-12-01T14:42:12.000Z
mapserver/django/django_project/fba/apps.py
dimasciput/geocris-inasafe-fba
e8bc982f7328740235133605049634c6dca93279
[ "MIT" ]
27
2020-05-13T10:05:47.000Z
2020-11-25T10:53:29.000Z
mapserver/django/django_project/fba/apps.py
dimasciput/geocris-inasafe-fba
e8bc982f7328740235133605049634c6dca93279
[ "MIT" ]
1
2020-09-21T03:25:02.000Z
2020-09-21T03:25:02.000Z
from django.apps import AppConfig class Config(AppConfig): name = 'fba' verbose_name = "FbA"
14.714286
33
0.68932
a3b66dd28c7aef2c010775d5d59c5640306798db
8,001
py
Python
tests/test_invoke.py
miguelgrinberg/slam
a8c4dabe18093711b63577efb59d7febce8b9de1
[ "MIT" ]
79
2017-01-02T21:40:22.000Z
2022-02-22T11:07:51.000Z
tests/test_invoke.py
miguelgrinberg/slam
a8c4dabe18093711b63577efb59d7febce8b9de1
[ "MIT" ]
17
2017-01-02T23:04:42.000Z
2020-10-09T19:08:39.000Z
tests/test_invoke.py
miguelgrinberg/slam
a8c4dabe18093711b63577efb59d7febce8b9de1
[ "MIT" ]
13
2017-02-09T22:52:30.000Z
2020-09-21T01:48:18.000Z
from io import BytesIO import json import mock import sys import unittest import botocore from slam import cli from .test_deploy import config, describe_stacks_response BUILTIN = '__builtin__' if sys.version_info >= (3, 0): BUILTIN = 'builtins' class InvokeTests(unittest.TestCase): @mock.patch('slam.cli.bo...
44.20442
79
0.611799
4560fab6fd3431da4e1f72bfdca11537ba9b1908
76,124
py
Python
great_expectations/dataset/sqlalchemy_dataset.py
lcorneliussen/great_expectations
00a94d9dd7397b726e951baf290f4b5d18101b4d
[ "Apache-2.0" ]
1
2020-09-29T18:19:35.000Z
2020-09-29T18:19:35.000Z
great_expectations/dataset/sqlalchemy_dataset.py
lcorneliussen/great_expectations
00a94d9dd7397b726e951baf290f4b5d18101b4d
[ "Apache-2.0" ]
null
null
null
great_expectations/dataset/sqlalchemy_dataset.py
lcorneliussen/great_expectations
00a94d9dd7397b726e951baf290f4b5d18101b4d
[ "Apache-2.0" ]
null
null
null
import inspect import logging import traceback import uuid import warnings from datetime import datetime from functools import wraps from typing import Dict, Iterable, List import numpy as np import pandas as pd from dateutil.parser import parse from great_expectations.data_asset import DataAsset from great_expectati...
37.610672
159
0.574602
898a60d341d4f9dc069a14dcba03ec21de0c113f
2,050
py
Python
datawarehouse/edw_migrations/versions/74dd3c263cb8_dimprogramoffices.py
bcgov/foi-reporting
25856ce87b668df964ddd16ac7459fae4aa6a7c5
[ "Apache-2.0" ]
null
null
null
datawarehouse/edw_migrations/versions/74dd3c263cb8_dimprogramoffices.py
bcgov/foi-reporting
25856ce87b668df964ddd16ac7459fae4aa6a7c5
[ "Apache-2.0" ]
3
2022-01-05T18:01:41.000Z
2022-02-08T21:51:32.000Z
datawarehouse/edw_migrations/versions/74dd3c263cb8_dimprogramoffices.py
bcgov/foi-reporting
25856ce87b668df964ddd16ac7459fae4aa6a7c5
[ "Apache-2.0" ]
null
null
null
"""dimProgramOffices Revision ID: 74dd3c263cb8 Revises: 6500637aab43 Create Date: 2022-01-26 23:52:23.698157 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '74dd3c263cb8' down_revision = '6500637aab43' branch_labels = None depends_on = None def upgrade(): ...
34.745763
61
0.709756
f3b138dc4e34d7d9bf432dec5cc5f4d51d2386bb
409
py
Python
Python/069.py
jaimeliew1/Project_Euler_Solutions
963c9c6d6571cade8f87341f97a6a2cd1af202bb
[ "MIT" ]
null
null
null
Python/069.py
jaimeliew1/Project_Euler_Solutions
963c9c6d6571cade8f87341f97a6a2cd1af202bb
[ "MIT" ]
1
2018-04-16T21:01:50.000Z
2018-04-16T21:01:50.000Z
Python/069.py
jaimeliew1/Project_Euler_Solutions
963c9c6d6571cade8f87341f97a6a2cd1af202bb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Solution to Project Euler problem 69 Author: Jaime Liew Date: May 2016 https://github.com/jaimeliew1/Project_Euler_Solutions """ from EulerFunctions import primelist def run(): n = 1000000 primes = primelist(n) i, result = 0, 1 while result*primes[i] < n: result *=...
16.36
53
0.630807
76995ef5dcca6f90d0a82c67ce458437754e7709
881
py
Python
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/iotcloudgateway/models/CloudstorageSpec.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
14
2018-04-19T09:53:56.000Z
2022-01-27T06:05:48.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/iotcloudgateway/models/CloudstorageSpec.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
15
2018-09-11T05:39:54.000Z
2021-07-02T12:38:02.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/iotcloudgateway/models/CloudstorageSpec.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
33
2018-04-20T05:29:16.000Z
2022-02-17T09:10:05.000Z
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # 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 ...
29.366667
75
0.703746
35d0b61b805672c6d8de07c8ca3c595cecb654b0
3,206
py
Python
FW/edk2-ws/edk2/CryptoPkg/Library/OpensslLib/openssl/krb5/src/tests/t_keyrollover.py
daxx-linux/edk-Lab_Material_FW
0c92b0b861e33d949a73e3be96929570e6c7ec61
[ "BSD-2-Clause" ]
1
2022-02-16T01:28:20.000Z
2022-02-16T01:28:20.000Z
FW/edk2-ws/edk2/CryptoPkg/Library/OpensslLib/openssl/krb5/src/tests/t_keyrollover.py
daxx-linux/edk-Lab_Material_FW
0c92b0b861e33d949a73e3be96929570e6c7ec61
[ "BSD-2-Clause" ]
null
null
null
FW/edk2-ws/edk2/CryptoPkg/Library/OpensslLib/openssl/krb5/src/tests/t_keyrollover.py
daxx-linux/edk-Lab_Material_FW
0c92b0b861e33d949a73e3be96929570e6c7ec61
[ "BSD-2-Clause" ]
2
2021-07-04T02:59:41.000Z
2021-07-18T08:07:16.000Z
#!/usr/bin/python from k5test import * rollover_krb5_conf = {'libdefaults': {'allow_weak_crypto': 'true'}} realm = K5Realm(krbtgt_keysalt='des-cbc-crc:normal', krb5_conf=rollover_krb5_conf) princ1 = 'host/test1@%s' % (realm.realm,) princ2 = 'host/test2@%s' % (realm.realm,) realm.addprinc(princ1) real...
38.626506
76
0.696195
1e7a441159ca922cc2fce1824a4d6d2ae3531d76
20,760
py
Python
colanderalchemy/schema.py
davidjb/ColanderAlchemy
df7224a935a2cbb5f6a8dbb28c16938d35c6236d
[ "MIT" ]
null
null
null
colanderalchemy/schema.py
davidjb/ColanderAlchemy
df7224a935a2cbb5f6a8dbb28c16938d35c6236d
[ "MIT" ]
null
null
null
colanderalchemy/schema.py
davidjb/ColanderAlchemy
df7224a935a2cbb5f6a8dbb28c16938d35c6236d
[ "MIT" ]
null
null
null
# types.py # Copyright (C) 2012 the ColanderAlchemy authors and contributors # <see AUTHORS file> # # This module is part of ColanderAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from colander import (Mapping, null, requi...
37.137746
106
0.587283
b2fc8abaa7aa4fba5abb5aa57ad3b3b16fe43b74
270
py
Python
app.py
vyahello/flask-deploy-template
ca785b8ecfcaa277755d9ec0336ab95ff82237e8
[ "MIT" ]
null
null
null
app.py
vyahello/flask-deploy-template
ca785b8ecfcaa277755d9ec0336ab95ff82237e8
[ "MIT" ]
null
null
null
app.py
vyahello/flask-deploy-template
ca785b8ecfcaa277755d9ec0336ab95ff82237e8
[ "MIT" ]
null
null
null
import flask __site = flask.Flask(__name__) @__site.route('/') def home() -> str: return flask.render_template('home.html') @__site.route('/about') def about() -> str: return flask.render_template('about.html') if __name__ == '__main__': __site.run()
15
46
0.662963
706f343368fdf2391bf3a4523bb14a2217a79393
3,605
py
Python
filer/admin/forms.py
maykinmedia/django-filer
1b7c6b16f7fb19d89f9bd9df624d2de666837b67
[ "BSD-3-Clause" ]
1
2019-04-15T10:28:46.000Z
2019-04-15T10:28:46.000Z
filer/admin/forms.py
techdragon/django-filer
085b880aa6bb738fe582a3ce40c25bd97f5bbe06
[ "BSD-3-Clause" ]
10
2015-04-08T14:16:52.000Z
2021-12-15T16:17:57.000Z
filer/admin/forms.py
techdragon/django-filer
085b880aa6bb738fe582a3ce40c25bd97f5bbe06
[ "BSD-3-Clause" ]
3
2016-12-28T03:32:44.000Z
2018-05-28T15:13:38.000Z
from django import forms from django.db import models from django.contrib.admin import widgets from filer.utils.files import get_valid_filename from django.utils.translation import ugettext as _ from django.core.exceptions import ValidationError from django.conf import settings if 'cmsplugin_filer_image' in settings....
48.066667
145
0.678225
f3a70e8256c665451f7d14aa3b3e3fc224ef4e17
277
py
Python
cacreader/swig-4.0.2/Examples/test-suite/python/python_varargs_typemap_runme.py
kyletanyag/LL-Smartcard
02abea9de5a13f8bae4d7832ab34cb7f0d9514c9
[ "BSD-3-Clause" ]
1,031
2015-01-02T14:08:47.000Z
2022-03-29T02:25:27.000Z
cacreader/swig-4.0.2/Examples/test-suite/python/python_varargs_typemap_runme.py
kyletanyag/LL-Smartcard
02abea9de5a13f8bae4d7832ab34cb7f0d9514c9
[ "BSD-3-Clause" ]
240
2015-01-11T04:27:19.000Z
2022-03-30T00:35:57.000Z
cacreader/swig-4.0.2/Examples/test-suite/python/python_varargs_typemap_runme.py
kyletanyag/LL-Smartcard
02abea9de5a13f8bae4d7832ab34cb7f0d9514c9
[ "BSD-3-Clause" ]
224
2015-01-05T06:13:54.000Z
2022-02-25T14:39:51.000Z
import python_varargs_typemap if (python_varargs_typemap.testfunc(1, 2.0, "three") != "three"): raise RuntimeError("testfunc failed!") if (python_varargs_typemap.testfunc(1, 2.0, "three", "four", "five") != "threefourfive"): raise RuntimeError("testfunc failed! {}")
34.625
89
0.707581
6258118c28c1df5d49310f34182db3e5a730d003
601
py
Python
.history/List of Capstone Projects/prime_factorization_20200516163532.py
EvanthiosPapadopoulos/Python3
ab773fd458e365c1510f98ecac65965234c881e8
[ "MIT" ]
1
2020-05-18T17:50:00.000Z
2020-05-18T17:50:00.000Z
.history/List of Capstone Projects/prime_factorization_20200516163532.py
EvanthiosPapadopoulos/Python3
ab773fd458e365c1510f98ecac65965234c881e8
[ "MIT" ]
null
null
null
.history/List of Capstone Projects/prime_factorization_20200516163532.py
EvanthiosPapadopoulos/Python3
ab773fd458e365c1510f98ecac65965234c881e8
[ "MIT" ]
null
null
null
''' Prime Factorization - Have the user enter a number and find all Prime Factors (if there are any) and display them. ''' import HeaderOfFiles def prime_factor(number): ''' Finding and display all Prime Factors ''' my_list = [] for i in range(2, number): if number%i == 0: my_l...
22.259259
114
0.584027
c63290259074f83cecb267eaf04b12a08c277200
573
py
Python
config/celery_app.py
Egor4ik325/demanage
f5fd1d2ad264f6d2dc3c95322962569dc591f30c
[ "MIT" ]
null
null
null
config/celery_app.py
Egor4ik325/demanage
f5fd1d2ad264f6d2dc3c95322962569dc591f30c
[ "MIT" ]
1
2022-03-01T11:21:05.000Z
2022-03-01T11:21:05.000Z
config/celery_app.py
Egor4ik325/demanage
f5fd1d2ad264f6d2dc3c95322962569dc591f30c
[ "MIT" ]
null
null
null
import os from celery import Celery # set the default Django settings module for the 'celery' program. os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") app = Celery("demanage") # Using a string here means the worker doesn't have to serialize # the configuration object to child processes. # -...
31.833333
72
0.78185
7e8103b0ccddb2442f14a38944cefe2df0b5f1dd
1,706
py
Python
profile_project/profile_api/migrations/0001_initial.py
Prajnasbhat/profile-rest-api
23e5fa1c0f60fc00be068f80dd33c73b7bf9183e
[ "MIT" ]
null
null
null
profile_project/profile_api/migrations/0001_initial.py
Prajnasbhat/profile-rest-api
23e5fa1c0f60fc00be068f80dd33c73b7bf9183e
[ "MIT" ]
5
2020-06-06T01:28:49.000Z
2022-02-10T11:17:41.000Z
profile_project/profile_api/migrations/0001_initial.py
Prajnasbhat/profile-rest-api
23e5fa1c0f60fc00be068f80dd33c73b7bf9183e
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2020-02-23 16:22 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='UserProfile', ...
50.176471
266
0.638921
6dadf9550fc4ed5efa77d228bbd0845fec839d62
16,296
py
Python
sdk/python/kfp/components/component_factory.py
johnmacnamararseg/pipelines
340318625c527836af1c9abc0fd0d76c0a466333
[ "Apache-2.0" ]
null
null
null
sdk/python/kfp/components/component_factory.py
johnmacnamararseg/pipelines
340318625c527836af1c9abc0fd0d76c0a466333
[ "Apache-2.0" ]
1
2020-02-06T12:53:44.000Z
2020-02-06T12:53:44.000Z
sdk/python/kfp/components/component_factory.py
johnmacnamararseg/pipelines
340318625c527836af1c9abc0fd0d76c0a466333
[ "Apache-2.0" ]
null
null
null
# Copyright 2021-2022 The Kubeflow Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
37.036364
108
0.661512
60dce09f48575bce9b4307b3956de979f47ce0dc
12,138
py
Python
dvmvs/fusionnet/run-testing-online.py
hashi0203/deep-video-mvs
b3943a9249d522dca3e6cd603e427f611cc7bad5
[ "MIT" ]
null
null
null
dvmvs/fusionnet/run-testing-online.py
hashi0203/deep-video-mvs
b3943a9249d522dca3e6cd603e427f611cc7bad5
[ "MIT" ]
null
null
null
dvmvs/fusionnet/run-testing-online.py
hashi0203/deep-video-mvs
b3943a9249d522dca3e6cd603e427f611cc7bad5
[ "MIT" ]
null
null
null
import cv2 import numpy as np import torch from path import Path from tqdm import tqdm from dvmvs.config import Config from dvmvs.dataset_loader import PreprocessImage, load_image from dvmvs.fusionnet.model import FeatureExtractor, FeatureShrinker, CostVolumeEncoder, LSTMFusion, CostVolumeDecoder from dvmvs.keyframe_b...
51.432203
149
0.550091
1234de9c3b6f1810b6112087250519dee9d7227b
612
py
Python
WebMirror/management/rss_parser_funcs/feed_parse_extractAnimeMangaTranslations.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
193
2016-08-02T22:04:35.000Z
2022-03-09T20:45:41.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractAnimeMangaTranslations.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
533
2016-08-23T20:48:23.000Z
2022-03-28T15:55:13.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractAnimeMangaTranslations.py
rrosajp/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
19
2015-08-13T18:01:08.000Z
2021-07-12T17:13:09.000Z
def extractAnimeMangaTranslations(item): """ Anime, manga, translations """ vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol or frag) or 'preview' in item['title'].lower(): return None bad = ['Read Online', 'Download', 'comic', 'Anime', 'Manga', 'R...
21.103448
74
0.616013
3cf6259d4b09604e85ef9ef4c2f6a274bc6383b7
250
py
Python
thenewboston_node/project/celery.py
olegtropinin/thenewboston-node
2de4e14ef6855646121840224a82fcfc505b213c
[ "MIT" ]
30
2021-03-05T22:08:17.000Z
2021-09-23T02:45:45.000Z
thenewboston_node/project/celery.py
olegtropinin/thenewboston-node
2de4e14ef6855646121840224a82fcfc505b213c
[ "MIT" ]
148
2021-03-05T23:37:50.000Z
2021-11-02T02:18:58.000Z
thenewboston_node/project/celery.py
olegtropinin/thenewboston-node
2de4e14ef6855646121840224a82fcfc505b213c
[ "MIT" ]
14
2021-03-05T21:58:46.000Z
2021-10-15T17:27:52.000Z
import os from celery import Celery os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'thenewboston_node.project.settings') app = Celery('thenewboston_node') app.config_from_object('django.conf:settings', namespace='CELERY') app.autodiscover_tasks()
27.777778
85
0.816
dbeb9bcc835323170e5d6fed001f0dbd3978b9bd
207
py
Python
currencyware/__init__.py
un33k/django-currencyware
1ed93a53bc5156eae3f362dabda3763161794ae8
[ "MIT" ]
null
null
null
currencyware/__init__.py
un33k/django-currencyware
1ed93a53bc5156eae3f362dabda3763161794ae8
[ "MIT" ]
null
null
null
currencyware/__init__.py
un33k/django-currencyware
1ed93a53bc5156eae3f362dabda3763161794ae8
[ "MIT" ]
null
null
null
default_app_config = 'currencyware.apps.CurrencywareConfig' __author__ = 'Val Neekman @ Neekware Inc. [@vneekman]' __description__ = "A Django application to translate currency names" __version__ = '0.1.3'
34.5
68
0.782609
ceaf539a3e50265c3cf9e39bf7e02511a22844cd
2,415
py
Python
utils/spacy/__init__.py
natsheh/sensem
6c2fff4659a1ffd39dbb737f0227ab98b2e5a185
[ "BSD-3-Clause" ]
14
2017-03-03T19:01:35.000Z
2020-10-13T15:34:38.000Z
utils/spacy/__init__.py
natsheh/sensem
6c2fff4659a1ffd39dbb737f0227ab98b2e5a185
[ "BSD-3-Clause" ]
2
2017-10-21T15:53:19.000Z
2018-04-04T14:40:12.000Z
utils/spacy/__init__.py
natsheh/sensem
6c2fff4659a1ffd39dbb737f0227ab98b2e5a185
[ "BSD-3-Clause" ]
3
2018-08-09T10:54:46.000Z
2020-12-01T08:32:37.000Z
# -*- coding: utf-8 -*- # # This file is part of sensim """Helpers for sentence semantic similarity model. .. Author:: Hussein AL-NATSHEH <hussein.al-natsheh@ish-lyon.cnrs.fr> """ """Helper functions.""" from .spacy_wrapper import spacy_organizations from .spacy_wrapper import spacy_persons from .spacy_wrapper imp...
30.1875
68
0.700207
c6a71408d4d5f9ca40e1aee6963984d03df21829
1,922
py
Python
doc/examples/usersguide/brick_stl.py
markendr/esys-escript.github.io
0023eab09cd71f830ab098cb3a468e6139191e8d
[ "Apache-2.0" ]
null
null
null
doc/examples/usersguide/brick_stl.py
markendr/esys-escript.github.io
0023eab09cd71f830ab098cb3a468e6139191e8d
[ "Apache-2.0" ]
1
2019-01-14T03:07:43.000Z
2019-01-14T03:07:43.000Z
doc/examples/usersguide/brick_stl.py
markendr/esys-escript.github.io
0023eab09cd71f830ab098cb3a468e6139191e8d
[ "Apache-2.0" ]
null
null
null
from __future__ import division ############################################################################## # # Copyright (c) 2003-2018 by The University of Queensland # http://www.uq.edu.au # # Primary Business: Queensland, Australia # Licensed under the Apache License, version 2.0 # http://www.apache.org/licenses/...
28.264706
78
0.67846
dcc491beaaac12e9349b1032d9f9ae8a6f50d918
3,664
py
Python
logdweb/django_jinja2.py
hiidef/logdweb
c80d47f4c5759cadeb3088b9f7fa093c30e11696
[ "MIT" ]
1
2015-08-30T02:36:13.000Z
2015-08-30T02:36:13.000Z
logdweb/django_jinja2.py
hiidef/logdweb
c80d47f4c5759cadeb3088b9f7fa093c30e11696
[ "MIT" ]
null
null
null
logdweb/django_jinja2.py
hiidef/logdweb
c80d47f4c5759cadeb3088b9f7fa093c30e11696
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Django jinja2 integration, inspired by: http://djangosnippets.org/snippets/1061/ """ from datetime import datetime from logdweb import settings, util from jinja2 import FileSystemLoader, FileSystemBytecodeCache, Environment, \ PackageLoader, ChoiceLoader fr...
34.566038
111
0.706605
81ffdbdcba471ca35dbffae33895c344e9c9bf6c
60,972
py
Python
src/nevow/test/test_athena.py
winjer/squeal
20401986e0d1698776f5b482b28e14c57b11833c
[ "Apache-2.0" ]
2
2015-01-30T10:22:12.000Z
2015-11-05T15:37:23.000Z
src/nevow/test/test_athena.py
winjer/squeal
20401986e0d1698776f5b482b28e14c57b11833c
[ "Apache-2.0" ]
null
null
null
src/nevow/test/test_athena.py
winjer/squeal
20401986e0d1698776f5b482b28e14c57b11833c
[ "Apache-2.0" ]
null
null
null
import os, sets from itertools import izip from xml.dom.minidom import parseString from twisted.trial import unittest from twisted.python import util from twisted.internet.defer import Deferred from twisted.application.service import IServiceMaker from twisted.application.internet import TCPServer from twisted.python...
33.779501
110
0.626812
264b7f89559d3e950d8bb460bcb8a65baf009ab3
27,293
py
Python
tests/models/luke/test_modeling_luke.py
shangz-ai/transformers
75259b44bf2e2b98b5a4d431fb400b7190342a01
[ "Apache-2.0" ]
5
2020-09-01T09:15:48.000Z
2020-09-15T03:25:05.000Z
tests/models/luke/test_modeling_luke.py
shangz-ai/transformers
75259b44bf2e2b98b5a4d431fb400b7190342a01
[ "Apache-2.0" ]
null
null
null
tests/models/luke/test_modeling_luke.py
shangz-ai/transformers
75259b44bf2e2b98b5a4d431fb400b7190342a01
[ "Apache-2.0" ]
3
2020-08-20T04:46:25.000Z
2020-10-14T08:39:13.000Z
# coding=utf-8 # Copyright 2021 The HuggingFace Inc. team. 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 r...
39.101719
118
0.670245
2e4b480115c829fcbf4f667202a38dbc2c0273df
14,550
py
Python
kubernetes_asyncio/client/models/v1beta1_storage_class.py
icamposrivera/kubernetes_asyncio
f028cc793e3a2c519be6a52a49fb77ff0b014c9b
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1beta1_storage_class.py
icamposrivera/kubernetes_asyncio
f028cc793e3a2c519be6a52a49fb77ff0b014c9b
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1beta1_storage_class.py
icamposrivera/kubernetes_asyncio
f028cc793e3a2c519be6a52a49fb77ff0b014c9b
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.19.15 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six f...
38.903743
321
0.67079
eb7010698508988dc184c6076b22253f156f6733
3,175
py
Python
res_mlp/core.py
jaketae/res-mlp
6c957e4fe67a2f13d9b4fd3fa36b7eddcf5323fd
[ "MIT" ]
null
null
null
res_mlp/core.py
jaketae/res-mlp
6c957e4fe67a2f13d9b4fd3fa36b7eddcf5323fd
[ "MIT" ]
null
null
null
res_mlp/core.py
jaketae/res-mlp
6c957e4fe67a2f13d9b4fd3fa36b7eddcf5323fd
[ "MIT" ]
null
null
null
import torch from torch import nn from torch.nn import functional as F class AffineTransform(nn.Module): def __init__(self, num_features): super().__init__() self.alpha = nn.Parameter(torch.ones(1, 1, num_features)) self.beta = nn.Parameter(torch.zeros(1, 1, num_features)) def forward...
29.95283
80
0.620157
f3ab80f8c3ad49a40b44b66e26dd3c47485dc772
10,189
py
Python
meiduoshop/apps/user/views.py
1572990942/meiduoshop
64f4fe04fbcec8ceecf9fa0ce24afe41388f6926
[ "MIT" ]
null
null
null
meiduoshop/apps/user/views.py
1572990942/meiduoshop
64f4fe04fbcec8ceecf9fa0ce24afe41388f6926
[ "MIT" ]
null
null
null
meiduoshop/apps/user/views.py
1572990942/meiduoshop
64f4fe04fbcec8ceecf9fa0ce24afe41388f6926
[ "MIT" ]
null
null
null
import json import logging import re import jwt from QQLoginTool.QQtool import OAuthQQ from django.conf import settings from django.contrib.auth import login, authenticate, logout from django.contrib.auth.decorators import login_required from django.core.cache import caches from django.http import HttpRequest, JsonRes...
35.378472
158
0.600451
dfcf1816b7b9b25f969db88188d589b900a279f8
5,717
py
Python
homeassistant/components/switch/scsgate.py
dotlambda/home-assistant
68d2851ecf2dcd05bd5197240a31980d4fee8d2e
[ "Apache-2.0" ]
1
2019-02-15T00:07:18.000Z
2019-02-15T00:07:18.000Z
homeassistant/components/switch/scsgate.py
dotlambda/home-assistant
68d2851ecf2dcd05bd5197240a31980d4fee8d2e
[ "Apache-2.0" ]
5
2022-03-01T06:31:03.000Z
2022-03-31T07:20:45.000Z
homeassistant/components/switch/scsgate.py
dotlambda/home-assistant
68d2851ecf2dcd05bd5197240a31980d4fee8d2e
[ "Apache-2.0" ]
1
2019-12-06T21:18:54.000Z
2019-12-06T21:18:54.000Z
""" Support for SCSGate switches. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/switch.scsgate/ """ import logging import voluptuous as vol import homeassistant.components.scsgate as scsgate from homeassistant.components.switch import (SwitchDevice, P...
28.873737
78
0.641245
d31055cac80a98fe6992054f443ae04c2e091ada
730
py
Python
ledDrop.py
scivision/power-harvesting-voltage-multiplier
ff592e87a641a4e7221f4ab3d9505f7c8f5a7d16
[ "MIT" ]
1
2022-03-24T22:32:22.000Z
2022-03-24T22:32:22.000Z
ledDrop.py
scivision/power-harvesting-voltage-multiplier
ff592e87a641a4e7221f4ab3d9505f7c8f5a7d16
[ "MIT" ]
null
null
null
ledDrop.py
scivision/power-harvesting-voltage-multiplier
ff592e87a641a4e7221f4ab3d9505f7c8f5a7d16
[ "MIT" ]
null
null
null
#!/usr/bin/env python import pandas import io import subprocess from matplotlib.pyplot import figure, show from scipy.interpolate import interp1d # %% brightness from XHP50 datasheet B = [.2, .4, .6, .8, 1, 1.2] I = [.1, .25, .4, .55, .7, .85] f = interp1d(I, B, 'cubic') # %% run sim ret = subprocess.check_output( ...
24.333333
77
0.652055
b22d06af55ec0adcde92f9e2ccc2ce4041d5ddb9
1,258
py
Python
applications/airflow/dags/kubernetes_operator.py
sjorsvanderleeuwen/dsri-documentation
8864c5fa88dede65a4a6b5fa7a857417b48d2580
[ "CC-BY-4.0" ]
14
2019-09-27T16:18:19.000Z
2022-02-01T16:14:12.000Z
applications/airflow/dags/kubernetes_operator.py
sjorsvanderleeuwen/dsri-documentation
8864c5fa88dede65a4a6b5fa7a857417b48d2580
[ "CC-BY-4.0" ]
32
2019-10-23T08:53:51.000Z
2022-03-25T09:17:01.000Z
applications/airflow/dags/kubernetes_operator.py
sjorsvanderleeuwen/dsri-documentation
8864c5fa88dede65a4a6b5fa7a857417b48d2580
[ "CC-BY-4.0" ]
8
2019-09-28T20:43:58.000Z
2021-12-02T13:01:55.000Z
from airflow import DAG from datetime import datetime, timedelta from airflow.contrib.operators.kubernetes_pod_operator import KubernetesPodOperator from airflow.operators.dummy_operator import DummyOperator default_args = { 'owner': 'airflow', 'depends_on_past': False, 'start_date': datetime.utcnow(), ...
24.192308
83
0.683625
f01a719d4406c1705293e3dd8f0f5695ee44f426
2,747
py
Python
Finals Practice/9.py
ikramulkayes/Python_season2
d057460d07c5d2d218ecd52e08c1d355add44df2
[ "MIT" ]
null
null
null
Finals Practice/9.py
ikramulkayes/Python_season2
d057460d07c5d2d218ecd52e08c1d355add44df2
[ "MIT" ]
null
null
null
Finals Practice/9.py
ikramulkayes/Python_season2
d057460d07c5d2d218ecd52e08c1d355add44df2
[ "MIT" ]
null
null
null
class Squad: playerCount=0 def __init__(self,name,squadType): self.name = name self.squadType = squadType def formSquad(self): if Squad.playerCount >= 5: return True else: return False def __str__(self): s = f"{self.name} is a {self.squadTy...
32.702381
88
0.470695
5398f7925424dc1cb2ec59a83056ba6f4a7aa292
11,360
py
Python
exps/algos/BOHB.py
EM-AutoML/AutoDL-Projects
8ff416fe5d6cb1b310b885fe376e6f2790fbda14
[ "MIT" ]
1
2020-05-08T08:58:28.000Z
2020-05-08T08:58:28.000Z
exps/algos/BOHB.py
EM-AutoML/AutoDL-Projects
8ff416fe5d6cb1b310b885fe376e6f2790fbda14
[ "MIT" ]
null
null
null
exps/algos/BOHB.py
EM-AutoML/AutoDL-Projects
8ff416fe5d6cb1b310b885fe376e6f2790fbda14
[ "MIT" ]
2
2020-05-08T09:14:36.000Z
2020-09-28T06:59:30.000Z
################################################## # Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2020 # ################################################################### # BOHB: Robust and Efficient Hyperparameter Optimization at Scale # # required to install hpbandster ################################## # bash ./scrip...
48.755365
200
0.678961
a0289cfd55923cc918fde110f6edd5429f055e3a
212
py
Python
tcai_AtBSwPython/lists.py
CailleauThierry/tcai_AtBSwPython
e576c5c4e274db3f46ed0c4d559084b5c9b199bf
[ "Apache-2.0" ]
null
null
null
tcai_AtBSwPython/lists.py
CailleauThierry/tcai_AtBSwPython
e576c5c4e274db3f46ed0c4d559084b5c9b199bf
[ "Apache-2.0" ]
null
null
null
tcai_AtBSwPython/lists.py
CailleauThierry/tcai_AtBSwPython
e576c5c4e274db3f46ed0c4d559084b5c9b199bf
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: 06_lists.ipynb (unless otherwise specified). __all__ = ['spam'] # Cell # ['cat','bat','rat','elephant'] spam = ['cat','bat','rat','elephant'] spam print(spam) spam[0]
21.2
88
0.660377
21521d51e2a1192355fce836292fca35560334a0
2,067
py
Python
MLibrary/classification.py
imis-lab/book-chapter
8260a60ec91dd29616eeed80f34bdea00fb73cd7
[ "MIT" ]
null
null
null
MLibrary/classification.py
imis-lab/book-chapter
8260a60ec91dd29616eeed80f34bdea00fb73cd7
[ "MIT" ]
null
null
null
MLibrary/classification.py
imis-lab/book-chapter
8260a60ec91dd29616eeed80f34bdea00fb73cd7
[ "MIT" ]
null
null
null
from sklearn.linear_model import LogisticRegression from sklearn.naive_bayes import MultinomialNB from sklearn.neighbors import KNeighborsClassifier from sklearn.svm import LinearSVC from sklearn.tree import DecisionTreeClassifier class ClassifierGenerator: """Widely-used text classifiers. """ def naive_...
34.45
114
0.688437
a3b31e6f82645684a07c77b70b1a27b8dbb10e7e
2,100
py
Python
zomboid/scripting/objects/sound.py
FWolfe/pyZomboid
4ee0e113321cb50d860762cdef2e88bd504c20d0
[ "MIT" ]
1
2021-04-24T01:46:16.000Z
2021-04-24T01:46:16.000Z
zomboid/scripting/objects/sound.py
FWolfe/pyZomboid
4ee0e113321cb50d860762cdef2e88bd504c20d0
[ "MIT" ]
null
null
null
zomboid/scripting/objects/sound.py
FWolfe/pyZomboid
4ee0e113321cb50d860762cdef2e88bd504c20d0
[ "MIT" ]
1
2021-04-24T01:46:19.000Z
2021-04-24T01:46:19.000Z
# -*- coding: utf-8 -*- from zomboid.audio.sound import GameSound, MasterVolume, GameSoundClip from .base import BaseScriptObject from ..parser import ScriptParser, Block class GameSoundScript(BaseScriptObject): gameSound : GameSound = None def __init__(self): self.gameSound = GameSound() d...
30
77
0.538095
94cd07c85c308dffea4cd8812b61ccdb4cbfe785
932
py
Python
0404 Linked List Union.py
ansabgillani/binarysearchcomproblems
12fe8632f8cbb5058c91a55bae53afa813a3247e
[ "MIT" ]
1
2020-12-29T21:17:26.000Z
2020-12-29T21:17:26.000Z
0404 Linked List Union.py
ansabgillani/binarysearchcomproblems
12fe8632f8cbb5058c91a55bae53afa813a3247e
[ "MIT" ]
null
null
null
0404 Linked List Union.py
ansabgillani/binarysearchcomproblems
12fe8632f8cbb5058c91a55bae53afa813a3247e
[ "MIT" ]
4
2021-09-09T17:42:43.000Z
2022-03-18T04:54:03.000Z
# class LLNode: # def __init__(self, val, next=None): # self.val = val # self.next = next class Solution: def solve(self, ll0, ll1): ans = LLNode(None) cur = ans while ll0 and ll1: if ll0.val < ll1.val: if ll0.val != cur.val: ...
25.888889
46
0.409871
6122707d1becb62e809d1cc05bc0af78a65488cd
1,608
py
Python
banditMachine/banditArm.py
arielbarreiros96/nArmedBanditProblem
af76455ac17f1f57cce57dc56713f7af133b4021
[ "MIT" ]
1
2021-03-25T03:03:16.000Z
2021-03-25T03:03:16.000Z
banditMachine/banditArm.py
arielbarreiros96/nArmedBanditProblem
af76455ac17f1f57cce57dc56713f7af133b4021
[ "MIT" ]
null
null
null
banditMachine/banditArm.py
arielbarreiros96/nArmedBanditProblem
af76455ac17f1f57cce57dc56713f7af133b4021
[ "MIT" ]
null
null
null
import numpy as np import random as rnd __author__ = "Ariel Barreiros and Richar Sosa" __status__ = "Development" class BanditArm: """ La clase BanditArm reproduce el comportamiento de un brazo de una máquina tragaperras. Y almacena el conjunto de recompensas que este brazo ha entregado """ def...
28.210526
116
0.639925
973ce3c09ea01a972981c1650e62c3daa415a510
2,384
py
Python
website/snat/views.py
vincent1016/FlexGW-1
16f7ffe7b261bddebc96c0f87ff0c62dc22157dc
[ "BSD-3-Clause" ]
1
2021-11-08T12:23:37.000Z
2021-11-08T12:23:37.000Z
website/snat/views.py
vincent1016/FlexGW2.0
16f7ffe7b261bddebc96c0f87ff0c62dc22157dc
[ "BSD-3-Clause" ]
null
null
null
website/snat/views.py
vincent1016/FlexGW2.0
16f7ffe7b261bddebc96c0f87ff0c62dc22157dc
[ "BSD-3-Clause" ]
1
2022-03-03T14:27:30.000Z
2022-03-03T14:27:30.000Z
# -*- coding: utf-8 -*- """ website.snat.views ~~~~~~~~~~~~~~~~~~ vpn views: /snat """ from flask import Blueprint, render_template from flask import url_for, redirect, flash from flask import request from flask.ext.login import login_required from flask.ext.babel import gettext from website im...
31.786667
132
0.663171
3ccb3c954ee97e82d1b7e489c5ffb9f929818094
3,277
py
Python
ColoreRegioni/__init__.py
MCilento93/ColoriRegioni
cd20344c083c1ed8a6c1301593823e8f2d1973bf
[ "MIT" ]
7
2021-01-08T16:43:52.000Z
2021-03-01T21:30:54.000Z
ColoreRegioni/__init__.py
MCilento93/ColoriRegioni
cd20344c083c1ed8a6c1301593823e8f2d1973bf
[ "MIT" ]
3
2021-01-29T12:00:38.000Z
2021-03-10T08:33:27.000Z
ColoreRegioni/__init__.py
MCilento93/ColoriRegioni
cd20344c083c1ed8a6c1301593823e8f2d1973bf
[ "MIT" ]
1
2022-02-06T20:54:24.000Z
2022-02-06T20:54:24.000Z
# -*- coding: utf-8 -*- """ Created on Mon Dec 7 20:31:58 2020 @author: mario """ from bs4 import BeautifulSoup as Soup import requests class ColoreRegioni(): url='http://www.governo.it/it/articolo/domande-frequenti-sulle-misure-adottate-dal-governo/15638?gclid=CjwKCAiAwrf-BRA9EiwAUWwKXicC1bzopYynHP9pvRxHUza7A...
32.127451
199
0.545621
8c7b4b520bbff6d4f1c3ae96101502fdd9c8fb32
6,395
py
Python
asposewordscloud/models/requests/delete_form_field_request.py
aspose-words-cloud/aspose-words-cloud-python
65c7b55fa4aac69b60d41e7f54aed231df285479
[ "MIT" ]
14
2018-07-15T17:01:52.000Z
2018-11-29T06:15:33.000Z
asposewordscloud/models/requests/delete_form_field_request.py
aspose-words-cloud/aspose-words-cloud-python
65c7b55fa4aac69b60d41e7f54aed231df285479
[ "MIT" ]
1
2018-09-28T12:59:34.000Z
2019-10-08T08:42:59.000Z
asposewordscloud/models/requests/delete_form_field_request.py
aspose-words-cloud/aspose-words-cloud-python
65c7b55fa4aac69b60d41e7f54aed231df285479
[ "MIT" ]
2
2020-12-21T07:59:17.000Z
2022-02-16T21:41:25.000Z
# coding: utf-8 # ----------------------------------------------------------------------------------- # <copyright company="Aspose" file="delete_form_field_request.py"> # Copyright (c) 2021 Aspose.Words for Cloud # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtaining a co...
46.678832
255
0.651759
a5685dd4288fcd2b43d57449dd13b0b19d19de2c
609
py
Python
lib/galaxy/job_metrics/collectl/stats.py
beatrizserrano/galaxy
e149d9d32e1bca6c07c38b1a9cdabfee60323610
[ "CC-BY-3.0" ]
null
null
null
lib/galaxy/job_metrics/collectl/stats.py
beatrizserrano/galaxy
e149d9d32e1bca6c07c38b1a9cdabfee60323610
[ "CC-BY-3.0" ]
2
2017-05-18T16:12:55.000Z
2022-03-08T12:08:43.000Z
lib/galaxy/job_metrics/collectl/stats.py
beatrizserrano/galaxy
e149d9d32e1bca6c07c38b1a9cdabfee60323610
[ "CC-BY-3.0" ]
null
null
null
""" Primitive module for tracking running statistics without storing values in memory. """ class StatisticsTracker: def __init__(self): self.min = None self.max = None self.count = 0 self.sum = 0 def track(self, value): if self.min is None or value < self.min: ...
22.555556
78
0.550082
500535be6b9a195034a2774a7cbb1f1ca13f417c
4,708
py
Python
TSP_rawcord.py
Saurabhbhati/pointer-networks-experiments
2b51d5088f9e106441813d53d6a02f6631b6d368
[ "BSD-2-Clause" ]
null
null
null
TSP_rawcord.py
Saurabhbhati/pointer-networks-experiments
2b51d5088f9e106441813d53d6a02f6631b6d368
[ "BSD-2-Clause" ]
null
null
null
TSP_rawcord.py
Saurabhbhati/pointer-networks-experiments
2b51d5088f9e106441813d53d6a02f6631b6d368
[ "BSD-2-Clause" ]
null
null
null
# Pointer network for TSP # uses raw coordinates as inputs import numpy as np from keras.models import Model from keras.layers import LSTM, Input, Dense,Bidirectional, TimeDistributed, Conv1D from keras.utils.np_utils import to_categorical from PointerLSTM import PointerLSTM from keras.callbacks import ModelCheckpoin...
32.246575
112
0.706882
e44d6a3a411826df973334195a721a3f977409ad
2,963
py
Python
ncp/scripts/generate_toy_plots.py
pierresegonne/ncp
2decbf7dbf2125353be6f5f030c5bce12beadefd
[ "Apache-2.0" ]
null
null
null
ncp/scripts/generate_toy_plots.py
pierresegonne/ncp
2decbf7dbf2125353be6f5f030c5bce12beadefd
[ "Apache-2.0" ]
null
null
null
ncp/scripts/generate_toy_plots.py
pierresegonne/ncp
2decbf7dbf2125353be6f5f030c5bce12beadefd
[ "Apache-2.0" ]
null
null
null
import pathlib import matplotlib.pyplot as plt import numpy as np from ncp import datasets plt.rcParams.update( { "text.usetex": True, } ) def dewhiten_x(x): return x * 3.0126251862413524 + 5.04480454393157 def dewhiten_y(y): return y * 4.147721555561024 + 0.864837661287082 def data_mea...
25.324786
84
0.591968
8aa6215af2b20fedf4748b9daf944b4de79f1592
7,702
py
Python
models/RanGer.py
Culturenotes/Network-Slimming
9004ab4c1f6bcbf8f317a37984ed3f8db39ecbe2
[ "Apache-2.0" ]
12
2020-10-03T14:32:01.000Z
2021-12-16T09:13:04.000Z
models/RanGer.py
Culturenotes/Network-Slimming
9004ab4c1f6bcbf8f317a37984ed3f8db39ecbe2
[ "Apache-2.0" ]
null
null
null
models/RanGer.py
Culturenotes/Network-Slimming
9004ab4c1f6bcbf8f317a37984ed3f8db39ecbe2
[ "Apache-2.0" ]
null
null
null
import math import torch from torch.optim.optimizer import Optimizer def centralized_gradient(x, use_gc=True, gc_conv_only=False): if use_gc: if gc_conv_only: if len(list(x.size())) > 3: x.add_(-x.mean(dim=tuple(range(1, len(list(x.size())))), keepdim=True)) els...
42.318681
133
0.513373
78af01d5b09ddc07832260477247ed90cc310016
2,812
py
Python
core/helpers/app_manager.py
echim/pySteps
c33ac3446593b545aece475062d140527dcb443c
[ "MIT" ]
8
2018-05-15T21:20:40.000Z
2021-08-19T00:25:18.000Z
core/helpers/app_manager.py
echim/pySteps
c33ac3446593b545aece475062d140527dcb443c
[ "MIT" ]
null
null
null
core/helpers/app_manager.py
echim/pySteps
c33ac3446593b545aece475062d140527dcb443c
[ "MIT" ]
2
2018-09-12T01:33:54.000Z
2021-01-25T02:21:58.000Z
import os import subprocess from core.default_settings import DefaultSettings from core.helpers.app_details import AppDetails from core.helpers.os_helpers import get_app_full_name from core.helpers.os_helpers import platform_is_linux, platform_is_windows, platform_is_darwin from core.helpers.webdriver_helpers import g...
35.15
120
0.651849
38d6ecb9931bae41d657dcc6de23f97ac077bbae
24,890
py
Python
ch_pipeline/core/dataquery.py
chime-experiment/ch_pipeline
e09539f18cbe4cfafe05c362a5e3c1a19f32d5e6
[ "MIT" ]
1
2022-01-24T23:22:47.000Z
2022-01-24T23:22:47.000Z
ch_pipeline/core/dataquery.py
chime-experiment/ch_pipeline
e09539f18cbe4cfafe05c362a5e3c1a19f32d5e6
[ "MIT" ]
19
2021-01-23T02:01:21.000Z
2022-02-18T22:34:22.000Z
ch_pipeline/core/dataquery.py
chime-experiment/ch_pipeline
e09539f18cbe4cfafe05c362a5e3c1a19f32d5e6
[ "MIT" ]
null
null
null
""" Dataset Specification Lookup information from the database about the data, particularly which files are contained in a specific dataset (defined by a `run` global flag) and what each correlator input is connected to. Dataspec Format =============== .. deprecated:: pass1 Use `run` global flag instead. A data...
33.726287
90
0.60675
4f111dca95ac4737729bfd91fdf965e2f3b2429b
5,530
py
Python
src/illumidesk/authenticators/validator.py
1kastner/illumidesk
d4b3a6b964d7cf9f705ff70513491247e01e701f
[ "MIT" ]
null
null
null
src/illumidesk/authenticators/validator.py
1kastner/illumidesk
d4b3a6b964d7cf9f705ff70513491247e01e701f
[ "MIT" ]
1
2020-04-24T16:58:52.000Z
2020-04-24T16:58:52.000Z
src/illumidesk/authenticators/validator.py
netoisc/illumidesk
41b99594ac576247f3432b750157c6384b93bc47
[ "MIT" ]
null
null
null
import os import sys import time from collections import OrderedDict from jupyterhub.utils import url_path_join from ltiauthenticator import LTILaunchValidator from oauthlib.oauth1 import RequestValidator from oauthlib.oauth1.rfc5849 import signature from tornado.auth import OAuthMixin from tornado.web import HTTP...
38.943662
105
0.643761
00075af5c869be044adb79c87e6b367072672348
2,700
py
Python
jatek_fuggvenyek.py
SzanSzabolcs/my-first-github-repo
9e9299a2fe7bf927b4cde3a60883a875a9a0ec7c
[ "MIT" ]
null
null
null
jatek_fuggvenyek.py
SzanSzabolcs/my-first-github-repo
9e9299a2fe7bf927b4cde3a60883a875a9a0ec7c
[ "MIT" ]
1
2019-05-29T09:45:59.000Z
2019-05-29T09:45:59.000Z
jatek_fuggvenyek.py
SzanSzabolcs/my-first-github-repo
9e9299a2fe7bf927b4cde3a60883a875a9a0ec7c
[ "MIT" ]
null
null
null
from enum import Enum from random import randint #----------------------------------------------------------------- # Függvény definíciók # ----------------------------------------------------------------- def sorsol(): targyak = ["balta", "páncél", "pajzs", "láda", "kard", "sisak"] index = randint(0, ...
23.684211
71
0.494074
c59860387b15a9707e6afb50d85c2658d30a75d6
3,270
py
Python
research/cv/resnet50_adv_pruning/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/resnet50_adv_pruning/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/resnet50_adv_pruning/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
37.586207
102
0.662385
cebfebd42ae8f85815cabe968789716951c1fa4e
12,646
py
Python
venv/lib/python3.8/site-packages/plotly/validators/_treemap.py
SvtFilatov/soccer-predict-prices
b003ebd7c3657688790183ef7d719c42290c11b9
[ "MIT" ]
10
2021-05-31T07:18:08.000Z
2022-03-19T09:20:11.000Z
venv/lib/python3.8/site-packages/plotly/validators/_treemap.py
SvtFilatov/soccer-predict-prices
b003ebd7c3657688790183ef7d719c42290c11b9
[ "MIT" ]
1
2021-08-03T12:23:01.000Z
2021-08-10T08:35:22.000Z
venv/lib/python3.8/site-packages/plotly/validators/_treemap.py
SvtFilatov/soccer-predict-prices
b003ebd7c3657688790183ef7d719c42290c11b9
[ "MIT" ]
3
2021-01-31T16:40:52.000Z
2021-08-29T18:32:34.000Z
import _plotly_utils.basevalidators class TreemapValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="treemap", parent_name="", **kwargs): super(TreemapValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, dat...
48.638462
72
0.546022
47d4df3eb76f1f3671923db0847c6cf1b4130862
4,081
py
Python
tests/unit_tests/test_lm/test_base.py
radical-cybertools/radical.pilot
4ce3efbf3e2f045b5c48fb848e9f65f9f5ea17e9
[ "MIT" ]
47
2015-03-16T01:08:11.000Z
2022-02-02T10:36:39.000Z
tests/unit_tests/test_lm/test_base.py
radical-cybertools/radical.pilot
4ce3efbf3e2f045b5c48fb848e9f65f9f5ea17e9
[ "MIT" ]
1,856
2015-01-02T09:32:20.000Z
2022-03-31T21:45:06.000Z
tests/unit_tests/test_lm/test_base.py
radical-cybertools/radical.pilot
4ce3efbf3e2f045b5c48fb848e9f65f9f5ea17e9
[ "MIT" ]
28
2015-06-10T18:15:14.000Z
2021-11-07T04:36:45.000Z
# pylint: disable=protected-access,unused-argument,no-value-for-parameter,abstract-method import radical.utils as ru from unittest import mock, TestCase from radical.pilot.agent.launch_method.base import LaunchMethod # ------------------------------------------------------------------------------ # class TestBaseL...
36.4375
89
0.558197
1013b6b94846bacf56a7423d89e4213644942717
13,953
py
Python
rewriter/decode.py
yangon99/unified-summarization
3727a52e91d07061e494ad3ae2178e9e86c73029
[ "MIT" ]
1
2021-05-30T12:05:53.000Z
2021-05-30T12:05:53.000Z
rewriter/decode.py
Li-Ming-Fan/unified-summarization
80d9894c0142a3da3e81d61ab509c37ba15f82ec
[ "MIT" ]
null
null
null
rewriter/decode.py
Li-Ming-Fan/unified-summarization
80d9894c0142a3da3e81d61ab509c37ba15f82ec
[ "MIT" ]
null
null
null
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # Modifications Copyright 2017 Abigail See # # 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...
45.747541
222
0.693113
d08d70344f23d52660daf2b629641dc6392b6da1
784
py
Python
docker_plugin_api/IpamDriverEntities.py
jacekkow/docker-plugin-api
86701d02d0f166c753ce631f2ac8fe14e4ff49dc
[ "BSD-3-Clause" ]
null
null
null
docker_plugin_api/IpamDriverEntities.py
jacekkow/docker-plugin-api
86701d02d0f166c753ce631f2ac8fe14e4ff49dc
[ "BSD-3-Clause" ]
null
null
null
docker_plugin_api/IpamDriverEntities.py
jacekkow/docker-plugin-api
86701d02d0f166c753ce631f2ac8fe14e4ff49dc
[ "BSD-3-Clause" ]
null
null
null
class RequestPoolEntity: def __init__(self, AddressSpace: str, Pool: str = None, SubPool: str = None, Options: dict = None, V6: bool = None): self.AddressSpace = AddressSpace self.Pool = Pool self.SubPool = SubPool self.Options = {} if Options is None else Options self.V6 = V...
30.153846
120
0.649235
04dc513263a78376774ac8ad09ca34722f8467fe
9,538
py
Python
pubnub/endpoints/endpoint.py
KaizenAPI/python
a7be2b25c9574075cfe717382dfe5ced5280f77f
[ "MIT" ]
1
2020-12-30T09:30:23.000Z
2020-12-30T09:30:23.000Z
blockchain-env/Lib/site-packages/pubnub/endpoints/endpoint.py
zarif007/Block-Chain-Web-App
40bd4d8d8ce1f6de2840792290bf022d7dfacbb4
[ "MIT" ]
null
null
null
blockchain-env/Lib/site-packages/pubnub/endpoints/endpoint.py
zarif007/Block-Chain-Web-App
40bd4d8d8ce1f6de2840792290bf022d7dfacbb4
[ "MIT" ]
null
null
null
from abc import ABCMeta, abstractmethod import logging from pubnub import utils from pubnub.enums import PNStatusCategory from pubnub.errors import ( PNERR_SUBSCRIBE_KEY_MISSING, PNERR_PUBLISH_KEY_MISSING, PNERR_CHANNEL_OR_GROUP_MISSING, PNERR_SECRET_KEY_MISSING, PNERR_CHANNEL_MISSING, PNERR_FILE_OBJECT_MISSI...
33.00346
107
0.653491
cf2331f9917844d677d171969ab9d5986b849183
8,100
py
Python
workloads/imagenet/imagenet_jax/workload.py
Rajathbharadwaj/algorithmic-efficiency
47d2928836e0574bc54cc3ad58860dd4daf86cce
[ "Apache-2.0" ]
49
2021-03-04T19:37:24.000Z
2022-03-28T23:05:06.000Z
workloads/imagenet/imagenet_jax/workload.py
Rajathbharadwaj/algorithmic-efficiency
47d2928836e0574bc54cc3ad58860dd4daf86cce
[ "Apache-2.0" ]
62
2021-03-03T19:46:00.000Z
2022-03-30T14:15:35.000Z
workloads/imagenet/imagenet_jax/workload.py
Rajathbharadwaj/algorithmic-efficiency
47d2928836e0574bc54cc3ad58860dd4daf86cce
[ "Apache-2.0" ]
11
2021-03-03T19:43:44.000Z
2022-02-18T14:46:45.000Z
"""ImageNet workload implemented in Jax. python3 submission_runner.py \ --workload=imagenet_jax \ --submission_path=workloads/imagenet/imagenet_jax/submission.py \ --num_tuning_trials=1 """ import functools from typing import Tuple import optax import tensorflow as tf # Hide any GPUs form TensorFlow. Othe...
30.337079
88
0.678148
fa0a6f8a1cd3c1a7fa52ea01cb51473c928ee2a3
3,735
py
Python
umap/tests/test_umap_ops.py
cjweir/umap
60d6b7be30e5d9c40746dcf6052bec09478942b6
[ "BSD-3-Clause" ]
2
2020-04-23T14:07:52.000Z
2020-04-27T14:34:19.000Z
umap/tests/test_umap_ops.py
cjweir/umap
60d6b7be30e5d9c40746dcf6052bec09478942b6
[ "BSD-3-Clause" ]
null
null
null
umap/tests/test_umap_ops.py
cjweir/umap
60d6b7be30e5d9c40746dcf6052bec09478942b6
[ "BSD-3-Clause" ]
1
2021-01-12T08:07:03.000Z
2021-01-12T08:07:03.000Z
# =================================================== # UMAP Fit and Transform Operations Test cases # (not really fitting anywhere else) # =================================================== from sklearn.datasets import make_blobs from sklearn.cluster import KMeans from sklearn.metrics import adjusted_rand_score fr...
32.478261
84
0.674431
20487ec8a56148d10391484016a8c173799c42c3
352
py
Python
setup.py
rickie/hopla
24a422194e42c03d5877dc167b2b07147326a595
[ "Apache-2.0" ]
null
null
null
setup.py
rickie/hopla
24a422194e42c03d5877dc167b2b07147326a595
[ "Apache-2.0" ]
null
null
null
setup.py
rickie/hopla
24a422194e42c03d5877dc167b2b07147326a595
[ "Apache-2.0" ]
null
null
null
""" Module used for building hopla. [quote](https://setuptools.readthedocs.io/en/latest/setuptools.html): As PEP 517 is new, support is not universal, and frontends that do support it may still have bugs. For compatibility, you may want to put a setup.py file containing only a setuptools.setup() invocation. """ import...
29.333333
69
0.772727
49a04930c6114bd68ee8546b56176ba6df51046f
1,186
bzl
Python
ubuntu1804/revisions.bzl
Khungruk/base-images-docker
652dc4752a7b75ac8217d0c6b4352fb6ea160dcb
[ "Apache-2.0" ]
null
null
null
ubuntu1804/revisions.bzl
Khungruk/base-images-docker
652dc4752a7b75ac8217d0c6b4352fb6ea160dcb
[ "Apache-2.0" ]
null
null
null
ubuntu1804/revisions.bzl
Khungruk/base-images-docker
652dc4752a7b75ac8217d0c6b4352fb6ea160dcb
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
37.0625
98
0.779933
f9230ab26d9636143ab4b67367d7e9e7f654f57e
1,686
py
Python
tests/test_egg.py
MJKirk/dynesty
747a6eb9557b1a24b6164887a7d45c0b8fa3eb1f
[ "MIT" ]
null
null
null
tests/test_egg.py
MJKirk/dynesty
747a6eb9557b1a24b6164887a7d45c0b8fa3eb1f
[ "MIT" ]
null
null
null
tests/test_egg.py
MJKirk/dynesty
747a6eb9557b1a24b6164887a7d45c0b8fa3eb1f
[ "MIT" ]
null
null
null
import numpy as np import matplotlib matplotlib.use('Agg') import dynesty # noqa """ Run a series of basic tests of the 2d eggbox """ # seed the random number generator np.random.seed(5647) nlive = 1000 printing = False # EGGBOX # see 1306.2144 def loglike_egg(x): logl = ((2 + np.cos(x[0] / 2) * np.cos(x[1] ...
28.576271
63
0.507117
af2932e3f50c70da0b6662126e0ec9f01f2573df
2,499
py
Python
marathon/util.py
criteo-forks/marathon-python
1850734b5b916d1455416833f0aed239b308dd9f
[ "MIT" ]
202
2015-01-07T06:55:14.000Z
2021-11-30T12:05:50.000Z
marathon/util.py
criteo-forks/marathon-python
1850734b5b916d1455416833f0aed239b308dd9f
[ "MIT" ]
213
2015-03-04T12:54:09.000Z
2022-02-28T11:36:28.000Z
marathon/util.py
criteo-forks/marathon-python
1850734b5b916d1455416833f0aed239b308dd9f
[ "MIT" ]
169
2015-02-06T16:48:05.000Z
2022-01-18T16:20:56.000Z
# collections.abc new as of 3.3, and collections is deprecated. collections # will be unavailable in 3.9 try: import collections.abc as collections except ImportError: import collections import datetime import logging try: import json except ImportError: import simplejson as json import re def get_l...
28.397727
103
0.621449
b5b2a91b097891e20cc7019cb672621ebf2980ea
9,391
py
Python
homeassistant/components/cover/__init__.py
bartocc/home-assistant
86f5f0226cc5647a04b0f7803a09b58ad1b51741
[ "Apache-2.0" ]
2
2020-06-17T01:23:01.000Z
2020-06-18T22:17:14.000Z
homeassistant/components/cover/__init__.py
bartocc/home-assistant
86f5f0226cc5647a04b0f7803a09b58ad1b51741
[ "Apache-2.0" ]
6
2021-02-08T21:02:40.000Z
2022-03-12T00:52:16.000Z
homeassistant/components/cover/__init__.py
bartocc/home-assistant
86f5f0226cc5647a04b0f7803a09b58ad1b51741
[ "Apache-2.0" ]
1
2019-08-13T11:54:30.000Z
2019-08-13T11:54:30.000Z
""" Support for Cover devices. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/cover/ """ from datetime import timedelta import functools as ft import logging import voluptuous as vol from homeassistant.loader import bind_hass from homeassistant.helpers...
29.164596
79
0.686189
11dbd9c4011ecc9a0ac4112e7cf3f873f07edc27
1,516
py
Python
oneshottest.py
lijunyu159/An-automatic-model-to-measure-the-parameters-of-living-pores-based-on-Mask-R-CNN-
01cc978a86530cac426fa298b2f66f6a8f7738a8
[ "MIT" ]
1
2021-01-06T14:10:22.000Z
2021-01-06T14:10:22.000Z
oneshottest.py
lijunyu159/An-automatic-model-to-measure-the-parameters-of-living-pores-based-on-Mask-R-CNN-
01cc978a86530cac426fa298b2f66f6a8f7738a8
[ "MIT" ]
1
2021-06-07T09:43:17.000Z
2021-06-07T09:43:17.000Z
oneshottest.py
lijunyu159/An-automatic-model-to-measure-the-parameters-of-living-pores-based-on-Mask-R-CNN-
01cc978a86530cac426fa298b2f66f6a8f7738a8
[ "MIT" ]
null
null
null
import os import sys import math import numpy as np import cv2 import samples.balloon.mrcnn.model as modellib import skimage.io from samples.balloon import balloon from samples.balloon.mrcnn import utils from mrcnn import visualize from mrcnn.visualize import display_images import random # Root directory ...
28.603774
81
0.712401
d5118e3307391a85ecac9f94da1b1e017d02fbd2
1,204
py
Python
mlflow/alembic/versions/451aebb31d03_add_metric_step.py
akarloff/mlflow
be9774a76b4b6dcdb8cc2147a93d7c8676438292
[ "Apache-2.0" ]
3
2019-10-07T01:12:25.000Z
2020-07-06T04:27:51.000Z
mlflow/alembic/versions/451aebb31d03_add_metric_step.py
akarloff/mlflow
be9774a76b4b6dcdb8cc2147a93d7c8676438292
[ "Apache-2.0" ]
15
2019-10-07T01:11:46.000Z
2022-03-08T23:33:53.000Z
mlflow/alembic/versions/451aebb31d03_add_metric_step.py
akarloff/mlflow
be9774a76b4b6dcdb8cc2147a93d7c8676438292
[ "Apache-2.0" ]
6
2019-11-28T13:23:35.000Z
2020-07-08T19:22:12.000Z
"""add metric step Revision ID: 451aebb31d03 Revises: Create Date: 2019-04-22 15:29:24.921354 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '451aebb31d03' down_revision = None branch_labels = None depends_on = None def upgrade(): op.add_column('metrics'...
33.444444
100
0.714286
3eca36e36496363d19994b5b1e07a9cc4a179793
83
py
Python
docknv/image/__init__.py
sharingcloud/docknv
6eec6a576a32cb05278b7af045f90859066c9f1d
[ "MIT" ]
null
null
null
docknv/image/__init__.py
sharingcloud/docknv
6eec6a576a32cb05278b7af045f90859066c9f1d
[ "MIT" ]
null
null
null
docknv/image/__init__.py
sharingcloud/docknv
6eec6a576a32cb05278b7af045f90859066c9f1d
[ "MIT" ]
null
null
null
"""Image handler.""" from .methods import * # noqa from .models import * # noqa
16.6
30
0.638554
161db334175f70d109375ffb8eb9fb8473487f31
776
py
Python
713. Subarray Product Less Than K/solution1.py
sunshot/LeetCode
8f6503201831055f1d49ed3abb25be44a13ec317
[ "MIT" ]
null
null
null
713. Subarray Product Less Than K/solution1.py
sunshot/LeetCode
8f6503201831055f1d49ed3abb25be44a13ec317
[ "MIT" ]
null
null
null
713. Subarray Product Less Than K/solution1.py
sunshot/LeetCode
8f6503201831055f1d49ed3abb25be44a13ec317
[ "MIT" ]
null
null
null
from typing import List class Solution: def numSubarrayProductLessThanK(self, nums: List[int], k: int) -> int: if k <= 0: return 0 ans = 0 left = 0 right = 0 prod = 1 for right in range(len(nums)): prod *= nums[right] if prod < k: ...
27.714286
74
0.460052
c4f75cba514675188fa95386d9dd8eaff59db203
2,605
py
Python
examples/AdafruitDHT.py
a0933732177/Adafruit_Python_DHT
6ada1625465e59dc706727d38ef9d2d144e7b920
[ "MIT" ]
null
null
null
examples/AdafruitDHT.py
a0933732177/Adafruit_Python_DHT
6ada1625465e59dc706727d38ef9d2d144e7b920
[ "MIT" ]
null
null
null
examples/AdafruitDHT.py
a0933732177/Adafruit_Python_DHT
6ada1625465e59dc706727d38ef9d2d144e7b920
[ "MIT" ]
null
null
null
#!/usr/bin/python # Copyright (c) 2014 Adafruit Industries # Author: Tony DiCola # 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 ...
42.016129
98
0.723992
59287b9e451224e2f987ac1a5c9982089f94ba86
6,854
py
Python
earthquakes/postgres.py
conradhilley/earthquakes
ac641b080b634f56d1099e1705f2b2bb2acb565c
[ "MIT" ]
null
null
null
earthquakes/postgres.py
conradhilley/earthquakes
ac641b080b634f56d1099e1705f2b2bb2acb565c
[ "MIT" ]
null
null
null
earthquakes/postgres.py
conradhilley/earthquakes
ac641b080b634f56d1099e1705f2b2bb2acb565c
[ "MIT" ]
null
null
null
""" Purpose: Postgres Database update and helper functions Author: Conrad Hilley (conradhilley@gmail.com) """ # TODO create table/cursor classes and add common commands as methods # TODO build base cursor class import json import psycopg2 import psycopg2.extras from config import config from earthquakes import usgs...
32.330189
78
0.524074
a91e1b5f05f553d328086a8fa62223417904e812
1,993
py
Python
app/account/tests/factories.py
rogeriopaulos/gep
e56fd0450bdb8f572e2e35cc59a74ab0f0b372e2
[ "MIT" ]
null
null
null
app/account/tests/factories.py
rogeriopaulos/gep
e56fd0450bdb8f572e2e35cc59a74ab0f0b372e2
[ "MIT" ]
2
2021-09-02T04:22:45.000Z
2021-09-02T04:52:26.000Z
app/account/tests/factories.py
rogeriopaulos/gep
e56fd0450bdb8f572e2e35cc59a74ab0f0b372e2
[ "MIT" ]
1
2021-09-15T02:16:38.000Z
2021-09-15T02:16:38.000Z
from random import choice from account.models import Cargo, Orgao, Profile from account.utils import CARGOS, INSTITUICOES from django.contrib.auth import get_user_model from django.db.models.signals import post_save from factory import DjangoModelFactory, Faker, Sequence, SubFactory, django User = get_user_model() ...
29.308824
106
0.696939
aac48c3ccb54005ee1f4e16d51c062f5cadf61c9
2,440
py
Python
src/accounts/views.py
aminhp93/learning_python
f708a61c78e26061cf8b7fa5b1262fb0eea330d7
[ "MIT" ]
null
null
null
src/accounts/views.py
aminhp93/learning_python
f708a61c78e26061cf8b7fa5b1262fb0eea330d7
[ "MIT" ]
7
2020-02-11T23:32:33.000Z
2022-03-11T23:15:53.000Z
src/accounts/views.py
aminhp93/learning_python
f708a61c78e26061cf8b7fa5b1262fb0eea330d7
[ "MIT" ]
null
null
null
from django.contrib.auth import (authenticate, get_user_model, login, logout) from django.core.mail import send_mail from django.conf import settings from django.shortcuts import render, redirect from django.template.loader import render_to_string from django.urls import reverse from learning_python.utils import gene...
33.424658
117
0.74918
f0e2e6cfa5b7f39dea20d8c586bf38047042df10
2,903
py
Python
tests/word_tokenizer/test_mecab_tokenizer.py
upura/konoha
852fc9275ec9cf6d299a3dfc1cfa6ac5eaf166e5
[ "MIT" ]
null
null
null
tests/word_tokenizer/test_mecab_tokenizer.py
upura/konoha
852fc9275ec9cf6d299a3dfc1cfa6ac5eaf166e5
[ "MIT" ]
null
null
null
tests/word_tokenizer/test_mecab_tokenizer.py
upura/konoha
852fc9275ec9cf6d299a3dfc1cfa6ac5eaf166e5
[ "MIT" ]
null
null
null
import pytest from konoha.konoha_token import Token from konoha.word_tokenizer import WordTokenizer def test_word_tokenize_with_mecab(): try: import natto del natto except ImportError: pytest.skip("natto-py is not installed.") tokenizer = WordTokenizer(tokenizer="MeCab") exp...
23.41129
70
0.497416
6dd2de26e85a8b3a931aeeb01b1f47eb5159bb45
9,385
py
Python
odim/mongo.py
jhuseinovic/odim
4efb468e3ef9f346a27f73f7b218eea6b807564d
[ "MIT" ]
null
null
null
odim/mongo.py
jhuseinovic/odim
4efb468e3ef9f346a27f73f7b218eea6b807564d
[ "MIT" ]
null
null
null
odim/mongo.py
jhuseinovic/odim
4efb468e3ef9f346a27f73f7b218eea6b807564d
[ "MIT" ]
null
null
null
import logging import re from datetime import datetime from decimal import Decimal from time import sleep from typing import List, Optional, Union import bson from bson import ObjectId as BsonObjectId from pydantic import Field from functools import wraps, partial import asyncio from pymongo import MongoClient, errors...
33.880866
127
0.6504
04bc4674f0f41fbd10f1214684859051beb0abfb
1,068
py
Python
drf_email_project/drf_email_project/urls.py
liquanhui01/drf_email_user
188ecc3e36edb190cc1cd8f908d3b72c42d49301
[ "MIT" ]
null
null
null
drf_email_project/drf_email_project/urls.py
liquanhui01/drf_email_user
188ecc3e36edb190cc1cd8f908d3b72c42d49301
[ "MIT" ]
null
null
null
drf_email_project/drf_email_project/urls.py
liquanhui01/drf_email_user
188ecc3e36edb190cc1cd8f908d3b72c42d49301
[ "MIT" ]
1
2021-11-15T08:23:13.000Z
2021-11-15T08:23:13.000Z
"""drf_email_project URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') C...
35.6
81
0.715356
37e0ee876b350d4580c518135a723dba75206e20
6,105
py
Python
api/filters.py
raheemazeezabiodun/art-backend
0bc47f3cf6f403101082f201c7fd1ca8108d5731
[ "MIT" ]
null
null
null
api/filters.py
raheemazeezabiodun/art-backend
0bc47f3cf6f403101082f201c7fd1ca8108d5731
[ "MIT" ]
null
null
null
api/filters.py
raheemazeezabiodun/art-backend
0bc47f3cf6f403101082f201c7fd1ca8108d5731
[ "MIT" ]
null
null
null
# Standard Library import functools import logging import operator # Third-Party Imports from django.db.models import Q from django_filters import rest_framework as filters # App Imports from core.models import AllocationHistory, Asset, AssetLog, User logger = logging.getLogger(__name__) NULL_VALUE = "unspecified" ...
31.632124
107
0.653726
00696a2ff352b797b0251ccbe86fe70e9da2f415
488
py
Python
decay_fns/decay_comparison.py
noelevans/playground
da529e967a15bcb217fff091ac0ec5c4dc1821ce
[ "MIT" ]
1
2015-04-28T20:36:57.000Z
2015-04-28T20:36:57.000Z
decay_fns/decay_comparison.py
noelevans/playground
da529e967a15bcb217fff091ac0ec5c4dc1821ce
[ "MIT" ]
2
2021-02-03T21:05:54.000Z
2021-03-23T09:25:43.000Z
decay_fns/decay_comparison.py
noelevans/playground
da529e967a15bcb217fff091ac0ec5c4dc1821ce
[ "MIT" ]
null
null
null
from matplotlib import pyplot as plt import numpy as np def main(): half_life = 5 x = np.linspace(0, 20, 100) y_1 = 0.5 ** (x / half_life) y_2 = np.e ** - (x * half_life) label_1 = r'$y = (\frac{1}{2})^{x / t_{\frac{1}{2}}}$' label_2 = r'$y = e^{x.t_{\frac{1}{2}}}$' plt.plot(x, y_1, li...
23.238095
58
0.559426