hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
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
245
max_issues_repo_name
stringlengths
6
130
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
245
max_forks_repo_name
stringlengths
6
130
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
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f74bd5230d676dac45a5289ff17a3fa97ede5a45
9,284
py
Python
dropbox_fs/crawler.py
JanHammerschmidt/dropbox-fs
d45b6b12cf3c02c406483dae21d217f110df871c
[ "MIT" ]
null
null
null
dropbox_fs/crawler.py
JanHammerschmidt/dropbox-fs
d45b6b12cf3c02c406483dae21d217f110df871c
[ "MIT" ]
null
null
null
dropbox_fs/crawler.py
JanHammerschmidt/dropbox-fs
d45b6b12cf3c02c406483dae21d217f110df871c
[ "MIT" ]
null
null
null
import logging import shutil import pickle import dropbox from datetime import datetime from pathlib import Path from threading import Event from requests.exceptions import ReadTimeout, ConnectionError from dropbox.exceptions import ApiError, AuthError from dropbox.files import FileMetadata, FolderMetadata fr...
40.541485
111
0.57346
import logging import shutil import pickle import dropbox from datetime import datetime from pathlib import Path from threading import Event from requests.exceptions import ReadTimeout, ConnectionError from dropbox.exceptions import ApiError, AuthError from dropbox.files import FileMetadata, FolderMetadata fr...
true
true
f74bd7f9d417495eba5939dfcbbe386a812d4e7d
4,710
py
Python
mlfromscratch/supervised_learning/bayesian_regression.py
Krishna00111/Machine-Learning-from-Scratch
5d6f5b1a2096acbb57a060385e471123b77b9a68
[ "MIT" ]
null
null
null
mlfromscratch/supervised_learning/bayesian_regression.py
Krishna00111/Machine-Learning-from-Scratch
5d6f5b1a2096acbb57a060385e471123b77b9a68
[ "MIT" ]
null
null
null
mlfromscratch/supervised_learning/bayesian_regression.py
Krishna00111/Machine-Learning-from-Scratch
5d6f5b1a2096acbb57a060385e471123b77b9a68
[ "MIT" ]
null
null
null
from __future__ import print_function, division import numpy as np from scipy.stats import chi2, multivariate_normal from mlfromscratch.utils import mean_squared_error, train_test_split, polynomial_features class BayesianRegression(object): """Bayesian regression model. If poly_degree is specified the fe...
40.603448
114
0.641614
from __future__ import print_function, division import numpy as np from scipy.stats import chi2, multivariate_normal from mlfromscratch.utils import mean_squared_error, train_test_split, polynomial_features class BayesianRegression(object): def __init__(self, n_draws, mu0, omega0, nu0, sigma_sq0, poly_de...
true
true
f74bd876d5af8e4097a12b465ac3c95a3164c116
2,781
py
Python
vsts/vsts/task_agent/v4_0/models/task_agent_pool.py
kenkuo/azure-devops-python-api
9e920bd25e938fa89ff7f60153e5b9e113ca839d
[ "MIT" ]
null
null
null
vsts/vsts/task_agent/v4_0/models/task_agent_pool.py
kenkuo/azure-devops-python-api
9e920bd25e938fa89ff7f60153e5b9e113ca839d
[ "MIT" ]
null
null
null
vsts/vsts/task_agent/v4_0/models/task_agent_pool.py
kenkuo/azure-devops-python-api
9e920bd25e938fa89ff7f60153e5b9e113ca839d
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
48.789474
170
0.602661
from .task_agent_pool_reference import TaskAgentPoolReference class TaskAgentPool(TaskAgentPoolReference): _attribute_map = { 'id': {'key': 'id', 'type': 'int'}, 'is_hosted': {'key': 'isHosted', 'type': 'bool'}, 'name': {'key': 'name', 'type': 'str'}, 'pool_type': {'key': ...
true
true
f74bd8a8d5f21592bbeb180d4d73a97fdb02a9b1
381
py
Python
ask/ask/wsgi.py
kzn-bulat-s/abracadabra
25d582a3d6fc6587772776479ef2f1d284fbe0e9
[ "Unlicense" ]
null
null
null
ask/ask/wsgi.py
kzn-bulat-s/abracadabra
25d582a3d6fc6587772776479ef2f1d284fbe0e9
[ "Unlicense" ]
null
null
null
ask/ask/wsgi.py
kzn-bulat-s/abracadabra
25d582a3d6fc6587772776479ef2f1d284fbe0e9
[ "Unlicense" ]
null
null
null
""" WSGI config for ask project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ask.settings") from django.core.wsgi impo...
25.4
78
0.784777
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ask.settings") from django.core.wsgi import get_wsgi_application application = get_wsgi_application()
true
true
f74bd8bb79cd61a265dbce382a969a66600d973b
10,174
py
Python
stog/data/dataset_readers/amr_parsing/preprocess/text_anonymizor.py
KiroSummer/AMR
49f4edc9e738ba3409d2d5e45e5e1881d8b338cc
[ "MIT" ]
2
2021-09-09T11:02:18.000Z
2021-10-04T12:18:16.000Z
stog/data/dataset_readers/amr_parsing/preprocess/text_anonymizor.py
KiroSummer/AMR
49f4edc9e738ba3409d2d5e45e5e1881d8b338cc
[ "MIT" ]
null
null
null
stog/data/dataset_readers/amr_parsing/preprocess/text_anonymizor.py
KiroSummer/AMR
49f4edc9e738ba3409d2d5e45e5e1881d8b338cc
[ "MIT" ]
null
null
null
import os import re import json from typing import List, Dict, Set from collections import defaultdict from stog.data.dataset_readers.amr_parsing.io import AMRIO from stog.data.dataset_readers.amr_parsing.amr import AMR def prev_token_is(index: int, k: int, amr: AMR, pattern: str): if index - k >= 0: ret...
40.696
140
0.518577
import os import re import json from typing import List, Dict, Set from collections import defaultdict from stog.data.dataset_readers.amr_parsing.io import AMRIO from stog.data.dataset_readers.amr_parsing.amr import AMR def prev_token_is(index: int, k: int, amr: AMR, pattern: str): if index - k >= 0: ret...
true
true
f74bd915a00e188a3e15b31d75e4fab5d0678942
3,486
py
Python
lego/apps/permissions/tests/migrations/0001_initial.py
ollfkaih/lego
b15aacaf09efe90e7f984d25b0e7bddbe12647e8
[ "MIT" ]
45
2017-10-24T12:09:06.000Z
2021-11-03T21:21:03.000Z
lego/apps/permissions/tests/migrations/0001_initial.py
ollfkaih/lego
b15aacaf09efe90e7f984d25b0e7bddbe12647e8
[ "MIT" ]
980
2017-10-24T12:29:07.000Z
2022-03-31T04:04:31.000Z
lego/apps/permissions/tests/migrations/0001_initial.py
ollfkaih/lego
b15aacaf09efe90e7f984d25b0e7bddbe12647e8
[ "MIT" ]
23
2018-04-11T16:34:22.000Z
2021-11-23T12:28:30.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-28 10:44 from __future__ import unicode_literals import django.db.models.deletion import django.utils.timezone from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): initial = True depe...
33.519231
88
0.403901
from __future__ import unicode_literals import django.db.models.deletion import django.utils.timezone from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ("users", "0001_initial"), migrations.swap...
true
true
f74bdb6e8649c00dbb2ee80660d7a80dbe509e45
13,273
py
Python
pycatia/drafting_interfaces/drawing_dimensions.py
Tian-Jionglu/pycatia
b315aeb3a74846f134ff6b67b3a6334b9d3905fa
[ "MIT" ]
1
2020-04-27T13:59:10.000Z
2020-04-27T13:59:10.000Z
pycatia/drafting_interfaces/drawing_dimensions.py
Luanee/pycatia
ea5eef8178f73de12404561c00baf7a7ca30da59
[ "MIT" ]
null
null
null
pycatia/drafting_interfaces/drawing_dimensions.py
Luanee/pycatia
ea5eef8178f73de12404561c00baf7a7ca30da59
[ "MIT" ]
null
null
null
#! usr/bin/python3.6 """ Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445 .. warning:: The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. They are there as a guide as to how the visual basic / catscript function...
44.841216
117
0.497401
from pycatia.drafting_interfaces.drawing_dimension import DrawingDimension from pycatia.system_interfaces.collection import Collection from pycatia.types import cat_variant class DrawingDimensions(Collection): def __init__(self, com_object): super().__init__(com_object, child_object=DrawingDimension) ...
true
true
f74bdbf3375c85ff95b0b9e7244cb2146bc5864c
19,172
py
Python
build/python/modules/serialization/serialization.py
fabio-d/fuchsia-stardock
e57f5d1cf015fe2294fc2a5aea704842294318d2
[ "BSD-2-Clause" ]
5
2022-01-10T20:22:17.000Z
2022-01-21T20:14:17.000Z
build/python/modules/serialization/serialization.py
fabio-d/fuchsia-stardock
e57f5d1cf015fe2294fc2a5aea704842294318d2
[ "BSD-2-Clause" ]
null
null
null
build/python/modules/serialization/serialization.py
fabio-d/fuchsia-stardock
e57f5d1cf015fe2294fc2a5aea704842294318d2
[ "BSD-2-Clause" ]
null
null
null
# Copyright 2022 The Fuchsia Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Serialization Methods for Classes. This module is inspired by the `serde` crate in Rust, and the dataclasses python module. It provides a type-aware mecha...
31.326797
98
0.641248
import dataclasses import functools import inspect import json from typing import ( Any, Callable, Dict, List, Optional, Set, Type, TypeVar, Union, get_type_hints) import typing __all__ = [ 'instance_from_dict', 'instance_to_dict', 'json_dump', 'json_dumps', 'json_load', 'json_loads', 'serialize_d...
true
true
f74bdd9420fd6baf1b039bb1ac2217c76dc61bfb
47
py
Python
Imaobong Tom/Phase 1/Python Basic 1/Day 6/No. 2.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
6
2020-05-23T19:53:25.000Z
2021-05-08T20:21:30.000Z
Imaobong Tom/Phase 1/Python Basic 1/Day 6/No. 2.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
8
2020-05-14T18:53:12.000Z
2020-07-03T00:06:20.000Z
Imaobong Tom/Phase 1/Python Basic 1/Day 6/No. 2.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
39
2020-05-10T20:55:02.000Z
2020-09-12T17:40:59.000Z
import struct print(struct.calcsize("P") * 8)
11.75
31
0.702128
import struct print(struct.calcsize("P") * 8)
true
true
f74bdd977c44a1ea574d1032415a11e74ee00b16
1,124
py
Python
forms.py
matheuszmz/RegressionAPI
715cf4874f95aa7d1be284c8a539dfa603823ee5
[ "MIT" ]
null
null
null
forms.py
matheuszmz/RegressionAPI
715cf4874f95aa7d1be284c8a539dfa603823ee5
[ "MIT" ]
null
null
null
forms.py
matheuszmz/RegressionAPI
715cf4874f95aa7d1be284c8a539dfa603823ee5
[ "MIT" ]
null
null
null
from wtforms import DecimalField, Form, RadioField from wtforms.validators import NumberRange class NCForm(Form): c8_0 = DecimalField('C8:0', validators=[NumberRange()]) c10_0 = DecimalField('C10:0', validators=[NumberRange()]) c12_0 = DecimalField('C12:0', validators=[NumberRange()]) c14_0 = DecimalF...
53.52381
133
0.689502
from wtforms import DecimalField, Form, RadioField from wtforms.validators import NumberRange class NCForm(Form): c8_0 = DecimalField('C8:0', validators=[NumberRange()]) c10_0 = DecimalField('C10:0', validators=[NumberRange()]) c12_0 = DecimalField('C12:0', validators=[NumberRange()]) c14_0 = DecimalF...
true
true
f74bde79f05a53edec10baff210864858e6aca9a
1,092
py
Python
bali/resources/model_resource.py
Ed-XCF/bali
ac2facd7390309fa9bbfe32c3ca33bd7556096d8
[ "MIT" ]
null
null
null
bali/resources/model_resource.py
Ed-XCF/bali
ac2facd7390309fa9bbfe32c3ca33bd7556096d8
[ "MIT" ]
null
null
null
bali/resources/model_resource.py
Ed-XCF/bali
ac2facd7390309fa9bbfe32c3ca33bd7556096d8
[ "MIT" ]
null
null
null
""" Bali ModelResource """ from .resource import Resource from ..db.operators import get_filters_expr from ..schemas import ListRequest __all__ = ['ModelResource'] class ModelResource(Resource): """ `ModelResource` is a fast way to implement resource layer for model objects """ model = None ...
25.395349
62
0.630952
from .resource import Resource from ..db.operators import get_filters_expr from ..schemas import ListRequest __all__ = ['ModelResource'] class ModelResource(Resource): model = None schema = None def list(self, schema_in: ListRequest = None): return self.model.query().filter( *get_fi...
true
true
f74bde956fb2d9433fffd0fd5c0c9f8a9df65bee
6,098
py
Python
qa/rpc-tests/proxy_test.py
LordSoylent/zoomba
ad06c0ce54186dcbe43de7be2e1a552c0e556ce9
[ "MIT" ]
9
2018-07-21T21:32:46.000Z
2020-05-10T05:11:18.000Z
qa/rpc-tests/proxy_test.py
LordSoylent/zoomba
ad06c0ce54186dcbe43de7be2e1a552c0e556ce9
[ "MIT" ]
2
2018-07-15T21:44:28.000Z
2018-09-18T18:13:24.000Z
qa/rpc-tests/proxy_test.py
LordSoylent/zoomba
ad06c0ce54186dcbe43de7be2e1a552c0e556ce9
[ "MIT" ]
7
2018-08-02T01:53:01.000Z
2018-12-24T16:46:47.000Z
#!/usr/bin/env python2 # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import socket import traceback, sys from binascii import hexlify import time, os from socks5 import Socks5Conf...
41.767123
145
0.653001
import socket import traceback, sys from binascii import hexlify import time, os from socks5 import Socks5Configuration, Socks5Command, Socks5Server, AddressType from test_framework import BitcoinTestFramework from util import * class ProxyTest(BitcoinTestFramework): def __init__(self): ...
true
true
f74bdf2a2e61eede9a60e35fdbb36f5bfe27ceda
2,508
py
Python
official/mnist/mnist_eager_test.py
SimiaCryptus/models
c652a23a650070b71e286f1ded93726670161940
[ "Apache-2.0" ]
null
null
null
official/mnist/mnist_eager_test.py
SimiaCryptus/models
c652a23a650070b71e286f1ded93726670161940
[ "Apache-2.0" ]
null
null
null
official/mnist/mnist_eager_test.py
SimiaCryptus/models
c652a23a650070b71e286f1ded93726670161940
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 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...
29.505882
80
0.714912
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import tensorflow.contrib.eager as tfe from official.mnist import mnist from official.mnist import mnist_eager from official.utils.misc import keras_utils def device...
true
true
f74bdf96750edb2270fb58d487d021fad7047165
1,368
py
Python
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/sql_database_get_properties_options_py3.py
limingu/azure-cli-extensions
1bc29f089f4da42ab8905e440f2f46d6b5b0aa97
[ "MIT" ]
2
2021-06-05T17:51:26.000Z
2021-11-17T11:17:56.000Z
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/sql_database_get_properties_options_py3.py
limingu/azure-cli-extensions
1bc29f089f4da42ab8905e440f2f46d6b5b0aa97
[ "MIT" ]
1
2020-06-12T01:39:40.000Z
2020-06-12T01:39:40.000Z
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/sql_database_get_properties_options_py3.py
anpaz-msft/azure-cli-extensions
847fd487fe61e83f2a4163a9393edc9555267bc2
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
41.454545
133
0.663743
from .options_resource_py3 import OptionsResource class SqlDatabaseGetPropertiesOptions(OptionsResource): _attribute_map = { 'throughput': {'key': 'throughput', 'type': 'int'}, 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, } def __init__(self...
true
true
f74be077d7384048d6acf10a0956858edaf98acb
336
py
Python
ddtrace/contrib/django/compat.py
tophatmonocle/dd-trace-py
7db12f1c398c07cd5baf91c571aed672dbb6496d
[ "BSD-3-Clause" ]
null
null
null
ddtrace/contrib/django/compat.py
tophatmonocle/dd-trace-py
7db12f1c398c07cd5baf91c571aed672dbb6496d
[ "BSD-3-Clause" ]
null
null
null
ddtrace/contrib/django/compat.py
tophatmonocle/dd-trace-py
7db12f1c398c07cd5baf91c571aed672dbb6496d
[ "BSD-3-Clause" ]
null
null
null
import django if django.VERSION >= (1, 10, 1): def user_is_authenticated(user): # Explicit comparision due to the following bug # https://code.djangoproject.com/ticket/26988 return user.is_authenticated == True # noqa E712 else: def user_is_authenticated(user): return user.is_...
28
57
0.684524
import django if django.VERSION >= (1, 10, 1): def user_is_authenticated(user): return user.is_authenticated == True else: def user_is_authenticated(user): return user.is_authenticated()
true
true
f74be190470f45fcf04f2f476a0f2da49ebdeeef
1,887
py
Python
scikits/statsmodels/datasets/stackloss/data.py
matthew-brett/statsmodels
915c9dc2d762c5592ac17a7cf5f1cc957fcbde1c
[ "BSD-3-Clause" ]
null
null
null
scikits/statsmodels/datasets/stackloss/data.py
matthew-brett/statsmodels
915c9dc2d762c5592ac17a7cf5f1cc957fcbde1c
[ "BSD-3-Clause" ]
null
null
null
scikits/statsmodels/datasets/stackloss/data.py
matthew-brett/statsmodels
915c9dc2d762c5592ac17a7cf5f1cc957fcbde1c
[ "BSD-3-Clause" ]
null
null
null
"""Stack loss data""" __all__ = ['COPYRIGHT','TITLE','SOURCE','DESCRSHORT','DESCRLONG','NOTE', 'load'] __docformat__ = 'restructuredtext' COPYRIGHT = """This is public domain. """ TITLE = __doc__ SOURCE = """ Brownlee, K. A. (1965), "Statistical Theory and Methodology in Science and Engineering", 2nd e...
31.983051
80
0.688394
__all__ = ['COPYRIGHT','TITLE','SOURCE','DESCRSHORT','DESCRLONG','NOTE', 'load'] __docformat__ = 'restructuredtext' COPYRIGHT = """This is public domain. """ TITLE = __doc__ SOURCE = """ Brownlee, K. A. (1965), "Statistical Theory and Methodology in Science and Engineering", 2nd edition, New York:Wiley...
true
true
f74be1d30f3ec8db5133654af3b0a125460e39e9
2,131
py
Python
main_Hand_Tracking.py
arymandeshwal/Learn-Sign-Language
97728203ba2b654782b47001b4fb28b9bb14ce67
[ "MIT" ]
1
2021-06-14T11:57:27.000Z
2021-06-14T11:57:27.000Z
main_Hand_Tracking.py
arymandeshwal/Learn-Sign-Language
97728203ba2b654782b47001b4fb28b9bb14ce67
[ "MIT" ]
1
2021-06-16T13:41:43.000Z
2021-06-16T13:41:43.000Z
main_Hand_Tracking.py
arymandeshwal/Learn-Sign-Language
97728203ba2b654782b47001b4fb28b9bb14ce67
[ "MIT" ]
1
2021-06-17T11:08:35.000Z
2021-06-17T11:08:35.000Z
import cv2 import mediapipe as mp class handDetector(): """ Initiating: mode = False --> when using dynamic video capture maxHands --> How many hands to detect detectionCon --> success of detection trackCon --> used for tracking of hand, might have increased latency """ def __init__(sel...
29.191781
98
0.596903
import cv2 import mediapipe as mp class handDetector(): def __init__(self, mode=False, maxHands=1, detectionCon=0.5, trackCon=0.7): self.mode = mode self.maxHands = maxHands self.detectionCon = detectionCon self.trackCon = trackCon self.mpHands = mp.solutions.hands s...
true
true
f74be277f160e31d1e7f42eb00680377b1bec982
2,993
py
Python
win32con_client_tts.py
O8pen/MouseSelectTTS
724be8a434322cf73564a44d85f8372a24409610
[ "Apache-2.0" ]
null
null
null
win32con_client_tts.py
O8pen/MouseSelectTTS
724be8a434322cf73564a44d85f8372a24409610
[ "Apache-2.0" ]
null
null
null
win32con_client_tts.py
O8pen/MouseSelectTTS
724be8a434322cf73564a44d85f8372a24409610
[ "Apache-2.0" ]
null
null
null
import win32com.client import clipboard from win32api import SetCursorPos, mouse_event from win32con import MOUSEEVENTF_LEFTDOWN, MOUSEEVENTF_LEFTUP from time import sleep from pyautogui import hotkey from pynput import mouse import pythoncom #Select text #press mouse button #ctrl+c #remove new line char...
25.801724
164
0.553291
import win32com.client import clipboard from win32api import SetCursorPos, mouse_event from win32con import MOUSEEVENTF_LEFTDOWN, MOUSEEVENTF_LEFTUP from time import sleep from pyautogui import hotkey from pynput import mouse import pythoncom trashcan_position_x = 1500 trashcan_position_y = 1000 ...
true
true
f74be40541ed52d3d130d98259c4e9a4a54d3644
3,070
py
Python
office365/sharepoint/ui/applicationpages/clientPeoplePickerQueryParameters.py
wreiner/Office365-REST-Python-Client
476bbce4f5928a140b4f5d33475d0ac9b0783530
[ "MIT" ]
null
null
null
office365/sharepoint/ui/applicationpages/clientPeoplePickerQueryParameters.py
wreiner/Office365-REST-Python-Client
476bbce4f5928a140b4f5d33475d0ac9b0783530
[ "MIT" ]
null
null
null
office365/sharepoint/ui/applicationpages/clientPeoplePickerQueryParameters.py
wreiner/Office365-REST-Python-Client
476bbce4f5928a140b4f5d33475d0ac9b0783530
[ "MIT" ]
null
null
null
from office365.runtime.client_value import ClientValue from office365.sharepoint.principal.principalSource import PrincipalSource from office365.sharepoint.principal.principalType import PrincipalType class ClientPeoplePickerQueryParameters(ClientValue): def __init__(self, queryString, allowEmailAddresses=True, ...
60.196078
120
0.749511
from office365.runtime.client_value import ClientValue from office365.sharepoint.principal.principalSource import PrincipalSource from office365.sharepoint.principal.principalType import PrincipalType class ClientPeoplePickerQueryParameters(ClientValue): def __init__(self, queryString, allowEmailAddresses=True, ...
true
true
f74be41a0b82d16d29e9badfcc3f1f244d2e6282
320
py
Python
backend/src/app/schemas/bin.py
niikakralj/EESTEC-Team
be70366dfc249e200ade8deb84408e758123c499
[ "MIT" ]
null
null
null
backend/src/app/schemas/bin.py
niikakralj/EESTEC-Team
be70366dfc249e200ade8deb84408e758123c499
[ "MIT" ]
null
null
null
backend/src/app/schemas/bin.py
niikakralj/EESTEC-Team
be70366dfc249e200ade8deb84408e758123c499
[ "MIT" ]
null
null
null
import datetime from pydantic import BaseModel class BinsOpened(BaseModel): card_id: str bin_id: int bin_type: str timestamp: datetime.datetime weight: int recycle_status_ok: bool = False class BinsStatus(BaseModel): bin_id: int timestamp: datetime.datetime waste_status: int
14.545455
35
0.7125
import datetime from pydantic import BaseModel class BinsOpened(BaseModel): card_id: str bin_id: int bin_type: str timestamp: datetime.datetime weight: int recycle_status_ok: bool = False class BinsStatus(BaseModel): bin_id: int timestamp: datetime.datetime waste_status: int
true
true
f74be48cb52044a14c0a3ea505f710cf19254be9
41
py
Python
examples/example0.py
mtasic85/pynogil
4150aa655d6bafbb74b6eb5c10e058e8b56ebe54
[ "MIT" ]
null
null
null
examples/example0.py
mtasic85/pynogil
4150aa655d6bafbb74b6eb5c10e058e8b56ebe54
[ "MIT" ]
1
2020-05-01T19:19:11.000Z
2020-05-01T19:19:11.000Z
examples/example0.py
mtasic85/pynogil
4150aa655d6bafbb74b6eb5c10e058e8b56ebe54
[ "MIT" ]
null
null
null
print(sum([i for i in range(1_000_000)]))
41
41
0.707317
print(sum([i for i in range(1_000_000)]))
true
true
f74be6e3c98316c8b870632b82e79659b5263889
9,165
py
Python
codes/qtm/qcompilation.py
vutuanhai237/QuantumTomographyProject
78058e3faece2209e46c9f9e16a1c38cdb33e7e2
[ "MIT" ]
null
null
null
codes/qtm/qcompilation.py
vutuanhai237/QuantumTomographyProject
78058e3faece2209e46c9f9e16a1c38cdb33e7e2
[ "MIT" ]
null
null
null
codes/qtm/qcompilation.py
vutuanhai237/QuantumTomographyProject
78058e3faece2209e46c9f9e16a1c38cdb33e7e2
[ "MIT" ]
null
null
null
import qtm.base import qtm.optimizer import qtm.loss import qtm.utilities import numpy as np import typing, types import qiskit import matplotlib.pyplot as plt class QuantumCompilation(): def __init__(self) -> None: self.u = None self.vdagger = None self.is_trained = False self.opti...
44.0625
294
0.612111
import qtm.base import qtm.optimizer import qtm.loss import qtm.utilities import numpy as np import typing, types import qiskit import matplotlib.pyplot as plt class QuantumCompilation(): def __init__(self) -> None: self.u = None self.vdagger = None self.is_trained = False self.opti...
true
true
f74be735de37a6a243c191faa6f73ab9681e9b1f
706
py
Python
otcore/hit/migrations/0007_auto_20160606_1138.py
NYULibraries/dlts-enm-tct-backend
07455a660fb2cb8bc91a54f7f12d150923678157
[ "Apache-2.0" ]
null
null
null
otcore/hit/migrations/0007_auto_20160606_1138.py
NYULibraries/dlts-enm-tct-backend
07455a660fb2cb8bc91a54f7f12d150923678157
[ "Apache-2.0" ]
2
2017-10-30T21:19:07.000Z
2017-10-31T18:06:30.000Z
otcore/hit/migrations/0007_auto_20160606_1138.py
NYULibraries/dlts-enm-tct-backend
07455a660fb2cb8bc91a54f7f12d150923678157
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-06-06 15:38 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('hit', '0006_auto_20160520_1810'), ] operations = [ ...
27.153846
148
0.627479
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('hit', '0006_auto_20160520_1810'), ] operations = [ migrations.AlterModelOptions( name='basket', ...
true
true
f74be9dd6ed90e57efe87ec45ea05d67c564b29f
646
py
Python
outpass/leave/migrations/0004_auto_20181212_1442.py
Tlazypanda/outpass
bd52b8b91880471965b997fb4f494c0ad1aa2f20
[ "MIT" ]
null
null
null
outpass/leave/migrations/0004_auto_20181212_1442.py
Tlazypanda/outpass
bd52b8b91880471965b997fb4f494c0ad1aa2f20
[ "MIT" ]
null
null
null
outpass/leave/migrations/0004_auto_20181212_1442.py
Tlazypanda/outpass
bd52b8b91880471965b997fb4f494c0ad1aa2f20
[ "MIT" ]
null
null
null
# Generated by Django 2.0.9 on 2018-12-12 14:42 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('leave', '0003_auto_20181212_1214'), ] operations = [ migrations.AddField( model_name='request', name...
25.84
110
0.605263
import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('leave', '0003_auto_20181212_1214'), ] operations = [ migrations.AddField( model_name='request', name='perm', field=models.BooleanField(...
true
true
f74bea1c448e46c8019bc0b074e3c0c4c5ffaab1
22,514
py
Python
omero/util_scripts/Combine_Images.py
snoopycrimecop/scripts
7ec5df31e83f1fda7efc02aca3f3426174547308
[ "OML" ]
1
2022-02-05T08:01:03.000Z
2022-02-05T08:01:03.000Z
omero/util_scripts/Combine_Images.py
snoopycrimecop/scripts
7ec5df31e83f1fda7efc02aca3f3426174547308
[ "OML" ]
37
2019-11-29T16:19:57.000Z
2022-03-29T10:20:40.000Z
omero/util_scripts/Combine_Images.py
snoopycrimecop/scripts
7ec5df31e83f1fda7efc02aca3f3426174547308
[ "OML" ]
3
2021-02-05T19:26:44.000Z
2022-03-28T09:07:01.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ----------------------------------------------------------------------------- Copyright (C) 2006-2014 University of Dundee. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Lic...
35.623418
79
0.583015
import re from numpy import zeros import omero import omero.scripts as scripts from omero.gateway import BlitzGateway import omero.constants from omero.rtypes import rstring, rlong, robject import omero.util.script_utils as script_utils COLOURS = script_utils.COLOURS DEFAULT_T_REGEX = "_T" DEFAULT_Z_REGEX = "_Z" ...
true
true
f74bea409eba463bba013847a60ddf00deee2264
899
py
Python
dist_stepper_button.py
uniformlyMatt/halloween
741fb5792a5582d2d2a9100938dc413442eafa1e
[ "MIT" ]
null
null
null
dist_stepper_button.py
uniformlyMatt/halloween
741fb5792a5582d2d2a9100938dc413442eafa1e
[ "MIT" ]
null
null
null
dist_stepper_button.py
uniformlyMatt/halloween
741fb5792a5582d2d2a9100938dc413442eafa1e
[ "MIT" ]
null
null
null
from time import sleep, time import RPi.GPIO as gpio import physical_objects as ph gpio.setwarnings(False) gpio.setmode(gpio.BCM) # Initialize the physical objects in the system elevator = ph.Elevator(motor1 = 23, motor2 = 24, enable = 25, speed = 50) button = ph.Button(pin = 14) dispenser = ph.Dispenser(pulse = 17,...
28.09375
74
0.62069
from time import sleep, time import RPi.GPIO as gpio import physical_objects as ph gpio.setwarnings(False) gpio.setmode(gpio.BCM) elevator = ph.Elevator(motor1 = 23, motor2 = 24, enable = 25, speed = 50) button = ph.Button(pin = 14) dispenser = ph.Dispenser(pulse = 17, direction = 27, enable = 22) ultrasonic = ph.Ul...
true
true
f74beac9e2d185a0a94f273d3999d1b377f7a733
1,180
py
Python
airbyte-integrations/connectors/source-salesforce-singer/integration_tests/__init__.py
flpezet/airbyte
ea00397f2654cab5b7003df3a0a6895230a35d71
[ "MIT" ]
1
2021-01-07T12:25:45.000Z
2021-01-07T12:25:45.000Z
airbyte-integrations/connectors/source-salesforce-singer/integration_tests/__init__.py
flpezet/airbyte
ea00397f2654cab5b7003df3a0a6895230a35d71
[ "MIT" ]
null
null
null
airbyte-integrations/connectors/source-salesforce-singer/integration_tests/__init__.py
flpezet/airbyte
ea00397f2654cab5b7003df3a0a6895230a35d71
[ "MIT" ]
1
2021-05-28T01:12:10.000Z
2021-05-28T01:12:10.000Z
""" MIT License Copyright (c) 2020 Airbyte Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distr...
42.142857
78
0.805085
from .standard_source_test import SalesforceStandardSourceTest __all__ = ["SalesforceStandardSourceTest"]
true
true
f74beaf658a392dd4663ff966011f0ec168a4207
20,591
py
Python
readthedocs/rtd_tests/tests/test_post_commit_hooks.py
dbdaryl/readthedocs.org
09a14c7ffaf571fd136037c0f343926e275f6ce7
[ "MIT" ]
null
null
null
readthedocs/rtd_tests/tests/test_post_commit_hooks.py
dbdaryl/readthedocs.org
09a14c7ffaf571fd136037c0f343926e275f6ce7
[ "MIT" ]
null
null
null
readthedocs/rtd_tests/tests/test_post_commit_hooks.py
dbdaryl/readthedocs.org
09a14c7ffaf571fd136037c0f343926e275f6ce7
[ "MIT" ]
null
null
null
from __future__ import absolute_import from future import standard_library standard_library.install_aliases() import json import logging from urllib.parse import urlencode import mock from django_dynamic_fixture import get from django.test import TestCase from readthedocs.builds.models import Version from readthedocs...
41.936864
110
0.535331
from __future__ import absolute_import from future import standard_library standard_library.install_aliases() import json import logging from urllib.parse import urlencode import mock from django_dynamic_fixture import get from django.test import TestCase from readthedocs.builds.models import Version from readthedocs...
true
true
f74beb31536f604945904fe3ef93e3d1166f2a98
2,273
py
Python
database.py
Andyshome/untitled
769cdf0eec6a2154071ba8ec8263461c0153310e
[ "MIT" ]
null
null
null
database.py
Andyshome/untitled
769cdf0eec6a2154071ba8ec8263461c0153310e
[ "MIT" ]
null
null
null
database.py
Andyshome/untitled
769cdf0eec6a2154071ba8ec8263461c0153310e
[ "MIT" ]
1
2021-10-12T03:39:21.000Z
2021-10-12T03:39:21.000Z
import pymysql.cursors from apscheduler.schedulers.blocking import BlockingScheduler import pushNotification import time #I use the apscheduler to do schedule job, to prevent use too much system resource current_rowcount_result = {} first_check = True #This is the connection of database #This whole documentation cou...
33.426471
111
0.590849
import pymysql.cursors from apscheduler.schedulers.blocking import BlockingScheduler import pushNotification import time current_rowcount_result = {} first_check = True sched = BlockingScheduler() def checkUpdate(): try: global current_rowcount_result global first_check coon = pymysq...
true
true
f74beb322dbedf7ee5aeac9c1ed0249f14b47ba1
8,172
py
Python
keras_retinanet/bin/evaluate.py
yecharlie/keras-retinanet
abcc99ecb75293b895b4e1be274ddc84e76f9c84
[ "Apache-2.0" ]
null
null
null
keras_retinanet/bin/evaluate.py
yecharlie/keras-retinanet
abcc99ecb75293b895b4e1be274ddc84e76f9c84
[ "Apache-2.0" ]
null
null
null
keras_retinanet/bin/evaluate.py
yecharlie/keras-retinanet
abcc99ecb75293b895b4e1be274ddc84e76f9c84
[ "Apache-2.0" ]
1
2018-08-29T16:46:47.000Z
2018-08-29T16:46:47.000Z
#!/usr/bin/env python """ Copyright 2017-2018 Fizyr (https://fizyr.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 ...
41.482234
150
0.694077
import argparse import os import sys import numpy as np import yaml import keras import tensorflow as tf if __name__ == "__main__" and __package__ is None: sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..')) import keras_retinanet.bin __package__ = "keras_retinanet.bin" from ke...
true
true
f74beb61744a54ce7b132f9783ab50ab12a82660
3,642
py
Python
venv/Lib/site-packages/pybrain2/rl/learners/valuebased/interface.py
ishatserka/MachineLearningAndDataAnalysisCoursera
e82e772df2f4aec162cb34ac6127df10d14a625a
[ "MIT" ]
48
2015-01-02T12:52:58.000Z
2022-02-21T01:05:10.000Z
pybrain/rl/learners/valuebased/interface.py
abhishekgahlot/pybrain
c54661f13857d5bcb0095ba2fb12f5a403a4a70f
[ "BSD-3-Clause" ]
23
2017-03-28T09:17:33.000Z
2020-03-17T08:46:02.000Z
pybrain/rl/learners/valuebased/interface.py
abhishekgahlot/pybrain
c54661f13857d5bcb0095ba2fb12f5a403a4a70f
[ "BSD-3-Clause" ]
13
2019-05-11T01:59:58.000Z
2022-03-15T14:12:40.000Z
__author__ = 'Thomas Rueckstiess, ruecksti@in.tum.de' from pybrain.utilities import abstractMethod from pybrain.structure.modules import Table, Module, TanhLayer, LinearLayer, BiasUnit from pybrain.structure.connections import FullConnection from pybrain.structure.networks import FeedForwardNetwork from pybrain.struct...
38.744681
120
0.698517
__author__ = 'Thomas Rueckstiess, ruecksti@in.tum.de' from pybrain.utilities import abstractMethod from pybrain.structure.modules import Table, Module, TanhLayer, LinearLayer, BiasUnit from pybrain.structure.connections import FullConnection from pybrain.structure.networks import FeedForwardNetwork from pybrain.struct...
true
true
f74bebdf0375f360906768e1b6c3b615ce95bfcc
3,277
py
Python
spotpy/examples/hymod_python/hymod.py
cheginit/spotpy
38feaf7dbb0ddcbf31e138519ef649f07ac0cded
[ "MIT" ]
182
2016-04-16T16:38:21.000Z
2022-03-18T16:12:57.000Z
spotpy/examples/hymod_python/hymod.py
cheginit/spotpy
38feaf7dbb0ddcbf31e138519ef649f07ac0cded
[ "MIT" ]
234
2015-12-08T10:58:52.000Z
2021-12-21T17:54:34.000Z
spotpy/examples/hymod_python/hymod.py
cheginit/spotpy
38feaf7dbb0ddcbf31e138519ef649f07ac0cded
[ "MIT" ]
137
2015-12-23T09:32:13.000Z
2022-03-31T13:44:29.000Z
# -*- coding: utf-8 -*- ''' Copyright (c) 2015 by Tobias Houska This file is part of Statistical Parameter Estimation Tool (SPOTPY). :author: Tobias Houska and Benjamin Manns :paper: Houska, T., Kraft, P., Chamorro-Chavez, A. and Breuer, L.: SPOTting Model Parameters Using a Ready-Made Python Package, PLoS ONE, 10...
32.127451
136
0.618554
from numba import jit def hymod(Precip, PET, cmax,bexp,alpha,Rs,Rq): x_loss = 0.0 x_slow = 2.3503 / (Rs * 22.5) x_slow = 0 x_quick = [0,0,0] t = 0 output = [] while t <= len(Precip)-1: Pval = Precip[t] PETval = PET[t] ER1, ER2, x_l...
true
true
f74bebffe54780480d2345c4b54fd01c63664c1b
582
py
Python
python/mg0.py
epstabler/mgtdb
41e0018a2aebee90a5bdafe21dfac8d743aca4a7
[ "Apache-2.0" ]
9
2015-07-26T23:09:34.000Z
2021-01-20T23:54:55.000Z
python/python3/mg0.py
epstabler/mgtdb
41e0018a2aebee90a5bdafe21dfac8d743aca4a7
[ "Apache-2.0" ]
null
null
null
python/python3/mg0.py
epstabler/mgtdb
41e0018a2aebee90a5bdafe21dfac8d743aca4a7
[ "Apache-2.0" ]
7
2015-07-20T16:46:03.000Z
2021-08-14T02:01:17.000Z
g = [ ([],[('sel','V'),('cat','C')]), ([],[('sel','V'),('pos','wh'),('cat','C')]), (['the'],[('sel','N'),('cat','D')]), (['which'],[('sel','N'),('cat','D'),('neg','wh')]), (['king'],[('cat','N')]), (['queen'],[('cat','N')]), (['wine'],[('cat','N')]), (['beer'],[...
41.571429
60
0.264605
g = [ ([],[('sel','V'),('cat','C')]), ([],[('sel','V'),('pos','wh'),('cat','C')]), (['the'],[('sel','N'),('cat','D')]), (['which'],[('sel','N'),('cat','D'),('neg','wh')]), (['king'],[('cat','N')]), (['queen'],[('cat','N')]), (['wine'],[('cat','N')]), (['beer'],[...
true
true
f74bec3312a7a510de53952c12eb194f11ce1679
2,106
py
Python
lib/galaxy_test/base/testcase.py
Tiffany8/galaxy
f1d45a0fadf9a4b4c1be72af5b7356ebd9df467f
[ "CC-BY-3.0" ]
null
null
null
lib/galaxy_test/base/testcase.py
Tiffany8/galaxy
f1d45a0fadf9a4b4c1be72af5b7356ebd9df467f
[ "CC-BY-3.0" ]
6
2021-11-11T20:57:49.000Z
2021-12-10T15:30:33.000Z
lib/galaxy_test/base/testcase.py
Tiffany8/galaxy
f1d45a0fadf9a4b4c1be72af5b7356ebd9df467f
[ "CC-BY-3.0" ]
null
null
null
import logging import os import unittest from typing import ( Any, Optional, ) from galaxy.tool_util.verify.test_data import TestDataResolver from galaxy_test.base.env import ( setup_keep_outdir, target_url_parts, ) log = logging.getLogger(__name__) class FunctionalTestCase(unittest.TestCase): "...
31.909091
108
0.68661
import logging import os import unittest from typing import ( Any, Optional, ) from galaxy.tool_util.verify.test_data import TestDataResolver from galaxy_test.base.env import ( setup_keep_outdir, target_url_parts, ) log = logging.getLogger(__name__) class FunctionalTestCase(unittest.TestCase): ...
true
true
f74bedebd215676bae0d7f950912d4811e03c57f
817
py
Python
tienda/api/serializers.py
BaniMontoya/Django_api_store
9e58bce3efafdd821367522336caee0531a5410c
[ "MIT" ]
null
null
null
tienda/api/serializers.py
BaniMontoya/Django_api_store
9e58bce3efafdd821367522336caee0531a5410c
[ "MIT" ]
null
null
null
tienda/api/serializers.py
BaniMontoya/Django_api_store
9e58bce3efafdd821367522336caee0531a5410c
[ "MIT" ]
null
null
null
from rest_framework.serializers import ModelSerializer from api.models import Stock_En_Tienda, Tienda, Categoria, SubCategoria, Producto class Stock_En_TiendaSerializer(ModelSerializer): class Meta: model = Stock_En_Tienda depth = 2 fields = '__all__' class TiendaSerializer(ModelSeriali...
19
81
0.653611
from rest_framework.serializers import ModelSerializer from api.models import Stock_En_Tienda, Tienda, Categoria, SubCategoria, Producto class Stock_En_TiendaSerializer(ModelSerializer): class Meta: model = Stock_En_Tienda depth = 2 fields = '__all__' class TiendaSerializer(ModelSeriali...
true
true
f74bee1552bd5c2cfc1aa8d349bc38fa0414f8a1
1,866
py
Python
can-io-firmware/set_servo.py
greck2908/robot-software
2e1e8177148a089e8883967375dde7f8ed3d878b
[ "MIT" ]
40
2016-10-04T19:59:22.000Z
2020-12-25T18:11:35.000Z
can-io-firmware/set_servo.py
greck2908/robot-software
2e1e8177148a089e8883967375dde7f8ed3d878b
[ "MIT" ]
209
2016-09-21T21:54:28.000Z
2022-01-26T07:42:37.000Z
can-io-firmware/set_servo.py
greck2908/robot-software
2e1e8177148a089e8883967375dde7f8ed3d878b
[ "MIT" ]
21
2016-11-07T14:40:16.000Z
2021-11-02T09:53:37.000Z
#!/usr/bin/env python3 """ Sends a PWM via UAVCAN """ import argparse import uavcan import os DSDL_DIR = os.path.join(os.path.dirname(__file__), "../uavcan_data_types/cvra") def parse_args(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument( "port", help="SocketCAN i...
23.037037
88
0.608253
import argparse import uavcan import os DSDL_DIR = os.path.join(os.path.dirname(__file__), "../uavcan_data_types/cvra") def parse_args(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument( "port", help="SocketCAN interface (e.g. can0) or SLCAN serial port (e.g. /dev/...
true
true
f74bf31b208b806796771125c7f9c93bab6095e4
815
py
Python
__init__.py
Goggin/Infoblox-API-Python
f6c4b075a1aee4fc137b68e75f3e1f4397b78a2f
[ "Apache-2.0" ]
2
2016-09-01T18:48:34.000Z
2016-10-06T22:15:23.000Z
__init__.py
Goggin/Infoblox-API-Python
f6c4b075a1aee4fc137b68e75f3e1f4397b78a2f
[ "Apache-2.0" ]
2
2021-08-03T17:12:38.000Z
2021-08-07T14:41:31.000Z
__init__.py
Goggin/Infoblox-API-Python
f6c4b075a1aee4fc137b68e75f3e1f4397b78a2f
[ "Apache-2.0" ]
2
2017-04-17T23:43:55.000Z
2018-06-28T18:33:23.000Z
# # Copyright 2014 "Igor Feoktistov" <ifeoktistov@yahoo.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 b...
42.894737
115
0.766871
from .infoblox import InfobloxNotFoundException, InfobloxNoIPavailableException, InfobloxGeneralException, Infoblox
true
true
f74bf51aae0693b846319822e18e59397efa906b
6,836
py
Python
tensorflow/python/keras/layers/serialization.py
joshz123/tensorflow
7841ca029060ab78e221e757d4b1ee6e3e0ffaa4
[ "Apache-2.0" ]
3
2019-04-01T09:22:17.000Z
2020-01-20T16:33:22.000Z
tensorflow/python/keras/layers/serialization.py
joshz123/tensorflow
7841ca029060ab78e221e757d4b1ee6e3e0ffaa4
[ "Apache-2.0" ]
3
2019-03-21T17:56:51.000Z
2019-11-13T21:02:35.000Z
tensorflow/python/keras/layers/serialization.py
joshz123/tensorflow
7841ca029060ab78e221e757d4b1ee6e3e0ffaa4
[ "Apache-2.0" ]
3
2019-04-01T09:22:18.000Z
2019-06-21T06:47:12.000Z
# 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/LICENSE-2.0 # # Unless required by applica...
36.55615
108
0.775453
from __future__ import absolute_import from __future__ import division from __future__ import print_function import threading from tensorflow.python import tf2 from tensorflow.python.keras.engine import base_layer from tensorflow.python.keras.engine import input_layer from tensorflow.python.keras.eng...
true
true
f74bf5daccabb0e36f23c5221f9767a39de5ea76
17,834
py
Python
scripts/get-model-data.py
jonodrew/digitalmarketplace-scripts
bb4b3f06b2da7b279ff875b9eb73604da643e524
[ "MIT" ]
null
null
null
scripts/get-model-data.py
jonodrew/digitalmarketplace-scripts
bb4b3f06b2da7b279ff875b9eb73604da643e524
[ "MIT" ]
44
2018-11-27T15:33:44.000Z
2019-01-10T12:43:24.000Z
scripts/get-model-data.py
jonodrew/digitalmarketplace-scripts
bb4b3f06b2da7b279ff875b9eb73604da643e524
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Generate data export CSVs Load model data from the API or the existing CSV, process it according to the rules defined in the CONFIG and store the output in the CSV. CSV files are read from and saved to `<output-dir>/<model>.csv` If called without a model name the script will dump all defined...
33.272388
118
0.541606
import os import sys sys.path.insert(0, '.') from docopt import docopt from dmapiclient import DataAPIClient from dmscripts.helpers.auth_helpers import get_auth_token from dmscripts.helpers.logging_helpers import logging, configure_logger from dmscripts.models import queries from dmscripts.models.process_rules impo...
true
true
f74bf5fb58ed13cbcc5521ec913efa70204685e3
1,067
py
Python
horizon/templatetags/shellfilter.py
maofutian/horizon
dab92e7d2f576caea8f81c8e22a516fb45633794
[ "Apache-2.0" ]
null
null
null
horizon/templatetags/shellfilter.py
maofutian/horizon
dab92e7d2f576caea8f81c8e22a516fb45633794
[ "Apache-2.0" ]
null
null
null
horizon/templatetags/shellfilter.py
maofutian/horizon
dab92e7d2f576caea8f81c8e22a516fb45633794
[ "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 # distributed under the Li...
34.419355
75
0.686036
from django.template import base from django.template import defaultfilters from django.utils import safestring register = base.Library() @register.filter(is_safe=True) @defaultfilters.stringfilter def shellfilter(value): replacements = {'\\': '\\\\', '`': '\`', ...
true
true
f74bf61d5c674fdac3cf87aa93323307372e65ff
6,689
py
Python
skyfield/tests/test_earth_satellites.py
zanzibar7/python-skyfield
332038d49ea5814061336cd70cad1d819e630f2b
[ "MIT" ]
null
null
null
skyfield/tests/test_earth_satellites.py
zanzibar7/python-skyfield
332038d49ea5814061336cd70cad1d819e630f2b
[ "MIT" ]
null
null
null
skyfield/tests/test_earth_satellites.py
zanzibar7/python-skyfield
332038d49ea5814061336cd70cad1d819e630f2b
[ "MIT" ]
1
2020-12-21T15:07:51.000Z
2020-12-21T15:07:51.000Z
# -*- coding: utf-8 -*- from numpy import array from skyfield import api from skyfield.api import EarthSatellite, load from skyfield.constants import AU_KM, AU_M from skyfield.sgp4lib import TEME_to_ITRF from skyfield.timelib import julian_date line1 = '1 25544U 98067A 18184.80969102 .00001614 00000-0 31745-4 0 ...
38.66474
79
0.683211
from numpy import array from skyfield import api from skyfield.api import EarthSatellite, load from skyfield.constants import AU_KM, AU_M from skyfield.sgp4lib import TEME_to_ITRF from skyfield.timelib import julian_date line1 = '1 25544U 98067A 18184.80969102 .00001614 00000-0 31745-4 0 9993' line2 = '2 25544...
true
true
f74bf7575baf128effb277e0cf37cb0087a375f0
2,687
py
Python
tool/wllvm/wllvm/filetype.py
SZU-SE/PERIOD
7636dc7cd8c97ea2fb7c13d6d068efc3872b9d03
[ "MIT" ]
16
2022-01-14T12:05:49.000Z
2022-03-10T07:57:26.000Z
tool/wllvm/wllvm/filetype.py
SZU-SE/PERIOD
7636dc7cd8c97ea2fb7c13d6d068efc3872b9d03
[ "MIT" ]
1
2022-03-08T13:19:07.000Z
2022-03-09T06:39:43.000Z
tool/wllvm/wllvm/filetype.py
SZU-SE/PERIOD
7636dc7cd8c97ea2fb7c13d6d068efc3872b9d03
[ "MIT" ]
2
2022-01-16T16:55:40.000Z
2022-03-07T10:20:55.000Z
""" A static class that allows the type of a file to be checked. """ import os from subprocess import PIPE from .popenwrapper import Popen class FileType(object): """ A hack to grok the type of input files. """ # These are just here to keep pylint happy. UNKNOWN = None ELF_EXECUTABLE = None ...
29.855556
75
0.533681
import os from subprocess import PIPE from .popenwrapper import Popen class FileType(object): UNKNOWN = None ELF_EXECUTABLE = None ELF_OBJECT = None ELF_SHARED = None MACH_EXECUTABLE = None MACH_OBJECT = None MACH_SHARED = None ARCHIVE = None THIN_ARCHIVE = None r...
true
true
f74bf87a050aa2a37b5313b3d1dc35d0143280dc
20,261
py
Python
alignmentrs/aln/mixins/serde.py
yamasampo/alignmentrs
5f963d13ac2db72f4ef23b462de0836526f590b7
[ "MIT" ]
null
null
null
alignmentrs/aln/mixins/serde.py
yamasampo/alignmentrs
5f963d13ac2db72f4ef23b462de0836526f590b7
[ "MIT" ]
null
null
null
alignmentrs/aln/mixins/serde.py
yamasampo/alignmentrs
5f963d13ac2db72f4ef23b462de0836526f590b7
[ "MIT" ]
null
null
null
from collections import OrderedDict, ChainMap from copy import deepcopy import os import json import pickle import re import io import pandas from libalignmentrs.alignment import SeqMatrix from libalignmentrs.readers import fasta_to_dict from alignmentrs.utils import to_intlist __all__ = [ 'FastaSerdeMixin', 'D...
37.381919
141
0.594887
from collections import OrderedDict, ChainMap from copy import deepcopy import os import json import pickle import re import io import pandas from libalignmentrs.alignment import SeqMatrix from libalignmentrs.readers import fasta_to_dict from alignmentrs.utils import to_intlist __all__ = [ 'FastaSerdeMixin', 'D...
true
true
f74bf8e9556093a29db62dec97d4e383c58a1403
850
py
Python
mathgenerator/funcs/statistics/data_summary.py
ieshaan12/mathgenerator
d44a062c2c8f7af27355190432811f63fdd89568
[ "MIT" ]
1
2020-10-22T21:34:08.000Z
2020-10-22T21:34:08.000Z
mathgenerator/funcs/statistics/data_summary.py
ieshaan12/mathgenerator
d44a062c2c8f7af27355190432811f63fdd89568
[ "MIT" ]
null
null
null
mathgenerator/funcs/statistics/data_summary.py
ieshaan12/mathgenerator
d44a062c2c8f7af27355190432811f63fdd89568
[ "MIT" ]
null
null
null
from .__init__ import * def dataSummaryFunc(number_values=15, minval=5, maxval=50): random_list = [] for i in range(number_values): n = random.randint(minval, maxval) random_list.append(n) a = sum(random_list) mean = a / number_values var = 0 for i in range(number_values): ...
28.333333
82
0.636471
from .__init__ import * def dataSummaryFunc(number_values=15, minval=5, maxval=50): random_list = [] for i in range(number_values): n = random.randint(minval, maxval) random_list.append(n) a = sum(random_list) mean = a / number_values var = 0 for i in range(number_values): ...
true
true
f74bf8e95d163cec2ff162cc35ed2eb0cc02095c
1,629
py
Python
mendeleev/vis/seaborn.py
lmmentel/mendeleev
f6ac866c831e3041910ae97a7177301b1be5b3e7
[ "MIT" ]
105
2019-08-25T22:59:22.000Z
2022-03-29T07:18:01.000Z
mendeleev/vis/seaborn.py
lmmentel/mendeleev
f6ac866c831e3041910ae97a7177301b1be5b3e7
[ "MIT" ]
32
2019-08-25T23:03:19.000Z
2022-01-29T19:32:46.000Z
mendeleev/vis/seaborn.py
lmmentel/mendeleev
f6ac866c831e3041910ae97a7177301b1be5b3e7
[ "MIT" ]
29
2019-09-30T16:20:15.000Z
2022-03-09T02:28:55.000Z
from typing import Tuple import seaborn as sns import numpy as np import pandas as pd import matplotlib.pyplot as plt def heatmap( elements: pd.DataFrame, prop: str, style: str = "whitegrid", figsize: Tuple[int] = (16, 10), cmap: str = "RdBu_r", lw: int = 1, output: str = None, **kwarg...
31.326923
92
0.653161
from typing import Tuple import seaborn as sns import numpy as np import pandas as pd import matplotlib.pyplot as plt def heatmap( elements: pd.DataFrame, prop: str, style: str = "whitegrid", figsize: Tuple[int] = (16, 10), cmap: str = "RdBu_r", lw: int = 1, output: str = None, **kwarg...
true
true
f74bf94638f48758595e21f9ffacf84048d47cb8
746
py
Python
apps/urls.py
reimibeta/django-store-item-models
0be5fad0df0b3ebc7283fc6369f0e769a4743987
[ "Apache-2.0" ]
null
null
null
apps/urls.py
reimibeta/django-store-item-models
0be5fad0df0b3ebc7283fc6369f0e769a4743987
[ "Apache-2.0" ]
35
2020-10-24T22:14:41.000Z
2022-03-07T10:20:25.000Z
apps/urls.py
reimibeta/django-store-item-models
0be5fad0df0b3ebc7283fc6369f0e769a4743987
[ "Apache-2.0" ]
null
null
null
"""apps 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') Class-based vi...
33.909091
77
0.707775
from django.contrib import admin from django.urls import path urlpatterns = [ path('admin/', admin.site.urls), ]
true
true
f74bfa131d81c9465a3b010d0988ce370ac6534a
3,029
py
Python
rpi_src/src/nmea_navsat_driver/src/libnmea_navsat_driver/nodes/nmea_topic_driver.py
HyunCello/Tutorial
1254b2ce66a5fe7450e254ac636064877b2416f7
[ "Apache-2.0" ]
3
2020-07-31T07:10:46.000Z
2021-11-14T16:21:17.000Z
rpi_src/src/nmea_navsat_driver/src/libnmea_navsat_driver/nodes/nmea_topic_driver.py
HyunCello/Tutorial
1254b2ce66a5fe7450e254ac636064877b2416f7
[ "Apache-2.0" ]
6
2020-08-19T21:21:58.000Z
2020-10-05T13:33:19.000Z
rpi_src/src/nmea_navsat_driver/src/libnmea_navsat_driver/nodes/nmea_topic_driver.py
HyunCello/Tutorial
1254b2ce66a5fe7450e254ac636064877b2416f7
[ "Apache-2.0" ]
1
2021-04-17T14:10:43.000Z
2021-04-17T14:10:43.000Z
# Software License Agreement (BSD License) # # Copyright (c) 2013, Eric Perko # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyrigh...
38.833333
100
0.733245
from nmea_msgs.msg import Sentence import rospy from libnmea_navsat_driver.driver import RosNMEADriver def nmea_sentence_callback(nmea_sentence, driver): try: driver.add_sentence( nmea_sentence.sentence, frame_id=nmea_sentence.header.frame_id, ...
true
true
f74bfae14ea8e361bfd9a147cec9f55e5eecb5a2
5,197
py
Python
characterise_inauthentic_tweets.py
weberdc/socmed_repeatability
85da18cbffa53f18279844117b2aed226104ce11
[ "Apache-2.0" ]
2
2021-06-30T07:29:10.000Z
2022-01-20T15:17:26.000Z
characterise_inauthentic_tweets.py
weberdc/socmed_repeatability
85da18cbffa53f18279844117b2aed226104ce11
[ "Apache-2.0" ]
null
null
null
characterise_inauthentic_tweets.py
weberdc/socmed_repeatability
85da18cbffa53f18279844117b2aed226104ce11
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 from __future__ import print_function import gzip import json import re import sys # import time from argparse import ArgumentParser # from datetime import datetime class Options: def __init__(self): self.usage = 'characterise_inauthentic_tweets.py -i <file of tweets> [-v|--verbos...
31.307229
110
0.583414
from __future__ import print_function import gzip import json import re import sys from argparse import ArgumentParser class Options: def __init__(self): self.usage = 'characterise_inauthentic_tweets.py -i <file of tweets> [-v|--verbose]' self._init_parser() def _init_parser(self): ...
true
true
f74bfcbe7aa4c1adcbd1a3740b265b895417dc80
5,874
py
Python
dss_vae/structs/distance_tree.py
baoy-nlp/DSS-VAE
855f5722301b2d22aef622e7bb8fef74a759f9de
[ "Apache-2.0" ]
37
2019-07-05T16:20:13.000Z
2021-12-21T05:04:49.000Z
dss_vae/structs/distance_tree.py
baoy-nlp/DSS-VAE
855f5722301b2d22aef622e7bb8fef74a759f9de
[ "Apache-2.0" ]
2
2019-08-28T11:51:01.000Z
2021-06-06T11:39:21.000Z
dss_vae/structs/distance_tree.py
baoy-nlp/DSS-VAE
855f5722301b2d22aef622e7bb8fef74a759f9de
[ "Apache-2.0" ]
3
2020-01-03T06:17:13.000Z
2021-11-29T12:32:01.000Z
import re import nltk import numpy word_tags = ['CC', 'CD', 'DT', 'EX', 'FW', 'IN', 'JJ', 'JJR', 'JJS', 'LS', 'MD', 'NN', 'NNS', 'NNP', 'NNPS', 'PDT', 'POS', 'PRP', 'PRP$', 'RB', 'RBR', 'RBS', 'RP', 'SYM', 'TO', 'UH', 'VB', 'VBD', 'VBG', 'VBN', 'VBP', 'VBZ', 'WDT', ...
31.411765
86
0.486381
import re import nltk import numpy word_tags = ['CC', 'CD', 'DT', 'EX', 'FW', 'IN', 'JJ', 'JJR', 'JJS', 'LS', 'MD', 'NN', 'NNS', 'NNP', 'NNPS', 'PDT', 'POS', 'PRP', 'PRP$', 'RB', 'RBR', 'RBS', 'RP', 'SYM', 'TO', 'UH', 'VB', 'VBD', 'VBG', 'VBN', 'VBP', 'VBZ', 'WDT', ...
true
true
f74bfe051c273f30b8cd3727837b54f6af06595b
10,723
py
Python
util/ec3po/interpreter_unittest.py
Basavaraja-MS/ec_cadence
8d99bd934541cafc2a151bf4765877b10b4df0e9
[ "BSD-3-Clause" ]
null
null
null
util/ec3po/interpreter_unittest.py
Basavaraja-MS/ec_cadence
8d99bd934541cafc2a151bf4765877b10b4df0e9
[ "BSD-3-Clause" ]
null
null
null
util/ec3po/interpreter_unittest.py
Basavaraja-MS/ec_cadence
8d99bd934541cafc2a151bf4765877b10b4df0e9
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python2 # Copyright 2015 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for the EC-3PO interpreter.""" from __future__ import print_function # pylint: disable=cros-logging-import import loggi...
41.723735
80
0.680407
from __future__ import print_function import logging import mock import multiprocessing import tempfile import unittest import interpreter class TestEnhancedECBehaviour(unittest.TestCase): def setUp(self): logging.basicConfig(level=logging.DEBUG, format=('%(asctime)s - %(mod...
true
true
f74bfe258081dc7ecfb9590cd0666e46bdc4fed4
1,503
py
Python
src/infi/winapi/file_version_information/__init__.py
Infinidat/infi.winapi.file_version_information
d11a50fb8007c18338b522c142cbb07bad51a289
[ "BSD-3-Clause" ]
null
null
null
src/infi/winapi/file_version_information/__init__.py
Infinidat/infi.winapi.file_version_information
d11a50fb8007c18338b522c142cbb07bad51a289
[ "BSD-3-Clause" ]
1
2016-09-08T08:55:00.000Z
2016-09-08T08:55:00.000Z
src/infi/winapi/file_version_information/__init__.py
Infinidat/infi.winapi.file_version_information
d11a50fb8007c18338b522c142cbb07bad51a289
[ "BSD-3-Clause" ]
null
null
null
__import__("pkg_resources").declare_namespace(__name__) import ctypes import os from . import api class File(object): def __init__(self, filepath): super(File, self).__init__() self._path = filepath def _get_version_info_size(self): filepath = ctypes.create_unicode_buffer(self._path) ...
37.575
84
0.691949
__import__("pkg_resources").declare_namespace(__name__) import ctypes import os from . import api class File(object): def __init__(self, filepath): super(File, self).__init__() self._path = filepath def _get_version_info_size(self): filepath = ctypes.create_unicode_buffer(self._path) ...
true
true
f74bff23b6c97375131c2a5c986da23bef611c69
13,319
py
Python
utilities/lattice_parser/lattice_parser.py
WencaiCheng/IMPACT-Z
1d4445f024f821b705e164f9e8cb34599feb0def
[ "BSD-3-Clause-LBNL" ]
null
null
null
utilities/lattice_parser/lattice_parser.py
WencaiCheng/IMPACT-Z
1d4445f024f821b705e164f9e8cb34599feb0def
[ "BSD-3-Clause-LBNL" ]
null
null
null
utilities/lattice_parser/lattice_parser.py
WencaiCheng/IMPACT-Z
1d4445f024f821b705e164f9e8cb34599feb0def
[ "BSD-3-Clause-LBNL" ]
null
null
null
import sys import re from math import * class lattice_parser: ''' input: lines is lattice section lines, line is usedline ''' def __init__(self, fileName, lineName): self.fileName = fileName self.lineName = lineName.upper() # in code, upper case convention ...
34.775457
149
0.404535
import sys import re from math import * class lattice_parser: def __init__(self, fileName, lineName): self.fileName = fileName self.lineName = lineName.upper() self.trackline = [] def readfile(self): f = open(self.fileName,'r') lines = f.readlines...
true
true
f74bffcf4287a98ea6d815459aed5f2d9c22ee21
2,820
py
Python
Exercises1.py
Neo-sunny/pythonProgs
a9d2359d8a09d005d0ba6f94d7d256bf91499793
[ "MIT" ]
null
null
null
Exercises1.py
Neo-sunny/pythonProgs
a9d2359d8a09d005d0ba6f94d7d256bf91499793
[ "MIT" ]
null
null
null
Exercises1.py
Neo-sunny/pythonProgs
a9d2359d8a09d005d0ba6f94d7d256bf91499793
[ "MIT" ]
null
null
null
def hello(): """ prints hello, world """ print("Hello, world!") def areacircle(radius): """ Computes the area of a circle of the given radius """ area = 3.14*radius**2 print("The area of a circle of radius",radius,"is", area) def areatriangle(b,h): area = 0.5*b*h print("The area of a triangl...
37.6
79
0.625532
def hello(): print("Hello, world!") def areacircle(radius): area = 3.14*radius**2 print("The area of a circle of radius",radius,"is", area) def areatriangle(b,h): area = 0.5*b*h print("The area of a triangle is", area) def fahrenheit_to_celsius(temp): newTemp = 5*(temp-32)/9 pr...
true
true
f74c0034e9fa060a615d8aea21b873235f67b1fb
2,667
py
Python
fintech/sitemanager/forms.py
fpark7/cs3240-s17-team31
5095e8ef29d5fa14917a4c542e021025d38b6123
[ "MIT" ]
null
null
null
fintech/sitemanager/forms.py
fpark7/cs3240-s17-team31
5095e8ef29d5fa14917a4c542e021025d38b6123
[ "MIT" ]
null
null
null
fintech/sitemanager/forms.py
fpark7/cs3240-s17-team31
5095e8ef29d5fa14917a4c542e021025d38b6123
[ "MIT" ]
null
null
null
from django import forms from django.contrib.auth.models import User from newsletter.models import Report from newsletter.models import SiteUser from django.contrib.auth.models import Group, Permission class ReportForm(forms.ModelForm): COUNTRIES = (('US', 'United States'), ('CA', 'Canada'), ...
50.320755
120
0.649419
from django import forms from django.contrib.auth.models import User from newsletter.models import Report from newsletter.models import SiteUser from django.contrib.auth.models import Group, Permission class ReportForm(forms.ModelForm): COUNTRIES = (('US', 'United States'), ('CA', 'Canada'), ...
true
true
f74c01186577a2d59b67f59bd297a10f61dee31a
1,351
py
Python
utility/read_proto.py
polltooh/TensorflowFramework
0c996c8ad98b32fc2c50f8dc0660038a65de312c
[ "Apache-2.0" ]
4
2017-03-04T02:30:27.000Z
2019-01-14T02:30:23.000Z
utility/read_proto.py
polltooh/TensorflowFramework
0c996c8ad98b32fc2c50f8dc0660038a65de312c
[ "Apache-2.0" ]
null
null
null
utility/read_proto.py
polltooh/TensorflowFramework
0c996c8ad98b32fc2c50f8dc0660038a65de312c
[ "Apache-2.0" ]
null
null
null
import file_io def check_bool(val): if val == 'true' or val == "True": val = True if val == 'false' or val == "False": val = False return val def check_digit(val): if val.replace(".","").isdigit(): val = float(val) if val.is_integer(): val = int(val) ret...
24.125
44
0.527757
import file_io def check_bool(val): if val == 'true' or val == "True": val = True if val == 'false' or val == "False": val = False return val def check_digit(val): if val.replace(".","").isdigit(): val = float(val) if val.is_integer(): val = int(val) ret...
true
true
f74c016129b09477da5d9c114067e451faecae86
14,539
py
Python
tests/test_api.py
Alchez/shipstation-client
5afaefc3161fa779d568211fa037e2a0fd2e0705
[ "MIT" ]
null
null
null
tests/test_api.py
Alchez/shipstation-client
5afaefc3161fa779d568211fa037e2a0fd2e0705
[ "MIT" ]
null
null
null
tests/test_api.py
Alchez/shipstation-client
5afaefc3161fa779d568211fa037e2a0fd2e0705
[ "MIT" ]
null
null
null
import datetime import json import os from decimal import Decimal from uuid import UUID import pytest import respx from conftest import * from shipstation.api import ShipStation from shipstation.models import * from shipstation.pagination import Page @respx.mock def test_get_carrier(ss: ShipStation, mocked_api: res...
36.076923
88
0.693033
import datetime import json import os from decimal import Decimal from uuid import UUID import pytest import respx from conftest import * from shipstation.api import ShipStation from shipstation.models import * from shipstation.pagination import Page @respx.mock def test_get_carrier(ss: ShipStation, mocked_api: res...
true
true
f74c018820ace67484b2be8025d5c105494d1880
1,667
py
Python
simul/hard_spheres.py
riccardoscheda/py-utils
6041b3b97ae2210580de9538d4d18a4d04687fa4
[ "MIT" ]
null
null
null
simul/hard_spheres.py
riccardoscheda/py-utils
6041b3b97ae2210580de9538d4d18a4d04687fa4
[ "MIT" ]
null
null
null
simul/hard_spheres.py
riccardoscheda/py-utils
6041b3b97ae2210580de9538d4d18a4d04687fa4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -* import numpy as np from vpython import sphere, vector, color, rate from box_utils import build_box, check_wall_hit def create_balls(N: int=1, r: float=.2) -> list[sphere]: balls = [] for i in range(N): ball = sphere(color=color.green, radius=r, make_tra...
23.478873
99
0.506899
import numpy as np from vpython import sphere, vector, color, rate from box_utils import build_box, check_wall_hit def create_balls(N: int=1, r: float=.2) -> list[sphere]: balls = [] for i in range(N): ball = sphere(color=color.green, radius=r, make_trail=False, pos=vector.random()*2) bal...
true
true
f74c031568335a03c9d2daa4922f8c9d6bcf5834
19,061
py
Python
gpMgmt/bin/gppylib/operations/test/regress/test_package/__init__.py
JunfengYang/gpdb
7f1589a786e7fd9cac950ee104a729e370ec3606
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
gpMgmt/bin/gppylib/operations/test/regress/test_package/__init__.py
JunfengYang/gpdb
7f1589a786e7fd9cac950ee104a729e370ec3606
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
gpMgmt/bin/gppylib/operations/test/regress/test_package/__init__.py
JunfengYang/gpdb
7f1589a786e7fd9cac950ee104a729e370ec3606
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
import os import shutil import unittest import tempfile import platform import getpass import tarfile from gppylib.db import dbconn from gppylib.gparray import GpArray from gppylib.gpversion import MAIN_VERSION from contextlib import closing from gppylib.commands import gp from gppylib.commands.unix import Scp from gp...
34.71949
145
0.642621
import os import shutil import unittest import tempfile import platform import getpass import tarfile from gppylib.db import dbconn from gppylib.gparray import GpArray from gppylib.gpversion import MAIN_VERSION from contextlib import closing from gppylib.commands import gp from gppylib.commands.unix import Scp from gp...
true
true
f74c03699d48af83cc21a739c52f9bdf1f27eece
271
py
Python
fireSummary/routes/api/v1/__init__.py
gfw-api/fires-summary-stats
3d5cc2030c9ac87d674dd99805a9b2c215aac05e
[ "MIT" ]
null
null
null
fireSummary/routes/api/v1/__init__.py
gfw-api/fires-summary-stats
3d5cc2030c9ac87d674dd99805a9b2c215aac05e
[ "MIT" ]
null
null
null
fireSummary/routes/api/v1/__init__.py
gfw-api/fires-summary-stats
3d5cc2030c9ac87d674dd99805a9b2c215aac05e
[ "MIT" ]
null
null
null
from fireSummary.routes.api.v1.fires_router import fires_endpoints, glad_endpoints from flask import jsonify # GENERIC Error def error(status=400, detail='Bad Request'): return jsonify(errors=[{ 'status': status, 'detail': detail }]), status
19.357143
82
0.697417
from fireSummary.routes.api.v1.fires_router import fires_endpoints, glad_endpoints from flask import jsonify def error(status=400, detail='Bad Request'): return jsonify(errors=[{ 'status': status, 'detail': detail }]), status
true
true
f74c04f2c6414ebbf1187eea865b3ccb8326122e
110
py
Python
Journal/summary_image.py
prabhanshu11/journal
f25bef15ddc8f81a7fb3f8fa73e79294460680cb
[ "Apache-2.0" ]
1
2020-08-18T06:14:47.000Z
2020-08-18T06:14:47.000Z
Journal/summary_image.py
prabhanshu11/journal
f25bef15ddc8f81a7fb3f8fa73e79294460680cb
[ "Apache-2.0" ]
2
2021-09-28T03:10:50.000Z
2022-02-26T08:07:39.000Z
Journal/summary_image.py
prabhanshu11/journal
f25bef15ddc8f81a7fb3f8fa73e79294460680cb
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: 04_summary image.ipynb (unless otherwise specified). __all__ = []
36.666667
96
0.754545
__all__ = []
true
true
f74c053c701de62f751a97d3c7c9904718eec168
30,972
py
Python
ansible/modules/files/xml.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2022-01-25T22:52:58.000Z
2022-01-25T22:52:58.000Z
ansible/modules/files/xml.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
ansible/modules/files/xml.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2014, Red Hat, Inc. # Tim Bielawa <tbielawa@redhat.com> # Magnus Hedemark <mhedemar@redhat.com> # Copyright 2017, Dag Wieers <dag@wieers.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ impo...
36.266979
151
0.634121
from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = r''' --- module: xml short_description: Manage bits and pieces of...
true
true
f74c059847d4f3d24b4e90875b2b8f93318aff9a
5,668
py
Python
src/cryptography_patched/hazmat/primitives/padding.py
thatch/cryptography
0bdcf3d62bcb2051f82a39daf46cc67e43a8f465
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/cryptography_patched/hazmat/primitives/padding.py
thatch/cryptography
0bdcf3d62bcb2051f82a39daf46cc67e43a8f465
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/cryptography_patched/hazmat/primitives/padding.py
thatch/cryptography
0bdcf3d62bcb2051f82a39daf46cc67e43a8f465
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import abc import six from cryptography_patched import utils from crypt...
28.199005
79
0.674841
from __future__ import absolute_import, division, print_function import abc import six from cryptography_patched import utils from cryptography_patched.exceptions import AlreadyFinalized from cryptography_patched.hazmat.bindings._padding import lib @six.add_metaclass(abc.ABCMeta) class PaddingContext(object): ...
true
true
f74c05ab0ebe042cb91b74c2490f0e0a895ef769
5,110
py
Python
python/TetrisDRL.py
AlexLJC/MLTetris
dc47321746bcd67989cb7190941827c317036d6b
[ "MIT" ]
null
null
null
python/TetrisDRL.py
AlexLJC/MLTetris
dc47321746bcd67989cb7190941827c317036d6b
[ "MIT" ]
null
null
null
python/TetrisDRL.py
AlexLJC/MLTetris
dc47321746bcd67989cb7190941827c317036d6b
[ "MIT" ]
null
null
null
# Import import tensorflow as tf import numpy as np import pandas as pd from collections import deque import random import tetris as tetris # Hyperparameter num_episodes = 500 num_exploration_episodes = 100 max_len_episode = 1000 batch_size = 40 learning_rate = 0.005 gamma = 0.95 initial_epsilon = 1.0 final_epsilo...
32.75641
107
0.584932
import tensorflow as tf import numpy as np import pandas as pd from collections import deque import random import tetris as tetris num_episodes = 500 num_exploration_episodes = 100 max_len_episode = 1000 batch_size = 40 learning_rate = 0.005 gamma = 0.95 initial_epsilon = 1.0 final_epsilon = 0.01 eps_decay = 0.9...
true
true
f74c06bbc00ae4a707dfcebf719e9a954e7ac26a
930
py
Python
libs/imutils/feature/rootsift.py
rocketbot-cl/recognition
cca8a87070ccaca3a26e37345c36ab1bf836e258
[ "MIT" ]
6
2019-10-17T18:16:17.000Z
2021-10-04T08:10:30.000Z
libs/imutils/feature/rootsift.py
rocketbot-cl/recognition
cca8a87070ccaca3a26e37345c36ab1bf836e258
[ "MIT" ]
null
null
null
libs/imutils/feature/rootsift.py
rocketbot-cl/recognition
cca8a87070ccaca3a26e37345c36ab1bf836e258
[ "MIT" ]
3
2020-09-10T12:03:20.000Z
2021-04-26T13:19:53.000Z
# import the necessary packages from __future__ import absolute_import import numpy as np import cv2 from ..convenience import is_cv2 class RootSIFT: def __init__(self): # initialize the SIFT feature extractor for OpenCV 2.4 if is_cv2(): self.extractor = cv2.DescriptorExtractor_create("SIFT") # ...
30
70
0.706452
from __future__ import absolute_import import numpy as np import cv2 from ..convenience import is_cv2 class RootSIFT: def __init__(self): if is_cv2(): self.extractor = cv2.DescriptorExtractor_create("SIFT") else: self.extractor = cv2.xfeatures2d.SIFT_create() def compute(self, image, ...
true
true
f74c06c1b4b99f15be38c16bb8537a174d705ec3
7,306
py
Python
rlstructures/deprecated/batchers/buffers.py
Purple-PI/rlstructures
9b201b083715bbda2f3534b010c84e11dfc0a1c7
[ "MIT" ]
281
2021-01-13T14:20:23.000Z
2022-03-23T08:46:56.000Z
rlstructures/deprecated/batchers/buffers.py
Purple-PI/rlstructures
9b201b083715bbda2f3534b010c84e11dfc0a1c7
[ "MIT" ]
2
2021-01-22T23:28:34.000Z
2021-04-29T22:05:42.000Z
rlstructures/deprecated/batchers/buffers.py
Purple-PI/rlstructures
9b201b083715bbda2f3534b010c84e11dfc0a1c7
[ "MIT" ]
13
2021-01-15T14:53:32.000Z
2022-03-22T11:12:54.000Z
# # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # import torch import torch.multiprocessing as mp from rlstructures import TemporalDictTensor, DictTensor class Buffer: def get_free_...
33.209091
107
0.564057
import torch import torch.multiprocessing as mp from rlstructures import TemporalDictTensor, DictTensor class Buffer: def get_free_slots(self, k): raise NotImplementedError def set_free_slots(self, s): raise NotImplementedError def write(self, slots, variables): raise Not...
true
true
f74c074dd81c06f3ec1b63fb6e0bdaedbf6a4e71
12,312
py
Python
mainUi.py
RastogiAbhijeet/NewsReader
6b2edae53fc6bd50237d865bd45c039384e0dd23
[ "MIT" ]
1
2017-10-16T05:00:23.000Z
2017-10-16T05:00:23.000Z
mainUi.py
RastogiAbhijeet/NewsReader
6b2edae53fc6bd50237d865bd45c039384e0dd23
[ "MIT" ]
null
null
null
mainUi.py
RastogiAbhijeet/NewsReader
6b2edae53fc6bd50237d865bd45c039384e0dd23
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'haha.ui' # # Created by: PyQt5 UI code generator 5.6 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets from databaseHandling import InterfaceClass from webcam.webcam import Webcam ...
49.248
131
0.68884
from PyQt5 import QtCore, QtGui, QtWidgets from databaseHandling import InterfaceClass from webcam.webcam import Webcam import sys import time class Ui_MainWindow(object): def __init__(self): self.databaseObj = InterfaceClass() self.fetchDataList = [] self.counterForNe...
true
true
f74c086c94a6a313b3f805c0b323870dfb7bef08
8,815
py
Python
jacket/tests/storage/unit/api/contrib/test_volume_encryption_metadata.py
bopopescu/jacket
d7ad3147fcb43131098c2a5210847634ff5fb325
[ "Apache-2.0" ]
null
null
null
jacket/tests/storage/unit/api/contrib/test_volume_encryption_metadata.py
bopopescu/jacket
d7ad3147fcb43131098c2a5210847634ff5fb325
[ "Apache-2.0" ]
null
null
null
jacket/tests/storage/unit/api/contrib/test_volume_encryption_metadata.py
bopopescu/jacket
d7ad3147fcb43131098c2a5210847634ff5fb325
[ "Apache-2.0" ]
2
2016-08-10T02:21:49.000Z
2020-07-24T01:57:21.000Z
# Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory # 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/...
41.777251
80
0.603063
from oslo_serialization import jsonutils import webob from jacket.api.storage.storage.contrib import volume_encryption_metadata from jacket import context from jacket import db from jacket.storage import test from jacket.tests.storage.unit.api import fakes def return_volume_type_encryption_metadata(co...
true
true
f74c08de00b0062dd6f24feebd0136cbdc539830
2,262
py
Python
05_extract_retweets.py
tuchandra/echo-chambers
4f5bbbb213f0711614080773821f57c9b351dea6
[ "MIT" ]
4
2018-09-14T07:46:51.000Z
2020-11-04T03:43:11.000Z
05_extract_retweets.py
tuchandra/echo-chambers
4f5bbbb213f0711614080773821f57c9b351dea6
[ "MIT" ]
null
null
null
05_extract_retweets.py
tuchandra/echo-chambers
4f5bbbb213f0711614080773821f57c9b351dea6
[ "MIT" ]
2
2019-04-12T21:47:18.000Z
2020-11-23T17:56:17.000Z
"""Extract retweets by date from all of the tweets in collection. Creates a CSV for each date, and includes the IDs of tweets that were retweeted on that date. Format is (tweet_date, ID of the retweet, ID of original tweet) with the date formatted as YYYY_MM_DD. This script assumes: - MongoDB is listenin...
31.416667
109
0.608753
import csv import os import time import pymongo def export_retweets(client, collection_name): col = client["twitter"][collection_name] retweets = {} for i, tweet in enumerate(col.find({"retweeted_status": {"$exists" : True}}, no_cursor_timeout = True)): if i % 50000 == 0: ...
true
true
f74c0ab23ab9ad6a46db773081ad376999262411
268
py
Python
tests/artificial/transf_BoxCox/trend_ConstantTrend/cycle_30/ar_12/test_artificial_1024_BoxCox_ConstantTrend_30_12_20.py
shaido987/pyaf
b9afd089557bed6b90b246d3712c481ae26a1957
[ "BSD-3-Clause" ]
377
2016-10-13T20:52:44.000Z
2022-03-29T18:04:14.000Z
tests/artificial/transf_BoxCox/trend_ConstantTrend/cycle_30/ar_12/test_artificial_1024_BoxCox_ConstantTrend_30_12_20.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
160
2016-10-13T16:11:53.000Z
2022-03-28T04:21:34.000Z
tests/artificial/transf_BoxCox/trend_ConstantTrend/cycle_30/ar_12/test_artificial_1024_BoxCox_ConstantTrend_30_12_20.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
63
2017-03-09T14:51:18.000Z
2022-03-27T20:52:57.000Z
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "ConstantTrend", cycle_length = 30, transform = "BoxCox", sigma = 0.0, exog_count = 20, ar_order = 12);
38.285714
168
0.735075
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "ConstantTrend", cycle_length = 30, transform = "BoxCox", sigma = 0.0, exog_count = 20, ar_order = 12);
true
true
f74c0bdf102f3629f64a6c97a1ab1e1ec85dc87f
2,147
py
Python
conans/test/unittests/client/generators/text_test.py
johnmcfarlane/conan
725bd0cee4e53f35521aef7eeb61d4772c460d5e
[ "MIT" ]
null
null
null
conans/test/unittests/client/generators/text_test.py
johnmcfarlane/conan
725bd0cee4e53f35521aef7eeb61d4772c460d5e
[ "MIT" ]
4
2018-09-05T13:08:31.000Z
2020-03-05T09:17:20.000Z
conans/test/unittests/client/generators/text_test.py
johnmcfarlane/conan
725bd0cee4e53f35521aef7eeb61d4772c460d5e
[ "MIT" ]
2
2018-09-05T11:58:44.000Z
2018-09-05T12:14:11.000Z
# coding=utf-8 import textwrap import unittest from conans.client.generators.text import TXTGenerator from conans.model.build_info import CppInfo from conans.model.conan_file import ConanFile from conans.model.env_info import EnvValues from conans.model.ref import ConanFileReference from conans.model.settings import S...
33.030769
97
0.667443
import textwrap import unittest from conans.client.generators.text import TXTGenerator from conans.model.build_info import CppInfo from conans.model.conan_file import ConanFile from conans.model.env_info import EnvValues from conans.model.ref import ConanFileReference from conans.model.settings import Settings from c...
true
true
f74c0cf5996cfd74aab4e926b9539a3e961c79cb
19,309
py
Python
python/tensorflowjs/converters/keras_h5_conversion_test.py
pvaneck/tfjs-converter
074ed3252fab3d913679d5415a5e530efd4966b3
[ "Apache-2.0" ]
null
null
null
python/tensorflowjs/converters/keras_h5_conversion_test.py
pvaneck/tfjs-converter
074ed3252fab3d913679d5415a5e530efd4966b3
[ "Apache-2.0" ]
null
null
null
python/tensorflowjs/converters/keras_h5_conversion_test.py
pvaneck/tfjs-converter
074ed3252fab3d913679d5415a5e530efd4966b3
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
42.251641
80
0.693045
from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import os import shutil import tempfile import unittest import h5py import keras import numpy as np import tensorflow as tf from tensorflowjs.converters import keras_h5_conversion a...
true
true
f74c0d11213332b2628bbb87a29add87c2105dd4
1,308
py
Python
app.py
Dijereo/VersuSpace
6d74581d04b7409fad768c51c20334ac85f3ecf0
[ "MIT" ]
1
2020-07-03T00:33:19.000Z
2020-07-03T00:33:19.000Z
app.py
Dijereo/VersuSpace
6d74581d04b7409fad768c51c20334ac85f3ecf0
[ "MIT" ]
null
null
null
app.py
Dijereo/VersuSpace
6d74581d04b7409fad768c51c20334ac85f3ecf0
[ "MIT" ]
null
null
null
from game_screen import * class App: def __init__(self, width, height): self.width = width self.height = height self.window = pygame.display.set_mode((self.width, self.height)) pygame.display.set_caption('VersuSpace') self.running = True self.quit_listener = AppQuit...
31.142857
72
0.654434
from game_screen import * class App: def __init__(self, width, height): self.width = width self.height = height self.window = pygame.display.set_mode((self.width, self.height)) pygame.display.set_caption('VersuSpace') self.running = True self.quit_listener = AppQuit...
true
true
f74c0e4694b9bd0dea312456e4ada9d2a0721982
1,943
py
Python
mod_updater/sources/curse_forge.py
snallapa/mod_updater
783ddf09da9d3909ce3d466f148218dbc51e29c9
[ "MIT" ]
null
null
null
mod_updater/sources/curse_forge.py
snallapa/mod_updater
783ddf09da9d3909ce3d466f148218dbc51e29c9
[ "MIT" ]
1
2021-05-15T20:08:33.000Z
2021-05-22T21:19:41.000Z
mod_updater/sources/curse_forge.py
snallapa/mod_updater
783ddf09da9d3909ce3d466f148218dbc51e29c9
[ "MIT" ]
null
null
null
from .base import DownloadSource import requests from mod_updater.util.utils import TermColors class CurseForgeSource(DownloadSource): REQUIRED_ARGS = ["project_id"] OPTIONAL_ARGS = [("release_type", "release")] def __init__(self, project, release_type, path, mc_version): self._file_data_url =...
44.159091
123
0.644879
from .base import DownloadSource import requests from mod_updater.util.utils import TermColors class CurseForgeSource(DownloadSource): REQUIRED_ARGS = ["project_id"] OPTIONAL_ARGS = [("release_type", "release")] def __init__(self, project, release_type, path, mc_version): self._file_data_url =...
true
true
f74c0e8316a30ad4fbb2a6fc893e3a723310b2b9
2,565
py
Python
pychron/core/select_same.py
ael-noblegas/pychron
6ebbbb1f66a614972b62b7a9be4c784ae61b5d62
[ "Apache-2.0" ]
null
null
null
pychron/core/select_same.py
ael-noblegas/pychron
6ebbbb1f66a614972b62b7a9be4c784ae61b5d62
[ "Apache-2.0" ]
80
2018-07-17T20:10:20.000Z
2021-08-17T15:38:24.000Z
pychron/core/select_same.py
UManPychron/pychron
b84c9fd70072f9cbda30abe2c471e64fe3dd75d8
[ "Apache-2.0" ]
null
null
null
# =============================================================================== # Copyright 2018 ross # # 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/LICE...
33.311688
83
0.59961
from pyface.message_dialog import warning from traits.api import HasTraits, List from traitsui.api import UItem, CheckListEditor from pychron.core.helpers.traitsui_shortcuts import okcancel_view class SelectSameMixin(HasTraits): default_attr = None def select_same_attr(self): hs = sel...
true
true
f74c0f85bdb807bfb2f5ccc7afb32b59bf88a662
4,619
py
Python
retroprime/data_process/clean_uspto.py
wangxr0526/RetroPrime
a765b670b72fbfd512d0d437da8f27a95f9f0554
[ "MIT" ]
12
2020-09-30T11:16:42.000Z
2022-03-09T08:12:48.000Z
retroprime/data_process/clean_uspto.py
wangxr0526/RetroPrime
a765b670b72fbfd512d0d437da8f27a95f9f0554
[ "MIT" ]
2
2021-12-14T13:06:33.000Z
2022-03-29T03:04:44.000Z
retroprime/data_process/clean_uspto.py
wangxr0526/RetroPrime
a765b670b72fbfd512d0d437da8f27a95f9f0554
[ "MIT" ]
1
2021-02-01T07:30:07.000Z
2021-02-01T07:30:07.000Z
from __future__ import print_function from __future__ import absolute_import from __future__ import division import argparse import numpy as np import random import csv import os import sys import re from tqdm import tqdm from rdkit import Chem import pickle as cp def get_rxn_smiles(prod, reactants): prod_smi =...
34.470149
103
0.546872
from __future__ import print_function from __future__ import absolute_import from __future__ import division import argparse import numpy as np import random import csv import os import sys import re from tqdm import tqdm from rdkit import Chem import pickle as cp def get_rxn_smiles(prod, reactants): prod_smi =...
true
true
f74c105a2256b26683496be1da1c986b0606308b
998
py
Python
taskbuster/taskbuster/urls.py
memnonila/taskbuster-boilerplate
7c1313d567d983e8c569c5d826fa9b1508eebc00
[ "MIT" ]
null
null
null
taskbuster/taskbuster/urls.py
memnonila/taskbuster-boilerplate
7c1313d567d983e8c569c5d826fa9b1508eebc00
[ "MIT" ]
null
null
null
taskbuster/taskbuster/urls.py
memnonila/taskbuster-boilerplate
7c1313d567d983e8c569c5d826fa9b1508eebc00
[ "MIT" ]
null
null
null
"""taskbuster URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
34.413793
85
0.702405
from django.conf.urls import include, url from django.contrib import admin from django.conf.urls.i18n import i18n_patterns from .views import home, home_files urlpatterns = [ url(r'^(?P<filename>(robots.txt)|(humans.txt))$', home_files, name='home-files'), ] urlpatterns += i18n_patterns( url(r'^admin/', inclu...
true
true
f74c13916239b36c6f00b2b24c2c8c0b59d3209a
388
py
Python
setup.py
BehindLoader/py2ch
a79f877ad6d4bb526d2476c12e9d340178da2170
[ "MIT" ]
5
2019-08-05T12:06:33.000Z
2019-09-10T07:25:00.000Z
setup.py
BehindLoader/pych
a79f877ad6d4bb526d2476c12e9d340178da2170
[ "MIT" ]
16
2019-08-05T12:18:59.000Z
2019-08-14T20:21:08.000Z
setup.py
BehindLoader/pych
a79f877ad6d4bb526d2476c12e9d340178da2170
[ "MIT" ]
null
null
null
"""Setup py2ch application.""" from os.path import dirname, join from setuptools import setup version = '1.0' setup( name='pych', author='BehindLoader', version=version, packages=['pych'], license='MIT', description='Python 2ch API client.', long_description=open(join(dirname(__file__), ...
20.421053
72
0.664948
from os.path import dirname, join from setuptools import setup version = '1.0' setup( name='pych', author='BehindLoader', version=version, packages=['pych'], license='MIT', description='Python 2ch API client.', long_description=open(join(dirname(__file__), 'README.rst')).read(), inst...
true
true
f74c14228a11f128426330bfa8edd7bde452e16f
799
py
Python
code/resnet_approach/prepare.py
liuchangtai1996/MLIP
ec217d592b8c51e98729d8c2b2abe1b2d918e14f
[ "MIT" ]
null
null
null
code/resnet_approach/prepare.py
liuchangtai1996/MLIP
ec217d592b8c51e98729d8c2b2abe1b2d918e14f
[ "MIT" ]
null
null
null
code/resnet_approach/prepare.py
liuchangtai1996/MLIP
ec217d592b8c51e98729d8c2b2abe1b2d918e14f
[ "MIT" ]
null
null
null
import numpy as np import cv2 def load_batch(ls,od,data_path,batch_size,which_batch): image_list=[] for i in range(which_batch*batch_size,(which_batch+1)*batch_size): image=[] image.append(cv2.imread(data_path+ls[od[i]]+'_red.png',0)) image.append(cv2.imread(data_path+ls[od[i]]+...
34.73913
71
0.649562
import numpy as np import cv2 def load_batch(ls,od,data_path,batch_size,which_batch): image_list=[] for i in range(which_batch*batch_size,(which_batch+1)*batch_size): image=[] image.append(cv2.imread(data_path+ls[od[i]]+'_red.png',0)) image.append(cv2.imread(data_path+ls[od[i]]+...
true
true
f74c142e999a01e927a8a4f60ee35ed27ce20342
1,416
py
Python
enumchoicefield/utils.py
heckad/django-enumchoicefield
59e230f8eed086c87ac6a9243448d2cd9adfc250
[ "BSD-2-Clause" ]
null
null
null
enumchoicefield/utils.py
heckad/django-enumchoicefield
59e230f8eed086c87ac6a9243448d2cd9adfc250
[ "BSD-2-Clause" ]
null
null
null
enumchoicefield/utils.py
heckad/django-enumchoicefield
59e230f8eed086c87ac6a9243448d2cd9adfc250
[ "BSD-2-Clause" ]
2
2019-01-17T06:43:09.000Z
2019-02-21T23:27:01.000Z
from __future__ import absolute_import, unicode_literals from django.db.models import Case, IntegerField, When def order_enum(field, members): """ Make an annotation value that can be used to sort by an enum field. ``field`` The name of an EnumChoiceField. ``members`` An iterable of...
28.32
71
0.637006
from __future__ import absolute_import, unicode_literals from django.db.models import Case, IntegerField, When def order_enum(field, members): members = list(members) return Case( *(When(**{field: member, 'then': i}) for i, member in enumerate(members)), default=len(members), ...
true
true
f74c14745810433c772c64e6f2859dfcd8ca1535
455
py
Python
category/migrations/0002_auto_20180212_2213.py
Ortus-Team/Moim
57bdd94ffb0c3b5d7dc74396264074e2a9a7f84a
[ "MIT" ]
null
null
null
category/migrations/0002_auto_20180212_2213.py
Ortus-Team/Moim
57bdd94ffb0c3b5d7dc74396264074e2a9a7f84a
[ "MIT" ]
6
2020-06-05T17:44:24.000Z
2022-02-09T23:15:16.000Z
category/migrations/0002_auto_20180212_2213.py
Ortus-Team/Moim
57bdd94ffb0c3b5d7dc74396264074e2a9a7f84a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2018-02-12 22:13 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('category', '0001_initial'), ] operations = [ migrations.AlterField( ...
21.666667
63
0.613187
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('category', '0001_initial'), ] operations = [ migrations.AlterField( model_name='category', name='title', field...
true
true
f74c15740983b6f7b7d3e9d971c759b911ca5ee1
15,079
py
Python
behavioural_planner.py
19tony97/Autonomous_vheicle_drivingProject
3938b132e11f7705bff2c2004ee80e1f87438565
[ "MIT" ]
3
2021-07-06T07:55:03.000Z
2022-02-03T12:03:52.000Z
behavioural_planner.py
19tony97/Autonomous_vheicle_drivingProject
3938b132e11f7705bff2c2004ee80e1f87438565
[ "MIT" ]
null
null
null
behavioural_planner.py
19tony97/Autonomous_vheicle_drivingProject
3938b132e11f7705bff2c2004ee80e1f87438565
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import numpy as np import math from obstacle_detection import check_for_obs # State machine states FOLLOW_LANE = 0 DECELERATE_TO_STOP = 1 STAY_STOPPED = 2 # Stop speed threshold STOP_THRESHOLD = 0.02 # Number of cycles before moving from stop sign. SEMAPHORE = 3 STOP_COUNTS = 10 class Behav...
45.972561
146
0.597387
import numpy as np import math from obstacle_detection import check_for_obs FOLLOW_LANE = 0 DECELERATE_TO_STOP = 1 STAY_STOPPED = 2 STOP_THRESHOLD = 0.02 SEMAPHORE = 3 STOP_COUNTS = 10 class BehaviouralPlanner: def __init__(self, lookahead, lead_vehicle_lookahead, traffic_light_state): self._looka...
true
true
f74c15cee34f3b028bc37ac3ca72e02625cf7231
1,946
py
Python
apiflask/utils.py
johntheprime/apiflask
66e2138662e5fde1b1b1b053f375aa67a347c12c
[ "MIT" ]
1
2021-04-14T00:42:45.000Z
2021-04-14T00:42:45.000Z
apiflask/utils.py
wo-ni/apiflask
bd7cf2c10f00426c8aff423e0d49371931b1cbfa
[ "MIT" ]
null
null
null
apiflask/utils.py
wo-ni/apiflask
bd7cf2c10f00426c8aff423e0d49371931b1cbfa
[ "MIT" ]
null
null
null
from typing import Any from werkzeug.http import HTTP_STATUS_CODES _sentinel = object() # TODO Remove these shortcuts when pin Flask>=2.0 def route_shortcuts(cls): """A decorator used to add route shortcuts for `Flask` and `Blueprint` objects. Includes `get()`, `post()`, `put()`, `patch()`, `delete()`. ...
25.272727
83
0.593525
from typing import Any from werkzeug.http import HTTP_STATUS_CODES _sentinel = object() def route_shortcuts(cls): cls_route = cls.route def get(self, rule: str, **options: Any): return cls_route(self, rule, methods=['GET'], **options) def post(self, rule: str, **options: Any): return ...
true
true
f74c15e4ec00f6e892164283fc3c428aaa9272c1
2,154
py
Python
api/migrations/0001_initial.py
funsojoba/send_me_api
8f3c0b0002aaf6b37fd31b0d6a6de3f0402a00e3
[ "MIT" ]
null
null
null
api/migrations/0001_initial.py
funsojoba/send_me_api
8f3c0b0002aaf6b37fd31b0d6a6de3f0402a00e3
[ "MIT" ]
null
null
null
api/migrations/0001_initial.py
funsojoba/send_me_api
8f3c0b0002aaf6b37fd31b0d6a6de3f0402a00e3
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-07-22 21:15 import api.models.user from django.db import migrations, models import uuid class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_max_length'), ] operations = [ migrations.CreateMo...
47.866667
266
0.612813
import api.models.user from django.db import migrations, models import uuid class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_max_length'), ] operations = [ migrations.CreateModel( name='User', field...
true
true
f74c168c438d5d76ce9b5746196c2b82a66b1dfc
38,114
py
Python
instances/passenger_demand/pas-20210421-2109-int16e/28.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
instances/passenger_demand/pas-20210421-2109-int16e/28.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
instances/passenger_demand/pas-20210421-2109-int16e/28.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
""" PASSENGERS """ numPassengers = 3820 passenger_arriving = ( (3, 13, 5, 5, 1, 0, 10, 13, 5, 4, 2, 0), # 0 (4, 9, 7, 5, 2, 0, 10, 14, 8, 5, 1, 0), # 1 (2, 11, 3, 4, 2, 0, 10, 11, 9, 9, 1, 0), # 2 (7, 15, 7, 3, 4, 0, 5, 10, 12, 6, 2, 0), # 3 (5, 6, 4, 2, 2, 0, 10, 10, 6, 4, 1, 0), # 4 (8, 10, 7, 8, 3, 0, ...
113.773134
214
0.730703
numPassengers = 3820 passenger_arriving = ( (3, 13, 5, 5, 1, 0, 10, 13, 5, 4, 2, 0), (4, 9, 7, 5, 2, 0, 10, 14, 8, 5, 1, 0), (2, 11, 3, 4, 2, 0, 10, 11, 9, 9, 1, 0), (7, 15, 7, 3, 4, 0, 5, 10, 12, 6, 2, 0), (5, 6, 4, 2, 2, 0, 10, 10, 6, 4, 1, 0), (8, 10, 7, 8, 3, 0, 14, 5, 11, 7, 2, 0), (3, 13, 6, 3, 1,...
true
true
f74c17050aec1cd1b387e07aec1f29819f1b9735
329
py
Python
Python/Exercicios/ex0063.py
Gabysx/CursoEmVideo
f5c966742c3da8f0c79a3266d1b0d0b22b5d2af5
[ "MIT" ]
null
null
null
Python/Exercicios/ex0063.py
Gabysx/CursoEmVideo
f5c966742c3da8f0c79a3266d1b0d0b22b5d2af5
[ "MIT" ]
null
null
null
Python/Exercicios/ex0063.py
Gabysx/CursoEmVideo
f5c966742c3da8f0c79a3266d1b0d0b22b5d2af5
[ "MIT" ]
null
null
null
print('-'*25) print('Sequência de Fibonacci') print('-'*25) termos = int(input('Quantos termos vc quer mostrar? ')) c = 1 valor = -1 valor1 = 1 valor2 = 0 print('~'*30) while c <= termos: valor2 = valor + valor1 valor = valor1 valor1 = valor2 print(f'{valor2}', end=' => ') c += 1 print('FIM') print(...
17.315789
55
0.583587
print('-'*25) print('Sequência de Fibonacci') print('-'*25) termos = int(input('Quantos termos vc quer mostrar? ')) c = 1 valor = -1 valor1 = 1 valor2 = 0 print('~'*30) while c <= termos: valor2 = valor + valor1 valor = valor1 valor1 = valor2 print(f'{valor2}', end=' => ') c += 1 print('FIM') print(...
true
true
f74c174c89061459dcb288eaba631a7a4f885580
1,900
py
Python
mlpy/particleSwarmOptimization/structure/particle.py
QuintonWeenink/pso
f6fbb4c5889745d5747b367ecb3c9833805d9963
[ "MIT" ]
4
2018-10-17T03:50:07.000Z
2021-12-15T14:58:41.000Z
mlpy/particleSwarmOptimization/structure/particle.py
QuintonWeenink/pso
f6fbb4c5889745d5747b367ecb3c9833805d9963
[ "MIT" ]
4
2017-11-05T12:07:43.000Z
2018-04-21T13:53:21.000Z
mlpy/particleSwarmOptimization/structure/particle.py
QuintonWeenink/pso
f6fbb4c5889745d5747b367ecb3c9833805d9963
[ "MIT" ]
2
2019-03-28T08:33:21.000Z
2021-05-17T13:31:17.000Z
import numpy as np class Particle(object): def __init__(self, bounds, weight, cognitiveConstant, socialConstant): self.position = None # particle position self.velocity = None # particle velocity self.best_position = None # best position individual self.best_error = float('inf')...
33.333333
90
0.626316
import numpy as np class Particle(object): def __init__(self, bounds, weight, cognitiveConstant, socialConstant): self.position = None self.velocity = None self.best_position = None self.best_error = float('inf') self.error = None self.num_dimensions = N...
true
true
f74c18a798abd8d769d79801a239446279ebfc4c
26,716
py
Python
supvisors/tests/test_supvisorszmq.py
julien6387/supvisors
4e32bce566dec2cf9e9a213a3698178030eb869b
[ "Apache-2.0" ]
66
2017-01-05T11:28:34.000Z
2022-03-04T08:42:01.000Z
supvisors/tests/test_supvisorszmq.py
julien6387/supvisors
4e32bce566dec2cf9e9a213a3698178030eb869b
[ "Apache-2.0" ]
36
2016-12-30T10:46:58.000Z
2022-01-09T22:56:10.000Z
supvisors/tests/test_supvisorszmq.py
julien6387/supvisors
4e32bce566dec2cf9e9a213a3698178030eb869b
[ "Apache-2.0" ]
12
2017-03-04T04:53:51.000Z
2022-01-28T13:03:22.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # ====================================================================== # Copyright 2017 Julien LE CLEACH # # 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 Lice...
44.01318
119
0.734953
import pytest from supvisors.supvisorszmq import * from supvisors.utils import DeferredRequestHeaders from time import sleep from unittest.mock import call, Mock def test_internal_publish_subscribe(supvisors): publisher = InternalEventPublisher(supvisors.address_mapper.local_node_name, ...
true
true
f74c18e220fa5c14f0dd67918842dfc42cba21fb
1,141
py
Python
sql_util.py
hoaipham97/togo
4438f87efa74736291f095276bd137a6ac1ea6c2
[ "MIT" ]
null
null
null
sql_util.py
hoaipham97/togo
4438f87efa74736291f095276bd137a6ac1ea6c2
[ "MIT" ]
null
null
null
sql_util.py
hoaipham97/togo
4438f87efa74736291f095276bd137a6ac1ea6c2
[ "MIT" ]
null
null
null
import sqlite3 from my_config import DB_CONNECTION_STR class SqliteUtil(): def __init__(self): self.db_connection_str = DB_CONNECTION_STR self.con = sqlite3.connect(self.db_connection_str, check_same_thread=False) self.con.row_factory = sqlite3.Row self.cursorObj = self.con.cursor...
32.6
84
0.6617
import sqlite3 from my_config import DB_CONNECTION_STR class SqliteUtil(): def __init__(self): self.db_connection_str = DB_CONNECTION_STR self.con = sqlite3.connect(self.db_connection_str, check_same_thread=False) self.con.row_factory = sqlite3.Row self.cursorObj = self.con.cursor...
true
true
f74c19404ae00df57fd8a4b37a404ddf245b1061
488
py
Python
Native_Service/migrations/0005_secret_key_added.py
sylwekb/native_service_API
5fe74081923a5f8301592fb62505f917635d8c7a
[ "MIT" ]
null
null
null
Native_Service/migrations/0005_secret_key_added.py
sylwekb/native_service_API
5fe74081923a5f8301592fb62505f917635d8c7a
[ "MIT" ]
null
null
null
Native_Service/migrations/0005_secret_key_added.py
sylwekb/native_service_API
5fe74081923a5f8301592fb62505f917635d8c7a
[ "MIT" ]
null
null
null
# Generated by Django 2.2.1 on 2019-06-07 11:12 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [("Native_Service", "0004_date_time_field_changed")] operations = [ migrations.AddField( model_name="nativepost", ...
25.684211
85
0.663934
from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [("Native_Service", "0004_date_time_field_changed")] operations = [ migrations.AddField( model_name="nativepost", name="secret_key", field...
true
true
f74c195ba58a81f64bb87c397a355bfeccf0bf79
1,893
py
Python
src/app/client/host.py
acatalfano/distributed-systems-assignment-1
442510f14f2ae167b95a18bb458c2cf64f5caa87
[ "MIT" ]
null
null
null
src/app/client/host.py
acatalfano/distributed-systems-assignment-1
442510f14f2ae167b95a18bb458c2cf64f5caa87
[ "MIT" ]
null
null
null
src/app/client/host.py
acatalfano/distributed-systems-assignment-1
442510f14f2ae167b95a18bb458c2cf64f5caa87
[ "MIT" ]
null
null
null
from typing import Callable from .subscriber.subscriber import Subscriber from .publisher.publisher import Publisher from ..common.broker_mode import BrokerMode, BROKER_MODE from .subscriber.subscriber_factory import SubscriberFactory from .publisher.publisher_factory import PublisherFactory ''' A host can be both a ...
36.403846
89
0.704173
from typing import Callable from .subscriber.subscriber import Subscriber from .publisher.publisher import Publisher from ..common.broker_mode import BrokerMode, BROKER_MODE from .subscriber.subscriber_factory import SubscriberFactory from .publisher.publisher_factory import PublisherFactory class Host: def __i...
true
true
f74c1a3c72eee3762e9dc4a668d7f5a3311ff7e2
258
py
Python
yepes/contrib/metrics/settings.py
samuelmaudo/yepes
1ef9a42d4eaa70d9b3e6e7fa519396c1e1174fcb
[ "BSD-3-Clause" ]
null
null
null
yepes/contrib/metrics/settings.py
samuelmaudo/yepes
1ef9a42d4eaa70d9b3e6e7fa519396c1e1174fcb
[ "BSD-3-Clause" ]
null
null
null
yepes/contrib/metrics/settings.py
samuelmaudo/yepes
1ef9a42d4eaa70d9b3e6e7fa519396c1e1174fcb
[ "BSD-3-Clause" ]
null
null
null
# -*- coding:utf-8 -*- from __future__ import unicode_literals METRICS_COOKIE_AGE = 60 * 60 * 24 * 30 * 6 METRICS_COOKIE_DOMAIN = None METRICS_COOKIE_HTTPONLY = True METRICS_COOKIE_NAME = 'visitorid' METRICS_COOKIE_PATH = '/' METRICS_COOKIE_SECURE = False
23.454545
42
0.767442
from __future__ import unicode_literals METRICS_COOKIE_AGE = 60 * 60 * 24 * 30 * 6 METRICS_COOKIE_DOMAIN = None METRICS_COOKIE_HTTPONLY = True METRICS_COOKIE_NAME = 'visitorid' METRICS_COOKIE_PATH = '/' METRICS_COOKIE_SECURE = False
true
true
f74c1a66977877e6f1cb8612a708d5fa107eb08c
7,588
py
Python
examples/core/models/mzi_cnn.py
JeremieMelo/pytorch-onn
670996112277a6c19c7da400afbe0a4ce45ad5de
[ "MIT" ]
16
2021-06-09T07:51:43.000Z
2022-03-24T08:16:52.000Z
examples/core/models/mzi_cnn.py
JeremieMelo/pytorch-onn
670996112277a6c19c7da400afbe0a4ce45ad5de
[ "MIT" ]
null
null
null
examples/core/models/mzi_cnn.py
JeremieMelo/pytorch-onn
670996112277a6c19c7da400afbe0a4ce45ad5de
[ "MIT" ]
3
2021-07-20T15:16:49.000Z
2022-03-24T08:16:56.000Z
""" Description: Author: Jiaqi Gu (jqgu@utexas.edu) Date: 2021-06-07 03:43:40 LastEditors: Jiaqi Gu (jqgu@utexas.edu) LastEditTime: 2021-06-07 03:43:40 """ from torchonn.op.mzi_op import project_matrix_to_unitary from typing import List, Union import torch from torch import Tensor, nn from torch.types import Device, ...
32.016878
134
0.580917
from torchonn.op.mzi_op import project_matrix_to_unitary from typing import List, Union import torch from torch import Tensor, nn from torch.types import Device, _size from torchonn.layers import MZIBlockConv2d, MZIBlockLinear from torchonn.models import ONNBaseModel from collections import OrderedDict __all__ = ["M...
true
true
f74c1b5eccc20aac0fdd0a9ea8deaf23aa0fb6fd
4,819
py
Python
demo/demo.py
888yzbt888/Pensieve-multiagent
b5409c949a4855afedc910de5dd6eabe076567cc
[ "MIT" ]
2
2018-06-20T07:23:15.000Z
2019-05-17T08:13:57.000Z
demo/demo.py
888yzbt888/Pensieve-multiagent
b5409c949a4855afedc910de5dd6eabe076567cc
[ "MIT" ]
null
null
null
demo/demo.py
888yzbt888/Pensieve-multiagent
b5409c949a4855afedc910de5dd6eabe076567cc
[ "MIT" ]
null
null
null
import time import bisect import cv2 as cv import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation from matplotlib import gridspec VIDEO_FILE = 'la_luna.mp4' RL_BITRATE_FILE = './rl_bitrate' RL_BUFFER_FILE = './rl_buffer' MPC_BITRATE_FILE = './mpc_bitrate' MPC_BUFFER_FILE = './mpc_...
30.308176
102
0.709276
import time import bisect import cv2 as cv import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation from matplotlib import gridspec VIDEO_FILE = 'la_luna.mp4' RL_BITRATE_FILE = './rl_bitrate' RL_BUFFER_FILE = './rl_buffer' MPC_BITRATE_FILE = './mpc_bitrate' MPC_BUFFER_FILE = './mpc_...
true
true
f74c1b9695c1bcb5d504001f599ba92ef0073b7d
8,513
py
Python
tests/test_dataset.py
caoyi0905/Surprise
1a707b32a3a68b0eb3f23b829b57604a131e00f7
[ "BSD-3-Clause" ]
1
2019-03-15T15:19:42.000Z
2019-03-15T15:19:42.000Z
tests/test_dataset.py
caoyi0905/Surprise
1a707b32a3a68b0eb3f23b829b57604a131e00f7
[ "BSD-3-Clause" ]
null
null
null
tests/test_dataset.py
caoyi0905/Surprise
1a707b32a3a68b0eb3f23b829b57604a131e00f7
[ "BSD-3-Clause" ]
1
2019-10-06T14:29:39.000Z
2019-10-06T14:29:39.000Z
""" Module for testing the Dataset class. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import os import random import pytest import pandas as pd from surprise import BaselineOnly from surprise import Dataset from surprise import Reader from surprise...
34.465587
79
0.636908
from __future__ import (absolute_import, division, print_function, unicode_literals) import os import random import pytest import pandas as pd from surprise import BaselineOnly from surprise import Dataset from surprise import Reader from surprise.builtin_datasets import get_dataset_dir ran...
true
true
f74c1cdcabadfef63181f8c7c72575317960a3d8
2,697
py
Python
src/test_sort.py
lionbee/photosort
b2c51b3fd010f217c817dd344f31522cceec2326
[ "MIT" ]
1
2020-01-19T08:07:58.000Z
2020-01-19T08:07:58.000Z
src/test_sort.py
lionbee/photosort
b2c51b3fd010f217c817dd344f31522cceec2326
[ "MIT" ]
null
null
null
src/test_sort.py
lionbee/photosort
b2c51b3fd010f217c817dd344f31522cceec2326
[ "MIT" ]
null
null
null
import unittest from datetime import datetime from os import path from unittest.mock import patch, MagicMock import sort class TestPathStrMaker(unittest.TestCase): def test_maker_is_callable(self): fn = sort.get_path_str_maker('tester') self.assertTrue(callable(fn)) @patch('sort._get_exif_d...
32.890244
77
0.674082
import unittest from datetime import datetime from os import path from unittest.mock import patch, MagicMock import sort class TestPathStrMaker(unittest.TestCase): def test_maker_is_callable(self): fn = sort.get_path_str_maker('tester') self.assertTrue(callable(fn)) @patch('sort._get_exif_d...
true
true
f74c1d0a3c020ac4d664d8c04f597c06d0ff607b
2,604
py
Python
2015/2015_14b.py
davidxiao93/Advent-of-Code
29503100ae4eb46b048fc3ab68ff0181c6f00ee5
[ "MIT" ]
null
null
null
2015/2015_14b.py
davidxiao93/Advent-of-Code
29503100ae4eb46b048fc3ab68ff0181c6f00ee5
[ "MIT" ]
null
null
null
2015/2015_14b.py
davidxiao93/Advent-of-Code
29503100ae4eb46b048fc3ab68ff0181c6f00ee5
[ "MIT" ]
null
null
null
input = """Vixen can fly 19 km/s for 7 seconds, but then must rest for 124 seconds. Rudolph can fly 3 km/s for 15 seconds, but then must rest for 28 seconds. Donner can fly 19 km/s for 9 seconds, but then must rest for 164 seconds. Blitzen can fly 19 km/s for 9 seconds, but then must rest for 158 seconds. Comet can fly...
34.72
86
0.617512
input = """Vixen can fly 19 km/s for 7 seconds, but then must rest for 124 seconds. Rudolph can fly 3 km/s for 15 seconds, but then must rest for 28 seconds. Donner can fly 19 km/s for 9 seconds, but then must rest for 164 seconds. Blitzen can fly 19 km/s for 9 seconds, but then must rest for 158 seconds. Comet can fly...
true
true
f74c1d10cb1d7e731069d1756e841de393dbca88
2,925
py
Python
AutomatedTesting/Gem/PythonTests/physics/general/C15425929_Undo_Redo.py
fromasmtodisasm/o3de
0d728a76778cb0ca88caa5c07f17162fac668b2a
[ "Apache-2.0", "MIT" ]
null
null
null
AutomatedTesting/Gem/PythonTests/physics/general/C15425929_Undo_Redo.py
fromasmtodisasm/o3de
0d728a76778cb0ca88caa5c07f17162fac668b2a
[ "Apache-2.0", "MIT" ]
null
null
null
AutomatedTesting/Gem/PythonTests/physics/general/C15425929_Undo_Redo.py
fromasmtodisasm/o3de
0d728a76778cb0ca88caa5c07f17162fac668b2a
[ "Apache-2.0", "MIT" ]
null
null
null
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT """ # Test case ID : C15425929 # Test Case Title : Verify that undo - redo operations do not create any error # ...
32.142857
101
0.681368
class Tests: entity_found = ("Entity was initially found", "Entity COULD NOT be found initially") entity_deleted = ("Entity was deleted", "Entity WAS NOT deleted") deletion_undone = ("Undo worked", "Undo DID NOT work") deletion_redone = (...
true
true
f74c1d9f90741e6338b1fcb8584bd00486b71cb7
1,718
py
Python
built-in/PyTorch/Official/cv/image_object_detection/YoloV3_ID1790_for_PyTorch/tools/publish_model.py
Ascend/modelzoo
f018cfed33dbb1cc2110b9ea2e233333f71cc509
[ "Apache-2.0" ]
12
2020-12-13T08:34:24.000Z
2022-03-20T15:17:17.000Z
built-in/PyTorch/Official/cv/image_object_detection/YoloV3_ID1790_for_PyTorch/tools/publish_model.py
Ascend/modelzoo
f018cfed33dbb1cc2110b9ea2e233333f71cc509
[ "Apache-2.0" ]
1
2022-01-20T03:11:05.000Z
2022-01-20T06:53:39.000Z
built-in/PyTorch/Official/cv/image_object_detection/YoloV3_ID1790_for_PyTorch/tools/publish_model.py
Ascend/modelzoo
f018cfed33dbb1cc2110b9ea2e233333f71cc509
[ "Apache-2.0" ]
2
2021-07-10T12:40:46.000Z
2021-12-17T07:55:15.000Z
# Copyright 2021 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 agree...
31.814815
77
0.715949
import argparse import subprocess import torch def parse_args(): parser = argparse.ArgumentParser( description='Process a checkpoint to be published') parser.add_argument('in_file', help='input checkpoint filename') parser.add_argument('out_file', help='output checkpoint filename') ...
true
true
f74c1ec9191d3a035f8f599e0d5ea531c2aa27e2
375
py
Python
src/pyagxrobots/test.py
agilexrobotics/pyagxrobots
fcc66ac2da6c2d4e03fe6fbee2b963f4a5758aa2
[ "MIT" ]
3
2021-11-15T07:02:04.000Z
2022-01-12T17:17:45.000Z
src/pyagxrobots/test.py
agilexrobotics/pyagxrobots
fcc66ac2da6c2d4e03fe6fbee2b963f4a5758aa2
[ "MIT" ]
1
2022-03-01T21:45:42.000Z
2022-03-01T21:45:42.000Z
src/pyagxrobots/test.py
agilexrobotics/pyagxrobots
fcc66ac2da6c2d4e03fe6fbee2b963f4a5758aa2
[ "MIT" ]
2
2021-12-15T03:27:08.000Z
2022-01-07T12:13:50.000Z
#!/usr/bin/env python3 # coding=UTF-8 import pyagxrobots import time scoutmini=pyagxrobots.pysdkugv.ScoutMiniBase() scoutmini.EnableCAN() num=5 while num>0: scoutmini.SetMotionCommand(linear_vel=0.1) print('rpm') print(scoutmini.ScoutMiniActuator2.rpm()) print('GetLinearVelocity') print(scoutmi...
22.058824
46
0.728
import pyagxrobots import time scoutmini=pyagxrobots.pysdkugv.ScoutMiniBase() scoutmini.EnableCAN() num=5 while num>0: scoutmini.SetMotionCommand(linear_vel=0.1) print('rpm') print(scoutmini.ScoutMiniActuator2.rpm()) print('GetLinearVelocity') print(scoutmini.GetLinearVelocity()) time.sle...
true
true
f74c204542d4211b7d872aaea26a6bd2119f6877
2,933
py
Python
wastd/observations/migrations/0034_auto_20210224_1538.py
florianm/wastd
e26bdd66fd082ae1ffbe7b72bc9e3b216fc24523
[ "MIT" ]
3
2020-07-23T06:37:43.000Z
2022-01-27T09:40:40.000Z
wastd/observations/migrations/0034_auto_20210224_1538.py
dbca-wa/wastd
faf369bc8f053a03f21240332284b2f4fed2b85e
[ "MIT" ]
337
2018-07-12T05:56:29.000Z
2022-03-30T02:40:41.000Z
wastd/observations/migrations/0034_auto_20210224_1538.py
florianm/wastd
e26bdd66fd082ae1ffbe7b72bc9e3b216fc24523
[ "MIT" ]
2
2020-02-24T00:05:46.000Z
2020-07-15T07:02:29.000Z
# Generated by Django 3.0.8 on 2021-02-24 07:38 from django.db import migrations, models import django.db.models.deletion import uuid import wastd.observations.models class Migration(migrations.Migration): dependencies = [ ('observations', '0033_auto_20210219_1350'), ] operations = [ mi...
51.45614
244
0.667235
from django.db import migrations, models import django.db.models.deletion import uuid import wastd.observations.models class Migration(migrations.Migration): dependencies = [ ('observations', '0033_auto_20210219_1350'), ] operations = [ migrations.AddField( model_name='surv...
true
true