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
1c36b5ffd0011dca80af93ebe5034e8dc7e7eb77
170
py
Python
baobab/sim_utils/__init__.py
aymgal/baobab
960ddbd55fc4391f2b857f2232af38c45c809ae8
[ "MIT" ]
8
2019-09-11T15:11:57.000Z
2022-02-03T08:24:52.000Z
baobab/sim_utils/__init__.py
aymgal/baobab
960ddbd55fc4391f2b857f2232af38c45c809ae8
[ "MIT" ]
52
2019-08-29T00:39:11.000Z
2021-01-02T22:49:41.000Z
baobab/sim_utils/__init__.py
aymgal/baobab
960ddbd55fc4391f2b857f2232af38c45c809ae8
[ "MIT" ]
2
2019-09-26T23:38:47.000Z
2020-02-18T10:07:04.000Z
from .flux_utils import * from .psf_utils import * from .image_utils import * from .metadata_utils import * from .selection_utils import * from .kinematics_utils import *
28.333333
31
0.794118
from .flux_utils import * from .psf_utils import * from .image_utils import * from .metadata_utils import * from .selection_utils import * from .kinematics_utils import *
true
true
1c36b6aee039d1b54c3fdb9734ea58bac7f4db12
526
py
Python
lib/config/log.py
dev1x-org/python-example
ad6b100d87d1ba8d5b77f160854dd3c387ded222
[ "MIT" ]
null
null
null
lib/config/log.py
dev1x-org/python-example
ad6b100d87d1ba8d5b77f160854dd3c387ded222
[ "MIT" ]
null
null
null
lib/config/log.py
dev1x-org/python-example
ad6b100d87d1ba8d5b77f160854dd3c387ded222
[ "MIT" ]
null
null
null
#coding:utf-8 import os from config import Config class LogConfig(Config): def __new__(cls, *args, **kwargs): if not hasattr(cls, "__instance__"): cls.__instance__ = super(LogConfig, cls).__new__(cls, *args, **kwargs) return cls.__instance__ def __init__(self): super(LogCon...
23.909091
82
0.595057
import os from config import Config class LogConfig(Config): def __new__(cls, *args, **kwargs): if not hasattr(cls, "__instance__"): cls.__instance__ = super(LogConfig, cls).__new__(cls, *args, **kwargs) return cls.__instance__ def __init__(self): super(LogConfig, self).__...
false
true
1c36b6e18e1ae5e543710d930543619f2b5b83a6
850
py
Python
tests/test_message.py
falsovsky/AnavNet
cfbfbd411d7d98a08132f92db1989ce9cb62c86f
[ "BSD-3-Clause" ]
1
2020-11-21T23:07:45.000Z
2020-11-21T23:07:45.000Z
tests/test_message.py
falsovsky/anavnet
cfbfbd411d7d98a08132f92db1989ce9cb62c86f
[ "BSD-3-Clause" ]
null
null
null
tests/test_message.py
falsovsky/anavnet
cfbfbd411d7d98a08132f92db1989ce9cb62c86f
[ "BSD-3-Clause" ]
null
null
null
import unittest from anavnet.anavnet import AnavNet class TestMessage(unittest.TestCase): def setUp(self): self.anavnet = AnavNet() self.anavnet.set_port(16) def test_get_message_no_port(self): anavnet = AnavNet() with self.assertRaises(RuntimeError): anavnet.get_m...
27.419355
75
0.684706
import unittest from anavnet.anavnet import AnavNet class TestMessage(unittest.TestCase): def setUp(self): self.anavnet = AnavNet() self.anavnet.set_port(16) def test_get_message_no_port(self): anavnet = AnavNet() with self.assertRaises(RuntimeError): anavnet.get_m...
true
true
1c36b732a37d291cf4aa9d43a5a0c13843ce5496
2,581
py
Python
05_normal_distribution_simulator/studio/charting/histograms.py
Shiao-Computing-Volumes/project-based-learning-in-python
52e0b02cf085de97c3b5d9aa44bf8786d8a9ad19
[ "Apache-2.0" ]
1
2021-08-17T23:53:46.000Z
2021-08-17T23:53:46.000Z
05_normal_distribution_simulator/studio/charting/histograms.py
Shiao-Computing-Volumes/project-based-learning-in-python
52e0b02cf085de97c3b5d9aa44bf8786d8a9ad19
[ "Apache-2.0" ]
null
null
null
05_normal_distribution_simulator/studio/charting/histograms.py
Shiao-Computing-Volumes/project-based-learning-in-python
52e0b02cf085de97c3b5d9aa44bf8786d8a9ad19
[ "Apache-2.0" ]
null
null
null
import numpy as np import scipy.stats import matplotlib.pyplot as plt from studio.settings.frames import STYLE, THEME_COLOR, AIDED_COLOR from studio.settings.frames import FIGSIZE, DPI from studio.frames.camera import Camera from studio.charting.components.legends import captioning plt.style.use(STYLE) def hist_den...
32.2625
83
0.660597
import numpy as np import scipy.stats import matplotlib.pyplot as plt from studio.settings.frames import STYLE, THEME_COLOR, AIDED_COLOR from studio.settings.frames import FIGSIZE, DPI from studio.frames.camera import Camera from studio.charting.components.legends import captioning plt.style.use(STYLE) def hist_den...
true
true
1c36b806de11d9f2cd755d855696a3e816702e8e
4,361
py
Python
docs/codeql/ql-training/conf.py
madhurimamandal/codeql
76bf8878da4d951ed98238b7239c199a3dfddf16
[ "MIT" ]
4,036
2020-04-29T00:09:57.000Z
2022-03-31T14:16:38.000Z
docs/codeql/ql-training/conf.py
madhurimamandal/codeql
76bf8878da4d951ed98238b7239c199a3dfddf16
[ "MIT" ]
2,970
2020-04-28T17:24:18.000Z
2022-03-31T22:40:46.000Z
docs/codeql/ql-training/conf.py
ScriptBox99/github-codeql
2ecf0d3264db8fb4904b2056964da469372a235c
[ "MIT" ]
794
2020-04-29T00:28:25.000Z
2022-03-30T08:21:46.000Z
# -*- coding: utf-8 -*- # # CodeQL training slides build configuration file # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are comm...
34.888
93
0.667966
true
true
1c36b81bf56ec94a2a91b25eebf4a82ac94ac1e8
374
py
Python
support/admin.py
shakyasaijal/businessAnalytics
9312bae79709387c6eadd50f87f6be85bd52c396
[ "BSD-3-Clause" ]
null
null
null
support/admin.py
shakyasaijal/businessAnalytics
9312bae79709387c6eadd50f87f6be85bd52c396
[ "BSD-3-Clause" ]
8
2021-03-30T13:03:11.000Z
2022-03-12T00:20:13.000Z
support/admin.py
shakyasaijal/businessAnalytics
9312bae79709387c6eadd50f87f6be85bd52c396
[ "BSD-3-Clause" ]
null
null
null
from django.contrib import admin from . import models class BranchAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('branch_name',)} list_display = ('branch_name','location', 'contact', 'branch_head') search_fields = ['branch_name', 'location', 'contact', 'branch_head'] list_filter = ("location...
34
73
0.719251
from django.contrib import admin from . import models class BranchAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('branch_name',)} list_display = ('branch_name','location', 'contact', 'branch_head') search_fields = ['branch_name', 'location', 'contact', 'branch_head'] list_filter = ("location...
true
true
1c36b88b82c23e7d8eede2f80625c3ec21c19267
4,134
py
Python
src/abcgan/transforms.py
brillouinzone/atmosense-abcgan
30b77fd082a55869e58839a4cfbab61a7eab2b13
[ "MIT" ]
1
2022-02-06T09:54:40.000Z
2022-02-06T09:54:40.000Z
src/abcgan/transforms.py
brillouinzone/atmosense-abcgan
30b77fd082a55869e58839a4cfbab61a7eab2b13
[ "MIT" ]
1
2021-08-21T21:06:17.000Z
2021-08-21T21:06:17.000Z
src/abcgan/transforms.py
brillouinzone/atmosense-abcgan
30b77fd082a55869e58839a4cfbab61a7eab2b13
[ "MIT" ]
2
2021-08-14T06:41:20.000Z
2021-12-14T19:32:48.000Z
""" Transforms to and from z-scaled variables. Uses numpy only (no pytorch) """ import numpy as np # noqa import abcgan.constants as const def encode(data, name): """ Encode variables, or just add extra dimension Parameters ---------- data : np.ndarray array of variable values. name...
24.461538
83
0.557571
import numpy as np import abcgan.constants as const def encode(data, name): if name in const.cyclic_driver: wrap_val = const.cyclic_driver[name] enc = data % wrap_val enc = (enc / wrap_val) * 2.0 * np.pi enc = np.stack((np.cos(enc), np.sin(enc)), axis=-1) else: enc = ...
true
true
1c36b9540a1cfb59160976ae676a2d6a7a56812a
220
py
Python
tern/adapters/tests/test_init.py
luhn/tern
a206c4084ddb22ed903117819c3b7b572c854ea5
[ "MIT" ]
1
2020-09-06T19:10:50.000Z
2020-09-06T19:10:50.000Z
tern/adapters/tests/test_init.py
luhn/tern
a206c4084ddb22ed903117819c3b7b572c854ea5
[ "MIT" ]
null
null
null
tern/adapters/tests/test_init.py
luhn/tern
a206c4084ddb22ed903117819c3b7b572c854ea5
[ "MIT" ]
null
null
null
from __future__ import absolute_import from .. import extract_adapter from ..postgresql import PostgreSQLAdapter def test_extract_adapter(): assert extract_adapter('tern.adapters.postgresql') is PostgreSQLAdapter
24.444444
75
0.827273
from __future__ import absolute_import from .. import extract_adapter from ..postgresql import PostgreSQLAdapter def test_extract_adapter(): assert extract_adapter('tern.adapters.postgresql') is PostgreSQLAdapter
true
true
1c36baff65cd3c4db0b667ec08a4a525b362ee96
2,413
py
Python
stancode_projects/breakout.py
she12306/stancode_prjects
374cca15e5aead0864d30206fbf84b5a79b8d19b
[ "MIT" ]
null
null
null
stancode_projects/breakout.py
she12306/stancode_prjects
374cca15e5aead0864d30206fbf84b5a79b8d19b
[ "MIT" ]
null
null
null
stancode_projects/breakout.py
she12306/stancode_prjects
374cca15e5aead0864d30206fbf84b5a79b8d19b
[ "MIT" ]
null
null
null
""" stanCode Breakout Project Adapted from Eric Roberts's Breakout by Sonja Johnson-Yu, Kylie Jue, Nick Bowman, and Jerry Liao. The animation part works here. """ from campy.gui.events.timer import pause from breakoutgraphics import BreakoutGraphics FRAME_RATE = 1000 / 120 # 120 frames per second NUM_LIVES = 3 # ...
32.608108
97
0.463324
from campy.gui.events.timer import pause from breakoutgraphics import BreakoutGraphics FRAME_RATE = 1000 / 120 NUM_LIVES = 3 TOTAL_SCORE = 100 def main(): graphics = BreakoutGraphics() lives = NUM_LIVES graphics.draw_hp(lives) dx = graphics.get_dx() dy = graphics.get_dy() while True: ...
true
true
1c36bb0d893f1bfdb757b53ebaabfb637f523d75
3,784
py
Python
misc/scrape.py
hykilpikonna/CSC110
12a4f9361e0c79fe03cafa3c283eb96706359f46
[ "MIT" ]
null
null
null
misc/scrape.py
hykilpikonna/CSC110
12a4f9361e0c79fe03cafa3c283eb96706359f46
[ "MIT" ]
null
null
null
misc/scrape.py
hykilpikonna/CSC110
12a4f9361e0c79fe03cafa3c283eb96706359f46
[ "MIT" ]
null
null
null
""" Since the final test is open-notes, I've made this script to combine all course notes into one html file, so I can ctrl+F without needing to find which chapter some definition is from. """ import binascii import os import re import secrets from pathlib import Path import requests def write(file: str, text: str) ...
29.107692
115
0.524577
import binascii import os import re import secrets from pathlib import Path import requests def write(file: str, text: str) -> None: if '/' in file: Path(file).parent.mkdir(parents=True, exist_ok=True) with open(file, 'w', encoding='utf-8') as f: f.write(text) def read(file: str) -> str: ...
true
true
1c36bb41d46055f32820cc936accf16c9631b4b1
37
py
Python
sserver/flask/lib/python2.7/sre_parse.py
ssf008/myechoprint-server
9ca0acc4e050dea2c99f32ffcab1a7e89352c8a3
[ "Apache-2.0" ]
9
2017-05-09T14:22:57.000Z
2018-04-25T11:48:54.000Z
Message_delivery_Kafka/query/virtualenv/lib/python2.7/sre_parse.py
RickeyBoy/HACKxSJTU_ChatAssistant
12768c8b6710adb582aec6c3b40613eedc3dfeb2
[ "Apache-2.0" ]
1
2021-09-18T05:59:56.000Z
2021-09-18T06:02:57.000Z
Message_delivery_Kafka/query/virtualenv/lib/python2.7/sre_parse.py
RickeyBoy/HACKxSJTU_ChatAssistant
12768c8b6710adb582aec6c3b40613eedc3dfeb2
[ "Apache-2.0" ]
null
null
null
/usr/local/lib/python2.7/sre_parse.py
37
37
0.810811
/usr/local/lib/python2.7/sre_parse.py
false
true
1c36bde0449b4db12177a90b53aa97e67068eccf
1,476
py
Python
tests/test_main.py
flamusdiu/flask-mistune
03ca85e652c40afc77017c9856488b3a9aff9611
[ "MIT" ]
2
2021-04-12T22:54:51.000Z
2021-04-13T01:48:56.000Z
tests/test_main.py
flamusdiu/flask-mistune
03ca85e652c40afc77017c9856488b3a9aff9611
[ "MIT" ]
null
null
null
tests/test_main.py
flamusdiu/flask-mistune
03ca85e652c40afc77017c9856488b3a9aff9611
[ "MIT" ]
null
null
null
"""Run all pytests for application.""" import pytest from flask import Flask, Markup, render_template_string from flask_mistune import Mistune, markdown @pytest.fixture() def client(): """Configure Flask App. Flask app is a dummy application to test filters for this module. """ app = Flask(__name__)...
27.333333
71
0.636179
import pytest from flask import Flask, Markup, render_template_string from flask_mistune import Mistune, markdown @pytest.fixture() def client(): app = Flask(__name__) app.config['TESTING'] = True Mistune(app) @app.route('/test') def markdown_template_filter(): text = '~~testing markdown...
true
true
1c36be35e2dfbcbfdb318f1e3be0e093253ac663
456
py
Python
Scripts/pip3-script.py
JYurgie/DeepLabV3Tuned
d8fb59e5d67f9b4d1d2cff37acb1d22ac9ab1b47
[ "MIT" ]
null
null
null
Scripts/pip3-script.py
JYurgie/DeepLabV3Tuned
d8fb59e5d67f9b4d1d2cff37acb1d22ac9ab1b47
[ "MIT" ]
null
null
null
Scripts/pip3-script.py
JYurgie/DeepLabV3Tuned
d8fb59e5d67f9b4d1d2cff37acb1d22ac9ab1b47
[ "MIT" ]
null
null
null
#!"C:\Users\JYurgelon\OneDrive - Leland Stanford Junior University\CS230\DeepLabV3Tuned\Scripts\python.exe" # EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip3' __requires__ = 'pip==19.0.3' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.su...
35.076923
107
0.684211
__requires__ = 'pip==19.0.3' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit( load_entry_point('pip==19.0.3', 'console_scripts', 'pip3')() )
true
true
1c36bf389af9854bc6ee9434ee5721ccf5bcf634
16,479
py
Python
python/plugins/processing/gui/AlgorithmDialog.py
dyna-mis/Hilabeling
cb7d5d4be29624a20c8a367162dbc6fd779b2b52
[ "MIT" ]
null
null
null
python/plugins/processing/gui/AlgorithmDialog.py
dyna-mis/Hilabeling
cb7d5d4be29624a20c8a367162dbc6fd779b2b52
[ "MIT" ]
null
null
null
python/plugins/processing/gui/AlgorithmDialog.py
dyna-mis/Hilabeling
cb7d5d4be29624a20c8a367162dbc6fd779b2b52
[ "MIT" ]
1
2021-12-25T08:40:30.000Z
2021-12-25T08:40:30.000Z
# -*- coding: utf-8 -*- """ *************************************************************************** AlgorithmDialog.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ***********************...
47.627168
166
0.560228
__author__ = 'Victor Olaya' __date__ = 'August 2012' __copyright__ = '(C) 2012, Victor Olaya' __revision__ = '176c06ceefb5f555205e72b20c962740cc0ec183' import os from pprint import pformat import time from qgis.PyQt.QtCore import QCoreApplication, Qt from qgis.PyQt.QtWidgets import QMessageBox, QPushButton, QSi...
true
true
1c36bf7a60e081aeabe7db1765be81e2a21c2010
1,150
py
Python
corehq/apps/reports/analytics/dbaccessors.py
rochakchauhan/commcare-hq
aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236
[ "BSD-3-Clause" ]
1
2020-07-14T13:00:23.000Z
2020-07-14T13:00:23.000Z
corehq/apps/reports/analytics/dbaccessors.py
rochakchauhan/commcare-hq
aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236
[ "BSD-3-Clause" ]
1
2021-06-02T04:45:16.000Z
2021-06-02T04:45:16.000Z
corehq/apps/reports/analytics/dbaccessors.py
rochakchauhan/commcare-hq
aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, unicode_literals from collections import defaultdict, namedtuple from corehq.form_processor.interfaces.dbaccessors import LedgerAccessors def get_wrapped_ledger_values(domain, case_ids, section_id, entry_ids=None): if isinstance(case_ids, (list, tuple, set)): case...
33.823529
102
0.744348
from __future__ import absolute_import, unicode_literals from collections import defaultdict, namedtuple from corehq.form_processor.interfaces.dbaccessors import LedgerAccessors def get_wrapped_ledger_values(domain, case_ids, section_id, entry_ids=None): if isinstance(case_ids, (list, tuple, set)): case...
true
true
1c36c04b4d50e33e5e4c27c3ff26f2975bfb9d8e
2,159
py
Python
sdks/python/apache_beam/examples/wordcount_test.py
cristicmf/beam
317a8b50f46c37ce0af50a1b9cce2437253e42a7
[ "Apache-2.0" ]
null
null
null
sdks/python/apache_beam/examples/wordcount_test.py
cristicmf/beam
317a8b50f46c37ce0af50a1b9cce2437253e42a7
[ "Apache-2.0" ]
1
2022-02-10T06:28:03.000Z
2022-02-10T06:28:03.000Z
sdks/python/apache_beam/examples/wordcount_test.py
cristicmf/beam
317a8b50f46c37ce0af50a1b9cce2437253e42a7
[ "Apache-2.0" ]
null
null
null
# -*- 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 "L...
33.734375
74
0.71283
from __future__ import absolute_import import collections import logging import re import tempfile import unittest from apache_beam.examples import wordcount from apache_beam.testing.util import open_shards class WordCountTest(unittest.TestCase): SAMPLE_TEXT = ( u'a b c a b a\nacento grá...
true
true
1c36c1646aab809b4ce3a46309095aa7ba484176
5,274
py
Python
plugins/weather.py
leochirag/Smart-Mirror-py
98806122cbd6efa0308423bac9bf4e4647f1ef87
[ "MIT" ]
null
null
null
plugins/weather.py
leochirag/Smart-Mirror-py
98806122cbd6efa0308423bac9bf4e4647f1ef87
[ "MIT" ]
null
null
null
plugins/weather.py
leochirag/Smart-Mirror-py
98806122cbd6efa0308423bac9bf4e4647f1ef87
[ "MIT" ]
null
null
null
from plugins import * # # maps open weather icons to # # icon reading is not impacted by the 'lang' parameter icon_lookup = { 'clear-day': "assets/Sun.png", # clear sky day 'wind': "assets/Wind.png", #wind 'cloudy': "assets/Cloud.png", # cloudy day 'partly-cloudy-day': "assets/PartlySunny.png", # ...
41.857143
165
0.568449
from plugins import * g", 'cloudy': "assets/Cloud.png", 'partly-cloudy-day': "assets/PartlySunny.png", 'rain': "assets/Rain.png", 'snow': "assets/Snow.png", 'snow-thin': "assets/Snow.png", 'fog': "assets/Haze.png", 'clear-night': "assets/Moon.png", 'partly-cloudy-night'...
false
true
1c36c236bd0459f159c30bfecfd65ab15db40812
903
py
Python
Desafio3/Cliente.py
bmortella/DesafioRedes
20d6c23c8cd5171c0a8cffe6a4967d7dd2edd30d
[ "MIT" ]
null
null
null
Desafio3/Cliente.py
bmortella/DesafioRedes
20d6c23c8cd5171c0a8cffe6a4967d7dd2edd30d
[ "MIT" ]
null
null
null
Desafio3/Cliente.py
bmortella/DesafioRedes
20d6c23c8cd5171c0a8cffe6a4967d7dd2edd30d
[ "MIT" ]
null
null
null
import socket, threading #importa modulo socket TCP_IP = '127.0.0.1' # endereço IP do servidor TCP_PORTA = 24000 # porta disponibilizada pelo servidor TAMANHO_BUFFER = 1024 NOME = input("Digite seu nome: ") # Criação de socket TCP do cliente cliente = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Conect...
23.763158
60
0.662237
import socket, threading TCP_IP = '127.0.0.1' TCP_PORTA = 24000 TAMANHO_BUFFER = 1024 NOME = input("Digite seu nome: ") cliente = socket.socket(socket.AF_INET, socket.SOCK_STREAM) cliente.connect((TCP_IP, TCP_PORTA)) print("Conectado! Digite quit para sair.") class Receiver(threading.Thread): def __...
true
true
1c36c2466bfa504402e3e68ef24b4c2c9b38218b
13,125
py
Python
fedn/fedn/clients/reducer/statestore/mongoreducerstatestore.py
eriks-aidotse/fedn
ab784e6ac45fd02be4532c9bbc8d5b8c75b62d51
[ "Apache-2.0" ]
null
null
null
fedn/fedn/clients/reducer/statestore/mongoreducerstatestore.py
eriks-aidotse/fedn
ab784e6ac45fd02be4532c9bbc8d5b8c75b62d51
[ "Apache-2.0" ]
null
null
null
fedn/fedn/clients/reducer/statestore/mongoreducerstatestore.py
eriks-aidotse/fedn
ab784e6ac45fd02be4532c9bbc8d5b8c75b62d51
[ "Apache-2.0" ]
null
null
null
from fedn.clients.reducer.state import ReducerStateToString, StringToReducerState from fedn.common.storage.db.mongo import connect_to_mongodb from .reducerstatestore import ReducerStateStore class MongoReducerStateStore(ReducerStateStore): """ """ def __init__(self, network_id, config, defaults=None): ...
32.487624
159
0.500648
from fedn.clients.reducer.state import ReducerStateToString, StringToReducerState from fedn.common.storage.db.mongo import connect_to_mongodb from .reducerstatestore import ReducerStateStore class MongoReducerStateStore(ReducerStateStore): def __init__(self, network_id, config, defaults=None): self.__ini...
true
true
1c36c4a395c6a589601a4bb4837e93ec3c469347
7,105
py
Python
pyzbar/wrapper.py
nmccann/pyzbar
dc2fcd0ba54bfcfff0eeea77080b1f225a6ca0e0
[ "MIT" ]
null
null
null
pyzbar/wrapper.py
nmccann/pyzbar
dc2fcd0ba54bfcfff0eeea77080b1f225a6ca0e0
[ "MIT" ]
null
null
null
pyzbar/wrapper.py
nmccann/pyzbar
dc2fcd0ba54bfcfff0eeea77080b1f225a6ca0e0
[ "MIT" ]
null
null
null
"""Low-level wrapper around zbar's interface """ from ctypes import ( c_ubyte, c_char_p, c_int, c_uint, c_ulong, c_void_p, Structure, CFUNCTYPE, POINTER ) from enum import IntEnum, unique from . import zbar_library __all__ = [ 'EXTERNAL_DEPENDENCIES', 'LIBZBAR', 'ZBarConfig', 'ZBarSymbol', 'zbar_imag...
26.412639
79
0.63772
from ctypes import ( c_ubyte, c_char_p, c_int, c_uint, c_ulong, c_void_p, Structure, CFUNCTYPE, POINTER ) from enum import IntEnum, unique from . import zbar_library __all__ = [ 'EXTERNAL_DEPENDENCIES', 'LIBZBAR', 'ZBarConfig', 'ZBarSymbol', 'zbar_image_create', 'zbar_image_destroy', 'zbar_image_firs...
true
true
1c36c6ed65220131f69f502c9a2b505085085e10
12,354
py
Python
accounts/views.py
hpanwar08/greatkart
834ff9fabdbb9493f54bcfd5d23505831b4a66d2
[ "MIT" ]
null
null
null
accounts/views.py
hpanwar08/greatkart
834ff9fabdbb9493f54bcfd5d23505831b4a66d2
[ "MIT" ]
null
null
null
accounts/views.py
hpanwar08/greatkart
834ff9fabdbb9493f54bcfd5d23505831b4a66d2
[ "MIT" ]
null
null
null
import logging from urllib.parse import urlencode, urlparse from django.contrib import auth from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.tokens import default_token_generator from django.contrib.sites.shortcuts import get_current_site from djang...
38.012308
113
0.620366
import logging from urllib.parse import urlencode, urlparse from django.contrib import auth from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.tokens import default_token_generator from django.contrib.sites.shortcuts import get_current_site from djang...
true
true
1c36c7e48c0c3d9ff4a6ece15e342d3ce4a853eb
39,762
py
Python
gen/JavaLexer.py
SadraGoudarzdashti/CompilerProject
a1a03422715c8582507dd35dece44dcacff3ae15
[ "MIT" ]
null
null
null
gen/JavaLexer.py
SadraGoudarzdashti/CompilerProject
a1a03422715c8582507dd35dece44dcacff3ae15
[ "MIT" ]
null
null
null
gen/JavaLexer.py
SadraGoudarzdashti/CompilerProject
a1a03422715c8582507dd35dece44dcacff3ae15
[ "MIT" ]
null
null
null
# Generated from C:/compiler_project/CompilerProject\JavaLexer.g4 by ANTLR 4.9.1 from antlr4 import * from io import StringIO from typing.io import TextIO import sys def serializedATN(): with StringIO() as buf: buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2q") buf.write("\u03b3\b...
62.914557
103
0.571249
from antlr4 import * from io import StringIO from typing.io import TextIO import sys def serializedATN(): with StringIO() as buf: buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2q") buf.write("\u03b3\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7") buf.write("\t\7\4\b\t\b...
true
true
1c36c8a8c6fb620937631581e49e3056830915fe
2,550
py
Python
bmp180_log.py
nurazur/PV_Monitor
c44a15c46cf155d42624c560d3f8b8564049c82a
[ "MIT" ]
null
null
null
bmp180_log.py
nurazur/PV_Monitor
c44a15c46cf155d42624c560d3f8b8564049c82a
[ "MIT" ]
null
null
null
bmp180_log.py
nurazur/PV_Monitor
c44a15c46cf155d42624c560d3f8b8564049c82a
[ "MIT" ]
null
null
null
#!/usr/bin/env python #Version 05.01.2016 : dateiname wird nach ISO Wochennummer berechnet (bisher python style+ ww01 ist ab dem 1. Montag im Jahr) #Version 06.01.2017 : dateiname wird nach ISO Wochennummer und ISO Jahr berechnet. import sys import os import time import datetime ''' #Adafruit Zeug import Adafruit_B...
27.717391
125
0.721176
import sys import os import time import datetime ''' #Adafruit Zeug import Adafruit_BMP.BMP085 as BMP085 sensor = BMP085.BMP085(mode=BMP085.BMP085_ULTRAHIGHRES) # You can also optionally change the BMP085 mode to one of BMP085_ULTRALOWPOWER, # BMP085_STANDARD, BMP085_HIGHRES, or BMP085_ULTRAHIGHRES. #sensor = B...
false
true
1c36c8ef1d2c867a47fb7450d8b3d130c7d9cb6f
260
py
Python
students/K33401/Nikitin_michael/lab2/django_project_nikitin/project_first_app/forms.py
mexannik1998/ITMO_ICT_WebDevelopment_2021-2022
0894edd7d49a73abba31f72266fdeb35fc3f6367
[ "MIT" ]
null
null
null
students/K33401/Nikitin_michael/lab2/django_project_nikitin/project_first_app/forms.py
mexannik1998/ITMO_ICT_WebDevelopment_2021-2022
0894edd7d49a73abba31f72266fdeb35fc3f6367
[ "MIT" ]
null
null
null
students/K33401/Nikitin_michael/lab2/django_project_nikitin/project_first_app/forms.py
mexannik1998/ITMO_ICT_WebDevelopment_2021-2022
0894edd7d49a73abba31f72266fdeb35fc3f6367
[ "MIT" ]
null
null
null
from django import forms from .models import Driver # creating a form class DriverForm(forms.ModelForm): class Meta: model = Driver fields = [ 'surname', 'name', 'date_of_birth', ]
18.571429
35
0.519231
from django import forms from .models import Driver class DriverForm(forms.ModelForm): class Meta: model = Driver fields = [ 'surname', 'name', 'date_of_birth', ]
true
true
1c36c92e1f9c4840b2c0b0d747da1272c853fedb
504
py
Python
crops/about.py
jjavier-bm/crops
658a98f9c168cc27b3f967e7a60a0df896ef5ac6
[ "BSD-3-Clause" ]
null
null
null
crops/about.py
jjavier-bm/crops
658a98f9c168cc27b3f967e7a60a0df896ef5ac6
[ "BSD-3-Clause" ]
5
2020-07-17T08:45:22.000Z
2022-03-11T13:39:26.000Z
crops/about.py
jjavier-bm/crops
658a98f9c168cc27b3f967e7a60a0df896ef5ac6
[ "BSD-3-Clause" ]
1
2020-07-07T15:42:07.000Z
2020-07-07T15:42:07.000Z
"""This is CROPS: Cropping and Renumbering Operations for PDB structure and Sequence files""" """About CROPS. Package information is recorded here""" import datetime __prog__="CROPS" __description__="Cropping and Renumbering Operations for PDB structure and Sequence files" __author__ = "J. Javier Burgos-Mármol" __dat...
36
93
0.769841
import datetime __prog__="CROPS" __description__="Cropping and Renumbering Operations for PDB structure and Sequence files" __author__ = "J. Javier Burgos-Mármol" __date__ = "Jul 2020" __copyright__='2020-{}, University of Liverpool'.format(datetime.datetime.now().year) __version_info__ = (0, 1, 1) __version__ = "."...
true
true
1c36ce662cb03a57e4e8b1aff3c1632c3ff06d32
3,066
py
Python
ROAR/agent_module/mark_agent.py
RyanC1681/RCAI1122
c9683110b58c255a7a78d880ff73df7ff2329405
[ "Apache-2.0" ]
18
2020-10-16T00:38:55.000Z
2022-03-03T06:01:49.000Z
ROAR/agent_module/mark_agent.py
Jaish567/ROAR
75b0bc819abbe676f518070da3fa8043422c7cb7
[ "Apache-2.0" ]
20
2020-07-23T03:50:50.000Z
2021-11-09T04:00:26.000Z
ROAR/agent_module/mark_agent.py
Jaish567/ROAR
75b0bc819abbe676f518070da3fa8043422c7cb7
[ "Apache-2.0" ]
140
2019-11-20T22:46:02.000Z
2022-03-29T13:26:17.000Z
from ROAR.agent_module.agent import Agent from pathlib import Path from ROAR.control_module.pid_controller import PIDController from ROAR.planning_module.local_planner.simple_waypoint_following_local_planner import \ SimpleWaypointFollowingLocalPlanner from ROAR.planning_module.behavior_planner.behavior_planner imp...
51.1
115
0.646445
from ROAR.agent_module.agent import Agent from pathlib import Path from ROAR.control_module.pid_controller import PIDController from ROAR.planning_module.local_planner.simple_waypoint_following_local_planner import \ SimpleWaypointFollowingLocalPlanner from ROAR.planning_module.behavior_planner.behavior_planner imp...
true
true
1c36d0a425fc91d76368d674fcae1e02ca450e66
15,319
py
Python
src/idea/tests/listview_tests.py
m3brown/idea-box
3a0300be849be62b138aefd0197f667b980f6e28
[ "CC0-1.0" ]
null
null
null
src/idea/tests/listview_tests.py
m3brown/idea-box
3a0300be849be62b138aefd0197f667b980f6e28
[ "CC0-1.0" ]
null
null
null
src/idea/tests/listview_tests.py
m3brown/idea-box
3a0300be849be62b138aefd0197f667b980f6e28
[ "CC0-1.0" ]
null
null
null
import datetime from django.contrib.auth import get_user_model from django.utils.timezone import get_default_timezone from django.contrib.comments.models import Comment from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.test import TestCase from idea impo...
38.012407
100
0.576343
import datetime from django.contrib.auth import get_user_model from django.utils.timezone import get_default_timezone from django.contrib.comments.models import Comment from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.test import TestCase from idea impo...
true
true
1c36d0e5821dff116091b3bad792fb50edfcc0e7
2,937
py
Python
tests/unit/modules/test_root_mean_squared_error.py
pavelzw/pyWATTS
423f5eba7a54b4ced0876454e2f24a1840210076
[ "MIT" ]
null
null
null
tests/unit/modules/test_root_mean_squared_error.py
pavelzw/pyWATTS
423f5eba7a54b4ced0876454e2f24a1840210076
[ "MIT" ]
null
null
null
tests/unit/modules/test_root_mean_squared_error.py
pavelzw/pyWATTS
423f5eba7a54b4ced0876454e2f24a1840210076
[ "MIT" ]
null
null
null
import unittest import pytest import xarray as xr import pandas as pd from pywatts.core.exceptions.input_not_available import InputNotAvailable from pywatts.modules.root_mean_squared_error import RmseCalculator import numpy as np class TestRMSECalculator(unittest.TestCase): def setUp(self) -> None: sel...
41.957143
120
0.548519
import unittest import pytest import xarray as xr import pandas as pd from pywatts.core.exceptions.input_not_available import InputNotAvailable from pywatts.modules.root_mean_squared_error import RmseCalculator import numpy as np class TestRMSECalculator(unittest.TestCase): def setUp(self) -> None: sel...
true
true
1c36d11def359c273abb51d7a435d3c5e71d2ed3
13,293
py
Python
py/get_fit_data.py
shibaji7/Tdiff_Validation
0e143a53763ea4eb965760c83239b5232326d91e
[ "MIT" ]
null
null
null
py/get_fit_data.py
shibaji7/Tdiff_Validation
0e143a53763ea4eb965760c83239b5232326d91e
[ "MIT" ]
null
null
null
py/get_fit_data.py
shibaji7/Tdiff_Validation
0e143a53763ea4eb965760c83239b5232326d91e
[ "MIT" ]
1
2022-03-14T16:38:23.000Z
2022-03-14T16:38:23.000Z
#!/usr/bin/env python """get_fit_data.py: utility module to fetch fitacf<v> level data.""" __author__ = "Chakraborty, S." __copyright__ = "Copyright 2020, SuperDARN@VT" __credits__ = [] __license__ = "MIT" __version__ = "1.0." __maintainer__ = "Chakraborty, S." __email__ = "shibaji7@vt.edu" __status__ = "Research" i...
38.982405
142
0.515911
__author__ = "Chakraborty, S." __copyright__ = "Copyright 2020, SuperDARN@VT" __credits__ = [] __license__ = "MIT" __version__ = "1.0." __maintainer__ = "Chakraborty, S." __email__ = "shibaji7@vt.edu" __status__ = "Research" import numpy as np import pandas as pd import datetime as dt import glob import bz2 import ...
true
true
1c36d12b4aecf3ea63f9835763dd471a888f3ac1
11,122
py
Python
indico/web/http_api/hooks/base.py
UNOG-Indico/UNOG-Indico-v2
4fa4393cc1f3b453a69f5e0ea3b52c18337831a5
[ "MIT" ]
null
null
null
indico/web/http_api/hooks/base.py
UNOG-Indico/UNOG-Indico-v2
4fa4393cc1f3b453a69f5e0ea3b52c18337831a5
[ "MIT" ]
null
null
null
indico/web/http_api/hooks/base.py
UNOG-Indico/UNOG-Indico-v2
4fa4393cc1f3b453a69f5e0ea3b52c18337831a5
[ "MIT" ]
null
null
null
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. """ Base export interface """ import re import urllib from datetime import datetime, time, timedelta from...
38.484429
117
0.616346
import re import urllib from datetime import datetime, time, timedelta from types import GeneratorType import pytz from flask import current_app, request from indico.core.config import config from indico.core.db import db from indico.core.logger import Logger from indico.core.notifications import flush_email_...
true
true
1c36d334e5ad6fa55c2d5e0bb2de68b24cd63f18
148
py
Python
urop/gen_quality_rate_charts.py
giterator/PCCArena
243841351e94baa9b0db126de49f2e251eacc83f
[ "MIT" ]
null
null
null
urop/gen_quality_rate_charts.py
giterator/PCCArena
243841351e94baa9b0db126de49f2e251eacc83f
[ "MIT" ]
null
null
null
urop/gen_quality_rate_charts.py
giterator/PCCArena
243841351e94baa9b0db126de49f2e251eacc83f
[ "MIT" ]
null
null
null
from urop_experiments_metrics import * if __name__ == '__main__': collate_quality_rate() print("Quality vs rate collated for all datasets")
29.6
54
0.756757
from urop_experiments_metrics import * if __name__ == '__main__': collate_quality_rate() print("Quality vs rate collated for all datasets")
true
true
1c36d39ccd5fda892045aa2a2b067b31ada6e585
60,924
py
Python
palaver/test/memcache_storage.py
twonds/palaver
fcaa1884bc206e0aba7c88d9614e38b492c59285
[ "MIT" ]
4
2015-01-20T17:25:12.000Z
2020-02-12T08:24:05.000Z
palaver/test/memcache_storage.py
twonds/palaver
fcaa1884bc206e0aba7c88d9614e38b492c59285
[ "MIT" ]
1
2016-01-27T16:13:18.000Z
2016-01-27T19:11:21.000Z
palaver/test/memcache_storage.py
twonds/palaver
fcaa1884bc206e0aba7c88d9614e38b492c59285
[ "MIT" ]
null
null
null
# -*- coding: utf8 -*- # Copyright (c) 2005 - 2007 OGG, LLC # See LICENSE.txt for details import os import sys, sha from twisted.trial import unittest import time from twisted.words.protocols.jabber import jid from twisted.internet import defer, protocol, reactor from twisted.application import internet, service from...
36.178147
186
0.575504
import os import sys, sha from twisted.trial import unittest import time from twisted.words.protocols.jabber import jid from twisted.internet import defer, protocol, reactor from twisted.application import internet, service from twisted.words.xish import domish, xpath from twisted.python import log try: from t...
true
true
1c36d4ac05de72e185c9d192567f42529ea6a438
381
py
Python
cookiecutter_django_test/users/apps.py
imsure/cookiecutter-django-test
853a46e6410fc9814cadbef828987f2c5b24fe4d
[ "MIT" ]
null
null
null
cookiecutter_django_test/users/apps.py
imsure/cookiecutter-django-test
853a46e6410fc9814cadbef828987f2c5b24fe4d
[ "MIT" ]
null
null
null
cookiecutter_django_test/users/apps.py
imsure/cookiecutter-django-test
853a46e6410fc9814cadbef828987f2c5b24fe4d
[ "MIT" ]
null
null
null
from django.apps import AppConfig class UsersConfig(AppConfig): name = "cookiecutter_django_test.users" verbose_name = "Users" def ready(self): """Override this to put in: Users system checks Users signal registration """ try: import users.signa...
22.411765
45
0.590551
from django.apps import AppConfig class UsersConfig(AppConfig): name = "cookiecutter_django_test.users" verbose_name = "Users" def ready(self): try: import users.signals except ImportError: pass
true
true
1c36d5757e7eb9e5baf0d65904a538f60fd08f9a
7,986
py
Python
lfs/customer/models.py
restless/django-lfs
4058f9d45b416ef2e8c28a87856ea0f1550b523d
[ "BSD-3-Clause" ]
1
2020-02-26T03:07:39.000Z
2020-02-26T03:07:39.000Z
lfs/customer/models.py
mxins/django-lfs
bf42ed80ce0e1ec96db6ab985adcc614ea79dfc8
[ "BSD-3-Clause" ]
null
null
null
lfs/customer/models.py
mxins/django-lfs
bf42ed80ce0e1ec96db6ab985adcc614ea79dfc8
[ "BSD-3-Clause" ]
null
null
null
# django imports from copy import deepcopy from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.db import models from django.utils.translation import ugettext_lazy as _ # lfs imports from lfs.core.models impo...
40.953846
173
0.702605
from copy import deepcopy from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.db import models from django.utils.translation import ugettext_lazy as _ from lfs.core.models import Country from lfs.shipping....
true
true
1c36d64543c9ae82fd1fedde5c61ca0052ed9091
982
py
Python
apps/portalbase/macros/wiki/actors/1_main.py
jumpscale7/jumpscale_portal
8c99265e48f85643f8a52bc40a23f5266fb09231
[ "Apache-2.0" ]
2
2016-04-14T14:05:01.000Z
2016-04-21T07:20:36.000Z
apps/portalbase/macros/wiki/actors/1_main.py
Jumpscale/jumpscale6_core
0502ddc1abab3c37ed982c142d21ea3955d471d3
[ "BSD-2-Clause" ]
13
2016-03-07T12:07:15.000Z
2018-02-28T13:11:59.000Z
apps/portalbase/macros/wiki/actors/1_main.py
Jumpscale/jumpscale6_core
0502ddc1abab3c37ed982c142d21ea3955d471d3
[ "BSD-2-Clause" ]
5
2016-03-08T07:49:51.000Z
2018-10-19T13:57:04.000Z
def main(j, args, params, tags, tasklet): doc = args.doc tags = args.tags out = "" bullets = args.tags.labelExists("bullets") table = args.tags.labelExists("table") if table: rows = [] for item in sorted(j.core.portal.active.getActors()): app, actor = item.split...
27.277778
108
0.491853
def main(j, args, params, tags, tasklet): doc = args.doc tags = args.tags out = "" bullets = args.tags.labelExists("bullets") table = args.tags.labelExists("table") if table: rows = [] for item in sorted(j.core.portal.active.getActors()): app, actor = item.split...
true
true
1c36d74a9862ed7d1ddc7e13a4e9b242b78dd32c
3,481
py
Python
python/src/nnabla/experimental/graph_converters/fused_batch_normalization.py
daniel-falk/nnabla
3fe132ea52dc10521cc029a5d6ba8f565cf65ccf
[ "Apache-2.0" ]
2,792
2017-06-26T13:05:44.000Z
2022-03-28T07:55:26.000Z
python/src/nnabla/experimental/graph_converters/fused_batch_normalization.py
daniel-falk/nnabla
3fe132ea52dc10521cc029a5d6ba8f565cf65ccf
[ "Apache-2.0" ]
138
2017-06-27T07:04:44.000Z
2022-02-28T01:37:15.000Z
python/src/nnabla/experimental/graph_converters/fused_batch_normalization.py
daniel-falk/nnabla
3fe132ea52dc10521cc029a5d6ba8f565cf65ccf
[ "Apache-2.0" ]
380
2017-06-26T13:23:52.000Z
2022-03-25T16:51:30.000Z
# Copyright 2020,2021 Sony Corporation. # # 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 i...
31.93578
102
0.634875
import nnabla.parametric_functions as PF from .graph_converter import FunctionModifier class FusedBatchNormalizationModifier(FunctionModifier): def __init__(self): super(FusedBatchNormalizationModifier, self).__init__() self._name = '' self._block = False self._bn_a...
true
true
1c36d7ce1132a3c5354a436cdb94877d31eb74c2
685
py
Python
urlman/services/hashing.py
4lexbit/url-manager-backend
561ccaf9727872308d66cccb5838e4a997e2f986
[ "MIT" ]
null
null
null
urlman/services/hashing.py
4lexbit/url-manager-backend
561ccaf9727872308d66cccb5838e4a997e2f986
[ "MIT" ]
null
null
null
urlman/services/hashing.py
4lexbit/url-manager-backend
561ccaf9727872308d66cccb5838e4a997e2f986
[ "MIT" ]
null
null
null
from passlib.hash import sha256_crypt from urlman.settings import settings def hash_password(password: str) -> str: """ Hashing password. @param password: @return: hashed password """ salted_password = password + settings.hash_salt return sha256_crypt.hash(salted_password) def verify_p...
25.37037
72
0.735766
from passlib.hash import sha256_crypt from urlman.settings import settings def hash_password(password: str) -> str: salted_password = password + settings.hash_salt return sha256_crypt.hash(salted_password) def verify_password(db_password: str, verifiable_password: str) -> bool: verifiable_password = ve...
true
true
1c36d8540e4cae52584c26b86abad49dce3ec2d2
298
py
Python
python/dcp1.2.py
IamGiel/host-site
2d68c8c97efd34e73500e6b90165a0b722707ccf
[ "MIT" ]
null
null
null
python/dcp1.2.py
IamGiel/host-site
2d68c8c97efd34e73500e6b90165a0b722707ccf
[ "MIT" ]
null
null
null
python/dcp1.2.py
IamGiel/host-site
2d68c8c97efd34e73500e6b90165a0b722707ccf
[ "MIT" ]
null
null
null
def window(array): left, right = None, None s = sorted(array, reverse=True) print(s) for i in range(len(array)): if array[i] != s[i] and left is None: left = i elif array[i] != s[i]: right = i return left, right print(window([1,7,3,4]))
22.923077
45
0.520134
def window(array): left, right = None, None s = sorted(array, reverse=True) print(s) for i in range(len(array)): if array[i] != s[i] and left is None: left = i elif array[i] != s[i]: right = i return left, right print(window([1,7,3,4]))
true
true
1c36d92c55a11461a74a19668ed3646b3aa069eb
4,533
py
Python
tests/manage/monitoring/prometheusmetrics/test_monitoring_negative.py
tiffanyn108/ocs-ci
30350e0958d14100edeadbbc5f3fe557954a76b8
[ "MIT" ]
null
null
null
tests/manage/monitoring/prometheusmetrics/test_monitoring_negative.py
tiffanyn108/ocs-ci
30350e0958d14100edeadbbc5f3fe557954a76b8
[ "MIT" ]
null
null
null
tests/manage/monitoring/prometheusmetrics/test_monitoring_negative.py
tiffanyn108/ocs-ci
30350e0958d14100edeadbbc5f3fe557954a76b8
[ "MIT" ]
null
null
null
# -*- coding: utf8 -*- """ Test cases here performs Prometheus queries using negative workloads. """ import logging import pytest from ocs_ci.framework.testlib import tier3 from ocs_ci.utility.prometheus import PrometheusAPI logger = logging.getLogger(__name__) @tier3 @pytest.mark.polarion_id("OCS-1306") def tes...
35.414063
79
0.696448
import logging import pytest from ocs_ci.framework.testlib import tier3 from ocs_ci.utility.prometheus import PrometheusAPI logger = logging.getLogger(__name__) @tier3 @pytest.mark.polarion_id("OCS-1306") def test_monitoring_shows_mon_down(measure_stop_ceph_mon): prometheus = PrometheusAPI() expect...
true
true
1c36d9d7d7878643977a7e6e24fdb4668d79286c
1,229
py
Python
tests/programs/unify_args/path_ask.py
astraldawn/pylps
e9964a24bb38657b180d441223b4cdb9e1dadc8a
[ "MIT" ]
1
2018-05-19T18:28:12.000Z
2018-05-19T18:28:12.000Z
tests/programs/unify_args/path_ask.py
astraldawn/pylps
e9964a24bb38657b180d441223b4cdb9e1dadc8a
[ "MIT" ]
12
2018-04-26T00:58:11.000Z
2018-05-13T22:03:39.000Z
tests/programs/unify_args/path_ask.py
astraldawn/pylps
e9964a24bb38657b180d441223b4cdb9e1dadc8a
[ "MIT" ]
null
null
null
from pylps.core import * initialise(max_time=3) create_actions('say(_, _)', 'ask(_, _)') create_events('respond(_, _)', 'path(_, _)', 'ask2(_, _)') create_facts('arc(_, _)') create_variables('X', 'Y', 'Z') arc('a', 'b') arc('b', 'c') arc('a', 'd') arc('d', 'e') arc('a', 'c') observe(ask('a', 'c').frm(1, 2)) observe...
17.069444
58
0.557364
from pylps.core import * initialise(max_time=3) create_actions('say(_, _)', 'ask(_, _)') create_events('respond(_, _)', 'path(_, _)', 'ask2(_, _)') create_facts('arc(_, _)') create_variables('X', 'Y', 'Z') arc('a', 'b') arc('b', 'c') arc('a', 'd') arc('d', 'e') arc('a', 'c') observe(ask('a', 'c').frm(1, 2)) observe...
true
true
1c36daad5a7380ac317d648ad98a16e882280cae
2,052
py
Python
task.py
vishwasourab/quadcopter_project
67b65e41a151fc2c24dd3905f33b73209157b52e
[ "MIT" ]
null
null
null
task.py
vishwasourab/quadcopter_project
67b65e41a151fc2c24dd3905f33b73209157b52e
[ "MIT" ]
null
null
null
task.py
vishwasourab/quadcopter_project
67b65e41a151fc2c24dd3905f33b73209157b52e
[ "MIT" ]
null
null
null
import numpy as np from physics_sim import PhysicsSim class Task(): """Task (environment) that defines the goal and provides feedback to the agent.""" def __init__(self, init_pose=None, init_velocities=None, init_angle_velocities=None, runtime=5., target_pos=None): """Initialize a Task object....
38.716981
100
0.617934
import numpy as np from physics_sim import PhysicsSim class Task(): def __init__(self, init_pose=None, init_velocities=None, init_angle_velocities=None, runtime=5., target_pos=None): self.sim = PhysicsSim(init_pose, init_velocities, init_angle_velocities, runtime) self.action_rep...
true
true
1c36db81d413c6ee13f4c5ced592449b92f47b53
6,894
py
Python
miaomiao.py
pyk1998/hpv4
fc6893d0c015a997c462689e79671a0af11acebe
[ "Apache-2.0" ]
null
null
null
miaomiao.py
pyk1998/hpv4
fc6893d0c015a997c462689e79671a0af11acebe
[ "Apache-2.0" ]
null
null
null
miaomiao.py
pyk1998/hpv4
fc6893d0c015a997c462689e79671a0af11acebe
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- import datetime import requests import copy import logging from hashlib import md5 import json import os from functools import wraps # disable ssl warnings requests.packages.urllib3.disable_warnings() # url URLS = { # 获取代理IP "IP_PROXY": "https://ip.jiangxianli.com/a...
31.623853
205
0.583261
import datetime import requests import copy import logging from hashlib import md5 import json import os from functools import wraps requests.packages.urllib3.disable_warnings() URLS = { "IP_PROXY": "https://ip.jiangxianli.com/api/proxy_ips", "SERVER_TIME": "https://miaomiao.scmttec.com/seckill...
true
true
1c36dbb40994007686cdf7c8fddfc7ab5edf3089
365
py
Python
code/DataProcessingUtils/EventFrameGeneration/imfill.py
mywisdomfly/EVDodgeNet
7d53a9c8e0e5883ac8ad2147da5981db5d9ba7a7
[ "BSD-3-Clause" ]
62
2020-05-22T03:00:11.000Z
2022-03-16T02:26:35.000Z
code/DataProcessingUtils/EventFrameGeneration/imfill.py
mywisdomfly/EVDodgeNet
7d53a9c8e0e5883ac8ad2147da5981db5d9ba7a7
[ "BSD-3-Clause" ]
8
2020-04-02T10:47:30.000Z
2021-06-18T17:35:40.000Z
code/DataProcessingUtils/EventFrameGeneration/imfill.py
mywisdomfly/EVDodgeNet
7d53a9c8e0e5883ac8ad2147da5981db5d9ba7a7
[ "BSD-3-Clause" ]
24
2020-04-14T14:49:56.000Z
2022-03-19T09:20:28.000Z
import cv2; import numpy as np; # Read image img = cv2.imread("label_00000054.png", cv2.IMREAD_GRAYSCALE); # Threshold. # Set values equal to or above 220 to 0. # Set values below 220 to 255. kernel = np.ones((5,5),np.uint8) dilate = cv2.dilate(img,kernel,iterations = 2) # Display images. cv2.imshow("Foreground", d...
21.470588
61
0.728767
import cv2; import numpy as np; img = cv2.imread("label_00000054.png", cv2.IMREAD_GRAYSCALE); kernel = np.ones((5,5),np.uint8) dilate = cv2.dilate(img,kernel,iterations = 2) cv2.imshow("Foreground", dilate) cv2.waitKey(0) cv2.destroyAllWindows()
true
true
1c36dc089ba4b038063b8a83440aa86ba059834f
8,871
py
Python
egret/models/copperplate_dispatch.py
barguel/Egret
2df021d08ca4c1722a7b16eab3f512ba0e7c6a1d
[ "BSD-3-Clause" ]
71
2019-03-28T09:57:27.000Z
2022-03-08T05:24:25.000Z
egret/models/copperplate_dispatch.py
shengrenhou/Egret
8bcaa8697908a6c258b6361b69ffd73d6a658ccf
[ "BSD-3-Clause" ]
139
2019-04-01T16:50:57.000Z
2022-03-31T20:29:04.000Z
egret/models/copperplate_dispatch.py
shengrenhou/Egret
8bcaa8697908a6c258b6361b69ffd73d6a658ccf
[ "BSD-3-Clause" ]
44
2019-04-01T13:20:37.000Z
2022-03-09T14:50:18.000Z
# ___________________________________________________________________________ # # EGRET: Electrical Grid Research and Engineering Tools # Copyright 2019 National Technology & Engineering Solutions of Sandia, LLC # (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. # Government retains certain r...
42.855072
137
0.702288
import pyomo.environ as pe import egret.model_library.transmission.tx_utils as tx_utils import egret.model_library.transmission.tx_calc as tx_calc import egret.model_library.transmission.bus as libbus import egret.model_library.transmission.branch as libbranch import egret.model_library.transmission.gen as lib...
true
true
1c36dc2259060920075378c4dceb6e079c6ff92a
8,714
py
Python
pycraft/mca.py
PapaMarky/pycraft
919fe000ae7f1d2dd715d0468957d67ca61725b4
[ "MIT" ]
null
null
null
pycraft/mca.py
PapaMarky/pycraft
919fe000ae7f1d2dd715d0468957d67ca61725b4
[ "MIT" ]
null
null
null
pycraft/mca.py
PapaMarky/pycraft
919fe000ae7f1d2dd715d0468957d67ca61725b4
[ "MIT" ]
null
null
null
"""Code to read .mca region files I modified the javascript library mca-js to create this file. mca-js: https://github.com/thejonwithnoh/mca-js This is largely just a python interpretation of that script. ----------- MIT License Copyright (c) 2019 Nicholas Westerhausen Permission is hereby granted, free of charge, ...
47.358696
120
0.70599
import gzip import zlib import os from pycraft.error import PycraftException class Mca: SECTOR_OFFSET_SIZE = 3 SECTOR_COUNT_SIZE = 1 TIMESTAMP_SIZE = 4 DATA_SIZE_SIZE = 4 COMPRESSION_TYPE_SIZE = 1 DIMENSION_SIZE_POWER = 5 DIMENSION_COUNT = 2 SECTOR_SIZE_POWER = 12 ...
true
true
1c36dc2d81ac4aece50a4bb755b3cfe70c6d353a
35,148
py
Python
src/transformers/modeling_outputs.py
dmlap/transformers
79588e6fdb5af8add092fc27dd695ea1ebc68b18
[ "Apache-2.0" ]
22
2020-10-14T01:10:23.000Z
2022-03-28T23:56:46.000Z
src/transformers/modeling_outputs.py
dmlap/transformers
79588e6fdb5af8add092fc27dd695ea1ebc68b18
[ "Apache-2.0" ]
6
2019-12-16T05:27:23.000Z
2020-10-05T04:48:53.000Z
src/transformers/modeling_outputs.py
dmlap/transformers
79588e6fdb5af8add092fc27dd695ea1ebc68b18
[ "Apache-2.0" ]
3
2021-01-29T11:31:10.000Z
2021-03-16T07:45:02.000Z
from dataclasses import dataclass from typing import List, Optional, Tuple import torch from .file_utils import ModelOutput @dataclass class BaseModelOutput(ModelOutput): """ Base class for model's outputs, with potential hidden states and attentions. Args: last_hidden_state (:obj...
63.32973
177
0.690366
from dataclasses import dataclass from typing import List, Optional, Tuple import torch from .file_utils import ModelOutput @dataclass class BaseModelOutput(ModelOutput): last_hidden_state: torch.FloatTensor hidden_states: Optional[Tuple[torch.FloatTensor]] = None attentions: Optional[Tupl...
true
true
1c36dc6a752384c61f718357143de928f62c6270
3,350
py
Python
tests/cases/downsample.py
trivoldus28/gunpowder
97e9e64709fb616e2c47567b22d5f11a9234fe48
[ "MIT" ]
43
2017-05-03T22:27:11.000Z
2022-02-11T19:07:28.000Z
tests/cases/downsample.py
trivoldus28/gunpowder
97e9e64709fb616e2c47567b22d5f11a9234fe48
[ "MIT" ]
102
2017-06-09T10:11:06.000Z
2022-03-29T13:56:37.000Z
tests/cases/downsample.py
trivoldus28/gunpowder
97e9e64709fb616e2c47567b22d5f11a9234fe48
[ "MIT" ]
43
2017-04-25T20:25:17.000Z
2022-02-11T19:07:34.000Z
from .provider_test import ProviderTest from gunpowder import * import numpy as np class DownSampleTestSource(BatchProvider): def setup(self): self.provides( ArrayKeys.RAW, ArraySpec( roi=Roi((0, 0, 0), (1000, 1000, 1000)), voxel_size=(4, 4, 4))) ...
32.843137
89
0.547463
from .provider_test import ProviderTest from gunpowder import * import numpy as np class DownSampleTestSource(BatchProvider): def setup(self): self.provides( ArrayKeys.RAW, ArraySpec( roi=Roi((0, 0, 0), (1000, 1000, 1000)), voxel_size=(4, 4, 4))) ...
true
true
1c36dc6f1bea1ed7517e344c7d1f193ad3132998
7,535
py
Python
yatube/posts/tests/test_forms.py
nekron2323/yatube_project
f2e802e816b32db4626962861f6883ba9e18ef4e
[ "MIT" ]
null
null
null
yatube/posts/tests/test_forms.py
nekron2323/yatube_project
f2e802e816b32db4626962861f6883ba9e18ef4e
[ "MIT" ]
null
null
null
yatube/posts/tests/test_forms.py
nekron2323/yatube_project
f2e802e816b32db4626962861f6883ba9e18ef4e
[ "MIT" ]
null
null
null
import shutil import tempfile from django import forms from django.conf import settings from django.core.files.uploadedfile import SimpleUploadedFile from django.test import Client, TestCase from django.urls import reverse from ..forms import PostForm from ..models import Comment, Group, Post, User TEMP_MEDIA_ROOT =...
34.406393
77
0.582216
import shutil import tempfile from django import forms from django.conf import settings from django.core.files.uploadedfile import SimpleUploadedFile from django.test import Client, TestCase from django.urls import reverse from ..forms import PostForm from ..models import Comment, Group, Post, User TEMP_MEDIA_ROOT =...
true
true
1c36dc8f619c81a72054a9c56a5a2c9b120ef598
4,637
py
Python
qa/rpc-tests/signrawtransactions.py
mirzaei-ce/core-alisinabit
9929923df19fc9f03eb02fa056f325c9a284cfcf
[ "MIT" ]
null
null
null
qa/rpc-tests/signrawtransactions.py
mirzaei-ce/core-alisinabit
9929923df19fc9f03eb02fa056f325c9a284cfcf
[ "MIT" ]
null
null
null
qa/rpc-tests/signrawtransactions.py
mirzaei-ce/core-alisinabit
9929923df19fc9f03eb02fa056f325c9a284cfcf
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import AlisinabitTestFramework from test_framework.util import * class Si...
42.154545
120
0.678025
from test_framework.test_framework import AlisinabitTestFramework from test_framework.util import * class SignRawTransactionsTest(AlisinabitTestFramework): def setup_chain(self): print('Initializing test directory ' + self.options.tmpdir) initialize_chain_clean(self.options.tmpdir, 1) d...
true
true
1c36ddc982c1cec56fd50fabe0b853dca852188c
108
py
Python
World 1.0 - Fundamentos/01 - Ola mundo.py
melissa-mfs/Exercicios-de-Python
91c3b7bca601df4c211803805e20e4f0bea73642
[ "MIT" ]
null
null
null
World 1.0 - Fundamentos/01 - Ola mundo.py
melissa-mfs/Exercicios-de-Python
91c3b7bca601df4c211803805e20e4f0bea73642
[ "MIT" ]
null
null
null
World 1.0 - Fundamentos/01 - Ola mundo.py
melissa-mfs/Exercicios-de-Python
91c3b7bca601df4c211803805e20e4f0bea73642
[ "MIT" ]
null
null
null
# Forma 1 print('\033[33mOlá, Mundo!\033[m') # Forma 2 mensagem = 'Olá, Mundo!' print('\033[32m'+mensagem)
15.428571
34
0.648148
print('\033[33mOlá, Mundo!\033[m') mensagem = 'Olá, Mundo!' print('\033[32m'+mensagem)
true
true
1c36ddcac68bb49b761b70f52d88d2cb06e3b2ef
891
py
Python
site_with_foldmenu/roles.py
shahab-qazavi/django_project
346cc60132155ae1d20ec44a419cecbe495cc360
[ "Apache-2.0" ]
2
2020-04-30T18:50:24.000Z
2020-05-20T08:10:18.000Z
site_with_foldmenu/roles.py
shahabgeek/django_project
346cc60132155ae1d20ec44a419cecbe495cc360
[ "Apache-2.0" ]
1
2022-02-10T21:01:40.000Z
2022-02-10T21:01:40.000Z
site_with_foldmenu/roles.py
shahabgeek/django_project
346cc60132155ae1d20ec44a419cecbe495cc360
[ "Apache-2.0" ]
null
null
null
from rolepermissions.roles import AbstractUserRole class DeleteImg(AbstractUserRole): available_permissions = { 'can_delete_image': True, } class AddImg(AbstractUserRole): available_permissions = { 'can_add_image': True, } class AddUser(AbstractUserRole): available_permissions =...
16.811321
50
0.671156
from rolepermissions.roles import AbstractUserRole class DeleteImg(AbstractUserRole): available_permissions = { 'can_delete_image': True, } class AddImg(AbstractUserRole): available_permissions = { 'can_add_image': True, } class AddUser(AbstractUserRole): available_permissions =...
true
true
1c36e15752980562c4dc24224254a43e08a260e2
14
py
Python
mymodule/__init__.py
dokterbob/mymodule
4776748aebf17cb6aa68fd738cb216b3cb0074f5
[ "Unlicense" ]
null
null
null
mymodule/__init__.py
dokterbob/mymodule
4776748aebf17cb6aa68fd738cb216b3cb0074f5
[ "Unlicense" ]
12
2017-03-10T15:55:38.000Z
2019-11-08T21:57:31.000Z
mymodule/__init__.py
dokterbob/mymodule
4776748aebf17cb6aa68fd738cb216b3cb0074f5
[ "Unlicense" ]
28
2017-02-20T19:28:40.000Z
2019-11-08T21:12:51.000Z
print 'hello'
7
13
0.714286
print 'hello'
false
true
1c36e188f8bd18b7814ce3816d41afc29f0bd0fd
15,200
py
Python
tensorflow_probability/python/internal/special_math_test.py
nbro/probability
07a6378155f0ed720b5aaccf5387e3f9a432bd10
[ "Apache-2.0" ]
1
2020-11-08T17:03:46.000Z
2020-11-08T17:03:46.000Z
tensorflow_probability/python/internal/special_math_test.py
etarakci-hvl/probability
7a0ce5e5beff91051028258dfbc7bc6cf0c4998d
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/internal/special_math_test.py
etarakci-hvl/probability
7a0ce5e5beff91051028258dfbc7bc6cf0c4998d
[ "Apache-2.0" ]
1
2020-05-27T19:42:06.000Z
2020-05-27T19:42:06.000Z
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
36.714976
80
0.696316
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import numpy as np from scipy import special as sp_special from scipy import stats as sp_stats import tensorflow.compat.v1 as tf1 import tensorflow.compat.v2 as tf from ten...
true
true
1c36e36c670a6d183b34f3128565369bb69ed9ce
622
py
Python
stdplugins/Exit.py
kaalhoonme/PepeBot
d1678f3c5e57adb8c9d2e1bc5a54568ad2938258
[ "Apache-2.0" ]
1
2020-08-12T21:36:58.000Z
2020-08-12T21:36:58.000Z
stdplugins/Exit.py
shn999/PepeBot
912b97dc89c4c7581cbaee337d4fcc05c98d79c0
[ "Apache-2.0" ]
null
null
null
stdplugins/Exit.py
shn999/PepeBot
912b97dc89c4c7581cbaee337d4fcc05c98d79c0
[ "Apache-2.0" ]
null
null
null
# For @UniBorg """fake exit .fexit""" from telethon import events from datetime import datetime from uniborg.util import admin_cmd import importlib.util import asyncio import random import importlib.util @borg.on(events.NewMessage(outgoing=True, pattern='^\.(f?f)exit')) async def timer_blankx(e): txt=...
12.958333
126
0.672026
from telethon import events from datetime import datetime from uniborg.util import admin_cmd import importlib.util import asyncio import random import importlib.util @borg.on(events.NewMessage(outgoing=True, pattern='^\.(f?f)exit')) async def timer_blankx(e): txt=e.text[7:] + '\n\n`Processing....` ' ...
true
true
1c36e3f17e8c45ae7b60a60a39cc07d960f5ccb8
391
py
Python
wechat/celery.py
awesome-archive/Wechat-Admin
6970ff4793bb57a864818011c3187370127fd0f9
[ "MIT" ]
null
null
null
wechat/celery.py
awesome-archive/Wechat-Admin
6970ff4793bb57a864818011c3187370127fd0f9
[ "MIT" ]
null
null
null
wechat/celery.py
awesome-archive/Wechat-Admin
6970ff4793bb57a864818011c3187370127fd0f9
[ "MIT" ]
null
null
null
from celery import Celery from celery.signals import worker_ready from celery.schedules import crontab app = Celery('wechat', include=['wechat.tasks']) app.config_from_object('wechat.celeryconfig') @worker_ready.connect def at_start(sender, **k): with sender.app.connection() as conn: sender.app.send_task...
23
53
0.741688
from celery import Celery from celery.signals import worker_ready from celery.schedules import crontab app = Celery('wechat', include=['wechat.tasks']) app.config_from_object('wechat.celeryconfig') @worker_ready.connect def at_start(sender, **k): with sender.app.connection() as conn: sender.app.send_task...
true
true
1c36e47985d557c495af697a7782d43e312f7a8b
2,067
py
Python
setup.py
thehardikv/python-aiplatform
efc00ed6bb838dceaee7ad9469cc51d1500a365d
[ "Apache-2.0" ]
null
null
null
setup.py
thehardikv/python-aiplatform
efc00ed6bb838dceaee7ad9469cc51d1500a365d
[ "Apache-2.0" ]
1
2021-02-12T23:56:38.000Z
2021-02-12T23:56:38.000Z
setup.py
thehardikv/python-aiplatform
efc00ed6bb838dceaee7ad9469cc51d1500a365d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
32.296875
74
0.676343
import io import os import setuptools name = "google-cloud-aiplatform" version = "0.4.0" description = "Cloud AI Platform API client library" package_root = os.path.abspath(os.path.dirname(__file__)) readme_filename = os.path.join(package_root, "README.rst") with io.open(readme_filename, encoding=...
true
true
1c36e61af0e8b36f9f1f33d651f1128ce683465e
2,650
py
Python
main.py
lmc212006/Cheap-Clothing-Finder
1806a2ae841cf66ac5ea27d39e7e2434c4f40488
[ "MIT" ]
1
2021-08-30T11:14:35.000Z
2021-08-30T11:14:35.000Z
main.py
lmc212006/Cheap-Clothing-Finder
1806a2ae841cf66ac5ea27d39e7e2434c4f40488
[ "MIT" ]
null
null
null
main.py
lmc212006/Cheap-Clothing-Finder
1806a2ae841cf66ac5ea27d39e7e2434c4f40488
[ "MIT" ]
null
null
null
from selenium import webdriver from time import sleep def getCheapestMyntra(drvr, link, elToSearch): drvr.get(link) out = {} sleep(2) for i in range(elToSearch): out[drvr.find_element_by_xpath(f"//*[@id='desktopSearchResults']/div[2]/section/ul/li[{i + 1}]/a/div[2]/div/span").text...
37.857143
389
0.573208
from selenium import webdriver from time import sleep def getCheapestMyntra(drvr, link, elToSearch): drvr.get(link) out = {} sleep(2) for i in range(elToSearch): out[drvr.find_element_by_xpath(f"//*[@id='desktopSearchResults']/div[2]/section/ul/li[{i + 1}]/a/div[2]/div/span").text...
true
true
1c36e69feb35e0bf0b925f104610862cfd135d71
3,452
py
Python
tests/app/test_delegating.py
hello0827/keripy
db41d612357acb231354ba3f353995635d91a02e
[ "Apache-2.0" ]
10
2021-06-09T16:15:32.000Z
2022-03-28T22:14:11.000Z
tests/app/test_delegating.py
hello0827/keripy
db41d612357acb231354ba3f353995635d91a02e
[ "Apache-2.0" ]
47
2021-06-17T20:00:02.000Z
2022-03-31T20:20:44.000Z
tests/app/test_delegating.py
hello0827/keripy
db41d612357acb231354ba3f353995635d91a02e
[ "Apache-2.0" ]
6
2021-06-10T11:24:25.000Z
2022-01-28T08:07:43.000Z
from keri.app import habbing, delegating, keeping from keri.core import eventing, parsing, coring from keri.db import basing def test_delegating(): # Dan is the delegator # Deb is the delegatee, or the entity "requesting" delegation of an identifier with habbing.openHab(name="dan", salt=b'0123456789abcdef...
37.11828
103
0.609212
from keri.app import habbing, delegating, keeping from keri.core import eventing, parsing, coring from keri.db import basing def test_delegating(): with habbing.openHab(name="dan", salt=b'0123456789abcdef', transferable=True, temp=True) as danHab: ks = keeping.Keeper(name="deb", temp=Tr...
true
true
1c36e8b34b252a6af1224c80d2bea2ccb59c9297
16,364
py
Python
glue/core/data_factories.py
bsipocz/glue
7b7e4879b4c746b2419a0eca2a17c2d07a3fded3
[ "BSD-3-Clause" ]
null
null
null
glue/core/data_factories.py
bsipocz/glue
7b7e4879b4c746b2419a0eca2a17c2d07a3fded3
[ "BSD-3-Clause" ]
null
null
null
glue/core/data_factories.py
bsipocz/glue
7b7e4879b4c746b2419a0eca2a17c2d07a3fded3
[ "BSD-3-Clause" ]
null
null
null
""" Factory methods to build Data objects from files""" """ Implementation notes: Each factory method conforms to the folowing structure, which helps the GUI Frontend easily load data: 1) The first argument is a file name to open 2) The return value is a Data object 3) The function has a .label attribute that desc...
29.014184
79
0.64208
import os import numpy as np from .data import Component, Data, CategoricalComponent from .io import extract_data_fits, extract_data_hdf5 from .util import file_format, as_list from .coordinates import coordinates_from_header, coordinates_from_wcs from ..external.astro import fits __all__ = ['load_data', 'gridded_...
true
true
1c36e9fd3666e12b3eadb3fbf7b629db8e79ecb0
10,742
py
Python
nova/tests/unit/virt/test_virt.py
tbreeds/nova
3f8c69b2ef3eef886e36c0b7f397b83a36a7beb8
[ "Apache-2.0" ]
null
null
null
nova/tests/unit/virt/test_virt.py
tbreeds/nova
3f8c69b2ef3eef886e36c0b7f397b83a36a7beb8
[ "Apache-2.0" ]
null
null
null
nova/tests/unit/virt/test_virt.py
tbreeds/nova
3f8c69b2ef3eef886e36c0b7f397b83a36a7beb8
[ "Apache-2.0" ]
null
null
null
# Copyright 2011 Isaku Yamahata # 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 b...
37.16955
78
0.588345
import io import os import mock import six from nova import test from nova import utils from nova.virt.disk import api as disk_api from nova.virt.disk.mount import api as mount from nova.virt import driver PROC_MOUNTS_CONTENTS = """rootfs / rootfs rw 0 0 sysfs /sys sysfs rw,nosuid,nodev,noexec,relatim...
true
true
1c36ec208d4e62cb07ff717e7f701420ea7a2ba1
9,542
py
Python
manila/tests/volume/test_cinder.py
redhat-openstack/manila
bef43561b303a36d99849952ba8c408b19bafd02
[ "Apache-2.0" ]
null
null
null
manila/tests/volume/test_cinder.py
redhat-openstack/manila
bef43561b303a36d99849952ba8c408b19bafd02
[ "Apache-2.0" ]
null
null
null
manila/tests/volume/test_cinder.py
redhat-openstack/manila
bef43561b303a36d99849952ba8c408b19bafd02
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
40.95279
79
0.642318
from cinderclient import exceptions as cinder_exception import ddt import mock from manila import context from manila import exception from manila import test from manila.volume import cinder class FakeCinderClient(object): class Volumes(object): def get(self, volume_id): return...
true
true
1c36ed9b5c4760c2faa95b824943b60701dc5701
2,189
py
Python
babybuddy/models.py
HorizonXP/babybuddy
88999233e8c3f02c5e8a514164a0fdc45e3ebe70
[ "BSD-2-Clause" ]
1
2019-01-27T03:50:29.000Z
2019-01-27T03:50:29.000Z
babybuddy/models.py
HorizonXP/babybuddy
88999233e8c3f02c5e8a514164a0fdc45e3ebe70
[ "BSD-2-Clause" ]
8
2020-02-11T23:36:13.000Z
2022-03-11T23:37:17.000Z
babybuddy/models.py
HorizonXP/babybuddy
88999233e8c3f02c5e8a514164a0fdc45e3ebe70
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from django.contrib.auth.models import User from django.db import models from django.db.models.signals import post_save from django.dispatch import receiver from django.utils.timezone import timedelta from rest_framework.authtoken.models import Token class Settings(models.Model): user = m...
33.166667
78
0.631339
from django.contrib.auth.models import User from django.db import models from django.db.models.signals import post_save from django.dispatch import receiver from django.utils.timezone import timedelta from rest_framework.authtoken.models import Token class Settings(models.Model): user = models.OneToOneField(Use...
true
true
1c36ee08eadc4e8a79ddf1a224aa04fcbd9fd04e
1,682
py
Python
applicationDriverForRobot/thermalImagingDataCollect/server/tidc_pb2_grpc.py
dkzhang/Robot2019
f85610832a513bd232633a028433512b85c08eae
[ "MIT" ]
null
null
null
applicationDriverForRobot/thermalImagingDataCollect/server/tidc_pb2_grpc.py
dkzhang/Robot2019
f85610832a513bd232633a028433512b85c08eae
[ "MIT" ]
null
null
null
applicationDriverForRobot/thermalImagingDataCollect/server/tidc_pb2_grpc.py
dkzhang/Robot2019
f85610832a513bd232633a028433512b85c08eae
[ "MIT" ]
null
null
null
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc import tidc_pb2 as tidc__pb2 class ThermalImagingDataCollectServiceStub(object): """The ThermalImagingDataCollect service definition. """ def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel....
35.787234
96
0.78478
import grpc import tidc_pb2 as tidc__pb2 class ThermalImagingDataCollectServiceStub(object): def __init__(self, channel): self.CollectThermalImagingData = channel.unary_unary( '/thermalImagingDataCollect.ThermalImagingDataCollectService/CollectThermalImagingData', request_serializer=tidc__pb2...
true
true
1c36ef60af9973dfa95f8a932a2a3e29b3034b63
6,077
py
Python
src/oci/core/models/tunnel_route_summary.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/core/models/tunnel_route_summary.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/core/models/tunnel_route_summary.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
28.800948
245
0.623169
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class TunnelRouteSummary(object): ADVERTISER_CUSTOMER = "CUSTOMER" ADVERTISER_ORACLE = "ORACLE" d...
true
true
1c36ef6f98fb05e3e891633e540655d100080f7a
2,129
py
Python
json/basic.py
keys4words/oop
ddb80de06fcba8075632b6fdd620bb64056634d3
[ "Apache-2.0" ]
null
null
null
json/basic.py
keys4words/oop
ddb80de06fcba8075632b6fdd620bb64056634d3
[ "Apache-2.0" ]
2
2021-06-09T07:03:54.000Z
2022-03-12T00:55:18.000Z
json/basic.py
keys4words/oop
ddb80de06fcba8075632b6fdd620bb64056634d3
[ "Apache-2.0" ]
null
null
null
import json, datetime data = { 'first_name': 'Eugene', 'last_name': 'Petrov', 'age': 35, 'hobbies': [ 'guitar', 'cars', 'mountains', 'adventures' ] } # convert dict to json string json_data = json.dumps(data) # print(json_data) # write dict to json file # with open...
23.395604
76
0.582903
import json, datetime data = { 'first_name': 'Eugene', 'last_name': 'Petrov', 'age': 35, 'hobbies': [ 'guitar', 'cars', 'mountains', 'adventures' ] } json_data = json.dumps(data) json_data = '{"first_name": "Eugene"}' data = json.loads(json_data) with op...
true
true
1c36ef7fa7aeb5daefd24ab4335d932525bf8267
20,992
py
Python
use_cases/TensorRT_object_detection/uff_ssd/voc_evaluation.py
itselavia/edge-computing-platform-for-deep-learning-apps
43f0737d5635296b83be0eeba52d1a5d430df08f
[ "MIT" ]
1
2021-05-19T19:39:59.000Z
2021-05-19T19:39:59.000Z
use_cases/TensorRT_object_detection/uff_ssd/voc_evaluation.py
itselavia/edge-computing-platform-for-deep-learning-apps
43f0737d5635296b83be0eeba52d1a5d430df08f
[ "MIT" ]
null
null
null
use_cases/TensorRT_object_detection/uff_ssd/voc_evaluation.py
itselavia/edge-computing-platform-for-deep-learning-apps
43f0737d5635296b83be0eeba52d1a5d430df08f
[ "MIT" ]
1
2021-08-08T06:49:42.000Z
2021-08-08T06:49:42.000Z
#!/usr/bin/env python3 # # Copyright (c) 2021, NVIDIA CORPORATION. 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 # # ...
42.493927
112
0.672875
import sys import os import ctypes import time import argparse import glob if sys.version_info[0] == 2: import xml.etree.cElementTree as ET else: import xml.etree.ElementTree as ET import numpy as np import tensorrt as trt from PIL import Image import utils.inference as inference_utils imp...
true
true
1c36f0a2e49e20d854c8f83d1daf80698cc45545
4,588
py
Python
news/announce.py
Goom11/vscode-python
2070c68fb35cfe5f2f62870b796fd120e367bd7d
[ "MIT" ]
1
2022-02-17T12:35:37.000Z
2022-02-17T12:35:37.000Z
news/announce.py
chrisjsewell/vscode-python
293b117b96b214546f8f2ca43a20c1f91411207a
[ "MIT" ]
null
null
null
news/announce.py
chrisjsewell/vscode-python
293b117b96b214546f8f2ca43a20c1f91411207a
[ "MIT" ]
1
2022-02-17T12:35:45.000Z
2022-02-17T12:35:45.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. """Generate the changelog. Usage: announce [--dry_run | --interim | --final] [<directory>] """ import dataclasses import enum import operator import os import pathlib import re import subprocess import sys import docopt ...
26.830409
86
0.634917
import dataclasses import enum import operator import os import pathlib import re import subprocess import sys import docopt FILENAME_RE = re.compile(r"(?P<issue>\d+)(?P<nonce>-\S+)?\.md") @dataclasses.dataclass class NewsEntry: issue_number: int description: str path: pathlib.Path def news_entri...
true
true
1c36f0b9738235174619666944ab690ac69c8ec7
1,709
py
Python
app/core/migrations/0001_initial.py
netolenildo/recipe-app-api
6fa1620e9b47e515a36be94ffdab6b1a2c178d78
[ "MIT" ]
null
null
null
app/core/migrations/0001_initial.py
netolenildo/recipe-app-api
6fa1620e9b47e515a36be94ffdab6b1a2c178d78
[ "MIT" ]
null
null
null
app/core/migrations/0001_initial.py
netolenildo/recipe-app-api
6fa1620e9b47e515a36be94ffdab6b1a2c178d78
[ "MIT" ]
null
null
null
# Generated by Django 3.1.7 on 2021-03-04 00:26 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_max_length'), ] operations = [ migrations.CreateModel( name='User', ...
50.264706
266
0.63897
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_max_length'), ] operations = [ migrations.CreateModel( name='User', fields=[ ('id', models.A...
true
true
1c36f23539322a7f2ccaf1b58e6caf95efe0a405
2,122
py
Python
ICD11OWLConverter/namespaces.py
hsolbrig/ICD11OWLConverter
45ec2bce559b04ae6a190ef2467eb225319c9bb2
[ "MIT" ]
null
null
null
ICD11OWLConverter/namespaces.py
hsolbrig/ICD11OWLConverter
45ec2bce559b04ae6a190ef2467eb225319c9bb2
[ "MIT" ]
null
null
null
ICD11OWLConverter/namespaces.py
hsolbrig/ICD11OWLConverter
45ec2bce559b04ae6a190ef2467eb225319c9bb2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2014, Mayo Clinic # 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 ...
46.130435
84
0.722903
from rdflib.namespace import Namespace, OWL, NamespaceManager from rdflib import Graph WHO = Namespace("http://id.who.int/icd/entity/") SCT = Namespace("http://snomed.info/id/") ICDF = Namespace("http://who.int/field/") ICDM = Namespace("http://id.who.int/icd/map/") ICDCG = Namespace("http...
true
true
1c36f2f8385ed7a5a63eaa544502c065aaab6fa5
666
py
Python
game_seq_embedder/app/cp_py_file.py
Anonymous9999999/Pretrain-via-MTC
bc47c162aecb68708b68d8ff7c9bfd54b0fc485e
[ "Artistic-1.0-Perl" ]
null
null
null
game_seq_embedder/app/cp_py_file.py
Anonymous9999999/Pretrain-via-MTC
bc47c162aecb68708b68d8ff7c9bfd54b0fc485e
[ "Artistic-1.0-Perl" ]
null
null
null
game_seq_embedder/app/cp_py_file.py
Anonymous9999999/Pretrain-via-MTC
bc47c162aecb68708b68d8ff7c9bfd54b0fc485e
[ "Artistic-1.0-Perl" ]
null
null
null
def main(): file_path = '/Users/jiashupu/netease_projects/game_bert/app/pjs_bert_model/bert_model.py' save_path = '/Users/jiashupu/netease_projects/game_seq_embedder/game_seq_embedder/custom_models/bert_model.py' with open(file_path, 'r') as f_r: with open(save_path, 'w') as f_w: for li...
37
114
0.62012
def main(): file_path = '/Users/jiashupu/netease_projects/game_bert/app/pjs_bert_model/bert_model.py' save_path = '/Users/jiashupu/netease_projects/game_seq_embedder/game_seq_embedder/custom_models/bert_model.py' with open(file_path, 'r') as f_r: with open(save_path, 'w') as f_w: for li...
true
true
1c36f3346ca0de9e9624c94547d2f642de91dff1
2,858
py
Python
analysis_scripts/reference.py
gautelinga/-BERNAISE
aa45ae5ccc323d9c61c93542cc327889cae4d0b2
[ "MIT" ]
15
2017-07-19T18:33:26.000Z
2021-03-25T18:36:47.000Z
analysis_scripts/reference.py
gautelinga/-BERNAISE
aa45ae5ccc323d9c61c93542cc327889cae4d0b2
[ "MIT" ]
9
2017-05-30T16:13:08.000Z
2017-08-25T09:09:05.000Z
analysis_scripts/reference.py
gautelinga/-BERNAISE
aa45ae5ccc323d9c61c93542cc327889cae4d0b2
[ "MIT" ]
7
2018-05-08T22:50:15.000Z
2020-06-25T13:50:37.000Z
""" reference script """ from common import info, info_split, info_on_red, info_cyan from utilities.TimeSeries import TimeSeries import os from postprocess import rank, compute_norms import dolfin as df from utilities.plot import plot_any_field def description(ts, **kwargs): info("""Compare to numerical reference...
35.283951
79
0.620014
from common import info, info_split, info_on_red, info_cyan from utilities.TimeSeries import TimeSeries import os from postprocess import rank, compute_norms import dolfin as df from utilities.plot import plot_any_field def description(ts, **kwargs): info("""Compare to numerical reference at given timestep. The ...
true
true
1c36f35a446d49c3031b2b4e597087cdccf2c803
241
py
Python
python/python/collections/sets.py
othonreyes/code_problems
6e65b26120b0b9d6e5ac7342a4d964696b7bd5bf
[ "MIT" ]
null
null
null
python/python/collections/sets.py
othonreyes/code_problems
6e65b26120b0b9d6e5ac7342a4d964696b7bd5bf
[ "MIT" ]
null
null
null
python/python/collections/sets.py
othonreyes/code_problems
6e65b26120b0b9d6e5ac7342a4d964696b7bd5bf
[ "MIT" ]
null
null
null
my_set = set() print('Empty set', my_set) if my_set: print('Unexpected') else: print('set is empty') my_set.add(2) print(my_set) if 2 in my_set: print('set has a 2') # not possible -> gives error #print('set has a ', my_set.get(2))
15.0625
35
0.655602
my_set = set() print('Empty set', my_set) if my_set: print('Unexpected') else: print('set is empty') my_set.add(2) print(my_set) if 2 in my_set: print('set has a 2')
true
true
1c36f4ad6150ac7841dbf0d6aba3c06c73bed03b
1,089
py
Python
tests/conftest.py
the-scouts/incognita
f0634f3d812b816ad3d46f55e88d7524ebf81d32
[ "MIT" ]
2
2019-06-14T08:05:24.000Z
2021-01-03T00:18:07.000Z
tests/conftest.py
the-scouts/geo_mapping
f0634f3d812b816ad3d46f55e88d7524ebf81d32
[ "MIT" ]
47
2019-06-17T21:27:57.000Z
2021-03-11T00:27:47.000Z
tests/conftest.py
the-scouts/incognita
f0634f3d812b816ad3d46f55e88d7524ebf81d32
[ "MIT" ]
null
null
null
from pathlib import Path import sys import geopandas as gpd from hypothesis.extra.pandas import column from hypothesis.extra.pandas import data_frames from hypothesis.extra.pandas import range_indexes import hypothesis.strategies as st import pytest # https://github.com/pytest-dev/pytest/issues/2421#issuecomment-4037...
28.657895
111
0.730028
from pathlib import Path import sys import geopandas as gpd from hypothesis.extra.pandas import column from hypothesis.extra.pandas import data_frames from hypothesis.extra.pandas import range_indexes import hypothesis.strategies as st import pytest (Path(__file__).parent.parent / "src")) from incognita.utility impo...
true
true
1c36f4c7a53b26194cae5792d84114cb9c6f00fe
5,491
py
Python
play_midi.py
curtissimo41/Player-Piano-19363
41123ec1e62cfee0ab7b4b511407f141e5f0e169
[ "Apache-2.0" ]
null
null
null
play_midi.py
curtissimo41/Player-Piano-19363
41123ec1e62cfee0ab7b4b511407f141e5f0e169
[ "Apache-2.0" ]
null
null
null
play_midi.py
curtissimo41/Player-Piano-19363
41123ec1e62cfee0ab7b4b511407f141e5f0e169
[ "Apache-2.0" ]
null
null
null
import mido import json import time from math import floor import board import busio import digitalio import adafruit_tlc5947 def reset_key(): SCK = board.SCK MOSI = board.MOSI LATCH = digitalio.DigitalInOut(board.D5) # Initialize SPI bus. spi = busio.SPI(clock=SCK, MOSI=MOSI) # Initialize T...
31.557471
90
0.54562
import mido import json import time from math import floor import board import busio import digitalio import adafruit_tlc5947 def reset_key(): SCK = board.SCK MOSI = board.MOSI LATCH = digitalio.DigitalInOut(board.D5) spi = busio.SPI(clock=SCK, MOSI=MOSI) tlc5947 = adafruit_tlc5947.TLC...
true
true
1c36f590764cc4744af1edb5112986a53a690fe4
2,558
py
Python
utils/config.py
k4r4koyun/HeadFuzz
efb3481e55e48102fd8c8329328b233ac62f2af7
[ "MIT" ]
null
null
null
utils/config.py
k4r4koyun/HeadFuzz
efb3481e55e48102fd8c8329328b233ac62f2af7
[ "MIT" ]
null
null
null
utils/config.py
k4r4koyun/HeadFuzz
efb3481e55e48102fd8c8329328b233ac62f2af7
[ "MIT" ]
1
2019-07-21T01:31:40.000Z
2019-07-21T01:31:40.000Z
class Config(): TEST_LEVEL_OPTIMAL = 1 TEST_LEVEL_PARTIAL = 2 TEST_LEVEL_ALL = 3 logger = None initial_response = None static_cookies = [] max_workers = 20 test_level = 1 verbosity = 1 revshell_ip = "0.0.0.0" revshell_port = 1337 exclude_code = ["...
29.068182
49
0.556294
class Config(): TEST_LEVEL_OPTIMAL = 1 TEST_LEVEL_PARTIAL = 2 TEST_LEVEL_ALL = 3 logger = None initial_response = None static_cookies = [] max_workers = 20 test_level = 1 verbosity = 1 revshell_ip = "0.0.0.0" revshell_port = 1337 exclude_code = ["...
true
true
1c36f59fdc7ca39d695d84d405ea0cd961c3dbc9
868
py
Python
projects/migrations/0012_auto_20210709_0511.py
dennereed/paleocore
d6da6c39cde96050ee4b9e7213ec1200530cbeee
[ "MIT" ]
1
2021-02-05T19:50:13.000Z
2021-02-05T19:50:13.000Z
projects/migrations/0012_auto_20210709_0511.py
dennereed/paleocore
d6da6c39cde96050ee4b9e7213ec1200530cbeee
[ "MIT" ]
59
2020-06-17T22:21:51.000Z
2022-02-10T05:00:01.000Z
projects/migrations/0012_auto_20210709_0511.py
dennereed/paleocore
d6da6c39cde96050ee4b9e7213ec1200530cbeee
[ "MIT" ]
2
2020-07-01T14:11:09.000Z
2020-08-10T17:27:26.000Z
# Generated by Django 2.2.24 on 2021-07-09 05:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('projects', '0011_auto_20210306_0019'), ] operations = [ migrations.AlterField( model_name='projectpage', name='app_...
45.684211
522
0.569124
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('projects', '0011_auto_20210306_0019'), ] operations = [ migrations.AlterField( model_name='projectpage', name='app_label', field=models.CharField(blank...
true
true
1c36f5b3320823b6274a12212efadc4ad122a74a
265
py
Python
utils/__init__.py
hhsummerwind/few-shot
48fdf3137271d5cc908fe0071dd0cf9da1ba574e
[ "MIT" ]
null
null
null
utils/__init__.py
hhsummerwind/few-shot
48fdf3137271d5cc908fe0071dd0cf9da1ba574e
[ "MIT" ]
null
null
null
utils/__init__.py
hhsummerwind/few-shot
48fdf3137271d5cc908fe0071dd0cf9da1ba574e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Copyright 2021 HuHui, Inc. All Rights Reserved. @author: HuHui @software: PyCharm @project: few-shot @file: __init__.py @version: v1.0 @time: 2021/10/9 下午4:05 ------------------------------------------------- Description : 工程文件说明: """
17.666667
49
0.54717
true
true
1c36f73c1d6c033f462ea0470b5c45c07f6916bf
7,879
py
Python
clients/client/python/ory_client/model/ui_node_input_attributes.py
kolotaev/sdk
0dda1becd70be8d7b9d678321ebe780c1ba00485
[ "Apache-2.0" ]
null
null
null
clients/client/python/ory_client/model/ui_node_input_attributes.py
kolotaev/sdk
0dda1becd70be8d7b9d678321ebe780c1ba00485
[ "Apache-2.0" ]
null
null
null
clients/client/python/ory_client/model/ui_node_input_attributes.py
kolotaev/sdk
0dda1becd70be8d7b9d678321ebe780c1ba00485
[ "Apache-2.0" ]
null
null
null
""" Ory APIs Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501 The version of the OpenAPI document: v0.0.1-alpha.17 Contact: support@ory.sh Generated by: htt...
40.19898
194
0.578754
import re import sys from ory_client.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) def la...
true
true
1c36f78972a914fd786fc8b609d09c9503057bdf
117,517
py
Python
libs/SmartMeshSDK/HartMgrConnector/HartMgrConnector.py
realms-team/rangetest
19cfee769f095ea146cb2d12cc303e92a2b3e7b0
[ "BSD-3-Clause" ]
null
null
null
libs/SmartMeshSDK/HartMgrConnector/HartMgrConnector.py
realms-team/rangetest
19cfee769f095ea146cb2d12cc303e92a2b3e7b0
[ "BSD-3-Clause" ]
null
null
null
libs/SmartMeshSDK/HartMgrConnector/HartMgrConnector.py
realms-team/rangetest
19cfee769f095ea146cb2d12cc303e92a2b3e7b0
[ "BSD-3-Clause" ]
null
null
null
''' This module was generated automatically. Do not edit directly. ''' import collections from SmartMeshSDK import ApiException from HartMgrConnectorInternal import HartMgrConnectorInternal ## # \addtogroup HartMgrConnector # \{ # class HartMgrConnector(HartMgrConnectorInternal): ''' \bri...
48.681442
566
0.635729
import collections from SmartMeshSDK import ApiException from HartMgrConnectorInternal import HartMgrConnectorInternal class HartMgrConnector(HartMgrConnectorInternal): Tuple_dn_activateAdvertising = collections.namedtuple("Tuple_dn_activateAdvertising", ['result...
true
true
1c36f7f91a7bb447c89b9a5728149beb493fa769
3,522
py
Python
ib_insync/__init__.py
vishalbelsare/ib_insync
9674fe974c07ca3afaf70673ae296f1d19f028dc
[ "BSD-2-Clause" ]
1
2021-12-14T15:21:05.000Z
2021-12-14T15:21:05.000Z
ib_insync/__init__.py
vishalbelsare/ib_insync
9674fe974c07ca3afaf70673ae296f1d19f028dc
[ "BSD-2-Clause" ]
null
null
null
ib_insync/__init__.py
vishalbelsare/ib_insync
9674fe974c07ca3afaf70673ae296f1d19f028dc
[ "BSD-2-Clause" ]
null
null
null
"""Python sync/async framework for Interactive Brokers API""" import dataclasses import sys from eventkit import Event from . import util from .client import Client from .contract import ( Bag, Bond, CFD, ComboLeg, Commodity, ContFuture, Contract, ContractDescription, ContractDetails, Crypto, DeltaNeutralCon...
46.96
79
0.744179
import dataclasses import sys from eventkit import Event from . import util from .client import Client from .contract import ( Bag, Bond, CFD, ComboLeg, Commodity, ContFuture, Contract, ContractDescription, ContractDetails, Crypto, DeltaNeutralContract, Forex, Future, FuturesOption, Index, MutualFund, Op...
true
true
1c36f82445ad62b20ee06449ad4f4e886162ec91
77,986
py
Python
examples/python/bus_driver_scheduling_flow_sat.py
sreesubbash/or-tools
701496e45d54fa9938afeedec43089314d93ec11
[ "Apache-2.0" ]
1
2021-03-30T21:10:27.000Z
2021-03-30T21:10:27.000Z
examples/python/bus_driver_scheduling_flow_sat.py
sreesubbash/or-tools
701496e45d54fa9938afeedec43089314d93ec11
[ "Apache-2.0" ]
null
null
null
examples/python/bus_driver_scheduling_flow_sat.py
sreesubbash/or-tools
701496e45d54fa9938afeedec43089314d93ec11
[ "Apache-2.0" ]
null
null
null
# Copyright 2010-2018 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
42.708653
86
0.472559
import argparse import collections import math from ortools.sat.python import cp_model PARSER = argparse.ArgumentParser() PARSER.add_argument( '--instance', default=1, type=int, help='Instance number (1..3).') PARSER.add_argument( '--output_proto', default="", help='Output file to write t...
true
true
1c36f8727a8c0b2f265c26b2f088514cb1683637
2,238
py
Python
auth0/v3/management/user_blocks.py
santiagoroman/auth0-python
b88b056d0c68eb26a1171f33273010faf8fefe63
[ "MIT" ]
null
null
null
auth0/v3/management/user_blocks.py
santiagoroman/auth0-python
b88b056d0c68eb26a1171f33273010faf8fefe63
[ "MIT" ]
null
null
null
auth0/v3/management/user_blocks.py
santiagoroman/auth0-python
b88b056d0c68eb26a1171f33273010faf8fefe63
[ "MIT" ]
null
null
null
from .rest import RestClient class UserBlocks(object): """Auth0 user blocks endpoints Args: domain (str): Your Auth0 domain, e.g: 'username.auth0.com' token (str): Management API v2 Token telemetry (bool, optional): Enable or disable Telemetry (defaults to True) ...
28.692308
92
0.613941
from .rest import RestClient class UserBlocks(object): def __init__(self, domain, token, telemetry=True, timeout=5.0): self.domain = domain self.client = RestClient(jwt=token, telemetry=telemetry, timeout=timeout) def _url(self, id=None): url = 'https://{}/api/v2/user-blocks'.format(...
true
true
1c36fa0d3df2bd6a7220128477fc2e436484191f
4,762
py
Python
tests/test_cli.py
repo-helper/simple503
21e7f0c55ef11ac79e541206678afdff54c67fa4
[ "MIT" ]
null
null
null
tests/test_cli.py
repo-helper/simple503
21e7f0c55ef11ac79e541206678afdff54c67fa4
[ "MIT" ]
5
2021-06-26T22:26:03.000Z
2022-02-03T13:40:49.000Z
tests/test_cli.py
repo-helper/simple503
21e7f0c55ef11ac79e541206678afdff54c67fa4
[ "MIT" ]
1
2021-12-01T13:45:09.000Z
2021-12-01T13:45:09.000Z
# 3rd party import pytest from apeye import URL from bs4 import BeautifulSoup # type: ignore from coincidence.regressions import AdvancedDataRegressionFixture, AdvancedFileRegressionFixture from consolekit.testing import CliRunner from domdf_python_tools.paths import PathPlus, sort_paths from shippinglabel.checksum im...
32.616438
102
0.773625
import pytest from apeye import URL from bs4 import BeautifulSoup from coincidence.regressions import AdvancedDataRegressionFixture, AdvancedFileRegressionFixture from consolekit.testing import CliRunner from domdf_python_tools.paths import PathPlus, sort_paths from shippinglabel.checksum import check_sha256_hash ...
true
true
1c36fbbeb9e27780692065c9591c3f9718265124
2,083
py
Python
setup.py
demonzyj56/compare_gan
560697ee213f91048c6b4231ab79fcdd9bf20381
[ "Apache-2.0" ]
2
2019-07-25T20:49:33.000Z
2019-08-07T02:54:34.000Z
setup.py
xiao7199/compare_gan
ac821a979ccb5ed46e0a441f87abc9bfd3c37417
[ "Apache-2.0" ]
null
null
null
setup.py
xiao7199/compare_gan
ac821a979ccb5ed46e0a441f87abc9bfd3c37417
[ "Apache-2.0" ]
1
2019-10-16T21:02:08.000Z
2019-10-16T21:02:08.000Z
# coding=utf-8 # Copyright 2018 Google LLC & Hwalsuk Lee. # # 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 ...
32.046154
74
0.635622
from setuptools import find_packages from setuptools import setup setup( name='compare_gan', version='1.0', description=('Compare GAN - code from "Are GANs created equal? ' 'A Large Scale Study" paper'), author='Google LLC', author_email='no-reply@google.com', u...
true
true
1c36fc0e7fdff83e271e1a2652306a4f105405b5
5,000
py
Python
Day_4_Loops/forloops.py
ValRCS/Python_TietoEvry_Sep2021
e11dac38deb17ba695ce8ad9dab9cf78b4adb99d
[ "MIT" ]
null
null
null
Day_4_Loops/forloops.py
ValRCS/Python_TietoEvry_Sep2021
e11dac38deb17ba695ce8ad9dab9cf78b4adb99d
[ "MIT" ]
null
null
null
Day_4_Loops/forloops.py
ValRCS/Python_TietoEvry_Sep2021
e11dac38deb17ba695ce8ad9dab9cf78b4adb99d
[ "MIT" ]
null
null
null
# # # # # # for loops are for definite iteration # # # # # # # for num in range(5): # range is sort of half ready number sequence , num is a variable created for each iteration # # range starts with 0 and ends with 4 # print(num) # print("Hello there!") # print("Number is", num) # print("out of loop", ...
33.333333
116
0.539
true
true
1c36fcd88bce4cd7e7306fd04a45ece8623f9ccb
20,343
py
Python
test/functional/test_runner.py
danigarcia3k/Sikacoin
82ef600cfeed1d8f163df6071d8d080fb9dac6b0
[ "MIT" ]
null
null
null
test/functional/test_runner.py
danigarcia3k/Sikacoin
82ef600cfeed1d8f163df6071d8d080fb9dac6b0
[ "MIT" ]
null
null
null
test/functional/test_runner.py
danigarcia3k/Sikacoin
82ef600cfeed1d8f163df6071d8d080fb9dac6b0
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Sikacoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Run regression test suite. This module calls down into individual test cases via subprocess. It will ...
38.455577
195
0.624588
import argparse import configparser import datetime import os import time import shutil import signal import sys import subprocess import tempfile import re import logging BOLD, BLUE, RED, GREY = ("", ""), ("", ""), ("", ""), ("", "") try: "\u2713".encode("utf_8").decode(sys.stdout.encoding) TICK = ...
true
true
1c36fcd9466fe0ce60710afead213d504cee3a79
3,309
py
Python
src/python/turicreate/toolkits/_data_zoo.py
duoxiu/turicreate
befe2d300dcbf6297db5ca139b4500dc38739884
[ "BSD-3-Clause" ]
1
2020-02-21T02:24:45.000Z
2020-02-21T02:24:45.000Z
src/python/turicreate/toolkits/_data_zoo.py
lukereichold/turicreate
8b4b56b54e5f232caf3ba85cab9d24ab43c9ce48
[ "BSD-3-Clause" ]
null
null
null
src/python/turicreate/toolkits/_data_zoo.py
lukereichold/turicreate
8b4b56b54e5f232caf3ba85cab9d24ab43c9ce48
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright © 2019 Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can # be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from __future__ import print_function as _ from __future__ import division as _ from...
42.423077
85
0.697794
from __future__ import print_function as _ from __future__ import division as _ from __future__ import absolute_import as _ import os as _os import turicreate as _tc import shutil as _shutil import tarfile as _tarfile from six.moves.urllib import parse as _urlparse from ._pre_trained_models import _download_and_...
true
true
1c36fd721dd54f2efa5b0a79b0e253d84c2132e1
1,028
py
Python
dsh.py
joeportela/tinyAPI
f2469c38a605b00519acd0b79af17d0041f5ae7b
[ "MIT" ]
6
2016-11-18T22:32:44.000Z
2021-04-01T17:02:13.000Z
dsh.py
joeportela/tinyAPI
f2469c38a605b00519acd0b79af17d0041f5ae7b
[ "MIT" ]
1
2018-12-20T23:07:52.000Z
2018-12-20T23:07:52.000Z
dsh.py
joeportela/tinyAPI
f2469c38a605b00519acd0b79af17d0041f5ae7b
[ "MIT" ]
10
2018-02-23T00:08:21.000Z
2020-10-01T03:06:12.000Z
# ----- Info ------------------------------------------------------------------ __author__ = 'Michael Montero <mcmontero@gmail.com>' # ----- Imports --------------------------------------------------------------- from tinyAPI.base.data_store.provider import DataStoreNOOP from tinyAPI.base.data_store.provider import ...
24.47619
79
0.467899
__author__ = 'Michael Montero <mcmontero@gmail.com>' from tinyAPI.base.data_store.provider import DataStoreNOOP from tinyAPI.base.data_store.provider import DataStoreProvider import tinyAPI __all__ = [ 'dsh' ] class __DSH(object): def __init__(self): self.__provider = None def __call__(...
true
true
1c36fe3469e8630cf2977884381c3dcbc4804759
4,498
py
Python
alerta/auth/utils.py
middelthun/alerta
dd335ffe319dd235b68508105542a90627810326
[ "Apache-2.0" ]
null
null
null
alerta/auth/utils.py
middelthun/alerta
dd335ffe319dd235b68508105542a90627810326
[ "Apache-2.0" ]
null
null
null
alerta/auth/utils.py
middelthun/alerta
dd335ffe319dd235b68508105542a90627810326
[ "Apache-2.0" ]
null
null
null
import logging from datetime import datetime, timedelta from flask import request, current_app from six import text_type from uuid import uuid4 from alerta.exceptions import ApiError, NoCustomerMatch from alerta.models.customer import Customer from alerta.models.permission import Permission from alerta.models.token im...
33.819549
132
0.667408
import logging from datetime import datetime, timedelta from flask import request, current_app from six import text_type from uuid import uuid4 from alerta.exceptions import ApiError, NoCustomerMatch from alerta.models.customer import Customer from alerta.models.permission import Permission from alerta.models.token im...
true
true
1c36fea3b329a56b54983a4c212098e2526b8ecd
548
py
Python
homeassistant/components/uptime/__init__.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/uptime/__init__.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
homeassistant/components/uptime/__init__.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""The Uptime integration.""" from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from .const import PLATFORMS async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: """Set up from a config entry.""" hass.config_entries.async_setup_platform...
32.235294
78
0.773723
from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from .const import PLATFORMS async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: hass.config_entries.async_setup_platforms(entry, PLATFORMS) return True async def async_unload_entry(h...
true
true
1c36ffae08435340133585e2a0680cd7af417f6e
9,131
py
Python
dcgan.py
csquigley/dcgan
985280b5c6875062f728afe37cfb76d93a58dfb1
[ "MIT" ]
null
null
null
dcgan.py
csquigley/dcgan
985280b5c6875062f728afe37cfb76d93a58dfb1
[ "MIT" ]
null
null
null
dcgan.py
csquigley/dcgan
985280b5c6875062f728afe37cfb76d93a58dfb1
[ "MIT" ]
null
null
null
from __future__ import print_function #%matplotlib inline import argparse import os import random import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim as optim import torch.utils.data import torchvision.datasets as dset import torchvision.transforms as tran...
32.963899
114
0.606724
from __future__ import print_function import argparse import os import random import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim as optim import torch.utils.data import torchvision.datasets as dset import torchvision.transforms as transforms import torch...
true
true
1c37008de8c4cd8a308668060f85a86108ea0e09
429
py
Python
rename_list_midi_files.py
pyweeker/my_audio_toolbox
49afbd00a5bbb3fd6f2a19d2a531f18ce7ab432e
[ "MIT" ]
null
null
null
rename_list_midi_files.py
pyweeker/my_audio_toolbox
49afbd00a5bbb3fd6f2a19d2a531f18ce7ab432e
[ "MIT" ]
null
null
null
rename_list_midi_files.py
pyweeker/my_audio_toolbox
49afbd00a5bbb3fd6f2a19d2a531f18ce7ab432e
[ "MIT" ]
null
null
null
import os cwd = os.getcwd() files = [f for f in os.listdir(cwd) if os.path.isfile(f)] print(files) for file in files: if file.endswith('.mid'): filename, file_extension = os.path.splitext(file) print(f" filename {filename}") #print(f" file_extension {file_extension}") ...
16.5
57
0.589744
import os cwd = os.getcwd() files = [f for f in os.listdir(cwd) if os.path.isfile(f)] print(files) for file in files: if file.endswith('.mid'): filename, file_extension = os.path.splitext(file) print(f" filename {filename}") os.rename(filename+'.mid', fil...
true
true
1c3701584832569ff925fc02a62c5db6b1631211
1,144
py
Python
setup.py
saumalya75/parseval
d5e8c0c6cab2b8c236d1f728314eeb0a804401a7
[ "MIT" ]
1
2020-08-02T10:24:56.000Z
2020-08-02T10:24:56.000Z
setup.py
saumalya75/parseval
d5e8c0c6cab2b8c236d1f728314eeb0a804401a7
[ "MIT" ]
25
2020-07-25T14:51:52.000Z
2020-08-29T15:26:04.000Z
setup.py
saumalya75/parseval
d5e8c0c6cab2b8c236d1f728314eeb0a804401a7
[ "MIT" ]
null
null
null
from setuptools import setup def _long_description(): with open("README.md", "r") as fh: return fh.read() setup( name='parseval', packages=["parseval"], version="1.0.0", license='MIT', description='parseval is a data validation tool for python. It provides numerous API to parse and v...
34.666667
218
0.663462
from setuptools import setup def _long_description(): with open("README.md", "r") as fh: return fh.read() setup( name='parseval', packages=["parseval"], version="1.0.0", license='MIT', description='parseval is a data validation tool for python. It provides numerous API to parse and v...
true
true
1c370199f03f0316f9ba7ccc1ad8d26703c09ed0
330
py
Python
hashtable/451 sort characters by frequency.py
windowssocket/py_leetcode
241dbf8d7dab7db5215c2526321fcdb378b45492
[ "Apache-2.0" ]
3
2018-05-29T02:29:40.000Z
2020-02-05T03:28:16.000Z
hashtable/451 sort characters by frequency.py
xidongc/py_leetcode
241dbf8d7dab7db5215c2526321fcdb378b45492
[ "Apache-2.0" ]
1
2019-03-08T13:22:32.000Z
2019-03-08T13:22:32.000Z
hashtable/451 sort characters by frequency.py
xidongc/py_leetcode
241dbf8d7dab7db5215c2526321fcdb378b45492
[ "Apache-2.0" ]
3
2018-05-29T11:50:24.000Z
2018-11-27T12:31:01.000Z
import collections class Solution(object): def frequencySort(self, s): """ :type s: str :rtype: str """ count = collections.Counter(s).most_common() res = '' for c, v in count: res += c * v return res s = Solution() print(s.frequencySort(...
18.333333
52
0.512121
import collections class Solution(object): def frequencySort(self, s): count = collections.Counter(s).most_common() res = '' for c, v in count: res += c * v return res s = Solution() print(s.frequencySort('tree'))
true
true
1c370219ff490e2774c463d12a828e17f522874b
569
py
Python
src/glod/api/counterparty_leaf.py
gordon-elliott/glod
a381e21455d05d9c005942a3dee4ac67e10f366a
[ "MIT" ]
null
null
null
src/glod/api/counterparty_leaf.py
gordon-elliott/glod
a381e21455d05d9c005942a3dee4ac67e10f366a
[ "MIT" ]
1
2021-03-10T16:48:34.000Z
2021-03-10T16:48:34.000Z
src/glod/api/counterparty_leaf.py
gordon-elliott/glod
a381e21455d05d9c005942a3dee4ac67e10f366a
[ "MIT" ]
null
null
null
__copyright__ = 'Copyright(c) Gordon Elliott 2018' """ """ import graphene from a_tuin.api import id_with_session, OBJECT_REFERENCE_MAP, leaf_class_interfaces from glod.db.counterparty import Counterparty, CounterpartyInstanceQuery class CounterpartyLeaf(graphene.ObjectType): class Meta: interfaces = ...
24.73913
83
0.778559
__copyright__ = 'Copyright(c) Gordon Elliott 2018' import graphene from a_tuin.api import id_with_session, OBJECT_REFERENCE_MAP, leaf_class_interfaces from glod.db.counterparty import Counterparty, CounterpartyInstanceQuery class CounterpartyLeaf(graphene.ObjectType): class Meta: interfaces = leaf_clas...
true
true
1c37029903262d6febcc779f9f35a9c6597d9f4a
1,918
py
Python
tools/intogen/lib/python/intogensm/ma/service.py
globusgenomics/galaxy
7caf74d9700057587b3e3434c64e82c5b16540f1
[ "CC-BY-3.0" ]
1
2021-02-05T13:19:58.000Z
2021-02-05T13:19:58.000Z
chapter2/intogen-mutations/master/lib/python/intogensm/ma/service.py
chris-zen/phd-thesis
1eefdff8e7ca1910304e27ae42551dc64496b101
[ "Unlicense" ]
null
null
null
chapter2/intogen-mutations/master/lib/python/intogensm/ma/service.py
chris-zen/phd-thesis
1eefdff8e7ca1910304e27ae42551dc64496b101
[ "Unlicense" ]
null
null
null
import re import tempfile from bgcore.request import Request from intogensm.utils import cast_type from model import MaResult class MaService(object): HOST = "mutationassessor.org" ISSUE_UNKNOWN_ID_TYPE = re.compile(r"unknown ID type") ISSUE_REFERENCE_ALLELE = re.compile(r"reference allele: ([ACGT])") def __i...
26.273973
80
0.662148
import re import tempfile from bgcore.request import Request from intogensm.utils import cast_type from model import MaResult class MaService(object): HOST = "mutationassessor.org" ISSUE_UNKNOWN_ID_TYPE = re.compile(r"unknown ID type") ISSUE_REFERENCE_ALLELE = re.compile(r"reference allele: ([ACGT])") def __i...
true
true
1c3702a4725dc95ec597e423aab944458ad0b795
15,261
py
Python
homeassistant/setup.py
charithmadhuranga/core
06329a2f43ba82df6e0c6250fa6965f9259cfe8a
[ "Apache-2.0" ]
1
2021-12-02T23:28:50.000Z
2021-12-02T23:28:50.000Z
homeassistant/setup.py
charithmadhuranga/core
06329a2f43ba82df6e0c6250fa6965f9259cfe8a
[ "Apache-2.0" ]
277
2021-10-04T06:39:33.000Z
2021-12-28T22:04:17.000Z
homeassistant/setup.py
charithmadhuranga/core
06329a2f43ba82df6e0c6250fa6965f9259cfe8a
[ "Apache-2.0" ]
1
2022-01-12T22:14:01.000Z
2022-01-12T22:14:01.000Z
"""All methods needed to bootstrap a Home Assistant instance.""" from __future__ import annotations import asyncio from collections.abc import Awaitable, Callable, Generator, Iterable import contextlib import logging.handlers from timeit import default_timer as timer from types import ModuleType from typing import Any...
33.176087
88
0.659197
from __future__ import annotations import asyncio from collections.abc import Awaitable, Callable, Generator, Iterable import contextlib import logging.handlers from timeit import default_timer as timer from types import ModuleType from typing import Any from . import config as conf_util, core, loader, requirements f...
true
true
1c3702fa54938d319ceb2262c8dde1b46ab76ac7
3,223
py
Python
tests/test_tools/generators.py
Saran-nns/cunumeric
3472109aa3fd6a9d42409586efd39dcb5924e0b5
[ "Apache-2.0" ]
118
2021-04-12T18:06:59.000Z
2021-10-12T21:30:24.000Z
tests/test_tools/generators.py
Saran-nns/cunumeric
3472109aa3fd6a9d42409586efd39dcb5924e0b5
[ "Apache-2.0" ]
51
2021-04-21T10:40:13.000Z
2021-09-10T22:09:26.000Z
tests/test_tools/generators.py
Saran-nns/cunumeric
3472109aa3fd6a9d42409586efd39dcb5924e0b5
[ "Apache-2.0" ]
9
2021-04-14T03:07:42.000Z
2021-09-22T17:02:53.000Z
# Copyright 2021 NVIDIA Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
32.555556
77
0.66615
from itertools import permutations, product import numpy as np from legate.core import LEGATE_MAX_DIM def scalar_gen(lib, val): yield lib.array(val) yield lib.full((), val) for ndim in range(1, LEGATE_MAX_DIM + 1): yield lib.full(ndim * (1,), val) ...
true
true
1c37031ff8fe7181319220c17e93cf7cc1a98777
3,868
py
Python
Lab4/Code/DataPreprocess/preprocess.py
keithnull/EE101
298f2c1dc3c1d6437815525632c0f56b13602f3d
[ "MIT" ]
2
2018-06-12T07:14:33.000Z
2019-06-03T01:53:13.000Z
Lab4/Code/DataPreprocess/preprocess.py
keithnull/Learning-EE101
298f2c1dc3c1d6437815525632c0f56b13602f3d
[ "MIT" ]
null
null
null
Lab4/Code/DataPreprocess/preprocess.py
keithnull/Learning-EE101
298f2c1dc3c1d6437815525632c0f56b13602f3d
[ "MIT" ]
null
null
null
# coding:utf8 from load_data import load_data, timer from feature import FeatureExtracter from sklearn.svm import SVC from sklearn.linear_model import LogisticRegression import pymysql from itertools import combinations @timer def train_SVM(X_train, y_train): model = SVC(kernel="linear", C=1, gamma=0.125) #m...
33.929825
141
0.635212
from load_data import load_data, timer from feature import FeatureExtracter from sklearn.svm import SVC from sklearn.linear_model import LogisticRegression import pymysql from itertools import combinations @timer def train_SVM(X_train, y_train): model = SVC(kernel="linear", C=1, gamma=0.125) print("Sta...
true
true
1c3703c14d9cc8f1d2454aa4174d30f3785cd729
2,134
py
Python
src/euchre/table.py
lawhitmi/euchre
26ab5d7d182872cf27188acb67b6d9df7e927bc3
[ "MIT" ]
null
null
null
src/euchre/table.py
lawhitmi/euchre
26ab5d7d182872cf27188acb67b6d9df7e927bc3
[ "MIT" ]
null
null
null
src/euchre/table.py
lawhitmi/euchre
26ab5d7d182872cf27188acb67b6d9df7e927bc3
[ "MIT" ]
null
null
null
class Table: """ Controls the table printout and trick scoring """ def __init__(self, user, computer, bidcard=None): self.computer = computer self.user = user self.bidcard = bidcard self.trumpsuit = "" self.tricks = {self.user: 0, self.computer: 0} def sho...
28.453333
107
0.527648
class Table: def __init__(self, user, computer, bidcard=None): self.computer = computer self.user = user self.bidcard = bidcard self.trumpsuit = "" self.tricks = {self.user: 0, self.computer: 0} def show_table(self, playedcard1="", playedcard2="", score=None): ...
true
true