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
e17ce02f18842fb81648e90c24fc2efd64710900
484,516
py
Python
test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/operations/_operations.py
changlong-liu/autorest.python
1f03e4c6a11934d385fab050dc44041f1e91e9ff
[ "MIT" ]
null
null
null
test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/operations/_operations.py
changlong-liu/autorest.python
1f03e4c6a11934d385fab050dc44041f1e91e9ff
[ "MIT" ]
null
null
null
test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/operations/_operations.py
changlong-liu/autorest.python
1f03e4c6a11934d385fab050dc44041f1e91e9ff
[ "MIT" ]
null
null
null
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
46.33413
120
0.613016
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
354
304,435
0
126,083
0
50,492
0
301
2,066
3ab043a232c5636d9b84dfe4b1a7129d936601c7
7,183
py
Python
alipay/aop/api/domain/AlipayAssetPointVoucherprodBenefittemplateCreateModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/AlipayAssetPointVoucherprodBenefittemplateCreateModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/AlipayAssetPointVoucherprodBenefittemplateCreateModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*-
32.355856
83
0.584435
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AssetFundInfo import AssetFundInfo from alipay.aop.api.domain.AssetValidPeriod import AssetValidPeriod class AlipayAssetPointVoucherprodBenefittemplateCreateModel(object): de...
0
2,690
0
4,225
0
0
0
107
112
247d37b879b9bb4d6c4053fda7ce951376a9ecde
2,075
py
Python
tests/verification/test_match.py
PEM-Humboldt/regi0
0d64587d5d87f57cddfc7a67bb8baf74cd70adf2
[ "MIT" ]
null
null
null
tests/verification/test_match.py
PEM-Humboldt/regi0
0d64587d5d87f57cddfc7a67bb8baf74cd70adf2
[ "MIT" ]
15
2022-02-03T11:38:37.000Z
2022-03-09T23:23:04.000Z
tests/verification/test_match.py
PEM-Humboldt/regi0
0d64587d5d87f57cddfc7a67bb8baf74cd70adf2
[ "MIT" ]
null
null
null
""" Test cases for the regi0.verification.match function. """
20.959596
87
0.473253
""" Test cases for the regi0.verification.match function. """ import numpy as np import pandas as pd import pytest from regi0.verification import match @pytest.fixture def left(): return pd.Series( [ np.nan, "Nariño", "Amazonas", "chocó", "Guaji...
6
681
0
0
0
1,118
0
2
204
88b0abac7951e3017be79c494f8c43569db6cd22
823
py
Python
heroku/download_ants_files.py
girder/otm-server
7abfe9c2d659c962784e28058d8f9a8ffc1f4991
[ "Apache-2.0" ]
null
null
null
heroku/download_ants_files.py
girder/otm-server
7abfe9c2d659c962784e28058d8f9a8ffc1f4991
[ "Apache-2.0" ]
5
2022-03-10T19:39:22.000Z
2022-03-17T21:05:10.000Z
heroku/download_ants_files.py
girder/otm-server
7abfe9c2d659c962784e28058d8f9a8ffc1f4991
[ "Apache-2.0" ]
null
null
null
wheel_url = ( 'https://files.pythonhosted.org/packages/f0/b5' '/45f1d9ad34194bf4b9cc79c7b30b2d8c656ab6b487d8c70c8826f6a9f922' '/antspyx-0.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl' ) if __name__ == '__main__': main()
26.548387
84
0.682868
import site import tempfile import urllib.request import zipfile wheel_url = ( 'https://files.pythonhosted.org/packages/f0/b5' '/45f1d9ad34194bf4b9cc79c7b30b2d8c656ab6b487d8c70c8826f6a9f922' '/antspyx-0.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl' ) def main(): dest_dir = site.getsit...
0
0
0
0
0
479
0
-23
111
90bdee01d48891321ac96ba155db001b496db97a
7,909
py
Python
src/CMakeLists_generator.py
Ginoko/auto_generate_CMakeLists
d9b7151266046a0f3a6893ac422509459455c299
[ "MIT" ]
null
null
null
src/CMakeLists_generator.py
Ginoko/auto_generate_CMakeLists
d9b7151266046a0f3a6893ac422509459455c299
[ "MIT" ]
null
null
null
src/CMakeLists_generator.py
Ginoko/auto_generate_CMakeLists
d9b7151266046a0f3a6893ac422509459455c299
[ "MIT" ]
null
null
null
""" ==================== CMakeLists Generator ==================== :Date: 2021-01-26 :Version: 1.0.0 :Author: Ginoko :Contact: ginorasakushisu666@gmail.com """ import sys import traceback is_windows = True if __name__ == '__main__': try: check_platform() main(sys.argv[1:]) except Except...
32.150407
94
0.552029
""" ==================== CMakeLists Generator ==================== :Date: 2021-01-26 :Version: 1.0.0 :Author: Ginoko :Contact: ginorasakushisu666@gmail.com """ import sys import os import getopt import platform import re import traceback is_windows = True class LanguageConfiguration: __type_value_map = { ...
0
1,521
0
4,291
0
1,494
0
-38
203
f9c0724f4120710b9bb78e49e320b9e80e637bf7
1,320
py
Python
app/routers/external_contents.py
yamatteo/vue-fastapi-boilerplate
5fa3de29a6e7ec4a8df9b3a4073f462307f62cb6
[ "MIT" ]
2
2020-03-11T02:58:44.000Z
2020-03-27T16:00:25.000Z
app/routers/external_contents.py
yamatteo/vue-fastapi-boilerplate
5fa3de29a6e7ec4a8df9b3a4073f462307f62cb6
[ "MIT" ]
7
2021-03-10T07:59:29.000Z
2022-02-26T23:46:17.000Z
app/routers/external_contents.py
yamatteo/vue-fastapi-boilerplate
5fa3de29a6e7ec4a8df9b3a4073f462307f62cb6
[ "MIT" ]
1
2020-03-11T02:58:48.000Z
2020-03-11T02:58:48.000Z
from fastapi import APIRouter router = APIRouter()
35.675676
121
0.793182
from typing import List from fastapi import APIRouter, Depends, Body from fastapi import UploadFile, File from starlette.responses import Response from models import ExternalContent from routers import admin_only from schemas import * router = APIRouter() @router.post("/browse", dependencies=[Depends(admin_only)])...
0
941
0
0
0
0
0
73
248
0dca94e48e3bf19521fc60b9787bb9d952c90e0c
162
py
Python
python/p030.py
lbreede/project-euler
c225e3742f749fc681034aac98cc9c23f8cdb37e
[ "MIT" ]
null
null
null
python/p030.py
lbreede/project-euler
c225e3742f749fc681034aac98cc9c23f8cdb37e
[ "MIT" ]
null
null
null
python/p030.py
lbreede/project-euler
c225e3742f749fc681034aac98cc9c23f8cdb37e
[ "MIT" ]
null
null
null
result = 0 for i in range(2, 200000): digits = list(map(int, str(i))) fifth = 0 for d in digits: fifth += d**5 if i == fifth: result += i print(result)
13.5
32
0.592593
result = 0 for i in range(2, 200000): digits = list(map(int, str(i))) fifth = 0 for d in digits: fifth += d**5 if i == fifth: result += i print(result)
0
0
0
0
0
0
0
0
0
e5b934dbcbcfd5884ad1d57af4c5c28f973aba0f
672
py
Python
python/reverse-string/reverse_string_test.py
manubhardwaj/exercism
27b22a8d52520ada30a644315167cab127e7ac43
[ "Apache-2.0" ]
null
null
null
python/reverse-string/reverse_string_test.py
manubhardwaj/exercism
27b22a8d52520ada30a644315167cab127e7ac43
[ "Apache-2.0" ]
4
2020-07-17T11:30:45.000Z
2021-03-23T21:25:36.000Z
python/reverse-string/reverse_string_test.py
manubhardwaj/exercism
27b22a8d52520ada30a644315167cab127e7ac43
[ "Apache-2.0" ]
null
null
null
import unittest # Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.1 if __name__ == '__main__': unittest.main()
24.888889
75
0.657738
import unittest from reverse_string import reverse # Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.1 class ReverseStringTests(unittest.TestCase): def empty_string(self): self.assertEqual(reverse(''), '') def a_word(self): self.assertEqual(reverse('robot'), ...
0
0
0
470
0
0
0
13
46
96e7af56f8e1bac038907af57551dbe96360eae9
1,205
py
Python
nordestao/apps/campeonatos/views/players.py
intelivix/pyne-workshop-scraping-web
c0696b669934eef2dbda81da3b7c058810041fa5
[ "MIT" ]
null
null
null
nordestao/apps/campeonatos/views/players.py
intelivix/pyne-workshop-scraping-web
c0696b669934eef2dbda81da3b7c058810041fa5
[ "MIT" ]
null
null
null
nordestao/apps/campeonatos/views/players.py
intelivix/pyne-workshop-scraping-web
c0696b669934eef2dbda81da3b7c058810041fa5
[ "MIT" ]
null
null
null
player_list_view = PlayerListView.as_view() player_detail_view = PlayerDetailView.as_view() players_by_team_list_view = PlayersByTeamListView.as_view()
28.023256
69
0.758506
from django.views.generic.list import ListView from django.views.generic.detail import DetailView from django.shortcuts import get_object_or_404 from campeonatos.models import Player from campeonatos.models import Team class PlayerModelMixin(object): model = Player class PlayerListView(PlayerModelMixin, ListVie...
0
0
0
736
0
0
0
109
202
ac633ae84e39b2a9a0c6199e63ae7e2cc94f841f
435
py
Python
apiuser/core/migrations/0003_auto_20191113_1922.py
ngelrojas/crud_user_advanced
41ab1b403fbf5d15730d30b810867fbd5bde9e3d
[ "MIT" ]
null
null
null
apiuser/core/migrations/0003_auto_20191113_1922.py
ngelrojas/crud_user_advanced
41ab1b403fbf5d15730d30b810867fbd5bde9e3d
[ "MIT" ]
null
null
null
apiuser/core/migrations/0003_auto_20191113_1922.py
ngelrojas/crud_user_advanced
41ab1b403fbf5d15730d30b810867fbd5bde9e3d
[ "MIT" ]
null
null
null
# Generated by Django 2.2.6 on 2019-11-13 19:22
22.894737
97
0.6
# Generated by Django 2.2.6 on 2019-11-13 19:22 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0002_auto_20191113_1820'), ] operations = [ migrations.AlterField( model_name='reward', name='type_reward', ...
0
0
0
321
0
0
0
19
46
df8438c6fb19f9776c84908bc3dc3db9b791b43c
3,418
py
Python
mmaction/models/recognizers/base.py
Morgan-Gan/SlowfastFb-TSM
ca6783df0cc9577abb1735b2cab52653d569beff
[ "Apache-2.0" ]
null
null
null
mmaction/models/recognizers/base.py
Morgan-Gan/SlowfastFb-TSM
ca6783df0cc9577abb1735b2cab52653d569beff
[ "Apache-2.0" ]
null
null
null
mmaction/models/recognizers/base.py
Morgan-Gan/SlowfastFb-TSM
ca6783df0cc9577abb1735b2cab52653d569beff
[ "Apache-2.0" ]
null
null
null
import torch.nn as nn
36.361702
98
0.562902
import logging from abc import ABCMeta, abstractmethod import torch.nn as nn from slowfast.utils.parser import load_config,parse_args from slowfast.models import head_helper class BaseRecognizer(nn.Module): """Base class for recognizers""" __metaclass__ = ABCMeta def __init__(self): super(BaseR...
0
300
0
2,919
0
0
0
65
112
c7f9543912f383b64228630d2274b0e6d6d77368
13,324
py
Python
demo.py
KeithRieck/bedlam
ce5f87a0211b4eecd553b1aae24e3b3664b43c5e
[ "BSD-2-Clause" ]
null
null
null
demo.py
KeithRieck/bedlam
ce5f87a0211b4eecd553b1aae24e3b3664b43c5e
[ "BSD-2-Clause" ]
null
null
null
demo.py
KeithRieck/bedlam
ce5f87a0211b4eecd553b1aae24e3b3664b43c5e
[ "BSD-2-Clause" ]
null
null
null
# __pragma__('skip') document = window = Math = Date = console = 0 # Prevent complaints by optional static checker # __pragma__('noskip') # __pragma__('noalias', 'clear')
35.43617
112
0.608526
from bedlam import Animation from bedlam import Button from bedlam import Game from bedlam import GameTask from bedlam import ImageSprite from bedlam import Scene from bedlam import Sprite # __pragma__('skip') document = window = Math = Date = console = 0 # Prevent complaints by optional static checker # __pragma__...
0
0
0
12,696
0
0
0
35
407
3e59bcc2abad1d7f94a1dd46d84e3dbff0111bc5
12,527
py
Python
API-CM.py
IoTCrawler/Capability-Manager
5e396cf1e97dbf58274a239b61857cf39182782a
[ "Apache-2.0" ]
null
null
null
API-CM.py
IoTCrawler/Capability-Manager
5e396cf1e97dbf58274a239b61857cf39182782a
[ "Apache-2.0" ]
null
null
null
API-CM.py
IoTCrawler/Capability-Manager
5e396cf1e97dbf58274a239b61857cf39182782a
[ "Apache-2.0" ]
1
2020-11-04T05:46:33.000Z
2020-11-04T05:46:33.000Z
# #Copyright Odin Solutions S.L. All Rights Reserved. # #SPDX-License-Identifier: Apache-2.0 # from http.server import HTTPServer import ssl import logging import sys import configparser import os #Obtain configuracion from config.cfg file. cfg = configparser.ConfigParser() cfg.read(["./config.cfg"]) host = cfg.g...
34.797222
138
0.528059
# #Copyright Odin Solutions S.L. All Rights Reserved. # #SPDX-License-Identifier: Apache-2.0 # from http.server import HTTPServer, BaseHTTPRequestHandler import ssl import http.client import logging import sys import json import configparser from subprocess import Popen, PIPE import html import os import time #Obtai...
0
0
0
6,474
0
4,475
0
4
228
9ece274dab4a34c40a834896458c41a2351468b0
127
py
Python
modelapp/admin.py
anandkumar190/django-code
c47fbc5f55f7d5961c29a0e65047573013c995dc
[ "MIT" ]
null
null
null
modelapp/admin.py
anandkumar190/django-code
c47fbc5f55f7d5961c29a0e65047573013c995dc
[ "MIT" ]
null
null
null
modelapp/admin.py
anandkumar190/django-code
c47fbc5f55f7d5961c29a0e65047573013c995dc
[ "MIT" ]
1
2020-10-05T04:46:11.000Z
2020-10-05T04:46:11.000Z
from django.contrib import admin from modelapp.models import Data # Register your models here. admin.site.register(Data)
21.166667
33
0.779528
from django.contrib import admin from modelapp.models import Data # Register your models here. admin.site.register(Data)
0
0
0
0
0
0
0
0
0
e18118fb4c6a48b5899e6421c95d4a83ff65028f
560
py
Python
wikireader/html_convert/page_template.py
mke21/wikireader
767422a736498d5147650cae52a89da7d0c43b65
[ "MIT" ]
null
null
null
wikireader/html_convert/page_template.py
mke21/wikireader
767422a736498d5147650cae52a89da7d0c43b65
[ "MIT" ]
7
2020-11-12T20:16:14.000Z
2020-11-18T20:33:16.000Z
wikireader/html_convert/page_template.py
mke21/wikireader
767422a736498d5147650cae52a89da7d0c43b65
[ "MIT" ]
null
null
null
page_template = '''<!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <style> {css} </style> <title>{title}</title> </head> <body> <div class="content"> <div class="sidenav"> <h3>Links</h3> {links} </div> <div class="article"> <h1>{title}</...
16.969697
37
0.5
page_template = '''<!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <style> {css} </style> <title>{title}</title> </head> <body> <div class="content"> <div class="sidenav"> <h3>Links</h3> {links} </div> <div class="article"> <h1>{title}</...
0
0
0
0
0
146
0
0
23
9684b8053a57b0c7b92c8fb99c063013bf0f467f
6,316
py
Python
app-3rd-party/ultragrid-1.1-rc4/ultragrid/ag_plugin/uvSenderService.py
benyaboy/sage-graphics
090640167329ace4b6ad266d47db5bb2b0394232
[ "Unlicense" ]
370
2016-10-05T15:19:00.000Z
2022-03-29T22:12:28.000Z
app-3rd-party/ultragrid-1.1-rc4/ultragrid/ag_plugin/uvSenderService.py
benyaboy/sage-graphics
090640167329ace4b6ad266d47db5bb2b0394232
[ "Unlicense" ]
165
2016-11-21T13:01:36.000Z
2022-03-31T20:01:20.000Z
app-3rd-party/ultragrid-1.1-rc4/ultragrid/ag_plugin/uvSenderService.py
benyaboy/sage-graphics
090640167329ace4b6ad266d47db5bb2b0394232
[ "Unlicense" ]
63
2016-10-13T12:07:45.000Z
2022-03-23T19:46:10.000Z
#----------------------------------------------------------------------------- # Name: uvSenderService.py # Purpose: Start the UltraGrid video client # # Author: Ladan Gharai # Colin Perkins # # Created: 13 August 2004 # Copyright: (c) 2004 University of Southern California # ...
42.106667
104
0.599272
#----------------------------------------------------------------------------- # Name: uvSenderService.py # Purpose: Start the UltraGrid video client # # Author: Ladan Gharai # Colin Perkins # # Created: 13 August 2004 # Copyright: (c) 2004 University of Southern California # ...
0
0
0
5,165
0
0
0
243
186
c46195a445886d3fb5109c53a83abbb83eba930b
1,197
py
Python
packages/simcore-sdk/src/simcore_sdk/node_ports/_data_item.py
colinRawlings/osparc-simcore
bf2f18d5bc1e574d5f4c238d08ad15156184c310
[ "MIT" ]
25
2018-04-13T12:44:12.000Z
2022-03-12T15:01:17.000Z
packages/simcore-sdk/src/simcore_sdk/node_ports/_data_item.py
colinRawlings/osparc-simcore
bf2f18d5bc1e574d5f4c238d08ad15156184c310
[ "MIT" ]
2,553
2018-01-18T17:11:55.000Z
2022-03-31T16:26:40.000Z
packages/simcore-sdk/src/simcore_sdk/node_ports/_data_item.py
mrnicegyu11/osparc-simcore
b6fa6c245dbfbc18cc74a387111a52de9b05d1f4
[ "MIT" ]
20
2018-01-18T19:45:33.000Z
2022-03-29T07:08:47.000Z
"""This module contains an item representing a node port""" import collections import logging from typing import Dict, Optional, Union from ..node_ports_common import config log = logging.getLogger(__name__) DataItemValue = Optional[Union[int, float, bool, str, Dict[str, Union[int, str]]]] _DataItem = ...
32.351351
83
0.609023
"""This module contains an item representing a node port""" import collections import logging from typing import Dict, Optional, Union from ..node_ports_common import config, exceptions log = logging.getLogger(__name__) DataItemValue = Optional[Union[int, float, bool, str, Dict[str, Union[int, str]]]] ...
0
0
0
771
0
0
0
12
25
102f8234d6639e14c477cc991d6e3966277f42ea
1,660
py
Python
pdistcc/cli.py
asheplyakov/pdistcc
b514a17542bf687c8c7c4ec6e32dfb558ddbe600
[ "WTFPL" ]
null
null
null
pdistcc/cli.py
asheplyakov/pdistcc
b514a17542bf687c8c7c4ec6e32dfb558ddbe600
[ "WTFPL" ]
4
2019-08-22T14:31:15.000Z
2019-08-22T14:37:30.000Z
pdistcc/cli.py
asheplyakov/pdistcc
b514a17542bf687c8c7c4ec6e32dfb558ddbe600
[ "WTFPL" ]
null
null
null
#!/usr/bin/env python3
28.135593
77
0.64759
#!/usr/bin/env python3 import argparse import os import re from .config import ( DISTCCD_PORT, server_settings, client_settings, ) from .compiler import wrap_compiler from .server import daemon def parse_distcc_host(h): rx = re.compile('^([^:/]+):([0-9]+)/([0-9]+)') m = rx.match(h) if m i...
0
0
0
0
0
1,353
0
54
226
33f4b87878b83e13c7a8bca26e18a2ff2632844b
296
py
Python
password.py
mohit2pal/A_Password_Generator
2983c5f6b292ebeb1a186dcebe2c88d2486ebfc7
[ "MIT" ]
1
2021-11-28T19:18:02.000Z
2021-11-28T19:18:02.000Z
password.py
mohit2pal/A_Password_Generator
2983c5f6b292ebeb1a186dcebe2c88d2486ebfc7
[ "MIT" ]
null
null
null
password.py
mohit2pal/A_Password_Generator
2983c5f6b292ebeb1a186dcebe2c88d2486ebfc7
[ "MIT" ]
null
null
null
import random # trunk-ignore(flake8/W605) x = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyl][\][\]\;./0123456789" passnew = "" y = int(input("Enter the length of the password")) for i in range(y): passnew = passnew + random.choice(x) print("The generated password is ", passnew)
21.142857
79
0.716216
import random # trunk-ignore(flake8/W605) x = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyl][\][\]\;./0123456789" passnew = "" y = int(input("Enter the length of the password")) for i in range(y): passnew = passnew + random.choice(x) print("The generated password is ", passnew)
0
0
0
0
0
0
0
0
0
099e0bd280754a32c63729904da0898743f3575a
2,637
py
Python
flask_chown/permission_manager_redis.py
xvzf/flask-chmod
1dcd6b4281a930ac889415c1913e9551c882da23
[ "Apache-2.0" ]
null
null
null
flask_chown/permission_manager_redis.py
xvzf/flask-chmod
1dcd6b4281a930ac889415c1913e9551c882da23
[ "Apache-2.0" ]
1
2018-05-13T09:39:30.000Z
2018-05-13T09:39:30.000Z
flask_chown/permission_manager_redis.py
xvzf/flask-chmod
1dcd6b4281a930ac889415c1913e9551c882da23
[ "Apache-2.0" ]
1
2018-05-13T09:06:09.000Z
2018-05-13T09:06:09.000Z
# -*- coding: utf-8 -*- """ flask_chown.permission_manager_cached ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cached permission manager (based on redis) :copyright: (c) 2018 by Matthias Riegler. :license: APACHEv2, see LICENSE.md for more details. """ import logging logger = logging.getLogger(__name__)...
27.757895
78
0.587031
# -*- coding: utf-8 -*- """ flask_chown.permission_manager_cached ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cached permission manager (based on redis) :copyright: (c) 2018 by Matthias Riegler. :license: APACHEv2, see LICENSE.md for more details. """ import logging import json from . import PermissionM...
0
527
0
1,707
0
0
0
-9
90
2399cbdc1d5f6c6a2145b1efdefe3d6e35fc1c16
235
py
Python
Códigos fichados e comentados/Química/Propriedades da matéria/Tabela de Cátions e Ânions 1.0.py
kioolz/Python-scripts
cb8ad758811e2eed8673392077a55e8922ac7b9f
[ "MIT" ]
null
null
null
Códigos fichados e comentados/Química/Propriedades da matéria/Tabela de Cátions e Ânions 1.0.py
kioolz/Python-scripts
cb8ad758811e2eed8673392077a55e8922ac7b9f
[ "MIT" ]
null
null
null
Códigos fichados e comentados/Química/Propriedades da matéria/Tabela de Cátions e Ânions 1.0.py
kioolz/Python-scripts
cb8ad758811e2eed8673392077a55e8922ac7b9f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import pandas as pd from pandas import DataFrame Ctions=pd.Series([]) nions=pd.Series([]) Nomedoon=pd.Series([]) Frmuladoon=pd.Series([]) df=DataFrame({'Ctions':Ctions,'nions':nions}) df
13.055556
49
0.689362
# -*- coding: utf-8 -*- import pandas as pd from pandas import DataFrame,Series Cátions=pd.Series([]) Ânions=pd.Series([]) NomedoÍon=pd.Series([]) FórmuladoÍon=pd.Series([]) df=DataFrame({'Cátions':Cátions,'Ânions':Ânions}) df
18
0
0
0
0
0
0
7
0
1a7d056260ea1ad8ec145d1dca00bcda513dc1ed
5,168
py
Python
line.py
WilliamWan2017/Linear
d32d392b230048d25843961b163a50d3fc266eb4
[ "Apache-2.0" ]
null
null
null
line.py
WilliamWan2017/Linear
d32d392b230048d25843961b163a50d3fc266eb4
[ "Apache-2.0" ]
null
null
null
line.py
WilliamWan2017/Linear
d32d392b230048d25843961b163a50d3fc266eb4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Nov 10 14:22:56 2017 @author: zqzhan """ from decimal import getcontext from vector import Vector getcontext().prec = 30 if __name__ == '__main__': line1 = Line(Vector([1, 2]), 4) line2 = Line(Vector([2 , 5]), 9) print ('firs...
30.046512
80
0.565596
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Nov 10 14:22:56 2017 @author: zqzhan """ from decimal import Decimal,getcontext from vector import Vector getcontext().prec = 30 class MyDecimal(Decimal): def is_near_zero(self,eps=1e-10): if (abs(self)<eps): return True ...
0
207
0
3,984
0
0
0
8
50
d6958c08e1a125b144f95b6760059d05a50d5112
3,009
py
Python
src/setup.py
yalexaner/ubuntu-setup
870306197c5caac77c0d3bd3c4a05b95b5820ba0
[ "MIT" ]
null
null
null
src/setup.py
yalexaner/ubuntu-setup
870306197c5caac77c0d3bd3c4a05b95b5820ba0
[ "MIT" ]
null
null
null
src/setup.py
yalexaner/ubuntu-setup
870306197c5caac77c0d3bd3c4a05b95b5820ba0
[ "MIT" ]
null
null
null
from argparse import ArgumentParser if __name__ == '__main__': parser = ArgumentParser(description='Setup the system.') parser.add_argument('object', default='everything', nargs='?', choices=['everything', 'bash', 'git'], metavar='{everything, bash, git}',...
33.065934
117
0.636092
from argparse import ArgumentParser from os import system as execute, listdir, rmdir, mkdir from shutil import copy as copy_file def setup_bash(): # creating aliases copy_file('../res/.bash_aliases', '/home/yalexaner/') # changing promt with open('../res/promt') as promt_file: promt = promt_f...
0
0
0
0
0
2,102
0
49
159
44a1c8a37f23828c194dfa452d435587fe73be1c
4,817
py
Python
review_heatmap/web.py
kb1900/Anki-Addons
3b764af8657065c369d404025a3f11c964192a33
[ "MIT" ]
1
2019-06-23T04:46:24.000Z
2019-06-23T04:46:24.000Z
review_heatmap/web.py
kb1900/Anki-Addons
3b764af8657065c369d404025a3f11c964192a33
[ "MIT" ]
null
null
null
review_heatmap/web.py
kb1900/Anki-Addons
3b764af8657065c369d404025a3f11c964192a33
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Review Heatmap Add-on for Anki # # Copyright (C) 2016-2018 Aristotelis P. <https//glutanimate.com/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either ve...
40.822034
125
0.675732
# -*- coding: utf-8 -*- # Review Heatmap Add-on for Anki # # Copyright (C) 2016-2018 Aristotelis P. <https//glutanimate.com/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either ve...
0
0
0
0
0
0
0
0
0
3786c002c77adc076bc708f425f9fdfe037a3f43
4,005
py
Python
pyqt/chap11/labelledwidgets.py
liuyangyang2015/PythonDemo
a72c009a31ff833dd12405bb97e688ae91ceda6c
[ "MIT" ]
null
null
null
pyqt/chap11/labelledwidgets.py
liuyangyang2015/PythonDemo
a72c009a31ff833dd12405bb97e688ae91ceda6c
[ "MIT" ]
null
null
null
pyqt/chap11/labelledwidgets.py
liuyangyang2015/PythonDemo
a72c009a31ff833dd12405bb97e688ae91ceda6c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either version 2 of the License, or # version 3 of the Lic...
39.264706
74
0.642197
#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either version 2 of the License, or # version 3 of the Lic...
0
0
0
2,530
0
0
0
145
91
aa706634207ec5cdf904d41b11723983513e464f
3,913
py
Python
network_anomaly/KDDCup99-LSTM/binary/lskerastest.py
kidrabit/Data-Visualization-Lab-RND
baa19ee4e9f3422a052794e50791495632290b36
[ "Apache-2.0" ]
1
2022-01-18T01:53:34.000Z
2022-01-18T01:53:34.000Z
network_anomaly/UNSW-NB15-LSTM/binary/lskerastest.py
kidrabit/Data-Visualization-Lab-RND
baa19ee4e9f3422a052794e50791495632290b36
[ "Apache-2.0" ]
null
null
null
network_anomaly/UNSW-NB15-LSTM/binary/lskerastest.py
kidrabit/Data-Visualization-Lab-RND
baa19ee4e9f3422a052794e50791495632290b36
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import pandas as pd import numpy as np np.random.seed(1337) # for reproducibility from keras.models import Sequential from keras.layers import Dense, Dropout, Activation from keras.layers import LSTM from sklearn.metrics import (precision_score, recall_score, f1_score, accuracy_sc...
29.201493
164
0.729108
from __future__ import print_function from sklearn.cross_validation import train_test_split import pandas as pd import numpy as np np.random.seed(1337) # for reproducibility from keras.preprocessing import sequence from keras.utils import np_utils from keras.models import Sequential from keras.layers import Dense, Dro...
0
0
0
0
0
0
0
226
176
81b8ae47db07fae9137bdf23240c3ef9c16ec222
19,065
py
Python
plugins/modules/oci_blockstorage_boot_volume_backup.py
hanielburton/oci-ansible-collection
dfdffde637f746d346ba35569be8c3a3407022f2
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_blockstorage_boot_volume_backup.py
hanielburton/oci-ansible-collection
dfdffde637f746d346ba35569be8c3a3407022f2
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_blockstorage_boot_volume_backup.py
hanielburton/oci-ansible-collection
dfdffde637f746d346ba35569be8c3a3407022f2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Copyright (c) 2017, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
41.177106
160
0.649777
#!/usr/bin/python # Copyright (c) 2017, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
0
0
0
4,069
0
1,495
0
243
192
b86566688071e1b9be11c16e2797f8aae42b7573
1,583
pyde
Python
Bouncing_Ball/Bouncing_Ball.pyde
jarredthejellyfish/coding_workshop
aacb95770c9cf02eb63d1b42a238a74f46f1f3ac
[ "MIT" ]
null
null
null
Bouncing_Ball/Bouncing_Ball.pyde
jarredthejellyfish/coding_workshop
aacb95770c9cf02eb63d1b42a238a74f46f1f3ac
[ "MIT" ]
null
null
null
Bouncing_Ball/Bouncing_Ball.pyde
jarredthejellyfish/coding_workshop
aacb95770c9cf02eb63d1b42a238a74f46f1f3ac
[ "MIT" ]
null
null
null
# This is the ball class that handles everything related to Balls gravity = PVector(0, 1) # creating a new ball at position 250, 250 with velocity and acceleration 0 b = Ball(PVector(250, 250), PVector(0, 0), PVector(0, 0))
31.66
75
0.65319
# This is the ball class that handles everything related to Balls class Ball: # The __init__ method is used to initialize class variables def __init__(self, position, velocity, acceleration): # Each ball has a position, velocity and acceleration self.position = position self.velocity = v...
0
0
0
1,191
0
98
0
0
69
a306ad0b093e1e3720cd6f149f714a8e80e3fc4f
1,750
py
Python
CodeForces/FoxDividingCheese.py
PratikGarai/Coding-Challenges
af5f4458505b26538ec2d7dc0ca09aa236b2d01c
[ "MIT" ]
null
null
null
CodeForces/FoxDividingCheese.py
PratikGarai/Coding-Challenges
af5f4458505b26538ec2d7dc0ca09aa236b2d01c
[ "MIT" ]
2
2020-10-01T16:13:37.000Z
2020-10-30T19:12:38.000Z
CodeForces/FoxDividingCheese.py
PratikGarai/Coding-Challenges
af5f4458505b26538ec2d7dc0ca09aa236b2d01c
[ "MIT" ]
6
2020-10-03T09:04:26.000Z
2022-01-09T11:57:40.000Z
a,b = map(int, input().split()) print(process(a,b,0))
26.515152
43
0.334857
def process(a, b, step): if(a==b): return step steps = a+b changed = False if(a>b): if(a%5==0): val = process(a//5, b, step+1) if val!=-1: if changed : steps = min(steps, val) else: steps = ...
0
0
0
0
0
1,667
0
0
22
24b7353cbdee717d510c95e2ea9c09cb792d106a
2,339
py
Python
events/rejoin_user_event.py
t-karasova/grs-samples-python
0941265a6b8dd0bd6bd1db540b49307674360db7
[ "Apache-2.0" ]
1
2021-12-22T14:47:30.000Z
2021-12-22T14:47:30.000Z
events/rejoin_user_event.py
t-karasova/grs-samples-python
0941265a6b8dd0bd6bd1db540b49307674360db7
[ "Apache-2.0" ]
null
null
null
events/rejoin_user_event.py
t-karasova/grs-samples-python
0941265a6b8dd0bd6bd1db540b49307674360db7
[ "Apache-2.0" ]
2
2021-10-05T09:40:02.000Z
2021-12-17T16:04:26.000Z
# Copyright 2021 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
34.397059
103
0.790081
# Copyright 2021 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
0
0
0
0
0
893
0
99
111
06b2f000fb3c2bd6967d78dbed9d978bfe059655
7,494
py
Python
TMulator.py
deebs67/TMulator
1490c0bd81972471df8b090f83781ba6c3509c19
[ "MIT" ]
null
null
null
TMulator.py
deebs67/TMulator
1490c0bd81972471df8b090f83781ba6c3509c19
[ "MIT" ]
null
null
null
TMulator.py
deebs67/TMulator
1490c0bd81972471df8b090f83781ba6c3509c19
[ "MIT" ]
null
null
null
############################################################################## # This Python code has been written to emulate a simple Turing Machine. # Inspiration has been drawn from references such as the following: # # https://www.cs.virginia.edu/~robins/Turing_Paper_1936.pdf # https://www.cl.cam.ac.uk/projects/ras...
49.302632
178
0.600347
############################################################################## # This Python code has been written to emulate a simple Turing Machine. # Inspiration has been drawn from references such as the following: # # https://www.cs.virginia.edu/~robins/Turing_Paper_1936.pdf # https://www.cl.cam.ac.uk/projects/ras...
0
0
0
0
0
712
0
13
127
2c33b33e2ff39c04646272ab56efca732c319e88
4,945
py
Python
chrome/common/extensions/docs/server2/caching_rietveld_patcher.py
nagineni/chromium-crosswalk
5725642f1c67d0f97e8613ec1c3e8107ab53fdf8
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
4
2017-04-05T01:51:34.000Z
2018-02-15T03:11:54.000Z
chrome/common/extensions/docs/server2/caching_rietveld_patcher.py
nagineni/chromium-crosswalk
5725642f1c67d0f97e8613ec1c3e8107ab53fdf8
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2021-12-13T19:44:12.000Z
2021-12-13T19:44:12.000Z
chrome/common/extensions/docs/server2/caching_rietveld_patcher.py
nagineni/chromium-crosswalk
5725642f1c67d0f97e8613ec1c3e8107ab53fdf8
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
4
2017-04-05T01:52:03.000Z
2022-02-13T17:58:45.000Z
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from datetime import timedelta _VERSION_CACHE_MAXAGE = timedelta(seconds=5) ''' Append @version for keys to distinguish between different patchsets of an i...
37.748092
79
0.645298
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from datetime import datetime, timedelta from file_system import FileNotFoundError, ToUnicode from future import Future from patcher import Patcher _VERSION...
0
0
0
4,012
0
349
0
51
203
86e9fa48ae18bf3e22bbd8bfd77dd25685f617ca
14,008
py
Python
synthtool/gcp/gapic_generator.py
HemangChothani/synthtool
fdd03c161003ab97657cc0218f25c82c89ddf4b6
[ "Apache-2.0" ]
53
2018-10-29T20:10:03.000Z
2022-01-01T02:53:58.000Z
synthtool/gcp/gapic_generator.py
HemangChothani/synthtool
fdd03c161003ab97657cc0218f25c82c89ddf4b6
[ "Apache-2.0" ]
541
2018-09-25T02:30:52.000Z
2022-03-30T21:45:08.000Z
synthtool/gcp/gapic_generator.py
HemangChothani/synthtool
fdd03c161003ab97657cc0218f25c82c89ddf4b6
[ "Apache-2.0" ]
61
2019-01-15T15:05:15.000Z
2022-01-24T21:05:57.000Z
# Copyright 2018 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
38.911111
121
0.621216
# Copyright 2018 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
104
0
0
12,790
0
0
0
29
201
8523df85933b2d0a39bd3d9a78d8c598567b009e
716
py
Python
app/config.py
pkoscielny/zeroiot
ceb4e13ce7591bb651f2262160a79087b1ed024b
[ "MIT" ]
1
2021-03-08T08:12:00.000Z
2021-03-08T08:12:00.000Z
app/config.py
pkoscielny/zeroiot
ceb4e13ce7591bb651f2262160a79087b1ed024b
[ "MIT" ]
null
null
null
app/config.py
pkoscielny/zeroiot
ceb4e13ce7591bb651f2262160a79087b1ed024b
[ "MIT" ]
null
null
null
from configparser import ConfigParser config_ini = ConfigParser() config_ini.read('configs/config.ini') sqlite_db = config_ini['DATABASE']['SQLITE_DB'] config = dict( dev=DevelopmentConfig, test=TestingConfig, prod=ProductionConfig, )
19.888889
57
0.730447
from configparser import ConfigParser config_ini = ConfigParser() config_ini.read('configs/config.ini') sqlite_db = config_ini['DATABASE']['SQLITE_DB'] class BaseConfig: DEBUG = True TESTING = False SQLALCHEMY_ECHO = False SQLALCHEMY_TRACK_MODIFICATIONS = False SQLALCHEMY_DATABASE_URI = f'sqlite:...
0
0
0
370
0
0
0
0
92
7717e8fb94bf515a26bc8ac16dce8c5c5320b62b
34,741
py
Python
parsyfiles/filesystem_mapping.py
smarie/python-simple-file-collection-parsing-framework
344b37e1151e8d4e7c2ee49ae09d6568715ae64e
[ "BSD-3-Clause" ]
null
null
null
parsyfiles/filesystem_mapping.py
smarie/python-simple-file-collection-parsing-framework
344b37e1151e8d4e7c2ee49ae09d6568715ae64e
[ "BSD-3-Clause" ]
null
null
null
parsyfiles/filesystem_mapping.py
smarie/python-simple-file-collection-parsing-framework
344b37e1151e8d4e7c2ee49ae09d6568715ae64e
[ "BSD-3-Clause" ]
null
null
null
EXT_SEPARATOR = '.' MULTIFILE_EXT = '<multifile>'
46.075597
136
0.62278
from abc import abstractmethod, ABCMeta from logging import Logger from os import listdir, sep from os.path import isfile, join, isdir, dirname, basename, exists, splitext from typing import Dict, List, Any, Tuple, Union from parsyfiles.global_config import GLOBAL_CONFIG from parsyfiles.var_checker import check_var E...
0
5,829
0
28,325
0
0
0
163
362
4dfc3a5e49e2e11a4c9ff413585bf9fbf40142ea
4,931
py
Python
DP/value_iteration_gym.py
Scitator/rl-course-experiments
47e7666e2bc618ca4007372f411c3626fd7efc2b
[ "MIT" ]
85
2017-03-13T12:27:38.000Z
2021-08-03T23:00:48.000Z
DP/value_iteration_gym.py
Scitator/rl-course-experiments
47e7666e2bc618ca4007372f411c3626fd7efc2b
[ "MIT" ]
1
2019-04-13T15:24:06.000Z
2019-04-13T15:24:06.000Z
DP/value_iteration_gym.py
Scitator/rl-course-experiments
47e7666e2bc618ca4007372f411c3626fd7efc2b
[ "MIT" ]
25
2017-04-15T01:40:33.000Z
2021-11-23T02:54:10.000Z
#!/usr/bin/python import numpy as np def value_iteration(env, theta=0.0001, discount_factor=1.0): """ Value Iteration Algorithm. Args: env: OpenAI environment. env.P represents the transition probabilities of the environment. theta: Stopping threshold. If the value...
31.407643
89
0.582032
#!/usr/bin/python import gym from gym import wrappers import argparse import numpy as np def value_iteration(env, theta=0.0001, discount_factor=1.0): """ Value Iteration Algorithm. Args: env: OpenAI environment. env.P represents the transition probabilities of the environment. ...
0
0
0
0
0
2,449
0
-14
182
3e9667ac9543c7ab146b0b9bb37e11f47c89b9a5
28,724
py
Python
python/jdwp-shellifier.py
FinchX/loli_profiler
9391bb82fd0a26c5855770974ae886f42daf4266
[ "BSD-2-Clause" ]
388
2021-03-11T04:20:19.000Z
2022-03-29T05:55:07.000Z
python/jdwp-shellifier.py
habbyge/loli_profiler
fc5700acd5ee034698da2fff1189e58873721711
[ "BSD-2-Clause" ]
23
2021-03-24T06:38:29.000Z
2022-03-30T06:17:17.000Z
python/jdwp-shellifier.py
habbyge/loli_profiler
fc5700acd5ee034698da2fff1189e58873721711
[ "BSD-2-Clause" ]
44
2021-03-11T06:27:02.000Z
2022-03-28T03:58:09.000Z
#!/usr/bin/python ################################################################################ # # Universal JDWP shellifier # # @_hugsy_ # # And special cheers to @lanjelot # # loadlib option by @ikoz # import argparse import logging import os import sys import traceback #########################################...
37.547712
145
0.600195
#!/usr/bin/python ################################################################################ # # Universal JDWP shellifier # # @_hugsy_ # # And special cheers to @lanjelot # # loadlib option by @ikoz # import argparse import json import logging import logging.config import os import socket import struct import s...
0
68
0
12,385
0
12,706
0
-44
315
6fe5b00315c555a72e90213279c3ca2f91c5acbe
3,107
py
Python
trackintel/model/positionfixes.py
jirikuncar/trackintel
380a9a9c580f8e7e6d4bc669dd257f5d8b4b3022
[ "MIT" ]
null
null
null
trackintel/model/positionfixes.py
jirikuncar/trackintel
380a9a9c580f8e7e6d4bc669dd257f5d8b4b3022
[ "MIT" ]
null
null
null
trackintel/model/positionfixes.py
jirikuncar/trackintel
380a9a9c580f8e7e6d4bc669dd257f5d8b4b3022
[ "MIT" ]
null
null
null
import trackintel.preprocessing.positionfixes import trackintel.visualization.positionfixes
41.986486
101
0.684905
import pandas as pd import trackintel as ti import trackintel.preprocessing.positionfixes import trackintel.visualization.positionfixes import trackintel.io.postgis @pd.api.extensions.register_dataframe_accessor("as_positionfixes") class PositionfixesAccessor(object): """A pandas accessor to treat (Geo)DataFrame...
0
2,918
0
0
0
0
0
7
89
28cfc6c075ac52b40280edb376ba3220d989fe63
2,749
py
Python
codespark/settings.py
JorgeTerence/codespark
42ed2afe8dfab85bef774f0e421b89269223717c
[ "MIT" ]
null
null
null
codespark/settings.py
JorgeTerence/codespark
42ed2afe8dfab85bef774f0e421b89269223717c
[ "MIT" ]
null
null
null
codespark/settings.py
JorgeTerence/codespark
42ed2afe8dfab85bef774f0e421b89269223717c
[ "MIT" ]
null
null
null
import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent # See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/ SECRET_KEY = os.environ.get("CODESPARK_SECRET_KEY") DEBUG = True ALLOWED_HOSTS = [] INSTALLED_APPS = [ "django.contrib.admin", "django.contrib.auth",...
24.544643
91
0.674427
import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent # See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/ SECRET_KEY = os.environ.get("CODESPARK_SECRET_KEY") DEBUG = True ALLOWED_HOSTS = [] INSTALLED_APPS = [ "django.contrib.admin", "django.contrib.auth",...
0
0
0
0
0
0
0
0
0
fef65b1c92dc48f0298183b8bc13a4bbd7ddce3f
6,303
py
Python
Utils/ObservationSetManager.py
DavidLSmyth/DroneCoordinatedSearch
99173ef63c726049596fb79eda168b4fc3a550a8
[ "MIT" ]
1
2018-12-26T04:13:06.000Z
2018-12-26T04:13:06.000Z
Utils/ObservationSetManager.py
DavidLSmyth/DroneCoordinatedSearch
99173ef63c726049596fb79eda168b4fc3a550a8
[ "MIT" ]
null
null
null
Utils/ObservationSetManager.py
DavidLSmyth/DroneCoordinatedSearch
99173ef63c726049596fb79eda168b4fc3a550a8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Nov 13 11:45:44 2018 @author: 13383861 """ import sys sys.path.append('..') sys.path.append('.') from Utils.AgentObservation import AgentObservation from Utils.UE4Coord import UE4Coord from Utils.UE4Grid import UE4Grid if __name__ == "__main__": test_grid = UE4Grid(1, ...
46.345588
167
0.713787
# -*- coding: utf-8 -*- """ Created on Tue Nov 13 11:45:44 2018 @author: 13383861 """ import sys sys.path.append('..') sys.path.append('.') import typing import functools from Utils.AgentObservation import AgentObservation from Utils.UE4Coord import UE4Coord from Utils.UE4Grid import UE4Grid from Utils.BeliefMap impo...
0
0
0
3,481
0
0
0
11
89
3f258c641e551cd92fd15f628b856e86719f1fc8
9,074
py
Python
card_classes.py
Lavialee/Maturitni-prace
313da8f77b1204001984db48af70016e91f76c85
[ "MIT" ]
null
null
null
card_classes.py
Lavialee/Maturitni-prace
313da8f77b1204001984db48af70016e91f76c85
[ "MIT" ]
null
null
null
card_classes.py
Lavialee/Maturitni-prace
313da8f77b1204001984db48af70016e91f76c85
[ "MIT" ]
null
null
null
# CARD CLASSES # # AIR # # EARTH # # FIRE # # WATER # # END OF CARD CLASSES #
24.197333
112
0.57527
# CARD CLASSES # # AIR # class EagleCard: """Eagle (air, instant) - gain one point instantly, plus two points for each totem block under it""" def __init__(self): self.element = 'Air' self.type = 'instant' def __repr__(self): return "Eagle" def get_instant_points(self, p_totem...
2
0
0
8,517
0
0
0
0
456
3c50ed0a29ce60eea0f5d3f02023b82216f5b9bb
1,099
py
Python
manager/urls.py
biansetuliao/ArtWorkManager
a1d2cdacd1512c17ca10e0808368c0a2970deef1
[ "MIT" ]
1
2016-03-17T13:39:21.000Z
2016-03-17T13:39:21.000Z
manager/urls.py
biansetuliao/ArtWorkManager
a1d2cdacd1512c17ca10e0808368c0a2970deef1
[ "MIT" ]
null
null
null
manager/urls.py
biansetuliao/ArtWorkManager
a1d2cdacd1512c17ca10e0808368c0a2970deef1
[ "MIT" ]
null
null
null
from django.conf.urls import url from manager import views urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='administrator'), url(r'^tag', views.TagView.as_view(), name='tag'), url(r'^updatetag/(?P<tag_id>\d+)', views.TagUpdateView.as_view(), name='updatetag'), url(r'^updategroup/(?P<grou...
27.475
111
0.649682
from django.conf.urls import patterns, include, url from manager import views urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='administrator'), url(r'^tag', views.TagView.as_view(), name='tag'), url(r'^updatetag/(?P<tag_id>\d+)', views.TagUpdateView.as_view(), name='updatetag'), url(r'^u...
0
0
0
0
0
0
0
19
0
6f4c9224c412c90fadde9ff2b492d9b59f8dddfa
1,808
py
Python
bot.py
phantom0174/SQCS-Working-Bot
ae4b02e6b3fe403ae28a63f9cad8a35b04e89d45
[ "MIT" ]
2
2021-04-11T15:55:56.000Z
2021-04-17T01:41:47.000Z
bot.py
phantom0174/SQCS-Working-Bot
ae4b02e6b3fe403ae28a63f9cad8a35b04e89d45
[ "MIT" ]
null
null
null
bot.py
phantom0174/SQCS-Working-Bot
ae4b02e6b3fe403ae28a63f9cad8a35b04e89d45
[ "MIT" ]
1
2021-04-13T17:49:46.000Z
2021-04-13T17:49:46.000Z
import os import discord from discord.ext import commands import keep_alive intents = discord.Intents.all() bot = commands.Bot(command_prefix='?', intents=intents) for filename in os.listdir('./cogs'): if filename.endswith('.py'): bot.load_extension(f'cogs.{filename[:-3]}') keep_alive.keep_alive(...
24.432432
81
0.642699
import os import sys import discord from discord.ext import commands import keep_alive intents = discord.Intents.all() bot = commands.Bot(command_prefix='?', intents=intents) @bot.event async def on_ready(): print("~~~~| Bot is online |~~~~") @bot.command() @commands.has_any_role('總召') async def load(ctx, msg...
24
1,264
0
0
0
0
0
-11
160
9a10e99f4fc053003d679fdc131948c57b9aeda9
318
py
Python
lib/config.py
vt77/elevator
3f692c50b0ee45c28dbd9045f6f1892aca06fd23
[ "MIT" ]
null
null
null
lib/config.py
vt77/elevator
3f692c50b0ee45c28dbd9045f6f1892aca06fd23
[ "MIT" ]
null
null
null
lib/config.py
vt77/elevator
3f692c50b0ee45c28dbd9045f6f1892aca06fd23
[ "MIT" ]
null
null
null
elevator1 = { "num_persons":5, "cargo_weight":0, "floors":[0,10,11,12,13,14,17,16] } elevator2 = { "num_persons":10, "cargo_weight":150, "floors":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,16] } elevator3 = { "num_persons":0, "cargo_weight":550, "floors":[0,2,4,6,8,10,12,14,16] }
15.142857
55
0.556604
elevator1 = { "num_persons":5, "cargo_weight":0, "floors":[0,10,11,12,13,14,17,16] } elevator2 = { "num_persons":10, "cargo_weight":150, "floors":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,16] } elevator3 = { "num_persons":0, "cargo_weight":550, "floors":[0,2,4,6,8,10,12,14,16] }
0
0
0
0
0
0
0
0
0
4dcaed216d384e450833ac74fabe5bd88c7dc5c6
8,017
py
Python
pyNastran/f06/test/test_f06_utils.py
fmamitrotta/pyNastran
6f9592cf3a2ccb8c509918acb735282d6eef75aa
[ "BSD-3-Clause" ]
293
2015-03-22T20:22:01.000Z
2022-03-14T20:28:24.000Z
pyNastran/f06/test/test_f06_utils.py
fmamitrotta/pyNastran
6f9592cf3a2ccb8c509918acb735282d6eef75aa
[ "BSD-3-Clause" ]
512
2015-03-14T18:39:27.000Z
2022-03-31T16:15:43.000Z
pyNastran/f06/test/test_f06_utils.py
fmamitrotta/pyNastran
6f9592cf3a2ccb8c509918acb735282d6eef75aa
[ "BSD-3-Clause" ]
136
2015-03-19T03:26:06.000Z
2022-03-25T22:14:54.000Z
""" tests: - plot sol_145 """ import os import unittest try: IS_MATPLOTLIB = True except ImportError: # pragma: no cover IS_MATPLOTLIB = False if IS_MATPLOTLIB: #matplotlib.use('Qt5Agg') import matplotlib.pyplot as plt #try: # pragma: no cover #plt.figure() #plt.close() #exc...
38.917476
105
0.576151
""" tests: - plot sol_145 """ import os import unittest from cpylog import get_logger2 try: import matplotlib # pylint: disable=unused-import IS_MATPLOTLIB = True except ImportError: # pragma: no cover IS_MATPLOTLIB = False if IS_MATPLOTLIB: #matplotlib.use('Qt5Agg') import matplotlib.pyplot as ...
0
0
0
7,121
0
0
0
190
148
839db1f3427bc74602825b52e8231bc08cf6befc
13,769
py
Python
src/nna/tests/visutils_test.py
EnisBerk/speech_audio_understanding
2b1ba15a67bb48de7b949a6e5e0205dc5c3e24bd
[ "MIT" ]
null
null
null
src/nna/tests/visutils_test.py
EnisBerk/speech_audio_understanding
2b1ba15a67bb48de7b949a6e5e0205dc5c3e24bd
[ "MIT" ]
null
null
null
src/nna/tests/visutils_test.py
EnisBerk/speech_audio_understanding
2b1ba15a67bb48de7b949a6e5e0205dc5c3e24bd
[ "MIT" ]
null
null
null
"""Tests for visutils.py""" import faulthandler; faulthandler.enable() import csv import datetime import shutil #from matplotlib import matplotlib.pylab as pl from nna import visutils from nna.tests import mock_data from nna.tests.testparams import INPUTS_OUTPUTS_PATH IO_visutils_path = INPUTS_OUTPUTS_PATH / 'visuti...
32.705463
93
0.607597
"""Tests for visutils.py""" import faulthandler; faulthandler.enable() import csv import datetime import shutil #from matplotlib import cycler import numpy as np import pandas as pd from pandas._testing import assert_frame_equal import pytest import matplotlib.pylab as pl from nna import visutils from nna.tests impor...
0
545
0
0
0
5,993
0
4
329
431255b4747f6471d4333345cfb4e513203fa312
1,064
py
Python
proj.py
Soumitra-Mandal/Socket.io-practice-
7c4c4097adfd9af2751e2fe517ca12c2ad5fa725
[ "MIT" ]
null
null
null
proj.py
Soumitra-Mandal/Socket.io-practice-
7c4c4097adfd9af2751e2fe517ca12c2ad5fa725
[ "MIT" ]
null
null
null
proj.py
Soumitra-Mandal/Socket.io-practice-
7c4c4097adfd9af2751e2fe517ca12c2ad5fa725
[ "MIT" ]
null
null
null
from aiohttp import web import socketio # creates a new Async Socket IO Server sio = socketio.AsyncServer() # Creates a new Aiohttp Web Application app = web.Application() # Binds our Socket.IO server to our Web App # instance sio.attach(app) # we can define aiohttp endpoints just as we normally # would w...
29.555556
69
0.68891
from aiohttp import web import socketio # creates a new Async Socket IO Server sio = socketio.AsyncServer() # Creates a new Aiohttp Web Application app = web.Application() # Binds our Socket.IO server to our Web App # instance sio.attach(app) # we can define aiohttp endpoints just as we normally # would w...
0
272
109
0
0
0
0
0
46
c0e0f7c512e82f5fdd3a2c9573c0045ecf5797cc
3,671
py
Python
django_datadog/compat.py
mypebble/django-datadog
ca7f9c85553de7398e2ce1c792b2033d9b259931
[ "MIT" ]
null
null
null
django_datadog/compat.py
mypebble/django-datadog
ca7f9c85553de7398e2ce1c792b2033d9b259931
[ "MIT" ]
null
null
null
django_datadog/compat.py
mypebble/django-datadog
ca7f9c85553de7398e2ce1c792b2033d9b259931
[ "MIT" ]
null
null
null
"""Compatibility functions for DataDog integrations. """ from __future__ import absolute_import, print_function, unicode_literals import logging import six from datadog import api, statsd from requests.exceptions import HTTPError from .utils import init_datadog logger = logging.getLogger(__name__) def create_even...
29.368
77
0.602288
"""Compatibility functions for DataDog integrations. """ from __future__ import absolute_import, print_function, unicode_literals import logging import six from datadog import api, statsd from requests.exceptions import HTTPError from .utils import init_datadog logger = logging.getLogger(__name__) def create_even...
0
0
0
0
0
0
0
0
0
ca45dd247d20a8a95de66c5b44901ea91b2b5e17
612
py
Python
PhysicsTools/PythonAnalysis/test/testUncertainties.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
null
null
null
PhysicsTools/PythonAnalysis/test/testUncertainties.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
null
null
null
PhysicsTools/PythonAnalysis/test/testUncertainties.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python #example taken from https://pypi.python.org/pypi/uncertainties/3.0.1 from uncertainties import ufloat x = ufloat(2, 0.25) print x square = x**2 # Transparent calculations print square print square.nominal_value print square.std_dev # Standard deviation print square - x*x print sin(1+x**2) print...
30.6
71
0.761438
#!/usr/bin/env python #example taken from https://pypi.python.org/pypi/uncertainties/3.0.1 from uncertainties import ufloat x = ufloat(2, 0.25) print x square = x**2 # Transparent calculations print square print square.nominal_value print square.std_dev # Standard deviation print square - x*x from uncertainties.umat...
0
0
0
0
0
0
0
12
37
4a5f60cf0a9db3b3fc8623897e31f145d0f402fa
14,096
py
Python
src/structure_factor/plotting.py
For-a-few-DPPs-more/structure-factor
4251abf5e833463aa3091298727ea2e7fb785bbc
[ "MIT" ]
10
2021-11-27T23:21:32.000Z
2022-03-24T00:12:27.000Z
src/structure_factor/plotting.py
For-a-few-DPPs-more/structure-factor
4251abf5e833463aa3091298727ea2e7fb785bbc
[ "MIT" ]
null
null
null
src/structure_factor/plotting.py
For-a-few-DPPs-more/structure-factor
4251abf5e833463aa3091298727ea2e7fb785bbc
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np from structure_factor.utils import _bin_statistics, _sort_vectors # plot functions def plot_poisson(x, axis, c="k", linestyle=(0, (5, 10)), label="Poisson"): r"""Plot the pair correlation function :math:`g_{poisson}` and the structure factor :math:`S_{poisson}`...
37.892473
490
0.662741
import matplotlib.pyplot as plt import numpy as np from structure_factor.utils import _bin_statistics, _sort_vectors # plot functions def plot_poisson(x, axis, c="k", linestyle=(0, (5, 10)), label="Poisson"): r"""Plot the pair correlation function :math:`g_{poisson}` and the structure factor :math:`S_{poisson}`...
0
0
0
0
0
0
0
0
0
2d08a2a53fcdb3acbdad5df3db9db166219a1864
2,175
py
Python
tests/test_pyswitch/test_suite.py
mfeed/PySwitchLib
54e872bcbe77f2ae840d845dadb7c5b9c12482ed
[ "Apache-2.0" ]
6
2017-10-02T21:02:02.000Z
2018-07-04T13:56:55.000Z
tests/test_pyswitch/test_suite.py
mfeed/PySwitchLib
54e872bcbe77f2ae840d845dadb7c5b9c12482ed
[ "Apache-2.0" ]
23
2017-10-03T18:49:11.000Z
2019-07-20T00:25:44.000Z
tests/test_pyswitch/test_suite.py
mfeed/PySwitchLib
54e872bcbe77f2ae840d845dadb7c5b9c12482ed
[ "Apache-2.0" ]
4
2018-02-27T05:43:37.000Z
2019-06-30T13:30:25.000Z
import unittest if __name__ == '__main__': from test.test_pyswitch.test_interface_OverlayGateway import InterfaceOverlayGatewayTestCase from test.test_pyswitch.test_interface_vrf import InterfaceVRFTestCase from test.test_pyswitch.test_interface_pvlan import InterfacePrivateVlanTestCase from test.test_...
38.839286
77
0.758161
import unittest if __name__ == '__main__': from test.test_pyswitch.test_interface_OverlayGateway import \ InterfaceOverlayGatewayTestCase from test.test_pyswitch.test_interface_vrf import InterfaceVRFTestCase from test.test_pyswitch.test_interface_pvlan import \ InterfacePrivateVlanTestCase...
0
0
0
0
0
0
0
50
0
0461faf647720927ee37801dd0075f764fe31ea1
3,912
py
Python
compare/src/sim-roc.py
jsemple19/bwa-meth
ac2f267105132f4548344f3477c4162ac07b426d
[ "MIT" ]
83
2015-01-27T20:21:13.000Z
2022-03-28T05:05:32.000Z
compare/src/sim-roc.py
jsemple19/bwa-meth
ac2f267105132f4548344f3477c4162ac07b426d
[ "MIT" ]
63
2015-01-03T22:25:39.000Z
2022-02-24T17:54:33.000Z
compare/src/sim-roc.py
jsemple19/bwa-meth
ac2f267105132f4548344f3477c4162ac07b426d
[ "MIT" ]
63
2015-02-28T21:54:34.000Z
2022-02-23T06:23:49.000Z
from itertools import cycle import seaborn colors = cycle(seaborn.color_palette('Set1', 8)) BASES = False FLAGS="-F%i" % (0x4 | 0x100 | 0x200) if __name__ == "__main__": import argparse p = argparse.ArgumentParser() p.add_argument("--reads", help="reads file", required=True) p.add_argument("bams", n...
28.977778
96
0.550613
import os.path as op import re import sys from toolshed import reader, nopen from collections import defaultdict import numpy as np from itertools import cycle import pylab as pl import seaborn colors = cycle(seaborn.color_palette('Set1', 8)) BASES = False def name(bam): return op.basename(bam).rsplit(".", 1)[0...
0
0
0
0
0
3,282
0
-3
246
145b1f9e09c4970224ba8b77ae4f53ab7f1ae6f6
128
py
Python
Arya/plugins/cmd.py
yezimai/oldboyProject
889eebc2e6158b07ac0964b25eb01df743ad0117
[ "Apache-2.0" ]
null
null
null
Arya/plugins/cmd.py
yezimai/oldboyProject
889eebc2e6158b07ac0964b25eb01df743ad0117
[ "Apache-2.0" ]
null
null
null
Arya/plugins/cmd.py
yezimai/oldboyProject
889eebc2e6158b07ac0964b25eb01df743ad0117
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*-
32
52
0.742188
# -*- coding:utf-8 -*- from Arya.backends.base_module import BaseSaltModule class CMD(BaseSaltModule): print 'in CMD module'
0
0
0
31
0
0
0
31
44
86aead67e2491b2481a8341c03822c8998f9dd04
2,905
py
Python
gpuinfo/GPUInfo.py
FlyHighest/gpuinfo
6626095b259fed71e8f20e3d42f41a2507f3cd36
[ "MIT" ]
10
2019-01-18T22:20:32.000Z
2022-02-15T06:42:03.000Z
gpuinfo/GPUInfo.py
FlyHighest/gpuinfo
6626095b259fed71e8f20e3d42f41a2507f3cd36
[ "MIT" ]
3
2019-05-24T16:06:30.000Z
2020-10-09T02:42:49.000Z
gpuinfo/GPUInfo.py
FlyHighest/gpuinfo
6626095b259fed71e8f20e3d42f41a2507f3cd36
[ "MIT" ]
5
2019-07-25T08:46:57.000Z
2022-02-15T06:42:03.000Z
import os import re __all__=['get_user','gpu_usage','check_empty','get_info'] def get_user(pid): ''' get_user(pid) Input a pid number , return its creator by linux command ps ''' ps=os.popen('ps -eo pid,user|grep '+str(pid)) lines=ps.readlines() for line in lines: return re.split('[ ...
29.948454
180
0.575904
import os import re __all__=['get_user','gpu_usage','check_empty','get_info'] def get_user(pid): ''' get_user(pid) Input a pid number , return its creator by linux command ps ''' ps=os.popen('ps -eo pid,user|grep '+str(pid)) lines=ps.readlines() for line in lines: return re.split('[ ...
0
0
0
0
0
0
0
0
0
306993ae4020d19cf2df37f14a6ad5d48c149334
1,610
py
Python
setup.py
jackqt/py-qrcode-generator
45f9f8798fe3f1387761c3dafd3b871fcac47de9
[ "MIT" ]
null
null
null
setup.py
jackqt/py-qrcode-generator
45f9f8798fe3f1387761c3dafd3b871fcac47de9
[ "MIT" ]
null
null
null
setup.py
jackqt/py-qrcode-generator
45f9f8798fe3f1387761c3dafd3b871fcac47de9
[ "MIT" ]
null
null
null
""" ````````````````` Run it: .. code:: bash $ pip install qrcode-converter $ python app/run.py [inner_img_path] [content] [width] [height] Links ````` * `website <https://github.com/jackqt/py-qrcode-generator/>`_ * `documentation <https://github.com/jackqt/py-qrcode-generator/>`_ """ import re import ast f...
27.288136
70
0.611801
""" ````````````````` Run it: .. code:: bash $ pip install qrcode-converter $ python app/run.py [inner_img_path] [content] [width] [height] Links ````` * `website <https://github.com/jackqt/py-qrcode-generator/>`_ * `documentation <https://github.com/jackqt/py-qrcode-generator/>`_ """ import re import ast f...
0
0
0
0
0
0
0
0
0
9236cffd93466ddd47d27068c82af927208be77b
1,565
py
Python
Exercicios/ex045.py
MateusBarboza99/Python-03-
9c6df88aaa8ba83d385b92722ed1df5873df3a77
[ "MIT" ]
null
null
null
Exercicios/ex045.py
MateusBarboza99/Python-03-
9c6df88aaa8ba83d385b92722ed1df5873df3a77
[ "MIT" ]
null
null
null
Exercicios/ex045.py
MateusBarboza99/Python-03-
9c6df88aaa8ba83d385b92722ed1df5873df3a77
[ "MIT" ]
null
null
null
from random import randint from time import sleep itens = ('Pedra', 'Papel','Tesoura') computador = randint(0, 2) print('''\033[1;31mSuas opes\033[m: [ 0 ] PEDRA [ 1 ] PAPEL [ 2 ] TESOURA''') jogador = int(input('\033[1;34mQual a sua Jogada?\033[m ')) print('\033[1;30mJO\033[m') sleep(1) print('\033[1;34mKEN\033[m') s...
30.096154
91
0.61278
from random import randint from time import sleep itens = ('Pedra', 'Papel','Tesoura') computador = randint(0, 2) print('''\033[1;31mSuas opções\033[m: [ 0 ] PEDRA [ 1 ] PAPEL [ 2 ] TESOURA''') jogador = int(input('\033[1;34mQual é a sua Jogada?\033[m ')) print('\033[1;30mJO\033[m') sleep(1) print('\033[1;34mKEN\033[m'...
12
0
0
0
0
0
0
0
0
54372a8d0a457508c0c41bfa220e2f49f433e704
8,774
py
Python
str_validator.py
tfwillems/STRValidator
c98ae03f30b38f1b786bf950bcbdc7722408a227
[ "Apache-2.0" ]
null
null
null
str_validator.py
tfwillems/STRValidator
c98ae03f30b38f1b786bf950bcbdc7722408a227
[ "Apache-2.0" ]
null
null
null
str_validator.py
tfwillems/STRValidator
c98ae03f30b38f1b786bf950bcbdc7722408a227
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2.7 from flask import Blueprint from flask.ext.sqlalchemy import SQLAlchemy from sqlalchemy.sql import func import argparse admin = Blueprint('admin', __name__, static_folder='static', url_prefix='/') db = SQLAlchemy() if __name__== '__main__': parser = argparse.ArgumentParser(descript...
40.62037
158
0.645658
#!/usr/bin/env python2.7 from flask import Flask, url_for, make_response, render_template, request from flask import json, jsonify, current_app, Blueprint from flask.ext.sqlalchemy import SQLAlchemy from sqlalchemy.sql import func from json import dumps from sqlalchemy.orm import class_mapper from sqlalchemy import o...
0
2,421
0
1,042
0
3,522
0
175
550
a2a721acc6fb7840dc13d5792d49d0ae937b8faa
246
py
Python
Uche Clare/Phase 1/Python Basic 1/Day-6/Task 41.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
6
2020-05-23T19:53:25.000Z
2021-05-08T20:21:30.000Z
Uche Clare/Phase 1/Python Basic 1/Day-6/Task 41.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
8
2020-05-14T18:53:12.000Z
2020-07-03T00:06:20.000Z
Uche Clare/Phase 1/Python Basic 1/Day-6/Task 41.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
39
2020-05-10T20:55:02.000Z
2020-09-12T17:40:59.000Z
#program to check whether a file exists. print(main('C:/Users/pc/Desktop/Python Task Solutions/Uche Clare/Phase 1/Python Basic 1/Day-5/Task 31', 'py' ))
35.142857
111
0.703252
#program to check whether a file exists. import os.path def main(filename, ext): return os.path.isfile(filename + '.' + ext) print(main('C:/Users/pc/Desktop/Python Task Solutions/Uche Clare/Phase 1/Python Basic 1/Day-5/Task 31', 'py' ))
0
0
0
0
0
51
0
-7
45
cd9a83d85a281b00cc6fd19c9bc043214f6415e2
1,372
py
Python
Python/mathematics/sieve.py
RCubedClub/cp_algo
ec254055ef745224b0a1c766ef16709a3eea7087
[ "MIT" ]
null
null
null
Python/mathematics/sieve.py
RCubedClub/cp_algo
ec254055ef745224b0a1c766ef16709a3eea7087
[ "MIT" ]
null
null
null
Python/mathematics/sieve.py
RCubedClub/cp_algo
ec254055ef745224b0a1c766ef16709a3eea7087
[ "MIT" ]
null
null
null
def series(n, bool=False): """ :param bool: If bool=True, then the function will return the boolean list of the prime numbers. If bool=False, then the function will return the list of prime number less than n+1. :param n: Prime Number less than n. :return: returns None if n is 0 or 1 o...
26.384615
100
0.543003
def series(n, bool=False): """ :param bool: If bool=True, then the function will return the boolean list of the prime numbers. If bool=False, then the function will return the list of prime number less than n+1. :param n: Prime Number less than n. :return: returns None if n is 0 or 1 o...
0
0
0
0
0
329
0
0
23
25ec93f6700e6c89348db7fa489493b203e8f908
979
py
Python
codewars/6 kyu/build-tower.py
sirken/coding-practice
9c5e23b2c24f525a89a5e1d15ce3aec3ad1a01ab
[ "MIT" ]
null
null
null
codewars/6 kyu/build-tower.py
sirken/coding-practice
9c5e23b2c24f525a89a5e1d15ce3aec3ad1a01ab
[ "MIT" ]
null
null
null
codewars/6 kyu/build-tower.py
sirken/coding-practice
9c5e23b2c24f525a89a5e1d15ce3aec3ad1a01ab
[ "MIT" ]
null
null
null
from Test import Test as test ''' Build Tower Build Tower by the following given argument: number of floors (integer and always greater than 0). Tower block is represented as * for example, a tower of 3 floors looks like below [ ' * ', ' *** ', '*****' ] and a tower of 6 floors looks like below [ ' *...
19.58
79
0.537283
from Test import Test, Test as test ''' Build Tower Build Tower by the following given argument: number of floors (integer and always greater than 0). Tower block is represented as * for example, a tower of 3 floors looks like below [ ' * ', ' *** ', '*****' ] and a tower of 6 floors looks like below [ '...
0
0
0
0
0
273
0
6
44
b902c4cac39316ebeb4a40069298b4672e4ced48
2,737
py
Python
src/lines_main.py
Muhammad-Dah/SimpleHTR
571967c8985160ff869d950b0ed3154fe6d0d426
[ "MIT" ]
null
null
null
src/lines_main.py
Muhammad-Dah/SimpleHTR
571967c8985160ff869d950b0ed3154fe6d0d426
[ "MIT" ]
null
null
null
src/lines_main.py
Muhammad-Dah/SimpleHTR
571967c8985160ff869d950b0ed3154fe6d0d426
[ "MIT" ]
null
null
null
import logging import os import editdistance import matplotlib.pyplot as plt from DataLoaderIAM import Batch from Model import Model from SamplePreprocessor import word_image_preprocess, image_preprocess from spelling_correction import SpellingCorrector from translator import Translator, google_translate os.environ[...
32.975904
101
0.664596
import logging import os import editdistance import matplotlib.pyplot as plt from DataLoaderIAM import Batch from Model import Model from SamplePreprocessor import word_image_preprocess, image_preprocess from spelling_correction import SpellingCorrector from translator import Translator, google_translate os.environ[...
0
0
0
0
0
0
0
0
0
3b2e47f36e3aef0119d3f0ecad07342aaa3a8c42
894
py
Python
school_hostel/__manifest__.py
kyaranusa/School-Management-Systems
d6cd71037fe46c08feff32f42af61f56eb25a7c7
[ "MIT" ]
null
null
null
school_hostel/__manifest__.py
kyaranusa/School-Management-Systems
d6cd71037fe46c08feff32f42af61f56eb25a7c7
[ "MIT" ]
null
null
null
school_hostel/__manifest__.py
kyaranusa/School-Management-Systems
d6cd71037fe46c08feff32f42af61f56eb25a7c7
[ "MIT" ]
1
2020-11-17T03:25:10.000Z
2020-11-17T03:25:10.000Z
# See LICENSE file for full copyright and licensing details. { 'name': 'HOSTEL', 'version': "12.0.1.0.0", 'author': 'Serpent Consulting Services Pvt. Ltd.', 'category': 'School Management', 'website': 'http://www.serpentcs.com', 'license': "AGPL-3", 'complexity': 'easy', 'summary': 'Mod...
34.384615
60
0.60179
# See LICENSE file for full copyright and licensing details. { 'name': 'HOSTEL', 'version': "12.0.1.0.0", 'author': 'Serpent Consulting Services Pvt. Ltd.', 'category': 'School Management', 'website': 'http://www.serpentcs.com', 'license': "AGPL-3", 'complexity': 'easy', 'summary': 'Mod...
0
0
0
0
0
0
0
0
0
92ece0b257961ce2bea58b032b8b4c9ad1d6f3e1
13,408
py
Python
library/pyjamas/ui/Tree.py
allbuttonspressed/pyjs
c726fdead530eb63ee4763ae15daaa58d84cd58f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
library/pyjamas/ui/Tree.py
allbuttonspressed/pyjs
c726fdead530eb63ee4763ae15daaa58d84cd58f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
library/pyjamas/ui/Tree.py
allbuttonspressed/pyjs
c726fdead530eb63ee4763ae15daaa58d84cd58f
[ "ECL-2.0", "Apache-2.0" ]
1
2019-11-18T14:17:59.000Z
2019-11-18T14:17:59.000Z
# Copyright 2006 James Tauber and contributors # Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net> # Copyright (C) 2012 Robert Peters <robertpeters@winterlionsoftware.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License....
34.467866
80
0.617989
# Copyright 2006 James Tauber and contributors # Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net> # Copyright (C) 2012 Robert Peters <robertpeters@winterlionsoftware.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License....
0
0
0
12,213
0
0
0
112
266
cc1950fc7ebe7ab49e999184aa88bf4109696d17
481
py
Python
python/starcoder42/constants.py
StarkillerX42/starcoder42
86fbd1a4ea90c75b5d2429ac5d1caf4b0d8dbef2
[ "BSD-3-Clause" ]
null
null
null
python/starcoder42/constants.py
StarkillerX42/starcoder42
86fbd1a4ea90c75b5d2429ac5d1caf4b0d8dbef2
[ "BSD-3-Clause" ]
null
null
null
python/starcoder42/constants.py
StarkillerX42/starcoder42
86fbd1a4ea90c75b5d2429ac5d1caf4b0d8dbef2
[ "BSD-3-Clause" ]
null
null
null
"""Constants. Most are physical, except for alphabet""" import numpy as np G = 6.674e-11 # N*m^2/kg^2 h = 6.6261e-34 # J*s epsilon_0 = 8.854e-12 # F/m mu_0 = 1.257e-6 # H/m c = 2.99792e8 # m/s sigma = 5.6704e-8 # W/m^2/K^4 hbar = 1.05457e-34 # J*s k = 8.98755e9 # Nm^2/C^2 tau = 2 * np.pi kb = 1.380648e-23 alp...
25.315789
80
0.594595
"""Constants. Most are physical, except for alphabet""" import numpy as np G = 6.674e-11 # N*m^2/kg^2 h = 6.6261e-34 # J*s epsilon_0 = 8.854e-12 # F/m mu_0 = 1.257e-6 # H/m c = 2.99792e8 # m/s sigma = 5.6704e-8 # W/m^2/K^4 hbar = 1.05457e-34 # J*s k = 8.98755e9 # Nm^2/C^2 tau = 2 * np.pi kb = 1.380648e-23 alp...
0
0
0
0
0
0
0
0
0
3f9fd8515109bdb9f39bcd12262ce2d06aada9f9
463
py
Python
challenge1/main.py
jpedrorl/Robotics-AI
d85cfac8b3858e6381bc4f683b00a95925a883ed
[ "MIT" ]
null
null
null
challenge1/main.py
jpedrorl/Robotics-AI
d85cfac8b3858e6381bc4f683b00a95925a883ed
[ "MIT" ]
null
null
null
challenge1/main.py
jpedrorl/Robotics-AI
d85cfac8b3858e6381bc4f683b00a95925a883ed
[ "MIT" ]
null
null
null
if __name__ == "__main__": main()
18.52
39
0.637149
from robot import robot from robotAI import robotAI from simulator import * from harry_plotter import harry_plotter def main(): sim = simulator("127.0.0.1", 25000) sim.connect() p3dx = robot(sim, "Pioneer_p3dx") p3dxAI = robotAI(p3dx) h = harry_plotter(p3dx, p3dxAI) while True: p3dx....
0
0
0
0
0
285
0
28
111
632da7d1da1f786ff40d21105c17ea7d2195c40e
431
py
Python
homework/admin.py
huhuhu90019001/mygit
83218aa260491963515e83787d447b516cf0a8e3
[ "Apache-2.0" ]
null
null
null
homework/admin.py
huhuhu90019001/mygit
83218aa260491963515e83787d447b516cf0a8e3
[ "Apache-2.0" ]
null
null
null
homework/admin.py
huhuhu90019001/mygit
83218aa260491963515e83787d447b516cf0a8e3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # import from apps here # import from lib # =============================================================================== from django.contrib import admin from homework.models import CapacityData2 admin.site.register(CapacityData2) # admin.site.register(TaskResult) # admin.site.register(Ta...
26.9375
81
0.473318
# -*- coding: utf-8 -*- # import from apps here # import from lib # =============================================================================== from django.contrib import admin from homework.models import TaskLog, TaskResult, CapacityData2 admin.site.register(CapacityData2) # admin.site.register(TaskResult) # a...
0
0
0
0
0
0
0
21
0
fb906dfd4feb7bd224dfd2e920199d2dfdd73ee1
250
py
Python
agilicus/v1/proxyintovpngenerator/rbac.py
elimaneg/kustomize-plugins
21ebdbc6cde5e80d956bc32bbd2ac9c4c75a2441
[ "Apache-2.0" ]
58
2019-08-16T16:26:03.000Z
2022-01-13T20:57:13.000Z
agilicus/v1/proxyintovpngenerator/rbac.py
alimeerutech/kustomize-plugins
21ebdbc6cde5e80d956bc32bbd2ac9c4c75a2441
[ "Apache-2.0" ]
2
2019-10-07T09:39:45.000Z
2019-10-11T07:39:33.000Z
agilicus/v1/proxyintovpngenerator/rbac.py
alimeerutech/kustomize-plugins
21ebdbc6cde5e80d956bc32bbd2ac9c4c75a2441
[ "Apache-2.0" ]
14
2019-08-12T16:56:53.000Z
2022-01-13T20:55:09.000Z
rbac = """ --- apiVersion: agilicus.com/v1 kind: RbacRole metadata: name: {cfg[name]}-{cfg[downstream_base_host]}-whitelist spec: name: '*' rules: - host: {cfg[downstream_base_host]}.__ROOT_DOMAIN__ path: "^/.*" method: "*" """
17.857143
57
0.62
rbac = """ --- apiVersion: agilicus.com/v1 kind: RbacRole metadata: name: {cfg[name]}-{cfg[downstream_base_host]}-whitelist spec: name: '*' rules: - host: {cfg[downstream_base_host]}.__ROOT_DOMAIN__ path: "^/.*" method: "*" """
0
0
0
0
0
0
0
0
0
e69e17f99e4f65e98482e4de4bbedf3e9fa589d8
2,174
py
Python
DQM/SiOuterTracker/python/OuterTrackerMonitorTTCluster_cfi.py
gputtley/cmssw
c1ef8454804e4ebea8b65f59c4a952a6c94fde3b
[ "Apache-2.0" ]
3
2018-08-24T19:10:26.000Z
2019-02-19T11:45:32.000Z
DQM/SiOuterTracker/python/OuterTrackerMonitorTTCluster_cfi.py
gputtley/cmssw
c1ef8454804e4ebea8b65f59c4a952a6c94fde3b
[ "Apache-2.0" ]
26
2018-10-30T12:47:58.000Z
2022-03-29T08:39:00.000Z
DQM/SiOuterTracker/python/OuterTrackerMonitorTTCluster_cfi.py
p2l1pfp/cmssw
9bda22bf33ecf18dd19a3af2b3a8cbdb1de556a9
[ "Apache-2.0" ]
5
2018-08-21T16:37:52.000Z
2020-01-09T13:33:17.000Z
import FWCore.ParameterSet.Config as cms import math from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer OuterTrackerMonitorTTCluster = DQMEDAnalyzer('OuterTrackerMonitorTTCluster', TopFolderName = cms.string('SiOuterTracker'), TTClusters = cms.InputTag("TTClustersFromPhase2TrackerDigis", "ClusterIncl...
26.512195
89
0.582337
import FWCore.ParameterSet.Config as cms import math from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer OuterTrackerMonitorTTCluster = DQMEDAnalyzer('OuterTrackerMonitorTTCluster', TopFolderName = cms.string('SiOuterTracker'), TTClusters = cms.InputTag("TTClustersFromPhase2TrackerDigis", "ClusterIncl...
0
0
0
0
0
0
0
0
0
582d3a5e3fba6a69605288bbc14c550719482222
35
py
Python
homeassistant/components/osramlightify/__init__.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/osramlightify/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
homeassistant/components/osramlightify/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""The osramlightify component."""
17.5
34
0.714286
"""The osramlightify component."""
0
0
0
0
0
0
0
0
0
f87f9afd6bdf01bebde175027537e08557b4cce9
2,009
py
Python
worker/ansible_worker.py
thomasmckay/quay-config-worker
51420bbb5c12fb606760e2784cc5ecd7f57bfa95
[ "Apache-2.0" ]
null
null
null
worker/ansible_worker.py
thomasmckay/quay-config-worker
51420bbb5c12fb606760e2784cc5ecd7f57bfa95
[ "Apache-2.0" ]
12
2019-12-26T17:34:54.000Z
2022-03-21T22:18:05.000Z
worker/ansible_worker.py
thomasmckay/quay-config-worker
51420bbb5c12fb606760e2784cc5ecd7f57bfa95
[ "Apache-2.0" ]
null
null
null
import logging import logging.config import app as app # from workers.ansible_worker.ansible_server import AnsibleServer logger = logging.getLogger(__name__) DEFAULT_WEBSOCKET_PORT = 8788 DEFAULT_CONTROLLER_PORT = 8688 if __name__ == "__main__": logging_config = { "version": 1, "disable_existi...
28.295775
88
0.627178
import logging import logging.config import os import socket from trollius import SSLContext import app as app from worker import ansible_queue # from workers.ansible_worker.ansible_server import AnsibleServer from ansible_server import AnsibleServer from util.log import logfile_path from raven.handlers.logging impo...
0
0
0
0
0
862
0
74
201
a04bd6b244144c17d1f846902f28ff065433d66f
10,606
py
Python
example.py
vaneseltine/pymatch
4ab156415a42a9d5c720246cee9d0f781ae7e405
[ "MIT" ]
null
null
null
example.py
vaneseltine/pymatch
4ab156415a42a9d5c720246cee9d0f781ae7e405
[ "MIT" ]
null
null
null
example.py
vaneseltine/pymatch
4ab156415a42a9d5c720246cee9d0f781ae7e405
[ "MIT" ]
null
null
null
# # Example # # The following example demonstrates how to the use the `pymatch` package to match [Lending Club Loan Data](https://www.kaggle.com/wendykan/lending-club-loan-data). Follow the link to download the dataset from Kaggle (you'll have to create an account, it's fast and free!). # # Here we match Lending Club ...
57.021505
739
0.755799
# # Example # # The following example demonstrates how to the use the `pymatch` package to match [Lending Club Loan Data](https://www.kaggle.com/wendykan/lending-club-loan-data). Follow the link to download the dataset from Kaggle (you'll have to create an account, it's fast and free!). # # Here we match Lending Club ...
0
0
0
0
0
0
0
0
0
60d34f2cf4355a58455bb59f1971c00ab9270d80
4,491
py
Python
distillation/train_student.py
terrifyzhao/nlp_tutorial
5212cdc27bfbce71a679ef7edaa62c02b1e53dfb
[ "Apache-2.0" ]
1
2022-03-23T17:19:31.000Z
2022-03-23T17:19:31.000Z
distillation/train_student.py
terrifyzhao/nlp_tutorial
5212cdc27bfbce71a679ef7edaa62c02b1e53dfb
[ "Apache-2.0" ]
null
null
null
distillation/train_student.py
terrifyzhao/nlp_tutorial
5212cdc27bfbce71a679ef7edaa62c02b1e53dfb
[ "Apache-2.0" ]
null
null
null
import torch from transformers import BertTokenizer path = 'E:\\ptm\\roberta' device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu') tokenizer = BertTokenizer.from_pretrained(path) # if __name__ == '__main__': train()
32.309353
86
0.569361
from torch import nn from sklearn.metrics import accuracy_score import pandas as pd from torch.utils.data import DataLoader, Dataset from tqdm import tqdm from utils import fix_seed import torch from transformers import BertTokenizer from torch import softmax path = 'E:\\ptm\\roberta' device = torch.device('cuda') if ...
99
0
0
1,199
0
2,700
0
54
245
e1412a7c059f48396130496d2288588849f1ded9
890
py
Python
comparesort/sorting/selectionsort.py
kyordhel/comparesort
bffa9bc96d80470eca2a25b88f055c1c2c70c2ed
[ "MIT" ]
null
null
null
comparesort/sorting/selectionsort.py
kyordhel/comparesort
bffa9bc96d80470eca2a25b88f055c1c2c70c2ed
[ "MIT" ]
null
null
null
comparesort/sorting/selectionsort.py
kyordhel/comparesort
bffa9bc96d80470eca2a25b88f055c1c2c70c2ed
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ## ############################################################### # selectionsort.py # # Author: Mauricio Matamoros # License: MIT # # ## ############################################################### from comparesort.array import Array def selectionsort(array): """...
27.8125
73
0.596629
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ## ############################################################### # selectionsort.py # # Author: Mauricio Matamoros # License: MIT # # ## ############################################################### from comparesort.array import Array def selectionsort(array): """...
0
0
0
0
0
0
0
0
0
4e1f47ab96e0d5604bd98c5106fc87234ce2cdb7
456
py
Python
hack_db.py
daveaseeman/PyHack
239685c87d24cce0725a6f42c6a76bfa0b94a5b2
[ "MIT" ]
null
null
null
hack_db.py
daveaseeman/PyHack
239685c87d24cce0725a6f42c6a76bfa0b94a5b2
[ "MIT" ]
null
null
null
hack_db.py
daveaseeman/PyHack
239685c87d24cce0725a6f42c6a76bfa0b94a5b2
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import sqlite3 db = "./students.db" conn = sqlite3.connect(db) c = conn.cursor() print("Without Hack: \n") c.execute("SELECT * from students WHERE Name='Robert'") result = c.fetchall() print(result) print("With Hack: \n") Name = "Robert'; DROP TABLE students;--" print("SELECT * from students WHER...
20.727273
64
0.684211
#!/usr/bin/python3 import sqlite3 db = "./students.db" conn = sqlite3.connect(db) c = conn.cursor() print("Without Hack: \n") c.execute("SELECT * from students WHERE Name='Robert'") result = c.fetchall() print(result) print("With Hack: \n") Name = "Robert'; DROP TABLE students;--" print("SELECT * from students WHER...
0
0
0
0
0
0
0
0
0
56090acf51b45e664d5e658e5b567793f83f970e
5,813
py
Python
tests/test_main.py
The-Ice-Breakers/two-truths-and-cl-i
bce68a3e4e78305ea37fbcf9f80f9eadbec8b396
[ "MIT" ]
null
null
null
tests/test_main.py
The-Ice-Breakers/two-truths-and-cl-i
bce68a3e4e78305ea37fbcf9f80f9eadbec8b396
[ "MIT" ]
null
null
null
tests/test_main.py
The-Ice-Breakers/two-truths-and-cl-i
bce68a3e4e78305ea37fbcf9f80f9eadbec8b396
[ "MIT" ]
null
null
null
from Game.server_functions import Parser, RoundManager from fastapi import FastAPI app = FastAPI() input_parser = Parser() round_manager = RoundManager(1) # app.mount("/static", StaticFiles(directory="static"), name="static") cache = [] current_check = None statement_order = [] manager = ConnectionManager() scores...
33.601156
102
0.59453
from typing import Counter, List from Game.server_functions import Parser, RoundManager import random from fastapi import FastAPI, WebSocket, WebSocketDisconnect from fastapi.responses import HTMLResponse from fastapi.staticfiles import StaticFiles import asyncio import re app = FastAPI() input_parser = Parser() round...
0
709
0
475
0
3,780
0
59
316
2c52e41b928f577557908dcb035f2bea35861221
5,286
py
Python
gada/main.py
gadalang/gada
2dd4f4dfd5b7390c06307040cad23203a015f7a4
[ "MIT" ]
null
null
null
gada/main.py
gadalang/gada
2dd4f4dfd5b7390c06307040cad23203a015f7a4
[ "MIT" ]
null
null
null
gada/main.py
gadalang/gada
2dd4f4dfd5b7390c06307040cad23203a015f7a4
[ "MIT" ]
1
2021-06-15T13:52:33.000Z
2021-06-15T13:52:33.000Z
from __future__ import annotations __all__ = ["run", "main"] import sys import argparse from typing import Optional from gada import component, runners, datadir def split_unknown_args(argv: list[str]) -> tuple[list[str], list[str]]: """Separate known command-line arguments from unknown one. Unknown arguments...
30.034091
90
0.541241
from __future__ import annotations __all__ = ["run", "main"] import os import sys import io import argparse from typing import Optional from gada import component, runners, datadir def split_unknown_args(argv: list[str]) -> tuple[list[str], list[str]]: """Separate known command-line arguments from unknown one. ...
0
0
0
0
0
0
0
-24
44
92f848d22704f53d8d74cd46ac6164b17d84d7a2
8,816
py
Python
skimage/measure/find_contours.py
Teva/scikits.image
12669d62e699313ca0f73de1b211bf438f4efb0c
[ "BSD-3-Clause" ]
3
2015-11-12T06:34:49.000Z
2017-09-22T07:47:50.000Z
skimage/measure/find_contours.py
Teva/scikits.image
12669d62e699313ca0f73de1b211bf438f4efb0c
[ "BSD-3-Clause" ]
null
null
null
skimage/measure/find_contours.py
Teva/scikits.image
12669d62e699313ca0f73de1b211bf438f4efb0c
[ "BSD-3-Clause" ]
8
2015-03-02T20:36:55.000Z
2021-02-18T10:37:00.000Z
import numpy as np from . import _find_contours _param_options = ('high', 'low') def find_contours(array, level, fully_connected='low', positive_orientation='low'): """Find iso-valued contours in a 2D array for a given level value. Uses the "marching squares" method to compute a the iso-val...
45.210256
80
0.639065
import numpy as np from . import _find_contours from collections import deque _param_options = ('high', 'low') def find_contours(array, level, fully_connected='low', positive_orientation='low'): """Find iso-valued contours in a 2D array for a given level value. Uses the "marching squares" ...
0
0
0
0
139
3,388
0
8
69
963ce5029c8212fe92e0fa2c5a8b67afffd7b9ca
2,012
py
Python
zygoat/components/base.py
kborer/zygoat
638bbdb2bc8b39510c03c77d968e94aadf5ae51b
[ "MIT" ]
null
null
null
zygoat/components/base.py
kborer/zygoat
638bbdb2bc8b39510c03c77d968e94aadf5ae51b
[ "MIT" ]
1
2020-02-25T13:06:02.000Z
2020-02-25T13:06:02.000Z
zygoat/components/base.py
kborer/zygoat
638bbdb2bc8b39510c03c77d968e94aadf5ae51b
[ "MIT" ]
null
null
null
import logging log = logging.getLogger()
26.473684
88
0.601392
import logging from zygoat.utils.files import repository_root from zygoat.config import Config log = logging.getLogger() class Component: def __init__(self, parent=None, sub_components=[]): self.config = Config() self.parent = parent self.sub_components = [] for component in su...
0
769
0
1,096
0
0
0
36
68
23da9f92017a0bb69c9244209fde061605b4441a
394
py
Python
winter/data/pagination/page.py
DmitryKhursevich/winter
9f3bf462f963059bab1f1bbb309ca57f8a43b46f
[ "MIT" ]
9
2019-01-24T11:50:19.000Z
2019-07-05T07:58:46.000Z
winter/data/pagination/page.py
mikhaillazko/winter
cd4f11aaf28d500aabb59cec369817bfdb5c2fc1
[ "MIT" ]
100
2019-01-29T08:11:38.000Z
2020-04-03T12:00:42.000Z
winter/data/pagination/page.py
mikhaillazko/winter
cd4f11aaf28d500aabb59cec369817bfdb5c2fc1
[ "MIT" ]
8
2020-07-16T13:56:50.000Z
2021-12-27T03:33:23.000Z
from typing import TypeVar T = TypeVar('T')
18.761905
39
0.743655
from typing import Generic from typing import Iterable from typing import Iterator from typing import TypeVar import dataclasses from .page_position import PagePosition T = TypeVar('T') @dataclasses.dataclass(frozen=True) class Page(Generic[T]): total_count: int items: Iterable[T] position: PagePositio...
0
181
0
0
0
0
0
32
135
86af98dc14416c568a27f7290fe556de05e4f04c
3,914
py
Python
chibi_dl/site/tmofans/serie.py
dem4ply/chibi_dl
c6783315460580e784b7ff7479c668e1097ae293
[ "WTFPL" ]
1
2020-01-30T03:59:08.000Z
2020-01-30T03:59:08.000Z
chibi_dl/site/tmofans/serie.py
dem4ply/chibi_dl
c6783315460580e784b7ff7479c668e1097ae293
[ "WTFPL" ]
null
null
null
chibi_dl/site/tmofans/serie.py
dem4ply/chibi_dl
c6783315460580e784b7ff7479c668e1097ae293
[ "WTFPL" ]
null
null
null
import logging logger = logging.getLogger( "chibi_dl.sites.tmo_fans.serie" )
34.333333
79
0.52836
import itertools import logging from bs4 import BeautifulSoup from chibi.file.temp import Chibi_temp_path from .episode import Episode from chibi_dl.site.base.site import Site logger = logging.getLogger( "chibi_dl.sites.tmo_fans.serie" ) class Serie( Site ): def __init__( self, url, *args, **kw ): sup...
0
300
0
3,348
0
0
0
51
135
1226810da4c831a5bac14ecf6984cc89d0fa5278
5,802
py
Python
anneal.py
wasyro/sim_ann
4625b6f976a8291803f9352a8d1e105b68290ed7
[ "Apache-2.0" ]
null
null
null
anneal.py
wasyro/sim_ann
4625b6f976a8291803f9352a8d1e105b68290ed7
[ "Apache-2.0" ]
null
null
null
anneal.py
wasyro/sim_ann
4625b6f976a8291803f9352a8d1e105b68290ed7
[ "Apache-2.0" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np if __name__ == '__main__': # this random seed provides better result np.random.seed(1000384) X, Y = input_coordinates("prefs.out") #init_path = greedy_tsp(X, Y) init_path = random_path(X, Y) plt.title('Annealing result') plt.xlabel('steps')...
29.602041
78
0.597208
import matplotlib.pyplot as plt import numpy as np import math import time import sys def input_coordinates(filename, showmap=False): with open(filename, 'r') as fin: X = [] Y = [] while True: line = fin.readline() if not line: break x, y ...
0
0
0
0
0
4,691
0
-31
273
0a31f5d0bd217335349fea27c82f94f7063c01fe
2,862
py
Python
test/1.1.0/07/CodemetaObjectTest07.py
monperrus/cff-converter-python
b7b789a80415c6020e864782b601f21188a149f4
[ "Apache-2.0" ]
null
null
null
test/1.1.0/07/CodemetaObjectTest07.py
monperrus/cff-converter-python
b7b789a80415c6020e864782b601f21188a149f4
[ "Apache-2.0" ]
null
null
null
test/1.1.0/07/CodemetaObjectTest07.py
monperrus/cff-converter-python
b7b789a80415c6020e864782b601f21188a149f4
[ "Apache-2.0" ]
null
null
null
import ruamel.yaml as yaml
32.522727
113
0.59399
from cffconvert import CodemetaObject import unittest import os import ruamel.yaml as yaml class CodemetaObjectTest(unittest.TestCase): def setUp(self): fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff") with open(fixture, "r") as f: cffstr = f.read() cff_ob...
0
0
0
2,746
0
0
0
-2
89
a9c4a0973a7435a9f958b03019953b0fa25e3984
12,130
py
Python
verily/bigquery_wrapper/bq_test.py
deflaux/analysis-py-utils
7dd9b6c466b5f9794ef2e07cdaba5f88c1dd783a
[ "Apache-2.0" ]
null
null
null
verily/bigquery_wrapper/bq_test.py
deflaux/analysis-py-utils
7dd9b6c466b5f9794ef2e07cdaba5f88c1dd783a
[ "Apache-2.0" ]
null
null
null
verily/bigquery_wrapper/bq_test.py
deflaux/analysis-py-utils
7dd9b6c466b5f9794ef2e07cdaba5f88c1dd783a
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Verily Life Sciences Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
46.833977
118
0.5831
# Copyright 2019 Verily Life Sciences Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
0
10,953
0
0
0
0
0
75
223
0a41e89767da26e96eae696cb0f95c84301f0025
590
py
Python
tests/test_problemak.py
ssebastianj/tap-2016
5935008a15fb2ff969e0ee8b865ffec1b751c5cc
[ "MIT" ]
null
null
null
tests/test_problemak.py
ssebastianj/tap-2016
5935008a15fb2ff969e0ee8b865ffec1b751c5cc
[ "MIT" ]
null
null
null
tests/test_problemak.py
ssebastianj/tap-2016
5935008a15fb2ff969e0ee8b865ffec1b751c5cc
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import
20.344828
51
0.359322
# -*- coding: utf-8 -*- from __future__ import absolute_import from tap.problemak.solucion import diferencia_hojas class TestProblemaK: def test_diferencia_de_hojas(self): assert diferencia_hojas( [ (2, 1, 2), (5, 3), (1, 2) ] ...
0
0
0
449
0
0
0
30
46
02ae8a3b9b43f4b5a5d42d4528981a49dd184336
2,570
py
Python
cwmud/core/npcs.py
whutch/cwmud
bee8b126a5e70edd0593dae9753a6be8d52357cf
[ "MIT" ]
11
2016-03-03T03:56:59.000Z
2021-11-19T15:38:51.000Z
cwmud/core/npcs.py
whutch/atria
bee8b126a5e70edd0593dae9753a6be8d52357cf
[ "MIT" ]
26
2016-08-31T23:19:45.000Z
2019-10-19T21:50:33.000Z
cwmud/core/npcs.py
whutch/atria
bee8b126a5e70edd0593dae9753a6be8d52357cf
[ "MIT" ]
2
2016-01-22T21:22:34.000Z
2016-02-09T06:03:57.000Z
# -*- coding: utf-8 -*- """Non-player characters.""" # Part of Clockwork MUD Server (https://github.com/whutch/cwmud) # :copyright: (c) 2008 - 2017 Will Hutcheson # :license: MIT (https://github.com/whutch/cwmud/blob/master/LICENSE.txt) from .logs import get_logger log = get_logger("npcs")
25.7
78
0.620233
# -*- coding: utf-8 -*- """Non-player characters.""" # Part of Clockwork MUD Server (https://github.com/whutch/cwmud) # :copyright: (c) 2008 - 2017 Will Hutcheson # :license: MIT (https://github.com/whutch/cwmud/blob/master/LICENSE.txt) import re from .attributes import Attribute from .characters import Character fro...
0
2,045
0
0
0
0
0
24
204
da6cd497442bea5e8dbae26bf46ce1e1392dc9c7
1,012
py
Python
azure_functions_devops_build/project/models/project_details.py
coolgeeck/delwar1
5d3b2b5dc4933974ff26b0f0a869061129259046
[ "MIT" ]
16
2019-02-17T22:01:32.000Z
2022-03-31T22:59:46.000Z
azure_functions_devops_build/project/models/project_details.py
coolgeeck/delwar1
5d3b2b5dc4933974ff26b0f0a869061129259046
[ "MIT" ]
19
2019-02-11T23:31:51.000Z
2021-06-01T23:20:35.000Z
azure_functions_devops_build/project/models/project_details.py
coolgeeck/delwar1
5d3b2b5dc4933974ff26b0f0a869061129259046
[ "MIT" ]
21
2019-01-28T21:01:12.000Z
2022-03-07T16:18:29.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
42.166667
97
0.472332
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
0
0
0
605
0
0
0
17
46
04094d8aeffd7b0ad0db38a06de1250440ba1f2e
230
py
Python
occiput_suite/occiput/DataSources/FileSources/Physiology.py
mscipio/occiput-suite
9b7dc59ad615d46d811eab965a86ec9efe292a7d
[ "BSD-2-Clause" ]
7
2018-02-22T13:50:21.000Z
2020-11-16T01:28:22.000Z
occiput_suite/occiput/DataSources/FileSources/Physiology.py
mscipio/occiput-suite
9b7dc59ad615d46d811eab965a86ec9efe292a7d
[ "BSD-2-Clause" ]
null
null
null
occiput_suite/occiput/DataSources/FileSources/Physiology.py
mscipio/occiput-suite
9b7dc59ad615d46d811eab965a86ec9efe292a7d
[ "BSD-2-Clause" ]
2
2018-02-22T13:50:31.000Z
2020-01-14T02:17:32.000Z
try: from Occiput_Interface_Biograph_mMR import Biograph_mMR_Physiology except: Biograph_mMR_Physiology = None try: from Occiput_Interface_Brain_PET import Brain_PET_Physiology except: Brain_PET_Physiology = None
23
70
0.821739
try: from Occiput_Interface_Biograph_mMR import Biograph_mMR_Physiology except: Biograph_mMR_Physiology = None try: from Occiput_Interface_Brain_PET import Brain_PET_Physiology except: Brain_PET_Physiology = None
0
0
0
0
0
0
0
0
0
8cc6b8b30a356a95641ebec0cd7e522b05d652b8
1,042
py
Python
Arduino_Serial_Python_Feb_18.py
ryan710/greenhouse
d666e4390c474376435f786630a6dc0be5f093aa
[ "MIT" ]
null
null
null
Arduino_Serial_Python_Feb_18.py
ryan710/greenhouse
d666e4390c474376435f786630a6dc0be5f093aa
[ "MIT" ]
null
null
null
Arduino_Serial_Python_Feb_18.py
ryan710/greenhouse
d666e4390c474376435f786630a6dc0be5f093aa
[ "MIT" ]
null
null
null
#sep8a: RH 65 #sep8b: rh65 #sep15: temp22 import serial from datetime import datetime import datetime import time import sys start = time.time() runtime = 310 serial_port = 'com3' baud_rate = 9600 print(datetime.datetime.now()) ser = serial.Serial(serial_port, baud_rate) with open(r"C:\\feb18.cs...
22.170213
72
0.497121
#sep8a: RH 65 #sep8b: rh65 #sep15: temp22 import serial from datetime import datetime import datetime import time import csv import sys start = time.time() runtime = 310 serial_port = 'com3' baud_rate = 9600 print(datetime.datetime.now()) ser = serial.Serial(serial_port, baud_rate) with open(r"...
0
0
0
0
0
0
0
-11
23
8fda6092e75da4682424deb67075461487245c21
2,812
py
Python
TAO/Firewall/EXPLOITS/ELCO/fosho/requests/packages/urllib3/_collections.py
dendisuhubdy/grokmachine
120a21a25c2730ed356739231ec8b99fc0575c8b
[ "BSD-3-Clause" ]
46
2017-05-15T11:15:08.000Z
2018-07-02T03:32:52.000Z
TAO/Firewall/EXPLOITS/ELCO/fosho/requests/packages/urllib3/_collections.py
dendisuhubdy/grokmachine
120a21a25c2730ed356739231ec8b99fc0575c8b
[ "BSD-3-Clause" ]
null
null
null
TAO/Firewall/EXPLOITS/ELCO/fosho/requests/packages/urllib3/_collections.py
dendisuhubdy/grokmachine
120a21a25c2730ed356739231ec8b99fc0575c8b
[ "BSD-3-Clause" ]
24
2017-05-17T03:26:17.000Z
2018-07-09T07:00:50.000Z
# urllib3/_collections.py ## ## ## ## __all__ = ['RecentlyUsedContainer']
18.25974
73
0.556188
# urllib3/_collections.py ## ## ## ## from collections import deque from threading import RLock __all__ = ['RecentlyUsedContainer'] class AccessEntry(object): __slots__ = ('key', 'is_valid') def __init__(self, key, is_valid=True): self.key = key self.is_valid = is_valid class Recentl...
0
0
0
2,625
0
0
0
14
92
23c68a978523a7109e15a68ac384090d96344164
953
py
Python
source-code/pyspark/pyspark-job.py
bcthis2020/ci-cd-for-data-processing-workflow
67f7963b9b4b36fc7994399f1ef3abd6bf840bc0
[ "Apache-2.0" ]
null
null
null
source-code/pyspark/pyspark-job.py
bcthis2020/ci-cd-for-data-processing-workflow
67f7963b9b4b36fc7994399f1ef3abd6bf840bc0
[ "Apache-2.0" ]
null
null
null
source-code/pyspark/pyspark-job.py
bcthis2020/ci-cd-for-data-processing-workflow
67f7963b9b4b36fc7994399f1ef3abd6bf840bc0
[ "Apache-2.0" ]
1
2020-04-09T12:34:18.000Z
2020-04-09T12:34:18.000Z
from pyspark.sql import SparkSession, SQLContext from pyspark.context import SparkContext sc = SparkContext("local", "count app") SQLContext = SQLContext(sc) spark = SparkSession.builder. \ master('local'). \ appName('foo'). \ getOrCreate() spark.sparkContext.setLogLevel('WARN') #Reading source and ...
24.435897
90
0.751312
from pyspark.sql import SparkSession,SQLContext from pyspark.sql.types import * from pyspark import SparkConf from pyspark.context import SparkContext from pyspark.sql.functions import asc from pyspark.sql.functions import col from functools import reduce # For Python 3.x from pyspark.sql import DataFrame from pyspark...
0
0
0
0
0
0
0
117
216
3a7d623eca8e2e236331fab0e8e73fadcca01cf6
6,663
py
Python
algorithm/main.py
kubkon/efsm
3d516ba6f1782eb20d5c82987697fa08264ada89
[ "MIT" ]
null
null
null
algorithm/main.py
kubkon/efsm
3d516ba6f1782eb20d5c82987697fa08264ada89
[ "MIT" ]
null
null
null
algorithm/main.py
kubkon/efsm
3d516ba6f1782eb20d5c82987697fa08264ada89
[ "MIT" ]
null
null
null
try: import algorithm.internal as internal except ImportError: raise EFSMCompilationError()
37.857955
100
0.531292
import os import sys import numpy as np from algorithm.errors import * try: import algorithm.internal as internal from algorithm.dists import * except ImportError: raise EFSMCompilationError() class Params: def __init__(self, loc, scale, a, b, dist): self.loc = loc self.scale = scale ...
0
0
0
6,402
0
0
0
-9
160
6093e3a4f1e9bdcbe6fc8a6446c8188da2d679a7
28,348
py
Python
Agents/platformMonitorAgent.py
ajfar-bem/wisebldg
0cb8ef7c5984cbb5cc86e40780fdf4e14e5bda05
[ "Unlicense" ]
null
null
null
Agents/platformMonitorAgent.py
ajfar-bem/wisebldg
0cb8ef7c5984cbb5cc86e40780fdf4e14e5bda05
[ "Unlicense" ]
null
null
null
Agents/platformMonitorAgent.py
ajfar-bem/wisebldg
0cb8ef7c5984cbb5cc86e40780fdf4e14e5bda05
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- ''' Copyright (c) 2016, Virginia Tech All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of condi...
52.593692
362
0.629674
# -*- coding: utf-8 -*- ''' Copyright (c) 2016, Virginia Tech All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of condi...
3
592
0
21,854
0
51
0
177
312
19751c21401e8e6f705ded45d287aa9baa43d6b9
1,345
py
Python
resources/psychologist_evaluation.py
mindsy/mindsy-microservice-evaluation
22f4314e2da8ac50094bdf7419c38b5a598fc955
[ "MIT" ]
null
null
null
resources/psychologist_evaluation.py
mindsy/mindsy-microservice-evaluation
22f4314e2da8ac50094bdf7419c38b5a598fc955
[ "MIT" ]
null
null
null
resources/psychologist_evaluation.py
mindsy/mindsy-microservice-evaluation
22f4314e2da8ac50094bdf7419c38b5a598fc955
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*-
42.03125
109
0.60223
# -*- coding: utf-8 -*- from flask_restful import Resource from static.imports import * from db import db class PsychologistEvaluationPatient(Resource): def get(self, crp, id_patient): if PsychologistModel.find_by_crp(crp) and PatientModel.find_by_id(id_patient): evaluations = (db.session.q...
0
0
0
1,214
0
0
0
16
90
d720150cbd164eef898d07afbd11a70d2c530d28
1,198
py
Python
test/randomwalk_adv.py
Larook/DRL_LUDO
93e81b45d69de369efd199095bb891aef2c390e7
[ "MIT" ]
null
null
null
test/randomwalk_adv.py
Larook/DRL_LUDO
93e81b45d69de369efd199095bb891aef2c390e7
[ "MIT" ]
null
null
null
test/randomwalk_adv.py
Larook/DRL_LUDO
93e81b45d69de369efd199095bb891aef2c390e7
[ "MIT" ]
null
null
null
import unittest import sys sys.path.append("../") if __name__ == '__main__': unittest.main()
27.227273
83
0.634391
import unittest import sys import numpy as np sys.path.append("../") def randwalk(): import ludopy import numpy as np player_0_won = False games_played = 0 while not player_0_won: g = ludopy.Game() there_is_a_winner = False while not there_is_a_winner: (dice, m...
0
0
0
88
0
946
0
-3
68
eca61ff00365c7746c9c6ace6363f6bbd6adf808
226
py
Python
main/SteppableDemos/ReactionDiffusionSolverFE/ReactionDiffusion_2D_FN/Simulation/ReactionDiffusion_2D_FN.py
JulianoGianlupi/nh-cc3d-4x-base-tool
c0f4aceebd4c5bf3ec39e831ef851e419b161259
[ "CC0-1.0" ]
null
null
null
main/SteppableDemos/ReactionDiffusionSolverFE/ReactionDiffusion_2D_FN/Simulation/ReactionDiffusion_2D_FN.py
JulianoGianlupi/nh-cc3d-4x-base-tool
c0f4aceebd4c5bf3ec39e831ef851e419b161259
[ "CC0-1.0" ]
null
null
null
main/SteppableDemos/ReactionDiffusionSolverFE/ReactionDiffusion_2D_FN/Simulation/ReactionDiffusion_2D_FN.py
JulianoGianlupi/nh-cc3d-4x-base-tool
c0f4aceebd4c5bf3ec39e831ef851e419b161259
[ "CC0-1.0" ]
1
2021-02-26T21:50:29.000Z
2021-02-26T21:50:29.000Z
from cc3d import CompuCellSetup from ReactionDiffusion_2D_FNSteppables import ReactionDiffusion_2D_FNSteppable CompuCellSetup.register_steppable(steppable=ReactionDiffusion_2D_FNSteppable(frequency=1)) CompuCellSetup.run()
28.25
90
0.89823
from cc3d import CompuCellSetup from ReactionDiffusion_2D_FNSteppables import ReactionDiffusion_2D_FNSteppable CompuCellSetup.register_steppable(steppable=ReactionDiffusion_2D_FNSteppable(frequency=1)) CompuCellSetup.run()
0
0
0
0
0
0
0
0
0
57a0dad511edc93e72ed5eae6bb113446a20c2aa
2,451
py
Python
auth/admin_views.py
robcast/iiif-image-auth
0d3ec7bf2b7ff6723d6f7c47f2e3c28de0034d13
[ "MIT" ]
4
2019-09-05T07:33:16.000Z
2021-11-04T07:19:57.000Z
auth/admin_views.py
robcast/iiif-image-auth
0d3ec7bf2b7ff6723d6f7c47f2e3c28de0034d13
[ "MIT" ]
2
2019-07-01T18:54:55.000Z
2019-07-03T11:50:17.000Z
auth/admin_views.py
robcast/iiif-image-auth
0d3ec7bf2b7ff6723d6f7c47f2e3c28de0034d13
[ "MIT" ]
null
null
null
## ## view models ## # Customized User model for SQL-Admin # Customized Role model for SQL-Admin
43
116
0.716034
from flask_admin.contrib import sqla from flask_security import current_user, utils from wtforms.fields import PasswordField ## ## view models ## # Customized User model for SQL-Admin class UserAdmin(sqla.ModelView): # Don't display the password on the list of Users column_exclude_list = ('password',) #...
0
0
0
2,181
0
0
0
59
110
f4f1ec87d2bc34d36b7c8ad5921610f639473c4c
993
py
Python
graph_generator.py
masoodbayati/software-graph-analysis
36e85b99bab276733d3d61ac79103db4a2d05342
[ "MIT" ]
null
null
null
graph_generator.py
masoodbayati/software-graph-analysis
36e85b99bab276733d3d61ac79103db4a2d05342
[ "MIT" ]
null
null
null
graph_generator.py
masoodbayati/software-graph-analysis
36e85b99bab276733d3d61ac79103db4a2d05342
[ "MIT" ]
1
2020-06-14T21:26:59.000Z
2020-06-14T21:26:59.000Z
if __name__ == '__main__': main()
29.205882
72
0.680765
from xml.etree import ElementTree as ET from graph_analyzer import create_graph_from_connection class Connection: def __init__(self,source,target,connection_type): self.source = source self.target = target self.connection_type = connection_type def generate_graph_from_code(xmi_path): ...
0
0
0
155
0
629
0
52
114
dd72fc528c05385b12ffa6fc4a325b5928226a1d
1,592
py
Python
cling/reactor.py
binaryflesh/cling
3b86633c3ebee4b85bcd2a1f77ecb6935181d2b9
[ "BSD-3-Clause" ]
24
2015-11-04T09:29:29.000Z
2018-04-02T06:33:43.000Z
cling/reactor.py
binaryflesh/cling
3b86633c3ebee4b85bcd2a1f77ecb6935181d2b9
[ "BSD-3-Clause" ]
4
2016-01-21T09:28:29.000Z
2018-04-16T10:08:20.000Z
cling/reactor.py
binaryflesh/cling
3b86633c3ebee4b85bcd2a1f77ecb6935181d2b9
[ "BSD-3-Clause" ]
5
2016-05-02T18:20:43.000Z
2018-05-30T15:05:49.000Z
#-*- coding: utf-8 -*- import multiprocessing import logging try: # Python 2.7+ from logging import NullHandler except ImportError: LOG = logging.getLogger(__name__) LOG.addHandler(NullHandler())
25.269841
80
0.573492
#-*- coding: utf-8 -*- import multiprocessing import logging try: # Python 2.7+ from logging import NullHandler except ImportError: class NullHandler(logging.Handler): def emit(self, record): pass LOG = logging.getLogger(__name__) LOG.addHandler(NullHandler()) class Reactor(object): ...
0
0
0
1,340
0
0
0
0
49
e2a21b3592757c610ae1c33c446e63558934f682
8,721
py
Python
task_common/src/task_common/motion_interface/arm.py
FUJISOFT-Robotics/scenario_app
47271fdffc73f11134586c7481b06994fd041e14
[ "BSD-3-Clause" ]
null
null
null
task_common/src/task_common/motion_interface/arm.py
FUJISOFT-Robotics/scenario_app
47271fdffc73f11134586c7481b06994fd041e14
[ "BSD-3-Clause" ]
null
null
null
task_common/src/task_common/motion_interface/arm.py
FUJISOFT-Robotics/scenario_app
47271fdffc73f11134586c7481b06994fd041e14
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # FSRobo-R Package BSDL # --------- # Copyright (C) 2019 FUJISOFT. All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # 1. Redistributions of source code...
40.375
178
0.757253
#!/usr/bin/env python # -*- coding: utf-8 -*- # FSRobo-R Package BSDL # --------- # Copyright (C) 2019 FUJISOFT. All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # 1. Redistributions of source code...
561
0
0
0
0
0
0
0
0
203ffc6adbe8e007bbd740d9e56167680b7bf4a2
3,300
py
Python
test_handlers.py
adamnew123456/lnsd
29192efc9970004d5a63f469efb9eb6259d26c5c
[ "BSD-2-Clause" ]
null
null
null
test_handlers.py
adamnew123456/lnsd
29192efc9970004d5a63f469efb9eb6259d26c5c
[ "BSD-2-Clause" ]
null
null
null
test_handlers.py
adamnew123456/lnsd
29192efc9970004d5a63f469efb9eb6259d26c5c
[ "BSD-2-Clause" ]
null
null
null
""" Ensures that the protocol handlers for the control protocol and the network protocol work as expected. """ import unittest # Change this to some port that is available on your machine, so that the # control protocol handler and the control protocol client can communicate TEST_CONTROL_PORT = 4097 # How long to che...
33.333333
86
0.647879
""" Ensures that the protocol handlers for the control protocol and the network protocol work as expected. """ from collections import defaultdict import socket import threading import traceback import unittest from lns import control_proto, reactor # Change this to some port that is available on your machine, so tha...
0
0
0
2,438
0
0
0
13
157