hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
c5d092a41c6e24953c6673c0cda130ad2dac0976
83
py
Python
0-notes/job-search/Cracking_the_Coding_Interview/C13Java/questions/13.3-question.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
0-notes/job-search/Cracking_the_Coding_Interview/C13Java/questions/13.3-question.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
0-notes/job-search/Cracking_the_Coding_Interview/C13Java/questions/13.3-question.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
# 13.3 Final, etc. # What is the difference between final, finally, and finalize?
20.75
62
0.722892
# 13.3 Final, etc. # What is the difference between final, finally, and finalize?
0
0
0
0
0
0
0
0
0
1483feaffa2344f8974bb783e5a5cc7f062471a4
21,862
py
Python
model/network_base.py
holyseven/TransferLearningClassification
1426356195d79613b12c94ad8d6d0db576b09261
[ "MIT" ]
46
2018-06-02T07:50:04.000Z
2022-02-02T01:25:32.000Z
model/network_base.py
holyseven/TransferLearningClassification
1426356195d79613b12c94ad8d6d0db576b09261
[ "MIT" ]
3
2018-06-02T02:29:49.000Z
2021-04-09T08:35:22.000Z
model/network_base.py
holyseven/TransferLearningClassification
1426356195d79613b12c94ad8d6d0db576b09261
[ "MIT" ]
13
2018-06-07T04:30:14.000Z
2020-04-07T03:10:40.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function
48.367257
123
0.574467
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf class Network(object): def __init__(self, num_classes, lrn_rate_placeholder, wd_rate_placeholder, wd_rate_placeholder2, mode='train', initialize...
0
0
0
21,684
0
0
0
-1
68
f2bb6f29bad76920d58effde5ea59dffea89c10b
453
py
Python
every_election/apps/elections/migrations/0059_election_tags.py
DemocracyClub/EveryElection
da8a561cb4a84d9b432b1508a68f8cfada3d9515
[ "BSD-3-Clause" ]
8
2017-06-29T10:11:33.000Z
2019-12-16T16:17:51.000Z
every_election/apps/elections/migrations/0059_election_tags.py
DemocracyClub/EveryElection
da8a561cb4a84d9b432b1508a68f8cfada3d9515
[ "BSD-3-Clause" ]
1,300
2017-01-08T14:02:24.000Z
2022-03-31T09:11:30.000Z
every_election/apps/elections/migrations/0059_election_tags.py
DemocracyClub/EveryElection
da8a561cb4a84d9b432b1508a68f8cfada3d9515
[ "BSD-3-Clause" ]
11
2017-02-04T10:48:04.000Z
2021-01-27T15:07:55.000Z
# Generated by Django 2.2.16 on 2021-02-13 12:11
22.65
79
0.631347
# Generated by Django 2.2.16 on 2021-02-13 12:11 import django.contrib.postgres.fields.jsonb from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("elections", "0058_set-gla-a-to-ballot"), ] operations = [ migrations.AddField( model_name="...
0
0
0
302
0
0
0
33
68
24b4a562d2495e56240ee4ebd5af7cb54555475f
462
py
Python
tasks/migrations/0011_auto_20190206_1517.py
heolin123/funcrowd
20167783de208394c09ed0429a5f02ec6dd79c42
[ "MIT" ]
null
null
null
tasks/migrations/0011_auto_20190206_1517.py
heolin123/funcrowd
20167783de208394c09ed0429a5f02ec6dd79c42
[ "MIT" ]
11
2019-11-12T23:26:45.000Z
2021-06-10T17:37:23.000Z
tasks/migrations/0011_auto_20190206_1517.py
heolin123/funcrowd
20167783de208394c09ed0429a5f02ec6dd79c42
[ "MIT" ]
null
null
null
# Generated by Django 2.0.8 on 2019-02-06 15:17
23.1
88
0.640693
# Generated by Django 2.0.8 on 2019-02-06 15:17 import django.contrib.postgres.fields.jsonb from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('tasks', '0010_auto_20190203_2307'), ] operations = [ migrations.AlterField( model_name='docu...
0
0
0
312
0
0
0
33
68
a65d0bfbcd7fe1b1c7d466a1a6d5fa4dc4c677e1
107
py
Python
caption/models/taggers/__init__.py
Unbabel/caption
90725dbf5bc3809e0364d20d0837c58968ceb2b1
[ "MIT" ]
3
2021-06-14T08:23:00.000Z
2022-03-04T06:00:50.000Z
caption/models/taggers/__init__.py
Unbabel/caption
90725dbf5bc3809e0364d20d0837c58968ceb2b1
[ "MIT" ]
null
null
null
caption/models/taggers/__init__.py
Unbabel/caption
90725dbf5bc3809e0364d20d0837c58968ceb2b1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from .transformer_tagger import TransformerTagger __all__ = ["TransformerTagger"]
21.4
49
0.738318
# -*- coding: utf-8 -*- from .transformer_tagger import TransformerTagger __all__ = ["TransformerTagger"]
0
0
0
0
0
0
0
0
0
01471f25662c8c09d746637c982ccc8bc92d5b4f
2,224
py
Python
toollib/tcli/commands/_set_sshkey.py
atpuxiner/toollib
a895daeba49e64022a4a11a67a8b7b7a44cd2e0f
[ "MIT" ]
113
2021-12-15T05:23:13.000Z
2022-03-30T10:29:13.000Z
toollib/tcli/commands/_set_sshkey.py
atpuxiner/toollib
a895daeba49e64022a4a11a67a8b7b7a44cd2e0f
[ "MIT" ]
null
null
null
toollib/tcli/commands/_set_sshkey.py
atpuxiner/toollib
a895daeba49e64022a4a11a67a8b7b7a44cd2e0f
[ "MIT" ]
3
2022-02-22T01:43:44.000Z
2022-03-21T01:05:49.000Z
""" @author axiner @version v1.0.0 @created 2022/5/4 9:17 @abstract @description @history """
31.771429
99
0.54946
""" @author axiner @version v1.0.0 @created 2022/5/4 9:17 @abstract @description @history """ import re import sys from pathlib import Path from toollib import utils, regexp from toollib.decorator import sys_required from toollib.tcli import here from toollib.tcli.base import BaseCmd from toollib.tcli.option import Op...
114
590
0
1,241
0
0
0
60
200
822a0ff8785eb0954163af374ff983ac9b7de2a1
2,575
py
Python
jinete/models/vehicles.py
PhilippeGalvan/jinete
b7b22f8265935bc41b42ad8c4bf7464dc21ab424
[ "MIT" ]
null
null
null
jinete/models/vehicles.py
PhilippeGalvan/jinete
b7b22f8265935bc41b42ad8c4bf7464dc21ab424
[ "MIT" ]
null
null
null
jinete/models/vehicles.py
PhilippeGalvan/jinete
b7b22f8265935bc41b42ad8c4bf7464dc21ab424
[ "MIT" ]
null
null
null
from __future__ import annotations import logging from typing import TYPE_CHECKING if TYPE_CHECKING: logger = logging.getLogger(__name__)
23.409091
108
0.623689
from __future__ import annotations import logging from typing import TYPE_CHECKING from .constants import ( MAX_FLOAT, ) from .abc import ( Model, ) from .services import ( Service, ) if TYPE_CHECKING: from typing import ( Set, Any, Dict, Generator, Tuple, ...
0
678
0
1,436
0
0
0
153
165
114d1e7012c85fcfc862e1bd4047526600479af1
634
py
Python
bapa/services/email.py
kelleydv/Bapa
ea19b8e878f608089553df132c32a25bf6183c9b
[ "MIT" ]
5
2015-03-05T01:18:19.000Z
2015-11-28T17:29:44.000Z
bapa/services/email.py
kelleydv/Bapa
ea19b8e878f608089553df132c32a25bf6183c9b
[ "MIT" ]
26
2015-03-03T19:13:24.000Z
2021-02-08T20:23:54.000Z
bapa/services/email.py
kelleydv/Bapa
ea19b8e878f608089553df132c32a25bf6183c9b
[ "MIT" ]
1
2015-03-07T21:02:56.000Z
2015-03-07T21:02:56.000Z
from bapa import app, mail from flask_mail import Message import os def send_email(subject=None, body=None, recipients=None): """Send an email""" msg = Message( subject=subject, body=body, recipients=recipients ) if app.config['TESTING']: #no need to send an email ...
24.384615
57
0.586751
from bapa import app, mail from flask_mail import Message import os def send_email(subject=None, body=None, recipients=None): """Send an email""" msg = Message( subject=subject, body=body, recipients=recipients ) if app.config['TESTING']: #no need to send an email ...
0
0
0
0
0
0
0
0
0
c49a64e8be8eff82b186a76d2a5697110c34e258
3,151
py
Python
PlotCircles.py
WalasekNicole/sensitive-periods-with-varying-cue-reliabilities
f9b2aefc7847c496bd15a14d3c4c804efe39c4c7
[ "MIT" ]
null
null
null
PlotCircles.py
WalasekNicole/sensitive-periods-with-varying-cue-reliabilities
f9b2aefc7847c496bd15a14d3c4c804efe39c4c7
[ "MIT" ]
null
null
null
PlotCircles.py
WalasekNicole/sensitive-periods-with-varying-cue-reliabilities
f9b2aefc7847c496bd15a14d3c4c804efe39c4c7
[ "MIT" ]
1
2020-01-23T15:07:41.000Z
2020-01-23T15:07:41.000Z
def circles(x, y, s,ax, c='b',vmin=None, vmax=None, **kwargs): """ Make a scatter of circles plot of x vs y, where x and y are sequence like objects of the same lengths. The size of circles are in data scale. Parameters ---------- x,y : scalar or array_like, shape (n, ) Input data ...
33.88172
79
0.62615
def circles(x, y, s,ax, c='b',vmin=None, vmax=None, **kwargs): """ Make a scatter of circles plot of x vs y, where x and y are sequence like objects of the same lengths. The size of circles are in data scale. Parameters ---------- x,y : scalar or array_like, shape (n, ) Input data ...
0
0
0
0
0
0
0
0
0
d074fc4545c591cadc37a37745a752306b7079e5
3,158
py
Python
saltsdb/saltsdb.py
saltastro/saltsdb
dfb1413b100621ebc1cdd2d5bcbb27fa0db112a0
[ "BSD-3-Clause" ]
null
null
null
saltsdb/saltsdb.py
saltastro/saltsdb
dfb1413b100621ebc1cdd2d5bcbb27fa0db112a0
[ "BSD-3-Clause" ]
null
null
null
saltsdb/saltsdb.py
saltastro/saltsdb
dfb1413b100621ebc1cdd2d5bcbb27fa0db112a0
[ "BSD-3-Clause" ]
1
2018-01-09T14:06:58.000Z
2018-01-09T14:06:58.000Z
# Licensed under a 3-clause BSD style license - see LICENSE.rst __all__ = ['SALTSdb']
26.991453
75
0.552882
# Licensed under a 3-clause BSD style license - see LICENSE.rst import sqlalchemy import pandas as pd __all__ = ['SALTSdb'] class SALTSdb: """SALTSdb is an interface to the SALT mysql database and specifically simplifies the steps of returning objects from a call to the database Parameters --...
0
0
0
3,008
0
0
0
-6
68
9fa05de1d647fc79ab33a7bc71bb2e90cc1ed122
1,043
py
Python
pylark/api_service_task_comment_delete.py
chyroc/pylark
a54cce6b814935fd3c72668b262b54c8ee461484
[ "Apache-2.0" ]
7
2021-08-18T00:42:05.000Z
2022-03-14T09:49:15.000Z
pylark/api_service_task_comment_delete.py
chyroc/pylark
a54cce6b814935fd3c72668b262b54c8ee461484
[ "Apache-2.0" ]
null
null
null
pylark/api_service_task_comment_delete.py
chyroc/pylark
a54cce6b814935fd3c72668b262b54c8ee461484
[ "Apache-2.0" ]
1
2022-03-14T09:49:20.000Z
2022-03-14T09:49:20.000Z
# Code generated by lark_sdk_gen. DO NOT EDIT.
28.972222
91
0.696069
# Code generated by lark_sdk_gen. DO NOT EDIT. from pylark.lark_request import RawRequestReq, _new_method_option from pylark import lark_type, lark_type_sheet, lark_type_approval import attr import typing import io @attr.s class DeleteTaskCommentReq(object): task_id: str = attr.ib( default="", metadata={...
36
339
0
0
0
404
0
58
180
b5b32e30378a98abf08620431155a2602cc5a791
1,502
py
Python
mzgtfs/fareattribute.py
andreyz/mapzen-gtfs
d445f1588ed10713eea9a1ca2878eef792121eca
[ "MIT" ]
29
2015-06-08T00:49:52.000Z
2021-09-25T21:46:53.000Z
mzgtfs/fareattribute.py
brennv/mapzen-gtfs
886dc3a91fed13323f401d47a56ea713b8ed7807
[ "MIT" ]
12
2015-07-28T07:12:55.000Z
2017-05-11T14:24:12.000Z
mzgtfs/fareattribute.py
brennv/mapzen-gtfs
886dc3a91fed13323f401d47a56ea713b8ed7807
[ "MIT" ]
10
2015-07-28T06:57:51.000Z
2021-01-05T05:56:27.000Z
"""GTFS Fare Attributes."""
29.45098
87
0.679095
"""GTFS Fare Attributes.""" import datetime import entity import geom import util import widetime import validation class FareAttribute(entity.Entity): KEY = 'fare_id' REQUIRED = [ 'fare_id', 'price', 'currency_type', 'payment_method', 'transfers', ] OPTIONAL = [ 'transfer_duration' ...
0
0
0
1,363
0
0
0
-44
156
82a9cad54da00ce922e974b057347a4ca86d60f4
459
py
Python
src/api/__init__.py
petr/spd
6fa8157026fec5926c00ccb1cc7091d4b541d914
[ "MIT" ]
null
null
null
src/api/__init__.py
petr/spd
6fa8157026fec5926c00ccb1cc7091d4b541d914
[ "MIT" ]
null
null
null
src/api/__init__.py
petr/spd
6fa8157026fec5926c00ccb1cc7091d4b541d914
[ "MIT" ]
null
null
null
""" This module contains the full api workflow od the project sex partners It has the following methods * Upload an image to server and returns task id * Method for processing this task #/image_put curl -F "image=@fixtures/members-301f4eab458270d4ad75856b9c7962de.jpg" http://127.0.0.1:8000/api/image_put/ #/task/...
16.392857
107
0.712418
""" This module contains the full api workflow od the project sex partners It has the following methods * Upload an image to server and returns task id * Method for processing this task #/image_put curl -F "image=@fixtures/members-301f4eab458270d4ad75856b9c7962de.jpg" http://127.0.0.1:8000/api/image_put/ #/task/...
0
0
0
0
0
0
0
0
0
53d42695123c2326facf4f279256b1c384089fd3
78,742
py
Python
pypeit/metadata.py
rcooke-ast/PYPIT
0cb9c4cb422736b855065a35aefc2bdba6d51dd0
[ "BSD-3-Clause" ]
null
null
null
pypeit/metadata.py
rcooke-ast/PYPIT
0cb9c4cb422736b855065a35aefc2bdba6d51dd0
[ "BSD-3-Clause" ]
null
null
null
pypeit/metadata.py
rcooke-ast/PYPIT
0cb9c4cb422736b855065a35aefc2bdba6d51dd0
[ "BSD-3-Clause" ]
null
null
null
""" Provides a class that handles the fits metadata required by PypeIt. .. include common links, assuming primary doc root is up one directory .. include:: ../include/links.rst """ import numpy as np # TODO: Turn this into a DataContainer # Initially tried to subclass this from astropy.table.Table, but that # prove...
42.817836
122
0.575411
""" Provides a class that handles the fits metadata required by PypeIt. .. include common links, assuming primary doc root is up one directory .. include:: ../include/links.rst """ import os import io import string from copy import deepcopy import datetime from IPython import embed import numpy as np import yaml fr...
0
224
0
76,529
0
0
0
97
421
8961a614cdd99fadc1742c84f3ac99d52f8069e6
1,565
py
Python
cup_test/cup_exfile_test.py
liu0208xuan/CUP
0e09b393673dacdd985c064cf03062b950a74179
[ "Apache-2.0" ]
900
2017-02-15T05:14:03.000Z
2022-03-22T08:07:39.000Z
cup_test/cup_exfile_test.py
horsedongmin/CUP
94398c7d94b2574db565c3e8d6dcfe2f3722f007
[ "Apache-2.0" ]
30
2017-02-24T05:16:15.000Z
2021-08-04T02:03:12.000Z
cup_test/cup_exfile_test.py
horsedongmin/CUP
94398c7d94b2574db565c3e8d6dcfe2f3722f007
[ "Apache-2.0" ]
185
2017-02-15T02:23:09.000Z
2022-02-24T08:47:43.000Z
#!/usr/bin/env python # -*- coding: utf-8 -* """ :authors: Guannan Ma maguannan @mythmgn :description: """ import os import sys _TOP = os.path.dirname(os.path.abspath(__file__)) + '/../' sys.path.insert(0, _TOP) from cup import err from cup import exfile from cup import unittest LOCK_FILE = './.file_test.lock'...
21.736111
70
0.672843
#!/usr/bin/env python # -*- coding: utf-8 -* """ :authors: Guannan Ma maguannan @mythmgn :description: """ import os import sys _TOP = os.path.dirname(os.path.abspath(__file__)) + '/../' sys.path.insert(0, _TOP) from cup import err from cup import exfile from cup import unittest LOCK_FILE = './.file_test.lock'...
0
0
0
0
0
0
0
0
0
c0f68f5509d55fc92014c907640fb7abec305d6f
642
py
Python
modulo_03/amazon.py
memsprop/2021_python_selenium
eb3de282b11933cb6886d4008fb1b557147afaae
[ "Unlicense" ]
null
null
null
modulo_03/amazon.py
memsprop/2021_python_selenium
eb3de282b11933cb6886d4008fb1b557147afaae
[ "Unlicense" ]
null
null
null
modulo_03/amazon.py
memsprop/2021_python_selenium
eb3de282b11933cb6886d4008fb1b557147afaae
[ "Unlicense" ]
null
null
null
from common.webdriver_factory import get_driver driver = get_driver('chrome') driver.implicitly_wait(10) driver.get('https://www.amazon.com.mx/') elements = driver.find_elements_by_xpath("//a") print(f'Total of Elements with tag a = {len(elements)}') for element in elements: print(element.text) head_childs = dr...
29.181818
64
0.777259
from common.webdriver_factory import get_driver from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By driver = get_driver('chrome') driver.implicitly_wait(10) driver.get('https://www.amazon.com.mx/') eleme...
0
0
0
0
0
0
0
101
66
de61ae6681b30cb18f22d2743a2669421da9304a
121
py
Python
setup.py
damienlefebvre/Math199
b47798b228d131f27c1083907c500f2eb272ac2c
[ "MIT" ]
null
null
null
setup.py
damienlefebvre/Math199
b47798b228d131f27c1083907c500f2eb272ac2c
[ "MIT" ]
null
null
null
setup.py
damienlefebvre/Math199
b47798b228d131f27c1083907c500f2eb272ac2c
[ "MIT" ]
null
null
null
from distutils.core import setup from Cython.Build import cythonize setup(ext_modules=cythonize("stock_pyx.pyx"))
20.166667
46
0.785124
from distutils.core import setup from Cython.Build import cythonize setup(ext_modules=cythonize("stock_pyx.pyx"))
0
0
0
0
0
0
0
0
0
b6a6333e564d75efd33b60acb991671f08945e8d
1,085
py
Python
ml/test/multiple_tests.py
thorwhalen/ut
353a4629c35a2cca76ef91a4d5209afe766433b4
[ "MIT" ]
4
2016-12-17T20:06:10.000Z
2021-11-19T04:45:29.000Z
ml/test/multiple_tests.py
thorwhalen/ut
353a4629c35a2cca76ef91a4d5209afe766433b4
[ "MIT" ]
11
2021-01-06T05:35:11.000Z
2022-03-11T23:28:31.000Z
ml/test/multiple_tests.py
thorwhalen/ut
353a4629c35a2cca76ef91a4d5209afe766433b4
[ "MIT" ]
3
2015-06-12T10:44:16.000Z
2021-07-26T18:39:47.000Z
from sklearn.metrics import accuracy_score, f1_score dflt_metrics = ( ('accuracy', accuracy_score), ('f1', f1_score) )
37.413793
91
0.590783
from collections import defaultdict from oto.models.scent import CentroidSmoothing from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score, f1_score import numpy as np dflt_metrics = ( ('accuracy', accuracy_score), ('f1', f1_score) ) def gather_multiple_train_test_resu...
0
0
0
0
0
778
0
67
111
c35e2b0429c91667ab58023527a5606d79349580
4,499
py
Python
lab_3/scene3d.py
FeodorM/Computer-Graphics
d783c7cd73f6e31abdc272e3166dd2df361cf1bb
[ "MIT" ]
null
null
null
lab_3/scene3d.py
FeodorM/Computer-Graphics
d783c7cd73f6e31abdc272e3166dd2df361cf1bb
[ "MIT" ]
null
null
null
lab_3/scene3d.py
FeodorM/Computer-Graphics
d783c7cd73f6e31abdc272e3166dd2df361cf1bb
[ "MIT" ]
null
null
null
if __name__ == '__main__': Scene3D()
40.9
130
0.582352
import pygame from pygame.locals import * from lab_3.camera3d import Camera3D from lab_3.model3d import Model3D from util.events import is_quit_event from lab_3.affine_transform import * class Scene3D(Camera3D): def __init__(self, *args, **kwargs): super(Scene3D, self).__init__(*args, *kwargs) s...
0
0
0
4,244
0
0
0
55
156
76119297a3082dab63f7352f72b41980527609a3
4,627
py
Python
v1/awsbuild/bao_spinner.py
badassops/ops-aws
2e6b76e62e7b9edaa3ba43ff57df90b75c75aba7
[ "BSD-3-Clause" ]
2
2019-02-28T06:49:19.000Z
2019-12-30T09:41:17.000Z
v1/awsbuild/bao_spinner.py
badassops/ops-aws
2e6b76e62e7b9edaa3ba43ff57df90b75c75aba7
[ "BSD-3-Clause" ]
null
null
null
v1/awsbuild/bao_spinner.py
badassops/ops-aws
2e6b76e62e7b9edaa3ba43ff57df90b75c75aba7
[ "BSD-3-Clause" ]
null
null
null
# vim:fileencoding=utf-8:noet """ python method """ # Copyright (c) 2010 - 2019, Badassops LLC / Luc Suryo # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code ...
38.239669
96
0.617895
# vim:fileencoding=utf-8:noet """ python method """ # Copyright (c) 2010 - 2019, © Badassops LLC / Luc Suryo # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code...
14
0
0
2,031
0
0
0
-31
112
336db18f7ac63c100a48f82001450cfd7d7e03cf
688
py
Python
main.py
Yamp/Lin-Kernighan
88e3ef8c0f4ec91ba22a065466b2473725d86870
[ "MIT" ]
1
2021-07-24T02:50:52.000Z
2021-07-24T02:50:52.000Z
main.py
Lin-Kernighan/Lin-Kernighan
88e3ef8c0f4ec91ba22a065466b2473725d86870
[ "MIT" ]
5
2020-02-01T10:44:09.000Z
2020-05-24T10:39:14.000Z
main.py
Yamp/Lin-Kernighan
88e3ef8c0f4ec91ba22a065466b2473725d86870
[ "MIT" ]
1
2020-08-26T05:26:23.000Z
2020-08-26T05:26:23.000Z
import faulthandler import logging from time import time from lin_kernighan.algorithms.structures.matrix import adjacency_matrix from lin_kernighan.algorithms.utils.generator import generator from lin_kernighan.lkh_search import LKHSearch if __name__ == '__main__': size = 500 logging.basicConfig(format='%(asc...
25.481481
79
0.674419
import faulthandler import logging from time import time from lin_kernighan.algorithms.structures.matrix import adjacency_matrix from lin_kernighan.algorithms.utils.generator import generator from lin_kernighan.lkh_search import LKHSearch if __name__ == '__main__': size = 500 logging.basicConfig(format='%(asc...
0
0
0
0
0
0
0
0
0
76b22186ea4555f4ebc758cbe4b32486dbef6ccd
1,969
py
Python
src/postprocessing/postprocessing.py
dsp-uga/team-ball
0d4b4ffd21b7383d727354c66fa15fb6b7a2e779
[ "MIT" ]
1
2021-05-29T16:02:35.000Z
2021-05-29T16:02:35.000Z
src/postprocessing/postprocessing.py
omid-s/neuron_finding_team-ball
0d4b4ffd21b7383d727354c66fa15fb6b7a2e779
[ "MIT" ]
null
null
null
src/postprocessing/postprocessing.py
omid-s/neuron_finding_team-ball
0d4b4ffd21b7383d727354c66fa15fb6b7a2e779
[ "MIT" ]
3
2018-03-11T20:35:34.000Z
2018-04-04T03:26:59.000Z
""""This file manages the postprocessing of the objects in the images""" import numpy as np import cv2 import json def postProcess ( fileNames =None , theDic=None, output_file_name = "output.json" ): """ this function handels the postprocessing of values, :param fileNames: if out put is written to files a...
33.372881
174
0.643982
""""This file manages the postprocessing of the objects in the images""" import numpy as np import cv2 import json def postProcess ( fileNames =None , theDic=None, output_file_name = "output.json" ): """ this function handels the postprocessing of values, :param fileNames: if out put is written to files a...
0
0
0
0
0
0
0
0
0
0ab7979e8b81bd85652a7fbeb67fc1940846c537
9,272
py
Python
lib/streamlit/cli.py
cclauss/streamlit
232f040da0ec88512714ef0b512b558f7079d9a0
[ "Apache-2.0" ]
1
2021-08-25T02:49:23.000Z
2021-08-25T02:49:23.000Z
lib/streamlit/cli.py
Mesica/streamlit
9e486561ccca2e33ee57ca8f7341f52e929a7430
[ "Apache-2.0" ]
null
null
null
lib/streamlit/cli.py
Mesica/streamlit
9e486561ccca2e33ee57ca8f7341f52e929a7430
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2018-2019 Streamlit 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 applicabl...
28.182371
85
0.68874
# -*- coding: utf-8 -*- # Copyright 2018-2019 Streamlit 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 applicabl...
0
4,006
0
0
0
1,002
0
15
477
08e4181de948f233776a0f937dd71cb7fa69e382
729
py
Python
Advent of Code 2020/Day 6 - Custom Customs.py
TecKnow/learning
71d1ddf9d580027ecc62a067581da378a9e85f6d
[ "BSD-3-Clause" ]
null
null
null
Advent of Code 2020/Day 6 - Custom Customs.py
TecKnow/learning
71d1ddf9d580027ecc62a067581da378a9e85f6d
[ "BSD-3-Clause" ]
null
null
null
Advent of Code 2020/Day 6 - Custom Customs.py
TecKnow/learning
71d1ddf9d580027ecc62a067581da378a9e85f6d
[ "BSD-3-Clause" ]
null
null
null
if __name__ == "__main__": data = open("Day 6 Data.txt").read() data = parse_data(data) data = all_yes_in_group(data) print(sum(len(x) for x in data))
28.038462
77
0.66118
from typing import Iterable, Set def parse_data(data: str) -> list[set[str]]: data = data.split("\n\n") data = [group.split() for group in data] print(data) data = [[set(person) for person in group] for group in data] return data def any_yes_in_group(groups: Iterable[Iterable[Set[str]]]) -> list...
0
0
0
0
0
456
0
11
91
6f1505ad8d2b42dab59273567a81b5fd27b24b08
3,648
py
Python
src/publishment_log_api.py
wnjustdoit/devops-py
54dd722a577c4b3ecda45aa85c067130fd292ab9
[ "Apache-2.0" ]
null
null
null
src/publishment_log_api.py
wnjustdoit/devops-py
54dd722a577c4b3ecda45aa85c067130fd292ab9
[ "Apache-2.0" ]
6
2021-04-08T20:46:56.000Z
2022-01-13T01:52:06.000Z
src/publishment_log_api.py
wnjustdoit/devops-py
54dd722a577c4b3ecda45aa85c067130fd292ab9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 from flask import Blueprint publishment_log_api = Blueprint('publishment_log_api', __name__) app = publishment_log_api # #
35.076923
104
0.676261
#!/usr/bin/python3 from flask import Blueprint, request, jsonify, make_response from sqlalchemy import or_ import demjson from datetime import timedelta, datetime from .entities.publishment_log import PublishmentLog, PublishmentLogSchema from .entities.entity import Session publishment_log_api = Blueprint('publishme...
48
2,469
0
0
0
668
0
118
224
367db37b555760269bd422dd3b19024d5d41a59e
883
py
Python
Ago-Dic-2021/castro-torres-maria-guadalupe/practica2/ejercicio-9-13.py
AnhellO/DAS_Sistemas
07b4eca78357d02d225d570033d05748d91383e3
[ "MIT" ]
41
2017-09-26T09:36:32.000Z
2022-03-19T18:05:25.000Z
Ago-Dic-2021/castro-torres-maria-guadalupe/practica2/ejercicio-9-13.py
AnhellO/DAS_Sistemas
07b4eca78357d02d225d570033d05748d91383e3
[ "MIT" ]
67
2017-09-11T05:06:12.000Z
2022-02-14T04:44:04.000Z
Ago-Dic-2021/castro-torres-maria-guadalupe/practica2/ejercicio-9-13.py
AnhellO/DAS_Sistemas
07b4eca78357d02d225d570033d05748d91383e3
[ "MIT" ]
210
2017-09-01T00:10:08.000Z
2022-03-19T18:05:12.000Z
#Haga un dado de 6 caras y muestre los resultados de 10 tiradas. d6 = Die() results = [] for roll_num in range(10): result = d6.roll_die() results.append(result) print("\n10 rollos de un dado de 6 caras:") print(results) #Haga un dado de 10 caras y muestre los resultados de 10 tiradas. d10 = Die(sides=10) r...
22.075
65
0.684032
from random import randint class Die(): def __init__(self, sides=6): self.sides = sides def roll_die(self): return randint(1, self.sides) #Haga un dado de 6 caras y muestre los resultados de 10 tiradas. d6 = Die() results = [] for roll_num in range(10): result = d6.roll_die() result...
0
0
0
115
0
0
0
5
45
9d6a09b36eabe05c92c94b7622a4cf01a9379245
7,537
py
Python
settings/base.py
seanbradley/Simpletown
d14dffba5030b574be3e01f8792a97ec0c049df4
[ "Apache-2.0" ]
3
2015-10-23T13:00:02.000Z
2020-02-08T11:04:53.000Z
settings/base.py
seanbradley/Simpletown
d14dffba5030b574be3e01f8792a97ec0c049df4
[ "Apache-2.0" ]
null
null
null
settings/base.py
seanbradley/Simpletown
d14dffba5030b574be3e01f8792a97ec0c049df4
[ "Apache-2.0" ]
null
null
null
# DJANGO BASE SETTINGS import os from os import environ from os.path import basename from unipath import Path ########## PATH CONFIGURATION PROJECT_DIR = Path(__file__).ancestor(2) MEDIA_ROOT = PROJECT_DIR.child("media") STATIC_ROOT = PROJECT_DIR.child("static") STATICFILES_DIRS = ( PROJECT_DIR.child("styles"), ...
31.404167
117
0.69789
# DJANGO BASE SETTINGS import os, sys from os import environ from os.path import basename from unipath import Path ########## PATH CONFIGURATION PROJECT_DIR = Path(__file__).ancestor(2) MEDIA_ROOT = PROJECT_DIR.child("media") STATIC_ROOT = PROJECT_DIR.child("static") STATICFILES_DIRS = ( PROJECT_DIR.child("style...
0
0
0
0
0
0
0
5
0
6aa290c0076da15ca0764ac7f9ebdca3b87a8188
1,001
py
Python
tests/repository/test_determine_repo_dir_finds_existing_cookiecutter.py
bradleypmartin/cookiecutter
6540d2ad3b0ee3c30d9655171ef59b18d22ab0ed
[ "BSD-3-Clause" ]
1
2021-12-12T12:38:28.000Z
2021-12-12T12:38:28.000Z
tests/repository/test_determine_repo_dir_finds_existing_cookiecutter.py
bradleypmartin/cookiecutter
6540d2ad3b0ee3c30d9655171ef59b18d22ab0ed
[ "BSD-3-Clause" ]
1
2019-05-16T15:45:18.000Z
2019-05-16T15:45:18.000Z
tests/repository/test_determine_repo_dir_finds_existing_cookiecutter.py
bradleypmartin/cookiecutter
6540d2ad3b0ee3c30d9655171ef59b18d22ab0ed
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Tests around detection whether cookiecutter templates are cached locally."""
23.833333
79
0.744256
# -*- coding: utf-8 -*- """Tests around detection whether cookiecutter templates are cached locally.""" import io import os import pytest from cookiecutter import repository @pytest.fixture def template(): return 'cookiecutter-pytest-plugin' @pytest.fixture def cloned_cookiecutter_path(user_config_data, tem...
0
377
0
0
0
374
0
-18
160
1ce81ae4c207ef9b43a665186c1864263af2fc92
787
py
Python
src/leetcode/Coding_Interviews/construct_binary_tree.py
highing666/leaving
c121ee2f61e45472bb71e2770d0697e902279a64
[ "MIT" ]
null
null
null
src/leetcode/Coding_Interviews/construct_binary_tree.py
highing666/leaving
c121ee2f61e45472bb71e2770d0697e902279a64
[ "MIT" ]
null
null
null
src/leetcode/Coding_Interviews/construct_binary_tree.py
highing666/leaving
c121ee2f61e45472bb71e2770d0697e902279a64
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*-
25.387097
78
0.56798
# -*- coding: utf-8 -*- class TreeNode: def __init__(self, x): super().__init__() self.val = x self.left = None self.right = None class Solution: def build_tree(self, preorder: List[int], inorder: List[int]) -> TreeNode: temp_dic = dict(enumerate(inorder)) se...
0
0
0
715
0
0
0
0
46
2c394234d26ea5e6fac9fa6bd05d0f5cbfa38813
1,299
py
Python
suanfa/quick_sort.py
nciefeiniu/python-test
d81fcfff8cdec724c3010d6b7a77aabad7f90595
[ "Apache-2.0" ]
null
null
null
suanfa/quick_sort.py
nciefeiniu/python-test
d81fcfff8cdec724c3010d6b7a77aabad7f90595
[ "Apache-2.0" ]
null
null
null
suanfa/quick_sort.py
nciefeiniu/python-test
d81fcfff8cdec724c3010d6b7a77aabad7f90595
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- if __name__ == '__main__': # lists = [2,9,5,9,4,7,1,5,4] # quick_sort(lists,0, len(lists) - 1) # print(lists) lists2 = [1,1] quick_sort2(lists2, 0, len(lists2) - 1) print lists2
24.055556
65
0.538876
#!/usr/bin/python3 # -*- coding: utf-8 -*- def quick_sort(array, left, rigth): if left < rigth: q = partition(array, left, rigth) quick_sort(array, left, q - 1) quick_sort(array, q + 1, rigth) def partition(array, l, r): x = array[r] i = l - 1 for j in range(l, r): if...
0
0
0
0
0
956
0
0
92
cee81baa07bea28d1a6a883ec480a4c0db500333
1,702
py
Python
chapter_8/entry2.py
bimri/programming_python
ba52ccd18b9b4e6c5387bf4032f381ae816b5e77
[ "MIT" ]
null
null
null
chapter_8/entry2.py
bimri/programming_python
ba52ccd18b9b4e6c5387bf4032f381ae816b5e77
[ "MIT" ]
null
null
null
chapter_8/entry2.py
bimri/programming_python
ba52ccd18b9b4e6c5387bf4032f381ae816b5e77
[ "MIT" ]
null
null
null
"Entry" 'Laying Out Input Forms' # Entry widgets are often used to get # field values in form-like displays. # combines labels, entries, and frames to # achieve the multiple-input display """ use Entry widgets directly lay out by rows with fixed-width labels: this and grid are best for forms """ from quitter import ...
32.113208
89
0.648061
"Entry" 'Laying Out Input Forms' # Entry widgets are often used to get # field values in form-like displays. # combines labels, entries, and frames to # achieve the multiple-input display """ use Entry widgets directly lay out by rows with fixed-width labels: this and grid are best for forms """ from tkinter import...
3
0
0
0
0
535
0
0
69
2de5e47c6f2b0d5cac6777773e978fdad38c3dd3
3,497
py
Python
EtaPyScripts/getHistory.py
kd2eom/shuttletracker
d900055a78fd798f5375bed428cdd68843f5d5c7
[ "MIT" ]
null
null
null
EtaPyScripts/getHistory.py
kd2eom/shuttletracker
d900055a78fd798f5375bed428cdd68843f5d5c7
[ "MIT" ]
null
null
null
EtaPyScripts/getHistory.py
kd2eom/shuttletracker
d900055a78fd798f5375bed428cdd68843f5d5c7
[ "MIT" ]
null
null
null
import datetime as dt MAX_TIME_DIFFERENCE_MIN = 10 # function to open the JSON history file # function to load the history data from the JSON def time_in_range(start, end, x): """Return true if x is in the range [start, end]""" if start <= end: return start <= x <= end else: ...
38.855556
128
0.612239
import urllib.request import datetime as dt import json MAX_TIME_DIFFERENCE_MIN = 10 # function to open the JSON history file def response(url): return urllib.request.urlopen(url) # function to load the history data from the JSON def loadJSON(response): return json.loads(response.read()) def t...
0
0
0
0
0
2,274
0
-10
117
b78bd21e6375a02ca53c446bd963eae360bfd98a
2,245
py
Python
scripts/delay_metrics.py
welvin21/pysimt
6250b33dc518b3195da4fc9cc8d32ba7ada958c0
[ "MIT" ]
34
2020-09-21T10:49:57.000Z
2022-01-08T04:50:42.000Z
scripts/delay_metrics.py
welvin21/pysimt
6250b33dc518b3195da4fc9cc8d32ba7ada958c0
[ "MIT" ]
2
2021-01-08T03:52:51.000Z
2021-09-10T07:45:05.000Z
scripts/delay_metrics.py
welvin21/pysimt
6250b33dc518b3195da4fc9cc8d32ba7ada958c0
[ "MIT" ]
5
2021-04-23T09:30:51.000Z
2022-01-09T08:40:45.000Z
#!/usr/bin/env python import os import sys from pathlib import Path import tabulate import sacrebleu from pysimt.metrics.simnmt import AVPScorer, AVLScorer """This script should be run from within the parent folder where each pysimt experiment resides.""" if __name__ == '__main__': results = {} trglang ...
30.337838
101
0.622717
#!/usr/bin/env python import os import sys from pathlib import Path import tabulate import sacrebleu from pysimt.metrics.simnmt import AVPScorer, AVLScorer """This script should be run from within the parent folder where each pysimt experiment resides.""" def read_lines_from_file(fname): lines = [] with ...
0
0
0
0
0
132
0
0
23
24bfe0be0e8ee1aed884f49c89556868a8cc6a13
1,456
py
Python
API/urls.py
AnonC0DER/JobSearch
f7de8cc36011bf9e7494339c437da5596e745381
[ "Apache-2.0" ]
null
null
null
API/urls.py
AnonC0DER/JobSearch
f7de8cc36011bf9e7494339c437da5596e745381
[ "Apache-2.0" ]
null
null
null
API/urls.py
AnonC0DER/JobSearch
f7de8cc36011bf9e7494339c437da5596e745381
[ "Apache-2.0" ]
null
null
null
from django.urls import path, include from rest_framework.schemas import get_schema_view from rest_framework.documentation import include_docs_urls from API import views urlpatterns = [ path('', views.AllMethods.as_view(), name='all-methods'), path('docs/', include_docs_urls(title='JobSearch-docs')), path...
50.206897
89
0.686126
from django.urls import path, include from rest_framework.schemas import get_schema_view from rest_framework.documentation import include_docs_urls from API import views urlpatterns = [ path('', views.AllMethods.as_view(), name='all-methods'), path('docs/', include_docs_urls(title='JobSearch-docs')), path...
0
0
0
0
0
0
0
0
0
d2daa7ae70bee818986e98aee0fb44ecc814683b
1,755
py
Python
source/_cookbook/adaptive-steps.py
danielballan/docs
c6743c92769f76762a29d3fa4684a2dcbbfc6e4f
[ "BSD-2-Clause" ]
null
null
null
source/_cookbook/adaptive-steps.py
danielballan/docs
c6743c92769f76762a29d3fa4684a2dcbbfc6e4f
[ "BSD-2-Clause" ]
null
null
null
source/_cookbook/adaptive-steps.py
danielballan/docs
c6743c92769f76762a29d3fa4684a2dcbbfc6e4f
[ "BSD-2-Clause" ]
null
null
null
""" Use scans with adaptive step sizes ********************************** Problem ======= Concentrate measurement in regions of high variability, taking larger strides through flat regions. Approach ======== The *plans* in bluesky can be fully adaptive, determining one step at a time. A couple built-in plans provid...
30.789474
79
0.658689
""" Use scans with adaptive step sizes ********************************** Problem ======= Concentrate measurement in regions of high variability, taking larger strides through flat regions. Approach ======== The *plans* in bluesky can be fully adaptive, determining one step at a time. A couple built-in plans provid...
0
0
0
0
0
0
0
0
0
4dea91b9cd779b6f10ca196f05d5324b9b5207f4
831
py
Python
omin/tests/test_core.py
dmpio/omin
bedb36eafe681401c11d562f8d7117aad3d758d7
[ "Unlicense" ]
null
null
null
omin/tests/test_core.py
dmpio/omin
bedb36eafe681401c11d562f8d7117aad3d758d7
[ "Unlicense" ]
null
null
null
omin/tests/test_core.py
dmpio/omin
bedb36eafe681401c11d562f8d7117aad3d758d7
[ "Unlicense" ]
1
2021-12-29T16:55:05.000Z
2021-12-29T16:55:05.000Z
import os from glob import glob here = os.getcwd() example_data_dir = os.path.join(os.path.split(here)[0], "example_data", "_data") # print(glob(example_data_dir+"/*")) mcd_def_malonylation_file_list = os.path.join(example_data_dir, "mcd_def_malonylation", "*") mcd_def_malonylation_file_list = glob(mcd_def_malon...
25.96875
92
0.777377
import os from glob import glob from ..core import containers from ..core import handles here = os.getcwd() example_data_dir = os.path.join(os.path.split(here)[0], "example_data", "_data") # print(glob(example_data_dir+"/*")) mcd_def_malonylation_file_list = os.path.join(example_data_dir, "mcd_def_malonylation",...
0
0
0
0
0
363
0
13
114
bd697495975dc88f527e2bc1be0af1d792673636
8,238
py
Python
scripts/sorno_amazon_reviews_scrape.py
hermantai/sorno-py-scripts
2d2d7e942a799161934f4338bfe12c2ff671ca58
[ "Apache-2.0" ]
null
null
null
scripts/sorno_amazon_reviews_scrape.py
hermantai/sorno-py-scripts
2d2d7e942a799161934f4338bfe12c2ff671ca58
[ "Apache-2.0" ]
null
null
null
scripts/sorno_amazon_reviews_scrape.py
hermantai/sorno-py-scripts
2d2d7e942a799161934f4338bfe12c2ff671ca58
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """A script to scrape Amazon product reviews from the web page. Copyright 2014 Heung Ming Tai 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://...
31.684615
180
0.617019
#!/usr/bin/env python """A script to scrape Amazon product reviews from the web page. Copyright 2014 Heung Ming Tai 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://...
0
0
0
5,794
0
1,238
0
-59
292
1a427c8ac3d169c181d0904d196f7f6c4144ad60
12,573
py
Python
packages/main/src/RPA/Desktop/__init__.py
amisol/rpaframework
b1ee8a745a8e4d7bd41fa7765b26ab02b90cfb57
[ "Apache-2.0" ]
518
2020-05-29T11:39:34.000Z
2022-03-31T22:04:08.000Z
packages/main/src/RPA/Desktop/__init__.py
amisol/rpaframework
b1ee8a745a8e4d7bd41fa7765b26ab02b90cfb57
[ "Apache-2.0" ]
316
2020-05-29T06:09:28.000Z
2022-03-31T12:00:33.000Z
packages/main/src/RPA/Desktop/__init__.py
amisol/rpaframework
b1ee8a745a8e4d7bd41fa7765b26ab02b90cfb57
[ "Apache-2.0" ]
99
2020-05-27T20:23:54.000Z
2022-03-26T02:57:35.000Z
import platform import warnings if platform.system() == "Windows": # Configure comtypes to not generate DLL bindings into # current environment, instead keeping them in memory. # Slower, but prevents dirtying environments. import comtypes.client comtypes.client.gen_dir = None # Ignore pywinau...
35.516949
127
0.60447
import logging import platform import sys import warnings if platform.system() == "Windows": # Configure comtypes to not generate DLL bindings into # current environment, instead keeping them in memory. # Slower, but prevents dirtying environments. import comtypes.client comtypes.client.gen_dir = ...
0
0
0
11,600
0
0
0
251
163
59b84ef4a9a48883be034dda7e131c71dfb4f73d
2,857
py
Python
pyavd/Models/Components/Payload.py
AVD-2021/PyAVD
a3a45d97199e80bf98560b08bcd09708c1a0513a
[ "Apache-2.0" ]
null
null
null
pyavd/Models/Components/Payload.py
AVD-2021/PyAVD
a3a45d97199e80bf98560b08bcd09708c1a0513a
[ "Apache-2.0" ]
null
null
null
pyavd/Models/Components/Payload.py
AVD-2021/PyAVD
a3a45d97199e80bf98560b08bcd09708c1a0513a
[ "Apache-2.0" ]
null
null
null
''' xcg of wing = 6.65m 5m #xcg of horizontal tail = 13.5*m #xcg of vertical tail = 13* xcg of nose landing gear = 0.61m xcg of main landing gear = 6.8m #xcg of engine = 11 xcg of engine system = 11m xcg of fuel system = 6m xcg of flight control system = 1m #xcg of hydraulic system = 10.5m #xcg of pneumatic system =...
28.858586
89
0.587679
from gpkit import Model, Variable, Vectorize, VectorVariable, parse_variables, ureg as u from gpkit.constraints.tight import Tight import numpy as np class Payload(Model): """Payload model Variables --------- M [kg] Total Payload mass M_pax ...
0
813
0
523
0
0
0
84
89
26971b88d5c88bf0fce43da725c168b76a99d8f6
924
py
Python
b2style/b2plotstyle.py
anselm-baur/b2style
8d1a49b8169c5bfdc4d74f7574b0ca24a11d530e
[ "MIT" ]
null
null
null
b2style/b2plotstyle.py
anselm-baur/b2style
8d1a49b8169c5bfdc4d74f7574b0ca24a11d530e
[ "MIT" ]
null
null
null
b2style/b2plotstyle.py
anselm-baur/b2style
8d1a49b8169c5bfdc4d74f7574b0ca24a11d530e
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt def set_default_plot_params(): """ Sets default parameters in the matplotlibrc. :return: None """ xtick = { 'top': True, 'minor.visible': True, 'direction': 'in', 'labelsize': 10 } ytick = { 'right': True, 'min...
20.533333
48
0.488095
import matplotlib.pyplot as plt def set_default_plot_params(): """ Sets default parameters in the matplotlibrc. :return: None """ xtick = { 'top': True, 'minor.visible': True, 'direction': 'in', 'labelsize': 10 } ytick = { 'right': True, 'min...
0
0
0
0
0
0
0
0
0
623cc4a88cf805a2be9181a128ec45d41da45e39
746
py
Python
camera/camera-test.py
Mejdi-Thabet/streo-measurment-vision
8fa55dbcb40c24c0d80bc062fc88f5abca3afdd1
[ "MIT" ]
null
null
null
camera/camera-test.py
Mejdi-Thabet/streo-measurment-vision
8fa55dbcb40c24c0d80bc062fc88f5abca3afdd1
[ "MIT" ]
null
null
null
camera/camera-test.py
Mejdi-Thabet/streo-measurment-vision
8fa55dbcb40c24c0d80bc062fc88f5abca3afdd1
[ "MIT" ]
null
null
null
import cv2 # import OpenCv lib cap = cv2.VideoCapture(0) # create cap object # set the format into MJPG in the FourCC format # cap.set(cv2.CAP_PROP_FOURCC,cv2.VideoWriter_fourcc('M','J','P','G')) cap.set(cv2.CAP_PROP_FOURCC,cv2.VideoWriter_fourcc('J','P','E','G')) if not cap.isOp...
39.263158
82
0.563003
import cv2 # import OpenCv lib cap = cv2.VideoCapture(0) # create cap object # set the format into MJPG in the FourCC format # cap.set(cv2.CAP_PROP_FOURCC,cv2.VideoWriter_fourcc('M','J','P','G')) cap.set(cv2.CAP_PROP_FOURCC,cv2.VideoWriter_fourcc('J','P','E','G')) if not cap.isOp...
0
0
0
0
0
0
0
0
0
8daaf49581c6c124d1d1ca6059bbf42aec8dc61e
760
py
Python
final_project/machinetranslation/tests/tests.py
singhashwini12/xzceb-flask_eng_fr
ac5cac807078b4adfec65c4ff20287afe5658f81
[ "Apache-2.0" ]
null
null
null
final_project/machinetranslation/tests/tests.py
singhashwini12/xzceb-flask_eng_fr
ac5cac807078b4adfec65c4ff20287afe5658f81
[ "Apache-2.0" ]
null
null
null
final_project/machinetranslation/tests/tests.py
singhashwini12/xzceb-flask_eng_fr
ac5cac807078b4adfec65c4ff20287afe5658f81
[ "Apache-2.0" ]
null
null
null
""" Module for unit tests for translations """ import unittest if __name__=='__main__': unittest.main()
29.230769
81
0.711842
""" Module for unit tests for translations """ import unittest from translator import french_to_english, english_to_french class TranslationTest(unittest.TestCase): """This Class contains the unit tests for translations""" def test_french_to_english(self): """This method tests the French to English ...
0
0
0
566
0
0
0
38
46
acf3bb14a90d358bd06a4aeaf84395cbe98bf174
47
py
Python
Parte1/Cap4/numbers.py
fabianoflorentino/python-CursoIntensivoDePython
822288cc4b382936dde1bc647e3f8c2b925ced70
[ "Apache-2.0" ]
null
null
null
Parte1/Cap4/numbers.py
fabianoflorentino/python-CursoIntensivoDePython
822288cc4b382936dde1bc647e3f8c2b925ced70
[ "Apache-2.0" ]
null
null
null
Parte1/Cap4/numbers.py
fabianoflorentino/python-CursoIntensivoDePython
822288cc4b382936dde1bc647e3f8c2b925ced70
[ "Apache-2.0" ]
1
2020-02-05T13:07:08.000Z
2020-02-05T13:07:08.000Z
for value in range(1,11): print(str(value))
23.5
25
0.659574
for value in range(1,11): print(str(value))
0
0
0
0
0
0
0
0
0
76f27aff2a93ba3677a16d1134cdc05204043038
852
py
Python
day21/part02.py
Berteun/adventofcode2019
39fdd90073491cd698b1a310c789b577b305d314
[ "MIT" ]
null
null
null
day21/part02.py
Berteun/adventofcode2019
39fdd90073491cd698b1a310c789b577b305d314
[ "MIT" ]
null
null
null
day21/part02.py
Berteun/adventofcode2019
39fdd90073491cd698b1a310c789b577b305d314
[ "MIT" ]
null
null
null
import sys sys.path.append("..") # The logic is as follows. # If we would fall into a gap otherwise, we jump (NOT A T // OR T J) # We jump early, that is a gap at B or C if we have an out, that is we can move to E or we can jump to H. input_string = """\ OR B J AND C J NOT J J AND D J OR E T OR H T AND T J NOT A T OR ...
20.285714
105
0.664319
import operator import sys sys.path.append("..") from collections import defaultdict, namedtuple from intcode import IntCodeMachine, open_file # The logic is as follows. # If we would fall into a gap otherwise, we jump (NOT A T // OR T J) # We jump early, that is a gap at B or C if we have an out, that is we can move ...
0
0
0
0
0
263
0
44
135
197b93869990d0f3d97546f1dea1622b5635a527
448
py
Python
Python Exercises/Mundo1/exercicio35.py
joaopblume/Curso-em-video-exercicios
d554c0c07c8d65b3a219d76fc487a78c11eaf874
[ "MIT" ]
null
null
null
Python Exercises/Mundo1/exercicio35.py
joaopblume/Curso-em-video-exercicios
d554c0c07c8d65b3a219d76fc487a78c11eaf874
[ "MIT" ]
null
null
null
Python Exercises/Mundo1/exercicio35.py
joaopblume/Curso-em-video-exercicios
d554c0c07c8d65b3a219d76fc487a78c11eaf874
[ "MIT" ]
null
null
null
# Desenvolva um programa que leia o comprimento de trs retas e diga ao usurio se elas podem # ou no formar um tringulo. r1 = int(input('Valor do primeiro segmento: ')) r2 = int(input('Valor do segundo segmento: ')) r3 = int(input('Valor do terceiro segmento: ')) if r1 < r2 + r3 and r2 < r1 + r3 and r3 < r1 + r2: ...
37.333333
93
0.700893
# Desenvolva um programa que leia o comprimento de três retas e diga ao usuário se elas podem # ou não formar um triângulo. r1 = int(input('Valor do primeiro segmento: ')) r2 = int(input('Valor do segundo segmento: ')) r3 = int(input('Valor do terceiro segmento: ')) if r1 < r2 + r3 and r2 < r1 + r3 and r3 < r1 + r2: ...
14
0
0
0
0
0
0
0
0
61a4af5829698981e3b9c360f342edf02730b98a
415
py
Python
helper.py
devnoaman/GIZ-pass-python
49bcf3af21053a934959ca89f360a12b2c967820
[ "MIT" ]
null
null
null
helper.py
devnoaman/GIZ-pass-python
49bcf3af21053a934959ca89f360a12b2c967820
[ "MIT" ]
null
null
null
helper.py
devnoaman/GIZ-pass-python
49bcf3af21053a934959ca89f360a12b2c967820
[ "MIT" ]
1
2021-09-28T19:44:24.000Z
2021-09-28T19:44:24.000Z
name='Noaman Monther Mahmood' job='Full-Stack Mobile Developer' header= 'This Job is Done By' desc='And it is one of the requirements to be accepted in th Full-Stack Development Bootcamp \nthat is implemented by Computiq and and GIZ Interview'
41.5
149
0.643373
def printConsoleFotter(): print("\n\n\n-------------------------------------") print('Give this job a 🚀\n\n') print(header+'\n'+name+'\n'+job+'\n'+desc+'\n') name='Noaman Monther Mahmood' job='Full-Stack Mobile Developer' header= 'This Job is Done By' desc='And it is one of the requirements to be accepte...
4
0
0
0
0
147
0
0
23
8c42367d2e5da1623ac19d6395db113c71f802ca
2,166
py
Python
tortuga_kits/ganglia_3_7_2/kit.py
UnivaCorporation/tortuga-kit-ganglia
af8f6b76c7548687177be27f2aec32c7a96b9325
[ "Apache-2.0" ]
3
2018-03-03T15:44:50.000Z
2019-03-14T17:42:21.000Z
tortuga_kits/ganglia_3_7_2/kit.py
UnivaCorporation/tortuga-kit-ganglia
af8f6b76c7548687177be27f2aec32c7a96b9325
[ "Apache-2.0" ]
null
null
null
tortuga_kits/ganglia_3_7_2/kit.py
UnivaCorporation/tortuga-kit-ganglia
af8f6b76c7548687177be27f2aec32c7a96b9325
[ "Apache-2.0" ]
3
2018-03-03T14:24:59.000Z
2018-12-12T17:57:03.000Z
#!/usr/bin/env python # Copyright 2008-2018 Univa Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
34.380952
74
0.66205
#!/usr/bin/env python # Copyright 2008-2018 Univa Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
0
0
0
1,365
0
0
0
57
135
3733083b91aea75ae2b9c0f4c328355efaeea6f4
5,569
py
Python
JupyterNotebooks/DataLoading/preprocessing/images/convert_birdify_to_tfrecord.py
afarkasattila/Birdify2
3dcc373762a901f27cb9d5060785b75ff17b58a7
[ "MIT" ]
null
null
null
JupyterNotebooks/DataLoading/preprocessing/images/convert_birdify_to_tfrecord.py
afarkasattila/Birdify2
3dcc373762a901f27cb9d5060785b75ff17b58a7
[ "MIT" ]
null
null
null
JupyterNotebooks/DataLoading/preprocessing/images/convert_birdify_to_tfrecord.py
afarkasattila/Birdify2
3dcc373762a901f27cb9d5060785b75ff17b58a7
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from .dataset_utils import image_to_tfexample import sys import tensorflow as tf _IMAGE_SIZE = 224 _NUM_CHANNELS = 3 def _add_to_tfrecord(images, labels, num_images, tfrecord_writer): """ Loads data ...
38.406897
123
0.661519
from __future__ import absolute_import from __future__ import division from __future__ import print_function from .dataset_utils import image_to_tfexample from json import dump from numpy import arange, empty, array, empty_like from numpy.random import shuffle from os import walk from PIL import Image from six.moves im...
0
0
0
0
0
4,054
0
45
247
9c7100ba70e063698a89485b827c82e2a9d0ab07
1,710
py
Python
notas_de_clase/img/metodos/esquema_newton.py
AppliedMechanics-EAFIT/Mod_Temporal
6a0506d906ed42b143b773777e8dc0da5af763eb
[ "MIT" ]
5
2019-02-20T18:14:01.000Z
2020-07-19T22:44:44.000Z
notas_de_clase/img/metodos/esquema_newton.py
AppliedMechanics-EAFIT/Mod_Temporal
6a0506d906ed42b143b773777e8dc0da5af763eb
[ "MIT" ]
3
2020-04-15T00:22:58.000Z
2020-07-04T17:03:54.000Z
notas_de_clase/img/metodos/esquema_newton.py
AppliedMechanics-EAFIT/Mod_Temporal
6a0506d906ed42b143b773777e8dc0da5af763eb
[ "MIT" ]
3
2020-05-14T18:17:09.000Z
2020-10-27T06:37:05.000Z
# -*- coding: utf-8 -*- """ Ilustra el mtodo de Newton-Raphson @author: Nicolas Guarin-Zapata """ from __future__ import division, print_function import numpy as np import matplotlib.pyplot as plt plt.rcParams["mathtext.fontset"] = "cm" plt.rcParams["axes.spines.top"] = False plt.rcParams["axes.spines.rig...
30
79
0.605848
# -*- coding: utf-8 -*- """ Ilustra el método de Newton-Raphson @author: Nicolas Guarin-Zapata """ from __future__ import division, print_function import numpy as np import matplotlib.pyplot as plt plt.rcParams["mathtext.fontset"] = "cm" plt.rcParams["axes.spines.top"] = False plt.rcParams["axes.spines.ri...
2
0
0
0
0
0
0
0
0
adf5e0106200486694e07b437ba6cce25229450b
580
py
Python
DisguiseGenerator/yapfLib/main.py
oscarkarnalim/csd
cd62ce5e8a2d86ce5a5f73838738d90b68c98439
[ "Apache-2.0" ]
2
2020-11-19T22:31:57.000Z
2020-11-20T02:30:14.000Z
STRANGETool/yapfLib/main.py
ShivaShirsath/strange
8ea04100c79c77654c37394dea349dd60aac92d9
[ "Apache-2.0" ]
2
2022-01-01T19:50:55.000Z
2022-01-04T10:51:36.000Z
STRANGETool/yapfLib/main.py
ShivaShirsath/strange
8ea04100c79c77654c37394dea349dd60aac92d9
[ "Apache-2.0" ]
2
2021-10-19T12:27:48.000Z
2022-01-04T09:20:19.000Z
from yapf.yapflib.yapf_api import FormatFile import sys # using yapf library taken from https://github.com/google/yapf/ # version v0.28.0 # take the source path sourcePath = sys.argv[1] # take the first argument as the filepath # then update the targeted code with their format corrected. # this function returns an arr...
38.666667
84
0.782759
from yapf.yapflib.yapf_api import FormatFile import sys # using yapf library taken from https://github.com/google/yapf/ # version v0.28.0 # take the source path sourcePath = sys.argv[1] # take the first argument as the filepath # then update the targeted code with their format corrected. # this function returns an arr...
0
0
0
0
0
0
0
0
0
0a3e1af84ab44a2a22acee03efc442791eaa6c38
9,044
py
Python
src/opendr/perception/activity_recognition/cox3d/algorithm/pooling.py
makistsantekidis/opendr
07dee3b59d3487b9c5a93d6946317178a02c9890
[ "Apache-2.0" ]
217
2020-04-10T16:39:36.000Z
2022-03-30T15:39:04.000Z
src/opendr/perception/activity_recognition/cox3d/algorithm/pooling.py
makistsantekidis/opendr
07dee3b59d3487b9c5a93d6946317178a02c9890
[ "Apache-2.0" ]
79
2021-06-23T10:40:10.000Z
2021-12-16T07:59:42.000Z
src/opendr/perception/activity_recognition/cox3d/algorithm/pooling.py
makistsantekidis/opendr
07dee3b59d3487b9c5a93d6946317178a02c9890
[ "Apache-2.0" ]
29
2021-12-16T09:26:13.000Z
2022-03-29T15:19:18.000Z
""" Copyright (c) Lukas Hedegaard. All Rights Reserved. Included in the OpenDR Toolit with permission from the author. """ from typing import Tuple, Union import torch from torch import Tensor from torch.nn.modules.pooling import (AdaptiveAvgPool2d, AdaptiveMaxPool2d, AvgPool2d, MaxPool2d) from logging import getLog...
32.532374
109
0.613777
""" Copyright (c) Lukas Hedegaard. All Rights Reserved. Included in the OpenDR Toolit with permission from the author. """ from typing import Tuple, Union import torch from torch import Tensor from torch.nn.modules.pooling import ( AdaptiveAvgPool1d, AdaptiveAvgPool2d, AdaptiveAvgPool3d, AdaptiveMaxPo...
0
0
0
4,368
0
2,621
0
160
142
23ceb4be40ab14b96763eb535badca57463b0253
8,099
py
Python
summarise_results.py
MDBAuth/EWR_tool
5b05cf276822d97a38a32a5fc031209224a04fb3
[ "CC0-1.0" ]
5
2021-03-17T00:33:53.000Z
2022-03-07T18:16:25.000Z
summarise_results.py
MDBAuth/EWR_tool
5b05cf276822d97a38a32a5fc031209224a04fb3
[ "CC0-1.0" ]
null
null
null
summarise_results.py
MDBAuth/EWR_tool
5b05cf276822d97a38a32a5fc031209224a04fb3
[ "CC0-1.0" ]
2
2022-01-14T03:50:10.000Z
2022-02-14T00:45:56.000Z
import pandas as pd import data_inputs, evaluate_EWRs #-------------------------------------------------------------------------------------------------- def sum_events(events): '''returns a sum of events''' return int(round(events.sum(), 0)) def get_frequency(events): '''Returns the frequency of years t...
47.087209
118
0.548463
import pandas as pd import numpy as np import data_inputs, evaluate_EWRs #-------------------------------------------------------------------------------------------------- def sum_events(events): '''returns a sum of events''' return int(round(events.sum(), 0)) def get_frequency(events): '''Returns the f...
0
0
0
0
0
570
0
-3
68
f247545caa576995f4dbbcab2062f6ee8bbeab4d
849
py
Python
ex070.py
felipesch92/PythonExercicios
73edcbde6beaabcfc86af3dd6e58473f1eecabd3
[ "MIT" ]
null
null
null
ex070.py
felipesch92/PythonExercicios
73edcbde6beaabcfc86af3dd6e58473f1eecabd3
[ "MIT" ]
null
null
null
ex070.py
felipesch92/PythonExercicios
73edcbde6beaabcfc86af3dd6e58473f1eecabd3
[ "MIT" ]
null
null
null
# Crie um programa que leia o nome e o preo de vrios produtos. # O programa dever perguntar se o usurio vai continuar ou no. No final, mostre: # A) qual o total gasto na compra. # B) quantos produtos custam mais de R$1000. # C) qual o nome do produto mais barato. n = '' p = 0 t = 0 c = 0 b_p = 0 # preo produto mais ...
29.275862
82
0.59364
# Crie um programa que leia o nome e o preço de vários produtos. # O programa deverá perguntar se o usuário vai continuar ou não. No final, mostre: # A) qual é o total gasto na compra. # B) quantos produtos custam mais de R$1000. # C) qual é o nome do produto mais barato. n = '' p = 0 t = 0 c = 0 b_p = 0 # preço produ...
16
0
0
0
0
0
0
0
0
302b08f7c01bb97345c6e836aa5a2613fe0bec05
1,123
py
Python
libs/sdc_etl_libs/database_helpers/DatabaseFactory.py
darknegma/docker-airflow
44e3d02d7ac43c8876145ae47acfbbbde67230df
[ "Apache-2.0" ]
null
null
null
libs/sdc_etl_libs/database_helpers/DatabaseFactory.py
darknegma/docker-airflow
44e3d02d7ac43c8876145ae47acfbbbde67230df
[ "Apache-2.0" ]
3
2021-03-31T19:26:57.000Z
2021-12-13T20:33:01.000Z
libs/sdc_etl_libs/database_helpers/DatabaseFactory.py
darknegma/docker-airflow
44e3d02d7ac43c8876145ae47acfbbbde67230df
[ "Apache-2.0" ]
null
null
null
import os import sys import logging sys.path.append(os.path.dirname(os.path.realpath(__file__))) logging.basicConfig( format='%(levelname)s: %(asctime)s: ' '%(funcName)s: %(message)s') logger = logging.getLogger(__name__) logger.setLevel(logging.INFO)
35.09375
81
0.722173
import os import sys import logging sys.path.append(os.path.dirname(os.path.realpath(__file__))) from sdc_etl_libs.database_helpers.SnowflakeDatabase import SnowflakeDatabase from sdc_etl_libs.database_helpers.NexusDatabase import NexusDatabase from sdc_etl_libs.database_helpers.MySqlDatabase import MySqlDatabase from...
0
494
0
9
0
0
0
212
138
9d2fd0de485396dcbbf68d054d38cd532366fff7
686
py
Python
flow/delete_orphaned_datasets/code.py
dataiku/dss-code-samples
fceebfaf1c3fa0fefa5df4c5862b5befa386040f
[ "Apache-2.0" ]
12
2018-05-21T18:05:55.000Z
2021-10-29T23:40:28.000Z
flow/delete_orphaned_datasets/code.py
dataiku/dss-code-samples
fceebfaf1c3fa0fefa5df4c5862b5befa386040f
[ "Apache-2.0" ]
12
2019-02-12T17:46:15.000Z
2021-08-17T09:22:33.000Z
flow/delete_orphaned_datasets/code.py
dataiku/dss-code-samples
fceebfaf1c3fa0fefa5df4c5862b5befa386040f
[ "Apache-2.0" ]
8
2018-09-06T17:40:18.000Z
2022-02-28T02:28:34.000Z
def delete_orphaned_datasets(client=None, project_key=None, drop_data=False, dry_run=True): """Delete datasets that are not linked to any recipe. """ prj = client.get_project(project_key) flow = prj.get_flow() graph = flow.get_graph() cpt = 0 for name, props in graph.nodes.items(): ...
34.3
91
0.593294
import dataiku def delete_orphaned_datasets(client=None, project_key=None, drop_data=False, dry_run=True): """Delete datasets that are not linked to any recipe. """ prj = client.get_project(project_key) flow = prj.get_flow() graph = flow.get_graph() cpt = 0 for name, props in graph.nodes.it...
0
0
0
0
0
0
0
-7
22
02c495ae19bd0973705888f46d3438af6a3fbc59
598
py
Python
macOS/ss_rss_decode.py
enihsyou/dotfiles
7805f496405fe1b5795a11cc9c3b7ebfc21f5302
[ "MIT" ]
null
null
null
macOS/ss_rss_decode.py
enihsyou/dotfiles
7805f496405fe1b5795a11cc9c3b7ebfc21f5302
[ "MIT" ]
null
null
null
macOS/ss_rss_decode.py
enihsyou/dotfiles
7805f496405fe1b5795a11cc9c3b7ebfc21f5302
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from urllib.request import urlopen from urllib.parse import unquote import base64 import re n3ro_rss_link = input("N3RO SIP002 URIs: ").strip() data = urlopen(n3ro_rss_link).read() links = base64.b64decode(data).decode() for link in links.splitlines(): matcher = re.match(r"ss://(.+)@(.+)#(....
29.9
63
0.635452
#!/usr/bin/env python3 from urllib.request import urlopen from urllib.parse import unquote import base64 import re n3ro_rss_link = input("N3RO SIP002 URIs: ").strip() data = urlopen(n3ro_rss_link).read() links = base64.b64decode(data).decode() for link in links.splitlines(): matcher = re.match(r"ss://(.+)@(.+)#(....
0
0
0
0
0
0
0
0
0
be5dba132045cad3c5008ecb5d5399651de45f89
5,482
py
Python
Fib_It.py
TheScott463/NN_tools
56fe08261827d6e28b4322ea464f4250bbfaac27
[ "MIT" ]
null
null
null
Fib_It.py
TheScott463/NN_tools
56fe08261827d6e28b4322ea464f4250bbfaac27
[ "MIT" ]
null
null
null
Fib_It.py
TheScott463/NN_tools
56fe08261827d6e28b4322ea464f4250bbfaac27
[ "MIT" ]
null
null
null
from itertools import islice from time import ctime print(ctime()) print("" "fibonacci algorithms.py") print("Iterative positive and negative") print(ctime()) print(ctime()) print("expected Output:") print( "-832040 514229 -317811 196418 -121393 75025 -46368 28657 -17711 " "10946 -6765 4181 -2584 ...
21.667984
114
0.579898
import math from itertools import islice from time import ctime print(ctime()) print("" "fibonacci algorithms.py") print("Iterative positive and negative") print(ctime()) def fib(n, x=None): if x is None: x = [0, 1] for i in range(abs(n) - 1): x = [x[1], sum(x)] return x[1] * ma...
0
0
0
0
340
1,710
0
-10
321
3c75fc14c1dbc3a08513e1f8a3cda194ef98c85d
4,498
py
Python
src/model_training/trainer.py
dishamehra/merlin-on-gcp
6050b31689ecb585e2298a27300aa9bf9433e7cd
[ "Apache-2.0" ]
2
2021-07-08T16:02:50.000Z
2022-03-29T08:30:18.000Z
src/model_training/trainer.py
dishamehra/merlin-on-gcp
6050b31689ecb585e2298a27300aa9bf9433e7cd
[ "Apache-2.0" ]
1
2021-08-03T16:36:42.000Z
2021-08-03T19:58:02.000Z
src/model_training/trainer.py
dishamehra/merlin-on-gcp
6050b31689ecb585e2298a27300aa9bf9433e7cd
[ "Apache-2.0" ]
7
2021-07-08T21:46:27.000Z
2021-08-03T16:02:53.000Z
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
33.819549
92
0.724322
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
0
0
0
0
0
3,374
0
130
292
2ee25cc12a87f3fa2f796eb4786dd982677dce46
797
py
Python
ctf/Google-ctf/image-to-string.py
Sylhare/Flag
8f056593466c8611fae0f5ed0d39c711f694f41b
[ "MIT" ]
null
null
null
ctf/Google-ctf/image-to-string.py
Sylhare/Flag
8f056593466c8611fae0f5ed0d39c711f694f41b
[ "MIT" ]
4
2019-02-06T16:08:56.000Z
2019-03-17T20:12:50.000Z
ctf/Google-ctf/image-to-string.py
Sylhare/Flag
8f056593466c8611fae0f5ed0d39c711f694f41b
[ "MIT" ]
null
null
null
import pytesseract from PIL import Image img = Image.open("flag.png") text = pytesseract.image_to_string(img) print(rot_encode(7)(text)) if __name__ == '__main__': pass
24.151515
70
0.648683
import pytesseract from PIL import Image img = Image.open("flag.png") text = pytesseract.image_to_string(img) def rot(*symbols): def _rot(n): encoded = ''.join(sy[n:] + sy[:n] for sy in symbols) lookup = str.maketrans(''.join(symbols), encoded) return lambda s: s.translate(lookup) re...
0
0
0
0
0
548
0
0
69
3e46954c165d1812f769952525be44965339574a
5,180
py
Python
script/compile_content.py
GameTechDev/gametechdev-site
05a99f542a8ff57700e3df1f16afb16a6837ad75
[ "MIT" ]
1
2021-12-28T10:57:22.000Z
2021-12-28T10:57:22.000Z
script/compile_content.py
GameTechDev/gametechdev-site
05a99f542a8ff57700e3df1f16afb16a6837ad75
[ "MIT" ]
null
null
null
script/compile_content.py
GameTechDev/gametechdev-site
05a99f542a8ff57700e3df1f16afb16a6837ad75
[ "MIT" ]
null
null
null
import json import requests import sys from bs4 import BeautifulSoup from os.path import exists from os import mkdir, environ if __name__ == '__main__': reposUrl = '' authToken = '' if len(sys.argv) > 1: reposUrl = sys.argv[1] authToken = sys.argv[2] else: # an orgs' repo li...
37.810219
119
0.528185
import json import requests import sys import yaml from bs4 import BeautifulSoup from os.path import exists from os import mkdir, environ def dump_json(output, data_to_save): save = open(output, 'w') json.dump(data_to_save, save) save.close() print('Saved json to', output) def dump_yaml(output, data...
0
0
0
0
0
260
0
-10
68
01c7d781c8bc2ec107e76b32652f3677ea1f3046
2,927
py
Python
enaml/wx/wx_application.py
pberkes/enaml
cbcbee929e3117dfe56c0b06dc2385acc832b0e8
[ "BSD-3-Clause-Clear" ]
11
2015-03-14T14:30:51.000Z
2022-03-15T13:01:44.000Z
enaml/wx/wx_application.py
pberkes/enaml
cbcbee929e3117dfe56c0b06dc2385acc832b0e8
[ "BSD-3-Clause-Clear" ]
3
2015-01-31T11:12:56.000Z
2022-03-14T00:53:25.000Z
enaml/wx/wx_application.py
pberkes/enaml
cbcbee929e3117dfe56c0b06dc2385acc832b0e8
[ "BSD-3-Clause-Clear" ]
4
2015-01-27T01:56:14.000Z
2021-02-23T07:21:20.000Z
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------------------------------...
28.980198
79
0.546293
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------------------------------...
0
0
0
2,361
0
0
0
79
136
0b1a0b850c9213734b43e7e8487946f434190431
1,206
py
Python
test/testings/platform.py
HansBug/hbutils
6872311c8a441c5955572e0093b10189a2b90708
[ "Apache-2.0" ]
null
null
null
test/testings/platform.py
HansBug/hbutils
6872311c8a441c5955572e0093b10189a2b90708
[ "Apache-2.0" ]
25
2021-10-03T06:19:05.000Z
2022-03-27T12:48:57.000Z
test/testings/platform.py
HansBug/hbutils
6872311c8a441c5955572e0093b10189a2b90708
[ "Apache-2.0" ]
null
null
null
import os import platform import pytest _is_win = bool(os.environ.get('IS_WIN', None)) _is_macos = bool(os.environ.get('IS_MAC', None)) _is_linux = not _is_macos and not _is_win windows_mark = pytest.mark.unittest if _is_win else pytest.mark.ignore macos_mark = pytest.mark.unittest if _is_macos else pytest.mark.igno...
37.6875
74
0.759536
import os import platform import pytest _is_win = bool(os.environ.get('IS_WIN', None)) _is_macos = bool(os.environ.get('IS_MAC', None)) _is_linux = not _is_macos and not _is_win windows_mark = pytest.mark.unittest if _is_win else pytest.mark.ignore macos_mark = pytest.mark.unittest if _is_macos else pytest.mark.igno...
0
0
0
0
0
0
0
0
0
0a97a4190c7e21d95b9fda88952299aa6a1aae1f
1,813
py
Python
adventofcode2020/12.py
matslindh/codingchallenges
b6792808b03ea07304fda7e74c874c2c4d200dac
[ "MIT" ]
2
2016-12-28T09:40:07.000Z
2020-12-08T13:58:15.000Z
adventofcode2020/12.py
matslindh/codingchallenges
b6792808b03ea07304fda7e74c874c2c4d200dac
[ "MIT" ]
null
null
null
adventofcode2020/12.py
matslindh/codingchallenges
b6792808b03ea07304fda7e74c874c2c4d200dac
[ "MIT" ]
null
null
null
if __name__ == '__main__': print(navigation_schmavigation([l.strip() for l in open('input/12')])) print(navigation_schmavigation_2([l.strip() for l in open('input/12')]))
22.949367
88
0.447876
def rotate(current, dir, num): seq = ['E', 'S', 'W', 'N'] if dir == 'L': seq.reverse() num //= 90 return seq[(seq.index(current) + num) % len(seq)] def navigation_schmavigation(instructions): dir = 'E' x, y = 0, 0 for instr in instructions: inp = instr[0...
0
0
0
0
0
1,515
0
0
114
510784fb3b0fea6c94638a9a31c35e3c758d9b66
3,638
py
Python
align/cell_fabric/gen_magic.py
thesourcerer8/ALIGN-public
2e061c719e15f5e4ffafde6b3bfdc1f5dbb45654
[ "BSD-3-Clause" ]
2
2020-12-15T11:16:23.000Z
2021-05-10T08:08:34.000Z
align/cell_fabric/gen_magic.py
thesourcerer8/ALIGN-public
2e061c719e15f5e4ffafde6b3bfdc1f5dbb45654
[ "BSD-3-Clause" ]
1
2020-08-26T08:01:53.000Z
2020-08-29T04:24:00.000Z
align/cell_fabric/gen_magic.py
thesourcerer8/ALIGN-public
2e061c719e15f5e4ffafde6b3bfdc1f5dbb45654
[ "BSD-3-Clause" ]
2
2020-08-15T07:09:52.000Z
2020-08-16T10:19:58.000Z
#!/usr/bin/python import logging logger = logging.getLogger(__name__)
38.294737
170
0.575316
#!/usr/bin/python import re import json import datetime from . import pdk import logging logger = logging.getLogger(__name__) def translate_data( macro_name, exclude_pattern, pdkfile, pinSwitch, data, via_gen_tbl, timestamp=None): j = pdk.Pdk().load(pdkfile) with open(pdkfile, "rt") as fp1: j1 = json.load(fp1)...
0
0
0
0
0
3,466
0
-32
134
b9c787700d0831ebd09156e925743799a1f8c4a0
1,256
py
Python
src/posts/templatetags/posts_tags.py
pratik-devkota/notesewa
f93e8da43ce48aba43d86ed21861acf099b03f40
[ "MIT" ]
null
null
null
src/posts/templatetags/posts_tags.py
pratik-devkota/notesewa
f93e8da43ce48aba43d86ed21861acf099b03f40
[ "MIT" ]
null
null
null
src/posts/templatetags/posts_tags.py
pratik-devkota/notesewa
f93e8da43ce48aba43d86ed21861acf099b03f40
[ "MIT" ]
1
2021-04-12T12:12:23.000Z
2021-04-12T12:12:23.000Z
""" File defining custom template tags for our project """ # Core Django imports from django import template # app-imports # third-party imports register = template.Library() # template filters are registered the same as template tags
28.545455
75
0.735669
""" File defining custom template tags for our project """ # Core Django imports from django import template from django.utils.safestring import mark_safe # app-imports from posts.models import Post # third-party imports import markdown register = template.Library() @register.simple_tag def total_posts(): """...
0
855
0
0
0
0
0
26
134
9c684ca6bfbf0f62dc9afeed12f0225ec579b3a7
13,179
py
Python
tests/models/test_gpu.py
djbyrne/pytorch-lightning
dab3b965cb9ceacc3f44aa2240b495d5996c6011
[ "Apache-2.0" ]
null
null
null
tests/models/test_gpu.py
djbyrne/pytorch-lightning
dab3b965cb9ceacc3f44aa2240b495d5996c6011
[ "Apache-2.0" ]
null
null
null
tests/models/test_gpu.py
djbyrne/pytorch-lightning
dab3b965cb9ceacc3f44aa2240b495d5996c6011
[ "Apache-2.0" ]
null
null
null
import os import pytest import tests.base.utils as tutils from pytorch_lightning import Trainer from pytorch_lightning.callbacks import ModelCheckpoint from pytorch_lightning.core import memory from tests.base import LightningTestModel PRETEND_N_OF_GPUS = 16 def test_multi_gpu_model_ddp2(tmpdir): """Make sure ...
32.9475
100
0.684574
import os import pytest import torch import tests.base.utils as tutils from pytorch_lightning import Trainer from pytorch_lightning.callbacks import ModelCheckpoint from pytorch_lightning.core import memory from pytorch_lightning.trainer.distrib_parts import ( parse_gpu_ids, determine_root_gpu_device, ) from ...
0
5,718
0
0
0
1,495
0
129
436
b975ce79701ed12694c8ee7194a12a5b3297a9db
6,908
py
Python
src/sage/tests/french_book/integration_doctest.py
bopopescu/sage
2d495be78e0bdc7a0a635454290b27bb4f5f70f0
[ "BSL-1.0" ]
3
2019-07-15T13:48:24.000Z
2019-11-08T12:31:43.000Z
src/sage/tests/french_book/integration_doctest.py
bopopescu/sage
2d495be78e0bdc7a0a635454290b27bb4f5f70f0
[ "BSL-1.0" ]
2
2018-10-30T13:40:20.000Z
2020-07-23T12:13:30.000Z
src/sage/tests/french_book/integration_doctest.py
bopopescu/sage
2d495be78e0bdc7a0a635454290b27bb4f5f70f0
[ "BSL-1.0" ]
7
2021-11-08T10:01:59.000Z
2022-03-03T11:25:52.000Z
## -*- encoding: utf-8 -*- """ This file (./integration_doctest.sage) was *autogenerated* from ./integration.tex, with sagetex.sty version 2011/05/27 v2.3.1. It contains the contents of all the sageexample environments from this file. You should be able to doctest this file with: sage -t ./integration_doctest.sage It i...
31.257919
82
0.640562
## -*- encoding: utf-8 -*- """ This file (./integration_doctest.sage) was *autogenerated* from ./integration.tex, with sagetex.sty version 2011/05/27 v2.3.1. It contains the contents of all the sageexample environments from this file. You should be able to doctest this file with: sage -t ./integration_doctest.sage It i...
4
0
0
0
0
0
0
0
0
625ef7eed497f262e56e5bba6003fd8511f923b6
2,568
py
Python
apps/bookstore/migrations/0001_initial.py
goutomroy/django_select_prefetch_related
489d7e058c6283b52c8b2690aaff0dfed93cfc07
[ "Apache-2.0" ]
17
2019-12-11T11:02:01.000Z
2021-10-06T11:58:23.000Z
apps/bookstore/migrations/0001_initial.py
goutomroy/django_select_prefetch_related
489d7e058c6283b52c8b2690aaff0dfed93cfc07
[ "Apache-2.0" ]
8
2019-12-04T23:09:42.000Z
2021-06-10T17:45:57.000Z
apps/bookstore/migrations/0001_initial.py
goutomroy/django_select_prefetch_related
489d7e058c6283b52c8b2690aaff0dfed93cfc07
[ "Apache-2.0" ]
7
2019-12-11T11:02:06.000Z
2021-10-06T09:55:25.000Z
# Generated by Django 3.0.2 on 2020-07-21 00:58
40.125
148
0.593458
# Generated by Django 3.0.2 on 2020-07-21 00:58 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
0
0
0
2,388
0
0
0
41
90
0f091f16a19a47d5d8e327b5b69ae8e7dc948189
114
py
Python
multimeter/__init__.py
wowace/multimeter
24eed9cd59819a27c110b10c637e14735b29710f
[ "MIT" ]
null
null
null
multimeter/__init__.py
wowace/multimeter
24eed9cd59819a27c110b10c637e14735b29710f
[ "MIT" ]
48
2018-03-02T14:57:01.000Z
2020-02-13T10:08:12.000Z
multimeter/__init__.py
kafitimi/multimeter
24eed9cd59819a27c110b10c637e14735b29710f
[ "MIT" ]
null
null
null
""" """ default_app_config = 'multimeter.apps.MultimeterConfig' # pylint: disable=invalid-name
28.5
87
0.763158
""" Заголовок пакета """ default_app_config = 'multimeter.apps.MultimeterConfig' # pylint: disable=invalid-name
30
0
0
0
0
0
0
0
0
1fa3a09416c6649076d6bef859c6fa35a7ef1972
2,256
py
Python
C3CTF/2019 36C3/bacon/brute.py
PurpEth/solved-hacking-problem
6f289d1647eb9c091caa580c7aae673e3ba02952
[ "Unlicense" ]
1
2021-08-24T22:16:41.000Z
2021-08-24T22:16:41.000Z
C3CTF/2019 36C3/bacon/brute.py
PurpEth/solved-hacking-problem
6f289d1647eb9c091caa580c7aae673e3ba02952
[ "Unlicense" ]
null
null
null
C3CTF/2019 36C3/bacon/brute.py
PurpEth/solved-hacking-problem
6f289d1647eb9c091caa580c7aae673e3ba02952
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 import itertools import sys MASK = 0xffffff # did I implement this correctly? assert forward(*map(bytes.fromhex, ('1211100a0908020100', '20796c6c6172'))) == b'\xc0\x49\xa5\x38\x5a\xdc' if len(sys.argv) < 2: print(f"Usage: python3 {sys.argv[0]} <hex>...
26.541176
84
0.51906
#!/usr/bin/env python3 import itertools import sys MASK = 0xffffff def forward(key, blk): assert tuple(map(len, (key, blk))) == (9, 6) def S(j, v): return (v << j | (v & MASK) >> 24-j) & MASK ws = blk[:3], blk[3:], key[:3], key[3:6], key[6:] x, y, l1, l0, k0 = (int.from_bytes(w, 'big') for w in ws) ...
0
0
0
0
0
1,231
0
0
69
ae68e1d05aa2cc50e49cb492dc00efe34def4ab5
879
py
Python
day-7-finding-the-percentage.py
roshansinghbisht/hello-python
595418a47e66217ed8759c91cdb535e8fa88412b
[ "MIT" ]
null
null
null
day-7-finding-the-percentage.py
roshansinghbisht/hello-python
595418a47e66217ed8759c91cdb535e8fa88412b
[ "MIT" ]
null
null
null
day-7-finding-the-percentage.py
roshansinghbisht/hello-python
595418a47e66217ed8759c91cdb535e8fa88412b
[ "MIT" ]
null
null
null
if __name__ == '__main__': n = int(input()) student_marks = {} for _ in range(n): name, *line = input().split() scores = list(map(float, line)) student_marks[name] = scores query_name = input() average = sum(student_marks[query_name])/ len(student_marks[query_name]) print...
41.857143
76
0.701934
if __name__ == '__main__': n = int(input()) student_marks = {} for _ in range(n): name, *line = input().split() scores = list(map(float, line)) student_marks[name] = scores query_name = input() average = sum(student_marks[query_name])/ len(student_marks[query_name]) print...
0
0
0
0
0
0
0
0
0
30ed6383084d2cfbd8d6b41733e49f997dcaedcb
96
py
Python
venv/lib/python3.8/site-packages/past/types/basestring.py
Retraces/UkraineBot
3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71
[ "MIT" ]
2
2022-03-13T01:58:52.000Z
2022-03-31T06:07:54.000Z
venv/lib/python3.8/site-packages/past/types/basestring.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
19
2021-11-20T04:09:18.000Z
2022-03-23T15:05:55.000Z
venv/lib/python3.8/site-packages/past/types/basestring.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
null
null
null
/home/runner/.cache/pip/pool/aa/b2/26/72bdb8c2f74308cbc5f71d13cb1f12d650ade8623046fcee026be0fd38
96
96
0.895833
/home/runner/.cache/pip/pool/aa/b2/26/72bdb8c2f74308cbc5f71d13cb1f12d650ade8623046fcee026be0fd38
0
0
0
0
0
0
0
0
0
8f4929cdba696e92236ff3ff30c4593997b2dc01
9,400
py
Python
scripts/nasqm.py
PotentialParadox/pynasqm
1bd51299b6ca7f8229d8a15428515d53a358903c
[ "MIT" ]
1
2020-03-13T22:34:03.000Z
2020-03-13T22:34:03.000Z
scripts/nasqm.py
PotentialParadox/pynasqm
1bd51299b6ca7f8229d8a15428515d53a358903c
[ "MIT" ]
null
null
null
scripts/nasqm.py
PotentialParadox/pynasqm
1bd51299b6ca7f8229d8a15428515d53a358903c
[ "MIT" ]
null
null
null
''' Run NASQM created by Dustin Tracy (dtracy.uf@gmail.com) This program is used to automate NASQM job creations. You'll find the parameters to change in the file nasqm_user_input.py ''' import argparse import time from pynasqm.initialize import initialize from pynasqm.write import (write_omega_vs_time, write_spectra_f...
38.683128
98
0.738191
''' Run NASQM created by Dustin Tracy (dtracy.uf@gmail.com) This program is used to automate NASQM job creations. You'll find the parameters to change in the file nasqm_user_input.py ''' import argparse import time from pynasqm.initialize import initialize from pynasqm.inputceon import InputCeon from pynasqm.write impo...
0
0
0
0
0
2,373
0
174
431
4a8b715fe771ab67480fb9b37145118295310381
224
py
Python
run_gunicorn.py
SlideAtlas/SlideAtlas-Server
3b9cbd56eaa29ae08ae521e75616ea230fe26397
[ "Apache-2.0" ]
3
2015-10-10T10:17:26.000Z
2020-12-14T09:42:19.000Z
run_gunicorn.py
SlideAtlas/SlideAtlas-Server
3b9cbd56eaa29ae08ae521e75616ea230fe26397
[ "Apache-2.0" ]
41
2015-02-03T19:47:28.000Z
2017-02-06T23:24:26.000Z
run_gunicorn.py
SlideAtlas/SlideAtlas-Server
3b9cbd56eaa29ae08ae521e75616ea230fe26397
[ "Apache-2.0" ]
2
2016-04-04T18:23:27.000Z
2017-11-14T22:34:58.000Z
# coding=utf-8 # Development server from slideatlas import create_app app = create_app() # app.run(host='0.0.0.0', port=8080) if __name__ == "__main__": print "To run:\ngunicorn run_gunicorn:app -b localhost:8080 -w 4"
24.888889
69
0.714286
# coding=utf-8 # Development server from slideatlas import create_app app = create_app() # app.run(host='0.0.0.0', port=8080) if __name__ == "__main__": print "To run:\ngunicorn run_gunicorn:app -b localhost:8080 -w 4"
0
0
0
0
0
0
0
0
0
a8bf0c58483a2e21ccdf3815d73bbf19efd309c2
990
py
Python
examples/608_plan_pick_trajectory.py
djprohasky/workshop_swinburne_2021
596eb12595ef7c2522dc8e03163e917ca43d2a0a
[ "MIT" ]
4
2021-12-13T09:57:06.000Z
2022-01-04T15:04:58.000Z
examples/608_plan_pick_trajectory.py
djprohasky/workshop_swinburne_2021
596eb12595ef7c2522dc8e03163e917ca43d2a0a
[ "MIT" ]
3
2021-06-16T10:27:09.000Z
2021-06-17T02:37:04.000Z
examples/608_plan_pick_trajectory.py
djprohasky/workshop_swinburne_2021
596eb12595ef7c2522dc8e03163e917ca43d2a0a
[ "MIT" ]
3
2021-06-15T12:43:22.000Z
2021-06-16T11:01:38.000Z
import os import helpers from compas_fab.backends import RosClient from compas_fab.robots import PlanningScene import compas HERE = os.path.dirname(__file__) MAX_STEP = 0.01 # Load assembly filename = os.path.join(HERE, 'assembly.json') assembly = compas.json_load(filename) with RosClient() as client: robot = ...
28.285714
100
0.70202
import os import helpers from compas_fab.backends import RosClient from compas_fab.robots import PlanningScene import compas HERE = os.path.dirname(__file__) MAX_STEP = 0.01 # Load assembly filename = os.path.join(HERE, 'assembly.json') assembly = compas.json_load(filename) with RosClient() as client: robot = ...
0
0
0
0
0
0
0
0
0
48f81270935a674567f3e6de615f1bc99760148d
2,009
py
Python
src/doit/sanitizedtable/sqlalchemy/sqlmodel.py
khusmann/doit
305c04bda1ccfc38c86b97e4360481af654827e7
[ "MIT" ]
null
null
null
src/doit/sanitizedtable/sqlalchemy/sqlmodel.py
khusmann/doit
305c04bda1ccfc38c86b97e4360481af654827e7
[ "MIT" ]
null
null
null
src/doit/sanitizedtable/sqlalchemy/sqlmodel.py
khusmann/doit
305c04bda1ccfc38c86b97e4360481af654827e7
[ "MIT" ]
null
null
null
from __future__ import annotations from ...common.sqlalchemy import (declarative_base) Base = declarative_base()
25.75641
75
0.683922
from __future__ import annotations import typing as t import enum from sqlalchemy import ( Column, Integer, String, ForeignKey, MetaData, Table, JSON, ) from sqlalchemy.orm import ( relationship, RelationshipProperty, ) from ...common.sqlalchemy import ( declarative_base, R...
0
0
0
941
0
546
0
204
204
0edbcf145b35a1d7ce69dc123941f51b9137fada
13,087
py
Python
src/test/tinc/tincrepo/mpp/lib/gpdbSegmentConfig.py
rodel-talampas/gpdb
9c955e350334abbd922102f289f782697eb52069
[ "PostgreSQL", "Apache-2.0" ]
9
2018-04-20T03:31:01.000Z
2020-05-13T14:10:53.000Z
src/test/tinc/tincrepo/mpp/lib/gpdbSegmentConfig.py
rodel-talampas/gpdb
9c955e350334abbd922102f289f782697eb52069
[ "PostgreSQL", "Apache-2.0" ]
36
2017-09-21T09:12:27.000Z
2020-06-17T16:40:48.000Z
src/test/tinc/tincrepo/mpp/lib/gpdbSegmentConfig.py
rodel-talampas/gpdb
9c955e350334abbd922102f289f782697eb52069
[ "PostgreSQL", "Apache-2.0" ]
32
2017-08-31T12:50:52.000Z
2022-03-01T07:34:53.000Z
#!/usr/bin/env python # Line too long - pylint: disable=C0301 # Invalid name - pylint: disable=C0103 """ Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the under the Apache License, Version 2.0 (the "License"); you may not use this ...
40.896875
358
0.593184
#!/usr/bin/env python # Line too long - pylint: disable=C0301 # Invalid name - pylint: disable=C0103 """ Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the under the Apache License, Version 2.0 (the "License"); you may not use this ...
0
0
0
11,673
0
0
0
0
22
e8e874d1ba46c6302dbad010c653ee72b994c3aa
1,851
py
Python
main_PyBank.py
akshitarora19/Python
b097585bc075a693e159490bf1061f4efe36bc3f
[ "ADSL" ]
null
null
null
main_PyBank.py
akshitarora19/Python
b097585bc075a693e159490bf1061f4efe36bc3f
[ "ADSL" ]
null
null
null
main_PyBank.py
akshitarora19/Python
b097585bc075a693e159490bf1061f4efe36bc3f
[ "ADSL" ]
null
null
null
import os import csv total_months=0 total=0 last_pl=0 average_change=0 change_in_pl=0 total_change=0 ginc_profits=0 gdec_profits=0 prev_change_in_pl=0 ginc_profits_month="" gdec_profits_month="" csvpath=os.path.join("..", "Resources", "budget_data.csv") with open (csvpath, newline="") as csvfile: csvreader=...
30.85
92
0.647218
import os import csv total_months=0 total=0 last_pl=0 average_change=0 change_in_pl=0 total_change=0 ginc_profits=0 gdec_profits=0 prev_change_in_pl=0 ginc_profits_month="" gdec_profits_month="" csvpath=os.path.join("..", "Resources", "budget_data.csv") with open (csvpath, newline="") as csvfile: csvreader=...
0
0
0
0
0
0
0
0
0
124e9b1791f943c162075aa54d54f6b877b4680c
15,562
py
Python
applications/ATOM/utils/gather_atom_metrics.py
jonesholger/lbann
3214f189a1438565d695542e076c4fa8e7332d34
[ "Apache-2.0" ]
194
2016-07-19T15:40:21.000Z
2022-03-19T08:06:10.000Z
applications/ATOM/utils/gather_atom_metrics.py
jonesholger/lbann
3214f189a1438565d695542e076c4fa8e7332d34
[ "Apache-2.0" ]
1,021
2016-07-19T12:56:31.000Z
2022-03-29T00:41:47.000Z
applications/ATOM/utils/gather_atom_metrics.py
jonesholger/lbann
3214f189a1438565d695542e076c4fa8e7332d34
[ "Apache-2.0" ]
74
2016-07-28T18:24:00.000Z
2022-01-24T19:41:04.000Z
import sys import re #tag = sys.argv[len(sys.argv)-1] #for each log file for num in range(len(sys.argv)-1): inp = sys.argv[num+1] print('################################################################################') print("File#", num , " ", inp) print('###################################################...
48.479751
133
0.569528
import sys import numpy as np import re #tag = sys.argv[len(sys.argv)-1] def summarize_metrics(trainer_metrics): total_time = 0 total_train_time = 0 results = {} partial_results = {} total_train_times = [] total_train_times_not_first_epoch = [] # For each epoch, gather data from all trainers for e, da...
0
0
0
0
0
8,844
0
-3
68
988a098972dbe06fa08dd88ea86938c07dd60dfc
1,167
py
Python
scripts/compare_stemmers.py
tklovett/MaudeMiner
ba73f5dd99331c233fede9ccab1a2b1d5b430324
[ "MIT" ]
3
2015-09-10T09:07:36.000Z
2020-12-01T22:17:06.000Z
scripts/compare_stemmers.py
tklovett/MaudeMiner
ba73f5dd99331c233fede9ccab1a2b1d5b430324
[ "MIT" ]
null
null
null
scripts/compare_stemmers.py
tklovett/MaudeMiner
ba73f5dd99331c233fede9ccab1a2b1d5b430324
[ "MIT" ]
null
null
null
import nltk lines = [] with open("foitext.txt", 'r') as f: for line in f: lines.append(strip_non_ascii(line)) narratives = [x[x.rfind('|')+1:].strip() for x in lines] tokens_list = [nltk.wordpunct_tokenize(x) for x in narratives] # pos_list = [nltk.pos_tag(x) for x in tokens_list] tokens = [] for x in tokens_list...
23.34
67
0.700943
import nltk def strip_non_ascii(s): return "".join(i for i in s if ord(i) < 128) lines = [] with open("foitext.txt", 'r') as f: for line in f: lines.append(strip_non_ascii(line)) narratives = [x[x.rfind('|')+1:].strip() for x in lines] tokens_list = [nltk.wordpunct_tokenize(x) for x in narratives] # pos_list = [...
0
0
0
0
0
48
0
0
23
b48daa89ced5699a98cab00df5229ec5b86c586c
6,083
py
Python
neuralnetworks/classifiers/las_model.py
v0lta/tfkaldi
4772e881cc168439723c19f69a2425588f661060
[ "MIT" ]
57
2017-01-19T15:58:46.000Z
2021-01-12T17:57:31.000Z
neuralnetworks/classifiers/las_model.py
v0lta/tfkaldi
4772e881cc168439723c19f69a2425588f661060
[ "MIT" ]
null
null
null
neuralnetworks/classifiers/las_model.py
v0lta/tfkaldi
4772e881cc168439723c19f69a2425588f661060
[ "MIT" ]
15
2017-02-25T17:44:35.000Z
2019-09-23T14:03:18.000Z
''' This module implements a listen attend and spell classifier. ''' from __future__ import absolute_import, division, print_function from IPython.core.debugger import Tracer; debug_here = Tracer();
41.380952
88
0.595594
''' This module implements a listen attend and spell classifier. ''' from __future__ import absolute_import, division, print_function import tensorflow as tf from neuralnetworks.classifiers.classifier import Classifier from neuralnetworks.las_elements import Listener from neuralnetworks.beam_search_speller import Beam...
0
625
0
5,034
0
0
0
111
112
997f596b808ddac161e32183631001799a8088e5
1,127
py
Python
basketball_reference_web_scraper/parsers/players_season_totals.py
sheagk/basketball_reference_web_scraper
820ff9760f91bffc3efd770d91547f3213f42ec8
[ "MIT" ]
null
null
null
basketball_reference_web_scraper/parsers/players_season_totals.py
sheagk/basketball_reference_web_scraper
820ff9760f91bffc3efd770d91547f3213f42ec8
[ "MIT" ]
null
null
null
basketball_reference_web_scraper/parsers/players_season_totals.py
sheagk/basketball_reference_web_scraper
820ff9760f91bffc3efd770d91547f3213f42ec8
[ "MIT" ]
null
null
null
from basketball_reference_web_scraper.parsers.common import split_header_columns __totals_stats_by_year_header_string = "Player,Pos,Age,Tm,G,GS,MP,FG,FGA,FG%,3P,3PA,3P%,2P,2PA,2P%,eFG%,FT,FTA,FT%,ORB,DRB,TRB,AST,STL,BLK,TOV,PF,PTS" _totals_stats_by_year_header_columns = split_header_columns(__totals_stats_by_year_head...
53.666667
150
0.795918
from basketball_reference_web_scraper.data import TEAM_ABBREVIATIONS_TO_TEAM, POSITION_ABBREVIATIONS_TO_POSITION from basketball_reference_web_scraper.parsers.common import COLUMN_RENAMER, COLUMN_PARSER, \ find_team_column, parse_souped_row_given_header_columns, split_header_columns, get_all_tables_with_soup __tot...
0
0
0
0
0
540
0
211
45
1351df6d8950944565fc29066b395b8fc367a49c
13,279
py
Python
implementation/h2o-benchmarker/metaopt.py
kordikp/AutoMLprediction
6f87bd0b95ce78103c9f4f83ee85d831ab60a0a6
[ "Apache-2.0" ]
1
2018-03-22T12:45:32.000Z
2018-03-22T12:45:32.000Z
implementation/h2o-benchmarker/metaopt.py
kordikp/AutoMLprediction
6f87bd0b95ce78103c9f4f83ee85d831ab60a0a6
[ "Apache-2.0" ]
null
null
null
implementation/h2o-benchmarker/metaopt.py
kordikp/AutoMLprediction
6f87bd0b95ce78103c9f4f83ee85d831ab60a0a6
[ "Apache-2.0" ]
null
null
null
import h2o import Benchmarker.config as config import Benchmarker.utils as utils import warnings from optparse import OptionParser from Benchmarker.utils import init_journal import Benchmarker.metaopt.params as p import datetime import re import sys dt = datetime.datetime ## Settings experiment_name = "...
36.084239
150
0.590858
import h2o from Benchmarker.experiment import Experiment import Benchmarker.config as config import Benchmarker.utils as utils import warnings from optparse import OptionParser from Benchmarker.utils import init_journal, close_journal import numbers import Benchmarker.metaopt.fakegame as fg import Benchmarker....
0
0
0
0
0
9,301
0
74
536
56d63ba86ae10523e85c0d58aef43b02420340ec
6,669
py
Python
partymode.py
aruether/partymode
c16599c4d7ad4c3fcc76cf0ce4e8f332feba4c02
[ "MIT" ]
1
2022-03-09T15:52:42.000Z
2022-03-09T15:52:42.000Z
partymode.py
aruether/partymode
c16599c4d7ad4c3fcc76cf0ce4e8f332feba4c02
[ "MIT" ]
null
null
null
partymode.py
aruether/partymode
c16599c4d7ad4c3fcc76cf0ce4e8f332feba4c02
[ "MIT" ]
null
null
null
#!/usr/bin/env python import RPi.GPIO as gpio import time import signal # Volume controls day_volume = 70 night_volume = 100 # Control box IO key_channel = 22 button_channel = 7 armed_indicator_channel = 18 activated_indicator_channel = 29 # Motor IO motor1_channel = 35 motor2_channel = 32 top_limit_channel = 33 ...
25.65
114
0.708202
#!/usr/bin/env python import RPi.GPIO as gpio import os import time import subprocess import sys import signal import threading import datetime # Volume controls day_volume = 70 night_volume = 100 # Control box IO key_channel = 22 button_channel = 7 armed_indicator_channel = 18 activated_indicator_channel = 29 # ...
0
0
0
0
0
4,265
0
-38
429
345b571a44ba28aa19a909ee3ef31505cd612587
457
py
Python
alpacka/agents/callbacks/__init__.py
shoot-tree-search/sts
2d9f19a40c7fb1c637dd3bd230942c01f14927e1
[ "MIT" ]
2
2021-01-03T04:21:56.000Z
2021-02-12T12:54:58.000Z
alpacka/agents/callbacks/__init__.py
shoot-tree-search/sts
2d9f19a40c7fb1c637dd3bd230942c01f14927e1
[ "MIT" ]
null
null
null
alpacka/agents/callbacks/__init__.py
shoot-tree-search/sts
2d9f19a40c7fb1c637dd3bd230942c01f14927e1
[ "MIT" ]
null
null
null
"""Callbacks.""" from alpacka.agents.callbacks import graph_size_callback # Configure callbacks in this module to ensure they're accessible via the # alpacka.agents.callbacks.* namespace. GraphSizeCallback = configure_callback(graph_size_callback.GraphSizeCallback) # pylint: disable=invalid-name
26.882353
109
0.792123
"""Callbacks.""" import gin from alpacka.agents.callbacks import graph_size_callback # Configure callbacks in this module to ensure they're accessible via the # alpacka.agents.callbacks.* namespace. def configure_callback(callback_class): return gin.external_configurable( callback_class, module='alpacka...
0
0
0
0
0
120
0
-11
45
4265a2a6ddbbcec2469a3d81b4e651385adf2254
10,653
py
Python
distributed/dist_fleet/dist_fleet_ctr.py
zjjlivein/continuous_integration
c8825f32136fdd425389702c37ded08d6fd28a26
[ "Apache-2.0" ]
14
2020-03-04T07:52:07.000Z
2022-02-14T01:39:14.000Z
distributed/dist_fleet/dist_fleet_ctr.py
zjjlivein/continuous_integration
c8825f32136fdd425389702c37ded08d6fd28a26
[ "Apache-2.0" ]
19
2020-03-04T03:52:10.000Z
2021-12-23T07:02:07.000Z
distributed/dist_fleet/dist_fleet_ctr.py
zjjlivein/continuous_integration
c8825f32136fdd425389702c37ded08d6fd28a26
[ "Apache-2.0" ]
26
2020-03-04T05:39:09.000Z
2022-02-14T01:43:28.000Z
#!/bin/env python # -*- coding: utf-8 -*- # encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python #====================================================================== # # Copyright (c) 2017 Baidu.com, Inc. All Rights Reserved # #====================================================================== """ @Desc: dist_base_fl...
37.776596
101
0.552708
#!/bin/env python # -*- coding: utf-8 -*- # encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python #====================================================================== # # Copyright (c) 2017 Baidu.com, Inc. All Rights Reserved # #====================================================================== """ @Desc: dist_base_fl...
0
0
0
9,431
0
0
0
5
156
47044f1000f098378c2891a015792409afffcd37
2,235
py
Python
azure-iot-common/tests/test_sastoken.py
olivakar/azure-iot-sdk-python-preview
636855716a362bad1623983026666b5f91c22825
[ "MIT" ]
null
null
null
azure-iot-common/tests/test_sastoken.py
olivakar/azure-iot-sdk-python-preview
636855716a362bad1623983026666b5f91c22825
[ "MIT" ]
null
null
null
azure-iot-common/tests/test_sastoken.py
olivakar/azure-iot-sdk-python-preview
636855716a362bad1623983026666b5f91c22825
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------...
31.041667
94
0.561969
# -*- 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. # --------------------------------------------...
2
0
0
1,728
0
0
0
22
113
a93a345092e0fef48e929c091a6827fefb7df8be
2,891
py
Python
scripts/graphicslib.py
nash169/graphics-lib
a71dd2e27ac64ccccd8f55f1dd87863404789959
[ "MIT" ]
null
null
null
scripts/graphicslib.py
nash169/graphics-lib
a71dd2e27ac64ccccd8f55f1dd87863404789959
[ "MIT" ]
null
null
null
scripts/graphicslib.py
nash169/graphics-lib
a71dd2e27ac64ccccd8f55f1dd87863404789959
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 # # This file is part of graphics-lib. # # Copyright (c) 2020, 2021, 2022 Bernardo Fichera <bernardo.fichera@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Softwar...
34.831325
89
0.682463
#!/usr/bin/env python # encoding: utf-8 # # This file is part of graphics-lib. # # Copyright (c) 2020, 2021, 2022 Bernardo Fichera <bernardo.fichera@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Softwar...
0
1,132
0
0
0
341
0
33
114
52aab517e0bb1695d7a351f3c996f23cfccf95ac
4,387
py
Python
stonesoup/models/measurement/tests/test_combined.py
Red-Portal/Stone-Soup-1
267621c86161a839da9b144c2745d28d9166d903
[ "MIT" ]
157
2019-04-14T20:43:11.000Z
2022-03-30T08:30:33.000Z
stonesoup/models/measurement/tests/test_combined.py
Red-Portal/Stone-Soup-1
267621c86161a839da9b144c2745d28d9166d903
[ "MIT" ]
364
2019-04-18T15:54:49.000Z
2022-03-31T09:50:02.000Z
stonesoup/models/measurement/tests/test_combined.py
Red-Portal/Stone-Soup-1
267621c86161a839da9b144c2745d28d9166d903
[ "MIT" ]
86
2019-04-20T02:01:18.000Z
2022-03-28T01:03:11.000Z
# coding: utf-8
35.379032
90
0.63483
# coding: utf-8 import pytest from pytest import approx import numpy as np from ....types.angle import Bearing from ....types.array import StateVector, CovarianceMatrix from ....types.detection import Detection from ....types.state import State from ..linear import LinearGaussian from ..nonlinear import ( Combined...
0
210
0
0
0
3,556
0
166
429
3a91273c8d7483c5d7b396705caa5c2cf20b08b5
824
py
Python
ms_flask_app/app.py
royxss/Project_Risk_Assessment_Deploy
931dc91caca120aa86eddfaf0c8fba49867c64fc
[ "Apache-2.0" ]
null
null
null
ms_flask_app/app.py
royxss/Project_Risk_Assessment_Deploy
931dc91caca120aa86eddfaf0c8fba49867c64fc
[ "Apache-2.0" ]
null
null
null
ms_flask_app/app.py
royxss/Project_Risk_Assessment_Deploy
931dc91caca120aa86eddfaf0c8fba49867c64fc
[ "Apache-2.0" ]
null
null
null
from flask import Flask import pickle pickledModel = pickle.load(open('../app/public/latePaymentsModel.pkl','rb')) app = Flask(__name__) if __name__ == '__main__': app.run(debug=True)
26.580645
96
0.743932
from flask import Flask,render_template,url_for,request import pandas as pd import pickle import traceback import ast import sklearn import xgboost pickledModel = pickle.load(open('../app/public/latePaymentsModel.pkl','rb')) app = Flask(__name__) @app.route('/') def index(): return render_template("index.html") @app...
0
481
0
0
0
0
0
0
156
7a641e5f90766451959de7a519933e97339c5c6a
6,814
py
Python
app.py
snarfed/ownyourresponses
52e2db2d1b7cae9bb2f9e0d320411627ea195f81
[ "CC0-1.0" ]
33
2015-02-12T22:19:23.000Z
2022-01-19T11:02:43.000Z
app.py
snarfed/ownyourresponses
52e2db2d1b7cae9bb2f9e0d320411627ea195f81
[ "CC0-1.0" ]
1
2015-10-07T05:53:57.000Z
2016-02-16T15:21:04.000Z
app.py
snarfed/ownyourresponses
52e2db2d1b7cae9bb2f9e0d320411627ea195f81
[ "CC0-1.0" ]
1
2015-10-04T17:32:59.000Z
2015-10-04T17:32:59.000Z
"""OwnYourResponses: turns likes, replies, etc. into posts on your web site. Polls your social network activity and creates new posts on your web site (via Micropub) for public Facebook comments and likes, Instagram likes, and Twitter @-replies, retweets, and favorites. """ import urllib.error, urllib.parse from flas...
34.588832
87
0.695627
"""OwnYourResponses: turns likes, replies, etc. into posts on your web site. Polls your social network activity and creates new posts on your web site (via Micropub) for public Facebook comments and likes, Instagram likes, and Twitter @-replies, retweets, and favorites. """ import logging import json import urllib.err...
0
3,003
0
355
0
1,030
0
103
180
dbc24dbe997b9424f4f5edfed6b8616411c81386
7,267
py
Python
ImageNet/train.py
mbodenham/Pytorch-XNOR-Net
aad9b68a522026a4a7ebbdf1b9ea82230e2edf24
[ "BSD-3-Clause" ]
null
null
null
ImageNet/train.py
mbodenham/Pytorch-XNOR-Net
aad9b68a522026a4a7ebbdf1b9ea82230e2edf24
[ "BSD-3-Clause" ]
null
null
null
ImageNet/train.py
mbodenham/Pytorch-XNOR-Net
aad9b68a522026a4a7ebbdf1b9ea82230e2edf24
[ "BSD-3-Clause" ]
null
null
null
## ssh -L 16006:127.0.0.1:16006 mb2775@ogg.cs.bath.ac.uk import torch from models import XNOR_VGG import torchvision from torchvision import transforms import argparse import binop import torch.utils.tensorboard as tensorboard import os from datetime import datetime import time def accuracy(output, target, topk=(1,))...
36.335
122
0.638916
## ssh -L 16006:127.0.0.1:16006 mb2775@ogg.cs.bath.ac.uk import torch from models import XNOR_VGG import torchvision from torchvision import transforms import argparse import binop import torch.utils.tensorboard as tensorboard import os from datetime import datetime import time def accuracy(output, target, topk=(1,))...
0
0
0
368
0
1,614
0
0
46
441f712583f6078e0ab5cdb4e58a31c9252a5c74
12,506
py
Python
matsubara/heom.py
pyquantum/matsubara
c8f540a54fe3eadd2ceb8158b69d650f9cc93133
[ "MIT" ]
3
2020-04-02T09:28:44.000Z
2021-01-28T12:19:29.000Z
matsubara/heom.py
Ydeh22/matsubara
c8f540a54fe3eadd2ceb8158b69d650f9cc93133
[ "MIT" ]
2
2019-07-04T10:09:14.000Z
2019-07-12T15:04:02.000Z
matsubara/heom.py
Ydeh22/matsubara
c8f540a54fe3eadd2ceb8158b69d650f9cc93133
[ "MIT" ]
3
2019-04-02T07:59:54.000Z
2022-03-23T23:49:27.000Z
""" This module provides a solver for the spin-boson model at zero temperature using the hierarchy equations of motion (HEOM) method. """ # Authors: Shahnawaz Ahmed, Neill Lambert # Contact: shahnawaz.ahmed95@gmail.com import numpy as np from qutip import Qobj from qutip.superoperator import liouvillian from qutip i...
29.705463
88
0.574124
""" This module provides a solver for the spin-boson model at zero temperature using the hierarchy equations of motion (HEOM) method. """ # Authors: Shahnawaz Ahmed, Neill Lambert # Contact: shahnawaz.ahmed95@gmail.com import numpy as np from copy import copy from qutip import Qobj, qeye from qutip.states import en...
0
0
0
7,299
1,439
0
0
138
179
23d4b9e441abbd42ced42cd4096380d4ab596e69
3,225
py
Python
tools/pycozmo_replay.py
gimait/pycozmo
601d9c09903b9300e8990723cae95974212afb09
[ "MIT" ]
123
2019-08-25T21:28:23.000Z
2022-03-12T13:54:59.000Z
tools/pycozmo_replay.py
solosito/pycozmo
5d28118eb8f7a625ae4a66054dabf19b4fe27483
[ "MIT" ]
41
2019-08-25T21:21:37.000Z
2022-02-09T14:20:54.000Z
tools/pycozmo_replay.py
solosito/pycozmo
5d28118eb8f7a625ae4a66054dabf19b4fe27483
[ "MIT" ]
51
2019-09-04T13:30:02.000Z
2022-01-09T01:20:24.000Z
#!/usr/bin/env python if __name__ == '__main__': main()
32.908163
100
0.537364
#!/usr/bin/env python from typing import Optional import sys import time import dpkt import pycozmo class ReplayApp(object): def __init__(self, log_messages: Optional[list] = None, replay_messages: Optional[list] = None): self.log_messages = log_messages self.frame_count = 0 self.pkts ...
0
0
0
2,811
0
223
0
-32
159
4724c3f8a6a2a060f1395a3f8e0e389b1091ba8a
7,944
py
Python
opfython/core/opf.py
gugarosa/opfython
19b467a92d85c7c26d231efec770645096827b4e
[ "Apache-2.0" ]
26
2018-04-24T20:16:18.000Z
2022-03-09T14:03:28.000Z
opfython/core/opf.py
gugarosa/opfython
19b467a92d85c7c26d231efec770645096827b4e
[ "Apache-2.0" ]
4
2020-12-26T14:57:18.000Z
2022-03-30T02:34:18.000Z
opfython/core/opf.py
gugarosa/opfython
19b467a92d85c7c26d231efec770645096827b4e
[ "Apache-2.0" ]
16
2019-05-20T15:41:56.000Z
2022-03-23T17:59:53.000Z
"""Optimum-Path Forest standard definitions. """ import opfython.stream.loader as loader import opfython.utils.logging as l logger = l.get_logger(__name__)
32.292683
124
0.601586
"""Optimum-Path Forest standard definitions. """ import pickle import numpy as np import opfython.math.distance as d import opfython.stream.loader as loader import opfython.utils.exception as e import opfython.utils.logging as l from opfython.core import Subgraph logger = l.get_logger(__name__) class OPF: """...
2
3,530
0
4,089
0
0
0
30
136
8f421a457cb054f46d0d551c64aeebdaf5a52b6e
2,093
py
Python
record_shortcuts.py
elyssac02/grass-gis-on-hpc-henry2
68262c3687f967760b1c8cee0fff1a29e45a7698
[ "CC0-1.0" ]
1
2021-09-30T14:50:00.000Z
2021-09-30T14:50:00.000Z
record_shortcuts.py
elyssac02/grass-gis-on-hpc-henry2
68262c3687f967760b1c8cee0fff1a29e45a7698
[ "CC0-1.0" ]
54
2020-05-12T01:58:04.000Z
2022-03-11T15:39:49.000Z
record_shortcuts.py
elyssac02/grass-gis-on-hpc-henry2
68262c3687f967760b1c8cee0fff1a29e45a7698
[ "CC0-1.0" ]
3
2020-07-14T20:43:13.000Z
2021-09-23T14:45:05.000Z
#!/usr/bin/env python """Record default module version and symlinks as shortcuts""" import os import re import sys from datetime import datetime from pathlib import Path def read_and_record_shortcuts(path, filename): """Read content of the directory, check validity, record to YAML file""" path = Path(path) ...
32.703125
88
0.580029
#!/usr/bin/env python """Record default module version and symlinks as shortcuts""" import os import re import sys from datetime import datetime from pathlib import Path def read_and_record_shortcuts(path, filename): """Read content of the directory, check validity, record to YAML file""" path = Path(path) ...
0
0
0
0
0
0
0
0
0
2e1292230597d1078b8609ca622f2f6e67696ad3
2,494
py
Python
carver/ole/ole/ole.py
maydewd/stoq-plugins-public
8b2877b5091ae731437ef35a95d4debdbf0a19f3
[ "Apache-2.0" ]
null
null
null
carver/ole/ole/ole.py
maydewd/stoq-plugins-public
8b2877b5091ae731437ef35a95d4debdbf0a19f3
[ "Apache-2.0" ]
null
null
null
carver/ole/ole/ole.py
maydewd/stoq-plugins-public
8b2877b5091ae731437ef35a95d4debdbf0a19f3
[ "Apache-2.0" ]
null
null
null
# Copyright 2014-2015 PUNCH Cyber Analytics Group # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
29.341176
94
0.54571
# Copyright 2014-2015 PUNCH Cyber Analytics Group # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
0
0
0
1,690
0
0
0
14
92
54ddfcbec622cddc0ff5caa8d2af77d5e8895d40
2,017
py
Python
main.py
ArtDevRodrigues/game-basePython
e150e592a03c5b37aa20c1fdbb047e11aec2f56d
[ "MIT" ]
null
null
null
main.py
ArtDevRodrigues/game-basePython
e150e592a03c5b37aa20c1fdbb047e11aec2f56d
[ "MIT" ]
null
null
null
main.py
ArtDevRodrigues/game-basePython
e150e592a03c5b37aa20c1fdbb047e11aec2f56d
[ "MIT" ]
null
null
null
# elementos e seus ids # 1-fogo # 2-agua # 3-terra # 4-ar p1 = Player("P1","Guerreiro","Masculino","Indiano") ws1 = [ #Weapon(id ,element ,price ,rarity ,strength ,speed), Weapon( 1 ,randint(1,4),randint(10,200),randint(1,5),randint(10,100),randint(2,10),"espada"), Weapon( 2 ,randint...
37.351852
142
0.646009
from game import * from random import * # elementos e seus ids # 1-fogo # 2-agua # 3-terra # 4-ar p1 = Player("P1","Guerreiro","Masculino","Indiano") ws1 = [ #Weapon(id ,element ,price ,rarity ,strength ,speed), Weapon( 1 ,randint(1,4),randint(10,200),randint(1,5),randint(10,100),randint...
0
0
0
0
0
0
0
-4
44
fc1262d2e00618c8f06ef4ca02d3e3ab4748a18c
4,997
py
Python
Lib/site-packages/tensorboard/plugins/scalar/scalars_plugin.py
caiyongji/tf2.3.1-py3.7.9-full-built
ace4efcbf05b2b494388739718a18c13eab83c71
[ "CNRI-Python-GPL-Compatible" ]
4
2020-09-02T16:13:51.000Z
2021-06-05T08:45:59.000Z
Lib/site-packages/tensorboard/plugins/scalar/scalars_plugin.py
caiyongji/tf2.3.1-py3.7.9-full-built
ace4efcbf05b2b494388739718a18c13eab83c71
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
Lib/site-packages/tensorboard/plugins/scalar/scalars_plugin.py
caiyongji/tf2.3.1-py3.7.9-full-built
ace4efcbf05b2b494388739718a18c13eab83c71
[ "CNRI-Python-GPL-Compatible" ]
1
2020-09-17T13:16:30.000Z
2020-09-17T13:16:30.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
35.439716
80
0.64959
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
0
816
0
2,752
0
0
0
109
335
8788365c9cd1db6b69140f3e164a309b5cbc16ec
929
py
Python
backend/surveybackend/djangobasic/urls.py
huarngpa/huarngpa_norc_challenge
58dc0d47b9149a8081f6ba81facb27bf5aefe8bb
[ "MIT" ]
null
null
null
backend/surveybackend/djangobasic/urls.py
huarngpa/huarngpa_norc_challenge
58dc0d47b9149a8081f6ba81facb27bf5aefe8bb
[ "MIT" ]
7
2020-02-11T23:07:58.000Z
2022-02-10T16:34:54.000Z
backend/surveybackend/djangobasic/urls.py
huarngpa/huarngpa_norc_challenge
58dc0d47b9149a8081f6ba81facb27bf5aefe8bb
[ "MIT" ]
null
null
null
from django.conf.urls import url, include from django.contrib.auth.decorators import login_required from django.urls import path from . import views from rest_framework.routers import DefaultRouter app_name = 'djangobasic' # Create a router and register our viewsets with it. router = DefaultRouter() router.regist...
29.967742
91
0.748116
from django.conf.urls import url, include from django.contrib.auth.decorators import login_required from django.urls import path from . import views from rest_framework.routers import DefaultRouter app_name = 'djangobasic' # Create a router and register our viewsets with it. router = DefaultRouter() router.regist...
0
0
0
0
0
0
0
0
0