hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
248
max_forks_repo_name
stringlengths
5
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
248892eac1e0a2c6110682fef0f6ec29d697f548
11,432
py
Python
main_big.py
giorgosouz/HSI-classification-using-state-of-the-art-models
a925972ffe02c2cd1e5dde2b163e1faa854a4966
[ "MIT" ]
null
null
null
main_big.py
giorgosouz/HSI-classification-using-state-of-the-art-models
a925972ffe02c2cd1e5dde2b163e1faa854a4966
[ "MIT" ]
null
null
null
main_big.py
giorgosouz/HSI-classification-using-state-of-the-art-models
a925972ffe02c2cd1e5dde2b163e1faa854a4966
[ "MIT" ]
null
null
null
import torch import torch.utils.data as data from torchsummary import summary from datasets import get_dataset, HyperX,sHyperX from models import get_model, train,test from utils import sample_gt,get_device,metrics,compute_imf_weights import visdom import argparse import numpy as np import cv2 from models_liu import t...
34.33033
121
0.616253
0
0
0
0
0
0
0
0
4,657
0.407365
2489073f0eab3875094f768945e495da336cb50f
10,743
py
Python
parikh-et-al-and-bilstm-max-pool/trainer.py
apsdehal/nli-batch-optimizations
946dbeae58edd39dcda948d03765f7b1070b4eab
[ "MIT" ]
4
2017-12-25T21:55:07.000Z
2020-05-09T00:18:39.000Z
parikh-et-al-and-bilstm-max-pool/trainer.py
apsdehal/nli-batch-optimizations
946dbeae58edd39dcda948d03765f7b1070b4eab
[ "MIT" ]
null
null
null
parikh-et-al-and-bilstm-max-pool/trainer.py
apsdehal/nli-batch-optimizations
946dbeae58edd39dcda948d03765f7b1070b4eab
[ "MIT" ]
1
2018-08-01T19:36:04.000Z
2018-08-01T19:36:04.000Z
import torch import matplotlib.pyplot as plt import numpy as np import time from torch import optim, nn from torch.autograd import Variable from torch.utils.data import DataLoader from tensorboardX import SummaryWriter from models.DecomposableAttention import DecomposableAttention from models.BiLSTMMaxPooling import ...
43.318548
79
0.543051
10,322
0.960812
0
0
0
0
0
0
1,099
0.102299
248941d967a1b7d873ad7da541cea91f968f8222
954
py
Python
plusy/spiders/gov_sbir_news.py
OracleGao/plusy
756ed8fe932255ffcf7eed2afdc0b83a85a7548e
[ "Apache-2.0" ]
null
null
null
plusy/spiders/gov_sbir_news.py
OracleGao/plusy
756ed8fe932255ffcf7eed2afdc0b83a85a7548e
[ "Apache-2.0" ]
null
null
null
plusy/spiders/gov_sbir_news.py
OracleGao/plusy
756ed8fe932255ffcf7eed2afdc0b83a85a7548e
[ "Apache-2.0" ]
null
null
null
import scrapy class GovSbirNewsSpider(scrapy.Spider): name = 'gov.sbir.news' start_urls = ["https://www.sbir.gov/news?page=0"] def __init__(self): for page_num in range(1, 23): self.start_urls.append("https://www.sbir.gov/news?page=%d" % page_num) def parse(self, response): ...
39.75
107
0.5587
938
0.983229
665
0.697065
0
0
0
0
324
0.339623
248b843beb808fda7506840e01537e62bc25f9dc
4,697
py
Python
schedule/forms.py
yourcelf/masterschedule
e585df0e9edcaff5fa4f04f77a9452e3073b5db7
[ "Unlicense" ]
1
2015-02-11T04:08:36.000Z
2015-02-11T04:08:36.000Z
schedule/forms.py
yourcelf/masterschedule
e585df0e9edcaff5fa4f04f77a9452e3073b5db7
[ "Unlicense" ]
null
null
null
schedule/forms.py
yourcelf/masterschedule
e585df0e9edcaff5fa4f04f77a9452e3073b5db7
[ "Unlicense" ]
null
null
null
from django import forms from django.forms.models import inlineformset_factory from django.contrib.auth.models import User from django.core.exceptions import ValidationError from schedule.models import * class PersonForm(forms.ModelForm): class Meta: model = Person fields = ['name'] class Availab...
36.410853
103
0.593996
4,335
0.92293
0
0
0
0
0
0
668
0.142218
248c03c5a5264e6cc191535d9e3e4549482f8114
6,922
py
Python
chromewhip/protocol/domstorage.py
spinda/chromewhip
4c8089441f0767b91840abf6a076e9f65c83bdbc
[ "MIT" ]
97
2017-07-22T13:12:36.000Z
2021-03-20T04:03:27.000Z
chromewhip/protocol/domstorage.py
spinda/chromewhip
4c8089441f0767b91840abf6a076e9f65c83bdbc
[ "MIT" ]
15
2017-07-20T06:33:01.000Z
2020-11-06T15:36:18.000Z
chromewhip/protocol/domstorage.py
spinda/chromewhip
4c8089441f0767b91840abf6a076e9f65c83bdbc
[ "MIT" ]
12
2017-11-30T17:46:53.000Z
2020-10-01T17:57:19.000Z
# noinspection PyPep8 # noinspection PyArgumentList """ AUTO-GENERATED BY `scripts/generate_protocol.py` using `data/browser_protocol.json` and `data/js_protocol.json` as inputs! Please do not modify this file. """ import logging from typing import Any, Optional, Union from chromewhip.helpers import PayloadMixin, Ba...
28.138211
92
0.522103
6,448
0.931523
0
0
3,731
0.539006
0
0
1,597
0.230714
248c8297f74d6ca704f6d94c24827c0ddf886723
1,909
py
Python
scripts/deprecated/sample_dataset_to_csv.py
dwlmt/Story-Untangling
c56354e305f06a508b63b913989ff8856e4db5b6
[ "Unlicense" ]
7
2020-09-12T22:32:33.000Z
2022-02-07T08:37:04.000Z
scripts/deprecated/sample_dataset_to_csv.py
dwlmt/Story-Untangling
c56354e305f06a508b63b913989ff8856e4db5b6
[ "Unlicense" ]
2
2021-08-31T15:46:16.000Z
2021-09-01T15:19:52.000Z
scripts/deprecated/sample_dataset_to_csv.py
dwlmt/Story-Untangling
c56354e305f06a508b63b913989ff8856e4db5b6
[ "Unlicense" ]
1
2021-06-02T09:33:27.000Z
2021-06-02T09:33:27.000Z
import argparse import csv import dataset engine_kwargs = {"pool_recycle": 3600, "connect_args": {'timeout': 300, "check_same_thread": False}} def sample_stories(args): print(args) database = args["database"] dataset_db = f"sqlite:///{database}" csv_lines = [] with dataset.connect(dataset_db,...
36.711538
110
0.660555
0
0
0
0
0
0
0
0
721
0.377685
248e74fc17487a62d2ff57515bb3b1c055682f33
967
py
Python
cli/setup.py
hipikat/hpk.io
f969f0ac3da9906f970ba70bc153dedb3962d347
[ "BSD-2-Clause" ]
1
2021-08-22T05:15:28.000Z
2021-08-22T05:15:28.000Z
cli/setup.py
hipikat/hpk.io
f969f0ac3da9906f970ba70bc153dedb3962d347
[ "BSD-2-Clause" ]
null
null
null
cli/setup.py
hipikat/hpk.io
f969f0ac3da9906f970ba70bc153dedb3962d347
[ "BSD-2-Clause" ]
null
null
null
"""pdjn - the CLI tool of Pidjn""" from setuptools import setup setup( name='pdjn', version='0.1', description="CLI tool for managing Pydjn sites", url='https://github.com/hipikat/hpk.io/tree/master/src/cli', license='ISC', author='Ada Wright', author_email='ada@hpk.io', py_modules=['...
28.441176
71
0.58635
0
0
0
0
0
0
0
0
627
0.648397
248f7384cfb08b1240e64c826352c311afba0e91
16,088
py
Python
LinkTap.py
simplextech/udi-linktap-poly
e51180aecf58e0453bfe444acd2b454e6d3df00d
[ "MIT" ]
2
2020-05-23T18:04:04.000Z
2020-06-22T11:29:03.000Z
LinkTap.py
simplextech/udi-linktap-poly
e51180aecf58e0453bfe444acd2b454e6d3df00d
[ "MIT" ]
11
2020-02-07T02:14:01.000Z
2021-05-03T21:35:01.000Z
LinkTap.py
simplextech/udi-linktap-poly
e51180aecf58e0453bfe444acd2b454e6d3df00d
[ "MIT" ]
1
2020-08-05T01:36:56.000Z
2020-08-05T01:36:56.000Z
#!/usr/bin/env python import sys import linktap import time import logging try: import polyinterface CLOUD = False except ImportError: import pgc_interface as polyinterface CLOUD = True LOGGER = polyinterface.LOGGER logging.getLogger('urllib3').setLevel(logging.INFO) class Controller(polyinterface...
40.422111
122
0.518585
15,440
0.959722
0
0
0
0
0
0
3,028
0.188215
248f8a8798b422e37a9e5b6af2d4bad26607f584
908
py
Python
src/note_passing.py
fizisist/numerical-methods-pdes
659045a19d8285f12447bb93401062c5e3666e18
[ "CC-BY-4.0", "MIT" ]
100
2016-01-18T21:25:55.000Z
2022-02-03T02:57:22.000Z
src/note_passing.py
QamarQQ/numerical-methods-pdes
d714a9fd2a94110bd0d7bffefb9043e010c4b7f2
[ "CC-BY-4.0", "MIT" ]
7
2016-01-28T04:19:31.000Z
2022-02-06T22:37:08.000Z
src/note_passing.py
QamarQQ/numerical-methods-pdes
d714a9fd2a94110bd0d7bffefb9043e010c4b7f2
[ "CC-BY-4.0", "MIT" ]
82
2016-01-18T23:44:21.000Z
2022-02-06T04:59:14.000Z
#!/usr/bin/env python # encoding: utf-8 """Note passing from Python""" from __future__ import absolute_import from __future__ import print_function from mpi4py import MPI import numpy comm = MPI.COMM_WORLD rank = comm.Get_rank() size = comm.Get_size() tag = 42 N = 10 if rank == 0: data = numpy.arange(N, dtype...
22.146341
56
0.656388
0
0
0
0
0
0
0
0
201
0.221366
24903ea9e622fd8f43c25fe974be2913277bb0c6
2,287
py
Python
metanic/settings/development.py
LimpidTech/melody
a00b99f9b697864a078e2cb886be4d75c10458a9
[ "BSD-3-Clause" ]
null
null
null
metanic/settings/development.py
LimpidTech/melody
a00b99f9b697864a078e2cb886be4d75c10458a9
[ "BSD-3-Clause" ]
1
2020-02-11T21:34:24.000Z
2020-02-11T21:34:24.000Z
metanic/settings/development.py
LimpidTech/melody
a00b99f9b697864a078e2cb886be4d75c10458a9
[ "BSD-3-Clause" ]
null
null
null
from metanic.settings.defaults import INSTALLED_APPS from metanic.settings.defaults import MIDDLEWARE from metanic.settings.defaults import REST_FRAMEWORK from metanic.settings.defaults import cache_url from metanic.settings.defaults import env_value from metanic.settings.defaults import project_path # We specificall...
25.131868
76
0.690861
0
0
0
0
0
0
0
0
991
0.433319
249344d6dc4af56e0d60cf084fb8f52348db6021
1,848
py
Python
sensordisplayProject/sensor/views.py
ylf2002/sensor_display
660751e461b1afbf0cd6fd97baa3f8bc05698848
[ "MIT" ]
null
null
null
sensordisplayProject/sensor/views.py
ylf2002/sensor_display
660751e461b1afbf0cd6fd97baa3f8bc05698848
[ "MIT" ]
null
null
null
sensordisplayProject/sensor/views.py
ylf2002/sensor_display
660751e461b1afbf0cd6fd97baa3f8bc05698848
[ "MIT" ]
null
null
null
from sensor.models import Sensors from sensor.serializers import TempSerializer from rest_framework import generics from django.shortcuts import render from django.http import JsonResponse # Create your views here. class sensors_api(generics.ListCreateAPIView): queryset = Sensors.objects.all() ser...
27.58209
117
0.487554
123
0.065987
0
0
0
0
0
0
145
0.07779
24940c4d857b6b4b4b8504450135355011f4c10c
950
py
Python
test/test_simple.py
RyanMillerC/encase
8ac041056b81cbb90be81a26116d58fbb6a6a3e9
[ "MIT" ]
null
null
null
test/test_simple.py
RyanMillerC/encase
8ac041056b81cbb90be81a26116d58fbb6a6a3e9
[ "MIT" ]
4
2018-07-12T18:21:21.000Z
2018-07-25T19:19:14.000Z
test/test_simple.py
RyanMillerC/encase
8ac041056b81cbb90be81a26116d58fbb6a6a3e9
[ "MIT" ]
1
2018-07-11T19:10:25.000Z
2018-07-11T19:10:25.000Z
""" Make sure to run with `python -m pytest` instead of `pytest`. That way the root project directory is added to sys.path. """ import pytest from encase import Encase def test_get_dot_notation(): e = Encase({'test': 'value'}) assert e.test == 'value' def test_set_dot_notation(): e = Encase() e.ne...
20.652174
66
0.627368
0
0
0
0
0
0
0
0
316
0.332632
2494ce1fcebe6e8abe15bb82c463b0e7baad0b3d
597
py
Python
authlib/common/__init__.py
jmrafael/Streamlit-Authentication
208e9d8f116d25d420f41b6d01c13f063052805b
[ "MIT" ]
25
2021-08-25T12:51:14.000Z
2022-03-29T22:56:21.000Z
authlib/common/__init__.py
jmrafael/Streamlit-Authentication
208e9d8f116d25d420f41b6d01c13f063052805b
[ "MIT" ]
6
2021-09-09T23:09:51.000Z
2022-03-11T11:11:23.000Z
authlib/common/__init__.py
jmrafael/Streamlit-Authentication
208e9d8f116d25d420f41b6d01c13f063052805b
[ "MIT" ]
7
2021-09-04T08:06:21.000Z
2022-03-07T23:40:02.000Z
from functools import wraps # Easy inteceptor for tracing def trace_activity(fn, trace=True): @wraps(fn) def wrapper(*args, **kwargs): if trace: print(f'TRACE: calling {fn.__name__}(), positional args: {args}, named args: {kwargs}') return fn(*args, **kwargs) return wrapper # E...
27.136364
99
0.666667
259
0.433836
0
0
197
0.329983
0
0
125
0.20938
24951f2ffee670ea65064f89e7a1aeb3eee4af1e
341
py
Python
rllab/torch/models/base.py
NeurIPSPaperSubmission7934/code_submission
713fce673e8e3ba30b559d4eebe6d3e4891069ed
[ "Apache-2.0" ]
null
null
null
rllab/torch/models/base.py
NeurIPSPaperSubmission7934/code_submission
713fce673e8e3ba30b559d4eebe6d3e4891069ed
[ "Apache-2.0" ]
null
null
null
rllab/torch/models/base.py
NeurIPSPaperSubmission7934/code_submission
713fce673e8e3ba30b559d4eebe6d3e4891069ed
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 Copyright holder of the paper Generative Adversarial Model Learning # submitted to NeurIPS 2019 for review # All rights reserved. class TorchModel(object): @property def normalized_input(self): raise NotImplementedError @property def normalized_output(self): raise...
24.357143
88
0.741935
188
0.55132
0
0
151
0.442815
0
0
148
0.434018
2495e93dc6a272797419348823761b57f910f2c3
5,798
py
Python
engagement/clearbit_engager.py
drorgarti/SatoriLab
6e57bad2c01d6ee8baa97f915abc001bed974785
[ "MIT" ]
1
2019-06-12T09:02:34.000Z
2019-06-12T09:02:34.000Z
engagement/clearbit_engager.py
drorgarti/SatoriLab
6e57bad2c01d6ee8baa97f915abc001bed974785
[ "MIT" ]
null
null
null
engagement/clearbit_engager.py
drorgarti/SatoriLab
6e57bad2c01d6ee8baa97f915abc001bed974785
[ "MIT" ]
null
null
null
from engagement.engager import Engager from engagement.engagement_exception import EngagementException from entities.acurerate_attributes import P, C from utils.acurerate_utils import AcureRateUtils import clearbit class ClearbitEngager(Engager): ACURATE_TRIAL_KEY = "sk_2a34f937f031587cb2bf4f6ee84a3c70" # Acur...
35.790123
115
0.625388
5,579
0.962228
0
0
0
0
0
0
1,306
0.22525
249661029b750065aec2931215cce553b6efc801
666
py
Python
knapsack/ratio.py
dstlmrk/knapsack
357c6b06cca4e743c2d3977d718346b97ee4b11a
[ "MIT" ]
null
null
null
knapsack/ratio.py
dstlmrk/knapsack
357c6b06cca4e743c2d3977d718346b97ee4b11a
[ "MIT" ]
null
null
null
knapsack/ratio.py
dstlmrk/knapsack
357c6b06cca4e743c2d3977d718346b97ee4b11a
[ "MIT" ]
null
null
null
from knapsack import Knapsack class Ratio(Knapsack): """ Ratio sorts all items by ratio of price and weight and adds them into bag step by step, if is it possible. """ def evaluate(self): price = 0 capacity = self.capacity configuration = [0 for i, val in enumerate(self.it...
27.75
65
0.584084
633
0.95045
0
0
0
0
0
0
126
0.189189
249c43ce612636beb782922b00342077fa5dc793
76
py
Python
example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/CODATA physical constants/N/nuclear magneton in inverse meters per tesla.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/CODATA physical constants/N/nuclear magneton in inverse meters per tesla.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/CODATA physical constants/N/nuclear magneton in inverse meters per tesla.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
1
2021-02-04T04:51:48.000Z
2021-02-04T04:51:48.000Z
constants.physical_constants["nuclear magneton in inverse meters per tesla"]
76
76
0.855263
0
0
0
0
0
0
0
0
46
0.605263
249ccac49aa2c5391984dfd6fbfac075310032ca
1,945
py
Python
scrapers/unhcr.py
OCHA-DAP/hdx-scraper-ukraine-viz
149a27c7b6dd3ae8807d063554867aea31f77a38
[ "MIT" ]
1
2022-03-20T21:00:22.000Z
2022-03-20T21:00:22.000Z
scrapers/unhcr.py
OCHA-DAP/hdx-scraper-ukraine-viz
149a27c7b6dd3ae8807d063554867aea31f77a38
[ "MIT" ]
null
null
null
scrapers/unhcr.py
OCHA-DAP/hdx-scraper-ukraine-viz
149a27c7b6dd3ae8807d063554867aea31f77a38
[ "MIT" ]
null
null
null
import logging from hdx.location.country import Country from hdx.scraper.base_scraper import BaseScraper logger = logging.getLogger(__name__) class UNHCR(BaseScraper): def __init__(self, datasetinfo, today, outputs, countryiso3s): super().__init__( "unhcr", datasetinfo, ...
34.122807
88
0.553728
1,798
0.924422
0
0
0
0
0
0
358
0.184062
249d017eb5799d5e056dbd1b6eb003f08d3ffb34
1,167
py
Python
ready_model.py
vitalProjects/curse_project
5768d7413db86b1d1054f0ff1102acfbea773fc7
[ "Apache-2.0" ]
1
2021-03-14T21:38:41.000Z
2021-03-14T21:38:41.000Z
ready_model.py
vitalfect/columnsAgent
5768d7413db86b1d1054f0ff1102acfbea773fc7
[ "Apache-2.0" ]
null
null
null
ready_model.py
vitalfect/columnsAgent
5768d7413db86b1d1054f0ff1102acfbea773fc7
[ "Apache-2.0" ]
null
null
null
from os.path import join import torch import config from models.attention_model import ZReader as ZReader_attn from models.fnet_model import ZReader as ZReader_fnet if __name__ == "__main__": str_true = "thehighwayroundsacurveandtransitionstondstreetrunningeastwardthroughmorefarmlandasthetrunklineappro" \ ...
46.68
119
0.700086
0
0
0
0
0
0
0
0
565
0.484147
249e34ad03f7c56a8da00f23fe94625ab7a19c26
907
py
Python
meza/__init__.py
SteadBytes/meza
ff1f881fc2a765b383535328456b380e75181b34
[ "MIT" ]
null
null
null
meza/__init__.py
SteadBytes/meza
ff1f881fc2a765b383535328456b380e75181b34
[ "MIT" ]
null
null
null
meza/__init__.py
SteadBytes/meza
ff1f881fc2a765b383535328456b380e75181b34
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ meza ~~~~ Provides methods for reading and processing data from tabular formatted files Attributes: CURRENCIES [tuple(unicode)]: Currency symbols to remove from decimal strings. ENCODING (str): Default file encoding. DEF...
25.194444
77
0.706725
0
0
0
0
0
0
0
0
542
0.595604
249e4e189863ccce071f3265d50900ed737a9d1d
3,590
py
Python
protein_ligand_contacts/contact_extraction/ifg.py
songlab-cal/contact-geometry
81cb7e56af7bccaf5b7f6dde52d9f2adbe89e8bd
[ "MIT" ]
2
2021-11-03T21:00:21.000Z
2021-11-06T21:27:53.000Z
protein_ligand_contacts/contact_extraction/ifg.py
songlab-cal/contact-geometry
81cb7e56af7bccaf5b7f6dde52d9f2adbe89e8bd
[ "MIT" ]
null
null
null
protein_ligand_contacts/contact_extraction/ifg.py
songlab-cal/contact-geometry
81cb7e56af7bccaf5b7f6dde52d9f2adbe89e8bd
[ "MIT" ]
null
null
null
from functional_groups import SMARTS_ATOM_MAP from typing import List, Tuple import numpy as np #typedef xyzcoord = Tuple[float, float, float] class iFG(): ''' iFG class to store information about ligand atoms that make up an iFG, mapping to amino acid residues, as well as the protein residues that inter...
31.769912
157
0.558496
3,442
0.958774
0
0
0
0
0
0
967
0.269359
249f953c98713e6e5275f3787508693400d14f46
1,806
py
Python
Other code/Rasterization Script/Python_RasterCalculator.py
Ange-lina/BalticOffshorePotential
fd8af87bfe0bc069fe1ec6fd1c9e175ff1a5a1d3
[ "MIT" ]
2
2020-01-16T17:35:27.000Z
2020-01-16T17:45:54.000Z
Other code/Rasterization Script/Python_RasterCalculator.py
Ange-lina/BalticOffshorePotential
fd8af87bfe0bc069fe1ec6fd1c9e175ff1a5a1d3
[ "MIT" ]
null
null
null
Other code/Rasterization Script/Python_RasterCalculator.py
Ange-lina/BalticOffshorePotential
fd8af87bfe0bc069fe1ec6fd1c9e175ff1a5a1d3
[ "MIT" ]
2
2020-01-17T09:15:26.000Z
2020-01-17T09:16:47.000Z
# -*- coding: utf-8 -*- """ Created on Mon Nov 11 13:35:09 2019 @author: Petronium """ # Import system modules import rasterio from rasterio.plot import show fp1 = r'Bathymetry_Clip.tif' fp2 = r'Shipping_Clip.tif' fp3 = r'WindMap_Clip.tif' bathymetry = rasterio.open(fp1) shipping = rasterio.open(fp2) windspeed = ra...
22.860759
89
0.630676
0
0
0
0
0
0
0
0
797
0.441307
249fac364e58fcf14bba9eca0fc8d066dd575ccd
3,651
py
Python
orders/viewmodels.py
XiaoBiaoBai/xiaobiaobai_api
409922a1406e6572c931f65be995ce12673cc0d4
[ "MIT" ]
null
null
null
orders/viewmodels.py
XiaoBiaoBai/xiaobiaobai_api
409922a1406e6572c931f65be995ce12673cc0d4
[ "MIT" ]
8
2020-06-05T18:15:44.000Z
2022-03-11T23:21:19.000Z
orders/viewmodels.py
XiaoBiaoBai/xiaobiaobai.api
409922a1406e6572c931f65be995ce12673cc0d4
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 """ @version: ?? @author: liangliangyy @license: MIT Licence @contact: liangliangyy@gmail.com @site: https://www.lylinux.net/ @software: PyCharm @file: viewmodels.py @time: 2018/6/9 上午1:28 """ from rest_framework import serializers from accounts.models import UserModel, WxUser...
43.987952
91
0.710216
3,029
0.826016
0
0
0
0
0
0
586
0.159804
24a01208af6498cbc0b92d10ddba2be689d325e7
460
py
Python
src/lobe/api_client.py
Pikamander2/lobe-python
c404a2883addcf12bee2c3c17ac55d4b7e4c7c9b
[ "MIT" ]
null
null
null
src/lobe/api_client.py
Pikamander2/lobe-python
c404a2883addcf12bee2c3c17ac55d4b7e4c7c9b
[ "MIT" ]
null
null
null
src/lobe/api_client.py
Pikamander2/lobe-python
c404a2883addcf12bee2c3c17ac55d4b7e4c7c9b
[ "MIT" ]
null
null
null
#!/usr/bin/env python import requests from PIL import Image from .image_utils import image_to_base64 from .results import ClassificationResult def send_image_predict_request(image: Image.Image, predict_url: str) -> ClassificationResult: payload = { "inputs": {"Image": image_to_base64(image)}, } r...
28.75
93
0.758696
0
0
0
0
0
0
0
0
36
0.078261
24a0d5e654f0958267ca0ad2c3247033e43da911
793
py
Python
sol/strings/2678 - Discagem por Voz.py
thiagojobson/PyURI
93a16c9a4cf4fc22e9f3f545a452fe26e7e761e3
[ "Unlicense" ]
null
null
null
sol/strings/2678 - Discagem por Voz.py
thiagojobson/PyURI
93a16c9a4cf4fc22e9f3f545a452fe26e7e761e3
[ "Unlicense" ]
null
null
null
sol/strings/2678 - Discagem por Voz.py
thiagojobson/PyURI
93a16c9a4cf4fc22e9f3f545a452fe26e7e761e3
[ "Unlicense" ]
null
null
null
# 2678 - Discagem por Voz # https://www.urionlinejudge.com.br/judge/pt/problems/view/2678 def decode(x): if x.isdigit() or x in "*#": return x elif x in "ABC": return "2" elif x in "DEF": return "3" elif x in "GHI": return "4" elif x in "DEF": return "3" ...
18.44186
63
0.489281
0
0
0
0
0
0
0
0
188
0.237074
24a317b44d00bea805342c6410ef02acf942e1c0
2,949
py
Python
app/tests/v1/test_meetups.py
mr-pagani/ADC-Questioner-API
e54f1cb8147d14f3e357c24dc2af2382f60bd1a4
[ "Unlicense" ]
null
null
null
app/tests/v1/test_meetups.py
mr-pagani/ADC-Questioner-API
e54f1cb8147d14f3e357c24dc2af2382f60bd1a4
[ "Unlicense" ]
1
2019-01-15T14:42:36.000Z
2019-01-15T14:42:36.000Z
app/tests/v1/test_meetups.py
mr-pagani/ADC-Questioner-API
e54f1cb8147d14f3e357c24dc2af2382f60bd1a4
[ "Unlicense" ]
null
null
null
import json from .base_test import BaseTestCase class TestMeetups(BaseTestCase): def test_post_meetups(self): with self.client: response = self.client.post( 'api/v1/meetups', data=json.dumps(dict( meetup_id=2, createdOn='12 SEP 2019', ...
37.329114
88
0.535775
2,898
0.982706
0
0
0
0
0
0
554
0.18786
24a456166df9f6ee81fe216b4721ba7faa8166b8
917
py
Python
setup.py
M3TIOR/pyside2-style-test
1000a00c44de90b1d9c2f2ae121ab127d1499ecd
[ "MIT" ]
1
2020-08-14T16:21:22.000Z
2020-08-14T16:21:22.000Z
setup.py
M3TIOR/pyside2-style-test
1000a00c44de90b1d9c2f2ae121ab127d1499ecd
[ "MIT" ]
1
2020-03-27T00:29:04.000Z
2020-03-27T05:59:18.000Z
setup.py
M3TIOR/pyside2-style-test
1000a00c44de90b1d9c2f2ae121ab127d1499ecd
[ "MIT" ]
null
null
null
import setuptools import pyside2_style_test as testkit with open("README.md", "r") as fh: long_description = fh.read() with open("requirements.txt", "r") as req: dependencies = req.read() setuptools.setup( name="m3-pyside2-style-test", version=testkit.__version__, author=testkit.__author__, auth...
29.580645
70
0.708833
0
0
0
0
0
0
0
0
375
0.408942
24a66bf1696cb9f471526fbe804dd1d34ee16f6b
1,446
py
Python
presidio-anonymizer/tests/test_anonymizer_result.py
kubistika/presidio
4777d1759e9bddc45317d9b2689e6df9f75eec05
[ "MIT" ]
null
null
null
presidio-anonymizer/tests/test_anonymizer_result.py
kubistika/presidio
4777d1759e9bddc45317d9b2689e6df9f75eec05
[ "MIT" ]
null
null
null
presidio-anonymizer/tests/test_anonymizer_result.py
kubistika/presidio
4777d1759e9bddc45317d9b2689e6df9f75eec05
[ "MIT" ]
null
null
null
from presidio_anonymizer.entities import AnonymizerResult from presidio_anonymizer.entities.anonymized_entity import AnonymizedEntity def test_when_no_params_then_object_initialised_correctly(): res = AnonymizerResult() assert res.text is None assert res.items == [] def test_when_correct_params_then_obj...
26.290909
75
0.70332
0
0
0
0
0
0
0
0
61
0.042185
24a6ceaa6ad3a63b821c739a4e853b4bfbbe8d5a
3,637
py
Python
train.py
rickgroen/cov-weighting
64c296679cd37e724a03c6dc107606f7048aec96
[ "MIT" ]
26
2021-01-05T07:10:31.000Z
2022-03-23T06:31:00.000Z
train.py
rickgroen/cov-weighting
64c296679cd37e724a03c6dc107606f7048aec96
[ "MIT" ]
6
2021-04-12T16:27:11.000Z
2022-02-09T07:00:15.000Z
train.py
rickgroen/cov-weighting
64c296679cd37e724a03c6dc107606f7048aec96
[ "MIT" ]
7
2021-03-08T09:28:05.000Z
2022-02-23T07:39:29.000Z
import time import torch # Project imports from utils import * from options import TrainOptions from data_loaders import create_dataloader from methods import create_method class Trainer: """ Trains any of the model methods in methods/ using any of the losses in losses/. Initialize the t...
32.765766
106
0.637613
2,928
0.805059
0
0
0
0
0
0
1,226
0.337091
24a6f16182dda0c0b9e74d9f007b1abeaf6547e8
1,272
py
Python
Versuch2/task3.4.py
Tobias-Schoch/SSS
f8b078ca7f6482fc7c89d5f9e784a549459eefb7
[ "MIT" ]
null
null
null
Versuch2/task3.4.py
Tobias-Schoch/SSS
f8b078ca7f6482fc7c89d5f9e784a549459eefb7
[ "MIT" ]
null
null
null
Versuch2/task3.4.py
Tobias-Schoch/SSS
f8b078ca7f6482fc7c89d5f9e784a549459eefb7
[ "MIT" ]
1
2022-01-06T12:47:53.000Z
2022-01-06T12:47:53.000Z
import numpy as np import cv2 # -------- Aufgabe3.4 -------- # # Vector um Grenz- und Breitenwert zu speichern vec = np.zeros((5, 2)) crop = ["crop1", "crop2", "crop3", "crop4", "crop5"] # Bild einlesen und in Schwarz - Weiß umwandeln image = cv2.imread('data/korrigiertes_bild2.png', cv2.IMREAD_GRAYSCALE) # Grenz- ...
25.959184
71
0.63522
0
0
0
0
0
0
0
0
724
0.566067
24a953522fba9a89dc6593417b426e4fb1e7cd77
197
py
Python
Logic-2/no_teen_sum.py
VivekM27/Coding-Bat-Python-Solutions
14d5c6ccaa2129e56a5898374dec60740fe6761b
[ "Apache-2.0" ]
null
null
null
Logic-2/no_teen_sum.py
VivekM27/Coding-Bat-Python-Solutions
14d5c6ccaa2129e56a5898374dec60740fe6761b
[ "Apache-2.0" ]
null
null
null
Logic-2/no_teen_sum.py
VivekM27/Coding-Bat-Python-Solutions
14d5c6ccaa2129e56a5898374dec60740fe6761b
[ "Apache-2.0" ]
null
null
null
# NO_TEEN_SUM def no_teen_sum(a, b, c): return fix_teen(a) + fix_teen(b) + fix_teen(c) def fix_teen(n): if (n == 15 or n == 16) or n<13 or n>19: return n elif n>12 and n<20: return 0
28.142857
52
0.609137
0
0
0
0
0
0
0
0
14
0.071066
24a9de62a34b58dfc19d30bea2ba3cdb517e09ee
944
py
Python
data_structures/Stack/stack/Python/stack.py
CarbonDDR/al-go-rithms
8e65affbe812931b7dde0e2933eb06c0f44b4130
[ "CC0-1.0" ]
1,253
2017-06-06T07:19:25.000Z
2022-03-30T17:07:58.000Z
data_structures/Stack/stack/Python/stack.py
rishabh99-rc/al-go-rithms
4df20d7ef7598fda4bc89101f9a99aac94cdd794
[ "CC0-1.0" ]
554
2017-09-29T18:56:01.000Z
2022-02-21T15:48:13.000Z
data_structures/Stack/stack/Python/stack.py
rishabh99-rc/al-go-rithms
4df20d7ef7598fda4bc89101f9a99aac94cdd794
[ "CC0-1.0" ]
2,226
2017-09-29T19:59:59.000Z
2022-03-25T08:59:55.000Z
'''This code is written MTH Junaidi github: Miranjunaidi on 26th Oct 2019 at 7:15 PM IST''' #POP function removes the last element of the list def pop(stack): del stack[-1] return stack #push function adds a new number num to the list at the end. def push(stack,num): stack.append(num) return stack #pr...
29.5
98
0.635593
0
0
0
0
0
0
0
0
507
0.537076
24aa08a1924956fa17aa4dbec0f66deb43113a38
1,390
py
Python
core/utils.py
kasittig/advent_of_code
e536bfbe0a9a05cbee2b9c241bc2fea78db4ee27
[ "MIT" ]
null
null
null
core/utils.py
kasittig/advent_of_code
e536bfbe0a9a05cbee2b9c241bc2fea78db4ee27
[ "MIT" ]
1
2021-12-18T03:11:27.000Z
2021-12-18T03:11:27.000Z
core/utils.py
kasittig/advent_of_code
e536bfbe0a9a05cbee2b9c241bc2fea78db4ee27
[ "MIT" ]
null
null
null
import os from collections import defaultdict from typing import Any, Dict, Iterable, List, Set, Union def validate_and_read_file(filepath: str) -> List[str]: if not os.path.exists(filepath): raise FileNotFoundError(f"Error: no file found at {filepath}") return open(filepath).readlines() def get_def...
27.8
75
0.67554
0
0
0
0
0
0
0
0
166
0.119424
24aa1693d704342ab69d496de49e45c690120868
426
py
Python
apps/lotus_auth/urls.py
sunmoon11/apilotus_django
115e9d0800751018f41ae8b9d85331d861126fd2
[ "Apache-2.0" ]
null
null
null
apps/lotus_auth/urls.py
sunmoon11/apilotus_django
115e9d0800751018f41ae8b9d85331d861126fd2
[ "Apache-2.0" ]
3
2019-12-04T22:21:46.000Z
2020-05-09T18:57:24.000Z
apps/lotus_auth/urls.py
zaza316614/apilotus_django
115e9d0800751018f41ae8b9d85331d861126fd2
[ "Apache-2.0" ]
null
null
null
from django.conf.urls import url from lotus_auth import forms from django.contrib.auth import views as django_auth_views from lotus_auth import views as lotus_auth_views urlpatterns = [ # MWC Custom Auth Views url(r'^login/$', lotus_auth_views.login, { 'template_name': 'lotus_auth/login.ht...
28.4
64
0.706573
0
0
0
0
0
0
0
0
108
0.253521
24aa16e48945bcc9cda497360276a9d7973aafa9
5,165
py
Python
server.py
Protozzzer/works
2e4ee1443ff8289eabde3c85024037cefba47ea2
[ "Unlicense" ]
null
null
null
server.py
Protozzzer/works
2e4ee1443ff8289eabde3c85024037cefba47ea2
[ "Unlicense" ]
null
null
null
server.py
Protozzzer/works
2e4ee1443ff8289eabde3c85024037cefba47ea2
[ "Unlicense" ]
null
null
null
# -*- coding: cp1251 -* import socket import time import sys from PyQt5 import QtWidgets from threading import Thread from PyQt5 import QtCore from PyQt5.QtWidgets import (QVBoxLayout, QSplitter, QTextEdit, QWidget) from PyQt5.QtGui import QTextCursor import MySQLdb class Settings_server: host = socket.gethostbyn...
38.544776
128
0.548112
4,621
0.894676
0
0
0
0
0
0
810
0.156825
24aa7d31a941bbe6faa5d7383cec1739d90b532d
2,147
py
Python
lib/ansibledocgen/cli.py
Ymil/ansible-docgen
a69dc8b067861b5a365d6086526d49f3cebfcfc0
[ "MIT" ]
null
null
null
lib/ansibledocgen/cli.py
Ymil/ansible-docgen
a69dc8b067861b5a365d6086526d49f3cebfcfc0
[ "MIT" ]
null
null
null
lib/ansibledocgen/cli.py
Ymil/ansible-docgen
a69dc8b067861b5a365d6086526d49f3cebfcfc0
[ "MIT" ]
null
null
null
""" Command Line Interface Module """ import optparse import sys import os from ansibledocgen.parser.dir import DirParser from ansibledocgen.formatter.markup import MarkupFormatter class Cli(object): """ Command Line Interface for ansible-docgen """ def __init__(self): """ Setup Arguments and Options...
37.666667
85
0.552399
1,963
0.914299
0
0
0
0
0
0
760
0.353982
24acf2037e2804da3c6e1f82c0c898b338afaf0e
4,067
py
Python
reclass/storage/tests/test_memcache_proxy.py
scivisum/reclass
71608ae3999a549d5e1efd4520cd2ad6a3b2b554
[ "Artistic-2.0" ]
54
2017-09-18T12:38:11.000Z
2022-03-06T03:53:52.000Z
reclass/storage/tests/test_memcache_proxy.py
scivisum/reclass
71608ae3999a549d5e1efd4520cd2ad6a3b2b554
[ "Artistic-2.0" ]
47
2017-09-13T07:45:46.000Z
2020-12-03T10:00:25.000Z
reclass/storage/tests/test_memcache_proxy.py
scivisum/reclass
71608ae3999a549d5e1efd4520cd2ad6a3b2b554
[ "Artistic-2.0" ]
24
2017-08-17T10:11:34.000Z
2021-06-28T09:57:45.000Z
# # -*- coding: utf-8 -*- # # This file is part of reclass (http://github.com/madduck/reclass) # # Copyright © 2007–14 martin f. krafft <madduck@madduck.net> # Released under the terms of the Artistic Licence 2.0 # from __future__ import absolute_import from __future__ import division from __future__ import print_funct...
43.265957
105
0.69191
3,419
0.840049
0
0
0
0
0
0
327
0.080344
24ad6804391b45a64a697c4d8ac8b9f9ab067809
780
py
Python
reports-service/app/main.py
ethru/northwind_psql
837c5137e753deb2ee5483a10a51f8c2b66377d1
[ "MS-PL" ]
null
null
null
reports-service/app/main.py
ethru/northwind_psql
837c5137e753deb2ee5483a10a51f8c2b66377d1
[ "MS-PL" ]
null
null
null
reports-service/app/main.py
ethru/northwind_psql
837c5137e753deb2ee5483a10a51f8c2b66377d1
[ "MS-PL" ]
null
null
null
from fastapi import FastAPI from elasticapm.contrib.starlette import ElasticAPM from starlette_exporter import PrometheusMiddleware, handle_metrics from app.api import database, engine, metadata from app.api.auth import session from app.api.reports import reports, apm metadata.create_all(engine) app = FastAPI(openap...
26
84
0.785897
0
0
0
0
179
0.229487
128
0.164103
110
0.141026
24aed837d0532b684b7fafa445f36bb47a201801
1,904
py
Python
missing_strat/inference/decomposition.py
tritas/missing_strat
79abbcadfc8d2074f05f7e72de4f7d454a847a9c
[ "BSD-3-Clause" ]
null
null
null
missing_strat/inference/decomposition.py
tritas/missing_strat
79abbcadfc8d2074f05f7e72de4f7d454a847a9c
[ "BSD-3-Clause" ]
null
null
null
missing_strat/inference/decomposition.py
tritas/missing_strat
79abbcadfc8d2074f05f7e72de4f7d454a847a9c
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Jul 15 16:20:49 2016 @author: Philippe """ import numpy as np from scipy.sparse.linalg import svds from functools import partial def em_svd(Y, k=None, tol=1e-3, maxiter=None): """ Approximate SVD on data with missing values via expectation-maximization Paramet...
27.2
76
0.601366
0
0
0
0
0
0
0
0
950
0.49895
24b03fa844ab8c0271326cc441a68fa308092476
862
py
Python
picraftzero/providers/motor/piconzero.py
WayneKeenan/picraftzero
68ebf94ae2bea04e8bfb06e333ddaa21783fd6c8
[ "MIT" ]
19
2017-06-14T09:44:17.000Z
2022-01-13T10:46:39.000Z
picraftzero/providers/motor/piconzero.py
WayneKeenan/picraftzero
68ebf94ae2bea04e8bfb06e333ddaa21783fd6c8
[ "MIT" ]
63
2017-06-01T12:10:10.000Z
2018-09-10T15:39:06.000Z
picraftzero/providers/motor/piconzero.py
WayneKeenan/picraftzero
68ebf94ae2bea04e8bfb06e333ddaa21783fd6c8
[ "MIT" ]
5
2017-06-20T17:27:14.000Z
2021-03-25T15:36:32.000Z
from picraftzero.log import logger from picraftzero.interfaces.hardware.providers import MotorProvider from picraftzero.utils import constrain from picraftzero.utils import dedupe from picraftzero.thirdparty import piconzero as pz class PiconzeroMotor(MotorProvider): def __init__(self, motor_id): se...
21.55
67
0.646172
621
0.720418
0
0
0
0
0
0
63
0.073086
24b05ec839f0838d72624fea140291ea0a77d8e1
500
py
Python
Resources/books/deep_learning_time_series_forecasting/code/chapter_11/02_average_forecast.py
gdepalma93/bright-athlete-academy
54ba0cc6633637c1bd6d90120153e04b981244bf
[ "MIT" ]
null
null
null
Resources/books/deep_learning_time_series_forecasting/code/chapter_11/02_average_forecast.py
gdepalma93/bright-athlete-academy
54ba0cc6633637c1bd6d90120153e04b981244bf
[ "MIT" ]
null
null
null
Resources/books/deep_learning_time_series_forecasting/code/chapter_11/02_average_forecast.py
gdepalma93/bright-athlete-academy
54ba0cc6633637c1bd6d90120153e04b981244bf
[ "MIT" ]
null
null
null
# example of an average forecast from numpy import mean from numpy import median # one-step average forecast def average_forecast(history, config): n, avg_type = config # mean of last n values if avg_type is 'mean': return mean(history[-n:]) # median of last n values return median(history[-n:]) # define datase...
26.315789
68
0.698
0
0
0
0
0
0
0
0
156
0.312
24b13fa559addca55ce38ea69c4da466906d7ac6
477
py
Python
composer/algorithms/cutout/__init__.py
jacobfulano/composer
4ad81df2d2ca6e5f0b4922bb2db750cd76ba34e8
[ "Apache-2.0" ]
2
2022-03-17T04:48:04.000Z
2022-03-20T09:06:19.000Z
composer/algorithms/cutout/__init__.py
jacobfulano/composer
4ad81df2d2ca6e5f0b4922bb2db750cd76ba34e8
[ "Apache-2.0" ]
null
null
null
composer/algorithms/cutout/__init__.py
jacobfulano/composer
4ad81df2d2ca6e5f0b4922bb2db750cd76ba34e8
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 MosaicML. All Rights Reserved. from composer.algorithms.cutout.cutout import CutOut as CutOut from composer.algorithms.cutout.cutout import CutOutHparams as CutOutHparams from composer.algorithms.cutout.cutout import cutout as cutout _name = 'CutOut' _class_name = 'CutOut' _functional = 'cutout' _tld...
34.071429
76
0.78826
0
0
0
0
0
0
0
0
182
0.381551
24b371766deb53493ed64d08185d0fc630fffb96
1,191
py
Python
genius/word.py
duanhongyi/genius
1bb8a8facd786c59405eb1df982a2f86d7934d61
[ "BSD-2-Clause" ]
204
2015-01-03T14:00:24.000Z
2022-01-14T13:25:16.000Z
genius/word.py
Liweiyanm/genius
1bb8a8facd786c59405eb1df982a2f86d7934d61
[ "BSD-2-Clause" ]
5
2017-08-18T03:08:48.000Z
2018-12-27T07:51:56.000Z
genius/word.py
Liweiyanm/genius
1bb8a8facd786c59405eb1df982a2f86d7934d61
[ "BSD-2-Clause" ]
63
2015-04-08T17:25:24.000Z
2022-02-10T08:18:32.000Z
#encoding:utf-8 import six from genius.tools import StringHelper class Word(object): string_helper = StringHelper() def __init__(self, text, **kwargs): self.text = text # 词 self.freq = kwargs.get('freq', 0) # 词频 self.tagging = kwargs.get('tagging', 'unknown') # 词性 # dic:字典,...
25.891304
61
0.555835
1,170
0.94431
0
0
153
0.123487
0
0
236
0.190476
24b56efa9d500dcf0b06602f9619ff3fe9fa427e
1,462
py
Python
stations/heathen/models.py
boyombo/django-stations
93a70be7eb8268f9d48f6e3cf9a532bcb27ff895
[ "MIT" ]
null
null
null
stations/heathen/models.py
boyombo/django-stations
93a70be7eb8268f9d48f6e3cf9a532bcb27ff895
[ "MIT" ]
null
null
null
stations/heathen/models.py
boyombo/django-stations
93a70be7eb8268f9d48f6e3cf9a532bcb27ff895
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.db import models class Industry(models.Model): name = models.CharField(max_length=100) def __unicode__(self): return self.name class Meta: verbose_name_plural = 'Industries' ordering = ['name'] class Location(models.Model): ...
27.074074
68
0.683311
1,383
0.945964
0
0
76
0.051984
0
0
62
0.042408
24b9c10a0c8dd0aa24e9fa4c47c3053ceaf8be37
3,610
py
Python
sumo/tests/netedit/additionalElements/chargingstation/create/test.sikuli/test.py
iltempe/osmosi
c0f54ecdbb7c7b5602d587768617d0dc50f1d75d
[ "MIT" ]
null
null
null
sumo/tests/netedit/additionalElements/chargingstation/create/test.sikuli/test.py
iltempe/osmosi
c0f54ecdbb7c7b5602d587768617d0dc50f1d75d
[ "MIT" ]
null
null
null
sumo/tests/netedit/additionalElements/chargingstation/create/test.sikuli/test.py
iltempe/osmosi
c0f54ecdbb7c7b5602d587768617d0dc50f1d75d
[ "MIT" ]
2
2017-12-14T16:41:59.000Z
2020-10-16T17:51:27.000Z
#!/usr/bin/env python """ @file test.py @author Pablo Alvarez Lopez @date 2016-11-25 @version $Id$ python script used by sikulix for testing netedit SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ Copyright (C) 2009-2017 DLR/TS, Germany This file is part of SUMO. SUMO is free software; you can red...
26.940299
76
0.789474
0
0
0
0
0
0
0
0
1,993
0.552078
24babe270e3cb016bf9a05e1484aec6a6bfc25c7
360
py
Python
nlputils/subset.py
shaun-russell/nlp
5d6a80ce146b4904dc8bc49d8353da85957b74eb
[ "MIT" ]
1
2018-11-19T00:19:11.000Z
2018-11-19T00:19:11.000Z
nlputils/subset.py
shaun-russell/nlp
5d6a80ce146b4904dc8bc49d8353da85957b74eb
[ "MIT" ]
null
null
null
nlputils/subset.py
shaun-russell/nlp
5d6a80ce146b4904dc8bc49d8353da85957b74eb
[ "MIT" ]
null
null
null
''' Extract a subset of lines from a file. ''' import random def extract_n(datalist, number, save_header=True): start = 1 if save_header else 0 subset = [] if save_header: subset.append(datalist[0]) sample_indices = random.sample(range(start, len(datalist)), number) for idx in sample_indices: subset...
24
69
0.713889
0
0
0
0
0
0
0
0
46
0.127778
24bdbfaa7f1f765ba8654015611f4aa1bebb433a
2,005
py
Python
SLClassifier/RepLoader.py
zhangrenyuuchicago/AdvReg4Intpltn
e6ce5a4db8213f0b6e7ba30f3f82375044c8dab0
[ "MIT" ]
null
null
null
SLClassifier/RepLoader.py
zhangrenyuuchicago/AdvReg4Intpltn
e6ce5a4db8213f0b6e7ba30f3f82375044c8dab0
[ "MIT" ]
null
null
null
SLClassifier/RepLoader.py
zhangrenyuuchicago/AdvReg4Intpltn
e6ce5a4db8213f0b6e7ba30f3f82375044c8dab0
[ "MIT" ]
null
null
null
import torch import torch.utils.data import numpy as np import csv import random import scvi import scanpy as sc import json from collections import Counter import json import os def convert_num(labels): if os.path.exists('label2id.json'): with open('label2id.json', 'r') as j: label2id = json....
26.733333
60
0.558105
1,310
0.653367
0
0
0
0
0
0
87
0.043392
24bddb341b044ae3fa62fcdfa2048a65f4b08738
1,091
py
Python
MatplotlibView.py
thekoc/ginkgo-sql-gui
f5f2523df42d505ffdc06b3a1b80dba4181c7b83
[ "Apache-2.0" ]
null
null
null
MatplotlibView.py
thekoc/ginkgo-sql-gui
f5f2523df42d505ffdc06b3a1b80dba4181c7b83
[ "Apache-2.0" ]
null
null
null
MatplotlibView.py
thekoc/ginkgo-sql-gui
f5f2523df42d505ffdc06b3a1b80dba4181c7b83
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -* import wx import matplotlib matplotlib.use("WxAgg") from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas from matplotlib.backends.backend_wx import NavigationToolbar2Wx from matplotlib.figure import Figure class MatplotlibPanel(wx.Panel): def __init__(self, parent...
30.305556
79
0.670027
669
0.613199
0
0
0
0
0
0
49
0.044913
24be2797fcd66e9b0985981bbaefcaaccc754cde
3,608
py
Python
examples/export_create_tables.py
danicarrion/carto-python
631b018f065960baa35473e2087ce598560b9e17
[ "BSD-3-Clause" ]
85
2016-08-07T16:46:58.000Z
2022-03-23T01:44:02.000Z
examples/export_create_tables.py
danicarrion/carto-python
631b018f065960baa35473e2087ce598560b9e17
[ "BSD-3-Clause" ]
109
2016-08-02T18:40:04.000Z
2021-08-23T08:08:02.000Z
examples/export_create_tables.py
danicarrion/carto-python
631b018f065960baa35473e2087ce598560b9e17
[ "BSD-3-Clause" ]
29
2016-11-29T03:42:47.000Z
2022-01-23T17:37:11.000Z
import argparse import os import re import warnings from carto.auth import APIKeyAuthClient from carto.datasets import DatasetManager from carto.sql import SQLClient warnings.filterwarnings('ignore') # set input arguments parser = argparse.ArgumentParser( description='Exports the CREATE TABLE scripts of all the ...
33.719626
97
0.624169
0
0
0
0
0
0
0
0
1,843
0.510809
24be8697b54674c0e0b86a367e1a14ca3ae70fb3
669
py
Python
peer.py
hmccreanor/voip
c37ae98f53700c5d17bd8af83dbece1702f0bd10
[ "MIT" ]
null
null
null
peer.py
hmccreanor/voip
c37ae98f53700c5d17bd8af83dbece1702f0bd10
[ "MIT" ]
null
null
null
peer.py
hmccreanor/voip
c37ae98f53700c5d17bd8af83dbece1702f0bd10
[ "MIT" ]
null
null
null
import socket import sys import threading import time import pyaudio recipient = sys.argv[1] inPort = int(sys.argv[2]) outPort = int(sys.argv[3]) def poll(sock): while True: data, addr = sock.recvfrom(1024) print(data.decode()) inSock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) outSock = s...
19.114286
61
0.675635
0
0
0
0
0
0
0
0
4
0.005979
24bf2e20956de8f312c50f5e50f0efe1c031e2db
10,450
py
Python
CorrNet/main.py
hcji/CorrNet
373c425a3c17ce29ace1e9d9403d8300b3e5d93b
[ "MIT" ]
2
2019-11-28T14:04:19.000Z
2020-09-01T08:59:25.000Z
CorrNet/main.py
hcji/CorrNet
373c425a3c17ce29ace1e9d9403d8300b3e5d93b
[ "MIT" ]
null
null
null
CorrNet/main.py
hcji/CorrNet
373c425a3c17ce29ace1e9d9403d8300b3e5d93b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Sep 13 09:14:27 2019 @author: hcji """ import os os.environ["CUDA_VISIBLE_DEVICES"] = "-1" # 这一行注释掉就是使用cpu,不注释就是使用gpu import numpy as np import keras.backend as K from keras.models import Model from keras.layers import Input, Dense, Add, concatenate, Conv1D, MaxPooling1D, ...
33.928571
101
0.598852
9,546
0.910357
0
0
0
0
0
0
879
0.083826
24bf65ebd5def1edf26cf1f3544da9ded8c43a2f
164
py
Python
Python_Exercise/py_exercise.py
kindyluv/My_Personal_Python_Exercises
5192ee6ab57c537f0231ee004f06879f14ba2138
[ "MIT" ]
null
null
null
Python_Exercise/py_exercise.py
kindyluv/My_Personal_Python_Exercises
5192ee6ab57c537f0231ee004f06879f14ba2138
[ "MIT" ]
null
null
null
Python_Exercise/py_exercise.py
kindyluv/My_Personal_Python_Exercises
5192ee6ab57c537f0231ee004f06879f14ba2138
[ "MIT" ]
null
null
null
has_high_income = True has_good_credit = True if has_high_income and has_good_credit: print("Eligible for loan") else: print("Ineligible for loan")
20.5
40
0.72561
0
0
0
0
0
0
0
0
40
0.243902
24c2c16a4acb45ab5b7484cfae6c99888157396c
454
py
Python
monitor/views.py
scsich/phagescan
3394b6a80e62c175b1e10477f58f7b609c399085
[ "Apache-2.0" ]
21
2015-02-03T18:41:23.000Z
2022-03-18T20:16:13.000Z
monitor/views.py
scsich/phagescan
3394b6a80e62c175b1e10477f58f7b609c399085
[ "Apache-2.0" ]
null
null
null
monitor/views.py
scsich/phagescan
3394b6a80e62c175b1e10477f58f7b609c399085
[ "Apache-2.0" ]
6
2015-03-03T11:22:21.000Z
2021-07-18T10:59:15.000Z
from djcelery.models import WorkerState from django.views.generic import ListView import datetime class MonitorListView(ListView): model = WorkerState queryset = WorkerState.objects.filter(last_heartbeat__gte=datetime.datetime.utcnow() - datetime.timedelta(minutes=5)) # todo paginate the list so we don't dump e...
25.222222
118
0.781938
348
0.76652
0
0
0
0
0
0
52
0.114537
24c3a238ceec7c76992abc6bdae457799345c1bc
974
py
Python
kaznet/apps/main/serializers/__init__.py
onaio/kaznet-web
53da428d5e62e40c5d38d84c3f3ee06071dd779b
[ "Apache-2.0" ]
1
2019-10-03T12:18:15.000Z
2019-10-03T12:18:15.000Z
kaznet/apps/main/serializers/__init__.py
onaio/kaznet-web
53da428d5e62e40c5d38d84c3f3ee06071dd779b
[ "Apache-2.0" ]
63
2018-10-31T12:57:36.000Z
2020-04-27T20:18:22.000Z
kaznet/apps/main/serializers/__init__.py
onaio/kaznet-web
53da428d5e62e40c5d38d84c3f3ee06071dd779b
[ "Apache-2.0" ]
3
2019-08-05T09:10:03.000Z
2020-01-05T21:24:49.000Z
""" Init module for main serializers """ from kaznet.apps.main.serializers.bounty import BountySerializer # noqa from kaznet.apps.main.serializers.client import ClientSerializer # noqa from kaznet.apps.main.serializers.contenttype import KaznetContentTypeSerializer # noqa from kaznet.apps.main.serializers.locations ...
64.933333
93
0.750513
0
0
0
0
0
0
0
0
100
0.102669
24c4ffc155dd53d094b28e7625d2fdd8fac1b525
16,095
py
Python
exp2.py
miguelamendez/SignalPerceptron
0e50f1b8e1c7f35675ccd2687f000d6534f70364
[ "MIT" ]
null
null
null
exp2.py
miguelamendez/SignalPerceptron
0e50f1b8e1c7f35675ccd2687f000d6534f70364
[ "MIT" ]
null
null
null
exp2.py
miguelamendez/SignalPerceptron
0e50f1b8e1c7f35675ccd2687f000d6534f70364
[ "MIT" ]
null
null
null
import torch import torchvision.models as models from torch.profiler import profile, record_function, ProfilerActivity from torch.utils.data import DataLoader from torchvision import datasets from torchvision.transforms import ToTensor, Lambda, Compose import matplotlib.pyplot as plt from signal_perceptron import * fro...
42.023499
134
0.555079
0
0
0
0
0
0
0
0
5,177
0.321653
24c61967065b81daa7a84b34568d13d782ce537d
418
py
Python
filter_meter_data/xlclass/globals.py
phizzl3/FilterMeterReadData
a057c494a37f613c0d76c18d7349351771b63e08
[ "MIT" ]
1
2021-01-19T16:56:24.000Z
2021-01-19T16:56:24.000Z
filter_meter_data/xlclass/globals.py
phizzl3/FilterMeterReadData
a057c494a37f613c0d76c18d7349351771b63e08
[ "MIT" ]
6
2021-02-28T14:31:57.000Z
2021-03-15T20:23:52.000Z
xlclass/globals.py
phizzl3/xlclass
09859d38e4953608ea0013fcc92b1e4c669bcaf6
[ "MIT" ]
null
null
null
from openpyxl.styles import PatternFill # Color dict for background fill COLORS = {'red': PatternFill(fgColor='FF0000', fill_type='solid'), 'green': PatternFill(fgColor='00b050', fill_type='solid'), 'orange': PatternFill(fgColor='FFC000', fill_type='solid'), 'yellow': PatternFill(fgColor=...
46.444444
69
0.672249
0
0
0
0
0
0
0
0
141
0.337321
24c8220e8ee9158d4486cc7075172e26d11d35e1
3,847
py
Python
discordSuperUtils/Ban.py
adam757521/discordSuperUtils-splitted
7221cd0461be5311e4c51e93e332bdfaa92ae2b2
[ "MIT" ]
2
2021-09-09T02:56:38.000Z
2021-09-09T03:55:49.000Z
discordSuperUtils/Ban.py
Z1R343L/discord-super-utils
c3b8c224ebe59a5acba1b9069c52cce029fdf9c4
[ "MIT" ]
null
null
null
discordSuperUtils/Ban.py
Z1R343L/discord-super-utils
c3b8c224ebe59a5acba1b9069c52cce029fdf9c4
[ "MIT" ]
null
null
null
from __future__ import annotations import asyncio from datetime import datetime from typing import ( TYPE_CHECKING, Union, Optional ) import discord from .Base import DatabaseChecker from .Punishments import Punisher if TYPE_CHECKING: from .Punishments import Punishment from discord.ext import c...
34.348214
119
0.597089
3,513
0.913179
0
0
259
0.067325
3,007
0.781648
508
0.132051
24c8d1c38168585d44647b43e92ca82459971f90
1,198
py
Python
pages/choices.py
periclescy/research-qre
7fafbc7120235fe6cb75a2f5477922d813c31066
[ "OLDAP-2.3" ]
null
null
null
pages/choices.py
periclescy/research-qre
7fafbc7120235fe6cb75a2f5477922d813c31066
[ "OLDAP-2.3" ]
null
null
null
pages/choices.py
periclescy/research-qre
7fafbc7120235fe6cb75a2f5477922d813c31066
[ "OLDAP-2.3" ]
null
null
null
# languages = [ # ("EL", "EL"), # ("EN", "EN"), # ] # gender = [ # ("", "---"), # ("M", "Άρρεν / Male"), # ("F", "Θήλυ / Female"), # ] # # age = [ # ("", "---"), # ("u17", "-17"), # ("18-25", "18-25"), # ("26-35", "26-35"), # ("36-45", "36-45"), # ("46-54", "46-54"), # (...
22.185185
52
0.413189
0
0
0
0
0
0
0
0
1,278
0.96018
24c94333f1c59b0fa2a2847c041b962bdb757ab4
2,393
py
Python
mogp_emulator/demos/kdr_demos.py
EXAUQ/mogp-emulator
9d5772135498bdf5b95b44b4afb065c2c266f899
[ "MIT" ]
21
2021-01-20T07:02:12.000Z
2022-03-30T21:09:04.000Z
mogp_emulator/demos/kdr_demos.py
EXAUQ/mogp-emulator
9d5772135498bdf5b95b44b4afb065c2c266f899
[ "MIT" ]
114
2019-04-25T14:53:11.000Z
2021-01-06T17:07:41.000Z
mogp_emulator/demos/kdr_demos.py
EXAUQ/mogp-emulator
9d5772135498bdf5b95b44b4afb065c2c266f899
[ "MIT" ]
8
2021-02-02T08:56:12.000Z
2022-02-15T10:03:15.000Z
import mogp_emulator import numpy as np # simple Dimension Reduction examples # simulator function -- returns a single "important" dimension from # at least 4 inputs def f(x): return (x[0]-x[1]+2.*x[3])/3. # Experimental design -- create a design with 5 input parameters # all uniformly distributed over [0,1]. ...
29.182927
83
0.654409
0
0
0
0
0
0
0
0
1,294
0.540744
24cc3e9f8f00bbd38841b1efdedf97cebf49800c
255
py
Python
src/reusable_mongodb_connection/exceptions.py
Corona-Travel/reusable_mongodb_connection
c7555a82bfa01e5eccdec66885c24eadaac9237b
[ "MIT" ]
1
2021-11-12T12:07:39.000Z
2021-11-12T12:07:39.000Z
src/reusable_mongodb_connection/exceptions.py
Corona-Travel/reusable_mongodb_connection
c7555a82bfa01e5eccdec66885c24eadaac9237b
[ "MIT" ]
null
null
null
src/reusable_mongodb_connection/exceptions.py
Corona-Travel/reusable_mongodb_connection
c7555a82bfa01e5eccdec66885c24eadaac9237b
[ "MIT" ]
null
null
null
class ReusableMongodbConnectionError(ValueError): def __init__( self, description: str = "An error occurred in reusable_mongodb_connection", *args, **kwargs ): super().__init__(description, *args, **kwargs)
28.333333
78
0.635294
254
0.996078
0
0
0
0
0
0
50
0.196078
24cca9f21eb5116206ddd39d59a3fddcfc62889a
2,909
py
Python
app.py
JFEscobarM/Proyecto_final
a3d822f44c367d28f2910f1300ff5fddb4712bdb
[ "MIT" ]
null
null
null
app.py
JFEscobarM/Proyecto_final
a3d822f44c367d28f2910f1300ff5fddb4712bdb
[ "MIT" ]
null
null
null
app.py
JFEscobarM/Proyecto_final
a3d822f44c367d28f2910f1300ff5fddb4712bdb
[ "MIT" ]
null
null
null
from flask import Flask, render_template, request, redirect, url_for, session from flask_mysqldb import MySQL,MySQLdb from os import path from notifypy import Notify app = Flask(__name__) app.config['MYSQL_HOST'] = 'localhost' app.config['MYSQL_USER'] = 'root' app.config['MYSQL_PASSWORD'] = '' app.config['MYSQL_D...
30.946809
127
0.603644
0
0
0
0
2,410
0.827894
0
0
797
0.273789
24ccdeca70d2927d3661847354b85295b67ae60e
1,751
py
Python
model/table2tsv.py
liziwl/Bugine
7787a45c33bc061f4cbdb07ddaaf369f3b3934fc
[ "Apache-2.0" ]
2
2020-03-20T07:53:08.000Z
2020-07-06T03:41:23.000Z
model/table2tsv.py
liziwl/Bugine
7787a45c33bc061f4cbdb07ddaaf369f3b3934fc
[ "Apache-2.0" ]
null
null
null
model/table2tsv.py
liziwl/Bugine
7787a45c33bc061f4cbdb07ddaaf369f3b3934fc
[ "Apache-2.0" ]
1
2020-04-16T07:51:27.000Z
2020-04-16T07:51:27.000Z
from model import issuedb as idb import os from model import util, work_path __GENERATE__ = False if __GENERATE__: SRC_DIR = 'tsv/' TEST_DIR = 'tsv_test/' TSV_FILE = work_path.in_project('./model/conf/tab_url.tsv') __data_tsv = util.read_tsv(TSV_FILE) def generate_lookup_table(): db_driver = idb.ISSuedb...
27.359375
102
0.631068
0
0
0
0
0
0
0
0
227
0.12964
24ccf2defe0ea32cf2296c83948d69249f022e2d
318
py
Python
app/main/views.py
team-jinhong-kim/jake-cc-assignment
71c5b0bfe52cbdc947a7bdf7af005b767664b488
[ "MIT" ]
null
null
null
app/main/views.py
team-jinhong-kim/jake-cc-assignment
71c5b0bfe52cbdc947a7bdf7af005b767664b488
[ "MIT" ]
null
null
null
app/main/views.py
team-jinhong-kim/jake-cc-assignment
71c5b0bfe52cbdc947a7bdf7af005b767664b488
[ "MIT" ]
null
null
null
from flask import redirect, render_template, request from . import main @main.route('/', methods=['GET']) def index(): return render_template("index.html") @main.route('/shutdown') def server_shutdown(): shutdown = request.environ.get('werkzeug.server.shutdown') shutdown() return 'Shutting down...'
24.461538
62
0.704403
0
0
0
0
242
0.761006
0
0
75
0.235849
24ce2bb821f0dd87e038601fa86a71421eb013fd
241
py
Python
askanna/core/exceptions.py
askanna-io/askanna-python
b6a1dec3b9911888f3d769cef46ce8c2d5cb0dfe
[ "Apache-2.0" ]
1
2021-02-22T15:53:47.000Z
2021-02-22T15:53:47.000Z
askanna/core/exceptions.py
askanna-io/askanna-python
b6a1dec3b9911888f3d769cef46ce8c2d5cb0dfe
[ "Apache-2.0" ]
null
null
null
askanna/core/exceptions.py
askanna-io/askanna-python
b6a1dec3b9911888f3d769cef46ce8c2d5cb0dfe
[ "Apache-2.0" ]
null
null
null
class Error(Exception): pass class GetError(Error): pass class HeadError(Error): pass class PostError(Error): pass class PatchError(Error): pass class PutError(Error): pass class RunError(Error): pass
8.925926
24
0.659751
222
0.921162
0
0
0
0
0
0
0
0
24ce5f9fcb194a70d3a391932da2b7673b304ad3
3,969
py
Python
2_vae_denoiser_data_gen.py
Ladvien/denoising_vae
c61433a41ba69ca305ab1a7b526f8560a70bad4e
[ "MIT" ]
null
null
null
2_vae_denoiser_data_gen.py
Ladvien/denoising_vae
c61433a41ba69ca305ab1a7b526f8560a70bad4e
[ "MIT" ]
null
null
null
2_vae_denoiser_data_gen.py
Ladvien/denoising_vae
c61433a41ba69ca305ab1a7b526f8560a70bad4e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Nov 11 17:27:59 2020 @author: ladvien """ import sys import os import cv2 import numpy as np from random import randint import matplotlib.pyplot as plt image_tools_path = "/home/ladvien/deep_arcane/" sys.path.append(image_tools_path) from image_ut...
26.111842
106
0.581759
0
0
0
0
0
0
0
0
515
0.129756
24ce86290dd9ae95c3b2fcc0924528d2a8404299
2,462
py
Python
.circleci/txt2md.py
pamd/cimr-d-test
dd7005b40e7a1298d004d293de4f30b2c7b58caa
[ "CC-BY-4.0" ]
null
null
null
.circleci/txt2md.py
pamd/cimr-d-test
dd7005b40e7a1298d004d293de4f30b2c7b58caa
[ "CC-BY-4.0" ]
null
null
null
.circleci/txt2md.py
pamd/cimr-d-test
dd7005b40e7a1298d004d293de4f30b2c7b58caa
[ "CC-BY-4.0" ]
1
2019-02-18T13:10:03.000Z
2019-02-18T13:10:03.000Z
"""This script generates README.md based on s3_list.txt. If an S3 object's parent folder(s) doesn't exist, this script will be smart enough to create the parent folder(s) as separate items in output MD file. """ TXT_FILENAME = "processed/s3_list.txt" MD_FILENAME = "processed/README.md" def get_md_name(s3_name): "...
35.681159
78
0.616166
0
0
0
0
0
0
0
0
793
0.322096
24d0811f8a1918258a94d40c8fda26282de53c17
1,644
py
Python
_app/cantiin/filters.py
OmarThinks/cantiin_django
3c80ba0aa1b6a92d232b1147e217a0d6ac8fc834
[ "MIT" ]
1
2021-08-17T21:27:32.000Z
2021-08-17T21:27:32.000Z
_app/cantiin/filters.py
OmarThinks/cantiin_django
3c80ba0aa1b6a92d232b1147e217a0d6ac8fc834
[ "MIT" ]
null
null
null
_app/cantiin/filters.py
OmarThinks/cantiin_django
3c80ba0aa1b6a92d232b1147e217a0d6ac8fc834
[ "MIT" ]
null
null
null
from django_filters import rest_framework as filters from accounts.models import (User) from cantiin.models import (Product, Order, Comment) from my_functions.filters_mixins import (DateTimeFilter, IdFilter) from accounts.models import (User) from django.db.models import Q class UserFilter(IdFilter): search = filt...
26.95082
71
0.765207
1,300
0.790754
0
0
0
0
0
0
234
0.142336
24d39243e750a7c57ab69e5cfb997c5cb9428072
1,547
py
Python
src/point_cloud_merger.py
kmtz-project/robot-simulator
8725ebf26aa5e456083fe641194f433c1a16566e
[ "MIT" ]
null
null
null
src/point_cloud_merger.py
kmtz-project/robot-simulator
8725ebf26aa5e456083fe641194f433c1a16566e
[ "MIT" ]
null
null
null
src/point_cloud_merger.py
kmtz-project/robot-simulator
8725ebf26aa5e456083fe641194f433c1a16566e
[ "MIT" ]
null
null
null
import numpy as np class PointCloudMerger: # FIXME def merge_clouds(self, cloud_left, cloud_right, matches): left_crop_min = np.min([m[0][0] for m in matches]) # left_crop_max = np.max([m[0][0] for m in matches]) # right_crop_min = np.min([m[1][0] for m in matches]) right_crop...
34.377778
76
0.571429
1,525
0.985779
0
0
0
0
0
0
476
0.307692
24d41b9984794f90bfe975ad6ef0215df1d22709
226
py
Python
day4.py
impractical101/LeetCode-30--June
5420685a151e5561f54e7f1a0b699015050f75c2
[ "MIT" ]
null
null
null
day4.py
impractical101/LeetCode-30--June
5420685a151e5561f54e7f1a0b699015050f75c2
[ "MIT" ]
null
null
null
day4.py
impractical101/LeetCode-30--June
5420685a151e5561f54e7f1a0b699015050f75c2
[ "MIT" ]
null
null
null
#Submitted by thr3sh0ld #Logic: Swap half the length of string with the other half class Solution: def reverseString(self, s: List[str]) -> None: for i in range(len(s)//2): s[i], s[-i-1] = s[-i-1], s[i]
37.666667
58
0.606195
143
0.632743
0
0
0
0
0
0
81
0.358407
24d83a8fcd0daec9678d67335df10e1f6785c922
2,659
py
Python
Seven/script.py
tbjoern/adventofcode
3fb8b4e18f03825c448d8935ab39b8bf08202d90
[ "MIT" ]
null
null
null
Seven/script.py
tbjoern/adventofcode
3fb8b4e18f03825c448d8935ab39b8bf08202d90
[ "MIT" ]
null
null
null
Seven/script.py
tbjoern/adventofcode
3fb8b4e18f03825c448d8935ab39b8bf08202d90
[ "MIT" ]
null
null
null
class TLSParser: def __init__(self): self.input = ["","","",""] self.next = 0 self.ready = False self.hypernet = False self.TLS = False self.TLSinHypernet = False def reset(self): self.ready = False self.next = 0 self.hypernet = False self.TLS = False self.TLSinHypernet = False ...
19.992481
155
0.579541
2,428
0.913125
0
0
0
0
0
0
46
0.0173
24d847e5d03cf7ba2d903128103f250d10a6fe3c
511
py
Python
set3/p3_5.py
Felpezs/IPL_2021
eaef2baec96f16c1486f4ec5af6eff097f81fcd2
[ "MIT" ]
1
2021-07-08T19:28:06.000Z
2021-07-08T19:28:06.000Z
set3/p3_5.py
Felpezs/IPL_2021
eaef2baec96f16c1486f4ec5af6eff097f81fcd2
[ "MIT" ]
null
null
null
set3/p3_5.py
Felpezs/IPL_2021
eaef2baec96f16c1486f4ec5af6eff097f81fcd2
[ "MIT" ]
null
null
null
def approx_derivative(f, x: int, delta = 1e-6): return (f(x + delta) - f(x - delta))/(2 * delta) def approx_derivative_2(f, delta = 1e-6): def new_func(x): return (f(x + delta) - f(x - delta))/(2 * delta) return new_func def approx_integral(f, lo, hi, num_regions): area = 0 h =...
26.894737
57
0.528376
0
0
0
0
0
0
0
0
0
0
24d907fd34d41b9eae0d2f44c555b225bcd543cc
907
py
Python
p004_test.py
pbgnz/project-euler
8ab4549101f7a3ac2a478eb6193b2b67920c8102
[ "MIT" ]
null
null
null
p004_test.py
pbgnz/project-euler
8ab4549101f7a3ac2a478eb6193b2b67920c8102
[ "MIT" ]
1
2021-04-13T12:47:07.000Z
2021-04-14T20:27:04.000Z
p004_test.py
escobot/project-euler
8ab4549101f7a3ac2a478eb6193b2b67920c8102
[ "MIT" ]
null
null
null
import unittest from p004 import solution, is_palindrome class MyTestCase(unittest.TestCase): def test_is_palindrome_zero(self): self.assertEqual(is_palindrome("o"), True) def test_is_palindrome_positive_even(self): self.assertEqual(is_palindrome("osso"), True) def test_is_palindrome_po...
25.914286
55
0.713341
797
0.878721
0
0
0
0
0
0
39
0.042999
24db619b9ab62e0704e7b2bae615ad627530f3d6
1,097
py
Python
findost/foundation/log.py
BongOST/FindOST
bef3c8991b7494ad08c06ed1c9fb0bc41996ec8b
[ "Apache-2.0" ]
1
2017-11-12T03:10:25.000Z
2017-11-12T03:10:25.000Z
findost/foundation/log.py
BongOST/FindOST
bef3c8991b7494ad08c06ed1c9fb0bc41996ec8b
[ "Apache-2.0" ]
null
null
null
findost/foundation/log.py
BongOST/FindOST
bef3c8991b7494ad08c06ed1c9fb0bc41996ec8b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- encoding:utf-8 -*- __author__ = 'LexusLee' """ 该模块是日志模块,负责记录整个应用的日志信息,通过继承threading.Thread类实现异步写日志,外部对象只需将日志信息交给该模块,然后直接返回, 无需等待将日志信息写到文件中,而是由该模块负责将日志信息写到文件中去,从而提高了写日志的速度 """ import logging.config import os import yaml from foundation import const BASE_DIR = os.path.dirname(__file__) if ...
36.566667
118
0.759344
0
0
0
0
0
0
0
0
710
0.516364
24dd3da7f5133aac9176f92bd1db427450396bd2
1,509
py
Python
sweat/io/generic.py
GoldenCheetah/sweatpy
eed6b34ff75c16fcbad878caded8ee4d18dea589
[ "MIT" ]
58
2018-03-10T08:26:10.000Z
2022-03-20T11:23:50.000Z
sweat/io/generic.py
GoldenCheetah/sweatpy
eed6b34ff75c16fcbad878caded8ee4d18dea589
[ "MIT" ]
19
2018-03-10T13:09:49.000Z
2022-03-18T10:31:19.000Z
sweat/io/generic.py
GoldenCheetah/sweatpy
eed6b34ff75c16fcbad878caded8ee4d18dea589
[ "MIT" ]
20
2018-03-09T19:16:15.000Z
2022-03-08T00:21:38.000Z
from pathlib import Path from typing import Generator, Union import pandas as pd from .fit import read_fit from .gpx import read_gpx from .tcx import read_tcx def read_file(fpath: Union[str, Path], *args, **kwargs) -> pd.DataFrame: """This method tries to recognize the file type of the fpath argument by reading...
26.946429
122
0.656064
0
0
487
0.32273
0
0
0
0
740
0.490391
24de9ab8b2a618abe1a2446b71c946a46ce2cf44
5,542
py
Python
python/import_gnomad_vep.py
mkanai/slalom-paper
3d96b1778bdb3d91ac7bf70667460a88c2db530a
[ "MIT" ]
null
null
null
python/import_gnomad_vep.py
mkanai/slalom-paper
3d96b1778bdb3d91ac7bf70667460a88c2db530a
[ "MIT" ]
null
null
null
python/import_gnomad_vep.py
mkanai/slalom-paper
3d96b1778bdb3d91ac7bf70667460a88c2db530a
[ "MIT" ]
null
null
null
import argparse import hail as hl from gnomad.utils.vep import ( process_consequences, filter_vep_to_canonical_transcripts, get_most_severe_consequence_for_summary, CSQ_CODING_HIGH_IMPACT, CSQ_CODING_MEDIUM_IMPACT, CSQ_CODING_LOW_IMPACT, CSQ_NON_CODING, ) from hail.genetics import reference...
41.358209
136
0.690184
0
0
0
0
0
0
0
0
1,326
0.239264
24df5f944ef32039cea2fd9aa8fbbb72111acef6
96
py
Python
django/AIST_survey/apps.py
aistairc/voteclustering_aist
f1ee7409698a05a99ce40cdccbe4c2b1f8f81b4c
[ "MIT" ]
null
null
null
django/AIST_survey/apps.py
aistairc/voteclustering_aist
f1ee7409698a05a99ce40cdccbe4c2b1f8f81b4c
[ "MIT" ]
null
null
null
django/AIST_survey/apps.py
aistairc/voteclustering_aist
f1ee7409698a05a99ce40cdccbe4c2b1f8f81b4c
[ "MIT" ]
null
null
null
from django.apps import AppConfig class AistSurveyConfig(AppConfig): name = 'AIST_survey'
16
34
0.770833
59
0.614583
0
0
0
0
0
0
13
0.135417
24dfeb32f732cda7cc1bd5475ac2eba78563c4bb
1,196
py
Python
tests/tools.py
tkonopka/crossmap
237e4319a77281490c4e037918977230fea43d7e
[ "MIT" ]
1
2021-08-12T11:40:10.000Z
2021-08-12T11:40:10.000Z
tests/tools.py
tkonopka/crossmap
237e4319a77281490c4e037918977230fea43d7e
[ "MIT" ]
null
null
null
tests/tools.py
tkonopka/crossmap
237e4319a77281490c4e037918977230fea43d7e
[ "MIT" ]
null
null
null
""" Helper functions used within the test suite """ import glob from contextlib import suppress from os import environ, remove, rmdir from os.path import join, exists from pymongo import MongoClient def remove_file(files): """remove a single file if it exists.""" for f in files: if exists(f): ...
27.813953
78
0.686455
0
0
0
0
0
0
0
0
282
0.235786
24e0d8bb228a1463b6f322f96fa9e6a037f16d36
1,464
py
Python
test/proxy_AccountPWD.py
bianQ/similarweb
3df31af1267a285d0bc6adf720409ceb43eb56cb
[ "MIT" ]
null
null
null
test/proxy_AccountPWD.py
bianQ/similarweb
3df31af1267a285d0bc6adf720409ceb43eb56cb
[ "MIT" ]
null
null
null
test/proxy_AccountPWD.py
bianQ/similarweb
3df31af1267a285d0bc6adf720409ceb43eb56cb
[ "MIT" ]
null
null
null
import _thread import time import requests headers = { "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60 MicroMessenger/6.5.19 NetType/4...
24.4
178
0.592213
0
0
0
0
0
0
0
0
639
0.430013
24e0f61f5197a6897882718461de8c1a5db52307
2,150
py
Python
IPython/core/tests/test_application.py
ivanov/ipython
62cc379d3b454923cb48e94663f385f54ec806cc
[ "BSD-3-Clause-Clear" ]
2
2015-04-21T12:12:43.000Z
2015-04-21T12:12:54.000Z
IPython/core/tests/test_application.py
ivanov/ipython
62cc379d3b454923cb48e94663f385f54ec806cc
[ "BSD-3-Clause-Clear" ]
1
2015-07-16T22:26:53.000Z
2015-07-16T22:26:53.000Z
IPython/core/tests/test_application.py
ivanov/ipython
62cc379d3b454923cb48e94663f385f54ec806cc
[ "BSD-3-Clause-Clear" ]
null
null
null
# coding: utf-8 """Tests for IPython.core.application""" import os import tempfile from IPython.core.application import Application def test_unicode_cwd(): """Check that IPython starts with non-ascii characters in the path.""" wd = tempfile.mkdtemp(suffix=u"€") old_wd = os.getcwdu() os.chdir(wd)...
31.15942
77
0.648372
0
0
0
0
0
0
0
0
705
0.327298
24e2ecbea1b137afbbe27a88d7fa408842091b46
1,131
py
Python
examples/scripts/flatten.py
bcdev/nc2zarr
4ba4829d78c4bda593515685729d32baa83cabc2
[ "MIT" ]
5
2021-01-08T14:16:31.000Z
2021-09-13T04:56:40.000Z
examples/scripts/flatten.py
bcdev/nc2zarr
4ba4829d78c4bda593515685729d32baa83cabc2
[ "MIT" ]
42
2021-01-06T11:01:12.000Z
2022-03-04T15:46:15.000Z
examples/scripts/flatten.py
bcdev/nc2zarr
4ba4829d78c4bda593515685729d32baa83cabc2
[ "MIT" ]
2
2020-12-28T08:51:27.000Z
2021-08-13T12:46:04.000Z
#!/usr/bin/env python3 """Rechunk a Zarr with chunks of size 1 in time, full size in lat/lon. If s3fs is installed, "s3://..." arguments can be used and credentials will be read from standard environment variables or files (see s3fs docs). The output dataset will have the same data as the input dataset, rechunked so...
29.763158
74
0.709991
0
0
0
0
0
0
0
0
580
0.512821
24e3a042ebeec94e8e97f8bffee6f4425ba30587
1,056
py
Python
alttprbot_discord/cogs/smvaria.py
compiling/sahasrahbot
24cd1373b4a4e456562750397573f522d0326e13
[ "MIT" ]
null
null
null
alttprbot_discord/cogs/smvaria.py
compiling/sahasrahbot
24cd1373b4a4e456562750397573f522d0326e13
[ "MIT" ]
null
null
null
alttprbot_discord/cogs/smvaria.py
compiling/sahasrahbot
24cd1373b4a4e456562750397573f522d0326e13
[ "MIT" ]
null
null
null
from discord.ext import commands from alttprbot.exceptions import SahasrahBotException from alttprbot.alttprgen.smvaria import generate_preset class SuperMetroidVaria(commands.Cog): def __init__(self, bot): self.bot = bot @commands.group() async def smvaria(self, ctx): if ctx.invoked_sub...
27.789474
89
0.63447
851
0.805871
0
0
743
0.703598
675
0.639205
108
0.102273
24e403742d04ac820900a705be239f8e41ce14fb
4,724
py
Python
algorythmic_heights/scc/scc.py
localmonkey/rosalind
dceab11d4938c1325075988be091abd3a5d25824
[ "MIT" ]
null
null
null
algorythmic_heights/scc/scc.py
localmonkey/rosalind
dceab11d4938c1325075988be091abd3a5d25824
[ "MIT" ]
null
null
null
algorythmic_heights/scc/scc.py
localmonkey/rosalind
dceab11d4938c1325075988be091abd3a5d25824
[ "MIT" ]
null
null
null
#import numpy as np class MyGrph: def __init__(self, V_quant, E_quant): self.V = V_quant self.E = E_quant self.edges_list = [[]] * (self.V) self.reverse_edges_list = [[]] * (self.V) def build_graph(self, f): for i in range(0, self.E): vertex1, vertex2 = map...
34.481752
103
0.491956
4,363
0.923582
0
0
0
0
0
0
331
0.070068
24e941de480f9fd93454090b5da0fb71dc8afdca
1,193
py
Python
allgemein/test_tastatur.py
kanopus1958/Python
795d0e7c3479032a71e1c1246391772619e1e6ef
[ "MIT" ]
null
null
null
allgemein/test_tastatur.py
kanopus1958/Python
795d0e7c3479032a71e1c1246391772619e1e6ef
[ "MIT" ]
null
null
null
allgemein/test_tastatur.py
kanopus1958/Python
795d0e7c3479032a71e1c1246391772619e1e6ef
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Programm : test_tastatur.py # Version : 1.01 # SW-Stand : 17.02.2022 # Autor : Kanopus1958 # Beschreibung : Tastur Beispiel in Python from rwm_steuerung import color as c from rwm_mod01 import show_header import platform import sys G_OS = ('Raspbian', 'Debian') G_HEADER_1...
24.854167
71
0.61777
0
0
0
0
0
0
0
0
417
0.349539
24ed9a457f7b83e0a213c03d5495eef7ad64ec9f
54
py
Python
Flask-todolist-Sqlite3-master/venv/lib/python3.6/sre_constants.py
IncredibleDraco/MyScholar
272aafa33f7227d1bc0d937d046788cbabede453
[ "Apache-2.0" ]
null
null
null
Flask-todolist-Sqlite3-master/venv/lib/python3.6/sre_constants.py
IncredibleDraco/MyScholar
272aafa33f7227d1bc0d937d046788cbabede453
[ "Apache-2.0" ]
null
null
null
Flask-todolist-Sqlite3-master/venv/lib/python3.6/sre_constants.py
IncredibleDraco/MyScholar
272aafa33f7227d1bc0d937d046788cbabede453
[ "Apache-2.0" ]
1
2019-11-25T10:25:21.000Z
2019-11-25T10:25:21.000Z
/home/sheldon/anaconda3/lib/python3.6/sre_constants.py
54
54
0.851852
0
0
0
0
0
0
0
0
0
0
24f0c6c494f81e8ebac822ae3156cf6a71fdea70
197
py
Python
update_ip/services/__init__.py
vishnuprasadnta/update-ip
22992b6ec272ebd4f684392cad11254e463e619c
[ "BSD-3-Clause" ]
null
null
null
update_ip/services/__init__.py
vishnuprasadnta/update-ip
22992b6ec272ebd4f684392cad11254e463e619c
[ "BSD-3-Clause" ]
null
null
null
update_ip/services/__init__.py
vishnuprasadnta/update-ip
22992b6ec272ebd4f684392cad11254e463e619c
[ "BSD-3-Clause" ]
null
null
null
from nfsn import NearlyFreeSpeechService from webfaction import WebFactionService services= [WebFactionService, NearlyFreeSpeechService] services_by_name= dict(((s.__name__,s) for s in services))
32.833333
58
0.84264
0
0
0
0
0
0
0
0
0
0
24f143f9ddcea556b1cba8c4e100e24aa5b6a03a
2,267
py
Python
minimal/knn/train.py
drstarry/minimal
8c3eac110505d68dabde4d014cd0968392b640f9
[ "MIT" ]
2
2015-09-22T00:57:17.000Z
2016-12-07T02:18:33.000Z
minimal/knn/train.py
drstarry/minimal
8c3eac110505d68dabde4d014cd0968392b640f9
[ "MIT" ]
null
null
null
minimal/knn/train.py
drstarry/minimal
8c3eac110505d68dabde4d014cd0968392b640f9
[ "MIT" ]
null
null
null
# coding: utf-8 import math from const import CUR_FOLDER, FILE_FOLDER, FILE_TRAIN, FEATURE_NUM, K, FOLD, VALUES def get_data(test_no): train_data = [] test_data = [] for i in range(1, FOLD+1): filename = CUR_FOLDER + FILE_FOLDER + FILE_TRAIN + '%i.txt' % i with open(filename) as f: ...
29.064103
84
0.584914
0
0
0
0
0
0
0
0
139
0.061315
24f18b66c7006add174b6858a066253782ef852a
941
py
Python
service.py
DropB1t/ClickerPy
a5142e1afcc27d6e557627dbbf75d8f224213431
[ "MIT" ]
1
2020-09-14T09:35:21.000Z
2020-09-14T09:35:21.000Z
service.py
DropB1t/ClickerPy
a5142e1afcc27d6e557627dbbf75d8f224213431
[ "MIT" ]
null
null
null
service.py
DropB1t/ClickerPy
a5142e1afcc27d6e557627dbbf75d8f224213431
[ "MIT" ]
null
null
null
import socket import struct # Funzione send_names chiede al utente tramite l'input il suo nome da inviare al server def send_name(): while True: name = input('Please enter your nickname (maximum 20 characters) --> ') if len(name) > 0 and len(name) < 21: return name.encode('utf-8') def connect(): ip = inpu...
28.515152
87
0.669501
0
0
0
0
0
0
0
0
229
0.243358
24f20d156732daf62fc69467ac140f84f352da1e
3,586
py
Python
backend/otpvalidation/views.py
beehyv/workforcehealthtracker
ab0f921938e1ee50158c9d2c72a66c534d435eee
[ "Apache-2.0" ]
2
2020-05-10T05:20:04.000Z
2020-05-21T15:29:55.000Z
backend/otpvalidation/views.py
beehyv/workforcehealthtracker
ab0f921938e1ee50158c9d2c72a66c534d435eee
[ "Apache-2.0" ]
null
null
null
backend/otpvalidation/views.py
beehyv/workforcehealthtracker
ab0f921938e1ee50158c9d2c72a66c534d435eee
[ "Apache-2.0" ]
2
2020-05-13T18:21:37.000Z
2020-05-21T15:29:58.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); y...
37.747368
93
0.706637
0
0
0
0
0
0
0
0
1,089
0.303681
24f22fdaa93b5ce8be07b713b821e2b5f86f6a5c
12,386
py
Python
tagnet.py
dbxinj/ynet
01dcf26246f673ee0168b8143596ef7994c24418
[ "Apache-2.0" ]
null
null
null
tagnet.py
dbxinj/ynet
01dcf26246f673ee0168b8143596ef7994c24418
[ "Apache-2.0" ]
null
null
null
tagnet.py
dbxinj/ynet
01dcf26246f673ee0168b8143596ef7994c24418
[ "Apache-2.0" ]
null
null
null
import ynet from util import * from singa.layer import Conv2D, Activation, MaxPooling2D, AvgPooling2D, Flatten, Slice, LRN from singa import initializer from singa import layer from singa import loss from singa import tensor import cPickle as pickle import logging import os import numpy as np from numpy.core.umath_te...
43.612676
182
0.631842
11,929
0.963104
0
0
0
0
0
0
1,050
0.084773
24f4cbec86839888431c70ef1f6650f036a88daa
3,691
py
Python
modules/verse.py
Dans-labs/shebanq
e7efffc84bcedcc8c8a21638991fb765b95713df
[ "MIT" ]
null
null
null
modules/verse.py
Dans-labs/shebanq
e7efffc84bcedcc8c8a21638991fb765b95713df
[ "MIT" ]
null
null
null
modules/verse.py
Dans-labs/shebanq
e7efffc84bcedcc8c8a21638991fb765b95713df
[ "MIT" ]
null
null
null
from textwrap import dedent import json from gluon import current from constants import ONE_HOUR from versecontent import VERSECONTENT class VERSE: """Get verse data of a verse. The verse data are the linguistic feature data for the words in a verse. """ def __init__(self): pass def g...
29.528
84
0.455161
3,551
0.96207
0
0
0
0
0
0
1,262
0.341913
24f4d24d6c7cdad4b11c864d9e2589522d2bfd09
53,063
py
Python
python/deccheck2.py
faradaynetworks/cdecimal
4be4045f99d13301882b80534d7523374d6eb5ac
[ "BSD-2-Clause" ]
null
null
null
python/deccheck2.py
faradaynetworks/cdecimal
4be4045f99d13301882b80534d7523374d6eb5ac
[ "BSD-2-Clause" ]
null
null
null
python/deccheck2.py
faradaynetworks/cdecimal
4be4045f99d13301882b80534d7523374d6eb5ac
[ "BSD-2-Clause" ]
1
2019-09-26T18:34:24.000Z
2019-09-26T18:34:24.000Z
#!/usr/bin/env python # # Copyright (c) 2008-2010 Stefan Krah. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, t...
33.164375
96
0.585417
30,507
0.57492
0
0
0
0
0
0
9,210
0.173567
24f51f706d59ef12ae7c9778bb46f43394712322
1,362
py
Python
server/api/processing/models/dim_reduction/umap.py
JBris/dolphin_segmentation
b1d22293720c15038d9c521aed8e7b258d8409aa
[ "MIT" ]
1
2021-05-09T05:40:53.000Z
2021-05-09T05:40:53.000Z
server/api/processing/models/dim_reduction/umap.py
JBris/dolphin_segmentation
b1d22293720c15038d9c521aed8e7b258d8409aa
[ "MIT" ]
null
null
null
server/api/processing/models/dim_reduction/umap.py
JBris/dolphin_segmentation
b1d22293720c15038d9c521aed8e7b258d8409aa
[ "MIT" ]
null
null
null
import cv2 import numpy as np from joblib import load as model_load from api.services.file_select import FileTask def preprocess_images(image_files, img_size): images = [] for file in image_files: img = cv2.imread(file) img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) img = cv2.resize(img...
33.219512
94
0.687225
381
0.279736
0
0
0
0
0
0
227
0.166667
24f660253a038a05146b9855744f65f5a06fa0cb
6,099
py
Python
SupportVectorMachine/support_vector_machine.py
DragonYong/Sep-Dragon
674df34a992b449669116c5322596ffc19a21030
[ "MIT" ]
null
null
null
SupportVectorMachine/support_vector_machine.py
DragonYong/Sep-Dragon
674df34a992b449669116c5322596ffc19a21030
[ "MIT" ]
1
2020-09-10T04:05:06.000Z
2020-09-10T04:05:06.000Z
SupportVectorMachine/support_vector_machine.py
DragonYong/Sep-Dragon
674df34a992b449669116c5322596ffc19a21030
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 2020/9/9-22:50 # @Author : TuringEmmy # @Email : yonglonggeng@163.com # @WeChat : csy_lgy # @File : support_vector_machine.py # @Project : Sep-Dragon # ************************************************* import numpy as np import pandas as pd from sklearn.datasets import ...
30.959391
110
0.490572
5,181
0.808142
0
0
0
0
0
0
1,093
0.170488
24f6f3452f96ca5836016613b2d46de60f6bab90
2,668
py
Python
plaidml2/exec/__init__.py
winnerineast/plaidml
7a7191507f04f0853fed34cfd471ef76aa6d489f
[ "Apache-2.0" ]
1
2019-09-23T05:50:50.000Z
2019-09-23T05:50:50.000Z
plaidml2/exec/__init__.py
kounkounsito/plaidml
615cfce9dac7a5786a8895feadfd2aa13680d6de
[ "Apache-2.0" ]
null
null
null
plaidml2/exec/__init__.py
kounkounsito/plaidml
615cfce9dac7a5786a8895feadfd2aa13680d6de
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Intel Corporation. import numpy as np import plaidml2 as plaidml import plaidml2.settings as plaidml_settings from plaidml2.ffi import ForeignObject, decode_str, ffi, ffi_call, lib def __init(): ffi_call(lib.plaidml_exec_init) ffi.init_once(__init, 'plaidml_exec_init') def list_devices(): ...
33.772152
92
0.662294
1,679
0.62931
0
0
0
0
0
0
261
0.097826
24f6fd0967e1c029cb8eacd64a5cb40e6175ef0b
13,553
py
Python
afs/tests/lla/VolServerLLATest.py
chanke/afspy
525e7b3b53e58be515f11b83cc59ddb0765ef8e5
[ "BSD-2-Clause" ]
null
null
null
afs/tests/lla/VolServerLLATest.py
chanke/afspy
525e7b3b53e58be515f11b83cc59ddb0765ef8e5
[ "BSD-2-Clause" ]
null
null
null
afs/tests/lla/VolServerLLATest.py
chanke/afspy
525e7b3b53e58be515f11b83cc59ddb0765ef8e5
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python """ Unittest for the LLA module VolumeLLA """ from ConfigParser import ConfigParser import datetime import os import sys import time import unittest from afs.tests.BaseTest import parse_commandline import afs.lla.VolServerLLA import afs.lla.VLDBLLA import afs class EvaluateTestResults(unittes...
40.822289
98
0.675422
12,788
0.943555
0
0
3,028
0.223419
0
0
1,555
0.114735
24f6fd157b03fbd91d14ca3cfddf6f92d4bba3b6
548
py
Python
code/sf2.py
onnoeberhard/scipro-primer-notebooks
e9cf1069d62f8c50549d9912403c640f08a99392
[ "MIT" ]
16
2019-04-18T13:35:42.000Z
2021-09-05T21:01:06.000Z
code/sf2.py
onnoeberhard/scipro-primer-notebooks
e9cf1069d62f8c50549d9912403c640f08a99392
[ "MIT" ]
1
2021-02-15T16:26:00.000Z
2021-02-15T16:26:00.000Z
code/sf2.py
onnoeberhard/scipro-primer-notebooks
e9cf1069d62f8c50549d9912403c640f08a99392
[ "MIT" ]
17
2018-09-30T07:35:00.000Z
2021-08-28T19:15:09.000Z
from math import pi, sin def S(t, n, T): return 4 / pi * sum(sin(2 * (2*i - 1) * pi * t / T) / (2*i - 1) for i in range(1, n + 1)) def f(t, T): return 1 if 0 < t < T/2 else -1 if T/2 < t < T else 0 def test(): print(" n | alpha | error ") print("-----+--------+----------") T = 2*pi for ...
26.095238
93
0.421533
0
0
0
0
0
0
0
0
100
0.182482
24f791043bd9796713489db2bdf00e09dbb2fd36
3,831
py
Python
luna_transformer/model.py
sooftware/luna-transformer
fc06b453478dcfd9b7979b70af1b4f4507597891
[ "MIT" ]
26
2021-07-29T18:05:39.000Z
2022-02-04T20:03:13.000Z
luna_transformer/model.py
sooftware/luna-transformer
fc06b453478dcfd9b7979b70af1b4f4507597891
[ "MIT" ]
null
null
null
luna_transformer/model.py
sooftware/luna-transformer
fc06b453478dcfd9b7979b70af1b4f4507597891
[ "MIT" ]
1
2021-07-31T07:30:02.000Z
2021-07-31T07:30:02.000Z
# MIT License # # Copyright (c) 2021 Soohwan Kim # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, ...
40.755319
113
0.708431
2,498
0.652049
0
0
0
0
0
0
1,295
0.338032
24f8fbec9bbb99a029907adb70cb243de5f2d665
28,356
py
Python
sdk/python/pulumi_aws_native/eks/_inputs.py
AaronFriel/pulumi-aws-native
5621690373ac44accdbd20b11bae3be1baf022d1
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws_native/eks/_inputs.py
AaronFriel/pulumi-aws-native
5621690373ac44accdbd20b11bae3be1baf022d1
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws_native/eks/_inputs.py
AaronFriel/pulumi-aws-native
5621690373ac44accdbd20b11bae3be1baf022d1
[ "Apache-2.0" ]
null
null
null
# 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 from...
45.661836
586
0.678481
27,169
0.958139
0
0
27,454
0.96819
0
0
13,050
0.46022
24f9bb21ea848732645dd95fdfaf8ef61a4a7e4b
6,726
py
Python
nfbackend/testboard_utils.py
neuralfoo/neuralfoo
d40388cd506d612ceee9ae10d92985c794249c65
[ "MIT" ]
2
2022-01-06T08:18:29.000Z
2022-01-06T08:19:09.000Z
nfbackend/testboard_utils.py
neuralfoo/neuralfoo
d40388cd506d612ceee9ae10d92985c794249c65
[ "MIT" ]
null
null
null
nfbackend/testboard_utils.py
neuralfoo/neuralfoo
d40388cd506d612ceee9ae10d92985c794249c65
[ "MIT" ]
null
null
null
import dbops from loguru import logger import traceback from bson.objectid import ObjectId import utils import global_vars as g import fs_utils def create_testboard(data,userID,organizationID): try: if dbops.check_if_exists("testboards","apiName",data["apiName"]): message = "Testboard name...
26.376471
113
0.610616
0
0
0
0
0
0
0
0
1,258
0.187035
24fc99522f8cef361d5310abdeb64520bc477f16
1,308
py
Python
e-threader/mail.py
GammaGames/e-threader
60c028a1e823ecc5ed4d20d15881d73db75e3630
[ "MIT" ]
null
null
null
e-threader/mail.py
GammaGames/e-threader
60c028a1e823ecc5ed4d20d15881d73db75e3630
[ "MIT" ]
null
null
null
e-threader/mail.py
GammaGames/e-threader
60c028a1e823ecc5ed4d20d15881d73db75e3630
[ "MIT" ]
null
null
null
import smtplib import os from os.path import basename from email.mime.application import MIMEApplication from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.utils import COMMASPACE, formatdate GMAIL_USERNAME = client_secret=os.getenv("GMAIL_USERNAME") GMAIL_PASSWORD = client...
29.727273
75
0.674312
0
0
0
0
0
0
949
0.725535
209
0.159786