hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
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
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
2215d93e411d41c676c848b805a307f50e4e77e9
535
py
Python
tests/test_apps.py
symroe/django-s3file
b0d991814d2a77f4339229119f567ebfa2943b9d
[ "MIT" ]
57
2015-07-04T17:45:50.000Z
2022-03-27T18:13:44.000Z
tests/test_apps.py
Thermondo/django-s3file
8a6a945771c6bd753315098203d8dec8609cc60a
[ "MIT" ]
135
2015-07-07T16:47:27.000Z
2022-03-29T10:15:32.000Z
tests/test_apps.py
Thermondo/django-s3file
8a6a945771c6bd753315098203d8dec8609cc60a
[ "MIT" ]
17
2015-07-07T16:42:26.000Z
2022-03-17T19:57:48.000Z
import importlib from django import forms from s3file.apps import S3FileConfig from s3file.forms import S3FileInputMixin
31.470588
82
0.747664
import importlib from django import forms from s3file.apps import S3FileConfig from s3file.forms import S3FileInputMixin class TestS3FileConfig: def test_ready(self, settings): app = S3FileConfig("s3file", importlib.import_module("tests.testapp")) app.ready() assert not isinstance(forms....
360
2
49
51f51bdd36cd6370adc3c5696d12590cba5f3b49
298
py
Python
coda/coda_mdstore/context.py
unt-libraries/coda
959abc220f49bb9f5b19e13b61714b8be0615412
[ "BSD-3-Clause" ]
2
2015-06-30T04:20:47.000Z
2021-03-31T16:35:35.000Z
coda/coda_mdstore/context.py
unt-libraries/coda
959abc220f49bb9f5b19e13b61714b8be0615412
[ "BSD-3-Clause" ]
141
2015-06-16T20:33:49.000Z
2021-07-12T16:35:06.000Z
coda/coda_mdstore/context.py
unt-libraries/coda
959abc220f49bb9f5b19e13b61714b8be0615412
[ "BSD-3-Clause" ]
1
2017-01-23T19:17:29.000Z
2017-01-23T19:17:29.000Z
from django.contrib.sites.models import Site
27.090909
71
0.711409
from django.contrib.sites.models import Site def site_info(request,): # stash site title on first call try: sinfo = site_info.cached_site_info except AttributeError: sinfo = site_info.cached_site_info = Site.objects.get_current() return {'site_title': sinfo.name}
229
0
23
623d27e794d6980c0fd08dc979d7d2c9c7f138d8
4,078
py
Python
audio.py
ChavesLiu/pytorch-dc-tts
29a1ab11f69b2c4316ae0a8766e995b96385a29f
[ "MIT" ]
145
2018-09-01T04:43:52.000Z
2022-03-29T07:40:01.000Z
audio.py
ChavesLiu/pytorch-dc-tts
29a1ab11f69b2c4316ae0a8766e995b96385a29f
[ "MIT" ]
21
2018-09-27T11:05:54.000Z
2021-09-18T13:10:53.000Z
audio.py
ChavesLiu/pytorch-dc-tts
29a1ab11f69b2c4316ae0a8766e995b96385a29f
[ "MIT" ]
73
2018-08-30T07:39:43.000Z
2022-02-16T15:26:43.000Z
"""These methods are copied from https://github.com/Kyubyong/dc_tts/""" import os import copy import librosa import scipy.io.wavfile import numpy as np from tqdm import tqdm from scipy import signal from hparams import HParams as hp def spectrogram2wav(mag): '''# Generate wave file from linear magnitude spectro...
29.338129
103
0.621138
"""These methods are copied from https://github.com/Kyubyong/dc_tts/""" import os import copy import librosa import scipy.io.wavfile import numpy as np from tqdm import tqdm from scipy import signal from hparams import HParams as hp def spectrogram2wav(mag): '''# Generate wave file from linear magnitude spectro...
0
0
0
39cf279e7cf056e01243e023eba32bc26d7d555f
84
py
Python
app/tests/web/__init__.py
BrunoComitre/kollector
b436862a9ce613fc40734f4d27561dd7c2e8cd52
[ "MIT" ]
null
null
null
app/tests/web/__init__.py
BrunoComitre/kollector
b436862a9ce613fc40734f4d27561dd7c2e8cd52
[ "MIT" ]
null
null
null
app/tests/web/__init__.py
BrunoComitre/kollector
b436862a9ce613fc40734f4d27561dd7c2e8cd52
[ "MIT" ]
null
null
null
# Copyright (c) DEV Corporation. All rights reserved. # Licensed under MIT License.
28
53
0.761905
# Copyright (c) DEV Corporation. All rights reserved. # Licensed under MIT License.
0
0
0
bdffeeca662ddf2dccc9b5b5c6641420dfd92135
4,348
py
Python
medical/settings.py
Vpingdevil/medstore
3e03fc825c4f8f370bed37ab24a0bb13ab0a97af
[ "MIT" ]
2
2021-03-24T13:36:39.000Z
2022-02-10T13:51:59.000Z
medical/settings.py
Vpingdevil/Django_Sample
3e03fc825c4f8f370bed37ab24a0bb13ab0a97af
[ "MIT" ]
44
2021-01-05T01:51:38.000Z
2022-02-10T13:44:26.000Z
medical/settings.py
mukeshgurpude/medstore
498b76acbeb9727e7a61560e4016b3577c2706d2
[ "MIT" ]
1
2020-10-28T09:26:01.000Z
2020-10-28T09:26:01.000Z
""" Django settings for medical project. Generated by 'django-admin startproject' using Django 3.0.8. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import os fr...
24.564972
104
0.695492
""" Django settings for medical project. Generated by 'django-admin startproject' using Django 3.0.8. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import os fr...
0
0
0
d29ce93f6d9640cd8c1ccd6e84993e920fdefb80
515
py
Python
ibrx/mess/message.py
dayfine/ibapi-rxpy
4f8573a20db8c2d2cafc4c0dc2479bceea7c4fac
[ "Apache-2.0" ]
2
2021-02-21T18:14:29.000Z
2021-08-12T22:05:27.000Z
ibrx/mess/message.py
dayfine/ibapi-rxpy
4f8573a20db8c2d2cafc4c0dc2479bceea7c4fac
[ "Apache-2.0" ]
null
null
null
ibrx/mess/message.py
dayfine/ibapi-rxpy
4f8573a20db8c2d2cafc4c0dc2479bceea7c4fac
[ "Apache-2.0" ]
2
2021-01-04T23:30:21.000Z
2021-05-09T23:24:57.000Z
import dataclasses import enum from typing import Any @dataclasses.dataclass
22.391304
37
0.702913
import dataclasses import enum from typing import Any class IbApiMessageType(enum.Enum): ACCOUNT_SUMMARY = enum.auto() ACCOUNT_SUMMARY_END = enum.auto() ERROR = enum.auto() HISTORICAL_DATA = enum.auto() HISTORICAL_DATA_END = enum.auto() NEXT_VALID_ID = enum.auto() OPEN_ORDER = enum.auto() ...
0
390
45
1e9ac616e99b96fe02b67dfed8d407325434f66f
185
py
Python
tests/segment_test.py
mohammad-yazdani/nevis
7e2e0ecac48bc28292c5c05362c1b473784e4bd8
[ "MIT" ]
null
null
null
tests/segment_test.py
mohammad-yazdani/nevis
7e2e0ecac48bc28292c5c05362c1b473784e4bd8
[ "MIT" ]
4
2021-04-06T18:27:00.000Z
2022-02-10T03:16:04.000Z
tests/segment_test.py
mohammad-yazdani/nevis
7e2e0ecac48bc28292c5c05362c1b473784e4bd8
[ "MIT" ]
null
null
null
from deepsegment import DeepSegment # The default language is 'en' segmenter = DeepSegment('en') segmenter.segment('I am Batman i live in gotham') # ['I am Batman', 'i live in gotham']
30.833333
49
0.735135
from deepsegment import DeepSegment # The default language is 'en' segmenter = DeepSegment('en') segmenter.segment('I am Batman i live in gotham') # ['I am Batman', 'i live in gotham']
0
0
0
a23473ec9fe153350440cd8e629d051432f0de3e
689
py
Python
django_dhcp/models.py
weijia/django-dhcp
625c031f5b969d48e7ad15bca75c460ddad20a00
[ "BSD-3-Clause" ]
1
2016-12-24T21:00:03.000Z
2016-12-24T21:00:03.000Z
django_dhcp/models.py
weijia/django-dhcp
625c031f5b969d48e7ad15bca75c460ddad20a00
[ "BSD-3-Clause" ]
null
null
null
django_dhcp/models.py
weijia/django-dhcp
625c031f5b969d48e7ad15bca75c460ddad20a00
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from django.core.urlresolvers import reverse from django.db import models from django.utils.translation import ugettext_lazy as _
36.263158
70
0.724238
# -*- coding: utf-8 -*- from django.core.urlresolvers import reverse from django.db import models from django.utils.translation import ugettext_lazy as _ class NetworkNode(models.Model): mac_address = models.CharField(max_length=12) ip = models.IPAddressField(help_text=_('ip address')) hostname = models.C...
131
381
23
55d04f9339409ee2455fc215be80a7ce106572df
1,645
py
Python
scheduler/tests/strategy_proofness_tests.py
akshayka/gavel
40a22a725f2e70478483e98c9b07c6fc588e0c40
[ "MIT" ]
67
2020-09-07T11:50:03.000Z
2022-03-31T04:09:08.000Z
scheduler/tests/strategy_proofness_tests.py
akshayka/gavel
40a22a725f2e70478483e98c9b07c6fc588e0c40
[ "MIT" ]
7
2020-09-27T01:41:59.000Z
2022-03-25T05:16:43.000Z
scheduler/tests/strategy_proofness_tests.py
akshayka/gavel
40a22a725f2e70478483e98c9b07c6fc588e0c40
[ "MIT" ]
12
2020-10-13T14:31:01.000Z
2022-02-14T05:44:38.000Z
import sys; sys.path.append("..") from policies import max_min_fairness, max_min_fairness_strategy_proof import random import time import numpy as np np.set_printoptions(precision=3, suppress=True)
39.166667
87
0.722796
import sys; sys.path.append("..") from policies import max_min_fairness, max_min_fairness_strategy_proof import random import time import numpy as np np.set_printoptions(precision=3, suppress=True) def test_strategy_proofness(unflattened_throughputs, cluster_spec, verbose=True): policy = max_min_fairness_strateg...
1,422
0
23
d727050d95e95eb3a40d36227984025117eb0137
1,665
py
Python
src/server_function.py
hash89/kafka-client
ce4cbc3451c1b22190431fb42694b3b03765ae4e
[ "Apache-2.0" ]
2
2016-07-07T20:27:50.000Z
2016-11-30T14:08:40.000Z
src/server_function.py
hash89/kafka-cli
ce4cbc3451c1b22190431fb42694b3b03765ae4e
[ "Apache-2.0" ]
null
null
null
src/server_function.py
hash89/kafka-cli
ce4cbc3451c1b22190431fb42694b3b03765ae4e
[ "Apache-2.0" ]
2
2016-07-20T08:44:02.000Z
2020-12-17T11:49:10.000Z
import os import os.path from print_function import * # Exemple # main.py server start # main.py server start /home/user/kafka/config/server.propersties # main.py server stop # main.py server restart # main.py server restart /home/user/kafka/config/server.propersties KAFKA_HOME = str(os.getenv("KAFKA_HOME"...
30.833333
91
0.637237
import os import os.path from print_function import * # Exemple # main.py server start # main.py server start /home/user/kafka/config/server.propersties # main.py server stop # main.py server restart # main.py server restart /home/user/kafka/config/server.propersties KAFKA_HOME = str(os.getenv("KAFKA_HOME"...
1,123
0
100
99bef23c3de4831e5bf77daefe959fe9fde03f68
1,957
py
Python
venv/lib/python3.8/site-packages/vsts/feature_management/v4_1/models/contributed_feature_state.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/vsts/feature_management/v4_1/models/contributed_feature_state.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/vsts/feature_management/v4_1/models/contributed_feature_state.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------------------...
46.595238
141
0.571794
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------------------...
288
0
29
c4cfe6449ce8c72776566a1b65fb222f5d8622dd
6,253
py
Python
gnucash_reports/reports/expenses_monthly.py
MeerkatLabs/gnucash-reporting
109e06be3625ad7a106db989ce7047998639ce34
[ "BSD-3-Clause" ]
null
null
null
gnucash_reports/reports/expenses_monthly.py
MeerkatLabs/gnucash-reporting
109e06be3625ad7a106db989ce7047998639ce34
[ "BSD-3-Clause" ]
10
2017-10-22T20:55:19.000Z
2017-12-19T04:50:43.000Z
gnucash_reports/reports/expenses_monthly.py
MeerkatLabs/gnucash-reporting
109e06be3625ad7a106db989ce7047998639ce34
[ "BSD-3-Clause" ]
1
2016-03-01T18:59:58.000Z
2016-03-01T18:59:58.000Z
""" Gathers up all of the expenses and breaks down the values by month. """ import time import math from operator import itemgetter from gnucash_reports.collate.bucket import PeriodCollate, CategoryCollate, AccountCollate from gnucash_reports.collate.bucket_generation import decimal_generator from gnucash_reports.coll...
38.838509
120
0.722853
""" Gathers up all of the expenses and breaks down the values by month. """ import time import math from operator import itemgetter from gnucash_reports.collate.bucket import PeriodCollate, CategoryCollate, AccountCollate from gnucash_reports.collate.bucket_generation import decimal_generator from gnucash_reports.coll...
297
0
68
ec73d6b38540b72d81b0dc51968a6ec592a2d916
1,712
py
Python
KNeighborsClassifier/app.py
GrishenkovP/model_deployment
5bcb35802e6dd401c0f4eb8ce81b4165028de65a
[ "MIT" ]
null
null
null
KNeighborsClassifier/app.py
GrishenkovP/model_deployment
5bcb35802e6dd401c0f4eb8ce81b4165028de65a
[ "MIT" ]
null
null
null
KNeighborsClassifier/app.py
GrishenkovP/model_deployment
5bcb35802e6dd401c0f4eb8ce81b4165028de65a
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import sklearn import joblib from flask import Flask, render_template, request, url_for app = Flask(__name__) @app.route('/') @app.route('/predict', methods=['GET', 'POST']) if __name__ == '__main__': app.run(debug=True)
38.909091
82
0.610981
import pandas as pd import numpy as np import sklearn import joblib from flask import Flask, render_template, request, url_for app = Flask(__name__) @app.route('/') @app.route('/predict', methods=['GET', 'POST']) def predict(): prediction_name_iris = 'Unknown' prediction_foto_iris ='unknown' ...
1,405
0
23
e6274df1bef9af693c83537770dc03e876dbb3b9
1,185
py
Python
d13/a2.py
nikosgraser/aoc-2020
f6b197eca161028f3e62cebc1b8e756898d545f5
[ "0BSD" ]
null
null
null
d13/a2.py
nikosgraser/aoc-2020
f6b197eca161028f3e62cebc1b8e756898d545f5
[ "0BSD" ]
null
null
null
d13/a2.py
nikosgraser/aoc-2020
f6b197eca161028f3e62cebc1b8e756898d545f5
[ "0BSD" ]
null
null
null
from typing import Tuple from math import prod with open('input', 'r') as fd: bus_lines_raw = fd.readlines()[1].strip().split(',') bus_lines = list(map(int, filter(lambda bl: bl != 'x', bus_lines_raw))) bl_offsets = [i for i, n in enumerate(bus_lines_raw) if n != 'x'] # For an explanation of how this works, lo...
30.384615
103
0.643038
from typing import Tuple from math import prod with open('input', 'r') as fd: bus_lines_raw = fd.readlines()[1].strip().split(',') bus_lines = list(map(int, filter(lambda bl: bl != 'x', bus_lines_raw))) bl_offsets = [i for i, n in enumerate(bus_lines_raw) if n != 'x'] def bezout_coeff(a: int, b: int) -> Tuple[i...
236
0
23
38e80ed2271239a233779d6f2b859f0eef046850
730
py
Python
Season 07 - Databases in Python & Milestone Project 2/Milestone Project 2/Storing Books in Lists/utils/database.py
Pythobit/Python-tutorial
b0743eaa9c237c3578131ead1b3f2c295f11b7ee
[ "MIT" ]
3
2021-02-19T18:33:00.000Z
2021-08-03T14:56:50.000Z
Season 07 - Databases in Python & Milestone Project 2/Milestone Project 2/Storing Books in Lists/utils/database.py
barawalojas/Python-tutorial
3f4b2b073e421888b3d62ff634658317d9abcb9b
[ "MIT" ]
1
2021-07-10T14:37:57.000Z
2021-07-20T09:51:39.000Z
Season 07 - Databases in Python & Milestone Project 2/Milestone Project 2/Storing Books in Lists/utils/database.py
barawalojas/Python-tutorial
3f4b2b073e421888b3d62ff634658317d9abcb9b
[ "MIT" ]
1
2021-08-02T05:39:38.000Z
2021-08-02T05:39:38.000Z
""" Concerned with storing and returning books from a list. """ books = [] # def delete_book(name): # This is considered as a Bad Practice. # for book in books: # if book['name'] == name: # books.remove(book) """ SCOPE - as in <line 26> : global books states that books in local ...
21.470588
78
0.609589
""" Concerned with storing and returning books from a list. """ books = [] def add_book(name, author): books.append({'name': name, 'author': author, 'read': False}) def get_all_books(): return books def mark_book_as_read(name): for book in books: if book['name'] == name: book['read...
262
0
92
207a7b4b475bfc0cbd0bb077ecf82ede96622f87
192
py
Python
examples/xspec_fit.py
zblz/gammapy
49539f25886433abeedc8852387ab4cd73977006
[ "BSD-3-Clause" ]
null
null
null
examples/xspec_fit.py
zblz/gammapy
49539f25886433abeedc8852387ab4cd73977006
[ "BSD-3-Clause" ]
null
null
null
examples/xspec_fit.py
zblz/gammapy
49539f25886433abeedc8852387ab4cd73977006
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Fit and illustrate example spectral data in XSPEC format. Run `xspec_fake.py` first to generate the example input file. """
32
63
0.760417
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Fit and illustrate example spectral data in XSPEC format. Run `xspec_fake.py` first to generate the example input file. """
0
0
0
2b588948131dca8b7dc22803edf75fa65bb1cbe2
5,311
py
Python
utils/text_process.py
Young2019/TextGAN-PyTorch
883078215fd091dbbd0a53c99be22c147fdedaf3
[ "MIT" ]
7
2020-05-23T05:39:30.000Z
2022-03-18T09:52:38.000Z
utils/text_process.py
Young2019/TextGAN-PyTorch
883078215fd091dbbd0a53c99be22c147fdedaf3
[ "MIT" ]
2
2020-06-16T12:06:12.000Z
2020-06-16T13:49:44.000Z
utils/text_process.py
Young2019/TextGAN-PyTorch
883078215fd091dbbd0a53c99be22c147fdedaf3
[ "MIT" ]
2
2021-04-22T06:18:48.000Z
2021-04-30T09:15:54.000Z
# -*- coding: utf-8 -*- # @Author : William # @Project : TextGAN-william # @FileName : text_process.py # @Time : Created at 2019-05-14 # @Blog : http://zhiweil.ml/ # @Description : # Copyrights (C) 2018. All Rights Reserved. import nltk import os import torch import config as cfg de...
30.699422
102
0.635285
# -*- coding: utf-8 -*- # @Author : William # @Project : TextGAN-william # @FileName : text_process.py # @Time : Created at 2019-05-14 # @Blog : http://zhiweil.ml/ # @Description : # Copyrights (C) 2018. All Rights Reserved. import nltk import os import torch import config as cfg de...
221
0
23
dd72ee9ea3c8993befebc7238339ee774273c6ef
883
py
Python
conoha/config.py
ttk1/conoha-cli
d1c68ee63e9c61a0a727a24206a1fd8aa4abcf13
[ "MIT" ]
null
null
null
conoha/config.py
ttk1/conoha-cli
d1c68ee63e9c61a0a727a24206a1fd8aa4abcf13
[ "MIT" ]
null
null
null
conoha/config.py
ttk1/conoha-cli
d1c68ee63e9c61a0a727a24206a1fd8aa4abcf13
[ "MIT" ]
null
null
null
import json from os.path import expanduser, exists from os import makedirs conoha_home = expanduser('~/.conoha') config_path = f'{conoha_home}/config.json' credential_path = f'{conoha_home}/credential.json' token_path = f'{conoha_home}/token.json' if not exists(conoha_home): makedirs(conoha_home)
23.864865
64
0.681767
import json from os.path import expanduser, exists from os import makedirs conoha_home = expanduser('~/.conoha') config_path = f'{conoha_home}/config.json' credential_path = f'{conoha_home}/credential.json' token_path = f'{conoha_home}/token.json' if not exists(conoha_home): makedirs(conoha_home) def get_config...
459
0
115
71e8f16ea53193c560fb81cbd45dffe388d20cc8
6,706
py
Python
library/python/pysandesh/test/sandesh_msg_test.py
atsgen/contrail-sandesh
857c483697b88da94cd11ecfe2df3247c902bbb3
[ "Apache-2.0" ]
8
2015-01-08T17:36:08.000Z
2019-09-18T01:49:18.000Z
library/python/pysandesh/test/sandesh_msg_test.py
atsgen/contrail-sandesh
857c483697b88da94cd11ecfe2df3247c902bbb3
[ "Apache-2.0" ]
4
2015-01-12T21:26:04.000Z
2020-12-22T15:48:55.000Z
library/python/pysandesh/test/sandesh_msg_test.py
atsgen/contrail-sandesh
857c483697b88da94cd11ecfe2df3247c902bbb3
[ "Apache-2.0" ]
35
2015-02-26T18:19:18.000Z
2020-02-05T09:49:47.000Z
#!/usr/bin/env python # # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # sandesh_msg_test # import unittest import sys import os import socket import test_utils import time import uuid from itertools import chain sys.path.insert(1, sys.path[0]+'/../../../python') from pysandesh.sandesh_base i...
38.988372
88
0.695347
#!/usr/bin/env python # # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # sandesh_msg_test # import unittest import sys import os import socket import test_utils import time import uuid from itertools import chain sys.path.insert(1, sys.path[0]+'/../../../python') from pysandesh.sandesh_base i...
5,430
561
100
52485a34fe3c464fdb1d6586a8842240eacf1dd9
821
py
Python
COS120/MPS/MP07/MP06.py
thejayhaykid/Python
641c33b94762f0cace203dcf4cc121571625ab02
[ "MIT" ]
null
null
null
COS120/MPS/MP07/MP06.py
thejayhaykid/Python
641c33b94762f0cace203dcf4cc121571625ab02
[ "MIT" ]
null
null
null
COS120/MPS/MP07/MP06.py
thejayhaykid/Python
641c33b94762f0cace203dcf4cc121571625ab02
[ "MIT" ]
null
null
null
from turtle import * side = 50 COUNT = 8 checker(side)
19.093023
55
0.493301
from turtle import * side = 50 COUNT = 8 def DrawBox(count,colorcount,side): # determine color if colorcount%2==0: if count % 2 == 1: fillcolor('#000000') else: fillcolor('#990000') else: if count % 2 == 1: fillcolor('#990000') else: ...
718
0
46
ae625190cb1bcf2697aa3b2d14b4f4406dc644bb
167
py
Python
inclearn/lib/losses/__init__.py
sajjadahmadish/incremental_learning.pytorch
f01c1cf9cbafc930687a89dbdf7c1937d1ca2749
[ "MIT" ]
null
null
null
inclearn/lib/losses/__init__.py
sajjadahmadish/incremental_learning.pytorch
f01c1cf9cbafc930687a89dbdf7c1937d1ca2749
[ "MIT" ]
null
null
null
inclearn/lib/losses/__init__.py
sajjadahmadish/incremental_learning.pytorch
f01c1cf9cbafc930687a89dbdf7c1937d1ca2749
[ "MIT" ]
null
null
null
# flake8: noqa from .base import * from .distillation import * from .metrics import * from .regularizations import * from .unsupervised import * from .losses import *
20.875
30
0.754491
# flake8: noqa from .base import * from .distillation import * from .metrics import * from .regularizations import * from .unsupervised import * from .losses import *
0
0
0
e30d9d200104907a3adac3af1fb8103b332e6163
4,769
py
Python
scripts/monitoring/cron-send-fluentd-depth.py
jianlongzhou/openshift-tools
0f07cd092bde5a70dccde82c61124aed7bf22160
[ "Apache-2.0" ]
164
2015-07-29T17:35:04.000Z
2021-12-16T16:38:04.000Z
scripts/monitoring/cron-send-fluentd-depth.py
jianlongzhou/openshift-tools
0f07cd092bde5a70dccde82c61124aed7bf22160
[ "Apache-2.0" ]
3,634
2015-06-09T13:49:15.000Z
2022-03-23T20:55:44.000Z
scripts/monitoring/cron-send-fluentd-depth.py
jianlongzhou/openshift-tools
0f07cd092bde5a70dccde82c61124aed7bf22160
[ "Apache-2.0" ]
250
2015-06-08T19:53:11.000Z
2022-03-01T04:51:23.000Z
#!/usr/bin/env python """ Fluentd queue check for v3 """ import argparse import time import subprocess import math from dateutil import parser from datetime import datetime from openshift_tools.monitoring.ocutil import OCUtil from openshift_tools.monitoring.metric_sender import MetricSender import logging logging....
38.772358
134
0.626546
#!/usr/bin/env python """ Fluentd queue check for v3 """ import argparse import time import subprocess import math from dateutil import parser from datetime import datetime from openshift_tools.monitoring.ocutil import OCUtil from openshift_tools.monitoring.metric_sender import MetricSender import logging logging....
0
4,169
23
3c32494f38119c215d5fb5bb671943615a6126e3
1,197
py
Python
modules/community.py
F4stZ4p/BadBot
bf8d021a21d729b93a015027ee73197ad4df11d0
[ "MIT" ]
null
null
null
modules/community.py
F4stZ4p/BadBot
bf8d021a21d729b93a015027ee73197ad4df11d0
[ "MIT" ]
null
null
null
modules/community.py
F4stZ4p/BadBot
bf8d021a21d729b93a015027ee73197ad4df11d0
[ "MIT" ]
null
null
null
import discord import os import inspect from discord.ext import commands class Community(): """Commands for The Bad Server community""" @property @commands.command() async def source(self, ctx, *, command: str = None): """Displays the Bad Bot's source""" if command is Non...
31.5
116
0.617377
import discord import os import inspect from discord.ext import commands class Community(): """Commands for The Bad Server community""" def __init__(self, bot): self.bot = bot self._source_url = "https://github.com/F4stZ4p/BadBot" @property def source_url(self): return self...
147
0
83
e647a02e984f084759b293fb5aa15b34bd00c8c1
2,041
py
Python
machine_learning_library/model_svm.py
UlricWu/machine_learning_library
e405161cfa7255505965f024be5b5cd416f0a3a5
[ "MIT" ]
null
null
null
machine_learning_library/model_svm.py
UlricWu/machine_learning_library
e405161cfa7255505965f024be5b5cd416f0a3a5
[ "MIT" ]
null
null
null
machine_learning_library/model_svm.py
UlricWu/machine_learning_library
e405161cfa7255505965f024be5b5cd416f0a3a5
[ "MIT" ]
null
null
null
from machine_learning_library.model_discriminant_analysis import Classification import numpy as np
30.014706
109
0.575698
from machine_learning_library.model_discriminant_analysis import Classification import numpy as np class SVM(Classification): def __init__(self, C=0.1, learning_rate=0.01, epochs=1000, threshold=0.0001, kernel=None, polynominal=2): super(SVM, self).__init__() self.C = C self.learning_rate...
1,734
184
23
169e52fbc2b1a282357790b804f459eafd1aac75
2,512
py
Python
apitest/migrations/0002_auto_20200612_1638.py
zhjfeng/test_manger
7c9fd07b2c1f40aa371ff3a4fe0d13c842941aa1
[ "Apache-2.0" ]
null
null
null
apitest/migrations/0002_auto_20200612_1638.py
zhjfeng/test_manger
7c9fd07b2c1f40aa371ff3a4fe0d13c842941aa1
[ "Apache-2.0" ]
null
null
null
apitest/migrations/0002_auto_20200612_1638.py
zhjfeng/test_manger
7c9fd07b2c1f40aa371ff3a4fe0d13c842941aa1
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.0.7 on 2020-06-12 08:38 from django.db import migrations, models import django.db.models.deletion
38.060606
184
0.558917
# Generated by Django 3.0.7 on 2020-06-12 08:38 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('product', '0002_auto_20200610_2035'), ('apitest', '0001_initial'), ] operations = [ migrations.Alte...
0
2,471
23
92f03cfe2a7380187a7e52d5d7e3af121e7d9b85
4,108
py
Python
pyupgrade/_plugins/mock.py
vivster7/pyupgrade
de7be58e4b0b34111d7096ddcae957153b697cb9
[ "MIT" ]
null
null
null
pyupgrade/_plugins/mock.py
vivster7/pyupgrade
de7be58e4b0b34111d7096ddcae957153b697cb9
[ "MIT" ]
null
null
null
pyupgrade/_plugins/mock.py
vivster7/pyupgrade
de7be58e4b0b34111d7096ddcae957153b697cb9
[ "MIT" ]
null
null
null
import ast import functools from typing import Iterable from typing import List from typing import Optional from typing import Tuple from tokenize_rt import Offset from tokenize_rt import Token from pyupgrade._ast_helpers import ast_to_offset from pyupgrade._data import register from pyupgrade._data import State from...
27.026316
74
0.570594
import ast import functools from typing import Iterable from typing import List from typing import Optional from typing import Tuple from tokenize_rt import Offset from tokenize_rt import Token from pyupgrade._ast_helpers import ast_to_offset from pyupgrade._data import register from pyupgrade._data import State from...
3,368
0
204
2d0c38449505a543591fc8047e4ddd863d5579e1
22,110
py
Python
main.py
goo-goo-goo-joob/AirportPassengerTrafficOptimization
883c7b489999b0df85a51b40e68a46dd6406d228
[ "MIT" ]
1
2021-12-11T17:09:02.000Z
2021-12-11T17:09:02.000Z
main.py
goo-goo-goo-joob/AirportPassengerTrafficOptimization
883c7b489999b0df85a51b40e68a46dd6406d228
[ "MIT" ]
null
null
null
main.py
goo-goo-goo-joob/AirportPassengerTrafficOptimization
883c7b489999b0df85a51b40e68a46dd6406d228
[ "MIT" ]
null
null
null
import itertools import matplotlib.pyplot as plt import numpy as np import pandas as pd import plotly.express as px from scipy.optimize import minimize, LinearConstraint, NonlinearConstraint from tqdm import tqdm from utils import constraint_cost, calc_time, calc_cost, ConstraintTime, f_ey, f_conv, f_ideal, ...
44.666667
121
0.564586
import itertools import matplotlib.pyplot as plt import numpy as np import pandas as pd import plotly.express as px from scipy.optimize import minimize, LinearConstraint, NonlinearConstraint from tqdm import tqdm from utils import constraint_cost, calc_time, calc_cost, ConstraintTime, f_ey, f_conv, f_ideal, ...
0
20,108
25
6b0f1fd1eecb822df314dfc2db85047024f7f04e
7,047
py
Python
GFTE-pos+text+img/train2.py
huabao97/New-GFTE
11d48139b32d2b9ed10b2d4be2b51b9f7acf476c
[ "Apache-2.0" ]
2
2022-03-14T05:40:27.000Z
2022-03-17T02:13:06.000Z
GFTE-pos+text+img/train2.py
huabao97/New-GFTE
11d48139b32d2b9ed10b2d4be2b51b9f7acf476c
[ "Apache-2.0" ]
1
2022-03-24T20:37:44.000Z
2022-03-24T20:37:44.000Z
GFTE-pos+text+img/train2.py
huabao97/New-GFTE
11d48139b32d2b9ed10b2d4be2b51b9f7acf476c
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import argparse import random import torch import torch.optim as optim import torch.utils.data from torch.autograd import Variable import numpy as np import os import utils from torch_geometric.data import Data, Dataset,DataLoader from torch_scatter import scatter_mean import torch...
35.771574
117
0.689939
from __future__ import print_function import argparse import random import torch import torch.optim as optim import torch.utils.data from torch.autograd import Variable import numpy as np import os import utils from torch_geometric.data import Data, Dataset,DataLoader from torch_scatter import scatter_mean import torch...
1,355
0
68
d1f0c250945fb8953e5790d1e4c3bc42ddfff63c
1,336
py
Python
sandbox/degree_distribution_modified_watts_strogatz.py
benmaier/sixdegrees
6fee5a4f81d91ec2ce92c8767add67b701651a85
[ "MIT" ]
null
null
null
sandbox/degree_distribution_modified_watts_strogatz.py
benmaier/sixdegrees
6fee5a4f81d91ec2ce92c8767add67b701651a85
[ "MIT" ]
null
null
null
sandbox/degree_distribution_modified_watts_strogatz.py
benmaier/sixdegrees
6fee5a4f81d91ec2ce92c8767add67b701651a85
[ "MIT" ]
1
2020-09-22T12:35:51.000Z
2020-09-22T12:35:51.000Z
import sixdegrees import numpy as np import scipy.sparse as sprs from scipy.special import binom import matplotlib.pyplot as pl N_meas = 1000 betas = np.logspace(-3,0,10) k = 8. N = 100 for beta in betas: hist = np.zeros((N,)) for meas in range(N_meas): _, row, col = sixdegrees.modified_sma...
20.553846
113
0.529192
import sixdegrees import numpy as np import scipy.sparse as sprs from scipy.special import binom import matplotlib.pyplot as pl def P_theory(N,k,beta,kmax): k = int(k) p0 = (1-beta+beta*(N-1)/k)**(-1) P = np.zeros(kmax+1) for c in range(kmax+1): s = 0. n = np.min([c,k]) ...
362
0
23
e9e43c933ed4c1a9555cbd21828c4921c0caaab9
1,803
py
Python
character.py
navarro0/visual-novel-engine
3d3bb2dc2af966ac7d282d759b6a3b9af91c03b6
[ "MIT" ]
null
null
null
character.py
navarro0/visual-novel-engine
3d3bb2dc2af966ac7d282d759b6a3b9af91c03b6
[ "MIT" ]
null
null
null
character.py
navarro0/visual-novel-engine
3d3bb2dc2af966ac7d282d759b6a3b9af91c03b6
[ "MIT" ]
1
2021-04-20T06:20:20.000Z
2021-04-20T06:20:20.000Z
import pygame, copy from pygame.locals import * ########################################################################## ## Character ## ## -------------------------------------------------------------------- ## ## Class that defines an instance of an on-scr...
45.075
78
0.464226
import pygame, copy from pygame.locals import * ########################################################################## ## Character ## ## -------------------------------------------------------------------- ## ## Class that defines an instance of an on-scr...
1,018
3
87
293bef3b1f93a630cb76e3e39d17a6acedb77968
2,868
py
Python
test/mock_pool.py
qarnot/computing-python-sdk
cfee10a16bfdaf9e894317b04efd5563933b0ce4
[ "Apache-2.0" ]
11
2016-09-08T06:00:37.000Z
2021-11-11T21:03:16.000Z
test/mock_pool.py
qarnot/computing-python-sdk
cfee10a16bfdaf9e894317b04efd5563933b0ce4
[ "Apache-2.0" ]
3
2020-01-20T23:00:32.000Z
2021-04-26T08:09:05.000Z
test/mock_pool.py
qarnot/computing-python-sdk
cfee10a16bfdaf9e894317b04efd5563933b0ce4
[ "Apache-2.0" ]
5
2017-09-26T14:58:58.000Z
2021-02-24T15:23:08.000Z
default_json_pool = { "previousState": "Closing", "stateTransitionTime": "2021-03-18T14:34:51Z", "previousStateTransitionTime": "2021-03-18T14:34:39Z", "lastModified": "2021-03-18T14:34:51Z", "elasticProperty": { "isElastic": False, "minTotalSlots": 1, "maxTotalSlots"...
30.510638
73
0.52371
default_json_pool = { "previousState": "Closing", "stateTransitionTime": "2021-03-18T14:34:51Z", "previousStateTransitionTime": "2021-03-18T14:34:39Z", "lastModified": "2021-03-18T14:34:51Z", "elasticProperty": { "isElastic": False, "minTotalSlots": 1, "maxTotalSlots"...
0
0
0
e80ab44355d520649340f06ef2a61674f2ee3ad1
824
py
Python
gocdapi_tests/unittests/test_stage.py
andrewphilipsmith/gocdapi
82eb37c6b00a918b6bcf4184a66cad7344cfaa2e
[ "MIT" ]
8
2015-01-23T12:50:30.000Z
2020-01-21T11:00:19.000Z
gocdapi_tests/unittests/test_stage.py
andrewphilipsmith/gocdapi
82eb37c6b00a918b6bcf4184a66cad7344cfaa2e
[ "MIT" ]
7
2015-01-27T23:17:05.000Z
2016-06-08T15:27:07.000Z
gocdapi_tests/unittests/test_stage.py
andrewphilipsmith/gocdapi
82eb37c6b00a918b6bcf4184a66cad7344cfaa2e
[ "MIT" ]
2
2015-11-23T18:33:24.000Z
2020-07-15T09:01:34.000Z
import unittest from gocdapi.go import Go from gocdapi.pipeline import Pipeline from gocdapi.stage import Stage if __name__ == '__main__': unittest.main()
20.6
71
0.515777
import unittest from gocdapi.go import Go from gocdapi.pipeline import Pipeline from gocdapi.stage import Stage class TestStage(unittest.TestCase): DATA0 = { "stages": [ { "name": "Deploy" }, { "name": "tests" } ], ...
255
383
23
c546c4f5f1853c9544b509c4b251c8bb9310579b
2,510
py
Python
download_climate_data.py
shristov1/sofia_air_quality
3913d7f3a5d79077a4be3cad28199e6f5fa1a497
[ "MIT" ]
null
null
null
download_climate_data.py
shristov1/sofia_air_quality
3913d7f3a5d79077a4be3cad28199e6f5fa1a497
[ "MIT" ]
null
null
null
download_climate_data.py
shristov1/sofia_air_quality
3913d7f3a5d79077a4be3cad28199e6f5fa1a497
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Jan 4 16:39:41 2021 This will be used to query an FTP server to download csv data from the sensors of interest. @author: sHristov """ import os import time import datetime import logging import gzip import typing import urllib.error import urllib.request ...
29.186047
113
0.634263
# -*- coding: utf-8 -*- """ Created on Mon Jan 4 16:39:41 2021 This will be used to query an FTP server to download csv data from the sensors of interest. @author: sHristov """ import os import time import datetime import logging import gzip import typing import urllib.error import urllib.request ...
0
0
0
d0a051aaadbacddc921cfd20414eb54780de1f80
2,420
py
Python
test_onewire.py
gexpander/demo-py-examples
9f6f2eb198c2329cba5a957e51dc50294555c17c
[ "MIT" ]
null
null
null
test_onewire.py
gexpander/demo-py-examples
9f6f2eb198c2329cba5a957e51dc50294555c17c
[ "MIT" ]
null
null
null
test_onewire.py
gexpander/demo-py-examples
9f6f2eb198c2329cba5a957e51dc50294555c17c
[ "MIT" ]
null
null
null
#!/bin/env python3 import time import gex with gex.Client(gex.TrxRawUSB()) as client: ow = gex.OneWire(client, 'ow') # print("Presence: ", ow.test_presence()) print("Devices:", ow.search()) while True: (a, b) = meas2(6558392391241695016, 1802309978572980008) # a = meas(655839239124169...
29.512195
95
0.52438
#!/bin/env python3 import time import gex with gex.Client(gex.TrxRawUSB()) as client: ow = gex.OneWire(client, 'ow') # print("Presence: ", ow.test_presence()) print("Devices:", ow.search()) def meas(addr): ow.write([0x44], addr=addr) ow.wait_ready() data = ow.query([0xBE], 9, ...
518
0
54
0489b19b1019f989acfd42b649510c64e6668221
3,942
py
Python
tests/bugs/core_5018_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_5018_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_5018_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
#coding:utf-8 # # id: bugs.core_5018 # title: Regression: Non-indexed predicates may not be applied immediately after retrieval when tables are being joined # decription: # tracker_id: CORE-5018 # min_versions: ['3.0'] # versions: 3.0 # qmid: None import pytest from firebird.qa import...
29.2
126
0.56621
#coding:utf-8 # # id: bugs.core_5018 # title: Regression: Non-indexed predicates may not be applied immediately after retrieval when tables are being joined # decription: # tracker_id: CORE-5018 # min_versions: ['3.0'] # versions: 3.0 # qmid: None import pytest from firebird.qa import...
132
0
22
360964eb12edc5c9041fbdbc7fb05671a8deea1a
3,119
py
Python
asyncDqn/adqn_agent.py
yipsang/tetris-rl
d8d8e13eabee1321c54e941725b788d7b26b04d0
[ "MIT" ]
null
null
null
asyncDqn/adqn_agent.py
yipsang/tetris-rl
d8d8e13eabee1321c54e941725b788d7b26b04d0
[ "MIT" ]
null
null
null
asyncDqn/adqn_agent.py
yipsang/tetris-rl
d8d8e13eabee1321c54e941725b788d7b26b04d0
[ "MIT" ]
null
null
null
from torch import random import torch from torch.nn.modules import linear import torch.optim as optim import torch.nn.functional as F from torch.nn.utils import clip_grad_norm_ import logging import numpy as np import random from value_network import ValueNetwork, ConvValueNetwork
30.281553
96
0.633857
from torch import random import torch from torch.nn.modules import linear import torch.optim as optim import torch.nn.functional as F from torch.nn.utils import clip_grad_norm_ import logging import numpy as np import random from value_network import ValueNetwork, ConvValueNetwork class ADQNAgent: def __init__( ...
1,594
1,218
23
dea1673941648ce9ee45f5ded7b9c0386b54f847
958
py
Python
SkyEspProj/sky_iot/globalvar.py
wiyixiao/iotLed
d60431d52f94aeed77d1956e08cd97f266a1f1e5
[ "MIT" ]
null
null
null
SkyEspProj/sky_iot/globalvar.py
wiyixiao/iotLed
d60431d52f94aeed77d1956e08cd97f266a1f1e5
[ "MIT" ]
null
null
null
SkyEspProj/sky_iot/globalvar.py
wiyixiao/iotLed
d60431d52f94aeed77d1956e08cd97f266a1f1e5
[ "MIT" ]
null
null
null
from sky_iot.utils import UtilsTool _init() read_config()
23.365854
73
0.65762
from sky_iot.utils import UtilsTool def _init(): global _global_dict _global_dict = {} def set_value(name, value): _global_dict[name] = value def get_value(name, defValue=None): try: return _global_dict[name] except KeyError: return defValue _init() def read_config(): set_va...
800
0
115
131a0243216ceccf8d1aa34b1d428e9a1135febb
1,267
py
Python
setup_scripts/glint_system_create_user.py
m-conklin/glint
a7923e2b1474b2c9bacbb56dc4e0dd955323d794
[ "Apache-2.0" ]
3
2015-08-04T03:59:32.000Z
2017-01-11T06:18:13.000Z
setup_scripts/glint_system_create_user.py
m-conklin/glint
a7923e2b1474b2c9bacbb56dc4e0dd955323d794
[ "Apache-2.0" ]
6
2015-03-05T20:05:23.000Z
2021-07-14T00:23:25.000Z
setup_scripts/glint_system_create_user.py
m-conklin/glint
a7923e2b1474b2c9bacbb56dc4e0dd955323d794
[ "Apache-2.0" ]
4
2015-03-31T23:21:10.000Z
2018-09-18T22:21:37.000Z
#!/usr/bin/python import sys,subprocess #user and group id id=171 if len(sys.argv) == 2: if sys.argv[1] == "create-glint-user": create_group() add_user() elif sys.argv[1] == "remove-glint-user": remove_user() #remove_group() else: show_usage() else: show_usage()...
28.795455
146
0.632202
#!/usr/bin/python import sys,subprocess #user and group id id=171 def execute_command(cmd_args): process = subprocess.Popen(cmd_args,stdout=subprocess.PIPE,stderr=subprocess.PIPE) out,err = process.communicate() if err: print "warning: %s"%err return out,err def create_group(): print "Cre...
831
0
115
95fe6f84e582b8190c81b2e2f7861ae81fa978a7
1,426
py
Python
tests/api/serializers/test_common_serializer.py
oil-rope/oil-and-rope
6d59c87d4809f120417a90c1624952085486bb06
[ "MIT" ]
8
2019-08-27T20:08:22.000Z
2021-07-23T22:49:47.000Z
tests/api/serializers/test_common_serializer.py
oil-rope/oil-and-rope
6d59c87d4809f120417a90c1624952085486bb06
[ "MIT" ]
73
2020-03-11T18:07:29.000Z
2022-03-28T18:07:47.000Z
tests/api/serializers/test_common_serializer.py
oil-rope/oil-and-rope
6d59c87d4809f120417a90c1624952085486bb06
[ "MIT" ]
4
2020-02-22T19:44:17.000Z
2022-03-08T09:42:45.000Z
from django.apps import apps from django.test import TestCase from model_bakery import baker from rest_framework import serializers from api.serializers.common import MappedSerializerMixin from api.serializers.registration import UserSerializer from common.constants import models Profile = apps.get_model(models.PROFI...
35.65
97
0.697055
from django.apps import apps from django.test import TestCase from model_bakery import baker from rest_framework import serializers from api.serializers.common import MappedSerializerMixin from api.serializers.registration import UserSerializer from common.constants import models Profile = apps.get_model(models.PROFI...
954
118
23
e155fe61ac68e87755dbb86a2686cbb4f177a93a
904
py
Python
code/lw_pickle.py
lwadya/boozehound
62798a34ba9a647a2e0d3d36dfe52c5936a7377f
[ "MIT" ]
2
2019-07-24T05:48:05.000Z
2019-08-14T08:07:55.000Z
code/lw_pickle.py
lwadya/boozehound
62798a34ba9a647a2e0d3d36dfe52c5936a7377f
[ "MIT" ]
null
null
null
code/lw_pickle.py
lwadya/boozehound
62798a34ba9a647a2e0d3d36dfe52c5936a7377f
[ "MIT" ]
2
2019-09-07T22:57:10.000Z
2020-05-08T12:31:07.000Z
import os import pickle def var_to_pickle(var, filename): ''' Writes the given variable to a pickle file Args: var (any): variable to be written to pickle file filename (str): path and filename of pickle file Returns: None ''' try: with open(filename, 'wb') as...
22.04878
63
0.574115
import os import pickle def var_to_pickle(var, filename): ''' Writes the given variable to a pickle file Args: var (any): variable to be written to pickle file filename (str): path and filename of pickle file Returns: None ''' try: with open(filename, 'wb') as...
0
0
0
98decd76087b7b34f19e6dfb9cf2ceb5ac140181
239
py
Python
simple/{{cookiecutter.repo_name}}/{{cookiecutter.model_name}}/main.py
modelyst/dbgen-model-template
39c3b84527bc4f01ea3f810d7873e6edf8f056c3
[ "Apache-2.0" ]
null
null
null
simple/{{cookiecutter.repo_name}}/{{cookiecutter.model_name}}/main.py
modelyst/dbgen-model-template
39c3b84527bc4f01ea3f810d7873e6edf8f056c3
[ "Apache-2.0" ]
null
null
null
simple/{{cookiecutter.repo_name}}/{{cookiecutter.model_name}}/main.py
modelyst/dbgen-model-template
39c3b84527bc4f01ea3f810d7873e6edf8f056c3
[ "Apache-2.0" ]
null
null
null
from dbgen import Model from . import schema # noqa: F401 from .generators import add_generators
21.727273
53
0.715481
from dbgen import Model from . import schema # noqa: F401 from .generators import add_generators def make_model(): model = Model(name="{{cookiecutter.model_name}}") # add gens to model add_generators(model) return model
117
0
23
f316ce0cead8afcea7d5d43e146f7386044645c3
7,237
py
Python
creme/tree/tree.py
koaning/creme
fea9594b0620b57edef0d986edc735a3a0977dc9
[ "BSD-3-Clause" ]
1
2019-08-24T00:04:19.000Z
2019-08-24T00:04:19.000Z
creme/tree/tree.py
koaning/creme
fea9594b0620b57edef0d986edc735a3a0977dc9
[ "BSD-3-Clause" ]
null
null
null
creme/tree/tree.py
koaning/creme
fea9594b0620b57edef0d986edc735a3a0977dc9
[ "BSD-3-Clause" ]
null
null
null
import bisect import collections import functools import math import operator try: import graphviz GRAPHVIZ_INSTALLED = True except ImportError: GRAPHVIZ_INSTALLED = False from .. import base from .. import utils from . import enum def find_best_split(class_counts, feature_counts, split_enum): "...
30.154167
97
0.58726
import bisect import collections import functools import math import operator try: import graphviz GRAPHVIZ_INSTALLED = True except ImportError: GRAPHVIZ_INSTALLED = False from .. import base from .. import utils from . import enum class Branch: def __init__(self, feature, values, left, right, tre...
4,145
104
289
a0b41781f7244ddaf211d01b65f1dfcd061b70aa
2,734
py
Python
ble2influx.py
theBASTI0N/ble-gateway
31e5ac6c9fcfb12a401d0ee94a974b0fab8df867
[ "MIT" ]
11
2020-08-27T03:58:43.000Z
2021-11-27T11:37:40.000Z
ble2influx.py
theBASTI0N/ble-gateway
31e5ac6c9fcfb12a401d0ee94a974b0fab8df867
[ "MIT" ]
4
2020-08-18T11:12:15.000Z
2021-03-10T23:42:57.000Z
ble2influx.py
theBASTI0N/ble-gateway
31e5ac6c9fcfb12a401d0ee94a974b0fab8df867
[ "MIT" ]
5
2021-01-05T07:33:52.000Z
2022-01-03T03:32:31.000Z
from influxdb import InfluxDBClient import json import config import blegateway influxCONFIG = config.get_config('influx') ids = config.get_config('identifiers')
30.377778
81
0.557791
from influxdb import InfluxDBClient import json import config import blegateway influxCONFIG = config.get_config('influx') ids = config.get_config('identifiers') def INFLUX(): if influxCONFIG['user'] == None: influxCONFIG['user'] = 'root' if influxCONFIG['password'] == None: influxCONFIG['pass...
2,503
0
69
16677ad7acae3ecfeb8d91d2179d755044b7ff86
30,528
py
Python
data_models/memory_data_models.py
ChrisHad/algorithm-reference-library
bded1b62ea801ea4f4f5bd0794c18cd81d4b2810
[ "Apache-2.0" ]
null
null
null
data_models/memory_data_models.py
ChrisHad/algorithm-reference-library
bded1b62ea801ea4f4f5bd0794c18cd81d4b2810
[ "Apache-2.0" ]
null
null
null
data_models/memory_data_models.py
ChrisHad/algorithm-reference-library
bded1b62ea801ea4f4f5bd0794c18cd81d4b2810
[ "Apache-2.0" ]
null
null
null
"""The data models used in ARL: .. note:: There are two visibility formats: :class:`BlockVisibility` is conceived as an ingest and calibration format. The visibility data are kept in a block of shape (number antennas, number antennas, number channels, number polarisation). One block is kept per integr...
30.712274
110
0.569575
"""The data models used in ARL: .. note:: There are two visibility formats: :class:`BlockVisibility` is conceived as an ingest and calibration format. The visibility data are kept in a block of shape (number antennas, number antennas, number channels, number polarisation). One block is kept per integr...
3,617
0
1,840
9e6efc22b2b9b79598553a9e54f0f484ff4cb2f3
291
pyw
Python
tk13.pyw
ShreyaShreesh/tkinter_sample
125aa75b855114b25c46b26ce574385f83eb99ad
[ "MIT" ]
null
null
null
tk13.pyw
ShreyaShreesh/tkinter_sample
125aa75b855114b25c46b26ce574385f83eb99ad
[ "MIT" ]
null
null
null
tk13.pyw
ShreyaShreesh/tkinter_sample
125aa75b855114b25c46b26ce574385f83eb99ad
[ "MIT" ]
null
null
null
#tk13.pyw import tkinter as tk root = tk.Tk() root.geometry('300x200') lb = tk.Label(text='This is a Label,This is a label,This is a Label') ms = tk.Label(text='This is a Message.This is a a Message.This is a Message.This is a Message') [widget.pack()for widget in (lb,ms)] root.mainloop()
29.1
95
0.71134
#tk13.pyw import tkinter as tk root = tk.Tk() root.geometry('300x200') lb = tk.Label(text='This is a Label,This is a label,This is a Label') ms = tk.Label(text='This is a Message.This is a a Message.This is a Message.This is a Message') [widget.pack()for widget in (lb,ms)] root.mainloop()
0
0
0
ef1a9c6e481c3568b4dfcc83d8da74c4253af6bd
4,333
py
Python
2a.combfiles_wo_main.py
JacksonIsaac/REDDprocessor
d65be95869432d737b562cd38f7d571d3529e169
[ "MIT" ]
null
null
null
2a.combfiles_wo_main.py
JacksonIsaac/REDDprocessor
d65be95869432d737b562cd38f7d571d3529e169
[ "MIT" ]
null
null
null
2a.combfiles_wo_main.py
JacksonIsaac/REDDprocessor
d65be95869432d737b562cd38f7d571d3529e169
[ "MIT" ]
null
null
null
from itertools import izip_longest outpath = "redd-test/" dir = "redd-test/house_1/" with open(dir+'channel_5_6.dat') as f3,\ open(dir+'channel_6_7.dat') as f4, open(dir+'channel_7_5.dat') as f5, open(dir+'channel_8_5.dat') as f6,\ open(dir+'channel_9_3.dat') as f7, open(dir+'channel_11_9.dat') as f8, open(d...
54.848101
115
0.616894
from itertools import izip_longest outpath = "redd-test/" dir = "redd-test/house_1/" with open(dir+'channel_5_6.dat') as f3,\ open(dir+'channel_6_7.dat') as f4, open(dir+'channel_7_5.dat') as f5, open(dir+'channel_8_5.dat') as f6,\ open(dir+'channel_9_3.dat') as f7, open(dir+'channel_11_9.dat') as f8, open(d...
0
0
0
0a3ab33f2faccea09feffab6c640d9df006ada6e
3,614
py
Python
lintlizard/__init__.py
closeio/lintlizard
8845d44b22985e9a8bdd120fd7af967a9cf83967
[ "MIT" ]
4
2020-11-19T18:57:13.000Z
2021-05-26T20:09:19.000Z
lintlizard/__init__.py
closeio/lintlizard
8845d44b22985e9a8bdd120fd7af967a9cf83967
[ "MIT" ]
36
2020-12-08T18:42:09.000Z
2022-03-29T16:04:42.000Z
lintlizard/__init__.py
closeio/lintlizard
8845d44b22985e9a8bdd120fd7af967a9cf83967
[ "MIT" ]
1
2021-06-02T19:40:45.000Z
2021-06-02T19:40:45.000Z
import argparse import subprocess from typing import Iterable, Optional, Tuple from attr import attrib, attrs __version__ = '0.15.0' Command = Tuple[str, ...] @attrs(frozen=True) TOOLS = [ CommandTool('flake8', default_files=()), CommandTool( 'isort', run_params=('-c',), fix_params=(), default_f...
26.970149
76
0.580243
import argparse import subprocess from typing import Iterable, Optional, Tuple from attr import attrib, attrs __version__ = '0.15.0' Command = Tuple[str, ...] @attrs(frozen=True) class CommandTool: executable: str = attrib() run_params: Command = attrib(default=()) fix_params: Optional[Command] = attr...
2,529
434
114
8ec74e0b23a8053f55434ea0967b6f5aabd195d1
2,051
py
Python
backprop_numpy_saliency.py
li-li-github/saliency_visualization
13f544d4d703a95d424c57523a67d0698221b301
[ "MIT" ]
null
null
null
backprop_numpy_saliency.py
li-li-github/saliency_visualization
13f544d4d703a95d424c57523a67d0698221b301
[ "MIT" ]
null
null
null
backprop_numpy_saliency.py
li-li-github/saliency_visualization
13f544d4d703a95d424c57523a67d0698221b301
[ "MIT" ]
null
null
null
import numpy as np import math import matplotlib.pyplot as plt from matplotlib import cm # Create random input and output data x = np.linspace(-math.pi, math.pi, 2000) y = np.sin(x) # Randomly initialize weights a = np.random.randn() b = np.random.randn() c = np.random.randn() d = np.random.randn() learning_rate =...
25.320988
87
0.61531
import numpy as np import math import matplotlib.pyplot as plt from matplotlib import cm # Create random input and output data x = np.linspace(-math.pi, math.pi, 2000) y = np.sin(x) def fn_3poly(x, a, b, c, d): return a + b * x + c * x ** 2 + d * x ** 3 # Randomly initialize weights a = np.random.randn() b = n...
54
0
23
84ce53c887f18a5b9c7ade832cc5f361cf29e6fd
326
py
Python
old-regressions/python/expr.2.py
muchang/z3test
e3e7739f98b7aa85427fcb8a39a4c675132a896e
[ "MIT" ]
23
2015-04-20T08:51:00.000Z
2021-11-15T12:20:59.000Z
old-regressions/python/expr.2.py
muchang/z3test
e3e7739f98b7aa85427fcb8a39a4c675132a896e
[ "MIT" ]
18
2016-03-02T15:17:42.000Z
2021-12-16T22:10:05.000Z
old-regressions/python/expr.2.py
muchang/z3test
e3e7739f98b7aa85427fcb8a39a4c675132a896e
[ "MIT" ]
30
2015-05-30T15:29:17.000Z
2022-02-25T15:58:58.000Z
# Copyright (c) 2015 Microsoft Corporation from z3 import * set_option(auto_config=True) x, y = Ints('x y') print eq(x + y, x + y) print eq(x + y, y + x) n = x + y print eq(n, x + y) # x2 is eq to x x2 = Int('x') print eq(x, x2) # the integer variable x is not equal to # the real variable x print eq(Int('x'), Real(...
19.176471
42
0.619632
# Copyright (c) 2015 Microsoft Corporation from z3 import * set_option(auto_config=True) x, y = Ints('x y') print eq(x + y, x + y) print eq(x + y, y + x) n = x + y print eq(n, x + y) # x2 is eq to x x2 = Int('x') print eq(x, x2) # the integer variable x is not equal to # the real variable x print eq(Int('x'), Real(...
0
0
0
f65bf8b541c2f36dbe0c24099b7cceb6e60d6425
9,290
py
Python
ai2gtp.py
bale-go/katrain-bots
9d2c23275b6eeaa529c4a6827567e4e655c0b793
[ "MIT" ]
null
null
null
ai2gtp.py
bale-go/katrain-bots
9d2c23275b6eeaa529c4a6827567e4e655c0b793
[ "MIT" ]
null
null
null
ai2gtp.py
bale-go/katrain-bots
9d2c23275b6eeaa529c4a6827567e4e655c0b793
[ "MIT" ]
null
null
null
# This is a script that turns a KaTrain AI into a sort-of GTP compatible bot import json import random import sys import time import os import json import traceback import math os.environ["KCFG_KIVY_LOG_LEVEL"] = os.environ.get("KCFG_KIVY_LOG_LEVEL", "warning") from katrain.core.ai import generate_ai_move from katra...
41.106195
138
0.599569
# This is a script that turns a KaTrain AI into a sort-of GTP compatible bot import json import random import sys import time import os import json import traceback import math os.environ["KCFG_KIVY_LOG_LEVEL"] = os.environ.get("KCFG_KIVY_LOG_LEVEL", "warning") from katrain.core.ai import generate_ai_move from katra...
1,733
0
46
6251beb2e7c5ea9af4af3192a77cb14ca570b47a
19,436
py
Python
cifar_net_search/syclop_cifar_convlstm_no_upsample_v01.py
sashkarivkind/imagewalker
999e1ae78cfe1512e1be894d9e7891a7d0c41233
[ "Apache-2.0" ]
2
2021-04-28T13:33:45.000Z
2021-11-09T14:31:09.000Z
cifar_net_search/syclop_cifar_convlstm_no_upsample_v01.py
sashkarivkind/imagewalker
999e1ae78cfe1512e1be894d9e7891a7d0c41233
[ "Apache-2.0" ]
null
null
null
cifar_net_search/syclop_cifar_convlstm_no_upsample_v01.py
sashkarivkind/imagewalker
999e1ae78cfe1512e1be894d9e7891a7d0c41233
[ "Apache-2.0" ]
1
2021-03-07T13:25:59.000Z
2021-03-07T13:25:59.000Z
''' The follwing code runs a test lstm network on the CIFAR dataset I will explicitly write the networks here for ease of understanding One convlstm layer right after the first cnn cnn_dropout = 0.4 rnn_dropout = 0.2 , WITH cnivlstm_dropout samples = 10, h = 256, epochs = 50, convlstm activation = relu - out.3732...
73.901141
3,057
0.767339
''' The follwing code runs a test lstm network on the CIFAR dataset I will explicitly write the networks here for ease of understanding One convlstm layer right after the first cnn cnn_dropout = 0.4 rnn_dropout = 0.2 , WITH cnivlstm_dropout samples = 10, h = 256, epochs = 50, convlstm activation = relu - out.3732...
512
0
68
3e32da7b2cc95def1e538685b65c08ba5458bb2a
397
py
Python
tests/test_dependencies.py
nmnaughton/gym-softrobot
7b7eb9bfb97f2e3d2c3e2f7df50ca96426a2482f
[ "MIT" ]
10
2022-01-11T19:49:02.000Z
2022-03-24T22:27:32.000Z
tests/test_dependencies.py
nmnaughton/gym-softrobot
7b7eb9bfb97f2e3d2c3e2f7df50ca96426a2482f
[ "MIT" ]
7
2022-01-15T07:48:53.000Z
2022-03-07T17:43:44.000Z
tests/test_dependencies.py
nmnaughton/gym-softrobot
7b7eb9bfb97f2e3d2c3e2f7df50ca96426a2482f
[ "MIT" ]
2
2022-03-06T19:43:06.000Z
2022-03-25T21:31:52.000Z
import pytest """ Test Dependency Installation The purpose is to check if core dependencies are installed properly. Typically, failure to these tests indicate an incorrection installation or wrong activation of the virtual environment (i.e. conda, venv, etc.). """
23.352941
72
0.755668
import pytest """ Test Dependency Installation The purpose is to check if core dependencies are installed properly. Typically, failure to these tests indicate an incorrection installation or wrong activation of the virtual environment (i.e. conda, venv, etc.). """ def test_gym(): import gym version = gym.ve...
83
0
45
0c6ce640490f9208a1801caf8e64f61b44867518
110
py
Python
test/deck.py
CDRPico/treys
b452565c9b386ad35c8eb108b62a9020834dc3b9
[ "MIT" ]
3
2019-10-04T14:36:51.000Z
2022-02-12T00:21:26.000Z
test/deck.py
CDRPico/treys
b452565c9b386ad35c8eb108b62a9020834dc3b9
[ "MIT" ]
null
null
null
test/deck.py
CDRPico/treys
b452565c9b386ad35c8eb108b62a9020834dc3b9
[ "MIT" ]
6
2018-11-11T09:19:13.000Z
2021-05-31T18:12:08.000Z
from treys import Evaluator, Deck from treys.card import pretty d = Deck.fresh() print(d) print(pretty(d))
12.222222
33
0.736364
from treys import Evaluator, Deck from treys.card import pretty d = Deck.fresh() print(d) print(pretty(d))
0
0
0
cef632827e2660e475081dc392175eaed57420c0
3,645
py
Python
lib/gen_cmd.py
rahulmah/sample-cloud-native-toolchain-tutorial-20170720084529291
08540c0f083a25b5b4e7a4c839080fe54383038c
[ "Apache-2.0" ]
1
2019-01-19T09:32:18.000Z
2019-01-19T09:32:18.000Z
lib/gen_cmd.py
rahulmah/sample-cloud-native-toolchain-tutorial-20170720084529291
08540c0f083a25b5b4e7a4c839080fe54383038c
[ "Apache-2.0" ]
null
null
null
lib/gen_cmd.py
rahulmah/sample-cloud-native-toolchain-tutorial-20170720084529291
08540c0f083a25b5b4e7a4c839080fe54383038c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python r""" This module provides command execution functions such as cmd_fnc and cmd_fnc_u. """ import sys import subprocess robot_env = 1 try: from robot.libraries.BuiltIn import BuiltIn except ImportError: robot_env = 0 import gen_print as gp import gen_valid as gv import gen_misc as gm if r...
31.695652
79
0.493004
#!/usr/bin/env python r""" This module provides command execution functions such as cmd_fnc and cmd_fnc_u. """ import sys import subprocess robot_env = 1 try: from robot.libraries.BuiltIn import BuiltIn except ImportError: robot_env = 0 import gen_print as gp import gen_valid as gv import gen_misc as gm if r...
0
0
0
7214622577390765e94f741b493f49789af14165
299
py
Python
dist/assets/code/seance1/8.py
Mistergix/deficode
6460ec3e22d36b67cef6815d9977fba973ab139b
[ "MIT" ]
null
null
null
dist/assets/code/seance1/8.py
Mistergix/deficode
6460ec3e22d36b67cef6815d9977fba973ab139b
[ "MIT" ]
10
2018-07-11T22:40:57.000Z
2018-11-24T21:05:14.000Z
dist/assets/code/seance1/8.py
Mistergix/deficode
6460ec3e22d36b67cef6815d9977fba973ab139b
[ "MIT" ]
null
null
null
import turtle as trt distance = 70 angle = 90 for compteur in range(4): if compteur == 0: trt.color("blue") elif compteur == 1: trt.color("red") elif compteur == 2: trt.color("green") else : trt.color("orange") trt.write(compteur) trt.forward(distance) trt.left(angle) trt.done()
14.238095
25
0.658863
import turtle as trt distance = 70 angle = 90 for compteur in range(4): if compteur == 0: trt.color("blue") elif compteur == 1: trt.color("red") elif compteur == 2: trt.color("green") else : trt.color("orange") trt.write(compteur) trt.forward(distance) trt.left(angle) trt.done()
0
0
0
a16d32be9721cae9f4d9ce1dea359c600aef3726
99,632
py
Python
third_party/CppHeaderParser/CppHeaderParser/CppHeaderParser.py
alberthrocks/emscripten
f7bd758bc344e0602df108eae91ead9d31737f3a
[ "MIT" ]
8
2015-04-15T16:23:11.000Z
2020-04-07T13:38:25.000Z
third_party/CppHeaderParser/CppHeaderParser/CppHeaderParser.py
comforx/emscripten
f842201acec3c1edafb2916a76a8eb8d75474c2b
[ "MIT" ]
null
null
null
third_party/CppHeaderParser/CppHeaderParser/CppHeaderParser.py
comforx/emscripten
f842201acec3c1edafb2916a76a8eb8d75474c2b
[ "MIT" ]
null
null
null
#!/usr/bin/python # # Author: Jashua R. Cloutier (contact via sourceforge username:senexcanis) # # Copyright (C) 2010, Jashua R. Cloutier # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Re...
42.432709
210
0.509294
#!/usr/bin/python # # Author: Jashua R. Cloutier (contact via sourceforge username:senexcanis) # # Copyright (C) 2010, Jashua R. Cloutier # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Re...
58,599
14,419
798
04ffb025f837f4a6a50c21ab19a5ce264ccf0817
3,424
py
Python
csv_cti/blueprints/web_api/views/tiers.py
Osmond1689/csv-cti
84be8241e9ba50f495b23775eb153e4129845474
[ "MIT" ]
null
null
null
csv_cti/blueprints/web_api/views/tiers.py
Osmond1689/csv-cti
84be8241e9ba50f495b23775eb153e4129845474
[ "MIT" ]
null
null
null
csv_cti/blueprints/web_api/views/tiers.py
Osmond1689/csv-cti
84be8241e9ba50f495b23775eb153e4129845474
[ "MIT" ]
null
null
null
from csv_cti.blueprints.web_api import web_api from flask import request,current_app,render_template from csv_cti.blueprints.op.md5_token import encrypt_md5 from csv_cti.blueprints.op.tiers import Tiers_op #tiers @web_api.route('/tiers-add/',methods=['POST']) @web_api.route('/tiers-rm/',methods=['POST']) @web_api.ro...
31.703704
82
0.553446
from csv_cti.blueprints.web_api import web_api from flask import request,current_app,render_template from csv_cti.blueprints.op.md5_token import encrypt_md5 from csv_cti.blueprints.op.tiers import Tiers_op #tiers @web_api.route('/tiers-add/',methods=['POST']) def tiers_add(): return_data={} r_token=request.jso...
3,064
0
88
5d26a1ce29134293dc115d18657a2e0d5c5e239c
1,754
py
Python
lists/singly.py
nipuntalukdar/algodatasructs
a50058f355115b4d45864a04e0e0aa492f006d18
[ "MIT" ]
null
null
null
lists/singly.py
nipuntalukdar/algodatasructs
a50058f355115b4d45864a04e0e0aa492f006d18
[ "MIT" ]
null
null
null
lists/singly.py
nipuntalukdar/algodatasructs
a50058f355115b4d45864a04e0e0aa492f006d18
[ "MIT" ]
null
null
null
x = lst(1,2,3,4,5,6,7,8,9,10,11,12) print x x.move_even_to_end() print x x.reverse() print x
26.179104
58
0.469213
class lstnode(object): def __init__(self, val): self.val = val self.next = None def __str__(self): return str(self.val) class lst(object): def __init__(self, *args): self.begin = None self.count = 0 self.end = {'blackhole' : 'yes', 'last' : None} for ...
1,451
-2
203
8d5e64b85237cf92c1a2dfbc35b0671f7c84c4ff
4,707
py
Python
src/.ipynb_checkpoints/scikitmodel-checkpoint.py
ciwin/CD4ML-AWS-Serverless
10a2dd697abbe4b80195fa147b50484626e87e27
[ "MIT" ]
1
2021-07-17T19:31:35.000Z
2021-07-17T19:31:35.000Z
src/scikitmodel.py
ciwin/CD4ML-AWS-Serverless
10a2dd697abbe4b80195fa147b50484626e87e27
[ "MIT" ]
null
null
null
src/scikitmodel.py
ciwin/CD4ML-AWS-Serverless
10a2dd697abbe4b80195fa147b50484626e87e27
[ "MIT" ]
null
null
null
import argparse import pandas as pd import numpy as np import os # from os.path import join import sys import logging # import joblib from sklearn.externals import joblib from sklearn.tree import DecisionTreeRegressor from sklearn.ensemble import RandomForestRegressor, AdaBoostRegressor, GradientBoostingRegressor...
39.554622
108
0.681326
import argparse import pandas as pd import numpy as np import os # from os.path import join import sys import logging # import joblib from sklearn.externals import joblib from sklearn.tree import DecisionTreeRegressor from sklearn.ensemble import RandomForestRegressor, AdaBoostRegressor, GradientBoostingRegressor...
733
0
69
ed5d2b8f5ad6dd9b3c91dd544c6402261e641a2d
96
py
Python
SimPEG/Utils/meshutils.py
kimjaed/simpeg
b8d716f86a4ea07ba3085fabb24c2bc974788040
[ "MIT" ]
3
2020-11-27T03:18:28.000Z
2022-03-18T01:29:58.000Z
SimPEG/Utils/meshutils.py
kimjaed/simpeg
b8d716f86a4ea07ba3085fabb24c2bc974788040
[ "MIT" ]
1
2020-10-29T11:42:21.000Z
2020-10-29T11:42:21.000Z
SimPEG/Utils/meshutils.py
kimjaed/simpeg
b8d716f86a4ea07ba3085fabb24c2bc974788040
[ "MIT" ]
1
2020-07-09T18:15:10.000Z
2020-07-09T18:15:10.000Z
from discretize.utils import ( exampleLrmGrid, meshTensor, closestPoints, ExtractCoreMesh )
24
62
0.802083
from discretize.utils import ( exampleLrmGrid, meshTensor, closestPoints, ExtractCoreMesh )
0
0
0
b298b18c0d51da2167b1f5b61a5c56a5a1445bf0
2,506
py
Python
tests/test_simulation.py
fakecoinbase/Chia-Networkslashchia-blockchain
84e6a4da18fb0a790a870cbd516f13c9bc7f0716
[ "Apache-2.0" ]
null
null
null
tests/test_simulation.py
fakecoinbase/Chia-Networkslashchia-blockchain
84e6a4da18fb0a790a870cbd516f13c9bc7f0716
[ "Apache-2.0" ]
1
2022-03-25T19:10:51.000Z
2022-03-25T19:10:51.000Z
tests/test_simulation.py
fakecoinbase/Chia-Networkslashchia-blockchain
84e6a4da18fb0a790a870cbd516f13c9bc7f0716
[ "Apache-2.0" ]
null
null
null
import asyncio import pytest from typing import List from tests.setup_nodes import setup_full_system from src.util.ints import uint32 from src.types.full_block import FullBlock from src.util.make_test_constants import make_test_constants_with_genesis from tests.time_out_assert import time_out_assert, time_out_assert_cu...
33.413333
83
0.616919
import asyncio import pytest from typing import List from tests.setup_nodes import setup_full_system from src.util.ints import uint32 from src.types.full_block import FullBlock from src.util.make_test_constants import make_test_constants_with_genesis from tests.time_out_assert import time_out_assert, time_out_assert_cu...
1,761
116
68
15ee04ffb99bd36c0a7796b9602c2b4330cffc60
1,024
py
Python
wysdom/object_schema/resolve_arg_to_type.py
jetavator/wysdom
4c67c82a9df66370da5cf5347abd7450a52d3d03
[ "Apache-2.0" ]
1
2021-04-20T07:40:28.000Z
2021-04-20T07:40:28.000Z
wysdom/object_schema/resolve_arg_to_type.py
jetavator/wysdom
4c67c82a9df66370da5cf5347abd7450a52d3d03
[ "Apache-2.0" ]
69
2020-05-13T07:13:49.000Z
2021-05-06T18:26:21.000Z
wysdom/object_schema/resolve_arg_to_type.py
jetavator/wysdom
4c67c82a9df66370da5cf5347abd7450a52d3d03
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations from typing import Type, Union from enum import Enum import inspect from ..base_schema import Schema from ..dom import DOMElement from ..base_schema import SchemaPrimitive, SchemaEnum def resolve_arg_to_schema(arg: Union[Type, Schema]) -> Schema: """ Resolve an argument ...
29.257143
75
0.654297
from __future__ import annotations from typing import Type, Union from enum import Enum import inspect from ..base_schema import Schema from ..dom import DOMElement from ..base_schema import SchemaPrimitive, SchemaEnum def resolve_arg_to_schema(arg: Union[Type, Schema]) -> Schema: """ Resolve an argument ...
0
0
0
2b5b563c231306db3c66037d5986076ffff968c1
13,177
py
Python
pro3/query_system/query.py
Jack-Lio/-Information-retrieval-2019
5c5eb675dbc6ff6977a759da07326b9629ff7f3f
[ "MIT" ]
null
null
null
pro3/query_system/query.py
Jack-Lio/-Information-retrieval-2019
5c5eb675dbc6ff6977a759da07326b9629ff7f3f
[ "MIT" ]
null
null
null
pro3/query_system/query.py
Jack-Lio/-Information-retrieval-2019
5c5eb675dbc6ff6977a759da07326b9629ff7f3f
[ "MIT" ]
null
null
null
############################## # support query serve for front web system # filename:query.py # author: liwei # StuID: 1711350 # date: 2019.12.1 ############################## #查询构建 from whoosh import highlight from whoosh import qparser from whoosh import index from flask import Flask from flask import request...
40.296636
111
0.496016
############################## # support query serve for front web system # filename:query.py # author: liwei # StuID: 1711350 # date: 2019.12.1 ############################## #查询构建 from whoosh import highlight from whoosh import qparser from whoosh import index from flask import Flask from flask import request...
5,915
0
110
fd6b632483e6382f5a744fcfd5d23da93b55559b
1,107
py
Python
examples/plot_timeseries.py
tkarna/galene
a05463d3d0c9191c51893df4593d9ce0252d25fb
[ "MIT" ]
null
null
null
examples/plot_timeseries.py
tkarna/galene
a05463d3d0c9191c51893df4593d9ce0252d25fb
[ "MIT" ]
null
null
null
examples/plot_timeseries.py
tkarna/galene
a05463d3d0c9191c51893df4593d9ce0252d25fb
[ "MIT" ]
null
null
null
""" Make time series plots. """ import galene as ga import datetime data_id_list = [ 'cmems-nrt', 'run001', 'run002', ] var_list = ['slev', 'temp'] start_time = datetime.datetime(2016, 6, 1) end_time = datetime.datetime(2018, 7, 1) for var in var_list: dataset_list = [] for data_id in data_id_lis...
26.357143
79
0.577236
""" Make time series plots. """ import galene as ga import datetime data_id_list = [ 'cmems-nrt', 'run001', 'run002', ] var_list = ['slev', 'temp'] start_time = datetime.datetime(2016, 6, 1) end_time = datetime.datetime(2018, 7, 1) for var in var_list: dataset_list = [] for data_id in data_id_lis...
0
0
0
6e349517cf5e3a5d81a0f4dfdf4fcf82c9bd454a
1,841
py
Python
parametric_si/lars.py
takeuchi-lab/parametric-si
a2a0fe55200ef8cb2cccd1b1eb4856dab1fbd333
[ "MIT" ]
2
2022-02-09T07:59:37.000Z
2022-03-09T18:47:13.000Z
parametric_si/lars.py
takeuchi-lab/parametric-si
a2a0fe55200ef8cb2cccd1b1eb4856dab1fbd333
[ "MIT" ]
null
null
null
parametric_si/lars.py
takeuchi-lab/parametric-si
a2a0fe55200ef8cb2cccd1b1eb4856dab1fbd333
[ "MIT" ]
null
null
null
import numpy as np import copy from . import cv #TODO need to refactaring
24.546667
99
0.49321
import numpy as np import copy from . import cv def knot_value(j,s_j,A,s,X): X_A = X[:,A] x_j = X[:,j] P = (np.identity(X.shape[0])) - X_A @ np.linalg.inv(X_A.T @ X_A) @ X_A.T temp = (P @ x_j) / (s_j - x_j @ X_A @ np.linalg.inv(X_A.T @ X_A) @ s) return temp #TODO need to refactaring def lars(X,y...
1,698
0
68
91c96be6b0c90e4cf12566b9211674a500d21d7d
4,127
py
Python
assignments/01/q2b.py
LiUzHiAn/stanford-tensorflow-tutorials
8d6a6483985900519ea4512e2f047cdcf11ef8ba
[ "MIT" ]
null
null
null
assignments/01/q2b.py
LiUzHiAn/stanford-tensorflow-tutorials
8d6a6483985900519ea4512e2f047cdcf11ef8ba
[ "MIT" ]
null
null
null
assignments/01/q2b.py
LiUzHiAn/stanford-tensorflow-tutorials
8d6a6483985900519ea4512e2f047cdcf11ef8ba
[ "MIT" ]
null
null
null
""" three-layers logistic regression model for not-MNIST dataset Got ~ 87% accuracy. not-MNIST: http://yaroslavvb. blogspot. it/2011/09/notmnist-dataset.html author: ANDY (andy929910266@gmail.com) """ import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' import numpy as np import tensorflow as tf import time impor...
33.827869
98
0.747516
""" three-layers logistic regression model for not-MNIST dataset Got ~ 87% accuracy. not-MNIST: http://yaroslavvb. blogspot. it/2011/09/notmnist-dataset.html author: ANDY (andy929910266@gmail.com) """ import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' import numpy as np import tensorflow as tf import time impor...
0
0
0
739be6b6166505d1450e7bc2b31fa1def015f2c7
14,617
py
Python
tasktiger/__init__.py
affiliprint/tasktiger
a79f2d6fdcc79c5de3149f2dbce8bc83f910873d
[ "MIT" ]
1
2018-12-16T06:16:19.000Z
2018-12-16T06:16:19.000Z
tasktiger/__init__.py
xiaohanghang/tasktiger
cfd2eaabee635ce6f5f03ee5644e0d9782778d8b
[ "MIT" ]
null
null
null
tasktiger/__init__.py
xiaohanghang/tasktiger
cfd2eaabee635ce6f5f03ee5644e0d9782778d8b
[ "MIT" ]
null
null
null
import click from collections import defaultdict import importlib import logging import redis import structlog from .redis_scripts import RedisScripts from ._internal import * from .exceptions import * from .retry import * from .schedule import * from .task import Task from .worker import Worker __all__ = ['TaskTige...
38.264398
94
0.603339
import click from collections import defaultdict import importlib import logging import redis import structlog from .redis_scripts import RedisScripts from ._internal import * from .exceptions import * from .retry import * from .schedule import * from .task import Task from .worker import Worker __all__ = ['TaskTige...
2,106
9,601
45
d019d3375ffbe3f53848ee7fb37f5166e009fa98
93
py
Python
MDAOfabric/__init__.py
LHoeffner/MDAOfabric
266ad27d969df98518df453c4c9da606bea6304d
[ "MIT" ]
1
2019-05-28T15:50:16.000Z
2019-05-28T15:50:16.000Z
MDAOfabric/__init__.py
LHoeffner/MDAOfabric
266ad27d969df98518df453c4c9da606bea6304d
[ "MIT" ]
null
null
null
MDAOfabric/__init__.py
LHoeffner/MDAOfabric
266ad27d969df98518df453c4c9da606bea6304d
[ "MIT" ]
null
null
null
# auxiliary from MDAOfabric.accessories import * # solvers from MDAOfabric.solvers import *
15.5
36
0.795699
# auxiliary from MDAOfabric.accessories import * # solvers from MDAOfabric.solvers import *
0
0
0
ed042e6c0269fea4543ca62d73123d29c845bfeb
3,661
py
Python
acq4/analysis/old/AnalysisPlotWidgetTemplate.py
ablot/acq4
ba7cd340d9d0282640adb501d3788f8c0837e4c4
[ "MIT" ]
null
null
null
acq4/analysis/old/AnalysisPlotWidgetTemplate.py
ablot/acq4
ba7cd340d9d0282640adb501d3788f8c0837e4c4
[ "MIT" ]
null
null
null
acq4/analysis/old/AnalysisPlotWidgetTemplate.py
ablot/acq4
ba7cd340d9d0282640adb501d3788f8c0837e4c4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'AnalysisPlotWidgetTemplate.ui' # # Created: Mon Aug 16 15:31:49 2010 # by: PyQt4 UI code generator 4.5.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui from acq4.pyqtgraph.PlotWidget import Pl...
55.469697
155
0.754166
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'AnalysisPlotWidgetTemplate.ui' # # Created: Mon Aug 16 15:31:49 2010 # by: PyQt4 UI code generator 4.5.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_AnalysisPlotWidgetTemplate(obje...
3,233
23
76
3f2edba17e96be67cada1cbc646e10326894c9cd
50,314
py
Python
src/sage/combinat/designs/bibd.py
Findstat/sage
d661c2c2bd18676014c151e9eec1e81ed12db9f6
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/designs/bibd.py
Findstat/sage
d661c2c2bd18676014c151e9eec1e81ed12db9f6
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/designs/bibd.py
Findstat/sage
d661c2c2bd18676014c151e9eec1e81ed12db9f6
[ "BSL-1.0" ]
null
null
null
r""" Balanced Incomplete Block Designs (BIBD) This module gathers everything related to Balanced Incomplete Block Designs. One can build a BIBD (or check that it can be built) with :func:`balanced_incomplete_block_design`:: sage: BIBD = designs.balanced_incomplete_block_design(7,3) In particular, Sage can build ...
34.485264
134
0.560162
r""" Balanced Incomplete Block Designs (BIBD) This module gathers everything related to Balanced Incomplete Block Designs. One can build a BIBD (or check that it can be built) with :func:`balanced_incomplete_block_design`:: sage: BIBD = designs.balanced_incomplete_block_design(7,3) In particular, Sage can build ...
0
0
0
ec66bf170e2d4485e98bdeb40c2d8632e11f2c57
4,194
py
Python
tools/gen_ctrl.py
YC-Vertex/DTW-ASIC
cfa5038150033771061ffea1864eed84fa20d812
[ "MIT" ]
null
null
null
tools/gen_ctrl.py
YC-Vertex/DTW-ASIC
cfa5038150033771061ffea1864eed84fa20d812
[ "MIT" ]
null
null
null
tools/gen_ctrl.py
YC-Vertex/DTW-ASIC
cfa5038150033771061ffea1864eed84fa20d812
[ "MIT" ]
null
null
null
import numpy as np from collections import OrderedDict from GenPlayground import GenPlayground if __name__ == '__main__': np.set_printoptions(linewidth=200) IP, IP_cycle, IP_pe = GenPlayground() # print(IP_cycle) # print(IP_pe) Gen_CTRL(IP, IP_cycle, IP_pe)
32.261538
77
0.38865
import numpy as np from collections import OrderedDict from GenPlayground import GenPlayground def init_cycle(cycle, IP_cycle, ind_src, ind_sel): assert len(ind_src) == len(ind_sel) Arr = (IP_cycle == cycle) Dict = OrderedDict() src = ['o_tsrc', 'o_rsrc'] sel = ['o_sel0', 'o_sel1', 'o_sel2'] ...
3,866
0
46
c4d37604f86d09634d7a2c4073b5d4a69f67fcbf
5,563
py
Python
src/virtual-wan/azext_vwan/_help.py
mayank88mahajan/azure-cli-extensions
8bd389a1877bffd14052bec5519ce75dc6fc34cf
[ "MIT" ]
1
2019-05-10T19:58:09.000Z
2019-05-10T19:58:09.000Z
src/virtual-wan/azext_vwan/_help.py
mayank88mahajan/azure-cli-extensions
8bd389a1877bffd14052bec5519ce75dc6fc34cf
[ "MIT" ]
null
null
null
src/virtual-wan/azext_vwan/_help.py
mayank88mahajan/azure-cli-extensions
8bd389a1877bffd14052bec5519ce75dc6fc34cf
[ "MIT" ]
1
2021-07-28T14:50:54.000Z
2021-07-28T14:50:54.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
24.082251
94
0.647133
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
0
0
0
9fc811ab2dba5c8559559771216048c188060118
124
py
Python
tests/apps.py
radiac/django-powerwiki
3df80384261bdef8d25b1df9459073f0ae928a86
[ "BSD-3-Clause" ]
4
2020-09-10T20:36:02.000Z
2021-11-03T17:09:11.000Z
tests/apps.py
radiac/django-powerwiki
3df80384261bdef8d25b1df9459073f0ae928a86
[ "BSD-3-Clause" ]
null
null
null
tests/apps.py
radiac/django-powerwiki
3df80384261bdef8d25b1df9459073f0ae928a86
[ "BSD-3-Clause" ]
null
null
null
from django.apps import AppConfig
17.714286
33
0.741935
from django.apps import AppConfig class PowerwikiConfig(AppConfig): name = "powerwiki" verbose_name = "Powerwiki"
0
66
23
c3865aae6880eb61a131d9e1b386dd04e48e954e
4,358
py
Python
bot.py
olebittner/TwitchStickerBot
bccc08b00f6465c7335978825342cdb6e65d6e83
[ "MIT" ]
1
2019-01-01T16:17:41.000Z
2019-01-01T16:17:41.000Z
bot.py
olebittner/TwitchStickerBot
bccc08b00f6465c7335978825342cdb6e65d6e83
[ "MIT" ]
3
2021-09-08T00:40:45.000Z
2022-03-11T23:36:48.000Z
bot.py
olebittner/TwitchStickerBot
bccc08b00f6465c7335978825342cdb6e65d6e83
[ "MIT" ]
null
null
null
import signal from telegram.ext import Updater, CommandHandler, MessageHandler, Filters from telegram import Sticker, InlineKeyboardButton, InlineKeyboardMarkup import logging from Utils import telegram_util, twitch_util, config_util if __name__ == '__main__': config = config_util.get_config() logging.basicC...
51.880952
135
0.600734
import signal from telegram.ext import Updater, CommandHandler, MessageHandler, Filters from telegram import Sticker, InlineKeyboardButton, InlineKeyboardMarkup import logging from Utils import telegram_util, twitch_util, config_util class TwitchStickersBot: def __init__(self, token): signal.signal(signal...
3,453
3
184
7570b2a8b2bb15a2f96f9e28f427b03870293513
4,518
py
Python
figuras/PycharmKayStatisticalReport/problem_2_4.py
bor9/estudiando_el_kay
6e07908b8b0b5a5166dadce30001e6100e8304c3
[ "MIT" ]
null
null
null
figuras/PycharmKayStatisticalReport/problem_2_4.py
bor9/estudiando_el_kay
6e07908b8b0b5a5166dadce30001e6100e8304c3
[ "MIT" ]
null
null
null
figuras/PycharmKayStatisticalReport/problem_2_4.py
bor9/estudiando_el_kay
6e07908b8b0b5a5166dadce30001e6100e8304c3
[ "MIT" ]
1
2021-11-02T05:27:27.000Z
2021-11-02T05:27:27.000Z
import matplotlib.pyplot as plt import numpy as np from scipy.stats import norm import math import matplotlib.colors as colors from matplotlib import cm from matplotlib import rc __author__ = 'ernesto' # if use latex or mathtext rc('text', usetex=False) rc('mathtext', fontset='cm') # auxiliar function for plot tick...
30.527027
102
0.672421
import matplotlib.pyplot as plt import numpy as np from scipy.stats import norm import math import matplotlib.colors as colors from matplotlib import cm from matplotlib import rc __author__ = 'ernesto' # if use latex or mathtext rc('text', usetex=False) rc('mathtext', fontset='cm') # auxiliar function for plot tick...
642
0
22
79c80aedabde398624f51568a2ec3da86b080e3d
15,731
py
Python
lcmap_tap/PlotFrame/plotwindow.py
danzelenak-usgs/TAP_Tool
4ae3f4105df47efaa57283b25019e398b32de7b9
[ "Unlicense" ]
2
2018-09-05T04:29:27.000Z
2020-01-08T19:18:50.000Z
lcmap_tap/PlotFrame/plotwindow.py
danzelenak-usgs/TAP_Tool
4ae3f4105df47efaa57283b25019e398b32de7b9
[ "Unlicense" ]
1
2018-08-10T18:32:50.000Z
2018-08-10T18:32:50.000Z
lcmap_tap/PlotFrame/plotwindow.py
danzelenak-usgs/TAP_Tool
4ae3f4105df47efaa57283b25019e398b32de7b9
[ "Unlicense" ]
1
2021-12-27T04:45:49.000Z
2021-12-27T04:45:49.000Z
"""Generate a matplotlib canvas and add it to a QWidget contained in a QMainWindow. This will provide the display and interactions for the PyCCD plots.""" from lcmap_tap.logger import log, exc_handler from lcmap_tap.Plotting import POINTS, LINES import sys import datetime as dt import numpy as np import pkg_resource...
31.973577
116
0.582226
"""Generate a matplotlib canvas and add it to a QWidget contained in a QMainWindow. This will provide the display and interactions for the PyCCD plots.""" from lcmap_tap.logger import log, exc_handler from lcmap_tap.Plotting import POINTS, LINES import sys import datetime as dt import numpy as np import pkg_resource...
389
13,888
23
d6bc51eaf527242c693f9f53bdf2e764bbd40814
254
py
Python
corvid/util/files.py
afcarl/corvid
e257074edeac1e8dce4a737b60e93a9bea37b6b9
[ "Apache-2.0" ]
1
2019-04-15T13:49:39.000Z
2019-04-15T13:49:39.000Z
corvid/util/files.py
afcarl/corvid
e257074edeac1e8dce4a737b60e93a9bea37b6b9
[ "Apache-2.0" ]
null
null
null
corvid/util/files.py
afcarl/corvid
e257074edeac1e8dce4a737b60e93a9bea37b6b9
[ "Apache-2.0" ]
1
2020-09-02T13:49:52.000Z
2020-09-02T13:49:52.000Z
""" Miscellaneous functions for working with files """ import os def canonicalize_path(path: str): """Converts a path string to its canonical form (easier for comparisons)""" return os.path.abspath(os.path.realpath(os.path.expanduser(path)))
21.166667
79
0.732283
""" Miscellaneous functions for working with files """ import os def canonicalize_path(path: str): """Converts a path string to its canonical form (easier for comparisons)""" return os.path.abspath(os.path.realpath(os.path.expanduser(path)))
0
0
0
b83eb1a7483c28cae2bffee78215639718cd2f68
1,929
py
Python
src/mayapip/_internal/maya/maya_windows.py
jonntd/maya-pip
2a579da17fe348053149d2ad4c45a2ff6efb60ed
[ "MIT" ]
2
2019-03-05T04:11:44.000Z
2019-03-05T07:26:53.000Z
src/mayapip/_internal/maya/maya_windows.py
jonntd/maya-pip
2a579da17fe348053149d2ad4c45a2ff6efb60ed
[ "MIT" ]
null
null
null
src/mayapip/_internal/maya/maya_windows.py
jonntd/maya-pip
2a579da17fe348053149d2ad4c45a2ff6efb60ed
[ "MIT" ]
null
null
null
import os import _winreg def get_python_executables(): """ Find the Maya installation paths using _winreg. The path to the python executable is extended from the installation path. The dictionary is made up of keys that are made up of the Maya versions found installed and a path to the executable...
31.112903
80
0.572836
import os import _winreg def get_python_executables(): """ Find the Maya installation paths using _winreg. The path to the python executable is extended from the installation path. The dictionary is made up of keys that are made up of the Maya versions found installed and a path to the executable...
0
0
0
a32915557c7c8dd17bd4c7ebb7aeab745484bd61
312
bzl
Python
lib/output_files.bzl
alexeagle/bazel-lib
02be4c5f47b476e686943f53ddd47a672a51a265
[ "Apache-2.0" ]
16
2021-11-08T15:03:49.000Z
2022-03-23T19:38:32.000Z
lib/output_files.bzl
alexeagle/bazel-lib
02be4c5f47b476e686943f53ddd47a672a51a265
[ "Apache-2.0" ]
29
2021-11-15T16:27:25.000Z
2022-03-31T04:03:16.000Z
lib/output_files.bzl
alexeagle/bazel-lib
02be4c5f47b476e686943f53ddd47a672a51a265
[ "Apache-2.0" ]
3
2021-12-09T00:27:42.000Z
2022-03-30T20:14:00.000Z
"""A rule that provides file(s) specific via DefaultInfo from a given target's DefaultInfo or OutputGroupInfo """ load( "//lib/private:output_files.bzl", _make_output_files = "make_output_files", _output_files = "output_files", ) output_files = _output_files make_output_files = _make_output_files
26
109
0.762821
"""A rule that provides file(s) specific via DefaultInfo from a given target's DefaultInfo or OutputGroupInfo """ load( "//lib/private:output_files.bzl", _make_output_files = "make_output_files", _output_files = "output_files", ) output_files = _output_files make_output_files = _make_output_files
0
0
0
29f99afcc40ecdf37624ef727bdd1e892bc5dd71
3,556
py
Python
src/converter.py
salu133445/lakh-pianoroll-dataset
a8a8582254ff5f3225e792fa1ba1f939f0423080
[ "MIT" ]
59
2018-05-03T17:17:26.000Z
2022-03-21T09:54:07.000Z
src/converter.py
salu133445/lakh-pianoroll-dataset
a8a8582254ff5f3225e792fa1ba1f939f0423080
[ "MIT" ]
4
2018-04-25T13:15:23.000Z
2021-01-24T11:16:50.000Z
src/converter.py
salu133445/lakh-pianoroll-dataset
a8a8582254ff5f3225e792fa1ba1f939f0423080
[ "MIT" ]
8
2019-05-15T00:46:10.000Z
2022-03-28T11:07:14.000Z
"""This script converts a collection of MIDI files to multitrack pianorolls. """ import os import json import argparse import warnings import pretty_midi from pypianoroll import Multitrack from utils import make_sure_path_exists, change_prefix, findall_endswith from config import CONFIG if CONFIG['multicore']...
35.207921
78
0.642576
"""This script converts a collection of MIDI files to multitrack pianorolls. """ import os import json import argparse import warnings import pretty_midi from pypianoroll import Multitrack from utils import make_sure_path_exists, change_prefix, findall_endswith from config import CONFIG if CONFIG['multicore']...
0
0
0
d44c94db376d5f7224fb18eee2ca5ce636a28c6c
1,212
py
Python
server/app/api/token_required.py
brulejr/flask-vue-crud
be4a1281184be7330c76e3d1dd3e936c8e07a7fe
[ "MIT" ]
null
null
null
server/app/api/token_required.py
brulejr/flask-vue-crud
be4a1281184be7330c76e3d1dd3e936c8e07a7fe
[ "MIT" ]
null
null
null
server/app/api/token_required.py
brulejr/flask-vue-crud
be4a1281184be7330c76e3d1dd3e936c8e07a7fe
[ "MIT" ]
null
null
null
from flask import request, current_app import jwt from app.models.auth import User from app.api import api # required_token decorator
32.756757
86
0.575083
from flask import request, current_app import jwt from app.models.auth import User from app.api import api # required_token decorator def token_required(f): def wrapper(*args, **kwargs): auth_header = request.headers.get('Authorization') current_user = None if auth_header: try...
1,053
0
22
2c697b59bda67a7f33a79244efc025be23e606dd
7,994
py
Python
MimeCast/SumoLogic-Mimecast-Data-Collection/audit_collection.py
lghakamo-paf/sumologic-content
aa14674976c9265e93c8068193704ca23af1c0d7
[ "Apache-2.0" ]
81
2018-03-27T14:51:00.000Z
2022-02-22T02:51:55.000Z
MimeCast/SumoLogic-Mimecast-Data-Collection/audit_collection.py
lghakamo-paf/sumologic-content
aa14674976c9265e93c8068193704ca23af1c0d7
[ "Apache-2.0" ]
17
2018-04-02T16:29:34.000Z
2022-03-31T12:59:11.000Z
MimeCast/SumoLogic-Mimecast-Data-Collection/audit_collection.py
lghakamo-paf/sumologic-content
aa14674976c9265e93c8068193704ca23af1c0d7
[ "Apache-2.0" ]
70
2018-03-19T02:46:34.000Z
2021-09-30T17:00:41.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """Fetches audit log data from the Mimecast API and saves to a folder for Sumo Logic data collection""" import base64 import hashlib import hmac import json import logging import os import pickle import uuid import time import datetime import sys from os.path import dirna...
41.419689
118
0.589317
#!/usr/bin/env python # -*- coding: utf-8 -*- """Fetches audit log data from the Mimecast API and saves to a folder for Sumo Logic data collection""" import base64 import hashlib import hmac import json import logging import os import pickle import uuid import time import datetime import sys from os.path import dirna...
5,599
0
69
36c7ebeccc6f1b963ba53c8b9d82cd0d4f8858f5
5,568
py
Python
core/test_poly_parser.py
mike006322/PolynomialCalculator
bf56b0e773a3461ab2aa958d0d90e08f80a4d201
[ "MIT" ]
null
null
null
core/test_poly_parser.py
mike006322/PolynomialCalculator
bf56b0e773a3461ab2aa958d0d90e08f80a4d201
[ "MIT" ]
null
null
null
core/test_poly_parser.py
mike006322/PolynomialCalculator
bf56b0e773a3461ab2aa958d0d90e08f80a4d201
[ "MIT" ]
null
null
null
import unittest from core.poly_parser import * if __name__ == '__main__': unittest.main()
40.941176
102
0.499282
import unittest from core.poly_parser import * class TestParser(unittest.TestCase): def test_find_corresponding_right_parenthesis(self): test = "()" self.assertEqual(find_corresponding_right_parenthesis(test, 0), 1) test = "(abc)" self.assertEqual(find_corresponding_right_parenthe...
5,298
15
158
cc44e0593536fd7bc0b6000b44f248f46ab77088
4,750
py
Python
dialogs/azure_dialog.py
IdanAtias/Felix
2a3354a41824a6e082b875d42e4998964f23a3ee
[ "MIT" ]
null
null
null
dialogs/azure_dialog.py
IdanAtias/Felix
2a3354a41824a6e082b875d42e4998964f23a3ee
[ "MIT" ]
6
2020-10-18T05:36:33.000Z
2020-12-11T11:47:25.000Z
dialogs/azure_dialog.py
IdanAtias/Felix
2a3354a41824a6e082b875d42e4998964f23a3ee
[ "MIT" ]
null
null
null
from typing import List, Optional from dataclasses import dataclass from botbuilder.schema import ActivityTypes, Activity from botbuilder.core import MessageFactory from botbuilder.dialogs import ( WaterfallDialog, WaterfallStepContext, DialogTurnResult, PromptOptions, Choice, ChoicePrompt, ) fr...
36.538462
110
0.627789
from typing import List, Optional from dataclasses import dataclass from botbuilder.schema import ActivityTypes, Activity from botbuilder.core import MessageFactory from botbuilder.dialogs import ( WaterfallDialog, WaterfallStepContext, DialogTurnResult, PromptOptions, Choice, ChoicePrompt, ) fr...
3,854
158
152
97181e2f23315d37a8d53783faa653353202cb03
3,974
py
Python
Computer science/Programming languages/Python/Basics/Simple programs/Introduction to Python/topic.py
chanchanchong/PYTHON-TRACK-IN-HYPERSKILL
462fe08ff4a2b183fd45a0235ab1ec7a788bd54c
[ "MIT" ]
null
null
null
Computer science/Programming languages/Python/Basics/Simple programs/Introduction to Python/topic.py
chanchanchong/PYTHON-TRACK-IN-HYPERSKILL
462fe08ff4a2b183fd45a0235ab1ec7a788bd54c
[ "MIT" ]
null
null
null
Computer science/Programming languages/Python/Basics/Simple programs/Introduction to Python/topic.py
chanchanchong/PYTHON-TRACK-IN-HYPERSKILL
462fe08ff4a2b183fd45a0235ab1ec7a788bd54c
[ "MIT" ]
null
null
null
# Theory: Introduction to Python # Computer science has been around for a while, and # programming languages are one of its main tools. These are # designed to help us implement software to run on a computer. # Just as natural languages for people, they serve as a # communication tool, only between people and machines....
40.141414
95
0.755159
# Theory: Introduction to Python # Computer science has been around for a while, and # programming languages are one of its main tools. These are # designed to help us implement software to run on a computer. # Just as natural languages for people, they serve as a # communication tool, only between people and machines....
0
0
0
b7a9f18814a5b7bd79ce29503dcbbeefe34c7382
11,746
py
Python
jenkinsapi_tests/unittests/test_requester.py
leon-gh/jenkinsapi
6d3bf94b34a521955dbb82c5ae7c2eba031af894
[ "MIT" ]
1
2019-05-09T11:49:39.000Z
2019-05-09T11:49:39.000Z
jenkinsapi_tests/unittests/test_requester.py
leon-gh/jenkinsapi
6d3bf94b34a521955dbb82c5ae7c2eba031af894
[ "MIT" ]
null
null
null
jenkinsapi_tests/unittests/test_requester.py
leon-gh/jenkinsapi
6d3bf94b34a521955dbb82c5ae7c2eba031af894
[ "MIT" ]
null
null
null
from __future__ import print_function import pytest import requests from jenkinsapi.jenkins import Requester from jenkinsapi.custom_exceptions import JenkinsAPIException from mock import patch @patch('jenkinsapi.jenkins.Requester.AUTH_COOKIE', 'FAKE') @patch('jenkinsapi.jenkins.Requester.AUTH_COOKIE', '...
28.718826
79
0.640048
from __future__ import print_function import pytest import requests from jenkinsapi.jenkins import Requester from jenkinsapi.custom_exceptions import JenkinsAPIException from mock import patch def test_no_parameters_uses_default_values(): req = Requester() assert isinstance(req, Requester) assert req.user...
10,715
0
688
4a6b7057bdfe4e83c14ee84826e583e22668baa9
4,247
py
Python
app/views/money.py
hezmondo/lulu
507a863f00086e827e4063d0666a4d97f10941c6
[ "MIT" ]
null
null
null
app/views/money.py
hezmondo/lulu
507a863f00086e827e4063d0666a4d97f10941c6
[ "MIT" ]
null
null
null
app/views/money.py
hezmondo/lulu
507a863f00086e827e4063d0666a4d97f10941c6
[ "MIT" ]
null
null
null
from flask import Blueprint, flash, redirect, render_template, request, url_for from flask_login import login_required from app.dao.rent import get_all_rentcodes from app.dao.money import get_acc_descs, get_moneydets, get_money_item, toggle_cleared from app.main.money import collect_search_filter, mget_money_acc, mget...
41.23301
113
0.701436
from flask import Blueprint, flash, redirect, render_template, request, url_for from flask_login import login_required from app.dao.rent import get_all_rentcodes from app.dao.money import get_acc_descs, get_moneydets, get_money_item, toggle_cleared from app.main.money import collect_search_filter, mget_money_acc, mget...
2,991
0
154
4c2ec31501e8c37c3488076ed08cbf47a6eadb60
5,459
py
Python
antelope_core/archives/quantity_manager.py
AntelopeLCA/core
ee40685add52ba41a462e2147fe8c377c6ba2a80
[ "BSD-3-Clause" ]
1
2021-10-06T18:42:49.000Z
2021-10-06T18:42:49.000Z
antelope_core/archives/quantity_manager.py
AntelopeLCA/core
ee40685add52ba41a462e2147fe8c377c6ba2a80
[ "BSD-3-Clause" ]
6
2021-01-09T08:56:46.000Z
2022-03-29T08:26:21.000Z
antelope_core/archives/quantity_manager.py
AntelopeLCA/core
ee40685add52ba41a462e2147fe8c377c6ba2a80
[ "BSD-3-Clause" ]
null
null
null
from synonym_dict import SynonymDict, SynonymSet class QuantitySynonyms(SynonymSet): """ QuantitySynonyms are string terms that all refer to the same quantity of measure. They must all have the same unit, because they are used to define the unit of measure of flowables. To repeat: quantity instances t...
35.679739
119
0.598828
from synonym_dict import SynonymDict, SynonymSet class QuantityUnitMismatch(Exception): pass class QuantityAlreadySet(Exception): pass class ValidationError(Exception): pass class QuantitySynonyms(SynonymSet): """ QuantitySynonyms are string terms that all refer to the same quantity of measu...
3,015
1,283
330
37faeca1f83dd4730bf51c1e2102c5d401b0585a
1,396
py
Python
decision-science/lab3/main.py
Foltrex/bsu
769ddac58eddd5877e40949227998575fd4dec77
[ "MIT" ]
113
2017-02-02T13:09:21.000Z
2022-03-14T08:54:41.000Z
decision-science/lab3/main.py
Foltrex/bsu
769ddac58eddd5877e40949227998575fd4dec77
[ "MIT" ]
12
2017-04-14T12:01:50.000Z
2022-03-08T22:47:22.000Z
decision-science/lab3/main.py
Drapegnik/bsu
769ddac58eddd5877e40949227998575fd4dec77
[ "MIT" ]
78
2017-03-18T22:36:13.000Z
2022-02-20T14:42:34.000Z
import os import sys from algorithms import dijkstra, floyd from utils import * TASK1_START = 0 print '-'*35 + '\ntask1 - shortest ways from ({})\n'.format(TASK1_START + 1) + '-'*35 g_list, g_mat = read_graph_list('task1.in') dist, prev, table = dijkstra(g_list, TASK1_START) user_interaction(prev, dist, g_mat) wri...
24.491228
99
0.541547
import os import sys from algorithms import dijkstra, floyd from utils import * def dialog(size): try: node = int(raw_input('Please enter node number in [1, {}], or -1 for exit: '.format(size))) if node == -1: return -1 if node < 1 or node > size: raise ValueError ...
858
0
46
37efd995f9e98d6ad319826ae24a6853857bd6eb
193
py
Python
scripts/yl_servo_on.py
a825338908/laser_line_extraction
7ce9484e80a9bd2b9abbd66f75de7838196d01f6
[ "BSD-3-Clause" ]
null
null
null
scripts/yl_servo_on.py
a825338908/laser_line_extraction
7ce9484e80a9bd2b9abbd66f75de7838196d01f6
[ "BSD-3-Clause" ]
null
null
null
scripts/yl_servo_on.py
a825338908/laser_line_extraction
7ce9484e80a9bd2b9abbd66f75de7838196d01f6
[ "BSD-3-Clause" ]
null
null
null
bashCommand = "rostopic pub -1 /spray_onoff std_msgs/Float32 1.0" import subprocess process = subprocess.Popen(bashCommand.split(), stdout=subprocess.PIPE) output, error = process.communicate()
48.25
71
0.797927
bashCommand = "rostopic pub -1 /spray_onoff std_msgs/Float32 1.0" import subprocess process = subprocess.Popen(bashCommand.split(), stdout=subprocess.PIPE) output, error = process.communicate()
0
0
0
ae4b00118527fcda2743a04d75ac6fb6b3855981
223
py
Python
apps/application.py
panla/fastapi_tortoise_mysql
1a5f722911d7665b37b2035984ff146038389a2a
[ "MIT" ]
8
2021-04-17T12:54:14.000Z
2022-03-07T12:47:21.000Z
apps/application.py
panla/fastapi_tortoise_mysql
1a5f722911d7665b37b2035984ff146038389a2a
[ "MIT" ]
null
null
null
apps/application.py
panla/fastapi_tortoise_mysql
1a5f722911d7665b37b2035984ff146038389a2a
[ "MIT" ]
null
null
null
from fastapi import FastAPI from config import ServiceConfig from apps.libs import init_app
17.153846
68
0.7713
from fastapi import FastAPI from config import ServiceConfig from apps.libs import init_app def create_app(): app = FastAPI(include_in_schema=ServiceConfig.INCLUDE_IN_SCHEMA) app = init_app(app) return app
106
0
23
db97dac89d4ee5b5718baab12440ee5099c81ed5
850
py
Python
main.py
embed-systems/action-sharepoint-upload
c95b1814d4f4127bbaf5d97513c93f6aa957bdc8
[ "MIT" ]
null
null
null
main.py
embed-systems/action-sharepoint-upload
c95b1814d4f4127bbaf5d97513c93f6aa957bdc8
[ "MIT" ]
null
null
null
main.py
embed-systems/action-sharepoint-upload
c95b1814d4f4127bbaf5d97513c93f6aa957bdc8
[ "MIT" ]
null
null
null
import os from office365.sharepoint.client_context import ClientContext SITE_URL = os.getenv('SITE_URL') USER = os.getenv('USER') PASS = os.getenv('PASS') DESTINATION = os.getenv('DESTINATION') FILE = os.getenv('FILE') FILE_ON_SERVER = os.getenv('FILE_ON_SERVER') if __name__ == "__main__": main()
26.5625
85
0.716471
import os from office365.sharepoint.client_context import ClientContext SITE_URL = os.getenv('SITE_URL') USER = os.getenv('USER') PASS = os.getenv('PASS') DESTINATION = os.getenv('DESTINATION') FILE = os.getenv('FILE') FILE_ON_SERVER = os.getenv('FILE_ON_SERVER') def main(): ctx = ClientContext(SITE_URL).with_us...
521
0
23
072afd68ab568d4e364bbf03f905cbbfe0fd449d
15,538
py
Python
crlapi/sl/clmodels/boosting.py
pclucas14/alma
dcb5dc55f2eec32bbe2d9cf7a256c1382658820d
[ "MIT" ]
9
2021-11-24T21:09:32.000Z
2022-03-29T21:51:35.000Z
crlapi/sl/clmodels/boosting.py
pclucas14/alma
dcb5dc55f2eec32bbe2d9cf7a256c1382658820d
[ "MIT" ]
null
null
null
crlapi/sl/clmodels/boosting.py
pclucas14/alma
dcb5dc55f2eec32bbe2d9cf7a256c1382658820d
[ "MIT" ]
1
2022-02-24T18:33:40.000Z
2022-02-24T18:33:40.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # import torch import torch.nn as nn import torch.nn.functional as F from crlapi.core import CLModel from crlapi.sl.clmodel...
35.074492
145
0.597567
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # import torch import torch.nn as nn import torch.nn.functional as F from crlapi.core import CLModel from crlapi.sl.clmodel...
2,354
12,363
181
14762532b0b2c9e0dc177730a543ef1db73e4310
77
py
Python
pyinformix/requirements.py
homedepot/pyinformix
06a037510f79d12557a0dc0b795e2a92eb79ecb3
[ "Apache-2.0" ]
null
null
null
pyinformix/requirements.py
homedepot/pyinformix
06a037510f79d12557a0dc0b795e2a92eb79ecb3
[ "Apache-2.0" ]
null
null
null
pyinformix/requirements.py
homedepot/pyinformix
06a037510f79d12557a0dc0b795e2a92eb79ecb3
[ "Apache-2.0" ]
null
null
null
from ibm_db_sa import requirements Requirements = requirements.Requirements
19.25
40
0.87013
from ibm_db_sa import requirements Requirements = requirements.Requirements
0
0
0
aa89fe01a87ed3712385d7e934e60a0af15ebe15
32,103
py
Python
test/test_snap_schedule.py
point85/PyShift
46d0e1c23d3c570416633f68d416abd587b8e22f
[ "MIT" ]
null
null
null
test/test_snap_schedule.py
point85/PyShift
46d0e1c23d3c570416633f68d416abd587b8e22f
[ "MIT" ]
null
null
null
test/test_snap_schedule.py
point85/PyShift
46d0e1c23d3c570416633f68d416abd587b8e22f
[ "MIT" ]
null
null
null
from datetime import datetime, time, timedelta from PyShift.test.base_test import BaseTest from PyShift.workschedule.work_schedule import WorkSchedule
56.321053
180
0.674392
from datetime import datetime, time, timedelta from PyShift.test.base_test import BaseTest from PyShift.workschedule.work_schedule import WorkSchedule class TestSnapSchedule(BaseTest): def testLowNight(self): description = "Low night demand" self.workSchedule = WorkSchedule("Low ...
31,491
12
381
4a0cfd206328400228d641cce69e03bc4e9b9e37
13,579
py
Python
geoloc-server/ppmeasurements/util.py
muzammilar/passport
7918561916fbcb5e82cd73d577873fb17a819d19
[ "BSD-3-Clause" ]
1
2021-12-06T01:32:56.000Z
2021-12-06T01:32:56.000Z
geoloc-server/ppmeasurements/util.py
muzammilar/passport
7918561916fbcb5e82cd73d577873fb17a819d19
[ "BSD-3-Clause" ]
null
null
null
geoloc-server/ppmeasurements/util.py
muzammilar/passport
7918561916fbcb5e82cd73d577873fb17a819d19
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ ppmeasurements.util ~~~~~~~~~~~~~~ This module contains utility functions for parsing information, checking for non-global IP address, convert traceroutes to machine-readable structures, etc. :author: Muzammil Abdul Rehman :copyright: Northeastern University © ...
41.148485
198
0.579498
# -*- coding: utf-8 -*- """ ppmeasurements.util ~~~~~~~~~~~~~~ This module contains utility functions for parsing information, checking for non-global IP address, convert traceroutes to machine-readable structures, etc. :author: Muzammil Abdul Rehman :copyright: Northeastern University © ...
10,040
0
299
d183c408d61dd4345eb37ea3bf99acb7dca74e94
702
py
Python
tests/test_issues.py
AdvaitDhingra/vector
5ba111555bae20887e417c1e73101a940d06fc57
[ "BSD-3-Clause" ]
40
2020-03-26T13:28:36.000Z
2022-03-23T22:14:35.000Z
tests/test_issues.py
AdvaitDhingra/vector
5ba111555bae20887e417c1e73101a940d06fc57
[ "BSD-3-Clause" ]
66
2020-02-14T13:32:18.000Z
2022-03-29T14:35:31.000Z
tests/test_issues.py
AdvaitDhingra/vector
5ba111555bae20887e417c1e73101a940d06fc57
[ "BSD-3-Clause" ]
14
2020-01-29T22:03:33.000Z
2022-03-16T02:46:25.000Z
# Copyright (c) 2019-2021, Jonas Eschle, Jim Pivarski, Eduardo Rodrigues, and Henry Schreiner. # # Distributed under the 3-clause BSD license, see accompanying file LICENSE # or https://github.com/scikit-hep/vector for details. import pytest import vector
31.909091
94
0.611111
# Copyright (c) 2019-2021, Jonas Eschle, Jim Pivarski, Eduardo Rodrigues, and Henry Schreiner. # # Distributed under the 3-clause BSD license, see accompanying file LICENSE # or https://github.com/scikit-hep/vector for details. import pytest import vector def test_issue_99(): ak = pytest.importorskip("awkward")...
420
0
23
0b99c956dd5378ae56695c4f64c892ade7598499
3,363
py
Python
wavemaker/wave_stream.py
serban/wavemaker
889772cb440b7eb64369a067eefcb96410d7f4f0
[ "MIT" ]
1
2021-03-12T09:12:47.000Z
2021-03-12T09:12:47.000Z
wavemaker/wave_stream.py
serban/wavemaker
889772cb440b7eb64369a067eefcb96410d7f4f0
[ "MIT" ]
null
null
null
wavemaker/wave_stream.py
serban/wavemaker
889772cb440b7eb64369a067eefcb96410d7f4f0
[ "MIT" ]
null
null
null
# vim:set ts=8 sw=2 sts=2 et: """Store signals.""" import itertools import struct import wave SAMPLE_SIZE = 16 # In bits class WaveStream(object): """A stream of PCM audio data.""" def __init__(self, channels, sample_rate, sample_size): """Initialize a WaveStream with integer samples. Args: c...
34.670103
80
0.71127
# vim:set ts=8 sw=2 sts=2 et: """Store signals.""" import itertools import struct import wave SAMPLE_SIZE = 16 # In bits class WaveStream(object): """A stream of PCM audio data.""" def __init__(self, channels, sample_rate, sample_size): """Initialize a WaveStream with integer samples. Args: c...
0
0
0
fc9779bee5089a9ef47d3595e2681e0ce8a1ed46
70
py
Python
tests/utils/__init__.py
brunns/brunns-matchers
b12dc13336501fce9a1e0631e439e21e6246d8ea
[ "MIT" ]
1
2019-03-15T12:51:26.000Z
2019-03-15T12:51:26.000Z
tests/utils/__init__.py
brunns/brunns-matchers
b12dc13336501fce9a1e0631e439e21e6246d8ea
[ "MIT" ]
10
2019-02-20T21:10:27.000Z
2022-03-01T22:36:00.000Z
tests/utils/__init__.py
brunns/brunns-matchers
b12dc13336501fce9a1e0631e439e21e6246d8ea
[ "MIT" ]
1
2020-01-22T11:08:06.000Z
2020-01-22T11:08:06.000Z
# encoding=utf-8 import logging logger = logging.getLogger(__name__)
14
36
0.785714
# encoding=utf-8 import logging logger = logging.getLogger(__name__)
0
0
0
14f75548223061656a5673adc5af9f552ce2ecb8
1,975
py
Python
days/day064/exercises/038/nolan.py
alex-vegan/100daysofcode-with-python-course
b6c12316abe18274b7963371b8f0ed2fd549ef07
[ "MIT" ]
2
2018-10-28T17:12:37.000Z
2018-10-28T17:12:39.000Z
days/day064/exercises/038/nolan.py
alex-vegan/100daysofcode-with-python-course
b6c12316abe18274b7963371b8f0ed2fd549ef07
[ "MIT" ]
3
2018-10-28T17:11:04.000Z
2018-10-29T22:36:36.000Z
days/day064/exercises/038/nolan.py
alex-vegan/100daysofcode-with-python-course
b6c12316abe18274b7963371b8f0ed2fd549ef07
[ "MIT" ]
null
null
null
import xml.etree.ElementTree as ET from pprint import pprint as pp import re # from OMDB xmlstring = '''<?xml version="1.0" encoding="UTF-8"?> <root response="True"> <movie title="The Prestige" year="2006" rated="PG-13" released="20 Oct 2006" runtime="130 min" genre="Drama, Mystery, Sci-Fi" director="Christ...
41.145833
163
0.675443
import xml.etree.ElementTree as ET from pprint import pprint as pp import re # from OMDB xmlstring = '''<?xml version="1.0" encoding="UTF-8"?> <root response="True"> <movie title="The Prestige" year="2006" rated="PG-13" released="20 Oct 2006" runtime="130 min" genre="Drama, Mystery, Sci-Fi" director="Christ...
0
0
0