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
1c3cb76b137c8a4ff0c211834b0357f6db6281d5
5,081
py
Python
demisto_client/demisto_api/models/version.py
ekmixon/demisto-py
187163a148cb782b289c71d97ec4efffa898ec94
[ "Apache-2.0" ]
59
2017-05-04T05:48:00.000Z
2022-02-27T21:06:01.000Z
demisto_client/demisto_api/models/version.py
ekmixon/demisto-py
187163a148cb782b289c71d97ec4efffa898ec94
[ "Apache-2.0" ]
44
2017-05-09T17:42:43.000Z
2022-03-30T05:55:44.000Z
demisto_client/demisto_api/models/version.py
ekmixon/demisto-py
187163a148cb782b289c71d97ec4efffa898ec94
[ "Apache-2.0" ]
37
2017-05-06T04:30:32.000Z
2022-02-15T04:59:00.000Z
# coding: utf-8 """ Demisto API This is the public REST API to integrate with the demisto server. HTTP request can be sent using any HTTP-client. For an example dedicated client take a look at: https://github.com/demisto/demisto-py. Requests must include API-key that can be generated in the Demisto web clie...
35.78169
1,584
0.598701
import pprint import re import six class Version(object): swagger_types = { 'digits': 'list[int]', 'label': 'str' } attribute_map = { 'digits': 'Digits', 'label': 'Label' } def __init__(self, digits=None, label=None): self._digits = None ...
true
true
1c3cb84dbc174f8512a27b82679ac9261528c1fb
34
py
Python
core/plugins/transifex/__init__.py
purecloudlabs/translation-process-automation
ea65a5c35a9490bce57e6dc0104b1b86f4fc8ddf
[ "MIT" ]
null
null
null
core/plugins/transifex/__init__.py
purecloudlabs/translation-process-automation
ea65a5c35a9490bce57e6dc0104b1b86f4fc8ddf
[ "MIT" ]
null
null
null
core/plugins/transifex/__init__.py
purecloudlabs/translation-process-automation
ea65a5c35a9490bce57e6dc0104b1b86f4fc8ddf
[ "MIT" ]
null
null
null
""" tpa transifex repository. """
11.333333
29
0.647059
true
true
1c3cb88540c2987a48b80aa887651be62cf7e943
4,075
py
Python
travis_pypi_setup.py
BenMusch/s3qlite
a35c0ebc3fe35fffb6770e36e12e791ecd1cc250
[ "MIT" ]
null
null
null
travis_pypi_setup.py
BenMusch/s3qlite
a35c0ebc3fe35fffb6770e36e12e791ecd1cc250
[ "MIT" ]
4
2018-02-02T04:32:46.000Z
2018-02-05T15:16:06.000Z
travis_pypi_setup.py
BenMusch/s3qlite
a35c0ebc3fe35fffb6770e36e12e791ecd1cc250
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Update encrypted deploy password in Travis config file.""" from __future__ import print_function import base64 import json import os from getpass import getpass import yaml from cryptography.hazmat.primitives.serialization import load_pem_public_key from cryptography.h...
31.835938
79
0.700613
from __future__ import print_function import base64 import json import os from getpass import getpass import yaml from cryptography.hazmat.primitives.serialization import load_pem_public_key from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.asymmetric.padding import PKCS1v...
true
true
1c3cb980120189e86874d69bdc3db897df3db062
5,153
py
Python
eval.py
Robert-Hammond/Super-SloMo
393bfb3ae15a901ad511635f569e409de5c8f5f9
[ "MIT" ]
2,754
2018-12-27T02:50:33.000Z
2022-03-30T07:55:38.000Z
eval.py
Robert-Hammond/Super-SloMo
393bfb3ae15a901ad511635f569e409de5c8f5f9
[ "MIT" ]
95
2018-12-28T04:31:25.000Z
2022-03-26T12:20:07.000Z
eval.py
Robert-Hammond/Super-SloMo
393bfb3ae15a901ad511635f569e409de5c8f5f9
[ "MIT" ]
501
2018-12-27T07:21:57.000Z
2022-03-28T05:41:36.000Z
""" Converts a Video to SuperSloMo version """ from time import time import click import cv2 import torch from PIL import Image import numpy as np import model from torchvision import transforms from torch.functional import F torch.set_grad_enabled(False) device = torch.device("cuda" if torch.cuda.is_available() else...
28.949438
99
0.605278
from time import time import click import cv2 import torch from PIL import Image import numpy as np import model from torchvision import transforms from torch.functional import F torch.set_grad_enabled(False) device = torch.device("cuda" if torch.cuda.is_available() else "cpu") trans_forward = transforms.ToTensor() ...
true
true
1c3cb9ecbb3df30bfc9f2d479fbb9378e8a24818
4,777
py
Python
scripts/dht_node.py
nishp77/lbry-sdk
7531401623a393a1491e3b65de0e2a65f8e45020
[ "MIT" ]
null
null
null
scripts/dht_node.py
nishp77/lbry-sdk
7531401623a393a1491e3b65de0e2a65f8e45020
[ "MIT" ]
null
null
null
scripts/dht_node.py
nishp77/lbry-sdk
7531401623a393a1491e3b65de0e2a65f8e45020
[ "MIT" ]
null
null
null
import asyncio import argparse import logging import csv from io import StringIO from typing import Optional from aiohttp import web from prometheus_client import generate_latest as prom_generate_latest, Gauge from lbry.dht.constants import generate_id from lbry.dht.node import Node from lbry.dht.peer import PeerManag...
43.825688
136
0.675529
import asyncio import argparse import logging import csv from io import StringIO from typing import Optional from aiohttp import web from prometheus_client import generate_latest as prom_generate_latest, Gauge from lbry.dht.constants import generate_id from lbry.dht.node import Node from lbry.dht.peer import PeerManag...
true
true
1c3cba20c7bb308310ab68189d20d39b0c185720
970
py
Python
lib/taurus/qt/qtgui/taurusgui/conf/tgconf_macrogui/__init__.py
mrosanes/taurus_deb
119bf27193af0bbaaececf054eefb78beb6f117a
[ "CC-BY-3.0" ]
1
2016-10-19T13:54:08.000Z
2016-10-19T13:54:08.000Z
lib/taurus/qt/qtgui/taurusgui/conf/tgconf_macrogui/__init__.py
mrosanes/taurus_deb
119bf27193af0bbaaececf054eefb78beb6f117a
[ "CC-BY-3.0" ]
27
2016-05-25T08:56:58.000Z
2019-01-21T09:18:08.000Z
lib/taurus/qt/qtgui/taurusgui/conf/tgconf_macrogui/__init__.py
mrosanes/taurus_deb
119bf27193af0bbaaececf054eefb78beb6f117a
[ "CC-BY-3.0" ]
8
2015-07-24T09:16:50.000Z
2018-06-12T12:33:59.000Z
#!/usr/bin/env python ############################################################################# ## # This file is part of Taurus ## # http://taurus-scada.org ## # Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## # Taurus is free software: you can redistribute it and/or modify # it under the terms of t...
35.925926
77
0.626804
true
true
1c3cba2b6886a5a8031531b3445f65d1fcd6c618
1,869
py
Python
Study-Basic/005_study_json.py
Cpaul777/Script-Archive
2c2d99d41206d98486d9aebdf1acbb0c06b4513d
[ "MIT" ]
4
2021-01-28T12:01:08.000Z
2021-01-28T14:04:45.000Z
Study-Basic/005_study_json.py
Xzlaynveir-Deirdre/Script-Archive
e937129466ebd15272c23df76d3b8a459e62a51d
[ "MIT" ]
null
null
null
Study-Basic/005_study_json.py
Xzlaynveir-Deirdre/Script-Archive
e937129466ebd15272c23df76d3b8a459e62a51d
[ "MIT" ]
1
2021-12-18T11:17:51.000Z
2021-12-18T11:17:51.000Z
"""Link for the source video https://youtu.be/9N6a-VLBa2I""" import json SOME_DATA = ''' { "test_variable": [ { "test_key_1":"test_value_1", "test_key_2":"test_vaoue_2", "test_key_3":"test_value_3" }, { "test_key_1":"test_value_4", "test_key_2":"test_vaoue_5", "test_k...
21.732558
93
0.663991
import json SOME_DATA = ''' { "test_variable": [ { "test_key_1":"test_value_1", "test_key_2":"test_vaoue_2", "test_key_3":"test_value_3" }, { "test_key_1":"test_value_4", "test_key_2":"test_vaoue_5", "test_key_3":"test_value_6" } ] } ''' print(type(SOME_DATA)) ...
true
true
1c3cbd21d51b2ab73a47dbb655c309eb0c3a97d5
78,740
py
Python
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/operations/_resources_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
1
2021-09-07T18:35:49.000Z
2021-09-07T18:35:49.000Z
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/operations/_resources_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
4
2019-04-17T17:57:49.000Z
2020-04-24T21:11:22.000Z
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/operations/_resources_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
1
2019-04-05T18:17:43.000Z
2019-04-05T18:17:43.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
51.12987
223
0.660859
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impor...
true
true
1c3cbd32e097be9b631ffcf635e4b4af3d1bc5b0
2,707
py
Python
tests/gold_tests/tls_hooks/tls_hooks15.test.py
cmcfarlen/trafficserver
2aa1d3106398eb082e5a454212b0273c63d5f69d
[ "Apache-2.0" ]
1,351
2015-01-03T08:25:40.000Z
2022-03-31T09:14:08.000Z
tests/gold_tests/tls_hooks/tls_hooks15.test.py
cmcfarlen/trafficserver
2aa1d3106398eb082e5a454212b0273c63d5f69d
[ "Apache-2.0" ]
7,009
2015-01-14T16:22:45.000Z
2022-03-31T17:18:04.000Z
tests/gold_tests/tls_hooks/tls_hooks15.test.py
cmcfarlen/trafficserver
2aa1d3106398eb082e5a454212b0273c63d5f69d
[ "Apache-2.0" ]
901
2015-01-11T19:21:08.000Z
2022-03-18T18:21:33.000Z
''' Test one delayed preaccept callback ''' # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache Lice...
42.968254
122
0.716661
import os Test.Summary = ''' Test different combinations of TLS handshake hooks to ensure they are applied consistently. ''' ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True) server = Test.MakeOriginServer("server", ssl=True) request_header = {"headers": "GET / HTTP/1.1\r\nHost: www.e...
true
true
1c3cbd6c271b8033194c3ed634f6df820c824a31
1,223
py
Python
project/expenses/migrations/0001_initial.py
MaciejChoromanski/parleto-recruitment-task
f6e459646feea776eba7d10fc17aa34ec32bd5c5
[ "MIT" ]
null
null
null
project/expenses/migrations/0001_initial.py
MaciejChoromanski/parleto-recruitment-task
f6e459646feea776eba7d10fc17aa34ec32bd5c5
[ "MIT" ]
null
null
null
project/expenses/migrations/0001_initial.py
MaciejChoromanski/parleto-recruitment-task
f6e459646feea776eba7d10fc17aa34ec32bd5c5
[ "MIT" ]
null
null
null
# Generated by Django 3.0.3 on 2020-02-05 12:23 import datetime from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Category', ...
33.054054
140
0.572363
import datetime from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Category', fields=[ ('id', models.AutoFie...
true
true
1c3cbdcd5dfef12337865a12e26987f59af43ac2
591
py
Python
29.py
RafaelHuang87/Leet-Code-Practice
7754dcee38ffda18a5759113ef06d7becf4fe728
[ "MIT" ]
null
null
null
29.py
RafaelHuang87/Leet-Code-Practice
7754dcee38ffda18a5759113ef06d7becf4fe728
[ "MIT" ]
null
null
null
29.py
RafaelHuang87/Leet-Code-Practice
7754dcee38ffda18a5759113ef06d7becf4fe728
[ "MIT" ]
null
null
null
class Solution: def divide(self, dividend: int, divisor: int) -> int: if divisor == 0: return 1 << 31 - 1 if dividend == 0: return 0 i = 0 res = 0 p = abs(dividend) q = abs(divisor) while q << i <= p: i = i + 1 for...
23.64
61
0.385787
class Solution: def divide(self, dividend: int, divisor: int) -> int: if divisor == 0: return 1 << 31 - 1 if dividend == 0: return 0 i = 0 res = 0 p = abs(dividend) q = abs(divisor) while q << i <= p: i = i + 1 for...
true
true
1c3cbdec1f47bbbdc448f2d53cb9050ff3f5baa2
13,573
py
Python
gym_compete/policy.py
eunjilisa/CSE291DRL
6b548673e1a974eb9448bb92d6fad9a1ca81bf3c
[ "MIT" ]
null
null
null
gym_compete/policy.py
eunjilisa/CSE291DRL
6b548673e1a974eb9448bb92d6fad9a1ca81bf3c
[ "MIT" ]
null
null
null
gym_compete/policy.py
eunjilisa/CSE291DRL
6b548673e1a974eb9448bb92d6fad9a1ca81bf3c
[ "MIT" ]
null
null
null
"""Abstract policy class and some concrete implementations.""" from gym.spaces import Box import numpy as np from stable_baselines.common.tf_layers import ortho_init from stable_baselines.common.tf_util import seq_to_batch from stable_baselines.common.distributions import DiagGaussianProbabilityDistribution from stabl...
47.458042
117
0.568997
from gym.spaces import Box import numpy as np from stable_baselines.common.tf_layers import ortho_init from stable_baselines.common.tf_util import seq_to_batch from stable_baselines.common.distributions import DiagGaussianProbabilityDistribution from stable_baselines.common.policies import ActorCriticPolicy, Recurrent...
true
true
1c3cbe4e6cb755432845ea56bd4fb85e254cf1a6
5,608
py
Python
tensorpack/predict/config.py
dan-anghel/tensorpack
86fcffbc167e2b703b9abd17d41388311c90fe7c
[ "Apache-2.0" ]
null
null
null
tensorpack/predict/config.py
dan-anghel/tensorpack
86fcffbc167e2b703b9abd17d41388311c90fe7c
[ "Apache-2.0" ]
null
null
null
tensorpack/predict/config.py
dan-anghel/tensorpack
86fcffbc167e2b703b9abd17d41388311c90fe7c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # File: config.py import six from ..compat import tfv1 as tf from ..train.model_desc import ModelDescBase from ..tfutils import get_default_sess_config from ..tfutils.sessinit import JustCurrentSession, SessionInit from ..tfutils.sesscreate import NewSessionCreator from ..tfutils.tower import...
43.138462
120
0.635877
import six from ..compat import tfv1 as tf from ..train.model_desc import ModelDescBase from ..tfutils import get_default_sess_config from ..tfutils.sessinit import JustCurrentSession, SessionInit from ..tfutils.sesscreate import NewSessionCreator from ..tfutils.tower import TowerFunc from ..utils import logger fr...
true
true
1c3cbff4ab1d40397a40289bd608c833483a7609
8,523
py
Python
datalad_neuroimaging/extractors/bids.py
mslw/datalad-neuroimaging
d04807c41a8124cf3e7ff81ba8be7969a64fe7b6
[ "MIT" ]
14
2018-04-01T15:33:31.000Z
2022-02-14T04:10:23.000Z
datalad_neuroimaging/extractors/bids.py
mslw/datalad-neuroimaging
d04807c41a8124cf3e7ff81ba8be7969a64fe7b6
[ "MIT" ]
98
2018-03-29T14:15:40.000Z
2022-03-15T10:49:35.000Z
datalad_neuroimaging/extractors/bids.py
mslw/datalad-neuroimaging
d04807c41a8124cf3e7ff81ba8be7969a64fe7b6
[ "MIT" ]
10
2018-04-09T10:49:32.000Z
2022-02-08T13:08:36.000Z
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 noet: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for the # copyright and license terms. # # ## ### ##...
36.896104
100
0.551801
es. we ignore them here completely # this might yield some false-negatives in theory, but # this case has not been observed in practice yet, hence # doing it cheap for now if f.endswith('.json'): continue md = {} try: ...
true
true
1c3cc00238440b522a77df3b0048d924f52beba3
2,493
py
Python
201005/students_stat.py
EvgenDEP1/python-basics
5afee7422bf25ba9a310d4bc2cf3c90c506b2018
[ "MIT" ]
null
null
null
201005/students_stat.py
EvgenDEP1/python-basics
5afee7422bf25ba9a310d4bc2cf3c90c506b2018
[ "MIT" ]
null
null
null
201005/students_stat.py
EvgenDEP1/python-basics
5afee7422bf25ba9a310d4bc2cf3c90c506b2018
[ "MIT" ]
null
null
null
import json def parse_marks(f_name): result = [] with open(f_name, 'r', encoding='utf-8') as f: for row in f.read().splitlines(): last_name, first_name, patronymic, row_marks = row.split(maxsplit=3) patronymic = patronymic.strip(',') marks = [] for mark ...
30.036145
80
0.515844
import json def parse_marks(f_name): result = [] with open(f_name, 'r', encoding='utf-8') as f: for row in f.read().splitlines(): last_name, first_name, patronymic, row_marks = row.split(maxsplit=3) patronymic = patronymic.strip(',') marks = [] for mark ...
true
true
1c3cc016257a366db21459645375b0508521f0af
2,905
py
Python
sfaira/data/dataloaders/loaders/d10_1101_753806/human_lungparenchyma_2020_10xsequencing_habermann_001.py
johnmous/sfaira
c50240a74530e614ab7681bf9c63b04cb815b361
[ "BSD-3-Clause" ]
null
null
null
sfaira/data/dataloaders/loaders/d10_1101_753806/human_lungparenchyma_2020_10xsequencing_habermann_001.py
johnmous/sfaira
c50240a74530e614ab7681bf9c63b04cb815b361
[ "BSD-3-Clause" ]
null
null
null
sfaira/data/dataloaders/loaders/d10_1101_753806/human_lungparenchyma_2020_10xsequencing_habermann_001.py
johnmous/sfaira
c50240a74530e614ab7681bf9c63b04cb815b361
[ "BSD-3-Clause" ]
null
null
null
import anndata import os import pandas as pd from sfaira.data import DatasetBase class Dataset(DatasetBase): """ TODO extra meta data in obs2 age: columns "Age" contains integer entries and Unknown diseases: column "Diagnosis" contains entries NSIP, cHP, Control, IPF, ILD, Sarcoidosis colum...
39.256757
125
0.64475
import anndata import os import pandas as pd from sfaira.data import DatasetBase class Dataset(DatasetBase): def __init__(self, **kwargs): super().__init__(**kwargs) self.download_url_data = [ "https://ftp.ncbi.nlm.nih.gov/geo/series/GSE135nnn/GSE135893/suppl/GSE135893%5Fmatrix%2Emt...
true
true
1c3cc03dfad022d92941d960e408e42ce7dbf4d1
45
py
Python
Game/python/python_tests.py
TimothyThompkins/InteractiveGame
06042a217ede1239b4a3dd8e5adaa5e28ef7095f
[ "MIT" ]
null
null
null
Game/python/python_tests.py
TimothyThompkins/InteractiveGame
06042a217ede1239b4a3dd8e5adaa5e28ef7095f
[ "MIT" ]
null
null
null
Game/python/python_tests.py
TimothyThompkins/InteractiveGame
06042a217ede1239b4a3dd8e5adaa5e28ef7095f
[ "MIT" ]
null
null
null
elements = bytes([255]) print (elements[0])
11.25
23
0.666667
elements = bytes([255]) print (elements[0])
true
true
1c3cc04ee433c89a91e2b709aabbd8eff08d03bc
2,391
py
Python
tests/covariance/test_empirical.py
OVVO-Financial/precise
ce744cadfca18f4ab77c68cc27bf8d712561127f
[ "MIT" ]
null
null
null
tests/covariance/test_empirical.py
OVVO-Financial/precise
ce744cadfca18f4ab77c68cc27bf8d712561127f
[ "MIT" ]
null
null
null
tests/covariance/test_empirical.py
OVVO-Financial/precise
ce744cadfca18f4ab77c68cc27bf8d712561127f
[ "MIT" ]
null
null
null
import numpy as np from precise.skaters.covariance.runempfactory import emp_pcov, merge_emp_scov from precise.skatertools.syntheticdata.miscellaneous import create_correlated_dataset from precise.skaters.covarianceutil.covfunctions import cov_to_corrcoef from precise.skaters.covarianceutil.datacovfunctions import pco...
39.196721
138
0.645337
import numpy as np from precise.skaters.covariance.runempfactory import emp_pcov, merge_emp_scov from precise.skatertools.syntheticdata.miscellaneous import create_correlated_dataset from precise.skaters.covarianceutil.covfunctions import cov_to_corrcoef from precise.skaters.covarianceutil.datacovfunctions import pco...
true
true
1c3cc1203f4cac5f1b2b738f6bc37136744b4395
3,705
py
Python
core/management/commands/maintenance.py
simpsonw/atmosphere
3a5203ef0b563de3a0e8c8c8715df88186532d7a
[ "BSD-3-Clause" ]
197
2016-12-08T02:33:32.000Z
2022-03-23T14:27:47.000Z
core/management/commands/maintenance.py
simpsonw/atmosphere
3a5203ef0b563de3a0e8c8c8715df88186532d7a
[ "BSD-3-Clause" ]
385
2017-01-03T22:51:46.000Z
2020-12-16T16:20:42.000Z
core/management/commands/maintenance.py
benlazarine/atmosphere
38fad8e4002e510e8b4294f2bb5bc75e8e1817fa
[ "BSD-3-Clause" ]
50
2016-12-08T08:32:25.000Z
2021-12-10T00:21:39.000Z
import os from django.core.management.base import BaseCommand, CommandError from django.conf import settings from django.utils import timezone from dateutil.parser import parse from core.models import MaintenanceRecord from atmosphere.version import git_branch class Command(BaseCommand): help = 'Allows starting ...
31.134454
78
0.57085
import os from django.core.management.base import BaseCommand, CommandError from django.conf import settings from django.utils import timezone from dateutil.parser import parse from core.models import MaintenanceRecord from atmosphere.version import git_branch class Command(BaseCommand): help = 'Allows starting ...
true
true
1c3cc1e31cf57871ffbc2ad2a85ff375039f4f9c
821
py
Python
files_utils.py
acanakoglu/GeCo_5.0
a67d892e9a43c2931517883f60621c4b4f6cc0d0
[ "Apache-2.0" ]
null
null
null
files_utils.py
acanakoglu/GeCo_5.0
a67d892e9a43c2931517883f60621c4b4f6cc0d0
[ "Apache-2.0" ]
null
null
null
files_utils.py
acanakoglu/GeCo_5.0
a67d892e9a43c2931517883f60621c4b4f6cc0d0
[ "Apache-2.0" ]
null
null
null
import os def get_file_name(path): return path.split('/')[-1] def list_files(directory): files = os.listdir(directory) files = [os.path.join(directory, f) for f in files] return files def get_files_triple(directory): ls_list = list_files(directory) meta_set = set(filter(lambda x: x.endswit...
25.65625
97
0.65408
import os def get_file_name(path): return path.split('/')[-1] def list_files(directory): files = os.listdir(directory) files = [os.path.join(directory, f) for f in files] return files def get_files_triple(directory): ls_list = list_files(directory) meta_set = set(filter(lambda x: x.endswit...
true
true
1c3cc1f7f249638025ecc80ed694aa3e0cad6b1e
1,068
py
Python
PythonDownload/pythonexercicios/ex059.py
GitGuii/PythonExs
afab77b311d23f7ed88d94e9ce927653cf648b29
[ "MIT" ]
1
2021-08-10T15:00:34.000Z
2021-08-10T15:00:34.000Z
PythonDownload/pythonexercicios/ex059.py
GitGuii/PythonExs
afab77b311d23f7ed88d94e9ce927653cf648b29
[ "MIT" ]
null
null
null
PythonDownload/pythonexercicios/ex059.py
GitGuii/PythonExs
afab77b311d23f7ed88d94e9ce927653cf648b29
[ "MIT" ]
null
null
null
n1 = int(input("Digite o primeiro numero: ")) n2 = int(input("Digite o segundo numero: ")) maior = 0 menu = 9 while menu != 0: menu = int(input('''Digite o numero da opção desejada: 1) Soma 2) Multiplicar 3) maior 4) trocar numeros 0) sair ''')) if menu == 1: print("a soma entre {}...
33.375
74
0.43633
n1 = int(input("Digite o primeiro numero: ")) n2 = int(input("Digite o segundo numero: ")) maior = 0 menu = 9 while menu != 0: menu = int(input('''Digite o numero da opção desejada: 1) Soma 2) Multiplicar 3) maior 4) trocar numeros 0) sair ''')) if menu == 1: print("a soma entre {}...
true
true
1c3cc22d352a48c21060efd3f5f8e9683881ae8d
3,546
py
Python
02_tensor_basics.py
KOPFYF/pytorchTutorial
4ed7642049a0fba46edd505a23ffcea9d8e03679
[ "MIT" ]
null
null
null
02_tensor_basics.py
KOPFYF/pytorchTutorial
4ed7642049a0fba46edd505a23ffcea9d8e03679
[ "MIT" ]
null
null
null
02_tensor_basics.py
KOPFYF/pytorchTutorial
4ed7642049a0fba46edd505a23ffcea9d8e03679
[ "MIT" ]
null
null
null
import re import torch # Everything in pytorch is based on Tensor operations. # A tensor can have different dimensions # so it can be 1d, 2d, or even 3d and higher # scalar, vector, matrix, tensor # torch.empty(size): uninitiallized x = torch.empty(1) # scalar print(x) x = torch.empty(3) # vector, 1D print(x) x = t...
25.148936
92
0.663001
import re import torch x = torch.empty(1) print(x) x = torch.empty(3) print(x) x = torch.empty(2,3) print(x) x = torch.empty(2,2,3) rand(5, 3) print(x) x = torch.zeros(5, 3) print(x) print(x.size()) print(x.dtype) x = torch.zeros(5, 3, dtype=torch.int) x = torch.zeros(5, 3, dtype=torch.double) x ...
true
true
1c3cc3606f983f7d09ed842ef58cc248742babf5
311
py
Python
tests/benchmarks/test_parser.py
melvinkcx/graphql-core-next
b320331faf2fc2f4f1f6a1366f07109d1bdd44f1
[ "MIT" ]
null
null
null
tests/benchmarks/test_parser.py
melvinkcx/graphql-core-next
b320331faf2fc2f4f1f6a1366f07109d1bdd44f1
[ "MIT" ]
null
null
null
tests/benchmarks/test_parser.py
melvinkcx/graphql-core-next
b320331faf2fc2f4f1f6a1366f07109d1bdd44f1
[ "MIT" ]
null
null
null
from graphql import parse, DocumentNode # noinspection PyUnresolvedReferences from ..fixtures import kitchen_sink_query # noqa: F401 def test_parse_kitchen_sink(benchmark, kitchen_sink_query): # noqa: F811 query = benchmark(lambda: parse(kitchen_sink_query)) assert isinstance(query, DocumentNode)
31.1
73
0.800643
from graphql import parse, DocumentNode from ..fixtures import kitchen_sink_query def test_parse_kitchen_sink(benchmark, kitchen_sink_query): query = benchmark(lambda: parse(kitchen_sink_query)) assert isinstance(query, DocumentNode)
true
true
1c3cc43bdda11d873ff21ac3eefb3df35e6d0679
4,718
py
Python
src/pyjion/__init__.py
FasterSpeeding/Pyjion
137fbaa6dd68e17ffbeba076a0ce31dbde5df218
[ "MIT" ]
null
null
null
src/pyjion/__init__.py
FasterSpeeding/Pyjion
137fbaa6dd68e17ffbeba076a0ce31dbde5df218
[ "MIT" ]
null
null
null
src/pyjion/__init__.py
FasterSpeeding/Pyjion
137fbaa6dd68e17ffbeba076a0ce31dbde5df218
[ "MIT" ]
null
null
null
import ctypes import pathlib import os import platform from enum import IntFlag, IntEnum from dataclasses import dataclass __version__ = '1.1.0' def _no_dotnet(path): raise ImportError(f"Can't find a .NET 6 installation in {path}, " "provide the DOTNET_ROOT environment variable " ...
30.836601
106
0.630352
import ctypes import pathlib import os import platform from enum import IntFlag, IntEnum from dataclasses import dataclass __version__ = '1.1.0' def _no_dotnet(path): raise ImportError(f"Can't find a .NET 6 installation in {path}, " "provide the DOTNET_ROOT environment variable " ...
true
true
1c3cc43e8525d4a35a4756127840bfc8d81b66a3
455
py
Python
restaurant_project/menu/tests/test_urls.py
lukart80/restaurant
419786cd87a7bd15c82b2fda8ad7c5e3e1f6c9cd
[ "MIT" ]
null
null
null
restaurant_project/menu/tests/test_urls.py
lukart80/restaurant
419786cd87a7bd15c82b2fda8ad7c5e3e1f6c9cd
[ "MIT" ]
null
null
null
restaurant_project/menu/tests/test_urls.py
lukart80/restaurant
419786cd87a7bd15c82b2fda8ad7c5e3e1f6c9cd
[ "MIT" ]
null
null
null
from django.test import TestCase, Client class TestMenu(TestCase): HOMEPAGE_URL = '/' def setUp(self): self.anonymous_client = Client() def test_menu_urls(self): url_code = { self.HOMEPAGE_URL: 200, } for url, code in url_code.items(): with self.su...
25.277778
60
0.595604
from django.test import TestCase, Client class TestMenu(TestCase): HOMEPAGE_URL = '/' def setUp(self): self.anonymous_client = Client() def test_menu_urls(self): url_code = { self.HOMEPAGE_URL: 200, } for url, code in url_code.items(): with self.su...
true
true
1c3cc6dd770ac281c96d7df5ddf2b74446b08133
2,549
py
Python
ml-agents/mlagents/envs/communicator_objects/unity_rl_initialization_input_pb2.py
apstwilly/ml-agents
d3f9fd63043f1c82790d3fe35ee07dc5ed1232b9
[ "Apache-2.0" ]
33
2018-09-04T12:10:49.000Z
2022-02-05T03:27:40.000Z
ml-agents/mlagents/envs/communicator_objects/unity_rl_initialization_input_pb2.py
Beinger/ml-agents
d3f9fd63043f1c82790d3fe35ee07dc5ed1232b9
[ "Apache-2.0" ]
1
2022-02-05T03:51:16.000Z
2022-02-06T22:48:42.000Z
ml-agents/mlagents/envs/communicator_objects/unity_rl_initialization_input_pb2.py
Beinger/ml-agents
d3f9fd63043f1c82790d3fe35ee07dc5ed1232b9
[ "Apache-2.0" ]
3
2019-03-20T05:00:43.000Z
2020-01-27T16:53:38.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: mlagents/envs/communicator_objects/unity_rl_initialization_input.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as ...
35.402778
256
0.804629
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from google...
true
true
1c3cc7805aeb74c829cf09c428d6456723b0ef14
3,754
py
Python
tests/test_util.py
nickfrostatx/frost-ci
97fc234eb174a1242481b40e56aebba595827a69
[ "MIT" ]
null
null
null
tests/test_util.py
nickfrostatx/frost-ci
97fc234eb174a1242481b40e56aebba595827a69
[ "MIT" ]
null
null
null
tests/test_util.py
nickfrostatx/frost-ci
97fc234eb174a1242481b40e56aebba595827a69
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Test utility functions.""" import flask import frost.util import json import pytest try: from urllib.parse import quote except ImportError: from urllib import quote def test_check_state(): app = flask.Flask(__name__) class FakeSessionInterface(flask.sessions.SessionInterfa...
29.328125
72
0.59723
import flask import frost.util import json import pytest try: from urllib.parse import quote except ImportError: from urllib import quote def test_check_state(): app = flask.Flask(__name__) class FakeSessionInterface(flask.sessions.SessionInterface): def open_session(self, app, request): ...
true
true
1c3cc7e5fcb7f496a7ac37b7f6308f018dab22bc
937
py
Python
core/mailer.py
Foohx/acceslibre
55135e096f2ec4e413ff991f01c17f5e0d5925c0
[ "MIT" ]
8
2020-07-23T08:17:28.000Z
2022-03-09T22:31:36.000Z
core/mailer.py
Foohx/acceslibre
55135e096f2ec4e413ff991f01c17f5e0d5925c0
[ "MIT" ]
37
2020-07-01T08:47:33.000Z
2022-02-03T19:50:58.000Z
core/mailer.py
Foohx/acceslibre
55135e096f2ec4e413ff991f01c17f5e0d5925c0
[ "MIT" ]
4
2021-04-08T10:57:18.000Z
2022-01-31T13:16:31.000Z
from django.conf import settings from django.core.mail import EmailMessage from django.template.loader import render_to_string def send_email( to_list, subject, template, context=None, reply_to=None, fail_silently=True ): context = context if context else {} context["SITE_NAME"] = settings.SITE_NAME c...
34.703704
82
0.729989
from django.conf import settings from django.core.mail import EmailMessage from django.template.loader import render_to_string def send_email( to_list, subject, template, context=None, reply_to=None, fail_silently=True ): context = context if context else {} context["SITE_NAME"] = settings.SITE_NAME c...
true
true
1c3cc85dc8d56700337ab06f29b625d32838a7be
4,773
py
Python
net_per_dev.py
erthalion/postgres-bcc
6c18e8cf795acde2479d536304cdae720b14d8c6
[ "Apache-2.0" ]
37
2019-02-27T12:18:15.000Z
2022-03-28T07:18:42.000Z
net_per_dev.py
erthalion/postgres-bcc
6c18e8cf795acde2479d536304cdae720b14d8c6
[ "Apache-2.0" ]
1
2019-12-10T09:37:26.000Z
2019-12-23T11:22:41.000Z
net_per_dev.py
erthalion/postgres-bcc
6c18e8cf795acde2479d536304cdae720b14d8c6
[ "Apache-2.0" ]
1
2019-12-07T01:50:10.000Z
2019-12-07T01:50:10.000Z
#!/usr/bin/env python # # net_per_dev Track how much data was transmitted per netword device # # usage: net_per_dev [-d] from __future__ import print_function from time import sleep import argparse import ctypes as ct import signal from bcc import BPF import utils bpf_text = """ #include <linux/ptrace.h> stru...
23.865
79
0.562958
from __future__ import print_function from time import sleep import argparse import ctypes as ct import signal from bcc import BPF import utils bpf_text = """ #include <linux/ptrace.h> struct key_t { char device[10]; }; struct net_data { u32 pid; u32 __padding; unsigned int len; char d...
true
true
1c3cc9334380dc39afcaf35db9b9f3acdc612122
6,447
py
Python
homeassistant/components/arlo/sensor.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
1
2019-02-18T03:16:32.000Z
2019-02-18T03:16:32.000Z
homeassistant/components/arlo/sensor.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
3
2021-09-08T03:29:36.000Z
2022-03-12T00:59:48.000Z
homeassistant/components/arlo/sensor.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
1
2019-09-28T07:06:08.000Z
2019-09-28T07:06:08.000Z
"""Sensor support for Netgear Arlo IP cameras.""" import logging import voluptuous as vol from homeassistant.core import callback import homeassistant.helpers.config_validation as cv from homeassistant.components.arlo import ( ATTRIBUTION, DEFAULT_BRAND, DATA_ARLO, SIGNAL_UPDATE_ARLO) from homeassistant.component...
34.475936
79
0.612843
import logging import voluptuous as vol from homeassistant.core import callback import homeassistant.helpers.config_validation as cv from homeassistant.components.arlo import ( ATTRIBUTION, DEFAULT_BRAND, DATA_ARLO, SIGNAL_UPDATE_ARLO) from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant...
true
true
1c3cc9ba10752b82472e53f9b3a4a4c1b0f3a11f
1,851
py
Python
applications/FluidTransportApplication/python_scripts/apply_vector_constraint_function_process.py
lkusch/Kratos
e8072d8e24ab6f312765185b19d439f01ab7b27b
[ "BSD-4-Clause" ]
778
2017-01-27T16:29:17.000Z
2022-03-30T03:01:51.000Z
applications/FluidTransportApplication/python_scripts/apply_vector_constraint_function_process.py
lkusch/Kratos
e8072d8e24ab6f312765185b19d439f01ab7b27b
[ "BSD-4-Clause" ]
6,634
2017-01-15T22:56:13.000Z
2022-03-31T15:03:36.000Z
applications/FluidTransportApplication/python_scripts/apply_vector_constraint_function_process.py
lkusch/Kratos
e8072d8e24ab6f312765185b19d439f01ab7b27b
[ "BSD-4-Clause" ]
224
2017-02-07T14:12:49.000Z
2022-03-06T23:09:34.000Z
import KratosMultiphysics import KratosMultiphysics.FluidTransportApplication as KratosFluidTransport import math def Factory(settings, Model): if(type(settings) != KratosMultiphysics.Parameters): raise Exception("expected input shall be a Parameters object, encapsulating a json string") return ...
41.133333
100
0.655321
import KratosMultiphysics import KratosMultiphysics.FluidTransportApplication as KratosFluidTransport import math def Factory(settings, Model): if(type(settings) != KratosMultiphysics.Parameters): raise Exception("expected input shall be a Parameters object, encapsulating a json string") return ...
true
true
1c3cc9c96a9dfde55155b2feb763c25cc4b4ce21
2,722
py
Python
RequestsStampede/policy/retry.py
PatrickMurray/RequestsStampede
88584d364da6632fe68cd26cc3fdfe40e0dc1f0d
[ "MIT" ]
11
2021-04-18T01:31:33.000Z
2022-02-14T15:24:42.000Z
RequestsStampede/policy/retry.py
PatrickMurray/RequestsStampede
88584d364da6632fe68cd26cc3fdfe40e0dc1f0d
[ "MIT" ]
null
null
null
RequestsStampede/policy/retry.py
PatrickMurray/RequestsStampede
88584d364da6632fe68cd26cc3fdfe40e0dc1f0d
[ "MIT" ]
null
null
null
""" Build-in retry policies and their abstract class. """ import abc import typing import math import RequestsStampede.exceptions class AbstractRetryPolicy(abc.ABC): """ An abstract class for use in implementing retry policies. """ attempts: int class FixedRetryPolicy(AbstractRetryPolicy): "...
21.603175
83
0.573475
import abc import typing import math import RequestsStampede.exceptions class AbstractRetryPolicy(abc.ABC): attempts: int class FixedRetryPolicy(AbstractRetryPolicy): def __init__(self, attempts: typing.Optional[int] = 5): assert isinstance(attempts, int) assert attempts > 0 se...
true
true
1c3cca9b906ddba326683edcd803dccce19224de
1,333
py
Python
general/migrations/0006_auto_20160605_1640.py
memnonila/art
10b3ef39023483f522b80269418831855ddc6fef
[ "MIT" ]
null
null
null
general/migrations/0006_auto_20160605_1640.py
memnonila/art
10b3ef39023483f522b80269418831855ddc6fef
[ "MIT" ]
null
null
null
general/migrations/0006_auto_20160605_1640.py
memnonila/art
10b3ef39023483f522b80269418831855ddc6fef
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-06-05 16:40 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('general', '0005_items_item_desc...
33.325
125
0.582896
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('general', '0005_items_item_description'), ] operations = [ migrations.CreateModel( ...
true
true
1c3ccac2eee1f1170e78ca8146d1d98e56ed5d42
1,039
py
Python
setup.py
yaacov/hawkular-client-cli
c08200e875fb123600f59c841d7479d852e4b4c5
[ "Apache-2.0" ]
1
2016-11-08T10:20:39.000Z
2016-11-08T10:20:39.000Z
setup.py
yaacov/hawkular-client-cli
c08200e875fb123600f59c841d7479d852e4b4c5
[ "Apache-2.0" ]
1
2016-12-06T07:19:36.000Z
2016-12-06T08:17:56.000Z
setup.py
yaacov/hawkular-client-cli
c08200e875fb123600f59c841d7479d852e4b4c5
[ "Apache-2.0" ]
1
2018-07-11T07:09:01.000Z
2018-07-11T07:09:01.000Z
from setuptools import setup _VERSION = '0.18.3' _DESCRIPTION = 'Read/Write data to and from a Hawkular metric server.' setup(name='hawkular-client-cli', version=_VERSION, description='Hawkular client cli', long_description=_DESCRIPTION, classifiers=[ 'Development Status :: 4 - Beta', ...
30.558824
82
0.631376
from setuptools import setup _VERSION = '0.18.3' _DESCRIPTION = 'Read/Write data to and from a Hawkular metric server.' setup(name='hawkular-client-cli', version=_VERSION, description='Hawkular client cli', long_description=_DESCRIPTION, classifiers=[ 'Development Status :: 4 - Beta', ...
true
true
1c3ccbd92393233434c82933af106a4d50404ef5
16,390
py
Python
mob_suite/mob_typer.py
dorbarker/mob-suite
5313f31d19cafbbda396fe588f4a11b1d50a6b08
[ "Apache-2.0" ]
1
2020-10-15T22:22:25.000Z
2020-10-15T22:22:25.000Z
mob_suite/mob_typer.py
pavlo888/mob-suite
5313f31d19cafbbda396fe588f4a11b1d50a6b08
[ "Apache-2.0" ]
null
null
null
mob_suite/mob_typer.py
pavlo888/mob-suite
5313f31d19cafbbda396fe588f4a11b1d50a6b08
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import logging import os import shutil import sys from argparse import (ArgumentParser, FileType) from mob_suite.version import __version__ import mob_suite.mob_init from mob_suite.blast import BlastRunner from mob_suite.blast import BlastReader from mob_suite.wrappers import circlator from mob_...
41.284635
137
0.612386
import logging import os import shutil import sys from argparse import (ArgumentParser, FileType) from mob_suite.version import __version__ import mob_suite.mob_init from mob_suite.blast import BlastRunner from mob_suite.blast import BlastReader from mob_suite.wrappers import circlator from mob_suite.wrappers import ...
true
true
1c3ccd0c0a1175152ab4a46d4fbe487ba5cdb722
3,865
py
Python
lib/modules/powershell/collection/ChromeDump.py
lex0tanl/Empire
c8217e87cf333797eb363b782f769cc4b2f64b0b
[ "BSD-3-Clause" ]
3
2018-01-05T03:59:44.000Z
2020-02-11T03:25:46.000Z
lib/modules/powershell/collection/ChromeDump.py
gcxtx/Empire
dfb049ed48165eff2a8c1fe41941d0fbfa42df31
[ "BSD-3-Clause" ]
null
null
null
lib/modules/powershell/collection/ChromeDump.py
gcxtx/Empire
dfb049ed48165eff2a8c1fe41941d0fbfa42df31
[ "BSD-3-Clause" ]
3
2017-11-27T07:29:34.000Z
2018-09-23T06:27:05.000Z
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): # metadata info about the module, not modified during runtime self.info = { # name for the module that will appear in module menus 'Name': 'Get-ChromeDump', # list of one or ...
35.458716
115
0.543338
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Get-ChromeDump', 'Author': ['@xorrior'], 'Description': ('This module will decrypt passwords saved in chrome a...
false
true
1c3ccd6a141bd876593c8ff1adbe21d0e99e5fd5
2,717
py
Python
_V3/step5.py
cermegno/Foodie-Blog
e9d262902a9d2111c3a03ccb4ceb28a4201176aa
[ "MIT" ]
null
null
null
_V3/step5.py
cermegno/Foodie-Blog
e9d262902a9d2111c3a03ccb4ceb28a4201176aa
[ "MIT" ]
null
null
null
_V3/step5.py
cermegno/Foodie-Blog
e9d262902a9d2111c3a03ccb4ceb28a4201176aa
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import os import re import boto import redis import json from flask import Flask, render_template, redirect, request, url_for, make_response from werkzeug import secure_filename if 'VCAP_SERVICES' in os.environ: VCAP_SERVICES = json.loads(os.environ['VCAP_SERVICES']) CREDENTIALS = VCAP_S...
30.52809
109
0.612808
import os import re import boto import redis import json from flask import Flask, render_template, redirect, request, url_for, make_response from werkzeug import secure_filename if 'VCAP_SERVICES' in os.environ: VCAP_SERVICES = json.loads(os.environ['VCAP_SERVICES']) CREDENTIALS = VCAP_SERVICES["rediscloud"][...
true
true
1c3ccde0cfc42164c991ad21a68401fac16479e7
103
py
Python
App/__init__.py
paul-ollis/cleversheep3
86e6ca76ea4e8524f16e2348d38484dcfafb07d0
[ "Apache-2.0" ]
null
null
null
App/__init__.py
paul-ollis/cleversheep3
86e6ca76ea4e8524f16e2348d38484dcfafb07d0
[ "Apache-2.0" ]
null
null
null
App/__init__.py
paul-ollis/cleversheep3
86e6ca76ea4e8524f16e2348d38484dcfafb07d0
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Modules that help writing applications.""" __docformat__ = "restructuredtext"
25.75
45
0.757282
__docformat__ = "restructuredtext"
true
true
1c3cce95c6725dbc1bf0208a3ddd7af6a510bbbc
393
py
Python
bayespy/tests/__init__.py
dungvtdev/upsbayescpm
f6ee877c689046d3c57a2ac06742cfe4a0b6550e
[ "MIT" ]
622
2015-01-15T19:46:06.000Z
2022-03-22T13:40:22.000Z
bayespy/tests/__init__.py
dungvtdev/upsbayescpm
f6ee877c689046d3c57a2ac06742cfe4a0b6550e
[ "MIT" ]
118
2015-01-04T06:38:23.000Z
2021-11-05T17:28:02.000Z
bayespy/tests/__init__.py
dungvtdev/upsbayescpm
f6ee877c689046d3c57a2ac06742cfe4a0b6550e
[ "MIT" ]
160
2015-02-16T15:30:43.000Z
2022-03-14T00:52:36.000Z
################################################################################ # Copyright (C) 2015 Hannu Hartikainen # # This file is licensed under the MIT License. ################################################################################ import bayespy.plot as bpplt def setup(): for i in bpplt.pyplot...
28.071429
80
0.394402
true
true
1c3cceea0e62241d61e2790040726e2c235e561b
5,023
py
Python
src/pymor/algorithms/randrangefinder.py
TreeerT/pymor
e8b18d2d4c4b5998f0bd84f6728e365e0693b753
[ "Unlicense" ]
1
2021-08-17T15:55:12.000Z
2021-08-17T15:55:12.000Z
src/pymor/algorithms/randrangefinder.py
TreeerT/pymor
e8b18d2d4c4b5998f0bd84f6728e365e0693b753
[ "Unlicense" ]
null
null
null
src/pymor/algorithms/randrangefinder.py
TreeerT/pymor
e8b18d2d4c4b5998f0bd84f6728e365e0693b753
[ "Unlicense" ]
null
null
null
# This file is part of the pyMOR project (http://www.pymor.org). # Copyright 2013-2020 pyMOR developers and contributors. All rights reserved. # License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) import numpy as np from scipy.sparse.linalg import eigsh, LinearOperator from scipy.special import...
34.881944
98
0.673104
import numpy as np from scipy.sparse.linalg import eigsh, LinearOperator from scipy.special import erfinv from pymor.algorithms.gram_schmidt import gram_schmidt from pymor.core.defaults import defaults from pymor.operators.interface import Operator @defaults('tol', 'failure_tolerance', 'num_testvecs') def adapti...
true
true
1c3ccf3e4cb85f0d97103912a0a229d42a88b9b8
6,406
py
Python
tests/test_routing.py
Vsevolod-pl/hivemind
0300cfd91adeb14d91d9659a98221628f9b775b9
[ "MIT" ]
11
2021-06-21T19:56:01.000Z
2021-12-22T09:06:09.000Z
tests/test_routing.py
Vsevolod-pl/hivemind
0300cfd91adeb14d91d9659a98221628f9b775b9
[ "MIT" ]
null
null
null
tests/test_routing.py
Vsevolod-pl/hivemind
0300cfd91adeb14d91d9659a98221628f9b775b9
[ "MIT" ]
null
null
null
import random import heapq import operator from itertools import chain, zip_longest from hivemind import LOCALHOST from hivemind.dht.routing import RoutingTable, DHTID def test_ids_basic(): # basic functionality tests for i in range(100): id1, id2 = DHTID.generate(), DHTID.generate() assert D...
46.42029
117
0.655948
import random import heapq import operator from itertools import chain, zip_longest from hivemind import LOCALHOST from hivemind.dht.routing import RoutingTable, DHTID def test_ids_basic(): for i in range(100): id1, id2 = DHTID.generate(), DHTID.generate() assert DHTID.MIN <= id1 < DHTID.MAX...
true
true
1c3ccfbb53dbc60e060b28aa5322ce818df6222c
16,660
py
Python
segmentation/DDRNet_23_slim_eval_speed.py
ydhongHIT/DDRNet
f2f91b4053831fd54b04e30f60c9f1d4b55cd5b9
[ "MIT" ]
225
2021-02-24T06:59:40.000Z
2022-03-30T10:23:47.000Z
segmentation/DDRNet_23_slim_eval_speed.py
scott-mao/DDRNet
f2f91b4053831fd54b04e30f60c9f1d4b55cd5b9
[ "MIT" ]
22
2021-02-24T07:13:24.000Z
2022-03-24T10:01:43.000Z
segmentation/DDRNet_23_slim_eval_speed.py
scott-mao/DDRNet
f2f91b4053831fd54b04e30f60c9f1d4b55cd5b9
[ "MIT" ]
45
2021-02-24T08:58:53.000Z
2022-03-25T02:10:44.000Z
import math import torch import numpy as np import torch.nn as nn import torch.nn.functional as F from torch.nn import init from collections import OrderedDict BatchNorm2d = nn.BatchNorm2d bn_mom = 0.1 def conv3x3(in_planes, out_planes, stride=1): """3x3 convolution with padding""" return nn.C...
40.338983
122
0.509064
import math import torch import numpy as np import torch.nn as nn import torch.nn.functional as F from torch.nn import init from collections import OrderedDict BatchNorm2d = nn.BatchNorm2d bn_mom = 0.1 def conv3x3(in_planes, out_planes, stride=1): return nn.Conv2d(in_planes, out_planes, kernel_size...
true
true
1c3ccffac17b54abc647f6fe26d87d0a19ca2a4d
4,424
py
Python
day14/script.py
kohakuma4m/AdventOfCode_2020
75d4908f7b6b89a9a2a2af0097fe8fb450b260a3
[ "MIT" ]
null
null
null
day14/script.py
kohakuma4m/AdventOfCode_2020
75d4908f7b6b89a9a2a2af0097fe8fb450b260a3
[ "MIT" ]
null
null
null
day14/script.py
kohakuma4m/AdventOfCode_2020
75d4908f7b6b89a9a2a2af0097fe8fb450b260a3
[ "MIT" ]
null
null
null
import sys; sys.path.append('../common') import mylib as utils # pylint: disable=import-error import re from itertools import product # Read args filename = 'input.txt' if len(sys.argv) == 1 else sys.argv[1] print(filename, '\n') ########################### # region COMMON MASK_REGEX = re.compile(r'^mask = (.+)$') ...
33.515152
110
0.59991
import sys; sys.path.append('../common') import mylib as utils import re from itertools import product filename = 'input.txt' if len(sys.argv) == 1 else sys.argv[1] print(filename, '\n') skedValue elif mask[-1-i] != 'X': maskedValue = mask[-1-i] + maskedValue else: maskedV...
true
true
1c3cd01086fc2b27eca50ee11e7c335c95b6ca7d
3,535
py
Python
main.py
colspan/wikipedia-ja-word2vec
c39429cd23d4c39d48b6fee85b65a15d2d3fef58
[ "MIT" ]
null
null
null
main.py
colspan/wikipedia-ja-word2vec
c39429cd23d4c39d48b6fee85b65a15d2d3fef58
[ "MIT" ]
null
null
null
main.py
colspan/wikipedia-ja-word2vec
c39429cd23d4c39d48b6fee85b65a15d2d3fef58
[ "MIT" ]
1
2017-03-12T16:35:20.000Z
2017-03-12T16:35:20.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import glob import re import logging import argparse from gensim.models import word2vec from luigi.format import Nop import requests import luigi from utils import MecabSplitter, NoWakatiSplitter # JumanPPSplitter, class DownloadWikipediaDump(luigi.Task): """ ...
25.25
88
0.587836
import glob import re import logging import argparse from gensim.models import word2vec from luigi.format import Nop import requests import luigi from utils import MecabSplitter, NoWakatiSplitter class DownloadWikipediaDump(luigi.Task): url = ( "https://dumps.wikimedia.org/jawiki/latest/jawiki-lat...
true
true
1c3cd0aae63d0ff3904d68a0016ea5b819637691
11,284
py
Python
led/dump/led-demo-raspberry/cohorte/dist/cohorte-1.0.0-20141209.234423-41-python-distribution/repo/herald/transports/xmpp/transport.py
isandlaTech/cohorte-demos
1d958b2bee33f79a0f1518b3832ef8a52b9a4bc0
[ "Apache-2.0" ]
1
2017-03-05T18:42:02.000Z
2017-03-05T18:42:02.000Z
led/dump/led-demo-raspberry/cohorte/dist/cohorte-1.0.0-20141209.234423-41-python-distribution/repo/herald/transports/xmpp/transport.py
isandlaTech/cohorte-demos
1d958b2bee33f79a0f1518b3832ef8a52b9a4bc0
[ "Apache-2.0" ]
2
2015-05-26T09:08:47.000Z
2015-08-11T15:08:01.000Z
led/dump/led-demo-yun/cohorte/dist/cohorte-1.0.0-20141216.234517-57-python-distribution/repo/herald/transports/xmpp/transport.py
isandlaTech/cohorte-demos
1d958b2bee33f79a0f1518b3832ef8a52b9a4bc0
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -- Content-Encoding: UTF-8 -- """ Herald XMPP transport implementation :author: Thomas Calmant :copyright: Copyright 2014, isandlaTech :license: Apache License 2.0 :version: 0.0.2 :status: Alpha .. Copyright 2014 isandlaTech Licensed under the Apache License, Version 2.0 (the "License");...
31.431755
80
0.588444
__version_info__ = (0, 0, 2) __version__ = ".".join(str(x) for x in __version_info__) __docformat__ = "restructuredtext en" from . import FACTORY_TRANSPORT, SERVICE_XMPP_DIRECTORY, ACCESS_ID, \ PROP_XMPP_SERVER, PROP_XMPP_PORT, PROP_MONITOR_JID, PROP_MONITOR_KEY, \ PROP_XMPP_ROOM_JID from .beans impor...
true
true
1c3cd2713983288e908beb1ab1b81ac543055392
469
py
Python
test/test_event.py
pygitee/pygitee
7622314a4dbb08cf2f729b6cdd0a2887b96e394e
[ "MIT" ]
null
null
null
test/test_event.py
pygitee/pygitee
7622314a4dbb08cf2f729b6cdd0a2887b96e394e
[ "MIT" ]
null
null
null
test/test_event.py
pygitee/pygitee
7622314a4dbb08cf2f729b6cdd0a2887b96e394e
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import absolute_import import unittest class TestEvent(unittest.TestCase): """Event unit test stubs""" def setUp(self): pass def tearDown(self): pass def testEvent(self): """Test Event""" # FIXME: construct object with mandatory att...
17.37037
79
0.628998
from __future__ import absolute_import import unittest class TestEvent(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def testEvent(self): s if __name__ == '__main__': unittest.main()
true
true
1c3cd3173b91a491b157b133a03b2d2ecc200075
59
py
Python
src/datetime_matcher/__init__.py
stephen-zhao/datetime_matcher
86db60d3a0158e46660a6e957db595d38e23c664
[ "MIT" ]
6
2020-10-11T07:31:42.000Z
2022-01-09T08:53:51.000Z
src/datetime_matcher/__init__.py
stephen-zhao/datetime_matcher
86db60d3a0158e46660a6e957db595d38e23c664
[ "MIT" ]
null
null
null
src/datetime_matcher/__init__.py
stephen-zhao/datetime_matcher
86db60d3a0158e46660a6e957db595d38e23c664
[ "MIT" ]
null
null
null
from .datetime_matcher import DatetimeMatcher, DfregexToken
59
59
0.898305
from .datetime_matcher import DatetimeMatcher, DfregexToken
true
true
1c3cd3519eef1fb24e3598c4261610d05a517f83
341
py
Python
Idat_Python2022/Semana_4/practica_web/numeroentero.py
Kennethguerra3/Python_Ejercicio_2022
cf1297cf1e1585eba699e32c02993818c3d9ecbf
[ "MIT" ]
null
null
null
Idat_Python2022/Semana_4/practica_web/numeroentero.py
Kennethguerra3/Python_Ejercicio_2022
cf1297cf1e1585eba699e32c02993818c3d9ecbf
[ "MIT" ]
null
null
null
Idat_Python2022/Semana_4/practica_web/numeroentero.py
Kennethguerra3/Python_Ejercicio_2022
cf1297cf1e1585eba699e32c02993818c3d9ecbf
[ "MIT" ]
null
null
null
#Escribir un programa que pida al usuario dos números y devuelva su división. Si el usuario no introduce números # debe devolver un aviso de error y si el divisor es cero también. n = int(input("Introduce un número entero: ")) if n % 2 == 0: print("El número " + str(n) + " es par") else: print("El número " + ...
42.625
113
0.674487
n = int(input("Introduce un número entero: ")) if n % 2 == 0: print("El número " + str(n) + " es par") else: print("El número " + str(n) + " es impar")
true
true
1c3cd380c4691e84faf50155fddf4ada75c9b738
1,492
py
Python
gazeclassify/tests/unit/test_DistanceToMask.py
Flow000/gazeclassify
dda4c8cd62ad84615f4272171f1635ab683f9bed
[ "MIT" ]
6
2021-02-25T01:17:09.000Z
2022-03-19T07:13:52.000Z
gazeclassify/tests/unit/test_DistanceToMask.py
Flow000/gazeclassify
dda4c8cd62ad84615f4272171f1635ab683f9bed
[ "MIT" ]
3
2021-05-10T07:38:24.000Z
2021-06-07T12:59:29.000Z
gazeclassify/tests/unit/test_DistanceToMask.py
Flow000/gazeclassify
dda4c8cd62ad84615f4272171f1635ab683f9bed
[ "MIT" ]
1
2021-06-24T12:58:01.000Z
2021-06-24T12:58:01.000Z
import numpy as np # type: ignore from gazeclassify.service.gaze_distance import DistanceToShape class Test_Measuring2DDistanceGazeTo_Shape: def test_read_binary_image_mask_and_calculate_distance_gaze_to_closest_pixel(self) -> None: image_mask = np.zeros((3, 3)) image_mask[0, 0] = 1 ima...
32.434783
114
0.628686
import numpy as np from gazeclassify.service.gaze_distance import DistanceToShape class Test_Measuring2DDistanceGazeTo_Shape: def test_read_binary_image_mask_and_calculate_distance_gaze_to_closest_pixel(self) -> None: image_mask = np.zeros((3, 3)) image_mask[0, 0] = 1 image_mask[0, 1] ...
true
true
1c3cd52dbd37e56aea06d7d7692db8e6b0ba1f89
688
py
Python
zh/conf.py
NewBLife/docs
48ecb8ef234fd2f97537d36a76135e4b936b0c0a
[ "MIT" ]
null
null
null
zh/conf.py
NewBLife/docs
48ecb8ef234fd2f97537d36a76135e4b936b0c0a
[ "MIT" ]
null
null
null
zh/conf.py
NewBLife/docs
48ecb8ef234fd2f97537d36a76135e4b936b0c0a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # CakePHP Cookbook documentation build configuration file, created by # sphinx-quickstart on Tue Jan 18 12:54:14 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file...
29.913043
83
0.74564
import sys, os sys.path.insert(0, os.path.abspath('..')) from config.all import * language = 'zh'
true
true
1c3cd6049915e6397d5c077ef6c8c7d14f3f4ae5
690
py
Python
toggle-testing.py
ratanawang/Dentaku
67f39a2d297b0bbd6b468ea6f2dd7a65683a0f5a
[ "MIT" ]
3
2020-08-14T17:48:10.000Z
2020-08-14T17:50:38.000Z
toggle-testing.py
ratanawang/Dentaku
67f39a2d297b0bbd6b468ea6f2dd7a65683a0f5a
[ "MIT" ]
282
2020-01-19T18:31:10.000Z
2021-07-30T06:31:38.000Z
toggle-testing.py
ratanawang/Dentaku
67f39a2d297b0bbd6b468ea6f2dd7a65683a0f5a
[ "MIT" ]
11
2020-01-18T07:37:44.000Z
2020-01-31T23:53:20.000Z
import json with open("database.json", 'r') as outfile: database = json.load(outfile) if 'testing' in database: if database['testing'] == 'y': database['testing'] = 'n' else: database['testing'] = 'y' print("Testing mode has been turned " + ('on' if database['testing'] == 'y' else 'off...
34.5
100
0.649275
import json with open("database.json", 'r') as outfile: database = json.load(outfile) if 'testing' in database: if database['testing'] == 'y': database['testing'] = 'n' else: database['testing'] = 'y' print("Testing mode has been turned " + ('on' if database['testing'] == 'y' else 'off...
true
true
1c3cd6999e5c29f66b566ec746f14f5edce34d59
14,217
py
Python
tools/train_net.py
jcjs/FPN-Pytorch
423a4499c4e826d17367762e821b51b9b1b0f2f3
[ "MIT" ]
271
2018-11-23T02:13:19.000Z
2021-05-08T08:17:52.000Z
tools/train_net.py
jcjs/FPN-Pytorch
423a4499c4e826d17367762e821b51b9b1b0f2f3
[ "MIT" ]
8
2018-11-23T11:40:37.000Z
2021-08-09T13:15:44.000Z
tools/train_net.py
jcjs/FPN-Pytorch
423a4499c4e826d17367762e821b51b9b1b0f2f3
[ "MIT" ]
57
2018-11-23T07:00:09.000Z
2021-12-19T03:49:35.000Z
""" Training Script """ import argparse import distutils.util import os import sys import pickle import resource import traceback import logging from collections import defaultdict import numpy as np import yaml import torch from torch.autograd import Variable import torch.nn as nn import cv2 cv2.se...
37.217277
104
0.630091
import argparse import distutils.util import os import sys import pickle import resource import traceback import logging from collections import defaultdict import numpy as np import yaml import torch from torch.autograd import Variable import torch.nn as nn import cv2 cv2.setNumThreads(0) import...
true
true
1c3cd8bbbc3e95c30a6c446b891b099e171450d6
5,420
py
Python
myparser.py
zejiangp/BlockConv
7034f70a74ec69b2d49dcddce9ecbea7e544ddd7
[ "MIT" ]
11
2022-01-10T06:40:17.000Z
2022-02-16T06:03:17.000Z
myparser.py
zejiangp/BlockConv
7034f70a74ec69b2d49dcddce9ecbea7e544ddd7
[ "MIT" ]
null
null
null
myparser.py
zejiangp/BlockConv
7034f70a74ec69b2d49dcddce9ecbea7e544ddd7
[ "MIT" ]
1
2021-12-16T10:55:43.000Z
2021-12-16T10:55:43.000Z
import argparse import operator def get_parser(): parser = argparse.ArgumentParser(description="Simple code for train and test on ImageNet and Cifar") parser.add_argument('data', metavar='DIR', help='path to dataset') parser.add_argument('--arch', '-a', metavar='ARCH', default='resnet18', help='model archi...
77.428571
173
0.656827
import argparse import operator def get_parser(): parser = argparse.ArgumentParser(description="Simple code for train and test on ImageNet and Cifar") parser.add_argument('data', metavar='DIR', help='path to dataset') parser.add_argument('--arch', '-a', metavar='ARCH', default='resnet18', help='model archi...
true
true
1c3cdb04737489ab50f8af6ca2ec50a5537b7d7d
10,309
py
Python
chexnet_client.py
kholohan/chexnet
e8cb9bf2365326210d64b09ccfd503a858485941
[ "MIT" ]
16
2018-12-23T22:19:47.000Z
2020-08-13T16:30:33.000Z
chexnet_client.py
kholohan/chexnet
e8cb9bf2365326210d64b09ccfd503a858485941
[ "MIT" ]
21
2018-10-18T16:29:49.000Z
2021-06-16T12:15:58.000Z
chexnet_client.py
kholohan/chexnet
e8cb9bf2365326210d64b09ccfd503a858485941
[ "MIT" ]
12
2018-12-23T22:19:53.000Z
2020-12-21T12:06:09.000Z
import cv2 import grpc from configparser import ConfigParser from confluent_kafka import Producer, Consumer, KafkaError, KafkaException import generator import io import json import keras.backend as K import logging import matplotlib.pyplot as plt import numpy as np import os from PIL import Image import scipy.misc fro...
34.249169
148
0.647007
import cv2 import grpc from configparser import ConfigParser from confluent_kafka import Producer, Consumer, KafkaError, KafkaException import generator import io import json import keras.backend as K import logging import matplotlib.pyplot as plt import numpy as np import os from PIL import Image import scipy.misc fro...
true
true
1c3cdbbac3409b1a7421bcfd1407cb3fb0ff29d4
1,603
py
Python
developerweek2018/settings.py
ykifle/developerweek2018
caa20e075f1deae800e85c399253271ab5397a48
[ "BSD-3-Clause" ]
null
null
null
developerweek2018/settings.py
ykifle/developerweek2018
caa20e075f1deae800e85c399253271ab5397a48
[ "BSD-3-Clause" ]
null
null
null
developerweek2018/settings.py
ykifle/developerweek2018
caa20e075f1deae800e85c399253271ab5397a48
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Application configuration.""" import os class Config(object): """Base configuration.""" SECRET_KEY = os.environ.get('DEVELOPERWEEK2018_SECRET', 'secret-key') # TODO: Change me APP_DIR = os.path.abspath(os.path.dirname(__file__)) # This directory PROJECT_ROOT = os.path.abs...
31.431373
101
0.692452
import os class Config(object): SECRET_KEY = os.environ.get('DEVELOPERWEEK2018_SECRET', 'secret-key') APP_DIR = os.path.abspath(os.path.dirname(__file__)) PROJECT_ROOT = os.path.abspath(os.path.join(APP_DIR, os.pardir)) BCRYPT_LOG_ROUNDS = 13 DEBUG_TB_ENABLED = False DEBUG_TB_INTERCEPT...
true
true
1c3cdc11b9340d299af2c3a24c583c03bafdf0d7
607
py
Python
factual/query/submit.py
gvelez17/factual-python-driver
8271e852e0e8e5d3fa4020cbad0b8211127ccd39
[ "Apache-2.0" ]
1
2020-08-15T22:53:37.000Z
2020-08-15T22:53:37.000Z
factual/query/submit.py
gvelez17/factual-python-driver
8271e852e0e8e5d3fa4020cbad0b8211127ccd39
[ "Apache-2.0" ]
null
null
null
factual/query/submit.py
gvelez17/factual-python-driver
8271e852e0e8e5d3fa4020cbad0b8211127ccd39
[ "Apache-2.0" ]
null
null
null
from write import Write class Submit(Write): def __init__(self, api, table, factual_id, params={}): Write.__init__(self, api, table, factual_id, params) def values(self, values): return self._copy({'values': values}) def clear_blanks(): return self._copy({'clear_blanks': True}) ...
27.590909
87
0.609555
from write import Write class Submit(Write): def __init__(self, api, table, factual_id, params={}): Write.__init__(self, api, table, factual_id, params) def values(self, values): return self._copy({'values': values}) def clear_blanks(): return self._copy({'clear_blanks': True}) ...
true
true
1c3cdcf1b8fd9593a7b0e2b97e1dc29749e67ab4
2,276
py
Python
angstrom/angstrom.py
sighphyre/angstrom
b4bdaf1f626bf5b8b4176345bb01d32e825c2a74
[ "Apache-2.0" ]
null
null
null
angstrom/angstrom.py
sighphyre/angstrom
b4bdaf1f626bf5b8b4176345bb01d32e825c2a74
[ "Apache-2.0" ]
null
null
null
angstrom/angstrom.py
sighphyre/angstrom
b4bdaf1f626bf5b8b4176345bb01d32e825c2a74
[ "Apache-2.0" ]
null
null
null
import sqlite3 from os import path def mobj(mapping, result_set): rows = [] for row in result_set: new_row = mapping.copy() for key, value in mapping.items(): new_row[key] = row[value] rows.append(new_row) return rows def base_connector(db_name): def connect(): ...
27.095238
66
0.612039
import sqlite3 from os import path def mobj(mapping, result_set): rows = [] for row in result_set: new_row = mapping.copy() for key, value in mapping.items(): new_row[key] = row[value] rows.append(new_row) return rows def base_connector(db_name): def connect(): ...
true
true
1c3cdd0b09bfdc9dbd58fdb3c73064dd0e22510a
5,115
py
Python
assignment1/training.py
WhiteHyun/MachineLearning
4c766d0abc03a3823a71f36bbbe7ad90736a20f0
[ "MIT" ]
2
2021-04-18T06:25:16.000Z
2021-04-28T15:10:17.000Z
assignment1/training.py
WhiteHyun/MachineLearning
4c766d0abc03a3823a71f36bbbe7ad90736a20f0
[ "MIT" ]
1
2021-04-20T06:56:32.000Z
2021-04-22T16:43:36.000Z
assignment1/training.py
WhiteHyun/MachineLearning
4c766d0abc03a3823a71f36bbbe7ad90736a20f0
[ "MIT" ]
null
null
null
import random import math random.seed(1) def randn(size): """난수 생성 """ return [random.random() for _ in range(size+1)] class MultiLayerPerceptron: def __init__(self, ni, nh, no, dataset, epochs=5000) -> None: """퍼셉트론 네트워크 초기화 """ self.model = [] hidden_layer = [ ...
32.788462
85
0.494819
import random import math random.seed(1) def randn(size): return [random.random() for _ in range(size+1)] class MultiLayerPerceptron: def __init__(self, ni, nh, no, dataset, epochs=5000) -> None: self.model = [] hidden_layer = [ {'weights': randn(ni)} for _ in range(nh) ...
true
true
1c3cdd1a654bc85ef1a1f83e26db1a588b93120f
6,116
py
Python
mmwave/data/logger.py
vilari-mickopf/mmwave-gesture-recognition
a93f404c49c3797e441d456830e06f540abc4032
[ "MIT" ]
16
2021-02-23T02:28:47.000Z
2022-03-28T02:49:28.000Z
mmwave/data/logger.py
f12markovic/mmwave-gesture-recognition
a93f404c49c3797e441d456830e06f540abc4032
[ "MIT" ]
7
2021-09-13T09:38:41.000Z
2022-03-04T07:29:06.000Z
mmwave/data/logger.py
f12markovic/mmwave-gesture-recognition
a93f404c49c3797e441d456830e06f540abc4032
[ "MIT" ]
3
2021-06-13T20:27:21.000Z
2021-11-06T06:00:05.000Z
#! /usr/bin/env python import os import time import pickle import pandas as pd from tqdm import tqdm from mmwave.data.formats import GESTURE from mmwave.utils.utility_functions import print import colorama from colorama import Fore colorama.init(autoreset=True) class Logger: def __init__(self, gesture=None): ...
33.604396
97
0.535154
import os import time import pickle import pandas as pd from tqdm import tqdm from mmwave.data.formats import GESTURE from mmwave.utils.utility_functions import print import colorama from colorama import Fore colorama.init(autoreset=True) class Logger: def __init__(self, gesture=None): self.logging =...
true
true
1c3cdda3bb81cfe733d36d36a57fcc3d679c170a
2,449
py
Python
examples/Carl_Leake_Dissertation/Chapter_3/Example_3_2_spectral_method.py
leakec/tfc
f814be4643270498a68bb0859720191ff7216012
[ "MIT" ]
15
2021-01-04T16:30:59.000Z
2022-03-26T22:12:45.000Z
examples/Carl_Leake_Dissertation/Chapter_3/Example_3_2_spectral_method.py
leakec/tfc
f814be4643270498a68bb0859720191ff7216012
[ "MIT" ]
3
2021-12-10T23:17:56.000Z
2022-03-12T18:39:18.000Z
examples/Carl_Leake_Dissertation/Chapter_3/Example_3_2_spectral_method.py
leakec/tfc
f814be4643270498a68bb0859720191ff7216012
[ "MIT" ]
2
2021-04-27T10:34:20.000Z
2022-02-25T13:02:49.000Z
# Import python packages from tqdm import tqdm import numpy as onp import jax.numpy as np from jax import jacfwd from matplotlib import cm # Import TFC classes from tfc import mtfc from tfc.utils import egrad from tfc.utils.Latex import table # Constants and switches: nVec = [5,10,15,20,25,30] mVec = [5,10,15,20,25] ...
28.476744
85
0.520212
from tqdm import tqdm import numpy as onp import jax.numpy as np from jax import jacfwd from matplotlib import cm from tfc import mtfc from tfc.utils import egrad from tfc.utils.Latex import table nVec = [5,10,15,20,25,30] mVec = [5,10,15,20,25] x0 = np.array([0.,0.]) xf = np.array([1.,1.]) testErr = onp.zeros((...
true
true
1c3cddac2563e87b8cdc0c21a1fec79a0cd7b5f9
2,066
py
Python
homeassistant/components/shiftr/__init__.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
23
2017-11-15T21:03:53.000Z
2021-03-29T21:33:48.000Z
homeassistant/components/shiftr/__init__.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
47
2020-07-23T07:13:11.000Z
2022-03-31T06:01:46.000Z
homeassistant/components/shiftr/__init__.py
klauern/home-assistant-core
c18ba6aec0627e6afb6442c678edb5ff2bb17db6
[ "Apache-2.0" ]
10
2018-01-01T00:12:51.000Z
2021-12-21T23:08:05.000Z
"""Support for Shiftr.io.""" import logging import paho.mqtt.client as mqtt import voluptuous as vol from homeassistant.const import ( CONF_PASSWORD, CONF_USERNAME, EVENT_HOMEASSISTANT_STOP, EVENT_STATE_CHANGED, ) from homeassistant.helpers import state as state_helper import homeassistant.helpers.con...
26.151899
79
0.636012
import logging import paho.mqtt.client as mqtt import voluptuous as vol from homeassistant.const import ( CONF_PASSWORD, CONF_USERNAME, EVENT_HOMEASSISTANT_STOP, EVENT_STATE_CHANGED, ) from homeassistant.helpers import state as state_helper import homeassistant.helpers.config_validation as cv _LOGGER...
true
true
1c3cde305aec7ba5054cd2603f156a38fb90a6a4
13,576
py
Python
venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortios/plugins/modules/fortios_endpoint_control_forticlient_registration_sync.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
1
2020-01-22T13:11:23.000Z
2020-01-22T13:11:23.000Z
venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortios/plugins/modules/fortios_endpoint_control_forticlient_registration_sync.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortios/plugins/modules/fortios_endpoint_control_forticlient_registration_sync.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
null
null
null
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019-2020 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of th...
34.899743
153
0.660283
from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', 'metadata_version': '1.1'} DOCUMENTATION = ''' --- module: fortios_endpoint_control_forticlient_regist...
true
true
1c3cdf8dd7a023951b80190dd8425c6b825b6401
901
py
Python
chewie/utils.py
snak1219/chewie
346841e1ba16324ff302df9b67897721be112f0c
[ "Apache-2.0" ]
1
2021-05-23T14:47:53.000Z
2021-05-23T14:47:53.000Z
chewie/utils.py
snak1219/chewie
346841e1ba16324ff302df9b67897721be112f0c
[ "Apache-2.0" ]
null
null
null
chewie/utils.py
snak1219/chewie
346841e1ba16324ff302df9b67897721be112f0c
[ "Apache-2.0" ]
2
2021-02-27T09:46:02.000Z
2021-08-06T03:12:20.000Z
"""Utility Functions""" import logging from collections import namedtuple # pytype: disable=pyi-error def get_logger(logname): """Create and return a logger object.""" logger = logging.getLogger(logname) return logger def log_method(method): """Generate method for logging""" def wrapped(self, ...
25.027778
80
0.651498
import logging from collections import namedtuple def get_logger(logname): logger = logging.getLogger(logname) return logger def log_method(method): def wrapped(self, *args, **kwargs): self.logger.info('Entering %s' % method.__name__) return method(self, *args, **kwargs) return w...
true
true
1c3ce019f9026307ee581c24e1136c8bc162b37f
196
py
Python
dufi/commands/cmd_excel/excellib/utils.py
Shura1oplot/dufi
c9c25524020e57d3670c298acca305900b6490e7
[ "MIT" ]
null
null
null
dufi/commands/cmd_excel/excellib/utils.py
Shura1oplot/dufi
c9c25524020e57d3670c298acca305900b6490e7
[ "MIT" ]
null
null
null
dufi/commands/cmd_excel/excellib/utils.py
Shura1oplot/dufi
c9c25524020e57d3670c298acca305900b6490e7
[ "MIT" ]
null
null
null
# [SublimeLinter @python:3] from xlsxwriter.utility import xl_cell_to_rowcol def colno(s): if not s.isalpha(): raise ValueError(s) return xl_cell_to_rowcol(s.upper() + "1")[1]
17.818182
48
0.678571
from xlsxwriter.utility import xl_cell_to_rowcol def colno(s): if not s.isalpha(): raise ValueError(s) return xl_cell_to_rowcol(s.upper() + "1")[1]
true
true
1c3ce01b7d0000dbb7203ee5e161d61b9a3d04e2
2,274
py
Python
verilog/benchmarks_small/mux/common.py
cliffordwolf/yosys-benchmarks
52ff6fa991f2ab509618d8aaad02f307aac78848
[ "0BSD" ]
14
2018-10-08T05:08:54.000Z
2022-01-29T23:12:20.000Z
verilog/benchmarks_small/mux/common.py
cliffordwolf/yosys-benchmarks
52ff6fa991f2ab509618d8aaad02f307aac78848
[ "0BSD" ]
3
2019-02-27T15:16:50.000Z
2020-02-15T16:15:43.000Z
verilog/benchmarks_small/mux/common.py
cliffordwolf/yosys-benchmarks
52ff6fa991f2ab509618d8aaad02f307aac78848
[ "0BSD" ]
6
2019-02-04T20:16:49.000Z
2021-02-05T03:29:29.000Z
from math import log2, ceil def gen_mux_index(N,W): with open("mux_index_%d_%d.v" % (N,W), "w") as f: print(""" (* top *) module mux_index_{0}_{1} #(parameter N={0}, parameter W={1}) (input [N*W-1:0] i, input [$clog2(N)-1:0] s, output [W-1:0] o); assign o = i[s*W+:W]; endmodule """.format(N,W), file=f) de...
35.53125
131
0.506157
from math import log2, ceil def gen_mux_index(N,W): with open("mux_index_%d_%d.v" % (N,W), "w") as f: print(""" (* top *) module mux_index_{0}_{1} #(parameter N={0}, parameter W={1}) (input [N*W-1:0] i, input [$clog2(N)-1:0] s, output [W-1:0] o); assign o = i[s*W+:W]; endmodule """.format(N,W), file=f) de...
true
true
1c3ce045d5ce5d1cc57bbfbf2b4b70a1dd582faf
258
py
Python
ppcd/models/layers/__init__.py
geoyee/PdRSCD
4a1a7256320f006c15e3e5b5b238fdfba8198853
[ "Apache-2.0" ]
44
2021-04-21T02:41:55.000Z
2022-03-09T03:01:16.000Z
ppcd/models/layers/__init__.py
MinZHANG-WHU/PdRSCD
612976225201d78adc7ff99529ada17b41fedc5d
[ "Apache-2.0" ]
2
2021-09-30T07:52:47.000Z
2022-02-12T09:05:35.000Z
ppcd/models/layers/__init__.py
MinZHANG-WHU/PdRSCD
612976225201d78adc7ff99529ada17b41fedc5d
[ "Apache-2.0" ]
6
2021-07-23T02:18:39.000Z
2022-01-14T01:15:50.000Z
from .layer_libs import ConvBN, ConvBNReLU, SeparableConvBNReLU, AuxLayer, SyncBatchNorm from .pyramid_pool import PPModule from .initialize import kaiming_normal_init, constant_init, normal_init from .attention import CAM, SAM, BAM, PAM, GatedAttentionLayer
64.5
88
0.848837
from .layer_libs import ConvBN, ConvBNReLU, SeparableConvBNReLU, AuxLayer, SyncBatchNorm from .pyramid_pool import PPModule from .initialize import kaiming_normal_init, constant_init, normal_init from .attention import CAM, SAM, BAM, PAM, GatedAttentionLayer
true
true
1c3ce17ffa07012243e950028e51b29ef820183c
98
py
Python
conf.py
braxtons12/C2nxt
be30f17a321ae2e433ef11a09e82acbbabdae944
[ "MIT" ]
3
2021-08-15T23:45:26.000Z
2022-01-03T04:14:32.000Z
conf.py
braxtons12/C2nxt
be30f17a321ae2e433ef11a09e82acbbabdae944
[ "MIT" ]
null
null
null
conf.py
braxtons12/C2nxt
be30f17a321ae2e433ef11a09e82acbbabdae944
[ "MIT" ]
null
null
null
LINKS_NAVBAR1 = [ ("Modules", 'modules', []) ] LINKS_NAVBAR2 = [ ("Classes", 'annotated', []) ]
14
29
0.571429
LINKS_NAVBAR1 = [ ("Modules", 'modules', []) ] LINKS_NAVBAR2 = [ ("Classes", 'annotated', []) ]
true
true
1c3ce1b7fa31ef9e108dfe8a9f820c3bc1098564
2,323
py
Python
fiftyone/core/media.py
callmekofi/fiftyone
261e35d07d2546c6bf77f7be98dde5dab415d01d
[ "Apache-2.0" ]
3
2022-01-18T06:13:33.000Z
2022-02-14T13:28:23.000Z
fiftyone/core/media.py
callmekofi/fiftyone
261e35d07d2546c6bf77f7be98dde5dab415d01d
[ "Apache-2.0" ]
null
null
null
fiftyone/core/media.py
callmekofi/fiftyone
261e35d07d2546c6bf77f7be98dde5dab415d01d
[ "Apache-2.0" ]
null
null
null
""" Sample media utilities. | Copyright 2017-2022, Voxel51, Inc. | `voxel51.com <https://voxel51.com/>`_ | """ import multiprocessing import eta.core.utils as etau import eta.core.video as etav import fiftyone.core.utils as fou # Valid media types # @todo convert to a MediaType enum class? VIDEO = "video" IMAGE = ...
24.197917
76
0.643134
import multiprocessing import eta.core.utils as etau import eta.core.video as etav import fiftyone.core.utils as fou VIDEO = "video" IMAGE = "image" MEDIA_TYPES = {IMAGE, VIDEO} def get_media_type(filepath): if etav.is_video_mime_type(filepath): return VIDEO return IMAGE def export_...
true
true
1c3ce28081acfd617d52284024dc525fc91a71d8
1,510
py
Python
截图快捷翻译/main.py
liusongtao99/tools_python
f01d315c46a619828d02ed9327f4264ba3a382d8
[ "Apache-2.0" ]
130
2019-05-19T16:17:26.000Z
2022-03-30T11:48:38.000Z
截图快捷翻译/main.py
liusongtao99/tools_python
f01d315c46a619828d02ed9327f4264ba3a382d8
[ "Apache-2.0" ]
null
null
null
截图快捷翻译/main.py
liusongtao99/tools_python
f01d315c46a619828d02ed9327f4264ba3a382d8
[ "Apache-2.0" ]
119
2019-05-27T09:45:14.000Z
2022-03-09T03:44:53.000Z
#!/usr/bin/env python # encoding: utf-8 """ @version: v1.0 @author: xag @license: Apache Licence @contact: xinganguo@gmail.com @site: http://www.xingag.top @software: PyCharm @file: main.py @time: 2020-03-18 09:29 @description:TODO """ import tkinter.messagebox from tkinter import * import pytesserac...
20.405405
77
0.642384
import tkinter.messagebox from tkinter import * import pytesseract from PIL import Image from PIL import ImageGrab from googletrans import Translator def get_clip_image(): image_result = None img = ImageGrab.grabclipboard() if img and isinstance(img, Image.Image): print(img.size) pr...
true
true
1c3ce297aba483c799d217f1c5ef168d40b272da
1,738
py
Python
APP/models.py
jhodges0845/Flask_Showcase
f91aa80034de194a6697e047ec2a1075a37da61d
[ "MIT" ]
null
null
null
APP/models.py
jhodges0845/Flask_Showcase
f91aa80034de194a6697e047ec2a1075a37da61d
[ "MIT" ]
3
2021-06-08T21:20:46.000Z
2022-03-12T00:24:30.000Z
APP/models.py
jhodges0845/Flask_Showcase
f91aa80034de194a6697e047ec2a1075a37da61d
[ "MIT" ]
null
null
null
from APP import db, login_manager from flask import current_app from flask_login import UserMixin from datetime import datetime from itsdangerous import TimedJSONWebSignatureSerializer as Serializer @login_manager.user_loader def load_user(user_id): return User.query.get(int(user_id)) class User(db.Model, UserMi...
36.978723
84
0.692175
from APP import db, login_manager from flask import current_app from flask_login import UserMixin from datetime import datetime from itsdangerous import TimedJSONWebSignatureSerializer as Serializer @login_manager.user_loader def load_user(user_id): return User.query.get(int(user_id)) class User(db.Model, UserMi...
true
true
1c3ce2da3c973967580037a197f58386b762d0f3
31,484
py
Python
pythonFiles/preview/jedi/evaluate/iterable.py
Andrewnetwork/pythonVSCode
415e20cbd5947dc48f5dd57787e6c96985989d30
[ "MIT" ]
null
null
null
pythonFiles/preview/jedi/evaluate/iterable.py
Andrewnetwork/pythonVSCode
415e20cbd5947dc48f5dd57787e6c96985989d30
[ "MIT" ]
null
null
null
pythonFiles/preview/jedi/evaluate/iterable.py
Andrewnetwork/pythonVSCode
415e20cbd5947dc48f5dd57787e6c96985989d30
[ "MIT" ]
null
null
null
""" Contains all classes and functions to deal with lists, dicts, generators and iterators in general. Array modifications ******************* If the content of an array (``set``/``list``) is requested somewhere, the current module will be checked for appearances of ``arr.append``, ``arr.insert``, etc. If the ``arr`...
35.256439
99
0.621427
from jedi import debug from jedi import settings from jedi import common from jedi.common import unite, safe_property from jedi._compatibility import unicode, zip_longest, is_py3 from jedi.evaluate import compiled from jedi.evaluate import helpers from jedi.evaluate import analysis from jedi.evaluate import pep0484 fro...
true
true
1c3ce2f6eba465ad99d04ca8825220d7da8fc18e
117,313
py
Python
sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_models.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
1
2021-06-02T08:01:35.000Z
2021-06-02T08:01:35.000Z
sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_models.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
null
null
null
sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_models.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
38.250082
726
0.667036
from msrest.serialization import Model from msrest.exceptions import HttpOperationError class CacheExpirationActionParameters(Model): _validation = { 'odatatype': {'required': True, 'constant': True}, 'cache_behavior': {'required': True}, 'cache_type': {'required': True, 'const...
true
true
1c3ce311e8dfd3dccb6639851fcb620f53402a91
2,364
py
Python
MshNeo4j/__init__.py
Karanshade/moonshade
4e119af40cd694396afd2d6a5bffdcc65b8bff09
[ "Apache-2.0" ]
null
null
null
MshNeo4j/__init__.py
Karanshade/moonshade
4e119af40cd694396afd2d6a5bffdcc65b8bff09
[ "Apache-2.0" ]
null
null
null
MshNeo4j/__init__.py
Karanshade/moonshade
4e119af40cd694396afd2d6a5bffdcc65b8bff09
[ "Apache-2.0" ]
null
null
null
import os from subprocess import check_output import pandas as pd from py2neo import Graph, Node, Relationship import karmahutils as kut version_info = "v0.1" version_type = 'moonshade library' authors = ['Yann Girard'] contact = 'yann.girard@gmail.com' lib_name = 'MshNeo4j' purpose = """QoL tools for interacting and ...
33.295775
108
0.697547
import os from subprocess import check_output import pandas as pd from py2neo import Graph, Node, Relationship import karmahutils as kut version_info = "v0.1" version_type = 'moonshade library' authors = ['Yann Girard'] contact = 'yann.girard@gmail.com' lib_name = 'MshNeo4j' purpose = """QoL tools for interacting and ...
true
true
1c3ce37b8e58e9029de970114e076aa16827be67
31,219
py
Python
eor_limits/plot_eor_limits.py
JulianBMunoz/eor_limits
780eef1d46862a69e6d249a90a9a230517436cea
[ "BSD-2-Clause" ]
null
null
null
eor_limits/plot_eor_limits.py
JulianBMunoz/eor_limits
780eef1d46862a69e6d249a90a9a230517436cea
[ "BSD-2-Clause" ]
null
null
null
eor_limits/plot_eor_limits.py
JulianBMunoz/eor_limits
780eef1d46862a69e6d249a90a9a230517436cea
[ "BSD-2-Clause" ]
null
null
null
#! /usr/bin/env python # -*- mode: python; coding: utf-8 -* # Copyright (c) 2019 Nichole Barry, Bryna Hazelton # Licensed under the 2-clause BSD License """Code for plotting EoR Limits.""" import glob import os import copy import yaml import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cmx impo...
36.685076
88
0.522246
import glob import os import copy import yaml import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cmx import matplotlib.colors as colors from eor_limits.data import DATA_PATH default_theory_params = { "munoz_2021_AllGalaxies_z8.5": { "paper": "munoz_2021", "model": "EO...
true
true
1c3ce37f6dbaffac25085825bc876854448b7f04
1,483
py
Python
tests/setup_tests.py
trungngv/CHAID
794756560872e944cec6a6dcc780feeeeadc51ed
[ "Apache-2.0" ]
141
2016-06-14T13:38:38.000Z
2022-02-03T12:01:18.000Z
tests/setup_tests.py
trungngv/CHAID
794756560872e944cec6a6dcc780feeeeadc51ed
[ "Apache-2.0" ]
110
2016-06-16T14:30:34.000Z
2022-01-28T19:36:10.000Z
tests/setup_tests.py
trungngv/CHAID
794756560872e944cec6a6dcc780feeeeadc51ed
[ "Apache-2.0" ]
47
2016-11-27T16:21:43.000Z
2021-12-28T08:40:51.000Z
""" This module provides helper functions for the rest of the testing module """ from collections import Iterable import os import sys from math import isnan import numpy as np ROOT_FOLDER = os.path.realpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')) sys.path = [ROOT_FOLDER] + sys.path np.seter...
32.23913
110
0.691167
from collections import Iterable import os import sys from math import isnan import numpy as np ROOT_FOLDER = os.path.realpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')) sys.path = [ROOT_FOLDER] + sys.path np.seterr(divide='ignore', invalid='ignore') import CHAID def islist(a): return isi...
true
true
1c3ce3c941daffcd8c87691cb40d3903a4a8bf21
10,205
py
Python
Stock/StockAdd.py
LaDane/Gamehelper
55357046471ca8eb560a787b52fd5cbf450d6697
[ "MIT" ]
null
null
null
Stock/StockAdd.py
LaDane/Gamehelper
55357046471ca8eb560a787b52fd5cbf450d6697
[ "MIT" ]
null
null
null
Stock/StockAdd.py
LaDane/Gamehelper
55357046471ca8eb560a787b52fd5cbf450d6697
[ "MIT" ]
null
null
null
import discord import json import asyncio from discord.ext import commands from filehandler import FileHandler from jsonhandler import JsonHandler jh = JsonHandler() fh = FileHandler() class StockAdd(commands.Cog): def __init__(self, bot): self.bot = bot self.load_data() def load_data(self):...
51.025
199
0.524351
import discord import json import asyncio from discord.ext import commands from filehandler import FileHandler from jsonhandler import JsonHandler jh = JsonHandler() fh = FileHandler() class StockAdd(commands.Cog): def __init__(self, bot): self.bot = bot self.load_data() def load_data(self):...
true
true
1c3ce40c51217203e9708b52bba7795f1025c118
937
py
Python
manual_time_write.py
n3cr0Tech/bluetooth_device_hack
6423750f8d8070dbdd5757e369472be3f22acd05
[ "MIT" ]
null
null
null
manual_time_write.py
n3cr0Tech/bluetooth_device_hack
6423750f8d8070dbdd5757e369472be3f22acd05
[ "MIT" ]
null
null
null
manual_time_write.py
n3cr0Tech/bluetooth_device_hack
6423750f8d8070dbdd5757e369472be3f22acd05
[ "MIT" ]
null
null
null
# NOTE: this code ONLY runs on Raspberry Pi import pygatt import time adapter = pygatt.GATTToolBackend() adapter.start() print('PyGatt Adapter Started') MAC_ADDR = 'ENTER YOUR BLE DEVICE MAC ADDRESS HERE' device = adapter.connect(address=MAC_ADDR, address_type=pygatt.BLEAddressType.random) hex_command = '21ff1006140b1...
44.619048
87
0.773746
import pygatt import time adapter = pygatt.GATTToolBackend() adapter.start() print('PyGatt Adapter Started') MAC_ADDR = 'ENTER YOUR BLE DEVICE MAC ADDRESS HERE' device = adapter.connect(address=MAC_ADDR, address_type=pygatt.BLEAddressType.random) hex_command = '21ff1006140b1d023329' adapter.sendline('char-write-cmd ...
true
true
1c3ce44f8305755f403894037daffd8f0fffed5b
1,778
py
Python
js/soundShader/mo.py
pome-ta/draftPythonistaScripts
5e0e2c286589a8069dd8963c2653fe3d783dcd6c
[ "MIT" ]
null
null
null
js/soundShader/mo.py
pome-ta/draftPythonistaScripts
5e0e2c286589a8069dd8963c2653fe3d783dcd6c
[ "MIT" ]
3
2021-08-15T14:44:23.000Z
2021-08-15T16:19:20.000Z
js/soundShader/mo.py
pome-ta/draftPythonistaScripts
63fe06fa369d536fdcc3fb4216931656a515b734
[ "MIT" ]
null
null
null
import os import sys from http.server import HTTPServer, SimpleHTTPRequestHandler import pathlib import ui #sys.path.append(str(pathlib.Path.cwd()) import wkwebview os.chdir(os.path.join(os.path.dirname(__file__), 'public')) uri = pathlib.Path('./index.html') httpd = HTTPServer(('', 8000), SimpleHTTPRequestHandler)...
23.394737
83
0.683915
import os import sys from http.server import HTTPServer, SimpleHTTPRequestHandler import pathlib import ui import wkwebview os.chdir(os.path.join(os.path.dirname(__file__), 'public')) uri = pathlib.Path('./index.html') httpd = HTTPServer(('', 8000), SimpleHTTPRequestHandler) class MyWebViewDelegate: def webvie...
true
true
1c3ce4dd90830cfd75fd2868a6010a2341a7eed9
5,488
py
Python
src/hg/makeDb/genbank/src/lib/py/genbank/Pipeline.py
andypohl/kent
af7a004c8f3fa909cd8c2cfc2e5bea60e3421cd1
[ "MIT" ]
171
2015-04-22T15:16:02.000Z
2022-03-18T20:21:53.000Z
src/hg/makeDb/genbank/src/lib/py/genbank/Pipeline.py
andypohl/kent
af7a004c8f3fa909cd8c2cfc2e5bea60e3421cd1
[ "MIT" ]
60
2016-10-03T15:15:06.000Z
2022-03-30T15:21:52.000Z
src/hg/makeDb/genbank/src/lib/py/genbank/Pipeline.py
andypohl/kent
af7a004c8f3fa909cd8c2cfc2e5bea60e3421cd1
[ "MIT" ]
80
2015-04-16T10:39:48.000Z
2022-03-29T16:36:30.000Z
"File-like object to create and manage a pipeline of subprocesses" import subprocess def hasWhiteSpace(word): "check if a string contains any whitespace" for c in word: if c.isspace(): return True return False class Proc(subprocess.Popen): """A process in the pipeline. This exten...
32.666667
102
0.543003
import subprocess def hasWhiteSpace(word): for c in word: if c.isspace(): return True return False class Proc(subprocess.Popen): def __init__(self, cmd, stdin, stdout): self.cmd = list(cmd) subprocess.Popen.__init__(self, self.cmd, stdin=stdin, st...
true
true
1c3ce643df3aaffc76fee87b2c0f49e5b6aefc57
421
py
Python
students/K33421/Kustova_Ekaterina/Lr2/Practice2.1-2.3/django_project_kustova/django_project_kustova/wsgi.py
IJustWantToSleep/ITMO_ICT_WebDevelopment_2020-2021
90921730362d14ac5e03268baab1a479c39d578d
[ "MIT" ]
null
null
null
students/K33421/Kustova_Ekaterina/Lr2/Practice2.1-2.3/django_project_kustova/django_project_kustova/wsgi.py
IJustWantToSleep/ITMO_ICT_WebDevelopment_2020-2021
90921730362d14ac5e03268baab1a479c39d578d
[ "MIT" ]
null
null
null
students/K33421/Kustova_Ekaterina/Lr2/Practice2.1-2.3/django_project_kustova/django_project_kustova/wsgi.py
IJustWantToSleep/ITMO_ICT_WebDevelopment_2020-2021
90921730362d14ac5e03268baab1a479c39d578d
[ "MIT" ]
null
null
null
""" WSGI config for django_project_kustova project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefaul...
24.764706
82
0.800475
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_project_kustova.settings') application = get_wsgi_application()
true
true
1c3ce67637ade16a79a9930c155025f80042e440
2,815
py
Python
twitterScraping/get_metadata.py
nmestrada/TrumpTweetGenerator
cf3c4c8abfd747e59ae89869b738a79c001d84d4
[ "MIT" ]
null
null
null
twitterScraping/get_metadata.py
nmestrada/TrumpTweetGenerator
cf3c4c8abfd747e59ae89869b738a79c001d84d4
[ "MIT" ]
null
null
null
twitterScraping/get_metadata.py
nmestrada/TrumpTweetGenerator
cf3c4c8abfd747e59ae89869b738a79c001d84d4
[ "MIT" ]
null
null
null
import tweepy import json import math import glob import csv import zipfile import zlib from tweepy import TweepError from time import sleep # CHANGE THIS TO THE USER YOU WANT user = 'realdonaldtrump' with open('api_keys.json') as f: keys = json.load(f) auth = tweepy.OAuthHandler(keys['consumer_key'], keys['cons...
29.946809
162
0.66643
import tweepy import json import math import glob import csv import zipfile import zlib from tweepy import TweepError from time import sleep user = 'realdonaldtrump' with open('api_keys.json') as f: keys = json.load(f) auth = tweepy.OAuthHandler(keys['consumer_key'], keys['consumer_secret']) auth.set_access_tok...
true
true
1c3ce68283063859a2a1f1f6739ba3f341778d3c
15,494
py
Python
selfdrive/controls/lib/lateral_planner.py
kansakitw/dragonpilotamd
83295e6746e685b22e218bd0bd943df674e42a81
[ "MIT" ]
null
null
null
selfdrive/controls/lib/lateral_planner.py
kansakitw/dragonpilotamd
83295e6746e685b22e218bd0bd943df674e42a81
[ "MIT" ]
null
null
null
selfdrive/controls/lib/lateral_planner.py
kansakitw/dragonpilotamd
83295e6746e685b22e218bd0bd943df674e42a81
[ "MIT" ]
null
null
null
import math import numpy as np from common.realtime import sec_since_boot, DT_MDL from common.numpy_fast import interp from selfdrive.swaglog import cloudlog from selfdrive.controls.lib.lateral_mpc import libmpc_py from selfdrive.controls.lib.drive_helpers import CONTROL_N, MPC_COST_LAT, LAT_MPC_N, CAR_ROTATION_RADIUS ...
48.118012
141
0.723764
import math import numpy as np from common.realtime import sec_since_boot, DT_MDL from common.numpy_fast import interp from selfdrive.swaglog import cloudlog from selfdrive.controls.lib.lateral_mpc import libmpc_py from selfdrive.controls.lib.drive_helpers import CONTROL_N, MPC_COST_LAT, LAT_MPC_N, CAR_ROTATION_RADIUS ...
true
true
1c3ce6e8bf1faf14cc83cc10b3fe13b90c30ecf5
5,341
py
Python
archivebox/index/json.py
BlipRanger/ArchiveBox
6f462b45d7dd6bc5a0d49a3329c592d32c610b9f
[ "MIT" ]
1
2020-11-22T21:26:44.000Z
2020-11-22T21:26:44.000Z
archivebox/index/json.py
extratone/ArchiveBox
b82737cc4dafca49d42edd3cdfd46cf7d5b7c6c1
[ "MIT" ]
5
2021-03-30T14:20:46.000Z
2021-09-22T19:41:14.000Z
archivebox/index/json.py
extratone/ArchiveBox
b82737cc4dafca49d42edd3cdfd46cf7d5b7c6c1
[ "MIT" ]
null
null
null
__package__ = 'archivebox.index' import os import sys import json as pyjson from pathlib import Path from datetime import datetime from typing import List, Optional, Iterator, Any, Union from .schema import Link, ArchiveResult from ..system import atomic_write from ..util import enforce_types from ..config import ( ...
32.174699
127
0.625164
__package__ = 'archivebox.index' import os import sys import json as pyjson from pathlib import Path from datetime import datetime from typing import List, Optional, Iterator, Any, Union from .schema import Link, ArchiveResult from ..system import atomic_write from ..util import enforce_types from ..config import ( ...
true
true
1c3ce7760c9ae2c72d27fa3f5f35f7f24304221e
1,604
py
Python
source/utils/message.py
hytalo-bassi/aeternah
82f21d6f6acb01ce50f036702d8878ca7b3c998d
[ "MIT" ]
1
2021-06-28T15:33:56.000Z
2021-06-28T15:33:56.000Z
source/utils/message.py
hytalo-bassi/aeternah
82f21d6f6acb01ce50f036702d8878ca7b3c998d
[ "MIT" ]
null
null
null
source/utils/message.py
hytalo-bassi/aeternah
82f21d6f6acb01ce50f036702d8878ca7b3c998d
[ "MIT" ]
2
2021-05-25T20:20:42.000Z
2021-06-28T15:33:58.000Z
from aiogram import types from source.setup import bot, _langs from .lang import Lang class Message: def __init__(self, message: types.Message, opt: dict): self.message: types.Message = message self.lang = Lang(_langs, message.from_user.language_code) self.opt: dict = { "is_repl...
42.210526
89
0.63591
from aiogram import types from source.setup import bot, _langs from .lang import Lang class Message: def __init__(self, message: types.Message, opt: dict): self.message: types.Message = message self.lang = Lang(_langs, message.from_user.language_code) self.opt: dict = { "is_repl...
true
true
1c3ce780823d0d9210cded58f1d85223e308451a
1,940
py
Python
gogotest/gogotest/consqlite.py
meihuno/sandbox_scrapy
e88aba41b278c2a5a7585165ff3656ce8e89942b
[ "MIT" ]
null
null
null
gogotest/gogotest/consqlite.py
meihuno/sandbox_scrapy
e88aba41b278c2a5a7585165ff3656ce8e89942b
[ "MIT" ]
null
null
null
gogotest/gogotest/consqlite.py
meihuno/sandbox_scrapy
e88aba41b278c2a5a7585165ff3656ce8e89942b
[ "MIT" ]
null
null
null
import sqlite3 class DBConnection(): def __init__(self, dbpath='test.db') -> any: dbname = dbpath self.conn = sqlite3.connect(dbname) # SQLiteを操作するためのカーソルを作成 self._create_db() def _create_db(self): # テーブル作成 cursor = self.conn.cursor() cursor.exe...
27.323944
87
0.487113
import sqlite3 class DBConnection(): def __init__(self, dbpath='test.db') -> any: dbname = dbpath self.conn = sqlite3.connect(dbname) self._create_db() def _create_db(self): cursor = self.conn.cursor() cursor.execute( 'CREATE TABLE...
true
true
1c3ce82b1e4c7fffc470a4a82c810effcb2667d0
1,953
py
Python
tests/contrib/validation/cerberus/test_validator_cerberus.py
vipulgupta2048/spidermon
b955d15acb5a933c56bc6f52cb34b644a13cf94f
[ "BSD-3-Clause" ]
1
2019-08-04T07:49:34.000Z
2019-08-04T07:49:34.000Z
tests/contrib/validation/cerberus/test_validator_cerberus.py
vipulgupta2048/spidermon
b955d15acb5a933c56bc6f52cb34b644a13cf94f
[ "BSD-3-Clause" ]
4
2019-06-27T10:40:11.000Z
2019-08-12T11:40:57.000Z
tests/contrib/validation/cerberus/test_validator_cerberus.py
vipulgupta2048/spidermon
b955d15acb5a933c56bc6f52cb34b644a13cf94f
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import import pytest from cerberus.validator import DocumentError, SchemaError from spidermon.contrib.validation import CerberusValidator @pytest.mark.parametrize( "data,schema", [ pytest.param( {"name": "foo", "number": 5}, {"name": {"typestring...
29.590909
88
0.600102
from __future__ import absolute_import import pytest from cerberus.validator import DocumentError, SchemaError from spidermon.contrib.validation import CerberusValidator @pytest.mark.parametrize( "data,schema", [ pytest.param( {"name": "foo", "number": 5}, {"name": {"typestring...
true
true
1c3ce8aa5069004e6ac17312a43a74bb0553e4b0
1,261
py
Python
icebrk/fasthistos.py
bainbrid/icenet
0b261dc97451fd7f896ed27f2b90dd2668e635ca
[ "MIT" ]
null
null
null
icebrk/fasthistos.py
bainbrid/icenet
0b261dc97451fd7f896ed27f2b90dd2668e635ca
[ "MIT" ]
null
null
null
icebrk/fasthistos.py
bainbrid/icenet
0b261dc97451fd7f896ed27f2b90dd2668e635ca
[ "MIT" ]
null
null
null
# Raw "fast" observable containers for B/RK analyzer # # # Mikael Mieskolainen, 2020 # m.mieskolainen@imperial.ac.uk import bz2 import copy import numpy as np import iceplot import icebrk.tools as tools obs_template = { # Axis limits 'xlim' : None, 'ylim' : None, 'xlabel' : r'', 'ylabel' : r'Counts', 'un...
18.544118
111
0.57732
import bz2 import copy import numpy as np import iceplot import icebrk.tools as tools obs_template = { 'xlim' : None, 'ylim' : None, 'xlabel' : r'', 'ylabel' : r'Counts', 'units' : r'', 'label' : r'', 'figsize' : (4,4), 'bins' : iceplot.stepspace(0.0, 10.0, 0.1), 'density' : False, 'func' ...
true
true
1c3ce8b7d9aa4c5f8e412a458a393818a2f74516
3,527
py
Python
lanyue_thesis/acdctcp/figures/micro2flows/coexitence/run-dumbbell.py
keqhe/phd_thesis
770fc637f9b7d908f349bbbfa112cbc17d898be3
[ "Unlicense" ]
2
2017-08-27T08:03:16.000Z
2017-10-20T14:28:43.000Z
lanyue_thesis/acdctcp/figures/micro2flows/coexitence/run-dumbbell.py
keqhe/phd_thesis
770fc637f9b7d908f349bbbfa112cbc17d898be3
[ "Unlicense" ]
null
null
null
lanyue_thesis/acdctcp/figures/micro2flows/coexitence/run-dumbbell.py
keqhe/phd_thesis
770fc637f9b7d908f349bbbfa112cbc17d898be3
[ "Unlicense" ]
null
null
null
#!/usr/bin/python import random import subprocess import argparse import os import time sw1 = "10.82.64.1" sw2 = "10.82.64.2" sw3 = "10.82.64.3" sw4 = "10.82.64.4" sw5 = "10.82.64.5" switches = [sw3] # # flow[i] is src[i] sending to dst[i] # src = [8, 16] dst = [19, 20] CONGESTION_PORT = 64 #logs into arldcnX a...
33.590476
202
0.662036
import random import subprocess import argparse import os import time sw1 = "10.82.64.1" sw2 = "10.82.64.2" sw3 = "10.82.64.3" sw4 = "10.82.64.4" sw5 = "10.82.64.5" switches = [sw3] src = [8, 16] dst = [19, 20] CONGESTION_PORT = 64 def kill_nuttcp(X): os.system("ssh arldcn%d sudo killall -9 nuttcp"%(X)) d...
false
true
1c3ce94bb65cdb4ca0f7118303a99a2ad1845a8d
16,866
py
Python
src/oci/optimizer/models/profile_summary.py
ezequielramos/oci-python-sdk
cc4235cf217beaf9feed75760e9ce82610222762
[ "Apache-2.0", "BSD-3-Clause" ]
3
2020-09-10T22:09:45.000Z
2021-12-24T17:00:07.000Z
src/oci/optimizer/models/profile_summary.py
ezequielramos/oci-python-sdk
cc4235cf217beaf9feed75760e9ce82610222762
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/optimizer/models/profile_summary.py
ezequielramos/oci-python-sdk
cc4235cf217beaf9feed75760e9ce82610222762
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
34.072727
245
0.655461
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class ProfileSummary(object): LIFECYCLE_STATE_ACTIVE = "ACTIVE" LIFECYCLE_STATE_FAILED = "FAILED" ...
true
true
1c3ce970d1f1279124b396bc1ce1b5f8a9040cfb
38,653
py
Python
test/functional/s3api/test_multi_upload.py
gyaozhou/swift-read
16fe18ae3be59a095f3bafdd69fe74b48a2771cb
[ "Apache-2.0" ]
null
null
null
test/functional/s3api/test_multi_upload.py
gyaozhou/swift-read
16fe18ae3be59a095f3bafdd69fe74b48a2771cb
[ "Apache-2.0" ]
null
null
null
test/functional/s3api/test_multi_upload.py
gyaozhou/swift-read
16fe18ae3be59a095f3bafdd69fe74b48a2771cb
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2015 OpenStack Foundation # # 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 ...
42.616318
80
0.595245
import base64 import unittest2 import os import boto from distutils.version import StrictVersion from hashlib import md5 from itertools import izip, izip_longest import test.functional as tf from swift.common.middleware.s3api.etree import fromstring, tostring, Element, \ SubElement from swift.co...
true
true
1c3ceac72c1a9d599dafe368a8354da196e7f1b9
395
py
Python
problems/217.Contains_Duplicate/AC_set_nlogn.py
subramp-prep/leetcode
d125201d9021ab9b1eea5e5393c2db4edd84e740
[ "Unlicense" ]
null
null
null
problems/217.Contains_Duplicate/AC_set_nlogn.py
subramp-prep/leetcode
d125201d9021ab9b1eea5e5393c2db4edd84e740
[ "Unlicense" ]
null
null
null
problems/217.Contains_Duplicate/AC_set_nlogn.py
subramp-prep/leetcode
d125201d9021ab9b1eea5e5393c2db4edd84e740
[ "Unlicense" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Author: illuz <iilluzen[at]gmail.com> # File: AC_set_nlogn.py # Create Date: 2015-07-13 21:46:54 # Usage: AC_set_nlogn.py # Descripton: class Solution: def containDuplicate(self, nums): return len(set(nums)) != len(nums) s = Solution() print...
24.6875
44
0.622785
class Solution: def containDuplicate(self, nums): return len(set(nums)) != len(nums) s = Solution() print(s.containDuplicate([1, 2, 3, 4])) print(s.containDuplicate([2, 2, 3, 4]))
true
true
1c3ceb46051246691919dd2dac71b76ebef6eaf5
4,277
py
Python
themes/migrations/0001_initial.py
ilblackdragon/django-themes
38ae4660cc7308dec99914f7a097079064cca9bb
[ "MIT" ]
19
2015-01-21T11:42:30.000Z
2021-04-07T13:32:54.000Z
themes/migrations/0001_initial.py
ilblackdragon/django-themes
38ae4660cc7308dec99914f7a097079064cca9bb
[ "MIT" ]
2
2016-03-20T22:24:25.000Z
2018-02-10T21:27:04.000Z
themes/migrations/0001_initial.py
ilblackdragon/django-themes
38ae4660cc7308dec99914f7a097079064cca9bb
[ "MIT" ]
11
2015-03-02T10:17:20.000Z
2021-04-07T13:32:59.000Z
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Theme' db.create_table('themes_theme', ( ('id', self.gf('django.db.models.fields...
61.1
182
0.567921
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.create_table('themes_theme', ( ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ...
true
true
1c3cec5f21ed99b265c12e7a253adf6b89e40d88
8,166
py
Python
test.py
Neufund/subkey-authentication-server
37094695f6dcb3289d6311db750168aaf42045f6
[ "MIT" ]
null
null
null
test.py
Neufund/subkey-authentication-server
37094695f6dcb3289d6311db750168aaf42045f6
[ "MIT" ]
null
null
null
test.py
Neufund/subkey-authentication-server
37094695f6dcb3289d6311db750168aaf42045f6
[ "MIT" ]
null
null
null
import hashlib import json import unittest from datetime import datetime, timedelta import jwt from multimerchant.wallet import Wallet from multimerchant.wallet.keys import PublicKey import db from config import LEDGER_BASE_PATH from server import app from utils import pub_to_addr, wallet_to_addr TEST_DB = "test.jso...
42.978947
100
0.692138
import hashlib import json import unittest from datetime import datetime, timedelta import jwt from multimerchant.wallet import Wallet from multimerchant.wallet.keys import PublicKey import db from config import LEDGER_BASE_PATH from server import app from utils import pub_to_addr, wallet_to_addr TEST_DB = "test.jso...
true
true
1c3cedc18c59521453aa7bf4124d6ee5252fddae
610
py
Python
bas03_lo_temp.py
bokunimowakaru/xbee3_micropython
cb18e8dbf72749b70dfc5bd70de6dfa598fefaa2
[ "MIT" ]
1
2021-09-29T13:32:18.000Z
2021-09-29T13:32:18.000Z
bas03_lo_temp.py
bokunimowakaru/xbee3_micropython
cb18e8dbf72749b70dfc5bd70de6dfa598fefaa2
[ "MIT" ]
null
null
null
bas03_lo_temp.py
bokunimowakaru/xbee3_micropython
cb18e8dbf72749b70dfc5bd70de6dfa598fefaa2
[ "MIT" ]
2
2019-07-18T19:27:36.000Z
2020-07-16T10:50:56.000Z
# MicroPython XBee3 ZigBee # coding: utf-8 ''' 内蔵温度センサと電源電圧の値を読み取る Copyright (c) 2018-2019 Wataru KUNINO ''' import xbee import time TEMP_OFFSET=14.0 # 内部温度上昇 def getTemp(): # getTemp関数を定義する temp = xbee.atcmd(...
32.105263
87
0.511475
import xbee import time TEMP_OFFSET=14.0 def getTemp(): temp = xbee.atcmd('TP') - TEMP_OFFSET volt = xbee.atcmd('%V') / 1000 return {'temp':temp, 'volt':volt} while True: print(getTemp()) time.s...
true
true
1c3cedcc8ef88ce053a11b492e317d69e03f2101
172
py
Python
manage/open.py
argeweb/start
7c3a407598ee2b0a49e9f48c99f3941c37e9753c
[ "MIT" ]
2
2016-10-16T01:59:48.000Z
2016-11-20T02:11:32.000Z
manage/open.py
argeweb/start
7c3a407598ee2b0a49e9f48c99f3941c37e9753c
[ "MIT" ]
1
2018-01-19T07:48:04.000Z
2018-04-03T02:04:18.000Z
manage/open.py
argeweb/start
7c3a407598ee2b0a49e9f48c99f3941c37e9753c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import os def run(str_command): print str_command os.system(str_command) run('start chrome http://127.0.0.1:8080')
15.636364
41
0.656977
import os def run(str_command): print str_command os.system(str_command) run('start chrome http://127.0.0.1:8080')
false
true
1c3ceec81e623535b8049484686f29b4c59b1e81
368
py
Python
setting.py
arthur37231/bilibili-followers-checker
11da0d1e8c0381162b8eb407fad98962109e3c52
[ "MIT" ]
null
null
null
setting.py
arthur37231/bilibili-followers-checker
11da0d1e8c0381162b8eb407fad98962109e3c52
[ "MIT" ]
null
null
null
setting.py
arthur37231/bilibili-followers-checker
11da0d1e8c0381162b8eb407fad98962109e3c52
[ "MIT" ]
null
null
null
FOLDER_RESOURCE = "data" PATH_RESOURCE = "/static" SUB_FOLDER_IMAGE = "img" EXPIRATION_TOKEN_HOURS = 24*7 CONF_POSTGRES = { 'db_type': 'postgresql', 'host': 'localhost', 'port': 5432, 'user': 'USERNAME', # PostgreSQL username 'db_name': 'DBNAME', # PostgreSQL Database Name 'db_p...
23
58
0.638587
FOLDER_RESOURCE = "data" PATH_RESOURCE = "/static" SUB_FOLDER_IMAGE = "img" EXPIRATION_TOKEN_HOURS = 24*7 CONF_POSTGRES = { 'db_type': 'postgresql', 'host': 'localhost', 'port': 5432, 'user': 'USERNAME', 'db_name': 'DBNAME', 'db_password': 'PASSWORD' }
true
true
1c3cf1fd77aec93d54823cbc15420e3cc520a433
32,432
py
Python
pandapower/estimation/ppc_conversions.py
HaoranDennis/pandapower
22c8680d3373879e792fe7478bd2dde4ea8cb018
[ "BSD-3-Clause" ]
1
2019-03-14T05:27:43.000Z
2019-03-14T05:27:43.000Z
pandapower/estimation/ppc_conversions.py
HaoranDennis/pandapower
22c8680d3373879e792fe7478bd2dde4ea8cb018
[ "BSD-3-Clause" ]
null
null
null
pandapower/estimation/ppc_conversions.py
HaoranDennis/pandapower
22c8680d3373879e792fe7478bd2dde4ea8cb018
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2016-2019 by University of Kassel and Fraunhofer Institute for Energy Economics # and Energy System Technology (IEE), Kassel. All rights reserved. import numpy as np import pandas as pd from pandapower.auxiliary import _select_is_elements_numba, _add_ppc_options, _add_auxiliar...
60.734082
149
0.640047
import numpy as np import pandas as pd from pandapower.auxiliary import _select_is_elements_numba, _add_ppc_options, _add_auxiliary_elements from pandapower.pd2ppc import _pd2ppc from pandapower.estimation.idx_bus import * from pandapower.estimation.idx_brch import * from pandapower.pypower.idx_brch import branch...
true
true
1c3cf3fa8909e682b90ef4b30a1f452499c8e9b5
3,068
py
Python
monilog/log_generator.py
tayciryahmed/monilog
991c909e93d1c8bf087519b4105308ce2cb5195a
[ "MIT" ]
2
2020-03-03T09:32:42.000Z
2020-05-27T21:15:30.000Z
monilog/log_generator.py
tayciryahmed/monilog
991c909e93d1c8bf087519b4105308ce2cb5195a
[ "MIT" ]
null
null
null
monilog/log_generator.py
tayciryahmed/monilog
991c909e93d1c8bf087519b4105308ce2cb5195a
[ "MIT" ]
null
null
null
''' Log generation simulation with different durations and rates. ''' import os import time import random from time import sleep from datetime import datetime import logging log_format = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig(format=log_format, level=logging.INFO) class LogGenerator: ''' ...
29.5
80
0.518579
import os import time import random from time import sleep from datetime import datetime import logging log_format = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig(format=log_format, level=logging.INFO) class LogGenerator: def __init__(self, file="/tmp/access.log", ...
true
true
1c3cf4406a7247ddaca749c3a675a988c4acb16d
5,510
py
Python
stroylux/main/account/emails.py
vladkoblynsky/shop
aaf027f4111605772624a868a0243b221b97c857
[ "BSD-3-Clause" ]
null
null
null
stroylux/main/account/emails.py
vladkoblynsky/shop
aaf027f4111605772624a868a0243b221b97c857
[ "BSD-3-Clause" ]
7
2020-09-19T16:24:46.000Z
2022-01-13T03:19:46.000Z
stroylux/main/account/emails.py
vladkoblynsky/shop
aaf027f4111605772624a868a0243b221b97c857
[ "BSD-3-Clause" ]
null
null
null
from urllib.parse import urlencode from django.contrib.auth.tokens import default_token_generator from templated_email import send_templated_mail # from ..account import events as account_events from ..celeryconf import app from main.core.emails import get_email_context, prepare_url REQUEST_EMAIL_CHANGE_TEMPLATE = "...
34.654088
87
0.75735
from urllib.parse import urlencode from django.contrib.auth.tokens import default_token_generator from templated_email import send_templated_mail from ..celeryconf import app from main.core.emails import get_email_context, prepare_url REQUEST_EMAIL_CHANGE_TEMPLATE = "account/request_email_change" EMAIL_CHANGED_NOTI...
true
true
1c3cf441982ae1444b25caea21aae44986c5c952
6,984
py
Python
tests/policy/test_linear.py
nmasahiro/zr-obp
dde815dfe75fc6cc3c9ee6479d97db1e5567de6d
[ "Apache-2.0" ]
null
null
null
tests/policy/test_linear.py
nmasahiro/zr-obp
dde815dfe75fc6cc3c9ee6479d97db1e5567de6d
[ "Apache-2.0" ]
null
null
null
tests/policy/test_linear.py
nmasahiro/zr-obp
dde815dfe75fc6cc3c9ee6479d97db1e5567de6d
[ "Apache-2.0" ]
null
null
null
import pytest import numpy as np from obp.policy.linear import LinEpsilonGreedy from obp.policy.linear import LinUCB from obp.policy.linear import LinTS def test_linear_base_exception(): # invalid dim with pytest.raises(ValueError): LinEpsilonGreedy(n_actions=2, dim=-3) with pytest.raises(ValueE...
34.574257
87
0.683562
import pytest import numpy as np from obp.policy.linear import LinEpsilonGreedy from obp.policy.linear import LinUCB from obp.policy.linear import LinTS def test_linear_base_exception(): with pytest.raises(ValueError): LinEpsilonGreedy(n_actions=2, dim=-3) with pytest.raises(ValueError): ...
true
true