hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
248
max_forks_repo_name
stringlengths
5
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
c0d3bab4c52e7bb6548865457b438ad24de1affe
6,152
py
Python
hatfieldcmr/ingest/name.py
bcgov/nr_rfc_processing
7e414b97a29ed5bae8ba3c6decea39733be9a2db
[ "Apache-2.0" ]
null
null
null
hatfieldcmr/ingest/name.py
bcgov/nr_rfc_processing
7e414b97a29ed5bae8ba3c6decea39733be9a2db
[ "Apache-2.0" ]
6
2021-02-08T16:47:02.000Z
2022-01-30T21:58:18.000Z
hatfieldcmr/ingest/name.py
bcgov/rfc_processing
7e414b97a29ed5bae8ba3c6decea39733be9a2db
[ "Apache-2.0" ]
2
2021-02-22T19:13:26.000Z
2021-05-03T23:58:56.000Z
""" Contains data ingest related functions """ import re import os.path from dateutil.parser import parse as dateparser import typing from typing import Dict import cmr from hatfieldcmr.ingest.file_type import MODISBlobType MODIS_NAME = "modis-terra" TITLE_PATTERN_STRING = r"\w+:([\w]+\.[\w]+):\w+" TITLE_PATTERN = r...
34.561798
95
0.658973
4,140
0.672952
0
0
3,727
0.605819
0
0
946
0.153771
c0d3c4a39dc9908b549fa2b113fe0a1b00c9a7a2
9,520
py
Python
twittersmash/management/commands/smash_stuff.py
mrkurt/twittersmash
095af27fafa6f2074e0ce82596196c2141d0b7de
[ "MIT" ]
1
2016-05-09T11:29:35.000Z
2016-05-09T11:29:35.000Z
twittersmash/management/commands/smash_stuff.py
mrkurt/twittersmash
095af27fafa6f2074e0ce82596196c2141d0b7de
[ "MIT" ]
null
null
null
twittersmash/management/commands/smash_stuff.py
mrkurt/twittersmash
095af27fafa6f2074e0ce82596196c2141d0b7de
[ "MIT" ]
null
null
null
import twitter import datetime import feedparser import re import string from django.core.management.base import BaseCommand from optparse import make_option from twittersmash.models import Feed, TwitterAccount, Message import pytz from pytz import timezone central = timezone('US/Central') utc = pytz.utc # Parses th...
42.5
101
0.463866
9,018
0.947269
0
0
0
0
0
0
1,954
0.205252
c0d42b9fa731f071b00e48d88b5dd1b3baf8c28b
8,661
py
Python
tests/test_lib.py
bluefloyd00/snowflet
a1676158bffc5f44970845b054d1ad221e9540c7
[ "MIT" ]
1
2020-06-23T14:14:48.000Z
2020-06-23T14:14:48.000Z
tests/test_lib.py
bluefloyd00/snowflet
a1676158bffc5f44970845b054d1ad221e9540c7
[ "MIT" ]
2
2020-06-19T15:05:05.000Z
2020-06-19T15:07:22.000Z
tests/test_lib.py
bluefloyd00/snowflet
a1676158bffc5f44970845b054d1ad221e9540c7
[ "MIT" ]
null
null
null
import os import unittest from snowflet.lib import read_sql from snowflet.lib import logging_config from snowflet.lib import extract_args from snowflet.lib import apply_kwargs from snowflet.lib import strip_table from snowflet.lib import extract_tables_from_query from snowflet.lib import add_database_id_prefix from sno...
37.012821
225
0.419467
8,177
0.944117
0
0
0
0
0
0
3,291
0.379979
c0d5ca80bb24462f1f4a71c0cb35cf7b23654b5a
3,207
py
Python
etl/parsers/etw/Microsoft_Windows_AssignedAccess.py
IMULMUL/etl-parser
76b7c046866ce0469cd129ee3f7bb3799b34e271
[ "Apache-2.0" ]
104
2020-03-04T14:31:31.000Z
2022-03-28T02:59:36.000Z
etl/parsers/etw/Microsoft_Windows_AssignedAccess.py
IMULMUL/etl-parser
76b7c046866ce0469cd129ee3f7bb3799b34e271
[ "Apache-2.0" ]
7
2020-04-20T09:18:39.000Z
2022-03-19T17:06:19.000Z
etl/parsers/etw/Microsoft_Windows_AssignedAccess.py
IMULMUL/etl-parser
76b7c046866ce0469cd129ee3f7bb3799b34e271
[ "Apache-2.0" ]
16
2020-03-05T18:55:59.000Z
2022-03-01T10:19:28.000Z
# -*- coding: utf-8 -*- """ Microsoft-Windows-AssignedAccess GUID : 8530db6e-51c0-43d6-9d02-a8c2088526cd """ from construct import Int8sl, Int8ul, Int16ul, Int16sl, Int32sl, Int32ul, Int64sl, Int64ul, Bytes, Double, Float32l, Struct from etl.utils import WString, CString, SystemTime, Guid from etl.dtyp import Sid from ...
28.891892
123
0.707827
1,669
0.520424
0
0
2,800
0.87309
0
0
803
0.25039
c0d5daf30a2f4bfa690f7a0a63f28bb7cf1048fc
249
py
Python
smarcambuddy/take_a_photo.py
senaranya/SmartCamBuddy
e60632a7661f4fdcfa994e6424f598538f6b7be6
[ "MIT" ]
null
null
null
smarcambuddy/take_a_photo.py
senaranya/SmartCamBuddy
e60632a7661f4fdcfa994e6424f598538f6b7be6
[ "MIT" ]
null
null
null
smarcambuddy/take_a_photo.py
senaranya/SmartCamBuddy
e60632a7661f4fdcfa994e6424f598538f6b7be6
[ "MIT" ]
null
null
null
from capture_image import CaptureImage if __name__ == '__main__': """ This can be directly used from CLI e.g.: source /home/pi/.smartcambuddy_venv/bin/activate python smarcambuddy/take_a_photo.py """ CaptureImage.trigger()
24.9
58
0.702811
0
0
0
0
0
0
0
0
160
0.64257
c0d6aa4598374762a450e52b8af29f49f301387d
105
py
Python
oyster/celeryconfig.py
jamesturk/oyster
c6e93fdd48ed1ead1ea5b163c6ba9cf227f831ae
[ "BSD-3-Clause" ]
1
2020-09-03T08:10:43.000Z
2020-09-03T08:10:43.000Z
oyster/celeryconfig.py
jamesturk/oyster
c6e93fdd48ed1ead1ea5b163c6ba9cf227f831ae
[ "BSD-3-Clause" ]
null
null
null
oyster/celeryconfig.py
jamesturk/oyster
c6e93fdd48ed1ead1ea5b163c6ba9cf227f831ae
[ "BSD-3-Clause" ]
null
null
null
from oyster.conf import settings CELERY_IMPORTS = ['oyster.tasks'] + list(settings.CELERY_TASK_MODULES)
26.25
70
0.8
0
0
0
0
0
0
0
0
14
0.133333
c0d718d76a48ce7c669cb050436654bea3cdd296
2,891
py
Python
annotation/black_action/fu.py
windfall-shogi/feature-annotation
83ff7c3fa31e542221cf45186b2ea3ef2a10310f
[ "MIT" ]
null
null
null
annotation/black_action/fu.py
windfall-shogi/feature-annotation
83ff7c3fa31e542221cf45186b2ea3ef2a10310f
[ "MIT" ]
null
null
null
annotation/black_action/fu.py
windfall-shogi/feature-annotation
83ff7c3fa31e542221cf45186b2ea3ef2a10310f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import sonnet as snt import tensorflow as tf from .drop_mask import make_drop_mask1 from .promotion_mask import make_promotion_mask from ..boolean_board.black import select_black_fu_board, select_non_black_board from ..boolean_board.empty import select_empty_board from .....
31.769231
79
0.648219
2,531
0.854779
0
0
0
0
0
0
234
0.079027
c0d827e88a1ab4916995d9e81ac4218d54ad748c
631
py
Python
tests/bdd/test_fixures.py
othercodes/connect-devops-testing-library
700f1a86f92c3b7f91a3882bf29ed62d98fe9dcd
[ "Apache-2.0" ]
3
2021-11-19T08:10:17.000Z
2022-01-05T15:37:28.000Z
tests/bdd/test_fixures.py
othercodes/connect-devops-testing-library
700f1a86f92c3b7f91a3882bf29ed62d98fe9dcd
[ "Apache-2.0" ]
1
2021-12-09T16:33:15.000Z
2021-12-09T16:33:15.000Z
tests/bdd/test_fixures.py
othercodes/connect-devops-testing-library
700f1a86f92c3b7f91a3882bf29ed62d98fe9dcd
[ "Apache-2.0" ]
2
2021-11-08T08:39:11.000Z
2021-11-08T08:40:23.000Z
from connect.devops_testing.bdd.fixtures import use_connect_request_dispatcher, use_connect_request_builder from connect.devops_testing.request import Builder, Dispatcher def test_should_successfully_initialize_request_builder_in_behave_context(behave_context): use_connect_request_builder(behave_context) ass...
39.4375
107
0.865293
0
0
0
0
0
0
0
0
0
0
c0d85d28668ecd7ceba3957da1e2fcc7a48d395d
83
py
Python
kwueBackend/kwue/apps.py
bounswe/bounswe2016group4
cbc8201aa86049b81f20ef44ee37eb065a469d46
[ "Apache-2.0" ]
6
2016-02-14T18:04:48.000Z
2016-12-18T20:09:15.000Z
kwueBackend/kwue/apps.py
bounswe/bounswe2016group4
cbc8201aa86049b81f20ef44ee37eb065a469d46
[ "Apache-2.0" ]
113
2016-02-14T18:06:57.000Z
2021-06-10T17:57:12.000Z
kwueBackend/kwue/apps.py
bounswe/bounswe2016group4
cbc8201aa86049b81f20ef44ee37eb065a469d46
[ "Apache-2.0" ]
1
2017-02-15T18:48:55.000Z
2017-02-15T18:48:55.000Z
from django.apps import AppConfig class KwueConfig(AppConfig): name = 'kwue'
13.833333
33
0.73494
46
0.554217
0
0
0
0
0
0
6
0.072289
c0dc3d97cf9bff141a470ed5055719904a5f9f4c
2,492
py
Python
src/commands/refactor/convert_to_arrow_function.py
PranjalPansuriya/JavaScriptEnhancements
14af4162e86585153cbd4614ad96dff64a0d3192
[ "MIT" ]
690
2017-04-11T06:45:01.000Z
2022-03-21T23:20:29.000Z
src/commands/refactor/convert_to_arrow_function.py
PranjalPansuriya/JavaScriptEnhancements
14af4162e86585153cbd4614ad96dff64a0d3192
[ "MIT" ]
74
2017-11-22T18:05:26.000Z
2021-05-05T16:25:31.000Z
src/commands/refactor/convert_to_arrow_function.py
PranjalPansuriya/JavaScriptEnhancements
14af4162e86585153cbd4614ad96dff64a0d3192
[ "MIT" ]
42
2017-04-13T10:22:40.000Z
2021-05-27T19:19:04.000Z
import sublime, sublime_plugin import os, traceback from ...libs import util from ...libs import FlowCLI class JavascriptEnhancementsRefactorConvertToArrowFunctionCommand(sublime_plugin.TextCommand): def run(self, edit, **args): view = self.view selection = view.sel()[0] flow_cli = FlowCLI(view) res...
31.544304
111
0.634831
2,386
0.957464
0
0
0
0
0
0
263
0.105538
c0dde640a5c1e4f5414f4bf02dfa8a2f03ee959e
33,374
py
Python
apps/xdmac/xdmac_memory_transfer/firmware/at91bootstrap_sam_a5d2_xult.X/scripts/mpconfig/mpconfig.py
Techdisc/Microchip
ea8391c689c4badbe2f9ac5181e21bbd5d9d1e54
[ "0BSD" ]
82
2015-02-05T10:29:59.000Z
2022-03-09T22:13:56.000Z
apps/xdmac/xdmac_memory_transfer/firmware/at91bootstrap_sam_a5d2_xult.X/scripts/mpconfig/mpconfig.py
Techdisc/Microchip
ea8391c689c4badbe2f9ac5181e21bbd5d9d1e54
[ "0BSD" ]
128
2015-01-05T00:56:17.000Z
2022-03-03T19:06:11.000Z
apps/xdmac/xdmac_memory_transfer/firmware/at91bootstrap_sam_a5d2_xult.X/scripts/mpconfig/mpconfig.py
Techdisc/Microchip
ea8391c689c4badbe2f9ac5181e21bbd5d9d1e54
[ "0BSD" ]
219
2015-01-01T11:27:14.000Z
2022-03-25T08:33:54.000Z
import os import sys import base64 import fnmatch from kconfiglib import Kconfig, expr_value, Symbol, Choice, MENU, COMMENT, BOOL, STRING, INT, HEX from java.awt import BorderLayout, Dimension, FlowLayout from java.awt.event import ActionListener, MouseEvent from javax.swing import BorderFactory, BoxLayout, ImageIcon, ...
39.921053
442
0.651825
28,437
0.85207
0
0
251
0.007521
0
0
9,687
0.290256
c0df3129d8955fe3aa993705e4ac485becb1c9ed
3,495
py
Python
functional_test/test_sqlite.py
penguinolog/sqlalchemy_jsonfield
552bc52af2f2e9c4ebe85928070e2b1b42d9a5d8
[ "Apache-2.0" ]
17
2017-05-19T14:03:15.000Z
2022-01-16T08:33:34.000Z
functional_test/test_sqlite.py
penguinolog/sqlalchemy_jsonfield
552bc52af2f2e9c4ebe85928070e2b1b42d9a5d8
[ "Apache-2.0" ]
5
2018-08-01T09:55:48.000Z
2020-07-06T08:54:00.000Z
functional_test/test_sqlite.py
penguinolog/sqlalchemy_jsonfield
552bc52af2f2e9c4ebe85928070e2b1b42d9a5d8
[ "Apache-2.0" ]
2
2018-08-01T09:47:40.000Z
2020-07-05T15:31:17.000Z
# coding=utf-8 # pylint: disable=missing-docstring, unused-argument import os.path import sqlite3 import tempfile import unittest import sqlalchemy.ext.declarative import sqlalchemy.orm try: # noinspection PyPackageRequirements import ujson as json except ImportError: import json import sqlalchemy_jsonf...
30.391304
118
0.631187
2,957
0.846066
0
0
0
0
0
0
808
0.231187
c0e271f6251b995e55557dc615aa3e3800aa1106
587
py
Python
demos/cyk_test.py
wannaphong/pycfg
ffa67958ed1c3deb73cadb3969ac086336fb1269
[ "MIT" ]
8
2017-12-18T08:51:27.000Z
2020-11-26T02:21:06.000Z
demos/cyk_test.py
wannaphong/pycfg
ffa67958ed1c3deb73cadb3969ac086336fb1269
[ "MIT" ]
1
2020-01-09T15:41:09.000Z
2020-01-09T15:41:09.000Z
demos/cyk_test.py
wannaphong/pycfg
ffa67958ed1c3deb73cadb3969ac086336fb1269
[ "MIT" ]
6
2017-06-12T16:58:40.000Z
2019-11-27T06:55:07.000Z
'''Run Example 4.8 from Aho & Ullman p. 315-316, printing the steps to stdout. ''' from cfg import aho_ullman, core import sys CFG = core.ContextFreeGrammar G = CFG(''' S -> AA | AS | b A -> SA | AS | a ''') w = map(core.Terminal, 'abaab') print 'G:' print G print print 'w =', ''.join(map(str, w)) print T = aho_u...
18.935484
80
0.691652
0
0
0
0
0
0
0
0
158
0.269165
c0e326802c17cadedbdcc95d716b27c009b7245b
495
py
Python
generic_op/pool_op.py
cap-lab/MidapSim
4f92a9f9413c29d7e1f37e863cce90ebdde8b420
[ "MIT" ]
2
2021-03-28T16:19:06.000Z
2022-02-26T08:58:33.000Z
generic_op/pool_op.py
cap-lab/MidapSim
4f92a9f9413c29d7e1f37e863cce90ebdde8b420
[ "MIT" ]
null
null
null
generic_op/pool_op.py
cap-lab/MidapSim
4f92a9f9413c29d7e1f37e863cce90ebdde8b420
[ "MIT" ]
1
2021-02-22T08:44:20.000Z
2021-02-22T08:44:20.000Z
from .convpool_op_base import ConvPoolOpBase class PoolOp(ConvPoolOpBase): def __init__( self, op_type='Pool', pool_type=None, global_pooling=False, **kwargs ): super(PoolOp, self).__init__(op_type=op_type, **kwargs) self.global_pooli...
26.052632
63
0.60202
447
0.90303
0
0
0
0
0
0
6
0.012121
c0e6f4156c765d61d6562b34e46e4af7e1c03fe7
1,958
py
Python
cegs_portal/search/json_templates/v1/tests/test_search_results.py
ReddyLab/cegs-portal
a83703a3557167be328c24bfb866b6aa019ba059
[ "MIT" ]
null
null
null
cegs_portal/search/json_templates/v1/tests/test_search_results.py
ReddyLab/cegs-portal
a83703a3557167be328c24bfb866b6aa019ba059
[ "MIT" ]
null
null
null
cegs_portal/search/json_templates/v1/tests/test_search_results.py
ReddyLab/cegs-portal
a83703a3557167be328c24bfb866b6aa019ba059
[ "MIT" ]
null
null
null
import pytest from django.db.models import Manager from cegs_portal.search.json_templates.v1.dna_region import dnaregions from cegs_portal.search.json_templates.v1.search_results import ( search_results as sr_json, ) from cegs_portal.search.models import DNARegion, Facet from cegs_portal.search.models.utils import...
38.392157
111
0.62666
0
0
0
0
0
0
0
0
462
0.235955
c0ebac4ab996b305d4af158e61ede7d45f0985a2
5,002
py
Python
models/special_tensors.py
LaudateCorpus1/learning-compressible-subspaces
94db8191f5f4d32c1e86834284fcf9f89e4d445b
[ "AML" ]
6
2021-11-02T23:10:05.000Z
2021-11-26T06:46:21.000Z
models/special_tensors.py
LaudateCorpus1/learning-compressible-subspaces
94db8191f5f4d32c1e86834284fcf9f89e4d445b
[ "AML" ]
null
null
null
models/special_tensors.py
LaudateCorpus1/learning-compressible-subspaces
94db8191f5f4d32c1e86834284fcf9f89e4d445b
[ "AML" ]
2
2021-12-02T00:06:41.000Z
2022-03-26T11:33:04.000Z
# # For licensing see accompanying LICENSE file. # Copyright (C) 2021 Apple Inc. All Rights Reserved. # """Utility functions to tag tensors with metadata. The metadata remains with the tensor under torch operations that don't change the values, e.g. .clone(), .contiguous(), .permute(), etc. """ import collections imp...
31.859873
80
0.658137
2,507
0.5012
0
0
173
0.034586
0
0
2,072
0.414234
c0f028af70b526fd95e136fc02b10d25bfdd263a
2,705
py
Python
porodynhe_example2d.py
sfepy/example_largedef_porodyn
4116abc7daed195eee15277b2bd564cec3762ac6
[ "MIT" ]
null
null
null
porodynhe_example2d.py
sfepy/example_largedef_porodyn
4116abc7daed195eee15277b2bd564cec3762ac6
[ "MIT" ]
null
null
null
porodynhe_example2d.py
sfepy/example_largedef_porodyn
4116abc7daed195eee15277b2bd564cec3762ac6
[ "MIT" ]
null
null
null
# Rohan E., Lukeš V. # Modeling large-deforming fluid-saturated porous media using # an Eulerian incremental formulation. # Advances in Engineering Software, 113:84-95, 2017, # https://doi.org/10.1016/j.advengsoft.2016.11.003 # # Run simulation: # # ./simple.py example_largedef_porodyn-1/porodynhe_example2d.py # # Th...
31.823529
76
0.528651
0
0
0
0
0
0
0
0
1,460
0.539542
c0f0b3100db352f07b237c204da41ba3ca9a0b70
260
py
Python
mailcheck/__init__.py
shacker/django-mailcheck
878dd21dcd599bd3761e225ba0c2717af458c000
[ "BSD-3-Clause" ]
1
2019-05-24T12:40:49.000Z
2019-05-24T12:40:49.000Z
mailcheck/__init__.py
shacker/django-mailcheck
878dd21dcd599bd3761e225ba0c2717af458c000
[ "BSD-3-Clause" ]
null
null
null
mailcheck/__init__.py
shacker/django-mailcheck
878dd21dcd599bd3761e225ba0c2717af458c000
[ "BSD-3-Clause" ]
null
null
null
""" Pluggable Django email backend for capturing outbound mail for QA/review purposes. """ __version__ = "1.0" __author__ = "Scot Hacker" __email__ = "shacker@birdhouse.org" __url__ = "https://github.com/shacker/django-mailcheck" __license__ = "BSD License"
23.636364
82
0.75
0
0
0
0
0
0
0
0
189
0.726923
c0f1710109fd0bcc8c80d8dbd1890e68264eb994
4,923
py
Python
nistapttools/histogram_functions.py
bcaplins/NIST_APT_TOOLS
80c25498e8b069b8ee289a2d09c76c932c054cea
[ "Unlicense" ]
null
null
null
nistapttools/histogram_functions.py
bcaplins/NIST_APT_TOOLS
80c25498e8b069b8ee289a2d09c76c932c054cea
[ "Unlicense" ]
null
null
null
nistapttools/histogram_functions.py
bcaplins/NIST_APT_TOOLS
80c25498e8b069b8ee289a2d09c76c932c054cea
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Aug 28 13:41:03 2019 @author: bwc """ import numpy as np def bin_dat(dat,bin_width=0.001,user_roi=[],isBinAligned=False,isDensity=False): user_roi = np.asarray(user_roi) roi_supp = (user_roi.size == 2) # Get roi if isBinAligned and roi_supp: low...
24.615
110
0.549868
0
0
0
0
0
0
0
0
850
0.172659
c0f3c763fc8fb9b275792346291c6e8ea034e967
1,138
py
Python
bage_utils/inspect_util.py
bage79/nlp4kor
016a20270774325579fc816a0364fb1695e60b51
[ "MIT" ]
60
2017-04-26T04:43:45.000Z
2021-11-08T13:01:11.000Z
bage_utils/inspect_util.py
bage79/nlp4kor
016a20270774325579fc816a0364fb1695e60b51
[ "MIT" ]
null
null
null
bage_utils/inspect_util.py
bage79/nlp4kor
016a20270774325579fc816a0364fb1695e60b51
[ "MIT" ]
17
2017-05-21T17:27:20.000Z
2021-01-16T22:35:44.000Z
import inspect # http://docs.python.org/2/library/inspect.html from pprint import pprint from bage_utils.dict_util import DictUtil # @UnusedImport class InspectUtil(object): @staticmethod def summary(): frame = inspect.stack()[1] d = {'file': frame[1], 'line': frame[2], 'function': frame[3]...
24.212766
88
0.579086
824
0.724077
0
0
775
0.681019
0
0
110
0.096661
c0f597adef0dae65ff023459c242c4d6daf5a5e9
2,812
py
Python
kod/zeropython/zerocon/seriesdefinition.py
piotrmaslanka/zero
4a4e8341b06032b7ade6d7a56d9ae33dd1a5f47d
[ "BSD-3-Clause" ]
null
null
null
kod/zeropython/zerocon/seriesdefinition.py
piotrmaslanka/zero
4a4e8341b06032b7ade6d7a56d9ae33dd1a5f47d
[ "BSD-3-Clause" ]
null
null
null
kod/zeropython/zerocon/seriesdefinition.py
piotrmaslanka/zero
4a4e8341b06032b7ade6d7a56d9ae33dd1a5f47d
[ "BSD-3-Clause" ]
null
null
null
import struct class SeriesDefinition(object): def __init__(self, seriesname, replicacount, generation, autotrim, recordsize, options, tombstonedon): self._seriesname = seriesname self._replicacount = replicacount self._generation = generation self._autotrim = autotrim s...
29.291667
106
0.599218
2,791
0.992532
0
0
1,658
0.589616
0
0
26
0.009246
c0f5fb0852a3f468b938572e90b83ad69c9f9511
3,914
py
Python
Common.py
DongDong-123/zgg_active
7b7304bc9391e1d370052087d4ad2e6d05db670c
[ "Apache-2.0" ]
null
null
null
Common.py
DongDong-123/zgg_active
7b7304bc9391e1d370052087d4ad2e6d05db670c
[ "Apache-2.0" ]
null
null
null
Common.py
DongDong-123/zgg_active
7b7304bc9391e1d370052087d4ad2e6d05db670c
[ "Apache-2.0" ]
null
null
null
import os import random import time import xlwt from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.support.ui import WebDriverWait from front_login import * from readConfig import ReadConfig from db import DbOperate from selenium.webdriver.chrome.options import Options from mysql...
32.347107
109
0.601175
3,481
0.851933
0
0
0
0
0
0
546
0.133627
c0f64387b72b3f7cb9554217c9f76926a2cb5bad
5,367
py
Python
dashboard_generator.py
vgm236/exec-dash
5c446849ffc0ced5ec6c286d87603afa280f6017
[ "MIT" ]
1
2019-06-20T03:14:22.000Z
2019-06-20T03:14:22.000Z
dashboard_generator.py
vgm236/exec-dash
5c446849ffc0ced5ec6c286d87603afa280f6017
[ "MIT" ]
null
null
null
dashboard_generator.py
vgm236/exec-dash
5c446849ffc0ced5ec6c286d87603afa280f6017
[ "MIT" ]
null
null
null
# dashboard_generator.py import os.path # helps to save in a different folder import pandas as pd import itertools import locale # from https://stackoverflow.com/Questions/320929/currency-formatting-in-python from os import listdir from os.path import isfile, join #for chart generation import matplotlib import matplo...
27.80829
157
0.63406
0
0
0
0
0
0
0
0
2,989
0.556922
c0f84e0c95d431aa5ccd03662827d19008ac7c6c
2,235
py
Python
product_spider/spiders/medicalisotopes_spider.py
Pandaaaa906/product_spider
cc7f865f53fd3ed68f4869be3ba917c8373dfcf2
[ "MIT" ]
null
null
null
product_spider/spiders/medicalisotopes_spider.py
Pandaaaa906/product_spider
cc7f865f53fd3ed68f4869be3ba917c8373dfcf2
[ "MIT" ]
null
null
null
product_spider/spiders/medicalisotopes_spider.py
Pandaaaa906/product_spider
cc7f865f53fd3ed68f4869be3ba917c8373dfcf2
[ "MIT" ]
null
null
null
from urllib.parse import urljoin from scrapy import Request from product_spider.items import RawData from product_spider.utils.functions import strip from product_spider.utils.spider_mixin import BaseSpider class MedicalIsotopesSpider(BaseSpider): name = "medicalisotopes" base_url = "https://www.medicalisot...
46.5625
118
0.619239
2,023
0.905145
1,806
0.808054
0
0
0
0
641
0.286801
c0f8d44852a7507fedd1ad9b67823c5e5f22423a
117
py
Python
fnexchange/core/config.py
dnif-archive/fnExchange
d75431b37da3193447b919b4be2e0104266156f1
[ "Apache-2.0" ]
1
2017-07-19T22:13:54.000Z
2017-07-19T22:13:54.000Z
fnexchange/core/config.py
dnif/fnExchange
d75431b37da3193447b919b4be2e0104266156f1
[ "Apache-2.0" ]
1
2021-03-25T21:27:21.000Z
2021-03-25T21:27:21.000Z
fnexchange/core/config.py
dnif-archive/fnExchange
d75431b37da3193447b919b4be2e0104266156f1
[ "Apache-2.0" ]
1
2021-07-07T18:55:19.000Z
2021-07-07T18:55:19.000Z
import yaml def read_config(path): with open(path, 'r') as f: conf = yaml.safe_load(f) return conf
14.625
32
0.615385
0
0
0
0
0
0
0
0
3
0.025641
c0fa6359178c8344bf4c2736824c78112998b09b
511
py
Python
books_and_notes/professional_courses/operating_system/sources/ucore_os_lab/docs/ucore实验指导书/lab2/rename.py
gxw1/review_the_national_post-graduate_entrance_examination
8812779a7a4ce185a531d120562d5194b697c0c9
[ "MIT" ]
640
2019-03-30T11:32:43.000Z
2022-03-31T14:05:18.000Z
books_and_notes/professional_courses/operating_system/sources/ucore_os_lab/docs/ucore实验指导书/lab2/rename.py
yyzVegst/review_the_national_post-graduate_entrance_examination
8812779a7a4ce185a531d120562d5194b697c0c9
[ "MIT" ]
6
2019-07-22T01:57:24.000Z
2022-01-20T15:03:16.000Z
books_and_notes/professional_courses/operating_system/sources/ucore_os_lab/docs/ucore实验指导书/lab2/rename.py
yyzVegst/review_the_national_post-graduate_entrance_examination
8812779a7a4ce185a531d120562d5194b697c0c9
[ "MIT" ]
212
2019-04-10T02:31:50.000Z
2022-03-30T02:32:47.000Z
#!/usr/bin/python import os lines = [line for line in open("hehe.txt")] for line in lines: i = 0 for c in line: if (c != '_' and not (c >= '0' and c <= '9')): break i+=1 cmd = "mv " + line[0:i].strip() + line[i+5:].strip() + " lab2_" + line[0:i].strip() + line[i+5:].strip() print cmd os.system(cmd) c...
19.653846
106
0.547945
0
0
0
0
0
0
0
0
84
0.164384
c0fa6b58d78457006cba2d731fe207bcc18728f5
9,819
py
Python
smiles_parsers/Smarts.py
UnixJunkie/frowns
427e4c11a8a4dbe865828d18221899478497795e
[ "BSD-3-Clause" ]
null
null
null
smiles_parsers/Smarts.py
UnixJunkie/frowns
427e4c11a8a4dbe865828d18221899478497795e
[ "BSD-3-Clause" ]
null
null
null
smiles_parsers/Smarts.py
UnixJunkie/frowns
427e4c11a8a4dbe865828d18221899478497795e
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/enb python import string, re import Handler ####################### # Define some regular expressions inside a quoted string # then turn the string into the actual data structure. # (I found it was easiest to understand when done this way.) definitions = r""" # These are the atomic symbols Da...
31.776699
76
0.575517
0
0
0
0
0
0
0
0
6,703
0.682656
c0fc8fa48988775dbfa087aacb17d54064d6211e
2,915
py
Python
visartm/settings_default.py
alexeyev/visartm
d19e193b3c084d7f355a45b966c8bb2ebb6fa366
[ "BSD-3-Clause" ]
1
2020-10-01T10:11:21.000Z
2020-10-01T10:11:21.000Z
visartm/settings_default.py
alexeyev/visartm
d19e193b3c084d7f355a45b966c8bb2ebb6fa366
[ "BSD-3-Clause" ]
null
null
null
visartm/settings_default.py
alexeyev/visartm
d19e193b3c084d7f355a45b966c8bb2ebb6fa366
[ "BSD-3-Clause" ]
null
null
null
# This is default settings for VisARTM for local usage import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) DATA_DIR = os.path.join(BASE_DIR, "data") SECRET_KEY = 'yj_fhwf$-8ws1%a_vl5c0lf($#ke@c3+lu3l-f733k(j-!q*57' DEBUG = True ALLOWED_HOSTS = ["127.0.0.1"] THREADING = True REGISTRAT...
23.699187
71
0.646312
0
0
0
0
0
0
0
0
1,620
0.555746
c0fe21b15a59a46814a6a24b71ed4f6e93699049
8,402
py
Python
pyvizio/const.py
jezzab/pyvizio
8086f9e5aac49d1d99ade02684ca35c05e03a7eb
[ "MIT" ]
72
2017-08-08T19:32:12.000Z
2022-03-18T03:18:41.000Z
pyvizio/const.py
raman325/pyvizio
9cf45fcc9b409caf223a38d8f79c775742ab4127
[ "MIT" ]
48
2017-09-16T16:37:54.000Z
2022-01-23T20:43:42.000Z
pyvizio/const.py
ConnectionMaster/pyvizio
0fe4558557917509d3da3bb24f9221f15ba901ce
[ "MIT" ]
42
2017-09-04T22:59:21.000Z
2022-03-18T03:18:30.000Z
"""pyvizio constants.""" DEVICE_CLASS_SPEAKER = "speaker" DEVICE_CLASS_TV = "tv" DEVICE_CLASS_CRAVE360 = "crave360" DEFAULT_DEVICE_ID = "pyvizio" DEFAULT_DEVICE_CLASS = DEVICE_CLASS_TV DEFAULT_DEVICE_NAME = "Python Vizio" DEFAULT_PORTS = [7345, 9000] DEFAULT_TIMEOUT = 5 MAX_VOLUME = {DEVICE_CLASS_TV: 100, DEVICE_CLA...
28.100334
190
0.416448
0
0
0
0
0
0
0
0
4,300
0.511783
8d00ab8273f452e2946deb1ce6f8cb6b06b174a7
1,858
py
Python
etl/steps/data/garden/owid/latest/covid.py
c1x1x00xxPentium/etl
4c9c4e466287deefba1aaae12c473c38d9ecb3cd
[ "MIT" ]
5
2021-11-01T18:54:52.000Z
2022-03-10T17:19:14.000Z
etl/steps/data/garden/owid/latest/covid.py
c1x1x00xxPentium/etl
4c9c4e466287deefba1aaae12c473c38d9ecb3cd
[ "MIT" ]
98
2021-09-24T19:29:34.000Z
2022-03-31T15:57:18.000Z
etl/steps/data/garden/owid/latest/covid.py
c1x1x00xxPentium/etl
4c9c4e466287deefba1aaae12c473c38d9ecb3cd
[ "MIT" ]
2
2021-12-15T07:53:38.000Z
2022-02-05T14:50:43.000Z
# # covid19.py # owid/latest/covid # from owid.catalog.meta import License, Source import datetime as dt import pandas as pd from owid.catalog import Dataset, Table from etl.helpers import downloaded MEGAFILE_URL = "https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/owid-covid-data.csv" def...
30.966667
163
0.656082
0
0
0
0
0
0
0
0
728
0.391819
8d0131fd0dd77260df8028fcae8b87ef1c39cda9
1,175
py
Python
tests/integration_tests/test_suassystem_interop_client.py
liyu711/SUAS
2f6592fc2ab316475eeabe2f4828e5ba5c1a4b0b
[ "MIT" ]
null
null
null
tests/integration_tests/test_suassystem_interop_client.py
liyu711/SUAS
2f6592fc2ab316475eeabe2f4828e5ba5c1a4b0b
[ "MIT" ]
null
null
null
tests/integration_tests/test_suassystem_interop_client.py
liyu711/SUAS
2f6592fc2ab316475eeabe2f4828e5ba5c1a4b0b
[ "MIT" ]
null
null
null
import unittest import interop from SUASSystem import InteropClientConverter from SUASSystem import Location class SDATestCase(unittest.TestCase): def setUp(self): self.interop_client = InteropClientConverter() def test_submit_target(self): compiled_target_info = { "latitude" : 38...
27.97619
110
0.621277
1,064
0.905532
0
0
0
0
0
0
293
0.249362
8d061cbc92ba43ecf28dbdbaa3d14137c3609085
3,244
py
Python
xlremed/dataset/docred.py
osainz59/XLREMed
d7fb0c322126676fe95f71ced0014076cb7a9e4d
[ "Apache-2.0" ]
4
2020-10-01T16:58:24.000Z
2021-11-30T09:29:03.000Z
xlremed/dataset/docred.py
osainz59/XLREMed
d7fb0c322126676fe95f71ced0014076cb7a9e4d
[ "Apache-2.0" ]
null
null
null
xlremed/dataset/docred.py
osainz59/XLREMed
d7fb0c322126676fe95f71ced0014076cb7a9e4d
[ "Apache-2.0" ]
null
null
null
import os import json #import fire from collections import defaultdict from pprint import pprint from itertools import product from .dataset import Dataset class DocRED(Dataset): def __init__(self, path): super(DocRED, self).__init__(name='DocRED') self.path = path self._init() ...
33.791667
109
0.544698
2,895
0.892417
0
0
0
0
0
0
311
0.095869
8d0629eab200e0d853386685fca3ce29b3fc85c5
295
py
Python
models/account.py
Tingesplatform/tokenomics
b541a54b1709a1282c5133e731b26a6ca05ac901
[ "MIT" ]
2
2021-01-12T04:44:06.000Z
2022-03-15T23:34:41.000Z
models/account.py
Tingesplatform/tokenomics
b541a54b1709a1282c5133e731b26a6ca05ac901
[ "MIT" ]
5
2019-01-14T07:17:34.000Z
2021-06-01T23:38:58.000Z
models/account.py
Tingesplatform/tokenomics
b541a54b1709a1282c5133e731b26a6ca05ac901
[ "MIT" ]
2
2019-01-11T17:07:48.000Z
2022-03-03T17:26:41.000Z
import os class Account: ACCOUNTS_STORAGE = {} """Ethereum account""" def __init__(self): self.address = "0x" + os.urandom(20).hex() self.ACCOUNTS_STORAGE[self.address] = self def __str__(self): return f'Account {self.address}' __repr__ = __str__
19.666667
50
0.616949
282
0.955932
0
0
0
0
0
0
51
0.172881
8d06a575c43d8f20bdee54e0f28161929a56cf8b
7,955
py
Python
swyft/networks/classifier.py
undark-lab/swyft
50aa524e2f3a2b3d1354543178ff72bc7f055a35
[ "MIT" ]
104
2020-11-26T09:46:03.000Z
2022-03-18T06:22:03.000Z
swyft/networks/classifier.py
cweniger/swyft
2c0ed514622a37e8ec4e406b99a8327ecafb7ab4
[ "MIT" ]
83
2021-03-02T15:54:26.000Z
2022-03-10T08:09:05.000Z
swyft/networks/classifier.py
undark-lab/swyft
50aa524e2f3a2b3d1354543178ff72bc7f055a35
[ "MIT" ]
10
2021-02-04T14:27:36.000Z
2022-03-31T17:39:34.000Z
from abc import ABC, abstractmethod from typing import Dict, Hashable, Tuple import torch import torch.nn as nn import swyft import swyft.utils from swyft.networks.channelized import ResidualNetWithChannel from swyft.networks.standardization import ( OnlineDictStandardizingLayer, OnlineStandardizingLayer, ) f...
34.737991
118
0.669893
6,481
0.814708
0
0
2,609
0.32797
0
0
913
0.114771
8d0744d0d6c3d370aff01717e44e415269208d73
238
py
Python
output/models/nist_data/list_pkg/date/schema_instance/nistschema_sv_iv_list_date_min_length_1_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/nist_data/list_pkg/date/schema_instance/nistschema_sv_iv_list_date_min_length_1_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/nist_data/list_pkg/date/schema_instance/nistschema_sv_iv_list_date_min_length_1_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.nist_data.list_pkg.date.schema_instance.nistschema_sv_iv_list_date_min_length_1_xsd.nistschema_sv_iv_list_date_min_length_1 import NistschemaSvIvListDateMinLength1 __all__ = [ "NistschemaSvIvListDateMinLength1", ]
39.666667
182
0.886555
0
0
0
0
0
0
0
0
34
0.142857
8d09e1e56a5c8747b2ab32acaa6c0733d2870eb2
12,386
py
Python
mstrio/distribution_services/contact/contact.py
czyzq/mstrio-py
b25fd19936b659d503a7eaaa96c8d0b4e118cb7c
[ "Apache-2.0" ]
1
2022-02-15T13:18:04.000Z
2022-02-15T13:18:04.000Z
mstrio/distribution_services/contact/contact.py
czyzq/mstrio-py
b25fd19936b659d503a7eaaa96c8d0b4e118cb7c
[ "Apache-2.0" ]
null
null
null
mstrio/distribution_services/contact/contact.py
czyzq/mstrio-py
b25fd19936b659d503a7eaaa96c8d0b4e118cb7c
[ "Apache-2.0" ]
null
null
null
from collections import defaultdict from enum import auto from typing import Iterable, List, Optional, TYPE_CHECKING, Union from mstrio import config from mstrio.api import contacts from mstrio.distribution_services.contact_group import ContactGroup from mstrio.distribution_services.device import Device from mstrio.ut...
35.797688
98
0.619086
10,866
0.877281
0
0
2,993
0.241644
0
0
4,640
0.374617
8d0a2cafd43bfa146f864191d3b8493254f59ce2
330
py
Python
sources/t04/t04ej15.py
workready/pythonbasic
59bd82caf99244f5e711124e1f6f4dec8de22141
[ "MIT" ]
null
null
null
sources/t04/t04ej15.py
workready/pythonbasic
59bd82caf99244f5e711124e1f6f4dec8de22141
[ "MIT" ]
null
null
null
sources/t04/t04ej15.py
workready/pythonbasic
59bd82caf99244f5e711124e1f6f4dec8de22141
[ "MIT" ]
null
null
null
# Iterador a partir de una función generadora def fib(): prev, curr = 0, 1 while True: yield curr prev, curr = curr, prev + curr f = fib() # Recorremos nuestro iterador, llamando a next(). Dentro del for se llama automáticamente a iter(f) print(0, end=' ') for n in range(16): print(next(f)...
25.384615
99
0.630303
0
0
106
0.319277
0
0
0
0
152
0.457831
8d0bafb0014137256cbe170eed5e636723c3e6ff
1,166
py
Python
setup.py
snower/sevent
a11e4488e500a4008b07f4391119ad3288a1f07f
[ "MIT" ]
14
2018-02-16T10:33:04.000Z
2021-09-28T02:04:50.000Z
setup.py
snower/sevent
a11e4488e500a4008b07f4391119ad3288a1f07f
[ "MIT" ]
null
null
null
setup.py
snower/sevent
a11e4488e500a4008b07f4391119ad3288a1f07f
[ "MIT" ]
1
2021-09-26T06:09:38.000Z
2021-09-26T06:09:38.000Z
#!/usr/bin/env python import os import sys import platform from setuptools import setup, Extension if platform.system() != 'Windows' and platform.python_implementation() == "CPython": ext_modules = [Extension('sevent/cbuffer', sources=['sevent/cbuffer.c'])] else: ext_modules = [] if os.path.exist...
27.116279
85
0.610635
0
0
0
0
0
0
0
0
339
0.290738
8d0d1deb21adb6e5f10d2c2fc89468f8264b3969
1,229
py
Python
pyOCD/target/target_lpc1768.py
karlp/pyOCD
cfb76afdc8f50eeaf2c6a841ed9de1f5070e8916
[ "Apache-2.0" ]
1
2016-01-05T04:08:57.000Z
2016-01-05T04:08:57.000Z
pyOCD/target/target_lpc1768.py
karlp/pyOCD
cfb76afdc8f50eeaf2c6a841ed9de1f5070e8916
[ "Apache-2.0" ]
null
null
null
pyOCD/target/target_lpc1768.py
karlp/pyOCD
cfb76afdc8f50eeaf2c6a841ed9de1f5070e8916
[ "Apache-2.0" ]
null
null
null
""" mbed CMSIS-DAP debugger Copyright (c) 2006-2013 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable ...
30.725
73
0.689992
589
0.479251
0
0
0
0
0
0
737
0.599675
8d0d5fc54b12bc4a2778b7b411b9ddf33d8564a9
16,444
py
Python
CORNISH_B-CNN_Trainer_And_Optimiser.py
s-neilson/CORNISH-CNN-classifier
983754c582276a80f0bc28ccf5e8124840958d03
[ "MIT" ]
2
2019-06-23T06:58:51.000Z
2019-11-21T01:36:48.000Z
CORNISH_B-CNN_Trainer_And_Optimiser.py
s-neilson/CORNISH-CNN-classifier
983754c582276a80f0bc28ccf5e8124840958d03
[ "MIT" ]
null
null
null
CORNISH_B-CNN_Trainer_And_Optimiser.py
s-neilson/CORNISH-CNN-classifier
983754c582276a80f0bc28ccf5e8124840958d03
[ "MIT" ]
null
null
null
import os import warnings warnings.simplefilter("ignore") import csv import numpy import hyperopt from hyperopt import Trials,tpe,hp,fmin from keras.utils import to_categorical import pickle from loadConfiguration import Configuration from objectCreation import createImagedObjects from trainBCNN import run...
62.287879
220
0.769582
0
0
0
0
0
0
0
0
4,395
0.267271
2386c477dd9e245a8edc63bb8d5ff08d06c30f67
1,202
py
Python
core/systems/cart_pole.py
ivandariojr/core
c4dec054a3e80355ed3812d48ca2bba286584a67
[ "MIT" ]
6
2021-01-26T21:00:24.000Z
2022-02-28T23:57:50.000Z
core/systems/cart_pole.py
ivandariojr/core
c4dec054a3e80355ed3812d48ca2bba286584a67
[ "MIT" ]
15
2020-01-28T22:49:18.000Z
2021-12-14T08:34:39.000Z
core/systems/cart_pole.py
ivandariojr/core
c4dec054a3e80355ed3812d48ca2bba286584a67
[ "MIT" ]
6
2019-06-07T21:31:20.000Z
2021-12-13T01:00:02.000Z
from torch import cat, cos, float64, sin, stack, tensor from torch.nn import Module, Parameter from core.dynamics import RoboticDynamics class CartPole(RoboticDynamics, Module): def __init__(self, m_c, m_p, l, g=9.81): RoboticDynamics.__init__(self, 2, 1) Module.__init__(self) self.params...
29.317073
72
0.526622
1,061
0.882696
0
0
0
0
0
0
0
0
2389a78f5b884ed87e17e07d946941aa063ef130
2,674
py
Python
export.py
nicolasm/lastfm-export
43456161c7083b490d09a1d2638a38c9771e1b3f
[ "MIT" ]
7
2015-11-17T20:40:29.000Z
2022-02-03T17:55:23.000Z
export.py
nicolasm/lastfm-export
43456161c7083b490d09a1d2638a38c9771e1b3f
[ "MIT" ]
2
2021-12-30T22:32:11.000Z
2021-12-30T22:32:12.000Z
export.py
nicolasm/lastfm-export
43456161c7083b490d09a1d2638a38c9771e1b3f
[ "MIT" ]
1
2020-08-03T09:19:11.000Z
2020-08-03T09:19:11.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ####################################################################### # This script imports your Last.fm listening history # # inside a MySQL or Sqlite database. # # ...
31.093023
89
0.613687
0
0
0
0
0
0
0
0
947
0.354151
238ac0373309554dc94b4fa70cb2b5d3ddfb8bbc
2,617
py
Python
final_project/code/src/data_attention.py
jschmidtnj/cs584
d1d4d485d1fac8743cdbbc2996792db249dcf389
[ "MIT" ]
null
null
null
final_project/code/src/data_attention.py
jschmidtnj/cs584
d1d4d485d1fac8743cdbbc2996792db249dcf389
[ "MIT" ]
null
null
null
final_project/code/src/data_attention.py
jschmidtnj/cs584
d1d4d485d1fac8743cdbbc2996792db249dcf389
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ data file read in data """ from typing import Tuple, Any import pandas as pd import tensorflow as tf from loguru import logger from utils import file_path_relative import numpy as np from transformers import DistilBertTokenizer NUM_ROWS_TRAIN: int = 15000 TEST_RATIO: float = 0.2 def _run...
27.260417
131
0.649599
0
0
0
0
0
0
0
0
527
0.201376
2390d6b6f9cc47e9e8fe109965cc9769d5444907
2,875
py
Python
applications/WindEngineeringApplication/tests/test_WindEngineeringApplication.py
clazaro/Kratos
b947b82c90dfcbf13d60511427f85990d36b90be
[ "BSD-4-Clause" ]
null
null
null
applications/WindEngineeringApplication/tests/test_WindEngineeringApplication.py
clazaro/Kratos
b947b82c90dfcbf13d60511427f85990d36b90be
[ "BSD-4-Clause" ]
null
null
null
applications/WindEngineeringApplication/tests/test_WindEngineeringApplication.py
clazaro/Kratos
b947b82c90dfcbf13d60511427f85990d36b90be
[ "BSD-4-Clause" ]
null
null
null
# Kratos imports import KratosMultiphysics import KratosMultiphysics.KratosUnittest as UnitTest from KratosMultiphysics.WindEngineeringApplication.test_suite import SuiteFlags, TestSuite import run_cpp_tests # STL imports import pathlib class TestLoader(UnitTest.TestLoader): @property def suiteClass(self): ...
31.25
103
0.681391
103
0.035826
0
0
60
0.02087
0
0
1,060
0.368696
2392d8b12f4d624279784bb31763afce245b714a
5,739
py
Python
src/cadorsfeed/fpr.py
kurtraschke/cadors-parse
67ac398ef318562dcbd7c60ef7c0d91e7980111a
[ "MIT" ]
1
2018-01-05T12:54:13.000Z
2018-01-05T12:54:13.000Z
src/cadorsfeed/fpr.py
kurtraschke/cadors-parse
67ac398ef318562dcbd7c60ef7c0d91e7980111a
[ "MIT" ]
null
null
null
src/cadorsfeed/fpr.py
kurtraschke/cadors-parse
67ac398ef318562dcbd7c60ef7c0d91e7980111a
[ "MIT" ]
null
null
null
import re import uuid from copy import deepcopy from datetime import datetime from lxml import etree from lxml.html import xhtml_to_html from geoalchemy import WKTSpatialElement from geolucidate.functions import _cleanup, _convert from geolucidate.parser import parser_re from cadorsfeed import db from cadorsfeed.mo...
34.781818
76
0.626067
0
0
0
0
0
0
0
0
990
0.172504
2393234a05bc91425b68a33c2343314b4950796f
1,016
py
Python
sstcam_sandbox/d191122_dc_tf/generate_pedestal.py
watsonjj/CHECLabPySB
91330d3a6f510a392f635bd7f4abd2f77871322c
[ "BSD-3-Clause" ]
null
null
null
sstcam_sandbox/d191122_dc_tf/generate_pedestal.py
watsonjj/CHECLabPySB
91330d3a6f510a392f635bd7f4abd2f77871322c
[ "BSD-3-Clause" ]
null
null
null
sstcam_sandbox/d191122_dc_tf/generate_pedestal.py
watsonjj/CHECLabPySB
91330d3a6f510a392f635bd7f4abd2f77871322c
[ "BSD-3-Clause" ]
1
2021-03-30T09:46:56.000Z
2021-03-30T09:46:56.000Z
from sstcam_sandbox import get_checs from TargetCalibSB.pedestal import PedestalTargetCalib from TargetCalibSB import get_cell_ids_for_waveform from CHECLabPy.core.io import TIOReader from tqdm import tqdm from glob import glob def process(path): pedestal_path = path.replace("_r0.tio", "_ped.tcal") reader = T...
29.028571
94
0.714567
0
0
0
0
0
0
0
0
84
0.082677
239448a88cf09613c57c9e9d85d7149c490e74ce
740
py
Python
Python/剑指offer53-I.py
1050669722/LeetCode-Answers
c8f4d1ccaac09cda63b60d75144335347b06dc81
[ "MIT" ]
null
null
null
Python/剑指offer53-I.py
1050669722/LeetCode-Answers
c8f4d1ccaac09cda63b60d75144335347b06dc81
[ "MIT" ]
null
null
null
Python/剑指offer53-I.py
1050669722/LeetCode-Answers
c8f4d1ccaac09cda63b60d75144335347b06dc81
[ "MIT" ]
null
null
null
class Solution: def search(self, nums: List[int], target: int) -> int: # if len(nums) == 1: # return 1 if nums[0] == target else 0 tmp = [] i, j = 0, len(nums) - 1 while i <= j: m = (i + j) // 2 if nums[m] == target: tmp.append(m) ...
32.173913
58
0.364865
739
0.998649
0
0
0
0
0
0
62
0.083784
23944dce2a5292a5f4dccddbeb6c459b0db88881
821
py
Python
punk/aggregator/aggregateByDateTimeCategory.py
NewKnowledge/punk
53007a38433023f9a9f5cf39786b1c5a28f1f996
[ "MIT" ]
2
2017-08-23T16:58:01.000Z
2020-07-03T01:53:34.000Z
punk/aggregator/aggregateByDateTimeCategory.py
NewKnowledge/punk
53007a38433023f9a9f5cf39786b1c5a28f1f996
[ "MIT" ]
11
2017-08-18T17:19:21.000Z
2022-03-18T15:54:40.000Z
punk/aggregator/aggregateByDateTimeCategory.py
NewKnowledge/punk
53007a38433023f9a9f5cf39786b1c5a28f1f996
[ "MIT" ]
2
2017-09-11T19:38:04.000Z
2020-05-28T00:58:05.000Z
import pandas as pd from typing import List, NamedTuple from .timeseries import agg_by_category_by_date from primitive_interfaces.base import PrimitiveBase class AggregateByDateTimeCategory(PrimitiveBase[pd.DataFrame, List[str]]): __author__ = 'distil' def __init__(self): pass def get_params(sel...
28.310345
94
0.65408
662
0.806334
0
0
0
0
0
0
8
0.009744
2394fb0077e12ccbcbd82c4f19bfaa2b70a81ecc
150
py
Python
eemeter/modeling/exceptions.py
SuccessionEcologicalServices/eemeter-1
dc06f42dc64679a5d56771d6900169eef4eaf515
[ "MIT" ]
null
null
null
eemeter/modeling/exceptions.py
SuccessionEcologicalServices/eemeter-1
dc06f42dc64679a5d56771d6900169eef4eaf515
[ "MIT" ]
1
2018-06-14T04:24:49.000Z
2018-06-14T04:24:49.000Z
eemeter/modeling/exceptions.py
SuccessionEcologicalServices/eemeter-1
dc06f42dc64679a5d56771d6900169eef4eaf515
[ "MIT" ]
null
null
null
class DataSufficiencyException(Exception): pass class ModelFitException(Exception): pass class ModelPredictException(Exception): pass
13.636364
42
0.773333
143
0.953333
0
0
0
0
0
0
0
0
2395f7861779117a4a46333dc411993e7c87448d
2,723
py
Python
algorithm/leetcode/2018-03-25.py
mhoonjeon/problemsolving
f47ff41b03ce406b26ea36be602c0aa14ac7ccf1
[ "MIT" ]
null
null
null
algorithm/leetcode/2018-03-25.py
mhoonjeon/problemsolving
f47ff41b03ce406b26ea36be602c0aa14ac7ccf1
[ "MIT" ]
null
null
null
algorithm/leetcode/2018-03-25.py
mhoonjeon/problemsolving
f47ff41b03ce406b26ea36be602c0aa14ac7ccf1
[ "MIT" ]
null
null
null
# 804. Unique Morse Code Words class Solution: def __init__(self): self.morse_code = [".-", "-...", "-.-.", "-..", ".", "..-.", "--.", "....", "..", ".---", "-.-", ".-..", "--", "-.", "---", ".--.", "--.-", ".-.", "...", "-", "..-", ...
27.785714
79
0.480353
792
0.290856
0
0
0
0
0
0
1,646
0.60448
2396d1a675b3960ca8025853ba1b4a50d69159c9
19,779
py
Python
pygna/block_model.py
Gee-3/pygna
61f2128e918e423fef73d810e0c3af5761933096
[ "MIT" ]
32
2019-07-11T22:58:14.000Z
2022-03-04T19:34:55.000Z
pygna/block_model.py
Gee-3/pygna
61f2128e918e423fef73d810e0c3af5761933096
[ "MIT" ]
3
2021-05-24T14:03:13.000Z
2022-01-07T03:47:32.000Z
pygna/block_model.py
Gee-3/pygna
61f2128e918e423fef73d810e0c3af5761933096
[ "MIT" ]
5
2019-07-24T09:38:07.000Z
2021-12-30T09:20:20.000Z
import networkx as nx import matplotlib.pyplot as plt import matplotlib.patches as mpatches import numpy as np import logging from pygna import output from pygna.utils import YamlConfig import pandas as pd import random import string import seaborn as sns import pygna.output as output class BlockModel(object): ...
36.027322
258
0.590323
6,252
0.316093
0
0
0
0
0
0
8,923
0.451135
23971993e9893cd5f385730b84276166fd285f88
184
py
Python
printshops/apps.py
amid-africa/photoorder
407cf58b3dbd3e2144a8533f489889295f946776
[ "MIT" ]
null
null
null
printshops/apps.py
amid-africa/photoorder
407cf58b3dbd3e2144a8533f489889295f946776
[ "MIT" ]
null
null
null
printshops/apps.py
amid-africa/photoorder
407cf58b3dbd3e2144a8533f489889295f946776
[ "MIT" ]
null
null
null
from django.apps import AppConfig class PrintshopsConfig(AppConfig): name = 'printshops' """ Register our signals """ def ready(self): import printshops.signals
18.4
34
0.684783
147
0.798913
0
0
0
0
0
0
40
0.217391
239787e50f7f31c3ea658751864cb26108816d6d
275
py
Python
ctfproblems/Hopper/10_who_is_digging/grader.py
milesmcc/pactf-2018
cfd9d94a7b6828259220f52ab3c5893a28429c62
[ "MIT" ]
null
null
null
ctfproblems/Hopper/10_who_is_digging/grader.py
milesmcc/pactf-2018
cfd9d94a7b6828259220f52ab3c5893a28429c62
[ "MIT" ]
null
null
null
ctfproblems/Hopper/10_who_is_digging/grader.py
milesmcc/pactf-2018
cfd9d94a7b6828259220f52ab3c5893a28429c62
[ "MIT" ]
null
null
null
def grade(key, submission): if submission.lower() == 'sea' or submission.lower() == 'the sea': return True, "Yes! Miles learns Russian so he came up with the words that visually look same in both English and Russian." else: return False, "Nyet!"
45.833333
131
0.650909
0
0
0
0
0
0
0
0
130
0.472727
2398b8c755adf06d3f7f1e5cae4d4aedb1f1899b
443
py
Python
class/lect/Lect-17/pd1.py
MikenzieAlasca/F21-1010
a7c15b8d9bf84f316aa6921f6d8a588c513a22b8
[ "MIT" ]
5
2021-09-09T21:08:14.000Z
2021-12-14T02:30:52.000Z
class/lect/Lect-17/pd1.py
MikenzieAlasca/F21-1010
a7c15b8d9bf84f316aa6921f6d8a588c513a22b8
[ "MIT" ]
null
null
null
class/lect/Lect-17/pd1.py
MikenzieAlasca/F21-1010
a7c15b8d9bf84f316aa6921f6d8a588c513a22b8
[ "MIT" ]
8
2021-09-09T17:46:07.000Z
2022-02-08T22:41:35.000Z
import pandas as pd people_dict = { "weight": pd.Series([145, 182, 191],index=["joan", "bob", "mike"]), "birthyear": pd.Series([2002, 2000, 1999], index=["bob", "joan", "mike"], name="year"), "children": pd.Series([1, 2], index=["mike", "bob"]), "hobby": pd.Series(["Rock Climbing", "S...
31.642857
104
0.557562
0
0
0
0
0
0
0
0
142
0.320542
239de3aa205a8c68e33dedf541996817e27acfa5
3,440
py
Python
virtualsmartcard-0.8/src/vpicc/virtualsmartcard/tests/SmartcardSAM_test.py
CMelas/foo
d7a34b24606c7b9ab04ea8c39a8b3716ca6255c1
[ "MIT" ]
1
2021-11-09T12:01:56.000Z
2021-11-09T12:01:56.000Z
virtualsmartcard-0.8/src/vpicc/virtualsmartcard/tests/SmartcardSAM_test.py
CMelas/foo
d7a34b24606c7b9ab04ea8c39a8b3716ca6255c1
[ "MIT" ]
null
null
null
virtualsmartcard-0.8/src/vpicc/virtualsmartcard/tests/SmartcardSAM_test.py
CMelas/foo
d7a34b24606c7b9ab04ea8c39a8b3716ca6255c1
[ "MIT" ]
null
null
null
# # Copyright (C) 2014 Dominik Oepen # # This file is part of virtualsmartcard. # # virtualsmartcard is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # l...
40
79
0.670058
2,449
0.711919
0
0
0
0
0
0
1,338
0.388953
239ed9095bc55c203b6c4b8328d5c14492d59001
6,762
py
Python
test/phagesExperiment/runTableCases.py
edsaac/bioparticle
67e191329ef191fc539b290069524b42fbaf7e21
[ "MIT" ]
null
null
null
test/phagesExperiment/runTableCases.py
edsaac/bioparticle
67e191329ef191fc539b290069524b42fbaf7e21
[ "MIT" ]
1
2020-09-25T23:31:21.000Z
2020-09-25T23:31:21.000Z
test/phagesExperiment/runTableCases.py
edsaac/VirusTransport_RxSandbox
67e191329ef191fc539b290069524b42fbaf7e21
[ "MIT" ]
1
2021-09-30T05:00:58.000Z
2021-09-30T05:00:58.000Z
############################################################### # _ _ _ _ _ # | |__ (_) ___ _ __ __ _ _ __| |_(_) ___| | ___ # | '_ \| |/ _ \| '_ \ / _` | '__| __| |/ __| |/ _ \ # | |_) | | (_) | |_) | (_| | | | |_| | (__| | __/ # |_.__/|_|\___/| .__/ \__,_|_| \__|_|\___|_|\___...
34.676923
106
0.603963
0
0
0
0
0
0
0
0
3,160
0.466834
239f83a7c0d314a200223629c25572a463600e23
593
py
Python
mongo_list_temp.py
ScottStanton/mqtt_temp_mongo_web
76d59910f132fea9724b86aebfcef04b61789b8d
[ "Unlicense" ]
null
null
null
mongo_list_temp.py
ScottStanton/mqtt_temp_mongo_web
76d59910f132fea9724b86aebfcef04b61789b8d
[ "Unlicense" ]
null
null
null
mongo_list_temp.py
ScottStanton/mqtt_temp_mongo_web
76d59910f132fea9724b86aebfcef04b61789b8d
[ "Unlicense" ]
null
null
null
#!/usr/bin/python3 # # This software is covered by The Unlicense license # import os, pymongo, sys def print_mongo(): myclient = pymongo.MongoClient("mongodb://localhost:27017/") mydb = myclient["cpu_temperature"] mycol = mydb["temps"] #print(myclient.list_database_names()) for x in mycol.find()...
17.969697
64
0.60371
0
0
0
0
0
0
0
0
184
0.310287
23a0582a156a5116f9a3e62beef47135533e30c9
203
py
Python
tests/decisionreqdef/test_module.py
fasfoxcom/pycamunda
6bbebe1db40ce9fb29a9d420366e6dca1892df7b
[ "MIT" ]
null
null
null
tests/decisionreqdef/test_module.py
fasfoxcom/pycamunda
6bbebe1db40ce9fb29a9d420366e6dca1892df7b
[ "MIT" ]
null
null
null
tests/decisionreqdef/test_module.py
fasfoxcom/pycamunda
6bbebe1db40ce9fb29a9d420366e6dca1892df7b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- def test_all_contains_only_valid_names(): import pycamunda.decisionreqdef for name in pycamunda.decisionreqdef.__all__: getattr(pycamunda.decisionreqdef, name)
22.555556
49
0.73399
0
0
0
0
0
0
0
0
23
0.1133
23a2a97bb6db12d817c114dd0b13665cae319c12
2,185
py
Python
second/pytorch/models/fusion.py
RickOnEarth/pointpillars_based_CLOCs
c6d4576a151540200dac2354b00dc4ecce6ee72d
[ "MIT" ]
2
2022-01-05T08:41:38.000Z
2022-02-14T01:30:08.000Z
second/pytorch/models/fusion.py
RickOnEarth/pointpillars_based_CLOCs
c6d4576a151540200dac2354b00dc4ecce6ee72d
[ "MIT" ]
1
2022-03-28T03:23:36.000Z
2022-03-28T03:23:36.000Z
second/pytorch/models/fusion.py
RickOnEarth/pointpillars_based_CLOCs
c6d4576a151540200dac2354b00dc4ecce6ee72d
[ "MIT" ]
2
2022-01-07T05:56:43.000Z
2022-02-16T13:26:13.000Z
import time import torch from torch import nn from torch.nn import functional as F #import spconv import torchplus from torchplus.nn import Empty, GroupNorm, Sequential from torchplus.ops.array_ops import gather_nd, scatter_nd from torchplus.tools import change_default_args import sys if '/opt/ros/kinetic/lib/python2....
33.106061
92
0.556522
1,769
0.808132
0
0
0
0
0
0
296
0.135222
23a456677b9384e5a17f6de8dcdc1e93e2a745f9
3,001
py
Python
pdf_lines_gluer.py
serge-sotnyk/pdf-lines-gluer
b44284a28e4bce377d683ab8d6f820e704c630cb
[ "MIT" ]
1
2021-04-16T13:05:20.000Z
2021-04-16T13:05:20.000Z
pdf_lines_gluer.py
serge-sotnyk/pdf-lines-gluer
b44284a28e4bce377d683ab8d6f820e704c630cb
[ "MIT" ]
null
null
null
pdf_lines_gluer.py
serge-sotnyk/pdf-lines-gluer
b44284a28e4bce377d683ab8d6f820e704c630cb
[ "MIT" ]
2
2019-06-24T06:45:46.000Z
2019-06-28T19:43:20.000Z
import string from typing import List, Dict # inject code here # def _mean_in_window(lines, i) -> float: start = max(i - 5, 0) finish = min(i + 5, len(lines) - 1) sm, count = 0, 0 for n in range(start, finish): sm += len(lines[n]) - 1 # minus one-char prefix count += 1 return sm /...
26.557522
97
0.55115
0
0
0
0
0
0
0
0
290
0.096634
23a5398ab784fc5aa194816a75732cc159a8849f
1,241
py
Python
backend/thing/urls.py
thuong-lino/thing
e45d8f197896f4ab9b52dec0a85169396fff629a
[ "MIT" ]
null
null
null
backend/thing/urls.py
thuong-lino/thing
e45d8f197896f4ab9b52dec0a85169396fff629a
[ "MIT" ]
null
null
null
backend/thing/urls.py
thuong-lino/thing
e45d8f197896f4ab9b52dec0a85169396fff629a
[ "MIT" ]
null
null
null
from django.conf.urls import include from django.urls import path from django.contrib import admin from users.views import FacebookLogin import django_js_reverse.views from rest_framework.routers import DefaultRouter from common.routes import routes as common_routes router = DefaultRouter() routes = common_routes fo...
37.606061
85
0.706688
0
0
0
0
0
0
0
0
427
0.344077
23a5e45f9981098530b74e9239812e4a0d27fb21
7,302
py
Python
core/dataset/data_loader.py
thuzhaowang/idn-solver
7da29ce0b0bd7e76023e1cae56e3d186b324a394
[ "MIT" ]
22
2021-10-11T02:31:52.000Z
2022-02-23T08:06:14.000Z
core/dataset/data_loader.py
xubin1994/idn-solver
6b5dcfd94f35cc118c5dee0f98401e4848e670e3
[ "MIT" ]
4
2021-12-02T02:36:30.000Z
2022-03-16T01:04:47.000Z
core/dataset/data_loader.py
xubin1994/idn-solver
6b5dcfd94f35cc118c5dee0f98401e4848e670e3
[ "MIT" ]
4
2022-01-20T03:12:23.000Z
2022-03-16T00:08:54.000Z
import numpy as np from path import Path import random import pickle import torch import os import cv2 def load_as_float(path): """Loads image""" im = cv2.imread(path) im = cv2.cvtColor(im, cv2.COLOR_BGR2RGB).astype(np.float32) return im class SequenceFolder(torch.utils.data.Dataset)...
38.840426
161
0.65037
7,026
0.962202
0
0
0
0
0
0
842
0.115311
23a6372b0029d78dd5def2146734771fbbe2bd48
1,632
py
Python
server.py
hugoantunes/EchoServer
da4a6b8d8f4362e6770f767c8e75e80cac55d417
[ "MIT" ]
null
null
null
server.py
hugoantunes/EchoServer
da4a6b8d8f4362e6770f767c8e75e80cac55d417
[ "MIT" ]
null
null
null
server.py
hugoantunes/EchoServer
da4a6b8d8f4362e6770f767c8e75e80cac55d417
[ "MIT" ]
null
null
null
import Queue import select import socket from conf import ADDRESS, BACKLOG, SIZE server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.setblocking(0) print 'starting up on %s port %s' % ADDRESS server.bind(ADDRESS) server.listen(BACKLOG) inputs = [server] outputs = [] message_queues = {} while inputs: ...
27.661017
76
0.578431
0
0
0
0
0
0
0
0
183
0.112132
23a7e7e53ed3f920173ee73d17e3e8afad1d765f
3,813
py
Python
glue.py
mkechagia/android-survey
a1649c0fb9476fcc9fdf586ecde9da9a9a0138aa
[ "Apache-2.0" ]
1
2022-01-26T08:14:24.000Z
2022-01-26T08:14:24.000Z
glue.py
mkechagia/android-survey-tool
a1649c0fb9476fcc9fdf586ecde9da9a9a0138aa
[ "Apache-2.0" ]
null
null
null
glue.py
mkechagia/android-survey-tool
a1649c0fb9476fcc9fdf586ecde9da9a9a0138aa
[ "Apache-2.0" ]
null
null
null
import re import copy from collections import defaultdict from string import Template # initialize the dictionary for the methods with checked exceptions such as {fake method: real method} method_dict_checked = {'deleteRecord' : 'delete', \ 'editText' : 'setText_new', \ 'insertData' : 'insert_new', \ 'setLayout...
34.981651
104
0.710464
0
0
0
0
0
0
0
0
1,995
0.52321
23a85b9835619dae1db6fad9d342a22f09ccf61a
272
py
Python
solved_bronze/num10952.py
ilmntr/white_study
51d69d122b07e9a0922dddb134bff4ec79077eb9
[ "MIT" ]
null
null
null
solved_bronze/num10952.py
ilmntr/white_study
51d69d122b07e9a0922dddb134bff4ec79077eb9
[ "MIT" ]
null
null
null
solved_bronze/num10952.py
ilmntr/white_study
51d69d122b07e9a0922dddb134bff4ec79077eb9
[ "MIT" ]
null
null
null
# a = 1 # b = 1 # while (not ((a==0) and (b==0))): # a, b = map(int, input().split()) # print(a+b) while True: a, b = map(int, input().split()) if a == 0 and b == 0: break print(a+b)
17
42
0.338235
0
0
0
0
0
0
0
0
110
0.404412
23a8d2f8440fc0f4ab166887414f385e16797422
381
py
Python
mac.py
focusaurus/commander
4d511c9211ec6afcb2614e7b24b287c7c833c853
[ "MIT", "Unlicense" ]
3
2015-10-12T21:32:37.000Z
2021-09-16T16:51:03.000Z
mac.py
focusaurus/commander
4d511c9211ec6afcb2614e7b24b287c7c833c853
[ "MIT", "Unlicense" ]
null
null
null
mac.py
focusaurus/commander
4d511c9211ec6afcb2614e7b24b287c7c833c853
[ "MIT", "Unlicense" ]
null
null
null
from builtins import str from .helpers import run import logging import subprocess import functools import types logger = logging.getLogger("commander") def maestro(scriptId): """Run a Keyboard Maestro script by ID (more robust) or name.""" run( """osascript -e 'tell application "Keyboard Maestro Eng...
22.411765
74
0.67979
0
0
0
0
0
0
0
0
164
0.430446
23a8d8b1cd48f9fd55d3941e62fe86313bca756e
764
py
Python
planning_system/db/schema/views/finance/v_ui_finance.py
jehboyes/planning_system
a415f1408ef344732498d2ffb111dfd187b9b50f
[ "MIT" ]
null
null
null
planning_system/db/schema/views/finance/v_ui_finance.py
jehboyes/planning_system
a415f1408ef344732498d2ffb111dfd187b9b50f
[ "MIT" ]
null
null
null
planning_system/db/schema/views/finance/v_ui_finance.py
jehboyes/planning_system
a415f1408ef344732498d2ffb111dfd187b9b50f
[ "MIT" ]
null
null
null
from planning_system.db.schema.views import _get_set_cols def definition(session): """ Return UI view. Complex view, which requires a dynamic pivot. """ pvt_list = _get_set_cols(session) sql = f""" SELECT costc, summary_code, summary, section, supersection, summary_order, sec_order, super...
38.2
120
0.700262
0
0
0
0
0
0
0
0
610
0.798429
23a8eaed478e43d59a2f6ba4f9c799fc00e83544
267
py
Python
1526_minIncrementsToReachTargetArray.py
stuti-rastogi/leetcode-python-solutions
73593fe642a06a83cde974ba5e6de3a7b396ec84
[ "MIT" ]
4
2018-07-24T08:36:42.000Z
2019-08-25T17:48:47.000Z
1526_minIncrementsToReachTargetArray.py
stuti-rastogi/leetcodesolutions
73593fe642a06a83cde974ba5e6de3a7b396ec84
[ "MIT" ]
null
null
null
1526_minIncrementsToReachTargetArray.py
stuti-rastogi/leetcodesolutions
73593fe642a06a83cde974ba5e6de3a7b396ec84
[ "MIT" ]
null
null
null
class Solution: def minNumberOperations(self, target: List[int]) -> int: num_ops = target[0] for i in range(1, len(target)): diff = target[i]-target[i-1] if diff > 0: num_ops += diff return num_ops
26.7
60
0.524345
266
0.996255
0
0
0
0
0
0
0
0
23abc12980cb0a7128b692a9097ad4b745fb655b
756
py
Python
python/torch_helpers/trace2jit.py
zhaohb/Forward
08c7622090ce0cdd32fe5d0b462cb63258ce0a75
[ "BSD-3-Clause" ]
1
2021-03-24T11:49:35.000Z
2021-03-24T11:49:35.000Z
python/torch_helpers/trace2jit.py
zhaohb/Forward
08c7622090ce0cdd32fe5d0b462cb63258ce0a75
[ "BSD-3-Clause" ]
null
null
null
python/torch_helpers/trace2jit.py
zhaohb/Forward
08c7622090ce0cdd32fe5d0b462cb63258ce0a75
[ "BSD-3-Clause" ]
null
null
null
import torch import torchvision.models as models ''' Description: convert torch module to JIT TracedModule. 功能说明: 将torch 模型转化为 JIT TracedModule。 ''' def TracedModelFactory(file_name, traced_model): traced_model.save(file_name) traced_model = torch.jit.load(file_name) print("filename : ", file_name...
28
81
0.718254
0
0
0
0
0
0
0
0
270
0.346154
23ad1135866d4f8277494a12a0ed3be2f1311aa3
9,739
py
Python
CppSimShared/Python/cppsimdata.py
silicon-vlsi-org/eda-sue2Plus
83a2afa9c80308d5afe07a3fa0214d8412addb6d
[ "MIT" ]
1
2021-05-30T13:27:33.000Z
2021-05-30T13:27:33.000Z
CppSimShared/Python/cppsimdata.py
silicon-vlsi-org/eda-sue2Plus
83a2afa9c80308d5afe07a3fa0214d8412addb6d
[ "MIT" ]
null
null
null
CppSimShared/Python/cppsimdata.py
silicon-vlsi-org/eda-sue2Plus
83a2afa9c80308d5afe07a3fa0214d8412addb6d
[ "MIT" ]
null
null
null
# cppsimdata.py # written by Michael H. Perrott # with minor modifications by Doug Pastorello to work with both Python 2.7 and Python 3.4 # available at www.cppsim.com as part of the CppSim package # Copyright (c) 2013-2017 by Michael H. Perrott # This file is disributed under the MIT license (see Copying file) impo...
38.800797
149
0.629736
3,853
0.395626
580
0.059554
0
0
0
0
2,481
0.254749
23aebda5722243d52ce15ff9c4cb52dbd5434d9f
1,217
py
Python
waferscreen/data_io/exceptions.py
chw3k5/WaferScreen
c0ca7fe939fe7cd0b722b7d6129b148c03a7505c
[ "Apache-2.0" ]
1
2021-07-30T19:06:07.000Z
2021-07-30T19:06:07.000Z
waferscreen/data_io/exceptions.py
chw3k5/WaferScreen
c0ca7fe939fe7cd0b722b7d6129b148c03a7505c
[ "Apache-2.0" ]
8
2021-04-22T20:47:48.000Z
2021-07-30T19:06:01.000Z
waferscreen/data_io/exceptions.py
chw3k5/WaferScreen
c0ca7fe939fe7cd0b722b7d6129b148c03a7505c
[ "Apache-2.0" ]
null
null
null
class ResProcessingError(Exception): """The base class for exceptions the occur during resonator processing.""" pass class ResMinIsLeftMost(ResProcessingError): """Raised when the RWHM definition detects that the resonator's minima is the left-most point""" pass class ResMinIsRightMost(ResProcessing...
30.425
101
0.758422
1,175
0.965489
0
0
0
0
0
0
714
0.586689
23b3590bb9d68aac5032da0773011d5e1741a6b6
5,977
py
Python
notify/handlers.py
marzocchi/iterm-notify
5e587213ca89c0361a39c785fa4560fda275052f
[ "MIT" ]
28
2019-12-01T21:45:28.000Z
2021-05-05T17:46:09.000Z
notify/handlers.py
marzocchi/iterm-notify
5e587213ca89c0361a39c785fa4560fda275052f
[ "MIT" ]
null
null
null
notify/handlers.py
marzocchi/iterm-notify
5e587213ca89c0361a39c785fa4560fda275052f
[ "MIT" ]
2
2020-08-04T12:55:04.000Z
2020-12-20T22:23:47.000Z
import logging from datetime import datetime from typing import List from notify.backends import BackendFactory from notify.commands import Command from notify.config import Config, Stack from notify.notifications import Factory, Notification from notify.strategies import StrategyFactory class MaintainConfig: de...
42.091549
115
0.736657
5,678
0.949975
0
0
0
0
0
0
41
0.00686
23b5a122ef2746145b44e7be72e1b2d49508e86c
254
py
Python
submissions/Coomber/myLogic.py
omarmartinez97/aima-python
c8d5aa86382fb72e9ddec4938706599fee439bbb
[ "MIT" ]
null
null
null
submissions/Coomber/myLogic.py
omarmartinez97/aima-python
c8d5aa86382fb72e9ddec4938706599fee439bbb
[ "MIT" ]
null
null
null
submissions/Coomber/myLogic.py
omarmartinez97/aima-python
c8d5aa86382fb72e9ddec4938706599fee439bbb
[ "MIT" ]
null
null
null
technology = { 'kb': ''' Oculus(rift) HTC(vive) VR(Zuck, rift) VR(Gabe, vive) (Oculus(O) & HTC(H)) ==> Dominates(H, O) (VR(V)) ==> Technology(T) ''', 'queries':''' VR(x) Dominates(x, y) ''', } Examples = { 'technology': technology, }
14.111111
40
0.527559
0
0
0
0
0
0
0
0
189
0.744094
23b703b6cabe1962c636f6a2c79308b98c38c1a8
817
py
Python
postag/resolver.py
MineRobber9000/postag
d905f44f8ba975df06cc21aaf1fc425cf53e039f
[ "MIT" ]
null
null
null
postag/resolver.py
MineRobber9000/postag
d905f44f8ba975df06cc21aaf1fc425cf53e039f
[ "MIT" ]
null
null
null
postag/resolver.py
MineRobber9000/postag
d905f44f8ba975df06cc21aaf1fc425cf53e039f
[ "MIT" ]
null
null
null
class Resolver: def __init__(self): self.resolvers = [] def addResolver(self,res,priority): self.resolvers.append(dict(resolver=res,priority=priority)) self.resolvers.sort(key=lambda x: x["priority"]) def resolve(self,name): for r in [x["resolver"] for x in self.resolvers[::-1]]: success,result = r(name) ...
26.354839
61
0.70869
812
0.99388
0
0
0
0
0
0
48
0.058752
23ba2ecb3b446799d3bd04447ada1a6c88421c82
8,113
py
Python
sdk/python/feast/loaders/ingest.py
wzpy/feast
06fe09b7047fe370cbf63555cec1ba820f1e7267
[ "Apache-2.0" ]
1
2019-12-12T13:21:56.000Z
2019-12-12T13:21:56.000Z
sdk/python/feast/loaders/ingest.py
wzpy/feast
06fe09b7047fe370cbf63555cec1ba820f1e7267
[ "Apache-2.0" ]
null
null
null
sdk/python/feast/loaders/ingest.py
wzpy/feast
06fe09b7047fe370cbf63555cec1ba820f1e7267
[ "Apache-2.0" ]
null
null
null
import logging import multiprocessing import os import time from functools import partial from multiprocessing import Process, Queue, Pool from typing import Iterable import pandas as pd import pyarrow as pa from feast.feature_set import FeatureSet from feast.type_map import convert_dict_to_proto_values from feast.type...
31.815686
103
0.646986
0
0
1,236
0.152348
0
0
0
0
3,334
0.410945
23bb7ae2de638bcc64e1ae2469bf78db888b942c
389
py
Python
1stRound/Easy/389 Find the Difference/Counter.py
ericchen12377/Leetcode-Algorithm-Python
eb58cd4f01d9b8006b7d1a725fc48910aad7f192
[ "MIT" ]
2
2020-04-24T18:36:52.000Z
2020-04-25T00:15:57.000Z
1stRound/Easy/389 Find the Difference/Counter.py
ericchen12377/Leetcode-Algorithm-Python
eb58cd4f01d9b8006b7d1a725fc48910aad7f192
[ "MIT" ]
null
null
null
1stRound/Easy/389 Find the Difference/Counter.py
ericchen12377/Leetcode-Algorithm-Python
eb58cd4f01d9b8006b7d1a725fc48910aad7f192
[ "MIT" ]
null
null
null
import collections class Solution: def findTheDifference(self, s, t): """ :type s: str :type t: str :rtype: str """ scount, tcount = collections.Counter(s), collections.Counter(t) for t in tcount: if tcount[t] > scount[t]: return t ...
24.3125
71
0.539846
300
0.771208
0
0
0
0
0
0
90
0.231362
23bbe8dfe70d77ea6c966fa54a0f12dbc414a437
16,580
py
Python
sdk/python/pulumi_azure/lb/backend_address_pool_address.py
henriktao/pulumi-azure
f1cbcf100b42b916da36d8fe28be3a159abaf022
[ "ECL-2.0", "Apache-2.0" ]
109
2018-06-18T00:19:44.000Z
2022-02-20T05:32:57.000Z
sdk/python/pulumi_azure/lb/backend_address_pool_address.py
henriktao/pulumi-azure
f1cbcf100b42b916da36d8fe28be3a159abaf022
[ "ECL-2.0", "Apache-2.0" ]
663
2018-06-18T21:08:46.000Z
2022-03-31T20:10:11.000Z
sdk/python/pulumi_azure/lb/backend_address_pool_address.py
henriktao/pulumi-azure
f1cbcf100b42b916da36d8fe28be3a159abaf022
[ "ECL-2.0", "Apache-2.0" ]
41
2018-07-19T22:37:38.000Z
2022-03-14T10:56:26.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
47.643678
282
0.68076
16,127
0.972678
0
0
13,739
0.828649
0
0
8,985
0.541918
23bd05e550888fff887e56ad22915b9704444c37
4,136
py
Python
submission.py
Amar1729/Liked-Saved-Image-Downloader
48c17d8cb0cdce3bf7ebab16729510be11f51013
[ "MIT" ]
60
2015-12-04T20:11:23.000Z
2019-03-17T20:00:56.000Z
submission.py
Amar1729/Liked-Saved-Image-Downloader
48c17d8cb0cdce3bf7ebab16729510be11f51013
[ "MIT" ]
68
2019-03-22T01:07:32.000Z
2021-07-02T04:48:57.000Z
submission.py
Amar1729/Liked-Saved-Image-Downloader
48c17d8cb0cdce3bf7ebab16729510be11f51013
[ "MIT" ]
19
2015-09-15T17:30:29.000Z
2019-03-17T18:05:30.000Z
# -*- coding: utf-8 -*- import pickle import os # third-party imports import jsonpickle class Submission: def __init__(self): # Source is either Tumblr or Reddit self.source = u'' self.title = u'' self.author = u'' self.subreddit = u'' self.subredditTitle = u'' ...
30.637037
100
0.604691
2,175
0.52587
109
0.026354
0
0
0
0
880
0.212766
23bd7796ce5dbbe94cd644365987adb6f71698db
191
py
Python
mtga_event_prize_level.py
everybodyeverybody/mtga_earnings_calculator
4be67e37299c122eba110eb07308426d8078c645
[ "MIT" ]
null
null
null
mtga_event_prize_level.py
everybodyeverybody/mtga_earnings_calculator
4be67e37299c122eba110eb07308426d8078c645
[ "MIT" ]
null
null
null
mtga_event_prize_level.py
everybodyeverybody/mtga_earnings_calculator
4be67e37299c122eba110eb07308426d8078c645
[ "MIT" ]
null
null
null
#!/usr/bin/env python3.7 from decimal import Decimal from collections import namedtuple EventPrizeLevel = namedtuple( "EventPrizeLevel", ["packs", "gems", "gold"], defaults=[0, 0, 0], )
23.875
69
0.712042
0
0
0
0
0
0
0
0
60
0.314136
23be2b4e5eb31b3f80e1bec885f51c83e38a6703
621
py
Python
mundo_1/desafios/desafio_028.py
lvfds/Curso_Python3
1afb7706553a1d21d3d97e061144c5f019ca9391
[ "MIT" ]
null
null
null
mundo_1/desafios/desafio_028.py
lvfds/Curso_Python3
1afb7706553a1d21d3d97e061144c5f019ca9391
[ "MIT" ]
null
null
null
mundo_1/desafios/desafio_028.py
lvfds/Curso_Python3
1afb7706553a1d21d3d97e061144c5f019ca9391
[ "MIT" ]
null
null
null
""" Escreva um programa que faça o computador 'Pensar' em um número inteiro entre 0 e 5 e peça para o usuário tentar descobrir qual foi o número escolhido pelo computador. """ from random import randint numero_gerado_aleatoriamente = randint(0,5) numero_digitado_pelo_usuario = int(input('Adivinhe qual número...
38.8125
107
0.772947
0
0
0
0
0
0
0
0
418
0.661392
23be77dcebe4a2a83f67827319e9327e25df75de
1,699
py
Python
exp/noise_features/models.py
WilliamCCHuang/GraphLIME
0f89bd67865c0b4b5a93becbc03273e55c15fc68
[ "MIT" ]
38
2020-06-07T14:44:11.000Z
2022-03-08T06:19:49.000Z
exp/noise_features/models.py
WilliamCCHuang/GraphLIME
0f89bd67865c0b4b5a93becbc03273e55c15fc68
[ "MIT" ]
9
2020-10-22T02:38:01.000Z
2022-03-15T09:53:30.000Z
exp/noise_features/models.py
WilliamCCHuang/GraphLIME
0f89bd67865c0b4b5a93becbc03273e55c15fc68
[ "MIT" ]
6
2021-03-04T21:32:34.000Z
2021-12-24T05:58:35.000Z
import torch.nn as nn import torch.nn.functional as F from torch_geometric.nn import GCNConv, GATConv class GCN(nn.Module): def __init__(self, input_dim, hidden_dim, output_dim, dropout=0.5): super(GCN, self).__init__() self.dropout = dropout self.conv1 = GCNConv(input_dim, hidd...
33.313725
116
0.575633
1,590
0.935845
0
0
0
0
0
0
0
0
23c09d19f8336af168a12e16ec8d400bf72a904d
7,740
py
Python
nscl/nn/scene_graph/scene_graph.py
OolongQian/NSCL-PyTorch-Release
4cf0a633ceeaa9d221d66e066ef7892c04cdf9eb
[ "MIT" ]
null
null
null
nscl/nn/scene_graph/scene_graph.py
OolongQian/NSCL-PyTorch-Release
4cf0a633ceeaa9d221d66e066ef7892c04cdf9eb
[ "MIT" ]
null
null
null
nscl/nn/scene_graph/scene_graph.py
OolongQian/NSCL-PyTorch-Release
4cf0a633ceeaa9d221d66e066ef7892c04cdf9eb
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # File : scene_graph.py # Author : Jiayuan Mao # Email : maojiayuan@gmail.com # Date : 07/19/2018 # # This file is part of NSCL-PyTorch. # Distributed under terms of the MIT license. """ Scene Graph generation. """ import os import torch import torch.nn as nn impo...
47.484663
120
0.588889
7,271
0.939406
0
0
0
0
0
0
1,295
0.167313
23c12f3233981fe353e6b9f38266cba0ebd64146
789
py
Python
roomcreator.py
ajaxalex5/MidYearProject
a399347cd8cb4b24cf1aeac4e11269a0a2109ddf
[ "MIT" ]
null
null
null
roomcreator.py
ajaxalex5/MidYearProject
a399347cd8cb4b24cf1aeac4e11269a0a2109ddf
[ "MIT" ]
null
null
null
roomcreator.py
ajaxalex5/MidYearProject
a399347cd8cb4b24cf1aeac4e11269a0a2109ddf
[ "MIT" ]
null
null
null
class Room (object): def __init__(self, name, xl, yl, layout): self.name = str(name) self.xl = int(xl) self.yl = int(yl) self.layout = layout def load_room_file(file): roomfile = open(file, "r") roomlist = [] linelist = [] for line in roomfile: linelist.ap...
24.65625
94
0.564005
178
0.225602
0
0
0
0
0
0
9
0.011407
23c22b89349457ba83481e99d719de420d9ae033
645
py
Python
sitemapparser/base_data.py
frasy/site-map-parser
7648b50a1e15777cf82a6916ef5cbb149c5e99df
[ "MIT" ]
1
2021-02-11T10:03:42.000Z
2021-02-11T10:03:42.000Z
sitemapparser/base_data.py
frasy/site-map-parser
7648b50a1e15777cf82a6916ef5cbb149c5e99df
[ "MIT" ]
2
2020-02-24T11:52:51.000Z
2021-07-05T19:38:55.000Z
sitemapparser/base_data.py
frasy/site-map-parser
7648b50a1e15777cf82a6916ef5cbb149c5e99df
[ "MIT" ]
4
2020-02-10T14:49:41.000Z
2021-05-07T14:41:32.000Z
import re from abc import ABCMeta from dateutil import parser class BaseData(metaclass=ABCMeta): def __init__(self): self._lastmod = None self._loc = None @property def lastmod(self): return self._lastmod @lastmod.setter def lastmod(self, value): self._lastmod = p...
22.241379
77
0.615504
580
0.899225
0
0
444
0.688372
0
0
38
0.058915
23c2c0ad760da305cb104343e55a702bf05d28ce
630
py
Python
nomad/tests/core/test_shortest_path_solver.py
romilbhardwaj/nomad
c6a8289872bfd07d1aa0b913f0aee7a2fccd5bf1
[ "MIT" ]
2
2019-02-06T19:47:48.000Z
2019-10-30T07:30:14.000Z
nomad/tests/core/test_shortest_path_solver.py
romilbhardwaj/nomad
c6a8289872bfd07d1aa0b913f0aee7a2fccd5bf1
[ "MIT" ]
6
2019-03-21T18:29:04.000Z
2019-04-11T18:31:34.000Z
nomad/tests/core/test_shortest_path_solver.py
romilbhardwaj/nomad
c6a8289872bfd07d1aa0b913f0aee7a2fccd5bf1
[ "MIT" ]
null
null
null
import unittest import networkx as nx from core.placement.spsolver import DPShortestPathSolver class TestShorthestPathSolverMethods(unittest.TestCase): def setUp(self): self.g1 = nx.read_weighted_edgelist('tests/test-graph_1.txt', create_using=nx.MultiDiGraph, nodetype=int) def test_shortest_path(self...
30
113
0.680952
476
0.755556
0
0
0
0
0
0
34
0.053968
23c38e57ef816e8a8c15f2598a7fb8639340906e
1,285
py
Python
Leetcode/medium/integer-break.py
jen-sjen/data-structures-basics-leetcode
addac32974b16e0a37aa60c210ab7820b349b279
[ "MIT" ]
6
2021-07-29T03:26:20.000Z
2022-01-28T15:11:45.000Z
Leetcode/medium/integer-break.py
jen-sjen/data-structures-basics-leetcode
addac32974b16e0a37aa60c210ab7820b349b279
[ "MIT" ]
2
2021-09-30T09:47:23.000Z
2022-01-31T03:08:24.000Z
Leetcode/medium/integer-break.py
jen-sjen/data-structures-basics-leetcode
addac32974b16e0a37aa60c210ab7820b349b279
[ "MIT" ]
5
2021-08-10T06:41:11.000Z
2022-01-29T17:50:20.000Z
""" # INTEGER BREAK Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get. Example 1: Input: 2 Output: 1 Explanation: 2 = 1 + 1, 1 × 1 = 1. Example 2: Input: 10 Output: 36 Explanation: 10 = 3 + 3 + 4, ...
26.770833
167
0.525292
864
0.670807
0
0
0
0
0
0
554
0.430124
23c54e92e07439e85887d70b0a443815fb516d17
1,112
py
Python
setup.py
daien/camocomp
aa2c1b6dd2cfe1eb166047b52d75ade5b6b8b554
[ "BSD-3-Clause" ]
27
2015-03-06T05:50:35.000Z
2021-03-01T07:54:03.000Z
setup.py
daien/camocomp
aa2c1b6dd2cfe1eb166047b52d75ade5b6b8b554
[ "BSD-3-Clause" ]
2
2015-02-05T14:59:07.000Z
2016-02-19T00:18:52.000Z
setup.py
daien/camocomp
aa2c1b6dd2cfe1eb166047b52d75ade5b6b8b554
[ "BSD-3-Clause" ]
13
2015-01-25T12:43:42.000Z
2019-11-25T17:46:42.000Z
#!/usr/bin/env python from distutils.core import setup SHORT_DESCR = "CAmera MOtion COMPensation using image stiching techniques to generate stabilized videos" try: LONG_DESCR = open('README.rst').read() except IOError: LONG_DESCR = SHORT_DESCR setup( name='camocomp', version='0.1', author='Adri...
30.054054
104
0.660072
0
0
0
0
0
0
0
0
633
0.569245
23c622f1dbca6b4b9f0f05bf93b50ad3b73a9109
408
py
Python
qiang00_before_project/qiang02_the_template/q02_add_template_filter.py
13528770807/flask_project
2930db1d59763b155f758ad4061a70d413bfc34d
[ "MIT" ]
null
null
null
qiang00_before_project/qiang02_the_template/q02_add_template_filter.py
13528770807/flask_project
2930db1d59763b155f758ad4061a70d413bfc34d
[ "MIT" ]
null
null
null
qiang00_before_project/qiang02_the_template/q02_add_template_filter.py
13528770807/flask_project
2930db1d59763b155f758ad4061a70d413bfc34d
[ "MIT" ]
null
null
null
from flask import Flask, render_template app = Flask(__name__) @app.route('/') def index(): li = [1, 2, 3, 4, 5, 6, 7] return render_template('filter.html', li=li) @app.template_filter('li_rv2') # 添加过滤器 方法二 def li_reverse(li): res = list(li) res.reverse() return res # app.add_template_filter...
17
59
0.647059
0
0
0
0
239
0.543182
0
0
136
0.309091
23c6a65b4e2832bc68e0d04d1fcc2bd1ed8f0280
801
py
Python
smps/rcmod.py
BenjiStomps/py-smps
c449bbfcd748203630bc0aecf2552c8d836f827c
[ "MIT" ]
16
2017-02-22T02:26:41.000Z
2021-04-05T10:28:02.000Z
smps/rcmod.py
BenjiStomps/py-smps
c449bbfcd748203630bc0aecf2552c8d836f827c
[ "MIT" ]
22
2017-02-27T21:50:45.000Z
2021-05-21T02:31:35.000Z
smps/rcmod.py
BenjiStomps/py-smps
c449bbfcd748203630bc0aecf2552c8d836f827c
[ "MIT" ]
8
2017-09-30T09:50:44.000Z
2021-05-20T22:29:54.000Z
"""""" import matplotlib as mpl __all__ = ["set"] def set(tick_scale=1, rc=dict()): """ Control plot style and scaling using seaborn and the matplotlib rcParams interface. :param tick_scale: A scaler number controling the spacing on tick marks, defaults to 1. :type tick_scale: floa...
26.7
62
0.601748
0
0
0
0
0
0
0
0
475
0.593009
23c7aeb8b7efffbb30d83d454153984dd31f2ff4
169
py
Python
Chapter 04/Chap04_Example4.28.py
Anancha/Programming-Techniques-using-Python
e80c329d2a27383909d358741a5cab03cb22fd8b
[ "MIT" ]
null
null
null
Chapter 04/Chap04_Example4.28.py
Anancha/Programming-Techniques-using-Python
e80c329d2a27383909d358741a5cab03cb22fd8b
[ "MIT" ]
null
null
null
Chapter 04/Chap04_Example4.28.py
Anancha/Programming-Techniques-using-Python
e80c329d2a27383909d358741a5cab03cb22fd8b
[ "MIT" ]
null
null
null
# M1 def mul1(a1): return lambda b1:b1*a1 myresult = mul1(3) print(myresult(7)) #M-2 mul = lambda a = 3: (lambda b: a*b) myres = mul() print(myres) print(myres(7))
14.083333
35
0.633136
0
0
0
0
0
0
0
0
8
0.047337
23c87c4cfb4e5c6fd8c9ed42a1f9fee075d07137
414
py
Python
tools/generate_taint_models/parameter.py
terrorizer1980/pyre-check
16659c7f6f19f3c364ba3a56e6c582371a8ff348
[ "MIT" ]
1
2020-08-08T16:01:55.000Z
2020-08-08T16:01:55.000Z
tools/generate_taint_models/parameter.py
terrorizer1980/pyre-check
16659c7f6f19f3c364ba3a56e6c582371a8ff348
[ "MIT" ]
4
2022-02-15T02:42:33.000Z
2022-02-28T01:30:07.000Z
tools/generate_taint_models/parameter.py
terrorizer1980/pyre-check
16659c7f6f19f3c364ba3a56e6c582371a8ff348
[ "MIT" ]
1
2020-11-22T12:08:51.000Z
2020-11-22T12:08:51.000Z
from enum import Enum, auto from typing import NamedTuple, Optional class Parameter(NamedTuple): class Kind(Enum): ARG = auto() VARARG = auto() KWARG = auto() name: str annotation: Optional[str] kind: Kind def __eq__(self, other: "Parameter") -> bool: if not isins...
21.789474
49
0.611111
343
0.828502
0
0
0
0
0
0
11
0.02657
23c9d0fc017e203c468d9f46add866be9898f0bd
2,961
py
Python
abqPython_SvM_3_SaveODB.py
jtipton2/abaqusSignedvM
83f0577b6a3eab6d3c86a46ae110a94a7075981c
[ "BSD-3-Clause" ]
2
2022-03-16T13:50:21.000Z
2022-03-27T15:14:09.000Z
abqPython_SvM_3_SaveODB.py
jtipton2/abaqusSignedvM
83f0577b6a3eab6d3c86a46ae110a94a7075981c
[ "BSD-3-Clause" ]
null
null
null
abqPython_SvM_3_SaveODB.py
jtipton2/abaqusSignedvM
83f0577b6a3eab6d3c86a46ae110a94a7075981c
[ "BSD-3-Clause" ]
2
2021-07-18T03:10:12.000Z
2022-03-27T15:14:11.000Z
# -*- coding: utf-8 -*- import numpy as np from odbAccess import * from abaqusConstants import * filename = 'Job-4e-SS-Pulse' """ LOAD DATA =============================================================================== """ results = np.load(filename + '.npz') vonMisesMax = results['vonMisesMax'].transpose() vonMis...
37.961538
150
0.660588
0
0
0
0
0
0
0
0
844
0.285039
23cbfc7fdcdcf980a0e3a9a727e48fece2483a0e
7,014
py
Python
ssh.py
unazed/Py-s-SH
c20d883f75f094c71386e62cbfa8197120c641fc
[ "MIT" ]
null
null
null
ssh.py
unazed/Py-s-SH
c20d883f75f094c71386e62cbfa8197120c641fc
[ "MIT" ]
null
null
null
ssh.py
unazed/Py-s-SH
c20d883f75f094c71386e62cbfa8197120c641fc
[ "MIT" ]
null
null
null
""" SSH reimplementation in Python, made by Unazed Spectaculum under the MIT license """ import socket import struct class SSH(object): """ Abstracted interface for secure-shell protocol with underlying TCP structure """ def __init__(self, host_ip, hostname, host_port=22, version="SSH-2.0"): ...
44.675159
120
0.681637
6,893
0.982749
243
0.034645
5,451
0.77716
0
0
1,033
0.147277
23ce177acd70b69372b2d3dd196d4ee81ee251d0
1,140
py
Python
seriously/probably_prime.py
Mego/Seriously
07b256e4f35f5efec3b01434300f9ccc551b1c3e
[ "MIT" ]
104
2015-11-02T00:08:32.000Z
2022-02-17T23:17:14.000Z
seriously/probably_prime.py
Mego/Seriously
07b256e4f35f5efec3b01434300f9ccc551b1c3e
[ "MIT" ]
68
2015-11-09T05:33:24.000Z
2020-04-10T06:46:54.000Z
seriously/probably_prime.py
Mego/Seriously
07b256e4f35f5efec3b01434300f9ccc551b1c3e
[ "MIT" ]
25
2015-11-19T05:34:09.000Z
2021-07-20T13:54:03.000Z
import random def find_spelling(n): """ Finds d, r s.t. n-1 = 2^r * d """ r = 0 d = n - 1 # divmod used for large numbers quotient, remainder = divmod(d, 2) # while we can still divide 2's into n-1... while remainder != 1: r += 1 d = quotient # previo...
24.782609
89
0.497368
0
0
0
0
0
0
0
0
425
0.372807
23ce1db523427cb59d90dd66571f9536a6eda982
4,859
py
Python
home/moz4r/Marty/marty_customInmoov.py
rv8flyboy/pyrobotlab
4e04fb751614a5cb6044ea15dcfcf885db8be65a
[ "Apache-2.0" ]
63
2015-02-03T18:49:43.000Z
2022-03-29T03:52:24.000Z
home/moz4r/Marty/marty_customInmoov.py
rv8flyboy/pyrobotlab
4e04fb751614a5cb6044ea15dcfcf885db8be65a
[ "Apache-2.0" ]
16
2016-01-26T19:13:29.000Z
2018-11-25T21:20:51.000Z
home/moz4r/Marty/marty_customInmoov.py
rv8flyboy/pyrobotlab
4e04fb751614a5cb6044ea15dcfcf885db8be65a
[ "Apache-2.0" ]
151
2015-01-03T18:55:54.000Z
2022-03-04T07:04:23.000Z
#MARTY I2C PI #SCRIPT BASED ON MATS WORK #SCRIPT PUSHED INSIDE inmoovCustom : https://github.com/MyRobotLab/inmoov/tree/master/InmoovScript raspi = Runtime.createAndStart("RasPi","RasPi") adaFruit16c = Runtime.createAndStart("AdaFruit16C","Adafruit16CServoDriver") adaFruit16c.setController("RasPi","1","0x40") # # This...
22.919811
98
0.787611
0
0
0
0
0
0
0
0
631
0.129862
23ce6753d608fd795d0aebbaec8257e2469df9e3
7,214
py
Python
tabular_experiments_supp_mat.py
juliendelaunay35000/APE-Adapted_Post-Hoc_Explanations
991c4cf6153fafef4200732a5ef8ac93f1175f27
[ "MIT" ]
null
null
null
tabular_experiments_supp_mat.py
juliendelaunay35000/APE-Adapted_Post-Hoc_Explanations
991c4cf6153fafef4200732a5ef8ac93f1175f27
[ "MIT" ]
null
null
null
tabular_experiments_supp_mat.py
juliendelaunay35000/APE-Adapted_Post-Hoc_Explanations
991c4cf6153fafef4200732a5ef8ac93f1175f27
[ "MIT" ]
null
null
null
from sklearn import tree, svm from sklearn.neural_network import MLPClassifier from sklearn.multiclass import OneVsRestClassifier from sklearn.ensemble import GradientBoostingClassifier, RandomForestClassifier, VotingClassifier from sklearn.linear_model import LogisticRegression, RidgeClassifier from sklearn.naive_baye...
59.131148
182
0.624896
0
0
0
0
0
0
0
0
1,590
0.220405
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 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...
47.087209
118
0.548463
0
0
0
0
0
0
0
0
1,537
0.189777
23cf8e518be1c460ad577e7a202dfb564e60b6c9
247
py
Python
os/excel and csv/save pandas to xlsx file.py
pydeveloper510/Python
2e3cf5f9d132fbc6dd8c41a96166b6e879d86e0d
[ "MIT" ]
3
2021-04-23T08:04:14.000Z
2021-05-08T01:24:08.000Z
os/excel and csv/save pandas to xlsx file.py
pydeveloper510/Python
2e3cf5f9d132fbc6dd8c41a96166b6e879d86e0d
[ "MIT" ]
null
null
null
os/excel and csv/save pandas to xlsx file.py
pydeveloper510/Python
2e3cf5f9d132fbc6dd8c41a96166b6e879d86e0d
[ "MIT" ]
1
2021-05-08T01:24:46.000Z
2021-05-08T01:24:46.000Z
import pandas as pd writer = pd.ExcelWriter("data.xlsx", engine='xlsxwriter') df.to_excel(writer, sheet_name='Sheet1', index=False) # Get the xlsxwriter workbook and worksheet objects. workbook = writer.book worksheet = writer.sheets['Sheet1']
24.7
57
0.765182
0
0
0
0
0
0
0
0
91
0.368421
23cf95b3c49a497e9b4fcecf5c43de957206031c
1,564
py
Python
setup.py
nitehawck/DevEnvManager
425b0d621be577fe73f22b4641f7099eac65669e
[ "MIT" ]
1
2016-05-16T23:13:47.000Z
2016-05-16T23:13:47.000Z
setup.py
nitehawck/DevEnvManager
425b0d621be577fe73f22b4641f7099eac65669e
[ "MIT" ]
41
2016-01-22T00:56:14.000Z
2016-05-12T14:38:37.000Z
setup.py
nitehawck/DevEnvManager
425b0d621be577fe73f22b4641f7099eac65669e
[ "MIT" ]
null
null
null
from setuptools import setup with open('README.rst') as f: readme = f.read() setup( name="dem", version="0.0.8", author="Ian Macaulay, Jeremy Opalach", author_email="ismacaul@gmail.com", url="http://www.github.com/nitehawck/dem", description="An agnostic library/package manager for setting...
31.28
103
0.575448
0
0
0
0
0
0
0
0
967
0.618286
23d1de5c4b1de87a253332547b768f99517edb24
326
py
Python
lfs/core/admin.py
restless/django-lfs
4058f9d45b416ef2e8c28a87856ea0f1550b523d
[ "BSD-3-Clause" ]
1
2020-02-26T03:07:39.000Z
2020-02-26T03:07:39.000Z
lfs/core/admin.py
mxins/django-lfs
bf42ed80ce0e1ec96db6ab985adcc614ea79dfc8
[ "BSD-3-Clause" ]
null
null
null
lfs/core/admin.py
mxins/django-lfs
bf42ed80ce0e1ec96db6ab985adcc614ea79dfc8
[ "BSD-3-Clause" ]
null
null
null
# django imports from django.contrib import admin # lfs imports from lfs.core.models import Action from lfs.core.models import ActionGroup from lfs.core.models import Shop from lfs.core.models import Country admin.site.register(Shop) admin.site.register(Action) admin.site.register(ActionGroup) admin.site.register(Cou...
23.285714
39
0.819018
0
0
0
0
0
0
0
0
29
0.088957