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
9cd83bdf3460962c33b91a30892f9a3cd738f139
35,866
py
Python
panzee/nmfe.py
DangerOnTheRanger/project-panzee
9392a3d8c4a0acbac80905e164dca91b691022ab
[ "BSD-2-Clause" ]
5
2015-07-16T20:44:58.000Z
2016-04-19T03:47:46.000Z
panzee/nmfe.py
DangerOnTheRanger/project-panzee
9392a3d8c4a0acbac80905e164dca91b691022ab
[ "BSD-2-Clause" ]
6
2015-12-23T07:05:06.000Z
2016-07-03T22:29:03.000Z
panzee/nmfe.py
DangerOnTheRanger/project-panzee
9392a3d8c4a0acbac80905e164dca91b691022ab
[ "BSD-2-Clause" ]
null
null
null
import os import copy import json IMAGE_EXTS = (".png", ".jpg") class Parser(object): """Parse a .scn file into a list of Command objects. This is not meant to be used directly; use Runtime.read instead. """ def __init__(self, starting_cmd_index=0, starting_cmp_id=0, starting_tree_id=0): """...
36.486267
129
0.652568
1454065a2fa5f37dcb5881d69027632c75f3c21b
1,752
py
Python
src/doc/gui_manual/PythonScripts/rstFileSplitter.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/doc/gui_manual/PythonScripts/rstFileSplitter.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/doc/gui_manual/PythonScripts/rstFileSplitter.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
import sys if len(sys.argv) != 3: print("Need file name and heading string, example: Operators.rst --") raise SystemExit heading = str(sys.argv[2]) f = open(str(sys.argv[1])) lines_in_file = f.readlines() section_line_numbers = [] section_titles = [] counter = 0; for line in lines_in_file: if line[0:len(line)...
31.854545
86
0.69863
213ff2d666c3e1c04159457268fe607adbea196b
472
py
Python
doc/for_dev/scikit-image/future/brief_cy.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
88
2019-01-08T16:39:08.000Z
2022-02-06T14:19:23.000Z
doc/for_dev/scikit-image/future/brief_cy.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
13
2019-06-20T15:53:10.000Z
2021-02-09T11:03:29.000Z
doc/for_dev/scikit-image/future/brief_cy.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
1
2019-11-05T03:03:14.000Z
2019-11-05T03:03:14.000Z
from transonic import boost Ai2 = "int[:,:]" @boost def _brief_loop( image: "float64[:,:]", descriptors: "uint8[:,:]", keypoints: "intp[:,:]", pos0: Ai2, pos1: Ai2, ): for k in range(len(keypoints)): kr, kc = keypoints[k] for p in range(len(pos0)): pr0, pc0 = pos0[...
21.454545
69
0.474576
372e5344720bfd72bd01d2ebe2d405ee557121ca
681
py
Python
nz_django/day8/djang_drf_demo/front/models.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
null
null
null
nz_django/day8/djang_drf_demo/front/models.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
27
2020-02-12T07:55:58.000Z
2022-03-12T00:19:09.000Z
nz_django/day8/djang_drf_demo/front/models.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
2
2020-02-18T01:54:55.000Z
2020-02-21T11:36:28.000Z
from django.db import models from django.core import validators class Book(models.Model): b_name = models.CharField(max_length=30) b_price = models.FloatField(default=1.0) class Game(models.Model): g_name = models.CharField(max_length=30) g_price = models.FloatField(default=1.0) class Movie(models....
32.428571
121
0.760646
2e9c19b11c45e16f2473b31647f4df1d33c65bbe
908
py
Python
puat/importjobs/jobs.py
Pelleplutt/PUAT
b083d2ec5776bb73f6ba83a5ddab271a7b742e89
[ "MIT" ]
null
null
null
puat/importjobs/jobs.py
Pelleplutt/PUAT
b083d2ec5776bb73f6ba83a5ddab271a7b742e89
[ "MIT" ]
null
null
null
puat/importjobs/jobs.py
Pelleplutt/PUAT
b083d2ec5776bb73f6ba83a5ddab271a7b742e89
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import api.runtime as runtime class Jobs(object): def __init__(self): pass def _fetch_active(self): ret = [] ret.append({ 'id': 0, 'state': 'NEW', 'parser': 'CSV', 'create_ts': '2021-0...
22.146341
49
0.397577
2ea8fd56b9cb7d9ffef7d08c61aca4b0564c8fcf
2,632
py
Python
Packs/ExpanseV2/Scripts/MatchIPinCIDRIndicators/MatchIPinCIDRIndicators.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/ExpanseV2/Scripts/MatchIPinCIDRIndicators/MatchIPinCIDRIndicators.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/ExpanseV2/Scripts/MatchIPinCIDRIndicators/MatchIPinCIDRIndicators.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 * # noqa # pylint: disable=unused-wildcard-import from CommonServerUserPython import * # noqa """MatchIPinCIDRIndicators """ from typing import Dict, Any import ipaddress import traceback ''' STANDALONE FUNCTION ''' ''' COMMAND FUNCTION ''' def matc...
27.705263
98
0.639438
25fa2bd747e890579e23b2d37ff2b847b2865f34
2,578
py
Python
src/backend/sms.py
marco-koenen/Hackathon-WeVsVirus
48e8c44a935f728b3bb884dbb6213559742ba569
[ "MIT" ]
2
2020-03-24T14:12:09.000Z
2020-03-25T07:43:10.000Z
src/backend/sms.py
marco-koenen/Hackathon-WeVsVirus
48e8c44a935f728b3bb884dbb6213559742ba569
[ "MIT" ]
2
2020-03-23T11:56:03.000Z
2020-03-24T13:50:14.000Z
src/backend/sms.py
marco-koenen/Hackathon-WeVsVirus
48e8c44a935f728b3bb884dbb6213559742ba569
[ "MIT" ]
2
2020-03-20T22:00:58.000Z
2020-03-21T00:11:45.000Z
import boto3 from flask import current_app as app from datetime import datetime from .validphone import is_valid_phone_number, cleaned_number import requests def do_send_sms_aws(num, text): client = boto3.client("sns", aws_access_key_id=app.config["AWS_ACCESS_KEY_ID"], aws_secret_access_...
31.82716
84
0.631109
2c39cee3f2dcaed8815438d5a8a2b54c334bb91e
367
py
Python
year_3/comppi_1/managers/urls.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
null
null
null
year_3/comppi_1/managers/urls.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
21
2020-03-24T16:26:04.000Z
2022-02-18T15:56:16.000Z
year_3/comppi_1/managers/urls.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
null
null
null
from django.urls import path from .views import ( apilogin, apilogout, apimanageadmin, apimanageregistrant ) urlpatterns = [ path('login/', apilogin, name='apilogin'), path('logout/', apilogout, name='apilogout'), path('admin/', apimanageadmin, name='apimanageadmin'), path('registrant/', apim...
24.466667
72
0.702997
2c94ccbde1e108fdf9ff6de60b48bb0167de3c10
2,872
py
Python
assignments/ps5-template/tests.py
tallamjr/mit-6006
c2aa6bb48edef5800c0779ba2eebd697d44249b5
[ "MIT" ]
1
2022-02-26T13:52:31.000Z
2022-02-26T13:52:31.000Z
assignments/ps5-template/tests.py
tallamjr/mit-6006
c2aa6bb48edef5800c0779ba2eebd697d44249b5
[ "MIT" ]
null
null
null
assignments/ps5-template/tests.py
tallamjr/mit-6006
c2aa6bb48edef5800c0779ba2eebd697d44249b5
[ "MIT" ]
null
null
null
import unittest from solve_tilt import solve_tilt, move, board_str # Change to True to visualize output verbose = False tests = ( ( ( ( ('#', '#', '.', '.', '.'), ('.', 'o', '#', '.', '.'), ('.', '.', 'o', '.', '.'), ('.', '.'...
28.156863
85
0.251393
e2e5ec6b389ed195d3fe9b4c14f668fdf0955069
404
py
Python
backend/apps/accounts/models.py
n-hackert/match4healthcare
761248c27b49e568c545c643a72eac9a040649d7
[ "MIT" ]
null
null
null
backend/apps/accounts/models.py
n-hackert/match4healthcare
761248c27b49e568c545c643a72eac9a040649d7
[ "MIT" ]
null
null
null
backend/apps/accounts/models.py
n-hackert/match4healthcare
761248c27b49e568c545c643a72eac9a040649d7
[ "MIT" ]
null
null
null
from django.contrib.auth.models import AbstractUser from django.db import models from datetime import datetime class User(AbstractUser): is_student = models.BooleanField(default=False) is_hospital = models.BooleanField(default=False) validated_email = models.BooleanField(default=False) email_validation...
36.727273
71
0.789604
3920149b5105da16267995aaaeb1fd865a0484e4
20,054
py
Python
TestBot/test_cogs/pokerouletteFunctions/pokemon.py
austinmh12/DiscordBots
55550b68a7ad6423de55e62dbbff93fd88f08ff2
[ "MIT" ]
null
null
null
TestBot/test_cogs/pokerouletteFunctions/pokemon.py
austinmh12/DiscordBots
55550b68a7ad6423de55e62dbbff93fd88f08ff2
[ "MIT" ]
null
null
null
TestBot/test_cogs/pokerouletteFunctions/pokemon.py
austinmh12/DiscordBots
55550b68a7ad6423de55e62dbbff93fd88f08ff2
[ "MIT" ]
null
null
null
from . import sql, chunk, rarity_info, BASE_PATH, Page from datetime import datetime as dt, timedelta as td from io import BytesIO from pandas import DataFrame from PIL import Image from random import choice, choices, random import json import logging import requests as r log = logging.getLogger(__name__) log.setLevel...
31.882353
241
0.65179
394714f13b0f12a9a57f8fdf04c63ba35e4dcc35
17,171
py
Python
app/admin/views.py
IoTServ/FlaskSimpleCMS
db0fc4464c6d514db14972156ca3e002a60a4876
[ "MIT" ]
null
null
null
app/admin/views.py
IoTServ/FlaskSimpleCMS
db0fc4464c6d514db14972156ca3e002a60a4876
[ "MIT" ]
4
2020-08-29T16:11:12.000Z
2022-03-12T00:47:03.000Z
app/admin/views.py
IoTServ/FlaskSimpleCMS
db0fc4464c6d514db14972156ca3e002a60a4876
[ "MIT" ]
null
null
null
# coding:utf-8 import sys reload(sys) sys.setdefaultencoding('utf-8') from datetime import datetime import json from flask import render_template, redirect, flash, \ url_for, request from flask_login import login_required, current_user from . import admin from ..models import ArticleType, Article, User, Plugin , J...
33.148649
157
0.646206
1a3bbd682305fc07ae9076fc02ccbcd14e451ca8
3,412
py
Python
tests/test_hierarchy.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/test_hierarchy.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/test_hierarchy.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from functools import lru_cache from findimports import ModuleGraph from pathlib import Path from onegov.core import LEVELS def test_hierarchy(): """ Originally, onegov.* modules were separated into separate repositories and deployed individually to PyPI. This meant that each module would list the depen...
28.433333
79
0.66061
1a57dd5e112f74844164995eb460441636236e25
647
py
Python
Python/Searching/2/find_max_unimodal_array.py
Tikam02/Data_Structure_Algorithms
7c17f744975a72fa42f0f3f892c0b7e041cdef0c
[ "MIT" ]
5
2017-08-03T06:33:49.000Z
2021-08-06T13:20:57.000Z
Python/Searching/2/find_max_unimodal_array.py
Tikam02/Data_Structure_Algorithms
7c17f744975a72fa42f0f3f892c0b7e041cdef0c
[ "MIT" ]
null
null
null
Python/Searching/2/find_max_unimodal_array.py
Tikam02/Data_Structure_Algorithms
7c17f744975a72fa42f0f3f892c0b7e041cdef0c
[ "MIT" ]
6
2017-04-27T13:30:49.000Z
2020-11-01T20:28:55.000Z
#!/usr/bin/env python __author__ = "bt3" def find_max_unimodal_array(A): if len(A) <= 2 : return None left = 0 right = len(A)-1 while right > left +1: mid = (left + right)//2 if A[mid] > A[mid-1] and A[mid] > A[mid+1]: return A[mid] elif A[mid] > A[mid-1] ...
17.972222
53
0.53323
1abfa27725102b82b74dca84dc06ca43c7a514b6
363
py
Python
7-assets/past-student-repos/Intro-Python-master/src/day-1-toy/func.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/Intro-Python-master/src/day-1-toy/func.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/Intro-Python-master/src/day-1-toy/func.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
# Write a function is_even that will return true if the passed in number is even. def is_even(n): return int(n) % 2 == 0 # Read a number from the keyboard num = input("Enter a number: ") # Print out "Even!" if the number is even. Otherwise print "Odd" # print('Even!') if is_even(num) else print('Odd!') result = ('...
30.25
81
0.677686
20332af0f3edc3cf878e005c7daef76ee117b761
708
py
Python
Project Euler Questions 31 - 40/Project Euler Question 32.py
Clayton-Threm/Coding-Practice
6671e8a15f9e797338caa617dae45093f4157bc1
[ "MIT" ]
1
2020-02-11T02:03:02.000Z
2020-02-11T02:03:02.000Z
Project Euler Questions 31 - 40/Project Euler Question 32.py
Clayton-Threm/Coding-Practice
6671e8a15f9e797338caa617dae45093f4157bc1
[ "MIT" ]
null
null
null
Project Euler Questions 31 - 40/Project Euler Question 32.py
Clayton-Threm/Coding-Practice
6671e8a15f9e797338caa617dae45093f4157bc1
[ "MIT" ]
null
null
null
#Project Euler Question 32 #Pandigital Sums pan_nums = set() for a in range(100,5000): for b in range(2,100): if "0" in (str(a) or str(b)): continue if (len(str(a)) + len(str(b))) == 5: c = a * b if "0" in str(c): continue if (len(str(...
30.782609
62
0.430791
379b53d8c3c57e7c6a9e569a50a9b5a67534e187
2,009
py
Python
Packs/CommonScripts/Scripts/MapValuesTransformer/MapValuesTransformer.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/CommonScripts/Scripts/MapValuesTransformer/MapValuesTransformer.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/CommonScripts/Scripts/MapValuesTransformer/MapValuesTransformer.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * import json def mapvalues(value, input_values, mapped_values): input_values = input_values.split(",") mapped_values = mapped_values.split(",") try: value = json.loads(value) except Exception: ...
29.544118
81
0.632653
37ad6f0f4c4ca13dba3899a0274ed33c7496fb3e
9,452
py
Python
bazzell/www/selection.py
libracore/bazzell
f4cf4ec5b9f264f68d853e7b946fd49bd0d5e4d9
[ "MIT" ]
null
null
null
bazzell/www/selection.py
libracore/bazzell
f4cf4ec5b9f264f68d853e7b946fd49bd0d5e4d9
[ "MIT" ]
null
null
null
bazzell/www/selection.py
libracore/bazzell
f4cf4ec5b9f264f68d853e7b946fd49bd0d5e4d9
[ "MIT" ]
1
2021-08-14T22:25:24.000Z
2021-08-14T22:25:24.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2020, libracore.com and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe import _ import json from erpnext.controllers.accounts_controller import get_taxes_and_charges no_cache = True def get_context(context): if...
48.22449
311
0.528989
03f4e5b77ef67fc6aade2f89ea4d34ffc55e4738
965
py
Python
fcos_core/layers/iou_loss.py
HaoGood/MMMC
24dd4ce830efc7a8dc580735903c2a776b6a1a7b
[ "Apache-2.0" ]
3
2022-01-12T11:22:38.000Z
2022-01-27T02:28:30.000Z
fcos_core/layers/iou_loss.py
HaoGood/MMMC
24dd4ce830efc7a8dc580735903c2a776b6a1a7b
[ "Apache-2.0" ]
null
null
null
fcos_core/layers/iou_loss.py
HaoGood/MMMC
24dd4ce830efc7a8dc580735903c2a776b6a1a7b
[ "Apache-2.0" ]
1
2022-01-23T02:45:03.000Z
2022-01-23T02:45:03.000Z
# GIoU and Linear IoU are added by following # https://github.com/yqyao/FCOS_PLUS/blob/master/maskrcnn_benchmark/layers/iou_loss.py. import torch from torch import nn class IOULoss(nn.Module): def __init__(self, loss_type="iou"): super(IOULoss, self).__init__() self.loss_type = loss_type def ...
31.129032
87
0.567876
ff119192e7c8a5bfd3c0648b2f51413e12babb2a
560
py
Python
hello/hello_pydub.py
East196/hello-py
a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21
[ "Apache-2.0" ]
1
2017-10-23T14:58:47.000Z
2017-10-23T14:58:47.000Z
hello/hello_pydub.py
East196/hello-py
a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21
[ "Apache-2.0" ]
null
null
null
hello/hello_pydub.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 -*- # pip install pydub from pydub import AudioSegment import os, re SECONDS60 = 50 * 1000 if __name__ == '__main__': # 循环目录下所有文件 for each in os.listdir('.'): filename = re.findall(r"(.*?)\.mp3", each) # 取出.mp3后缀的文件名 if filename: mp3 = ...
26.666667
107
0.557143
ff3a6d6580409b7b24ab75767eb680b0b85defd7
3,081
py
Python
research/cv/SiamFC/src/config.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/SiamFC/src/config.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/SiamFC/src/config.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...
49.693548
87
0.556313
441590febeac90c70b5f22a478bc11fc772dba61
1,588
py
Python
SWH2P/swh2p/data_stuff.py
swharden/ROI-Analysis-Pipeline
e83d96c43fdd50cb44be365289e964576492617e
[ "MIT" ]
4
2017-06-20T19:56:22.000Z
2021-05-29T10:07:47.000Z
SWH2P/swh2p/data_stuff.py
swharden/ROI-Analysis-Pipeline
e83d96c43fdd50cb44be365289e964576492617e
[ "MIT" ]
11
2017-05-31T19:14:32.000Z
2018-09-12T23:44:11.000Z
SWH2P/swh2p/data_stuff.py
swharden/ROI-Analysis-Pipeline
e83d96c43fdd50cb44be365289e964576492617e
[ "MIT" ]
2
2017-06-20T17:14:38.000Z
2017-06-20T19:51:34.000Z
import numpy as np def convolve(signal,kernel): """ This applies a kernel to a signal through convolution and returns the result. Some magic is done at the edges so the result doesn't apprach zero: 1. extend the signal's edges with len(kernel)/2 duplicated values 2. perform the convolution...
36.090909
81
0.672544
924dd094eefc4a275d96398947f5ea85e13f39b7
5,875
py
Python
device/mailhandler/src/app.py
Phape/smart-security
d6a931fa01bc60d9c0c39029a41d609fbab19bf5
[ "CC-BY-4.0" ]
null
null
null
device/mailhandler/src/app.py
Phape/smart-security
d6a931fa01bc60d9c0c39029a41d609fbab19bf5
[ "CC-BY-4.0" ]
9
2021-06-25T13:19:17.000Z
2021-07-04T14:06:38.000Z
device/mailhandler/src/app.py
Phape/smart-security
d6a931fa01bc60d9c0c39029a41d609fbab19bf5
[ "CC-BY-4.0" ]
null
null
null
import smtplib, ssl import os, sys, logging, configparser, time, datetime import redis import mimetypes from email.message import EmailMessage REDIS_ALERT_ENABLED = "alert:enabled" REDIS_LAST_MAIL_ALERT_TIME = "alert:last" class App: def __init__(self, configfile): """ Konstruktor. Liest die Konfig...
38.651316
171
0.616851
9209f0ed48af23deb07cb7e4b5971b013a6c6d51
3,499
py
Python
HashCracker/hashcracker.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
4
2021-04-23T15:39:17.000Z
2021-12-27T22:53:24.000Z
HashCracker/hashcracker.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
null
null
null
HashCracker/hashcracker.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
2
2021-04-19T08:28:54.000Z
2022-01-19T13:23:29.000Z
#!/usr/bin/python3 #-*- coding:utf-8 -*- import os import hashlib import sys import argparse import _thread import time from datetime import datetime def hashcrack(hashh,type_hash,wordlist): try: check_passlist = os.path.exists(wordlist) if check_passlist ==True: with open(wordlist,'r...
40.686047
106
0.444413
a640d5c68f0aaba7393a22d275c4d12aa32b78a9
713
py
Python
cogs/admin.py
Strange-Penguins/Stython
f4f96383681f311dd0ecceddf15417c78c974830
[ "MIT" ]
1
2021-03-13T21:50:12.000Z
2021-03-13T21:50:12.000Z
cogs/admin.py
Strange-Penguins/Stython
f4f96383681f311dd0ecceddf15417c78c974830
[ "MIT" ]
4
2021-03-13T22:22:11.000Z
2021-03-14T22:17:49.000Z
cogs/admin.py
Strange-Penguins/Stython
f4f96383681f311dd0ecceddf15417c78c974830
[ "MIT" ]
null
null
null
import discord from discord.ext import commands class Admin(commands.Cog): def __init__(self, client): self.client = client @commands.command() @commands.is_owner() async def startworld(self, ctx, world_id: int): self.client.db.create_world(world_id) await ctx.send(f"Created n...
26.407407
82
0.681627
4701794da6fa4ba85fa23e3b701a40f65cfcec51
11,439
py
Python
publ/category.py
fluffy-critter/Publ
868c5a17c605707dde4d1a95d79405301bd12f05
[ "MIT" ]
6
2018-03-29T02:07:44.000Z
2018-09-26T00:17:31.000Z
publ/category.py
fluffy-critter/Publ
868c5a17c605707dde4d1a95d79405301bd12f05
[ "MIT" ]
82
2018-04-01T08:53:59.000Z
2018-09-28T23:45:05.000Z
publ/category.py
fluffy-critter/Publ
868c5a17c605707dde4d1a95d79405301bd12f05
[ "MIT" ]
null
null
null
# category.py """ The Category object passed to entry and category views """ import collections import email import logging import os import typing import flask from flask import url_for from pony import orm from werkzeug.utils import cached_property from . import entry # pylint: disable=cyclic-import from . import...
34.454819
100
0.60591
f3349059666e07886422f532d35d0f08dd9bc886
509
py
Python
examples/table_callback.py
xinetzone/dash-tests
cd4526caa2f9d906915c31370b3487bdcef92aa4
[ "Apache-2.0" ]
1
2022-03-01T07:38:32.000Z
2022-03-01T07:38:32.000Z
examples/table_callback.py
xinetzone/dash-tests
cd4526caa2f9d906915c31370b3487bdcef92aa4
[ "Apache-2.0" ]
12
2021-07-13T12:33:36.000Z
2021-07-14T05:25:19.000Z
examples/table_callback.py
xinetzone/dash-book
1f624e87e2aa02c9931318918df969e44bdd2c07
[ "Apache-2.0" ]
null
null
null
from dash import dcc, html from dash.dependencies import Input, Output from app import app layout = html.Div( [ dcc.Input(id="input-1", type="text", value="Montréal"), dcc.Input(id="input-2", type="text", value="Canada"), html.Div(id="number-output"), ] ) @app.callback( Output("n...
23.136364
63
0.618861
344263ee75ba57db20d8c697e19177e708100000
1,063
py
Python
Python/pandas/04_index.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/pandas/04_index.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/pandas/04_index.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np var = np.random.randint(10, size=(5,5)) df = pd.DataFrame(var, columns=['A', 'B', 'C','D', 'E'], index=['a', 'b', 'c', 'd', 'e']) print(df) print("") # index col - row print(df["A"]['b']) # auf Zeilen zugreifen -> wird in Series umgewandelt print(df.loc['b']) # Zugriff auf die j...
23.622222
89
0.578551
1b0f7658078d547fdb25d5fafa73db7e0ada5658
343
py
Python
python/decorator/decorators_with_arguments.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/decorator/decorators_with_arguments.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/decorator/decorators_with_arguments.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
import functools def repeat(*args_, **kwargs_): def inner_function(func): @functools.wraps(func) def wrapper(*args, **kwargs): for _ in range(args_[0]): func(*args, **kwargs) return wrapper return inner_function @repeat(4) def say(name): print(f'Hello ...
18.052632
37
0.580175
94243f32b7f01694ecd1f6ffd65e7c42db37de07
4,284
py
Python
crawler/FundCrawler.py
macroxu/FundAnalysis
bc94f271fae5df6971aae37b873b97973d25b1c8
[ "Apache-2.0" ]
null
null
null
crawler/FundCrawler.py
macroxu/FundAnalysis
bc94f271fae5df6971aae37b873b97973d25b1c8
[ "Apache-2.0" ]
null
null
null
crawler/FundCrawler.py
macroxu/FundAnalysis
bc94f271fae5df6971aae37b873b97973d25b1c8
[ "Apache-2.0" ]
null
null
null
from urllib import request from utils.FileManager import FileManager import os from string import Template from bs4 import BeautifulSoup from bs4 import Tag import time fundCompanyBaseUrl='http://fundf10.eastmoney.com/jbgk_' #基金 class FundCrawler: def __init__(self): pass #获取并保存基金Pagehtml @...
32.210526
133
0.571195
949ac1f57498a04e62caafc3f87cc18e43c21659
1,922
py
Python
lib/func.py
moreorem/graphdener
ad8a4b98ad79afb2da820248d656384614721882
[ "BSD-3-Clause" ]
null
null
null
lib/func.py
moreorem/graphdener
ad8a4b98ad79afb2da820248d656384614721882
[ "BSD-3-Clause" ]
null
null
null
lib/func.py
moreorem/graphdener
ad8a4b98ad79afb2da820248d656384614721882
[ "BSD-3-Clause" ]
null
null
null
from math import sqrt from .statics import COLUMN_TYPES # PENDING: Add custom binary length in order to cover bigger dimensions def iterate_grid(d): """ Returns a generator over a square grid of d dimensions Keyword arguments: d -- the m == n dimension of the grid e.g. 2x2 @type d: int """ ...
23.728395
100
0.534339
bf591d6e1384f44d63eed046da5cf4d4a9433fe6
1,467
py
Python
lib/template_json.py
jyurkiw/EncounterRoller
42d036874f6b65bb276003fc9c166917464e4a3b
[ "MIT" ]
null
null
null
lib/template_json.py
jyurkiw/EncounterRoller
42d036874f6b65bb276003fc9c166917464e4a3b
[ "MIT" ]
null
null
null
lib/template_json.py
jyurkiw/EncounterRoller
42d036874f6b65bb276003fc9c166917464e4a3b
[ "MIT" ]
null
null
null
"""Default json template for new table files. """ template_json = { "subtable_name": { "weight": "1", "monsters": [ { "name": "monster_name", "cr": "0" }, { "name": "monster_name", "cr": "0" ...
20.661972
45
0.25835
bf7258e18db6c006f89084c4215ca0f0200efa48
654
py
Python
errors.py
theFox6/HPIMysterybot
187341ff8fca4a683cc052c813f9cf1fe71117db
[ "MIT" ]
null
null
null
errors.py
theFox6/HPIMysterybot
187341ff8fca4a683cc052c813f9cf1fe71117db
[ "MIT" ]
null
null
null
errors.py
theFox6/HPIMysterybot
187341ff8fca4a683cc052c813f9cf1fe71117db
[ "MIT" ]
null
null
null
from telegram.error import Unauthorized, TimedOut, ChatMigrated import users timeouts = 0 def error_callback(bot, update, error): try: raise error except Unauthorized: # remove update.message.chat_id from conversation list print("unauthorized") except TimedOut as e: if time...
29.727273
73
0.636086
44e45ab7cbfdbac7e1f529d8177b46642dba03df
11,650
py
Python
2018/quals/re-basics/src/crackbasic.py
iicarus-bit/google-ctf
4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b
[ "Apache-2.0" ]
2,757
2018-04-28T21:41:36.000Z
2022-03-29T06:33:36.000Z
2018/quals/re-basics/src/crackbasic.py
iicarus-bit/google-ctf
4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b
[ "Apache-2.0" ]
20
2019-07-23T15:29:32.000Z
2022-01-21T12:53:04.000Z
2018/quals/re-basics/src/crackbasic.py
iicarus-bit/google-ctf
4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b
[ "Apache-2.0" ]
449
2018-05-09T05:54:05.000Z
2022-03-30T14:54:18.000Z
#!/usr/bin/python # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
24.787234
85
0.586695
7869ffd330484771dab05f6fd17f02486729265d
20,465
py
Python
Packs/Inventa/Integrations/Inventa/Inventa.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
2
2021-12-06T21:38:24.000Z
2022-01-13T08:23:36.000Z
Packs/Inventa/Integrations/Inventa/Inventa.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
87
2022-02-23T12:10:53.000Z
2022-03-31T11:29:05.000Z
Packs/Inventa/Integrations/Inventa/Inventa.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
2
2022-01-05T15:27:01.000Z
2022-02-01T19:27:43.000Z
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 """IMPORTS""" import traceback from typing import Any, Dict import requests # Disable insecure warnings requests.packages.urllib3.disable_warnings() # pylint: disable=no-member ''' CONSTANTS ''' DATE_FORMAT = '%Y-%m-%dT%...
36.02993
115
0.60215
ecea9951acee4ee5fb6b579de1fd028f1b2c5c1f
24,887
py
Python
__init__.py
fhswf/mycroft-fhswf-raumbelegung-skill
a0962b657f04e0e29cb76787a0568737aeae869a
[ "MIT" ]
null
null
null
__init__.py
fhswf/mycroft-fhswf-raumbelegung-skill
a0962b657f04e0e29cb76787a0568737aeae869a
[ "MIT" ]
null
null
null
__init__.py
fhswf/mycroft-fhswf-raumbelegung-skill
a0962b657f04e0e29cb76787a0568737aeae869a
[ "MIT" ]
null
null
null
import re import requests import xml.etree.ElementTree as ET from bs4 import BeautifulSoup from datetime import date from multi_key_dict import multi_key_dict from mycroft import MycroftSkill, intent_handler from os import listdir, mkdir, remove from os.path import join, exists # change this variable to set a Skill na...
48.044402
298
0.617069
bf29ded6f5c0e429e91c6727936088f5450441d2
1,460
py
Python
src/models/chen2017/make_tile_dataset.py
kaphka/imi-master-thesis
2331a3534dc32e30a1333bb21c68c1e1b07ec9e4
[ "MIT" ]
2
2018-04-27T09:02:15.000Z
2019-04-19T19:12:13.000Z
src/models/chen2017/make_tile_dataset.py
kaphka/imi-master-thesis
2331a3534dc32e30a1333bb21c68c1e1b07ec9e4
[ "MIT" ]
1
2019-04-19T19:13:08.000Z
2021-02-22T21:29:55.000Z
src/models/chen2017/make_tile_dataset.py
kaphka/imi-master-thesis
2331a3534dc32e30a1333bb21c68c1e1b07ec9e4
[ "MIT" ]
null
null
null
import datasets.tiles import datasets.divahisdb import experiment.data import logging def task(): logging.basicConfig(level=logging.DEBUG) env = experiment.data.Environment() diva_processed = env.dataset('DIVA_Chen2017_processed') dataset = datasets.divahisdb.Processed(diva_processed, load=['tiles', '...
40.555556
92
0.744521
bde5d83361e37b83e29e1abc0f0ae3aa24eb6742
4,516
py
Python
code/snake/DeepLearning/ConvolutionalDeepNetworkAgentBenedikt.py
BogyMitutoyoCTL/AI-Preparation
ef535741816b02e5e63d426a3232a688c9abd726
[ "MIT" ]
1
2020-03-30T09:25:53.000Z
2020-03-30T09:25:53.000Z
code/snake/DeepLearning/ConvolutionalDeepNetworkAgentBenedikt.py
BogyMitutoyoCTL/AI-Preparation
ef535741816b02e5e63d426a3232a688c9abd726
[ "MIT" ]
2
2020-02-05T14:00:23.000Z
2020-03-30T19:57:19.000Z
code/snake/DeepLearning/ConvolutionalDeepNetworkAgentBenedikt.py
BogyMitutoyoCTL/AI-Preparation
ef535741816b02e5e63d426a3232a688c9abd726
[ "MIT" ]
null
null
null
import gym import tensorflow from rl.agents import DQNAgent from rl.callbacks import ModelIntervalCheckpoint, FileLogger from rl.core import Processor from rl.memory import SequentialMemory from rl.policy import LinearAnnealedPolicy, EpsGreedyQPolicy from tensorflow.python.keras import Input, Sequential from tensorflo...
36.715447
124
0.653676
e54a7bea8700872ff2487579d44472ce3d567dab
14,817
py
Python
src/tools/data/DataManualExamples/Simulations/contrib/pjacobi/Python/jacobi_insitu.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/tools/data/DataManualExamples/Simulations/contrib/pjacobi/Python/jacobi_insitu.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/tools/data/DataManualExamples/Simulations/contrib/pjacobi/Python/jacobi_insitu.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
import sys, math import numpy as sp # this code is largely inspired from Brad Whitlock's updateplots.py # this code is similar in nature and algorithm to the F90 code contributed earlier # see tools/DataManualExamples/Simulations/contrib # this is a very first attempt to use some numpy arrays. # A grid of size (M+2)x...
37.322418
127
0.577715
00cd930d1233d61a73c7741d8bb3d30069c26fd4
484
py
Python
Programming Languages/Python/Theory/100_Python_Challenges/Section_2_String/39. check if the given string is a valid pin or not.py
jaswinder9051998/Resources
fd468af37bf24ca57555d153ee64693c018e822e
[ "MIT" ]
101
2021-12-20T11:57:11.000Z
2022-03-23T09:49:13.000Z
Programming Languages/Python/Theory/100_Python_Challenges/Section_2_String/39. check if the given string is a valid pin or not.py
Sid-1164/Resources
3987dcaeddc8825f9bc79609ff26094282b8ece1
[ "MIT" ]
4
2022-01-12T11:55:56.000Z
2022-02-12T04:53:33.000Z
Programming Languages/Python/Theory/100_Python_Challenges/Section_2_String/39. check if the given string is a valid pin or not.py
Sid-1164/Resources
3987dcaeddc8825f9bc79609ff26094282b8ece1
[ "MIT" ]
38
2022-01-12T11:56:16.000Z
2022-03-23T10:07:52.000Z
""" Write a function that tests if a string is a valid pin or not. A valid pin has: 1. Exactly 5 characters. 2. Accepts only numerical characters (0-9). 3. No whitespaces. Example: input_string = "89abc" Expected output = False """ def valid_pin(input_string): if len(input_string) != 5: return Fal...
15.125
62
0.615702
dac1a7655858a1b6092d3fbf61e8e1b8a37ba901
563
py
Python
ausgabe.py
caxenie/oom-oop-intro
e70cd2ab8067b4d81001b7491deab9e029eefd3d
[ "MIT" ]
1
2022-02-23T20:18:35.000Z
2022-02-23T20:18:35.000Z
ausgabe.py
caxenie/oom-oop-intro
e70cd2ab8067b4d81001b7491deab9e029eefd3d
[ "MIT" ]
null
null
null
ausgabe.py
caxenie/oom-oop-intro
e70cd2ab8067b4d81001b7491deab9e029eefd3d
[ "MIT" ]
null
null
null
class ProzessAusgabe(object): def __init__(self, a, m, t): self.ausgabeAnzahl = a self.ausgabeMenge = m self.ausgabeTyp = t def getAusgabeAnzahl(self): return self.ausgabeAnzahl def setAusgabeAnzahl(self, a): self.ausgabeAnzahl = a def getAusgabeM...
22.52
35
0.605684
dad3c2795b19c6f91458d1864c02e39b11765d94
2,440
py
Python
research/cv/FaceRecognitionForTracking/preprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/FaceRecognitionForTracking/preprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/FaceRecognitionForTracking/preprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2020-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 agre...
32.972973
107
0.636475
97711634039b20946b873f9abbd1445b61a4a008
515
py
Python
eBan/views.py
Chrisaliang/eBanWeb
ad0d75d8247cab77ff679ec961dd42d0db537841
[ "Apache-2.0" ]
null
null
null
eBan/views.py
Chrisaliang/eBanWeb
ad0d75d8247cab77ff679ec961dd42d0db537841
[ "Apache-2.0" ]
null
null
null
eBan/views.py
Chrisaliang/eBanWeb
ad0d75d8247cab77ff679ec961dd42d0db537841
[ "Apache-2.0" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponse from .models import Board # Create your views here. def home(request): boards = Board.objects.all() # boards_name = list() # for board in boards: # boards_name.append(board.name) # response_html = '<br>'.join(boards_n...
22.391304
59
0.681553
c1dce8aed33b8e0ec9f681079c0e7b9cffd2cead
11,358
py
Python
cloud/ml_engine/trainer/model.py
zentonllo/tfg-tensorflow
095469a906de26984b4d781699e76bec02b1ef75
[ "MIT" ]
null
null
null
cloud/ml_engine/trainer/model.py
zentonllo/tfg-tensorflow
095469a906de26984b4d781699e76bec02b1ef75
[ "MIT" ]
null
null
null
cloud/ml_engine/trainer/model.py
zentonllo/tfg-tensorflow
095469a906de26984b4d781699e76bec02b1ef75
[ "MIT" ]
null
null
null
# Copyright 2016 Google Inc. 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 agreed to in...
36.171975
117
0.691319
c1f1a7e88d1af3a9cba6df863ce761d2b5fed805
163
py
Python
python/python_backup/PRAC_PYTHON/18_date.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/python_backup/PRAC_PYTHON/18_date.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/python_backup/PRAC_PYTHON/18_date.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
from datetime import date now = date.today() print(now) #datetime.date(2003, 12, 2) now.strftime("%m-%d-%y. %d %b %Y is a %A on the %d day of %B.") print(now)
27.166667
64
0.625767
e7234a5f3fc59d9bf069c2fd59a4fff8c9a11e99
3,142
py
Python
src/compgen2/correction/phonetic.py
CorrelAid/compgen-ii-cgv
810a044d6bbe1ce058a359115e3e5fc71a358549
[ "MIT" ]
1
2022-02-02T12:41:06.000Z
2022-02-02T12:41:06.000Z
src/compgen2/correction/phonetic.py
CorrelAid/compgen-ii-cgv
810a044d6bbe1ce058a359115e3e5fc71a358549
[ "MIT" ]
null
null
null
src/compgen2/correction/phonetic.py
CorrelAid/compgen-ii-cgv
810a044d6bbe1ce058a359115e3e5fc71a358549
[ "MIT" ]
null
null
null
import collections import re class Phonetic: def __init__(self) -> None: self.RULES = collections.OrderedDict() self.RULES[re.compile(r".[AEIJOUYÄÖÜ].", re.I)] = "0" self.RULES[re.compile(r".[À-ÃÈ-ÏÒ-ÕÙ-Û].", re.I)] = "0" self.RULES[re.compile(r".[B].", re.I)] = "1"...
41.893333
120
0.502228
e738da08c67617d34f9a0d844922a1dbc4f2cc43
1,697
py
Python
python_gui_tkinter/mail/mail_EmailSender.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python_gui_tkinter/mail/mail_EmailSender.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python_gui_tkinter/mail/mail_EmailSender.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
import smtplib from mail_Secrets import Secret # Build a class for this project from mail_MailTemplate import MailTemplate from email.message import EmailMessage from email.headerregistry import Address from email.utils import make_msgid class EmailSender: def sendmail(senderName, # Name of the ...
41.390244
96
0.662935
e75444c559e712abcbecf93a132347d2a0cfd5a7
11,515
py
Python
src/onegov/form/fields.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/form/fields.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/form/fields.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import inspect import phonenumbers import sedate from cssutils.css import CSSStyleSheet from onegov.core.html import sanitize_html from onegov.core.utils import binary_to_dictionary from onegov.file.utils import as_fileintent from onegov.file.utils import IMAGE_MIME_TYPES_AND_SVG from onegov.form import log from onego...
29.986979
78
0.638906
e766f403134f7fa3d207c7669118f2a866d57f9f
1,928
py
Python
2018/quals/pwn-sftp/src/generate_filesystem.py
iicarus-bit/google-ctf
4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b
[ "Apache-2.0" ]
2,757
2018-04-28T21:41:36.000Z
2022-03-29T06:33:36.000Z
2018/quals/pwn-sftp/src/generate_filesystem.py
iicarus-bit/google-ctf
4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b
[ "Apache-2.0" ]
20
2019-07-23T15:29:32.000Z
2022-01-21T12:53:04.000Z
2018/quals/pwn-sftp/src/generate_filesystem.py
iicarus-bit/google-ctf
4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b
[ "Apache-2.0" ]
449
2018-05-09T05:54:05.000Z
2022-03-30T14:54:18.000Z
#! /usr/bin/python # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
27.942029
74
0.66027
415d60dbd4807323676775f3283589e3e3717aca
238
py
Python
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-010/pg-10.2-1-turtle-position.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-010/pg-10.2-1-turtle-position.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-010/pg-10.2-1-turtle-position.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
import turtle print(turtle.position()) turtle.forward(100) print(turtle.position()) turtle.left(90) print(turtle.position()) turtle.forward(50) print(turtle.position()) turtle.backward(200) print(turtle.position()) turtle.exitonclick()
17
24
0.773109
ec00e360a42c5350640b67e2c931578c44e80d09
94
py
Python
tspdb/src/data/__init__.py
swipswaps/tspdb
9c085cef7164c114bb0952519b9715dcfa072b34
[ "Apache-2.0" ]
43
2019-12-10T00:05:51.000Z
2022-03-31T21:21:20.000Z
tspdb/src/data/__init__.py
swipswaps/tspdb
9c085cef7164c114bb0952519b9715dcfa072b34
[ "Apache-2.0" ]
5
2021-05-09T01:12:31.000Z
2022-03-29T17:34:15.000Z
tspdb/src/data/__init__.py
swipswaps/tspdb
9c085cef7164c114bb0952519b9715dcfa072b34
[ "Apache-2.0" ]
14
2020-01-13T21:20:07.000Z
2022-03-31T02:11:26.000Z
# from . import generateARMA # from . import generateHarmonics # from . import generateTrend
31.333333
34
0.765957
ec4da7404dcc99e5287416f3f8ddf551926ef83b
4,100
py
Python
model_zoo/ernie-3.0/deploy/serving/token_cls_rpc_client.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
model_zoo/ernie-3.0/deploy/serving/token_cls_rpc_client.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
model_zoo/ernie-3.0/deploy/serving/token_cls_rpc_client.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
33.064516
80
0.587805
cf22d4c0261f19df29272b5e4590eec185e2e21c
5,292
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/output/attributeStats.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/output/attributeStats.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/output/attributeStats.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
1
2020-11-20T19:31:26.000Z
2020-11-20T19:31:26.000Z
#!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo # Copyright (C) 2014-2020 German Aerospace Center (DLR) and others. # This program and the accompanying materials are made available under the # terms of the Eclipse Public License 2.0 which is available at # https://www.ec...
41.34375
110
0.632464
cf26648bd16e5d0498f1fd3c95f551a3c08be4c1
1,003
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/intro/intro.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/intro/intro.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/intro/intro.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden str1 = 'String with same contents but different quotes' str2 = "String with same contents but different quotes" str3 = "String with same contents but " + "XXX quotes".replace("XXX", "different") print("str1:", str1) print("str2:",...
22.288889
82
0.681954
d8e228f6793852fbd606ec37b7da94f68559b64d
15,742
py
Python
evolutionary-algo/Evolution.py
bjarnege/Portfolioleistung-KI-Entwicklungen
27be45e3735421a5dd8441cc76ab69da52678304
[ "MIT" ]
null
null
null
evolutionary-algo/Evolution.py
bjarnege/Portfolioleistung-KI-Entwicklungen
27be45e3735421a5dd8441cc76ab69da52678304
[ "MIT" ]
null
null
null
evolutionary-algo/Evolution.py
bjarnege/Portfolioleistung-KI-Entwicklungen
27be45e3735421a5dd8441cc76ab69da52678304
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu May 27 21:10:51 2021 @author: Bjarne Gerdes """ import random import numpy as np import pandas as pd from Population import PopulationInstance class Evolution: def __init__(self, f, N_population): """ Initialize the evolutionary Algorithm ...
38.116223
156
0.5775
2b5d3123b9bd04bc5cba09aed87bad343be6b3e4
12,311
py
Python
python/en/_pandas/Pandas for Everyone/p4e-1_4_groupd_and_aggregated_calculations-groupby.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/_pandas/Pandas for Everyone/p4e-1_4_groupd_and_aggregated_calculations-groupby.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/_pandas/Pandas for Everyone/p4e-1_4_groupd_and_aggregated_calculations-groupby.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ p4e-1_4_groupd_and_aggregated_calculations-groupby.py pandas_for_everyone Clone or download the dataset at https://github.com/jennybc/gapminder File gapminder.tsv located at jennybc/gapminder/inst/extdata/gapminder.tsv. """ #%%###################### # Prerequisite fo...
40.764901
86
0.636179
516a2870eaf2851b3c706422eb8b18489df1f89f
320
py
Python
noticias/migrations/0002_remove_nota_comentario.py
miglesias91/dt
6e00f883ebdb581f87750852f18cf9e3058aae2f
[ "MIT" ]
null
null
null
noticias/migrations/0002_remove_nota_comentario.py
miglesias91/dt
6e00f883ebdb581f87750852f18cf9e3058aae2f
[ "MIT" ]
null
null
null
noticias/migrations/0002_remove_nota_comentario.py
miglesias91/dt
6e00f883ebdb581f87750852f18cf9e3058aae2f
[ "MIT" ]
null
null
null
# Generated by Django 2.2.1 on 2019-05-07 18:05 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('noticias', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='nota', name='comentario', ), ]
17.777778
47
0.58125
85226deb64870b58823daf8f2540ea8e84ecc214
2,392
py
Python
Openharmony v1.0/third_party/ltp/testcases/realtime/scripts/parser.py
clkbit123/TheOpenHarmony
0e6bcd9dee9f1a2481d762966b8bbd24baad6159
[ "MIT" ]
1
2022-02-15T08:51:55.000Z
2022-02-15T08:51:55.000Z
hihope_neptune-oh_hid/00_src/v0.3/third_party/ltp/testcases/realtime/scripts/parser.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
hihope_neptune-oh_hid/00_src/v0.3/third_party/ltp/testcases/realtime/scripts/parser.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ################################################################################ ## ## ## Copyright © International Business Machines Corp., 2007, 2008 ## ## ...
49.833333
85
0.383361
51805f377d1148708e83a2e8fbc83413656fdd83
7,261
py
Python
packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/pipeline_schema/compiled_pipeline.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/pipeline_schema/compiled_pipeline.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/pipeline_schema/compiled_pipeline.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from __future__ import annotations from copy import deepcopy from logging import getLogger from traceback import format_exc from typing import Any, Callable, Dict, List, Optional from watchmen_auth import PrincipalService from watchmen_data_kernel.meta import PipelineService, TopicService from watchmen_data_kernel.st...
39.895604
115
0.797273
a403a53d1c7fae0d7961c56195d123a53a5ed584
3,376
py
Python
packages/watchmen-storage-mysql/src/watchmen_storage_mysql/data_source_mysql.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-storage-mysql/src/watchmen_storage_mysql/data_source_mysql.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-storage-mysql/src/watchmen_storage_mysql/data_source_mysql.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from typing import List, Optional from sqlalchemy import create_engine from sqlalchemy.engine import Engine from watchmen_model.common import DataModel from watchmen_model.system import DataSource, DataSourceParam from watchmen_storage import DataSourceHelper from watchmen_utilities import ArrayHelper, is_blank, is_n...
30.972477
106
0.76096
cffd9c8865bbbeb7600cb66d146dcc39b6a4cfa5
442
pyde
Python
sketches/paletten4/paletten4.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/paletten4/paletten4.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/paletten4/paletten4.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
# Farbpalette nach Bridget Riley (2) riley2 = [color(230, 230, 230), color(235, 200, 55), color(115, 165, 215), color(155, 195, 80), color(230, 135, 170), color(230, 80, 70), color(65, 80, 150)] def setup(): size(510, 400) this.surface.setTitle("Bridget Riley 2") noStroke() noLoo...
24.555556
74
0.561086
a4547864f6d0a38362fcd3d43e929d4f499f911c
8,748
py
Python
animation.py
BostelmannLGLN/LGLN-OpenData
216c762a0b91dd36189e9bb34fa4b3ec76e13f92
[ "MIT" ]
3
2021-12-16T17:22:07.000Z
2022-03-12T21:23:56.000Z
animation.py
BostelmannLGLN/LGLN-OpenData-Notebooks
216c762a0b91dd36189e9bb34fa4b3ec76e13f92
[ "MIT" ]
null
null
null
animation.py
BostelmannLGLN/LGLN-OpenData-Notebooks
216c762a0b91dd36189e9bb34fa4b3ec76e13f92
[ "MIT" ]
null
null
null
import os from pathlib import Path import imageio from PIL import Image from PIL import ImageFont from PIL import ImageDraw from tqdm import tqdm from datetime import date import locale #locale.setlocale(locale.LC_ALL, 'de_DE.utf8') from moviepy.editor import ImageClip, concatenate import fnmatch import requests imp...
41.264151
147
0.644604
f16222e085c4a6e0c5f71ebe8988702664b951aa
4,183
py
Python
cs/lambda_cs/07_computer_architecture/notes/672/cpu.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
null
null
null
cs/lambda_cs/07_computer_architecture/notes/672/cpu.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
8
2020-03-24T17:47:23.000Z
2022-03-12T00:33:21.000Z
cs/lambda_cs/07_computer_architecture/notes/672/cpu.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
null
null
null
""" Computer Architecture — Day 2 :: Bitwise """ # === Bitwise AND === # 1 & 1 # >>> 1 f"{164:b}" # >>> '10100100' """ # From print8.ls8 10000010 # LDI R0,8 00000000 00001000 01000111 # PRN R0 00000000 00000001 # HLT """ import sys class CPU: """Main CPU class.""" def __init__(self): """Cons...
28.073826
72
0.513268
30dea5d592c0abff375986f79b9e28fa14c05345
3,832
py
Python
pandemie/util/util.py
marvinsxtr/informaticup-2020-pandemie
0d37d5236eadfe7bb3cbd7cbfd0e1b7afca74c89
[ "MIT" ]
null
null
null
pandemie/util/util.py
marvinsxtr/informaticup-2020-pandemie
0d37d5236eadfe7bb3cbd7cbfd0e1b7afca74c89
[ "MIT" ]
null
null
null
pandemie/util/util.py
marvinsxtr/informaticup-2020-pandemie
0d37d5236eadfe7bb3cbd7cbfd0e1b7afca74c89
[ "MIT" ]
1
2020-03-28T00:02:41.000Z
2020-03-28T00:02:41.000Z
""" This file contains several useful function. """ import errno import json import random import sys import os import datetime TIME_FORMAT = "%Y-%m-%d--%H.%M.%S" def weighted_choice(seq): """ This function returns a value from a weighted dictionary where the weight maps to a probability of the corresponding...
25.045752
120
0.639353
693cd443e5dd76d0a7f3a0a3f82b8cefe518f39e
493
py
Python
BeautifulData/settings.py
zhangyafeii/Flask
9c9a5ea282f77aabcda838796dad2411af9b519f
[ "MIT" ]
null
null
null
BeautifulData/settings.py
zhangyafeii/Flask
9c9a5ea282f77aabcda838796dad2411af9b519f
[ "MIT" ]
null
null
null
BeautifulData/settings.py
zhangyafeii/Flask
9c9a5ea282f77aabcda838796dad2411af9b519f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ @Datetime: 2019/1/1 @Author: Zhang Yafei """ USERNAME = 'zhangyafei' # PASSWORD = 'ZhangYafei@123' PASSWORD = '666666' NICKNAME = '张亚飞' INSTALLED_APPS = ( 'BeautifulData', ) class BaseConfig(): DEBUG = True SECRET_KEY = 'assadadsadsddadasda' class ProConfig(BaseConfig): ...
17
75
0.663286
695dd5d847866938ca59587d83a77b959ae2fdba
1,726
py
Python
vkapp/bot/logic/core/vk_trigger.py
ParuninPavel/lenta4_hack
6d3340201deadf5757e37ddd7cf5580b928d7bda
[ "MIT" ]
1
2017-11-23T13:33:13.000Z
2017-11-23T13:33:13.000Z
vkapp/bot/logic/core/vk_trigger.py
ParuninPavel/lenta4_hack
6d3340201deadf5757e37ddd7cf5580b928d7bda
[ "MIT" ]
null
null
null
vkapp/bot/logic/core/vk_trigger.py
ParuninPavel/lenta4_hack
6d3340201deadf5757e37ddd7cf5580b928d7bda
[ "MIT" ]
null
null
null
import vk import os from vk.exceptions import VkAPIError from functools import wraps from .QueueMachine import QueueMachine # # def try_api(func): # @wraps(func) # def wrap(*args, **kwargs): # attempts = 3 # while attempts > 0: # try: # func(*args, **kwargs) # ...
28.766667
78
0.571842
d6bb4f2642e6d99f33063f988786592cfc76afcf
4,815
py
Python
project/services/notification.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
null
null
null
project/services/notification.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
35
2022-01-24T22:15:59.000Z
2022-03-31T15:01:35.000Z
project/services/notification.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
null
null
null
import datetime import json from apns2.client import APNsClient from apns2.errors import Unregistered from apns2.payload import Payload from flask import url_for from py_vapid import Vapid from pyfcm import FCMNotification from pyfcm.errors import FCMNotRegisteredError from pywebpush import WebPushException, webpush f...
33.4375
87
0.655659
ba62e9d890ea264bbe278d246c821df358f9faa2
241
py
Python
ALBERT/dataset/utils/my_csv.py
baowj-678/TC
4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6
[ "MIT" ]
null
null
null
ALBERT/dataset/utils/my_csv.py
baowj-678/TC
4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6
[ "MIT" ]
null
null
null
ALBERT/dataset/utils/my_csv.py
baowj-678/TC
4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6
[ "MIT" ]
null
null
null
""" 自定义CSV格式 @Author: Bao Wenjie @Email: bwj_678@qq.com @Date: 2020/10/29 """ import csv from csv import excel class tsv(excel): """ \t分隔符 """ delimiter = '\t' lineterminator = '\n' csv.register_dialect('tsv', tsv)
17.214286
32
0.605809
aea96d1adccff612c07e72ba8e14320af3c548c4
1,085
py
Python
sourcebox_config/tester.py
ebertmi/webbox
d2fa548e09a6c98be2bd0c6f6afc10e2d6df64b2
[ "MIT" ]
3
2018-03-12T18:01:53.000Z
2022-03-11T08:03:38.000Z
sourcebox_config/tester.py
ebertmi/webbox
d2fa548e09a6c98be2bd0c6f6afc10e2d6df64b2
[ "MIT" ]
9
2017-10-04T20:09:20.000Z
2018-10-23T20:12:45.000Z
sourcebox_config/tester.py
ebertmi/webbox
d2fa548e09a6c98be2bd0c6f6afc10e2d6df64b2
[ "MIT" ]
2
2018-03-17T18:55:07.000Z
2021-03-24T08:14:45.000Z
import os import sys import io import traceback # Set the current working dir to the project if len(sys.argv) < 2: print("No project path supplied for the tester") sys.exit() path = sys.argv[1] os.chdir(path) # should we prepend? sys.path.insert(0, path) #sys.path.append(path) import unittest from test_uti...
23.586957
116
0.699539
aefbfe05f20092a75da488f163b510342060be0f
727
py
Python
test2.py
Tiangewang0524/zzu_spider
eddd534f6a7bfb39eec5a7e240f830550b2285cb
[ "Apache-2.0" ]
null
null
null
test2.py
Tiangewang0524/zzu_spider
eddd534f6a7bfb39eec5a7e240f830550b2285cb
[ "Apache-2.0" ]
null
null
null
test2.py
Tiangewang0524/zzu_spider
eddd534f6a7bfb39eec5a7e240f830550b2285cb
[ "Apache-2.0" ]
null
null
null
import pdfkit confg = pdfkit.configuration(wkhtmltopdf=r'C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe') # url='http://www16.zzu.edu.cn/msgs/vmsgisapi.dll/vmsglist?mtype=x&lan=203'#一篇博客的url # pdfkit.from_url(url, 'zzu_index_2.pdf', configuration=confg) # pdfkit.from_file('test1111.html', 'test_html_2.pdf', configu...
29.08
93
0.730399
9dedc09a5971a1853efdf2608719aa9a22b0720a
1,254
py
Python
asteroid/utils/deprecation_utils.py
groadabike/asteroid
276d98346ab791d904fbfe79b9b8e374392dd128
[ "MIT" ]
1
2020-12-18T02:42:23.000Z
2020-12-18T02:42:23.000Z
asteroid/utils/deprecation_utils.py
groadabike/asteroid
276d98346ab791d904fbfe79b9b8e374392dd128
[ "MIT" ]
null
null
null
asteroid/utils/deprecation_utils.py
groadabike/asteroid
276d98346ab791d904fbfe79b9b8e374392dd128
[ "MIT" ]
null
null
null
import warnings class VisibleDeprecationWarning(UserWarning): """Visible deprecation warning. By default, python will not show deprecation warnings, so this class can be used when a very visible warning is helpful, for example because the usage is most likely a user bug. """ # Taken from nu...
29.162791
85
0.639553
06054a8bb84247419d40b8b8395d574136386239
484
py
Python
src/python/py-accepted/158B.py
cbarnson/UVa
0dd73fae656613e28b5aaf5880c5dad529316270
[ "Unlicense", "MIT" ]
2
2019-09-07T17:00:26.000Z
2020-08-05T02:08:35.000Z
src/python/py-accepted/158B.py
cbarnson/UVa
0dd73fae656613e28b5aaf5880c5dad529316270
[ "Unlicense", "MIT" ]
null
null
null
src/python/py-accepted/158B.py
cbarnson/UVa
0dd73fae656613e28b5aaf5880c5dad529316270
[ "Unlicense", "MIT" ]
null
null
null
#! python # Problem # : 158B # Created on : 2019-01-14 22:25:35 def Main(): n = int(input()) t = 0 arr = [int(x) for x in input().split(' ')] arr.sort() i = 0 j = len(arr) - 1 k = 0 m = 4 while j >= i: if i is j: k += 1 break while a...
13.828571
46
0.378099
885379a50d53f53db98eb928f2ad797b1d15f5df
695
py
Python
elements/python/13/15/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
11
2019-02-08T06:54:34.000Z
2021-08-07T18:57:39.000Z
elements/python/13/15/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
1
2019-05-21T08:14:10.000Z
2019-05-21T08:14:10.000Z
elements/python/13/15/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
null
null
null
SEP = ':' def attr_key(attrs): return SEP.join(sorted(attrs)) def pair_users(users): attr_to_user = dict() pairs = [] for user_id, attrs in users: k = attr_key(attrs) if k not in attr_to_user: attr_to_user[k] = user_id continue pairs.append((attr_to_us...
20.441176
48
0.489209
889197c9e7484db2f2fcdf2e4aa2c8edcc1000fa
2,551
py
Python
src/visitpy/visit_utils/tests/test_exprs.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/visitpy/visit_utils/tests/test_exprs.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/visitpy/visit_utils/tests/test_exprs.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
# Copyright (c) Lawrence Livermore National Security, LLC and other VisIt # Project developers. See the top-level LICENSE file for dates and other # details. No copyright assignment is required to contribute to VisIt. """ file: test_exprs.py author: Cyrus Harrison (cyrush@llnl.gov) created: 4/09/2010 description...
28.662921
73
0.640533
ee634a2ab862db2ceef5f43baa3967c0d8ca213b
1,404
py
Python
FeatureEngineering/classifier.py
alex-ta/Fontinator
7ca9effe3b61ded032176557520127e1d4b7a5ef
[ "Apache-2.0" ]
6
2017-04-12T14:05:19.000Z
2021-01-29T11:23:50.000Z
FeatureEngineering/classifier.py
alex-ta/Fontinator
7ca9effe3b61ded032176557520127e1d4b7a5ef
[ "Apache-2.0" ]
null
null
null
FeatureEngineering/classifier.py
alex-ta/Fontinator
7ca9effe3b61ded032176557520127e1d4b7a5ef
[ "Apache-2.0" ]
null
null
null
import numpy as np from sklearn import neighbors, datasets import pickle # Config weight = 'distance' n_neighbors = 1 # Class wihch stores the configure classifier with the information needed to # normalize the feature vector class Classifier: def __init__(self): self.clf = neighbors.KNeighborsClassifier(...
35.1
87
0.69302
c9556b338c190b411fae7493c86620c966dc816b
530
py
Python
tests/test_katasteradresse.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
tests/test_katasteradresse.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
tests/test_katasteradresse.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
from bo4e.com.katasteradresse import Katasteradresse, KatasteradresseSchema class TestKatasteradresse: def test_serialization(self): ka = Katasteradresse(gemarkung_flur="hello", flurstueck="world") schema = KatasteradresseSchema() json_string = schema.dumps(ka, ensure_ascii=False) ...
31.176471
76
0.745283
42cc35b5366ff691042fe6924e6f2ff19d6b6e7f
844
py
Python
server/apps/movie/task.py
Mayandev/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
129
2019-04-20T08:23:25.000Z
2022-03-14T10:02:23.000Z
server/apps/movie/task.py
heartplus/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
9
2019-05-19T15:06:17.000Z
2021-12-14T06:47:14.000Z
server/apps/movie/task.py
heartplus/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
34
2019-05-06T06:37:17.000Z
2021-12-09T02:27:58.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019-04-27 16:00 # @Author : Mayandev # @Site : https://github.com/Mayandev/ # @File : calculate_similary_movie.py # @Software: PyCharm from .models import Genre import requests # 定时爬取种类相关电影id def update_genre_movie(): genres = Genre.objects.all()...
25.575758
63
0.603081
6e0f6039d0516dd9276650b4686ca4afbbf750ab
464
py
Python
source/blog/migrations/0005_postcomments_pubdate.py
JakubGutowski/PersonalBlog
96122b36486f7e874c013e50d939732a43db309f
[ "BSD-3-Clause" ]
null
null
null
source/blog/migrations/0005_postcomments_pubdate.py
JakubGutowski/PersonalBlog
96122b36486f7e874c013e50d939732a43db309f
[ "BSD-3-Clause" ]
null
null
null
source/blog/migrations/0005_postcomments_pubdate.py
JakubGutowski/PersonalBlog
96122b36486f7e874c013e50d939732a43db309f
[ "BSD-3-Clause" ]
null
null
null
# Generated by Django 2.0.5 on 2018-07-08 10:36 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0004_postcomments'), ] operations = [ migrations.AddField( model_name='postcomments', ...
23.2
98
0.588362
6e26004258750f4149ee17c1b69cea82d74ea12a
731
py
Python
solution/data_structure/10828/main.py
gkgg123/baekjoon
4ff8a1238a5809e4958258b5f2eeab7b22105ce9
[ "MIT" ]
2,236
2019-08-05T00:36:59.000Z
2022-03-31T16:03:53.000Z
solution/data_structure/10828/main.py
juy4556/baekjoon
bc0b0a0ebaa45a5bbd32751f84c458a9cfdd9f92
[ "MIT" ]
225
2020-12-17T10:20:45.000Z
2022-01-05T17:44:16.000Z
solution/data_structure/10828/main.py
juy4556/baekjoon
bc0b0a0ebaa45a5bbd32751f84c458a9cfdd9f92
[ "MIT" ]
602
2019-08-05T00:46:25.000Z
2022-03-31T13:38:23.000Z
# Authored by : tony9402 # Co-authored by : - # Link : http://boj.kr/ab416f0794fc41cabc3d9ed46db29f60 import sys def input(): return sys.stdin.readline().rstrip() N = int(input()) stack = [] for i in range(N): cmd = input().split() X = 0 if len(cmd) == 2: X = cmd[1] cmd = cmd[0] if...
19.756757
55
0.4829
95b263909a9c15ad2c846c81cb712bf39fedd9b5
545
pyde
Python
sketches/pandemie/pandemie.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/pandemie/pandemie.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/pandemie/pandemie.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
from proband import Proband from random import randint FPS = 5 probanden = [] def setup(): size(600, 600) this.surface.setTitle("Pandemie-Simulation") frameRate(FPS) for _ in range(100): rate = randint(0, 100) if rate < 1: infz = 30 else: infz = 0 ...
20.961538
90
0.574312
251abd293f90c95bf892cdbb8782dd89c61de551
922
py
Python
src/onegov/wtfs/views/payment_type.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/wtfs/views/payment_type.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/wtfs/views/payment_type.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from morepath import redirect from onegov.wtfs import _ from onegov.wtfs import WtfsApp from onegov.wtfs.collections import PaymentTypeCollection from onegov.wtfs.forms import PaymentTypesForm from onegov.wtfs.layouts import PaymentTypesLayout from onegov.wtfs.security import EditModel @WtfsApp.form( model=Paymen...
26.342857
64
0.707158
256e1566386a43d12239d9785a98c7766f6dde9d
8,488
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/traci/_edge.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/traci/_edge.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/traci/_edge.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
1
2020-11-20T19:31:26.000Z
2020-11-20T19:31:26.000Z
# -*- coding: utf-8 -*- # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo # Copyright (C) 2011-2020 German Aerospace Center (DLR) and others. # This program and the accompanying materials are made available under the # terms of the Eclipse Public License 2.0 which is available at # https://www....
38.757991
111
0.671418
6c2b7cb2eb6ebc05e936be569637137f2d5c0fad
231
py
Python
helper/bot.py
dgnaegi/altpapierBot
287d7e446eabf189189713067d8ac7405416d720
[ "WTFPL" ]
5
2019-07-17T04:36:14.000Z
2020-05-04T12:48:10.000Z
helper/bot.py
dgnaegi/altpapierBot
287d7e446eabf189189713067d8ac7405416d720
[ "WTFPL" ]
8
2019-08-04T19:16:00.000Z
2021-09-10T10:11:47.000Z
helper/bot.py
dgnaegi/altpapierBot
287d7e446eabf189189713067d8ac7405416d720
[ "WTFPL" ]
3
2019-07-17T06:37:56.000Z
2021-09-06T19:59:18.000Z
import telegram class bot: def __init__(self, token): self.token = token self.telegramBot = telegram.Bot(token=token) def SendMessage(self, chatId, text): self.telegramBot.sendMessage(chatId, text)
25.666667
52
0.675325
6657dd843e8a0e96289ed748d8a29f734a636c39
2,313
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v5_0/rename_total_fields.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/v5_0/rename_total_fields.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v5_0/rename_total_fields.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
# 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 from frappe.model.utils.rename_field import rename_field from frappe.modules import scrub, get_doctype_module selling_doctypes = ("Quotat...
41.303571
112
0.74492
66cedf20126760764b4072df80c782157f43c939
2,459
py
Python
sketches/breakout1/gameworld.py
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/breakout1/gameworld.py
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/breakout1/gameworld.py
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
# coding=utf-8 class Paddle(object): def __init__(self): self.w = 120 self.h = 15 self.pos = PVector(width/2.0 - self.w/2.0, height - 40) self.isMovingLeft = False self.isMovingRight = False self.stepSize = 20 def display(self): fill("#ff9664") ...
27.021978
67
0.509557
660c2491fa15bb190fdaaddc8693ceb89170e0f5
776
py
Python
src/lecture1/classifier/get_data/get_data.py
Fassial/zju-intern
f421f9c97d3c567e9b97121c5bf5c675c9e2c721
[ "MIT" ]
1
2020-08-17T07:09:09.000Z
2020-08-17T07:09:09.000Z
src/lecture1/classifier/get_data/get_data.py
Fassial/zju-intern
f421f9c97d3c567e9b97121c5bf5c675c9e2c721
[ "MIT" ]
null
null
null
src/lecture1/classifier/get_data/get_data.py
Fassial/zju-intern
f421f9c97d3c567e9b97121c5bf5c675c9e2c721
[ "MIT" ]
2
2020-07-26T07:27:57.000Z
2020-08-17T07:09:15.000Z
import glob import cv2 import os """ read_image: @params: foldername(str) : the folder name with pictures to read isPositive(bool) : positive or negative @rets: image_data(list) : the data of image image_label(list) : the label of image """ def read_image(f...
26.758621
64
0.618557
b086209cc01f27ebfa22aee9e51a832c7da61a67
17,740
py
Python
tests/test_app.py
MedPhyDO/pygqa
580b2c6028d2299790a38262b795b8409cbfcc37
[ "MIT" ]
3
2021-02-25T13:19:52.000Z
2021-03-03T03:46:46.000Z
tests/test_app.py
MedPhyDO/pygqa
580b2c6028d2299790a38262b795b8409cbfcc37
[ "MIT" ]
null
null
null
tests/test_app.py
MedPhyDO/pygqa
580b2c6028d2299790a38262b795b8409cbfcc37
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ """ import os from os import path as osp from shutil import copyfile # Module auch von der Konsole erreichbar machen ABSPATH = os.path.dirname( os.path.abspath( __file__) ) path = osp.join( ABSPATH , "..") # Coverage am Anfang initialisieren damit alles berücksichtigt wird cov = None...
31.849192
135
0.507103
b04d0037091826f09d2f4486e6d3599669254a12
1,251
py
Python
python/flask/sql_alchemy/populate.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/flask/sql_alchemy/populate.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/flask/sql_alchemy/populate.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from database_setup import Book, Base engine = create_engine('sqlite:///books-collection.db') # Bind the engine to the metadata of the Base class so that the # declaratives can be accessed through a DBSession instance Base.metadata.bind = eng...
29.785714
79
0.768185
05dd354d24f053d4ec42f80eccbf559d5f6b3703
1,252
py
Python
game-of-two-stacks.py
kautuk-desai/HackerRank
6c0b22800ea2e40d118d6a0a5c0ece067a0a69bf
[ "MIT" ]
null
null
null
game-of-two-stacks.py
kautuk-desai/HackerRank
6c0b22800ea2e40d118d6a0a5c0ece067a0a69bf
[ "MIT" ]
null
null
null
game-of-two-stacks.py
kautuk-desai/HackerRank
6c0b22800ea2e40d118d6a0a5c0ece067a0a69bf
[ "MIT" ]
null
null
null
#!/bin/python3 import sys def findMaxPossibleNumbers(a,b,x): total_sum = 0 a_next = 0 b_next = 0 max_score = 0 while(a and b): a_next = a[0] b_next = b[0] if(a_next < b_next): if(total_sum + a_next > x): break; else: to...
26.638298
50
0.466454
a567a7d36884f85ffd24fddfb4a6ecfcd900b515
931
py
Python
tests/books/config_custombuilder/extension/mycustomextension.py
flat35hd99/jupyter-book
4d5b474e6f2b80c4d1d206e4554740ff82a344dc
[ "BSD-3-Clause" ]
2,109
2020-05-02T23:47:18.000Z
2022-03-31T22:16:54.000Z
tests/books/config_custombuilder/extension/mycustomextension.py
flat35hd99/jupyter-book
4d5b474e6f2b80c4d1d206e4554740ff82a344dc
[ "BSD-3-Clause" ]
1,158
2020-04-29T18:07:02.000Z
2022-03-31T21:50:57.000Z
tests/books/config_custombuilder/extension/mycustomextension.py
flat35hd99/jupyter-book
4d5b474e6f2b80c4d1d206e4554740ff82a344dc
[ "BSD-3-Clause" ]
360
2020-04-29T14:44:49.000Z
2022-03-31T09:26:23.000Z
from sphinx.builders.html import StandaloneHTMLBuilder NB_RENDER_PRIORITY = { "mycustombuilder": ( "application/vnd.jupyter.widget-view+json", "application/javascript", "text/html", "image/svg+xml", "image/png", "image/jpeg", "text/markdown", "text/la...
23.275
81
0.611171
3c148edefb42b28007e770d3046d9042f7b4716e
3,512
py
Python
production/pygsl-0.9.5/pygsl/siman.py
juhnowski/FishingRod
457e7afb5cab424296dff95e1acf10ebf70d32a9
[ "MIT" ]
1
2019-07-29T02:53:51.000Z
2019-07-29T02:53:51.000Z
production/pygsl-0.9.5/pygsl/siman.py
juhnowski/FishingRod
457e7afb5cab424296dff95e1acf10ebf70d32a9
[ "MIT" ]
1
2021-09-11T14:30:32.000Z
2021-09-11T14:30:32.000Z
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/siman.py
poojavade/Genomics_Docker
829b5094bba18bbe03ae97daf925fee40a8476e8
[ "Apache-2.0" ]
2
2016-12-19T02:27:46.000Z
2019-07-29T02:53:54.000Z
#!/usr/bin/env python """ Wrapper for the Simulated Annealing Solver provided by GSL. The simulated annealing algorithm takes random walks through the problem space, looking for points with low energies; in these random walks, the probability of taking a step is determined by the Boltzmann distribution, ...
28.552846
79
0.624431
abcbb6e4fed9e1a9c6ab95c0514dd4e2a81aa5ef
9,556
py
Python
zencad/geom/wire_builder.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
5
2018-04-11T14:11:40.000Z
2018-09-12T19:03:36.000Z
zencad/geom/wire_builder.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
zencad/geom/wire_builder.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
from zencad.util import point3, vector3 from zencad.geom.wire import * # from zencad.geom. import * import zencad.gutil from zencad.util import deg import math class wire_builder: def __init__(self, start=(0, 0, 0), defrel=False): self.edges = [] self.current = point3(start) self.start =...
29.8625
101
0.512139
e9ac93d10aadcb9335635ba9770f48abbf9674ba
1,287
py
Python
datahandler/expertPatterns.py
ameliecordier/IIK
57b40d6b851a1c2369604049d1820e5b572c6227
[ "MIT" ]
null
null
null
datahandler/expertPatterns.py
ameliecordier/IIK
57b40d6b851a1c2369604049d1820e5b572c6227
[ "MIT" ]
null
null
null
datahandler/expertPatterns.py
ameliecordier/IIK
57b40d6b851a1c2369604049d1820e5b572c6227
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import csv import pprint class ExpertPatterns: """ Classe de manipulation des patterns experts Le fichier CSV est supposé sans entêtes La liste des patterns est une liste de strings, séparées par des virgules. Exemple : ep = ['la,si,la,sold', 'la,si,do,si'] """ def...
29.930233
80
0.605284
75c3c8badb6bf3f3cbde78b8bbd6f9040edca21c
1,080
py
Python
Webpage/web/migrations/0003_sponsoren.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
null
null
null
Webpage/web/migrations/0003_sponsoren.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
46
2022-01-08T12:03:24.000Z
2022-03-30T08:51:05.000Z
Webpage/web/migrations/0003_sponsoren.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.1.8 on 2021-05-18 14:15 from django.db import migrations, models import django_resized.forms class Migration(migrations.Migration): dependencies = [ ('web', '0002_auto_20210429_1805'), ] operations = [ migrations.CreateModel( name='sponsoren', ...
41.538462
213
0.626852
f9d2acca9842ee502e729060c8ea69ad7096d57f
9,974
py
Python
Packs/FeedUnit42/Integrations/FeedUnit42/FeedUnit42_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/FeedUnit42/Integrations/FeedUnit42/FeedUnit42_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/FeedUnit42/Integrations/FeedUnit42/FeedUnit42_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import pytest from FeedUnit42 import Client, get_indicators_command, fetch_indicators, sort_report_objects_by_type, parse_reports, \ match_relationships, parse_related_indicators, create_mitre_indicator from test_data.feed_data import INDICATORS_DATA, ATTACK_PATTERN_DATA, MALWARE_DATA, RELATIONSHIP_DATA, REPORTS_DA...
33.469799
127
0.642771
dda5f5fbe204a1f01508ff1f9867cc45559f2989
1,878
py
Python
Machine Learning/WeightedkNearestNeighbour.py
NiclasDev63/Algorithmen
64c24d0501f9e12ea9be6ae4fa946ad8a40134f6
[ "MIT" ]
null
null
null
Machine Learning/WeightedkNearestNeighbour.py
NiclasDev63/Algorithmen
64c24d0501f9e12ea9be6ae4fa946ad8a40134f6
[ "MIT" ]
null
null
null
Machine Learning/WeightedkNearestNeighbour.py
NiclasDev63/Algorithmen
64c24d0501f9e12ea9be6ae4fa946ad8a40134f6
[ "MIT" ]
null
null
null
import numpy as np from sklearn.datasets import load_iris from sklearn.metrics import accuracy_score def eucledianDist(p1,p2): dist = np.sqrt(np.sum((p1-p2)**2)) return dist def kNearestNeighbour(x_train, y_train, x_test, k): op_labels = [] #Loop through the Datapoints to be classified for ...
21.340909
60
0.571885
ddfa4ae875f29140f18eaff6448ac408ed61d05e
75
py
Python
TestCodeArchive/PythonCode/Pathfinding/config.py
tobiasdossinger/percy
c2ca6f21fcd6830ffd6d3879f7bcaaa5b87335e5
[ "MIT" ]
null
null
null
TestCodeArchive/PythonCode/Pathfinding/config.py
tobiasdossinger/percy
c2ca6f21fcd6830ffd6d3879f7bcaaa5b87335e5
[ "MIT" ]
null
null
null
TestCodeArchive/PythonCode/Pathfinding/config.py
tobiasdossinger/percy
c2ca6f21fcd6830ffd6d3879f7bcaaa5b87335e5
[ "MIT" ]
null
null
null
GRID_WIDTH = 20 GRID_HEIGHT = 20 GRID_SIZE = 0 START = (0, 0) END = (7, 6)
12.5
16
0.626667
fb219bd4c26883f9e86b4f3112226448a21bdfa8
992
py
Python
py_projects/wordcloud/wordcloud(1).py
Anwesha-dash811/hacktober-1
188c859864f06f94a94cb91e63979366db62b9ac
[ "MIT" ]
1
2020-10-04T12:36:45.000Z
2020-10-04T12:36:45.000Z
py_projects/wordcloud/wordcloud(1).py
Anwesha-dash811/hacktober-1
188c859864f06f94a94cb91e63979366db62b9ac
[ "MIT" ]
1
2021-09-30T16:20:57.000Z
2021-09-30T16:20:57.000Z
py_projects/wordcloud/wordcloud(1).py
Anwesha-dash811/hacktober-1
188c859864f06f94a94cb91e63979366db62b9ac
[ "MIT" ]
3
2020-10-04T10:07:10.000Z
2020-10-25T15:21:15.000Z
#!/usr/bin/env python # coding: utf-8 # In[2]: get_ipython().system('pip install wordcloud') # In[4]: import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns # In[15]: frnd_df = pd.read_csv('friends.csv') # In[16]: frnd_df # In[7]: from wordcloud import WordCloud ...
14.376812
77
0.611895
fd5d7c62bf0bab523dae0322b58a06111190270d
1,426
py
Python
python/en/archive/dropbox/programmers/07-1-linked_list-traversal.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/dropbox/programmers/07-1-linked_list-traversal.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/dropbox/programmers/07-1-linked_list-traversal.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
# 07-1-linked_list-traversal.py # -*- coding: utf-8 -*- # (07) 연결 리스트 순회 # 문제 설명 # 제 7 강에서 소개된 추상적 자료구조로 LinkedList 라는 이름의 클래스가 정의되어 있다고 가정하고, 이 리스트를 처음부터 끝까지 순회하는 메서드 traverse() 를 완성하세요. # 메서드 traverse()는 리스트를 리턴하되, 이 리스트에는 연결 리스트의 노드들에 들어 있는 데이터 아이템들을 연결 리스트에서의 순서와 같도록 포함합니다. 예를 들어, LinkedList L 에 들어 있는 노드들이 43 -> 85...
26.407407
170
0.5554
c835ae551436287a66388c89250f7f29ca09674c
19,815
py
Python
app.py
abhisheksharma026/AutoML
cc30d38e9e1a8a885ded15d40ed1584b3a4d6d34
[ "MIT" ]
null
null
null
app.py
abhisheksharma026/AutoML
cc30d38e9e1a8a885ded15d40ed1584b3a4d6d34
[ "MIT" ]
null
null
null
app.py
abhisheksharma026/AutoML
cc30d38e9e1a8a885ded15d40ed1584b3a4d6d34
[ "MIT" ]
null
null
null
from libraries import * from params import * class AutoML(object): X_train, X_test, y_train, y_test = None, None, None, None def __init__(self, df, target, type, dummy = True, device_type = "CPU"): self.df = df self.cols = df.columns.tolist() self.target = target self.type = t...
39.63
154
0.568307