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
7996acf87911f57f60db3c91ce56015c83a551c3
4,414
py
Python
skspec/pandas_utils/dataframeserial.py
hugadams/scikit-spectra
c451be6d54080fbcc2a3bc5daf8846b83b7343ee
[ "BSD-3-Clause" ]
83
2015-01-15T18:57:22.000Z
2022-01-18T11:43:55.000Z
skspec/pandas_utils/dataframeserial.py
hugadams/scikit-spectra
c451be6d54080fbcc2a3bc5daf8846b83b7343ee
[ "BSD-3-Clause" ]
18
2015-02-02T22:46:51.000Z
2019-04-29T17:23:32.000Z
skspec/pandas_utils/dataframeserial.py
hugadams/scikit-spectra
c451be6d54080fbcc2a3bc5daf8846b83b7343ee
[ "BSD-3-Clause" ]
43
2015-01-02T20:47:11.000Z
2021-12-18T16:14:40.000Z
''' Serialization interface for custom DataFrame objects. Allows to save/load for memory streams or files. Because one cannot serialize DataFrames with custom attributes, this uses an intermediate object for that process. Plan it implement pickling saved methods later (requires more work). These are meant to ...
35.031746
97
0.698006
''' Serialization interface for custom DataFrame objects. Allows to save/load for memory streams or files. Because one cannot serialize DataFrames with custom attributes, this uses an intermediate object for that process. Plan it implement pickling saved methods later (requires more work). These are meant to ...
0
0
0
403
0
0
0
0
23
6fb6af1bd89cf83860901987794468bea5e527d0
21,167
py
Python
src/omniglot/wrapper.py
rcmalli/warpgrad
d9ef72af10eec62ae92bc24595cb1a4a0207e319
[ "Apache-2.0" ]
80
2020-02-18T09:55:10.000Z
2022-02-10T12:59:49.000Z
src/omniglot/wrapper.py
rcmalli/warpgrad
d9ef72af10eec62ae92bc24595cb1a4a0207e319
[ "Apache-2.0" ]
5
2020-07-21T16:47:42.000Z
2021-05-31T06:19:36.000Z
src/omniglot/wrapper.py
rcmalli/warpgrad
d9ef72af10eec62ae92bc24595cb1a4a0207e319
[ "Apache-2.0" ]
14
2020-02-18T13:19:48.000Z
2022-01-05T23:52:11.000Z
"""Meta-learners for Omniglot experiment. Based on original implementation: https://github.com/amzn/metalearn-leap """
33.073438
79
0.58081
"""Meta-learners for Omniglot experiment. Based on original implementation: https://github.com/amzn/metalearn-leap """ import random from abc import abstractmethod from torch import nn from torch import optim import maml import warpgrad from leap import Leap from leap.utils import clone_state_dict from utils import R...
0
1,009
0
19,611
0
0
0
12
407
3206936433ce667f0ce4f6df51f664f04496ea93
9,077
py
Python
coinbase.py
foppini975/FinRL
aead943817d1387dc3654de2c189767d10140b78
[ "MIT" ]
null
null
null
coinbase.py
foppini975/FinRL
aead943817d1387dc3654de2c189767d10140b78
[ "MIT" ]
null
null
null
coinbase.py
foppini975/FinRL
aead943817d1387dc3654de2c189767d10140b78
[ "MIT" ]
null
null
null
# Coinbase Pro library: # https://github.com/danpaquin/coinbasepro-python #curl "https://api.pro.coinbase.com/products/BTC-USD/candles?start=2021-01-01T12:00:00&end=2021-01-12T12:00:00&granularity=3600" #from IPython.core.debugger import set_trace
46.076142
128
0.593588
# Coinbase Pro library: # https://github.com/danpaquin/coinbasepro-python #curl "https://api.pro.coinbase.com/products/BTC-USD/candles?start=2021-01-01T12:00:00&end=2021-01-12T12:00:00&granularity=3600" import cbpro import numpy as np import pandas as pd import logging from datetime import datetime, timedelta imp...
0
343
0
8,337
0
0
0
-12
158
c5b03901171c853c7fa793d7b36da4ea9b2c603e
2,407
py
Python
links/models.py
gminds/rapidnewsng
7528f751f657f29f2da23a1dd160479947f87977
[ "BSD-3-Clause" ]
null
null
null
links/models.py
gminds/rapidnewsng
7528f751f657f29f2da23a1dd160479947f87977
[ "BSD-3-Clause" ]
null
null
null
links/models.py
gminds/rapidnewsng
7528f751f657f29f2da23a1dd160479947f87977
[ "BSD-3-Clause" ]
null
null
null
from django.contrib.auth.models import User ''' def votes(self): num_submissions = Submission.objects.filter(uploaded_by=self).count() return num_submissions ''' # Signal while saving user from django.db.models.signals import post_save post_save.connect(create_profile, sender=User)
32.972603
113
0.705442
from django.db import models from django.contrib.auth.models import User from django.db.models import Count from django.core.urlresolvers import reverse from django.utils.timezone import now class LinkVoteCountManager(models.Manager): def get_query_set(self): return super(LinkVoteCountManager, self).get_q...
0
0
0
1,614
0
196
0
59
226
2f564c5e8b5c38b1f42fe2b874cd512a34b4cd79
569
py
Python
nested.py
codingwithahmad/FastAPI
4453fa74a1164161a1528f20c9ead5dccdd494a2
[ "MIT" ]
null
null
null
nested.py
codingwithahmad/FastAPI
4453fa74a1164161a1528f20c9ead5dccdd494a2
[ "MIT" ]
null
null
null
nested.py
codingwithahmad/FastAPI
4453fa74a1164161a1528f20c9ead5dccdd494a2
[ "MIT" ]
null
null
null
from fastapi import FastAPI app = FastAPI()
23.708333
113
0.724077
from typing import Optional, List, Set from fastapi import FastAPI from pydantic import BaseModel, HttpUrl app = FastAPI() class Image(BaseModel): url: HttpUrl name: str class Item(BaseModel): name: str description: Optional[str] = None price: float image: Optional[Image] = None tax: Optional[float] = None...
0
112
0
262
0
0
0
35
114
c7ed802b7ea74b20fb7005a7225b0eec42837fbc
1,053
py
Python
homeassistant/components/doorbird/logbook.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
6
2016-11-25T06:36:27.000Z
2021-11-16T11:20:23.000Z
homeassistant/components/doorbird/logbook.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
56
2020-08-03T07:30:54.000Z
2022-03-31T06:02:04.000Z
homeassistant/components/doorbird/logbook.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
3
2016-10-03T20:14:06.000Z
2019-04-19T15:56:56.000Z
"""Describe logbook events."""
30.085714
78
0.665717
"""Describe logbook events.""" from homeassistant.const import ATTR_ENTITY_ID from homeassistant.core import callback from .const import DOMAIN, DOOR_STATION, DOOR_STATION_EVENT_ENTITY_IDS @callback def async_describe_events(hass, async_describe_event): """Describe logbook events.""" @callback def asyn...
0
838
0
0
0
0
0
92
91
46f0c5324d010240f717ecc52ef5a0820704904a
661
py
Python
gigfinder/config/wsgi.py
casamfiml/django_Pruebas
6a2d0e17fcbd4c3428037c2354ce9e5ce19c4d4b
[ "Apache-2.0" ]
null
null
null
gigfinder/config/wsgi.py
casamfiml/django_Pruebas
6a2d0e17fcbd4c3428037c2354ce9e5ce19c4d4b
[ "Apache-2.0" ]
null
null
null
gigfinder/config/wsgi.py
casamfiml/django_Pruebas
6a2d0e17fcbd4c3428037c2354ce9e5ce19c4d4b
[ "Apache-2.0" ]
null
null
null
""" WSGI config for gigfinder project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ """ import os, sys from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANG...
30.045455
78
0.779123
""" WSGI config for gigfinder project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ """ import os,sys from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO...
0
0
0
0
0
0
0
-1
0
6fcb9a39da1d14723888c9560f273ac52d31e6a3
2,453
py
Python
src/z3c/testsetup/tests/layered_cave/layer.py
zopefoundation/z3c.testsetup
7a07939b5df33d2124916385efdc9c82495d1b32
[ "ZPL-2.1" ]
1
2020-09-08T06:51:02.000Z
2020-09-08T06:51:02.000Z
src/z3c/testsetup/tests/layered_cave/layer.py
zopefoundation/z3c.testsetup
7a07939b5df33d2124916385efdc9c82495d1b32
[ "ZPL-2.1" ]
2
2015-04-14T18:00:03.000Z
2020-05-15T08:56:34.000Z
src/z3c/testsetup/tests/layered_cave/layer.py
zopefoundation/z3c.testsetup
7a07939b5df33d2124916385efdc9c82495d1b32
[ "ZPL-2.1" ]
1
2020-09-08T06:19:35.000Z
2020-09-08T06:19:35.000Z
"""Layer definitions. This could also be done in the setup file itself. """ import os from zope.app.testing.functional import ZCMLLayer # We define a ZCML test layer. ZCML layers are special as they define # some setup code for creation of empty ZODBs and more. If you only # want some ZCML registrations to be done, y...
33.60274
73
0.681614
"""Layer definitions. This could also be done in the setup file itself. """ import os from zope.app.testing.functional import ZCMLLayer # We define a ZCML test layer. ZCML layers are special as they define # some setup code for creation of empty ZODBs and more. If you only # want some ZCML registrations to be done, y...
0
872
0
622
0
0
0
0
23
271e2acdf71604e7da0fc06ab6eab405b21c08fd
1,086
py
Python
hpc_acm_cli/async_op.py
coin8086/hpc_acm_cli
688c68e23df1ffae3430d1807c5ba1b67c5dc857
[ "MIT" ]
2
2018-10-06T04:15:06.000Z
2020-06-01T14:25:40.000Z
hpc_acm_cli/async_op.py
coin8086/hpc_acm_cli
688c68e23df1ffae3430d1807c5ba1b67c5dc857
[ "MIT" ]
2
2018-10-05T15:30:20.000Z
2018-11-02T08:35:46.000Z
hpc_acm_cli/async_op.py
coin8086/hpc_acm_cli
688c68e23df1ffae3430d1807c5ba1b67c5dc857
[ "MIT" ]
3
2018-10-05T14:54:20.000Z
2021-01-10T10:09:30.000Z
# ops is a list of AsyncOp object
25.857143
79
0.513812
from tqdm import tqdm import time import platform class AsyncOp: class NotReady(Exception): pass def get_result(self): pass # ops is a list of AsyncOp object def async_wait(ops, handler=None, desc=None): total = len(ops) done = [False for i in range(total)] done_count = 0 prog...
0
0
0
77
0
878
0
-16
111
460b0ad8437549783c4db4fc6f7378a14379d77a
2,282
py
Python
takahe/SFR.py
Krytic/Takahe
6d6bdf234ae7e3cfe8ef40e48d4621dc9a9a2f6c
[ "MIT" ]
1
2020-12-09T02:34:43.000Z
2020-12-09T02:34:43.000Z
takahe/SFR.py
Krytic/Takahe
6d6bdf234ae7e3cfe8ef40e48d4621dc9a9a2f6c
[ "MIT" ]
8
2020-03-02T06:22:43.000Z
2020-11-10T03:20:46.000Z
takahe/SFR.py
Krytic/Takahe
6d6bdf234ae7e3cfe8ef40e48d4621dc9a9a2f6c
[ "MIT" ]
1
2020-05-13T00:41:24.000Z
2020-05-13T00:41:24.000Z
import numpy as np from scipy.special import gammainc import takahe def MadauDickinson(Z, z): """Computes the Madau & Dickinson SFRD at metallicity Z and redshift z. Implements the SFRD given by eqn(15) of [1]. Returns a value in M_sun / yr / Mpc^3. Assumes Z_sun = 0.020, and that input metallicity i...
27.166667
81
0.565294
import matplotlib.pyplot as plt from numba import njit import numpy as np import pandas as pd from scipy.special import gamma, gammainc import takahe from tqdm import tqdm def MadauDickinson(Z, z): """Computes the Madau & Dickinson SFRD at metallicity Z and redshift z. Implements the SFRD given by eqn(15) of ...
0
0
0
0
0
0
0
16
88
b94e0588527afb6e0682a3ad466fe2b23170f529
1,391
py
Python
src/mapstp/cli/logging.py
MC-kit/map-stp
a82b6560358a37f704fd0fe76c76def27a15458d
[ "MIT" ]
null
null
null
src/mapstp/cli/logging.py
MC-kit/map-stp
a82b6560358a37f704fd0fe76c76def27a15458d
[ "MIT" ]
19
2021-11-29T10:29:30.000Z
2022-03-17T11:21:08.000Z
src/mapstp/cli/logging.py
MC-kit/map-stp
a82b6560358a37f704fd0fe76c76def27a15458d
[ "MIT" ]
null
null
null
"""Intercept log messages from the used libraries and pass them to `loguru`. See https://github.com/Delgan/loguru """ import logging # class PropagateHandler(logging.Handler): # """Send events from loguru to standard logging""" # def emit(self, record): # logging.getLogger(record.name).handle(record)...
27.82
76
0.64486
"""Intercept log messages from the used libraries and pass them to `loguru`. See https://github.com/Delgan/loguru """ import logging from loguru import logger # class PropagateHandler(logging.Handler): # """Send events from loguru to standard logging""" # def emit(self, record): # logging.getLogger(...
0
0
0
808
0
0
0
4
46
0d7e6c92009db30a4a0cda37191f99149779e2a9
616
py
Python
examples/example1.py
va-dudnikov/pygraph7
bf3469ca75f44283ee647dc10fa7d94bb7834cf3
[ "MIT" ]
2
2018-08-02T10:15:39.000Z
2018-08-02T17:32:11.000Z
examples/example1.py
va-dudnikov/pygraph7
bf3469ca75f44283ee647dc10fa7d94bb7834cf3
[ "MIT" ]
null
null
null
examples/example1.py
va-dudnikov/pygraph7
bf3469ca75f44283ee647dc10fa7d94bb7834cf3
[ "MIT" ]
null
null
null
# Example 1 # This example show how to encoding matrix in graph7 format import graph7 as g7 import random order = 10 # Matrix contains only 0 and 1, so for encoding a matrix on one element # needed only 1 bit rand_mat = [[random.randint(0, 1) for _ in range(order)] for _ in range(order)] directed = g7.encode(rand_ma...
22.814815
79
0.672078
# Example 1 # This example show how to encoding matrix in graph7 format import graph7 as g7 import random order = 10 # Matrix contains only 0 and 1, so for encoding a matrix on one element # needed only 1 bit rand_mat = [[random.randint(0, 1) for _ in range(order)] for _ in range(order)] directed = g7.encode(rand_ma...
0
0
0
0
0
0
0
0
0
c8f3bc6c094eeb66cdada903f9c92d378863e6b8
6,369
py
Python
pybot/plugins/message/__init__.py
jkent/pybot
0c70a7c29caa709413e04a411a5fdb22a8dbdb12
[ "MIT" ]
1
2017-06-01T00:52:44.000Z
2017-06-01T00:52:44.000Z
pybot/plugins/message/__init__.py
jkent/pybot
0c70a7c29caa709413e04a411a5fdb22a8dbdb12
[ "MIT" ]
17
2015-03-21T19:35:45.000Z
2019-04-14T05:17:49.000Z
pybot/plugins/message/__init__.py
jkent/jkent-pybot
0c70a7c29caa709413e04a411a5fdb22a8dbdb12
[ "MIT" ]
1
2015-03-27T22:52:42.000Z
2015-03-27T22:52:42.000Z
# -*- coding: utf-8 -*- # vim: set ts=4 et RETRY_INTERVAL = 3600
27.934211
80
0.508714
# -*- coding: utf-8 -*- # vim: set ts=4 et from datetime import datetime, timedelta import re from sqlalchemy import or_, and_, func from pybot.plugin import * from . import models from .models import * RETRY_INTERVAL = 3600 class Plugin(BasePlugin): def on_load(self): self.db = models.init(self.bot) ...
0
5,774
0
342
0
0
0
28
157
c3e380b03a6306239eeb08e10db96af6e13a5bd6
6,879
py
Python
main.py
sharyar/symmetrical-waffle
f7de2c11849c841363dc60e225133818ca5423eb
[ "MIT" ]
null
null
null
main.py
sharyar/symmetrical-waffle
f7de2c11849c841363dc60e225133818ca5423eb
[ "MIT" ]
null
null
null
main.py
sharyar/symmetrical-waffle
f7de2c11849c841363dc60e225133818ca5423eb
[ "MIT" ]
null
null
null
# Token types # EOF (end-of-file) token -> indicates that no more input is left for lexical analysis. # Lexical Analysis: Breaking input strings into tokens -> scanner, tokenizer, lexical analyzer, lexer # Lexeme -> a sequence of characters that form a token. This is for multidigit for example. Here we implement the i...
30.986486
145
0.573775
# Token types # EOF (end-of-file) token -> indicates that no more input is left for lexical analysis. # Lexical Analysis: Breaking input strings into tokens -> scanner, tokenizer, lexical analyzer, lexer # Lexeme -> a sequence of characters that form a token. This is for multidigit for example. Here we implement the i...
3
0
0
4,908
0
269
0
0
92
a57dea131ef9158b8695a6ed87ec825cd29d695d
3,063
py
Python
tools/changelog_to_deb.py
thusoy/laim
01b02f5910d046603df8e50ba513b28673fbd3cf
[ "MIT" ]
2
2019-12-26T19:45:04.000Z
2019-12-26T20:40:18.000Z
tools/changelog_to_deb.py
thusoy/laim
01b02f5910d046603df8e50ba513b28673fbd3cf
[ "MIT" ]
4
2020-03-24T17:56:56.000Z
2021-04-06T18:02:10.000Z
tools/changelog_to_deb.py
thusoy/laim
01b02f5910d046603df8e50ba513b28673fbd3cf
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import re VERSION_HEADER_RE = re.compile(r'(?P<version>\d+\.\d+\.\d+) ?- ?(?P<date>\d{4}-\d{2}-\d{2})') CHANGE_TYPE_RE = re.compile(r'^### ?(?P<change_type>.*)') SKIP_LINE_RE = re.compile(r'^-{2,}|^$') LIST_LINE_RE = re.compile(r'^[-*] ?(?P<line_item>.*)') CONTINUATION_LINE_RE = re.compile(r'^ {...
31.255102
118
0.640875
#!/usr/bin/env python3 import argparse import datetime import re VERSION_HEADER_RE = re.compile(r'(?P<version>\d+\.\d+\.\d+) ?- ?(?P<date>\d{4}-\d{2}-\d{2})') CHANGE_TYPE_RE = re.compile(r'^### ?(?P<change_type>.*)') SKIP_LINE_RE = re.compile(r'^-{2,}|^$') LIST_LINE_RE = re.compile(r'^[-*] ?(?P<line_item>.*)') CONTIN...
0
0
0
0
0
2,454
0
-12
114
d3d378e95dac58f6824d81d41bd8200f128f3554
11,406
py
Python
src/app/views.py
pk400/pick-a-spot
7d2a5db2bcad91f86d3b40097494b74f4b45483f
[ "MIT" ]
2
2016-02-02T06:41:34.000Z
2016-04-11T21:22:39.000Z
src/app/views.py
pk400/pick-a-spot
7d2a5db2bcad91f86d3b40097494b74f4b45483f
[ "MIT" ]
null
null
null
src/app/views.py
pk400/pick-a-spot
7d2a5db2bcad91f86d3b40097494b74f4b45483f
[ "MIT" ]
1
2016-02-24T01:16:05.000Z
2016-02-24T01:16:05.000Z
from registration.views import RegistrationView mapapikey = ('<script src="https://maps.googleapis.com/maps/api/' 'js?key=AIzaSyAvDRB7PnQbIVNtRHf3x-MTB5y-3OXD1xg&libraries=places">async defer> </script>') """ HOME """ """ SPLASH """ """ MAP """ """ Removes old entries """ """ PREFERENCES """ """ FRIEND...
30.994565
139
0.701385
from django.shortcuts import render from .models import UserProfile, Friend, RoomInstance from django.contrib.auth.models import User, Group from django.contrib.sessions.models import Session from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect, HttpResponse from regist...
0
8,921
0
0
0
1,058
0
334
732
cb23e1f88750c0a157d04ee4d7eb7300fc61bf1c
201
py
Python
carat/audio.py
giovana-morais/carat
982af4dde63e8560ccc9120f3767f1420a545b67
[ "MIT" ]
11
2019-08-08T13:54:59.000Z
2021-12-09T19:15:12.000Z
carat/audio.py
giovana-morais/carat
982af4dde63e8560ccc9120f3767f1420a545b67
[ "MIT" ]
42
2019-07-01T19:17:24.000Z
2022-03-15T19:46:09.000Z
carat/audio.py
giovana-morais/carat
982af4dde63e8560ccc9120f3767f1420a545b67
[ "MIT" ]
3
2021-02-10T13:21:59.000Z
2022-02-17T11:47:06.000Z
# encoding: utf-8 # pylint: disable=C0103 """Utility functions to deal with audio.""" import librosa __all__ = ['load'] # simply use librosa.load (this may change in the future) load = librosa.load
18.272727
57
0.716418
# encoding: utf-8 # pylint: disable=C0103 """Utility functions to deal with audio.""" import librosa __all__ = ['load'] # simply use librosa.load (this may change in the future) load = librosa.load
0
0
0
0
0
0
0
0
0
494a1b25d074708072f6aa1625114ff6dece6b72
493
py
Python
flights-tracker/flights_tracker/tracker.py
rafalstepien/flights-tracker
9ba1339a6c3e50a4671f41de8714fe854d044e9d
[ "MIT" ]
1
2022-01-26T04:59:36.000Z
2022-01-26T04:59:36.000Z
flights-tracker/flights_tracker/tracker.py
rafalstepien/flights-tracker
9ba1339a6c3e50a4671f41de8714fe854d044e9d
[ "MIT" ]
null
null
null
flights-tracker/flights_tracker/tracker.py
rafalstepien/flights-tracker
9ba1339a6c3e50a4671f41de8714fe854d044e9d
[ "MIT" ]
null
null
null
import uvicorn from flights_tracker.routes import router app = FlightsTracker() app.include_router(router) if __name__ == "__main__": uvicorn.run(app, host="0.0.0.0", port=5000, log_level="info")
25.947368
82
0.803245
import uvicorn from fastapi import FastAPI from email_sender.service.email_sender import EmailSender from flights_tracker.routes import router from flights_tracker.services.weekend_flights_service import WeekendFlightsService class FlightsTracker(FastAPI): weekend_flights_service = WeekendFlightsService() em...
0
0
0
96
0
0
0
103
90
e5181cd8bd4999ebfed2a270ac6316f18fff22b2
1,051
py
Python
src/denzel/app/tasks.py
eliorc/denzel
429a7c277b1a4ee515e3a112a8734b58fc89f53a
[ "Apache-2.0" ]
17
2018-10-02T07:09:45.000Z
2021-11-30T11:02:28.000Z
src/denzel/app/tasks.py
eliorc/denzel
429a7c277b1a4ee515e3a112a8734b58fc89f53a
[ "Apache-2.0" ]
4
2018-10-22T10:18:17.000Z
2020-09-02T14:31:31.000Z
src/denzel/app/tasks.py
eliorc/denzel
429a7c277b1a4ee515e3a112a8734b58fc89f53a
[ "Apache-2.0" ]
2
2018-10-28T10:17:57.000Z
2020-02-05T22:12:04.000Z
import os import celery CELERY_BROKER = os.environ.get('CELERY_BROKER') CELERY_BACKEND = os.environ.get('CELERY_BACKEND') app = celery.Celery('tasks', broker=CELERY_BROKER, backend=CELERY_BACKEND) Model = app.register_task(Model())
22.847826
103
0.681256
import os import celery import requests from app.logic.pipeline import process, load_model, predict CELERY_BROKER = os.environ.get('CELERY_BROKER') CELERY_BACKEND = os.environ.get('CELERY_BACKEND') app = celery.Celery('tasks', broker=CELERY_BROKER, backend=CELERY_BACKEND) class Model(celery.Task): def __init_...
0
392
0
298
0
0
0
32
90
0e0050f065ebfc4a804ecbc5ca6fa59531b95360
2,791
py
Python
stationaryschrodinger/tfAPI.py
cteerara/StationarySchrodinger
247a6fefdb7d2f5b09444d59a1862c4053db9ad6
[ "MIT" ]
null
null
null
stationaryschrodinger/tfAPI.py
cteerara/StationarySchrodinger
247a6fefdb7d2f5b09444d59a1862c4053db9ad6
[ "MIT" ]
null
null
null
stationaryschrodinger/tfAPI.py
cteerara/StationarySchrodinger
247a6fefdb7d2f5b09444d59a1862c4053db9ad6
[ "MIT" ]
null
null
null
import tensorflow as tf tf.enable_eager_execution();
37.213333
123
0.620208
import tensorflow as tf tf.enable_eager_execution(); def compare(t1,t2,tol): # Compare two 2D tensorflow arrays # INPUT: tensorflow arrays t1,t2 # tolerence tol # OUTPUT: true if (t1-t2) < tol, else false t1size = t1.get_shape(); t2size = t2.get_shape(); if (len(t1size) != len(t2siz...
0
0
0
0
0
2,636
0
0
100
4f8d038bdaafd675342a535381e26b7f9aaa0b8d
3,254
py
Python
main.py
jondye/rfid-squeezebox-py
ad5bf9e5c96cac188e455a7aa2fed536cfb582b8
[ "MIT" ]
null
null
null
main.py
jondye/rfid-squeezebox-py
ad5bf9e5c96cac188e455a7aa2fed536cfb582b8
[ "MIT" ]
null
null
null
main.py
jondye/rfid-squeezebox-py
ad5bf9e5c96cac188e455a7aa2fed536cfb582b8
[ "MIT" ]
null
null
null
import squeezebox if __name__ == '__main__': main()
28.79646
76
0.556853
import db import mfrc522 import network import speaker import squeezebox import squeezebox import time import ujson from machine import Pin, PWM def read(reader): while True: stat, tag_type = reader.request(reader.REQIDL) if stat == reader.OK: stat, raw_uid = reader.anticoll() ...
0
0
0
0
0
2,926
0
-49
314
0f1b8fca9391ed6855a3fd18e5f8db0ff1d75274
204
py
Python
openregistry/lots/core/tests/fixtures.py
EBRD-ProzorroSale/openregistry.lots.core
dd54376ac15858ea6d44cf792d1d87328495b9b8
[ "Apache-2.0" ]
null
null
null
openregistry/lots/core/tests/fixtures.py
EBRD-ProzorroSale/openregistry.lots.core
dd54376ac15858ea6d44cf792d1d87328495b9b8
[ "Apache-2.0" ]
48
2017-08-19T13:22:59.000Z
2019-03-12T07:52:37.000Z
openregistry/lots/core/tests/fixtures.py
EBRD-ProzorroSale/openregistry.lots.core
dd54376ac15858ea6d44cf792d1d87328495b9b8
[ "Apache-2.0" ]
9
2017-08-03T09:29:57.000Z
2018-09-14T10:59:32.000Z
PARTIAL_MOCK_CONFIG = { "api":{ "plugins":{ "lots.core": None, "transferring":{ "plugins":{ "lots.transferring":None } }, } } }
15.692308
36
0.392157
PARTIAL_MOCK_CONFIG = { "api":{ "plugins":{ "lots.core": None, "transferring":{ "plugins":{ "lots.transferring":None } }, } } }
0
0
0
0
0
0
0
0
0
dae2afc7991f13605a9cad9f36b257c5723f013a
622
py
Python
docs/chap6/code/floatrange.py
marble-git/python-laoqi
74c4bb5459113e54ce64443e5da5a9c6a3052d6a
[ "MIT" ]
null
null
null
docs/chap6/code/floatrange.py
marble-git/python-laoqi
74c4bb5459113e54ce64443e5da5a9c6a3052d6a
[ "MIT" ]
null
null
null
docs/chap6/code/floatrange.py
marble-git/python-laoqi
74c4bb5459113e54ce64443e5da5a9c6a3052d6a
[ "MIT" ]
null
null
null
#coding:utf-8 ''' filename:floatrange.py generate a sequence of parmeters with floating-point numbers. ''' f = frange(1.2,9) print(list(f)) f = frange(1.2) print(list(f)) f = frange(1.2,9,-1) print(list(f)) f = frange(1.2,None,-1) print(list(f)) f = frange(1.2,None,0) print(list(f))
12.44
71
0.573955
#coding:utf-8 ''' filename:floatrange.py generate a sequence of parmeters with floating-point numbers. ''' import itertools def frange(start,end=None,step=1.0): if end is None: end = float(start) start = 0.0 assert step for i in itertools.count(): next = start+ i*step ...
0
0
0
0
268
0
0
-5
46
9ba96374077cc6b6b051eb3cef2d42ee720e73a1
2,926
py
Python
cmake/spirv_num_to_cpp.py
orrkarl/rasterizer
8ff356a6344336d8cd2250cbf488b0d853b26cda
[ "MIT" ]
2
2019-08-16T09:12:30.000Z
2019-08-18T20:57:33.000Z
cmake/spirv_num_to_cpp.py
orrkarl/rasterizer
8ff356a6344336d8cd2250cbf488b0d853b26cda
[ "MIT" ]
12
2019-09-13T17:26:09.000Z
2020-02-13T12:34:40.000Z
cmake/spirv_num_to_cpp.py
orrkarl/vkr
8ff356a6344336d8cd2250cbf488b0d853b26cda
[ "MIT" ]
null
null
null
import sys SOURCE_FMT = """// AUTOGENERATED // Generated by spirv_num_to_cpp.py, from '{file_name}' #include <stddef.h> #include <stdint.h> namespace {namespace} {{ const volatile uint32_t {var_name}[] = {{ {raw_lines} }}; const volatile size_t {var_name}_count = {total_data_count}; }} // {namespace} // AUTOGEN...
27.603774
123
0.697539
import argparse import os import re import sys SOURCE_FMT = """// AUTOGENERATED // Generated by spirv_num_to_cpp.py, from '{file_name}' #include <stddef.h> #include <stdint.h> namespace {namespace} {{ const volatile uint32_t {var_name}[] = {{ {raw_lines} }}; const volatile size_t {var_name}_count = {total_data_co...
0
0
0
0
0
2,063
0
-30
204
7db64e2d008d8a948c335e4ef44b123ff8349784
1,228
py
Python
transfer-system/transfer_system/server/app.py
beasley-weather/beasley-weather-station
5834429506c9cff82833a70d017c2ce51c8ded54
[ "MIT" ]
null
null
null
transfer-system/transfer_system/server/app.py
beasley-weather/beasley-weather-station
5834429506c9cff82833a70d017c2ce51c8ded54
[ "MIT" ]
null
null
null
transfer-system/transfer_system/server/app.py
beasley-weather/beasley-weather-station
5834429506c9cff82833a70d017c2ce51c8ded54
[ "MIT" ]
null
null
null
from ..dbi import WeewxDB from flask import Flask def create_app(database): """ :param database: Name of database to save into """ app = Flask(__name__) weewx_db = WeewxDB(database) return app
23.169811
81
0.610749
import json from json import JSONDecodeError import subprocess as sp from traceback import print_exc from ..dbi import WeewxDB from flask import Flask, request def create_app(database): """ :param database: Name of database to save into """ app = Flask(__name__) weewx_db = WeewxDB(database) ...
0
577
0
0
0
214
0
22
192
38d650ecab150ae7367ae4f5f43a45e22bee985c
1,617
py
Python
dglib/generalization/irm.py
billzhonggz/Transfer-Learning-Library
d7a6e4298e571d5101e05515a2ab1f171160ef89
[ "MIT" ]
1,474
2020-07-24T02:55:55.000Z
2022-03-31T12:35:56.000Z
dglib/generalization/irm.py
mxliu/Transfer-Learning-Library
7b0ccb3a8087ecc65daf4b1e815e5a3f42106641
[ "MIT" ]
70
2020-08-05T10:47:33.000Z
2022-03-31T03:48:54.000Z
dglib/generalization/irm.py
mxliu/Transfer-Learning-Library
7b0ccb3a8087ecc65daf4b1e815e5a3f42106641
[ "MIT" ]
312
2020-08-01T11:08:39.000Z
2022-03-30T06:03:47.000Z
""" Modified from https://github.com/facebookresearch/DomainBed @author: Baixu Chen @contact: cbx_99_hasta@outlook.com """ import torch.nn as nn import torch.autograd as autograd
41.461538
119
0.681509
""" Modified from https://github.com/facebookresearch/DomainBed @author: Baixu Chen @contact: cbx_99_hasta@outlook.com """ import torch import torch.nn as nn import torch.nn.functional as F import torch.autograd as autograd class InvariancePenaltyLoss(nn.Module): r"""Invariance Penalty Loss from `Invariant Risk M...
0
0
0
1,369
0
0
0
1
67
5575f2112eec09893ca26f17e183ed4317d31a74
1,521
py
Python
test/test_multipush.py
brentschroeter/parallel
8465e2fab51596e0cfee5d0c216d85914b0bcd00
[ "MIT" ]
1
2021-06-22T07:38:13.000Z
2021-06-22T07:38:13.000Z
test/test_multipush.py
brentschroeter/parallel
8465e2fab51596e0cfee5d0c216d85914b0bcd00
[ "MIT" ]
1
2018-02-20T03:54:33.000Z
2018-02-20T05:33:14.000Z
test/test_multipush.py
brentschroeter/parallel
8465e2fab51596e0cfee5d0c216d85914b0bcd00
[ "MIT" ]
null
null
null
#!/usr/bin/env python import unittest if __name__ == '__main__': unittest.main()
33.8
207
0.737015
#!/usr/bin/env python import parallel import unittest import thread import testing_lib import time import uuid import config from multiprocessing import RawValue def wait_job(ms): time.sleep(ms * 0.001) return 1 def get_timeout(num_workers): transportation_time = testing_lib.TRANSPORT_MS * config.NUM_JOB...
0
0
0
760
0
435
0
-30
270
34090411f9334b063de9fa2e34c7176d14b5fdaf
164
py
Python
intro/part03-02_countdown/src/countdown.py
Hannah-Abi/python-pro-21
2ce32c4bf118054329d19afdf83c50561be1ada8
[ "MIT" ]
null
null
null
intro/part03-02_countdown/src/countdown.py
Hannah-Abi/python-pro-21
2ce32c4bf118054329d19afdf83c50561be1ada8
[ "MIT" ]
null
null
null
intro/part03-02_countdown/src/countdown.py
Hannah-Abi/python-pro-21
2ce32c4bf118054329d19afdf83c50561be1ada8
[ "MIT" ]
null
null
null
# Fix the program print("Are you ready?") number = int(input("Please type in a number: ")) while number != 0: print(number) number = number -1 print("Now!")
23.428571
48
0.646341
# Fix the program print("Are you ready?") number = int(input("Please type in a number: ")) while number != 0: print(number) number = number -1 print("Now!")
0
0
0
0
0
0
0
0
0
bf8eddc2251b4fdf476a1eb2917f0565b810547c
1,708
py
Python
11_data_science/pdf/test_pymupdf.py
edgardeng/python-advance-interview
59fd7bee8e871acdc7fdfecf2a110db840c47ebb
[ "Apache-2.0" ]
1
2022-03-06T13:03:56.000Z
2022-03-06T13:03:56.000Z
11_data_science/pdf/test_pymupdf.py
edgardeng/python-advance-interview
59fd7bee8e871acdc7fdfecf2a110db840c47ebb
[ "Apache-2.0" ]
null
null
null
11_data_science/pdf/test_pymupdf.py
edgardeng/python-advance-interview
59fd7bee8e871acdc7fdfecf2a110db840c47ebb
[ "Apache-2.0" ]
null
null
null
if __name__ == "__main__": path = r'D:\-\2021 AI\OCR\.pdf' # path = r'D:\-\2021 AI\OCR\2016.pdf' pdf_to_img(path) # list_img = ['20163.jpg', 'Inked2016-4.jpg', '20166.jpg', '20169.jpg', # '20164.jpg', ] # list_img = ['20163.jpg', 'Inked20166.jpg', '20169.jpg',] # # path2...
35.583333
111
0.622365
import datetime import os import fitz # fitz就是pip install PyMuPDF -i https://mirrors.aliyun.com/pypi/simple (PyMuPDF-1.18.17) def pdf_to_img(path_file): with fitz.open(path_file) as pdf: print(pdf.metadata) for i in range(pdf.pageCount): # if i < 118 or i > 120: # co...
597
0
0
0
0
876
0
-28
200
fe75b254c08503ec5cca082f0fb15c9c89d1faff
5,233
py
Python
userbot/modules/spammer.py
deepak99911/SpyderzzBot
f8b9a447df3f3a33c9c7ec157ebf446c3f9cd4b2
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2020-05-27T14:57:14.000Z
2020-05-27T14:57:14.000Z
userbot/modules/spammer.py
deepak99911/SpyderzzBot
f8b9a447df3f3a33c9c7ec157ebf446c3f9cd4b2
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/spammer.py
deepak99911/SpyderzzBot
f8b9a447df3f3a33c9c7ec157ebf446c3f9cd4b2
[ "Naumen", "Condor-1.1", "MS-PL" ]
57
2019-12-01T17:03:16.000Z
2021-04-30T01:50:35.000Z
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.b (the "License"); # you may not use this file except in compliance with the License. # from userbot import CMD_HELP CMD_HELP.update({ "spam": ".tspam <tex...
30.964497
78
0.563921
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.b (the "License"); # you may not use this file except in compliance with the License. # import asyncio from asyncio import wait from userbot import BOTLOG_CHATID, BOTLOG, CMD_HELP from userbot.events impor...
8
4,062
0
0
0
0
0
33
306
137ab97ad5e7c8c06e0212b7937a1621ff946721
5,669
py
Python
lte/gateway/python/magma/mobilityd/ip_descriptor_map.py
saurabhsoni88/magma
4236c9d8edb7bd203707ff7e861b1f7c12fb84c7
[ "BSD-3-Clause" ]
1
2021-08-04T16:40:05.000Z
2021-08-04T16:40:05.000Z
lte/gateway/python/magma/mobilityd/ip_descriptor_map.py
saurabhsoni88/magma
4236c9d8edb7bd203707ff7e861b1f7c12fb84c7
[ "BSD-3-Clause" ]
112
2020-09-03T06:41:43.000Z
2022-03-31T12:07:08.000Z
lte/gateway/python/magma/mobilityd/ip_descriptor_map.py
saurabhsoni88/magma
4236c9d8edb7bd203707ff7e861b1f7c12fb84c7
[ "BSD-3-Clause" ]
1
2021-05-26T03:41:46.000Z
2021-05-26T03:41:46.000Z
""" Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES O...
39.096552
77
0.665726
""" Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES O...
0
0
0
3,711
0
0
0
76
113
d3ca9f458a2ea28861bbef896ef4e0e8828dcbae
2,444
py
Python
model_zoo/official/nlp/bert_thor/src/lr_generator.py
Joejiong/mindspore
083fd6565cab1aa1d3114feeacccf1cba0d55e80
[ "Apache-2.0" ]
null
null
null
model_zoo/official/nlp/bert_thor/src/lr_generator.py
Joejiong/mindspore
083fd6565cab1aa1d3114feeacccf1cba0d55e80
[ "Apache-2.0" ]
null
null
null
model_zoo/official/nlp/bert_thor/src/lr_generator.py
Joejiong/mindspore
083fd6565cab1aa1d3114feeacccf1cba0d55e80
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
34.422535
110
0.6473
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
0
0
0
0
0
383
0
21
68
914862d616409da7f4b40a4e8c797e4288b7d1e5
121
py
Python
cwesecurity/__init__.py
johnlwhiteman/cwe-security
fdb53e5ef2b296d612824c6abe48c7a5be8844bb
[ "Apache-2.0" ]
null
null
null
cwesecurity/__init__.py
johnlwhiteman/cwe-security
fdb53e5ef2b296d612824c6abe48c7a5be8844bb
[ "Apache-2.0" ]
null
null
null
cwesecurity/__init__.py
johnlwhiteman/cwe-security
fdb53e5ef2b296d612824c6abe48c7a5be8844bb
[ "Apache-2.0" ]
null
null
null
import sys from pathlib import Path sys.path.append(str(Path(__file__).resolve().parent))
30.25
53
0.809917
import sys from pathlib import Path sys.path.append(str(Path(__file__).resolve().parent)) from cwesecurity.cwe import Cwe
0
0
0
0
0
0
0
10
22
38b212aebca5df92320025b051c573a9846ac9fc
40,510
py
Python
bed_reader/_open_bed.py
TedDriggs/bed-reader
6b6309d45234cd04feccd2362e60e1138555bf4e
[ "Apache-2.0" ]
null
null
null
bed_reader/_open_bed.py
TedDriggs/bed-reader
6b6309d45234cd04feccd2362e60e1138555bf4e
[ "Apache-2.0" ]
null
null
null
bed_reader/_open_bed.py
TedDriggs/bed-reader
6b6309d45234cd04feccd2362e60e1138555bf4e
[ "Apache-2.0" ]
null
null
null
import logging import numpy as np # https://stackoverflow.com/questions/845058/how-to-get-line-count-of-a-large-file-cheaply-in-python _delimiters = {"fam": r"\s+", "bim": "\t"} _count_name = {"fam": "iid_count", "bim": "sid_count"} _meta_meta = { # https://stackoverflow.com/questions/41921255/staticmetho...
31.33024
107
0.532782
import logging import multiprocessing import os from dataclasses import dataclass from itertools import repeat, takewhile from pathlib import Path from typing import Any, List, Mapping, Optional, Union import numpy as np import pandas as pd from .bed_reader import read_f32, read_f64, read_i8 # https://stackoverflow...
9
14,660
0
19,537
0
942
0
83
314
d1e47a5ecac5656e9c1c3ebf9c8b3158717cbecc
152
py
Python
karaoke-server.py
AetherUnbound/pikaraoke
d4af46c55e4425ad6398c25ab6b108c8ce0277fc
[ "MIT" ]
null
null
null
karaoke-server.py
AetherUnbound/pikaraoke
d4af46c55e4425ad6398c25ab6b108c8ce0277fc
[ "MIT" ]
null
null
null
karaoke-server.py
AetherUnbound/pikaraoke
d4af46c55e4425ad6398c25ab6b108c8ce0277fc
[ "MIT" ]
null
null
null
# Author: Matthew Bowden bowdenm@spu.edu import flask as fsk app = fsk.Flask(__name__)
13.818182
40
0.690789
# Author: Matthew Bowden bowdenm@spu.edu import flask as fsk app = fsk.Flask(__name__) @app.route('/') def show_songs(): return 'List of songs'
0
39
0
0
0
0
0
0
23
6dffa14bc17cbcb187baf012649a6b72553290cd
23,202
py
Python
level3/find_the_access_codes/solution.py
lcsm29/goog-foobar
6ea44879d9d9f3483fa320d92d6c25b14565c899
[ "MIT" ]
null
null
null
level3/find_the_access_codes/solution.py
lcsm29/goog-foobar
6ea44879d9d9f3483fa320d92d6c25b14565c899
[ "MIT" ]
null
null
null
level3/find_the_access_codes/solution.py
lcsm29/goog-foobar
6ea44879d9d9f3483fa320d92d6c25b14565c899
[ "MIT" ]
null
null
null
if __name__ == '__main__': from time import perf_counter_ns basic_tests = ( ([1, 1, 1], 1), ([1, 2, 3, 4, 5, 6], 3) ) additional_tests = ( ([1, 2], 0), ([2, 3, 5, 7], 0), ([1] * 100 + [2] + [4], 4), ([10, 20, 23, 27, 45, 69, 118, 138, 161, 166, 167, 170,...
565.902439
15,778
0.700888
def solution(l, counter=0): # although this solution passed the Google's test, and I submitted this one for Invitation #A1, but I don't think 171700 is the correct answer for l = [1] * 100 + [2] + [4] ll = len(l) arr = [0 for _ in range(ll)] for i, k in enumerate(l): for j in range(i): ...
0
0
0
0
0
397
0
0
22
6317f3a48b6c684ec729ccc0512a3cbb1cb0ad18
1,424
py
Python
src/ReadingtipLibrary.py
Berries-M/Ohtu_miniprojekti
fd763f996830cc99e832167951b9cb77a3e58731
[ "MIT" ]
null
null
null
src/ReadingtipLibrary.py
Berries-M/Ohtu_miniprojekti
fd763f996830cc99e832167951b9cb77a3e58731
[ "MIT" ]
null
null
null
src/ReadingtipLibrary.py
Berries-M/Ohtu_miniprojekti
fd763f996830cc99e832167951b9cb77a3e58731
[ "MIT" ]
null
null
null
# pylint: disable=invalid-name """Hyvksymistestausluokka """ #Pylint disablettu toistaiseksi
24.551724
62
0.561798
# pylint: disable=invalid-name """Hyväksymistestausluokka """ #Pylint disablettu toistaiseksi from stub_io import StubIO # pylint: disable=import-error class ReadingtipLibrary: # pylint: disable=invalid-name """Luokka joka vastaa vaatimusten testaamisesta """ def __init__(self): """Luokan konstru...
12
0
0
1,243
0
0
0
5
76
a082368f583d73a70ea1e02f28ceaf3004ac72c2
1,500
py
Python
test/test_cv_conversions.py
proboscis/omni-cv-rules
0a3d4763c0c50bc32974a16531b3d0a1d396c05a
[ "MIT" ]
2
2022-01-28T13:37:08.000Z
2022-03-03T20:29:20.000Z
test/test_cv_conversions.py
proboscis/omni-cv-rules
0a3d4763c0c50bc32974a16531b3d0a1d396c05a
[ "MIT" ]
null
null
null
test/test_cv_conversions.py
proboscis/omni-cv-rules
0a3d4763c0c50bc32974a16531b3d0a1d396c05a
[ "MIT" ]
null
null
null
import frozendict from omni_cv_rules.coconut.omni_converter import AutoList target_conversions=[ ("[image_path]","numpy_rgb"), ("pix2pix_batch,nc=3","image,RGB,RGB"), ("torch,float32,CHW,RGB,0_1","base64"), ("torch,float32,CHW,RGB,0_1","widget"), ("numpy,float32,CHW,RGB,0_1","[image,L,L]"), ("n...
37.5
189
0.66
import frozendict from loguru import logger from omni_converter import AutoDataFactory from omni_converter.solver.astar import AstarSolver from omni_cv_rules.coconut.omni_converter import AutoList from omni_cv_rules.rulebook import CV_RULEBOOK target_conversions=[ ("[image_path]","numpy_rgb"), ("pix2pix_batch...
0
0
0
0
0
426
0
80
135
cc7b17bf2ed9de52a8928eacc68c93e0d029b4b9
5,776
py
Python
src/train_triplet.py
yumatsuoka/triplet-net_label-spreading
7e7c1f31d3f22ab77ecdcb7eae1d959d0e9b7d36
[ "Apache-2.0" ]
null
null
null
src/train_triplet.py
yumatsuoka/triplet-net_label-spreading
7e7c1f31d3f22ab77ecdcb7eae1d959d0e9b7d36
[ "Apache-2.0" ]
null
null
null
src/train_triplet.py
yumatsuoka/triplet-net_label-spreading
7e7c1f31d3f22ab77ecdcb7eae1d959d0e9b7d36
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ train triplet net and get feature vectors """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import time import argparse # from tqdm import tqdm import matplotlib matplotlib.use('Agg') import numpy as np i...
35.875776
100
0.631752
#!/usr/bin/env python # -*- coding: utf-8 -*- """ train triplet net and get feature vectors """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import six import time import argparse # from tqdm import tqdm import matplotlib matplotlib.use('Agg') import ma...
0
0
0
0
0
3,436
0
13
159
3becdb32e6fc5a6e1682833cf8b1b539ef46ae75
2,704
py
Python
pythonravil10/Main.py
thekupidman/pythonravil10
8bf069e78e75311de45b5792fc0b383e07c8bebc
[ "Unlicense" ]
null
null
null
pythonravil10/Main.py
thekupidman/pythonravil10
8bf069e78e75311de45b5792fc0b383e07c8bebc
[ "Unlicense" ]
null
null
null
pythonravil10/Main.py
thekupidman/pythonravil10
8bf069e78e75311de45b5792fc0b383e07c8bebc
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 # coding=utf-8 import sys import sys if __name__=='__main__': app = QApplication(sys.argv) ex = Example() sys.exit(app.exec_())
25.509434
98
0.571006
#!/usr/bin/env python3 # coding=utf-8 import sys import sys from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import pyqtSlot,QTimer from PyQt5 import uic,QtGui import random import math class Example(QWidget): def __init__(self): super().__init__() QWidget.__init__(self) ...
0
0
0
2,363
0
0
0
19
155
213c75f949c20ce93af983e60de6bcc7ff886b5b
1,497
py
Python
tools/make_wrapper_types_header.py
sarthak-saxena/cef_node_webkit
cca786066cdc635d2bcfb67315a70a1c40c5d77a
[ "BSD-3-Clause" ]
1,686
2017-04-02T19:51:57.000Z
2022-03-31T10:08:40.000Z
tools/make_wrapper_types_header.py
sarthak-saxena/cef_node_webkit
cca786066cdc635d2bcfb67315a70a1c40c5d77a
[ "BSD-3-Clause" ]
16
2017-04-21T12:05:52.000Z
2022-03-01T23:15:13.000Z
tools/make_wrapper_types_header.py
sarthak-saxena/cef_node_webkit
cca786066cdc635d2bcfb67315a70a1c40c5d77a
[ "BSD-3-Clause" ]
343
2017-04-21T11:20:31.000Z
2022-03-31T07:47:25.000Z
# Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights # reserved. Use of this source code is governed by a BSD-style license that # can be found in the LICENSE file. from __future__ import absolute_import # test the module if __name__ == "__main__": import sys # verify that the correct numb...
29.352941
79
0.684035
# Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights # reserved. Use of this source code is governed by a BSD-style license that # can be found in the LICENSE file. from __future__ import absolute_import from cef_parser import * def make_wrapper_types_header(header): result = get_copyright() ...
0
0
0
0
0
687
0
3
68
998f4a6842c75f878d5d80608bf11dd019ef2830
294
py
Python
src/hw_test/button_test.py
rundhall/ESP-LEGO-SPIKE-Simulator
dc83b895ff2aac5cf2fe576d0ba98426fea60827
[ "MIT" ]
null
null
null
src/hw_test/button_test.py
rundhall/ESP-LEGO-SPIKE-Simulator
dc83b895ff2aac5cf2fe576d0ba98426fea60827
[ "MIT" ]
null
null
null
src/hw_test/button_test.py
rundhall/ESP-LEGO-SPIKE-Simulator
dc83b895ff2aac5cf2fe576d0ba98426fea60827
[ "MIT" ]
null
null
null
import time, machine BUTTONPIN = 0 buttonpin = machine.Pin(BUTTONPIN, machine.Pin.IN, machine.Pin.PULL_UP) buttonlast = 0 print("wait_until_pressed: Waits until the button is pressed.") while buttonpin.value()==1: print("push the button") time.sleep_ms(100) print("button is pressed")
26.727273
71
0.744898
import time,machine BUTTONPIN = 0 buttonpin = machine.Pin(BUTTONPIN, machine.Pin.IN, machine.Pin.PULL_UP) buttonlast = 0 print("wait_until_pressed: Waits until the button is pressed.") while buttonpin.value()==1: print("push the button") time.sleep_ms(100) print("button is pressed")
0
0
0
0
0
0
0
-1
0
e9b8a70ff52561f8160b905d6c7d0f6adf09b3f2
9,945
py
Python
src/baseline/baseline_embeddings.py
fshdnc/disease_normalization
68b8fc118fe0f971fbd056ad2bffb44caa0e7abf
[ "Apache-2.0" ]
1
2021-01-28T09:24:27.000Z
2021-01-28T09:24:27.000Z
src/baseline/baseline_embeddings.py
fshdnc/disease_normalization
68b8fc118fe0f971fbd056ad2bffb44caa0e7abf
[ "Apache-2.0" ]
1
2019-07-08T03:25:30.000Z
2019-12-13T08:33:55.000Z
src/baseline/baseline_embeddings.py
fshdnc/disease_normalization
68b8fc118fe0f971fbd056ad2bffb44caa0e7abf
[ "Apache-2.0" ]
null
null
null
'''Word2Vec Baseline python3 baseline_embeddings.py path_to_embedding''' import logging import logging.config import configparser as cp #import args import sys import numpy as np #configurations config = cp.ConfigParser(strict=False) config.read('defaults.cfg') #argparser #args = args.get_args() ''' >>> args.train ...
39.153543
159
0.668477
'''Word2Vec Baseline python3 baseline_embeddings.py path_to_embedding''' import logging import logging.config import configparser as cp #import args import sys import pickle import numpy as np import vectorizer import load import sample #configurations config = cp.ConfigParser(strict=False) config.read('defaults.c...
0
0
0
0
0
7,077
0
-30
113
cd57085bc6d677111edf3ff6f26a0fb5115f0d21
2,336
py
Python
src/main.py
divelab/gunet
570dc99fca7a258cb8d38247c3eb34d5cec4201e
[ "MIT" ]
7
2019-06-26T22:06:07.000Z
2020-09-02T05:04:34.000Z
src/main.py
divelab/gunet
570dc99fca7a258cb8d38247c3eb34d5cec4201e
[ "MIT" ]
null
null
null
src/main.py
divelab/gunet
570dc99fca7a258cb8d38247c3eb34d5cec4201e
[ "MIT" ]
null
null
null
if __name__ == "__main__": main()
36.5
79
0.671233
import argparse import random import time import torch import numpy as np from network import GNet from trainer import Trainer from utils.data_loader import FileLoader def get_args(): parser = argparse.ArgumentParser(description='Args for graph predition') parser.add_argument('-seed', type=int, default=1, hel...
0
0
0
0
0
2,032
0
-8
268
21d6d6909499248ae9cc2c10b507830129a742ea
3,993
py
Python
qdsl/boolean.py
csams/qdsl
b80c996ad21f5604372622755da9d5b6dc9d35b2
[ "Apache-2.0" ]
2
2020-11-05T21:48:00.000Z
2020-12-18T03:13:02.000Z
qdsl/boolean.py
csams/qdsl
b80c996ad21f5604372622755da9d5b6dc9d35b2
[ "Apache-2.0" ]
null
null
null
qdsl/boolean.py
csams/qdsl
b80c996ad21f5604372622755da9d5b6dc9d35b2
[ "Apache-2.0" ]
1
2021-09-28T08:22:35.000Z
2021-09-28T08:22:35.000Z
""" The boolean module lets you create complicated boolean expressions by composing objects. The compositions can be evaluated against multiple values. """ import logging import operator import re log = logging.getLogger(__name__) __all__ = [ "pred", "pred2", "flip", "TRUE", "FALSE", "flip", ...
21.819672
79
0.574255
""" The boolean module lets you create complicated boolean expressions by composing objects. The compositions can be evaluated against multiple values. """ import logging import operator import re from functools import partial, wraps from itertools import count log = logging.getLogger(__name__) __all__ = [ "pred...
0
72
0
2,587
0
58
0
21
256
0e501240ff928cf0aab6e8c990701343605ccca5
930
py
Python
check_params_decorate.py
MarionYoung/python
d2ed5be63de344cb689fe00c04cf75f89d91f28a
[ "Apache-2.0" ]
null
null
null
check_params_decorate.py
MarionYoung/python
d2ed5be63de344cb689fe00c04cf75f89d91f28a
[ "Apache-2.0" ]
null
null
null
check_params_decorate.py
MarionYoung/python
d2ed5be63de344cb689fe00c04cf75f89d91f28a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2017/8/4 14:15 # @Author : Marrion # print(add(3,4))
35.769231
109
0.604301
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2017/8/4 14:15 # @Author : Marrion # import functools,inspect def check(fn): @functools.wraps(fn) def warp(*args,**kwargs): sig = inspect.signature(fn) parms = inspect.signature(fn).parameters for k,v in kwargs.items(): ...
0
714
0
0
0
35
0
3
66
ea323d4b5d93a223c92508e50138297ba3a7ebf9
1,426
py
Python
torcms/model/classify_model.py
bukun/TorCMS
5d7480865fd46e706b84f5f65a5c24cd03bb2142
[ "MIT" ]
243
2015-02-11T03:22:19.000Z
2022-03-02T11:13:27.000Z
torcms/model/classify_model.py
bukun/TorCMS
5d7480865fd46e706b84f5f65a5c24cd03bb2142
[ "MIT" ]
8
2015-09-09T10:49:52.000Z
2020-08-30T08:52:48.000Z
torcms/model/classify_model.py
bukun/TorCMS
5d7480865fd46e706b84f5f65a5c24cd03bb2142
[ "MIT" ]
101
2015-02-12T02:17:16.000Z
2021-11-19T09:20:10.000Z
# -*- coding:utf-8 -*- ''' Model for classify. '''
27.960784
75
0.587658
# -*- coding:utf-8 -*- ''' Model for classify. ''' from config import CMS_CFG from torcms.model.core_tab import TabPost, TabPost2Tag, TabTag class MClassify(): ''' Model for classify. ''' def __init__(self): super().__init__() @staticmethod def query_pager_by_classify(current_page_nu...
0
1,064
0
196
0
0
0
46
68
8469b52da50e995d6953b3f007086e6d9fc96c76
1,082
py
Python
frappe-bench/env/lib/python2.7/site-packages/cli_helpers/tabular_output/terminaltables_adapter.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/env/lib/python2.7/site-packages/cli_helpers/tabular_output/terminaltables_adapter.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/env/lib/python2.7/site-packages/cli_helpers/tabular_output/terminaltables_adapter.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Format adapter for the terminaltables module.""" from .preprocessors import (convert_to_string, override_missing_value, style_output) supported_formats = ('ascii', 'double', 'github') preprocessors = (override_missing_value, convert_to_string, style_output)
30.914286
75
0.698706
# -*- coding: utf-8 -*- """Format adapter for the terminaltables module.""" import terminaltables import itertools from cli_helpers.utils import filter_dict_by_key from .preprocessors import (convert_to_string, override_missing_value, style_output) supported_formats = ('ascii', 'double', ...
0
0
0
0
654
0
0
50
91
201b27541ad73178629e7ff21ae7b88cdb35af68
1,844
py
Python
licensePlates.py
matspi/CoolLicensePlates
0276c9c62afbe928066590c2ac73805d4752c332
[ "MIT" ]
null
null
null
licensePlates.py
matspi/CoolLicensePlates
0276c9c62afbe928066590c2ac73805d4752c332
[ "MIT" ]
null
null
null
licensePlates.py
matspi/CoolLicensePlates
0276c9c62afbe928066590c2ac73805d4752c332
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import requests from google.cloud import translate REGIST_URL = r"https://www.berlin.de/daten/liste-der-kfz-kennzeichen/kfz-kennz-d.csv" NUMBERS = ( "null", "eins", "zwei", "drei", "vier", "fnf", "sechs", "sieben", "acht", "neun" ) csvData = requests.ge...
26.724638
109
0.590564
#!/usr/bin/env python3 import sys import requests from google.cloud import translate REGIST_URL = r"https://www.berlin.de/daten/liste-der-kfz-kennzeichen/kfz-kennz-d.csv" NUMBERS = ( "null", "eins", "zwei", "drei", "vier", "fünf", "sechs", "sieben", "acht", "neun" ) csvData ...
2
0
0
0
0
717
0
-11
46
6a649bec9e4e2327f289422a9b7cb04d2ef6054a
2,197
py
Python
env/lib/python3.8/site-packages/celery/worker/heartbeat.py
rajancolab/blogsite
0721a3ab9b61bfca6fd84d5fae60b0574bfb0287
[ "MIT" ]
13
2018-03-28T23:07:01.000Z
2022-03-12T06:01:21.000Z
env/lib/python3.8/site-packages/celery/worker/heartbeat.py
rajancolab/blogsite
0721a3ab9b61bfca6fd84d5fae60b0574bfb0287
[ "MIT" ]
11
2018-06-18T15:49:07.000Z
2021-11-25T01:45:33.000Z
env/lib/python3.9/site-packages/celery/worker/heartbeat.py
simotwo/AbileneParadox-ddd
c85961efb37aba43c0d99ed1c36d083507e2b2d3
[ "MIT" ]
5
2018-03-28T23:07:05.000Z
2021-12-09T19:02:00.000Z
# -*- coding: utf-8 -*- """Heartbeat service. This is the internal thread responsible for sending heartbeat events at regular intervals (may not be an actual thread). """ from __future__ import absolute_import, unicode_literals __all__ = ('Heart',)
33.8
70
0.616295
# -*- coding: utf-8 -*- """Heartbeat service. This is the internal thread responsible for sending heartbeat events at regular intervals (may not be an actual thread). """ from __future__ import absolute_import, unicode_literals from celery.signals import heartbeat_sent from celery.utils.sysinfo import load_average f...
0
0
0
1,765
0
0
0
89
91
f91e7da2b03dd53eb8e9c707369d892377c7d10b
286
py
Python
data/mnist_data/create_mnist_imgs.py
felixGer/PySDDR
a7680e7190185ba605df6ad85b4fdf19401473b3
[ "MIT" ]
14
2021-04-07T17:33:19.000Z
2022-02-07T14:49:37.000Z
data/mnist_data/create_mnist_imgs.py
felixGer/PySDDR
a7680e7190185ba605df6ad85b4fdf19401473b3
[ "MIT" ]
3
2021-11-30T15:03:32.000Z
2022-01-09T06:24:29.000Z
data/mnist_data/create_mnist_imgs.py
felixGer/PySDDR
a7680e7190185ba605df6ad85b4fdf19401473b3
[ "MIT" ]
7
2021-04-20T08:48:57.000Z
2022-03-02T10:45:19.000Z
import numpy as np import os import imageio mnist = np.load('mnist.npy') num_imgs = mnist.shape[0] for i in range(num_imgs): img = mnist[i,:,:] name = 'img_%s.jpg'%(i) file_path = os.path.join('mnist_images', name) imageio.imwrite(file_path, (img*255).astype(np.uint8))
26
58
0.671329
import numpy as np import os import imageio mnist = np.load('mnist.npy') num_imgs = mnist.shape[0] for i in range(num_imgs): img = mnist[i,:,:] name = 'img_%s.jpg'%(i) file_path = os.path.join('mnist_images', name) imageio.imwrite(file_path, (img*255).astype(np.uint8))
0
0
0
0
0
0
0
0
0
0d0fa6addcfe5c2847163ce9c815a1679e2eed6b
1,977
py
Python
test/selenium/src/lib/rest_facades/roles_rest_facade.py
MikalaiMikalalai/ggrc-core
f0f83b3638574bb64de474f3b70ed27436ca812a
[ "ECL-2.0", "Apache-2.0" ]
1
2019-01-12T23:46:00.000Z
2019-01-12T23:46:00.000Z
test/selenium/src/lib/rest_facades/roles_rest_facade.py
MikalaiMikalalai/ggrc-core
f0f83b3638574bb64de474f3b70ed27436ca812a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
test/selenium/src/lib/rest_facades/roles_rest_facade.py
MikalaiMikalalai/ggrc-core
f0f83b3638574bb64de474f3b70ed27436ca812a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright (C) 2020 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """REST facade for roles.""" from lib import users from lib.constants import roles, object_states from lib.entities import entities_factory from lib.entities.entity import AccessControlRoleEntity from lib.ser...
38.019231
78
0.754679
# Copyright (C) 2020 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """REST facade for roles.""" from lib import users from lib.constants import roles, objects, object_states from lib.decorator import memoize from lib.entities import entities_factory from lib.entities.entity ...
0
388
0
0
0
0
0
21
68
420d617f1e058c42ad47f5a158d2d53d46c66af5
329
py
Python
tests/test_pw_hasher.py
jordic/fastapi_iam
aab1815dcb8b93f303fd9a83d85660ac3f92b7af
[ "MIT" ]
1
2021-03-18T22:11:52.000Z
2021-03-18T22:11:52.000Z
tests/test_pw_hasher.py
jordic/fastapi_iam
aab1815dcb8b93f303fd9a83d85660ac3f92b7af
[ "MIT" ]
null
null
null
tests/test_pw_hasher.py
jordic/fastapi_iam
aab1815dcb8b93f303fd9a83d85660ac3f92b7af
[ "MIT" ]
null
null
null
import pytest pytestmark = pytest.mark.asyncio
25.307692
62
0.768997
import pytest from fastapi_iam import auth pytestmark = pytest.mark.asyncio async def test_password_argon_hasher(): service = auth.ArgonPasswordHasher() password = "1qaz2wsx" token = await service.hash_password(password) check_pass = await service.check_password(token, password) assert check_pass...
0
0
228
0
0
0
0
7
45
7f0837223c4424fece8121cb0718fcbac587c4f2
3,718
py
Python
pyvlova/op/grouped_conv.py
ModelTC/pyvlova
080437c80bd995776507f5c9f4975a0420391cb0
[ "Apache-2.0" ]
1
2021-11-11T03:11:49.000Z
2021-11-11T03:11:49.000Z
pyvlova/op/grouped_conv.py
ModelTC/pyvlova
080437c80bd995776507f5c9f4975a0420391cb0
[ "Apache-2.0" ]
null
null
null
pyvlova/op/grouped_conv.py
ModelTC/pyvlova
080437c80bd995776507f5c9f4975a0420391cb0
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Jiang Shenghu # SPDX-License-Identifier: Apache-2.0
39.136842
104
0.589295
# Copyright 2020 Jiang Shenghu # SPDX-License-Identifier: Apache-2.0 from tvm import topi from ..poly import TensorTable, Statement, ScheduleTree from .conv import PlainConv2d, Conv2d def schedule(**kwargs): init_t = 'stmt_init[n, c, h, w]' calc_t = 'stmt_calc[n, c, h, w, i, j, k]' output_constraints = '...
0
0
0
1,070
0
2,343
0
49
182
4ad335965ac7f1188f59a89d4c60cee16b923221
1,158
py
Python
scenic/projects/baselines/detr/main.py
NielsRogge/scenic
4418bf4c6954fffe61d9bafc802981baa9440e49
[ "Apache-2.0" ]
688
2021-07-26T21:45:18.000Z
2022-03-31T11:53:34.000Z
scenic/projects/baselines/detr/main.py
NielsRogge/scenic
4418bf4c6954fffe61d9bafc802981baa9440e49
[ "Apache-2.0" ]
35
2021-08-03T11:31:10.000Z
2022-03-31T21:58:58.000Z
scenic/projects/baselines/detr/main.py
NielsRogge/scenic
4418bf4c6954fffe61d9bafc802981baa9440e49
[ "Apache-2.0" ]
88
2021-08-03T13:19:50.000Z
2022-03-31T08:35:22.000Z
"""Main file for DETR.""" from typing import Any from absl import flags from clu import metric_writers import jax import jax.numpy as jnp import ml_collections from scenic import app from scenic.projects.baselines.detr import model as detr_model from scenic.projects.baselines.detr import trainer from scenic.train_lib...
26.318182
78
0.741796
"""Main file for DETR.""" from typing import Any from absl import flags from clu import metric_writers import jax import jax.numpy as jnp import ml_collections from scenic import app from scenic.projects.baselines.detr import model as detr_model from scenic.projects.baselines.detr import trainer from scenic.train_lib...
0
0
0
0
0
0
0
0
0
7821f2ff484f39551a14eddf76087769af5e5a96
4,973
py
Python
students/K33402/Akhmetzhanov Alisher/lr3_4/lab3_4/libraryBackend/main/views.py
AlishKZ/ITMO_ICT_WebDevelopment_2020-2021
b3ce82e17392d26d815e64343f5103f1bd46cd81
[ "MIT" ]
null
null
null
students/K33402/Akhmetzhanov Alisher/lr3_4/lab3_4/libraryBackend/main/views.py
AlishKZ/ITMO_ICT_WebDevelopment_2020-2021
b3ce82e17392d26d815e64343f5103f1bd46cd81
[ "MIT" ]
null
null
null
students/K33402/Akhmetzhanov Alisher/lr3_4/lab3_4/libraryBackend/main/views.py
AlishKZ/ITMO_ICT_WebDevelopment_2020-2021
b3ce82e17392d26d815e64343f5103f1bd46cd81
[ "MIT" ]
null
null
null
# Create your views here.
36.29927
128
0.717474
from rest_framework.response import Response from rest_framework import status from rest_framework.views import APIView from main.serializers import BookReplicaSerializer, BookSerializer, LibrarianSerializer, LibraryHallSerializer, ReaderSerializer from main.models import Book, BookReplica, CustomUser, Librarian, Libr...
22
0
0
4,168
0
0
0
253
499
6d5e238930e86ae7e01b39e44815055131942fef
275
py
Python
predict.py
fhvermei/chemprop_solvation
b6b2ea87440bb600593b5ff50eb8a15cfd79f33d
[ "MIT" ]
null
null
null
predict.py
fhvermei/chemprop_solvation
b6b2ea87440bb600593b5ff50eb8a15cfd79f33d
[ "MIT" ]
1
2022-03-01T19:15:33.000Z
2022-03-01T19:15:33.000Z
predict.py
fhvermei/chemprop_solvation
b6b2ea87440bb600593b5ff50eb8a15cfd79f33d
[ "MIT" ]
null
null
null
"""Loads a trained model checkpoint and makes predictions on a dataset.""" from chemprop_solvation.parsing import parse_predict_args from chemprop_solvation.train import make_predictions if __name__ == '__main__': args = parse_predict_args() make_predictions(args)
30.555556
74
0.796364
"""Loads a trained model checkpoint and makes predictions on a dataset.""" from chemprop_solvation.parsing import parse_predict_args from chemprop_solvation.train import make_predictions if __name__ == '__main__': args = parse_predict_args() make_predictions(args)
0
0
0
0
0
0
0
0
0
ecf722da8089f170f217dfec0cc7d3e66aae3380
8,753
py
Python
sdk/python/pulumi_google_native/managedidentities/v1beta1/backup.py
AaronFriel/pulumi-google-native
75d1cda425e33d4610348972cd70bddf35f1770d
[ "Apache-2.0" ]
44
2021-04-18T23:00:48.000Z
2022-02-14T17:43:15.000Z
sdk/python/pulumi_google_native/managedidentities/v1beta1/backup.py
AaronFriel/pulumi-google-native
75d1cda425e33d4610348972cd70bddf35f1770d
[ "Apache-2.0" ]
354
2021-04-16T16:48:39.000Z
2022-03-31T17:16:39.000Z
sdk/python/pulumi_google_native/managedidentities/v1beta1/backup.py
AaronFriel/pulumi-google-native
75d1cda425e33d4610348972cd70bddf35f1770d
[ "Apache-2.0" ]
8
2021-04-24T17:46:51.000Z
2022-01-05T10:40:21.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import pulumi from ... import _utilities __all__ = ['BackupArgs', 'Backup']
37.891775
134
0.619331
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __...
3
5,742
0
2,609
0
0
0
41
113
edebeb0f91dc89522eb52c4c79f88ea14cac0264
7,331
py
Python
rpython/rlib/special_value.py
jptomo/pypy-lang-scheme
55edb2cec69d78f86793282a4566fcbc1ef9fcac
[ "MIT" ]
34
2015-07-09T04:53:27.000Z
2021-07-19T05:22:27.000Z
rpython/rlib/special_value.py
jptomo/pypy-lang-scheme
55edb2cec69d78f86793282a4566fcbc1ef9fcac
[ "MIT" ]
6
2015-05-30T17:20:45.000Z
2017-06-12T14:29:23.000Z
rpython/rlib/special_value.py
jptomo/pypy-lang-scheme
55edb2cec69d78f86793282a4566fcbc1ef9fcac
[ "MIT" ]
11
2015-09-07T14:26:08.000Z
2020-04-10T07:20:41.000Z
import math from rpython.rlib.rfloat import copysign # code to deal with special values (infinities, NaNs, ...) # # The special types can be: ST_NINF = 0 # negative infinity ST_NEG = 1 # negative finite number (nonzero) ST_NZERO = 2 # -0. ST_PZERO = 3 # +0. ST_POS = 4 ...
43.123529
79
0.367753
import math from rpython.rlib.rfloat import isnan, isinf, copysign # code to deal with special values (infinities, NaNs, ...) # # The special types can be: ST_NINF = 0 # negative infinity ST_NEG = 1 # negative finite number (nonzero) ST_NZERO = 2 # -0. ST_PZERO = 3 # +0. ST_P...
0
0
0
0
0
644
0
14
46
4043addbcf2a6913bd26e0dcd14ebb7242e74209
1,479
py
Python
torstack/library/compat.py
longniao/torstack
148139eeca0f3cd8a8c2196ae2a6f8cea519d9b5
[ "MIT" ]
7
2018-12-11T03:41:04.000Z
2018-12-11T06:08:45.000Z
torstack/library/compat.py
longniao/torstack
148139eeca0f3cd8a8c2196ae2a6f8cea519d9b5
[ "MIT" ]
null
null
null
torstack/library/compat.py
longniao/torstack
148139eeca0f3cd8a8c2196ae2a6f8cea519d9b5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ''' torstack.library.compat.py compat definition. :copyright: (c) 2018 by longniao <longniao@gmail.com> :license: MIT, see LICENSE for more details. ''' import sys # __all__ = ( # 'text_type', 'string_types', 'izip', 'iteritems', 'itervalues', # 'with_metaclass', # ) PY3 = sys.versi...
20.541667
69
0.612576
# -*- coding: utf-8 -*- ''' torstack.library.compat.py compat definition. :copyright: (c) 2018 by longniao <longniao@gmail.com> :license: MIT, see LICENSE for more details. ''' import sys # __all__ = ( # 'text_type', 'string_types', 'izip', 'iteritems', 'itervalues', # 'with_metaclass', # ) PY3 = sys.versi...
0
0
0
0
0
390
0
5
292
f85fe3d0fc0972e2f4e39bd88f70e4c006132765
14,977
py
Python
various_types_of_self_citation/main.py
KasyanovPavel/wos_api_usecases
6f87e46d45eaffe1bb98c63ae63a8818160d3273
[ "MIT" ]
null
null
null
various_types_of_self_citation/main.py
KasyanovPavel/wos_api_usecases
6f87e46d45eaffe1bb98c63ae63a8818160d3273
[ "MIT" ]
null
null
null
various_types_of_self_citation/main.py
KasyanovPavel/wos_api_usecases
6f87e46d45eaffe1bb98c63ae63a8818160d3273
[ "MIT" ]
1
2021-07-28T16:47:58.000Z
2021-07-28T16:47:58.000Z
from apikey import apikey # Your API key, it's better not to store it in the program # Enter the WoS search query to evaluate its self-citation percentage: search_query = '(TS=("self citation*" or selfcitation*)) AND (TP==("HIGHLY CITED PAPERS"))' headers = { 'X-APIKey': apikey } endpoint = "https://api.clariv...
61.130612
237
0.686252
import requests from apikey import apikey # Your API key, it's better not to store it in the program # Enter the WoS search query to evaluate its self-citation percentage: search_query = '(TS=("self citation*" or selfcitation*)) AND (TP==("HIGHLY CITED PAPERS"))' headers = { 'X-APIKey': apikey } endpoint = "ht...
0
0
0
956
0
12,569
0
-6
297
e704606e17552b1dc7f3698e2abe2715af86b384
3,867
py
Python
src/fbsrankings/service/service.py
mikee385/fbsrankings
2b50e26a302b53c21cd8f5c965943d6fbf0680a1
[ "MIT" ]
null
null
null
src/fbsrankings/service/service.py
mikee385/fbsrankings
2b50e26a302b53c21cd8f5c965943d6fbf0680a1
[ "MIT" ]
null
null
null
src/fbsrankings/service/service.py
mikee385/fbsrankings
2b50e26a302b53c21cd8f5c965943d6fbf0680a1
[ "MIT" ]
null
null
null
from typing import TypeVar R = TypeVar("R", covariant=True)
31.696721
87
0.709853
from abc import ABCMeta from types import TracebackType from typing import ContextManager from typing import List from typing import Optional from typing import Type from typing import TypeVar from typing_extensions import Literal from typing_extensions import Protocol from fbsrankings.common import Command from fbsr...
0
81
0
2,593
0
0
0
554
576
9c23ac4cd76abc536a947f4db42f36183636e6ef
3,243
py
Python
xpresso/binders/_body/openapi/discriminated.py
yezz123/xpresso
89ba9f3d164b0d76cbe085e09e39d4bca2315b59
[ "MIT" ]
4
2022-02-07T05:12:51.000Z
2022-02-28T12:34:57.000Z
xpresso/binders/_body/openapi/discriminated.py
yezz123/xpresso
89ba9f3d164b0d76cbe085e09e39d4bca2315b59
[ "MIT" ]
2
2022-01-25T02:05:02.000Z
2022-01-25T02:38:59.000Z
xpresso/binders/_body/openapi/discriminated.py
yezz123/xpresso
89ba9f3d164b0d76cbe085e09e39d4bca2315b59
[ "MIT" ]
null
null
null
import sys if sys.version_info < (3, 9): from typing_extensions import Annotated, get_args, get_origin else:
36.852273
85
0.670984
import inspect import sys import typing from dataclasses import dataclass if sys.version_info < (3, 9): from typing_extensions import Annotated, get_args, get_origin else: from typing import Annotated, get_origin, get_args from di.typing import get_markers_from_parameter from xpresso._utils.typing import mod...
0
2,660
0
0
0
0
0
217
250
acd2ea12491c5b1f25bd235a0238c6e418dc7018
3,227
py
Python
scripts/particle_sym.py
mihranmashhud/PolyMarine
f959016b4505356213f10bdf0ff1b2157f719c87
[ "MIT" ]
1
2022-03-10T21:06:51.000Z
2022-03-10T21:06:51.000Z
scripts/particle_sym.py
Mrugank-Upadhyay/PolyMarine
f959016b4505356213f10bdf0ff1b2157f719c87
[ "MIT" ]
null
null
null
scripts/particle_sym.py
Mrugank-Upadhyay/PolyMarine
f959016b4505356213f10bdf0ff1b2157f719c87
[ "MIT" ]
1
2022-03-10T21:02:04.000Z
2022-03-10T21:02:04.000Z
import random import numpy as np import datetime latlongToAlbers = getCoordConverter(4326,5070) albersToLatlong = getCoordConverter(5070,4326) start_date = datetime.datetime(1992,1,1) end_date = datetime.datetime(2017,12,31) current_date = start_date increment = datetime.timedelta(minutes=15) sample_point = (-41.88...
31.637255
99
0.654168
from operator import itemgetter import time import math import random import numpy as np import datetime from osgeo import ogr, osr def getCoordConverter(src='', targ=''): srcproj = osr.SpatialReference() srcproj.ImportFromEPSG(src) targproj = osr.SpatialReference() if isinstance(targ, str): ta...
0
0
0
0
0
1,364
0
-5
204
7da0f36bf0c0b92c2f4f845c1893cc78ea890b2b
591
py
Python
PythonClient/reinforcement_learning/airgym/envs/xbox/xboxtest.py
zewuzheng17/Carintercept
58a18ac84631fa03ec245dcdefdcc0ead6f84d67
[ "MIT" ]
null
null
null
PythonClient/reinforcement_learning/airgym/envs/xbox/xboxtest.py
zewuzheng17/Carintercept
58a18ac84631fa03ec245dcdefdcc0ead6f84d67
[ "MIT" ]
null
null
null
PythonClient/reinforcement_learning/airgym/envs/xbox/xboxtest.py
zewuzheng17/Carintercept
58a18ac84631fa03ec245dcdefdcc0ead6f84d67
[ "MIT" ]
1
2022-03-22T06:16:25.000Z
2022-03-22T06:16:25.000Z
import time import pygame pygame.init() pygame.joystick.init() # joycount = pygame.joystick.get_count() print("joycount:"+str(joycount)) # joystick = pygame.joystick.Joystick(0) while True: # pygame.event.get() axis = get_axis(joystick=joystick) button = get_button(joystick=joystick) hats = get...
18.46875
42
0.690355
import time from Xboxcmd import * import pygame pygame.init() pygame.joystick.init() #查看现在有几个遥控器 joycount = pygame.joystick.get_count() print("joycount:"+str(joycount)) #连接第一个控制器 joystick = pygame.joystick.Joystick(0) while True: #接收事件 pygame.event.get() axis = get_axis(joystick=joystick) button = ...
66
0
0
0
0
0
0
0
22
a33569915e92987b4fd6add1ae4a92db8c9fd19a
3,836
py
Python
fourth.py
yk7333/DIP
7e8df6631d89a6bce61e45d5f9ddc671ed050732
[ "MIT" ]
1
2021-06-02T13:28:39.000Z
2021-06-02T13:28:39.000Z
fourth.py
yk7333/DIP
7e8df6631d89a6bce61e45d5f9ddc671ed050732
[ "MIT" ]
null
null
null
fourth.py
yk7333/DIP
7e8df6631d89a6bce61e45d5f9ddc671ed050732
[ "MIT" ]
2
2021-03-28T11:15:19.000Z
2021-11-08T12:22:17.000Z
''' @author:yk7333 last modified:2021-4-7 language:python ''' import cv2 as cv import os if __name__ == "__main__": os.chdir("C:\\Users\\m\\Desktop\\") for i in range(3,8,2): #3,5,7 img=read("test2.tif") # gaussion=Blur(img,i,"Gaussion") ...
33.068966
103
0.585506
''' @author:yk7333 last modified:2021-4-7 language:python ''' import cv2 as cv import numpy as np import matplotlib.pyplot as plt import os def show(img,name="img"): cv.imshow(name,img) cv.waitKey(0) cv.destroyAllWindows() def read(path): return cv.imread(path,0) def save(name,src): ret...
378
0
0
0
0
1,609
0
7
263
0f7190955ffa54728d61c5c858685f6df3393455
339
py
Python
gists/forma_incorreta.py
cassioeskelsen/precisamos-falar-de-di-ioc-python
b7a08f887d4a6c56e8e2465087dc33687e837f34
[ "MIT" ]
2
2022-02-03T15:49:09.000Z
2022-03-10T01:20:07.000Z
gists/forma_incorreta.py
cassioeskelsen/precisamos-falar-de-di-ioc-python
b7a08f887d4a6c56e8e2465087dc33687e837f34
[ "MIT" ]
null
null
null
gists/forma_incorreta.py
cassioeskelsen/precisamos-falar-de-di-ioc-python
b7a08f887d4a6c56e8e2465087dc33687e837f34
[ "MIT" ]
null
null
null
if __name__ == '__main__': print(CustomerRepository().get_customers())
24.214286
65
0.666667
from pymongo import MongoClient class CustomerRepository: def get_customers(self): mongo_client = MongoClient('mongodb://localhost:27017/') collection = mongo_client['erp']["customer"] return list(collection.find({})) if __name__ == '__main__': print(CustomerRepository()...
0
0
0
198
0
0
0
10
48
41e59c4093b29b325db70120ed587aceb09b82c7
2,219
py
Python
main.py
RememberTheAir/tg-github-updates
bad529415f4f2de2748f6c8ea5af5b81ab261a6c
[ "MIT" ]
4
2020-03-02T10:13:27.000Z
2020-11-11T18:24:19.000Z
main.py
RememberTheAir/tg-github-updates
bad529415f4f2de2748f6c8ea5af5b81ab261a6c
[ "MIT" ]
3
2020-03-26T09:52:38.000Z
2021-05-17T06:14:50.000Z
main.py
RememberTheAir/tg-github-updates
bad529415f4f2de2748f6c8ea5af5b81ab261a6c
[ "MIT" ]
3
2020-05-17T02:25:14.000Z
2020-09-30T15:46:47.000Z
import logging import logging.config logger = logging.getLogger(__name__) load_logging_config() if __name__ == '__main__': main()
29.586667
132
0.703921
import os import json import logging import logging.config from telegram.ext import Updater from telegram.ext import CommandHandler from telegram.ext import Filters from config import config from jobs import JOBS_CALLBACKS import utils as u def load_logging_config(config_file_path='logging.json'): ...
0
595
0
0
0
1,125
0
28
313
d4c3e9e40cb29b97068cc11b38b7b15678c17a95
10,056
py
Python
scripts/checker.py
drycc/stacks
11612170603d108451a58254c9ab0064a827c636
[ "Apache-2.0" ]
null
null
null
scripts/checker.py
drycc/stacks
11612170603d108451a58254c9ab0064a827c636
[ "Apache-2.0" ]
48
2022-03-02T02:14:35.000Z
2022-03-30T00:07:47.000Z
scripts/checker.py
drycc/stacks
11612170603d108451a58254c9ab0064a827c636
[ "Apache-2.0" ]
2
2022-02-14T06:25:55.000Z
2022-02-16T05:38:57.000Z
import os github_headers = {'Authorization': 'token %s' % os.environ.get("GITHUB_TOKEN")} repo_info_table = { "vouch-proxy": { "name": "vouch-proxy", "type": "github", "owner": "vouch", "match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$", }, "redis_exporter": { "name": "r...
28.731429
99
0.423528
import os import re import json import requests from datetime import datetime github_headers = {'Authorization': 'token %s' % os.environ.get("GITHUB_TOKEN")} repo_info_table = { "vouch-proxy": { "name": "vouch-proxy", "type": "github", "owner": "vouch", "match": "^v[0-9]{1,}\.[0-9]...
0
0
0
0
0
3,325
0
-20
180
ed5fa4746cd554bdb85545c30a4da0fac95423f4
440
py
Python
Tests/test.py
jkruse27/Foxhound
08a746a5335c2b71aad2fb08c86d1795ac24d476
[ "MIT" ]
null
null
null
Tests/test.py
jkruse27/Foxhound
08a746a5335c2b71aad2fb08c86d1795ac24d476
[ "MIT" ]
null
null
null
Tests/test.py
jkruse27/Foxhound
08a746a5335c2b71aad2fb08c86d1795ac24d476
[ "MIT" ]
null
null
null
import time dataset = Dataset('TestData/Dados.csv') begin_date = datetime.strptime('2021-08-2 12:00',"%Y-%m-%d %H:%M") end_date = datetime.strptime('2021-08-7 12:00',"%Y-%m-%d %H:%M") main_var = 'TU-11C:SS-HLS-Ax48NW5:Level-Mon' start = time.time() delays, corrs, names = dataset.correlate(main_var, begin_date, end_d...
24.444444
77
0.7
from Dataset import * from datetime import * import time dataset = Dataset('TestData/Dados.csv') begin_date = datetime.strptime('2021-08-2 12:00',"%Y-%m-%d %H:%M") end_date = datetime.strptime('2021-08-7 12:00',"%Y-%m-%d %H:%M") main_var = 'TU-11C:SS-HLS-Ax48NW5:Level-Mon' start = time.time() delays, corrs, names = ...
0
0
0
0
0
0
0
1
44
b75127cedc1c587e657854e2855292dbcfd3ea83
387
py
Python
setup.py
isears/openmrsapi
50e5329b1ecc74f8e4d94f71e4b0e0207ac705d6
[ "MIT" ]
1
2018-10-28T10:14:22.000Z
2018-10-28T10:14:22.000Z
setup.py
isears/openmrsapi
50e5329b1ecc74f8e4d94f71e4b0e0207ac705d6
[ "MIT" ]
null
null
null
setup.py
isears/openmrsapi
50e5329b1ecc74f8e4d94f71e4b0e0207ac705d6
[ "MIT" ]
null
null
null
from setuptools import setup setup( name='openmrsapi', version='0.1', description='a library for interacting with openmrs api in python', url='https://github.com/isears/openmrsapi', author='Isaac Sears', author_email='isaac.j.sears@gmail.com', license='MIT', packages=['openmrsapi'], ...
22.764706
71
0.653747
from setuptools import setup setup( name='openmrsapi', version='0.1', description='a library for interacting with openmrs api in python', url='https://github.com/isears/openmrsapi', author='Isaac Sears', author_email='isaac.j.sears@gmail.com', license='MIT', packages=['openmrsapi'], ...
0
0
0
0
0
0
0
0
0
4e019d4a52876ce74dbd2768087cd44e8e77eb8b
101
py
Python
run.py
SPK-RPI/FlaskBlog
45c816a3720988e151b59dd5fbe5abab71e25fcc
[ "MIT" ]
null
null
null
run.py
SPK-RPI/FlaskBlog
45c816a3720988e151b59dd5fbe5abab71e25fcc
[ "MIT" ]
null
null
null
run.py
SPK-RPI/FlaskBlog
45c816a3720988e151b59dd5fbe5abab71e25fcc
[ "MIT" ]
null
null
null
from blogposts import app if __name__ == '__main__': app.run(host='192.168.43.57',debug=True)
25.25
45
0.683168
from blogposts import app if __name__ == '__main__': app.run(host='192.168.43.57',debug=True)
0
0
0
0
0
0
0
0
0
e6d23aba45b82cb0b235f7c6849de37983d83785
6,277
py
Python
workers.py
Recursing/MySubredditsBot
5ca0f7cf9c210acc82009001cfb9915a2b62a95f
[ "MIT" ]
6
2020-05-26T10:02:28.000Z
2021-12-07T18:11:51.000Z
workers.py
Recursing/MySubredditsBot
5ca0f7cf9c210acc82009001cfb9915a2b62a95f
[ "MIT" ]
3
2022-01-11T10:10:53.000Z
2022-01-23T10:50:01.000Z
workers.py
Recursing/MySubredditsBot
5ca0f7cf9c210acc82009001cfb9915a2b62a95f
[ "MIT" ]
null
null
null
import asyncio from typing import Any, Dict, Tuple workers: Dict[Tuple[int, str], asyncio.Task[Any]] = {}
38.27439
93
0.641071
import asyncio import logging import random import time from datetime import datetime from typing import Any, Dict, Optional, Tuple import reddit_adapter import subscriptions_manager import telegram_adapter async def send_subscription_update(subreddit: str, chat_id: int, per_month: int): # Send top unsent post f...
0
0
4,335
0
0
1,509
0
2
316
c6b3d328f2d98b34f2cdd6bd4d215c9101ed10e3
7,039
py
Python
instruments/triggering.py
gronchi/mpts
5e33e885b099a337c0cadc78840dd2c216a6d9df
[ "MIT" ]
null
null
null
instruments/triggering.py
gronchi/mpts
5e33e885b099a337c0cadc78840dd2c216a6d9df
[ "MIT" ]
null
null
null
instruments/triggering.py
gronchi/mpts
5e33e885b099a337c0cadc78840dd2c216a6d9df
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Implementation of the Trigger Unit communication.""" import logging import re _log = logging.getLogger(__name__) physical_names = { 'A2_Delay': r'Simmer_delay(1uS)', 'A4_Delay': r'Burst_delay(1uS)', 'A4_Number': r'Burst_number', 'A4_Period': r'Burst_pe...
35.913265
123
0.594687
#!/usr/bin/env python # -*- coding: utf-8 -*- """Implementation of the Trigger Unit communication.""" import logging import re import socket _log = logging.getLogger(__name__) physical_names = { 'A2_Delay': r'Simmer_delay(1uS)', 'A4_Delay': r'Burst_delay(1uS)', 'A4_Number': r'Burst_number', 'A4_Perio...
0
0
0
5,070
0
0
0
-8
45
51d3878e39cd1b290a0eaeb08e3f64757d4ea419
108
py
Python
.config/autokey/data/chromium/text-editing/c-e-move-end-of-line.py
tonyaldon/uconfig
e2966389dc4bdaf10ef86f1625faf1b2caf687c6
[ "MIT" ]
1
2021-01-14T19:10:38.000Z
2021-01-14T19:10:38.000Z
.config/autokey/data/chromium/text-editing/c-e-move-end-of-line.py
tonyaldon/uconfig
e2966389dc4bdaf10ef86f1625faf1b2caf687c6
[ "MIT" ]
null
null
null
.config/autokey/data/chromium/text-editing/c-e-move-end-of-line.py
tonyaldon/uconfig
e2966389dc4bdaf10ef86f1625faf1b2caf687c6
[ "MIT" ]
1
2021-01-14T19:10:40.000Z
2021-01-14T19:10:40.000Z
store.set_global_value('hotkey', '<ctrl>+e') engine.set_return_value('<end>') engine.run_script('chromium')
27
44
0.75
store.set_global_value('hotkey', '<ctrl>+e') engine.set_return_value('<end>') engine.run_script('chromium')
0
0
0
0
0
0
0
0
0
87ce95ba10a9e75ca88b201d1ff1e27dd415d9db
30,083
py
Python
latticegraph_designer/test/test_designer.py
luchko/latticegraph_designer
7fd25a5bdc0fce070cd1328c5d6f7113b6ec91e2
[ "MIT" ]
24
2017-04-23T14:15:59.000Z
2021-05-12T04:33:47.000Z
latticegraph_designer/test/test_designer.py
luchko/latticegraph_designer
7fd25a5bdc0fce070cd1328c5d6f7113b6ec91e2
[ "MIT" ]
null
null
null
latticegraph_designer/test/test_designer.py
luchko/latticegraph_designer
7fd25a5bdc0fce070cd1328c5d6f7113b6ec91e2
[ "MIT" ]
8
2017-08-02T12:55:28.000Z
2021-10-10T14:54:38.000Z
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """Very weak testing of the basic functionality using unittest and QTest""" from __future__ import division __author__ = "Ivan Luchko (luchko.ivan@gmail.com)" __version__ = "1.0a1" __date__ = "Apr 4, 2017" __copyright__ = "Copyright (c) 2017, Ivan Luchko and Project Cont...
40.164219
90
0.630123
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """Very weak testing of the basic functionality using unittest and QTest""" from __future__ import division __author__ = "Ivan Luchko (luchko.ivan@gmail.com)" __version__ = "1.0a1" __date__ = "Apr 4, 2017" __copyright__ = "Copyright (c) 2017, Ivan Luchko and Project Cont...
0
0
0
27,724
0
642
0
392
486
0e652ecfaead0fd3fcc5bf2bc1ba76e23ca4705a
92
py
Python
config_gen/admin.py
lkmhaqer/gtools-python
cff6d80525b78a4fadfb686566489fbe1687d889
[ "MIT" ]
5
2016-10-31T17:46:17.000Z
2022-02-02T00:40:49.000Z
config_gen/admin.py
lkmhaqer/gtools-python
cff6d80525b78a4fadfb686566489fbe1687d889
[ "MIT" ]
33
2018-05-09T06:07:50.000Z
2021-09-22T17:39:56.000Z
config_gen/admin.py
lkmhaqer/gtools-python
cff6d80525b78a4fadfb686566489fbe1687d889
[ "MIT" ]
1
2020-05-14T21:44:25.000Z
2020-05-14T21:44:25.000Z
# file: config_gen/admin.py # Register your models here.
15.333333
32
0.771739
# file: config_gen/admin.py from django.contrib import admin # Register your models here.
0
0
0
0
0
0
0
11
23
f6645b849fb773b521114eed6a43f40cbba427a2
8,363
py
Python
tests/integration/schema_registry/test_json_serializers.py
woodlee/confluent-kafka-python
c8a05dbd73e06ea310de7f28267fd4714f90ef8c
[ "Apache-2.0" ]
1
2020-04-22T13:10:31.000Z
2020-04-22T13:10:31.000Z
tests/integration/schema_registry/test_json_serializers.py
woodlee/confluent-kafka-python
c8a05dbd73e06ea310de7f28267fd4714f90ef8c
[ "Apache-2.0" ]
null
null
null
tests/integration/schema_registry/test_json_serializers.py
woodlee/confluent-kafka-python
c8a05dbd73e06ea310de7f28267fd4714f90ef8c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2020 Confluent Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
32.667969
79
0.64044
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2020 Confluent Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
0
0
0
267
0
0
0
57
23
2207e7f8080442f83f42de7f49c9eb73c34f4d8c
2,041
py
Python
pyexcel_io/utils.py
kit-cat/pyexcel-io
ec62f384ef814d51d95bf2fb15b8a9b239249691
[ "BSD-3-Clause" ]
null
null
null
pyexcel_io/utils.py
kit-cat/pyexcel-io
ec62f384ef814d51d95bf2fb15b8a9b239249691
[ "BSD-3-Clause" ]
null
null
null
pyexcel_io/utils.py
kit-cat/pyexcel-io
ec62f384ef814d51d95bf2fb15b8a9b239249691
[ "BSD-3-Clause" ]
null
null
null
""" pyexcel_io.utils ~~~~~~~~~~~~~~~~~~~ utility functions :copyright: (c) 2014-2017 by Onni Software Ltd. :license: New BSD License, see LICENSE for more details """ import pyexcel_io.constants as constants XLS_PLUGIN = "pyexcel-xls" XLSX_PLUGIN = "pyexcel-xlsx" ODS_PLUGIN = "pyexcel-ods" ODS3_P...
27.958904
65
0.687898
""" pyexcel_io.utils ~~~~~~~~~~~~~~~~~~~ utility functions :copyright: (c) 2014-2017 by Onni Software Ltd. :license: New BSD License, see LICENSE for more details """ import pyexcel_io.constants as constants XLS_PLUGIN = "pyexcel-xls" XLSX_PLUGIN = "pyexcel-xlsx" ODS_PLUGIN = "pyexcel-ods" ODS3_P...
0
0
0
0
0
306
0
0
23
6b829467b894c5cb437c1071179fbb9d72d5b88b
11,431
py
Python
test_cube_solution.py
noreallyimfine/Rubiks-Cube
5d6bdffb2f1554453de94e5ea3efd2fc5db75a8a
[ "MIT" ]
1
2020-07-08T14:14:26.000Z
2020-07-08T14:14:26.000Z
test_cube_solution.py
noreallyimfine/Rubiks-Cube
5d6bdffb2f1554453de94e5ea3efd2fc5db75a8a
[ "MIT" ]
null
null
null
test_cube_solution.py
noreallyimfine/Rubiks-Cube
5d6bdffb2f1554453de94e5ea3efd2fc5db75a8a
[ "MIT" ]
null
null
null
import unittest # rename that class if __name__ == '__main__': unittest.main()
47.235537
107
0.682442
import unittest from cube import RubiksCube # rename that class class CubeSolutionTests(unittest.TestCase): def setUp(self): self.cube = RubiksCube() # test solution funcs <- make sure the tests arent interfering with each other def bottom_face_tester(self): self.assertTrue(all(self.cube.bot...
0
0
0
11,295
0
0
0
6
44
6c005a2859950869af5dc5c3f85c80d99083f121
1,824
py
Python
chap6/mysequence.py
marble-git/python-laoqi
74c4bb5459113e54ce64443e5da5a9c6a3052d6a
[ "MIT" ]
null
null
null
chap6/mysequence.py
marble-git/python-laoqi
74c4bb5459113e54ce64443e5da5a9c6a3052d6a
[ "MIT" ]
null
null
null
chap6/mysequence.py
marble-git/python-laoqi
74c4bb5459113e54ce64443e5da5a9c6a3052d6a
[ "MIT" ]
null
null
null
#coding:utf-8 ''' filename:mysequence.py chap:6 subject:20 conditions:inherit collections.abc.Sequence solution:class MySequence ''' if __name__ == '__main__': l = [1,2,(3,4,55),{'a','b'},{(11,11):111,'name':'laoqi'},(33,5),62,'python',9,'age'] a = MySequence(l) print(...
25.690141
88
0.514803
#coding:utf-8 ''' filename:mysequence.py chap:6 subject:20 conditions:inherit collections.abc.Sequence 新容器内的对象必须按照一定顺序排列 solution:class MySequence ''' import collections import numbers class MySequence(collections.abc.Sequence): '''必要方法 __getitem__,__len__''' def __init__(...
93
1,011
0
351
0
0
0
-10
68
dd363973ab415042f38d53ecd6eb3ea142076116
1,924
py
Python
src/syncro/__main__.py
cav71/syncro
2591dd1bd14b7b4bf2a8b2f0099c1d5140679d10
[ "MIT" ]
null
null
null
src/syncro/__main__.py
cav71/syncro
2591dd1bd14b7b4bf2a8b2f0099c1d5140679d10
[ "MIT" ]
null
null
null
src/syncro/__main__.py
cav71/syncro
2591dd1bd14b7b4bf2a8b2f0099c1d5140679d10
[ "MIT" ]
null
null
null
"""starts a sync remote server """ import logging from . import cli import paramiko import syncro.support as support import syncro.cli as cli logger = logging.getLogger(__name__) # @cli.add_logging() # def two(*args, **kwargs): # print("two", args, kwargs) # # @cli.add_logging(1, b=2) # def three(*args, **...
22.904762
74
0.680873
"""starts a sync remote server """ import os import getpass import pathlib import logging import click from . import cli import paramiko import paramiko.sftp_client import syncro.support as support import syncro.cli as cli logger = logging.getLogger(__name__) def add_arguments(parser): parser.add_argument("h...
0
673
0
0
0
674
0
-29
203
487ca8a68ee1d0de5cfebc5f311c950769200bd2
2,777
py
Python
maths/3n_plus_1.py
zhaiyu-cn/Python
30de2de32983524cbdacdc4b8949f381ca2ca347
[ "MIT" ]
null
null
null
maths/3n_plus_1.py
zhaiyu-cn/Python
30de2de32983524cbdacdc4b8949f381ca2ca347
[ "MIT" ]
null
null
null
maths/3n_plus_1.py
zhaiyu-cn/Python
30de2de32983524cbdacdc4b8949f381ca2ca347
[ "MIT" ]
null
null
null
from typing import List, Tuple #fenzhi1xiugai def n31(a: int) -> Tuple[List[int], int]: """ Returns the Collatz sequence and its length of any positive integer. >>> n31(4) ([4, 2, 1], 3) """ if not isinstance(a, int): raise TypeError("Must be int, not {}".format(type(a).__name__)) ...
18.513333
83
0.28556
from typing import List, Tuple #fenzhi1xiugai def n31(a: int) -> Tuple[List[int], int]: """ Returns the Collatz sequence and its length of any positive integer. >>> n31(4) ([4, 2, 1], 3) """ if not isinstance(a, int): raise TypeError("Must be int, not {}".format(type(a).__name__)) ...
0
0
0
0
0
0
0
0
0
59c21007badf4ffd4068a898ea5b167e3df042ed
1,949
py
Python
trees/preprocessing.py
tejasvaidhyadev/PCFG_rules
3138bb2aa7ea098478b4b318b6b1b1872ec6ecfb
[ "MIT" ]
1
2021-04-18T16:35:47.000Z
2021-04-18T16:35:47.000Z
trees/preprocessing.py
tejasvaidhyadev/PCFG_rules
3138bb2aa7ea098478b4b318b6b1b1872ec6ecfb
[ "MIT" ]
null
null
null
trees/preprocessing.py
tejasvaidhyadev/PCFG_rules
3138bb2aa7ea098478b4b318b6b1b1872ec6ecfb
[ "MIT" ]
null
null
null
import argparse import pandas as pandas parser = argparse.ArgumentParser() parser.add_argument('--infile', default='./ptb-collins.merge.txt', help="preprocessing tree") #parser.add_argument('--seed', type=int, default=2004, help="random seed for initialization") parser.add_argument('--outfile', default='./process...
33.033898
107
0.554643
from nltk import Tree import nltk import argparse import pandas as pandas import pandas as pd def get_brac_ind(word): for i, brac in enumerate(word): if brac ==')': return(i) def rmsym(sym, tokens): if sym in tokens: if ')'in tokens: index_barc = get_brac_ind(tokens.sp...
0
0
0
0
0
408
0
-12
111
c568f9e20ad8595c2d19bead8e9a491e14ea46ac
6,792
py
Python
fedjax/aggregators/walsh_hadamard.py
dedsec-9/fedjax
1f577ab4d9aa494d2a73ed541efbb92eab350551
[ "Apache-2.0" ]
null
null
null
fedjax/aggregators/walsh_hadamard.py
dedsec-9/fedjax
1f577ab4d9aa494d2a73ed541efbb92eab350551
[ "Apache-2.0" ]
null
null
null
fedjax/aggregators/walsh_hadamard.py
dedsec-9/fedjax
1f577ab4d9aa494d2a73ed541efbb92eab350551
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
33.294118
80
0.687574
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
9
3,224
0
0
0
0
0
-3
69
4638dc42bbd3edbdee5a59f874300563a19d6c35
939
py
Python
sweeper/tests/test_scheduler.py
dominoFire/sweeper
26c5497b81c8d0c50671f8ab75c1cf5c4c8191c9
[ "MIT" ]
null
null
null
sweeper/tests/test_scheduler.py
dominoFire/sweeper
26c5497b81c8d0c50671f8ab75c1cf5c4c8191c9
[ "MIT" ]
null
null
null
sweeper/tests/test_scheduler.py
dominoFire/sweeper
26c5497b81c8d0c50671f8ab75c1cf5c4c8191c9
[ "MIT" ]
null
null
null
import sweeper.utils as utils import unittest from pprint import PrettyPrinter pp = PrettyPrinter(indent=1) if __name__ == '__main__': unittest.main()
33.535714
96
0.759318
import sweeper.utils as utils import unittest from pprint import PrettyPrinter from scheduler.manager import create_schedule_plan from sweeper import Workflow pp = PrettyPrinter(indent=1) class SchedulerTest(unittest.TestCase): def test(self): wf = Workflow.read_workflow('examples/weird/workflow.yaml') ...
0
0
0
676
0
0
0
36
67
3602939acb4e7b232af47d615a2aed96778a8add
167
py
Python
REST API - Tensorflow/config/config.py
mauryas/DataScienceTasks
78cd4c47067101128de668a641b999d6fb406ab8
[ "MIT" ]
null
null
null
REST API - Tensorflow/config/config.py
mauryas/DataScienceTasks
78cd4c47067101128de668a641b999d6fb406ab8
[ "MIT" ]
null
null
null
REST API - Tensorflow/config/config.py
mauryas/DataScienceTasks
78cd4c47067101128de668a641b999d6fb406ab8
[ "MIT" ]
null
null
null
BATCH_SIZE = 128 NUM_CLASSES = 10 EPOCHS = 20 # input image dimensions IMG_ROWS, IMG_COLS = 28, 28 # set if false if you want to use trained weights TO_TRAIN = True
16.7
49
0.742515
BATCH_SIZE = 128 NUM_CLASSES = 10 EPOCHS = 20 # input image dimensions IMG_ROWS, IMG_COLS = 28, 28 # set if false if you want to use trained weights TO_TRAIN = True
0
0
0
0
0
0
0
0
0
047a54b42de14b71ab0ea40349265e16014ece76
1,782
py
Python
exam/test_mcmc.py
odell/pyazr
3ea6a1f28b034fb56527b1d5f33b544ea3e53893
[ "MIT" ]
null
null
null
exam/test_mcmc.py
odell/pyazr
3ea6a1f28b034fb56527b1d5f33b544ea3e53893
[ "MIT" ]
null
null
null
exam/test_mcmc.py
odell/pyazr
3ea6a1f28b034fb56527b1d5f33b544ea3e53893
[ "MIT" ]
null
null
null
''' Calculates the 13C(a,n) cross section "Free" parameters: * partial width BGP (1/2+, neutron) * level energy (3/2+) * partial width (3/2+, neutron) * partial width (3/2+, alpha) ''' import os from multiprocessing import Pool import emcee import numpy as np from scipy import...
33.622642
84
0.665544
''' Calculates the 13C(a,n) cross section "Free" parameters: * partial width BGP (1/2+, neutron) * level energy (3/2+) * partial width (3/2+, neutron) * partial width (3/2+, alpha) ''' import os import sys from multiprocessing import Pool import emcee import numpy as np from s...
0
0
0
0
0
0
0
-11
22
40a3cc3ff516f442d1318816c63a4b6b1747419f
886
py
Python
tests/acceptance/test_FuzzerHeaders.py
AntonKuzminRussia/web-scout
5b8fed2c5917c9ecc210052703a65f1204f4b347
[ "MIT" ]
6
2017-10-11T18:56:05.000Z
2019-09-29T21:45:05.000Z
tests/acceptance/test_FuzzerHeaders.py
AntonKuzminRussia/web-scout
5b8fed2c5917c9ecc210052703a65f1204f4b347
[ "MIT" ]
3
2021-03-31T19:17:30.000Z
2021-12-13T20:16:23.000Z
tests/acceptance/test_FuzzerHeaders.py
AntonKuzminRussia/web-scout
5b8fed2c5917c9ecc210052703a65f1204f4b347
[ "MIT" ]
null
null
null
import os runPath = os.path.realpath(os.path.dirname(os.path.abspath(__file__)) + '/../../')
27.6875
82
0.602709
import subprocess import os import time import re runPath = os.path.realpath(os.path.dirname(os.path.abspath(__file__)) + '/../../') class Test_FuzzerHeaders(object): dict_path = '/tmp/wstest.dict' headers_file_path = '/tmp/wstest.headers_file' conf_file_path = "/tmp/wstest.conf_file" def get_result...
0
0
0
728
0
0
0
-26
89
938061deb839871bf82a14d5f17af8030ecc81be
1,070
py
Python
benchmarks/test_memory.py
TheRakeshPurohit/wasmer-python
2375974d9dc50a2caf29fdd9e07d49fd94537e03
[ "MIT" ]
900
2019-04-11T01:52:10.000Z
2020-09-02T11:09:14.000Z
benchmarks/test_memory.py
TheRakeshPurohit/wasmer-python
2375974d9dc50a2caf29fdd9e07d49fd94537e03
[ "MIT" ]
172
2019-04-15T18:04:55.000Z
2020-09-01T15:20:06.000Z
benchmarks/test_memory.py
TheRakeshPurohit/wasmer-python
2375974d9dc50a2caf29fdd9e07d49fd94537e03
[ "MIT" ]
28
2019-04-11T02:49:04.000Z
2020-08-27T09:47:49.000Z
from wasmer import wat2wasm TEST_BYTES = wat2wasm( """ (module (memory 16) (export "memory" (memory 0))) """ )
24.318182
60
0.686916
from wasmer import engine, wat2wasm, Store, Module, Instance from wasmer_compiler_cranelift import Compiler TEST_BYTES = wat2wasm( """ (module (memory 16) (export "memory" (memory 0))) """ ) def test_benchmark_memory_view_int8_get(benchmark): store = Store(engine.JIT(Compiler)) mod...
0
0
0
0
0
781
0
58
91
cde51dd207e4af6daac2687ccc96ff083f646eea
84
py
Python
min_cost.py
shahjaidev/xbin_gemini_baselines
9476ed3d3877f911368b9156ca1d8801a5fc7307
[ "BSD-3-Clause" ]
null
null
null
min_cost.py
shahjaidev/xbin_gemini_baselines
9476ed3d3877f911368b9156ca1d8801a5fc7307
[ "BSD-3-Clause" ]
4
2020-09-25T22:40:36.000Z
2022-02-09T23:38:58.000Z
min_cost.py
shahjaidev/xbin_gemini_baselines
9476ed3d3877f911368b9156ca1d8801a5fc7307
[ "BSD-3-Clause" ]
null
null
null
A[p]= max( A[i]+ A[i:j]+ f(j,p) + f(i,p) ) +f(1,p) for p in range(N):
7.636364
52
0.369048
A[p]= max( A[i]+ A[i:j]+ f(j,p) + f(i,p) ) +f(1,p) for p in range(N):
0
0
0
0
0
0
0
0
0
54a1ba6b641654089ce1618dad8a300fe120c52f
586
py
Python
remove.py
bopde/Texter
5a23a9b8c14a5abb12eac70fabe0e9c6d193ccba
[ "MIT" ]
null
null
null
remove.py
bopde/Texter
5a23a9b8c14a5abb12eac70fabe0e9c6d193ccba
[ "MIT" ]
1
2020-09-06T03:53:52.000Z
2020-09-06T03:53:52.000Z
remove.py
bopde/Texter
5a23a9b8c14a5abb12eac70fabe0e9c6d193ccba
[ "MIT" ]
1
2020-09-06T03:51:44.000Z
2020-09-06T03:51:44.000Z
if __name__ == '__main__': remove_lines() print ("done")
25.478261
68
0.607509
def count_lines(file='no_line_script.txt'): with open(file, 'r') as file: for index, line in enumerate(file): pass file.close() return index + 1 def remove_lines(original='mormon.txt', empty='no_line_script.txt'): script = open(original, 'r') empty_script = open(empty, 'w') ...
0
0
0
0
0
473
0
0
46
75bd145742ea44d33d3e21c667730b8c00552cde
126
py
Python
verify/checker/agc050/d.py
naskya/testcase-generator
02765184a275152e1d8c177f2028ca8db315cfee
[ "MIT" ]
4
2020-09-23T07:11:41.000Z
2022-02-02T09:08:21.000Z
verify/checker/agc050/d.py
naskya/testcase-generator
02765184a275152e1d8c177f2028ca8db315cfee
[ "MIT" ]
5
2021-08-29T18:23:01.000Z
2021-11-20T03:53:19.000Z
verify/checker/agc050/d.py
naskya/testcase-generator
02765184a275152e1d8c177f2028ca8db315cfee
[ "MIT" ]
null
null
null
if __name__ == '__main__': main()
15.75
36
0.492063
def main() -> None: N, K = map(int, input().split()) assert 1 <= K <= N <= 40 if __name__ == '__main__': main()
0
0
0
0
0
64
0
0
22
08a9caf7d6dc3a83ef5b08f80bf1f2c48969b19c
15,333
py
Python
tmglow/utils/parallel.py
zabaras/deep-turbulence
0daca5daada449d4ba16bce37b703e20b444b6bc
[ "MIT" ]
20
2020-12-01T14:58:01.000Z
2022-03-15T07:40:10.000Z
tmglow/utils/parallel.py
zabaras/deep-turbulence
0daca5daada449d4ba16bce37b703e20b444b6bc
[ "MIT" ]
2
2021-06-05T14:29:42.000Z
2022-03-04T15:57:40.000Z
tmglow/utils/parallel.py
zabaras/deep-turbulence
0daca5daada449d4ba16bce37b703e20b444b6bc
[ "MIT" ]
4
2020-09-04T06:11:04.000Z
2021-09-05T10:47:16.000Z
''' Utilities for training TM-Glow in parallel as well as calculating the loss in parallel on different GPUs for memory purposes. Original Implementation by Zhang, Rutgers University https://medium.com/huggingface/training-larger-batches-practical-tips-on-1-gpu-multi-gpu-distributed-setups-ec88c3e51255 ===== Distribut...
42.239669
120
0.640579
''' Utilities for training TM-Glow in parallel as well as calculating the loss in parallel on different GPUs for memory purposes. Original Implementation by Zhang, Rutgers University https://medium.com/huggingface/training-larger-batches-practical-tips-on-1-gpu-multi-gpu-distributed-setups-ec88c3e51255 ===== Distribut...
6
1,269
0
6,676
0
2,792
0
210
469
f16f4e21ca23bc2e9efafc489ea9440792f4eb81
692
py
Python
scripts/b2/attack.py
wwu-pdx/web-ctf
82774af40f613e99568d44cd83ea564e4ee68711
[ "MIT" ]
null
null
null
scripts/b2/attack.py
wwu-pdx/web-ctf
82774af40f613e99568d44cd83ea564e4ee68711
[ "MIT" ]
null
null
null
scripts/b2/attack.py
wwu-pdx/web-ctf
82774af40f613e99568d44cd83ea564e4ee68711
[ "MIT" ]
null
null
null
import requests #possible creds generated by level #one of them is valid for one of your web app from credentials import creds #url='http://YOUR_INTERNAL_IP/login' urls=['http://10.138.0.58/login', 'http://10.138.0.59/login','http://10.138.0.60/login'] for url in urls: for u in creds: #prepare data for post...
27.68
88
0.683526
import requests #possible creds generated by level #one of them is valid for one of your web app from credentials import creds #url='http://YOUR_INTERNAL_IP/login' urls=['http://10.138.0.58/login', 'http://10.138.0.59/login','http://10.138.0.60/login'] for url in urls: for u in creds: #prepare data for post...
0
0
0
0
0
0
0
0
0
24ce65a8b75a7d0851bf08b90abe4613dff6d004
508
py
Python
Diena_8_dictionaries/d8_s28_u1.py
MarisKuz/Python-RTU
12261d06dc81fa0d98190ca0eb5133d43d517070
[ "MIT" ]
8
2020-08-31T16:10:54.000Z
2021-11-24T06:37:37.000Z
Diena_8_dictionaries/d8_s28_u1.py
MarisKuz/Python-RTU
12261d06dc81fa0d98190ca0eb5133d43d517070
[ "MIT" ]
8
2021-06-08T22:30:29.000Z
2022-03-12T00:48:55.000Z
Diena_8_dictionaries/d8_s28_u1.py
MarisKuz/Python-RTU
12261d06dc81fa0d98190ca0eb5133d43d517070
[ "MIT" ]
12
2020-09-28T17:06:52.000Z
2022-02-17T12:12:46.000Z
from collections import Counter text = "hubba bubba" # def get_char_count(text): # letters = {} # for letter in text: # letters[letter] = text.count(letter) # hidden loop in count # return letters print(get_char_count(text)) count = Counter(text) print(count) print(count.most_comm...
20.32
74
0.596457
from collections import Counter text = "hubba bubba" # def get_char_count(text): # letters = {} # for letter in text: # letters[letter] = text.count(letter) # hidden loop in count # return letters def get_char_count(text): res_dict = {} for c in text: if c in res_dic...
0
0
0
0
0
159
0
0
23
5a6aa7950ba84c32fc870d83a6d609d56f3f0e05
3,665
py
Python
unit_tests/test_file_accessor.py
LIN810116/neuroglancer-scripts
803768d0d550261efa508896eabf55f964cb16c9
[ "MIT" ]
20
2017-09-19T10:18:06.000Z
2022-02-28T23:08:48.000Z
unit_tests/test_file_accessor.py
stephen-zhouyang/neuroglancer-scripts
3aa2591f3c9710fa0dae930e6270a3397345bf09
[ "MIT" ]
18
2017-09-27T11:20:22.000Z
2022-02-08T09:12:18.000Z
unit_tests/test_file_accessor.py
stephen-zhouyang/neuroglancer-scripts
3aa2591f3c9710fa0dae930e6270a3397345bf09
[ "MIT" ]
15
2017-03-17T12:56:28.000Z
2022-02-16T17:59:58.000Z
# Copyright (c) 2018 Forschungszentrum Juelich GmbH # Author: Yann Leprince <y.leprince@fz-juelich.de> # # This software is made available under the MIT licence, see LICENCE.txt.
35.931373
73
0.690859
# Copyright (c) 2018 Forschungszentrum Juelich GmbH # Author: Yann Leprince <y.leprince@fz-juelich.de> # # This software is made available under the MIT licence, see LICENCE.txt. import pathlib import pytest from neuroglancer_scripts.file_accessor import FileAccessor from neuroglancer_scripts.accessor import ( D...
0
790
0
0
0
2,441
0
68
183
fc0bcb37fa10554fd99039b30774a06ba241b342
1,761
py
Python
public/shader/220303_1752.py
pome-ta/soundShader4twigl
abdb42fbda96981e8c2d71696f4f76049796ffad
[ "MIT" ]
null
null
null
public/shader/220303_1752.py
pome-ta/soundShader4twigl
abdb42fbda96981e8c2d71696f4f76049796ffad
[ "MIT" ]
null
null
null
public/shader/220303_1752.py
pome-ta/soundShader4twigl
abdb42fbda96981e8c2d71696f4f76049796ffad
[ "MIT" ]
null
null
null
// //# https://thebookofshaders.com/05/kynd.png #define BPM 90.0 const float PI = acos(-1.0); const float TAU = PI * 2.0; /* sound common */ float timeToBeat(float t) {return t / 60.0 * BPM;} float beatToTime(float b) {return b / BPM * 60.0;} float sine(float phase) { return sin(TAU * phase); } float pitch(floa...
24.123288
93
0.508234
// シェーダー空手のやつ //# https://thebookofshaders.com/05/kynd.png #define BPM 90.0 const float PI = acos(-1.0); const float TAU = PI * 2.0; /* sound common */ float timeToBeat(float t) {return t / 60.0 * BPM;} float beatToTime(float b) {return b / BPM * 60.0;} float sine(float phase) { return sin(TAU * phase); } float ...
30
0
0
0
0
0
0
0
0
5b92ff2f553aa52e41855cc180f1b6e34b52287c
5,310
py
Python
moto/ebs/responses.py
andormarkus/moto
67cda6d7d6f42118ccd7e2170e7ff0a1f92fa6a6
[ "Apache-2.0" ]
null
null
null
moto/ebs/responses.py
andormarkus/moto
67cda6d7d6f42118ccd7e2170e7ff0a1f92fa6a6
[ "Apache-2.0" ]
null
null
null
moto/ebs/responses.py
andormarkus/moto
67cda6d7d6f42118ccd7e2170e7ff0a1f92fa6a6
[ "Apache-2.0" ]
null
null
null
"""Handles incoming ebs requests, invokes methods, returns responses."""
36.122449
130
0.593597
"""Handles incoming ebs requests, invokes methods, returns responses.""" import json from moto.core.responses import BaseResponse from .models import ebs_backends class EBSResponse(BaseResponse): """Handler for EBS requests and responses.""" @property def ebs_backend(self): """Return backend ins...
0
120
0
5,002
0
0
0
24
90
b0411ae28aa8350a4d5efdcf252faf88416873a6
795
py
Python
netmiko/centec/centec_os.py
josephwhite13/netmiko
c08c5ebb3484383f034e22b9576f88be07525f72
[ "MIT" ]
2
2021-07-15T17:55:55.000Z
2021-07-25T23:56:12.000Z
netmiko/centec/centec_os.py
rockenwind/netmiko
24291029d0cdd5af660475ac1093a2dcd1c08af2
[ "MIT" ]
1
2020-12-29T13:14:54.000Z
2020-12-29T13:14:54.000Z
netmiko/centec/centec_os.py
rockenwind/netmiko
24291029d0cdd5af660475ac1093a2dcd1c08af2
[ "MIT" ]
1
2022-01-28T00:51:41.000Z
2022-01-28T00:51:41.000Z
"""Centec OS Support"""
25.645161
76
0.681761
"""Centec OS Support""" from netmiko.cisco_base_connection import CiscoBaseConnection import time class CentecOSBase(CiscoBaseConnection): def session_preparation(self): """Prepare the session after the connection has been established.""" self._test_channel_read(pattern=r"[>#]") self.set_b...
0
0
0
625
0
0
0
30
113