hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f76401d763e1ce449d6454f1b84a9a8fba616bff
3,112
py
Python
models/spn.py
cankocagil/TT-SRN
83eb03a9393442e6b09aa736862b3a2d5bdcf5b6
[ "Apache-2.0" ]
4
2021-11-18T08:34:54.000Z
2021-12-27T00:49:36.000Z
models/spn.py
cankocagil/TT-SPN
83eb03a9393442e6b09aa736862b3a2d5bdcf5b6
[ "Apache-2.0" ]
1
2021-10-14T06:34:04.000Z
2021-10-14T06:34:04.000Z
models/spn.py
cankocagil/TT-SPN
83eb03a9393442e6b09aa736862b3a2d5bdcf5b6
[ "Apache-2.0" ]
1
2021-12-16T17:28:05.000Z
2021-12-16T17:28:05.000Z
import torch from torch import nn, einsum import torch.nn.functional as F import math from einops import rearrange, repeat from einops.layers.torch import Rearrange from siren.init import siren_uniform_ def sine_init(x): siren_uniform_(x, mode='fan_in', c=6) class Sine(nn.Module): def __init__(s...
30.213592
112
0.579692
import torch from torch import nn, einsum import torch.nn.functional as F import math from einops import rearrange, repeat from einops.layers.torch import Rearrange from siren.init import siren_uniform_ def sine_init(x): siren_uniform_(x, mode='fan_in', c=6) class Sine(nn.Module): def __init__(s...
true
true
f764021876cf05f51de0a4488e6b2e4bea8d538a
2,698
py
Python
tests/env/packages/env_test_bzip2.py
TerraWilly/foxbms-2
62288b333fe6da52deae91f74fb15e71060ac99c
[ "CC-BY-4.0" ]
1
2021-04-11T02:02:28.000Z
2021-04-11T02:02:28.000Z
tests/env/packages/env_test_bzip2.py
TerraWilly/foxbms-2
62288b333fe6da52deae91f74fb15e71060ac99c
[ "CC-BY-4.0" ]
null
null
null
tests/env/packages/env_test_bzip2.py
TerraWilly/foxbms-2
62288b333fe6da52deae91f74fb15e71060ac99c
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @copyright © 2010 - 2021, Fraunhofer-Gesellschaft zur Foerderung der # angewandten Forschung e.V. All rights reserved. # # BSD 3-Clause License # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the fol...
37.472222
79
0.732394
import logging import argparse import bz2 def main(): parser = argparse.ArgumentParser() parser.add_argument( "-v", "--verbosity", dest="verbosity", action="count", default=0, help="set verbosity level", ) args = parser.parse_args() if args.ver...
true
true
f764021ba875888b08e8c0a58bc935aa864e82f4
19,339
py
Python
youtube_dl/extractor/xhamster.py
9Fork/youtube-dl
8a158a936c8b002ef536e9e2b778ded02c09c0fa
[ "Unlicense" ]
null
null
null
youtube_dl/extractor/xhamster.py
9Fork/youtube-dl
8a158a936c8b002ef536e9e2b778ded02c09c0fa
[ "Unlicense" ]
null
null
null
youtube_dl/extractor/xhamster.py
9Fork/youtube-dl
8a158a936c8b002ef536e9e2b778ded02c09c0fa
[ "Unlicense" ]
null
null
null
# coding: utf-8 from __future__ import unicode_literals import itertools import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( clean_html, determine_ext, dict_get, extract_attributes, ExtractorError, float_or_none, int_or_none, parse_duration...
41.678879
117
0.496096
from __future__ import unicode_literals import itertools import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( clean_html, determine_ext, dict_get, extract_attributes, ExtractorError, float_or_none, int_or_none, parse_duration, str_or_non...
true
true
f76402cd2fab9de403c43f0140d664d1ec106575
1,195
py
Python
lm_evaluation/utils.py
hristog/lm-evaluation
233fc16b482f2dcc97a539ad90c5d819be151ce1
[ "Apache-2.0" ]
59
2021-08-11T15:43:43.000Z
2021-12-27T15:18:37.000Z
lm_evaluation/utils.py
hristog/lm-evaluation
233fc16b482f2dcc97a539ad90c5d819be151ce1
[ "Apache-2.0" ]
2
2021-08-11T14:59:43.000Z
2021-08-15T15:41:50.000Z
lm_evaluation/utils.py
hristog/lm-evaluation
233fc16b482f2dcc97a539ad90c5d819be151ce1
[ "Apache-2.0" ]
7
2021-08-11T22:23:45.000Z
2021-12-03T04:09:51.000Z
import os import smart_open import json import re import urllib.request def load_http_text(url): with urllib.request.urlopen(url) as f: return f.read().decode("utf-8") def load_text(path): if path.startswith("http://") or path.startswith("https://"): return load_http_text(path) else: ...
22.980769
84
0.653556
import os import smart_open import json import re import urllib.request def load_http_text(url): with urllib.request.urlopen(url) as f: return f.read().decode("utf-8") def load_text(path): if path.startswith("http://") or path.startswith("https://"): return load_http_text(path) else: ...
true
true
f76404520e16b815a752bf08eba384db8c291044
1,409
py
Python
python/tintin/file/file_manager.py
FootprintAI/tintin-sdk
cc84a1cfeacd0374c098e4f745d8e19815832366
[ "Apache-2.0" ]
null
null
null
python/tintin/file/file_manager.py
FootprintAI/tintin-sdk
cc84a1cfeacd0374c098e4f745d8e19815832366
[ "Apache-2.0" ]
null
null
null
python/tintin/file/file_manager.py
FootprintAI/tintin-sdk
cc84a1cfeacd0374c098e4f745d8e19815832366
[ "Apache-2.0" ]
null
null
null
class FileManagerInterface: """FileManagerInterface defines interface for handling read/write files to its asset/meta storage inside tintin's projects """ def list(self, prefix: str) -> [str]: """list: list all elements (including files and dirs) under the prefix Args: pref...
29.978723
88
0.59049
class FileManagerInterface: def list(self, prefix: str) -> [str]: pass def upload(self, prefix: str, local_dir: str): pass def download(self, dst: str, filepaths: [str], recursive: bool = False):
true
true
f7640498dcd030c01bb9d97888e72e1f8049577e
626
py
Python
examples/undocumented/python/converter_factoranalysis.py
gf712/shogun
ca2afb8f092288455701539aa58952dbf6743378
[ "BSD-3-Clause" ]
2,753
2015-01-02T11:34:13.000Z
2022-03-25T07:04:27.000Z
examples/undocumented/python/converter_factoranalysis.py
gf712/shogun
ca2afb8f092288455701539aa58952dbf6743378
[ "BSD-3-Clause" ]
2,404
2015-01-02T19:31:41.000Z
2022-03-09T10:58:22.000Z
examples/undocumented/python/converter_factoranalysis.py
gf712/shogun
ca2afb8f092288455701539aa58952dbf6743378
[ "BSD-3-Clause" ]
1,156
2015-01-03T01:57:21.000Z
2022-03-26T01:06:28.000Z
#!/usr/bin/env python data = '../data/fm_train_real.dat' parameter_list = [[data]] def converter_factoranalysis(data_fname): try: import numpy from shogun import FactorAnalysis, EuclideanDistance, CSVFile features = sg.create_features(CSVFile(data_fname)) converter = FactorAnalysis() converter.set_target_...
24.076923
63
0.755591
data = '../data/fm_train_real.dat' parameter_list = [[data]] def converter_factoranalysis(data_fname): try: import numpy from shogun import FactorAnalysis, EuclideanDistance, CSVFile features = sg.create_features(CSVFile(data_fname)) converter = FactorAnalysis() converter.set_target_dim(2) embedding = c...
true
true
f76404d3e617f87bddce213b26900e1ad231d234
11,322
py
Python
argocd_python_client/model/repository_helm_charts_response.py
RyanSiu1995/argocd-python-client
2e8f097fe09f247a46ac70692241a93d1acd076a
[ "MIT" ]
1
2021-11-20T13:37:43.000Z
2021-11-20T13:37:43.000Z
argocd_python_client/model/repository_helm_charts_response.py
RyanSiu1995/argocd-python-client
2e8f097fe09f247a46ac70692241a93d1acd076a
[ "MIT" ]
null
null
null
argocd_python_client/model/repository_helm_charts_response.py
RyanSiu1995/argocd-python-client
2e8f097fe09f247a46ac70692241a93d1acd076a
[ "MIT" ]
null
null
null
""" Consolidate Services Description of all APIs # noqa: E501 The version of the OpenAPI document: version not set Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from argocd_python_client.model_utils import ( # noqa: F401 ApiTypeError, Mo...
43.21374
121
0.575958
import re import sys from argocd_python_client.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) ...
true
true
f764068d5d38f6080126afc3559af8acd5f5bd1e
6,054
py
Python
runners/bisim/lehnert_gridworld/LehnertGridworldExactPartition.py
ondrejba/discrete_abstractions
444def53ae2ca6c8a5b5b453448f7c4bbaba07e1
[ "MIT" ]
6
2020-09-14T22:48:00.000Z
2021-12-11T04:14:07.000Z
runners/bisim/lehnert_gridworld/LehnertGridworldExactPartition.py
ondrejba/discrete_abstractions
444def53ae2ca6c8a5b5b453448f7c4bbaba07e1
[ "MIT" ]
null
null
null
runners/bisim/lehnert_gridworld/LehnertGridworldExactPartition.py
ondrejba/discrete_abstractions
444def53ae2ca6c8a5b5b453448f7c4bbaba07e1
[ "MIT" ]
null
null
null
import copy as cp import numpy as np from envs.lehnert_gridworld import LehnertGridworld from model.LehnertGridworldModel import LehnertGridworldModel from runners.runner import Runner import config_constants as cc import vis_utils from model.cluster import Cluster from utils.dataset import ArrayDataset import constan...
32.548387
113
0.649323
import copy as cp import numpy as np from envs.lehnert_gridworld import LehnertGridworld from model.LehnertGridworldModel import LehnertGridworldModel from runners.runner import Runner import config_constants as cc import vis_utils from model.cluster import Cluster from utils.dataset import ArrayDataset import constan...
true
true
f764069110bce7657f3929e9e2e6d0c723adbc5e
4,933
py
Python
arkanoid.py
andrewKv/pythonGraphicsPrograms
a24b3e56e729820f191fed58c2a01aa9b947a7b6
[ "MIT" ]
null
null
null
arkanoid.py
andrewKv/pythonGraphicsPrograms
a24b3e56e729820f191fed58c2a01aa9b947a7b6
[ "MIT" ]
null
null
null
arkanoid.py
andrewKv/pythonGraphicsPrograms
a24b3e56e729820f191fed58c2a01aa9b947a7b6
[ "MIT" ]
null
null
null
from graphics import * from functionLibrary import * WALL_THICKNESS = 5 BAT_Y = 10 BAT_THICKNESS = 2 BAT_WIDTH = 20 # works with 15, 10 for increased difficulty BLOCK_HEIGHT = 2 # can easily be glitched through with a faster ball speed BLOCK_ROWS = 2 # max 3 without reducing spacing in makeBlocks BLOCK...
36.007299
279
0.61869
from graphics import * from functionLibrary import * WALL_THICKNESS = 5 BAT_Y = 10 BAT_THICKNESS = 2 BAT_WIDTH = 20 BLOCK_HEIGHT = 2 BLOCK_ROWS = 2 BLOCKS_PER_ROW = 16 BALL_RADIUS = 1 def drawRectangle(win, point1, point2, colour): rectangle = Rectangle(point1, point2) rectangle.setFill(colour...
true
true
f76408a3cc31400dff1c07ef03d3ff5baa6d6f07
1,692
py
Python
solum/tests/api/camp/v1_1/test_extensions.py
openstack/solum
0a744883ca00a0ee80e1b6840ac42a78fc397450
[ "Apache-2.0" ]
39
2015-09-26T01:30:52.000Z
2021-05-20T23:37:43.000Z
solum/tests/api/camp/v1_1/test_extensions.py
openstack/solum
0a744883ca00a0ee80e1b6840ac42a78fc397450
[ "Apache-2.0" ]
null
null
null
solum/tests/api/camp/v1_1/test_extensions.py
openstack/solum
0a744883ca00a0ee80e1b6840ac42a78fc397450
[ "Apache-2.0" ]
30
2015-10-25T18:06:39.000Z
2020-01-14T12:14:06.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
40.285714
77
0.75
from unittest import mock from solum.api.controllers.camp.v1_1 import extensions from solum import objects from solum.tests import base from solum.tests import fakes @mock.patch('pecan.request', new_callable=fakes.FakePecanRequest) @mock.patch('pecan.response', new_callable=fakes.FakePecanResponse) @mock.patch('sol...
true
true
f7640a97c64d6eca965de5ffe788c3c03dd0dd13
587
py
Python
microdf/tests/test_inequality.py
MaxGhenis/taxcalc-helpers
85d2739d1c96882424cb51ef1806c9e51f88c085
[ "MIT" ]
5
2020-09-24T14:09:18.000Z
2021-12-20T12:10:59.000Z
microdf/tests/test_inequality.py
MaxGhenis/taxcalc-helpers
85d2739d1c96882424cb51ef1806c9e51f88c085
[ "MIT" ]
81
2020-09-08T18:40:08.000Z
2022-01-03T16:47:48.000Z
microdf/tests/test_inequality.py
MaxGhenis/taxcalc-helpers
85d2739d1c96882424cb51ef1806c9e51f88c085
[ "MIT" ]
6
2020-09-08T18:29:36.000Z
2021-04-01T18:31:42.000Z
import microdf as mdf import pandas as pd def test_top_pct(): x = list(range(1, 11)) # 1 to 10. Sum = 10 * 11 / 2 = 55. df = pd.DataFrame({"x": x}) ms = mdf.MicroSeries(x) RES = 10 / 55 assert mdf.top_10_pct_share(df, "x") == RES assert ms.top_10_pct_share() == RES x = list(range(1, 4)) ...
27.952381
62
0.565588
import microdf as mdf import pandas as pd def test_top_pct(): x = list(range(1, 11)) df = pd.DataFrame({"x": x}) ms = mdf.MicroSeries(x) RES = 10 / 55 assert mdf.top_10_pct_share(df, "x") == RES assert ms.top_10_pct_share() == RES x = list(range(1, 4)) df = pd.DataFrame({"x": x, "w":...
true
true
f7640af3624195396280197e750aa68688d3ded8
35
py
Python
vnpy/gateway/ctp/__init__.py
funrunskypalace/vnpy
2d87aede685fa46278d8d3392432cc127b797926
[ "MIT" ]
323
2015-11-21T14:45:29.000Z
2022-03-16T08:54:37.000Z
vnpy/gateway/ctp/__init__.py
funrunskypalace/vnpy
2d87aede685fa46278d8d3392432cc127b797926
[ "MIT" ]
15
2021-04-28T03:07:30.000Z
2022-03-24T00:05:41.000Z
vnpy/gateway/ctp/__init__.py
funrunskypalace/vnpy
2d87aede685fa46278d8d3392432cc127b797926
[ "MIT" ]
148
2016-09-26T03:25:39.000Z
2022-02-06T14:43:48.000Z
from .ctp_gateway import CtpGateway
35
35
0.885714
from .ctp_gateway import CtpGateway
true
true
f7640b62ae4ff6f0db989a9cf64281888aa2d420
2,535
py
Python
sdk/core/azure-core/setup.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
1
2021-06-02T08:01:35.000Z
2021-06-02T08:01:35.000Z
sdk/core/azure-core/setup.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
null
null
null
sdk/core/azure-core/setup.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
null
null
null
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #----------------------------------------------------------------...
34.256757
88
0.596844
import re import os.path from io import open from setuptools import find_packages, setup PACKAGE_NAME = "azure-core" PACKAGE_PPRINT_NAME = "Core" package_folder_path = PACKAGE_NAME.replace('-', '/') namespace_name = PACKAGE_NAME.replace('-', '.') with open(os.path.join(package_folder_path, '_version.py'), 'r') as...
true
true
f7640bd9d0c99b5a00681b5bfa0bbb1b536d44d4
197
py
Python
oo/teste_carro.py
heltersilva/pythonbirds
f9a9de20d84dd2ceedd6d8a9af1a2526d8d56718
[ "MIT" ]
null
null
null
oo/teste_carro.py
heltersilva/pythonbirds
f9a9de20d84dd2ceedd6d8a9af1a2526d8d56718
[ "MIT" ]
null
null
null
oo/teste_carro.py
heltersilva/pythonbirds
f9a9de20d84dd2ceedd6d8a9af1a2526d8d56718
[ "MIT" ]
null
null
null
from unittest import TestCase from oo.carro import Motor class CarroTesteCase(TestCase): def teste_velocidade_inicial(self): motor=Motor() self.assertEqual(0, motor.velocidade)
28.142857
45
0.746193
from unittest import TestCase from oo.carro import Motor class CarroTesteCase(TestCase): def teste_velocidade_inicial(self): motor=Motor() self.assertEqual(0, motor.velocidade)
true
true
f7640c41c1ccf8d469e44d6b3fe0c08e77c869f5
9,972
py
Python
auth/database/Models.py
marianoleonardo/auth
2e2e50e1cd6f224c9551ca57c25beda6b956cb4e
[ "Apache-2.0" ]
2
2017-10-16T12:03:32.000Z
2020-10-28T02:51:09.000Z
auth/database/Models.py
marianoleonardo/auth
2e2e50e1cd6f224c9551ca57c25beda6b956cb4e
[ "Apache-2.0" ]
33
2017-10-05T19:43:17.000Z
2022-02-25T13:22:05.000Z
auth/database/Models.py
marianoleonardo/auth
2e2e50e1cd6f224c9551ca57c25beda6b956cb4e
[ "Apache-2.0" ]
22
2017-08-23T13:35:42.000Z
2021-11-25T16:32:14.000Z
from sqlalchemy.orm.exc import NoResultFound from sqlalchemy import Column, String, Integer, DateTime from sqlalchemy import ForeignKey, Enum, PrimaryKeyConstraint from sqlalchemy.orm import relationship import enum import datetime import kongUtils from .inputConf import UserLimits, PermissionLimits, GroupLimits from...
35.361702
104
0.629563
from sqlalchemy.orm.exc import NoResultFound from sqlalchemy import Column, String, Integer, DateTime from sqlalchemy import ForeignKey, Enum, PrimaryKeyConstraint from sqlalchemy.orm import relationship import enum import datetime import kongUtils from .inputConf import UserLimits, PermissionLimits, GroupLimits from...
true
true
f7640cf8fa094d469004d766ca428d710895a265
3,994
py
Python
neutron/api/rpc/agentnotifiers/metering_rpc_agent_api.py
insequent/neutron
2b1c4f121e3e8ba1c5eb2ba6661bf6326e1507c5
[ "Apache-2.0" ]
null
null
null
neutron/api/rpc/agentnotifiers/metering_rpc_agent_api.py
insequent/neutron
2b1c4f121e3e8ba1c5eb2ba6661bf6326e1507c5
[ "Apache-2.0" ]
null
null
null
neutron/api/rpc/agentnotifiers/metering_rpc_agent_api.py
insequent/neutron
2b1c4f121e3e8ba1c5eb2ba6661bf6326e1507c5
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
40.755102
75
0.663746
from oslo_log import log as logging import oslo_messaging from neutron.common import constants from neutron.common import rpc as n_rpc from neutron.common import topics from neutron.common import utils from neutron import manager from neutron.plugins.common import constants as service_constants LOG = logging.getLogg...
true
true
f7640d787207c9be382a6eff6e96d46556741b5e
250
py
Python
shm_tools/shm-editor/configure.py
cuauv/software
5ad4d52d603f81a7f254f365d9b0fe636d03a260
[ "BSD-3-Clause" ]
70
2015-11-16T18:04:01.000Z
2022-03-05T09:04:02.000Z
shm_tools/shm-editor/configure.py
cuauv/software
5ad4d52d603f81a7f254f365d9b0fe636d03a260
[ "BSD-3-Clause" ]
1
2016-08-03T05:13:19.000Z
2016-08-03T06:19:39.000Z
shm_tools/shm-editor/configure.py
cuauv/software
5ad4d52d603f81a7f254f365d9b0fe636d03a260
[ "BSD-3-Clause" ]
34
2015-12-15T17:29:23.000Z
2021-11-18T14:15:12.000Z
#!/usr/bin/env python3 from build import ninja_common build = ninja_common.Build('shm_tools/shm-editor') build.install('auv-shm-editor', f='shm_tools/shm-editor/auv-shm-editor.py') build.install('auv-plot', f='shm_tools/shm-editor/shm_plotter.py')
31.25
75
0.764
from build import ninja_common build = ninja_common.Build('shm_tools/shm-editor') build.install('auv-shm-editor', f='shm_tools/shm-editor/auv-shm-editor.py') build.install('auv-plot', f='shm_tools/shm-editor/shm_plotter.py')
true
true
f7640da42683b6fa666e2e9f252b2a4f6a180d3f
6,727
py
Python
appengine/predator/analysis/linear/changelist_features/touch_crashed_directory.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
2
2021-04-13T21:22:18.000Z
2021-09-07T02:11:57.000Z
appengine/predator/analysis/linear/changelist_features/touch_crashed_directory.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
21
2020-09-06T02:41:05.000Z
2022-03-02T04:40:01.000Z
appengine/predator/analysis/linear/changelist_features/touch_crashed_directory.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from collections import defaultdict from collections import namedtuple import logging import math import os import re from analysis import crash_util from a...
34.854922
80
0.694217
from collections import defaultdict from collections import namedtuple import logging import math import os import re from analysis import crash_util from analysis.crash_match import CrashedDirectory from analysis.linear.feature import Feature from analysis.linear.feature import FeatureValue from libs.gitiles.diff im...
true
true
f7640dd716bbc4e0653c1ad225bfb12ccc97959f
1,933
py
Python
tests/textunits/test_bosyl.py
Esukhia/botok
9009581cc290c800e7d93a405969e10a7c9d2f51
[ "Apache-2.0" ]
17
2019-10-19T15:29:52.000Z
2022-03-01T19:43:15.000Z
tests/textunits/test_bosyl.py
drupchen/pybo
eac38e7c574e2e99a4f43ca641782d8616bb684d
[ "Apache-2.0" ]
29
2019-09-01T21:33:15.000Z
2022-01-11T08:57:50.000Z
tests/textunits/test_bosyl.py
Esukhia/botok
9009581cc290c800e7d93a405969e10a7c9d2f51
[ "Apache-2.0" ]
8
2020-01-14T17:45:11.000Z
2022-03-28T09:31:35.000Z
# coding: utf8 from botok import BoSyl bs = BoSyl() def test_bosyl(): # is_affixable() Vs. SylComponents.is_thame() assert bs.is_thame("ཀུན") is False and bs.is_affixable("ཀུན") is False assert bs.is_thame("དེའིའམ") is True and bs.is_affixable("དེའིའམ") is False assert bs.is_thame("དེའི") is True and...
41.12766
79
0.457838
from botok import BoSyl bs = BoSyl() def test_bosyl(): assert bs.is_thame("ཀུན") is False and bs.is_affixable("ཀུན") is False assert bs.is_thame("དེའིའམ") is True and bs.is_affixable("དེའིའམ") is False assert bs.is_thame("དེའི") is True and bs.is_affixable("དེའི") is False assert bs.is_thame("ང")...
true
true
f7640def4dfd70500881e3c9ae8b1b81f0b59032
702
py
Python
quantidade de horas e valor do salario.py
marcelocmedeiros/EstruturaSequencial
52948b594d4057037fef32db115c95612b1dcd7b
[ "MIT" ]
null
null
null
quantidade de horas e valor do salario.py
marcelocmedeiros/EstruturaSequencial
52948b594d4057037fef32db115c95612b1dcd7b
[ "MIT" ]
null
null
null
quantidade de horas e valor do salario.py
marcelocmedeiros/EstruturaSequencial
52948b594d4057037fef32db115c95612b1dcd7b
[ "MIT" ]
null
null
null
# Marcelo Campos de Medeiros # ADS UNIFIP 2020.1 # Patos-PB 17/03/2020 ''' Faça um Programa que pergunte quanto você ganha por hora e o número de horas trabalhadas no mês. Calcule e mostre o total do seu salário no referido mês. ''' print('='*53) print('PROGRAMA DO VALOR DO SÁLARIO PELAS HORAS DE TRABALHO') print('='...
29.25
69
0.723647
print('='*53) print('PROGRAMA DO VALOR DO SÁLARIO PELAS HORAS DE TRABALHO') print('='*53,'\n') print('='*45) hora_valor = float(input('Digite o valor de uma hora de trabalho: ')) horas_trab = float(input('Qual a quantidade de hora que trabalho: ')) print('='*45, '\n') salario = hora_valor * horas_trab print(f'O valo...
true
true
f7640f50d6d6cf5fdc1e071e2358cda3d2fa8e5b
786
py
Python
scripts/miko/m51.py
acepj60/MkCheck
7765cfad3e7ef198945fa2fe70c1b3cb8f9e5290
[ "Unlicense" ]
1
2021-11-06T23:02:22.000Z
2021-11-06T23:02:22.000Z
scripts/miko/m51.py
whiterabb17/MkCheck
567ab17743209e08e5d8d391a8eaf217cb0dd3c5
[ "Unlicense" ]
null
null
null
scripts/miko/m51.py
whiterabb17/MkCheck
567ab17743209e08e5d8d391a8eaf217cb0dd3c5
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python import paramiko import time import os host = "127.0.0.1" port = 22 username = "admin" # CHANGE THIS password = "admin" # CHANGE THIS apname = "/system identity print" # Change this for a different command to be run p = paramiko.SSHClient() p.set_missing_host_key_policy(paramiko.AutoAddPolicy()...
26.2
168
0.64631
import paramiko import time import os host = "127.0.0.1" port = 22 username = "admin" password = "admin" apname = "/system identity print" p = paramiko.SSHClient() p.set_missing_host_key_policy(paramiko.AutoAddPolicy()) p.connect(host, port, username, password) remote_connection = p.invoke_shell() time.sleep(5) ou...
true
true
f7640fbe7ecba5b2f4add917c386edc301b50d08
607
py
Python
ucp/exceptions.py
madsbk/ucx-py
9946db226bf090f4f097714d681f267da848a7c9
[ "BSD-3-Clause" ]
null
null
null
ucp/exceptions.py
madsbk/ucx-py
9946db226bf090f4f097714d681f267da848a7c9
[ "BSD-3-Clause" ]
null
null
null
ucp/exceptions.py
madsbk/ucx-py
9946db226bf090f4f097714d681f267da848a7c9
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved. # See file LICENSE for terms. import contextlib import logging @contextlib.contextmanager def log_errors(reraise_exception=False): try: yield except BaseException as e: logging.exception(e) if reraise_exception: ...
15.175
67
0.716639
import contextlib import logging @contextlib.contextmanager def log_errors(reraise_exception=False): try: yield except BaseException as e: logging.exception(e) if reraise_exception: raise class UCXBaseException(Exception): pass class UCXError(UCXBaseException): ...
true
true
f764128daf053cb8d2443dc43756af84601c0263
29,632
py
Python
cueadmin/tests/common_tests.py
srbhss/OpenCue
c0b8aeab0ea324c3c46541d98b4a968230c668eb
[ "Apache-2.0" ]
null
null
null
cueadmin/tests/common_tests.py
srbhss/OpenCue
c0b8aeab0ea324c3c46541d98b4a968230c668eb
[ "Apache-2.0" ]
2
2019-10-02T23:58:20.000Z
2020-03-30T19:18:48.000Z
cueadmin/tests/common_tests.py
srbhss/OpenCue
c0b8aeab0ea324c3c46541d98b4a968230c668eb
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2018 Sony Pictures Imageworks 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 req...
36.809938
101
0.637554
from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import str import mock import unittest import opencue.compiled_proto.facility_pb2 import opencue.compiled_proto.host_pb2 import opencue.compiled_proto.job_pb2 import opencue.compiled_proto.ser...
true
true
f7641293bb6f277f99bc834ca12fd48c7b7ed466
2,037
py
Python
glance/tests/functional/db/test_rpc_endpoint.py
komawar/glance
e550cac697dd8c78e837c6884f599ac6ee2137ae
[ "Apache-2.0" ]
null
null
null
glance/tests/functional/db/test_rpc_endpoint.py
komawar/glance
e550cac697dd8c78e837c6884f599ac6ee2137ae
[ "Apache-2.0" ]
null
null
null
glance/tests/functional/db/test_rpc_endpoint.py
komawar/glance
e550cac697dd8c78e837c6884f599ac6ee2137ae
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
36.375
78
0.670103
import requests from glance.openstack.common import jsonutils from glance.tests import functional class TestRegistryURLVisibility(functional.FunctionalTest): def setUp(self): super(TestRegistryURLVisibility, self).setUp() self.cleanup() self.registry_server.deployment_flavor = '' ...
true
true
f7641297a3d0f9f042790049248d07b1b51c321a
1,040
py
Python
wapyce/accessibility/api/views.py
wapyce/wapyce
abd8c85f40387aefa2a2e37ca44296ef086016a6
[ "MIT" ]
null
null
null
wapyce/accessibility/api/views.py
wapyce/wapyce
abd8c85f40387aefa2a2e37ca44296ef086016a6
[ "MIT" ]
null
null
null
wapyce/accessibility/api/views.py
wapyce/wapyce
abd8c85f40387aefa2a2e37ca44296ef086016a6
[ "MIT" ]
null
null
null
""" Views of API accessibility application. """ from rest_framework.exceptions import PermissionDenied from rest_framework.generics import CreateAPIView from wapyce.accessibility.models import IssueCode from wapyce.accessibility.models import IssuePage from .serializers import IssuePageSerializer class NewIssueAPIVi...
29.714286
78
0.704808
from rest_framework.exceptions import PermissionDenied from rest_framework.generics import CreateAPIView from wapyce.accessibility.models import IssueCode from wapyce.accessibility.models import IssuePage from .serializers import IssuePageSerializer class NewIssueAPIView(CreateAPIView): queryset = IssuePage.obj...
true
true
f76412bd07061bc06c6692eefba0c7612fcd45eb
4,063
py
Python
intcode/screen.py
alu-/advent-of-code-2019
117fc49cb6e89e6302cfbd64b1c3d58f21b47378
[ "MIT" ]
null
null
null
intcode/screen.py
alu-/advent-of-code-2019
117fc49cb6e89e6302cfbd64b1c3d58f21b47378
[ "MIT" ]
null
null
null
intcode/screen.py
alu-/advent-of-code-2019
117fc49cb6e89e6302cfbd64b1c3d58f21b47378
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import itertools import curses from enum import Enum from collections import defaultdict class Tiles(Enum): EMPTY = 0 WALL = 1 BLOCK = 2 PADDLE = 3 BALL = 4 def getTexture(self): textures = { 0: "", 1: "|", 2: "█", ...
28.612676
80
0.479203
import itertools import curses from enum import Enum from collections import defaultdict class Tiles(Enum): EMPTY = 0 WALL = 1 BLOCK = 2 PADDLE = 3 BALL = 4 def getTexture(self): textures = { 0: "", 1: "|", 2: "█", 3: "▁", ...
true
true
f76412c4b36072ebf18d33501dbc7bf5003dcc4d
11,841
py
Python
tensorflow_probability/python/distributions/joint_distribution_vmap_mixin.py
hendriksanta/probability
6eedc0f01a539b3bee7be28ccd2a9cce15d92f7f
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/distributions/joint_distribution_vmap_mixin.py
hendriksanta/probability
6eedc0f01a539b3bee7be28ccd2a9cce15d92f7f
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/distributions/joint_distribution_vmap_mixin.py
hendriksanta/probability
6eedc0f01a539b3bee7be28ccd2a9cce15d92f7f
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
43.058182
103
0.712186
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v2 as tf from tensorflow_probability.python.bijectors import bijector as bijector_lib from tensorflow_probability.python.distributions import joint_distribution as joint_distribution_...
true
true
f76414444b173f62ba06e85561fe30ce512e12fa
2,655
py
Python
diskover_gource.py
severin83/diskover
87bddceca54af1e8fa1969962d48949277889904
[ "Apache-2.0" ]
5
2021-06-24T11:19:00.000Z
2021-11-01T11:12:39.000Z
diskover_gource.py
Suika/diskover
348653383f0a5d62d0c797f6046eb678510059f1
[ "Apache-2.0" ]
null
null
null
diskover_gource.py
Suika/diskover
348653383f0a5d62d0c797f6046eb678510059f1
[ "Apache-2.0" ]
7
2021-01-20T16:30:02.000Z
2021-11-08T12:57:56.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """diskover - Elasticsearch file system crawler diskover is a file system crawler that index's your file metadata into Elasticsearch. See README.md or https://github.com/shirosaidev/diskover for more information. Copyright (C) Chris Park 2017 diskover is released under the...
31.987952
87
0.512994
from diskover import config from datetime import datetime import time import sys import os def gource(es, cliargs): if cliargs['gourcert']: data = { "sort": { "indexing_date": { "order": "asc" } } } elif cliargs['gou...
true
true
f76414684532be36e06995000b6e58be2d68e356
2,808
py
Python
cime/scripts/lib/CIME/SystemTests/erio.py
od2020/E3SM
f37bf3e054b3d12ec77191c0463b7bcd0b75db04
[ "FTL", "zlib-acknowledgement", "RSA-MD" ]
null
null
null
cime/scripts/lib/CIME/SystemTests/erio.py
od2020/E3SM
f37bf3e054b3d12ec77191c0463b7bcd0b75db04
[ "FTL", "zlib-acknowledgement", "RSA-MD" ]
null
null
null
cime/scripts/lib/CIME/SystemTests/erio.py
od2020/E3SM
f37bf3e054b3d12ec77191c0463b7bcd0b75db04
[ "FTL", "zlib-acknowledgement", "RSA-MD" ]
1
2020-07-10T21:09:35.000Z
2020-07-10T21:09:35.000Z
""" ERIO tests restart with different PIO methods This class inherits from SystemTestsCommon """ from CIME.XML.standard_module_setup import * from CIME.SystemTests.system_tests_common import SystemTestsCommon logger = logging.getLogger(__name__) class ERIO(SystemTestsCommon): def __init__(self, case): "...
41.294118
161
0.652422
from CIME.XML.standard_module_setup import * from CIME.SystemTests.system_tests_common import SystemTestsCommon logger = logging.getLogger(__name__) class ERIO(SystemTestsCommon): def __init__(self, case): SystemTestsCommon.__init__(self, case, expected=["TEST"]) self._pio_types = self._case.get...
true
true
f76414f979570d24abfbf6bbffa0685d4769ccfa
766
py
Python
core/migrations/0013_auto_20210411_0141.py
tweeprint/api.tweeprint.com
248525f2cffffb20765e7eca1e7a63f359adfc1b
[ "MIT" ]
1
2021-03-15T07:24:10.000Z
2021-03-15T07:24:10.000Z
core/migrations/0013_auto_20210411_0141.py
tweeprint/api.tweeprint.com
248525f2cffffb20765e7eca1e7a63f359adfc1b
[ "MIT" ]
1
2021-04-11T01:22:24.000Z
2021-04-11T01:22:24.000Z
core/migrations/0013_auto_20210411_0141.py
tweeprint/api.tweeprint.com
248525f2cffffb20765e7eca1e7a63f359adfc1b
[ "MIT" ]
null
null
null
# Generated by Django 3.2 on 2021-04-11 00:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0012_auto_20210411_0140'), ] operations = [ migrations.RemoveField( model_name='tweeprint', name='tweet_author...
24.709677
76
0.571802
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0012_auto_20210411_0140'), ] operations = [ migrations.RemoveField( model_name='tweeprint', name='tweet_author_name', ), migrations.RemoveFi...
true
true
f76415585b47d703ed8b92d2c55cc5344f439277
5,719
py
Python
gcd_tools.py
NathanDunfield/montesinos
5521c6e9a3f319ec4925baf224ba18cbb673dabb
[ "CC0-1.0" ]
null
null
null
gcd_tools.py
NathanDunfield/montesinos
5521c6e9a3f319ec4925baf224ba18cbb673dabb
[ "CC0-1.0" ]
null
null
null
gcd_tools.py
NathanDunfield/montesinos
5521c6e9a3f319ec4925baf224ba18cbb673dabb
[ "CC0-1.0" ]
null
null
null
# computes the gcd. taken from snappea from functools import total_ordering import re def gcd(a, b): a = abs(a) b = abs(b) if a == 0: if b == 0: raise ValueError("gcd(0,0) undefined.") else: return b while 1: b = b % a if (b == 0): return a a = a % b ...
25.761261
76
0.522119
from functools import total_ordering import re def gcd(a, b): a = abs(a) b = abs(b) if a == 0: if b == 0: raise ValueError("gcd(0,0) undefined.") else: return b while 1: b = b % a if (b == 0): return a a = a % b if (a == 0): return b def euclidean_a...
true
true
f764159182d96970baf6263c056c92ba7acd3593
742
py
Python
scripts/generate_requirements_from_setup.py
rpitonak/azure-batch-load
dc18761b89b9d2777e4041e90e753ca634f9c24d
[ "Apache-2.0" ]
9
2021-04-26T13:43:33.000Z
2022-03-11T08:26:14.000Z
scripts/generate_requirements_from_setup.py
zypp-io/unit4
c469be3378252e6ac6807653c9df845f332b009c
[ "MIT" ]
10
2020-12-10T17:14:01.000Z
2022-03-20T16:51:55.000Z
scripts/generate_requirements_from_setup.py
zypp-io/zyppnotify
dfb6365966be9cab30eeed7211f50fe8439fddeb
[ "MIT" ]
2
2022-02-01T16:09:25.000Z
2022-03-11T13:02:20.000Z
import os import pathlib from setuptools.config import read_configuration def get_config(): repo_path = pathlib.Path(__file__).parent.parent.absolute() config_setup = read_configuration(os.path.join(repo_path, "setup.cfg")) config_requirements = config_setup["options"]["install_requires"] return con...
26.5
118
0.730458
import os import pathlib from setuptools.config import read_configuration def get_config(): repo_path = pathlib.Path(__file__).parent.parent.absolute() config_setup = read_configuration(os.path.join(repo_path, "setup.cfg")) config_requirements = config_setup["options"]["install_requires"] return con...
true
true
f76415c660b80de46b67983a62ab66d9f9bc5dbb
115
py
Python
scrape.py
TravisMadill/ca-law-scraper
ae9b8d4241bbbb1aafcdee67c7dc41f3466bc121
[ "MIT" ]
null
null
null
scrape.py
TravisMadill/ca-law-scraper
ae9b8d4241bbbb1aafcdee67c7dc41f3466bc121
[ "MIT" ]
null
null
null
scrape.py
TravisMadill/ca-law-scraper
ae9b8d4241bbbb1aafcdee67c7dc41f3466bc121
[ "MIT" ]
1
2020-05-14T13:43:57.000Z
2020-05-14T13:43:57.000Z
from bs4 import BeautifulSoup with open("A-1.xml") as fp: soup = BeautifulSoup(fp, 'xml') print(soup.Statute)
12.777778
32
0.704348
from bs4 import BeautifulSoup with open("A-1.xml") as fp: soup = BeautifulSoup(fp, 'xml') print(soup.Statute)
true
true
f764169b78923c9c500b543c8b75140c5e0bf33e
488
py
Python
bestiary/migrations/0014_monster_awakening.py
Itori/swarfarm
7192e2d8bca093b4254023bbec42b6a2b1887547
[ "Apache-2.0" ]
66
2017-09-11T04:46:00.000Z
2021-03-13T00:02:42.000Z
bestiary/migrations/0014_monster_awakening.py
Itori/swarfarm
7192e2d8bca093b4254023bbec42b6a2b1887547
[ "Apache-2.0" ]
133
2017-09-24T21:28:59.000Z
2021-04-02T10:35:31.000Z
bestiary/migrations/0014_monster_awakening.py
Itori/swarfarm
7192e2d8bca093b4254023bbec42b6a2b1887547
[ "Apache-2.0" ]
28
2017-08-30T19:04:32.000Z
2020-11-16T04:09:00.000Z
# Generated by Django 2.1.7 on 2019-06-14 04:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('bestiary', '0013_auto_20190529_1253'), ] operations = [ migrations.AddField( model_name='monster', name='awakening',...
25.684211
149
0.612705
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('bestiary', '0013_auto_20190529_1253'), ] operations = [ migrations.AddField( model_name='monster', name='awakening', field=models.IntegerField(choices=[...
true
true
f76416fa28190a8fac9f20f2af2054ed53c030b5
9,081
py
Python
rlkit/torch/sac/diayn/diayn_cont.py
vincentlui/unsupervised-goal-conditioned-rl
4f2e6938e072cb52f8ee779a939fe7bf6a980d45
[ "MIT" ]
null
null
null
rlkit/torch/sac/diayn/diayn_cont.py
vincentlui/unsupervised-goal-conditioned-rl
4f2e6938e072cb52f8ee779a939fe7bf6a980d45
[ "MIT" ]
null
null
null
rlkit/torch/sac/diayn/diayn_cont.py
vincentlui/unsupervised-goal-conditioned-rl
4f2e6938e072cb52f8ee779a939fe7bf6a980d45
[ "MIT" ]
null
null
null
from collections import OrderedDict import math import numpy as np import torch import torch.optim as optim from torch import nn as nn import torch.nn.functional as F import rlkit.torch.pytorch_util as ptu from rlkit.core.eval_util import create_stats_ordered_dict from rlkit.torch.torch_rl_algorithm import TorchTrain...
33.263736
127
0.580333
from collections import OrderedDict import math import numpy as np import torch import torch.optim as optim from torch import nn as nn import torch.nn.functional as F import rlkit.torch.pytorch_util as ptu from rlkit.core.eval_util import create_stats_ordered_dict from rlkit.torch.torch_rl_algorithm import TorchTrain...
true
true
f76418e561aae8873aaae505edf128a60e58f38a
70,016
py
Python
intersight/model/compute_base_cluster_relationship.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
5
2021-12-16T15:13:32.000Z
2022-03-29T16:09:54.000Z
intersight/model/compute_base_cluster_relationship.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
4
2022-01-25T19:05:51.000Z
2022-03-29T20:18:37.000Z
intersight/model/compute_base_cluster_relationship.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
2
2020-07-07T15:01:08.000Z
2022-01-31T04:27:35.000Z
""" 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 environments in more advan...
62.458519
1,678
0.658135
import re import sys from intersight.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) def lazy_...
true
true
f7641bf16558b709ffc0e65f99e6c4afaec45ff6
386
py
Python
src/download_stories.py
Vemestael/gerrel_insta_bot
0a0d2a585b1fc956b115802bd7049c5eae7bd1e0
[ "MIT" ]
1
2021-11-02T18:28:55.000Z
2021-11-02T18:28:55.000Z
src/download_stories.py
HanGerrel/gerrel_insta_bot
0a0d2a585b1fc956b115802bd7049c5eae7bd1e0
[ "MIT" ]
null
null
null
src/download_stories.py
HanGerrel/gerrel_insta_bot
0a0d2a585b1fc956b115802bd7049c5eae7bd1e0
[ "MIT" ]
null
null
null
import instaloader import os class InstaStories(): def __init__(self): self.obj = instaloader.Instaloader(save_metadata=False, filename_pattern="{owner_username}_{date_utc}", download_video_thumbnails='') self.obj.load_session_from_file(os.getenv('SESSION_NAME')) def upda...
32.166667
89
0.694301
import instaloader import os class InstaStories(): def __init__(self): self.obj = instaloader.Instaloader(save_metadata=False, filename_pattern="{owner_username}_{date_utc}", download_video_thumbnails='') self.obj.load_session_from_file(os.getenv('SESSION_NAME')) def upda...
true
true
f7641dfed492bc87133a90f6e25bc8df88555383
971
py
Python
framework/connectivity/link-coap/ucube.py
Justlinuxer/AliOS-Things
2de5ca2c2ca3e43808a8db808fd76f915c771515
[ "Apache-2.0" ]
3
2019-06-12T22:41:17.000Z
2022-03-31T10:59:50.000Z
framework/connectivity/link-coap/ucube.py
iDea2016su/deviceConnect
52abb3342fbbcb03c6dc89c7c182b698dae14c9e
[ "Apache-2.0" ]
null
null
null
framework/connectivity/link-coap/ucube.py
iDea2016su/deviceConnect
52abb3342fbbcb03c6dc89c7c182b698dae14c9e
[ "Apache-2.0" ]
4
2018-07-19T03:16:16.000Z
2022-03-31T10:59:52.000Z
src =Split(''' src/CoAPDeserialize.c src/CoAPExport.c src/CoAPMessage.c src/CoAPNetwork.c src/CoAPObserve.c src/CoAPPlatform.c src/CoAPResource.c src/CoAPSerialize.c src/CoAPServer.c ''') component =aos_component('link-coap', src) global_includes =Split(''' ./src...
20.659574
65
0.601442
src =Split(''' src/CoAPDeserialize.c src/CoAPExport.c src/CoAPMessage.c src/CoAPNetwork.c src/CoAPObserve.c src/CoAPPlatform.c src/CoAPResource.c src/CoAPSerialize.c src/CoAPServer.c ''') component =aos_component('link-coap', src) global_includes =Split(''' ./src...
true
true
f7641e1848f7ae96fc568ce69187c4927632a5b2
3,382
py
Python
myproject/settings.py
inzi95/final-cloud-app-with-database
8210c61f0c0cc2f89889573af5a8f53873c948d4
[ "Apache-2.0" ]
null
null
null
myproject/settings.py
inzi95/final-cloud-app-with-database
8210c61f0c0cc2f89889573af5a8f53873c948d4
[ "Apache-2.0" ]
null
null
null
myproject/settings.py
inzi95/final-cloud-app-with-database
8210c61f0c0cc2f89889573af5a8f53873c948d4
[ "Apache-2.0" ]
null
null
null
""" Django settings for myproject project. Generated by 'django-admin startproject' using Django 3.0.4. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import os ...
26.421875
91
0.698699
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'aay0j_9b&ky3a7(8m8il+-1ud(scw12@w5!+5-=gsk6ynzi0ls' DEBUG = True # <HINT> add your cloud host here ALLOWED_HOSTS = ['inzamam.eu-gb.mybluemix.net'] # Application definition INSTALLED_APPS = [ 'onlinecourse.apps.O...
true
true
f7641effe81f9a2f5f0f5eabb19825b79bc53bd1
24,563
py
Python
evm/chains/base.py
YaoyaoBae/py-evm
4a3e8dfa15d81841fde434db352bcb7721ad5c04
[ "MIT" ]
null
null
null
evm/chains/base.py
YaoyaoBae/py-evm
4a3e8dfa15d81841fde434db352bcb7721ad5c04
[ "MIT" ]
null
null
null
evm/chains/base.py
YaoyaoBae/py-evm
4a3e8dfa15d81841fde434db352bcb7721ad5c04
[ "MIT" ]
1
2019-08-10T12:25:15.000Z
2019-08-10T12:25:15.000Z
from __future__ import absolute_import from abc import ( ABCMeta, abstractmethod ) import operator from typing import ( # noqa: F401 Any, Optional, Callable, cast, Dict, Generator, Iterator, Tuple, Type, TYPE_CHECKING, Union, ) import logging from cytoolz import (...
34.067961
100
0.640842
from __future__ import absolute_import from abc import ( ABCMeta, abstractmethod ) import operator from typing import ( Any, Optional, Callable, cast, Dict, Generator, Iterator, Tuple, Type, TYPE_CHECKING, Union, ) import logging from cytoolz import ( assoc, ...
true
true
f7641f3442e4c5a6508a3463c700ade97ce202a9
1,702
py
Python
tensorflow/python/framework/kernels.py
abhaikollara/tensorflow
4f96df3659696990cb34d0ad07dc67843c4225a9
[ "Apache-2.0" ]
848
2019-12-03T00:16:17.000Z
2022-03-31T22:53:17.000Z
tensorflow/python/framework/kernels.py
abhaikollara/tensorflow
4f96df3659696990cb34d0ad07dc67843c4225a9
[ "Apache-2.0" ]
656
2019-12-03T00:48:46.000Z
2022-03-31T18:41:54.000Z
tensorflow/python/framework/kernels.py
abhaikollara/tensorflow
4f96df3659696990cb34d0ad07dc67843c4225a9
[ "Apache-2.0" ]
506
2019-12-03T00:46:26.000Z
2022-03-30T10:34:56.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
36.212766
80
0.747944
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.core.framework import kernel_def_pb2 from tensorflow.python import pywrap_tensorflow as c_api from tensorflow.python.util import compat def get_all_registered_kernels(): buf = c_api.TF_GetA...
true
true
f7641fac6647aa6c4f36a41d12f56011489bc5a9
1,792
py
Python
yacg/generators/helper/pythonFuncs.py
kylape/yacg
bbfe369445b9572d4190f4bd37bcbcf13245f359
[ "MIT" ]
null
null
null
yacg/generators/helper/pythonFuncs.py
kylape/yacg
bbfe369445b9572d4190f4bd37bcbcf13245f359
[ "MIT" ]
null
null
null
yacg/generators/helper/pythonFuncs.py
kylape/yacg
bbfe369445b9572d4190f4bd37bcbcf13245f359
[ "MIT" ]
null
null
null
"""Set of functions to smooth model handling for templates that create Python code """ import yacg.model.model as model import yacg.util.stringUtils as stringUtils def getDefaultPythonValue(propertyObj): if propertyObj.isArray: return '[]' else: if propertyObj.default is not None: ...
29.377049
80
0.632813
import yacg.model.model as model import yacg.util.stringUtils as stringUtils def getDefaultPythonValue(propertyObj): if propertyObj.isArray: return '[]' else: if propertyObj.default is not None: return getPythonValueForType(propertyObj.type, propertyObj.default) else: ...
true
true
f7641fdcb8545a7ddc445e5c887be758333fa3c6
1,451
py
Python
f5_lbaas_dashboard/dashboards/project/loadbalancersv2/urls.py
F5Networks/f5-lbaas-dashboard
06d891260778a77ecf31b9f16d68fe7197162699
[ "Apache-2.0" ]
null
null
null
f5_lbaas_dashboard/dashboards/project/loadbalancersv2/urls.py
F5Networks/f5-lbaas-dashboard
06d891260778a77ecf31b9f16d68fe7197162699
[ "Apache-2.0" ]
null
null
null
f5_lbaas_dashboard/dashboards/project/loadbalancersv2/urls.py
F5Networks/f5-lbaas-dashboard
06d891260778a77ecf31b9f16d68fe7197162699
[ "Apache-2.0" ]
null
null
null
# Copyright 2015, eBay 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 agre...
39.216216
78
0.627154
from django.conf.urls import patterns from django.conf.urls import url from .views import DetailView from .views import IndexView from .views import LaunchLoadBalancerView from .views import UpdateView INSTANCES = r'^(?P<loadbalancer_id>[^/]+)/%s$' VIEW_MOD = 'openstack_dashboard.dashboards.project.loadbalancer...
true
true
f764223d0627ce07b35a002a49f2f293e5e173ba
102,454
py
Python
setup.py
myarchsource/python2
967e509ff8ad450919d5cf708b8e35387b63db03
[ "CNRI-Python-GPL-Compatible" ]
20
2021-01-21T01:31:32.000Z
2022-03-20T22:07:34.000Z
setup.py
myarchsource/python2
967e509ff8ad450919d5cf708b8e35387b63db03
[ "CNRI-Python-GPL-Compatible" ]
4
2022-03-14T11:37:48.000Z
2022-03-30T10:49:53.000Z
setup.py
myarchsource/python2
967e509ff8ad450919d5cf708b8e35387b63db03
[ "CNRI-Python-GPL-Compatible" ]
4
2020-05-18T02:51:32.000Z
2022-02-25T21:54:30.000Z
# Autodetecting setup.py script for building the Python extensions # __version__ = "$Revision$" import sys, os, imp, re, optparse from glob import glob from platform import machine as platform_machine import sysconfig from distutils import log from distutils import text_file from distutils.errors import * from distu...
43.541861
112
0.533254
__version__ = "$Revision$" import sys, os, imp, re, optparse from glob import glob from platform import machine as platform_machine import sysconfig from distutils import log from distutils import text_file from distutils.errors import * from distutils.core import Extension, setup from distutils.command.build_ext im...
false
true
f76422811eef5057352ae678b221d12caa31fe72
10,878
py
Python
a2/word2vec.py
coszero/My-Solutions-to-CS224n
98c58c42b55f6a6b3dd984baa8a994ea42f24952
[ "MIT" ]
1
2020-11-23T06:18:19.000Z
2020-11-23T06:18:19.000Z
a2/word2vec.py
coszero/My-Solutions-to-CS224n
98c58c42b55f6a6b3dd984baa8a994ea42f24952
[ "MIT" ]
null
null
null
a2/word2vec.py
coszero/My-Solutions-to-CS224n
98c58c42b55f6a6b3dd984baa8a994ea42f24952
[ "MIT" ]
null
null
null
#!/usr/bin/env python import numpy as np import random from utils.gradcheck import gradcheck_naive from utils.utils import normalizeRows, softmax def sigmoid(x): """ Compute the sigmoid function for the input here. Arguments: x -- A scalar or numpy array. Return: s -- sigmoid(x) """ ...
35.782895
118
0.640467
import numpy as np import random from utils.gradcheck import gradcheck_naive from utils.utils import normalizeRows, softmax def sigmoid(x): s=1/(1+np.exp(-x)) return s def naiveSoftmaxLossAndGradient( centerWordVec, outsideWordIdx, outsideVectors, dataset ): ...
true
true
f764229ae64d22a52bda3257a6284f73998c608f
57,360
py
Python
hgext/histedit.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
hgext/histedit.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
hgext/histedit.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
# histedit.py - interactive history editing for mercurial # # Copyright 2009 Augie Fackler <raf@durin42.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. """interactive history editing With this extension installed, Mercurial g...
35.605214
80
0.603312
from __future__ import absolute_import import errno import os from mercurial.i18n import _ from mercurial import ( bundle2, cmdutil, context, copies, destutil, discovery, error, exchange, extensions, hg, lock, merge as mergemod, mergeutil, node, obsolete, ...
true
true
f76422c7ac67969cbcb613b9b9da71c309622ef6
387
py
Python
router_dlink_dir822/__init__.py
jingl3s/python-router-dlink-dir822
f39ae22b3114302ba10e5dd37e02a52370c081ba
[ "WTFPL" ]
null
null
null
router_dlink_dir822/__init__.py
jingl3s/python-router-dlink-dir822
f39ae22b3114302ba10e5dd37e02a52370c081ba
[ "WTFPL" ]
null
null
null
router_dlink_dir822/__init__.py
jingl3s/python-router-dlink-dir822
f39ae22b3114302ba10e5dd37e02a52370c081ba
[ "WTFPL" ]
null
null
null
# -*- coding: utf-8 -*- # """ Copyright (C) 2022 Jingl3s This code is free software; you can redistribute it and/or modify it under the terms of the DO WHAT THE FUCK YOU WANT TO. (see the file COPYING.txt included with the distribution). """ from .device_dlink_dir822 import DeviceDlink822Factory, RouterDlinkDIR822 _...
22.764706
73
0.736434
from .device_dlink_dir822 import DeviceDlink822Factory, RouterDlinkDIR822 __all__ = [ "DeviceDlink822Factory", "RouterDlinkDIR822", ]
true
true
f764232e667ae480e70028609a342eb915ac4774
4,609
py
Python
trappy/dynamic.py
ADVAN-ELAA-8QM-PRC1/platform-external-trappy
48d4b5dbe947ee956876ee2a6ea3017bf2821e28
[ "Apache-2.0" ]
null
null
null
trappy/dynamic.py
ADVAN-ELAA-8QM-PRC1/platform-external-trappy
48d4b5dbe947ee956876ee2a6ea3017bf2821e28
[ "Apache-2.0" ]
null
null
null
trappy/dynamic.py
ADVAN-ELAA-8QM-PRC1/platform-external-trappy
48d4b5dbe947ee956876ee2a6ea3017bf2821e28
[ "Apache-2.0" ]
null
null
null
# Copyright 2015-2017 ARM Limited # # 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 w...
29.928571
85
0.683011
from trappy.base import Base import re from trappy.ftrace import GenericFTrace def default_init(self): kwords = {} try: kwords["parse_raw"] = self.parse_raw except AttributeError: pass super(type(self), self).__init__(**kwords) class DynamicTypeFactory(type): def __new__(m...
true
true
f7642332636abc3444a73e08904b5206949c7bb1
1,631
py
Python
Runtime/ExternalConnectors/Blender_SimplifyOBJ.py
CAOR-MINES-ParisTech/colibri-vr-unity-package
ab11dab814461154185a1e868cc5496cc35d6086
[ "MIT" ]
35
2020-02-29T10:45:06.000Z
2022-03-20T07:21:24.000Z
Runtime/ExternalConnectors/Blender_SimplifyOBJ.py
CAOR-MINES-ParisTech/colibri-vr-unity-package
ab11dab814461154185a1e868cc5496cc35d6086
[ "MIT" ]
11
2020-04-02T12:41:06.000Z
2021-07-05T16:17:21.000Z
Runtime/ExternalConnectors/Blender_SimplifyOBJ.py
CAOR-MINES-ParisTech/colibri-vr-unity-package
ab11dab814461154185a1e868cc5496cc35d6086
[ "MIT" ]
7
2020-03-31T00:54:45.000Z
2022-02-18T18:52:05.000Z
### Copyright 2019-2020 MINES ParisTech (PSL University) ### This work is licensed under the terms of the MIT license, see the LICENSE file. ### ### Author: Grégoire Dupont de Dinechin, gregoire@dinechin.org import sys, os sys.path.append(sys.argv[sys.argv.index("--") + 1:][0]) import bpy from Blender_Core import pri...
46.6
107
0.737584
import sys, os sys.path.append(sys.argv[sys.argv.index("--") + 1:][0]) import bpy from Blender_Core import print_out, print_err, delete_all_on_start, print_face_count def main() : argv = sys.argv[sys.argv.index("--") + 1:] input_file_path = str(argv[1]) output_file_path = str(argv[2]) delete_all_on_st...
true
true
f7642357b199783ed7c40491fa1b13384125cd19
3,037
py
Python
contrib/linearize/linearize-hashes.py
pingboy/Tarian
19fe47d7cbd1476b4f952f2b0a5654db7dda92b8
[ "MIT" ]
1
2020-12-24T21:18:35.000Z
2020-12-24T21:18:35.000Z
contrib/linearize/linearize-hashes.py
pingboy/Tarian
19fe47d7cbd1476b4f952f2b0a5654db7dda92b8
[ "MIT" ]
null
null
null
contrib/linearize/linearize-hashes.py
pingboy/Tarian
19fe47d7cbd1476b4f952f2b0a5654db7dda92b8
[ "MIT" ]
1
2020-11-19T03:46:35.000Z
2020-11-19T03:46:35.000Z
#!/usr/bin/python # # linearize-hashes.py: List blocks in a linear, no-fork version of the chain. # # Copyright (c) 2013-2014 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from __future__ import pri...
26.640351
90
0.682581
from __future__ import print_function import json import struct import re import base64 import httplib import sys settings = {} class BitcoinRPC: def __init__(self, host, port, username, password): authpair = "%s:%s" % (username, password) self.authhdr = "Basic %s" % (base64.b64encode(authpair)) self.conn = h...
true
true
f764248f361d8b38fb6219b0058c4fb50d792699
3,190
py
Python
profiles_project/settings.py
IAmAnju/profiles-rest-api
0cb78a35afc4a13dd7359043763db98b81d40627
[ "MIT" ]
null
null
null
profiles_project/settings.py
IAmAnju/profiles-rest-api
0cb78a35afc4a13dd7359043763db98b81d40627
[ "MIT" ]
3
2020-06-06T01:42:46.000Z
2021-04-08T21:41:01.000Z
profiles_project/settings.py
IAmAnju/profiles-rest-api
0cb78a35afc4a13dd7359043763db98b81d40627
[ "MIT" ]
null
null
null
""" Django settings for profiles_project project. Generated by 'django-admin startproject' using Django 2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ impor...
25.725806
91
0.698746
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 's7j6un41#vo%tpet^^83zm!bn4t8l23t3n@1gl%o&v%ybwao+u' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes...
true
true
f76425e4715744fef656ac497beed6ed0e9f5dd7
12,433
py
Python
esmvalcore/preprocessor/_multimodel.py
Peter9192/ESMValCore
febd96a39480cc837afbf4e1f5b0ef61571af76a
[ "Apache-2.0" ]
null
null
null
esmvalcore/preprocessor/_multimodel.py
Peter9192/ESMValCore
febd96a39480cc837afbf4e1f5b0ef61571af76a
[ "Apache-2.0" ]
null
null
null
esmvalcore/preprocessor/_multimodel.py
Peter9192/ESMValCore
febd96a39480cc837afbf4e1f5b0ef61571af76a
[ "Apache-2.0" ]
null
null
null
"""multimodel statistics. Functions for multi-model operations supports a multitude of multimodel statistics computations; the only requisite is the ingested cubes have (TIME-LAT-LON) or (TIME-PLEV-LAT-LON) dimensions; and obviously consistent units. It operates on different (time) spans: - full: computes stats on fu...
33.154667
79
0.648275
import logging from datetime import datetime from functools import reduce import cf_units import iris import numpy as np logger = logging.getLogger(__name__) def _get_time_offset(time_unit): cfunit = cf_units.Unit(time_unit, calendar=cf_units.CALENDAR_STANDARD) time_offset = cfunit.num2date(0) retu...
true
true
f764267b1cc76f1ca95b500ec3453c1a32ef2e9b
2,912
py
Python
tests/test_fragments.py
brunosmmm/dictator
60314734b9d0c378fad77d296c8946165f372400
[ "MIT" ]
null
null
null
tests/test_fragments.py
brunosmmm/dictator
60314734b9d0c378fad77d296c8946165f372400
[ "MIT" ]
null
null
null
tests/test_fragments.py
brunosmmm/dictator
60314734b9d0c378fad77d296c8946165f372400
[ "MIT" ]
null
null
null
"""Test configuration fragment replacement.""" import pytest from dictator.validators.replace import ( FragmentReplace, AutoFragmentReplace, FragmentError, ) from dictator.validators.lists import SubListValidator from dictator.config import validate_config def test_fragment_replace(): """Test manual ...
26.962963
70
0.651442
import pytest from dictator.validators.replace import ( FragmentReplace, AutoFragmentReplace, FragmentError, ) from dictator.validators.lists import SubListValidator from dictator.config import validate_config def test_fragment_replace(): TEST_CONFIG = { "my_key": "my_value", "my_othe...
true
true
f764269f10aaeb78b2262b3ec3f1ead8ff9f04c4
3,655
py
Python
bot/gameObjects/items/modules/gammaShieldModule.py
GOF2BountyBot/GOF2BountyBot
f7f276a1b0a8fa376fab3d48e0a1f3989e15c80d
[ "MIT" ]
1
2021-08-30T15:04:34.000Z
2021-08-30T15:04:34.000Z
bot/gameObjects/items/modules/gammaShieldModule.py
KroeteTroete/GOF2BountyBot-1
f7f276a1b0a8fa376fab3d48e0a1f3989e15c80d
[ "MIT" ]
783
2021-01-22T20:54:48.000Z
2022-03-29T08:22:49.000Z
bot/gameObjects/items/modules/gammaShieldModule.py
KroeteTroete/GOF2BountyBot-1
f7f276a1b0a8fa376fab3d48e0a1f3989e15c80d
[ "MIT" ]
2
2021-05-23T17:32:00.000Z
2021-08-28T13:13:16.000Z
from . import moduleItem from ....cfg import bbData from .... import lib from typing import List from ..gameItem import spawnableItem @spawnableItem class GammaShieldModule(moduleItem.ModuleItem): """"A module providing a ship with protection agains gamma radiation :var effect: The reduction in gamma radiati...
50.763889
126
0.648974
from . import moduleItem from ....cfg import bbData from .... import lib from typing import List from ..gameItem import spawnableItem @spawnableItem class GammaShieldModule(moduleItem.ModuleItem): def __init__(self, name : str, aliases : List[str], effect : int = 0, value : int = 0, wiki : str = "", ...
true
true
f7642700833a9a035fb37533c3d5be65e4ea1ce6
197
py
Python
code2markdown/__main__.py
GEM7318/Code2Markdown
8c3d28ddfb3f0520a1ed59e1b137bd9f6746a0af
[ "MIT" ]
null
null
null
code2markdown/__main__.py
GEM7318/Code2Markdown
8c3d28ddfb3f0520a1ed59e1b137bd9f6746a0af
[ "MIT" ]
null
null
null
code2markdown/__main__.py
GEM7318/Code2Markdown
8c3d28ddfb3f0520a1ed59e1b137bd9f6746a0af
[ "MIT" ]
null
null
null
from pathlib import Path from code2markdown import Code def main(): output_dir = Path.cwd() code = Code() code.dump(output_dir=output_dir) if __name__ == "__main__": main()
14.071429
34
0.659898
from pathlib import Path from code2markdown import Code def main(): output_dir = Path.cwd() code = Code() code.dump(output_dir=output_dir) if __name__ == "__main__": main()
true
true
f764280406b72f6af6ca3e3b40c734ff552f1490
981
py
Python
src/cobra/core/locale.py
lyoniionly/django-cobra
2427e5cf74b7739115b1224da3306986b3ee345c
[ "Apache-2.0" ]
1
2015-01-27T08:56:46.000Z
2015-01-27T08:56:46.000Z
src/cobra/core/locale.py
lyoniionly/django-cobra
2427e5cf74b7739115b1224da3306986b3ee345c
[ "Apache-2.0" ]
null
null
null
src/cobra/core/locale.py
lyoniionly/django-cobra
2427e5cf74b7739115b1224da3306986b3ee345c
[ "Apache-2.0" ]
null
null
null
# Map Cobra languages to moment.js locales LOCALE_MAPPING = { 'ar': 'ar', 'az': 'az', 'bg': 'bg', 'ca': 'ca', 'cs': 'cs', 'cy': 'cy', 'da': 'da', 'de': 'de', 'el': 'el', 'es': 'es', 'et': 'et', 'fa': 'fa', 'fi': 'fi', 'fr': 'fr', 'gl': 'gl', 'he': 'he', ...
17.836364
59
0.346585
LOCALE_MAPPING = { 'ar': 'ar', 'az': 'az', 'bg': 'bg', 'ca': 'ca', 'cs': 'cs', 'cy': 'cy', 'da': 'da', 'de': 'de', 'el': 'el', 'es': 'es', 'et': 'et', 'fa': 'fa', 'fi': 'fi', 'fr': 'fr', 'gl': 'gl', 'he': 'he', 'hr': 'hr', 'hu': 'hu', 'id': 'i...
true
true
f7642836c4adc4ac832b213a4140b323647a4e8f
10,221
py
Python
postgres-appliance/major_upgrade/pg_upgrade.py
vfrans/spilo
eca066ce95dc26d27abb847e8afece89073e7644
[ "Apache-2.0" ]
null
null
null
postgres-appliance/major_upgrade/pg_upgrade.py
vfrans/spilo
eca066ce95dc26d27abb847e8afece89073e7644
[ "Apache-2.0" ]
null
null
null
postgres-appliance/major_upgrade/pg_upgrade.py
vfrans/spilo
eca066ce95dc26d27abb847e8afece89073e7644
[ "Apache-2.0" ]
null
null
null
import logging import os import shutil import subprocess import psutil from patroni.postgresql import Postgresql logger = logging.getLogger(__name__) class _PostgresqlUpgrade(Postgresql): def adjust_shared_preload_libraries(self, version): from spilo_commons import adjust_extensions shared_pre...
43.493617
117
0.644066
import logging import os import shutil import subprocess import psutil from patroni.postgresql import Postgresql logger = logging.getLogger(__name__) class _PostgresqlUpgrade(Postgresql): def adjust_shared_preload_libraries(self, version): from spilo_commons import adjust_extensions shared_pre...
true
true
f764296b294d21e3c54bb6f07fddda96826800b8
128
py
Python
tachikoma/emitters/slack.py
CaliDog/tachikoma
3955ff97c14ba9747c42324cb6a2955419c6e71e
[ "MIT" ]
21
2017-11-03T21:53:20.000Z
2020-08-28T01:49:25.000Z
tachikoma/emitters/slack.py
CaliDog/tachikoma
3955ff97c14ba9747c42324cb6a2955419c6e71e
[ "MIT" ]
1
2018-09-07T16:11:08.000Z
2018-09-07T16:11:08.000Z
tachikoma/emitters/slack.py
CaliDog/tachikoma
3955ff97c14ba9747c42324cb6a2955419c6e71e
[ "MIT" ]
3
2017-11-12T05:24:21.000Z
2019-05-08T01:22:06.000Z
from tachikoma.emitters import BaseEmitter class SlackEmitter(BaseEmitter): def emit(self, channel, pipeline): pass
25.6
42
0.75
from tachikoma.emitters import BaseEmitter class SlackEmitter(BaseEmitter): def emit(self, channel, pipeline): pass
true
true
f7642a3ccc8e461c75a789fdc11dade9c8655689
10,113
py
Python
app/logic/calendar.py
connorkeevill/CM20257-housemates
c27d5655f77acd598aa90687b2d9caf960a53062
[ "Apache-2.0" ]
null
null
null
app/logic/calendar.py
connorkeevill/CM20257-housemates
c27d5655f77acd598aa90687b2d9caf960a53062
[ "Apache-2.0" ]
null
null
null
app/logic/calendar.py
connorkeevill/CM20257-housemates
c27d5655f77acd598aa90687b2d9caf960a53062
[ "Apache-2.0" ]
null
null
null
import calendar from datetime import date, timedelta # Tasks remaining: # Create event implementation """ Hi future Stevie, it's Connor I've just done some work for allowing you to access the calendar events. At the top you'll see a new import statement that's pulling in the classes that will get them from the databa...
34.165541
224
0.435281
import calendar from datetime import date, timedelta def find_start_day(day, date_num): for i in range(date_num, 1, -1): if day > 0: day = day - 1 else: day = 6 return day def find_end_day(day, date_num, month): month_length = find_month_length(month) for i in range(date_num, month_length): if da...
true
true
f7642a5bb8bf426df7344c94d2314e694edb4a3a
863
py
Python
PXL_DIGITAL_JAAR_2/AI & Robotics/Week 5/code/from_ui_file.py
Limoentaart/PXL_IT
fe8440145a4cb75b66aaaa8e74a92cac0d58dcc8
[ "MIT" ]
null
null
null
PXL_DIGITAL_JAAR_2/AI & Robotics/Week 5/code/from_ui_file.py
Limoentaart/PXL_IT
fe8440145a4cb75b66aaaa8e74a92cac0d58dcc8
[ "MIT" ]
null
null
null
PXL_DIGITAL_JAAR_2/AI & Robotics/Week 5/code/from_ui_file.py
Limoentaart/PXL_IT
fe8440145a4cb75b66aaaa8e74a92cac0d58dcc8
[ "MIT" ]
1
2020-10-30T10:02:44.000Z
2020-10-30T10:02:44.000Z
import sys import warnings warnings.filterwarnings('ignore') from PyQt5 import QtCore, QtWidgets from PyQt5.QtWidgets import QMainWindow, QLabel, QSlider from PyQt5.QtCore import QSize, Qt, pyqtSlot, pyqtSignal from PyQt5.uic import loadUi class HelloWindow(QMainWindow): pushButtonClicked = pyqtSignal() val...
24.657143
59
0.707995
import sys import warnings warnings.filterwarnings('ignore') from PyQt5 import QtCore, QtWidgets from PyQt5.QtWidgets import QMainWindow, QLabel, QSlider from PyQt5.QtCore import QSize, Qt, pyqtSlot, pyqtSignal from PyQt5.uic import loadUi class HelloWindow(QMainWindow): pushButtonClicked = pyqtSignal() val...
true
true
f7642b41fe0f5e7555a8c2037a98db376a1acee4
6,065
py
Python
deepchem/metrics/score_function.py
TaiCZ/deepchem
66de10d4f862e0077a82fd7460eea2b11b9472aa
[ "MIT" ]
3
2022-03-06T11:43:46.000Z
2022-03-07T07:22:06.000Z
deepchem/metrics/score_function.py
TaiCZ/deepchem
66de10d4f862e0077a82fd7460eea2b11b9472aa
[ "MIT" ]
null
null
null
deepchem/metrics/score_function.py
TaiCZ/deepchem
66de10d4f862e0077a82fd7460eea2b11b9472aa
[ "MIT" ]
null
null
null
"""Evaluation metrics.""" import numpy as np import scipy.stats from sklearn.metrics import matthews_corrcoef # noqa from sklearn.metrics import recall_score # noqa from sklearn.metrics import cohen_kappa_score from sklearn.metrics import r2_score # noqa from sklearn.metrics import mean_squared_error from sklearn.m...
25.699153
107
0.691014
import numpy as np import scipy.stats from sklearn.metrics import matthews_corrcoef from sklearn.metrics import recall_score from sklearn.metrics import cohen_kappa_score from sklearn.metrics import r2_score from sklearn.metrics import mean_squared_error from sklearn.metrics import mean_absolute_error from sklearn....
true
true
f7642d4624d6ef5904a560f2c36e1b486f4c1599
2,551
py
Python
modules/utils/module_color.py
Fogapod/KiwiBot
49743118661abecaab86388cb94ff8a99f9011a8
[ "MIT" ]
18
2018-05-25T08:50:12.000Z
2021-10-04T07:13:09.000Z
modules/utils/module_color.py
Fogapod/BotMyBot
49743118661abecaab86388cb94ff8a99f9011a8
[ "MIT" ]
4
2018-10-20T21:10:38.000Z
2019-06-25T13:12:07.000Z
modules/utils/module_color.py
Fogapod/BotMyBot
49743118661abecaab86388cb94ff8a99f9011a8
[ "MIT" ]
6
2018-10-20T21:06:24.000Z
2021-11-08T05:51:14.000Z
from objects.modulebase import ModuleBase from objects.permissions import PermissionManageRoles import discord from utils.funcs import find_role class Module(ModuleBase): usage_doc = '{prefix}{aliases} [add|remove] [role_name]' short_doc = 'Assign or remove color role' long_doc = ( 'Subcommands...
34.013333
128
0.566053
from objects.modulebase import ModuleBase from objects.permissions import PermissionManageRoles import discord from utils.funcs import find_role class Module(ModuleBase): usage_doc = '{prefix}{aliases} [add|remove] [role_name]' short_doc = 'Assign or remove color role' long_doc = ( 'Subcommands...
true
true
f7642dab69b2a3ec4c3611b0398e55f61b5f759b
562
py
Python
banditpylib/arms/gaussian_arm_test.py
Alanthink/banditpylib
ba6dc84d87ae9e9aec48cd622ec9988dccdd18c6
[ "MIT" ]
20
2020-02-05T23:53:18.000Z
2021-07-16T21:06:16.000Z
banditpylib/arms/gaussian_arm_test.py
sheelfshah/banditpylib
d455424ed74be1850ee3969b7b31f08d49339005
[ "MIT" ]
18
2020-02-06T00:23:26.000Z
2021-07-06T16:37:10.000Z
banditpylib/arms/gaussian_arm_test.py
sheelfshah/banditpylib
d455424ed74be1850ee3969b7b31f08d49339005
[ "MIT" ]
8
2020-02-06T00:05:10.000Z
2021-09-18T17:24:29.000Z
from .gaussian_arm import GaussianArm class TestGaussianArm: """Test Gaussian arm""" def test_probability_within_one_std(self): mu, std = 0, 1 gaussian_arm = GaussianArm(mu, std) rewards = gaussian_arm.pull(1000) # Probability of rewards within [mu - std, mu + std] prob_within_one_std = [ ...
33.058824
74
0.654804
from .gaussian_arm import GaussianArm class TestGaussianArm: def test_probability_within_one_std(self): mu, std = 0, 1 gaussian_arm = GaussianArm(mu, std) rewards = gaussian_arm.pull(1000) prob_within_one_std = [ 1 if (mu - std <= reward <= mu + std) else 0 for reward in rewards ] ...
true
true
f7642e021866ac47a0bcd5fd062c3e4fbd79be21
4,042
py
Python
src/interface_py/h2o4gpu/util/lightgbm_dynamic.py
pnijhara/h2o4gpu
6257112c134136471420b68241f57190a445b67d
[ "Apache-2.0" ]
458
2017-09-20T08:32:10.000Z
2022-02-28T18:40:57.000Z
src/interface_py/h2o4gpu/util/lightgbm_dynamic.py
Jun-NIBS/h2o4gpu
9885416deb3285f5d0f33023d6c07373ac4fc0b7
[ "Apache-2.0" ]
461
2017-09-20T11:39:04.000Z
2021-11-21T15:51:42.000Z
src/interface_py/h2o4gpu/util/lightgbm_dynamic.py
Jun-NIBS/h2o4gpu
9885416deb3285f5d0f33023d6c07373ac4fc0b7
[ "Apache-2.0" ]
114
2017-09-20T12:08:07.000Z
2021-11-29T14:15:40.000Z
# pylint: skip-file import os import importlib.util got_cpu_lgb = False got_gpu_lgb = False from h2o4gpu.util.gpu import device_count _, ngpus_vis_global = device_count() enable_lightgbm_import = True if enable_lightgbm_import: lgb_loader = importlib.util.find_spec('lightgbm') lgb_found = lgb_loader is not...
47.552941
222
0.543295
import os import importlib.util got_cpu_lgb = False got_gpu_lgb = False from h2o4gpu.util.gpu import device_count _, ngpus_vis_global = device_count() enable_lightgbm_import = True if enable_lightgbm_import: lgb_loader = importlib.util.find_spec('lightgbm') lgb_found = lgb_loader is not None always_do...
true
true
f7642e1f998843d609739f5972cd5a7eeb5c9a25
4,442
py
Python
exaslct_src/lib/clean_images.py
mace84/script-languages
d586cbe212bbb4efbfb39e095183729c65489360
[ "MIT" ]
null
null
null
exaslct_src/lib/clean_images.py
mace84/script-languages
d586cbe212bbb4efbfb39e095183729c65489360
[ "MIT" ]
1
2019-05-06T07:36:11.000Z
2019-05-06T07:36:11.000Z
exaslct_src/lib/clean_images.py
mace84/script-languages
d586cbe212bbb4efbfb39e095183729c65489360
[ "MIT" ]
1
2019-05-03T08:49:29.000Z
2019-05-03T08:49:29.000Z
import datetime import logging from collections import deque import luigi from exaslct_src.lib.build_config import build_config from exaslct_src.lib.docker_config import docker_client_config, target_docker_repository_config from exaslct_src.lib.flavor import flavor from exaslct_src.lib.stoppable_task import Stoppable...
38.964912
110
0.658712
import datetime import logging from collections import deque import luigi from exaslct_src.lib.build_config import build_config from exaslct_src.lib.docker_config import docker_client_config, target_docker_repository_config from exaslct_src.lib.flavor import flavor from exaslct_src.lib.stoppable_task import Stoppable...
true
true
f7642e5a0bb095a1ab29a84be584d117d1a15918
11,304
py
Python
scripts/v1/polylogyx_apis/api.py
kishore-arava/plgx-esp-sdk
26fe7133ef1fd78ff5de54c089c55100e30983a4
[ "MIT" ]
null
null
null
scripts/v1/polylogyx_apis/api.py
kishore-arava/plgx-esp-sdk
26fe7133ef1fd78ff5de54c089c55100e30983a4
[ "MIT" ]
null
null
null
scripts/v1/polylogyx_apis/api.py
kishore-arava/plgx-esp-sdk
26fe7133ef1fd78ff5de54c089c55100e30983a4
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Simple class to interact with Polylogyx's Api. :copyright: (c) 2019 by PolyLogyx. :license: MIT, see LICENSE for more details. The APIs are documented at: https://github.com/polylogyx/polylogyx-api/ EXAMPLE USAGE::: from api import PolylogyxApi polylogyxApi = P...
40.516129
119
0.603415
import requests from websocket import create_connection import ssl from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) TIMEOUT_SECS = 30 class PolylogyxApi: def __init__(self, domain=None, username=None, password...
true
true
f7642e960f9928d426d37b1f4e5e328fbc2a8ade
9,131
py
Python
pipeline/scripts/bb_pipeline_api.py
BioroboticsLab/deeppipeline
7e60e410b3a1f4d8a65924033f13dbf0ecdd3e94
[ "Apache-2.0" ]
4
2017-02-27T16:21:09.000Z
2020-12-10T13:42:23.000Z
pipeline/scripts/bb_pipeline_api.py
BioroboticsLab/deeppipeline
7e60e410b3a1f4d8a65924033f13dbf0ecdd3e94
[ "Apache-2.0" ]
5
2016-04-30T16:39:04.000Z
2016-07-19T13:24:10.000Z
pipeline/scripts/bb_pipeline_api.py
BioroboticsLab/deeppipeline
7e60e410b3a1f4d8a65924033f13dbf0ecdd3e94
[ "Apache-2.0" ]
4
2016-12-29T04:33:22.000Z
2020-02-04T15:26:10.000Z
#!/usr/bin/env python3 """This script provides a RESTful remote endpoint to the detection pipeline. An image is sent to the server, which sends back the requested results. """ import inspect import io import json from tempfile import NamedTemporaryFile from urllib import parse import cachetools import msgpack import ...
35.254826
87
0.618662
import inspect import io import json from tempfile import NamedTemporaryFile from urllib import parse import cachetools import msgpack import numpy as np from flask import Flask, abort, request from scipy.misc import imread, imsave from pipeline import Pipeline, objects from pipeline.pipeline import get_auto_config ...
true
true
f7642ecd391d90eefbc17e05df827992e620759b
1,774
py
Python
CTRegisterMicroserviceFlask/tests/call_endpoint_tests.py
Skydipper/ct-register-microservice-python-flask
e9795da6c459ecc3c426373585afd5eeb7a1f646
[ "MIT" ]
null
null
null
CTRegisterMicroserviceFlask/tests/call_endpoint_tests.py
Skydipper/ct-register-microservice-python-flask
e9795da6c459ecc3c426373585afd5eeb7a1f646
[ "MIT" ]
null
null
null
CTRegisterMicroserviceFlask/tests/call_endpoint_tests.py
Skydipper/ct-register-microservice-python-flask
e9795da6c459ecc3c426373585afd5eeb7a1f646
[ "MIT" ]
1
2019-06-01T00:49:16.000Z
2019-06-01T00:49:16.000Z
import os import pytest import requests_mock import CTRegisterMicroserviceFlask from CTRegisterMicroserviceFlask.errors import NotFound @pytest.fixture def validate_env(): if not os.getenv('CT_URL'): raise Exception('CT_URL needs to be set') if not os.getenv('CT_TOKEN'): raise Exception('CT_...
26.878788
98
0.657835
import os import pytest import requests_mock import CTRegisterMicroserviceFlask from CTRegisterMicroserviceFlask.errors import NotFound @pytest.fixture def validate_env(): if not os.getenv('CT_URL'): raise Exception('CT_URL needs to be set') if not os.getenv('CT_TOKEN'): raise Exception('CT_...
true
true
f764309f8d03b29ad4a41ea5b61878d8e745e2e0
318
py
Python
InformationSecurity/extern_ip_check.py
eduardormonteiro/PythonPersonalLibrary
561733bb8305c4e25a08f99c28b60ec77251ad67
[ "MIT" ]
null
null
null
InformationSecurity/extern_ip_check.py
eduardormonteiro/PythonPersonalLibrary
561733bb8305c4e25a08f99c28b60ec77251ad67
[ "MIT" ]
null
null
null
InformationSecurity/extern_ip_check.py
eduardormonteiro/PythonPersonalLibrary
561733bb8305c4e25a08f99c28b60ec77251ad67
[ "MIT" ]
null
null
null
import re import json from urllib.request import urlopen url = 'https://ipinfo.io/json' result = urlopen(url) data = json.load(result) hostname = data['hostname'] ip = data['ip'] org = data['org'] city = data['city'] country = data['country'] region = data['region'] print(f'IP:{ip}\nRegion:{region}\ncity:{city}')
18.705882
47
0.685535
import re import json from urllib.request import urlopen url = 'https://ipinfo.io/json' result = urlopen(url) data = json.load(result) hostname = data['hostname'] ip = data['ip'] org = data['org'] city = data['city'] country = data['country'] region = data['region'] print(f'IP:{ip}\nRegion:{region}\ncity:{city}')
true
true
f764317524630f185faf4f099d5196fa7d7b3172
134
py
Python
Learning Python/practice/prnt, str, num/comments.py
Magical-Man/Learning-Python
488347b06be8013ab048963a0a0e9e81995d18b6
[ "MIT" ]
null
null
null
Learning Python/practice/prnt, str, num/comments.py
Magical-Man/Learning-Python
488347b06be8013ab048963a0a0e9e81995d18b6
[ "MIT" ]
null
null
null
Learning Python/practice/prnt, str, num/comments.py
Magical-Man/Learning-Python
488347b06be8013ab048963a0a0e9e81995d18b6
[ "MIT" ]
null
null
null
# This is a comment and it is the most common, and only one line.abs ''' This is the triple quote and will not be reconized.abs '''
22.333333
68
0.708955
true
true
f764319a10c7fb9f1f7771ff05ca08f8a9dbaa80
19,269
py
Python
lib/rucio/tests/test_reaper.py
chrisburr/rucio
735f628231cd9fae64adc31c9f548b14d5ca01d3
[ "Apache-2.0" ]
null
null
null
lib/rucio/tests/test_reaper.py
chrisburr/rucio
735f628231cd9fae64adc31c9f548b14d5ca01d3
[ "Apache-2.0" ]
null
null
null
lib/rucio/tests/test_reaper.py
chrisburr/rucio
735f628231cd9fae64adc31c9f548b14d5ca01d3
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 CERN for the benefit of the ATLAS collaboration. # # 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 appl...
56.840708
175
0.716799
from datetime import datetime, timedelta import pytest from rucio.api import replica as replica_api from rucio.api import rse as rse_api from rucio.common.config import config_get_bool from rucio.common.exception import ReplicaNotFound, DataIdentifierNotFound from rucio.common.types import InternalAccount, InternalS...
true
true
f76431dc23922f016c4df8822c7cbcdd743bd16a
52,959
py
Python
PyPoE/cli/exporter/wiki/parser.py
Gloorf/PyPoE
23e60e0914a1a669764a552f762d2b2064203e75
[ "MIT" ]
null
null
null
PyPoE/cli/exporter/wiki/parser.py
Gloorf/PyPoE
23e60e0914a1a669764a552f762d2b2064203e75
[ "MIT" ]
null
null
null
PyPoE/cli/exporter/wiki/parser.py
Gloorf/PyPoE
23e60e0914a1a669764a552f762d2b2064203e75
[ "MIT" ]
null
null
null
""" Wiki Export Handler Overview =============================================================================== +----------+------------------------------------------------------------------+ | Path | PyPoE/cli/exporter/wiki/parser.py | +----------+---------------------------------...
39.878765
92
0.502729
import re import warnings import os from collections import OrderedDict from functools import partial from PyPoE.cli.core import console, Msg from PyPoE.cli.exporter import config from PyPoE.cli.exporter.util import get_content_ggpk_path from PyPoE.poe.constants import MOD_DOMAIN, WORDLISTS, MOD_STATS_RANGE from PyP...
true
true
f764326c0c32f3ff13aa6f923deec354934af67c
394
py
Python
gcd.py
konglx90/algorithm
e79a0753d01a39f33482e5d33663ea81ecd435f8
[ "MIT" ]
null
null
null
gcd.py
konglx90/algorithm
e79a0753d01a39f33482e5d33663ea81ecd435f8
[ "MIT" ]
null
null
null
gcd.py
konglx90/algorithm
e79a0753d01a39f33482e5d33663ea81ecd435f8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ 最大公约数 """ def gcd(a, b): """ 需a>=b :param a: :param b: :return: """ if a == b or a % b == 0: return b else: return gcd(b, a % b) def gcd_2(a, b): return b if a == b or a % b == 0 else gcd_2(b, a % b) if __name__ == "__main__": pr...
13.586207
57
0.454315
def gcd(a, b): if a == b or a % b == 0: return b else: return gcd(b, a % b) def gcd_2(a, b): return b if a == b or a % b == 0 else gcd_2(b, a % b) if __name__ == "__main__": print(gcd(34398, 2132)) print(gcd_2(34398, 2132)) print(gcd(9, 17))
true
true
f764327d7a09d09c4cb15503f447a11c180de6c2
3,423
py
Python
examples/run_ransac.py
mscheltienne/pyprep
82920228a1bfe46a8f8c04443547cc2726d3d189
[ "MIT" ]
null
null
null
examples/run_ransac.py
mscheltienne/pyprep
82920228a1bfe46a8f8c04443547cc2726d3d189
[ "MIT" ]
null
null
null
examples/run_ransac.py
mscheltienne/pyprep
82920228a1bfe46a8f8c04443547cc2726d3d189
[ "MIT" ]
null
null
null
""" ================= Run RANSAC ================= In this example we show how to run the RANSAC of ``pyprep``. .. currentmodule:: pyprep """ # noqa: D205 D400 # Authors: Yorguin Mantilla <yjmantilla@gmail.com> # # License: MIT # Based On: use_noisy_module.py ######################################################...
33.558824
82
0.654981
import numpy as np import mne from scipy import signal as signal from time import perf_counter from pyprep.find_noisy_channels import NoisyChannels # We will think of good channels as sine waves and bad channels correlated with # each other as sawtooths. The RANSAC will be biased towards sines in its # prediction (...
true
true
f76434301aa20cb9ccb702805d3031799f0fd6a1
442
py
Python
OmniDB/OmniDB_app/migrations/0003_3_1_0.py
lejmr/OmniDB
52c1c5a726a322f537a8e65f71d77ce322344d35
[ "MIT" ]
2,982
2016-04-12T13:33:50.000Z
2022-03-31T14:16:43.000Z
OmniDB/OmniDB_app/migrations/0003_3_1_0.py
lejmr/OmniDB
52c1c5a726a322f537a8e65f71d77ce322344d35
[ "MIT" ]
704
2016-04-30T14:44:11.000Z
2022-03-18T09:39:41.000Z
OmniDB/OmniDB_app/migrations/0003_3_1_0.py
lejmr/OmniDB
52c1c5a726a322f537a8e65f71d77ce322344d35
[ "MIT" ]
452
2016-04-25T23:50:25.000Z
2022-03-28T15:03:52.000Z
# Generated by Django 3.1.1 on 2020-11-06 13:43 from django.db import migrations def populate_technologies(apps, schema_editor): Technology = apps.get_model('OmniDB_app', 'Technology') Technology(name='sqlite').save() class Migration(migrations.Migration): dependencies = [ ('OmniDB_app', '0002...
20.090909
59
0.653846
from django.db import migrations def populate_technologies(apps, schema_editor): Technology = apps.get_model('OmniDB_app', 'Technology') Technology(name='sqlite').save() class Migration(migrations.Migration): dependencies = [ ('OmniDB_app', '0002_3_0_1'), ] operations = [ migr...
true
true
f7643628d8cf98e925fb7426188780021dc1292d
6,067
py
Python
src/utils/generator.py
datitran/image-super-resolution
3716fe7c72dc8197b8e4796f1d44ce588b1881b9
[ "Apache-2.0" ]
4
2018-12-08T04:14:56.000Z
2021-03-31T15:20:55.000Z
src/utils/generator.py
PaulGureghian1/Image_Super_Resolution
dfa0f2cc429a3f4767a66c7842b7ef663a478875
[ "Apache-2.0" ]
null
null
null
src/utils/generator.py
PaulGureghian1/Image_Super_Resolution
dfa0f2cc429a3f4767a66c7842b7ef663a478875
[ "Apache-2.0" ]
3
2019-04-18T05:01:02.000Z
2020-03-18T20:50:10.000Z
import os import numpy as np import keras.backend as K from imageio import imread from keras.utils import Sequence class Generator(Sequence): """Keras Sequence object to train a model on larger-than-memory data. Creates list of LR input and HR label files (images) locations. Lists are filtered by extensio...
38.157233
116
0.589913
import os import numpy as np import keras.backend as K from imageio import imread from keras.utils import Sequence class Generator(Sequence): def __init__( self, input_folder, label_folder, batch_size, mode='train', patch_size=None, scale=None, n_va...
true
true
f76436cf4d9a093e30ebb57d1c459d337cc95069
994
py
Python
nodegraph.py
Correct-Syntax/gsnodegraph
03841900253807cdedb4e7844cc8637923b71a69
[ "Apache-2.0" ]
1
2021-04-06T03:46:44.000Z
2021-04-06T03:46:44.000Z
nodegraph.py
Correct-Syntax/gsnodegraph
03841900253807cdedb4e7844cc8637923b71a69
[ "Apache-2.0" ]
null
null
null
nodegraph.py
Correct-Syntax/gsnodegraph
03841900253807cdedb4e7844cc8637923b71a69
[ "Apache-2.0" ]
null
null
null
# ---------------------------------------------------------------------------- # GS Nodegraph Copyright 2019-2021 by Noah Rahm and contributors # # 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...
35.5
78
0.639839
import wx from gsnodegraph import NodeGraphBase from gsnodegraph.constants import * class NodeGraph(NodeGraphBase): def __init__(self, parent, registry, **kwds): NodeGraphBase.__init__(self, parent, **kwds)
true
true
f76437285d7955566aa552e887b866d99c54f950
699
py
Python
chapter03/template_url_demo/template_url_demo/views.py
Tomtao626/django
fe945063593b4bfe82d74842f728b854b501a294
[ "Apache-2.0" ]
null
null
null
chapter03/template_url_demo/template_url_demo/views.py
Tomtao626/django
fe945063593b4bfe82d74842f728b854b501a294
[ "Apache-2.0" ]
null
null
null
chapter03/template_url_demo/template_url_demo/views.py
Tomtao626/django
fe945063593b4bfe82d74842f728b854b501a294
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2020/6/2 23:02 # @Author : Tom_tao # @Site : # @File : views.py # @Software: PyCharm from django.http import HttpResponse from django.shortcuts import render def index(request): return render(request, "index.html") def login(request): next = request....
18.394737
54
0.67382
from django.http import HttpResponse from django.shortcuts import render def index(request): return render(request, "index.html") def login(request): next = request.GET.get("next") text = "登录页面,登陆成功要跳转的url是:%s" % next return HttpResponse(text) def book(request): return HttpResponse("图书首页") ...
true
true
f76437ab077a7cce8471fe34b261d2e5f710cbd5
1,626
py
Python
examples/lorem.py
movermeyer/colorise
e630df74b8b27680a43c370ddbe98766be50158c
[ "MIT" ]
null
null
null
examples/lorem.py
movermeyer/colorise
e630df74b8b27680a43c370ddbe98766be50158c
[ "MIT" ]
null
null
null
examples/lorem.py
movermeyer/colorise
e630df74b8b27680a43c370ddbe98766be50158c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Demonstrates how colorise automatically reset colors when quit.""" __date__ = "2014-05-21" # YYYY-MM-DD import colorise ipsum = """Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat ...
42.789474
72
0.791513
__date__ = "2014-05-21" import colorise ipsum = """Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo co...
true
true
f76438030ff06393c9cbbfd7856c88b39fe2abb8
9,227
py
Python
battleEngine.py
Timmy2005/Zortria
d2d9e28b5cb79a83db264688f0f8f0b086e57cdd
[ "MIT" ]
1
2016-01-15T02:42:41.000Z
2016-01-15T02:42:41.000Z
battleEngine.py
Timmy2005/Zortria
d2d9e28b5cb79a83db264688f0f8f0b086e57cdd
[ "MIT" ]
null
null
null
battleEngine.py
Timmy2005/Zortria
d2d9e28b5cb79a83db264688f0f8f0b086e57cdd
[ "MIT" ]
1
2016-01-30T23:13:04.000Z
2016-01-30T23:13:04.000Z
import time import random global beastHealth global attackOption global runOption global playerHealth global monsterName global monsterHealth global monsterHealthxp global xp global playerHealthgain global random_money global money global Sword global BowAndArrow global using_sword global using_bow_and_arrow global le...
25.418733
99
0.633467
import time import random global beastHealth global attackOption global runOption global playerHealth global monsterName global monsterHealth global monsterHealthxp global xp global playerHealthgain global random_money global money global Sword global BowAndArrow global using_sword global using_bow_and_arrow global le...
false
true
f7643a6581884e8fbc282b8b34d83e90d0f63d01
361
py
Python
examples/jmeter_listener_example.py
Maffey/locust-plugins
fef7d089120a18a3cece381bdee140d1aba707d0
[ "Apache-2.0" ]
null
null
null
examples/jmeter_listener_example.py
Maffey/locust-plugins
fef7d089120a18a3cece381bdee140d1aba707d0
[ "Apache-2.0" ]
null
null
null
examples/jmeter_listener_example.py
Maffey/locust-plugins
fef7d089120a18a3cece381bdee140d1aba707d0
[ "Apache-2.0" ]
null
null
null
from locust import HttpUser, task, events from locust_plugins import jmeter_listener class DemoBlazeUser(HttpUser): host = "https://www.demoblaze.com" @task def t(self): self.client.get("/") @events.init.add_listener def on_locust_init(environment, **kwargs): jmeter_listener.JmeterListener(...
22.5625
75
0.736842
from locust import HttpUser, task, events from locust_plugins import jmeter_listener class DemoBlazeUser(HttpUser): host = "https://www.demoblaze.com" @task def t(self): self.client.get("/") @events.init.add_listener def on_locust_init(environment, **kwargs): jmeter_listener.JmeterListener(...
true
true
f7643a7b3fa18eb08b646d30496d78dd3003e2a7
971
py
Python
script.py
bongo264/office_talk
b2d267efacbe34d8080da711f21e8bb3fc47aa64
[ "MIT" ]
null
null
null
script.py
bongo264/office_talk
b2d267efacbe34d8080da711f21e8bb3fc47aa64
[ "MIT" ]
null
null
null
script.py
bongo264/office_talk
b2d267efacbe34d8080da711f21e8bb3fc47aa64
[ "MIT" ]
null
null
null
import socket # import multiprocessing # start keeping notes def Main(): host = '127.0.0.1' port = 5000 s = socket.socket() s.bind((host, port)) # make listening a differnt thread # when connection made from client quit listening # when makeing connection quit to another server # beco...
25.552632
53
0.581874
import socket def Main(): host = '127.0.0.1' port = 5000 s = socket.socket() s.bind((host, port)) s.listen(3) print('here we go') c, addr = s.accept() print ('what is this ' + str(c)) print ('Connection from: ' + str(addr)) while True: incoming ...
true
true
f7643b5ec857b15f1803ac418924e664fa539002
11,478
py
Python
terra/figures/flowchart.py
VAW-SwissTerra/SwissTerra
c681ade9064fea6b035bb184280f33df5baebfad
[ "Apache-2.0" ]
3
2020-11-14T22:31:25.000Z
2022-02-20T19:21:57.000Z
terra/figures/flowchart.py
VAW-SwissTerra/SwissTerra
c681ade9064fea6b035bb184280f33df5baebfad
[ "Apache-2.0" ]
1
2020-11-03T08:22:29.000Z
2020-11-03T08:22:29.000Z
terra/figures/flowchart.py
VAW-SwissTerra/SwissTerra
c681ade9064fea6b035bb184280f33df5baebfad
[ "Apache-2.0" ]
null
null
null
import os import tempfile import time import graphviz from terra import files EXTERNAL_INPUT_STYLE = dict(fillcolor="skyblue", shape="box", style="filled", fontcolor="black") INTERNAL_INPUT_STYLE = dict(fillcolor="plum", style="filled", fontcolor="black") INTERMEDIATE_FILE_STYLE = dict(fillcolor="lightgray", style="...
49.261803
115
0.732532
import os import tempfile import time import graphviz from terra import files EXTERNAL_INPUT_STYLE = dict(fillcolor="skyblue", shape="box", style="filled", fontcolor="black") INTERNAL_INPUT_STYLE = dict(fillcolor="plum", style="filled", fontcolor="black") INTERMEDIATE_FILE_STYLE = dict(fillcolor="lightgray", style="...
true
true
f7643b98481d4fe3633b200b86df48796f35703a
1,706
py
Python
profiles_api/migrations/0001_initial.py
stuntbadger/profiles-rest-api
1e4af74a458c40c9a8e015f7fdfeefa4168af1d6
[ "MIT" ]
null
null
null
profiles_api/migrations/0001_initial.py
stuntbadger/profiles-rest-api
1e4af74a458c40c9a8e015f7fdfeefa4168af1d6
[ "MIT" ]
4
2021-03-19T11:24:50.000Z
2021-06-10T20:20:41.000Z
profiles_api/migrations/0001_initial.py
stuntbadger/profiles-rest-api
1e4af74a458c40c9a8e015f7fdfeefa4168af1d6
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2020-06-11 11:27 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='UserProfile', ...
50.176471
266
0.638921
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='UserProfile', fields=[ ('id', models.Aut...
true
true
f7643e2b311d91c16bf16922beb2fcfa02f2d76c
5,873
py
Python
algorithms/q_learning.py
ale8193/reinforcement-learning-openai-gym
0b918701ab190f22c5973bd798961b389d43a2d1
[ "MIT" ]
null
null
null
algorithms/q_learning.py
ale8193/reinforcement-learning-openai-gym
0b918701ab190f22c5973bd798961b389d43a2d1
[ "MIT" ]
null
null
null
algorithms/q_learning.py
ale8193/reinforcement-learning-openai-gym
0b918701ab190f22c5973bd798961b389d43a2d1
[ "MIT" ]
null
null
null
import numpy as np import sys import math from utils.plotting import EpisodeStats from algorithms.discretization_functions import default_discretization class QLearning: def __init__(self, env, buckets=(1, ), discount_factor=1.0, min_alpha=0.1,...
36.937107
114
0.599864
import numpy as np import sys import math from utils.plotting import EpisodeStats from algorithms.discretization_functions import default_discretization class QLearning: def __init__(self, env, buckets=(1, ), discount_factor=1.0, min_alpha=0.1,...
true
true
f7643e5a72e287780d0bbfa12fd1e9df699795e7
1,695
py
Python
YearI/SemesterI/C++/Other/26-07-2019/numbers/main.py
sudiptog81/ducscode
4a60fb6d9a5769f9c487d0a65e557632af469903
[ "MIT" ]
7
2020-03-18T09:17:03.000Z
2022-01-12T09:36:45.000Z
YearI/SemesterI/C++/Other/26-07-2019/numbers/main.py
gourabdas-88006/ducscode
19f047e02f43af430f904782850a66be32b0ff89
[ "MIT" ]
1
2020-08-27T10:33:00.000Z
2020-08-27T10:33:00.000Z
YearI/SemesterI/C++/Other/26-07-2019/numbers/main.py
gourabdas-88006/ducscode
19f047e02f43af430f904782850a66be32b0ff89
[ "MIT" ]
4
2020-04-23T14:52:03.000Z
2021-10-03T19:55:27.000Z
def sum(a, b): """Returns sum Arguments: a {int} -- Input 1 b {int} -- Input 2 Returns: sum -- Sum """ return a + b def difference(a, b): """Returns difference Arguments: a {int} -- Input 1 b {int} -- Input 2 Returns: ...
18.225806
63
0.436578
def sum(a, b): return a + b def difference(a, b): return a - b def product(a, b): return a * b def quotient(a, b): if (b == 0): return 0 return a / b def modulus(a, b): if (b == 0): return 0 return a % b def getInputs(): return int(input...
true
true
f7643e8efe9edaf620de930832cba83eab9eabc1
524
py
Python
mysite/polls/admin.py
pjconnolly12/Django-Polls-App
98ec22e31e6393f735b03596322b57830995ea0f
[ "MIT" ]
null
null
null
mysite/polls/admin.py
pjconnolly12/Django-Polls-App
98ec22e31e6393f735b03596322b57830995ea0f
[ "MIT" ]
null
null
null
mysite/polls/admin.py
pjconnolly12/Django-Polls-App
98ec22e31e6393f735b03596322b57830995ea0f
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Choice, Question class ChoiceInline(admin.TabularInline): model = Choice extra = 3 class QuestionAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['question_text']}), ('Date information', {'fields': ['pub_date'], 'classes': ['collapse']}), ] inl...
24.952381
71
0.717557
from django.contrib import admin from .models import Choice, Question class ChoiceInline(admin.TabularInline): model = Choice extra = 3 class QuestionAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['question_text']}), ('Date information', {'fields': ['pub_date'], 'classes': ['collapse']}), ] inl...
true
true
f7643edcf4d323616a5726e63ccca561c4cdee24
4,847
py
Python
huaweicloud-sdk-campusgo/huaweicloudsdkcampusgo/v2/model/task_output_for_display.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-campusgo/huaweicloudsdkcampusgo/v2/model/task_output_for_display.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-campusgo/huaweicloudsdkcampusgo/v2/model/task_output_for_display.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8 import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class TaskOutputForDisplay: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The k...
25.781915
79
0.561791
import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class TaskOutputForDisplay: sensitive_list = [] openapi_types = { 'obs': 'TaskOutputObs', 'dis': 'TaskOutputDis', 'webhook': 'TaskOutputWebhook', 'localpath': 'TaskOutputLoca...
true
true
f7643f13351c96d8a9d2038bf040329f48797897
2,254
py
Python
examples/reaction_wheel/rxnw.py
certik/pydy
d201b75d3e8fd8295b375e52eb4ce4c1f35adfb4
[ "BSD-3-Clause" ]
1
2016-05-09T06:57:10.000Z
2016-05-09T06:57:10.000Z
examples/reaction_wheel/rxnw.py
certik/pydy
d201b75d3e8fd8295b375e52eb4ce4c1f35adfb4
[ "BSD-3-Clause" ]
null
null
null
examples/reaction_wheel/rxnw.py
certik/pydy
d201b75d3e8fd8295b375e52eb4ce4c1f35adfb4
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python from pydy import * from sympy import solve # Declare a Newtonian Reference Frame N = NewtonianReferenceFrame('N') # Declare parameters, coordinates, and speeds m1, m2, I1, I2, J1, J2, l, M = N.declare_parameters('m1 m2 I1 I2 J1 J2 l M') (q1, q2, q3, q4, q5, q6, q7, q8), q_list, qdot_list = N.dec...
35.777778
78
0.629104
from pydy import * from sympy import solve N = NewtonianReferenceFrame('N') m1, m2, I1, I2, J1, J2, l, M = N.declare_parameters('m1 m2 I1 I2 J1 J2 l M') (q1, q2, q3, q4, q5, q6, q7, q8), q_list, qdot_list = N.declare_coords('q', 8) (u1, u2, u3, u4, u5, u6, u7, u8), u_list, udot_list = N.declare_speeds('u', 8) A = N....
false
true
f7643fa911373356d9e55af897e1353e22465aa1
253
py
Python
tools/resetPad.py
RahulShagri/SimpleDrawing-Desktop-App
13d450b1d734e1409687a75dec4f294cbb13753b
[ "MIT" ]
12
2021-03-13T20:02:53.000Z
2022-02-09T13:06:09.000Z
tools/resetPad.py
RahulShagri/SimpleDrawing-Desktop-App
13d450b1d734e1409687a75dec4f294cbb13753b
[ "MIT" ]
27
2021-03-07T06:39:13.000Z
2021-07-02T06:03:45.000Z
tools/resetPad.py
RahulShagri/SimpleDrawing-Desktop-App
13d450b1d734e1409687a75dec4f294cbb13753b
[ "MIT" ]
1
2021-11-21T13:26:23.000Z
2021-11-21T13:26:23.000Z
from dearpygui.core import * from db_manage import reset_db def resetPad(pad_name): # Erase all lines from the drawing pad clear_drawing(pad_name) set_item_color("Drawing Pad", style=mvGuiCol_WindowBg, color=[255, 255, 255]) reset_db()
28.111111
81
0.743083
from dearpygui.core import * from db_manage import reset_db def resetPad(pad_name): clear_drawing(pad_name) set_item_color("Drawing Pad", style=mvGuiCol_WindowBg, color=[255, 255, 255]) reset_db()
true
true
f7643fb5e6fe40d6b7daf45639d6672e0ccda93a
338
py
Python
leetcode/0027 Remove Element.py
jaredliw/python-question-bank
9c8c246623d8d171f875700b57772df0afcbdcdf
[ "MIT" ]
1
2021-04-08T07:49:15.000Z
2021-04-08T07:49:15.000Z
leetcode/0027 Remove Element.py
jaredliw/leetcode-solutions
9c8c246623d8d171f875700b57772df0afcbdcdf
[ "MIT" ]
null
null
null
leetcode/0027 Remove Element.py
jaredliw/leetcode-solutions
9c8c246623d8d171f875700b57772df0afcbdcdf
[ "MIT" ]
1
2022-01-23T02:12:24.000Z
2022-01-23T02:12:24.000Z
class Solution(object): def removeElement(self, nums, val): """ :type nums: List[int] :type val: int :rtype: int """ # Runtime: 16 ms # Memory: 13.5 MB try: while True: nums.remove(val) except ValueError: ...
22.533333
39
0.45858
class Solution(object): def removeElement(self, nums, val): try: while True: nums.remove(val) except ValueError: return len(nums)
true
true
f76441a08c702d97af385c4a7e33e4b98c5ff27f
425
py
Python
Python/807.py
RideGreg/LeetCode
b70818b1e6947bf29519a24f78816e022ebab59e
[ "MIT" ]
1
2022-01-30T06:55:28.000Z
2022-01-30T06:55:28.000Z
Python/807.py
RideGreg/LeetCode
b70818b1e6947bf29519a24f78816e022ebab59e
[ "MIT" ]
null
null
null
Python/807.py
RideGreg/LeetCode
b70818b1e6947bf29519a24f78816e022ebab59e
[ "MIT" ]
1
2021-12-31T03:56:39.000Z
2021-12-31T03:56:39.000Z
class Solution(object): def maxIncreaseKeepingSkyline(self, grid): rm = [max(r) for r in grid] cm = [max(c) for c in zip(*grid)] #print rm, cm ans = 0 for i in xrange(len(grid)): for j in xrange(len(grid[0])): ans += min(rm[i], cm[j]) - grid[i][j] ...
35.416667
85
0.524706
class Solution(object): def maxIncreaseKeepingSkyline(self, grid): rm = [max(r) for r in grid] cm = [max(c) for c in zip(*grid)] ans = 0 for i in xrange(len(grid)): for j in xrange(len(grid[0])): ans += min(rm[i], cm[j]) - grid[i][j] return...
false
true
f76441c745ad9927d51e74692e2395f9e4846e0a
1,367
py
Python
applications/publications/views.py
samay-rgb/alumni
f147ca04c3b9e24307321df5f26e9f7db26fefe3
[ "MIT" ]
5
2019-10-15T14:48:39.000Z
2022-02-19T05:14:51.000Z
applications/publications/views.py
samay-rgb/alumni
f147ca04c3b9e24307321df5f26e9f7db26fefe3
[ "MIT" ]
10
2019-12-14T06:08:30.000Z
2022-03-13T16:01:05.000Z
applications/publications/views.py
samay-rgb/alumni
f147ca04c3b9e24307321df5f26e9f7db26fefe3
[ "MIT" ]
10
2019-10-06T13:45:25.000Z
2022-02-10T17:33:39.000Z
from django.shortcuts import render from django.http import HttpRequest from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.views.generic import DetailView from django.db.models import Count from .models import Publication, PublicationMedia def index(request): publication_list = P...
36.945946
124
0.727871
from django.shortcuts import render from django.http import HttpRequest from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.views.generic import DetailView from django.db.models import Count from .models import Publication, PublicationMedia def index(request): publication_list = P...
true
true
f764420a8a5431e2c88c3a04c44e7480fc6fc965
701
py
Python
t9/__init__.py
whoareyou0401/mytest
c634f20157ee8aec5408d75708b458085878e832
[ "Apache-2.0" ]
null
null
null
t9/__init__.py
whoareyou0401/mytest
c634f20157ee8aec5408d75708b458085878e832
[ "Apache-2.0" ]
null
null
null
t9/__init__.py
whoareyou0401/mytest
c634f20157ee8aec5408d75708b458085878e832
[ "Apache-2.0" ]
null
null
null
from django.db.models.signals import pre_save, post_save from django.core.signals import request_finished from django.dispatch import receiver from .my_singal import action def pre_save_model(sender, **kwargs): print(sender) print(kwargs) def post_save_func(sender, **kwargs): # 记个日志 print...
22.612903
57
0.726106
from django.db.models.signals import pre_save, post_save from django.core.signals import request_finished from django.dispatch import receiver from .my_singal import action def pre_save_model(sender, **kwargs): print(sender) print(kwargs) def post_save_func(sender, **kwargs): print('发送者',s...
true
true
f76442bfbf2928f29006a04845eaa1992f018218
3,127
py
Python
scripts/plottingScripts/sysAvailabilityTimeline.py
Hieronymus98/Distributed-Batteryless-Microphone
9924582a46d23cf580f9b8acc998f650cb022bc6
[ "MIT" ]
1
2020-10-01T15:32:53.000Z
2020-10-01T15:32:53.000Z
scripts/plottingScripts/sysAvailabilityTimeline.py
Hieronymus98/Distributed-Batteryless-Microphone
9924582a46d23cf580f9b8acc998f650cb022bc6
[ "MIT" ]
null
null
null
scripts/plottingScripts/sysAvailabilityTimeline.py
Hieronymus98/Distributed-Batteryless-Microphone
9924582a46d23cf580f9b8acc998f650cb022bc6
[ "MIT" ]
1
2021-03-20T07:46:54.000Z
2021-03-20T07:46:54.000Z
from inspect import currentframe, getframeinfo import numpy as np import matplotlib.pyplot as plt import json plt.style.use('seaborn-ticks') # To disable debugging set it to False # To print all debugging info set the second entry to 0 # To print a specific message set its id DEBUG = [False, 0] def print_debug_info(l...
31.908163
110
0.649504
from inspect import currentframe, getframeinfo import numpy as np import matplotlib.pyplot as plt import json plt.style.use('seaborn-ticks') DEBUG = [False, 0] def print_debug_info(label,msg, id): if DEBUG[0]: if DEBUG[1] == 0 or DEBUG[1] == id: print(label) print(msg) def load_ci...
true
true
f76442d6b72486bd3847b90da227821587eeb47e
6,640
py
Python
onadata/apps/api/viewsets/xform_list_api.py
owenbeers-agriai/kobocat
576e4ce09397de47b22f05fc8bb649101ea41768
[ "BSD-2-Clause" ]
null
null
null
onadata/apps/api/viewsets/xform_list_api.py
owenbeers-agriai/kobocat
576e4ce09397de47b22f05fc8bb649101ea41768
[ "BSD-2-Clause" ]
null
null
null
onadata/apps/api/viewsets/xform_list_api.py
owenbeers-agriai/kobocat
576e4ce09397de47b22f05fc8bb649101ea41768
[ "BSD-2-Clause" ]
null
null
null
# coding: utf-8 import pytz from datetime import datetime from django.conf import settings from django.http import Http404 from django.shortcuts import get_object_or_404 from rest_framework import viewsets from rest_framework import permissions from rest_framework.response import Response from rest_framework.decorator...
42.292994
121
0.658735
import pytz from datetime import datetime from django.conf import settings from django.http import Http404 from django.shortcuts import get_object_or_404 from rest_framework import viewsets from rest_framework import permissions from rest_framework.response import Response from rest_framework.decorators import action ...
true
true
f76443293f811506c78739f6cc43a374ff5174f8
999
py
Python
sols/1024.py
Paul11100/LeetCode
9896c579dff1812c0c76964db8d60603ee715e35
[ "MIT" ]
null
null
null
sols/1024.py
Paul11100/LeetCode
9896c579dff1812c0c76964db8d60603ee715e35
[ "MIT" ]
null
null
null
sols/1024.py
Paul11100/LeetCode
9896c579dff1812c0c76964db8d60603ee715e35
[ "MIT" ]
null
null
null
from collections import defaultdict class Solution: # Dict (Accepted), O(n) time and space def videoStitching(self, clips: List[List[int]], time: int) -> int: d = defaultdict(int) for start, end in clips: if start < time: d[start] = max(d[start], end) prev, ...
29.382353
71
0.449449
from collections import defaultdict class Solution: def videoStitching(self, clips: List[List[int]], time: int) -> int: d = defaultdict(int) for start, end in clips: if start < time: d[start] = max(d[start], end) prev, new, res = -1, 0, 0 while new <...
true
true
f764448f4ddcea501b4ee1a706fd461924d0c006
1,112
py
Python
ddpg/action_noise.py
MillionIntegrals/ddpg-tensorflow
7a61b14ed47766e8cdf70121570e5a0a5a241f02
[ "MIT" ]
null
null
null
ddpg/action_noise.py
MillionIntegrals/ddpg-tensorflow
7a61b14ed47766e8cdf70121570e5a0a5a241f02
[ "MIT" ]
1
2021-09-08T00:59:23.000Z
2021-09-08T00:59:23.000Z
ddpg/action_noise.py
MillionIntegrals/ddpg-tensorflow
7a61b14ed47766e8cdf70121570e5a0a5a241f02
[ "MIT" ]
null
null
null
import numpy as np class OrnsteinUhlenbeckNoiseProcess: """ Taken from https://github.com/openai/baselines/blob/master/baselines/ddpg/noise.py """ def __init__(self, mu, sigma, theta=.15, dt=1e-2, x0=None): self.theta = theta self.mu = mu self.sigma = sigma self.dt = dt...
28.512821
143
0.614209
import numpy as np class OrnsteinUhlenbeckNoiseProcess: def __init__(self, mu, sigma, theta=.15, dt=1e-2, x0=None): self.theta = theta self.mu = mu self.sigma = sigma self.dt = dt self.x0 = x0 self.x_prev = None self.reset() def __call__(self): ...
true
true
f76444b920cee19ab4c9740b5b6e0f378654554d
5,621
py
Python
tfx/examples/iris/iris_pipeline_beam.py
romiosarkar6991/tfx-romio
0703c1dd037c676e1d438c2e5ce831decfc9eed9
[ "Apache-2.0" ]
1
2019-10-10T06:06:12.000Z
2019-10-10T06:06:12.000Z
tfx/examples/iris/iris_pipeline_beam.py
romiosarkar6991/tfx-romio
0703c1dd037c676e1d438c2e5ce831decfc9eed9
[ "Apache-2.0" ]
null
null
null
tfx/examples/iris/iris_pipeline_beam.py
romiosarkar6991/tfx-romio
0703c1dd037c676e1d438c2e5ce831decfc9eed9
[ "Apache-2.0" ]
1
2019-10-10T06:06:11.000Z
2019-10-10T06:06:11.000Z
# Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
41.947761
80
0.760541
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tensorflow as tf from typing import Text from tfx.components.evaluator.component import Evaluator from tfx.components.example_gen.csv_example_gen.component import CsvExampleGen from tfx.compon...
true
true
f76444d130de33ebb88ab9acceb0d4ea5bc4ae2b
10,380
py
Python
simpleCoin/miner.py
skadrex/SimpleCoin
8950c3194434f55d57a1b92caa00ab5d89f2fb6d
[ "MIT" ]
null
null
null
simpleCoin/miner.py
skadrex/SimpleCoin
8950c3194434f55d57a1b92caa00ab5d89f2fb6d
[ "MIT" ]
null
null
null
simpleCoin/miner.py
skadrex/SimpleCoin
8950c3194434f55d57a1b92caa00ab5d89f2fb6d
[ "MIT" ]
null
null
null
import time import hashlib import json import requests import base64 from flask import Flask, request from multiprocessing import Process, Pipe import ecdsa from miner_config import MINER_ADDRESS, MINER_NODE_URL, PEER_NODES node = Flask(__name__) class Block: def __init__(self, index, timestamp, data, previous_...
38.444444
128
0.637091
import time import hashlib import json import requests import base64 from flask import Flask, request from multiprocessing import Process, Pipe import ecdsa from miner_config import MINER_ADDRESS, MINER_NODE_URL, PEER_NODES node = Flask(__name__) class Block: def __init__(self, index, timestamp, data, previous_...
true
true