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
607f482de3979ae3f1e14134f8ff6f16b946d08b
2,182
py
Python
utils/convert_to_xz.py
glebkuznetsov/cloudbiolinux
ec47b90ce72f6cd1bc4e5422231f19d41378b122
[ "MIT" ]
122
2015-01-04T13:23:27.000Z
2022-01-18T22:52:12.000Z
utils/convert_to_xz.py
glebkuznetsov/cloudbiolinux
ec47b90ce72f6cd1bc4e5422231f19d41378b122
[ "MIT" ]
170
2015-02-09T18:03:49.000Z
2021-11-14T02:32:09.000Z
utils/convert_to_xz.py
glebkuznetsov/cloudbiolinux
ec47b90ce72f6cd1bc4e5422231f19d41378b122
[ "MIT" ]
107
2015-01-06T06:10:04.000Z
2022-02-10T17:25:34.000Z
#!/usr/bin/env python """Convert gzipped files on s3 biodata to xz compression format. This conversion is designed to save time and space for download. Some download utilities to speed things up: axel, aria2, lftp """ if __name__ == "__main__": bucket_name = "biodata" main(bucket_name)
34.634921
85
0.64253
#!/usr/bin/env python """Convert gzipped files on s3 biodata to xz compression format. This conversion is designed to save time and space for download. Some download utilities to speed things up: axel, aria2, lftp """ import os import sys import socket import subprocess import boto import fabric.api as fabric def m...
0
0
0
0
0
1,698
0
-39
225
ef8c27e1cefe34dc5b34a9efd165229c09281d61
8,381
py
Python
wyze_sdk/service/scale_service.py
RebelTat/wyze-sdk
249b1df71e80c97fc2e5fb5977431b887f7361c2
[ "Unlicense" ]
132
2021-05-03T12:33:58.000Z
2022-03-31T18:03:26.000Z
wyze_sdk/service/scale_service.py
RebelTat/wyze-sdk
249b1df71e80c97fc2e5fb5977431b887f7361c2
[ "Unlicense" ]
51
2021-05-01T20:24:20.000Z
2022-03-30T20:37:05.000Z
wyze_sdk/service/scale_service.py
RebelTat/wyze-sdk
249b1df71e80c97fc2e5fb5977431b887f7361c2
[ "Unlicense" ]
21
2021-05-05T14:01:38.000Z
2022-03-29T02:58:39.000Z
from __future__ import annotations
40.293269
206
0.635485
from __future__ import annotations from datetime import datetime from typing import Optional, Sequence, Tuple, Union from wyze_sdk.models import datetime_to_epoch from .base import ExServiceClient, WyzeResponse class ScaleServiceClient(ExServiceClient): """ Scale service client is the wrapper on the reques...
0
0
0
8,143
0
0
0
88
114
9a240829f2fd3ac6b2f5b53c6e23ecb372c84fb8
2,343
py
Python
api/migrations/0001_initial.py
lirandepira/winccoa-web
cf1eef22937956c46bbc4ef0e0ab1cc88cdea4b1
[ "MIT" ]
null
null
null
api/migrations/0001_initial.py
lirandepira/winccoa-web
cf1eef22937956c46bbc4ef0e0ab1cc88cdea4b1
[ "MIT" ]
null
null
null
api/migrations/0001_initial.py
lirandepira/winccoa-web
cf1eef22937956c46bbc4ef0e0ab1cc88cdea4b1
[ "MIT" ]
null
null
null
# Generated by Django 2.0.7 on 2018-07-06 14:37
42.6
114
0.556978
# Generated by Django 2.0.7 on 2018-07-06 14:37 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Elements', fields=[ ...
0
0
0
2,196
0
0
0
30
68
7d6eb927a7acd0fcfeabf330830474d337f8fc64
429
py
Python
setup.py
msaltz96/wigs
35b6bedbac670d48a5d0b088f681daf38756abfa
[ "Apache-2.0" ]
null
null
null
setup.py
msaltz96/wigs
35b6bedbac670d48a5d0b088f681daf38756abfa
[ "Apache-2.0" ]
null
null
null
setup.py
msaltz96/wigs
35b6bedbac670d48a5d0b088f681daf38756abfa
[ "Apache-2.0" ]
null
null
null
from setuptools import setup, find_packages setup( name="pre_wigs_validation", version="0.1.0", description="Pre-WIG Validator for Linux", author="steno", author_email="steno@amazon.com", packages=find_packages(exclude=["tests"]), include_package_data=True, install_requires=...
28.6
74
0.682984
from setuptools import setup, find_packages setup( name="pre_wigs_validation", version="0.1.0", description="Pre-WIG Validator for Linux", author="steno", author_email="steno@amazon.com", packages=find_packages(exclude=["tests"]), include_package_data=True, install_requires=...
0
0
0
0
0
0
0
0
0
07391be648f1e47b967aff8fdaf3134d1e0d69b5
54,550
py
Python
OED/cnn_seq2seq.py
adrianomundo/II2202-research-methodology-scientific-writing
39a7a07e1dabbd988f9b3e0c5c41a36a6d292df8
[ "Apache-2.0" ]
1
2021-01-30T11:03:05.000Z
2021-01-30T11:03:05.000Z
OED/cnn_seq2seq.py
adrianomundo/II2202-research-methodology-scientific-writing
39a7a07e1dabbd988f9b3e0c5c41a36a6d292df8
[ "Apache-2.0" ]
null
null
null
OED/cnn_seq2seq.py
adrianomundo/II2202-research-methodology-scientific-writing
39a7a07e1dabbd988f9b3e0c5c41a36a6d292df8
[ "Apache-2.0" ]
null
null
null
import sys import numpy as np if __name__ == '__main__': batch_num = 1 hidden_num = 4 # step_num = 8 iteration = 30 ensemble_space = 10 learning_rate = 1e-3 multivariate = True partition = True save_model = False try: sys.argv[1] except IndexError: for n i...
60.949721
201
0.486893
import pathlib import sys import tensorflow as tf import numpy as np from tensorflow.python.ops import init_ops from tensorflow.python.ops.rnn_cell_impl import _Linear, LSTMStateTuple from tensorflow.python.ops import variable_scope as vs from utils import * def conv1d_relu(_x, _w, _b): return tf.nn.relu(tf.nn.bi...
0
0
0
0
0
5,232
0
97
225
7c3a1e64eb7f90975d8a37e4689e534e9971ded6
9,746
py
Python
tests/parsers/sqlite_plugins/firefox.py
Defense-Cyber-Crime-Center/plaso
4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47
[ "Apache-2.0" ]
2
2016-02-18T12:46:29.000Z
2022-03-13T03:04:59.000Z
tests/parsers/sqlite_plugins/firefox.py
Defense-Cyber-Crime-Center/plaso
4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47
[ "Apache-2.0" ]
null
null
null
tests/parsers/sqlite_plugins/firefox.py
Defense-Cyber-Crime-Center/plaso
4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47
[ "Apache-2.0" ]
6
2016-12-18T08:05:36.000Z
2021-04-06T14:19:11.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the Mozilla Firefox history database plugin.""" import unittest if __name__ == '__main__': unittest.main()
37.057034
80
0.736199
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the Mozilla Firefox history database plugin.""" import collections import unittest from plaso.formatters import firefox as _ # pylint: disable=unused-import from plaso.lib import eventdata from plaso.lib import timelib from plaso.parsers import sqlite from plaso...
0
0
0
9,241
0
0
0
101
236
b2ca930e892e3b76aaffe81353c72803618798b2
1,826
py
Python
mgz/body/embedded.py
Namek/aoc-mgz
0c8196dccb550a48ecc375d7861138ef88b53716
[ "MIT" ]
117
2015-03-07T10:55:58.000Z
2022-03-18T18:22:01.000Z
mgz/body/embedded.py
Namek/aoc-mgz
0c8196dccb550a48ecc375d7861138ef88b53716
[ "MIT" ]
71
2015-10-02T00:05:07.000Z
2022-03-25T16:47:56.000Z
mgz/body/embedded.py
Namek/aoc-mgz
0c8196dccb550a48ecc375d7861138ef88b53716
[ "MIT" ]
41
2015-03-07T02:50:59.000Z
2021-09-13T06:16:12.000Z
"""Embedded Structures. Various structure can be embedded in the body, without an operation header. Saved Chapters: A saved chapter is a header structure embedded in the body. There is no command identifier, so the command type is actually the first field of the header - length/offset. Applying the `subheader` struc...
25.71831
77
0.651698
"""Embedded Structures. Various structure can be embedded in the body, without an operation header. Saved Chapters: A saved chapter is a header structure embedded in the body. There is no command identifier, so the command type is actually the first field of the header - length/offset. Applying the `subheader` struc...
0
0
0
0
0
0
0
23
0
20fab8022fd83af53ea7e0c5365056dc64940d56
302
py
Python
Alphabet/Small_Alphabet/Static_Small_Letters_For_Loop/FOR_LOOP_p.py
Polamreddykrishnareddy/PatternPackage
893ab468a637cd70a0dd8f6d60f7f5c75a3db58f
[ "MIT" ]
null
null
null
Alphabet/Small_Alphabet/Static_Small_Letters_For_Loop/FOR_LOOP_p.py
Polamreddykrishnareddy/PatternPackage
893ab468a637cd70a0dd8f6d60f7f5c75a3db58f
[ "MIT" ]
null
null
null
Alphabet/Small_Alphabet/Static_Small_Letters_For_Loop/FOR_LOOP_p.py
Polamreddykrishnareddy/PatternPackage
893ab468a637cd70a0dd8f6d60f7f5c75a3db58f
[ "MIT" ]
null
null
null
#p for row in range(13): for col in range(6): if (col==0 or row==0 and col!=5) or (row==1 and col==5)or (row==2 and col==5)or (row==3 and col==5)or (row==4 and col==5) or (row==5 and col!=5):#p print("*",end=" ") else: print(" ",end=" ") print()
33.555556
156
0.463576
#p for row in range(13): for col in range(6): if (col==0 or row==0 and col!=5) or (row==1 and col==5)or (row==2 and col==5)or (row==3 and col==5)or (row==4 and col==5) or (row==5 and col!=5):#p print("*",end=" ") else: print(" ",end=" ") print()
0
0
0
0
0
0
0
0
0
51d712db70f6674f1a70dd0d199f6f41778c599a
2,014
py
Python
data_masking_methods/mask_the_info.py
GeorgeManakanatas/PPDM
9e6af80681db497447197cac14b26b99e588f231
[ "MIT", "Unlicense" ]
3
2016-11-18T07:24:39.000Z
2019-07-06T07:45:15.000Z
data_masking_methods/mask_the_info.py
GeorgeManakanatas/PPDM
9e6af80681db497447197cac14b26b99e588f231
[ "MIT", "Unlicense" ]
2
2017-02-14T15:24:34.000Z
2019-11-25T19:18:05.000Z
data_masking_methods/mask_the_info.py
GeorgeManakanatas/PPDM
9e6af80681db497447197cac14b26b99e588f231
[ "MIT", "Unlicense" ]
3
2017-12-19T07:04:24.000Z
2021-08-20T15:42:13.000Z
''' information masking section ''' import timeit from . import encrypt_the_info from . import null_the_info def masking_method_selection(start_dataframe, mask_col, mask_method, save_to_file, masked_file, logger): ''' Basic check that all input is properly provided and filtering t...
38.730769
79
0.695631
''' information masking section ''' import logging import timeit from . import encrypt_the_info from . import null_the_info def masking_method_selection(start_dataframe, mask_col, mask_method, save_to_file, masked_file, logger): ''' Basic check that all input is properly provided ...
0
0
0
0
0
0
0
-7
22
b7a2b031b62930c8b996cd893bd4bcce4bd6e6ea
2,398
py
Python
domains/deliver/problems/manual/problem5_OF.py
patras91/rae_release
0e5faffb7eb732fdb8e3bbf2c6d2f2cbd520aa30
[ "BSD-3-Clause" ]
1
2021-09-28T12:56:56.000Z
2021-09-28T12:56:56.000Z
domains/deliver/problems/manual/problem5_OF.py
patras91/rae_release
0e5faffb7eb732fdb8e3bbf2c6d2f2cbd520aa30
[ "BSD-3-Clause" ]
null
null
null
domains/deliver/problems/manual/problem5_OF.py
patras91/rae_release
0e5faffb7eb732fdb8e3bbf2c6d2f2cbd520aa30
[ "BSD-3-Clause" ]
1
2022-03-31T16:30:39.000Z
2022-03-31T16:30:39.000Z
__author__ = 'mason' from timer import DURATION ''' Several objects to choose from, need to consider weights Same as problem 4 but only 1 robot ''' DURATION.TIME = { 'lookupDB': GetCostOfLookup, 'wrap': GetCostOfWrap, 'pickup': GetCostOfPickup, 'putdown': GetCostOfPutdown, 'loadMachine': G...
24.469388
96
0.584654
__author__ = 'mason' from domain_orderFulfillment import * from timer import DURATION from state import state import numpy as np ''' Several objects to choose from, need to consider weights Same as problem 4 but only 1 robot ''' def GetCostOfMove(id, r, loc1, loc2, dist): return 1 + dist def GetCostOfLookup(i...
0
0
0
0
0
893
0
15
228
d682a95c426da85437977b5f33eeeb297e0afda2
1,754
py
Python
trackpal/visu.py
sommerc/trackpal
f62e6a4467af8a5988b5bce0c20872bc3e325cae
[ "BSD-3-Clause" ]
1
2022-01-10T16:48:23.000Z
2022-01-10T16:48:23.000Z
trackpal/visu.py
sommerc/trackpal
f62e6a4467af8a5988b5bce0c20872bc3e325cae
[ "BSD-3-Clause" ]
null
null
null
trackpal/visu.py
sommerc/trackpal
f62e6a4467af8a5988b5bce0c20872bc3e325cae
[ "BSD-3-Clause" ]
null
null
null
"""Track visualization""" from matplotlib import pyplot as plt def plot_trj( trj, coords=None, ax=None, scale=None, line_fmt="x:", line_color=None, line_label="Trajectory", line_width=None, marker_size=None, alpha=None, start_end=(True, True), ): """[summary] Args...
26.179104
98
0.566135
"""Track visualization""" from matplotlib import pyplot as plt def plot_trj( trj, coords=None, ax=None, scale=None, line_fmt="x:", line_color=None, line_label="Trajectory", line_width=None, marker_size=None, alpha=None, start_end=(True, True), ): """[summary] Args...
0
0
0
0
0
0
0
0
0
9ade5536cc926d194f758f83ecb6495530677c35
6,136
py
Python
src/gluonts/model/testutil.py
dotgc/gluon-ts
e14ad69058e58e1ce51c40551674318341781331
[ "Apache-2.0" ]
1
2021-08-03T09:09:31.000Z
2021-08-03T09:09:31.000Z
src/gluonts/model/testutil.py
Happiness20/gluon-ts
e14ad69058e58e1ce51c40551674318341781331
[ "Apache-2.0" ]
null
null
null
src/gluonts/model/testutil.py
Happiness20/gluon-ts
e14ad69058e58e1ce51c40551674318341781331
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
31.792746
79
0.636082
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
0
1,165
0
3,926
0
0
0
146
246
a55c169171ded7deb8167391e08f38271824a4d9
1,610
py
Python
examples/oauth.py
Code-in-the-House/foursquare_api
47f710802bad581d36c7e8ec28612bccf1f9fe41
[ "MIT" ]
null
null
null
examples/oauth.py
Code-in-the-House/foursquare_api
47f710802bad581d36c7e8ec28612bccf1f9fe41
[ "MIT" ]
null
null
null
examples/oauth.py
Code-in-the-House/foursquare_api
47f710802bad581d36c7e8ec28612bccf1f9fe41
[ "MIT" ]
null
null
null
import pyfoursquare as foursquare # == OAuth2 Authentication == # # This mode of authentication is the required one for Foursquare # The client id and client secret can be found on your application's Details # page located at https://foursquare.com/oauth/ client_id = "E50NJYAFUAPXPAKU5XQNBTXPGKRRSNUGAYWTUUH3RKJ22HH4"...
29.272727
76
0.77205
import pyfoursquare as foursquare # == OAuth2 Authentication == # # This mode of authentication is the required one for Foursquare # The client id and client secret can be found on your application's Details # page located at https://foursquare.com/oauth/ client_id = "E50NJYAFUAPXPAKU5XQNBTXPGKRRSNUGAYWTUUH3RKJ22HH4"...
0
0
0
0
0
0
0
0
0
2547d96a6a4b442bf0ff50913fed0095c52574cf
438
py
Python
Handin/handin2.py
thesombady/Fytb14
e630e8d9ff4512849d124426b5754b6b44d89069
[ "MIT" ]
null
null
null
Handin/handin2.py
thesombady/Fytb14
e630e8d9ff4512849d124426b5754b6b44d89069
[ "MIT" ]
null
null
null
Handin/handin2.py
thesombady/Fytb14
e630e8d9ff4512849d124426b5754b6b44d89069
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt mg = 10 xlist = np.linspace(0,np.pi/2,100) f1 = 3*mg/2*(np.sin(xlist)*np.cos(xlist)*3/2-np.cos(xlist)) f2 = 3*mg/2*(-np.sin(xlist)+(3*np.sin(xlist)**2-1)/2) + mg plt.plot(xlist, f1, '-', markersize=1, label = r"$F_x$") plt.plot(xlist, f2, '-', markersize=1, label = ...
24.333333
59
0.643836
import numpy as np import matplotlib.pyplot as plt mg = 10 xlist = np.linspace(0,np.pi/2,100) f1 = 3*mg/2*(np.sin(xlist)*np.cos(xlist)*3/2-np.cos(xlist)) f2 = 3*mg/2*(-np.sin(xlist)+(3*np.sin(xlist)**2-1)/2) + mg plt.plot(xlist, f1, '-', markersize=1, label = r"$F_x$") plt.plot(xlist, f2, '-', markersize=1, label = ...
0
0
0
0
0
0
0
0
0
c0d954c3b6047cbbc2c0a18b91acaa42bdc69750
1,323
py
Python
graphs/tests/test_graphs.py
Sewar-web/data-structures-and-algorithms1
d94f706fb3a30c114bd08a6c2d9b7ed269bc9a21
[ "MIT" ]
null
null
null
graphs/tests/test_graphs.py
Sewar-web/data-structures-and-algorithms1
d94f706fb3a30c114bd08a6c2d9b7ed269bc9a21
[ "MIT" ]
null
null
null
graphs/tests/test_graphs.py
Sewar-web/data-structures-and-algorithms1
d94f706fb3a30c114bd08a6c2d9b7ed269bc9a21
[ "MIT" ]
1
2021-06-26T09:19:43.000Z
2021-06-26T09:19:43.000Z
from graphs.graph import Graph graph = Graph()
22.810345
104
0.568405
from graphs import __version__ from graphs.graph import Vertix ,Edge,Graph def test_version(): assert __version__ == '0.1.0' graph = Graph() def test_add_node(): graph.add_node('a') assert graph.get_nodes()=={'a': []} def test_edge(): graph=Graph() graph.add_node('a') graph.add_node('b') ...
0
0
0
0
0
1,044
0
22
205
e065295369c34fdafb30ecef1f98567848098232
1,332
py
Python
core/test.py
fazilaltinel/pytorch-dann-resnet
fe6abb274065c26c918d71c38babe2ec894d8293
[ "MIT" ]
4
2021-02-08T10:32:48.000Z
2021-09-15T05:43:20.000Z
core/test.py
fazilaltinel/pytorch-dann-resnet
fe6abb274065c26c918d71c38babe2ec894d8293
[ "MIT" ]
null
null
null
core/test.py
fazilaltinel/pytorch-dann-resnet
fe6abb274065c26c918d71c38babe2ec894d8293
[ "MIT" ]
2
2021-02-25T20:17:41.000Z
2021-08-29T08:06:39.000Z
import torch.utils.data import torch.nn as nn def test(model, data_loader, device, loggi, flag): """Evaluate model for dataset.""" # set eval state for Dropout and BN layers model.eval() # init loss and accuracy loss_ = 0.0 acc_ = 0.0 acc_domain_ = 0.0 n_total = 0 # set loss funct...
29.6
149
0.605105
import torch.utils.data import torch.nn as nn def test(model, data_loader, device, loggi, flag): """Evaluate model for dataset.""" # set eval state for Dropout and BN layers model.eval() # init loss and accuracy loss_ = 0.0 acc_ = 0.0 acc_domain_ = 0.0 n_total = 0 # set loss funct...
0
0
0
0
0
0
0
0
0
ab16331c01263b1f5184c5ed899245585e948a04
6,467
py
Python
tests/licensedcode/data/datadriven/lic2/2206-misc-python/interval.py
s4-2/scancode-toolkit
8931b42e2630b94d0cabc834dfb3c16f01f82321
[ "Apache-2.0", "CC-BY-4.0" ]
1,511
2015-07-01T15:29:03.000Z
2022-03-30T13:40:05.000Z
tests/licensedcode/data/datadriven/lic2/2206-misc-python/interval.py
s4-2/scancode-toolkit
8931b42e2630b94d0cabc834dfb3c16f01f82321
[ "Apache-2.0", "CC-BY-4.0" ]
2,695
2015-07-01T16:01:35.000Z
2022-03-31T19:17:44.000Z
backend/env/lib/python3.7/site-packages/aniso8601/interval.py
US579/Seddit
116a676efd0fa31c8cc6fe4c723b739203d9428b
[ "MIT" ]
540
2015-07-01T15:08:19.000Z
2022-03-31T12:13:11.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2019, Brandon Nielsen # All rights reserved. # # This software may be modified and distributed under the terms # of the BSD license. See the LICENSE file for details.
40.41875
79
0.613422
# -*- coding: utf-8 -*- # Copyright (c) 2019, Brandon Nielsen # All rights reserved. # # This software may be modified and distributed under the terms # of the BSD license. See the LICENSE file for details. from aniso8601.builders import TupleBuilder from aniso8601.builders.python import PythonTimeBuilder from aniso...
0
0
0
0
0
5,914
0
142
202
ee4087c26b6609704e5da238bf4a0da044dbb850
1,602
py
Python
run.py
bri25yu/jiant
88a21a9fed7f5e9d6a42a8129d2c63a2f8e0f30a
[ "MIT" ]
null
null
null
run.py
bri25yu/jiant
88a21a9fed7f5e9d6a42a8129d2c63a2f8e0f30a
[ "MIT" ]
null
null
null
run.py
bri25yu/jiant
88a21a9fed7f5e9d6a42a8129d2c63a2f8e0f30a
[ "MIT" ]
null
null
null
import argparse if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("-t", "--task_name") parser.add_argument("-d", "--data_dir") parser.add_argument("-e", "--exp_dir") parser.add_argument("-m", "--model_name_or_path") parser.add_argument("-c", "--compression_typ...
25.83871
75
0.6598
import argparse from jiant.proj.simple import runscript as run import jiant.scripts.download_data.runscript as downloader def main( task_name, data_dir, exp_dir, model_name_or_path, compression_type, compression_config, learning_rate, seed, ): downloader.download_data([task_name],...
0
0
0
0
0
693
0
62
68
98670a49ae2d29567afb74eef9cd125362c57e38
10,350
py
Python
main/views.py
sirodoht/oscarator.com
5c20e38a0db4d8937e849e493c698767ce49d2ba
[ "MIT" ]
1
2022-02-16T21:47:20.000Z
2022-02-16T21:47:20.000Z
main/views.py
sirodoht/oscarator.com
5c20e38a0db4d8937e849e493c698767ce49d2ba
[ "MIT" ]
3
2022-02-16T13:40:59.000Z
2022-02-16T13:42:23.000Z
main/views.py
sirodoht/oscarator.com
5c20e38a0db4d8937e849e493c698767ce49d2ba
[ "MIT" ]
null
null
null
INTERNAL_RESET_URL_TOKEN = "confirmation" INTERNAL_RESET_SESSION_TOKEN = "_password_reset_token"
35.204082
129
0.608986
from django.contrib import messages from django.contrib.auth import authenticate, login as dj_login, logout as dj_logout from django.contrib.auth.decorators import login_required from django.contrib.auth.forms import ( AuthenticationForm, PasswordChangeForm, PasswordResetForm, SetPasswordForm, ) from dj...
0
9,289
0
0
0
0
0
482
472
101fcee678ce67d5dc1b945bc5521cc6e6232b86
98
py
Python
clitooltester/__init__.py
dfirlabs/clitooltester
ffe23b7b7458212d150390f476cda74e89fc97e1
[ "Apache-2.0" ]
null
null
null
clitooltester/__init__.py
dfirlabs/clitooltester
ffe23b7b7458212d150390f476cda74e89fc97e1
[ "Apache-2.0" ]
null
null
null
clitooltester/__init__.py
dfirlabs/clitooltester
ffe23b7b7458212d150390f476cda74e89fc97e1
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """Command line tool tester (CLIToolTester).""" __version__ = '20191217'
19.6
47
0.642857
# -*- coding: utf-8 -*- """Command line tool tester (CLIToolTester).""" __version__ = '20191217'
0
0
0
0
0
0
0
0
0
5c1f339722fbcdb5287bb5f5decebeea9ca758b7
331
py
Python
users/migrations/0004_remove_profile_user.py
piotrzegarek/Numerical-computational-Site
3c18ca1086135eddb23dfbe015882708e1e0c321
[ "MIT" ]
1
2021-12-03T15:51:49.000Z
2021-12-03T15:51:49.000Z
users/migrations/0004_remove_profile_user.py
piotrzegarek/Numerical-computational-Site
3c18ca1086135eddb23dfbe015882708e1e0c321
[ "MIT" ]
null
null
null
users/migrations/0004_remove_profile_user.py
piotrzegarek/Numerical-computational-Site
3c18ca1086135eddb23dfbe015882708e1e0c321
[ "MIT" ]
1
2021-12-03T15:52:37.000Z
2021-12-03T15:52:37.000Z
# Generated by Django 3.2.9 on 2021-12-20 20:36
18.388889
51
0.595166
# Generated by Django 3.2.9 on 2021-12-20 20:36 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('users', '0003_delete_user_profile_user'), ] operations = [ migrations.RemoveField( model_name='profile', name='user', ...
0
0
0
225
0
0
0
11
46
6dfdc54ff94e2ff04365c1be87003f5d42e21011
6,657
py
Python
dci_downloader/api.py
redhat-cip/dci-downloader
d7ad184f502e145b9ccf2618b8af6d82ac7daa8a
[ "Apache-2.0" ]
null
null
null
dci_downloader/api.py
redhat-cip/dci-downloader
d7ad184f502e145b9ccf2618b8af6d82ac7daa8a
[ "Apache-2.0" ]
3
2019-10-30T20:39:06.000Z
2021-03-31T07:55:00.000Z
dci_downloader/api.py
redhat-cip/dci-downloader
d7ad184f502e145b9ccf2618b8af6d82ac7daa8a
[ "Apache-2.0" ]
2
2020-01-12T05:27:00.000Z
2020-06-19T02:39:24.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- FIVE_SECONDS = 5 TEN_SECONDS = 10 # We'll allow 5 seconds to connect & 10 seconds to get an answer REQUESTS_TIMEOUT = (FIVE_SECONDS, TEN_SECONDS)
29.852018
87
0.633018
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import requests import sys import time from functools import wraps from multiprocessing import Pool from dci_downloader.fs import create_parent_dir from dciclient.v1.api.context import build_signature_context from dciclient.v1.api import component as dci_compone...
0
1,675
0
0
0
4,050
0
135
589
d5ff2fd7abf3a164f7893984f9e9753ff69d86e5
56
py
Python
apps/categories/__init__.py
ExpoAshique/ProveBanking__s
f0b45fffea74d00d14014be27aa50fe5f42f6903
[ "MIT" ]
null
null
null
apps/categories/__init__.py
ExpoAshique/ProveBanking__s
f0b45fffea74d00d14014be27aa50fe5f42f6903
[ "MIT" ]
null
null
null
apps/categories/__init__.py
ExpoAshique/ProveBanking__s
f0b45fffea74d00d14014be27aa50fe5f42f6903
[ "MIT" ]
null
null
null
default_app_config = 'categories.apps.CategoriesConfig'
28
55
0.857143
default_app_config = 'categories.apps.CategoriesConfig'
0
0
0
0
0
0
0
0
0
bfc96a64d5994b6250f5d552e7ec22eab2022391
108
py
Python
rbcz/__init__.py
smcl/rbcz.py
2bcdea1e12d3800d4b9b3e1d3523dec43bf3026b
[ "MIT" ]
null
null
null
rbcz/__init__.py
smcl/rbcz.py
2bcdea1e12d3800d4b9b3e1d3523dec43bf3026b
[ "MIT" ]
null
null
null
rbcz/__init__.py
smcl/rbcz.py
2bcdea1e12d3800d4b9b3e1d3523dec43bf3026b
[ "MIT" ]
2
2016-10-11T16:04:15.000Z
2022-03-02T10:26:42.000Z
# flake8: noqa
15.428571
29
0.722222
# flake8: noqa from .rbcz import ( read_statement, read_statements, read_statements_from_imap )
0
0
0
0
0
0
0
71
22
01d9136911dbdb303db7d50afa63b120f335fc5a
405
py
Python
1017/main.py
pauvrepetit/leetcode
6ad093cf543addc4dfa52d72a8e3c0d05a23b771
[ "MIT" ]
null
null
null
1017/main.py
pauvrepetit/leetcode
6ad093cf543addc4dfa52d72a8e3c0d05a23b771
[ "MIT" ]
null
null
null
1017/main.py
pauvrepetit/leetcode
6ad093cf543addc4dfa52d72a8e3c0d05a23b771
[ "MIT" ]
null
null
null
# 1017. # # 20200801 # huao # 112**(i+1) # # sol = Solution() print(sol.baseNeg2(4))
19.285714
50
0.511111
# 1017. 负二进制转换 # # 20200801 # huao # 观察奇数位上的1,如果该位置为1,那么使用负二进制表示时,会比实际二进制时少2**(i+1) # 把这个差值加进去,并进行处理加完以后的值 # 处理完以后,得到的数字的二进制表示就是原数的负二进制表示 class Solution: def baseNeg2(self, N: int) -> str: i = 0 while N >= (1 << i): if i % 2 == 1 and (N & (1 << i) != 0): N += (2 << i) ...
270
0
0
202
0
0
0
0
23
77527d7a3513596852d1eb0ff8d8935a98e0cc26
67
py
Python
Lib/ensurepip/__main__.py
Hadron/python
73137f499ed658169f49273eee46845e3b53e800
[ "PSF-2.0" ]
2,557
2016-07-19T22:20:45.000Z
2022-01-25T10:53:35.000Z
build/cmd/win32/Python27/Lib/ensurepip/__main__.py
IamBaoMouMou/AliOS-Things
195a9160b871b3d78de6f8cf6c2ab09a71977527
[ "Apache-2.0" ]
1,360
2016-07-20T02:06:42.000Z
2021-07-27T12:46:40.000Z
build/cmd/win32/Python27/Lib/ensurepip/__main__.py
IamBaoMouMou/AliOS-Things
195a9160b871b3d78de6f8cf6c2ab09a71977527
[ "Apache-2.0" ]
607
2016-07-20T03:34:04.000Z
2022-01-05T14:57:09.000Z
import ensurepip if __name__ == "__main__": ensurepip._main()
13.4
26
0.701493
import ensurepip if __name__ == "__main__": ensurepip._main()
0
0
0
0
0
0
0
0
0
a84cd8dc54134f048fe048f26a419cfc349e13ac
1,742
py
Python
configuration.py
sayatul/trytond-sale-payment-gateway
7ddcc77d946f4e3a71944477c3e83d7d06866cf7
[ "BSD-3-Clause" ]
null
null
null
configuration.py
sayatul/trytond-sale-payment-gateway
7ddcc77d946f4e3a71944477c3e83d7d06866cf7
[ "BSD-3-Clause" ]
6
2015-09-05T00:18:30.000Z
2016-11-14T07:57:14.000Z
configuration.py
sayatul/trytond-sale-payment-gateway
7ddcc77d946f4e3a71944477c3e83d7d06866cf7
[ "BSD-3-Clause" ]
15
2015-08-11T13:01:31.000Z
2017-07-14T06:36:21.000Z
# -*- coding: utf-8 -*- from trytond.pool import PoolMeta __metaclass__ = PoolMeta __all__ = ['SaleConfiguration']
27.650794
69
0.633754
# -*- coding: utf-8 -*- from trytond.model import fields from trytond.pool import PoolMeta __metaclass__ = PoolMeta __all__ = ['SaleConfiguration'] class SaleConfiguration: __name__ = "sale.configuration" payment_authorize_on = fields.Selection( "get_authorize_options", "Authorize payments", require...
0
909
0
660
0
0
0
11
45
c8d43407f8c0512e2138628dadf82f2039fd8241
3,383
py
Python
polimorfo/utils/maskutils.py
ciuffredaluca/polimorfo
3a18b9fe95c5843c2f9528812109a40412db6ba9
[ "Apache-2.0" ]
3
2020-02-03T09:29:55.000Z
2020-10-29T16:38:01.000Z
polimorfo/utils/maskutils.py
ciuffredaluca/polimorfo
3a18b9fe95c5843c2f9528812109a40412db6ba9
[ "Apache-2.0" ]
164
2020-02-06T16:09:34.000Z
2022-03-01T14:44:09.000Z
polimorfo/utils/maskutils.py
ciuffredaluca/polimorfo
3a18b9fe95c5843c2f9528812109a40412db6ba9
[ "Apache-2.0" ]
5
2020-02-19T15:04:44.000Z
2021-11-17T15:31:48.000Z
import cv2 import numpy as np import pycocotools.mask as mask_util __all__ = [ "mask_to_polygon", "polygons_to_mask", "area", "bbox", "coco_poygons_to_mask", ] def mask_to_polygon( mask, min_score: float = 0.5, approx: float = 0.0, relative: bool = True ): """generate polygons from masks ...
27.958678
146
0.618386
import cv2 import numpy as np import pycocotools.mask as mask_util from matplotlib.pyplot import contour __all__ = [ "mask_to_polygon", "polygons_to_mask", "area", "bbox", "coco_poygons_to_mask", ] def mask_to_polygon( mask, min_score: float = 0.5, approx: float = 0.0, relative: bool = True )...
0
0
0
0
0
610
0
16
91
14fb4704b2aa70285eb22f68b4c42da396f281c5
340
py
Python
configs/local_variables.py
AhmedStohy/EagerMOT
59569a5f8ab350c82ac4b45216571c780a444fc1
[ "MIT" ]
null
null
null
configs/local_variables.py
AhmedStohy/EagerMOT
59569a5f8ab350c82ac4b45216571c780a444fc1
[ "MIT" ]
null
null
null
configs/local_variables.py
AhmedStohy/EagerMOT
59569a5f8ab350c82ac4b45216571c780a444fc1
[ "MIT" ]
null
null
null
MOUNT_PATH = "" # in case you are mounting data storage externally SPLIT = 'training' KITTI_WORK_DIR = "./" KITTI_DATA_DIR = "../input/kitti-3d-object-detection-dataset" NUSCENES_WORK_DIR = MOUNT_PATH + "/storage/slurm/kimal/eagermot_workspace/nuscenes" NUSCENES_DATA_DIR = MOUNT_PATH + "/storage/slurm/kimal/datasets...
37.777778
83
0.779412
MOUNT_PATH = "" # in case you are mounting data storage externally SPLIT = 'training' KITTI_WORK_DIR = "./" KITTI_DATA_DIR = "../input/kitti-3d-object-detection-dataset" NUSCENES_WORK_DIR = MOUNT_PATH + "/storage/slurm/kimal/eagermot_workspace/nuscenes" NUSCENES_DATA_DIR = MOUNT_PATH + "/storage/slurm/kimal/datasets...
0
0
0
0
0
0
0
0
0
86159c4cd3091b817a2ba5bb813ab8ddb70374f0
12,566
py
Python
src/prism-fruit/Games-DQL/examples/games/car/networkx/algorithms/isomorphism/matchhelpers.py
kushgrover/apt-vs-dift
250f64e6c442f6018cab65ec6979d9568a842f57
[ "MIT" ]
null
null
null
src/prism-fruit/Games-DQL/examples/games/car/networkx/algorithms/isomorphism/matchhelpers.py
kushgrover/apt-vs-dift
250f64e6c442f6018cab65ec6979d9568a842f57
[ "MIT" ]
null
null
null
src/prism-fruit/Games-DQL/examples/games/car/networkx/algorithms/isomorphism/matchhelpers.py
kushgrover/apt-vs-dift
250f64e6c442f6018cab65ec6979d9568a842f57
[ "MIT" ]
null
null
null
"""Functions which help end users define customize node_match and edge_match functions to use during isomorphism checks. """ from itertools import permutations import types import networkx as nx __all__ = ['categorical_node_match', 'categorical_edge_match', 'categorical_multiedge_match',...
36.213256
87
0.614993
"""Functions which help end users define customize node_match and edge_match functions to use during isomorphism checks. """ from itertools import permutations import types import networkx as nx __all__ = ['categorical_node_match', 'categorical_edge_match', 'categorical_multiedge_match',...
0
0
0
0
0
4,777
0
0
187
0fecc9d9f31301ad24bcca0b4ce46445f90eacb9
2,471
py
Python
xyzspaces/exceptions.py
isaac-philip/xyz-spaces-python
67b06efdc4a76934c54c1a828087a27cad26aa5d
[ "Apache-2.0" ]
1
2021-02-20T10:14:36.000Z
2021-02-20T10:14:36.000Z
xyzspaces/exceptions.py
GhostUser/xyz-spaces-python
646aaa74a180871318f3e9aa12acc8e25a1f3b33
[ "Apache-2.0" ]
null
null
null
xyzspaces/exceptions.py
GhostUser/xyz-spaces-python
646aaa74a180871318f3e9aa12acc8e25a1f3b33
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2019-2020 HERE Europe B.V. # # 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 t...
33.391892
80
0.673007
# Copyright (C) 2019-2020 HERE Europe B.V. # # 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 t...
0
0
0
1,699
0
0
0
0
69
6d88e4a24d0a05e8b054112c932ce362d81cabbe
7,811
py
Python
neutron_lbaas_dashboard/dashboards/project/loadbalancersv2/workflows/update_lb.py
mail2nsrajesh/neutron-lbaas-dashboard
789e7cea2d949960114754614a63c4a4ef2f0c11
[ "Apache-2.0" ]
null
null
null
neutron_lbaas_dashboard/dashboards/project/loadbalancersv2/workflows/update_lb.py
mail2nsrajesh/neutron-lbaas-dashboard
789e7cea2d949960114754614a63c4a4ef2f0c11
[ "Apache-2.0" ]
null
null
null
neutron_lbaas_dashboard/dashboards/project/loadbalancersv2/workflows/update_lb.py
mail2nsrajesh/neutron-lbaas-dashboard
789e7cea2d949960114754614a63c4a4ef2f0c11
[ "Apache-2.0" ]
null
null
null
# Copyright 2015, eBay Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
40.682292
79
0.547433
# Copyright 2015, eBay Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
0
0
0
6,821
0
0
0
49
236
82b8b737fabe070987bf8bb0715e662f67642ee9
40,874
py
Python
BootloaderCorePkg/Tools/CfgDataTool.py
liux2085/slimbootloader
24a16ac20eb86b64135843074f9a85d6e60ab54a
[ "BSD-2-Clause-NetBSD", "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "MIT", "BSD-2-Clause-Patent" ]
1
2021-12-30T17:05:53.000Z
2021-12-30T17:05:53.000Z
BootloaderCorePkg/Tools/CfgDataTool.py
liux2085/slimbootloader
24a16ac20eb86b64135843074f9a85d6e60ab54a
[ "BSD-2-Clause-NetBSD", "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "MIT", "BSD-2-Clause-Patent" ]
null
null
null
BootloaderCorePkg/Tools/CfgDataTool.py
liux2085/slimbootloader
24a16ac20eb86b64135843074f9a85d6e60ab54a
[ "BSD-2-Clause-NetBSD", "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "MIT", "BSD-2-Clause-Patent" ]
null
null
null
## @ CfgDataTool.py # # Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # ## import sys sys.dont_write_bytecode = True CFGDATA_INT_GUID = b'\xD0\x6C\x6E\x01\x34\x48\x7E\x4C\xBC\xFE\x41\xDF\xB8\x8A\x6A\x6D' if __name__ == '__main__': sys.exi...
42.844864
261
0.589103
## @ CfgDataTool.py # # Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # ## import sys import collections sys.dont_write_bytecode = True from IfwiUtility import * from CommonUtility import * CFGDATA_INT_GUID = b'\xD0\x6C\x6E\x01\x34\x48\x7E\x4...
0
0
0
20,950
0
19,310
0
11
273
4c3038da2879a528c4bde532c6d49541704ed5cb
1,182
py
Python
src/eve_utils/skel/win-svc/win_service.py
pointw-dev/eve-utils
2af7d28232e0d22975cc8141fda27a3870694223
[ "MIT" ]
null
null
null
src/eve_utils/skel/win-svc/win_service.py
pointw-dev/eve-utils
2af7d28232e0d22975cc8141fda27a3870694223
[ "MIT" ]
null
null
null
src/eve_utils/skel/win-svc/win_service.py
pointw-dev/eve-utils
2af7d28232e0d22975cc8141fda27a3870694223
[ "MIT" ]
null
null
null
import win32serviceutil if __name__ == '__main__': win32serviceutil.HandleCommandLine(EveWindowsService)
31.945946
107
0.709814
import win32serviceutil import win32service import win32event import servicemanager from eve_service import EveService class EveWindowsService(win32serviceutil.ServiceFramework): _svc_name_ = "{$project_name}" _svc_display_name_ = "{$project_name} API" # _svc_description_ = "Service description goes here...
0
0
0
951
0
0
0
7
112
711ca7392e0cd8dddd20d6ed9ebbcc510f934cf0
212
py
Python
dyrapy/tests/test_load_ouvidoria.py
rafasgj/dyrapy
14e1af5ee05c98e2e2aaf0e5c58525161a19e81c
[ "BSD-3-Clause" ]
null
null
null
dyrapy/tests/test_load_ouvidoria.py
rafasgj/dyrapy
14e1af5ee05c98e2e2aaf0e5c58525161a19e81c
[ "BSD-3-Clause" ]
15
2020-12-10T17:56:13.000Z
2020-12-24T20:45:56.000Z
dyrapy/tests/test_load_ouvidoria.py
rafasgj/dyrapy
14e1af5ee05c98e2e2aaf0e5c58525161a19e81c
[ "BSD-3-Clause" ]
1
2021-01-10T23:46:22.000Z
2021-01-10T23:46:22.000Z
# Copyright (c) 2020 Marco Mangan <marco.mangan@gmail.com> # License: BSD 3 clause
21.2
58
0.745283
# Copyright (c) 2020 Marco Mangan <marco.mangan@gmail.com> # License: BSD 3 clause from dyrapy.datasets import load_ouvidoria def test_load_ouvidoria(): data = load_ouvidoria() assert data is not None
0
0
0
0
0
61
0
21
46
c2f1ebc02477d71494c8090daa7cd99f87a2a44c
3,698
py
Python
tests/test_core.py
beasteers/tflit
4fec6255c9fc6d406ec4df3df70dfc282eca0c46
[ "MIT" ]
7
2020-11-22T08:08:56.000Z
2022-03-18T13:00:43.000Z
tests/test_core.py
beasteers/tflit
4fec6255c9fc6d406ec4df3df70dfc282eca0c46
[ "MIT" ]
2
2021-07-06T07:56:30.000Z
2021-10-05T21:11:21.000Z
tests/test_core.py
beasteers/tflit
4fec6255c9fc6d406ec4df3df70dfc282eca0c46
[ "MIT" ]
2
2020-12-06T19:33:47.000Z
2021-03-11T11:34:56.000Z
import os model_dir = os.path.join(os.path.dirname(__file__), 'models') model_file = os.path.join(model_dir, '{}.tflite') model_info_file = os.path.join(model_dir, '{}.json') # Utilities
31.606838
104
0.688751
import os import glob import json import tflit import pytest import numpy as np model_dir = os.path.join(os.path.dirname(__file__), 'models') model_file = os.path.join(model_dir, '{}.tflite') model_info_file = os.path.join(model_dir, '{}.json') @pytest.mark.parametrize('name', [ os.path.splitext(os.path.basena...
0
3,025
0
0
100
213
0
-40
202
7a7b2acdee66b15f486f0fa8d28ad92cce760ee9
518
py
Python
game.py
chirag1992m/AdversarialShortestPathGame
0af125eb17aa3c4587a314486e9a6854c771e119
[ "MIT" ]
2
2017-10-01T11:05:12.000Z
2017-10-05T22:36:29.000Z
game.py
chirag1992m/AdversarialShortestPathGame
0af125eb17aa3c4587a314486e9a6854c771e119
[ "MIT" ]
null
null
null
game.py
chirag1992m/AdversarialShortestPathGame
0af125eb17aa3c4587a314486e9a6854c771e119
[ "MIT" ]
null
null
null
import argparse from core.game_looper import GameLooper if __name__ == "__main__": parser = argparse.ArgumentParser(description="Run the Adversarial Game Server.") parser.add_argument('--port', '--p', type=int, default=8080, help='Port to run the server on') parser.add_argument('--game-file', default='sa...
32.375
98
0.677606
import argparse from core.game_looper import GameLooper if __name__ == "__main__": parser = argparse.ArgumentParser(description="Run the Adversarial Game Server.") parser.add_argument('--port', '--p', type=int, default=8080, help='Port to run the server on') parser.add_argument('--game-file', default='sa...
0
0
0
0
0
0
0
0
0
19626e7eeaefb2748ef981d8cb658a323ff5ccdd
11,615
py
Python
lib_auth.py
kwinkunks/modelr_app
3ada397e562b5c7e43048b3fa4b632bad9ab1dda
[ "Apache-2.0" ]
null
null
null
lib_auth.py
kwinkunks/modelr_app
3ada397e562b5c7e43048b3fa4b632bad9ab1dda
[ "Apache-2.0" ]
null
null
null
lib_auth.py
kwinkunks/modelr_app
3ada397e562b5c7e43048b3fa4b632bad9ab1dda
[ "Apache-2.0" ]
1
2020-06-29T05:06:10.000Z
2020-06-29T05:06:10.000Z
""" Functions related user logins, signups, password authentications, logouts, etc ... """ from lib_db import User, UserID, Group, VerifyUser from google.appengine.api import mail import hashlib import random import re import string import stripe PASS_RE = re.compile(r"^.{3,20}$") EMAIL_RE = re.compile(r"^[\S]+@[\S]+\...
27.920673
109
0.606974
""" Functions related user logins, signups, password authentications, logouts, etc ... """ from lib_db import User, UserID, Group, VerifyUser from google.appengine.api import mail import hashlib import random import re import string import stripe PASS_RE = re.compile(r"^.{3,20}$") EMAIL_RE = re.compile(r"^[\S]+@[\S]+\...
0
0
0
73
0
912
0
0
98
c50c7e581651abdcce05c979c772b57ce8ec489d
689
py
Python
MODBUS_RTU_3.py
pratikgharte/Python_GUI_EC_PH
5dd6a166ffc59a55a45e711481261644879a3d8a
[ "MIT" ]
null
null
null
MODBUS_RTU_3.py
pratikgharte/Python_GUI_EC_PH
5dd6a166ffc59a55a45e711481261644879a3d8a
[ "MIT" ]
null
null
null
MODBUS_RTU_3.py
pratikgharte/Python_GUI_EC_PH
5dd6a166ffc59a55a45e711481261644879a3d8a
[ "MIT" ]
null
null
null
from pymodbus.client.sync import ModbusSerialClient client = ModbusSerialClient( method='rtu', port='/dev/ttyS0', baudrate=9600, timeout=3, parity='N', stopbits=1, bytesize=8 ) if client.connect(): # Trying for connect to Modbus Server/Slave '''Reading from a holding register with the...
26.5
67
0.674891
from pymodbus.client.sync import ModbusSerialClient client = ModbusSerialClient( method='rtu', port='/dev/ttyS0', baudrate=9600, timeout=3, parity='N', stopbits=1, bytesize=8 ) if client.connect(): # Trying for connect to Modbus Server/Slave '''Reading from a holding register with the...
0
0
0
0
0
0
0
0
0
1b04120573fe644b3ee867b0c0f0d3fb5ecc57f5
74,685
py
Python
subject/tests/integration/legacy_functional/test_v1_api.py
laoyigrace/subject
e6ed989fdc250917a19788112b22322b73b3550f
[ "Apache-2.0" ]
null
null
null
subject/tests/integration/legacy_functional/test_v1_api.py
laoyigrace/subject
e6ed989fdc250917a19788112b22322b73b3550f
[ "Apache-2.0" ]
null
null
null
subject/tests/integration/legacy_functional/test_v1_api.py
laoyigrace/subject
e6ed989fdc250917a19788112b22322b73b3550f
[ "Apache-2.0" ]
null
null
null
# 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, software # d...
43.070934
83
0.581255
# 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, software # d...
0
0
0
73,725
0
0
0
63
247
da4c3a059b82cec21a272172a71fea3e27b71ddf
14,056
py
Python
runexp.py
behzadhaghgoo/roper
c420f468d869c3a3ad3c6cc0b4dcb74049eba302
[ "MIT" ]
null
null
null
runexp.py
behzadhaghgoo/roper
c420f468d869c3a3ad3c6cc0b4dcb74049eba302
[ "MIT" ]
null
null
null
runexp.py
behzadhaghgoo/roper
c420f468d869c3a3ad3c6cc0b4dcb74049eba302
[ "MIT" ]
null
null
null
import math import torch import torch.nn as nn import torch.optim as optim import torch.autograd as autograd USE_CUDA = torch.cuda.is_available() Variable = lambda *args, **kwargs: autograd.Variable(*args, **kwargs).cuda() if USE_CUDA else autograd.Variable(*args, **kwargs) beta_start = 0.4 beta_frames = 1000 BETA_B...
36.509091
161
0.575982
import random import math import numpy as np import pandas as pd import torch import torch.nn as nn import torch.optim as optim import torch.autograd as autograd from tqdm import tqdm from ray.tune import run, Trainable, sample_from from dqn import DQN, update_target from loss import TDLoss, StableTDLoss from pbuffer ...
0
0
0
7,007
0
0
0
61
222
0ed859f4957ad6b26162065f01fc1831972bca3f
2,517
py
Python
tests/ions/test_quintic_spline.py
shankar1729/qimpy
5a4c1ea1fedc88909d426ce54101d6d07fa82e8c
[ "BSD-3-Clause" ]
3
2021-05-25T00:11:50.000Z
2022-01-30T21:49:00.000Z
tests/ions/test_quintic_spline.py
shankar1729/qimpy
5a4c1ea1fedc88909d426ce54101d6d07fa82e8c
[ "BSD-3-Clause" ]
2
2021-09-28T19:18:38.000Z
2021-11-23T13:23:17.000Z
tests/ions/test_quintic_spline.py
shankar1729/qimpy
5a4c1ea1fedc88909d426ce54101d6d07fa82e8c
[ "BSD-3-Clause" ]
null
null
null
import qimpy as qp import torch def main(): """Run test and additionally plot for visual inspection.""" import matplotlib.pyplot as plt qp.utils.log_config() qp.rc.init() # Plot a single blip function for testing: plt.figure() coeff = torch.zeros(12) coeff[5] = 1 t = torch.linsp...
27.659341
84
0.564164
import qimpy as qp import torch import pytest @pytest.mark.mpi_skip def test_interpolator(): def f_test(x): """Non-trivial test function with correct symmetries""" return torch.exp(-torch.sin(0.01 * x * x)) * torch.cos(0.1 * x) def f_test_prime(x): """Analytical derivative of above.""...
0
1,023
0
0
0
0
0
-8
45
19c9b4b16e51705aa897a6210e587cdfaf2db4bc
285
py
Python
TreeNode/models.py
huzing2524/myScripts
3cf1cfe84bd911cf04ff5c557c8fd6420978bb21
[ "MIT" ]
2
2021-02-23T04:28:18.000Z
2021-06-07T23:11:03.000Z
TreeNode/models.py
huzing2524/myScripts
3cf1cfe84bd911cf04ff5c557c8fd6420978bb21
[ "MIT" ]
null
null
null
TreeNode/models.py
huzing2524/myScripts
3cf1cfe84bd911cf04ff5c557c8fd6420978bb21
[ "MIT" ]
null
null
null
# Create your models here.
25.909091
67
0.74386
from django.db import models # Create your models here. class IndexTree(models.Model): name = models.CharField(max_length=50, verbose_name='名称') parent_id = models.IntegerField(null=True, verbose_name='父类id') remark = models.CharField(max_length=50, verbose_name='备注')
18
0
0
197
0
0
0
7
45
bbb6c6787b96b5631dde0a84acddef3a760c2122
19,293
py
Python
mamosa/synthetic/synthetic.py
sindrehenriksen/mamosa
477131ff82550701753c1950128b3191ee37bebb
[ "MIT" ]
1
2021-11-01T16:43:17.000Z
2021-11-01T16:43:17.000Z
mamosa/synthetic/synthetic.py
sindrehenriksen/mamosa
477131ff82550701753c1950128b3191ee37bebb
[ "MIT" ]
null
null
null
mamosa/synthetic/synthetic.py
sindrehenriksen/mamosa
477131ff82550701753c1950128b3191ee37bebb
[ "MIT" ]
null
null
null
import scipy.stats # TODO: Add support for horizons that "stop"/"vanish" (i.e. a layer is eroded).
39.616016
88
0.584616
import numpy as np import bruges import scipy.stats import scipy.linalg import warnings from scipy.ndimage import gaussian_filter from typing import Tuple, Union, List, Optional, Callable, Any # TODO: Add support for horizons that "stop"/"vanish" (i.e. a layer is eroded). class SyntheticData: """Class for genera...
0
1,637
0
17,358
0
0
0
42
155
72b783b94092542b07e16ea1a17cad1c4d010de7
2,046
py
Python
Lib/encodings/iso8859_8.py
marcosptf/cpython-2.0.1
73c739a764e8b1dc84640e73b880bc66e1916bca
[ "PSF-2.0" ]
5
2022-03-26T21:53:36.000Z
2022-03-30T21:47:20.000Z
Lib/encodings/iso8859_8.py
marcosptf/cpython-2.0.1
73c739a764e8b1dc84640e73b880bc66e1916bca
[ "PSF-2.0" ]
6
2020-11-18T15:48:14.000Z
2021-05-03T21:20:50.000Z
Lib/encodings/iso8859_8.py
marcosptf/cpython-2.0.1
73c739a764e8b1dc84640e73b880bc66e1916bca
[ "PSF-2.0" ]
2
2015-07-16T08:14:13.000Z
2022-03-27T01:55:17.000Z
""" Python Character Mapping Codec generated from '8859-8.TXT'. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" ### Codec APIs ### encodings module API ### Decoding Map decoding_map = { 0x00aa: 0x00d7, # MULTIPLICATION SIGN 0x00af: 0x203e, # OVER...
26.230769
68
0.709677
""" Python Character Mapping Codec generated from '8859-8.TXT'. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(i...
0
0
0
301
0
67
0
-8
123
cc3465e8b6a7b04d148b0d77d9ac749acd991189
4,161
py
Python
simulated_uploaders/simulate_upload_rnaseq_fastq.py
BD2KGenomics/dcc-spinnaker-client
72a6cb94a8db4be707cb1f63513b2f2712edb663
[ "Apache-2.0" ]
null
null
null
simulated_uploaders/simulate_upload_rnaseq_fastq.py
BD2KGenomics/dcc-spinnaker-client
72a6cb94a8db4be707cb1f63513b2f2712edb663
[ "Apache-2.0" ]
36
2016-11-21T17:05:18.000Z
2020-10-12T15:19:52.000Z
simulated_uploaders/simulate_upload_rnaseq_fastq.py
BD2KGenomics/dcc-spinnaker-client
72a6cb94a8db4be707cb1f63513b2f2712edb663
[ "Apache-2.0" ]
6
2016-12-12T19:37:13.000Z
2021-10-10T21:24:54.000Z
if __name__ == "__main__": main()
62.104478
480
0.694545
import argparse import subprocess import os import time import random def getOptions(): parser = argparse.ArgumentParser(description='Directory that contains Json files.') parser.add_argument("-f1", "--fastq-r1-path", default="https://s3.amazonaws.com/oconnor-test-bucket/sample-data/ERR030886_1.fastq.gz", he...
0
0
0
0
0
4,006
0
-40
156
3683ba322d5167e3d034bb48b5b53e0c6869da79
2,026
py
Python
Python/tdw/FBOutput/EnvironmentColliderIntersection.py
ricklentz/tdw
da40eec151acae20b28d6486defb4358d96adb0e
[ "BSD-2-Clause" ]
null
null
null
Python/tdw/FBOutput/EnvironmentColliderIntersection.py
ricklentz/tdw
da40eec151acae20b28d6486defb4358d96adb0e
[ "BSD-2-Clause" ]
null
null
null
Python/tdw/FBOutput/EnvironmentColliderIntersection.py
ricklentz/tdw
da40eec151acae20b28d6486defb4358d96adb0e
[ "BSD-2-Clause" ]
null
null
null
# automatically generated by the FlatBuffers compiler, do not modify # namespace: FBOutput
39.72549
163
0.715202
# automatically generated by the FlatBuffers compiler, do not modify # namespace: FBOutput import tdw.flatbuffers class EnvironmentColliderIntersection(object): __slots__ = ['_tab'] @classmethod def GetRootAsEnvironmentColliderIntersection(cls, buf, offset): n = tdw.flatbuffers.encode.Get(tdw.fl...
0
238
0
1,114
0
424
0
1
157
2e03545e72140c8b2d853118bc5b211a21e8896e
1,742
py
Python
misc/zmqsnoop.py
brgirgis/pyzmqrpc3
a93339f98686e7f695f7c8a19dac198e4fc56aab
[ "MIT" ]
null
null
null
misc/zmqsnoop.py
brgirgis/pyzmqrpc3
a93339f98686e7f695f7c8a19dac198e4fc56aab
[ "MIT" ]
null
null
null
misc/zmqsnoop.py
brgirgis/pyzmqrpc3
a93339f98686e7f695f7c8a19dac198e4fc56aab
[ "MIT" ]
null
null
null
''' Created on Apr 2014 Edited on Oct 2020 @author: Jan Verhoeven @author: Bassem Girgis @copyright: MIT license, see http://opensource.org/licenses/MIT ''' import signal import sys # Handle OS signals (like keyboard interrupt) signal.signal(signal.SIGINT, _signal_handler) if __name__ == '__main__': sy...
21.775
73
0.619977
''' Created on Apr 2014 Edited on Oct 2020 @author: Jan Verhoeven @author: Bassem Girgis @copyright: MIT license, see http://opensource.org/licenses/MIT ''' import argparse import signal import sys from typing import Optional, Tuple import zmq # Handle OS signals (like keyboard interrupt) def _signal_handler(_...
0
0
0
0
0
1,275
0
-4
136
9b5f2a4b67b1ee2b3bd4b1a97fea1b31e9003769
2,038
py
Python
T28_batch_ui.py
NathanMacDiarmid/ECOR-1051-Project
fae9e274ef57a29af511131908dcfb85e791af9a
[ "Unlicense" ]
null
null
null
T28_batch_ui.py
NathanMacDiarmid/ECOR-1051-Project
fae9e274ef57a29af511131908dcfb85e791af9a
[ "Unlicense" ]
null
null
null
T28_batch_ui.py
NathanMacDiarmid/ECOR-1051-Project
fae9e274ef57a29af511131908dcfb85e791af9a
[ "Unlicense" ]
null
null
null
# Submitted April 2, 2020 # Team 28: # Nathan MacDiarmid 101098993 # Anita Ntomchukwu 101138391 # Sam Hurd 101146639 # Yahya Shah 101169280 # MILESTONE 3 # IMPORTS # DEFINITIONS def execute_filter(command: tuple) -> Image: """ Returns an image with the filters applied that are found in the batch file. ...
22.395604
79
0.609421
# Submitted April 2, 2020 # Team 28: # Nathan MacDiarmid 101098993 # Anita Ntomchukwu 101138391 # Sam Hurd 101146639 # Yahya Shah 101169280 # MILESTONE 3 # IMPORTS from T28_image_filters import * from Cimpl import * # DEFINITIONS def execute_filter(command: tuple) -> Image: """ Returns an image with the fi...
0
0
0
0
0
0
0
8
45
88dc25a7bff37aeba8e20d34161d9fc923acd8ac
544
py
Python
python/p003.py
livioribeiro/project-euler
71f915b1ddad90c3a5b805cad7047cd6e4ce64ed
[ "MIT" ]
2
2015-12-16T18:39:23.000Z
2015-12-19T03:49:07.000Z
python/p003.py
livioribeiro/project-euler
71f915b1ddad90c3a5b805cad7047cd6e4ce64ed
[ "MIT" ]
null
null
null
python/p003.py
livioribeiro/project-euler
71f915b1ddad90c3a5b805cad7047cd6e4ce64ed
[ "MIT" ]
null
null
null
""" The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143? """ import math INPUT = 600851475143 if __name__ == '__main__': for i in range(math.ceil(math.sqrt(INPUT)), 1, -2): if INPUT % i == 0 and is_prime(i): print(i) break
18.758621
60
0.558824
""" The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143? """ import math def is_prime(num): if num <= 2: return True if num % 2 == 0: return False for i in range(3, math.ceil(math.sqrt(num)) + 1, 2): if num % i == 0: ...
0
0
0
0
0
202
0
0
23
cbbe64b49ba07940c302c5be1b82d33d7e5ea708
3,841
py
Python
gpn/models/matern_ggp.py
WodkaRHR/Graph-Posterior-Network
139e7c45c37324c9286e0cca60360a4978b3f411
[ "MIT" ]
23
2021-11-16T01:31:55.000Z
2022-03-04T05:49:03.000Z
gpn/models/matern_ggp.py
WodkaRHR/Graph-Posterior-Network
139e7c45c37324c9286e0cca60360a4978b3f411
[ "MIT" ]
1
2021-12-17T01:25:16.000Z
2021-12-20T10:38:30.000Z
gpn/models/matern_ggp.py
WodkaRHR/Graph-Posterior-Network
139e7c45c37324c9286e0cca60360a4978b3f411
[ "MIT" ]
7
2021-12-03T11:13:44.000Z
2022-02-06T03:12:10.000Z
import tensorflow as tf import gpflow gpflow.config.set_default_float(tf.float64) gpflow.config.set_default_summary_fmt("notebook") tf.get_logger().setLevel('ERROR')
36.580952
106
0.660505
from typing import Tuple import torch import os import tensorflow as tf import networkx as nx import scipy as sp import numpy as np import torch_geometric.utils as tu from torch_geometric.data import Data import gpflow from gpn.utils import ModelConfiguration from .gpflow_gpp import GPFLOWGGP from .matern_ggp_utils i...
0
0
0
3,308
0
0
0
98
267
5c8bbe5f5e6b002ce0ad5bbf441e36d1ceb4eeb0
3,664
py
Python
analytics_utils/autocorrelation.py
patricksferraz/analytics-utils
3b083e1d5eec9825bddf536d1f05db0643b2a710
[ "MIT" ]
1
2019-08-14T02:41:55.000Z
2019-08-14T02:41:55.000Z
analytics_utils/autocorrelation.py
patricksferraz/analytics-utils
3b083e1d5eec9825bddf536d1f05db0643b2a710
[ "MIT" ]
null
null
null
analytics_utils/autocorrelation.py
patricksferraz/analytics-utils
3b083e1d5eec9825bddf536d1f05db0643b2a710
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ This is the find module. The find module supplies one function, autocorrelation() """ from statsmodels.tsa.stattools import acf import pandas as pd def autocorrelation( data_frame: pd.DataFrame, unbiased: bool = False, nlags: int = 40, fft: bool = None, alpha: floa...
26.550725
77
0.567959
# -*- coding: utf-8 -*- """ This is the find module. The find module supplies one function, autocorrelation() """ from statsmodels.tsa.stattools import acf import pandas as pd def autocorrelation( data_frame: pd.DataFrame, unbiased: bool = False, nlags: int = 40, fft: bool = None, alpha: floa...
0
0
0
0
0
0
0
0
0
ebfc27beaee1b32063685d09cce85b000da8edf1
431
py
Python
Ex029.py
raphaeltertuliano/Python
ffa9813aaa13ccca807f7c08be9489a2d88d3d62
[ "MIT" ]
1
2021-11-23T21:38:46.000Z
2021-11-23T21:38:46.000Z
Ex029.py
raphaeltertuliano/Python
ffa9813aaa13ccca807f7c08be9489a2d88d3d62
[ "MIT" ]
null
null
null
Ex029.py
raphaeltertuliano/Python
ffa9813aaa13ccca807f7c08be9489a2d88d3d62
[ "MIT" ]
null
null
null
#Escreva um progrma que leia a velocidade de um carro. #Se ele ultrapassar 80Km/h, mostre um mensagem de que ele foi multado #A multa vai custar R$7,00 por cada Km acima do limite. v = float(input('Velocidade do carro: ')) if v <= 80: print('Dentro do limite de velocidade. Boa viagem') else: print(f'Velocidade...
35.916667
69
0.677494
#Escreva um progrma que leia a velocidade de um carro. #Se ele ultrapassar 80Km/h, mostre um mensagem de que ele foi multado #A multa vai custar R$7,00 por cada Km acima do limite. v = float(input('Velocidade do carro: ')) if v <= 80: print('Dentro do limite de velocidade. Boa viagem') else: print(f'Velocidade...
2
0
0
0
0
0
0
0
0
5dce94849acc5a2df23e97ba2c96d11861c4c527
455
py
Python
Python/middle-of-the-linked-list.py
Ravan339/LeetCode
4276e562aa67e4c39cd92be5d2d6700a9465a579
[ "MIT" ]
4
2019-12-09T20:23:17.000Z
2021-11-24T08:59:21.000Z
Python/middle-of-the-linked-list.py
Ravan339/LeetCode
4276e562aa67e4c39cd92be5d2d6700a9465a579
[ "MIT" ]
null
null
null
Python/middle-of-the-linked-list.py
Ravan339/LeetCode
4276e562aa67e4c39cd92be5d2d6700a9465a579
[ "MIT" ]
9
2020-03-15T23:32:26.000Z
2022-02-25T05:51:26.000Z
# https://leetcode.com/problems/middle-of-the-linked-list/ # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None
19.782609
58
0.531868
# https://leetcode.com/problems/middle-of-the-linked-list/ # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def middleNode(self, head): """ :type head: ListNode :rtype: ListNode ""...
0
0
0
237
0
0
0
0
23
bda2a5e2ce26d03c188538f3c96972517acbd7d7
1,723
py
Python
tests/test_field_amount.py
BitySA/swissdta
046f466610e1197eea1e04683085b7008898c93a
[ "MIT" ]
null
null
null
tests/test_field_amount.py
BitySA/swissdta
046f466610e1197eea1e04683085b7008898c93a
[ "MIT" ]
3
2017-10-21T08:45:01.000Z
2021-06-02T00:16:43.000Z
tests/test_field_amount.py
BitySA/swissdta
046f466610e1197eea1e04683085b7008898c93a
[ "MIT" ]
2
2017-10-20T09:45:52.000Z
2018-12-03T16:00:40.000Z
"""Tests for the Amount field""" FIELD_LENGTH = 8
30.22807
64
0.612304
"""Tests for the Amount field""" from decimal import Decimal import pytest from swissdta.fields import Amount from swissdta.records.record import DTARecord FIELD_LENGTH = 8 class ARecord(DTARecord): """Subclass of DTARecord for testing the Numeric field""" field = Amount(length=FIELD_LENGTH) @pytest.mar...
0
1,368
0
106
0
0
0
35
160
ce2e8e0ca9f87c9bcb289954d8f5c250c1e39f69
3,064
py
Python
src/scripts/ct.py
xuanxiaoliqu/CRC4Docker
5ee26f9a590b727693202d8ad3b6460970304bd9
[ "MIT" ]
1
2020-10-26T12:02:08.000Z
2020-10-26T12:02:08.000Z
src/scripts/ct.py
TonyZPW/CRC4Docker
e52a6e88d4469284a071c0b96d009f6684dbb2ea
[ "MIT" ]
null
null
null
src/scripts/ct.py
TonyZPW/CRC4Docker
e52a6e88d4469284a071c0b96d009f6684dbb2ea
[ "MIT" ]
null
null
null
#!/usr/bin/env python #****************************************************************************** # Name: ct.py # Purpose: determine classification accuracy and contingency table # from test data # Usage: # python ct.py # # Copyright (c) 2018, Mort Canty if __name__ ==...
31.265306
79
0.465731
#!/usr/bin/env python #****************************************************************************** # Name: ct.py # Purpose: determine classification accuracy and contingency table # from test data # Usage: # python ct.py # # Copyright (c) 2018, Mort Canty import numpy as np impo...
0
165
0
0
0
2,447
0
-10
114
2d974f6f2e2ec53dacc65c4d74b242efd37bc595
2,085
py
Python
botcommands/morbidity.py
pastorhudson/mtb-pykeybasebot
af977f5823b178c91fb870058369f8a65205f7d6
[ "BSD-3-Clause" ]
null
null
null
botcommands/morbidity.py
pastorhudson/mtb-pykeybasebot
af977f5823b178c91fb870058369f8a65205f7d6
[ "BSD-3-Clause" ]
null
null
null
botcommands/morbidity.py
pastorhudson/mtb-pykeybasebot
af977f5823b178c91fb870058369f8a65205f7d6
[ "BSD-3-Clause" ]
null
null
null
import gspread import pandas as pd from datetime import datetime import os import json # print(os.environ.get('google_p_key')) credentials = json.loads(os.environ.get('google_p_key')) gc = gspread.service_account_from_dict(credentials) sh = gc.open_by_key("1b9o6uDO18sLxBqPwl_Gh9bnhW-ev_dABH83M5Vb5L8o") worksheet =...
30.661765
84
0.656595
import gspread import pandas as pd from datetime import datetime import os import json # print(os.environ.get('google_p_key')) credentials = json.loads(os.environ.get('google_p_key')) gc = gspread.service_account_from_dict(credentials) sh = gc.open_by_key("1b9o6uDO18sLxBqPwl_Gh9bnhW-ev_dABH83M5Vb5L8o") worksheet =...
0
0
0
0
0
1,343
0
0
69
6252e057a7f774fa6c73d66594dcda75d9fbb137
689
py
Python
MetaheuristicOptimization/Assignment2/TEST/NQUEENS_CODE_AND_DATA/convert.py
bhattacharjee/ml-assignments
631492b1f1aa1ace5365abfa7fec9c187e99d28a
[ "MIT" ]
null
null
null
MetaheuristicOptimization/Assignment2/TEST/NQUEENS_CODE_AND_DATA/convert.py
bhattacharjee/ml-assignments
631492b1f1aa1ace5365abfa7fec9c187e99d28a
[ "MIT" ]
null
null
null
MetaheuristicOptimization/Assignment2/TEST/NQUEENS_CODE_AND_DATA/convert.py
bhattacharjee/ml-assignments
631492b1f1aa1ace5365abfa7fec9c187e99d28a
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import sys filename = sys.argv[1] out_filename = filename[:-3] + "csv" with open(filename, "r", encoding='utf-16le') as inputFile: with open(out_filename, "w") as outputFile: lines = [line.strip() for line in inputFile.readlines()] lines = [line[2:] for line in lines if line.st...
28.708333
68
0.596517
#!/usr/bin/python3 import sys filename = sys.argv[1] out_filename = filename[:-3] + "csv" with open(filename, "r", encoding='utf-16le') as inputFile: with open(out_filename, "w") as outputFile: lines = [line.strip() for line in inputFile.readlines()] lines = [line[2:] for line in lines if line.st...
0
0
0
0
0
0
0
0
0
0782aa9b1306a84d232eb6fb81a8e64dd65ec477
1,039
py
Python
cli/iotexetl/utils/iotex_utils.py
blockchain-etl/iotex-etl
bd350c3190acac35d17532eff383e05d08011e24
[ "MIT" ]
3
2020-07-04T13:53:38.000Z
2020-07-30T15:07:35.000Z
cli/iotexetl/utils/iotex_utils.py
blockchain-etl/iotex-etl
bd350c3190acac35d17532eff383e05d08011e24
[ "MIT" ]
13
2020-07-16T06:07:33.000Z
2020-08-20T10:35:10.000Z
cli/iotexetl/utils/iotex_utils.py
blockchain-etl/iotex-etl
bd350c3190acac35d17532eff383e05d08011e24
[ "MIT" ]
1
2021-01-20T10:06:20.000Z
2021-01-20T10:06:20.000Z
from eth_hash.auto import keccak as keccak_256 DEFAULT_ADDRESS_PREFIX = 'io' def pubkey_to_address(pubkey, prefix=None): """This implements the algorithm described here https://github.com/iotexproject/iotex-address""" if prefix is None: prefix = DEFAULT_ADDRESS_PREFIX if pubkey is None or len(p...
27.342105
100
0.732435
import bech32 from eth_hash.auto import keccak as keccak_256 DEFAULT_ADDRESS_PREFIX = 'io' def set_iotex_utils_context(address_prefix): global DEFAULT_ADDRESS_PREFIX DEFAULT_ADDRESS_PREFIX = address_prefix def pubkey_to_address(pubkey, prefix=None): """This implements the algorithm described here https...
0
0
0
0
0
415
0
-8
91
297572fc491a36c41352e325663d421d04d40933
177
py
Python
Python/src/util/data.py
LN-STEMpunks/VexBot
f7bebe01ab35686cab92b8c2035d32f8f8372d64
[ "RSA-MD" ]
null
null
null
Python/src/util/data.py
LN-STEMpunks/VexBot
f7bebe01ab35686cab92b8c2035d32f8f8372d64
[ "RSA-MD" ]
null
null
null
Python/src/util/data.py
LN-STEMpunks/VexBot
f7bebe01ab35686cab92b8c2035d32f8f8372d64
[ "RSA-MD" ]
null
null
null
""" Input and output data """ from networktables import NetworkTables import logging logging.basicConfig(level=logging.DEBUG) SD = NetworkTables.getTable("SmartDashboard")
13.615385
45
0.785311
""" Input and output data """ from networktables import NetworkTables import logging logging.basicConfig(level=logging.DEBUG) SD = NetworkTables.getTable("SmartDashboard")
0
0
0
0
0
0
0
0
0
3cb80b80af56503f39e62a6900fb4e57018aac52
2,096
py
Python
NetTtest/res.py
FoyerSociety/QPC-SESAME
7512f9e038f7fb6070c40783f4b7bda812eb419b
[ "Unlicense" ]
1
2019-06-16T06:13:43.000Z
2019-06-16T06:13:43.000Z
NetTtest/res.py
FoyerSociety/QPC-SESAME
7512f9e038f7fb6070c40783f4b7bda812eb419b
[ "Unlicense" ]
null
null
null
NetTtest/res.py
FoyerSociety/QPC-SESAME
7512f9e038f7fb6070c40783f4b7bda812eb419b
[ "Unlicense" ]
null
null
null
import time listc = [] lists = [] print('debut') x = time.time() p1 = Find(1,50) p2 = Find(50,100) p3 = Find(100, 150) p4 = Find(150,200) p1.start() p2.start() p3.start() p4.start() for i in range(200, 250): print(time.time() - x , 's :', f'192.168.8.{i}') rep, non_rep = sr(IP(dst=f'192.168.8.{i}') / ICMP...
29.942857
122
0.435115
import time, threading from scapy.all import * listc = [] lists = [] print('debut') x = time.time() class Find(threading.Thread): def __init__(self, a, b): self.a = a self.b = b threading.Thread.__init__(self) def search(self, a, b): global listc for i in range(a, ...
0
0
0
1,229
0
0
0
13
45
347fe3f18ce0feef76ca7424f649fe2df32a9534
2,825
py
Python
taco/test/test_bedgraph.py
tacorna/taco
eeaeb879b8622365123edbc61ebc100d84194b80
[ "MIT" ]
22
2016-04-03T16:30:54.000Z
2022-03-07T23:01:08.000Z
taco/test/test_bedgraph.py
tacorna/taco
eeaeb879b8622365123edbc61ebc100d84194b80
[ "MIT" ]
18
2016-04-10T15:33:09.000Z
2022-02-06T15:53:25.000Z
taco/test/test_bedgraph.py
tacorna/taco
eeaeb879b8622365123edbc61ebc100d84194b80
[ "MIT" ]
5
2016-11-23T22:26:00.000Z
2021-06-09T11:23:20.000Z
''' TACO: Multi-sample transcriptome assembly from RNA-Seq '''
27.427184
71
0.647788
''' TACO: Multi-sample transcriptome assembly from RNA-Seq ''' import os import cStringIO import timeit import numpy as np from taco.lib.dtypes import FLOAT_DTYPE from taco.lib.bedgraph import array_to_bedgraph, bedgraph_to_array from taco.lib.cbedgraph import array_to_bedgraph as c_array_to_bedgraph def write_and_r...
0
0
0
0
0
2,330
0
85
339
823d5ccd7f4b25190eae376bdf8bf96d5298b941
6,202
py
Python
loaders.py
singleswitch/ticker
1e793316f2a3252d80339a69672ad81df550875d
[ "MIT" ]
null
null
null
loaders.py
singleswitch/ticker
1e793316f2a3252d80339a69672ad81df550875d
[ "MIT" ]
1
2018-11-06T09:30:23.000Z
2018-11-06T09:30:23.000Z
loaders.py
singleswitch/ticker
1e793316f2a3252d80339a69672ad81df550875d
[ "MIT" ]
1
2019-01-23T14:46:11.000Z
2019-01-23T14:46:11.000Z
"""* This file contains everything that has to be loaded from lookuptables e.g., the sound file lengths, the alphabet etc * Lookuptables stored in files, all depend on a root directory"""
45.270073
204
0.632215
import numpy as np import cPickle """* This file contains everything that has to be loaded from lookuptables e.g., the sound file lengths, the alphabet etc * Lookuptables stored in files, all depend on a root directory""" class FileLoader(): def __init__(self , i_root_dir): self.setRootDir(i_root_dir...
0
0
0
5,848
0
0
0
-10
172
d257ca048420318e5eb15a7666e242097d2ed7a8
394
py
Python
server.py
michaelrbock/hackers-job-apply
c5f6c26046946316067897cf9ab9b5e6d7310e8a
[ "MIT" ]
20
2015-05-28T20:08:55.000Z
2020-10-12T21:51:12.000Z
server.py
michaelrbock/hackers-job-apply
c5f6c26046946316067897cf9ab9b5e6d7310e8a
[ "MIT" ]
null
null
null
server.py
michaelrbock/hackers-job-apply
c5f6c26046946316067897cf9ab9b5e6d7310e8a
[ "MIT" ]
5
2016-02-16T13:54:04.000Z
2020-06-26T18:50:22.000Z
from flask import Flask app = Flask(__name__) if __name__ == "__main__": app.run(debug=True)
23.176471
109
0.64467
import os from flask import Flask, request app = Flask(__name__) @app.route('/', methods=["GET", "POST"]) def index(): if request.json and request.json.get("answer") == os.getenv("ANSWER"): return os.getenv("JOB_EMAIL") + "\n" return "%s %s" % (os.getenv("QUESTION"), "POST json to the server with the answer -> ...
0
253
0
0
0
0
0
-3
45
b4fa2855a728102eb7e89aa73c52415f48029918
1,782
py
Python
paypaladaptive/settings.py
amineck/django-paypal-adaptive
98a5d4674a4ae2b619ff4f9ee11240c27d03ac73
[ "CC-BY-3.0" ]
4
2015-01-21T10:42:21.000Z
2016-01-19T09:16:55.000Z
paypaladaptive/settings.py
amineck/django-paypal-adaptive
98a5d4674a4ae2b619ff4f9ee11240c27d03ac73
[ "CC-BY-3.0" ]
6
2015-01-14T22:13:10.000Z
2021-06-10T20:34:41.000Z
paypaladaptive/settings.py
amineck/django-paypal-adaptive
98a5d4674a4ae2b619ff4f9ee11240c27d03ac73
[ "CC-BY-3.0" ]
10
2015-03-23T14:16:30.000Z
2021-02-21T02:05:27.000Z
from datetime import timedelta from django.conf import settings from money import set_default_currency DEBUG = getattr(settings, "DEBUG", False) if DEBUG: # use sandboxes while in debug mode PAYPAL_ENDPOINT = 'https://svcs.sandbox.paypal.com/AdaptivePayments/' PAYPAL_PAYMENT_HOST = 'https://www.sandbox.p...
40.5
89
0.795174
from datetime import timedelta from django.conf import settings from money import set_default_currency DEBUG = getattr(settings, "DEBUG", False) if DEBUG: # use sandboxes while in debug mode PAYPAL_ENDPOINT = 'https://svcs.sandbox.paypal.com/AdaptivePayments/' PAYPAL_PAYMENT_HOST = 'https://www.sandbox.p...
0
0
0
0
0
0
0
0
0
a6c3a422b10ad2352d84749db1185f4c78782d2e
11,228
py
Python
vcd2json.py
anders-code/vcd2json
146384371f6b877b5a787c5bad2f9f171bad30e2
[ "MIT" ]
1
2022-01-29T23:32:40.000Z
2022-01-29T23:32:40.000Z
vcd2json.py
anders-code/vcd2json
146384371f6b877b5a787c5bad2f9f171bad30e2
[ "MIT" ]
null
null
null
vcd2json.py
anders-code/vcd2json
146384371f6b877b5a787c5bad2f9f171bad30e2
[ "MIT" ]
null
null
null
"""Create WaveJSON text string from VCD file."""
34.336391
77
0.483969
"""Create WaveJSON text string from VCD file.""" import sys class _SignalDef: def __init__(self, name, sid, length): self._name = name self._sid = sid self._length = length self._fmt = '' class WaveExtractor: def __init__(self, vcd_file, json_file, path_list): """ ...
0
438
0
10,634
0
0
0
-11
114
5ad1a42fbcf99a0df17e4be175d2b9c068c6de4d
593
py
Python
fish_core/scrapy/run_crawler.py
SylvanasSun/FishFishJump
696212d242d8d572f3f1b43925f3d8ab8acc6a2d
[ "MIT" ]
60
2018-03-09T07:06:10.000Z
2021-11-18T15:53:04.000Z
fish_core/scrapy/run_crawler.py
qiubaiying/FishFishJump
696212d242d8d572f3f1b43925f3d8ab8acc6a2d
[ "MIT" ]
1
2018-04-03T11:05:54.000Z
2018-04-03T20:06:41.000Z
fish_core/scrapy/run_crawler.py
qiubaiying/FishFishJump
696212d242d8d572f3f1b43925f3d8ab8acc6a2d
[ "MIT" ]
8
2018-03-12T03:07:00.000Z
2021-06-11T05:16:11.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import sched import time """ Perform crawling tasks on a regular basis, this module default starts crawler 'fish_simple_crawler' on the everyday. """ scheduler = sched.scheduler(time.time, time.sleep) if __name__ == '__main__': scheduler.enter(0, 0, crawl_sche...
21.962963
76
0.716695
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sched import time """ Perform crawling tasks on a regular basis, this module default starts crawler 'fish_simple_crawler' on the everyday. """ scheduler = sched.scheduler(time.time, time.sleep) def crawl_tasks(spider_name): os.system('scrapy cra...
0
0
0
0
0
161
0
-12
68
3c8a8feacb5678a703a405eb0fbe5a06f7f05dc1
437
py
Python
model/roi_layers/nms.py
ZhangHanbo/Visual-Manipulation-Relationship-Network-Pytorch
9dd24947db318f6e404918d4758f1d824eea3748
[ "MIT" ]
26
2019-10-31T08:21:46.000Z
2022-03-11T13:58:43.000Z
model/roi_layers/nms.py
moli1026/regrad
f66c38c00405b22cb746cc3f5c38d2b49f77d854
[ "MIT" ]
12
2019-11-07T09:12:50.000Z
2022-03-12T02:58:18.000Z
model/roi_layers/nms.py
moli1026/regrad
f66c38c00405b22cb746cc3f5c38d2b49f77d854
[ "MIT" ]
11
2019-10-30T08:44:47.000Z
2022-03-11T13:58:48.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # from ._utils import _C import torch if torch.__version__.split(".")[0] == "1": from torchvision.ops import nms elif torch.__version__ == "0.4.0": else: raise RuntimeError("unsupported torch version. Supported: 0.4.0 (recommended) and 1.x...
31.214286
91
0.713959
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # from ._utils import _C import torch if torch.__version__.split(".")[0] == "1": from torchvision.ops import nms elif torch.__version__ == "0.4.0": from model.nms.nms_wrapper import nms else: raise RuntimeError("unsupported torch versi...
0
0
0
0
0
0
0
16
26
2a873e86730c2b7e035acf29e0e6c9308282c3c7
1,834
py
Python
motion_sensor.py
joelghill/catcam
1b95b23d48bcaf42a028a90f728c0609b2ef9f79
[ "MIT" ]
1
2018-05-09T06:51:49.000Z
2018-05-09T06:51:49.000Z
motion_sensor.py
joelghill/catcam
1b95b23d48bcaf42a028a90f728c0609b2ef9f79
[ "MIT" ]
null
null
null
motion_sensor.py
joelghill/catcam
1b95b23d48bcaf42a028a90f728c0609b2ef9f79
[ "MIT" ]
null
null
null
#!/usr/bin/python import RPi.GPIO as GPIO #monitor = SonicDistanceMonitor(print_distance) #monitor.start(0.2)
26.970588
78
0.605234
#!/usr/bin/python import RPi.GPIO as GPIO import time class MotionDetector() : _input_pin = 11 _is_running = False _on_motion_detected = None def __init__(self, callback, input_pin=11) : """ Initializes a new instance of the SonicDistance class tigger is the GPIO pin connecte...
0
0
0
1,687
0
0
0
-10
45
d7fa59b9d3ca261fe2244e4fe4242ca509271090
682
py
Python
kfusiontables/kft/sync.py
kula1922/kfusiontables
149ddaddb95319a237bb94525db17b1b3a5ac66f
[ "BSD-3-Clause" ]
4
2016-04-10T10:27:36.000Z
2018-10-12T13:45:25.000Z
kfusiontables/kft/sync.py
kula1922/kfusiontables
149ddaddb95319a237bb94525db17b1b3a5ac66f
[ "BSD-3-Clause" ]
2
2020-06-05T17:30:32.000Z
2021-06-01T21:52:49.000Z
kfusiontables/kft/sync.py
kula1922/kfusiontables
149ddaddb95319a237bb94525db17b1b3a5ac66f
[ "BSD-3-Clause" ]
null
null
null
import logging logger = logging.getLogger(__name__)
27.28
73
0.617302
import logging from kfusiontables.kft import KFusionTables logger = logging.getLogger(__name__) class KFusionTablesSync(KFusionTables): def sync_tables(self, table_name=None, table_names=None, sender=None, senders=None, _all=None, force=None): """ Synchronize local tables to...
0
0
0
559
0
0
0
22
46
92f7c60c2ca087b46a3cac5a9312bc2c42f94484
11,399
py
Python
pyqode/core/_forms/search_panel_ui.py
haesleinhuepf/pyqode.core
88b9bab081fd580d4de86f3d926a9f0b19146d28
[ "MIT" ]
null
null
null
pyqode/core/_forms/search_panel_ui.py
haesleinhuepf/pyqode.core
88b9bab081fd580d4de86f3d926a9f0b19146d28
[ "MIT" ]
null
null
null
pyqode/core/_forms/search_panel_ui.py
haesleinhuepf/pyqode.core
88b9bab081fd580d4de86f3d926a9f0b19146d28
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/colin/dev/pyQode/pyqode.core/forms/search_panel.ui' # # Created by: PyQt5 UI code generator 5.5.1 # # WARNING! All changes made in this file will be lost!
58.45641
115
0.737258
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/colin/dev/pyQode/pyqode.core/forms/search_panel.ui' # # Created by: PyQt5 UI code generator 5.5.1 # # WARNING! All changes made in this file will be lost! from qtpy import QtCore, QtGui, QtWidgets class Ui_SearchPanel(object): de...
0
0
0
11,017
0
0
0
52
91
b59b2caf90924f8b1f174e18235105b36f87f29b
4,614
py
Python
main.py
kodo-pp/hse-ws10
9dbad128d2cbaa65a7d7ae4418f3a03736df0211
[ "Apache-2.0" ]
null
null
null
main.py
kodo-pp/hse-ws10
9dbad128d2cbaa65a7d7ae4418f3a03736df0211
[ "Apache-2.0" ]
null
null
null
main.py
kodo-pp/hse-ws10
9dbad128d2cbaa65a7d7ae4418f3a03736df0211
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python if __name__ == '__main__': main()
26.982456
108
0.596012
#!/usr/bin/env python import json import re import sys import time from argparse import ArgumentParser from queue import Queue import requests as rq from bs4 import BeautifulSoup from loguru import logger def parse_arguments(): ap = ArgumentParser( description = 'Download an HTML page, find HTTPS links ...
0
0
0
0
1,736
2,367
0
-15
453
2732bd4889b921a247d93555b57cc7fd26b0b357
24,762
py
Python
load_data.py
vincekurtz/gracenet
787ed3c559cd540bbbb53380d5b21879857fe254
[ "MIT" ]
null
null
null
load_data.py
vincekurtz/gracenet
787ed3c559cd540bbbb53380d5b21879857fe254
[ "MIT" ]
null
null
null
load_data.py
vincekurtz/gracenet
787ed3c559cd540bbbb53380d5b21879857fe254
[ "MIT" ]
1
2018-09-19T06:43:19.000Z
2018-09-19T06:43:19.000Z
#!/usr/bin/env python3 ## # # GraceNET v0.0 # # Predict future anomolies based soley on the past 24 months of # GRACE anomolies. This file generates training and testing data # saving both to json files # ## import random import csv import glob import json import datetime import numpy as np import matplotlib.pyplot ...
32.368627
125
0.593288
#!/usr/bin/env python3 ## # # GraceNET v0.0 # # Predict future anomolies based soley on the past 24 months of # GRACE anomolies. This file generates training and testing data # saving both to json files # ## import random import csv import glob import json import datetime import numpy as np import matplotlib.pyplot ...
0
0
0
0
0
2,895
0
0
228
8b51079e178a0d8d86e85b0424d64cfac8f46bb3
1,414
py
Python
template/config/train.py
penguinmenac3/deeptech-template
63df98f9ff69ab0dbbb0e38287810928c4173b11
[ "MIT" ]
null
null
null
template/config/train.py
penguinmenac3/deeptech-template
63df98f9ff69ab0dbbb0e38287810928c4173b11
[ "MIT" ]
null
null
null
template/config/train.py
penguinmenac3/deeptech-template
63df98f9ff69ab0dbbb0e38287810928c4173b11
[ "MIT" ]
null
null
null
"""doc # Train Config This is the main configuration file used for training the approach. """ from deeptech.core import cli # Run with parameters parsed from commandline. # python -m deeptech.examples.mnist_simple --mode=train --input=Datasets --output=Results if __name__ == "__main__": cli.run(FashionMNISTConf...
36.25641
113
0.755304
"""doc # Train Config This is the main configuration file used for training the approach. """ import os from deeptech.core import Config, cli from deeptech.model.module_from_json import Module from deeptech.training.trainers import SupervisedTrainer from deeptech.training.optimizers import smart_optimizer from torch.o...
0
0
0
747
0
0
0
165
178
0d6c2a22e6d4c282df65ea5887d039eeeed9275c
12,871
py
Python
.tox/scenario/lib/python2.7/site-packages/psutil/_psbsd.py
bdrich/neutron-lbaas
b4711abfe0207c4fdd5d7fb7ecbf017e753abbfd
[ "Apache-2.0" ]
null
null
null
.tox/scenario/lib/python2.7/site-packages/psutil/_psbsd.py
bdrich/neutron-lbaas
b4711abfe0207c4fdd5d7fb7ecbf017e753abbfd
[ "Apache-2.0" ]
null
null
null
.tox/scenario/lib/python2.7/site-packages/psutil/_psbsd.py
bdrich/neutron-lbaas
b4711abfe0207c4fdd5d7fb7ecbf017e753abbfd
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """FreeBSD platform implementation.""" import errno import os import sys import warnings import _psutil_bsd import _psutil_posix ...
34.050265
80
0.681688
#!/usr/bin/env python # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """FreeBSD platform implementation.""" import errno import os import sys import warnings import _psutil_bsd import _psutil_posix ...
0
5,364
0
1,618
0
1,045
0
7
143
ff394a1171c293e681f64072878f8148762d365e
2,100
py
Python
tap_linkedin_marketing/executor.py
Radico/tap-linkedin-marketing
4ccd48bfdfa109955d4eb1c9ae5d81ff0c1f40bb
[ "Apache-2.0" ]
null
null
null
tap_linkedin_marketing/executor.py
Radico/tap-linkedin-marketing
4ccd48bfdfa109955d4eb1c9ae5d81ff0c1f40bb
[ "Apache-2.0" ]
null
null
null
tap_linkedin_marketing/executor.py
Radico/tap-linkedin-marketing
4ccd48bfdfa109955d4eb1c9ae5d81ff0c1f40bb
[ "Apache-2.0" ]
1
2020-10-08T16:49:59.000Z
2020-10-08T16:49:59.000Z
import singer LOGGER = singer.get_logger()
27.272727
71
0.543333
import singer from tap_kit import TapExecutor from tap_kit.utils import (transform_write_and_count) LOGGER = singer.get_logger() class LinkedInExecutor(TapExecutor): def __init__(self, streams, args, client): """ Args: streams (arr[Stream]) args (dict) client...
0
0
0
1,945
0
0
0
42
68
3c5b2df441b90277fa6a7b32261e00006b20d450
566
py
Python
products/migrations/0009_auto_20200310_1903.py
JayPeaa/msproject5
89ee3e52cbefc686104389f91770581b88349020
[ "MIT" ]
null
null
null
products/migrations/0009_auto_20200310_1903.py
JayPeaa/msproject5
89ee3e52cbefc686104389f91770581b88349020
[ "MIT" ]
12
2020-02-12T02:53:42.000Z
2022-03-12T00:17:00.000Z
products/migrations/0009_auto_20200310_1903.py
JayPeaa/msproject5
89ee3e52cbefc686104389f91770581b88349020
[ "MIT" ]
1
2020-04-11T12:31:12.000Z
2020-04-11T12:31:12.000Z
# Generated by Django 2.1.14 on 2020-03-10 19:03
23.583333
70
0.591873
# Generated by Django 2.1.14 on 2020-03-10 19:03 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('products', '0008_auto_20200307_1352'), ] operations = [ migrations.RemoveField( model_name='product', name='product...
0
0
0
451
0
0
0
19
46
73a63e4efac203c167f98bcd9a2ff16d6821760c
4,158
py
Python
core/src/models.py
fall2021-csc510-group40/filmfan
da42fdcc713f2b22debc1da9a09dc7a82aa5b66b
[ "MIT" ]
1
2021-09-20T00:34:27.000Z
2021-09-20T00:34:27.000Z
core/src/models.py
fall2021-csc510-group40/filmfan
da42fdcc713f2b22debc1da9a09dc7a82aa5b66b
[ "MIT" ]
36
2021-10-29T19:02:23.000Z
2021-11-16T03:06:01.000Z
core/src/models.py
pncnmnp/SE21-project
da42fdcc713f2b22debc1da9a09dc7a82aa5b66b
[ "MIT" ]
1
2022-02-25T03:07:26.000Z
2022-02-25T03:07:26.000Z
""" This package defines database models and relations used """ from . import db movie_favorites = db.Table( 'movie_favorites', db.Column('user_id', db.Integer, db.ForeignKey('user.id'), primary_key=True), db.Column('movie_id', db.Integer, db.ForeignKey(f'{MovieHandle.__tablename__}.id'), primary_key=Tr...
31.740458
106
0.61544
""" This package defines database models and relations used """ from . import db from flask_login import UserMixin from werkzeug.security import generate_password_hash, check_password_hash class MovieHandle(db.Model): """ MovieHandle class provides a representation of a movie id for the database """ i...
0
0
0
3,418
0
0
0
64
113
282aaaeff385e415d0b0f70d80c9a913e92b0bfc
3,092
py
Python
python/itertools_combinations_2.py
Hamng/python-sources
0cc5a5d9e576440d95f496edcfd921ae37fcd05a
[ "Unlicense" ]
null
null
null
python/itertools_combinations_2.py
Hamng/python-sources
0cc5a5d9e576440d95f496edcfd921ae37fcd05a
[ "Unlicense" ]
1
2019-02-23T18:30:51.000Z
2019-02-23T18:30:51.000Z
python/itertools_combinations_2.py
Hamng/python-sources
0cc5a5d9e576440d95f496edcfd921ae37fcd05a
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Mar 5 00:39:20 2019 @author: Ham HackerRanch Challenge: Iterable and Iterators The itertools module standardizes a core set of fast, memory efficient tools that are useful by themselves or in combination. Together, they form an iterator algebra making it possible...
29.730769
95
0.651682
# -*- coding: utf-8 -*- """ Created on Tue Mar 5 00:39:20 2019 @author: Ham HackerRanch Challenge: Iterable and Iterators The itertools module standardizes a core set of fast, memory efficient tools that are useful by themselves or in combination. Together, they form an iterator algebra making it possible...
0
0
0
0
0
0
0
0
0
1249771607a589243d9d0012abde96e177516f07
236
py
Python
setup.py
pallogu/numerai
6f5d6b31e86d27030b041f8591e0122894128e59
[ "FTL" ]
null
null
null
setup.py
pallogu/numerai
6f5d6b31e86d27030b041f8591e0122894128e59
[ "FTL" ]
null
null
null
setup.py
pallogu/numerai
6f5d6b31e86d27030b041f8591e0122894128e59
[ "FTL" ]
null
null
null
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Fun project to explore numer.ai modelling of market trends', author='Arvpau', license='', )
21.454545
77
0.677966
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Fun project to explore numer.ai modelling of market trends', author='Arvpau', license='', )
0
0
0
0
0
0
0
0
0
54db4693e1cf294e42ce5591b68d9cdb70403b91
4,356
py
Python
OCR.py
Sunil7545/OCRProjectTeamTwo
6124b0440421acfd28524988171d0061507d53dd
[ "MIT" ]
null
null
null
OCR.py
Sunil7545/OCRProjectTeamTwo
6124b0440421acfd28524988171d0061507d53dd
[ "MIT" ]
2
2022-01-13T02:02:43.000Z
2022-03-12T00:11:03.000Z
OCR.py
Sunil7545/OCRProjectTeamTwo
6124b0440421acfd28524988171d0061507d53dd
[ "MIT" ]
2
2019-12-27T19:07:27.000Z
2020-01-17T15:06:13.000Z
''' This program will convert PDFs into images and read text from those images and print the text over the screen. This can also extract text directly from images and print it out. ''' # try is used to keep a check over the import. If there is an error, it will not close # the program, but instead execute the except s...
36.3
96
0.665289
''' This program will convert PDFs into images and read text from those images and print the text over the screen. This can also extract text directly from images and print it out. ''' import os # try is used to keep a check over the import. If there is an error, it will not close # the program, but instead execute th...
0
0
0
3,337
0
0
0
15
115
61a82ac910dabe7ebb8ace667d6eced2cc315462
1,671
py
Python
tests/ros_comm/test_asserts.py
ros-testing/rospbt
db708ba9c326920b222ef5662b0326db9397d718
[ "Apache-2.0" ]
null
null
null
tests/ros_comm/test_asserts.py
ros-testing/rospbt
db708ba9c326920b222ef5662b0326db9397d718
[ "Apache-2.0" ]
11
2018-05-11T15:37:20.000Z
2018-07-30T19:10:47.000Z
tests/ros_comm/test_asserts.py
ros-testing/rospbt
db708ba9c326920b222ef5662b0326db9397d718
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*-
25.707692
86
0.775583
# -*- coding: utf-8 -*- import pytest from rostestplus.ros_comm.asserts import ( AssertException, assert_node_pingable, assert_node_listed, assert_node_listed_on_machine, assert_service_response_success_true, ) def test_assert_node_pingable_doesnt_raise_exception_for_existing_node(): fake_st...
0
0
0
0
0
1,286
0
163
184
3f63d509b9f70233de4928b087d43a1d0bf024cc
3,229
py
Python
model-optimizer/mo/ops/pad_test.py
JOCh1958/openvino
070201feeec5550b7cf8ec5a0ffd72dc879750be
[ "Apache-2.0" ]
1
2021-04-06T03:32:12.000Z
2021-04-06T03:32:12.000Z
model-optimizer/mo/ops/pad_test.py
JOCh1958/openvino
070201feeec5550b7cf8ec5a0ffd72dc879750be
[ "Apache-2.0" ]
28
2021-09-24T09:29:02.000Z
2022-03-28T13:20:46.000Z
model-optimizer/mo/ops/pad_test.py
JOCh1958/openvino
070201feeec5550b7cf8ec5a0ffd72dc879750be
[ "Apache-2.0" ]
1
2020-08-30T11:48:03.000Z
2020-08-30T11:48:03.000Z
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0
33.635417
120
0.539486
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import unittest import numpy as np from mo.graph.graph import Node from mo.ops.pad import Pad, AttributedPad from mo.utils.unittest.graph import build_graph class TestPadOps(unittest.TestCase): node_attrs = { 'data_in': {...
0
0
0
2,963
0
0
0
47
136
cf2a2de27769f700c32eae12f1013f8529c4d8cf
835
py
Python
backend/wod_board/models/__init__.py
GuillaumeOj/P13-WOD-Board
36df7979e63c354507edb56eabdfc548b1964d08
[ "MIT" ]
null
null
null
backend/wod_board/models/__init__.py
GuillaumeOj/P13-WOD-Board
36df7979e63c354507edb56eabdfc548b1964d08
[ "MIT" ]
82
2021-01-17T18:12:23.000Z
2021-06-12T21:46:49.000Z
backend/wod_board/models/__init__.py
GuillaumeOj/WodBoard
1ac12404f6094909c9bf116bcaf6ccd60e85bc00
[ "MIT" ]
null
null
null
import sqlalchemy import sqlalchemy.orm from wod_board import config Base = sqlalchemy.orm.declarative_base() engine = sqlalchemy.create_engine(config.DATABASE_URL) Session = sqlalchemy.orm.sessionmaker(bind=engine, class_=sqlalchemy.orm.Session) # Import each model fo Alembic
21.973684
81
0.732934
import sqlalchemy import sqlalchemy.orm from wod_board import config Base = sqlalchemy.orm.declarative_base() engine = sqlalchemy.create_engine(config.DATABASE_URL) Session = sqlalchemy.orm.sessionmaker(bind=engine, class_=sqlalchemy.orm.Session) def get_db(): db = Session() try: yield db fin...
0
0
0
0
69
88
0
111
279
99e693da437969ae877a9c639beb2e1c016d3c3c
1,727
py
Python
qatrack/parts/migrations/0014_auto_20201230_0955.py
crcrewso/qatrackplus
b9da3bc542d9e3eca8b7291bb631d1c7255d528e
[ "MIT" ]
20
2021-03-11T18:37:32.000Z
2022-03-23T19:38:07.000Z
qatrack/parts/migrations/0014_auto_20201230_0955.py
crcrewso/qatrackplus
b9da3bc542d9e3eca8b7291bb631d1c7255d528e
[ "MIT" ]
75
2021-02-12T02:37:33.000Z
2022-03-29T20:56:16.000Z
qatrack/parts/migrations/0014_auto_20201230_0955.py
crcrewso/qatrackplus
b9da3bc542d9e3eca8b7291bb631d1c7255d528e
[ "MIT" ]
5
2021-04-07T15:46:53.000Z
2021-09-18T16:55:00.000Z
# Generated by Django 2.1.15 on 2020-12-30 14:55
31.4
107
0.659525
# Generated by Django 2.1.15 on 2020-12-30 14:55 import os from django.conf import settings from django.db import migrations from django.db.migrations.recorder import MigrationRecorder def alter_unique(apps, schema): from django.db import connection, transaction cursor = connection.cursor() cursor.execu...
0
0
0
457
0
1,035
0
48
135
00d47b939f359f3dcf59c98e277e76e10ecbf25e
5,108
py
Python
app/main.py
prav10194/automated-twitter-reddit-app
7c44dbb998d4124589e7c8d74fa0b6e09c2aea40
[ "MIT" ]
null
null
null
app/main.py
prav10194/automated-twitter-reddit-app
7c44dbb998d4124589e7c8d74fa0b6e09c2aea40
[ "MIT" ]
null
null
null
app/main.py
prav10194/automated-twitter-reddit-app
7c44dbb998d4124589e7c8d74fa0b6e09c2aea40
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from flask import Flask from flask_cors import CORS import requests import dropbox app = Flask(__name__) cors = CORS(app) app.config['CORS_HEADERS'] = 'Content-Type' import praw import os dbx = dropbox.Dropbox(os.environ.get('DROPBOX_ACCESS_TOKEN')) reddit = praw.Reddit( cl...
45.607143
166
0.57224
from __future__ import unicode_literals from flask import Flask, render_template, request from flask_cors import CORS, cross_origin import requests import dropbox app = Flask(__name__) cors = CORS(app) app.config['CORS_HEADERS'] = 'Content-Type' import praw import requests import youtube_dl import random import time...
0
4,156
0
0
0
0
0
12
134
072864afc42d7a2bd9cbf5cb71e2e0a705e39792
3,651
py
Python
dgaintel/predict.py
ffontaine/dgaintel
6b2ed1023c73fd3449571380eca34e17f919114b
[ "MIT" ]
null
null
null
dgaintel/predict.py
ffontaine/dgaintel
6b2ed1023c73fd3449571380eca34e17f919114b
[ "MIT" ]
null
null
null
dgaintel/predict.py
ffontaine/dgaintel
6b2ed1023c73fd3449571380eca34e17f919114b
[ "MIT" ]
null
null
null
''' Main prediction module for dgaintel package ''' import os import numpy as np from tensorflow.keras.models import load_model DIR_PATH = os.path.dirname(os.path.abspath(__file__)) SAVED_MODEL_PATH = os.path.join(DIR_PATH, 'domain_classifier_model.h5') MODEL = load_model(SAVED_MODEL_PATH) CHAR2IDX = {'-': 0, '.': 1,...
30.680672
83
0.575185
''' Main prediction module for dgaintel package ''' import os import numpy as np from tensorflow.keras.models import load_model DIR_PATH = os.path.dirname(os.path.abspath(__file__)) SAVED_MODEL_PATH = os.path.join(DIR_PATH, 'domain_classifier_model.h5') MODEL = load_model(SAVED_MODEL_PATH) CHAR2IDX = {'-': 0, '.': 1,...
0
0
0
0
0
689
0
0
46
4521ed0e587cc3e49439300b7abac40ba3de6383
17,394
py
Python
python/deepLearningPlotter.py
cms-ttbarAC/CyMiniAna
405b1ac6639f8a93297e847180b5a6ab58f9a06c
[ "MIT" ]
null
null
null
python/deepLearningPlotter.py
cms-ttbarAC/CyMiniAna
405b1ac6639f8a93297e847180b5a6ab58f9a06c
[ "MIT" ]
31
2017-10-26T16:11:32.000Z
2018-08-13T14:39:56.000Z
python/deepLearningPlotter.py
cms-ttbarAC/cheetah
76457d3cb3936dac5c78957b66b3b8aa213ca2b7
[ "MIT" ]
1
2018-07-24T20:32:35.000Z
2018-07-24T20:32:35.000Z
""" Created: 11 November 2016 Last Updated: 16 February 2018 Dan Marley daniel.edison.marley@cernSPAMNOT.ch Texas A&M University ----- Base class for plotting deep learning Designed for running on desktop at TAMU with specific set of software installed --> not guaranteed to work in CMSSW environment! Doe...
39.531818
144
0.593825
""" Created: 11 November 2016 Last Updated: 16 February 2018 Dan Marley daniel.edison.marley@cernSPAMNOT.ch Texas A&M University ----- Base class for plotting deep learning Designed for running on desktop at TAMU with specific set of software installed --> not guaranteed to work in CMSSW environment! Doe...
0
0
0
16,514
0
0
0
84
334
834408ee97e14fc2967196b73b32178bcfe126ec
5,078
py
Python
parametric_problems/lasso.py
BerkeleyAutomation/rlqp_benchmarks
5c79e870c4bd697383f66f5dff26aea29dc1ebfa
[ "Apache-2.0" ]
49
2017-11-18T11:16:44.000Z
2021-05-05T12:48:33.000Z
parametric_problems/lasso.py
leiyubiao/osqp_benchmarks
5c79e870c4bd697383f66f5dff26aea29dc1ebfa
[ "Apache-2.0" ]
5
2017-11-18T20:10:25.000Z
2020-09-27T09:06:58.000Z
parametric_problems/lasso.py
leiyubiao/osqp_benchmarks
5c79e870c4bd697383f66f5dff26aea29dc1ebfa
[ "Apache-2.0" ]
19
2017-11-18T20:13:31.000Z
2021-05-06T01:27:31.000Z
""" Solve Lasso problem as parametric QP by updating iteratively lambda """ # import osqppurepy as osqp
32.343949
83
0.521268
""" Solve Lasso problem as parametric QP by updating iteratively lambda """ import numpy as np import pandas as pd import os from solvers.solvers import SOLVER_MAP # AVOID CIRCULAR DEPENDENCY from problem_classes.lasso import LassoExample from utils.general import make_sure_path_exists # import osqppurepy as osqp impo...
0
0
0
4,726
0
0
0
41
206
e1bd1d8d7ce5622633bf24fc68ec450788976faa
74,865
py
Python
src/datalad_installer.py
datalad/datalad-installer
93a4c7a032aef42af59fc889e61d9e4c78f0f1bb
[ "MIT" ]
2
2021-07-06T11:51:44.000Z
2022-03-01T08:03:01.000Z
src/datalad_installer.py
datalad/datalad-installer
93a4c7a032aef42af59fc889e61d9e4c78f0f1bb
[ "MIT" ]
88
2020-12-15T16:12:58.000Z
2022-03-25T20:48:31.000Z
src/datalad_installer.py
datalad/datalad-installer
93a4c7a032aef42af59fc889e61d9e4c78f0f1bb
[ "MIT" ]
2
2020-12-24T03:03:29.000Z
2022-01-06T01:28:36.000Z
#!/usr/bin/env python3 """ Installation script for Datalad and related components ``datalad-installer`` is a script for installing Datalad_, git-annex_, and related components all in a single invocation. It requires no third-party Python libraries, though it does make heavy use of external packaging commands. .. _Da...
34.263158
96
0.562773
#!/usr/bin/env python3 """ Installation script for Datalad and related components ``datalad-installer`` is a script for installing Datalad_, git-annex_, and related components all in a single invocation. It requires no third-party Python libraries, though it does make heavy use of external packaging commands. .. _Da...
0
41,368
0
25,017
0
1,927
0
147
1,163
0ad7f61aed9b153afd213f5a01cf465a50844018
9,205
py
Python
moabb/paradigms/ssvep.py
plcrodrigues/moabb
aa4274fe7905631864e854c121c92e1927061f29
[ "BSD-3-Clause" ]
321
2017-06-03T16:14:45.000Z
2022-03-28T17:43:59.000Z
moabb/paradigms/ssvep.py
plcrodrigues/moabb
aa4274fe7905631864e854c121c92e1927061f29
[ "BSD-3-Clause" ]
223
2017-06-03T17:41:57.000Z
2022-03-29T09:07:44.000Z
moabb/paradigms/ssvep.py
girafe-ai/moabb
78bbb48a2a0058b0725ebeba1ba1e3203f0eacd5
[ "BSD-3-Clause" ]
118
2017-06-03T18:36:35.000Z
2022-03-16T06:22:02.000Z
"""Steady-State Visually Evoked Potentials Paradigms""" import logging log = logging.getLogger(__name__)
34.475655
86
0.610864
"""Steady-State Visually Evoked Potentials Paradigms""" import logging from moabb.datasets import utils from moabb.datasets.fake import FakeDataset from moabb.paradigms.base import BaseParadigm log = logging.getLogger(__name__) class BaseSSVEP(BaseParadigm): """Base SSVEP Paradigm Parameters --------...
18
546
0
8,325
0
0
0
57
159
3bce5d801f2b7e46030a48b54ef5fc9e31dec0f2
394
py
Python
.ipython/profile_default/startup/startup_file.py
mmphego/dot-files
0563646cd9e9d627c08c710000afcc038a55fa2c
[ "MIT" ]
29
2019-03-03T17:54:46.000Z
2021-12-05T00:06:30.000Z
.ipython/profile_default/startup/startup_file.py
deltakapa/dot-files
bb43088d2bcea15e892dfa45bff934b8e7399e17
[ "MIT" ]
1
2019-03-04T05:41:14.000Z
2019-03-04T05:41:14.000Z
.ipython/profile_default/startup/startup_file.py
deltakapa/dot-files
bb43088d2bcea15e892dfa45bff934b8e7399e17
[ "MIT" ]
6
2019-03-03T17:50:34.000Z
2021-01-18T13:12:45.000Z
import sys modulenames = ", ".join(list(set(sys.modules) & set(globals()))) msg = "---> Automagically imported these packages (if available): {}".format(modulenames) formatted_msg = Style.LINE + Style.BOLD + Style.RED + msg + Style.END print(formatted_msg)
21.888889
89
0.659898
import os import subprocess import sys import time class Style: BOLD = "\033[1m" END = "\033[0m\n" RED = "\033[91m" LINE = "\n" modulenames = ", ".join(list(set(sys.modules) & set(globals()))) msg = "---> Automagically imported these packages (if available): {}".format(modulenames) formatted_msg = S...
0
0
0
71
0
0
0
-26
89
3bdcdb5f7e2a731cc8ba3d1d150a2d7eaeb46753
1,602
py
Python
tests/test_parser_helpers.py
zagaran/instant-census
62dd5bbc62939f43776a10708ef663722ead98af
[ "MIT" ]
1
2021-06-01T17:03:47.000Z
2021-06-01T17:03:47.000Z
tests/test_parser_helpers.py
zagaran/instant-census
62dd5bbc62939f43776a10708ef663722ead98af
[ "MIT" ]
null
null
null
tests/test_parser_helpers.py
zagaran/instant-census
62dd5bbc62939f43776a10708ef663722ead98af
[ "MIT" ]
null
null
null
# from parsers.number_parser import text2int # text2int_tests = { # "twenty-two" : 22, # "ninety seven" : 97, # "one hundred thirty seven" : 137, # "one million" : 1000000, # "fiftieth" : 50, # "four-hundred and forty-fourth" : 444, # "eighty" : 80, # "ten thousand and one" : 10001, # ...
31.411765
86
0.519975
from tests.common import InstantCensusTestCase from utils.parser_helpers import split_standard_separators # from parsers.number_parser import text2int from string import whitespace as WHITESPACE_CHARS class TestParserHelpers(InstantCensusTestCase): SPLIT_STRING_TESTS = { #simple splitting cases 'a...
0
0
0
787
0
0
0
90
89
1f48ee108a1a017bfe9393336c3a466100542c05
206
py
Python
millisecond1/millisecond1_1.py
Walop/AdventOfCode2017
32786e46d8fdfb5c824b72403cbc1a8858bac2bb
[ "MIT" ]
null
null
null
millisecond1/millisecond1_1.py
Walop/AdventOfCode2017
32786e46d8fdfb5c824b72403cbc1a8858bac2bb
[ "MIT" ]
null
null
null
millisecond1/millisecond1_1.py
Walop/AdventOfCode2017
32786e46d8fdfb5c824b72403cbc1a8858bac2bb
[ "MIT" ]
null
null
null
with open("input", "r") as file: input = file.read() nums = list(input) sum = 0 for i in range(0, len(nums)): if nums[i] == nums[i-1]: sum += int(nums[i]) print(sum)
22.888889
33
0.490291
with open("input", "r") as file: input = file.read() nums = list(input) sum = 0 for i in range(0, len(nums)): if nums[i] == nums[i-1]: sum += int(nums[i]) print(sum)
0
0
0
0
0
0
0
0
0
a6b98cf550cbc9c04e82fd726c98a3cd54cc8498
15,173
py
Python
framework-nucleus-segmentation/mrcnn/samples/cell/cell.py
CBIIT/nci-hitif
2f825cbcba92ff2fdffac60de56604578f31e937
[ "MIT" ]
null
null
null
framework-nucleus-segmentation/mrcnn/samples/cell/cell.py
CBIIT/nci-hitif
2f825cbcba92ff2fdffac60de56604578f31e937
[ "MIT" ]
8
2020-04-13T18:52:30.000Z
2022-02-10T01:18:21.000Z
mrcnn/samples/cell/cell.py
usnistgov/WIPP-fpn-inference-plugin
a3356305dcf2f3196833690c56f6bf5599de3d08
[ "MIT" ]
3
2018-07-10T15:19:54.000Z
2021-02-16T17:10:01.000Z
import tensorflow as tf tf_version = int((tf.__version__).split('.')[0]) if tf_version >= 2: import tensorflow.compat.v1 as tf tf.disable_v2_behavior() import os import numpy as np import warnings; warnings.simplefilter('ignore') import time import h5py # Root directory of the project ROOT_DIR = os.path.abspa...
33.056645
173
0.598827
import tensorflow as tf tf_version = int((tf.__version__).split('.')[0]) if tf_version >= 2: import tensorflow.compat.v1 as tf tf.disable_v2_behavior() import os import sys import random import numpy as np import cv2 import skimage.io import warnings; warnings.simplefilter('ignore') import time import h5py # ...
0
0
0
7,571
0
0
0
-12
201
2025037e1bf63d94579a9569795dc83706d80bac
2,749
py
Python
examples/adafruit_io_simpletest_esp_at.py
willingc/Adafruit_CircuitPython_AdafruitIO
9f47ce31564f952072b804a162d738d1c872aa28
[ "MIT" ]
null
null
null
examples/adafruit_io_simpletest_esp_at.py
willingc/Adafruit_CircuitPython_AdafruitIO
9f47ce31564f952072b804a162d738d1c872aa28
[ "MIT" ]
null
null
null
examples/adafruit_io_simpletest_esp_at.py
willingc/Adafruit_CircuitPython_AdafruitIO
9f47ce31564f952072b804a162d738d1c872aa28
[ "MIT" ]
null
null
null
""" Usage example of the ESP32 over UART using the CircuitPython ESP_ATControl library. Dependencies: * https://github.com/adafruit/Adafruit_CircuitPython_ESP_ATcontrol """ from random import randint import board import busio from digitalio import DigitalInOut # Import Adafruit IO REST Client from adafruit_io.ada...
32.341176
95
0.772645
""" Usage example of the ESP32 over UART using the CircuitPython ESP_ATControl library. Dependencies: * https://github.com/adafruit/Adafruit_CircuitPython_ESP_ATcontrol """ from random import randint import board import busio from digitalio import DigitalInOut # Import Adafruit IO REST Client from adafruit_io.ada...
0
0
0
0
0
0
0
0
0
d9548f1abcc0c877d3c68c744296db8df25eecf0
2,925
py
Python
toil/src/toil_marginphase/scripts/split_bam_by_coordinate.py
sachet-mittal/marginPhase
afe6c69825c5c51f02131b9f675a7d2c2d2c164e
[ "MIT" ]
34
2017-08-07T00:24:11.000Z
2021-11-19T04:34:44.000Z
toil/src/toil_marginphase/scripts/split_bam_by_coordinate.py
sachet-mittal/marginPhase
afe6c69825c5c51f02131b9f675a7d2c2d2c164e
[ "MIT" ]
12
2018-04-16T06:34:53.000Z
2022-03-04T03:40:48.000Z
toil/src/toil_marginphase/scripts/split_bam_by_coordinate.py
sachet-mittal/marginPhase
afe6c69825c5c51f02131b9f675a7d2c2d2c164e
[ "MIT" ]
10
2017-02-18T03:48:23.000Z
2020-01-07T00:57:21.000Z
#!/usr/bin/env python from __future__ import print_function CHR = "c" START = "s" END = "e" DESC = "d" if __name__ == "__main__": main()
37.5
128
0.6
#!/usr/bin/env python from __future__ import print_function import argparse import glob import os import subprocess import sys CHR = "c" START = "s" END = "e" DESC = "d" def parse_args(): parser = argparse.ArgumentParser("Split BAM by region") parser.add_argument('--input_bam_glob', '-i', dest='input_bam_gl...
0
0
0
0
0
2,638
0
-43
179
06d1b0decc735be6856a071f3dfe2d0445118634
2,520
py
Python
select.py
rmccartney856/marvelMovieSelector
8adaef2ce1ed2c83c840f36ff74312b4322d3cec
[ "MIT" ]
2
2019-03-31T23:00:31.000Z
2019-03-31T23:00:34.000Z
select.py
rmccartney856/marvelMovieSelector
8adaef2ce1ed2c83c840f36ff74312b4322d3cec
[ "MIT" ]
null
null
null
select.py
rmccartney856/marvelMovieSelector
8adaef2ce1ed2c83c840f36ff74312b4322d3cec
[ "MIT" ]
null
null
null
#NAME: select.py #DATE: 31/03/2019 import tkinter as tk from PIL import Image, ImageTk coverPath = "noimage.png" root = tk.Tk() root.title("Marvel Movie Generator") root.configure(background='black') #size of the window root.geometry("450x880") frame = tk.Frame(root) frame.pack() buttonGenerate = tk.Button...
30.361446
128
0.702381
#NAME: select.py #DATE: 31/03/2019 import json import time import random import tkinter as tk from PIL import Image, ImageTk coverPath = "noimage.png" def generate(): #Open Movie File marvelMovies = open('movies.json').read() marvel = json.loads(marvelMovies) #Select Random Phase print("Selecti...
0
0
0
0
0
1,116
0
-28
90
91a51dcbfc685464fa605e651f220b09aaf8f706
15,440
py
Python
tests/test_utils.py
radioactivedecay/radioactivedecay
39b9cf45465f8ed54dc67bc35a3bb20bd8c257c7
[ "MIT" ]
12
2021-11-12T21:15:22.000Z
2022-03-30T12:36:03.000Z
tests/test_utils.py
radioactivedecay/radioactivedecay
39b9cf45465f8ed54dc67bc35a3bb20bd8c257c7
[ "MIT" ]
15
2021-11-08T03:30:41.000Z
2022-03-21T07:24:48.000Z
tests/test_utils.py
radioactivedecay/radioactivedecay
39b9cf45465f8ed54dc67bc35a3bb20bd8c257c7
[ "MIT" ]
3
2021-11-07T16:33:19.000Z
2022-02-10T09:50:42.000Z
""" Unit tests for utils.py functions. """ import unittest if __name__ == "__main__": unittest.main()
44.240688
94
0.629922
""" Unit tests for utils.py functions. """ import unittest import numpy as np from sympy import Integer, log from radioactivedecay.utils import ( get_metastable_chars, Z_to_elem, elem_to_Z, build_id, build_nuclide_string, NuclideStrError, parse_nuclide_str, parse_id, parse_nuclide, ...
0
0
0
14,927
0
0
0
290
112
f4ed724a958fb55e950f7a8e3a6a1c517973e5d2
759
py
Python
flexslider/models.py
ForumDev/djangocms-flexslider
181168aa9752d7023e03880b27004b886c96afdf
[ "MIT" ]
null
null
null
flexslider/models.py
ForumDev/djangocms-flexslider
181168aa9752d7023e03880b27004b886c96afdf
[ "MIT" ]
null
null
null
flexslider/models.py
ForumDev/djangocms-flexslider
181168aa9752d7023e03880b27004b886c96afdf
[ "MIT" ]
1
2020-10-12T06:32:34.000Z
2020-10-12T06:32:34.000Z
# Create your models here.
44.647059
116
0.716733
from django.db import models from cms.models.pluginmodel import CMSPlugin from django.utils.http import int_to_base36 # Create your models here. class Slide(models.Model): title = models.CharField(max_length=25) index = models.IntegerField(default=0) descript = models.TextField(default='') short_name =...
0
0
0
591
0
0
0
52
89