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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e7cba943a26bbe90825639b65efaff07ede5627b | 1,449 | py | Python | src/server/decorators.py | MatthiasRiener/DigiPen | 9b4aff4a1c431e06d73733dc3dd3f3f3d4631704 | [
"MIT"
] | 6 | 2020-12-15T18:57:53.000Z | 2022-02-06T18:54:35.000Z | src/server/decorators.py | MatthiasRiener/DigiPen | 9b4aff4a1c431e06d73733dc3dd3f3f3d4631704 | [
"MIT"
] | 186 | 2020-11-17T10:18:17.000Z | 2022-03-02T07:19:22.000Z | src/server/decorators.py | MatthiasRiener/DigiPen | 9b4aff4a1c431e06d73733dc3dd3f3f3d4631704 | [
"MIT"
] | 1 | 2020-12-14T19:37:30.000Z | 2020-12-14T19:37:30.000Z | from functools import wraps
from flask import request
from flask_jwt_extended import get_jwt_identity, jwt_required
from app.db.settings import mongoclient, socketio
import time
import requests
import threading
@jwt_required
def dRR():
print("Momentan in Wartung.")
'''
route = request.path
... | 25.875 | 147 | 0.593513 |
41b80117f2e8afd465462a80bafa030d0d0dd135 | 2,549 | py | Python | ladon-server/software/src/python/mqtt-mongo-wrapper/MqttMongoWrapper.py | LucasRGoes/ladon-io | ab55219b461e918cc0ba45e6cdc9bcdfbce8c0d6 | [
"MIT"
] | 1 | 2018-04-29T22:33:42.000Z | 2018-04-29T22:33:42.000Z | ladon-server/software/src/python/mqtt-mongo-wrapper/MqttMongoWrapper.py | LucasRGoes/ladon-io | ab55219b461e918cc0ba45e6cdc9bcdfbce8c0d6 | [
"MIT"
] | null | null | null | ladon-server/software/src/python/mqtt-mongo-wrapper/MqttMongoWrapper.py | LucasRGoes/ladon-io | ab55219b461e918cc0ba45e6cdc9bcdfbce8c0d6 | [
"MIT"
] | null | null | null | ## IMPORTS ##
import base64 # Base64: Base16, Base32 and Base64 data encodings
import json # Json: is a lightweight data interchange format inspired by JavaScript object literal syntax
import logging # Logging: provides a set of convenience functions for simple logging usage
import math # Math... | 35.901408 | 143 | 0.726559 |
2e653d4297122efce1ce8e4c2b99466111946b9d | 7,613 | py | Python | Utils/py/ActionSelection/evaluation/show_experiment.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/ActionSelection/evaluation/show_experiment.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/ActionSelection/evaluation/show_experiment.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from __future__ import division
import os
import sys
import inspect
import pickle
import numpy as np
import matplotlib as mpl
from matplotlib import pyplot as plt
from matplotlib.patches import Circle
# TODO make a tools script in root folder which imports all the scripts in tools folder
cmd_subfolder = os.path.realpat... | 32.814655 | 153 | 0.619861 |
5af4b149f8f566b8748227a9df8cc1ac1c447016 | 3,066 | py | Python | cje/http_request.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2017-10-23T14:58:47.000Z | 2017-10-23T14:58:47.000Z | cje/http_request.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | null | null | null | cje/http_request.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2018-04-06T07:49:18.000Z | 2018-04-06T07:49:18.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import configparser
import http.cookiejar
import json
import urllib.request, urllib.error, urllib.parse
from time import sleep
import binascii
import pyDes
from bs4 import BeautifulSoup
class ConfigAccountProvider(object):
def __init__(self, path="F:\cje\influence.... | 29.76699 | 107 | 0.623614 |
5cbc56f7e358eef8f5ea501a3e669da21b3bcf69 | 2,209 | py | Python | ___Python/Thomas/pycurs_180625/p01_kennenlernen/m01_kennenlernen.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Thomas/pycurs_180625/p01_kennenlernen/m01_kennenlernen.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Thomas/pycurs_180625/p01_kennenlernen/m01_kennenlernen.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | import statistics
from datetime import date
from p01_kennenlernen import my_pycurse_utilities
torsten = ["Torsten", "Aachen", date(1967, 1,1), ["C"]]
michael = ["Michael", "Moormerland", date(1981, 1, 10), ["Javascript"]]
karpoo = ["Karpoo", "Düsseldorf", date(1969, 1,1), ["ABAP"]]
carsten = ["Carsten", "Aach... | 39.446429 | 136 | 0.682662 |
8fd19561b41897e795079f24104ed0145a31ca7a | 692 | py | Python | chillow/model/player.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 3 | 2021-01-17T23:32:07.000Z | 2022-01-30T14:49:16.000Z | chillow/model/player.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 2 | 2021-01-17T13:37:56.000Z | 2021-04-14T12:28:49.000Z | chillow/model/player.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 2 | 2021-04-02T14:53:38.000Z | 2021-04-20T11:10:17.000Z | from dataclasses import dataclass
from chillow.model.direction import Direction
@dataclass
class Player:
"""Represents a player in a game.
Attributes:
id: The ID of the player in a game.
x: The position on the x axis.
y: The position on the y axis.
direction: The direction to... | 23.862069 | 69 | 0.627168 |
a4598450279a9d221493b54bb22589ef3d51a49a | 798 | py | Python | RESTApi/flaskapp/__init__.py | Peacecake/HoloMu | 98b422b226c2274e6d7e96df31724b0d2abd8ebb | [
"MIT"
] | null | null | null | RESTApi/flaskapp/__init__.py | Peacecake/HoloMu | 98b422b226c2274e6d7e96df31724b0d2abd8ebb | [
"MIT"
] | 32 | 2018-06-19T15:27:04.000Z | 2018-09-30T20:17:23.000Z | RESTApi/flaskapp/__init__.py | Peacecake/HoloMu | 98b422b226c2274e6d7e96df31724b0d2abd8ebb | [
"MIT"
] | null | null | null | import os
from flask import Flask, request, Response
from uploader import Uploader
from xmlParser import XMLParser
from jsonParser import JsonParser
from . import trainAndTest
from . import label_image
from db import init_db, get_db
def create_app(test_config=None):
app = Flask(__name__, instance_relative_config=... | 22.8 | 67 | 0.705514 |
7ad8aeff870783e8712f38e702d565eb0ccdd0f7 | 1,929 | py | Python | sdk/stats/__init__.py | MailBeaker/mailbeaker-sdk | 324e48f9e255fd2dfa82d5f7f6bd52ab71e50904 | [
"MIT"
] | null | null | null | sdk/stats/__init__.py | MailBeaker/mailbeaker-sdk | 324e48f9e255fd2dfa82d5f7f6bd52ab71e50904 | [
"MIT"
] | null | null | null | sdk/stats/__init__.py | MailBeaker/mailbeaker-sdk | 324e48f9e255fd2dfa82d5f7f6bd52ab71e50904 | [
"MIT"
] | null | null | null | import logging
import statsd
from sdk import sdk_settings
statsd_client = None
if sdk_settings.STATSD_ENABLED:
try:
statsd_client = statsd.StatsClient(host=sdk_settings.STATSD_SERVER_HOST,
port=sdk_settings.STATSD_SERVER_PORT)
except:
logging.except... | 28.367647 | 105 | 0.661483 |
7ad8c252884891f024a72f571a530c01d39d24ae | 188 | py | Python | exercises/de/test_03_14_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/de/test_03_14_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/de/test_03_14_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
"for doc in nlp.pipe(TEXTS)" in __solution__
), "Iterierst du über die Docs, die per yield von nlp.pipe ausgegeben werden?"
__msg__.good("Super!")
| 31.333333 | 82 | 0.648936 |
7014cecdab4cbeb9f4c811b896eb9992e6e53604 | 368 | py | Python | python/primary/func_doc.py | EstherLacan/jiangfw | a449b1925742873c76dc1b3284aedb359204bc76 | [
"Apache-2.0"
] | 1 | 2020-07-29T16:43:46.000Z | 2020-07-29T16:43:46.000Z | python/primary/func_doc.py | EstherLacan/jiangfw | a449b1925742873c76dc1b3284aedb359204bc76 | [
"Apache-2.0"
] | null | null | null | python/primary/func_doc.py | EstherLacan/jiangfw | a449b1925742873c76dc1b3284aedb359204bc76 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Filename: func_doc.py
def printMax(x, y):
'''Prints the maximum of two numbers.
The two values must be integers.'''
x = int(x) # convert to integers, if possible
y = int(y)
if x > y:
print (x, 'is maximum')
else:
print (y, 'is maximum')
printMax(3, 5... | 17.52381 | 49 | 0.595109 |
56090bfd902b278b1bb5d6af36da26fd02b77198 | 658 | py | Python | 010-is-power-of-two/main.py | hello-arun/Python-Tutorial | aec3978f414e48d762a5fbc5cce581163c1f5f1e | [
"MIT"
] | null | null | null | 010-is-power-of-two/main.py | hello-arun/Python-Tutorial | aec3978f414e48d762a5fbc5cce581163c1f5f1e | [
"MIT"
] | null | null | null | 010-is-power-of-two/main.py | hello-arun/Python-Tutorial | aec3978f414e48d762a5fbc5cce581163c1f5f1e | [
"MIT"
] | null | null | null |
from timeit import timeit
def is_power_of_two_usual(num):
# Usual method to check
if (num < 0):
return False
elif (num == 1):
return True
n = 2
while(num > n):
n = n*2
return n == num
def is_power_of_two_clever(num):
# Clever method to check
return num > 0 an... | 23.5 | 75 | 0.62766 |
560bd5a172e5f0bb6c97f85ee94ee53b40f87a7a | 4,709 | py | Python | model/topoml_util/test_GeoVectorizer.py | Empythy/geometry-learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 21 | 2018-10-09T08:15:29.000Z | 2022-03-16T08:23:08.000Z | model/topoml_util/test_GeoVectorizer.py | reinvantveer/Topology-Learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 31 | 2017-09-20T13:30:37.000Z | 2018-03-01T13:24:58.000Z | model/topoml_util/test_GeoVectorizer.py | reinvantveer/Topology-Learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 7 | 2018-11-29T11:39:02.000Z | 2022-01-12T07:10:26.000Z | import unittest
import numpy as np
import pandas
from GeoVectorizer import GeoVectorizer, GEO_VECTOR_LEN
from shapely import wkt as wktreader
TOPOLOGY_CSV = 'test_files/polygon_multipolygon.csv'
SOURCE_DATA = pandas.read_csv(TOPOLOGY_CSV)
brt_wkt = SOURCE_DATA['brt_wkt']
osm_wkt = SOURCE_DATA['osm_wkt']
target_wkt = ... | 37.07874 | 120 | 0.589085 |
8ee9efaaa23ae61929ffe481b8fa6b7b51b022a7 | 832 | py | Python | simple-sklearn-demo/test1/dictVector.py | crackedcd/Intern.MT | 36398837af377a7e1c4edd7cbb15eabecd2c3103 | [
"MIT"
] | 1 | 2019-07-05T03:42:17.000Z | 2019-07-05T03:42:17.000Z | simple-sklearn-demo/test1/dictVector.py | crackedcd/Intern.MT | 36398837af377a7e1c4edd7cbb15eabecd2c3103 | [
"MIT"
] | null | null | null | simple-sklearn-demo/test1/dictVector.py | crackedcd/Intern.MT | 36398837af377a7e1c4edd7cbb15eabecd2c3103 | [
"MIT"
] | 1 | 2019-06-24T05:56:55.000Z | 2019-06-24T05:56:55.000Z | # coding: utf-8
from sklearn.feature_extraction import DictVectorizer
def dict_demo():
data = [
{
"city": "北京",
"value": 100
},
{
"city": "上海",
"value": 99
},
{
"city": "贵阳",
"value": 98
}
... | 21.894737 | 68 | 0.558894 |
ebdc1b331588765b7da9b68fec442ab2dfd30f09 | 6,373 | py | Python | module/optimizer.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | null | null | null | module/optimizer.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | null | null | null | module/optimizer.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | null | null | null | 'optimizer.py'
'Main Datei'
'Das Programm wird über dieses Steuerungsskript gesteuert'
'Einige Dateien werden hier direkt aufgerufen, andere indirekt'
from d_optimal_design import Doptimaldesign
import parallelcomp
import numpy as np
from leastsquares import buildmodel,regkoeff
var = [579,40,18,19... | 25.189723 | 250 | 0.509022 |
ccf68f76349101dff878287352c40efa9a616fac | 1,803 | py | Python | TimeSeries/not_finished/other/prophet_multiplicative_seasonalities.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | null | null | null | TimeSeries/not_finished/other/prophet_multiplicative_seasonalities.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-02-11T23:44:52.000Z | 2021-02-11T23:44:52.000Z | TimeSeries/not_finished/other/prophet_multiplicative_seasonalities.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-12-16T01:02:23.000Z | 2021-12-16T01:02:23.000Z | """
Possible bug in fb prophet for multiplicative seasonalities.
"""
# %%
import numpy as np
import pandas as pd
import prophet
# %%
df = pd.DataFrame()
df['ds'] = pd.date_range(start='2019-01-01',end='2021-01-01',freq='4H')
df['daily_effect'] = np.cos(df['ds'].dt.hour/24 * 2*np.pi)*-0.5+0.5
df['yearly_effect'] = np.... | 27.318182 | 102 | 0.681642 |
c9c44d120ddeb0f5a567eeef29f37f6a3df76c67 | 2,230 | py | Python | nz_django/day5/orm_homework/front/views.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_django/day5/orm_homework/front/views.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_django/day5/orm_homework/front/views.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | from django.shortcuts import render
from django.http import HttpResponse
from .models import Student,Teacher,Score,Course
from django.db.models import Avg,Count,Sum,F,Q
from django.db import connection
# Create your views here.
def index(request):
students = Student.objects.annotate(score_avg=Avg('score__number')).... | 37.166667 | 197 | 0.733184 |
4e47d1fc0e474beecdfd66865c6f6040e153f489 | 2,582 | py | Python | setup.py | leibniz-psychology/bawwab | 2e7129bf59b33c0ee22a960e7b2835888068fd1a | [
"MIT"
] | 2 | 2021-07-06T06:00:22.000Z | 2022-01-15T09:29:44.000Z | setup.py | leibniz-psychology/bawwab | 2e7129bf59b33c0ee22a960e7b2835888068fd1a | [
"MIT"
] | 11 | 2020-11-26T10:53:44.000Z | 2022-03-31T09:42:51.000Z | setup.py | leibniz-psychology/bawwab | 2e7129bf59b33c0ee22a960e7b2835888068fd1a | [
"MIT"
] | 1 | 2022-01-15T09:30:46.000Z | 2022-01-15T09:30:46.000Z | import subprocess, shutil, os
from setuptools import setup, Command
from distutils.command.build import build
build.sub_commands.insert (0, ('esbuild', lambda self: True))
class Esbuild (Command):
user_options = [('debug', None, 'Create debug build')]
def initialize_options(self):
self.debug = False
def finali... | 27.763441 | 61 | 0.611929 |
4ed4df9176d79dd4c45d574835b5a38517b0848c | 14,016 | py | Python | frappe-bench/apps/erpnext/erpnext/demo/setup/setup_data.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/demo/setup/setup_data.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/demo/setup/setup_data.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | from __future__ import print_function, unicode_literals
import random, json
import frappe, erpnext
from frappe.utils.nestedset import get_root_of
from frappe.utils import flt, now_datetime, cstr, random_string
from frappe.utils.make_random import add_random_children, get_random
from erpnext.demo.domains import data
fr... | 34.019417 | 375 | 0.713256 |
0950e4f6ffc896e274ebb2976193da8604a5e1c2 | 2,198 | py | Python | klufweb/feed/views.py | mseln/klufweb | a785d44415fde933723220fab7f18f2ae4fd748d | [
"Apache-2.0"
] | null | null | null | klufweb/feed/views.py | mseln/klufweb | a785d44415fde933723220fab7f18f2ae4fd748d | [
"Apache-2.0"
] | 5 | 2015-05-22T12:05:54.000Z | 2015-05-22T12:09:06.000Z | klufweb/feed/views.py | mseln/klufweb | a785d44415fde933723220fab7f18f2ae4fd748d | [
"Apache-2.0"
] | null | null | null | from django.http import Http404
from django.shortcuts import render
from django.views.generic import View
from django.template import RequestContext
from feed.models import NewsArticle
from feed.models import Event
from feed.templatetags import ext_img
from django import template
register = template.Library()
class ... | 33.30303 | 98 | 0.645587 |
11bce06850d5cecdcc88ad153d9ef559d5c4798b | 515 | py | Python | verto/errors/ArgumentDefinitionError.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 4 | 2017-04-10T06:09:54.000Z | 2019-05-04T02:07:40.000Z | verto/errors/ArgumentDefinitionError.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 268 | 2017-04-03T20:40:46.000Z | 2022-02-04T20:10:08.000Z | verto/errors/ArgumentDefinitionError.py | uccser/kordac | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 1 | 2019-01-07T15:46:31.000Z | 2019-01-07T15:46:31.000Z | from verto.errors.Error import Error
class ArgumentDefinitionError(Error):
'''Exception raised when an argument exists but is not readable.
The most likely scenario is that an author has used single quotes
instead of double quotes.
Attributes:
argument: the argument that was at error
... | 28.611111 | 69 | 0.695146 |
fef649a70cc68b5170b3dcc5a9aca3b98025bef1 | 2,406 | py | Python | setup.py | mgao6767/wrds | 7dca2651a181bf38c61ebde675c9f64d6c96f608 | [
"MIT"
] | null | null | null | setup.py | mgao6767/wrds | 7dca2651a181bf38c61ebde675c9f64d6c96f608 | [
"MIT"
] | null | null | null | setup.py | mgao6767/wrds | 7dca2651a181bf38c61ebde675c9f64d6c96f608 | [
"MIT"
] | null | null | null | import sys
from sysconfig import get_path
from setuptools import setup, find_namespace_packages, Extension
from setuptools.command.build_ext import build_ext
from frds import (
__version__,
__description__,
__author__,
__author_email__,
__github_url__,
)
try:
import numpy
except ImportError:
... | 26.152174 | 88 | 0.655445 |
28d84b4442fc0d72022f7577567bce6fe9f16096 | 638 | py | Python | frappe-bench/apps/erpnext/erpnext/accounts/doctype/cash_flow_mapping/cash_flow_mapping.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/accounts/doctype/cash_flow_mapping/cash_flow_mapping.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/doctype/cash_flow_mapping/cash_flow_mapping.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class CashFlowMapping(Document):
def validate(self):
self.validate_checked... | 27.73913 | 105 | 0.73511 |
c2a54605205cf38efdb6f3c7206f00a02dd46d97 | 86,253 | py | Python | src/comex_stat/assets/tests.py | mdicgovbr/2018.2-ComexStat | 9eb339e6995585061317d41eabed99b569472806 | [
"MIT"
] | null | null | null | src/comex_stat/assets/tests.py | mdicgovbr/2018.2-ComexStat | 9eb339e6995585061317d41eabed99b569472806 | [
"MIT"
] | null | null | null | src/comex_stat/assets/tests.py | mdicgovbr/2018.2-ComexStat | 9eb339e6995585061317d41eabed99b569472806 | [
"MIT"
] | null | null | null | import graphene
from django.test import TestCase
from django.db import IntegrityError
from comex_stat.assets.schema import Query
from comex_stat.assets.models import (AssetImportFacts, AssetExportFacts,
TradeBlocs, Country, FederativeUnit,
Tran... | 35.090724 | 238 | 0.446929 |
66985d733460d4ca3e9bd349bb07be5cddf05ee1 | 109 | py | Python | 7_Dateibehandlung/01_concept_io.py | DavidStahl97/Python-Grundkurs | 6796d19116d2f838b193b106d00bc2e74a8cdcb4 | [
"MIT"
] | null | null | null | 7_Dateibehandlung/01_concept_io.py | DavidStahl97/Python-Grundkurs | 6796d19116d2f838b193b106d00bc2e74a8cdcb4 | [
"MIT"
] | null | null | null | 7_Dateibehandlung/01_concept_io.py | DavidStahl97/Python-Grundkurs | 6796d19116d2f838b193b106d00bc2e74a8cdcb4 | [
"MIT"
] | null | null | null | items = ["cat", "hat", "mat"]
filename = "./file.txt"
# Version 1
# Das gleiche Version 2
# Version 3
| 8.384615 | 29 | 0.577982 |
06e91a14517b1cdf22041e378c7b07aac83f3b46 | 1,038 | py | Python | kernel/website/models.py | sageteam/behpack | 3b8afb81dc7da70807308af4c8a2d2ab92b1a133 | [
"MIT"
] | null | null | null | kernel/website/models.py | sageteam/behpack | 3b8afb81dc7da70807308af4c8a2d2ab92b1a133 | [
"MIT"
] | null | null | null | kernel/website/models.py | sageteam/behpack | 3b8afb81dc7da70807308af4c8a2d2ab92b1a133 | [
"MIT"
] | null | null | null | from django.db import models
from painless import functions as func
import secrets
# Create your models here.
class WebsiteContent(models.Model):
about = models.TextField()
# Advertisement
title1 = models.CharField(max_length = 16)
title2 = models.CharField(max_length = 16)
description1 = models.T... | 32.4375 | 135 | 0.722543 |
b0ae1f34abb63375454fe73a43bbd918d39bef00 | 866 | py | Python | nz_django/day1/reverse_demo/front/views.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_django/day1/reverse_demo/front/views.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_django/day1/reverse_demo/front/views.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | from django.http import HttpResponse
from django.shortcuts import reverse,redirect
# Create your views here.
def index(request):
#http://127.0.0.1:8000/?username=kangbazi
# username = request.GET['username']
username = request.GET.get('username')
if username:
return HttpResponse('首页')
else:
... | 30.928571 | 74 | 0.657044 |
b02b5be893c449adc8bb3ff8693ed3e96271fc93 | 291 | py | Python | python/coursera_python/WESLEYAN/week3/COURSERA/week_3/csv/first.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/WESLEYAN/week3/COURSERA/week_3/csv/first.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/WESLEYAN/week3/COURSERA/week_3/csv/first.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import csv
def read_csv_file1(filename):
"""Reads a CSV file and print it as a list of rows."""
f = open(filename)
data = []
for row in csv.reader(f):
data.append(row)
print(data)
f.close()
filename = input("Enter a filename : ")
read_csv_file1(filename)
| 22.384615 | 58 | 0.62543 |
05b2515bfdbab1eb3b1851c6edbd600740695b56 | 629 | py | Python | src/test/tests/operators/multires.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/multires.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/multires.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: multires.py
#
# Programmer: Tom Fogal
# Date: August 6, 2010
#
# ----------------------------------------------------------------------------
ds = data_path("Chombo_test_data/chombo.visit")
OpenD... | 18.5 | 78 | 0.550079 |
a55b4366ead500497f2a9218eded5c90d48e3151 | 1,241 | py | Python | src/main/python/run.py | gwdgithubnom/ox-patient | cddf4fe381cb4506db8e0d62803dd2044cf7ad92 | [
"MIT"
] | null | null | null | src/main/python/run.py | gwdgithubnom/ox-patient | cddf4fe381cb4506db8e0d62803dd2044cf7ad92 | [
"MIT"
] | null | null | null | src/main/python/run.py | gwdgithubnom/ox-patient | cddf4fe381cb4506db8e0d62803dd2044cf7ad92 | [
"MIT"
] | 1 | 2021-04-14T00:45:38.000Z | 2021-04-14T00:45:38.000Z | from tools import image_xml_builder
from tools import logger
log=logger.getLogger()
from tools import binaryzation_crop
from tools import file_manage
from tools import image_xml_builder
from tools import image_rebuild
from pandas import DataFrame
import numpy as np
import pandas
from context import res... | 38.78125 | 141 | 0.73892 |
3c210ceb48b22d1178a9fc81d35542cdb5451c99 | 3,080 | py | Python | app/auth/forms.py | kalbe09/Kicards | ad64cfa808307b10f98f95dbb8cf0350995c3afd | [
"MIT"
] | null | null | null | app/auth/forms.py | kalbe09/Kicards | ad64cfa808307b10f98f95dbb8cf0350995c3afd | [
"MIT"
] | null | null | null | app/auth/forms.py | kalbe09/Kicards | ad64cfa808307b10f98f95dbb8cf0350995c3afd | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField, SubmitField, ValidationError
from wtforms.validators import DataRequired, Email, Length, Regexp, EqualTo
from ..models.users import User
class LoginForm(FlaskForm):
email = StringField('Email', validators=[DataRequired()... | 45.970149 | 92 | 0.69513 |
abbe7f00dacc29cb87280177d6295faf587488b1 | 2,008 | py | Python | drawing.py | PaulMndn/Abschlussarbeit_Programming_Basics | d0c28d1a690ea2e1e2c24599ddd61a8b868f422f | [
"MIT"
] | null | null | null | drawing.py | PaulMndn/Abschlussarbeit_Programming_Basics | d0c28d1a690ea2e1e2c24599ddd61a8b868f422f | [
"MIT"
] | null | null | null | drawing.py | PaulMndn/Abschlussarbeit_Programming_Basics | d0c28d1a690ea2e1e2c24599ddd61a8b868f422f | [
"MIT"
] | null | null | null | import math
from tkinter import *
from Biologic import get_bonds
# Startposition für das Zeichnen
sx = 600
sy = 500
# zeichne eine Base
def drawBase(canvas,x,y,b):
canvas.create_oval(x-7,y-7,x+7,y+7, width = 1)
canvas.create_text(x,y,text = str(b))
# zeichne eine Linie
def drawLine(canvas,lx, ly, rx, ry, n):... | 26.421053 | 85 | 0.594622 |
fd3aed97245dd186ea183c8f49c97da68789b2a3 | 303 | py | Python | app/validators/ticket.py | zucc-acm-devteam/zuccacm-sso | 9c7d2f0b9cc069962f32b555152732a98bf2e94a | [
"Apache-2.0"
] | null | null | null | app/validators/ticket.py | zucc-acm-devteam/zuccacm-sso | 9c7d2f0b9cc069962f32b555152732a98bf2e94a | [
"Apache-2.0"
] | null | null | null | app/validators/ticket.py | zucc-acm-devteam/zuccacm-sso | 9c7d2f0b9cc069962f32b555152732a98bf2e94a | [
"Apache-2.0"
] | null | null | null | from app.validators.base import BaseForm
from wtforms.fields import StringField
from wtforms.validators import DataRequired
class CheckTicketForm(BaseForm):
username = StringField(validators=[DataRequired(message='用户名不能为空')])
ticket = StringField(validators=[DataRequired(message='校验值不能为空')])
| 33.666667 | 72 | 0.805281 |
1fb8d70dd2b0f6b5f59687a6b5019944e26e0625 | 386 | py | Python | Exercicios/energy.py | BoltzBit/LP | f84d36d1bdee9a20c197cebec2810234c5311fb8 | [
"MIT"
] | null | null | null | Exercicios/energy.py | BoltzBit/LP | f84d36d1bdee9a20c197cebec2810234c5311fb8 | [
"MIT"
] | null | null | null | Exercicios/energy.py | BoltzBit/LP | f84d36d1bdee9a20c197cebec2810234c5311fb8 | [
"MIT"
] | null | null | null | #calculo do consumo de energia de um eletrodomestico
potencia = float(input('informe a potência do eletrodoméstico (kW): '))
horasLigadas = float(input('informe a quantidade de horas em funcionamento: '))
consumo = (potencia)*horasLigadas
valorConsumo = consumo*(0.51761)
consumo_mensal = valorConsumo * 20
msg = 'Va... | 27.571429 | 79 | 0.756477 |
23b8be2c09ac2bbaf8009bda981175139ba60b1a | 1,886 | py | Python | us-weather-history/wunderground_scraper.py | h4ckfu/data | bdc02fd5051dfb31e42f8e078832ceead92f9958 | [
"CC-BY-4.0"
] | 16,124 | 2015-01-01T06:18:12.000Z | 2022-03-31T00:46:52.000Z | us-weather-history/wunderground_scraper.py | h4ckfu/data | bdc02fd5051dfb31e42f8e078832ceead92f9958 | [
"CC-BY-4.0"
] | 179 | 2015-01-07T10:19:57.000Z | 2022-02-21T21:19:14.000Z | us-weather-history/wunderground_scraper.py | h4ckfu/data | bdc02fd5051dfb31e42f8e078832ceead92f9958 | [
"CC-BY-4.0"
] | 12,163 | 2015-01-03T14:23:36.000Z | 2022-03-31T10:10:23.000Z | # coding: utf-8
from datetime import datetime, timedelta
from urllib.request import urlopen
import os
def scrape_station(station):
'''
This function scrapes the weather data web pages from wunderground.com
for the station you provide it.
You can look up your city's weather station by performing a se... | 34.925926 | 92 | 0.587487 |
7b198f3adf9a99d6fed7689c0798bda0abf7ae58 | 1,246 | py | Python | test/test_laplace_smooth.py | katsugeneration/schuss | 30e2303aa0646f0a4424cbc4b5422acc58a06218 | [
"Apache-2.0"
] | 6 | 2018-12-20T06:50:52.000Z | 2021-12-16T13:08:38.000Z | test/test_laplace_smooth.py | katsugeneration/schuss | 30e2303aa0646f0a4424cbc4b5422acc58a06218 | [
"Apache-2.0"
] | 1 | 2020-06-29T07:00:51.000Z | 2020-06-29T07:00:51.000Z | test/test_laplace_smooth.py | katsugeneration/schuss | 30e2303aa0646f0a4424cbc4b5422acc58a06218 | [
"Apache-2.0"
] | 1 | 2022-03-04T07:29:55.000Z | 2022-03-04T07:29:55.000Z | from parameterized import parameterized
from nose.tools import assert_equal, assert_true
import os
import sys
dir_path = os.path.dirname(os.path.abspath(__file__))
module_path = os.path.join(dir_path, "../src/smoother")
if module_path not in sys.path:
sys.path.append(module_path)
module_path = os.path.join(dir_pat... | 34.611111 | 113 | 0.666934 |
c8d5792f224695ccac2e7951797fdfe00a31af7d | 498 | py | Python | scripts/unisex-names.py | graylion-wa/world-anvil-generators | f9718517b95997b6dfbc9ab6370d03ab87e40601 | [
"MIT"
] | 1 | 2021-06-08T17:34:24.000Z | 2021-06-08T17:34:24.000Z | scripts/unisex-names.py | graylion-wa/world-anvil-generators | f9718517b95997b6dfbc9ab6370d03ab87e40601 | [
"MIT"
] | 2 | 2021-06-23T07:58:38.000Z | 2021-06-28T18:00:18.000Z | scripts/unisex-names.py | graylion-wa/world-anvil-generators | f9718517b95997b6dfbc9ab6370d03ab87e40601 | [
"MIT"
] | 1 | 2021-06-19T10:03:06.000Z | 2021-06-19T10:03:06.000Z |
if __name__ == '__main__':
with open('../names/french/sources/female-given-names.csv') as f:
female_names = f.read().split('\n')
with open('../names/french/sources/male-given-names.csv') as m:
male_names = m.read().split('\n')
set_female = set(female_names)
set_male = set(male_names)... | 26.210526 | 69 | 0.61245 |
a9168e80893337b72a69c47a288067d2ffde5cc9 | 85 | py | Python | ddash/apps.py | NAL0/nalbt | c411ead60fac8923e960e67f4bbad5c7aeffc614 | [
"MIT"
] | null | null | null | ddash/apps.py | NAL0/nalbt | c411ead60fac8923e960e67f4bbad5c7aeffc614 | [
"MIT"
] | null | null | null | ddash/apps.py | NAL0/nalbt | c411ead60fac8923e960e67f4bbad5c7aeffc614 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class DdashConfig(AppConfig):
name = 'ddash'
| 14.166667 | 33 | 0.741176 |
fdaf87cb9d65effcfd83509dab272d8e609c7bbd | 1,297 | py | Python | sk/lotter/__init__.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2017-10-23T14:58:47.000Z | 2017-10-23T14:58:47.000Z | sk/lotter/__init__.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | null | null | null | sk/lotter/__init__.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2018-04-06T07:49:18.000Z | 2018-04-06T07:49:18.000Z | def viterbi(obs, states, start, trans, emit):
now = {}
for state in states:
now[state] = (start[state], [state], start[state])
for ob in obs:
next = {}
for next_state in states:
total = 0
path_max = None
val_max = 0
for state in states:... | 33.25641 | 109 | 0.48882 |
fdc1dba83c4e436d8f7ea97b42810c8c5494b490 | 1,982 | py | Python | server.py | hottek/BPW | f821a56b662a69f1243739c388f05b83fd4fac27 | [
"MIT"
] | 1 | 2019-11-21T18:33:04.000Z | 2019-11-21T18:33:04.000Z | server.py | hottek/BPW | f821a56b662a69f1243739c388f05b83fd4fac27 | [
"MIT"
] | 1 | 2019-11-21T20:06:56.000Z | 2019-11-21T20:06:56.000Z | server.py | hottek/BPW | f821a56b662a69f1243739c388f05b83fd4fac27 | [
"MIT"
] | null | null | null | from flask import Flask, send_from_directory, request
import sqlite3
import datetime
import jinja2
app = Flask(__name__)
fDir = '/app/static'
db = "/database/database.db"
@app.route('/')
def index():
print("I should server", flush=True)
return send_from_directory(fDir, 'index.html')
@app.route('/submit', ... | 25.74026 | 118 | 0.616549 |
fdc654454fa005305fc53f131e78d9afecee352f | 495 | py | Python | Python/Buch_ATBS/Teil_2/Kapitel_09_Dateien_verwalten/07_backup_mit_zip/28_backup_mit_zip.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_2/Kapitel_09_Dateien_verwalten/07_backup_mit_zip/28_backup_mit_zip.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_2/Kapitel_09_Dateien_verwalten/07_backup_mit_zip/28_backup_mit_zip.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # 28_backup_mit_zip.py
# Ordnerinhalt in Zipfile speichern mit forlaufender nummerierung
import os, shutil, zipfile
os.chdir(os.path.dirname(__file__))
backuppath='.\\backup_me'
targetpath='.\\backups'
backupcounter=len(os.listdir(targetpath))
zipname=zipfile.ZipFile(targetpath+'\\backup'+str(backupcounter+1)+'.zip',... | 30.9375 | 79 | 0.757576 |
47e214e1b48bd3281bd916ef1239d234b528b586 | 9,695 | py | Python | frappe-bench/apps/erpnext/erpnext/accounts/doctype/gl_entry/gl_entry.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/doctype/gl_entry/gl_entry.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/doctype/gl_entry/gl_entry.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe, erpnext
from frappe import _
from frappe.utils import flt, fmt_money, getdate, formatdate
from frappe.model.document import Document
from... | 41.609442 | 142 | 0.743167 |
9a24e5924eb45d421a2f133a25b49a1d4fd0c5b0 | 3,922 | py | Python | autojail/commands/generate.py | ekut-es/autojail | bc16e40e6df55c0a28a3059715851ffa59b14ba8 | [
"MIT"
] | 6 | 2020-08-12T08:16:15.000Z | 2022-03-05T02:25:53.000Z | autojail/commands/generate.py | ekut-es/autojail | bc16e40e6df55c0a28a3059715851ffa59b14ba8 | [
"MIT"
] | 1 | 2021-03-30T10:34:51.000Z | 2021-06-09T11:24:00.000Z | autojail/commands/generate.py | ekut-es/autojail | bc16e40e6df55c0a28a3059715851ffa59b14ba8 | [
"MIT"
] | 1 | 2021-11-21T09:30:58.000Z | 2021-11-21T09:30:58.000Z | from pathlib import Path
import ruamel.yaml
from ..config import JailhouseConfigurator
from ..model import Board
from ..model.parameters import (
GenerateConfig,
GenerateParameters,
Partitions,
ScalarChoice,
)
from .base import BaseCommand
class GenerateCommand(BaseCommand):
"""Generate the Jail... | 33.521368 | 104 | 0.604793 |
9a55520732a1f0585968b88a7b98d92e3239d1c0 | 8,006 | py | Python | myscrumy/ajibadeolufemi94scrumy/views.py | Justfemi/Nameless | 239a44fd571d10d55a80a787ee865714c41552fa | [
"MIT"
] | null | null | null | myscrumy/ajibadeolufemi94scrumy/views.py | Justfemi/Nameless | 239a44fd571d10d55a80a787ee865714c41552fa | [
"MIT"
] | null | null | null | myscrumy/ajibadeolufemi94scrumy/views.py | Justfemi/Nameless | 239a44fd571d10d55a80a787ee865714c41552fa | [
"MIT"
] | null | null | null | from django.shortcuts import render, get_object_or_404, redirect, HttpResponseRedirect
from django.http import HttpResponse
from .models import User, ScrumyGoals, ScrumyHistory, GoalStatus
import random
from .forms import SignupForm, CreateGoalForm, MoveGoalForm
from django.contrib.auth.models import Group
from django... | 42.136842 | 156 | 0.628778 |
324839f33c3d6488be5207121870cb8d36481576 | 26 | py | Python | .venv/Lib/site-packages/Code2pdf/__init__.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | null | null | null | .venv/Lib/site-packages/Code2pdf/__init__.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | null | null | null | .venv/Lib/site-packages/Code2pdf/__init__.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | null | null | null | from code2pdf import main
| 13 | 25 | 0.846154 |
0871aefca72779eb031bdfbf49949ae566698b13 | 6,822 | py | Python | Modell/CSV/CSVErstellen.py | NoahEmbedded/EmbeddedKWD | 2380d56b0b75bae4fedeb60885358332766f7319 | [
"MIT"
] | null | null | null | Modell/CSV/CSVErstellen.py | NoahEmbedded/EmbeddedKWD | 2380d56b0b75bae4fedeb60885358332766f7319 | [
"MIT"
] | null | null | null | Modell/CSV/CSVErstellen.py | NoahEmbedded/EmbeddedKWD | 2380d56b0b75bae4fedeb60885358332766f7319 | [
"MIT"
] | null | null | null | import csv
import time
import tensorflow as tf
import tensorflow.keras.models
from tensorflow.keras.preprocessing.image import load_img,img_to_array
from numpy import expand_dims
from os import listdir
def ladeBild(pfad):
bild = load_img(path = pfad,color_mode = 'grayscale')
array = img_to_array(bild)
arra... | 37.076087 | 108 | 0.637936 |
08ca3c99c026ebdad852416c599880c0c143c592 | 1,297 | py | Python | tests/unit/filters/test_xyz_filters.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 1,142 | 2016-10-10T08:55:30.000Z | 2022-03-30T04:46:16.000Z | tests/unit/filters/test_xyz_filters.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 195 | 2016-10-10T08:30:37.000Z | 2022-02-17T12:51:17.000Z | tests/unit/filters/test_xyz_filters.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 215 | 2017-02-28T00:50:29.000Z | 2022-03-22T17:01:31.000Z | import pytest
from numpy.testing import assert_array_equal
from pyntcloud.filters.xyz import BoundingBoxFilter
@pytest.mark.usefixtures("simple_pyntcloud")
def test_BoundingBoxFilter_default_values(simple_pyntcloud):
"""
Default bounding box values are infinite so all points
should pass the filter.
... | 24.018519 | 93 | 0.627602 |
08ce9034782f9df3d5f17382e10d627e286520f1 | 1,153 | py | Python | DevOps/resources/Jenkins/scripts/notification/notifier/main.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | DevOps/resources/Jenkins/scripts/notification/notifier/main.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | DevOps/resources/Jenkins/scripts/notification/notifier/main.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | # Copyright 2018 Arie Bregman
#
# 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 agree... | 24.020833 | 78 | 0.664354 |
08f318bdee35952f0473781afe501c87db0fc91a | 6,023 | py | Python | Packs/PerceptionPoint/Integrations/PerceptionPoint/PerceptionPoint.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/PerceptionPoint/Integrations/PerceptionPoint/PerceptionPoint.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/PerceptionPoint/Integrations/PerceptionPoint/PerceptionPoint.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 *
''' IMPORTS'''
import requests
import json
from collections import defaultdict
''' INTEGRATION PARAMS '''
URL = 'http://api.perception-point.io/api/v1/{endpoint}' # disable-secrets-detection
INCIDENTS_ENDPOINT = 'scans/incidents/'
RELEASE_ENDPOINT = 'qua... | 33.093407 | 93 | 0.643865 |
eb17cad86539e3ac53db5caf750b57f8fd61382f | 5,242 | py | Python | handlers.py | wchming1987/Tumbler | e309771779c8eb44e685adbb691a428d29009e05 | [
"Apache-2.0"
] | null | null | null | handlers.py | wchming1987/Tumbler | e309771779c8eb44e685adbb691a428d29009e05 | [
"Apache-2.0"
] | null | null | null | handlers.py | wchming1987/Tumbler | e309771779c8eb44e685adbb691a428d29009e05 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding=utf-8 -*-
import json
from bson import json_util
import tornado.web
from doubanAPI import DoubanAPI
class BaseHandler(tornado.web.RequestHandler):
def __init__(self, *args, **kwargs):
# 继承于 tornado.web.RequestHandler
tornado.web.RequestHandler.__init__(self, *... | 31.578313 | 91 | 0.503052 |
de6d91aaca1f1d1da2fff63484ead3c8f1a05036 | 668 | py | Python | SoSe-21/Code-Vorlesungen/Wiederholung/Wiederholung-Ausnahmebehandlung.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | 1 | 2022-03-23T09:40:39.000Z | 2022-03-23T09:40:39.000Z | SoSe-21/Code-Vorlesungen/Wiederholung/Wiederholung-Ausnahmebehandlung.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | SoSe-21/Code-Vorlesungen/Wiederholung/Wiederholung-Ausnahmebehandlung.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | print("Willkommen auf der Seite der Flensburger Brauerei.")
print("Bitte geben Sie Ihr Alter zur Verifikation ein.")
# Ändern des Datentypen von 'string' in 'int', damit wir damit rechnen können
gueltige_eingabe = False
while not gueltige_eingabe:
# Mithilfe von try,except technisch prüfen, ob ein 'int' kommt oder... | 39.294118 | 78 | 0.678144 |
c20b5b6c6354f48f99e2075f8290202042be74b3 | 546 | py | Python | python/generator_tricks_for_systemprogrammer/gencat.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/generator_tricks_for_systemprogrammer/gencat.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/generator_tricks_for_systemprogrammer/gencat.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | # gencat.py
#
# Concatenate multiple generators into a single sequence
def gen_cat(sources):
for src in sources:
yield from src
def gen_cat_ver2(sources):
for src in sources:
for item in src:
yield item
# Example use
if __name__ == "__main__":
from pathl... | 19.5 | 57 | 0.617216 |
dfcf065ed5ccd093852e24c4d0fb05eb84433087 | 454 | py | Python | leetcode/274-H-Index/HIndex_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/274-H-Index/HIndex_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/274-H-Index/HIndex_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution(object):
def hIndex(self, citations):
"""
:type citations: List[int]
:rtype: int
"""
citations.sort()
citations = [0] + citations
res = 0
n = len(citations)
for i in xrange(n - 1):
idx = n - 1 - i
if citat... | 25.222222 | 45 | 0.422907 |
dfd81f2c802574033dd9e74d178ea96b68398d90 | 285 | py | Python | sqrtx/sqrtx.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | sqrtx/sqrtx.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | sqrtx/sqrtx.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def mySqrt(self, x: int) -> int:
# solution 1. go thourgh all numbers
# i=0
# while(1):
# if x>=i*i and x<(i+1)*(i+1):
# return i
# i+=1
# solution 2. sqrt
return int(sqrt(x))
| 23.75 | 44 | 0.414035 |
2606c495d02b94f6f143088caba9b1d899dbb8fd | 2,611 | py | Python | ais3-pre-exam-2022-writeup/Misc/ASTJail/chal.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | ais3-pre-exam-2022-writeup/Misc/ASTJail/chal.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | ais3-pre-exam-2022-writeup/Misc/ASTJail/chal.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | import sys
import ast
import re
from code import InteractiveConsole
WHITE_LIST = ['print', 'bool', 'int', 'float', 'str', 'len', 'pow',
'abs', 'min', 'max', 'sum', 'chr', 'ord', 'hex', 'oct', 'bin']
def check(code):
# Python ast: https://docs.python.org/3.10/library/ast.html
def traverse(node):... | 38.397059 | 99 | 0.594408 |
266310e3976a23ffae90f038e385c7b99bcb4f37 | 53 | py | Python | pylokid/__init__.py | tobru/pylokid | 15b46d19c62ef62c068873554cafdc5b1bc0072a | [
"MIT"
] | 3 | 2020-03-03T07:38:24.000Z | 2021-07-21T22:40:41.000Z | pylokid/__init__.py | tobru/pylokid | 15b46d19c62ef62c068873554cafdc5b1bc0072a | [
"MIT"
] | 10 | 2018-01-02T17:46:06.000Z | 2021-12-13T20:58:38.000Z | pylokid/__init__.py | tobru/pylokid | 15b46d19c62ef62c068873554cafdc5b1bc0072a | [
"MIT"
] | null | null | null | """
Pylokid. From Mail to Lodur - all automated.
"""
| 13.25 | 44 | 0.641509 |
26b4f5f85be4374a50dbf5b4ae478601a8ea5309 | 21,649 | py | Python | Fill.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | null | null | null | Fill.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 5 | 2020-01-18T21:10:46.000Z | 2020-01-25T20:58:19.000Z | Fill.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 2 | 2020-01-18T17:36:50.000Z | 2020-01-22T16:52:08.000Z | import logging
import typing
import collections
import itertools
from BaseClasses import CollectionState, PlandoItem, Location
from Items import ItemFactory
from Regions import key_drop_data
class FillError(RuntimeError):
pass
def fill_restrictive(world, base_state: CollectionState, locations, itempool, single... | 49.426941 | 178 | 0.597441 |
9044ddb3447abff73b7c9db14cb50377083734e6 | 29,295 | py | Python | tests/onegov/gazette/test_models.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/gazette/test_models.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/gazette/test_models.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from datetime import date
from datetime import datetime
from freezegun import freeze_time
from onegov.file.utils import as_fileintent
from onegov.gazette.collections import OrganizationCollection
from onegov.gazette.models import Category
from onegov.gazette.models import GazetteNotice
from onegov.gazette.models import... | 32.805151 | 79 | 0.632599 |
39678f7032227c6c0106f729eae837591d413dbb | 86,562 | py | Python | experimental/OUTDATED/ts2dataclass/veraltet/lsp-specification_V1.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 2 | 2020-12-25T19:37:42.000Z | 2021-03-26T04:59:12.000Z | experimental/OUTDATED/ts2dataclass/veraltet/lsp-specification_V1.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 6 | 2018-08-07T22:48:52.000Z | 2021-10-07T18:38:20.000Z | experimental/OUTDATED/ts2dataclass/veraltet/lsp-specification_V1.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | null | null | null |
import copy
from enum import Enum, IntEnum
import functools
from typing import Union, List, Tuple, Optional, Dict, Any, Generic, TypeVar, \
Iterable, cast
try:
from typing import ForwardRef
except ImportError:
from typing import _ForwardRef # Python 3.6 compatibility
ForwardRef = _ForwardRef
class ... | 27.896229 | 144 | 0.733093 |
3969f36c354ad32ea4a94a9c362971def529ca5c | 570 | py | Python | psd_parser.py | shwarzes89/WIT | 54ba3ff8a7143948935510facf4b64cdd7f0bd74 | [
"MIT"
] | null | null | null | psd_parser.py | shwarzes89/WIT | 54ba3ff8a7143948935510facf4b64cdd7f0bd74 | [
"MIT"
] | null | null | null | psd_parser.py | shwarzes89/WIT | 54ba3ff8a7143948935510facf4b64cdd7f0bd74 | [
"MIT"
] | null | null | null | from psd_tools import PSDImage
import psd_tools
class PSDHelper(object):
path = "./img/"
def __init__(self, file_name):
self.file_name = file_name
self.psd = PSDImage.load(file_name)
def save2PNG(self):
merged = self.psd.as_PIL()
merged.save(self.path + self.file_name)
... | 23.75 | 82 | 0.673684 |
39ae0020b6c5af670acca592e2979813e65d3f8f | 3,399 | py | Python | src/onegov/org/forms/generic.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/forms/generic.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/forms/generic.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from morepath.request import Response
from onegov.form import Form
from onegov.org import _
from onegov.core.csv import convert_list_of_dicts_to_csv
from onegov.core.csv import convert_list_of_dicts_to_xlsx
from onegov.core.utils import normalize_for_url
from wtforms import RadioField, validators
from wtforms.fields.ht... | 29.051282 | 77 | 0.578994 |
84556472f6c856d166259fc36ec147c40d1a515d | 5,984 | py | Python | wordbib_to_bibtex.py | abjordan/word2bibtex | fbe1d7aa4adafa491ec19e9acf21445c51b43604 | [
"Apache-2.0"
] | null | null | null | wordbib_to_bibtex.py | abjordan/word2bibtex | fbe1d7aa4adafa491ec19e9acf21445c51b43604 | [
"Apache-2.0"
] | null | null | null | wordbib_to_bibtex.py | abjordan/word2bibtex | fbe1d7aa4adafa491ec19e9acf21445c51b43604 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Convert a Word bibliography into a set of BibTeX entries.
# Only vaguely tested, so use at your own risk.
# Author: Alex Jordan <alex.jordan@raytheon.com>
import argparse
import os
import re
import sys
import xml.etree.ElementTree as ET
import zipfile
wordns = { 'b': 'http://schemas.openxmlf... | 33.430168 | 139 | 0.606283 |
ffbfc8e21973d73b48239d2359f8b28a9607ae88 | 1,196 | py | Python | projects/g4h1-wsn/src/wsn/core.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | projects/g4h1-wsn/src/wsn/core.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | projects/g4h1-wsn/src/wsn/core.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | import logging
from functools import reduce
from operator import and_
from typing import List
from .node import WsnNodeManager
from .medium import WsnMedium
class Wsn(object):
"""无线传感网络
"""
# 日志配置
logger: logging.Logger = logging.getLogger('wsn.core')
node_manager: WsnNodeManager
... | 26 | 59 | 0.590301 |
ffdce05317019798945983c71aa859b60e9a6091 | 227 | py | Python | backend/api/btb/api/error.py | prototypefund/project-c | a87a49d7c1317b1e3ec03ddd0ce146ad0391b5d2 | [
"MIT"
] | 4 | 2020-04-30T16:11:24.000Z | 2020-06-02T10:08:07.000Z | backend/api/btb/api/error.py | prototypefund/project-c | a87a49d7c1317b1e3ec03ddd0ce146ad0391b5d2 | [
"MIT"
] | 291 | 2020-04-20T13:11:13.000Z | 2022-02-10T21:54:46.000Z | backend/api/btb/api/error.py | prototypefund/project-c | a87a49d7c1317b1e3ec03ddd0ce146ad0391b5d2 | [
"MIT"
] | 2 | 2020-04-19T14:56:01.000Z | 2020-04-19T18:09:34.000Z |
class ApiError(Exception):
code = None
def __init__(self, *arg, **kw):
code = kw.pop("code", None)
if code is not None:
self.code = code
super(ApiError, self).__init__(*arg, **kw) | 20.636364 | 50 | 0.546256 |
29a14ccff563d89179fd71ed21af828f16d42403 | 6,786 | py | Python | tests/measures/test_bank.py | mgao6767/wrds | 7dca2651a181bf38c61ebde675c9f64d6c96f608 | [
"MIT"
] | 31 | 2020-06-17T13:19:12.000Z | 2022-03-27T08:56:38.000Z | tests/measures/test_bank.py | mgao6767/wrds | 7dca2651a181bf38c61ebde675c9f64d6c96f608 | [
"MIT"
] | null | null | null | tests/measures/test_bank.py | mgao6767/wrds | 7dca2651a181bf38c61ebde675c9f64d6c96f608 | [
"MIT"
] | 8 | 2020-06-14T15:21:51.000Z | 2021-09-29T06:28:53.000Z | import unittest
from frds.measures import bank
import numpy as np
class AbsorptionRatioCase(unittest.TestCase):
def setUp(self) -> None:
# The data in the doc by Dimitrios Bisias, Andrew W. Lo, and Stavros Valavanis
self.data = np.array(
[
[0.015, 0.031, 0.007, 0.034, 0... | 39.917647 | 119 | 0.597996 |
8a33d270cba7dc728b5dad5a2af189c17ceb10c9 | 12,346 | py | Python | research/cv/stgcn/src/model/layers.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/layers.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/layers.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... | 40.214984 | 111 | 0.609266 |
8aa971a035e60fd9f85e2032d2dd34bcd8ec1638 | 278 | py | Python | project/flaskr/config.py | Hackathon2020/CoronaHackathon2020 | 1f27ad7406c9da50a3acfb48f970a0b0b51c47da | [
"MIT"
] | 5 | 2020-03-21T12:58:10.000Z | 2020-03-23T13:02:18.000Z | project/flaskr/config.py | Hackathon2020/CoronaHackathon2020 | 1f27ad7406c9da50a3acfb48f970a0b0b51c47da | [
"MIT"
] | 26 | 2020-03-20T21:04:20.000Z | 2020-04-30T19:38:02.000Z | project/flaskr/config.py | Hackathon2020/CoronaHackathon2020 | 1f27ad7406c9da50a3acfb48f970a0b0b51c47da | [
"MIT"
] | 1 | 2020-05-08T20:45:20.000Z | 2020-05-08T20:45:20.000Z | LANGUAGE_MAP = {
"German": {"FirstName":"Vorname", "LastName": "Nachname", "Handynr": "Handy Nummer", "SubmitText": "Sende Fragebogen"},
"Spanish": {"FirstName":"nombre", "LastName": "apellidos", "teléfono móvil": "teléfono móvil", "SubmitText": "enviar cuestionario"}
} | 69.5 | 135 | 0.669065 |
0a1931ee0d025a910b39793a056bb5fc4bfdf145 | 6,259 | py | Python | fence/resources/openid/idp_oauth2.py | scottyellis/fence | 012ba76a58853169e9ee8e3f44a0dc510f4b2543 | [
"Apache-2.0"
] | 31 | 2018-01-05T22:49:33.000Z | 2022-02-02T10:30:23.000Z | fence/resources/openid/idp_oauth2.py | scottyellis/fence | 012ba76a58853169e9ee8e3f44a0dc510f4b2543 | [
"Apache-2.0"
] | 737 | 2017-12-11T17:42:11.000Z | 2022-03-29T22:42:52.000Z | fence/resources/openid/idp_oauth2.py | scottyellis/fence | 012ba76a58853169e9ee8e3f44a0dc510f4b2543 | [
"Apache-2.0"
] | 46 | 2018-02-23T09:04:23.000Z | 2022-02-09T18:29:51.000Z | from authlib.client import OAuth2Session
from cached_property import cached_property
from jose import jwt
import requests
import time
from fence.errors import AuthError
from fence.models import UpstreamRefreshToken
from flask_sqlalchemy_session import current_session
class Oauth2ClientBase(object):
"""
An gen... | 33.832432 | 106 | 0.578527 |
0a58c9a1ef557c7c30eb8393e8fd52d280889f6c | 597 | py | Python | exercises/en/solution_02_06.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/en/solution_02_06.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/en/solution_02_06.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | from spacy.lang.en import English
nlp = English()
# Import the Doc and Span classes
from spacy.tokens import Doc, Span
words = ["I", "like", "David", "Bowie"]
spaces = [True, True, True, False]
# Create a doc from the words and spaces
doc = Doc(nlp.vocab, words=words, spaces=spaces)
print(doc.text)
# Create a span... | 24.875 | 79 | 0.703518 |
6a83e059b9d259e541adb325c08a6034c7a08120 | 180 | py | Python | leetcode/326-Power-of-Three/PowerofThree_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/326-Power-of-Three/PowerofThree_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/326-Power-of-Three/PowerofThree_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution(object):
def isPowerOfThree(self, n):
"""
:type n: int
:rtype: bool
"""
return n > 0 and 3 ** round(math.log(n, 3)) == n
| 22.5 | 56 | 0.472222 |
0a94fe204e17783411572ee9dac85eb5c10d0867 | 3,780 | py | Python | data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_lof_curation.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 38 | 2018-02-24T02:33:52.000Z | 2020-03-03T23:17:04.000Z | data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_lof_curation.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 385 | 2018-02-21T16:53:13.000Z | 2020-03-04T00:52:40.000Z | data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_lof_curation.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 13 | 2020-05-01T13:03:54.000Z | 2022-02-28T13:12:57.000Z | import csv
import re
import hail as hl
from data_pipeline.data_types.variant import variant_id
FLAG_MAPPING = {
"Essential Splice Rescue": "Splice Rescue",
"Genotyping Error": "Genotyping Issue",
"Low Relative Mean Pext": "Low Relative Mean Pext/Pext Does Not Support Splicing",
"Low Relative Mean Pe... | 35.327103 | 120 | 0.586508 |
6b066c7448e5adfa97350afbb2c0721389d4f326 | 1,332 | py | Python | build/sdk/compute_atom_api.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | build/sdk/compute_atom_api.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | build/sdk/compute_atom_api.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2.7
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import argparse
import hashlib
import json
import sys
# Builds a representation of the atom's "API" by computing hashes for the file... | 28.956522 | 79 | 0.664414 |
8675f5f3528cb1d4221ddaf74b25577af6d75d75 | 264 | py | Python | exercises/zh/exc_02_05_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/zh/exc_02_05_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/zh/exc_02_05_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | from spacy.lang.en import English
nlp = English()
# 导入Doc类
from ____ import ____
# 目标文本:"Oh, really?!"
words = [____, ____, ____, ____, ____]
spaces = [____, ____, ____, ____, ____]
# 用words和spaces创建一个Doc
doc = ____(____, ____=____, ____=____)
print(doc.text)
| 17.6 | 39 | 0.69697 |
8697a565367f52c493874954e4e06e222bc2b8ed | 7,779 | py | Python | monitoring/prometheus/aliyun-exporter/aliyun_exporter/collector.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 63 | 2018-02-04T03:31:22.000Z | 2022-03-07T08:27:39.000Z | monitoring/prometheus/aliyun-exporter/aliyun_exporter/collector.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 3 | 2020-06-15T03:41:03.000Z | 2020-06-15T03:41:04.000Z | monitoring/prometheus/aliyun-exporter/aliyun_exporter/collector.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 40 | 2018-01-22T16:31:16.000Z | 2022-03-08T04:40:42.000Z | import json
import logging
import time
import os
from datetime import datetime, timedelta
from prometheus_client import Summary
from prometheus_client.core import GaugeMetricFamily, REGISTRY
from aliyunsdkcore.client import AcsClient
from aliyunsdkcms.request.v20180308 import QueryMetricLastRequest
from aliyunsdkrds.r... | 40.727749 | 129 | 0.639671 |
d49e79face5b2863b8a39508126b27831157f63c | 4,683 | py | Python | tests/rbac/common/role/remove_member_tests.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 75 | 2018-04-06T09:13:34.000Z | 2020-05-18T18:59:47.000Z | tests/rbac/common/role/remove_member_tests.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 989 | 2018-04-18T21:01:56.000Z | 2019-10-23T15:37:09.000Z | tests/rbac/common/role/remove_member_tests.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 72 | 2018-04-13T18:29:12.000Z | 2020-05-29T06:00:33.000Z | # Copyright 2019 Contributors to Hyperledger Sawtooth
#
# 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 ... | 32.978873 | 88 | 0.715567 |
d4cbe0252f15e7acf716af6acd2c61d469f90167 | 3,491 | py | Python | tests/onegov/wtfs/test_views_municipality.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/wtfs/test_views_municipality.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/wtfs/test_views_municipality.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.request import CoreRequest
from unittest.mock import patch
from webtest.forms import Upload
from freezegun import freeze_time
def test_views_municipality(client):
client.login_admin()
# Add a municipality
add = client.get('/municipalities').click(href='/add')
add.form['name'] = "Adli... | 31.169643 | 79 | 0.642796 |
077bd6ab0bfb33aae4e0b4d19db5e98215b1fcd4 | 466 | py | Python | kernel/website/migrations/0007_auto_20180605_2110.py | sageteam/behpack | 3b8afb81dc7da70807308af4c8a2d2ab92b1a133 | [
"MIT"
] | null | null | null | kernel/website/migrations/0007_auto_20180605_2110.py | sageteam/behpack | 3b8afb81dc7da70807308af4c8a2d2ab92b1a133 | [
"MIT"
] | null | null | null | kernel/website/migrations/0007_auto_20180605_2110.py | sageteam/behpack | 3b8afb81dc7da70807308af4c8a2d2ab92b1a133 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.6 on 2018-06-05 21:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('website', '0006_auto_20180605_2105'),
]
operations = [
migrations.AlterField(
model_name='awardscontent',
name='sku'... | 24.526316 | 126 | 0.635193 |
07d7d9cec00f732e07e7eb6a8760f0e6eba867a1 | 184 | py | Python | python/socket/getservbyport.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/socket/getservbyport.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/socket/getservbyport.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import socket
# reverse the service port lookup
for port in [80, 443, 21, 70, 25, 143, 993, 110, 995]:
url = '{}://example.com/'.format(socket.getservbyport(port))
print(url)
| 26.285714 | 64 | 0.657609 |
07f4e3deef089c40ffc16d008e654c8e9fccb196 | 629 | py | Python | src/network/bo/messages/block_message.py | TimHabeck/blockchain-lab | 3cd050ee43f26cf0a1f70869100f0b40a6abae07 | [
"RSA-MD"
] | null | null | null | src/network/bo/messages/block_message.py | TimHabeck/blockchain-lab | 3cd050ee43f26cf0a1f70869100f0b40a6abae07 | [
"RSA-MD"
] | null | null | null | src/network/bo/messages/block_message.py | TimHabeck/blockchain-lab | 3cd050ee43f26cf0a1f70869100f0b40a6abae07 | [
"RSA-MD"
] | null | null | null | from .message import Message
from blockchain.block import Block
class Block_message(Message):
def __init__(self, block) -> None:
super().__init__()
self._name = "block"
self._block = block
def get_block(self):
return self._block
def set_block(self, block):
self._b... | 23.296296 | 69 | 0.599364 |
b91eff646e23868efa7fdc104a02805c512e9ab0 | 685 | py | Python | Algorithms/Implementation/Migratory_Birds.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Algorithms/Implementation/Migratory_Birds.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Algorithms/Implementation/Migratory_Birds.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | #migratory birds
# https://www.hackerrank.com/challenges/migratory-birds/problem?h_r=internal-search
from collections import Counter
arr = [1,1,2,2,3]
#arr = [1,2,2,3,3,4,5]
#arr = [1, 2, 3, 4, 5, 4, 3, 2, 1, 3, 4]
"""
def migratorybirds(arr):
d = {}
for i in arr:
if arr.count(i) != 1:
d[... | 19.027778 | 83 | 0.567883 |
b9af36428508b70997e212ef6ab0b4bf50300b2e | 2,594 | py | Python | research/cv/simple_baselines/src/utils/nms.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/simple_baselines/src/utils/nms.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/simple_baselines/src/utils/nms.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.a... | 34.586667 | 100 | 0.556284 |
6a2bc7a0db38e1be57fb1bbf1d4533fed117b374 | 39,004 | py | Python | src/transformers/tokenization_utils.py | suliuzh/transformers | f34372a9ff99f6bc8619ac83dc07f7afe6b92141 | [
"Apache-2.0"
] | 12 | 2021-06-05T03:51:23.000Z | 2022-03-05T05:09:41.000Z | src/transformers/tokenization_utils.py | suliuzh/transformers | f34372a9ff99f6bc8619ac83dc07f7afe6b92141 | [
"Apache-2.0"
] | 1 | 2021-10-20T02:25:36.000Z | 2021-10-20T02:25:36.000Z | src/transformers/tokenization_utils.py | suliuzh/transformers | f34372a9ff99f6bc8619ac83dc07f7afe6b92141 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The HuggingFace Inc. team.
#
# 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... | 44.122172 | 155 | 0.61568 |
0ecaf642935a4b7dee7a2b1d5187b5ffe6c28229 | 2,149 | py | Python | tests/test_preisblatt_dienstleistung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | tests/test_preisblatt_dienstleistung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | tests/test_preisblatt_dienstleistung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | import pytest # type:ignore[import]
from bo4e.bo.preisblattdienstleistung import PreisblattDienstleistung, PreisblattDienstleistungSchema
from bo4e.enum.bilanzierungsmethode import Bilanzierungsmethode
from bo4e.enum.dienstleistungstyp import Dienstleistungstyp
from bo4e.enum.preisstatus import Preisstatus
from bo4e.... | 47.755556 | 113 | 0.720335 |
16627ecaf49e17658f7f976cb03184c56b611f2d | 12,825 | py | Python | venv/lib/python3.7/site-packages/twilio/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.py | uosorio/heroku_face | 7d6465e71dba17a15d8edaef520adb2fcd09d91e | [
"Apache-2.0"
] | 4 | 2020-11-13T02:31:25.000Z | 2020-12-24T22:04:30.000Z | venv/lib/python3.7/site-packages/twilio/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.py | uosorio/heroku_face | 7d6465e71dba17a15d8edaef520adb2fcd09d91e | [
"Apache-2.0"
] | 7 | 2020-06-03T19:08:42.000Z | 2021-09-22T19:08:32.000Z | bot/lib/python3.7/site-packages/twilio/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.py | carlosrh18/DavinciBot | d73a6b7f68d7bab25d134d3f85c6b63a86c206c5 | [
"MIT"
] | 1 | 2020-06-03T19:22:39.000Z | 2020-06-03T19:22:39.000Z | # coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import serialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import... | 37.173913 | 126 | 0.67922 |
bc5c9c1899d2fc951057cc15d95aa5301a7da7be | 136 | py | Python | python/data_sutram/scraper/cookie_1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/data_sutram/scraper/cookie_1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/data_sutram/scraper/cookie_1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import requests
import browsercookie
cj = browsercookie.firefox()
r = requests.get('http://stackoverflow.com', cookies=cj)
print(str(r)) | 27.2 | 56 | 0.772059 |
bcfd1bcceba6099846603cb4d84c82d928f5d5b6 | 277 | py | Python | LeetCode_problems/Running Sum of 1d Array/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 165 | 2020-10-03T08:01:11.000Z | 2022-03-31T02:42:08.000Z | LeetCode_problems/Running Sum of 1d Array/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 383 | 2020-10-03T07:39:11.000Z | 2021-11-20T07:06:35.000Z | LeetCode_problems/Running Sum of 1d Array/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 380 | 2020-10-03T08:05:04.000Z | 2022-03-19T06:56:59.000Z | class Solution:
def runningSum(self, nums: List[int]) -> List[int]:
# declare array to return
output = list()
# compute running sum for each index
for i in range(len(nums)):
output.append(sum(nums[:i+1]))
return output
| 25.181818 | 55 | 0.570397 |
4c1bdfabbc9672c640a60bb75b29d57d62bda738 | 442 | py | Python | exercises/fr/exc_01_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/fr/exc_01_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/fr/exc_01_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
nlp = spacy.load("fr_core_news_sm")
text = "Le constructeur Citröen présente la e-Méhari Courrèges au public."
# Traite le texte
doc = ____
# Itère sur les entités
for ____ in ____.____:
# Affiche le texte de l'entité et son label
print(____.____, ____.____)
# Obtiens la portion pour "e-Méhari... | 22.1 | 74 | 0.744344 |
fc4479aac18c23bdbfa3154028521400f072fb12 | 682 | py | Python | src/nfz_module/writer/AccidentHotspotsFileWriter.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | src/nfz_module/writer/AccidentHotspotsFileWriter.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | src/nfz_module/writer/AccidentHotspotsFileWriter.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | __author__ = 'Hans-Werner Roitzsch'
__date__ = '2015-12-29'
class AccidentHotspotsFileWriter:
"""docstring for AccidentHotspotsFileWriter"""
def __init__(self):
pass
# TODO: maybe we should use asyncio here???
@classmethod
def write_accident_hotspots_to_file(
self,
accident_hotspots_data, file_path='/root... | 31 | 130 | 0.772727 |
5d964e681ab11ac8de6b8bd0f8c0364def1bbba2 | 417 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v10_0/set_b2c_limit.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/v10_0/set_b2c_limit.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v10_0/set_b2c_limit.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("regional", "doctype", "gst_settings")
frappe.reload_doc("accounts", "doctype", "gst_account")
gst... | 32.076923 | 71 | 0.772182 |
f8f73fdcd0a73ebce6710ad05580d26b77593e5d | 910 | py | Python | frappe-bench/apps/erpnext/erpnext/portal/doctype/homepage/homepage.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/portal/doctype/homepage/homepage.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/portal/doctype/homepage/homepage.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe.website.utils import delete_page_cache
class Homepage(Document):
... | 31.37931 | 88 | 0.72967 |
53723ffdb6ae4c68e3b2076bd77e0732ebf2af2f | 18,311 | py | Python | server.py | aasensio/solarweb | 5cdc8651f9a81a744d3e526037bf64ff63372d88 | [
"MIT"
] | 1 | 2019-04-04T07:35:58.000Z | 2019-04-04T07:35:58.000Z | server.py | aasensio/solarweb | 5cdc8651f9a81a744d3e526037bf64ff63372d88 | [
"MIT"
] | null | null | null | server.py | aasensio/solarweb | 5cdc8651f9a81a744d3e526037bf64ff63372d88 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, send_file
from flask_socketio import SocketIO, emit, Namespace
import numpy as np
import json
import drms
import os
import scipy.ndimage as nd
from astropy.io import fits
from bokeh.plotting import figure
from bokeh.resources import CDN
from bokeh.embed import components
from b... | 41.334086 | 151 | 0.59467 |
53d88264cd95044794e87461fb61f8334cfbccaf | 49 | py | Python | config.py | WETESTERR/Mehwish-Peter | 1b6beb5352683243dfd5667e0749d07ce119254f | [
"MIT"
] | null | null | null | config.py | WETESTERR/Mehwish-Peter | 1b6beb5352683243dfd5667e0749d07ce119254f | [
"MIT"
] | 1 | 2020-06-23T07:25:39.000Z | 2020-06-23T07:25:39.000Z | config.py | WETESTERR/Mehwish-Peter | 1b6beb5352683243dfd5667e0749d07ce119254f | [
"MIT"
] | null | null | null |
url = "http://automationpractice.com/index.php"
| 16.333333 | 47 | 0.734694 |
dbd82c871d23510778eaeae5be3385b2d1b3d022 | 1,533 | py | Python | src/onegov/feriennet/forms/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/forms/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/forms/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.feriennet.forms.activity import VacationActivityForm
from onegov.feriennet.forms.attendee import AttendeeForm
from onegov.feriennet.forms.attendee import AttendeeLimitForm
from onegov.feriennet.forms.attendee import AttendeeSignupForm
from onegov.feriennet.forms.bank_statement import BankStatementImportForm... | 36.5 | 73 | 0.81409 |
5304a201b4c469652e9a962ad1656059fa58a370 | 782 | py | Python | tests/ModelMeterTest.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | tests/ModelMeterTest.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | tests/ModelMeterTest.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | import unittest
from libs.ModelFactory import ModelFactory
from measure.ModelMeter import ModelMeter
class ModelMeterTest(unittest.TestCase):
def __init__(self, *args, **kwargs):
super(ModelMeterTest, self).__init__(*args, **kwargs)
self.debug = True
def test_probs(self):
# init
... | 30.076923 | 61 | 0.632992 |
5314e1591295b14381f3672b4b8f023042e4f5e2 | 6,455 | py | Python | loadtest/trafficgen/trafficgen/randompool.py | harrywong/evt | 95985384619e0f5ff4021e8838d421ac4b4b946d | [
"BSD-3-Clause"
] | 1,411 | 2018-04-23T03:57:30.000Z | 2022-02-13T10:34:22.000Z | loadtest/trafficgen/trafficgen/randompool.py | Zhang-Zexi/evt | e90fe4dbab4b9512d120c79f33ecc62791e088bd | [
"Apache-2.0"
] | 27 | 2018-06-11T10:34:42.000Z | 2019-07-27T08:50:02.000Z | loadtest/trafficgen/trafficgen/randompool.py | Zhang-Zexi/evt | e90fe4dbab4b9512d120c79f33ecc62791e088bd | [
"Apache-2.0"
] | 364 | 2018-06-09T12:11:53.000Z | 2020-12-15T03:26:48.000Z | import random
import string
import time
from pyevtsdk import base
ITEM_TYPES = ['domain', 'group', 'fungible', 'token']
REQUIREMENTS = {
'newdomain': [],
'updatedomain': ['domain'],
'newgroup': [],
'updategroup': ['group'],
'newfungible': [],
'updfungible': ['fungible'],
'issuefungible': [... | 28.187773 | 111 | 0.570411 |
7283835ff173192d1ba010fd798e3e83da6e80f7 | 100 | py | Python | skimind/kernel/interfacedb/__init__.py | NathBangwa/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | 1 | 2020-11-13T18:30:47.000Z | 2020-11-13T18:30:47.000Z | skimind/kernel/interfacedb/__init__.py | nathanbangwa243/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | 5 | 2020-11-13T18:16:48.000Z | 2021-09-08T01:04:59.000Z | skimind/kernel/interfacedb/__init__.py | nathanbangwa243/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | null | null | null |
# gFunctions tools
from .. import gFunctions
# skimind.config
from .. import config as skiconfig
| 12.5 | 34 | 0.75 |
f482957abcc9e510a3121883d480e9ea4ff26d65 | 2,970 | py | Python | python_experiments/data_analysis/parallel_statistics/generante_err_mem_size_md.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 8 | 2020-04-14T23:17:00.000Z | 2021-06-21T12:34:04.000Z | python_experiments/data_analysis/parallel_statistics/generante_err_mem_size_md.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | null | null | null | python_experiments/data_analysis/parallel_statistics/generante_err_mem_size_md.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 1 | 2021-01-17T16:26:50.000Z | 2021-01-17T16:26:50.000Z | from data_analysis.parallel_statistics.generate_parallel_speedup_md import format_str
from data_analysis.parallel_statistics.err_mem_size_statistics import *
rlp_old_tag = 'rlp-old'
flp_old_tag = 'flp-old'
if __name__ == '__main__':
data_set_lst = [
'ca-GrQc', 'ca-HepTh', 'p2p-Gnutella06', 'wiki-Vote',
... | 44.328358 | 118 | 0.619529 |
beb16bb6b61808cc202ba35a6b0eb2eb058dc7f4 | 6,608 | py | Python | repeated-phrases-gop/robopol2.py | h4ckfu/data | bdc02fd5051dfb31e42f8e078832ceead92f9958 | [
"CC-BY-4.0"
] | 16,124 | 2015-01-01T06:18:12.000Z | 2022-03-31T00:46:52.000Z | repeated-phrases-gop/robopol2.py | h4ckfu/data | bdc02fd5051dfb31e42f8e078832ceead92f9958 | [
"CC-BY-4.0"
] | 179 | 2015-01-07T10:19:57.000Z | 2022-02-21T21:19:14.000Z | repeated-phrases-gop/robopol2.py | h4ckfu/data | bdc02fd5051dfb31e42f8e078832ceead92f9958 | [
"CC-BY-4.0"
] | 12,163 | 2015-01-03T14:23:36.000Z | 2022-03-31T10:10:23.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import random
import numpy
import math
import string
import operator
from collections import defaultdict
# candidates to pay attention to
candidates = ["TRUMP", "CRUZ", "RUBIO", "KASICH"]
# n-gram lengths to iterate through
min_N = 1 # inclusive
max_N = 15 # exc... | 31.769231 | 117 | 0.607748 |
fe2f24bca2810965419f233a401bb4d2cc5abed9 | 4,682 | py | Python | torch/utils/data/datapipes/iter/combinatorics.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 5 | 2018-04-24T13:41:12.000Z | 2019-07-09T07:32:09.000Z | torch/utils/data/datapipes/iter/combinatorics.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 14 | 2021-10-14T06:58:50.000Z | 2021-12-17T11:51:07.000Z | torch/utils/data/datapipes/iter/combinatorics.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 7 | 2020-08-31T22:49:59.000Z | 2020-09-15T14:29:07.000Z | import random
from torch.utils.data import IterDataPipe, Sampler, SequentialSampler, functional_datapipe
from typing import Dict, Iterator, List, Optional, Sized, Tuple, Type, TypeVar
T_co = TypeVar('T_co', covariant=True)
class SamplerIterDataPipe(IterDataPipe[T_co]):
r""" :class:`SamplerIterDataPipe`.
It... | 38.377049 | 122 | 0.640325 |
fe99b85da16fb476368c1eed04940dc2bd382ae8 | 11,915 | py | Python | research/cv/single_path_nas/src/utils.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/single_path_nas/src/utils.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/single_path_nas/src/utils.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... | 30.473146 | 106 | 0.584473 |
229262d509c21b76bc1d809acc3a08c09c3922bf | 3,935 | py | Python | research/cv/AttentionCluster/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/AttentionCluster/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/AttentionCluster/train.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... | 41.861702 | 120 | 0.720712 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.