hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bea43752768259680c29953a0cec72ec71c5a8eb | 1,329 | py | Python | code_week12_713_719/is_graph_bipartite_hard.py | dylanlee101/leetcode | b059afdadb83d504e62afd1227107de0b59557af | [
"Apache-2.0"
] | null | null | null | code_week12_713_719/is_graph_bipartite_hard.py | dylanlee101/leetcode | b059afdadb83d504e62afd1227107de0b59557af | [
"Apache-2.0"
] | null | null | null | code_week12_713_719/is_graph_bipartite_hard.py | dylanlee101/leetcode | b059afdadb83d504e62afd1227107de0b59557af | [
"Apache-2.0"
] | null | null | null | '''
给定一个无向图graph,当这个图为二分图时返回true。
如果我们能将一个图的节点集合分割成两个独立的子集A和B,并使图中的每一条边的两个节点一个来自A集合,一个来自B集合,我们就将这个图称为二分图。
graph将会以邻接表方式给出,graph[i]表示图中与节点i相连的所有节点。每个节点都是一个在0到graph.length-1之间的整数。这图中没有自环和平行边: graph[i] 中不存在i,并且graph[i]中没有重复的值。
示例 1:
输入: [[1,3], [0,2], [1,3], [0,2]]
输出: true
解释:
无向图如下:
0----1
| |
| |
3----2
我们可以将... | 21.435484 | 117 | 0.51392 | 793 | 0.446258 | 0 | 0 | 0 | 0 | 0 | 0 | 980 | 0.551491 |
bea493d4dc7e2d4506520e5f797ce4cb0a9a2a6e | 1,417 | py | Python | data_preprocessing/decision_tree_regression.py | Frost199/Machine_Learning | 8cf77c6cbbae7781ac6f2ffcc9218ad79472d287 | [
"MIT"
] | null | null | null | data_preprocessing/decision_tree_regression.py | Frost199/Machine_Learning | 8cf77c6cbbae7781ac6f2ffcc9218ad79472d287 | [
"MIT"
] | null | null | null | data_preprocessing/decision_tree_regression.py | Frost199/Machine_Learning | 8cf77c6cbbae7781ac6f2ffcc9218ad79472d287 | [
"MIT"
] | 1 | 2020-05-23T16:46:52.000Z | 2020-05-23T16:46:52.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue Apr 17 06:44:47 2018
@author: Eleam Emmanuel
"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.tree import DecisionTreeRegressor
# importing the dataset
dataset = pd.read_csv('Position_Salaries.csv')
# take all the columns but leave the... | 30.804348 | 92 | 0.740296 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 867 | 0.611856 |
bea4e663116d7a61eb7a7e77d69904ecfbbff62c | 1,786 | py | Python | user_messages/apps.py | everaccountable/django-user-messages | 101d539b785bdb440bf166fb16ad25eb66e4174a | [
"MIT"
] | null | null | null | user_messages/apps.py | everaccountable/django-user-messages | 101d539b785bdb440bf166fb16ad25eb66e4174a | [
"MIT"
] | null | null | null | user_messages/apps.py | everaccountable/django-user-messages | 101d539b785bdb440bf166fb16ad25eb66e4174a | [
"MIT"
] | null | null | null | from django.apps import AppConfig
from django.conf import settings
from django.core import checks
from django.template import engines
from django.template.backends.django import DjangoTemplates
from django.utils.text import capfirst
from django.utils.translation import gettext_lazy as _
@checks.register()
def check_c... | 33.698113 | 79 | 0.647816 | 165 | 0.092385 | 0 | 0 | 1,327 | 0.743001 | 0 | 0 | 484 | 0.270997 |
bea518b5d7670e7d0f948f9ce8eda34d0fa0bd36 | 20,671 | py | Python | evalml/tests/objective_tests/test_standard_metrics.py | sharshofski/evalml | f13dcd969e86b72ba01ca520247a16850030dcb0 | [
"BSD-3-Clause"
] | null | null | null | evalml/tests/objective_tests/test_standard_metrics.py | sharshofski/evalml | f13dcd969e86b72ba01ca520247a16850030dcb0 | [
"BSD-3-Clause"
] | null | null | null | evalml/tests/objective_tests/test_standard_metrics.py | sharshofski/evalml | f13dcd969e86b72ba01ca520247a16850030dcb0 | [
"BSD-3-Clause"
] | null | null | null | from itertools import product
import numpy as np
import pandas as pd
import pytest
from sklearn.metrics import matthews_corrcoef as sk_matthews_corrcoef
from evalml.objectives import (
F1,
MAPE,
MSE,
AccuracyBinary,
AccuracyMulticlass,
BalancedAccuracyBinary,
BalancedAccuracyMulticlass,
... | 40.771203 | 133 | 0.592473 | 0 | 0 | 0 | 0 | 957 | 0.046297 | 0 | 0 | 940 | 0.045474 |
bea66694bcf52b9fffd500768ba31f40d22d16ce | 4,908 | py | Python | server-python3/server.py | Aaron-Ming/websocket_terminal | 42c24391d51c275eabf1f879fb312b9a3614f51e | [
"MIT"
] | 40 | 2016-11-20T09:48:27.000Z | 2021-04-02T00:29:14.000Z | server-python3/server.py | Aaron-Ming/websocket_terminal | 42c24391d51c275eabf1f879fb312b9a3614f51e | [
"MIT"
] | 6 | 2018-01-07T03:43:22.000Z | 2022-03-21T08:43:33.000Z | server-python3/server.py | glensc/websocket_terminal | 42c24391d51c275eabf1f879fb312b9a3614f51e | [
"MIT"
] | 20 | 2016-12-02T06:00:27.000Z | 2021-08-15T11:40:34.000Z | import os
import urllib.parse
import eventlet
import eventlet.green.socket
# eventlet.monkey_patch()
import eventlet.websocket
import eventlet.wsgi
import wspty.pipe
from flask import Flask, request, redirect
from wspty.EchoTerminal import EchoTerminal
from wspty.EncodedTerminal import EncodedTerminal
from wspty.Webso... | 31.261146 | 115 | 0.647514 | 2,747 | 0.559698 | 0 | 0 | 194 | 0.039527 | 0 | 0 | 610 | 0.124287 |
bea71c525e82317994bbd637b8bebff771fe81eb | 3,406 | py | Python | tests/unit/test_roger_promote.py | seomoz/roger-mesos-tools | 88b4cb3550a4b49d0187cfb5e6a22246ff6b9765 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_roger_promote.py | seomoz/roger-mesos-tools | 88b4cb3550a4b49d0187cfb5e6a22246ff6b9765 | [
"Apache-2.0"
] | 47 | 2016-05-26T22:09:56.000Z | 2018-08-08T20:33:39.000Z | tests/unit/test_roger_promote.py | seomoz/roger-mesos-tools | 88b4cb3550a4b49d0187cfb5e6a22246ff6b9765 | [
"Apache-2.0"
] | 3 | 2017-09-20T22:39:03.000Z | 2017-11-07T22:29:29.000Z | # -*- encoding: utf-8 -*-
"""
Unit test for roger_promote.py
"""
import tests.helper
import unittest
import os
import os.path
import pytest
import requests
from mockito import mock, Mock, when
from cli.roger_promote import RogerPromote
from cli.appconfig import AppConfig
from cli.settings import Settings
from cl... | 28.383333 | 76 | 0.645919 | 2,942 | 0.86377 | 0 | 0 | 81 | 0.023782 | 0 | 0 | 590 | 0.173224 |
bea77828d8025fc0087d40bc8239898137482a39 | 7,097 | py | Python | data/collectors.py | papb/COVID-19 | 2dc8e683f55c494ca894727aca56f90e53b161f3 | [
"MIT"
] | 6 | 2020-03-24T22:03:34.000Z | 2020-03-25T21:08:02.000Z | data/collectors.py | papb/COVID-19 | 2dc8e683f55c494ca894727aca56f90e53b161f3 | [
"MIT"
] | null | null | null | data/collectors.py | papb/COVID-19 | 2dc8e683f55c494ca894727aca56f90e53b161f3 | [
"MIT"
] | 1 | 2020-03-27T20:25:03.000Z | 2020-03-27T20:25:03.000Z | import json
import pandas as pd
import requests
def load_dump_covid_19_data():
COVID_19_BY_CITY_URL='https://raw.githubusercontent.com/wcota/covid19br/master/cases-brazil-cities-time.csv'
by_city=(pd.read_csv(COVID_19_BY_CITY_URL)
.query('country == "Brazil"')
.drop(columns=['c... | 32.856481 | 121 | 0.479217 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,113 | 0.297229 |
bea7f47e5f837c85a165df266359f1d2def3dfcd | 5,976 | py | Python | testsuite/testsuite_helpers.py | freingruber/JavaScript-Raider | d1c1fff2fcfc60f210b93dbe063216fa1a83c1d0 | [
"Apache-2.0"
] | 91 | 2022-01-24T07:32:34.000Z | 2022-03-31T23:37:15.000Z | testsuite/testsuite_helpers.py | zeusguy/JavaScript-Raider | d1c1fff2fcfc60f210b93dbe063216fa1a83c1d0 | [
"Apache-2.0"
] | null | null | null | testsuite/testsuite_helpers.py | zeusguy/JavaScript-Raider | d1c1fff2fcfc60f210b93dbe063216fa1a83c1d0 | [
"Apache-2.0"
] | 11 | 2022-01-24T14:21:12.000Z | 2022-03-31T23:37:23.000Z | import config as cfg
import utils
import native_code.executor as executor
number_performed_tests = 0
expectations_correct = 0
expectations_wrong = 0
def reset_stats():
global number_performed_tests, expectations_correct, expectations_wrong
number_performed_tests = 0
expectations_correct = 0
expecta... | 34.947368 | 130 | 0.737784 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,933 | 0.323461 |
bea8a3765c24aad74f039b0b081e005d38797cfe | 99 | py | Python | examples/my_configs/two.py | davidhyman/override | e34bd3c8676233439de5c002367b3bff5c1b88d6 | [
"MIT"
] | null | null | null | examples/my_configs/two.py | davidhyman/override | e34bd3c8676233439de5c002367b3bff5c1b88d6 | [
"MIT"
] | 1 | 2017-07-11T22:03:27.000Z | 2017-07-11T22:03:27.000Z | examples/my_configs/two.py | davidhyman/override | e34bd3c8676233439de5c002367b3bff5c1b88d6 | [
"MIT"
] | null | null | null | from .one import *
fruit = 'banana'
colour = 'orange'
sam['eggs'] = 'plenty'
sam.pop('ham')
| 14.142857 | 23 | 0.585859 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 35 | 0.353535 |
bea8aa6132f2274610cc25a57ec0c74c8765342d | 371 | py | Python | students/K33402/Komarov_Georgy/LAB2/elevennote/src/api/urls.py | aglaya-pill/ITMO_ICT_WebDevelopment_2021-2022 | a63691317a72fb9b29ae537bc3d7766661458c22 | [
"MIT"
] | null | null | null | students/K33402/Komarov_Georgy/LAB2/elevennote/src/api/urls.py | aglaya-pill/ITMO_ICT_WebDevelopment_2021-2022 | a63691317a72fb9b29ae537bc3d7766661458c22 | [
"MIT"
] | null | null | null | students/K33402/Komarov_Georgy/LAB2/elevennote/src/api/urls.py | aglaya-pill/ITMO_ICT_WebDevelopment_2021-2022 | a63691317a72fb9b29ae537bc3d7766661458c22 | [
"MIT"
] | null | null | null | from django.urls import path, include
from rest_framework_jwt.views import obtain_jwt_token
from rest_framework.routers import DefaultRouter
from .views import NoteViewSet
app_name = 'api'
router = DefaultRouter(trailing_slash=False)
router.register('notes', NoteViewSet)
urlpatterns = [
path('jwt-auth/', obtain... | 23.1875 | 53 | 0.77628 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 0.067385 |
beaa8784fc43c71bc8bb5120744ac9a157c4e2a7 | 2,387 | py | Python | PathPlanning/run.py | CandleStein/VAlg | 43aecdd351954d316f132793cf069b70bf2e5cc2 | [
"MIT"
] | null | null | null | PathPlanning/run.py | CandleStein/VAlg | 43aecdd351954d316f132793cf069b70bf2e5cc2 | [
"MIT"
] | null | null | null | PathPlanning/run.py | CandleStein/VAlg | 43aecdd351954d316f132793cf069b70bf2e5cc2 | [
"MIT"
] | 1 | 2020-09-25T18:31:34.000Z | 2020-09-25T18:31:34.000Z | from planning_framework import path
import cv2 as cv
import numpy as np
import argparse
import matplotlib.pyplot as plt
parser = argparse.ArgumentParser(description="Path Planning Visualisation")
parser.add_argument(
"-n",
"--n_heuristic",
default=2,
help="Heuristic for A* Algorithm (default = 2). 0 f... | 26.820225 | 86 | 0.607038 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 447 | 0.187264 |
beaf6a34e9709a7f3a490a80d9b84b4126151d38 | 186 | py | Python | Codeforces/problems/0136/A/136A.py | object-oriented-human/competitive | 9e761020e887d8980a39a64eeaeaa39af0ecd777 | [
"MIT"
] | 2 | 2021-07-27T10:46:47.000Z | 2021-07-27T10:47:57.000Z | Codeforces/problems/0136/A/136A.py | foooop/competitive | 9e761020e887d8980a39a64eeaeaa39af0ecd777 | [
"MIT"
] | null | null | null | Codeforces/problems/0136/A/136A.py | foooop/competitive | 9e761020e887d8980a39a64eeaeaa39af0ecd777 | [
"MIT"
] | null | null | null | n = int(input())
line = list(map(int, input().split()))
l = {}
res = ""
for i, j in enumerate(line):
l[j] = i+1
for k in range(n):
res += str(l[k+1]) + " "
print(res.rstrip()) | 15.5 | 38 | 0.516129 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0.026882 |
beb013240bc0b9610971205973878d44dedde94f | 323 | py | Python | generatey.py | YiLisa/DSCI560-hw2 | 9cf4a40a6e4755ea1b0b68248e553fb4b6b7fdf4 | [
"Apache-2.0"
] | null | null | null | generatey.py | YiLisa/DSCI560-hw2 | 9cf4a40a6e4755ea1b0b68248e553fb4b6b7fdf4 | [
"Apache-2.0"
] | null | null | null | generatey.py | YiLisa/DSCI560-hw2 | 9cf4a40a6e4755ea1b0b68248e553fb4b6b7fdf4 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
def main():
input = pd.read_csv('random_x.csv', header=None)
x=input[0].tolist()
y = []
for n in x:
y.append(3*int(n)+6)
df = pd.DataFrame(y)
df.to_csv('output_y.csv', index=False, header=False)
if __name__ == '__main__':
main()
print('generating y = 3x+6..... | 21.533333 | 56 | 0.582043 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.19195 |
beb0a9e7bb5a51ebb9a999b6f45ac4bb5d9df106 | 1,002 | py | Python | setup.py | burn874/mtg | cef47f6ec0ca110bdcb885ec09d6f5aca517c3b2 | [
"Apache-2.0"
] | null | null | null | setup.py | burn874/mtg | cef47f6ec0ca110bdcb885ec09d6f5aca517c3b2 | [
"Apache-2.0"
] | null | null | null | setup.py | burn874/mtg | cef47f6ec0ca110bdcb885ec09d6f5aca517c3b2 | [
"Apache-2.0"
] | null | null | null | import re
from pkg_resources import parse_requirements
import pathlib
from setuptools import find_packages, setup
README_FILE = 'README.md'
REQUIREMENTS_FILE = 'requirements.txt'
VERSION_FILE = 'mtg/_version.py'
VERSION_REGEXP = r'^__version__ = \'(\d+\.\d+\.\d+)\''
r = re.search(VERSION_REGEXP, open(VERSION_FILE).r... | 31.3125 | 94 | 0.739521 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 307 | 0.306387 |
beb1a4b08f2fc3818a575158bc7a69b7e5f252c7 | 1,399 | py | Python | avilla/core/resource/interface.py | RF-Tar-Railt/Avilla | 0b6eff0e253d4c04a5c82f4f252b6a11b7d81e04 | [
"MIT"
] | null | null | null | avilla/core/resource/interface.py | RF-Tar-Railt/Avilla | 0b6eff0e253d4c04a5c82f4f252b6a11b7d81e04 | [
"MIT"
] | 1 | 2021-12-19T07:43:30.000Z | 2021-12-19T07:43:30.000Z | avilla/core/resource/interface.py | RF-Tar-Railt/Avilla | 0b6eff0e253d4c04a5c82f4f252b6a11b7d81e04 | [
"MIT"
] | null | null | null | from __future__ import annotations
from dataclasses import dataclass
from avilla.core.platform import Base
from avilla.core.resource import Resource, ResourceProvider
@dataclass
class ResourceMatchPrefix:
resource_type: type[Resource]
keypath: str | None = None
platform: Base | None = None
class Resou... | 29.765957 | 97 | 0.647605 | 1,213 | 0.867048 | 0 | 0 | 135 | 0.096497 | 0 | 0 | 0 | 0 |
beb313eb5f64fc657c1686ad77dc2225b87a4889 | 570 | py | Python | viewer_examples/plugins/median_filter.py | atemysemicolon/scikit-image | a48cf5822f9539c6602b9327c18253aed14fa692 | [
"BSD-3-Clause"
] | null | null | null | viewer_examples/plugins/median_filter.py | atemysemicolon/scikit-image | a48cf5822f9539c6602b9327c18253aed14fa692 | [
"BSD-3-Clause"
] | null | null | null | viewer_examples/plugins/median_filter.py | atemysemicolon/scikit-image | a48cf5822f9539c6602b9327c18253aed14fa692 | [
"BSD-3-Clause"
] | null | null | null | from skimage import data
from skimage.filter.rank import median
from skimage.morphology import disk
from skimage.viewer import ImageViewer
from skimage.viewer.widgets import Slider, OKCancelButtons, SaveButtons
from skimage.viewer.plugins.base import Plugin
def median_filter(image, radius):
return median(image, s... | 25.909091 | 71 | 0.784211 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 0.022807 |
beb317bf51c8d955452bb7ade64a00caeb647030 | 8,722 | py | Python | autotest/test_gwf_buy_lak01.py | scharlton2/modflow6 | 83ac72ee3b6f580aaffef6352cf15c1697d3ce66 | [
"CC0-1.0"
] | 3 | 2019-07-10T21:16:57.000Z | 2021-10-08T00:56:20.000Z | autotest/test_gwf_buy_lak01.py | scharlton2/modflow6 | 83ac72ee3b6f580aaffef6352cf15c1697d3ce66 | [
"CC0-1.0"
] | null | null | null | autotest/test_gwf_buy_lak01.py | scharlton2/modflow6 | 83ac72ee3b6f580aaffef6352cf15c1697d3ce66 | [
"CC0-1.0"
] | 3 | 2019-11-28T16:26:50.000Z | 2020-02-05T11:08:37.000Z | # Test the buoyancy package and the variable density flows between the lake
# and the gwf model. This model has 4 layers and a lake incised within it.
# The model is transient and has heads in the aquifer higher than the initial
# stage in the lake. As the model runs, the lake and aquifer equalize and
# should end up... | 29.073333 | 90 | 0.576015 | 0 | 0 | 0 | 0 | 332 | 0.038065 | 0 | 0 | 2,544 | 0.291676 |
beb37d345ad255de414b430caeba23a0fa10d2d1 | 441 | py | Python | lesson-08/roll_dice_v1.0.py | hemiaoio/pylearning | 4b3885ed7177db4e6e03da80dd9ed69719c8d866 | [
"MIT"
] | 1 | 2018-11-11T03:44:02.000Z | 2018-11-11T03:44:02.000Z | lesson-08/roll_dice_v1.0.py | hemiaoio/learn-python | 4b3885ed7177db4e6e03da80dd9ed69719c8d866 | [
"MIT"
] | null | null | null | lesson-08/roll_dice_v1.0.py | hemiaoio/learn-python | 4b3885ed7177db4e6e03da80dd9ed69719c8d866 | [
"MIT"
] | null | null | null | """
功能:模拟掷骰子
版本:1.0
"""
import random
def roll_dice():
roll = random.randint(1, 6)
return roll
def main():
total_times = 100000
result_list = [0] * 6
for i in range(total_times):
roll = roll_dice()
result_list[roll-1] += 1
for i, x in enumerate(result_list):
... | 15.206897 | 63 | 0.569161 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 101 | 0.20911 |
beb557aa11e275e2f9691dee969a012dab3f26db | 759 | py | Python | composer/dataflow-python3/main.py | gxercavins/gcp-snippets | a90e4e9c922370face876aa7c56db610896e1a6f | [
"Apache-2.0"
] | 2 | 2022-02-07T07:53:35.000Z | 2022-02-23T18:46:03.000Z | composer/dataflow-python3/main.py | gxercavins/gcp-snippets | a90e4e9c922370face876aa7c56db610896e1a6f | [
"Apache-2.0"
] | 1 | 2019-10-26T19:03:34.000Z | 2019-10-26T19:03:48.000Z | composer/dataflow-python3/main.py | gxercavins/gcp-snippets | a90e4e9c922370face876aa7c56db610896e1a6f | [
"Apache-2.0"
] | 6 | 2020-03-19T23:58:46.000Z | 2022-02-07T07:53:37.000Z | import argparse
import logging
import apache_beam as beam
from apache_beam.options.pipeline_options import PipelineOptions
from apache_beam.options.pipeline_options import SetupOptions
def run(argv=None, save_main_session=True):
"""Dummy pipeline to test Python3 operator."""
parser = argparse.ArgumentParser()
... | 27.107143 | 78 | 0.777339 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 91 | 0.119895 |
beb680071d94ed8dd93dc11b2e313714df1f9b83 | 1,727 | py | Python | dingtalk/message/conversation.py | kangour/dingtalk-python | b37b9dac3ca3ff9d727308fb120a8fd05e11eaa5 | [
"Apache-2.0"
] | 88 | 2017-12-28T05:23:15.000Z | 2021-12-20T13:44:18.000Z | dingtalk/message/conversation.py | niulinlnc/dingtalk-python | c4209658f88344e8f0890137ed7c887c8b740a6c | [
"Apache-2.0"
] | 8 | 2018-04-28T05:41:49.000Z | 2021-06-01T21:51:11.000Z | dingtalk/message/conversation.py | niulinlnc/dingtalk-python | c4209658f88344e8f0890137ed7c887c8b740a6c | [
"Apache-2.0"
] | 43 | 2017-12-07T09:43:48.000Z | 2021-12-03T01:19:52.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2017/11/30 下午3:02
# @Author : Matrix
# @Github : https://github.com/blackmatrix7/
# @Blog : http://www.cnblogs.com/blackmatrix/
# @File : messages.py
# @Software: PyCharm
import json
from ..foundation import *
from json import JSONDecodeError
__author__ = 'blackm... | 31.981481 | 120 | 0.70469 | 0 | 0 | 0 | 0 | 1,337 | 0.745678 | 0 | 0 | 676 | 0.377022 |
beb69b31ba90004b6f8731fea0065e0f64e36216 | 1,412 | py | Python | backend/garpix_page/setup.py | griviala/garpix_page | 55f1d9bc6d1de29d18e15369bebcbef18811b5a4 | [
"MIT"
] | null | null | null | backend/garpix_page/setup.py | griviala/garpix_page | 55f1d9bc6d1de29d18e15369bebcbef18811b5a4 | [
"MIT"
] | null | null | null | backend/garpix_page/setup.py | griviala/garpix_page | 55f1d9bc6d1de29d18e15369bebcbef18811b5a4 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
from os import path
here = path.join(path.abspath(path.dirname(__file__)), 'garpix_page')
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='garpix_page',
version='2.23.0',
description='',
long_desc... | 32.090909 | 69 | 0.607649 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 736 | 0.521246 |
beb76b3debe06f273a8ef3ec32c53943cd031a3b | 20,225 | py | Python | .kodi/addons/plugin.video.p2p-streams/resources/core/livestreams.py | C6SUMMER/allinclusive-kodi-pi | 8baf247c79526849c640c6e56ca57a708a65bd11 | [
"Apache-2.0"
] | null | null | null | .kodi/addons/plugin.video.p2p-streams/resources/core/livestreams.py | C6SUMMER/allinclusive-kodi-pi | 8baf247c79526849c640c6e56ca57a708a65bd11 | [
"Apache-2.0"
] | null | null | null | .kodi/addons/plugin.video.p2p-streams/resources/core/livestreams.py | C6SUMMER/allinclusive-kodi-pi | 8baf247c79526849c640c6e56ca57a708a65bd11 | [
"Apache-2.0"
] | 2 | 2018-04-17T17:34:39.000Z | 2020-07-26T03:43:33.000Z | # -*- coding: utf-8 -*-
""" p2p-streams (c) 2014 enen92 fightnight
This file contains the livestream addon engine. It is mostly based on divingmule work on livestreams addon!
Functions:
xml_lists_menu() -> main menu for the xml list category
addlista() -> add a new list. It'll ask for local or rem... | 38.745211 | 303 | 0.514907 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,037 | 0.199604 |
beb77481d7d9ef64134079c15cf78aedfbcf66f2 | 187 | py | Python | RainIt/rain_it/ric/Procedure.py | luisgepeto/RainItPi | 47cb7228e9c584c3c4489ebc78abf6de2096b770 | [
"MIT"
] | null | null | null | RainIt/rain_it/ric/Procedure.py | luisgepeto/RainItPi | 47cb7228e9c584c3c4489ebc78abf6de2096b770 | [
"MIT"
] | null | null | null | RainIt/rain_it/ric/Procedure.py | luisgepeto/RainItPi | 47cb7228e9c584c3c4489ebc78abf6de2096b770 | [
"MIT"
] | null | null | null | from ric.RainItComposite import RainItComposite
class Procedure(RainItComposite):
def __init__(self):
super().__init__()
def get_pickle_form(self):
return self
| 18.7 | 47 | 0.705882 | 136 | 0.727273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
beb861661de128962032b82c144ceaca4b7cc85f | 81 | py | Python | 1067.py | FahimFBA/URI-Problem-Solve | d718a95e5a873dffbce19d850998e8917ec87ebb | [
"Apache-2.0"
] | 3 | 2020-11-25T19:05:31.000Z | 2021-03-29T07:29:36.000Z | 1067.py | FahimFBA/URI-Problem-Solve | d718a95e5a873dffbce19d850998e8917ec87ebb | [
"Apache-2.0"
] | null | null | null | 1067.py | FahimFBA/URI-Problem-Solve | d718a95e5a873dffbce19d850998e8917ec87ebb | [
"Apache-2.0"
] | null | null | null | valor = int(input())
for i in range(valor+1):
if(i%2 != 0):
print(i) | 16.2 | 24 | 0.506173 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
beb987a1f2b8198bf13096fe552301ac5d99117d | 889 | py | Python | api-reference-examples/python/te-tag-query/api-example-update.py | b-bold/ThreatExchange | 6f8d0dc803faccf576c9398569bb52d54a4f9a87 | [
"BSD-3-Clause"
] | 997 | 2015-03-13T18:04:03.000Z | 2022-03-30T12:09:10.000Z | api-reference-examples/python/te-tag-query/api-example-update.py | b-bold/ThreatExchange | 6f8d0dc803faccf576c9398569bb52d54a4f9a87 | [
"BSD-3-Clause"
] | 444 | 2015-03-26T17:28:49.000Z | 2022-03-28T19:34:05.000Z | api-reference-examples/python/te-tag-query/api-example-update.py | b-bold/ThreatExchange | 6f8d0dc803faccf576c9398569bb52d54a4f9a87 | [
"BSD-3-Clause"
] | 294 | 2015-03-13T22:19:43.000Z | 2022-03-30T08:42:45.000Z | #!/usr/bin/env python
# ================================================================
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
# ================================================================
import sys
import json
import TE
TE.Net.setAppTokenFromEnvName("TX_ACCESS_TOKEN")
postPar... | 26.147059 | 86 | 0.620922 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 352 | 0.395951 |
beb9a541895990f03cef5c41fda543323a1a2725 | 12,362 | py | Python | loaner/web_app/backend/api/shelf_api_test.py | Bottom-Feeders/GrabNGO | 5a467362e423700a5a7276a7fa9a47040033cfcf | [
"Apache-2.0"
] | null | null | null | loaner/web_app/backend/api/shelf_api_test.py | Bottom-Feeders/GrabNGO | 5a467362e423700a5a7276a7fa9a47040033cfcf | [
"Apache-2.0"
] | null | null | null | loaner/web_app/backend/api/shelf_api_test.py | Bottom-Feeders/GrabNGO | 5a467362e423700a5a7276a7fa9a47040033cfcf | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 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 a... | 41.905085 | 86 | 0.729494 | 10,963 | 0.886831 | 0 | 0 | 4,270 | 0.345413 | 0 | 0 | 1,883 | 0.152322 |
beb9ee31926225eb2b3cd87871300007116d1d11 | 2,177 | py | Python | app/views/main.py | ArmandDS/ai_bert_resumes | 743f37049bbca67bcbbaf21a2ffecf0d093351df | [
"MIT"
] | 1 | 2020-02-28T12:17:38.000Z | 2020-02-28T12:17:38.000Z | app/views/main.py | ArmandDS/ai_bert_resumes | 743f37049bbca67bcbbaf21a2ffecf0d093351df | [
"MIT"
] | 1 | 2021-06-02T00:54:48.000Z | 2021-06-02T00:54:48.000Z | app/views/main.py | ArmandDS/ai_bert_resumes | 743f37049bbca67bcbbaf21a2ffecf0d093351df | [
"MIT"
] | null | null | null | from flask import render_template, jsonify, Flask, redirect, url_for, request
from app import app
import random
import os
# import tensorflow as tf
# import numpy as np
# import sys
# import spacy
# nlp = spacy.load('en')
# sys.path.insert(0, "/content/bert_experimental")
# from bert_experimental.finetuning.text_pre... | 33.492308 | 117 | 0.686266 | 0 | 0 | 0 | 0 | 1,134 | 0.5209 | 0 | 0 | 1,255 | 0.576481 |
bebb042aa5530a31d011f0dddb5b720502bac701 | 11,710 | py | Python | ahrs/filters/complementary.py | jaluebbe/ahrs | 4b4a33b1006e0d455a71ac8379a2697202361758 | [
"MIT"
] | null | null | null | ahrs/filters/complementary.py | jaluebbe/ahrs | 4b4a33b1006e0d455a71ac8379a2697202361758 | [
"MIT"
] | null | null | null | ahrs/filters/complementary.py | jaluebbe/ahrs | 4b4a33b1006e0d455a71ac8379a2697202361758 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Complementary Filter
====================
Attitude quaternion obtained with gyroscope and accelerometer-magnetometer
measurements, via complementary filter.
First, the current orientation is estimated at time :math:`t`, from a previous
orientation at time :math:`t-1`, and a given ... | 41.232394 | 219 | 0.566695 | 6,217 | 0.530914 | 0 | 0 | 0 | 0 | 0 | 0 | 9,159 | 0.782152 |
bebb3991fe53855d056c3141b393c1defb50e7e5 | 4,197 | py | Python | aliyun-python-sdk-ehpc/aliyunsdkehpc/request/v20180412/EditJobTemplateRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-ehpc/aliyunsdkehpc/request/v20180412/EditJobTemplateRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-ehpc/aliyunsdkehpc/request/v20180412/EditJobTemplateRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 29.978571 | 74 | 0.751013 | 3,310 | 0.788659 | 0 | 0 | 0 | 0 | 0 | 0 | 1,257 | 0.2995 |
bebb7eff935771339795abf6b86ab3ed10b32cc3 | 3,550 | py | Python | tests/common/models/test_execution.py | angry-tony/ceph-lcm-decapod | 535944d3ee384c3a7c4af82f74041b0a7792433f | [
"Apache-2.0"
] | 41 | 2016-11-03T16:40:17.000Z | 2019-05-23T08:39:17.000Z | tests/common/models/test_execution.py | Mirantis/ceph-lcm | fad9bad0b94f2ef608362953583b10a54a841d24 | [
"Apache-2.0"
] | 30 | 2016-10-14T10:54:46.000Z | 2017-10-20T15:58:01.000Z | tests/common/models/test_execution.py | angry-tony/ceph-lcm-decapod | 535944d3ee384c3a7c4af82f74041b0a7792433f | [
"Apache-2.0"
] | 28 | 2016-09-17T01:17:36.000Z | 2019-07-05T03:32:54.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2016 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 33.809524 | 77 | 0.719155 | 0 | 0 | 0 | 0 | 1,200 | 0.338028 | 0 | 0 | 932 | 0.262535 |
bebc4c58538a85c2ad00b34ebacde9538e3d0d9b | 1,613 | py | Python | board/models.py | Fahreeve/TaskManager | 7f0a16312b43867270eaade1fe153c07abc2c10e | [
"MIT"
] | null | null | null | board/models.py | Fahreeve/TaskManager | 7f0a16312b43867270eaade1fe153c07abc2c10e | [
"MIT"
] | null | null | null | board/models.py | Fahreeve/TaskManager | 7f0a16312b43867270eaade1fe153c07abc2c10e | [
"MIT"
] | 1 | 2020-09-15T09:15:13.000Z | 2020-09-15T09:15:13.000Z | from django.contrib.auth.models import User
from django.core.validators import MaxValueValidator, MinValueValidator
from django.db import models
from django.utils.translation import ugettext_lazy as _
class Task(models.Model):
CLOSE = 'cl'
CANCEL = 'ca'
LATER = 'la'
UNDEFINED = 'un'
CHOICES = (
... | 37.511628 | 118 | 0.695598 | 1,549 | 0.882118 | 0 | 0 | 203 | 0.115604 | 0 | 0 | 360 | 0.205011 |
bebe436d87bb3f3a76cbb71e91dc6e70bb5b2e46 | 475 | py | Python | test/test_hex_line.py | bicobus/Hexy | e75d58e66546c278fb648af85e3f9dae53127826 | [
"MIT"
] | 72 | 2017-08-30T03:02:51.000Z | 2022-03-11T23:15:15.000Z | test/test_hex_line.py | bicobus/Hexy | e75d58e66546c278fb648af85e3f9dae53127826 | [
"MIT"
] | 10 | 2019-03-14T08:04:33.000Z | 2021-08-10T09:36:45.000Z | test/test_hex_line.py | bicobus/Hexy | e75d58e66546c278fb648af85e3f9dae53127826 | [
"MIT"
] | 15 | 2017-11-08T05:37:06.000Z | 2021-08-05T19:16:48.000Z | import numpy as np
import hexy as hx
def test_get_hex_line():
expected = [
[-3, 3, 0],
[-2, 2, 0],
[-1, 2, -1],
[0, 2, -2],
[1, 1, -2],
]
start = np.array([-3, 3, 0])
end = np.array([1, 1, -2])
print(hx.get_hex_line(start, end))
... | 21.590909 | 38 | 0.471579 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.021053 |
bebe5670df71295bc98ec96c4bde4a3c31d4fb66 | 6,747 | py | Python | wofry/propagator/propagators2D/integral.py | PaNOSC-ViNYL/wofry | 779b5a738ee7738e959a58aafe01e7e49b03894a | [
"MIT"
] | null | null | null | wofry/propagator/propagators2D/integral.py | PaNOSC-ViNYL/wofry | 779b5a738ee7738e959a58aafe01e7e49b03894a | [
"MIT"
] | 1 | 2021-02-16T12:12:10.000Z | 2021-02-16T12:12:10.000Z | wofryimpl/propagator/propagators2D/integral.py | oasys-kit/wofryimpl | f300b714b038110987783c40d2c3af8dca7e54eb | [
"MIT"
] | null | null | null | # propagate_2D_integral: Simplification of the Kirchhoff-Fresnel integral. TODO: Very slow and give some problems
import numpy
from wofry.propagator.wavefront2D.generic_wavefront import GenericWavefront2D
from wofry.propagator.propagator import Propagator2D
# TODO: check resulting amplitude normalization (fft and ... | 49.977778 | 156 | 0.621165 | 6,344 | 0.94027 | 0 | 0 | 4,017 | 0.595376 | 0 | 0 | 1,765 | 0.261598 |
bebf0f2b55c9070eb2aa8dd30568a2e408a3e498 | 842 | py | Python | Problems/Study Plans/Dynamic Programming/Dynamic Programming I/07_delete_and_earn.py | andor2718/LeetCode | 59874f49085818e6da751f1cc26867b31079d35d | [
"BSD-3-Clause"
] | 1 | 2022-01-17T19:51:15.000Z | 2022-01-17T19:51:15.000Z | Problems/Study Plans/Dynamic Programming/Dynamic Programming I/07_delete_and_earn.py | andor2718/LeetCode | 59874f49085818e6da751f1cc26867b31079d35d | [
"BSD-3-Clause"
] | null | null | null | Problems/Study Plans/Dynamic Programming/Dynamic Programming I/07_delete_and_earn.py | andor2718/LeetCode | 59874f49085818e6da751f1cc26867b31079d35d | [
"BSD-3-Clause"
] | null | null | null | # https://leetcode.com/problems/delete-and-earn/
class Solution:
def deleteAndEarn(self, nums: list[int]) -> int:
num_profits = dict()
for num in nums:
num_profits[num] = num_profits.get(num, 0) + num
sorted_nums = sorted(num_profits.keys())
second_last_profit = 0
... | 42.1 | 76 | 0.609264 | 791 | 0.93943 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 0.057007 |
bebf8ceeebe9e29c2c913232279dc6462e901f90 | 334 | py | Python | Desafio051.py | GabrielSanchesRosa/Python | 3a129e27e076b2a91af03d68ede50b9c45c50217 | [
"MIT"
] | null | null | null | Desafio051.py | GabrielSanchesRosa/Python | 3a129e27e076b2a91af03d68ede50b9c45c50217 | [
"MIT"
] | null | null | null | Desafio051.py | GabrielSanchesRosa/Python | 3a129e27e076b2a91af03d68ede50b9c45c50217 | [
"MIT"
] | null | null | null | # Desenvolva um programa que leia o primeiro termo e a razão de uma PA. No final mostre, os 10 primeiros termos dessa prograssão.
primeiro = int(input("Primeiro Termo: "))
razao = int(input("Razão: "))
decimo = primeiro + (10 - 1) * razao
for c in range(primeiro, decimo + razao, razao):
print(f"{c}", end=" -> ")
pr... | 33.4 | 129 | 0.679641 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 179 | 0.531157 |
bebfe36afc8a169020e2b3f2d6602873133b4e74 | 884 | py | Python | tiddlyweb/filters/limit.py | tiddlyweb/tiddlyweb | 376bcad280e24d2de4d74883dc4d8369abcb2c28 | [
"BSD-3-Clause"
] | 57 | 2015-02-01T21:03:34.000Z | 2021-12-25T12:02:31.000Z | tiddlyweb/filters/limit.py | tiddlyweb/tiddlyweb | 376bcad280e24d2de4d74883dc4d8369abcb2c28 | [
"BSD-3-Clause"
] | 6 | 2016-02-05T11:43:32.000Z | 2019-09-05T13:38:49.000Z | tiddlyweb/filters/limit.py | tiddlyweb/tiddlyweb | 376bcad280e24d2de4d74883dc4d8369abcb2c28 | [
"BSD-3-Clause"
] | 17 | 2015-05-12T08:53:23.000Z | 2021-12-21T15:56:30.000Z | """
A :py:mod:`filter <tiddlyweb.filters>` type to limit a group of entities
using a syntax similar to SQL Limit::
limit=<index>,<count>
limit=<count>
"""
import itertools
def limit_parse(count='0'):
"""
Parse the argument of a ``limit`` :py:mod:`filter <tiddlyweb.filters>`
for a count and index... | 23.891892 | 78 | 0.64819 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 473 | 0.535068 |
bec160209ec5f54fda5f5e3628b149076a57302b | 7,019 | py | Python | pytorch_keras_converter/API.py | sonibla/pytorch_keras_converter | 21925b67b6eb3cbbfa8eb6d33f682d57dafd357d | [
"MIT"
] | 17 | 2019-10-01T14:14:18.000Z | 2021-04-25T13:32:24.000Z | pytorch_keras_converter/API.py | sonibla/pytorch_keras_converter | 21925b67b6eb3cbbfa8eb6d33f682d57dafd357d | [
"MIT"
] | null | null | null | pytorch_keras_converter/API.py | sonibla/pytorch_keras_converter | 21925b67b6eb3cbbfa8eb6d33f682d57dafd357d | [
"MIT"
] | 2 | 2019-10-01T14:02:43.000Z | 2019-10-01T14:14:19.000Z | """
Simple API to convert models between PyTorch and Keras
(Conversions from Keras to PyTorch aren't implemented)
"""
from . import utility
from . import tests
from . import io_utils as utils
import tensorflow
def convert(model,
input_shape,
weights=True,
quiet=True,
i... | 33.42381 | 78 | 0.581992 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,288 | 0.610913 |
bec1a22fa74c5c4f594a0551d336d70522ed93f7 | 1,734 | py | Python | examples/enable_notifications.py | kjwill/bleak | 7e0fdae6c0f6a78713e5984c2840666e0c38c3f3 | [
"MIT"
] | null | null | null | examples/enable_notifications.py | kjwill/bleak | 7e0fdae6c0f6a78713e5984c2840666e0c38c3f3 | [
"MIT"
] | null | null | null | examples/enable_notifications.py | kjwill/bleak | 7e0fdae6c0f6a78713e5984c2840666e0c38c3f3 | [
"MIT"
] | 1 | 2021-09-15T18:53:58.000Z | 2021-09-15T18:53:58.000Z | # -*- coding: utf-8 -*-
"""
Notifications
-------------
Example showing how to add notifications to a characteristic and handle the responses.
Updated on 2019-07-03 by hbldh <henrik.blidh@gmail.com>
"""
import sys
import logging
import asyncio
import platform
from bleak import BleakClient
from bleak import _logger... | 27.52381 | 136 | 0.689158 | 0 | 0 | 0 | 0 | 0 | 0 | 548 | 0.316032 | 695 | 0.400807 |
bec22a0f8cc88b9839de8e482052c5fe36989f8a | 163 | py | Python | pyrules/storages/base.py | miraculixx/pyrules | b10d1d5e74052fa1db93cc9b459ac9057a9eb502 | [
"MIT"
] | 17 | 2015-07-20T03:11:04.000Z | 2021-05-02T03:34:05.000Z | pyrules/storages/base.py | miraculixx/pyrules | b10d1d5e74052fa1db93cc9b459ac9057a9eb502 | [
"MIT"
] | 20 | 2015-04-10T10:11:44.000Z | 2020-09-10T03:51:47.000Z | pyrules/storages/base.py | miraculixx/pyrules | b10d1d5e74052fa1db93cc9b459ac9057a9eb502 | [
"MIT"
] | 8 | 2017-04-03T10:46:16.000Z | 2021-11-20T05:46:02.000Z | class BaseStorage(object):
def get_rule(self, name):
raise NotImplementedError()
def get_ruleset(self, name):
raise NotImplementedError()
| 23.285714 | 35 | 0.680982 | 162 | 0.993865 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bec28b12230a8be61261eca269a7854ba31ae9da | 820 | py | Python | src/15 listener_and_backdoor/listener_2.py | raminjafary/ethical-hacking | e76f74f4f23e1d8cb7f433d19871dcf966507dfc | [
"MIT"
] | null | null | null | src/15 listener_and_backdoor/listener_2.py | raminjafary/ethical-hacking | e76f74f4f23e1d8cb7f433d19871dcf966507dfc | [
"MIT"
] | null | null | null | src/15 listener_and_backdoor/listener_2.py | raminjafary/ethical-hacking | e76f74f4f23e1d8cb7f433d19871dcf966507dfc | [
"MIT"
] | null | null | null | #!/usr/bin/python
import socket
class Listener:
def __init__(self,ip,port):
listener = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
listener.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1)
#options to reuse sockets
#listener.bind(("localhost",1234))
listener.bind((ip,port))
listener.listen(0)
... | 25.625 | 70 | 0.734146 | 725 | 0.884146 | 0 | 0 | 0 | 0 | 0 | 0 | 225 | 0.27439 |
bec37dd307106b82f4f0bcaf14227eb2f2a4ba93 | 1,974 | py | Python | dialogflow/history2xls.py | ray-hrst/temi-tools | 8efb1e1af93a41bd98fe0ee8c1fd6fb44e788341 | [
"MIT"
] | 1 | 2020-06-04T19:30:57.000Z | 2020-06-04T19:30:57.000Z | dialogflow/history2xls.py | ray-hrst/temi-tools | 8efb1e1af93a41bd98fe0ee8c1fd6fb44e788341 | [
"MIT"
] | 1 | 2020-01-14T04:16:12.000Z | 2020-01-14T04:16:12.000Z | dialogflow/history2xls.py | ray-hrst/temi-tools | 8efb1e1af93a41bd98fe0ee8c1fd6fb44e788341 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" Convert Dialogflow history to spreadsheet
User must manually copy the history from the browser and save this in a text file.
This reads the textfile, parses the data, and saves it to a spreadsheet.
Example training sample:
USER
サワディカ
Nov 4, 11:19 PM
AGENT
No matc... | 27.802817 | 82 | 0.609422 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 693 | 0.349294 |
bec393e2a78f7bd8032716c650f164a7178aab68 | 25,176 | py | Python | recognition/views.py | usathe71-u/Attendance-System-Face-Recognition | c73f660a6089e8ca9dd5c473efcf2bc78f13a207 | [
"Apache-2.0"
] | 3 | 2021-05-31T21:11:38.000Z | 2021-07-22T18:29:47.000Z | recognition/views.py | usathe71-u/Attendance-System-Face-Recognition | c73f660a6089e8ca9dd5c473efcf2bc78f13a207 | [
"Apache-2.0"
] | null | null | null | recognition/views.py | usathe71-u/Attendance-System-Face-Recognition | c73f660a6089e8ca9dd5c473efcf2bc78f13a207 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render,redirect
from .forms import usernameForm,DateForm,UsernameAndDateForm, DateForm_2
from django.contrib import messages
from django.contrib.auth.models import User
import cv2
import dlib
import imutils
from imutils import face_utils
from imutils.video import VideoStream
from imutils.fa... | 24.97619 | 167 | 0.722196 | 0 | 0 | 0 | 0 | 6,494 | 0.257944 | 0 | 0 | 6,139 | 0.243843 |
bec698afd2c5801e7a05fe6be1339638668af844 | 856 | py | Python | 2018/05.py | GillesArcas/Advent_of_Code | 1f57eb1686875df2684b0d56916b1d20724e9fb9 | [
"MIT"
] | null | null | null | 2018/05.py | GillesArcas/Advent_of_Code | 1f57eb1686875df2684b0d56916b1d20724e9fb9 | [
"MIT"
] | null | null | null | 2018/05.py | GillesArcas/Advent_of_Code | 1f57eb1686875df2684b0d56916b1d20724e9fb9 | [
"MIT"
] | null | null | null | import re
import string
DATA = '05.txt'
def react(polymer):
pairs = '|'.join([a + b + '|' + b + a for a, b in zip(string.ascii_lowercase, string.ascii_uppercase)])
length = len(polymer)
while 1:
polymer = re.sub(pairs, '', polymer)
if len(polymer) == length:
retu... | 21.948718 | 108 | 0.53972 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.030374 |
bec6becd26fa525cff31dffaad9d3ab5e8f46f15 | 11,873 | py | Python | lib/fbuild/builders/__init__.py | felix-lang/fbuild | 9595fbfd6d3ceece31fda2f96c35d4a241f0129b | [
"PSF-2.0",
"BSD-2-Clause"
] | 40 | 2015-02-07T00:44:12.000Z | 2021-04-02T13:41:08.000Z | lib/fbuild/builders/__init__.py | felix-lang/fbuild | 9595fbfd6d3ceece31fda2f96c35d4a241f0129b | [
"PSF-2.0",
"BSD-2-Clause"
] | 30 | 2015-02-06T17:45:15.000Z | 2019-01-10T16:34:29.000Z | lib/fbuild/builders/__init__.py | felix-lang/fbuild | 9595fbfd6d3ceece31fda2f96c35d4a241f0129b | [
"PSF-2.0",
"BSD-2-Clause"
] | 3 | 2015-09-03T06:38:02.000Z | 2019-10-24T14:26:57.000Z | import abc
import contextlib
import os
import sys
from functools import partial
from itertools import chain
import fbuild
import fbuild.db
import fbuild.path
import fbuild.temp
from . import platform
# ------------------------------------------------------------------------------
class MissingProgram(fbuild.ConfigFa... | 35.762048 | 80 | 0.553609 | 7,575 | 0.638002 | 783 | 0.065948 | 6,949 | 0.585278 | 0 | 0 | 2,359 | 0.198686 |
bec79a34dea2c5eb7b1cdd952dbf003070a952c4 | 1,746 | py | Python | WebServer.py | i3uex/CompareML | 3d53d58117507db11ad08ca0b1c883ec0997840e | [
"MIT"
] | null | null | null | WebServer.py | i3uex/CompareML | 3d53d58117507db11ad08ca0b1c883ec0997840e | [
"MIT"
] | null | null | null | WebServer.py | i3uex/CompareML | 3d53d58117507db11ad08ca0b1c883ec0997840e | [
"MIT"
] | null | null | null | import json
import cherrypy
import engine
class WebServer(object):
@cherrypy.expose
def index(self):
return open('public/index.html', encoding='utf-8')
@cherrypy.expose
class GetOptionsService(object):
@cherrypy.tools.accept(media='text/plain')
def GET(self):
return json.dumps({
... | 30.103448 | 120 | 0.611684 | 1,613 | 0.923826 | 0 | 0 | 1,662 | 0.95189 | 0 | 0 | 576 | 0.329897 |
bec81857d7e4af0801337540f4b978497c5536f9 | 1,897 | py | Python | tuprolog/solve/exception/error/existence/__init__.py | DavideEva/2ppy | 55609415102f8116165a42c8e33e029c4906e160 | [
"Apache-2.0"
] | 1 | 2021-08-07T06:29:28.000Z | 2021-08-07T06:29:28.000Z | tuprolog/solve/exception/error/existence/__init__.py | DavideEva/2ppy | 55609415102f8116165a42c8e33e029c4906e160 | [
"Apache-2.0"
] | 14 | 2021-09-16T13:25:12.000Z | 2022-01-03T10:12:22.000Z | tuprolog/solve/exception/error/existence/__init__.py | DavideEva/2ppy | 55609415102f8116165a42c8e33e029c4906e160 | [
"Apache-2.0"
] | 1 | 2021-12-22T00:25:32.000Z | 2021-12-22T00:25:32.000Z | from typing import Union
from tuprolog import logger
# noinspection PyUnresolvedReferences
import jpype.imports
# noinspection PyUnresolvedReferences
import it.unibo.tuprolog.solve.exception.error as errors
from tuprolog.core import Term, Atom
from tuprolog.solve import ExecutionContext, Signature
ExistenceError = err... | 24.960526 | 96 | 0.765946 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 156 | 0.082235 |
bec831a08a3c7355e5ebc6786562ec7da94bccbd | 2,421 | py | Python | cptk/core/fetcher.py | RealA10N/cptk | e500d948e91bb70661adc3c2539b149704c734a1 | [
"Apache-2.0"
] | 5 | 2021-12-25T01:49:45.000Z | 2022-03-27T10:30:14.000Z | cptk/core/fetcher.py | RealA10N/cptk | e500d948e91bb70661adc3c2539b149704c734a1 | [
"Apache-2.0"
] | 39 | 2021-12-24T16:35:07.000Z | 2022-03-18T23:15:14.000Z | cptk/core/fetcher.py | RealA10N/cptk | e500d948e91bb70661adc3c2539b149704c734a1 | [
"Apache-2.0"
] | 2 | 2022-01-12T19:13:20.000Z | 2022-01-12T19:32:05.000Z | from __future__ import annotations
from typing import TYPE_CHECKING
import pkg_resources
from bs4 import BeautifulSoup
from requests import session
from cptk.scrape import PageInfo
from cptk.scrape import Website
from cptk.utils import cptkException
if TYPE_CHECKING:
from cptk.scrape import Problem
class Inva... | 31.441558 | 79 | 0.646014 | 2,104 | 0.869062 | 0 | 0 | 0 | 0 | 0 | 0 | 753 | 0.311029 |
bec8b40804691cfab7d99feee2707b808f11aaed | 15,006 | py | Python | machine_learning/deep_reinforcement_learning_grasping/drlgrasp/drlgrasp/pybullet_envs/kuka_reach_with_visual.py | Hinson-A/guyueclass | e59129526729542dccefa6c7232378a00dc0175a | [
"Apache-2.0"
] | 227 | 2021-01-20T05:34:32.000Z | 2022-03-29T12:43:05.000Z | machine_learning/deep_reinforcement_learning_grasping/drlgrasp/drlgrasp/pybullet_envs/kuka_reach_with_visual.py | passYYYY/guyueclass | 2054ccec2f5e6c002727a5561b494a1046484504 | [
"Apache-2.0"
] | 1 | 2021-04-22T05:56:00.000Z | 2021-05-26T06:00:17.000Z | machine_learning/deep_reinforcement_learning_grasping/drlgrasp/drlgrasp/pybullet_envs/kuka_reach_with_visual.py | passYYYY/guyueclass | 2054ccec2f5e6c002727a5561b494a1046484504 | [
"Apache-2.0"
] | 239 | 2021-01-28T02:59:53.000Z | 2022-03-29T08:02:17.000Z | import pybullet as p
import pybullet_data
import gym
from gym import spaces
from gym.utils import seeding
import numpy as np
from math import sqrt
import random
import time
import math
import cv2
import torch
import os
def random_crop(imgs, out):
"""
args:
imgs: shape (B,C,H,W)
... | 36.159036 | 121 | 0.53212 | 14,041 | 0.912583 | 0 | 0 | 0 | 0 | 0 | 0 | 2,281 | 0.148252 |
bec8bbb28dfc0d99421b26ef588fd15b586c1fe9 | 509 | py | Python | bucket_4C/python-Pillow/patches/patch-setup.py | jrmarino/ravensource | 91d599fd1f2af55270258d15e72c62774f36033e | [
"FTL"
] | 17 | 2017-04-22T21:53:52.000Z | 2021-01-21T16:57:55.000Z | bucket_4C/python-Pillow/patches/patch-setup.py | jrmarino/ravensource | 91d599fd1f2af55270258d15e72c62774f36033e | [
"FTL"
] | 186 | 2017-09-12T20:46:52.000Z | 2021-11-27T18:15:14.000Z | bucket_4C/python-Pillow/patches/patch-setup.py | jrmarino/ravensource | 91d599fd1f2af55270258d15e72c62774f36033e | [
"FTL"
] | 74 | 2017-09-06T14:48:01.000Z | 2021-08-28T02:48:27.000Z | --- setup.py.orig 2019-07-02 19:13:39 UTC
+++ setup.py
@@ -465,9 +465,7 @@ class pil_build_ext(build_ext):
_add_directory(include_dirs, "/usr/X11/include")
elif (
- sys.platform.startswith("linux")
- or sys.platform.startswith("gnu")
- or sys.platform.startsw... | 36.357143 | 65 | 0.579568 | 97 | 0.19057 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 0.094303 |
bec8c0835477d8b4651705098efe6f5b0368b832 | 6,581 | py | Python | tests/ut/cpp/python_input/gtest_input/pre_activate/ir_fusion_test.py | GeekHee/mindspore | 896b8e5165dd0a900ed5a39e0fb23525524bf8b0 | [
"Apache-2.0"
] | null | null | null | tests/ut/cpp/python_input/gtest_input/pre_activate/ir_fusion_test.py | GeekHee/mindspore | 896b8e5165dd0a900ed5a39e0fb23525524bf8b0 | [
"Apache-2.0"
] | null | null | null | tests/ut/cpp/python_input/gtest_input/pre_activate/ir_fusion_test.py | GeekHee/mindspore | 896b8e5165dd0a900ed5a39e0fb23525524bf8b0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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... | 33.576531 | 110 | 0.647166 | 196 | 0.029783 | 0 | 0 | 4,348 | 0.66069 | 0 | 0 | 924 | 0.140404 |
bec9227899c9767af55354a2d39773951766ff07 | 486 | py | Python | tdx/abc.py | TrainerDex/DiscordBot | 7e7bb20c5ac76bed236a7458c31017b8ddd8b8be | [
"Apache-2.0"
] | 2 | 2020-09-18T12:43:48.000Z | 2020-11-10T00:34:15.000Z | tdx/abc.py | TrainerDex/DiscordBot | 7e7bb20c5ac76bed236a7458c31017b8ddd8b8be | [
"Apache-2.0"
] | 59 | 2020-07-24T00:04:53.000Z | 2022-03-29T11:15:48.000Z | tdx/abc.py | TrainerDex/DiscordBot | 7e7bb20c5ac76bed236a7458c31017b8ddd8b8be | [
"Apache-2.0"
] | 1 | 2022-01-12T12:33:15.000Z | 2022-01-12T12:33:15.000Z | from abc import ABC
from typing import Dict
from redbot.core import Config
from redbot.core.bot import Red
from trainerdex.client import Client
class MixinMeta(ABC):
"""
Base class for well behaved type hint detection with composite class.
Basically, to keep developers sane when not all attributes are d... | 23.142857 | 89 | 0.699588 | 338 | 0.695473 | 0 | 0 | 0 | 0 | 0 | 0 | 176 | 0.36214 |
fe1f4c025bf53ebda91717d8cd83c5c619dbfc64 | 7,044 | py | Python | app.py | PolinaRomanchenko/Victorious_Secret_DSCI_532 | e83bc19169a1736618ac55f2ade40741583089fd | [
"MIT"
] | null | null | null | app.py | PolinaRomanchenko/Victorious_Secret_DSCI_532 | e83bc19169a1736618ac55f2ade40741583089fd | [
"MIT"
] | null | null | null | app.py | PolinaRomanchenko/Victorious_Secret_DSCI_532 | e83bc19169a1736618ac55f2ade40741583089fd | [
"MIT"
] | null | null | null | import dash
import dash_core_components as dcc
import dash_html_components as html
import dash_bootstrap_components as dbc
import pandas as pd
import numpy as np
import altair as alt
import vega_datasets
alt.data_transformers.enable('default')
alt.data_transformers.disable_max_rows()
app = dash.Dash(__name__, assets_f... | 38.917127 | 203 | 0.534923 | 0 | 0 | 0 | 0 | 423 | 0.060051 | 0 | 0 | 2,693 | 0.382311 |
fe2001122588d2b0248d76d502b21c18d29d729d | 40 | py | Python | catkin_ws/src:/opt/ros/kinetic/lib/python2.7/dist-packages:/home/bala/duckietown/catkin_ws/src:/home/bala/duckietown/catkin_ws/src/lib/python2.7/site-packages/geometry/subspaces/__init__.py | johnson880319/Software | 045894227f359e0a3a3ec5b7a53f8d1ebc06acdd | [
"CC-BY-2.0"
] | null | null | null | catkin_ws/src:/opt/ros/kinetic/lib/python2.7/dist-packages:/home/bala/duckietown/catkin_ws/src:/home/bala/duckietown/catkin_ws/src/lib/python2.7/site-packages/geometry/subspaces/__init__.py | johnson880319/Software | 045894227f359e0a3a3ec5b7a53f8d1ebc06acdd | [
"CC-BY-2.0"
] | null | null | null | catkin_ws/src:/opt/ros/kinetic/lib/python2.7/dist-packages:/home/bala/duckietown/catkin_ws/src:/home/bala/duckietown/catkin_ws/src/lib/python2.7/site-packages/geometry/subspaces/__init__.py | johnson880319/Software | 045894227f359e0a3a3ec5b7a53f8d1ebc06acdd | [
"CC-BY-2.0"
] | null | null | null | # coding=utf-8
from .subspaces import *
| 13.333333 | 24 | 0.725 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.35 |
fe2070ac8557cbd4275cc5e584c79388af700674 | 2,510 | py | Python | detection/contor.py | chika626/chainer_rep | a1d4fd32a8cfcab753269455d08c1918f273388d | [
"MIT"
] | null | null | null | detection/contor.py | chika626/chainer_rep | a1d4fd32a8cfcab753269455d08c1918f273388d | [
"MIT"
] | 7 | 2020-03-13T08:29:46.000Z | 2020-05-27T17:34:14.000Z | detection/contor.py | chika626/chainer_rep | a1d4fd32a8cfcab753269455d08c1918f273388d | [
"MIT"
] | null | null | null | import json
import math
from PIL import Image,ImageDraw
import pandas as pd
import glob
import argparse
import copy
import numpy as np
import matplotlib.pyplot as plt
import pickle
import cv2
from PIL import ImageEnhance
import chainer
from chainer.datasets import ConcatenatedDataset
from chainer.data... | 26.989247 | 72 | 0.640239 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 403 | 0.157792 |
fe2074c1f1219a5f9d1c7d8eeb8c9be145ffb2ea | 5,982 | py | Python | train.py | hjl-yul154/autodeeplab | 1bd8399ac830fcafd506a4207b75e05682d1e260 | [
"MIT"
] | 1 | 2020-07-27T07:08:47.000Z | 2020-07-27T07:08:47.000Z | train.py | hjl-yul154/autodeeplab | 1bd8399ac830fcafd506a4207b75e05682d1e260 | [
"MIT"
] | null | null | null | train.py | hjl-yul154/autodeeplab | 1bd8399ac830fcafd506a4207b75e05682d1e260 | [
"MIT"
] | null | null | null | import os
import pdb
import warnings
import numpy as np
import torch
import torch.nn as nn
import torch.utils.data
import torch.backends.cudnn
import torch.optim as optim
import dataloaders
from utils.utils import AverageMeter
from utils.loss import build_criterion
from utils.metrics import Evaluator
from utils.step_... | 38.844156 | 127 | 0.596122 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 777 | 0.12989 |
fe21c2ef055f99448891893a1c18824fdde9d61e | 1,883 | py | Python | test.py | xxaxdxcxx/miscellaneous-code | cdb88783f39e1b9a89fdb12f7cddfe62619e4357 | [
"MIT"
] | null | null | null | test.py | xxaxdxcxx/miscellaneous-code | cdb88783f39e1b9a89fdb12f7cddfe62619e4357 | [
"MIT"
] | null | null | null | test.py | xxaxdxcxx/miscellaneous-code | cdb88783f39e1b9a89fdb12f7cddfe62619e4357 | [
"MIT"
] | null | null | null | class Solution:
# dictionary keys are tuples, storing results
# structure of the tuple:
# (level, prev_sum, val_to_include)
# value is number of successful tuples
def fourSumCount(self, A, B, C, D, prev_sum=0, level=0, sums={}):
"""
:type A: List[int]
:type B: List[int]
... | 31.383333 | 79 | 0.463622 | 1,636 | 0.868826 | 0 | 0 | 0 | 0 | 0 | 0 | 517 | 0.274562 |
fe21f2c89737b3c4d120cba724974597cb079bc4 | 1,675 | py | Python | src/boot.py | johngtrs/krux | 7b6c6d410e29c16ab5d3c05a5aafab618f13a86f | [
"MIT"
] | null | null | null | src/boot.py | johngtrs/krux | 7b6c6d410e29c16ab5d3c05a5aafab618f13a86f | [
"MIT"
] | null | null | null | src/boot.py | johngtrs/krux | 7b6c6d410e29c16ab5d3c05a5aafab618f13a86f | [
"MIT"
] | null | null | null | # The MIT License (MIT)
# Copyright (c) 2021 Tom J. Sun
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, ... | 32.211538 | 79 | 0.755224 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,217 | 0.726567 |
fe224e1ffb01067a1145784abb7281fb2243b190 | 1,788 | py | Python | smartfields/processors/video.py | suhaibroomy/django-smartfields | e9331dc74f72d0254608526f8816aa4bb8f1fca4 | [
"MIT"
] | null | null | null | smartfields/processors/video.py | suhaibroomy/django-smartfields | e9331dc74f72d0254608526f8816aa4bb8f1fca4 | [
"MIT"
] | null | null | null | smartfields/processors/video.py | suhaibroomy/django-smartfields | e9331dc74f72d0254608526f8816aa4bb8f1fca4 | [
"MIT"
] | null | null | null | import re
import six
from smartfields.processors.base import ExternalFileProcessor
from smartfields.utils import ProcessingError
__all__ = [
'FFMPEGProcessor'
]
class FFMPEGProcessor(ExternalFileProcessor):
duration_re = re.compile(r'Duration: (?P<hours>\d+):(?P<minutes>\d+):(?P<seconds>\d+)')
progress_r... | 39.733333 | 91 | 0.599553 | 1,619 | 0.905481 | 0 | 0 | 0 | 0 | 0 | 0 | 414 | 0.231544 |
fe22b8aac4f7560fc1450a1ab43865faaf7aecdc | 2,192 | py | Python | tests/test_vmtkScripts/test_vmtksurfaceconnectivity.py | ramtingh/vmtk | 4d6f58ce65d73628353ba2b110cbc29a2e7aa7b3 | [
"Apache-2.0"
] | null | null | null | tests/test_vmtkScripts/test_vmtksurfaceconnectivity.py | ramtingh/vmtk | 4d6f58ce65d73628353ba2b110cbc29a2e7aa7b3 | [
"Apache-2.0"
] | null | null | null | tests/test_vmtkScripts/test_vmtksurfaceconnectivity.py | ramtingh/vmtk | 4d6f58ce65d73628353ba2b110cbc29a2e7aa7b3 | [
"Apache-2.0"
] | 1 | 2019-06-18T23:41:11.000Z | 2019-06-18T23:41:11.000Z | ## Program: VMTK
## Language: Python
## Date: January 12, 2018
## Version: 1.4
## Copyright (c) Richard Izzo, Luca Antiga, All rights reserved.
## See LICENSE file for details.
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNES... | 35.354839 | 117 | 0.764599 | 0 | 0 | 0 | 0 | 312 | 0.142336 | 0 | 0 | 691 | 0.315237 |
fe23546882c9babc55f9bce0abdfba0776ff09c5 | 653 | py | Python | sssoon/forms.py | Kingpin-Apps/django-sssoon | 2a44d0d19e70dcd3127f9425c0ed4ba52355a1d2 | [
"BSD-3-Clause"
] | 2 | 2018-04-20T08:28:10.000Z | 2018-05-04T15:32:30.000Z | sssoon/forms.py | KINGH242/django-sssoon | 2a44d0d19e70dcd3127f9425c0ed4ba52355a1d2 | [
"BSD-3-Clause"
] | 2 | 2018-05-16T13:45:14.000Z | 2020-07-29T22:01:37.000Z | sssoon/forms.py | Kingpin-Apps/django-sssoon | 2a44d0d19e70dcd3127f9425c0ed4ba52355a1d2 | [
"BSD-3-Clause"
] | null | null | null | from django import forms
from nocaptcha_recaptcha.fields import NoReCaptchaField
class NewsletterForm(forms.Form):
email = forms.EmailField(label='Email', required=True,
widget=forms.TextInput(attrs={
'id': 'newsletter-email',
... | 40.8125 | 70 | 0.444104 | 570 | 0.872894 | 0 | 0 | 0 | 0 | 0 | 0 | 137 | 0.209801 |
fe242c827a7e391a419864c9504b7e2daf4968d1 | 1,054 | py | Python | simple_run_menu.py | william01110111/simple_run_menu | 804c6bb8d6c63c3a4d4c6d3377601bd44fb0eeea | [
"MIT"
] | null | null | null | simple_run_menu.py | william01110111/simple_run_menu | 804c6bb8d6c63c3a4d4c6d3377601bd44fb0eeea | [
"MIT"
] | null | null | null | simple_run_menu.py | william01110111/simple_run_menu | 804c6bb8d6c63c3a4d4c6d3377601bd44fb0eeea | [
"MIT"
] | null | null | null | #! /bin/python3
# simple run menu
import os
import stat
def is_file_executable(path):
executable = stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH
if not os.path.isfile(path):
return False
st = os.stat(path)
mode = st.st_mode
if not mode & executable:
return False
return True
def get_files_in_dir(directory):
i... | 22.425532 | 83 | 0.685009 | 228 | 0.216319 | 0 | 0 | 79 | 0.074953 | 0 | 0 | 73 | 0.06926 |
fe2476b1a28089e744d395040c690305385ddcb6 | 1,792 | py | Python | mne/io/cnt/tests/test_cnt.py | stevemats/mne-python | 47051833f21bb372d60afc3adbf4305648ac7f69 | [
"BSD-3-Clause"
] | 1,953 | 2015-01-17T20:33:46.000Z | 2022-03-30T04:36:34.000Z | mne/io/cnt/tests/test_cnt.py | LiFeng-SECUC/mne-python | 732bb1f994e64e41a8e95dcc10dc98c22cac95c0 | [
"BSD-3-Clause"
] | 8,490 | 2015-01-01T13:04:18.000Z | 2022-03-31T23:02:08.000Z | mne/io/cnt/tests/test_cnt.py | LiFeng-SECUC/mne-python | 732bb1f994e64e41a8e95dcc10dc98c22cac95c0 | [
"BSD-3-Clause"
] | 1,130 | 2015-01-08T22:39:27.000Z | 2022-03-30T21:44:26.000Z |
# Author: Jaakko Leppakangas <jaeilepp@student.jyu.fi>
# Joan Massich <mailsik@gmail.com>
#
# License: BSD-3-Clause
import os.path as op
import numpy as np
from numpy.testing import assert_array_equal
import pytest
from mne import pick_types
from mne.datasets import testing
from mne.io.tests.test_raw import... | 32 | 74 | 0.65346 | 0 | 0 | 0 | 0 | 1,266 | 0.706473 | 0 | 0 | 488 | 0.272321 |
fe24a27fb5e1b1af1324c59e811661bad02c4101 | 792 | py | Python | parliament_proposal_fetcher.py | Track-your-parliament/track-your-parliament-data | 1ab9d9fe5cf4921e4cc792d0e3db3263557daafd | [
"MIT"
] | null | null | null | parliament_proposal_fetcher.py | Track-your-parliament/track-your-parliament-data | 1ab9d9fe5cf4921e4cc792d0e3db3263557daafd | [
"MIT"
] | null | null | null | parliament_proposal_fetcher.py | Track-your-parliament/track-your-parliament-data | 1ab9d9fe5cf4921e4cc792d0e3db3263557daafd | [
"MIT"
] | null | null | null | import urllib.request, json
import pandas as pd
baseUrl = 'https://avoindata.eduskunta.fi/api/v1/tables/VaskiData'
parameters = 'rows?columnName=Eduskuntatunnus&columnValue=LA%25&perPage=100'
page = 0
df = ''
while True:
print(f'Fetching page number {page}')
with urllib.request.urlopen(f'{baseUrl}/{parameters... | 29.333333 | 94 | 0.641414 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 279 | 0.352273 |
fe2717913fd1b6cb1c949e299c54e281bc41335e | 2,899 | py | Python | examples/Catboost_regression-scorer_usage.py | emaldonadocruz/UTuning | b32207bcbeb80e4c07e098bcbe4d5ce8b3fee778 | [
"BSD-3-Clause"
] | null | null | null | examples/Catboost_regression-scorer_usage.py | emaldonadocruz/UTuning | b32207bcbeb80e4c07e098bcbe4d5ce8b3fee778 | [
"BSD-3-Clause"
] | null | null | null | examples/Catboost_regression-scorer_usage.py | emaldonadocruz/UTuning | b32207bcbeb80e4c07e098bcbe4d5ce8b3fee778 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Sep 20 16:15:37 2021
@author: em42363
"""
# In[1]: Import functions
'''
CatBoost is a high-performance open source library for gradient boosting
on decision trees
'''
from catboost import CatBoostRegressor
from sklearn.model_selection import train_test_split
import pandas a... | 26.354545 | 102 | 0.703001 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,011 | 0.348741 |
fe27a69a39058bf33d488a199887b8c07ffdf22c | 1,683 | py | Python | sujson/_logger.py | PotasnikM/translator-to-suJSON | abb2001c78d431bd2087754666bc896ba0543dfd | [
"MIT"
] | 2 | 2019-07-01T12:45:25.000Z | 2020-06-23T11:48:08.000Z | sujson/_logger.py | PotasnikM/translator-to-suJSON | abb2001c78d431bd2087754666bc896ba0543dfd | [
"MIT"
] | 17 | 2019-04-25T10:46:40.000Z | 2020-11-10T09:28:55.000Z | sujson/_logger.py | PotasnikM/translator-to-suJSON | abb2001c78d431bd2087754666bc896ba0543dfd | [
"MIT"
] | 3 | 2019-06-22T19:51:08.000Z | 2021-02-08T09:17:55.000Z | import logging
from platform import system
from tqdm import tqdm
from multiprocessing import Lock
loggers = {}
# https://stackoverflow.com/questions/38543506/
class TqdmLoggingHandler(logging.Handler):
def __init__(self, level=logging.NOTSET):
super(TqdmLoggingHandler, self).__init__(level)
def emit... | 29.017241 | 110 | 0.655971 | 430 | 0.255496 | 0 | 0 | 0 | 0 | 0 | 0 | 299 | 0.177659 |
fe27abc65b6073ec58be633f81761077a129a312 | 1,243 | py | Python | face-detect.py | Gicehajunior/face-recognition-detection-OpenCv-Python | 6551285ce5b4532d8b6f3ad6b8e9a29564673ea9 | [
"Unlicense"
] | null | null | null | face-detect.py | Gicehajunior/face-recognition-detection-OpenCv-Python | 6551285ce5b4532d8b6f3ad6b8e9a29564673ea9 | [
"Unlicense"
] | null | null | null | face-detect.py | Gicehajunior/face-recognition-detection-OpenCv-Python | 6551285ce5b4532d8b6f3ad6b8e9a29564673ea9 | [
"Unlicense"
] | null | null | null | import cv2
import sys
import playsound
face_cascade = cv2.CascadeClassifier('cascades/haarcascade_frontalface_default.xml')
# capture video using cv2
video_capture = cv2.VideoCapture(0)
while True:
# capture frame by frame, i.e, one by one
ret, frame = video_capture.read()
gray = cv2.cvtColor(frame... | 28.25 | 85 | 0.563154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 314 | 0.252615 |
fe27fecf1f48f5d4699cad091ca66149a513fe9b | 7,938 | py | Python | sis/enrollments.py | ryanlovett/sis-cli | 5efe5b9344b547c3f1365ef63a0ad33ec013fcca | [
"Apache-2.0"
] | null | null | null | sis/enrollments.py | ryanlovett/sis-cli | 5efe5b9344b547c3f1365ef63a0ad33ec013fcca | [
"Apache-2.0"
] | null | null | null | sis/enrollments.py | ryanlovett/sis-cli | 5efe5b9344b547c3f1365ef63a0ad33ec013fcca | [
"Apache-2.0"
] | null | null | null | # vim:set et sw=4 ts=4:
import logging
import sys
import jmespath
from . import sis, classes
# logging
logging.basicConfig(stream=sys.stdout, level=logging.WARNING)
logger = logging.getLogger(__name__)
# SIS endpoint
enrollments_uri = "https://apis.berkeley.edu/sis/v2/enrollments"
# apparently some courses have LA... | 37.620853 | 105 | 0.68317 | 0 | 0 | 0 | 0 | 0 | 0 | 4,927 | 0.620685 | 3,272 | 0.412195 |
fe2900b93b3b942d3363b1695eb5a7b3920a90d6 | 1,913 | py | Python | app.py | Nishanth-Gobi/Da-Vinci-Code | b44a2d0c553e4f9cf9e2bb3283ebb5f6eaecea4a | [
"MIT"
] | null | null | null | app.py | Nishanth-Gobi/Da-Vinci-Code | b44a2d0c553e4f9cf9e2bb3283ebb5f6eaecea4a | [
"MIT"
] | null | null | null | app.py | Nishanth-Gobi/Da-Vinci-Code | b44a2d0c553e4f9cf9e2bb3283ebb5f6eaecea4a | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request, redirect, url_for
from os.path import join
from stego import Steganography
app = Flask(__name__)
UPLOAD_FOLDER = 'static/files/'
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg'}
@app.route("/")
def home():
return render_te... | 31.360656 | 97 | 0.67747 | 0 | 0 | 0 | 0 | 1,581 | 0.826451 | 0 | 0 | 432 | 0.225823 |
fe292b4982f3dd8af18a6b88ccaadbbba6d158ef | 8,012 | py | Python | imitation_learning/generate_demonstrations/gen_envs.py | HaiDangDang/2020-flatland | abbf2f7f62fabf6da0937f80c2181f1c457ce24a | [
"MIT"
] | 1 | 2021-02-21T02:54:35.000Z | 2021-02-21T02:54:35.000Z | imitation_learning/generate_demonstrations/gen_envs.py | HaiDangDang/2020-flatland | abbf2f7f62fabf6da0937f80c2181f1c457ce24a | [
"MIT"
] | null | null | null | imitation_learning/generate_demonstrations/gen_envs.py | HaiDangDang/2020-flatland | abbf2f7f62fabf6da0937f80c2181f1c457ce24a | [
"MIT"
] | null | null | null | from flatland.envs.agent_utils import RailAgentStatus
from flatland.envs.malfunction_generators import malfunction_from_params, MalfunctionParameters
from flatland.envs.observations import GlobalObsForRailEnv
from flatland.envs.rail_env import RailEnv
from flatland.envs.rail_generators import sparse_rail_generator
from... | 29.240876 | 96 | 0.623689 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,333 | 0.166375 |
fe2b48a6665b98787ac1bd205fe634201bd2120e | 1,480 | py | Python | job-queue-portal/postgres_django_queue/djangoenv/lib/python3.8/site-packages/django_celery_results/migrations/0006_taskresult_date_created.py | Sruthi-Ganesh/postgres-django-queue | 4ea8412c073ff8ceb0efbac48afc29456ae11346 | [
"Apache-2.0"
] | null | null | null | job-queue-portal/postgres_django_queue/djangoenv/lib/python3.8/site-packages/django_celery_results/migrations/0006_taskresult_date_created.py | Sruthi-Ganesh/postgres-django-queue | 4ea8412c073ff8ceb0efbac48afc29456ae11346 | [
"Apache-2.0"
] | null | null | null | job-queue-portal/postgres_django_queue/djangoenv/lib/python3.8/site-packages/django_celery_results/migrations/0006_taskresult_date_created.py | Sruthi-Ganesh/postgres-django-queue | 4ea8412c073ff8ceb0efbac48afc29456ae11346 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 2.2.4 on 2019-08-21 19:53
# this file is auto-generated so don't do flake8 on it
# flake8: noqa
from __future__ import absolute_import, unicode_literals
from django.db import migrations, models
import django.utils.timezone
def copy_date_done_to_date_created(apps, schem... | 30.204082 | 83 | 0.664189 | 734 | 0.495946 | 0 | 0 | 0 | 0 | 0 | 0 | 439 | 0.296622 |
fe2bf5d430a026df243c522eca3e9b1d054d0492 | 45 | py | Python | remediar/modules/http/__init__.py | fabaff/remediar | 014d7733b00cd40a45881c2729c04df5584476e7 | [
"Apache-2.0"
] | null | null | null | remediar/modules/http/__init__.py | fabaff/remediar | 014d7733b00cd40a45881c2729c04df5584476e7 | [
"Apache-2.0"
] | null | null | null | remediar/modules/http/__init__.py | fabaff/remediar | 014d7733b00cd40a45881c2729c04df5584476e7 | [
"Apache-2.0"
] | null | null | null | """Support for HTTP or web server issues."""
| 22.5 | 44 | 0.688889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.977778 |
fe2e74a698807b4b6d0cf881031198f5da548dd4 | 1,891 | py | Python | Image Recognition/utils/BayesianModels/Bayesian3Conv3FC.py | AlanMorningLight/PyTorch-BayesianCNN | 5de7133f09dd10135bf605efbdd26c18f2a4df13 | [
"MIT"
] | 1 | 2020-02-10T12:58:25.000Z | 2020-02-10T12:58:25.000Z | utils/BayesianModels/Bayesian3Conv3FC.py | SulemanKhurram/ThesisExperiments | 4fdf7b6558c87a096dcdc374c35085ac946d3a58 | [
"MIT"
] | null | null | null | utils/BayesianModels/Bayesian3Conv3FC.py | SulemanKhurram/ThesisExperiments | 4fdf7b6558c87a096dcdc374c35085ac946d3a58 | [
"MIT"
] | null | null | null | import torch.nn as nn
from utils.BBBlayers import BBBConv2d, BBBLinearFactorial, FlattenLayer
class BBB3Conv3FC(nn.Module):
"""
Simple Neural Network having 3 Convolution
and 3 FC layers with Bayesian layers.
"""
def __init__(self, outputs, inputs):
super(BBB3Conv3FC, self).__init__()
... | 35.679245 | 89 | 0.599683 | 1,796 | 0.949762 | 0 | 0 | 0 | 0 | 0 | 0 | 169 | 0.089371 |
fe2fc61a568a0e2538b7b1f99349a5186a485475 | 8,657 | py | Python | custom_scripts/load_animals.py | nphilou/influence-release | bcf3603705b6ff172bcb62123aef0248afa77a05 | [
"MIT"
] | null | null | null | custom_scripts/load_animals.py | nphilou/influence-release | bcf3603705b6ff172bcb62123aef0248afa77a05 | [
"MIT"
] | null | null | null | custom_scripts/load_animals.py | nphilou/influence-release | bcf3603705b6ff172bcb62123aef0248afa77a05 | [
"MIT"
] | null | null | null | import os
from tensorflow.contrib.learn.python.learn.datasets import base
import numpy as np
import IPython
from subprocess import call
from keras.preprocessing import image
from influence.dataset import DataSet
from influence.inception_v3 import preprocess_input
BASE_DIR = 'data' # TODO: change
def fill(X, Y, id... | 35.479508 | 167 | 0.611644 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,301 | 0.150283 |
fe2fd1a403e44db33fca9bd236a441a4df247ba1 | 13,000 | py | Python | src/qiskit_aws_braket_provider/awsbackend.py | carstenblank/qiskit-aws-braket-provider | 539f0c75c2ccf1f6e5e981b92ea74f497fcba237 | [
"Apache-2.0"
] | 7 | 2020-09-25T17:16:54.000Z | 2021-05-20T10:42:52.000Z | src/qiskit_aws_braket_provider/awsbackend.py | carstenblank/qiskit-aws-braket-provider | 539f0c75c2ccf1f6e5e981b92ea74f497fcba237 | [
"Apache-2.0"
] | 4 | 2020-09-21T19:33:39.000Z | 2020-09-22T12:21:11.000Z | src/qiskit_aws_braket_provider/awsbackend.py | carstenblank/qiskit-aws-braket-provider | 539f0c75c2ccf1f6e5e981b92ea74f497fcba237 | [
"Apache-2.0"
] | 1 | 2020-09-21T19:32:16.000Z | 2020-09-21T19:32:16.000Z | # Copyright 2020 Carsten Blank
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 45.138889 | 144 | 0.666923 | 11,324 | 0.871077 | 0 | 0 | 257 | 0.019769 | 0 | 0 | 2,461 | 0.189308 |
fe2ffb0cf28c08ae4282aa561c6f775796ff339b | 14,564 | py | Python | test/unit/Algorithms/GenericLinearTransportTest.py | thirtywang/OpenPNM | e55ee7ae69a8be3e2b0e6bf24c9ff92b6d24e16a | [
"MIT"
] | null | null | null | test/unit/Algorithms/GenericLinearTransportTest.py | thirtywang/OpenPNM | e55ee7ae69a8be3e2b0e6bf24c9ff92b6d24e16a | [
"MIT"
] | null | null | null | test/unit/Algorithms/GenericLinearTransportTest.py | thirtywang/OpenPNM | e55ee7ae69a8be3e2b0e6bf24c9ff92b6d24e16a | [
"MIT"
] | 1 | 2020-07-02T02:21:10.000Z | 2020-07-02T02:21:10.000Z | import OpenPNM
import numpy as np
import OpenPNM.Physics.models as pm
class GenericLinearTransportTest:
def setup_class(self):
self.net = OpenPNM.Network.Cubic(shape=[5, 5, 5])
self.phase = OpenPNM.Phases.GenericPhase(network=self.net)
Ps = self.net.Ps
Ts = self.net.Ts
self... | 51.101754 | 78 | 0.49025 | 14,491 | 0.994988 | 0 | 0 | 0 | 0 | 0 | 0 | 1,559 | 0.107045 |
fe3002f8ab77d8668df51f08f7789bc9628e8c1f | 2,370 | py | Python | EC2 Auto Clean Room Forensics/Lambda-Functions/snapshotForRemediation.py | spartantri/aws-security-automation | a3904931220111022d12e71a3d79e4a85fc82173 | [
"Apache-2.0"
] | null | null | null | EC2 Auto Clean Room Forensics/Lambda-Functions/snapshotForRemediation.py | spartantri/aws-security-automation | a3904931220111022d12e71a3d79e4a85fc82173 | [
"Apache-2.0"
] | null | null | null | EC2 Auto Clean Room Forensics/Lambda-Functions/snapshotForRemediation.py | spartantri/aws-security-automation | a3904931220111022d12e71a3d79e4a85fc82173 | [
"Apache-2.0"
] | null | null | null | # MIT No Attribution
# Permission is hereby granted, free of charge, to any person obtaining a copy of this
# software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify,
# merge, publish, distribute, sublicen... | 33.857143 | 110 | 0.670042 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,321 | 0.557384 |
fe30812932f608889eaceef38afb76f593b3db27 | 3,830 | py | Python | gpu_bdb/queries/q26/gpu_bdb_query_26.py | VibhuJawa/gpu-bdb | 13987b4ef8b92db3b9d2905dec7bd2fd81f42ae9 | [
"Apache-2.0"
] | 62 | 2020-05-14T13:33:02.000Z | 2020-10-29T13:28:26.000Z | gpu_bdb/queries/q26/gpu_bdb_query_26.py | VibhuJawa/gpu-bdb | 13987b4ef8b92db3b9d2905dec7bd2fd81f42ae9 | [
"Apache-2.0"
] | 104 | 2020-07-01T21:07:42.000Z | 2020-11-13T16:36:04.000Z | gpu_bdb/queries/q26/gpu_bdb_query_26.py | VibhuJawa/gpu-bdb | 13987b4ef8b92db3b9d2905dec7bd2fd81f42ae9 | [
"Apache-2.0"
] | 21 | 2020-05-14T14:44:40.000Z | 2020-11-07T12:08:28.000Z | #
# Copyright (c) 2019-2022, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 31.138211 | 115 | 0.703655 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,332 | 0.347781 |
fe317187c1c12b8c77ea5e51802f388e760744e4 | 1,324 | py | Python | tests/test_intbounds.py | alex/optimizer-model | 0e40a0763082f5fe0bd596e8e77ebccbcd7f4a98 | [
"BSD-3-Clause"
] | 4 | 2015-04-29T22:49:25.000Z | 2018-02-16T09:06:08.000Z | tests/test_intbounds.py | alex/optimizer-model | 0e40a0763082f5fe0bd596e8e77ebccbcd7f4a98 | [
"BSD-3-Clause"
] | null | null | null | tests/test_intbounds.py | alex/optimizer-model | 0e40a0763082f5fe0bd596e8e77ebccbcd7f4a98 | [
"BSD-3-Clause"
] | null | null | null | from optimizer.utils.intbounds import IntBounds
class TestIntBounds(object):
def test_make_gt(self):
i0 = IntBounds()
i1 = i0.make_gt(IntBounds(10, 10))
assert i1.lower == 11
def test_make_gt_already_bounded(self):
i0 = IntBounds()
i1 = i0.make_gt(IntBounds(10, 10))... | 23.22807 | 67 | 0.5929 | 1,273 | 0.96148 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fe3188f73830a0839c72948677e1605c9ae2ae83 | 1,586 | py | Python | tdclient/test/database_model_test.py | minchuang/td-client-python | 6cf6dfbb60119f400274491d3e942d4f9fbcebd6 | [
"Apache-2.0"
] | 2 | 2019-02-22T11:56:17.000Z | 2019-02-25T10:09:46.000Z | tdclient/test/database_model_test.py | minchuang/td-client-python | 6cf6dfbb60119f400274491d3e942d4f9fbcebd6 | [
"Apache-2.0"
] | null | null | null | tdclient/test/database_model_test.py | minchuang/td-client-python | 6cf6dfbb60119f400274491d3e942d4f9fbcebd6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
from __future__ import unicode_literals
try:
from unittest import mock
except ImportError:
import mock
from tdclient import models
from tdclient.test.test_helper import *
def setup_function(function):
unset_environ()
def test_database():
c... | 40.666667 | 202 | 0.713745 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 420 | 0.264817 |
fe31f26debb52795b22561b36355ce06ff7905d8 | 558 | py | Python | setup.py | ballcap231/fireTS | 74cc89a14d67edabf31139d1552025d54791f2a9 | [
"MIT"
] | null | null | null | setup.py | ballcap231/fireTS | 74cc89a14d67edabf31139d1552025d54791f2a9 | [
"MIT"
] | null | null | null | setup.py | ballcap231/fireTS | 74cc89a14d67edabf31139d1552025d54791f2a9 | [
"MIT"
] | null | null | null | from setuptools import setup
dependencies = [
'numpy',
'scipy',
'scikit-learn',
]
setup(
name='fireTS',
version='0.0.7',
description='A python package for multi-variate time series prediction',
long_description=open('README.md').read(),
long_description_content_type="text/markdown",
... | 24.26087 | 76 | 0.677419 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 209 | 0.374552 |
fe3273d41978521818a7243089a132072ef92c5a | 883 | py | Python | euler/py/project_019.py | heyihan/scodes | 342518b548a723916c9273d8ebc1b345a0467e76 | [
"BSD-3-Clause"
] | null | null | null | euler/py/project_019.py | heyihan/scodes | 342518b548a723916c9273d8ebc1b345a0467e76 | [
"BSD-3-Clause"
] | null | null | null | euler/py/project_019.py | heyihan/scodes | 342518b548a723916c9273d8ebc1b345a0467e76 | [
"BSD-3-Clause"
] | null | null | null | # https://projecteuler.net/problem=19
def is_leap(year):
if year%4 != 0:
return False
if year%100 == 0 and year%400 != 0:
return False
return True
def year_days(year):
if is_leap(year):
return 366
return 365
def month_days(month, year):
if month == 4 or month == 6 or m... | 20.534884 | 61 | 0.582106 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 70 | 0.079275 |
fe32cc9e555895354fe2279db255494d9b4433fb | 1,652 | py | Python | address_book/address_book.py | wowsuchnamaste/address_book | 4877d16d795c54b750e151fa93e69c080717ae72 | [
"MIT"
] | null | null | null | address_book/address_book.py | wowsuchnamaste/address_book | 4877d16d795c54b750e151fa93e69c080717ae72 | [
"MIT"
] | null | null | null | address_book/address_book.py | wowsuchnamaste/address_book | 4877d16d795c54b750e151fa93e69c080717ae72 | [
"MIT"
] | null | null | null | """A simple address book."""
from ._tools import generate_uuid
class AddressBook:
"""
A simple address book.
"""
def __init__(self):
self._entries = []
def add_entry(self, entry):
"""Add an entry to the address book."""
self._entries.append(entry)
def get_entries(sel... | 25.415385 | 80 | 0.565981 | 1,583 | 0.958232 | 0 | 0 | 0 | 0 | 0 | 0 | 458 | 0.27724 |
fe3415df5ab13d93fe351122344f2bd2d2fe4c5f | 3,839 | py | Python | inference.py | zzhang87/ChestXray | eaafe2f7f5e91bb30fbed02dec1f77ff314434b5 | [
"MIT"
] | null | null | null | inference.py | zzhang87/ChestXray | eaafe2f7f5e91bb30fbed02dec1f77ff314434b5 | [
"MIT"
] | 11 | 2020-01-28T21:44:26.000Z | 2022-03-11T23:19:37.000Z | inference.py | zzhang87/ChestXray | eaafe2f7f5e91bb30fbed02dec1f77ff314434b5 | [
"MIT"
] | null | null | null | import keras
import numpy as np
import pandas as pd
import cv2
import os
import json
import pdb
import argparse
import math
import copy
from vis.visualization import visualize_cam, overlay, visualize_activation
from vis.utils.utils import apply_modifications
from shutil import rmtree
import matplotlib.cm as cm
from ma... | 27.035211 | 107 | 0.716593 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 530 | 0.138057 |
fe34376d96d5593399f4f9364cf5da83ea7d813b | 530 | py | Python | test/DQueueTest.py | MistSun-Chen/py_verifier | 7e9161d1fdbb611fe4be5eeb2f89a6286fa7b555 | [
"MIT"
] | null | null | null | test/DQueueTest.py | MistSun-Chen/py_verifier | 7e9161d1fdbb611fe4be5eeb2f89a6286fa7b555 | [
"MIT"
] | null | null | null | test/DQueueTest.py | MistSun-Chen/py_verifier | 7e9161d1fdbb611fe4be5eeb2f89a6286fa7b555 | [
"MIT"
] | null | null | null | from libTask import Queue
from common import configParams
from common import common
def main():
cp = configParams.ConfigParams("config.json")
detectGeneralQueue = Queue.DQueue(cp, len(cp.detect_general_ids), cp.modelPath, common.GENERALDETECT_METHOD_ID,
cp.GPUDevices, cp.detect_g... | 35.333333 | 124 | 0.718868 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.081132 |
fe358e9590f17c8d7c10eb92232dc2f7d4b20167 | 235 | py | Python | config.py | volgachen/Chinese-Tokenization | 467e08da6fe271b6e33258d5aa6682c0405a3f32 | [
"Apache-2.0"
] | null | null | null | config.py | volgachen/Chinese-Tokenization | 467e08da6fe271b6e33258d5aa6682c0405a3f32 | [
"Apache-2.0"
] | null | null | null | config.py | volgachen/Chinese-Tokenization | 467e08da6fe271b6e33258d5aa6682c0405a3f32 | [
"Apache-2.0"
] | 1 | 2020-07-12T10:38:34.000Z | 2020-07-12T10:38:34.000Z | class Config:
ngram = 2
train_set = "data/rmrb.txt"
modified_train_set = "data/rmrb_modified.txt"
test_set = ""
model_file = ""
param_file = ""
word_max_len = 10
proposals_keep_ratio = 1.0
use_re = 1
subseq_num = 15 | 21.363636 | 47 | 0.67234 | 235 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.191489 |
fe3599447ec843cd5c9296bccc205dff470707c7 | 1,417 | py | Python | src/Knn-Tensor.py | python-itb/knn-from-scratch | dbc6fb53cffb245a76d35b9ff85ac8cb21877ca8 | [
"MIT"
] | null | null | null | src/Knn-Tensor.py | python-itb/knn-from-scratch | dbc6fb53cffb245a76d35b9ff85ac8cb21877ca8 | [
"MIT"
] | 2 | 2018-03-20T06:47:32.000Z | 2018-10-25T10:54:08.000Z | src/Knn-Tensor.py | python-itb/knn-from-scratch | dbc6fb53cffb245a76d35b9ff85ac8cb21877ca8 | [
"MIT"
] | 4 | 2018-03-20T06:43:11.000Z | 2019-04-15T16:34:28.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 13 18:52:28 2018
@author: amajidsinar
"""
from sklearn import datasets
import matplotlib.pyplot as plt
import numpy as np
plt.style.use('seaborn-white')
iris = datasets.load_iris()
dataset = iris.data
# only take 0th and 1th column for X
data_kno... | 21.149254 | 94 | 0.687368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 494 | 0.348624 |
fe35a3606e5ec595f8753af44fd793743da1ae33 | 2,135 | py | Python | de_test_tron2.py | volpepe/detectron2-ResNeSt | 1481d50880baa615b873b7a18156c06a5606a85c | [
"Apache-2.0"
] | null | null | null | de_test_tron2.py | volpepe/detectron2-ResNeSt | 1481d50880baa615b873b7a18156c06a5606a85c | [
"Apache-2.0"
] | null | null | null | de_test_tron2.py | volpepe/detectron2-ResNeSt | 1481d50880baa615b873b7a18156c06a5606a85c | [
"Apache-2.0"
] | null | null | null | import torch, torchvision
import detectron2
from detectron2.utils.logger import setup_logger
setup_logger()
# import some common libraries
import numpy as np
import os, json, cv2, random
# import some common detectron2 utilities
from detectron2 import model_zoo
from detectron2.engine import DefaultPredic... | 40.283019 | 164 | 0.710539 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 625 | 0.29274 |
fe35e371f2d0a2c205ae69e2ee6c811fd9ed1de5 | 8,916 | py | Python | pika/data.py | Pankrat/pika | 9f62cbe032e9b4fa0fe1842587ce0702c3926a3d | [
"BSD-3-Clause"
] | null | null | null | pika/data.py | Pankrat/pika | 9f62cbe032e9b4fa0fe1842587ce0702c3926a3d | [
"BSD-3-Clause"
] | null | null | null | pika/data.py | Pankrat/pika | 9f62cbe032e9b4fa0fe1842587ce0702c3926a3d | [
"BSD-3-Clause"
] | null | null | null | """AMQP Table Encoding/Decoding"""
import struct
import decimal
import calendar
from datetime import datetime
from pika import exceptions
from pika.compat import unicode_type, PY2, long, as_bytes
def encode_short_string(pieces, value):
"""Encode a string value as short string and append it to pieces list
ret... | 30.534247 | 80 | 0.596456 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,707 | 0.303611 |
fe372dac70d64a37ad3e688bb47fa5b1bd4ad42e | 528 | py | Python | tests/fixtures/data_sets/service/dummy/dummy_configurable.py | Agi-dev/pylaas_core | c44866b5e57eb6f05f5b2b8d731f22d62a8c01c2 | [
"MIT"
] | null | null | null | tests/fixtures/data_sets/service/dummy/dummy_configurable.py | Agi-dev/pylaas_core | c44866b5e57eb6f05f5b2b8d731f22d62a8c01c2 | [
"MIT"
] | 2 | 2021-03-25T21:30:41.000Z | 2021-06-01T21:25:37.000Z | tests/fixtures/data_sets/service/dummy/dummy_configurable.py | Agi-dev/pylaas_core | c44866b5e57eb6f05f5b2b8d731f22d62a8c01c2 | [
"MIT"
] | null | null | null | from pylaas_core.abstract.abstract_service import AbstractService
import time
from pylaas_core.interface.technical.container_configurable_aware_interface import ContainerConfigurableAwareInterface
class DummyConfigurable(AbstractService, ContainerConfigurableAwareInterface):
def __init__(self) -> None:
... | 31.058824 | 118 | 0.765152 | 327 | 0.619318 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fe3845f60103709c0d0030d388891565874650ad | 1,076 | py | Python | blogtech/src/blog/views.py | IVAN-URBACZKA/django-blog | 7ef6050c0de2938791843c3ec93e6e6a1e683baa | [
"MIT"
] | null | null | null | blogtech/src/blog/views.py | IVAN-URBACZKA/django-blog | 7ef6050c0de2938791843c3ec93e6e6a1e683baa | [
"MIT"
] | null | null | null | blogtech/src/blog/views.py | IVAN-URBACZKA/django-blog | 7ef6050c0de2938791843c3ec93e6e6a1e683baa | [
"MIT"
] | null | null | null | from django.urls import reverse_lazy, reverse
from django.utils.decorators import method_decorator
from django.views.generic import ListView, DetailView, CreateView, DeleteView, UpdateView
from .models import BlogPost
from django.contrib.auth.decorators import login_required
class BlogPostHomeView(ListView):
mode... | 31.647059 | 89 | 0.760223 | 636 | 0.591078 | 0 | 0 | 609 | 0.565985 | 0 | 0 | 169 | 0.157063 |
fe393898f4084fe1c0d82dbb19e8e9bf170a60ea | 4,514 | py | Python | apc_deep_vision/python/generate_data.py | Juxi/apb-baseline | fd47a5fd78cdfd75c68601a40ca4726d7d20c9ce | [
"BSD-3-Clause"
] | 9 | 2017-02-06T10:24:56.000Z | 2022-02-27T20:59:52.000Z | apc_deep_vision/python/generate_data.py | Juxi/apb-baseline | fd47a5fd78cdfd75c68601a40ca4726d7d20c9ce | [
"BSD-3-Clause"
] | null | null | null | apc_deep_vision/python/generate_data.py | Juxi/apb-baseline | fd47a5fd78cdfd75c68601a40ca4726d7d20c9ce | [
"BSD-3-Clause"
] | 2 | 2017-10-15T08:33:37.000Z | 2019-03-05T07:29:38.000Z | #! /usr/bin/env python
# ********************************************************************
# Software License Agreement (BSD License)
#
# Copyright (c) 2015, University of Colorado, Boulder
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted... | 37.932773 | 105 | 0.634914 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,437 | 0.539876 |
fe39cd977754d7baa5900e133ad7f76b583b9786 | 3,509 | py | Python | stats.py | shirshanka/fact-ory | 9e6bae63ca7f8f534b811058efb8942004d6a37b | [
"Apache-2.0"
] | null | null | null | stats.py | shirshanka/fact-ory | 9e6bae63ca7f8f534b811058efb8942004d6a37b | [
"Apache-2.0"
] | null | null | null | stats.py | shirshanka/fact-ory | 9e6bae63ca7f8f534b811058efb8942004d6a37b | [
"Apache-2.0"
] | null | null | null | import numpy as np;
import sys
import matplotlib.pyplot as plt;
from matplotlib import cm;
from termcolor import colored;
class Stats():
def __init__(self, param1_range, param2_range):
self._total_times = 0;
self._total_time = 0.0;
self._wrong_answers = [];
self._time_dict = {};
self._param1_rang... | 34.742574 | 154 | 0.68937 | 3,336 | 0.950698 | 0 | 0 | 0 | 0 | 0 | 0 | 349 | 0.099459 |
fe3be5e4c8643dd88fcaa6473267f6ae2cf76961 | 1,706 | py | Python | examples/peptidecutter/advanced.py | zjuchenyuan/EasyLogin | acc67187d902f20ec64d2d6b9eeb953e2a0ac77d | [
"MIT"
] | 33 | 2016-12-01T01:33:31.000Z | 2021-05-12T03:32:27.000Z | examples/peptidecutter/advanced.py | zjuchenyuan/EasyLogin | acc67187d902f20ec64d2d6b9eeb953e2a0ac77d | [
"MIT"
] | 2 | 2018-04-26T06:58:29.000Z | 2020-01-11T15:18:14.000Z | examples/peptidecutter/advanced.py | zjuchenyuan/EasyLogin | acc67187d902f20ec64d2d6b9eeb953e2a0ac77d | [
"MIT"
] | 4 | 2017-02-24T11:08:45.000Z | 2021-01-13T16:00:33.000Z | from EasyLogin import EasyLogin
from pprint import pprint
def peptidecutter(oneprotein):
a = EasyLogin(proxy="socks5://127.0.0.1:1080") #speed up by using proxy
a.post("http://web.expasy.org/cgi-bin/peptide_cutter/peptidecutter.pl",
"protein={}&enzyme_number=all_enzymes&special_enzyme=Chym&min_pr... | 30.464286 | 200 | 0.579132 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 401 | 0.235053 |
fe3c13d3bb5c59b28cc1e5b5a35923b1537df9f4 | 1,333 | py | Python | pgn2fixture/tests/test_utils.py | pointerish/pgn2fixture | 02039680acc37cbca22fb332738e34cd113831a4 | [
"MIT"
] | 3 | 2021-03-18T19:08:59.000Z | 2021-10-10T03:52:49.000Z | pgn2fixture/tests/test_utils.py | pointerish/pgn2fixture | 02039680acc37cbca22fb332738e34cd113831a4 | [
"MIT"
] | null | null | null | pgn2fixture/tests/test_utils.py | pointerish/pgn2fixture | 02039680acc37cbca22fb332738e34cd113831a4 | [
"MIT"
] | null | null | null | import unittest
from .. import utils
class TestUtils(unittest.TestCase):
def setUp(self) -> None:
self.pgn_string = '''
[Event "US Championship 1963/64"]
[Site "New York, NY USA"]
[Date "1964.01.01"]
[EventDate "1963.??.??"]
[Round "11"][Result "0-1"]
[Whit... | 43 | 165 | 0.549887 | 1,293 | 0.969992 | 0 | 0 | 0 | 0 | 0 | 0 | 845 | 0.633908 |
fe3c354a94b9bc97c332f504c7fb8dc959b31224 | 7,019 | py | Python | manila/tests/share/test_snapshot_access.py | gouthampacha/manila | 4b7ba9b99d272663f519b495668715fbf979ffbc | [
"Apache-2.0"
] | 3 | 2016-06-06T13:05:00.000Z | 2021-05-05T04:29:24.000Z | manila/tests/share/test_snapshot_access.py | gouthampacha/manila | 4b7ba9b99d272663f519b495668715fbf979ffbc | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | manila/tests/share/test_snapshot_access.py | gouthampacha/manila | 4b7ba9b99d272663f519b495668715fbf979ffbc | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # Copyright (c) 2016 Hitachi Data Systems, 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
#
# U... | 41.532544 | 78 | 0.648383 | 6,087 | 0.867218 | 0 | 0 | 6,096 | 0.8685 | 0 | 0 | 1,422 | 0.202593 |
fe3d447e3c8eb707e5a1d8550493f94e70efafc2 | 269 | py | Python | packages/pyright-internal/src/tests/samples/unnecessaryCast1.py | sasano8/pyright | e804f324ee5dbd25fd37a258791b3fd944addecd | [
"MIT"
] | 4,391 | 2019-05-07T01:18:57.000Z | 2022-03-31T20:45:44.000Z | packages/pyright-internal/src/tests/samples/unnecessaryCast1.py | sasano8/pyright | e804f324ee5dbd25fd37a258791b3fd944addecd | [
"MIT"
] | 2,740 | 2019-05-07T03:29:30.000Z | 2022-03-31T12:57:46.000Z | packages/pyright-internal/src/tests/samples/unnecessaryCast1.py | sasano8/pyright | e804f324ee5dbd25fd37a258791b3fd944addecd | [
"MIT"
] | 455 | 2019-05-07T12:55:14.000Z | 2022-03-31T17:09:15.000Z | # This sample tests the type checker's reportUnnecessaryCast feature.
from typing import cast, Union
def foo(a: int):
# This should generate an error if
# reportUnnecessaryCast is enabled.
b = cast(int, a)
c: Union[int, str] = "hello"
d = cast(int, c)
| 19.214286 | 69 | 0.687732 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 145 | 0.539033 |
fe3dd2d72750bce0851326699b900d4e0689f605 | 690 | py | Python | Python/1238.py | ArikBartzadok/beecrowd-challenges | ddb0453d1caa75c87c4b3ed6a40309ab99da77f2 | [
"MIT"
] | null | null | null | Python/1238.py | ArikBartzadok/beecrowd-challenges | ddb0453d1caa75c87c4b3ed6a40309ab99da77f2 | [
"MIT"
] | null | null | null | Python/1238.py | ArikBartzadok/beecrowd-challenges | ddb0453d1caa75c87c4b3ed6a40309ab99da77f2 | [
"MIT"
] | null | null | null | def execucoes():
return int(input())
def entradas():
return input().split(' ')
def imprimir(v):
print(v)
def tamanho_a(a):
return len(a)
def tamanho_b(b):
return len(b)
def diferenca_tamanhos(a, b):
return (len(a) <= len(b))
def analisar(e, i, s):
a, b = e
if(diferenca_tamanhos(a, ... | 18.157895 | 60 | 0.510145 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0.007246 |
fe3e731bfc56815773233eb7a914918e37d052e2 | 974 | py | Python | metadata_service/api/popular_tables.py | worldwise001/amundsenmetadatalibrary | 9914c8b51d38b8bd76d3249eb4f7fcce3e198d09 | [
"Apache-2.0"
] | null | null | null | metadata_service/api/popular_tables.py | worldwise001/amundsenmetadatalibrary | 9914c8b51d38b8bd76d3249eb4f7fcce3e198d09 | [
"Apache-2.0"
] | 1 | 2019-09-21T23:59:46.000Z | 2019-09-21T23:59:46.000Z | metadata_service/api/popular_tables.py | worldwise001/amundsenmetadatalibrary | 9914c8b51d38b8bd76d3249eb4f7fcce3e198d09 | [
"Apache-2.0"
] | 1 | 2019-09-21T23:56:40.000Z | 2019-09-21T23:56:40.000Z | from http import HTTPStatus
from typing import Iterable, Union, Mapping
from flask import request
from flask_restful import Resource, fields, marshal
from metadata_service.proxy import get_proxy_client
popular_table_fields = {
'database': fields.String,
'cluster': fields.String,
'schema': fields.String,
... | 29.515152 | 96 | 0.722793 | 421 | 0.432238 | 0 | 0 | 0 | 0 | 0 | 0 | 159 | 0.163244 |
fe3e90a0352653677e5f89aa3d6275c22d3a1048 | 470 | py | Python | tests/test1.py | SaijC/manhwaDownloader | f6e97cfe25355598e42633a3796d84b666d5302f | [
"MIT"
] | null | null | null | tests/test1.py | SaijC/manhwaDownloader | f6e97cfe25355598e42633a3796d84b666d5302f | [
"MIT"
] | null | null | null | tests/test1.py | SaijC/manhwaDownloader | f6e97cfe25355598e42633a3796d84b666d5302f | [
"MIT"
] | null | null | null | import requests
import logging
import cfscrape
import os
from manhwaDownloader.constants import CONSTANTS as CONST
logging.basicConfig(level=logging.DEBUG)
folderPath = os.path.join(CONST.OUTPUTPATH, 'serious-taste-of-forbbiden-fruit')
logging.info(len([file for file in os.walk(folderPath)]))
walkList = [file for fi... | 24.736842 | 79 | 0.778723 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 0.07234 |
fe3ee793457d0725edb13bd4a978ffe58340aff1 | 11,708 | py | Python | others/Keras_custom_error.py | rahasayantan/Work-For-Reference | e052da538df84034ec5a0fe3b19c4287de307286 | [
"MIT"
] | null | null | null | others/Keras_custom_error.py | rahasayantan/Work-For-Reference | e052da538df84034ec5a0fe3b19c4287de307286 | [
"MIT"
] | null | null | null | others/Keras_custom_error.py | rahasayantan/Work-For-Reference | e052da538df84034ec5a0fe3b19c4287de307286 | [
"MIT"
] | null | null | null | # define custom R2 metrics for Keras backend
from keras import backend as K
def r2_keras(y_true, y_pred):
SS_res = K.sum(K.square( y_true - y_pred ))
SS_tot = K.sum(K.square( y_true - K.mean(y_true) ) )
return ( 1 - SS_res/(SS_tot + K.epsilon()) )
# base model architecture definition
def model():
... | 31.643243 | 112 | 0.656389 | 2,020 | 0.172532 | 0 | 0 | 0 | 0 | 0 | 0 | 2,902 | 0.247865 |