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
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c13e7c37117e0bf5ca16bb8d59d1b30057476e4
1,374
py
Python
examples/legacy/volatile.py
jameszha/ARENA-py
209d93e9b91ba1d0c306b307e6dcb8411aada5b3
[ "BSD-3-Clause" ]
null
null
null
examples/legacy/volatile.py
jameszha/ARENA-py
209d93e9b91ba1d0c306b307e6dcb8411aada5b3
[ "BSD-3-Clause" ]
null
null
null
examples/legacy/volatile.py
jameszha/ARENA-py
209d93e9b91ba1d0c306b307e6dcb8411aada5b3
[ "BSD-3-Clause" ]
null
null
null
# volatile.py ''' Demonstrate setting apriltags which can receive external updates. The apriltag #450 must be visible from a webxr browser camera. Position, Rotation, and Model should remain in sync across subscribers. Camera: https://arenaxr.org/volatile&localTagSolver=true&cvRate=10 All: https://arena...
36.157895
75
0.650655
import arena def tag_callback(event=None): if event.event_action == arena.EventAction.update and \ event.event_type == arena.EventType.object: print("Tag position: " + str(event.position)) print("Tag rotation: " + str(event.rotation)) arena.init("arenaxr.org", "realm", "example") TAG...
true
true
1c13e89b5e41a9cfceaebe59c4101699dce3261d
5,529
py
Python
python/List.py
SubinJin/HelloPython3
ebd48c7dd9c3690bc0aa0fcd52d827367e5d786a
[ "Apache-2.0" ]
null
null
null
python/List.py
SubinJin/HelloPython3
ebd48c7dd9c3690bc0aa0fcd52d827367e5d786a
[ "Apache-2.0" ]
null
null
null
python/List.py
SubinJin/HelloPython3
ebd48c7dd9c3690bc0aa0fcd52d827367e5d786a
[ "Apache-2.0" ]
null
null
null
# ํŒŒ์ด์ฌ ์ž๋ฃŒ๊ตฌ์กฐ # ๋ฆฌ์ŠคํŠธ : sequence ์ž๋ฃŒ๊ตฌ์กฐ๋ฅผ ์ด์šฉ # sequence : ์ˆœ์„œ๊ฐ€ ์žˆ๋Š” ๋ฐ์ดํ„ฐ ๊ตฌ์กฐ๋ฅผ ์˜๋ฏธ # ๋ฆฌ์ŠคํŠธ[], ํŠœํ”Œ(), ๋ ˆ์ธ์ง€, ๋ฌธ์ž์—ด ๋“ฑ์ด sequence ๊ตฌ์กฐ ์‚ฌ์šฉ msg = 'Hello, World!!' list1_list = [] # ๋นˆ ๋ฆฌ์ŠคํŠธ list2_list = [1, 2, 3, 4, 5, 6] # ์ˆซ์ž list3_list = ['a', 'b', 'c'] # ๋ฌธ์ž list4_list = ['a', 'b', 'c', ...
21.103053
79
0.547296
msg = 'Hello, World!!' list1_list = [] list2_list = [1, 2, 3, 4, 5, 6] list3_list = ['a', 'b', 'c'] list4_list = ['a', 'b', 'c', 1, 2, 3, True] print(list1_list) print(1 in list1_list) print('a' in list1_list) print(3 in list2_list) print( len(list1_list...
true
true
1c13e8a19fe86b93de6407afe598caf8d6765094
4,229
py
Python
utils/kernel_pca_pipeline.py
lzamparo/SdA_reduce
1dc11f23b395f316df5f41448542d2d5c2e619ff
[ "BSD-3-Clause" ]
null
null
null
utils/kernel_pca_pipeline.py
lzamparo/SdA_reduce
1dc11f23b395f316df5f41448542d2d5c2e619ff
[ "BSD-3-Clause" ]
null
null
null
utils/kernel_pca_pipeline.py
lzamparo/SdA_reduce
1dc11f23b395f316df5f41448542d2d5c2e619ff
[ "BSD-3-Clause" ]
null
null
null
""" ========== Kernel PCA gamma parameter CV pipeline ========== Use a pipeline to find the best value for gamma parameter in the RBF kernel for kernel PCA. Adapted from: http://scikit-learn.org/stable/auto_examples/decomposition/plot_kernel_pca.html#example-decomposition-plot-kernel-pca-py http://scikit-lea...
33.299213
124
0.72925
import numpy as np import pickle from optparse import OptionParser from tables import * from sklearn.decomposition import KernelPCA from sklearn.cluster import KMeans from sklearn.metrics import v_measure_score, make_scorer, homogeneity_score from extract_datasets import extract_labeled_chunkrange from sklearn.prepro...
true
true
1c13e8baed3dd43dfa908ff0e9c715caeec9c0a2
29,426
py
Python
octavia/tests/functional/api/v2/test_amphora.py
zhangi/octavia
e68c851fecf55e1b5ffe7d5b849f729626af28a3
[ "Apache-2.0" ]
129
2015-06-23T08:06:23.000Z
2022-03-31T12:38:20.000Z
octavia/tests/functional/api/v2/test_amphora.py
zhangi/octavia
e68c851fecf55e1b5ffe7d5b849f729626af28a3
[ "Apache-2.0" ]
6
2016-05-20T11:05:27.000Z
2021-03-23T06:05:52.000Z
octavia/tests/functional/api/v2/test_amphora.py
zhangi/octavia
e68c851fecf55e1b5ffe7d5b849f729626af28a3
[ "Apache-2.0" ]
166
2015-07-15T16:24:05.000Z
2022-03-02T20:54:36.000Z
# Copyright 2014 Rackspace # # 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...
44.517398
79
0.603684
import datetime from unittest import mock from oslo_config import cfg from oslo_config import fixture as oslo_fixture from oslo_utils import uuidutils from octavia.common import constants import octavia.common.context from octavia.common import exceptions from octavia.tests.functional.api.v2 import base class Test...
true
true
1c13ea77a446fb10964854a54919447b552a106b
290
py
Python
utils/CleanUtils.py
OneStarSolution/prometeo
ed2d534600c0c6207c6d351c54bd3307d15a7859
[ "MIT" ]
null
null
null
utils/CleanUtils.py
OneStarSolution/prometeo
ed2d534600c0c6207c6d351c54bd3307d15a7859
[ "MIT" ]
1
2021-05-06T16:48:52.000Z
2021-05-06T16:48:52.000Z
utils/CleanUtils.py
OneStarSolution/prometeo
ed2d534600c0c6207c6d351c54bd3307d15a7859
[ "MIT" ]
4
2021-01-12T21:22:41.000Z
2021-11-10T05:13:25.000Z
class CleanUtils: @staticmethod def clean_phone(raw_phone): if not raw_phone: return '' if not isinstance(raw_phone, (str, bytes)): return '' numbers = [char for char in raw_phone if char.isdigit()] return ''.join(numbers)
22.307692
64
0.575862
class CleanUtils: @staticmethod def clean_phone(raw_phone): if not raw_phone: return '' if not isinstance(raw_phone, (str, bytes)): return '' numbers = [char for char in raw_phone if char.isdigit()] return ''.join(numbers)
true
true
1c13eb55528777d0a64442652232ad7126b43da1
35,874
py
Python
TakeAChance/classColide.py
PaipaPsyche/Learning_and_Tesitng
460d7d00392d42ac7254527f73d0082c32201280
[ "MIT" ]
null
null
null
TakeAChance/classColide.py
PaipaPsyche/Learning_and_Tesitng
460d7d00392d42ac7254527f73d0082c32201280
[ "MIT" ]
null
null
null
TakeAChance/classColide.py
PaipaPsyche/Learning_and_Tesitng
460d7d00392d42ac7254527f73d0082c32201280
[ "MIT" ]
null
null
null
""" Created on Thu Oct 4 16:00:26 2018 @author: david """ import numpy as np import matplotlib.pyplot as plt #from astropy.convolution import Gaussian2DKernel,convolve #import scipy.linalg as linalg #from mpl_toolkits.mplot3d import Axes3D #Parametros ALV-CBRN #Acertivity,Lovely,Vanity # 0,10 #Coward,Balance,Random...
33.124654
1,015
0.499192
""" Created on Thu Oct 4 16:00:26 2018 @author: david """ import numpy as np import matplotlib.pyplot as plt def TakeAChance(n): k=np.random.random() if(k<=n): return 1 else: return 0 def check(n,CUT=10): if(n<=CUT): return int(n) elif(n<0): return 0 el...
false
true
1c13eb929aef57b26dc87d61cc4e5b79a50c773e
145,334
py
Python
PyEIS/PyEIS.py
deanna-abrams/PyEIS
ad8db40fe74dccba3ef2005064a7ad5219364814
[ "Apache-2.0" ]
null
null
null
PyEIS/PyEIS.py
deanna-abrams/PyEIS
ad8db40fe74dccba3ef2005064a7ad5219364814
[ "Apache-2.0" ]
null
null
null
PyEIS/PyEIS.py
deanna-abrams/PyEIS
ad8db40fe74dccba3ef2005064a7ad5219364814
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Mar 5 12:13:33 2018 @author: Kristian B. Knudsen (kknu@berkeley.edu / kristianbknudsen@gmail.com) """ import pandas as pd from bokeh.layouts import layout, gridplot from bokeh.models import Range1d, LinearAxis, Legend, Div from bokeh.palettes import sm...
64.62161
208
0.512124
import pandas as pd from bokeh.layouts import layout, gridplot from bokeh.models import Range1d, LinearAxis, Legend, Div from bokeh.palettes import small_palettes from bokeh.plotting import figure from lmfit import minimize, report_fit, fit_report import seaborn as sns import numpy as np from .circuits import CIRCUIT_...
true
true
1c13ec171a2d8c8b55f329d1b06ab01bda2539d2
42,542
py
Python
samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api.py
data-experts/openapi-generator
b86a51ae17e25feae0e0c9f9e6f423b8ff54057d
[ "Apache-2.0" ]
1
2020-10-05T10:49:11.000Z
2020-10-05T10:49:11.000Z
samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api.py
data-experts/openapi-generator
b86a51ae17e25feae0e0c9f9e6f423b8ff54057d
[ "Apache-2.0" ]
5
2021-05-11T22:59:16.000Z
2022-02-27T10:31:06.000Z
samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api.py
data-experts/openapi-generator
b86a51ae17e25feae0e0c9f9e6f423b8ff54057d
[ "Apache-2.0" ]
1
2020-08-28T20:37:35.000Z
2020-08-28T20:37:35.000Z
# coding: utf-8 """ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ ...
35.6
174
0.44288
from __future__ import absolute_import import re import sys import six from petstore_api.api_client import ApiClient, Endpoint from petstore_api.model_utils import ( check_allowed_values, check_validations, date, datetime, file_type, int, none_type, str, validate_and_convert...
true
true
1c13ecfd124b39e9e75a699ebfdeae993ad55b0f
1,987
py
Python
qa/rpc-tests/llmq-simplepose.py
Hawkkit/HawkkitCore
a7eac11a706259088c60bb1b9cfc16b20d6ee17c
[ "MIT" ]
1
2019-11-14T13:00:55.000Z
2019-11-14T13:00:55.000Z
qa/rpc-tests/llmq-simplepose.py
Hawkkit/HawkkitCore
a7eac11a706259088c60bb1b9cfc16b20d6ee17c
[ "MIT" ]
null
null
null
qa/rpc-tests/llmq-simplepose.py
Hawkkit/HawkkitCore
a7eac11a706259088c60bb1b9cfc16b20d6ee17c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2018 The Dash Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import HawkkitTestFramework from test_framework.util import * from time i...
33.677966
111
0.654756
from test_framework.test_framework import HawkkitTestFramework from test_framework.util import * from time import * class LLMQSimplePoSeTest(HawkkitTestFramework): def __init__(self): super().__init__(6, 5, [], fast_dip3_enforcement=True) def run_test(self): self.nodes[0].spork("SPORK_17_QU...
true
true
1c13ed09fa3ad4bd59224dfeb802ca5a1c9cd8b2
372
py
Python
python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE/WK2/per_1.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE/WK2/per_1.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE/WK2/per_1.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
def future_value(present_value, annual_rate, periods_per_year, years): rate_per_period = annual_rate / periods_per_year periods = periods_per_year * years # Put your code here. return present_value*(1+rate_per_period)**periods #print ("$1000 at 2% compounded daily for 3 years yields $", future_value(100...
46.5
93
0.744624
def future_value(present_value, annual_rate, periods_per_year, years): rate_per_period = annual_rate / periods_per_year periods = periods_per_year * years return present_value*(1+rate_per_period)**periods print(future_value(500,.04,10,10))
true
true
1c13ed33f475afe8b60fa2b5584abde17391b2b8
18,335
py
Python
tests/integration_tests/data_steward/cdr_cleaner/cleaning_rules/bigquery_tests_base.py
ratuagga/curation
047b984f20643e21bf3ab1e309903abaf816ecd5
[ "MIT" ]
null
null
null
tests/integration_tests/data_steward/cdr_cleaner/cleaning_rules/bigquery_tests_base.py
ratuagga/curation
047b984f20643e21bf3ab1e309903abaf816ecd5
[ "MIT" ]
null
null
null
tests/integration_tests/data_steward/cdr_cleaner/cleaning_rules/bigquery_tests_base.py
ratuagga/curation
047b984f20643e21bf3ab1e309903abaf816ecd5
[ "MIT" ]
null
null
null
""" Integration Test base classes for cleaning rules. Implements a base class that will ensure test datasets and empty tables with schemas are created before beginning the test. It will remove tables and test datasets at cleanup. It will provide optional classes that extend this base class for simple rules that only...
45.271605
91
0.585874
from unittest import TestCase, mock import google.cloud.exceptions as gc_exc from google.api_core.retry import Retry from google.cloud import bigquery from cdr_cleaner import clean_cdr_engine as engine from utils import bq from common import JINJA_ENV class BaseTest: class BigQueryTestBase(TestCase): ...
true
true
1c13ed41fd556ccd188a99ce02a6d71f951cae5e
2,910
gyp
Python
src/dictionary/file/dictionary_file.gyp
sousuke0422/crIME
abc711e0c2cad19950703d59ed4d1ffe4bd76953
[ "BSD-3-Clause" ]
1
2021-02-24T07:03:26.000Z
2021-02-24T07:03:26.000Z
src/dictionary/file/dictionary_file.gyp
sousuke0422/crIME
abc711e0c2cad19950703d59ed4d1ffe4bd76953
[ "BSD-3-Clause" ]
108
2018-05-29T17:33:53.000Z
2019-07-22T00:01:54.000Z
src/dictionary/file/dictionary_file.gyp
sousuke0422/crIME
abc711e0c2cad19950703d59ed4d1ffe4bd76953
[ "BSD-3-Clause" ]
1
2021-12-29T08:15:14.000Z
2021-12-29T08:15:14.000Z
# Copyright 2010-2018, Google Inc. # 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 copyright # notice, this list of conditions and ...
30.957447
72
0.623368
{ 'targets': [ { 'target_name': 'codec', 'type': 'static_library', 'toolsets': ['target', 'host'], 'sources': [ 'codec.cc', ], 'dependencies': [ 'codec_util', '../../base/base.gyp:base_core', ], }, { 'target_name': 'codec_factory', ...
true
true
1c13ed99d16e9dd85e574e0570f391cd6e8a6590
4,794
py
Python
maker.py
maxime915/md-toc-py
7e00ffb072a25353ae193e4b086898673c0c8dc9
[ "MIT" ]
null
null
null
maker.py
maxime915/md-toc-py
7e00ffb072a25353ae193e4b086898673c0c8dc9
[ "MIT" ]
null
null
null
maker.py
maxime915/md-toc-py
7e00ffb072a25353ae193e4b086898673c0c8dc9
[ "MIT" ]
null
null
null
#!/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 import re import math import sys def create_TOC(file, name="Table of Contents", print_link=True): lines = [line.rstrip('\n') for line in open(file)] # get lines last_line = "" last_line_valid = False in_code_block = False # conten...
36.318182
457
0.50146
import re import math import sys def create_TOC(file, name="Table of Contents", print_link=True): lines = [line.rstrip('\n') for line in open(file)] last_line = "" last_line_valid = False in_code_block = False toc_texts = [] for line in lines: current_line_valid = True ...
true
true
1c13ee3531f3ea7b0bacf443bfbe053661bf7fe0
4,355
py
Python
test/testers/winforms/datagridview/datagridviewframe.py
ABEMBARKA/monoUI
5fda266ad2db8f89580a40b525973d86cd8de939
[ "MIT" ]
1
2019-08-13T15:22:12.000Z
2019-08-13T15:22:12.000Z
test/testers/winforms/datagridview/datagridviewframe.py
ABEMBARKA/monoUI
5fda266ad2db8f89580a40b525973d86cd8de939
[ "MIT" ]
null
null
null
test/testers/winforms/datagridview/datagridviewframe.py
ABEMBARKA/monoUI
5fda266ad2db8f89580a40b525973d86cd8de939
[ "MIT" ]
1
2019-08-13T15:22:17.000Z
2019-08-13T15:22:17.000Z
############################################################################## # Written by: Mario Carrion <mcarrion@novell.com> # Date: 02/23/2009 # Description: datagridviewframe.py wrapper script # Used by the datagridview-*.py tests ##############################################################...
39.954128
125
0.721699
import sys import os import actions import states from strongwind import * from datagridview import * class DataGridViewFrame(accessibles.Frame): COLUMN_CHECKBOX = "COLUMN_CHECKBOX" COLUMN_TEXTBOX = "COLUMN_TEXTBOX" COLUMN_COMBOBOX = "COLUMN_COMBOBOX" COLUMN_BUTTON = "COLUMN_BUTTON" COLUMN_LINK = "COLUMN_LIN...
false
true
1c13eecdf288af43722255ad56d4a10a07f38908
2,356
py
Python
src/expression.py
EwenLan/3gpp-protocols-convert
0817fa4eef28a9561ff0b4ac7327b6bc70caea6f
[ "MIT" ]
null
null
null
src/expression.py
EwenLan/3gpp-protocols-convert
0817fa4eef28a9561ff0b4ac7327b6bc70caea6f
[ "MIT" ]
null
null
null
src/expression.py
EwenLan/3gpp-protocols-convert
0817fa4eef28a9561ff0b4ac7327b6bc70caea6f
[ "MIT" ]
null
null
null
from abc import abstractclassmethod import typing import copy import typeinfo from log import Log import logging import common spaceIndent: int = 4 log: logging.Logger = Log(__name__).getLogger() class TsExpression(object): @abstractclassmethod def ToString(self) -> str: return "" class ImportExpr...
28.731707
86
0.632852
from abc import abstractclassmethod import typing import copy import typeinfo from log import Log import logging import common spaceIndent: int = 4 log: logging.Logger = Log(__name__).getLogger() class TsExpression(object): @abstractclassmethod def ToString(self) -> str: return "" class ImportExpr...
true
true
1c13efe3a9e80676e1c977acdb9274db6f71d916
11,394
py
Python
OSMRegression.py
kellerberrin/OSM-QSAR
3cdc411ee3f9a3cea178898171e0a57fb5282e40
[ "MIT" ]
2
2019-09-17T18:24:13.000Z
2021-11-17T12:57:36.000Z
OSMRegression.py
kellerberrin/OSM-QSAR
3cdc411ee3f9a3cea178898171e0a57fb5282e40
[ "MIT" ]
null
null
null
OSMRegression.py
kellerberrin/OSM-QSAR
3cdc411ee3f9a3cea178898171e0a57fb5282e40
[ "MIT" ]
null
null
null
# MIT License # # Copyright (c) 2017 # # 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, di...
45.576
126
0.56521
from __future__ import absolute_import, division, print_function, unicode_literals import os import time import math import scipy.stats as st from sklearn.metrics import r2_score from OSMBase import OSMBaseModel class OSMRegression(OSMBaseModel): def __init__(self, args, log): super(OSMRegression, se...
true
true
1c13f04cbb40f7b06c41263865021ed50da6d222
2,697
py
Python
tests/environments/storage/test_gitlab_storage.py
BluePoof/prefect
59dc4eb965ee83bdb1157ee41c9423917d1101ea
[ "Apache-2.0" ]
1
2019-09-24T16:18:20.000Z
2019-09-24T16:18:20.000Z
tests/environments/storage/test_gitlab_storage.py
BluePoof/prefect
59dc4eb965ee83bdb1157ee41c9423917d1101ea
[ "Apache-2.0" ]
3
2021-06-28T20:39:49.000Z
2022-02-27T11:19:42.000Z
tests/environments/storage/test_gitlab_storage.py
BluePoof/prefect
59dc4eb965ee83bdb1157ee41c9423917d1101ea
[ "Apache-2.0" ]
2
2021-03-03T17:46:43.000Z
2021-03-05T15:39:35.000Z
from unittest.mock import MagicMock import pytest from prefect import context, Flow from prefect.environments.storage import GitLab pytest.importorskip("gitlab") def test_create_gitlab_storage(): storage = GitLab(repo="test/repo") assert storage assert storage.logger def test_create_gitlab_storage_i...
26.441176
84
0.707082
from unittest.mock import MagicMock import pytest from prefect import context, Flow from prefect.environments.storage import GitLab pytest.importorskip("gitlab") def test_create_gitlab_storage(): storage = GitLab(repo="test/repo") assert storage assert storage.logger def test_create_gitlab_storage_i...
true
true
1c13f12b2428be183b1f870bb57a45c6d9fa4cbb
10,462
py
Python
CoolTurnCodes/WirteBatchWord/batch_word.py
Strivingperson/store
485889c318fd96741c8079713239caed3220b501
[ "Apache-2.0" ]
null
null
null
CoolTurnCodes/WirteBatchWord/batch_word.py
Strivingperson/store
485889c318fd96741c8079713239caed3220b501
[ "Apache-2.0" ]
null
null
null
CoolTurnCodes/WirteBatchWord/batch_word.py
Strivingperson/store
485889c318fd96741c8079713239caed3220b501
[ "Apache-2.0" ]
null
null
null
import docx from docx.oxml.ns import qn import os def read_text(formatpath): ''' ่Žทๅ–ๆจกๆฟๆ–‡ไปถๅญ—็ฌฆไธฒ,ๆฎต่ฝไน‹้—ด็”จๆข่กŒ็ฌฆ้“พๆŽฅ :param formatpath: ๆจกๆฟๆ–‡ไปถ่ทฏๅพ„ :return: ๆจกๆฟๆ–‡ไปถๅญ—็ฌฆๅ†…ๅฎน ''' content = '' try: fileobj = docx.Document(formatpath) # ๆจกๆฟๆ–‡ไปถๅฏน่ฑก for para in fileobj.paragraphs: c...
35.344595
101
0.537373
import docx from docx.oxml.ns import qn import os def read_text(formatpath): content = '' try: fileobj = docx.Document(formatpath) for para in fileobj.paragraphs: content += para.text+'\n' except Exception as err: print(err) return content def read_t...
true
true
1c13f2cd83603492763d3e96c11ab3a226c028dd
2,981
py
Python
database.py
MatthewSherlin/Syllabus-Management-System
9dccd48abf63bf94afad76e7af6a59df2a34ae27
[ "Unlicense" ]
1
2021-11-27T00:52:29.000Z
2021-11-27T00:52:29.000Z
database.py
MatthewSherlin/Syllabus-Management-System
9dccd48abf63bf94afad76e7af6a59df2a34ae27
[ "Unlicense" ]
2
2021-11-29T00:00:15.000Z
2021-11-29T00:00:25.000Z
database.py
MatthewSherlin/Syllabus-Management-System
9dccd48abf63bf94afad76e7af6a59df2a34ae27
[ "Unlicense" ]
3
2021-12-01T22:44:11.000Z
2021-12-09T02:56:04.000Z
# database import dataset import hashlib import os import codecs import string import random ## connecting to database ## make sure database = ali ## # Add your own password for localhost db = dataset.connect("mysql://root:@localhost/ali") ## Testing database connection ## # Create a reference to table 'sessions' u...
26.616071
99
0.625964
import dataset import hashlib import os import codecs import string import random db = dataset.connect("mysql://root:@localhost/ali") users_table = db["users_table"] companies = db["companies"] chart_table = db["chart_table"] sessions = db["sessions"] def companyIdGenerator(size=4, uchars=string.digits): retur...
true
true
1c13f2dbd307c922c6488c4bcb8e1873a55e38ba
12,024
py
Python
official/vision/beta/modeling/backbones/resnet.py
akineeic/models
2912042352009c9993dc05403624100bfe42d9c1
[ "Apache-2.0" ]
3
2020-12-18T10:10:26.000Z
2021-03-01T15:24:42.000Z
official/vision/beta/modeling/backbones/resnet.py
akineeic/models
2912042352009c9993dc05403624100bfe42d9c1
[ "Apache-2.0" ]
5
2020-10-01T09:02:34.000Z
2021-02-21T12:50:11.000Z
official/vision/beta/modeling/backbones/resnet.py
akineeic/models
2912042352009c9993dc05403624100bfe42d9c1
[ "Apache-2.0" ]
1
2021-01-17T15:54:22.000Z
2021-01-17T15:54:22.000Z
# Copyright 2020 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...
35.785714
80
0.63839
import tensorflow as tf from official.modeling import tf_utils from official.vision.beta.modeling.backbones import factory from official.vision.beta.modeling.layers import nn_blocks from official.vision.beta.modeling.layers import nn_layers layers = tf.keras.layers RESNET_SPECS = { 18: [ ('residual', 64,...
true
true
1c13f30f4cb9f078ef826ca0d0c0771ab5762ff9
1,221
py
Python
cut_music/cut_music.py
RRRoger/music_tools
94887c2e31fff31399c94d8c427895eb79d4af00
[ "MIT" ]
null
null
null
cut_music/cut_music.py
RRRoger/music_tools
94887c2e31fff31399c94d8c427895eb79d4af00
[ "MIT" ]
null
null
null
cut_music/cut_music.py
RRRoger/music_tools
94887c2e31fff31399c94d8c427895eb79d4af00
[ "MIT" ]
null
null
null
# -*- encoding: utf-8 -*- """ ไธญไบ†ๆŠ–้Ÿณ็š„ๆฏ’, ๆญค่„šๆœฌ็”จๆˆทๆๅ–ๆŠ–้Ÿณ่ง†้ข‘ไธญ็š„้Ÿณ้ข‘, ๅนถๆ”ฏๆŒ่ง†้ข‘ๅ‰ช่พ‘ """ from pydub import AudioSegment def min2millisec(t): """ ๅฐ†`03:36`่ฝฌๅŒ–ๆˆๆฏซ็ง’ :param t: min string like '00:43' :return: millisec int """ if not t: return t tim = t.split(":")[::-1] depth = 0 rel = 60 res = ...
20.35
63
0.588862
""" ไธญไบ†ๆŠ–้Ÿณ็š„ๆฏ’, ๆญค่„šๆœฌ็”จๆˆทๆๅ–ๆŠ–้Ÿณ่ง†้ข‘ไธญ็š„้Ÿณ้ข‘, ๅนถๆ”ฏๆŒ่ง†้ข‘ๅ‰ช่พ‘ """ from pydub import AudioSegment def min2millisec(t): """ ๅฐ†`03:36`่ฝฌๅŒ–ๆˆๆฏซ็ง’ :param t: min string like '00:43' :return: millisec int """ if not t: return t tim = t.split(":")[::-1] depth = 0 rel = 60 res = 0 for s in tim: ...
false
true
1c13f3449249e23b68b76f758699e9cdada7237c
7,210
py
Python
idaes/models_extra/gas_solid_contactors/flowsheets/ss_BFB_methane_combustion.py
OOAmusat/idaes-pse
ae7d3bb8e372bc32822dcdcb75e9fd96b78da539
[ "RSA-MD" ]
null
null
null
idaes/models_extra/gas_solid_contactors/flowsheets/ss_BFB_methane_combustion.py
OOAmusat/idaes-pse
ae7d3bb8e372bc32822dcdcb75e9fd96b78da539
[ "RSA-MD" ]
null
null
null
idaes/models_extra/gas_solid_contactors/flowsheets/ss_BFB_methane_combustion.py
OOAmusat/idaes-pse
ae7d3bb8e372bc32822dcdcb75e9fd96b78da539
[ "RSA-MD" ]
null
null
null
################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021 # by the softwar...
36.598985
109
0.609293
import time from pyomo.environ import ConcreteModel, value from idaes.core import FlowsheetBlock from idaes.core.util import scaling as iscale from idaes.core.solvers import get_solver import idaes.logger as idaeslog from idaes.models_extra.gas_solid_contactors.unit_models.bubbling_fluidized_bed import ( Bubbli...
true
true
1c13f36cbaa104847f7eafe4d7fb72b7c89dc5d8
12,111
py
Python
tests/xbmcgui.py
tmihai20/script.module.inputstreamhelper
25171444b48d85a1559ea5d2a8337f5ae8e66836
[ "MIT" ]
null
null
null
tests/xbmcgui.py
tmihai20/script.module.inputstreamhelper
25171444b48d85a1559ea5d2a8337f5ae8e66836
[ "MIT" ]
null
null
null
tests/xbmcgui.py
tmihai20/script.module.inputstreamhelper
25171444b48d85a1559ea5d2a8337f5ae8e66836
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright: (c) 2019, Dag Wieers (@dagwieers) <dag@wieers.com> # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """This file implements the Kodi xbmcgui module, either using stubs or alternative functionality""" # pylint: disable=invalid-name,super-on...
37.965517
149
0.661547
from __future__ import absolute_import, division, print_function, unicode_literals import sys from xbmcextra import kodi_to_ansi class Control: def __init__(self): @staticmethod def selectItem(index): class ControlLabel(Control): def __init__(self): @staticmethod def getLabel(): ...
true
true
1c13f3fb879ae1a80f96f98dbd838c8a2289e23f
2,755
py
Python
tests/contrib/sensors/test_sftp_sensor.py
abhishek-ch/incubator-airflow
3358551c8e73d9019900f7a85f18ebfd88591450
[ "Apache-2.0" ]
4
2015-11-12T10:58:54.000Z
2017-08-05T06:41:36.000Z
tests/contrib/sensors/test_sftp_sensor.py
abhishek-ch/incubator-airflow
3358551c8e73d9019900f7a85f18ebfd88591450
[ "Apache-2.0" ]
13
2018-07-11T10:45:30.000Z
2018-08-18T00:43:30.000Z
tests/contrib/sensors/test_sftp_sensor.py
abhishek-ch/incubator-airflow
3358551c8e73d9019900f7a85f18ebfd88591450
[ "Apache-2.0" ]
5
2020-05-12T13:38:14.000Z
2022-03-17T17:17:50.000Z
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
39.357143
80
0.679855
import unittest from mock import patch from paramiko import SFTP_NO_SUCH_FILE, SFTP_FAILURE from airflow.contrib.sensors.sftp_sensor import SFTPSensor class SFTPSensorTest(unittest.TestCase): @patch('airflow.contrib.sensors.sftp_sensor.SFTPHook') def test_file_present(self, sftp_hook_mock): sftp_hook...
true
true
1c13f4094f4d03b0804ecc41cefd3a8b66f824f6
13,124
py
Python
tools/pot/tests/test_graph.py
ivkalgin/openvino
81685c8d212135dd9980da86a18db41fbf6d250a
[ "Apache-2.0" ]
null
null
null
tools/pot/tests/test_graph.py
ivkalgin/openvino
81685c8d212135dd9980da86a18db41fbf6d250a
[ "Apache-2.0" ]
18
2022-01-21T08:42:58.000Z
2022-03-28T13:21:31.000Z
tools/pot/tests/test_graph.py
ematroso/openvino
403339f8f470c90dee6f6d94ed58644b2787f66b
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2020-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 from addict import Dict import pytest import openvino.tools.pot.graph.node_utils as nu from openvino.tools.pot.graph import load_model from openvino.tools.pot.configs.hardware_config import HardwareConfig from openvino.tools.pot.graph....
40.257669
106
0.669384
from addict import Dict import pytest import openvino.tools.pot.graph.node_utils as nu from openvino.tools.pot.graph import load_model from openvino.tools.pot.configs.hardware_config import HardwareConfig from openvino.tools.pot.graph.transformer import GraphTransformer from openvino.tools.pot.graph.model_utils impo...
true
true
1c13f44f31380a7f4eeb553d83869db802c9091a
58
py
Python
experiment_impact_tracker/__init__.py
ANarayan/experiment-impact-tracker
b4f49d5d66e4caee1044fe3365e7792381b750d0
[ "MIT" ]
202
2020-01-28T15:05:07.000Z
2022-03-30T06:47:37.000Z
experiment_impact_tracker/__init__.py
adam7575a/experiment-impact-tracker
c1b0fcb4e75f04511805a1e57b2d8a97266d2977
[ "MIT" ]
56
2020-04-09T16:37:18.000Z
2022-02-28T15:22:34.000Z
experiment_impact_tracker/__init__.py
adam7575a/experiment-impact-tracker
c1b0fcb4e75f04511805a1e57b2d8a97266d2977
[ "MIT" ]
20
2020-02-15T06:40:10.000Z
2022-02-19T21:22:07.000Z
from experiment_impact_tracker.version import __version__
29
57
0.913793
from experiment_impact_tracker.version import __version__
true
true
1c13f48643fa5c4c14a29f707bc529108bf73785
2,010
py
Python
patchwork/tests/test_augment.py
mediocretech/patchwork
ad21c81611f74569e93f563d765cba2259b1d4b3
[ "MIT" ]
null
null
null
patchwork/tests/test_augment.py
mediocretech/patchwork
ad21c81611f74569e93f563d765cba2259b1d4b3
[ "MIT" ]
null
null
null
patchwork/tests/test_augment.py
mediocretech/patchwork
ad21c81611f74569e93f563d765cba2259b1d4b3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import numpy as np import tensorflow as tf from patchwork._augment import augment_function, _poisson, _random_zoom, _choose from patchwork._augment import _center_crop, _jitter, _random_jpeg_degrade, _gaussian_blur from patchwork._augment import SINGLE_AUG_FUNC test_shape = (64,64,3) test_img...
28.309859
90
0.657711
import numpy as np import tensorflow as tf from patchwork._augment import augment_function, _poisson, _random_zoom, _choose from patchwork._augment import _center_crop, _jitter, _random_jpeg_degrade, _gaussian_blur from patchwork._augment import SINGLE_AUG_FUNC test_shape = (64,64,3) test_img = np.zeros(test_shape, ...
true
true
1c13f4c39cf94cc440794fe1fbe13094394b5f49
20,488
py
Python
tensorflow_federated/python/core/impl/executors/eager_tf_executor.py
abhinavsp0730/federated
7c5821f85cb2d0379f33bf2b5e02f97d51a16427
[ "Apache-2.0" ]
1
2020-06-11T16:34:24.000Z
2020-06-11T16:34:24.000Z
tensorflow_federated/python/core/impl/executors/eager_tf_executor.py
abhinavsp0730/federated
7c5821f85cb2d0379f33bf2b5e02f97d51a16427
[ "Apache-2.0" ]
null
null
null
tensorflow_federated/python/core/impl/executors/eager_tf_executor.py
abhinavsp0730/federated
7c5821f85cb2d0379f33bf2b5e02f97d51a16427
[ "Apache-2.0" ]
1
2021-09-06T03:33:14.000Z
2021-09-06T03:33:14.000Z
# Lint as: python3 # Copyright 2019, The TensorFlow Federated Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
40.490119
103
0.721886
import cachetools import tensorflow as tf from tensorflow_federated.proto.v0 import computation_pb2 as pb from tensorflow_federated.python.common_libs import anonymous_tuple from tensorflow_federated.python.common_libs import py_typecheck from tensorflow_federated.python.common_libs import serialization_utils from te...
true
true
1c13f664e3d7312e134b2131a1719f984ba6d0f9
53,576
py
Python
electrum/util.py
accumulator/electrum
c9f1d6b419b7ac3225aeee38b2febf83b2462b88
[ "MIT" ]
null
null
null
electrum/util.py
accumulator/electrum
c9f1d6b419b7ac3225aeee38b2febf83b2462b88
[ "MIT" ]
1
2021-09-25T01:31:05.000Z
2021-10-03T01:35:25.000Z
electrum/util.py
accumulator/electrum
c9f1d6b419b7ac3225aeee38b2febf83b2462b88
[ "MIT" ]
null
null
null
# Electrum - lightweight Bitcoin client # Copyright (C) 2011 Thomas Voegtlin # # 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 t...
32.728161
108
0.621192
import binascii import os, sys, re, json from collections import defaultdict, OrderedDict from typing import (NamedTuple, Union, TYPE_CHECKING, Tuple, Optional, Callable, Any, Sequence, Dict, Generic, TypeVar, List, Iterable, Set) from datetime import datetime import decimal from decimal import Deci...
true
true
1c13f6de0ed94faedb450977b86ad293319b7d65
2,573
py
Python
kutana/storages/sqlite.py
ekonda/kutana
902f9d521c10c6c7ccabb1387ee3d87db5e2eba6
[ "MIT" ]
69
2018-10-05T21:42:51.000Z
2022-03-16T17:22:21.000Z
kutana/storages/sqlite.py
ekonda/kutana
902f9d521c10c6c7ccabb1387ee3d87db5e2eba6
[ "MIT" ]
41
2018-10-20T09:18:43.000Z
2021-11-22T12:19:44.000Z
kutana/storages/sqlite.py
ekonda/kutana
902f9d521c10c6c7ccabb1387ee3d87db5e2eba6
[ "MIT" ]
26
2018-10-20T09:13:42.000Z
2021-12-24T17:01:02.000Z
import json import sqlite3 import threading from contextlib import contextmanager from ..storage import Storage, OptimisticLockException def dict_factory(cursor, row): d = {} for idx, col in enumerate(cursor.description): d[col[0]] = row[idx] return d class SqliteStorage(Storage): """ St...
32.1625
101
0.54761
import json import sqlite3 import threading from contextlib import contextmanager from ..storage import Storage, OptimisticLockException def dict_factory(cursor, row): d = {} for idx, col in enumerate(cursor.description): d[col[0]] = row[idx] return d class SqliteStorage(Storage): def __ini...
true
true
1c13f7bf14fd61663720be94ad33562663447b47
2,433
py
Python
vedastr_cstr/vedastr/datasets/paste_dataset.py
bsm8734/formula-image-latex-recognition
86d5070e8f907571a47967d64facaee246d92a35
[ "MIT" ]
13
2021-06-20T18:11:23.000Z
2021-12-07T18:06:42.000Z
vedastr_cstr/vedastr/datasets/paste_dataset.py
bsm8734/formula-image-latex-recognition
86d5070e8f907571a47967d64facaee246d92a35
[ "MIT" ]
9
2021-06-16T14:55:07.000Z
2021-06-23T14:45:36.000Z
vedastr_cstr/vedastr/datasets/paste_dataset.py
bsm8734/formula-image-latex-recognition
86d5070e8f907571a47967d64facaee246d92a35
[ "MIT" ]
6
2021-06-17T15:16:50.000Z
2021-07-05T20:41:26.000Z
import random import cv2 import lmdb from .lmdb_dataset import LmdbDataset from .registry import DATASETS @DATASETS.register_module class PasteDataset(LmdbDataset): """ Concat two images and the combined label should satisfy the constrains. Args: p: The probability of pasting operation. Wa...
33.328767
79
0.549116
import random import cv2 import lmdb from .lmdb_dataset import LmdbDataset from .registry import DATASETS @DATASETS.register_module class PasteDataset(LmdbDataset): def __init__(self, p: float = 0.1, *args, **kwargs): self.len_sample = dict() self.len_lists = list() self.p = p s...
true
true
1c13f84b07c2eb0bcbe8e2aa9be712b48cf5977e
2,160
py
Python
usaspending_api/awards/migrations/0079_auto_20170409_1723.py
toolness/usaspending-api
ed9a396e20a52749f01f43494763903cc371f9c2
[ "CC0-1.0" ]
1
2021-06-17T05:09:00.000Z
2021-06-17T05:09:00.000Z
usaspending_api/awards/migrations/0079_auto_20170409_1723.py
toolness/usaspending-api
ed9a396e20a52749f01f43494763903cc371f9c2
[ "CC0-1.0" ]
null
null
null
usaspending_api/awards/migrations/0079_auto_20170409_1723.py
toolness/usaspending-api
ed9a396e20a52749f01f43494763903cc371f9c2
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2017-04-09 17:23 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('awards', '0078_auto_20170409_0104'), ] operations = [ migrations.AlterField...
46.956522
296
0.661574
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('awards', '0078_auto_20170409_0104'), ] operations = [ migrations.AlterField( model_name='award', name='type', fi...
true
true
1c13f9241321e81ca57ac8968cc3624911ce3644
1,724
py
Python
ocdsapi/validation.py
openprocurement/ocdsapi
137d979c1f674b251436b3f68da8164921218bd6
[ "Apache-2.0" ]
null
null
null
ocdsapi/validation.py
openprocurement/ocdsapi
137d979c1f674b251436b3f68da8164921218bd6
[ "Apache-2.0" ]
4
2019-12-26T17:18:39.000Z
2022-03-21T22:16:51.000Z
ocdsapi/validation.py
openprocurement/ocdsapi
137d979c1f674b251436b3f68da8164921218bd6
[ "Apache-2.0" ]
2
2018-05-11T12:07:28.000Z
2018-07-27T16:19:30.000Z
import hashlib from json import JSONDecodeError from fastjsonschema import JsonSchemaException def validate_release_bulk(request, **kw): try: data = request.json_body releases = data.get('releases') if not releases: request.errors.add('body', 'releases', 'releases data missing'...
33.803922
80
0.584687
import hashlib from json import JSONDecodeError from fastjsonschema import JsonSchemaException def validate_release_bulk(request, **kw): try: data = request.json_body releases = data.get('releases') if not releases: request.errors.add('body', 'releases', 'releases data missing'...
true
true
1c13fa30c01701a5f988b86e0b09ca8f9e2caa31
4,154
py
Python
kubernetes/client/models/v1_resource_quota_status.py
fooka03/python
073cf4d89e532f92b57e8955b4efc3d5d5eb80cf
[ "Apache-2.0" ]
2
2020-07-02T05:47:41.000Z
2020-07-02T05:50:34.000Z
kubernetes/client/models/v1_resource_quota_status.py
fooka03/python
073cf4d89e532f92b57e8955b4efc3d5d5eb80cf
[ "Apache-2.0" ]
1
2021-03-25T23:44:49.000Z
2021-03-25T23:44:49.000Z
k8sdeployment/k8sstat/python/kubernetes/client/models/v1_resource_quota_status.py
JeffYFHuang/gpuaccounting
afa934350ebbd0634beb60b9df4a147426ea0006
[ "MIT" ]
1
2021-10-13T17:45:37.000Z
2021-10-13T17:45:37.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: v1.15.6 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class V1Resource...
29.048951
157
0.577275
import pprint import re import six class V1ResourceQuotaStatus(object): openapi_types = { 'hard': 'dict(str, str)', 'used': 'dict(str, str)' } attribute_map = { 'hard': 'hard', 'used': 'used' } def __init__(self, hard=None, used=None): self._hard =...
true
true
1c13fb9ecef491f68011ef0866b127a39d68eb28
2,979
py
Python
utils.py
kjanjua26/Are_Neural_Nets_Dirty
4fdb710e80fe25ff80c23c8ef9419ba71baf7244
[ "MIT" ]
1
2020-08-13T02:58:24.000Z
2020-08-13T02:58:24.000Z
utils.py
kjanjua26/Are_Neural_Nets_Dirty
4fdb710e80fe25ff80c23c8ef9419ba71baf7244
[ "MIT" ]
null
null
null
utils.py
kjanjua26/Are_Neural_Nets_Dirty
4fdb710e80fe25ff80c23c8ef9419ba71baf7244
[ "MIT" ]
null
null
null
import numpy as np from glob import glob import cv2 import os import random from sklearn import preprocessing from sklearn.model_selection import train_test_split IMG_LIST = [] LABEL_LIST = [] def normalize(x): min_val = np.min(x) max_val = np.max(x) x = (x-min_val) / (max_val-min_val) return x def...
35.891566
113
0.641155
import numpy as np from glob import glob import cv2 import os import random from sklearn import preprocessing from sklearn.model_selection import train_test_split IMG_LIST = [] LABEL_LIST = [] def normalize(x): min_val = np.min(x) max_val = np.max(x) x = (x-min_val) / (max_val-min_val) return x def...
true
true
1c13fc8fbc9b63df87f539c052ecb0e86bcece05
2,564
py
Python
mueddit/mueddit/mueddi.py
vbar/mueddi
2d607d445f49feda3bba8dc7b58876be98c39ad8
[ "MIT" ]
null
null
null
mueddit/mueddit/mueddi.py
vbar/mueddi
2d607d445f49feda3bba8dc7b58876be98c39ad8
[ "MIT" ]
null
null
null
mueddit/mueddit/mueddi.py
vbar/mueddi
2d607d445f49feda3bba8dc7b58876be98c39ad8
[ "MIT" ]
null
null
null
#!/usr/bin/python3 """MUlti-word EDit DIstance package interface. Also contains main function for command-line use. """ from mueddit.dawg import make_dawg from mueddit.leven import Facade import argparse import logging class Iterator: """Standard iterator interface. Initialized by the checked (possibly mis...
33.298701
107
0.611544
from mueddit.dawg import make_dawg from mueddit.leven import Facade import argparse import logging class Iterator: log = logging.getLogger('mueddi') def __init__(self, seen, n, dawg): assert dawg self.dawg = dawg self.facade = Facade(seen, n) def __iter__(self): ...
true
true
1c13fd1b82452641051c69a5814c63a2585d6963
1,059
py
Python
deals/migrations/0001_initial.py
xuppr/GameDealsDashboard-server
a15e90fe6a37431db1b4de565e9e7d54d2aee223
[ "MIT" ]
null
null
null
deals/migrations/0001_initial.py
xuppr/GameDealsDashboard-server
a15e90fe6a37431db1b4de565e9e7d54d2aee223
[ "MIT" ]
null
null
null
deals/migrations/0001_initial.py
xuppr/GameDealsDashboard-server
a15e90fe6a37431db1b4de565e9e7d54d2aee223
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-07-28 10:36 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Deal', fields=[ ('id', models.BigAutoField(...
34.16129
117
0.567517
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Deal', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=F...
true
true
1c13ffa46cec0e663a71c40fb419a1e1072ac372
194
py
Python
data_collection/gazette/spiders/sc_sao_jose.py
kaiocp/querido-diario
86004049c6eee305e13066cf3607d30849bb099a
[ "MIT" ]
454
2018-04-07T03:32:57.000Z
2020-08-17T19:56:22.000Z
data_collection/gazette/spiders/sc_sao_jose.py
kaiocp/querido-diario
86004049c6eee305e13066cf3607d30849bb099a
[ "MIT" ]
254
2020-08-18T14:09:43.000Z
2022-03-28T11:30:51.000Z
data_collection/gazette/spiders/sc_sao_jose.py
kaiocp/querido-diario
86004049c6eee305e13066cf3607d30849bb099a
[ "MIT" ]
183
2018-04-11T15:09:37.000Z
2020-08-15T18:55:11.000Z
from gazette.spiders.base.fecam import FecamGazetteSpider class ScSaoJoseSpider(FecamGazetteSpider): name = "sc_sao_jose" FECAM_QUERY = "cod_entidade:251" TERRITORY_ID = "4216602"
24.25
57
0.768041
from gazette.spiders.base.fecam import FecamGazetteSpider class ScSaoJoseSpider(FecamGazetteSpider): name = "sc_sao_jose" FECAM_QUERY = "cod_entidade:251" TERRITORY_ID = "4216602"
true
true
1c13ffd623e7f1edb78aeff03bf6b77dfb854150
1,122
py
Python
flight_plans/migrations/0004_auto_20180325_1609.py
geoffreynyaga/ANGA-UTM
8371a51ad27c85d2479bb34d8c4e02ea28465941
[ "Apache-2.0" ]
7
2020-01-18T16:53:41.000Z
2021-12-21T07:02:43.000Z
flight_plans/migrations/0004_auto_20180325_1609.py
geoffreynyaga/ANGA-UTM
8371a51ad27c85d2479bb34d8c4e02ea28465941
[ "Apache-2.0" ]
28
2020-01-06T18:36:54.000Z
2022-02-10T10:03:55.000Z
flight_plans/migrations/0004_auto_20180325_1609.py
geoffreynyaga/ANGA-UTM
8371a51ad27c85d2479bb34d8c4e02ea28465941
[ "Apache-2.0" ]
3
2020-01-18T16:53:54.000Z
2020-10-26T11:21:41.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2018-03-25 13:09 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('flight_plans', '0003_auto_20180324_1508'), ] operations = [ m...
26.714286
67
0.540107
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('flight_plans', '0003_auto_20180324_1508'), ] operations = [ migrations.RenameField( model_name='flightlog', ol...
true
true
1c14004c3049b715547d437281a0ded9a98a9331
2,617
py
Python
tests/unit/strategies.py
celery/amqpframe
ab4d73d092a8e0d35a7964a2033b8be97ee21a6a
[ "BSD-3-Clause" ]
5
2016-08-05T21:24:39.000Z
2017-10-09T12:15:32.000Z
tests/unit/strategies.py
celery/amqpframe
ab4d73d092a8e0d35a7964a2033b8be97ee21a6a
[ "BSD-3-Clause" ]
2
2016-08-02T06:43:52.000Z
2018-03-22T12:15:56.000Z
tests/unit/strategies.py
celery/amqpframe
ab4d73d092a8e0d35a7964a2033b8be97ee21a6a
[ "BSD-3-Clause" ]
3
2016-12-04T05:53:07.000Z
2022-02-12T10:54:59.000Z
import functools import amqpframe.types as at import hypothesis.strategies as hs import hypothesis.extra.datetime as hed utf8encode = functools.partial(str.encode, encoding='utf-8') def validate(cls): def inner(value): try: cls(value) return True except ValueError: ...
33.987013
108
0.72029
import functools import amqpframe.types as at import hypothesis.strategies as hs import hypothesis.extra.datetime as hed utf8encode = functools.partial(str.encode, encoding='utf-8') def validate(cls): def inner(value): try: cls(value) return True except ValueError: ...
true
true
1c1400a46fe1934b52471dde8efac82706a2f52f
6,453
py
Python
tests/test_propertyfield.py
jfthuong/pydpf-core
bf2895ebc546e0004f759289bfc9a23196559ac3
[ "MIT" ]
18
2021-10-16T10:38:29.000Z
2022-03-29T11:26:42.000Z
tests/test_propertyfield.py
jfthuong/pydpf-core
bf2895ebc546e0004f759289bfc9a23196559ac3
[ "MIT" ]
79
2021-10-11T23:18:54.000Z
2022-03-29T14:53:14.000Z
tests/test_propertyfield.py
jfthuong/pydpf-core
bf2895ebc546e0004f759289bfc9a23196559ac3
[ "MIT" ]
5
2021-11-29T18:35:37.000Z
2022-03-16T16:49:21.000Z
import numpy as np import pytest from ansys import dpf from ansys.dpf import core from ansys.dpf.core.common import locations, natures @pytest.fixture() def property_field(simple_bar): """Return a property field from the simple bar model""" model = dpf.core.Model(simple_bar) mesh = model.metadata.meshed_...
34.693548
81
0.711607
import numpy as np import pytest from ansys import dpf from ansys.dpf import core from ansys.dpf.core.common import locations, natures @pytest.fixture() def property_field(simple_bar): model = dpf.core.Model(simple_bar) mesh = model.metadata.meshed_region op = dpf.core.Operator("meshed_skin_sector") ...
true
true
1c140141f0dd3904a271001627372abaf072c639
8,263
py
Python
tools/ignition/bytecode_dispatches_report.py
TwistedCore/external_v8
c6725dab9be251fbfc6fd7d53c3513a23e78c36c
[ "BSD-3-Clause" ]
1,244
2015-01-02T21:08:56.000Z
2022-03-22T21:34:16.000Z
tools/ignition/bytecode_dispatches_report.py
TwistedCore/external_v8
c6725dab9be251fbfc6fd7d53c3513a23e78c36c
[ "BSD-3-Clause" ]
125
2015-01-22T01:08:00.000Z
2020-05-25T08:28:17.000Z
tools/ignition/bytecode_dispatches_report.py
TwistedCore/external_v8
c6725dab9be251fbfc6fd7d53c3513a23e78c36c
[ "BSD-3-Clause" ]
124
2015-01-12T15:06:17.000Z
2022-03-26T07:48:53.000Z
#! /usr/bin/python # # Copyright 2016 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # import argparse import heapq import json from matplotlib import colors from matplotlib import pyplot import numpy import struct __...
31.903475
80
0.72274
import argparse import heapq import json from matplotlib import colors from matplotlib import pyplot import numpy import struct __DESCRIPTION = """ Process v8.ignition_dispatches_counters.json and list top counters, or plot a dispatch heatmap. Please note that those handlers that may not or will never dispatch (e.g...
false
true
1c14015ef60b45e337b6f5a8505179eaae433622
911
py
Python
testproject/urls.py
jstockall/python-test-app
cd71c476cac6d846f1ed7f30643aab1f283a3c92
[ "Apache-2.0" ]
null
null
null
testproject/urls.py
jstockall/python-test-app
cd71c476cac6d846f1ed7f30643aab1f283a3c92
[ "Apache-2.0" ]
null
null
null
testproject/urls.py
jstockall/python-test-app
cd71c476cac6d846f1ed7f30643aab1f283a3c92
[ "Apache-2.0" ]
null
null
null
"""testproject URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/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') Clas...
36.44
79
0.687157
from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ url(r'^', include('polls.urls')), url(r'^polls/', include('polls.urls')), url(r'^admin/', admin.site.urls), url(r'^django-rq/', include('django_rq.urls')), ]
true
true
1c140195a3ae87d5443f73f58ce5b5b9a56d524b
23,852
py
Python
qr.py
alewis/dfact
04dfa7e0e19f10d2684931015aa83f82c1ea72b9
[ "MIT" ]
1
2020-08-04T18:17:14.000Z
2020-08-04T18:17:14.000Z
qr.py
alewis/dfact
04dfa7e0e19f10d2684931015aa83f82c1ea72b9
[ "MIT" ]
null
null
null
qr.py
alewis/dfact
04dfa7e0e19f10d2684931015aa83f82c1ea72b9
[ "MIT" ]
1
2021-02-19T18:00:28.000Z
2021-02-19T18:00:28.000Z
""" Jax implementation of householder QR exposing the low-level functionality needed for the UTV decomposition. Adam GM Lewis adam.lws@gmail.com alewis@perimeterinstitute.ca """ import numpy as np import typing from functools import partial import jax from jax.ops import index_update, index_add, index import jax.nump...
31.802667
79
0.563265
import numpy as np import typing from functools import partial import jax from jax.ops import index_update, index_add, index import jax.numpy as jnp import dfact.matutils as matutils from dfact.matutils import dag @jax.jit def sign(num): result = jax.lax.cond(num == 0, num, lambda num: ...
true
true
1c1401cf1300b719c608ee90f1ccb38e8f2ba662
15,928
py
Python
xero/basemanager.py
divipayhq/pyxero
dfdb29715d0617e29dce4c85d6021bd311d0470a
[ "BSD-3-Clause" ]
null
null
null
xero/basemanager.py
divipayhq/pyxero
dfdb29715d0617e29dce4c85d6021bd311d0470a
[ "BSD-3-Clause" ]
1
2020-11-03T22:08:26.000Z
2020-11-03T22:08:26.000Z
xero/basemanager.py
divipayhq/pyxero
dfdb29715d0617e29dce4c85d6021bd311d0470a
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals import json import requests import six from datetime import datetime from six.moves.urllib.parse import parse_qs from xml.etree.ElementTree import Element, SubElement, tostring from xml.parsers.expat import ExpatError from .auth import OAuth2Credentials from .exceptions import ...
35.0837
105
0.549033
from __future__ import unicode_literals import json import requests import six from datetime import datetime from six.moves.urllib.parse import parse_qs from xml.etree.ElementTree import Element, SubElement, tostring from xml.parsers.expat import ExpatError from .auth import OAuth2Credentials from .exceptions import ...
true
true
1c14023f5c605b50a924a3028744d5c85484d530
10,880
py
Python
tests/dak_test.py
stalar/skojjt
97ba0022e2bc669a6f2ad2efd79de9bace54e175
[ "Apache-2.0" ]
3
2019-07-04T19:15:33.000Z
2022-01-29T12:24:32.000Z
tests/dak_test.py
stalar/skojjt
97ba0022e2bc669a6f2ad2efd79de9bace54e175
[ "Apache-2.0" ]
43
2019-11-23T23:47:26.000Z
2022-02-04T20:06:59.000Z
tests/dak_test.py
stalar/skojjt
97ba0022e2bc669a6f2ad2efd79de9bace54e175
[ "Apache-2.0" ]
4
2020-02-01T17:44:24.000Z
2022-02-02T07:15:51.000Z
# -*- coding: utf-8 -*- """ Tests of DAK handling. """ import sys import shutil import time import platform import os import json import unittest import datetime # Disable all import warnings since the imports are pretty hacky #pylint: disable=import-error,wrong-import-order,wrong-import-position sys.path.append('../l...
42.5
140
0.68318
import sys import shutil import time import platform import os import json import unittest import datetime sys.path.append('../lib') sys.path.append('..') sys.path.append('./lib') sys.path.append('.') import xmlschema import jsonpickle from openpyxl import load_workbook from flask import Flask, render_template from js...
true
true
1c14035a5e475f5d9446c3fc9f6a267386115490
8,586
py
Python
recon.py
linkel/excel-bank-reconciliation
ae7da39aeb6a7545dde6bb84d68dc8b11e9f5c97
[ "MIT" ]
3
2018-11-26T22:23:03.000Z
2021-12-24T14:55:18.000Z
recon.py
linkel/excel-bank-reconciliation
ae7da39aeb6a7545dde6bb84d68dc8b11e9f5c97
[ "MIT" ]
2
2018-10-27T22:31:52.000Z
2020-11-19T04:03:22.000Z
recon.py
linkel/excel-bank-reconciliation
ae7da39aeb6a7545dde6bb84d68dc8b11e9f5c97
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import openpyxl from openpyxl.styles import NamedStyle, Font, Border, Side, PatternFill import sys import time import os import glob os.chdir(".") # bind path to the current directory #highlight cells in openpyxl highlight = NamedStyle(name="highlight") highlight.font = Font(bold=True, size=...
38.16
132
0.617517
import openpyxl from openpyxl.styles import NamedStyle, Font, Border, Side, PatternFill import sys import time import os import glob os.chdir(".") highlight = NamedStyle(name="highlight") highlight.font = Font(bold=True, size=8) highlight.fill = PatternFill(fill_type='lightUp', start_color='ff...
true
true
1c14047cf3f17b7773a039987961142433150097
6,329
py
Python
kiner/producer.py
amirzamli/kiner
ba50982f6855c74606d33b92280640541cc228c6
[ "MIT" ]
null
null
null
kiner/producer.py
amirzamli/kiner
ba50982f6855c74606d33b92280640541cc228c6
[ "MIT" ]
null
null
null
kiner/producer.py
amirzamli/kiner
ba50982f6855c74606d33b92280640541cc228c6
[ "MIT" ]
null
null
null
import boto3 from concurrent.futures import ThreadPoolExecutor import logging from queue import Queue import threading import time import uuid import atexit logger = logging.getLogger(__name__) def encode_data(data, encoding='utf_8'): if isinstance(data, bytes): return data else: return str(d...
33.310526
105
0.605625
import boto3 from concurrent.futures import ThreadPoolExecutor import logging from queue import Queue import threading import time import uuid import atexit logger = logging.getLogger(__name__) def encode_data(data, encoding='utf_8'): if isinstance(data, bytes): return data else: return str(d...
true
true
1c14066947aea0c4864914f6acd3c05e97b776ed
2,334
py
Python
beetsplug/keyfinder.py
dreewoo/beets
e9834ef51cdb36567ecc926c85358f7c3d0e681a
[ "MIT" ]
null
null
null
beetsplug/keyfinder.py
dreewoo/beets
e9834ef51cdb36567ecc926c85358f7c3d0e681a
[ "MIT" ]
null
null
null
beetsplug/keyfinder.py
dreewoo/beets
e9834ef51cdb36567ecc926c85358f7c3d0e681a
[ "MIT" ]
null
null
null
# This file is part of beets. # Copyright 2015, Thomas Scholtes. # # 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,...
31.972603
73
0.632819
import subprocess from beets import logging from beets import ui from beets import util from beets.plugins import BeetsPlugin log = logging.getLogger('beets') class KeyFinderPlugin(BeetsPlugin): def __init__(self): super(KeyFinderPlugin, self).__init__() self.config.add({ u'bin':...
true
true
1c140739f542c2b0af3666ef13c63ccf0863a146
2,176
py
Python
epsonprojector/devices/epson.py
eieste/epsonProjector
bbe64cfcd07c821ffd43b771b9e7f337e4dfbf43
[ "MIT" ]
null
null
null
epsonprojector/devices/epson.py
eieste/epsonProjector
bbe64cfcd07c821ffd43b771b9e7f337e4dfbf43
[ "MIT" ]
null
null
null
epsonprojector/devices/epson.py
eieste/epsonProjector
bbe64cfcd07c821ffd43b771b9e7f337e4dfbf43
[ "MIT" ]
null
null
null
from epsonprojector.devices.generic import GenericDevice import re from epsonprojector.devices.generic import ParsedResponse from epsonprojector.exception import UnknownResponse response_re = re.compile(r'(?P<cmd>\w+)\=(?P<param>\w*)\s?') class EpsonDevice(GenericDevice): config_file = "epson.yaml" DEFAULT_TT...
36.266667
89
0.584099
from epsonprojector.devices.generic import GenericDevice import re from epsonprojector.devices.generic import ParsedResponse from epsonprojector.exception import UnknownResponse response_re = re.compile(r'(?P<cmd>\w+)\=(?P<param>\w*)\s?') class EpsonDevice(GenericDevice): config_file = "epson.yaml" DEFAULT_TT...
true
true
1c14092b97a62371d38fe24f2f90401873471745
15,055
py
Python
compiler/pgates/pnand3.py
mudassiruddin/OpenRAM
0589a35f7315fc075eaca38c0abd477703e70bf7
[ "BSD-3-Clause" ]
1
2022-02-17T22:12:46.000Z
2022-02-17T22:12:46.000Z
compiler/pgates/pnand3.py
mudassiruddin/OpenRAM
0589a35f7315fc075eaca38c0abd477703e70bf7
[ "BSD-3-Clause" ]
null
null
null
compiler/pgates/pnand3.py
mudassiruddin/OpenRAM
0589a35f7315fc075eaca38c0abd477703e70bf7
[ "BSD-3-Clause" ]
null
null
null
# See LICENSE for licensing information. # # Copyright (c) 2016-2021 Regents of the University of California and The Board # of Regents for the Oklahoma Agricultural and Mechanical College # (acting for and on behalf of Oklahoma State University) # All rights reserved. # import pgate import debug from tech import drc, ...
42.528249
121
0.543607
import pgate import debug from tech import drc, parameter, spice from vector import vector import logical_effort from sram_factory import factory import contact from tech import cell_properties as cell_props class pnand3(pgate.pgate): def __init__(self, name, size=1, height=None, add_wells=True): debug.i...
true
true
1c1409f4ad1c7a1b583ab0042e923e72c407cf11
18,136
py
Python
benchmark/apigeneration/generate.py
adbarwell/DottyGenerator
380281f3d7333db4f5fde52f25a4c32e471536b3
[ "MIT" ]
null
null
null
benchmark/apigeneration/generate.py
adbarwell/DottyGenerator
380281f3d7333db4f5fde52f25a4c32e471536b3
[ "MIT" ]
null
null
null
benchmark/apigeneration/generate.py
adbarwell/DottyGenerator
380281f3d7333db4f5fde52f25a4c32e471536b3
[ "MIT" ]
1
2021-06-29T10:33:43.000Z
2021-06-29T10:33:43.000Z
from dottygen.cli import generate from .counter import Counter import random import os import shutil from datetime import datetime import matplotlib.pyplot as plt parent_output_dir = os.path.abspath(os.path.join('benchmark', 'apigeneration', 'scr-sandbox')) output_file = os.path.join(parent_output_dir, 'test.scr') two...
133.352941
2,217
0.795545
from dottygen.cli import generate from .counter import Counter import random import os import shutil from datetime import datetime import matplotlib.pyplot as plt parent_output_dir = os.path.abspath(os.path.join('benchmark', 'apigeneration', 'scr-sandbox')) output_file = os.path.join(parent_output_dir, 'test.scr') two...
true
true
1c140b81bab49e0f7636126c6ab011ae95e641fe
11,332
py
Python
tests/chainer_tests/functions_tests/pooling_tests/test_max_pooling_2d.py
denjiry/chainer
5c8de0feea7d6dce820f57198952028abce330c6
[ "MIT" ]
1
2019-02-12T23:10:16.000Z
2019-02-12T23:10:16.000Z
tests/chainer_tests/functions_tests/pooling_tests/test_max_pooling_2d.py
ishanrai05/chainer
758c74122f4463f3b0de61c6609b8688576f59a6
[ "MIT" ]
1
2018-06-26T08:16:09.000Z
2018-06-26T08:16:09.000Z
tests/chainer_tests/functions_tests/pooling_tests/test_max_pooling_2d.py
ishanrai05/chainer
758c74122f4463f3b0de61c6609b8688576f59a6
[ "MIT" ]
1
2018-05-28T22:43:34.000Z
2018-05-28T22:43:34.000Z
import unittest import numpy import six import chainer from chainer.backends import cuda from chainer import functions from chainer import gradient_check from chainer import testing from chainer.testing import attr from chainer.testing import backend def _to_fcontiguous(arrays): xp = chainer.backend.get_array_m...
37.647841
77
0.589128
import unittest import numpy import six import chainer from chainer.backends import cuda from chainer import functions from chainer import gradient_check from chainer import testing from chainer.testing import attr from chainer.testing import backend def _to_fcontiguous(arrays): xp = chainer.backend.get_array_m...
true
true
1c140f1e7effe002ee7bcfb29c0e65f02f3c2df6
30,510
py
Python
net_benefit_ascvd/prediction_utils/pytorch_utils/group_fairness.py
som-shahlab/net_benefit_ascvd
1259692025d90618211206105d8d23bd5a90a66c
[ "MIT" ]
null
null
null
net_benefit_ascvd/prediction_utils/pytorch_utils/group_fairness.py
som-shahlab/net_benefit_ascvd
1259692025d90618211206105d8d23bd5a90a66c
[ "MIT" ]
null
null
null
net_benefit_ascvd/prediction_utils/pytorch_utils/group_fairness.py
som-shahlab/net_benefit_ascvd
1259692025d90618211206105d8d23bd5a90a66c
[ "MIT" ]
null
null
null
import torch import torch.nn.functional as F import itertools import warnings import logging from net_benefit_ascvd.prediction_utils.pytorch_utils.models import ( TorchModel, FixedWidthModel, BilevelModel, ) from net_benefit_ascvd.prediction_utils.pytorch_utils.layers import FeedforwardNet from net_benefit...
37.527675
115
0.576794
import torch import torch.nn.functional as F import itertools import warnings import logging from net_benefit_ascvd.prediction_utils.pytorch_utils.models import ( TorchModel, FixedWidthModel, BilevelModel, ) from net_benefit_ascvd.prediction_utils.pytorch_utils.layers import FeedforwardNet from net_benefit...
true
true
1c14102a15837d1872edcd8cfed461dbdbae2477
2,210
py
Python
mmdet/datasets/pipelines/compose.py
wangstone666/mmdetection
5ce2f219c1cedd6ccd1e531232341497c893d7fe
[ "Apache-2.0" ]
null
null
null
mmdet/datasets/pipelines/compose.py
wangstone666/mmdetection
5ce2f219c1cedd6ccd1e531232341497c893d7fe
[ "Apache-2.0" ]
null
null
null
mmdet/datasets/pipelines/compose.py
wangstone666/mmdetection
5ce2f219c1cedd6ccd1e531232341497c893d7fe
[ "Apache-2.0" ]
null
null
null
import collections from mmcv.utils import build_from_cfg from ..builder import PIPELINES @PIPELINES.register_module() class Compose(object): """Compose multiple transforms sequentially. Args: transforms (Sequence[dict | callable]): Sequence of transform object or config dict to be compo...
30.694444
86
0.505882
import collections from mmcv.utils import build_from_cfg from ..builder import PIPELINES @PIPELINES.register_module() class Compose(object): def __init__(self, transforms): assert isinstance(transforms, collections.abc.Sequence) self.transforms = [] for transform in transforms: ...
true
true
1c1410915cec53bb664186f7bb2ac1cf2bb7951e
418
py
Python
examples/msn30k.py
recoai/fastrank
bf63ac9e563f0f2aeeb8f1c0d71e1aa281de44d6
[ "MIT" ]
41
2019-09-29T14:00:03.000Z
2022-03-28T08:08:22.000Z
examples/msn30k.py
recoai/fastrank
bf63ac9e563f0f2aeeb8f1c0d71e1aa281de44d6
[ "MIT" ]
21
2019-10-12T17:34:02.000Z
2021-06-11T16:47:50.000Z
examples/msn30k.py
recoai/fastrank
bf63ac9e563f0f2aeeb8f1c0d71e1aa281de44d6
[ "MIT" ]
5
2019-12-19T14:22:44.000Z
2022-03-28T08:09:26.000Z
#%% import fastrank from fastrank import CModel, CDataset, TrainRequest #%% train = CDataset.open_ranksvm('msn30k-fold1-train.gz') print("{} train queries...".format(len(train.queries()))) #%% vali = CDataset.open_ranksvm('msn30k-fold1-vali.gz') print("{} vali queries...".format(len(vali.queries()))) #%% test = CData...
26.125
57
0.700957
import fastrank from fastrank import CModel, CDataset, TrainRequest train = CDataset.open_ranksvm('msn30k-fold1-train.gz') print("{} train queries...".format(len(train.queries()))) vali = CDataset.open_ranksvm('msn30k-fold1-vali.gz') print("{} vali queries...".format(len(vali.queries()))) test = CDataset.open_ranksvm...
true
true
1c14116aa6bf63aba3f5ebd7ddc7450bc9ce1b44
470
py
Python
plotly/validators/scattercarpet/hoverlabel/_bordercolorsrc.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
2
2020-03-24T11:41:14.000Z
2021-01-14T07:59:43.000Z
plotly/validators/scattercarpet/hoverlabel/_bordercolorsrc.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
null
null
null
plotly/validators/scattercarpet/hoverlabel/_bordercolorsrc.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
4
2019-06-03T14:49:12.000Z
2022-01-06T01:05:12.000Z
import _plotly_utils.basevalidators class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name='bordercolorsrc', parent_name='scattercarpet.hoverlabel', **kwargs ): super(BordercolorsrcValidator, self).__init__( ...
24.736842
73
0.619149
import _plotly_utils.basevalidators class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name='bordercolorsrc', parent_name='scattercarpet.hoverlabel', **kwargs ): super(BordercolorsrcValidator, self).__init__( ...
true
true
1c1411d4ed90e958ea393be3f7091351f930d03c
1,425
py
Python
Sim_ATAV/simulation_control/webots_sensor.py
SahilDhull/autonomous
378fc7d6c5a9c34c4e915f080fb78ed5c11195d6
[ "MIT" ]
3
2020-02-28T12:04:26.000Z
2022-02-27T00:42:56.000Z
Sim_ATAV/simulation_control/webots_sensor.py
SahilDhull/autonomous
378fc7d6c5a9c34c4e915f080fb78ed5c11195d6
[ "MIT" ]
null
null
null
Sim_ATAV/simulation_control/webots_sensor.py
SahilDhull/autonomous
378fc7d6c5a9c34c4e915f080fb78ed5c11195d6
[ "MIT" ]
null
null
null
"""Defines WebotsSensorField and WebotsSensor classes ---------------------------------------------------------------------------------------------------------- This file is part of Sim-ATAV project and licensed under MIT license. Copyright (c) 2018 Cumhur Erkan Tuncali, Georgios Fainekos, Danil Prokhorov, Hisahiro Ito...
34.756098
106
0.577544
class WebotsSensorField(object): def __init__(self): self.field_name = "" self.field_val = "" class WebotsSensor(object): FRONT = 0 CENTER = 1 LEFT = 2 RIGHT = 3 TOP = 4 LEFT_FRONT = 5 LEFT_REAR = 6 RIGHT_FRONT = 7 RIGHT_REAR = 8 REAR = 9 def __init__...
true
true
1c14129dc19d43e64040f00460fe9cdc4a6dfebc
202
py
Python
test_greenlet.py
jaredivey/Python-2.7.10
5d84a22d9fea54a23f80a819e2b5f50819d08245
[ "PSF-2.0" ]
null
null
null
test_greenlet.py
jaredivey/Python-2.7.10
5d84a22d9fea54a23f80a819e2b5f50819d08245
[ "PSF-2.0" ]
null
null
null
test_greenlet.py
jaredivey/Python-2.7.10
5d84a22d9fea54a23f80a819e2b5f50819d08245
[ "PSF-2.0" ]
null
null
null
from greenlet import greenlet def test1(): print 12 gr2.switch() print 34 def test2(): print 56 gr1.switch() print 78 gr1 = greenlet(test1) gr2 = greenlet(test2) gr1.switch()
12.625
29
0.638614
from greenlet import greenlet def test1(): print 12 gr2.switch() print 34 def test2(): print 56 gr1.switch() print 78 gr1 = greenlet(test1) gr2 = greenlet(test2) gr1.switch()
false
true
1c141484862da4118b1ff11411734578dd10f06c
11,000
py
Python
lib/utils.py
jrmhaig/Bakery
9f1e1cec8c844c088c112636a6adba29b7c9861f
[ "Apache-2.0" ]
2
2015-02-27T10:02:24.000Z
2015-04-27T14:44:25.000Z
lib/utils.py
jrmhaig/Bakery
9f1e1cec8c844c088c112636a6adba29b7c9861f
[ "Apache-2.0" ]
null
null
null
lib/utils.py
jrmhaig/Bakery
9f1e1cec8c844c088c112636a6adba29b7c9861f
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Joseph Haig # # 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 ...
32.448378
148
0.524455
import os import subprocess import signal import re import struct import queue import threading import time import pyudev import tempfile class DiskImage: def __init__(self, filepath, file_format, post, variables): self.name = os.path.basename(filepath) self.directory = os.path.dirname(filepath) ...
true
true
1c1414e8a35ea6a38470c3597c5a811f6279b47a
3,388
py
Python
aberowlweb/apps/aberowl/manage_views.py
bio-ontology-research-group/aberowlweb
3bfdb8d7119b41d9e38b3ecea2fe59b1ce889d62
[ "CC-BY-4.0" ]
4
2018-12-09T07:48:28.000Z
2020-08-05T11:53:56.000Z
aberowlweb/apps/aberowl/manage_views.py
bio-ontology-research-group/aberowlweb
3bfdb8d7119b41d9e38b3ecea2fe59b1ce889d62
[ "CC-BY-4.0" ]
55
2017-11-02T10:58:09.000Z
2022-02-17T14:12:33.000Z
aberowlweb/apps/aberowl/manage_views.py
bio-ontology-research-group/aberowlweb
3bfdb8d7119b41d9e38b3ecea2fe59b1ce889d62
[ "CC-BY-4.0" ]
4
2018-12-09T07:48:31.000Z
2019-09-26T13:58:44.000Z
from django.views.generic import CreateView, UpdateView, ListView from django.urls import reverse from aberowl.models import Ontology, Submission from aberowl.forms import OntologyForm, SubmissionForm from aberowlweb.mixins import FormRequestMixin, ActionMixin from django.shortcuts import get_object_or_404 from aberowl...
30.522523
78
0.685065
from django.views.generic import CreateView, UpdateView, ListView from django.urls import reverse from aberowl.models import Ontology, Submission from aberowl.forms import OntologyForm, SubmissionForm from aberowlweb.mixins import FormRequestMixin, ActionMixin from django.shortcuts import get_object_or_404 from aberowl...
true
true
1c14197ce3db7e2f6a9e2f484d12f88a73dbaeb8
2,487
py
Python
main.py
prz3m37/RandomBenchmarking
1e7cf754e016ea248377ee88741e6999359737ae
[ "MIT" ]
null
null
null
main.py
prz3m37/RandomBenchmarking
1e7cf754e016ea248377ee88741e6999359737ae
[ "MIT" ]
null
null
null
main.py
prz3m37/RandomBenchmarking
1e7cf754e016ea248377ee88741e6999359737ae
[ "MIT" ]
2
2021-04-10T14:17:59.000Z
2021-04-14T10:01:17.000Z
from BlochSolver.SolversManager import solvers_manager from BlochSolver.Plotter import bloch_plotter as bs from BlochSolver.Perturbations.filters import Filters from BlochSolver.QuantumSolvers.rotations import rotation_handler from BlochSolver.QuantumSolvers.numerics import numerical_methods from BlochSolver.Utils.util...
47.826923
145
0.623643
from BlochSolver.SolversManager import solvers_manager from BlochSolver.Plotter import bloch_plotter as bs from BlochSolver.Perturbations.filters import Filters from BlochSolver.QuantumSolvers.rotations import rotation_handler from BlochSolver.QuantumSolvers.numerics import numerical_methods from BlochSolver.Utils.util...
true
true
1c1419a14f200040b5cea2be4c410270693e7ac4
1,725
py
Python
dataset/re_label.py
habuimanh/HealthcareLogging
156df5eaab71e0e067b418e3ba3f65ebd92fc5a3
[ "Apache-2.0" ]
null
null
null
dataset/re_label.py
habuimanh/HealthcareLogging
156df5eaab71e0e067b418e3ba3f65ebd92fc5a3
[ "Apache-2.0" ]
null
null
null
dataset/re_label.py
habuimanh/HealthcareLogging
156df5eaab71e0e067b418e3ba3f65ebd92fc5a3
[ "Apache-2.0" ]
null
null
null
import pandas as pd from datetime import datetime import numpy as np def read_elan_data_sets(file_path): data = pd.read_csv(file_path,delimiter="\t") return data def read_data_sets(file_path): column_names = ['timestamp','x-axis', 'y-axis', 'z-axis','x1-axis', 'y1-axis', 'z1-axis'] data = pd.read_csv(f...
38.333333
123
0.697391
import pandas as pd from datetime import datetime import numpy as np def read_elan_data_sets(file_path): data = pd.read_csv(file_path,delimiter="\t") return data def read_data_sets(file_path): column_names = ['timestamp','x-axis', 'y-axis', 'z-axis','x1-axis', 'y1-axis', 'z1-axis'] data = pd.read_csv(f...
true
true
1c141bc1716e4ca5e0dd81667cf54503062787dc
187
py
Python
testTheOutput.py
BARarch/contacts-scraper
b1cad99c97c94d3ccd73bf0456001eb973de2a67
[ "MIT" ]
2
2020-12-21T15:00:49.000Z
2021-08-06T10:49:43.000Z
testTheOutput.py
BARarch/contacts-scraper
b1cad99c97c94d3ccd73bf0456001eb973de2a67
[ "MIT" ]
null
null
null
testTheOutput.py
BARarch/contacts-scraper
b1cad99c97c94d3ccd73bf0456001eb973de2a67
[ "MIT" ]
1
2021-09-12T08:27:01.000Z
2021-09-12T08:27:01.000Z
import sys from datetime import datetime sys.stdout = open('mode.txt', 'w') print ('Scraper started on ' + datetime.now().strftime('%a, %d %b %Y %H:%M:%S')) for n in range(5): print(n*2)
31.166667
80
0.652406
import sys from datetime import datetime sys.stdout = open('mode.txt', 'w') print ('Scraper started on ' + datetime.now().strftime('%a, %d %b %Y %H:%M:%S')) for n in range(5): print(n*2)
true
true
1c141bf3faf4cb5a3189f3dc3b59af7f48b9c1f0
7,149
py
Python
sdk/ml/azure-ai-ml/azure/ai/ml/_restclient/v2022_01_01_preview/operations/_workspace_features_operations.py
dubiety/azure-sdk-for-python
62ffa839f5d753594cf0fe63668f454a9d87a346
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
sdk/ml/azure-ai-ml/azure/ai/ml/_restclient/v2022_01_01_preview/operations/_workspace_features_operations.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "MIT" ]
null
null
null
sdk/ml/azure-ai-ml/azure/ai/ml/_restclient/v2022_01_01_preview/operations/_workspace_features_operations.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "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 may ...
42.553571
193
0.670863
import functools from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.trans...
true
true
1c141c5ada99d184ba0fdd5bb6cb2d609077d27f
2,822
py
Python
scripts/motors2.py
oguran/pimouse_ros
3994b50f93303f19d5d203678cbccbe095971997
[ "BSD-3-Clause" ]
1
2022-03-02T10:36:04.000Z
2022-03-02T10:36:04.000Z
scripts/motors2.py
oguran/pimouse_ros
3994b50f93303f19d5d203678cbccbe095971997
[ "BSD-3-Clause" ]
1
2017-08-25T01:55:45.000Z
2017-08-25T08:04:02.000Z
scripts/motors2.py
oguran/pimouse_ros
3994b50f93303f19d5d203678cbccbe095971997
[ "BSD-3-Clause" ]
107
2017-04-24T02:40:11.000Z
2022-03-02T05:08:32.000Z
#!/usr/bin/env python #encoding: utf8 import sys, rospy, math from pimouse_ros.msg import MotorFreqs from geometry_msgs.msg import Twist from std_srvs.srv import Trigger, TriggerResponse #่ฟฝๅŠ  class Motor(): def __init__(self): if not self.set_power(False): sys.exit(1) #...
35.721519
111
0.613395
import sys, rospy, math from pimouse_ros.msg import MotorFreqs from geometry_msgs.msg import Twist from std_srvs.srv import Trigger, TriggerResponse class Motor(): def __init__(self): if not self.set_power(False): sys.exit(1) rospy.on_shutdown(self.set_power) ...
true
true
1c141c8c7a6ac497521fbdc8893e915662e029fa
25,611
py
Python
sdk/python/pulumi_azure_native/hybridcompute/v20210520/_inputs.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/hybridcompute/v20210520/_inputs.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/hybridcompute/v20210520/_inputs.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
39.645511
292
0.664949
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from ._enums import * __all__ = [ 'HybridComputePrivateLinkScopePropertiesArgs', 'IdentityArgs', 'LocationDataArgs', 'MachineExtensionInstanceViewStatusAr...
true
true
1c141d6bdb7c86462187eaa1c5d019b6593b8894
1,884
py
Python
models/rank/logistic_regression/net.py
ziyoujiyi/PaddleRec
bcddcf46e5cd8d4e6b2c5ee8d0d5521e292a2a81
[ "Apache-2.0" ]
2,739
2020-04-28T05:12:48.000Z
2022-03-31T16:01:49.000Z
models/rank/logistic_regression/net.py
jiangcongxu/PaddleRec
9a107c56af2d1ee282975bcc8edb1ad5fb7e7973
[ "Apache-2.0" ]
205
2020-05-14T13:29:14.000Z
2022-03-31T13:01:50.000Z
models/rank/logistic_regression/net.py
jiangcongxu/PaddleRec
9a107c56af2d1ee282975bcc8edb1ad5fb7e7973
[ "Apache-2.0" ]
545
2020-05-14T13:19:13.000Z
2022-03-24T07:53:05.000Z
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
38.44898
77
0.677282
import paddle import paddle.nn as nn import paddle.nn.functional as F class LRLayer(nn.Layer): def __init__(self, sparse_feature_number, init_value, reg, num_field): super(LRLayer, self).__init__() self.sparse_feature_number = sparse_feature_number self.init_value_ = init_value se...
true
true
1c141dba148f9608a349198b3a974b49b00ba267
27,531
py
Python
model/spectral.py
SITDIO/auto_attribute_tree
d93bfc597b119c156322c34076bac4a5cee10a86
[ "BSD-3-Clause" ]
null
null
null
model/spectral.py
SITDIO/auto_attribute_tree
d93bfc597b119c156322c34076bac4a5cee10a86
[ "BSD-3-Clause" ]
null
null
null
model/spectral.py
SITDIO/auto_attribute_tree
d93bfc597b119c156322c34076bac4a5cee10a86
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Based on implementations by: # Gael Varoquaux gael.varoquaux@normalesup.org # Brian Cheung # Wei LI <kuantkid@gmail.com>""" import warnings import numpy as np from sklearn.base import BaseEstimator, ClusterMixin from sklearn.utils import check_random_state, as_float_a...
47.061538
92
0.641495
import warnings import numpy as np from sklearn.base import BaseEstimator, ClusterMixin from sklearn.utils import check_random_state, as_float_array from sklearn.utils.validation import _deprecate_positional_args from sklearn.utils.deprecation import deprecated from sklearn.metrics.pairwise import pairwise_kernels fr...
true
true
1c141ec42b66a231a833a43dd4fc2179793ca5dc
6,750
py
Python
test/python/transpiler/test_collect_2q_blocks.py
Roshan-Thomas/qiskit-terra
77219b5c7b7146b1545c5e5190739b36f4064b2f
[ "Apache-2.0" ]
1,599
2018-07-10T10:59:12.000Z
2022-03-31T23:56:25.000Z
test/python/transpiler/test_collect_2q_blocks.py
Roshan-Thomas/qiskit-terra
77219b5c7b7146b1545c5e5190739b36f4064b2f
[ "Apache-2.0" ]
5,244
2018-07-10T06:20:13.000Z
2022-03-31T22:18:48.000Z
test/python/transpiler/test_collect_2q_blocks.py
Roshan-Thomas/qiskit-terra
77219b5c7b7146b1545c5e5190739b36f4064b2f
[ "Apache-2.0" ]
1,409
2018-07-10T02:16:12.000Z
2022-03-31T09:01:32.000Z
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
35.340314
100
0.510519
import unittest from math import pi from ddt import ddt, data, unpack from qiskit.circuit import Gate, QuantumCircuit from qiskit.circuit import QuantumRegister, ClassicalRegister from qiskit.converters import circuit_to_dag from qiskit.transpiler import PassManager from qiskit.transpiler.passes import Collect2qBlo...
true
true
1c141f4b34cad89115ec631e01510eb9fad217d3
16,264
py
Python
tests/core/v5_1/test_session.py
pipermerriam/ddht
7e0b66ac96591a590e40c7e15d880af01e1f1a36
[ "MIT" ]
2
2021-06-20T19:47:22.000Z
2021-07-04T17:16:29.000Z
tests/core/v5_1/test_session.py
pipermerriam/ddht
7e0b66ac96591a590e40c7e15d880af01e1f1a36
[ "MIT" ]
null
null
null
tests/core/v5_1/test_session.py
pipermerriam/ddht
7e0b66ac96591a590e40c7e15d880af01e1f1a36
[ "MIT" ]
null
null
null
import secrets from eth_utils import int_to_big_endian import pytest from rlp.exceptions import DecodingError, DeserializationError from rlp.sedes import big_endian_int import trio from ddht.base_message import BaseMessage from ddht.tools.factories.v5_1 import PacketFactory from ddht.v5_1.messages import PingMessage ...
36.879819
97
0.698352
import secrets from eth_utils import int_to_big_endian import pytest from rlp.exceptions import DecodingError, DeserializationError from rlp.sedes import big_endian_int import trio from ddht.base_message import BaseMessage from ddht.tools.factories.v5_1 import PacketFactory from ddht.v5_1.messages import PingMessage ...
true
true
1c141fd3d031d13b7159c68636d2381c94f65e93
979
py
Python
app.py
Nadriana100/Web_Scraping
bda186ef885f2bcf7b97a75efce92b636e079718
[ "ADSL" ]
null
null
null
app.py
Nadriana100/Web_Scraping
bda186ef885f2bcf7b97a75efce92b636e079718
[ "ADSL" ]
null
null
null
app.py
Nadriana100/Web_Scraping
bda186ef885f2bcf7b97a75efce92b636e079718
[ "ADSL" ]
null
null
null
# import necessary libraries from flask import Flask, render_template, redirect, url_for from flask_pymongo import PyMongo import scrape_mars app = Flask(__name__) #flask pymongo to set up the connection to de data base app.config["MONGO_URI"] = "mongodb://localhost:27017/mars_data_db" mongo = PyMongo(app) @app.ro...
24.475
66
0.715015
from flask import Flask, render_template, redirect, url_for from flask_pymongo import PyMongo import scrape_mars app = Flask(__name__) app.config["MONGO_URI"] = "mongodb://localhost:27017/mars_data_db" mongo = PyMongo(app) @app.route("/") def index(): mars_data = mongo.db.marsData.find_one() return ...
true
true
1c141feb3fb3973ce233fe88f126f52d25950759
2,980
py
Python
user_followed_topics_client.py
Adoni/ZhihuCrawler
c275192ced3a344d7b93b7cfd3ebf87ed179400d
[ "MIT" ]
null
null
null
user_followed_topics_client.py
Adoni/ZhihuCrawler
c275192ced3a344d7b93b7cfd3ebf87ed179400d
[ "MIT" ]
null
null
null
user_followed_topics_client.py
Adoni/ZhihuCrawler
c275192ced3a344d7b93b7cfd3ebf87ed179400d
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, print_function from RedisQueue import RedisQueue from zhihu_oauth import ZhihuClient import datetime import time import random import sys from timeout import timeout import os from utils import print_err MAX_SLEEP_TIME = 15 Cookies_File = './cookies/cookies%s.json' % sys.argv[1...
32.391304
75
0.586242
from __future__ import unicode_literals, print_function from RedisQueue import RedisQueue from zhihu_oauth import ZhihuClient import datetime import time import random import sys from timeout import timeout import os from utils import print_err MAX_SLEEP_TIME = 15 Cookies_File = './cookies/cookies%s.json' % sys.argv[1...
true
true
1c141ffd356e535e6a2d5ab6f4107ddca75ade59
2,493
py
Python
otcclient/plugins/ims.py
BuloZB/python-otcclient
d86a0cdf55b922e82974237b83d67b41cc89177b
[ "MIT" ]
null
null
null
otcclient/plugins/ims.py
BuloZB/python-otcclient
d86a0cdf55b922e82974237b83d67b41cc89177b
[ "MIT" ]
null
null
null
otcclient/plugins/ims.py
BuloZB/python-otcclient
d86a0cdf55b922e82974237b83d67b41cc89177b
[ "MIT" ]
1
2016-07-20T14:23:18.000Z
2016-07-20T14:23:18.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of OTC Tool released under MIT license. # Copyright (C) 2016 T-systems Kurt Garloff, Zsolt Nagy from otcclient.core.OtcConfig import OtcConfig from otcclient.utils import utils_http from otcclient.core.otcpluginbase import otcpluginbase from otcclie...
34.150685
486
0.606498
from otcclient.core.OtcConfig import OtcConfig from otcclient.utils import utils_http from otcclient.core.otcpluginbase import otcpluginbase from otcclient.core.pluginmanager import getplugin import json from otcclient.plugins.ecs import ecs class ims(otcpluginbase): ar = {} @staticmethod ...
true
true
1c1420060ee1021248acaba9f95c56e966930807
4,727
py
Python
aiolaunchpad.py
hoh/aiolaunchpad
045c7f7f6638925f104455bb1dfcaea573f82112
[ "Apache-2.0" ]
2
2017-07-20T21:12:08.000Z
2020-12-08T23:43:03.000Z
aiolaunchpad.py
hoh/aiolaunchpad
045c7f7f6638925f104455bb1dfcaea573f82112
[ "Apache-2.0" ]
null
null
null
aiolaunchpad.py
hoh/aiolaunchpad
045c7f7f6638925f104455bb1dfcaea573f82112
[ "Apache-2.0" ]
1
2019-07-24T09:54:22.000Z
2019-07-24T09:54:22.000Z
""" AioLaunchpad is an Asyncio based framework to read and control the Novation Launch MIDI controllers. """ import re import asyncio import aiofiles # LEDs and inputs do not always have the same id mapping on the # Launch Control XL MK2 (LCXL2). These numbers correspond to the # User Template mode: LCXL2_MAPPING = {...
25.972527
74
0.549609
import re import asyncio import aiofiles LCXL2_MAPPING = { 'lights': { 'knob': [13, 29, 45, 61, 77, 93, 109, 125, 14, 30, 46, 62, 78, 94, 110, 126, 15, 31, 47, 63, 79, 95, 111, 127], 'button': [41, 42, 43, 44, 57, 58, 59, 60, 73, 74, 75, ...
true
true
1c142098286d1d44e4fee279f5654dc1dbc050e2
37
py
Python
app/views/user/__init__.py
abhijeetsonawane001/crud_app
829e6bcb5904722916eaa52357a07bf8e5af43dc
[ "MIT" ]
null
null
null
app/views/user/__init__.py
abhijeetsonawane001/crud_app
829e6bcb5904722916eaa52357a07bf8e5af43dc
[ "MIT" ]
null
null
null
app/views/user/__init__.py
abhijeetsonawane001/crud_app
829e6bcb5904722916eaa52357a07bf8e5af43dc
[ "MIT" ]
null
null
null
from .routes import user # noqa 401
18.5
36
0.72973
from .routes import user
true
true
1c1421898070b2726808f70a7f2a3acc0a6b0961
689
py
Python
kaa/temp/cut_strat.py
Tarheel-Formal-Methods/kaa-optimize
35fe7b580df3b5efe7de9314b821c257f68d74bf
[ "MIT" ]
null
null
null
kaa/temp/cut_strat.py
Tarheel-Formal-Methods/kaa-optimize
35fe7b580df3b5efe7de9314b821c257f68d74bf
[ "MIT" ]
2
2020-12-11T17:34:46.000Z
2020-12-11T21:43:13.000Z
kaa/temp/cut_strat.py
Tarheel-Formal-Methods/kaa-optimize
35fe7b580df3b5efe7de9314b821c257f68d74bf
[ "MIT" ]
1
2020-12-11T17:31:16.000Z
2020-12-11T17:31:16.000Z
from kaa.templates import TempStrategy """ Strategy which removes the non-trivial templates from SIR specifically. Mostly created as a sanity test to visualize how dynamic template modification would affect the reachable set. """ class CutStrat(TempStrategy): def __init__(self, model): super().__init__(m...
24.607143
91
0.654572
from kaa.templates import TempStrategy class CutStrat(TempStrategy): def __init__(self, model): super().__init__(model) self.dim = len(self.model.vars) self.counter = 0 def open_strat(self, bund): if self.counter == 100: bund.remove_temp([1,2]) bund.r...
true
true
1c1422339d998d9412f325aaa54c7416211a6b82
1,808
py
Python
problems/EE/auto/problem60_EE.py
sunandita/ICAPS_Summer_School_RAE_2020
a496b62185bcfdd2c76eb7986ae99cfa85708d28
[ "BSD-3-Clause" ]
5
2020-10-15T14:40:03.000Z
2021-08-20T17:45:41.000Z
problems/EE/auto/problem60_EE.py
sunandita/ICAPS_Summer_School_RAE_2020
a496b62185bcfdd2c76eb7986ae99cfa85708d28
[ "BSD-3-Clause" ]
null
null
null
problems/EE/auto/problem60_EE.py
sunandita/ICAPS_Summer_School_RAE_2020
a496b62185bcfdd2c76eb7986ae99cfa85708d28
[ "BSD-3-Clause" ]
2
2020-10-15T07:06:14.000Z
2020-10-15T17:33:01.000Z
__author__ = 'patras' from domain_exploreEnv import * from timer import DURATION from state import state, rv DURATION.TIME = { 'survey': 5, 'monitor': 5, 'screen': 5, 'sample': 5, 'process': 5, 'fly': 3, 'deposit': 1, 'transferData': 1, 'take': 2, 'put': 2, 'move': 10, '...
30.644068
247
0.481748
__author__ = 'patras' from domain_exploreEnv import * from timer import DURATION from state import state, rv DURATION.TIME = { 'survey': 5, 'monitor': 5, 'screen': 5, 'sample': 5, 'process': 5, 'fly': 3, 'deposit': 1, 'transferData': 1, 'take': 2, 'put': 2, 'move': 10, '...
true
true
1c1422b96f64bfc8245b5fc48400095f9c88c355
6,420
py
Python
tests/unit/orchestrate/flow/flow-construct/test_flow_yaml_parser.py
Ruchip16/jina
24c38a5c330453fb3ebd95f4f4f977b501b21240
[ "Apache-2.0" ]
1
2022-02-09T14:14:06.000Z
2022-02-09T14:14:06.000Z
tests/unit/orchestrate/flow/flow-construct/test_flow_yaml_parser.py
Ruchip16/jina
24c38a5c330453fb3ebd95f4f4f977b501b21240
[ "Apache-2.0" ]
null
null
null
tests/unit/orchestrate/flow/flow-construct/test_flow_yaml_parser.py
Ruchip16/jina
24c38a5c330453fb3ebd95f4f4f977b501b21240
[ "Apache-2.0" ]
null
null
null
import os from pathlib import Path import numpy as np import pytest from jina import Executor from jina.excepts import BadYAMLVersion from jina import Flow from jina.jaml import JAML from jina.enums import GatewayProtocolType from jina.jaml.parsers import get_supported_versions from jina.parsers.flow import set_flow_...
31.470588
85
0.669626
import os from pathlib import Path import numpy as np import pytest from jina import Executor from jina.excepts import BadYAMLVersion from jina import Flow from jina.jaml import JAML from jina.enums import GatewayProtocolType from jina.jaml.parsers import get_supported_versions from jina.parsers.flow import set_flow_...
true
true
1c142338986d82f62c98f3660a2bede8c098969c
5,601
py
Python
api/migrations/0001_initial.py
saber-nyan/gchan
fe92828a10fa8f8662b7bf525509cfa7608b0161
[ "Apache-2.0" ]
2
2019-04-18T02:50:03.000Z
2019-06-14T11:07:21.000Z
api/migrations/0001_initial.py
saber-nyan/gchan
fe92828a10fa8f8662b7bf525509cfa7608b0161
[ "Apache-2.0" ]
null
null
null
api/migrations/0001_initial.py
saber-nyan/gchan
fe92828a10fa8f8662b7bf525509cfa7608b0161
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.1.7 on 2019-04-11 21:44 import api.models from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( ...
54.911765
176
0.592751
import api.models from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Board', fields=[ ...
true
true
1c1423b3067ace100e1467074cf0dbb44c0bf3c2
1,515
py
Python
onlinecoach/qa/models.py
sq2021/online-coach
d5d8acacdf21e8ce3dcd01d67f9fb8c9ffca371d
[ "MIT" ]
null
null
null
onlinecoach/qa/models.py
sq2021/online-coach
d5d8acacdf21e8ce3dcd01d67f9fb8c9ffca371d
[ "MIT" ]
8
2019-12-04T23:02:42.000Z
2022-02-10T11:45:46.000Z
onlinecoach/qa/models.py
sq2021/online-coach
d5d8acacdf21e8ce3dcd01d67f9fb8c9ffca371d
[ "MIT" ]
null
null
null
from django.shortcuts import reverse from django.db import models from django.contrib.auth.models import User from tinymce.models import HTMLField from datetime import datetime SPORT_CHOICES = [ ('fo', 'Footbal'), ('ba', 'Basketball'), ('ic', 'Ice Hockey'), ('bs', 'Baseball'), ('ma', 'Martial Arts'...
30.3
75
0.666007
from django.shortcuts import reverse from django.db import models from django.contrib.auth.models import User from tinymce.models import HTMLField from datetime import datetime SPORT_CHOICES = [ ('fo', 'Footbal'), ('ba', 'Basketball'), ('ic', 'Ice Hockey'), ('bs', 'Baseball'), ('ma', 'Martial Arts'...
true
true
1c142463c7a5f3263fb77e3c624f4bc5efccc55c
8,464
py
Python
bird.py
cuzhappy/Flappy-Bird-AI
e735bc55f617f313dcd9d92b472eb9732e0c55bc
[ "MIT" ]
1
2021-03-18T19:00:40.000Z
2021-03-18T19:00:40.000Z
bird.py
cuzhappy/Flappy-Bird-AI
e735bc55f617f313dcd9d92b472eb9732e0c55bc
[ "MIT" ]
null
null
null
bird.py
cuzhappy/Flappy-Bird-AI
e735bc55f617f313dcd9d92b472eb9732e0c55bc
[ "MIT" ]
null
null
null
import pygame import neat import time import random import os pygame.font.init() #Window size WIN_WIDTH = 288 WIN_HEIGHT = 512 GEN = 0 #Load images BIRD_IMGS = [(pygame.image.load(os.path.join('imgs', 'bird1.png'))), (pygame.image.load(os.path.join('imgs', 'bird2.png'))), (pygame.image.load(os.path.joi...
27.480519
181
0.480742
import pygame import neat import time import random import os pygame.font.init() WIN_WIDTH = 288 WIN_HEIGHT = 512 GEN = 0 BIRD_IMGS = [(pygame.image.load(os.path.join('imgs', 'bird1.png'))), (pygame.image.load(os.path.join('imgs', 'bird2.png'))), (pygame.image.load(os.path.join('imgs', 'bird3.png')))] P...
true
true
1c142524d979a3c412400be7b960536980311ac8
13,358
py
Python
api/azimuth/provider/openstack/api/core.py
stackhpc/azimuth
be0ded7df3cb0c0381de302add0c386205533ac3
[ "BSD-3-Clause" ]
2
2022-01-14T14:45:18.000Z
2022-02-05T17:35:58.000Z
api/azimuth/provider/openstack/api/core.py
stackhpc/azimuth
be0ded7df3cb0c0381de302add0c386205533ac3
[ "BSD-3-Clause" ]
3
2022-02-11T18:41:01.000Z
2022-02-21T18:00:20.000Z
api/azimuth/provider/openstack/api/core.py
stackhpc/azimuth
be0ded7df3cb0c0381de302add0c386205533ac3
[ "BSD-3-Clause" ]
1
2021-12-02T13:22:09.000Z
2021-12-02T13:22:09.000Z
""" Module containing helpers for interacting with the OpenStack API. """ import json import logging import os from urllib.parse import urlsplit import requests import rackit logger = logging.getLogger(__name__) class AuthParams: """ Builder object for setting authentication parameters. """ def _...
33.817722
94
0.605555
import json import logging import os from urllib.parse import urlsplit import requests import rackit logger = logging.getLogger(__name__) class AuthParams: def __init__(self, params = None): self.params = params or dict() def use_token(self, token): params = self.params.copy() pa...
true
true
1c142604c4307bfa980403e8022f0eae59d0558a
1,102
py
Python
app/tool4key.py
wulihtc/SmartTodo
822f044c39623138fc75d43e4066d1312522ecd2
[ "MIT" ]
null
null
null
app/tool4key.py
wulihtc/SmartTodo
822f044c39623138fc75d43e4066d1312522ecd2
[ "MIT" ]
5
2020-12-21T03:02:31.000Z
2021-10-05T06:45:34.000Z
app/tool4key.py
wulihtc/SmartTodo
822f044c39623138fc75d43e4066d1312522ecd2
[ "MIT" ]
1
2021-09-17T08:56:10.000Z
2021-09-17T08:56:10.000Z
from entity import Item from tool4time import get_timestamp_from_str, is_work_time, now_stamp, get_datetime_from_str, now def todo_item_key(item: Item): value = get_timestamp_from_str(item.create_time) day_second = 60 * 60 * 24 if item.work: # ๅฆ‚ๆžœๅค„ไบŽๅทฅไฝœๆ—ถ้—ดๆฎต, ๅˆ™็›ธๅบ”ๆ—ถ้—ดๆฎต็š„ไปปๅŠก็›ธๅฝ“ไบŽ30ๅคฉๅŽๆไบค็š„ไปปๅŠก # ๅฆๅˆ™็›ธๅฝ“ไบŽ30ๅคฉไปฅๅ‰ๆ...
30.611111
97
0.651543
from entity import Item from tool4time import get_timestamp_from_str, is_work_time, now_stamp, get_datetime_from_str, now def todo_item_key(item: Item): value = get_timestamp_from_str(item.create_time) day_second = 60 * 60 * 24 if item.work: if is_work_time(): value = v...
true
true
1c14261b17bd50b7e89d3b33f047b851fd0454f4
14,690
py
Python
test/functional/p2p_unrequested_blocks.py
hypothesize-coin/hypothesize
e69e0f2a45ec957783b6c58bebf4028e17c8e7d8
[ "MIT" ]
null
null
null
test/functional/p2p_unrequested_blocks.py
hypothesize-coin/hypothesize
e69e0f2a45ec957783b6c58bebf4028e17c8e7d8
[ "MIT" ]
null
null
null
test/functional/p2p_unrequested_blocks.py
hypothesize-coin/hypothesize
e69e0f2a45ec957783b6c58bebf4028e17c8e7d8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test processing of unrequested blocks. Setup: two nodes, node0+node1, not connected to each other. Nod...
43.982036
113
0.67563
from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * import time from test_framework.blocktools import create_block, create_coinbase, create_transaction class AcceptBlockTest(BitcoinTestFramework): def add_options(self, parser): ...
true
true
1c14262435c7b2aac7b61e0e2bfa7b334b6062f6
6,072
py
Python
tracardi/process_engine/import/mysql_importer.py
Tracardi/tracardi
1505c38e43e6e69595212d2a3f6917edc5841390
[ "MIT" ]
153
2021-11-02T00:35:41.000Z
2022-03-25T16:37:44.000Z
tracardi/process_engine/import/mysql_importer.py
Tracardi/tracardi
1505c38e43e6e69595212d2a3f6917edc5841390
[ "MIT" ]
243
2021-10-17T17:00:22.000Z
2022-03-28T10:13:34.000Z
tracardi/process_engine/import/mysql_importer.py
Tracardi/tracardi
1505c38e43e6e69595212d2a3f6917edc5841390
[ "MIT" ]
14
2021-10-17T11:39:04.000Z
2022-03-14T14:44:02.000Z
import asyncio import re from concurrent.futures import ThreadPoolExecutor from datetime import datetime from typing import Tuple from uuid import uuid4 import aiomysql from tracardi.domain.import_config import ImportConfig from tracardi.domain.task import Task from .importer import Importer from pydantic import Base...
36.578313
130
0.595191
import asyncio import re from concurrent.futures import ThreadPoolExecutor from datetime import datetime from typing import Tuple from uuid import uuid4 import aiomysql from tracardi.domain.import_config import ImportConfig from tracardi.domain.task import Task from .importer import Importer from pydantic import Base...
true
true
1c14277616f1ccde82828d96cc5afa784b451a32
4,189
py
Python
tensorflow/data_utils.py
yyht/Funnel_Transformer
4b35a794d5e122a8054471863a52d4eac1c39dcd
[ "MIT" ]
193
2020-06-08T00:44:51.000Z
2022-03-24T21:35:39.000Z
tensorflow/data_utils.py
yyht/Funnel_Transformer
4b35a794d5e122a8054471863a52d4eac1c39dcd
[ "MIT" ]
12
2020-06-11T22:47:53.000Z
2022-03-05T13:31:25.000Z
tensorflow/data_utils.py
yyht/Funnel_Transformer
4b35a794d5e122a8054471863a52d4eac1c39dcd
[ "MIT" ]
15
2020-06-08T13:47:29.000Z
2022-02-02T15:50:15.000Z
"""Common data utils.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections from absl import flags import absl.logging as _logging import numpy as np import tensorflow.compat.v1 as tf flags.DEFINE_integer("vocab_size", default=None, help=...
29.293706
76
0.669133
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections from absl import flags import absl.logging as _logging import numpy as np import tensorflow.compat.v1 as tf flags.DEFINE_integer("vocab_size", default=None, help="") flags.DEFINE_integer(...
true
true
1c1427ee0875d14a5434a9362980a13c76216ebe
393
py
Python
multiple_choice/migrations/0003_rename_slide_multiplechoice_annotated_slide.py
AICAN-Research/learn-pathology
663f9c5f125857badf5bb41b6bfa2d9100578e2e
[ "MIT" ]
2
2021-09-16T08:38:10.000Z
2021-09-16T10:46:53.000Z
multiple_choice/migrations/0003_rename_slide_multiplechoice_annotated_slide.py
AICAN-Research/learn-pathology
663f9c5f125857badf5bb41b6bfa2d9100578e2e
[ "MIT" ]
6
2021-09-20T10:56:21.000Z
2022-01-05T08:25:17.000Z
multiple_choice/migrations/0003_rename_slide_multiplechoice_annotated_slide.py
AICAN-Research/learn-pathology
663f9c5f125857badf5bb41b6bfa2d9100578e2e
[ "MIT" ]
null
null
null
# Generated by Django 3.2 on 2021-09-01 09:14 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('multiple_choice', '0002_alter_multiplechoice_slide'), ] operations = [ migrations.RenameField( model_name='multiplechoice', ol...
20.684211
63
0.618321
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('multiple_choice', '0002_alter_multiplechoice_slide'), ] operations = [ migrations.RenameField( model_name='multiplechoice', old_name='slide', new_name='annotate...
true
true
1c142934adf258cfc115896ac563540230b14346
156
py
Python
apps/utils/__init__.py
yormng/ndzz
55901283849c1b9e85a0fca1d9f33cb30c1588df
[ "Apache-2.0" ]
null
null
null
apps/utils/__init__.py
yormng/ndzz
55901283849c1b9e85a0fca1d9f33cb30c1588df
[ "Apache-2.0" ]
null
null
null
apps/utils/__init__.py
yormng/ndzz
55901283849c1b9e85a0fca1d9f33cb30c1588df
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2020/4/5 14:35 # @Author : Yormng # @Site : # @File : __init__.py.py # @Software: PyCharm
22.285714
27
0.551282
true
true
1c1429746410f694056b51657067fd0239ceae80
23,915
py
Python
DetectChars.py
abhinandansharma/number-plate-recognition
e31a1bfb5b7d92199829cb30b281d37f2b4552bb
[ "MIT" ]
null
null
null
DetectChars.py
abhinandansharma/number-plate-recognition
e31a1bfb5b7d92199829cb30b281d37f2b4552bb
[ "MIT" ]
null
null
null
DetectChars.py
abhinandansharma/number-plate-recognition
e31a1bfb5b7d92199829cb30b281d37f2b4552bb
[ "MIT" ]
null
null
null
# DetectChars.py import os import cv2 import numpy as np import math import random import Main import Preprocess import PossibleChar # module level variables ########################################################################## kNearest = cv2.ml.KNearest_create() # constants for checkIfPossibleChar, t...
54.600457
182
0.585908
import os import cv2 import numpy as np import math import random import Main import Preprocess import PossibleChar kNearest = cv2.ml.KNearest_create() MIN_PIXEL_WIDTH = 2 MIN_PIXEL_HEIGHT = 8 MIN_ASPECT_RATIO = 0.25 MAX_ASPECT_RATIO = 1.0 MIN_PIXEL_AREA = 80 MIN_DIAG_SIZE_MULTIPLE_AWAY = 0.3 MA...
true
true
1c1429753fb5264f6331b2f10a97c9fadd49cff7
4,212
py
Python
base_agent/argument_parser.py
Dhiraj100892/droidlet
e4ea578672531524552b6ff021165fc9371b0ec8
[ "MIT" ]
null
null
null
base_agent/argument_parser.py
Dhiraj100892/droidlet
e4ea578672531524552b6ff021165fc9371b0ec8
[ "MIT" ]
null
null
null
base_agent/argument_parser.py
Dhiraj100892/droidlet
e4ea578672531524552b6ff021165fc9371b0ec8
[ "MIT" ]
null
null
null
""" Copyright (c) Facebook, Inc. and its affiliates. """ import argparse import os class ArgumentParser: def __init__(self, agent_type, base_path): self.agent_parsers = {"Minecraft": self.add_mc_parser, "Locobot": self.add_loco_parser} self.base_path = base_path self.parser = argparse.Argu...
36.626087
111
0.60019
import argparse import os class ArgumentParser: def __init__(self, agent_type, base_path): self.agent_parsers = {"Minecraft": self.add_mc_parser, "Locobot": self.add_loco_parser} self.base_path = base_path self.parser = argparse.ArgumentParser() self.add_nsp_parser() ...
true
true
1c1429b5877450ad12f128fdb2fd7312de3c320f
860
py
Python
materials/sp20/lab/lab05/tests/q13.py
ds-modules/Deepnote-demo
548c12ced6cae774ecd0036aa1e8bb833af6472c
[ "BSD-3-Clause" ]
null
null
null
materials/sp20/lab/lab05/tests/q13.py
ds-modules/Deepnote-demo
548c12ced6cae774ecd0036aa1e8bb833af6472c
[ "BSD-3-Clause" ]
null
null
null
materials/sp20/lab/lab05/tests/q13.py
ds-modules/Deepnote-demo
548c12ced6cae774ecd0036aa1e8bb833af6472c
[ "BSD-3-Clause" ]
null
null
null
test = { 'name': 'q13', 'points': 1, 'suites': [ { 'cases': [ { 'code': r""" >>> nacho_reaction('salsa') 'Spicy!' """, 'hidden': False, 'locked': False }, { 'code': r""" >>> nacho_reaction('cheese') ...
18.297872
39
0.309302
test = { 'name': 'q13', 'points': 1, 'suites': [ { 'cases': [ { 'code': r""" >>> nacho_reaction('salsa') 'Spicy!' """, 'hidden': False, 'locked': False }, { 'code': r""" >>> nacho_reaction('cheese') ...
true
true
1c1429d64d2fcbcaa73faf46bd601ba1dc76cad6
839
py
Python
preOrderItretive2.py
kodreanuja/python
b894af6d4d94b2a8bd160703be5e8d7ab1029015
[ "MIT" ]
null
null
null
preOrderItretive2.py
kodreanuja/python
b894af6d4d94b2a8bd160703be5e8d7ab1029015
[ "MIT" ]
null
null
null
preOrderItretive2.py
kodreanuja/python
b894af6d4d94b2a8bd160703be5e8d7ab1029015
[ "MIT" ]
null
null
null
class Node: def __init__(self, data) -> None: self.left = None self.right = None self.data = data def preOrder2(root): if (root == None): return[] s = [] current = root while (len(s) or current != None): while (current != None): ...
20.975
43
0.474374
class Node: def __init__(self, data) -> None: self.left = None self.right = None self.data = data def preOrder2(root): if (root == None): return[] s = [] current = root while (len(s) or current != None): while (current != None): ...
true
true
1c142c9b72762dd7557aa95aecc6801298c10b3f
4,759
py
Python
sdk/python/pulumi_azure_nextgen/storage/v20200801preview/get_queue.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/storage/v20200801preview/get_queue.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/storage/v20200801preview/get_queue.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
40.675214
307
0.678714
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = [ 'GetQueueResult', 'AwaitableGetQueueResult', 'get_queue', ] @pulumi.output_type class GetQueueResult: def __init__(__self__, approximate_messa...
true
true
1c142cb9ed6b6dbaec5c638aa89f60985d8f08e0
1,943
py
Python
startup/23-attenuator_crl_99.py
NSLS-II-FMX/profile_collection
8c1e977f7b0b0972c5e9a4a1c042a60933b234ef
[ "BSD-3-Clause" ]
1
2018-02-18T14:50:59.000Z
2018-02-18T14:50:59.000Z
startup/23-attenuator_crl_99.py
NSLS-II-FMX/profile_collection
8c1e977f7b0b0972c5e9a4a1c042a60933b234ef
[ "BSD-3-Clause" ]
11
2017-05-09T15:44:42.000Z
2021-07-26T17:46:42.000Z
startup/23-attenuator_crl_99.py
NSLS-II-FMX/profile_collection
8c1e977f7b0b0972c5e9a4a1c042a60933b234ef
[ "BSD-3-Clause" ]
1
2017-05-09T15:40:08.000Z
2017-05-09T15:40:08.000Z
class RISlider(Device): mv_in = Cpt(EpicsSignal, 'Cmd:In-Cmd') mv_out = Cpt(EpicsSignal, 'Cmd:Out-Cmd') status = Cpt(EpicsSignalRO, 'Pos-Sts') # status: 0 (Not In), 1 (In) class AttenuatorRI(Device): f1 = Cpt(RISlider, '01}') f2 = Cpt(RISlider, '02}') f3 = Cpt(RISlider, '03}') f4 = Cpt...
34.087719
72
0.514153
class RISlider(Device): mv_in = Cpt(EpicsSignal, 'Cmd:In-Cmd') mv_out = Cpt(EpicsSignal, 'Cmd:Out-Cmd') status = Cpt(EpicsSignalRO, 'Pos-Sts') class AttenuatorRI(Device): f1 = Cpt(RISlider, '01}') f2 = Cpt(RISlider, '02}') f3 = Cpt(RISlider, '03}') f4 = Cpt(RISlider, '04}') f5 = Cp...
true
true
1c142cd65f3f805960c321a124dd3ec3837262a0
402
py
Python
WEEKS/CD_Sata-Structures/_RESOURCES/python-prac/Overflow/Beginners-Python-Examples-master/max_int_in_list.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
5
2021-06-02T23:44:25.000Z
2021-12-27T16:21:57.000Z
WEEKS/CD_Sata-Structures/_RESOURCES/python-prac/Overflow/Beginners-Python-Examples-master/max_int_in_list.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
22
2021-05-31T01:33:25.000Z
2021-10-18T18:32:39.000Z
WEEKS/CD_Sata-Structures/_RESOURCES/python-prac/Overflow/Beginners-Python-Examples-master/max_int_in_list.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
3
2021-06-19T03:37:47.000Z
2021-08-31T00:49:51.000Z
def compare(li): res = 0 for i in range(len(li) - 1): a = li[i] b = li[i + 1] if (a > b): if (a > res): res = a else: if (b > res): res = b return res def convert(): get_input = raw_input("Enter Space Seperated Numbers : ") raw = get_input.split() nums = [] for i in raw: nums.appe...
16.75
58
0.562189
def compare(li): res = 0 for i in range(len(li) - 1): a = li[i] b = li[i + 1] if (a > b): if (a > res): res = a else: if (b > res): res = b return res def convert(): get_input = raw_input("Enter Space Seperated Numbers : ") raw = get_input.split() nums = [] for i in raw: nums.appe...
false
true
1c142cf9cbd862bd09d3364144bd657eef82bebb
4,299
py
Python
src/tests/sources/test_structured_data_source.py
zaxmks/demo-data-compliance-service
372e612c570aaf5b512bec17627f825e880add67
[ "CNRI-Python", "CECILL-B" ]
null
null
null
src/tests/sources/test_structured_data_source.py
zaxmks/demo-data-compliance-service
372e612c570aaf5b512bec17627f825e880add67
[ "CNRI-Python", "CECILL-B" ]
null
null
null
src/tests/sources/test_structured_data_source.py
zaxmks/demo-data-compliance-service
372e612c570aaf5b512bec17627f825e880add67
[ "CNRI-Python", "CECILL-B" ]
null
null
null
import pytest import pandas as pd from src.mapping.columns.column_relation import ColumnRelation from src.mapping.rows.row_mapping_configuration import RowMappingConfiguration from src.mapping.rows.row_relation import RowRelation from src.mapping.values.value_matching_configuration import ValueMatchingConfiguration f...
34.392
87
0.739242
import pytest import pandas as pd from src.mapping.columns.column_relation import ColumnRelation from src.mapping.rows.row_mapping_configuration import RowMappingConfiguration from src.mapping.rows.row_relation import RowRelation from src.mapping.values.value_matching_configuration import ValueMatchingConfiguration f...
true
true
1c142d257cfbeeab875a7695903fbf23d5e78fe0
13,426
py
Python
python/ray/util/sgd/torch/examples/image_models/args.py
yuanchi2807/ray
cf512254bb4bcd71ff1818dff5c868ab10c5f620
[ "Apache-2.0" ]
1
2021-09-20T15:45:59.000Z
2021-09-20T15:45:59.000Z
python/ray/util/sgd/torch/examples/image_models/args.py
yuanchi2807/ray
cf512254bb4bcd71ff1818dff5c868ab10c5f620
[ "Apache-2.0" ]
53
2021-10-06T20:08:04.000Z
2022-03-21T20:17:25.000Z
python/ray/util/sgd/torch/examples/image_models/args.py
yuanchi2807/ray
cf512254bb4bcd71ff1818dff5c868ab10c5f620
[ "Apache-2.0" ]
null
null
null
# Modified by Maksim Smolin in 2020 # # Original work by Ross Wightman as part of the timm package # (see LICENSE_THIRDPARTY) # Note: other authors MUST include themselves in the above copyright notice # in order to abide by the terms of the Apache license import logging import argparse import yaml config_pars...
24.278481
88
0.642038
import logging import argparse import yaml config_parser = parser = argparse.ArgumentParser( description="Training Config", add_help=False ) parser.add_argument( "-c", "--config", default="", type=str, metavar="FILE", help="YAML config file specifying default arguments", ) parser = argpa...
true
true
1c143038182673796e768fdf37c7d8fecb9d8f92
396
py
Python
src/apps/competitions/migrations/0009_phase_hide_output.py
binfeng1018/competitions-v2
173ea6053b7eda5de3a9f1a687dfb0d43bfc4e9c
[ "Apache-2.0" ]
19
2018-07-27T19:14:10.000Z
2021-12-08T16:34:42.000Z
src/apps/competitions/migrations/0009_phase_hide_output.py
binfeng1018/competitions-v2
173ea6053b7eda5de3a9f1a687dfb0d43bfc4e9c
[ "Apache-2.0" ]
516
2017-07-27T15:45:43.000Z
2022-02-10T07:57:46.000Z
src/apps/competitions/migrations/0009_phase_hide_output.py
binfeng1018/competitions-v2
173ea6053b7eda5de3a9f1a687dfb0d43bfc4e9c
[ "Apache-2.0" ]
16
2018-01-01T19:07:01.000Z
2021-09-17T07:59:59.000Z
# Generated by Django 2.2.9 on 2020-02-07 19:04 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('competitions', '0008_auto_20200128_2236'), ] operations = [ migrations.AddField( model_name='phase', name='hide_outp...
20.842105
53
0.608586
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('competitions', '0008_auto_20200128_2236'), ] operations = [ migrations.AddField( model_name='phase', name='hide_output', field=models.BooleanField(defau...
true
true
1c1430a0a680d49d92ef26135ff4acf41fe692bb
569
py
Python
libs/constants.py
tianhai123/LabelImg
40ea8e7801dde05526260b8f3bdc698e396196db
[ "MIT" ]
null
null
null
libs/constants.py
tianhai123/LabelImg
40ea8e7801dde05526260b8f3bdc698e396196db
[ "MIT" ]
2
2021-03-31T19:35:16.000Z
2021-12-13T20:28:51.000Z
libs/constants.py
tianhai123/LabelImg
40ea8e7801dde05526260b8f3bdc698e396196db
[ "MIT" ]
1
2021-08-17T12:44:53.000Z
2021-08-17T12:44:53.000Z
SETTING_FILENAME = 'filename' SETTING_RECENT_FILES = 'recentFiles' SETTING_WIN_SIZE = 'window/size' SETTING_WIN_POSE = 'window/position' SETTING_WIN_GEOMETRY = 'window/geometry' SETTING_LINE_COLOR = 'line/color' SETTING_FILL_COLOR = 'fill/color' SETTING_ADVANCE_MODE = 'advanced' SETTING_WIN_STATE = 'window/state' SETTI...
31.611111
40
0.815466
SETTING_FILENAME = 'filename' SETTING_RECENT_FILES = 'recentFiles' SETTING_WIN_SIZE = 'window/size' SETTING_WIN_POSE = 'window/position' SETTING_WIN_GEOMETRY = 'window/geometry' SETTING_LINE_COLOR = 'line/color' SETTING_FILL_COLOR = 'fill/color' SETTING_ADVANCE_MODE = 'advanced' SETTING_WIN_STATE = 'window/state' SETTI...
true
true