hexsha stringlengths 40 40 | size int64 6 782k | ext stringclasses 7
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 237 | max_stars_repo_name stringlengths 6 72 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses list | max_stars_count int64 1 53k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 184 | max_issues_repo_name stringlengths 6 72 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses list | max_issues_count int64 1 27.1k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 184 | max_forks_repo_name stringlengths 6 72 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses list | max_forks_count int64 1 12.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 6 782k | avg_line_length float64 2.75 664k | max_line_length int64 5 782k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8ca6fca95d8a7709c57af1a1b33768b3c64ab25c | 11,069 | py | Python | solutions/Mixed_query/mixed_query.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | 1 | 2021-04-06T06:13:20.000Z | 2021-04-06T06:13:20.000Z | solutions/Mixed_query/mixed_query.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | null | null | null | solutions/Mixed_query/mixed_query.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | null | null | null | import sys, getopt
import os
import time
from milvus import Milvus, DataType
import psycopg2
import numpy as np
QUERY_PATH = 'bigann_query.bvecs'
# query_location = 0
MILVUS_collection = 'mixed06'
SERVER_ADDR = "0.0.0.0"
SERVER_PORT = 19573
# TOP_K = 10
# DISTANCE_THRESHOLD = 1
# milvus = Milvus()
sex_flag = ... | 29.675603 | 108 | 0.450086 |
0fabef7250424d972a8ec32130e0b0884baa0919 | 604 | py | Python | Packs/FeedMalwareDomainList/Integrations/FeedMalwareDomainList/FeedMalwareDomainList.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/FeedMalwareDomainList/Integrations/FeedMalwareDomainList/FeedMalwareDomainList.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/FeedMalwareDomainList/Integrations/FeedMalwareDomainList/FeedMalwareDomainList.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from CommonServerPython import *
def main():
params = {k: v for k, v in demisto.params().items() if v is not None}
params['indicator_type'] = FeedIndicatorType.IP
params['url'] = 'http://www.malwaredomainlist.com/hostslist/ip.txt'
params['indicator'] = json.dumps({
"regex": r"^\d{1,3}\.\d{1,... | 26.26087 | 81 | 0.64404 |
e88403b0b041f7e9ec3f71427424b1fd90928814 | 9,864 | py | Python | Packs/CreatePlbkDoc/Scripts/CreatePlbkDoc/CreatePlbkDoc.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 1 | 2022-03-15T13:16:24.000Z | 2022-03-15T13:16:24.000Z | Packs/CreatePlbkDoc/Scripts/CreatePlbkDoc/CreatePlbkDoc.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 87 | 2022-02-23T12:10:53.000Z | 2022-03-31T11:29:05.000Z | Packs/CreatePlbkDoc/Scripts/CreatePlbkDoc/CreatePlbkDoc.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | null | null | null | import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
# import json
from docx import Document
from docx.enum.section import WD_ORIENT # pylint: disable=E0611
from docx.shared import Inches
# Purpose: This automation will produce docx file detailing the tasks in the given pla... | 31.615385 | 114 | 0.573297 |
0f5ecfe41f41bb68602a6cbdf5b754f65fcf202a | 2,782 | py | Python | server/apps/recommendation/calculate_similary_movie.py | Mayandev/django_morec | 8d115f76ad69d7aa78b07dc06aa7047979ad134b | [
"MIT"
] | 129 | 2019-04-20T08:23:25.000Z | 2022-03-14T10:02:23.000Z | server/apps/recommendation/calculate_similary_movie.py | heartplus/django_morec | 8d115f76ad69d7aa78b07dc06aa7047979ad134b | [
"MIT"
] | 9 | 2019-05-19T15:06:17.000Z | 2021-12-14T06:47:14.000Z | server/apps/recommendation/calculate_similary_movie.py | heartplus/django_morec | 8d115f76ad69d7aa78b07dc06aa7047979ad134b | [
"MIT"
] | 34 | 2019-05-06T06:37:17.000Z | 2021-12-09T02:27:58.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019-04-27 11:14
# @Author : Mayandev
# @Site : https://github.com/Mayandev/
# @Software: PyCharm
import os;
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "morec.settings") # NoQA
import django;
django.setup() #
import pandas as pd
import numpy as ... | 28.979167 | 114 | 0.722142 |
7e42326878ce46cf8c88f966e99756b993fcf8e3 | 9,591 | py | Python | src/onegov/feriennet/views/match.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/views/match.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/views/match.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.cache import lru_cache
from onegov.activity import Attendee
from onegov.activity import Booking, BookingCollection, Occasion
from onegov.activity.matching import deferred_acceptance_from_database
from onegov.core.security import Secret
from onegov.core.utils import normalize_for_url
from onegov.ferienn... | 33.418118 | 79 | 0.548848 |
adb9178676a12cb652ffc76f503ed920fc12ac71 | 4,147 | py | Python | src/controller/descriptions.py | wrthfl/pyopenms-tewb | f02ab0393df746846c26ed6c812964f9da355b99 | [
"Zlib",
"Apache-2.0"
] | 1 | 2020-05-26T16:16:14.000Z | 2020-05-26T16:16:14.000Z | src/controller/descriptions.py | wrthfl/pyopenms-tewb | f02ab0393df746846c26ed6c812964f9da355b99 | [
"Zlib",
"Apache-2.0"
] | null | null | null | src/controller/descriptions.py | wrthfl/pyopenms-tewb | f02ab0393df746846c26ed6c812964f9da355b99 | [
"Zlib",
"Apache-2.0"
] | 1 | 2020-05-16T20:09:17.000Z | 2020-05-16T20:09:17.000Z | import os
import sys
import glob
import pandas as pd
import re
class Descriptions:
"""
Filehandler class that provides support for file and directory interaction.
"""
def __init__(self, descriptions):
self.descriptions = descriptions
descriptions = {"welcome":
"""
... | 46.077778 | 79 | 0.441283 |
1dee77f199842f1c37c4311a6417608d8b08623a | 532 | py | Python | nz_django/day8/djang_drf_demo/front/authentications.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_django/day8/djang_drf_demo/front/authentications.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_django/day8/djang_drf_demo/front/authentications.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | from django.core.cache import cache
from rest_framework.authentication import BaseAuthentication
from .models import User
#首先根据token从缓存中取出来 没有返回空
#如果有 取出指定的 user.id
#根据user.id 从数据库中取出详细的信息
#判断是否有权限
class UserAuthentication(BaseAuthentication):
def authenticate(self, request):
try:
token = requ... | 26.6 | 60 | 0.684211 |
2a88fb57354b1649ad1691354f9868143dbe4c68 | 1,066 | py | Python | Skripte/Python/plot_gluehbirne_alufolie_modulation.py | tomg404/WSeminar19-21 | 6f1ebaf6222f0db892b568bf021b87717d461345 | [
"MIT"
] | null | null | null | Skripte/Python/plot_gluehbirne_alufolie_modulation.py | tomg404/WSeminar19-21 | 6f1ebaf6222f0db892b568bf021b87717d461345 | [
"MIT"
] | null | null | null | Skripte/Python/plot_gluehbirne_alufolie_modulation.py | tomg404/WSeminar19-21 | 6f1ebaf6222f0db892b568bf021b87717d461345 | [
"MIT"
] | null | null | null | from vars import *
csv_file1 = CSV_FOLDER + "Experiment3/" + "gluehbirne_alufolie_modulation.csv"
csv_file2 = CSV_FOLDER + "Experiment3/" + "gluehbirne_ohne_alufolie.csv"
x1 = np.genfromtxt(csv_file1, delimiter=",", skip_header=8, usecols=1) / 1000000
y1 = np.genfromtxt(csv_file1, delimiter=",", skip_header=8, usec... | 29.611111 | 86 | 0.727017 |
2dacb9436922000e8273a11e11086baf53860d4d | 70 | py | Python | Python/Math/polar_coordinates.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | Python/Math/polar_coordinates.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | Python/Math/polar_coordinates.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | import cmath
print('\n'.join(map(str, cmath.polar(complex(input()))))) | 35 | 57 | 0.7 |
2dfc99988e3753b2c5762ed79c9e0b1b3dfa08d8 | 775 | py | Python | data/parquet-testing/decimal/create-pandas-decimal.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 2,816 | 2018-06-26T18:52:52.000Z | 2021-04-06T10:39:15.000Z | data/parquet-testing/decimal/create-pandas-decimal.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 1,310 | 2021-04-06T16:04:52.000Z | 2022-03-31T13:52:53.000Z | data/parquet-testing/decimal/create-pandas-decimal.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 270 | 2021-04-09T06:18:28.000Z | 2022-03-31T11:55:37.000Z | import pandas
df = pandas.DataFrame({'value0': [1234, -1234, 1, -1, 0, None], 'value1': [12.34, -12.34, 1.0, -1.0, 0.0, None], 'value2': [12345.6789, -9765.4321, 1.0, -1.0, 0.0, None], 'value3': [123456789.987654321, -987654321.123456789, 1.0, -1.0, 0.0, None], 'value4': ['922337203685477580700.922306854775000', '-922... | 38.75 | 371 | 0.664516 |
87b69cb69b7cb72fc4d6ea599200836854fa17c6 | 1,810 | py | Python | Kaggle-Competitions/Rossman-Stores-Sales/scripts/rossman.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:16:23.000Z | 2019-05-10T09:16:23.000Z | Kaggle-Competitions/Rossman-Stores-Sales/scripts/rossman.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | null | null | null | Kaggle-Competitions/Rossman-Stores-Sales/scripts/rossman.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-10-14T07:30:18.000Z | 2019-10-14T07:30:18.000Z | import pandas as pd
from math import sqrt
import numpy as np
from sklearn.cross_validation import train_test_split
class Rossman():
def __init__(self, train_file_path, test_file_path, stores_file_path):
"""
Sets in the file path for training, test and store
info csv's
"""
... | 30.677966 | 87 | 0.663536 |
354e28b5ac1e1e3e784dbcc85b32742fc4a29c9b | 1,371 | py | Python | src/test/tests/operators/amr_stitch.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/operators/amr_stitch.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/operators/amr_stitch.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: amr_stitch.py
#
# Programmer: Gunther H. Weber
# Date: April 29, 2014
#
# Modifications:
#
# Alister Maguire, Wed Jan 6 08:31:05 PST 2021
# Added the -enable-ghosts-for-t-intersections... | 27.979592 | 115 | 0.645514 |
17eae2f3fe2a664241982a2165dadeadc8bc7f7f | 81,374 | py | Python | TestBot/test_cogs/pokeroulette.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | TestBot/test_cogs/pokeroulette.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | TestBot/test_cogs/pokeroulette.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | from datetime import datetime as dt, timedelta as td
from discord.ext import commands
import asyncio
import logging
import re
import typing
from discord import Member, Embed, Colour, File
from random import random, choices, choice
from collections import Counter
from . import pokerouletteFunctions as PRF
from .pokeroul... | 41.411705 | 237 | 0.682405 |
103fdc8ccf05f7c39848bb2d1241de176f4e1e2d | 5,975 | py | Python | tests/conftest.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 8 | 2022-02-24T14:59:24.000Z | 2022-03-31T04:37:55.000Z | tests/conftest.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 3 | 2022-02-27T17:08:52.000Z | 2022-03-18T13:11:01.000Z | tests/conftest.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 2 | 2022-02-24T15:03:07.000Z | 2022-03-15T03:12:00.000Z | import json
import os
from random import randint
from typing import Any, Callable, Dict, Generator, List, Optional
from unittest.mock import MagicMock, patch
from pytest import MonkeyPatch, fixture
from volley.config import get_configs
from volley.connectors.confluent import ConfluentKafkaConsumer, ConfluentKafkaProd... | 28.183962 | 100 | 0.628117 |
52b742e22ca616899adc32ddc3308906cb5a8c4d | 8,869 | py | Python | third_party/freetype/tests/scripts/download-test-fonts.py | gittem01/2DGraphics | 13ced300149a37b050ca3365483035eeaf7c73e3 | [
"MIT"
] | 10 | 2021-11-18T09:34:48.000Z | 2022-02-13T15:27:31.000Z | lib/freetype/tests/scripts/download-test-fonts.py | leodlplq/IMACraft | 5fec1729238e7e428bd39543dfd1fad521e16047 | [
"MIT"
] | 1 | 2021-11-20T01:36:44.000Z | 2021-11-21T02:14:43.000Z | lib/freetype/tests/scripts/download-test-fonts.py | leodlplq/IMACraft | 5fec1729238e7e428bd39543dfd1fad521e16047 | [
"MIT"
] | 1 | 2021-04-18T12:06:55.000Z | 2021-04-18T12:06:55.000Z | #!/usr/bin/env python3
"""Download test fonts used by the FreeType regression test programs. These
will be copied to $FREETYPE/tests/data/ by default."""
import argparse
import collections
import hashlib
import io
import os
import requests
import sys
import zipfile
from typing import Callable, List, Optional, Tuple... | 29.270627 | 94 | 0.626001 |
7612e238dcd4ec4a748a380cc568a46dc2473e97 | 621 | py | Python | Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/096_@property-_getters_e_setters/estoque.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/096_@property-_getters_e_setters/estoque.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/096_@property-_getters_e_setters/estoque.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | class Estoque:
def __init__(self, nome, preco, quantidade):
self.nome = nome
self.preco = preco
self.quantidade = quantidade
def totalEstoque(self):
return self.preco * self.quantidade
def adicionar(self, add):
self.quantidade += add
... | 21.413793 | 50 | 0.63285 |
5e684a19a9ff749c138d07a27b8ac284fc5122dc | 375 | py | Python | myscrumy/websocket/models.py | Justfemi/Nameless | 239a44fd571d10d55a80a787ee865714c41552fa | [
"MIT"
] | null | null | null | myscrumy/websocket/models.py | Justfemi/Nameless | 239a44fd571d10d55a80a787ee865714c41552fa | [
"MIT"
] | null | null | null | myscrumy/websocket/models.py | Justfemi/Nameless | 239a44fd571d10d55a80a787ee865714c41552fa | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class Connection( models.Model ):
connection_id = models.CharField( max_length=255 )
def __str__(self):
return self
class ChatMessage( models.Model ):
username = models.CharField( max_length=50 )
message = models.CharField( max_length=40... | 26.785714 | 54 | 0.717333 |
0d7beec46320181fba24873029c692016c5b15d5 | 1,085 | py | Python | Chapter10_RNN/rnnKeras.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter10_RNN/rnnKeras.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter10_RNN/rnnKeras.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | import random
import numpy as np
import tensorflow as tf
from tensorflow.keras.layers import SimpleRNN
from tensorflow.keras.models import Sequential
np.random.seed(0)
tf.random.set_seed(0)
def sigmoid_fn(x: np.ndarray) -> np.ndarray:
return x # TODO
def tanh_fn(x: np.ndarray) -> np.ndarray:... | 23.085106 | 98 | 0.640553 |
0d81e458404a152283c7354836d3fd46214cd80e | 1,464 | py | Python | s-mbf-master/src/Lgrup.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 50 | 2019-03-07T16:33:01.000Z | 2022-01-05T11:13:47.000Z | s-mbf-master/src/Lgrup.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 3 | 2019-03-11T08:26:38.000Z | 2019-08-08T17:39:42.000Z | s-mbf-master/src/Lgrup.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 38 | 2019-03-28T16:03:38.000Z | 2021-04-01T10:40:26.000Z | import requests,os,json,mechanize,time,click
from http.cookiejar import LWPCookieJar as kuki
from src import Genkuki
class Lgrup:
def __init__(self):
#install browser
self.br=mechanize.Browser()
self.br.set_handle_equiv(True)
self.br.set_handle_robots(False)
self.br.set_handle_refresh( mechanize._... | 30.5 | 175 | 0.644126 |
df0312aae10e979078b8ec4955f73c382e60a5f4 | 249 | py | Python | Variablen und Operatoren/Eingabe/zahl.py | DietrichPaul/Einstieg-in-Python | 0d28402f962773274d85e6bb169ae631c91f66ce | [
"CC0-1.0"
] | null | null | null | Variablen und Operatoren/Eingabe/zahl.py | DietrichPaul/Einstieg-in-Python | 0d28402f962773274d85e6bb169ae631c91f66ce | [
"CC0-1.0"
] | null | null | null | Variablen und Operatoren/Eingabe/zahl.py | DietrichPaul/Einstieg-in-Python | 0d28402f962773274d85e6bb169ae631c91f66ce | [
"CC0-1.0"
] | null | null | null | # Eingabe einer Zahl
print("Bitte eine ganze Zahl eingeben")
x = input()
print("Ihre Eingabe:", x)
# Umwandlung in eine ganze Zahl
xganz = int(x)
print("Als ganze Zahl:", xganz)
# Mit Berechnung
xdoppel = xganz * 2
print("Das Doppelte:", xdoppel)
| 19.153846 | 39 | 0.702811 |
6356c10b3e6dc45a0fef83fd1dd806ca6e534025 | 13,944 | py | Python | LibMS/libapp/views.py | StephenWayen/LibMS | df6078a8171f77b75f2ad3ac91e9747ef753d2a6 | [
"MIT"
] | 2 | 2021-05-31T13:11:50.000Z | 2021-06-05T04:37:51.000Z | LibMS/libapp/views.py | StephenWayen/LibMS | df6078a8171f77b75f2ad3ac91e9747ef753d2a6 | [
"MIT"
] | null | null | null | LibMS/libapp/views.py | StephenWayen/LibMS | df6078a8171f77b75f2ad3ac91e9747ef753d2a6 | [
"MIT"
] | null | null | null | import datetime
from django.contrib import messages
from django.core.mail import send_mail
from django.core.paginator import Paginator
from django.db.models import Q, F
from django.http import HttpResponse
from django.shortcuts import render, redirect
import hashlib
from django.urls import reverse
from data.randomData ... | 34.773067 | 128 | 0.582473 |
892a1508285858af04036813b78d256f4aeba1ed | 2,605 | py | Python | 21-fs-ias-lec/03-BACnetCore/src/replication/udp_channel.py | cn-uofbasel/BCN | 2d0852e00f2e7f3c4f7cf30f60c6765f2761f80a | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 21-fs-ias-lec/03-BACnetCore/src/replication/udp_channel.py | cn-uofbasel/BCN | 2d0852e00f2e7f3c4f7cf30f60c6765f2761f80a | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 21-fs-ias-lec/03-BACnetCore/src/replication/udp_channel.py | cn-uofbasel/BCN | 2d0852e00f2e7f3c4f7cf30f60c6765f2761f80a | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | from queue import Queue, Empty
from .channel import Channel
import socket
from threading import Thread
class UDPChannel(Channel):
"""
This is a specific implementation of a channel, using the UDP protocol. It can be used like that
or be seen as an example class for further channel implementations using di... | 31.011905 | 113 | 0.615739 |
984828ef62d7c05a88ea42670c7a599e814e70d3 | 98 | py | Python | app/config/config.py | zucc-acm-devteam/zuccacm-sso | 9c7d2f0b9cc069962f32b555152732a98bf2e94a | [
"Apache-2.0"
] | null | null | null | app/config/config.py | zucc-acm-devteam/zuccacm-sso | 9c7d2f0b9cc069962f32b555152732a98bf2e94a | [
"Apache-2.0"
] | null | null | null | app/config/config.py | zucc-acm-devteam/zuccacm-sso | 9c7d2f0b9cc069962f32b555152732a98bf2e94a | [
"Apache-2.0"
] | null | null | null | port = 5003
redis_key_prefix = 'ACMSSO::'
ticket_length = 20
ticket_expire_time = 5 * 60 # 5 min
| 19.6 | 36 | 0.714286 |
7f595dfc2be99455d4cc5f9e2eb8dccdf4603fe0 | 1,841 | py | Python | SBTK_League_Helper/src/tools/seeders.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/src/tools/seeders.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/src/tools/seeders.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | from random import shuffle, sample
###########################
# ZIG-ZAG
# SEEDERS
###########################
# Fair at the top
def snake_generator(players, groups):
step = 1
limits = {-1: 0 , 1: groups-1}
n = 0
while players > 0:
players -= 1
yield n
if n == limits[step]:
... | 22.45122 | 83 | 0.500815 |
d620410b142b281e104ecc64cf5c66f67a6d187b | 4,741 | py | Python | projects/g4h2-graduation-project/src/backends/scf_functions/handler_check_result.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | projects/g4h2-graduation-project/src/backends/scf_functions/handler_check_result.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | projects/g4h2-graduation-project/src/backends/scf_functions/handler_check_result.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | import json
import logging
import sys
import time
from typing import Dict, List, Optional, Union
from conf import settings
from utils.exceptions import exception_handler, HttpException, BadRequest, NotFound, InternalServerError
from utils.response import generate_response
sys.path.insert(0, './libs')
from ... | 28.560241 | 110 | 0.609576 |
61937d205f7e2273cc8dae37b106b3104e88fedf | 624 | py | Python | Koordinatendarstellung_GPS_V.py | raswz/wifionice | 67f1fa7a6b396afe7a447a4d10adbc64dcbcdd4f | [
"CC-BY-4.0"
] | null | null | null | Koordinatendarstellung_GPS_V.py | raswz/wifionice | 67f1fa7a6b396afe7a447a4d10adbc64dcbcdd4f | [
"CC-BY-4.0"
] | null | null | null | Koordinatendarstellung_GPS_V.py | raswz/wifionice | 67f1fa7a6b396afe7a447a4d10adbc64dcbcdd4f | [
"CC-BY-4.0"
] | null | null | null | import matplotlib.pyplot as plt
import pandas as pd
data = pd.read_parquet('wifionice.parquet') #Importiert die WifionIce.parquet-Datei
y = data['gps_breite'] # Setzt die Breitenkoordinaten aus der Datei als x-Variable
x = data['gps_laenge'] # Setzt die Breitenkoordinaten aus der Datei als y-Variable
s = data['gps_v'... | 48 | 123 | 0.775641 |
4ee7ad0517627b6ad9184ac15f67be9567d08f62 | 3,490 | py | Python | wanghao/flask-tutorial/flaskr/lijing/lijing_basicinfo.py | lijianran/FlaskWeb | 788f62d2bcdc374e03cc1623ee4bf21db697ace9 | [
"Apache-2.0"
] | null | null | null | wanghao/flask-tutorial/flaskr/lijing/lijing_basicinfo.py | lijianran/FlaskWeb | 788f62d2bcdc374e03cc1623ee4bf21db697ace9 | [
"Apache-2.0"
] | null | null | null | wanghao/flask-tutorial/flaskr/lijing/lijing_basicinfo.py | lijianran/FlaskWeb | 788f62d2bcdc374e03cc1623ee4bf21db697ace9 | [
"Apache-2.0"
] | null | null | null | from flask import (
Blueprint, flash, g, redirect, render_template, request, url_for, jsonify, session
)
from werkzeug.exceptions import abort
from werkzeug.utils import secure_filename
from flaskr.auth import login_required
from flaskr.db import get_db, get_lijing_db
#from flaskr.lijing.lijing_index import floa... | 30.347826 | 103 | 0.606017 |
f673fd52ad6dc0c1efe79fda55b4aabc892f282e | 1,484 | py | Python | answer_partner.py | SnackMen/AnswerPartner | 122c454d90e534ca7386eca24d3e535d318dd391 | [
"MIT"
] | null | null | null | answer_partner.py | SnackMen/AnswerPartner | 122c454d90e534ca7386eca24d3e535d318dd391 | [
"MIT"
] | null | null | null | answer_partner.py | SnackMen/AnswerPartner | 122c454d90e534ca7386eca24d3e535d318dd391 | [
"MIT"
] | null | null | null | import os
import pytesseract
import time
import requests
from PIL import Image
from bs4 import BeautifulSoup
def screen_shots():
time1 = time.clock()
os.system('adb shell screencap -p /sdcard/autosearch.png')
os.system('adb pull /sdcard/autosearch.png .')
print('截图:' + str(time.clock() - time1))
de... | 28.538462 | 105 | 0.605121 |
9c9961e138b2f50ee01586ac2cd0d68f4edfec23 | 3,001 | py | Python | Utils/py/ActionSelection/experimental/QLearning/q-learning.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/ActionSelection/experimental/QLearning/q-learning.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/ActionSelection/experimental/QLearning/q-learning.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import gamefield
import threading
import time
import random
import numpy as np
import copy
discount = 0.99 # future influence - discount factor
actions = gamefield.actions
states = gamefield.field
specials = gamefield.specials
number_of_actions = len(actions) - 1
Q = {}
for key in states: # auslagern in gamefield ... | 24.598361 | 69 | 0.584472 |
145293f2ae52e9e87d22a3c35f91c9c0d068dcb5 | 15,413 | py | Python | MyParser.py | hakimkt/SAIVS | c310bd7c9426f0d21efeea8866cf6b881b7e8530 | [
"Apache-2.0"
] | 40 | 2018-10-29T02:29:13.000Z | 2021-11-23T13:14:50.000Z | MyParser.py | 5l1v3r1/SAIVS | aa62451665b6398ba329d68592bf4313be60a886 | [
"Apache-2.0"
] | 1 | 2021-02-23T12:27:28.000Z | 2021-02-23T12:27:28.000Z | MyParser.py | 5l1v3r1/SAIVS | aa62451665b6398ba329d68592bf4313be60a886 | [
"Apache-2.0"
] | 29 | 2018-10-29T02:29:17.000Z | 2022-03-17T06:31:35.000Z | #!/usr/bin/python
#coding:utf-8
import lxml.html
import re
from bs4 import BeautifulSoup
# 受信したレスポンスの解析(遷移先URLの抽出)
class HtmlParser:
def __init__(self):
return
# aタグのhref要素の取得
def get_a_tags(self, str_protocol, int_Port, str_fqdn, str_path, str_response):
# 診断対象のFQDN
... | 41.769648 | 132 | 0.52326 |
1add9a5fb9100d09724b0402e94f39d66c48b488 | 1,346 | py | Python | python/oneflow/test/models/run_cnns_test.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | oneflow/python/test/models/run_cnns_test.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | oneflow/python/test/models/run_cnns_test.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | 520 | 2020-07-31T05:52:42.000Z | 2022-03-29T02:38:11.000Z | """
Copyright 2020 The OneFlow Authors. 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 required by applicable law or agr... | 24.035714 | 83 | 0.786776 |
0d0d3a940456e916ca0ae3eb6874aa864668a60f | 5,862 | py | Python | etl/data_extraction/scrapers/european_youth_portal.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 7 | 2020-04-23T20:16:11.000Z | 2022-01-04T14:57:16.000Z | etl/data_extraction/scrapers/european_youth_portal.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 361 | 2020-04-23T17:20:14.000Z | 2022-03-02T11:29:45.000Z | etl/data_extraction/scrapers/european_youth_portal.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 1 | 2021-11-29T06:02:52.000Z | 2021-11-29T06:02:52.000Z | import re
from data_extraction.scraper import Scraper
class EuropeanYouthPortalScraper(Scraper):
"""Scrapes the website https://europa.eu."""
base_url = 'https://europa.eu'
debug = True
def parse(self, response, url):
"""Handles the soupified response of a detail page in the predefined way ... | 40.427586 | 177 | 0.56056 |
0d265c6ba2193a7f8db2a30088e65c0aa6ddc979 | 5,118 | py | Python | pandemie/visualization/preprocessing.py | marvinsxtr/informaticup-2020-pandemie | 0d37d5236eadfe7bb3cbd7cbfd0e1b7afca74c89 | [
"MIT"
] | null | null | null | pandemie/visualization/preprocessing.py | marvinsxtr/informaticup-2020-pandemie | 0d37d5236eadfe7bb3cbd7cbfd0e1b7afca74c89 | [
"MIT"
] | null | null | null | pandemie/visualization/preprocessing.py | marvinsxtr/informaticup-2020-pandemie | 0d37d5236eadfe7bb3cbd7cbfd0e1b7afca74c89 | [
"MIT"
] | 1 | 2020-03-28T00:02:41.000Z | 2020-03-28T00:02:41.000Z | """
This file handles the pre-processing of the raw json data and stores the logs in dicts.
"""
import json
import os
from collections import defaultdict
logs_path = "/logs/"
# Max number of flight connections displayed
MAX_PATHS = 100
# This list has the raw game data as a list of json objects for each round
raw_... | 31.592593 | 115 | 0.649082 |
d32bb77e00aed055e9261c70e6d710c42917d6fb | 668 | py | Python | exercises/pt/test_03_06.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/test_03_06.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/test_03_06.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | def test():
assert "len(doc)" in __solution__, "Você está obtendo o tamanho (length) do doc?"
assert "return doc" in __solution__, "Você está retornando o doc?"
assert (
"nlp.add_pipe" in __solution__
), "Você está adicionando o componente ao pipeline?"
assert (
"first=True" in __sol... | 39.294118 | 87 | 0.676647 |
6c9151f4cf77cec80cccb4ee59b0e93ea54ddf63 | 2,061 | py | Python | packages/watchmen-storage/src/watchmen_storage/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-storage/src/watchmen_storage/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-storage/src/watchmen_storage/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from .competitive_worker_id_generator import competitive_worker_id, CompetitiveWorker, CompetitiveWorkerIdGenerator, \
CompetitiveWorkerRestarter, CompetitiveWorkerShutdownListener, CompetitiveWorkerShutdownSignal, get_host_ip, \
WorkerCreationException, WorkerDeclarationException, WorkerFirstDeclarationException
fro... | 82.44 | 118 | 0.889374 |
6cbddf2e7235662fae84b617c44542e705e92098 | 1,155 | py | Python | oldp/apps/laws/management/commands/set_law_book_revision.py | ImgBotApp/oldp | 575dc6f711dde3470d910e21c9440ee9b79a69ed | [
"MIT"
] | 3 | 2020-06-27T08:19:35.000Z | 2020-12-27T17:46:02.000Z | oldp/apps/laws/management/commands/set_law_book_revision.py | ImgBotApp/oldp | 575dc6f711dde3470d910e21c9440ee9b79a69ed | [
"MIT"
] | null | null | null | oldp/apps/laws/management/commands/set_law_book_revision.py | ImgBotApp/oldp | 575dc6f711dde3470d910e21c9440ee9b79a69ed | [
"MIT"
] | null | null | null | import logging
from django.core.management import BaseCommand
from django.db import models
from oldp.apps.laws.models import LawBook
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = 'Set latest revision of law books'
def __init__(self):
super(Command, self).__init__()
d... | 33.970588 | 126 | 0.685714 |
4ce1bd4602d06b06642e38cf623a1aab740cac4a | 211 | py | Python | exercises/fr/exc_02_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/fr/exc_02_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/fr/exc_02_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
# Charge le modèle fr_core_news_md
nlp = ____
# Traite le texte
doc = nlp("Deux bananes en pyjamas")
# Obtiens le vecteur pour le token "bananes"
bananas_vector = ____.____
print(bananas_vector)
| 17.583333 | 44 | 0.763033 |
e2aa82ab2b4b96651a1d841288f0b23044ace85e | 2,774 | py | Python | WeChatSecretary/main.py | TitusWongCN/WeChatRelativeTools | 9307bae8c15e47b5bbf169a95a50be0d107a5bb1 | [
"MIT"
] | null | null | null | WeChatSecretary/main.py | TitusWongCN/WeChatRelativeTools | 9307bae8c15e47b5bbf169a95a50be0d107a5bb1 | [
"MIT"
] | null | null | null | WeChatSecretary/main.py | TitusWongCN/WeChatRelativeTools | 9307bae8c15e47b5bbf169a95a50be0d107a5bb1 | [
"MIT"
] | null | null | null | # -*- coding=utf-8 -*-
# python37
from itchat.content import *
import itchat
from utils.wechat_wiki import get_weather
# 自动回复
@itchat.msg_register([TEXT, MAP, CARD, NOTE, SHARING])
def text_reply(msg):
# 发送者的昵称
sender_name = msg['User']['NickName'] if 'NickName' in msg['User'] else 'filehelper'
# 发送消息的内容
... | 38.527778 | 109 | 0.605624 |
2c555c2217dbea18f36a559cae5b1500229836cd | 928 | py | Python | coremlConverter.py | JugendForscht-CoLoS/SunDetection-NeuralNetwork | 139bcc314cf6b5b84a82b08fda8b1e4455f7cf93 | [
"MIT"
] | 4 | 2021-02-26T15:47:28.000Z | 2021-03-04T16:46:00.000Z | coremlConverter.py | JugendForscht-CoLoS/SunDetection-NeuralNetwork | 139bcc314cf6b5b84a82b08fda8b1e4455f7cf93 | [
"MIT"
] | null | null | null | coremlConverter.py | JugendForscht-CoLoS/SunDetection-NeuralNetwork | 139bcc314cf6b5b84a82b08fda8b1e4455f7cf93 | [
"MIT"
] | 1 | 2021-02-24T13:01:21.000Z | 2021-02-24T13:01:21.000Z | import coremltools as ct
import tensorflow as tf
from model.unet import getModel
from losses.losses import TverskyLoss
pathML = "/Users/timjaeger/Desktop/SunDetector.mlmodel"
author = "Jonas Riemann"
modelLicense = "MIT-License (https://github.com/JugendForscht-CoLoS/SunDetection-NeuralNetwork/blob/main/LICENSE)"
des... | 34.37037 | 114 | 0.744612 |
46bafd2bb7b326dceb4d278a6ce950c1bf1e2a34 | 309 | py | Python | Packs/FeedMitreAttack/Scripts/MItreNameLayoutDynamicSection/MitreNameLayoutDynamicSection.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/FeedMitreAttack/Scripts/MItreNameLayoutDynamicSection/MitreNameLayoutDynamicSection.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/FeedMitreAttack/Scripts/MItreNameLayoutDynamicSection/MitreNameLayoutDynamicSection.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
mitre_name = demisto.get(demisto.args()['indicator'], 'CustomFields.mitrename') or ''
demisto.results(
{'ContentsFormat': formats['markdown'], 'Type': entryTypes['note'], 'Contents': f'# {mitre_name}'})
| 34.333333 | 103 | 0.7411 |
64c345b8cbb0229000bb35f350fb88894c98df66 | 933 | py | Python | multithread.py | aertoria/MiscCode | a2e94d0fe0890e6620972f84adcb7976ca9f1408 | [
"Apache-2.0"
] | null | null | null | multithread.py | aertoria/MiscCode | a2e94d0fe0890e6620972f84adcb7976ca9f1408 | [
"Apache-2.0"
] | null | null | null | multithread.py | aertoria/MiscCode | a2e94d0fe0890e6620972f84adcb7976ca9f1408 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
from threading import Thread
import time
import threading
import multiprocessing
tLock = threading.Lock()
pLock = multiprocessing.Lock()
num = multiprocessing.Value('d', 0.0)#double
i=0
def timer(name, delay, repeat):
print "Timer: "+name+" started"
global i
i = 0
global num
num.value+... | 17.277778 | 72 | 0.670954 |
376719b9686a967ec6fc2012af33402d9b249545 | 350 | py | Python | stock/StockInterface.py | mamenglong/StockFund | e80d8a185c37023c3e7849a1b7b03d81a165af6f | [
"Apache-2.0"
] | null | null | null | stock/StockInterface.py | mamenglong/StockFund | e80d8a185c37023c3e7849a1b7b03d81a165af6f | [
"Apache-2.0"
] | null | null | null | stock/StockInterface.py | mamenglong/StockFund | e80d8a185c37023c3e7849a1b7b03d81a165af6f | [
"Apache-2.0"
] | null | null | null | from abc import ABCMeta, abstractclassmethod
class StockInterface(metaclass=ABCMeta):
# 抽象方法
@classmethod
def getBaseUrl(self): pass
@classmethod
def formatResultData(self, result): pass
def getTagTitle(self):
return "%-10s %-10s %-8s %-8s %-8s %-8s %-8s" % ("股票名称", "当前价格", "开盘价格", ... | 23.333333 | 110 | 0.628571 |
8077bb368c57ff0d0e0200e48ada312d5bd076a8 | 6,853 | py | Python | scraper/haushaltescraper.py | codeformuenster/haushalt-muenster | 8c032c7f475b751e0372cc0b7ec5d8c26dca5ac2 | [
"Apache-2.0"
] | 1 | 2019-05-27T08:06:23.000Z | 2019-05-27T08:06:23.000Z | scraper/haushaltescraper.py | codeformuenster/haushalt-muenster | 8c032c7f475b751e0372cc0b7ec5d8c26dca5ac2 | [
"Apache-2.0"
] | 12 | 2015-03-09T20:09:56.000Z | 2020-11-03T20:20:25.000Z | scraper/haushaltescraper.py | codeformuenster/haushalt-muenster | 8c032c7f475b751e0372cc0b7ec5d8c26dca5ac2 | [
"Apache-2.0"
] | 1 | 2018-10-24T21:46:04.000Z | 2018-10-24T21:46:04.000Z | import csv
import math
import pdfquery
import re
from lxml import etree
from multiprocessing import Pool
from pdfquery.cache import FileCache
# This script requires Python 3
# Loosely based on example code by reddit user insainodwayno
# https://www.reddit.com/r/Python/comments/4bnjha/scraping_pdf_files_with_python/d1... | 46.619048 | 166 | 0.710492 |
80cec75c0966754062b4eec5eb6788cc3d57d695 | 2,287 | py | Python | spider/worker_online_nd.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | null | null | null | spider/worker_online_nd.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | 2 | 2021-03-31T18:54:16.000Z | 2021-12-13T19:49:08.000Z | spider/worker_online_nd.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | null | null | null | import sys
if sys.version_info[0] < 3:
import got
else:
import got3 as got
import time
import json
import multiprocessing
from multiprocessing import Pool
from datetime import datetime
from Config import get_noau_config
_, db, r = get_noau_config()
def advance_search_nd(q, f, num, s, u):
collection =... | 33.144928 | 115 | 0.609095 |
4591a4bc4be492a9f644794240c1228a9f31dd68 | 16,459 | py | Python | sandbox/sdf_polygonizer.py | colormotor/sandbox | b0f86c33fc3e27e87009508de93e79e14bb6241d | [
"MIT"
] | 2 | 2019-01-23T19:39:17.000Z | 2020-10-26T11:55:44.000Z | sandbox/sdf_polygonizer.py | colormotor/sandbox | b0f86c33fc3e27e87009508de93e79e14bb6241d | [
"MIT"
] | null | null | null | sandbox/sdf_polygonizer.py | colormotor/sandbox | b0f86c33fc3e27e87009508de93e79e14bb6241d | [
"MIT"
] | null | null | null | from __future__ import division, print_function
import time
import math
from cm import *
import app
import numpy as np
import numbers
import autograff.geom as geom
import autograff.utils as utils
import autograff.plut as plut
from autograff.geom.scanlines import hatch, scanlines
from autograff.geom.simplify import dce... | 32.272549 | 125 | 0.550033 |
92a42651dbe1eec83b72ac43464d3309b0ac7b07 | 1,186 | py | Python | src/sort.py | ianxin/algorithm | 22214b6c81bee926f5a1c74c9417b2e7edd3ceed | [
"MIT"
] | 2 | 2018-03-13T08:59:14.000Z | 2018-03-13T08:59:25.000Z | src/sort.py | ianxin/Algorithm | 22214b6c81bee926f5a1c74c9417b2e7edd3ceed | [
"MIT"
] | null | null | null | src/sort.py | ianxin/Algorithm | 22214b6c81bee926f5a1c74c9417b2e7edd3ceed | [
"MIT"
] | null | null | null | # 冒泡排序(O(n^2))
def bubblesort(relist):
length = len(relist)
for i in range(length):
for j in range(length-i-1):
if relist[j]>relist[j+1]:
relist[j+1],relist[j] = relist[j],relist[j+1]
else: pass
return relist
#选择排序法
def selectsort(relist):
length = len(... | 21.563636 | 65 | 0.554806 |
5b60718c982220ea937905ccce4d6534c52900db | 1,265 | py | Python | convert_xml_to_txt.py | ligang945/pyMisc | 3107c80f7f53ffc797b289ec73d1ef4db80f0b63 | [
"MIT"
] | null | null | null | convert_xml_to_txt.py | ligang945/pyMisc | 3107c80f7f53ffc797b289ec73d1ef4db80f0b63 | [
"MIT"
] | null | null | null | convert_xml_to_txt.py | ligang945/pyMisc | 3107c80f7f53ffc797b289ec73d1ef4db80f0b63 | [
"MIT"
] | null | null | null | import os
import xml.etree.ElementTree as et
report_xml = 'report.xml'
out_txt = 'input_klocwork_report.txt'
strns = 'xmlns:kw="http://www.klocwork.com/inForce/report/1.0"'
def delallchinstr(str, ch):
while True:
pos = str.find(ch)
if pos == -1:
break
str = str.replace(str[pos... | 28.111111 | 85 | 0.570751 |
750a8c357ef69823f2d4ccfdfa8baa15e0e41358 | 947 | py | Python | Curso-Em-Video-Python/2Exercicios/089_Boletim_com_listas_compostas.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/089_Boletim_com_listas_compostas.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/089_Boletim_com_listas_compostas.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | turma = []
nota = []
nome = []
pessoas = 0
totmedia = []
cont = 0
while True:
nome.append(str(input('Nome: ')))
media = 0
for c in range(1, 3):
nota = float(input(f'Nota {c}: '))
media = media + nota
nome.append(nota)
turma.append(nome[:])
totmedia.append(media)
nome.clea... | 23.675 | 71 | 0.510032 |
751da7fa23095383598b674f7b25b8878808b90a | 487 | py | Python | ST.metaL.py | ponyatov/ST | 4aab2004608fe5f85366870c8387451f05451adc | [
"MIT"
] | null | null | null | ST.metaL.py | ponyatov/ST | 4aab2004608fe5f85366870c8387451f05451adc | [
"MIT"
] | null | null | null | ST.metaL.py | ponyatov/ST | 4aab2004608fe5f85366870c8387451f05451adc | [
"MIT"
] | null | null | null | ## @file
## @brief meta: Smalltalk-like guest OS
from metaL import *
p = Project(
title='''Smalltalk-like guest OS''',
about='''
inspired by
[lawson]
Lawson English
[**Squeak from the very start**](https://www.youtube.com/playlist?list=PL6601A198DF14788D)
impressive playlist: intro to the Smalltalk program... | 24.35 | 160 | 0.683778 |
f3a4652b3efee39a039fefa8c58c3068848471cb | 2,714 | py | Python | apps/models/users.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | apps/models/users.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | apps/models/users.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | from flask import current_app, flash
from apps.extensions import db, login_manager
from werkzeug.security import generate_password_hash, check_password_hash
from itsdangerous import TimedJSONWebSignatureSerializer as Serializer
from flask_login import UserMixin
from apps.models.posts import Posts
class User(UserMixin... | 30.155556 | 126 | 0.651437 |
9430e7dc554257aa3627a81dc473df28cd18c0c2 | 88 | py | Python | skil/resources/__init__.py | pcrete/skil-python | 672a1aa9e8af020c960ab9ee280cbb6b194afc3f | [
"Apache-2.0"
] | 23 | 2018-09-19T13:34:27.000Z | 2022-02-14T09:49:35.000Z | skil/resources/__init__.py | pcrete/skil-python | 672a1aa9e8af020c960ab9ee280cbb6b194afc3f | [
"Apache-2.0"
] | 33 | 2018-10-18T07:58:05.000Z | 2019-05-16T08:24:12.000Z | skil/resources/__init__.py | pcrete/skil-python | 672a1aa9e8af020c960ab9ee280cbb6b194afc3f | [
"Apache-2.0"
] | 11 | 2018-10-21T18:58:57.000Z | 2022-02-14T09:49:36.000Z | from .compute import *
from .storage import *
from .base import *
from .common import *
| 17.6 | 22 | 0.727273 |
ed9b362bcbcdcd3074635afed3919534fcca4ba6 | 7,258 | py | Python | src/onegov/fsi/collections/audit.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/fsi/collections/audit.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/fsi/collections/audit.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from cached_property import cached_property
from sedate import utcnow
from sqlalchemy import func, desc
from onegov.core.collection import GenericCollection, Pagination
from onegov.fsi.models import CourseAttendee, CourseSubscription, \
CourseEvent, Course
class AuditCollection(GenericCollection, Pagination):
... | 34.561905 | 78 | 0.608294 |
fcd3d721743c7dd0465ecdb228119180db6dc539 | 2,399 | py | Python | research/cv/stgcn/src/model/models.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/stgcn/src/model/models.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/stgcn/src/model/models.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 36.907692 | 113 | 0.656524 |
1ea4e9beb4b13e1bfe41056883a153ab923a2e11 | 1,331 | py | Python | Image Processing/Versuch A/main.py | vincentscode/Praktikum-Hochschule-Trier | c2802364644c889e021726a7e6babaacd8978f47 | [
"MIT"
] | null | null | null | Image Processing/Versuch A/main.py | vincentscode/Praktikum-Hochschule-Trier | c2802364644c889e021726a7e6babaacd8978f47 | [
"MIT"
] | null | null | null | Image Processing/Versuch A/main.py | vincentscode/Praktikum-Hochschule-Trier | c2802364644c889e021726a7e6babaacd8978f47 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import time
from matplotlib import pyplot as plt
from operator import itemgetter
time0 = time.time()
img = cv2.imread('../in.jpg')
unperspective_lines = img.copy()
rows,cols,ch = unperspective_lines.shape
# TOP-L TOP-R DOWN-R DOWN-L
pts1 = np.float32([[540, 0], [1500, 0], [0,... | 26.098039 | 67 | 0.658903 |
44dfe710ac6eab5a7d4927626f668cb799ec5494 | 5,059 | py | Python | SmartMirror/google_calendar_api/google_calendar_api.py | beckstev/PiShop | ab990c3a787f1811ff0da650f79dbd8bb28c00f7 | [
"MIT"
] | null | null | null | SmartMirror/google_calendar_api/google_calendar_api.py | beckstev/PiShop | ab990c3a787f1811ff0da650f79dbd8bb28c00f7 | [
"MIT"
] | 3 | 2018-11-22T09:49:52.000Z | 2019-05-29T14:43:52.000Z | SmartMirror/google_calendar_api/google_calendar_api.py | beckstev/PiShop | ab990c3a787f1811ff0da650f79dbd8bb28c00f7 | [
"MIT"
] | null | null | null | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 40.472 | 85 | 0.611386 |
784c81f9018450fac72db29577c8d7f708330763 | 464 | py | Python | Produkte/migrations/0007_kauf_kommentar.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 1 | 2017-07-24T10:19:36.000Z | 2017-07-24T10:19:36.000Z | Produkte/migrations/0007_kauf_kommentar.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 9 | 2017-07-26T14:16:08.000Z | 2022-03-11T23:14:40.000Z | Produkte/migrations/0007_kauf_kommentar.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 1 | 2017-03-07T12:38:23.000Z | 2017-03-07T12:38:23.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.11 on 2017-09-21 17:03
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Produkte', '0006_auto_20170921_1652'),
]
operations = [
migrations.AddField... | 22.095238 | 63 | 0.62069 |
786cb37d8ef485648213068368ddf627e4274570 | 5,499 | py | Python | Django/ballon/migrations/0003_auto_20180828_0021.py | ballon3/GRAD | c630e32272fe34ead590c04d8360169e02be87f1 | [
"MIT"
] | null | null | null | Django/ballon/migrations/0003_auto_20180828_0021.py | ballon3/GRAD | c630e32272fe34ead590c04d8360169e02be87f1 | [
"MIT"
] | null | null | null | Django/ballon/migrations/0003_auto_20180828_0021.py | ballon3/GRAD | c630e32272fe34ead590c04d8360169e02be87f1 | [
"MIT"
] | null | null | null | # Generated by Django 2.1 on 2018-08-28 07:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ballon', '0002_auto_20180827_2341'),
]
operations = [
migrations.CreateModel(
name='Address',
fields=[
... | 38.1875 | 114 | 0.508274 |
151f974faedc306f3754d49e5a595825de38fc29 | 108 | py | Python | server/act_food.py | cutec-chris/sce | da1f906ff4a049722b8968eeab8a07b411c92a8c | [
"MIT"
] | null | null | null | server/act_food.py | cutec-chris/sce | da1f906ff4a049722b8968eeab8a07b411c92a8c | [
"MIT"
] | null | null | null | server/act_food.py | cutec-chris/sce | da1f906ff4a049722b8968eeab8a07b411c92a8c | [
"MIT"
] | null | null | null | #Carnivore Actions
#Find
#Hide
#Chase
#Attack
#Eat
#Herbivore Actions
#Find
#Eat | 12 | 18 | 0.564815 |
ec98c530f39884299ef20b1c4cce31ebb9e49a64 | 3,814 | py | Python | spht/management/commands/publish.py | consbio/spht | 96ec6a0931851b33eace08720d4d18ab34775a52 | [
"BSD-2-Clause"
] | 1 | 2019-08-04T21:13:41.000Z | 2019-08-04T21:13:41.000Z | spht/management/commands/publish.py | consbio/spht | 96ec6a0931851b33eace08720d4d18ab34775a52 | [
"BSD-2-Clause"
] | 23 | 2018-04-12T20:43:15.000Z | 2022-02-10T12:10:53.000Z | spht/management/commands/publish.py | consbio/spht | 96ec6a0931851b33eace08720d4d18ab34775a52 | [
"BSD-2-Clause"
] | null | null | null | import shutil
import os.path
import pyproj
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from ncdjango.models import Service, Variable, SERVICE_DATA_ROOT
from trefoil.geometry.bbox import BBox
from trefoil.netcdf.describe import describe
from trefoil.render.rendere... | 41.912088 | 109 | 0.531987 |
01aac211be1533a2a36dfed42ba0504fcdd9b6f5 | 7,145 | py | Python | packages/watchmen-storage/src/watchmen_storage/storage_based_worker_id_generator.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-storage/src/watchmen_storage/storage_based_worker_id_generator.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-storage/src/watchmen_storage/storage_based_worker_id_generator.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from datetime import timedelta
from logging import getLogger
from typing import List
from watchmen_utilities import ArrayHelper, get_current_time_in_seconds
from .competitive_worker_id_generator import CompetitiveWorker, CompetitiveWorkerIdGenerator, \
CompetitiveWorkerShutdownListener, default_heart_beat_interval, d... | 36.641026 | 112 | 0.742057 |
01e7949f65ee5b42c362cfb71d82ddf7b88f61b4 | 5,759 | py | Python | loadtest/trafficgen/trafficgen/generator.py | harrywong/evt | 95985384619e0f5ff4021e8838d421ac4b4b946d | [
"BSD-3-Clause"
] | 1,411 | 2018-04-23T03:57:30.000Z | 2022-02-13T10:34:22.000Z | loadtest/trafficgen/trafficgen/generator.py | Zhang-Zexi/evt | e90fe4dbab4b9512d120c79f33ecc62791e088bd | [
"Apache-2.0"
] | 27 | 2018-06-11T10:34:42.000Z | 2019-07-27T08:50:02.000Z | loadtest/trafficgen/trafficgen/generator.py | Zhang-Zexi/evt | e90fe4dbab4b9512d120c79f33ecc62791e088bd | [
"Apache-2.0"
] | 364 | 2018-06-09T12:11:53.000Z | 2020-12-15T03:26:48.000Z | import json
import multiprocessing as mp
import os
import random
import string
from collections import OrderedDict
import click
import tqdm
from pyevtsdk.action import ActionGenerator
from pyevtsdk.transaction import TrxGenerator
from . import randompool, utils
class InvalidActionsOrder(Exception):
def __init_... | 28.795 | 111 | 0.595416 |
1762b3275d112265cd45aaa3dd8622342bdfa643 | 122 | py | Python | api/runtime.py | Pelleplutt/PUAT | b083d2ec5776bb73f6ba83a5ddab271a7b742e89 | [
"MIT"
] | null | null | null | api/runtime.py | Pelleplutt/PUAT | b083d2ec5776bb73f6ba83a5ddab271a7b742e89 | [
"MIT"
] | null | null | null | api/runtime.py | Pelleplutt/PUAT | b083d2ec5776bb73f6ba83a5ddab271a7b742e89 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import puat.db
db = None
def init():
global db
db = puat.db.DB() | 11.090909 | 23 | 0.557377 |
178e3618b2cf9d59f71d6fd5f25b3f51606bc50e | 7,286 | py | Python | pyScript_ui_stuff/ui_main.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | pyScript_ui_stuff/ui_main.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | pyScript_ui_stuff/ui_main.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'main.ui'
##
## Created by: Qt User Interface Compiler version 5.14.0
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
#####################... | 49.564626 | 104 | 0.731952 |
00b36752f2c5e769ed0824facc545cbb876c6cf1 | 3,592 | py | Python | 5Problems/Python/5Problems.py | IanDoarn/LearningRepo | 4c5906b3c1f497a979c3fce89a66d1e571cd6b42 | [
"MIT"
] | null | null | null | 5Problems/Python/5Problems.py | IanDoarn/LearningRepo | 4c5906b3c1f497a979c3fce89a66d1e571cd6b42 | [
"MIT"
] | null | null | null | 5Problems/Python/5Problems.py | IanDoarn/LearningRepo | 4c5906b3c1f497a979c3fce89a66d1e571cd6b42 | [
"MIT"
] | null | null | null | """
Five programming problems every Software Engineer should be able to solve in less than 1 hour
http://www.shiftedup.com/2015/05/07/five-programming-problems-every-software-engineer-should-be-able-to-solve-in-less-than-1-hour
"""
from itertools import chain, zip_longest, permutations
from string import ascii_lowerc... | 27.419847 | 129 | 0.598831 |
daaae1b01a002b083e3b4a843e405be647893ea3 | 666 | py | Python | 6_kombinationen/loopIfElse/RandomPrint.py | Coding-for-the-Arts/drawbot-samples | e37994f3497aca252312431100b53548b4573f15 | [
"CC0-1.0"
] | null | null | null | 6_kombinationen/loopIfElse/RandomPrint.py | Coding-for-the-Arts/drawbot-samples | e37994f3497aca252312431100b53548b4573f15 | [
"CC0-1.0"
] | null | null | null | 6_kombinationen/loopIfElse/RandomPrint.py | Coding-for-the-Arts/drawbot-samples | e37994f3497aca252312431100b53548b4573f15 | [
"CC0-1.0"
] | null | null | null | """
Random Printmuster
Das Programm zeichnet nichts auf die Fläche, sondern schreibt in die Konsole.
"""
for i in range(10):
randomNumber = random()
if randomNumber > 0.2:
print(" * " + "%")
else:
print(" % " + "#" )
"""
- Versuche, Schritt für Schritt nachzuvollziehen, was beim ausführen... | 25.615385 | 93 | 0.627628 |
9760c8304b4415627d91a1997b08890a1536864d | 150 | py | Python | tests/resources/simple/simple-project/app/api/v1/__init__.py | Kludex/fastapi-template | 47256eb8f8c7439a4d669172d94ce84c62cdb25a | [
"MIT"
] | 14 | 2021-03-27T22:18:56.000Z | 2022-03-21T19:04:48.000Z | tests/resources/simple/simple-project/app/api/v1/__init__.py | Kludex/fastapi-template | 47256eb8f8c7439a4d669172d94ce84c62cdb25a | [
"MIT"
] | 33 | 2021-03-28T21:06:22.000Z | 2022-03-07T14:18:26.000Z | tests/resources/simple/simple-project/app/api/v1/__init__.py | Kludex/fastapi-template | 47256eb8f8c7439a4d669172d94ce84c62cdb25a | [
"MIT"
] | null | null | null | from fastapi import APIRouter
from app.api.v1.home import router as home_router
router = APIRouter(prefix="/v1")
router.include_router(home_router)
| 21.428571 | 49 | 0.806667 |
c1972c9e3975e77120255758de436ef5c1be913c | 905 | py | Python | code/snake/Algorithms/Nina.py | BogyMitutoyoCTL/AI-Preparation | ef535741816b02e5e63d426a3232a688c9abd726 | [
"MIT"
] | 1 | 2020-03-30T09:25:53.000Z | 2020-03-30T09:25:53.000Z | code/snake/Algorithms/Nina.py | BogyMitutoyoCTL/AI-Preparation | ef535741816b02e5e63d426a3232a688c9abd726 | [
"MIT"
] | 2 | 2020-02-05T14:00:23.000Z | 2020-03-30T19:57:19.000Z | code/snake/Algorithms/Nina.py | BogyMitutoyoCTL/AI-Preparation | ef535741816b02e5e63d426a3232a688c9abd726 | [
"MIT"
] | null | null | null | from Algorithms.Algorithms import Algorithm
from GameData import GameData
class Nina(Algorithm):
def __init__(self):
super().__init__()
def decide(self, info: GameData) -> str:
if info.walldistance_n == 0:
if info.head_x > info.food_x :
return "turn left"
... | 24.459459 | 44 | 0.504972 |
de0446fad1e6cb7f27ce79428e4a955a4b597c41 | 556 | py | Python | project/flaskr/routes/overview.py | Hackathon2020/CoronaHackathon2020 | 1f27ad7406c9da50a3acfb48f970a0b0b51c47da | [
"MIT"
] | 5 | 2020-03-21T12:58:10.000Z | 2020-03-23T13:02:18.000Z | project/flaskr/routes/overview.py | Hackathon2020/CoronaHackathon2020 | 1f27ad7406c9da50a3acfb48f970a0b0b51c47da | [
"MIT"
] | 26 | 2020-03-20T21:04:20.000Z | 2020-04-30T19:38:02.000Z | project/flaskr/routes/overview.py | Hackathon2020/CoronaHackathon2020 | 1f27ad7406c9da50a3acfb48f970a0b0b51c47da | [
"MIT"
] | 1 | 2020-05-08T20:45:20.000Z | 2020-05-08T20:45:20.000Z | from jinja2 import TemplateNotFound
from flask import Blueprint, render_template, abort
from project.flaskr import static_folder, template_folder
from project.questionaire import Question, Questionaire
from project.questions_from_json import read
def get_overview_blueprint(questions):
overview = Blueprint('overvi... | 32.705882 | 108 | 0.80036 |
e7018dda30ba792ee997f1ca4c05af8108f21762 | 3,967 | py | Python | ffeKiosk/settings.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | ffeKiosk/settings.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | 14 | 2018-09-12T06:59:55.000Z | 2020-02-26T07:17:48.000Z | ffeKiosk/settings.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | """
Django settings for ffeKiosk project.
Generated by 'django-admin startproject' using Django 1.11.1.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import o... | 25.928105 | 91 | 0.699017 |
e79c32a7d8e22fb80f07ea550e43059d8c3f7984 | 100 | py | Python | python/python_new/Python 3/untitled2x.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_new/Python 3/untitled2x.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_new/Python 3/untitled2x.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z |
import numpy as np
a=np.zeros((3,5))
print(a)
x=np.arange(1,5)
print(x)
y=np.arange(1,5,2)
print(y) | 12.5 | 18 | 0.66 |
68c20f8e3ff7d99433832b8e53a7efe085e90b2e | 1,872 | py | Python | research/cv/DeepID/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/DeepID/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/DeepID/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 36 | 84 | 0.674145 |
68f0986443a73e72eb1edbad6d5f215bbe67dcd1 | 168 | py | Python | mumath/context/statistics.py | fourpoints/mumath | f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4 | [
"MIT"
] | null | null | null | mumath/context/statistics.py | fourpoints/mumath | f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4 | [
"MIT"
] | null | null | null | mumath/context/statistics.py | fourpoints/mumath | f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4 | [
"MIT"
] | null | null | null | identifiers = {
r"\done" : ("⚀", {}),
r"\dtwo" : ("⚁", {}),
r"\dthree" : ("⚂", {}),
r"\dfour" : ("⚃", {}),
r"\dfive" : ("⚄", {}),
r"\dsix" : ("⚅", {}),
}
| 18.666667 | 24 | 0.267857 |
68fd4616d885307a6e1022bb4d7ec939129b5eb0 | 655 | py | Python | VeterinerApp/VetApps/admin.py | icakmak/Veteriner | c6445008197f078fdc3f509a3d4b0323532c1df9 | [
"MIT"
] | null | null | null | VeterinerApp/VetApps/admin.py | icakmak/Veteriner | c6445008197f078fdc3f509a3d4b0323532c1df9 | [
"MIT"
] | null | null | null | VeterinerApp/VetApps/admin.py | icakmak/Veteriner | c6445008197f078fdc3f509a3d4b0323532c1df9 | [
"MIT"
] | null | null | null | from django.contrib import admin
from VetApps.models import Customer,Kind,Animal
class CustomerAdmin(admin.ModelAdmin):
list_display =['id','customerName','customerCity','customerPhone']
class Meta:
model = Customer
class AnimalAdmin(admin.ModelAdmin):
list_display =['id','animalName','animalBirth... | 28.478261 | 85 | 0.735878 |
ec1bf5f037c31a686ecd4fda1e2218e4dd91a0c2 | 153 | py | Python | official_examples/Reinforcement_Learning_GameSolution_Examples/atari/env_config.py | RuichunWang/ModelArts-Lab | cfa9a853e3a76a21eac2818f055b36978ac2bb69 | [
"Apache-2.0"
] | 1,045 | 2019-05-09T02:50:43.000Z | 2022-03-31T06:22:11.000Z | official_examples/Reinforcement_Learning_GameSolution_Examples/atari/env_config.py | RuichunWang/ModelArts-Lab | cfa9a853e3a76a21eac2818f055b36978ac2bb69 | [
"Apache-2.0"
] | 1,468 | 2019-05-16T00:48:18.000Z | 2022-03-08T04:12:44.000Z | official_examples/Reinforcement_Learning_GameSolution_Examples/atari/env_config.py | RuichunWang/ModelArts-Lab | cfa9a853e3a76a21eac2818f055b36978ac2bb69 | [
"Apache-2.0"
] | 1,077 | 2019-05-09T02:50:53.000Z | 2022-03-27T11:05:32.000Z | import numpy as np
from gym.spaces import Discrete, Box
action_space = Discrete(4)
observation_space = Box(0, 255, shape=(210, 160, 3), dtype=np.uint8)
| 25.5 | 68 | 0.745098 |
6bbf013055f3d5e9af59bb255d287b88a37b91fd | 3,745 | py | Python | models/xomo/xomo.py | dr-bigfatnoob/quirk | f5025d7139adaf06380c429b436ccbf1e7611a16 | [
"Unlicense"
] | 1 | 2021-03-05T07:44:05.000Z | 2021-03-05T07:44:05.000Z | models/xomo/xomo.py | dr-bigfatnoob/quirk | f5025d7139adaf06380c429b436ccbf1e7611a16 | [
"Unlicense"
] | 3 | 2017-06-04T03:01:31.000Z | 2017-08-04T04:04:37.000Z | models/xomo/xomo.py | dr-bigfatnoob/quirk | f5025d7139adaf06380c429b436ccbf1e7611a16 | [
"Unlicense"
] | null | null | null | from __future__ import print_function, division
import sys
import os
sys.path.append(os.path.abspath("."))
sys.dont_write_bytecode = True
__author__ = "bigfatnoob"
import random
from collections import OrderedDict
from utils.lib import O
from cocomo import Cocomo
from utils.lib import MAXIMIZE, MINIMIZE
def uniform... | 22.560241 | 77 | 0.631509 |
6bcac989319f2995652eb97bbc43c558f5d2e08f | 12,006 | py | Python | MapMaker_GUI.py | Turidus/Minecraft-MapMaker | 16e4015d03d67f04cfd247c11c9e3e2a5429b79f | [
"MIT"
] | 1 | 2018-10-24T16:02:08.000Z | 2018-10-24T16:02:08.000Z | MapMaker_GUI.py | Turidus/Minecraft-MapMaker | 16e4015d03d67f04cfd247c11c9e3e2a5429b79f | [
"MIT"
] | 2 | 2018-07-16T19:04:00.000Z | 2018-07-29T11:43:53.000Z | MapMaker_GUI.py | Turidus/Minecraft-MapMaker | 16e4015d03d67f04cfd247c11c9e3e2a5429b79f | [
"MIT"
] | null | null | null | """
Builds and displays the GUI for Minecraft Map Maker.
Based on appJar.
Made by Turidus https://github.com/Turidus/Minecraft-MapMaker
Copyright (c) 2018 Turidus
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to dea... | 29.426471 | 156 | 0.638514 |
d4705af69a7fba5123789f072df9d76f739bcb76 | 2,718 | py | Python | UnityPython.FrontEnd/unitypython/Symtable.py | franklin1dev/Traffy.UnityPython-main | b616e4c0043af05f5c34ebd245c09b21bfa79a10 | [
"MIT"
] | null | null | null | UnityPython.FrontEnd/unitypython/Symtable.py | franklin1dev/Traffy.UnityPython-main | b616e4c0043af05f5c34ebd245c09b21bfa79a10 | [
"MIT"
] | null | null | null | UnityPython.FrontEnd/unitypython/Symtable.py | franklin1dev/Traffy.UnityPython-main | b616e4c0043af05f5c34ebd245c09b21bfa79a10 | [
"MIT"
] | null | null | null | from __future__ import annotations
from dataclasses import dataclass
from .Collections import OrderedDict, OrderedSet
class ConflictNonlocal(Exception):
def __init__(self, name: str):
self.name = name
super().__init__()
@dataclass
class ConciseSymtable:
localvars: OrderedSet[str]
freevars:... | 29.225806 | 93 | 0.635394 |
5a975cd58a5da29cf061b2c749f72795e3eebcb6 | 3,291 | py | Python | BinaryDialog.py | siej88/FuzzyACO | 989a58049c8417cd023cfc312fb99d2649333ca7 | [
"MIT"
] | null | null | null | BinaryDialog.py | siej88/FuzzyACO | 989a58049c8417cd023cfc312fb99d2649333ca7 | [
"MIT"
] | null | null | null | BinaryDialog.py | siej88/FuzzyACO | 989a58049c8417cd023cfc312fb99d2649333ca7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
UNIVERSIDAD DE CONCEPCION
Departamento de Ingenieria Informatica y
Ciencias de la Computacion
Memoria de Titulo Ingenieria Civil Informatica
DETECCION DE BORDES EN IMAGENES DGGE USANDO UN
SISTEMA HIBRIDO ACO CON LOGICA DIFUSA
Autor: Sebastian Ignacio Espinoza Jimenez
Patrocinant... | 38.717647 | 104 | 0.658159 |
518e43dc41dd98f42c94786053bb7759dec29e2d | 1,087 | py | Python | beispielanwendungen/lokalisierung/lokalisierung_basis.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 5 | 2017-03-11T13:27:27.000Z | 2022-01-09T10:52:05.000Z | beispielanwendungen/lokalisierung/lokalisierung_basis.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 2 | 2021-02-14T10:59:59.000Z | 2021-10-30T21:46:32.000Z | beispielanwendungen/lokalisierung/lokalisierung_basis.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 1 | 2019-08-07T03:08:18.000Z | 2019-08-07T03:08:18.000Z | # -*- coding: utf-8 -*-
import sys
from PySide import QtCore, QtGui
def main(argv):
app = QtGui.QApplication(argv)
mainwindow = MyMainWindow()
mainwindow.show()
sys.exit(app.exec_())
class MyMainWindow(QtGui.QMainWindow):
def __init__(self, *args):
QtGui.QMainWindow.__init__(self, *args)... | 26.512195 | 75 | 0.669733 |
cfc3ce27802fc8ed98c57a7938e61fc1c0a4a922 | 805 | py | Python | diversos/lista.py | lcarlin/guppe | a0ee7b85e8687e8fb8243fbb509119a94bc6460f | [
"Apache-2.0"
] | 1 | 2021-12-18T15:29:24.000Z | 2021-12-18T15:29:24.000Z | diversos/lista.py | lcarlin/guppe | a0ee7b85e8687e8fb8243fbb509119a94bc6460f | [
"Apache-2.0"
] | null | null | null | diversos/lista.py | lcarlin/guppe | a0ee7b85e8687e8fb8243fbb509119a94bc6460f | [
"Apache-2.0"
] | 3 | 2021-08-23T22:45:20.000Z | 2022-02-17T13:17:09.000Z | # -*- coding: utf-8 -*-
lista0 = [1,2,3,4,5,6]
lista1 = ["Olá que tal", "dois"]
lista2 = [0, "ola", "bixcoito", 99.99, False ]
for i in lista2:
print (i)
print ("============================")
for j in range (10,20,2):
print (" E o J -e :-> " + str (j) )
print (len(lista0))
print (len(lista2))
print (len... | 21.184211 | 57 | 0.481988 |
857bc2dc811283612c3adc6b588350708723efbc | 12,629 | py | Python | src/dataloader.py | ZiningZhu/InfoProbe | 0bf241356c5bfcfc4760a195eecf7c80f75379aa | [
"MIT"
] | 1 | 2021-02-06T01:52:00.000Z | 2021-02-06T01:52:00.000Z | src/dataloader.py | SPOClab-ca/InfoProbe | 0bf241356c5bfcfc4760a195eecf7c80f75379aa | [
"MIT"
] | null | null | null | src/dataloader.py | SPOClab-ca/InfoProbe | 0bf241356c5bfcfc4760a195eecf7c80f75379aa | [
"MIT"
] | null | null | null | import flair
import torch
import numpy as np
import spacy
import transformers
import os, sys, time
from tqdm import tqdm
import psutil
import pickle
import gensim
from constants import spacy_pos_dict, spacy_model_names, gensim_fasttext_models
device = torch.device("cuda") if torch.cuda.is_available() else torch.dev... | 37.924925 | 127 | 0.572571 |
f15e44b1a08302c42bb4d3af1a815e42372aabd5 | 3,045 | py | Python | myspiders/spider_hr/hfbank_spider.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | 2 | 2021-11-27T06:40:47.000Z | 2022-01-06T03:12:46.000Z | myspiders/spider_hr/hfbank_spider.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | null | null | null | myspiders/spider_hr/hfbank_spider.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | null | null | null | from myspiders.ruia import JsonField, Item, Spider, Bs4HtmlField, Bs4AttrField, Bs4TextField
from urllib.parse import urlencode, urlparse, urljoin, quote
import re
from constants import BankDict
from config import Target
import os
'''
Ids: "https://applyjob.chinahr.com/apply/job/wish?jobId=5ebca903c7fd7a04d9bcb256&pro... | 30.148515 | 120 | 0.655172 |
2d46bee7caa519c72d73ee34c166cc5ca7d31579 | 515 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v8_6/update_timesheet_company_from_PO.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/patches/v8_6/update_timesheet_company_from_PO.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v8_6/update_timesheet_company_from_PO.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2017, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doctype('Timesheet')
company = frappe.get_all('Company')
#Check more than one company exists
if len(company) > 1:
frappe.db.... | 34.333333 | 79 | 0.747573 |
777fc915aab5f0efec14726f213793885d0fc54e | 1,618 | py | Python | EasyCleg/classify.py | bitsofishan/EasyCleg | ace2d5e7f47a58300fe8391553081e1b17fc807c | [
"MIT"
] | null | null | null | EasyCleg/classify.py | bitsofishan/EasyCleg | ace2d5e7f47a58300fe8391553081e1b17fc807c | [
"MIT"
] | null | null | null | EasyCleg/classify.py | bitsofishan/EasyCleg | ace2d5e7f47a58300fe8391553081e1b17fc807c | [
"MIT"
] | null | null | null | class classify():
def classify(X_train,y_train):
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
#Some dataset,cross validation libraries
from sklearn.datasets import load_boston,load_iris
from sklearn.model_selection import train_test_split,cross_val_score,Grid... | 33.020408 | 96 | 0.678616 |
77bae6881763687da94d72c222f9611ceeac7bdd | 1,032 | py | Python | Uebung4/Uebung4_Aufgabe10_3.py | B0mM3L6000/EiP | f68718f95a2d3cde8ead62b6134ac1b5068881a5 | [
"MIT"
] | 1 | 2018-04-18T19:10:06.000Z | 2018-04-18T19:10:06.000Z | Uebung4/Uebung4_Aufgabe10_3.py | B0mM3L6000/EiP | f68718f95a2d3cde8ead62b6134ac1b5068881a5 | [
"MIT"
] | null | null | null | Uebung4/Uebung4_Aufgabe10_3.py | B0mM3L6000/EiP | f68718f95a2d3cde8ead62b6134ac1b5068881a5 | [
"MIT"
] | 1 | 2018-04-29T08:48:00.000Z | 2018-04-29T08:48:00.000Z | #Sauce header/input:
# Einlesen des Wertes von n
n = int(input())
# Einlesen von k entfaellt, da k der Summenindex ist
# Daher initialisierung als 0
k = 0
# Die Summe der Binomialkoeffizienten
S1 = 0
# Die Summe der Quadrate der Binomialkoeffizienten
S2 = 0
#Code:
for k in range(n+1):
b = 1
for i in range(k... | 16.380952 | 62 | 0.488372 |
56a6d24ae9fa2bb8dab260e8da8e46268eaf9273 | 2,673 | py | Python | tests/onegov/election_day/utils/test_sms_processor.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/utils/test_sms_processor.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/utils/test_sms_processor.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import os
from onegov.election_day.utils.sms_processor import SmsQueueProcessor
from pytest import raises
from unittest.mock import Mock
def test_sms_queue_processor(election_day_app, temporary_directory):
sms_path = os.path.join(
temporary_directory, 'sms', election_day_app.schema
)
os.makedirs(... | 31.081395 | 74 | 0.616536 |
3b2e7490c996a5c4775fe7ad9284190fa236adc2 | 826 | py | Python | spider_django/django_app/urls.py | Tiangewang0524/zzu_spider | eddd534f6a7bfb39eec5a7e240f830550b2285cb | [
"Apache-2.0"
] | null | null | null | spider_django/django_app/urls.py | Tiangewang0524/zzu_spider | eddd534f6a7bfb39eec5a7e240f830550b2285cb | [
"Apache-2.0"
] | null | null | null | spider_django/django_app/urls.py | Tiangewang0524/zzu_spider | eddd534f6a7bfb39eec5a7e240f830550b2285cb | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import url, include
from django_app import views
urlpatterns = [
url(r'show_all_tasks$', views.show_all_tasks, ),
url(r'show_all_confs$', views.show_all_confs, ),
url(r'show_all_results$', views.show_all_results, ),
url(r'add_tasks$', views.add_tasks, ),
url(r'add_confs$', vie... | 41.3 | 56 | 0.686441 |
3b94910964a8d725941782da96ab772cfec6d6ec | 530 | py | Python | hw3-cloudmesh/oliveral_cloudmesh_ex3.py | futuresystems/465-oliverlewis | c1a093e9de012e752a2277c4fb533cbd974a5a8d | [
"Apache-2.0"
] | null | null | null | hw3-cloudmesh/oliveral_cloudmesh_ex3.py | futuresystems/465-oliverlewis | c1a093e9de012e752a2277c4fb533cbd974a5a8d | [
"Apache-2.0"
] | null | null | null | hw3-cloudmesh/oliveral_cloudmesh_ex3.py | futuresystems/465-oliverlewis | c1a093e9de012e752a2277c4fb533cbd974a5a8d | [
"Apache-2.0"
] | null | null | null | import cloudmesh
def start_vm():
print cloudmesh.shell("vm start --cloud=india --image=futuresystems/ubuntu-14.04 --flavor=m1.small --name={0}".format("oliveral-supervisor3"))
def stop_vm(name):
cloudmesh.shell("vm delete {0} --cloud=india --force".format(name))
decision=raw_input('Enter \'start\' or \'stop\' to... | 26.5 | 143 | 0.692453 |
8ee54b1fc5037a197d60229e292d7f17bb6f10cc | 3,591 | py | Python | SiteGadget-main/run.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | SiteGadget-main/run.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | SiteGadget-main/run.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #https://github.com/alpkeskin
import socket, requests, json, urllib3, dns, dns.resolver, sys
from insides.Colors import Colors
from insides.Banner import Banner
from insides.Header import Header
##############BANNER################
Banner()
####################################
###########CONFIG FILE##############
confi... | 33.877358 | 62 | 0.555277 |
5c3e453e088a391c8c60bd5df3fcc4269c045f26 | 5,746 | py | Python | test/test_npu/test_network_ops/test_rsqrt.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_network_ops/test_rsqrt.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_network_ops/test_rsqrt.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 41.042857 | 89 | 0.637487 |
30a81cc56363c8f06f270924458a037728754ff2 | 1,028 | py | Python | src/onegov/election_day/collections/screens.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/collections/screens.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/collections/screens.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.collection import Pagination
from onegov.election_day.models import Screen
class ScreenCollectionPagination(Pagination):
def __init__(self, session, page=0):
self.session = session
self.page = page
def __eq__(self, other):
return self.page == other.page
def subs... | 23.906977 | 67 | 0.660506 |
30b67e4fd4a79bed3dbde606101211ed6c22f6c8 | 27,432 | py | Python | src/onegov/org/views/ticket.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/views/ticket.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/views/ticket.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import morepath
from datetime import date
from morepath import Response
from onegov.chat import MessageCollection
from onegov.core.custom import json
from onegov.core.elements import Link, Intercooler, Confirm
from onegov.core.orm import as_selectable
from onegov.core.security import Public, Private, Secret
from onego... | 32.009335 | 79 | 0.607429 |
ba9d0795239fdcae5336c0133651418c73a7c938 | 1,473 | py | Python | EC4/Knn.py | CSUpengyuyan/ECExperiment | 4ea41837de421f18884be31248d57e88ea32b84b | [
"MIT"
] | null | null | null | EC4/Knn.py | CSUpengyuyan/ECExperiment | 4ea41837de421f18884be31248d57e88ea32b84b | [
"MIT"
] | null | null | null | EC4/Knn.py | CSUpengyuyan/ECExperiment | 4ea41837de421f18884be31248d57e88ea32b84b | [
"MIT"
] | null | null | null | import numpy as np
import operator
def createDataset():
#四组二维特征
group = np.array([[7,7],[7,4],[3,4],[1,4]])
#四组对应标签
labels = ('坏','坏','好','好')
return group,labels
def classify(intX,dataSet,labels,k):
'''
KNN算法
'''
#numpy中shape[0]返回数组的行数,shape[1]返回列数
dataSetSize = dataSet.shape[... | 29.46 | 93 | 0.644263 |
bafb83ce87fcb02a0d13efa1e9ba6c30d5bffb50 | 109,225 | py | Python | old/baxter_utils_2.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | old/baxter_utils_2.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | old/baxter_utils_2.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | """baxterロボットの色々関数とクラス
・順運動学写像,ヤコビ行列など
"""
import numpy as np
from math import cos, sin, tan, pi, sqrt
class BaxterKinematics2:
"""ローカル座標系の原点,ヤコビ行列等を計算"""
def __init__(self, **kwargs):
self.L = kwargs.pop('L')
self.h = kwargs.pop('h')
self.H = kwargs.pop('H')
self.L0 = kw... | 194.69697 | 3,783 | 0.526445 |
cca3314a389bb38b04af458d73222a2ad4471539 | 8,367 | py | Python | model_zoo/bert/static_ipu/load_tf_ckpt.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | model_zoo/bert/static_ipu/load_tf_ckpt.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | model_zoo/bert/static_ipu/load_tf_ckpt.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 PaddlePaddle Authors. 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 required by appli... | 41.216749 | 129 | 0.610972 |
cccab5fd659fd7cff0ec525f5321ac7a258cab2b | 408 | py | Python | IVTa/2014/GOLUBEV_A_S/task_2_44.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTa/2014/GOLUBEV_A_S/task_2_44.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTa/2014/GOLUBEV_A_S/task_2_44.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 2. Вариант 44.
# Напишите программу, которая будет выводить на экран наиболее
# понравившееся вам высказывание, автором которого является Эразм Роттердамский.
# Не забудьте о том, что автор должен быть упомянут на отдельной строке.
# Golubev A. S.
# 31.03.2016
print("Вежливость порождает и вызывает вежливос... | 31.384615 | 81 | 0.762255 |
012ac45732a969b114562721beaf95f2669ecb22 | 383 | py | Python | book/translation/spa/book/website/scripts/clean.py | AndreaSanchezTapia/the-turing-way | fe3e1a8ad36f9086edb4f36ec8e398f253fd8e0f | [
"CC-BY-4.0"
] | 1 | 2021-11-09T20:43:06.000Z | 2021-11-09T20:43:06.000Z | book/translation/spa/book/website/scripts/clean.py | AndreaSanchezTapia/the-turing-way | fe3e1a8ad36f9086edb4f36ec8e398f253fd8e0f | [
"CC-BY-4.0"
] | null | null | null | book/translation/spa/book/website/scripts/clean.py | AndreaSanchezTapia/the-turing-way | fe3e1a8ad36f9086edb4f36ec8e398f253fd8e0f | [
"CC-BY-4.0"
] | 2 | 2021-12-21T17:35:45.000Z | 2021-12-21T20:43:01.000Z | """Un script ayudante para "limpiar" todos los archivos HTML y markdown generados."""
importar shutil como sh
desde la ruta de importación de pathlib
path_root = Path(__file__).parent.parent
paths = [path_root.joinpath('_sitio'),
path_root.joinpath('build')]
para ruta en rutas:
print(f'Removiendo {path}.... | 27.357143 | 85 | 0.718016 |
01515c388c5b1fa9d98aea7d54bc705cb975a078 | 5,525 | py | Python | Project Euler Qusetions 11 - 20/Project Euler Question 13.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | 1 | 2020-02-11T02:03:02.000Z | 2020-02-11T02:03:02.000Z | Project Euler Qusetions 11 - 20/Project Euler Question 13.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | Project Euler Qusetions 11 - 20/Project Euler Question 13.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | #Project Euler Question 13
#Work out the first ten digits of the sum of the following one-hundred 50-digit numbers.
grid = """37107287533902102798797998220837590246510135740250
46376937677490009712648124896970078050417018260538
74324986199524741059474233309513058123726617309629
919422133635741615725224305633018110724... | 45.661157 | 88 | 0.956923 |
018cf8ce6bd39ba7a069350cd52f521f8c9dfd64 | 243 | py | Python | power-of-two/power-of-two.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | power-of-two/power-of-two.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | power-of-two/power-of-two.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def isPowerOfTwo(self, n: int) -> bool:
if n<=0:
return False
import math
if str(math.log2(n)).split(".")[-1]=="0":
return True
else:
return False | 24.3 | 49 | 0.45679 |
6d9e5f93bb2fbd07ddb1b534311ca1e0d12320dc | 5,323 | py | Python | ALBERT/train.py | baowj-678/TC | 4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6 | [
"MIT"
] | null | null | null | ALBERT/train.py | baowj-678/TC | 4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6 | [
"MIT"
] | null | null | null | ALBERT/train.py | baowj-678/TC | 4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6 | [
"MIT"
] | null | null | null | """ 训练文件
@Author: Bao Wenjie
@Email: bwj_678@qq.com
@Date: 2021/2/3
"""
import torch
import os
from dataset.vocab.vocab import Vocab
from dataset.dataset import MyDataSet
from dataset.dataloader import MyDataLoader
from transformers import AlbertForSequenceClassification
from transformers import AlbertTokeni... | 39.42963 | 145 | 0.514747 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.