hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c334cd6809fae5b8cf2760630ff5474a4bc0f6b
7,348
py
Python
prepare.py
obitto/relation-network
2cbea587c9d43d6e02dba8ddd79e9ae18eca5356
[ "MIT" ]
null
null
null
prepare.py
obitto/relation-network
2cbea587c9d43d6e02dba8ddd79e9ae18eca5356
[ "MIT" ]
null
null
null
prepare.py
obitto/relation-network
2cbea587c9d43d6e02dba8ddd79e9ae18eca5356
[ "MIT" ]
null
null
null
import numpy as np import json from nltk.tokenize import word_tokenize from PIL import Image import os import h5py from random import shuffle class ClevrDataset(object): """ This is the dataset for clevr task. """ def __init__(self, config, dataset_name = 'train' , shuffle = False, load_vocab = False): if data...
30.87395
174
0.664807
import numpy as np import json from nltk.tokenize import word_tokenize from PIL import Image import os import h5py from random import shuffle class ClevrDataset(object): def __init__(self, config, dataset_name = 'train' , shuffle = False, load_vocab = False): if dataset_name == 'train': self.question_path = 'd...
true
true
1c334ddc98738db0e05cabf20e610f1a0a62f889
21,417
py
Python
train.py
kyuhyoung/yolact
98fc78e963264d2ec18cf1b85de7a328abcd6e96
[ "MIT" ]
3
2020-09-29T00:04:00.000Z
2021-06-23T07:54:57.000Z
train.py
kyuhyoung/yolact
98fc78e963264d2ec18cf1b85de7a328abcd6e96
[ "MIT" ]
1
2020-08-19T16:35:26.000Z
2020-08-19T17:22:07.000Z
train.py
kyuhyoung/yolact
98fc78e963264d2ec18cf1b85de7a328abcd6e96
[ "MIT" ]
3
2020-03-11T17:03:03.000Z
2021-07-11T02:56:19.000Z
from data import * from utils.augmentations import SSDAugmentation, BaseTransform from utils.functions import MovingAverage, SavePath from utils.logger import Log from utils import timer from layers.modules import MultiBoxLoss from yolact import Yolact import os import sys import time import math, random from pathlib i...
42.578529
196
0.608068
from data import * from utils.augmentations import SSDAugmentation, BaseTransform from utils.functions import MovingAverage, SavePath from utils.logger import Log from utils import timer from layers.modules import MultiBoxLoss from yolact import Yolact import os import sys import time import math, random from pathlib i...
true
true
1c334e49a1724d0025acbd6ef5ed3baac910efb5
3,269
py
Python
xfeltor/load.py
HenrikJantti/xFELTOR
321fe73ce28fa590baedabc0aa13c5ba50a32dff
[ "MIT" ]
null
null
null
xfeltor/load.py
HenrikJantti/xFELTOR
321fe73ce28fa590baedabc0aa13c5ba50a32dff
[ "MIT" ]
1
2022-01-26T11:53:42.000Z
2022-01-26T11:53:42.000Z
xfeltor/load.py
HenrikJantti/xFELTOR
321fe73ce28fa590baedabc0aa13c5ba50a32dff
[ "MIT" ]
null
null
null
import xarray as xr import numpy as np from typing import Union import json def open_feltordataset( datapath: str = "./*.nc", chunks: Union[int, dict] = None, restart_indices: bool = False, probes: bool = False, **kwargs: dict, ) -> xr.Dataset: """Loads FELTOR output into one xarray Dataset. C...
33.701031
99
0.61762
import xarray as xr import numpy as np from typing import Union import json def open_feltordataset( datapath: str = "./*.nc", chunks: Union[int, dict] = None, restart_indices: bool = False, probes: bool = False, **kwargs: dict, ) -> xr.Dataset: if chunks is None: chunks = {} combi...
true
true
1c334fb05c5a8d5c3556b5f5c031aaf7ad9fdb70
14,472
py
Python
flax/linen/normalization.py
AI-App/FLAX
25dd368d9f35d276fe0999f9468c71a284eb3d96
[ "Apache-2.0" ]
null
null
null
flax/linen/normalization.py
AI-App/FLAX
25dd368d9f35d276fe0999f9468c71a284eb3d96
[ "Apache-2.0" ]
10
2022-01-19T11:32:54.000Z
2022-02-09T23:47:20.000Z
flax/linen/normalization.py
slowy07/flax
fb4f2a455d4cae383f11d77707bf0d0f18a45e70
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The Flax Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
39.867769
100
0.6894
from typing import (Any, Callable, Optional, Tuple, Iterable, Union) from jax import lax from jax.nn import initializers import jax.numpy as jnp from flax.linen.module import Module, compact, merge_param PRNGKey = Any Array = Any Shape = Tuple[int] Dtype = Any Axes = Union[int, Iterable[int]] def _canonicaliz...
true
true
1c33502e4d76d3079ade89c8c30b3af81f805584
268
py
Python
tests/artificial/transf_Difference/trend_ConstantTrend/cycle_5/ar_/test_artificial_32_Difference_ConstantTrend_5__20.py
shaido987/pyaf
b9afd089557bed6b90b246d3712c481ae26a1957
[ "BSD-3-Clause" ]
377
2016-10-13T20:52:44.000Z
2022-03-29T18:04:14.000Z
tests/artificial/transf_Difference/trend_ConstantTrend/cycle_5/ar_/test_artificial_32_Difference_ConstantTrend_5__20.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
160
2016-10-13T16:11:53.000Z
2022-03-28T04:21:34.000Z
tests/artificial/transf_Difference/trend_ConstantTrend/cycle_5/ar_/test_artificial_32_Difference_ConstantTrend_5__20.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
63
2017-03-09T14:51:18.000Z
2022-03-27T20:52:57.000Z
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "ConstantTrend", cycle_length = 5, transform = "Difference", sigma = 0.0, exog_count = 20, ar_order = 0);
38.285714
168
0.735075
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "ConstantTrend", cycle_length = 5, transform = "Difference", sigma = 0.0, exog_count = 20, ar_order = 0);
true
true
1c3350aaa6a4bb05a67615451625477c84bb2507
3,667
py
Python
repoman/depot_operations.py
jsoriano/python-repoman
308c141ce7177238c70f78facf1fc2642cf485aa
[ "Apache-2.0" ]
6
2015-08-10T09:42:55.000Z
2021-11-08T10:26:02.000Z
repoman/depot_operations.py
jsoriano/python-repoman
308c141ce7177238c70f78facf1fc2642cf485aa
[ "Apache-2.0" ]
11
2017-08-28T17:38:24.000Z
2019-05-31T12:49:31.000Z
repoman/depot_operations.py
jsoriano/python-repoman
308c141ce7177238c70f78facf1fc2642cf485aa
[ "Apache-2.0" ]
7
2015-02-14T16:15:41.000Z
2021-09-29T09:53:26.000Z
#!/usr/bin/env python # # Copyright 2014 Tuenti Technologies S.L. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
30.815126
77
0.641942
from repoman.depot import Depot class DepotOperations(object): KIND = None @classmethod def get_depot_operations(cls, repo_kind): try: mod = __import__("repoman.%s.depot_operations" % (repo_kind), fromlist=['DepotOperations']) ...
true
true
1c3350fd75ff2f1bea44df5b72d7e2556a0ee1e7
441
py
Python
rest/recording/list-get-example-2/list-get-example-2.5.x.py
azaddeveloper/api-snippets
f88b153cd7186fa70b33733b205886502db0d1f2
[ "MIT" ]
2
2017-11-23T11:31:20.000Z
2018-01-22T04:14:02.000Z
rest/recording/list-get-example-2/list-get-example-2.5.x.py
azaddeveloper/api-snippets
f88b153cd7186fa70b33733b205886502db0d1f2
[ "MIT" ]
null
null
null
rest/recording/list-get-example-2/list-get-example-2.5.x.py
azaddeveloper/api-snippets
f88b153cd7186fa70b33733b205886502db0d1f2
[ "MIT" ]
2
2020-05-22T23:31:21.000Z
2021-06-10T18:33:45.000Z
# Download the Python helper library from twilio.com/docs/python/install from twilio.rest import TwilioRestClient # Your Account Sid and Auth Token from twilio.com/user/account account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" auth_token = "your_auth_token" client = TwilioRestClient(account_sid, auth_token) # A list...
40.090909
72
0.823129
from twilio.rest import TwilioRestClient account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" auth_token = "your_auth_token" client = TwilioRestClient(account_sid, auth_token) recordings = client.recordings.list(date_created="2016-10-18")
true
true
1c3351362491dc874ae6c3ccf9a6c1876506b1e8
4,730
py
Python
docs/check_and_draw_box.py
alexchungio/under-water-detect
312672ccbe5e31ca21dffab26e1438ea190f3e5a
[ "Apache-2.0" ]
1
2022-02-17T12:14:59.000Z
2022-02-17T12:14:59.000Z
docs/check_and_draw_box.py
alexchungio/under-water-object-detect-2020
312672ccbe5e31ca21dffab26e1438ea190f3e5a
[ "Apache-2.0" ]
null
null
null
docs/check_and_draw_box.py
alexchungio/under-water-object-detect-2020
312672ccbe5e31ca21dffab26e1438ea190f3e5a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- #------------------------------------------------------ # @ File : check_and_draw_box.py # @ Description: # @ Author : Alex Chung # @ Contact : yonganzhong@outlook.com # @ License : Copyright (c) 2017-2018 # @ Time : 2021/1/26 下午2:43 # @ Software :...
35.56391
117
0.571247
import os import json import os.path as osp import numpy as np from PIL import Image, ImageFont, ImageDraw import matplotlib.pyplot as plt import matplotlib.font_manager as fm from tqdm import tqdm def draw_box_with_pil(image, bbox, label, color_dict): img_w = image.size[0] img_h = image.size[1] bbox =...
true
true
1c33516987ce24441f9b98964ec2c2675d908382
9,566
py
Python
sunshine_conversations_client/model/message_webhook.py
Dima2022/sunshine-conversations-python
8085a82dc320d97f09bb0174d11dd1865a65404a
[ "Apache-2.0" ]
4
2020-09-27T14:28:25.000Z
2022-02-02T13:51:29.000Z
sunshine_conversations_client/model/message_webhook.py
Dima2022/sunshine-conversations-python
8085a82dc320d97f09bb0174d11dd1865a65404a
[ "Apache-2.0" ]
3
2021-09-30T18:18:58.000Z
2021-12-04T07:55:23.000Z
sunshine_conversations_client/model/message_webhook.py
Dima2022/sunshine-conversations-python
8085a82dc320d97f09bb0174d11dd1865a65404a
[ "Apache-2.0" ]
5
2020-11-07T02:08:18.000Z
2021-12-07T17:10:23.000Z
# coding: utf-8 """ Sunshine Conversations API The version of the OpenAPI document: 9.4.5 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from sunshine_conversations_client.configuration import Configuration from sunshine_conversations_client.undefine...
28.640719
203
0.589275
import pprint import re import six from sunshine_conversations_client.configuration import Configuration from sunshine_conversations_client.undefined import Undefined class MessageWebhook(object): openapi_types = { 'id': 'str', 'received': 'str', 'author': 'AuthorWebhook', ...
true
true
1c33525922cd3446f90a3cac5e50b77916646871
497
py
Python
app.py
KeisukeShima/streamlit-proj
a50c57a8f0effd484b4015fd1e027746c3b35647
[ "MIT" ]
null
null
null
app.py
KeisukeShima/streamlit-proj
a50c57a8f0effd484b4015fd1e027746c3b35647
[ "MIT" ]
null
null
null
app.py
KeisukeShima/streamlit-proj
a50c57a8f0effd484b4015fd1e027746c3b35647
[ "MIT" ]
null
null
null
import streamlit as st import plotly.graph_objs as go animals = ['giraffes', 'orangutans', 'monkeys'] populations = [20, 14, 23] fig = go.Figure(data=[go.Bar(x=animals, y=populations)]) fig.update_layout( xaxis = dict( tickangle = 0, title_text = "Animal", title_font = {"size": 20}, ...
23.666667
56
0.629779
import streamlit as st import plotly.graph_objs as go animals = ['giraffes', 'orangutans', 'monkeys'] populations = [20, 14, 23] fig = go.Figure(data=[go.Bar(x=animals, y=populations)]) fig.update_layout( xaxis = dict( tickangle = 0, title_text = "Animal", title_font = {"size": 20}, ...
true
true
1c3352f770946400356a22ead7df951cd76e504c
7,267
py
Python
stream_module.py
antofuller/configaformers
293253cd35d96c8a24c4004ba3d24fc6dc85a260
[ "Apache-2.0" ]
51
2021-11-03T19:52:07.000Z
2021-12-14T16:56:30.000Z
stream_module.py
muddyrains/muddy-nets
293253cd35d96c8a24c4004ba3d24fc6dc85a260
[ "Apache-2.0" ]
null
null
null
stream_module.py
muddyrains/muddy-nets
293253cd35d96c8a24c4004ba3d24fc6dc85a260
[ "Apache-2.0" ]
2
2021-11-04T01:46:26.000Z
2021-11-06T08:39:35.000Z
import torch from torch import nn from utils import set_default class MakeStream(nn.Module): def __init__(self, config, _streams, ): super().__init__() """ Make data stream """ # Configure input(s) and output(s) sel...
36.70202
114
0.553874
import torch from torch import nn from utils import set_default class MakeStream(nn.Module): def __init__(self, config, _streams, ): super().__init__() self.input_name = set_default(_look='input_name', _dict=config, _default='x') s...
true
true
1c3353193d455c706d4e720bf2bc76ea6e47d636
10,765
py
Python
86833/tanks_test1.py
PlatovDmitriy/Tanks
62e16e5da8325a1ca22f21a474f97afc682f546e
[ "CC0-1.0" ]
null
null
null
86833/tanks_test1.py
PlatovDmitriy/Tanks
62e16e5da8325a1ca22f21a474f97afc682f546e
[ "CC0-1.0" ]
null
null
null
86833/tanks_test1.py
PlatovDmitriy/Tanks
62e16e5da8325a1ca22f21a474f97afc682f546e
[ "CC0-1.0" ]
null
null
null
from pygame import * from time import time as timer x = 10 y = 10 x1 = 500 y1 = 500 font.init() font1 = font.SysFont('Arial',36) BLACK = (0,0,0) class GameSprite(sprite.Sprite): def __init__(self, player_image, player_x, player_y, x_speed, y_speed): super().__init__() self.image = transf...
32.621212
76
0.51203
from pygame import * from time import time as timer x = 10 y = 10 x1 = 500 y1 = 500 font.init() font1 = font.SysFont('Arial',36) BLACK = (0,0,0) class GameSprite(sprite.Sprite): def __init__(self, player_image, player_x, player_y, x_speed, y_speed): super().__init__() self.image = transf...
true
true
1c33540ebf27a45236b9d7996d28384d42f3ce87
350
py
Python
examples/cli_examples/set_sort_groups_by_shank.py
LorenFrankLab/SpyGlass
5c2764b6ba5f7e9e47ddad5d2b9ce5039a0d3f41
[ "MIT" ]
1
2022-03-22T12:13:18.000Z
2022-03-22T12:13:18.000Z
examples/cli_examples/set_sort_groups_by_shank.py
LorenFrankLab/SpyGlass
5c2764b6ba5f7e9e47ddad5d2b9ce5039a0d3f41
[ "MIT" ]
17
2022-03-22T14:42:04.000Z
2022-03-31T23:58:39.000Z
examples/cli_examples/set_sort_groups_by_shank.py
LorenFrankLab/SpyGlass
5c2764b6ba5f7e9e47ddad5d2b9ce5039a0d3f41
[ "MIT" ]
1
2022-03-23T20:04:25.000Z
2022-03-23T20:04:25.000Z
#!/usr/bin/env python3 import spyglass.common as sgc nwb_file_name = 'RN2_20191110_.nwb' sgc.SortGroup().set_group_by_shank( nwb_file_name=nwb_file_name, references=None, omit_ref_electrode_group=False ) print(sgc.SortGroup & {'nwb_file_name': nwb_file_name}) print(sgc.SortGroup.SortGroupElectrode & {'n...
25
74
0.78
import spyglass.common as sgc nwb_file_name = 'RN2_20191110_.nwb' sgc.SortGroup().set_group_by_shank( nwb_file_name=nwb_file_name, references=None, omit_ref_electrode_group=False ) print(sgc.SortGroup & {'nwb_file_name': nwb_file_name}) print(sgc.SortGroup.SortGroupElectrode & {'nwb_file_name': nwb_file...
true
true
1c3354f45e59b7e88ce6f4d0e8f69626393a1065
1,888
py
Python
mmdet/datasets/pipelines/__init__.py
HT-hlf/mmdetection_miner-2.22.0
76eb94d6547f9f95cd58f41bb5c91941e82322b9
[ "Apache-2.0" ]
null
null
null
mmdet/datasets/pipelines/__init__.py
HT-hlf/mmdetection_miner-2.22.0
76eb94d6547f9f95cd58f41bb5c91941e82322b9
[ "Apache-2.0" ]
null
null
null
mmdet/datasets/pipelines/__init__.py
HT-hlf/mmdetection_miner-2.22.0
76eb94d6547f9f95cd58f41bb5c91941e82322b9
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. from .auto_augment import (AutoAugment, BrightnessTransform, ColorTransform, ContrastTransform, EqualizeTransform, Rotate, Shear, Translate) from .compose import Compose from .formatting import (Collect, DefaultFormatB...
62.933333
130
0.711864
from .auto_augment import (AutoAugment, BrightnessTransform, ColorTransform, ContrastTransform, EqualizeTransform, Rotate, Shear, Translate) from .compose import Compose from .formatting import (Collect, DefaultFormatBundle, ImageToTensor, T...
true
true
1c33550df5289d9baea0397f15634c63d4cc3235
22,474
py
Python
sympy/functions/elementary/tests/test_complexes.py
pbrady/sympy
7163137e22fbefbb645147a15147b26dad220d49
[ "BSD-3-Clause" ]
1
2019-06-27T13:40:28.000Z
2019-06-27T13:40:28.000Z
sympy/functions/elementary/tests/test_complexes.py
amitsaha/sympy
43ddfc644fd604a3dc0d4cac0aebfecd051917c1
[ "BSD-3-Clause" ]
null
null
null
sympy/functions/elementary/tests/test_complexes.py
amitsaha/sympy
43ddfc644fd604a3dc0d4cac0aebfecd051917c1
[ "BSD-3-Clause" ]
null
null
null
from sympy import ( Abs, adjoint, arg, atan2, conjugate, cos, DiracDelta, E, exp, expand, Expr, Function, Heaviside, I, im, log, nan, oo, pi, Rational, re, S, sign, sin, sqrt, Symbol, symbols, transpose, zoo, exp_polar, Piecewise, Interval, comp ) from sympy.utilities.pytest import XFAIL, raises def N...
31.300836
79
0.581249
from sympy import ( Abs, adjoint, arg, atan2, conjugate, cos, DiracDelta, E, exp, expand, Expr, Function, Heaviside, I, im, log, nan, oo, pi, Rational, re, S, sign, sin, sqrt, Symbol, symbols, transpose, zoo, exp_polar, Piecewise, Interval, comp ) from sympy.utilities.pytest import XFAIL, raises def N...
true
true
1c33561b46f8ec90a73d5b7fa4f7967740fc7fcc
1,509
py
Python
autorest/python/emsapi/models/adi_ems_web_api_v2_dto_parameter_set_parameter_set_group.py
ge-flight-analytics/ems-api-wrappers
5e787e0cbc72e7a3b06fa83ff6ba07968231f89c
[ "MIT" ]
2
2017-02-20T18:32:02.000Z
2018-08-01T11:45:29.000Z
autorest/python/emsapi/models/adi_ems_web_api_v2_dto_parameter_set_parameter_set_group.py
ge-flight-analytics/ems-api-wrappers
5e787e0cbc72e7a3b06fa83ff6ba07968231f89c
[ "MIT" ]
10
2017-02-20T16:17:04.000Z
2019-04-02T16:52:49.000Z
autorest/python/emsapi/models/adi_ems_web_api_v2_dto_parameter_set_parameter_set_group.py
ge-flight-analytics/ems-api-wrappers
5e787e0cbc72e7a3b06fa83ff6ba07968231f89c
[ "MIT" ]
2
2017-02-18T23:22:20.000Z
2017-02-20T19:35:38.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- from ...
39.710526
96
0.617628
from msrest.serialization import Model class AdiEmsWebApiV2DtoParameterSetParameterSetGroup(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'group_id': {'key': 'groupId', 'type': 'str'}, 'groups': {'key': 'groups', 'type': '[AdiEmsWebApiV2DtoParameterSetParameterSetGro...
true
true
1c3356481cbd526a3b1e27b3157fe0a9488be0bf
7,356
py
Python
lib/streamlit/elements/multiselect.py
AnOctopus/streamlit
6c5384f62c1415538347fa751185e5c487673f82
[ "Apache-2.0" ]
19,099
2019-08-25T14:00:15.000Z
2022-03-31T21:00:28.000Z
lib/streamlit/elements/multiselect.py
AnOctopus/streamlit
6c5384f62c1415538347fa751185e5c487673f82
[ "Apache-2.0" ]
3,078
2019-08-25T19:50:14.000Z
2022-03-31T23:26:14.000Z
lib/streamlit/elements/multiselect.py
AnOctopus/streamlit
6c5384f62c1415538347fa751185e5c487673f82
[ "Apache-2.0" ]
1,892
2019-08-26T04:44:24.000Z
2022-03-30T16:11:51.000Z
# Copyright 2018-2021 Streamlit Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
40.640884
111
0.635943
from textwrap import dedent from typing import Any, Callable, Optional, cast, List import streamlit from streamlit.errors import StreamlitAPIException from streamlit.proto.MultiSelect_pb2 import MultiSelect as MultiSelectProto from streamlit.state.widgets import register_widget from streamlit.type_util import Key, Op...
true
true
1c33566bd3a34dff0c3f58954874dafac386d95b
9,622
py
Python
dask_ml/linear_model/glm.py
laprej/dask-ml
78b1d942eae14db442a744f8812c3e94a8f31272
[ "BSD-3-Clause" ]
3
2017-06-13T22:36:45.000Z
2017-09-20T16:08:47.000Z
dask_ml/linear_model/glm.py
laprej/dask-ml
78b1d942eae14db442a744f8812c3e94a8f31272
[ "BSD-3-Clause" ]
null
null
null
dask_ml/linear_model/glm.py
laprej/dask-ml
78b1d942eae14db442a744f8812c3e94a8f31272
[ "BSD-3-Clause" ]
1
2019-12-03T13:23:52.000Z
2019-12-03T13:23:52.000Z
# -*- coding: utf-8 -*- """Generalized Linear Models for large datasets.""" import textwrap from dask_glm import algorithms, families from dask_glm.utils import (accuracy_score, add_intercept, dot, exp, mean_squared_error, poisson_deviance, sigmoid) from sklearn.base import BaseEstimator #...
29.515337
79
0.568177
import textwrap from dask_glm import algorithms, families from dask_glm.utils import (accuracy_score, add_intercept, dot, exp, mean_squared_error, poisson_deviance, sigmoid) from sklearn.base import BaseEstimator from . import utils from ..utils import check_array _base_doc = textwrap.d...
true
true
1c3357a25cce6c5948007ae0ef84e1c93beb4b30
697
py
Python
fixture/application.py
VictorKazankov/Python_training_mantis
02b85302079388e626a78e8289bfb979af3e7ed4
[ "Apache-2.0" ]
null
null
null
fixture/application.py
VictorKazankov/Python_training_mantis
02b85302079388e626a78e8289bfb979af3e7ed4
[ "Apache-2.0" ]
null
null
null
fixture/application.py
VictorKazankov/Python_training_mantis
02b85302079388e626a78e8289bfb979af3e7ed4
[ "Apache-2.0" ]
null
null
null
from selenium.webdriver.firefox.webdriver import WebDriver from fixture.session import SessionHelper from fixture.project import ProjectHelper from fixture.soap import SoapHelper class Application: def __init__(self): self.wd = WebDriver() self.wd.implicitly_wait(5) self.session = SessionH...
25.814815
58
0.642755
from selenium.webdriver.firefox.webdriver import WebDriver from fixture.session import SessionHelper from fixture.project import ProjectHelper from fixture.soap import SoapHelper class Application: def __init__(self): self.wd = WebDriver() self.wd.implicitly_wait(5) self.session = SessionH...
true
true
1c33584b6448febf032bed615847b0e83b564b17
6,610
py
Python
mobula/build.py
mgno32/MobulaOP
a58c06216ee6768cf4c46610b802c8b96bf3240d
[ "MIT" ]
null
null
null
mobula/build.py
mgno32/MobulaOP
a58c06216ee6768cf4c46610b802c8b96bf3240d
[ "MIT" ]
null
null
null
mobula/build.py
mgno32/MobulaOP
a58c06216ee6768cf4c46610b802c8b96bf3240d
[ "MIT" ]
null
null
null
"""Building Implementation""" import sys import multiprocessing try: from .build_utils import * except Exception: from build_utils import * NUM_CPU_CORE = multiprocessing.cpu_count() HOST_NUM_THREADS = config.HOST_NUM_THREADS if config.HOST_NUM_THREADS > 0 else NUM_CPU_CORE COMMON_FLAGS = Flags().add_definitio...
33.72449
117
0.663843
import sys import multiprocessing try: from .build_utils import * except Exception: from build_utils import * NUM_CPU_CORE = multiprocessing.cpu_count() HOST_NUM_THREADS = config.HOST_NUM_THREADS if config.HOST_NUM_THREADS > 0 else NUM_CPU_CORE COMMON_FLAGS = Flags().add_definition('HOST_NUM_THREADS', HOST_NUM...
true
true
1c33588cd2cfd239421257da498b156f986374d1
3,629
py
Python
DeepLearningExamples/TensorFlow/Segmentation/UNet_Industrial/model/layers/array_ops.py
puririshi98/benchmark
79f554f1e1cf36f62994c78e0e6e5b360f554022
[ "BSD-3-Clause" ]
12
2020-12-13T08:34:24.000Z
2022-03-20T15:17:17.000Z
DeepLearningExamples/TensorFlow/Segmentation/UNet_Industrial/model/layers/array_ops.py
puririshi98/benchmark
79f554f1e1cf36f62994c78e0e6e5b360f554022
[ "BSD-3-Clause" ]
3
2021-03-31T20:15:40.000Z
2022-02-09T23:50:46.000Z
built-in/TensorFlow/Official/cv/image_segmentation/UNet_Industrial_for_TensorFlow/model/layers/array_ops.py
Huawei-Ascend/modelzoo
df51ed9c1d6dbde1deef63f2a037a369f8554406
[ "Apache-2.0" ]
2
2021-07-10T12:40:46.000Z
2021-12-17T07:55:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # ============================================================================== # # Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the L...
29.991736
120
0.618903
import tensorflow as tf from model.layers.utils import _log_hparams __all__ = ['concat', 'flatten', 'reshape', 'squeeze', 'upscale_2d'] def concat(values, axis, name='concat'): net = tf.concat(values=values, axis=axis, name=name) _log_hparams(classname='Concat', layername=net.name, axis=axis, out_shape=...
true
true
1c3359893ff7287a55b182731ef1b9f1b460a2db
3,104
py
Python
python/examples/scan_external_sources_custom_path_data_rules.py
fvaleye/metadata-guardian
ab5d6cada67785c3cfd98112f68e8fdb193d1617
[ "Apache-2.0" ]
9
2021-12-31T20:32:35.000Z
2022-02-18T17:51:49.000Z
python/examples/scan_external_sources_custom_path_data_rules.py
fvaleye/metadata-guardian
ab5d6cada67785c3cfd98112f68e8fdb193d1617
[ "Apache-2.0" ]
1
2022-02-25T16:35:04.000Z
2022-02-28T21:08:53.000Z
python/examples/scan_external_sources_custom_path_data_rules.py
fvaleye/metadata-guardian
ab5d6cada67785c3cfd98112f68e8fdb193d1617
[ "Apache-2.0" ]
null
null
null
import argparse import os from metadata_guardian import ( AvailableCategory, ColumnScanner, DataRules, ExternalMetadataSource, ) from metadata_guardian.source import ( AthenaSource, BigQuerySource, DeltaTableSource, GlueSource, KafkaSchemaRegistrySource, MySQLSource, Snowfla...
29.009346
94
0.664948
import argparse import os from metadata_guardian import ( AvailableCategory, ColumnScanner, DataRules, ExternalMetadataSource, ) from metadata_guardian.source import ( AthenaSource, BigQuerySource, DeltaTableSource, GlueSource, KafkaSchemaRegistrySource, MySQLSource, Snowfla...
true
true
1c335a4a3f949a93d650c47d0aff470cf8e0234b
5,901
py
Python
app/galleries.py
atm08e/amiller.im-py3
ddbc80d233d9bd2c645eb7cb2af73e951515fca4
[ "MIT" ]
null
null
null
app/galleries.py
atm08e/amiller.im-py3
ddbc80d233d9bd2c645eb7cb2af73e951515fca4
[ "MIT" ]
null
null
null
app/galleries.py
atm08e/amiller.im-py3
ddbc80d233d9bd2c645eb7cb2af73e951515fca4
[ "MIT" ]
null
null
null
import json # TODO async json import logging import os import sys logging.basicConfig(stream=sys.stdout, level=logging.DEBUG) logger = logging.getLogger(__name__) def gallery_json_loader(path): logger.debug('Trying to open file: {}'.format(path)) with open(path, 'r+', encoding='utf-8') as f: # TODO a...
50.435897
120
0.401457
import json import logging import os import sys logging.basicConfig(stream=sys.stdout, level=logging.DEBUG) logger = logging.getLogger(__name__) def gallery_json_loader(path): logger.debug('Trying to open file: {}'.format(path)) with open(path, 'r+', encoding='utf-8') as f: loaded_json = json...
true
true
1c335a5cb2b2657745ae992aecdd688526eb9297
2,611
py
Python
planning/domains/hiking/Generatorhikingproblem.py
xlbandy/fape
8a00f9d4c20f722930c11d88b60e0e82f523a439
[ "BSD-2-Clause" ]
14
2017-01-09T23:25:12.000Z
2022-02-16T12:08:48.000Z
planning/domains/hiking/Generatorhikingproblem.py
xlbandy/fape
8a00f9d4c20f722930c11d88b60e0e82f523a439
[ "BSD-2-Clause" ]
7
2018-05-18T08:27:03.000Z
2022-03-23T06:39:42.000Z
planning/domains/hiking/Generatorhikingproblem.py
xlbandy/fape
8a00f9d4c20f722930c11d88b60e0e82f523a439
[ "BSD-2-Clause" ]
8
2016-12-09T13:31:43.000Z
2022-02-16T12:08:50.000Z
from __future__ import division import itertools import json import math import os import random import shutil import subprocess import sys loc = 3 hiker =2 car = 2 def main(): global loc global hiker global car if len(sys.argv) > 1: loc = int(sys.argv[1]) if len(sys.argv) > 2: hiker = int(sys.argv[2]) if ...
25.105769
121
0.516277
from __future__ import division import itertools import json import math import os import random import shutil import subprocess import sys loc = 3 hiker =2 car = 2 def main(): global loc global hiker global car if len(sys.argv) > 1: loc = int(sys.argv[1]) if len(sys.argv) > 2: hiker = int(sys.argv[2]) if ...
true
true
1c335b506bbcd73c2a19432394cb2b936afb8669
17,202
py
Python
python/analysis/habernal_comparison/analyse_features.py
UKPLab/tacl2018-preference-convincing
65eb1cd3bf76f8068889880e0f80178e790350ce
[ "Apache-2.0" ]
13
2019-03-01T19:40:23.000Z
2022-01-10T05:53:47.000Z
python/analysis/habernal_comparison/analyse_features.py
UKPLab/tacl2018-preference-convincing
65eb1cd3bf76f8068889880e0f80178e790350ce
[ "Apache-2.0" ]
12
2020-11-13T17:54:01.000Z
2022-02-09T23:39:11.000Z
python/analysis/habernal_comparison/analyse_features.py
UKPLab/tacl2018-preference-convincing
65eb1cd3bf76f8068889880e0f80178e790350ce
[ "Apache-2.0" ]
5
2019-02-06T12:08:20.000Z
2022-01-10T20:40:22.000Z
''' Created on 1 Jun 2017 Load a set of feature lengthscales from a good run with 'both' types of features. Sort them by lengthscale. Plot the distribution. Identify which type of feature they are: add colours or markers to the plot. Provide a zoomed-in variant for the best 25 features. @author: simpson ''' impor...
41.651332
154
0.578421
import os, pickle import numpy as np import matplotlib import matplotlib.pyplot as plt from tests import load_embeddings, get_fold_data, TestRunner from data_loader import load_train_test_data, load_ling_features from matplotlib.ticker import MaxNLocator if __name__ == '__main__': expt_folder_name = 'crowdso...
true
true
1c335c7a96e78dad784537a49f59c108c83557f7
1,642
py
Python
placethings/ilp/method.py
kumokay/placethings
c1fa9aace89be5766e7aa24e4df8bc5d5ca8fa66
[ "Apache-2.0" ]
2
2019-09-28T09:36:29.000Z
2019-11-14T20:48:24.000Z
placethings/ilp/method.py
kumokay/placethings
c1fa9aace89be5766e7aa24e4df8bc5d5ca8fa66
[ "Apache-2.0" ]
1
2019-07-24T20:54:46.000Z
2019-08-09T20:07:43.000Z
placethings/ilp/method.py
kumokay/placethings
c1fa9aace89be5766e7aa24e4df8bc5d5ca8fa66
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from copy import deepcopy import logging import pulp # NOTE: to use glpk solver, sudo apt-get install glpk-utils from placethings.graph_gen import task_graph from place...
34.93617
79
0.744823
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from copy import deepcopy import logging import pulp from placethings.graph_gen import task_graph from placethings.ilp import utils, solver log = logging.getLogger() ...
true
true
1c335e4f3a102a7a5ae4cc8c6bb0efa75cb6e72d
2,468
py
Python
5. Probability and Statistics/statistics-intermediate/The Mode-307.py
bibekuchiha/dataquest
c7d8a2966fe2eee864442a59d64309033ea9993e
[ "MIT" ]
null
null
null
5. Probability and Statistics/statistics-intermediate/The Mode-307.py
bibekuchiha/dataquest
c7d8a2966fe2eee864442a59d64309033ea9993e
[ "MIT" ]
null
null
null
5. Probability and Statistics/statistics-intermediate/The Mode-307.py
bibekuchiha/dataquest
c7d8a2966fe2eee864442a59d64309033ea9993e
[ "MIT" ]
null
null
null
## 1. Introduction ## import pandas as pd houses = pd.read_table('AmesHousing_1.txt') print(houses[['Land Slope','Roof Style','Kitchen AbvGr']]) scale_land = 'ordinal' scale_roof = 'nominal' kitchen_variable = 'discrete' ## 2. The Mode for Ordinal Variables ## def mode(array): counts = {} for valu...
23.961165
75
0.623987
import pandas as pd houses = pd.read_table('AmesHousing_1.txt') print(houses[['Land Slope','Roof Style','Kitchen AbvGr']]) scale_land = 'ordinal' scale_roof = 'nominal' kitchen_variable = 'discrete' def mode(array): counts = {} for value in array: if value in counts: counts[val...
true
true
1c33613869982dc2d894924cc6286d86815c454a
1,417
py
Python
tests/lit/lit/formats/alivetest.py
rutgers-apl/alive-loops
2ce0d2f02f4c1554451f9741520ffe7e92b4b50e
[ "Apache-2.0" ]
4
2016-04-07T17:30:00.000Z
2018-12-02T00:06:28.000Z
tests/lit/lit/formats/alivetest.py
rutgers-apl/alive-loops
2ce0d2f02f4c1554451f9741520ffe7e92b4b50e
[ "Apache-2.0" ]
null
null
null
tests/lit/lit/formats/alivetest.py
rutgers-apl/alive-loops
2ce0d2f02f4c1554451f9741520ffe7e92b4b50e
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import import re, string, subprocess, signal import lit.Test from .base import FileBasedTest def executeCommand(command, input): p = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=s...
24.431034
78
0.625265
from __future__ import absolute_import import re, string, subprocess, signal import lit.Test from .base import FileBasedTest def executeCommand(command, input): p = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=s...
true
true
1c33622dace13df17153cec3a22ea9743fed0d6e
1,447
py
Python
tests/test_fast/test_deadlock.py
ponty/EasyProcess
4b3f5ab487ec46133e361958d6061262bfad91c3
[ "BSD-2-Clause" ]
86
2015-02-17T11:41:18.000Z
2022-03-05T08:05:29.000Z
tests/test_fast/test_deadlock.py
ponty/EasyProcess
4b3f5ab487ec46133e361958d6061262bfad91c3
[ "BSD-2-Clause" ]
18
2015-02-11T21:03:13.000Z
2022-03-20T14:32:51.000Z
tests/test_fast/test_deadlock.py
ponty/EasyProcess
4b3f5ab487ec46133e361958d6061262bfad91c3
[ "BSD-2-Clause" ]
22
2015-02-11T20:47:00.000Z
2021-11-01T15:26:23.000Z
import os import sys import threading from time import sleep import pytest from pyvirtualdisplay.display import Display from easyprocess import EasyProcess python = sys.executable # requirement: apt install imagemagick # deadlock # popen.communicate() hangs # no deadlock with temp_files PROG = """ from PIL import...
22.609375
75
0.621977
import os import sys import threading from time import sleep import pytest from pyvirtualdisplay.display import Display from easyprocess import EasyProcess python = sys.executable PROG = """ from PIL import Image Image.new("RGB",(99, 99)).show() """ EASYPROCESS_USE_TEMP_FILES = os.environ.get("EASYPROCESS_USE_TEM...
true
true
1c3363e3946059d0e9af3446782a8ac9ca9eb2ca
1,105
py
Python
Ar_Script/past/密码安全等级检查.py
archerckk/PyTest
610dd89df8d70c096f4670ca11ed2f0ca3196ca5
[ "MIT" ]
null
null
null
Ar_Script/past/密码安全等级检查.py
archerckk/PyTest
610dd89df8d70c096f4670ca11ed2f0ca3196ca5
[ "MIT" ]
1
2020-01-19T01:19:57.000Z
2020-01-19T01:19:57.000Z
Ar_Script/past/密码安全等级检查.py
archerckk/PyTest
610dd89df8d70c096f4670ca11ed2f0ca3196ca5
[ "MIT" ]
null
null
null
psw=input('请输入需要检查的密码组合:') zimu=('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','A','B','C' , 'D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') shuzi='1234567890' fuhao='~!@#$%^&*()_+[]{}:;"|\<,>.?//*-+.' length=len(p...
22.55102
117
0.506787
psw=input('请输入需要检查的密码组合:') zimu=('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','A','B','C' , 'D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') shuzi='1234567890' fuhao='~!@#$%^&*()_+[]{}:;"|\<,>.?//*-+.' length=len(p...
true
true
1c3364a3c9abb5f56a012e9bb0585f043b4e08cc
8,171
py
Python
orc8r/gateway/python/magma/magmad/proxy_client.py
remo5000/magma
1d1dd9a23800a8e07b1ce016776d93e12430ec15
[ "BSD-3-Clause" ]
3
2019-08-16T17:03:09.000Z
2019-08-23T21:57:48.000Z
orc8r/gateway/python/magma/magmad/proxy_client.py
remo5000/magma
1d1dd9a23800a8e07b1ce016776d93e12430ec15
[ "BSD-3-Clause" ]
14
2019-11-15T12:01:18.000Z
2019-12-12T14:37:42.000Z
orc8r/gateway/python/magma/magmad/proxy_client.py
119Vik/magma-1
107a7b374466a837fc0a49b283ba9d6ff1d702e3
[ "BSD-3-Clause" ]
3
2019-11-15T15:56:25.000Z
2019-11-21T10:34:59.000Z
""" Copyright (c) 2016-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory. """ import asyncio import loggin...
41.267677
79
0.582793
import asyncio import logging import aioh2 import h2.events from orc8r.protos.sync_rpc_service_pb2 import GatewayResponse, SyncRPCResponse from magma.common.service_registry import ServiceRegistry class ControlProxyHttpClient(object): def __init__(self): self._connection_table = {} async def sen...
true
true
1c3365e3b522bc4f34c72ef66f784cc0cc49dbf1
10,574
py
Python
tools/harness-automation/autothreadharness/open_thread_controller.py
ctan-g/openthread
376f35a49e5c0a5b8170c117d7a930e3a8b3b210
[ "BSD-3-Clause" ]
1
2020-08-12T06:15:53.000Z
2020-08-12T06:15:53.000Z
tools/harness-automation/autothreadharness/open_thread_controller.py
ctan-g/openthread
376f35a49e5c0a5b8170c117d7a930e3a8b3b210
[ "BSD-3-Clause" ]
null
null
null
tools/harness-automation/autothreadharness/open_thread_controller.py
ctan-g/openthread
376f35a49e5c0a5b8170c117d7a930e3a8b3b210
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # notic...
27.322997
92
0.56847
import logging import re import socket import threading import time import serial from . import settings __all__ = ['OpenThreadController'] logger = logging.getLogger(__name__) linesepx = re.compile(r'\r\n|\n') class OpenThreadController(threading.Thread): _lock = threading.Lock() viewing = False d...
true
true
1c336671addc0cbf4baad8279578295bfaff1469
396
py
Python
examples/16_helix_origami_rectangle_no_seq_no_twist.py
scadnano-test-user/scadnano-python-package-1
9becb5a076579f6cbac1ebfeda514540bb84ab87
[ "MIT" ]
null
null
null
examples/16_helix_origami_rectangle_no_seq_no_twist.py
scadnano-test-user/scadnano-python-package-1
9becb5a076579f6cbac1ebfeda514540bb84ab87
[ "MIT" ]
null
null
null
examples/16_helix_origami_rectangle_no_seq_no_twist.py
scadnano-test-user/scadnano-python-package-1
9becb5a076579f6cbac1ebfeda514540bb84ab87
[ "MIT" ]
null
null
null
import origami_rectangle as rect import scadnano as sc def main(): design = rect.create(num_helices=16, num_cols=26, assign_seq=False, twist_correction_deletion_spacing=3, twist_correction_start_col=2) return design if not sc.in_browser() and __name__ == '__main__': d...
28.285714
109
0.694444
import origami_rectangle as rect import scadnano as sc def main(): design = rect.create(num_helices=16, num_cols=26, assign_seq=False, twist_correction_deletion_spacing=3, twist_correction_start_col=2) return design if not sc.in_browser() and __name__ == '__main__': d...
true
true
1c33698445117e404bad1744f55343c669082b4b
5,825
py
Python
solid_i18n/middleware.py
affan2/django-solid-i18n-urls
3b858a84499261a3f86253e472f83cd79e90bab6
[ "BSD-3-Clause" ]
null
null
null
solid_i18n/middleware.py
affan2/django-solid-i18n-urls
3b858a84499261a3f86253e472f83cd79e90bab6
[ "BSD-3-Clause" ]
null
null
null
solid_i18n/middleware.py
affan2/django-solid-i18n-urls
3b858a84499261a3f86253e472f83cd79e90bab6
[ "BSD-3-Clause" ]
1
2020-01-09T10:22:39.000Z
2020-01-09T10:22:39.000Z
from django import VERSION as DJANGO_VERSION from django.conf import settings from django.core.urlresolvers import (is_valid_path, get_resolver, get_script_prefix) from django.http import HttpResponseRedirect, HttpResponsePermanentRedirect from django.utils.cache import patch_vary_headers from django.utils import t...
43.796992
135
0.664721
from django import VERSION as DJANGO_VERSION from django.conf import settings from django.core.urlresolvers import (is_valid_path, get_resolver, get_script_prefix) from django.http import HttpResponseRedirect, HttpResponsePermanentRedirect from django.utils.cache import patch_vary_headers from django.utils import t...
true
true
1c3369cc581ad8d634b869346c35da6cd76f897b
2,850
py
Python
process.py
anirudhbelwadi/music-application-using-machine-learning
ef3514a59dd5d903bbd62ee0664d458098099d08
[ "MIT" ]
4
2021-07-01T12:38:53.000Z
2021-11-13T09:21:14.000Z
process.py
anirudhbelwadi/music-application-using-machine-learning
ef3514a59dd5d903bbd62ee0664d458098099d08
[ "MIT" ]
null
null
null
process.py
anirudhbelwadi/music-application-using-machine-learning
ef3514a59dd5d903bbd62ee0664d458098099d08
[ "MIT" ]
null
null
null
import json import os import math import librosa DATASET_PATH = "./test" JSON_PATH = "top.json" SAMPLE_RATE = 22050 TRACK_DURATION = 30 # measured in seconds SAMPLES_PER_TRACK = SAMPLE_RATE * TRACK_DURATION def save_mfcc(dataset_path, json_path, num_mfcc=13, n_fft=2048, hop_length=512, num_segments=5): """Extra...
38.513514
112
0.600702
import json import os import math import librosa DATASET_PATH = "./test" JSON_PATH = "top.json" SAMPLE_RATE = 22050 TRACK_DURATION = 30 SAMPLES_PER_TRACK = SAMPLE_RATE * TRACK_DURATION def save_mfcc(dataset_path, json_path, num_mfcc=13, n_fft=2048, hop_length=512, num_segments=5): data = { "mapping...
true
true
1c336b9139628ad9f04b4d05454eb9f431d71374
2,735
py
Python
mfdnres/descriptor_formats/mfdn_format_8.py
nd-nuclear-theory/slurp
6b6c8faeda829b2e9b9751ae48ff7dbf69f2a7c6
[ "MIT" ]
1
2020-12-10T02:29:06.000Z
2020-12-10T02:29:06.000Z
mfdnres/descriptor_formats/mfdn_format_8.py
nd-nuclear-theory/slurp
6b6c8faeda829b2e9b9751ae48ff7dbf69f2a7c6
[ "MIT" ]
null
null
null
mfdnres/descriptor_formats/mfdn_format_8.py
nd-nuclear-theory/slurp
6b6c8faeda829b2e9b9751ae48ff7dbf69f2a7c6
[ "MIT" ]
1
2021-06-23T14:51:29.000Z
2021-06-23T14:51:29.000Z
""" mfdn_format_8.py -- declares descriptor parser Language: Python 3 Patrick J. Fasano University of Notre Dame 03/18/18 (pjf): Initiated (based on mfdn_format_7_ho.py). 09/06/18 (pjf): Allow hyphens in interaction name. """ import re # intra-package references from .. import descriptor _pari...
27.35
144
0.558318
import re from .. import descriptor _parity_map = {"g0": +1, "g1": -1, "gx": 0} def _truncation_parser(substr): regex = re.compile( r"" ) def parser(filename): regex = re.compile( r"run(?P<run>\w+)" r"\-(?P<code_name>[^\-]+)" r"\-(?P<descriptor>" ...
true
true
1c336c1207f698399536830e67b1a84561fc0177
10,452
py
Python
scripts/OQMD2PyChemia.py
petavazohi/PyChemia
e779389418771c25c830aed360773c63bb069372
[ "MIT" ]
67
2015-01-31T07:44:55.000Z
2022-03-21T21:43:34.000Z
scripts/OQMD2PyChemia.py
petavazohi/PyChemia
e779389418771c25c830aed360773c63bb069372
[ "MIT" ]
13
2016-06-03T19:07:51.000Z
2022-03-31T04:20:40.000Z
scripts/OQMD2PyChemia.py
petavazohi/PyChemia
e779389418771c25c830aed360773c63bb069372
[ "MIT" ]
37
2015-01-22T15:37:23.000Z
2022-03-21T15:38:10.000Z
#!/usr/bin/env python import os import sys import time import logging import itertools import argparse from multiprocessing import Pool, cpu_count, Process import pychemia from pychemia.utils.periodic import atomic_symbol try: from qmpy import Entry except ImportError: Entry = None print("Could not import...
35.55102
120
0.598833
import os import sys import time import logging import itertools import argparse from multiprocessing import Pool, cpu_count, Process import pychemia from pychemia.utils.periodic import atomic_symbol try: from qmpy import Entry except ImportError: Entry = None print("Could not import 'qmpy' as needed to i...
true
true
1c336c1dabe0cc6cdb07b243776fe77d86a4311f
874
py
Python
lib/cocoapi_windows/PythonAPI/setup.py
Shank2358/NPMMR-Det
414d148ff2ba5edbe870a8dafb6336845fb9ffbb
[ "Apache-2.0" ]
27
2021-01-09T07:35:45.000Z
2022-02-06T03:18:54.000Z
lib/cocoapi_windows/PythonAPI/setup.py
Shank2358/NPMMR-Det
414d148ff2ba5edbe870a8dafb6336845fb9ffbb
[ "Apache-2.0" ]
4
2021-07-20T07:16:03.000Z
2022-03-29T14:22:59.000Z
lib/cocoapi_windows/PythonAPI/setup.py
Shank2358/NPMMR-Det
414d148ff2ba5edbe870a8dafb6336845fb9ffbb
[ "Apache-2.0" ]
1
2021-12-26T09:12:08.000Z
2021-12-26T09:12:08.000Z
from distutils.core import setup from Cython.Build import cythonize from distutils.extension import Extension import numpy as np # To install and compile to your anaconda/python site-packages, simply run: # $ pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI # Note that the original co...
32.37037
106
0.688787
from distutils.core import setup from Cython.Build import cythonize from distutils.extension import Extension import numpy as np ext_modules = [ Extension( 'pycocotools._mask', sources=['../common/maskApi.c', 'pycocotools/_mask.pyx'], include_dirs = [np.get_include(), '../common'], ...
true
true
1c336dd763456ee791f4e197b59b28af345ec219
4,052
py
Python
alipay/aop/api/request/AlipayMarketingCampaignDiscountBudgetQueryRequest.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/request/AlipayMarketingCampaignDiscountBudgetQueryRequest.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/request/AlipayMarketingCampaignDiscountBudgetQueryRequest.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AlipayMarketingCampaignDiscountBudgetQueryModel import AlipayMarketingCampaignDiscountBudgetQueryModel class AlipayMarketingCampaign...
27.944828
148
0.65153
import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AlipayMarketingCampaignDiscountBudgetQueryModel import AlipayMarketingCampaignDiscountBudgetQueryModel class AlipayMarketingCampaignDiscountBudgetQueryRequest(object): def _...
true
true
1c336e553ba984f8fa1f69078ffb7e7486ff9172
9,600
py
Python
python/codegen/generate_vhdl.py
MaartenBaert/xormix
2b649bd9c2defd00dbffefb59db4de0b40785714
[ "BSL-1.0", "Apache-2.0", "MIT" ]
17
2022-02-21T02:23:30.000Z
2022-03-03T03:38:54.000Z
python/codegen/generate_vhdl.py
MaartenBaert/xormix
2b649bd9c2defd00dbffefb59db4de0b40785714
[ "BSL-1.0", "Apache-2.0", "MIT" ]
null
null
null
python/codegen/generate_vhdl.py
MaartenBaert/xormix
2b649bd9c2defd00dbffefb59db4de0b40785714
[ "BSL-1.0", "Apache-2.0", "MIT" ]
null
null
null
# Copyright (c) 2020-2021 Maarten Baert <info@maartenbaert.be> # Available under the MIT License - see LICENSE.txt for details. import math import random import xormix16 import xormix24 import xormix32 import xormix48 import xormix64 import xormix96 import xormix128 random.seed(0x75cf32031077f039) modules = { 16: ...
41.921397
263
0.53125
import math import random import xormix16 import xormix24 import xormix32 import xormix48 import xormix64 import xormix96 import xormix128 random.seed(0x75cf32031077f039) modules = { 16: xormix16, 24: xormix24, 32: xormix32, 48: xormix48, 64: xormix64, 96: xormix96, 128: xormix128, } def generate_rtl(n, fil...
true
true
1c337243f51bf5c05b4d429314fb8f3d6588f946
3,421
py
Python
django/djangoproject/settings.py
RajapandiR/django-reactjs
15371ee816ef4dfecd4cc0f4243fc358796c375b
[ "MIT" ]
null
null
null
django/djangoproject/settings.py
RajapandiR/django-reactjs
15371ee816ef4dfecd4cc0f4243fc358796c375b
[ "MIT" ]
null
null
null
django/djangoproject/settings.py
RajapandiR/django-reactjs
15371ee816ef4dfecd4cc0f4243fc358796c375b
[ "MIT" ]
null
null
null
""" Django settings for djangoproject project. Generated by 'django-admin startproject' using Django 3.1.1. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ from p...
25.154412
91
0.688103
from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'yjb#&^z%!1rvv57rgz!gmrrf!#vsc_9068t5k_*yosh^r!ij6^' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', ...
true
true
1c3372470083842622d5ff11c75962a863ecf220
650
py
Python
msgboard/migrations/0001_initial.py
Yoavsc129/beyond-tutorial
733d2d26df980f2ccb3fa7d1595112bee089d8be
[ "MIT" ]
null
null
null
msgboard/migrations/0001_initial.py
Yoavsc129/beyond-tutorial
733d2d26df980f2ccb3fa7d1595112bee089d8be
[ "MIT" ]
null
null
null
msgboard/migrations/0001_initial.py
Yoavsc129/beyond-tutorial
733d2d26df980f2ccb3fa7d1595112bee089d8be
[ "MIT" ]
null
null
null
# Generated by Django 4.0.2 on 2022-02-08 09:07 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Message', fields=[ ...
26
117
0.586154
from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Message', fields=[ ('id', models.BigAutoField(auto_created=Tru...
true
true
1c33726a2db273b76310d3a6da8874396a32f59d
4,270
py
Python
alipay/aop/api/domain/DishonestyDetailInfo.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/DishonestyDetailInfo.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/DishonestyDetailInfo.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class DishonestyDetailInfo(object): def __init__(self): self._behavior = None self._case_code = None self._enforce_court = None self._id_number = None self._name...
29.246575
77
0.574239
import json from alipay.aop.api.constant.ParamConstants import * class DishonestyDetailInfo(object): def __init__(self): self._behavior = None self._case_code = None self._enforce_court = None self._id_number = None self._name = None self._performance = None ...
true
true
1c337336b004d37a33e535c259ebd287915bae27
4,939
py
Python
Kaggle/Playgroud/RiskPrediction/Home-Credit-Default-Risk-master/py/trash/_402_cre_decimal.py
hehuanlin123/DeepLearning
6b7feabbbde9ac9489f76da4c06eeb6703fb165a
[ "MIT" ]
1
2020-02-28T12:03:39.000Z
2020-02-28T12:03:39.000Z
Kaggle/Playgroud/RiskPrediction/Home-Credit-Default-Risk-master/py/trash/_402_cre_decimal.py
hehuanlin123/DeepLearning
6b7feabbbde9ac9489f76da4c06eeb6703fb165a
[ "MIT" ]
null
null
null
Kaggle/Playgroud/RiskPrediction/Home-Credit-Default-Risk-master/py/trash/_402_cre_decimal.py
hehuanlin123/DeepLearning
6b7feabbbde9ac9489f76da4c06eeb6703fb165a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Jun 3 14:35:15 2018 @author: Kazuki """ import os import pandas as pd import gc from multiprocessing import Pool import multiprocessing from glob import glob import utils utils.start(__file__) #========================================================...
36.858209
134
0.554161
import os import pandas as pd import gc from multiprocessing import Pool import multiprocessing from glob import glob import utils utils.start(__file__) KEY = 'SK_ID_CURR' PREF = 'cre' NTHREAD = multiprocessing.cpu_count() cre = utils.read_pickles('../data/credit_card_balance') cre.sort_values(['SK_ID_CURR', 'MONT...
true
true
1c3373c42e34c54544e374c1eb57af33cec00da7
2,569
py
Python
python/word-count/word_count_test.py
stevenandrewcarter/exercism
db02c2f16d9cff878120208beccb3d09305a9df0
[ "MIT" ]
1
2021-02-12T18:54:17.000Z
2021-02-12T18:54:17.000Z
python/word-count/word_count_test.py
stevenandrewcarter/exercism
db02c2f16d9cff878120208beccb3d09305a9df0
[ "MIT" ]
null
null
null
python/word-count/word_count_test.py
stevenandrewcarter/exercism
db02c2f16d9cff878120208beccb3d09305a9df0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import unittest from wordcount import word_count # to be backwards compatible with the old Python 2.X def decode_if_needed(string): try: return string.decode('utf-8') except AttributeError: return string class WordCountTests(unittest.TestCase): def test_count_on...
28.865169
78
0.513429
import unittest from wordcount import word_count def decode_if_needed(string): try: return string.decode('utf-8') except AttributeError: return string class WordCountTests(unittest.TestCase): def test_count_one_word(self): self.assertEqual( {'word': 1}, ...
true
true
1c3375a1a8258dedbd7bb99777fb79d19fde143e
672
py
Python
testing_individual_section.py
OpenHRS/openhrs-scraper-app
be8b2dcf6b4612642700314fd7259cd0f5613742
[ "MIT" ]
3
2017-11-13T10:35:12.000Z
2017-11-19T09:29:02.000Z
testing_individual_section.py
OpenHRS/openhrs-scraper-app
be8b2dcf6b4612642700314fd7259cd0f5613742
[ "MIT" ]
12
2017-10-01T12:35:58.000Z
2018-08-19T07:47:00.000Z
testing_individual_section.py
OpenHRS/openhrs-scraper-app
be8b2dcf6b4612642700314fd7259cd0f5613742
[ "MIT" ]
1
2020-01-09T04:27:46.000Z
2020-01-09T04:27:46.000Z
import json import requests import re from bs4 import BeautifulSoup as bs from create_hrs_tree import get_section_text_data def main(): Section = {"name": 'Risk of loss', "number": '2A-219'} baseURL = 'http://www.capitol.hawaii.gov/hrscurrent/Vol11_Ch0476-0490/HRS0490/HRS_0490-.htm' sectio...
26.88
96
0.686012
import json import requests import re from bs4 import BeautifulSoup as bs from create_hrs_tree import get_section_text_data def main(): Section = {"name": 'Risk of loss', "number": '2A-219'} baseURL = 'http://www.capitol.hawaii.gov/hrscurrent/Vol11_Ch0476-0490/HRS0490/HRS_0490-.htm' sectio...
true
true
1c3375b4eab451b16c40c709077979721739d1e9
2,994
py
Python
experiments/murtaza/ros/sawyer_sim/sawyer_pos_sac.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
experiments/murtaza/ros/sawyer_sim/sawyer_pos_sac.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
experiments/murtaza/ros/sawyer_sim/sawyer_pos_sac.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
from rlkit.launchers.launcher_util import run_experiment from rlkit.torch.networks import ConcatMlp import rlkit.torch.pytorch_util as ptu from rlkit.torch.sac.policies import TanhGaussianPolicy from rlkit.torch.sac.sac import SoftActorCritic from sawyer_control.sawyer_reaching import SawyerXYZReachingEnv import numpy ...
26.732143
63
0.573146
from rlkit.launchers.launcher_util import run_experiment from rlkit.torch.networks import ConcatMlp import rlkit.torch.pytorch_util as ptu from rlkit.torch.sac.policies import TanhGaussianPolicy from rlkit.torch.sac.sac import SoftActorCritic from sawyer_control.sawyer_reaching import SawyerXYZReachingEnv import numpy ...
true
true
1c337605d45899ca95adf8c7fcedb4e9ce240822
4,528
py
Python
api/src/opentrons/hardware_control/emulation/thermocycler.py
mrakitin/opentrons
d9c7ed23d13cdb62bd1bc397dc2871d4bd5b77e9
[ "Apache-2.0" ]
null
null
null
api/src/opentrons/hardware_control/emulation/thermocycler.py
mrakitin/opentrons
d9c7ed23d13cdb62bd1bc397dc2871d4bd5b77e9
[ "Apache-2.0" ]
null
null
null
api/src/opentrons/hardware_control/emulation/thermocycler.py
mrakitin/opentrons
d9c7ed23d13cdb62bd1bc397dc2871d4bd5b77e9
[ "Apache-2.0" ]
null
null
null
"""An emulation of the opentrons thermocycler module. The purpose is to provide a fake backend that responds to GCODE commands. """ import logging from typing import Optional from opentrons.drivers.thermocycler.driver import GCODE from opentrons.drivers.types import ThermocyclerLidStatus from opentrons.hardware_contr...
39.373913
79
0.634496
import logging from typing import Optional from opentrons.drivers.thermocycler.driver import GCODE from opentrons.drivers.types import ThermocyclerLidStatus from opentrons.hardware_control.emulation.parser import Parser, Command from .abstract_emulator import AbstractEmulator from .simulations import Temperature, Tem...
true
true
1c33763f08e3455be5c1b27f67dfa283532c92fc
81
py
Python
app-engine-by-example/local_constants.py
draescherl/griffith-cloud-plaforms-applications
97f86f0a6cb40e3c66572023d7d7de7b49497b49
[ "MIT" ]
null
null
null
app-engine-by-example/local_constants.py
draescherl/griffith-cloud-plaforms-applications
97f86f0a6cb40e3c66572023d7d7de7b49497b49
[ "MIT" ]
null
null
null
app-engine-by-example/local_constants.py
draescherl/griffith-cloud-plaforms-applications
97f86f0a6cb40e3c66572023d7d7de7b49497b49
[ "MIT" ]
null
null
null
PROJECT_NAME='gae-by-example' PROJECT_STORAGE_BUCKET='gae-by-example.appspot.com'
40.5
51
0.839506
PROJECT_NAME='gae-by-example' PROJECT_STORAGE_BUCKET='gae-by-example.appspot.com'
true
true
1c33772aba5b57d2f7e626c7d7dec345fd5596bd
156
py
Python
configs/prod.py
Stupnitskiy/BinaryAPI
e448936ceed96da72e2aa65847030ea56edb224f
[ "MIT" ]
null
null
null
configs/prod.py
Stupnitskiy/BinaryAPI
e448936ceed96da72e2aa65847030ea56edb224f
[ "MIT" ]
null
null
null
configs/prod.py
Stupnitskiy/BinaryAPI
e448936ceed96da72e2aa65847030ea56edb224f
[ "MIT" ]
null
null
null
DEBUG = False TESTING = False DROPBOX_ACCESS_TOKEN = 'mTUuFHFyeNAAAAAAAAAAISJUHjSYan7RFlrRfJEdnzT1aUSKv59aLJFJMnzbS0uT' DROPBO_PROJECT_PATH = '/binaryAPI'
26
89
0.858974
DEBUG = False TESTING = False DROPBOX_ACCESS_TOKEN = 'mTUuFHFyeNAAAAAAAAAAISJUHjSYan7RFlrRfJEdnzT1aUSKv59aLJFJMnzbS0uT' DROPBO_PROJECT_PATH = '/binaryAPI'
true
true
1c33775ff90dde5df7953bff084cd11b14119b45
8,034
py
Python
python/kfserving/kfserving/models/v1alpha2_inference_service.py
titoeb/kfserving
b072a76842b57e904dbdf46a136474a22051500d
[ "Apache-2.0" ]
6
2022-02-15T21:54:19.000Z
2022-02-16T21:18:54.000Z
python/kfserving/kfserving/models/v1alpha2_inference_service.py
titoeb/kfserving
b072a76842b57e904dbdf46a136474a22051500d
[ "Apache-2.0" ]
635
2021-01-29T07:06:06.000Z
2022-03-31T09:09:20.000Z
python/kfserving/kfserving/models/v1alpha2_inference_service.py
titoeb/kfserving
b072a76842b57e904dbdf46a136474a22051500d
[ "Apache-2.0" ]
4
2021-02-15T23:02:53.000Z
2022-01-27T22:54:16.000Z
# Copyright 2020 kubeflow.org. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
33.061728
312
0.638163
import pprint import re import six from kfserving.configuration import Configuration class V1alpha2InferenceService(object): openapi_types = { 'api_version': 'str', 'kind': 'str', 'metadata': 'V1ObjectMeta', 'spec': 'V1alpha2InferenceServiceSpec', 'status': 'V1alpha...
true
true
1c337772a3c0152c7169b07e964047635ab78aae
3,444
py
Python
Intro_to_Recommendation_Systems/DeepRecommender/data_utils/movielens_data_convert.py
NunoEdgarGFlowHub/sciblog_support
5ef38b935ad45edd1cf01b92b5184282b4ee25fa
[ "BSD-3-Clause" ]
668
2016-11-27T13:12:40.000Z
2022-02-18T09:12:19.000Z
Intro_to_Recommendation_Systems/DeepRecommender/data_utils/movielens_data_convert.py
mohamedndiaye/sciblog_support
0d5b956bacbd40d1a1fc07582aba728abfb59f54
[ "BSD-3-Clause" ]
99
2016-11-01T08:18:44.000Z
2021-02-25T06:16:39.000Z
Intro_to_Recommendation_Systems/DeepRecommender/data_utils/movielens_data_convert.py
mohamedndiaye/sciblog_support
0d5b956bacbd40d1a1fc07582aba728abfb59f54
[ "BSD-3-Clause" ]
185
2016-11-29T11:11:33.000Z
2022-03-31T09:14:41.000Z
# Copyright (c) 2017 NVIDIA Corporation import sys import datetime import random from math import floor def print_stats(data): total_ratings = 0 print("STATS") for user in data: total_ratings += len(data[user]) print("Total Ratings: {}".format(total_ratings)) print("Total User count: {}".format(len(data....
33.115385
115
0.671312
import sys import datetime import random from math import floor def print_stats(data): total_ratings = 0 print("STATS") for user in data: total_ratings += len(data[user]) print("Total Ratings: {}".format(total_ratings)) print("Total User count: {}".format(len(data.keys()))) def save_data_to_file(data, f...
true
true
1c33778216c6074870c586d573ca2ba9195b1476
1,047
py
Python
editor/attributes/player/player_attribute_fk_style.py
PeterC10/COFPES-OF-Editor-6
0a9c9b75fada8264634bdc968c9da209c44b29e2
[ "MIT" ]
1
2022-03-11T12:25:57.000Z
2022-03-11T12:25:57.000Z
editor/attributes/player/player_attribute_fk_style.py
PeterC10/COFPES-OF-Editor-6
0a9c9b75fada8264634bdc968c9da209c44b29e2
[ "MIT" ]
null
null
null
editor/attributes/player/player_attribute_fk_style.py
PeterC10/COFPES-OF-Editor-6
0a9c9b75fada8264634bdc968c9da209c44b29e2
[ "MIT" ]
null
null
null
from editor.attributes.player.player_attribute import ( PlayerAttribute, PlayerAttributeTypes, ) class PlayerAttributeFkStyle(PlayerAttribute): @classmethod def att_class_name(cls): return "FK Style" @classmethod def att_class_type(cls): return PlayerAttributeTypes.BasicSettin...
26.846154
67
0.683859
from editor.attributes.player.player_attribute import ( PlayerAttribute, PlayerAttributeTypes, ) class PlayerAttributeFkStyle(PlayerAttribute): @classmethod def att_class_name(cls): return "FK Style" @classmethod def att_class_type(cls): return PlayerAttributeTypes.BasicSettin...
true
true
1c33781d337fcd41bdfddab8f6383b37366a2364
346
py
Python
users/models.py
artkapl/django-blog-project
16494465042dd6846f3a2cd560c0cfe7737cc8e0
[ "MIT" ]
null
null
null
users/models.py
artkapl/django-blog-project
16494465042dd6846f3a2cd560c0cfe7737cc8e0
[ "MIT" ]
null
null
null
users/models.py
artkapl/django-blog-project
16494465042dd6846f3a2cd560c0cfe7737cc8e0
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. from django.contrib.auth.models import User class Profile(models.Model): user = models.OneToOneField(to=User, on_delete=models.CASCADE) image = models.ImageField(default='default.jpg', upload_to='profile') def __str__(self): return f"{self....
26.615385
73
0.734104
from django.db import models from django.contrib.auth.models import User class Profile(models.Model): user = models.OneToOneField(to=User, on_delete=models.CASCADE) image = models.ImageField(default='default.jpg', upload_to='profile') def __str__(self): return f"{self.user.username}'s Profile"
true
true
1c3378e86defbbc7f3668544036cb7b6f2d8b7c3
100
py
Python
keras_textclassification/data/model/__init__.py
luoyudong593/Keras-TextClassification
b3e6966b5dbc7f425522074e2043fbff0614de84
[ "MIT" ]
1,339
2019-06-13T15:34:46.000Z
2022-03-31T11:24:09.000Z
keras_textclassification/data/model/__init__.py
zhangshixing-chn/Keras-TextClassification
640e3f44f90d9d8046546f7e1a93a29ebe5c8d30
[ "MIT" ]
75
2019-06-25T06:38:27.000Z
2022-03-25T06:48:19.000Z
keras_textclassification/data/model/__init__.py
zhangshixing-chn/Keras-TextClassification
640e3f44f90d9d8046546f7e1a93a29ebe5c8d30
[ "MIT" ]
400
2019-06-17T03:00:48.000Z
2022-03-23T07:00:53.000Z
# -*- coding: UTF-8 -*- # !/usr/bin/python # @time :2019/8/28 2:35 # @author :Mo # @function :
20
27
0.52
true
true
1c33797ae21b5684e8af23125a3d72721bee019a
1,554
py
Python
examples/hello_world.py
keredson/tinyweb
9b4619cef1bf3c1c25c3ec970c13a117e4b49346
[ "MIT" ]
138
2018-01-22T20:57:38.000Z
2022-03-20T20:25:57.000Z
examples/hello_world.py
davidmoshal/tinyweb
33d73c90f005cfd3423affe358cad0f13c37728f
[ "MIT" ]
43
2018-01-04T19:40:50.000Z
2022-03-11T04:13:56.000Z
examples/hello_world.py
davidmoshal/tinyweb
33d73c90f005cfd3423affe358cad0f13c37728f
[ "MIT" ]
31
2018-01-04T19:44:43.000Z
2022-02-25T18:22:59.000Z
#!/usr/bin/env micropython """ MIT license (C) Konstantin Belyalov 2017-2018 """ import tinyweb # Create web server application app = tinyweb.webserver() # Index page @app.route('/') async def index(request, response): # Start HTTP response with content-type text/html await response.start_html() # Send ...
25.47541
99
0.608752
import tinyweb app = tinyweb.webserver() @app.route('/') async def index(request, response): await response.start_html() await response.send('<html><body><h1>Hello, world! (<a href="/table">table</a>)</h1></html>\n') @app.route('/redirect') async def redirect(request, response): await resp...
true
true
1c337acc17a2be10f8496a8319d99b7d4033b230
1,148
py
Python
FMR3.py
PRASAD-DANGARE/PYTHON
36214f7dc3762d327e5a29e40752edeb098249c8
[ "MIT" ]
1
2021-06-07T07:55:28.000Z
2021-06-07T07:55:28.000Z
FMR3.py
PRASAD-DANGARE/PYTHON
36214f7dc3762d327e5a29e40752edeb098249c8
[ "MIT" ]
null
null
null
FMR3.py
PRASAD-DANGARE/PYTHON
36214f7dc3762d327e5a29e40752edeb098249c8
[ "MIT" ]
null
null
null
''' Description : Creating Filter, Map, Reduce Using Lambda In CheckEven & Increment Function Function Date : 21 Feb 2021 Function Author : Prasad Dangare Input : Int Output : Int ''' from functools import reduce CheckEven = lambda no : (no % 2 == 0) # (no % 2) it disp...
25.511111
96
0.591463
from functools import reduce CheckEven = lambda no : (no % 2 == 0) Increment = lambda no : no + 2 Add = lambda no1,no2: no1 + no2 def Add(no1, no2): return no1 + no2 def main(): arr = [] print("Enter Number Of Elements : ") size = int(input()) for i in range(size): ...
true
true
1c337ba90e3206e8f089b8a4898c1d48a9a249cf
695
py
Python
HTN 2021 Backend/cockroach/manage.py
joonsauce/HTN-2021
573722e3a9a74e928562c93a96649dc1e6e5843f
[ "MIT" ]
null
null
null
HTN 2021 Backend/cockroach/manage.py
joonsauce/HTN-2021
573722e3a9a74e928562c93a96649dc1e6e5843f
[ "MIT" ]
null
null
null
HTN 2021 Backend/cockroach/manage.py
joonsauce/HTN-2021
573722e3a9a74e928562c93a96649dc1e6e5843f
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cockroach_example.settings') try: from django.core.management import execute_from_command_...
30.217391
82
0.661871
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cockroach_example.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's in...
true
true
1c337bee7cd0693eab260160e467f2c2904382dd
1,547
py
Python
django_postgres_extensions/models/sql/subqueries.py
primal100/django_nosql
bb1edc2cbf194fe571a605595a898b2528918301
[ "BSD-3-Clause" ]
56
2016-08-19T10:47:24.000Z
2022-01-04T16:19:40.000Z
django_postgres_extensions/models/sql/subqueries.py
primal100/django_nosql
bb1edc2cbf194fe571a605595a898b2528918301
[ "BSD-3-Clause" ]
8
2016-11-18T17:02:55.000Z
2020-02-05T02:45:05.000Z
django_postgres_extensions/models/sql/subqueries.py
primal100/django_nosql
bb1edc2cbf194fe571a605595a898b2528918301
[ "BSD-3-Clause" ]
30
2017-07-17T19:06:15.000Z
2022-03-26T12:03:01.000Z
from django.db.models.sql.subqueries import UpdateQuery as BaseUpdateQuery from django.utils import six from django.core.exceptions import FieldError class UpdateQuery(BaseUpdateQuery): def add_update_values(self, values): """ Convert a dictionary of field name to value mappings into an update ...
45.5
94
0.570136
from django.db.models.sql.subqueries import UpdateQuery as BaseUpdateQuery from django.utils import six from django.core.exceptions import FieldError class UpdateQuery(BaseUpdateQuery): def add_update_values(self, values): values_seq = [] for name, val in six.iteritems(values): if '__' ...
true
true
1c337d56b55c427783a9423271a2671bd9e50c9a
21,999
py
Python
baselines/her/ddpg.py
swkokr/FetchPickAndPlace_HER_DDPG
8378b53dac922cffeff8e2bdabca69cf6fd8bd54
[ "MIT" ]
null
null
null
baselines/her/ddpg.py
swkokr/FetchPickAndPlace_HER_DDPG
8378b53dac922cffeff8e2bdabca69cf6fd8bd54
[ "MIT" ]
null
null
null
baselines/her/ddpg.py
swkokr/FetchPickAndPlace_HER_DDPG
8378b53dac922cffeff8e2bdabca69cf6fd8bd54
[ "MIT" ]
null
null
null
from collections import OrderedDict import numpy as np import tensorflow as tf from tensorflow.contrib.staging import StagingArea from baselines import logger from baselines.her.util import ( import_function, store_args, flatten_grads, transitions_in_episode_batch, convert_episode_to_batch_major) from baselines.h...
48.995546
212
0.630347
from collections import OrderedDict import numpy as np import tensorflow as tf from tensorflow.contrib.staging import StagingArea from baselines import logger from baselines.her.util import ( import_function, store_args, flatten_grads, transitions_in_episode_batch, convert_episode_to_batch_major) from baselines.h...
true
true
1c337e6758b16a9bafaa9f9554d376509b23dd65
49
py
Python
day.py
dbk9eb/cs3240-labdemo
a03b7487ff2fafd1cb45227db47084152b062a70
[ "MIT" ]
null
null
null
day.py
dbk9eb/cs3240-labdemo
a03b7487ff2fafd1cb45227db47084152b062a70
[ "MIT" ]
null
null
null
day.py
dbk9eb/cs3240-labdemo
a03b7487ff2fafd1cb45227db47084152b062a70
[ "MIT" ]
null
null
null
import helper helper.print_message("Good day!")
12.25
33
0.77551
import helper helper.print_message("Good day!")
true
true
1c337e7eeef15dde12d44510cd913c3e9a628fd0
7,825
py
Python
test/test_niaapi_api.py
sdnit-se/intersight-python
551f7685c0f76bb8af60ec83ffb6f9672d49a4ae
[ "Apache-2.0" ]
21
2018-03-29T14:20:35.000Z
2021-10-13T05:11:41.000Z
test/test_niaapi_api.py
sdnit-se/intersight-python
551f7685c0f76bb8af60ec83ffb6f9672d49a4ae
[ "Apache-2.0" ]
14
2018-01-30T15:45:46.000Z
2022-02-23T14:23:21.000Z
test/test_niaapi_api.py
sdnit-se/intersight-python
551f7685c0f76bb8af60ec83ffb6f9672d49a4ae
[ "Apache-2.0" ]
18
2018-01-03T15:09:56.000Z
2021-07-16T02:21:54.000Z
# coding: utf-8 """ Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environmen...
32.334711
1,052
0.689968
from __future__ import absolute_import import unittest import intersight from intersight.api.niaapi_api import NiaapiApi from intersight.rest import ApiException class TestNiaapiApi(unittest.TestCase): def setUp(self): self.api = intersight.api.niaapi_api.NiaapiApi() def tearDown(self): ...
true
true
1c338012d5f71015b69976f28bb231597f53471c
4,188
py
Python
configs/distillers/fgd/fgd_cascade_mask_rcnn_rx101_32x4d_distill_faster_rcnn_r50_fpn_2x_coco.py
jie311/FGD
031ef509f2f19c281132447d82a1c077943eb64e
[ "Apache-2.0" ]
103
2021-11-23T07:12:41.000Z
2022-03-31T13:28:10.000Z
configs/distillers/fgd/fgd_cascade_mask_rcnn_rx101_32x4d_distill_faster_rcnn_r50_fpn_2x_coco.py
jie311/FGD
031ef509f2f19c281132447d82a1c077943eb64e
[ "Apache-2.0" ]
18
2021-11-29T14:59:21.000Z
2022-03-31T09:43:39.000Z
configs/distillers/fgd/fgd_cascade_mask_rcnn_rx101_32x4d_distill_faster_rcnn_r50_fpn_2x_coco.py
Senwang98/Lightweight-Detection-and-KD
7d6a4c02d922d4ed0920c9108f1f06dd63c5e90b
[ "Apache-2.0" ]
12
2021-11-28T10:26:38.000Z
2022-03-28T06:10:44.000Z
_base_ = [ '../../_base_/datasets/coco_detection.py', '../../_base_/schedules/schedule_2x.py', '../../_base_/default_runtime.py' ] # model settings find_unused_parameters=True temp=0.5 alpha_fgd=0.00005 beta_fgd=0.000025 gamma_fgd=0.00005 lambda_fgd=0.0000005 distiller = dict( type='DetectionDistiller', ...
49.857143
198
0.401862
_base_ = [ '../../_base_/datasets/coco_detection.py', '../../_base_/schedules/schedule_2x.py', '../../_base_/default_runtime.py' ] find_unused_parameters=True temp=0.5 alpha_fgd=0.00005 beta_fgd=0.000025 gamma_fgd=0.00005 lambda_fgd=0.0000005 distiller = dict( type='DetectionDistiller', teacher_pretrain...
true
true
1c3380428247352863fee058af182659e36101fa
10,798
py
Python
MLCtr/machineLearning/decision_tree.py
devillove084/CollageDesign
e2a85a8d15f82d1f72b754de04af78126eae9a1c
[ "MIT" ]
3
2018-12-28T14:12:53.000Z
2019-06-08T16:30:25.000Z
MLCtr/machineLearning/decision_tree.py
devillove084/CollageDesign
e2a85a8d15f82d1f72b754de04af78126eae9a1c
[ "MIT" ]
null
null
null
MLCtr/machineLearning/decision_tree.py
devillove084/CollageDesign
e2a85a8d15f82d1f72b754de04af78126eae9a1c
[ "MIT" ]
null
null
null
from __future__ import division, print_function import numpy as np import cupy from graduateutil import divide_on_feature, train_test_split, standardize, mean_squared_error from graduateutil import calculate_entropy, accuracy_score, calculate_variance class DecisionNode(): """Class that represents a decision nod...
39.265455
104
0.602889
from __future__ import division, print_function import numpy as np import cupy from graduateutil import divide_on_feature, train_test_split, standardize, mean_squared_error from graduateutil import calculate_entropy, accuracy_score, calculate_variance class DecisionNode(): def __init__(self, feature_i=None, thre...
true
true
1c338084d15ebb05209be561572bd9f31821a301
289
py
Python
define.py
nikv96/Retail-Work-Allocation-Program
23da2478c287846ebba59b30c94dd4e28aba2a62
[ "MIT" ]
1
2019-01-16T05:00:29.000Z
2019-01-16T05:00:29.000Z
define.py
nikv96/Retail-Work-Allocation-Program
23da2478c287846ebba59b30c94dd4e28aba2a62
[ "MIT" ]
null
null
null
define.py
nikv96/Retail-Work-Allocation-Program
23da2478c287846ebba59b30c94dd4e28aba2a62
[ "MIT" ]
null
null
null
'''This file has all the definitions''' weekends = ["Sunday", "Saturday"] weekdays = ["Monday","Tuesday","Wednesday","Thursday","Friday"] days = ["Sunday", "Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"] unusable_words = ["Name", "Off", "Days", "========================"]
41.285714
80
0.598616
weekends = ["Sunday", "Saturday"] weekdays = ["Monday","Tuesday","Wednesday","Thursday","Friday"] days = ["Sunday", "Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"] unusable_words = ["Name", "Off", "Days", "========================"]
true
true
1c3380ecd30ca56195bc242c33cef8c3f44c596d
4,329
py
Python
photo_gallery/models.py
Fritzip/splitted-nz
405089440350c4808144d5ed711606513efcdefb
[ "Apache-2.0" ]
null
null
null
photo_gallery/models.py
Fritzip/splitted-nz
405089440350c4808144d5ed711606513efcdefb
[ "Apache-2.0" ]
3
2019-11-16T08:10:48.000Z
2020-03-14T23:14:41.000Z
photo_gallery/models.py
Fritzip/splitted-nz
405089440350c4808144d5ed711606513efcdefb
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import uuid from django.db import models from django.db.models.signals import post_delete from django.dispatch import receiver from django.urls import reverse from imagekit.models import ImageSpecField from imagekit.processors import ResizeToFit from datetime import datet...
37.973684
146
0.635482
import uuid from django.db import models from django.db.models.signals import post_delete from django.dispatch import receiver from django.urls import reverse from imagekit.models import ImageSpecField from imagekit.processors import ResizeToFit from datetime import datetime def event_date(start, end): if end is ...
true
true
1c33815f990bfe1e8339c56f82402e636f730e30
938
py
Python
clients/client/python/test/test_identity_schema_location.py
ory/sdk
9849c6115f44f4b7612ad246124d80b4401fd730
[ "Apache-2.0" ]
77
2020-02-14T17:27:36.000Z
2022-03-25T08:44:52.000Z
clients/client/python/test/test_identity_schema_location.py
vinckr/sdk
5b93557835af7ad3662ef620b3ef10729149d484
[ "Apache-2.0" ]
125
2020-02-07T21:45:52.000Z
2022-03-31T12:54:24.000Z
clients/client/python/test/test_identity_schema_location.py
vinckr/sdk
5b93557835af7ad3662ef620b3ef10729149d484
[ "Apache-2.0" ]
44
2020-01-31T22:05:47.000Z
2022-03-09T14:41:22.000Z
""" Ory APIs Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501 The version of the OpenAPI document: v0.0.1-alpha.30 Contact: support@ory.sh Generated by: htt...
25.351351
194
0.716418
import sys import unittest import ory_client from ory_client.model.identity_schema_location import IdentitySchemaLocation class TestIdentitySchemaLocation(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def testIdentitySchemaLocation(self): ...
true
true
1c33821447ee3a2205f9ad20463239156a6209b2
1,375
py
Python
AtC_Reg_Con_041-050/ARC050/B.py
yosho-18/AtCoder
50f6d5c92a01792552c31ac912ce1cd557b06fb0
[ "MIT" ]
null
null
null
AtC_Reg_Con_041-050/ARC050/B.py
yosho-18/AtCoder
50f6d5c92a01792552c31ac912ce1cd557b06fb0
[ "MIT" ]
null
null
null
AtC_Reg_Con_041-050/ARC050/B.py
yosho-18/AtCoder
50f6d5c92a01792552c31ac912ce1cd557b06fb0
[ "MIT" ]
null
null
null
import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools, random from collections import deque, defaultdict, Counter; from heapq import heappush, heappop from itertools import permutations, combinations, product, accumulate, groupby from bisect import bisect_left, bisect_ri...
50.925926
111
0.593455
import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools, random from collections import deque, defaultdict, Counter; from heapq import heappush, heappop from itertools import permutations, combinations, product, accumulate, groupby from bisect import bisect_left, bisect_ri...
true
true
1c33828faa0aa4daff20627b4fe5cc532a8ee1a8
321
py
Python
src/pvt_model/pvt_system/__init__.py
BenWinchester/PVTModel
6bf3976b06f406f632e0a9e525cd8b05359da239
[ "MIT" ]
1
2021-05-11T14:15:11.000Z
2021-05-11T14:15:11.000Z
src/pvt_model/pvt_system/__init__.py
BenWinchester/PVTModel
6bf3976b06f406f632e0a9e525cd8b05359da239
[ "MIT" ]
14
2021-02-23T11:53:08.000Z
2021-11-16T10:45:31.000Z
src/pvt_model/pvt_system/__init__.py
BenWinchester/PVTModel
6bf3976b06f406f632e0a9e525cd8b05359da239
[ "MIT" ]
null
null
null
#!/usr/bin/python3.7 ######################################################################################## # __init__.py - The init module for the PVT model component. # # Author: Ben Winchester # Copyright: Ben Winchester, 2020 ########################################################################################...
40.125
88
0.327103
true
true
1c3382fc20e6b4435b9f77ff3cc16a4a96a24d0b
34,879
py
Python
tests/ManualTableau/TestIplManualTableau.py
oIi123/TableauxProver
cb527f91f5c2d0393fbfcb3fb501b4480e0c9031
[ "MIT" ]
null
null
null
tests/ManualTableau/TestIplManualTableau.py
oIi123/TableauxProver
cb527f91f5c2d0393fbfcb3fb501b4480e0c9031
[ "MIT" ]
null
null
null
tests/ManualTableau/TestIplManualTableau.py
oIi123/TableauxProver
cb527f91f5c2d0393fbfcb3fb501b4480e0c9031
[ "MIT" ]
null
null
null
import unittest from src.builder_factory import LogicType from src.Parser.PropParser import PropParser from src.TableauxBuilder.BaseManualTableau import BaseManualTableau, BaseTableauxBuilder from src.TableauxBuilder.IpcTableauxBuilder import IpcTableauxBuilder def parse(expr: str): return PropParser.parse(expr)...
33.764763
99
0.577998
import unittest from src.builder_factory import LogicType from src.Parser.PropParser import PropParser from src.TableauxBuilder.BaseManualTableau import BaseManualTableau, BaseTableauxBuilder from src.TableauxBuilder.IpcTableauxBuilder import IpcTableauxBuilder def parse(expr: str): return PropParser.parse(expr)...
true
true
1c3384e6fe16456cdbde54061a311b075d5a9da1
29
py
Python
tests/test_generate_isogeom.py
kkiesling/isogeom-generator
5363c8431694b33f8c8de329ee31b3a6d67ccc7e
[ "MIT" ]
1
2021-01-07T02:45:38.000Z
2021-01-07T02:45:38.000Z
tests/test_generate_isogeom.py
kkiesling/isogeom-generator
5363c8431694b33f8c8de329ee31b3a6d67ccc7e
[ "MIT" ]
21
2020-05-18T16:38:22.000Z
2021-08-24T16:46:24.000Z
tests/test_generate_isogeom.py
kkiesling/isogeom-generator
5363c8431694b33f8c8de329ee31b3a6d67ccc7e
[ "MIT" ]
1
2020-05-18T16:36:35.000Z
2020-05-18T16:36:35.000Z
"""tests for the CLI tool"""
14.5
28
0.62069
true
true
1c33851d2b3f96989d1efe22871a59d33273da9d
141
py
Python
apps/example/urls.py
evertrol/det
5d397010bc9a608dcb38c176bb3f89e4f17ab272
[ "MIT" ]
null
null
null
apps/example/urls.py
evertrol/det
5d397010bc9a608dcb38c176bb3f89e4f17ab272
[ "MIT" ]
null
null
null
apps/example/urls.py
evertrol/det
5d397010bc9a608dcb38c176bb3f89e4f17ab272
[ "MIT" ]
null
null
null
from django.urls import path, include from . import views app_name = 'example' urlpatterns = [ path('', views.index, name='index'), ]
14.1
40
0.673759
from django.urls import path, include from . import views app_name = 'example' urlpatterns = [ path('', views.index, name='index'), ]
true
true
1c3385c27648c79188c5318fa397b3bfcb64799f
1,397
py
Python
bot.py
Juniorredcoder/G-Bot
c733afd912351137a9a1d21451ea442b1ac9d7f2
[ "Unlicense" ]
1
2022-02-10T15:29:33.000Z
2022-02-10T15:29:33.000Z
bot.py
Juniorredcoder/G-Bot
c733afd912351137a9a1d21451ea442b1ac9d7f2
[ "Unlicense" ]
null
null
null
bot.py
Juniorredcoder/G-Bot
c733afd912351137a9a1d21451ea442b1ac9d7f2
[ "Unlicense" ]
null
null
null
print("Type 'help' for show command") import os from colorama import init from colorama import Fore init() c=1 while True : pw=input(Fore.RED + 'G-BOT>') print() if pw == 'help': print("----------COMMAND----------\n\n 1.hey g-bot\n 2.i am fine and you\n 3.who is your boss\n 4.who gave you this name\n...
43.65625
189
0.569077
print("Type 'help' for show command") import os from colorama import init from colorama import Fore init() c=1 while True : pw=input(Fore.RED + 'G-BOT>') print() if pw == 'help': print("----------COMMAND----------\n\n 1.hey g-bot\n 2.i am fine and you\n 3.who is your boss\n 4.who gave you this name\n...
true
true
1c338654e5da1e13145829ea4df34006bc84f57f
3,698
py
Python
tests/test_schedules.py
sunny316/redbeat
51db315ef182f28cbb4a8d33af0b78bd816ac9a6
[ "Apache-2.0" ]
null
null
null
tests/test_schedules.py
sunny316/redbeat
51db315ef182f28cbb4a8d33af0b78bd816ac9a6
[ "Apache-2.0" ]
null
null
null
tests/test_schedules.py
sunny316/redbeat
51db315ef182f28cbb4a8d33af0b78bd816ac9a6
[ "Apache-2.0" ]
null
null
null
from datetime import ( datetime, timedelta ) from unittest import TestCase from mock import patch try: # celery 3.x from celery.utils.timeutils import timezone except ImportError: # celery 4.x from celery.utils.time import timezone from redbeat.schedules import rrule @patch.object(rrule, 'now', dat...
42.022727
94
0.685506
from datetime import ( datetime, timedelta ) from unittest import TestCase from mock import patch try: from celery.utils.timeutils import timezone except ImportError: from celery.utils.time import timezone from redbeat.schedules import rrule @patch.object(rrule, 'now', datetime.utcnow) @patch.objec...
true
true
1c3386f366875ac76dffe8e01e1ffd6fa00ba05d
6,725
py
Python
metadata-ingestion/src/datahub/ingestion/source/snowflake_usage.py
emailstonl/datahub
19b2a42a00ca43a7d042ae2a8e5d05498df7f2a9
[ "Apache-2.0" ]
null
null
null
metadata-ingestion/src/datahub/ingestion/source/snowflake_usage.py
emailstonl/datahub
19b2a42a00ca43a7d042ae2a8e5d05498df7f2a9
[ "Apache-2.0" ]
null
null
null
metadata-ingestion/src/datahub/ingestion/source/snowflake_usage.py
emailstonl/datahub
19b2a42a00ca43a7d042ae2a8e5d05498df7f2a9
[ "Apache-2.0" ]
null
null
null
import collections import dataclasses import json import logging from datetime import datetime, timezone from typing import Dict, Iterable, List, Optional import pydantic import pydantic.dataclasses from sqlalchemy import create_engine from sqlalchemy.engine import Engine import datahub.emitter.mce_builder as builder...
33.625
173
0.684164
import collections import dataclasses import json import logging from datetime import datetime, timezone from typing import Dict, Iterable, List, Optional import pydantic import pydantic.dataclasses from sqlalchemy import create_engine from sqlalchemy.engine import Engine import datahub.emitter.mce_builder as builder...
true
true
1c338708ba9ffe0bff745b5465014d4deb775853
5,676
py
Python
landlab/io/shapefile/read_shapefile.py
cctrunz/landlab
4e4ef12f4bae82bc5194f1dcc9af8ff1a7c20939
[ "MIT" ]
null
null
null
landlab/io/shapefile/read_shapefile.py
cctrunz/landlab
4e4ef12f4bae82bc5194f1dcc9af8ff1a7c20939
[ "MIT" ]
1
2016-03-16T02:34:08.000Z
2016-04-20T19:31:30.000Z
landlab/io/shapefile/read_shapefile.py
cctrunz/landlab
4e4ef12f4bae82bc5194f1dcc9af8ff1a7c20939
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Functions to read shapefiles and create a NetworkModelGrid. """ import shapefile as ps from shapefile import ShapefileException from landlab.grid.network import NetworkModelGrid def read_shapefile(file, dbf=None, store_polyline_vertices=True): """Read shapefile ...
32.067797
83
0.59408
import shapefile as ps from shapefile import ShapefileException from landlab.grid.network import NetworkModelGrid def read_shapefile(file, dbf=None, store_polyline_vertices=True): try: sf = ps.Reader(file) except ShapefileException: try: sf = ps.Reader(shp=file, dbf=dbf) e...
true
true
1c33885ab73973c5c33df2e9e517ec6a25907d24
1,031
py
Python
config/api_router.py
unkn1w/Delivery
21b33f5b8d9f057c129fc78c175b6c79fcd23122
[ "MIT" ]
null
null
null
config/api_router.py
unkn1w/Delivery
21b33f5b8d9f057c129fc78c175b6c79fcd23122
[ "MIT" ]
null
null
null
config/api_router.py
unkn1w/Delivery
21b33f5b8d9f057c129fc78c175b6c79fcd23122
[ "MIT" ]
null
null
null
from django.conf import settings from rest_framework.routers import DefaultRouter, SimpleRouter from delivery_proj.users.api.views import ( UserViewSet, RestaurantViewSet, CreateRestaurantViewSet, CourierViewSet, BuyerViewSet, ) from delivery_proj.dishes.views import DishesListViewSet, DishesCreate...
32.21875
77
0.794374
from django.conf import settings from rest_framework.routers import DefaultRouter, SimpleRouter from delivery_proj.users.api.views import ( UserViewSet, RestaurantViewSet, CreateRestaurantViewSet, CourierViewSet, BuyerViewSet, ) from delivery_proj.dishes.views import DishesListViewSet, DishesCreate...
true
true
1c3389847f06331c2903a02107214390a38adbea
5,083
py
Python
doc/development/tutorials/examples/recipe.py
Lu-Yi-Hsun/sphinx
7e81e1432e4a63bad0b13db5652f9ed02ea04f41
[ "BSD-2-Clause" ]
2
2021-09-25T12:48:31.000Z
2021-10-01T16:59:43.000Z
doc/development/tutorials/examples/recipe.py
Lu-Yi-Hsun/sphinx
7e81e1432e4a63bad0b13db5652f9ed02ea04f41
[ "BSD-2-Clause" ]
2
2022-02-14T03:20:12.000Z
2022-03-02T10:44:31.000Z
doc/development/tutorials/examples/recipe.py
Lu-Yi-Hsun/sphinx
7e81e1432e4a63bad0b13db5652f9ed02ea04f41
[ "BSD-2-Clause" ]
1
2021-06-06T04:30:02.000Z
2021-06-06T04:30:02.000Z
from collections import defaultdict from docutils.parsers.rst import directives from sphinx import addnodes from sphinx.directives import ObjectDescription from sphinx.domains import Domain, Index from sphinx.roles import XRefRole from sphinx.util.nodes import make_refnode class RecipeDirective(ObjectDescription): ...
31.571429
78
0.613024
from collections import defaultdict from docutils.parsers.rst import directives from sphinx import addnodes from sphinx.directives import ObjectDescription from sphinx.domains import Domain, Index from sphinx.roles import XRefRole from sphinx.util.nodes import make_refnode class RecipeDirective(ObjectDescription): ...
true
true
1c3389a940ec699819dd5b5b565bb6d39d01e0f5
5,286
py
Python
tests/test_linux_aarch64_64.py
ngothan/py-cpuinfo
d8a9c9b095be55d5ceebf42497f099039fe8c348
[ "MIT" ]
null
null
null
tests/test_linux_aarch64_64.py
ngothan/py-cpuinfo
d8a9c9b095be55d5ceebf42497f099039fe8c348
[ "MIT" ]
null
null
null
tests/test_linux_aarch64_64.py
ngothan/py-cpuinfo
d8a9c9b095be55d5ceebf42497f099039fe8c348
[ "MIT" ]
null
null
null
import unittest from cpuinfo import * import helpers class MockDataSource(object): bits = '64bit' cpu_count = 6 is_windows = False arch_string_raw = 'aarch64' uname_string_raw = '' can_cpuid = False @staticmethod def has_proc_cpuinfo(): return True @staticmethod def has_lscpu(): return True @stati...
27.821053
99
0.694098
import unittest from cpuinfo import * import helpers class MockDataSource(object): bits = '64bit' cpu_count = 6 is_windows = False arch_string_raw = 'aarch64' uname_string_raw = '' can_cpuid = False @staticmethod def has_proc_cpuinfo(): return True @staticmethod def has_lscpu(): return True @stati...
true
true
1c338a3c880b366bde0f0b55bed72fa47ca41f96
3,267
py
Python
atari/dqn/replay_memory.py
podondra/roboschool-rl
2e6d6b1302eaa9aea12ebd81e2ad7a22d29a8d69
[ "MIT" ]
2
2018-03-06T21:26:34.000Z
2021-12-22T12:31:47.000Z
atari/dqn/replay_memory.py
podondra/roboschool-rl
2e6d6b1302eaa9aea12ebd81e2ad7a22d29a8d69
[ "MIT" ]
4
2019-12-16T20:37:48.000Z
2020-03-30T20:08:36.000Z
atari/dqn/replay_memory.py
podondra/roboschool-rl
2e6d6b1302eaa9aea12ebd81e2ad7a22d29a8d69
[ "MIT" ]
2
2018-03-06T21:45:19.000Z
2018-04-06T20:53:15.000Z
import numpy import tensorflow from collections import deque class Preprocessor: def __init__(self): self.img = tensorflow.placeholder( tensorflow.uint8, shape=[210, 160, 3] ) gray_img = tensorflow.image.rgb_to_grayscale(self.img) resize_img ...
33
76
0.584328
import numpy import tensorflow from collections import deque class Preprocessor: def __init__(self): self.img = tensorflow.placeholder( tensorflow.uint8, shape=[210, 160, 3] ) gray_img = tensorflow.image.rgb_to_grayscale(self.img) resize_img ...
true
true
1c338b26f0776a4698a5f37082f87bdc9110edbf
33,115
py
Python
test/functional/rpc_fundrawtransaction.py
shadow-42/litecoincash
965c806041f8e425ab5b9c8b979cf100c0ecf740
[ "MIT" ]
78
2018-02-20T00:38:43.000Z
2022-03-11T04:11:04.000Z
test/functional/rpc_fundrawtransaction.py
shadow-42/litecoincash
965c806041f8e425ab5b9c8b979cf100c0ecf740
[ "MIT" ]
39
2018-02-20T13:36:27.000Z
2021-11-30T23:38:34.000Z
test/functional/rpc_fundrawtransaction.py
shadow-42/litecoincash
965c806041f8e425ab5b9c8b979cf100c0ecf740
[ "MIT" ]
77
2018-02-20T00:45:12.000Z
2022-02-14T21:21:15.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the fundrawtransaction RPC.""" from test_framework.test_framework import BitcoinTestFramework fro...
45.177353
223
0.569651
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * def get_unspent(listunspent, amount): for utx in listunspent: if utx['amount'] == amount: return utx raise AssertionError('Could not find unspent with amount={}'.format(amount)) class RawTran...
true
true
1c338ee827f3d72ea745ec0b86a9646c7ce8fc3e
219
py
Python
Code/bindings.py
akankshadiwedy/t2wml
02f60611eec19d10a92fd2cb06f07339cd2cb269
[ "MIT" ]
null
null
null
Code/bindings.py
akankshadiwedy/t2wml
02f60611eec19d10a92fd2cb06f07339cd2cb269
[ "MIT" ]
null
null
null
Code/bindings.py
akankshadiwedy/t2wml
02f60611eec19d10a92fd2cb06f07339cd2cb269
[ "MIT" ]
null
null
null
bindings = { "$col": None, "$row": None, "$left": None, "$right": None, "$top": None, "$bottom": None, "excel_sheet": None, "item_table": None, "created_by": None, "code": None }
16.846154
24
0.488584
bindings = { "$col": None, "$row": None, "$left": None, "$right": None, "$top": None, "$bottom": None, "excel_sheet": None, "item_table": None, "created_by": None, "code": None }
true
true
1c3391056e78312935375ca84db34f34357fc24e
3,314
py
Python
src/utils.py
jcboyd/cyclegan-roi
f0c80c6122d17406f5282f58ea09abaf2b70c388
[ "BSD-2-Clause" ]
null
null
null
src/utils.py
jcboyd/cyclegan-roi
f0c80c6122d17406f5282f58ea09abaf2b70c388
[ "BSD-2-Clause" ]
null
null
null
src/utils.py
jcboyd/cyclegan-roi
f0c80c6122d17406f5282f58ea09abaf2b70c388
[ "BSD-2-Clause" ]
null
null
null
import numpy as np import torch from torch.nn import UpsamplingNearest2d, UpsamplingBilinear2d from rectpack import newPacker def get_mnist_canvas(images, labels, nb_classes=10, dim=128): canvas = -torch.ones((dim, dim)) noise_canvas = torch.zeros((nb_classes, dim, dim)) condition_canvas = torch.zeros((...
31.561905
85
0.610441
import numpy as np import torch from torch.nn import UpsamplingNearest2d, UpsamplingBilinear2d from rectpack import newPacker def get_mnist_canvas(images, labels, nb_classes=10, dim=128): canvas = -torch.ones((dim, dim)) noise_canvas = torch.zeros((nb_classes, dim, dim)) condition_canvas = torch.zeros((...
true
true
1c33916ee264c79fbaa5784392a842d3ae69941f
1,791
py
Python
uri/1048_aumento_salario.py
thekilian/Python-pratica
875661addd5b8eb4364bc638832c7ab55dcefce4
[ "MIT" ]
null
null
null
uri/1048_aumento_salario.py
thekilian/Python-pratica
875661addd5b8eb4364bc638832c7ab55dcefce4
[ "MIT" ]
null
null
null
uri/1048_aumento_salario.py
thekilian/Python-pratica
875661addd5b8eb4364bc638832c7ab55dcefce4
[ "MIT" ]
null
null
null
''' A empresa ABC resolveu conceder um aumento de salários a seus funcionários de acordo com a tabela abaixo: | Salário | Percentual de reajuste | | ----------------- | ---------------------- | | 0 - 400.00 | 15% | | 400.01 - 800.00 | 12% | | 800.01 - 1200.00 ...
33.792453
137
0.487437
salario = float(input()) if salario > 0 and salario <= 400.00: reaj = salario * 0.15 perc = 15 elif salario >= 400.01 and salario <= 800.00: reaj = salario * 0.12 perc = 12 elif salario >= 800.01 and salario <= 1200.00: reaj = salario * 0.1 perc = 10 elif salario >= 1200.01 and salario <= 2000...
true
true
1c3391bb5056d6b61b8866c71a4dff48e53c8011
14,150
py
Python
.ci/gitlab/template.ci.py
kinnala/pymor
9d2a8ee5f7a71482e62952257332d269d50678e9
[ "Unlicense" ]
null
null
null
.ci/gitlab/template.ci.py
kinnala/pymor
9d2a8ee5f7a71482e62952257332d269d50678e9
[ "Unlicense" ]
36
2020-06-12T07:36:49.000Z
2022-03-29T14:06:48.000Z
.ci/gitlab/template.ci.py
kinnala/pymor
9d2a8ee5f7a71482e62952257332d269d50678e9
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 import os import jinja2 from pathlib import Path # python3 only from dotenv import dotenv_values import sys import gitlab from itertools import product tpl = r'''# THIS FILE IS AUTOGENERATED -- DO NOT EDIT # # Edit and Re-run .ci/gitlab/template.ci.py instead # stages: - sanity - ...
29.852321
120
0.60735
import os import jinja2 from pathlib import Path from dotenv import dotenv_values import sys import gitlab from itertools import product tpl = r'''# THIS FILE IS AUTOGENERATED -- DO NOT EDIT # # Edit and Re-run .ci/gitlab/template.ci.py instead # stages: - sanity - test - build - install_checks - ...
true
true
1c3392e6c9028b64b4c55b56789f2ea41763f5d4
690
py
Python
tests/integration/announce/discord/helpers.py
GSH-LAN/byceps
ab8918634e90aaa8574bd1bb85627759cef122fe
[ "BSD-3-Clause" ]
33
2018-01-16T02:04:51.000Z
2022-03-22T22:57:29.000Z
tests/integration/announce/discord/helpers.py
GSH-LAN/byceps
ab8918634e90aaa8574bd1bb85627759cef122fe
[ "BSD-3-Clause" ]
7
2019-06-16T22:02:03.000Z
2021-10-02T13:45:31.000Z
tests/integration/announce/discord/helpers.py
GSH-LAN/byceps
ab8918634e90aaa8574bd1bb85627759cef122fe
[ "BSD-3-Clause" ]
14
2019-06-01T21:39:24.000Z
2022-03-14T17:56:43.000Z
""" :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from contextlib import contextmanager from datetime import datetime from http import HTTPStatus from requests_mock import Mocker def now() -> datetime: return datetime.utcnow() @contextmanager def mocked_...
20.909091
57
0.726087
from contextlib import contextmanager from datetime import datetime from http import HTTPStatus from requests_mock import Mocker def now() -> datetime: return datetime.utcnow() @contextmanager def mocked_webhook_receiver(url: str): with Mocker() as mock: mock.post(url, status_code=HTTPStatus.NO_CO...
true
true
1c3393cf1f4fce02e2eec81b119a7656e4dd6b91
6,401
py
Python
rabbittop/_rabbitmq.py
jve/rabbittop
1cac40f66135cff5433e3d6fac99cd0898a927de
[ "MIT" ]
1
2019-08-19T19:30:06.000Z
2019-08-19T19:30:06.000Z
rabbittop/_rabbitmq.py
jve/rabbittop
1cac40f66135cff5433e3d6fac99cd0898a927de
[ "MIT" ]
null
null
null
rabbittop/_rabbitmq.py
jve/rabbittop
1cac40f66135cff5433e3d6fac99cd0898a927de
[ "MIT" ]
null
null
null
""" RabbitMQ API """ import httplib import base64 import os import json import collections import datetime import logging _log = logging.getLogger() # Use urllib.extra_quote to deal with weird names def overview(host, user, password, port): return dict(_create_http_client(host, user, password, port, 'overview'...
35.759777
111
0.612248
import httplib import base64 import os import json import collections import datetime import logging _log = logging.getLogger() def overview(host, user, password, port): return dict(_create_http_client(host, user, password, port, 'overview')) def status(host, user, password, port, node_name=None): if node...
true
true
1c3394928c52fedcbcc3da1f0b982b0115c87fd9
3,783
py
Python
helper.py
ypislon/bachelorarbeit
2e1d07d667d505a79d1adb9363cec5d21dafe832
[ "MIT" ]
null
null
null
helper.py
ypislon/bachelorarbeit
2e1d07d667d505a79d1adb9363cec5d21dafe832
[ "MIT" ]
null
null
null
helper.py
ypislon/bachelorarbeit
2e1d07d667d505a79d1adb9363cec5d21dafe832
[ "MIT" ]
null
null
null
from datetime import date, datetime, timedelta from db_schema import Link from lxml import html from io import StringIO from urllib.parse import urljoin, urlparse import logging def parse_articles_url(website): url_fragment = website.article_page urls = list() urls.append(url_fragment) if "$c$" in url_...
34.081081
102
0.564896
from datetime import date, datetime, timedelta from db_schema import Link from lxml import html from io import StringIO from urllib.parse import urljoin, urlparse import logging def parse_articles_url(website): url_fragment = website.article_page urls = list() urls.append(url_fragment) if "$c$" in url_...
true
true
1c3394d89f14bc25458db3b830953f77ae6fec43
6,005
py
Python
treex/losses/mean_absolute_percentage_error.py
ptigwe/treex
c46687376ccc50c8fea6cb8617e22e4b4dd1924a
[ "MIT" ]
null
null
null
treex/losses/mean_absolute_percentage_error.py
ptigwe/treex
c46687376ccc50c8fea6cb8617e22e4b4dd1924a
[ "MIT" ]
null
null
null
treex/losses/mean_absolute_percentage_error.py
ptigwe/treex
c46687376ccc50c8fea6cb8617e22e4b4dd1924a
[ "MIT" ]
null
null
null
import typing as tp import jax.numpy as jnp from treex import types, utils from treex.losses.loss import Loss, Reduction def mean_absolute_percentage_error( target: jnp.ndarray, preds: jnp.ndarray ) -> jnp.ndarray: """ Computes the mean absolute percentage error (MAPE) between target and pre...
39.506579
134
0.603664
import typing as tp import jax.numpy as jnp from treex import types, utils from treex.losses.loss import Loss, Reduction def mean_absolute_percentage_error( target: jnp.ndarray, preds: jnp.ndarray ) -> jnp.ndarray: target = target.astype(preds.dtype) diff = jnp.abs((preds - target) / jnp.max...
true
true
1c339520bc67e47717c062f56f9d48e1307b4a84
5,979
py
Python
nemo/collections/nlp/nm/trainables/common/huggingface/roberta_nm.py
borisdayma/NeMo
88f6c5b93574adb219185d5ded14b6393c485ea0
[ "Apache-2.0" ]
10
2020-03-17T08:32:06.000Z
2021-04-19T19:03:50.000Z
nemo/collections/nlp/nm/trainables/common/huggingface/roberta_nm.py
dcmartin/NeMo
d2120a40bf23d3e38ff5677c2685c712f297e6b1
[ "Apache-2.0" ]
null
null
null
nemo/collections/nlp/nm/trainables/common/huggingface/roberta_nm.py
dcmartin/NeMo
d2120a40bf23d3e38ff5677c2685c712f297e6b1
[ "Apache-2.0" ]
1
2020-10-21T18:09:46.000Z
2020-10-21T18:09:46.000Z
# ============================================================================= # Copyright 2020 NVIDIA. All Rights Reserved. # Copyright 2018 The Google AI Language Team Authors and # The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in co...
36.457317
109
0.629369
from typing import List, Optional from transformers import ( ROBERTA_PRETRAINED_CONFIG_ARCHIVE_MAP, ROBERTA_PRETRAINED_MODEL_ARCHIVE_MAP, RobertaConfig, RobertaModel, ) from nemo.backends.pytorch.nm import TrainableNM from nemo.core.neural_modules import PretrainedModelInfo from nemo.core.neural_type...
true
true
1c33959f6b47a21892dd478875a12725a9158efb
3,090
py
Python
corai_util/finance/src/implied_vol.py
Code-Cornelius/python_libraries
71c388da60e2aeb94369c3813faca93bf6a18ebf
[ "MIT" ]
1
2022-01-01T22:10:04.000Z
2022-01-01T22:10:04.000Z
corai_util/finance/src/implied_vol.py
Code-Cornelius/python_libraries
71c388da60e2aeb94369c3813faca93bf6a18ebf
[ "MIT" ]
null
null
null
corai_util/finance/src/implied_vol.py
Code-Cornelius/python_libraries
71c388da60e2aeb94369c3813faca93bf6a18ebf
[ "MIT" ]
null
null
null
# normal libraries import warnings import numpy as np from scipy.optimize import bisect from scipy.stats import norm # priv_libraries from corai_util.finance.src.bs_model import BlackScholes, BlackScholesVegaCore from corai_util.calculus.src.optimization import newtons_method_vectorised # section #################...
31.530612
111
0.568608
import warnings import numpy as np from scipy.optimize import bisect from scipy.stats import norm from corai_util.finance.src.bs_model import BlackScholes, BlackScholesVegaCore from corai_util.calculus.src.optimization import newtons_method_vectorised def implied_vol_bisect(CallPutFlag, s0, K, T, R, d, experime...
true
true
1c33963ddc2208d0f62dde80080df6d235a6776b
3,576
py
Python
src/util/logging.py
ireina7/gzsl-seg
9aad220274b4a58b59f5da430f873b5dfc21e458
[ "MIT" ]
1
2022-03-15T04:46:00.000Z
2022-03-15T04:46:00.000Z
src/util/logging.py
ireina7/gzsl-seg
9aad220274b4a58b59f5da430f873b5dfc21e458
[ "MIT" ]
null
null
null
src/util/logging.py
ireina7/gzsl-seg
9aad220274b4a58b59f5da430f873b5dfc21e458
[ "MIT" ]
null
null
null
import sys import matplotlib.pyplot as plt from util.typing.basic import * from src.config import * def show_figure_nonblocking() -> None: plt.show(block = False) plt.pause(0.001) #end show_figure_nonblocking def show_figure_blocking() -> None: plt.show() #end show_figure_blocking def show_if(EPOCH: int,...
21.672727
74
0.626957
import sys import matplotlib.pyplot as plt from util.typing.basic import * from src.config import * def show_figure_nonblocking() -> None: plt.show(block = False) plt.pause(0.001) def show_figure_blocking() -> None: plt.show() def show_if(EPOCH: int, LOOP: int): def f(epoch: int, loop: int, call_back) ...
true
true
1c3396417062d3ec1b72e781ca37319cb0613da5
290
py
Python
django_lightweight_queue/progress_logger.py
thread/django-lightweight-queue
2c67eb13a454fa1a02f8445c26915b6e9261fdad
[ "BSD-3-Clause" ]
23
2015-04-29T04:47:02.000Z
2022-03-11T12:43:01.000Z
django_lightweight_queue/progress_logger.py
thread/django-lightweight-queue
2c67eb13a454fa1a02f8445c26915b6e9261fdad
[ "BSD-3-Clause" ]
23
2015-02-27T14:30:47.000Z
2021-12-02T14:18:34.000Z
django_lightweight_queue/progress_logger.py
thread/django-lightweight-queue
2c67eb13a454fa1a02f8445c26915b6e9261fdad
[ "BSD-3-Clause" ]
1
2015-08-18T12:27:08.000Z
2015-08-18T12:27:08.000Z
from typing import TypeVar, Callable, Iterable, NamedTuple T = TypeVar('T') ProgressLogger = NamedTuple('ProgressLogger', [ ('info', Callable[[str], None]), ('progress', Callable[[Iterable[T]], Iterable[T]]), ]) NULL_PROGRESS_LOGGER = ProgressLogger(lambda x: None, lambda x: x)
26.363636
66
0.696552
from typing import TypeVar, Callable, Iterable, NamedTuple T = TypeVar('T') ProgressLogger = NamedTuple('ProgressLogger', [ ('info', Callable[[str], None]), ('progress', Callable[[Iterable[T]], Iterable[T]]), ]) NULL_PROGRESS_LOGGER = ProgressLogger(lambda x: None, lambda x: x)
true
true
1c3397c90b18c260506989d6c1cb6c79112d4026
82,161
py
Python
slack/web/client.py
sydneyq/Coin-the-Cat
9d24b836941aa9b159d9214f5301e1794bb87c2f
[ "MIT" ]
null
null
null
slack/web/client.py
sydneyq/Coin-the-Cat
9d24b836941aa9b159d9214f5301e1794bb87c2f
[ "MIT" ]
null
null
null
slack/web/client.py
sydneyq/Coin-the-Cat
9d24b836941aa9b159d9214f5301e1794bb87c2f
[ "MIT" ]
null
null
null
"""A Python module for interacting with Slack's Web API.""" import os from asyncio import Future from io import IOBase from typing import Union, List, Optional, Dict import slack.errors as e from slack.web.base_client import BaseClient, SlackResponse from slack.web.classes.views import View class WebClient(BaseClien...
39.768151
120
0.60082
import os from asyncio import Future from io import IOBase from typing import Union, List, Optional, Dict import slack.errors as e from slack.web.base_client import BaseClient, SlackResponse from slack.web.classes.views import View class WebClient(BaseClient): def admin_apps_approve( self, *, app_id: st...
true
true
1c3397cdc024cd5f0e653607da67ecfb3686301f
916
py
Python
aalh_iit_churches_002/populate-subject-column.py
johndewees/iitmigration
4dadfbecda719d6e7d60af076a231aedec3c862f
[ "Unlicense" ]
null
null
null
aalh_iit_churches_002/populate-subject-column.py
johndewees/iitmigration
4dadfbecda719d6e7d60af076a231aedec3c862f
[ "Unlicense" ]
null
null
null
aalh_iit_churches_002/populate-subject-column.py
johndewees/iitmigration
4dadfbecda719d6e7d60af076a231aedec3c862f
[ "Unlicense" ]
null
null
null
from openpyxl import load_workbook filename = 'aalh_iit_churches_002.xlsx' wb = load_workbook(filename) ws = wb['Metadata Template'] minimumcol = 8 maximumcol = 8 minimumrow = 7 maximumrow = 43 iterationrow = 7 descol = 8 subcol = 9 for row in ws.iter_rows(min_row=minimumrow, min_col=minimumcol, max_...
33.925926
105
0.673581
from openpyxl import load_workbook filename = 'aalh_iit_churches_002.xlsx' wb = load_workbook(filename) ws = wb['Metadata Template'] minimumcol = 8 maximumcol = 8 minimumrow = 7 maximumrow = 43 iterationrow = 7 descol = 8 subcol = 9 for row in ws.iter_rows(min_row=minimumrow, min_col=minimumcol, max_...
true
true
1c3397e48e30fc936f6d18f9d7a3a6b56c6b794d
2,551
py
Python
readchip.py
mpratt14/FT232H-flash
bc542460b2bba966db910d21100a3b351c877919
[ "MIT" ]
3
2021-02-11T15:26:02.000Z
2021-07-24T22:03:39.000Z
readchip.py
mpratt14/FT232H-flash
bc542460b2bba966db910d21100a3b351c877919
[ "MIT" ]
null
null
null
readchip.py
mpratt14/FT232H-flash
bc542460b2bba966db910d21100a3b351c877919
[ "MIT" ]
null
null
null
import board as FTDI import busio as Serial import digitalio as GPIO #import time # Variables block_start = 0 numblocks = 256 sector_start = 0 #numsectors = 16 # Configuration CS_pin = FTDI.D7 baudrate = 40000000 # Constants read = 0x03 sector_length = 0x1000 block_sectors = 0x10 sector_pages = 0x10 ...
17.472603
107
0.653469
import board as FTDI import busio as Serial import digitalio as GPIO block_start = 0 numblocks = 256 sector_start = 0 CS_pin = FTDI.D7 baudrate = 40000000 read = 0x03 sector_length = 0x1000 block_sectors = 0x10 sector_pages = 0x10 page_start = 0x00 cell = 0x00 FT232H = Serial.SPI(FTDI.SCLK, FTD...
true
true
1c3398935e4f1c08d4d352959efa3e27f3ac89e5
1,080
py
Python
filereader.py
lotusronin/EmuMan
decc8e4e3299ed5c52cb699ccdf3d8b1c6113adb
[ "MIT" ]
null
null
null
filereader.py
lotusronin/EmuMan
decc8e4e3299ed5c52cb699ccdf3d8b1c6113adb
[ "MIT" ]
null
null
null
filereader.py
lotusronin/EmuMan
decc8e4e3299ed5c52cb699ccdf3d8b1c6113adb
[ "MIT" ]
null
null
null
# File: filereader.py import configparser import os file_name = os.path.dirname(os.path.abspath(__file__)) + "/config.txt" print(file_name) class FileReader: def read_config(self): try : self.config = configparser.ConfigParser() self.config.readfp(open(file_name)) except IOError: print("Config...
20.769231
70
0.67963
import configparser import os file_name = os.path.dirname(os.path.abspath(__file__)) + "/config.txt" print(file_name) class FileReader: def read_config(self): try : self.config = configparser.ConfigParser() self.config.readfp(open(file_name)) except IOError: print("Config file not found.\nMaki...
true
true
1c33991366428f5d52c673c2fea88cb836034b3a
21,097
py
Python
sympy/geometry/tests/test_ellipse.py
CameronKing/sympy
3295b02c617a10ea8db0a070356cc0ba5a3b5121
[ "BSD-3-Clause" ]
2
2019-06-12T16:15:39.000Z
2019-10-06T10:40:59.000Z
sympy/geometry/tests/test_ellipse.py
CameronKing/sympy
3295b02c617a10ea8db0a070356cc0ba5a3b5121
[ "BSD-3-Clause" ]
2
2017-06-29T14:11:05.000Z
2022-01-24T09:28:04.000Z
sympy/geometry/tests/test_ellipse.py
CameronKing/sympy
3295b02c617a10ea8db0a070356cc0ba5a3b5121
[ "BSD-3-Clause" ]
1
2015-09-18T17:27:16.000Z
2015-09-18T17:27:16.000Z
from sympy import Rational, S, Symbol, symbols, pi, sqrt, oo, Point2D, Segment2D, I from sympy.core.compatibility import range from sympy.geometry import (Circle, Ellipse, GeometryError, Line, Point, Polygon, Ray, RegularPolygon, Segment, Triangle, intersection) from sympy.utilities.pytest i...
41.693676
111
0.582026
from sympy import Rational, S, Symbol, symbols, pi, sqrt, oo, Point2D, Segment2D, I from sympy.core.compatibility import range from sympy.geometry import (Circle, Ellipse, GeometryError, Line, Point, Polygon, Ray, RegularPolygon, Segment, Triangle, intersection) from sympy.utilities.pytest i...
true
true
1c33996306856d8ab8db44dd118d4cfa6add1638
8,846
py
Python
tools/sqlmap/plugins/dbms/maxdb/enumeration.py
glaudsonml/kurgan-ai
c0ad4450f9fb2004f35b8a0201bfe894e01adc8f
[ "Apache-2.0" ]
35
2017-05-22T14:42:01.000Z
2020-09-07T21:24:41.000Z
tools/sqlmap/plugins/dbms/maxdb/enumeration.py
tmaxter/kurgan-ai
c0ad4450f9fb2004f35b8a0201bfe894e01adc8f
[ "Apache-2.0" ]
null
null
null
tools/sqlmap/plugins/dbms/maxdb/enumeration.py
tmaxter/kurgan-ai
c0ad4450f9fb2004f35b8a0201bfe894e01adc8f
[ "Apache-2.0" ]
5
2017-12-19T03:36:54.000Z
2021-04-14T18:05:08.000Z
#!/usr/bin/env python """ Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.common import Backend from lib.core.common import randomStr from lib.core.common import readInput from lib.core.common import safeSQLIdentificatorNaming from lib...
37.168067
193
0.587723
from lib.core.common import Backend from lib.core.common import randomStr from lib.core.common import readInput from lib.core.common import safeSQLIdentificatorNaming from lib.core.common import unsafeSQLIdentificatorNaming from lib.core.data import conf from lib.core.data import kb from lib.core.data import logger f...
true
true
1c339b096f870231440fe4df89c70a59a71d8ee8
2,741
py
Python
PSO.py
plenoi/EvoloPy
7c943925b9a73ad671735493ce281b67d178dc7c
[ "Apache-2.0" ]
null
null
null
PSO.py
plenoi/EvoloPy
7c943925b9a73ad671735493ce281b67d178dc7c
[ "Apache-2.0" ]
null
null
null
PSO.py
plenoi/EvoloPy
7c943925b9a73ad671735493ce281b67d178dc7c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun May 15 22:37:00 2016 @author: Hossam Faris """ import random import numpy from colorama import Fore, Back, Style from solution import solution import time def PSO(objf,lb,ub,dim,PopSize,iters): # PSO parameters # dim=30 # iters=200 Vmax=6 # PopSi...
24.256637
92
0.484495
import random import numpy from colorama import Fore, Back, Style from solution import solution import time def PSO(objf,lb,ub,dim,PopSize,iters): Vmax=6 wMax=0.9 wMin=0.2 c1=2 c2=2 s=solution() if not isinstance(lb, list): lb = [lb] * dim if not isinstance(ub, l...
true
true