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
2d74716a061b9c90a72957614d5e209d6f7bcfd9
689
py
Python
Unit_4/Data_Analysis.py
coffeelabor/CIS289_Reed_James
6d1bc126d6b50411f2bad1d65cfeebd47b68a6ff
[ "MIT" ]
null
null
null
Unit_4/Data_Analysis.py
coffeelabor/CIS289_Reed_James
6d1bc126d6b50411f2bad1d65cfeebd47b68a6ff
[ "MIT" ]
null
null
null
Unit_4/Data_Analysis.py
coffeelabor/CIS289_Reed_James
6d1bc126d6b50411f2bad1d65cfeebd47b68a6ff
[ "MIT" ]
null
null
null
''' /*************************************************************** * Name: Pandas Data Analysis * Author: Reed James * Created: 22 Sept 2021 * Course: CIS 289 - Python * Version: Python 3.8.2 * OS: Windows 10 * Copyright: This is my own original work based on * specifications issued by our instructor * ...
31.318182
76
0.539913
''' /*************************************************************** * Name: Pandas Data Analysis * Author: Reed James * Created: 22 Sept 2021 * Course: CIS 289 - Python * Version: Python 3.8.2 * OS: Windows 10 * Copyright: This is my own original work based on * specifications issued by our instructor * ...
0
0
0
0
0
0
0
0
0
2dc5f02dd8c7980771551c3a8f2cf90faab3d060
15,111
py
Python
Dados/Events/Evento/Effect/Scroll.py
On0n0k1/2020ASSEditor
fd61595696683b440eb8a030163020100e070ed5
[ "MIT" ]
null
null
null
Dados/Events/Evento/Effect/Scroll.py
On0n0k1/2020ASSEditor
fd61595696683b440eb8a030163020100e070ed5
[ "MIT" ]
null
null
null
Dados/Events/Evento/Effect/Scroll.py
On0n0k1/2020ASSEditor
fd61595696683b440eb8a030163020100e070ed5
[ "MIT" ]
null
null
null
""" Extends Effect. Contains Scroll, which is one the 3 effects employed by the event. Copyright 2020 Lucas Alessandro do Carmo Lemos Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without...
40.296
121
0.599232
""" Extends Effect. Contains Scroll, which is one the 3 effects employed by the event. Copyright 2020 Lucas Alessandro do Carmo Lemos Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without...
0
0
0
13,419
0
0
0
3
50
5ca478338d5f22d1c242e56ababc6292ace19d3b
362
py
Python
ai_reader_demo/autoencoder/utils.py
bbueno5000/ai_reader_demo
4c159d6455cd0f7a76e8277a589afe7514b9cbc4
[ "Apache-2.0" ]
null
null
null
ai_reader_demo/autoencoder/utils.py
bbueno5000/ai_reader_demo
4c159d6455cd0f7a76e8277a589afe7514b9cbc4
[ "Apache-2.0" ]
null
null
null
ai_reader_demo/autoencoder/utils.py
bbueno5000/ai_reader_demo
4c159d6455cd0f7a76e8277a589afe7514b9cbc4
[ "Apache-2.0" ]
null
null
null
""" DOCSTRING """ import numpy import tensorflow def xavier_init(fan_in, fan_out, constant = 1): """ DOCSTRING """ low = -constant * numpy.sqrt(6.0 / (fan_in + fan_out)) high = constant * numpy.sqrt(6.0 / (fan_in + fan_out)) return tensorflow.random_uniform( (fan_in, fan_out), minval=lo...
24.133333
77
0.651934
""" DOCSTRING """ import numpy import tensorflow def xavier_init(fan_in, fan_out, constant = 1): """ DOCSTRING """ low = -constant * numpy.sqrt(6.0 / (fan_in + fan_out)) high = constant * numpy.sqrt(6.0 / (fan_in + fan_out)) return tensorflow.random_uniform( (fan_in, fan_out), minval=lo...
0
0
0
0
0
0
0
0
0
22026e61153287b58445150128902a1f2d928f9e
2,488
py
Python
server/newconnectionwhodis/tests/testCommentView.py
dylandeco/cmput404-group-project
ddbfba1b2778b9efe916d3e98cc8177ed7f0791b
[ "Apache-2.0" ]
4
2021-10-20T20:50:55.000Z
2021-12-04T03:26:56.000Z
server/newconnectionwhodis/tests/testCommentView.py
dylandeco/cmput404-group-project
ddbfba1b2778b9efe916d3e98cc8177ed7f0791b
[ "Apache-2.0" ]
69
2021-10-22T01:51:14.000Z
2021-12-09T02:57:57.000Z
server/newconnectionwhodis/tests/testCommentView.py
dylandeco/cmput404-group-project
ddbfba1b2778b9efe916d3e98cc8177ed7f0791b
[ "Apache-2.0" ]
1
2022-03-13T20:45:12.000Z
2022-03-13T20:45:12.000Z
from .. import serializers
36.057971
101
0.60209
from django.test import TestCase from rest_framework.test import APIClient from . import util from .. import serializers class CommentViewTests(TestCase): def setUp(self): """ Create a new post from a new author """ AUTHOR_NAME, AUTHOR_GITHUB, POST_CONTENT = "Muhammad", "Exanut", ...
0
0
0
2,342
0
0
0
28
90
ee4500b57720947963eb5889eda0adf1bc435433
10,365
py
Python
mysite/scisheets/core/helpers/cell_types.py
ScienceStacks/JViz
c8de23d90d49d4c9bc10da25f4a87d6f44aab138
[ "Artistic-2.0", "Apache-2.0" ]
31
2016-11-16T22:34:35.000Z
2022-03-22T22:16:11.000Z
mysite/scisheets/core/helpers/cell_types.py
ScienceStacks/JViz
c8de23d90d49d4c9bc10da25f4a87d6f44aab138
[ "Artistic-2.0", "Apache-2.0" ]
6
2017-06-24T06:29:36.000Z
2022-01-23T06:30:01.000Z
mysite/scisheets/core/helpers/cell_types.py
ScienceStacks/JViz
c8de23d90d49d4c9bc10da25f4a87d6f44aab138
[ "Artistic-2.0", "Apache-2.0" ]
4
2017-07-27T16:23:50.000Z
2022-03-12T06:36:13.000Z
'''Utilities used in core scitable code.''' from extended_array import ExtendedArray from CommonUtil.prune_nulls import pruneNulls import collections import numpy as np import warnings THRESHOLD = 0.000001 # Threshold for value comparisons ################### Classes ############################ # Used to define a ...
26.922078
75
0.64602
'''Utilities used in core scitable code.''' from extended_array import ExtendedArray from CommonUtil.prune_nulls import pruneNulls import collections import math import numpy as np import warnings THRESHOLD = 0.000001 # Threshold for value comparisons ################### Classes ############################ # Used ...
0
3,821
0
697
0
37
0
-10
135
0016809fbb9a5b580b379426d473750d858fb887
888
py
Python
templates/scale.py
diramazioni/blend-sonic
71f8782aea9e743383324f079dd1b49b31528f44
[ "RSA-MD" ]
2
2022-01-06T14:47:22.000Z
2022-02-02T01:55:49.000Z
templates/scale.py
diramazioni/blend-sonic
71f8782aea9e743383324f079dd1b49b31528f44
[ "RSA-MD" ]
null
null
null
templates/scale.py
diramazioni/blend-sonic
71f8782aea9e743383324f079dd1b49b31528f44
[ "RSA-MD" ]
null
null
null
{% extends "note.py" %} {% block imports %} {{ super() }} from {{ menu_levels[2:] }} constant_def import scale_names scale_items = [(k,k,'') for k in scale_names ] {% endblock %} {%- block classMembers %} {{ super() }} scaleList : EnumProperty(name="Scale", items = scale_items, default = ':major', update=prope...
23.368421
108
0.586712
{% extends "note.py" %} {% block imports %} {{ super() }} from {{ menu_levels[2:] }} constant_def import scale_names scale_items = [(k,k,'') for k in scale_names ] {% endblock %} {%- block classMembers %} {{ super() }} scaleList : EnumProperty(name="Scale", items = scale_items, default = ':major', update=prope...
0
0
0
0
0
0
0
0
0
11aa3369de078a964d9fe5cc1767b393eecbc2c0
1,011
py
Python
api/migrations/0001_initial.py
City-of-Turku/munpalvelut_backend
9baa530f2f3405322f74ccc145641148f253341b
[ "MIT" ]
null
null
null
api/migrations/0001_initial.py
City-of-Turku/munpalvelut_backend
9baa530f2f3405322f74ccc145641148f253341b
[ "MIT" ]
null
null
null
api/migrations/0001_initial.py
City-of-Turku/munpalvelut_backend
9baa530f2f3405322f74ccc145641148f253341b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-03-03 13:22 from __future__ import unicode_literals
30.636364
114
0.579624
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-03-03 13:22 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='ApiKey'...
0
0
0
833
0
0
0
19
46
6a5db8c16fcab6275810b911e49f796fc3a324e1
2,844
py
Python
erp_app/models.py
bryanrios/Django-ERP-Apache-License
51ae1ee15e8816e0f726850f5d143330ef1d4b42
[ "Apache-2.0" ]
null
null
null
erp_app/models.py
bryanrios/Django-ERP-Apache-License
51ae1ee15e8816e0f726850f5d143330ef1d4b42
[ "Apache-2.0" ]
null
null
null
erp_app/models.py
bryanrios/Django-ERP-Apache-License
51ae1ee15e8816e0f726850f5d143330ef1d4b42
[ "Apache-2.0" ]
null
null
null
# Create your models here.
38.958904
77
0.737342
from django.db import models # Create your models here. class Customers(models.Model): title = models.CharField(max_length=200) first_name = models.CharField(max_length=200) middle_name = models.CharField(max_length=200) last_name = models.CharField(max_length=200) suffix = models.CharField(max_l...
0
0
0
2,635
0
0
0
7
174
98260fe09209a487e2122cf77b7cd06ba72652f7
13,712
py
Python
astviewer/tree.py
titusjan/astviewer
3e3954c3deeba94cf12c6749bd29e0518bfcd974
[ "MIT" ]
105
2015-02-22T09:13:09.000Z
2021-12-20T05:09:48.000Z
astviewer/tree.py
titusjan/astviewer
3e3954c3deeba94cf12c6749bd29e0518bfcd974
[ "MIT" ]
2
2016-10-30T12:31:39.000Z
2017-09-05T17:09:16.000Z
astviewer/tree.py
titusjan/astviewer
3e3954c3deeba94cf12c6749bd29e0518bfcd974
[ "MIT" ]
13
2015-03-28T13:07:34.000Z
2021-08-03T01:30:44.000Z
""" Contains the tree widgdet """ from __future__ import print_function import logging from astviewer.qtpy import QtCore logger = logging.getLogger(__name__) IDX_LINE, IDX_COL = 0, 1 ROLE_POS = QtCore.Qt.UserRole ROLE_START_POS = QtCore.Qt.UserRole ROLE_END_POS = QtCore.Qt.UserRole + 1 # The widget inherits from ...
39.744928
100
0.641044
""" Contains the tree widgdet """ from __future__ import print_function import ast, logging import os.path from astviewer.iconfactory import IconFactory from astviewer.misc import class_name, check_class from astviewer.qtpy import QtCore, QtGui, QtWidgets from astviewer.toggle_column_mixin import ToggleColumnTreeWidg...
0
1,785
0
9,765
0
0
0
130
134
ba9317a90817824e8fff0f9568251496292de06c
44,174
py
Python
venv/lib/python2.7/site-packages/jinja/parser.py
mallika2011/Recreating-VLabs-CSO-Experiment
307849d66072b3504b9f1bf914007eaf9a03a1dc
[ "MIT" ]
7
2016-05-08T22:32:57.000Z
2019-07-16T09:54:45.000Z
venv/lib/python2.7/site-packages/jinja/parser.py
mallika2011/Recreating-VLabs-CSO-Experiment
307849d66072b3504b9f1bf914007eaf9a03a1dc
[ "MIT" ]
null
null
null
venv/lib/python2.7/site-packages/jinja/parser.py
mallika2011/Recreating-VLabs-CSO-Experiment
307849d66072b3504b9f1bf914007eaf9a03a1dc
[ "MIT" ]
2
2017-01-22T14:43:33.000Z
2020-11-02T14:35:19.000Z
# -*- coding: utf-8 -*- """ jinja.parser ~~~~~~~~~~~~ Implements the template parser. The Jinja template parser is not a real parser but a combination of the python compiler package and some postprocessing. The tokens yielded by the lexer are used to separate template data and expressions. The...
37.183502
81
0.539005
# -*- coding: utf-8 -*- """ jinja.parser ~~~~~~~~~~~~ Implements the template parser. The Jinja template parser is not a real parser but a combination of the python compiler package and some postprocessing. The tokens yielded by the lexer are used to separate template data and expressions. The...
0
0
0
42,431
0
0
0
29
67
7ecb076b0a9bdbdbc22619e20b5da7f2efecaa80
21,747
py
Python
spans/settypes.py
MichiK/spans
1bab1c5ee9f27b698b5b1e1f849dd61641d12cfd
[ "MIT" ]
1
2018-01-02T18:39:47.000Z
2018-01-02T18:39:47.000Z
spans/settypes.py
MichiK/spans
1bab1c5ee9f27b698b5b1e1f849dd61641d12cfd
[ "MIT" ]
null
null
null
spans/settypes.py
MichiK/spans
1bab1c5ee9f27b698b5b1e1f849dd61641d12cfd
[ "MIT" ]
null
null
null
# Imports needed for doctests in date range sets __all__ = [ "intrangeset", "floatrangeset", "strrangeset", "daterangeset", "datetimerangeset", "timedeltarangeset", ] # Legacy names #: This alias exist for legacy reasons. It is considered deprecated but will not #: likely be remo...
31.022825
115
0.585644
from itertools import chain from ._compat import add_metaclass, fix_timedelta_repr from ._utils import PartialOrderingMixin from .types import Range from .types import * from .types import DiscreteRange, OffsetableRangeMixin # Imports needed for doctests in date range sets from datetime import * __all__ = [ "in...
0
17,313
0
3,417
0
0
0
94
385
00b339c8fe21cab0883a4fbca8f802dcb584e12a
2,767
py
Python
ui/etc/page2.py
mizcos/SS-3
3d023df6f9c3915b78638044d878775677a284ab
[ "MIT" ]
1
2021-09-20T11:54:57.000Z
2021-09-20T11:54:57.000Z
ui/etc/page2.py
mizcos/SS-3
3d023df6f9c3915b78638044d878775677a284ab
[ "MIT" ]
null
null
null
ui/etc/page2.py
mizcos/SS-3
3d023df6f9c3915b78638044d878775677a284ab
[ "MIT" ]
1
2021-04-13T12:16:21.000Z
2021-04-13T12:16:21.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'page2.ui' # # Created by: PyQt5 UI code generator 5.15.2 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing.
45.360656
102
0.713408
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'page2.ui' # # Created by: PyQt5 UI code generator 5.15.2 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, QtGui,...
48
0
0
2,396
0
0
0
21
46
08453069f642cd08cf76bbd5d6e98308dedbfc19
1,513
py
Python
examples/example07.py
robertsj/pypgapack
c24b4a58f347ec02c20929aaaec25010fa603eb8
[ "MIT" ]
4
2015-12-16T09:44:32.000Z
2021-05-23T23:52:33.000Z
examples/example07.py
robertsj/pypgapack
c24b4a58f347ec02c20929aaaec25010fa603eb8
[ "MIT" ]
null
null
null
examples/example07.py
robertsj/pypgapack
c24b4a58f347ec02c20929aaaec25010fa603eb8
[ "MIT" ]
1
2022-01-01T17:44:21.000Z
2022-01-01T17:44:21.000Z
""" pypgapack/examples/example07.py -- maxbit with end-of-generation hill climb """ from pypgapack import PGA import sys # (Command line arguments, 1's and 0's, string length, and maximize it) opt = MyPGA(sys.argv, PGA.DATATYPE_BINARY, 100, PGA.MAXIMIZE) opt.SetRandomSeed(1) # Set random ...
36.02381
77
0.573695
""" pypgapack/examples/example07.py -- maxbit with end-of-generation hill climb """ from pypgapack import PGA import sys class MyPGA(PGA) : """ Derive our own class from PGA. """ def maxbit(self, p, pop) : """ Maximum when all alleles are 1's, and that maximum is n. """ ...
0
0
0
851
0
0
0
0
22
e813f611e691c058492667f535db043e5ad97375
2,028
py
Python
experiment-mininet-wifi/Cls_topology.py
phoophoo187/Privacy_SDN_Edge_IoT
3ee6e0fb36c6d86cf8caf4599a35c04b0ade9a8c
[ "MIT" ]
null
null
null
experiment-mininet-wifi/Cls_topology.py
phoophoo187/Privacy_SDN_Edge_IoT
3ee6e0fb36c6d86cf8caf4599a35c04b0ade9a8c
[ "MIT" ]
null
null
null
experiment-mininet-wifi/Cls_topology.py
phoophoo187/Privacy_SDN_Edge_IoT
3ee6e0fb36c6d86cf8caf4599a35c04b0ade9a8c
[ "MIT" ]
null
null
null
""" " The Topology class responed for " - creating a network topology which specified in a JSON format file " - adding and removing nodes and edges from a network " - showing a current network topology """
36.214286
101
0.591223
""" " The Topology class responed for " - creating a network topology which specified in a JSON format file " - adding and removing nodes and edges from a network " - showing a current network topology """ import networkx as nx from networkx.readwrite import json_graph import json import matplotlib.pyplot as plt c...
0
0
0
1,688
0
0
0
20
111
9f6700e87fa0ea57093fb7809b358292954f90e0
3,958
py
Python
options/options_train_executor.py
aluo-x/shape2prog
1177e5205b99bb293e353688b564c94a14211c75
[ "BSD-2-Clause" ]
109
2019-01-10T03:16:21.000Z
2022-02-10T07:39:22.000Z
options/options_train_executor.py
aluo-x/shape2prog
1177e5205b99bb293e353688b564c94a14211c75
[ "BSD-2-Clause" ]
6
2019-06-11T13:30:08.000Z
2020-11-19T17:42:12.000Z
options/options_train_executor.py
aluo-x/shape2prog
1177e5205b99bb293e353688b564c94a14211c75
[ "BSD-2-Clause" ]
16
2019-01-16T08:08:18.000Z
2021-11-11T02:52:40.000Z
from __future__ import print_function import argparse from programs.label_config import max_param, stop_id def get_parser(): """ a parser for training the program executor """ parser = argparse.ArgumentParser(description="arguments for training program executor") # optimization parser.add_ar...
45.494253
113
0.704144
from __future__ import print_function import os import argparse import socket import torch from programs.label_config import max_param, stop_id def get_parser(): """ a parser for training the program executor """ parser = argparse.ArgumentParser(description="arguments for training program executor")...
0
0
0
0
0
389
0
-29
90
6877dcd0c8c82bb4b4b41cce88c1868d8a6f7a56
339
py
Python
links/admin.py
n2o/dpb
9e44ef91dc25782a12150e1001983aeee62bc566
[ "MIT" ]
3
2020-11-05T10:09:04.000Z
2021-03-13T11:27:05.000Z
links/admin.py
n2o/dpb
9e44ef91dc25782a12150e1001983aeee62bc566
[ "MIT" ]
31
2015-07-26T13:53:26.000Z
2020-09-28T06:08:03.000Z
links/admin.py
n2o/dpb
9e44ef91dc25782a12150e1001983aeee62bc566
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Link, LinkCategory admin.site.register(Link, LinkAdmin) admin.site.register(LinkCategory)
22.6
60
0.740413
from django.contrib import admin from .models import Link, LinkCategory from dpb.admin import PageDownAdmin class LinkAdmin(PageDownAdmin): list_display = ('title', 'state', 'category', 'website') list_filter = ('category',) search_fields = ['title'] admin.site.register(Link, LinkAdmin) admin.site.regi...
0
0
0
133
0
0
0
14
46
cc8442a5c0c0fcab704e88eeb677b48927c7ac7a
7,884
py
Python
KalmanMachine/KDataGenerator.py
marc-h-lambert/L-RVGA
e7cd0c9745c87fb68828f28b1856a9616da933b1
[ "CC0-1.0" ]
null
null
null
KalmanMachine/KDataGenerator.py
marc-h-lambert/L-RVGA
e7cd0c9745c87fb68828f28b1856a9616da933b1
[ "CC0-1.0" ]
null
null
null
KalmanMachine/KDataGenerator.py
marc-h-lambert/L-RVGA
e7cd0c9745c87fb68828f28b1856a9616da933b1
[ "CC0-1.0" ]
null
null
null
################################################################################### # THE KALMAN MACHINE LIBRARY # # Code supported by Marc Lambert # ####################################################################...
37.542857
159
0.581558
################################################################################### # THE KALMAN MACHINE LIBRARY # # Code supported by Marc Lambert # ####################################################################...
0
490
0
6,270
0
0
0
45
216
63775f782cb8e7de2343442b499ed0f15ca44db8
1,890
py
Python
sysupdate.py
mtibbett67/sysupdate
28d0e78d74f18184efdc54d2d4ec62dd16b351f0
[ "MIT" ]
null
null
null
sysupdate.py
mtibbett67/sysupdate
28d0e78d74f18184efdc54d2d4ec62dd16b351f0
[ "MIT" ]
null
null
null
sysupdate.py
mtibbett67/sysupdate
28d0e78d74f18184efdc54d2d4ec62dd16b351f0
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' NAME: sysupdate.py DESCRIPTION: Update OS using apt CREATED: Tue Mar 17 22:17:50 2015 VERSION: 2 AUTHOR: Mark Tibbett AUTHOR_EMAIL: mtibbett67@gmail.com URL: N/A DOWNLOAD_URL: N/A INSTALL_REQUIRES: [] PACKAGES: [] SCRIPTS: [] ''' # Standard library imports ...
18.712871
73
0.591534
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' NAME: sysupdate.py DESCRIPTION: Update OS using apt CREATED: Tue Mar 17 22:17:50 2015 VERSION: 2 AUTHOR: Mark Tibbett AUTHOR_EMAIL: mtibbett67@gmail.com URL: N/A DOWNLOAD_URL: N/A INSTALL_REQUIRES: [] PACKAGES: [] SCRIPTS: [] ''' # Standard library imports ...
0
0
0
0
0
0
0
0
0
134fbfefdb0c396b7402416c2809bf816a232596
4,762
py
Python
practice/hw3/support.py
ixlan/Information-retrieval-I
98e9cdea328e0c20e6e754ed0849b10f3d43fc3c
[ "MIT" ]
null
null
null
practice/hw3/support.py
ixlan/Information-retrieval-I
98e9cdea328e0c20e6e754ed0849b10f3d43fc3c
[ "MIT" ]
null
null
null
practice/hw3/support.py
ixlan/Information-retrieval-I
98e9cdea328e0c20e6e754ed0849b10f3d43fc3c
[ "MIT" ]
1
2018-11-30T10:52:09.000Z
2018-11-30T10:52:09.000Z
import matplotlib as mpl mpl.rcParams['legend.loc'] = 'best' # notice that this is a modified version of NDCG with relative normalization # we score documents in the collection # then sort by the score # and return back the actual relevance list
26.752809
94
0.606468
import numpy as np import glob import os from query import load_queries import copy import random import math import matplotlib as mpl import matplotlib.pyplot as plt mpl.rcParams['legend.loc'] = 'best' from timeit import default_timer as timer # notice that this is a modified version of NDCG with relative normalizati...
0
0
0
3,135
0
1,049
0
-14
334
10da5dd6dbab70fa9e387e5ac878891a91b320b5
414
py
Python
django-react/django_react/todos/models.py
bogdan-veliscu/react-stack-compare
e7d2020ec8177e12d1b1c41bfaed96c2ee87490c
[ "Apache-2.0" ]
null
null
null
django-react/django_react/todos/models.py
bogdan-veliscu/react-stack-compare
e7d2020ec8177e12d1b1c41bfaed96c2ee87490c
[ "Apache-2.0" ]
7
2021-10-06T14:03:21.000Z
2022-02-27T02:40:18.000Z
django-react/django_react/todos/models.py
bogdan-veliscu/react-stack-compare
e7d2020ec8177e12d1b1c41bfaed96c2ee87490c
[ "Apache-2.0" ]
null
null
null
from django.db import models # Create your models here. from django.contrib.auth import get_user_model User = get_user_model()
25.875
56
0.719807
from django.db import models from django.conf import settings from django.db import models # Create your models here. from django.contrib.auth import get_user_model User = get_user_model() class Todo(models.Model): user = models.ForeignKey(User, related_name="todos", on_delete=model...
0
0
0
199
0
0
0
18
67
ce2228693b2b5320ab17bf93618d033e3fc599de
1,618
py
Python
vericep/payment/migrations/0002_auto_20200827_1759.py
SefaAkdeniz/Vericep-Graduation-Project-Backend-Django-MySQL
e8393ed9137811e5996b3b30faa4293a9aeb338a
[ "Apache-2.0" ]
null
null
null
vericep/payment/migrations/0002_auto_20200827_1759.py
SefaAkdeniz/Vericep-Graduation-Project-Backend-Django-MySQL
e8393ed9137811e5996b3b30faa4293a9aeb338a
[ "Apache-2.0" ]
3
2021-04-08T19:47:06.000Z
2021-06-10T20:06:49.000Z
vericep/payment/migrations/0002_auto_20200827_1759.py
SefaAkdeniz/Vericep-Graduation-Project-Backend-Django-MySQL
e8393ed9137811e5996b3b30faa4293a9aeb338a
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.0.8 on 2020-08-27 14:59
39.463415
260
0.553152
# Generated by Django 3.0.8 on 2020-08-27 14:59 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('payment', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='balance', options={'verbose_name': '...
22
0
0
1,493
0
0
0
19
46
9992cd3dda49fe83ec51824d731c774b77b1c5e0
4,531
py
Python
src/SubClassReasoner.py
Weissger/TST.SubClassReasoner
8fa97ff70136f05594b9eb685df2470ed43b6fd7
[ "MIT" ]
null
null
null
src/SubClassReasoner.py
Weissger/TST.SubClassReasoner
8fa97ff70136f05594b9eb685df2470ed43b6fd7
[ "MIT" ]
null
null
null
src/SubClassReasoner.py
Weissger/TST.SubClassReasoner
8fa97ff70136f05594b9eb685df2470ed43b6fd7
[ "MIT" ]
null
null
null
__author__ = 'tmy'
39.745614
121
0.556389
__author__ = 'tmy' import os from datetime import datetime from multiprocessing import Process from .ProcessManager.ProcessManager import ProcessManager, OccupiedError from .NTripleLineParser.src.NTripleLineParser import NTripleLineParser from .SparqlInterface.src import ClientFactory from .Materializer.Materializer i...
0
0
0
4,044
0
0
0
222
244
b847e8056aeb9aad38178a541f8bc5e9d3a88acf
2,600
py
Python
pyspider/database/mongodb/resultdb.py
mayk93/pyspider
87a1f9227ace2e577492e6ec3ecde0e2d8575411
[ "Apache-2.0" ]
5
2015-03-31T13:25:25.000Z
2016-03-14T11:17:02.000Z
pyspider/database/mongodb/resultdb.py
mayk93/pyspider
87a1f9227ace2e577492e6ec3ecde0e2d8575411
[ "Apache-2.0" ]
null
null
null
pyspider/database/mongodb/resultdb.py
mayk93/pyspider
87a1f9227ace2e577492e6ec3ecde0e2d8575411
[ "Apache-2.0" ]
1
2016-02-17T23:12:47.000Z
2016-02-17T23:12:47.000Z
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2014-10-13 22:18:36
32.911392
96
0.615769
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2014-10-13 22:18:36 import json import time from pymongo import MongoClient from pyspider.database.base.resultdb import ResultDB as BaseResultDB from .mong...
0
0
0
2,225
0
0
0
56
134
597f27f86a34f76d42a66e98797cbf1e12e589a5
932
py
Python
tests/programs/lists/sequential_tuple.py
astraldawn/pylps
e9964a24bb38657b180d441223b4cdb9e1dadc8a
[ "MIT" ]
1
2018-05-19T18:28:12.000Z
2018-05-19T18:28:12.000Z
tests/programs/lists/sequential_tuple.py
astraldawn/pylps
e9964a24bb38657b180d441223b4cdb9e1dadc8a
[ "MIT" ]
12
2018-04-26T00:58:11.000Z
2018-05-13T22:03:39.000Z
tests/programs/lists/sequential_tuple.py
astraldawn/pylps
e9964a24bb38657b180d441223b4cdb9e1dadc8a
[ "MIT" ]
null
null
null
from pylps.lps_data_structures import LPSTuple initialise(max_time=5) create_actions('show(_)', 'show_tuple(_, _)') create_events('handle_list(_)') create_variables('X', 'Y', 'XS') reactive_rule(True).then( handle_list([ ('a', 1), ('b', 2), ('c', 3), ('d', 4), ]).frm(T1, T2) )...
18.64
66
0.613734
from pylps.core import * from pylps.lps_data_structures import LPSTuple initialise(max_time=5) create_actions('show(_)', 'show_tuple(_, _)') create_events('handle_list(_)') create_variables('X', 'Y', 'XS') reactive_rule(True).then( handle_list([ ('a', 1), ('b', 2), ('c', 3), ('d',...
0
0
0
0
0
0
0
3
22
794531b10fc3263ae13bf2014886f79ce3cf7b77
1,156
py
Python
interview/leet/778_Swim_in_Rising_Water.py
eroicaleo/LearningPython
297d46eddce6e43ce0c160d2660dff5f5d616800
[ "MIT" ]
1
2020-10-12T13:33:29.000Z
2020-10-12T13:33:29.000Z
interview/leet/778_Swim_in_Rising_Water.py
eroicaleo/LearningPython
297d46eddce6e43ce0c160d2660dff5f5d616800
[ "MIT" ]
null
null
null
interview/leet/778_Swim_in_Rising_Water.py
eroicaleo/LearningPython
297d46eddce6e43ce0c160d2660dff5f5d616800
[ "MIT" ]
1
2016-11-09T07:28:45.000Z
2016-11-09T07:28:45.000Z
#!/usr/bin/env python3 # Thinking process # The animation of spanning with colors black/white/gray # Like the ones in princeton lecture really helped me sol = Solution() grid = [[0,2],[1,3]] grid = [[0,1,2,3,4],[24,23,22,21,5],[12,13,14,15,16],[11,17,18,19,20],[10,9,8,7,6]] grid = [[24,1,2,3,4],[0,23,22,21,5],[12,13,...
35.030303
85
0.467993
#!/usr/bin/env python3 # Thinking process # The animation of spanning with colors black/white/gray # Like the ones in princeton lecture really helped me from heapq import heappush, heappop class Solution: def swimInWater(self, grid): l, heap, delta = len(grid), [(grid[0][0], 0, 0)], [(0,1),(0,-1),(1,0),(-...
0
0
0
706
0
0
0
14
45
70e6fa28f56a29cbf2f2d0d7f92baa08728776a4
4,987
py
Python
dask_geomodeling/ipyleaflet_plugin.py
RichardScottOZ/dask-geomodeling
d463af5db4eccdc53be43862fd25e45f9aca4574
[ "BSD-3-Clause" ]
24
2019-10-10T21:39:36.000Z
2022-02-20T21:06:33.000Z
dask_geomodeling/ipyleaflet_plugin.py
RichardScottOZ/dask-geomodeling
d463af5db4eccdc53be43862fd25e45f9aca4574
[ "BSD-3-Clause" ]
40
2019-09-06T09:17:09.000Z
2022-01-31T11:12:46.000Z
dask_geomodeling/ipyleaflet_plugin.py
RichardScottOZ/dask-geomodeling
d463af5db4eccdc53be43862fd25e45f9aca4574
[ "BSD-3-Clause" ]
6
2019-10-28T14:13:26.000Z
2022-03-09T16:02:26.000Z
from notebook.utils import url_path_join def load_jupyter_server_extension(nb_server_app): """ Called when the extension is loaded. Args: nb_server_app (NotebookWebApplication): handle to the Notebook webserver instance. """ web_app = nb_server_app.web_app host_pattern = ".*$" r...
35.621429
102
0.65009
from datetime import datetime from io import BytesIO from urllib.parse import urljoin import numpy as np import traitlets from ipyleaflet import WMSLayer from matplotlib import cm from matplotlib.colors import Normalize from notebook import notebookapp from notebook.base.handlers import IPythonHandler from notebook.ut...
0
0
0
4,106
0
0
0
101
312
734dcac8001fc0cf52375eac800e4329cbad010a
1,218
py
Python
solutions/0530-minimum-absolute-difference-in-bst/minimum-absolute-difference-in-bst.py
iFun/Project-G
d33b3b3c7bcee64f93dc2539fd9955a27f321d96
[ "MIT" ]
null
null
null
solutions/0530-minimum-absolute-difference-in-bst/minimum-absolute-difference-in-bst.py
iFun/Project-G
d33b3b3c7bcee64f93dc2539fd9955a27f321d96
[ "MIT" ]
null
null
null
solutions/0530-minimum-absolute-difference-in-bst/minimum-absolute-difference-in-bst.py
iFun/Project-G
d33b3b3c7bcee64f93dc2539fd9955a27f321d96
[ "MIT" ]
null
null
null
# Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. # # Example: # # # Input: # # 1 # \ # 3 # / # 2 # # Output: # 1 # # Explanation: # The minimum absolute difference is 1, which is the difference between 2 and 1 (or ...
21
125
0.541872
# Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. # # Example: # # # Input: # # 1 # \ # 3 # / # 2 # # Output: # 1 # # Explanation: # The minimum absolute difference is 1, which is the difference between 2 and 1 (or ...
2
0
0
630
0
0
0
0
23
3499eeff8038172939193acef20b3fe68d410fc5
589
py
Python
Miscellaneous/GuessTheNo.py
spirulinax/PyHub
ae92c249224013f86c06b4d6cec3c6caa2e18c4d
[ "MIT" ]
1
2020-11-09T14:13:45.000Z
2020-11-09T14:13:45.000Z
Miscellaneous/GuessTheNo.py
spirulinax/PyHub
ae92c249224013f86c06b4d6cec3c6caa2e18c4d
[ "MIT" ]
null
null
null
Miscellaneous/GuessTheNo.py
spirulinax/PyHub
ae92c249224013f86c06b4d6cec3c6caa2e18c4d
[ "MIT" ]
null
null
null
# Guess The No n = 45 attempt = 0 NoOfGuess = 9 while NoOfGuess > 0: attempt += 1 print("---------------------------------") No = int(input("Enter a No:-")) if No == n: print("Congratulations You won!") print("Total Attempt Taken:-", attempt) break elif No < n: pri...
21.035714
48
0.47708
# Guess The No n = 45 attempt = 0 NoOfGuess = 9 while NoOfGuess > 0: attempt += 1 print("---------------------------------") No = int(input("Enter a No:-")) if No == n: print("Congratulations You won!") print("Total Attempt Taken:-", attempt) break elif No < n: pri...
0
0
0
0
0
0
0
0
0
8ac4088faa49f24247ab4e52803e3dbe165157c3
4,231
py
Python
examples/gui/gui_common.py
charbeljc/pymodbus
f0edef3071d500b7e3a987ee196c38bb79f59518
[ "W3C" ]
null
null
null
examples/gui/gui_common.py
charbeljc/pymodbus
f0edef3071d500b7e3a987ee196c38bb79f59518
[ "W3C" ]
null
null
null
examples/gui/gui_common.py
charbeljc/pymodbus
f0edef3071d500b7e3a987ee196c38bb79f59518
[ "W3C" ]
2
2021-05-02T06:37:33.000Z
2022-02-06T16:08:47.000Z
#!/usr/bin/env python # -------------------------------------------------------------------------- # # System # -------------------------------------------------------------------------- # import os import getpass import pickle from threading import Thread # ------------------------------------------------------------...
34.398374
78
0.45143
#!/usr/bin/env python # -------------------------------------------------------------------------- # # System # -------------------------------------------------------------------------- # import os import getpass import pickle from threading import Thread # ------------------------------------------------------------...
0
0
0
2,118
0
0
0
-1
69
99737a47300033ec91b5e8f9c0d5fbaea99d17dc
2,124
py
Python
abc_graphene_sqlalchemy/tests/test_fields.py
maquino1985/graphene-sqlalchemy
89e11fbbb7513bb07fb87ed805cad6dcd98d41c2
[ "MIT" ]
1
2021-03-18T10:35:33.000Z
2021-03-18T10:35:33.000Z
abc_graphene_sqlalchemy/tests/test_fields.py
maquino1985/graphene-sqlalchemy
89e11fbbb7513bb07fb87ed805cad6dcd98d41c2
[ "MIT" ]
null
null
null
abc_graphene_sqlalchemy/tests/test_fields.py
maquino1985/graphene-sqlalchemy
89e11fbbb7513bb07fb87ed805cad6dcd98d41c2
[ "MIT" ]
null
null
null
import logging log = logging.getLogger(__name__)
27.947368
111
0.750471
import logging import pytest from promise import Promise from graphene import InputObjectType from graphene.relay import Connection from sqlalchemy import inspect from .models import Editor as EditorModel from .models import Pet as PetModel from ..fields import SQLAlchemyConnectionField, SQLAlchemyFilteredConnection...
0
0
0
156
0
1,328
0
151
430
d434cf747e0d00bccee8b50a8bf0bf43a33096bb
155
py
Python
module2/Bot/test.py
2B5/ia-3B5
40a54eb3c6b3d4f536ca1e93b317e2ea9c9a327e
[ "MIT" ]
null
null
null
module2/Bot/test.py
2B5/ia-3B5
40a54eb3c6b3d4f536ca1e93b317e2ea9c9a327e
[ "MIT" ]
2
2017-01-17T17:25:15.000Z
2021-02-16T23:08:25.000Z
module2/Bot/test.py
2B5/ia-3B5
40a54eb3c6b3d4f536ca1e93b317e2ea9c9a327e
[ "MIT" ]
2
2016-12-06T08:30:38.000Z
2016-12-22T01:06:27.000Z
import aiml kernel = aiml.Kernel() kernel.learn("startup.xml") kernel.respond("load aiml") while True: print(kernel.respond(raw_input("Message >>")))
19.375
50
0.716129
import aiml kernel = aiml.Kernel() kernel.learn("startup.xml") kernel.respond("load aiml") while True: print(kernel.respond(raw_input("Message >>")))
0
0
0
0
0
0
0
0
0
a3dfba0ecffb4a8e77fef62ce979de407e8dc97d
1,522
py
Python
semantic_segmentation/src/models/segformer.py
no-name-xiaosheng/PaddleViT
50226a3be5095b3727d3c62d2eab23ef1e9612ec
[ "Apache-2.0" ]
2
2021-11-23T02:01:52.000Z
2021-11-23T02:02:03.000Z
semantic_segmentation/src/models/segformer.py
Dongsheng-Bi/PaddleViT
c90a6c8dc3787e69cef3a37b9a260bd59eeff1f7
[ "Apache-2.0" ]
null
null
null
semantic_segmentation/src/models/segformer.py
Dongsheng-Bi/PaddleViT
c90a6c8dc3787e69cef3a37b9a260bd59eeff1f7
[ "Apache-2.0" ]
null
null
null
import paddle.nn as nn
40.052632
63
0.676741
import paddle.nn as nn from .backbones.mix_transformer import MixVisionTransformer from .decoders.segformer_head import SegformerHead class Segformer(nn.Layer): """Segformer model implementation """ def __init__(self, config): super(Segformer, self).__init__() self.backbone = MixVisi...
0
0
0
1,364
0
0
0
67
68
88d0e040eb0d18aebce1104ffd1bde81bddf0d0b
8,176
py
Python
siuba/siu/dispatchers.py
sethvargo/siuba
90172e7888b93eb4a42187a5aea947dbcbbc05ad
[ "MIT" ]
null
null
null
siuba/siu/dispatchers.py
sethvargo/siuba
90172e7888b93eb4a42187a5aea947dbcbbc05ad
[ "MIT" ]
null
null
null
siuba/siu/dispatchers.py
sethvargo/siuba
90172e7888b93eb4a42187a5aea947dbcbbc05ad
[ "MIT" ]
null
null
null
# symbolic dispatch wrapper --------------------------------------------------- from functools import singledispatch from .calls import Call, Lazy from .symbolic import strip_symbolic def symbolic_dispatch(f = None, cls = object): """Return a generic dispatch function with symbolic data implementations. The...
29.516245
95
0.597725
# symbolic dispatch wrapper --------------------------------------------------- from functools import singledispatch, update_wrapper, wraps import inspect from .calls import Call, FuncArg, MetaArg, Lazy from .symbolic import Symbolic, create_sym_call, strip_symbolic def _dispatch_not_impl(func_name): def f(x, *a...
0
1,502
0
2,265
0
257
0
61
250
76f6d739cb23629b57aa94b4e728c30211cd2955
4,709
py
Python
woudc_data_registry/registry.py
ahurka/woudc-data-registry
29ce092076193f2730d488de5412d93a7b78b987
[ "MIT" ]
null
null
null
woudc_data_registry/registry.py
ahurka/woudc-data-registry
29ce092076193f2730d488de5412d93a7b78b987
[ "MIT" ]
null
null
null
woudc_data_registry/registry.py
ahurka/woudc-data-registry
29ce092076193f2730d488de5412d93a7b78b987
[ "MIT" ]
null
null
null
# ================================================================= # # Terms and Conditions of Use # # Unless otherwise noted, computer program source code of this # distribution # is covered under Crown Copyright, Government of # Canada, and is distributed under the MIT License. # # The Canada wordmark and related gr...
32.475862
73
0.651094
# ================================================================= # # Terms and Conditions of Use # # Unless otherwise noted, computer program source code of this # distribution # is covered under Crown Copyright, Government of # Canada, and is distributed under the MIT License. # # The Canada wordmark and related gr...
0
0
0
2,454
0
0
0
65
113
54b57db99bbed5cda2f6832054fc944284bdef27
322
py
Python
leadreader/str.py
raindrift/leadreader
c360630a75a149e20c9cf64bcb2c14646effb9ae
[ "MIT" ]
null
null
null
leadreader/str.py
raindrift/leadreader
c360630a75a149e20c9cf64bcb2c14646effb9ae
[ "MIT" ]
null
null
null
leadreader/str.py
raindrift/leadreader
c360630a75a149e20c9cf64bcb2c14646effb9ae
[ "MIT" ]
null
null
null
""" String utilities. """
21.466667
70
0.586957
""" String utilities. """ def camelize(value): """ Return the camel-cased version of a string. Used for analysis class names. """ def _camelcase(): while True: yield type(value).capitalize c = _camelcase() return "".join(next(c)(x) if x else '_' for x in value.split("_")...
0
0
0
0
273
0
0
0
23
130d68694e0cf1462e5ccacca80e498aa25a58b7
24,266
py
Python
Scripts/simulation/holidays/holiday_tradition.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/simulation/holidays/holiday_tradition.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/simulation/holidays/holiday_tradition.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\holidays\holiday_tradition.py # Compiled at: 2020-06-15 20:09:55 # Size of source mod 2**32: 25532 b...
55.783908
401
0.623424
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\holidays\holiday_tradition.py # Compiled at: 2020-06-15 20:09:55 # Size of source mod 2**32: 25532 b...
0
927
0
10,719
677
4,751
0
0
450
fca8a4cdcd60925e50a4fe8be2fd519f54dc6226
594
py
Python
yt_dlp/WS_Extractor/fox.py
evolution-ant/local-youtube-dl
e9be36e8cdc585c0e24a18c74d790b62af6e11a7
[ "Unlicense" ]
null
null
null
yt_dlp/WS_Extractor/fox.py
evolution-ant/local-youtube-dl
e9be36e8cdc585c0e24a18c74d790b62af6e11a7
[ "Unlicense" ]
null
null
null
yt_dlp/WS_Extractor/fox.py
evolution-ant/local-youtube-dl
e9be36e8cdc585c0e24a18c74d790b62af6e11a7
[ "Unlicense" ]
null
null
null
#encoding: utf-8
39.6
163
0.725589
#encoding: utf-8 import re import json from ..extractor.fox import FOXIE as Old from ..utilsEX import download_webPage_by_PYCURL class FoxIE(Old): def _download_webpage(self, url_or_request, video_id, note=None, errnote=None, fatal=True, tries=1, timeout=5, encoding=None, data=None, headers={}, query={}): ...
0
0
0
440
0
0
0
24
113
b513b7325a18107a0d683adb1f74f7b43224fbe7
2,307
py
Python
tronx/modules/__init__.py
beastzx18/Tron
92207b841c80311e484e8f350b96f7df8a76d3b9
[ "MIT" ]
8
2021-08-22T06:43:34.000Z
2022-02-24T17:09:49.000Z
tronx/modules/__init__.py
beastzx18/Tron
92207b841c80311e484e8f350b96f7df8a76d3b9
[ "MIT" ]
61
2021-09-12T11:05:33.000Z
2021-12-07T15:26:18.000Z
tronx/modules/__init__.py
beastzx18/Tron
92207b841c80311e484e8f350b96f7df8a76d3b9
[ "MIT" ]
6
2021-09-08T08:43:04.000Z
2022-02-24T17:09:50.000Z
# ----- MODULES = sorted(__list_all_plugins()) __all__ = MODULES + ["MODULES"] # ----- # types of message # chat type
19.066116
70
0.684439
import os from pyrogram.types import Message from tronx import USER_ID, Config from tronx.database.postgres import dv_sql as dv # ----- def __list_all_plugins(): from os.path import dirname, basename, isfile import glob mod_paths = glob.glob(dirname(__file__) + "/*.py") all_plugins = [ basename(f)[:-3] ...
0
0
0
0
0
1,953
0
40
180
7388a16df3e442cbca8c2f4415458d3451d3daa3
2,892
py
Python
backend/socket_chat/tests/group_consumer/chat_events/test_list_group_event.py
nikifkon/ChatApp
1b34e25dca63db7389cec87d7fb1099d95a6308a
[ "MIT" ]
6
2019-09-15T09:35:09.000Z
2020-03-21T04:10:39.000Z
backend/socket_chat/tests/group_consumer/chat_events/test_list_group_event.py
nikifkon/ChatApp
1b34e25dca63db7389cec87d7fb1099d95a6308a
[ "MIT" ]
6
2019-09-14T11:09:19.000Z
2021-06-10T18:49:50.000Z
backend/socket_chat/tests/group_consumer/chat_events/test_list_group_event.py
nikifkon/ChatApp
1b34e25dca63db7389cec87d7fb1099d95a6308a
[ "MIT" ]
2
2019-10-17T21:11:53.000Z
2021-02-04T02:52:29.000Z
import pytest pytestmark = [pytest.mark.asyncio, pytest.mark.django_db(transaction=True)] # The list method with a filter should not return groups without messages that match the filter
37.558442
123
0.755878
from copy import deepcopy import pytest from channels.testing import WebsocketCommunicator from backend.groups.models import ChatGroup, GroupMessage from backend.socket_chat.tests.utils import round_to_minutes pytestmark = [pytest.mark.asyncio, pytest.mark.django_db(transaction=True)] @pytest.fixture def group_la...
0
1,256
1,058
0
0
0
0
108
272
99e3b201284a27e95b30d576ebb5e398e5e6d326
7,740
py
Python
server.py
dplassgit/starter-snake-python
3264a50663c32e96d608268b8d74b38290cd5322
[ "MIT" ]
null
null
null
server.py
dplassgit/starter-snake-python
3264a50663c32e96d608268b8d74b38290cd5322
[ "MIT" ]
null
null
null
server.py
dplassgit/starter-snake-python
3264a50663c32e96d608268b8d74b38290cd5322
[ "MIT" ]
null
null
null
import os import cherrypy """ Dumb battlesnake server in python. For instructions see https://github.com/BattlesnakeOfficial/starter-snake-python/README.md """ move_names = ["up", "down", "left", "right"] moves_dx = [0, 0, -1, 1] moves_dy = [1, -1, 0, 0] """ Snake object. """ # Map from key to AnSnake objects snake...
28.666667
108
0.589276
import os import random import cherrypy """ Dumb battlesnake server in python. For instructions see https://github.com/BattlesnakeOfficial/starter-snake-python/README.md """ move_names = ["up", "down", "left", "right"] moves_dx = [0, 0, -1, 1] moves_dy = [1, -1, 0, 0] """ Snake object. """ class AnSnake(object): de...
0
1,565
0
5,404
0
0
0
-8
166
d0402f1bee556b094723200b8f549a690fa5a0f4
174
py
Python
modules/jenkins/chuck_module.py
msabramo/django-chuck
bbef6171c9b3738460dc05cb77e65ba88fcc5ad8
[ "BSD-2-Clause" ]
1
2020-05-29T04:27:50.000Z
2020-05-29T04:27:50.000Z
modules/jenkins/chuck_module.py
msabramo/django-chuck
bbef6171c9b3738460dc05cb77e65ba88fcc5ad8
[ "BSD-2-Clause" ]
null
null
null
modules/jenkins/chuck_module.py
msabramo/django-chuck
bbef6171c9b3738460dc05cb77e65ba88fcc5ad8
[ "BSD-2-Clause" ]
null
null
null
depends = ["unittest"] description = """ Plug and play integration with the Jenkins Coninuous Integration server. For more information, visit: http://www.jenkins-ci.org/ """
24.857143
72
0.747126
depends = ["unittest"] description = """ Plug and play integration with the Jenkins Coninuous Integration server. For more information, visit: http://www.jenkins-ci.org/ """
0
0
0
0
0
0
0
0
0
6226e87e91e3d07d4938eccf6653e2af46cf982f
5,595
py
Python
plastic_agent/agent/replay_buffer.py
pedMatias/matias_hfo
6d88e1043a1455f5c1f6cc11b9380869772f4176
[ "MIT" ]
1
2021-06-03T20:03:50.000Z
2021-06-03T20:03:50.000Z
plastic_agent/agent/replay_buffer.py
pedMatias/matias_hfo
6d88e1043a1455f5c1f6cc11b9380869772f4176
[ "MIT" ]
null
null
null
plastic_agent/agent/replay_buffer.py
pedMatias/matias_hfo
6d88e1043a1455f5c1f6cc11b9380869772f4176
[ "MIT" ]
1
2021-03-14T01:22:33.000Z
2021-03-14T01:22:33.000Z
REPLAY_MEMORY_SIZE = 50_000 # How many last steps to keep for model training MIN_REPLAY_MEMORY_SIZE = 1_000 # Minimum number of steps in a memory to
35.188679
80
0.597319
import numpy as np import os import random from copy import copy from typing import List import pickle from agents.plastic_dqn_v1 import config REPLAY_MEMORY_SIZE = 50_000 # How many last steps to keep for model training MIN_REPLAY_MEMORY_SIZE = 1_000 # Minimum number of steps in a memory to class Transition: ...
0
1,449
0
3,776
0
0
0
-10
225
9666ad76af020f393f10d46a89a360cc326f4eb9
1,312
py
Python
ucvm_v21_10/make_mesh_model.py
SCECcode/ucvm_docker
f472fb0ff512a15c557d88734dcda3ec6a550cc3
[ "BSD-3-Clause" ]
1
2022-03-08T00:12:08.000Z
2022-03-08T00:12:08.000Z
ucvm_v21_10/make_mesh_model.py
SCECcode/ucvm_docker
f472fb0ff512a15c557d88734dcda3ec6a550cc3
[ "BSD-3-Clause" ]
1
2021-12-10T20:35:20.000Z
2021-12-10T20:35:20.000Z
ucvm_v21_10/make_mesh_model.py
SCECcode/ucvm_docker
f472fb0ff512a15c557d88734dcda3ec6a550cc3
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 import sys import os import time # # Generate the master out.grid # Create a 3M point file of lat/lons - and write to ASCII file called out.grd. # This file will be used as input to ucvm_query for medium scale test for images # if not os.path.exists("out.grd"): print("Creating grd.out file.") ...
23.017544
102
0.699695
#!/usr/bin/env python3 import sys import os import time # # Generate the master out.grid # Create a 3M point file of lat/lons - and write to ASCII file called out.grd. # This file will be used as input to ucvm_query for medium scale test for images # if not os.path.exists("out.grd"): print("Creating grd.out file.") ...
0
0
0
0
0
0
0
0
0
b1ac4c296c0679ac6f18ecdf329130a62edd9cd2
1,633
py
Python
lib/pulsemodel/sigproc/scripts/bndspec2spec.py
qingyundou/tacotron_qdou
aca014e8ea73bbab617029b81368cee235f47ce2
[ "MIT" ]
2
2020-12-16T12:53:52.000Z
2021-09-18T06:52:05.000Z
lib/pulsemodel/sigproc/scripts/bndspec2spec.py
qingyundou/tacotron_qdou
aca014e8ea73bbab617029b81368cee235f47ce2
[ "MIT" ]
null
null
null
lib/pulsemodel/sigproc/scripts/bndspec2spec.py
qingyundou/tacotron_qdou
aca014e8ea73bbab617029b81368cee235f47ce2
[ "MIT" ]
1
2021-03-05T03:44:39.000Z
2021-03-05T03:44:39.000Z
#!/usr/bin/python ''' Copyright(C) 2016 Engineering Department, University of Cambridge, UK. License 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/LI...
37.113636
108
0.736681
#!/usr/bin/python ''' Copyright(C) 2016 Engineering Department, University of Cambridge, UK. License 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/LI...
0
0
0
0
0
0
0
0
0
1ae5a32e889489d3ae8d914a5b1ff679ee750c75
750
py
Python
measurements/migrations/0011_testrun_ordering.py
nat64check/zaphod_backend
b92191950825e1a4fd8c34207c8491d587cfb61f
[ "BSD-3-Clause" ]
1
2017-11-14T16:22:38.000Z
2017-11-14T16:22:38.000Z
measurements/migrations/0011_testrun_ordering.py
sjm-steffann/nat64check_zaphod_backend
b92191950825e1a4fd8c34207c8491d587cfb61f
[ "BSD-3-Clause" ]
5
2019-12-03T05:36:07.000Z
2021-06-25T15:20:04.000Z
measurements/migrations/0011_testrun_ordering.py
sjm-steffann/nat64check_zaphod_backend
b92191950825e1a4fd8c34207c8491d587cfb61f
[ "BSD-3-Clause" ]
null
null
null
# # Copyright (c) 2018, S.J.M. Steffann. This software is licensed under the BSD # 3-Clause License. Please see the LICENSE file in the project root directory. # # Generated by Django 2.0.7 on 2018-07-23 14:47
34.090909
113
0.516
# •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• # Copyright (c) 2018, S.J.M. Steffann. This software is licensed under the BSD # 3-Clause License. Please see the LICENSE file in the project root directory. # •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••...
468
0
0
321
0
0
0
11
46
70e4742cf86e95b61a1b7955657907327064055a
5,915
py
Python
historia/intercept/select.py
thatdevsherry/historia
232026b38479fd855c1d8eff543d95e144bfdfe2
[ "MIT" ]
10
2020-12-12T23:00:27.000Z
2022-02-09T18:01:40.000Z
historia/intercept/select.py
ShehriyarQureshi/historia
feb48e1489563e4770d32d4e6465d3931407a345
[ "MIT" ]
3
2018-11-01T11:36:55.000Z
2018-11-09T04:43:54.000Z
historia/intercept/select.py
ShehriyarQureshi/temporalite
feb48e1489563e4770d32d4e6465d3931407a345
[ "MIT" ]
null
null
null
""" Copyright (c) 2019 Muhammad Shehriyar Qureshi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,...
33.607955
131
0.647844
""" Copyright (c) 2019 Muhammad Shehriyar Qureshi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,...
0
0
0
4,803
0
0
0
-12
45
ed185ed349862425c27643f54e86a86df7452b89
643
py
Python
main.py
BdEINSALyon/planning-downloader
6f0875702547d4746c5c9d766ee2922e0b2a26c5
[ "MIT" ]
null
null
null
main.py
BdEINSALyon/planning-downloader
6f0875702547d4746c5c9d766ee2922e0b2a26c5
[ "MIT" ]
null
null
null
main.py
BdEINSALyon/planning-downloader
6f0875702547d4746c5c9d766ee2922e0b2a26c5
[ "MIT" ]
null
null
null
if __name__ == '__main__': main()
23.814815
82
0.491446
import requests def main(): PHPSESSID = 'oflbncfl7e2pk5rhhir703ruf3' URL = 'http://planning.gala.bde-insa-lyon.fr/orga/{id}/print' orgas = [ {'id': 1, 'name': 'SUPER ADMIN'} ] for o in orgas: print(o['name']) r = requests.get(URL.format(id=o['id']), cookies={'PHPSESSID': P...
0
0
0
0
0
564
0
-6
45
af679ac4a4259365b979a1379db022e999b02ea8
2,038
py
Python
chap08/sentiment.py
wtsnjp/nlp100
8beaabd0e8598e8a0cbd1eca690281ce5d783e93
[ "Unlicense" ]
3
2018-01-18T09:56:39.000Z
2019-03-14T05:54:11.000Z
chap08/sentiment.py
WatsonDNA/nlp100
8beaabd0e8598e8a0cbd1eca690281ce5d783e93
[ "Unlicense" ]
null
null
null
chap08/sentiment.py
WatsonDNA/nlp100
8beaabd0e8598e8a0cbd1eca690281ce5d783e93
[ "Unlicense" ]
1
2020-05-12T14:24:00.000Z
2020-05-12T14:24:00.000Z
# # Class SentimentSentences: sentences for polarity analysis #
30.878788
73
0.540236
# # Class SentimentSentences: sentences for polarity analysis # from nltk import stem from collections import Counter from bisect import bisect_left from sklearn.linear_model import LogisticRegression from sklearn.feature_extraction.text import CountVectorizer class SentimentSentences: def __init__(self, sentence...
0
123
0
1,629
0
0
0
87
134
ebc20eb2ee4c18598edb19954bc42f8e40aa130d
196
py
Python
26-50/30.py
tonyyzy/ProjectEuler
f52de2f931ebd4df2020e32d12062866b1586e72
[ "MIT" ]
null
null
null
26-50/30.py
tonyyzy/ProjectEuler
f52de2f931ebd4df2020e32d12062866b1586e72
[ "MIT" ]
null
null
null
26-50/30.py
tonyyzy/ProjectEuler
f52de2f931ebd4df2020e32d12062866b1586e72
[ "MIT" ]
null
null
null
n = 10 result = [] while n < 1000000: a = str(n) temp = 0 for i in a: temp += int(i) ** 5 if temp == n: result.append(n) n += 1 print(sum(result))
15.076923
28
0.428571
n = 10 result = [] while n < 1000000: a = str(n) temp = 0 for i in a: temp += int(i) ** 5 if temp == n: result.append(n) n += 1 print(sum(result))
0
0
0
0
0
0
0
0
0
dec766a3420a14372b2ae35c3a7c1574968c32eb
35
py
Python
ast-transformations-core/src/test/resources/org/jetbrains/research/ml/ast/gumtree/tree/data/loop/for/in_4.py
JetBrains-Research/ast-transformations
0ab408af3275b520cc87a473f418c4b4dfcb0284
[ "MIT" ]
8
2021-01-19T21:15:54.000Z
2022-02-23T19:16:25.000Z
ast-transformations-core/src/test/resources/org/jetbrains/research/ml/ast/gumtree/tree/data/loop/for/in_4.py
JetBrains-Research/ast-transformations
0ab408af3275b520cc87a473f418c4b4dfcb0284
[ "MIT" ]
4
2020-11-17T14:28:25.000Z
2022-02-24T07:54:28.000Z
ast-transformations-core/src/test/resources/org/jetbrains/research/ml/ast/gumtree/tree/data/loop/for/in_4.py
nbirillo/ast-transformations
717706765a2da29087a0de768fc851698886dd65
[ "MIT" ]
1
2022-02-23T19:16:30.000Z
2022-02-23T19:16:30.000Z
for i in range(1, 100, 3): pass
17.5
26
0.571429
for i in range(1, 100, 3): pass
0
0
0
0
0
0
0
0
0
19a82d6f900b8f0c33e556f95dff04c5745664de
2,334
py
Python
examples/rel_vort_ex.py
dennissergeev/pyveccalc
c5d806e41c13ff3a22e4000764326e491b7d4283
[ "MIT" ]
3
2015-05-11T01:06:17.000Z
2015-12-11T12:16:15.000Z
examples/rel_vort_ex.py
dennissergeev/pyveccalc
c5d806e41c13ff3a22e4000764326e491b7d4283
[ "MIT" ]
2
2015-04-27T08:27:07.000Z
2015-05-16T14:21:35.000Z
examples/rel_vort_ex.py
dennissergeev/pyveccalc
c5d806e41c13ff3a22e4000764326e491b7d4283
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Compute magnitude and relative vorticity """ import numpy as np import matplotlib as mpl mpl.rcParams['mathtext.default'] = 'regular' import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap, addcyclic from netCDF4 import Dataset from pyveccalc.standard import WindHorizonta...
32.873239
94
0.67138
# -*- coding: utf-8 -*- """ Compute magnitude and relative vorticity """ import numpy as np import matplotlib as mpl mpl.rcParams['mathtext.default'] = 'regular' import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap, addcyclic from netCDF4 import Dataset from pyveccalc.standard import WindHorizonta...
0
0
0
0
0
0
0
0
0
c31a933e05468982f256a12e95b017ea0c4b2898
1,984
py
Python
SNA/data/preprocess_ES.py
deepesch/decentralizedtrustscore
406ac219cfa0eb37efa2bf5add484381fd78eb4a
[ "MIT" ]
null
null
null
SNA/data/preprocess_ES.py
deepesch/decentralizedtrustscore
406ac219cfa0eb37efa2bf5add484381fd78eb4a
[ "MIT" ]
null
null
null
SNA/data/preprocess_ES.py
deepesch/decentralizedtrustscore
406ac219cfa0eb37efa2bf5add484381fd78eb4a
[ "MIT" ]
1
2020-09-06T02:53:47.000Z
2020-09-06T02:53:47.000Z
'''Preprocess Epinions and Slashdot data''' '''Take in text file of data, create and save adjacency matrix''' #Preprocess data #Optionally run normally or in test mode (when writing tests) if __name__ == "__main__": preprocess()
34.206897
86
0.677923
'''Preprocess Epinions and Slashdot data''' '''Take in text file of data, create and save adjacency matrix''' import numpy as np, pickle import scipy.sparse as sp #Preprocess data #Optionally run normally or in test mode (when writing tests) def preprocess(mode = "normal"): #FILE_PATH = "Raw Data/soc-sign-epinions....
0
0
0
0
0
1,674
0
9
67
bc141a549fb309092bd3508f3eded2771ae00a62
242
py
Python
foobar-1.py
meetajain11/Neural-Networks
07b0b8c4d8e722b1a8c3763deecff36c53728808
[ "MIT" ]
null
null
null
foobar-1.py
meetajain11/Neural-Networks
07b0b8c4d8e722b1a8c3763deecff36c53728808
[ "MIT" ]
null
null
null
foobar-1.py
meetajain11/Neural-Networks
07b0b8c4d8e722b1a8c3763deecff36c53728808
[ "MIT" ]
null
null
null
demo(15324)
17.285714
28
0.438017
def demo(area): ans = [] while(area >= 4): ar = int(area**0.5) ans.append(ar*ar) area = area-ar*ar while(area > 0): ans.append(1) area = area-1 print(ans) demo(15324)
0
0
0
0
0
200
0
0
23
e24245eab1fca32b7fea62ffd5dfa3c5c2dd631a
10,243
py
Python
custom_components/acthor/acthor/registers.py
jatty/hass-acthor
9d5aaed3f01e9288fef031b47b0808e6e80c22d3
[ "MIT" ]
null
null
null
custom_components/acthor/acthor/registers.py
jatty/hass-acthor
9d5aaed3f01e9288fef031b47b0808e6e80c22d3
[ "MIT" ]
null
null
null
custom_components/acthor/acthor/registers.py
jatty/hass-acthor
9d5aaed3f01e9288fef031b47b0808e6e80c22d3
[ "MIT" ]
null
null
null
import logging from typing import TypeVar logger = logging.getLogger(__name__) T = TypeVar("T")
24.622596
116
0.60617
import abc import asyncio import datetime import logging from typing import Any, Coroutine, Generic, Iterable, Iterator, Tuple, TypeVar from .abc import ABCModbusProtocol, MultiRegister, SingleRegister logger = logging.getLogger(__name__) T = TypeVar("T") class ReadOnlyMixin(Generic[T], abc.ABC): __slots__ = (...
62
154
2,014
7,348
223
0
0
72
296
d5caa9127743b2e76bdcf8dc231561b1a3f77a1b
9,631
py
Python
pgbot/common.py
gresm/PygameCommunityBot
0da081704baaaa6fd6464f7abe43e6ba5043952d
[ "MIT" ]
77
2020-11-16T05:26:49.000Z
2021-03-08T06:27:06.000Z
pgbot/common.py
gresm/PygameCommunityBot
0da081704baaaa6fd6464f7abe43e6ba5043952d
[ "MIT" ]
71
2021-03-19T17:51:30.000Z
2022-02-19T12:42:19.000Z
pgbot/common.py
gresm/PygameCommunityBot
0da081704baaaa6fd6464f7abe43e6ba5043952d
[ "MIT" ]
19
2021-03-19T12:48:17.000Z
2021-12-18T04:41:08.000Z
""" This file is a part of the source code for the PygameCommunityBot. This project has been licensed under the MIT license. Copyright (c) 2020-present PygameCommunityDiscord This file defines some constants and variables used across the whole codebase """ import io import os from typing import Optional, Union impor...
28.921922
139
0.663586
""" This file is a part of the source code for the PygameCommunityBot. This project has been licensed under the MIT license. Copyright (c) 2020-present PygameCommunityDiscord This file defines some constants and variables used across the whole codebase """ import io import os from typing import Optional, Union impor...
151
0
0
2,268
0
0
0
0
23
6b35d0e3814027abbd9206a5231a54d20d277179
1,262
py
Python
plantcv/plantcv/hyperspectral/_avg_reflectance.py
Howzit123/plantcv
b4ff6ad765da36353f40827ce3816b33d1d3596a
[ "MIT" ]
2
2021-08-20T14:56:48.000Z
2021-08-24T23:12:56.000Z
plantcv/plantcv/hyperspectral/_avg_reflectance.py
Howzit123/plantcv
b4ff6ad765da36353f40827ce3816b33d1d3596a
[ "MIT" ]
null
null
null
plantcv/plantcv/hyperspectral/_avg_reflectance.py
Howzit123/plantcv
b4ff6ad765da36353f40827ce3816b33d1d3596a
[ "MIT" ]
1
2021-06-15T15:01:46.000Z
2021-06-15T15:01:46.000Z
# Calculate masked average background reflectance import numpy as np def _avg_reflectance(spectral_data, mask): """ Find average reflectance of masked hyperspectral data instance. This is useful for calculating a target signature (n_band x 1 - column array) which is required in various GatorSense hypersp...
34.108108
111
0.669572
# Calculate masked average background reflectance import numpy as np def _avg_reflectance(spectral_data, mask): """ Find average reflectance of masked hyperspectral data instance. This is useful for calculating a target signature (n_band x 1 - column array) which is required in various GatorSense hypersp...
0
0
0
0
0
0
0
0
0
dc8c9e5d8239e35faa52d813da6c2b78279456f0
843
py
Python
LeetCode/LeetCode_Python-master/LeetCode_Python-master/Algorithm-Easy/14_Longest_Common_Prefix.py
Sycamore-City-passerby/ML
605cfc70bdda2c99e5f1c16b25812b59c98a72ad
[ "MIT" ]
null
null
null
LeetCode/LeetCode_Python-master/LeetCode_Python-master/Algorithm-Easy/14_Longest_Common_Prefix.py
Sycamore-City-passerby/ML
605cfc70bdda2c99e5f1c16b25812b59c98a72ad
[ "MIT" ]
null
null
null
LeetCode/LeetCode_Python-master/LeetCode_Python-master/Algorithm-Easy/14_Longest_Common_Prefix.py
Sycamore-City-passerby/ML
605cfc70bdda2c99e5f1c16b25812b59c98a72ad
[ "MIT" ]
null
null
null
if __name__ == "__main__": print(Solution().longestCommonPrefix(["hello", "heaven", "heavy"])) """ Time Complexity = O(N*k), k is the length of the common prefix Space Complexity = O(1) Write a function to find the longest common prefix string amongst an array of strings. ...
24.085714
94
0.52669
class Solution: def longestCommonPrefix(self, strs): """ :type strs: List[str] :rtype: str """ if not strs: return "" for i in range(len(strs[0])): for string in strs[1:]: if i >= len(string) or string[i] != strs[0][i]: ...
0
0
0
353
0
0
0
0
22
05ab655deb7f84c746142d1073d20e615dff176c
1,191
py
Python
main.py
hyeon0145/xts-aes-256
5f4c25cba7a9b81566635fbf2bd273ac71e1bf64
[ "WTFPL" ]
2
2017-08-21T11:11:49.000Z
2019-02-12T09:28:45.000Z
main.py
hyeon0145/xts-aes-256
5f4c25cba7a9b81566635fbf2bd273ac71e1bf64
[ "WTFPL" ]
null
null
null
main.py
hyeon0145/xts-aes-256
5f4c25cba7a9b81566635fbf2bd273ac71e1bf64
[ "WTFPL" ]
2
2018-09-05T09:33:19.000Z
2019-07-12T19:36:40.000Z
import sys import binascii from xts_aes import XTSAES TEXT_TYPES = { 'encryption': 'plaintext', 'decryption': 'ciphertext', } arguments = sys.argv[1:] mode = 'encryption' inverse_mode = 'decryption' if arguments and (arguments[0] == '-d'): mode = 'decryption' inverse_mode = 'encryption' key = read_h...
27.068182
139
0.702771
import sys import binascii from xts_aes import XTSAES TEXT_TYPES = { 'encryption': 'plaintext', 'decryption': 'ciphertext', } def read_hex_string(name): try: hex_string = input('{name}: '.format(name=name)) hex_string = binascii.unhexlify(hex_string) except binascii.Error: sys...
0
0
0
0
0
239
0
0
23
37e8351577681ea1ea7a116a7d719adb4de5025d
74
py
Python
bin/botocore/vendored/requests/packages/urllib3/packages/__init__.py
iilness2/bash-lambda-layer-custom
0b054d4ccb0623460354ba1f58059258c095a494
[ "MIT" ]
2,177
2015-01-02T09:56:51.000Z
2022-03-27T01:48:37.000Z
pip/_vendor/requests/packages/urllib3/packages/__init__.py
alex/pip
d51a4b345b31ec4c8defbefe7f12b996c00c67fa
[ "MIT" ]
713
2015-11-06T10:48:58.000Z
2018-11-27T16:32:18.000Z
pip/_vendor/requests/packages/urllib3/packages/__init__.py
alex/pip
d51a4b345b31ec4c8defbefe7f12b996c00c67fa
[ "MIT" ]
742
2015-08-22T23:17:54.000Z
2022-01-18T08:55:33.000Z
from __future__ import absolute_import
14.8
38
0.851351
from __future__ import absolute_import from . import ssl_match_hostname
0
0
0
0
0
0
0
11
23
1cd31b4890f3b6fdc7244e05a71517bd89b89233
48
py
Python
napari_plot/layers/line/__init__.py
lukasz-migas/napari-1d
b0f081a8711ae941b3e4b5c58c3aea56bd0e3277
[ "BSD-3-Clause" ]
13
2021-08-27T23:01:09.000Z
2022-03-22T13:51:35.000Z
napari_plot/layers/line/__init__.py
lukasz-migas/napari-1d
b0f081a8711ae941b3e4b5c58c3aea56bd0e3277
[ "BSD-3-Clause" ]
71
2021-08-28T13:29:17.000Z
2022-03-28T21:22:12.000Z
napari_plot/layers/line/__init__.py
lukasz-migas/napari-1d
b0f081a8711ae941b3e4b5c58c3aea56bd0e3277
[ "BSD-3-Clause" ]
null
null
null
"""Line"""
16
36
0.625
"""Line""" from .line import Line # noqa: F401
0
0
0
0
0
0
0
1
36
13c81ad5d59ddeac7225490f08cb685f14f20c5b
1,970
py
Python
trajectory/utils/serialization.py
SeanNobel/trajectory-transformer
b5497e992734b2320add01adbbfd26b3ee16f2d2
[ "MIT" ]
63
2021-11-23T08:00:27.000Z
2022-03-31T04:03:05.000Z
trajectory/utils/serialization.py
SeanNobel/trajectory-transformer
b5497e992734b2320add01adbbfd26b3ee16f2d2
[ "MIT" ]
7
2021-12-08T04:01:13.000Z
2022-03-31T07:42:37.000Z
trajectory/utils/serialization.py
SeanNobel/trajectory-transformer
b5497e992734b2320add01adbbfd26b3ee16f2d2
[ "MIT" ]
12
2021-12-13T10:55:32.000Z
2022-03-24T09:06:22.000Z
import os def mkdir(savepath, prune_fname=False): """ returns `True` iff `savepath` is created """ if prune_fname: savepath = os.path.dirname(savepath) if not os.path.exists(savepath): try: os.makedirs(savepath) except: print(f'[ utils/serializati...
26.621622
89
0.65736
import time import sys import os import glob import pickle import json import torch import pdb def mkdir(savepath, prune_fname=False): """ returns `True` iff `savepath` is created """ if prune_fname: savepath = os.path.dirname(savepath) if not os.path.exists(savepath): try: ...
0
0
0
0
0
1,323
0
-69
269
1619dc70d15eabc62f53e2b1f4e694140295a184
12,160
py
Python
paper/code/analysis.py
skearnes/color-features
a6af3686c82a5d1d6b68341fe5e5b16e8e4ed356
[ "BSD-3-Clause" ]
5
2016-06-07T04:17:24.000Z
2021-05-27T07:41:57.000Z
paper/code/analysis.py
skearnes/color-features
a6af3686c82a5d1d6b68341fe5e5b16e8e4ed356
[ "BSD-3-Clause" ]
1
2018-04-28T14:40:26.000Z
2018-05-19T21:55:47.000Z
paper/code/analysis.py
skearnes/color-features
a6af3686c82a5d1d6b68341fe5e5b16e8e4ed356
[ "BSD-3-Clause" ]
1
2018-12-06T22:54:43.000Z
2018-12-06T22:54:43.000Z
"""Analyze results. Use the saved model output to calculate AUC and other metrics. """ import collections import cPickle as pickle import gflags as flags import gzip import logging import numpy as np import os import pandas as pd from sklearn import metrics from statsmodels.stats import proportion import sys flags.D...
35.870206
80
0.565789
"""Analyze results. Use the saved model output to calculate AUC and other metrics. """ import collections import cPickle as pickle import gflags as flags import gzip import logging import numpy as np import os import pandas as pd from sklearn import metrics from statsmodels.stats import proportion import sys flags.D...
0
0
0
0
0
3,768
0
0
92
c49431bc20102646a020c6ae047aba4f99d141c1
992
py
Python
cgi-bin/reset_svg.py
errollw/smartboards
c511d4aff8a907e9a07065f7dee1b07f34d8fecd
[ "MIT" ]
4
2018-06-14T12:19:37.000Z
2022-02-08T18:36:37.000Z
cgi-bin/reset_svg.py
errollw/smartboards
c511d4aff8a907e9a07065f7dee1b07f34d8fecd
[ "MIT" ]
null
null
null
cgi-bin/reset_svg.py
errollw/smartboards
c511d4aff8a907e9a07065f7dee1b07f34d8fecd
[ "MIT" ]
2
2017-02-16T14:21:02.000Z
2020-05-16T08:21:43.000Z
#!/usr/bin/env python import cgi import os from utils import simple_success_response_JSON from shutil import copyfile args = cgi.FieldStorage() u_id = args['u_id'].value ### Check if SVG exists for each user. If it doesn't, create one ### ------------------------------------------------------------ svg_pat...
32
76
0.623992
#!/usr/bin/env python import cgi import os from utils import simple_success_response_JSON from shutil import copyfile args = cgi.FieldStorage() u_id = args['u_id'].value ### Check if SVG exists for each user. If it doesn't, create one ### ------------------------------------------------------------ svg_pat...
0
0
0
0
0
0
0
0
0
3cf445961c7fbec62141706a180b03f1a5a6c68c
1,671
py
Python
bioprocs/scripts/tsv/pTsvColFilter.py
pwwang/biopipen
d53b78aa192fd56a5da457463b099b2aa833b284
[ "MIT" ]
2
2021-09-10T00:17:52.000Z
2021-10-10T09:53:09.000Z
bioprocs/scripts/tsv/pTsvColFilter.py
pwwang/biopipen
d53b78aa192fd56a5da457463b099b2aa833b284
[ "MIT" ]
1
2021-12-02T07:54:09.000Z
2021-12-02T07:54:09.000Z
bioprocs/scripts/tsv/pTsvColFilter.py
pwwang/biopipen
d53b78aa192fd56a5da457463b099b2aa833b284
[ "MIT" ]
2
2021-09-10T00:17:54.000Z
2021-10-10T09:56:40.000Z
from os import path from pyppl.utils import alwaysList from bioprocs.utils.tsvio2 import TsvReader, TsvWriter infile = {{i.infile | quote}} colfile = {{i.colfile | quote}} outfile = {{o.outfile | quote}} inopts = {{args.inopts | repr}} cols = {{args.cols | repr}} keep = {{args.keep | repr}} from_file = False ...
29.315789
92
0.707361
from os import path from collections import OrderedDict from diot import Diot from pyppl.utils import alwaysList from bioprocs.utils.tsvio2 import TsvReader, TsvWriter infile = {{i.infile | quote}} colfile = {{i.colfile | quote}} outfile = {{o.outfile | quote}} inopts = {{args.inopts | repr}} cols = {{args.cols |...
0
0
0
0
0
0
0
14
44
078d96e72eb252112b59995c7c4436d0430ccb52
7,510
py
Python
quantfig.py
zmoxq/quantfig
0bd9df3a936569c38b4d7cffe47ff7eb4de2544a
[ "MIT" ]
null
null
null
quantfig.py
zmoxq/quantfig
0bd9df3a936569c38b4d7cffe47ff7eb4de2544a
[ "MIT" ]
null
null
null
quantfig.py
zmoxq/quantfig
0bd9df3a936569c38b4d7cffe47ff7eb4de2544a
[ "MIT" ]
null
null
null
import plotly.graph_objects as go import numpy as np def line_fig(date, y_axis, y_dict): """ :param date: xaxis, :param y_label: yaxis label e.g. 'y2','y3' :param y_dict: line data :return: list """ y_values = [list(k) for k in y_dict.values()] y_labels = [l for l in y_dict.keys()] ...
27.509158
102
0.488815
from app.signal_calc import SignalCalc import plotly.graph_objects as go from plotly.subplots import make_subplots import math import numpy as np import pandas as pd def line_fig(date, y_axis, y_dict): """ :param date: xaxis, :param y_label: yaxis label e.g. 'y2','y3' :param y_dict: line data :ret...
0
0
0
6,691
0
0
0
25
111
5a882d3d8363079955e3ebfe7587ce3969adff5a
13,368
py
Python
app.py
aarunishsinha/Course-Management-System
80364ffd1c7f6110da9687d9c24f146ab45180f9
[ "MIT" ]
2
2022-02-14T04:31:06.000Z
2022-03-01T18:26:07.000Z
app.py
aarunishsinha/Course_Management_System
80364ffd1c7f6110da9687d9c24f146ab45180f9
[ "MIT" ]
null
null
null
app.py
aarunishsinha/Course_Management_System
80364ffd1c7f6110da9687d9c24f146ab45180f9
[ "MIT" ]
1
2022-02-14T04:31:08.000Z
2022-02-14T04:31:08.000Z
from flask import Flask import psycopg2 # import students from students import studentRoutes from Admin import adminRoutes # import nltk # import numpy as np # import pandas as pd # conn = psycopg2.connect('dbname=postgres') conn = psycopg2.connect('dbname=group_13 user=group_13 password=p0XvR8Ch4BAGb host=10.17.50.23...
33.503759
242
0.596349
from flask import Flask, render_template, send_from_directory, request, redirect, url_for import os import psycopg2 # import students from students import studentRoutes from Admin import adminRoutes # import nltk # import numpy as np # import pandas as pd # conn = psycopg2.connect('dbname=postgres') conn = psycopg2.co...
0
12,066
0
0
0
0
0
54
275
8e54a2ad2d5ce89659043e4f426413cb107524f6
1,447
py
Python
setup.py
vznncv/vznncv-miniterm
a5999744435350304e26c4b4c97f7a999b2e5abd
[ "MIT" ]
1
2022-02-17T20:23:12.000Z
2022-02-17T20:23:12.000Z
setup.py
vznncv/vznncv-miniterm
a5999744435350304e26c4b4c97f7a999b2e5abd
[ "MIT" ]
null
null
null
setup.py
vznncv/vznncv-miniterm
a5999744435350304e26c4b4c97f7a999b2e5abd
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import re from setuptools import setup, find_namespace_packages project_name = 'vznncv-miniterm' with open('README.md') as readme_file: readme = readme_file.read() readme = re.sub(r'!\[[^\[\]]*\]\S*', '', readme) _locals = {} with open('src/' + project_name.replace(...
27.826923
74
0.624741
#!/usr/bin/env python # -*- coding: utf-8 -*- import re from setuptools import setup, find_namespace_packages project_name = 'vznncv-miniterm' with open('README.md') as readme_file: readme = readme_file.read() readme = re.sub(r'!\[[^\[\]]*\]\S*', '', readme) _locals = {} with open('src/' + project_name.replace(...
0
0
0
0
0
0
0
0
0
b7625fb779461162066385c07a1a8355c1818475
4,187
py
Python
tinkycare.py
m-clare/tinky-care
a2c7831d9f6908949265d51708d5d27fe89901ff
[ "MIT" ]
5
2021-04-08T23:55:13.000Z
2021-11-23T19:30:47.000Z
tinkycare.py
m-clare/tinky-care
a2c7831d9f6908949265d51708d5d27fe89901ff
[ "MIT" ]
null
null
null
tinkycare.py
m-clare/tinky-care
a2c7831d9f6908949265d51708d5d27fe89901ff
[ "MIT" ]
null
null
null
from inky.inky_uc8159 import Inky from datetime import datetime as dt # Inky display information inky_display = Inky() # Global because only one inky to pass around... DESATURATED_PALETTE = ( 0, 0, 0, 255, 255, 255, 0, 255, 0, 0, 0, 255, 255, 0, 0, 255,...
23.522472
85
0.583711
import os import json from PIL import Image, ImageDraw, ImageFont from inky.inky_uc8159 import Inky from datetime import datetime as dt from bots.orgbot import get_org_image from bots.twitterbot import get_tweet_img from bots.twitterbot import get_recent_care_tweet from bots.pomodorobot import get_pomodoro_time from bo...
0
0
0
0
0
2,496
0
152
335
ceedc8ffab527acf38eb4912b4ec135b78d4964d
6,473
py
Python
loss/loss_functions.py
akio-kobayashi/acoustic_scene
b4d0678474d1b0dde4478a1710aa489e2ffad875
[ "Apache-2.0" ]
null
null
null
loss/loss_functions.py
akio-kobayashi/acoustic_scene
b4d0678474d1b0dde4478a1710aa489e2ffad875
[ "Apache-2.0" ]
null
null
null
loss/loss_functions.py
akio-kobayashi/acoustic_scene
b4d0678474d1b0dde4478a1710aa489e2ffad875
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf import keras.backend as K ''' Cauchy-Schwarz distance between 2 samples The distance measures 'distinguishability' between samples. So, if 2 samples belong to same class, the distance would have a small value. ''' ''' Compute Cauchy-Schwarz distance loss among samples in the ba...
35.762431
113
0.663525
import numpy as np import tensorflow as tf import keras.backend as K ''' Cauchy-Schwarz distance between 2 samples The distance measures 'distinguishability' between samples. So, if 2 samples belong to same class, the distance would have a small value. ''' def cauchy_schwarz_distance(logits1, logits2, cros...
0
0
0
0
0
5,272
0
-3
455
c717da8e40954a97b84dcdb68eb545035fb322a9
1,925
py
Python
wolk/data.py
bverhoeve/wolk
61e63c535cac38a2e6026ae48765d8ede4787404
[ "MIT" ]
1
2020-05-31T17:38:19.000Z
2020-05-31T17:38:19.000Z
wolk/data.py
bverhoeve/wolk
61e63c535cac38a2e6026ae48765d8ede4787404
[ "MIT" ]
7
2020-05-18T13:06:57.000Z
2020-06-01T17:44:52.000Z
wolk/data.py
bverhoeve/wolk
61e63c535cac38a2e6026ae48765d8ede4787404
[ "MIT" ]
null
null
null
import os import logging from .constants import (DATA_DIR, AWS_DIR, AZURE_DIR, GCP_DIR) # Initialisation of data directory if not os.path.exists(DATA_DIR): logging.debug('No data directories yet, creating') aws_path: str = os.path.join(DATA_DIR, AWS_DIR) azure_path: str = os.path.join(DATA_DIR, AZURE_DIR)...
33.189655
82
0.66026
import os import json import boto3 import logging from .constants import ( DATA_DIR, S3_BUCKET, AWS_DIR, AWS_EC2_FILE, AWS_RDS_FILE, AZURE_DIR, GCP_DIR ) # Initialisation of data directory if not os.path.exists(DATA_DIR): logging.debug('No data directories yet, creating') aws_path:...
0
0
0
0
0
1,276
0
50
102
5c1091d48c8e0c9de6e93e70cfd744804701c5be
51,872
py
Python
parinfer.py
oakmac/sublime-text-parinfer
42b5e43591c415aaab331d07c820f073780df64a
[ "ISC" ]
58
2015-11-20T09:54:43.000Z
2022-01-11T07:17:56.000Z
parinfer.py
oakmac/sublime-text-parinfer
42b5e43591c415aaab331d07c820f073780df64a
[ "ISC" ]
38
2015-11-21T23:02:00.000Z
2021-03-22T15:13:11.000Z
parinfer.py
oakmac/sublime-text-parinfer
42b5e43591c415aaab331d07c820f073780df64a
[ "ISC" ]
10
2015-12-03T02:42:01.000Z
2020-08-16T15:02:45.000Z
## Parinfer.py - a Parinfer implementation in Python ## v3.12.0 ## https://github.com/oakmac/parinfer.py ## ## More information about Parinfer can be found here: ## http://shaunlebron.github.io/parinfer/ ## ## Copyright (c) 2015, 2020, Chris Oakman and other contributors ## Released under the ISC license ## https://git...
36.32493
158
0.564486
## Parinfer.py - a Parinfer implementation in Python ## v3.12.0 ## https://github.com/oakmac/parinfer.py ## ## More information about Parinfer can be found here: ## http://shaunlebron.github.io/parinfer/ ## ## Copyright (c) 2015, 2020, Chris Oakman and other contributors ## Released under the ISC license ## https://git...
0
0
0
13,136
0
29,843
0
-11
1,694
4453f078b7d3b2fd4ad81bf82d4df1d74c857f5d
392
py
Python
testemunhoweb/cadastro/migrations/0010_auto_20181223_2252.py
danielcamilo13/testemunhoWEB
46825e31123058fa6ee21e4e71e9e0bedde32bb4
[ "bzip2-1.0.6" ]
1
2019-12-03T01:37:13.000Z
2019-12-03T01:37:13.000Z
testemunhoweb/cadastro/migrations/0010_auto_20181223_2252.py
danielcamilo13/testemunhoWEB
46825e31123058fa6ee21e4e71e9e0bedde32bb4
[ "bzip2-1.0.6" ]
11
2020-06-06T01:28:35.000Z
2022-03-12T00:16:34.000Z
testemunhoweb/cadastro/migrations/0010_auto_20181223_2252.py
danielcamilo13/testemunhoWEB
46825e31123058fa6ee21e4e71e9e0bedde32bb4
[ "bzip2-1.0.6" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.17 on 2018-12-24 00:52 from __future__ import unicode_literals
19.6
49
0.612245
# -*- coding: utf-8 -*- # Generated by Django 1.11.17 on 2018-12-24 00:52 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('cadastro', '0009_auto_20181215_0042'), ] operations = [ migrations.RenameModel( ...
0
0
0
220
0
0
0
11
46
0769c7ed667e125bb1a20f8fc98707bcd2e4d8af
3,435
py
Python
custom_components/nest_protect/select.py
rubicon/ha-nest-protect
4f6ddf12e8384472eff29274c21462b028fe7f85
[ "MIT" ]
78
2022-01-15T23:08:29.000Z
2022-03-31T19:58:17.000Z
custom_components/nest_protect/select.py
rubicon/ha-nest-protect
4f6ddf12e8384472eff29274c21462b028fe7f85
[ "MIT" ]
33
2022-01-15T20:03:18.000Z
2022-03-31T23:38:34.000Z
custom_components/nest_protect/select.py
rubicon/ha-nest-protect
4f6ddf12e8384472eff29274c21462b028fe7f85
[ "MIT" ]
10
2022-01-29T23:14:10.000Z
2022-03-22T12:33:52.000Z
"""Select platform for Nest Protect.""" from __future__ import annotations from homeassistant.components.select import SelectEntityDescription from homeassistant.helpers.entity import EntityCategory from .entity import NestProtectDeviceClass BRIGHTNESS_TO_PRESET: dict[str, str] = {1: "low", 2: "medium", 3: "high"}...
30.945946
85
0.676274
"""Select platform for Nest Protect.""" from __future__ import annotations from dataclasses import dataclass from homeassistant.components.select import SelectEntity, SelectEntityDescription from homeassistant.helpers.entity import EntityCategory from . import HomeAssistantNestProtectData from .const import DOMAIN, ...
0
688
1,530
226
0
0
0
82
160
d95dd702b9c2c9ec191644d22f8b6dfb6585324e
996
py
Python
1Dec/listComprehension.py
universekavish/Python-Training
ccd7dfbc8802662de0e0fc20fe99bb3aae4c6e18
[ "Apache-2.0" ]
null
null
null
1Dec/listComprehension.py
universekavish/Python-Training
ccd7dfbc8802662de0e0fc20fe99bb3aae4c6e18
[ "Apache-2.0" ]
null
null
null
1Dec/listComprehension.py
universekavish/Python-Training
ccd7dfbc8802662de0e0fc20fe99bb3aae4c6e18
[ "Apache-2.0" ]
null
null
null
L = [10, 11, 12, 13, 14, 15, 16, 17, 18] print(L) L1 = [x for x in L if x % 2 == 0] print(L1) ip = '10.20.30.40' octets = ip.split('.') print(octets) octets = [int(octet) for octet in octets] print(octets) import random primesPositions = [p for p in range(100) if isPrime(random.randint(1, 1000))] print(primesPosit...
21.652174
108
0.629518
L = [10, 11, 12, 13, 14, 15, 16, 17, 18] print(L) L1 = [x for x in L if x % 2 == 0] print(L1) ip = '10.20.30.40' octets = ip.split('.') print(octets) octets = [int(octet) for octet in octets] print(octets) def isPrime(n) : if n < 2 : return False i = 2 while i < n : if n % i == 0 : return False i = i + 1 re...
0
0
0
308
0
98
0
0
46
cc313e270c4f537f465b4dd917ff496c05ef36f3
3,175
py
Python
awwards/migrations/0001_initial.py
Nkurumwa/API-project
452c3c259f46ab60d62f47d740a2eb15db694768
[ "MIT" ]
null
null
null
awwards/migrations/0001_initial.py
Nkurumwa/API-project
452c3c259f46ab60d62f47d740a2eb15db694768
[ "MIT" ]
3
2020-06-06T00:10:58.000Z
2021-06-10T22:29:21.000Z
awwards/migrations/0001_initial.py
Nkurumwa/API-project
452c3c259f46ab60d62f47d740a2eb15db694768
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.26 on 2019-11-25 21:03 from __future__ import unicode_literals import django.core.validators import django.db.models.deletion
46.014493
129
0.607559
# -*- coding: utf-8 -*- # Generated by Django 1.11.26 on 2019-11-25 21:03 from __future__ import unicode_literals from django.conf import settings import django.core.validators from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration)...
0
0
0
2,870
0
0
0
37
90
15622877fb0c7c997c9035ab265bc41c3504cd1d
1,390
py
Python
python_codes/generators_.py
naikshubham/Miscellaneous-ML-and-Python
a7be5cf5ac95085d3becc554593ee45f93f7850f
[ "BSD-2-Clause" ]
1
2021-06-15T09:57:47.000Z
2021-06-15T09:57:47.000Z
python_codes/generators_.py
naikshubham/Miscellaneous-ML-and-Python
a7be5cf5ac95085d3becc554593ee45f93f7850f
[ "BSD-2-Clause" ]
null
null
null
python_codes/generators_.py
naikshubham/Miscellaneous-ML-and-Python
a7be5cf5ac95085d3becc554593ee45f93f7850f
[ "BSD-2-Clause" ]
null
null
null
print(join(capitalize("this will be uppercase text"))) print(join(leetspeak("This isn't a leetspeak"))) print(join(hypenate("will be hypenated by letters"))) print(join(hypenate("will be hypenated by words".split()))) # next() and send() free = psychologist() print('free->', free) print('next->', next(...
26.730769
72
0.570504
def capitalize(values): # print(values) for value in values: # print(value) yield value.upper() def hypenate(values): # print(values) for value in values: yield f"-{value}-" def leetspeak(values): for value in values: if value in {'t', 'T'}: yield '7' ...
0
0
0
0
747
41
0
0
114
0c0b703bd0d03b86650c5ce280e2f3295cc83afa
4,897
py
Python
mri/dispatch/MatplotlibDispatch.py
Mri-monitoring/Mri-python-client
7ff4889c198d22b9d78b7f0ba8711efa71aef16b
[ "Apache-2.0" ]
4
2015-07-16T16:41:50.000Z
2015-08-13T09:53:30.000Z
mri/dispatch/MatplotlibDispatch.py
Mri-monitoring/Mri-python-client
7ff4889c198d22b9d78b7f0ba8711efa71aef16b
[ "Apache-2.0" ]
4
2015-07-16T16:09:37.000Z
2015-08-18T19:38:19.000Z
mri/dispatch/MatplotlibDispatch.py
Mri-monitoring/Mri-python-client
7ff4889c198d22b9d78b7f0ba8711efa71aef16b
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() import logging try: IMPORTED = True except Exception as e: logging.warning('Failed to impor...
36.544776
109
0.559526
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import super from future import standard_library standard_library.install_aliases() import logging import os import errno from .BaseDispatch import BaseDisp...
0
0
0
4,205
0
0
0
8
164
c8beb2fef2a90dce4e6cacc257c60abd209a38cc
2,186
py
Python
prototype/speed/rpcsize.py
ooici/pyon
122c629290d27f32f2f41dafd5c12469295e8acf
[ "BSD-2-Clause" ]
2
2015-06-09T16:07:09.000Z
2015-07-28T10:06:31.000Z
prototype/speed/rpcsize.py
ooici/pyon
122c629290d27f32f2f41dafd5c12469295e8acf
[ "BSD-2-Clause" ]
3
2020-07-22T15:14:55.000Z
2021-12-13T19:35:06.000Z
prototype/speed/rpcsize.py
ooici/pyon
122c629290d27f32f2f41dafd5c12469295e8acf
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python from pyon.net.endpoint import RPCClient #from interface.services.idatastore_service import IDatastoreService from interface.services.ihello_service import IHelloService from pyon.net.messaging import make_node import gevent import time import base64 import os import argparse import msgpack parse...
25.717647
92
0.68893
#!/usr/bin/env python from pyon.net.endpoint import RPCClient #from interface.services.idatastore_service import IDatastoreService from interface.services.ihello_service import IHelloService from pyon.net.messaging import make_node import gevent import time import base64 import os import argparse import msgpack parse...
0
0
0
0
0
531
0
0
69
7001a2aafe77e80e908cb64a736dd79539290346
7,957
py
Python
packages/connections/gym/connection.py
mattmcd/aea-examples
1c72faadf8feb9f4b8dda9f17995010c2fb3510e
[ "Apache-2.0" ]
null
null
null
packages/connections/gym/connection.py
mattmcd/aea-examples
1c72faadf8feb9f4b8dda9f17995010c2fb3510e
[ "Apache-2.0" ]
null
null
null
packages/connections/gym/connection.py
mattmcd/aea-examples
1c72faadf8feb9f4b8dda9f17995010c2fb3510e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the...
32.214575
153
0.607892
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the...
0
685
0
5,861
0
0
0
144
312
60b4412d890e1f04c1d7d9dcd011193caca13c37
3,404
py
Python
scripts/find_clusters.py
camillemarie/ncov
6084ab1f42a36cfba6f8198c4f38047737072d06
[ "MIT" ]
1
2022-02-06T20:23:03.000Z
2022-02-06T20:23:03.000Z
scripts/find_clusters.py
camillemarie/ncov
6084ab1f42a36cfba6f8198c4f38047737072d06
[ "MIT" ]
1
2022-03-01T00:02:11.000Z
2022-03-01T00:08:15.000Z
scripts/find_clusters.py
camillemarie/ncov
6084ab1f42a36cfba6f8198c4f38047737072d06
[ "MIT" ]
1
2022-01-11T17:46:29.000Z
2022-01-11T17:46:29.000Z
#!/usr/bin/env python3 import argparse from augur.utils import read_tree, read_node_data, read_metadata from collections import Counter import csv import hashlib MAX_HASH_LENGTH = 7 if __name__ == "__main__": parser = argparse.ArgumentParser( description="Find polytomies in a given tree that all belong t...
39.126437
134
0.61134
#!/usr/bin/env python3 import argparse from augur.utils import read_tree, read_node_data, read_metadata from collections import Counter import csv import hashlib MAX_HASH_LENGTH = 7 if __name__ == "__main__": parser = argparse.ArgumentParser( description="Find polytomies in a given tree that all belong t...
0
0
0
0
0
0
0
0
0
fe7269f61e6da28d4bef240e6beb92eb1df6c19b
1,486
py
Python
newstream/settings/docker.py
diffractive/newstream
cf1a1f230e18d01c63b50ab9d360aa44ac5a486f
[ "MIT" ]
1
2020-05-03T12:33:42.000Z
2020-05-03T12:33:42.000Z
newstream/settings/docker.py
diffractive/newstream
cf1a1f230e18d01c63b50ab9d360aa44ac5a486f
[ "MIT" ]
14
2020-07-06T20:05:57.000Z
2022-03-12T00:39:11.000Z
newstream/settings/docker.py
diffractive/newstream
cf1a1f230e18d01c63b50ab9d360aa44ac5a486f
[ "MIT" ]
null
null
null
ALLOWED_HOSTS = [ "*" ] SECRET_KEY = os.environ.get("SECERT_KEY", "dummykey") DATABASE_NAME = os.environ.get("DATABASE_NAME", "newstream") DATABASE_USER = os.environ.get("DATABASE_USER", "newstream") DATABASE_HOST = os.environ.get("DATABASE_HOST", "") DATABASE_PORT = os.environ.get("DATABASE_PORT", "") DATABASE_P...
23.587302
70
0.571332
from .base import * ALLOWED_HOSTS = [ "*" ] SECRET_KEY = os.environ.get("SECERT_KEY", "dummykey") DATABASE_NAME = os.environ.get("DATABASE_NAME", "newstream") DATABASE_USER = os.environ.get("DATABASE_USER", "newstream") DATABASE_HOST = os.environ.get("DATABASE_HOST", "") DATABASE_PORT = os.environ.get("DATABASE_P...
0
0
0
0
0
0
0
-3
48
4863ce321508a73286127e64fdef95c188d41618
564
py
Python
app/settings/views.py
dev-johnlopez/assignably-old
99f550e3e970a979234a724097ed8c940f1562c1
[ "MIT" ]
null
null
null
app/settings/views.py
dev-johnlopez/assignably-old
99f550e3e970a979234a724097ed8c940f1562c1
[ "MIT" ]
null
null
null
app/settings/views.py
dev-johnlopez/assignably-old
99f550e3e970a979234a724097ed8c940f1562c1
[ "MIT" ]
null
null
null
from flask import Blueprint bp = Blueprint('settings', __name__) #@bp.before_app_request #def before_request(): # g.search_form = SearchForm()
29.684211
76
0.696809
from flask import Blueprint, g, render_template, redirect, url_for, g, flash from flask_security import current_user, login_required, current_user from app import db bp = Blueprint('settings', __name__) #@bp.before_app_request #def before_request(): # g.search_form = SearchForm() @bp.route('/index', methods=['GET...
0
255
0
0
0
0
0
94
67
cc23049acceaadcf9842b0dcc4a63b1ab589941e
1,269
py
Python
day2.py
Zinko17/FP
f3a8f542a710c3acafbc6d6ac6acd275dd34e653
[ "MIT" ]
null
null
null
day2.py
Zinko17/FP
f3a8f542a710c3acafbc6d6ac6acd275dd34e653
[ "MIT" ]
null
null
null
day2.py
Zinko17/FP
f3a8f542a710c3acafbc6d6ac6acd275dd34e653
[ "MIT" ]
null
null
null
# a = int(input()) # b = int(input()) # if a < b: # print('a') # else: # print('b') # password = input('enter password:') # check_password = input('confirm password:') # if password == check_password and len(password) >=8: # print('Succesful') # else: # if len(password)>= 8: # print('password don...
13.645161
54
0.501182
# a = int(input()) # b = int(input()) # if a < b: # print('a') # else: # print('b') # password = input('enter password:') # check_password = input('confirm password:') # if password == check_password and len(password) >=8: # print('Succesful') # else: # if len(password)>= 8: # print('password don...
0
0
0
0
0
0
0
0
0
db183d5d9240100317028197380a0bf0c8249960
542
py
Python
pathogen_memo/views/index.py
NajlaBioinfo/pathogen_memo_app
426a0ef545ffc96da8c6fc1bca5eb19caaf1879c
[ "MIT" ]
null
null
null
pathogen_memo/views/index.py
NajlaBioinfo/pathogen_memo_app
426a0ef545ffc96da8c6fc1bca5eb19caaf1879c
[ "MIT" ]
3
2021-09-03T10:33:09.000Z
2022-03-12T00:17:18.000Z
pathogen_memo/views/index.py
NajlaBioinfo/pathogen_memo_app
426a0ef545ffc96da8c6fc1bca5eb19caaf1879c
[ "MIT" ]
null
null
null
from flask import Blueprint #Set word_count_site_name indexv = Blueprint('indexv', __name__)
22.583333
73
0.761993
from flask import Blueprint, render_template from sys import version from flask import Flask, jsonify from pathogen_memo.controllers import getallquery #Set word_count_site_name indexv = Blueprint('indexv', __name__) @indexv.route('/') def index(): tablename = 'pathogens' data_index = getallquery.gethemall(ta...
0
297
0
0
0
0
0
58
90
87a07ddd5aaead0e0d702a3e591e624c393f2c25
1,061
py
Python
bin/fasta_unwrap.py
nyoungb2/seq_tools
8d93ad3fa2340c908e67830a2362fba6d2c47fbb
[ "MIT" ]
null
null
null
bin/fasta_unwrap.py
nyoungb2/seq_tools
8d93ad3fa2340c908e67830a2362fba6d2c47fbb
[ "MIT" ]
null
null
null
bin/fasta_unwrap.py
nyoungb2/seq_tools
8d93ad3fa2340c908e67830a2362fba6d2c47fbb
[ "MIT" ]
1
2018-06-25T19:34:47.000Z
2018-06-25T19:34:47.000Z
#!/usr/bin/env python """ fasta_unwrap: hard-wrapped fastas unwrapped (sequence is just 1 line) Usage: fasta_unwrap <fasta> | [-] fasta_unwrap -h | --help fasta_unwrap --version Options: <fasta> Fasta file name ('-' if from STDIN). -h --help Show this screen. --version Show version. Descri...
18.946429
69
0.637135
#!/usr/bin/env python """ fasta_unwrap: hard-wrapped fastas unwrapped (sequence is just 1 line) Usage: fasta_unwrap <fasta> | [-] fasta_unwrap -h | --help fasta_unwrap --version Options: <fasta> Fasta file name ('-' if from STDIN). -h --help Show this screen. --version Show version. Descri...
0
0
0
0
0
0
0
0
0
56ceee4a1208e349f997d03840c35c70dbf57a9b
632
py
Python
dialogue-engine/test/integration/programy/clients/events/tcpsocket/socket_client.py
cotobadesign/cotoba-agent-oss
3833d56e79dcd7529c3e8b3a3a8a782d513d9b12
[ "MIT" ]
104
2020-03-30T09:40:00.000Z
2022-03-06T22:34:25.000Z
dialogue-engine/test/integration/programy/clients/events/tcpsocket/socket_client.py
cotobadesign/cotoba-agent-oss
3833d56e79dcd7529c3e8b3a3a8a782d513d9b12
[ "MIT" ]
25
2020-06-12T01:36:35.000Z
2022-02-19T07:30:44.000Z
dialogue-engine/test/integration/programy/clients/events/tcpsocket/socket_client.py
cotobadesign/cotoba-agent-oss
3833d56e79dcd7529c3e8b3a3a8a782d513d9b12
[ "MIT" ]
10
2020-04-02T23:43:56.000Z
2021-05-14T13:47:01.000Z
# client.py import socket import sys import json host = sys.argv[1] port = int(sys.argv[2]) question = sys.argv[3] userid = sys.argv[4] max_size = 1024 if len(sys.argv) == 6: max_size = sys.argv[5] payload = {"question": question, "userid": userid} json_data = json.dumps(payload) # create a socket object s = soc...
19.151515
53
0.702532
# client.py import socket import sys import json host = sys.argv[1] port = int(sys.argv[2]) question = sys.argv[3] userid = sys.argv[4] max_size = 1024 if len(sys.argv) == 6: max_size = sys.argv[5] payload = {"question": question, "userid": userid} json_data = json.dumps(payload) # create a socket object s = soc...
0
0
0
0
0
0
0
0
0
3a03c336149f763ec2aca84dddb3492afa302a34
3,462
py
Python
assets/psutil/get_sys_info.py
OrceBR/HercAdminTool
4db13c88094493ccb75d9e74342c49e5c27d95d2
[ "MIT" ]
2
2021-04-08T05:06:20.000Z
2021-07-22T00:42:50.000Z
assets/psutil/get_sys_info.py
OrceBR/HercAdminTool
4db13c88094493ccb75d9e74342c49e5c27d95d2
[ "MIT" ]
null
null
null
assets/psutil/get_sys_info.py
OrceBR/HercAdminTool
4db13c88094493ccb75d9e74342c49e5c27d95d2
[ "MIT" ]
null
null
null
#!/usr/bin/env python # This script ships with HAT, or HercAdminTool. # Please see our project here: https://github.com/jguy1987/HercAdminTool # Author: Jguy - John Mish # The MIT license covers this file. Please see applicable license file here: https://github.com/jguy1987/HercAdminTool/blob/master/license.txt # You ...
29.589744
142
0.697574
#!/usr/bin/env python # This script ships with HAT, or HercAdminTool. # Please see our project here: https://github.com/jguy1987/HercAdminTool # Author: Jguy - John Mish # The MIT license covers this file. Please see applicable license file here: https://github.com/jguy1987/HercAdminTool/blob/master/license.txt # You ...
0
0
0
0
0
0
0
11
0
8af60fffa531510aaf431b7e15d750205843a7fd
1,163
py
Python
companies/urls.py
Ins-V/wc_crm
5d75907bb48e892328712ed0b2cf96b9083239aa
[ "MIT" ]
null
null
null
companies/urls.py
Ins-V/wc_crm
5d75907bb48e892328712ed0b2cf96b9083239aa
[ "MIT" ]
null
null
null
companies/urls.py
Ins-V/wc_crm
5d75907bb48e892328712ed0b2cf96b9083239aa
[ "MIT" ]
null
null
null
from django.urls import path from companies import views app_name = 'company' urlpatterns = [ path('contacts/', views.CompanyContactsView.as_view(), name='contacts'), path('phone/list/', views.CompanyPhoneListView.as_view(), name='phone_list'), path('phone/add/', views.CompanyPhoneCreateView.as_view(), n...
52.863636
96
0.705933
from django.urls import path from companies import views app_name = 'company' urlpatterns = [ path('contacts/', views.CompanyContactsView.as_view(), name='contacts'), path('phone/list/', views.CompanyPhoneListView.as_view(), name='phone_list'), path('phone/add/', views.CompanyPhoneCreateView.as_view(), n...
0
0
0
0
0
0
0
0
0
6aec30f308acb1094dc090358d4839af6529207e
768
py
Python
aaulan/models/crew_member.py
AAULAN/aaulan2.0
f0400914fe9e126a2dbf94cbce78cc34f976f3b8
[ "MIT" ]
null
null
null
aaulan/models/crew_member.py
AAULAN/aaulan2.0
f0400914fe9e126a2dbf94cbce78cc34f976f3b8
[ "MIT" ]
null
null
null
aaulan/models/crew_member.py
AAULAN/aaulan2.0
f0400914fe9e126a2dbf94cbce78cc34f976f3b8
[ "MIT" ]
null
null
null
from django.contrib import admin admin.site.register(CrewMember, CrewMemberAdmin)
24.774194
72
0.692708
from django.conf import settings from django.db import models from django.contrib import admin class CrewMember(models.Model): class Meta: verbose_name = 'Crew member' #photo = models.ImageField() title = models.CharField(max_length=100) user = models.ForeignKey( settings.AUTH_USER_MO...
0
0
0
574
0
0
0
18
90
836d12ee60397703c65310ff1b8d20a62d53b1f0
4,626
py
Python
order.py
AmmeySaini/Realme-AutoBuy
c5ca4ce9990fd397b192f3360ecb264a64ab08f6
[ "MIT" ]
32
2020-06-23T08:20:56.000Z
2022-02-13T05:42:48.000Z
order.py
AmmeySaini/Realme-AutoBuy
c5ca4ce9990fd397b192f3360ecb264a64ab08f6
[ "MIT" ]
9
2020-07-22T06:16:43.000Z
2021-04-08T09:03:41.000Z
order.py
AmmeySaini/Realme-AutoBuy
c5ca4ce9990fd397b192f3360ecb264a64ab08f6
[ "MIT" ]
18
2020-06-23T08:12:15.000Z
2021-10-09T00:13:15.000Z
import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) ######### AUTHOR - @AmmeySaini ######### ######### Github Repo - https://github.com/AmmeySaini/Realme-AutoBuy ######### ######### I'm not responisble for any damage or anything bad happens to you using this script ######### ######### U...
50.835165
149
0.426719
import requests import urllib3 import re import time from pathlib import Path from __constants.constants import head1 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) ######### AUTHOR - @AmmeySaini ######### ######### Github Repo - https://github.com/AmmeySaini/Realme-AutoBuy ######### ######### I'...
0
0
0
0
0
4,052
0
-7
133
0103fcf54df56370cd3ee1ea3fff662c86dbc2ac
1,597
py
Python
output_parser.py
crowd-planning-poker/ML-SEE-replication-pack
8db5ad0e6425d2d24243442a472028137164fdf5
[ "MIT" ]
null
null
null
output_parser.py
crowd-planning-poker/ML-SEE-replication-pack
8db5ad0e6425d2d24243442a472028137164fdf5
[ "MIT" ]
null
null
null
output_parser.py
crowd-planning-poker/ML-SEE-replication-pack
8db5ad0e6425d2d24243442a472028137164fdf5
[ "MIT" ]
null
null
null
import sys if __name__ == "__main__": file_name = sys.argv[1] parse_output_performance(file_name)
35.488889
110
0.514715
import numpy as np import sys import regex as re def parse_output_performance(file): f = open(file, "r") content = f.read() print("Dataset\tProject\tMethod\tFold\tF1\tAUC_ROC") f1, auc_roc = {'RF-BERT':[],'BERT-BERT':[],'RF-BoW':[]},{'RF-BERT':[],'BERT-BERT':[],'RF-BoW':[]} for match in re...
0
0
0
0
0
1,418
0
-6
71
bce529e350c6acfe1c38a83d15faaccd0ed9f22c
4,649
py
Python
demo.py
b4824583/cmr
7e964bd5fae6d12ad347d5256daa634548ca0a5a
[ "MIT" ]
null
null
null
demo.py
b4824583/cmr
7e964bd5fae6d12ad347d5256daa634548ca0a5a
[ "MIT" ]
null
null
null
demo.py
b4824583/cmr
7e964bd5fae6d12ad347d5256daa634548ca0a5a
[ "MIT" ]
null
null
null
""" Demo of CMR. Note that CMR assumes that the object has been detected, so please use a picture of a bird that is centered and well cropped. Sample usage: python demo.py --name bird_net --num_train_epoch 500 --img_path misc/demo_data/img1.jpg """ from __future__ import absolute_import from __future__ import divis...
27.672619
125
0.620779
""" Demo of CMR. Note that CMR assumes that the object has been detected, so please use a picture of a bird that is centered and well cropped. Sample usage: python demo.py --name bird_net --num_train_epoch 500 --img_path misc/demo_data/img1.jpg """ from __future__ import absolute_import from __future__ import divis...
366
0
0
0
0
3,318
0
70
225
4ae71ff7c9b21807335b8daf912d973c1bd8ecba
4,389
py
Python
deepsim/deepsim/__init__.py
aws-deepracer/deepsim
cad2639f525c2f94ec5c03d8b855cc65b0b8ee55
[ "Apache-2.0" ]
1
2022-03-25T07:20:49.000Z
2022-03-25T07:20:49.000Z
deepsim/deepsim/__init__.py
aws-deepracer/deepsim
cad2639f525c2f94ec5c03d8b855cc65b0b8ee55
[ "Apache-2.0" ]
null
null
null
deepsim/deepsim/__init__.py
aws-deepracer/deepsim
cad2639f525c2f94ec5c03d8b855cc65b0b8ee55
[ "Apache-2.0" ]
null
null
null
################################################################################# # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # # # Licensed under the Apache License, Version 2.0 (the "License"). ...
48.766667
112
0.732741
################################################################################# # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # # # Licensed under the Apache License, Version 2.0 (the "License"). ...
0
0
0
0
0
0
0
1,959
1,200
64f2b559694d21656b8f455bb0caf9f3b4b2e2c5
4,010
py
Python
hexrd/config/tests/test_root.py
glemaitre/hexrd
b68b1ba72e0f480d29bdaae2adbd6c6e2380cc7c
[ "BSD-3-Clause" ]
27
2020-02-18T12:15:08.000Z
2022-03-24T17:53:46.000Z
hexrd/config/tests/test_root.py
glemaitre/hexrd
b68b1ba72e0f480d29bdaae2adbd6c6e2380cc7c
[ "BSD-3-Clause" ]
259
2020-02-02T22:18:29.000Z
2022-03-30T19:59:58.000Z
hexrd/config/tests/test_root.py
glemaitre/hexrd
b68b1ba72e0f480d29bdaae2adbd6c6e2380cc7c
[ "BSD-3-Clause" ]
11
2020-02-18T12:14:44.000Z
2022-03-04T16:19:11.000Z
from .common import test_data reference_data = \ """ analysis_name: analysis #working_dir: # not set to test defaulting to cwd --- analysis_name: analysis_2 working_dir: %(existing_path)s multiprocessing: -1 --- #analysis_name: # not set to test inheritance working_dir: %(nonexistent_path)s multiprocessing: all --- ...
33.140496
78
0.66783
import multiprocessing as mp import os import tempfile from unittest import skipIf from .common import TestConfig, test_data from hexrd import config reference_data = \ """ analysis_name: analysis #working_dir: # not set to test defaulting to cwd --- analysis_name: analysis_2 working_dir: %(existing_path)s multiproc...
0
1,255
0
2,127
0
0
0
10
156
c9ceab957cb78af08dee479a7e3534e68d15a3a3
122
py
Python
StackedAutoEncoder/train.py
vsc-hvdc/srtp_GIS
1ade28e92f450812990328d2e4b4921497646f6c
[ "Apache-2.0" ]
null
null
null
StackedAutoEncoder/train.py
vsc-hvdc/srtp_GIS
1ade28e92f450812990328d2e4b4921497646f6c
[ "Apache-2.0" ]
null
null
null
StackedAutoEncoder/train.py
vsc-hvdc/srtp_GIS
1ade28e92f450812990328d2e4b4921497646f6c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ this file is for training the SAE, and apply for the model @author Zhou Hang """
17.428571
58
0.663934
# -*- coding: utf-8 -*- """ this file is for training the SAE, and apply for the model @author Zhou Hang """ import model
0
0
0
0
0
0
0
-9
22
8c344f9429de43332d17b67e902d0404f0d63aa0
2,934
py
Python
src/arago/hiro/backend/seven/app_admin.py
166MMX/hiro-python-library
fb29e3247a8fe1b0f7dc4e68141cf7340a8dd0a5
[ "MIT" ]
null
null
null
src/arago/hiro/backend/seven/app_admin.py
166MMX/hiro-python-library
fb29e3247a8fe1b0f7dc4e68141cf7340a8dd0a5
[ "MIT" ]
null
null
null
src/arago/hiro/backend/seven/app_admin.py
166MMX/hiro-python-library
fb29e3247a8fe1b0f7dc4e68141cf7340a8dd0a5
[ "MIT" ]
null
null
null
from typing import TYPE_CHECKING if TYPE_CHECKING:
40.191781
102
0.623722
from typing import TYPE_CHECKING, Final from urllib.parse import quote from arago.hiro.model.graph.vertex import Vertex from arago.hiro.utils.cast_b import to_vertex if TYPE_CHECKING: from arago.hiro.client.rest_base_client import HiroRestBaseClient class Hiro7AppAdminModel: _base_client: Final['HiroRestBas...
0
0
0
2,630
0
0
0
111
139
69681b1cbcf6d74049745d43ead44794f77d94da
2,617
py
Python
google-cloud-sdk/lib/surface/sql/reschedule_maintenance.py
bopopescu/Social-Lite
ee05d6a7431c36ff582c8d6b58bb20a8c5f550bf
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
google-cloud-sdk/lib/surface/sql/reschedule_maintenance.py
bopopescu/Social-Lite
ee05d6a7431c36ff582c8d6b58bb20a8c5f550bf
[ "Apache-2.0" ]
4
2020-07-21T12:51:46.000Z
2022-01-22T10:29:25.000Z
google-cloud-sdk/lib/surface/sql/reschedule_maintenance.py
bopopescu/Social-Lite
ee05d6a7431c36ff582c8d6b58bb20a8c5f550bf
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
35.849315
101
0.721055
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
0
1,580
0
0
0
0
0
115
135
07a4e65171b1be0b8deff477425b769066282366
895
py
Python
2017/day16.py
di-wu/aoc-python
cb08358ad3654e9401c1bd73ef32b0f79f372215
[ "Apache-2.0" ]
null
null
null
2017/day16.py
di-wu/aoc-python
cb08358ad3654e9401c1bd73ef32b0f79f372215
[ "Apache-2.0" ]
null
null
null
2017/day16.py
di-wu/aoc-python
cb08358ad3654e9401c1bd73ef32b0f79f372215
[ "Apache-2.0" ]
null
null
null
input = open('inputs/day16.input').read().strip().split(',') positions = list("abcdefghijklmnop") print("Part one: %s" % move(1, positions[:])) print("Part two: %s" % move(1000000000, positions[:]))
28.870968
60
0.426816
input = open('inputs/day16.input').read().strip().split(',') positions = list("abcdefghijklmnop") def move(iterations, pos): sequence = [] for i in range(iterations): s = ''.join(pos) if s in sequence: return sequence[iterations % i] sequence.append(s) for i in inp...
0
0
0
0
0
671
0
0
23
c3bedd08edfecc9f7400cb88cb75e8a254fd2c64
1,423
py
Python
media/files/linearreg.py
cobyoo/PlayPay
6a80e104062965d809d290c65db82f391a53b844
[ "MIT" ]
2
2021-01-18T14:31:26.000Z
2021-01-18T15:52:54.000Z
media/files/linearreg_q0cLGi8.py
cobyoo/PlayPay
6a80e104062965d809d290c65db82f391a53b844
[ "MIT" ]
null
null
null
media/files/linearreg_q0cLGi8.py
cobyoo/PlayPay
6a80e104062965d809d290c65db82f391a53b844
[ "MIT" ]
null
null
null
import statsmodels.formula.api as smf import matplotlib.pyplot as plt import pandas as pd from sklearn.linear_model import LinearRegression from sklearn import metrics data = pd.read_excel('train_data.xlsx') data2 = pd.read_excel('test_data.xlsx') dfX = pd.DataFrame(data, columns=["temp", "humid"]) dfy = pd.DataFrame...
28.46
108
0.719606
import statsmodels.formula.api as smf import matplotlib.pyplot as plt import pandas as pd from sklearn.linear_model import LinearRegression from sklearn import model_selection from sklearn import metrics from mpl_toolkits.mplot3d import Axes3D data = pd.read_excel('train_data.xlsx') data2 = pd.read_excel('test_data.x...
30
0
0
0
0
0
0
32
44
b0a1f2f042b581c99a0d2f8cfa9f921d37bf758b
2,597
py
Python
utils/misc.py
bbbbbbzhou/DuDoRNet
5e47030e373aec066f6cc7957e913e984407b1b2
[ "MIT" ]
35
2020-03-27T02:12:21.000Z
2022-03-14T17:19:22.000Z
utils/misc.py
chisyliu/DuDoRNet
5e47030e373aec066f6cc7957e913e984407b1b2
[ "MIT" ]
4
2020-06-14T12:50:14.000Z
2021-12-04T06:19:08.000Z
utils/misc.py
chisyliu/DuDoRNet
5e47030e373aec066f6cc7957e913e984407b1b2
[ "MIT" ]
11
2020-11-17T12:56:13.000Z
2022-03-19T17:45:29.000Z
__all__ = ['read_dir', 'get_last_checkpoint', 'compute_metrics', 'get_aapm_minmax', 'convert_coefficient2hu', 'convert_hu2coefficient'] import os.path as path
30.916667
83
0.630343
__all__ = ['read_dir', 'get_last_checkpoint', 'compute_metrics', 'get_aapm_minmax', 'convert_coefficient2hu', 'convert_hu2coefficient'] import os import os.path as path import scipy.io as sio import numpy as np from tqdm import tqdm from skimage.measure import compare_ssim, compare_psnr def read_dir(dir_path, pr...
0
0
0
0
0
2,161
0
19
249