hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
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
125
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
125
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.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
f9cb681c5df423e1cce8c94a15a9016f3d43227e
95,548
py
Python
tests/conftest.py
karlchillmaid/notifications-admin
9ef6da4ef9e2fa97b7debb4b573cb035a5cb8880
[ "MIT" ]
null
null
null
tests/conftest.py
karlchillmaid/notifications-admin
9ef6da4ef9e2fa97b7debb4b573cb035a5cb8880
[ "MIT" ]
null
null
null
tests/conftest.py
karlchillmaid/notifications-admin
9ef6da4ef9e2fa97b7debb4b573cb035a5cb8880
[ "MIT" ]
null
null
null
import json import os from contextlib import contextmanager from datetime import date, datetime, timedelta from unittest.mock import Mock import pytest from bs4 import BeautifulSoup from flask import Flask, url_for from notifications_python_client.errors import HTTPError from notifications_utils.url_safe_token import ...
31.617472
120
0.616245
import json import os from contextlib import contextmanager from datetime import date, datetime, timedelta from unittest.mock import Mock import pytest from bs4 import BeautifulSoup from flask import Flask, url_for from notifications_python_client.errors import HTTPError from notifications_utils.url_safe_token import ...
82,395
0
4,581
82f17ca4a851990839c8aafe1e3db6dee38b6e5d
1,180
py
Python
som_example.py
xSakix/ml-learnig
d1a6178d77b195a7c179046b24f17df72544dc64
[ "Apache-2.0" ]
null
null
null
som_example.py
xSakix/ml-learnig
d1a6178d77b195a7c179046b24f17df72544dc64
[ "Apache-2.0" ]
null
null
null
som_example.py
xSakix/ml-learnig
d1a6178d77b195a7c179046b24f17df72544dc64
[ "Apache-2.0" ]
null
null
null
# For plotting the images from matplotlib import pyplot as plt import numpy as np from som import SOM #source https://codesachin.wordpress.com/2015/11/28/self-organizing-maps-with-googles-tensorflow/ # Training inputs for RGBcolors colors = np.array( [[0., 0., 0.], [0., 0., 1.], [0., 0., 0.5], [0.1...
25.106383
97
0.562712
# For plotting the images from matplotlib import pyplot as plt import numpy as np from som import SOM #source https://codesachin.wordpress.com/2015/11/28/self-organizing-maps-with-googles-tensorflow/ # Training inputs for RGBcolors colors = np.array( [[0., 0., 0.], [0., 0., 1.], [0., 0., 0.5], [0.1...
0
0
0
804d41c0055d9cb7c66f36ec7aff180058e7601f
4,596
py
Python
sdk/python/pulumi_google_native/firebasehosting/v1beta1/get_site.py
AaronFriel/pulumi-google-native
75d1cda425e33d4610348972cd70bddf35f1770d
[ "Apache-2.0" ]
44
2021-04-18T23:00:48.000Z
2022-02-14T17:43:15.000Z
sdk/python/pulumi_google_native/firebasehosting/v1beta1/get_site.py
AaronFriel/pulumi-google-native
75d1cda425e33d4610348972cd70bddf35f1770d
[ "Apache-2.0" ]
354
2021-04-16T16:48:39.000Z
2022-03-31T17:16:39.000Z
sdk/python/pulumi_google_native/firebasehosting/v1beta1/get_site.py
AaronFriel/pulumi-google-native
75d1cda425e33d4610348972cd70bddf35f1770d
[ "Apache-2.0" ]
8
2021-04-24T17:46:51.000Z
2022-01-05T10:40:21.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __...
37.672131
563
0.654917
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __...
1,147
1,775
71
c6542b626f55d6787e0ad41d353a5844ec55f261
1,683
py
Python
mridc/core/classes/module.py
jerke123/mridc
7e22ac50f8df73f2305d61979da2a5d59874546e
[ "Apache-2.0" ]
null
null
null
mridc/core/classes/module.py
jerke123/mridc
7e22ac50f8df73f2305d61979da2a5d59874546e
[ "Apache-2.0" ]
null
null
null
mridc/core/classes/module.py
jerke123/mridc
7e22ac50f8df73f2305d61979da2a5d59874546e
[ "Apache-2.0" ]
null
null
null
# encoding: utf-8 __author__ = "Dimitrios Karkalousos" # Taken and adapted from: https://github.com/NVIDIA/NeMo/blob/main/nemo/core/classes/module.py from abc import ABC from contextlib import contextmanager from torch.nn import Module __all__ = ["NeuralModule"] from mridc.core.classes.common import FileIO, Seriali...
28.05
114
0.648841
# encoding: utf-8 __author__ = "Dimitrios Karkalousos" # Taken and adapted from: https://github.com/NVIDIA/NeMo/blob/main/nemo/core/classes/module.py from abc import ABC from contextlib import contextmanager from torch.nn import Module __all__ = ["NeuralModule"] from mridc.core.classes.common import FileIO, Seriali...
0
0
0
7d71fd340e7a0630cd67298df5b087e478af6b2c
498
py
Python
apps/index/urls.py
tufbel/wFocus
ee0f02053b8a5bc9c40dd862306fc5df1a063b9d
[ "Apache-2.0" ]
null
null
null
apps/index/urls.py
tufbel/wFocus
ee0f02053b8a5bc9c40dd862306fc5df1a063b9d
[ "Apache-2.0" ]
11
2020-06-06T01:51:51.000Z
2022-02-10T14:31:21.000Z
apps/index/urls.py
tufbel/wFocus
ee0f02053b8a5bc9c40dd862306fc5df1a063b9d
[ "Apache-2.0" ]
null
null
null
# -*- encoding: utf-8 -*- """ @File : urls @Date : 2019/11/15 @Author : Regulus @Contact : yusheng831143@gmail.com @Desc : 所有首页相关url映射。 """ from django.urls import path from apps.index import views app_name = 'app_index' urlpatterns = [ path('', views.index, name='index'), path('home', views.home,...
19.92
57
0.636546
# -*- encoding: utf-8 -*- """ @File : urls @Date : 2019/11/15 @Author : Regulus @Contact : yusheng831143@gmail.com @Desc : 所有首页相关url映射。 """ from django.urls import path from apps.index import views app_name = 'app_index' urlpatterns = [ path('', views.index, name='index'), path('home', views.home,...
0
0
0
a51dc19230ec15b9534a5a1282d2793542deafd9
636
py
Python
pyclesperanto_prototype/_tier10/_touching_labels_to_networkx.py
elsandal/pyclesperanto_prototype
7bda828813b86b44b63d73d5e8f466d9769cded1
[ "BSD-3-Clause" ]
2
2020-07-01T06:20:44.000Z
2020-07-01T09:36:48.000Z
pyclesperanto_prototype/_tier10/_touching_labels_to_networkx.py
elsandal/pyclesperanto_prototype
7bda828813b86b44b63d73d5e8f466d9769cded1
[ "BSD-3-Clause" ]
null
null
null
pyclesperanto_prototype/_tier10/_touching_labels_to_networkx.py
elsandal/pyclesperanto_prototype
7bda828813b86b44b63d73d5e8f466d9769cded1
[ "BSD-3-Clause" ]
1
2020-06-29T18:40:54.000Z
2020-06-29T18:40:54.000Z
import numpy as np from .._tier0 import Image def touching_labels_to_networkx(label_image:Image): """ Takes a label image, determines which labels are touching each other and returns an networkx graph representing labels in range. Parameters ---------- label_image : Image Returns ----...
27.652174
102
0.724843
import numpy as np from .._tier0 import Image def touching_labels_to_networkx(label_image:Image): """ Takes a label image, determines which labels are touching each other and returns an networkx graph representing labels in range. Parameters ---------- label_image : Image Returns ----...
0
0
0
43076ffd359f53fde61c9667e6dc26e3b05882a6
17,111
py
Python
tests/frontend/test_sf_cli.py
Lucaman99/strawberryfields
627b8e6c1049d1108303bf0d9ba53cf6b120ea1f
[ "Apache-2.0" ]
1
2020-07-12T17:54:12.000Z
2020-07-12T17:54:12.000Z
tests/frontend/test_sf_cli.py
Lucaman99/strawberryfields
627b8e6c1049d1108303bf0d9ba53cf6b120ea1f
[ "Apache-2.0" ]
null
null
null
tests/frontend/test_sf_cli.py
Lucaman99/strawberryfields
627b8e6c1049d1108303bf0d9ba53cf6b120ea1f
[ "Apache-2.0" ]
null
null
null
# Copyright 2019-2020 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or...
35.207819
127
0.662381
# Copyright 2019-2020 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or...
658
0
355
4a28c245b9bd8a81f806c4f9337d1113963f2955
1,585
py
Python
src/main/python/irbl/bug2vec.py
NIL-zhuang/IRBL
4f787e2bf065f728f086dfad07d71ef6210dd159
[ "MIT" ]
null
null
null
src/main/python/irbl/bug2vec.py
NIL-zhuang/IRBL
4f787e2bf065f728f086dfad07d71ef6210dd159
[ "MIT" ]
null
null
null
src/main/python/irbl/bug2vec.py
NIL-zhuang/IRBL
4f787e2bf065f728f086dfad07d71ef6210dd159
[ "MIT" ]
null
null
null
""" 更加简洁的WeightDefiner版本 用于实现bug report转vec 2021.4.14 crx """ from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer from file_reader import FileReader from file_writer import JSONWriter from constants import data_pool_path import os if __name__ == '__main__': wd = VectorBuilder('report',...
28.818182
95
0.64858
""" 更加简洁的WeightDefiner版本 用于实现bug report转vec 2021.4.14 crx """ from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer from file_reader import FileReader from file_writer import JSONWriter from constants import data_pool_path import os class VectorBuilder: def __init__(self, report_path, sav...
1,213
-1
157
3c381f961a1389530d19198913cef30d7c53d0d7
4,279
py
Python
LASS-Simulator/codes/cli.py
QuenLo/LASS
e266860c6bebe218a42b81b72cf9a20985fa8e45
[ "MIT" ]
171
2015-06-28T03:17:40.000Z
2021-11-18T07:55:15.000Z
LASS-Simulator/codes/cli.py
QuenLo/LASS
e266860c6bebe218a42b81b72cf9a20985fa8e45
[ "MIT" ]
9
2015-09-29T09:24:54.000Z
2018-12-20T01:02:45.000Z
LASS-Simulator/codes/cli.py
QuenLo/LASS
e266860c6bebe218a42b81b72cf9a20985fa8e45
[ "MIT" ]
107
2015-07-28T03:40:28.000Z
2020-06-01T08:08:32.000Z
# @file cli.py # @brief cli of whole tool # README: Command line interface # MODULE_ARCH: # CLASS_ARCH: # GLOBAL USAGE: #standard import cmd #extend #library import lib.globalclasses as gc from lib.const import * ##### Code section ##### #Spec: local variable maintain, about, user commands, test commands #How/Need...
32.416667
102
0.555971
# @file cli.py # @brief cli of whole tool # README: Command line interface # MODULE_ARCH: # CLASS_ARCH: # GLOBAL USAGE: #standard import cmd #extend #library import lib.globalclasses as gc from lib.const import * ##### Code section ##### #Spec: local variable maintain, about, user commands, test commands #How/Need...
88
0
26
c810a4f51434d8d2d3f95d98e285aebf0aa9e4be
271
py
Python
rds/mysql/list-instances.py
dantso/aws-python
7bb232a052454edf76c53e94230eb53b417ae812
[ "Apache-2.0" ]
null
null
null
rds/mysql/list-instances.py
dantso/aws-python
7bb232a052454edf76c53e94230eb53b417ae812
[ "Apache-2.0" ]
null
null
null
rds/mysql/list-instances.py
dantso/aws-python
7bb232a052454edf76c53e94230eb53b417ae812
[ "Apache-2.0" ]
8
2020-09-04T16:17:09.000Z
2021-01-09T21:32:13.000Z
#!/usr/bin/env python import boto3 rds = boto3.client('rds') try: # get all of the db instances dbs = rds.describe_db_instances() for db in dbs['DBInstances']: print ("{}".format(db['Endpoint']['Address'])) except Exception as error: print (error)
27.1
54
0.649446
#!/usr/bin/env python import boto3 rds = boto3.client('rds') try: # get all of the db instances dbs = rds.describe_db_instances() for db in dbs['DBInstances']: print ("{}".format(db['Endpoint']['Address'])) except Exception as error: print (error)
0
0
0
4550bd2bef450e4cea86289d9afd3a67cb2f287a
125,565
py
Python
COT/vm_description/ovf/ovf.py
morneaup/cot
3d4dc7079a33aa0c09216ec339b44f84ab69ff4b
[ "MIT" ]
81
2015-01-18T22:31:42.000Z
2022-03-14T12:34:33.000Z
COT/vm_description/ovf/ovf.py
morneaup/cot
3d4dc7079a33aa0c09216ec339b44f84ab69ff4b
[ "MIT" ]
67
2015-01-05T15:24:39.000Z
2021-08-16T12:44:58.000Z
COT/vm_description/ovf/ovf.py
morneaup/cot
3d4dc7079a33aa0c09216ec339b44f84ab69ff4b
[ "MIT" ]
20
2015-07-09T14:20:25.000Z
2021-09-18T17:59:57.000Z
#!/usr/bin/env python # # ovf.py - Class for OVF/OVA handling # # August 2013, Glenn F. Matthews # Copyright (c) 2013-2017, 2019 the COT project developers. # See the COPYRIGHT.txt file at the top-level directory of this distribution # and at https://github.com/glennmatthews/cot/blob/master/COPYRIGHT.txt. # # This file...
41.114931
79
0.569641
#!/usr/bin/env python # # ovf.py - Class for OVF/OVA handling # # August 2013, Glenn F. Matthews # Copyright (c) 2013-2017, 2019 the COT project developers. # See the COPYRIGHT.txt file at the top-level directory of this distribution # and at https://github.com/glennmatthews/cot/blob/master/COPYRIGHT.txt. # # This file...
3,268
0
286
19ddeb58583bdf5fbb77f04d29f55f4789918714
9,318
py
Python
alibabacloud/signer/composer.py
wallisyan/alibabacloud-python-sdk-v2
6e024c97cded2403025a7dd8fea8261e41872156
[ "Apache-2.0" ]
21
2018-12-20T07:34:13.000Z
2020-03-05T14:32:08.000Z
alibabacloud/signer/composer.py
wallisyan/alibabacloud-python-sdk-v2
6e024c97cded2403025a7dd8fea8261e41872156
[ "Apache-2.0" ]
22
2018-12-21T13:22:33.000Z
2020-06-29T08:37:09.000Z
alibabacloud/signer/composer.py
wallisyan/alibabacloud-python-sdk-v2
6e024c97cded2403025a7dd8fea8261e41872156
[ "Apache-2.0" ]
12
2018-12-29T05:45:55.000Z
2022-01-05T09:59:30.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
37.272
100
0.649388
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
5,647
2,018
46
2a977d760c22763278aec41457818a2baa2f3046
1,268
py
Python
tcd/__init__.py
TheDrHax/Twitch-Chat-Downloader
2f0ddb8def2d3256782b522f9573b6fb957274eb
[ "MIT" ]
19
2017-10-08T06:29:51.000Z
2022-03-09T15:56:37.000Z
tcd/__init__.py
TheDrHax/Twitch-Chat-Downloader
2f0ddb8def2d3256782b522f9573b6fb957274eb
[ "MIT" ]
6
2017-06-18T19:35:48.000Z
2020-07-26T19:25:00.000Z
tcd/__init__.py
TheDrHax/Twitch-Chat-Downloader
2f0ddb8def2d3256782b522f9573b6fb957274eb
[ "MIT" ]
7
2017-11-06T09:14:07.000Z
2021-09-22T17:40:20.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from .twitch import Messages, Channel from .subtitles import SubtitleWriter from .settings import argparser, settings if __name__ == "__main__": main()
23.481481
63
0.638013
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from .twitch import Messages, Channel from .subtitles import SubtitleWriter from .settings import argparser, settings def generate_config(): with open('settings.json', 'w') as f: f.write(json.dumps(settings, indent=2)) def download(video): ...
954
0
92
0a9f769118df24e3645b33a0c259c3809f3e6619
29,410
py
Python
selfdrive/car/volkswagen/carstate.py
JoeOIVOV/ArnePilot
82c71c6f5af1ba504b748940f22cc0ac98692662
[ "MIT" ]
116
2018-03-07T09:00:10.000Z
2020-04-06T18:37:45.000Z
selfdrive/car/volkswagen/carstate.py
JoeOIVOV/ArnePilot
82c71c6f5af1ba504b748940f22cc0ac98692662
[ "MIT" ]
66
2020-04-09T20:27:57.000Z
2022-01-27T14:39:24.000Z
selfdrive/car/volkswagen/carstate.py
JoeOIVOV/ArnePilot
82c71c6f5af1ba504b748940f22cc0ac98692662
[ "MIT" ]
154
2020-04-08T21:41:22.000Z
2022-03-17T21:05:33.000Z
import numpy as np from cereal import car from selfdrive.config import Conversions as CV from selfdrive.car.interfaces import CarStateBase from opendbc.can.parser import CANParser from opendbc.can.can_define import CANDefine from selfdrive.car.volkswagen.values import DBC, CANBUS, NWL, TRANS, GEAR, BUTTON_STATES, CarCo...
58.937876
156
0.654301
import numpy as np from cereal import car from selfdrive.config import Conversions as CV from selfdrive.car.interfaces import CarStateBase from opendbc.can.parser import CANParser from opendbc.can.can_define import CANDefine from selfdrive.car.volkswagen.values import DBC, CANBUS, NWL, TRANS, GEAR, BUTTON_STATES, CarCo...
28,806
246
23
0f45bac2e09b3f5280dec643ffc3d13b36063c00
1,925
py
Python
freefolks/migrations/0003_accounts_transaction.py
sivaprakashniet/blogger
e02bb99f9f86fddfa5892a7cf387ff73584b00d9
[ "BSD-3-Clause" ]
null
null
null
freefolks/migrations/0003_accounts_transaction.py
sivaprakashniet/blogger
e02bb99f9f86fddfa5892a7cf387ff73584b00d9
[ "BSD-3-Clause" ]
2
2018-07-22T16:50:42.000Z
2019-02-20T05:10:06.000Z
freefolks/migrations/0003_accounts_transaction.py
sivaprakashniet/blogger
e02bb99f9f86fddfa5892a7cf387ff73584b00d9
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-06-03 06:27 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion
46.95122
125
0.642078
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-06-03 06:27 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependenc...
0
1,682
23
32f53785a22cdbc7bbbcbc0581bc7c762e300df2
407
py
Python
test/test_case/030_test_debug.py
xupingmao/subpy
c956f151ed1ebd2faeaf1565352b59ca5a8fa0b4
[ "MIT" ]
6
2015-10-11T15:06:54.000Z
2016-07-03T06:06:52.000Z
test/test_case/030_test_debug.py
xupingmao/snake
c956f151ed1ebd2faeaf1565352b59ca5a8fa0b4
[ "MIT" ]
7
2015-08-03T12:01:21.000Z
2016-04-24T09:00:09.000Z
test/test_case/030_test_debug.py
xupingmao/snake
c956f151ed1ebd2faeaf1565352b59ca5a8fa0b4
[ "MIT" ]
2
2016-04-18T14:51:25.000Z
2016-04-18T15:07:09.000Z
import debug import random main(5) print("-" * 50) main(10) print("-" * 50) main(15) print("-" * 50) main(20) print("-" * 50) main(30) print("-" * 50)
11.970588
32
0.562654
import debug import random def rand_str(length): v = "" a = ord('A') b = ord('Z') for i in range(length): v += chr(random.randint(a, b)) return v def main(n): print("n=%d" % n) d = dict() for i in range(n): key = rand_str(5) d[key] = 1 debug.print_dict_info(d) main(5) print("-" * 50) main(10) print(...
205
0
46
e65a6001b34e535166845c0c7fe59cf1214e4815
1,919
py
Python
dawp/book/10_mcs/CIR_zcb_valuation_gen.py
PyCN/dawp
6a81535d6173727362438244d91398babbc654bd
[ "CNRI-Python" ]
484
2015-08-04T19:24:06.000Z
2022-03-30T20:59:30.000Z
dawp/book/10_mcs/CIR_zcb_valuation_gen.py
joshuatu/dawp
6a81535d6173727362438244d91398babbc654bd
[ "CNRI-Python" ]
3
2019-09-10T14:37:30.000Z
2019-09-10T14:37:45.000Z
dawp/book/10_mcs/CIR_zcb_valuation_gen.py
joshuatu/dawp
6a81535d6173727362438244d91398babbc654bd
[ "CNRI-Python" ]
360
2015-08-08T03:30:37.000Z
2022-03-30T12:07:31.000Z
# # Valuation of Zero-Coupon Bonds # in Cox-Ingersoll-Ross (1985) Model # 09_gmm/CIR_zcb_valuation_gen.py # # (c) Dr. Yves J. Hilpisch # Derivatives Analytics with Python # import math import numpy as np # # Example Parameters CIR85 Model # r0, kappa_r, theta_r, sigma_r, t, T = 0.04, 0.3, 0.04, 0.1, 0.5, 5.0 # # Zero...
23.691358
68
0.562272
# # Valuation of Zero-Coupon Bonds # in Cox-Ingersoll-Ross (1985) Model # 09_gmm/CIR_zcb_valuation_gen.py # # (c) Dr. Yves J. Hilpisch # Derivatives Analytics with Python # import math import numpy as np # # Example Parameters CIR85 Model # r0, kappa_r, theta_r, sigma_r, t, T = 0.04, 0.3, 0.04, 0.1, 0.5, 5.0 # # Zero...
0
0
0
ed52a5e878411f6de5c4ed707029fa8f48702ef7
1,264
py
Python
examples/tcp/example_client.py
marbirg/openschc
593bb355ab27c92677c0e53a7df73bfd83f1bbb5
[ "MIT" ]
21
2018-11-05T06:48:32.000Z
2022-02-28T14:38:09.000Z
examples/tcp/example_client.py
marbirg/openschc
593bb355ab27c92677c0e53a7df73bfd83f1bbb5
[ "MIT" ]
34
2019-01-28T01:32:41.000Z
2021-05-06T09:40:14.000Z
examples/tcp/example_client.py
marbirg/openschc
593bb355ab27c92677c0e53a7df73bfd83f1bbb5
[ "MIT" ]
28
2018-10-31T22:21:26.000Z
2022-03-17T09:44:40.000Z
THIS.CODE.IS.UNDER.CONSTRUCTION import tcp_helper as helper import gen_rulemanager #import protocol helper_config = { "mode": "client", "address": None, # or IPv4/IPv6 address "port": None, # TCP port, "compression": False, "fragmentation": False } rule_manager = XXX rule_manager.Add({ rule_set }...
25.28
118
0.710443
THIS.CODE.IS.UNDER.CONSTRUCTION import tcp_helper as helper import gen_rulemanager #import protocol helper_config = { "mode": "client", "address": None, # or IPv4/IPv6 address "port": None, # TCP port, "compression": False, "fragmentation": False } rule_manager = XXX rule_manager.Add({ rule_set }...
89
22
80
0613f2ac395915dba85532024ab0e897622d9419
1,247
py
Python
dataservices/data_provider.py
automatos-studios/cellular-probabilistic
9546d7a01c2b3e17131f34aa1e916e514c052ea8
[ "Apache-2.0" ]
null
null
null
dataservices/data_provider.py
automatos-studios/cellular-probabilistic
9546d7a01c2b3e17131f34aa1e916e514c052ea8
[ "Apache-2.0" ]
null
null
null
dataservices/data_provider.py
automatos-studios/cellular-probabilistic
9546d7a01c2b3e17131f34aa1e916e514c052ea8
[ "Apache-2.0" ]
null
null
null
# # --------------------------------------------------------- # Copyright 2018-present (c) Automatos Studios. All Rights Reserved. # --------------------------------------------------------- # # @file data_provider.py # @author cosmoplankton@automatos.studio # """ DataProvider Implementation: Imports the ...
23.980769
68
0.586207
# # --------------------------------------------------------- # Copyright 2018-present (c) Automatos Studios. All Rights Reserved. # --------------------------------------------------------- # # @file data_provider.py # @author cosmoplankton@automatos.studio # """ DataProvider Implementation: Imports the ...
17
0
24
122ed3c1e40e6fa9557564c02741a7d11f2949c5
3,197
py
Python
pipeline/extracellular.py
ttngu207/Economo-2018
c1d9c9d1490380d7e6f2669de14beb7b61297aeb
[ "MIT" ]
1
2019-04-01T13:30:41.000Z
2019-04-01T13:30:41.000Z
pipeline/extracellular.py
ttngu207/Economo-2018
c1d9c9d1490380d7e6f2669de14beb7b61297aeb
[ "MIT" ]
1
2021-06-02T00:26:35.000Z
2021-06-02T00:26:35.000Z
pipeline/extracellular.py
ttngu207/Economo-2018
c1d9c9d1490380d7e6f2669de14beb7b61297aeb
[ "MIT" ]
1
2019-04-01T13:25:01.000Z
2019-04-01T13:25:01.000Z
import re import os import sys from datetime import datetime import numpy as np import scipy.io as sio import datajoint as dj import tqdm from . import (reference, utilities, acquisition, analysis) schema = dj.schema(dj.config['custom'].get('database.prefix', '') + 'extracellular') @schema @schema @schema @s...
33.302083
143
0.637785
import re import os import sys from datetime import datetime import numpy as np import scipy.io as sio import datajoint as dj import tqdm from . import (reference, utilities, acquisition, analysis) schema = dj.schema(dj.config['custom'].get('database.prefix', '') + 'extracellular') @schema class ProbeInsertion(dj....
1,518
1,262
88
19a75d46e13e88f5e7d29ef1e36459ba78d5bcd4
6,608
py
Python
fabfile/__init__.py
nprapps/elections14
b89f65aa276eebb790594f456d58e741066c1f93
[ "MIT" ]
5
2015-01-23T19:23:21.000Z
2015-05-01T17:15:13.000Z
fabfile/__init__.py
nprapps/elections14
b89f65aa276eebb790594f456d58e741066c1f93
[ "MIT" ]
1
2015-02-04T18:58:40.000Z
2015-02-04T18:58:40.000Z
fabfile/__init__.py
nprapps/elections14
b89f65aa276eebb790594f456d58e741066c1f93
[ "MIT" ]
1
2021-02-23T10:25:25.000Z
2021-02-23T10:25:25.000Z
#!/usr/bin/env python from datetime import datetime import json from fabric.api import local, require, settings, task from fabric.state import env from termcolor import colored import app_config # Other fabfiles import ap import assets import daemons import data import instagram import issues import liveblog import ...
23.104895
182
0.669946
#!/usr/bin/env python from datetime import datetime import json from fabric.api import local, require, settings, task from fabric.state import env from termcolor import colored import app_config # Other fabfiles import ap import assets import daemons import data import instagram import issues import liveblog import ...
364
0
22
5236587ef940d17116cc1bbb983825cf3b3c80c9
2,021
py
Python
code/python/echomesh/color/LEDBank.py
silky/echomesh
2fe5a00a79c215b4aca4083e5252fcdcbd0507aa
[ "MIT" ]
1
2019-06-27T11:34:13.000Z
2019-06-27T11:34:13.000Z
code/python/echomesh/color/LEDBank.py
silky/echomesh
2fe5a00a79c215b4aca4083e5252fcdcbd0507aa
[ "MIT" ]
null
null
null
code/python/echomesh/color/LEDBank.py
silky/echomesh
2fe5a00a79c215b4aca4083e5252fcdcbd0507aa
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division, print_function, unicode_literals from echomesh.color import GammaTable from echomesh.util.thread import Lock # See http://dev.moorescloud.com/2012/10/18/about-lpd8806-based-rgb-led-strips/ # # Inspired by: # https://github.com/adammhaile/RPi-LPD8806/blob/master/LPD880...
28.871429
82
0.650173
from __future__ import absolute_import, division, print_function, unicode_literals from echomesh.color import GammaTable from echomesh.util.thread import Lock # See http://dev.moorescloud.com/2012/10/18/about-lpd8806-based-rgb-led-strips/ # # Inspired by: # https://github.com/adammhaile/RPi-LPD8806/blob/master/LPD880...
1,403
265
23
68b07ab69355268601844543563e3a3e2cea5398
4,390
py
Python
example_tank_nlc/main.py
kyriacosparperis/apm_python
1f7701131db1414d4274be71dd6bfa6b0c71de6b
[ "BSD-2-Clause-FreeBSD" ]
99
2015-07-05T06:12:16.000Z
2021-12-16T17:52:48.000Z
example_tank_nlc/main.py
kyriacosparperis/apm_python
1f7701131db1414d4274be71dd6bfa6b0c71de6b
[ "BSD-2-Clause-FreeBSD" ]
4
2018-03-27T01:30:40.000Z
2019-06-24T20:00:18.000Z
example_tank_nlc/main.py
kyriacosparperis/apm_python
1f7701131db1414d4274be71dd6bfa6b0c71de6b
[ "BSD-2-Clause-FreeBSD" ]
35
2015-07-05T06:12:19.000Z
2021-08-09T08:33:52.000Z
# Import import sys sys.path.append("../") # Import from apm import * # Select server server = 'http://byu.apmonitor.com' # Application name app = 'nlc' # Clear previous application apm(server,app,'clear all') # Load model file apm_load(server,app,'tank.apm') # Load time points for future predictions csv_load(se...
27.610063
75
0.707062
# Import import sys sys.path.append("../") # Import from apm import * # Select server server = 'http://byu.apmonitor.com' # Application name app = 'nlc' # Clear previous application apm(server,app,'clear all') # Load model file apm_load(server,app,'tank.apm') # Load time points for future predictions csv_load(se...
0
0
0
d5226e9fd0c4925665fe1771b8a9288b8e8f35c5
4,217
py
Python
rally-jobs/plugins/mistral_huge_wf_scenario.py
shubhamdang/mistral
3c83837f6ce1e4ab74fb519a63e82eaae70f9d2d
[ "Apache-2.0" ]
205
2015-06-21T11:51:47.000Z
2022-03-05T04:00:04.000Z
rally-jobs/plugins/mistral_huge_wf_scenario.py
shubhamdang/mistral
3c83837f6ce1e4ab74fb519a63e82eaae70f9d2d
[ "Apache-2.0" ]
8
2015-06-23T14:47:58.000Z
2021-01-28T06:06:44.000Z
rally-jobs/plugins/mistral_huge_wf_scenario.py
shubhamdang/mistral
3c83837f6ce1e4ab74fb519a63e82eaae70f9d2d
[ "Apache-2.0" ]
110
2015-06-14T03:34:38.000Z
2021-11-11T12:12:56.000Z
# Copyright 2020 - Nokia Software. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
32.689922
77
0.672753
# Copyright 2020 - Nokia Software. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
1,904
671
67
8cc734fadba7a27f81e5017d86835a0b555e9a4d
5,894
py
Python
examples/trials/ga_squad/evaluate.py
narumiruna/nni
09ce78302ca9f48ecb446e1129f28f70ee35dc4a
[ "MIT" ]
1
2018-09-12T06:32:56.000Z
2018-09-12T06:32:56.000Z
examples/trials/ga_squad/evaluate.py
0Deer0/nni
b4e9f0878d3f74742ae3acd783ddff303b4732cb
[ "MIT" ]
null
null
null
examples/trials/ga_squad/evaluate.py
0Deer0/nni
b4e9f0878d3f74742ae3acd783ddff303b4732cb
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation # All rights reserved. # # MIT License # # Permission is hereby granted, free of charge, # to any person obtaining a copy of this software and associated # documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights...
37.069182
100
0.656091
# Copyright (c) Microsoft Corporation # All rights reserved. # # MIT License # # Permission is hereby granted, free of charge, # to any person obtaining a copy of this software and associated # documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights...
0
0
0
b662e28176f049d6451bf95891fa93d8477caf79
9,337
py
Python
remodet_repository_wdh_part/python/py_loss_target_layer.py
UrwLee/Remo_experience
a59d5b9d6d009524672e415c77d056bc9dd88c72
[ "MIT" ]
null
null
null
remodet_repository_wdh_part/python/py_loss_target_layer.py
UrwLee/Remo_experience
a59d5b9d6d009524672e415c77d056bc9dd88c72
[ "MIT" ]
null
null
null
remodet_repository_wdh_part/python/py_loss_target_layer.py
UrwLee/Remo_experience
a59d5b9d6d009524672e415c77d056bc9dd88c72
[ "MIT" ]
null
null
null
# coding=utf-8 import os import caffe import yaml import numpy as np import numpy.random as npr from utils.cython_bbox import bbox_overlaps import json DEBUG = False import time import sys print sys.path class LossTargetLayer(caffe.Layer): """ Assign anchors to ground-truth targets. Produces anchor classific...
41.132159
162
0.617008
# coding=utf-8 import os import caffe import yaml import numpy as np import numpy.random as npr from utils.cython_bbox import bbox_overlaps import json DEBUG = False import time import sys print sys.path class LossTargetLayer(caffe.Layer): """ Assign anchors to ground-truth targets. Produces anchor classific...
7,639
0
125
50ad367c93644ede2b0752bd5ccf7aa4702bd260
5,396
py
Python
tests/test_dump.py
h5preserve/h5preserve
c3840b26868d15dd8d14f99d1d188aa066c2bb84
[ "BSD-3-Clause" ]
2
2020-03-03T20:34:13.000Z
2020-10-02T05:51:01.000Z
tests/test_dump.py
h5preserve/h5preserve
c3840b26868d15dd8d14f99d1d188aa066c2bb84
[ "BSD-3-Clause" ]
178
2017-07-14T01:33:50.000Z
2022-03-31T10:14:25.000Z
tests/test_dump.py
h5preserve/h5preserve
c3840b26868d15dd8d14f99d1d188aa066c2bb84
[ "BSD-3-Clause" ]
2
2017-07-14T01:29:25.000Z
2018-02-28T12:10:26.000Z
import pytest import numpy as np from h5py import Group, Dataset, SoftLink, ExternalLink from h5preserve import RegistryContainer, HardLink, new_registry_list def is_matching_hdf5_object(new, old): """ Check if two objects have the same hdf5 representation """ if type(new) != type(old): retur...
37.472222
102
0.687361
import pytest import numpy as np from h5py import Group, Dataset, SoftLink, ExternalLink from h5preserve import RegistryContainer, HardLink, new_registry_list def is_matching_hdf5_object(new, old): """ Check if two objects have the same hdf5 representation """ if type(new) != type(old): retur...
3,788
717
69
000aa3dc31d30cb1685d75d6126237c2f1296f93
623
py
Python
microbench/tests/test_nvidia.py
alubbock/microbench
ad1c07dcbcfb8b92e81bcb99dc71e98b6eaf55f2
[ "MIT" ]
9
2018-08-03T19:10:21.000Z
2021-08-19T16:41:33.000Z
microbench/tests/test_nvidia.py
alubbock/microbench
ad1c07dcbcfb8b92e81bcb99dc71e98b6eaf55f2
[ "MIT" ]
null
null
null
microbench/tests/test_nvidia.py
alubbock/microbench
ad1c07dcbcfb8b92e81bcb99dc71e98b6eaf55f2
[ "MIT" ]
null
null
null
from microbench import MicroBench, MBNvidiaSmi import subprocess import unittest import pandas try: subprocess.call(['nvidia-smi']) nvidia_smi_available = True except FileNotFoundError: nvidia_smi_available = False @unittest.skipIf(not nvidia_smi_available, 'nvidia-smi command not found')
21.482759
74
0.720706
from microbench import MicroBench, MBNvidiaSmi import subprocess import unittest import pandas try: subprocess.call(['nvidia-smi']) nvidia_smi_available = True except FileNotFoundError: nvidia_smi_available = False @unittest.skipIf(not nvidia_smi_available, 'nvidia-smi command not found') def test_nvidia...
296
0
22
2c15ac6ac0c744ae4ff869ee48abd6170086ae86
1,593
py
Python
scripts/extract_results_stanford_sieve.py
natemalek/molen-pater-nathan-rma-thesis-coreference-with-singletons
3d2d6c751eadd6438a80b0c24f48b2635bc6acc7
[ "MIT" ]
null
null
null
scripts/extract_results_stanford_sieve.py
natemalek/molen-pater-nathan-rma-thesis-coreference-with-singletons
3d2d6c751eadd6438a80b0c24f48b2635bc6acc7
[ "MIT" ]
null
null
null
scripts/extract_results_stanford_sieve.py
natemalek/molen-pater-nathan-rma-thesis-coreference-with-singletons
3d2d6c751eadd6438a80b0c24f48b2635bc6acc7
[ "MIT" ]
null
null
null
''' Extract results from the log files of Stanford sieve and put into a CSV file Usage: extract_results_stanford_sieve.py --out=<fn> <log_paths>... ''' from utils import match_with_line_no, grouper import re from docopt import docopt import pandas as pd import os if __name__ == '__main__': args = docopt...
33.893617
118
0.632141
''' Extract results from the log files of Stanford sieve and put into a CSV file Usage: extract_results_stanford_sieve.py --out=<fn> <log_paths>... ''' from utils import match_with_line_no, grouper import re from docopt import docopt import pandas as pd import os def main(log_paths, out_path): results = [extr...
1,172
0
46
e00fc9e9b13dda0a862f4b3bb6db76b324fdbf5e
8,231
py
Python
scripts/jtl_listener_service.py
paulbrodner/jtl-reporter
76b2dc53afe233d3e111c569fb7f2e9f63431988
[ "MIT" ]
null
null
null
scripts/jtl_listener_service.py
paulbrodner/jtl-reporter
76b2dc53afe233d3e111c569fb7f2e9f63431988
[ "MIT" ]
null
null
null
scripts/jtl_listener_service.py
paulbrodner/jtl-reporter
76b2dc53afe233d3e111c569fb7f2e9f63431988
[ "MIT" ]
null
null
null
import gevent import gevent.monkey import socket from time import sleep, time import requests import logging from typing import List import sys import os
36.745536
129
0.575507
import gevent import gevent.monkey import socket from time import sleep, time import requests import logging from typing import List import sys import os class JtlListener: # holds results until processed results: List[dict] = [] def __init__( self, env, project_name:...
7,557
494
23
a1152ed11cad2d9c0f919142d6901ab27772d68c
2,739
py
Python
fbcrawl/spiders/events.py
sunpriya/major-crawler
997f60062caee1a89246e907bba7204c9ec34fcf
[ "Apache-2.0" ]
625
2018-08-26T04:29:06.000Z
2022-03-30T14:28:42.000Z
fbcrawl/spiders/events.py
sunpriya/major-crawler
997f60062caee1a89246e907bba7204c9ec34fcf
[ "Apache-2.0" ]
67
2018-09-17T21:26:58.000Z
2021-12-04T21:28:31.000Z
fbcrawl/spiders/events.py
sunpriya/major-crawler
997f60062caee1a89246e907bba7204c9ec34fcf
[ "Apache-2.0" ]
251
2018-09-01T10:17:23.000Z
2022-03-08T03:31:04.000Z
import scrapy from scrapy.loader import ItemLoader from scrapy.exceptions import CloseSpider from fbcrawl.spiders.fbcrawl import FacebookSpider from fbcrawl.items import EventsItem, parse_date, parse_date2 from datetime import datetime class EventsSpider(FacebookSpider): """ Parse FB events, given a page (ne...
46.423729
128
0.630157
import scrapy from scrapy.loader import ItemLoader from scrapy.exceptions import CloseSpider from fbcrawl.spiders.fbcrawl import FacebookSpider from fbcrawl.items import EventsItem, parse_date, parse_date2 from datetime import datetime class EventsSpider(FacebookSpider): """ Parse FB events, given a page (ne...
2,001
0
108
c3ae7d5530008e782df53e09d8260d95f59213be
2,087
py
Python
setup.py
kohyamat/MassGenotyping
4a3d8d073d39aa4860db4a214954bbaae65dbaf1
[ "MIT" ]
5
2020-04-27T21:24:42.000Z
2021-12-15T03:14:42.000Z
setup.py
kohyamat/MassGenotyping
4a3d8d073d39aa4860db4a214954bbaae65dbaf1
[ "MIT" ]
1
2020-09-23T17:17:28.000Z
2020-09-24T17:05:50.000Z
setup.py
kohyamat/massgenotyping
4a3d8d073d39aa4860db4a214954bbaae65dbaf1
[ "MIT" ]
null
null
null
import codecs import os.path from setuptools import find_packages, setup with open("README.rst", "r") as fh: long_description = fh.read() setup( name="massgenotyping", version=get_version("massgenotyping/__init__.py"), description=( "Python package for microsatellite genotyping from amplic...
29.814286
84
0.605654
import codecs import os.path from setuptools import find_packages, setup def read(rel_path): here = os.path.abspath(os.path.dirname(__file__)) with codecs.open(os.path.join(here, rel_path), "r") as fp: return fp.read() def get_version(rel_path): for line in read(rel_path).splitlines(): ...
392
0
46
41246b4e2ade5aa7808be2662e30a735edcf004f
74
py
Python
datacoco_redis_tools/__init__.py
equinoxfitness/datacoco-redis_tools
6a985f985d90a41b9c38097eabaeb1a1ff441a4e
[ "MIT" ]
1
2020-03-19T17:53:42.000Z
2020-03-19T17:53:42.000Z
datacoco_redis_tools/__init__.py
equinoxfitness/datacoco-redis_tools
6a985f985d90a41b9c38097eabaeb1a1ff441a4e
[ "MIT" ]
null
null
null
datacoco_redis_tools/__init__.py
equinoxfitness/datacoco-redis_tools
6a985f985d90a41b9c38097eabaeb1a1ff441a4e
[ "MIT" ]
null
null
null
from .redis_tools import RedisInteraction __all__ = ["RedisInteraction"]
18.5
41
0.810811
from .redis_tools import RedisInteraction __all__ = ["RedisInteraction"]
0
0
0
2f48d7c5ec3fda9267e4bb1f4c0c9ca768901b56
759
py
Python
setup.py
tylerbutler/typogrify
7b7a67348a2d51400fd38c0b61e30e34ca98994e
[ "BSD-3-Clause" ]
null
null
null
setup.py
tylerbutler/typogrify
7b7a67348a2d51400fd38c0b61e30e34ca98994e
[ "BSD-3-Clause" ]
null
null
null
setup.py
tylerbutler/typogrify
7b7a67348a2d51400fd38c0b61e30e34ca98994e
[ "BSD-3-Clause" ]
null
null
null
from setuptools import setup, find_packages setup( name='typogrify', version='2.0.0', packages=find_packages(), author='Christian Metts', author_email='xian@mintchaos.com', license='BSD', description='Typography related template filters for Django & Jinja2 applications', url='https://g...
30.36
87
0.638999
from setuptools import setup, find_packages setup( name='typogrify', version='2.0.0', packages=find_packages(), author='Christian Metts', author_email='xian@mintchaos.com', license='BSD', description='Typography related template filters for Django & Jinja2 applications', url='https://g...
0
0
0
3c0662918efdb4ce3c4db029289f84a83b4e82cd
3,093
py
Python
ranger/commands.py
rusito-23/vifm-powerline
4dc037244f8f12320e1c72f9ef252466f0f18cae
[ "MIT" ]
1
2019-06-03T17:56:56.000Z
2019-06-03T17:56:56.000Z
ranger/commands.py
rusito-23/vifm-powerline
4dc037244f8f12320e1c72f9ef252466f0f18cae
[ "MIT" ]
null
null
null
ranger/commands.py
rusito-23/vifm-powerline
4dc037244f8f12320e1c72f9ef252466f0f18cae
[ "MIT" ]
null
null
null
#!/bin/python3 # Author: Igor Andruskiewitsch # Notes: Custom commands for the Ranger terminal file manager # -- IMPORTS import os import subprocess import ranger # -- COMMON CONSTANTS NULL_ERR="2> /dev/null" MATCH="\( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \)" FIND="find -L {} {} -prune -o {} -print" FZF...
27.371681
72
0.580666
#!/bin/python3 # Author: Igor Andruskiewitsch # Notes: Custom commands for the Ranger terminal file manager # -- IMPORTS import os import subprocess import ranger # -- COMMON CONSTANTS NULL_ERR="2> /dev/null" MATCH="\( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \)" FIND="find -L {} {} -prune -o {} -print" FZF...
2,048
0
161
8464fc9b981fc899eb38f557837298aba0bf67bb
1,065
py
Python
python/tests/test_fizz_buzz_tree.py
abdalazzezzalsalahat/data-structures-and-algorithms
30c35da90bc2c605b40d263ead592c41aeed9db9
[ "MIT" ]
null
null
null
python/tests/test_fizz_buzz_tree.py
abdalazzezzalsalahat/data-structures-and-algorithms
30c35da90bc2c605b40d263ead592c41aeed9db9
[ "MIT" ]
1
2021-06-14T19:35:33.000Z
2021-06-14T19:35:33.000Z
python/tests/test_fizz_buzz_tree.py
abdalazzezzalsalahat/data-structures-and-algorithms
30c35da90bc2c605b40d263ead592c41aeed9db9
[ "MIT" ]
2
2021-06-14T16:31:22.000Z
2021-06-14T16:55:14.000Z
from fizz_buzz_tree.fizz_buzz_tree import fizz_buzz_tree from tree.tree import Binary_Tree, TNode import pytest @pytest.fixture @pytest.fixture
22.659574
56
0.699531
from fizz_buzz_tree.fizz_buzz_tree import fizz_buzz_tree from tree.tree import Binary_Tree, TNode import pytest @pytest.fixture def empty_tree(): return Binary_Tree() @pytest.fixture def fizzy_tree(): ## preparing data bt = Binary_Tree() bt.root = TNode(3) bt.root.left = TNode(5) bt.root.righ...
738
0
179
2900a903fa25469c7c70bbc6c2ba5000ba307223
289
py
Python
Strings/1803.py
LorranSutter/URI-Online-Judge
aef885b9a7caa83484cf172e29eea8ec92fc3627
[ "MIT" ]
null
null
null
Strings/1803.py
LorranSutter/URI-Online-Judge
aef885b9a7caa83484cf172e29eea8ec92fc3627
[ "MIT" ]
null
null
null
Strings/1803.py
LorranSutter/URI-Online-Judge
aef885b9a7caa83484cf172e29eea8ec92fc3627
[ "MIT" ]
null
null
null
F = '' L = '' S = input() N = len(S) M = [S[k+1] for k in range(N-2)] F = S[0] L = S[-1] for k in range(3): S = input() for w in range(N-2): M[w] += S[w+1] F += S[0] L += S[-1] res = '' for w in range(N-2): res += chr((int(F)*int(M[w])+int(L))%257) print(res)
15.210526
45
0.429066
F = '' L = '' S = input() N = len(S) M = [S[k+1] for k in range(N-2)] F = S[0] L = S[-1] for k in range(3): S = input() for w in range(N-2): M[w] += S[w+1] F += S[0] L += S[-1] res = '' for w in range(N-2): res += chr((int(F)*int(M[w])+int(L))%257) print(res)
0
0
0
1d3771f8d2a29d3f4fc9534f5bd935caf93b3d37
1,951
py
Python
src/top/model/anchor.py
yycho0108/ai604-video-object-pose
7067f36281038272b0e39166d8f9718076bb6e75
[ "MIT" ]
null
null
null
src/top/model/anchor.py
yycho0108/ai604-video-object-pose
7067f36281038272b0e39166d8f9718076bb6e75
[ "MIT" ]
13
2021-04-13T04:58:38.000Z
2021-06-17T04:58:07.000Z
src/top/model/anchor.py
yycho0108/ai604-video-object-pose
7067f36281038272b0e39166d8f9718076bb6e75
[ "MIT" ]
null
null
null
""" Compute priorbox coordinates in center-offset(2D) form for each source feature map. Attempt to modify SSD anchor to 3D(scale:w,h,d). Create two kind of cube(small,large) in every feature map cell. Reference: https://github.com/amdegroot/ssd.pytorch/blob/master/layers/functions/prior_box.py """ from typing import L...
30.484375
112
0.62327
""" Compute priorbox coordinates in center-offset(2D) form for each source feature map. Attempt to modify SSD anchor to 3D(scale:w,h,d). Create two kind of cube(small,large) in every feature map cell. Reference: https://github.com/amdegroot/ssd.pytorch/blob/master/layers/functions/prior_box.py """ from typing import L...
1,019
131
98
db12256b912edddfde90d2f2069a2f7ebf8a4b67
13,718
py
Python
BP35A1.py
miyaichi/SmartMeter
b3753e376f4407d99dc5febf62358433bc4365ab
[ "MIT" ]
2
2020-07-07T14:34:10.000Z
2021-02-01T13:08:21.000Z
BP35A1.py
miyaichi/SmartMeter
b3753e376f4407d99dc5febf62358433bc4365ab
[ "MIT" ]
null
null
null
BP35A1.py
miyaichi/SmartMeter
b3753e376f4407d99dc5febf62358433bc4365ab
[ "MIT" ]
1
2021-05-25T13:33:24.000Z
2021-05-25T13:33:24.000Z
import logging import machine import utime from m5stack import lcd # global variables logger = None # decoretor # date time function if __name__ == '__main__': id = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' password = 'xxxxxxxxxxxx' contract_amperage = "50" collect_date = "22" bp35a1 = BP...
27.381238
77
0.482286
import logging import machine import utime from m5stack import lcd # global variables logger = None # decoretor def iofunc(func): def wrapper(obj, *args): if (args): logger.debug('> %s', args[0].strip()) response = func(obj, *args) if (response): logger.debug('< ...
8,819
4,761
230
1156bac9b7482cfbaa4290f0ff035001f9d8b5f0
7,017
py
Python
bench/scribble_infiltration.py
histocartography/athena
8a1af389dc936bf5b8e62c56ae682a2fe4d2d71a
[ "BSD-3-Clause" ]
9
2021-12-07T07:08:55.000Z
2022-03-24T13:40:51.000Z
bench/scribble_infiltration.py
histocartography/athena
8a1af389dc936bf5b8e62c56ae682a2fe4d2d71a
[ "BSD-3-Clause" ]
null
null
null
bench/scribble_infiltration.py
histocartography/athena
8a1af389dc936bf5b8e62c56ae682a2fe4d2d71a
[ "BSD-3-Clause" ]
2
2021-10-08T07:11:13.000Z
2022-02-02T18:52:52.000Z
import logging import pandas as pd import spatialHeterogeneity as sh from spatialHeterogeneity.neighborhood.utils import get_node_interactions from networkx import Graph import numpy as np import spatialHeterogeneity as sh from spatialHeterogeneity.graph_builder.constants import GRAPH_BUILDER_DEFAULT_PARAMS import ma...
32.336406
144
0.673935
import logging import pandas as pd import spatialHeterogeneity as sh from spatialHeterogeneity.neighborhood.utils import get_node_interactions from networkx import Graph import numpy as np import spatialHeterogeneity as sh from spatialHeterogeneity.graph_builder.constants import GRAPH_BUILDER_DEFAULT_PARAMS import ma...
1,516
0
23
b40ae50cd4ad232820a1353b18b2fa8a177f0981
3,964
py
Python
demo.py
ShuangXieIrene/ssds.pytorch
b5ec682a42c923afe964205b21448e9f141d55bc
[ "MIT" ]
661
2018-03-19T12:13:07.000Z
2022-03-31T04:35:37.000Z
demo.py
menapedreira/ssds.pytorch
b5ec682a42c923afe964205b21448e9f141d55bc
[ "MIT" ]
80
2018-03-20T14:17:30.000Z
2021-07-22T14:52:44.000Z
demo.py
menapedreira/ssds.pytorch
b5ec682a42c923afe964205b21448e9f141d55bc
[ "MIT" ]
195
2018-03-23T07:17:59.000Z
2022-03-31T02:24:23.000Z
import os import sys import argparse import cv2 from tqdm import tqdm from ssds.ssds import SSDDetector COLORS = [(255, 0, 0), (0, 255, 0), (0, 0, 255)] FONT = cv2.FONT_HERSHEY_SIMPLEX if __name__ == '__main__': parser = argparse.ArgumentParser(description='Demo a ssds.pytorch network') parser.add_argument(...
37.752381
115
0.616044
import os import sys import argparse import cv2 from tqdm import tqdm from ssds.ssds import SSDDetector COLORS = [(255, 0, 0), (0, 255, 0), (0, 0, 255)] FONT = cv2.FONT_HERSHEY_SIMPLEX def plot_one_box(img, x, color=None, label=None, line_thickness=None): # Plots one bounding box on image img tl = line_thick...
2,788
0
69
426c5f98e359dcd97f62a47bfc637d54f1bd889f
1,212
py
Python
walkdict/walkdict.py
f3rdy/pybox
d75ce59a4620c3e35f8297d20359bd6501faf257
[ "Apache-2.0" ]
null
null
null
walkdict/walkdict.py
f3rdy/pybox
d75ce59a4620c3e35f8297d20359bd6501faf257
[ "Apache-2.0" ]
null
null
null
walkdict/walkdict.py
f3rdy/pybox
d75ce59a4620c3e35f8297d20359bd6501faf257
[ "Apache-2.0" ]
null
null
null
__author__ = 'fthiele' data = { 'level 1-1': { 'level 1-1-1': { 'a': 1, 'b': 2, 'c': 3, }, 'level 1-1-2': { 'd': 4, 'e': 5, ...
20.2
50
0.238449
__author__ = 'fthiele' data = { 'level 1-1': { 'level 1-1-1': { 'a': 1, 'b': 2, 'c': 3, }, 'level 1-1-2': { 'd': 4, 'e': 5, ...
332
0
46
488125d959101982e443c4c15d2926795879d80d
55
py
Python
src/python/rag_utils/__init__.py
paulhfu/rag_utils
66948371d281a5844e6aa5326c727c62bb872f3f
[ "MIT" ]
null
null
null
src/python/rag_utils/__init__.py
paulhfu/rag_utils
66948371d281a5844e6aa5326c727c62bb872f3f
[ "MIT" ]
null
null
null
src/python/rag_utils/__init__.py
paulhfu/rag_utils
66948371d281a5844e6aa5326c727c62bb872f3f
[ "MIT" ]
null
null
null
from .connected_components import find_dense_subgraphs
27.5
54
0.909091
from .connected_components import find_dense_subgraphs
0
0
0
a3091f595fd4436213dbbf5a45e173d837cd4bd7
504
py
Python
utils/metrics.py
elientumba2019/Learning-Exposure-Correction-via-consistency-Modeling-Pytorch-Implementation-
eba44073a8dc699de880e5d6b9977db3dd80ace2
[ "MIT" ]
8
2021-10-18T10:59:49.000Z
2022-03-30T08:08:11.000Z
utils/metrics.py
elientumba2019/Learning-Exposure-Correction-via-consistency-Modeling-Pytorch-Implementation-
eba44073a8dc699de880e5d6b9977db3dd80ace2
[ "MIT" ]
1
2022-02-22T03:10:12.000Z
2022-02-22T03:10:12.000Z
utils/metrics.py
elientumba2019/Learning-Exposure-Correction-via-consistency-Modeling-Pytorch-Implementation-
eba44073a8dc699de880e5d6b9977db3dd80ace2
[ "MIT" ]
1
2022-01-21T02:55:19.000Z
2022-01-21T02:55:19.000Z
import torch class PSNR: """Peak Signal to Noise Ratio img1 and img2 have range [0, 255]""" @staticmethod if __name__ == '__main__': i = torch.randn(1, 3, 20, 20) j = i / 1.000001 p = PSNR() print(p(i, j).item())
21
60
0.577381
import torch class PSNR: """Peak Signal to Noise Ratio img1 and img2 have range [0, 255]""" def __init__(self, max_value): self.name = "PSNR" self.max_value = max_value # 255 or 1 @staticmethod def __call__(img1, img2, max_value): mse = torch.mean((img1 - img2) ** 2) ...
204
0
53
3c18845cb8912ca3b690a1806c4fe5eec8acd629
1,830
py
Python
webapp/layout/migrations/0001_initial.py
jacyn/burst
a3a655fbffa7f19197eb05ecb07b5fe05f6171b0
[ "MIT" ]
null
null
null
webapp/layout/migrations/0001_initial.py
jacyn/burst
a3a655fbffa7f19197eb05ecb07b5fe05f6171b0
[ "MIT" ]
null
null
null
webapp/layout/migrations/0001_initial.py
jacyn/burst
a3a655fbffa7f19197eb05ecb07b5fe05f6171b0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import filer.fields.image import django.db.models.deletion
45.75
178
0.620765
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import filer.fields.image import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('filer', '0002_auto_20150606_2003'), ] operations = [ migrations.C...
0
1,641
23
edf0348c286a5a0a5dba00052a619f85912317b6
1,256
py
Python
wind_power_forecasting/preprocessing/numerical_weather_prediction.py
tkaraouzene/wind_power_forecasting
418859a6870ae4d7d8eab6a6e04d1bf190804c23
[ "MIT" ]
1
2021-06-29T11:56:25.000Z
2021-06-29T11:56:25.000Z
wind_power_forecasting/preprocessing/numerical_weather_prediction.py
tkaraouzene/wind_power_forecasting
418859a6870ae4d7d8eab6a6e04d1bf190804c23
[ "MIT" ]
null
null
null
wind_power_forecasting/preprocessing/numerical_weather_prediction.py
tkaraouzene/wind_power_forecasting
418859a6870ae4d7d8eab6a6e04d1bf190804c23
[ "MIT" ]
1
2020-03-30T09:43:38.000Z
2020-03-30T09:43:38.000Z
import pandas as pd from wind_power_forecasting import TIME_LABEL, NWP_PREFIX from wind_power_forecasting.utils.dataframe import extract_columns
30.634146
110
0.72293
import pandas as pd from wind_power_forecasting import TIME_LABEL, NWP_PREFIX from wind_power_forecasting.utils.dataframe import extract_columns def format_nwp(df, wp_number_label, wp_hour_label, wp_day_offset_label, w_feature_label, wp_label, copy=True): if copy: df = df.copy() # 1. extract NWP col...
1,014
0
92
f7ac44c62a1ba492e6f7fd0c8df93adcfa8f6961
4,917
py
Python
redshift-dataapi/iac/policies/policies.py
InfrastructureHQ/AWS-CDK-Accelerators
a8a3f61040f4419a6c3485c8f4b8df6204a55940
[ "Apache-2.0" ]
null
null
null
redshift-dataapi/iac/policies/policies.py
InfrastructureHQ/AWS-CDK-Accelerators
a8a3f61040f4419a6c3485c8f4b8df6204a55940
[ "Apache-2.0" ]
null
null
null
redshift-dataapi/iac/policies/policies.py
InfrastructureHQ/AWS-CDK-Accelerators
a8a3f61040f4419a6c3485c8f4b8df6204a55940
[ "Apache-2.0" ]
null
null
null
from settings.globalsettings import GlobalSettings globalsettings = GlobalSettings() AWS_ACCOUNT_ID = globalsettings.AWS_ACCOUNT_ID AWS_REGION = globalsettings.AWS_REGION def code_build_batch_policy_in_json(project_ids): """ Define an IAM policy statement for CodeBuild batch operation. :param project_id...
30.351852
115
0.522676
from settings.globalsettings import GlobalSettings globalsettings = GlobalSettings() AWS_ACCOUNT_ID = globalsettings.AWS_ACCOUNT_ID AWS_REGION = globalsettings.AWS_REGION def code_build_batch_policy_in_json(project_ids): """ Define an IAM policy statement for CodeBuild batch operation. :param project_id...
0
0
0
e43b5fa610a894e203db7a68dd18338f7f6fa8e0
7,312
py
Python
minecrafttrivia/game.py
romangraef/RedCog-MinecraftTrivia
02dcc5345fa6bb9c05f164aed83fa91490a7d7d6
[ "Unlicense" ]
null
null
null
minecrafttrivia/game.py
romangraef/RedCog-MinecraftTrivia
02dcc5345fa6bb9c05f164aed83fa91490a7d7d6
[ "Unlicense" ]
null
null
null
minecrafttrivia/game.py
romangraef/RedCog-MinecraftTrivia
02dcc5345fa6bb9c05f164aed83fa91490a7d7d6
[ "Unlicense" ]
null
null
null
import asyncio import random import typing from abc import ABC, abstractmethod from datetime import datetime, timedelta from enum import Enum, auto import discord from redbot.core import Config from redbot.core.bot import Red from redbot.core.config import Group from . import constants, utils from .recipe_provider im...
31.247863
157
0.729759
import asyncio import random import typing from abc import ABC, abstractmethod from datetime import datetime, timedelta from enum import Enum, auto import discord from redbot.core import Config from redbot.core.bot import Red from redbot.core.config import Group from . import constants, utils from .recipe_provider im...
5,454
1,365
139
f38b7b037526be424b827b3a88916a3eb387f61c
2,539
py
Python
Lib/site-packages/win32com/test/testExplorer.py
raychorn/svn_Python-2.5.1
425005b1b489ba44ec0bb989e077297e8953d9be
[ "PSF-2.0" ]
null
null
null
Lib/site-packages/win32com/test/testExplorer.py
raychorn/svn_Python-2.5.1
425005b1b489ba44ec0bb989e077297e8953d9be
[ "PSF-2.0" ]
null
null
null
Lib/site-packages/win32com/test/testExplorer.py
raychorn/svn_Python-2.5.1
425005b1b489ba44ec0bb989e077297e8953d9be
[ "PSF-2.0" ]
null
null
null
# testExplorer - import string import sys import os import win32com.client.dynamic import win32api import glob import pythoncom import time from util import CheckClean bVisibleEventFired = 0 if __name__=='__main__': TestAll() CheckClean()
29.870588
98
0.648287
# testExplorer - import string import sys import os import win32com.client.dynamic import win32api import glob import pythoncom import time from util import CheckClean bVisibleEventFired = 0 class ExplorerEvents: def OnVisible(self, visible): global bVisibleEventFired bVisibleEve...
2,143
0
127
bd0692f375874db9f09ad0810929ab60692a27cd
1,015
py
Python
scripts/find_diffcoeffs.py
maikeriva/APL104
fe29a89e8965811313df6d06de8f878b10e7987e
[ "MIT" ]
2
2020-01-10T06:52:02.000Z
2020-01-14T19:44:47.000Z
scripts/find_diffcoeffs.py
maikeriva/APL104
fe29a89e8965811313df6d06de8f878b10e7987e
[ "MIT" ]
null
null
null
scripts/find_diffcoeffs.py
maikeriva/APL104
fe29a89e8965811313df6d06de8f878b10e7987e
[ "MIT" ]
null
null
null
""" Find diffusion coefficients """ import numpy as np import apl104lib as apl104 from scipy.optimize import minimize import copy exec(open('refsample.py').read()) exec(open('expsample.py').read()) # Define problem # Optimization routine guess=np.array([7.04998003e-03, 8.69586536e-03, 4.61830549e-0...
30.757576
108
0.700493
""" Find diffusion coefficients """ import numpy as np import apl104lib as apl104 from scipy.optimize import minimize import copy exec(open('refsample.py').read()) exec(open('expsample.py').read()) # Define problem def problem(guess,expsample): # Prepare test sample sample=copy.deepcopy(refsample) ...
365
0
22
16643c23f3c06039c0dd67112f118cef6935e6c9
567
py
Python
tests/test_entrypoint.py
nekitdev/entrypoint.py
d61e95326031024ba0ed2d790109f3cd8569ef32
[ "MIT" ]
null
null
null
tests/test_entrypoint.py
nekitdev/entrypoint.py
d61e95326031024ba0ed2d790109f3cd8569ef32
[ "MIT" ]
null
null
null
tests/test_entrypoint.py
nekitdev/entrypoint.py
d61e95326031024ba0ed2d790109f3cd8569ef32
[ "MIT" ]
null
null
null
from entrypoint import entrypoint, is_main from tests.track import track MAIN = "__main__" TEST = "__test__" entrypoint_call = entrypoint(MAIN) entrypoint_no_call = entrypoint(TEST)
17.181818
42
0.689594
from entrypoint import entrypoint, is_main from tests.track import track MAIN = "__main__" TEST = "__test__" def test_is_main() -> None: assert is_main(MAIN) assert not is_main(TEST) entrypoint_call = entrypoint(MAIN) entrypoint_no_call = entrypoint(TEST) def main() -> None: pass def test_call() ->...
286
0
92
00f5e2502479c94b14cbfb6c774b216c77153b9f
847
py
Python
reminder/list/list.py
bharathshetty4/Service-Reminder
5e2dc9f61f9f2a418574138fbd754aa81e09ea56
[ "Apache-2.0" ]
null
null
null
reminder/list/list.py
bharathshetty4/Service-Reminder
5e2dc9f61f9f2a418574138fbd754aa81e09ea56
[ "Apache-2.0" ]
null
null
null
reminder/list/list.py
bharathshetty4/Service-Reminder
5e2dc9f61f9f2a418574138fbd754aa81e09ea56
[ "Apache-2.0" ]
1
2018-02-21T19:27:59.000Z
2018-02-21T19:27:59.000Z
import configparser
31.37037
77
0.567887
import configparser class ListService(): def __init__(self): return None def list_service(self): Config = configparser.ConfigParser() cfg_file = open("/etc/reminder/reminder.conf", 'rb+') if (not cfg_file): print "Unable to open the conf file, /etc/reminder/reminder...
752
-1
76
63ce3e2ce7ee483a859e45ab496e5b26d367e854
4,078
py
Python
other/app.py
JakeWasChosen/edocSite
9c108f18959c63b5b49351a466ef967ca9ae4b89
[ "MIT" ]
1
2021-09-06T15:37:15.000Z
2021-09-06T15:37:15.000Z
other/app.py
JakeWasChosen/edocSite
9c108f18959c63b5b49351a466ef967ca9ae4b89
[ "MIT" ]
null
null
null
other/app.py
JakeWasChosen/edocSite
9c108f18959c63b5b49351a466ef967ca9ae4b89
[ "MIT" ]
null
null
null
from discord.ext import ipc from quart import (Quart, Response, abort, redirect, render_template, request, url_for) from quart_auth import AuthManager, AuthUser, Unauthorized from quart_auth import login_required as auth_required from quart_auth import login_user, logout_user from quart_discord impor...
28.124138
190
0.672388
from discord.ext import ipc from quart import (Quart, Response, abort, redirect, render_template, request, url_for) from quart_auth import AuthManager, AuthUser, Unauthorized from quart_auth import login_required as auth_required from quart_auth import login_user, logout_user from quart_discord impor...
2,349
0
286
c1932981aae5d27f84aa8946aa2b31f263f837b4
294
py
Python
controllers/home.py
SuperOxigen/house-rulse
241f3ca6ad79c464ba513427661b0b36e48cc567
[ "MIT" ]
null
null
null
controllers/home.py
SuperOxigen/house-rulse
241f3ca6ad79c464ba513427661b0b36e48cc567
[ "MIT" ]
null
null
null
controllers/home.py
SuperOxigen/house-rulse
241f3ca6ad79c464ba513427661b0b36e48cc567
[ "MIT" ]
null
null
null
import controllers.base
26.727273
51
0.557823
import controllers.base class HomeController(controllers.base.BaseHandler): def initialize(self, **kwargs): super().initialize(title="House Rules", page_name="Home", **kwargs) def get(self): self.render("home.tt")
164
30
76
ef68d6d98bc622776272a1c456efcf374e60b9f5
15,844
py
Python
ObserverAPI/requests.py
Polsulpicien/ObserverAPI
e7f5fae35e2791a15e1ef48480b9475ee1a8c252
[ "MIT" ]
1
2022-02-22T13:31:33.000Z
2022-02-22T13:31:33.000Z
ObserverAPI/requests.py
Polsulpicien/ObserverAPI
e7f5fae35e2791a15e1ef48480b9475ee1a8c252
[ "MIT" ]
1
2022-02-22T12:27:31.000Z
2022-02-22T12:27:31.000Z
ObserverAPI/requests.py
Polsulpicien/ObserverAPI
e7f5fae35e2791a15e1ef48480b9475ee1a8c252
[ "MIT" ]
null
null
null
import aiohttp from .exception import InvalidAPIKeyError, APIError, NotRegistered, BadRequest from .objects.leaderboards import Leaderboards from .objects.ranking import Ranking from .objects.player import Player, Formatted from .objects.api import Stats, Key from .utils import DEFAULT ##########################...
44.757062
167
0.480371
import aiohttp from .exception import InvalidAPIKeyError, APIError, NotRegistered, BadRequest from .objects.leaderboards import Leaderboards from .objects.ranking import Ranking from .objects.player import Player, Formatted from .objects.api import Stats, Key from .utils import DEFAULT class Observer: def __init_...
14,454
-6
623
2ae0d3f90fa795d0b9377a97965e66868956174a
801
py
Python
sim/models.py
j54854/simulation
4ab899165839c04a500f4ed17315bd732d1f04fc
[ "MIT" ]
null
null
null
sim/models.py
j54854/simulation
4ab899165839c04a500f4ed17315bd732d1f04fc
[ "MIT" ]
null
null
null
sim/models.py
j54854/simulation
4ab899165839c04a500f4ed17315bd732d1f04fc
[ "MIT" ]
null
null
null
from django.db import models # ---------- ---------- ---------- # ---------- ---------- ---------- # ---------- ---------- ---------- # ---------- ---------- ----------
29.666667
60
0.501873
from django.db import models # ---------- ---------- ---------- class Game(models.Model): # ---------- ---------- ---------- score = models.IntegerField(default=0) # ---------- ---------- ---------- def __str__(self): return u"game_{}".format(self.pk) # ---------- ---------- ---------- class State(mod...
96
432
96
008032e0e3d530c52688a36d3e89dccdf8c5e694
3,079
py
Python
Apps/Engines/Nuke/NukeCallBacks/geoff_callbacks/CamProjTab.py
geoffroygivry/CyclopsVFX-Unity
6ab9ab122b6c3e6200e90d49a0c2bf774e53d985
[ "MIT" ]
17
2017-06-27T04:14:42.000Z
2022-03-07T03:37:44.000Z
Apps/Engines/Nuke/NukeCallBacks/geoff_callbacks/CamProjTab.py
geoffroygivry/Cyclops-VFX
6ab9ab122b6c3e6200e90d49a0c2bf774e53d985
[ "MIT" ]
2
2017-06-14T04:17:51.000Z
2018-08-23T20:12:44.000Z
Apps/Engines/Nuke/NukeCallBacks/geoff_callbacks/CamProjTab.py
geoffroygivry/CyclopsVFX-Unity
6ab9ab122b6c3e6200e90d49a0c2bf774e53d985
[ "MIT" ]
2
2019-03-18T06:18:33.000Z
2019-08-14T21:07:53.000Z
#The MIT License (MIT) # #Copyright (c) 2015 Geoffroy Givry # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, m...
43.985714
157
0.717116
#The MIT License (MIT) # #Copyright (c) 2015 Geoffroy Givry # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, m...
1,837
0
99
e36b164f04ff2792e572a9e5d9fc280641f0feb9
1,205
py
Python
test_files/telegram.py
Seabreg/prowler
af79c2c2147486e80ebb8000a3a2f0ab04e4eaca
[ "MIT" ]
103
2018-01-31T12:10:55.000Z
2022-02-03T22:05:19.000Z
test_files/telegram.py
tlkh/infosec-community-hackathon-2017
af79c2c2147486e80ebb8000a3a2f0ab04e4eaca
[ "MIT" ]
3
2018-03-22T09:47:00.000Z
2018-03-31T16:20:54.000Z
test_files/telegram.py
tlkh/infosec-community-hackathon-2017
af79c2c2147486e80ebb8000a3a2f0ab04e4eaca
[ "MIT" ]
33
2018-03-23T10:13:01.000Z
2021-02-13T23:12:33.000Z
import sys import time import telepot from telepot.loop import MessageLoop import pyrebase subbed = [] TOKEN = "" config = { "apiKey": "", "authDomain": "clusterscanner.firebaseio.com", "databaseURL": "https://clusterscanner.firebaseio.com", "storageBucket": "clusterscanner.appspot.com" } firebase =...
25.104167
76
0.659751
import sys import time import telepot from telepot.loop import MessageLoop import pyrebase subbed = [] def handle(msg): content_type, chat_type, chat_id = telepot.glance(msg) bot.sendMessage(chat_id, "k") if msg['text'] == "sub": subbed.append(chat_id) print(subbed) def stream_handler(...
414
0
54
0ed5fb3c21dc44df5783a2e1dbc0a08433708ef8
1,116
py
Python
python-package/lets_plot/frontend_context/_intellij_python_json_ctx.py
OLarionova-HORIS/lets-plot
89e30a574fe2de3da17186acdbe1cf427d66d87f
[ "MIT" ]
768
2019-11-28T14:09:46.000Z
2022-03-30T18:19:28.000Z
python-package/lets_plot/frontend_context/_intellij_python_json_ctx.py
OLarionova-HORIS/lets-plot
89e30a574fe2de3da17186acdbe1cf427d66d87f
[ "MIT" ]
240
2019-12-04T20:15:03.000Z
2022-03-30T17:12:23.000Z
python-package/lets_plot/frontend_context/_intellij_python_json_ctx.py
OLarionova-HORIS/lets-plot
89e30a574fe2de3da17186acdbe1cf427d66d87f
[ "MIT" ]
43
2019-12-05T13:45:32.000Z
2022-03-31T21:27:00.000Z
# # Copyright (c) 2019. JetBrains s.r.o. # Use of this source code is governed by the MIT license that can be found in the LICENSE file. # from typing import Dict, Tuple from ._frontend_ctx import FrontendContext from ._mime_types import LETS_PLOT_JSON from .._type_utils import standardize_dict
28.615385
95
0.706093
# # Copyright (c) 2019. JetBrains s.r.o. # Use of this source code is governed by the MIT license that can be found in the LICENSE file. # from typing import Dict, Tuple from ._frontend_ctx import FrontendContext from ._mime_types import LETS_PLOT_JSON from .._type_utils import standardize_dict class IntellijPython...
385
331
100
f8a9001e9ac048458febbebe445987f1d2a3ecb5
636
py
Python
6/6-11.py
liuhanyu200/pygame
38a68e779e6b0a63edb1758fca98ebbf40bb0444
[ "BSD-3-Clause" ]
null
null
null
6/6-11.py
liuhanyu200/pygame
38a68e779e6b0a63edb1758fca98ebbf40bb0444
[ "BSD-3-Clause" ]
null
null
null
6/6-11.py
liuhanyu200/pygame
38a68e779e6b0a63edb1758fca98ebbf40bb0444
[ "BSD-3-Clause" ]
null
null
null
# -*- coding:utf-8 -*- citys = { 'kunming': { 'country': 'China', 'population': 14000000, 'fact': 'elephint in kunming', }, 'beijing': { 'country': 'China', 'population': 2400000, 'fact': 'changcheng in beijing', }, 'shanghai': { 'country': 'C...
26.5
58
0.496855
# -*- coding:utf-8 -*- citys = { 'kunming': { 'country': 'China', 'population': 14000000, 'fact': 'elephint in kunming', }, 'beijing': { 'country': 'China', 'population': 2400000, 'fact': 'changcheng in beijing', }, 'shanghai': { 'country': 'C...
0
0
0
2eeac121557eb75592da2abdcd9435f8cb7e405c
1,504
py
Python
Graph_TSP.py
chriski777/graph_algorithms
c844e62fa1528b962163b510dc3029344e8caa25
[ "MIT" ]
1
2017-04-24T02:27:15.000Z
2017-04-24T02:27:15.000Z
Graph_TSP.py
chriski777/graph_algorithms
c844e62fa1528b962163b510dc3029344e8caa25
[ "MIT" ]
null
null
null
Graph_TSP.py
chriski777/graph_algorithms
c844e62fa1528b962163b510dc3029344e8caa25
[ "MIT" ]
null
null
null
import algorithms import bounds #Nodes should be a dictionary of key value pairing : node num to xy coordinates #Edges are implied in the adjacency matrix #Adjacency matrix will be n x n; where n is the number of nodes
32.695652
98
0.738032
import algorithms import bounds class Graph_TSP: #Nodes should be a dictionary of key value pairing : node num to xy coordinates #Edges are implied in the adjacency matrix #Adjacency matrix will be n x n; where n is the number of nodes def __init__(self, nodeDict, adjMatrix,instanceName, solution): self.nodeDict...
1,033
-5
252
427fa3e135748cffa2ce0a655fe0ce39a4fdeb25
1,588
py
Python
scripts/mixedalphabet.py
WilliamMayor/present.scytale.xyz
cd7f386bfb2492001c7f14630b18583d1f53bd12
[ "MIT" ]
null
null
null
scripts/mixedalphabet.py
WilliamMayor/present.scytale.xyz
cd7f386bfb2492001c7f14630b18583d1f53bd12
[ "MIT" ]
null
null
null
scripts/mixedalphabet.py
WilliamMayor/present.scytale.xyz
cd7f386bfb2492001c7f14630b18583d1f53bd12
[ "MIT" ]
null
null
null
# -*- coding:utf8 import itertools import time import sys alphabet = u' !"#$%&\'()*+,-./:;<=>?@[\]^_`{£}~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzϕϴΩβε' alphabet_length = len(alphabet) example_key = {alphabet[i]: alphabet[(i + 32) % alphabet_length] for i in xrange(alphabet_length)} if __name__ ...
33.787234
161
0.629723
# -*- coding:utf8 import itertools import time import sys alphabet = u' !"#$%&\'()*+,-./:;<=>?@[\]^_`{£}~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzϕϴΩβε' alphabet_length = len(alphabet) example_key = {alphabet[i]: alphabet[(i + 32) % alphabet_length] for i in xrange(alphabet_length)} def encrypt(...
1,151
0
92
3c13e654c18d02f84b86138df345a310e0ce09d0
208
py
Python
Python Scripts/filehandling.py
ggandhi27/Emotions-Recognition-using-IOT-and-Machine-Learning
316b1bdb9642cb2aa98f80e15b75b262497b35ed
[ "Apache-2.0" ]
1
2019-07-01T17:50:11.000Z
2019-07-01T17:50:11.000Z
Python Scripts/filehandling.py
ggandhi27/Emotions-Recognition-using-IOT-and-Machine-Learning
316b1bdb9642cb2aa98f80e15b75b262497b35ed
[ "Apache-2.0" ]
null
null
null
Python Scripts/filehandling.py
ggandhi27/Emotions-Recognition-using-IOT-and-Machine-Learning
316b1bdb9642cb2aa98f80e15b75b262497b35ed
[ "Apache-2.0" ]
1
2019-04-23T14:29:06.000Z
2019-04-23T14:29:06.000Z
import os
16
37
0.634615
import os def fileExists(filepath): exists = os.path.isfile(filepath) return exists def createCsv(filepath): if fileExists(filepath) == False: f = open(filepath,"w") f.close()
150
0
46
c3b2295032b2e28b9aba423da083d2aab6907d7c
586
py
Python
python/Lab 1/1-1/1-1.py
bitxer/ICT1002
b7c88788b81c1b3e31fc8d61dc757d23ba773675
[ "MIT" ]
1
2021-11-30T11:54:37.000Z
2021-11-30T11:54:37.000Z
python/Lab 1/1-1/1-1.py
bitxer/ICT1002
b7c88788b81c1b3e31fc8d61dc757d23ba773675
[ "MIT" ]
null
null
null
python/Lab 1/1-1/1-1.py
bitxer/ICT1002
b7c88788b81c1b3e31fc8d61dc757d23ba773675
[ "MIT" ]
2
2020-11-20T12:55:41.000Z
2020-11-25T13:15:42.000Z
############################ # Module: ICT1002 # # Language: Python2 # # Lab Exercise 1-1 # # Done By: bitxer # ############################ if __name__ == '__main__': main()
20.206897
56
0.418089
############################ # Module: ICT1002 # # Language: Python2 # # Lab Exercise 1-1 # # Done By: bitxer # ############################ def main(): import sys if len(sys.argv) != 4: print('Your input is invalid!') exit(1) args = [ sys.argv[1], ...
350
0
23
71747ebe639c15b613399ed39eae691ea7038c08
1,153
py
Python
core/xmlrpc.py
shijieqin/flatfish
2db30ede58493da3b6970518422f6fce53cbc5fb
[ "Apache-2.0" ]
7
2018-11-14T11:18:15.000Z
2020-02-24T05:59:08.000Z
core/xmlrpc.py
shijieqin/flatfish
2db30ede58493da3b6970518422f6fce53cbc5fb
[ "Apache-2.0" ]
7
2019-05-19T11:17:57.000Z
2021-06-10T21:14:45.000Z
core/xmlrpc.py
shijieqin/flatfish
2db30ede58493da3b6970518422f6fce53cbc5fb
[ "Apache-2.0" ]
1
2018-11-14T11:18:45.000Z
2018-11-14T11:18:45.000Z
#!/usr/bin/env python # encoding: utf-8 """ @version: v1.0 @author: Shijie Qin @license: Apache Licence @contact: qsj4work@gmail.com @site: https://shijieqin.github.io @software: PyCharm @file: xmlrpc.py @time: 2018/11/8 3:16 PM """ import xmlrpc.client
25.065217
77
0.538595
#!/usr/bin/env python # encoding: utf-8 """ @version: v1.0 @author: Shijie Qin @license: Apache Licence @contact: qsj4work@gmail.com @site: https://shijieqin.github.io @software: PyCharm @file: xmlrpc.py @time: 2018/11/8 3:16 PM """ import xmlrpc.client class XmlRpc: @staticmethod def connection(...
781
81
23
995d3fa1aaa5bcde321d358ad82b4832b6afb7dc
4,847
py
Python
django_push/subscriber/models.py
bwold001/django-push
ee83ff553aa4bdf2ff969f5443971450cdd25eb5
[ "BSD-3-Clause" ]
38
2015-02-04T15:48:01.000Z
2020-12-27T19:34:28.000Z
django_push/subscriber/models.py
bwold001/django-push
ee83ff553aa4bdf2ff969f5443971450cdd25eb5
[ "BSD-3-Clause" ]
12
2015-04-03T23:35:40.000Z
2019-05-27T09:46:49.000Z
cvproject/Lib/site-packages/django_push/subscriber/models.py
MdReyajuddin/Big-Project-Codes
79ab22f2f51e29e2ff17f680306877559c719a56
[ "BSD-3-Clause" ]
9
2015-02-15T08:13:03.000Z
2019-06-02T17:23:57.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from datetime import timedelta try: from urllib.parse import urlparse except ImportError: # python2 from urlparse import urlparse import requests from django.conf import settings from django.db import models, transaction from d...
34.375887
79
0.623478
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from datetime import timedelta try: from urllib.parse import urlparse except ImportError: # python2 from urlparse import urlparse import requests from django.conf import settings from django.db import models, transaction from d...
3,249
952
95
f1f9fefa181303ad0b37663b760946e7e248ff1f
493
py
Python
aio_jsonrpc_20/exception.py
Hellzed/aio-jsonrpc-2.0
75d2397931429c5126e420b5e7d7ba87c24bc8ad
[ "MIT" ]
6
2017-03-16T12:48:12.000Z
2020-11-11T03:39:41.000Z
aio_jsonrpc_20/exception.py
Hellzed/aio-jsonrpc-2.0
75d2397931429c5126e420b5e7d7ba87c24bc8ad
[ "MIT" ]
2
2017-05-29T14:52:58.000Z
2017-06-09T09:41:55.000Z
aio_jsonrpc_20/exception.py
Hellzed/aio-jsonrpc-2.0
75d2397931429c5126e420b5e7d7ba87c24bc8ad
[ "MIT" ]
4
2019-04-16T15:33:44.000Z
2020-11-11T03:41:33.000Z
import logging logger = logging.getLogger(__name__)
19.72
59
0.622718
import logging logger = logging.getLogger(__name__) class AioJsonRpcException(Exception): pass class InvalidRequestException(AioJsonRpcException): pass class CustomJsonRpcException(AioJsonRpcException): def __init__(self, code, data): self.code = code self.data = data if not...
248
93
95
a2f46f948812b574bfb821e3dd180e8f192381e8
2,198
py
Python
DiscoverConstraints/dc/utility.py
meghu2791/Profiler
2cf58e30b4f146d6d0124181608cfd69621359f6
[ "MIT" ]
null
null
null
DiscoverConstraints/dc/utility.py
meghu2791/Profiler
2cf58e30b4f146d6d0124181608cfd69621359f6
[ "MIT" ]
null
null
null
DiscoverConstraints/dc/utility.py
meghu2791/Profiler
2cf58e30b4f146d6d0124181608cfd69621359f6
[ "MIT" ]
null
null
null
import numpy as np from scipy import stats from copy import copy import csv import math import pandas as pd """ Get the unique values for each column in a dataset. - value_dic = {col_num:{row_value:index}} """ """ Takes a dataset of strings and returns the integer mapping of the string values. - return_dic: True - ...
26.166667
73
0.61283
import numpy as np from scipy import stats from copy import copy import csv import math import pandas as pd """ Get the unique values for each column in a dataset. - value_dic = {col_num:{row_value:index}} """ def unique_bins(value_dic): # value_dic = {col_num:{row_value:index}} bins = [] for i in value...
1,505
0
66
d104710ef497f6757e667d92502fcd7af2b4a450
658
py
Python
problems/data/parsers/BugsDictParser.py
xcsp3team/pycsp3
a11bc370e34cd3fe37faeae9a5df935fcbd7770d
[ "MIT" ]
28
2019-12-14T09:25:52.000Z
2022-03-24T08:15:13.000Z
problems/data/parsers/BugsDictParser.py
xcsp3team/pycsp3
a11bc370e34cd3fe37faeae9a5df935fcbd7770d
[ "MIT" ]
7
2020-04-15T11:02:07.000Z
2022-01-20T12:48:54.000Z
problems/data/parsers/BugsDictParser.py
xcsp3team/pycsp3
a11bc370e34cd3fe37faeae9a5df935fcbd7770d
[ "MIT" ]
3
2020-04-15T08:23:45.000Z
2021-12-07T14:02:28.000Z
from pycsp3.problems.data.parsing import * next_line() data["height"] = next_int() data["width"] = next_int() next_line() nBugTypes = next_int() next_line() bugTypesLength = [next_int() for i in range(nBugTypes)]; next_line() nBugs = next_int() next_line() data["bugs"] = [] data["bugTypes"] = [] lst = [False] * nB...
23.5
68
0.647416
from pycsp3.problems.data.parsing import * next_line() data["height"] = next_int() data["width"] = next_int() next_line() nBugTypes = next_int() next_line() bugTypesLength = [next_int() for i in range(nBugTypes)]; next_line() nBugs = next_int() next_line() data["bugs"] = [] data["bugTypes"] = [] lst = [False] * nB...
0
0
0
470477c3432a8916b44e2abb2e333da2227a6361
959
py
Python
FluentPython/chapter11_Tombola/tombolalist.py
Liuzkai/PythonScript
fb21ad80e085f6390ae970b81404f7e5c7923f4e
[ "MIT" ]
1
2021-01-16T16:09:33.000Z
2021-01-16T16:09:33.000Z
FluentPython/chapter11_Tombola/tombolalist.py
Liuzkai/PythonScript
fb21ad80e085f6390ae970b81404f7e5c7923f4e
[ "MIT" ]
null
null
null
FluentPython/chapter11_Tombola/tombolalist.py
Liuzkai/PythonScript
fb21ad80e085f6390ae970b81404f7e5c7923f4e
[ "MIT" ]
1
2021-01-16T16:09:36.000Z
2021-01-16T16:09:36.000Z
# 使用注册的方法来实现虚拟子类有两种方法:一个是使用修饰器,一个是使用register函数 import sys sys.path.extend(r'/Users/liuzhongkai/Documents/Git/PythonScript/FluentPython/chapter11_Tombola/') from random import randrange from tombola import Tombola # 使用第一种方法 @Tombola.register # 使用基类的register修饰器来创建虚拟子类
30.935484
97
0.672576
# 使用注册的方法来实现虚拟子类有两种方法:一个是使用修饰器,一个是使用register函数 import sys sys.path.extend(r'/Users/liuzhongkai/Documents/Git/PythonScript/FluentPython/chapter11_Tombola/') from random import randrange from tombola import Tombola # 使用第一种方法 @Tombola.register # 使用基类的register修饰器来创建虚拟子类 class TombolaList(list): # 实际继承了list类,亦可称为对list...
283
660
22
a3b6cbb6b29d943004453bf248d838b10100cb4d
34,786
py
Python
sdk/containerregistry/azure-mgmt-containerregistry/tests/test_cli_mgmt_containerregistry_registry.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/containerregistry/azure-mgmt-containerregistry/tests/test_cli_mgmt_containerregistry_registry.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/containerregistry/azure-mgmt-containerregistry/tests/test_cli_mgmt_containerregistry_registry.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding: utf-8 #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #----------------------------------------------------------------------...
60.287695
3,335
0.575576
# 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. #----------------------------------------------------------------------...
33,158
668
23
394ee3eb7fd07b384e0d3cdf5e42bfc56efa8720
298
py
Python
app/api/urls.py
P4R/django-graphql-api-z1
5b469384631e8e916567865b659641ac5710dfb3
[ "MIT" ]
null
null
null
app/api/urls.py
P4R/django-graphql-api-z1
5b469384631e8e916567865b659641ac5710dfb3
[ "MIT" ]
null
null
null
app/api/urls.py
P4R/django-graphql-api-z1
5b469384631e8e916567865b659641ac5710dfb3
[ "MIT" ]
null
null
null
from django.urls import path from django.views.decorators.csrf import csrf_exempt from graphene_django.views import GraphQLView from api.schema import schema urlpatterns = [ path( "graphql", csrf_exempt( GraphQLView.as_view(graphiql=True, schema=schema)) ), ]
21.285714
62
0.708054
from django.urls import path from django.views.decorators.csrf import csrf_exempt from graphene_django.views import GraphQLView from api.schema import schema urlpatterns = [ path( "graphql", csrf_exempt( GraphQLView.as_view(graphiql=True, schema=schema)) ), ]
0
0
0
74ee42e759a2f234d0253ececae9620ff4a89dbd
5,889
py
Python
scripts/python/PostAlignmentLogToDatabase.py
cmatKhan/rnaseq_pipeline_rewrite
f742c409e57b1bc642bf874206adc2db7fc1de08
[ "MIT" ]
null
null
null
scripts/python/PostAlignmentLogToDatabase.py
cmatKhan/rnaseq_pipeline_rewrite
f742c409e57b1bc642bf874206adc2db7fc1de08
[ "MIT" ]
null
null
null
scripts/python/PostAlignmentLogToDatabase.py
cmatKhan/rnaseq_pipeline_rewrite
f742c409e57b1bc642bf874206adc2db7fc1de08
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Parse novoalign log, write out qc and post to database usage: author: chase.mateusiak@gmail.com output: {'librarySize': 35003, 'uniqueAlignment': 22737, 'multiMap': 1986, 'noMap': 10233, 'homopolymerFilter': 47, 'readLengthFilter': 0} output: parsed novoalign log as csv ...
43.622222
183
0.651893
#!/usr/bin/env python """ Parse novoalign log, write out qc and post to database usage: author: chase.mateusiak@gmail.com output: {'librarySize': 35003, 'uniqueAlignment': 22737, 'multiMap': 1986, 'noMap': 10233, 'homopolymerFilter': 47, 'readLengthFilter': 0} output: parsed novoalign log as csv ...
3,090
0
46
7cf1430a6614a1eced51b5baf47c7b35cd71cbf4
4,495
py
Python
src/supplement_code/parallel_go_annotation_from_eggnog.py
NTU-CGM/MiDSystem
0d7dadafe4811ec9d1c0df03e99d7c479e8c7f1d
[ "MIT" ]
null
null
null
src/supplement_code/parallel_go_annotation_from_eggnog.py
NTU-CGM/MiDSystem
0d7dadafe4811ec9d1c0df03e99d7c479e8c7f1d
[ "MIT" ]
null
null
null
src/supplement_code/parallel_go_annotation_from_eggnog.py
NTU-CGM/MiDSystem
0d7dadafe4811ec9d1c0df03e99d7c479e8c7f1d
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Parsing GO Accession from a table file produced by InterProScan and mapping to GOSlim. (c) Chien-Yueh Lee 2018 / MIT Licence kinomoto[AT]sakura[DOT]idv[DOT]tw """ from __future__ import print_function from os import path import sys import pandas as pd from goatools.obo_parser import GODag fro...
44.50495
256
0.710567
#!/usr/bin/env python """ Parsing GO Accession from a table file produced by InterProScan and mapping to GOSlim. (c) Chien-Yueh Lee 2018 / MIT Licence kinomoto[AT]sakura[DOT]idv[DOT]tw """ from __future__ import print_function from os import path import sys import pandas as pd from goatools.obo_parser import GODag fro...
805
0
23
337025729666ac911883a7279d459a0b641c02a3
1,499
py
Python
rules/vulnerabilities/rule_redis-dump-keys.py
TomasTorresB/nerve
3a5381648999bede564e27facfd24f883cd143f9
[ "MIT" ]
365
2020-09-23T22:29:35.000Z
2022-03-31T00:05:08.000Z
rules/vulnerabilities/rule_redis-dump-keys.py
TomasTorresB/nerve
3a5381648999bede564e27facfd24f883cd143f9
[ "MIT" ]
19
2020-10-01T01:10:04.000Z
2022-01-25T19:22:33.000Z
rules/vulnerabilities/rule_redis-dump-keys.py
TomasTorresB/nerve
3a5381648999bede564e27facfd24f883cd143f9
[ "MIT" ]
94
2020-09-28T21:03:30.000Z
2022-03-28T11:05:04.000Z
import socket from core.redis import rds from core.triage import Triage from core.parser import ScanParser from db.db_ports import database_ports
28.283019
127
0.623082
import socket from core.redis import rds from core.triage import Triage from core.parser import ScanParser from db.db_ports import database_ports class Rule: def __init__(self): self.rule = 'VLN_E034' self.rule_severity = 3 self.rule_description = 'This rule checks for Open Redis Instances' sel...
1,281
-10
72
d8e6136cd758cae1b52a15b5d58b07266b3ee4f3
128
py
Python
Sem5SLLPYTHON/demo/reduce.py
tanisha03/5th-Sem-ISE
7adc291057e290572be3b52493a797aef167992f
[ "MIT" ]
1
2019-10-18T15:19:38.000Z
2019-10-18T15:19:38.000Z
Sem5SLLPYTHON/demo/reduce.py
tanisha03/5th-Sem-ISE
7adc291057e290572be3b52493a797aef167992f
[ "MIT" ]
2
2019-10-19T12:38:52.000Z
2019-12-23T11:05:18.000Z
Sem5SLLPYTHON/demo/reduce.py
tanisha03/5th-Sem-ISE
7adc291057e290572be3b52493a797aef167992f
[ "MIT" ]
19
2019-09-15T12:04:30.000Z
2020-10-02T13:21:28.000Z
# from functools import reduce wordlen = [2,3,4,2] sum = reduce(lambda x,y : x+y ,wordlen ) print(sum) print(sum/len(wordlen))
21.333333
40
0.6875
# from functools import reduce wordlen = [2,3,4,2] sum = reduce(lambda x,y : x+y ,wordlen ) print(sum) print(sum/len(wordlen))
0
0
0
b00fdf645e24fa341a96a6d75f969fd9667dde7e
5,467
py
Python
py2cytoscape/cyrest/base.py
g-simmons2/py2cytoscape
e2cd1c5d598e1da02f50273e958ddf574c523eb8
[ "MIT" ]
97
2018-01-23T00:20:51.000Z
2022-03-11T05:01:01.000Z
py2cytoscape/cyrest/base.py
g-simmons2/py2cytoscape
e2cd1c5d598e1da02f50273e958ddf574c523eb8
[ "MIT" ]
64
2018-01-24T14:51:20.000Z
2022-02-21T01:05:02.000Z
py2cytoscape/cyrest/base.py
g-simmons2/py2cytoscape
e2cd1c5d598e1da02f50273e958ddf574c523eb8
[ "MIT" ]
25
2018-01-20T20:29:39.000Z
2021-04-09T17:28:58.000Z
import sys import requests import urllib.request as urllib2 import json from json import JSONDecodeError HOST = 'localhost' IP=HOST # temporary PORT = 1234 VERSION = 'v1' BASE_URL = 'http://' + HOST + ':' + str(PORT) + '/' + VERSION + '/' HEADERS = {'Content-Type': 'application/json'} VERBOSE=False SUID_LIST = '...
27.892857
163
0.546003
import sys import requests import urllib.request as urllib2 import json from json import JSONDecodeError HOST = 'localhost' IP=HOST # temporary PORT = 1234 VERSION = 'v1' BASE_URL = 'http://' + HOST + ':' + str(PORT) + '/' + VERSION + '/' HEADERS = {'Content-Type': 'application/json'} VERBOSE=False SUID_LIST = '...
1,186
0
122
e1a7b62d1b6436c85a68e5005a88db5375a0b92a
17,621
py
Python
mava/utils/environments/RoboCup_env/robocup_utils/player_world_model.py
1998x-stack/Mava
2c8f7f59f235340886e92045b6730cf5a542a496
[ "Apache-2.0" ]
1
2022-03-19T12:51:16.000Z
2022-03-19T12:51:16.000Z
mava/utils/environments/RoboCup_env/robocup_utils/player_world_model.py
1998x-stack/Mava
2c8f7f59f235340886e92045b6730cf5a542a496
[ "Apache-2.0" ]
null
null
null
mava/utils/environments/RoboCup_env/robocup_utils/player_world_model.py
1998x-stack/Mava
2c8f7f59f235340886e92045b6730cf5a542a496
[ "Apache-2.0" ]
null
null
null
# python3 # Copyright 2021 InstaDeep Ltd. 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 applic...
32.875
82
0.599682
# python3 # Copyright 2021 InstaDeep Ltd. 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 applic...
2,659
0
112
d6199345f3b02c33dea17eed354597e189a3c22c
362
py
Python
.history/SteeringTest_20190119133825.py
zhenglitao1/piCar
b8f77f28ea61159c55746b0a3474ebfc3c66b6ba
[ "Apache-2.0" ]
null
null
null
.history/SteeringTest_20190119133825.py
zhenglitao1/piCar
b8f77f28ea61159c55746b0a3474ebfc3c66b6ba
[ "Apache-2.0" ]
null
null
null
.history/SteeringTest_20190119133825.py
zhenglitao1/piCar
b8f77f28ea61159c55746b0a3474ebfc3c66b6ba
[ "Apache-2.0" ]
null
null
null
from SteeringModule.Steering import Steering import time steer=Steering(14,0,180,15,90,180,36,160) steer.setup() time.sleep(2) for i in range(0,900): steer.Up() for i in range(0,900): steer.Down() for i in range(0,900): steer.Left() for i in range(0,900): steer.Right() steer.specify(80,120) steer.specify(20,100...
15.73913
44
0.718232
from SteeringModule.Steering import Steering import time steer=Steering(14,0,180,15,90,180,36,160) steer.setup() time.sleep(2) for i in range(0,900): steer.Up() for i in range(0,900): steer.Down() for i in range(0,900): steer.Left() for i in range(0,900): steer.Right() steer.specify(80,120) steer.specify(20,100...
0
0
0
9c26595469c213773920f44763083b599458d6dc
25,051
py
Python
pycab/CabStructs.py
n3k/PyCAB
665544ec1d81c76d233dfca2c7c75cd11605ae5c
[ "MIT" ]
5
2015-09-24T20:50:51.000Z
2016-12-09T06:05:27.000Z
pycab/CabStructs.py
n3k/PyCAB
665544ec1d81c76d233dfca2c7c75cd11605ae5c
[ "MIT" ]
null
null
null
pycab/CabStructs.py
n3k/PyCAB
665544ec1d81c76d233dfca2c7c75cd11605ae5c
[ "MIT" ]
5
2015-10-20T08:31:36.000Z
2020-09-09T11:56:02.000Z
# coding=utf-8 import struct import datetime from abc import ABCMeta, abstractmethod from weakref import WeakKeyDictionary class DWORDValue(object): """A descriptor for DWORD values""" class WORDValue(object): """A descriptor for WORD values""" class BYTEValue(object): """A descriptor for ...
34.222678
117
0.561734
# coding=utf-8 import struct import datetime from abc import ABCMeta, abstractmethod from weakref import WeakKeyDictionary class DWORDValue(object): """A descriptor for DWORD values""" def __init__(self): self.data = WeakKeyDictionary() def __get__(self, obj, type): return stru...
15,594
0
1,839
fa13cd249d8d04bf26c075693fc1bc4cee02e73e
15,720
py
Python
tests/test_12_op_func.py
bitman694/oidctest
dc405530ebee3e442337979fe28a179a23c7926c
[ "Apache-2.0" ]
null
null
null
tests/test_12_op_func.py
bitman694/oidctest
dc405530ebee3e442337979fe28a179a23c7926c
[ "Apache-2.0" ]
null
null
null
tests/test_12_op_func.py
bitman694/oidctest
dc405530ebee3e442337979fe28a179a23c7926c
[ "Apache-2.0" ]
null
null
null
import json from oic import rndstr from oic.utils.keyio import build_keyjar from otest.check import ERROR from otest.test_setup import setup_conv from oidctest.op.func import check_support from oidctest.op.func import claims_locales from oidctest.op.func import login_hint from oidctest.op.func import store_sector_red...
33.806452
879
0.700318
import json from oic import rndstr from oic.utils.keyio import build_keyjar from otest.check import ERROR from otest.test_setup import setup_conv from oidctest.op.func import check_support from oidctest.op.func import claims_locales from oidctest.op.func import login_hint from oidctest.op.func import store_sector_red...
12,995
0
736
9347b1ee1acaf2c23418b01cc644a455cfc6647a
3,249
py
Python
vc_buildserver/database/__init__.py
ddevassy/vc-buildserver
80da7d6c4cc2d104a96900130a845b40adc946e6
[ "MIT" ]
null
null
null
vc_buildserver/database/__init__.py
ddevassy/vc-buildserver
80da7d6c4cc2d104a96900130a845b40adc946e6
[ "MIT" ]
null
null
null
vc_buildserver/database/__init__.py
ddevassy/vc-buildserver
80da7d6c4cc2d104a96900130a845b40adc946e6
[ "MIT" ]
null
null
null
# Import In-Built Modules import logging import asyncio import aiopg.sa from motor.motor_asyncio import AsyncIOMotorClient from pymongo import MongoClient from aiohttp import web log = logging.getLogger(__name__) async def init_pg(app: web.Application) -> None: """ A function that, when the server is started,...
28.008621
94
0.637427
# Import In-Built Modules import logging import asyncio import aiopg.sa from motor.motor_asyncio import AsyncIOMotorClient from pymongo import MongoClient from aiohttp import web log = logging.getLogger(__name__) async def init_pg(app: web.Application) -> None: """ A function that, when the server is started,...
0
0
0
400794c6744c4d0e76c2a5efde8556347f44c134
8,320
py
Python
utils/remap.py
fsanges/glTools
8ff0899de43784a18bd4543285655e68e28fb5e5
[ "MIT" ]
165
2015-01-26T05:22:04.000Z
2022-03-22T02:50:41.000Z
utils/remap.py
qeeji/glTools
8ff0899de43784a18bd4543285655e68e28fb5e5
[ "MIT" ]
5
2015-12-02T02:39:44.000Z
2020-12-09T02:45:54.000Z
utils/remap.py
qeeji/glTools
8ff0899de43784a18bd4543285655e68e28fb5e5
[ "MIT" ]
83
2015-02-10T17:18:24.000Z
2022-02-10T07:16:47.000Z
import maya.cmds as mc import glTools.utils.attribute import types class Remap(object): ''' Object wrapper for remapValue node in Maya. ''' # CONSTANTS _REMAPSUFFIX = 'remap' def __init__( self, remapName, inputValue = None, inputMin = None, inputMax = None, outputMin = None, ...
29.192982
124
0.697596
import maya.cmds as mc import glTools.utils.attribute import types class Remap(object): ''' Object wrapper for remapValue node in Maya. ''' # CONSTANTS _REMAPSUFFIX = 'remap' def __init__( self, remapName, inputValue = None, inputMin = None, inputMax = None, outputMin = None, ...
36
0
48
82f5e3a2098b2efde80e3d5180fe2c7719bd6c2b
1,624
py
Python
demo/src/extract_candidate_labels.py
ucla-hci/video-a11y
42bce0fe166b0c45691f8c2a381fc1bdf779144b
[ "MIT" ]
null
null
null
demo/src/extract_candidate_labels.py
ucla-hci/video-a11y
42bce0fe166b0c45691f8c2a381fc1bdf779144b
[ "MIT" ]
null
null
null
demo/src/extract_candidate_labels.py
ucla-hci/video-a11y
42bce0fe166b0c45691f8c2a381fc1bdf779144b
[ "MIT" ]
null
null
null
import spacy nlp = spacy.load('en_core_web_sm') path = './GMVbQ1UsMp8.txt' with open(path, 'r') as file_to_read: subtitle = file_to_read.read() doc = nlp(subtitle) candidate_captions = [] for np in doc.noun_chunks: print(np.text) candidate_captions.append(np.text) import clip import torch from torchvis...
35.304348
160
0.730296
import spacy nlp = spacy.load('en_core_web_sm') path = './GMVbQ1UsMp8.txt' with open(path, 'r') as file_to_read: subtitle = file_to_read.read() doc = nlp(subtitle) candidate_captions = [] for np in doc.noun_chunks: print(np.text) candidate_captions.append(np.text) import clip import torch from torchvis...
0
0
0
d7448a4814b1b03f14236c291b941745a1b17474
338
py
Python
pokemonfans/migrations/0018_remove_pokemon_description.py
lowdensh/pokefan
553be197c014f6f145c578b0aececeb06b47016d
[ "MIT" ]
1
2020-11-04T21:14:50.000Z
2020-11-04T21:14:50.000Z
pokemonfans/migrations/0018_remove_pokemon_description.py
lowdensh/pokefan
553be197c014f6f145c578b0aececeb06b47016d
[ "MIT" ]
null
null
null
pokemonfans/migrations/0018_remove_pokemon_description.py
lowdensh/pokefan
553be197c014f6f145c578b0aececeb06b47016d
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2020-10-27 20:31 from django.db import migrations
18.777778
51
0.60355
# Generated by Django 3.1.2 on 2020-10-27 20:31 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('pokemonfans', '0017_auto_20201027_2028'), ] operations = [ migrations.RemoveField( model_name='pokemon', name='description',...
0
232
23
b9f7ed0fa2295b30e3a5c1465aacb5c324bd74c1
935
py
Python
src/wai/json/serialise/_JSONBiserialisable.py
waikato-datamining/wai-json
cb013fb16e7c1b8d91e040a387a143d29d4ced96
[ "MIT" ]
null
null
null
src/wai/json/serialise/_JSONBiserialisable.py
waikato-datamining/wai-json
cb013fb16e7c1b8d91e040a387a143d29d4ced96
[ "MIT" ]
2
2020-07-30T22:41:42.000Z
2021-09-21T23:18:06.000Z
src/wai/json/serialise/_JSONBiserialisable.py
waikato-datamining/wai-json
cb013fb16e7c1b8d91e040a387a143d29d4ced96
[ "MIT" ]
null
null
null
from abc import ABC from wai.common.decorator import ensure_error_type from ..error import JSONSerialisationError from ._JSONSerialisable import JSONSerialisable from ._JSONDeserialisable import JSONDeserialisable, SelfType class JSONBiserialisable(JSONSerialisable, JSONDeserialisable[SelfType], ABC): """ I...
35.961538
100
0.722995
from abc import ABC from wai.common.decorator import ensure_error_type from ..error import JSONSerialisationError from ._JSONSerialisable import JSONSerialisable from ._JSONDeserialisable import JSONDeserialisable, SelfType class JSONBiserialisable(JSONSerialisable, JSONDeserialisable[SelfType], ABC): """ I...
0
0
0
ee55fd74cecf372e299b95f182e59846788c14a3
8,980
py
Python
openvizsla/sniffer.py
xairy/pyopenvizsla
07dd76e5671e9a54c01483f865d68d63437f8225
[ "BSD-2-Clause" ]
16
2019-06-20T13:31:16.000Z
2022-01-18T14:36:28.000Z
openvizsla/sniffer.py
xairy/pyopenvizsla
07dd76e5671e9a54c01483f865d68d63437f8225
[ "BSD-2-Clause" ]
1
2021-12-06T19:50:38.000Z
2021-12-06T19:50:38.000Z
openvizsla/sniffer.py
xairy/pyopenvizsla
07dd76e5671e9a54c01483f865d68d63437f8225
[ "BSD-2-Clause" ]
5
2020-03-30T21:05:39.000Z
2022-01-20T18:27:56.000Z
""" Core USB packet sniffer packet backend for OpenVizsla. """ import crcmod from enum import IntFlag from .protocol import OVPacketHandler class USBEventFlags(IntFlag): """ Enum representing the various flags an OV device can attach to a packet. """ # Physical layer error ERROR = 0x01 # RX Path...
30.544218
118
0.479733
""" Core USB packet sniffer packet backend for OpenVizsla. """ import crcmod from enum import IntFlag from .protocol import OVPacketHandler def hd(x): return " ".join("%02x" % i for i in x) class USBEventFlags(IntFlag): """ Enum representing the various flags an OV device can attach to a packet. """ #...
5,486
0
157
18726d123a1894f010848cc19c8c1ab9ed2153a0
286
py
Python
src/losses/__init__.py
Top-Secrt-Fellows/EVE
1b67be5331ffd70a9e4f34762535e443908c537e
[ "MIT" ]
1
2021-03-27T08:11:02.000Z
2021-03-27T08:11:02.000Z
src/losses/__init__.py
Vincen-31/EVE
1b67be5331ffd70a9e4f34762535e443908c537e
[ "MIT" ]
null
null
null
src/losses/__init__.py
Vincen-31/EVE
1b67be5331ffd70a9e4f34762535e443908c537e
[ "MIT" ]
null
null
null
from ..losses.cross_entropy import CrossEntropyLoss from ..losses.euclidean import EuclideanLoss from ..losses.angular import AngularLoss from ..losses.mse import MSELoss from ..losses.l1 import L1Loss __all__ = ('CrossEntropyLoss', 'EuclideanLoss', 'AngularLoss', 'MSELoss', 'L1Loss')
40.857143
83
0.793706
from ..losses.cross_entropy import CrossEntropyLoss from ..losses.euclidean import EuclideanLoss from ..losses.angular import AngularLoss from ..losses.mse import MSELoss from ..losses.l1 import L1Loss __all__ = ('CrossEntropyLoss', 'EuclideanLoss', 'AngularLoss', 'MSELoss', 'L1Loss')
0
0
0
504177dc265c6436cc9b866f874911a9a32a52dc
223
py
Python
src/bindings/python/example.py
alex952/properties
491fa62c78ea5d6a6c35ba406a59ab1b533a9fab
[ "MIT" ]
2
2018-07-24T08:11:45.000Z
2018-08-06T15:56:59.000Z
src/bindings/python/example.py
alex952/properties
491fa62c78ea5d6a6c35ba406a59ab1b533a9fab
[ "MIT" ]
2
2018-10-15T08:00:49.000Z
2018-10-24T14:29:18.000Z
src/bindings/python/example.py
alex952/properties
491fa62c78ea5d6a6c35ba406a59ab1b533a9fab
[ "MIT" ]
5
2018-10-18T09:14:57.000Z
2020-11-12T13:46:25.000Z
# # Copyright 2014-2018 Neueda Ltd. # import Config props = Config.properties () print props.getKeys () try: print props['invalid-key'] except Exception as e: print e props['test'] = '1234' print props['test']
12.388889
33
0.672646
# # Copyright 2014-2018 Neueda Ltd. # import Config props = Config.properties () print props.getKeys () try: print props['invalid-key'] except Exception as e: print e props['test'] = '1234' print props['test']
0
0
0
56f8a3b927528eef103f82c3a05a1fce2c790754
516
py
Python
employee_management/templates/pages/temp.py
Vivekananthan112599/Frappe-Vivek
6a2b70c736e17e9748c6a30e5722341acfb3b5c5
[ "MIT" ]
null
null
null
employee_management/templates/pages/temp.py
Vivekananthan112599/Frappe-Vivek
6a2b70c736e17e9748c6a30e5722341acfb3b5c5
[ "MIT" ]
null
null
null
employee_management/templates/pages/temp.py
Vivekananthan112599/Frappe-Vivek
6a2b70c736e17e9748c6a30e5722341acfb3b5c5
[ "MIT" ]
null
null
null
import frappe # @frappe.whitelist() # # def get_wallet(): # # s = frappe.db.get_list('Wallet Transaction', filters={ # # 'docstatus': 1}, fields=['name', 'date', 'customer_name', 'product_price']) # # return s
39.692308
99
0.507752
import frappe # @frappe.whitelist() # # def get_wallet(): # # s = frappe.db.get_list('Wallet Transaction', filters={ # # 'docstatus': 1}, fields=['name', 'date', 'customer_name', 'product_price']) # # return s def get_context(context): print("****************************//////////////////...
257
0
23
d942032d07cb4627e2c625c140444615d98609f0
3,303
py
Python
examples/UAVSAR/plot_criteria_rank_estimation.py
antoinecollas/Low-Rank-Statistical-Testing
934df39f98ccb8c8175c34731f27f8f6d020972b
[ "Apache-2.0" ]
null
null
null
examples/UAVSAR/plot_criteria_rank_estimation.py
antoinecollas/Low-Rank-Statistical-Testing
934df39f98ccb8c8175c34731f27f8f6d020972b
[ "Apache-2.0" ]
null
null
null
examples/UAVSAR/plot_criteria_rank_estimation.py
antoinecollas/Low-Rank-Statistical-Testing
934df39f98ccb8c8175c34731f27f8f6d020972b
[ "Apache-2.0" ]
null
null
null
############################################################################## # Compute rank statistics # WARNING: will download about 28 Go of data # Authored by Ammar Mian, 10/01/2019 # e-mail: ammar.mian@centralesupelec.fr # Modified by Antoine Collas, 10/2019 # e-mail: antoine.collas@centralesupelec.fr ###########...
36.7
125
0.659098
############################################################################## # Compute rank statistics # WARNING: will download about 28 Go of data # Authored by Ammar Mian, 10/01/2019 # e-mail: ammar.mian@centralesupelec.fr # Modified by Antoine Collas, 10/2019 # e-mail: antoine.collas@centralesupelec.fr ###########...
0
0
0
96b445f9975b6037d358b6806bbfb97a17fde4f3
480
py
Python
CalibMuon/Configuration/python/RPC_FrontierConditions_IntDB_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
CalibMuon/Configuration/python/RPC_FrontierConditions_IntDB_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
CalibMuon/Configuration/python/RPC_FrontierConditions_IntDB_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
# The following comments couldn't be translated into the new config version: #cms_conditions_data/CMS_COND_20X_RPC" import FWCore.ParameterSet.Config as cms # #RPC calibrations #For now, no t0 corrections are applied in the reconstruction if fake calibration is used #(the replace should be moved to main cfg in order ...
34.285714
89
0.820833
# The following comments couldn't be translated into the new config version: #cms_conditions_data/CMS_COND_20X_RPC" import FWCore.ParameterSet.Config as cms # #RPC calibrations #For now, no t0 corrections are applied in the reconstruction if fake calibration is used #(the replace should be moved to main cfg in order ...
0
0
0
e9a4b6ffb4eb84ca75fef600349898dd41fa808a
3,107
py
Python
pos/webpos/models.py
NonnEmilia/OpenGenfri
7061957fb13ef824763922e1891cb72f7d51bb0f
[ "MIT" ]
null
null
null
pos/webpos/models.py
NonnEmilia/OpenGenfri
7061957fb13ef824763922e1891cb72f7d51bb0f
[ "MIT" ]
null
null
null
pos/webpos/models.py
NonnEmilia/OpenGenfri
7061957fb13ef824763922e1891cb72f7d51bb0f
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import User # Location class, used to determine from wich actual pos location the cashier # is working (ex. Bar, restaurant, ...) # Category class, used as a container for different type of items, related by # area (ex. Kitchen, beverages, ...) # Item cla...
33.771739
77
0.715159
from django.db import models from django.contrib.auth.models import User # Location class, used to determine from wich actual pos location the cashier # is working (ex. Bar, restaurant, ...) class Location(models.Model): id = models.AutoField(primary_key=True) description = models.CharField(max_length=30) ...
333
2,106
115
983c9f902a40554b01cebf2de55e79a311044052
31,598
py
Python
scripts/IK_9SEG.py
XiaojiaoChen/origarm_ros
59d1b05e9c13c50a9281ab2a670621f3f04d8cc1
[ "MIT" ]
1
2020-04-30T10:05:38.000Z
2020-04-30T10:05:38.000Z
scripts/IK_9SEG.py
XiaojiaoChen/origarm_ros
59d1b05e9c13c50a9281ab2a670621f3f04d8cc1
[ "MIT" ]
1
2020-05-01T08:16:06.000Z
2020-05-01T08:16:06.000Z
scripts/IK_9SEG.py
XiaojiaoChen/softArmROS
59d1b05e9c13c50a9281ab2a670621f3f04d8cc1
[ "MIT" ]
3
2020-04-30T06:48:42.000Z
2020-05-01T04:27:26.000Z
#!/usr/bin/env python3 #coding=utf-8 import numpy as np import time from math import cos, sin, sqrt, pi, atan, asin, atan, atan2 from scipy.optimize import least_squares from scipy.spatial.transform import Rotation from angles import normalize_angle import rospy from origarm_ros.srv import ik from origarm_ros.msg impo...
57.660584
124
0.32597
#!/usr/bin/env python3 #coding=utf-8 import numpy as np import time from math import cos, sin, sqrt, pi, atan, asin, atan, atan2 from scipy.optimize import least_squares from scipy.spatial.transform import Rotation from angles import normalize_angle import rospy from origarm_ros.srv import ik from origarm_ros.msg impo...
30,867
-5
238
1624e0f73bde28720717fca5571fec7b0bcf2343
12,779
py
Python
pandaserver/taskbuffer/retryModule.py
rybkine/panda-server
30fdeaa658a38fe2049849446c300c1e1f5b5231
[ "Apache-2.0" ]
1
2019-08-30T13:47:51.000Z
2019-08-30T13:47:51.000Z
pandaserver/taskbuffer/retryModule.py
mkycanopus/panda-server
0f7c36800c033fada8bbde53dceaab98770b6df2
[ "Apache-2.0" ]
null
null
null
pandaserver/taskbuffer/retryModule.py
mkycanopus/panda-server
0f7c36800c033fada8bbde53dceaab98770b6df2
[ "Apache-2.0" ]
null
null
null
import sys import time from pandalogger.PandaLogger import PandaLogger from config import panda_config import re from re import error as ReError # logger _logger = PandaLogger().getLogger('RetrialModule') NO_RETRY = 'no_retry' INCREASE_MEM = 'increase_memory' LIMIT_RETRY = 'limit_retry' INCREASE_CPU = 'increase_cputim...
47.154982
248
0.583535
import sys import time from pandalogger.PandaLogger import PandaLogger from config import panda_config import re from re import error as ReError # logger _logger = PandaLogger().getLogger('RetrialModule') NO_RETRY = 'no_retry' INCREASE_MEM = 'increase_memory' LIMIT_RETRY = 'limit_retry' INCREASE_CPU = 'increase_cputim...
250
0
26
7c27f57b382b0aa252a778f4f1a7503a9f3cf8e6
4,038
py
Python
sampler.py
snowbiue/cppn-tensorflow
e7b3a8b715454f55388f0b5f8fdc280ea3433ad0
[ "MIT" ]
320
2016-03-25T08:18:13.000Z
2022-01-19T12:27:50.000Z
sampler.py
snowbiue/cppn-tensorflow
e7b3a8b715454f55388f0b5f8fdc280ea3433ad0
[ "MIT" ]
2
2018-10-19T15:18:15.000Z
2020-02-29T17:11:37.000Z
sampler.py
snowbiue/cppn-tensorflow
e7b3a8b715454f55388f0b5f8fdc280ea3433ad0
[ "MIT" ]
74
2016-03-26T13:26:06.000Z
2022-02-20T21:59:14.000Z
''' Implementation of Compositional Pattern Producing Networks in Tensorflow https://en.wikipedia.org/wiki/Compositional_pattern-producing_network @hardmaru, 2016 Sampler Class This file is meant to be run inside an IPython session, as it is meant to be used interacively for experimentation. It shouldn't be that h...
34.512821
109
0.676573
''' Implementation of Compositional Pattern Producing Networks in Tensorflow https://en.wikipedia.org/wiki/Compositional_pattern-producing_network @hardmaru, 2016 Sampler Class This file is meant to be run inside an IPython session, as it is meant to be used interacively for experimentation. It shouldn't be that h...
1,425
1,731
23
e1711b0e278f324882a796ef19c9f32ef865137c
1,668
py
Python
identify_image_direction.py
liusanp/simple-rotate-img
6c75cd85987597998319eef4b38a4d33badc7a58
[ "Apache-2.0" ]
null
null
null
identify_image_direction.py
liusanp/simple-rotate-img
6c75cd85987597998319eef4b38a4d33badc7a58
[ "Apache-2.0" ]
null
null
null
identify_image_direction.py
liusanp/simple-rotate-img
6c75cd85987597998319eef4b38a4d33badc7a58
[ "Apache-2.0" ]
null
null
null
from flask import Flask, request, jsonify from gevent.pywsgi import WSGIServer import traceback import uuid import os from logger import logger from boundingRect import detect import cv2 app = Flask(__name__) @app.route('/identifyDirection', methods=['POST']) def get_direction(): """ 图片方向识别 :return: ...
27.8
120
0.594125
from flask import Flask, request, jsonify from gevent.pywsgi import WSGIServer import traceback import uuid import os from logger import logger from boundingRect import detect import cv2 app = Flask(__name__) @app.route('/identifyDirection', methods=['POST']) def get_direction(): """ 图片方向识别 :return: ...
0
0
0
be273e7b31ee9fbc2fb60358bb41cd8579064892
6,475
py
Python
asce7/v2016/chapter29.py
Ricyteach/asce7
65dc0a3011203fbcb2e3e4a5b31be8e2f124976f
[ "MIT" ]
null
null
null
asce7/v2016/chapter29.py
Ricyteach/asce7
65dc0a3011203fbcb2e3e4a5b31be8e2f124976f
[ "MIT" ]
null
null
null
asce7/v2016/chapter29.py
Ricyteach/asce7
65dc0a3011203fbcb2e3e4a5b31be8e2f124976f
[ "MIT" ]
null
null
null
"""CHAPTER 29 WIND LOADS ON BUILDING APPURTENANCES AND OTHER STRUCTURES: MAIN WIND FORCE RESISTING SYSTEM (DIRECTIONAL PROCEDURE) • Basic wind speed, V (Section 26.5); • Wind directionality factor, Kd (Section 26.6); • Exposure category (Section 26.7); • Topographic factor, Kzt (Section 26.8); • Ground elevation facto...
30.542453
117
0.55027
"""CHAPTER 29 WIND LOADS ON BUILDING APPURTENANCES AND OTHER STRUCTURES: MAIN WIND FORCE RESISTING SYSTEM (DIRECTIONAL PROCEDURE) • Basic wind speed, V (Section 26.5); • Wind directionality factor, Kd (Section 26.6); • Exposure category (Section 26.7); • Topographic factor, Kzt (Section 26.8); • Ground elevation facto...
0
0
0
b503b88316df20925d7e75dc32992d0527743735
4,124
py
Python
blastsight/model/utils.py
gsanhueza/BlastSight
4b5c48e7ea5f67b737429f05d5213e9ff1fd399d
[ "MIT" ]
null
null
null
blastsight/model/utils.py
gsanhueza/BlastSight
4b5c48e7ea5f67b737429f05d5213e9ff1fd399d
[ "MIT" ]
1
2022-03-13T17:35:35.000Z
2022-03-13T17:35:35.000Z
blastsight/model/utils.py
gsanhueza/BlastSight
4b5c48e7ea5f67b737429f05d5213e9ff1fd399d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2019-2021 Gabriel Sanhueza. # # Distributed under the MIT License. # See LICENSE for more info. import numpy as np from colour import Color
26.606452
94
0.595538
#!/usr/bin/env python # Copyright (c) 2019-2021 Gabriel Sanhueza. # # Distributed under the MIT License. # See LICENSE for more info. import numpy as np from colour import Color def magnitude(vector: np.ndarray) -> float: return np.linalg.norm(vector) def normalize(vector: np.ndarray) -> np.ndarray: r...
3,652
0
276
7ce43739563daa9d0b8bf884c297d9f50f5705be
4,749
py
Python
tests/test_rfc5751.py
alvistack/etingof-pyasn1-modules
bdbcc5d9650a8e8382979f089df3307dd4121b49
[ "BSD-2-Clause" ]
34
2016-04-03T09:10:31.000Z
2022-02-12T20:38:31.000Z
tests/test_rfc5751.py
alvistack/etingof-pyasn1-modules
bdbcc5d9650a8e8382979f089df3307dd4121b49
[ "BSD-2-Clause" ]
138
2017-05-31T09:25:10.000Z
2022-02-07T09:00:19.000Z
tests/test_rfc5751.py
alvistack/etingof-pyasn1-modules
bdbcc5d9650a8e8382979f089df3307dd4121b49
[ "BSD-2-Clause" ]
36
2016-03-16T00:37:04.000Z
2021-11-12T12:09:43.000Z
# # This file is part of pyasn1-modules software. # # Created by Russ Housley # Copyright (c) 2019, Vigil Security, LLC # License: http://snmplabs.com/pyasn1/license.html # import sys import unittest from pyasn1.codec.der.decoder import decode as der_decoder from pyasn1.codec.der.encoder import encode as der_encoder f...
45.663462
98
0.787534
# # This file is part of pyasn1-modules software. # # Created by Russ Housley # Copyright (c) 2019, Vigil Security, LLC # License: http://snmplabs.com/pyasn1/license.html # import sys import unittest from pyasn1.codec.der.decoder import decode as der_decoder from pyasn1.codec.der.encoder import encode as der_encoder f...
1,691
2,379
23