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
930a837f58e287a684132fc31d3bc32e64543796
386
py
Python
songs/migrations/0004_auto_20191028_2018.py
bananabrann/eb-jdavisarrangements.com
43704b6c518bbe731ce5ff115d5cd6ee4cb0964c
[ "MIT" ]
null
null
null
songs/migrations/0004_auto_20191028_2018.py
bananabrann/eb-jdavisarrangements.com
43704b6c518bbe731ce5ff115d5cd6ee4cb0964c
[ "MIT" ]
null
null
null
songs/migrations/0004_auto_20191028_2018.py
bananabrann/eb-jdavisarrangements.com
43704b6c518bbe731ce5ff115d5cd6ee4cb0964c
[ "MIT" ]
null
null
null
# Generated by Django 2.2.3 on 2019-10-28 20:18 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('songs', '0003_auto_20191028_2017'), ] operations = [ migrations.AlterField( model_name='song', name='audio', ...
20.315789
55
0.590674
2399f84a2df5d5bff95b6f44b4ec255baf0a3386
2,348
py
Python
venv/Lib/site-packages/pyrogram/raw/types/input_phone_call.py
D1ne2021/jjhhhjj
a090da30983b3ef276dfe4cef2ded4526f36002a
[ "MIT" ]
2
2021-12-13T07:09:55.000Z
2022-01-12T12:15:20.000Z
venv/Lib/site-packages/pyrogram/raw/types/input_phone_call.py
hoangkiet1906/Botcie_ver1
c133b915edde06dac690a7dc6ca160f6792fc4c8
[ "MIT" ]
null
null
null
venv/Lib/site-packages/pyrogram/raw/types/input_phone_call.py
hoangkiet1906/Botcie_ver1
c133b915edde06dac690a7dc6ca160f6792fc4c8
[ "MIT" ]
null
null
null
# Pyrogram - Telegram MTProto API Client Library for Python # Copyright (C) 2017-2021 Dan <https://github.com/delivrance> # # This file is part of Pyrogram. # # Pyrogram is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free...
31.306667
103
0.612862
d12eac4cca0694219c7c8755f28d77ec77feab26
16,472
py
Python
gnocchiclient/client.py
pkilambi/python-gnocchiclient
8bb3d8e0dacf98ac1537a55d97486734d4c5bed7
[ "Apache-2.0" ]
null
null
null
gnocchiclient/client.py
pkilambi/python-gnocchiclient
8bb3d8e0dacf98ac1537a55d97486734d4c5bed7
[ "Apache-2.0" ]
null
null
null
gnocchiclient/client.py
pkilambi/python-gnocchiclient
8bb3d8e0dacf98ac1537a55d97486734d4c5bed7
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
39.980583
79
0.636899
6a22ab89a0aa1fc8851c93e5750a30e76e0ec6c4
621
py
Python
BanditSim/update_rules/bayes_update.py
AJB0211/BanditSim
5426486b40c35492049b09f9b57eb18ad5d6ce63
[ "MIT" ]
null
null
null
BanditSim/update_rules/bayes_update.py
AJB0211/BanditSim
5426486b40c35492049b09f9b57eb18ad5d6ce63
[ "MIT" ]
null
null
null
BanditSim/update_rules/bayes_update.py
AJB0211/BanditSim
5426486b40c35492049b09f9b57eb18ad5d6ce63
[ "MIT" ]
null
null
null
## TODO: Fix this function ## maybe look into Bayesian methods in RL? def bayesian_update_rule(self, q, r, a): """ q is the prior _alpha, _beta parameters of a beta binomial q := \frac{\alpha + \beta}{\alpha+\beta+n}\frac{\alpha}{\alpha+\beta} + \frac{1}{\alpha+\beta+n} * R = \frac{\alpha + \...
29.571429
104
0.561997
d9b44aa534a87a3b4d8a2083892649a3e55d5589
425
py
Python
apps/index.py
balbidatascience/ir-conciliacao-dash
ed52294daea34427cddead4fa10b55da2bd709e2
[ "MIT" ]
null
null
null
apps/index.py
balbidatascience/ir-conciliacao-dash
ed52294daea34427cddead4fa10b55da2bd709e2
[ "MIT" ]
null
null
null
apps/index.py
balbidatascience/ir-conciliacao-dash
ed52294daea34427cddead4fa10b55da2bd709e2
[ "MIT" ]
null
null
null
import dash import dash_core_components as dcc import dash_html_components as html from app import app layout = html.Div([ dcc.Link('Home', href='/'), html.Br(), dcc.Link('Conciliação', href='/apps/MonitorConciliacao'), html.Br(), dcc.Link('Acompanhamento Aprovação de Pedidos"', href='/apps/analis...
28.333333
90
0.696471
454482e71877aaf801163e7ff0ae118c79fadde0
1,631
py
Python
airflow/migrations/versions/0048_a56c9515abdc_remove_dag_stat_table.py
npodewitz/airflow
511ea702d5f732582d018dad79754b54d5e53f9d
[ "Apache-2.0" ]
8,092
2016-04-27T20:32:29.000Z
2019-01-05T07:39:33.000Z
airflow/migrations/versions/0048_a56c9515abdc_remove_dag_stat_table.py
npodewitz/airflow
511ea702d5f732582d018dad79754b54d5e53f9d
[ "Apache-2.0" ]
2,961
2016-05-05T07:16:16.000Z
2019-01-05T08:47:59.000Z
airflow/migrations/versions/0048_a56c9515abdc_remove_dag_stat_table.py
npodewitz/airflow
511ea702d5f732582d018dad79754b54d5e53f9d
[ "Apache-2.0" ]
3,546
2016-05-04T20:33:16.000Z
2019-01-05T05:14:26.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...
30.773585
72
0.72103
f47ff4b464f94382d664e1fbbfb218ae49e44068
2,595
py
Python
technical_deployment/train_model/1_computeRois.py
ChaplinMarchais/cortana-intelligence-product-detection-from-images
a28894b2eeb1b8397d84286f66bdc8f947e543b4
[ "MIT" ]
1
2018-05-14T05:26:36.000Z
2018-05-14T05:26:36.000Z
technical_deployment/train_model/1_computeRois.py
Thirapat/cortana-intelligence-product-detection-from-images
10077cb022b95239064944ec647888c86ca6aca9
[ "MIT" ]
4
2021-06-08T23:55:34.000Z
2022-03-12T00:55:55.000Z
technical_deployment/train_model/1_computeRois.py
isabella232/cortana-intelligence-product-detection-from-images
2e5370098f9f83cd27cdaba2eab675f3c30ae157
[ "MIT" ]
3
2018-04-11T18:15:11.000Z
2019-10-15T13:59:54.000Z
# -*- coding: utf-8 -*- import sys, os, importlib, random import PARAMETERS locals().update(importlib.import_module("PARAMETERS").__dict__) #################################### # Parameters #################################### boShowImg = True subdirs = ['positive', 'testImages', 'negative'] #no need to change thes...
40.546875
156
0.621195
226b20f615316fe54111791798e286f0124f8894
21,384
py
Python
tensorflow/contrib/graph_editor/subgraph.py
gameon67/tensorflow
cf831df71d4d2e0ac55bef4efdcda4962c456290
[ "Apache-2.0" ]
2
2020-06-30T05:52:37.000Z
2021-01-21T04:16:39.000Z
tensorflow/contrib/graph_editor/subgraph.py
Dinesh-3/tensorflow
be647ad9512f7d2b891494ef8abbbde46e2e0663
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/graph_editor/subgraph.py
Dinesh-3/tensorflow
be647ad9512f7d2b891494ef8abbbde46e2e0663
[ "Apache-2.0" ]
2
2020-06-24T11:07:08.000Z
2020-08-09T00:02:58.000Z
# pylint: disable=g-bad-file-header # Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENS...
37.847788
80
0.703984
b83b271f1217eceef7bb99e04aa66ea8eddf9b2b
1,675
py
Python
simple_rl/tasks/grid_game/GridGameStateClass.py
david-abel/mdps
d8fe6007efb4840377f085a4e35ba89aaa2cdf6d
[ "Apache-2.0" ]
230
2016-08-04T12:59:11.000Z
2022-03-15T04:14:40.000Z
simple_rl/tasks/grid_game/GridGameStateClass.py
samlobel/simple_rl_mbrl
ed868916d06dbf68f4af23bea83b0e852e88df6e
[ "Apache-2.0" ]
36
2016-08-31T19:31:36.000Z
2021-11-17T03:58:24.000Z
simple_rl/tasks/grid_game/GridGameStateClass.py
samlobel/simple_rl_mbrl
ed868916d06dbf68f4af23bea83b0e852e88df6e
[ "Apache-2.0" ]
95
2016-08-31T19:10:45.000Z
2022-03-15T04:15:39.000Z
''' GridGameStateClass.py: Contains the GridGameState class. ''' # Other imports. from simple_rl.mdp.StateClass import State class GridGameState(State): ''' Class for two player Grid Game States ''' def __init__(self, a_x, a_y, b_x, b_y): State.__init__(self, data=[a_x, a_y, b_x, b_y]) self.a...
33.5
115
0.549254
f1ee5ca7dc06974de4d234edbd55a169b06ef818
480
py
Python
src/beeswax_api/SessionFactory.py
hbmartin/beeswax-api
48527f2d7870e9eb2b4d83da8ee964cf85f6c99f
[ "Apache-2.0" ]
2
2017-03-24T19:27:27.000Z
2017-04-24T18:07:15.000Z
src/beeswax_api/SessionFactory.py
hbmartin/beeswax-api
48527f2d7870e9eb2b4d83da8ee964cf85f6c99f
[ "Apache-2.0" ]
null
null
null
src/beeswax_api/SessionFactory.py
hbmartin/beeswax-api
48527f2d7870e9eb2b4d83da8ee964cf85f6c99f
[ "Apache-2.0" ]
null
null
null
import attr from beeswax_api.models import Session @attr.s class SessionFactory(object): url = attr.ib() email = attr.ib() password = attr.ib() def login(self): _session = Session.Session() return _session.login(self.url, auth_data={ ...
26.666667
62
0.477083
742c0c82d0cd463fb20cf8be0fdb964d102448f8
5,379
py
Python
Werewolf/agents/RuleBasedPlayer.py
GeorgeVelikov/Werewolf-Framework
6a4501cc98cab92111eec2551b9a3d2464adad7f
[ "MIT" ]
1
2021-11-14T16:51:16.000Z
2021-11-14T16:51:16.000Z
Werewolf/agents/RuleBasedPlayer.py
GeorgeVelikov/Werewolf-Framework
6a4501cc98cab92111eec2551b9a3d2464adad7f
[ "MIT" ]
null
null
null
Werewolf/agents/RuleBasedPlayer.py
GeorgeVelikov/Werewolf-Framework
6a4501cc98cab92111eec2551b9a3d2464adad7f
[ "MIT" ]
null
null
null
from Werewolf.agents.AgentPlayer import AgentPlayer; from Werewolf.game.actions.Vote import Vote; from Shared.enums.PlayerTypeEnum import PlayerTypeEnum; from Shared.enums.TimeOfDayEnum import TimeOfDayEnum; from Shared.enums.AgentTypeEnum import AgentTypeEnum; import Shared.utility.LogUtility as LogUtility; import r...
28.162304
86
0.628741
79b12bbfcca4804dbac1e915fda4b9cd7bec3191
39,112
py
Python
pythonFiles/tests/testing_tools/adapter/test_report.py
dvirtz/vscode-python
24d1bc19efff44ce5a81daf8fb1ee488ab62a776
[ "MIT" ]
1
2017-12-14T18:04:52.000Z
2017-12-14T18:04:52.000Z
pythonFiles/tests/testing_tools/adapter/test_report.py
dvirtz/vscode-python
24d1bc19efff44ce5a81daf8fb1ee488ab62a776
[ "MIT" ]
66
2020-09-01T20:09:30.000Z
2022-03-31T10:03:15.000Z
pythonFiles/tests/testing_tools/adapter/test_report.py
IanMatthewHuff/vscode-python
fa1dd0613aa8c1da04a05e8d818fdefa60f22f53
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import json import unittest from ...util import StubProxy from testing_tools.adapter.util import fix_path, fix_relpath from testing_tools.adapter.info import TestInfo, TestPath, ParentInfo from testing_tools.adapter.report i...
33.145763
76
0.336521
6b30aefdca125f91951aeca8cbbf89976620e767
1,590
py
Python
config/holdout/week_0/lstm/controller.py
educational-technology-collective/fy2015-replication
7ec4ed7e23e7d9744d0a2b8ab9d75451797a7095
[ "MIT" ]
5
2018-09-13T13:14:31.000Z
2020-05-22T07:09:40.000Z
config/holdout/week_0/lstm/controller.py
educational-technology-collective/fy2015-replication
7ec4ed7e23e7d9744d0a2b8ab9d75451797a7095
[ "MIT" ]
null
null
null
config/holdout/week_0/lstm/controller.py
educational-technology-collective/fy2015-replication
7ec4ed7e23e7d9744d0a2b8ab9d75451797a7095
[ "MIT" ]
4
2019-02-26T09:11:42.000Z
2021-06-22T01:36:44.000Z
# Copyright (c) 2018 The Regents of the University of Michigan # and the University of Pennsylvania # # 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 li...
44.166667
80
0.787421
94ed428f7f1ea1ef122fddcadc3f5c4a3b22b78d
11,103
py
Python
src/emb/fact_network.py
jxtu/Brandeis-COSI241-KG-Project
4511698c7ecd6dda1ec61ac1e4bb17f1e1d5a86f
[ "MIT" ]
null
null
null
src/emb/fact_network.py
jxtu/Brandeis-COSI241-KG-Project
4511698c7ecd6dda1ec61ac1e4bb17f1e1d5a86f
[ "MIT" ]
null
null
null
src/emb/fact_network.py
jxtu/Brandeis-COSI241-KG-Project
4511698c7ecd6dda1ec61ac1e4bb17f1e1d5a86f
[ "MIT" ]
null
null
null
""" Copyright (c) 2018, salesforce.com, inc. All rights reserved. SPDX-License-Identifier: BSD-3-Clause For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause Fact scoring networks. Code adapted from https://github.com/TimDettmers/ConvE/blob/master/model.py ...
34.374613
135
0.610015
40e2fddc74bfb9befdc4beb65acd9c5be80dcb60
194
py
Python
Datastructures/stack.py
userforbidden/Python-Samples
95c4cd12d59ff2f974744c335597ca3e3dcb9f2d
[ "MIT" ]
1
2019-11-08T21:06:00.000Z
2019-11-08T21:06:00.000Z
Datastructures/stack.py
userforbidden/Python-Samples
95c4cd12d59ff2f974744c335597ca3e3dcb9f2d
[ "MIT" ]
null
null
null
Datastructures/stack.py
userforbidden/Python-Samples
95c4cd12d59ff2f974744c335597ca3e3dcb9f2d
[ "MIT" ]
null
null
null
# Initializes a Stack stack = [] # Pushing 5 into the stack stack.append(5) #Look at the top item of the stack and print it print(stack[-1]) #removing the top item fromthe stack stack.pop()
19.4
48
0.716495
a6df6332b8d04571d49c26166525ee1d7145e506
134,966
py
Python
files/runs_small/cores_8/fft/power.py
ST4NSB/sniper-simulator-predictions
1f0fe2a10fda55fceea053464ea202bfe2effafc
[ "MIT" ]
1
2021-03-08T03:39:23.000Z
2021-03-08T03:39:23.000Z
files/runs_small/cores_8/fft/power.py
ST4NSB/sniper-simulator-predictions
1f0fe2a10fda55fceea053464ea202bfe2effafc
[ "MIT" ]
null
null
null
files/runs_small/cores_8/fft/power.py
ST4NSB/sniper-simulator-predictions
1f0fe2a10fda55fceea053464ea202bfe2effafc
[ "MIT" ]
null
null
null
power = {'BUSES': {'Area': 3.70399, 'Bus/Area': 3.70399, 'Bus/Gate Leakage': 0.00993673, 'Bus/Peak Dynamic': 4.77812, 'Bus/Runtime Dynamic': 0.555594, 'Bus/Subthreshold Leakage': 0.103619, 'Bus/Subthreshold Leakage with power gating': 0.0388573, ...
75.653587
124
0.683972
693c64d816ee225503fb87a7c41450275f4abdb6
1,120
py
Python
ariadne/runners.py
tricoder42/python-ariadne
960a8cecaf740dd6427ba1f03399e909b01e9731
[ "MIT" ]
null
null
null
ariadne/runners.py
tricoder42/python-ariadne
960a8cecaf740dd6427ba1f03399e909b01e9731
[ "MIT" ]
null
null
null
ariadne/runners.py
tricoder42/python-ariadne
960a8cecaf740dd6427ba1f03399e909b01e9731
[ "MIT" ]
1
2019-07-08T00:25:05.000Z
2019-07-08T00:25:05.000Z
# coding: utf-8 from __future__ import unicode_literals import sys from ariadne.config import BaseConfig from ariadne.scenarios import Scenario class Runner(object): """ Base class for all runners. """ class SimpleRunner(Runner): def __init__(self, config=None): if config is None: confi...
28.717949
74
0.630357
4dceefe6860c304521b65eb7d19bca97d7a9e5ab
2,295
py
Python
projects/models.py
estherndichu/django3
aa8b53e49f01f753df4ddd7fe5d30f9a5cf9ca11
[ "Unlicense" ]
null
null
null
projects/models.py
estherndichu/django3
aa8b53e49f01f753df4ddd7fe5d30f9a5cf9ca11
[ "Unlicense" ]
null
null
null
projects/models.py
estherndichu/django3
aa8b53e49f01f753df4ddd7fe5d30f9a5cf9ca11
[ "Unlicense" ]
null
null
null
from django.db import models from django.contrib.auth.models import User from cloudinary.models import CloudinaryField from django.db.models.signals import post_save # Create your models here. class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) picture = models.ImageFiel...
31.875
101
0.649237
ed309240963c7658102624153a4f6c55ed1fcbf4
3,290
py
Python
polyaxon/signals/project_notebook_jobs.py
elyase/polyaxon
1c19f059a010a6889e2b7ea340715b2bcfa382a0
[ "MIT" ]
null
null
null
polyaxon/signals/project_notebook_jobs.py
elyase/polyaxon
1c19f059a010a6889e2b7ea340715b2bcfa382a0
[ "MIT" ]
null
null
null
polyaxon/signals/project_notebook_jobs.py
elyase/polyaxon
1c19f059a010a6889e2b7ea340715b2bcfa382a0
[ "MIT" ]
null
null
null
from hestia.decorators import ignore_raw, ignore_updates, ignore_updates_pre from django.db.models.signals import post_save, pre_delete, pre_save from django.dispatch import receiver import auditor from constants.jobs import JobLifeCycle from db.models.notebooks import NotebookJob, NotebookJobStatus from event_manag...
35.376344
92
0.717021
08aaf28c2627fbbef0df4ed0a895db133e490b35
4,670
py
Python
src/beanmachine/ppl/legacy/inference/compositional_infer.py
horizon-blue/beanmachine-1
b13e4e3e28ffb860947eb8046863b0cabb581222
[ "MIT" ]
177
2021-12-12T14:19:05.000Z
2022-03-24T05:48:10.000Z
src/beanmachine/ppl/legacy/inference/compositional_infer.py
horizon-blue/beanmachine-1
b13e4e3e28ffb860947eb8046863b0cabb581222
[ "MIT" ]
171
2021-12-11T06:12:05.000Z
2022-03-31T20:26:29.000Z
src/beanmachine/ppl/legacy/inference/compositional_infer.py
horizon-blue/beanmachine-1
b13e4e3e28ffb860947eb8046863b0cabb581222
[ "MIT" ]
31
2021-12-11T06:27:19.000Z
2022-03-25T13:31:56.000Z
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import copy import logging from typing import Dict, List import torch.distributions as dist from beanmachine.ppl.legacy.inference.abstract_...
38.916667
98
0.647966
14fb45303126b13b87fc3d739dd4816007120cb6
38
py
Python
DMOJ/xor.py
eddiegz/Personal-C
f7869826216e5c665f8f646502141f0dc680e545
[ "MIT" ]
3
2021-05-15T08:18:09.000Z
2021-05-17T04:41:57.000Z
DMOJ/xor.py
eddiegz/Personal-C
f7869826216e5c665f8f646502141f0dc680e545
[ "MIT" ]
null
null
null
DMOJ/xor.py
eddiegz/Personal-C
f7869826216e5c665f8f646502141f0dc680e545
[ "MIT" ]
null
null
null
import sys a=sys.stdin.read().split()
19
26
0.710526
b368ec8aed67d0835eee2cdef229af52b9b7510b
1,318
py
Python
attendance/resources/user.py
ashish1595/uPresent
663acc6ad7c958c8d45699918c60e48535aff3b3
[ "MIT" ]
1
2020-09-02T23:51:15.000Z
2020-09-02T23:51:15.000Z
attendance/resources/user.py
ashish1595/uPresent
663acc6ad7c958c8d45699918c60e48535aff3b3
[ "MIT" ]
1,143
2020-01-26T07:18:37.000Z
2022-03-31T21:02:44.000Z
attendance/resources/user.py
ashish1595/uPresent
663acc6ad7c958c8d45699918c60e48535aff3b3
[ "MIT" ]
4
2020-01-27T07:47:29.000Z
2020-07-22T10:54:15.000Z
import urllib.request from flask import current_app import json import logging import os log = logging.getLogger("root") class User: def fetchStudent(self, username): log.info("Trying to fetch student info by username ---->>") userResponseData = self.fetchUser(username) if userResponseDa...
36.611111
85
0.670713
5eccc8c31d59539f10b26e4b012e8ddc366ff0f2
1,884
py
Python
eiclab_line_follower_advanced.py
msiplab/EicDesign
ff9692753cdf5189b773c60469d1e531e0fd5e7c
[ "MIT" ]
null
null
null
eiclab_line_follower_advanced.py
msiplab/EicDesign
ff9692753cdf5189b773c60469d1e531e0fd5e7c
[ "MIT" ]
null
null
null
eiclab_line_follower_advanced.py
msiplab/EicDesign
ff9692753cdf5189b773c60469d1e531e0fd5e7c
[ "MIT" ]
2
2020-10-21T04:32:51.000Z
2021-10-13T06:23:48.000Z
#!/usr/bin/python3 # coding: UTF-8 """ ライントレーサー(スレッド版クラス実装) 「電子情報通信設計製図」新潟大学工学部工学科電子情報通信プログラム 参考サイト https://gpiozero.readthedocs.io/en/stable/index.html https://gpiozero.readthedocs.io/en/stable/recipes_advanced.html#bluedot-robot """ import numpy as np import gpiozero from gpiozero import MCP3004, Ro...
26.535211
85
0.496285
9277eb8f60cfd663643e9f701b05d05d82092a07
1,681
py
Python
hondana/types/settings.py
PythonCoderAS/Hondana
14a7db9837bbe78212c462f845278777c246e3bf
[ "MIT" ]
null
null
null
hondana/types/settings.py
PythonCoderAS/Hondana
14a7db9837bbe78212c462f845278777c246e3bf
[ "MIT" ]
null
null
null
hondana/types/settings.py
PythonCoderAS/Hondana
14a7db9837bbe78212c462f845278777c246e3bf
[ "MIT" ]
null
null
null
""" The MIT License (MIT) Copyright (c) 2021-Present AbstractUmbra 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, modif...
28.982759
75
0.739441
64373e58629aaae6847c905ee874f75cbba38fde
703
py
Python
interview/leet/134_Gas_Station.py
eroicaleo/LearningPython
297d46eddce6e43ce0c160d2660dff5f5d616800
[ "MIT" ]
1
2020-10-12T13:33:29.000Z
2020-10-12T13:33:29.000Z
interview/leet/134_Gas_Station.py
eroicaleo/LearningPython
297d46eddce6e43ce0c160d2660dff5f5d616800
[ "MIT" ]
null
null
null
interview/leet/134_Gas_Station.py
eroicaleo/LearningPython
297d46eddce6e43ce0c160d2660dff5f5d616800
[ "MIT" ]
1
2016-11-09T07:28:45.000Z
2016-11-09T07:28:45.000Z
#!/usr/bin/env python class Solution: def canCompleteCircuit(self, gas, cost): """ :type gas: List[int] :type cost: List[int] :rtype: int """ length, start = len(gas), 0 diff = [0] * length for i in range(length): diff[i] = gas[i] - cost[i...
22.677419
49
0.489331
f626d01ce34411e3389c5ce919d54c700b6242da
318
py
Python
CS50's Introduction to Computer Science/python + sql/cash.py
Swizop/HarvardX-CS50
f74780c9437c64113c0e082213420887dc2b76c8
[ "MIT" ]
null
null
null
CS50's Introduction to Computer Science/python + sql/cash.py
Swizop/HarvardX-CS50
f74780c9437c64113c0e082213420887dc2b76c8
[ "MIT" ]
null
null
null
CS50's Introduction to Computer Science/python + sql/cash.py
Swizop/HarvardX-CS50
f74780c9437c64113c0e082213420887dc2b76c8
[ "MIT" ]
null
null
null
def main(): n=int(get_number()*100) if n==0: print(0) return v=[25,10,5,1] rest=0 for i in v: rest=rest+int(n/i) n=n%i print(rest) def get_number(): while True: x=float(input("please state your change\n")) if x>=0: return x main()
18.705882
52
0.484277
3a6a48e59bda3211a07757023367cd393de9f93c
1,399
py
Python
pycrunch_trace/client/api/network_client.py
yswtrue/pycrunch-trace
67395a8ee578387c878cd85365cec186ab811984
[ "MIT" ]
90
2020-06-02T09:43:34.000Z
2022-03-18T12:04:11.000Z
pycrunch_trace/client/api/network_client.py
yswtrue/pycrunch-trace
67395a8ee578387c878cd85365cec186ab811984
[ "MIT" ]
8
2020-06-05T19:20:07.000Z
2022-03-17T10:14:30.000Z
pycrunch_trace/client/api/network_client.py
yswtrue/pycrunch-trace
67395a8ee578387c878cd85365cec186ab811984
[ "MIT" ]
8
2020-06-06T08:08:53.000Z
2022-03-19T16:38:18.000Z
import socketio from . import version class TracingClient: def __init__(self, host_url: str): self.sio = socketio.Client() connection_headers = dict( version=version.version, product='pycrunch-tracing-node', ) self.sio.connect(url=host_url, headers=connect...
25.907407
92
0.547534
e04c6592787b7d171f1b6eb351b7574be45ff65f
3,584
py
Python
test/issues/test_076.py
ajnelson-nist/pySHACL
eebb546c981d5e7de72c8e51b0d9eaf14960e807
[ "Apache-2.0" ]
167
2018-09-05T11:28:28.000Z
2022-03-29T13:31:02.000Z
test/issues/test_076.py
ajnelson-nist/pySHACL
eebb546c981d5e7de72c8e51b0d9eaf14960e807
[ "Apache-2.0" ]
123
2018-09-07T04:27:05.000Z
2022-03-25T15:07:56.000Z
test/issues/test_076.py
ajnelson-nist/pySHACL
eebb546c981d5e7de72c8e51b0d9eaf14960e807
[ "Apache-2.0" ]
50
2018-09-14T11:12:31.000Z
2022-03-25T15:00:21.000Z
# -*- coding: utf-8 -*- # """ https://github.com/RDFLib/pySHACL/issues/76 """ import rdflib from pyshacl import validate shacl_file_text = ''' @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix sh: <http://www.w3.org/ns/shacl#> . @prefix skos: ...
28.220472
98
0.665737
c934ca939e4be5fd3591e6dad3ea124d2e481064
5,671
py
Python
RecoVertex/BeamSpotProducer/test/scripts/PlotLumiScan.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
null
null
null
RecoVertex/BeamSpotProducer/test/scripts/PlotLumiScan.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
null
null
null
RecoVertex/BeamSpotProducer/test/scripts/PlotLumiScan.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python #____________________________________________________________ # # PlotLumiScan # # A very simple way to make lumiscan plots from beamfit.txt files # Needed files: A txt file specifying lumi section ranges eg. RunLumiScan.txt # All the beam fit txt files in <data_dir> created after running Analy...
30.489247
101
0.512079
7a5fe2ad049561f06019e9c3a86d929d4cd0aaba
3,723
py
Python
tests/unit/test_stream.py
eyesuk/td-ameritrade-python-api
0dcdb8029e0fe4e051a56ad276b1d9c5bc62352a
[ "MIT" ]
null
null
null
tests/unit/test_stream.py
eyesuk/td-ameritrade-python-api
0dcdb8029e0fe4e051a56ad276b1d9c5bc62352a
[ "MIT" ]
null
null
null
tests/unit/test_stream.py
eyesuk/td-ameritrade-python-api
0dcdb8029e0fe4e051a56ad276b1d9c5bc62352a
[ "MIT" ]
null
null
null
import unittest from datetime import datetime from datetime import timedelta from unittest import TestCase from configparser import ConfigParser from td.client import TDClient from td.stream import TDStreamerClient class TDSession(TestCase): """Will perform a unit test for the TD session.""" def setUp(self)...
37.23
106
0.678754
66935a4b946b4a941367d14ca8b4f46f3f749aa1
645
py
Python
sample_project/app_test/migrations/0001_initial.py
luzfcb/luzfcb_dj_simplelock
c33e30da514171c1785dbb7f87f1a4a3e4833d1c
[ "BSD-3-Clause" ]
4
2016-02-19T20:16:05.000Z
2016-09-13T18:50:17.000Z
sample_project/app_test/migrations/0001_initial.py
luzfcb/luzfcb_dj_simplelock
c33e30da514171c1785dbb7f87f1a4a3e4833d1c
[ "BSD-3-Clause" ]
null
null
null
sample_project/app_test/migrations/0001_initial.py
luzfcb/luzfcb_dj_simplelock
c33e30da514171c1785dbb7f87f1a4a3e4833d1c
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-02-18 12:30 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Person'...
25.8
114
0.59845
1a45e0cee59a40d5b17bfb2ac203ee94918480aa
36,568
py
Python
cubids/cli.py
PennLINC/CuBIDS
f42155250a044da7b31f413f13c3600b7ee39cb7
[ "MIT" ]
1
2021-10-18T17:43:37.000Z
2021-10-18T17:43:37.000Z
cubids/cli.py
PennLINC/CuBIDS
f42155250a044da7b31f413f13c3600b7ee39cb7
[ "MIT" ]
25
2021-06-29T21:17:13.000Z
2022-03-30T17:41:39.000Z
cubids/cli.py
PennLINC/CuBIDS
f42155250a044da7b31f413f13c3600b7ee39cb7
[ "MIT" ]
3
2021-07-28T14:13:55.000Z
2021-12-22T19:09:35.000Z
"""Console script for cubids.""" import argparse import subprocess import os import sys import re import logging import tempfile import tqdm import shutil import pandas as pd from cubids import CuBIDS from pathlib import Path from .validator import (build_validator_call, run_validator, parse_val...
42.373117
79
0.545668
0b5f604574012eeb55118ec8d5372418a00f4e14
64
py
Python
app/test/__init__.py
TrueOctopus/classifierBack
5ebe20b8bd18aa74bbeb229403963b331c5013c2
[ "MIT" ]
null
null
null
app/test/__init__.py
TrueOctopus/classifierBack
5ebe20b8bd18aa74bbeb229403963b331c5013c2
[ "MIT" ]
null
null
null
app/test/__init__.py
TrueOctopus/classifierBack
5ebe20b8bd18aa74bbeb229403963b331c5013c2
[ "MIT" ]
null
null
null
from flask import Blueprint test = Blueprint('test', __name__)
16
34
0.765625
2883b70194dcc282ab975c5f7a15bfc465a20809
1,202
py
Python
pastech_app/config/pastech_app.py
ujjwalkumar93/pastech
f7468b06cd17b89c6af0477bee6db4d53dec3e5b
[ "MIT" ]
null
null
null
pastech_app/config/pastech_app.py
ujjwalkumar93/pastech
f7468b06cd17b89c6af0477bee6db4d53dec3e5b
[ "MIT" ]
3
2022-01-11T17:41:30.000Z
2022-01-11T19:02:38.000Z
pastech_app/config/pastech_app.py
ujjwalkumar93/pastech
f7468b06cd17b89c6af0477bee6db4d53dec3e5b
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "label": _("Document"), "icon": "octicon octicon-briefcase", "items": [ { "type": "doctype", "name": "Mobile", ...
27.318182
49
0.306988
68aa955c1c547b58fe65c0c030082261a9a1c6b2
1,498
py
Python
BioExp/helpers/pb_file_generation.py
MiRL-IITM/BioExp
d121661bac7ae2d8c1bed7a52e9a0f550f446baa
[ "MIT" ]
9
2019-11-16T04:02:53.000Z
2022-02-10T13:23:52.000Z
BioExp/helpers/pb_file_generation.py
MiRL-IITM/BioExp
d121661bac7ae2d8c1bed7a52e9a0f550f446baa
[ "MIT" ]
5
2020-01-28T22:17:05.000Z
2022-02-09T23:40:53.000Z
BioExp/helpers/pb_file_generation.py
MiRL-IITM/BioExp
d121661bac7ae2d8c1bed7a52e9a0f550f446baa
[ "MIT" ]
6
2019-11-17T01:31:51.000Z
2020-12-03T21:15:48.000Z
import tensorflow as tf import keras.backend as K from keras.models import load_model from .losses import * def generate_pb(model_path, layer_name, pb_path, wts_path): """ freezes model weights and convert entire graph into .pb file model_path: saved model path (model architecture) (str) layer_name: ...
39.421053
86
0.600801
def730847dbea6f8edc98dfbdfa74010fae729b3
727
py
Python
HelloWorldWebsite/home/views.py
farhadmak/DjangoTutorial
0fedc19a8e604902de77c63354b0512919c9bd6e
[ "MIT" ]
3
2019-09-07T18:05:09.000Z
2020-01-14T19:18:31.000Z
HelloWorldWebsite/home/views.py
farhadmak/DjangoTutorial
0fedc19a8e604902de77c63354b0512919c9bd6e
[ "MIT" ]
5
2019-09-07T20:59:59.000Z
2019-09-08T19:03:09.000Z
HelloWorldWebsite/home/views.py
farhadmak/DjangoTutorial
0fedc19a8e604902de77c63354b0512919c9bd6e
[ "MIT" ]
11
2019-09-07T18:01:30.000Z
2020-01-11T18:21:20.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.shortcuts import render, redirect from django.template import loader from django.http import HttpResponse from django.views import generic from .models import Counter # Create your views here. class Home(generic.DetailView): model = Count...
30.291667
61
0.702889
7b4624ea62b1d078b8c46644614182bcf8a187d1
2,492
py
Python
api.py
techreturners/lm-lab-instrumented-devops-bookstore-api
e15e123876ca5721c66c0fb201ffc8890decef23
[ "MIT" ]
null
null
null
api.py
techreturners/lm-lab-instrumented-devops-bookstore-api
e15e123876ca5721c66c0fb201ffc8890decef23
[ "MIT" ]
null
null
null
api.py
techreturners/lm-lab-instrumented-devops-bookstore-api
e15e123876ca5721c66c0fb201ffc8890decef23
[ "MIT" ]
null
null
null
from flask import Flask from flask_restful import Resource, Api, reqparse, abort, marshal, fields from flask_cors import CORS from prometheus_flask_exporter import RESTfulPrometheusMetrics # Initialize Flask app = Flask(__name__) CORS(app) api = Api(app) metrics = RESTfulPrometheusMetrics(app, api) metrics.info('app...
43.719298
281
0.723917
0c612110dbd0e9912240b4fb00c31719d14138a5
3,352
py
Python
app.py
computereng/LINEBOT-PY
f33e3bbd48b9244092247829ba7681db2185d4b2
[ "Apache-2.0" ]
null
null
null
app.py
computereng/LINEBOT-PY
f33e3bbd48b9244092247829ba7681db2185d4b2
[ "Apache-2.0" ]
null
null
null
app.py
computereng/LINEBOT-PY
f33e3bbd48b9244092247829ba7681db2185d4b2
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
32.230769
199
0.714499
2c29034cb2b1cb66e3c7cc4cc0e4dda2ea03b753
529
py
Python
ricohcloudcli/ips/filter/commands.py
ricohapi/ricoh-cloud-cli
e82ac8977c0cc5adbac5da4eb30161dc56528ccc
[ "MIT" ]
1
2018-06-28T22:21:25.000Z
2018-06-28T22:21:25.000Z
ricohcloudcli/ips/filter/commands.py
ricohapi/ricoh-cloud-cli
e82ac8977c0cc5adbac5da4eb30161dc56528ccc
[ "MIT" ]
null
null
null
ricohcloudcli/ips/filter/commands.py
ricohapi/ricoh-cloud-cli
e82ac8977c0cc5adbac5da4eb30161dc56528ccc
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2017 Ricoh Co., Ltd. All Rights Reserved. ''' filter commands for Image Processing Service. ''' import click from . import util from .types.blur import blur from .types.gaussian import gaussian from .types.median import median @click.group(help=util.HELP_FILTER, context_settin...
22.041667
75
0.752363
d4bd3865108fde2ed08020bf9d0e897ee4354a16
57
py
Python
notebooks/_solutions/case-curieuzeneuzen-air-quality27.py
jorisvandenbossche/DS-python-geospatial
893a12edc5c203a75815f6dcb5f1e18c577c8cd5
[ "BSD-3-Clause" ]
58
2020-10-09T10:10:59.000Z
2022-03-07T14:58:07.000Z
notebooks/_solutions/case-curieuzeneuzen-air-quality27.py
amitkb3/DS-python-geospatial
5f156ebff67e06d59b2a7ef446d1fed746ce0650
[ "BSD-3-Clause" ]
24
2020-09-30T19:57:14.000Z
2021-10-05T07:21:09.000Z
notebooks/_solutions/case-curieuzeneuzen-air-quality27.py
amitkb3/DS-python-geospatial
5f156ebff67e06d59b2a7ef446d1fed746ce0650
[ "BSD-3-Clause" ]
19
2020-10-05T09:32:18.000Z
2022-03-20T00:09:14.000Z
muni_no2.plot(column="no2", figsize=(16, 5), legend=True)
57
57
0.719298
b40cd8326b258283195e5f3ac6a4eeb019ad0341
2,777
py
Python
xidplus/cigale.py
MCarmenCampos/XID_plus
c031366b48486d229ac96d4eb4f547faf5227c25
[ "MIT" ]
null
null
null
xidplus/cigale.py
MCarmenCampos/XID_plus
c031366b48486d229ac96d4eb4f547faf5227c25
[ "MIT" ]
null
null
null
xidplus/cigale.py
MCarmenCampos/XID_plus
c031366b48486d229ac96d4eb4f547faf5227c25
[ "MIT" ]
null
null
null
import subprocess import os import numpy as np from astropy.table import Table def generate_SED(parameter_names,path_to_cigale,path_to_ini_file,filename='tmp',output_table_path='CIGALE_sed.fits'): # open the template cigale file fin = open(path_to_cigale + path_to_ini_file) # open the standard pcigale ini...
42.075758
117
0.60641
426803ae145de9b932ea159ba1c87279b6f01d9b
1,176
py
Python
apps/georefApp/views.py
75RAUL/georef
f21658bb5d765f04dce10c9e5b9a8942a76011c2
[ "NASA-1.3", "Apache-2.0" ]
6
2017-07-13T21:09:24.000Z
2021-12-09T16:52:01.000Z
apps/georefApp/views.py
75RAUL/georef
f21658bb5d765f04dce10c9e5b9a8942a76011c2
[ "NASA-1.3", "Apache-2.0" ]
1
2021-06-01T20:08:03.000Z
2021-06-01T20:08:03.000Z
apps/georefApp/views.py
75RAUL/georef
f21658bb5d765f04dce10c9e5b9a8942a76011c2
[ "NASA-1.3", "Apache-2.0" ]
16
2017-07-16T03:02:38.000Z
2022-02-26T19:30:00.000Z
#__BEGIN_LICENSE__ # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # All rights reserved. # # The GeoRef platform is licensed under the Apache License, Version 2.0 # (the "License"); you may not use this file except in complianc...
39.2
83
0.739796
2dcd65edcbf9fba8c006eb7244c428dbc3673d27
1,601
py
Python
examples/python/helloworld/greeter_client.py
dinara92/grpc
53d82af98c2ac243c45ac28c57062273d03cd9dd
[ "Apache-2.0" ]
null
null
null
examples/python/helloworld/greeter_client.py
dinara92/grpc
53d82af98c2ac243c45ac28c57062273d03cd9dd
[ "Apache-2.0" ]
1
2021-06-01T23:05:01.000Z
2021-06-01T23:05:01.000Z
examples/python/helloworld/greeter_client.py
dinara92/grpc
53d82af98c2ac243c45ac28c57062273d03cd9dd
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
37.232558
78
0.747658
3104595b89fa2f7c838e3860f95fab6fc2fca487
87,021
py
Python
sysinv/sysinv/sysinv/sysinv/agent/manager.py
starlingx-staging/stx-config
ccbf0392d1941e7cad6673f6351bd905a5a5d419
[ "Apache-2.0" ]
null
null
null
sysinv/sysinv/sysinv/sysinv/agent/manager.py
starlingx-staging/stx-config
ccbf0392d1941e7cad6673f6351bd905a5a5d419
[ "Apache-2.0" ]
null
null
null
sysinv/sysinv/sysinv/sysinv/agent/manager.py
starlingx-staging/stx-config
ccbf0392d1941e7cad6673f6351bd905a5a5d419
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # coding=utf-8 # Copyright 2013 Hewlett-Packard Development Company, L.P. # Copyright 2013 International Business Machines Corporation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compl...
43.467033
111
0.565921
34acf876ca49eb6453823a8818980147313b18f8
374
py
Python
celery_worker.py
RubyHome/Parking-Dev
20f5e1c44160ecc80b65ef0df63f1cd96e2de564
[ "BSD-3-Clause" ]
null
null
null
celery_worker.py
RubyHome/Parking-Dev
20f5e1c44160ecc80b65ef0df63f1cd96e2de564
[ "BSD-3-Clause" ]
null
null
null
celery_worker.py
RubyHome/Parking-Dev
20f5e1c44160ecc80b65ef0df63f1cd96e2de564
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import os from myflaskapp.app import celery, create_app """ creates the app and pushes an app context. Celery also needs access to the celery instance, so it is imported from the app package. !!enable celery from cli with: celery worker -A celery_worker.celery --loglevel=info """ app = create_ap...
34
88
0.748663
f4ba019899d23f3714e66a85c18b3b0bac1c9402
873
py
Python
sfepy/physics/extmods/setup.py
olivierverdier/sfepy
83aefb7b33ea17f4acb83388ba8bc7314c77616c
[ "BSD-3-Clause" ]
1
2015-07-30T13:47:23.000Z
2015-07-30T13:47:23.000Z
sfepy/physics/extmods/setup.py
olivierverdier/sfepy
83aefb7b33ea17f4acb83388ba8bc7314c77616c
[ "BSD-3-Clause" ]
null
null
null
sfepy/physics/extmods/setup.py
olivierverdier/sfepy
83aefb7b33ea17f4acb83388ba8bc7314c77616c
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python def configuration(parent_package='', top_path=None): import distutils.sysconfig as sysc from numpy.distutils.misc_util import Configuration import os.path as op auto_dir = op.dirname(__file__) auto_name = op.split(auto_dir)[-1] config = Configuration(auto_name, parent_pac...
31.178571
70
0.573883
4e43eaefd25aad1dab42fc0ca5fb636c5f2e481d
12,492
py
Python
release/rtool.py
magnologan/mitmproxy
18dd84b9081fb5552d5b5b2560405496445e2110
[ "MIT" ]
null
null
null
release/rtool.py
magnologan/mitmproxy
18dd84b9081fb5552d5b5b2560405496445e2110
[ "MIT" ]
null
null
null
release/rtool.py
magnologan/mitmproxy
18dd84b9081fb5552d5b5b2560405496445e2110
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import absolute_import, print_function, division from os.path import join import contextlib import os import shutil import subprocess import re import shlex import runpy import zipfile import tarfile import platform import click import pysftp import fnmatch # https://virtualenv.py...
32.195876
138
0.584134
957ca1e71afad0dbe01160bf6dd4fe019d7fbee1
11,299
py
Python
admin_reports/reports.py
relwell/django-admin-reports
56c55be8e4f42395cc1a0fae7f83bd0ca23932f3
[ "BSD-3-Clause" ]
null
null
null
admin_reports/reports.py
relwell/django-admin-reports
56c55be8e4f42395cc1a0fae7f83bd0ca23932f3
[ "BSD-3-Clause" ]
null
null
null
admin_reports/reports.py
relwell/django-admin-reports
56c55be8e4f42395cc1a0fae7f83bd0ca23932f3
[ "BSD-3-Clause" ]
3
2019-07-15T21:58:35.000Z
2019-07-15T22:19:08.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings try: from django.db.models.query import QuerySet, ValuesQuerySet except ImportError: # django >= 1.9 does not have ValuesQuerySet anymore from django.db.models.query import QuerySet, ModelIterable from django....
31.64986
88
0.554208
ca47e37b483691142f20341559fef8274d1c9684
4,084
py
Python
scripts/filter/bitext-match-lang.py
fah-123/OPUS-MT-train
395691006e396f5f911658fa0eadd9cc7e6fca1e
[ "MIT" ]
116
2020-01-22T16:40:55.000Z
2022-03-31T04:40:40.000Z
scripts/filter/bitext-match-lang.py
fah-123/OPUS-MT-train
395691006e396f5f911658fa0eadd9cc7e6fca1e
[ "MIT" ]
66
2020-01-22T11:56:55.000Z
2022-03-22T05:52:37.000Z
scripts/filter/bitext-match-lang.py
fah-123/OPUS-MT-train
395691006e396f5f911658fa0eadd9cc7e6fca1e
[ "MIT" ]
17
2020-01-25T07:02:43.000Z
2022-01-09T00:53:01.000Z
#!/usr/bin/env python3 #-*-python-*- import pycld2 as cld2 from iso639 import languages import sys import argparse parser = argparse.ArgumentParser(description='language filter') parser.add_argument('-s','--srclang','--source-language', type=str, default='en', help='accepted language') parser.add_...
33.203252
117
0.604065
d434e0a20a3c03c8a318f16885ac58d01bc01009
287
py
Python
packages/esp32_LoBo/master/esp32_LoBo/stubs/heapq.py
TheVinhLuong102/micropy-stubs
55ff1773008f7c4dfc3d70a403986486226eb6b3
[ "MIT" ]
18
2019-07-11T13:31:09.000Z
2022-01-27T06:38:40.000Z
packages/esp32_LoBo/master/esp32_LoBo/stubs/heapq.py
TheVinhLuong102/micropy-stubs
55ff1773008f7c4dfc3d70a403986486226eb6b3
[ "MIT" ]
9
2019-09-01T21:44:49.000Z
2022-02-04T20:55:08.000Z
packages/esp32_LoBo/master/esp32_LoBo/stubs/heapq.py
TheVinhLuong102/micropy-stubs
55ff1773008f7c4dfc3d70a403986486226eb6b3
[ "MIT" ]
6
2019-10-08T05:31:21.000Z
2021-04-22T10:21:01.000Z
""" Module: 'heapq' on esp32_LoBo 3.2.24 """ # MCU: (sysname='esp32_LoBo', nodename='esp32_LoBo', release='3.2.24', version='ESP32_LoBo_v3.2.24 on 2018-09-06', machine='ESP32 board with ESP32') # Stubber: 1.2.0 def heapify(): pass def heappop(): pass def heappush(): pass
19.133333
148
0.655052
7c311397aea057ae5cb79fc3958517ede2ff6eef
397
py
Python
app/utils.py
nsorros/Neural-ParsCit
f14d23ae44e17ef7e4e0943e737931ad4328a95b
[ "MIT" ]
62
2018-04-04T22:08:30.000Z
2022-03-11T06:45:23.000Z
app/utils.py
nsorros/Neural-ParsCit
f14d23ae44e17ef7e4e0943e737931ad4328a95b
[ "MIT" ]
25
2018-07-06T12:13:52.000Z
2021-07-31T01:33:00.000Z
app/utils.py
nsorros/Neural-ParsCit
f14d23ae44e17ef7e4e0943e737931ad4328a95b
[ "MIT" ]
12
2018-07-09T14:17:48.000Z
2021-07-21T22:04:22.000Z
import os from flask import current_app, g from model import Model def get_model(model_path, embedding_path): if 'model' not in g: g.model = Model(model_path=model_path) g.model.parameters['pre_emb'] = os.path.join(os.getcwd(), embedding_path) g.inference = g.model.build(training=False, **g...
30.538462
81
0.690176
f05699f9b303586f8361069b370dc0696c514429
3,954
py
Python
bin/pcr.py
muxiaoxiong/CrisprDiag
6e29806d8e160e88380c31860cf0fdf803059372
[ "Apache-2.0" ]
null
null
null
bin/pcr.py
muxiaoxiong/CrisprDiag
6e29806d8e160e88380c31860cf0fdf803059372
[ "Apache-2.0" ]
null
null
null
bin/pcr.py
muxiaoxiong/CrisprDiag
6e29806d8e160e88380c31860cf0fdf803059372
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Date : 2020-12-10 10:18:34 # @Author : Muxiaoxiong # @email : xiongweinie@foxmail.com """ 引物设计原则 引物与非特异扩增序列的同源性不要超过70%或有连续8个互补碱基同源。 引物长度为15~30bp,一般为20~27mer G+C含量一般为40%~60% Tm=58-60度 GC=30-80%。 3'端最后5个碱基内不能有多于2个的G或C. 引物中四种碱基的分布最好是随机的,不要有聚嘌呤或聚嘧啶的存在。尤其3′端不应超过3个连续...
30.415385
189
0.477744
260d94c8b41e2acd2b81f8534fa0e49410a6220a
30,073
py
Python
infoblox_client/objects.py
bondar-pavel/infoblox-client
afe4f3137ef58d3abcdba3afc201a7a7bec9f23c
[ "Apache-2.0" ]
1
2019-08-06T18:45:43.000Z
2019-08-06T18:45:43.000Z
infoblox_client/objects.py
bondar-pavel/infoblox-client
afe4f3137ef58d3abcdba3afc201a7a7bec9f23c
[ "Apache-2.0" ]
1
2018-04-17T19:38:05.000Z
2018-04-17T19:38:05.000Z
infoblox_client/objects.py
bondar-pavel/infoblox-client
afe4f3137ef58d3abcdba3afc201a7a7bec9f23c
[ "Apache-2.0" ]
3
2015-09-21T17:13:06.000Z
2018-04-17T18:59:50.000Z
# Copyright 2015 Infoblox Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
32.652552
79
0.616034
38a9514b9e5f8eff16322d20a909b173a63dcfae
37
py
Python
Codeforces/Archives/April Fools 2018/A.py
lxdlam/ACM
cde519ef9732ff9e4e9e3f53c00fb30d07bdb306
[ "MIT" ]
1
2017-10-25T13:33:27.000Z
2017-10-25T13:33:27.000Z
Codeforces/Archives/April Fools 2018/A.py
lxdlam/ACM
cde519ef9732ff9e4e9e3f53c00fb30d07bdb306
[ "MIT" ]
null
null
null
Codeforces/Archives/April Fools 2018/A.py
lxdlam/ACM
cde519ef9732ff9e4e9e3f53c00fb30d07bdb306
[ "MIT" ]
1
2021-05-05T01:16:28.000Z
2021-05-05T01:16:28.000Z
print(1 if (int(input()) & 1) else 0)
37
37
0.594595
c84b7a45c0199327b2b12a594c026320aa9770bd
1,125
py
Python
algs/src/python/coding_jam/ComplexNumberMult.py
sivikt/14m2-alg
38a07ef26de0cc857a5ad389c2987d57a69d23d4
[ "Unlicense" ]
1
2015-02-13T19:05:30.000Z
2015-02-13T19:05:30.000Z
algs/src/python/coding_jam/ComplexNumberMult.py
sivikt/14m2-alg
38a07ef26de0cc857a5ad389c2987d57a69d23d4
[ "Unlicense" ]
null
null
null
algs/src/python/coding_jam/ComplexNumberMult.py
sivikt/14m2-alg
38a07ef26de0cc857a5ad389c2987d57a69d23d4
[ "Unlicense" ]
null
null
null
""" A complex number can be represented as a string on the form "real+imaginaryi" where: real is the real part and is an integer in the range [-100, 100]. imaginary is the imaginary part and is an integer in the range [-100, 100]. i^2 == -1. Given two complex numbers num1 and num2 as strings, return a stri...
32.142857
100
0.593778
a4ddb62b4241550ffeef5c64baae1b19de65e49c
1,915
py
Python
src/easy_graphql_server/exceptions.py
mathieurodic/easy-graphql
80a42bfe0fab72f61438df37dcc3bbc42e5df485
[ "MIT" ]
1
2022-01-25T14:32:52.000Z
2022-01-25T14:32:52.000Z
src/easy_graphql_server/exceptions.py
mathieurodic/easy-graphql
80a42bfe0fab72f61438df37dcc3bbc42e5df485
[ "MIT" ]
2
2022-01-19T11:54:20.000Z
2022-01-31T14:46:32.000Z
src/easy_graphql_server/exceptions.py
mathieurodic/easy-graphql-server
80a42bfe0fab72f61438df37dcc3bbc42e5df485
[ "MIT" ]
null
null
null
""" Definition of easily serializable exceptions, meant to be thrown from the GraphQL API. """ import json class BaseError(Exception): """ Base exception for `easy_graphql_server` """ def __init__(self, error, payload): message = json.dumps({ 'error': error, 'p...
26.597222
90
0.607833
db3661452343f146bd2d90759134cb3087572411
7,779
py
Python
glue/core/data_factories/fits.py
tiagopereira/glue
85bf7ce2d252d7bc405e8160b56fc83d46b9cbe4
[ "BSD-3-Clause" ]
1
2019-12-17T07:58:35.000Z
2019-12-17T07:58:35.000Z
glue/core/data_factories/fits.py
scalet98/glue
ff949ad52e205c20561f48c05f870b2abb39e0b0
[ "BSD-3-Clause" ]
null
null
null
glue/core/data_factories/fits.py
scalet98/glue
ff949ad52e205c20561f48c05f870b2abb39e0b0
[ "BSD-3-Clause" ]
1
2019-08-04T14:10:12.000Z
2019-08-04T14:10:12.000Z
from __future__ import absolute_import, division, print_function import gzip import warnings from os.path import basename from collections import OrderedDict from glue.core.coordinates import coordinates_from_header, WCSCoordinates from glue.core.data import Component, Data from glue.config import data_factory, qglue...
31.881148
112
0.603291
25ab976c274299c79599917830198668f5758661
8,367
py
Python
fat/client.py
samuelvanderwaal/fat-py
46f2eeafd202ea47befc3c516220605eca6111b3
[ "MIT" ]
2
2019-12-02T11:23:51.000Z
2021-01-12T15:05:22.000Z
fat/client.py
samuelvanderwaal/fat-py
46f2eeafd202ea47befc3c516220605eca6111b3
[ "MIT" ]
null
null
null
fat/client.py
samuelvanderwaal/fat-py
46f2eeafd202ea47befc3c516220605eca6111b3
[ "MIT" ]
1
2021-01-17T12:54:49.000Z
2021-01-17T12:54:49.000Z
import random import string from typing import Union from urllib.parse import urljoin from .fat0.transactions import Transaction from .errors import handle_error_response, InvalidParam, MissingRequiredParameter from .session import APISession from factom_keys.fct import FactoidAddress class BaseAPI(object): def _...
41.626866
114
0.64109
3486668d04e3124597749c2b281b571596354fe5
3,447
py
Python
ermia/dbcore/burt-hash.py
sam1016yu/cicada-exp-sigmod2017
64e582370076b2923d37b279d1c32730babc15f8
[ "Apache-2.0" ]
null
null
null
ermia/dbcore/burt-hash.py
sam1016yu/cicada-exp-sigmod2017
64e582370076b2923d37b279d1c32730babc15f8
[ "Apache-2.0" ]
null
null
null
ermia/dbcore/burt-hash.py
sam1016yu/cicada-exp-sigmod2017
64e582370076b2923d37b279d1c32730babc15f8
[ "Apache-2.0" ]
null
null
null
# see http://burtleburtle.net/bob/hash/integer.html hash_constants = ''' 38 113 41 68 35 74 111 38 113 42 69 35 73 112 38 114 9 100 35 107 46 38 114 11 66 8 68 112 38 114 42 69 35 73 112 38 114 78 37 71 35 111 39 113 41 68 2 74 112 39 114 9 101 2 107 17 39 114 9 101 2 107 49 39 1...
27.357143
91
0.532057
c231dcab7873933e458a931f9eec76e5fa1dfb48
1,664
py
Python
siamban/models/loss.py
QiangliangHuang/siamban
940208cb26f8146f87f7534d1674791dcb62468a
[ "Apache-2.0" ]
216
2020-03-17T03:29:15.000Z
2022-03-25T13:51:37.000Z
siamban/models/loss.py
QiangliangHuang/siamban
940208cb26f8146f87f7534d1674791dcb62468a
[ "Apache-2.0" ]
64
2020-04-20T01:17:06.000Z
2022-01-05T07:08:33.000Z
siamban/models/loss.py
QiangliangHuang/siamban
940208cb26f8146f87f7534d1674791dcb62468a
[ "Apache-2.0" ]
52
2020-05-09T12:43:33.000Z
2022-03-23T11:38:38.000Z
# Copyright (c) SenseTime. All Rights Reserved. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from siamban.core.config import cf...
29.192982
60
0.685697
cac9b9ae520b1ea7f7a1ee5ac193e99ed81743e8
10,450
py
Python
mlflow/sagemaker/cli.py
akarloff/mlflow
be9774a76b4b6dcdb8cc2147a93d7c8676438292
[ "Apache-2.0" ]
3
2018-10-16T16:34:46.000Z
2020-01-08T09:34:34.000Z
mlflow/sagemaker/cli.py
akarloff/mlflow
be9774a76b4b6dcdb8cc2147a93d7c8676438292
[ "Apache-2.0" ]
15
2019-10-07T01:11:46.000Z
2022-03-08T23:33:53.000Z
mlflow/sagemaker/cli.py
akarloff/mlflow
be9774a76b4b6dcdb8cc2147a93d7c8676438292
[ "Apache-2.0" ]
6
2019-11-28T13:23:35.000Z
2020-07-08T19:22:12.000Z
from __future__ import print_function import os import json import click import mlflow import mlflow.sagemaker from mlflow.sagemaker import DEFAULT_IMAGE_NAME as IMAGE from mlflow.utils import cli_args import mlflow.models.docker_utils @click.group("sagemaker") def commands(): """ Serve models on SageMaker...
55.291005
100
0.659043
76f657da7594395d3b818add39235195406263f3
1,221
py
Python
argopy/tests/test_errors.py
jtomfarrar/argopy
19c6e76b8594e9f6a59b27abc9fce93ed0219445
[ "Apache-2.0" ]
null
null
null
argopy/tests/test_errors.py
jtomfarrar/argopy
19c6e76b8594e9f6a59b27abc9fce93ed0219445
[ "Apache-2.0" ]
null
null
null
argopy/tests/test_errors.py
jtomfarrar/argopy
19c6e76b8594e9f6a59b27abc9fce93ed0219445
[ "Apache-2.0" ]
null
null
null
import pytest from argopy.errors import NetCDF4FileNotFoundError, \ UnrecognisedDataSelectionMode, \ UnrecognisedProfileDirection, \ InvalidDatasetStructure, \ InvalidFetcherAccessPoint, \ InvalidFetcher def test_NetCDF4FileNotFoundError(): def foobar(): raise NetCDF4FileNotFoundError(...
26.543478
54
0.722359
f7eb82f79b062ccbbff6106b03a29f099f74f83a
1,068
py
Python
docs/examples/storage/create_directory_backup_stream_to_cf.py
rgharris/libcloud
90971e17bfd7b6bb97b2489986472c531cc8e140
[ "Apache-2.0" ]
null
null
null
docs/examples/storage/create_directory_backup_stream_to_cf.py
rgharris/libcloud
90971e17bfd7b6bb97b2489986472c531cc8e140
[ "Apache-2.0" ]
1
2021-12-06T12:29:13.000Z
2021-12-06T12:29:13.000Z
docs/examples/storage/create_directory_backup_stream_to_cf.py
rgharris/libcloud
90971e17bfd7b6bb97b2489986472c531cc8e140
[ "Apache-2.0" ]
1
2019-08-05T10:12:02.000Z
2019-08-05T10:12:02.000Z
import subprocess from datetime import datetime from libcloud.storage.types import Provider, ContainerDoesNotExistError from libcloud.storage.providers import get_driver driver = get_driver(Provider.CLOUDFILES_US)("username", "api key") directory = "/home/some/path" cmd = "tar cvzpf - %s" % (directory) object_name ...
31.411765
75
0.753745
c4fb3ca2b995a15c31bd27220a5221ec711bccfb
18,684
py
Python
core/losses.py
arpit6232/Cuda_Accelerated_LidarNet
c9a0a284208a4cb508467ee3c9e683d802b868cc
[ "MIT" ]
1
2022-02-24T06:49:31.000Z
2022-02-24T06:49:31.000Z
core/losses.py
arpit6232/Cuda_Accelerated_LidarNet
c9a0a284208a4cb508467ee3c9e683d802b868cc
[ "MIT" ]
null
null
null
core/losses.py
arpit6232/Cuda_Accelerated_LidarNet
c9a0a284208a4cb508467ee3c9e683d802b868cc
[ "MIT" ]
null
null
null
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
40.094421
81
0.694177
905ff7521d5c15e848cbb7639daa8b1fac1aed67
3,615
py
Python
Reducer/stats_of_image_neighborhoods.py
guy1ziv2/earthengine-py-notebooks
931f57c61c147fe6cff745c2a099a444716e69e4
[ "MIT" ]
1
2020-03-27T16:01:40.000Z
2020-03-27T16:01:40.000Z
Reducer/stats_of_image_neighborhoods.py
guy1ziv2/earthengine-py-notebooks
931f57c61c147fe6cff745c2a099a444716e69e4
[ "MIT" ]
null
null
null
Reducer/stats_of_image_neighborhoods.py
guy1ziv2/earthengine-py-notebooks
931f57c61c147fe6cff745c2a099a444716e69e4
[ "MIT" ]
1
2020-12-23T16:29:51.000Z
2020-12-23T16:29:51.000Z
''' <table class="ee-notebook-buttons" align="left"> <td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Reducer/stats_of_image_neighborhoods.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td> <td><a targ...
36.887755
422
0.726418
65c3acbfd98fbf100e0f3a3d33923197b490b8dd
25,065
py
Python
qualifier/deploy/cohorte-home/repo/pelix/remote/beans.py
isandlaTech/cohorte-devtools
9ba9021369188d2f0ad5c845ef242fd5a7097b57
[ "Apache-2.0" ]
1
2017-03-04T14:37:15.000Z
2017-03-04T14:37:15.000Z
qualifier/deploy/cohorte-home/repo/pelix/remote/beans.py
isandlaTech/cohorte-devtools
9ba9021369188d2f0ad5c845ef242fd5a7097b57
[ "Apache-2.0" ]
4
2017-08-21T08:17:14.000Z
2018-03-02T13:51:43.000Z
qualifier/deploy/cohorte-home/repo/pelix/remote/beans.py
isandlaTech/cohorte-devtools
9ba9021369188d2f0ad5c845ef242fd5a7097b57
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ Pelix remote services: Specifications handling utility methods :author: Thomas Calmant :copyright: Copyright 2016, Thomas Calmant :license: Apache License 2.0 :version: 0.6.4 .. Copyright 2016 Thomas Calmant Licensed under the Apache License, Version...
30.235223
80
0.609934
40fb00c510235537ef3021fce722e02a924d8925
6,622
py
Python
src/python/main.py
Civil/EntityFX-Bench
ccc664e372f2319e53cbd96fb22317a76eff2b2a
[ "MIT" ]
1
2020-09-30T14:07:36.000Z
2020-09-30T14:07:36.000Z
src/python/main.py
Civil/EntityFX-Bench
ccc664e372f2319e53cbd96fb22317a76eff2b2a
[ "MIT" ]
null
null
null
src/python/main.py
Civil/EntityFX-Bench
ccc664e372f2319e53cbd96fb22317a76eff2b2a
[ "MIT" ]
null
null
null
from entityfx import benchmark, benchmark_base, writer from entityfx.arithemtics_benchmark import ArithemticsBenchmark from entityfx.parallel_arithemtics_benchmark import ParallelArithemticsBenchmark from entityfx.math_benchmark import MathBenchmark from entityfx.parallel_math_benchmark import ParallelMathBenchmark fro...
32.62069
142
0.767291
1d9851024b3335b36a701fb0d15b2a5592f61fac
832
py
Python
manage.py
StephenTao/blog-dashboard
a6f55e005b86b8334a8b19a9bf03a313f5e814ca
[ "Apache-2.0" ]
null
null
null
manage.py
StephenTao/blog-dashboard
a6f55e005b86b8334a8b19a9bf03a313f5e814ca
[ "Apache-2.0" ]
null
null
null
manage.py
StephenTao/blog-dashboard
a6f55e005b86b8334a8b19a9bf03a313f5e814ca
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwar...
34.666667
75
0.74399
4c0504da0cbca363b558b6cb865bd8fd33a1c4e6
7,150
py
Python
group.py
JohnAdriaan/uPHue
e5ca5a63a3f16c62440ecab09a3192efa72301fd
[ "MIT" ]
null
null
null
group.py
JohnAdriaan/uPHue
e5ca5a63a3f16c62440ecab09a3192efa72301fd
[ "MIT" ]
null
null
null
group.py
JohnAdriaan/uPHue
e5ca5a63a3f16c62440ecab09a3192efa72301fd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from uPHue import * from uPHue.light import Light class Group(Light): """ A group of Hue lights, tracked as a group on the bridge Example: >>> b = Bridge() >>> gb = Group.Bridge(b) >>> g1 = Group(gb, 1) >>> g1.hue = 50000 # all lights in that group t...
36.666667
114
0.553007
54065e9a7a71c2b84012b7200f15424dd9ac0d58
2,011
py
Python
tests/learn/dl/test_trainer.py
GHzytp/pycroscopy
8d83478305b8bbbcea1e2bf50045f0c816282c77
[ "MIT" ]
1
2016-06-08T21:07:14.000Z
2016-06-08T21:07:14.000Z
tests/learn/dl/test_trainer.py
GHzytp/pycroscopy
8d83478305b8bbbcea1e2bf50045f0c816282c77
[ "MIT" ]
null
null
null
tests/learn/dl/test_trainer.py
GHzytp/pycroscopy
8d83478305b8bbbcea1e2bf50045f0c816282c77
[ "MIT" ]
null
null
null
import sys import pytest import numpy as np import torch from numpy.testing import assert_ import unittest sys.path.append("../../../") from pycroscopy.learn import Trainer, models def assert_weights_equal(m1, m2): eq_w = [] for p1, p2 in zip(m1.values(), m2.values()): eq_w.append(np.array_equal( ...
32.435484
89
0.656887
474e0ad9a97e4bde17132094251f5135d2fbbbaa
2,100
py
Python
rcnn/utils/load_model.py
platoTao/Faster-RCNN-Comments
57a7cdc182d741a7d529ad9a0a1d425a6db22e77
[ "Apache-2.0" ]
null
null
null
rcnn/utils/load_model.py
platoTao/Faster-RCNN-Comments
57a7cdc182d741a7d529ad9a0a1d425a6db22e77
[ "Apache-2.0" ]
null
null
null
rcnn/utils/load_model.py
platoTao/Faster-RCNN-Comments
57a7cdc182d741a7d529ad9a0a1d425a6db22e77
[ "Apache-2.0" ]
null
null
null
import mxnet as mx def load_checkpoint(prefix, epoch): """ Load model checkpoint from file. :param prefix: Prefix of model name. :param epoch: Epoch number of model we would like to load. :return: (arg_params, aux_params) arg_params : dict of str to NDArray Model parameter, dict of nam...
32.8125
76
0.638571
97bf506cb2ab1b47f83697dad50529bdc07acc94
260
py
Python
app/recipe/serializers.py
murhussain/recipe-app-api
a3282d3f20d19299afdcfbffb4dcd766da697059
[ "MIT" ]
null
null
null
app/recipe/serializers.py
murhussain/recipe-app-api
a3282d3f20d19299afdcfbffb4dcd766da697059
[ "MIT" ]
null
null
null
app/recipe/serializers.py
murhussain/recipe-app-api
a3282d3f20d19299afdcfbffb4dcd766da697059
[ "MIT" ]
null
null
null
from rest_framework import serializers from core.models import Tag class TagSerializer(serializers.ModelSerializer): """SERIALIZER FOR TAG OBJECTS""" class Meta: model = Tag fields = ('id', 'name') read_only_fields = ('id',)
21.666667
49
0.661538
7fb78210cd56bda2762fbbb955fa1a955d6e2166
10,753
py
Python
config/rooms/args_room_varibad.py
lmzintgraf/hyperx
ef1c3a4dbe2e9b9eaa0d3706c18f5cbe3ddb9174
[ "MIT" ]
8
2021-06-08T14:29:26.000Z
2022-02-11T13:54:09.000Z
config/rooms/args_room_varibad.py
lmzintgraf/hyperx
ef1c3a4dbe2e9b9eaa0d3706c18f5cbe3ddb9174
[ "MIT" ]
null
null
null
config/rooms/args_room_varibad.py
lmzintgraf/hyperx
ef1c3a4dbe2e9b9eaa0d3706c18f5cbe3ddb9174
[ "MIT" ]
1
2021-12-09T21:43:08.000Z
2021-12-09T21:43:08.000Z
import argparse from utils.helpers import boolean_argument def get_args(rest_args): parser = argparse.ArgumentParser() # --- GENERAL --- parser.add_argument('--num_frames', type=int, default=1e8, help='number of frames to train') parser.add_argument('--max_rollouts_per_task', type=int, default=1, h...
67.20625
120
0.69655
3217198186bcadf707322c0069c3c196e1b79ee0
14,073
py
Python
nicos/guisupport/plots.py
ebadkamil/nicos
0355a970d627aae170c93292f08f95759c97f3b5
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
12
2019-11-06T15:40:36.000Z
2022-01-01T16:23:00.000Z
nicos/guisupport/plots.py
ebadkamil/nicos
0355a970d627aae170c93292f08f95759c97f3b5
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
4
2019-11-08T10:18:16.000Z
2021-01-13T13:07:29.000Z
nicos/guisupport/plots.py
ISISComputingGroup/nicos
94cb4d172815919481f8c6ee686f21ebb76f2068
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
6
2020-01-11T10:52:30.000Z
2022-02-25T12:35:23.000Z
# -*- coding: utf-8 -*- # ***************************************************************************** # NICOS, the Networked Instrument Control System of the MLZ # Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS) # # This program is free software; you can redistribute it and/or modify it under # the t...
36.458549
79
0.63732
8198c0a7e57535af0de38b9ec11d23bc45e8ef40
927
py
Python
workplanner/enums.py
pavelmaksimov/work-planner
e6659e7e00520d32b8bc622909990ba3522046da
[ "Apache-2.0" ]
null
null
null
workplanner/enums.py
pavelmaksimov/work-planner
e6659e7e00520d32b8bc622909990ba3522046da
[ "Apache-2.0" ]
null
null
null
workplanner/enums.py
pavelmaksimov/work-planner
e6659e7e00520d32b8bc622909990ba3522046da
[ "Apache-2.0" ]
null
null
null
from typing import Literal class Statuses: add = "ADD" run = "RUN" success = "SUCCESS" error = "ERROR" fatal_error = "FATAL_ERROR" error_statuses = (error, fatal_error) run_statuses = (run,) LiteralT = Literal[add, run, success, error, fatal_error] class Error: expired = "Expired...
17.826923
61
0.540453
0a7652d65c8cc27bb0c4cf3a617becd50a0bcc10
14,258
py
Python
twilio/rest/supersim/v1/usage_record.py
angmunpri/twilio-python
d6ed1098f4bc06529d68f965eabdf87642ac441c
[ "MIT" ]
1
2022-03-12T08:56:51.000Z
2022-03-12T08:56:51.000Z
twilio/rest/supersim/v1/usage_record.py
angmunpri/twilio-python
d6ed1098f4bc06529d68f965eabdf87642ac441c
[ "MIT" ]
1
2022-03-03T05:32:47.000Z
2022-03-03T05:36:32.000Z
env/lib/python3.9/site-packages/twilio/rest/supersim/v1/usage_record.py
giannicrivello/AudioShack_BE
b50ba91b6904ac069fc37c98a691729932297b6a
[ "MIT" ]
null
null
null
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import serialize from twilio.base import values from twilio.base.instance_resource import InstanceResource from twilio.base.list_resource import L...
40.390935
191
0.647426
a4b2b844666bd86ff207ef659e9a211017b6ce0e
1,799
py
Python
database.py
infinityrun/Replica_of_Google_keep
ee852f9c517e09106bceb29dbe2fdffc773539df
[ "MIT" ]
null
null
null
database.py
infinityrun/Replica_of_Google_keep
ee852f9c517e09106bceb29dbe2fdffc773539df
[ "MIT" ]
1
2020-03-13T20:14:30.000Z
2020-03-13T20:14:30.000Z
database.py
infinityrun/replica-of-google-keep
ee852f9c517e09106bceb29dbe2fdffc773539df
[ "MIT" ]
null
null
null
from sqlalchemy import Column, ForeignKey, Integer, String, Boolean from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship from sqlalchemy import create_engine Base = declarative_base() ### table for user ### class User(Base): __tablename__ = 'users' id = Column(Int...
26.455882
67
0.707615
da77e444502f70b00e21e7ba3ee52b28209a61ad
2,368
py
Python
cellular_automata/one_dimensional.py
jenia90/Python
696fb4a681ad9e4d84e0d2b894daf449a3e30b24
[ "MIT" ]
145,614
2016-07-21T05:40:05.000Z
2022-03-31T22:17:22.000Z
cellular_automata/one_dimensional.py
Agha-Muqarib/Python
04f156a8973d6156a4357e0717d9eb0aa264d086
[ "MIT" ]
3,987
2016-07-28T17:31:25.000Z
2022-03-30T23:07:46.000Z
cellular_automata/one_dimensional.py
Agha-Muqarib/Python
04f156a8973d6156a4357e0717d9eb0aa264d086
[ "MIT" ]
40,014
2016-07-26T15:14:41.000Z
2022-03-31T22:23:03.000Z
""" Return an image of 16 generations of one-dimensional cellular automata based on a given ruleset number https://mathworld.wolfram.com/ElementaryCellularAutomaton.html """ from __future__ import annotations from PIL import Image # Define the first generation of cells # fmt: off CELLS = [[0, 0, 0, 0, 0, 0, 0, 0, 0,...
31.573333
87
0.605997
73a9416e28e34c4626b2f98fa3f49df42e547941
1,127
py
Python
Chapter03/aws/s3_upload_download_file.py
yangwawa0323/Learning-Python-Networking-Second-Edition
5460fe4fb6acc5d0df19bf36e52ac09e9a11eb8b
[ "MIT" ]
52
2018-12-17T19:33:06.000Z
2022-03-25T18:14:02.000Z
Chapter03/aws/s3_upload_download_file.py
barretthugh/Learning-Python-Networking-Second-Edition
0f00b8b20c1c85e76754e47113dff8ca9e99d5ca
[ "MIT" ]
null
null
null
Chapter03/aws/s3_upload_download_file.py
barretthugh/Learning-Python-Networking-Second-Edition
0f00b8b20c1c85e76754e47113dff8ca9e99d5ca
[ "MIT" ]
38
2018-12-18T09:08:43.000Z
2022-02-06T02:53:05.000Z
import sys import requests import requests_aws4auth as aws4auth import xml.etree.ElementTree as ET import xml.dom.minidom as minidom access_id = '' access_key = '' region = 'eu-west-2' endpoint = 's3.{}.amazonaws.com'.format(region) auth = aws4auth.AWS4Auth(access_id, access_key, region, 's3') def xml_pprint(xml_str...
27.487805
61
0.718722
23cd7ee7609d890d0fa38e1fbc0e333f59d71622
1,882
py
Python
publish-docfx-to-confluence/confluence_client.py
blakharaz/publish-docfx-to-confluence
535ac7a4f14e7e216797b9dccc3f015b3168d23a
[ "MIT" ]
null
null
null
publish-docfx-to-confluence/confluence_client.py
blakharaz/publish-docfx-to-confluence
535ac7a4f14e7e216797b9dccc3f015b3168d23a
[ "MIT" ]
null
null
null
publish-docfx-to-confluence/confluence_client.py
blakharaz/publish-docfx-to-confluence
535ac7a4f14e7e216797b9dccc3f015b3168d23a
[ "MIT" ]
null
null
null
from urllib.parse import quote from pathlib import Path from atlassian import Confluence def create_placeholder_content(title: str): return f'<h1>{title}</h1><p>This is a placeholder</p>' class ConfluenceClient: def __init__(self, url, token, space): self.confluence = Confluence(url=url, ...
40.913043
121
0.636026
4222a0b0a7225f74b9c7a4e5f6a01a63182f3b5a
577
py
Python
irspack/dataset/movielens/ML20M.py
wararaki/irspack
650cc012924d46b3ecb87f1a6f806aee735a9559
[ "MIT" ]
null
null
null
irspack/dataset/movielens/ML20M.py
wararaki/irspack
650cc012924d46b3ecb87f1a6f806aee735a9559
[ "MIT" ]
null
null
null
irspack/dataset/movielens/ML20M.py
wararaki/irspack
650cc012924d46b3ecb87f1a6f806aee735a9559
[ "MIT" ]
null
null
null
import os from io import BytesIO import pandas as pd from .base import BaseMovieLenstDataLoader class MovieLens20MDataManager(BaseMovieLenstDataLoader): DOWNLOAD_URL = "http://files.grouplens.org/datasets/movielens/ml-20m.zip" DEFAULT_PATH = os.path.expanduser("~/.ml-20m.zip") INTERACTION_PATH = "ml-20m...
30.368421
77
0.700173
f1830272b2e969d5e9d4b977b924a031dc580a4b
3,249
py
Python
fastbook/__init__.py
spficklin/course20
030853af73f428a4857aeacc6219293bd476e808
[ "Apache-2.0" ]
1
2021-09-12T06:42:01.000Z
2021-09-12T06:42:01.000Z
fastbook/__init__.py
spficklin/course20
030853af73f428a4857aeacc6219293bd476e808
[ "Apache-2.0" ]
null
null
null
fastbook/__init__.py
spficklin/course20
030853af73f428a4857aeacc6219293bd476e808
[ "Apache-2.0" ]
null
null
null
__version__ = "0.0.14" import matplotlib as mpl, pkgutil from fastai.vision.all import * from pandas.api.types import CategoricalDtype from scipy.cluster import hierarchy as hc from io import StringIO, BytesIO try: from ipywidgets import widgets except ModuleNotFoundError: warn("Missing `ipywidgets` - please install i...
41.653846
109
0.738997
b2e9820cf6c6d44934ed4ce39455f741c100c6fb
188
py
Python
Lab10_Docker and docker compose/python/hello.py
ParthKalkar/system-and-network-administration
31b5150ed39dbcee78fb1626e6707b4bb54ed689
[ "Apache-2.0" ]
null
null
null
Lab10_Docker and docker compose/python/hello.py
ParthKalkar/system-and-network-administration
31b5150ed39dbcee78fb1626e6707b4bb54ed689
[ "Apache-2.0" ]
null
null
null
Lab10_Docker and docker compose/python/hello.py
ParthKalkar/system-and-network-administration
31b5150ed39dbcee78fb1626e6707b4bb54ed689
[ "Apache-2.0" ]
null
null
null
from flask import Flask app = Flask(__name__) @app.route("/") def hello_world(): return "<p>Hello, World!</p>" if __name__ == '__main__': app.run(debug=True,host='0.0.0.0')
17.090909
38
0.62234
3bef7dd024748f6f8a9f4d5dd57dc23fe9b971d2
5,635
py
Python
homeassistant/components/insteon/insteon_entity.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
6
2016-11-25T06:36:27.000Z
2021-11-16T11:20:23.000Z
homeassistant/components/insteon/insteon_entity.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
56
2020-08-03T07:30:54.000Z
2022-03-31T06:02:04.000Z
homeassistant/components/insteon/insteon_entity.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
14
2018-08-19T16:28:26.000Z
2021-09-02T18:26:53.000Z
"""Insteon base entity.""" import logging from pyinsteon import devices from homeassistant.core import callback from homeassistant.helpers.dispatcher import ( async_dispatcher_connect, async_dispatcher_send, ) from homeassistant.helpers.entity import Entity from .const import ( DOMAIN, SIGNAL_ADD_DEF...
35
125
0.650754
f8addfad5536e4231fa6bcb45d450cae8cff4c3f
611
py
Python
commands/newcate.py
HxHexa/spendings_tracker
912d5ef081173eb4cecf5aac6f404df4fbbf6561
[ "MIT" ]
null
null
null
commands/newcate.py
HxHexa/spendings_tracker
912d5ef081173eb4cecf5aac6f404df4fbbf6561
[ "MIT" ]
null
null
null
commands/newcate.py
HxHexa/spendings_tracker
912d5ef081173eb4cecf5aac6f404df4fbbf6561
[ "MIT" ]
null
null
null
#newcate #args: name #create a new category with name name from . import classes from . import globalvar import sys def newcate(args): if len(args.name) < 2: print('All names for category must be at least 2 characters long.') sys.exit(1) try: globalvar.masterCate[args.name] pri...
29.095238
75
0.657938
9f1d7f4cf47fb74f28687ef514417b96278b6cec
10,106
py
Python
pal/writer/instruction/libpal_rust.py
mars-research/pal
5977394cda8750ff5dcb89c2bf193ec1ef4cd137
[ "MIT" ]
26
2020-01-06T23:53:17.000Z
2022-02-01T08:58:21.000Z
pal/writer/instruction/libpal_rust.py
mars-research/pal
5977394cda8750ff5dcb89c2bf193ec1ef4cd137
[ "MIT" ]
30
2019-11-13T00:55:22.000Z
2022-01-06T08:09:35.000Z
pal/writer/instruction/libpal_rust.py
mars-research/pal
5977394cda8750ff5dcb89c2bf193ec1ef4cd137
[ "MIT" ]
14
2019-11-15T16:56:22.000Z
2021-12-22T10:14:17.000Z
from pal.writer.instruction.instruction import InstructionWriter from pal.model.instruction import Instruction import pal.gadget from typing import TextIO class LibpalRustInstructionWriter(InstructionWriter): def declare_instruction_dependencies(self, outfile, instruction, config): ctypes = set([]) ...
39.019305
119
0.62646
74fd755885dd74c844dbf3e449d6205415bbf166
3,143
py
Python
trollius_redis/cursors.py
benjolitz/trollius-redis
d2ece744df3c247a47ee51e14f7129f95ef85a4f
[ "BSD-2-Clause" ]
4
2015-06-10T13:11:46.000Z
2016-03-15T16:56:34.000Z
trollius_redis/cursors.py
benjolitz/trollius-redis
d2ece744df3c247a47ee51e14f7129f95ef85a4f
[ "BSD-2-Clause" ]
1
2015-06-10T12:50:44.000Z
2015-06-10T20:16:27.000Z
trollius_redis/cursors.py
benjolitz/trollius-redis
d2ece744df3c247a47ee51e14f7129f95ef85a4f
[ "BSD-2-Clause" ]
2
2017-06-12T09:13:26.000Z
2018-03-05T01:07:55.000Z
import trollius as asyncio from trollius import From, Return from collections import deque __all__ = ( 'Cursor', 'DictCursor', 'SetCursor', 'ZCursor', ) class Cursor(object): """ Cursor for walking through the results of a :func:`scan <trollius_redis.RedisProtocol.scan>` query. """ ...
25.552846
69
0.573974
1a735eaae7fadd7046250cab0bf1152da7590dc0
19,378
py
Python
libspn/tests/perf_dense_generator_value.py
pronobis/libspn
b98141ea5a609a02706433220758e58f46bd3f5e
[ "MIT" ]
22
2019-03-01T15:58:20.000Z
2022-02-18T10:32:04.000Z
libspn/tests/perf_dense_generator_value.py
pronobis/libspn
b98141ea5a609a02706433220758e58f46bd3f5e
[ "MIT" ]
10
2019-03-03T18:15:24.000Z
2021-05-04T09:02:55.000Z
libspn/tests/perf_dense_generator_value.py
pronobis/libspn
b98141ea5a609a02706433220758e58f46bd3f5e
[ "MIT" ]
8
2019-03-22T20:45:20.000Z
2021-05-03T13:22:09.000Z
#!/usr/bin/env python3 import tensorflow as tf import numpy as np from context import libspn as spn import time import argparse import colorama as col import sys from tensorflow.python.client import timeline import os col.init() red = col.Fore.RED blue = col.Fore.BLUE green = col.Fore.GREEN yellow = col.Fore.YELLOW m...
44.547126
89
0.549283
32f701d5fed761518b8b1d6a174f9cf19c6026ad
1,745
py
Python
Tests/test_super.py
cwensley/ironpython2
f854444e1e08afc8850cb7c1a739a7dd2d10d32a
[ "Apache-2.0" ]
1,078
2016-07-19T02:48:30.000Z
2022-03-30T21:22:34.000Z
Tests/test_super.py
cwensley/ironpython2
f854444e1e08afc8850cb7c1a739a7dd2d10d32a
[ "Apache-2.0" ]
576
2017-05-21T12:36:48.000Z
2022-03-30T13:47:03.000Z
Tests/test_super.py
cwensley/ironpython2
f854444e1e08afc8850cb7c1a739a7dd2d10d32a
[ "Apache-2.0" ]
269
2017-05-21T04:44:47.000Z
2022-03-31T16:18:13.000Z
##################################################################################### # # Copyright (c) Michael van der Kolff. All rights reserved. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of th...
26.846154
96
0.596562
201f222060c3aee6e6417a6e19239d655bb79170
2,034
py
Python
google/appengine/_internal/django/core/serializers/pyyaml.py
MiCHiLU/google_appengine_sdk
3da9f20d7e65e26c4938d2c4054bc4f39cbc5522
[ "Apache-2.0" ]
26
2015-01-20T08:02:38.000Z
2020-06-10T04:57:41.000Z
google/appengine/_internal/django/core/serializers/pyyaml.py
MiCHiLU/google_appengine_sdk
3da9f20d7e65e26c4938d2c4054bc4f39cbc5522
[ "Apache-2.0" ]
53
2016-04-06T21:10:43.000Z
2018-03-19T23:14:33.000Z
google/appengine/_internal/django/core/serializers/pyyaml.py
MiCHiLU/google_appengine_sdk
3da9f20d7e65e26c4938d2c4054bc4f39cbc5522
[ "Apache-2.0" ]
23
2016-04-19T05:45:26.000Z
2021-12-31T23:22:36.000Z
""" YAML serializer. Requires PyYaml (http://pyyaml.org/), but that's checked for in __init__. """ from StringIO import StringIO import decimal import yaml from google.appengine._internal.django.db import models from google.appengine._internal.django.core.serializers.python import Serializer as PythonSerializer from...
35.684211
104
0.717306
44328d0363ac1f33906bfc96cbf916ba40aa1e6f
2,300
py
Python
Code/set.py
type9/CS-1.3-Core-Data-Structures
1aa10d866b5115b22820561f703a29537839d8fe
[ "MIT" ]
null
null
null
Code/set.py
type9/CS-1.3-Core-Data-Structures
1aa10d866b5115b22820561f703a29537839d8fe
[ "MIT" ]
5
2020-02-17T22:00:40.000Z
2020-03-10T08:30:10.000Z
Code/set.py
type9/CS-1.3-Core-Data-Structures
1aa10d866b5115b22820561f703a29537839d8fe
[ "MIT" ]
null
null
null
class Set(): '''Set strucutre implemented using dictionary''' def __init__(self, elements=[]): self.dict = {} self.size = 0 '''0(n) init''' for element in elements: self.add(element) def __str__(self): items = [] for element in self.dict.keys(...
26.436782
52
0.527826
556aa18efacddc02f9ce11d979d4ff350df3a71f
932
py
Python
plenum/test/replica/conftest.py
spivachuk/plenum
05123166e8ffa89520541ea3b59b20390aaf92a4
[ "Apache-2.0" ]
null
null
null
plenum/test/replica/conftest.py
spivachuk/plenum
05123166e8ffa89520541ea3b59b20390aaf92a4
[ "Apache-2.0" ]
null
null
null
plenum/test/replica/conftest.py
spivachuk/plenum
05123166e8ffa89520541ea3b59b20390aaf92a4
[ "Apache-2.0" ]
null
null
null
import pytest from plenum.common.util import get_utc_epoch from plenum.server.quorums import Quorums from plenum.server.replica import Replica from plenum.test.conftest import getValueFromModule from plenum.test.testing_utils import FakeSomething @pytest.fixture(scope='function', params=[0, 10]) def replica(tconf, r...
30.064516
77
0.684549
b4e824f010424c17e688c57323c89b174d6e5dea
789
py
Python
src/ssm_document_generator/definition/parameters/parameter.py
awslabs/aws-systems-manager-document-generator
2c041fd52342d95da4535fe3236e43933cc6e08d
[ "Apache-2.0" ]
54
2018-03-07T18:46:50.000Z
2022-01-26T04:35:56.000Z
src/ssm_document_generator/definition/parameters/parameter.py
eshack94/aws-systems-manager-document-generator
2c041fd52342d95da4535fe3236e43933cc6e08d
[ "Apache-2.0" ]
2
2018-09-30T23:39:08.000Z
2020-04-03T17:15:21.000Z
src/ssm_document_generator/definition/parameters/parameter.py
eshack94/aws-systems-manager-document-generator
2c041fd52342d95da4535fe3236e43933cc6e08d
[ "Apache-2.0" ]
12
2018-07-27T21:04:12.000Z
2021-10-20T18:02:57.000Z
from ssm_document_generator import utils class Parameter: def __init__(self, name, description='', parameter_type='String', default=None, allowed_pattern=None): self.name = name self.parameter_type = parameter_type self.description = description self.default = default self....
39.45
106
0.586819
303e82a0c52e1c4d1d57fc272f4be00c4cff1a84
1,590
py
Python
src/model/bertynet/CloudModelWrapper.py
MovElb/Ann
53e30e0c63ce842a5ea18134baf480fbc212c151
[ "MIT" ]
null
null
null
src/model/bertynet/CloudModelWrapper.py
MovElb/Ann
53e30e0c63ce842a5ea18134baf480fbc212c151
[ "MIT" ]
1
2021-06-01T23:45:22.000Z
2021-06-01T23:45:22.000Z
src/model/bertynet/CloudModelWrapper.py
MovElb/Ann
53e30e0c63ce842a5ea18134baf480fbc212c151
[ "MIT" ]
1
2019-05-23T12:14:16.000Z
2019-05-23T12:14:16.000Z
import os import random from functools import partial import torch import msgpack from bertynet.model import BertyModel from bertynet.BatchGen import BatchGen class CloudModelWrapper: def __init__(self, args): checkpoint = torch.load(args.model_path, map_location="cuda" if args.use_cuda else "cpu") ...
31.8
97
0.674214
5ae0dc5dc0c8b09ccc1045aa9f6d925d07ba1dcc
91,339
py
Python
desktop/core/ext-py/SQLAlchemy-1.3.17/test/orm/test_unitofworkv2.py
yetsun/hue
2e48f0cc70e233ee0e1b40733d4b2a18d8836c66
[ "Apache-2.0" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
desktop/core/ext-py/SQLAlchemy-1.3.17/test/orm/test_unitofworkv2.py
yetsun/hue
2e48f0cc70e233ee0e1b40733d4b2a18d8836c66
[ "Apache-2.0" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
desktop/core/ext-py/SQLAlchemy-1.3.17/test/orm/test_unitofworkv2.py
yetsun/hue
2e48f0cc70e233ee0e1b40733d4b2a18d8836c66
[ "Apache-2.0" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
from sqlalchemy import cast from sqlalchemy import event from sqlalchemy import exc from sqlalchemy import FetchedValue from sqlalchemy import ForeignKey from sqlalchemy import func from sqlalchemy import Integer from sqlalchemy import JSON from sqlalchemy import literal from sqlalchemy import select from sqlalchemy im...
31.025476
79
0.508217
97c1cc81495ae01cbbdd13df00effc5ca63e2a78
1,040
py
Python
exercise/venv/lib/python3.7/site-packages/sqreen/rules_callbacks/not_found_flask.py
assuzzanne/my-sqreen
81ae0eab417a1dbc0ae6b1778ebfdd71591c3c5b
[ "MIT" ]
null
null
null
exercise/venv/lib/python3.7/site-packages/sqreen/rules_callbacks/not_found_flask.py
assuzzanne/my-sqreen
81ae0eab417a1dbc0ae6b1778ebfdd71591c3c5b
[ "MIT" ]
1
2021-06-02T00:27:34.000Z
2021-06-02T00:27:34.000Z
exercise/venv/lib/python3.7/site-packages/sqreen/rules_callbacks/not_found_flask.py
assuzzanne/notifications-dispatcher-api
81ae0eab417a1dbc0ae6b1778ebfdd71591c3c5b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2016, 2017, 2018, 2019 Sqreen. All rights reserved. # Please refer to our terms for more information: # # https://www.sqreen.io/terms.html # """ Look for badly behaved clients """ from logging import getLogger from ..rules import RuleCallback LOGGER = getLogger(__name__) ...
30.588235
75
0.615385
79ae12cfdc09c7c30322b79d2e27b52a27a164e8
1,401
py
Python
HomographyDetector/ANN.py
the-alex-b/Football-Tracking
3f1a03970566df649050e67cda69b26b41f10e41
[ "BSD-2-Clause" ]
11
2020-03-19T12:58:09.000Z
2021-03-04T00:00:16.000Z
HomographyDetector/ANN.py
the-alex-b/Football-Tracking
3f1a03970566df649050e67cda69b26b41f10e41
[ "BSD-2-Clause" ]
1
2020-06-18T23:25:57.000Z
2020-06-19T16:40:16.000Z
HomographyDetector/ANN.py
the-alex-b/Football-Tracking
3f1a03970566df649050e67cda69b26b41f10e41
[ "BSD-2-Clause" ]
null
null
null
import faiss import pyflann class NNSearcher: def __init__(self, database_features, anntype='faiss', useGpu=False): assert anntype in ['faiss','flann'] self.anntype = anntype if anntype == 'faiss': # Making the SCCvSD edge images searchable res = faiss.Sta...
31.133333
120
0.591006
d150950ce40684bdec28832f5958740af26b8150
6,098
py
Python
tests/test_plugin_utils.py
muhdzakirahmat/unit6proj
5c1e260a2b5146f5e2a33e4e140404df74a80030
[ "Apache-2.0" ]
null
null
null
tests/test_plugin_utils.py
muhdzakirahmat/unit6proj
5c1e260a2b5146f5e2a33e4e140404df74a80030
[ "Apache-2.0" ]
null
null
null
tests/test_plugin_utils.py
muhdzakirahmat/unit6proj
5c1e260a2b5146f5e2a33e4e140404df74a80030
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from tests.helpers import * from Unit6.models import ip2long, long2ip from Unit6.plugins import ( register_plugin_assets_directory, register_plugin_asset, register_plugin_script, register_plugin_stylesheet, override_template, register_admin_plugin_m...
34.845714
115
0.668088
ed5fd84e7523708f17f5713ca77981d48baca430
2,954
py
Python
src/collectors/httpcode/httpcode.py
art19/netuitive-diamond
57f61f2444e6f3d3692b4ee989415939bfaa932e
[ "MIT" ]
2
2016-11-17T13:17:50.000Z
2017-03-28T19:42:04.000Z
src/collectors/httpcode/httpcode.py
art19/netuitive-diamond
57f61f2444e6f3d3692b4ee989415939bfaa932e
[ "MIT" ]
62
2016-09-30T14:04:52.000Z
2021-04-22T21:22:28.000Z
src/collectors/httpcode/httpcode.py
art19/netuitive-diamond
57f61f2444e6f3d3692b4ee989415939bfaa932e
[ "MIT" ]
4
2017-01-24T14:44:56.000Z
2021-03-03T17:14:19.000Z
# coding=utf-8 """ Collect status codes from a HTTP or HTTPS connections #### Dependencies * urllib2 #### Usage Add the collector config as : enabled = True req_url = https://www.my_server.com/, https://www.my_server.com/assets/jquery.js Metrics are collected as : - servers.<hostname>.http.<url>.response_cod...
30.142857
80
0.563643
cedc788f44c63f22ab17618607e765c04d6da0a0
645
py
Python
skilltreeapp/urls.py
abztrakt/uw-skilltree
d3e28188cd019761931bdadb91da6f6defe064f9
[ "Apache-2.0" ]
1
2016-03-11T18:33:42.000Z
2016-03-11T18:33:42.000Z
skilltreeapp/urls.py
abztrakt/uw-skilltree
d3e28188cd019761931bdadb91da6f6defe064f9
[ "Apache-2.0" ]
null
null
null
skilltreeapp/urls.py
abztrakt/uw-skilltree
d3e28188cd019761931bdadb91da6f6defe064f9
[ "Apache-2.0" ]
null
null
null
from django.conf.urls import patterns, include, url from django.views.generic import TemplateView # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'skilltreeapp.views.pages.home'), url(r'basic/$', 'skilltreeapp...
30.714286
71
0.705426