hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
2b6e4feb528e794151fe0780d3fd084635cc36c5
879
py
Python
ubivar/test/test_integration.py
oriskami/oriskami-python
2b0d81f713a9149977907183c67eec136d49ee8c
[ "MIT" ]
4
2017-05-28T19:37:31.000Z
2017-06-13T11:34:26.000Z
ubivar/test/test_integration.py
ubivar/ubivar-python
2b0d81f713a9149977907183c67eec136d49ee8c
[ "MIT" ]
null
null
null
ubivar/test/test_integration.py
ubivar/ubivar-python
2b0d81f713a9149977907183c67eec136d49ee8c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import unittest2 if __name__ == '__main__': unittest2.main()
23.131579
57
0.704209
# -*- coding: utf-8 -*- import os import sys import unittest2 import ubivar from mock import patch from ubivar.test.helper import (UbivarTestCase, NOW) class FunctionalTests(UbivarTestCase): request_client = ubivar.http_client.Urllib2Client def setUp(self): super(FunctionalTests, self).setUp() ...
0
0
0
628
0
0
0
1
157
01f5f713c9f5b6622ee771d1a280ade07ea7739f
886
py
Python
care/facility/migrations/0177_auto_20200916_1448.py
gigincg/care
07be6a7982b5c46a854e3435a52662f32800c8ae
[ "MIT" ]
189
2020-03-17T17:18:58.000Z
2022-02-22T09:49:45.000Z
care/facility/migrations/0177_auto_20200916_1448.py
gigincg/care
07be6a7982b5c46a854e3435a52662f32800c8ae
[ "MIT" ]
598
2020-03-19T21:22:09.000Z
2022-03-30T05:08:37.000Z
care/facility/migrations/0177_auto_20200916_1448.py
gigincg/care
07be6a7982b5c46a854e3435a52662f32800c8ae
[ "MIT" ]
159
2020-03-19T18:45:56.000Z
2022-03-17T13:23:12.000Z
# Generated by Django 2.2.11 on 2020-09-16 09:18
35.44
292
0.646727
# Generated by Django 2.2.11 on 2020-09-16 09:18 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('facility', '0176_auto_20200916_1443'), ] operations = [ migrations.AddField( model_name='shifting...
0
0
0
741
0
0
0
27
68
a9e45c93c57afe519d4227c00887dce9200f4d06
133
py
Python
dynamic_watershed/__init__.py
PeterJackNaylor/dynamic_watershed
37ac2dcc85dbcbefdd092ee3912a9888ae1269af
[ "MIT" ]
11
2018-09-03T11:39:33.000Z
2022-02-01T09:03:35.000Z
dynamic_watershed/__init__.py
PeterJackNaylor/dynamic_watershed
37ac2dcc85dbcbefdd092ee3912a9888ae1269af
[ "MIT" ]
null
null
null
dynamic_watershed/__init__.py
PeterJackNaylor/dynamic_watershed
37ac2dcc85dbcbefdd092ee3912a9888ae1269af
[ "MIT" ]
null
null
null
""" dynamic_watershed/__init__.py """ # __all__ = []
16.625
43
0.759398
""" dynamic_watershed/__init__.py """ # __all__ = [] from .dynamic_watershed import post_process from .version import __version__
0
0
0
0
0
0
0
33
46
705e5afc9b357faa79c77b95cc4c2b90b2ead2c4
215
py
Python
env/lib/python3.5/site-packages/pylint/test/functional/not_async_context_manager_py37.py
Udolf15/recommedMeMovies
be5ae74acd98e3f93beaaa5bb55623974fb24247
[ "MIT" ]
33
2019-08-04T01:48:11.000Z
2022-03-20T13:53:42.000Z
env/lib/python3.5/site-packages/pylint/test/functional/not_async_context_manager_py37.py
Udolf15/recommedMeMovies
be5ae74acd98e3f93beaaa5bb55623974fb24247
[ "MIT" ]
16
2020-02-12T00:28:11.000Z
2022-03-11T23:48:19.000Z
env/lib/python3.5/site-packages/pylint/test/functional/not_async_context_manager_py37.py
Udolf15/recommedMeMovies
be5ae74acd98e3f93beaaa5bb55623974fb24247
[ "MIT" ]
12
2019-08-12T07:59:38.000Z
2022-03-24T08:09:40.000Z
# pylint: disable=missing-docstring
16.538462
42
0.776744
# pylint: disable=missing-docstring from contextlib import asynccontextmanager @asynccontextmanager async def context_manager(value): yield value async with context_manager(42) as ans: assert ans == 42
0
49
38
0
0
0
0
21
69
0acc7992c6a4ebe8570e0359ddb4646be53431d5
2,445
py
Python
RottenTomatoes/rt/rt/pipelines.py
hovhannest/TMScrappers
b9218bead4450931359b6827f3caf9278fed17b2
[ "MIT" ]
null
null
null
RottenTomatoes/rt/rt/pipelines.py
hovhannest/TMScrappers
b9218bead4450931359b6827f3caf9278fed17b2
[ "MIT" ]
null
null
null
RottenTomatoes/rt/rt/pipelines.py
hovhannest/TMScrappers
b9218bead4450931359b6827f3caf9278fed17b2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
34.928571
93
0.639264
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html import csv from scrapy import signals from scrapy.exporters import CsvItemExporter import inspect from rt.items import * from rt...
0
234
0
1,832
0
0
0
32
155
62ecc636d39a75a2ad17adc663a12642b740033b
1,419
py
Python
tictactoe_project/tests/board_test.py
agryman/sean
11baf69c6eb9308266126bf9c8b1c67c6fd33afc
[ "MIT" ]
1
2020-03-28T18:17:52.000Z
2020-03-28T18:17:52.000Z
tictactoe_project/tests/board_test.py
agryman/sean
11baf69c6eb9308266126bf9c8b1c67c6fd33afc
[ "MIT" ]
1
2022-01-21T21:33:00.000Z
2022-01-21T21:33:00.000Z
tictactoe_project/tests/board_test.py
agryman/sean
11baf69c6eb9308266126bf9c8b1c67c6fd33afc
[ "MIT" ]
null
null
null
"""This module tests the board module."""
30.191489
63
0.617336
"""This module tests the board module.""" import pytest from tictactoe.player import Player from tictactoe.row import Row from tictactoe.board import Board, cell_indices class TestCellIndices: def test_fail(self): with pytest.raises(ValueError): cell_indices(0) with pytest.raises(ValueE...
0
0
0
1,180
0
0
0
40
157
e809129ade419fef97e899f2906ecc9e7c295aa6
12,480
py
Python
src/kafka_rest_client/client.py
bozzzzo/kafka-rest-client
ce3a46f18e57b4a920ebce7d8ad421741be669f4
[ "Apache-2.0" ]
null
null
null
src/kafka_rest_client/client.py
bozzzzo/kafka-rest-client
ce3a46f18e57b4a920ebce7d8ad421741be669f4
[ "Apache-2.0" ]
null
null
null
src/kafka_rest_client/client.py
bozzzzo/kafka-rest-client
ce3a46f18e57b4a920ebce7d8ad421741be669f4
[ "Apache-2.0" ]
1
2021-08-30T13:56:53.000Z
2021-08-30T13:56:53.000Z
import importlib_metadata import logging from collections import namedtuple __all__ = [ 'KafkaRestClient', 'KafkaRestClientException', 'TopicPartition', 'KafkaMessage' ] log = logging.getLogger(name="kafka-rest-client") __version__ = importlib_metadata.version('kafka-rest-client') USER_AGENT = f"kafka-rest-...
37.253731
93
0.565865
import requests import urllib import uuid import importlib_metadata import json import base64 import logging from collections import namedtuple, defaultdict, ChainMap from typing import List __all__ = [ 'KafkaRestClient', 'KafkaRestClientException', 'TopicPartition', 'KafkaMessage' ] log = logging.getLogger(...
0
471
0
11,318
0
0
0
-17
178
56af300e8f4226b5d4e58e02ea559825aed78b3b
4,417
py
Python
simulator/delay.py
mmosko/ccnx-beginendfragment-sim
092d080f92ef0dbbc93d2e8cd66236cd66e8cf47
[ "BSD-2-Clause" ]
null
null
null
simulator/delay.py
mmosko/ccnx-beginendfragment-sim
092d080f92ef0dbbc93d2e8cd66236cd66e8cf47
[ "BSD-2-Clause" ]
null
null
null
simulator/delay.py
mmosko/ccnx-beginendfragment-sim
092d080f92ef0dbbc93d2e8cd66236cd66e8cf47
[ "BSD-2-Clause" ]
1
2019-04-01T18:36:29.000Z
2019-04-01T18:36:29.000Z
# # Copyright (c) 2016, Xerox Corporation (Xerox) and Palo Alto Research Center, Inc (PARC) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the abo...
38.408696
90
0.721304
# # Copyright (c) 2016, Xerox Corporation (Xerox) and Palo Alto Research Center, Inc (PARC) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the abo...
0
136
0
1,043
0
0
0
-19
114
b213981a7fe2cee320079878f5d531a7068db054
1,427
py
Python
core/internationalization.py
aaaimx/covid19-assistant-api
48293d97991aa69fe9b01a5871be86e9c5e38057
[ "MIT" ]
1
2020-03-28T06:40:36.000Z
2020-03-28T06:40:36.000Z
core/internationalization.py
aaaimx/covid19-assistant-api
48293d97991aa69fe9b01a5871be86e9c5e38057
[ "MIT" ]
14
2020-03-24T20:59:53.000Z
2021-12-13T20:36:13.000Z
core/internationalization.py
aaaimx/covid19-assistant-api
48293d97991aa69fe9b01a5871be86e9c5e38057
[ "MIT" ]
null
null
null
# Internationalization # https://docs.djangoproject.com/en/3.0/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Configuracin de formatos de fechas DATETIME_INPUT_FORMATS = ( '%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' '%Y-%m-%d %H:%M:%S.%f', # '200...
34.804878
59
0.389629
# Internationalization # https://docs.djangoproject.com/en/3.0/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Configuración de formatos de fechas DATETIME_INPUT_FORMATS = ( '%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' '%Y-%m-%d %H:%M:%S.%f', # '20...
2
0
0
0
0
0
0
0
0
703e82659ac9ad52df6beb31fc77492e3f62d5db
3,633
py
Python
split-bib.py
2e0byo/bib
9d6cd7fcf214894caa4831d948ac868b696b0a02
[ "CC0-1.0" ]
null
null
null
split-bib.py
2e0byo/bib
9d6cd7fcf214894caa4831d948ac868b696b0a02
[ "CC0-1.0" ]
null
null
null
split-bib.py
2e0byo/bib
9d6cd7fcf214894caa4831d948ac868b696b0a02
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/python # from https://gist.github.com/martin-ueding/4007035 _c = Colorcodes() outfs = {} if __name__ == "__main__": try: main() except KeyboardInterrupt: print("Exiting safely") for _, f in outfs.items(): f.close()
27.522727
82
0.561795
#!/usr/bin/python from argparse import ArgumentParser from pathlib import Path import subprocess from getkey import getkey from pymdownx import keys # from https://gist.github.com/martin-ueding/4007035 class Colorcodes(object): """ Provides ANSI terminal color codes which are gathered via the ``tput`` uti...
0
0
0
1,121
0
2,011
0
21
202
20a3c05f8f7dbd0b7468631dec757204a38c622f
4,728
py
Python
distributed/comm/addressing.py
met-office-lab/distributed
46e31cadd55456bbd0b85a01f040d1eb33ee587f
[ "BSD-3-Clause" ]
null
null
null
distributed/comm/addressing.py
met-office-lab/distributed
46e31cadd55456bbd0b85a01f040d1eb33ee587f
[ "BSD-3-Clause" ]
1
2021-04-30T20:41:53.000Z
2021-04-30T20:41:53.000Z
distributed/comm/addressing.py
met-office-lab/distributed
46e31cadd55456bbd0b85a01f040d1eb33ee587f
[ "BSD-3-Clause" ]
1
2018-07-06T03:48:08.000Z
2018-07-06T03:48:08.000Z
from __future__ import print_function, division, absolute_import import six from ..config import config from . import registry DEFAULT_SCHEME = config.get('default-scheme', 'tcp') def parse_address(addr, strict=False): """ Split address into its scheme and scheme-dependent location string. >>> parse_...
27.649123
78
0.619924
from __future__ import print_function, division, absolute_import import six from ..config import config from . import registry DEFAULT_SCHEME = config.get('default-scheme', 'tcp') def parse_address(addr, strict=False): """ Split address into its scheme and scheme-dependent location string. >>> parse_...
0
0
0
0
0
185
0
0
54
f26711de310e0a56e03746ce2226ae8ef1929490
27,085
py
Python
pypeit/deprecated/flux_old.py
ykwang1/PypeIt
a96cff699f1284905ce7ef19d06a9027cd333c63
[ "BSD-3-Clause" ]
107
2018-08-06T07:07:20.000Z
2022-02-28T14:33:42.000Z
pypeit/deprecated/flux_old.py
ykwang1/PypeIt
a96cff699f1284905ce7ef19d06a9027cd333c63
[ "BSD-3-Clause" ]
889
2018-07-26T12:14:33.000Z
2022-03-18T22:49:42.000Z
pypeit/deprecated/flux_old.py
ykwang1/PypeIt
a96cff699f1284905ce7ef19d06a9027cd333c63
[ "BSD-3-Clause" ]
74
2018-09-25T17:03:07.000Z
2022-03-10T23:59:24.000Z
## the following massive function is deprecated def generate_sensfunc_old(wave, counts, counts_ivar, airmass, exptime, spectrograph, telluric=False, star_type=None, star_mag=None, ra=None, dec=None, std_file = None, BALM_MASK_WID=5., norder=4, nresln=None,debug=False): """ Function to generat...
45.444631
140
0.622226
## the following massive function is deprecated def generate_sensfunc_old(wave, counts, counts_ivar, airmass, exptime, spectrograph, telluric=False, star_type=None, star_mag=None, ra=None, dec=None, std_file = None, BALM_MASK_WID=5., norder=4, nresln=None,debug=False): """ Function to generat...
0
0
0
0
0
1,441
0
0
23
225bf9f25bf98ea2daf3a88251d26bd761a4c7de
3,536
py
Python
virtuso.py
Thanatoz-1/virtuoso
777b8a526d08751ac93ae236356c035641652824
[ "Apache-2.0" ]
null
null
null
virtuso.py
Thanatoz-1/virtuoso
777b8a526d08751ac93ae236356c035641652824
[ "Apache-2.0" ]
2
2019-12-08T13:18:44.000Z
2019-12-13T12:12:39.000Z
virtuso.py
Thanatoz-1/virtuoso
777b8a526d08751ac93ae236356c035641652824
[ "Apache-2.0" ]
null
null
null
from argparse import ArgumentParser import os import spacy nlp = spacy.load('en_core_web_sm') target = DataFetcher() def ArgParser(): ''' This is the function to parse your arguments into a more understable form and provide relavant help whenever needed. The package usage are as follows: p...
30.747826
88
0.598982
from argparse import ArgumentParser import os import re from collections import defaultdict import random import spacy nlp = spacy.load('en_core_web_sm') class DataFetcher: def __init__(self): BASE = 'Data/' self.tables = os.listdir(BASE) self._data = defaultdict(lambda: []) for f...
0
0
0
467
0
854
0
-6
135
0d79f028460ea1be0d7b0b3b212ae770f0507107
94
py
Python
catcher_modules/__init__.py
Daniel-Han-Yang/catcher_modules
2eff08d2c19719539f761a7cae0a48b69a3231db
[ "Apache-2.0" ]
5
2019-01-09T14:15:25.000Z
2020-09-11T12:18:43.000Z
catcher_modules/__init__.py
Daniel-Han-Yang/catcher_modules
2eff08d2c19719539f761a7cae0a48b69a3231db
[ "Apache-2.0" ]
44
2019-06-30T09:19:42.000Z
2021-12-30T16:09:09.000Z
catcher_modules/__init__.py
Daniel-Han-Yang/catcher_modules
2eff08d2c19719539f761a7cae0a48b69a3231db
[ "Apache-2.0" ]
5
2019-09-01T09:49:05.000Z
2021-09-12T06:00:54.000Z
APPNAME = 'catcher-modules' APPAUTHOR = 'Valerii Tikhonov, Ekaterina Belova' APPVSN = '6.0.0'
23.5
48
0.734043
APPNAME = 'catcher-modules' APPAUTHOR = 'Valerii Tikhonov, Ekaterina Belova' APPVSN = '6.0.0'
0
0
0
0
0
0
0
0
0
588a6b0bc1e1871fc4e4ef910ec05c9b253e71b8
968
py
Python
src/bxgateway/utils/interval_minimum.py
doubleukay/bxgateway
ac01fc9475c039cf4255576dd4ecd6bff6c48f69
[ "MIT" ]
21
2019-11-06T17:37:41.000Z
2022-03-28T07:18:33.000Z
src/bxgateway/utils/interval_minimum.py
doubleukay/bxgateway
ac01fc9475c039cf4255576dd4ecd6bff6c48f69
[ "MIT" ]
4
2019-11-06T22:08:00.000Z
2021-12-08T06:20:51.000Z
src/bxgateway/utils/interval_minimum.py
doubleukay/bxgateway
ac01fc9475c039cf4255576dd4ecd6bff6c48f69
[ "MIT" ]
10
2020-08-05T15:58:16.000Z
2022-02-07T23:51:10.000Z
from bxutils import logging logger = logging.get_logger(__name__)
30.25
79
0.72624
from typing import Optional from bxcommon.utils.alarm_queue import AlarmQueue from bxutils import logging logger = logging.get_logger(__name__) class IntervalMinimum: def __init__(self, interval_len_s: int, alarm_queue: AlarmQueue): self.current_minimum: int = 0 self._interval_len_s = interval...
0
0
0
798
0
0
0
34
68
c428d11f614a84c41c037c142536fd24d6772c42
145
py
Python
AcademicDealerBackend/project_level_tests.py
Acciente717/AcademicDealerBackend
8024725f88997fa430fa92e1caa28161ffbb06f6
[ "MIT" ]
5
2019-03-10T06:57:15.000Z
2019-03-17T03:04:40.000Z
AcademicDealerBackend/project_level_tests.py
Acciente717/AcademicDealerBackend
8024725f88997fa430fa92e1caa28161ffbb06f6
[ "MIT" ]
11
2019-05-14T15:13:48.000Z
2019-05-31T15:31:33.000Z
AcademicDealerBackend/project_level_tests.py
Acciente717/AcademicDealerBackend
8024725f88997fa430fa92e1caa28161ffbb06f6
[ "MIT" ]
null
null
null
import sys sys.path.append("./AcademicDealerBackend/users") from tests.py import CoreFunctionalTest CoreFunctionalTest().test_core_functions()
20.714286
48
0.827586
import sys sys.path.append("./AcademicDealerBackend/users") from tests.py import CoreFunctionalTest CoreFunctionalTest().test_core_functions()
0
0
0
0
0
0
0
0
0
0d0a3891596f7bbd389105cdc17d75da9f6f2560
108
py
Python
tasks/EPAM/python_course/foundation-python/l7/m7-18-other-tools.py
AleksNeStu/projects
1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb
[ "Apache-2.0" ]
2
2022-01-19T18:01:35.000Z
2022-02-06T06:54:38.000Z
tasks/EPAM/python_course/foundation-python/l7/m7-18-other-tools.py
AleksNeStu/projects
1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb
[ "Apache-2.0" ]
null
null
null
tasks/EPAM/python_course/foundation-python/l7/m7-18-other-tools.py
AleksNeStu/projects
1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb
[ "Apache-2.0" ]
null
null
null
# RunSnakeRun # https://pypi.python.org/pypi/RunSnakeRun # http://www.vrplumber.com/programming/runsnakerun/
36
51
0.787037
# RunSnakeRun # https://pypi.python.org/pypi/RunSnakeRun # http://www.vrplumber.com/programming/runsnakerun/
0
0
0
0
0
0
0
0
0
d7e2763dfb95ef81aa2a40092387dd5fb62e4526
2,854
py
Python
dashboards/soap_explorer/soap_cluster.py
jmmshn/mp_dash_boards
19f893fb50d88368068e9e6b9518bd2041db41e9
[ "MIT" ]
null
null
null
dashboards/soap_explorer/soap_cluster.py
jmmshn/mp_dash_boards
19f893fb50d88368068e9e6b9518bd2041db41e9
[ "MIT" ]
null
null
null
dashboards/soap_explorer/soap_cluster.py
jmmshn/mp_dash_boards
19f893fb50d88368068e9e6b9518bd2041db41e9
[ "MIT" ]
null
null
null
# %% from typing import List from monty.serialization import loadfn import dash import dash_core_components as dcc import dash_html_components as html from dash_mp_components import Simple3DScene import os import pandas as pd import plotly.express as px dir_path = os.path.dirname(os.path.realpath(__file__)) DUMMY_SPEC...
28.828283
105
0.653819
# %% from typing import List from monty.serialization import loadfn import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output from dash_mp_components import Simple3DScene from pymatgen import Site import crystal_toolkit # noqa: F401 from pymatgen.ana...
0
536
0
0
0
265
0
79
193
0a404d9cd9a4229d8ab11fccf16b502660913ff8
954
py
Python
conftest.py
kriti-d/snyker
33d256a93428de6eb27cb30b480ce3978551bada
[ "Apache-2.0" ]
1
2021-06-30T02:41:41.000Z
2021-06-30T02:41:41.000Z
conftest.py
kriti-d/snyker
33d256a93428de6eb27cb30b480ce3978551bada
[ "Apache-2.0" ]
1
2020-12-04T12:18:48.000Z
2020-12-04T12:18:48.000Z
conftest.py
kriti-d/snyker
33d256a93428de6eb27cb30b480ce3978551bada
[ "Apache-2.0" ]
3
2021-01-28T14:47:14.000Z
2021-10-17T17:08:10.000Z
""" Configuration for pytest fixtures """
26.5
81
0.719078
""" Configuration for pytest fixtures """ import boto3 # type: ignore import pytest # type: ignore from chalice import Chalice # type: ignore from moto import mock_ssm # type: ignore @pytest.fixture def app() -> Chalice: """Return the application for testing""" from app import app as chalice_app # pylin...
0
694
0
0
0
0
0
-7
222
f905cd9d13b659e019e1b8c2279b949410a81e30
33
py
Python
foreshadow/tests/test_optimizers/test_param_distribution.py
adithyabsk/foreshadow
ca2e927c396ae0d61923b287d6e32e142f3ba96f
[ "Apache-2.0" ]
25
2018-07-26T17:30:31.000Z
2021-02-23T22:54:01.000Z
foreshadow/tests/test_optimizers/test_param_distribution.py
adithyabsk/foreshadow
ca2e927c396ae0d61923b287d6e32e142f3ba96f
[ "Apache-2.0" ]
150
2018-11-02T18:09:12.000Z
2020-05-15T01:01:35.000Z
foreshadow/tests/test_optimizers/test_param_distribution.py
adithyabsk/foreshadow
ca2e927c396ae0d61923b287d6e32e142f3ba96f
[ "Apache-2.0" ]
1
2019-02-20T22:24:00.000Z
2019-02-20T22:24:00.000Z
"""Test param_distribution.py"""
16.5
32
0.727273
"""Test param_distribution.py"""
0
0
0
0
0
0
0
0
0
4072a3fa19318b9de75a69e7c0ce5bed60bfb034
18,031
py
Python
dexbot/storage.py
bitProfessor/DEXBot
5d692fbf1acffeec46a82a12474b8a123e4c6370
[ "MIT" ]
1
2021-04-22T09:18:55.000Z
2021-04-22T09:18:55.000Z
dexbot/storage.py
bitProfessor/DEXBot
5d692fbf1acffeec46a82a12474b8a123e4c6370
[ "MIT" ]
null
null
null
dexbot/storage.py
bitProfessor/DEXBot
5d692fbf1acffeec46a82a12474b8a123e4c6370
[ "MIT" ]
2
2021-02-13T10:58:33.000Z
2022-03-04T14:01:58.000Z
import os import os.path import alembic from appdirs import user_data_dir from . import helper from dexbot import APP_NAME, AUTHOR from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() # For dexbot.sqlite file storageDatabase = "dexbot.sqlite" # Derive sqlite file directory data_...
35.216797
120
0.638179
import os import os.path import sys import json import threading import queue import uuid import alembic import alembic.config from appdirs import user_data_dir from . import helper from dexbot import APP_NAME, AUTHOR from sqlalchemy import create_engine, Column, String, Integer, Float, Boolean from sqlalchemy.ext.d...
0
1,850
0
15,344
0
0
0
40
292
d9dbe1564fc700c61b7507bb9b58065a2f63e0e5
14,490
py
Python
povary/apps/master_class/migrations/0009_auto__add_field_masterclass_visits_num__add_field_categorymc_visits_nu.py
TorinAsakura/cooking
cf0c78f613fa9ce0fcd4ec7a397ab880d9dd631a
[ "BSD-3-Clause" ]
null
null
null
povary/apps/master_class/migrations/0009_auto__add_field_masterclass_visits_num__add_field_categorymc_visits_nu.py
TorinAsakura/cooking
cf0c78f613fa9ce0fcd4ec7a397ab880d9dd631a
[ "BSD-3-Clause" ]
null
null
null
povary/apps/master_class/migrations/0009_auto__add_field_masterclass_visits_num__add_field_categorymc_visits_nu.py
TorinAsakura/cooking
cf0c78f613fa9ce0fcd4ec7a397ab880d9dd631a
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*-
71.732673
182
0.560663
# -*- 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 field 'MasterClass.visits_num' db.add_column('master_class_masterclass', 'visits_num', ...
0
0
0
14,337
0
0
0
18
111
f16671322873b3ab7c7a3a7ce2fce8aa55512aba
1,995
py
Python
150-Challenges/Challenges 88 - 95/Challenge 94.py
DGrifferty/Python
d725301664db2cbcfd5c4f5974745b4d81c8e28a
[ "Apache-2.0" ]
null
null
null
150-Challenges/Challenges 88 - 95/Challenge 94.py
DGrifferty/Python
d725301664db2cbcfd5c4f5974745b4d81c8e28a
[ "Apache-2.0" ]
null
null
null
150-Challenges/Challenges 88 - 95/Challenge 94.py
DGrifferty/Python
d725301664db2cbcfd5c4f5974745b4d81c8e28a
[ "Apache-2.0" ]
null
null
null
# 094 # Display an array of five numbers. Ask the user to select one # of the numbers. Once they have selected a number, display the # position of that item in the array. If they enter something that # is not in the array, ask them to try again until they select # a relevant item. import array as ar import numpy as np...
23.197674
70
0.601504
# 094 # Display an array of five numbers. Ask the user to select one # of the numbers. Once they have selected a number, display the # position of that item in the array. If they enter something that # is not in the array, ask them to try again until they select # a relevant item. import array as ar import numpy as np...
0
0
0
0
0
0
0
0
0
8a1288e18e7a9b82a827aad422ef1aa964f3fc0c
334
py
Python
PycharmProjects/pythonteste/ex017.py
caioalexleme/Curso_Python
6394f60689531c7431765538f1b699aabbf4acb2
[ "MIT" ]
3
2021-07-09T20:41:47.000Z
2021-11-17T10:25:01.000Z
PycharmProjects/pythonteste/ex017.py
caioalexleme/Curso_Python
6394f60689531c7431765538f1b699aabbf4acb2
[ "MIT" ]
null
null
null
PycharmProjects/pythonteste/ex017.py
caioalexleme/Curso_Python
6394f60689531c7431765538f1b699aabbf4acb2
[ "MIT" ]
1
2021-09-09T20:24:07.000Z
2021-09-09T20:24:07.000Z
import math co = float(input('Comprimento do cateto oposto: ')) ca = float(input('Comprimento do cateto adjacente: ')) hi = math.hypot(co, ca) print('A hipotenusa vai medir {:.2f}'.format(hi)) '''hi = (co ** 2 + ca ** 2) **(1/2) print('A hipotenusa vai medir {:.2f}'.format(hi))''' '''Usando matematicamente sem precisa...
41.75
104
0.658683
import math co = float(input('Comprimento do cateto oposto: ')) ca = float(input('Comprimento do cateto adjacente: ')) hi = math.hypot(co, ca) print('A hipotenusa vai medir {:.2f}'.format(hi)) '''hi = (co ** 2 + ca ** 2) **(1/2) print('A hipotenusa vai medir {:.2f}'.format(hi))''' '''Usando matematicamente sem precisa...
0
0
0
0
0
0
0
0
0
cceeb312e1e0b4d346b44ac72c5a6f4d2bafbd85
9,439
py
Python
monasca_notification/plugins/jira_notifier.py
openstack/monasca-notification
975f46d226e479180c6499fe34073225aeadefdb
[ "Apache-2.0" ]
25
2015-10-18T02:54:54.000Z
2020-04-16T12:05:27.000Z
monasca_notification/plugins/jira_notifier.py
openstack/monasca-notification
975f46d226e479180c6499fe34073225aeadefdb
[ "Apache-2.0" ]
1
2020-12-05T06:18:12.000Z
2020-12-05T06:18:14.000Z
monasca_notification/plugins/jira_notifier.py
openstack/monasca-notification
975f46d226e479180c6499fe34073225aeadefdb
[ "Apache-2.0" ]
14
2016-01-11T08:58:56.000Z
2021-11-19T09:11:19.000Z
# (C) Copyright 2016 Hewlett Packard Enterprise Development Company LP # Copyright 2017 Fujitsu LIMITED # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/L...
38.369919
97
0.637568
# (C) Copyright 2016 Hewlett Packard Enterprise Development Company LP # Copyright 2017 Fujitsu LIMITED # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/L...
0
228
0
6,798
0
180
0
49
225
f445224ff812a87f09a566ea2f913fa27571701a
3,889
py
Python
vectorhub/encoders/text/torch_transformers/legal_bert.py
NanaAkwasiAbayieBoateng/vectorhub
265933521cf0a3113a47182a30b0037bf163584b
[ "Apache-2.0" ]
1
2020-11-04T16:02:39.000Z
2020-11-04T16:02:39.000Z
vectorhub/encoders/text/torch_transformers/legal_bert.py
NanaAkwasiAbayieBoateng/vectorhub
265933521cf0a3113a47182a30b0037bf163584b
[ "Apache-2.0" ]
null
null
null
vectorhub/encoders/text/torch_transformers/legal_bert.py
NanaAkwasiAbayieBoateng/vectorhub
265933521cf0a3113a47182a30b0037bf163584b
[ "Apache-2.0" ]
null
null
null
from ....doc_utils import ModelDefinition from ....models_dict import MODEL_REQUIREMENTS from datetime import date if is_all_dependency_installed(MODEL_REQUIREMENTS['encoders-text-torch-transformers-auto']): LegalBertModelDefinition = ModelDefinition( model_id="text/legal-bert", model_name="Legal Bert", ...
54.774648
1,034
0.717151
from typing import List, Union from ..base import BaseText2Vec from ....base import catch_vector_errors from ....doc_utils import ModelDefinition from ....import_utils import * from ....models_dict import MODEL_REQUIREMENTS from datetime import date if is_all_dependency_installed(MODEL_REQUIREMENTS['encoders-text-torch...
0
1,411
0
337
0
0
0
66
163
6bfaa00fe949d7084b0d4ac71e333e1f7a72d58c
3,365
py
Python
tests/storage/test_keys.py
skalarproduktraum/synapse
c831748f4d243d74e9a3fd2042bc2b35cc30f961
[ "Apache-2.0" ]
null
null
null
tests/storage/test_keys.py
skalarproduktraum/synapse
c831748f4d243d74e9a3fd2042bc2b35cc30f961
[ "Apache-2.0" ]
null
null
null
tests/storage/test_keys.py
skalarproduktraum/synapse
c831748f4d243d74e9a3fd2042bc2b35cc30f961
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2017 Vector Creations Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
36.576087
82
0.652006
# -*- coding: utf-8 -*- # Copyright 2017 Vector Creations Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
0
0
0
2,401
0
0
0
22
69
897644b4e3ff887ea94b2e372e01f943dd13acdc
12,861
py
Python
image/__init__.py
conducto/conducto
b480780905f5a25e8c803b60ca7cdf6976ce5ef6
[ "Apache-2.0" ]
25
2020-05-07T22:51:11.000Z
2021-11-17T16:14:42.000Z
image/__init__.py
conducto/conducto
b480780905f5a25e8c803b60ca7cdf6976ce5ef6
[ "Apache-2.0" ]
3
2020-04-21T06:38:02.000Z
2020-05-31T01:57:19.000Z
image/__init__.py
conducto/conducto
b480780905f5a25e8c803b60ca7cdf6976ce5ef6
[ "Apache-2.0" ]
2
2020-05-14T01:47:32.000Z
2020-06-03T21:58:12.000Z
import contextlib import os import sys import traceback from . import names from conducto.shared import constants CONST_EE = constants.ExecutionEnv if sys.version_info >= (3, 7): asynccontextmanager = contextlib.asynccontextmanager else: from conducto.shared import async_backport asynccontextmanager = ...
34.94837
109
0.651816
import contextlib import concurrent.futures import os import sys import traceback import typing import itertools from conducto.shared import ( async_utils, client_utils, types as t, log, ) import conducto from . import dockerfile as dockerfile_mod, names from conducto.shared import constants, imagepa...
0
1,351
0
9,869
0
0
0
94
179
21f53f03707cdfeaf7be966e79c22e21d805b3f7
710
py
Python
src/python/doufo/qlambda.py
Hong-Xiang/doufo
3d375fef30670597768a6eef809b75b4b1b5a3fd
[ "Apache-2.0" ]
3
2018-08-05T07:16:34.000Z
2018-08-10T05:28:24.000Z
src/python/doufo/qlambda.py
tech-pi/doufo
3d375fef30670597768a6eef809b75b4b1b5a3fd
[ "Apache-2.0" ]
10
2018-09-16T15:44:19.000Z
2018-10-06T10:39:59.000Z
src/python/doufo/qlambda.py
tech-pi/doufo
3d375fef30670597768a6eef809b75b4b1b5a3fd
[ "Apache-2.0" ]
1
2018-08-04T08:13:50.000Z
2018-08-04T08:13:50.000Z
""" Quick lambda creator, useful for use in fmap, filter, etc. e.g. List([1,2]).fmap(x + 1) """ from doufo import identity __all__ = ['QuickLambda', 'x'] x = QuickLambda(identity)
22.903226
76
0.669014
""" Quick lambda creator, useful for use in fmap, filter, etc. e.g. List([1,2]).fmap(x + 1) """ from doufo import WrappedFunction, identity, Functor, FunctorArithmeticMixin import operator __all__ = ['QuickLambda', 'x'] class QuickLambda(WrappedFunction, FunctorArithmeticMixin): """ QuickLambda constructor....
0
0
0
436
0
0
0
44
45
956e8f44b682bac08ca006ab5acb457d983ced03
7,849
py
Python
workbench/server/plugin_manager.py
Ayub-Khan/workbench
710232756dd717f734253315e3d0b33c9628dafb
[ "MIT" ]
61
2015-01-04T01:23:49.000Z
2021-06-22T14:41:10.000Z
workbench/server/plugin_manager.py
Ayub-Khan/workbench
710232756dd717f734253315e3d0b33c9628dafb
[ "MIT" ]
3
2015-01-02T23:26:59.000Z
2015-01-03T19:28:36.000Z
workbench/server/plugin_manager.py
Ayub-Khan/workbench
710232756dd717f734253315e3d0b33c9628dafb
[ "MIT" ]
17
2015-08-25T23:57:22.000Z
2020-05-30T02:36:05.000Z
"""A simple plugin manager. Rolling my own for three reasons: 1) Environmental scan did not give me quite what I wanted. 2) The super simple examples didn't support automatic/dynamic loading. 3) I kinda wanted to understand the process :) """ import os, sys from datetime import datetime import dir_watcher imp...
35.515837
108
0.600459
"""A simple plugin manager. Rolling my own for three reasons: 1) Environmental scan did not give me quite what I wanted. 2) The super simple examples didn't support automatic/dynamic loading. 3) I kinda wanted to understand the process :) """ import os, sys from datetime import datetime import dir_watcher imp...
0
0
0
6,858
0
0
0
0
23
fc73e92f597f35947bedf2470fc9fcc7c500e873
5,492
py
Python
DeviceAPI/MagnumThermostat.py
ajfar-bem/wisebldg
0cb8ef7c5984cbb5cc86e40780fdf4e14e5bda05
[ "Unlicense" ]
null
null
null
DeviceAPI/MagnumThermostat.py
ajfar-bem/wisebldg
0cb8ef7c5984cbb5cc86e40780fdf4e14e5bda05
[ "Unlicense" ]
null
null
null
DeviceAPI/MagnumThermostat.py
ajfar-bem/wisebldg
0cb8ef7c5984cbb5cc86e40780fdf4e14e5bda05
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import division ''' Copyright 2014 by Virginia Polytechnic Institute and State University All rights reserved Virginia Polytechnic Institute and State University (Virginia Tech) owns the copyright for the BEMOSS software and its associated documentation (Software) and retains r...
54.92
206
0.734523
# -*- coding: utf-8 -*- from __future__ import division ''' Copyright © 2014 by Virginia Polytechnic Institute and State University All rights reserved Virginia Polytechnic Institute and State University (Virginia Tech) owns the copyright for the BEMOSS software and its associated documentation (“Software”) and retain...
11
0
0
2,624
0
0
0
69
68
8f0e40e1e9ad26888f88397edb734ee26570185f
1,337
py
Python
profiles/migrations/0004_auto_20180322_2323.py
joatuapp/joatu-django
5626d03ba89c55650ff5bff2e706ca0883ae3b9c
[ "MIT" ]
10
2018-05-13T18:01:57.000Z
2018-12-23T17:11:14.000Z
profiles/migrations/0004_auto_20180322_2323.py
moileretour/joatu
9d18cb58b4280235688e269be6fd2d34b77ccead
[ "MIT" ]
88
2018-05-04T15:33:46.000Z
2022-03-08T21:09:21.000Z
profiles/migrations/0004_auto_20180322_2323.py
joatuapp/joatu-django
5626d03ba89c55650ff5bff2e706ca0883ae3b9c
[ "MIT" ]
7
2018-05-08T16:05:06.000Z
2018-09-13T05:49:05.000Z
# Generated by Django 2.0.3 on 2018-03-23 03:23
29.065217
118
0.579656
# Generated by Django 2.0.3 on 2018-03-23 03:23 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('profiles', '0003_auto_20180322_2257'), ] operations = [ migrations.RemoveField( model_name='pro...
0
0
0
1,190
0
0
0
30
68
1e89d3726c6c30924f01c404b413fb86e1e9b799
1,370
py
Python
chapter7/stylegan2_pytorch/mapping_network.py
tms-byte/gan_sample
1ff723cf37af902b400dbb68777a52e6e3dfcc89
[ "MIT" ]
57
2021-02-11T12:25:30.000Z
2022-03-16T11:47:21.000Z
chapter7/stylegan2_pytorch/mapping_network.py
tms-byte/gan_sample
1ff723cf37af902b400dbb68777a52e6e3dfcc89
[ "MIT" ]
8
2021-02-22T01:38:36.000Z
2021-06-29T15:55:04.000Z
chapter7/stylegan2_pytorch/mapping_network.py
tms-byte/gan_sample
1ff723cf37af902b400dbb68777a52e6e3dfcc89
[ "MIT" ]
11
2021-02-11T14:49:08.000Z
2022-01-26T04:18:11.000Z
import torch.nn as nn
35.128205
112
0.669343
import numpy as np import torch.nn as nn import torch from dense_layer import DenseLayer from fused_bias_activation import FusedBiasActivation from base_layer import BaseLayer from tensorboard_logger import TensorboardLogger class MappingNetwork(BaseLayer): def __init__(self, dlaten_size, opt): super(Mapp...
0
0
0
1,121
0
0
0
71
156
9ffd4b2fe2dd2b154da114d62a59314623da1cc0
1,063
py
Python
src/genie/libs/parser/iosxr/tests/ShowMplsLdpDiscovery/cli/equal/golden_output_2_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
204
2018-06-27T00:55:27.000Z
2022-03-06T21:12:18.000Z
src/genie/libs/parser/iosxr/tests/ShowMplsLdpDiscovery/cli/equal/golden_output_2_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
468
2018-06-19T00:33:18.000Z
2022-03-31T23:23:35.000Z
src/genie/libs/parser/iosxr/tests/ShowMplsLdpDiscovery/cli/equal/golden_output_2_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
309
2019-01-16T20:21:07.000Z
2022-03-30T12:56:41.000Z
expected_output = { 'vrf': { 'default': { 'local_ldp_identifier': { '10.52.31.247:0': { 'discovery_sources': { 'interfaces': { 'TenGigE0/0/0/5.2097': { 'ldp_id': { ...
35.433333
82
0.238946
expected_output = { 'vrf': { 'default': { 'local_ldp_identifier': { '10.52.31.247:0': { 'discovery_sources': { 'interfaces': { 'TenGigE0/0/0/5.2097': { 'ldp_id': { ...
0
0
0
0
0
0
0
0
0
793d35dc4008ac42c5b5a7d8858e3efef0efcc65
2,887
py
Python
cad_tickers/sedar/tsx.py
FriendlyUser/cad_tickers
2f99a4494498419d8decf41fb0fbc77722dbc712
[ "MIT" ]
2
2022-03-16T02:19:25.000Z
2022-03-16T02:22:39.000Z
cad_tickers/sedar/tsx.py
FriendlyUser/cad_tickers
2f99a4494498419d8decf41fb0fbc77722dbc712
[ "MIT" ]
57
2020-07-30T15:43:43.000Z
2022-03-28T02:04:13.000Z
cad_tickers/sedar/tsx.py
FriendlyUser/cad_tickers
2f99a4494498419d8decf41fb0fbc77722dbc712
[ "MIT" ]
null
null
null
import requests import json from datetime import datetime from cad_tickers.exchanges.tsx.gql_data import GQL from typing import Union def get_ticker_filings( symbol: str, fromDate: str = datetime.today().replace(day=1).strftime("%Y-%m-%d"), toDate: str = datetime.today().strftime("%Y-%m-%d"), limit: i...
28.584158
74
0.5646
import requests import json from datetime import datetime from cad_tickers.exchanges.tsx.gql_data import GQL from typing import Union def get_ticker_filings( symbol: str, fromDate: str = datetime.today().replace(day=1).strftime("%Y-%m-%d"), toDate: str = datetime.today().strftime("%Y-%m-%d"), limit: i...
0
0
0
0
0
0
0
0
0
c5876f0f0b87f80844430381e47a218150e0e357
1,012
py
Python
mentor_helper/questions/models.py
idisblueflash/mentor-helper
93265a654a0752a21cf87f5569baae02ed03d31e
[ "MIT" ]
null
null
null
mentor_helper/questions/models.py
idisblueflash/mentor-helper
93265a654a0752a21cf87f5569baae02ed03d31e
[ "MIT" ]
null
null
null
mentor_helper/questions/models.py
idisblueflash/mentor-helper
93265a654a0752a21cf87f5569baae02ed03d31e
[ "MIT" ]
null
null
null
# Create your models here.
28.914286
70
0.725296
from django.db import models # Create your models here. class SkillPoint(models.Model): name = models.CharField(max_length=200) def __str__(self): return self.name class Category(models.Model): name = models.CharField(max_length=200) def __str__(self): return self.name class Questio...
0
0
0
864
0
0
0
7
113
783b2e782983edf1245746b1a07c08b6bc41a100
5,415
py
Python
rogue/challenge/challenge.py
cypher-me/HAS-Qualifier-Challenges
bb795303716155dad4a930880a58fecb5d9b50c5
[ "MIT" ]
75
2020-07-20T20:54:00.000Z
2022-03-09T09:18:37.000Z
rogue/challenge/challenge.py
cypher-me/HAS-Qualifier-Challenges
bb795303716155dad4a930880a58fecb5d9b50c5
[ "MIT" ]
3
2020-09-13T00:46:49.000Z
2021-07-06T16:18:22.000Z
rogue/challenge/challenge.py
cypher-me/HAS-Qualifier-Challenges
bb795303716155dad4a930880a58fecb5d9b50c5
[ "MIT" ]
14
2020-07-22T16:34:51.000Z
2021-09-13T12:19:59.000Z
import os, sys import numpy as np import time from skyfield.api import load from timeout import TimeoutError timeout_time = int(os.getenv("TIMEOUT",60)) speed_of_light_km_ns = 0.000299792 au_to_km = 149598000 geo_orbit_km = 42164 sealevel_km = 6371 num_sats = int(os.getenv("NUM_SATS", 8)) minA = np.deg2rad(15) ma...
27.211055
83
0.570452
import os, sys import numpy as np import time import math from scipy.spatial.transform import Rotation as R from skyfield.api import load,Topos from skyfield.earthlib import terra, reverse_terra from timeout import timeout, TimeoutError timeout_time = int(os.getenv("TIMEOUT",60)) speed_of_light_km_ns = 0.000299792 a...
0
910
0
0
0
2,114
0
62
272
38fb95037a513aa50d7261f6b8818c317e7f9a8d
7,217
py
Python
j5/backends/hardware/sr/v4/power_board.py
udhayacommits/j5
2b516af67ccf5aa31e20489d479c48075e737f4d
[ "MIT" ]
null
null
null
j5/backends/hardware/sr/v4/power_board.py
udhayacommits/j5
2b516af67ccf5aa31e20489d479c48075e737f4d
[ "MIT" ]
null
null
null
j5/backends/hardware/sr/v4/power_board.py
udhayacommits/j5
2b516af67ccf5aa31e20489d479c48075e737f4d
[ "MIT" ]
null
null
null
"""Hardware Backend for the SR V4 power board.""" from typing import Mapping from j5.backends.hardware.j5.raw_usb import (ReadCommand, WriteCommand) from j5.boards.sr.v4.power_board import PowerOutputPosition # The names and codes of these commands match the definitions in usb.h in the firmware # source. CMD_READ_OUTP...
38.185185
90
0.640987
"""Hardware Backend for the SR V4 power board.""" import struct from datetime import timedelta from time import sleep from typing import Callable, Dict, Mapping, Set, cast import usb from j5.backends.hardware.env import NotSupportedByHardwareError from j5.backends.hardware.j5.raw_usb import ( RawUSBHardwareBacke...
0
1,024
0
4,926
0
0
0
260
180
bf27a951fe891c22d59e5ab0f3da52fcd0d0ceca
2,163
py
Python
intreehooks.py
hroncok/intreehooks
675b0a9039abe61839c267edcc440ee13331aad3
[ "MIT" ]
5
2018-08-30T19:04:25.000Z
2020-05-01T18:51:37.000Z
intreehooks.py
hroncok/intreehooks
675b0a9039abe61839c267edcc440ee13331aad3
[ "MIT" ]
2
2019-12-14T11:33:51.000Z
2020-06-04T15:40:48.000Z
intreehooks.py
hroncok/intreehooks
675b0a9039abe61839c267edcc440ee13331aad3
[ "MIT" ]
1
2018-08-30T19:04:29.000Z
2018-08-30T19:04:29.000Z
"""Load a PEP 517 backend from inside the source tree. """ import os __version__ = '1.0' loader = HooksLoader(os.path.realpath(os.getcwd()))
32.283582
75
0.678225
"""Load a PEP 517 backend from inside the source tree. """ from contextlib import contextmanager import importlib import os import pytoml import sys __version__ = '1.0' @contextmanager def prepended_to_syspath(directory): sys.path.insert(0, directory) try: yield finally: sys.path.pop(0) c...
0
534
0
1,360
0
0
0
-8
134
3aa0f9b4ac917875eedf179635675351921cfa88
844
py
Python
examples/nlp/bert_glue_pytorch/constants.py
gh-determined-ai/determined
9a1ab33a3a356b69681b3351629fef4ab98ddb56
[ "Apache-2.0" ]
1,729
2020-04-27T17:36:40.000Z
2022-03-31T05:48:39.000Z
examples/nlp/bert_glue_pytorch/constants.py
ChrisW09/determined
5c37bfe9cfcc69174ba29a3f1a115c3e9e3632e0
[ "Apache-2.0" ]
1,940
2020-04-27T17:34:14.000Z
2022-03-31T23:02:28.000Z
examples/nlp/bert_glue_pytorch/constants.py
ChrisW09/determined
5c37bfe9cfcc69174ba29a3f1a115c3e9e3632e0
[ "Apache-2.0" ]
214
2020-04-27T19:57:28.000Z
2022-03-29T08:17:16.000Z
from transformers import (BertConfig, BertForSequenceClassification, BertTokenizer, DistilBertConfig, DistilBertForSequenceClassification, DistilBertTokenizer, RobertaConfig, RobertaForSequenceClassification, RobertaTokenizer, XLMConfig, XLMForSequenceClassification, XLMTokenizer, XLNetConfig, XLNetForSequenceClassific...
31.259259
95
0.774882
from transformers import ( BertConfig, BertForSequenceClassification, BertTokenizer, DistilBertConfig, DistilBertForSequenceClassification, DistilBertTokenizer, RobertaConfig, RobertaForSequenceClassification, RobertaTokenizer, XLMConfig, XLMForSequenceClassification, XLM...
0
0
0
0
0
0
0
63
0
a8e4d20c8ab80f5b7903457929ef9c281fbe49b2
95
py
Python
flashback/caching/__init__.py
PaulRenvoise/flashback
f9a16f4b0cb12a2180206c7b95d9eb8fb256381d
[ "MIT" ]
3
2021-06-08T11:40:59.000Z
2022-03-31T16:22:56.000Z
flashback/caching/__init__.py
PaulRenvoise/flashback
f9a16f4b0cb12a2180206c7b95d9eb8fb256381d
[ "MIT" ]
28
2020-04-28T22:36:14.000Z
2021-06-06T20:32:00.000Z
flashback/caching/__init__.py
PaulRenvoise/flashback
f9a16f4b0cb12a2180206c7b95d9eb8fb256381d
[ "MIT" ]
null
null
null
from .cache import Cache from .cached import cached __all__ = ( "Cache", "cached", )
10.555556
26
0.631579
from .cache import Cache from .cached import cached __all__ = ( "Cache", "cached", )
0
0
0
0
0
0
0
0
0
aa43158a1a5030a9fbe2caa413e11432a7cc303b
1,708
py
Python
c/lic_eliminar.py
yo-alan/personal
2f711a9f5dd5a16fbb3ab2a6f9b89069894ce40c
[ "MIT" ]
null
null
null
c/lic_eliminar.py
yo-alan/personal
2f711a9f5dd5a16fbb3ab2a6f9b89069894ce40c
[ "MIT" ]
10
2015-01-12T12:57:09.000Z
2015-03-30T13:39:23.000Z
c/lic_eliminar.py
yo-alan/personal
2f711a9f5dd5a16fbb3ab2a6f9b89069894ce40c
[ "MIT" ]
null
null
null
# coding=utf-8
21.897436
103
0.697307
# coding=utf-8 from PyQt4.QtGui import * from PyQt4.QtCore import * from c.error import Error from v.ui_lic_eliminar import Ui_Lic_Eliminar class Lic_Eliminar(QMessageBox): l = None error = None def __init__(self, principal): QDialog.__init__(self, principal) self.ui = Ui_Lic_Eliminar() self.ui.setupUi(s...
6
0
0
1,538
0
0
0
37
112
7dd9bcfe92839d70d4b8933849b2c5516e4aa2a5
882
py
Python
source/_static/code/linear_models/tsh_hg.py
tuttugu-ryo/lecture-source-py
9ce84044c2cc421775ea63a004556d7ae3b4e504
[ "BSD-3-Clause" ]
null
null
null
source/_static/code/linear_models/tsh_hg.py
tuttugu-ryo/lecture-source-py
9ce84044c2cc421775ea63a004556d7ae3b4e504
[ "BSD-3-Clause" ]
null
null
null
source/_static/code/linear_models/tsh_hg.py
tuttugu-ryo/lecture-source-py
9ce84044c2cc421775ea63a004556d7ae3b4e504
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from scipy.stats import norm from quantecon import LinearStateSpace phi_1, phi_2, phi_3, phi_4 = 0.5, -0.2, 0, 0.5 sigma = 0.1 A = [[phi_1, phi_2, phi_3, phi_4], [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0]] C = [[sigma]...
23.837838
75
0.608844
import numpy as np import matplotlib.pyplot as plt from scipy.stats import norm from quantecon import LinearStateSpace phi_1, phi_2, phi_3, phi_4 = 0.5, -0.2, 0, 0.5 sigma = 0.1 A = [[phi_1, phi_2, phi_3, phi_4], [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0]] C = [[sigma]...
0
0
0
0
0
0
0
0
0
a6664b1d0580e21b207addf21d9ef99693e8773a
2,910
py
Python
calc_main.py
PaprikaX33/stupidly-simple-calculator
d35085baf7ce78d0fc111e3d8a7e8232c270998b
[ "MIT" ]
null
null
null
calc_main.py
PaprikaX33/stupidly-simple-calculator
d35085baf7ce78d0fc111e3d8a7e8232c270998b
[ "MIT" ]
7
2019-10-09T04:13:54.000Z
2019-10-14T03:10:11.000Z
calc_main.py
PaprikaX33/stupidly-simple-calculator
d35085baf7ce78d0fc111e3d8a7e8232c270998b
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 while True: print("\n CALCULATOR MENU") print("1 for addition :") print("2 for subtraction :") print('3 for multiplication :') print("4 for raise to power:") print("5 for Division:") print("6 for floor division:") print("7 for factorial:") print("8 for Stateme...
25.752212
82
0.519244
#!/usr/bin/env python2 import math import parser as pr def add(a, b): return a + b def red(a, b): return a - b def mul(a, b): return a * b def div(a, b): return a / b def power(a, b): return a ** b def statement_wrapper(): doper = { '+' : add ,'-' : red ,'*' : mul ...
0
0
0
0
0
1,740
0
-12
406
dbdd6aecbadab47e637b3959e99f9f1394312c3b
12,312
py
Python
dask/dataframe/indexing.py
deHasara/dask
fb544144611b25a6f23d90637038a93f93153f8f
[ "BSD-3-Clause" ]
null
null
null
dask/dataframe/indexing.py
deHasara/dask
fb544144611b25a6f23d90637038a93f93153f8f
[ "BSD-3-Clause" ]
2
2020-03-30T22:18:11.000Z
2020-04-02T04:13:36.000Z
dask/dataframe/indexing.py
deHasara/dask
fb544144611b25a6f23d90637038a93f93153f8f
[ "BSD-3-Clause" ]
1
2020-04-29T19:28:41.000Z
2020-04-29T19:28:41.000Z
from datetime import datetime from collections import defaultdict import bisect import numpy as np import pandas as pd from .utils import is_index_like def _partition_of_index_value(divisions, val): """In which partition does this value lie? >>> _partition_of_index_value([0, 5, 10], 3) 0 >>> _par...
33.275676
87
0.584146
from datetime import datetime from collections import defaultdict import bisect import numpy as np import pandas as pd from .core import new_dd_object, Series from ..array.core import Array from .utils import is_index_like, meta_nonempty from . import methods from ..base import tokenize from ..highlevelgraph import H...
0
193
0
8,943
0
0
0
70
180
7c0783775708e164a7de2a7db1e9ec1cd5c7040a
182
py
Python
source/__init__.py
Very1Fake/monitor
bb47352cffebd8b99bafac0a342324b042b3d826
[ "Apache-2.0", "MIT" ]
null
null
null
source/__init__.py
Very1Fake/monitor
bb47352cffebd8b99bafac0a342324b042b3d826
[ "Apache-2.0", "MIT" ]
null
null
null
source/__init__.py
Very1Fake/monitor
bb47352cffebd8b99bafac0a342324b042b3d826
[ "Apache-2.0", "MIT" ]
null
null
null
from packaging.version import Version __credits__ = ["very1fake"] __license__ = "MIT/Apache-2.0" __version__ = "1.0.6" __maintainer__ = "very1fake" version = Version(__version__)
18.2
37
0.752747
from packaging.version import Version __credits__ = ["very1fake"] __license__ = "MIT/Apache-2.0" __version__ = "1.0.6" __maintainer__ = "very1fake" version = Version(__version__)
0
0
0
0
0
0
0
0
0
62e63d0c6b135c8198eca554bf7e6a2e7baac64d
433
py
Python
ACM ICPC/String/Top_K_Frequent_Words/top_k_frequent_words.py
shreejitverma/GeeksforGeeks
d7bcb166369fffa9a031a258e925b6aff8d44e6c
[ "MIT" ]
2
2022-02-18T05:14:28.000Z
2022-03-08T07:00:08.000Z
ACM ICPC/String/Top_K_Frequent_Words/top_k_frequent_words.py
shivaniverma1/Competitive-Programming-1
d7bcb166369fffa9a031a258e925b6aff8d44e6c
[ "MIT" ]
6
2022-01-13T04:31:04.000Z
2022-03-12T01:06:16.000Z
ACM ICPC/String/Top_K_Frequent_Words/top_k_frequent_words.py
shivaniverma1/Competitive-Programming-1
d7bcb166369fffa9a031a258e925b6aff8d44e6c
[ "MIT" ]
2
2022-02-14T19:53:53.000Z
2022-02-18T05:14:30.000Z
# Returns k number of words sorted on their occurrence if __name__ == '__main__': inpt = input('Enter space seperated words: ').split() k = int( input( 'Enter the amount of words to retreive based on their occurance: ') ) print(top_k_frequent_words(inpt, k))
30.928571
79
0.65127
# Returns k number of words sorted on their occurrence def top_k_frequent_words(words, k: int): return sorted( sorted(set(words)), key=lambda x: words.count(x), reverse=True)[:k] if __name__ == '__main__': inpt = input('Enter space seperated words: ').split() k = int( input( 'E...
0
0
0
0
0
114
0
0
22
d54be79502f4c11601fd7fb259a73d045fb9a1a2
415
py
Python
church/migrations/0018_facebooklink_file_upload.py
khanhpn/florida
5e83d0561b9f41ff79383a6a2f0a84d6c8459ef0
[ "Apache-2.0" ]
1
2021-01-22T02:52:33.000Z
2021-01-22T02:52:33.000Z
church/migrations/0018_facebooklink_file_upload.py
khanhpn/florida
5e83d0561b9f41ff79383a6a2f0a84d6c8459ef0
[ "Apache-2.0" ]
null
null
null
church/migrations/0018_facebooklink_file_upload.py
khanhpn/florida
5e83d0561b9f41ff79383a6a2f0a84d6c8459ef0
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.2.5 on 2021-09-03 12:56
21.842105
77
0.59759
# Generated by Django 3.2.5 on 2021-09-03 12:56 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('church', '0017_linkedchurch'), ] operations = [ migrations.AddField( model_name='facebooklink', name='file_upload', ...
0
0
0
301
0
0
0
19
46
36a2775a2ac44b7d929353e95a007696147eb907
1,270
py
Python
crypto_address_validator/__init__.py
null-po1nter/crypto-address-validator
a65239ff86613c1cca744849c3c6910bb4eacf64
[ "Unlicense" ]
6
2022-01-11T15:25:57.000Z
2022-02-16T08:05:07.000Z
crypto_address_validator/__init__.py
null-po1nter/crypto-address-validator
a65239ff86613c1cca744849c3c6910bb4eacf64
[ "Unlicense" ]
null
null
null
crypto_address_validator/__init__.py
null-po1nter/crypto-address-validator
a65239ff86613c1cca744849c3c6910bb4eacf64
[ "Unlicense" ]
2
2022-01-11T15:26:05.000Z
2022-03-22T08:05:59.000Z
from crypto_address_validator.validators import default_validator from crypto_address_validator.validators import atom_validator from crypto_address_validator.validators import bnb_validator from crypto_address_validator.validators import aion_validator from crypto_address_validator.validators import eos_validator from...
30.238095
65
0.735433
from crypto_address_validator.validators import default_validator from crypto_address_validator.validators import atom_validator from crypto_address_validator.validators import bnb_validator from crypto_address_validator.validators import aion_validator from crypto_address_validator.validators import eos_validator from...
0
0
0
0
0
0
0
0
0
59f7061bacac1bfdf2d744f13106a5a5eadbd85e
6,312
py
Python
src/create_topic_graph.py
medialab/webclim_propagation_graphs_facebook
d2c6345a5045a29c903b7bd355c6c13ba01d0e71
[ "MIT" ]
1
2020-05-12T14:18:00.000Z
2020-05-12T14:18:00.000Z
src/create_topic_graph.py
medialab/webclim_analyses
d2c6345a5045a29c903b7bd355c6c13ba01d0e71
[ "MIT" ]
null
null
null
src/create_topic_graph.py
medialab/webclim_analyses
d2c6345a5045a29c903b7bd355c6c13ba01d0e71
[ "MIT" ]
null
null
null
"""Based on which facebook groups have shared the fake news published by specific domain names, this script will generate a bipartite graph with the facebook groups and the domain names""" import pandas as pd import networkx as nx import ural import os import sys def clean_data(CLEAN_DATA_DIRECTORY, SCIENTIFIC_TOP...
42.938776
104
0.64512
"""Based on which facebook groups have shared the fake news published by specific domain names, this script will generate a bipartite graph with the facebook groups and the domain names""" import pandas as pd import numpy as np import matplotlib as mpl import networkx as nx from networkx.algorithms import bipartite i...
0
0
0
0
0
0
0
20
66
36dbb5b4b4d979e45050f4692afffb84a7eed0f8
9,251
py
Python
mac/google-cloud-sdk/lib/googlecloudsdk/api_lib/firebase/test/tool_results.py
bopopescu/cndw
ee432efef88a4351b355f3d6d5350defc7f4246b
[ "Apache-2.0" ]
null
null
null
mac/google-cloud-sdk/lib/googlecloudsdk/api_lib/firebase/test/tool_results.py
bopopescu/cndw
ee432efef88a4351b355f3d6d5350defc7f4246b
[ "Apache-2.0" ]
4
2020-07-21T12:51:46.000Z
2022-01-22T10:29:25.000Z
mac/google-cloud-sdk/lib/googlecloudsdk/api_lib/firebase/test/tool_results.py
bopopescu/cndw
ee432efef88a4351b355f3d6d5350defc7f4246b
[ "Apache-2.0" ]
1
2020-07-25T18:17:57.000Z
2020-07-25T18:17:57.000Z
# -*- coding: utf-8 -*- # # Copyright 2017 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
45.126829
80
0.720246
# -*- coding: utf-8 -*- # # Copyright 2017 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
0
0
0
316
0
0
0
-3
46
f22fa272296f5002435df89407092a61d69e7af3
1,705
py
Python
ServerScript/recievestore.py
wmizzi/tn2capstone
e9855ba6b49e2d05293df74846c64fa0c220a25d
[ "BSD-2-Clause" ]
null
null
null
ServerScript/recievestore.py
wmizzi/tn2capstone
e9855ba6b49e2d05293df74846c64fa0c220a25d
[ "BSD-2-Clause" ]
null
null
null
ServerScript/recievestore.py
wmizzi/tn2capstone
e9855ba6b49e2d05293df74846c64fa0c220a25d
[ "BSD-2-Clause" ]
null
null
null
# created by Angus Clark 9/2/17 updated 27/2/17 # ToDo impliment traceroute function into this # Perhaps get rid of unnecessary itemediate temp file import socket import os import json import my_traceroute s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host = '130.56.253.43' #print host port = 5201 # Change ...
30.446429
86
0.609971
# created by Angus Clark 9/2/17 updated 27/2/17 # ToDo impliment traceroute function into this # Perhaps get rid of unnecessary itemediate temp file import socket import os import json import my_traceroute s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host = '130.56.253.43' #print host port = 5201 # Change ...
0
0
0
0
0
0
0
0
0
402bd0ecd3ad3683810f6e43fdd05ede3dff3a02
9,732
py
Python
src/piebus/api.py
hiway/piebus
898e084c6065824fdb1dce8fedc1f8fac8499703
[ "BSD-2-Clause" ]
null
null
null
src/piebus/api.py
hiway/piebus
898e084c6065824fdb1dce8fedc1f8fac8499703
[ "BSD-2-Clause" ]
5
2021-03-19T01:09:42.000Z
2022-01-13T01:17:44.000Z
src/piebus/api.py
hiway/piebus
898e084c6065824fdb1dce8fedc1f8fac8499703
[ "BSD-2-Clause" ]
null
null
null
import asyncio from playhouse.sqlite_ext import (SqliteExtDatabase) from . import PATH_DATABASE loop = asyncio.get_event_loop() pragmas = [ ('journal_mode', 'wal'), ('cache_size', -1024 * 32)] db = SqliteExtDatabase(PATH_DATABASE, pragmas=pragmas)
31.597403
110
0.585491
import asyncio import base64 import datetime import hashlib import json import os import smopy import traceback from json import JSONDecodeError from uuid import uuid4 import bcrypt import peewee from PIL import Image, ImageDraw from peewee import ( Model, CharField, TextField, IntegerField, Foreig...
0
2,776
2,930
2,970
0
149
0
124
515
6f3c693c479a27919155bf7fe3a2aa2e751a7747
2,731
py
Python
tests/test_attention_gqn.py
rnagumo/gqnlib
96bd8499f90c00b29817f71e6380bc622ce78479
[ "MIT" ]
1
2020-08-13T01:54:52.000Z
2020-08-13T01:54:52.000Z
tests/test_attention_gqn.py
rnagumo/gqnlib
96bd8499f90c00b29817f71e6380bc622ce78479
[ "MIT" ]
null
null
null
tests/test_attention_gqn.py
rnagumo/gqnlib
96bd8499f90c00b29817f71e6380bc622ce78479
[ "MIT" ]
1
2021-01-03T16:02:55.000Z
2021-01-03T16:02:55.000Z
import unittest if __name__ == "__main__": unittest.main()
33.716049
72
0.58074
import unittest import torch import gqnlib class TestAttentionGQN(unittest.TestCase): def setUp(self): self.model = gqnlib.AttentionGQN() def test_inference(self): x_c = torch.randn(4, 15, 3, 64, 64) v_c = torch.randn(4, 15, 7) x_q = torch.randn(4, 2, 3, 64, 64) v_...
0
0
0
2,612
0
0
0
-17
69
bbece0a7cdc6417247ddc363307eef71f86b1fdd
562
py
Python
subdomains.py
kiuru/pyTLScanner
ba4b3b35675ad7854366bf6765678229c74fa77b
[ "MIT" ]
null
null
null
subdomains.py
kiuru/pyTLScanner
ba4b3b35675ad7854366bf6765678229c74fa77b
[ "MIT" ]
null
null
null
subdomains.py
kiuru/pyTLScanner
ba4b3b35675ad7854366bf6765678229c74fa77b
[ "MIT" ]
null
null
null
#!/usr/bin/env python if __name__ == '__main__': run_scan('helsinki', True)
26.761905
64
0.709964
#!/usr/bin/env python from get_listed_companies import get_listed_companies_from_cache import tldextract def run_scan(market, debug): companies = get_listed_companies_from_cache(market, debug) domain_list = [] for company in companies: ext_domain = tldextract.extract(company.website) doma...
0
0
0
0
0
370
0
39
68
8512a29537636ae25ad14c6bc16ec03b4ce86019
10,146
py
Python
feapder/network/user_pool/gold_user_pool.py
ibryang/feapder
14b1c1e9bd0953ea8af102d6d220fed4b79d0a5c
[ "MIT" ]
876
2021-02-09T11:08:04.000Z
2022-03-31T21:14:11.000Z
feapder/network/user_pool/gold_user_pool.py
ibryang/feapder
14b1c1e9bd0953ea8af102d6d220fed4b79d0a5c
[ "MIT" ]
94
2021-02-20T07:59:28.000Z
2022-03-28T09:54:53.000Z
feapder/network/user_pool/gold_user_pool.py
ibryang/feapder
14b1c1e9bd0953ea8af102d6d220fed4b79d0a5c
[ "MIT" ]
172
2021-02-22T08:24:44.000Z
2022-03-29T08:15:27.000Z
# -*- coding: utf-8 -*- """ Created on 2018/12/27 11:32 AM --------- @summary: UserPool --------- @author: Boris @email: boris_liu@foxmail.com """
34.746575
101
0.479401
# -*- coding: utf-8 -*- """ Created on 2018/12/27 11:32 AM --------- @summary: 账号昂贵、限制查询次数及使用时间的用户UserPool --------- @author: Boris @email: boris_liu@foxmail.com """ import os import random import time from enum import Enum, unique from typing import Optional, List from feapder import setting from feapder.db.redisdb...
924
223
0
9,013
0
0
0
140
312
91d239c28c854fd8c9982789a6d5ce7d11f7e345
1,509
py
Python
tests/unit/test_core/test_events.py
MarvinTorres/kytos
2c72f45a76cf61f0e2e62f6703bf794db617e8a9
[ "MIT" ]
43
2017-03-27T14:30:20.000Z
2022-02-04T12:42:10.000Z
tests/unit/test_core/test_events.py
MarvinTorres/kytos
2c72f45a76cf61f0e2e62f6703bf794db617e8a9
[ "MIT" ]
612
2017-03-09T19:22:16.000Z
2021-05-31T21:48:52.000Z
tests/unit/test_core/test_events.py
MarvinTorres/kytos
2c72f45a76cf61f0e2e62f6703bf794db617e8a9
[ "MIT" ]
54
2017-03-03T19:11:26.000Z
2022-02-16T15:31:49.000Z
"""Test kytos.core.events module."""
31.4375
78
0.60106
"""Test kytos.core.events module.""" from unittest import TestCase from kytos.core.events import KytosEvent class TestKytosEvent(TestCase): """KytosEvent tests.""" def setUp(self): """Instantiate a KytosEvent.""" self.event = KytosEvent('kytos/core.any') def test__str__(self): "...
0
0
0
1,376
0
0
0
27
68
383b5d4a3508e1677c06bc8c513a3d82750bc6c2
793
py
Python
project7-------Pig Latin Translator.py
Omkar-Atugade/Python-Projects
a6e82aced415bff78ff0a2d14a8a4213ca7d09be
[ "MIT" ]
null
null
null
project7-------Pig Latin Translator.py
Omkar-Atugade/Python-Projects
a6e82aced415bff78ff0a2d14a8a4213ca7d09be
[ "MIT" ]
null
null
null
project7-------Pig Latin Translator.py
Omkar-Atugade/Python-Projects
a6e82aced415bff78ff0a2d14a8a4213ca7d09be
[ "MIT" ]
null
null
null
#Get sentence from user sentence = input('Enter the sentence you want to translate : ').strip().lower() #Spliting sentence into words words = sentence.split() #Converting words to pig latin latin_words = [] for word in words : if word[0] in "aeiou" : latin_word = word + 'yay' latin_wo...
23.323529
80
0.580076
#Get sentence from user sentence = input('Enter the sentence you want to translate : ').strip().lower() #Spliting sentence into words words = sentence.split() #Converting words to pig latin latin_words = [] for word in words : if word[0] in "aeiou" : latin_word = word + 'yay' latin_wo...
0
0
0
0
0
0
0
0
0
4a9e0c3844fe2098fee7bb70d4bee89a6d62f2d9
2,352
py
Python
cloud/endagaweb/tests/test_users.py
pcarivbts/CommunityCellularManager
aaeca413f7e6326d16c9e4587a83aa93dd5a0666
[ "BSD-3-Clause" ]
1
2018-04-27T17:55:53.000Z
2018-04-27T17:55:53.000Z
cloud/endagaweb/tests/test_users.py
pcarivbts/CommunityCellularManager
aaeca413f7e6326d16c9e4587a83aa93dd5a0666
[ "BSD-3-Clause" ]
14
2017-12-12T08:49:41.000Z
2018-08-23T20:57:01.000Z
cloud/endagaweb/tests/test_users.py
pcarivbts/CommunityCellularManager
aaeca413f7e6326d16c9e4587a83aa93dd5a0666
[ "BSD-3-Clause" ]
1
2018-07-04T00:53:38.000Z
2018-07-04T00:53:38.000Z
"""Tests for models.Users. Copyright (c) 2016-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory. """ fro...
28.337349
75
0.642432
"""Tests for models.Users. Copyright (c) 2016-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory. """ fro...
0
1,223
0
303
0
0
0
19
338
d78996f2c44c9ac476a065b14b21e830ef580e30
304
py
Python
Python/OS Module/importing.py
themohitpapneja/Code_Dump
ec72144e66d12cba2ce719c37292517588490b42
[ "Apache-2.0" ]
null
null
null
Python/OS Module/importing.py
themohitpapneja/Code_Dump
ec72144e66d12cba2ce719c37292517588490b42
[ "Apache-2.0" ]
null
null
null
Python/OS Module/importing.py
themohitpapneja/Code_Dump
ec72144e66d12cba2ce719c37292517588490b42
[ "Apache-2.0" ]
null
null
null
""" import os print(os.getcwd()) """ #OR# print(getcwd()) print(name) ## OS name print(path.abspath('.')) print(listdir('.')) mkdir("india") ## making directory sleep(2) rename("india","india2") ## renaming directory sleep(2) rmdir("india2") ## removing directory
17.882353
46
0.664474
""" import os print(os.getcwd()) """ #OR# from time import * from os import * print(getcwd()) print(name) ## OS name print(path.abspath('.')) print(listdir('.')) mkdir("india") ## making directory sleep(2) rename("india","india2") ## renaming directory sleep(2) rmdir("india2") ## removing directory
0
0
0
0
0
0
0
-8
44
d2929f6e3b5f0622d33214a597d49836b5363ae9
655
py
Python
scripts/resume_parse.py
vishaljangid1729/Tej-WhatsApp
d346c3ef51a7f9502b027aaec3429ccfbda1b7ca
[ "MIT" ]
null
null
null
scripts/resume_parse.py
vishaljangid1729/Tej-WhatsApp
d346c3ef51a7f9502b027aaec3429ccfbda1b7ca
[ "MIT" ]
null
null
null
scripts/resume_parse.py
vishaljangid1729/Tej-WhatsApp
d346c3ef51a7f9502b027aaec3429ccfbda1b7ca
[ "MIT" ]
null
null
null
# spacy.load('en_core_web_sm')
20.46875
74
0.696183
import time from pyresparser import ResumeParser import os from scripts.whatsapp import WhatsApp # spacy.load('en_core_web_sm') def Hello (): main_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) resume_path = f'{main_dir}/Resume/vishal_jangid.pdf' data = ResumeParser(resume_path).get_...
0
0
0
0
0
498
0
9
112
86b37d705857d108cdba720a1c9b283be9d61e61
9,593
py
Python
jesse/modes/optimize_mode/__init__.py
jcsaaddupuy/jesse
58c64c57dfb6aa31d2547415b97bba3e5de53548
[ "MIT" ]
1
2022-01-12T22:43:23.000Z
2022-01-12T22:43:23.000Z
jesse/modes/optimize_mode/__init__.py
jcsaaddupuy/jesse
58c64c57dfb6aa31d2547415b97bba3e5de53548
[ "MIT" ]
10
2021-12-08T10:32:12.000Z
2022-03-29T10:30:10.000Z
jesse/modes/optimize_mode/__init__.py
b1nhm1nh/jesse-cli
b463bdc491cedd8042f1a9215e039efa4f701325
[ "MIT" ]
null
null
null
import os from multiprocessing import cpu_count import jesse.services.required_candles as required_candles os.environ['NUMEXPR_MAX_THREADS'] = str(cpu_count())
42.259912
194
0.629834
import os from math import log10 from multiprocessing import cpu_count from typing import Dict, Any, Tuple, Union import arrow import click from numpy import ndarray import jesse.helpers as jh import jesse.services.required_candles as required_candles from jesse import exceptions from jesse.config import config from ...
0
0
0
6,964
0
1,935
0
151
379
2e0fb78fa4ac896060bf8099388628c620cb68d7
22
py
Python
dipper/utils/__init__.py
monarch-ci/dipper
abcd4843ec051a47cef3b592fadc1cd7d1616b45
[ "BSD-3-Clause" ]
52
2015-01-28T21:22:19.000Z
2022-03-15T09:21:07.000Z
dipper/utils/__init__.py
monarch-ci/dipper
abcd4843ec051a47cef3b592fadc1cd7d1616b45
[ "BSD-3-Clause" ]
742
2015-01-06T00:21:30.000Z
2021-08-02T20:57:17.000Z
dipper/utils/__init__.py
monarch-ci/dipper
abcd4843ec051a47cef3b592fadc1cd7d1616b45
[ "BSD-3-Clause" ]
24
2015-07-28T17:06:30.000Z
2021-08-18T21:28:53.000Z
__author__ = 'nicole'
11
21
0.727273
__author__ = 'nicole'
0
0
0
0
0
0
0
0
0
aabd88d6d9266e9e9a00b2139c397b70f4290f58
2,320
py
Python
dante.py
dantefurrybot/dantev4
7282e9466209e794b1e91234a0eb7aa83fd6e413
[ "CC-BY-4.0" ]
1
2020-08-17T15:59:40.000Z
2020-08-17T15:59:40.000Z
dante.py
dantefurrybot/dantev4
7282e9466209e794b1e91234a0eb7aa83fd6e413
[ "CC-BY-4.0" ]
null
null
null
dante.py
dantefurrybot/dantev4
7282e9466209e794b1e91234a0eb7aa83fd6e413
[ "CC-BY-4.0" ]
2
2020-08-08T19:02:27.000Z
2020-08-11T00:40:35.000Z
channels = [725776681159098408, 728691486115233804, 738967638964830341, 725566843766571112, 732288159060328529, 739199815627440232, 730887667491012720, 729753696199508088] client = MyClient() client.run('YourTokenHere')
42.181818
188
0.607759
import discord import importlib from discord.ext import commands channels = [725776681159098408, 728691486115233804, 738967638964830341, 725566843766571112, 732288159060328529, 739199815627440232, 730887667491012720, 729753696199508088] class MyClient(discord.Client): async def on_ready(self): print('Log...
0
0
1,946
10
0
0
0
-1
143
31259c906ff2965d051dbbd5b31dab0049ea6a49
14,800
py
Python
L3NEW_TG_B10_graph.py
Drywock/L3N_TDG_Projet
a584307efb47f6e8ea0d23d177112aa0ca540104
[ "MIT" ]
null
null
null
L3NEW_TG_B10_graph.py
Drywock/L3N_TDG_Projet
a584307efb47f6e8ea0d23d177112aa0ca540104
[ "MIT" ]
null
null
null
L3NEW_TG_B10_graph.py
Drywock/L3N_TDG_Projet
a584307efb47f6e8ea0d23d177112aa0ca540104
[ "MIT" ]
null
null
null
""" file : graph.py author(s) : Thomas LINTANF, Laurent CALYDON Version : 6.0 Definition de la classe Graph qui permet de stocker un graph orient et de lui appliquer diffrents algorithmes. """
35.835351
101
0.548243
""" file : graph.py author(s) : Thomas LINTANF, Laurent CALYDON Version : 6.0 Definition de la classe Graph qui permet de stocker un graph orienté et de lui appliquer différents algorithmes. """ import csv import logging as log class Graph: """ classe Graph : représente un graphe ori...
146
0
0
14,458
0
0
0
-11
68
84234b9119a4722806e3ea59c33ea0d1f267519b
565
py
Python
_basics/nano blink.py
albertoSoto/raspberry-tic-projects
692762dade2397ba4bedb77b4733a1d5d9829450
[ "MIT" ]
null
null
null
_basics/nano blink.py
albertoSoto/raspberry-tic-projects
692762dade2397ba4bedb77b4733a1d5d9829450
[ "MIT" ]
null
null
null
_basics/nano blink.py
albertoSoto/raspberry-tic-projects
692762dade2397ba4bedb77b4733a1d5d9829450
[ "MIT" ]
null
null
null
#EJEMPLO DE BLINKING CON RASPBERRY PI #Escrito por Gl4r3 import RPi.GPIO as GPIO #importamos la libreria y cambiamos su nombre por "GPIO" import time #necesario para los delays #establecemos el sistema de numeracion que queramos, en mi caso BCM GPIO.setmode(GPIO.BCM) #configuramos el pin GPIO17 como una salida GPIO...
26.904762
80
0.743363
#EJEMPLO DE BLINKING CON RASPBERRY PI #Escrito por Gl4r3 import RPi.GPIO as GPIO #importamos la libreria y cambiamos su nombre por "GPIO" import time #necesario para los delays #establecemos el sistema de numeracion que queramos, en mi caso BCM GPIO.setmode(GPIO.BCM) #configuramos el pin GPIO17 como una salida GPIO...
0
0
0
0
0
0
0
0
0
0a5a9577bfb54220f64cd0996cbec96b469bb62e
11,726
py
Python
hubspot/cms/blogs/blog_posts/models/styles.py
fakepop/hubspot-api-python
f04103a09f93f5c26c99991b25fa76801074f3d3
[ "Apache-2.0" ]
null
null
null
hubspot/cms/blogs/blog_posts/models/styles.py
fakepop/hubspot-api-python
f04103a09f93f5c26c99991b25fa76801074f3d3
[ "Apache-2.0" ]
null
null
null
hubspot/cms/blogs/blog_posts/models/styles.py
fakepop/hubspot-api-python
f04103a09f93f5c26c99991b25fa76801074f3d3
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Blog Post endpoints \"Use these endpoints for interacting with Blog Posts, Blog Authors, and Blog Tags\" # noqa: E501 The version of the OpenAPI document: v3 Generated by: https://openapi-generator.tech """
32.481994
105
0.613082
# coding: utf-8 """ Blog Post endpoints \"Use these endpoints for interacting with Blog Posts, Blog Authors, and Blog Tags\" # noqa: E501 The version of the OpenAPI document: v3 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from hubspot.cms.blo...
0
7,000
0
4,333
0
0
0
16
128
9f3deda47c7c529d5518249b5f4b244e3e3d95c1
572
py
Python
image_finder.py
AlexKent3141/PicASCII
464415d9eb43553720336ae1e5f66a46d9f3eef5
[ "MIT" ]
null
null
null
image_finder.py
AlexKent3141/PicASCII
464415d9eb43553720336ae1e5f66a46d9f3eef5
[ "MIT" ]
null
null
null
image_finder.py
AlexKent3141/PicASCII
464415d9eb43553720336ae1e5f66a46d9f3eef5
[ "MIT" ]
null
null
null
# Base class for image finders. if __name__ == "__main__": f = find_image(["mountain", "alps"]) download_image(f, "mount.jpg")
31.777778
71
0.674825
import urllib2 # Base class for image finders. class ImageFinder(object): # This method must be implemented in the derived class. def find(self, search_terms): raise NotImplementedError("ImageFinder::find not implemented!") # Download the file at the specified URL and save it. def download(sel...
0
0
0
398
0
0
0
-7
44
6adc04cb703a03f9e3146952968df89ed80db336
1,665
py
Python
nanodet/util/misc.py
Sean-hku/nanodet
f62a3a1e311fb446afabb3512a5ebedc81105778
[ "Apache-2.0" ]
8
2021-05-01T14:11:19.000Z
2022-01-11T01:08:35.000Z
nanodet/util/misc.py
Sean-hku/nanodet
f62a3a1e311fb446afabb3512a5ebedc81105778
[ "Apache-2.0" ]
1
2022-02-17T14:20:11.000Z
2022-02-17T14:20:11.000Z
nanodet/util/misc.py
Sean-hku/nanodet
f62a3a1e311fb446afabb3512a5ebedc81105778
[ "Apache-2.0" ]
null
null
null
# Modification 2020 RangiLyu # Copyright 2018-2019 Open-MMLab. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicabl...
32.647059
75
0.678679
# Modification 2020 RangiLyu # Copyright 2018-2019 Open-MMLab. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicabl...
0
0
0
0
0
157
0
8
45
e2cd8925067691083a53320bbc702cff13ae910f
11,031
py
Python
tests/test_mcts_player.py
donkirkby/zero-play
15e3afa950037cfd1f373ee4943cd8b42d4c82c9
[ "MIT" ]
7
2020-04-30T15:44:56.000Z
2021-04-07T18:37:21.000Z
tests/test_mcts_player.py
donkirkby/zero-play
15e3afa950037cfd1f373ee4943cd8b42d4c82c9
[ "MIT" ]
84
2019-05-07T04:37:10.000Z
2022-03-04T18:17:57.000Z
tests/test_mcts_player.py
donkirkby/zero-play
15e3afa950037cfd1f373ee4943cd8b42d4c82c9
[ "MIT" ]
1
2021-04-07T18:37:25.000Z
2021-04-07T18:37:25.000Z
import numpy as np from zero_play.mcts_player import MctsPlayer, SearchManager from zero_play.playout import Playout from zero_play.tictactoe.state import TicTacToeState def test_choose_moves_at_random(): """ Early moves are chosen from a weighted random population. """ np.random.seed(0) sta...
24.900677
98
0.658327
import typing from collections import Counter import numpy as np from pytest import approx from zero_play.connect4.game import Connect4State from zero_play.game_state import GameState from zero_play.heuristic import Heuristic from zero_play.mcts_player import SearchNode, MctsPlayer, SearchManager from zero_play.playo...
0
0
0
1,262
0
7,320
0
87
570
b3dc77bb14f38cb12956556bf85829eb1755a3ee
1,218
py
Python
11/star1.py
nfitzen/advent-of-code-2020
774b7db35aaf31b0e72a569b3441343d50f4d079
[ "CC0-1.0", "MIT" ]
null
null
null
11/star1.py
nfitzen/advent-of-code-2020
774b7db35aaf31b0e72a569b3441343d50f4d079
[ "CC0-1.0", "MIT" ]
null
null
null
11/star1.py
nfitzen/advent-of-code-2020
774b7db35aaf31b0e72a569b3441343d50f4d079
[ "CC0-1.0", "MIT" ]
null
null
null
#!/usr/bin/env python3 # SPDX-FileCopyrightText: 2020 Nathaniel Fitzenrider <https://github.com/nfitzen> # # SPDX-License-Identifier: CC0-1.0 import itertools from typing import List from copy import deepcopy with open('input.txt') as f: data = list(list(s.strip()) for s in f.readlines()) def update(state: List[...
29.707317
81
0.526273
#!/usr/bin/env python3 # SPDX-FileCopyrightText: 2020 Nathaniel Fitzenrider <https://github.com/nfitzen> # # SPDX-License-Identifier: CC0-1.0 import itertools from typing import List from copy import deepcopy with open('input.txt') as f: data = list(list(s.strip()) for s in f.readlines()) def update(state: List[...
0
0
0
0
0
0
0
0
0
0c57458a5e82bfdc85a8d11ffd2f10db47dcbdb0
451
py
Python
lona/unique_ids.py
korantu/lona
5039fa59f37cc32b9c789753af2ed8a8670ab611
[ "MIT" ]
230
2021-08-15T20:46:24.000Z
2022-03-30T10:17:43.000Z
lona/unique_ids.py
korantu/lona
5039fa59f37cc32b9c789753af2ed8a8670ab611
[ "MIT" ]
176
2021-08-18T08:19:37.000Z
2022-03-29T16:45:06.000Z
lona/unique_ids.py
korantu/lona
5039fa59f37cc32b9c789753af2ed8a8670ab611
[ "MIT" ]
13
2021-08-20T10:35:04.000Z
2022-01-17T15:49:40.000Z
_name_spaces = { '': UniqueIDGenerator(), 'nodes': UniqueIDGenerator(), 'view_runtimes': UniqueIDGenerator(), }
18.04
41
0.625277
from threading import Lock class UniqueIDGenerator: def __init__(self): self._lock = Lock() self._value = 0 def __call__(self): with self._lock: self._value += 1 return str(self._value) _name_spaces = { '': UniqueIDGenerator(), 'nodes': UniqueIDGener...
0
0
0
195
0
55
0
5
68
540974b01b23268f6d433583746dfaade82d9a64
6,190
py
Python
Compass_gait_biped_simulations/Animate_posterior_compass_biped.py
ernovoseller/CoSpar
2a9584dc9d1cdda5f7c0376ce744a18edab56cbb
[ "MIT" ]
5
2020-11-18T14:05:13.000Z
2021-05-18T15:00:33.000Z
Compass_gait_biped_simulations/Animate_posterior_compass_biped.py
ernovoseller/CoSpar
2a9584dc9d1cdda5f7c0376ce744a18edab56cbb
[ "MIT" ]
null
null
null
Compass_gait_biped_simulations/Animate_posterior_compass_biped.py
ernovoseller/CoSpar
2a9584dc9d1cdda5f7c0376ce744a18edab56cbb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ For the ICRA video, we made some animations of how the preference model posteriors evolve after each iteration. This script saves the stack of images to make such an animation for the compass-gait biped's model posterior. For every iteration, we save an image of the model posterior from on...
35.780347
82
0.639742
# -*- coding: utf-8 -*- """ For the ICRA video, we made some animations of how the preference model posteriors evolve after each iteration. This script saves the stack of images to make such an animation for the compass-gait biped's model posterior. For every iteration, we save an image of the model posterior from on...
0
0
0
0
0
0
0
0
0
c37a56745c7c38908f76b7304b7460e23194957e
11,107
py
Python
gym_minigrid/envs/fourrooms_memory.py
andreykurenkov/gym-minigrid
2c053e8f78ebe6f7aa92cdf81c7539a4fffc12ec
[ "Apache-2.0" ]
null
null
null
gym_minigrid/envs/fourrooms_memory.py
andreykurenkov/gym-minigrid
2c053e8f78ebe6f7aa92cdf81c7539a4fffc12ec
[ "Apache-2.0" ]
null
null
null
gym_minigrid/envs/fourrooms_memory.py
andreykurenkov/gym-minigrid
2c053e8f78ebe6f7aa92cdf81c7539a4fffc12ec
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from gym_minigrid.register import register register( id='MiniGrid-FourRoomsMemory-v0', entry_point='gym_minigrid.envs:FourRoomsMemoryEnv' ) register( id='MiniGrid-FourRoomsMemoryRGB-v0', entry_point='gym_minigrid.envs:rgb_env' ) register( id='MiniGri...
33.966361
102
0.545062
#!/usr/bin/env python # -*- coding: utf-8 -*- from gym_minigrid.minigrid import * from gym_minigrid.register import register from gym_minigrid.wrappers import RGBImgPartialObsWrapper from gym_minigrid.wrappers import FrameStack from collections import deque from gym.spaces import Box from gym import Wrapper import num...
0
0
0
9,893
0
464
0
77
269
53c98d607588d8ce88a263df9e07ac14a254f1e0
3,518
py
Python
Equation_Solver8.py
mmankowski/Loewe-additivity-calculator
43f7135429a992d932d805dfa8a4c3b0b8fc769c
[ "MIT" ]
null
null
null
Equation_Solver8.py
mmankowski/Loewe-additivity-calculator
43f7135429a992d932d805dfa8a4c3b0b8fc769c
[ "MIT" ]
null
null
null
Equation_Solver8.py
mmankowski/Loewe-additivity-calculator
43f7135429a992d932d805dfa8a4c3b0b8fc769c
[ "MIT" ]
null
null
null
# to run open terminal window in location then type 'python "scriptname.py" "filename.csv" ' - "" indicates that these portions are replaced with actual file names # import necessary libraries import csv import sys import math # read in the file & convert "that memory" into a csv read file f = open(sys.argv[1],'rb')...
24.774648
163
0.627345
# to run open terminal window in location then type 'python "scriptname.py" "filename.csv" ' - "" indicates that these portions are replaced with actual file names # import necessary libraries import csv import sys import math # read in the file & convert "that memory" into a csv read file f = open(sys.argv[1],'rb')...
0
0
0
0
0
595
0
0
71
f4fbe171060d67aad65e5f5de62f76eb891714f0
800
py
Python
setup.py
beaumartinez/twittercide
5ef74560f17f7e2497edb3ae915dc0172e4fcf5d
[ "0BSD" ]
2
2015-01-04T04:34:03.000Z
2018-04-18T20:35:29.000Z
setup.py
beaumartinez/twittercide
5ef74560f17f7e2497edb3ae915dc0172e4fcf5d
[ "0BSD" ]
null
null
null
setup.py
beaumartinez/twittercide
5ef74560f17f7e2497edb3ae915dc0172e4fcf5d
[ "0BSD" ]
null
null
null
#! /usr/bin/env python from setuptools import find_packages from setuptools import setup with open('README.md') as readme_file: readme = readme_file.read() setup( author='Beau Martinez', classifiers=[ 'Programming Language :: Python :: 2.7', ], description='Delete your tweets and backup...
22.857143
80
0.61375
#! /usr/bin/env python from setuptools import find_packages from setuptools import setup with open('README.md') as readme_file: readme = readme_file.read() setup( author='Beau Martinez', classifiers=[ 'Programming Language :: Python :: 2.7', ], description='Delete your tweets and backup...
0
0
0
0
0
0
0
0
0
9c4590f9f6a92336f506f82a881a87cbc141ae94
10,753
py
Python
backend/database/result.py
brownben/munro
2beeae23f29fd064b102a44a1c2d3d852eed65e0
[ "MIT" ]
5
2020-02-02T14:58:15.000Z
2022-01-07T08:24:37.000Z
backend/database/result.py
brownben/munro
2beeae23f29fd064b102a44a1c2d3d852eed65e0
[ "MIT" ]
773
2020-01-04T22:54:01.000Z
2022-03-31T16:07:56.000Z
backend/database/result.py
brownben/munro
2beeae23f29fd064b102a44a1c2d3d852eed65e0
[ "MIT" ]
1
2021-12-25T14:32:25.000Z
2021-12-25T14:32:25.000Z
from __future__ import annotations properties = [ "time", "position", "points", "incomplete", "event", "competitor", "type", "course", "id", "name", "ageClass", "club", "course", "eventName", ]
28.149215
75
0.464894
from __future__ import annotations from typing import Any, Dict, List, Literal, Optional, Union from .event import Event from .database import query, queryWithResult, queryWithResults properties = [ "time", "position", "points", "incomplete", "event", "competitor", "type", "course", ...
0
7,281
0
3,047
0
0
0
83
90
4c974887fd1b1b9962ef96e605440ab8067fc6be
2,952
py
Python
plotdev.py
SABSR3-Group-2/PKLibaryGroup2
99b065e75aed0a5e640f218455b9c9e452613fa6
[ "MIT" ]
null
null
null
plotdev.py
SABSR3-Group-2/PKLibaryGroup2
99b065e75aed0a5e640f218455b9c9e452613fa6
[ "MIT" ]
11
2020-10-21T13:41:53.000Z
2020-10-28T10:16:56.000Z
plotdev.py
SABSR3-Group-2/PKLibaryGroup2
99b065e75aed0a5e640f218455b9c9e452613fa6
[ "MIT" ]
null
null
null
# solveData = pd.DataFrame(data = [[1,2,4,8,16,32,64,128],[1,1,2,3,4,3,2,1]], columns=[0,1,2,3,4,5,6,7]) # solveData = solveData.transpose() # a = [[1,2,3,4],[4,3,2,1,2,3,4,3,2,1]] # #b= np.array(a) # c = np.array(a).T # newData = pd.DataFrame(data = a, columns=[1,2,3,3.5,4,5,6,7,8,9]) # newData = newData.tra...
25.230769
104
0.602304
import matplotlib.pyplot as plt import numpy as np import pandas as pd def __unitsFormat(unitsInput): if unitsInput != "": unitsOutput = " ("+unitsInput+")" else: unitsOutput = unitsInput return unitsOutput # solveData = pd.DataFrame(data = [[1,2,4,8,16,32,64,128],[1,1,2,3,4,3,2,1]], co...
0
0
0
1,834
0
142
0
5
112
52b2b8048d01ad33751970a0ccba10527e01ab2d
7,194
py
Python
attack_methods/Jpeg_compression.py
ASU-Active-Perception-Group/decentralized_attribution_of_generative_models
b57c38b215cff4df24744262ffa02d41c61151ac
[ "MIT" ]
3
2021-03-19T08:34:57.000Z
2021-03-20T04:06:43.000Z
attack_methods/Jpeg_compression.py
ASU-Active-Perception-Group/decentralized_attribution_of_generative_models
b57c38b215cff4df24744262ffa02d41c61151ac
[ "MIT" ]
null
null
null
attack_methods/Jpeg_compression.py
ASU-Active-Perception-Group/decentralized_attribution_of_generative_models
b57c38b215cff4df24744262ffa02d41c61151ac
[ "MIT" ]
null
null
null
import torch.nn as nn # def zigzag_indices(shape: (int, int), count): # x_range, y_range = shape # index_order = sorted(((x, y) for x in range(x_range) for y in range(y_range)), # key=lambda p: (p[0] + p[1], -p[1] if (p[0] + p[1]) % 2 else p[1])) # # mask = np.zeros(shape) # fo...
43.077844
155
0.578121
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F def gen_filters(size_x: int, size_y: int, dct_or_idct_fun: callable) -> np.ndarray: tile_size_x = 8 filters = np.zeros((size_x * size_y, size_x, size_y)) for k_y in range(size_y): for k_x in range(size_x): ...
0
0
0
4,246
0
1,376
0
-2
181
ffedf602d2f9c7fa1d071765a091d64c3cb50e73
413
py
Python
session/migrations/0006_auto_20190415_1247.py
tonymontaro/mentorci_server
527885a38da60e80698624309f99455e0c8b1192
[ "MIT" ]
2
2019-07-11T09:46:11.000Z
2020-02-14T19:47:30.000Z
session/migrations/0006_auto_20190415_1247.py
tonymontaro/mentorci_server
527885a38da60e80698624309f99455e0c8b1192
[ "MIT" ]
14
2019-07-05T08:52:17.000Z
2022-02-10T08:25:03.000Z
session/migrations/0006_auto_20190415_1247.py
tonymontaro/mentorci_server
527885a38da60e80698624309f99455e0c8b1192
[ "MIT" ]
2
2019-07-11T09:46:14.000Z
2020-02-14T20:57:55.000Z
# Generated by Django 2.2 on 2019-04-15 12:47
21.736842
74
0.607748
# Generated by Django 2.2 on 2019-04-15 12:47 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('session', '0005_auto_20190415_0524'), ] operations = [ migrations.AlterField( model_name='sessionlog', name='concern',...
0
0
0
301
0
0
0
19
46
2020c53b7f2ac02ac70f17066db5bac7ae6d6bf8
2,643
py
Python
trend/src/zutils/tensorflow/tf_store.py
limingmax/WFCode
f2e6d2fcf05ad9fdaac3a69603afee047ed37ca3
[ "Apache-2.0" ]
2
2018-10-23T01:56:46.000Z
2018-10-23T01:56:49.000Z
trend/src/zutils/tensorflow/tf_store.py
limingmax/WFCode
f2e6d2fcf05ad9fdaac3a69603afee047ed37ca3
[ "Apache-2.0" ]
null
null
null
trend/src/zutils/tensorflow/tf_store.py
limingmax/WFCode
f2e6d2fcf05ad9fdaac3a69603afee047ed37ca3
[ "Apache-2.0" ]
null
null
null
# @Time : 2018-9-10 # @Author : zxh
39.447761
99
0.67045
# @Time : 2018-9-10 # @Author : zxh import os import tensorflow as tf import sys from zutils.utils import relative_project_path class TFStore: def __init__(self, sess, model_name, net_name, max_to_keep=500): self.sess = sess self.model_name= model_name self.net_name = net_name sel...
0
0
0
2,490
0
0
0
4
111
72bc8a1878b0d62c89218738d3dca18323b62324
5,997
py
Python
otter/database/model.py
pathob/odoo-otter
1bf5dbab3c3ef12a12cae604d82d4e6f855f37fc
[ "Apache-2.0" ]
null
null
null
otter/database/model.py
pathob/odoo-otter
1bf5dbab3c3ef12a12cae604d82d4e6f855f37fc
[ "Apache-2.0" ]
1
2022-01-10T15:05:53.000Z
2022-01-10T15:05:53.000Z
otter/database/model.py
pathob/odoo-otter
1bf5dbab3c3ef12a12cae604d82d4e6f855f37fc
[ "Apache-2.0" ]
null
null
null
# based on https://realpython.com/python-sqlite-sqlalchemy/#using-flat-files-for-data-storage from sqlalchemy.ext.declarative import declarative_base from otter.database import engine # from otter.database import session as sess Base = declarative_base() # cached Odoo objects # class BaseMixin(Base): # @class...
30.135678
113
0.629148
# based on https://realpython.com/python-sqlite-sqlalchemy/#using-flat-files-for-data-storage from datetime import datetime import sqlalchemy from sqlalchemy import Column, String, Boolean, Integer, Float, Date, DateTime, ForeignKey, select, func, cast from sqlalchemy.exc import NoResultFound from sqlalchemy.ext.decla...
0
2,257
0
2,683
0
0
0
231
270
f17683f3d27673d7aef5f527130d3c6b329fd12a
3,553
py
Python
golfshot-downloader.py
tinman6/golfshot-downloader
c5093c670a673fc0ee26fd0dceb9bba0c7675ad2
[ "MIT" ]
null
null
null
golfshot-downloader.py
tinman6/golfshot-downloader
c5093c670a673fc0ee26fd0dceb9bba0c7675ad2
[ "MIT" ]
null
null
null
golfshot-downloader.py
tinman6/golfshot-downloader
c5093c670a673fc0ee26fd0dceb9bba0c7675ad2
[ "MIT" ]
null
null
null
#!/usr/bin/python import argparse from lxml import etree import requests GOLFSHOT_URL = 'https://play.golfshot.com' parser = argparse.ArgumentParser(description='Download GolfShot data') parser.add_argument('username', help='Username for GolfShot account') parser.add_argument('password', help='Password for ...
33.838095
160
0.687025
#!/usr/bin/python import argparse from bs4 import BeautifulSoup from html.parser import HTMLParser from lxml import etree import json import re import requests GOLFSHOT_URL = 'https://play.golfshot.com' class RoundParser(HTMLParser): def handle_data(self, data): # the golfshot model is available in a script b...
0
0
0
637
0
1,581
0
-1
203
195f9f62c5e9e58bb63a7defda4ff1c86c175351
1,719
py
Python
examples/pyqtcom/mainwindow_UI.py
chinnurtb/distrex
a97a086050af6c799c86dadd3d2eb5c4ecb9b21c
[ "BSD-4-Clause" ]
1
2015-01-12T01:19:13.000Z
2015-01-12T01:19:13.000Z
examples/pyqtcom/mainwindow_UI.py
chinnurtb/distrex
a97a086050af6c799c86dadd3d2eb5c4ecb9b21c
[ "BSD-4-Clause" ]
null
null
null
examples/pyqtcom/mainwindow_UI.py
chinnurtb/distrex
a97a086050af6c799c86dadd3d2eb5c4ecb9b21c
[ "BSD-4-Clause" ]
null
null
null
from PyQt4 import QtCore try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: _fromUtf8 = lambda s: s
47.75
139
0.706225
from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: _fromUtf8 = lambda s: s class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(800, 756) self.centralw...
0
0
0
1,559
0
0
0
7
25
4b805d7ef26b22a989836bce1b521bf8bf18807d
5,618
py
Python
src/os-specific/windows/token/modify_token.py
shownadda/Malware-Dev
a3fb40371bb4c4f41c582747af41ae8800050f5c
[ "Unlicense" ]
46
2022-01-30T14:29:02.000Z
2022-03-25T03:49:13.000Z
src/os-specific/windows/token/modify_token.py
shownadda/Malware-Dev
a3fb40371bb4c4f41c582747af41ae8800050f5c
[ "Unlicense" ]
null
null
null
src/os-specific/windows/token/modify_token.py
shownadda/Malware-Dev
a3fb40371bb4c4f41c582747af41ae8800050f5c
[ "Unlicense" ]
1
2022-03-05T03:42:55.000Z
2022-03-05T03:42:55.000Z
## Modify Process Token # Global Imports import ctypes # Grab a handle on Advapi.dll, User32.dll and Kernel32.dll a_handle = ctypes.WinDLL("Advapi32.dll") u_handle = ctypes.WinDLL("User32.dll") k_handle = ctypes.WinDLL("Kernel32.dll") # Shortcut to give "All Access" rights to the current process. # The |...
33.242604
122
0.681737
## Modify Process Token # Global Imports import ctypes from ctypes.wintypes import DWORD # Grab a handle on Advapi.dll, User32.dll and Kernel32.dll a_handle = ctypes.WinDLL("Advapi32.dll") u_handle = ctypes.WinDLL("User32.dll") k_handle = ctypes.WinDLL("Kernel32.dll") # Shortcut to give "All Access" right...
0
0
0
478
0
0
0
12
123
e176e8f1cee58c069ecdbb88cf40ac41ba41119d
709
py
Python
Taller_Estructuras_de_Control_Secuenciales/Ejercicio_15.py
LeonardoJimenezUbaque/Algoritmos_y_Programacion_C4_G2
7bb6fffa7d5d99ac2b5c0a3724f97a84e145bbb7
[ "MIT" ]
null
null
null
Taller_Estructuras_de_Control_Secuenciales/Ejercicio_15.py
LeonardoJimenezUbaque/Algoritmos_y_Programacion_C4_G2
7bb6fffa7d5d99ac2b5c0a3724f97a84e145bbb7
[ "MIT" ]
null
null
null
Taller_Estructuras_de_Control_Secuenciales/Ejercicio_15.py
LeonardoJimenezUbaque/Algoritmos_y_Programacion_C4_G2
7bb6fffa7d5d99ac2b5c0a3724f97a84e145bbb7
[ "MIT" ]
null
null
null
""" Ejercicio 15 Dados como datos el precio final pagado por un producto y su precio de venta al pblico (PVP), se requiere que calcule y muestre el porcentaje de descuento que le ha sido aplicado. Entradas Precio_Final_Pagado --> Float --> P_F Precio_Venta_Publico --> Float --> P_V_P Salidas Porcentaje_Descuento --> ...
32.227273
106
0.744711
""" Ejercicio 15 Dados como datos el precio final pagado por un producto y su precio de venta al público (PVP), se requiere que calcule y muestre el porcentaje de descuento que le ha sido aplicado. Entradas Precio_Final_Pagado --> Float --> P_F Precio_Venta_Publico --> Float --> P_V_P Salidas Porcentaje_Descuento -->...
4
0
0
0
0
0
0
0
0
ffd083841407fefac167ebacd9988307729e3322
3,021
py
Python
source/brailleInput.py
davidhilton936/clone
0889f95ef2d74f43b2c98f4d45bf09b0c605f1de
[ "bzip2-1.0.6" ]
1
2019-10-26T04:13:35.000Z
2019-10-26T04:13:35.000Z
source/brailleInput.py
davidhilton936/clone
0889f95ef2d74f43b2c98f4d45bf09b0c605f1de
[ "bzip2-1.0.6" ]
1
2017-08-08T00:44:17.000Z
2017-08-08T00:44:17.000Z
source/brailleInput.py
davidhilton936/clone
0889f95ef2d74f43b2c98f4d45bf09b0c605f1de
[ "bzip2-1.0.6" ]
1
2020-04-30T19:14:00.000Z
2020-04-30T19:14:00.000Z
#brailleInput.py #A part of NonVisual Desktop Access (NVDA) #This file is covered by the GNU General Public License. #See the file COPYING for more details. #Copyright (C) 2012-2013 NV Access Limited, Rui Batista """Framework for handling braille input from the user. All braille input is represented by a {BrailleInput...
28.5
86
0.709037
#brailleInput.py #A part of NonVisual Desktop Access (NVDA) #This file is covered by the GNU General Public License. #See the file COPYING for more details. #Copyright (C) 2012-2013 NV Access Limited, Rui Batista import os.path import louis import braille import config from logHandler import log import winUser import ...
0
0
0
2,131
0
111
0
-38
247
927514758cfa6089deece09c9319a8bda7feab28
1,064
py
Python
CEGO/testFunctions/DTLZ8.py
napa-jmm/CEGO
172d511133a608ca5bf265d9ebd2937b8a171b3e
[ "MIT" ]
6
2018-07-18T06:38:42.000Z
2021-11-17T21:01:40.000Z
CEGO/testFunctions/DTLZ8.py
napa-jmm/CEGO
172d511133a608ca5bf265d9ebd2937b8a171b3e
[ "MIT" ]
null
null
null
CEGO/testFunctions/DTLZ8.py
napa-jmm/CEGO
172d511133a608ca5bf265d9ebd2937b8a171b3e
[ "MIT" ]
6
2018-10-15T09:35:24.000Z
2021-05-08T13:40:19.000Z
# -*- coding: utf-8 -*- """ Created on Mon Mar 5 11:06:16 2018 @author: r.dewinter """ #import matplotlib.pyplot as plt #from mpl_toolkits.mplot3d import Axes3D #rngMin = np.zeros(9) #rngMax = np.ones(9) #nVar = 9 #ref = np.array([1,1,1]) #parameters = np.empty((200,9)) #objectives = np.empty((200,...
23.644444
72
0.56391
# -*- coding: utf-8 -*- """ Created on Mon Mar 5 11:06:16 2018 @author: r.dewinter """ import numpy as np def DTLZ8(x): f1 = 1/3*np.sum(x[:3]) f2 = 1/3*np.sum(x[3:6]) f3 = 1/3*np.sum(x[6:]) g1 = f3+4*f1-1 g2 = f3+4*f2-1 g3 = 2*f3+f1+f2-1 return np.array([f...
0
0
0
0
0
217
0
-3
48
583b74e40fc0ea58b61f300685cd5e11e60972b3
2,747
py
Python
vectorize.py
orestislabridis/X-SPELLS
4285888ef2c9cc5ef59756d363319599d8599e69
[ "Apache-2.0" ]
1
2021-01-09T09:21:02.000Z
2021-01-09T09:21:02.000Z
vectorize.py
orestislabridis/X-SPELLS
4285888ef2c9cc5ef59756d363319599d8599e69
[ "Apache-2.0" ]
1
2020-11-26T14:34:08.000Z
2021-02-03T12:48:35.000Z
vectorize.py
orestislampridis/X-SPELLS
4285888ef2c9cc5ef59756d363319599d8599e69
[ "Apache-2.0" ]
null
null
null
""" Helper script used for turning text into tf-idf vector for the knn experiment """ import re import numpy from nltk import pos_tag from nltk.stem import SnowballStemmer from nltk.stem import WordNetLemmatizer from nltk.tokenize import word_tokenize def cleanText(text, lemmatize, stemmer): """Me...
32.317647
112
0.625774
""" Helper script used for turning text into tf-idf vector for the knn experiment """ import re import numpy from nltk import pos_tag from nltk.corpus import stopwords from nltk.corpus import wordnet from nltk.stem import SnowballStemmer from nltk.stem import WordNetLemmatizer from nltk.tokenize import wo...
0
0
0
0
0
1,151
0
60
127
1de486ee204679bd8893f40a41b6333021fd84bd
81
py
Python
ichnaea/tests/__init__.py
crankycoder/ichnaea
fb54000e92c605843b7a41521e36fd648c11ae94
[ "Apache-2.0" ]
1
2018-01-18T16:02:43.000Z
2018-01-18T16:02:43.000Z
ichnaea/tests/__init__.py
crankycoder/ichnaea
fb54000e92c605843b7a41521e36fd648c11ae94
[ "Apache-2.0" ]
null
null
null
ichnaea/tests/__init__.py
crankycoder/ichnaea
fb54000e92c605843b7a41521e36fd648c11ae94
[ "Apache-2.0" ]
1
2018-01-19T17:56:48.000Z
2018-01-19T17:56:48.000Z
import os.path DATA_DIRECTORY = os.path.join(os.path.dirname(__file__), 'data')
20.25
64
0.753086
import os.path DATA_DIRECTORY = os.path.join(os.path.dirname(__file__), 'data')
0
0
0
0
0
0
0
0
0
66bacfd2c886a3e584925a335ad2ea71c33c9b69
1,524
py
Python
algo_test3.py
pflun/learningAlgorithms
3101e989488dfc8a56f1bf256a1c03a837fe7d97
[ "MIT" ]
null
null
null
algo_test3.py
pflun/learningAlgorithms
3101e989488dfc8a56f1bf256a1c03a837fe7d97
[ "MIT" ]
null
null
null
algo_test3.py
pflun/learningAlgorithms
3101e989488dfc8a56f1bf256a1c03a837fe7d97
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # test = Solution() # # print test.lexicographical('apple', 'appld') # print test.trySet() test = Solution3() print test.canFinish([[1, 0], [2, 1], [2, 0]])
24.190476
63
0.489501
# -*- coding: utf-8 -*- class Solution(object): # 静态变量 TAG = "Person" def lexicographical(self, a, b): for i in range(5, -1, -1): print i matrix = [ [1, 5, 9], [10, 11, 13], [12, 13, 15] ], r...
12
0
0
1,269
0
0
0
0
68
8d4eba3c2060dccdffd308731cd2c7d3744a9820
2,751
py
Python
terrascript/resource/phillbaker/elasticsearch.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
507
2017-07-26T02:58:38.000Z
2022-01-21T12:35:13.000Z
terrascript/resource/phillbaker/elasticsearch.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
135
2017-07-20T12:01:59.000Z
2021-10-04T22:25:40.000Z
terrascript/resource/phillbaker/elasticsearch.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
81
2018-02-20T17:55:28.000Z
2022-01-31T07:08:40.000Z
# terrascript/resource/phillbaker/elasticsearch.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:15:48 UTC) __all__ = [ "elasticsearch_component_template", "elasticsearch_composable_index_template", "elasticsearch_index", "elasticsearch_index_template", "ela...
22.365854
74
0.811705
# terrascript/resource/phillbaker/elasticsearch.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:15:48 UTC) import terrascript class elasticsearch_component_template(terrascript.Resource): pass class elasticsearch_composable_index_template(terrascript.Resource): pass class elasticsearch_i...
0
0
0
1,123
0
0
0
-3
551
5d8d397e6a8ca3fdf09cc0422991f6bb28d600a0
3,758
py
Python
ex4/4_2_binary_classification/4_2_binary_classification.py
Jeilef/FoSA
d4b53bd687d06af80f91d4c7c96c1ef97708933f
[ "MIT" ]
null
null
null
ex4/4_2_binary_classification/4_2_binary_classification.py
Jeilef/FoSA
d4b53bd687d06af80f91d4c7c96c1ef97708933f
[ "MIT" ]
null
null
null
ex4/4_2_binary_classification/4_2_binary_classification.py
Jeilef/FoSA
d4b53bd687d06af80f91d4c7c96c1ef97708933f
[ "MIT" ]
null
null
null
import argparse import pandas as pd from scipy.io import arff # to get the summary both logistic-regression and support-vector-machines have to be run once with the output errors option if __name__ == "__main__": parser = argparse.ArgumentParser('FSA') parser.add_argument('--type', type=str, help='which...
37.207921
135
0.685737
import argparse, os from sklearn.linear_model import LogisticRegression from sklearn.svm import SVR import pandas as pd from scipy.io import arff def train_svm(train_dataset): cols = train_dataset.columns.values x = train_dataset[cols[:-1]].to_numpy() y = train_dataset[cols[-1]].to_numpy() y = [i[0] f...
0
0
0
0
0
2,246
0
40
158
327fc17dee8a883eb99c23c7dc2a82bf1781a06f
757
py
Python
ElectrospraySimulator/GUI_scripts/PredefinedFuns.py
DavidPoves/Liquid-meniscus-in-the-ionic-regime-simulator
9a8cfce64ae2adb06c39418fdbbb187c75431c69
[ "MIT" ]
null
null
null
ElectrospraySimulator/GUI_scripts/PredefinedFuns.py
DavidPoves/Liquid-meniscus-in-the-ionic-regime-simulator
9a8cfce64ae2adb06c39418fdbbb187c75431c69
[ "MIT" ]
null
null
null
ElectrospraySimulator/GUI_scripts/PredefinedFuns.py
DavidPoves/Liquid-meniscus-in-the-ionic-regime-simulator
9a8cfce64ae2adb06c39418fdbbb187c75431c69
[ "MIT" ]
null
null
null
""" Within this file, the predefined functions appearing in the main menu may be defined. If a new one is added, it must be added to the attributes self.predef_funs_show and self.predef_funs of the PredefinedFunctions class from the MainMenu.py file. Moreover, these functions must be added to the self.save method from...
24.419355
120
0.660502
import numpy as np """ Within this file, the predefined functions appearing in the main menu may be defined. If a new one is added, it must be added to the attributes self.predef_funs_show and self.predef_funs of the PredefinedFunctions class from the MainMenu.py file. Moreover, these functions must be added to the se...
0
0
0
0
0
297
0
-3
114
727e5a69e567a4226eac8c6955f63566c5e67590
1,284
py
Python
algorithm/graph_theory/connected_cell/solution.py
delaanthonio/hackerrank
b1f2e1e93b3260be90eb3b8cb8e86e9a700acf27
[ "MIT" ]
1
2017-07-02T01:35:39.000Z
2017-07-02T01:35:39.000Z
algorithm/graph_theory/connected_cell/solution.py
delaanthonio/hackerrank
b1f2e1e93b3260be90eb3b8cb8e86e9a700acf27
[ "MIT" ]
null
null
null
algorithm/graph_theory/connected_cell/solution.py
delaanthonio/hackerrank
b1f2e1e93b3260be90eb3b8cb8e86e9a700acf27
[ "MIT" ]
1
2018-04-03T15:11:56.000Z
2018-04-03T15:11:56.000Z
#!/usr/bin/env python3 """ :problem: https://www.hackerrank.com/challenges/ctci-connected-cell-in-a-grid/problem """ from typing import Tuple Cell = Tuple[int, int] if __name__ == '__main__': main()
24.226415
85
0.492212
#!/usr/bin/env python3 """ :problem: https://www.hackerrank.com/challenges/ctci-connected-cell-in-a-grid/problem """ from typing import List, Set, Tuple Cell = Tuple[int, int] def dfs_region(grid: List[List[int]], visited: Set[Cell], start: Cell) -> int: area = 0 if start in visited: return 1 ce...
0
0
0
0
0
1,018
0
11
46
bfb08d3994e7214fb72cf9fbaa7086621a4d8da3
4,713
py
Python
FC.py
mahootiha-maryam/DL-for-image-analysis
2e645341a6d3c54b2dbe31a04f96c2a06a5793c9
[ "Apache-2.0" ]
null
null
null
FC.py
mahootiha-maryam/DL-for-image-analysis
2e645341a6d3c54b2dbe31a04f96c2a06a5793c9
[ "Apache-2.0" ]
null
null
null
FC.py
mahootiha-maryam/DL-for-image-analysis
2e645341a6d3c54b2dbe31a04f96c2a06a5793c9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' This is a fully connected neural network. It contains data batching , using Relu activation function, using adam optimizer and dropout for overfitting. ''' import torch import pandas as pd import numpy as np import matplotlib.pyplot as plt import sklearn data = pd.read_csv('bike_sharing.c...
30.406452
97
0.663484
# -*- coding: utf-8 -*- ''' This is a fully connected neural network. It contains data batching , using Relu activation function, using adam optimizer and dropout for overfitting. ''' import torch import pandas as pd import numpy as np import matplotlib.pyplot as plt import sklearn data = pd.read_csv('bike_sharing.c...
0
0
0
0
0
0
0
0
0
9b0433912348ba45b8e9413dd40fe8c371f9ea92
11,956
py
Python
HLTrigger/Configuration/python/HLT_75e33/modules/hltPhase2L3MuonsNoID_cfi.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
1
2021-11-30T16:24:46.000Z
2021-11-30T16:24:46.000Z
HLTrigger/Configuration/python/HLT_75e33/modules/hltPhase2L3MuonsNoID_cfi.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
4
2021-11-29T13:57:56.000Z
2022-03-29T06:28:36.000Z
HLTrigger/Configuration/python/HLT_75e33/modules/hltPhase2L3MuonsNoID_cfi.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
1
2021-11-30T16:16:05.000Z
2021-11-30T16:16:05.000Z
import FWCore.ParameterSet.Config as cms hltPhase2L3MuonsNoID = cms.EDProducer("MuonIdProducer", CaloExtractorPSet = cms.PSet( CenterConeOnCalIntersection = cms.bool(False), ComponentName = cms.string('CaloExtractorByAssociator'), DR_Max = cms.double(1.0), DR_Veto_E = cms.double(0.0...
43.794872
128
0.610572
import FWCore.ParameterSet.Config as cms hltPhase2L3MuonsNoID = cms.EDProducer("MuonIdProducer", CaloExtractorPSet = cms.PSet( CenterConeOnCalIntersection = cms.bool(False), ComponentName = cms.string('CaloExtractorByAssociator'), DR_Max = cms.double(1.0), DR_Veto_E = cms.double(0.0...
0
0
0
0
0
0
0
0
0
932abde0780a030533a6b3666904bc58b1662fa8
754
py
Python
01. Searching & Sorting/Python files/Insertion_sort.py
Ansh-cell/Data-structure-Algorithms-using-Python
2074bd1aece7ea95a8ae12bd3e4de8139711eba1
[ "MIT" ]
2
2021-07-06T21:27:33.000Z
2021-08-24T14:28:34.000Z
01. Searching & Sorting/Python files/Insertion_sort.py
Ansh-cell/Data-structure-Algorithms-using-Python
2074bd1aece7ea95a8ae12bd3e4de8139711eba1
[ "MIT" ]
null
null
null
01. Searching & Sorting/Python files/Insertion_sort.py
Ansh-cell/Data-structure-Algorithms-using-Python
2074bd1aece7ea95a8ae12bd3e4de8139711eba1
[ "MIT" ]
null
null
null
arr = [2, 4, 1, 2, 8, 3] insertionSort(arr) print(arr)
47.125
108
0.600796
def insertionSort(arr): # argument: (arr) --> arr = array / list length = len(arr) # find the length of array for i in range(1, length): # starting from 1st index till end temp = arr[i] # store the value of ith index in temp so it can be access later j = i - 1 # as we are starting from 1st...
0
0
0
0
0
676
0
0
22
469949c76743edf2d55f59e5b288ae57e2e866c5
70,296
py
Python
intensio/examples/python/intermediate/output/basicRAT-example/ItAvGNeiuyvPMOGsZIzXIVBRyHPHRAwkpnsoyvPsfARqNqWfJInnIyGCFSGxjyC.py
Warlockk/Intensio-Obfuscator
befaf1cfd2f7320266f07ef036542413317b3d9b
[ "MIT" ]
1
2020-02-25T10:54:44.000Z
2020-02-25T10:54:44.000Z
intensio/examples/python/intermediate/output/basicRAT-example/ItAvGNeiuyvPMOGsZIzXIVBRyHPHRAwkpnsoyvPsfARqNqWfJInnIyGCFSGxjyC.py
Warlockk/Intensio-Obfuscator
befaf1cfd2f7320266f07ef036542413317b3d9b
[ "MIT" ]
null
null
null
intensio/examples/python/intermediate/output/basicRAT-example/ItAvGNeiuyvPMOGsZIzXIVBRyHPHRAwkpnsoyvPsfARqNqWfJInnIyGCFSGxjyC.py
Warlockk/Intensio-Obfuscator
befaf1cfd2f7320266f07ef036542413317b3d9b
[ "MIT" ]
null
null
null
#!/usr/bin/env python FjRNtSCJtxQIHzHCBANyvSDFfkHSAoEHzzByCQCtzEQRIPEGztHSpPBmIAjBJFF = 'RXLQksAGmIIuwhBJUptxVuytBrDBAdGQAQvkSrGtgiSFnGSZospnORAnCEZHCBz' zmNDzvGHuIEXFHBBtGtCEpxpAQSFvzsESQMwGFYFyGQyEUBBoMCOCFPCRARREmS = 'RICsbwNkCOqPrHxHGDwjHTJCAhHPGiRZSFzrFITzFLmZFDDAuBRtAxtkQzDUuGg' xJOxLDDlmqmAmyPHrDJSJSCFCitymFVQqv...
126.431655
278
0.865753
#!/usr/bin/env python FjRNtSCJtxQIHzHCBANyvSDFfkHSAoEHzzByCQCtzEQRIPEGztHSpPBmIAjBJFF = 'RXLQksAGmIIuwhBJUptxVuytBrDBAdGQAQvkSrGtgiSFnGSZospnORAnCEZHCBz' zmNDzvGHuIEXFHBBtGtCEpxpAQSFvzsESQMwGFYFyGQyEUBBoMCOCFPCRARREmS = 'RICsbwNkCOqPrHxHGDwjHTJCAhHPGiRZSFzrFITzFLmZFDDAuBRtAxtkQzDUuGg' xJOxLDDlmqmAmyPHrDJSJSCFCitymFVQqv...
0
0
0
0
0
34,464
0
854
218
c608b7e78abd3f1e926ac291a49708e420d785ec
2,057
py
Python
topfarm/examples/data/parque_ficticio_offshore.py
DTUWindEnergy/TopFarm2
cba70b20431f7a828370447117fe2e7533edf7c2
[ "MIT" ]
4
2019-02-18T08:46:00.000Z
2021-01-28T06:35:52.000Z
topfarm/examples/data/parque_ficticio_offshore.py
DTUWindEnergy/TopFarm2
cba70b20431f7a828370447117fe2e7533edf7c2
[ "MIT" ]
1
2019-11-26T12:12:12.000Z
2019-11-26T12:12:12.000Z
topfarm/examples/data/parque_ficticio_offshore.py
DTUWindEnergy/TopFarm2
cba70b20431f7a828370447117fe2e7533edf7c2
[ "MIT" ]
8
2019-01-14T09:33:26.000Z
2021-06-30T11:56:03.000Z
# -*- coding: utf-8 -*- """ Created on Mon Jun 28 10:55:12 2021 @author: mikf """ import numpy as np x = np.asarray([262403., 262553., 262703., 262853., 263003., 263153., 263303., 263453., 263603., 263753., 263903., 264053., 264203., 264353., 264503., 264653., 264803., 264953., 265103...
39.557692
83
0.613515
# -*- coding: utf-8 -*- """ Created on Mon Jun 28 10:55:12 2021 @author: mikf """ import numpy as np from py_wake.examples.data.ParqueFicticio import ParqueFicticio_path from py_wake.site import WaspGridSite from py_wake.site.xrsite import XRSite x = np.asarray([262403., 262553., 262703., 262853., 263003., 263153., ...
0
0
0
497
0
0
0
80
89